Jump to content

Recommended Posts

Posted

Forge server with mods. Server starts and then after running for 30 seconds crashes

Crash report as follows

Please let me know the problem and solution

---- Minecraft Crash Report ----
// Shall we play a game?

Time: 2023-03-09 14:50:43
Description: Exception in server tick loop

java.lang.RuntimeException: Attempted to load class net/minecraft/client/Minecraft for invalid dist DEDICATED_SERVER
    at net.minecraftforge.fml.loading.RuntimeDistCleaner.processClassWithFlags(RuntimeDistCleaner.java:57) ~[fmlloader-1.19.3-44.1.16.jar%2368!/:1.0] {}
    at cpw.mods.modlauncher.LaunchPluginHandler.offerClassNodeToPlugins(LaunchPluginHandler.java:88) ~[modlauncher-10.0.8.jar%2355!/:?] {}
    at cpw.mods.modlauncher.ClassTransformer.transform(ClassTransformer.java:120) ~[modlauncher-10.0.8.jar%2355!/:?] {}
    at cpw.mods.modlauncher.TransformingClassLoader.maybeTransformClassBytes(TransformingClassLoader.java:50) ~[modlauncher-10.0.8.jar%2355!/:?] {}
    at cpw.mods.cl.ModuleClassLoader.readerToClass(ModuleClassLoader.java:113) ~[securejarhandler-2.1.6.jar:?] {}
    at cpw.mods.cl.ModuleClassLoader.lambda$findClass$15(ModuleClassLoader.java:219) ~[securejarhandler-2.1.6.jar:?] {}
    at cpw.mods.cl.ModuleClassLoader.loadFromModule(ModuleClassLoader.java:229) ~[securejarhandler-2.1.6.jar:?] {}
    at cpw.mods.cl.ModuleClassLoader.findClass(ModuleClassLoader.java:219) ~[securejarhandler-2.1.6.jar:?] {}
    at cpw.mods.cl.ModuleClassLoader.loadClass(ModuleClassLoader.java:135) ~[securejarhandler-2.1.6.jar:?] {}
    at java.lang.ClassLoader.loadClass(ClassLoader.java:521) ~[?:?] {}
    at com.klikli_dev.theurgy.item.AlchemicalSulfurItem$DistHelper.registerCreativeModeTabs(AlchemicalSulfurItem.java:90) ~[theurgy-1.19.3-1.3.0.jar%23206!/:1.19.3-1.3.0] {re:classloading}
    at com.klikli_dev.theurgy.registry.ItemRegistry.lambda$onRegisterCreativeModeTabs$10(ItemRegistry.java:78) ~[theurgy-1.19.3-1.3.0.jar%23206!/:1.19.3-1.3.0] {re:classloading}
    at com.minecolonies.api.compatibility.CompatibilityManager.discoverAllItems(CompatibilityManager.java:622) ~[minecolonies-1.19.3-1.0.1275-ALPHA.jar%23186!/:1.19.3-1.0.1275-ALPHA] {re:classloading}
    at com.minecolonies.api.compatibility.CompatibilityManager.discover(CompatibilityManager.java:219) ~[minecolonies-1.19.3-1.0.1275-ALPHA.jar%23186!/:1.19.3-1.0.1275-ALPHA] {re:classloading}
    at com.minecolonies.coremod.event.DataPackSyncEventHandler$ServerEvents.loadRecipes(DataPackSyncEventHandler.java:51) ~[minecolonies-1.19.3-1.0.1275-ALPHA.jar%23186!/:1.19.3-1.0.1275-ALPHA] {re:classloading}
    at com.minecolonies.coremod.event.DataPackSyncEventHandler$ServerEvents.onServerStarted(DataPackSyncEventHandler.java:119) ~[minecolonies-1.19.3-1.0.1275-ALPHA.jar%23186!/:1.19.3-1.0.1275-ALPHA] {re:classloading}
    at com.minecolonies.coremod.event.__ServerEvents_onServerStarted_ServerStartedEvent.invoke(.dynamic) ~[minecolonies-1.19.3-1.0.1275-ALPHA.jar%23186!/:1.19.3-1.0.1275-ALPHA] {re:classloading,pl:eventbus:B}
    at net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:73) ~[eventbus-6.0.3.jar%2352!/:?] {}
    at net.minecraftforge.eventbus.EventBus.post(EventBus.java:315) ~[eventbus-6.0.3.jar%2352!/:?] {}
    at net.minecraftforge.eventbus.EventBus.post(EventBus.java:296) ~[eventbus-6.0.3.jar%2352!/:?] {}
    at net.minecraftforge.server.ServerLifecycleHooks.handleServerStarted(ServerLifecycleHooks.java:111) ~[forge-1.19.3-44.1.16-universal.jar%23216!/:?] {re:classloading}
    at net.minecraft.server.MinecraftServer.m_130011_(MinecraftServer.java:640) ~[server-1.19.3-20221207.122022-srg.jar%23211!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:ae2.mixins.json:spatial.MinecraftServerMixin,pl:mixin:APP:citadel.mixins.json:MinecraftServerMixin,pl:mixin:APP:balm.mixins.json:MinecraftServerMixin,pl:mixin:A}
    at net.minecraft.server.MinecraftServer.m_206580_(MinecraftServer.java:251) ~[server-1.19.3-20221207.122022-srg.jar%23211!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:ae2.mixins.json:spatial.MinecraftServerMixin,pl:mixin:APP:citadel.mixins.json:MinecraftServerMixin,pl:mixin:APP:balm.mixins.json:MinecraftServerMixin,pl:mixin:A}
    at java.lang.Thread.run(Thread.java:1589) ~[?:?] {}


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- System Details --
Details:
    Minecraft Version: 1.19.3
    Minecraft Version ID: 1.19.3
    Operating System: Windows 11 (amd64) version 10.0
    Java Version: 19.0.2, Oracle Corporation
    Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode, sharing), Oracle Corporation
    Memory: 929570936 bytes (886 MiB) / 2355101696 bytes (2246 MiB) up to 4294967296 bytes (4096 MiB)
    CPUs: 16
    Processor Vendor: AuthenticAMD
    Processor Name: AMD Ryzen 7 5800X 8-Core Processor             
    Identifier: AuthenticAMD Family 25 Model 33 Stepping 2
    Microarchitecture: Zen 3
    Frequency (GHz): 3.79
    Number of physical packages: 1
    Number of physical CPUs: 8
    Number of logical CPUs: 16
    Graphics card #0 name: NVIDIA GeForce RTX 3080
    Graphics card #0 vendor: NVIDIA (0x10de)
    Graphics card #0 VRAM (MB): 4095.00
    Graphics card #0 deviceId: 0x2216
    Graphics card #0 versionInfo: DriverVersion=31.0.15.3118
    Memory slot #0 capacity (MB): 16384.00
    Memory slot #0 clockSpeed (GHz): 2.13
    Memory slot #0 type: DDR4
    Memory slot #1 capacity (MB): 16384.00
    Memory slot #1 clockSpeed (GHz): 2.13
    Memory slot #1 type: DDR4
    Virtual memory max (MB): 34704.60
    Virtual memory used (MB): 15828.35
    Swap memory total (MB): 2048.00
    Swap memory used (MB): 0.00
    JVM Flags: 1 total; -Xmx4G
    Server Running: true
    Player Count: 0 / 20; []
    Data Packs: vanilla, mod:forge, mod:smartbrainlib, mod:supermartijn642configlib (incompatible), mod:cucumber (incompatible), mod:compact_storage (incompatible), mod:geckolib, mod:simplemagnets (incompatible), mod:playeranimator (incompatible), mod:botarium, mod:aoa3, mod:ae2 (incompatible), mod:extendedcrafting (incompatible), mod:ironjetpacks (incompatible), mod:waystones (incompatible), mod:forgeendertech, mod:tslateffectslib, mod:cookingforblockheads (incompatible), mod:controlling (incompatible), mod:citadel, mod:alexsmobs (incompatible), mod:naturescompass (incompatible), mod:adhooks, mod:farmingforblockheads (incompatible), mod:mahoutsukai, mod:packagedexcrafting (incompatible), mod:balm (incompatible), mod:immersive_armors (incompatible), mod:cloth_config (incompatible), mod:scuba_gear (incompatible), mod:mysticalagriculture (incompatible), mod:mysticalagradditions (incompatible), mod:bettercombat (incompatible), mod:toolbelt, mod:immersiveengineering (incompatible), mod:spectrelib (incompatible), mod:supermartijn642corelib (incompatible), mod:packagedauto (incompatible), mod:theurgy, mod:resourcefulconfig, mod:domum_ornamentum, mod:simplybackpacks, mod:curios, mod:blockui, mod:structurize, mod:multipiston, mod:modonomicon, mod:resourcefullib (incompatible), mod:minecolonies (incompatible), mod:cfm (incompatible), mod:architectury (incompatible), mod:simplyswords (incompatible), mod:occultism, mod:aquaculture, mod:veinmining, mod:betteradvancements (incompatible), mod:ad_astra (incompatible)
    Enabled Feature Flags: minecraft:vanilla
    World Generation: Experimental
    Is Modded: Definitely; Server brand changed to 'forge'
    Type: Dedicated Server (map_server.txt)
    ModLauncher: 10.0.8+10.0.8+main.0ef7e830
    ModLauncher launch target: forgeserver
    ModLauncher naming: srg
    ModLauncher services: 
        mixin-0.8.5.jar mixin PLUGINSERVICE 
        eventbus-6.0.3.jar eventbus PLUGINSERVICE 
        fmlloader-1.19.3-44.1.16.jar slf4jfixer PLUGINSERVICE 
        fmlloader-1.19.3-44.1.16.jar object_holder_definalize PLUGINSERVICE 
        fmlloader-1.19.3-44.1.16.jar runtime_enum_extender PLUGINSERVICE 
        fmlloader-1.19.3-44.1.16.jar capability_token_subclass PLUGINSERVICE 
        accesstransformers-8.0.4.jar accesstransformer PLUGINSERVICE 
        fmlloader-1.19.3-44.1.16.jar runtimedistcleaner PLUGINSERVICE 
        modlauncher-10.0.8.jar mixin TRANSFORMATIONSERVICE 
        modlauncher-10.0.8.jar fml TRANSFORMATIONSERVICE 
    FML Language Providers: 
        [email protected]
        lowcodefml@null
        javafml@null
    Mod List: 
        SmartBrainLib-forge-1.19.3-1.8.1.jar              |SmartBrainLib                 |smartbrainlib                 |1.8.1               |DONE      |Manifest: NOSIGNATURE
        supermartijn642configlib-1.1.6b-forge-mc1.19.jar  |SuperMartijn642's Config Libra|supermartijn642configlib      |1.1.6b              |DONE      |Manifest: NOSIGNATURE
        Cucumber-1.19.3-6.1.2.jar                         |Cucumber Library              |cucumber                      |6.1.2               |DONE      |Manifest: NOSIGNATURE
        compact_storage_forge-5.0.1-1.19.3.jar            |Compact Storage               |compact_storage               |5.0.1-1.19.3        |DONE      |Manifest: NOSIGNATURE
        geckolib-forge-1.19.3-4.0.4.jar                   |GeckoLib 4                    |geckolib                      |4.0.4               |DONE      |Manifest: NOSIGNATURE
        simplemagnets-1.1.9-forge-mc1.19.3.jar            |Simple Magnets                |simplemagnets                 |1.1.9               |DONE      |Manifest: NOSIGNATURE
        player-animation-lib-forge-1.0.2+1.19.3.jar       |Player Animator               |playeranimator                |1.0.2+1.19.3        |DONE      |Manifest: NOSIGNATURE
        botarium-forge-1.19.3-2.0.5.jar                   |Botarium                      |botarium                      |2.0.5               |DONE      |Manifest: NOSIGNATURE
        AoA3-1.19.3-3.6.21.jar                            |Advent of Ascension           |aoa3                          |3.6.21              |DONE      |Manifest: NOSIGNATURE
        appliedenergistics2-forge-13.0.10-beta.jar        |Applied Energistics 2         |ae2                           |13.0.10-beta        |DONE      |Manifest: NOSIGNATURE
        ExtendedCrafting-1.19.3-5.2.1.jar                 |Extended Crafting             |extendedcrafting              |5.2.1               |DONE      |Manifest: NOSIGNATURE
        IronJetpacks-1.19.3-6.1.0.jar                     |Iron Jetpacks                 |ironjetpacks                  |6.1.0               |DONE      |Manifest: NOSIGNATURE
        waystones-forge-1.19.3-12.2.0.jar                 |Waystones                     |waystones                     |12.2.0              |DONE      |Manifest: NOSIGNATURE
        ForgeEndertech-1.19.3-10.1.0.1-build.0057.jar     |ForgeEndertech                |forgeendertech                |10.1.0.1            |DONE      |Manifest: NOSIGNATURE
        TslatEffectsLib-forge-1.19.3-1.4.2.jar            |Tslat EffectsLib              |tslateffectslib               |1.4.1               |DONE      |Manifest: NOSIGNATURE
        cookingforblockheads-forge-1.19.3-14.0.2.jar      |CookingForBlockheads          |cookingforblockheads          |14.0.2              |DONE      |Manifest: NOSIGNATURE
        Controlling-forge-1.19.3-10.0+9.jar               |Controlling                   |controlling                   |10.0+9              |DONE      |Manifest: NOSIGNATURE
        citadel-2.3.0-1.19.3.jar                          |Citadel                       |citadel                       |2.3.0               |DONE      |Manifest: NOSIGNATURE
        alexsmobs-1.22.1.jar                              |Alex's Mobs                   |alexsmobs                     |1.22.1              |DONE      |Manifest: NOSIGNATURE
        NaturesCompass-1.19.3-1.10.1-forge.jar            |Nature's Compass              |naturescompass                |1.19.3-1.10.1-forge |DONE      |Manifest: NOSIGNATURE
        AdHooks-1.19.3-9.1.0.0-build.0001.jar             |Advanced Hook Launchers       |adhooks                       |9.1.0.0             |DONE      |Manifest: NOSIGNATURE
        farmingforblockheads-forge-1.19.3-12.1.0.jar      |Farming for Blockheads        |farmingforblockheads          |12.1.0              |DONE      |Manifest: NOSIGNATURE
        mahoutsukai-1.19.3-v1.34.41.jar                   |Mahou Tsukai                  |mahoutsukai                   |1.19.3-v1.34.41     |DONE      |Manifest: NOSIGNATURE
        PackagedExCrafting-1.19.3-3.3.0.3.jar             |PackagedExCrafting            |packagedexcrafting            |3.3.0.3             |DONE      |Manifest: NOSIGNATURE
        balm-forge-1.19.3-5.0.3.jar                       |Balm                          |balm                          |5.0.3               |DONE      |Manifest: NOSIGNATURE
        immersive_armors-1.5.4+1.19.3-forge.jar           |Immersive Armors              |immersive_armors              |1.5.4+1.19.3        |DONE      |Manifest: NOSIGNATURE
        cloth-config-9.0.94-forge.jar                     |Cloth Config v9 API           |cloth_config                  |9.0.94              |DONE      |Manifest: NOSIGNATURE
        forge-1.19.3-44.1.16-universal.jar                |Forge                         |forge                         |44.1.16             |DONE      |Manifest: 84:ce:76:e8:45:35:e4:0e:63:86:df:47:59:80:0f:67:6c:c1:5f:6e:5f:4d:b3:54:47:1a:9f:7f:ed:5e:f2:90
        scuba_gear-1.19.3-1.0.5.jar                       |Scuba Gear                    |scuba_gear                    |1.0.5               |DONE      |Manifest: NOSIGNATURE
        MysticalAgriculture-1.19.3-6.1.4.jar              |Mystical Agriculture          |mysticalagriculture           |6.1.4               |DONE      |Manifest: NOSIGNATURE
        MysticalAgradditions-1.19.3-6.1.0.jar             |Mystical Agradditions         |mysticalagradditions          |6.1.0               |DONE      |Manifest: NOSIGNATURE
        server-1.19.3-20221207.122022-srg.jar             |Minecraft                     |minecraft                     |1.19.3              |DONE      |Manifest: NOSIGNATURE
        bettercombat-forge-1.6.2+1.19.3.jar               |Better Combat                 |bettercombat                  |1.6.2+1.19.3        |DONE      |Manifest: NOSIGNATURE
        ToolBelt-1.19.3-1.19.7.jar                        |Tool Belt                     |toolbelt                      |1.19.7              |DONE      |Manifest: NOSIGNATURE
        ImmersiveEngineering-1.19.3-9.3.0-163.jar         |Immersive Engineering         |immersiveengineering          |1.19.3-9.3.0-163    |DONE      |Manifest: 44:39:94:cf:1d:8c:be:3c:7f:a9:ee:f4:1e:63:a5:ac:61:f9:c2:87:d5:5b:d9:d6:8c:b5:3e:96:5d:8e:3f:b7
        spectrelib-forge-0.12.3+1.19.2.jar                |SpectreLib                    |spectrelib                    |0.12.3+1.19.2       |DONE      |Manifest: NOSIGNATURE
        supermartijn642corelib-1.1.4a-forge-mc1.19.3.jar  |SuperMartijn642's Core Lib    |supermartijn642corelib        |1.1.4a              |DONE      |Manifest: NOSIGNATURE
        PackagedAuto-1.19.3-3.3.0.4.jar                   |PackagedAuto                  |packagedauto                  |3.3.0.4             |DONE      |Manifest: NOSIGNATURE
        theurgy-1.19.3-1.3.0.jar                          |Theurgy                       |theurgy                       |1.19.3-1.3.0        |DONE      |Manifest: NOSIGNATURE
        resourcefulconfig-forge-1.19.3-1.1.3.jar          |Resourcefulconfig             |resourcefulconfig             |1.1.3               |DONE      |Manifest: NOSIGNATURE
        domum_ornamentum-1.19.3-1.0.86-ALPHA-universal.jar|Domum Ornamentum              |domum_ornamentum              |1.19.3-1.0.86-ALPHA |DONE      |Manifest: NOSIGNATURE
        simplybackpacks-1.19.3-2.1.5-build.48.jar         |Simply Backpacks              |simplybackpacks               |1.19.3-2.1.5-build.4|DONE      |Manifest: NOSIGNATURE
        curios-forge-1.19.3-5.1.4.0.jar                   |Curios API                    |curios                        |1.19.3-5.1.4.0      |DONE      |Manifest: NOSIGNATURE
        blockui-1.19.3-0.0.70-ALPHA.jar                   |UI Library Mod                |blockui                       |1.19.3-0.0.70-ALPHA |DONE      |Manifest: NOSIGNATURE
        structurize-1.19.3-1.0.484-ALPHA.jar              |Structurize                   |structurize                   |1.19.3-1.0.484-ALPHA|DONE      |Manifest: NOSIGNATURE
        multipiston-1.19.3-1.2.22-ALPHA.jar               |Multi-Piston                  |multipiston                   |1.19.3-1.2.22-ALPHA |DONE      |Manifest: NOSIGNATURE
        modonomicon-1.19.3-1.25.0.jar                     |Modonomicon                   |modonomicon                   |1.19.3-1.25.0       |DONE      |Manifest: NOSIGNATURE
        resourcefullib-1.2.7.jar                          |Resourceful Lib               |resourcefullib                |1.2.7               |DONE      |Manifest: NOSIGNATURE
        minecolonies-1.19.3-1.0.1275-ALPHA.jar            |MineColonies                  |minecolonies                  |1.19.3-1.0.1275-ALPH|DONE      |Manifest: NOSIGNATURE
        cfm-7.0.0-pre35-1.19.3.jar                        |MrCrayfish's Furniture Mod    |cfm                           |7.0.0-pre35         |DONE      |Manifest: NOSIGNATURE
        architectury-7.1.70-forge.jar                     |Architectury                  |architectury                  |7.1.70              |DONE      |Manifest: NOSIGNATURE
        simplyswords-forge-1.43.1-1.19.3.jar              |Simply Swords                 |simplyswords                  |1.43.1-1.19.3       |DONE      |Manifest: NOSIGNATURE
        occultism-1.19.3-1.71.1.jar                       |Occultism                     |occultism                     |1.19.3-1.71.1       |DONE      |Manifest: NOSIGNATURE
        Aquaculture-1.19.3-2.4.11.jar                     |Aquaculture 2                 |aquaculture                   |1.19.3-2.4.11       |DONE      |Manifest: NOSIGNATURE
        veinmining-forge-1.1.1+1.19.3.jar                 |Vein Mining                   |veinmining                    |1.1.1+1.19.3        |DONE      |Manifest: NOSIGNATURE
        BetterAdvancements-1.19.3-0.3.1.149.jar           |Better Advancements           |betteradvancements            |0.3.1.149           |DONE      |Manifest: NOSIGNATURE
        ad_astra-forge-1.19.3-1.13.4.jar                  |Ad Astra                      |ad_astra                      |1.13.4              |DONE      |Manifest: NOSIGNATURE
    Crash Report UUID: 7d71f0f8-1717-442e-8683-c118307eb072
    FML: 44.1
    Forge: net.minecraftforge:44.1.16

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

    • Hi! I'm trying to add my custom models/textures renderer like this: public class PonyPlayerWrapperRenderer extends EntityRenderer<Player> { // wrapper class under my LivingEntityRenderer class implementation private final PonyPlayerRenderer innerRenderer; private final PonyPlayerRenderer innerSlimRenderer; public PonyPlayerWrapperRenderer(final EntityRendererProvider.Context context) { super(context); System.out.println("creating new PonyPlayerWrapperRenderer"); this.innerRenderer = new PonyPlayerRenderer(context, false); this.innerSlimRenderer = new PonyPlayerRenderer(context, true); } @Override public void render(final Player entity, final float yaw, final float partialTicks, final PoseStack poseStack, final MultiBufferSource bufferSource, final int packedLight) { System.out.println("PonyPlayerWrapperRenderer render: " + entity.toString()); if (entity instanceof AbstractClientPlayer clientPlayer) { if (clientPlayer.getModelName().contains("slim")) { innerSlimRenderer.render(clientPlayer, yaw, partialTicks, poseStack, bufferSource, packedLight); } else { innerRenderer.render(clientPlayer, yaw, partialTicks, poseStack, bufferSource, packedLight); } } } @Override public ResourceLocation getTextureLocation(final Player player) { System.out.println("PonyPlayerWrapperRenderer getTextureLocation"); if (player instanceof AbstractClientPlayer clientPlayer) { return clientPlayer.getSkinTextureLocation(); } System.out.println("player instanceof AbstractClientPlayer is false"); return getDefaultSkin(player.getUUID()); } } public class PonyPlayerRenderer extends LivingEntityRenderer<AbstractClientPlayer, PlayerModel<AbstractClientPlayer>> { private final PlayerModel<AbstractClientPlayer> earthModel; private final PlayerModel<AbstractClientPlayer> pegasusModel; private final PlayerModel<AbstractClientPlayer> unicornModel; public PonyPlayerRenderer(final EntityRendererProvider.Context context, final boolean slim) { super( context, slim ? new PonyModelSlim(context.bakeLayer(PonyModelSlim.LAYER_LOCATION)) : new PonyModel(context.bakeLayer(PonyModel.LAYER_LOCATION)), 0.5f ); System.out.println("creating new PonyPlayerRenderer"); this.earthModel = slim ? new PonyModelSlim(context.bakeLayer(PonyModelSlim.LAYER_LOCATION)) : new PonyModel(context.bakeLayer(PonyModel.LAYER_LOCATION)); this.pegasusModel = new PegasusModel(context.bakeLayer(PegasusModel.LAYER_LOCATION)); this.unicornModel = new UnicornModel(context.bakeLayer(UnicornModel.LAYER_LOCATION)); } @Override public void render(final AbstractClientPlayer player, final float entityYaw, final float partialTicks, final PoseStack poseStack, final MultiBufferSource buffer, final int packedLight) { final PonyRace race = player.getCapability(PONY_DATA) .map(data -> ofNullable(data.getRace()).orElse(PonyRace.EARTH)) .orElse(PonyRace.EARTH); this.model = switch (race) { case PEGASUS -> pegasusModel; case UNICORN -> unicornModel; case EARTH -> earthModel; }; super.render(player, entityYaw, partialTicks, poseStack, buffer, packedLight); } @Override public ResourceLocation getTextureLocation(final AbstractClientPlayer player) { final PonyRace race = player.getCapability(PONY_DATA) .map(data -> ofNullable(data.getRace()).orElse(PonyRace.EARTH)) .orElse(PonyRace.EARTH); return switch (race) { case EARTH -> fromNamespaceAndPath(MODID, "textures/entity/earth_pony.png"); case PEGASUS -> fromNamespaceAndPath(MODID, "textures/entity/pegasus.png"); case UNICORN -> fromNamespaceAndPath(MODID, "textures/entity/unicorn.png"); }; } } @Mod.EventBusSubscriber(modid = MODID, bus = MOD, value = CLIENT) public class ClientRenderers { // mod bus render registration config @SubscribeEvent public static void onRegisterLayerDefinitions(final EntityRenderersEvent.RegisterLayerDefinitions event) { event.registerLayerDefinition(PonyModel.LAYER_LOCATION, PonyModel::createBodyLayer); event.registerLayerDefinition(PonyModelSlim.LAYER_LOCATION, PonyModelSlim::createBodyLayer); event.registerLayerDefinition(PegasusModel.LAYER_LOCATION, PegasusModel::createBodyLayer); event.registerLayerDefinition(UnicornModel.LAYER_LOCATION, UnicornModel::createBodyLayer); event.registerLayerDefinition(InnerPonyArmorModel.LAYER_LOCATION, InnerPonyArmorModel::createBodyLayer); event.registerLayerDefinition(OuterPonyArmorModel.LAYER_LOCATION, OuterPonyArmorModel::createBodyLayer); } @SubscribeEvent public static void onRegisterRenderers(final EntityRenderersEvent.RegisterRenderers event) { event.registerEntityRenderer(EntityType.PLAYER, PonyPlayerWrapperRenderer::new); System.out.println("onRegisterRenderers end"); } } Method onRegisterRenderers() is called and I can see it being logged. But when I enter the world, my PonyWrapperRenderer render() method doesn't ever seem to be called. I also tried to put my renderer to EntityRenderDispatcher's playerRenderers via reflection: @Mod.EventBusSubscriber(modid = MODID, bus = MOD, value = CLIENT) public class ClientRenderers { @SubscribeEvent public static void onRegisterLayerDefinitions(final EntityRenderersEvent.RegisterLayerDefinitions event) { event.registerLayerDefinition(PonyModel.LAYER_LOCATION, PonyModel::createBodyLayer); event.registerLayerDefinition(PonyModelSlim.LAYER_LOCATION, PonyModelSlim::createBodyLayer); event.registerLayerDefinition(PegasusModel.LAYER_LOCATION, PegasusModel::createBodyLayer); event.registerLayerDefinition(UnicornModel.LAYER_LOCATION, UnicornModel::createBodyLayer); event.registerLayerDefinition(InnerPonyArmorModel.LAYER_LOCATION, InnerPonyArmorModel::createBodyLayer); event.registerLayerDefinition(OuterPonyArmorModel.LAYER_LOCATION, OuterPonyArmorModel::createBodyLayer); } @SubscribeEvent public static void onClientSetup(final FMLClientSetupEvent event) { event.enqueueWork(() -> { try { final EntityRenderDispatcher dispatcher = Minecraft.getInstance().getEntityRenderDispatcher(); final Field renderersField = getEntityRenderDispatcherField("playerRenderers"); final Field itemInHandRenderer = getEntityRenderDispatcherField("itemInHandRenderer"); @SuppressWarnings("unchecked") final Map<String, EntityRenderer<? extends Player>> playerRenderers = (Map<String, EntityRenderer<? extends Player>>)renderersField.get(dispatcher); final PonyPlayerWrapperRenderer renderer = new PonyPlayerWrapperRenderer( new EntityRendererProvider.Context( dispatcher, Minecraft.getInstance().getItemRenderer(), Minecraft.getInstance().getBlockRenderer(), (ItemInHandRenderer)itemInHandRenderer.get(dispatcher), Minecraft.getInstance().getResourceManager(), Minecraft.getInstance().getEntityModels(), Minecraft.getInstance().font ) ); playerRenderers.put("default", renderer); playerRenderers.put("slim", renderer); System.out.println("Player renderers replaced"); } catch (final Exception e) { throw new RuntimeException("Failed to replace player renderers", e); } }); } private static Field getEntityRenderDispatcherField(final String fieldName) throws NoSuchFieldException { final Field field = EntityRenderDispatcher.class.getDeclaredField(fieldName); field.setAccessible(true); return field; } } But I receive the error before Minecraft Client appears (RuntimeException: Failed to replace player renderers - from ClientRenderers onClientSetup() method - and its cause below): java.lang.IllegalArgumentException: No model for layer anotherlittlepony:earth_pony#main at net.minecraft.client.model.geom.EntityModelSet.bakeLayer(EntityModelSet.java:18) ~[forge-1.20.1-47.4.0_mapped_official_1.20.1-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.client.renderer.entity.EntityRendererProvider$Context.bakeLayer(EntityRendererProvider.java:69) ~[forge-1.20.1-47.4.0_mapped_official_1.20.1-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A} at com.thuggeelya.anotherlittlepony.client.renderer.pony.PonyPlayerRenderer.<init>(PonyPlayerRenderer.java:32) ~[main/:?] {re:classloading} at com.thuggeelya.anotherlittlepony.client.renderer.pony.PonyPlayerWrapperRenderer.<init>(PonyPlayerWrapperRenderer.java:24) ~[main/:?] {re:classloading} at com.thuggeelya.anotherlittlepony.client.renderer.ClientRenderers.lambda$onClientSetup$0(ClientRenderers.java:79) ~[main/:?] {re:classloading} ... 33 more Problem appears when EntityRendererProvider context tries to bakeLayer with my model layer location: new PonyModel(context.bakeLayer(PonyModel.LAYER_LOCATION)); // PonyPlayerRenderer.java:32 public class PonyModel extends PlayerModel<AbstractClientPlayer> { // the model class itself public static final ModelLayerLocation LAYER_LOCATION = new ModelLayerLocation( ResourceLocation.fromNamespaceAndPath(MODID, "earth_pony"), "main" ); public PonyModel(final ModelPart root) { super(root, false); } public static LayerDefinition createBodyLayer() { // some CubeListBuilder stuff for model appearance } } Textures PNGs are placed at: resources/assets/[my mod id]/textures/entity. My forge version is 1.20.1. Would appreciate any help.
    • Well, a bit more information about what you're trying to do would be helpful. e.g. why you're trying to use "INVOKE_ASSIGN" instead of "INVOKE". "INVOKE_ASSIGN" calls your code after the "target" is called and its value is stored, if applicable. "INVOKE" calls your code before the target is called. "target" expects a fully qualified name, as per the SpongePowered docs, if that name is going to be remapped (which it will be if your injecting into Minecraft itself and not another mod). For more information on fully qualified names versus canonical names, see the Java specifications. Here's an example of a working "@At" from my own code that targets the "getClosestsVulnerablePlayerToEntity" call inside a mob's logic: @At(value = "INVOKE_ASSIGN", target = "net.minecraft.world.World.getClosestVulnerablePlayerToEntity(Lnet/minecraft/entity/Entity;D)Lnet/minecraft/entity/player/EntityPlayer;") Hope this helps!
    • Ran it one more time just to check, and there's no errors this time on the log??? Log : https://mclo.gs/LnuaAiu I tried allocating more memory to the modpack, around 8000MB and it's still the same; stopping at "LOAD_REGISTRIES". Are some of the mods clashing, maybe? I have no clue what to do LOL
    • Tried removing some biome generation mods and test ran it again, but it's still the same; still not responding as soon as it gets to "LOAD_REGISTRIES". This time with more errors though. Log : https://mclo.gs/uygZzD8 Is there too little memory allocated to the modpack maybe? Can someone help please.    (T.T)💔
    • This is sad. Over 3300 people have checked the thread and no one is able to help or give any ideas :(.
  • Topics

×
×
  • Create New...

Important Information

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