From 6f1a8f9bf71fd6e71970bbfacbd60b98a7f70a11 Mon Sep 17 00:00:00 2001 From: 17146 <1714673995@qq.com> Date: Sun, 6 Apr 2025 23:28:33 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E6=9E=84loottables?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../59eb3dbb5f86130e09b3c62d89b9525ee01cf52d | 5 +- .../loot_table/chests/blue_print_common.json | 284 ++++++++ .../loot_table/chests/blue_print_epic.json | 292 +++++++++ .../loot_table/chests/blue_print_rare.json | 350 ++++++++++ .../datagen/ModCustomLootProvider.java | 262 ++++++-- .../loot_table/chests/blue_print_common.json | 492 -------------- .../loot_table/chests/blue_print_epic.json | 408 ------------ .../loot_table/chests/blue_print_rare.json | 604 ------------------ 8 files changed, 1145 insertions(+), 1552 deletions(-) create mode 100644 src/generated/resources/data/superbwarfare/loot_table/chests/blue_print_common.json create mode 100644 src/generated/resources/data/superbwarfare/loot_table/chests/blue_print_epic.json create mode 100644 src/generated/resources/data/superbwarfare/loot_table/chests/blue_print_rare.json delete mode 100644 src/main/resources/data/superbwarfare/loot_table/chests/blue_print_common.json delete mode 100644 src/main/resources/data/superbwarfare/loot_table/chests/blue_print_epic.json delete mode 100644 src/main/resources/data/superbwarfare/loot_table/chests/blue_print_rare.json diff --git a/src/generated/resources/.cache/59eb3dbb5f86130e09b3c62d89b9525ee01cf52d b/src/generated/resources/.cache/59eb3dbb5f86130e09b3c62d89b9525ee01cf52d index 8d5a6f753..022b1a800 100644 --- a/src/generated/resources/.cache/59eb3dbb5f86130e09b3c62d89b9525ee01cf52d +++ b/src/generated/resources/.cache/59eb3dbb5f86130e09b3c62d89b9525ee01cf52d @@ -1,4 +1,4 @@ -// 1.21.1 2025-04-07T06:07:51.636744 Loot Tables +// 1.21.1 2025-04-07T06:25:07.2903636 Loot Tables 98386b2e65b2afb7cf5b0cabf6a7b0f062c1e640 data/superbwarfare/loot_table/blocks/barbed_wire.json 811e69929a14e6736015849c220100bb58d914c9 data/superbwarfare/loot_table/blocks/cemented_carbide_block.json 1f482bc1f0a1026d0e1b75ee28c6f541b56747a5 data/superbwarfare/loot_table/blocks/charging_station.json @@ -21,4 +21,7 @@ fb31a40f6a04000f317823cbb80eda8588ba9c69 data/superbwarfare/loot_table/blocks/si 83112ebff477e322bd3d23ed4653c7c02b230473 data/superbwarfare/loot_table/blocks/steel_block.json 71fc892124b5343e10688cabc2fb7c87d83cfef8 data/superbwarfare/loot_table/blocks/tungsten_block.json 6e2346c664cd643bff31c0a26e463c6c8dd46e37 data/superbwarfare/loot_table/chests/ancient_cpu.json +031ebfa016c816ebbd03dcf03f169599eed3e9d4 data/superbwarfare/loot_table/chests/blue_print_common.json +eef164cceb825ad572fc9d2eaef4631f9ec13c7f data/superbwarfare/loot_table/chests/blue_print_epic.json +f28f40e6bca3090625550f4c62d5f2a1384fe3ba data/superbwarfare/loot_table/chests/blue_print_rare.json 7e75ff103ccdbcf6be6f61413a4173115195f0a9 data/superbwarfare/loot_table/containers/blueprints.json diff --git a/src/generated/resources/data/superbwarfare/loot_table/chests/blue_print_common.json b/src/generated/resources/data/superbwarfare/loot_table/chests/blue_print_common.json new file mode 100644 index 000000000..104f91db5 --- /dev/null +++ b/src/generated/resources/data/superbwarfare/loot_table/chests/blue_print_common.json @@ -0,0 +1,284 @@ +{ + "type": "minecraft:chest", + "pools": [ + { + "bonus_rolls": 0.0, + "entries": [ + { + "type": "minecraft:item", + "name": "superbwarfare:taser_blueprint", + "weight": 50 + }, + { + "type": "minecraft:item", + "name": "superbwarfare:glock_17_blueprint", + "weight": 50 + }, + { + "type": "minecraft:item", + "name": "superbwarfare:mp_443_blueprint", + "weight": 50 + }, + { + "type": "minecraft:item", + "name": "superbwarfare:m_1911_blueprint", + "weight": 50 + }, + { + "type": "minecraft:item", + "name": "superbwarfare:marlin_blueprint", + "weight": 50 + }, + { + "type": "minecraft:item", + "name": "superbwarfare:glock_18_blueprint", + "weight": 15 + }, + { + "type": "minecraft:item", + "name": "superbwarfare:m_79_blueprint", + "weight": 15 + }, + { + "type": "minecraft:item", + "name": "superbwarfare:m_4_blueprint", + "weight": 15 + }, + { + "type": "minecraft:item", + "name": "superbwarfare:sks_blueprint", + "weight": 15 + }, + { + "type": "minecraft:item", + "name": "superbwarfare:k_98_blueprint", + "weight": 15 + }, + { + "type": "minecraft:item", + "name": "superbwarfare:mosin_nagant_blueprint", + "weight": 15 + }, + { + "type": "minecraft:item", + "name": "superbwarfare:ak_47_blueprint", + "weight": 15 + }, + { + "type": "minecraft:item", + "name": "superbwarfare:m_870_blueprint", + "weight": 15 + }, + { + "type": "minecraft:item", + "name": "superbwarfare:hk_416_blueprint", + "weight": 15 + }, + { + "type": "minecraft:item", + "name": "superbwarfare:ak_12_blueprint", + "weight": 15 + }, + { + "type": "minecraft:item", + "name": "superbwarfare:qbz_95_blueprint", + "weight": 15 + }, + { + "type": "minecraft:item", + "name": "superbwarfare:rpg_blueprint", + "weight": 15 + }, + { + "type": "minecraft:item", + "name": "superbwarfare:m2hb_blueprint", + "weight": 15 + }, + { + "type": "minecraft:item", + "name": "superbwarfare:trachelium_blueprint" + }, + { + "type": "minecraft:item", + "name": "superbwarfare:hunting_rifle_blueprint" + }, + { + "type": "minecraft:item", + "name": "superbwarfare:bocek_blueprint" + }, + { + "type": "minecraft:item", + "name": "superbwarfare:rpk_blueprint" + }, + { + "type": "minecraft:item", + "name": "superbwarfare:vector_blueprint" + }, + { + "type": "minecraft:item", + "name": "superbwarfare:mk_14_blueprint" + }, + { + "type": "minecraft:item", + "name": "superbwarfare:m_60_blueprint" + }, + { + "type": "minecraft:item", + "name": "superbwarfare:svd_blueprint" + }, + { + "type": "minecraft:item", + "name": "superbwarfare:m_98b_blueprint" + }, + { + "type": "minecraft:item", + "name": "superbwarfare:devotion_blueprint" + }, + { + "type": "minecraft:item", + "name": "superbwarfare:insidious_blueprint" + } + ], + "rolls": 1.0 + }, + { + "bonus_rolls": 0.0, + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "add": false, + "count": { + "type": "minecraft:uniform", + "max": 2.0, + "min": 1.0 + }, + "function": "minecraft:set_count" + } + ], + "name": "superbwarfare:handgun_ammo_box", + "weight": 12 + }, + { + "type": "minecraft:item", + "functions": [ + { + "add": false, + "count": { + "type": "minecraft:uniform", + "max": 2.0, + "min": 1.0 + }, + "function": "minecraft:set_count" + } + ], + "name": "superbwarfare:rifle_ammo_box", + "weight": 20 + }, + { + "type": "minecraft:item", + "functions": [ + { + "add": false, + "count": { + "type": "minecraft:uniform", + "max": 2.0, + "min": 1.0 + }, + "function": "minecraft:set_count" + } + ], + "name": "superbwarfare:sniper_ammo_box", + "weight": 10 + }, + { + "type": "minecraft:item", + "functions": [ + { + "add": false, + "count": { + "type": "minecraft:uniform", + "max": 2.0, + "min": 1.0 + }, + "function": "minecraft:set_count" + } + ], + "name": "superbwarfare:shotgun_ammo_box", + "weight": 17 + }, + { + "type": "minecraft:item", + "functions": [ + { + "add": false, + "count": { + "type": "minecraft:uniform", + "max": 3.0, + "min": 1.0 + }, + "function": "minecraft:set_count" + } + ], + "name": "superbwarfare:grenade_40mm", + "weight": 6 + }, + { + "type": "minecraft:item", + "functions": [ + { + "add": false, + "count": { + "type": "minecraft:uniform", + "max": 2.0, + "min": 1.0 + }, + "function": "minecraft:set_count" + } + ], + "name": "superbwarfare:rocket", + "weight": 4 + }, + { + "type": "minecraft:item", + "functions": [ + { + "add": false, + "count": { + "type": "minecraft:uniform", + "max": 4.0, + "min": 1.0 + }, + "function": "minecraft:set_count" + } + ], + "name": "superbwarfare:mortar_shell", + "weight": 6 + }, + { + "type": "minecraft:item", + "functions": [ + { + "add": false, + "count": { + "type": "minecraft:uniform", + "max": 3.0, + "min": 1.0 + }, + "function": "minecraft:set_count" + } + ], + "name": "superbwarfare:claymore_mine", + "weight": 3 + }, + { + "type": "minecraft:item", + "name": "superbwarfare:c4_bomb" + } + ], + "rolls": 2.0 + } + ], + "random_sequence": "superbwarfare:chests/blue_print_common" +} \ No newline at end of file diff --git a/src/generated/resources/data/superbwarfare/loot_table/chests/blue_print_epic.json b/src/generated/resources/data/superbwarfare/loot_table/chests/blue_print_epic.json new file mode 100644 index 000000000..0b9db152a --- /dev/null +++ b/src/generated/resources/data/superbwarfare/loot_table/chests/blue_print_epic.json @@ -0,0 +1,292 @@ +{ + "type": "minecraft:chest", + "pools": [ + { + "bonus_rolls": 0.0, + "entries": [ + { + "type": "minecraft:item", + "name": "superbwarfare:trachelium_blueprint", + "weight": 10 + }, + { + "type": "minecraft:item", + "name": "superbwarfare:hunting_rifle_blueprint", + "weight": 10 + }, + { + "type": "minecraft:item", + "name": "superbwarfare:bocek_blueprint", + "weight": 10 + }, + { + "type": "minecraft:item", + "name": "superbwarfare:rpk_blueprint", + "weight": 10 + }, + { + "type": "minecraft:item", + "name": "superbwarfare:vector_blueprint", + "weight": 10 + }, + { + "type": "minecraft:item", + "name": "superbwarfare:mk_14_blueprint", + "weight": 10 + }, + { + "type": "minecraft:item", + "name": "superbwarfare:m_60_blueprint", + "weight": 10 + }, + { + "type": "minecraft:item", + "name": "superbwarfare:svd_blueprint", + "weight": 10 + }, + { + "type": "minecraft:item", + "name": "superbwarfare:m_98b_blueprint", + "weight": 10 + }, + { + "type": "minecraft:item", + "name": "superbwarfare:devotion_blueprint", + "weight": 10 + }, + { + "type": "minecraft:item", + "name": "superbwarfare:insidious_blueprint", + "weight": 10 + }, + { + "type": "minecraft:item", + "name": "superbwarfare:aa_12_blueprint", + "weight": 20 + }, + { + "type": "minecraft:item", + "name": "superbwarfare:ntw_20_blueprint", + "weight": 20 + }, + { + "type": "minecraft:item", + "name": "superbwarfare:minigun_blueprint", + "weight": 20 + }, + { + "type": "minecraft:item", + "name": "superbwarfare:sentinel_blueprint", + "weight": 20 + }, + { + "type": "minecraft:item", + "name": "superbwarfare:javelin_blueprint", + "weight": 15 + }, + { + "type": "minecraft:item", + "name": "superbwarfare:secondary_cataclysm_blueprint", + "weight": 15 + }, + { + "type": "minecraft:item", + "name": "superbwarfare:mk_42_blueprint", + "weight": 10 + }, + { + "type": "minecraft:item", + "name": "superbwarfare:mle_1934_blueprint", + "weight": 10 + }, + { + "type": "minecraft:item", + "name": "superbwarfare:annihilator_blueprint", + "weight": 5 + } + ], + "rolls": 1.0 + }, + { + "bonus_rolls": 0.0, + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "add": false, + "count": { + "type": "minecraft:uniform", + "max": 4.0, + "min": 2.0 + }, + "function": "minecraft:set_count" + } + ], + "name": "superbwarfare:handgun_ammo_box", + "weight": 12 + }, + { + "type": "minecraft:item", + "functions": [ + { + "add": false, + "count": { + "type": "minecraft:uniform", + "max": 4.0, + "min": 2.0 + }, + "function": "minecraft:set_count" + } + ], + "name": "superbwarfare:rifle_ammo_box", + "weight": 20 + }, + { + "type": "minecraft:item", + "functions": [ + { + "add": false, + "count": { + "type": "minecraft:uniform", + "max": 4.0, + "min": 2.0 + }, + "function": "minecraft:set_count" + } + ], + "name": "superbwarfare:sniper_ammo_box", + "weight": 10 + }, + { + "type": "minecraft:item", + "functions": [ + { + "add": false, + "count": { + "type": "minecraft:uniform", + "max": 4.0, + "min": 2.0 + }, + "function": "minecraft:set_count" + } + ], + "name": "superbwarfare:shotgun_ammo_box", + "weight": 17 + }, + { + "type": "minecraft:item", + "functions": [ + { + "add": false, + "count": { + "type": "minecraft:uniform", + "max": 24.0, + "min": 10.0 + }, + "function": "minecraft:set_count" + } + ], + "name": "superbwarfare:heavy_ammo", + "weight": 10 + }, + { + "type": "minecraft:item", + "functions": [ + { + "add": false, + "count": { + "type": "minecraft:uniform", + "max": 12.0, + "min": 4.0 + }, + "function": "minecraft:set_count" + } + ], + "name": "superbwarfare:grenade_40mm", + "weight": 6 + }, + { + "type": "minecraft:item", + "functions": [ + { + "add": false, + "count": { + "type": "minecraft:uniform", + "max": 8.0, + "min": 4.0 + }, + "function": "minecraft:set_count" + } + ], + "name": "superbwarfare:rocket", + "weight": 4 + }, + { + "type": "minecraft:item", + "functions": [ + { + "add": false, + "count": { + "type": "minecraft:uniform", + "max": 8.0, + "min": 4.0 + }, + "function": "minecraft:set_count" + } + ], + "name": "superbwarfare:mortar_shell", + "weight": 6 + }, + { + "type": "minecraft:item", + "functions": [ + { + "add": false, + "count": { + "type": "minecraft:uniform", + "max": 12.0, + "min": 4.0 + }, + "function": "minecraft:set_count" + } + ], + "name": "superbwarfare:claymore_mine", + "weight": 3 + }, + { + "type": "minecraft:item", + "functions": [ + { + "add": false, + "count": { + "type": "minecraft:uniform", + "max": 4.0, + "min": 2.0 + }, + "function": "minecraft:set_count" + } + ], + "name": "superbwarfare:c4_bomb" + }, + { + "type": "minecraft:item", + "functions": [ + { + "add": false, + "count": { + "type": "minecraft:uniform", + "max": 2.0, + "min": 1.0 + }, + "function": "minecraft:set_count" + } + ], + "name": "superbwarfare:javelin_missile" + } + ], + "rolls": 2.0 + } + ], + "random_sequence": "superbwarfare:chests/blue_print_epic" +} \ No newline at end of file diff --git a/src/generated/resources/data/superbwarfare/loot_table/chests/blue_print_rare.json b/src/generated/resources/data/superbwarfare/loot_table/chests/blue_print_rare.json new file mode 100644 index 000000000..a2a4f043a --- /dev/null +++ b/src/generated/resources/data/superbwarfare/loot_table/chests/blue_print_rare.json @@ -0,0 +1,350 @@ +{ + "type": "minecraft:chest", + "pools": [ + { + "bonus_rolls": 0.0, + "entries": [ + { + "type": "minecraft:item", + "name": "superbwarfare:taser_blueprint", + "weight": 10 + }, + { + "type": "minecraft:item", + "name": "superbwarfare:glock_17_blueprint", + "weight": 10 + }, + { + "type": "minecraft:item", + "name": "superbwarfare:mp_443_blueprint", + "weight": 10 + }, + { + "type": "minecraft:item", + "name": "superbwarfare:m_1911_blueprint", + "weight": 10 + }, + { + "type": "minecraft:item", + "name": "superbwarfare:marlin_blueprint", + "weight": 10 + }, + { + "type": "minecraft:item", + "name": "superbwarfare:glock_18_blueprint", + "weight": 30 + }, + { + "type": "minecraft:item", + "name": "superbwarfare:m_79_blueprint", + "weight": 30 + }, + { + "type": "minecraft:item", + "name": "superbwarfare:m_4_blueprint", + "weight": 30 + }, + { + "type": "minecraft:item", + "name": "superbwarfare:sks_blueprint", + "weight": 30 + }, + { + "type": "minecraft:item", + "name": "superbwarfare:k_98_blueprint", + "weight": 30 + }, + { + "type": "minecraft:item", + "name": "superbwarfare:mosin_nagant_blueprint", + "weight": 30 + }, + { + "type": "minecraft:item", + "name": "superbwarfare:ak_47_blueprint", + "weight": 30 + }, + { + "type": "minecraft:item", + "name": "superbwarfare:m_870_blueprint", + "weight": 30 + }, + { + "type": "minecraft:item", + "name": "superbwarfare:hk_416_blueprint", + "weight": 30 + }, + { + "type": "minecraft:item", + "name": "superbwarfare:ak_12_blueprint", + "weight": 30 + }, + { + "type": "minecraft:item", + "name": "superbwarfare:qbz_95_blueprint", + "weight": 30 + }, + { + "type": "minecraft:item", + "name": "superbwarfare:rpg_blueprint", + "weight": 30 + }, + { + "type": "minecraft:item", + "name": "superbwarfare:m2hb_blueprint", + "weight": 30 + }, + { + "type": "minecraft:item", + "name": "superbwarfare:trachelium_blueprint", + "weight": 10 + }, + { + "type": "minecraft:item", + "name": "superbwarfare:hunting_rifle_blueprint", + "weight": 10 + }, + { + "type": "minecraft:item", + "name": "superbwarfare:bocek_blueprint", + "weight": 10 + }, + { + "type": "minecraft:item", + "name": "superbwarfare:rpk_blueprint", + "weight": 10 + }, + { + "type": "minecraft:item", + "name": "superbwarfare:vector_blueprint", + "weight": 10 + }, + { + "type": "minecraft:item", + "name": "superbwarfare:mk_14_blueprint", + "weight": 10 + }, + { + "type": "minecraft:item", + "name": "superbwarfare:m_60_blueprint", + "weight": 10 + }, + { + "type": "minecraft:item", + "name": "superbwarfare:svd_blueprint", + "weight": 10 + }, + { + "type": "minecraft:item", + "name": "superbwarfare:m_98b_blueprint", + "weight": 10 + }, + { + "type": "minecraft:item", + "name": "superbwarfare:devotion_blueprint", + "weight": 10 + }, + { + "type": "minecraft:item", + "name": "superbwarfare:insidious_blueprint", + "weight": 10 + }, + { + "type": "minecraft:item", + "name": "superbwarfare:aa_12_blueprint", + "weight": 3 + }, + { + "type": "minecraft:item", + "name": "superbwarfare:ntw_20_blueprint", + "weight": 3 + }, + { + "type": "minecraft:item", + "name": "superbwarfare:minigun_blueprint", + "weight": 3 + }, + { + "type": "minecraft:item", + "name": "superbwarfare:sentinel_blueprint", + "weight": 3 + }, + { + "type": "minecraft:item", + "name": "superbwarfare:javelin_blueprint", + "weight": 3 + }, + { + "type": "minecraft:item", + "name": "superbwarfare:secondary_cataclysm_blueprint", + "weight": 3 + }, + { + "type": "minecraft:item", + "name": "superbwarfare:mk_42_blueprint", + "weight": 3 + }, + { + "type": "minecraft:item", + "name": "superbwarfare:mle_1934_blueprint", + "weight": 3 + }, + { + "type": "minecraft:item", + "name": "superbwarfare:annihilator_blueprint" + } + ], + "rolls": 1.0 + }, + { + "bonus_rolls": 0.0, + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "add": false, + "count": { + "type": "minecraft:uniform", + "max": 3.0, + "min": 1.0 + }, + "function": "minecraft:set_count" + } + ], + "name": "superbwarfare:handgun_ammo_box", + "weight": 12 + }, + { + "type": "minecraft:item", + "functions": [ + { + "add": false, + "count": { + "type": "minecraft:uniform", + "max": 3.0, + "min": 1.0 + }, + "function": "minecraft:set_count" + } + ], + "name": "superbwarfare:rifle_ammo_box", + "weight": 20 + }, + { + "type": "minecraft:item", + "functions": [ + { + "add": false, + "count": { + "type": "minecraft:uniform", + "max": 3.0, + "min": 1.0 + }, + "function": "minecraft:set_count" + } + ], + "name": "superbwarfare:sniper_ammo_box", + "weight": 10 + }, + { + "type": "minecraft:item", + "functions": [ + { + "add": false, + "count": { + "type": "minecraft:uniform", + "max": 3.0, + "min": 1.0 + }, + "function": "minecraft:set_count" + } + ], + "name": "superbwarfare:shotgun_ammo_box", + "weight": 17 + }, + { + "type": "minecraft:item", + "functions": [ + { + "add": false, + "count": { + "type": "minecraft:uniform", + "max": 6.0, + "min": 2.0 + }, + "function": "minecraft:set_count" + } + ], + "name": "superbwarfare:grenade_40mm", + "weight": 6 + }, + { + "type": "minecraft:item", + "functions": [ + { + "add": false, + "count": { + "type": "minecraft:uniform", + "max": 4.0, + "min": 2.0 + }, + "function": "minecraft:set_count" + } + ], + "name": "superbwarfare:rocket", + "weight": 4 + }, + { + "type": "minecraft:item", + "functions": [ + { + "add": false, + "count": { + "type": "minecraft:uniform", + "max": 8.0, + "min": 2.0 + }, + "function": "minecraft:set_count" + } + ], + "name": "superbwarfare:mortar_shell", + "weight": 6 + }, + { + "type": "minecraft:item", + "functions": [ + { + "add": false, + "count": { + "type": "minecraft:uniform", + "max": 6.0, + "min": 2.0 + }, + "function": "minecraft:set_count" + } + ], + "name": "superbwarfare:claymore_mine", + "weight": 3 + }, + { + "type": "minecraft:item", + "functions": [ + { + "add": false, + "count": { + "type": "minecraft:uniform", + "max": 2.0, + "min": 1.0 + }, + "function": "minecraft:set_count" + } + ], + "name": "superbwarfare:c4_bomb" + } + ], + "rolls": 2.0 + } + ], + "random_sequence": "superbwarfare:chests/blue_print_rare" +} \ No newline at end of file diff --git a/src/main/java/com/atsuishio/superbwarfare/datagen/ModCustomLootProvider.java b/src/main/java/com/atsuishio/superbwarfare/datagen/ModCustomLootProvider.java index 31c647a71..9816cb731 100644 --- a/src/main/java/com/atsuishio/superbwarfare/datagen/ModCustomLootProvider.java +++ b/src/main/java/com/atsuishio/superbwarfare/datagen/ModCustomLootProvider.java @@ -6,25 +6,30 @@ import net.minecraft.core.HolderLookup; import net.minecraft.core.registries.Registries; import net.minecraft.data.loot.LootTableSubProvider; import net.minecraft.resources.ResourceKey; -import net.minecraft.resources.ResourceLocation; import net.minecraft.world.level.ItemLike; import net.minecraft.world.level.storage.loot.LootPool; import net.minecraft.world.level.storage.loot.LootTable; import net.minecraft.world.level.storage.loot.entries.LootItem; +import net.minecraft.world.level.storage.loot.functions.LootItemFunction; +import net.minecraft.world.level.storage.loot.functions.SetItemCountFunction; +import net.minecraft.world.level.storage.loot.predicates.LootItemCondition; import net.minecraft.world.level.storage.loot.predicates.LootItemRandomChanceCondition; import net.minecraft.world.level.storage.loot.providers.number.ConstantValue; +import net.minecraft.world.level.storage.loot.providers.number.UniformGenerator; import org.jetbrains.annotations.NotNull; +import java.util.ArrayList; +import java.util.List; import java.util.function.BiConsumer; public class ModCustomLootProvider implements LootTableSubProvider { - public static ResourceLocation containers(String name) { - return Mod.loc("containers/" + name); + public static ResourceKey containers(String name) { + return ResourceKey.create(Registries.LOOT_TABLE, Mod.loc("containers/" + name)); } - public static ResourceLocation chests(String name) { - return Mod.loc("chests/" + name); + public static ResourceKey chests(String name) { + return ResourceKey.create(Registries.LOOT_TABLE, Mod.loc("chests/" + name)); } public ModCustomLootProvider(HolderLookup.Provider provider) { @@ -33,51 +38,181 @@ public class ModCustomLootProvider implements LootTableSubProvider { @Override public void generate(@NotNull BiConsumer, LootTable.Builder> output) { - output.accept(ResourceKey.create(Registries.LOOT_TABLE, chests("ancient_cpu")), - LootTable.lootTable().withPool(singleItem(ModItems.ANCIENT_CPU.get(), 1, 1, 1, 1) - .when(() -> LootItemRandomChanceCondition.randomChance(0.4f).build())) + output.accept(chests("ancient_cpu"), LootTable.lootTable().withPool(singleItem(ModItems.ANCIENT_CPU.get(), 1, 1, 1, 1) + .when(() -> LootItemRandomChanceCondition.randomChance(0.4f).build())) ); - output.accept(ResourceKey.create(Registries.LOOT_TABLE, containers("blueprints")), - LootTable.lootTable().withPool(multiItems(1, 0, - new PoolTriple(ModItems.GLOCK_17_BLUEPRINT.get(), 60, 0), - new PoolTriple(ModItems.MP_443_BLUEPRINT.get(), 60, 0), - new PoolTriple(ModItems.TASER_BLUEPRINT.get(), 60, 0), - new PoolTriple(ModItems.MARLIN_BLUEPRINT.get(), 60, 0), - new PoolTriple(ModItems.M_1911_BLUEPRINT.get(), 60, 0), + output.accept(chests("blue_print_common"), LootTable.lootTable().withPool(multiItems(1, 0, + new PoolTriple(ModItems.TASER_BLUEPRINT.get(), 50, 0), + new PoolTriple(ModItems.GLOCK_17_BLUEPRINT.get(), 50, 0), + new PoolTriple(ModItems.MP_443_BLUEPRINT.get(), 50, 0), + new PoolTriple(ModItems.M_1911_BLUEPRINT.get(), 50, 0), + new PoolTriple(ModItems.MARLIN_BLUEPRINT.get(), 50, 0), - new PoolTriple(ModItems.GLOCK_18_BLUEPRINT.get(), 42, 0), - new PoolTriple(ModItems.M_79_BLUEPRINT.get(), 42, 0), - new PoolTriple(ModItems.M_4_BLUEPRINT.get(), 42, 0), - new PoolTriple(ModItems.SKS_BLUEPRINT.get(), 42, 0), - new PoolTriple(ModItems.M_870_BLUEPRINT.get(), 42, 0), - new PoolTriple(ModItems.AK_47_BLUEPRINT.get(), 42, 0), - new PoolTriple(ModItems.K_98_BLUEPRINT.get(), 42, 0), - new PoolTriple(ModItems.MOSIN_NAGANT_BLUEPRINT.get(), 42, 0), - new PoolTriple(ModItems.HK_416_BLUEPRINT.get(), 42, 0), - new PoolTriple(ModItems.AK_12_BLUEPRINT.get(), 42, 0), - new PoolTriple(ModItems.QBZ_95_BLUEPRINT.get(), 42, 0), - new PoolTriple(ModItems.RPG_BLUEPRINT.get(), 42, 0), + new PoolTriple(ModItems.GLOCK_18_BLUEPRINT.get(), 15, 0), + new PoolTriple(ModItems.M_79_BLUEPRINT.get(), 15, 0), + new PoolTriple(ModItems.M_4_BLUEPRINT.get(), 15, 0), + new PoolTriple(ModItems.SKS_BLUEPRINT.get(), 15, 0), + new PoolTriple(ModItems.K_98_BLUEPRINT.get(), 15, 0), + new PoolTriple(ModItems.MOSIN_NAGANT_BLUEPRINT.get(), 15, 0), + new PoolTriple(ModItems.AK_47_BLUEPRINT.get(), 15, 0), + new PoolTriple(ModItems.M_870_BLUEPRINT.get(), 15, 0), + new PoolTriple(ModItems.HK_416_BLUEPRINT.get(), 15, 0), + new PoolTriple(ModItems.AK_12_BLUEPRINT.get(), 15, 0), + new PoolTriple(ModItems.QBZ_95_BLUEPRINT.get(), 15, 0), + new PoolTriple(ModItems.RPG_BLUEPRINT.get(), 15, 0), + new PoolTriple(ModItems.M_2_HB_BLUEPRINT.get(), 15, 0), - new PoolTriple(ModItems.TRACHELIUM_BLUEPRINT.get(), 15, 0), - new PoolTriple(ModItems.HUNTING_RIFLE_BLUEPRINT.get(), 15, 0), - new PoolTriple(ModItems.BOCEK_BLUEPRINT.get(), 15, 0), - new PoolTriple(ModItems.RPK_BLUEPRINT.get(), 15, 0), - new PoolTriple(ModItems.VECTOR_BLUEPRINT.get(), 15, 0), - new PoolTriple(ModItems.MK_14_BLUEPRINT.get(), 15, 0), - new PoolTriple(ModItems.M_60_BLUEPRINT.get(), 15, 0), - new PoolTriple(ModItems.SVD_BLUEPRINT.get(), 15, 0), - new PoolTriple(ModItems.M_98B_BLUEPRINT.get(), 15, 0), - new PoolTriple(ModItems.DEVOTION_BLUEPRINT.get(), 15, 0), - new PoolTriple(ModItems.INSIDIOUS_BLUEPRINT.get(), 15, 0), + new PoolTriple(ModItems.TRACHELIUM_BLUEPRINT.get(), 1, 0), + new PoolTriple(ModItems.HUNTING_RIFLE_BLUEPRINT.get(), 1, 0), + new PoolTriple(ModItems.BOCEK_BLUEPRINT.get(), 1, 0), + new PoolTriple(ModItems.RPK_BLUEPRINT.get(), 1, 0), + new PoolTriple(ModItems.VECTOR_BLUEPRINT.get(), 1, 0), + new PoolTriple(ModItems.MK_14_BLUEPRINT.get(), 1, 0), + new PoolTriple(ModItems.M_60_BLUEPRINT.get(), 1, 0), + new PoolTriple(ModItems.SVD_BLUEPRINT.get(), 1, 0), + new PoolTriple(ModItems.M_98B_BLUEPRINT.get(), 1, 0), + new PoolTriple(ModItems.DEVOTION_BLUEPRINT.get(), 1, 0), + new PoolTriple(ModItems.INSIDIOUS_BLUEPRINT.get(), 1, 0) + )).withPool(multiItems(2, 0, + new PoolTriple(ModItems.HANDGUN_AMMO_BOX.get(), 12, 0).setCountBetween(1, 2), + new PoolTriple(ModItems.RIFLE_AMMO_BOX.get(), 20, 0).setCountBetween(1, 2), + new PoolTriple(ModItems.SNIPER_AMMO_BOX.get(), 10, 0).setCountBetween(1, 2), + new PoolTriple(ModItems.SHOTGUN_AMMO_BOX.get(), 17, 0).setCountBetween(1, 2), + new PoolTriple(ModItems.GRENADE_40MM.get(), 6, 0).setCountBetween(1, 3), + new PoolTriple(ModItems.ROCKET.get(), 4, 0).setCountBetween(1, 2), + new PoolTriple(ModItems.MORTAR_SHELL.get(), 6, 0).setCountBetween(1, 4), + new PoolTriple(ModItems.CLAYMORE_MINE.get(), 3, 0).setCountBetween(1, 3), + new PoolTriple(ModItems.C4_BOMB.get(), 1, 0) + ))); + output.accept(chests("blue_print_rare"), LootTable.lootTable().withPool(multiItems(1, 0, + new PoolTriple(ModItems.TASER_BLUEPRINT.get(), 10, 0), + new PoolTriple(ModItems.GLOCK_17_BLUEPRINT.get(), 10, 0), + new PoolTriple(ModItems.MP_443_BLUEPRINT.get(), 10, 0), + new PoolTriple(ModItems.M_1911_BLUEPRINT.get(), 10, 0), + new PoolTriple(ModItems.MARLIN_BLUEPRINT.get(), 10, 0), - new PoolTriple(ModItems.AA_12_BLUEPRINT.get(), 5, 0), - new PoolTriple(ModItems.NTW_20_BLUEPRINT.get(), 5, 0), - new PoolTriple(ModItems.MINIGUN_BLUEPRINT.get(), 5, 0), - new PoolTriple(ModItems.SENTINEL_BLUEPRINT.get(), 5, 0), - new PoolTriple(ModItems.JAVELIN_BLUEPRINT.get(), 5, 0), - new PoolTriple(ModItems.SECONDARY_CATACLYSM_BLUEPRINT.get(), 5, 0) - ))); + new PoolTriple(ModItems.GLOCK_18_BLUEPRINT.get(), 30, 0), + new PoolTriple(ModItems.M_79_BLUEPRINT.get(), 30, 0), + new PoolTriple(ModItems.M_4_BLUEPRINT.get(), 30, 0), + new PoolTriple(ModItems.SKS_BLUEPRINT.get(), 30, 0), + new PoolTriple(ModItems.K_98_BLUEPRINT.get(), 30, 0), + new PoolTriple(ModItems.MOSIN_NAGANT_BLUEPRINT.get(), 30, 0), + new PoolTriple(ModItems.AK_47_BLUEPRINT.get(), 30, 0), + new PoolTriple(ModItems.M_870_BLUEPRINT.get(), 30, 0), + new PoolTriple(ModItems.HK_416_BLUEPRINT.get(), 30, 0), + new PoolTriple(ModItems.AK_12_BLUEPRINT.get(), 30, 0), + new PoolTriple(ModItems.QBZ_95_BLUEPRINT.get(), 30, 0), + new PoolTriple(ModItems.RPG_BLUEPRINT.get(), 30, 0), + new PoolTriple(ModItems.M_2_HB_BLUEPRINT.get(), 30, 0), + + new PoolTriple(ModItems.TRACHELIUM_BLUEPRINT.get(), 10, 0), + new PoolTriple(ModItems.HUNTING_RIFLE_BLUEPRINT.get(), 10, 0), + new PoolTriple(ModItems.BOCEK_BLUEPRINT.get(), 10, 0), + new PoolTriple(ModItems.RPK_BLUEPRINT.get(), 10, 0), + new PoolTriple(ModItems.VECTOR_BLUEPRINT.get(), 10, 0), + new PoolTriple(ModItems.MK_14_BLUEPRINT.get(), 10, 0), + new PoolTriple(ModItems.M_60_BLUEPRINT.get(), 10, 0), + new PoolTriple(ModItems.SVD_BLUEPRINT.get(), 10, 0), + new PoolTriple(ModItems.M_98B_BLUEPRINT.get(), 10, 0), + new PoolTriple(ModItems.DEVOTION_BLUEPRINT.get(), 10, 0), + new PoolTriple(ModItems.INSIDIOUS_BLUEPRINT.get(), 10, 0), + + new PoolTriple(ModItems.AA_12_BLUEPRINT.get(), 3, 0), + new PoolTriple(ModItems.NTW_20_BLUEPRINT.get(), 3, 0), + new PoolTriple(ModItems.MINIGUN_BLUEPRINT.get(), 3, 0), + new PoolTriple(ModItems.SENTINEL_BLUEPRINT.get(), 3, 0), + new PoolTriple(ModItems.JAVELIN_BLUEPRINT.get(), 3, 0), + new PoolTriple(ModItems.SECONDARY_CATACLYSM_BLUEPRINT.get(), 3, 0), + new PoolTriple(ModItems.MK_42_BLUEPRINT.get(), 3, 0), + new PoolTriple(ModItems.MLE_1934_BLUEPRINT.get(), 3, 0), + new PoolTriple(ModItems.ANNIHILATOR_BLUEPRINT.get(), 1, 0) + )).withPool(multiItems(2, 0, + new PoolTriple(ModItems.HANDGUN_AMMO_BOX.get(), 12, 0).setCountBetween(1, 3), + new PoolTriple(ModItems.RIFLE_AMMO_BOX.get(), 20, 0).setCountBetween(1, 3), + new PoolTriple(ModItems.SNIPER_AMMO_BOX.get(), 10, 0).setCountBetween(1, 3), + new PoolTriple(ModItems.SHOTGUN_AMMO_BOX.get(), 17, 0).setCountBetween(1, 3), + new PoolTriple(ModItems.GRENADE_40MM.get(), 6, 0).setCountBetween(2, 6), + new PoolTriple(ModItems.ROCKET.get(), 4, 0).setCountBetween(2, 4), + new PoolTriple(ModItems.MORTAR_SHELL.get(), 6, 0).setCountBetween(2, 8), + new PoolTriple(ModItems.CLAYMORE_MINE.get(), 3, 0).setCountBetween(2, 6), + new PoolTriple(ModItems.C4_BOMB.get(), 1, 0).setCountBetween(1, 2) + ))); + output.accept(chests("blue_print_epic"), LootTable.lootTable().withPool(multiItems(1, 0, + new PoolTriple(ModItems.TRACHELIUM_BLUEPRINT.get(), 10, 0), + new PoolTriple(ModItems.HUNTING_RIFLE_BLUEPRINT.get(), 10, 0), + new PoolTriple(ModItems.BOCEK_BLUEPRINT.get(), 10, 0), + new PoolTriple(ModItems.RPK_BLUEPRINT.get(), 10, 0), + new PoolTriple(ModItems.VECTOR_BLUEPRINT.get(), 10, 0), + new PoolTriple(ModItems.MK_14_BLUEPRINT.get(), 10, 0), + new PoolTriple(ModItems.M_60_BLUEPRINT.get(), 10, 0), + new PoolTriple(ModItems.SVD_BLUEPRINT.get(), 10, 0), + new PoolTriple(ModItems.M_98B_BLUEPRINT.get(), 10, 0), + new PoolTriple(ModItems.DEVOTION_BLUEPRINT.get(), 10, 0), + new PoolTriple(ModItems.INSIDIOUS_BLUEPRINT.get(), 10, 0), + + new PoolTriple(ModItems.AA_12_BLUEPRINT.get(), 20, 0), + new PoolTriple(ModItems.NTW_20_BLUEPRINT.get(), 20, 0), + new PoolTriple(ModItems.MINIGUN_BLUEPRINT.get(), 20, 0), + new PoolTriple(ModItems.SENTINEL_BLUEPRINT.get(), 20, 0), + new PoolTriple(ModItems.JAVELIN_BLUEPRINT.get(), 15, 0), + new PoolTriple(ModItems.SECONDARY_CATACLYSM_BLUEPRINT.get(), 15, 0), + new PoolTriple(ModItems.MK_42_BLUEPRINT.get(), 10, 0), + new PoolTriple(ModItems.MLE_1934_BLUEPRINT.get(), 10, 0), + new PoolTriple(ModItems.ANNIHILATOR_BLUEPRINT.get(), 5, 0) + )).withPool(multiItems(2, 0, + new PoolTriple(ModItems.HANDGUN_AMMO_BOX.get(), 12, 0).setCountBetween(2, 4), + new PoolTriple(ModItems.RIFLE_AMMO_BOX.get(), 20, 0).setCountBetween(2, 4), + new PoolTriple(ModItems.SNIPER_AMMO_BOX.get(), 10, 0).setCountBetween(2, 4), + new PoolTriple(ModItems.SHOTGUN_AMMO_BOX.get(), 17, 0).setCountBetween(2, 4), + new PoolTriple(ModItems.HEAVY_AMMO.get(), 10, 0).setCountBetween(10, 24), + new PoolTriple(ModItems.GRENADE_40MM.get(), 6, 0).setCountBetween(4, 12), + new PoolTriple(ModItems.ROCKET.get(), 4, 0).setCountBetween(4, 8), + new PoolTriple(ModItems.MORTAR_SHELL.get(), 6, 0).setCountBetween(4, 8), + new PoolTriple(ModItems.CLAYMORE_MINE.get(), 3, 0).setCountBetween(4, 12), + new PoolTriple(ModItems.C4_BOMB.get(), 1, 0).setCountBetween(2, 4), + new PoolTriple(ModItems.JAVELIN_MISSILE.get(), 1, 0).setCountBetween(1, 2) + ))); + + output.accept(containers("blueprints"), LootTable.lootTable().withPool(multiItems(1, 0, + new PoolTriple(ModItems.GLOCK_17_BLUEPRINT.get(), 60, 0), + new PoolTriple(ModItems.MP_443_BLUEPRINT.get(), 60, 0), + new PoolTriple(ModItems.TASER_BLUEPRINT.get(), 60, 0), + new PoolTriple(ModItems.MARLIN_BLUEPRINT.get(), 60, 0), + new PoolTriple(ModItems.M_1911_BLUEPRINT.get(), 60, 0), + + new PoolTriple(ModItems.GLOCK_18_BLUEPRINT.get(), 42, 0), + new PoolTriple(ModItems.M_79_BLUEPRINT.get(), 42, 0), + new PoolTriple(ModItems.M_4_BLUEPRINT.get(), 42, 0), + new PoolTriple(ModItems.SKS_BLUEPRINT.get(), 42, 0), + new PoolTriple(ModItems.M_870_BLUEPRINT.get(), 42, 0), + new PoolTriple(ModItems.AK_47_BLUEPRINT.get(), 42, 0), + new PoolTriple(ModItems.K_98_BLUEPRINT.get(), 42, 0), + new PoolTriple(ModItems.MOSIN_NAGANT_BLUEPRINT.get(), 42, 0), + new PoolTriple(ModItems.HK_416_BLUEPRINT.get(), 42, 0), + new PoolTriple(ModItems.AK_12_BLUEPRINT.get(), 42, 0), + new PoolTriple(ModItems.QBZ_95_BLUEPRINT.get(), 42, 0), + new PoolTriple(ModItems.RPG_BLUEPRINT.get(), 42, 0), + + new PoolTriple(ModItems.TRACHELIUM_BLUEPRINT.get(), 15, 0), + new PoolTriple(ModItems.HUNTING_RIFLE_BLUEPRINT.get(), 15, 0), + new PoolTriple(ModItems.BOCEK_BLUEPRINT.get(), 15, 0), + new PoolTriple(ModItems.RPK_BLUEPRINT.get(), 15, 0), + new PoolTriple(ModItems.VECTOR_BLUEPRINT.get(), 15, 0), + new PoolTriple(ModItems.MK_14_BLUEPRINT.get(), 15, 0), + new PoolTriple(ModItems.M_60_BLUEPRINT.get(), 15, 0), + new PoolTriple(ModItems.SVD_BLUEPRINT.get(), 15, 0), + new PoolTriple(ModItems.M_98B_BLUEPRINT.get(), 15, 0), + new PoolTriple(ModItems.DEVOTION_BLUEPRINT.get(), 15, 0), + new PoolTriple(ModItems.INSIDIOUS_BLUEPRINT.get(), 15, 0), + + new PoolTriple(ModItems.AA_12_BLUEPRINT.get(), 5, 0), + new PoolTriple(ModItems.NTW_20_BLUEPRINT.get(), 5, 0), + new PoolTriple(ModItems.MINIGUN_BLUEPRINT.get(), 5, 0), + new PoolTriple(ModItems.SENTINEL_BLUEPRINT.get(), 5, 0), + new PoolTriple(ModItems.JAVELIN_BLUEPRINT.get(), 5, 0), + new PoolTriple(ModItems.SECONDARY_CATACLYSM_BLUEPRINT.get(), 5, 0) + ))); } public LootPool.Builder singleItem(ItemLike item, int weight) { @@ -92,11 +227,44 @@ public class ModCustomLootProvider implements LootTableSubProvider { public final LootPool.Builder multiItems(float rolls, float bonus, PoolTriple... triplet) { var builder = LootPool.lootPool().setRolls(ConstantValue.exactly(rolls)).setBonusRolls(ConstantValue.exactly(bonus)); for (var t : triplet) { - builder.add(LootItem.lootTableItem(t.item()).setWeight(t.weight()).setQuality(t.quality())); + var entry = LootItem.lootTableItem(t.item).setWeight(t.weight).setQuality(t.quality); + for (var c : t.conditions) { + entry.when(c); + } + for (var f : t.functions) { + entry.apply(f); + } + builder.add(entry); } return builder; } - public record PoolTriple(ItemLike item, int weight, int quality) { + public static class PoolTriple { + + public ItemLike item; + public int weight; + public int quality; + public List conditions = new ArrayList<>(); + public List functions = new ArrayList<>(); + + public PoolTriple(ItemLike item, int weight, int quality) { + this.item = item; + this.weight = weight; + this.quality = quality; + } + + public PoolTriple condition(LootItemCondition.Builder condition) { + this.conditions.add(condition); + return this; + } + + public PoolTriple function(LootItemFunction.Builder function) { + this.functions.add(function); + return this; + } + + public PoolTriple setCountBetween(int min, int max) { + return this.function(SetItemCountFunction.setCount(UniformGenerator.between(min, max))); + } } } diff --git a/src/main/resources/data/superbwarfare/loot_table/chests/blue_print_common.json b/src/main/resources/data/superbwarfare/loot_table/chests/blue_print_common.json deleted file mode 100644 index 486eb3330..000000000 --- a/src/main/resources/data/superbwarfare/loot_table/chests/blue_print_common.json +++ /dev/null @@ -1,492 +0,0 @@ -{ - "type": "minecraft:chest", - "pools": [ - { - "rolls": 1, - "entries": [ - { - "type": "minecraft:item", - "name": "superbwarfare:taser_blueprint", - "weight": 30, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 1 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:glock_17_blueprint", - "weight": 50, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 1 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:mp_443_blueprint", - "weight": 50, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 1 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:m_1911_blueprint", - "weight": 45, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 1 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:glock_18_blueprint", - "weight": 15, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 1 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:m_79_blueprint", - "weight": 14, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 1 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:m_4_blueprint", - "weight": 15, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 1 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:sks_blueprint", - "weight": 15, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 1 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:marlin_blueprint", - "weight": 35, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 1 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:k_98_blueprint", - "weight": 10, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 1 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:mosin_nagant_blueprint", - "weight": 10, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 1 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:ak_47_blueprint", - "weight": 15, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 1 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:m2hb_blueprint", - "weight": 15, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 1 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:hunting_rifle_blueprint", - "weight": 1, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 1 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:rpg_blueprint", - "weight": 15, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 1 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:qbz_95_blueprint", - "weight": 15, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 1 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:hk_416_blueprint", - "weight": 15, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 1 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:ak_12_blueprint", - "weight": 15, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 1 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:rpk_blueprint", - "weight": 1, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 1 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:vector_blueprint", - "weight": 1, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 1 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:mk_14_blueprint", - "weight": 1, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 1 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:m_60_blueprint", - "weight": 1, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 1 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:svd_blueprint", - "weight": 1, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 1 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:m_870_blueprint", - "weight": 15, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 1 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:m_98b_blueprint", - "weight": 1, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 1 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:devotion_blueprint", - "weight": 1, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 1 - } - } - ] - } - ] - }, - { - "rolls": 2, - "entries": [ - { - "type": "minecraft:item", - "name": "superbwarfare:handgun_ammo_box", - "weight": 12, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 2 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:rifle_ammo_box", - "weight": 20, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 2 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:sniper_ammo_box", - "weight": 10, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 2 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:shotgun_ammo_box", - "weight": 17, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 2 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:grenade_40mm", - "weight": 6, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 3 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:rocket", - "weight": 4, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 2 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:mortar_shell", - "weight": 6, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 4 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:claymore_mine", - "weight": 3, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 3 - } - } - ] - } - ] - } - ], - "random_sequence": "superbwarfare:chests/blue_print_common" -} \ No newline at end of file diff --git a/src/main/resources/data/superbwarfare/loot_table/chests/blue_print_epic.json b/src/main/resources/data/superbwarfare/loot_table/chests/blue_print_epic.json deleted file mode 100644 index 1abc32573..000000000 --- a/src/main/resources/data/superbwarfare/loot_table/chests/blue_print_epic.json +++ /dev/null @@ -1,408 +0,0 @@ -{ - "type": "minecraft:chest", - "pools": [ - { - "rolls": 1, - "entries": [ - { - "type": "minecraft:item", - "name": "superbwarfare:hunting_rifle_blueprint", - "weight": 10, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 1 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:rpk_blueprint", - "weight": 10, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 1 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:vector_blueprint", - "weight": 10, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 1 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:mk_14_blueprint", - "weight": 10, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 1 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:m_60_blueprint", - "weight": 10, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 1 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:svd_blueprint", - "weight": 10, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 1 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:m_98b_blueprint", - "weight": 10, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 1 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:devotion_blueprint", - "weight": 10, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 1 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:trachelium_blueprint", - "weight": 10, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 1 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:aa_12_blueprint", - "weight": 20, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 1 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:sentinel_blueprint", - "weight": 20, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 1 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:ntw_20_blueprint", - "weight": 20, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 1 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:bocek_blueprint", - "weight": 10, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 1 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:minigun_blueprint", - "weight": 20, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 1 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:javelin_blueprint", - "weight": 15, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 1 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:secondary_cataclysm_blueprint", - "weight": 15, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 1 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:mk_42_blueprint", - "weight": 10, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 1 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:mle_1934_blueprint", - "weight": 10, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 1 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:annihilator_blueprint", - "weight": 5, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 1 - } - } - ] - } - ] - }, - { - "rolls": 2, - "entries": [ - { - "type": "minecraft:item", - "name": "superbwarfare:handgun_ammo_box", - "weight": 12, - "functions": [ - { - "function": "set_count", - "count": { - "min": 2, - "max": 4 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:rifle_ammo_box", - "weight": 20, - "functions": [ - { - "function": "set_count", - "count": { - "min": 2, - "max": 4 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:sniper_ammo_box", - "weight": 10, - "functions": [ - { - "function": "set_count", - "count": { - "min": 2, - "max": 4 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:shotgun_ammo_box", - "weight": 17, - "functions": [ - { - "function": "set_count", - "count": { - "min": 2, - "max": 4 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:grenade_40mm", - "weight": 6, - "functions": [ - { - "function": "set_count", - "count": { - "min": 4, - "max": 12 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:rocket", - "weight": 4, - "functions": [ - { - "function": "set_count", - "count": { - "min": 4, - "max": 8 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:mortar_shell", - "weight": 6, - "functions": [ - { - "function": "set_count", - "count": { - "min": 4, - "max": 8 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:claymore_mine", - "weight": 3, - "functions": [ - { - "function": "set_count", - "count": { - "min": 4, - "max": 12 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:javelin_missile", - "weight": 1, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 2 - } - } - ] - } - ] - } - ], - "random_sequence": "superbwarfare:chests/blue_print_epic" -} \ No newline at end of file diff --git a/src/main/resources/data/superbwarfare/loot_table/chests/blue_print_rare.json b/src/main/resources/data/superbwarfare/loot_table/chests/blue_print_rare.json deleted file mode 100644 index 6ab3d3f9c..000000000 --- a/src/main/resources/data/superbwarfare/loot_table/chests/blue_print_rare.json +++ /dev/null @@ -1,604 +0,0 @@ -{ - "type": "minecraft:chest", - "pools": [ - { - "rolls": 1, - "entries": [ - { - "type": "minecraft:item", - "name": "superbwarfare:glock_17_blueprint", - "weight": 10, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 1 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:mp_443_blueprint", - "weight": 10, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 1 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:m_1911_blueprint", - "weight": 10, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 1 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:glock_18_blueprint", - "weight": 15, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 1 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:m_79_blueprint", - "weight": 14, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 1 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:k_98_blueprint", - "weight": 16, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 1 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:mosin_nagant_blueprint", - "weight": 16, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 1 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:m_4_blueprint", - "weight": 15, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 1 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:m2hb_blueprint", - "weight": 15, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 1 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:sks_blueprint", - "weight": 15, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 1 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:marlin_blueprint", - "weight": 9, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 1 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:ak_47_blueprint", - "weight": 15, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 1 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:hunting_rifle_blueprint", - "weight": 10, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 1 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:rpg_blueprint", - "weight": 15, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 1 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:hk_416_blueprint", - "weight": 15, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 1 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:ak_12_blueprint", - "weight": 15, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 1 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:rpk_blueprint", - "weight": 10, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 1 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:vector_blueprint", - "weight": 10, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 1 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:mk_14_blueprint", - "weight": 10, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 1 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:m_60_blueprint", - "weight": 10, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 1 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:svd_blueprint", - "weight": 10, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 1 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:m_870_blueprint", - "weight": 15, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 1 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:m_98b_blueprint", - "weight": 10, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 1 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:qbz_95_blueprint", - "weight": 15, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 1 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:devotion_blueprint", - "weight": 10, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 1 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:trachelium_blueprint", - "weight": 10, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 1 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:aa_12_blueprint", - "weight": 5, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 1 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:sentinel_blueprint", - "weight": 5, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 1 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:bocek_blueprint", - "weight": 10, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 1 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:javelin_blueprint", - "weight": 5, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 1 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:secondary_cataclysm_blueprint", - "weight": 5, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 1 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:mk_42_blueprint", - "weight": 5, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 1 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:mle_1934_blueprint", - "weight": 5, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 1 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:annihilator_blueprint", - "weight": 2, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 1 - } - } - ] - } - ] - }, - { - "rolls": 2, - "entries": [ - { - "type": "minecraft:item", - "name": "superbwarfare:handgun_ammo_box", - "weight": 12, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 3 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:rifle_ammo_box", - "weight": 20, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 3 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:sniper_ammo_box", - "weight": 10, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 3 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:shotgun_ammo_box", - "weight": 17, - "functions": [ - { - "function": "set_count", - "count": { - "min": 1, - "max": 3 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:grenade_40mm", - "weight": 6, - "functions": [ - { - "function": "set_count", - "count": { - "min": 2, - "max": 6 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:rocket", - "weight": 4, - "functions": [ - { - "function": "set_count", - "count": { - "min": 2, - "max": 4 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:mortar_shell", - "weight": 6, - "functions": [ - { - "function": "set_count", - "count": { - "min": 2, - "max": 8 - } - } - ] - }, - { - "type": "minecraft:item", - "name": "superbwarfare:claymore_mine", - "weight": 3, - "functions": [ - { - "function": "set_count", - "count": { - "min": 2, - "max": 6 - } - } - ] - } - ] - } - ], - "random_sequence": "superbwarfare:chests/blue_print_rare" -} \ No newline at end of file