Skip to content

Commit

Permalink
Fix loot_table issues with checking Enitity from Minecraft
Browse files Browse the repository at this point in the history
  • Loading branch information
ktpatient committed Oct 3, 2024
1 parent 0a45c9f commit c5ed4b0
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// 1.21.1 2024-09-28T18:46:07.723492931 Global Loot Modifiers : nautec
410596f86cb6483fedbadaf04fd849a7f5e005d5 data/nautec/loot_modifiers/dolphin_modifier.json
f1c95413e15f26e6dee27ac81fc8a36d01c98e82 data/nautec/loot_modifiers/drowned_modifier.json
8a9f4ead3b5dc76b8214aa334b6fe78b3ca5b2e4 data/nautec/loot_modifiers/elder_guardian_modifier.json
bd88a76887ff8aa8132b942818506dc74b2aa22c data/nautec/loot_modifiers/guardian_modifier.json
// 1.21.1 2024-10-03T23:19:09.4559489 Global Loot Modifiers : nautec
75bdeb6a11a7c2f92d07591d32680e57a2995ec7 data/nautec/loot_modifiers/dolphin_modifier.json
80d1b0e204a5703265c312f3eeecf8cafcd63a07 data/nautec/loot_modifiers/drowned_modifier.json
f193284430531eb505bd548da6c1bde69cb3b5d8 data/nautec/loot_modifiers/elder_guardian_modifier.json
5e9cbb9ae473929292805eb0f315a89c1f145a19 data/nautec/loot_modifiers/guardian_modifier.json
9ff3f403aef84216a0796bf7d1d9dc0709105ff0 data/nautec/loot_modifiers/ocean_ruins_modifier.json
c9d45597f0bf1d6d2e27272ac7fe3ef27b2376ad data/nautec/loot_modifiers/shipwreck_modifier.json
49d31a0defcb6a20562172e6cd7ae34268cd6bd9 data/nautec/loot_modifiers/suspicious_ruins_sand_modifier.json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
"condition": "minecraft:random_chance"
}
],
"table": "nautec:entities/dolphin"
"table": "minecraft:entities/dolphin"
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
"condition": "minecraft:random_chance"
}
],
"table": "nautec:entities/drowned"
"table": "minecraft:entities/drowned"
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
"condition": "minecraft:random_chance"
}
],
"table": "nautec:entities/elder_guardian"
"table": "minecraft:entities/elder_guardian"
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
"condition": "minecraft:random_chance"
}
],
"table": "nautec:entities/guardian"
"table": "minecraft:entities/guardian"
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,19 @@ public final class NTLootTables {

public static final ResourceKey<LootTable> CRATE = register("chests/crate");
public static final ResourceKey<LootTable> RUSTY_CRATE = register("chests/rusty_crate");
public static final ResourceKey<LootTable> GUARDIAN = register("entities/guardian");
public static final ResourceKey<LootTable> ELDER_GUARDIAN = register("entities/elder_guardian");
public static final ResourceKey<LootTable> DROWNED = register("entities/drowned");
public static final ResourceKey<LootTable> DOLPHIN = register("entities/dolphin");
public static final ResourceKey<LootTable> GUARDIAN = registerV("entities/guardian");
public static final ResourceKey<LootTable> ELDER_GUARDIAN = registerV("entities/elder_guardian");
public static final ResourceKey<LootTable> DROWNED = registerV("entities/drowned");
public static final ResourceKey<LootTable> DOLPHIN = registerV("entities/dolphin");

private static ResourceKey<LootTable> register(String name) {
return register(ResourceKey.create(Registries.LOOT_TABLE, ResourceLocation.fromNamespaceAndPath(Nautec.MODID,name)));
}

private static ResourceKey<LootTable> registerV(String name) {
return register(ResourceKey.create(Registries.LOOT_TABLE, ResourceLocation.withDefaultNamespace(name)));
}

private static ResourceKey<LootTable> register(ResourceKey<LootTable> name) {
if (LOCATIONS.add(name)) {
return name;
Expand Down

0 comments on commit c5ed4b0

Please sign in to comment.