Jump to content

Applying a Custom Effect


NCP Bails

Recommended Posts

I've made an armour piece that gives the player an effect when worn, but I can only make it apply a Minecraft effect, and not my own. I assume that this is because MobEffectInstance asks for a MobEffect, but I don't know how to get around this.

 

Code working with Minecraft effect

private static final Map<ArmorMaterial, MobEffectInstance> MATERIAL_TO_EFFECT_MAP =
            (new ImmutableMap.Builder<ArmorMaterial, MobEffectInstance>())
                    .put(ModArmourMaterials.PRISMARITE,
                            new MobEffectInstance(MobEffects.DOLPHINS_GRACE, 200, 1, true, true)).build();

Code with custom effect, which doesn't work

private static final Map<ArmorMaterial, MobEffectInstance> MATERIAL_TO_EFFECT_MAP =
            (new ImmutableMap.Builder<ArmorMaterial, MobEffectInstance>())
                    .put(ModArmourMaterials.PRISMARITE,
                            new MobEffectInstance(ModEffects.PRISMARITE_SPEED, 200, 1, true, true)).build();

 

Link to comment
Share on other sites

ModEffects

public class ModEffects {
    public static final DeferredRegister<MobEffect> MOB_EFFECTS
            = DeferredRegister.create(ForgeRegistries.MOB_EFFECTS, ModestMining.MOD_ID);

    public static final RegistryObject<MobEffect> PRISMARITE_SPEED = MOB_EFFECTS.register("prismarite_speed",
            () -> new PrismariteEffect(MobEffectCategory.BENEFICIAL, 1268330));

    public static void register(IEventBus eventBus) {
        MOB_EFFECTS.register(eventBus);
    }
}

 

ModArmorItem (Where I am trying to apply the effect)

public class ModArmorItem extends ArmorItem {
    private static final Map<ArmorMaterial, MobEffectInstance> MATERIAL_TO_EFFECT_MAP =
            (new ImmutableMap.Builder<ArmorMaterial, MobEffectInstance>())
                    .put(ModArmourMaterials.PRISMARITE,
                            new MobEffectInstance(ModEffects.PRISMARITE_SPEED, 200, 1, true, true)).build();

    public ModArmorItem(ArmorMaterial material, EquipmentSlot slot, Properties settings) {
        super(material, slot, settings);
    }

    @Override
    public void onArmorTick(ItemStack stack, Level world, Player player) {
        if(!world.isClientSide()) {
            if(hasFullSuitOfArmorOn(player)) {
                evaluateArmorEffects(player);
            }
        }
    }

    private void evaluateArmorEffects(Player player) {
        for (Map.Entry<ArmorMaterial, MobEffectInstance> entry : MATERIAL_TO_EFFECT_MAP.entrySet()) {
            ArmorMaterial mapArmorMaterial = entry.getKey();
            MobEffectInstance mapStatusEffect = entry.getValue();

            if(hasCorrectArmorOn(mapArmorMaterial, player)) {
                addStatusEffectForMaterial(player, mapArmorMaterial, mapStatusEffect);
            }
        }
    }

    private void addStatusEffectForMaterial(Player player, ArmorMaterial mapArmorMaterial,
                                            MobEffectInstance mapStatusEffect) {
        boolean hasPlayerEffect = player.hasEffect(mapStatusEffect.getEffect());

        if(hasCorrectArmorOn(mapArmorMaterial, player) && !hasPlayerEffect) {
            player.addEffect(new MobEffectInstance(mapStatusEffect.getEffect(),
                    mapStatusEffect.getDuration(), mapStatusEffect.getAmplifier()));
        }
    }

    private boolean hasFullSuitOfArmorOn(Player player) {
        ItemStack boots = player.getInventory().getArmor(0);
        ItemStack leggings = player.getInventory().getArmor(1);
        ItemStack breastplate = player.getInventory().getArmor(2);
        ItemStack helmet = player.getInventory().getArmor(3);

        return !helmet.isEmpty() && !breastplate.isEmpty()
                && !leggings.isEmpty() && !boots.isEmpty();
    }

    private boolean hasCorrectArmorOn(ArmorMaterial material, Player player) {
        for (ItemStack armorStack: player.getInventory().armor) {
            if(!(armorStack.getItem() instanceof ArmorItem)) {
                return false;
            }
        }

        ArmorItem boots = ((ArmorItem)player.getInventory().getArmor(0).getItem());
        ArmorItem leggings = ((ArmorItem)player.getInventory().getArmor(1).getItem());
        ArmorItem breastplate = ((ArmorItem)player.getInventory().getArmor(2).getItem());
        ArmorItem helmet = ((ArmorItem)player.getInventory().getArmor(3).getItem());

        return helmet.getMaterial() == material && breastplate.getMaterial() == material &&
                leggings.getMaterial() == material && boots.getMaterial() == material;
    }
}

 

Link to comment
Share on other sites

The code doesn't run, it gives the following error:

error: incompatible types: RegistryObject<MobEffect> cannot be converted to MobEffect new MobEffectInstance(ModEffects.PRISMARITE_SPEED, 200, 1, true, true)).build();
                                                            

Link to comment
Share on other sites

You should not be posting compiler errors in this forum.

This is not a java teaching/support forum.

 

PRISMARITE_SPEED.get()

