Jump to content

Minecraft crashes when I try to summon my entity


ArianKG

Recommended Posts

  1. Use the ModEventBus direct and not the Field you create
  2. move the DeferredRegister into the same class where you use it (where you create the RegistryObjects, what you're not doing yet)
  3. 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());
  4. call RenderingRegistry#registerEntityRenderingHandler in FMLClientSetupEvent and register the Renderer
Edited by Luis_ST
Link to comment
Share on other sites

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 by Luis_ST
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

    • The log is here https://pastebin.com/eK7U0a9b I have the following mods: 1.alexsdelight-1.4.1 2.alexsmobs-1.21.1 3.citadel-2.1.4-1.19 4.FarmersDelight-1.19.2-1.2.3 5.jei-1.19.2-forge-11.5.0.297 6.journeymap-1.19.2-5.9.0-forge 7.Optifine_1.19.2_HD_U_H9 8.sophisticatedbackpacks-1.19.2-3.19.1.960 9.sophisticatedcore-1.19.2-0.5.106.503 The error code is -1. If anyone can help please do.
    • i think the more suitable would be using the nbt format and use the ChestBlockEntity methods to get the items other could be list all the registered items make a list and get the item from the list  Map<String, Item> lista_de_items = new HashMap<String, Item>(); int count = 0; for (Map.Entry<net.minecraft.resources.ResourceKey<Item>, Item> ResourceKey : ForgeRegistries.ITEMS.getEntries()) { Item actualItem = ResourceKey.getValue();//.defaultBlockState().getBlock(); String nnn = ForgeRegistries.ITEMS.getKey(actualItem).toString(); lista_de_items.put(nnn, actualItem); System.out.println( count + " [" + nnn + "]" ); count++; } Item cosa = lista_de_items.get("minecraft:apple");
    • I am hosting a server on oracle cloud free tier. It has 24GB RAM and 4 OCPUs. I use pterodactyl panel to manage my servers. I have added -Xmx21G in the user_jvm_args.txt file. It is using 9GiB of ram and 120% CPU (max 400%). I have restarted several times. I have a lot of mods. It is running on Forge 1.19.2-43.2.14. Pterodactyl Panel has not put any resource allocation restraints on it. Here is my log. I get a message like this: [13:17:53] [Server thread/WARN] [minecraft/MinecraftServer]: Can't keep up! Is the server overloaded? Running 13315ms or 266 ticks behind [13:18:21] [Server thread/WARN] [minecraft/MinecraftServer]: Can't keep up! Is the server overloaded? Running 13002ms or 260 ticks behind [13:18:49] [Server thread/WARN] [minecraft/MinecraftServer]: Can't keep up! Is the server overloaded? Running 12868ms or 257 ticks behind [13:19:16] [Server thread/WARN] [minecraft/MinecraftServer]: Can't keep up! Is the server overloaded? Running 11789ms or 235 ticks behind [13:19:43] [Server thread/WARN] [minecraft/MinecraftServer]: Can't keep up! Is the server overloaded? Running 12087ms or 241 ticks behind [13:20:10] [Server thread/WARN] [minecraft/MinecraftServer]: Can't keep up! Is the server overloaded? Running 12050ms or 241 ticks behind [13:20:37] [Server thread/WARN] [minecraft/MinecraftServer]: Can't keep up! Is the server overloaded? Running 12003ms or 240 ticks behind [13:21:04] [Server thread/WARN] [minecraft/MinecraftServer]: Can't keep up! Is the server overloaded? Running 11758ms or 235 ticks behind [13:21:31] [Server thread/WARN] [minecraft/MinecraftServer]: Can't keep up! Is the server overloaded? Running 12128ms or 242 ticks behind [13:21:59] [Server thread/WARN] [minecraft/MinecraftServer]: Can't keep up! Is the server overloaded? Running 13573ms or 271 ticks behind [13:22:27] [Server thread/WARN] [minecraft/MinecraftServer]: Can't keep up! Is the server overloaded? Running 13200ms or 264 ticks behind [13:22:54] [Server thread/WARN] [minecraft/MinecraftServer]: Can't keep up! Is the server overloaded? Running 11192ms or 223 ticks behind [13:23:21] [Server thread/WARN] [minecraft/MinecraftServer]: Can't keep up! Is the server overloaded? Running 12861ms or 257 ticks behind [13:23:50] [Server thread/WARN] [minecraft/MinecraftServer]: Can't keep up! Is the server overloaded? Running 13288ms or 265 ticks behind [13:24:17] [Server thread/WARN] [minecraft/MinecraftServer]: Can't keep up! Is the server overloaded? Running 12314ms or 246 ticks behind [13:24:43] [Server thread/WARN] [minecraft/MinecraftServer]: Can't keep up! Is the server overloaded? Running 11276ms or 225 ticks behind [13:25:10] [Server thread/WARN] [minecraft/MinecraftServer]: Can't keep up! Is the server overloaded? Running 11444ms or 228 ticks behind [13:25:36] [Server thread/WARN] [minecraft/MinecraftServer]: Can't keep up! Is the server overloaded? Running 11400ms or 228 ticks behind [13:26:03] [Server thread/WARN] [minecraft/MinecraftServer]: Can't keep up! Is the server overloaded? Running 11670ms or 233 ticks behind [13:26:29] [Server thread/WARN] [minecraft/MinecraftServer]: Can't keep up! Is the server overloaded? Running 11382ms or 227 ticks behind [13:26:55] [Server thread/WARN] [minecraft/MinecraftServer]: Can't keep up! Is the server overloaded? Running 11085ms or 221 ticks behind [13:27:22] [Server thread/WARN] [minecraft/MinecraftServer]: Can't keep up! Is the server overloaded? Running 11568ms or 231 ticks behind [13:27:48] [Server thread/WARN] [minecraft/MinecraftServer]: Can't keep up! Is the server overloaded? Running 11736ms or 234 ticks behind Here are all my mods (ik its a lot): [1.19.2] SecurityCraft v1.9.6.1.jar alchemind-0.1.2.a-1.19.2-create0.5.1.jar animalistics v0.1.jar architectury-6.5.85-forge.jar BofferNBeems.jar bronze_age-0.0.2-1.19.2.jar cfm-7.0.0-pre35-1.19.2.jar cgm-1.3.4-1.19.2.jar compressedcreativity-1.19.2-0.1.6.jar CraftTweaker-forge-1.19.2-10.1.46.jar Create Deco Casing 1.1.0 1.19 Fix.jar Create Train Additions 0.3.0-1.19.2.jar create_central_kitchen-1.19.2-for-create-0.5.1.b-1.3.7.d.jar create_crystal_clear-0.2.1-1.19.2.jar create_enchantment_industry-1.19.2-for-create-0.5.1.b-1.2.5.jar create_mechanical_extruder-1.19.2-1.4.1.b-30.jar create_misc_and_things_++1.19.2_3.0.jar create_so-1.3.3+forge-1.19.2.jar create-1.19.2-0.5.1.b.jar Create-Dreams-n-Desires-1.19.2-0.0.2c.ALPHA.jar create-electric-stonks-1.19.2-1.2.5.jar create-mosaicadditions_1.19.2.jar create-renewable-ores-1.jar create-ruins-1.19.2-1.0.0.jar create-structures-0.1.0.jar createaddition-1.19.2-20230527a.jar createcafe-1.1.8-1.19.2.jar createdieselgenerators-1.19.2-1.1.jar createendertransmission-1.2.4.jar createfoundry-forge-1.1.0-1.19.2.jar creategoggles-0.5.5-beta-[FORGE].jar createoreexcavation-1.19-1.2.1.jar createsifter-1.19.2-1.5.1.b-30.jar CreateTweaker-1.19.2-3.0.0.6.jar createunlimited-0.3.1+1.19.2.jar curios-forge-1.19.2-5.1.4.3.jar dragonmounts-1.19.2-1.1.4a.jar ferritecore-5.0.3-forge.jar framework-0.4.2-1.19.2.jar garnished-0.2.2+1.19.2.jar geckolib-forge-1.19-3.1.40.jar jei-1.19.2-forge-11.6.0.1016.jar journeymap-1.19.2-5.9.7-forge.jar kotlinforforge-3.12.0-all.jar kubejs-forge-1902.6.0-build.142.jar liquidburner-1.19.2-0.4.jar MechanicalMachinery-1.19.2-1.1.1.jar memoryleakfix-forge-1.17+-1.1.1.jar moderntrainparts-mc1.19.2-0.2.2-forge.jar molten_geodes-1.19.2-0.3.1.jar molten_vents-1.19.2-0.2.0.jar Patchouli-1.19.2-77.jar pneumaticcraft-repressurized-1.19.2-4.3.5-25.jar rhino-forge-1902.2.2-build.268.jar simpleplanes-1.19.2-5.2.2.jar starlight-1.1.1+forge.cf5b10b.jar Steam_Rails-1.3.5+forge-mc1.19.2.jar unlockschematics-1.19.2-1.0.0.jar worldedit-mod-7.2.12.jar
    • I randomly got this error when I tried to build my game, tried reverting everything I did and it still did not do anything, and nothing is working. I don't think it's to do with my code, but it randomly happened after I made some changes? 1:28:28 pm: Executing 'assemble'... > Configure project : Java: 17.0.6, JVM: 17.0.6+10 (Eclipse Adoptium), Arch: amd64 WARNING: This project is configured to use the official obfuscation mappings provided by Mojang. These mapping fall under their associated license, you should be fully aware of this license. For the latest license text, refer below, or the reference copy here: https://github.com/MinecraftForge/MCPConfig/blob/master/Mojang.md, You can hide this warning by running the `hideOfficialWarningUntilChanged` task WARNING: (c) 2020 Microsoft Corporation. These mappings are provided "as-is" and you bear the risk of using them. You may copy and use the mappings for development purposes, but you may not redistribute the mappings complete and unmodified. Microsoft makes no warranties, express or implied, with respect to the mappings provided here. Use and modification of this document or the source code (in any form) of Minecraft: Java Edition is governed by the Minecraft End User License Agreement available at https://account.mojang.com/documents/minecraft_eula. > Task :compileJava FAILED Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0. You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins. See https://docs.gradle.org/7.5.1/userguide/command_line_interface.html#sec:command_line_warnings 1 actionable task: 1 executed FAILURE: Build completed with 2 failures. 1: Task failed with an exception. ----------- * What went wrong: Execution failed for task ':compileJava'. > Cannot fingerprint input file property 'stableSources': java.io.IOException: Cannot snapshot C:\Users\jbart\OneDrive\Documents\Minecraft\Mods\Forge\1.19.3\JaspersStarWarsMod\src\main\java\net\jasper\jstarwars\classes\client\ClientForceData.java: not a regular file * 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. ============================================================================== 2: Task failed with an exception. ----------- * What went wrong: java.lang.StackOverflowError (no error message) * 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. ============================================================================== * Get more help at https://help.gradle.org BUILD FAILED in 888ms 1:28:29 pm: Execution finished 'assemble'. ClientForceData.java: package net.jasper.jstarwars.classes.client; public class ClientForceData { private static int playerForce; public static void set(int force) { ClientForceData.playerForce = force; } public static int getPlayerForce() { return ClientForceData.playerForce; } }
    • good days  i was updating to 1.20 and have this problem  i need to check the material in blocks for many items and things but the class material exist no more  Material pmat = tmpstate.getMaterial(); if ((pmat == Material.AIR) || (pmat == Material.PLANT) || (pmat == Material.LEAVES) || (pmat == Material.REPLACEABLE_PLANT)) { return false; } also the .getMaterial() method is gonne an without being market as deprecated so i dont find the replacement  forums says //import net.minecraft.world.level.material.Material; that class dont exist on mi forge-1.20.2-48.0.49-mdk.zip i was thingking in using soundtype instead  //import net.minecraft.world.level.block.SoundType but its a little uncosistent coze is designed for other thing and i would have to write custom functions everywhere just to check if a block  like isMetal() could be SoundType.ANVIL SoundType.METAL SoundType.CHAIN and i hand an custome ladder ladder made of iron   
  • Topics

×
×
  • Create New...

Important Information

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