This commit is contained in:
asiekierka 2015-11-04 15:22:45 +01:00
parent ef6e12f9ac
commit e14a1b81ef
4 changed files with 19 additions and 6 deletions

View file

@ -27,7 +27,10 @@ public final class RobotUtils {
ArrayList<DockingStation> stations = new ArrayList<DockingStation>();
if (tile instanceof IDockingStationProvider) {
stations.add(((IDockingStationProvider) tile).getStation());
DockingStation station = ((IDockingStationProvider) tile).getStation();
if (station != null) {
stations.add(station);
}
}
if (tile instanceof IPipeTile) {
@ -35,7 +38,11 @@ public final class RobotUtils {
for (ForgeDirection d : ForgeDirection.VALID_DIRECTIONS) {
if (pipeTile.getPipePluggable(d) instanceof IDockingStationProvider) {
IDockingStationProvider pluggable = (IDockingStationProvider) pipeTile.getPipePluggable(d);
stations.add(pluggable.getStation());
DockingStation station = pluggable.getStation();
if (station != null) {
stations.add(station);
}
}
}
}

View file

@ -764,10 +764,12 @@ public class BlockGenericPipe extends BlockBuildCraft implements IColorRemovable
pipe.wireSignalStrength[color.ordinal()] = 0;
pipe.wireSet[color.ordinal()] = false;
pipe.propagateSignalState(color, 0);
if (!pipe.container.getWorldObj().isRemote) {
pipe.propagateSignalState(color, 0);
if (isFullyDefined(pipe)) {
pipe.resolveActions();
if (isFullyDefined(pipe)) {
pipe.resolveActions();
}
}
pipe.container.scheduleRenderUpdate();

View file

@ -85,6 +85,10 @@ public class PipeItemsStripes extends Pipe<PipeTransportItems> implements IEnerg
EntityPlayer player = CoreProxy.proxy.getBuildCraftPlayer((WorldServer) getWorld(),
(int) p.x, (int) p.y, (int) p.z).get();
if (battery.useEnergy(10, 10, false) != 10) {
return;
}
for (IStripesHandler handler : PipeManager.stripesHandlers) {
if (handler.getType() == StripesHandlerType.BLOCK_BREAK
&& handler.shouldHandle(stack)) {

View file

@ -101,7 +101,7 @@ public final class FacadeRenderHelper {
Block renderBlock = pluggable.getCurrentBlock();
if (renderBlock != null) {
if (renderBlock != null && tile != null) {
IBlockAccess facadeBlockAccess = new FacadeBlockAccess(tile.getWorld(), direction);
// If the facade is meant to render in the current pass