当前位置: 首页>>代码示例>>Java>>正文


Java ModelLoader.setCustomModelResourceLocation方法代码示例

本文整理汇总了Java中net.minecraftforge.client.model.ModelLoader.setCustomModelResourceLocation方法的典型用法代码示例。如果您正苦于以下问题:Java ModelLoader.setCustomModelResourceLocation方法的具体用法?Java ModelLoader.setCustomModelResourceLocation怎么用?Java ModelLoader.setCustomModelResourceLocation使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在net.minecraftforge.client.model.ModelLoader的用法示例。


在下文中一共展示了ModelLoader.setCustomModelResourceLocation方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: preInit

import net.minecraftforge.client.model.ModelLoader; //导入方法依赖的package包/类
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent event){
    config = new Configuration(event.getSuggestedConfigurationFile());
    config.load();
    COMPASSX_PROPERTY = config.get("hidden", ConfigValues.COMPASSX_NAME, ConfigValues.COMPASSX_DEFAULT, I18n.format(ConfigValues.COMPASSX_NAME+".tooltip"));
    COMPASSY_PROPERTY = config.get("hidden", ConfigValues.COMPASSY_NAME, ConfigValues.COMPASSY_DEFAULT, I18n.format(ConfigValues.COMPASSY_NAME+".tooltip"));
    TARGETX_PROPERTY = config.get(Configuration.CATEGORY_GENERAL, ConfigValues.TARGETX_NAME, ConfigValues.TARGETX_DEFAULT, I18n.format(ConfigValues.TARGETX_NAME+".tooltip"));
    TARGETZ_PROPERTY = config.get(Configuration.CATEGORY_GENERAL, ConfigValues.TARGETZ_NAME, ConfigValues.TARGETZ_DEFAULT, I18n.format(ConfigValues.TARGETZ_NAME+".tooltip"));
    XALIGNMENT_PROPERTY = config.get("hidden", ConfigValues.XALIGNMENT_NAME, ConfigValues.XALIGNMENT_DEFAULT.name(), I18n.format(ConfigValues.XALIGNMENT_NAME+".tooltip"));
    YALIGNMENT_PROPERTY = config.get("hidden", ConfigValues.YALIGNMENT_NAME, ConfigValues.YALIGNMENT_DEFAULT.name(), I18n.format(ConfigValues.YALIGNMENT_NAME+".tooltip"));
    syncConfig();

    GameRegistry.register(uhccompass);
    ModelLoader.setCustomModelResourceLocation(uhccompass, 0, new ModelResourceLocation(MODID+":uhccompass", "inventory"));

    MinecraftForge.EVENT_BUS.register(new ClientEvents());
    MinecraftForge.EVENT_BUS.register(new RenderEvents());
    MinecraftForge.EVENT_BUS.register(keyHandler = new KeyHandler());
}
 
开发者ID:The-Fireplace-Minecraft-Mods,项目名称:UHC-Compass,代码行数:20,代码来源:UHCCompass.java

示例2: initModel

import net.minecraftforge.client.model.ModelLoader; //导入方法依赖的package包/类
@Override
public void initModel() {
	ModelLoader.setCustomModelResourceLocation(this, 0, new ModelResourceLocation(getRegistryName(),"inventory"));
	ModelLoader.setCustomModelResourceLocation(this, 1, new ModelResourceLocation(getRegistryName(),"inventory"));
	ModelLoader.setCustomModelResourceLocation(this, 2, new ModelResourceLocation(getRegistryName(),"inventory"));
	ModelLoader.setCustomModelResourceLocation(this, 3, new ModelResourceLocation(getRegistryName(),"inventory"));
	ModelLoader.setCustomModelResourceLocation(this, 4, new ModelResourceLocation(getRegistryName(),"inventory"));
}
 
开发者ID:elucent,项目名称:SimplyTea,代码行数:9,代码来源:SimplyTea.java

示例3: handleModels

import net.minecraftforge.client.model.ModelLoader; //导入方法依赖的package包/类
@SubscribeEvent
@SideOnly(Side.CLIENT)
public void handleModels(ModelRegistryEvent event)
{
    for (Map.Entry<ItemStack, ModelResourceLocation> entry : LOCATIONS.entrySet())
    {
        ModelLoader.setCustomModelResourceLocation(entry.getKey().getItem(), entry.getKey().getItemDamage(), entry.getValue());
    }
}
 
开发者ID:oitsjustjose,项目名称:Geolosys,代码行数:10,代码来源:ClientRegistry.java

示例4: registerModel

import net.minecraftforge.client.model.ModelLoader; //导入方法依赖的package包/类
@Override
@SideOnly(Side.CLIENT)
public void registerModel() {
	for (int i = 0; i < names.length; i++) {
		ResourceLocation rl = new ResourceLocation(this.getRegistryName().getResourceDomain(), "fumes/" + this.getRegistryName().getResourcePath() + "_" + names[i]);
		ModelResourceLocation mrl = new ModelResourceLocation(rl, "inventory");
		ModelLoader.setCustomModelResourceLocation(this, i, mrl);
	}
}
 
开发者ID:Um-Mitternacht,项目名称:Bewitchment,代码行数:10,代码来源:ItemFumes.java

示例5: registerModel

