Skip to content

Commit

Permalink
feat: More Loot Tables
Browse files Browse the repository at this point in the history
  • Loading branch information
darksonic300 committed Aug 2, 2024
1 parent d95af5d commit 863ac4d
Show file tree
Hide file tree
Showing 10 changed files with 175 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
// 1.21 2024-08-03T01:13:59.9045726 Global Loot Modifiers : seidr
b96a1c0bdb959e665bcc5b47474394305d4ea5f3 data/neoforge/loot_modifiers/global_loot_modifiers.json
1fdd6144e2cba6d5491dac4dbebdf706877e6643 data/seidr/loot_modifiers/mineshaft_loot_modifiers.json
49f03a6c5409a669c4827452551f2e0db73e597a data/seidr/loot_modifiers/nether_loot_modifiers.json
// 1.21 2024-08-03T01:51:15.7445003 Global Loot Modifiers : seidr
12f94d0d927116c0ec8da14931a3f5b664966165 data/neoforge/loot_modifiers/global_loot_modifiers.json
092e34967416adbe75f92dd6ab81651991be46b5 data/seidr/loot_modifiers/ancient_city_loot_modifiers.json
1d2c83c836f044226834e460f4ad52e8730e3d7c data/seidr/loot_modifiers/buried_treasure_loot_modifiers.json
63bcafd9c3f2bff911c4fdfc383fd67cb58f5aa0 data/seidr/loot_modifiers/end_city_loot_modifiers.json
f87fd0569bb71ece0e7e0745315386ccd26a61c9 data/seidr/loot_modifiers/mineshaft_loot_modifiers.json
902c4d7f512d03fccf2a1ed23bbbdfcdbca7ee76 data/seidr/loot_modifiers/nether_loot_modifiers.json
b1e635b64b745290f3265f8934e46ec43608db37 data/seidr/loot_modifiers/sea_loot_modifiers.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
{
"entries": [
"seidr:mineshaft_loot_modifiers",
"seidr:nether_loot_modifiers"
"seidr:end_city_loot_modifiers",
"seidr:nether_loot_modifiers",
"seidr:ancient_city_loot_modifiers",
"seidr:sea_loot_modifiers",
"seidr:buried_treasure_loot_modifiers"
],
"replace": false
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"type": "seidr:ancient_city_loot",
"chanceToSpawn": 0.9,
"conditions": [
{
"condition": "neoforge:loot_table_id",
"loot_table_id": "minecraft:chests/ancient_city"
}
],
"items": [
{
"data": {
"count": 1,
"id": "seidr:sound_blast_tablet"
},
"weight": 30
},
{
"data": {
"count": 1,
"id": "seidr:complete_resistance_tablet"
},
"weight": 70
}
],
"totalWeight": 100
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"type": "seidr:ancient_city_loot",
"chanceToSpawn": 0.9,
"conditions": [
{
"condition": "neoforge:loot_table_id",
"loot_table_id": "minecraft:chests/buried_treasure"
}
],
"items": [
{
"data": {
"count": 1,
"id": "seidr:complete_walking_tablet"
},
"weight": 100
}
],
"totalWeight": 100
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"type": "seidr:ancient_city_loot",
"chanceToSpawn": 0.9,
"conditions": [
{
"condition": "neoforge:loot_table_id",
"loot_table_id": "minecraft:chests/end_city_treasure"
}
],
"items": [
{
"data": {
"count": 1,
"id": "seidr:incomplete_resistance_tablet"
},
"weight": 70
},
{
"data": {
"count": 1,
"id": "seidr:complete_undead_tablet"
},
"weight": 30
}
],
"totalWeight": 100
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"type": "seidr:mineshaft_loot",
"chanceToSpawn": 0.8,
"type": "seidr:ancient_city_loot",
"chanceToSpawn": 0.9,
"conditions": [
{
"condition": "minecraft:any_of",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"type": "seidr:mineshaft_loot",
"chanceToSpawn": 0.8,
"type": "seidr:ancient_city_loot",
"chanceToSpawn": 0.9,
"conditions": [
{
"condition": "minecraft:any_of",
"terms": [
{
"condition": "neoforge:loot_table_id",
"loot_table_id": "minecraft:chests/ruined_portal"
"loot_table_id": "minecraft:chests/bastion_other"
},
{
"condition": "neoforge:loot_table_id",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"type": "seidr:ancient_city_loot",
"chanceToSpawn": 0.9,
"conditions": [
{
"condition": "minecraft:any_of",
"terms": [
{
"condition": "neoforge:loot_table_id",
"loot_table_id": "minecraft:chests/shipwreck_supply"
},
{
"condition": "neoforge:loot_table_id",
"loot_table_id": "minecraft:chests/underwater_ruin_big"
}
]
}
],
"items": [
{
"data": {
"count": 1,
"id": "seidr:damaged_walking_tablet"
},
"weight": 70
},
{
"data": {
"count": 1,
"id": "seidr:effect_remove_tablet"
},
"weight": 30
}
],
"totalWeight": 100
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,8 @@ public class SeidrGlobalLootModifiers {

public static final Supplier<MapCodec<SeidrAddLootModifier>> NETHER_LOOT_CODEC = LOOT_MODIFIERS.register("nether_loot", () -> SeidrAddLootModifier.CODEC);
public static final Supplier<MapCodec<SeidrAddLootModifier>> MINESHAFT_LOOT_CODEC = LOOT_MODIFIERS.register("mineshaft_loot", () -> SeidrAddLootModifier.CODEC);
public static final Supplier<MapCodec<SeidrAddLootModifier>> SEA_LOOT_CODEC = LOOT_MODIFIERS.register("sea_loot", () -> SeidrAddLootModifier.CODEC);
public static final Supplier<MapCodec<SeidrAddLootModifier>> BURIED_TREASURE_LOOT_CODEC = LOOT_MODIFIERS.register("buried_treasure_loot", () -> SeidrAddLootModifier.CODEC);
public static final Supplier<MapCodec<SeidrAddLootModifier>> END_CITY_LOOT_CODEC = LOOT_MODIFIERS.register("end_city_loot", () -> SeidrAddLootModifier.CODEC);
public static final Supplier<MapCodec<SeidrAddLootModifier>> ANCIENT_CITY_LOOT_CODEC = LOOT_MODIFIERS.register("ancient_city_loot", () -> SeidrAddLootModifier.CODEC);
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public SeidrLootDataProvider(PackOutput output, CompletableFuture<HolderLookup.P
@Override
protected void start() {
add("nether_loot_modifiers", new SeidrAddLootModifier(
new LootItemCondition[] { LootTableIdCondition.builder(ResourceLocation.fromNamespaceAndPath("minecraft", "chests/ruined_portal"))
new LootItemCondition[] { LootTableIdCondition.builder(ResourceLocation.fromNamespaceAndPath("minecraft", "chests/bastion_other"))
.or(LootTableIdCondition.builder(ResourceLocation.fromNamespaceAndPath("minecraft", "chests/nether_bridge")))
.build() },
List.of(
Expand All @@ -31,7 +31,7 @@ protected void start() {
WeightedEntry.wrap(new ItemStack(SeidrItems.FIREBALL_TABLET.get(), 1), 60)
),
110,
0.8f
0.9f
));

add("mineshaft_loot_modifiers", new SeidrAddLootModifier(
Expand All @@ -43,7 +43,47 @@ protected void start() {
WeightedEntry.wrap(new ItemStack(SeidrItems.EFFECT_REMOVE_TABLET.get(), 1), 30)
),
100,
0.8f
0.9f
));

add("sea_loot_modifiers", new SeidrAddLootModifier(
new LootItemCondition[] { LootTableIdCondition.builder(ResourceLocation.fromNamespaceAndPath("minecraft", "chests/shipwreck_supply"))
.or(LootTableIdCondition.builder(ResourceLocation.fromNamespaceAndPath("minecraft", "chests/underwater_ruin_big")))
.build() },
List.of(
WeightedEntry.wrap(new ItemStack(SeidrItems.DAMAGED_WALKING_TABLET.get(), 1), 70),
WeightedEntry.wrap(new ItemStack(SeidrItems.EFFECT_REMOVE_TABLET.get(), 1), 30)
),
100,
0.9f
));

add("buried_treasure_loot_modifiers", new SeidrAddLootModifier(
new LootItemCondition[] { LootTableIdCondition.builder(ResourceLocation.fromNamespaceAndPath("minecraft", "chests/buried_treasure")).build() },
List.of(
WeightedEntry.wrap(new ItemStack(SeidrItems.COMPLETE_WALKING_TABLET.get(), 1), 100)),
100,
0.9f
));

add("end_city_loot_modifiers", new SeidrAddLootModifier(
new LootItemCondition[] { LootTableIdCondition.builder(ResourceLocation.fromNamespaceAndPath("minecraft", "chests/end_city_treasure")).build() },
List.of(
WeightedEntry.wrap(new ItemStack(SeidrItems.INCOMPLETE_RESISTANCE_TABLET.get(), 1), 70),
WeightedEntry.wrap(new ItemStack(SeidrItems.COMPLETE_UNDEAD_TABLET.get(), 1), 30)
),
100,
0.9f
));

add("ancient_city_loot_modifiers", new SeidrAddLootModifier(
new LootItemCondition[] { LootTableIdCondition.builder(ResourceLocation.fromNamespaceAndPath("minecraft", "chests/ancient_city")).build() },
List.of(
WeightedEntry.wrap(new ItemStack(SeidrItems.SOUND_BLAST_TABLET.get(), 1), 30),
WeightedEntry.wrap(new ItemStack(SeidrItems.COMPLETE_RESISTANCE_TABLET.get(), 1), 70)
),
100,
0.9f
));
}
}

0 comments on commit 863ac4d

Please sign in to comment.