Posted April 29, 20187 yr I'm trying to make a system that allows you to define loot tables for blocks. To do this, I'm using the method shown in the forge docs, but it doesnt seem to work for me. The list that stores the resulting itemstacks never gets populated, and the block drops nothing. Here's the event handler I'm using: https://pastebin.com/1Q5JSC7H And heres the table, which is located at src/main/resources/assets/foragecraft/loot_tables/dirt.json: https://pastebin.com/tZQhZfHn
April 29, 20187 yr And your debugging messages..? 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.
April 29, 20187 yr Author [19:30:41] [Server thread/INFO] [STDOUT]: [com.theishiopian.foragecraft.handler.BlockForageHandler:blockBreak:31]: net.minecraft.world.storage.loot.LootTable@58554c7e [19:30:41] [Server thread/INFO] [STDOUT]: [com.theishiopian.foragecraft.handler.BlockForageHandler:blockBreak:44]: []
April 29, 20187 yr list = loottable.generateLootForPools(world.rand, context.build()); That is returning a zero-sized list. 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.
April 29, 20187 yr You're going to have to examine that method. 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.
April 29, 20187 yr Author I apologize if I'm missing something terribly obvious, I've never used loot tables before.
April 29, 20187 yr 5 minutes ago, theishiopian said: I assume you mean generateLootForPools? There are no other methods on that line, so yes. 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.
April 29, 20187 yr Author I've looked at that method before, and I can't see the problem. Since vanilla uses it all the time, I know it works.
April 29, 20187 yr So you need to follow the execution of the vanilla code when you pass it in your data and figure out why it is not returning what you expect. 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.
April 29, 20187 yr Author I've followed this rabbit hole for days, I can't find anything. I've narrowed the problem down to the resource location, or possibly the loot context, but I can't find anything wrong with either, based on similar usages of the code in other projects.
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.