remove RegistryMixin

This commit is contained in:
dfsek
2022-06-20 21:03:30 -07:00
parent cce9b69c45
commit 14273268c8
3 changed files with 5 additions and 27 deletions

View File

@@ -17,6 +17,8 @@
package com.dfsek.terra.forge;
import com.dfsek.terra.api.util.generic.Lazy;
import net.minecraft.util.Identifier;
import net.minecraft.util.registry.Registry;
import net.minecraftforge.eventbus.api.EventPriority;
@@ -47,11 +49,6 @@ public class ForgeEntryPoint {
return TERRA_PLUGIN;
}
public static void register() { // register the things
Registry.register(Registry.CHUNK_GENERATOR, new Identifier("terra:terra"), Codecs.FABRIC_CHUNK_GENERATOR_WRAPPER);
Registry.register(Registry.BIOME_SOURCE, new Identifier("terra:terra"), Codecs.TERRA_BIOME_SOURCE);
}
public ForgeEntryPoint() {
IEventBus modEventBus = FMLJavaModLoadingContext.get().getModEventBus();
@@ -60,6 +57,8 @@ public class ForgeEntryPoint {
}
private void commonSetup(FMLCommonSetupEvent event) {
Registry.register(Registry.CHUNK_GENERATOR, new Identifier("terra:terra"), Codecs.FABRIC_CHUNK_GENERATOR_WRAPPER);
Registry.register(Registry.BIOME_SOURCE, new Identifier("terra:terra"), Codecs.TERRA_BIOME_SOURCE);
logger.info("Initializing Terra Forge mod...");
}

View File

@@ -1,20 +0,0 @@
package com.dfsek.terra.forge.mixin.lifecycle;
import net.minecraft.util.registry.Registry;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import com.dfsek.terra.forge.ForgeEntryPoint;
// Register Terra things to the builtin registries.
@Mixin(Registry.class)
public class RegistryMixin {
@Inject(method = "<clinit>", at = @At("RETURN"))
private static void registerTerraGenerators(CallbackInfo ci) {
ForgeEntryPoint.register();
}
}

View File

@@ -35,8 +35,7 @@
"implementations.terra.world.ChunkRegionMixin",
"implementations.terra.world.ServerWorldMixin",
"lifecycle.DataPackContentsMixin",
"lifecycle.NoiseConfigMixin",
"lifecycle.RegistryMixin"
"lifecycle.NoiseConfigMixin"
],
"client": [
],