mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-30 09:06:46 +01:00
Fix for Ocelot Summoning - still need new locale string for summon
failure.
This commit is contained in:
parent
4d99fe7230
commit
7dc1a2ba72
@ -260,8 +260,8 @@ public class mcPlayerListener implements Listener
|
|||||||
|
|
||||||
if(player.isSneaking() && mcPermissions.getInstance().taming(player) && (action == Action.RIGHT_CLICK_AIR || action == Action.RIGHT_CLICK_BLOCK))
|
if(player.isSneaking() && mcPermissions.getInstance().taming(player) && (action == Action.RIGHT_CLICK_AIR || action == Action.RIGHT_CLICK_BLOCK))
|
||||||
{
|
{
|
||||||
Taming.animalSummon(EntityType.WOLF, player);
|
|
||||||
Taming.animalSummon(EntityType.OCELOT, player);
|
Taming.animalSummon(EntityType.OCELOT, player);
|
||||||
|
Taming.animalSummon(EntityType.WOLF, player);
|
||||||
}
|
}
|
||||||
|
|
||||||
//BLAST MINING
|
//BLAST MINING
|
||||||
|
@ -173,9 +173,11 @@ public class Taming
|
|||||||
case WOLF:
|
case WOLF:
|
||||||
summonItem = Material.BONE;
|
summonItem = Material.BONE;
|
||||||
summonAmount = LoadProperties.bonesConsumedByCOTW;
|
summonAmount = LoadProperties.bonesConsumedByCOTW;
|
||||||
|
break;
|
||||||
case OCELOT:
|
case OCELOT:
|
||||||
summonItem = Material.RAW_FISH;
|
summonItem = Material.RAW_FISH;
|
||||||
summonAmount = LoadProperties.fishConsumedByCOTW;
|
summonAmount = LoadProperties.fishConsumedByCOTW;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(item.getType().equals(summonItem) && item.getAmount() >= summonAmount)
|
if(item.getType().equals(summonItem) && item.getAmount() >= summonAmount)
|
||||||
@ -193,7 +195,7 @@ public class Taming
|
|||||||
world.spawnCreature(player.getLocation(), type);
|
world.spawnCreature(player.getLocation(), type);
|
||||||
|
|
||||||
int amount = item.getAmount();
|
int amount = item.getAmount();
|
||||||
amount =- summonAmount;
|
amount = amount - summonAmount;
|
||||||
player.setItemInHand(new ItemStack(summonItem, amount));
|
player.setItemInHand(new ItemStack(summonItem, amount));
|
||||||
player.sendMessage(mcLocale.getString("m.TamingSummon"));
|
player.sendMessage(mcLocale.getString("m.TamingSummon"));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user