if (meta > 5) {
return;
}
Position pos = new Position(xCoord, yCoord, zCoord,
Orientations.values()[meta]);
pos.moveForwards(1);
int blockId = w.getBlockId((int) pos.x, (int) pos.y, (int) pos.z);
TileEntity tile = w.getBlockTileEntity((int) pos.x, (int) pos.y,
(int) pos.z);
if (tile == null
|| !(tile instanceof IInventory || tile instanceof ILiquidContainer)
|| PipeLogicWood
.isExcludedFromExtraction(Block.blocksList[blockId])) {
return;
}
if (tile instanceof IInventory) {
IInventory inventory = (IInventory) tile;
ItemStack stack = checkExtract(inventory, true,
pos.orientation.reverse());
if (stack == null || stack.stackSize == 0) {
powerProvider.useEnergy(1, 1, false);
return;
}
Position entityPos = new Position(pos.x + 0.5, pos.y
+ Utils.getPipeFloorOf(stack), pos.z + 0.5,
pos.orientation.reverse());
entityPos.moveForwards(0.5);
EntityPassiveItem entity = new EntityPassiveItem(w, entityPos.x,
entityPos.y, entityPos.z, stack);
((PipeTransportItems) transport).entityEntering(entity,