use of pneumaticCraft.common.thirdparty.fmp.PartPressureTube in project PneumaticCraft by MineMaarten.
the class ModInteractionUtilImplementation method removeTube.
@Override
@Optional.Method(modid = ModIds.FMP)
public void removeTube(TileEntity te) {
if (te instanceof TileMultipart) {
PartPressureTube tube = FMP.getMultiPart((TileMultipart) te, PartPressureTube.class);
if (tube != null) {
List<ItemStack> drops = BlockPressureTube.getModuleDrops(tube.getTube());
for (ItemStack drop : drops) {
EntityItem entity = new EntityItem(te.getWorldObj(), te.xCoord + 0.5, te.yCoord + 0.5, te.zCoord + 0.5);
entity.setEntityItemStack(drop);
te.getWorldObj().spawnEntityInWorld(entity);
}
((TileMultipart) te).remPart(tube);
}
} else {
super.removeTube(te);
}
}
Aggregations