本文整理汇总了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());
}
示例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"));
}
示例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());
}
}
示例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);
}
}
示例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);
}
}
示例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"));
}
示例7: initModel
import net.minecraftforge.client.model.ModelLoader; //导入方法依赖的package包/类
@SideOnly(Side.CLIENT)
public void initModel() {
ModelLoader.setCustomModelResourceLocation(this, 0, new ModelResourceLocation(getRegistryName(), "inventory"));
}
示例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"));
}
示例9: registerClient
import net.minecraftforge.client.model.ModelLoader; //导入方法依赖的package包/类
@SideOnly(Side.CLIENT)
public void registerClient(){
ModelLoader.setCustomModelResourceLocation(this, 0, new ModelResourceLocation(this.getRegistryName(), "inventory"));
}
示例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"));
}
示例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());
}
示例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"));
}
示例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"));
}
示例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"));
}
示例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"));
}