Search in sources :

Example 1 with BlockMachineActuator

use of mods.railcraft.common.blocks.machine.wayobjects.actuators.BlockMachineActuator in project Railcraft by Railcraft.

the class ActuatorModel method getDependencies.

@Override
public Collection<ResourceLocation> getDependencies() {
    BlockMachineActuator block = (BlockMachineActuator) RailcraftBlocks.ACTUATOR.block();
    if (block == null)
        return Collections.emptyList();
    if (models.isEmpty()) {
        StateMapperBase baseStateMapper = new StateMap.Builder().withName(block.getVariantProperty()).ignore(BlockMachineActuator.RED_FLAG).ignore(BlockMachineActuator.WHITE_FLAG).build();
        baseModelLocations.putAll(baseStateMapper.putStateModelLocations(block));
        StateMapperBase redFlagStateMapper = new StateMap.Builder().withSuffix("_flag_red").ignore(block.getVariantProperty()).ignore(BlockMachineActuator.THROWN).ignore(BlockMachineActuator.FACING).ignore(BlockMachineActuator.WHITE_FLAG).build();
        redFlagModelLocations.putAll(redFlagStateMapper.putStateModelLocations(block));
        StateMapperBase whiteFlagStateMapper = new StateMap.Builder().withSuffix("_flag_white").ignore(block.getVariantProperty()).ignore(BlockMachineActuator.THROWN).ignore(BlockMachineActuator.FACING).ignore(BlockMachineActuator.RED_FLAG).build();
        whiteFlagModelLocations.putAll(whiteFlagStateMapper.putStateModelLocations(block));
        models.addAll(baseModelLocations.values());
        models.addAll(redFlagModelLocations.values());
        models.addAll(whiteFlagModelLocations.values());
    }
    return models;
}
Also used : StateMapperBase(net.minecraft.client.renderer.block.statemap.StateMapperBase) BlockMachineActuator(mods.railcraft.common.blocks.machine.wayobjects.actuators.BlockMachineActuator)

Aggregations

BlockMachineActuator (mods.railcraft.common.blocks.machine.wayobjects.actuators.BlockMachineActuator)1 StateMapperBase (net.minecraft.client.renderer.block.statemap.StateMapperBase)1