Jump to content

[1.17.1] How to properly register/use ConfiguredFeature for modded Features


JimiIT92

Recommended Posts

I'm having some troubles creating/attaching a ConfiguredFeature built on top of a modded feature in a modded biome. I had no issues using CF with vanilla features (like Flower placing or Tree placement with mod blocks, for example), however if I want to use my own Feature as well, I get some troubles.

What I've done is this:
I create the Feature like this

// Deferred Register
public static final DeferredRegister<Feature<?>> MOD_FEATURES = DeferredRegister.create(ForgeRegistries.FEATURES, MOD_ID);

// Feature
public static final RegistryObject<Feature<ColumnFeatureConfiguration>> LAVA_ROCK_COLUMNS = register("lava_rock_columns",
            () -> new LavaRockColumnsFeature(ColumnFeatureConfiguration.CODEC));
//LavaRockColumnsFeature is just a class that extends Feature<ColumnFeatureConfiguration>
//to generate basalt columns but with a mod block instead


// Register the Feature
public static <T extends FeatureConfiguration> RegistryObject<Feature<T>> register(String name, Supplier<Feature<T>> featureSupplier) {
        return MOD_FEATURES.register(name, featureSupplier);
}

Then, from the main mod class constructor, I call the register method for the Feature registry

var eventBus = FMLJavaModLoadingContext.get().getModEventBus();
MOD_FEATURES.register(eventBus);

Next I create my ConfiguredFeatures like this

//Generate "Anemone" flowers inside the World
public static final ConfiguredFeature<?, ?> ANEMONE = Feature.FLOWER.configured(
                    (new RandomPatchConfiguration.GrassConfigurationBuilder(
                            new SimpleStateProvider(ModBlocks.ANEMONE.get().defaultBlockState()),
                            SimpleBlockPlacer.INSTANCE)
                    ).tries(2).build())
            .decorated(Features.Decorators.HEIGHTMAP_SQUARE).count(1);

//Generate "Small Lava Rock Columns" in a custom Biome
public static final ConfiguredFeature<?, ?> SMALL_LAVA_ROCK_COLUMNS = 
  ModFeatures.LAVA_ROCK_COLUMNS.get()
  .configured(new ColumnFeatureConfiguration(ConstantInt.of(1), UniformInt.of(1, 4)))
  .decorated(FeatureDecorator.COUNT_MULTILAYER.configured(new CountConfiguration(4)));

Then I register this feature during the FMLCommonSetupEvent by doing this

@Mod.EventBusSubscriber(modid = MOD_ID, bus = Mod.EventBusSubscriber.Bus.MOD)
public final class CommonSetupSubscriber {
	@SubscribeEvent
    public static void onCommonSetup(final FMLCommonSetupEvent event) {
      event.enqueueWork(() -> {
            registerConfiguredFeatures();
        });
  	}
}

private static void registerConfiguredFeatures() {
  Registry.register(BuiltinRegistries.CONFIGURED_FEATURE, new ResourceLocation(MOD_ID, "anemone"), ModConfiguredFeatures.ANEMONE);
  Registry.register(BuiltinRegistries.CONFIGURED_FEATURE, new ResourceLocation(MOD_ID, "small_lava_rock_columns"), ModConfiguredFeatures.SMALL_LAVA_ROCK_COLUMNS);
}

Even without adding the "Small lava rock" configured feature to the custom Biome, if I run the game, I get this error
 

java.lang.NullPointerException: Registry Object not present: mod_id:lava_rock_columns

So I guess the issue is that the ConfiguredFeature is trying to get the Feature from the Registry, but can't find it? So what should be the correct way to register the Feature and/or the Configured Feature?

Don't blame me if i always ask for your help. I just want to learn to be better :)

Link to comment
Share on other sites

The point is that even without adding the CF to a custom Biome the game crashes :/ However, here is how I create the Biome
 

public static Biome volcanicWasteland() {
MobSpawnSettings mobSpawnSettings = new MobSpawnSettings.Builder()
                .addSpawn(MobCategory.MONSTER, new MobSpawnSettings.SpawnerData(EntityType.MAGMA_CUBE, 100, 2, 5))
                .build();
        BiomeGenerationSettings.Builder biomeBuilder = new BiomeGenerationSettings.Builder();
        addDefaultOverworldUnderground(biomeBuilder);
        biomeBuilder.surfaceBuilder(MwConfiguredSurfaceBuilders.VOLCANIC_WASTELAND)
                .addFeature(GenerationStep.Decoration.SURFACE_STRUCTURES, Features.DELTA)
                .addFeature(GenerationStep.Decoration.VEGETAL_DECORATION, Features.SPRING_LAVA_DOUBLE)
                .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, Features.SPRING_DELTA)
                .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, Features.ORE_MAGMA)
                .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, Features.SPRING_CLOSED_DOUBLE);
  //Add custom CF
biomeBuilder.addFeature(GenerationStep.Decoration.SURFACE_STRUCTURES, ModConfiguredFeatures.SMALL_LAVA_ROCK_COLUMNS);
  
        var temperature = 10.0F;
        var ashColor = 0x333333;

        return new Biome.BiomeBuilder()
                .precipitation(Biome.Precipitation.NONE)
                .biomeCategory(Biome.BiomeCategory.DESERT)
                .depth(0.25F)
                .scale(0.1F)
                .temperature(temperature)
                .downfall(0.0F)
                .specialEffects(
                        new BiomeSpecialEffects.Builder()
                                .waterColor(ashColor)
                                .waterFogColor(ashColor)
                                .fogColor(ashColor)
                                .foliageColorOverride(ashColor)
                                .grassColorOverride(ashColor)
                                .skyColor(calculateSkyColor(temperature))
                                .ambientParticle(new AmbientParticleSettings(ParticleTypes.WHITE_ASH, 0.118093334F))
                                .ambientMoodSound(AmbientMoodSettings.LEGACY_CAVE_SETTINGS)
                            .build())
                .mobSpawnSettings(mobSpawnSettings)
                .generationSettings(biomeBuilder.build())
                .build();
}

which I register on the Biome Registry from the main mod constructor

var eventBus = FMLJavaModLoadingContext.get().getModEventBus();

MOD_FEATURES.register(eventBus);
MOD_BIOMES.register(eventBus);

and here is were I store the Biomes

//Registry
public static final DeferredRegister<Biome> MOD_BIOMES = DeferredRegister.create(ForgeRegistries.BIOMES, MOD_ID);
  
//Biomes
public static final RegistryObject<Biome> VOLCANIC_WASTELAND = register("volcanic_wasteland", BiomeUtils::volcanicWasteland);
  
//Register Biome
public static RegistryObject<Biome> register(String name, Supplier<Biome> biomeSupplier) {
  return REGISTRY.register(name, biomeSupplier);
}

Finally, during FMLCommonSetupEvent I add the Biome to the BiomeDictionary

@SubscribeEvent
public static void onCommonSetup(final FMLCommonSetupEvent event) {
  ...
  event.enqueueWork(CommonSetupSubscriber::addVolcanicWastelandBiome);
}

private static void addVolcanicWastelandBiome() {
  var key = ResourceKey.create(ForgeRegistries.Keys.BIOMES, 	Objects.requireNonNull(ForgeRegistries.BIOMES).getKey(ModBiomes.VOLCANIC_WASTELAND.get()));
        BiomeDictionary.addTypes(key, BiomeDictionary.Type.HOT, BiomeDictionary.Type.DRY,
                BiomeDictionary.Type.WASTELAND, BiomeDictionary.Type.DEAD);
        BiomeManager.addBiome(BiomeManager.BiomeType.DESERT, new BiomeManager.BiomeEntry(key, 70));
}

This is the full debug log I have. I noticed that error is actually thrown by another method (the appleForest method is used to create another mod biome). I guess is called when the Mod feature hasn't been registered yet, so it crashes?

 

Spoiler