gets you the real object of type MobEffect.

https://forge.gemwire.uk/wiki/Registration

Edited by warjort

Boilerplate:

If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one.

If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install

Large files should be posted to a file sharing site like https://gist.github.com  You should also read the support forum sticky post.

Link to comment
Share on other sites

I only posted the error because I was asked about it
Anyway, I actually was using .get() but forgot to put it back after changing it to Dolphins Grace. After putting it back it encounters an error during the common_setup phase, as modestmining:prismarite_speed is not present.

Link to comment
Share on other sites

9 hours ago, NCP Bails said:

it encounters an error during the common_setup phase, as modestmining:prismarite_speed is not present.

You shouldn't quote an error like that, full logs are needed for context.

A github repository of the current code is also helpful, as opposed to copied and pasted bits, and would possibly avoid errors in communication such as the (seemingly) missing get() method call.

I believe these things are needed for further assistance/debugging.

Link to comment
Share on other sites

Sure, here's The Github

And the latest.log

[26Nov2022 10:34:55.201] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher running: args [--launchTarget, forgeclientuserdev, --version, MOD_DEV, --assetIndex, 1.18, --assetsDir, C:\Users\baile\.gradle\caches\forge_gradle\assets, --gameDir, ., --fml.forgeVersion, 40.1.80, --fml.mcVersion, 1.18.2, --fml.forgeGroup, net.minecraftforge, --fml.mcpVersion, 20220404.173914]
[26Nov2022 10:34:55.207] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher 9.1.3+9.1.3+main.9b69c82a starting: java version 17.0.4.1 by Eclipse Adoptium
[26Nov2022 10:34:55.335] [main/INFO] [mixin/]: SpongePowered MIXIN Subsystem Version=0.8.5 Source=union:/C:/Users/baile/.gradle/caches/modules-2/files-2.1/org.spongepowered/mixin/0.8.5/9d1c0c3a304ae6697ecd477218fa61b850bf57fc/mixin-0.8.5.jar%2323!/ Service=ModLauncher Env=CLIENT
[26Nov2022 10:34:55.667] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file C:\Users\baile\.gradle\caches\modules-2\files-2.1\net.minecraftforge\javafmllanguage\1.18.2-40.1.80\90438da2d8de451a793fc69d3c343ebc5bc401e1\javafmllanguage-1.18.2-40.1.80.jar is missing mods.toml file
[26Nov2022 10:34:55.672] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file C:\Users\baile\.gradle\caches\modules-2\files-2.1\net.minecraftforge\lowcodelanguage\1.18.2-40.1.80\f81c79807d6b57938f2169b01f403ff103f3ed50\lowcodelanguage-1.18.2-40.1.80.jar is missing mods.toml file
[26Nov2022 10:34:55.676] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file C:\Users\baile\.gradle\caches\modules-2\files-2.1\net.minecraftforge\mclanguage\1.18.2-40.1.80\8771f610fa019b272803538ce71f77409082691f\mclanguage-1.18.2-40.1.80.jar is missing mods.toml file
[26Nov2022 10:34:55.680] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file C:\Users\baile\.gradle\caches\modules-2\files-2.1\net.minecraftforge\fmlcore\1.18.2-40.1.80\a0e12c8a0526791f1a7840d3b1c4fc061c6bd30f\fmlcore-1.18.2-40.1.80.jar is missing mods.toml file
[26Nov2022 10:34:56.007] [main/INFO] [net.minecraftforge.fml.loading.moddiscovery.JarInJarDependencyLocator/]: No dependencies to load found. Skipping!
[26Nov2022 10:34:57.831] [main/INFO] [mixin/]: Compatibility level set to JAVA_17
[26Nov2022 10:34:57.837] [main/INFO] [cpw.mods.modlauncher.LaunchServiceHandler/MODLAUNCHER]: Launching target 'forgeclientuserdev' with arguments [--version, MOD_DEV, --gameDir, ., --assetsDir, C:\Users\baile\.gradle\caches\forge_gradle\assets, --assetIndex, 1.18]
[26Nov2022 10:34:59.317] [main/INFO] [mixin/]: Remapping refMap blueprint.refmap.json using D:\Minecraft Modding\github\modestmining\Modest-Mining\build\createSrgToMcp\output.srg
[26Nov2022 10:34:59.319] [main/INFO] [mixin/]: Remapping refMap savage_and_ravage.refmap.json using D:\Minecraft Modding\github\modestmining\Modest-Mining\build\createSrgToMcp\output.srg
[26Nov2022 10:35:04.934] [Render thread/WARN] [net.minecraft.server.packs.VanillaPackResources/]: Assets URL 'union:/C:/Users/baile/.gradle/caches/forge_gradle/minecraft_user_repo/net/minecraftforge/forge/1.18.2-40.1.80_mapped_official_1.18.2/forge-1.18.2-40.1.80_mapped_official_1.18.2-recomp.jar%2379!/assets/.mcassetsroot' uses unexpected schema
[26Nov2022 10:35:04.934] [Render thread/WARN] [net.minecraft.server.packs.VanillaPackResources/]: Assets URL 'union:/C:/Users/baile/.gradle/caches/forge_gradle/minecraft_user_repo/net/minecraftforge/forge/1.18.2-40.1.80_mapped_official_1.18.2/forge-1.18.2-40.1.80_mapped_official_1.18.2-recomp.jar%2379!/data/.mcassetsroot' uses unexpected schema
[26Nov2022 10:35:04.943] [Render thread/INFO] [com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService/]: Environment: authHost='https://authserver.mojang.com', accountsHost='https://api.mojang.com', sessionHost='https://sessionserver.mojang.com', servicesHost='https://api.minecraftservices.com', name='PROD'
[26Nov2022 10:35:04.947] [Render thread/INFO] [net.minecraft.client.Minecraft/]: Setting user: Dev
[26Nov2022 10:35:05.147] [Render thread/INFO] [net.minecraft.client.Minecraft/]: Backend library: LWJGL version 3.2.2 SNAPSHOT
[26Nov2022 10:35:07.353] [modloading-worker-0/INFO] [net.minecraftforge.common.ForgeMod/FORGEMOD]: Forge mod loading, version 40.1.80, for MC 1.18.2 with MCP 20220404.173914
[26Nov2022 10:35:07.353] [modloading-worker-0/INFO] [net.minecraftforge.common.MinecraftForge/FORGE]: MinecraftForge v40.1.80 Initialized
[26Nov2022 10:35:08.155] [Render thread/ERROR] [net.minecraftforge.fml.javafmlmod.FMLModContainer/]: Exception caught during firing event: null
	Index: 2
	Listeners:
		0: NORMAL
		1: ASM: net.minecraftforge.registries.DeferredRegister$EventDispatcher@33c9256b handleEvent(Lnet/minecraftforge/event/RegistryEvent$Register;)V
		2: ASM: net.minecraftforge.registries.DeferredRegister$EventDispatcher@745163ab handleEvent(Lnet/minecraftforge/event/RegistryEvent$Register;)V
		3: ASM: net.minecraftforge.registries.DeferredRegister$EventDispatcher@1eab1e0a handleEvent(Lnet/minecraftforge/event/RegistryEvent$Register;)V
		4: ASM: net.minecraftforge.registries.DeferredRegister$EventDispatcher@5363b9be handleEvent(Lnet/minecraftforge/event/RegistryEvent$Register;)V
		5: ASM: net.minecraftforge.registries.DeferredRegister$EventDispatcher@37c3acec handleEvent(Lnet/minecraftforge/event/RegistryEvent$Register;)V
		6: ASM: net.minecraftforge.registries.DeferredRegister$EventDispatcher@7fb93dbe handleEvent(Lnet/minecraftforge/event/RegistryEvent$Register;)V
		7: ASM: net.minecraftforge.registries.DeferredRegister$EventDispatcher@71a321d8 handleEvent(Lnet/minecraftforge/event/RegistryEvent$Register;)V
		8: ASM: net.minecraftforge.registries.DeferredRegister$EventDispatcher@5262641a handleEvent(Lnet/minecraftforge/event/RegistryEvent$Register;)V
		9: ASM: class com.ncpbails.modestmining.event.ModEventBusEvents registerRecipeTypes(Lnet/minecraftforge/event/RegistryEvent$Register;)V
