Fix for Ocelot Summoning - still need new locale string for summon

failure.
This commit is contained in:
GJ 2012-03-05 00:42:18 -05:00
parent 4d99fe7230
commit 7dc1a2ba72
2 changed files with 4 additions and 2 deletions

View File

@ -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))
{
Taming.animalSummon(EntityType.WOLF, player);
Taming.animalSummon(EntityType.OCELOT, player);
Taming.animalSummon(EntityType.WOLF, player);
}
//BLAST MINING

View File

@ -173,9 +173,11 @@ public class Taming
case WOLF:
summonItem = Material.BONE;
summonAmount = LoadProperties.bonesConsumedByCOTW;
break;
case OCELOT:
summonItem = Material.RAW_FISH;
summonAmount = LoadProperties.fishConsumedByCOTW;
break;
}
if(item.getType().equals(summonItem) && item.getAmount() >= summonAmount)
@ -193,7 +195,7 @@ public class Taming
world.spawnCreature(player.getLocation(), type);
int amount = item.getAmount();
amount =- summonAmount;
amount = amount - summonAmount;
player.setItemInHand(new ItemStack(summonItem, amount));
player.sendMessage(mcLocale.getString("m.TamingSummon"));
}