|
@@ -8,7 +8,6 @@ import org.bukkit.Material;
|
|
import org.bukkit.block.BlockState;
|
|
import org.bukkit.block.BlockState;
|
|
import org.bukkit.entity.Player;
|
|
import org.bukkit.entity.Player;
|
|
import org.bukkit.inventory.ItemStack;
|
|
import org.bukkit.inventory.ItemStack;
|
|
-import org.bukkit.material.Tree;
|
|
|
|
|
|
|
|
import com.gmail.nossr50.datatypes.mods.CustomBlock;
|
|
import com.gmail.nossr50.datatypes.mods.CustomBlock;
|
|
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
|
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
|
@@ -161,18 +160,17 @@ public class WoodcuttingManager extends SkillManager {
|
|
Misc.randomDropItem(blockState.getLocation(), ModUtils.getCustomBlock(blockState).getItemDrop(), 10);
|
|
Misc.randomDropItem(blockState.getLocation(), ModUtils.getCustomBlock(blockState).getItemDrop(), 10);
|
|
}
|
|
}
|
|
else {
|
|
else {
|
|
- Tree tree = (Tree) blockState.getData();
|
|
|
|
switch (material) {
|
|
switch (material) {
|
|
case LOG:
|
|
case LOG:
|
|
if (canGetDoubleDrops()) {
|
|
if (canGetDoubleDrops()) {
|
|
Woodcutting.checkForDoubleDrop(blockState);
|
|
Woodcutting.checkForDoubleDrop(blockState);
|
|
}
|
|
}
|
|
xp += Woodcutting.getExperienceFromLog(blockState, ExperienceGainMethod.TREE_FELLER);
|
|
xp += Woodcutting.getExperienceFromLog(blockState, ExperienceGainMethod.TREE_FELLER);
|
|
- Misc.dropItem(blockState.getLocation(), new ItemStack(Material.LOG, 1, tree.getSpecies().getData()));
|
|
|
|
|
|
+ Misc.dropItem(blockState.getLocation(), blockState.getData().toItemStack(1));
|
|
break;
|
|
break;
|
|
|
|
|
|
case LEAVES:
|
|
case LEAVES:
|
|
- Misc.randomDropItem(blockState.getLocation(), new ItemStack(Material.SAPLING, 1, tree.getSpecies().getData()), 10);
|
|
|
|
|
|
+ Misc.randomDropItem(blockState.getLocation(), blockState.getData().toItemStack(1), 10);
|
|
break;
|
|
break;
|
|
|
|
|
|
default:
|
|
default:
|
|
@@ -180,7 +178,6 @@ public class WoodcuttingManager extends SkillManager {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- blockState.setRawData((byte) 0x0);
|
|
|
|
blockState.setType(Material.AIR);
|
|
blockState.setType(Material.AIR);
|
|
blockState.update(true);
|
|
blockState.update(true);
|
|
}
|
|
}
|