Posted October 20, 20214 yr I tried to make an entity, but when I summon my entity, Minecraft crashes: https://gist.github.com/ArianKG/27288da1b8d670817711372a9e715d96 Source code: https://github.com/ArianKG/KGForge
October 20, 20214 yr Author @diesieben07 So, what code should I change? Edited October 20, 20214 yr by ArianKG
October 20, 20214 yr Use the ModEventBus direct and not the Field you create move the DeferredRegister into the same class where you use it (where you create the RegistryObjects, what you're not doing yet) use RegistryObjects instead of static initializer public static final Block EXAMPLE = new ExampleBlock(); // should be: public static final RegistryObject<ExampleBlock> EXAMPLE = <DeferredRegister_Field>.register("example", new ExampleBlock()); call RenderingRegistry#registerEntityRenderingHandler in FMLClientSetupEvent and register the Renderer Edited October 20, 20214 yr by Luis_ST
October 21, 20214 yr you haven't, you still store the ModEventBus in a static Field and you register the Renderer of your Entity in FMLCommonSetupEvent and not in FMLClientSetupEvent Edit: you still use static initializer for your EntityTypes, I would recommend you to look again at the basics for the Registry System: FCW or the Forge doc Edited October 21, 20214 yr by Luis_ST
October 21, 20214 yr Author @diesieben07 I don't know how can I fix this issues. Also, isn't the problem in entity rendering? Edited October 21, 20214 yr by ArianKG
October 21, 20214 yr Author @diesieben07 I just don't know what code should I change. Even after reading the things that you said I should change. Edited October 21, 20214 yr by ArianKG
October 21, 20214 yr 10 minutes ago, ArianKG said: I just don't know what code should I change. Even after reading the things that you said I should change. you could refer to the docs, there are examples you could use: Forge Community Wiki Minecraft Forge Documentation
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.