> Task :runClient
2021-11-10 15:02:21,650 main WARN Advanced terminal features are not available in this environment
[15:02:21] [main/INFO] [cp.mo.mo.Launcher/MODLAUNCHER]: ModLauncher running: args [--launchTarget, forgeclientuserdev, --version, MOD_DEV, --assetIndex, 1.17, --assetsDir, C:\Users\jimia\.gradle\caches\forge_gradle\assets, --gameDir, ., --fml.forgeVersion, 37.0.107, --fml.mcVersion, 1.17.1, --fml.forgeGroup, net.minecraftforge, --fml.mcpVersion, 20210706.113038]
[15:02:21] [main/INFO] [cp.mo.mo.Launcher/MODLAUNCHER]: ModLauncher 9.0.7+91+master.8569cdf starting: java version 16.0.2 by Eclipse Foundation
[15:02:21] [main/DEBUG] [cp.mo.mo.LaunchServiceHandler/MODLAUNCHER]: Found launch services [fmlclientdev,forgeclient,minecraft,fmlserveruserdev,fmlclient,fmldatauserdev,forgeserverdev,forgeserveruserdev,forgeclientdev,forgeclientuserdev,forgeserver,forgedatadev,fmlserver,fmlclientuserdev,fmlserverdev,forgedatauserdev,testharness]
[15:02:21] [main/DEBUG] [cp.mo.mo.NameMappingServiceHandler/MODLAUNCHER]: Found naming services : [srgtomcp]
[15:02:21] [main/DEBUG] [cp.mo.mo.LaunchPluginHandler/MODLAUNCHER]: Found launch plugins: [mixin,eventbus,object_holder_definalize,runtime_enum_extender,capability_token_subclass,capability_inject_definalize,accesstransformer,runtimedistcleaner]
[15:02:21] [main/DEBUG] [cp.mo.mo.TransformationServicesHandler/MODLAUNCHER]: Discovering transformation services
[15:02:21] [main/DEBUG] [cp.mo.mo.TransformationServicesHandler/MODLAUNCHER]: Found additional transformation services from discovery services: java.util.stream.ReferencePipeline$3@299321e2
[15:02:21] [main/DEBUG] [cp.mo.mo.TransformationServicesHandler/MODLAUNCHER]: Found transformer services : [mixin,fml]
[15:02:21] [main/DEBUG] [cp.mo.mo.TransformationServicesHandler/MODLAUNCHER]: Transformation services loading
[15:02:21] [main/DEBUG] [cp.mo.mo.TransformationServiceDecorator/MODLAUNCHER]: Loading service mixin
[15:02:21] [main/DEBUG] [cp.mo.mo.TransformationServiceDecorator/MODLAUNCHER]: Loaded service mixin
[15:02:21] [main/DEBUG] [cp.mo.mo.TransformationServiceDecorator/MODLAUNCHER]: Loading service fml
[15:02:21] [main/DEBUG] [ne.mi.fm.lo.LauncherVersion/CORE]: Found FMLLauncher version 1.0
[15:02:21] [main/DEBUG] [ne.mi.fm.lo.FMLLoader/CORE]: FML 1.0 loading
[15:02:21] [main/DEBUG] [ne.mi.fm.lo.FMLLoader/CORE]: FML found ModLauncher version : 9.0.7+91+master.8569cdf
[15:02:21] [main/DEBUG] [ne.mi.fm.lo.FMLLoader/CORE]: FML found AccessTransformer version : 8.0.4+66+master.c09db6d7
[15:02:21] [main/DEBUG] [ne.mi.fm.lo.FMLLoader/CORE]: FML found EventBus version : 5.0.3+70+master.d7d405b
[15:02:21] [main/DEBUG] [ne.mi.fm.lo.FMLLoader/CORE]: Found Runtime Dist Cleaner
[15:02:21] [main/DEBUG] [ne.mi.fm.lo.FMLLoader/CORE]: FML found CoreMod version : 5.0.1+15+master.dc5a2922
[15:02:21] [main/DEBUG] [ne.mi.fm.lo.FMLLoader/CORE]: Found ForgeSPI package implementation version 4.0.10+24+master.876d7985
[15:02:21] [main/DEBUG] [ne.mi.fm.lo.FMLLoader/CORE]: Found ForgeSPI package specification 4
[15:02:21] [main/DEBUG] [cp.mo.mo.TransformationServiceDecorator/MODLAUNCHER]: Loaded service fml
[15:02:21] [main/DEBUG] [cp.mo.mo.TransformationServicesHandler/MODLAUNCHER]: Configuring option handling for services
[15:02:21] [main/DEBUG] [cp.mo.mo.TransformationServicesHandler/MODLAUNCHER]: Transformation services initializing
[15:02:21] [main/DEBUG] [cp.mo.mo.TransformationServiceDecorator/MODLAUNCHER]: Initializing transformation service mixin
[15:02:22] [main/DEBUG] [mixin/]: MixinService [ModLauncher] was successfully booted in cpw.mods.cl.ModuleClassLoader@4d1b0d2a
[15:02:22] [main/INFO] [mixin/]: SpongePowered MIXIN Subsystem Version=0.8.4 Source=union:/C:/Users/jimia/.gradle/caches/modules-2/files-2.1/org.spongepowered/mixin/0.8.4/4ec7d77d9ab32596ca0b78bb123956734767e3a/mixin-0.8.4.jar%2325! Service=ModLauncher Env=CLIENT
[15:02:22] [main/DEBUG] [mixin/]: Initialising Mixin Platform Manager
[15:02:22] [main/DEBUG] [mixin/]: Adding mixin platform agents for container ModLauncher Root Container(ModLauncher:4f56a0a2)
[15:02:22] [main/DEBUG] [mixin/]: Instancing new MixinPlatformAgentMinecraftForge for ModLauncher Root Container(ModLauncher:4f56a0a2)
[15:02:22] [main/DEBUG] [mixin/]: MixinPlatformAgentMinecraftForge rejected container ModLauncher Root Container(ModLauncher:4f56a0a2)
[15:02:22] [main/DEBUG] [mixin/]: Instancing new MixinPlatformAgentDefault for ModLauncher Root Container(ModLauncher:4f56a0a2)
[15:02:22] [main/DEBUG] [mixin/]: MixinPlatformAgentDefault accepted container ModLauncher Root Container(ModLauncher:4f56a0a2)
[15:02:22] [main/DEBUG] [cp.mo.mo.TransformationServiceDecorator/MODLAUNCHER]: Initialized transformation service mixin
[15:02:22] [main/DEBUG] [cp.mo.mo.TransformationServiceDecorator/MODLAUNCHER]: Initializing transformation service fml
[15:02:22] [main/DEBUG] [ne.mi.fm.lo.FMLServiceProvider/CORE]: Setting up basic FML game directories
[15:02:22] [main/DEBUG] [ne.mi.fm.lo.FileUtils/CORE]: Found existing GAMEDIR directory : D:\MC Dev\Mineworld\run
[15:02:22] [main/DEBUG] [ne.mi.fm.lo.FMLPaths/CORE]: Path GAMEDIR is D:\MC Dev\Mineworld\run
[15:02:22] [main/DEBUG] [ne.mi.fm.lo.FileUtils/CORE]: Found existing MODSDIR directory : D:\MC Dev\Mineworld\run\mods
[15:02:22] [main/DEBUG] [ne.mi.fm.lo.FMLPaths/CORE]: Path MODSDIR is D:\MC Dev\Mineworld\run\mods
[15:02:22] [main/DEBUG] [ne.mi.fm.lo.FileUtils/CORE]: Found existing CONFIGDIR directory : D:\MC Dev\Mineworld\run\config
[15:02:22] [main/DEBUG] [ne.mi.fm.lo.FMLPaths/CORE]: Path CONFIGDIR is D:\MC Dev\Mineworld\run\config
[15:02:22] [main/DEBUG] [ne.mi.fm.lo.FMLPaths/CORE]: Path FMLCONFIG is D:\MC Dev\Mineworld\run\config\fml.toml
[15:02:22] [main/DEBUG] [ne.mi.fm.lo.FMLServiceProvider/CORE]: Loading configuration
[15:02:22] [main/DEBUG] [ne.mi.fm.lo.FileUtils/CORE]: Found existing default config directory directory : D:\MC Dev\Mineworld\run\defaultconfigs
[15:02:22] [main/DEBUG] [ne.mi.fm.lo.FMLServiceProvider/CORE]: Preparing ModFile
[15:02:22] [main/DEBUG] [ne.mi.fm.lo.FMLServiceProvider/CORE]: Preparing launch handler
[15:02:22] [main/DEBUG] [ne.mi.fm.lo.FMLLoader/CORE]: Using forgeclientuserdev as launch service
[15:02:22] [main/DEBUG] [ne.mi.fm.lo.FMLLoader/CORE]: Received command line version data  : VersionInfo[forgeVersion=37.0.107, mcVersion=1.17.1, mcpVersion=20210706.113038, forgeGroup=net.minecraftforge]
[15:02:22] [main/DEBUG] [cp.mo.mo.TransformationServiceDecorator/MODLAUNCHER]: Initialized transformation service fml
[15:02:22] [main/DEBUG] [cp.mo.mo.NameMappingServiceHandler/MODLAUNCHER]: Current naming domain is 'mcp'
[15:02:22] [main/DEBUG] [cp.mo.mo.NameMappingServiceHandler/MODLAUNCHER]: Identified name mapping providers {srg=srgtomcp:1234}
[15:02:22] [main/DEBUG] [cp.mo.mo.TransformationServicesHandler/MODLAUNCHER]: Transformation services begin scanning
[15:02:22] [main/DEBUG] [cp.mo.mo.TransformationServiceDecorator/MODLAUNCHER]: Beginning scan trigger - transformation service mixin
[15:02:22] [main/DEBUG] [cp.mo.mo.TransformationServiceDecorator/MODLAUNCHER]: End scan trigger - transformation service mixin
[15:02:22] [main/DEBUG] [cp.mo.mo.TransformationServiceDecorator/MODLAUNCHER]: Beginning scan trigger - transformation service fml
[15:02:22] [main/DEBUG] [ne.mi.fm.lo.FMLServiceProvider/CORE]: Initiating mod scan
[15:02:22] [main/DEBUG] [ne.mi.fm.lo.mo.ModListHandler/CORE]: Found mod coordinates from lists: []
[15:02:22] [main/DEBUG] [ne.mi.fm.lo.mo.ModDiscoverer/CORE]: Found Mod Locators : (mods folder:null),(maven libs:null),(exploded directory:null),(minecraft:null),(userdev classpath:null)
[15:02:22] [main/DEBUG] [ne.mi.fm.lo.ta.CommonLaunchHandler/CORE]: Got mod coordinates mineworld%%D:\MC Dev\Mineworld\build\resources\main;mineworld%%D:\MC Dev\Mineworld\build\classes\java\main from env
[15:02:22] [main/DEBUG] [ne.mi.fm.lo.ta.CommonLaunchHandler/CORE]: Found supplied mod coordinates [{mineworld=[D:\MC Dev\Mineworld\build\resources\main, D:\MC Dev\Mineworld\build\classes\java\main]}]
[15:02:22] [main/DEBUG] [ne.mi.fm.lo.mo.ModFileInfo/LOADING]: Found valid mod file forge-1.17.1-37.0.107_mapped_official_1.17.1-recomp.jar with {minecraft} mods - versions {1.17.1}
[15:02:22] [main/DEBUG] [ne.mi.fm.lo.mo.ModFile/LOADING]: Loading mod file D:\MC Dev\Mineworld\build\fg_cache\net\minecraftforge\forge\1.17.1-37.0.107_mapped_official_1.17.1\forge-1.17.1-37.0.107_mapped_official_1.17.1-recomp.jar with languages [LanguageSpec[languageName=minecraft, acceptedVersions=1]]
[15:02:22] [main/DEBUG] [ne.mi.fm.lo.mo.ModFileParser/LOADING]: Considering mod file candidate D:\MC Dev\Mineworld\build\resources\main
[15:02:22] [main/DEBUG] [ne.mi.fm.lo.mo.ModFileInfo/LOADING]: Found valid mod file main with {mineworld} mods - versions {0.0NONE}
[15:02:22] [main/DEBUG] [ne.mi.fm.lo.mo.ModFile/LOADING]: Loading mod file D:\MC Dev\Mineworld\build\resources\main with languages [LanguageSpec[languageName=javafml, acceptedVersions=[37,)]]
[15:02:22] [main/DEBUG] [ne.mi.fm.lo.mo.ModFileParser/LOADING]: Considering mod file candidate 
[15:02:22] [main/DEBUG] [ne.mi.fm.lo.mo.ModFileInfo/LOADING]: Found valid mod file  with {forge} mods - versions {37.0.107}
[15:02:22] [main/DEBUG] [ne.mi.fm.lo.mo.ModFile/LOADING]: Loading mod file  with languages [LanguageSpec[languageName=javafml, acceptedVersions=[24,]]]
[15:02:22] [main/DEBUG] [ne.mi.fm.lo.mo.ModFileParser/LOADING]: Found coremod field_to_method with Javascript path coremods/field_to_method.js
[15:02:22] [main/DEBUG] [ne.mi.fm.lo.mo.ModFileParser/LOADING]: Found coremod field_to_instanceof with Javascript path coremods/field_to_instanceof.js
[15:02:22] [main/DEBUG] [ne.mi.fm.lo.mo.ModFileParser/LOADING]: Found coremod add_bouncer_method with Javascript path coremods/add_bouncer_method.js
[15:02:22] [main/DEBUG] [ne.mi.fm.lo.mo.ModFile/LOADING]: Found coremod coremods/field_to_method.js
[15:02:22] [main/DEBUG] [ne.mi.fm.lo.mo.ModFile/LOADING]: Found coremod coremods/field_to_instanceof.js
[15:02:22] [main/DEBUG] [ne.mi.fm.lo.mo.ModFile/LOADING]: Found coremod coremods/add_bouncer_method.js
[15:02:22] [main/DEBUG] [cp.mo.mo.TransformationServiceDecorator/MODLAUNCHER]: End scan trigger - transformation service fml
[15:02:22] [main/DEBUG] [ne.mi.fm.lo.LanguageLoadingProvider/CORE]: Found 2 language providers
[15:02:22] [main/DEBUG] [ne.mi.fm.lo.LanguageLoadingProvider/CORE]: Found language provider minecraft, version 1.0
[15:02:22] [main/DEBUG] [ne.mi.fm.lo.LanguageLoadingProvider/CORE]: Found language provider javafml, version 37
[15:02:22] [main/DEBUG] [ne.mi.fm.lo.ModSorter/LOADING]: Found 2 mod requirements (2 mandatory, 0 optional)
[15:02:22] [main/DEBUG] [ne.mi.fm.lo.ModSorter/LOADING]: Found 0 mod requirements missing (0 mandatory, 0 optional)
[15:02:23] [main/DEBUG] [ne.mi.fm.lo.MCPNamingService/CORE]: Loaded 26870 method mappings from methods.csv
[15:02:23] [main/DEBUG] [ne.mi.fm.lo.MCPNamingService/CORE]: Loaded 25986 field mappings from fields.csv
[15:02:23] [main/DEBUG] [cp.mo.mo.TransformationServicesHandler/MODLAUNCHER]: Transformation services loading transformers
[15:02:23] [main/DEBUG] [cp.mo.mo.TransformationServiceDecorator/MODLAUNCHER]: Initializing transformers for transformation service mixin
[15:02:23] [main/DEBUG] [cp.mo.mo.TransformationServiceDecorator/MODLAUNCHER]: Initialized transformers for transformation service mixin
[15:02:23] [main/DEBUG] [cp.mo.mo.TransformationServiceDecorator/MODLAUNCHER]: Initializing transformers for transformation service fml
[15:02:23] [main/DEBUG] [ne.mi.fm.lo.FMLServiceProvider/CORE]: Loading coremod transformers
[15:02:23] [main/DEBUG] [ne.mi.co.CoreModEngine/COREMOD]: Loading CoreMod from coremods/field_to_method.js
[15:02:23] [main/DEBUG] [ne.mi.co.CoreModEngine/COREMOD]: CoreMod loaded successfully
[15:02:23] [main/DEBUG] [ne.mi.co.CoreModEngine/COREMOD]: Loading CoreMod from coremods/field_to_instanceof.js
[15:02:23] [main/DEBUG] [ne.mi.co.CoreModEngine/COREMOD]: CoreMod loaded successfully
[15:02:23] [main/DEBUG] [ne.mi.co.CoreModEngine/COREMOD]: Loading CoreMod from coremods/add_bouncer_method.js
[15:02:23] [main/DEBUG] [ne.mi.co.CoreModEngine/COREMOD]: CoreMod loaded successfully
[15:02:23] [main/DEBUG] [cp.mo.mo.TransformStore/MODLAUNCHER]: Adding transformer net.minecraftforge.coremod.transformer.CoreModClassTransformer@39c385d6 to Target : CLASS {Lnet/minecraft/world/effect/MobEffectInstance;} {} {V}
[15:02:23] [main/DEBUG] [cp.mo.mo.TransformStore/MODLAUNCHER]: Adding transformer net.minecraftforge.coremod.transformer.CoreModClassTransformer@3c0bbc9f to Target : CLASS {Lnet/minecraft/world/item/BucketItem;} {} {V}
[15:02:23] [main/DEBUG] [cp.mo.mo.TransformStore/MODLAUNCHER]: Adding transformer net.minecraftforge.coremod.transformer.CoreModClassTransformer@1317b708 to Target : CLASS {Lnet/minecraft/world/level/block/StairBlock;} {} {V}
[15:02:23] [main/DEBUG] [cp.mo.mo.TransformStore/MODLAUNCHER]: Adding transformer net.minecraftforge.coremod.transformer.CoreModClassTransformer@6438a7fe to Target : CLASS {Lnet/minecraft/world/level/block/FlowerPotBlock;} {} {V}
[15:02:23] [main/DEBUG] [cp.mo.mo.TransformStore/MODLAUNCHER]: Adding transformer net.minecraftforge.coremod.transformer.CoreModClassTransformer@2e51d054 to Target : CLASS {Lnet/minecraft/world/item/ItemStack;} {} {V}
[15:02:23] [main/DEBUG] [cp.mo.mo.TransformStore/MODLAUNCHER]: Adding transformer net.minecraftforge.coremod.transformer.CoreModClassTransformer@4f5f6e45 to Target : CLASS {Lnet/minecraft/network/play/client/CClientSettingsPacket;} {} {V}
[15:02:23] [main/DEBUG] [cp.mo.mo.TransformationServiceDecorator/MODLAUNCHER]: Initialized transformers for transformation service fml
[15:02:23] [main/DEBUG] [mixin/]: Processing prepare() for PlatformAgent[MixinPlatformAgentDefault:ModLauncher Root Container(ModLauncher:4f56a0a2)]
[15:02:23] [main/DEBUG] [mixin/]: Processing launch tasks for PlatformAgent[MixinPlatformAgentDefault:ModLauncher Root Container(ModLauncher:4f56a0a2)]
[15:02:23] [main/DEBUG] [mixin/]: Adding mixin platform agents for container SecureJarResource(minecraft)
[15:02:23] [main/DEBUG] [mixin/]: Instancing new MixinPlatformAgentMinecraftForge for SecureJarResource(minecraft)
[15:02:23] [main/DEBUG] [mixin/]: MixinPlatformAgentMinecraftForge rejected container SecureJarResource(minecraft)
[15:02:23] [main/DEBUG] [mixin/]: Instancing new MixinPlatformAgentDefault for SecureJarResource(minecraft)
[15:02:23] [main/DEBUG] [mixin/]: MixinPlatformAgentDefault accepted container SecureJarResource(minecraft)
[15:02:23] [main/DEBUG] [mixin/]: Processing prepare() for PlatformAgent[MixinPlatformAgentDefault:SecureJarResource(minecraft)]
[15:02:23] [main/DEBUG] [mixin/]: Adding mixin platform agents for container SecureJarResource(mineworld)
[15:02:23] [main/DEBUG] [mixin/]: Instancing new MixinPlatformAgentMinecraftForge for SecureJarResource(mineworld)
[15:02:23] [main/DEBUG] [mixin/]: MixinPlatformAgentMinecraftForge rejected container SecureJarResource(mineworld)
[15:02:23] [main/DEBUG] [mixin/]: Instancing new MixinPlatformAgentDefault for SecureJarResource(mineworld)
[15:02:23] [main/DEBUG] [mixin/]: MixinPlatformAgentDefault accepted container SecureJarResource(mineworld)
[15:02:23] [main/DEBUG] [mixin/]: Processing prepare() for PlatformAgent[MixinPlatformAgentDefault:SecureJarResource(mineworld)]
[15:02:23] [main/DEBUG] [mixin/]: Adding mixin platform agents for container SecureJarResource(forge)
[15:02:23] [main/DEBUG] [mixin/]: Instancing new MixinPlatformAgentMinecraftForge for SecureJarResource(forge)
[15:02:23] [main/DEBUG] [mixin/]: MixinPlatformAgentMinecraftForge rejected container SecureJarResource(forge)
[15:02:23] [main/DEBUG] [mixin/]: Instancing new MixinPlatformAgentDefault for SecureJarResource(forge)
[15:02:23] [main/DEBUG] [mixin/]: MixinPlatformAgentDefault accepted container SecureJarResource(forge)
[15:02:23] [main/DEBUG] [mixin/]: Processing prepare() for PlatformAgent[MixinPlatformAgentDefault:SecureJarResource(forge)]
[15:02:23] [main/DEBUG] [mixin/]: inject() running with 4 agents
[15:02:23] [main/DEBUG] [mixin/]: Processing inject() for PlatformAgent[MixinPlatformAgentDefault:ModLauncher Root Container(ModLauncher:4f56a0a2)]
[15:02:23] [main/DEBUG] [mixin/]: Processing inject() for PlatformAgent[MixinPlatformAgentDefault:SecureJarResource(minecraft)]
[15:02:23] [main/DEBUG] [mixin/]: Processing inject() for PlatformAgent[MixinPlatformAgentDefault:SecureJarResource(mineworld)]
[15:02:23] [main/DEBUG] [mixin/]: Processing inject() for PlatformAgent[MixinPlatformAgentDefault:SecureJarResource(forge)]
[15:02:23] [main/INFO] [cp.mo.mo.LaunchServiceHandler/MODLAUNCHER]: Launching target 'forgeclientuserdev' with arguments [--version, MOD_DEV, --gameDir, ., --assetsDir, C:\Users\jimia\.gradle\caches\forge_gradle\assets, --assetIndex, 1.17]
[15:02:23] [main/DEBUG] [mixin/]: Error cleaning class output directory: .mixin.out
[15:02:23] [main/DEBUG] [mixin/]: Preparing mixins for MixinEnvironment[DEFAULT]
SLF4J: No SLF4J providers were found.
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#noProviders for further details.
[15:02:25] [pool-3-thread-1/DEBUG] [ne.mi.co.tr.CoreModBaseTransformer/COREMOD]: Transforming net/minecraft/world/level/block/StairBlock
[15:02:25] [pool-3-thread-1/DEBUG] [ne.mi.co.tr.CoreModBaseTransformer/COREMOD]: Transforming net/minecraft/world/level/block/FlowerPotBlock
[15:02:26] [pool-3-thread-1/DEBUG] [ne.mi.co.tr.CoreModBaseTransformer/COREMOD]: Transforming net/minecraft/world/item/ItemStack
[15:02:28] [pool-3-thread-1/DEBUG] [ne.mi.co.tr.CoreModBaseTransformer/COREMOD]: Transforming net/minecraft/world/item/BucketItem
[15:02:28] [pool-3-thread-1/DEBUG] [ne.mi.co.tr.CoreModBaseTransformer/COREMOD]: Transforming net/minecraft/world/effect/MobEffectInstance
[15:02:29] [Render thread/WARN]: Assets URL 'union:/D:/MC%20Dev/Mineworld/build/fg_cache/net/minecraftforge/forge/1.17.1-37.0.107_mapped_official_1.17.1/forge-1.17.1-37.0.107_mapped_official_1.17.1-recomp.jar%2375!/assets/.mcassetsroot' uses unexpected schema
[15:02:29] [Render thread/WARN]: Assets URL 'union:/D:/MC%20Dev/Mineworld/build/fg_cache/net/minecraftforge/forge/1.17.1-37.0.107_mapped_official_1.17.1/forge-1.17.1-37.0.107_mapped_official_1.17.1-recomp.jar%2375!/data/.mcassetsroot' uses unexpected schema
[15:02:29] [Render thread/INFO] [mojang/YggdrasilAuthenticationService]: Environment: authHost='https://authserver.mojang.com', accountsHost='https://api.mojang.com', sessionHost='https://sessionserver.mojang.com', servicesHost='https://api.minecraftservices.com', name='PROD'
[15:02:29] [Render thread/INFO]: Setting user: Dev
[15:02:29] [Render thread/INFO]: Backend library: LWJGL version 3.2.2 SNAPSHOT
[15:02:30] [Render thread/DEBUG] [ne.mi.fm.ModWorkManager/LOADING]: Using 16 threads for parallel mod-loading
[15:02:30] [Render thread/DEBUG] [ne.mi.fm.ja.FMLJavaModLanguageProvider/LOADING]: Loading FMLModContainer from classloader cpw.mods.modlauncher.TransformingClassLoader@2b037cfc - got cpw.mods.cl.ModuleClassLoader@6c451c9c
[15:02:30] [Render thread/DEBUG] [ne.mi.fm.ja.FMLModContainer/LOADING]: Creating FMLModContainer instance for net.minecraftforge.common.ForgeMod
[15:02:30] [Render thread/DEBUG] [ne.mi.fm.ja.FMLJavaModLanguageProvider/LOADING]: Loading FMLModContainer from classloader cpw.mods.modlauncher.TransformingClassLoader@2b037cfc - got cpw.mods.cl.ModuleClassLoader@6c451c9c
[15:02:30] [Render thread/DEBUG] [ne.mi.fm.ja.FMLModContainer/LOADING]: Creating FMLModContainer instance for org.mineworld.Mineworld
[15:02:30] [modloading-worker-2/INFO]: Forge mod loading, version 37.0.107, for MC 1.17.1 with MCP 20210706.113038
[15:02:30] [modloading-worker-2/INFO]: MinecraftForge v37.0.107 Initialized
[15:02:30] [modloading-worker-11/DEBUG] [ne.mi.fm.ja.AutomaticEventSubscriber/LOADING]: Attempting to inject @EventBusSubscriber classes into the eventbus for mineworld
[15:02:30] [modloading-worker-11/DEBUG] [ne.mi.fm.ja.AutomaticEventSubscriber/LOADING]: Auto-subscribing org.mineworld.event.client.ClientSetupSubscriber to MOD
[15:02:30] [modloading-worker-11/DEBUG] [ne.mi.fm.ja.AutomaticEventSubscriber/LOADING]: Auto-subscribing org.mineworld.event.client.ColorHandlerSubscriber to MOD
[15:02:30] [modloading-worker-11/DEBUG] [ne.mi.fm.ja.AutomaticEventSubscriber/LOADING]: Auto-subscribing org.mineworld.event.common.CommonSetupSubscriber to MOD
[15:02:30] [modloading-worker-11/DEBUG] [ne.mi.fm.ja.AutomaticEventSubscriber/LOADING]: Auto-subscribing org.mineworld.event.loot.GlobalLootModifierSubscriber to MOD
[15:02:30] [modloading-worker-11/DEBUG] [ne.mi.fm.ja.AutomaticEventSubscriber/LOADING]: Auto-subscribing org.mineworld.event.world.BiomeLoadingSubscriber to FORGE
[15:02:30] [modloading-worker-2/DEBUG] [ne.mi.fm.co.ConfigTracker/CONFIG]: Config file forge-client.toml for forge tracking
[15:02:30] [modloading-worker-2/DEBUG] [ne.mi.fm.co.ConfigTracker/CONFIG]: Config file forge-server.toml for forge tracking
[15:02:30] [modloading-worker-2/DEBUG] [ne.mi.fm.co.ConfigTracker/CONFIG]: Config file forge-common.toml for forge tracking
[15:02:30] [modloading-worker-2/DEBUG] [ne.mi.fm.ja.AutomaticEventSubscriber/LOADING]: Attempting to inject @EventBusSubscriber classes into the eventbus for forge
[15:02:30] [modloading-worker-2/DEBUG] [ne.mi.fm.ja.AutomaticEventSubscriber/LOADING]: Auto-subscribing net.minecraftforge.common.ForgeSpawnEggItem$CommonHandler to MOD
[15:02:30] [modloading-worker-2/DEBUG] [ne.mi.fm.ja.AutomaticEventSubscriber/LOADING]: Auto-subscribing net.minecraftforge.common.ForgeSpawnEggItem$ColorRegisterHandler to MOD
[15:02:30] [modloading-worker-2/DEBUG] [ne.mi.fm.ja.AutomaticEventSubscriber/LOADING]: Auto-subscribing net.minecraftforge.client.model.ModelDataManager to FORGE
[15:02:30] [modloading-worker-2/DEBUG] [ne.mi.fm.ja.AutomaticEventSubscriber/LOADING]: Auto-subscribing net.minecraftforge.client.ForgeHooksClient$ClientEvents to MOD
[15:02:31] [Render thread/ERROR] [ne.mi.fm.ja.FMLModContainer/]: Exception caught during firing event: null
    Index: 7
    Listeners:
        0: NORMAL
        1: ASM: net.minecraftforge.registries.DeferredRegister$EventDispatcher@44baaca1 handleEvent(Lnet/minecraftforge/event/RegistryEvent$Register;)V
        2: ASM: net.minecraftforge.registries.DeferredRegister$EventDispatcher@5585849e handleEvent(Lnet/minecraftforge/event/RegistryEvent$Register;)V
        3: ASM: net.minecraftforge.registries.DeferredRegister$EventDispatcher@41c15fb4 handleEvent(Lnet/minecraftforge/event/RegistryEvent$Register;)V
        4: ASM: net.minecraftforge.registries.DeferredRegister$EventDispatcher@32bda158 handleEvent(Lnet/minecraftforge/event/RegistryEvent$Register;)V
        5: ASM: net.minecraftforge.registries.DeferredRegister$EventDispatcher@2d953e9b handleEvent(Lnet/minecraftforge/event/RegistryEvent$Register;)V
        6: ASM: net.minecraftforge.registries.DeferredRegister$EventDispatcher@5e7cbadf handleEvent(Lnet/minecraftforge/event/RegistryEvent$Register;)V
        7: ASM: net.minecraftforge.registries.DeferredRegister$EventDispatcher@2555cf13 handleEvent(Lnet/minecraftforge/event/RegistryEvent$Register;)V
        8: ASM: class org.mineworld.event.loot.GlobalLootModifierSubscriber onGlobalLootModifierRegistration(Lnet/minecraftforge/event/RegistryEvent$Register;)V
        9: LOW
        10: ASM: class org.mineworld.event.common.CommonSetupSubscriber addBiomes(Lnet/minecraftforge/event/RegistryEvent$Register;)V
