From 7dc1a2ba7293503973de28ed9d9a4059e2b48246 Mon Sep 17 00:00:00 2001 From: GJ Date: Mon, 5 Mar 2012 00:42:18 -0500 Subject: [PATCH] Fix for Ocelot Summoning - still need new locale string for summon failure. --- .../java/com/gmail/nossr50/listeners/mcPlayerListener.java | 2 +- src/main/java/com/gmail/nossr50/skills/Taming.java | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/listeners/mcPlayerListener.java b/src/main/java/com/gmail/nossr50/listeners/mcPlayerListener.java index 020a3ae29..0265ba42d 100644 --- a/src/main/java/com/gmail/nossr50/listeners/mcPlayerListener.java +++ b/src/main/java/com/gmail/nossr50/listeners/mcPlayerListener.java @@ -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 diff --git a/src/main/java/com/gmail/nossr50/skills/Taming.java b/src/main/java/com/gmail/nossr50/skills/Taming.java index 82e67602a..c99a8bf0f 100644 --- a/src/main/java/com/gmail/nossr50/skills/Taming.java +++ b/src/main/java/com/gmail/nossr50/skills/Taming.java @@ -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")); }