net.minecraftforge.registries.IForgeRegistry Java Examples
The following examples show how to use
net.minecraftforge.registries.IForgeRegistry.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: TransIconHerobrineButWithBetterPantsSubMod.java From CommunityMod with GNU Lesser General Public License v2.1 | 6 votes |
@Override public void registerEntities(IForgeRegistry<EntityEntry> reg) { reg.register(EntityEntryBuilder.create() .entity(TransIconHerobrineButWithBetterPantsEntity.class) .factory(TransIconHerobrineButWithBetterPantsEntity::new) .name(CommunityGlobals.MOD_ID + ".trans_icon_herobrine_but_with_better_pants") .id(new ResourceLocation(CommunityGlobals.MOD_ID, "trans_icon_herobrine_but_with_better_pants"), CommunityGlobals.entity_id++) .tracker(128, 3, true) .spawn(EnumCreatureType.CREATURE, 3, 0, 1, Biome.REGISTRY) .egg(0xAA7D66, 0x32394D) .build() ); reg.register(EntityEntryBuilder.create() .entity(NotchButWithWorsererPantsEntity.class) .factory(NotchButWithWorsererPantsEntity::new) .name(CommunityGlobals.MOD_ID + ".notch_but_with_worserer_pants") .id(new ResourceLocation(CommunityGlobals.MOD_ID, "notch_but_with_worserer_pants"), CommunityGlobals.entity_id++) .tracker(80, 3, true) .spawn(EnumCreatureType.CREATURE, 3, 2, 3, Biome.REGISTRY) .egg(0xAAAAAA, 0xAAAAAA) .build() ); }
Example #2
Source File: ModHandler.java From GregTech with GNU Lesser General Public License v3.0 | 6 votes |
public static int removeRecipes(Predicate<IRecipe> predicate) { int recipesRemoved = 0; IForgeRegistry<IRecipe> registry = ForgeRegistries.RECIPES; List<IRecipe> toRemove = new ArrayList<>(); for (IRecipe recipe : registry) { if (predicate.test(recipe)) { toRemove.add(recipe); recipesRemoved++; } } toRemove.forEach(recipe -> registry.register(new DummyRecipe().setRegistryName(recipe.getRegistryName()))); return recipesRemoved; }
Example #3
Source File: Squirrel.java From CommunityMod with GNU Lesser General Public License v2.1 | 6 votes |
@Override public void registerItems(IForgeRegistry<Item> reg) { reg.registerAll( setup(new Item(), "squirrel_ingot"), setup(new Item(), "squirrel_nugget"), setup(new ItemPickaxe(ToolMaterialHelper.SQUIRREL) {}, "squirrel_pickaxe"), setup(new ItemAxe(ToolMaterialHelper.SQUIRREL, ToolMaterialHelper.SQUIRREL.getAttackDamage(), 0b11111111111111111111111111111101) {}, "squirrel_axe"), setup(new ItemSword(ToolMaterialHelper.SQUIRREL), "squirrel_sword"), setup(new ItemHoe(ToolMaterialHelper.SQUIRREL), "squirrel_hoe"), setup(new ItemSpade(ToolMaterialHelper.SQUIRREL), "squirrel_shovel"), setup(new ItemArmor(ArmorMaterialHelper.SQUIRREL, 5, HEAD), "squirrel_helmet"), setup(new ItemArmor(ArmorMaterialHelper.SQUIRREL, 5, CHEST), "squirrel_chestplate"), setup(new ItemArmor(ArmorMaterialHelper.SQUIRREL, 5, LEGS), "squirrel_leggings"), setup(new ItemArmor(ArmorMaterialHelper.SQUIRREL, 5, FEET), "squirrel_boots"), setup(new Item() {@Override public HorseArmorType getHorseArmorType(final ItemStack stack) { return HorseArmorTypeHelper.SQUIRREL; }}, "squirrel_horse_armor"), setup(new ItemBlock(SQUIRREL_ORE), SQUIRREL_ORE.getRegistryName()), setup(new ItemBlock(SQUIRREL_BLOCK), SQUIRREL_BLOCK.getRegistryName()) ); }
Example #4
Source File: PokeMod.java From CommunityMod with GNU Lesser General Public License v2.1 | 6 votes |
@Override public void registerItems(IForgeRegistry<Item> reg) { reg.registerAll( setup(new Item(), "poke_ingot"), setup(new Item(), "poke_nugget"), setup(new ItemPickaxe(ToolMaterialHelper.POKE) {}, "poke_pickaxe"), setup(new ItemAxe(ToolMaterialHelper.POKE, ToolMaterialHelper.POKE.getAttackDamage(), 0b11111111111111111111111111111101) {}, "poke_axe"), setup(new ItemSword(ToolMaterialHelper.POKE), "poke_sword"), setup(new ItemHoe(ToolMaterialHelper.POKE), "poke_hoe"), setup(new ItemSpade(ToolMaterialHelper.POKE), "poke_shovel"), setup(new ItemArmor(ArmorMaterialHelper.POKE, 5, HEAD), "poke_helmet"), setup(new ItemArmor(ArmorMaterialHelper.POKE, 5, CHEST), "poke_chestplate"), setup(new ItemArmor(ArmorMaterialHelper.POKE, 5, LEGS), "poke_leggings"), setup(new ItemArmor(ArmorMaterialHelper.POKE, 5, FEET), "poke_boots"), setup(new Item() {@Override public HorseArmorType getHorseArmorType(final ItemStack stack) { return HorseArmorTypeHelper.POKE; }}, "poke_horse_armor"), setup(new ItemSnowball(), "pokeball"), setup(new ItemBlock(POKE_ORE), POKE_ORE.getRegistryName()), setup(new ItemBlock(POKE_BLOCK), POKE_BLOCK.getRegistryName()) ); }
Example #5
Source File: EnderUtilitiesBlocks.java From enderutilities with GNU Lesser General Public License v3.0 | 6 votes |
@SubscribeEvent public static void registerItemBlocks(RegistryEvent.Register<Item> event) { IForgeRegistry<Item> registry = event.getRegistry(); // Register ItemBlocks registerItemBlock(registry, ASU, Configs.disableBlockASU); registerItemBlock(registry, BARREL, Configs.disableBlockBarrel); registerItemBlock(registry, DRAWBRIDGE, Configs.disableBlockDrawbridge); registerItemBlock(registry, ELEVATOR, Configs.disableBlockEnderElevator); registerItemBlock(registry, ELEVATOR_SLAB, Configs.disableBlockEnderElevator); registerItemBlock(registry, ELEVATOR_LAYER, Configs.disableBlockEnderElevator); registerItemBlock(registry, INSERTER, Configs.disableBlockInserter); registerItemBlock(registry, FLOOR, Configs.disableBlockFloor); registerItemBlock(registry, ENERGY_BRIDGE, Configs.disableBlockEnergyBridge); registerItemBlock(registry, ENDER_FURNACE, Configs.disableBlockMachine_0); registerItemBlock(registry, MACHINE_1, Configs.disableBlockMachine_1); registerItemBlock(registry, MOLECULAR_EXCITER, Configs.disableBlockMolecularExciter, false); registerItemBlock(registry, MSU, Configs.disableBlockMSU); registerItemBlock(registry, PHASING, Configs.disableBlockPhasing); // No ItemBlock for PORTAL registerItemBlock(registry, PORTAL_FRAME, Configs.disableBlockPortalFrame, false); registerItemBlock(registry, PORTAL_PANEL, Configs.disableBlockPortalPanel, false); registerItemBlock(registry, SOUND_BLOCK, Configs.disableBlockSoundBlock); registerItemBlock(registry, STORAGE_0, Configs.disableBlockStorage_0); }
Example #6
Source File: ExtraRandomness.java From CommunityMod with GNU Lesser General Public License v2.1 | 5 votes |
@Override public void registerItems(IForgeRegistry<Item> event) { altarItems = new ArrayList<AltarItem>(); itemBlockAltar = RegUtil.registerItemBlock(event, new ItemBlock(blockAltar)); altarItems.add(RegUtil.<AltarItem>registerItem(event, new LexWand(), "lex_wand")); altarItems.add(RegUtil.<AltarItem>registerItem(event, new GoldenEgg(), "golden_egg")); altarItems.add(RegUtil.<AltarItem>registerItem(event, new Shocker(), "shocker")); }
Example #7
Source File: RegUtil.java From CommunityMod with GNU Lesser General Public License v2.1 | 5 votes |
public static <T extends ItemBlock> T registerItemBlock(IForgeRegistry<Item> reg, T item) { item.setRegistryName(Objects.requireNonNull(item.getBlock().getRegistryName())); item.setCreativeTab(CommunityGlobals.TAB); reg.register(item); return item; }
Example #8
Source File: Squirrel.java From CommunityMod with GNU Lesser General Public License v2.1 | 5 votes |
@Override public void registerBlocks(IForgeRegistry<Block> reg) { reg.registerAll( setup(new Block(Material.ROCK) {{ this.setSoundType(SoundType.STONE); }}.setHardness(0x1.8p1f).setResistance(0x1.4p2f), "squirrel_ore"), setup(new Block(Material.IRON) {{ this.setSoundType(SoundType.METAL); }}.setHardness(0x1.8p2f).setResistance(0x1.4p3f), "squirrel_block") ); }
Example #9
Source File: SakuraBiomes.java From Sakura_mod with MIT License | 5 votes |
public static void register(IForgeRegistry<Biome> registry) { registry.register(BAMBOOFOREST.setRegistryName("bamboo_forest")); BiomeManager.addBiome(BiomeManager.BiomeType.WARM,new BiomeManager.BiomeEntry(BAMBOOFOREST, 8)); BiomeDictionary.addTypes(BAMBOOFOREST, HOT, WET, DENSE, JUNGLE); registry.register(MAPLEFOREST.setRegistryName("maple_forest")); BiomeManager.addBiome(BiomeManager.BiomeType.WARM,new BiomeManager.BiomeEntry(MAPLEFOREST, 8)); BiomeDictionary.addTypes(MAPLEFOREST, FOREST); }
Example #10
Source File: TofuBiomes.java From TofuCraftReload with MIT License | 5 votes |
public static void register(IForgeRegistry<Biome> registry) { registry.register(ZUNDATOFU_PLAINS.setRegistryName("zunda_tofuplain")); registry.register(TOFU_PLAINS.setRegistryName("tofuplain")); registry.register(TOFU_BUILDINGS.setRegistryName("tofubuilding")); registry.register(TOFU_FOREST.setRegistryName("tofuforest")); registry.register(TOFU_FOREST_HILLS.setRegistryName("tofuforest_hills")); registry.register(TOFU_LEEK_PLAINS.setRegistryName("tofuleek_plain")); registry.register(TOFU_PLAIN_HILLS.setRegistryName("tofuplain_hills")); registry.register(TOFU_RIVER.setRegistryName("tofuriver")); registry.register(TOFU_MOUNTAIN.setRegistryName("tofumountain")); decorationBiomes = new BiomeTofu[]{ TOFU_PLAINS, TOFU_LEEK_PLAINS, TOFU_PLAINS, TOFU_FOREST, TOFU_BUILDINGS, TOFU_EXTREME_HILLS, ZUNDATOFU_PLAINS, TOFU_MOUNTAIN}; }
Example #11
Source File: EnderUtilitiesItems.java From enderutilities with GNU Lesser General Public License v3.0 | 5 votes |
@SubscribeEvent public static void registerItems(RegistryEvent.Register<Item> event) { IForgeRegistry<Item> registry = event.getRegistry(); registerItem(registry, ENDER_CAPACITOR, Configs.disableItemEnderCapacitor); registerItem(registry, ENDER_PART, Configs.disableItemCraftingPart); registerItem(registry, LINK_CRYSTAL, Configs.disableItemLinkCrystal); registerItem(registry, BUILDERS_WAND, Configs.disableItemBuildersWand); registerItem(registry, CHAIR_WAND, Configs.disableItemChairWand); registerItem(registry, DOLLY, Configs.disableItemDolly); registerItem(registry, ENDER_ARROW, Configs.disableItemEnderArrow); registerItem(registry, ENDER_BAG, Configs.disableItemEnderBag); registerItem(registry, ENDER_BOW, Configs.disableItemEnderBow); registerItem(registry, ENDER_BUCKET, Configs.disableItemEnderBucket); registerItem(registry, ENDER_LASSO, Configs.disableItemEnderLasso); registerItem(registry, ENDER_PEARL_REUSABLE, Configs.disableItemEnderPearl); registerItem(registry, ENDER_PORTER, Configs.disableItemEnderPorter); registerItem(registry, ENDER_SWORD, Configs.disableItemEnderSword); registerItem(registry, ENDER_TOOL, Configs.disableItemEnderTools); registerItem(registry, HANDY_BAG, Configs.disableItemHandyBag); registerItem(registry, ICE_MELTER, Configs.disableItemIceMelter); registerItem(registry, INVENTORY_SWAPPER, Configs.disableItemInventorySwapper); registerItem(registry, LIVING_MANIPULATOR, Configs.disableItemLivingManipulator); registerItem(registry, MOB_HARNESS, Configs.disableItemMobHarness); registerItem(registry, NULLIFIER, Configs.disableItemNullifier); registerItem(registry, PET_CONTRACT, Configs.disableItemPetContract); registerItem(registry, PICKUP_MANAGER, Configs.disableItemPickupManager); registerItem(registry, QUICK_STACKER, Configs.disableItemQuickStacker); registerItem(registry, PORTAL_SCALER, Configs.disableItemPortalScaler); registerItem(registry, RULER, Configs.disableItemRuler); registerItem(registry, SYRINGE, Configs.disableItemSyringe); registerItem(registry, VOID_PICKAXE, Configs.disableItemVoidPickaxe); }
Example #12
Source File: RegUtil.java From CommunityMod with GNU Lesser General Public License v2.1 | 5 votes |
public static SoundEvent registerSound(IForgeRegistry<SoundEvent> reg, ResourceLocation name) { SoundEvent event = new SoundEvent(name); event.setRegistryName(name); reg.register(event); return event; }
Example #13
Source File: PokeMod.java From CommunityMod with GNU Lesser General Public License v2.1 | 5 votes |
@Override public void registerBlocks(IForgeRegistry<Block> reg) { reg.registerAll( setup(new Block(Material.ROCK) {{ this.setSoundType(SoundType.STONE); }}.setHardness(0x1.8p1f).setResistance(0x1.4p2f), "poke_ore"), setup(new Block(Material.IRON) {{ this.setSoundType(SoundType.METAL); }}.setHardness(0x1.8p2f).setResistance(0x1.4p3f), "poke_block") ); }
Example #14
Source File: ModContent.java From EnderStorage with MIT License | 5 votes |
@SubscribeEvent public static void onRegisterBlocks(RegistryEvent.Register<Block> event) { IForgeRegistry<Block> registry = event.getRegistry(); Block.Properties properties = Block.Properties.create(Material.ROCK)// .hardnessAndResistance(20, 100); registry.register(new BlockEnderChest(properties).setRegistryName("ender_chest")); registry.register(new BlockEnderTank(properties).setRegistryName("ender_tank")); }
Example #15
Source File: ItemNugget.java From AgriCraft with MIT License | 5 votes |
@Override public void registerRecipes(IForgeRegistry<IRecipe> registry) { for (AgriNuggetType type : AgriNuggetType.values()) { // 1) Ore Dictionary registration. AgriCore.getLogger("agricraft").info("Registering in Ore Dictionary: {0}", type.nugget); ItemStack oneNugget = new ItemStack(this, 1, type.ordinal()); OreDictionary.registerOre(type.nugget, oneNugget); // 2) Conditional recipes. Only if the ingot exists, because AgriCraft doesn't add its own. ItemStack ingot = OreDictUtil.getFirstOre(type.ingot).orElse(ItemStack.EMPTY); if (!ingot.isEmpty()) { AgriCore.getLogger("agricraft").info("Adding a recipe to convert nine {0} into one {1}", type.nugget, type.ingot); final ResourceLocation group = new ResourceLocation(AgriCraft.instance.getModId(), "combine_nugget"); final ResourceLocation name = new ResourceLocation(AgriCraft.instance.getModId(), "combine_nugget_" + type.name().toLowerCase()); final ShapedOreRecipe recipe = new ShapedOreRecipe( group, ingot, "nnn", "nnn", "nnn", 'n', type.nugget ); recipe.setRegistryName(name); AgriCore.getLogger("agricraft").info("Registering nugget recipe: {0}!", recipe.getRegistryName()); registry.register(recipe); } } }
Example #16
Source File: RegUtil.java From CommunityMod with GNU Lesser General Public License v2.1 | 5 votes |
public static <T extends Item> T registerItem(IForgeRegistry<Item> reg, T item, String name) { item.setRegistryName(new ResourceLocation(CommunityGlobals.MOD_ID, name)); item.setTranslationKey(CommunityGlobals.MOD_ID + '.' + name); item.setCreativeTab(CommunityGlobals.TAB); reg.register(item); return item; }
Example #17
Source File: ModRecipes.java From Wizardry with GNU Lesser General Public License v3.0 | 5 votes |
@SubscribeEvent public static void register(RegistryEvent.Register<IRecipe> evt) { IForgeRegistry<IRecipe> r = evt.getRegistry(); r.register(new RecipeJam().setRegistryName(path("jam"))); r.register(new RecipeMountPearl().setRegistryName(path("mount_pearl"))); r.register(new RecipeManaSyringe().setRegistryName(path("mana_syringe"))); r.register(new RecipeSteroidSyringe().setRegistryName(path("steroid_syringe"))); r.register(new RecipeUnmountPearl().setRegistryName(path("unmount_pearl"))); // r.register(new RecipeCrudeHaloInfusion().setRegistryName(path("crude_halo_infusion"))); // r.register(new RecipeCrudeHaloDefusion().setRegistryName(path("crude_halo_defusion"))); }
Example #18
Source File: ModBiomes.java From Wizardry with GNU Lesser General Public License v3.0 | 5 votes |
@SubscribeEvent public static void register(RegistryEvent.Register<Biome> evt) { IForgeRegistry<Biome> r = evt.getRegistry(); r.registerAll(BIOME_UNDERWORLD); // BiomeDictionary.addTypes(BIOME_TORIKKI, BiomeDictionary.Type.MAGICAL, BiomeDictionary.Type.SPOOKY, BiomeDictionary.Type.MOUNTAIN, BiomeDictionary.Type.WASTELAND); BiomeDictionary.addTypes(BIOME_UNDERWORLD, BiomeDictionary.Type.VOID, BiomeDictionary.Type.SPOOKY, BiomeDictionary.Type.MAGICAL, BiomeDictionary.Type.DRY, BiomeDictionary.Type.COLD); // BiomeDictionary.addTypes(BIOME_TORIKKISEA, BiomeDictionary.Type.MAGICAL, BiomeDictionary.Type.SPOOKY, BiomeDictionary.Type.MOUNTAIN, BiomeDictionary.Type.WASTELAND,BiomeDictionary.Type.WATER); }
Example #19
Source File: SubmodGnomes.java From CommunityMod with GNU Lesser General Public License v2.1 | 5 votes |
private static SoundEvent registerSoundEvent(IForgeRegistry<SoundEvent> registry, String location) { ResourceLocation rl = new ResourceLocation(CommunityGlobals.MOD_ID, location); SoundEvent sound = new SoundEvent(rl); sound.setRegistryName(rl); registry.register(sound); return sound; }
Example #20
Source File: EnderUtilitiesBlocks.java From enderutilities with GNU Lesser General Public License v3.0 | 5 votes |
private static void registerBlock(IForgeRegistry<Block> registry, BlockEnderUtilities block, boolean isDisabled) { if (isDisabled == false) { block.setRegistryName(Reference.MOD_ID + ":" + block.getBlockName()); registry.register(block); } else { block.setEnabled(false); } }
Example #21
Source File: CommonProxy.java From enderutilities with GNU Lesser General Public License v3.0 | 5 votes |
@SubscribeEvent public void registerSounds(RegistryEvent.Register<SoundEvent> event) { IForgeRegistry<SoundEvent> registry = event.getRegistry(); this.registerSound(registry, "jailer"); this.registerSound(registry, "molecular_exciter"); }
Example #22
Source File: RegistryEventDispatcher.java From patchwork-api with GNU Lesser General Public License v2.1 | 5 votes |
@SuppressWarnings("unchecked") public static void dispatchRegistryEvents(Consumer<RegistryEvent.Register> handler) { List<Identifier> expectedOrder = getExpectedOrdering(); if (registered.size() < expectedOrder.size()) { throw new IllegalStateException("RegistryEventDispatcher is missing " + (expectedOrder.size() - registered.size()) + " registries!"); } for (IForgeRegistry registry : registered) { Identifier identifier = registry.getRegistryName(); Identifier expected = expectedOrder.remove(0); if (!identifier.equals(expected)) { throw new IllegalStateException("Bad ordering of registries in RegistryEventDispatcher: expected " + expected + " but got " + identifier); } if (CHECK_SUPERS) { Class superType = registry.getRegistrySuperType(); for (Map.Entry<Identifier, Object> entry : (Set<Map.Entry<Identifier, Object>>) registry.getEntries()) { if (!superType.isAssignableFrom(entry.getValue().getClass())) { throw new IllegalStateException("Bad registry type for " + identifier + " (" + entry.getKey() + ")"); } } } handler.accept(new RegistryEvent.Register(registry)); } }
Example #23
Source File: RegistryHandler.java From EnderZoo with Creative Commons Zero v1.0 Universal | 5 votes |
@SubscribeEvent public void onSoundEventRegister(Register<SoundEvent> e) { IForgeRegistry<SoundEvent> reg = e.getRegistry(); reg.register(EntityOwl.SND_HOOT); reg.register(EntityOwl.SND_HOOT2); reg.register(EntityOwl.SND_HURT); }
Example #24
Source File: NeatNetherBlocks.java From CommunityMod with GNU Lesser General Public License v2.1 | 5 votes |
public static Block registerBlock(Block block, String name, IForgeRegistry<Block> r) { block.setTranslationKey(CommunityGlobals.MOD_ID + "." + name); block.setRegistryName(new ResourceLocation(CommunityGlobals.MOD_ID, name)); block.setCreativeTab(CommunityGlobals.TAB); r.register(block); return block; }
Example #25
Source File: ForgeRegistryDumper.java From NotEnoughItems with MIT License | 5 votes |
@Override public Iterable<String[]> dump(int mode) { LinkedList<String[]> list = new LinkedList<>(); IForgeRegistry<V> registry = registry(); for (V obj : registry) { if (obj.getRegistryName() == null) { continue; } list.add(dump(obj, obj.getRegistryName())); } return list; }
Example #26
Source File: SubmodAnts.java From CommunityMod with GNU Lesser General Public License v2.1 | 5 votes |
private static Block registerBlock(IForgeRegistry<Block> registry, Block newBlock, String name) { name = appendPrefix(name); newBlock.setTranslationKey(name); newBlock.setRegistryName(name); registry.register(newBlock); return newBlock; }
Example #27
Source File: SubmodExplodingChickens.java From CommunityMod with GNU Lesser General Public License v2.1 | 5 votes |
@Override public void registerEntities(IForgeRegistry<EntityEntry> reg) { reg.register(EntityEntryBuilder.create() .name(CommunityGlobals.MOD_ID + "." + "exploding_chicken") .entity(EntityExplodingChicken.class) .id(new ResourceLocation(CommunityGlobals.MOD_ID, "exploding_chicken"), CommunityGlobals.entity_id++) .tracker(80, 3, true) .spawn(EnumCreatureType.CREATURE, 3, 1, 4, most_biomes) .egg(16711680, 10592673) .build()); }
Example #28
Source File: DabSquirrels.java From CommunityMod with GNU Lesser General Public License v2.1 | 5 votes |
@Override public void registerEntities(IForgeRegistry<EntityEntry> reg) { Set<Biome> biomeset = BiomeDictionary.getBiomes(BiomeDictionary.Type.FOREST); Biome[] biomes = biomeset.toArray(new Biome[0]); reg.register(EntityEntryBuilder.create() .entity(EntityDabSquirrel.class).egg(0x89806f, 0xb2a489) .name(CommunityGlobals.MOD_ID + ".dabsquirrel") .id(new ResourceLocation(CommunityGlobals.MOD_ID, "dabsquirrel"), CommunityGlobals.entity_id++) .tracker(128, 1, true) .spawn(EnumCreatureType.CREATURE, 12, 1, 3, biomes) .build()); }
Example #29
Source File: SubmodGnomes.java From CommunityMod with GNU Lesser General Public License v2.1 | 5 votes |
@Override public void registerEntities(IForgeRegistry<EntityEntry> reg) { reg.register(EntityEntryBuilder.create() .name(CommunityGlobals.MOD_ID + "." + "wood_gnome") .entity(EntityGnomeWood.class) .id(new ResourceLocation(CommunityGlobals.MOD_ID, "wood_gnome"), CommunityGlobals.entity_id++) .tracker(80, 3, false) .spawn(EnumCreatureType.CREATURE, 10, 1, 4, BiomeDictionary.getBiomes(BiomeDictionary.Type.FOREST)) .egg(0xd3753f, 0x774725) .build()); }
Example #30
Source File: SubmodGnomes.java From CommunityMod with GNU Lesser General Public License v2.1 | 5 votes |
@SubscribeEvent public static void registerSounds(RegistryEvent.Register<SoundEvent> event) { IForgeRegistry<SoundEvent> registry = event.getRegistry(); GNOME_SPEAK = registerSoundEvent(registry, "mob.gnome.say"); GNOME_DEATH = registerSoundEvent(registry, "mob.gnome.death"); }