Merge pull request #1784 from undergroundminer3/6.0.x
Don't crash when I create new PipeTypes
This commit is contained in:
commit
159eba4619
1 changed files with 13 additions and 14 deletions
|
@ -39,6 +39,7 @@ import buildcraft.BuildCraftCore;
|
||||||
import buildcraft.BuildCraftCore.RenderMode;
|
import buildcraft.BuildCraftCore.RenderMode;
|
||||||
import buildcraft.BuildCraftTransport;
|
import buildcraft.BuildCraftTransport;
|
||||||
import buildcraft.api.gates.IGateExpansion;
|
import buildcraft.api.gates.IGateExpansion;
|
||||||
|
import buildcraft.api.transport.IPipeTile.PipeType;
|
||||||
import buildcraft.api.transport.PipeWire;
|
import buildcraft.api.transport.PipeWire;
|
||||||
import buildcraft.core.CoreConstants;
|
import buildcraft.core.CoreConstants;
|
||||||
import buildcraft.core.DefaultProps;
|
import buildcraft.core.DefaultProps;
|
||||||
|
@ -287,20 +288,18 @@ public class PipeRendererTESR extends TileEntitySpecialRenderer {
|
||||||
|
|
||||||
renderGatesWires(pipe, x, y, z);
|
renderGatesWires(pipe, x, y, z);
|
||||||
|
|
||||||
switch (pipe.getPipeType()) {
|
PipeType pipeType = pipe.getPipeType();
|
||||||
case ITEM:
|
|
||||||
renderSolids(pipe.pipe, x, y, z);
|
// do not use switch. we will be transitioning away from the enum
|
||||||
break;
|
if (pipeType == PipeType.ITEM) {
|
||||||
case FLUID:
|
renderSolids(pipe.pipe, x, y, z);
|
||||||
renderFluids(pipe.pipe, x, y, z);
|
} else if (pipeType == PipeType.FLUID) {
|
||||||
break;
|
renderFluids(pipe.pipe, x, y, z);
|
||||||
case POWER:
|
} else if (pipeType == PipeType.POWER) {
|
||||||
renderPower(pipe.pipe, x, y, z);
|
renderPower(pipe.pipe, x, y, z);
|
||||||
break;
|
} /* else if (pipeType == PipeType.STRUCTURE) {
|
||||||
case STRUCTURE:
|
// no object to render in a structure pipe;
|
||||||
// no object to render in a structure pipe;
|
} */
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void renderGatesWires(TileGenericPipe pipe, double x, double y, double z) {
|
private void renderGatesWires(TileGenericPipe pipe, double x, double y, double z) {
|
||||||
|
|
Loading…
Reference in a new issue