java.lang.ExceptionInInitializerError
	at TRANSFORMER/modestmining@0.0.1/com.ncpbails.modestmining.item.ModItems.lambda$static$90(ModItems.java:260)
	at TRANSFORMER/forge@40.1.80/net.minecraftforge.registries.DeferredRegister.lambda$register$0(DeferredRegister.java:214)
	at TRANSFORMER/forge@40.1.80/net.minecraftforge.registries.DeferredRegister.addEntries(DeferredRegister.java:446)
	at TRANSFORMER/forge@40.1.80/net.minecraftforge.registries.DeferredRegister$EventDispatcher.handleEvent(DeferredRegister.java:376)
	at net.minecraftforge.eventbus.ASMEventHandler_2_EventDispatcher_handleEvent_Register.invoke(.dynamic)
	at MC-BOOTSTRAP/eventbus@5.0.7/net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:85)
	at MC-BOOTSTRAP/eventbus@5.0.7/net.minecraftforge.eventbus.EventBus.post(EventBus.java:302)
	at MC-BOOTSTRAP/eventbus@5.0.7/net.minecraftforge.eventbus.EventBus.post(EventBus.java:283)
	at LAYER PLUGIN/javafmllanguage@1.18.2-40.1.80/net.minecraftforge.fml.javafmlmod.FMLModContainer.acceptEvent(FMLModContainer.java:106)
	at LAYER PLUGIN/fmlcore@1.18.2-40.1.80/net.minecraftforge.fml.ModContainer.lambda$buildTransitionHandler$4(ModContainer.java:107)
	at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1804)
	at LAYER PLUGIN/fmlcore@1.18.2-40.1.80/net.minecraftforge.fml.ModWorkManager$SyncExecutor.driveOne(ModWorkManager.java:42)
	at LAYER PLUGIN/fmlcore@1.18.2-40.1.80/net.minecraftforge.fml.ModWorkManager$DrivenExecutor.drive(ModWorkManager.java:26)
	at LAYER PLUGIN/fmlcore@1.18.2-40.1.80/net.minecraftforge.fml.ModLoader.waitForTransition(ModLoader.java:202)
	at LAYER PLUGIN/fmlcore@1.18.2-40.1.80/net.minecraftforge.fml.ModLoader.lambda$dispatchAndHandleError$21(ModLoader.java:187)
	at java.base/java.util.Optional.ifPresent(Optional.java:178)
	at LAYER PLUGIN/fmlcore@1.18.2-40.1.80/net.minecraftforge.fml.ModLoader.dispatchAndHandleError(ModLoader.java:187)
	at LAYER PLUGIN/fmlcore@1.18.2-40.1.80/net.minecraftforge.fml.ModLoader.lambda$gatherAndInitializeMods$11(ModLoader.java:164)
	at java.base/java.lang.Iterable.forEach(Iterable.java:75)
	at LAYER PLUGIN/fmlcore@1.18.2-40.1.80/net.minecraftforge.fml.ModLoader.gatherAndInitializeMods(ModLoader.java:164)
	at TRANSFORMER/forge@40.1.80/net.minecraftforge.client.loading.ClientModLoader.lambda$begin$1(ClientModLoader.java:92)
	at TRANSFORMER/forge@40.1.80/net.minecraftforge.client.loading.ClientModLoader.lambda$createRunnableWithCatch$4(ClientModLoader.java:112)
	at TRANSFORMER/forge@40.1.80/net.minecraftforge.client.loading.ClientModLoader.begin(ClientModLoader.java:92)
	at TRANSFORMER/minecraft@1.18.2/net.minecraft.client.Minecraft.<init>(Minecraft.java:459)
	at TRANSFORMER/minecraft@1.18.2/net.minecraft.client.main.Main.main(Main.java:169)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at MC-BOOTSTRAP/fmlloader@1.18.2-40.1.80/net.minecraftforge.fml.loading.targets.ForgeClientUserdevLaunchHandler.lambda$launchService$0(ForgeClientUserdevLaunchHandler.java:24)
	at MC-BOOTSTRAP/cpw.mods.modlauncher@9.1.3/cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37)
	at MC-BOOTSTRAP/cpw.mods.modlauncher@9.1.3/cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53)
	at MC-BOOTSTRAP/cpw.mods.modlauncher@9.1.3/cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71)
	at MC-BOOTSTRAP/cpw.mods.modlauncher@9.1.3/cpw.mods.modlauncher.Launcher.run(Launcher.java:106)
	at MC-BOOTSTRAP/cpw.mods.modlauncher@9.1.3/cpw.mods.modlauncher.Launcher.main(Launcher.java:77)
	at MC-BOOTSTRAP/cpw.mods.modlauncher@9.1.3/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26)
	at MC-BOOTSTRAP/cpw.mods.modlauncher@9.1.3/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23)
	at cpw.mods.bootstraplauncher@1.0.0/cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:149)
