supreme marshal Posted April 13, 2018 Posted April 13, 2018 (edited) I feel close to do this, but I still have some error in my codes. Hopefully someone can help me with that. So I have a Dragon_loot.json file for my loot tables. Then I have a class named LootTableHandler to handle my Loot_table.json file and then I have another class named LivingDropsEvent where I want to get a vanilla mob (zombie for example), remove his loot table and put my new loot table instead. Here is my codes for LootTableHandler class: package com.SupremeMarshal.MoreToolsTierMod.util.handlers; import com.SupremeMarshal.MoreToolsTierMod.util.Reference; import net.minecraft.util.ResourceLocation; import net.minecraft.world.storage.loot.LootTableList; public class LootTableHandler { public static final ResourceLocation DRAGON_LOOT = LootTableList.register(new ResourceLocation(Reference.MOD_ID, "dragon_loot")); } Codes for LivingDropsEvent class: package com.SupremeMarshal.MoreToolsTierMod.util.handlers; import net.minecraft.entity.passive.EntitySheep; import net.minecraftforge.fml.common.eventhandler.EventPriority; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; public class LivingDropsEvent { @SubscribeEvent(priority=EventPriority.NORMAL, receiveCanceled=true) public void onEvent(LivingDropsEvent event) { // Here it say "entity" (at "event.entity instancof") can not be resolved or is not a field, same goes for "drops" (at "event.drops.clear") if (event.entity instanceof EntityZombie) { //here, it should remove loot table from Zombie System.out.println("EntitySheep drops event"); event.drops.clear(); //here I want to put the new loot table for zombie protected ResourceLocation getLootTable() { return LootTableHandler.DRAGON_LOOT } } } } Edited April 14, 2018 by supreme marshal Quote
Draco18s Posted April 13, 2018 Posted April 13, 2018 That is not how that event works. For 1, your function is a void function, meaning it returns nothing and you're trying to return whatever LootTableHandler.DRAGON_LOOT is. Two, that's not what that event is for. Yes, its to modify the drops, but it does so outside the context of loot tables. Quote 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.
supreme marshal Posted April 13, 2018 Author Posted April 13, 2018 Then, is it possible to completely modify the loot tables of vanilla mobs instead of just modifying the drops? Quote
jabelar Posted April 13, 2018 Posted April 13, 2018 There is actually a LootTableLoadEvent you should use instead. Basically you can check for whether it is the dragon loot table loading and then replace it. See a tutorial here: https://tutorials.darkhax.net/tutorials/loot_tables/ Note that recently the event has added the ability to get the LootTableManager instance as well which gives you ability to access more powerful methods. Quote Check out my tutorials here: http://jabelarminecraft.blogspot.com/
supreme marshal Posted April 13, 2018 Author Posted April 13, 2018 1 minute ago, jabelar said: There is actually a LootTableLoadEvent you should use instead. Basically you can check for whether it is the dragon loot table loading and then replace it. See a tutorial here: https://tutorials.darkhax.net/tutorials/loot_tables/ Note that recently the event has added the ability to get the LootTableManager instance as well which gives you ability to access more powerful methods. Thanks, I'm seeking to obtain more knowledge. Quote
supreme marshal Posted April 14, 2018 Author Posted April 14, 2018 (edited) Ok I got through the tutorial and created this new class. I made an item called Dragon helm, and put this item on the Loot Table of Witch but when I tested the game, he never dropped the dragon helm. I killed 20 Witch to confirm it. Here is the code: public class LootTable { @SubscribeEvent public void onLootTablesLoaded(LootTableLoadEvent event) { //Witch if (event.getName().equals(LootTableList.ENTITIES_WITCH)) { final LootPool main = event.getTable().getPool("main"); if (main != null) { // main.addEntry(new LootEntryItem(ITEM, WEIGHT, QUALITY, FUNCTIONS, CONDITIONS, NAME)); main.addEntry(new LootEntryItem(ModItems.DRAGON_HELM, 1, 0, new LootFunction[0], new LootCondition[0], "ms:dragon_helm")); } } } } Edited April 14, 2018 by supreme marshal Quote
jabelar Posted April 14, 2018 Posted April 14, 2018 (edited) Is your event properly subscribed to the event bus? You need to use the @EventSubscriber annotation on the class. Also, depending on how you register to the bus you now probably need to make your event handling method static. In any case, you should confirm that your loot table method is being called. I usually do this by putting some console print statements in the code to show that the event fired and you can also put it in other parts to make sure the event type matched and your if statements executed as expected. Alternatively you can set a breakpoint and use the debug mode of Eclipse to confirm the execution. Edited April 14, 2018 by jabelar Quote Check out my tutorials here: http://jabelarminecraft.blogspot.com/
supreme marshal Posted April 14, 2018 Author Posted April 14, 2018 (edited) 12 minutes ago, jabelar said: Is your event properly subscribed to the event bus? You need to use the @EventSubscriber annotation on the class. Also, depending on how you register to the bus you now probably need to make your event handling method static. Damn son. I only needed to add that. Thank you it work!! Now, I'm going to try and mess around with this stuff to make my dragon helm a super rare drop (something like 10x rarer than diamond gem drop) I think I can do this with the conditions RandomChance. Edited April 14, 2018 by supreme marshal Quote
supreme marshal Posted April 14, 2018 Author Posted April 14, 2018 I'm not quite sure how to add the condition event. In the tutorial he say "Adding new RandomChance(0.50f); to the conditions would only be true 50% of the time." But, when I put new RandomChance(0.50F) in the conditions spot, it give me an error. Any idea? Quote
Draco18s Posted April 14, 2018 Posted April 14, 2018 new LootCondition[0] is an array, you need to pass in a list of conditions (in this case, an array of size 1), not a single one, unboxed. Quote 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.
supreme marshal Posted April 14, 2018 Author Posted April 14, 2018 4 minutes ago, Draco18s said: new LootCondition[0] is an array, you need to pass in a list of conditions (in this case, an array of size 1), not a single one, unboxed. I'm a bit confused. I do my list of conditions where exactly? and when you say; "not a single one, unboxed", idk what you mean. Do you mean to put [1] instead of [0] after the "LootCondition" ? Quote
jabelar Posted April 14, 2018 Posted April 14, 2018 17 minutes ago, supreme marshal said: I'm a bit confused. I do my list of conditions where exactly? and when you say; "not a single one, unboxed", idk what you mean. Do you mean to put [1] instead of [0] after the "LootCondition" ? What he means is sometimes even though you only want to pass in one condition the method expects an array. So simply make an array with only one condition and pass that. In other words you need to match the type LoopCondition[] not LoopCondition. In other words, leave the new LootCondition[0] but initialize the first element to be new RandomChance(0.5F) 1 Quote Check out my tutorials here: http://jabelarminecraft.blogspot.com/
supreme marshal Posted April 14, 2018 Author Posted April 14, 2018 Like this? new RandomChance(0.15F); main.addEntry(new LootEntryItem(Items.APPLE, 1, 0, new LootFunction[0], new LootCondition[0], "minecraft:apple")); Quote
supreme marshal Posted April 14, 2018 Author Posted April 14, 2018 (edited) oh like this it doesn't give me an error main.addEntry(new LootEntryItem(Items.APPLE, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.15F)}, "minecraft:apple")); HELL YEAH IT WORKED Edited April 14, 2018 by supreme marshal Quote
Draco18s Posted April 14, 2018 Posted April 14, 2018 Of course it does, that's how you create arrays. 1 Quote 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.
supreme marshal Posted April 14, 2018 Author Posted April 14, 2018 (edited) Look at this piece of art.. Behold, a tiny piece of what I'm about to do with custom loot table: package com.SupremeMarshal.MoreToolsTierMod.util.handlers; import org.omg.CORBA.INITIALIZE; import com.SupremeMarshal.MoreToolsTierMod.init.ModItems; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraft.world.storage.loot.LootEntryItem; import net.minecraft.world.storage.loot.LootEntryTable; import net.minecraft.world.storage.loot.LootPool; import net.minecraft.world.storage.loot.LootTableList; import net.minecraft.world.storage.loot.RandomValueRange; import net.minecraft.world.storage.loot.conditions.LootCondition; import net.minecraft.world.storage.loot.conditions.RandomChance; import net.minecraft.world.storage.loot.functions.LootFunction; import net.minecraft.world.storage.loot.functions.SetCount; import net.minecraftforge.event.LootTableLoadEvent; import net.minecraftforge.fml.common.Mod.EventBusSubscriber; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; @EventBusSubscriber public class LootTable { @SubscribeEvent public static void onLootTablesLoaded(LootTableLoadEvent event) { //STRONGHOLD CHEST if (event.getName().equals(LootTableList.CHESTS_STRONGHOLD_CORRIDOR)) { final LootPool main = event.getTable().getPool("main"); if (main != null) { main.addEntry(new LootEntryItem(ModItems.MITHRIL_HELM, 3, 0, new LootFunction[0], new LootCondition[0], "ms:mithril_helm")); main.addEntry(new LootEntryItem(ModItems.MITHRIL_BODY, 2, 0, new LootFunction[0], new LootCondition[0], "ms:mithril_body")); main.addEntry(new LootEntryItem(ModItems.MITHRIL_LEGS, 2, 0, new LootFunction[0], new LootCondition[0], "ms:mithril_legs")); main.addEntry(new LootEntryItem(ModItems.MITHRIL_BOOTS, 3, 0, new LootFunction[0], new LootCondition[0], "ms:mithril_boots")); main.addEntry(new LootEntryItem(ModItems.MITHRIL_INGOT, 6, 0, new LootFunction[] {new SetCount(new LootCondition[0], new RandomValueRange(1, 7))}, new LootCondition[0], "ms:mithril_ingot")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_HELM, 2, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.50F)}, "ms:adamant_helm")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_BODY, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.50F)}, "ms:adamant_body")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_LEGS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.50F)}, "ms:adamant_legs")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_BOOTS, 2, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.50F)}, "ms:adamant_boots")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_INGOT, 4, 0, new LootFunction[] {new SetCount(new LootCondition[0], new RandomValueRange(1, 5))}, new LootCondition[0], "ms:adamant_ingot")); main.addEntry(new LootEntryItem(ModItems.RUNE_HELM, 2, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.125F)}, "ms:rune_helm")); main.addEntry(new LootEntryItem(ModItems.RUNE_BODY, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.125F)}, "ms:rune_body")); main.addEntry(new LootEntryItem(ModItems.RUNE_LEGS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.125F)}, "ms:rune_legs")); main.addEntry(new LootEntryItem(ModItems.RUNE_BOOTS, 2, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.125F)}, "ms:rune_boots")); main.addEntry(new LootEntryItem(ModItems.RUNE_INGOT, 2, 0, new LootFunction[] {new SetCount(new LootCondition[0], new RandomValueRange(1, 5))}, new LootCondition[0], "ms:rune_ingot")); main.addEntry(new LootEntryItem(ModItems.DRAGON_HELM, 2, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.02F)}, "ms:dragon_helm")); main.addEntry(new LootEntryItem(ModItems.DRAGON_BODY, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.02F)}, "ms:dragon_body")); main.addEntry(new LootEntryItem(ModItems.DRAGON_LEGS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.02F)}, "ms:dragon_legs")); main.addEntry(new LootEntryItem(ModItems.DRAGON_BOOTS, 2, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.02F)}, "ms:dragon_boots")); } } } //SKELETONS @SubscribeEvent public static void onLootTablesLoaded1(LootTableLoadEvent event) { if (event.getName().equals(LootTableList.ENTITIES_SKELETON)) { final LootPool main = event.getTable().getPool("main"); if (main != null) { main.addEntry(new LootEntryItem(ModItems.MITHRIL_HELM, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.1F)}, "ms:mithril_helm")); main.addEntry(new LootEntryItem(ModItems.MITHRIL_BODY, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.05F)}, "ms:mithril_body")); main.addEntry(new LootEntryItem(ModItems.MITHRIL_LEGS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.05F)}, "ms:mithril_legs")); main.addEntry(new LootEntryItem(ModItems.MITHRIL_BOOTS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.1F)}, "ms:mithril_boots")); main.addEntry(new LootEntryItem(ModItems.MITHRIL_INGOT, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.4F)}, "ms:mithril_ingot")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_HELM, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.03F)}, "ms:adamant_helm")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_BODY, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.02F)}, "ms:adamant_body")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_LEGS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.02F)}, "ms:adamant_legs")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_BOOTS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.03F)}, "ms:adamant_boots")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_INGOT, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.12F)}, "ms:adamant_ingot")); main.addEntry(new LootEntryItem(ModItems.RUNE_HELM, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.008F)}, "ms:rune_helm")); } } } //DUNGEON CHEST @SubscribeEvent public static void onLootTablesLoaded2(LootTableLoadEvent event) { if (event.getName().equals(LootTableList.CHESTS_SIMPLE_DUNGEON)) { final LootPool main = event.getTable().getPool("main"); if (main != null) { main.addEntry(new LootEntryItem(ModItems.MITHRIL_HELM, 3, 0, new LootFunction[0], new LootCondition[0], "ms:mithril_helm")); main.addEntry(new LootEntryItem(ModItems.MITHRIL_BODY, 2, 0, new LootFunction[0], new LootCondition[0], "ms:mithril_body")); main.addEntry(new LootEntryItem(ModItems.MITHRIL_LEGS, 2, 0, new LootFunction[0], new LootCondition[0], "ms:mithril_legs")); main.addEntry(new LootEntryItem(ModItems.MITHRIL_BOOTS, 3, 0, new LootFunction[0], new LootCondition[0], "ms:mithril_boots")); main.addEntry(new LootEntryItem(ModItems.MITHRIL_INGOT, 5, 0, new LootFunction[] {new SetCount(new LootCondition[0], new RandomValueRange(1, 7))}, new LootCondition[0], "ms:mithril_ingot")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_HELM, 2, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.5F)}, "ms:adamant_helm")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_BODY, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.5F)}, "ms:adamant_body")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_LEGS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.5F)}, "ms:adamant_legs")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_BOOTS, 2, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.5F)}, "ms:adamant_boots")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_INGOT, 3, 0, new LootFunction[] {new SetCount(new LootCondition[0], new RandomValueRange(1, 5))}, new LootCondition[0], "ms:adamant_ingot")); main.addEntry(new LootEntryItem(ModItems.RUNE_HELM, 2, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.125F)}, "ms:rune_helm")); main.addEntry(new LootEntryItem(ModItems.RUNE_BODY, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.125F)}, "ms:rune_body")); main.addEntry(new LootEntryItem(ModItems.RUNE_LEGS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.125F)}, "ms:rune_legs")); main.addEntry(new LootEntryItem(ModItems.RUNE_BOOTS, 2, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.125F)}, "ms:rune_boots")); main.addEntry(new LootEntryItem(ModItems.RUNE_INGOT, 3, 0, new LootFunction[] {new SetCount(new LootCondition[0], new RandomValueRange(1, 5))}, new LootCondition[] {new RandomChance(0.4F)}, "ms:rune_ingot")); main.addEntry(new LootEntryItem(ModItems.DRAGON_HELM, 2, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.02F)}, "ms:dragon_helm")); main.addEntry(new LootEntryItem(ModItems.DRAGON_BODY, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.02F)}, "ms:dragon_body")); main.addEntry(new LootEntryItem(ModItems.DRAGON_LEGS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.02F)}, "ms:dragon_legs")); main.addEntry(new LootEntryItem(ModItems.DRAGON_BOOTS, 2, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.02F)}, "ms:dragon_boots")); } } } //ELDER GUARDIAN @SubscribeEvent public static void onLootTablesLoaded3(LootTableLoadEvent event) { if (event.getName().equals(LootTableList.ENTITIES_ELDER_GUARDIAN)) { final LootPool main = event.getTable().getPool("main"); if (main != null) { main.addEntry(new LootEntryItem(ModItems.DRAGON_HELM, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.002F)}, "ms:dragon_helm")); main.addEntry(new LootEntryItem(ModItems.RUNE_HELM, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.03F)}, "ms:rune_helm")); main.addEntry(new LootEntryItem(ModItems.RUNE_BODY, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.03F)}, "ms:rune_body")); main.addEntry(new LootEntryItem(ModItems.RUNE_LEGS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.015F)}, "ms:rune_legs")); main.addEntry(new LootEntryItem(ModItems.RUNE_BOOTS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.015F)}, "ms:rune_boots")); main.addEntry(new LootEntryItem(ModItems.RUNE_INGOT, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.03F)}, "ms:rune_ingot")); } } } //WITCH @SubscribeEvent public static void onLootTablesLoaded4(LootTableLoadEvent event) { if (event.getName().equals(LootTableList.ENTITIES_WITCH)) { final LootPool main = event.getTable().getPool("main"); if (main != null) { main.addEntry(new LootEntryItem(ModItems.DRAGON_HELM, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.003F)}, "ms:dragon_helm")); main.addEntry(new LootEntryItem(ModItems.RUNE_HELM, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.03F)}, "ms:rune_helm")); main.addEntry(new LootEntryItem(ModItems.RUNE_BODY, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.015F)}, "ms:rune_body")); main.addEntry(new LootEntryItem(ModItems.RUNE_LEGS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.015F)}, "ms:rune_legs")); main.addEntry(new LootEntryItem(ModItems.RUNE_BOOTS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.03F)}, "ms:rune_boots")); main.addEntry(new LootEntryItem(ModItems.RUNE_INGOT, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.09F)}, "ms:rune_ingot")); } } } //CHEST NETHER @SubscribeEvent public static void onLootTablesLoaded5(LootTableLoadEvent event) { if (event.getName().equals(LootTableList.CHESTS_NETHER_BRIDGE)) { final LootPool main = event.getTable().getPool("main"); if (main != null) { main.addEntry(new LootEntryItem(ModItems.MITHRIL_HELM, 10, 0, new LootFunction[0], new LootCondition[0], "ms:mithril_helm")); main.addEntry(new LootEntryItem(ModItems.MITHRIL_BODY, 6, 0, new LootFunction[0], new LootCondition[0], "ms:mithril_body")); main.addEntry(new LootEntryItem(ModItems.MITHRIL_LEGS, 6, 0, new LootFunction[0], new LootCondition[0], "ms:mithril_legs")); main.addEntry(new LootEntryItem(ModItems.MITHRIL_BOOTS, 10, 0, new LootFunction[0], new LootCondition[0], "ms:mithril_boots")); main.addEntry(new LootEntryItem(ModItems.MITHRIL_INGOT, 15, 0, new LootFunction[] {new SetCount(new LootCondition[0], new RandomValueRange(1, 8))}, new LootCondition[0], "ms:mithril_ingot")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_HELM, 6, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.5F)}, "ms:adamant_helm")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_BODY, 4, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.5F)}, "ms:adamant_body")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_LEGS, 4, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.5F)}, "ms:adamant_legs")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_BOOTS, 6, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.5F)}, "ms:adamant_boots")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_INGOT, 8, 0, new LootFunction[] {new SetCount(new LootCondition[0], new RandomValueRange(1, 7))}, new LootCondition[0], "ms:adamant_ingot")); main.addEntry(new LootEntryItem(ModItems.RUNE_HELM, 4, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.125F)}, "ms:rune_helm")); main.addEntry(new LootEntryItem(ModItems.RUNE_BODY, 2, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.125F)}, "ms:rune_body")); main.addEntry(new LootEntryItem(ModItems.RUNE_LEGS, 2, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.125F)}, "ms:rune_legs")); main.addEntry(new LootEntryItem(ModItems.RUNE_BOOTS, 4, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.125F)}, "ms:rune_boots")); main.addEntry(new LootEntryItem(ModItems.RUNE_INGOT, 4, 0, new LootFunction[] {new SetCount(new LootCondition[0], new RandomValueRange(1, 6))}, new LootCondition[] {new RandomChance(0.4F)}, "ms:rune_ingot")); main.addEntry(new LootEntryItem(ModItems.DRAGON_HELM, 3, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.03F)}, "ms:dragon_helm")); main.addEntry(new LootEntryItem(ModItems.DRAGON_BODY, 2, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.03F)}, "ms:dragon_body")); main.addEntry(new LootEntryItem(ModItems.DRAGON_LEGS, 2, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.03F)}, "ms:dragon_legs")); main.addEntry(new LootEntryItem(ModItems.DRAGON_BOOTS, 3, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.03F)}, "ms:dragon_boots")); } } } //FISHING TREASURE @SubscribeEvent public static void onLootTablesLoaded6(LootTableLoadEvent event) { if (event.getName().equals(LootTableList.GAMEPLAY_FISHING_TREASURE)) { final LootPool main = event.getTable().getPool("main"); if (main != null) { main.addEntry(new LootEntryItem(ModItems.MITHRIL_HELM, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.1F)}, "ms:mithril_helm")); main.addEntry(new LootEntryItem(ModItems.MITHRIL_BODY, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.06F)}, "ms:mithril_body")); main.addEntry(new LootEntryItem(ModItems.MITHRIL_LEGS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.06F)}, "ms:mithril_legs")); main.addEntry(new LootEntryItem(ModItems.MITHRIL_BOOTS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.1F)}, "ms:mithril_boots")); main.addEntry(new LootEntryItem(ModItems.MITHRIL_INGOT, 1, 0, new LootFunction[] {new SetCount(new LootCondition[0], new RandomValueRange(1, 7))}, new LootCondition[] {new RandomChance(0.3F)}, "ms:mithril_ingot")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_HELM, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.025F)}, "ms:adamant_helm")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_BODY, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.018F)}, "ms:adamant_body")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_LEGS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.018F)}, "ms:adamant_legs")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_BOOTS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.025F)}, "ms:adamant_boots")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_INGOT, 1, 0, new LootFunction[] {new SetCount(new LootCondition[0], new RandomValueRange(1, 5))}, new LootCondition[] {new RandomChance(0.1F)}, "ms:adamant_ingot")); main.addEntry(new LootEntryItem(ModItems.DRAGON_HELM, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.001F)}, "ms:dragon_helm")); main.addEntry(new LootEntryItem(ModItems.RUNE_HELM, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.008F)}, "ms:rune_helm")); main.addEntry(new LootEntryItem(ModItems.RUNE_BODY, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.005F)}, "ms:rune_body")); main.addEntry(new LootEntryItem(ModItems.RUNE_LEGS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.005F)}, "ms:rune_legs")); main.addEntry(new LootEntryItem(ModItems.RUNE_BOOTS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.008F)}, "ms:rune_boots")); main.addEntry(new LootEntryItem(ModItems.RUNE_INGOT, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.02F)}, "ms:rune_ingot")); } } } //CAVE SPIDER @SubscribeEvent public static void onLootTablesLoaded7(LootTableLoadEvent event) { if (event.getName().equals(LootTableList.ENTITIES_CAVE_SPIDER)) { final LootPool main = event.getTable().getPool("main"); if (main != null) { main.addEntry(new LootEntryItem(ModItems.MITHRIL_HELM, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.1F)}, "ms:mithril_helm")); main.addEntry(new LootEntryItem(ModItems.MITHRIL_BODY, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.05F)}, "ms:mithril_body")); main.addEntry(new LootEntryItem(ModItems.MITHRIL_LEGS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.05F)}, "ms:mithril_legs")); main.addEntry(new LootEntryItem(ModItems.MITHRIL_BOOTS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.1F)}, "ms:mithril_boots")); main.addEntry(new LootEntryItem(ModItems.MITHRIL_INGOT, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.4F)}, "ms:mithril_ingot")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_HELM, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.03F)}, "ms:adamant_helm")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_BODY, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.02F)}, "ms:adamant_body")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_LEGS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.02F)}, "ms:adamant_legs")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_BOOTS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.03F)}, "ms:adamant_boots")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_INGOT, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.12F)}, "ms:adamant_ingot")); main.addEntry(new LootEntryItem(ModItems.RUNE_HELM, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.008F)}, "ms:rune_helm")); } } } // @SubscribeEvent public static void onLootTablesLoaded8(LootTableLoadEvent event) { if (event.getName().equals(LootTableList.ENTITIES_CREEPER)) { final LootPool main = event.getTable().getPool("main"); if (main != null) { main.addEntry(new LootEntryItem(ModItems.MITHRIL_HELM, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.1F)}, "ms:mithril_helm")); main.addEntry(new LootEntryItem(ModItems.MITHRIL_BODY, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.05F)}, "ms:mithril_body")); main.addEntry(new LootEntryItem(ModItems.MITHRIL_LEGS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.05F)}, "ms:mithril_legs")); main.addEntry(new LootEntryItem(ModItems.MITHRIL_BOOTS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.1F)}, "ms:mithril_boots")); main.addEntry(new LootEntryItem(ModItems.MITHRIL_INGOT, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.4F)}, "ms:mithril_ingot")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_HELM, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.03F)}, "ms:adamant_helm")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_BODY, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.02F)}, "ms:adamant_body")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_LEGS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.02F)}, "ms:adamant_legs")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_BOOTS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.03F)}, "ms:adamant_boots")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_INGOT, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.12F)}, "ms:adamant_ingot")); main.addEntry(new LootEntryItem(ModItems.RUNE_BOOTS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.008F)}, "ms:rune_boots")); } } } //WITHER SKELETON @SubscribeEvent public static void onLootTablesLoaded9(LootTableLoadEvent event) { if (event.getName().equals(LootTableList.ENTITIES_WITHER_SKELETON)) { final LootPool main = event.getTable().getPool("main"); if (main != null) { main.addEntry(new LootEntryItem(ModItems.MITHRIL_HELM, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.1F)}, "ms:mithril_helm")); main.addEntry(new LootEntryItem(ModItems.MITHRIL_BODY, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.05F)}, "ms:mithril_body")); main.addEntry(new LootEntryItem(ModItems.MITHRIL_LEGS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.05F)}, "ms:mithril_legs")); main.addEntry(new LootEntryItem(ModItems.MITHRIL_BOOTS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.1F)}, "ms:mithril_boots")); main.addEntry(new LootEntryItem(ModItems.MITHRIL_INGOT, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.4F)}, "ms:mithril_ingot")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_HELM, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.03F)}, "ms:adamant_helm")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_BODY, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.02F)}, "ms:adamant_body")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_LEGS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.02F)}, "ms:adamant_legs")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_BOOTS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.03F)}, "ms:adamant_boots")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_INGOT, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.12F)}, "ms:adamant_ingot")); main.addEntry(new LootEntryItem(ModItems.RUNE_HELM, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.008F)}, "ms:rune_helm")); main.addEntry(new LootEntryItem(ModItems.RUNE_BOOTS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.008F)}, "ms:rune_boots")); main.addEntry(new LootEntryItem(ModItems.RUNE_INGOT, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.03F)}, "ms:rune_ingot")); } } } //SKELETON HORSE @SubscribeEvent public static void onLootTablesLoaded10(LootTableLoadEvent event) { if (event.getName().equals(LootTableList.ENTITIES_SKELETON_HORSE)) { final LootPool main = event.getTable().getPool("main"); if (main != null) { main.addEntry(new LootEntryItem(ModItems.MITHRIL_HELM, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.2F)}, "ms:mithril_helm")); main.addEntry(new LootEntryItem(ModItems.MITHRIL_BODY, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.08F)}, "ms:mithril_body")); main.addEntry(new LootEntryItem(ModItems.MITHRIL_LEGS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.08F)}, "ms:mithril_legs")); main.addEntry(new LootEntryItem(ModItems.MITHRIL_BOOTS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.2F)}, "ms:mithril_boots")); main.addEntry(new LootEntryItem(ModItems.MITHRIL_INGOT, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.8F)}, "ms:mithril_ingot")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_HELM, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.06F)}, "ms:adamant_helm")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_BODY, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.04F)}, "ms:adamant_body")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_LEGS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.04F)}, "ms:adamant_legs")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_BOOTS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.06F)}, "ms:adamant_boots")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_INGOT, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.24F)}, "ms:adamant_ingot")); main.addEntry(new LootEntryItem(ModItems.RUNE_HELM, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.016F)}, "ms:rune_helm")); main.addEntry(new LootEntryItem(ModItems.RUNE_BOOTS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.016F)}, "ms:rune_boots")); main.addEntry(new LootEntryItem(ModItems.RUNE_INGOT, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.06F)}, "ms:rune_ingot")); main.addEntry(new LootEntryItem(ModItems.RUNE_BODY, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.008F)}, "ms:rune_body")); main.addEntry(new LootEntryItem(ModItems.RUNE_LEGS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.008F)}, "ms:rune_legs")); main.addEntry(new LootEntryItem(ModItems.DRAGON_HELM, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.001F)}, "ms:dragon_helm")); } } } //IGLO CHEST @SubscribeEvent public static void onLootTablesLoaded11(LootTableLoadEvent event) { if (event.getName().equals(LootTableList.CHESTS_IGLOO_CHEST)) { final LootPool main = event.getTable().getPool("main"); if (main != null) { main.addEntry(new LootEntryItem(ModItems.MITHRIL_HELM, 3, 0, new LootFunction[0], new LootCondition[0], "ms:mithril_helm")); main.addEntry(new LootEntryItem(ModItems.MITHRIL_BODY, 2, 0, new LootFunction[0], new LootCondition[0], "ms:mithril_body")); main.addEntry(new LootEntryItem(ModItems.MITHRIL_LEGS, 2, 0, new LootFunction[0], new LootCondition[0], "ms:mithril_legs")); main.addEntry(new LootEntryItem(ModItems.MITHRIL_BOOTS, 3, 0, new LootFunction[0], new LootCondition[0], "ms:mithril_boots")); main.addEntry(new LootEntryItem(ModItems.MITHRIL_INGOT, 5, 0, new LootFunction[] {new SetCount(new LootCondition[0], new RandomValueRange(1, 7))}, new LootCondition[0], "ms:mithril_ingot")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_HELM, 2, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.5F)}, "ms:adamant_helm")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_BODY, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.5F)}, "ms:adamant_body")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_LEGS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.5F)}, "ms:adamant_legs")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_BOOTS, 2, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.5F)}, "ms:adamant_boots")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_INGOT, 3, 0, new LootFunction[] {new SetCount(new LootCondition[0], new RandomValueRange(1, 5))}, new LootCondition[0], "ms:adamant_ingot")); main.addEntry(new LootEntryItem(ModItems.RUNE_HELM, 2, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.125F)}, "ms:rune_helm")); main.addEntry(new LootEntryItem(ModItems.RUNE_BODY, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.125F)}, "ms:rune_body")); main.addEntry(new LootEntryItem(ModItems.RUNE_LEGS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.125F)}, "ms:rune_legs")); main.addEntry(new LootEntryItem(ModItems.RUNE_BOOTS, 2, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.125F)}, "ms:rune_boots")); main.addEntry(new LootEntryItem(ModItems.RUNE_INGOT, 3, 0, new LootFunction[] {new SetCount(new LootCondition[0], new RandomValueRange(1, 5))}, new LootCondition[] {new RandomChance(0.4F)}, "ms:rune_ingot")); main.addEntry(new LootEntryItem(ModItems.DRAGON_HELM, 2, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.02F)}, "ms:dragon_helm")); main.addEntry(new LootEntryItem(ModItems.DRAGON_BODY, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.02F)}, "ms:dragon_body")); main.addEntry(new LootEntryItem(ModItems.DRAGON_LEGS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.02F)}, "ms:dragon_legs")); main.addEntry(new LootEntryItem(ModItems.DRAGON_BOOTS, 2, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.02F)}, "ms:dragon_boots")); } } } //GUARDIAN @SubscribeEvent public static void onLootTablesLoaded12(LootTableLoadEvent event) { if (event.getName().equals(LootTableList.ENTITIES_GUARDIAN)) { final LootPool main = event.getTable().getPool("main"); if (main != null) { main.addEntry(new LootEntryItem(ModItems.MITHRIL_HELM, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.5F)}, "ms:mithril_helm")); main.addEntry(new LootEntryItem(ModItems.MITHRIL_BODY, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.3F)}, "ms:mithril_body")); main.addEntry(new LootEntryItem(ModItems.MITHRIL_LEGS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.3F)}, "ms:mithril_legs")); main.addEntry(new LootEntryItem(ModItems.MITHRIL_BOOTS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.5F)}, "ms:mithril_boots")); main.addEntry(new LootEntryItem(ModItems.MITHRIL_INGOT, 1, 0, new LootFunction[] {new SetCount(new LootCondition[0], new RandomValueRange(1, 5))}, new LootCondition[0], "ms:mithril_ingot")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_HELM, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.15F)}, "ms:adamant_helm")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_BODY, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.1F)}, "ms:adamant_body")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_LEGS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.1F)}, "ms:adamant_legs")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_BOOTS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.15F)}, "ms:adamant_boots")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_INGOT, 1, 0, new LootFunction[] {new SetCount(new LootCondition[0], new RandomValueRange(1, 3))}, new LootCondition[] {new RandomChance(0.4F)}, "ms:adamant_ingot")); main.addEntry(new LootEntryItem(ModItems.RUNE_HELM, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.035F)}, "ms:rune_helm")); main.addEntry(new LootEntryItem(ModItems.RUNE_BODY, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.025F)}, "ms:rune_body")); main.addEntry(new LootEntryItem(ModItems.RUNE_LEGS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.025F)}, "ms:rune_legs")); main.addEntry(new LootEntryItem(ModItems.RUNE_BOOTS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.035F)}, "ms:rune_boots")); main.addEntry(new LootEntryItem(ModItems.RUNE_INGOT, 1, 0, new LootFunction[] {new SetCount(new LootCondition[0], new RandomValueRange(1, 2))}, new LootCondition[] {new RandomChance(0.1F)}, "ms:rune_ingot")); main.addEntry(new LootEntryItem(ModItems.DRAGON_HELM, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.0035F)}, "ms:dragon_helm")); main.addEntry(new LootEntryItem(ModItems.DRAGON_BODY, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.0025F)}, "ms:dragon_body")); main.addEntry(new LootEntryItem(ModItems.DRAGON_LEGS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.0025F)}, "ms:dragon_legs")); main.addEntry(new LootEntryItem(ModItems.DRAGON_BOOTS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.0035F)}, "ms:dragon_boots")); } } } //CHEST ABANDONED MINESHAFT @SubscribeEvent public static void onLootTablesLoaded13(LootTableLoadEvent event) { if (event.getName().equals(LootTableList.CHESTS_ABANDONED_MINESHAFT)) { final LootPool main = event.getTable().getPool("main"); if (main != null) { main.addEntry(new LootEntryItem(ModItems.MITHRIL_HELM, 3, 0, new LootFunction[0], new LootCondition[0], "ms:mithril_helm")); main.addEntry(new LootEntryItem(ModItems.MITHRIL_BODY, 2, 0, new LootFunction[0], new LootCondition[0], "ms:mithril_body")); main.addEntry(new LootEntryItem(ModItems.MITHRIL_LEGS, 2, 0, new LootFunction[0], new LootCondition[0], "ms:mithril_legs")); main.addEntry(new LootEntryItem(ModItems.MITHRIL_BOOTS, 3, 0, new LootFunction[0], new LootCondition[0], "ms:mithril_boots")); main.addEntry(new LootEntryItem(ModItems.MITHRIL_INGOT, 5, 0, new LootFunction[] {new SetCount(new LootCondition[0], new RandomValueRange(1, 7))}, new LootCondition[0], "ms:mithril_ingot")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_HELM, 2, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.5F)}, "ms:adamant_helm")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_BODY, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.5F)}, "ms:adamant_body")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_LEGS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.5F)}, "ms:adamant_legs")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_BOOTS, 2, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.5F)}, "ms:adamant_boots")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_INGOT, 3, 0, new LootFunction[] {new SetCount(new LootCondition[0], new RandomValueRange(1, 5))}, new LootCondition[0], "ms:adamant_ingot")); main.addEntry(new LootEntryItem(ModItems.RUNE_HELM, 2, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.125F)}, "ms:rune_helm")); main.addEntry(new LootEntryItem(ModItems.RUNE_BODY, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.125F)}, "ms:rune_body")); main.addEntry(new LootEntryItem(ModItems.RUNE_LEGS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.125F)}, "ms:rune_legs")); main.addEntry(new LootEntryItem(ModItems.RUNE_BOOTS, 2, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.125F)}, "ms:rune_boots")); main.addEntry(new LootEntryItem(ModItems.RUNE_INGOT, 3, 0, new LootFunction[] {new SetCount(new LootCondition[0], new RandomValueRange(1, 5))}, new LootCondition[] {new RandomChance(0.4F)}, "ms:rune_ingot")); main.addEntry(new LootEntryItem(ModItems.DRAGON_HELM, 2, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.02F)}, "ms:dragon_helm")); main.addEntry(new LootEntryItem(ModItems.DRAGON_BODY, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.02F)}, "ms:dragon_body")); main.addEntry(new LootEntryItem(ModItems.DRAGON_LEGS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.02F)}, "ms:dragon_legs")); main.addEntry(new LootEntryItem(ModItems.DRAGON_BOOTS, 2, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.02F)}, "ms:dragon_boots")); } } } //GHAST @SubscribeEvent public static void onLootTablesLoaded14(LootTableLoadEvent event) { if (event.getName().equals(LootTableList.ENTITIES_GHAST)) { final LootPool main = event.getTable().getPool("main"); if (main != null) { main.addEntry(new LootEntryItem(ModItems.RUNE_HELM, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.15F)}, "ms:rune_helm")); main.addEntry(new LootEntryItem(ModItems.RUNE_BODY, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.1F)}, "ms:rune_body")); main.addEntry(new LootEntryItem(ModItems.RUNE_LEGS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.1F)}, "ms:rune_legs")); main.addEntry(new LootEntryItem(ModItems.RUNE_BOOTS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.15F)}, "ms:rune_boots")); main.addEntry(new LootEntryItem(ModItems.RUNE_INGOT, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.5F)}, "ms:rune_ingot")); main.addEntry(new LootEntryItem(ModItems.DRAGON_HELM, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.008F)}, "ms:dragon_helm")); main.addEntry(new LootEntryItem(ModItems.DRAGON_BODY, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.006F)}, "ms:dragon_helm")); main.addEntry(new LootEntryItem(ModItems.DRAGON_LEGS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.006F)}, "ms:dragon_helm")); main.addEntry(new LootEntryItem(ModItems.DRAGON_BOOTS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.008F)}, "ms:dragon_helm")); } } } //CHEST STRONGHOLD @SubscribeEvent public static void onLootTablesLoaded15(LootTableLoadEvent event) { if (event.getName().equals(LootTableList.CHESTS_STRONGHOLD_CROSSING)) { final LootPool main = event.getTable().getPool("main"); if (main != null) { main.addEntry(new LootEntryItem(ModItems.MITHRIL_HELM, 6, 0, new LootFunction[0], new LootCondition[0], "ms:mithril_helm")); main.addEntry(new LootEntryItem(ModItems.MITHRIL_BODY, 4, 0, new LootFunction[0], new LootCondition[0], "ms:mithril_body")); main.addEntry(new LootEntryItem(ModItems.MITHRIL_LEGS, 4, 0, new LootFunction[0], new LootCondition[0], "ms:mithril_legs")); main.addEntry(new LootEntryItem(ModItems.MITHRIL_BOOTS, 6, 0, new LootFunction[0], new LootCondition[0], "ms:mithril_boots")); main.addEntry(new LootEntryItem(ModItems.MITHRIL_INGOT, 10, 0, new LootFunction[] {new SetCount(new LootCondition[0], new RandomValueRange(1, 7))}, new LootCondition[0], "ms:mithril_ingot")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_HELM, 3, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.5F)}, "ms:adamant_helm")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_BODY, 2, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.5F)}, "ms:adamant_body")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_LEGS, 2, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.5F)}, "ms:adamant_legs")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_BOOTS, 3, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.5F)}, "ms:adamant_boots")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_INGOT, 5, 0, new LootFunction[] {new SetCount(new LootCondition[0], new RandomValueRange(1, 5))}, new LootCondition[0], "ms:adamant_ingot")); main.addEntry(new LootEntryItem(ModItems.RUNE_HELM, 3, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.125F)}, "ms:rune_helm")); main.addEntry(new LootEntryItem(ModItems.RUNE_BODY, 2, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.125F)}, "ms:rune_body")); main.addEntry(new LootEntryItem(ModItems.RUNE_LEGS, 2, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.125F)}, "ms:rune_legs")); main.addEntry(new LootEntryItem(ModItems.RUNE_BOOTS, 3, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.125F)}, "ms:rune_boots")); main.addEntry(new LootEntryItem(ModItems.RUNE_INGOT, 5, 0, new LootFunction[] {new SetCount(new LootCondition[0], new RandomValueRange(1, 5))}, new LootCondition[] {new RandomChance(0.4F)}, "ms:rune_ingot")); main.addEntry(new LootEntryItem(ModItems.DRAGON_HELM, 3, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.02F)}, "ms:dragon_helm")); main.addEntry(new LootEntryItem(ModItems.DRAGON_BODY, 2, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.02F)}, "ms:dragon_body")); main.addEntry(new LootEntryItem(ModItems.DRAGON_LEGS, 2, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.02F)}, "ms:dragon_legs")); main.addEntry(new LootEntryItem(ModItems.DRAGON_BOOTS, 3, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.02F)}, "ms:dragon_boots")); } } } //ZOMBIE @SubscribeEvent public static void onLootTablesLoaded16(LootTableLoadEvent event) { if (event.getName().equals(LootTableList.ENTITIES_ZOMBIE)) { final LootPool main = event.getTable().getPool("main"); if (main != null) { main.addEntry(new LootEntryItem(ModItems.MITHRIL_HELM, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.1F)}, "ms:mithril_helm")); main.addEntry(new LootEntryItem(ModItems.MITHRIL_BODY, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.05F)}, "ms:mithril_body")); main.addEntry(new LootEntryItem(ModItems.MITHRIL_LEGS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.05F)}, "ms:mithril_legs")); main.addEntry(new LootEntryItem(ModItems.MITHRIL_BOOTS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.1F)}, "ms:mithril_boots")); main.addEntry(new LootEntryItem(ModItems.MITHRIL_INGOT, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.4F)}, "ms:mithril_ingot")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_HELM, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.03F)}, "ms:adamant_helm")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_BODY, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.02F)}, "ms:adamant_body")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_LEGS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.02F)}, "ms:adamant_legs")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_BOOTS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.03F)}, "ms:adamant_boots")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_INGOT, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.12F)}, "ms:adamant_ingot")); main.addEntry(new LootEntryItem(ModItems.RUNE_HELM, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.006F)}, "ms:rune_helm")); main.addEntry(new LootEntryItem(ModItems.RUNE_INGOT, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.016F)}, "ms:rune_ingot")); } } } //CHEST JUNGLE TEMPLE @SubscribeEvent public static void onLootTablesLoaded17(LootTableLoadEvent event) { if (event.getName().equals(LootTableList.CHESTS_JUNGLE_TEMPLE)) { final LootPool main = event.getTable().getPool("main"); if (main != null) { main.addEntry(new LootEntryItem(ModItems.MITHRIL_HELM, 3, 0, new LootFunction[0], new LootCondition[0], "ms:mithril_helm")); main.addEntry(new LootEntryItem(ModItems.MITHRIL_BODY, 2, 0, new LootFunction[0], new LootCondition[0], "ms:mithril_body")); main.addEntry(new LootEntryItem(ModItems.MITHRIL_LEGS, 2, 0, new LootFunction[0], new LootCondition[0], "ms:mithril_legs")); main.addEntry(new LootEntryItem(ModItems.MITHRIL_BOOTS, 3, 0, new LootFunction[0], new LootCondition[0], "ms:mithril_boots")); main.addEntry(new LootEntryItem(ModItems.MITHRIL_INGOT, 5, 0, new LootFunction[] {new SetCount(new LootCondition[0], new RandomValueRange(1, 7))}, new LootCondition[0], "ms:mithril_ingot")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_HELM, 2, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.5F)}, "ms:adamant_helm")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_BODY, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.5F)}, "ms:adamant_body")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_LEGS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.5F)}, "ms:adamant_legs")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_BOOTS, 2, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.5F)}, "ms:adamant_boots")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_INGOT, 3, 0, new LootFunction[] {new SetCount(new LootCondition[0], new RandomValueRange(1, 5))}, new LootCondition[0], "ms:adamant_ingot")); main.addEntry(new LootEntryItem(ModItems.RUNE_HELM, 2, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.125F)}, "ms:rune_helm")); main.addEntry(new LootEntryItem(ModItems.RUNE_BODY, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.125F)}, "ms:rune_body")); main.addEntry(new LootEntryItem(ModItems.RUNE_LEGS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.125F)}, "ms:rune_legs")); main.addEntry(new LootEntryItem(ModItems.RUNE_BOOTS, 2, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.125F)}, "ms:rune_boots")); main.addEntry(new LootEntryItem(ModItems.RUNE_INGOT, 3, 0, new LootFunction[] {new SetCount(new LootCondition[0], new RandomValueRange(1, 5))}, new LootCondition[] {new RandomChance(0.4F)}, "ms:rune_ingot")); main.addEntry(new LootEntryItem(ModItems.DRAGON_HELM, 2, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.02F)}, "ms:dragon_helm")); main.addEntry(new LootEntryItem(ModItems.DRAGON_BODY, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.02F)}, "ms:dragon_body")); main.addEntry(new LootEntryItem(ModItems.DRAGON_LEGS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.02F)}, "ms:dragon_legs")); main.addEntry(new LootEntryItem(ModItems.DRAGON_BOOTS, 2, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.02F)}, "ms:dragon_boots")); } } } //CHEST DESERT PYRAMID @SubscribeEvent public static void onLootTablesLoaded18(LootTableLoadEvent event) { if (event.getName().equals(LootTableList.CHESTS_DESERT_PYRAMID)) { final LootPool main = event.getTable().getPool("main"); if (main != null) { main.addEntry(new LootEntryItem(ModItems.MITHRIL_HELM, 3, 0, new LootFunction[0], new LootCondition[0], "ms:mithril_helm")); main.addEntry(new LootEntryItem(ModItems.MITHRIL_BODY, 2, 0, new LootFunction[0], new LootCondition[0], "ms:mithril_body")); main.addEntry(new LootEntryItem(ModItems.MITHRIL_LEGS, 2, 0, new LootFunction[0], new LootCondition[0], "ms:mithril_legs")); main.addEntry(new LootEntryItem(ModItems.MITHRIL_BOOTS, 3, 0, new LootFunction[0], new LootCondition[0], "ms:mithril_boots")); main.addEntry(new LootEntryItem(ModItems.MITHRIL_INGOT, 5, 0, new LootFunction[] {new SetCount(new LootCondition[0], new RandomValueRange(1, 7))}, new LootCondition[0], "ms:mithril_ingot")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_HELM, 2, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.5F)}, "ms:adamant_helm")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_BODY, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.5F)}, "ms:adamant_body")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_LEGS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.5F)}, "ms:adamant_legs")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_BOOTS, 2, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.5F)}, "ms:adamant_boots")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_INGOT, 3, 0, new LootFunction[] {new SetCount(new LootCondition[0], new RandomValueRange(1, 5))}, new LootCondition[0], "ms:adamant_ingot")); main.addEntry(new LootEntryItem(ModItems.RUNE_HELM, 2, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.125F)}, "ms:rune_helm")); main.addEntry(new LootEntryItem(ModItems.RUNE_BODY, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.125F)}, "ms:rune_body")); main.addEntry(new LootEntryItem(ModItems.RUNE_LEGS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.125F)}, "ms:rune_legs")); main.addEntry(new LootEntryItem(ModItems.RUNE_BOOTS, 2, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.125F)}, "ms:rune_boots")); main.addEntry(new LootEntryItem(ModItems.RUNE_INGOT, 3, 0, new LootFunction[] {new SetCount(new LootCondition[0], new RandomValueRange(1, 5))}, new LootCondition[] {new RandomChance(0.4F)}, "ms:rune_ingot")); main.addEntry(new LootEntryItem(ModItems.DRAGON_HELM, 2, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.02F)}, "ms:dragon_helm")); main.addEntry(new LootEntryItem(ModItems.DRAGON_BODY, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.02F)}, "ms:dragon_body")); main.addEntry(new LootEntryItem(ModItems.DRAGON_LEGS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.02F)}, "ms:dragon_legs")); main.addEntry(new LootEntryItem(ModItems.DRAGON_BOOTS, 2, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.02F)}, "ms:dragon_boots")); } } } //SPIDER @SubscribeEvent public static void onLootTablesLoaded19(LootTableLoadEvent event) { if (event.getName().equals(LootTableList.ENTITIES_SPIDER)) { final LootPool main = event.getTable().getPool("main"); if (main != null) { main.addEntry(new LootEntryItem(ModItems.MITHRIL_HELM, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.1F)}, "ms:mithril_helm")); main.addEntry(new LootEntryItem(ModItems.MITHRIL_BODY, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.05F)}, "ms:mithril_body")); main.addEntry(new LootEntryItem(ModItems.MITHRIL_LEGS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.05F)}, "ms:mithril_legs")); main.addEntry(new LootEntryItem(ModItems.MITHRIL_BOOTS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.1F)}, "ms:mithril_boots")); main.addEntry(new LootEntryItem(ModItems.MITHRIL_INGOT, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.4F)}, "ms:mithril_ingot")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_HELM, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.03F)}, "ms:adamant_helm")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_BODY, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.02F)}, "ms:adamant_body")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_LEGS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.02F)}, "ms:adamant_legs")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_BOOTS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.03F)}, "ms:adamant_boots")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_INGOT, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.12F)}, "ms:adamant_ingot")); main.addEntry(new LootEntryItem(ModItems.RUNE_HELM, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.008F)}, "ms:rune_helm")); } } } //CHEST STRONGHOLD LIBRARY @SubscribeEvent public static void onLootTablesLoaded20(LootTableLoadEvent event) { if (event.getName().equals(LootTableList.CHESTS_STRONGHOLD_LIBRARY)) { final LootPool main = event.getTable().getPool("main"); if (main != null) { main.addEntry(new LootEntryItem(ModItems.RUNE_HELM, 2, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.125F)}, "ms:rune_helm")); main.addEntry(new LootEntryItem(ModItems.RUNE_BODY, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.125F)}, "ms:rune_body")); main.addEntry(new LootEntryItem(ModItems.RUNE_LEGS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.125F)}, "ms:rune_legs")); main.addEntry(new LootEntryItem(ModItems.RUNE_BOOTS, 2, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.125F)}, "ms:rune_boots")); main.addEntry(new LootEntryItem(ModItems.RUNE_INGOT, 3, 0, new LootFunction[] {new SetCount(new LootCondition[0], new RandomValueRange(1, 5))}, new LootCondition[] {new RandomChance(0.4F)}, "ms:rune_ingot")); main.addEntry(new LootEntryItem(ModItems.DRAGON_HELM, 2, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.02F)}, "ms:dragon_helm")); main.addEntry(new LootEntryItem(ModItems.DRAGON_BODY, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.02F)}, "ms:dragon_body")); main.addEntry(new LootEntryItem(ModItems.DRAGON_LEGS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.02F)}, "ms:dragon_legs")); main.addEntry(new LootEntryItem(ModItems.DRAGON_BOOTS, 2, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.02F)}, "ms:dragon_boots")); } } } //MAGMA CUBE @SubscribeEvent public static void onLootTablesLoaded21(LootTableLoadEvent event) { if (event.getName().equals(LootTableList.ENTITIES_MAGMA_CUBE)) { final LootPool main = event.getTable().getPool("main"); if (main != null) { main.addEntry(new LootEntryItem(ModItems.RUNE_HELM, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.05F)}, "ms:rune_helm")); main.addEntry(new LootEntryItem(ModItems.RUNE_BODY, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.03F)}, "ms:rune_body")); main.addEntry(new LootEntryItem(ModItems.RUNE_LEGS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.03F)}, "ms:rune_legs")); main.addEntry(new LootEntryItem(ModItems.RUNE_BOOTS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.05F)}, "ms:rune_boots")); main.addEntry(new LootEntryItem(ModItems.RUNE_INGOT, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.2F)}, "ms:rune_ingot")); main.addEntry(new LootEntryItem(ModItems.DRAGON_HELM, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.005F)}, "ms:dragon_helm")); main.addEntry(new LootEntryItem(ModItems.DRAGON_BODY, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.002F)}, "ms:dragon_helm")); main.addEntry(new LootEntryItem(ModItems.DRAGON_LEGS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.002F)}, "ms:dragon_helm")); main.addEntry(new LootEntryItem(ModItems.DRAGON_BOOTS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.005F)}, "ms:dragon_helm")); } } } //ZOMBIE PIGMAN @SubscribeEvent public static void onLootTablesLoaded22(LootTableLoadEvent event) { if (event.getName().equals(LootTableList.ENTITIES_ZOMBIE_PIGMAN)) { final LootPool main = event.getTable().getPool("main"); if (main != null) { main.addEntry(new LootEntryItem(ModItems.MITHRIL_HELM, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.1F)}, "ms:mithril_helm")); main.addEntry(new LootEntryItem(ModItems.MITHRIL_BODY, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.05F)}, "ms:mithril_body")); main.addEntry(new LootEntryItem(ModItems.MITHRIL_LEGS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.05F)}, "ms:mithril_legs")); main.addEntry(new LootEntryItem(ModItems.MITHRIL_BOOTS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.1F)}, "ms:mithril_boots")); main.addEntry(new LootEntryItem(ModItems.MITHRIL_INGOT, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.4F)}, "ms:mithril_ingot")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_HELM, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.03F)}, "ms:adamant_helm")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_BODY, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.02F)}, "ms:adamant_body")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_LEGS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.02F)}, "ms:adamant_legs")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_BOOTS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.03F)}, "ms:adamant_boots")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_INGOT, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.12F)}, "ms:adamant_ingot")); main.addEntry(new LootEntryItem(ModItems.RUNE_HELM, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.01F)}, "ms:rune_helm")); main.addEntry(new LootEntryItem(ModItems.RUNE_BODY, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.005F)}, "ms:rune_body")); main.addEntry(new LootEntryItem(ModItems.RUNE_LEGS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.005F)}, "ms:rune_legs")); main.addEntry(new LootEntryItem(ModItems.RUNE_BOOTS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.01F)}, "ms:rune_boots")); main.addEntry(new LootEntryItem(ModItems.RUNE_INGOT, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.04F)}, "ms:rune_ingot")); main.addEntry(new LootEntryItem(ModItems.DRAGON_HELM, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.001F)}, "ms:dragon_helm")); main.addEntry(new LootEntryItem(ModItems.DRAGON_BODY, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.0005F)}, "ms:dragon_body")); main.addEntry(new LootEntryItem(ModItems.DRAGON_LEGS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.0005F)}, "ms:dragon_legs")); main.addEntry(new LootEntryItem(ModItems.DRAGON_BOOTS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.001F)}, "ms:dragon_boots")); } } } //CHEST END CITY TREASURE @SubscribeEvent public static void onLootTablesLoaded23(LootTableLoadEvent event) { if (event.getName().equals(LootTableList.CHESTS_END_CITY_TREASURE)) { final LootPool main = event.getTable().getPool("main"); if (main != null) { main.addEntry(new LootEntryItem(ModItems.MITHRIL_HELM, 10, 0, new LootFunction[0], new LootCondition[0], "ms:mithril_helm")); main.addEntry(new LootEntryItem(ModItems.MITHRIL_BODY, 8, 0, new LootFunction[0], new LootCondition[0], "ms:mithril_body")); main.addEntry(new LootEntryItem(ModItems.MITHRIL_LEGS, 8, 0, new LootFunction[0], new LootCondition[0], "ms:mithril_legs")); main.addEntry(new LootEntryItem(ModItems.MITHRIL_BOOTS, 10, 0, new LootFunction[0], new LootCondition[0], "ms:mithril_boots")); main.addEntry(new LootEntryItem(ModItems.MITHRIL_INGOT, 20, 0, new LootFunction[] {new SetCount(new LootCondition[0], new RandomValueRange(1, 7))}, new LootCondition[0], "ms:mithril_ingot")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_HELM, 6, 0, new LootFunction[0], new LootCondition[0], "ms:adamant_helm")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_BODY, 5, 0, new LootFunction[0], new LootCondition[0], "ms:adamant_body")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_LEGS, 5, 0, new LootFunction[0], new LootCondition[0], "ms:adamant_legs")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_BOOTS, 6, 0, new LootFunction[0], new LootCondition[0], "ms:adamant_boots")); main.addEntry(new LootEntryItem(ModItems.ADAMANT_INGOT, 10, 0, new LootFunction[] {new SetCount(new LootCondition[0], new RandomValueRange(1, 5))}, new LootCondition[0], "ms:adamant_ingot")); main.addEntry(new LootEntryItem(ModItems.RUNE_HELM, 6, 0, new LootFunction[0], new LootCondition[0], "ms:rune_helm")); main.addEntry(new LootEntryItem(ModItems.RUNE_BODY, 5, 0, new LootFunction[0], new LootCondition[0], "ms:rune_body")); main.addEntry(new LootEntryItem(ModItems.RUNE_LEGS, 5, 0, new LootFunction[0], new LootCondition[0], "ms:rune_legs")); main.addEntry(new LootEntryItem(ModItems.RUNE_BOOTS, 6, 0, new LootFunction[0], new LootCondition[0], "ms:rune_boots")); main.addEntry(new LootEntryItem(ModItems.RUNE_INGOT, 8, 0, new LootFunction[] {new SetCount(new LootCondition[0], new RandomValueRange(1, 5))}, new LootCondition[] {new RandomChance(0.4F)}, "ms:rune_ingot")); main.addEntry(new LootEntryItem(ModItems.DRAGON_HELM, 2, 0, new LootFunction[0], new LootCondition[0], "ms:dragon_helm")); main.addEntry(new LootEntryItem(ModItems.DRAGON_BODY, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.33F)}, "ms:dragon_body")); main.addEntry(new LootEntryItem(ModItems.DRAGON_LEGS, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.33F)}, "ms:dragon_legs")); main.addEntry(new LootEntryItem(ModItems.DRAGON_BOOTS, 2, 0, new LootFunction[0], new LootCondition[0], "ms:dragon_boots")); main.addEntry(new LootEntryItem(ModItems.DRAGON_SWORD, 1, 0, new LootFunction[0], new LootCondition[0], "ms:dragon_sword")); main.addEntry(new LootEntryItem(ModItems.DRAGON_AXE, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.22F)}, "ms:dragon_axe")); main.addEntry(new LootEntryItem(ModItems.DRAGON_PICKAXE, 1, 0, new LootFunction[0], new LootCondition[] {new RandomChance(0.22F)}, "ms:dragon_pickaxe")); } } } } Edited April 14, 2018 by supreme marshal 1 Quote
Draco18s Posted April 14, 2018 Posted April 14, 2018 Eh. Quote 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.
supreme marshal Posted April 14, 2018 Author Posted April 14, 2018 2 minutes ago, Draco18s said: Eh. Lol nice. But you have many years ahead of me, I started modding this week. Give me some chances hehe. Quote
Choonster Posted April 14, 2018 Posted April 14, 2018 It's probably worth noting that you can use LootEntryTable to generate loot from another loot table. Quote Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.
Draco18s Posted April 14, 2018 Posted April 14, 2018 24 minutes ago, Choonster said: It's probably worth noting that you can use LootEntryTable to generate loot from another loot table. That is helpful to know. Quote 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.
supreme marshal Posted April 14, 2018 Author Posted April 14, 2018 8 hours ago, Choonster said: It's probably worth noting that you can use LootEntryTable to generate loot from another loot table. I'm not too sure how to use the LootEntryTable given the information I got from Google. It seem more complicated to manipulate. Quote
Recommended Posts
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.