fix some tiles dropping stuff that can't be dropped
This commit is contained in:
@@ -83,7 +83,7 @@ public abstract class BlockBase extends Block
|
|||||||
{
|
{
|
||||||
TileEntity tile = world.getTileEntity(x, y, z);
|
TileEntity tile = world.getTileEntity(x, y, z);
|
||||||
|
|
||||||
if (tile instanceof IInventory)
|
if (tile instanceof IInventory && tile instanceof TileBase && ((TileBase) tile).canDropInventory())
|
||||||
{
|
{
|
||||||
InventoryUtils.dropInventory(world, (IInventory) tile, x, y, z);
|
InventoryUtils.dropInventory(world, (IInventory) tile, x, y, z);
|
||||||
}
|
}
|
||||||
|
@@ -77,4 +77,9 @@ public abstract class TileBase extends TileEntity
|
|||||||
{
|
{
|
||||||
direction = ForgeDirection.getOrientation(packet.func_148857_g().getInteger("Direction"));
|
direction = ForgeDirection.getOrientation(packet.func_148857_g().getInteger("Direction"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean canDropInventory()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -290,4 +290,10 @@ public class TileDetector extends TileMachine implements IInventory, ISidedInven
|
|||||||
buf.writeInt(amount);
|
buf.writeInt(amount);
|
||||||
buf.writeBoolean(providesPower);
|
buf.writeBoolean(providesPower);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canDropInventory()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -232,4 +232,10 @@ public class TileExporter extends TileMachine implements IInventory, ISidedInven
|
|||||||
|
|
||||||
buf.writeInt(compare);
|
buf.writeInt(compare);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canDropInventory()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -280,4 +280,10 @@ public class TileImporter extends TileMachine implements IInventory, ISidedInven
|
|||||||
buf.writeInt(compare);
|
buf.writeInt(compare);
|
||||||
buf.writeInt(mode);
|
buf.writeInt(mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canDropInventory()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user