From 29d796b6af4efb337c06e3c22d6ee3b48c55d712 Mon Sep 17 00:00:00 2001 From: bm01 Date: Thu, 24 Jan 2013 16:14:15 +0100 Subject: [PATCH] Partially reverted my previous fix ItemStack constructor actually worked, the issue was about double drops using the original data, not about TreeFeller. --- .../java/com/gmail/nossr50/skills/woodcutting/TreeFeller.java | 3 +-- .../java/com/gmail/nossr50/skills/woodcutting/Woodcutting.java | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/skills/woodcutting/TreeFeller.java b/src/main/java/com/gmail/nossr50/skills/woodcutting/TreeFeller.java index 4790fba8c..6cfed6d21 100644 --- a/src/main/java/com/gmail/nossr50/skills/woodcutting/TreeFeller.java +++ b/src/main/java/com/gmail/nossr50/skills/woodcutting/TreeFeller.java @@ -10,7 +10,6 @@ import org.bukkit.block.Block; import org.bukkit.entity.Player; import org.bukkit.event.block.BlockBreakEvent; import org.bukkit.inventory.ItemStack; -import org.bukkit.material.MaterialData; import com.gmail.nossr50.mcMMO; import com.gmail.nossr50.datatypes.mods.CustomBlock; @@ -185,7 +184,7 @@ public abstract class TreeFeller { // TODO: Nerf XP from jungle trees, as it was done previously - Misc.dropItem(block.getLocation(), new MaterialData(Material.LOG, Woodcutting.extractLogItemData(block.getData())).toItemStack(1)); + Misc.dropItem(block.getLocation(), new ItemStack(Material.LOG, 1, Woodcutting.extractLogItemData(block.getData()))); break; case LEAVES: Misc.randomDropItem(block.getLocation(), new ItemStack(Material.SAPLING, 1, Woodcutting.extractLogItemData(block.getData())), 10); diff --git a/src/main/java/com/gmail/nossr50/skills/woodcutting/Woodcutting.java b/src/main/java/com/gmail/nossr50/skills/woodcutting/Woodcutting.java index 995cd7479..a7cfb4652 100644 --- a/src/main/java/com/gmail/nossr50/skills/woodcutting/Woodcutting.java +++ b/src/main/java/com/gmail/nossr50/skills/woodcutting/Woodcutting.java @@ -7,7 +7,6 @@ import org.bukkit.block.Block; import org.bukkit.entity.Player; import org.bukkit.event.block.BlockBreakEvent; import org.bukkit.inventory.ItemStack; -import org.bukkit.material.MaterialData; import org.getspout.spoutapi.sound.SoundEffect; import com.gmail.nossr50.mcMMO; @@ -146,7 +145,7 @@ public abstract class Woodcutting { else { byte itemData = extractLogItemData(block.getData()); Location location = block.getLocation(); - ItemStack item = new MaterialData(Material.LOG, itemData).toItemStack(1); + ItemStack item = new ItemStack(Material.LOG, 1, itemData); switch (TreeSpecies.getByData(itemData)) { case GENERIC: