Jump to content

Recommended Posts

Posted

Hi. I tried to add custom entity to my mod, but an something has happened. My game crashes after loading a world, and in logs file I can see:

Quote

registerAttributes(Lnet/minecraftforge/event/entity/EntityAttributeCreationEvent;)V
java.lang.ExceptionInInitializerError

Part of the code looks like this:

package com.kolan.thoriummod.Event;

import com.kolan.common.entity.Impostor;
import com.kolan.thoriummod.Entity.EntityInit;
import com.kolan.thoriummod.Thorium;
import net.minecraftforge.event.entity.EntityAttributeCreationEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod;

@Mod.EventBusSubscriber(modid = Thorium.MOD_ID, bus = Mod.EventBusSubscriber.Bus.MOD)
public class CommonModEvents {

    @SubscribeEvent
    public static void registerAttributes(EntityAttributeCreationEvent event){
        event.put(EntityInit.IMPOSTOR.get(), Impostor.createAttributes().build());
    }
}

What can I do? Thanks in advance

Posted (edited)
Spoiler

[14kwi2022 09:03:44.558] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher running: args [--launchTarget, forgeclientuserdev, --version, MOD_DEV, --assetIndex, 1.18, --assetsDir, C:\Users\Win10\.gradle\caches\forge_gradle\assets, --gameDir, ., --fml.forgeVersion, 40.0.15, --fml.mcVersion, 1.18.2, --fml.forgeGroup, net.minecraftforge, --fml.mcpVersion, 20220228.144236]
[14kwi2022 09:03:44.569] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher 9.1.3+9.1.3+main.9b69c82a starting: java version 17.0.2 by Eclipse Adoptium
[14kwi2022 09:03:44.712] [main/INFO] [mixin/]: SpongePowered MIXIN Subsystem Version=0.8.5 Source=union:/C:/Users/Win10/.gradle/caches/modules-2/files-2.1/org.spongepowered/mixin/0.8.5/9d1c0c3a304ae6697ecd477218fa61b850bf57fc/mixin-0.8.5.jar%2322!/ Service=ModLauncher Env=CLIENT
[14kwi2022 09:03:46.458] [main/INFO] [cpw.mods.modlauncher.LaunchServiceHandler/MODLAUNCHER]: Launching target 'forgeclientuserdev' with arguments [--version, MOD_DEV, --gameDir, ., --assetsDir, C:\Users\Win10\.gradle\caches\forge_gradle\assets, --assetIndex, 1.18]
[14kwi2022 09:03:47.491] [main/WARN] [oshi.util.platform.windows.PerfDataUtil/]: Failed to add PDH Counter: \Paging File(_Total)\% Usage, Error code: 0xC0000BB8
[14kwi2022 09:03:47.491] [main/WARN] [oshi.util.platform.windows.PerfCounterQueryHandler/]: Failed to add counter for PDH counter: \Paging File(_Total)\% Usage
[14kwi2022 09:03:47.491] [main/WARN] [oshi.util.platform.windows.PerfCounterQuery/]: Disabling further attempts to query Paging File.
[14kwi2022 09:03:48.781] [main/WARN] [oshi.util.platform.windows.WmiQueryHandler/]: COM exception: Invalid Query: SELECT PERCENTUSAGE FROM Win32_PerfRawData_PerfOS_PagingFile
[14kwi2022 09:03:53.940] [Render thread/WARN] [net.minecraft.server.packs.VanillaPackResources/]: Assets URL 'union:/C:/Users/Win10/.gradle/caches/forge_gradle/minecraft_user_repo/net/minecraftforge/forge/1.18.2-40.0.15_mapped_official_1.18.2/forge-1.18.2-40.0.15_mapped_official_1.18.2-recomp.jar%2376!/assets/.mcassetsroot' uses unexpected schema
[14kwi2022 09:03:53.941] [Render thread/WARN] [net.minecraft.server.packs.VanillaPackResources/]: Assets URL 'union:/C:/Users/Win10/.gradle/caches/forge_gradle/minecraft_user_repo/net/minecraftforge/forge/1.18.2-40.0.15_mapped_official_1.18.2/forge-1.18.2-40.0.15_mapped_official_1.18.2-recomp.jar%2376!/data/.mcassetsroot' uses unexpected schema
[14kwi2022 09:03:53.957] [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'
[14kwi2022 09:03:53.964] [Render thread/INFO] [net.minecraft.client.Minecraft/]: Setting user: Dev
[14kwi2022 09:03:54.126] [Render thread/INFO] [net.minecraft.client.Minecraft/]: Backend library: LWJGL version 3.2.2 SNAPSHOT
[14kwi2022 09:03:55.588] [modloading-worker-0/INFO] [net.minecraftforge.common.ForgeMod/FORGEMOD]: Forge mod loading, version 40.0.15, for MC 1.18.2 with MCP 20220228.144236
[14kwi2022 09:03:55.592] [modloading-worker-0/INFO] [net.minecraftforge.common.MinecraftForge/FORGE]: MinecraftForge v40.0.15 Initialized
[14kwi2022 09:03:56.437] [Render thread/ERROR] [net.minecraftforge.fml.javafmlmod.FMLModContainer/]: Exception caught during firing event: null
    Index: 1
    Listeners:
        0: NORMAL
        1: ASM: class com.kolan.thoriummod.Event.CommonModEvents registerAttributes(Lnet/minecraftforge/event/entity/EntityAttributeCreationEvent;)V
java.lang.ExceptionInInitializerError
    at TRANSFORMER/[email protected]/com.kolan.thoriummod.Event.CommonModEvents.registerAttributes(CommonModEvents.java:15)
    at net.minecraftforge.eventbus.ASMEventHandler_3_CommonModEvents_registerAttributes_EntityAttributeCreationEvent.invoke(.dynamic)
    at MC-BOOTSTRAP/[email protected]/net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:85)
    at MC-BOOTSTRAP/[email protected]/net.minecraftforge.eventbus.EventBus.post(EventBus.java:302)
    at MC-BOOTSTRAP/[email protected]/net.minecraftforge.eventbus.EventBus.post(EventBus.java:283)
    at LAYER PLUGIN/[email protected]/net.minecraftforge.fml.javafmlmod.FMLModContainer.acceptEvent(FMLModContainer.java:120)
    at LAYER PLUGIN/[email protected]/net.minecraftforge.fml.ModLoader.lambda$postEvent$31(ModLoader.java:298)
    at java.base/java.util.HashMap.forEach(HashMap.java:1421)
    at LAYER PLUGIN/[email protected]/net.minecraftforge.fml.ModList.forEachModContainer(ModList.java:233)
    at LAYER PLUGIN/[email protected]/net.minecraftforge.fml.ModLoader.postEvent(ModLoader.java:298)
    at TRANSFORMER/[email protected]/net.minecraftforge.common.ForgeHooks.modifyAttributes(ForgeHooks.java:1246)
    at TRANSFORMER/[email protected]/net.minecraftforge.registries.GameData.lambda$checkForRevertToVanilla$21(GameData.java:378)
    at java.base/java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:863)
    at java.base/java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:841)
    at java.base/java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:482)
    at LAYER PLUGIN/[email protected]/net.minecraftforge.fml.ModWorkManager$SyncExecutor.driveOne(ModWorkManager.java:56)
    at LAYER PLUGIN/[email protected]/net.minecraftforge.fml.ModWorkManager$DrivenExecutor.drive(ModWorkManager.java:40)
    at LAYER PLUGIN/[email protected]/net.minecraftforge.fml.ModLoader.waitForTransition(ModLoader.java:215)
    at LAYER PLUGIN/[email protected]/net.minecraftforge.fml.ModLoader.lambda$dispatchAndHandleError$21(ModLoader.java:200)
    at java.base/java.util.Optional.ifPresent(Optional.java:178)
    at LAYER PLUGIN/[email protected]/net.minecraftforge.fml.ModLoader.dispatchAndHandleError(ModLoader.java:200)
    at LAYER PLUGIN/[email protected]/net.minecraftforge.fml.ModLoader.lambda$gatherAndInitializeMods$11(ModLoader.java:177)
    at java.base/java.lang.Iterable.forEach(Iterable.java:75)
    at LAYER PLUGIN/[email protected]/net.minecraftforge.fml.ModLoader.gatherAndInitializeMods(ModLoader.java:177)
    at TRANSFORMER/[email protected]/net.minecraftforge.client.loading.ClientModLoader.lambda$begin$1(ClientModLoader.java:92)
    at TRANSFORMER/[email protected]/net.minecraftforge.client.loading.ClientModLoader.lambda$createRunnableWithCatch$4(ClientModLoader.java:113)
    at TRANSFORMER/[email protected]/net.minecraftforge.client.loading.ClientModLoader.begin(ClientModLoader.java:92)
    at TRANSFORMER/[email protected]/net.minecraft.client.Minecraft.<init>(Minecraft.java:458)
    at TRANSFORMER/[email protected]/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/[email protected]/net.minecraftforge.fml.loading.targets.ForgeClientUserdevLaunchHandler.lambda$launchService$0(ForgeClientUserdevLaunchHandler.java:38)
    at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37)
    at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53)
    at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71)
    at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.Launcher.run(Launcher.java:106)
    at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.Launcher.main(Launcher.java:77)
    at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26)
    at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23)
    at [email protected]/cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:149)
