use of logisticspipes.pipes.basic.LogisticsTileGenericSubMultiBlock in project LogisticsPipes by RS485.
the class MultiBlockCoordinatesPacket method processPacket.
@Override
public void processPacket(EntityPlayer player) {
LogisticsTileGenericSubMultiBlock block = this.getTile(player.getEntityWorld(), LogisticsTileGenericSubMultiBlock.class);
block.setPosition(targetPos, subTypes);
}
use of logisticspipes.pipes.basic.LogisticsTileGenericSubMultiBlock in project LogisticsPipes by RS485.
the class HSTubeSCurve method getConnectedEndTile.
@Override
public TileEntity getConnectedEndTile(ForgeDirection output) {
boolean useOwn;
if (orientation.getOffset().getLength() != 0) {
if (orientation.dir.getOpposite() == output) {
useOwn = false;
} else if (orientation.dir == output) {
useOwn = true;
} else {
return null;
}
} else {
if (orientation.dir.getOpposite() == output) {
useOwn = true;
} else if (orientation.dir == output) {
useOwn = false;
} else {
return null;
}
}
if (useOwn) {
return container.getTile(output);
} else {
DoubleCoordinates pos = new DoubleCoordinates(1, 0, -3);
LPPositionSet<DoubleCoordinates> set = new LPPositionSet<>(DoubleCoordinates.class);
set.add(pos);
orientation.rotatePositions(set);
TileEntity subTile = pos.add(getLPPosition()).getTileEntity(getWorld());
if (subTile instanceof LogisticsTileGenericSubMultiBlock) {
return ((LogisticsTileGenericSubMultiBlock) subTile).getTile(output);
}
}
return null;
}
use of logisticspipes.pipes.basic.LogisticsTileGenericSubMultiBlock in project LogisticsPipes by RS485.
the class HSTubeGain method getConnectedEndTile.
@Override
public TileEntity getConnectedEndTile(ForgeDirection output) {
if (orientation.dir.getOpposite() == output) {
return container.getTile(output);
} else {
DoubleCoordinates pos = new DoubleCoordinates(0, 1, -3);
LPPositionSet<DoubleCoordinates> set = new LPPositionSet<>(DoubleCoordinates.class);
set.add(pos);
orientation.rotatePositions(set);
TileEntity subTile = pos.add(getLPPosition()).getTileEntity(getWorld());
if (subTile instanceof LogisticsTileGenericSubMultiBlock) {
return ((LogisticsTileGenericSubMultiBlock) subTile).getTile(output);
}
}
return null;
}
use of logisticspipes.pipes.basic.LogisticsTileGenericSubMultiBlock in project LogisticsPipes by RS485.
the class LogisticsPipeWorldRenderer method renderWorldBlock.
@Override
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) {
TileEntity tile = world.getTileEntity(x, y, z);
if (tile instanceof LogisticsTileGenericPipe) {
LogisticsTileGenericPipe pipeTile = (LogisticsTileGenericPipe) tile;
SimpleServiceLocator.thermalDynamicsProxy.renderPipeConnections(pipeTile, renderer);
if (config.isUseNewRenderer() && !pipeTile.renderState.forceRenderOldPipe) {
return newRenderer.renderWorldBlock(world, x, y, z, block, modelId, renderer);
}
return LogisticsPipeWorldRenderer.renderPipe(renderer, world, (LogisticsBlockGenericPipe) block, pipeTile, x, y, z);
} else if (tile instanceof LogisticsTileGenericSubMultiBlock) {
renderer.setRenderBounds(0, 0, 0, 0, 0, 0);
renderer.renderStandardBlock(Blocks.stone, x, y, z);
renderer.setRenderBoundsFromBlock(block);
return true;
} else {
return false;
}
}
use of logisticspipes.pipes.basic.LogisticsTileGenericSubMultiBlock in project LogisticsPipes by RS485.
the class PipeMultiBlockTransportLogistics method handleTileReachedClient.
@Override
protected void handleTileReachedClient(LPTravelingItemClient arrivingItem, TileEntity tile, ForgeDirection dir) {
if (tile instanceof LogisticsTileGenericPipe && ((LogisticsTileGenericPipe) tile).pipe instanceof CoreMultiBlockPipe) {
passToNextPipe(arrivingItem, tile);
return;
} else if (tile instanceof LogisticsTileGenericSubMultiBlock) {
List<LogisticsTileGenericPipe> masterTile = ((LogisticsTileGenericSubMultiBlock) tile).getMainPipe();
if (!masterTile.isEmpty()) {
if (masterTile.size() > 1) {
throw new UnsupportedOperationException();
}
passToNextPipe(arrivingItem, masterTile.get(0));
return;
}
}
Explosion explosion = new Explosion(this.getWorld(), null, this.getPipe().getX(), this.getPipe().getY(), this.getPipe().getZ(), 4.0F);
explosion.isFlaming = false;
explosion.isSmoking = true;
explosion.doExplosionB(true);
}
Aggregations