java.lang.ExceptionInInitializerError
    at TRANSFORMER/mineworld@0.0NONE/org.mineworld.utils.BiomeUtils.appleForest(BiomeUtils.java:72)
    at TRANSFORMER/forge@37.0.107/net.minecraftforge.registries.DeferredRegister.lambda$register$0(DeferredRegister.java:121)
    at TRANSFORMER/forge@37.0.107/net.minecraftforge.registries.DeferredRegister.addEntries(DeferredRegister.java:197)
    at TRANSFORMER/forge@37.0.107/net.minecraftforge.registries.DeferredRegister$EventDispatcher.handleEvent(DeferredRegister.java:169)
    at net.minecraftforge.eventbus.ASMEventHandler_0_EventDispatcher_handleEvent_Register.invoke(.dynamic)
    at MC-BOOTSTRAP/eventbus@5.0.3/net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:85)
    at MC-BOOTSTRAP/eventbus@5.0.3/net.minecraftforge.eventbus.EventBus.post(EventBus.java:302)
    at MC-BOOTSTRAP/eventbus@5.0.3/net.minecraftforge.eventbus.EventBus.post(EventBus.java:283)
    at LAYER PLUGIN/javafmllanguage@1.17.1-37.0.107/net.minecraftforge.fml.javafmlmod.FMLModContainer.acceptEvent(FMLModContainer.java:120)
    at LAYER PLUGIN/fmlcore@1.17.1-37.0.107/net.minecraftforge.fml.ModContainer.lambda$buildTransitionHandler$4(ModContainer.java:121)
    at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1800)
    at LAYER PLUGIN/fmlcore@1.17.1-37.0.107/net.minecraftforge.fml.ModWorkManager$SyncExecutor.driveOne(ModWorkManager.java:56)
    at LAYER PLUGIN/fmlcore@1.17.1-37.0.107/net.minecraftforge.fml.ModWorkManager$DrivenExecutor.drive(ModWorkManager.java:40)
    at LAYER PLUGIN/fmlcore@1.17.1-37.0.107/net.minecraftforge.fml.ModLoader.waitForTransition(ModLoader.java:216)
    at LAYER PLUGIN/fmlcore@1.17.1-37.0.107/net.minecraftforge.fml.ModLoader.lambda$dispatchAndHandleError$21(ModLoader.java:201)
    at java.base/java.util.Optional.ifPresent(Optional.java:178)
    at LAYER PLUGIN/fmlcore@1.17.1-37.0.107/net.minecraftforge.fml.ModLoader.dispatchAndHandleError(ModLoader.java:201)
    at LAYER PLUGIN/fmlcore@1.17.1-37.0.107/net.minecraftforge.fml.ModLoader.lambda$gatherAndInitializeMods$11(ModLoader.java:178)
    at java.base/java.lang.Iterable.forEach(Iterable.java:75)
    at LAYER PLUGIN/fmlcore@1.17.1-37.0.107/net.minecraftforge.fml.ModLoader.gatherAndInitializeMods(ModLoader.java:178)
    at TRANSFORMER/forge@37.0.107/net.minecraftforge.fmlclient.ClientModLoader.lambda$begin$1(ClientModLoader.java:108)
    at TRANSFORMER/forge@37.0.107/net.minecraftforge.fmlclient.ClientModLoader.lambda$createRunnableWithCatch$4(ClientModLoader.java:129)
    at TRANSFORMER/forge@37.0.107/net.minecraftforge.fmlclient.ClientModLoader.begin(ClientModLoader.java:108)
    at TRANSFORMER/minecraft@1.17.1/net.minecraft.client.Minecraft.<init>(Minecraft.java:460)
    at TRANSFORMER/minecraft@1.17.1/net.minecraft.client.main.Main.main(Main.java:151)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:567)
    at MC-BOOTSTRAP/fmlloader@1.17.1-37.0.107/net.minecraftforge.fml.loading.targets.ForgeClientUserdevLaunchHandler.lambda$launchService$0(ForgeClientUserdevLaunchHandler.java:38)
    at MC-BOOTSTRAP/cpw.mods.modlauncher@9.0.7/cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37)
    at MC-BOOTSTRAP/cpw.mods.modlauncher@9.0.7/cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53)
    at MC-BOOTSTRAP/cpw.mods.modlauncher@9.0.7/cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71)
    at MC-BOOTSTRAP/cpw.mods.modlauncher@9.0.7/cpw.mods.modlauncher.Launcher.run(Launcher.java:106)
    at MC-BOOTSTRAP/cpw.mods.modlauncher@9.0.7/cpw.mods.modlauncher.Launcher.main(Launcher.java:77)
    at MC-BOOTSTRAP/cpw.mods.modlauncher@9.0.7/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26)
    at MC-BOOTSTRAP/cpw.mods.modlauncher@9.0.7/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23)
    at cpw.mods.bootstraplauncher@0.1.17/cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:90)
