Posted September 10, 20196 yr As title @SubscribeEvent public void lootLoad(LootTableLoadEvent evt) { if (evt.getName().toString().equals("minecraft:chests/simple_dungeon")) { evt.getTable().addPool(new LootPool(null, null, null, null, null))); } } for the arguments of LootPool, they should be net.minecraft.world.storage.loot.LootPool.LootPool(LootEntry[] lootEntriesIn, LootCondition[] poolConditionsIn, RandomValueRange rollsIn, RandomValueRange bonusRollsIn, String name) But I don't really understand what the arguments means and what they should be. Any reply will be appreciated Edited September 10, 20196 yr by poopoodice
September 10, 20196 yr I don't remember exactly. Use this: https://github.com/Draco18s/ReasonableRealism/blob/1.12.1/src/main/java/com/draco18s/hardlib/util/LootUtils.java It already handles 99% of use cases with intelligently named parameters and will offer sensible alternatives when you just need to do something simple (such as not needing an ILootCondition or ILootFunction). If you have more specific questions, just ask. There's some examples of usage in my code (mostly in Harder Farming's EventHandler class). Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
September 11, 20196 yr Author Sorry but I still dont quite get it. Should I import a json file with pool or simply returns items in the function? Here is the forge documentation =>https://mcforge.readthedocs.io/en/latest/items/loot_tables/#modifying-vanilla-loot It says @SubscribeEvent public void lootLoad(LootTableLoadEvent evt) { if (evt.getName().toString().equals("minecraft:chests/simple_dungeon")) { // do stuff with evt.getTable() } } What specific thing I need to do with it?
September 11, 20196 yr Author 14 hours ago, Draco18s said: I don't remember exactly. Use this: https://github.com/Draco18s/ReasonableRealism/blob/1.12.1/src/main/java/com/draco18s/hardlib/util/LootUtils.java It already handles 99% of use cases with intelligently named parameters and will offer sensible alternatives when you just need to do something simple (such as not needing an ILootCondition or ILootFunction). If you have more specific questions, just ask. There's some examples of usage in my code (mostly in Harder Farming's EventHandler class). Nvm, I sort it out! Thank you for your reply : )
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.