add first patch
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
console.info("[SOCIETY] adventurerLoot.js loaded");
|
||||
|
||||
LootJS.modifiers((e) => {
|
||||
e.addLootTypeModifier(LootType.CHEST)
|
||||
.hasAnyStage("relic_hunter")
|
||||
.pool((p) => {
|
||||
p.randomChance(0.10).addLoot("society:relic_trove");
|
||||
});
|
||||
e.addLootTypeModifier(LootType.CHEST)
|
||||
.hasAnyStage("artifact_hunter")
|
||||
.pool((p) => {
|
||||
p.randomChance(0.10).addLoot("society:artifact_trove");
|
||||
});
|
||||
e.addLootTypeModifier(LootType.CHEST)
|
||||
.hasAnyStage("prismatic_realm")
|
||||
.pool((p) => {
|
||||
p.randomChance(0.05).addLoot("society:prismatic_shard");
|
||||
});
|
||||
|
||||
});
|
||||
@@ -0,0 +1,104 @@
|
||||
console.info("[SOCIETY] farmingLoot.js loaded");
|
||||
|
||||
// TODO: "vintagedelight:gearo_berry_bush"
|
||||
const cropCollectorDenied = [
|
||||
"pamhc2trees:pamapple",
|
||||
"pamhc2trees:pamcherry",
|
||||
"pamhc2trees:pamorange",
|
||||
"pamhc2trees:pampeach",
|
||||
"pamhc2trees:pamplum",
|
||||
"pamhc2trees:pamhazelnut",
|
||||
"pamhc2trees:pampawpaw",
|
||||
"pamhc2trees:pambanana",
|
||||
"pamhc2trees:pamcinnamon",
|
||||
"pamhc2trees:pamdragonfruit",
|
||||
"pamhc2trees:pammango",
|
||||
"pamhc2trees:pamstarfruit",
|
||||
"pamhc2trees:pamlychee",
|
||||
"pamhc2trees:pamlemon",
|
||||
"pamhc2trees:pampassionfruit",
|
||||
];
|
||||
const checkMaxGrown = (destroyedBlock) => {
|
||||
return destroyedBlock.blockState.block.isMaxAge(destroyedBlock.blockState);
|
||||
};
|
||||
|
||||
const checkMaxGrownWithChance = (destroyedBlock, chance) => {
|
||||
return chance > Math.random() && checkMaxGrown(destroyedBlock);
|
||||
};
|
||||
|
||||
LootJS.modifiers((e) => {
|
||||
e.addBlockLootModifier(global.cropList).apply((c) => {
|
||||
c.forEachLoot((item) => {
|
||||
const quality = global.getCropQuality(c.destroyedBlock);
|
||||
if (quality > 0)
|
||||
item.setNbt(`{quality_food:{effects:[],quality:${quality}}}`);
|
||||
});
|
||||
});
|
||||
e.addBlockLootModifier(global.cropList)
|
||||
.hasAnyStage("sticky_crops")
|
||||
.apply((c) => {
|
||||
if (checkMaxGrownWithChance(c.destroyedBlock, 0.02)) {
|
||||
c.addLoot("society:pine_tar");
|
||||
}
|
||||
});
|
||||
e.addBlockLootModifier(global.cropList)
|
||||
.hasAnyStage("soil_inspector")
|
||||
.apply((c) => {
|
||||
if (checkMaxGrownWithChance(c.destroyedBlock, 0.05)) {
|
||||
c.addLoot("farm_and_charm:fertilizer");
|
||||
}
|
||||
});
|
||||
e.addBlockLootModifier(global.cropList)
|
||||
.randomChance(0.25)
|
||||
.customCondition({
|
||||
condition: "minecraft:location_check",
|
||||
offsetY: -1,
|
||||
predicate: {
|
||||
block: {
|
||||
blocks: ["dew_drop_farmland_growth:bountiful_fertilized_farmland"],
|
||||
},
|
||||
},
|
||||
})
|
||||
.modifyLoot(Ingredient.all, (itemStack) => {
|
||||
itemStack.setCount(itemStack.getCount() + 1);
|
||||
return itemStack;
|
||||
});
|
||||
|
||||
e.addBlockLootModifier(global.cropList)
|
||||
.hasAnyStage("paradise_crop")
|
||||
.modifyLoot(Ingredient.all, (itemStack) => {
|
||||
if (!cropCollectorDenied.includes(itemStack.id))
|
||||
itemStack.setCount(itemStack.getCount() + 1);
|
||||
return itemStack;
|
||||
});
|
||||
e.addBlockLootModifier(global.cropList)
|
||||
.hasAnyStage("crop_collector")
|
||||
.modifyLoot(Ingredient.all, (itemStack) => {
|
||||
if (!cropCollectorDenied.includes(itemStack.id))
|
||||
itemStack.setCount(itemStack.getCount() * 2);
|
||||
return itemStack;
|
||||
});
|
||||
|
||||
// Mastery
|
||||
e.addBlockLootModifier(global.cropList)
|
||||
.hasAnyStage("husbandry_mastery")
|
||||
.apply((c) => {
|
||||
if (checkMaxGrownWithChance(c.destroyedBlock, 0.005)) {
|
||||
c.addLoot("society:plushie_capsule");
|
||||
}
|
||||
});
|
||||
e.addBlockLootModifier(global.cropList)
|
||||
.hasAnyStage("husbandry_mastery")
|
||||
.apply((c) => {
|
||||
if (checkMaxGrownWithChance(c.destroyedBlock, 0.003)) {
|
||||
c.addLoot("society:animal_cracker");
|
||||
}
|
||||
});
|
||||
e.addBlockLootModifier(global.cropList)
|
||||
.hasAnyStage("farming_mastery")
|
||||
.apply((c) => {
|
||||
if (checkMaxGrownWithChance(c.destroyedBlock, 0.005)) {
|
||||
c.addLoot("atmospheric:grimwood_sapling");
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,133 @@
|
||||
console.info("[SOCIETY] fishingLoot.js loaded");
|
||||
|
||||
LootJS.modifiers((e) => {
|
||||
// Has any stage check is to prevent jellies from being fished up from Crab Traps. Yeah it's weird.
|
||||
e.addLootTypeModifier(LootType.FISHING)
|
||||
.hasAnyStage("starting_items_4_1")
|
||||
.anyBiome("#minecraft:is_ocean", "#minecraft:is_beach")
|
||||
.pool((p) => {
|
||||
p.randomChance(0.1).addLoot("society:ocean_jelly");
|
||||
});
|
||||
e.addLootTypeModifier(LootType.FISHING)
|
||||
.hasAnyStage("wooden_pollution")
|
||||
.anyBiome("#minecraft:is_ocean", "#minecraft:is_beach")
|
||||
.pool((p) => {
|
||||
p.randomChance(0.1).addLoot("society:ocean_jelly");
|
||||
});
|
||||
|
||||
e.addLootTypeModifier(LootType.FISHING)
|
||||
.hasAnyStage("starting_items_4_1")
|
||||
.anyBiome("#minecraft:is_river")
|
||||
.pool((p) => {
|
||||
p.randomChance(0.1).addLoot("society:river_jelly");
|
||||
});
|
||||
|
||||
e.addLootTypeModifier(LootType.FISHING)
|
||||
.hasAnyStage("wooden_pollution")
|
||||
.anyBiome("#minecraft:is_river")
|
||||
.pool((p) => {
|
||||
p.randomChance(0.1).addLoot("society:river_jelly");
|
||||
});
|
||||
|
||||
e.addLootTypeModifier(LootType.FISHING)
|
||||
.hasAnyStage("wooden_pollution")
|
||||
.pool((p) => {
|
||||
p.randomChance(0.1).addLoot("society:furniture_box");
|
||||
});
|
||||
e.addLootTypeModifier(LootType.FISHING)
|
||||
.hasAnyStage("frozen_treasure")
|
||||
.playerPredicate((p) => global.getSeasonFromLevel(p.level) === "winter")
|
||||
.pool((p) => {
|
||||
p.randomChance(0.45).addLoot("aquaculture:treasure_chest");
|
||||
});
|
||||
|
||||
e.addLootTypeModifier(LootType.FISHING)
|
||||
.playerPredicate((p) =>
|
||||
p.getHeldItem("main_hand").nbt.Inventory
|
||||
? p
|
||||
.getHeldItem("main_hand")
|
||||
.nbt.Inventory.Items.toString()
|
||||
.contains("aquaculture:iron_hook")
|
||||
: false
|
||||
)
|
||||
.pool((p) => {
|
||||
p.randomChance(0.5).addLoot("crabbersdelight:crab_trap_bait");
|
||||
p.limitCount([4, 16]);
|
||||
});
|
||||
|
||||
e.addLootTypeModifier(LootType.FISHING)
|
||||
.playerPredicate((p) =>
|
||||
p.getHeldItem("main_hand").nbt.Inventory
|
||||
? p
|
||||
.getHeldItem("main_hand")
|
||||
.nbt.Inventory.Items.toString()
|
||||
.contains("aquaculture:diamond_hook")
|
||||
: false
|
||||
)
|
||||
.pool((p) => {
|
||||
p.randomChance(0.25).addLoot("crabbersdelight:deluxe_crab_trap_bait");
|
||||
p.limitCount([1, 4]);
|
||||
});
|
||||
|
||||
e.addLootTypeModifier(LootType.FISHING)
|
||||
.anyBiome("#minecraft:is_ocean", "#minecraft:is_beach")
|
||||
.playerPredicate((p) =>
|
||||
p.getHeldItem("main_hand").nbt.Inventory
|
||||
? p
|
||||
.getHeldItem("main_hand")
|
||||
.nbt.Inventory.Items.toString()
|
||||
.contains("aquaculture:redstone_hook")
|
||||
: false
|
||||
)
|
||||
.pool((p) => {
|
||||
p.randomChance(0.1).addLoot("society:ocean_jelly");
|
||||
p.limitCount([1, 2]);
|
||||
});
|
||||
|
||||
e.addLootTypeModifier(LootType.FISHING)
|
||||
.anyBiome("#minecraft:is_river")
|
||||
.playerPredicate((p) =>
|
||||
p.getHeldItem("main_hand").nbt.Inventory
|
||||
? p
|
||||
.getHeldItem("main_hand")
|
||||
.nbt.Inventory.Items.toString()
|
||||
.contains("aquaculture:redstone_hook")
|
||||
: false
|
||||
)
|
||||
.pool((p) => {
|
||||
p.randomChance(0.1).addLoot("society:river_jelly");
|
||||
p.limitCount([1, 2]);
|
||||
});
|
||||
|
||||
e.addLootTypeModifier(LootType.FISHING)
|
||||
.playerPredicate((p) =>
|
||||
p.getHeldItem("main_hand").nbt.Inventory
|
||||
? p
|
||||
.getHeldItem("main_hand")
|
||||
.nbt.Inventory.Items.toString()
|
||||
.contains("aquaculture:nether_star_hook")
|
||||
: false
|
||||
)
|
||||
.pool((p) => {
|
||||
p.randomChance(0.04).addLoot("society:relic_trove");
|
||||
p.limitCount([1, 1]);
|
||||
});
|
||||
e.addBlockLootModifier("aquaculture:neptunes_bounty")
|
||||
.hasAnyStage("prismatic_bounty")
|
||||
.not((n) =>
|
||||
n.matchMainHand(ItemFilter.hasEnchantment("minecraft:silk_touch"))
|
||||
)
|
||||
.replaceLoot(
|
||||
"aquaculture:neptunes_bounty",
|
||||
"society:prismatic_shard",
|
||||
true
|
||||
);
|
||||
|
||||
// Mastery
|
||||
e.addLootTypeModifier(LootType.FISHING)
|
||||
.hasAnyStage("husbandry_mastery")
|
||||
.pool((p) => {
|
||||
p.randomChance(0.01).addLoot("society:animal_cracker");
|
||||
p.randomChance(0.05).addLoot("society:plushie_capsule");
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,328 @@
|
||||
console.info("[SOCIETY] generalLoot.js loaded");
|
||||
|
||||
const fixedStackSize = (itemStack) => {
|
||||
if (itemStack.maxStackSize == 1) {
|
||||
itemStack.setCount(1);
|
||||
return itemStack;
|
||||
}
|
||||
return itemStack;
|
||||
};
|
||||
LootJS.modifiers((e) => {
|
||||
// Entities
|
||||
e.addLootTableModifier("rottencreatures:entities/zap")
|
||||
.randomChance(0.03)
|
||||
.addLoot("society:glitched_vhs");
|
||||
e.addLootTableModifier("minecraft:entities/witch")
|
||||
.randomChance(0.1)
|
||||
.addLoot("society:holy_symbol");
|
||||
e.addLootTableModifier("minecraft:entities/shulker")
|
||||
.randomChance(0.1)
|
||||
.addLoot("society:production_science_pack");
|
||||
e.addLootTableModifier("minecraft:entities/blaze")
|
||||
.randomChance(0.05)
|
||||
.addLoot("society:ember_crystal_cluster");
|
||||
e.addLootTableModifier("minecraft:entities/spider")
|
||||
.randomChance(0.05)
|
||||
.addLoot("society:spider_silk");
|
||||
e.addLootTableModifier("minecraft:entities/creeper")
|
||||
.randomChance(0.05)
|
||||
.addLoot("society:green_tea_honeycomb");
|
||||
e.addLootTableModifier("legendarycreatures:entities/corpse_eater")
|
||||
.randomChance(0.05)
|
||||
.addLoot("society:wheel_of_adaptation");
|
||||
e.addLootTableModifier("minecraft:entities/wither")
|
||||
.randomChance(0.8)
|
||||
.addLoot("society:amulet_of_light");
|
||||
e.addLootTableModifier("minecraft:entities/enderman")
|
||||
.randomChance(0.05)
|
||||
.addLoot("minecraft:eye_armor_trim_smithing_template");
|
||||
e.addLootTableModifier("minecraft:entities/pig")
|
||||
.randomChance(0.05)
|
||||
.addLoot("society:living_flesh");
|
||||
e.addLootTableModifier("minecraft:entities/hoglin").replaceLoot(
|
||||
"*",
|
||||
"minecraft:rotten_flesh",
|
||||
true
|
||||
);
|
||||
// Chest Loot tables
|
||||
e.addLootTableModifier("minecraft:chests/simple_dungeon")
|
||||
.randomChance(0.3)
|
||||
.addLoot("numismatics:bevel")
|
||||
.limitCount([1, 4], [5, 9]);
|
||||
e.addLootTableModifier("minecraft:chests/simple_dungeon")
|
||||
.randomChance(0.1)
|
||||
.addLoot("society:source_gem");
|
||||
e.addLootTableModifier("minecraft:chests/abandoned_mineshaft")
|
||||
.randomChance(0.2)
|
||||
.addLoot("numismatics:bevel")
|
||||
.limitCount([1, 4], [5, 9]);
|
||||
e.addLootTableModifier("minecraft:chests/abandoned_mineshaft")
|
||||
.randomChance(0.2)
|
||||
.addLoot(
|
||||
Item.of(
|
||||
"splendid_slimes:slime_heart",
|
||||
'{slime:{id:"splendid_slimes:webby"}}'
|
||||
)
|
||||
);
|
||||
e.addLootTableModifier("minecraft:chests/simple_dungeon")
|
||||
.randomChance(0.1)
|
||||
.addLoot(
|
||||
Item.of(
|
||||
"splendid_slimes:slime_heart",
|
||||
'{slime:{id:"splendid_slimes:webby"}}'
|
||||
)
|
||||
);
|
||||
e.addLootTableModifier("minecraft:chests/buried_treasure")
|
||||
.randomChance(0.9)
|
||||
.addLoot("numismatics:cog")
|
||||
.limitCount([1, 4], [5, 9]);
|
||||
e.addLootTableModifier("minecraft:chests/buried_treasure")
|
||||
.randomChance(1)
|
||||
.addLoot("numismatics:crown")
|
||||
.limitCount([1, 2]);
|
||||
e.addLootTableModifier("minecraft:chests/underwater_ruin_small")
|
||||
.randomChance(0.5)
|
||||
.addLoot("numismatics:cog")
|
||||
.limitCount([1, 4], [5, 9]);
|
||||
e.addLootTableModifier("minecraft:chests/underwater_ruin_small")
|
||||
.randomChance(0.2)
|
||||
.addLoot("numismatics:cog")
|
||||
.limitCount([1, 2]);
|
||||
e.addLootTableModifier("minecraft:chests/underwater_ruin_big")
|
||||
.randomChance(0.6)
|
||||
.addLoot("numismatics:cog")
|
||||
.limitCount([1, 4], [5, 9]);
|
||||
e.addLootTableModifier("minecraft:chests/underwater_ruin_big")
|
||||
.randomChance(0.3)
|
||||
.addLoot("numismatics:cog")
|
||||
.limitCount([1, 2]);
|
||||
e.addLootTableModifier("minecraft:chests/shipwreck_supply")
|
||||
.randomChance(0.5)
|
||||
.addLoot("numismatics:bevel")
|
||||
.limitCount([1, 4], [5, 9]);
|
||||
e.addLootTableModifier("minecraft:chests/shipwreck_supply")
|
||||
.randomChance(0.1)
|
||||
.addLoot("numismatics:sprocket")
|
||||
.limitCount([1, 2]);
|
||||
e.addLootTableModifier("minecraft:chests/shipwreck_treasure")
|
||||
.randomChance(0.9)
|
||||
.addLoot("numismatics:bevel")
|
||||
.limitCount([1, 4], [5, 9]);
|
||||
e.addLootTableModifier("minecraft:chests/shipwreck_treasure")
|
||||
.randomChance(0.4)
|
||||
.addLoot("numismatics:cog")
|
||||
.limitCount([1, 2]);
|
||||
e.addLootTableModifier("minecraft:chests/woodland_mansion")
|
||||
.randomChance(0.2)
|
||||
.addLoot("numismatics:crown")
|
||||
.limitCount([1, 2]);
|
||||
e.addLootTableModifier("minecraft:chests/jungle_temple")
|
||||
.randomChance(0.3)
|
||||
.addLoot("numismatics:crown")
|
||||
.limitCount([1, 4], [5, 9]);
|
||||
e.addLootTableModifier("minecraft:chests/jungle_temple")
|
||||
.randomChance(0.1)
|
||||
.addLoot("numismatics:crown")
|
||||
.limitCount([1, 2]);
|
||||
e.addLootTableModifier("minecraft:chests/desert_pyramid")
|
||||
.randomChance(0.3)
|
||||
.addLoot("numismatics:crown")
|
||||
.limitCount([1, 4], [5, 9]);
|
||||
e.addLootTableModifier("minecraft:chests/desert_pyramid")
|
||||
.randomChance(0.1)
|
||||
.addLoot("numismatics:crown")
|
||||
.limitCount([1, 2]);
|
||||
e.addLootTableModifier("minecraft:chests/pillager_outpost")
|
||||
.randomChance(0.3)
|
||||
.addLoot("numismatics:cog")
|
||||
.limitCount([1, 4], [5, 9]);
|
||||
e.addLootTableModifier("minecraft:chests/ancient_city")
|
||||
.randomChance(0.6)
|
||||
.addLoot("numismatics:cog")
|
||||
.limitCount([1, 4], [5, 9]);
|
||||
e.addLootTableModifier("minecraft:chests/ancient_city")
|
||||
.randomChance(0.3)
|
||||
.addLoot("numismatics:crown")
|
||||
.limitCount([1, 2]);
|
||||
e.addLootTableModifier("minecraft:chests/ancient_city")
|
||||
.randomChance(0.2)
|
||||
.addLoot(
|
||||
Item.of(
|
||||
"splendid_slimes:slime_heart",
|
||||
'{slime:{id:"splendid_slimes:orby"}}'
|
||||
)
|
||||
);
|
||||
e.addLootTableModifier("minecraft:chests/ancient_city")
|
||||
.randomChance(0.2)
|
||||
.addLoot("numismatics:sun")
|
||||
.limitCount([1, 1]);
|
||||
e.addLootTableModifier("minecraft:chests/ruined_portal")
|
||||
.randomChance(0.7)
|
||||
.addLoot("numismatics:sprocket")
|
||||
.limitCount([1, 2]);
|
||||
e.addLootTableModifier("minecraft:chests/nether_bridge")
|
||||
.randomChance(0.3)
|
||||
.addLoot("numismatics:sprocket")
|
||||
.limitCount([1, 4], [5, 9]);
|
||||
e.addLootTableModifier("minecraft:chests/bastion_bridge")
|
||||
.randomChance(0.9)
|
||||
.addLoot("numismatics:sprocket")
|
||||
.limitCount([1, 4], [5, 9]);
|
||||
e.addLootTableModifier("minecraft:chests/bastion_hoglin_stable")
|
||||
.randomChance(0.3)
|
||||
.addLoot("numismatics:sprocket")
|
||||
.limitCount([1, 4], [5, 9]);
|
||||
e.addLootTableModifier("minecraft:chests/bastion_other")
|
||||
.randomChance(0.5)
|
||||
.addLoot("numismatics:sprocket")
|
||||
.limitCount([1, 4], [5, 9]);
|
||||
e.addLootTableModifier("minecraft:chests/bastion_treasure")
|
||||
.randomChance(0.6)
|
||||
.addLoot("numismatics:sprocket")
|
||||
.limitCount([1, 4], [5, 9]);
|
||||
e.addLootTableModifier("minecraft:chests/bastion_treasure")
|
||||
.randomChance(0.2)
|
||||
.addLoot(
|
||||
Item.of(
|
||||
"splendid_slimes:slime_heart",
|
||||
'{slime:{id:"splendid_slimes:blazing"}}'
|
||||
)
|
||||
);
|
||||
e.addLootTableModifier("minecraft:chests/bastion_treasure")
|
||||
.randomChance(0.6)
|
||||
.addLoot(
|
||||
Item.of(
|
||||
"splendid_slimes:slime_heart",
|
||||
'{slime:{id:"splendid_slimes:weeping"}}'
|
||||
)
|
||||
);
|
||||
e.addLootTableModifier("minecraft:chests/bastion_treasure").removeLoot(
|
||||
"minecraft:diamond_sword"
|
||||
);
|
||||
e.addLootTableModifier("minecraft:chests/bastion_treasure").removeLoot(
|
||||
"minecraft:diamond_helmet"
|
||||
);
|
||||
e.addLootTableModifier("minecraft:chests/bastion_treasure").removeLoot(
|
||||
"minecraft:diamond_chestplate"
|
||||
);
|
||||
e.addLootTableModifier("minecraft:chests/bastion_treasure").removeLoot(
|
||||
"minecraft:diamond_leggings"
|
||||
);
|
||||
e.addLootTableModifier("minecraft:chests/stronghold_corridor")
|
||||
.randomChance(0.9)
|
||||
.addLoot("numismatics:bevel")
|
||||
.limitCount([1, 4], [5, 9]);
|
||||
e.addLootTableModifier("minecraft:chests/stronghold_corridor")
|
||||
.randomChance(0.4)
|
||||
.addLoot("numismatics:sprocket")
|
||||
.limitCount([1, 2]);
|
||||
e.addLootTableModifier("minecraft:chests/stronghold_crossing")
|
||||
.randomChance(0.9)
|
||||
.addLoot("numismatics:bevel")
|
||||
.limitCount([1, 4], [5, 9]);
|
||||
e.addLootTableModifier("minecraft:chests/stronghold_crossing")
|
||||
.randomChance(0.4)
|
||||
.addLoot("numismatics:sprocket")
|
||||
.limitCount([1, 2]);
|
||||
e.addLootTableModifier("minecraft:chests/end_city_treasure")
|
||||
.randomChance(0.7)
|
||||
.addLoot("numismatics:sprocket")
|
||||
.limitCount([1, 4], [5, 9]);
|
||||
e.addLootTableModifier("minecraft:chests/end_city_treasure")
|
||||
.randomChance(0.4)
|
||||
.addLoot("numismatics:cog")
|
||||
.limitCount([1, 1]);
|
||||
e.addLootTableModifier("minecraft:chests/end_city_treasure")
|
||||
.randomChance(0.2)
|
||||
.addLoot("numismatics:cog")
|
||||
.limitCount([1, 1]);
|
||||
e.addLootTableModifier("minecraft:chests/end_city_treasure")
|
||||
.randomChance(0.2)
|
||||
.addLoot(
|
||||
Item.of(
|
||||
"splendid_slimes:slime_heart",
|
||||
'{slime:{id:"splendid_slimes:shulking"}}'
|
||||
)
|
||||
);
|
||||
e.addLootTableModifier("minecraft:chests/end_city_treasure")
|
||||
.randomChance(0.2)
|
||||
.addLoot(
|
||||
Item.of(
|
||||
"splendid_slimes:slime_heart",
|
||||
'{slime:{id:"splendid_slimes:ender"}}'
|
||||
)
|
||||
);
|
||||
|
||||
// Seeds
|
||||
e.addBlockLootModifier("minecraft:grass").removeLoot("#forge:seeds");
|
||||
e.addBlockLootModifier("minecraft:tall_grass").removeLoot("#forge:seeds");
|
||||
e.addBlockLootModifier("minecraft:fern").removeLoot("#forge:seeds");
|
||||
e.addBlockLootModifier("minecraft:tall_fern").removeLoot("#forge:seeds");
|
||||
|
||||
// Artisan Machines that save nbt on drop
|
||||
e.addBlockLootModifier("society:prize_machine").removeLoot(
|
||||
"society:prize_machine"
|
||||
);
|
||||
e.addBlockLootModifier("society:villager_home").removeLoot(
|
||||
"society:villager_home"
|
||||
);
|
||||
e.addBlockLootModifier("whimsy_deco:sunlit_singing_frog").removeLoot(
|
||||
"whimsy_deco:sunlit_singing_frog"
|
||||
);
|
||||
e.addBlockLootModifier("society:fish_pond").removeLoot("society:fish_pond");
|
||||
e.addBlockLootModifier("shippingbin:basic_shipping_bin").removeLoot(
|
||||
"shippingbin:basic_shipping_bin"
|
||||
);
|
||||
e.addBlockLootModifier("shippingbin:smart_shipping_bin").removeLoot(
|
||||
"shippingbin:smart_shipping_bin"
|
||||
);
|
||||
e.addBlockLootModifier("society:mana_fruit_crop").removeLoot(
|
||||
"society:mana_fruit_crop"
|
||||
);
|
||||
|
||||
e.addBlockLootModifier(global.plushies).removeLoot("*");
|
||||
|
||||
// Replace Loot
|
||||
e.addLootTableModifier("minecraft:chests/pillager_outpost")
|
||||
.randomChance(0.65)
|
||||
.replaceLoot("etcetera:eggple", "numismatics:cog", true);
|
||||
e.addLootTableModifier("minecraft:chests/village/village_plains_house")
|
||||
.randomChance(0.85)
|
||||
.replaceLoot("etcetera:eggple", "numismatics:cog", true);
|
||||
e.addLootTableModifier("minecraft:chests/bastion_treasure")
|
||||
.randomChance(0.85)
|
||||
.replaceLoot("etcetera:golden_eggple", "numismatics:crown", true);
|
||||
e.addLootTableModifier("minecraft:chests/bastion_treasure")
|
||||
.randomChance(0.85)
|
||||
.replaceLoot("etcetera:golden_eggple", "numismatics:crown", true);
|
||||
e.addLootTableModifier("minecraft:chests/ruined_portal")
|
||||
.randomChance(1)
|
||||
.replaceLoot("minecraft:flint_and_steel", "numismatics:cog", true);
|
||||
|
||||
// Fix unstackable item voiding bug
|
||||
e.addLootTypeModifier(LootType.CHEST).modifyLoot(
|
||||
Ingredient.all,
|
||||
(itemStack) => {
|
||||
return fixedStackSize(itemStack);
|
||||
}
|
||||
);
|
||||
|
||||
e.addLootTypeModifier(LootType.CHEST).pool((p) => {
|
||||
p.randomChance(0.05).addLoot("society:recall_potion");
|
||||
});
|
||||
e.addLootTableModifier("minecraft:chests/simple_dungeon").replaceLoot("cluttered:willow_sapling", "numismatics:cog", true);
|
||||
e.addLootTableModifier("minecraft:chests/spawn_bonus_chest").replaceLoot("cluttered:willow_sapling", "numismatics:cog", true);
|
||||
e.addLootTableModifier("minecraft:chests/abandoned_mineshaft").replaceLoot("cluttered:willow_sapling", "numismatics:cog", true);
|
||||
e.addLootTableModifier("minecraft:chests/shipwreck_supply").replaceLoot("cluttered:willow_sapling", "numismatics:cog", true);
|
||||
e.addLootTableModifier("minecraft:chests/village/village_plains_house").replaceLoot("cluttered:willow_sapling", "numismatics:cog", true);
|
||||
e.addLootTableModifier("minecraft:chests/village/village_taiga_house").replaceLoot("cluttered:willow_sapling", "numismatics:cog", true);
|
||||
e.addLootTableModifier("minecraft:chests/village/village_desert_house").replaceLoot("cluttered:willow_sapling", "numismatics:cog", true);
|
||||
e.addLootTableModifier("minecraft:chests/village/village_snowy_house").replaceLoot("cluttered:willow_sapling", "numismatics:cog", true);
|
||||
// Mastery
|
||||
e.addLootTypeModifier(LootType.CHEST)
|
||||
.hasAnyStage("husbandry_mastery")
|
||||
.pool((p) => {
|
||||
p.randomChance(0.1).addLoot("society:plushie_capsule");
|
||||
p.randomChance(0.05).addLoot("society:animal_cracker");
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1 @@
|
||||
// DEPRECATED
|
||||
@@ -0,0 +1,554 @@
|
||||
console.info("[SOCIETY] miningLoot.js loaded");
|
||||
|
||||
const overworldOres = [
|
||||
"meadow:alpine_diamond_ore",
|
||||
"meadow:alpine_salt_ore",
|
||||
"meadow:alpine_redstone_ore",
|
||||
"meadow:alpine_coal_ore",
|
||||
"meadow:alpine_lapis_ore",
|
||||
"meadow:alpine_gold_ore",
|
||||
"meadow:alpine_iron_ore",
|
||||
"meadow:alpine_copper_ore",
|
||||
"minecraft:deepslate_gold_ore",
|
||||
"minecraft:gold_ore",
|
||||
"minecraft:deepslate_copper_ore",
|
||||
"minecraft:copper_ore",
|
||||
"minecraft:deepslate_iron_ore",
|
||||
"minecraft:iron_ore",
|
||||
"minecraft:deepslate_coal_ore",
|
||||
"minecraft:coal_ore",
|
||||
"minecraft:redstone_ore",
|
||||
"minecraft:deepslate_diamond_ore",
|
||||
"minecraft:diamond_ore",
|
||||
"minecraft:deepslate_lapis_ore",
|
||||
"minecraft:lapis_ore",
|
||||
"create:deepslate_zinc_ore",
|
||||
"create:zinc_ore",
|
||||
"minecraft:deepslate_redstone_ore",
|
||||
"minecraft:deepslate_emerald_ore",
|
||||
"minecraft:emerald_ore",
|
||||
];
|
||||
const netherOres = [
|
||||
"minecraft:nether_gold_ore",
|
||||
"minecraft:nether_quartz_ore",
|
||||
"etcetera:nether_bismuth_ore",
|
||||
];
|
||||
const skullCavernOres = [
|
||||
"oreganized:lead_ore",
|
||||
"oreganized:deepslate_lead_ore",
|
||||
"oreganized:silver_ore",
|
||||
"oreganized:deepslate_silver_ore",
|
||||
"society:iridium_ore",
|
||||
"society:deepslate_iridium_ore",
|
||||
"society:sparkstone_ore",
|
||||
"society:deepslate_sparkstone_ore",
|
||||
];
|
||||
const addMiningLootToAllOres = (e, stage, chance, item, otherPool) => {
|
||||
overworldOres.forEach((ore) => {
|
||||
e.addBlockLootModifier(ore)
|
||||
.hasAnyStage(stage)
|
||||
.pool((p) => {
|
||||
p.not((n) =>
|
||||
n.matchMainHand(ItemFilter.hasEnchantment("minecraft:silk_touch"))
|
||||
);
|
||||
p.randomChance(chance).addLoot(item);
|
||||
});
|
||||
});
|
||||
netherOres.forEach((ore) => {
|
||||
e.addBlockLootModifier(ore)
|
||||
.hasAnyStage(stage)
|
||||
.pool((p) => {
|
||||
p.not((n) =>
|
||||
n.matchMainHand(ItemFilter.hasEnchantment("minecraft:silk_touch"))
|
||||
);
|
||||
p.randomChance(chance).addLoot(item);
|
||||
});
|
||||
});
|
||||
|
||||
skullCavernOres.forEach((ore) => {
|
||||
e.addBlockLootModifier(ore)
|
||||
.hasAnyStage(stage)
|
||||
.pool((p) => {
|
||||
p.not((n) =>
|
||||
n.matchMainHand(ItemFilter.hasEnchantment("minecraft:silk_touch"))
|
||||
);
|
||||
p.randomChance(chance).addLoot(item);
|
||||
});
|
||||
});
|
||||
if (otherPool && otherPool.length > 0) {
|
||||
otherPool.forEach((ore) => {
|
||||
e.addBlockLootModifier(ore)
|
||||
.hasAnyStage(stage)
|
||||
.pool((p) => {
|
||||
p.not((n) =>
|
||||
n.matchMainHand(ItemFilter.hasEnchantment("minecraft:silk_touch"))
|
||||
);
|
||||
p.randomChance(chance).addLoot(item);
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
const addWeightedMiningLootToAllOres = (e, stage, chance, item, otherPool) => {
|
||||
overworldOres.forEach((ore) => {
|
||||
e.addBlockLootModifier(ore)
|
||||
.hasAnyStage(stage)
|
||||
.pool((p) => {
|
||||
p.not((n) =>
|
||||
n.matchMainHand(ItemFilter.hasEnchantment("minecraft:silk_touch"))
|
||||
);
|
||||
p.randomChance(chance).addWeightedLoot(item);
|
||||
});
|
||||
});
|
||||
netherOres.forEach((ore) => {
|
||||
e.addBlockLootModifier(ore)
|
||||
.hasAnyStage(stage)
|
||||
.pool((p) => {
|
||||
p.not((n) =>
|
||||
n.matchMainHand(ItemFilter.hasEnchantment("minecraft:silk_touch"))
|
||||
);
|
||||
p.randomChance(chance).addWeightedLoot(item);
|
||||
});
|
||||
});
|
||||
|
||||
skullCavernOres.forEach((ore) => {
|
||||
e.addBlockLootModifier(ore)
|
||||
.hasAnyStage(stage)
|
||||
.pool((p) => {
|
||||
p.not((n) =>
|
||||
n.matchMainHand(ItemFilter.hasEnchantment("minecraft:silk_touch"))
|
||||
);
|
||||
p.randomChance(chance).addWeightedLoot(item);
|
||||
});
|
||||
});
|
||||
if (otherPool && otherPool.length > 0) {
|
||||
otherPool.forEach((ore) => {
|
||||
e.addBlockLootModifier(ore)
|
||||
.hasAnyStage(stage)
|
||||
.pool((p) => {
|
||||
p.not((n) =>
|
||||
n.matchMainHand(ItemFilter.hasEnchantment("minecraft:silk_touch"))
|
||||
);
|
||||
p.randomChance(chance).addWeightedLoot(item);
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
const addAdditionalGeodeRoll = (e, geodeStage) => {
|
||||
overworldOres.forEach((ore) => {
|
||||
e.addBlockLootModifier(ore)
|
||||
.hasAnyStage(geodeStage)
|
||||
.pool((p) => {
|
||||
p.not((n) =>
|
||||
n.matchMainHand(ItemFilter.hasEnchantment("minecraft:silk_touch"))
|
||||
);
|
||||
p.randomChance(0.1).addLoot("society:geode");
|
||||
});
|
||||
e.addBlockLootModifier(ore)
|
||||
.biome("#forge:is_cold")
|
||||
.hasAnyStage(geodeStage)
|
||||
.pool((p) => {
|
||||
p.not((n) =>
|
||||
n.matchMainHand(ItemFilter.hasEnchantment("minecraft:silk_touch"))
|
||||
);
|
||||
p.randomChance(0.1).addLoot("society:frozen_geode");
|
||||
});
|
||||
e.addBlockLootModifier(ore)
|
||||
.playerPredicate((p) => global.getSeasonFromLevel(p.level) === "winter")
|
||||
.hasAnyStage(geodeStage)
|
||||
.pool((p) => {
|
||||
p.not((n) =>
|
||||
n.matchMainHand(ItemFilter.hasEnchantment("minecraft:silk_touch"))
|
||||
);
|
||||
p.randomChance(0.1).addLoot("society:frozen_geode");
|
||||
});
|
||||
e.addBlockLootModifier(ore)
|
||||
.biome("#society:is_skull_cavern")
|
||||
.hasAnyStage(geodeStage)
|
||||
.pool((p) => {
|
||||
p.not((n) =>
|
||||
n.matchMainHand(ItemFilter.hasEnchantment("minecraft:silk_touch"))
|
||||
);
|
||||
p.randomChance(0.04).addLoot("society:omni_geode");
|
||||
});
|
||||
});
|
||||
netherOres.forEach((ore) => {
|
||||
e.addBlockLootModifier(ore)
|
||||
.hasAnyStage(geodeStage)
|
||||
.pool((p) => {
|
||||
p.not((n) =>
|
||||
n.matchMainHand(ItemFilter.hasEnchantment("minecraft:silk_touch"))
|
||||
);
|
||||
p.randomChance(0.1).addLoot("society:magma_geode");
|
||||
});
|
||||
});
|
||||
};
|
||||
LootJS.modifiers((e) => {
|
||||
overworldOres.forEach((ore) => {
|
||||
e.addBlockLootModifier(ore).pool((p) => {
|
||||
p.not((n) =>
|
||||
n.matchMainHand(ItemFilter.hasEnchantment("minecraft:silk_touch"))
|
||||
);
|
||||
p.matchEntity((entity) => {
|
||||
entity.anyType("minecraft:player");
|
||||
});
|
||||
p.randomChance(0.1).addLoot("society:geode");
|
||||
});
|
||||
e.addBlockLootModifier(ore)
|
||||
.hasAnyStage("mineralogist")
|
||||
.pool((p) => {
|
||||
p.not((n) =>
|
||||
n.matchMainHand(ItemFilter.hasEnchantment("minecraft:silk_touch"))
|
||||
);
|
||||
p.randomChance(0.1).addLoot("society:earth_crystal");
|
||||
});
|
||||
e.addBlockLootModifier(ore)
|
||||
.biome("#forge:is_cold")
|
||||
.pool((p) => {
|
||||
p.not((n) =>
|
||||
n.matchMainHand(ItemFilter.hasEnchantment("minecraft:silk_touch"))
|
||||
);
|
||||
p.matchEntity((entity) => {
|
||||
entity.anyType("minecraft:player");
|
||||
});
|
||||
p.randomChance(0.1).addLoot("society:frozen_geode");
|
||||
});
|
||||
e.addBlockLootModifier(ore)
|
||||
.playerPredicate((p) => global.getSeasonFromLevel(p.level) === "winter")
|
||||
.pool((p) => {
|
||||
p.not((n) =>
|
||||
n.matchMainHand(ItemFilter.hasEnchantment("minecraft:silk_touch"))
|
||||
);
|
||||
p.matchEntity((entity) => {
|
||||
entity.anyType("minecraft:player");
|
||||
});
|
||||
p.randomChance(0.1).addLoot("society:frozen_geode");
|
||||
});
|
||||
e.addBlockLootModifier(ore)
|
||||
.biome("#forge:is_cold")
|
||||
.hasAnyStage("mineralogist")
|
||||
.pool((p) => {
|
||||
p.not((n) =>
|
||||
n.matchMainHand(ItemFilter.hasEnchantment("minecraft:silk_touch"))
|
||||
);
|
||||
p.randomChance(0.1).addLoot("society:frozen_tear");
|
||||
});
|
||||
e.addBlockLootModifier(ore)
|
||||
.biome("#society:is_skull_cavern")
|
||||
.pool((p) => {
|
||||
p.not((n) =>
|
||||
n.matchMainHand(ItemFilter.hasEnchantment("minecraft:silk_touch"))
|
||||
);
|
||||
p.matchEntity((entity) => {
|
||||
entity.anyType("minecraft:player");
|
||||
});
|
||||
p.randomChance(0.04).addLoot("society:omni_geode");
|
||||
});
|
||||
e.addBlockLootModifier(ore)
|
||||
.biome("#society:is_skull_cavern")
|
||||
.hasAnyStage("mineralogist")
|
||||
.pool((p) => {
|
||||
p.not((n) =>
|
||||
n.matchMainHand(ItemFilter.hasEnchantment("minecraft:silk_touch"))
|
||||
);
|
||||
p.randomChance(0.02).addLoot("society:jade");
|
||||
});
|
||||
e.addBlockLootModifier(ore)
|
||||
.hasAnyStage("blockchain")
|
||||
.pool((p) => {
|
||||
p.not((n) =>
|
||||
n.matchMainHand(ItemFilter.hasEnchantment("minecraft:silk_touch"))
|
||||
);
|
||||
p.randomChance(0.03).addLoot("numismatics:crown");
|
||||
});
|
||||
e.addBlockLootModifier(ore)
|
||||
.hasAnyStage("furniture_archaeologist")
|
||||
.pool((p) => {
|
||||
p.not((n) =>
|
||||
n.matchMainHand(ItemFilter.hasEnchantment("minecraft:silk_touch"))
|
||||
);
|
||||
p.randomChance(0.03).addLoot("society:furniture_box");
|
||||
});
|
||||
e.addBlockLootModifier(ore)
|
||||
.hasAnyStage("star_blessing")
|
||||
.anyDimension("minecraft:overworld")
|
||||
.pool((p) => {
|
||||
p.not((n) =>
|
||||
n.matchMainHand(ItemFilter.hasEnchantment("minecraft:silk_touch"))
|
||||
);
|
||||
p.randomChance(0.02).addLoot("society:pristine_star_shards");
|
||||
});
|
||||
e.addBlockLootModifier(ore)
|
||||
.hasAnyStage("star_blessing")
|
||||
.anyDimension("society:skull_cavern")
|
||||
.pool((p) => {
|
||||
p.not((n) =>
|
||||
n.matchMainHand(ItemFilter.hasEnchantment("minecraft:silk_touch"))
|
||||
);
|
||||
p.randomChance(0.06).addLoot("society:pristine_star_shards");
|
||||
});
|
||||
});
|
||||
e.addBlockLootModifier("society:geode_node")
|
||||
.biome("#forge:is_cold")
|
||||
.pool((p) => {
|
||||
p.randomChance(0.1).addLoot("society:frozen_geode");
|
||||
});
|
||||
e.addBlockLootModifier("society:geode_node").pool((p) => {
|
||||
p.randomChance(0.05).addLoot("society:mining_monthly");
|
||||
});
|
||||
e.addBlockLootModifier("society:geode_node")
|
||||
.anyDimension("minecraft:overworld")
|
||||
.hasAnyStage("prismatic_prospector")
|
||||
.pool((p) => {
|
||||
p.randomChance(0.05).addLoot("society:prismatic_shard");
|
||||
});
|
||||
e.addBlockLootModifier("society:magma_geode_node").pool((p) => {
|
||||
p.randomChance(0.1).addLoot("society:mining_monthly");
|
||||
});
|
||||
e.addBlockLootModifier("society:magma_geode_node")
|
||||
.anyDimension("minecraft:the_nether")
|
||||
.hasAnyStage("prismatic_prospector")
|
||||
.pool((p) => {
|
||||
p.randomChance(0.2).addLoot("society:prismatic_shard");
|
||||
});
|
||||
e.addBlockLootModifier("society:omni_geode_node").pool((p) => {
|
||||
p.randomChance(0.1).addLoot("society:mining_monthly");
|
||||
});
|
||||
e.addBlockLootModifier("society:omni_geode_node")
|
||||
.hasAnyStage("prismatic_prospector")
|
||||
.pool((p) => {
|
||||
p.randomChance(0.3).addLoot("society:prismatic_shard");
|
||||
});
|
||||
e.addBlockLootModifier("minecraft:deepslate")
|
||||
.hasAnyStage("filthy_excavator")
|
||||
.pool((p) => {
|
||||
p.randomChance(0.02).addLoot("society:geode");
|
||||
});
|
||||
e.addBlockLootModifier("minecraft:netherrack")
|
||||
.hasAnyStage("filthy_excavator")
|
||||
.pool((p) => {
|
||||
p.randomChance(0.01).addLoot("society:magma_geode");
|
||||
});
|
||||
|
||||
netherOres.forEach((ore) => {
|
||||
e.addBlockLootModifier(ore).pool((p) => {
|
||||
p.not((n) =>
|
||||
n.matchMainHand(ItemFilter.hasEnchantment("minecraft:silk_touch"))
|
||||
);
|
||||
p.matchEntity((entity) => {
|
||||
entity.anyType("minecraft:player");
|
||||
});
|
||||
p.randomChance(0.1).addLoot("society:magma_geode");
|
||||
});
|
||||
e.addBlockLootModifier(ore)
|
||||
.hasAnyStage("mineralogist")
|
||||
.pool((p) => {
|
||||
p.not((n) =>
|
||||
n.matchMainHand(ItemFilter.hasEnchantment("minecraft:silk_touch"))
|
||||
);
|
||||
p.randomChance(0.1).addLoot("society:fire_quartz");
|
||||
});
|
||||
e.addBlockLootModifier(ore)
|
||||
.hasAnyStage("blockchain")
|
||||
.pool((p) => {
|
||||
p.not((n) =>
|
||||
n.matchMainHand(ItemFilter.hasEnchantment("minecraft:silk_touch"))
|
||||
);
|
||||
p.randomChance(0.06).addLoot("numismatics:crown");
|
||||
});
|
||||
e.addBlockLootModifier(ore)
|
||||
.hasAnyStage("furniture_archaeologist")
|
||||
.pool((p) => {
|
||||
p.not((n) =>
|
||||
n.matchMainHand(ItemFilter.hasEnchantment("minecraft:silk_touch"))
|
||||
);
|
||||
p.randomChance(0.01).addLoot("society:furniture_box");
|
||||
});
|
||||
e.addBlockLootModifier(ore)
|
||||
.hasAnyStage("star_blessing")
|
||||
.anyDimension("minecraft:the_nether")
|
||||
.pool((p) => {
|
||||
p.not((n) =>
|
||||
n.matchMainHand(ItemFilter.hasEnchantment("minecraft:silk_touch"))
|
||||
);
|
||||
p.randomChance(0.04).addLoot("society:pristine_star_shards");
|
||||
});
|
||||
e.addBlockLootModifier(ore)
|
||||
.hasAnyStage("star_blessing")
|
||||
.anyDimension("society:skull_cavern")
|
||||
.pool((p) => {
|
||||
p.not((n) =>
|
||||
n.matchMainHand(ItemFilter.hasEnchantment("minecraft:silk_touch"))
|
||||
);
|
||||
p.randomChance(0.06).addLoot("society:pristine_star_shards");
|
||||
});
|
||||
});
|
||||
skullCavernOres.forEach((ore) => {
|
||||
e.addBlockLootModifier(ore)
|
||||
.biome("#forge:is_cold")
|
||||
.pool((p) => {
|
||||
p.not((n) =>
|
||||
n.matchMainHand(ItemFilter.hasEnchantment("minecraft:silk_touch"))
|
||||
);
|
||||
p.matchEntity((entity) => {
|
||||
entity.anyType("minecraft:player");
|
||||
});
|
||||
p.randomChance(0.1).addLoot("society:frozen_geode");
|
||||
});
|
||||
e.addBlockLootModifier(ore)
|
||||
.playerPredicate((p) => global.getSeasonFromLevel(p.level) === "winter")
|
||||
.pool((p) => {
|
||||
p.not((n) =>
|
||||
n.matchMainHand(ItemFilter.hasEnchantment("minecraft:silk_touch"))
|
||||
);
|
||||
p.matchEntity((entity) => {
|
||||
entity.anyType("minecraft:player");
|
||||
});
|
||||
p.randomChance(0.1).addLoot("society:frozen_geode");
|
||||
});
|
||||
e.addBlockLootModifier(ore)
|
||||
.biome("#forge:is_cold")
|
||||
.hasAnyStage("mineralogist")
|
||||
.pool((p) => {
|
||||
p.not((n) =>
|
||||
n.matchMainHand(ItemFilter.hasEnchantment("minecraft:silk_touch"))
|
||||
);
|
||||
p.randomChance(0.1).addLoot("society:frozen_tear");
|
||||
});
|
||||
e.addBlockLootModifier(ore)
|
||||
.biome("#society:is_skull_cavern")
|
||||
.pool((p) => {
|
||||
p.not((n) =>
|
||||
n.matchMainHand(ItemFilter.hasEnchantment("minecraft:silk_touch"))
|
||||
);
|
||||
p.matchEntity((entity) => {
|
||||
entity.anyType("minecraft:player");
|
||||
});
|
||||
p.randomChance(0.04).addLoot("society:omni_geode");
|
||||
});
|
||||
e.addBlockLootModifier(ore)
|
||||
.biome("#society:is_skull_cavern")
|
||||
.hasAnyStage("mineralogist")
|
||||
.pool((p) => {
|
||||
p.not((n) =>
|
||||
n.matchMainHand(ItemFilter.hasEnchantment("minecraft:silk_touch"))
|
||||
);
|
||||
p.randomChance(0.02).addLoot("society:jade");
|
||||
});
|
||||
e.addBlockLootModifier(ore)
|
||||
.hasAnyStage("blockchain")
|
||||
.pool((p) => {
|
||||
p.not((n) =>
|
||||
n.matchMainHand(ItemFilter.hasEnchantment("minecraft:silk_touch"))
|
||||
);
|
||||
p.randomChance(0.03).addLoot("numismatics:crown");
|
||||
});
|
||||
e.addBlockLootModifier(ore)
|
||||
.hasAnyStage("furniture_archaeologist")
|
||||
.pool((p) => {
|
||||
p.not((n) =>
|
||||
n.matchMainHand(ItemFilter.hasEnchantment("minecraft:silk_touch"))
|
||||
);
|
||||
p.randomChance(0.03).addLoot("society:furniture_box");
|
||||
});
|
||||
e.addBlockLootModifier(ore)
|
||||
.hasAnyStage("star_blessing")
|
||||
.anyDimension("society:skull_cavern")
|
||||
.pool((p) => {
|
||||
p.not((n) =>
|
||||
n.matchMainHand(ItemFilter.hasEnchantment("minecraft:silk_touch"))
|
||||
);
|
||||
p.randomChance(0.06).addLoot("society:pristine_star_shards");
|
||||
});
|
||||
});
|
||||
[
|
||||
"minecraft:deepslate_gold_ore",
|
||||
"meadow:alpine_gold_ore",
|
||||
"minecraft:gold_ore",
|
||||
].forEach((ore) => {
|
||||
e.addBlockLootModifier(ore)
|
||||
.hasAnyStage("gold_rush")
|
||||
.pool((p) => {
|
||||
p.not((n) =>
|
||||
n.matchMainHand(ItemFilter.hasEnchantment("minecraft:silk_touch"))
|
||||
);
|
||||
p.addLoot(Item.of("4x minecraft:raw_gold_block"));
|
||||
});
|
||||
});
|
||||
addMiningLootToAllOres(
|
||||
e,
|
||||
"the_spark_also_rises",
|
||||
1,
|
||||
Item.of("1x society:sparkstone")
|
||||
);
|
||||
|
||||
addMiningLootToAllOres(
|
||||
e,
|
||||
"husbandry_mastery",
|
||||
0.01,
|
||||
Item.of("1x society:animal_cracker"),
|
||||
[
|
||||
"society:oak_supply_crate",
|
||||
"society:spruce_supply_crate",
|
||||
"society:palm_supply_crate",
|
||||
"society:grimwood_supply_crate",
|
||||
]
|
||||
);
|
||||
["society:sparkstone_ore", "society:deepslate_sparkstone_ore"].forEach(
|
||||
(ore) => {
|
||||
e.addBlockLootModifier(ore)
|
||||
.hasAnyStage("mining_mastery")
|
||||
.pool((p) => {
|
||||
p.not((n) =>
|
||||
n.matchMainHand(ItemFilter.hasEnchantment("minecraft:silk_touch"))
|
||||
);
|
||||
p.randomChance(0.001).addLoot("society:the_spark_also_rises");
|
||||
});
|
||||
}
|
||||
);
|
||||
|
||||
addAdditionalGeodeRoll(e, "excavator");
|
||||
|
||||
// Mastery Moon Statue
|
||||
const weightedRemains = [];
|
||||
[
|
||||
"betterarcheology:creeper_fossil_body",
|
||||
"betterarcheology:creeper_fossil_head",
|
||||
"betterarcheology:villager_fossil_body",
|
||||
"betterarcheology:villager_fossil_head",
|
||||
"betterarcheology:chicken_fossil_body",
|
||||
"betterarcheology:chicken_fossil_head",
|
||||
"betterarcheology:ocelot_fossil_body",
|
||||
"betterarcheology:ocelot_fossil_head",
|
||||
"betterarcheology:wolf_fossil_body",
|
||||
"betterarcheology:wolf_fossil_head",
|
||||
"betterarcheology:sheep_fossil_body",
|
||||
"betterarcheology:sheep_fossil_head",
|
||||
"betterarcheology:guardian_fossil_head",
|
||||
"betterarcheology:guardian_fossil_body",
|
||||
"crittersandcompanions:clam",
|
||||
"species:petrified_egg",
|
||||
"society:petrified_slime",
|
||||
"twigs:petrified_lichen",
|
||||
"atmospheric:petrified_armor_trim_smithing_template",
|
||||
"betterarcheology:fossiliferous_dirt",
|
||||
"minecraft:bone",
|
||||
"aquaculture:fish_bones",
|
||||
"netherdepthsupgrade:bonefish",
|
||||
"society:fantasy_box_bone",
|
||||
"betterarcheology:artifact_shards",
|
||||
"society:artifact_trove"
|
||||
].forEach((remain) =>
|
||||
weightedRemains.push(Item.of(remain).withChance(1))
|
||||
);
|
||||
|
||||
addWeightedMiningLootToAllOres(e, "moon_remains", 0.05, weightedRemains);
|
||||
addAdditionalGeodeRoll(e, "moon_geode_roll");
|
||||
|
||||
e.addBlockLootModifier(overworldOres)
|
||||
.hasAnyStage("moon_extra_ore")
|
||||
.modifyLoot(Ingredient.all, (itemStack) => {
|
||||
if (itemStack.hasTag("forge:raw_materials"))
|
||||
itemStack.setCount(itemStack.getCount() + 1);
|
||||
return itemStack;
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,362 @@
|
||||
console.info("[SOCIETY] seasonFish.js loaded");
|
||||
|
||||
const checkSeasonNeptuna = (p, season, needsSkil) =>
|
||||
global.getSeasonFromLevel(p.level) === season &&
|
||||
p.stages.has("mystical_ocean") === needsSkil;
|
||||
const convertToLootEntry = (entries, insertNeptuna) => {
|
||||
let pool = [];
|
||||
let weights = 0;
|
||||
entries.forEach((entry) => {
|
||||
const { fish, weight } = entry;
|
||||
weights += weight;
|
||||
pool.push(LootEntry.of(fish).withWeight(weight));
|
||||
});
|
||||
if (insertNeptuna)
|
||||
pool.push(
|
||||
LootEntry.of("society:neptuna").withWeight(Math.floor(weights * 0.09))
|
||||
);
|
||||
return pool;
|
||||
};
|
||||
|
||||
const createPool = (entries, clear, rain, night) => {
|
||||
let timeOfDayEntries;
|
||||
if (night) {
|
||||
timeOfDayEntries = entries.filter((fish) => fish.night === true);
|
||||
} else {
|
||||
timeOfDayEntries = entries.filter((fish) => fish.night === undefined);
|
||||
}
|
||||
let newPool = timeOfDayEntries.filter(
|
||||
(fish) => !fish.requiresRain && !fish.requiresClear
|
||||
);
|
||||
if (clear) {
|
||||
return newPool.concat(
|
||||
timeOfDayEntries.filter((fish) => fish.requiresClear)
|
||||
);
|
||||
}
|
||||
if (rain) {
|
||||
return newPool.concat(timeOfDayEntries.filter((fish) => fish.requiresRain));
|
||||
}
|
||||
return newPool;
|
||||
};
|
||||
|
||||
const createWeatherLootTable = (
|
||||
e,
|
||||
season,
|
||||
weather,
|
||||
oceanFish,
|
||||
riverFish,
|
||||
freshFish,
|
||||
night,
|
||||
mysticalOcean
|
||||
) => {
|
||||
if (!night) {
|
||||
e.addLootTableModifier("minecraft:gameplay/fishing")
|
||||
.playerPredicate((p) => checkSeasonNeptuna(p, season, mysticalOcean))
|
||||
.anyBiome("#minecraft:is_ocean", "#minecraft:is_beach")
|
||||
.weatherCheck(weather)
|
||||
.timeCheck(24000, 0, 12999)
|
||||
.addWeightedLoot([1, 1], convertToLootEntry(oceanFish, mysticalOcean));
|
||||
|
||||
e.addLootTableModifier("minecraft:gameplay/fishing")
|
||||
.playerPredicate((p) => checkSeasonNeptuna(p, season, mysticalOcean))
|
||||
.anyBiome("#minecraft:is_river")
|
||||
.weatherCheck(weather)
|
||||
.timeCheck(24000, 0, 12999)
|
||||
.addWeightedLoot([1, 1], convertToLootEntry(riverFish, mysticalOcean));
|
||||
|
||||
e.addLootTableModifier("minecraft:gameplay/fishing")
|
||||
.playerPredicate((p) => checkSeasonNeptuna(p, season, mysticalOcean))
|
||||
.not((n) => {
|
||||
n.anyBiome(
|
||||
"#minecraft:is_ocean",
|
||||
"#minecraft:is_beach",
|
||||
"#minecraft:is_river"
|
||||
);
|
||||
})
|
||||
.weatherCheck(weather)
|
||||
.timeCheck(24000, 0, 12999)
|
||||
.addWeightedLoot([1, 1], convertToLootEntry(freshFish, mysticalOcean));
|
||||
} else {
|
||||
e.addLootTableModifier("minecraft:gameplay/fishing")
|
||||
.playerPredicate((p) => checkSeasonNeptuna(p, season, mysticalOcean))
|
||||
.anyBiome("#minecraft:is_ocean", "#minecraft:is_beach")
|
||||
.weatherCheck(weather)
|
||||
.timeCheck(24000, 13000, 23999)
|
||||
.addWeightedLoot([1, 1], convertToLootEntry(oceanFish, mysticalOcean));
|
||||
|
||||
e.addLootTableModifier("minecraft:gameplay/fishing")
|
||||
.playerPredicate((p) => checkSeasonNeptuna(p, season, mysticalOcean))
|
||||
.anyBiome("#minecraft:is_river")
|
||||
.weatherCheck(weather)
|
||||
.timeCheck(24000, 13000, 23999)
|
||||
.addWeightedLoot([1, 1], convertToLootEntry(riverFish, mysticalOcean));
|
||||
|
||||
e.addLootTableModifier("minecraft:gameplay/fishing")
|
||||
.playerPredicate((p) => checkSeasonNeptuna(p, season, mysticalOcean))
|
||||
.not((n) => {
|
||||
n.anyBiome(
|
||||
"#minecraft:is_ocean",
|
||||
"#minecraft:is_beach",
|
||||
"#minecraft:is_river"
|
||||
);
|
||||
})
|
||||
.weatherCheck(weather)
|
||||
.timeCheck(24000, 13000, 23999)
|
||||
.addWeightedLoot([1, 1], convertToLootEntry(freshFish, mysticalOcean));
|
||||
}
|
||||
};
|
||||
|
||||
const createSeasonLootTable = (
|
||||
e,
|
||||
season,
|
||||
oceanFish,
|
||||
riverFish,
|
||||
freshFish,
|
||||
night,
|
||||
mysticalOcean
|
||||
) => {
|
||||
if (night) {
|
||||
createWeatherLootTable(
|
||||
e,
|
||||
season,
|
||||
{ raining: false, thundering: false },
|
||||
createPool(oceanFish, true, false, true),
|
||||
createPool(riverFish, true, false, true),
|
||||
createPool(freshFish, true, false, true),
|
||||
true,
|
||||
mysticalOcean
|
||||
);
|
||||
createWeatherLootTable(
|
||||
e,
|
||||
season,
|
||||
{ raining: true },
|
||||
createPool(oceanFish, false, true, true),
|
||||
createPool(riverFish, false, true, true),
|
||||
createPool(freshFish, false, true, true),
|
||||
true,
|
||||
mysticalOcean
|
||||
);
|
||||
} else {
|
||||
createWeatherLootTable(
|
||||
e,
|
||||
season,
|
||||
{ raining: false, thundering: false },
|
||||
createPool(oceanFish, true, false, false),
|
||||
createPool(riverFish, true, false, false),
|
||||
createPool(freshFish, true, false, false),
|
||||
false,
|
||||
mysticalOcean
|
||||
);
|
||||
createWeatherLootTable(
|
||||
e,
|
||||
season,
|
||||
{ raining: true },
|
||||
createPool(oceanFish, false, true, false),
|
||||
createPool(riverFish, false, true, false),
|
||||
createPool(freshFish, false, true, false),
|
||||
false,
|
||||
mysticalOcean
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
LootJS.modifiers((e) => {
|
||||
[
|
||||
"minecraft:cod",
|
||||
"minecraft:salmon",
|
||||
"minecraft:tropical_fish",
|
||||
"minecraft:pufferfish",
|
||||
].forEach((fish) => {
|
||||
e.addLootTableModifier("minecraft:gameplay/fishing").removeLoot(fish);
|
||||
});
|
||||
|
||||
createSeasonLootTable(
|
||||
e,
|
||||
"spring",
|
||||
global.springOcean,
|
||||
global.springRiver,
|
||||
global.springFresh,
|
||||
false,
|
||||
false
|
||||
);
|
||||
|
||||
createSeasonLootTable(
|
||||
e,
|
||||
"spring",
|
||||
global.springOcean,
|
||||
global.springRiver,
|
||||
global.springFresh
|
||||
);
|
||||
createSeasonLootTable(
|
||||
e,
|
||||
"spring",
|
||||
global.springOcean,
|
||||
global.springRiver,
|
||||
global.springFresh,
|
||||
true,
|
||||
false
|
||||
);
|
||||
|
||||
createSeasonLootTable(
|
||||
e,
|
||||
"summer",
|
||||
global.summerOcean,
|
||||
global.summerRiver,
|
||||
global.summerFresh,
|
||||
false,
|
||||
false
|
||||
);
|
||||
createSeasonLootTable(
|
||||
e,
|
||||
"summer",
|
||||
global.summerOcean,
|
||||
global.summerRiver,
|
||||
global.summerFresh,
|
||||
true,
|
||||
false
|
||||
);
|
||||
|
||||
createSeasonLootTable(
|
||||
e,
|
||||
"autumn",
|
||||
global.autumnOcean,
|
||||
global.autumnRiver,
|
||||
global.autumnFresh,
|
||||
false,
|
||||
false
|
||||
);
|
||||
createSeasonLootTable(
|
||||
e,
|
||||
"autumn",
|
||||
global.autumnOcean,
|
||||
global.autumnRiver,
|
||||
global.autumnFresh,
|
||||
true,
|
||||
false
|
||||
);
|
||||
|
||||
createSeasonLootTable(
|
||||
e,
|
||||
"winter",
|
||||
global.winterOcean,
|
||||
global.winterRiver,
|
||||
global.winterFresh,
|
||||
false,
|
||||
false
|
||||
);
|
||||
createSeasonLootTable(
|
||||
e,
|
||||
"winter",
|
||||
global.winterOcean,
|
||||
global.winterRiver,
|
||||
global.winterFresh,
|
||||
true,
|
||||
false
|
||||
);
|
||||
|
||||
// Mystical Ocean
|
||||
|
||||
createSeasonLootTable(
|
||||
e,
|
||||
"spring",
|
||||
global.springOcean,
|
||||
global.springRiver,
|
||||
global.springFresh,
|
||||
false,
|
||||
true
|
||||
);
|
||||
createSeasonLootTable(
|
||||
e,
|
||||
"spring",
|
||||
global.springOcean,
|
||||
global.springRiver,
|
||||
global.springFresh,
|
||||
true,
|
||||
true
|
||||
);
|
||||
|
||||
createSeasonLootTable(
|
||||
e,
|
||||
"summer",
|
||||
global.summerOcean,
|
||||
global.summerRiver,
|
||||
global.summerFresh,
|
||||
false,
|
||||
true
|
||||
);
|
||||
createSeasonLootTable(
|
||||
e,
|
||||
"summer",
|
||||
global.summerOcean,
|
||||
global.summerRiver,
|
||||
global.summerFresh,
|
||||
true,
|
||||
true
|
||||
);
|
||||
|
||||
createSeasonLootTable(
|
||||
e,
|
||||
"autumn",
|
||||
global.autumnOcean,
|
||||
global.autumnRiver,
|
||||
global.autumnFresh,
|
||||
false,
|
||||
true
|
||||
);
|
||||
createSeasonLootTable(
|
||||
e,
|
||||
"autumn",
|
||||
global.autumnOcean,
|
||||
global.autumnRiver,
|
||||
global.autumnFresh,
|
||||
true,
|
||||
true
|
||||
);
|
||||
|
||||
createSeasonLootTable(
|
||||
e,
|
||||
"winter",
|
||||
global.winterOcean,
|
||||
global.winterRiver,
|
||||
global.winterFresh,
|
||||
false,
|
||||
true
|
||||
);
|
||||
createSeasonLootTable(
|
||||
e,
|
||||
"winter",
|
||||
global.winterOcean,
|
||||
global.winterRiver,
|
||||
global.winterFresh,
|
||||
true,
|
||||
true
|
||||
);
|
||||
|
||||
// + Fish skills
|
||||
e.addLootTableModifier("minecraft:gameplay/fishing")
|
||||
.hasAnyStage("fly_fisher")
|
||||
.modifyLoot(Ingredient.all, (itemStack) => {
|
||||
if (!itemStack.hasTag("minecraft:fishes")) return itemStack;
|
||||
if (itemStack.maxStackSize == 1) return itemStack;
|
||||
itemStack.setCount(itemStack.getCount() + 1);
|
||||
return itemStack;
|
||||
})
|
||||
.hasAnyStage("school_fisher")
|
||||
.modifyLoot(Ingredient.all, (itemStack) => {
|
||||
if (!itemStack.hasTag("minecraft:fishes")) return itemStack;
|
||||
if (itemStack.maxStackSize == 1) return itemStack;
|
||||
itemStack.setCount(itemStack.getCount() + 3);
|
||||
return itemStack;
|
||||
})
|
||||
|
||||
e.addLootTableModifier("minecraft:gameplay/fishing")
|
||||
.playerPredicate((p) =>
|
||||
global.hasBobber(p.getHeldItem("main_hand"), "society:needle_bobber")
|
||||
)
|
||||
.modifyLoot(Ingredient.all, (itemStack) => {
|
||||
if (!itemStack.hasTag("minecraft:fishes")) return itemStack;
|
||||
if (itemStack.maxStackSize == 1) return itemStack;
|
||||
itemStack.setCount(itemStack.getCount() + 5);
|
||||
return itemStack;
|
||||
})
|
||||
});
|
||||
Reference in New Issue
Block a user