Caused by: java.lang.NullPointerException: Registry Object not present: mineworld:lava_rock_columns
    at java.base/java.util.Objects.requireNonNull(Objects.java:334)
    at TRANSFORMER/forge@37.0.107/net.minecraftforge.fmllegacy.RegistryObject.get(RegistryObject.java:120)
    at TRANSFORMER/mineworld@0.0NONE/org.mineworld.core.MwConfiguredFeatures.<clinit>(MwConfiguredFeatures.java:103)
    ... 38 more

[15:02:31] [Render thread/ERROR] [ne.mi.fm.ja.FMLModContainer/LOADING]: Caught exception during event RegistryEvent.Register<minecraft:worldgen/biome> dispatch for modid mineworld
java.lang.ExceptionInInitializerError: null
    at org.mineworld.utils.BiomeUtils.appleForest(BiomeUtils.java:72) ~[%2379!:?] {re:classloading}
    at net.minecraftforge.registries.DeferredRegister.lambda$register$0(DeferredRegister.java:121) ~[forge-1.17.1-37.0.107_mapped_official_1.17.1-recomp.jar%2374%2380!:?] {re:classloading}
    at net.minecraftforge.registries.DeferredRegister.addEntries(DeferredRegister.java:197) ~[forge-1.17.1-37.0.107_mapped_official_1.17.1-recomp.jar%2374%2380!:?] {re:classloading}
    at net.minecraftforge.registries.DeferredRegister$EventDispatcher.handleEvent(DeferredRegister.java:169) ~[forge-1.17.1-37.0.107_mapped_official_1.17.1-recomp.jar%2374%2380!:?] {re:classloading}
    at net.minecraftforge.eventbus.ASMEventHandler_0_EventDispatcher_handleEvent_Register.invoke(.dynamic) ~[?:?] {}
    at net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:85) ~[eventbus-5.0.3.jar%237!:?] {}
    at net.minecraftforge.eventbus.EventBus.post(EventBus.java:302) ~[eventbus-5.0.3.jar%237!:?] {}
    at net.minecraftforge.eventbus.EventBus.post(EventBus.java:283) ~[eventbus-5.0.3.jar%237!:?] {}
    at net.minecraftforge.fml.javafmlmod.FMLModContainer.acceptEvent(FMLModContainer.java:120) ~[javafmllanguage-1.17.1-37.0.107.jar%2376!:?] {}
    at net.minecraftforge.fml.ModContainer.lambda$buildTransitionHandler$4(ModContainer.java:121) ~[fmlcore-1.17.1-37.0.107.jar%2378!:?] {}
    at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1800) ~[?:?] {}
    at net.minecraftforge.fml.ModWorkManager$SyncExecutor.driveOne(ModWorkManager.java:56) ~[fmlcore-1.17.1-37.0.107.jar%2378!:?] {}
    at net.minecraftforge.fml.ModWorkManager$DrivenExecutor.drive(ModWorkManager.java:40) ~[fmlcore-1.17.1-37.0.107.jar%2378!:?] {}
    at net.minecraftforge.fml.ModLoader.waitForTransition(ModLoader.java:216) ~[fmlcore-1.17.1-37.0.107.jar%2378!:?] {}
    at net.minecraftforge.fml.ModLoader.lambda$dispatchAndHandleError$21(ModLoader.java:201) ~[fmlcore-1.17.1-37.0.107.jar%2378!:?] {}
    at java.util.Optional.ifPresent(Optional.java:178) ~[?:?] {}
    at net.minecraftforge.fml.ModLoader.dispatchAndHandleError(ModLoader.java:201) ~[fmlcore-1.17.1-37.0.107.jar%2378!:?] {}
    at net.minecraftforge.fml.ModLoader.lambda$gatherAndInitializeMods$11(ModLoader.java:178) ~[fmlcore-1.17.1-37.0.107.jar%2378!:?] {}
    at java.lang.Iterable.forEach(Iterable.java:75) ~[?:?] {}
