本文整理汇总了Java中net.minecraftforge.client.event.ModelRegistryEvent类的典型用法代码示例。如果您正苦于以下问题:Java ModelRegistryEvent类的具体用法?Java ModelRegistryEvent怎么用?Java ModelRegistryEvent使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ModelRegistryEvent类属于net.minecraftforge.client.event包,在下文中一共展示了ModelRegistryEvent类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setupModels
import net.minecraftforge.client.event.ModelRegistryEvent; //导入依赖的package包/类
@SubscribeEvent
public static void setupModels(ModelRegistryEvent event) {
registerBlockModel(lodestone_ore);
registerBlockModel(celestial_stone);
registerBlockModel(rift);
registerBlockModel(pipe);
registerBlockModel(stability_projector);
registerBlockModel(test_tank);
registerBlockModel(creative_tank);
((ItemMaterial) material).registerModels();
registerItemModel(seeing_stone);
registerItemModel(tuning_fork);
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityRift.class, new TileEntityRiftRenderer());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityPipe.class, new TileEntityPipeRenderer());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityStabilityProjector.class, new TileEntityStabilityProjectorRenderer());
}
示例2: handleModels
import net.minecraftforge.client.event.ModelRegistryEvent; //导入依赖的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());
}
}
示例3: registerModels
import net.minecraftforge.client.event.ModelRegistryEvent; //导入依赖的package包/类
@SubscribeEvent
public static void registerModels(ModelRegistryEvent event) {
registerItem(ModItems.largemass);
registerItem(ModItems.defiercore);
registerItem(ModItems.pattern);
registerItem(ModItems.defierstar);
registerItem(ModItems.energystar);
registerItem(ModItems.energystar, 1);
registerItem(ModItems.energystar, 2);
registerItem(ModItems.energystar, 3);
registerItem(ModItems.strongstar);
registerItem(ModItems.speedstar);
registerItem(Item.getItemFromBlock(ModItems.compressor));
registerItem(Item.getItemFromBlock(ModItems.patternmolder));
ModelRegistryHelper.registerItemRenderer(Item.getItemFromBlock(ModItems.defier), new RenderDefierItem());
ModelRegistryHelper.registerItemRenderer(Item.getItemFromBlock(ModItems.energyprovider), new RenderEnergyProviderItem());
}
示例4: registerInventoryModels
import net.minecraftforge.client.event.ModelRegistryEvent; //导入依赖的package包/类
@SideOnly(Side.CLIENT)
@SubscribeEvent
public static void registerInventoryModels(final ModelRegistryEvent event)
{
for (Item item : items)
{
if (item instanceof IMultiItem)
{
final Class enumClass = (Class<?>)ReflectionUtils.getGenericInterfaceType(item.getClass(), IMultiItem.class);
for (ISubItem value : (ISubItem[])enumClass.getEnumConstants())
{
ModelLoader.setCustomModelResourceLocation(item, value.getMetadata(), new ModelResourceLocation(item.getRegistryName(), "inventory"));
}
}
else
{
ModelLoader.setCustomModelResourceLocation(item, 0, new ModelResourceLocation(item.getRegistryName(), "inventory"));
}
}
}
示例5: onModelRegistry
import net.minecraftforge.client.event.ModelRegistryEvent; //导入依赖的package包/类
@SubscribeEvent
public void onModelRegistry(ModelRegistryEvent e)
{
for (Item item : Ref.ITEMS)
if (item instanceof IHasModel)
{
((IHasModel) item).initModel(e);
}
for (Block block : Ref.BLOCKS)
if (block instanceof IHasModel)
{
((IHasModel) block).initModel(e);
System.out.println("initModel run");
}
}
示例6: registerItemBlockModels
import net.minecraftforge.client.event.ModelRegistryEvent; //导入依赖的package包/类
/**
* Register this mod's ItemBlock Models.
*
* @param event The event
*/
@SubscribeEvent
public static void registerItemBlockModels(ModelRegistryEvent event) {
if (!ModConfig.blocks)
return;
VIEWED_BLOCK.initModel();
SMOOTH_GLOWSTONE.initModel();
STAINED_LAMP.initModel();
LIT_STAINED_LAMP.initModel();
POLISHED_GLOWSTONE.initModel();
SNOW_BRICK.initModel();
BLOCK_BREAKER.initModel();
CRYING_OBSIDIAN.initModel();
SPIKE_BLOCK.initModel();
BLOCK_PLACER.initModel();
DECORATIVE_STONE.initModel();
BRICK_VARIANT.initModel();
SMOOTH_DOUBLE_STONE_SLAB.initModel();
SMOOTH_DOUBLE_SANDSTONE_SLAB.initModel();
SMOOTH_DOUBLE_RED_SANDSTONE_SLAB.initModel();
SLATE.initModel();
}
示例7: registerModels
import net.minecraftforge.client.event.ModelRegistryEvent; //导入依赖的package包/类
@SubscribeEvent
public static void registerModels(ModelRegistryEvent event) {
registerRender(Bonfires.estusFlask, 0, Bonfires.estusFlask.getRegistryName() + "_empty");
registerRender(Bonfires.estusFlask, 1, Bonfires.estusFlask.getRegistryName() + "_quarter");
registerRender(Bonfires.estusFlask, 2, Bonfires.estusFlask.getRegistryName() + "_half");
registerRender(Bonfires.estusFlask, 3, Bonfires.estusFlask.getRegistryName() + "");
registerRender(Bonfires.ashPile);
registerRender(Bonfires.coiledSword);
registerRender(Bonfires.coiledSwordFragment);
registerRender(Bonfires.estusShard);
registerRender(Bonfires.homewardBone);
registerRender(Bonfires.titaniteShard);
registerRender(Bonfires.largeTitaniteShard);
registerRender(Bonfires.titaniteChunk);
registerRender(Bonfires.titaniteSlab);
registerRender(Bonfires.undeadBoneShard);
registerRender(Item.getItemFromBlock(Bonfires.ashBonePile));
registerRender(Item.getItemFromBlock(Bonfires.ashBlock));
}
示例8: registerModels
import net.minecraftforge.client.event.ModelRegistryEvent; //导入依赖的package包/类
@SubscribeEvent
public static void registerModels(ModelRegistryEvent event)
{
OBJLoader.INSTANCE.addDomain(EnderRiftMod.MODID);
registerItemModel(EnderRiftMod.riftOrb);
registerBlockModelAsItem(EnderRiftMod.rift);
registerBlockModelAsItem(EnderRiftMod.structure);
registerBlockModelAsItem(EnderRiftMod.riftInterface);
registerBlockModelAsItem(EnderRiftMod.browser, 0, "crafting=false,facing=south");
registerBlockModelAsItem(EnderRiftMod.browser, 1, "crafting=true,facing=south");
registerBlockModelAsItem(EnderRiftMod.extension);
registerBlockModelAsItem(EnderRiftMod.generator);
registerBlockModelAsItem(EnderRiftMod.driver);
ClientRegistry.bindTileEntitySpecialRenderer(TileEnderRift.class, new RenderRift());
}
示例9: registerModels
import net.minecraftforge.client.event.ModelRegistryEvent; //导入依赖的package包/类
@SubscribeEvent
public static void registerModels(final ModelRegistryEvent event) {
ModelLoader.setCustomModelResourceLocation(SWItems.DOG_TAG, 0, Resources.DOG_TAG_MODEL);
ModelLoader.setCustomModelResourceLocation(SWItems.DOG_TREAT, 0, Resources.DOG_TREAT_MODEL);
ModelLoader.setCustomModelResourceLocation(SWItems.WHISTLE, 0, Resources.WHISTLE_MODEL);
ModelLoader.setCustomModelResourceLocation(SWItems.PET_CARRIER, 0, Resources.PET_CARRIER_MODEL);
for (EnumWolfSpecies wolfSpecies : EnumWolfSpecies.values()) {
ModelLoader.setCustomModelResourceLocation(SWItems.DOG_EGG, wolfSpecies.ordinal(), Resources.SPAWN_EGG_MODEL);
}
ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(SWBlocks.DOG_BOWL), 0, Resources.DOG_BOWL);
ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(SWBlocks.DOG_BOWL), 1, Resources.DOG_BOWL1);
ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(SWBlocks.DOG_BOWL), 2, Resources.DOG_BOWL2);
ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(SWBlocks.DOG_BOWL), 3, Resources.DOG_BOWL3);
ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(SWBlocks.DOG_BOWL), 4, Resources.DOG_BOWL4);
ModelBakery.registerItemVariants(SWBlocks.DOG_BOWL_IB, Resources.DOG_BOWL, Resources.DOG_BOWL1, Resources.DOG_BOWL2, Resources.DOG_BOWL3, Resources.DOG_BOWL4);
}
示例10: onModelRegister
import net.minecraftforge.client.event.ModelRegistryEvent; //导入依赖的package包/类
@SubscribeEvent
public void onModelRegister(ModelRegistryEvent e) {
regRenderer(EnderZoo.itemWitheringDust, ItemWitheringDust.NAME);
regRenderer(EnderZoo.itemConfusingDust, ItemConfusingDust.NAME);
regRenderer(EnderZoo.itemEnderFragment, ItemEnderFragment.NAME);
regRenderer(EnderZoo.itemOwlEgg, ItemOwlEgg.NAME);
regRenderer(EnderZoo.itemForCreativeMenuIcon, ItemForCreativeMenuIcon.NAME);
if (Config.guardiansBowEnabled)
regRenderer(EnderZoo.itemGuardiansBow, ItemGuardiansBow.NAME);
if (Config.confusingChargeEnabled)
regRenderer(Item.getItemFromBlock(EnderZoo.blockConfusingCharge), BlockConfusingCharge.NAME);
if (Config.concussionChargeEnabled)
regRenderer(Item.getItemFromBlock(EnderZoo.blockConcussionCharge), BlockConcussionCharge.NAME);
if (Config.enderChargeEnabled)
regRenderer(Item.getItemFromBlock(EnderZoo.blockEnderCharge), BlockEnderCharge.NAME);
}
示例11: registerModels
import net.minecraftforge.client.event.ModelRegistryEvent; //导入依赖的package包/类
@SubscribeEvent
public void registerModels(ModelRegistryEvent event){
for (Item i : items){
if (i instanceof IModeledObject){
((IModeledObject)i).initModel();
}
}
for (Block b : blocks){
if (b instanceof IModeledObject){
((IModeledObject)b).initModel();
}
}
}
示例12: onModelRegistry
import net.minecraftforge.client.event.ModelRegistryEvent; //导入依赖的package包/类
@SubscribeEvent
public void onModelRegistry(ModelRegistryEvent event)
{
ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(GeneralLaymansAestheticSpyingScreen.blockGlass), 0, new ModelResourceLocation("generallaymansaestheticspyingscreen:block_glass", "inventory"));
ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(GeneralLaymansAestheticSpyingScreen.blockGlass), 1, new ModelResourceLocation("generallaymansaestheticspyingscreen:block_glass_projector", "inventory"));
ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(GeneralLaymansAestheticSpyingScreen.blockGlass), 2, new ModelResourceLocation("generallaymansaestheticspyingscreen:block_glass", "inventory"));
ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(GeneralLaymansAestheticSpyingScreen.blockGlassTerminal), 0, new ModelResourceLocation("generallaymansaestheticspyingscreen:block_glass_terminal", "inventory"));
}
示例13: onModelRegistry
import net.minecraftforge.client.event.ModelRegistryEvent; //导入依赖的package包/类
@SubscribeEvent
public void onModelRegistry(ModelRegistryEvent event)
{
ModelLoader.setCustomModelResourceLocation(Torched.itemTorchGun, 0, new ModelResourceLocation("torched:torchgun", "inventory"));
ModelLoader.setCustomModelResourceLocation(Torched.itemTorchFirework, 0, new ModelResourceLocation("torched:torchfirework", "inventory"));
ModelLoader.setCustomModelResourceLocation(Torched.itemTorchFirework, 1, new ModelResourceLocation("torched:torchrpt", "inventory"));
ModelLoader.setCustomModelResourceLocation(Torched.itemTorchLauncher, 0, new ModelResourceLocation("torched:torchlauncher", "inventory"));
ModelBakery.registerItemVariants(Torched.itemTorchFirework, new ResourceLocation("torched", "torchfirework"), new ResourceLocation("torched", "torchrpt"));
}
示例14: registerModels
import net.minecraftforge.client.event.ModelRegistryEvent; //导入依赖的package包/类
@SideOnly(Side.CLIENT)
@SubscribeEvent
public static void registerModels(ModelRegistryEvent event) {
ItemBase.ITEMS.forEach(ItemBase::registerClient);
BlockBase.BLOCKS.forEach(BlockBase::registerClient);
steelTools.bakeModels();
steelArmor.bakeModels();
}
示例15: registerModels
import net.minecraftforge.client.event.ModelRegistryEvent; //导入依赖的package包/类
@SubscribeEvent
public static void registerModels(ModelRegistryEvent event)
{
ModBlocks.initModels();
ModEntities.initModels();
ModFluids.initModels();
ModItems.initModels();
}