This commit is contained in:
Adrian 2015-09-05 10:13:29 +02:00
parent 1d9341e22e
commit 61cb92648c
4 changed files with 16 additions and 6 deletions

View file

@ -22,7 +22,7 @@ apply plugin: 'forge' // adds the forge dependency
apply plugin: 'maven' // for uploading to a maven repo
apply plugin: 'checkstyle'
version = "7.0.22"
version = "7.0.23"
group= "com.mod-buildcraft"
archivesBaseName = "buildcraft" // the name that all artifacts will use as a base. artifacts names follow this pattern: [baseName]-[appendix]-[version]-[classifier].[extension]

View file

@ -0,0 +1,3 @@
Bugs fixed:
* [#3001] NPE in RobotStationPluggableRenderer (asie)

View file

@ -1,3 +1,3 @@
1.6.4:BuildCraft:4.2.2
1.7.2:BuildCraft:6.0.16
1.7.10:BuildCraft:7.0.22
1.7.10:BuildCraft:7.0.23

View file

@ -38,7 +38,7 @@ public class RobotStationPluggable extends PipePluggable implements IPipePluggab
return;
}
RobotStationState state = ((RobotStationPluggable) pipePluggable).renderState;
RobotStationState state = ((RobotStationPluggable) pipePluggable).getRenderState();
switch(state) {
case None:
@ -188,6 +188,9 @@ public class RobotStationPluggable extends PipePluggable implements IPipePluggab
}
public RobotStationState getRenderState() {
if (renderState == null) {
renderState = RobotStationState.None;
}
return renderState;
}
@ -204,12 +207,16 @@ public class RobotStationPluggable extends PipePluggable implements IPipePluggab
@Override
public boolean requiresRenderUpdate(PipePluggable o) {
return renderState != ((RobotStationPluggable) o).renderState;
return getRenderState() != ((RobotStationPluggable) o).getRenderState();
}
@Override
public void readData(ByteBuf data) {
this.renderState = RobotStationState.values()[data.readUnsignedByte()];
try {
this.renderState = RobotStationState.values()[data.readUnsignedByte()];
} catch (ArrayIndexOutOfBoundsException e) {
this.renderState = RobotStationState.None;
}
}
@Override
@ -247,7 +254,7 @@ public class RobotStationPluggable extends PipePluggable implements IPipePluggab
info.add("RobotStationPluggable: No station found!");
} else {
refreshRenderState();
info.add("Docking Station (side " + side.name() + ", " + renderState.name() + ")");
info.add("Docking Station (side " + side.name() + ", " + getRenderState().name() + ")");
if (station.robotTaking() != null && station.robotTaking() instanceof IDebuggable) {
((IDebuggable) station.robotTaking()).getDebugInfo(info, ForgeDirection.UNKNOWN, debugger, player);
}