Search in sources :

Example 31 with ModelResourceLocation

use of net.minecraft.client.renderer.block.model.ModelResourceLocation in project Overloaded by CJ-MC-Mods.

the class BlockItemInterface method registerModel.

@SideOnly(Side.CLIENT)
@Override
public void registerModel() {
    ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(this), 0, new ModelResourceLocation(getRegistryName(), null));
    ClientRegistry.bindTileEntitySpecialRenderer(TileItemInterface.class, new ItemInterfaceRenderer());
}
Also used : ItemInterfaceRenderer(com.cjm721.overloaded.client.render.tile.ItemInterfaceRenderer) ModelResourceLocation(net.minecraft.client.renderer.block.model.ModelResourceLocation) SideOnly(net.minecraftforge.fml.relauncher.SideOnly)

Example 32 with ModelResourceLocation

use of net.minecraft.client.renderer.block.model.ModelResourceLocation in project Overloaded by CJ-MC-Mods.

the class BlockItemManipulator method registerModel.

@Override
@SideOnly(Side.CLIENT)
public void registerModel() {
    ModelResourceLocation location = new ModelResourceLocation(getRegistryName(), null);
    ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(this), 0, location);
}
Also used : ModelResourceLocation(net.minecraft.client.renderer.block.model.ModelResourceLocation) SideOnly(net.minecraftforge.fml.relauncher.SideOnly)

Example 33 with ModelResourceLocation

use of net.minecraft.client.renderer.block.model.ModelResourceLocation in project Overloaded by CJ-MC-Mods.

the class BlockCompressed method registerModel.

@SideOnly(Side.CLIENT)
@Override
public void registerModel() {
    CompressedBlockAssets.addToTextureQueue(new CompressedBlockAssets.CompressedResourceLocation(getBaseModelLocation(), getRegistryName(), getCompressionAmount()));
    ModelResourceLocation rl = new ModelResourceLocation(getRegistryName(), "inventory");
    ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(this), 0, rl);
}
Also used : CompressedBlockAssets(com.cjm721.overloaded.client.render.block.compressed.CompressedBlockAssets) ModelResourceLocation(net.minecraft.client.renderer.block.model.ModelResourceLocation) SideOnly(net.minecraftforge.fml.relauncher.SideOnly)

Example 34 with ModelResourceLocation

use of net.minecraft.client.renderer.block.model.ModelResourceLocation in project ConvenientAdditions by Necr0.

the class ModItems method initModelLoader.

@SideOnly(Side.CLIENT)
public static void initModelLoader() {
    CustomModelMeshAdventurersPickaxe.initVariants();
    ModelLoader.setCustomMeshDefinition(itemAdventurersPickaxe, new CustomModelMeshAdventurersPickaxe());
    ItemMobCatcher.initModels();
    //
    registerModelLocation(itemDirtChunk);
    registerModelLocation(itemObsidianPlate);
    registerModelLocation(itemCreeperKit);
    registerModelLocation(itemBlastKit);
    registerModelLocation(itemSlimeKit);
    registerModelLocation(itemDislocationCore);
    registerModelLocation(itemSpikes);
    //tools
    registerModelLocation(itemIronWrench);
    //misc
    registerModelLocation(itemFertilizer);
    registerModelLocation(itemSunstone, 0, new ModelResourceLocation(itemSunstone.getRegistryName().toString().toLowerCase() + "_inactive"));
    registerModelLocation(itemSunstone, 1, new ModelResourceLocation(itemSunstone.getRegistryName().toString().toLowerCase() + "_active"));
    registerIndependentModelLocation(itemCompost, new ModelResourceLocation(itemCompost.getRegistryName().toString().toLowerCase(), "inventory"));
    registerModelLocation(itemBlazingRock);
    registerModelLocation(itemEnderPlate, 0, new ModelResourceLocation(itemEnderPlate.getRegistryName().toString().toLowerCase() + "_inactive", "inventory"));
    registerModelLocation(itemEnderPlate, 1, new ModelResourceLocation(itemEnderPlate.getRegistryName().toString().toLowerCase() + "_active", "inventory"));
    registerVariants(itemLaunchingArrow, itemLaunchingArrow.getModelResourceLocations());
    registerModelLocation(itemTransmutationTome);
    registerVariants(itemSapBottle, itemSapBottle.getModelResourceLocations());
    registerModelLocation(itemAntidote);
    registerModelLocation(itemBandage);
    registerModelLocation(itemSoulGem);
    registerModelLocation(itemCheese);
    registerModelLocation(itemCheeseBucket);
    registerModelLocation(itemCheeseSandwich);
    registerModelLocation(itemBackpack);
    registerModelLocation(itemPortableEnderRift);
    registerModelLocation(itemPotionLumbering);
    registerModelLocation(itemPotionThorns);
    //modules
    registerModelLocation(itemModulePlayer);
    registerModelLocation(itemModuleColor);
    registerModelLocation(itemModuleLocation);
    registerModelLocation(itemModuleText);
    //trinkets
    registerModelLocation(itemSunlightRing);
    registerModelLocation(itemSaturationRing);
    registerModelLocation(itemBreathAmulet);
    registerModelLocation(itemFlippers);
    registerModelLocation(itemFlowingWaterRune);
    registerModelLocation(itemTideAmulet);
    registerModelLocation(itemCloudJar);
    registerModelLocation(itemSlimeBalloon);
    registerModelLocation(itemCloudBalloon);
    registerModelLocation(itemEnderCloudBalloon);
    registerModelLocation(itemWindGem);
    registerModelLocation(itemGlider);
    registerModelLocation(itemValkyrieWings);
    registerModelLocation(itemFireproofCloak);
    registerModelLocation(itemNetherTalisman);
    registerModelLocation(itemNetherCloak);
    registerModelLocation(itemRocketPack);
    registerModelLocation(itemClimbingClaws);
    registerModelLocation(itemSpikedSole);
    registerModelLocation(itemClimbingGear);
    registerModelLocation(itemMinersBracelet);
}
Also used : ModelResourceLocation(net.minecraft.client.renderer.block.model.ModelResourceLocation) CustomModelMeshAdventurersPickaxe(convenientadditions.item.tools.adventurersPickaxe.CustomModelMeshAdventurersPickaxe) SideOnly(net.minecraftforge.fml.relauncher.SideOnly)

