Chest Transporter

Chest Transporter

42M Downloads

Yabba Support broken after I changed some things

LatvianModder opened this issue ยท 0 comments

commented

Here is the code I use myself for my Barrel Wrench, its basically just setting block to air

https://github.com/LatvianModder/YABBA/blob/master/src/main/java/com/latmod/yabba/item/ItemWrench.java

Currently chest transporter "dupes" barrel - drops one with proper contents and one blank. If you want it not to drop anything at all,

ItemStack stack = super.getItem(world, pos, state);
TileEntity tileEntity = world.getTileEntity(pos);

if (tileEntity instanceof TileBase)
{
	((TileBase) tileEntity).writeToItem(stack);
}

world.removeTileEntity(pos);
world.setBlockToAir(pos);
//do your thing with stack//