diff --git a/src/main/java/thebetweenlands/common/block/terrain/BlockWisp.java b/src/main/java/thebetweenlands/common/block/terrain/BlockWisp.java index d2efb7ee0..154d3945d 100644 --- a/src/main/java/thebetweenlands/common/block/terrain/BlockWisp.java +++ b/src/main/java/thebetweenlands/common/block/terrain/BlockWisp.java @@ -34,6 +34,8 @@ import thebetweenlands.common.world.storage.location.LocationSpiritTree; import thebetweenlands.util.AdvancedStateMap.Builder; +import net.minecraft.util.NonNullList; + public class BlockWisp extends BlockContainer implements IStateMappedBlock { protected static final AxisAlignedBB WISP_AABB = new AxisAlignedBB(0.2F, 0.2F, 0.2F, 0.8F, 0.8F, 0.8F); @@ -73,11 +75,19 @@ public Item getItemDropped(IBlockState state, Random rand, int fortune) { return null; } + // @Override + // public void onPlayerDestroy(World world, BlockPos pos, IBlockState state) { + // if(!world.isRemote && state.getValue(VISIBLE)) { + // EntityItem wispItem = new EntityItem(world, pos.getX() + 0.5D, pos.getY() + 0.5D, pos.getZ() + 0.5D, new ItemStack(Item.getItemFromBlock(this), 1)); + // world.spawnEntity(wispItem); + // } + // } + @Override - public void onPlayerDestroy(World world, BlockPos pos, IBlockState state) { - if(!world.isRemote && state.getValue(VISIBLE)) { - EntityItem wispItem = new EntityItem(world, pos.getX() + 0.5D, pos.getY() + 0.5D, pos.getZ() + 0.5D, new ItemStack(Item.getItemFromBlock(this), 1)); - world.spawnEntity(wispItem); + public void getDrops(NonNullList drops, IBlockAccess world, BlockPos pos, IBlockState state, int fortune) { + super.getDrops(drops, world, pos, state, fortune); + if(state.getValue(VISIBLE) && harvesters.get() != null) { + drops.add(new ItemStack(Item.getItemFromBlock(this), 1)); } }