Jump to content

Recommended Posts

Posted

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.

Posted

public static void addItemToTable(ResourceLocation gameplayFishingFish, Item item, int weight, float numRolls, float probability, int minQuantity, int maxQuantity, float minLootBonus, float maxLootBonus, String name) {

addItemToTable(LootTableList.GAMEPLAY_FISHING_FISH, RunecraftItems.RawAnchovies, 0, 0, weight, minQuantity, maxQuantity, minLootBonus, maxLootBonus, name);

}

 

Posted

And  what function of that class do i use to make my item spawn in the gameplay.fishing.fish loot table? do i do that in the same class or a seperate one?

 

No, you subscribe to the LootTableLoadEvent, and when the gameplay.fishing.fish loot table is loaded, you get it's loot table and call addItemToTable(...) passing the appropriate arguments.

e.g.:

https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/farming/FarmingEventHandler.java#L428

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.

Posted

 

@SubscribeEvent

public void lootTableLoad(LootTableLoadEvent event) {

LootCondition[] chance;

LootCondition[] lootingEnchant;

LootFunction[] count;

LootEntryItem[] item;

LootPool newPool;

if(event.getName().getResourcePath().equals("gameplay.fishing.fish")) {

LootTable loot = event.getTable();

AddlootHandler.addItemToTable(loot, RunecraftItems.RawAnchovies, 10000000, 2, 1, 3, 5, 0, 1, "RawAnchovies");

}

}

}

 

 

Posted

Ok?  What's your question/problem?

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.

Posted

While that's what it's for I'm not sure it's actually used the way you think it is.  I know that for entities like cows, the weight is irrelevant because there's only one entry in the pool.

 

Let me look at fish for a minute.

 

Ah, ok.

 

So my LootUtils class is not constructed to properly handle adding items to the fishing tables because: I have them added as new pools and vanilla is going to ignore it.  Along with a few loot functions that aren't needed (unclear if having a stack other than size 1 is relevant, applicable, or allowed for fishing).

 

You'll want to get a reference to the LootPool named "main" (there's a

table#getPool(name)

method) and you'll want to insert a new LootEntry to it.

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

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