use of net.minecraft.client.renderer.block.model.ModelResourceLocation in project Railcraft by Railcraft.
the class IRailcraftItemBlock method getModelLocation.
@SideOnly(Side.CLIENT)
default default ModelResourceLocation getModelLocation(IBlockState state) {
StateMapperBase stateMapper = null;
if (state.getBlock() instanceof IRailcraftBlock)
stateMapper = ((IRailcraftBlock) state.getBlock()).getStateMapper();
if (stateMapper == null)
return new ModelResourceLocation(state.getBlock().getRegistryName(), new DefaultStateMapper().getPropertyString(state.getProperties()));
Map<IBlockState, ModelResourceLocation> stateMap = stateMapper.putStateModelLocations(state.getBlock());
return stateMap.get(state);
}
use of net.minecraft.client.renderer.block.model.ModelResourceLocation in project Railcraft by Railcraft.
the class ModelManager method registerItemModel.
public static void registerItemModel(Item item, int meta) {
ModelResourceLocation location = new ModelResourceLocation(item.getRegistryName(), "inventory");
registerItemModel(item, meta, location);
}
use of net.minecraft.client.renderer.block.model.ModelResourceLocation in project Railcraft by Railcraft.
the class ModelManager method registerItemModel.
public static void registerItemModel(Item item, int meta, String domain, String json) {
ModelResourceLocation location = new ModelResourceLocation(new ResourceLocation(domain, json), "inventory");
registerItemModel(item, meta, location);
}
use of net.minecraft.client.renderer.block.model.ModelResourceLocation in project Overloaded by CJ-MC-Mods.
the class BlockEnergyExtractor method registerModel.
@Override
@SideOnly(Side.CLIENT)
public void registerModel() {
ModelResourceLocation location = new ModelResourceLocation(getRegistryName(), null);
ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(this), 0, location);
FacingStateMapper stateMapper = new FacingStateMapper(getRegistryName());
ModelLoader.setCustomStateMapper(this, stateMapper);
}
use of net.minecraft.client.renderer.block.model.ModelResourceLocation in project Overloaded by CJ-MC-Mods.
the class ItemMultiBoots method registerModel.
@SideOnly(Side.CLIENT)
@Override
public void registerModel() {
ModelResourceLocation location = new ModelResourceLocation(getRegistryName(), null);
ModelLoader.setCustomModelResourceLocation(this, 0, location);
}
Aggregations