Jump to content

The game crashed whilst exception in server tick loop Error: org.spongepowered.asm.mixin.transformer.throwables.MixinTransformer


Recommended Posts

Posted

Whenever I try to load into an existing world or starting a new one, i get this error. I have never used this 'Sponge' launcher (or whatever it is), by the way. 

 

---- Minecraft Crash Report ----
// Who set us up the TNT?

Time: 1/31/22 4:44 PM
Description: Exception in server tick loop

org.spongepowered.asm.mixin.transformer.throwables.MixinTransformerError: An unexpected critical error was encountered
    at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:392) ~[mixin-0.8.4.jar:0.8.4+Jenkins-b308.git-2accda5000f7602229606b39437565542cc6fba4] {}
    at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClass(MixinTransformer.java:250) ~[mixin-0.8.4.jar:0.8.4+Jenkins-b308.git-2accda5000f7602229606b39437565542cc6fba4] {}
    at org.spongepowered.asm.service.modlauncher.MixinTransformationHandler.processClass(MixinTransformationHandler.java:131) ~[mixin-0.8.4.jar:0.8.4+Jenkins-b308.git-2accda5000f7602229606b39437565542cc6fba4] {}
    at org.spongepowered.asm.launch.MixinLaunchPluginLegacy.processClass(MixinLaunchPluginLegacy.java:131) ~[mixin-0.8.4.jar:0.8.4+Jenkins-b308.git-2accda5000f7602229606b39437565542cc6fba4] {}
    at cpw.mods.modlauncher.serviceapi.ILaunchPluginService.processClassWithFlags(ILaunchPluginService.java:154) ~[modlauncher-8.0.9.jar:8.0.9+86+master.3cf110c] {}
    at cpw.mods.modlauncher.LaunchPluginHandler.offerClassNodeToPlugins(LaunchPluginHandler.java:85) ~[modlauncher-8.0.9.jar:?] {}
    at cpw.mods.modlauncher.ClassTransformer.transform(ClassTransformer.java:120) ~[modlauncher-8.0.9.jar:?] {}
    at cpw.mods.modlauncher.TransformingClassLoader$DelegatedClassLoader.findClass(TransformingClassLoader.java:265) ~[modlauncher-8.0.9.jar:?] {}
    at cpw.mods.modlauncher.TransformingClassLoader.loadClass(TransformingClassLoader.java:136) ~[modlauncher-8.0.9.jar:?] {re:classloading}
    at cpw.mods.modlauncher.TransformingClassLoader.loadClass(TransformingClassLoader.java:98) ~[modlauncher-8.0.9.jar:?] {re:classloading}
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_51] {}
    at net.minecraft.entity.player.PlayerEntity.<init>(PlayerEntity.java:127) ~[?:?] {re:mixin,pl:accesstransformer:B,xf:fml:xaeroworldmap:xaero_wm_playerentity_iswearing,xf:fml:xaerominimap:xaero_playerentity_iswearing,re:computing_frames,pl:accesstransformer:B,xf:fml:xaeroworldmap:xaero_wm_playerentity_iswearing,xf:fml:xaerominimap:xaero_playerentity_iswearing,re:classloading,pl:accesstransformer:B,xf:fml:xaeroworldmap:xaero_wm_playerentity_iswearing,xf:fml:xaerominimap:xaero_playerentity_iswearing,pl:mixin:APP:unionlib.mixins.json:PlayerEntityMixin,pl:mixin:APP:morph.mixins.json:PlayerEntityMixin,pl:mixin:APP:toughasnails.mixins.json:PlayerEntityMixin,pl:mixin:APP:survive.mixins.json:PlayerEntityMixin,pl:mixin:A}
    at net.minecraft.entity.player.ServerPlayerEntity.<init>(ServerPlayerEntity.java:179) ~[?:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B}
    at net.minecraft.server.management.PlayerList.func_148545_a(PlayerList.java:407) ~[?:?] {re:mixin,xf:fml:xaeroworldmap:xaero_wm_playerlist_sendworldinfo,xf:fml:xaerominimap:xaero_playerlist_sendworldinfo,re:classloading,xf:fml:xaeroworldmap:xaero_wm_playerlist_sendworldinfo,xf:fml:xaerominimap:xaero_playerlist_sendworldinfo,pl:mixin:APP:cgm.mixins.json:common.PlayerListMixin,pl:mixin:A}
    at net.minecraft.network.login.ServerLoginNetHandler.func_147326_c(ServerLoginNetHandler.java:118) ~[?:?] {re:classloading}
    at net.minecraft.network.login.ServerLoginNetHandler.func_73660_a(ServerLoginNetHandler.java:65) ~[?:?] {re:classloading}
    at net.minecraft.network.NetworkManager.func_74428_b(NetworkManager.java:222) ~[?:?] {re:classloading}
    at net.minecraft.network.NetworkSystem.func_151269_c(NetworkSystem.java:134) ~[?:?] {re:classloading}
    at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:865) ~[?:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B}
    at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:787) ~[?:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B}
    at net.minecraft.server.integrated.IntegratedServer.func_71217_p(IntegratedServer.java:78) ~[?:?] {re:classloading,pl:runtimedistcleaner:A}
    at net.minecraft.server.MinecraftServer.func_240802_v_(MinecraftServer.java:642) [?:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B}
    at net.minecraft.server.MinecraftServer.func_240783_a_(MinecraftServer.java:232) [?:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B}
    at net.minecraft.server.MinecraftServer$$Lambda$9728/929705769.run(Unknown Source) [?:?] {}
    at java.lang.Thread.run(Thread.java:745) [?:1.8.0_51] {}
