Jump to content

13.2 LootTableLoadEvent not firing for vanilla loot tables


aw_wolfe

Recommended Posts

prior to 13.2, LootTableLoadEvent would fire for vanilla loot tables. ForgeHooks#loadLootTable received a (false) for "custom" parameter. This led to ForgeEventFactory.loadLootTable(name, ret, lootTableManager); being executed. Which in turn led to the LootTableLoadEvent firing.

 

 

However, in 13.2 : (ForgeHooks)

if (!custom)
            ret = ForgeEventFactory.loadLootTable(name, ret, lootTableManager);

 

Is never called for me (except on my own mod's loot tables) because ForgeHooks#loadLootTable is always passed a true for "custom" parameter for any minecraft loot table.

 

Is this a design change? Is something off with my mod/install? A bug? Is there another way to catch and edit vanilla loot tables (need to do dynamically -- do not want to simply add new json that overwrites)?

Link to comment
Share on other sites

  • 2 weeks later...

Anyone point me in the right direction?

The vanilla loot tables are coming in as "custom" and final. So, not able to catch them in LootTableLoadEvent and unable to modify them by getting LootTableManager and modify them after load.

 

In 1.12, vanilla would fire the LootTableLoadEvent and you could modify the pools.

In 1.13.2, vanilla is not firing the LootTableLoadEvent because it thinks they are "custom".

 

 

Link to comment
Share on other sites

Thanks. I get that I can put static loot tables in json.

 

I have a set of loot conditions that need to be checked dynamically.  So in 1.12, I have my own LootConditions, LootEntry. Therefore, I could easily say "if 'unique item' is not already dropped ever in game, zombies can drop 'unique ite'm on Tuesdays after dark with 60%".  My other mods could also add a new item and use this mod as utility to quickly add complex loot conditions.

 

The problem is that in 13.2. LootTableLoadEvent is not being called for vanilla loot tables. It has them as "custom=true" and in 1.12, "custom=false"...so forgehook is NOT called in 13.2, whereas it was in 1.12.

 

If I copy all vanilla loot tables into data/mymod/loot_tables , not all of them are triggering LootTableLoadEvent either...haven't investigated why. 

I am hoping I am doing something dumb or not seeing an obvious solution.

Link to comment
Share on other sites

So? Implement ILootCondition.

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.

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.