Caused by: java.lang.NullPointerException: Registry Object not present: mineworld:lava_rock_columns

    at net.minecraftforge.fml.ModLoader.gatherAndInitializeMods(ModLoader.java:178) ~[fmlcore-1.17.1-37.0.107.jar%2378!:?] {}
    at net.minecraftforge.fmlclient.ClientModLoader.lambda$begin$1(ClientModLoader.java:108) ~[forge-1.17.1-37.0.107_mapped_official_1.17.1-recomp.jar%2374%2380!:?] {re:classloading,pl:runtimedistcleaner:A}
    at net.minecraftforge.fmlclient.ClientModLoader.lambda$createRunnableWithCatch$4(ClientModLoader.java:129) ~[forge-1.17.1-37.0.107_mapped_official_1.17.1-recomp.jar%2374%2380!:?] {re:classloading,pl:runtimedistcleaner:A}
    at net.minecraftforge.fmlclient.ClientModLoader.begin(ClientModLoader.java:108) ~[forge-1.17.1-37.0.107_mapped_official_1.17.1-recomp.jar%2374%2380!:?] {re:classloading,pl:runtimedistcleaner:A}
    at net.minecraft.client.Minecraft.<init>(Minecraft.java:460) ~[forge-1.17.1-37.0.107_mapped_official_1.17.1-recomp.jar%2375!:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    at net.minecraft.client.main.Main.main(Main.java:151) ~[forge-1.17.1-37.0.107_mapped_official_1.17.1-recomp.jar%2375!:?] {re:classloading,pl:runtimedistcleaner:A}
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] {}
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78) ~[?:?] {}
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] {}
    at java.lang.reflect.Method.invoke(Method.java:567) ~[?:?] {}
    at net.minecraftforge.fml.loading.targets.ForgeClientUserdevLaunchHandler.lambda$launchService$0(ForgeClientUserdevLaunchHandler.java:38) ~[fmlloader-1.17.1-37.0.107.jar%233!:?] {}
    at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-9.0.7.jar%238!:?] {}
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) [modlauncher-9.0.7.jar%238!:?] {}
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) [modlauncher-9.0.7.jar%238!:?] {}
    at cpw.mods.modlauncher.Launcher.run(Launcher.java:106) [modlauncher-9.0.7.jar%238!:?] {}
    at cpw.mods.modlauncher.Launcher.main(Launcher.java:77) [modlauncher-9.0.7.jar%238!:?] {}
    at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) [modlauncher-9.0.7.jar%238!:?] {}
    at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) [modlauncher-9.0.7.jar%238!:?] {}
    at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:90) [bootstraplauncher-0.1.17.jar:?] {}
