Skip to content

Commit

Permalink
Comment bootstrap.
Browse files Browse the repository at this point in the history
  • Loading branch information
Provismet committed Jun 28, 2024
1 parent a4574b3 commit c073bd8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@
import com.provismet.AdditionalArmoury.registries.AAEnchantmentComponentTypes;
import com.provismet.AdditionalArmoury.registries.*;
import com.provismet.AdditionalArmoury.utility.registry.AARegistries;
import net.minecraft.MinecraftVersion;
import net.minecraft.client.MinecraftClient;
import net.minecraft.registry.DynamicRegistryManager;
import net.minecraft.registry.RegistryKeys;
import net.minecraft.server.MinecraftServer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down Expand Up @@ -51,7 +46,7 @@ public void onInitialize () {
AAStatusEffects.register();
AASettings.read();

// TODO: It's enchanted loot is currently unavailable.
// TODO: Enchanted loot is currently unavailable.
LootTableEvents.MODIFY.register((id, tableBuilder, source) -> {
if (source.isBuiltin() || AASettings.shouldOverrideDatapacks()) {
if (LootTables.NETHER_BRIDGE_CHEST.equals(id)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ private static RegistryKey<Enchantment> of (String name) {
return RegistryKey.of(RegistryKeys.ENCHANTMENT, AdditionalArmouryMain.identifier(name));
}

// This only executes as part of data generation. It does NOT create files, it only pre-loads the registry.
public static void bootstrap (Registerable<Enchantment> registerable) {
RegistryEntryLookup<DamageType> damageLookup = registerable.getRegistryLookup(RegistryKeys.DAMAGE_TYPE);
RegistryEntryLookup<Enchantment> enchantmentLookup = registerable.getRegistryLookup(RegistryKeys.ENCHANTMENT);
Expand Down

0 comments on commit c073bd8

Please sign in to comment.