commit
a66378a79d
|
@ -106,9 +106,9 @@ public abstract class AEBasePart implements IPart, IGridProxyable, IActionHost,
|
|||
@Override
|
||||
public void securityBreak()
|
||||
{
|
||||
if( this.getItemStack().stackSize > 0 )
|
||||
if( this.getItemStack().stackSize > 0 && this.getGridNode() != null )
|
||||
{
|
||||
final List<ItemStack> items = new ArrayList<ItemStack>();
|
||||
final List<ItemStack> items = new ArrayList<>();
|
||||
items.add( this.getItemStack().copy() );
|
||||
this.host.removePart( this.getSide(), false );
|
||||
Platform.spawnDrops( this.tile.getWorldObj(), this.tile.xCoord, this.tile.yCoord, this.tile.zCoord, items );
|
||||
|
|
|
@ -31,7 +31,6 @@ import appeng.client.texture.CableBusTextures;
|
|||
import appeng.helpers.Reflected;
|
||||
import appeng.me.helpers.AENetworkProxy;
|
||||
import appeng.parts.PartBasicState;
|
||||
import appeng.util.Platform;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
|
@ -43,9 +42,7 @@ import net.minecraft.util.IIcon;
|
|||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.EnumSet;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
public class PartToggleBus extends PartBasicState
|
||||
|
@ -96,19 +93,6 @@ public class PartToggleBus extends PartBasicState
|
|||
return AECableType.GLASS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void securityBreak()
|
||||
{
|
||||
if( this.getItemStack().stackSize > 0 )
|
||||
{
|
||||
final List<ItemStack> items = new ArrayList<ItemStack>();
|
||||
items.add( this.getItemStack().copy() );
|
||||
this.getHost().removePart( this.getSide(), false );
|
||||
Platform.spawnDrops( this.getTile().getWorldObj(), this.getTile().xCoord, this.getTile().yCoord, this.getTile().zCoord, items );
|
||||
this.getItemStack().stackSize = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getBoxes( final IPartCollisionHelper bch )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue