Jump to content

The game crashed whilst unexpected error Error: java.lang.NoSuchMethodError: 'void net.minecraft.client.Options.load(boolean)'


Recommended Posts

Posted

Hey, i have been getting this error a lot, i cant play 1.19 with mods. if i launch the forge version without the mods it launches just fine... if i add the mods it gives me this error.

Can someone pls help me?

Thx

My error log :

 

---- Minecraft Crash Report ----
// Don't be sad, have a hug! <3

Time: 29/06/2022 19:08
Description: Unexpected error

java.lang.NoSuchMethodError: 'void net.minecraft.client.Options.load(boolean)'
    at net.minecraftforge.client.loading.ClientModLoader.lambda$finishModLoading$7(ClientModLoader.java:130) ~[forge-1.19-41.0.62-universal.jar%23160!/:?] {re:classloading,pl:runtimedistcleaner:A}
    at net.minecraft.server.packs.resources.SimpleReloadInstance.m_143940_(SimpleReloadInstance.java:69) ~[client-1.19-20220607.102129-srg.jar%23155!/:?] {re:classloading}
    at net.minecraft.util.thread.BlockableEventLoop.m_6367_(BlockableEventLoop.java:198) ~[client-1.19-20220607.102129-srg.jar%23155!/:?] {re:mixin,pl:accesstransformer:B,xf:OptiFine:default,re:computing_frames,pl:accesstransformer:B,xf:OptiFine:default,re:classloading,pl:accesstransformer:B,xf:OptiFine:default}
    at net.minecraft.util.thread.ReentrantBlockableEventLoop.m_6367_(ReentrantBlockableEventLoop.java:23) ~[client-1.19-20220607.102129-srg.jar%23155!/:?] {re:mixin,re:computing_frames,re:classloading}
    at net.minecraft.util.thread.BlockableEventLoop.m_7245_(BlockableEventLoop.java:163) ~[client-1.19-20220607.102129-srg.jar%23155!/:?] {re:mixin,pl:accesstransformer:B,xf:OptiFine:default,re:computing_frames,pl:accesstransformer:B,xf:OptiFine:default,re:classloading,pl:accesstransformer:B,xf:OptiFine:default}
    at net.minecraft.util.thread.BlockableEventLoop.m_18699_(BlockableEventLoop.java:140) ~[client-1.19-20220607.102129-srg.jar%23155!/:?] {re:mixin,pl:accesstransformer:B,xf:OptiFine:default,re:computing_frames,pl:accesstransformer:B,xf:OptiFine:default,re:classloading,pl:accesstransformer:B,xf:OptiFine:default}
    at net.minecraft.client.Minecraft.m_91383_(Minecraft.java:1028) ~[client-1.19-20220607.102129-srg.jar%23155!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:byg_forge.mixins.json:client.MixinMinecraft,pl:mixin:A,pl:runtimedistcleaner:A}
    at net.minecraft.client.Minecraft.m_91374_(Minecraft.java:660) ~[client-1.19-20220607.102129-srg.jar%23155!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:byg_forge.mixins.json:client.MixinMinecraft,pl:mixin:A,pl:runtimedistcleaner:A}
    at net.minecraft.client.main.Main.main(Main.java:205) ~[client-1.19-20220607.102129-srg.jar%23155!/:?] {re:classloading,pl:runtimedistcleaner:A}
    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.CommonClientLaunchHandler.lambda$launchService$0(CommonClientLaunchHandler.java:27) ~[fmlloader-1.19-41.0.62.jar%2393!/:?] {}
    at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:30) [modlauncher-10.0.1.jar%2381!/:?] {}
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) [modlauncher-10.0.1.jar%2381!/:?] {}
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) [modlauncher-10.0.1.jar%2381!/:?] {}
    at cpw.mods.modlauncher.Launcher.run(Launcher.java:106) [modlauncher-10.0.1.jar%2381!/:?] {}
    at cpw.mods.modlauncher.Launcher.main(Launcher.java:77) [modlauncher-10.0.1.jar%2381!/:?] {}
    at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) [modlauncher-10.0.1.jar%2381!/:?] {}
    at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) [modlauncher-10.0.1.jar%2381!/:?] {}
    at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:141) [bootstraplauncher-1.1.1.jar:?] {}


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

-- Head --
Thread: Render thread
Stacktrace:
    at net.minecraftforge.client.loading.ClientModLoader.lambda$finishModLoading$7(ClientModLoader.java:130) ~[forge-1.19-41.0.62-universal.jar%23160!/:?] {re:classloading,pl:runtimedistcleaner:A}
    at net.minecraft.server.packs.resources.SimpleReloadInstance.m_143940_(SimpleReloadInstance.java:69) ~[client-1.19-20220607.102129-srg.jar%23155!/:?] {re:classloading}
    at net.minecraft.util.thread.BlockableEventLoop.m_6367_(BlockableEventLoop.java:198) ~[client-1.19-20220607.102129-srg.jar%23155!/:?] {re:mixin,pl:accesstransformer:B,xf:OptiFine:default,re:computing_frames,pl:accesstransformer:B,xf:OptiFine:default,re:classloading,pl:accesstransformer:B,xf:OptiFine:default}
    at net.minecraft.util.thread.ReentrantBlockableEventLoop.m_6367_(ReentrantBlockableEventLoop.java:23) ~[client-1.19-20220607.102129-srg.jar%23155!/:?] {re:mixin,re:computing_frames,re:classloading}
    at net.minecraft.util.thread.BlockableEventLoop.m_7245_(BlockableEventLoop.java:163) ~[client-1.19-20220607.102129-srg.jar%23155!/:?] {re:mixin,pl:accesstransformer:B,xf:OptiFine:default,re:computing_frames,pl:accesstransformer:B,xf:OptiFine:default,re:classloading,pl:accesstransformer:B,xf:OptiFine:default}
-- Last reload --
Details:
    Reload number: 1
    Reload reason: initial
    Finished: No
    Packs: Default, Mod Resources
Stacktrace:
    at net.minecraft.client.ResourceLoadStateTracker.m_168562_(ResourceLoadStateTracker.java:49) ~[client-1.19-20220607.102129-srg.jar%23155!/:?] {re:classloading}
    at net.minecraft.client.Minecraft.m_91354_(Minecraft.java:2175) ~[client-1.19-20220607.102129-srg.jar%23155!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:byg_forge.mixins.json:client.MixinMinecraft,pl:mixin:A,pl:runtimedistcleaner:A}
    at net.minecraft.client.Minecraft.m_91374_(Minecraft.java:682) ~[client-1.19-20220607.102129-srg.jar%23155!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:byg_forge.mixins.json:client.MixinMinecraft,pl:mixin:A,pl:runtimedistcleaner:A}
    at net.minecraft.client.main.Main.main(Main.java:205) ~[client-1.19-20220607.102129-srg.jar%23155!/:?] {re:classloading,pl:runtimedistcleaner:A}
    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.CommonClientLaunchHandler.lambda$launchService$0(CommonClientLaunchHandler.java:27) ~[fmlloader-1.19-41.0.62.jar%2393!/:?] {}
    at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:30) [modlauncher-10.0.1.jar%2381!/:?] {}
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) [modlauncher-10.0.1.jar%2381!/:?] {}
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) [modlauncher-10.0.1.jar%2381!/:?] {}
    at cpw.mods.modlauncher.Launcher.run(Launcher.java:106) [modlauncher-10.0.1.jar%2381!/:?] {}
    at cpw.mods.modlauncher.Launcher.main(Launcher.java:77) [modlauncher-10.0.1.jar%2381!/:?] {}
    at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) [modlauncher-10.0.1.jar%2381!/:?] {}
    at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) [modlauncher-10.0.1.jar%2381!/:?] {}
    at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:141) [bootstraplauncher-1.1.1.jar:?] {}


