Posted November 3, 20186 yr I'm trying to make wither bosses drop this item (ModItems.ELUCIDATOR) and its not working. What am I doing wrong? @SubscribeEvent public void loadLootTables(LootTableLoadEvent event) { if (event.getName().toString().equals("minecraft:entities/wither")) { LootFunction[] funcs = {}; LootCondition[] conds = {}; LootEntry[] loots = { new LootEntryItem(ModItems.ELUCIDATOR, 99999, 7, funcs, conds, "elucidator") //just using 99999 as a test weight to make sure its actually working and I'm not really unlucky }; LootPool pool = new LootPool(loots, conds, new RandomValueRange(1, 1), new RandomValueRange(0), "saomodpool"); event.getTable().addPool(pool); } }
November 3, 20186 yr 24 minutes ago, TheGoldenProof said: //just using 99999 as a test weight to make sure its actually working and I'm not really unlucky If your entry is the only one then the weight does not matter. If you want to add new drops to the pool use json, there is no need to do it from code. Read the official docs on the matter.
November 3, 20186 yr Author 2 minutes ago, V0idWa1k3r said: If you want to add new drops to the pool use json I have 0 understanding of json so I'm trying to avoid it as much as possible. Is there any way I could do it without?
November 3, 20186 yr 4 minutes ago, TheGoldenProof said: I have 0 understanding of json so I'm trying to avoid it as much as possible. You need to rethink your approach. If you don't understand something you need to learn it, not avoid it like a plague. Minecraft is getting more and more data driven and utilizes json for more and more of it's things. If you wish to continue modding you need to learn to use json. It's not very difficult. You've learned to use java after all, that's way more difficult than some json.
November 5, 20186 yr JSON stands for JavaScript Object Notation, it’s just a serialised representation of an object. As voidwalker said, learnig java is a lot harder and you’ve already done it. Edited November 5, 20186 yr by Cadiboo About Me Spoiler My Discord - Cadiboo#8887 My Website - Cadiboo.github.io My Mods - Cadiboo.github.io/projects My Tutorials - Cadiboo.github.io/tutorials Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support. When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible. Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)
November 5, 20186 yr try this: @SubscribeEvent public void mobDrop(LootTableLoadEvent event) { if (event.getName().equals(LootTableList.ENTITIES_WITHER)) { final LootPool main = event.getTable().getPool("main"); if (main != null) { main.addEntry(entry); } } } Edited November 5, 20186 yr by nov4e
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.