Caused by: org.spongepowered.asm.mixin.throwables.MixinApplyError: Mixin [survive.mixins.json:FoodStatsMixin] from phase [DEFAULT] in config [survive.mixins.json] FAILED during APPLY
    at org.spongepowered.asm.mixin.transformer.MixinProcessor.handleMixinError(MixinProcessor.java:636) ~[mixin-0.8.4.jar:0.8.4+Jenkins-b308.git-2accda5000f7602229606b39437565542cc6fba4] {}
    at org.spongepowered.asm.mixin.transformer.MixinProcessor.handleMixinApplyError(MixinProcessor.java:588) ~[mixin-0.8.4.jar:0.8.4+Jenkins-b308.git-2accda5000f7602229606b39437565542cc6fba4] {}
    at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:379) ~[mixin-0.8.4.jar:0.8.4+Jenkins-b308.git-2accda5000f7602229606b39437565542cc6fba4] {}
    ... 24 more
Caused by: org.spongepowered.asm.mixin.injection.throwables.InvalidInjectionException: @At("INVOKE") on net/minecraft/util/FoodStats::nutritionHeal with priority 1000 cannot inject into net/minecraft/util/FoodStats::func_75118_a(Lnet/minecraft/entity/player/PlayerEntity;)V merged by toughasnails.mixin.FoodStatsMixin with priority 1000 [PREINJECT Applicator Phase -> survive.mixins.json:FoodStatsMixin -> Prepare Injections ->  -> redirect$zem000$nutritionHeal(Lnet/minecraft/entity/player/PlayerEntity;F)V -> Prepare]
    at org.spongepowered.asm.mixin.injection.code.Injector.findTargetNodes(Injector.java:305) ~[mixin-0.8.4.jar:0.8.4+Jenkins-b308.git-2accda5000f7602229606b39437565542cc6fba4] {}
    at org.spongepowered.asm.mixin.injection.code.Injector.find(Injector.java:240) ~[mixin-0.8.4.jar:0.8.4+Jenkins-b308.git-2accda5000f7602229606b39437565542cc6fba4] {}
    at org.spongepowered.asm.mixin.injection.struct.InjectionInfo.prepare(InjectionInfo.java:421) ~[mixin-0.8.4.jar:0.8.4+Jenkins-b308.git-2accda5000f7602229606b39437565542cc6fba4] {}
    at org.spongepowered.asm.mixin.transformer.MixinTargetContext.prepareInjections(MixinTargetContext.java:1319) ~[mixin-0.8.4.jar:0.8.4+Jenkins-b308.git-2accda5000f7602229606b39437565542cc6fba4] {}
    at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.prepareInjections(MixinApplicatorStandard.java:1042) ~[mixin-0.8.4.jar:0.8.4+Jenkins-b308.git-2accda5000f7602229606b39437565542cc6fba4] {}
    at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.applyMixin(MixinApplicatorStandard.java:393) ~[mixin-0.8.4.jar:0.8.4+Jenkins-b308.git-2accda5000f7602229606b39437565542cc6fba4] {}
    at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.apply(MixinApplicatorStandard.java:325) ~[mixin-0.8.4.jar:0.8.4+Jenkins-b308.git-2accda5000f7602229606b39437565542cc6fba4] {}
    at org.spongepowered.asm.mixin.transformer.TargetClassContext.apply(TargetClassContext.java:383) ~[mixin-0.8.4.jar:0.8.4+Jenkins-b308.git-2accda5000f7602229606b39437565542cc6fba4] {}
    at org.spongepowered.asm.mixin.transformer.TargetClassContext.applyMixins(TargetClassContext.java:365) ~[mixin-0.8.4.jar:0.8.4+Jenkins-b308.git-2accda5000f7602229606b39437565542cc6fba4] {}
    at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:363) ~[mixin-0.8.4.jar:0.8.4+Jenkins-b308.git-2accda5000f7602229606b39437565542cc6fba4] {}
    ... 24 more


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

