use of pneumaticCraft.common.item.ItemLogisticsFrame in project PneumaticCraft by MineMaarten.
the class ContainerLogistics method getLogistics.
public static SemiBlockLogistics getLogistics(EntityPlayer player, ItemStack itemRequester) {
if (itemRequester != null && itemRequester.getItem() instanceof ItemLogisticsFrame) {
SemiBlockLogistics logistics = (SemiBlockLogistics) SemiBlockManager.getSemiBlockForKey(((ItemLogisticsFrame) itemRequester.getItem()).semiBlockId);
logistics.initialize(player.worldObj, new ChunkPosition(0, 0, 0));
logistics.onPlaced(player, itemRequester);
return logistics;
} else {
return null;
}
}
use of pneumaticCraft.common.item.ItemLogisticsFrame in project PneumaticCraft by MineMaarten.
the class SemiBlockLogistics method playerIsHoldingLogisticItems.
@SideOnly(Side.CLIENT)
private boolean playerIsHoldingLogisticItems() {
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
ItemStack stack = player.getCurrentEquippedItem();
return stack != null && (stack.getItem() == Itemss.logisticsConfigurator || stack.getItem() instanceof ItemLogisticsFrame);
}
Aggregations