Caused by: net.minecraft.ResourceLocationException: Non [a-z0-9/._-] character in path of location: thorium:Impostor
    at TRANSFORMER/[email protected]/net.minecraft.resources.ResourceLocation.<init>(ResourceLocation.java:37)
    at TRANSFORMER/[email protected]/net.minecraft.resources.ResourceLocation.<init>(ResourceLocation.java:46)
    at TRANSFORMER/[email protected]/net.minecraftforge.registries.DeferredRegister.register(DeferredRegister.java:96)
    at TRANSFORMER/[email protected]/com.kolan.thoriummod.Entity.EntityInit.<clinit>(EntityInit.java:20)
    ... 42 more

[14kwi2022 09:03:56.439] [Render thread/ERROR] [net.minecraftforge.fml.javafmlmod.FMLModContainer/LOADING]: Caught exception during event net.minecraftforge.event.entity.EntityAttributeCreationEvent@6f3bd37f dispatch for modid thorium
java.lang.ExceptionInInitializerError: null
    at com.kolan.thoriummod.Event.CommonModEvents.registerAttributes(CommonModEvents.java:15) ~[%2380!/:?]
    at net.minecraftforge.eventbus.ASMEventHandler_3_CommonModEvents_registerAttributes_EntityAttributeCreationEvent.invoke(.dynamic) ~[?:?]
    at net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:85) ~[eventbus-5.0.7.jar%239!/:?]
    at net.minecraftforge.eventbus.EventBus.post(EventBus.java:302) ~[eventbus-5.0.7.jar%239!/:?]
    at net.minecraftforge.eventbus.EventBus.post(EventBus.java:283) ~[eventbus-5.0.7.jar%239!/:?]
    at net.minecraftforge.fml.javafmlmod.FMLModContainer.acceptEvent(FMLModContainer.java:120) ~[javafmllanguage-1.18.2-40.0.15.jar%2377!/:?]
    at net.minecraftforge.fml.ModLoader.lambda$postEvent$31(ModLoader.java:298) ~[fmlcore-1.18.2-40.0.15.jar%2379!/:?]
    at java.util.HashMap.forEach(HashMap.java:1421) ~[?:?]
    at net.minecraftforge.fml.ModList.forEachModContainer(ModList.java:233) ~[fmlcore-1.18.2-40.0.15.jar%2379!/:?]
    at net.minecraftforge.fml.ModLoader.postEvent(ModLoader.java:298) ~[fmlcore-1.18.2-40.0.15.jar%2379!/:?]
    at net.minecraftforge.common.ForgeHooks.modifyAttributes(ForgeHooks.java:1246) ~[forge-1.18.2-40.0.15_mapped_official_1.18.2-recomp.jar%2375%2381!/:?]
    at net.minecraftforge.registries.GameData.lambda$checkForRevertToVanilla$21(GameData.java:378) ~[forge-1.18.2-40.0.15_mapped_official_1.18.2-recomp.jar%2375%2381!/:?]
    at java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:863) ~[?:?]
    at java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:841) ~[?:?]
    at java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:482) ~[?:?]
    at net.minecraftforge.fml.ModWorkManager$SyncExecutor.driveOne(ModWorkManager.java:56) ~[fmlcore-1.18.2-40.0.15.jar%2379!/:?]
    at net.minecraftforge.fml.ModWorkManager$DrivenExecutor.drive(ModWorkManager.java:40) ~[fmlcore-1.18.2-40.0.15.jar%2379!/:?]
    at net.minecraftforge.fml.ModLoader.waitForTransition(ModLoader.java:215) ~[fmlcore-1.18.2-40.0.15.jar%2379!/:?]
    at net.minecraftforge.fml.ModLoader.lambda$dispatchAndHandleError$21(ModLoader.java:200) ~[fmlcore-1.18.2-40.0.15.jar%2379!/:?]
    at java.util.Optional.ifPresent(Optional.java:178) ~[?:?]
    at net.minecraftforge.fml.ModLoader.dispatchAndHandleError(ModLoader.java:200) ~[fmlcore-1.18.2-40.0.15.jar%2379!/:?]
    at net.minecraftforge.fml.ModLoader.lambda$gatherAndInitializeMods$11(ModLoader.java:177) ~[fmlcore-1.18.2-40.0.15.jar%2379!/:?]
    at java.lang.Iterable.forEach(Iterable.java:75) ~[?:?]
    at net.minecraftforge.fml.ModLoader.gatherAndInitializeMods(ModLoader.java:177) ~[fmlcore-1.18.2-40.0.15.jar%2379!/:?]
    at net.minecraftforge.client.loading.ClientModLoader.lambda$begin$1(ClientModLoader.java:92) ~[forge-1.18.2-40.0.15_mapped_official_1.18.2-recomp.jar%2375%2381!/:?]
    at net.minecraftforge.client.loading.ClientModLoader.lambda$createRunnableWithCatch$4(ClientModLoader.java:113) ~[forge-1.18.2-40.0.15_mapped_official_1.18.2-recomp.jar%2375%2381!/:?]
    at net.minecraftforge.client.loading.ClientModLoader.begin(ClientModLoader.java:92) ~[forge-1.18.2-40.0.15_mapped_official_1.18.2-recomp.jar%2375%2381!/:?]
    at net.minecraft.client.Minecraft.<init>(Minecraft.java:458) ~[forge-1.18.2-40.0.15_mapped_official_1.18.2-recomp.jar%2376!/:?]
    at net.minecraft.client.main.Main.main(Main.java:169) ~[forge-1.18.2-40.0.15_mapped_official_1.18.2-recomp.jar%2376!/:?]
    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:38) ~[fmlloader-1.18.2-40.0.15.jar%230!/:?]
    at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-9.1.3.jar%2310!/:?]
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) [modlauncher-9.1.3.jar%2310!/:?]
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) [modlauncher-9.1.3.jar%2310!/:?]
    at cpw.mods.modlauncher.Launcher.run(Launcher.java:106) [modlauncher-9.1.3.jar%2310!/:?]
    at cpw.mods.modlauncher.Launcher.main(Launcher.java:77) [modlauncher-9.1.3.jar%2310!/:?]
    at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) [modlauncher-9.1.3.jar%2310!/:?]
    at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) [modlauncher-9.1.3.jar%2310!/:?]
    at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:149) [bootstraplauncher-1.0.0.jar:?]