Caused by: java.lang.NullPointerException: Registry Object not present: modestmining:prismarite_speed
	at java.base/java.util.Objects.requireNonNull(Objects.java:334)
	at TRANSFORMER/forge@40.1.80/net.minecraftforge.registries.RegistryObject.get(RegistryObject.java:320)
	at TRANSFORMER/modestmining@0.0.1/com.ncpbails.modestmining.item.custom.ModArmorItem.<clinit>(ModArmorItem.java:21)
	... 38 more

[26Nov2022 10:35:08.156] [Render thread/ERROR] [net.minecraftforge.fml.javafmlmod.FMLModContainer/LOADING]: Caught exception during event RegistryEvent.Register<minecraft:item> dispatch for modid modestmining
java.lang.ExceptionInInitializerError: null
	at com.ncpbails.modestmining.item.ModItems.lambda$static$90(ModItems.java:260) ~[%2384!/:?]
	at net.minecraftforge.registries.DeferredRegister.lambda$register$0(DeferredRegister.java:214) ~[forge-1.18.2-40.1.80_mapped_official_1.18.2-recomp.jar%2378%2385!/:?]
	at net.minecraftforge.registries.DeferredRegister.addEntries(DeferredRegister.java:446) ~[forge-1.18.2-40.1.80_mapped_official_1.18.2-recomp.jar%2378%2385!/:?]
	at net.minecraftforge.registries.DeferredRegister$EventDispatcher.handleEvent(DeferredRegister.java:376) ~[forge-1.18.2-40.1.80_mapped_official_1.18.2-recomp.jar%2378%2385!/:?]
	at net.minecraftforge.eventbus.ASMEventHandler_2_EventDispatcher_handleEvent_Register.invoke(.dynamic) ~[?:?]
	at net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:85) ~[eventbus-5.0.7.jar%2310!/:?]
	at net.minecraftforge.eventbus.EventBus.post(EventBus.java:302) ~[eventbus-5.0.7.jar%2310!/:?]
	at net.minecraftforge.eventbus.EventBus.post(EventBus.java:283) ~[eventbus-5.0.7.jar%2310!/:?]
	at net.minecraftforge.fml.javafmlmod.FMLModContainer.acceptEvent(FMLModContainer.java:106) ~[javafmllanguage-1.18.2-40.1.80.jar%2380!/:?]
	at net.minecraftforge.fml.ModContainer.lambda$buildTransitionHandler$4(ModContainer.java:107) ~[fmlcore-1.18.2-40.1.80.jar%2383!/:?]
	at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1804) ~[?:?]
	at net.minecraftforge.fml.ModWorkManager$SyncExecutor.driveOne(ModWorkManager.java:42) ~[fmlcore-1.18.2-40.1.80.jar%2383!/:?]
	at net.minecraftforge.fml.ModWorkManager$DrivenExecutor.drive(ModWorkManager.java:26) ~[fmlcore-1.18.2-40.1.80.jar%2383!/:?]
	at net.minecraftforge.fml.ModLoader.waitForTransition(ModLoader.java:202) ~[fmlcore-1.18.2-40.1.80.jar%2383!/:?]
	at net.minecraftforge.fml.ModLoader.lambda$dispatchAndHandleError$21(ModLoader.java:187) ~[fmlcore-1.18.2-40.1.80.jar%2383!/:?]
	at java.util.Optional.ifPresent(Optional.java:178) ~[?:?]
	at net.minecraftforge.fml.ModLoader.dispatchAndHandleError(ModLoader.java:187) ~[fmlcore-1.18.2-40.1.80.jar%2383!/:?]
	at net.minecraftforge.fml.ModLoader.lambda$gatherAndInitializeMods$11(ModLoader.java:164) ~[fmlcore-1.18.2-40.1.80.jar%2383!/:?]
	at java.lang.Iterable.forEach(Iterable.java:75) ~[?:?]
	at net.minecraftforge.fml.ModLoader.gatherAndInitializeMods(ModLoader.java:164) ~[fmlcore-1.18.2-40.1.80.jar%2383!/:?]
	at net.minecraftforge.client.loading.ClientModLoader.lambda$begin$1(ClientModLoader.java:92) ~[forge-1.18.2-40.1.80_mapped_official_1.18.2-recomp.jar%2378%2385!/:?]
	at net.minecraftforge.client.loading.ClientModLoader.lambda$createRunnableWithCatch$4(ClientModLoader.java:112) ~[forge-1.18.2-40.1.80_mapped_official_1.18.2-recomp.jar%2378%2385!/:?]
	at net.minecraftforge.client.loading.ClientModLoader.begin(ClientModLoader.java:92) ~[forge-1.18.2-40.1.80_mapped_official_1.18.2-recomp.jar%2378%2385!/:?]
	at net.minecraft.client.Minecraft.<init>(Minecraft.java:459) ~[forge-1.18.2-40.1.80_mapped_official_1.18.2-recomp.jar%2379!/:?]
	at net.minecraft.client.main.Main.main(Main.java:169) ~[forge-1.18.2-40.1.80_mapped_official_1.18.2-recomp.jar%2379!/:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
	at net.minecraftforge.fml.loading.targets.ForgeClientUserdevLaunchHandler.lambda$launchService$0(ForgeClientUserdevLaunchHandler.java:24) ~[fmlloader-1.18.2-40.1.80.jar%230!/:?]
	at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-9.1.3.jar%2311!/:?]
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) [modlauncher-9.1.3.jar%2311!/:?]
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) [modlauncher-9.1.3.jar%2311!/:?]
	at cpw.mods.modlauncher.Launcher.run(Launcher.java:106) [modlauncher-9.1.3.jar%2311!/:?]
	at cpw.mods.modlauncher.Launcher.main(Launcher.java:77) [modlauncher-9.1.3.jar%2311!/:?]
	at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) [modlauncher-9.1.3.jar%2311!/:?]
	at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) [modlauncher-9.1.3.jar%2311!/:?]
	at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:149) [bootstraplauncher-1.0.0.jar:?]