-- System Details --
Details:
    Minecraft Version: 1.16.5
    Minecraft Version ID: 1.16.5
    Operating System: Windows 10 (amd64) version 10.0
    Java Version: 1.8.0_51, Oracle Corporation
    Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
    Memory: 911183896 bytes (868 MB) / 2147483648 bytes (2048 MB) up to 2147483648 bytes (2048 MB)
    CPUs: 8
    JVM Flags: 10 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xss1M -XX:+IgnoreUnrecognizedVMOptions -Xmx2G -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M
    ModLauncher: 8.0.9+86+master.3cf110c
    ModLauncher launch target: fmlclient
    ModLauncher naming: srg
    ModLauncher services: 
        /mixin-0.8.4.jar mixin PLUGINSERVICE 
        /eventbus-4.0.0.jar eventbus PLUGINSERVICE 
        /forge-1.16.5-36.2.23.jar object_holder_definalize PLUGINSERVICE 
        /forge-1.16.5-36.2.23.jar runtime_enum_extender PLUGINSERVICE 
        /accesstransformers-3.0.1.jar accesstransformer PLUGINSERVICE 
        /forge-1.16.5-36.2.23.jar capability_inject_definalize PLUGINSERVICE 
        /forge-1.16.5-36.2.23.jar runtimedistcleaner PLUGINSERVICE 
        /mixin-0.8.4.jar mixin TRANSFORMATIONSERVICE 
        /forge-1.16.5-36.2.23.jar fml TRANSFORMATIONSERVICE 
    FML: 36.2
    Forge: net.minecraftforge:36.2.23
    FML Language Providers: 
        [email protected]
        minecraft@1
    Mod List: 
        doubledoors_1.16.5-3.1.jar                        |Double Doors                  |doubledoors                   |3.1                 |DONE      |Manifest: NOSIGNATURE
        UnionLib-1.16.5-3.3.7.jar                         |UnionLib                      |unionlib                      |3.3.7               |DONE      |Manifest: NOSIGNATURE
        DisenchantmentEditTable-1.16.5-1.0.3.jar          |Enchantment Edit Table        |editenchanting                |1.0.3               |DONE      |Manifest: NOSIGNATURE
        Hats-1.16.5-10.3.3.jar                            |Hats                          |hats                          |10.3.3              |DONE      |Manifest: NOSIGNATURE
        cgm-1.1.0-1.16.5.jar                              |MrCrayfish's Gun Mod          |cgm                           |1.1.0               |DONE      |Manifest: NOSIGNATURE
        ProjectE-1.16.5-PE1.0.1B.jar                      |ProjectE                      |projecte                      |PE1.0.1B            |DONE      |Manifest: NOSIGNATURE
        torohealth-1.16.4-forge-4.jar                     |ToroHealth                    |torohealth                    |NONE                |DONE      |Manifest: NOSIGNATURE
        MoGuns-1.4-1.16.5.jar                             |Mo' Guns                      |moguns                        |1.4                 |DONE      |Manifest: NOSIGNATURE
        XaerosWorldMap_1.20.0_Forge_1.16.5.jar            |Xaero's World Map             |xaeroworldmap                 |1.20.0              |DONE      |Manifest: NOSIGNATURE
        JRFTL+[1.16.5]-1.2.jar                            |JRFTL                         |jrftl                         |1.2                 |DONE      |Manifest: NOSIGNATURE
        TravelersBackpack-1.16.5-5.4.6.jar                |Traveler's Backpack           |travelersbackpack             |5.4.6               |DONE      |Manifest: NOSIGNATURE
        SereneSeasons-1.16.5-4.0.1.123-universal.jar      |Serene Seasons                |sereneseasons                 |1.16.5-4.0.1.123    |DONE      |Manifest: NOSIGNATURE
        zombieawareness-1.16.5-1.12.jar                   |Zombie Awareness              |zombieawareness               |1.16.5-1.12         |DONE      |Manifest: NOSIGNATURE
        projectex-1605.2.0-build.3.jar                    |ProjectEX                     |projectex                     |1605.2.0-build.3    |DONE      |Manifest: NOSIGNATURE
        forge-branders-spawnermod-1.16.5-1.8.14.jar       |Enhanced Mob Spawners         |spawnermod                    |1.8.14              |DONE      |Manifest: NOSIGNATURE
        ChanceCubes-1.16.5-5.0.2.433.jar                  |Chance Cubes                  |chancecubes                   |1.16.5-5.0.2.433    |DONE      |Manifest: NOSIGNATURE
        walljump-forge-1.16.4-1.3.7.jar                   |Wall-Jump!                    |walljump                      |1.16.4-1.3.7        |DONE      |Manifest: NOSIGNATURE
        inventorypets-1.16.5-2.0.15.jar                   |Inventory Pets                |inventorypets                 |2.0.15              |DONE      |Manifest: NOSIGNATURE
        iChunUtil-1.16.5-10.5.1.jar                       |iChunUtil                     |ichunutil                     |10.5.1              |DONE      |Manifest: NOSIGNATURE
        forge-1.16.5-36.2.23-universal.jar                |Forge                         |forge                         |36.2.23             |DONE      |Manifest: 22:af:21:d8:19:82:7f:93:94:fe:2b:ac:b7:e4:41:57:68:39:87:b1:a7:5c:c6:44:f9:25:74:21:14:f5:0d:90
        Morph-1.16.5-10.1.0.jar                           |Morph                         |morph                         |10.1.0              |DONE      |Manifest: NOSIGNATURE
        DynamicSurroundings-1.16.5-4.0.5.0.jar            |§3Dynamic Surroundings        |dsurround                     |4.0.5.0             |DONE      |Manifest: NOSIGNATURE
        ironchest-1.16.5-11.2.21.jar                      |Iron Chests                   |ironchest                     |1.16.5-11.2.21      |DONE      |Manifest: NOSIGNATURE
        corpse-1.16.5-1.0.6.jar                           |Corpse                        |corpse                        |1.16.5-1.0.6        |DONE      |Manifest: NOSIGNATURE
        NoFog-1.2.0_1.16.5-forge.jar                      |No Fog                        |no_fog                        |1.2.0+1.16.5-forge  |DONE      |Manifest: NOSIGNATURE
        forge-1.16.5-36.2.23-client.jar                   |Minecraft                     |minecraft                     |1.16.5              |DONE      |Manifest: NOSIGNATURE
        ItemPhysicLite_v1.4.8_mc1.16.5.jar                |ItemPhysic Lite               |itemphysiclite                |1.4.0               |DONE      |Manifest: NOSIGNATURE
        MouseTweaks-2.14-mc1.16.2.jar                     |Mouse Tweaks                  |mousetweaks                   |2.14                |DONE      |Manifest: NOSIGNATURE
        Dimensional_Ores-1.16.5-1.0.0.9.jar               |DimensionalOres               |dimore                        |1.16.5-1.0.0.9      |DONE      |Manifest: NOSIGNATURE
        projectvibrantjourneys-1.16.5-3.2.11.jar          |Project: Vibrant Journeys     |projectvibrantjourneys        |1.16.5-3.2.11       |DONE      |Manifest: NOSIGNATURE
        Jade-1.16.4-2.8.1.jar                             |Jade                          |jade                          |2.8.1               |DONE      |Manifest: NOSIGNATURE
        ironfurnaces-1.16.5-2.7.7.jar                     |Iron Furnaces                 |ironfurnaces                  |2.7.7               |DONE      |Manifest: NOSIGNATURE
        ChunkAnimator-1.16.5-1.2.4.jar                    |Chunk Animator                |chunkanimator                 |1.16.5-1.2.4        |DONE      |Manifest: NOSIGNATURE
        Worldswithores.jar                                |Worlds with ores              |worlds_with_ores              |1.0.5               |DONE      |Manifest: NOSIGNATURE
        zombienation-1.16.5-1.0.6.0.jar                   |Zombienation                  |zombienation                  |1.16.5-1.0.6.0      |DONE      |Manifest: NOSIGNATURE
        EyesInTheDarkness-1.16.5-1.0.6.jar                |Eyes in the Darkness          |eyesinthedarkness             |1.0.6               |DONE      |Manifest: NOSIGNATURE
        RoughlyEnoughItems-6.3.392.jar                    |Roughly Enough Items (REI)    |roughlyenoughitems            |6.3.392             |DONE      |Manifest: NOSIGNATURE
        invtweaks-1.16.4-1.0.1.jar                        |Inventory Tweaks Renewed      |invtweaks                     |1.16.4-1.0.1        |DONE      |Manifest: NOSIGNATURE
        mostructures-forge-1.2.0-1.16.5.jar               |Mo' Structures                |mostructures                  |1.2.0-1.16.5        |DONE      |Manifest: NOSIGNATURE
        SpartanShields-1.16.5-2.1.2.jar                   |Spartan Shields               |spartanshields                |2.1.2               |DONE      |Manifest: NOSIGNATURE
        Xaeros_Minimap_22.1.0_Forge_1.16.5.jar            |Xaero's Minimap               |xaerominimap                  |22.1.0              |DONE      |Manifest: NOSIGNATURE
        collective-1.16.5-3.8.jar                         |Collective                    |collective                    |3.8                 |DONE      |Manifest: NOSIGNATURE
        AutoRegLib-1.6-49.jar                             |AutoRegLib                    |autoreglib                    |1.6-49              |DONE      |Manifest: NOSIGNATURE
        Quark-r2.4-321.jar                                |Quark                         |quark                         |r2.4-321            |DONE      |Manifest: NOSIGNATURE
        notreepunching-forge-1.16.5-4.3.0.jar             |No Tree Punching              |notreepunching                |4.3.0               |DONE      |Manifest: NOSIGNATURE
        OreExcavation-1.8.157.jar                         |Ore Excavation                |oreexcavation                 |1.8.157             |DONE      |Manifest: e7:68:1c:0d:b9:7e:cf:f8:f3:40:9c:84:c5:39:d7:a4:59:78:b0:6b:c3:fd:b7:4f:69:18:a3:88:e3:76:8c:3f
        ToughAsNails-1.16.5-4.1.0.9-universal.jar         |Tough As Nails                |toughasnails                  |1.16.5-4.0.1.8      |DONE      |Manifest: NOSIGNATURE
        elevatorid-1.16.5-1.7.13.jar                      |Elevator Mod                  |elevatorid                    |1.16.5-1.7.13       |DONE      |Manifest: NOSIGNATURE
        Survive-1.16.5-3.4.6.jar                          |Survive                       |survive                       |1.16.5-3.4.6        |DONE      |Manifest: NOSIGNATURE
        obfuscate-0.6.2-1.16.3.jar                        |Obfuscate                     |obfuscate                     |0.6.2               |DONE      |Manifest: e1:59:1a:56:ec:97:b3:d0:b3:4b:25:06:1f:83:b0:f4:fd:0c:24:e3:6d:ea:94:b1:9f:22:b0:38:13:60:88:ea
        CoroUtil-1.16.5-1.2.37.jar                        |CoroUtil                      |coroutil                      |1.16.5-1.2.37       |DONE      |Manifest: NOSIGNATURE
        SpartanWeaponry-1.16.4-2.1.0-beta-4.jar           |Spartan Weaponry              |spartanweaponry               |2.1.0 beta 4        |DONE      |Manifest: NOSIGNATURE
        architectury-1.28.48.jar                          |Architectury                  |architectury                  |1.28.48             |DONE      |Manifest: NOSIGNATURE
        appleskin-forge-mc1.16.x-2.2.0.jar                |AppleSkin                     |appleskin                     |mc1.16.4-2.2.0      |DONE      |Manifest: NOSIGNATURE
        EasyPaxel(1.16.4)+-+1.0.10.jar                    |Easy Paxel                    |easypaxelmod                  |1.16.4-1.0.10       |DONE      |Manifest: NOSIGNATURE
        cloth-config-4.13.49-forge.jar                    |Cloth Config v4 API           |cloth-config                  |4.13.49             |DONE      |Manifest: NOSIGNATURE
        Raccoon+Mod.jar                                   |Raccoon                       |raccoon                       |1.0.0               |DONE      |Manifest: NOSIGNATURE
        Aquaculture-1.16.5-2.1.21.jar                     |Aquaculture 2                 |aquaculture                   |1.16.5-2.1.21       |DONE      |Manifest: NOSIGNATURE
        SoundFilters-0.14_for_1.16.2.jar                  |Sound Filters                 |soundfilters                  |0.14_for_1.16.2     |DONE      |Manifest: NOSIGNATURE
        DynamicTrees-1.16.5-0.10.0-Beta31.jar             |Dynamic Trees                 |dynamictrees                  |1.16.5-0.10.0-Beta31|DONE      |Manifest: NOSIGNATURE
    Crash Report UUID: 4d27bc30-3c55-4588-b86f-70486c55bdc2
    Player Count: 0 / 8; []
    Data Packs: vanilla, mod:doubledoors, mod:unionlib (incompatible), mod:editenchanting, mod:hats, mod:cgm (incompatible), mod:projecte, mod:torohealth, mod:moguns, mod:xaeroworldmap, mod:jrftl (incompatible), mod:travelersbackpack (incompatible), mod:sereneseasons, mod:zombieawareness, mod:projectex, mod:spawnermod (incompatible), mod:chancecubes (incompatible), mod:walljump (incompatible), mod:inventorypets (incompatible), mod:ichunutil, mod:forge, mod:morph, mod:dsurround, mod:ironchest, mod:corpse, mod:no_fog, mod:itemphysiclite, mod:mousetweaks, mod:dimore, mod:projectvibrantjourneys, mod:jade, mod:ironfurnaces, mod:chunkanimator, mod:worlds_with_ores, mod:zombienation, mod:eyesinthedarkness (incompatible), mod:roughlyenoughitems, mod:invtweaks (incompatible), mod:mostructures, mod:spartanshields, mod:xaerominimap, mod:collective, mod:autoreglib (incompatible), mod:quark (incompatible), mod:notreepunching, mod:oreexcavation, mod:toughasnails, mod:elevatorid, mod:survive (incompatible), mod:obfuscate (incompatible), mod:coroutil, mod:spartanweaponry, mod:architectury, mod:appleskin, mod:easypaxelmod (incompatible), mod:cloth-config (incompatible), mod:raccoon, mod:aquaculture (incompatible), mod:soundfilters (incompatible), mod:dynamictrees
    Type: Integrated Server (map_client.txt)
    Is Modded: Definitely; Client brand changed to 'forge'

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

    • I know that this may be a basic question, but I am very new to modding. I am trying to have it so that I can create modified Vanilla loot tables that use a custom enchantment as a condition (i.e. enchantment present = item). However, I am having trouble trying to implement this; the LootItemRandomChanceWithEnchantedBonusCondition constructor needs a Holder<Enchantment> and I am unable to use the getOrThrow() method on the custom enchantment declared in my mod's enchantments class. Here is what I have so far in the GLM:   protected void start(HolderLookup.Provider registries) { HolderLookup.RegistryLookup<Enchantment> registrylookup = registries.lookupOrThrow(Registries.ENCHANTMENT); LootItemRandomChanceWithEnchantedBonusCondition lootItemRandomChanceWithEnchantedBonusCondition = new LootItemRandomChanceWithEnchantedBonusCondition(0.0f, LevelBasedValue.perLevel(0.07f), registrylookup.getOrThrow(*enchantment here*)); this.add("nebu_from_deepslate", new AddItemModifier(new LootItemCondition[]{ LootItemBlockStatePropertyCondition.hasBlockStateProperties(Blocks.DEEPSLATE).build(), LootItemRandomChanceCondition.randomChance(0.25f).build(), lootItemRandomChanceWithEnchantedBonusCondition }, OrichalcumItems.NEBU.get())); }   Inserting Enchantments.[vanilla enchantment here] actually works but trying to declare an enchantment from my custom enchantments class as [mod enchantment class].[custom enchantment] does not work even though they are both a ResourceKey and are registered in Registries.ENCHANTMENT. Basically, how would I go about making it so that a custom enchantment declared as a ResourceKey<Enchantment> of value ResourceKey.create(Registries.ENCHANTMENT, ResourceLocation.fromNamespaceAndPath([modid], [name])), declared in a seperate enchantments class, can be used in the LootItemRandomChanceWithEnchantedBonusCondition constructor as a Holder? I can't use getOrThrow() because there is no level or block entity/entity in the start() method and it is running as datagen. It's driving me nuts.
    • Hi here is an update. I was able to fix the code so my mod does not crash Minecraft. Please understand that I am new to modding but I honestly am having a hard time understanding how anyone can get this to work without having extensive programming and debugging experience as well as searching across the Internet, multiple gen AI bots (claude, grok, openai), and examining source code hidden in the gradle directory and in various github repositories. I guess I am wrong because clearly there are thousands of mods so maybe I am just a newbie. Ok, rant over, here is a step by step summary so others can save the 3 days it took me to figure this out.   1. First, I am using forge 54.1.0 and Minecraft 1.21.4 2. I am creating a mod to add a shotgun to Minecraft 3. After creating the mod and compiling it, I installed the .jar file to the proper directory in Minecraft and used 1.21.4-forge-54.1.0 4. The mod immediately crashed with the error: Caused by: java.lang.NullPointerException: Item id not set 5. Using the stack trace, I determined that the Exception was being thrown from the net.minecraft.world.item.Item.Properties class 6. It seems that there are no javadocs for this class, so I used IntelliJ which was able to provide a decompiled version of the class, which I then examined to see the source of the error. Side question: Are there javadocs? 7. This method, specifically, was the culprit: protected String effectiveDescriptionId() {      return this.descriptionId.get(Objects.requireNonNull(this.id, "Item id not set"));  } 8. Now my quest was to determine how to set this.id. Looking at the same source file, I determined there was another method:  public Item.Properties setId(ResourceKey<Item> pId) {             this.id = pId;             return this;   } 9. So now, I need to figure out how to call setId(). This required working backwards a bit. Starting from the constructor, I stubbed out the variable p which is of type Item.Properties public static final RegistryObject<Item> SHOTGUN = ITEMS.register("shotgun", () -> new ShotgunItem(p)); Rather than putting this all on one line, I split it up for readability like this: private static final Item.Properties p = new Item.Properties().useItemDescriptionPrefix().setId(rk); Here is was the missing function, setId(), which takes a type of ResourceKey<Item>. My next problem is that due to the apparent lack of documentation (I tried searching the docs on this site) I could not determine the full import path to ResourceKey. I did some random searching on the Internet and stumbled across a Github repository which gave two clues: import net.minecraft.resources.ResourceKey; import net.minecraft.resources.ResourceLocation; Then I created the rk variable like this: private static ResourceKey<Item> rk = ResourceKey.create(Registries.ITEM, ResourceLocation.parse("modid:shotgunmod")); And now putting it all together in order: private static ResourceKey<Item> rk = ResourceKey.create(Registries.ITEM, ResourceLocation.parse("modid:shotgunmod")); private static final Item.Properties p = new Item.Properties().useItemDescriptionPrefix().setId(rk); public static final RegistryObject<Item> SHOTGUN = ITEMS.register("shotgun", () -> new ShotgunItem(p)); This compiled and the mod no longer crashes. I still have more to do on it, but hopefully this will save someone hours. I welcome any feedback and if I missed some obvious modding resource or tutorial that has this information. If not, I might suggest we add it somewhere for people trying to write a mod that doesn't crash. Thank you !!!  
    • I will keep adding to this thread with more information in case anyone can help, or at the very least I can keep my troubleshooting organized. I decided to downgrade to 54.1.0 in the hopes that this would fix the issue but it didn't. At least now I am on a "recommended" version. The crash report did confirm my earlier post that the Exception is coming from effectiveDescriptionId(). I'll continue to see if I can find a way to set the ID manually.   Caused by: java.lang.NullPointerException: Item id not set         at java.base/java.util.Objects.requireNonNull(Objects.java:259) ~[?:?]         at TRANSFORMER/[email protected]/net.minecraft.world.item.Item$Properties.effectiveDescriptionId(Item.java:465) ~[forge-1.21.4-54.1.0-client.jar!/:?]         at TRANSFORMER/[email protected]/net.minecraft.world.item.Item.<init>(Item.java:111) ~[forge-1.21.4-54.1.0-client.jar!/:?]         at TRANSFORMER/[email protected]/com.example.shotgunmod.ShotgunItem.<init>(ShotgunItem.java:19) ~[shotgunmod-1.0.0.jar!/:1.0.0]         at TRANSFORMER/[email protected]/com.example.shotgunmod.ModItems.lambda$static$0(ModItems.java:15) ~[shotgunmod-1.0.0.jar!/:1.0.0]         at TRANSFORMER/[email protected]/net.minecraftforge.registries.DeferredRegister$EventDispatcher.lambda$handleEvent      
    • It just randomly stop working after a rebooted my dedicated server PLEASE HELP!   com.google.gson   Failed to start the minecraft server com.google.gson.JsonSyntaxException: Expected a com.google.gson.JsonObject but was com.google.gson.JsonPrimitive; at path $  
  • Topics

×
×
  • Create New...

Important Information

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