Gone fishin' 🐟🐠🐡
Add spell books and ruined spell books to treasure and junk fishing loot respectively
This commit is contained in:
@@ -67,6 +67,8 @@ public final class WizardryLoot {
|
|||||||
LootTableList.register(new ResourceLocation(Wizardry.MODID, "subsets/epic_artefacts"));
|
LootTableList.register(new ResourceLocation(Wizardry.MODID, "subsets/epic_artefacts"));
|
||||||
LootTableList.register(new ResourceLocation(Wizardry.MODID, "entities/evil_wizard"));
|
LootTableList.register(new ResourceLocation(Wizardry.MODID, "entities/evil_wizard"));
|
||||||
LootTableList.register(new ResourceLocation(Wizardry.MODID, "entities/mob_additions"));
|
LootTableList.register(new ResourceLocation(Wizardry.MODID, "entities/mob_additions"));
|
||||||
|
LootTableList.register(new ResourceLocation(Wizardry.MODID, "gameplay/fishing/junk_additions"));
|
||||||
|
LootTableList.register(new ResourceLocation(Wizardry.MODID, "gameplay/fishing/treasure_additions"));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -100,6 +102,15 @@ public final class WizardryLoot {
|
|||||||
event.getTable().addPool(getAdditive(Wizardry.MODID + ":entities/mob_additions", Wizardry.MODID + "_additional_mob_drops"));
|
event.getTable().addPool(getAdditive(Wizardry.MODID + ":entities/mob_additions", Wizardry.MODID + "_additional_mob_drops"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Fishing loot
|
||||||
|
// This works slightly differently in that it modifies the existing pools rather than adding new ones
|
||||||
|
// This is because you are supposed to only catch one item at a time!
|
||||||
|
if(event.getName().toString().matches("minecraft:gameplay/fishing/junk")){
|
||||||
|
// The first (and in this case, only) vanilla loot pool is named "main"
|
||||||
|
event.getTable().getPool("main").addEntry(getAdditiveEntry(Wizardry.MODID + ":gameplay/fishing/junk_additions", 2));
|
||||||
|
}else if(event.getName().toString().matches("minecraft:gameplay/fishing/treasure")){
|
||||||
|
event.getTable().getPool("main").addEntry(getAdditiveEntry(Wizardry.MODID + ":gameplay/fishing/treasure_additions", 1));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static LootPool getAdditive(String entryName, String poolName){
|
private static LootPool getAdditive(String entryName, String poolName){
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"pools": [
|
||||||
|
{
|
||||||
|
"name": "wizardry",
|
||||||
|
"rolls": 1,
|
||||||
|
"entries": [
|
||||||
|
{
|
||||||
|
"type": "item",
|
||||||
|
"name": "ebwizardry:ruined_spell_book",
|
||||||
|
"weight": 1
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
+21
@@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"pools": [
|
||||||
|
{
|
||||||
|
"name": "wizardry",
|
||||||
|
"rolls": 1,
|
||||||
|
"entries": [
|
||||||
|
{
|
||||||
|
"type": "item",
|
||||||
|
"name": "ebwizardry:spell_book",
|
||||||
|
"weight": 1,
|
||||||
|
"functions": [
|
||||||
|
{
|
||||||
|
"function": "ebwizardry:random_spell",
|
||||||
|
"undiscovered_bias": 0.3
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user