diff --git a/common/buildcraft/transport/render/PipeRendererTESR.java b/common/buildcraft/transport/render/PipeRendererTESR.java index c6473002..3663d339 100644 --- a/common/buildcraft/transport/render/PipeRendererTESR.java +++ b/common/buildcraft/transport/render/PipeRendererTESR.java @@ -39,6 +39,7 @@ import buildcraft.BuildCraftCore; import buildcraft.BuildCraftCore.RenderMode; import buildcraft.BuildCraftTransport; import buildcraft.api.gates.IGateExpansion; +import buildcraft.api.transport.IPipeTile.PipeType; import buildcraft.api.transport.PipeWire; import buildcraft.core.CoreConstants; import buildcraft.core.DefaultProps; @@ -287,20 +288,18 @@ public class PipeRendererTESR extends TileEntitySpecialRenderer { renderGatesWires(pipe, x, y, z); - switch (pipe.getPipeType()) { - case ITEM: - renderSolids(pipe.pipe, x, y, z); - break; - case FLUID: - renderFluids(pipe.pipe, x, y, z); - break; - case POWER: - renderPower(pipe.pipe, x, y, z); - break; - case STRUCTURE: - // no object to render in a structure pipe; - break; - } + PipeType pipeType = pipe.getPipeType(); + + // do not use switch. we will be transitioning away from the enum + if (pipeType == PipeType.ITEM) { + renderSolids(pipe.pipe, x, y, z); + } else if (pipeType == PipeType.FLUID) { + renderFluids(pipe.pipe, x, y, z); + } else if (pipeType == PipeType.POWER) { + renderPower(pipe.pipe, x, y, z); + } /* else if (pipeType == PipeType.STRUCTURE) { + // no object to render in a structure pipe; + } */ } private void renderGatesWires(TileGenericPipe pipe, double x, double y, double z) {