When breaking a block, inside a TileEntity's update method, any items dropped using InventoryHelper.dropInventoryItems are discarded (such as from BlockChest). From what I can tell, they are added to PhaseContext.getBlockItemDropSupplier inside ContainerUtil.performBlockInventoryDrops, but then never consumed.
It's possible there are other cases where this also occurs. I've tried to investigate but I'm afraid I haven't been able to figure much out.
Firstly, add this method to MixinTileEntityFurnace. You can also do it in a dedicated TE, but this was easier to test with.
@Inject(method = "update", at = @At("HEAD"))
private void onUpdate(CallbackInfo info) {
if (world.isRemote || world.playerEntities.isEmpty()) return;
BlockPos pos = getPos().offset(EnumFacing.NORTH);
IBlockState state = world.getBlockState(pos);
if (state.getMaterial() == Material.AIR) return;
EntityPlayer player = world.playerEntities.get(0);
TileEntity tile = world.getTileEntity(pos);
state.getBlock().onBlockHarvested(world, pos, state, player);
if (world.setBlockState(pos, Blocks.AIR.getDefaultState(), world.isRemote ? 11 : 3)) {
state.getBlock().onBlockDestroyedByPlayer(world, pos, state);
}
state.getBlock().harvestBlock(world, player, pos, state, tile, ItemStack.EMPTY);
}
@SquidDev test with latest SF which can be found here
http://files.minecraftforge.net/spongepowered
@bloodmc I've tested on the latest commit in a development environment with test plugins/mods disabled. I'm happy to set up with an official build as well, but I don't believe it'll make any difference.
OK expect a fix soon.
Fixed in the latest SpongeForge.
Thank you!
Most helpful comment
Thank you!