Search in sources :

Example 6 with Offset

use of crazypants.enderio.base.conduit.geom.Offset in project EnderIO by SleepyTrousers.

the class EnderLiquidConduitRenderer method addConduitQuads.

@Override
protected void addConduitQuads(@Nonnull IConduitBundle bundle, @Nonnull IConduit conduit, @Nonnull TextureAtlasSprite tex, @Nonnull CollidableComponent component, float selfIllum, BlockRenderLayer layer, @Nonnull List<BakedQuad> quads) {
    super.addConduitQuads(bundle, conduit, tex, component, selfIllum, layer, quads);
    EnderLiquidConduit pc = (EnderLiquidConduit) conduit;
    for (EnumFacing dir : conduit.getExternalConnections()) {
        TextureAtlasSprite daTex = null;
        if (conduit.getConnectionMode(dir) == ConnectionMode.INPUT) {
            daTex = pc.getTextureForInputMode();
        } else if (conduit.getConnectionMode(dir) == ConnectionMode.OUTPUT) {
            daTex = pc.getTextureForOutputMode();
        } else if (conduit.getConnectionMode(dir) == ConnectionMode.IN_OUT) {
            daTex = pc.getTextureForInOutMode();
        }
        if (daTex != null) {
            Offset offset = bundle.getOffset(ILiquidConduit.class, dir);
            ConnectionModeGeometry.addModeConnectorQuads(dir, offset, daTex, null, quads);
        }
    }
}
Also used : TextureAtlasSprite(net.minecraft.client.renderer.texture.TextureAtlasSprite) EnumFacing(net.minecraft.util.EnumFacing) Offset(crazypants.enderio.base.conduit.geom.Offset)

Aggregations

Offset (crazypants.enderio.base.conduit.geom.Offset)6 TextureAtlasSprite (net.minecraft.client.renderer.texture.TextureAtlasSprite)3 EnumFacing (net.minecraft.util.EnumFacing)3 BoundingBox (com.enderio.core.client.render.BoundingBox)2 Vector4f (com.enderio.core.common.vecmath.Vector4f)2 UUID (java.util.UUID)2 DyeColor (com.enderio.core.common.util.DyeColor)1 Vector3d (com.enderio.core.common.vecmath.Vector3d)1 Vertex (com.enderio.core.common.vecmath.Vertex)1 ConnectionMode (crazypants.enderio.base.conduit.ConnectionMode)1 ArrayList (java.util.ArrayList)1 Nonnull (javax.annotation.Nonnull)1 FluidStack (net.minecraftforge.fluids.FluidStack)1