Caused by: net.minecraft.ResourceLocationException: Non [a-z0-9/._-] character in path of location: thorium:Impostor
    at net.minecraft.resources.ResourceLocation.<init>(ResourceLocation.java:37) ~[forge-1.18.2-40.0.15_mapped_official_1.18.2-recomp.jar%2376!/:?]
    at net.minecraft.resources.ResourceLocation.<init>(ResourceLocation.java:46) ~[forge-1.18.2-40.0.15_mapped_official_1.18.2-recomp.jar%2376!/:?]
    at net.minecraftforge.registries.DeferredRegister.register(DeferredRegister.java:96) ~[forge-1.18.2-40.0.15_mapped_official_1.18.2-recomp.jar%2375%2381!/:?]
    at com.kolan.thoriummod.Entity.EntityInit.<clinit>(EntityInit.java:20) ~[%2380!/:?]
    ... 42 more
[14kwi2022 09:03:56.485] [Render thread/FATAL] [net.minecraftforge.fml.ModLoader/LOADING]: Failed to complete lifecycle event LOAD_REGISTRIES, 0 errors found
[14kwi2022 09:03:56.517] [Render thread/WARN] [net.minecraft.client.Options/]: Removed resource pack mod_resources from options because it doesn't seem to exist anymore
[14kwi2022 09:03:56.778] [Render thread/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.sound.SoundLoadEvent to a broken mod state
[14kwi2022 09:03:57.012] [Render thread/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.ColorHandlerEvent$Block to a broken mod state
[14kwi2022 09:03:57.015] [Render thread/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.ColorHandlerEvent$Item to a broken mod state
[14kwi2022 09:03:57.931] [Render thread/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.ParticleFactoryRegisterEvent to a broken mod state
[14kwi2022 09:03:57.976] [Render thread/INFO] [com.mojang.text2speech.NarratorWindows/]: Narrator library for x64 successfully loaded
[14kwi2022 09:03:58.031] [Render thread/INFO] [net.minecraftforge.gametest.ForgeGameTestHooks/]: Enabled Gametest Namespaces: [examplemod]
[14kwi2022 09:03:58.032] [Render thread/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.event.RegisterGameTestsEvent to a broken mod state
[14kwi2022 09:03:58.034] [Render thread/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.RegisterClientReloadListenersEvent to a broken mod state
[14kwi2022 09:03:58.034] [Render thread/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.EntityRenderersEvent$RegisterLayerDefinitions to a broken mod state
[14kwi2022 09:03:58.034] [Render thread/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.EntityRenderersEvent$RegisterRenderers to a broken mod state
[14kwi2022 09:03:58.212] [Render thread/INFO] [net.minecraft.server.packs.resources.ReloadableResourceManager/]: Reloading ResourceManager: Default
[14kwi2022 09:03:59.024] [Worker-Main-15/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.ModelRegistryEvent to a broken mod state
[14kwi2022 09:03:59.666] [Worker-Main-14/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.TextureStitchEvent$Pre to a broken mod state
[14kwi2022 09:03:59.705] [Worker-Main-19/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.TextureStitchEvent$Pre to a broken mod state
[14kwi2022 09:03:59.814] [Worker-Main-16/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.TextureStitchEvent$Pre to a broken mod state
[14kwi2022 09:04:12.233] [Worker-Main-15/WARN] [net.minecraft.client.resources.model.ModelBakery/]: Exception loading blockstate definition: thorium:blockstates/thorium_block.json: java.io.FileNotFoundException: thorium:blockstates/thorium_block.json
[14kwi2022 09:04:12.234] [Worker-Main-15/WARN] [net.minecraft.client.resources.model.ModelBakery/]: Exception loading blockstate definition: 'thorium:blockstates/thorium_block.json' missing model for variant: 'thorium:thorium_block#'
[14kwi2022 09:04:12.235] [Worker-Main-15/WARN] [net.minecraft.client.resources.model.ModelBakery/]: Exception loading blockstate definition: thorium:blockstates/titanium_ore.json: java.io.FileNotFoundException: thorium:blockstates/titanium_ore.json
[14kwi2022 09:04:12.235] [Worker-Main-15/WARN] [net.minecraft.client.resources.model.ModelBakery/]: Exception loading blockstate definition: 'thorium:blockstates/titanium_ore.json' missing model for variant: 'thorium:titanium_ore#'
[14kwi2022 09:04:12.236] [Worker-Main-15/WARN] [net.minecraft.client.resources.model.ModelBakery/]: Exception loading blockstate definition: thorium:blockstates/cinnabar_ore.json: java.io.FileNotFoundException: thorium:blockstates/cinnabar_ore.json
[14kwi2022 09:04:12.237] [Worker-Main-15/WARN] [net.minecraft.client.resources.model.ModelBakery/]: Exception loading blockstate definition: 'thorium:blockstates/cinnabar_ore.json' missing model for variant: 'thorium:cinnabar_ore#'
[14kwi2022 09:04:12.237] [Worker-Main-15/WARN] [net.minecraft.client.resources.model.ModelBakery/]: Exception loading blockstate definition: thorium:blockstates/titanium_block.json: java.io.FileNotFoundException: thorium:blockstates/titanium_block.json
[14kwi2022 09:04:12.237] [Worker-Main-15/WARN] [net.minecraft.client.resources.model.ModelBakery/]: Exception loading blockstate definition: 'thorium:blockstates/titanium_block.json' missing model for variant: 'thorium:titanium_block#'
[14kwi2022 09:04:12.238] [Worker-Main-15/WARN] [net.minecraft.client.resources.model.ModelBakery/]: Exception loading blockstate definition: thorium:blockstates/cinnabar_block.json: java.io.FileNotFoundException: thorium:blockstates/cinnabar_block.json
[14kwi2022 09:04:12.238] [Worker-Main-15/WARN] [net.minecraft.client.resources.model.ModelBakery/]: Exception loading blockstate definition: 'thorium:blockstates/cinnabar_block.json' missing model for variant: 'thorium:cinnabar_block#'
[14kwi2022 09:04:16.205] [Worker-Main-15/WARN] [net.minecraft.client.resources.model.ModelBakery/]: Unable to load model: 'thorium:thorium_nugget#inventory' referenced from: thorium:thorium_nugget#inventory: java.io.FileNotFoundException: thorium:models/item/thorium_nugget.json
[14kwi2022 09:04:16.206] [Worker-Main-15/WARN] [net.minecraft.client.resources.model.ModelBakery/]: Unable to load model: 'thorium:thorium_ingot#inventory' referenced from: thorium:thorium_ingot#inventory: java.io.FileNotFoundException: thorium:models/item/thorium_ingot.json
[14kwi2022 09:04:16.206] [Worker-Main-15/WARN] [net.minecraft.client.resources.model.ModelBakery/]: Unable to load model: 'thorium:raw_thorium#inventory' referenced from: thorium:raw_thorium#inventory: java.io.FileNotFoundException: thorium:models/item/raw_thorium.json
[14kwi2022 09:04:16.206] [Worker-Main-15/WARN] [net.minecraft.client.resources.model.ModelBakery/]: Unable to load model: 'thorium:cinnabar_gem#inventory' referenced from: thorium:cinnabar_gem#inventory: java.io.FileNotFoundException: thorium:models/item/cinnabar_gem.json
[14kwi2022 09:04:16.206] [Worker-Main-15/WARN] [net.minecraft.client.resources.model.ModelBakery/]: Unable to load model: 'thorium:titanium_nugget#inventory' referenced from: thorium:titanium_nugget#inventory: java.io.FileNotFoundException: thorium:models/item/titanium_nugget.json
[14kwi2022 09:04:16.207] [Worker-Main-15/WARN] [net.minecraft.client.resources.model.ModelBakery/]: Unable to load model: 'thorium:titanium_ingot#inventory' referenced from: thorium:titanium_ingot#inventory: java.io.FileNotFoundException: thorium:models/item/titanium_ingot.json
[14kwi2022 09:04:16.207] [Worker-Main-15/WARN] [net.minecraft.client.resources.model.ModelBakery/]: Unable to load model: 'thorium:raw_titanium#inventory' referenced from: thorium:raw_titanium#inventory: java.io.FileNotFoundException: thorium:models/item/raw_titanium.json
[14kwi2022 09:04:16.207] [Worker-Main-15/WARN] [net.minecraft.client.resources.model.ModelBakery/]: Unable to load model: 'thorium:thorium_block#inventory' referenced from: thorium:thorium_block#inventory: java.io.FileNotFoundException: thorium:models/item/thorium_block.json
[14kwi2022 09:04:16.207] [Worker-Main-15/WARN] [net.minecraft.client.resources.model.ModelBakery/]: Unable to load model: 'thorium:titanium_ore#inventory' referenced from: thorium:titanium_ore#inventory: java.io.FileNotFoundException: thorium:models/item/titanium_ore.json
[14kwi2022 09:04:16.207] [Worker-Main-15/WARN] [net.minecraft.client.resources.model.ModelBakery/]: Unable to load model: 'thorium:cinnabar_ore#inventory' referenced from: thorium:cinnabar_ore#inventory: java.io.FileNotFoundException: thorium:models/item/cinnabar_ore.json
[14kwi2022 09:04:16.208] [Worker-Main-15/WARN] [net.minecraft.client.resources.model.ModelBakery/]: Unable to load model: 'thorium:titanium_block#inventory' referenced from: thorium:titanium_block#inventory: java.io.FileNotFoundException: thorium:models/item/titanium_block.json
[14kwi2022 09:04:16.208] [Worker-Main-15/WARN] [net.minecraft.client.resources.model.ModelBakery/]: Unable to load model: 'thorium:cinnabar_block#inventory' referenced from: thorium:cinnabar_block#inventory: java.io.FileNotFoundException: thorium:models/item/cinnabar_block.json
[14kwi2022 09:04:16.684] [Worker-Main-15/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.TextureStitchEvent$Pre to a broken mod state
[14kwi2022 09:04:18.586] [Worker-Main-15/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.TextureStitchEvent$Pre to a broken mod state
[14kwi2022 09:04:18.601] [Worker-Main-15/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.TextureStitchEvent$Pre to a broken mod state
[14kwi2022 09:04:18.658] [Worker-Main-15/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.TextureStitchEvent$Pre to a broken mod state
[14kwi2022 09:04:18.714] [Worker-Main-15/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.TextureStitchEvent$Pre to a broken mod state
[14kwi2022 09:04:18.751] [Worker-Main-15/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.TextureStitchEvent$Pre to a broken mod state
[14kwi2022 09:04:18.770] [Worker-Main-15/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.TextureStitchEvent$Pre to a broken mod state
[14kwi2022 09:04:18.982] [Render thread/INFO] [com.mojang.blaze3d.audio.Library/]: OpenAL initialized on device OpenAL Soft on Głośniki (VIRO Plus)
[14kwi2022 09:04:18.984] [Render thread/INFO] [net.minecraft.client.sounds.SoundEngine/SOUNDS]: Sound engine started
[14kwi2022 09:04:19.215] [Render thread/INFO] [net.minecraft.client.renderer.texture.TextureAtlas/]: Created: 1024x512x4 minecraft:textures/atlas/blocks.png-atlas
[14kwi2022 09:04:19.231] [Render thread/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.TextureStitchEvent$Post to a broken mod state
[14kwi2022 09:04:19.232] [Render thread/INFO] [net.minecraft.client.renderer.texture.TextureAtlas/]: Created: 256x128x4 minecraft:textures/atlas/signs.png-atlas
[14kwi2022 09:04:19.232] [Render thread/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.TextureStitchEvent$Post to a broken mod state
[14kwi2022 09:04:19.232] [Render thread/INFO] [net.minecraft.client.renderer.texture.TextureAtlas/]: Created: 512x512x4 minecraft:textures/atlas/banner_patterns.png-atlas
[14kwi2022 09:04:19.234] [Render thread/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.TextureStitchEvent$Post to a broken mod state
[14kwi2022 09:04:19.234] [Render thread/INFO] [net.minecraft.client.renderer.texture.TextureAtlas/]: Created: 512x512x4 minecraft:textures/atlas/shield_patterns.png-atlas
[14kwi2022 09:04:19.236] [Render thread/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.TextureStitchEvent$Post to a broken mod state
[14kwi2022 09:04:19.236] [Render thread/INFO] [net.minecraft.client.renderer.texture.TextureAtlas/]: Created: 256x256x4 minecraft:textures/atlas/chest.png-atlas
[14kwi2022 09:04:19.237] [Render thread/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.TextureStitchEvent$Post to a broken mod state
[14kwi2022 09:04:19.237] [Render thread/INFO] [net.minecraft.client.renderer.texture.TextureAtlas/]: Created: 512x256x4 minecraft:textures/atlas/beds.png-atlas
[14kwi2022 09:04:19.238] [Render thread/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.TextureStitchEvent$Post to a broken mod state
[14kwi2022 09:04:19.238] [Render thread/INFO] [net.minecraft.client.renderer.texture.TextureAtlas/]: Created: 512x256x4 minecraft:textures/atlas/shulker_boxes.png-atlas
[14kwi2022 09:04:19.239] [Render thread/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.TextureStitchEvent$Post to a broken mod state
[14kwi2022 09:04:19.598] [Render thread/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.ModelBakeEvent to a broken mod state
[14kwi2022 09:04:20.003] [Render thread/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.EntityRenderersEvent$AddLayers to a broken mod state
[14kwi2022 09:04:20.587] [Render thread/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.RegisterShadersEvent to a broken mod state
[14kwi2022 09:04:20.714] [Render thread/INFO] [net.minecraft.client.renderer.texture.TextureAtlas/]: Created: 256x256x0 minecraft:textures/atlas/particles.png-atlas
[14kwi2022 09:04:20.715] [Render thread/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.TextureStitchEvent$Post to a broken mod state
[14kwi2022 09:04:20.716] [Render thread/INFO] [net.minecraft.client.renderer.texture.TextureAtlas/]: Created: 256x256x0 minecraft:textures/atlas/paintings.png-atlas
[14kwi2022 09:04:20.716] [Render thread/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.TextureStitchEvent$Post to a broken mod state
[14kwi2022 09:04:20.717] [Render thread/INFO] [net.minecraft.client.renderer.texture.TextureAtlas/]: Created: 128x128x0 minecraft:textures/atlas/mob_effects.png-atlas
[14kwi2022 09:04:20.717] [Render thread/ERROR] [net.minecraftforge.fml.ModLoader/]: Cowardly refusing to send event net.minecraftforge.client.event.TextureStitchEvent$Post to a broken mod state
[14kwi2022 09:04:21.667] [Render thread/WARN] [oshi.util.platform.windows.WmiQueryHandler/]: COM exception: Invalid Query: SELECT PERCENTUSAGE FROM Win32_PerfRawData_PerfOS_PagingFile
[14kwi2022 09:04:21.672] [Render thread/FATAL] [net.minecraftforge.common.ForgeMod/]: Preparing crash report with UUID 1e597b33-869e-4856-851e-a2f0e275e442
[14kwi2022 09:04:21.673] [Render thread/FATAL] [net.minecraftforge.client.loading.ClientModLoader/]: Crash report saved to .\crash-reports\crash-2022-04-14_09.04.21-fml.txt
[14kwi2022 09:04:21.674] [Render thread/FATAL] [net.minecraftforge.common.ForgeMod/]: Preparing crash report with UUID 53e40520-f658-4d8a-a2e6-7f233e879d66

That's all I got

Edited by Kolan
Posted (edited)

Hi!

This means that 

44 minutes ago, Luis_ST said:

thorium:Impostor

Has a character inside it, that is not a-z 0-9 or /._-, in this case the big I in impostor. Registry names are always lowercase 

Edited by OutCraft
  • Like 1

Sorry if my Posts are weird sometimes, I just try to help and learn as much as I can :D

Also: PLEASE use SPOILERS for logs!

Posted

Ok, I changed it, but I have different error in my logs

Spoiler

[14kwi2022 12:10:44.675] [Render thread/ERROR] [net.minecraftforge.fml.javafmlmod.FMLModContainer/LOADING]: Caught exception during event net.minecraftforge.event.entity.EntityAttributeCreationEvent@1edfedf1 dispatch for modid thorium
java.lang.NullPointerException: Registry Object not present: thorium:impostor
    at java.util.Objects.requireNonNull(Objects.java:334) ~[?:?]
    at net.minecraftforge.registries.RegistryObject.get(RegistryObject.java:109) ~[forge-1.18.2-40.0.15_mapped_official_1.18.2-recomp.jar%2375%2381!/:?]
    at com.kolan.thoriummod.Event.CommonModEvents.registerAttributes(CommonModEvents.java:15) ~[%2380!/:?]
    at net.minecraftforge.eventbus.ASMEventHandler_3_CommonModEvents_registerAttributes_EntityAttributeCreationEvent.invoke(.dynamic) ~[?:?]
    at net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:85) ~[eventbus-5.0.7.jar%239!/:?]
    at net.minecraftforge.eventbus.EventBus.post(EventBus.java:302) ~[eventbus-5.0.7.jar%239!/:?]
    at net.minecraftforge.eventbus.EventBus.post(EventBus.java:283) ~[eventbus-5.0.7.jar%239!/:?]
    at net.minecraftforge.fml.javafmlmod.FMLModContainer.acceptEvent(FMLModContainer.java:120) ~[javafmllanguage-1.18.2-40.0.15.jar%2377!/:?]
    at net.minecraftforge.fml.ModLoader.lambda$postEvent$31(ModLoader.java:298) ~[fmlcore-1.18.2-40.0.15.jar%2379!/:?]
    at java.util.HashMap.forEach(HashMap.java:1421) ~[?:?]
    at net.minecraftforge.fml.ModList.forEachModContainer(ModList.java:233) ~[fmlcore-1.18.2-40.0.15.jar%2379!/:?]
    at net.minecraftforge.fml.ModLoader.postEvent(ModLoader.java:298) ~[fmlcore-1.18.2-40.0.15.jar%2379!/:?]
    at net.minecraftforge.common.ForgeHooks.modifyAttributes(ForgeHooks.java:1246) ~[forge-1.18.2-40.0.15_mapped_official_1.18.2-recomp.jar%2375%2381!/:?]
    at net.minecraftforge.registries.GameData.lambda$checkForRevertToVanilla$21(GameData.java:378) ~[forge-1.18.2-40.0.15_mapped_official_1.18.2-recomp.jar%2375%2381!/:?]
    at java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:863) ~[?:?]
    at java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:841) ~[?:?]
    at java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:482) ~[?:?]
    at net.minecraftforge.fml.ModWorkManager$SyncExecutor.driveOne(ModWorkManager.java:56) ~[fmlcore-1.18.2-40.0.15.jar%2379!/:?]
    at net.minecraftforge.fml.ModWorkManager$DrivenExecutor.drive(ModWorkManager.java:40) ~[fmlcore-1.18.2-40.0.15.jar%2379!/:?]
    at net.minecraftforge.fml.ModLoader.waitForTransition(ModLoader.java:215) ~[fmlcore-1.18.2-40.0.15.jar%2379!/:?]
    at net.minecraftforge.fml.ModLoader.lambda$dispatchAndHandleError$21(ModLoader.java:200) ~[fmlcore-1.18.2-40.0.15.jar%2379!/:?]
    at java.util.Optional.ifPresent(Optional.java:178) ~[?:?]
    at net.minecraftforge.fml.ModLoader.dispatchAndHandleError(ModLoader.java:200) ~[fmlcore-1.18.2-40.0.15.jar%2379!/:?]
    at net.minecraftforge.fml.ModLoader.lambda$gatherAndInitializeMods$11(ModLoader.java:177) ~[fmlcore-1.18.2-40.0.15.jar%2379!/:?]
    at java.lang.Iterable.forEach(Iterable.java:75) ~[?:?]
    at net.minecraftforge.fml.ModLoader.gatherAndInitializeMods(ModLoader.java:177) ~[fmlcore-1.18.2-40.0.15.jar%2379!/:?]
    at net.minecraftforge.client.loading.ClientModLoader.lambda$begin$1(ClientModLoader.java:92) ~[forge-1.18.2-40.0.15_mapped_official_1.18.2-recomp.jar%2375%2381!/:?]
    at net.minecraftforge.client.loading.ClientModLoader.lambda$createRunnableWithCatch$4(ClientModLoader.java:113) ~[forge-1.18.2-40.0.15_mapped_official_1.18.2-recomp.jar%2375%2381!/:?]
    at net.minecraftforge.client.loading.ClientModLoader.begin(ClientModLoader.java:92) ~[forge-1.18.2-40.0.15_mapped_official_1.18.2-recomp.jar%2375%2381!/:?]
    at net.minecraft.client.Minecraft.<init>(Minecraft.java:458) ~[forge-1.18.2-40.0.15_mapped_official_1.18.2-recomp.jar%2376!/:?]
    at net.minecraft.client.main.Main.main(Main.java:169) ~[forge-1.18.2-40.0.15_mapped_official_1.18.2-recomp.jar%2376!/:?]
    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:38) ~[fmlloader-1.18.2-40.0.15.jar%230!/:?]
    at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-9.1.3.jar%2310!/:?]
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) [modlauncher-9.1.3.jar%2310!/:?]
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) [modlauncher-9.1.3.jar%2310!/:?]
    at cpw.mods.modlauncher.Launcher.run(Launcher.java:106) [modlauncher-9.1.3.jar%2310!/:?]
    at cpw.mods.modlauncher.Launcher.main(Launcher.java:77) [modlauncher-9.1.3.jar%2310!/:?]
    at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) [modlauncher-9.1.3.jar%2310!/:?]
    at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) [modlauncher-9.1.3.jar%2310!/:?]
    at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:149) [bootstraplauncher-1.0.0.jar:?]

What has happened here?

Posted

Mod main class:

package com.kolan.thoriummod;

import com.kolan.thoriummod.Entity.ModEntities;
import com.kolan.thoriummod.block.ModBlocks;
import com.kolan.thoriummod.item.ModItems;
import com.mojang.logging.LogUtils;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.eventbus.api.IEventBus;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent;
import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
import org.slf4j.Logger;


@Mod("thorium")
public class Thorium
{
    private static final Logger LOGGER = LogUtils.getLogger();
    public static final String MOD_ID = "thorium";

    public Thorium()
    {
        IEventBus eventBus = FMLJavaModLoadingContext.get().getModEventBus();

        ModEntities.register(eventBus);
        ModItems.register(eventBus);
        ModBlocks.register(eventBus);


        eventBus.addListener(this::setup);

        MinecraftForge.EVENT_BUS.register(this);
    }

    private void setup(final FMLCommonSetupEvent event) { }

    private void doClientStuff(final FMLClientSetupEvent event) { }
}

Entity registry:

package com.kolan.thoriummod.Entity;

import com.kolan.common.entity.impostor;
import com.kolan.thoriummod.Thorium;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.MobCategory;
import net.minecraftforge.registries.DeferredRegister;
import net.minecraftforge.registries.ForgeRegistries;
import net.minecraftforge.registries.RegistryObject;

public class EntityInit {

    private EntityInit(){

    }

    public static final DeferredRegister<EntityType<?>> ENTITIES = DeferredRegister.create(ForgeRegistries.ENTITIES, Thorium.MOD_ID);

    public static final RegistryObject<EntityType<impostor>> IMPOSTOR = ENTITIES.register("impostor",
            () -> EntityType.Builder.of(impostor::new, MobCategory.CREATURE).sized(0.5f,0.5f)
                    .build(new ResourceLocation(Thorium.MOD_ID, "impostor").toString()));
}

 

Posted

Also please show the class com.kolan.thoriummod.Event.CommonModEvents

  • Like 1

Sorry if my Posts are weird sometimes, I just try to help and learn as much as I can :D

Also: PLEASE use SPOILERS for logs!

Posted
package com.kolan.thoriummod.Event;

import com.kolan.common.entity.impostor;
import com.kolan.thoriummod.Entity.EntityInit;
import com.kolan.thoriummod.Thorium;
import net.minecraftforge.event.entity.EntityAttributeCreationEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod;

@Mod.EventBusSubscriber(modid = Thorium.MOD_ID, bus = Mod.EventBusSubscriber.Bus.MOD)
public class CommonModEvents {

    @SubscribeEvent
    public static void registerAttributes(EntityAttributeCreationEvent event){
        event.put(EntityInit.IMPOSTOR.get(), impostor.createAttributes().build());
    }
}
Posted
1 minute ago, Luis_ST said:

take a look at the first post in this thread

Oh thanks, didn't see it xD

  • Like 1

Sorry if my Posts are weird sometimes, I just try to help and learn as much as I can :D

Also: PLEASE use SPOILERS for logs!

Posted

ModEntities:

package com.kolan.thoriummod.Entity;

import com.kolan.common.entity.impostor;
import com.kolan.thoriummod.Thorium;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.MobCategory;
import net.minecraftforge.eventbus.api.IEventBus;
import net.minecraftforge.registries.DeferredRegister;
import net.minecraftforge.registries.ForgeRegistries;
import net.minecraftforge.registries.RegistryObject;

public class ModEntities {

    private ModEntities() {}

    public static final DeferredRegister<EntityType<?>> ENTITIES = DeferredRegister.create(ForgeRegistries.ENTITIES, Thorium.MOD_ID);

    public static final RegistryObject<EntityType<impostor>> IMPOSTOR = ENTITIES.register("impostor",
            () -> EntityType.Builder.of(impostor::new, MobCategory.MONSTER).sized(0.8f,0.8f)
                    .build(new ResourceLocation(Thorium.MOD_ID, "impostor").toString()));

    public static void register(IEventBus eventBus) {
    }
}

 

Posted
11 minutes ago, Kolan said:
ModEntities.register(eventBus);

Here you are calling 

4 minutes ago, Kolan said:
public static void register(IEventBus eventBus) {
    }

but you need to call the register method of 

4 minutes ago, Kolan said:
public static final DeferredRegister<EntityType<?>> ENTITIES
  • Like 1

Sorry if my Posts are weird sometimes, I just try to help and learn as much as I can :D

Also: PLEASE use SPOILERS for logs!

Posted

Also you are doing the same in 

13 minutes ago, Kolan said:
ModItems.register(eventBus);
ModBlocks.register(eventBus);

 

  • Like 1

Sorry if my Posts are weird sometimes, I just try to help and learn as much as I can :D

Also: PLEASE use SPOILERS for logs!

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



×
×
  • Create New...

Important Information

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