use of buildcraft.energy.client.sprite.AtlasSpriteFluid in project BuildCraft by BuildCraft.
the class BCEnergySprites method onTextureStitchPre.
@SubscribeEvent
public static void onTextureStitchPre(TextureStitchEvent.Pre event) {
TextureMap map = event.getMap();
ResourceLocation[][] fromSprites = new ResourceLocation[3][2];
for (int h = 0; h < 3; h++) {
fromSprites[h][0] = new ResourceLocation("buildcraftenergy:blocks/fluids/heat_" + h + "_still");
fromSprites[h][1] = new ResourceLocation("buildcraftenergy:blocks/fluids/heat_" + h + "_flow");
}
for (BCFluid f : BCEnergyFluids.allFluids) {
AtlasSpriteFluid spriteStill = new AtlasSpriteFluid(f.getStill().toString(), fromSprites[f.getHeatValue()][0], f);
AtlasSpriteFluid spriteFlow = new AtlasSpriteFluid(f.getFlowing().toString(), fromSprites[f.getHeatValue()][1], f);
map.setTextureEntry(spriteStill);
map.setTextureEntry(spriteFlow);
}
}
Aggregations