Search in sources :

Example 41 with ModelResourceLocation

use of net.minecraft.client.renderer.block.model.ModelResourceLocation in project ImmersiveEngineering by BluSunrize.

the class ImmersiveModelRegistry method registerCustomItemModel.

public void registerCustomItemModel(ItemStack stack, ItemModelReplacement replacement) {
    if (stack.getItem() instanceof ItemIEBase) {
        ResourceLocation loc;
        if (((ItemIEBase) stack.getItem()).getSubNames() != null && ((ItemIEBase) stack.getItem()).getSubNames().length > 0)
            loc = new ResourceLocation("immersiveengineering", ((ItemIEBase) stack.getItem()).itemName + "/" + ((ItemIEBase) stack.getItem()).getSubNames()[stack.getItemDamage()]);
        else
            loc = new ResourceLocation("immersiveengineering", ((ItemIEBase) stack.getItem()).itemName);
        itemModelReplacements.put(new ModelResourceLocation(loc, "inventory"), replacement);
    }
}
Also used : ModelResourceLocation(net.minecraft.client.renderer.block.model.ModelResourceLocation) ResourceLocation(net.minecraft.util.ResourceLocation) ModelResourceLocation(net.minecraft.client.renderer.block.model.ModelResourceLocation) ItemIEBase(blusunrize.immersiveengineering.common.items.ItemIEBase)

Example 42 with ModelResourceLocation

use of net.minecraft.client.renderer.block.model.ModelResourceLocation in project BetterWithAddons by DaedalusGame.

the class BlockWorldScale method getVariantModels.

@Override
public List<ModelResourceLocation> getVariantModels() {
    ArrayList<ModelResourceLocation> rlist = new ArrayList<ModelResourceLocation>();
    rlist.add(new ModelResourceLocation(this.getRegistryName(), "cracked=false"));
    return rlist;
}
Also used : ArrayList(java.util.ArrayList) ModelResourceLocation(net.minecraft.client.renderer.block.model.ModelResourceLocation)

Example 43 with ModelResourceLocation

use of net.minecraft.client.renderer.block.model.ModelResourceLocation in project BetterWithAddons by DaedalusGame.

the class BlockWorldScaleOre method getVariantModels.

@Override
public List<ModelResourceLocation> getVariantModels() {
    ArrayList<ModelResourceLocation> rlist = new ArrayList<ModelResourceLocation>();
    rlist.add(new ModelResourceLocation(this.getRegistryName(), "cracked=0"));
    rlist.add(new ModelResourceLocation(this.getRegistryName(), "cracked=5"));
    return rlist;
}
Also used : ArrayList(java.util.ArrayList) ModelResourceLocation(net.minecraft.client.renderer.block.model.ModelResourceLocation)

Example 44 with ModelResourceLocation

use of net.minecraft.client.renderer.block.model.ModelResourceLocation in project BetterWithAddons by DaedalusGame.

the class BlockBamboo method getVariantModels.

@Override
public List<ModelResourceLocation> getVariantModels() {
    ArrayList<ModelResourceLocation> rlist = new ArrayList<ModelResourceLocation>();
    rlist.add(new ModelResourceLocation(Reference.MOD_ID + ":bamboo", "inventory"));
    return rlist;
}
Also used : ArrayList(java.util.ArrayList) ModelResourceLocation(net.minecraft.client.renderer.block.model.ModelResourceLocation)

Example 45 with ModelResourceLocation

use of net.minecraft.client.renderer.block.model.ModelResourceLocation in project BetterWithAddons by DaedalusGame.

the class BlockCherryBox method getVariantModels.

@Override
public List<ModelResourceLocation> getVariantModels() {
    ArrayList<ModelResourceLocation> rlist = new ArrayList<ModelResourceLocation>();
    rlist.add(new ModelResourceLocation(getRegistryName(), "variant=" + CherryBoxType.SOAKING.getName()));
    rlist.add(new ModelResourceLocation(getRegistryName(), "variant=" + CherryBoxType.DRYING.getName()));
    return rlist;
}
Also used : ArrayList(java.util.ArrayList) ModelResourceLocation(net.minecraft.client.renderer.block.model.ModelResourceLocation)

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