-- System Details --
Details:
    Minecraft Version: 1.19
    Minecraft Version ID: 1.19
    Operating System: Windows 10 (amd64) version 10.0
    Java Version: 17.0.3, Microsoft
    Java VM Version: OpenJDK 64-Bit Server VM (mixed mode), Microsoft
    Memory: 527232232 bytes (502 MiB) / 1476395008 bytes (1408 MiB) up to 2147483648 bytes (2048 MiB)
    CPUs: 4
    Processor Vendor: GenuineIntel
    Processor Name: Intel(R) Core(TM) i5-7400 CPU @ 3.00GHz
    Identifier: Intel64 Family 6 Model 158 Stepping 9
    Microarchitecture: Kaby Lake
    Frequency (GHz): 3,00
    Number of physical packages: 1
    Number of physical CPUs: 4
    Number of logical CPUs: 4
    Graphics card #0 name: NVIDIA GeForce GTX 1060 6GB
    Graphics card #0 vendor: NVIDIA (0x10de)
    Graphics card #0 VRAM (MB): 4095,00
    Graphics card #0 deviceId: 0x1c03
    Graphics card #0 versionInfo: DriverVersion=31.0.15.1659
    Memory slot #0 capacity (MB): 8192,00
    Memory slot #0 clockSpeed (GHz): 2,13
    Memory slot #0 type: DDR4
    Virtual memory max (MB): 17732,30
    Virtual memory used (MB): 9129,66
    Swap memory total (MB): 9600,00
    Swap memory used (MB): 338,55
    JVM Flags: 9 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xss1M -Xmx2G -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M
    Launched Version: 1.19-forge-41.0.62
    Backend library: LWJGL version 3.3.1 build 7
    Backend API: NVIDIA GeForce GTX 1060 6GB/PCIe/SSE2 GL version 3.2.0 NVIDIA 516.59, NVIDIA Corporation
    Window size: 854x480
    GL Caps: Using framebuffer using OpenGL 3.2
    GL debug messages: 
    Using VBOs: Yes
    Is Modded: Definitely; Client brand changed to 'forge'
    Type: Client (map_client.txt)
    Graphics mode: fancy
    Resource Packs: 
    Current Language: English (US)
    CPU: 4x Intel(R) Core(TM) i5-7400 CPU @ 3.00GHz
    OptiFine Version: OptiFine_1.19_HD_U_H8_pre1
    OptiFine Build: 20220629-123124
    Render Distance Chunks: 8
    Mipmaps: 4
    Anisotropic Filtering: 1
    Antialiasing: 0
    Multitexture: false
    Shaders: null
    OpenGlVersion: 3.2.0 NVIDIA 516.59
    OpenGlRenderer: NVIDIA GeForce GTX 1060 6GB/PCIe/SSE2
    OpenGlVendor: NVIDIA Corporation
    CpuCount: 4
    ModLauncher: 10.0.1+10.0.1+main.e9521dc3
    ModLauncher launch target: forgeclient
    ModLauncher naming: srg
    ModLauncher services: 
         mixin PLUGINSERVICE 
         eventbus PLUGINSERVICE 
         slf4jfixer PLUGINSERVICE 
         object_holder_definalize PLUGINSERVICE 
         runtime_enum_extender PLUGINSERVICE 
         capability_token_subclass PLUGINSERVICE 
         accesstransformer PLUGINSERVICE 
         runtimedistcleaner PLUGINSERVICE 
         mixin TRANSFORMATIONSERVICE 
         OptiFine TRANSFORMATIONSERVICE 
         fml TRANSFORMATIONSERVICE 
    FML Language Providers: 
        minecraft@1.0
        lowcodefml@null
        javafml@null
    Mod List: 
        client-1.19-20220607.102129-srg.jar               |Minecraft                     |minecraft                     |1.19                |DONE      |Manifest: a1:d4:5e:04:4f:d3:d6:e0:7b:37:97:cf:77:b0:de:ad:4a:47:ce:8c:96:49:5f:0a:cf:8c:ae:b2:6d:4b:8a:3f
        SereneSeasons-1.19-8.0.0.17.jar                   |Serene Seasons                |sereneseasons                 |0.0NONE             |DONE      |Manifest: NOSIGNATURE
        Oh_The_Biomes_You'll_Go-forge-1.19-2.0.0.5.jar    |Oh The Biomes You'll Go       |byg                           |2.0.0.5             |DONE      |Manifest: NOSIGNATURE
        FallingTree-1.19-3.6.3.jar                        |FallingTree                   |fallingtree                   |3.6.3               |DONE      |Manifest: 3c:8e:df:6c:df:a6:2a:9f:af:64:ea:04:9a:cf:65:92:3b:54:93:0e:96:50:b4:52:e1:13:42:18:2b:ae:40:29
        TerraBlender-forge-1.19-2.0.0.117.jar             |TerraBlender                  |terrablender                  |2.0.0.117           |DONE      |Manifest: NOSIGNATURE
        forge-1.19-41.0.62-universal.jar                  |Forge                         |forge                         |41.0.62             |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
        BiomesOPlenty-1.19-17.0.0.138.jar                 |Biomes O' Plenty              |biomesoplenty                 |0.0NONE             |DONE      |Manifest: NOSIGNATURE
        Xaeros_Minimap_22.11.1_Forge_1.19.jar             |Xaero's Minimap               |xaerominimap                  |22.11.1             |DONE      |Manifest: NOSIGNATURE
        ironfurnaces-1.19-3.4.0.jar                       |Iron Furnaces                 |ironfurnaces                  |3.4.0               |DONE      |Manifest: NOSIGNATURE
        advancednetherite-1.13.2-1.19.jar                 |Advanced Netherite            |advancednetherite             |1.13.2              |DONE      |Manifest: NOSIGNATURE
        XaerosWorldMap_1.25.0_Forge_1.19.jar              |Xaero's World Map             |xaeroworldmap                 |1.25.0              |DONE      |Manifest: NOSIGNATURE
        ironchest-1.19-14.0.2.jar                         |Iron Chests                   |ironchest                     |1.19-14.0.2         |DONE      |Manifest: NOSIGNATURE
        jei-1.19-forge-11.0.0.206.jar                     |Just Enough Items             |jei                           |11.0.0.206          |DONE      |Manifest: NOSIGNATURE
    Crash Report UUID: 981712d0-4262-4920-ac05-df4ea40f603a
    FML: 41.0
    Forge: net.minecraftforge:41.0.62

