Merge pull request #1784 from undergroundminer3/6.0.x

Don't crash when I create new PipeTypes
This commit is contained in:
SpaceToad 2014-05-11 16:25:26 +02:00
commit 159eba4619

View file

@ -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) {