From 7982e33823cf2704ab5bfea40f5d952f74c47dc4 Mon Sep 17 00:00:00 2001 From: nossr50 Date: Tue, 14 Feb 2012 14:47:11 -0800 Subject: [PATCH] Fixed my fix of Green Terra not planting wheat. --- src/main/java/com/gmail/nossr50/skills/Herbalism.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/skills/Herbalism.java b/src/main/java/com/gmail/nossr50/skills/Herbalism.java index c09f0cea7..7a663b177 100644 --- a/src/main/java/com/gmail/nossr50/skills/Herbalism.java +++ b/src/main/java/com/gmail/nossr50/skills/Herbalism.java @@ -74,7 +74,7 @@ public class Herbalism } } - public static void greenTerraWheat(Player player, Block block, BlockBreakEvent event, mcMMO plugin) + public static void greenTerraWheat(Player player, final Block block, BlockBreakEvent event, mcMMO plugin) { if(block.getType() == Material.WHEAT && block.getData() == (byte) 0x07) { @@ -93,7 +93,13 @@ public class Herbalism herbalismProcCheck(block, player, event, plugin); herbalismProcCheck(block, player, event, plugin); - block.setData((byte) 0x03); + + Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() { + public void run() { + block.setType(Material.CROPS); + block.setData((byte) 0x4); + } + }, 1); } }