Caused by: java.lang.NullPointerException: Registry Object not present: modestmining:prismarite_speed
	at java.util.Objects.requireNonNull(Objects.java:334) ~[?:?]
	at net.minecraftforge.registries.RegistryObject.get(RegistryObject.java:320) ~[forge-1.18.2-40.1.80_mapped_official_1.18.2-recomp.jar%2378%2385!/:?]
	at com.ncpbails.modestmining.item.custom.ModArmorItem.<clinit>(ModArmorItem.java:21) ~[%2384!/:?]
	... 38 more
[26Nov2022 10:35:08.398] [Render thread/FATAL] [net.minecraftforge.registries.GameData/]: Detected errors during registry event dispatch, rolling back to VANILLA state
[26Nov2022 10:35:09.352] [Render thread/FATAL] [net.minecraftforge.registries.GameData/]: Detected errors during registry event dispatch, roll back to VANILLA complete
[26Nov2022 10:35:09.353] [Render thread/FATAL] [net.minecraftforge.fml.ModLoader/LOADING]: Failed to complete lifecycle event LOAD_REGISTRIES, 1 errors found
[26Nov2022 10:35:09.603] [Render thread/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.sound.SoundLoadEvent to a broken mod state
[26Nov2022 10:35:09.764] [Render thread/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.ColorHandlerEvent$Block to a broken mod state
[26Nov2022 10:35:09.766] [Render thread/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.ColorHandlerEvent$Item to a broken mod state
[26Nov2022 10:35:09.926] [Render thread/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.RenderLevelStageEvent$RegisterStageEvent to a broken mod state
[26Nov2022 10:35:10.169] [Render thread/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.ParticleFactoryRegisterEvent to a broken mod state
[26Nov2022 10:35:10.327] [Render thread/INFO] [com.mojang.text2speech.NarratorWindows/]: Narrator library for x64 successfully loaded
[26Nov2022 10:35:10.517] [Render thread/INFO] [net.minecraftforge.gametest.ForgeGameTestHooks/]: Enabled Gametest Namespaces: [modestmining]
[26Nov2022 10:35:10.518] [Render thread/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.event.RegisterGameTestsEvent to a broken mod state
[26Nov2022 10:35:10.519] [Render thread/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.RegisterClientReloadListenersEvent to a broken mod state
[26Nov2022 10:35:10.519] [Render thread/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.EntityRenderersEvent$RegisterLayerDefinitions to a broken mod state
[26Nov2022 10:35:10.519] [Render thread/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.EntityRenderersEvent$RegisterRenderers to a broken mod state
[26Nov2022 10:35:10.612] [Render thread/INFO] [net.minecraft.server.packs.resources.ReloadableResourceManager/]: Reloading ResourceManager: Default
[26Nov2022 10:35:10.869] [Worker-Main-12/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.ModelRegistryEvent to a broken mod state
[26Nov2022 10:35:11.077] [Worker-Main-11/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.TextureStitchEvent$Pre to a broken mod state
[26Nov2022 10:35:11.077] [Worker-Main-8/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.TextureStitchEvent$Pre to a broken mod state
[26Nov2022 10:35:11.101] [Worker-Main-10/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.TextureStitchEvent$Pre to a broken mod state
[26Nov2022 10:35:16.996] [Worker-Main-12/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.TextureStitchEvent$Pre to a broken mod state
[26Nov2022 10:35:17.995] [Worker-Main-12/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.TextureStitchEvent$Pre to a broken mod state
[26Nov2022 10:35:18.002] [Worker-Main-12/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.TextureStitchEvent$Pre to a broken mod state
[26Nov2022 10:35:18.071] [Worker-Main-12/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.TextureStitchEvent$Pre to a broken mod state
[26Nov2022 10:35:18.135] [Worker-Main-12/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.TextureStitchEvent$Pre to a broken mod state
[26Nov2022 10:35:18.191] [Worker-Main-12/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.TextureStitchEvent$Pre to a broken mod state
[26Nov2022 10:35:18.200] [Worker-Main-12/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.TextureStitchEvent$Pre to a broken mod state
[26Nov2022 10:35:18.843] [Render thread/INFO] [com.mojang.blaze3d.audio.Library/]: OpenAL initialized on device OpenAL Soft on Speakers (Realtek(R) Audio)
[26Nov2022 10:35:18.844] [Render thread/INFO] [net.minecraft.client.sounds.SoundEngine/SOUNDS]: Sound engine started
[26Nov2022 10:35:19.021] [Render thread/INFO] [net.minecraft.client.renderer.texture.TextureAtlas/]: Created: 1024x512x4 minecraft:textures/atlas/blocks.png-atlas
[26Nov2022 10:35:19.112] [Render thread/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.TextureStitchEvent$Post to a broken mod state
[26Nov2022 10:35:19.112] [Render thread/INFO] [net.minecraft.client.renderer.texture.TextureAtlas/]: Created: 256x128x4 minecraft:textures/atlas/signs.png-atlas
[26Nov2022 10:35:19.113] [Render thread/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.TextureStitchEvent$Post to a broken mod state
[26Nov2022 10:35:19.113] [Render thread/INFO] [net.minecraft.client.renderer.texture.TextureAtlas/]: Created: 512x512x4 minecraft:textures/atlas/banner_patterns.png-atlas
[26Nov2022 10:35:19.115] [Render thread/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.TextureStitchEvent$Post to a broken mod state
[26Nov2022 10:35:19.115] [Render thread/INFO] [net.minecraft.client.renderer.texture.TextureAtlas/]: Created: 512x512x4 minecraft:textures/atlas/shield_patterns.png-atlas
[26Nov2022 10:35:19.119] [Render thread/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.TextureStitchEvent$Post to a broken mod state
[26Nov2022 10:35:19.119] [Render thread/INFO] [net.minecraft.client.renderer.texture.TextureAtlas/]: Created: 256x256x4 minecraft:textures/atlas/chest.png-atlas
[26Nov2022 10:35:19.120] [Render thread/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.TextureStitchEvent$Post to a broken mod state
[26Nov2022 10:35:19.120] [Render thread/INFO] [net.minecraft.client.renderer.texture.TextureAtlas/]: Created: 512x256x4 minecraft:textures/atlas/beds.png-atlas
[26Nov2022 10:35:19.122] [Render thread/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.TextureStitchEvent$Post to a broken mod state
[26Nov2022 10:35:19.122] [Render thread/INFO] [net.minecraft.client.renderer.texture.TextureAtlas/]: Created: 512x256x4 minecraft:textures/atlas/shulker_boxes.png-atlas
[26Nov2022 10:35:19.124] [Render thread/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.TextureStitchEvent$Post to a broken mod state
[26Nov2022 10:35:19.359] [Render thread/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.ModelBakeEvent to a broken mod state
[26Nov2022 10:35:19.471] [Render thread/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.EntityRenderersEvent$CreateSkullModels to a broken mod state
[26Nov2022 10:35:19.472] [Render thread/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.EntityRenderersEvent$CreateSkullModels to a broken mod state
[26Nov2022 10:35:19.600] [Render thread/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.EntityRenderersEvent$CreateSkullModels to a broken mod state
[26Nov2022 10:35:19.600] [Render thread/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.EntityRenderersEvent$CreateSkullModels to a broken mod state
[26Nov2022 10:35:19.601] [Render thread/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.EntityRenderersEvent$CreateSkullModels to a broken mod state
[26Nov2022 10:35:19.602] [Render thread/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.EntityRenderersEvent$CreateSkullModels to a broken mod state
[26Nov2022 10:35:19.604] [Render thread/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.EntityRenderersEvent$CreateSkullModels to a broken mod state
[26Nov2022 10:35:19.607] [Render thread/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.EntityRenderersEvent$CreateSkullModels to a broken mod state
[26Nov2022 10:35:19.607] [Render thread/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.EntityRenderersEvent$CreateSkullModels to a broken mod state
[26Nov2022 10:35:19.607] [Render thread/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.EntityRenderersEvent$CreateSkullModels to a broken mod state
[26Nov2022 10:35:19.609] [Render thread/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.EntityRenderersEvent$CreateSkullModels to a broken mod state
[26Nov2022 10:35:19.612] [Render thread/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.EntityRenderersEvent$CreateSkullModels to a broken mod state
[26Nov2022 10:35:19.612] [Render thread/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.EntityRenderersEvent$CreateSkullModels to a broken mod state
[26Nov2022 10:35:19.615] [Render thread/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.EntityRenderersEvent$CreateSkullModels to a broken mod state
[26Nov2022 10:35:19.616] [Render thread/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.EntityRenderersEvent$CreateSkullModels to a broken mod state
[26Nov2022 10:35:19.616] [Render thread/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.EntityRenderersEvent$CreateSkullModels to a broken mod state
[26Nov2022 10:35:19.617] [Render thread/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.EntityRenderersEvent$CreateSkullModels to a broken mod state
[26Nov2022 10:35:19.617] [Render thread/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.EntityRenderersEvent$CreateSkullModels to a broken mod state
[26Nov2022 10:35:19.617] [Render thread/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.EntityRenderersEvent$CreateSkullModels to a broken mod state
[26Nov2022 10:35:19.617] [Render thread/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.EntityRenderersEvent$CreateSkullModels to a broken mod state
[26Nov2022 10:35:19.623] [Render thread/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.EntityRenderersEvent$CreateSkullModels to a broken mod state
[26Nov2022 10:35:19.623] [Render thread/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.EntityRenderersEvent$CreateSkullModels to a broken mod state
[26Nov2022 10:35:19.623] [Render thread/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.EntityRenderersEvent$AddLayers to a broken mod state
[26Nov2022 10:35:19.987] [Render thread/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.RegisterShadersEvent to a broken mod state
[26Nov2022 10:35:20.101] [Render thread/INFO] [net.minecraft.client.renderer.texture.TextureAtlas/]: Created: 256x256x0 minecraft:textures/atlas/particles.png-atlas
[26Nov2022 10:35:20.105] [Render thread/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.TextureStitchEvent$Post to a broken mod state
[26Nov2022 10:35:20.106] [Render thread/INFO] [net.minecraft.client.renderer.texture.TextureAtlas/]: Created: 256x256x0 minecraft:textures/atlas/paintings.png-atlas
[26Nov2022 10:35:20.109] [Render thread/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.TextureStitchEvent$Post to a broken mod state
[26Nov2022 10:35:20.109] [Render thread/INFO] [net.minecraft.client.renderer.texture.TextureAtlas/]: Created: 128x128x0 minecraft:textures/atlas/mob_effects.png-atlas
[26Nov2022 10:35:20.110] [Render thread/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.TextureStitchEvent$Post to a broken mod state
[26Nov2022 10:35:21.179] [Render thread/FATAL] [net.minecraftforge.common.ForgeMod/]: Preparing crash report with UUID db1f0a91-beb8-4ac0-95e0-9c8f94f1fbfa
[26Nov2022 10:35:21.180] [Render thread/FATAL] [net.minecraftforge.client.loading.ClientModLoader/]: Crash report saved to .\crash-reports\crash-2022-11-26_10.35.21-fml.txt
[26Nov2022 10:35:21.180] [Render thread/FATAL] [net.minecraftforge.common.ForgeMod/]: Preparing crash report with UUID ee62a225-14a6-4876-94f1-84b8d24ca560

 

Link to comment
Share on other sites

https://github.com/Nyancatpig/Modest-Mining/blob/68c1007d97165b93673d76c46a39578ab7ace747/src/main/java/com/ncpbails/modestmining/item/custom/ModArmorItem.java#L18

You are initialising this map during classloading/mod initialisation. Registration hasn't happened yet so using get() returns that error.

 

It's even worse. The whole point of the MobEffectInstance is that it represents individual applications of the effect to different entities and players.

You are sharing the same object for every one.

Boilerplate:

If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one.

If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install

Large files should be posted to a file sharing site like https://gist.github.com  You should also read the support forum sticky post.

Link to comment
Share on other sites

    private static final Map<ArmorMaterial, Supplier<MobEffectInstance>> MATERIAL_TO_EFFECT_MAP =
            (new ImmutableMap.Builder<ArmorMaterial, MobEffectInstance>())
                    .put(ModArmourMaterials.PRISMARITE,
                            () -> new MobEffectInstance(ModEffects.PRISMARITE_SPEED.get(), 200, 1, true, true)).build();

You should change it to something like the above. And change the other code accordingly. I assume the map is only used at runtime?

That way it defers the registration retrieval and construction until you need it. And calling get() for the supplier in the map gives you a new MobEffectInstance every time.

Boilerplate:

If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one.

If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install

Large files should be posted to a file sharing site like https://gist.github.com  You should also read the support forum sticky post.

Link to comment
Share on other sites

run/logs/debug.log

Boilerplate:

If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one.

If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install

Large files should be posted to a file sharing site like https://gist.github.com  You should also read the support forum sticky post.

Link to comment
Share on other sites

Quote

[26Nov2022 10:35:08.156] [Render thread/ERROR] [net.minecraftforge.fml.javafmlmod.FMLModContainer/LOADING]: Caught exception during event RegistryEvent.Register<minecraft:item> dispatch for modid modestmining

java.lang.ExceptionInInitializerError: null

at com.ncpbails.modestmining.item.ModItems.lambda$static$90(ModItems.java:260) ~[%2384!/:?]

at net.minecraftforge.registries.DeferredRegister.lambda$register$0(DeferredRegister.java:214) ~[forge-1.18.2-40.1.80_mapped_official_1.18.2-recomp.jar%2378%2385!/:?]

at net.minecraftforge.registries.DeferredRegister.addEntries(DeferredRegister.java:446) ~[forge-1.18.2-40.1.80_mapped_official_1.18.2-recomp.jar%2378%2385!/:?]

-- snip --

at net.minecraftforge.fml.ModLoader.gatherAndInitializeMods(ModLoader.java:164) ~[fmlcore-1.18.2-40.1.80.jar%2383!/:?]

You are still trying to access objects before they are registered.

Boilerplate:

If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one.

If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install

Large files should be posted to a file sharing site like https://gist.github.com  You should also read the support forum sticky post.

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.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • I have a structure, and sometimes several mobs spawn there. This is a boss and must spawn alone. Here is the code for spawning entities in the structure { "type": "minecraft:jigsaw", "start_pool": "egyptcraft:boss_pyramid/start_pool", "size": 5, "max_distance_from_center": 80, "biomes": "#egyptcraft:has_structure/boss_pyramid", "step": "surface_structures", "start_height": { "absolute": 0 }, "project_start_to_heightmap": "WORLD_SURFACE_WG", "use_expansion_hack": false, "spawn_overrides": { "monster": { "bounding_box": "full", "spawns": [ { "type": "egyptcraft:anubis", "maxCount": 1, "minCount": 1, "weight": 100 } ] } } } Maybe it's something else?
    • I have OreGenEvent.GenerateMinable event, I need to get a chance to spawn (generate) every ore that is processed in this event. Also e.getType().name().toString() is name this is the same block name by which it can be entered in the Block.getByID?  forge 1.12.2 59(recommended)
    • Hello everybody! Out of nowhere my minecraft doesn't allow me to play on forge 1.19.2 I tried to reinstall minecraft, doesn't have any mod right now on the forge version. Tried the newest version of forge, tried recommended version as well. I have the newest version of Java as well...   I dont know why it stopped working but it just stopped completly out of nowhere...   Thank you so much for your help guys ❤️
    • Hello, my world is crashing at 0% loaded and I don't know why. (Forge 43.2.14, 1.19.2) I have two worlds that I play on, and one works and the other doesn't, even with the same mod list. Here's the crash report: https://pastebin.com/AUbRwkGj
    • Minecraft 1.12.2 Very frustrating error. only ever occurs on one device. Started yesterday without prompting (maybe java updated or something?) Says things that have been imported actually arent when running client Reinstalled Intellij, cleared cache, cleaned and rebuilt gradle, redownloaded the entire file from git. Nothing works. (I believe I have the right plugins installed, dependencies OK, and am using corretto 1.8).   One thing I did for more of the below errors was just to explicitly import them, which was working up until this little guy who literally does not exist in forge to import. the class inhereting something inhereting it refers to import net.minecraftforge.registries.IForgeRegistryEntry.Impl, not net.minecraftforge.registries.IForgeRegistryEntry$Impl as the output implies. also I didn't even have to manually import these things for it to work on my other device. (which is just importing the minecraft package that contains them), but here I did have to just to get rid of a few errors--not even make anything work?? I dont know. (edited) here's the aforementioned "below error" (one of many like it): error: cannot access net.minecraftforge.registries.IForgeRegistryEntry.Impl public class BlockBase extends Block {        ^   class file for net.minecraftforge.registries.IForgeRegistryEntry$Impl not found Here's the class BlockBase:   package com.quantum.exodus.common.blocks; import com.quantum.exodus.ExodusMod; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; import net.minecraft.item.ItemBlock; import net.minecraftforge.registries.IForgeRegistryEntry.Impl; public class BlockBase extends Block { protected String name; public BlockBase(Material material, String name) { super(material); this.name = name; setTranslationKey(name); setRegistryName(name); } public void registerItemModel(Item itemBlock) { ExodusMod.proxy.registerItemRenderer(itemBlock, 0, name); } public Item createItemBlock() { return new ItemBlock(this).setRegistryName(getRegistryName()); } @Override public BlockBase setCreativeTab(CreativeTabs tab) { super.setCreativeTab(tab); return this; } }
  • Topics

×
×
  • Create New...

Important Information

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