Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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)?

  • 2 weeks later...
  • Author

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".

 

 

In 1.13 you can change the loottables with data packs.

Just add the json loottable  for whatever you want to change inside your data folder.

 

Like data/minecraft/loot_tables/entities/pig.json for example.

  • Author

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.

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.

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.