Jump to content
Search In
  • More options...
Find results that contain...
Find results in...


  • Posts

  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

_vertig0's Achievements

Tree Puncher

Tree Puncher (2/8)



  1. One of the maintainers is a Mojang employee I believe
  2. Title, I just need to know where the code that prevents the player falling off when they sneak is located, I haven't been able to find it so far
  3. Oh, my bad. I didn't realise you already registered your Bow. You're registering it correctly, ignore what I said
  4. You actually don't need to register your arrow since it extends ArrowEntity, which causes Minecraft to treat it as a normal arrow but still execute your custom logic. You do however need to register your custom item. To do that you need to use Registry Events. Here's an example from my mod (This part goes inside your main class): @Mod.EventBusSubscriber(bus=Mod.EventBusSubscriber.Bus.MOD) public static class RegistryEvents { @SubscribeEvent public static void onItemRegistry(final RegistryEvent.Register<Item> event) { //This is how you register your Bow. However, in setRegistryName(), your mod should pass your own Mod ID for the first argument, not "minecraft". I'm only doing this in my mod because I'm overriding vanilla Bows. The second argument is whatever you name your custom Bow as. And to receive your Custom Bow you would do /give <your-name> modid:name-of-your-bow bow = new ItemForgeBow((new Item.Properties()).maxDamage(384).group(ItemGroup.COMBAT)); bow.setRegistryName("minecraft", "bow"); event.getRegistry().registerAll(bow); } } In any case, my mod does work and causes vanilla Bows to fire custom Arrows, so I'm confident that this is all you need for your special Bows to work
  5. Villagers cured from Zombie Villagers also become Pigs sadly ;-;
  6. Nope, didn't work either: [20:36:48] [Server thread/INFO] [mod.server.forge.ForgeServerCore/]: Spawn List Entry Removed: minecraft:pig*(1-1):5 [20:36:48] [Server thread/INFO] [mod.server.forge.ForgeServerCore/]: Spawn List Entry Removed: minecraft:pig*(1-1):5 [20:36:48] [Server thread/INFO] [mod.server.forge.ForgeServerCore/]: Spawn List Entry Removed: minecraft:pig*(1-1):5 [20:36:48] [Server thread/INFO] [mod.server.forge.ForgeServerCore/]: Spawn List Entry Removed: minecraft:pig*(1-1):5 (The console log is 100 lines long, I shortened it to 4 lines because every lines says the same thing) The above should be printing "Spawn List Entry Removed: minecraft:zombie_villager" if it had been successful Here's the updated code: // You can use EventBusSubscriber to automatically subscribe events on the contained class (this is subscribing to the MOD // Event bus for receiving Registry Events) @Mod.EventBusSubscriber(bus=Mod.EventBusSubscriber.Bus.MOD) public static class RegistryEvents { @SubscribeEvent public static void onBlocksRegistry(final RegistryEvent.Register<Block> blockRegistryEvent) { // register a new block here LOGGER.info("HELLO from Register Block"); blockRegistryEvent.getRegistry().registerAll(new BlockSweetBerryBush(Block.Properties.create(Material.PLANTS).tickRandomly().doesNotBlockMovement().sound(SoundType.SWEET_BERRY_BUSH)).setRegistryName(new ResourceLocation("minecraft", "sweet_berry_bush"))); } @SubscribeEvent public static void onItemRegistry(final RegistryEvent.Register<Item> event) { event.getRegistry().registerAll(new ItemCrossbow((new Item.Properties()).maxStackSize(1).group(ItemGroup.COMBAT).maxDamage(397)).setRegistryName(new ResourceLocation("minecraft", "crossbow")), new ItemBow((new Item.Properties()).maxDamage(384).group(ItemGroup.COMBAT)).setRegistryName(new ResourceLocation("minecraft", "bow"))); } @SubscribeEvent public static void onEntityRegistry(final RegistryEvent.Register<EntityType<?>> event) { ResourceLocation villagerRegistry = new ResourceLocation("minecraft", "villager"); ResourceLocation zombieVillagerRegistry = new ResourceLocation("minecraft", "zombie_villager"); event.getRegistry().registerAll(EntityType.Builder.<VillagerEntity>create(EntityVillager::new, EntityClassification.MISC).size(0.6F, 1.95F).build(villagerRegistry.toString()).setRegistryName(villagerRegistry), EntityType.Builder.create(EntityZombieVillager::new, EntityClassification.MONSTER).size(0.6F, 1.95F).immuneToFire().build(zombieVillagerRegistry.toString()).setRegistryName(zombieVillagerRegistry)); } @SubscribeEvent public static void onEnchantRegistry(final RegistryEvent.Register<Enchantment> event) { event.getRegistry().registerAll(new EnchantmentPiercing(Enchantment.Rarity.COMMON, EquipmentSlotType.MAINHAND).setRegistryName(new ResourceLocation("minecraft", "piercing")), new EnchantmentQuickCharge(Enchantment.Rarity.UNCOMMON, EquipmentSlotType.MAINHAND).setRegistryName(new ResourceLocation("minecraft", "quick_charge"))); } } I even went into the game and grabbed a Villager Spawn egg just to check, and, you guessed it, it was a Pig making Villager noises I'm aware that the default Entity in the base vanilla code registers is a Pig, and Minecraft defaults to that if something goes wrong with registering the entity. But if that's the case, ALL Villagers in Minecraft should be Pigs, yet naturally spawning Villagers in my server (In Villages) are totally unaffected and have my custom traits, but Villagers spawned with other means are always Pigs
  7. I'll give it a shot and let you know if it works for entities, thanks On a side note, is it ok to not put the variable and the ObjectHolder? I only stored the new overriding enchantments and stuff in a variable for debugging, my mod doesn't actually need it
  8. By that I mean I'm still facing the original problem that caused me to post the thread. The Villager and Zombie Villager that I replaced are still spawning as pigs I'm starting to think this is a Forge Bug, since my code is exactly the same as all the tutorials I've followed so far
  9. I just checked out Choonster's mod in hopes of finding Entity registration code but unfortunately it uses the older system and can be used for 1.15.2 😧 EDIT: Nevermind I'm blind I was looking at the 1.8 branch when there was a 1.14.4 branch *Facepalm EDIT 2: Choonster's code didn't work for me
  10. Oh, all the hack methods (Such as setFinalStatic and all that) were before I heard that the Forge registry allowed you to just plop your own replacements in. If that's what you meant you could safely ignore all the reflection in that class because I don't actually use those anymore If not I'm not too sure how because I registered the replacement items and enchantments following the tutorials online, through registry events. The Custom Items + the Enchantments also work as intended as well (Or at least haven't broken down yet, unlike the entities)
  11. Bump Should I reduce the code on Github to only include the part that is related to the issue, to save you the headache of searching through the monstrosity that is my mod's source code?
  12. Bump in the meantime to keep thread alive
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.