import net.minecraftforge.client.model.ModelLoader; //导入方法依赖的package包/类
public static <T extends Enum<T> & IStringSerializable> void registerModel(Item item, Class<T> clazz) {
	for (T t : clazz.getEnumConstants()) {
		ResourceLocation location = new ResourceLocation(item.getRegistryName() + "_" + t.getName());
		ModelResourceLocation modelResourceLocation = new ModelResourceLocation(location, "inventory");
		ModelLoader.setCustomModelResourceLocation(item, t.ordinal(), modelResourceLocation);
	}
}
 
开发者ID:Um-Mitternacht,项目名称:Bewitchment,代码行数:8,代码来源:ModelHandler.java

示例6: registerItemModel

import net.minecraftforge.client.model.ModelLoader; //导入方法依赖的package包/类
@Override
public void registerItemModel(String modid, Item item, int meta, String id) {
	ModelLoader.setCustomModelResourceLocation(item, meta, new ModelResourceLocation(modid + ":" + id, "inventory"));
}
 
开发者ID:TechReborn,项目名称:TechReborn3,代码行数:5,代码来源:TechRebornClient.java

示例7: initModel

import net.minecraftforge.client.model.ModelLoader; //导入方法依赖的package包/类
@SideOnly(Side.CLIENT)
public void initModel() {
    ModelLoader.setCustomModelResourceLocation(this, 0, new ModelResourceLocation(getRegistryName(), "inventory"));
}
 
开发者ID:McJty,项目名称:MeeCreeps,代码行数:5,代码来源:PortalGunItem.java

示例8: register

import net.minecraftforge.client.model.ModelLoader; //导入方法依赖的package包/类
private static void register(Item item, int meta, String name) {
	ModelLoader.setCustomModelResourceLocation(item, meta,
		new ModelResourceLocation(TRConstants.MOD_ID + name, "inventory"));
}
 
开发者ID:TechReborn,项目名称:TechReborn3,代码行数:5,代码来源:TechRebornClient.java

示例9: registerClient

import net.minecraftforge.client.model.ModelLoader; //导入方法依赖的package包/类
@SideOnly(Side.CLIENT)
public void registerClient(){
    ModelLoader.setCustomModelResourceLocation(this, 0, new ModelResourceLocation(this.getRegistryName(), "inventory"));
}
 
开发者ID:canitzp,项目名称:Metalworks,代码行数:5,代码来源:ItemBase.java

示例10: registerModel

import net.minecraftforge.client.model.ModelLoader; //导入方法依赖的package包/类
@SideOnly(Side.CLIENT)
private void registerModel(Block block) {
    Item item = ItemBlock.getItemFromBlock(block);
    ModelLoader.setCustomModelResourceLocation(item, 0, new ModelResourceLocation(item.getRegistryName(), "inventory"));
}
 
开发者ID:TeamPneumatic,项目名称:pnc-repressurized,代码行数:6,代码来源:IC2.java

示例11: initModel

import net.minecraftforge.client.model.ModelLoader; //导入方法依赖的package包/类
@SideOnly(Side.CLIENT)
public void initModel() {
    ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(this), 0, new ModelResourceLocation(getRegistryName(), "inventory"));
    ClientRegistry.bindTileEntitySpecialRenderer(PortalTileEntity.class, new PortalTESR());
}
 
开发者ID:McJty,项目名称:MeeCreeps,代码行数:6,代码来源:PortalBlock.java

示例12: registerClient

import net.minecraftforge.client.model.ModelLoader; //导入方法依赖的package包/类
@Override
public void registerClient() {
    ModelLoader.setCustomModelResourceLocation(this, 0, new ModelResourceLocation(new ResourceLocation(Metalworks.MODID, "dust"), "inventory"));
}
 
开发者ID:canitzp,项目名称:Metalworks,代码行数:5,代码来源:ItemDust.java

示例13: registerItemRenderer

import net.minecraftforge.client.model.ModelLoader; //导入方法依赖的package包/类
@Override
public void registerItemRenderer(Item item, int meta, String id) {
	ModelLoader.setCustomModelResourceLocation(item, meta,
		new ModelResourceLocation(id, "inventory"));
}
 
开发者ID:arucil,项目名称:mc-Slingshot,代码行数:6,代码来源:ClientProxy.java

示例14: initModel

import net.minecraftforge.client.model.ModelLoader; //导入方法依赖的package包/类
@SideOnly(Side.CLIENT)
public void initModel()
{
	ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(this), 0, new ModelResourceLocation(getRegistryName(), "inventory"));
}
 
开发者ID:DarkMorford,项目名称:Simple-Chunks,代码行数:6,代码来源:BlockChunkLoader.java

示例15: registerItemResourceLoc

import net.minecraftforge.client.model.ModelLoader; //导入方法依赖的package包/类
public static void registerItemResourceLoc(Item item, ResourceLocation resLoc) {
	ModelLoader.setCustomModelResourceLocation(item, 0, new ModelResourceLocation(resLoc, "inventory"));
}
 
开发者ID:oMilkyy,项目名称:SimpleTubes,代码行数:4,代码来源:ModelRegistry.java


注:本文中的net.minecraftforge.client.model.ModelLoader.setCustomModelResourceLocation方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。