Posted

That looks weird. That method was added yesterday

https://github.com/MinecraftForge/MinecraftForge/commit/bb03b1a7d19f03d79b2236716b9b4621cf344b87

and it is in the version of forge 41.0.62 that I have.

I was able to run this version (both client and server) with a mod a few hours ago.

How did you install forge? Try redownloading and reinstalling it.

You can also try removing optifine, I don't know why that would fix this problem, but optifine does some broken things. 🙂

Use the previous version 41.0.61 if all else fails. Until maybe somebody else can think of what would cause this.

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.

Posted

Try removing Optifine

This is my Forum Signature, I am currently attempting to transform it into a small guide for fixing easier issues using spoiler blocks to keep things tidy.

 

As the most common issue I feel I should put this outside the main bulk:

The only official source for Forge is https://files.minecraftforge.net, and the only site I trust for getting mods is CurseForge.

If you use any site other than these, please take a look at the StopModReposts project and install their browser extension, I would also advise running a virus scan.

 

For players asking for assistance with Forge please expand the spoiler below and read the appropriate section(s) in its/their entirety.

  Reveal hidden contents

 

Posted

I have the same problem, as soon as i put the optifine preview in the mods folder (forge) it get that error log

forge and other mods work just fine

Posted

https://optifine.net/changelog?f=preview_OptiFine_1.19_HD_U_H8_pre1.jar

It says this preview is not compatible with forge in the change notes.

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.

  • 10 months later...
Posted
  Quote

java.lang.NoSuchMethodError: 'void net.minecraft.core.BlockPos.<init>(double, double, double)'
    at com.yungnickyoung.minecraft.betterdungeons.world.structure.spider_dungeon.piece.SpiderDungeonBigTunnelPiece.m_214092_(SpiderDungeonBigTunnelPiece.java:161) ~[YungsBetterDungeons-1.19.3-Forge-3.3.0.jar%23221!/:1.19.3-Forge-3.3.0] {re:classloading}

Expand  

Always check the mod you download (1.19.3) is compatible with the version of minecraft you are using (1.19.4)

https://www.curseforge.com/minecraft/mc-mods/yungs-better-dungeons/files.

 

And don't post on other people's threads unless you helping the original poster.

START YOUR OWN THREAD.

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.

  • 4 months later...
Posted

Hello! I'm not a programmer or any kind of expert on the subject. Just a regular player who wants to enjoy a peaceful Minecraft experience. I read some tips here and realized that the issue is with Optifine.

Ever since they released that "CurseForge" application for quick and easy mod downloads, I've stopped using Optifine. I've been using this app for a while now, but even while using it, I still missed Optifine, which allowed me to enable shaders and that feature where torches automatically light up. So, after my annual PC cleanup, I decided to set aside that application and go back to manually downloading my mods, like in the old days. I followed my usual routine: downloaded Forge, installed it, created a "mods" folder, and added Optifine. Then, I entered the launcher. Everything seemed fine until I tried to enter the world. After loading, it would just freeze and display the same error message as the one in the post.

I still haven't found a solution to make them work together again; I guess I'll have to go back to using the "CurseForge" application :(

Well, I think after all this I can declare the official death of optifine.

If anyone knows of a miracle solution, I'm open. I hope this site sends notifications haha

 

  • 2 months later...
Posted

Buenas a todos ..tengo este prblema

The game crashed whilst unexpected error Error: java.lang.ClassCastException: class net.p3pp3rf1y.sophisticatedbackpacks.compat.curios.BackpackCurioRenderer cannot be cast to class artifacts.forge.platform.ForgePlatformHelper$ArtifactCurioRenderer (net.p3pp3rf1y.sophisticatedbackpacks.compat.curios.BackpackCurioRenderer is in module sophisticatedbackpacks@3.18.65.935 of loader 'TRANSFORMER' @123307c4; artifacts.forge.platform.ForgePlatformHelper$ArtifactCurioRenderer is in module artifacts@9.0.0 of loader 'TRANSFORMER' @123307c4)

 

alguien sabe como solucionarlo

Guest
This topic is now closed to further replies.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Hoffman Law Recovery helped me recovered my lost funds
    • 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)💔
  • Topics

×
×
  • Create New...

Important Information

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