mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-27 23:47:38 +01:00
Try to make terraforged less angry against Create world gen
This commit is contained in:
parent
fd98bd4976
commit
bec6b1d414
2 changed files with 17 additions and 4 deletions
|
@ -2,6 +2,8 @@ package com.simibubi.create;
|
|||
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.world.gen.feature.Feature;
|
||||
import net.minecraft.world.gen.placement.Placement;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
|
@ -88,6 +90,8 @@ public class Create {
|
|||
|
||||
modEventBus.addListener(Create::init);
|
||||
MinecraftForge.EVENT_BUS.addListener(EventPriority.HIGH, Create::onBiomeLoad);
|
||||
modEventBus.addGenericListener(Feature.class, AllWorldFeatures::registerOreFeatures);
|
||||
modEventBus.addGenericListener(Placement.class, AllWorldFeatures::registerDecoratorFeatures);
|
||||
modEventBus.addGenericListener(IRecipeSerializer.class, AllRecipeTypes::register);
|
||||
modEventBus.addGenericListener(ContainerType.class, AllContainerTypes::register);
|
||||
modEventBus.addGenericListener(ParticleType.class, AllParticleTypes::register);
|
||||
|
|
|
@ -14,9 +14,11 @@ import net.minecraft.util.registry.WorldGenRegistries;
|
|||
import net.minecraft.world.biome.Biome.Category;
|
||||
import net.minecraft.world.biome.Biomes;
|
||||
import net.minecraft.world.gen.GenerationStage;
|
||||
import net.minecraft.world.gen.feature.Feature;
|
||||
import net.minecraft.world.gen.placement.Placement;
|
||||
import net.minecraftforge.common.ForgeConfigSpec;
|
||||
import net.minecraftforge.event.RegistryEvent;
|
||||
import net.minecraftforge.event.world.BiomeLoadingEvent;
|
||||
import net.minecraftforge.registries.ForgeRegistries;
|
||||
|
||||
public class AllWorldFeatures {
|
||||
|
||||
|
@ -57,10 +59,10 @@ public class AllWorldFeatures {
|
|||
public static final int forcedUpdateVersion = 2;
|
||||
|
||||
public static void registerFeatures() {
|
||||
ForgeRegistries.FEATURES.register(ConfigDrivenOreFeature.INSTANCE);
|
||||
ForgeRegistries.DECORATORS.register(ConfigDrivenDecorator.INSTANCE);
|
||||
// ForgeRegistries.FEATURES.register(ConfigDrivenOreFeature.INSTANCE);
|
||||
// ForgeRegistries.DECORATORS.register(ConfigDrivenDecorator.INSTANCE);
|
||||
entries.entrySet()
|
||||
.forEach((entry) -> {
|
||||
.forEach(entry -> {
|
||||
Registry.register(WorldGenRegistries.CONFIGURED_FEATURE, Create.ID + "_" + entry.getKey(),
|
||||
entry.getValue()
|
||||
.getFeature());
|
||||
|
@ -90,4 +92,11 @@ public class AllWorldFeatures {
|
|||
|
||||
public static void register() {}
|
||||
|
||||
public static void registerOreFeatures(RegistryEvent.Register<Feature<?>> event) {
|
||||
event.getRegistry().register(ConfigDrivenOreFeature.INSTANCE);
|
||||
}
|
||||
|
||||
public static void registerDecoratorFeatures(RegistryEvent.Register<Placement<?>> event) {
|
||||
event.getRegistry().register(ConfigDrivenDecorator.INSTANCE);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue