use of net.minecraft.client.renderer.block.model.ModelResourceLocation in project RFToolsDimensions by McJty.
the class DimletEnergyModuleItem method initModel.
@Override
@SideOnly(Side.CLIENT)
public void initModel() {
ModelResourceLocation[] models = new ModelResourceLocation[3];
for (int i = 0; i < 3; i++) {
ResourceLocation registryName = getRegistryName();
registryName = new ResourceLocation(registryName.getResourceDomain(), registryName.getResourcePath() + i);
models[i] = new ModelResourceLocation(registryName, "inventory");
ModelBakery.registerItemVariants(this, models[i]);
}
ModelLoader.setCustomMeshDefinition(this, stack -> models[stack.getItemDamage()]);
}
use of net.minecraft.client.renderer.block.model.ModelResourceLocation in project Gaspunk by Ladysnake.
the class ModItems method registerRenders.
@SideOnly(Side.CLIENT)
@SubscribeEvent
public static void registerRenders(ModelRegistryEvent event) {
ModelLoader.setCustomModelResourceLocation(EMPTY_SYRINGE, 0, new ModelResourceLocation(new ResourceLocation("pathos:empty_syringe"), "inventory"));
ModelLoader.setCustomModelResourceLocation(FILLED_SYRINGE, 0, new ModelResourceLocation(new ResourceLocation("pathos:filled_syringe"), "inventory"));
}
use of net.minecraft.client.renderer.block.model.ModelResourceLocation in project MorePlanets by SteveKunG.
the class RenderTier4Rocket method updateModel.
private void updateModel() {
if (this.rocketModel == null) {
ModelResourceLocation modelResourceLocation = new ModelResourceLocation("moreplanets:tier_4_rocket", "inventory");
this.rocketModel = (ItemRendererTieredRocket) Minecraft.getMinecraft().getRenderItem().getItemModelMesher().getModelManager().getModel(modelResourceLocation);
}
}
use of net.minecraft.client.renderer.block.model.ModelResourceLocation in project SilentGems by SilentChaos512.
the class ItemTipUpgrade method getModels.
@Override
public void getModels(Map<Integer, ModelResourceLocation> models) {
int i = 0;
for (String str : NAMES) {
String name = (SilentGems.RESOURCE_PREFIX + str).toLowerCase();
models.put(i++, new ModelResourceLocation(name, "inventory"));
}
}
use of net.minecraft.client.renderer.block.model.ModelResourceLocation in project SilentGems by SilentChaos512.
the class ToolRenderHelper method getModels.
@Override
public void getModels(Map<Integer, ModelResourceLocation> models) {
buildModelSet();
modelSet.forEach(model -> models.put(models.size(), model));
String prefix = SilentGems.RESOURCE_PREFIX.toLowerCase();
// Extra models
int i = models.size();
modelGooglyEyes = new ModelResourceLocation(prefix + "googlyeyes", "inventory");
models.put(i++, modelGooglyEyes);
modelError = new ModelResourceLocation(prefix + "error", "inventory");
models.put(i++, modelError);
// Error and broken models.
for (String str : new String[] { "sword", "dagger", "katana", "machete", "scepter", "tomahawk", "pickaxe", "shovel", "axe", "paxel", "hoe", "sickle", "bow" }) {
models.put(i++, new ModelResourceLocation(prefix + str + "/_error", "inventory"));
models.put(i++, new ModelResourceLocation(prefix + str + "/" + str + "_broken", "inventory"));
}
}
Aggregations