Search in sources :

Example 1 with Variable

use of exterminatorjeff.undergroundbiomes.api.common.Variable in project Realistic-Terrain-Generation by Team-RTG.

the class ItemEntry method doRegisterModel.

@Override
protected void doRegisterModel(IStateMapper stateMapper) {
    if (getItem() instanceof Variable) {
        Variable varItem = (Variable) getItem();
        for (int meta = 0; meta < varItem.getNbVariants(); ++meta) {
            ModelResourceLocation location = new ModelResourceLocation(externalName(varItem.getVariantName(meta)));
            ModelLoader.setCustomModelResourceLocation(getItem(), meta, location);
            LOGGER.debug("Model location: " + location);
        }
    } else {
        ModelResourceLocation location = new ModelResourceLocation(externalName(internalName));
        ModelLoader.setCustomModelResourceLocation(getItem(), 0, location);
        LOGGER.debug("Model location: " + location);
    }
}
Also used : Variable(exterminatorjeff.undergroundbiomes.api.common.Variable) ModelResourceLocation(net.minecraft.client.renderer.block.model.ModelResourceLocation)

Aggregations

Variable (exterminatorjeff.undergroundbiomes.api.common.Variable)1 ModelResourceLocation (net.minecraft.client.renderer.block.model.ModelResourceLocation)1