Search in sources :

Example 6 with FluidPipeType

use of gregtech.common.pipelike.fluidpipe.FluidPipeType in project GregTech by GregTechCE.

the class FluidPipeRenderer method getParticleTexture.

public Pair<TextureAtlasSprite, Integer> getParticleTexture(IPipeTile<FluidPipeType, FluidPipeProperties> tileEntity) {
    if (tileEntity == null) {
        return Pair.of(TextureUtils.getMissingSprite(), 0xFFFFFF);
    }
    FluidPipeType fluidPipeType = tileEntity.getPipeType();
    Material material = ((TileEntityFluidPipe) tileEntity).getPipeMaterial();
    if (fluidPipeType == null || material == null) {
        return Pair.of(TextureUtils.getMissingSprite(), 0xFFFFFF);
    }
    TextureAtlasSprite atlasSprite = pipeTextures.get(fluidPipeType).sideTexture;
    int pipeColor = getPipeColor(material, tileEntity.getInsulationColor());
    return Pair.of(atlasSprite, pipeColor);
}
Also used : TextureAtlasSprite(net.minecraft.client.renderer.texture.TextureAtlasSprite) FluidPipeType(gregtech.common.pipelike.fluidpipe.FluidPipeType) Material(gregtech.api.unification.material.type.Material) TileEntityFluidPipe(gregtech.common.pipelike.fluidpipe.tile.TileEntityFluidPipe)

Aggregations

FluidPipeType (gregtech.common.pipelike.fluidpipe.FluidPipeType)6 Material (gregtech.api.unification.material.type.Material)4 CCRenderState (codechicken.lib.render.CCRenderState)3 BlockFluidPipe (gregtech.common.pipelike.fluidpipe.BlockFluidPipe)3 ItemBlockFluidPipe (gregtech.common.pipelike.fluidpipe.ItemBlockFluidPipe)3 TileEntityFluidPipe (gregtech.common.pipelike.fluidpipe.tile.TileEntityFluidPipe)2 TextureAtlasSprite (net.minecraft.client.renderer.texture.TextureAtlasSprite)2 ItemStack (net.minecraft.item.ItemStack)2 CCModel (codechicken.lib.render.CCModel)1 IVertexOperation (codechicken.lib.render.pipeline.IVertexOperation)1 Cuboid6 (codechicken.lib.vec.Cuboid6)1 Matrix4 (codechicken.lib.vec.Matrix4)1 Translation (codechicken.lib.vec.Translation)1 Vector3 (codechicken.lib.vec.Vector3)1 IconTransformation (codechicken.lib.vec.uv.IconTransformation)1 ICoverable (gregtech.api.cover.ICoverable)1 DustMaterial (gregtech.api.unification.material.type.DustMaterial)1 IngotMaterial (gregtech.api.unification.material.type.IngotMaterial)1 SolidMaterial (gregtech.api.unification.material.type.SolidMaterial)1 StoneType (gregtech.api.unification.ore.StoneType)1