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

View file

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

View file

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

View file

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