Caused by: java.lang.NullPointerException: Registry Object not present: mineworld:lava_rock_columns
    at java.util.Objects.requireNonNull(Objects.java:334) ~[?:?] {}
    at net.minecraftforge.fmllegacy.RegistryObject.get(RegistryObject.java:120) ~[forge-1.17.1-37.0.107_mapped_official_1.17.1-recomp.jar%2374%2380!:?] {re:classloading}
    at org.mineworld.core.MwConfiguredFeatures.<clinit>(MwConfiguredFeatures.java:103) ~[%2379!:?] {re:classloading}
    ... 38 more
[15:02:31] [Render thread/FATAL]: Detected errors during registry event dispatch, rolling back to VANILLA state
[15:02:32] [Render thread/FATAL]: Detected errors during registry event dispatch, roll back to VANILLA complete
[15:02:32] [Render thread/FATAL] [ne.mi.fm.ModLoader/LOADING]: Failed to complete lifecycle event LOAD_REGISTRIES, 1 errors found
[15:02:32] [Render thread/ERROR] [ne.mi.fm.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.sound.SoundLoadEvent to a broken mod state
[15:02:32] [Render thread/ERROR] [ne.mi.fm.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.ColorHandlerEvent$Block to a broken mod state
[15:02:32] [Render thread/ERROR] [ne.mi.fm.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.ColorHandlerEvent$Item to a broken mod state
[15:02:32] [Render thread/ERROR] [ne.mi.fm.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.ParticleFactoryRegisterEvent to a broken mod state
[15:02:32] [Render thread/INFO] [mojang/NarratorWindows]: Narrator library for x64 successfully loaded
[15:02:33] [Render thread/ERROR] [ne.mi.fm.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.RegisterClientReloadListenersEvent to a broken mod state
[15:02:33] [Render thread/ERROR] [ne.mi.fm.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.EntityRenderersEvent$RegisterLayerDefinitions to a broken mod state
[15:02:33] [Render thread/ERROR] [ne.mi.fm.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.EntityRenderersEvent$RegisterRenderers to a broken mod state
[15:02:33] [Render thread/INFO]: Reloading ResourceManager: Default
[15:02:33] [Worker-Main-11/ERROR] [ne.mi.fm.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.ModelRegistryEvent to a broken mod state
[15:02:33] [Worker-Main-13/ERROR] [ne.mi.fm.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.TextureStitchEvent$Pre to a broken mod state
[15:02:33] [Worker-Main-12/ERROR] [ne.mi.fm.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.TextureStitchEvent$Pre to a broken mod state
[15:02:33] [Worker-Main-8/ERROR] [ne.mi.fm.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.TextureStitchEvent$Pre to a broken mod state

> Task :runClient FAILED

Execution failed for task ':runClient'.
> Build cancelled while executing task ':runClient'

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.


 

 

Don't blame me if i always ask for your help. I just want to learn to be better :)

Link to comment
Share on other sites

Ok, so adding custom features during the BiomeLoadingEvent (essentialy what I already do for flowers/tree generation) solves the issue. However I'm curious to know more about the json Biomes. Where can I find some details about this system? Will this allow me to add biomes to the game without even writing code (so just the Json file)? I looked on the documentation but found nothing about it :/

Don't blame me if i always ask for your help. I just want to learn to be better :)

Link to comment
Share on other sites

So essentially I need the RegistryObject just for overworld biomes? For instance, if I have a custom dimension or want to add new Biomes to Nether/End I can just register the key and then handle everything via the Json? I assume this excludes features, so if I want my custom feature to be generated inside the Biome I still need to code it like I'm doing now, right? Just I won't need to add it through code in the BiomeLoadingEvent?

Don't blame me if i always ask for your help. I just want to learn to be better :)

Link to comment
Share on other sites

49 minutes ago, JimiIT92 said:

So essentially I need the RegistryObject just for overworld biomes?

yes since BiomeManager#addAdditionalOverworldBiomes requierd that the Biome is registerd via the RegistryEvent or DeferredRegister

58 minutes ago, JimiIT92 said:

For instance, if I have a custom dimension or want to add new Biomes to Nether/End I can just register the key and then handle everything via the Json? I assume this excludes features, so if I want my custom feature to be generated inside the Biome I still need to code it like I'm doing now, right? Just I won't need to add it through code in the BiomeLoadingEvent?

yes and yes

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • My modded minecraft world don't go past 100% on the loading screen. My backup still work, but i've made a lot of progress from the point i was that save. i have already checked online and did some suggestions i found, but nothing worked. Here is my latest log + i don´t have crash reports: https://github.com/GmsantosPT/Minecraft-mod-problems/tree/main   Pls Help, Santos
    • Please share a link to your crash report, as explained in the FAQ
    • I have a block already registered in my mod, which I have used in some worlds. The problem arises when in code, I add a property called CURRENT_AGE, when running Minecraft it freezes. In the console it doesn't appear any excpetion except that it stays in this phase: [Render thread/DEBUG] [ne.mi.co.ca.CapabilityManager/CAPABILITIES]: Attempting to automatically register: Lnet/minecraftforge/items/IItemHandler; Does anyone have an idea what it could be? I show the block and its registration public class SoulLichenBlock extends MultifaceBlock implements SimpleWaterloggedBlock, EntityBlock { public static final BooleanProperty WATERLOGGED = BlockStateProperties.WATERLOGGED; public static final IntegerProperty SKILL_LEVEL = IntegerProperty.create("soullichen_level", 0, 30); public static final DirectionProperty FACE = DirectionProperty.create("soullichen_face"); public static final DirectionProperty DIRECTION = DirectionProperty.create("soullichen_direction"); public static final IntegerProperty CURRENT_AGE = BlockStateProperties.AGE_25; private final MultifaceSpreader spreader = new MultifaceSpreader(this); private final MultifaceSpreader.DefaultSpreaderConfig config = new MultifaceSpreader.DefaultSpreaderConfig(this); private LivingEntity owner; //private static final Integer MAX_AGE = 25; public SoulLichenBlock(Properties properties) { super(properties); this.registerDefaultState(this .defaultBlockState() .setValue(WATERLOGGED, Boolean.FALSE) .setValue(SKILL_LEVEL, 0) .setValue(FACE, Direction.DOWN) .setValue(DIRECTION, Direction.DOWN) .trySetValue(CURRENT_AGE, 0) ); } public static ToIntFunction<BlockState> emission(int p_181223_) { return (p_181221_) -> MultifaceBlock.hasAnyFace(p_181221_) ? p_181223_ : 0; } public static boolean hasFace(BlockState p_153901_, @NotNull Direction p_153902_) { BooleanProperty booleanproperty = getFaceProperty(p_153902_); return p_153901_.hasProperty(booleanproperty) && p_153901_.getValue(booleanproperty); } protected void createBlockStateDefinition(StateDefinition.@NotNull Builder<Block, BlockState> stateDefinition) { stateDefinition.add(WATERLOGGED).add(SKILL_LEVEL).add(FACE).add(DIRECTION).add(CURRENT_AGE); super.createBlockStateDefinition(stateDefinition); } public @NotNull BlockState updateShape(BlockState p_153302_, @NotNull Direction p_153303_, @NotNull BlockState p_153304_, @NotNull LevelAccessor p_153305_, @NotNull BlockPos p_153306_, @NotNull BlockPos p_153307_) { if (p_153302_.getValue(WATERLOGGED)) { p_153305_.scheduleTick(p_153306_, Fluids.WATER, Fluids.WATER.getTickDelay(p_153305_)); } return super.updateShape(p_153302_, p_153303_, p_153304_, p_153305_, p_153306_, p_153307_); } @SuppressWarnings("deprecation") public @NotNull FluidState getFluidState(BlockState fluidState) { return fluidState.getValue(WATERLOGGED) ? Fluids.WATER.getSource(false) : super.getFluidState(fluidState); } public boolean propagatesSkylightDown(BlockState p_181225_, @NotNull BlockGetter blockGetter, @NotNull BlockPos blockPos) { return p_181225_.getFluidState().isEmpty(); } public @NotNull MultifaceSpreader getSpreader() { return this.spreader; } public Optional<MultifaceSpreader.SpreadPos> spreadFromRandomFaceTowardRandomDirection( BlockState p_221620_, LevelAccessor p_221621_, BlockPos p_221622_, RandomSource p_221623_, int skillPoints, int age) { return Direction.allShuffled(p_221623_).stream().filter((p_221680_) -> { return this.config.canSpreadFrom(p_221620_, p_221680_); }).map((p_221629_) -> { return this.spreadFromFaceTowardRandomDirection(p_221620_, p_221621_, p_221622_, p_221629_, p_221623_, false, skillPoints, age); }).filter(Optional::isPresent).findFirst().orElse(Optional.empty()); } public Optional<MultifaceSpreader.SpreadPos> spreadFromFaceTowardRandomDirection( BlockState blockState, LevelAccessor levelAccessor, BlockPos blockPos, Direction face, RandomSource randomSource, boolean aBoolean, int skillPoints, int age) { return Direction.allShuffled(randomSource).stream().map((direction) -> spreadFromFaceTowardDirection(blockState, levelAccessor, blockPos, face, direction, aBoolean, skillPoints, age)) .filter(Optional::isPresent) .findFirst() .orElse(Optional.empty()); } public Optional<MultifaceSpreader.SpreadPos> spreadFromFaceTowardDirection( BlockState blockState, LevelAccessor levelAccessor, BlockPos blockPos, Direction face, Direction direction, boolean aBoolean, int skillPoints, int age) { //DevilRpg.LOGGER.debug("BEGIN ==================================== spreadFromFaceTowardDirection skillPoints {}", skillPoints); return skillPoints < 0 ? Optional.empty() : getSpreadFromFaceTowardDirection(blockState, levelAccessor, blockPos, face, direction, this::canSpreadInto) .flatMap((spreadPos) -> { //DevilRpg.LOGGER.debug("END ================================ spreadFromFaceTowardDirection spreadPos {}", spreadPos); return this.spreadToFace(levelAccessor, spreadPos, aBoolean, skillPoints, direction, age); }); } public boolean canSpreadInto(BlockGetter p_221685_, BlockPos p_221686_, MultifaceSpreader.SpreadPos p_221687_) { BlockState blockstate = p_221685_.getBlockState(p_221687_.pos()); return this.stateCanBeReplaced(p_221685_, p_221686_, p_221687_.pos(), p_221687_.face(), blockstate) && isValidStateForPlacement(p_221685_, blockstate, p_221687_.pos(), p_221687_.face()); } protected boolean stateCanBeReplaced(BlockGetter p_221688_, BlockPos p_221689_, BlockPos p_221690_, Direction p_221691_, BlockState p_221692_) { return p_221692_.isAir() || p_221692_.is(this) || p_221692_.is(Blocks.WATER) && p_221692_.getFluidState().isSource(); } public Optional<MultifaceSpreader.SpreadPos> getSpreadFromFaceTowardDirection(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, Direction face, Direction direction, MultifaceSpreader.SpreadPredicate spreadPredicate) { //DevilRpg.LOGGER.debug("--- getSpreadFromFaceTowardDirection direction.getAxis() == face.getAxis(): {}", direction.getAxis() == face.getAxis()); ArrayList<Direction> directions = new ArrayList<>(); directions.add(direction); if (direction.getAxis() == face.getAxis()) { if (direction.getAxis().isHorizontal()) { directions = Arrays.stream(Direction.values()).filter(dir -> dir.getAxis().isVertical()).collect(Collectors.toCollection(ArrayList::new)); } if (direction.getAxis().isVertical()) { directions = Arrays.stream(Direction.values()).filter(dir -> dir.getAxis().isHorizontal()).collect(Collectors.toCollection(ArrayList::new)); } } for (Direction directionElement : directions) { /*DevilRpg.LOGGER.debug("--->> getSpreadFromFaceTowardDirection config.isOtherBlockValidAsSource(blockState) {} || " + "hasFace(blockState, face) {} && " + "!hasFace(blockState, direction) {}", config.isOtherBlockValidAsSource(blockState), hasFace(blockState, face), !hasFace(blockState, directionElement));*/ if (config.isOtherBlockValidAsSource(blockState) || hasFace(blockState, face) && !hasFace(blockState, directionElement)) { for (MultifaceSpreader.SpreadType multifacespreader$spreadtype : config.getSpreadTypes()) { MultifaceSpreader.SpreadPos multifacespreader$spreadpos = multifacespreader$spreadtype.getSpreadPos(blockPos, directionElement, face); //DevilRpg.LOGGER.debug("--- test SpreadPos: {} direction {} face {} ", multifacespreader$spreadpos, directionElement, face); if (spreadPredicate.test(blockGetter, blockPos, multifacespreader$spreadpos)) { //DevilRpg.LOGGER.debug("--- spreadPredicate success:"); return Optional.of(multifacespreader$spreadpos); } } } } return Optional.empty(); } public boolean isValidStateForPlacement(@NotNull BlockGetter blockGetter, @NotNull BlockState blockState, @NotNull BlockPos blockPos, @NotNull Direction face) { //DevilRpg.LOGGER.debug("------ isValidStateForPlacement 1st condition: {} && ({} || {})", this.isFaceSupported(face), !blockState.is(this), !hasFace(blockState, face)); if (this.isFaceSupported(face) && (!blockState.is(this) || !hasFace(blockState, face))) { BlockPos blockpos = blockPos.relative(face); //DevilRpg.LOGGER.debug("------ isValidStateForPlacement 2nd condition: canAttachTo {} ", secondCondition); return canAttachTo(blockGetter, face, blockpos, blockGetter.getBlockState(blockpos)); } else { return false; } } @Nullable public BlockState getStateForPlacement(@NotNull BlockState blockState, @NotNull BlockGetter blockGetter, @NotNull BlockPos blockPos, @NotNull Direction face, int skillPoints, Direction direction, int age) { //DevilRpg.LOGGER.debug("--- getStateForPlacement"); boolean isNotValidStateForPlacement = !this.isValidStateForPlacement(blockGetter, blockState, blockPos, face); //DevilRpg.LOGGER.debug("------- isNotValidStateForPlacement: {}", isNotValidStateForPlacement); if (isNotValidStateForPlacement) { return null; } else { BlockState blockstate; if (blockState.is(this)) { blockstate = blockState; } else if (this.isWaterloggable() && blockState.getFluidState().isSourceOfType(Fluids.WATER)) { blockstate = this.defaultBlockState().setValue(BlockStateProperties.WATERLOGGED, Boolean.TRUE); } else { blockstate = this.defaultBlockState(); } //DevilRpg.LOGGER.debug("------- getStateForPlacement -> blockStateResult "); return blockstate .setValue(getFaceProperty(face), Boolean.TRUE) .setValue(SKILL_LEVEL, skillPoints).setValue(FACE, face) .setValue(DIRECTION, direction) .setValue(CURRENT_AGE,age) ; } } public Optional<MultifaceSpreader.SpreadPos> spreadToFace(LevelAccessor levelAccessor, MultifaceSpreader.SpreadPos spreadPos, boolean p_221596_, int skillPoints, Direction direction, int age) { BlockState blockstate = levelAccessor.getBlockState(spreadPos.pos()); //DevilRpg.LOGGER.debug("---> spreadToFace blockstate{} direction: {}", blockstate, direction); return this.placeBlock(levelAccessor, spreadPos, blockstate, p_221596_, skillPoints, direction, age) ? Optional.of(spreadPos) : Optional.empty(); } public boolean placeBlock(LevelAccessor p_221702_, MultifaceSpreader.SpreadPos p_221703_, BlockState p_221704_, boolean p_221705_, int skillPoints, Direction direction, int age) { //DevilRpg.LOGGER.debug("---> placeBlock {} direction {} ", p_221703_, direction); BlockState blockstate = this.getStateForPlacement(p_221704_, p_221702_, p_221703_.pos(), p_221703_.face(), skillPoints, direction, age); if (blockstate != null) { if (p_221705_) { p_221702_.getChunk(p_221703_.pos()).markPosForPostprocessing(p_221703_.pos()); } //DevilRpg.LOGGER.debug("------> setBlock"); return p_221702_.setBlock(p_221703_.pos(), blockstate, 2); } else { return false; } } public long spreadFromFaceTowardAllDirections( BlockState blockState, LevelAccessor levelAccessor, BlockPos blockPos, Direction face, boolean aBoolean, int skillPoints, int age) { return Direction.stream().map((p_221656_) -> spreadFromFaceTowardDirection(blockState, levelAccessor, blockPos, face, p_221656_, aBoolean, skillPoints, age)) .filter(Optional::isPresent).count(); } private boolean isWaterloggable() { return this.stateDefinition.getProperties().contains(BlockStateProperties.WATERLOGGED); } @Override public void setPlacedBy(@NotNull Level level, @NotNull BlockPos blockPos, @NotNull BlockState blockState, @Nullable LivingEntity livingEntity, @NotNull ItemStack itemStack) { super.setPlacedBy(level, blockPos, blockState, livingEntity, itemStack); this.setOwner(livingEntity); } public LivingEntity getOwner() { return this.owner; } private void setOwner(LivingEntity livingEntity) { this.owner = livingEntity; } @Deprecated @Override public void entityInside(@NotNull BlockState blockState, @NotNull Level level, @NotNull BlockPos blockPos, @NotNull Entity entity) { if (entity instanceof LivingEntity /*&& entity.getType() != EntityType.BEE*/ && entity.getType() != ModEntities.LICHEN_SEEDBALL.get()) { entity.makeStuckInBlock(blockState, new Vec3(0.8D, 0.75D, 0.8D)); if (!level.isClientSide /*&& (entity.xOld != entity.getX() || entity.zOld != entity.getZ())*/) { // double d0 = Math.abs(entity.getX() - entity.xOld); // double d1 = Math.abs(entity.getZ() - entity.zOld); // if (d0 >= (double) 0.003F || d1 >= (double) 0.003F) { entity.hurt(level.damageSources().playerAttack((Player) owner), 1.0F); // Aplicar aceleración al movimiento double speedBoost = -0.4; // Ajusta este valor según lo rápido que quieras que sea el impulso double motionX = entity.getX() - entity.xOld; double motionZ = entity.getZ() - entity.zOld; double speed = Math.sqrt(motionX * motionX + motionZ * motionZ); //if (speed > 0.0) { entity.setDeltaMovement(entity.getDeltaMovement().multiply( (motionX / speed) * speedBoost, 0.0, (motionZ / speed) * speedBoost )); // } //} } } } @Nullable @Override public BlockEntity newBlockEntity(@NotNull BlockPos pos, @NotNull BlockState state) { return ModEntityBlocks.SOUL_LICHEN_ENTITY_BLOCK.get().create(pos, state); } @Nullable @Override public <T extends BlockEntity> BlockEntityTicker<T> getTicker(Level level, @NotNull BlockState blockState, @NotNull BlockEntityType<T> type) { return level.isClientSide ? null : (alevel, pos, aBlockstate, blockEntity) -> { if (blockEntity instanceof SoulLichenBlockEntity soulLichenBlockEntity && alevel.getGameTime() % 5 == 0) { soulLichenBlockEntity.tick(blockState, (ServerLevel) alevel, pos, alevel.getRandom()); //DevilRpg.LOGGER.info("-------->tick. this: {}", this.getClass().getSimpleName()); } }; } }   This is the registration:   public final class ModBlocks { public static final DeferredRegister<Block> BLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS, DevilRpg.MODID); ... public static final RegistryObject<SoulLichenBlock> SOUL_LICHEN_BLOCK = BLOCKS.register("soullichen", () -> new SoulLichenBlock( Block.Properties.copy(Blocks.GLOW_LICHEN).lightLevel(SoulLichenBlock.emission(7)).randomTicks() )); }  
    • If you are using AMD/ATI, check for driver updates on their website - do not update via system
    • Hi, Create a new class that extends "Block" class and you need json for it in resources/assets/modid/blockstates directory and resources/assets/modid/models. You can generate json for it using a tool like misodes model generator. Here, atleast, are blocks explained at forge docs.  Don't forge to look at vanilla code, like Magma Block is a good reference if you're trying a "green fire block".  Modid should be replaced with your actual forge mod namespace!
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.