diff --git a/src/main/java/com/gmail/nossr50/config/Config.java b/src/main/java/com/gmail/nossr50/config/Config.java index a4189dadd..8554d5f78 100644 --- a/src/main/java/com/gmail/nossr50/config/Config.java +++ b/src/main/java/com/gmail/nossr50/config/Config.java @@ -169,6 +169,7 @@ public class Config extends ConfigLoader { public int getHerbalismXPPotato() { return config.getInt("Experience.Herbalism.Potato", 50); } public boolean getHerbalismGreenThumbCobbleToMossy() { return config.getBoolean("Skills.Herbalism.Green_Thumb.Cobble_To_Mossy", true); } + public boolean getHerbalismGreenThumbCobbleWallToMossyWall() { return config.getBoolean("Skills.Herbalism.Green_Thumb.CobbleWall_To_MossyWall", true); } public boolean getHerbalismGreenThumbSmoothbrickToMossy() { return config.getBoolean("Skills.Herbalism.Green_Thumb.SmoothBrick_To_MossyBrick", true); } public boolean getHerbalismGreenThumbDirtToGrass() { return config.getBoolean("Skills.Herbalism.Green_Thumb.Dirt_To_Grass", true); } diff --git a/src/main/java/com/gmail/nossr50/listeners/EntityListener.java b/src/main/java/com/gmail/nossr50/listeners/EntityListener.java index 035a76e61..739099d4c 100644 --- a/src/main/java/com/gmail/nossr50/listeners/EntityListener.java +++ b/src/main/java/com/gmail/nossr50/listeners/EntityListener.java @@ -229,10 +229,12 @@ public class EntityListener implements Listener { @EventHandler (priority = EventPriority.HIGHEST, ignoreCancelled = true) public void onEnitityExplode(EntityExplodeEvent event) { Entity entity = event.getEntity(); + + if(entity == null) return; if(entity.hasMetadata("NPC")) return; // Check if this player is a Citizens NPC - if (event.getEntity() instanceof TNTPrimed) { + if (entity instanceof TNTPrimed) { int id = entity.getEntityId(); if (plugin.tntIsTracked(id)) { diff --git a/src/main/java/com/gmail/nossr50/skills/gathering/Herbalism.java b/src/main/java/com/gmail/nossr50/skills/gathering/Herbalism.java index ee5f9e014..303cdad1c 100644 --- a/src/main/java/com/gmail/nossr50/skills/gathering/Herbalism.java +++ b/src/main/java/com/gmail/nossr50/skills/gathering/Herbalism.java @@ -65,6 +65,9 @@ public class Herbalism { // Don't award double drops to mossified cobblestone mcMMO.placeStore.setTrue(block); } + else if (Config.getInstance().getHerbalismGreenThumbCobbleWallToMossyWall() && type == Material.COBBLE_WALL) { + block.setData((byte) 1); + } } } @@ -237,10 +240,10 @@ public class Herbalism { if (mat == Material.COCOA) { is = new ItemStack(Material.INK_SACK, 1, (short) 3); } - else if (mat == Material.COCOA) { + else if (mat == Material.CARROT) { is = new ItemStack(Material.CARROT_ITEM, 1, (short) 0); } - else if (mat == Material.COCOA) { + else if (mat == Material.POTATO) { is = new ItemStack(Material.POTATO_ITEM, 1, (short) 0); } diff --git a/src/main/java/com/gmail/nossr50/util/BlockChecks.java b/src/main/java/com/gmail/nossr50/util/BlockChecks.java index 6b2128ade..82b055eeb 100644 --- a/src/main/java/com/gmail/nossr50/util/BlockChecks.java +++ b/src/main/java/com/gmail/nossr50/util/BlockChecks.java @@ -154,6 +154,7 @@ public class BlockChecks { case DIRT: return true; case SMOOTH_BRICK: + case COBBLE_WALL: if (block.getData() == 0) { return true; } diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index 625d75df9..d731a4e61 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -151,6 +151,7 @@ Skills: Level_Cap: 0 Green_Thumb: Cobble_To_Mossy: true + CobbleWall_To_MossyWall: true SmoothBrick_To_MossyBrick: true Dirt_To_Grass: true Mining: