Search in sources :

Example 1 with SpriteColourMapper

use of buildcraft.core.lib.client.sprite.SpriteColourMapper in project BuildCraft by BuildCraft.

the class ComplexRefiningManager method textureStitchPre.

@SideOnly(Side.CLIENT)
public static void textureStitchPre(TextureStitchEvent.Pre event) {
    for (FluidDefinition def : allFluids) {
        int heat = def.fluid.getHeatValue();
        String from = "buildcraftenergy:blocks/fluids/heat_" + heat;
        SpriteColourMapper mapper = new SpriteColourMapper(def.fluid, from + "_still", true);
        event.getMap().setTextureEntry(mapper);
        mapper = new SpriteColourMapper(def.fluid, from + "_flow", false);
        event.getMap().setTextureEntry(mapper);
    }
}
Also used : FluidDefinition(buildcraft.core.lib.fluids.FluidDefinition) SpriteColourMapper(buildcraft.core.lib.client.sprite.SpriteColourMapper) SideOnly(net.minecraftforge.fml.relauncher.SideOnly)

Example 2 with SpriteColourMapper

use of buildcraft.core.lib.client.sprite.SpriteColourMapper in project BuildCraft by BuildCraft.

the class BuildCraftEnergy method textureStitchPre.

@SubscribeEvent
@SideOnly(Side.CLIENT)
public void textureStitchPre(TextureStitchEvent.Pre event) {
    FluidDefinition[] arr = { oil, fuel, redPlasma };
    if (Loader.isModLoaded("BuildCraft|Factory")) {
        arr[0] = null;
        arr[1] = null;
    }
    if (!BuildCraftCore.DEVELOPER_MODE) {
        arr[2] = null;
    }
    for (FluidDefinition def : arr) {
        if (def == null)
            continue;
        int heat = def.fluid.getHeatValue();
        String from = "buildcraftenergy:blocks/fluids/heat_" + heat;
        SpriteColourMapper mapper = new SpriteColourMapper(def.fluid, from + "_still", true);
        event.map.setTextureEntry(def.fluid.getStill().toString(), mapper);
        mapper = new SpriteColourMapper(def.fluid, from + "_flow", false);
        event.map.setTextureEntry(def.fluid.getFlowing().toString(), mapper);
    }
}
Also used : FluidDefinition(buildcraft.core.lib.fluids.FluidDefinition) SpriteColourMapper(buildcraft.core.lib.client.sprite.SpriteColourMapper) SubscribeEvent(net.minecraftforge.fml.common.eventhandler.SubscribeEvent) SideOnly(net.minecraftforge.fml.relauncher.SideOnly)

Aggregations

SpriteColourMapper (buildcraft.core.lib.client.sprite.SpriteColourMapper)2 FluidDefinition (buildcraft.core.lib.fluids.FluidDefinition)2 SideOnly (net.minecraftforge.fml.relauncher.SideOnly)2 SubscribeEvent (net.minecraftforge.fml.common.eventhandler.SubscribeEvent)1