Example 35 with ModelResourceLocation

use of net.minecraft.client.renderer.block.model.ModelResourceLocation in project ConvenientAdditions by Necr0.

the class ModBlocks method initModelLoader.

@SideOnly(Side.CLIENT)
public static void initModelLoader() {
    ModItems.registerItemBlockModel(composterBlock);
    ModItems.registerItemBlockModel(powderKegBlock);
    ModItems.registerItemBlockModel(playerInterfaceBlock);
    ModItems.registerItemBlockModel(proximitySensorBlock);
    ModItems.registerItemBlockModel(seedBoxBlock);
    ModItems.registerItemBlockModel(setProviderBlock);
    ModItems.registerItemBlockModel(itemTransmitterBlock);
    ModItems.registerItemBlockModel(itemReceiverBlock);
    ModItems.registerItemBlockModel(inventoryProxyBlock);
    ModItems.registerItemBlockModel(inventoryProxySidedBlock);
    ModItems.registerItemBlockModel(inventoryProxyFilteredBlock);
    ModItems.registerItemBlockModel(treetap);
    ModItems.registerItemBlockModel(phantomPlatformBlock);
    ModItems.registerItemBlockModel(hoverPad);
    ModItems.registerItemBlockModel(blastPad);
    ModItems.registerItemBlockModel(jumpPad);
    ModelLoader.setCustomMeshDefinition(ItemBlock.getItemFromBlock(platform), stack -> new ModelResourceLocation(platform.getRegistryName(), BlockPlatform.COLOR.getName() + "=" + EnumDyeColor.byMetadata(stack.getItemDamage()).getName()));
    ModelLoader.setCustomMeshDefinition(ItemBlock.getItemFromBlock(semiSolidBlock), stack -> new ModelResourceLocation(semiSolidBlock.getRegistryName(), BlockSemiSolid.COLOR.getName() + "=" + EnumDyeColor.byMetadata(stack.getItemDamage()).getName()));
    ModItems.registerItemBlockModel(storageMatrix);
    ModItems.registerIndependentModelLocation(ItemBlock.getItemFromBlock(compostSoilBlock), new ModelResourceLocation(compostSoilBlock.getRegistryName(), "inventory"));
    ModItems.registerIndependentModelLocation(ItemBlock.getItemFromBlock(compostSoilTilledBlock), new ModelResourceLocation(compostSoilBlock.getRegistryName(), "inventory"));
    ModItems.registerItemBlockModel(machineBlock);
    ModItems.registerItemBlockModel(displayCase);
    ModItems.registerItemBlockModel(remoteInventoryProxy);
    ModItems.registerItemBlockModel(enderProofBlock);
    ModItems.registerItemBlockModel(enderProofGlass);
    ModItems.registerItemBlockModel(ironFarm);
    ModItems.registerItemBlockModel(ironGolemBlock);
    ModItems.registerItemBlockModel(workStation);
    ModItems.registerItemBlockModel(autoWorkStation);
    ModItems.registerItemBlockModel(cheeseBlock);
    ModItems.registerItemBlockModel(punjiSticks);
    ModItems.registerItemBlockModel(storageCrate);
    ModItems.registerItemBlockModel(woodenTile);
}
Also used : ModelResourceLocation(net.minecraft.client.renderer.block.model.ModelResourceLocation) SideOnly(net.minecraftforge.fml.relauncher.SideOnly)

Aggregations

ModelResourceLocation (net.minecraft.client.renderer.block.model.ModelResourceLocation)106 SideOnly (net.minecraftforge.fml.relauncher.SideOnly)44 ResourceLocation (net.minecraft.util.ResourceLocation)31 ArrayList (java.util.ArrayList)20 Item (net.minecraft.item.Item)19 IBlockState (net.minecraft.block.state.IBlockState)10 SubscribeEvent (net.minecraftforge.fml.common.eventhandler.SubscribeEvent)8 Block (net.minecraft.block.Block)7 RenderItem (net.minecraft.client.renderer.RenderItem)7 StateMapperBase (net.minecraft.client.renderer.block.statemap.StateMapperBase)7 Map (java.util.Map)6 ItemMeshDefinition (net.minecraft.client.renderer.ItemMeshDefinition)6 IBakedModel (net.minecraft.client.renderer.block.model.IBakedModel)6 EnumFacing (net.minecraft.util.EnumFacing)6 StateMap (net.minecraft.client.renderer.block.statemap.StateMap)5 ItemStack (net.minecraft.item.ItemStack)4 HashMap (java.util.HashMap)3 BlockFenceGate (net.minecraft.block.BlockFenceGate)3 BlockSlab (net.minecraft.block.BlockSlab)3 BlockWall (net.minecraft.block.BlockWall)3