Jump to content

InfernalMobs in Forge 1.18.2 (40.1.54) gives me error


lluis

Recommended Posts

The game crashed whilst unexpected error
Error: java.lang.NullPointerException: Cannot invoke "atomicstryker.infernalmobs.common.InfernalMobsConfig.isDisableHealthBar()" because "this.config" is null
Código de error: -1

---- Minecraft Crash Report ----
// Hey, that tickles! Hehehe!

Time: 29/7/22 23:17
Description: Unexpected error

java.lang.NullPointerException: Cannot invoke "atomicstryker.infernalmobs.common.InfernalMobsConfig.isDisableHealthBar()" because "this.config" is null
    at atomicstryker.infernalmobs.common.InfernalMobsCore.getIsHealthBarDisabled(InfernalMobsCore.java:738) ~[infernalmobs-1.18.5.jar%2373!/:1.18.5] {re:classloading}
    at atomicstryker.infernalmobs.client.InfernalMobsClient.onPreRenderGameOverlay(InfernalMobsClient.java:108) ~[infernalmobs-1.18.5.jar%2373!/:1.18.5] {re:classloading}
    at net.minecraftforge.eventbus.ASMEventHandler_313_InfernalMobsClient_onPreRenderGameOverlay_Pre.invoke(.dynamic) ~[?:?] {}
    at net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:85) ~[eventbus-5.0.3.jar%232!/:?] {}
    at net.minecraftforge.eventbus.EventBus.post(EventBus.java:302) ~[eventbus-5.0.3.jar%232!/:?] {}
    at net.minecraftforge.eventbus.EventBus.post(EventBus.java:283) ~[eventbus-5.0.3.jar%232!/:?] {}
    at net.minecraftforge.client.gui.ForgeIngameGui.pre(ForgeIngameGui.java:865) ~[forge-1.18.2-40.1.54-universal.jar%2388!/:?] {re:classloading}
    at net.minecraftforge.client.gui.ForgeIngameGui.m_93030_(ForgeIngameGui.java:336) ~[forge-1.18.2-40.1.54-universal.jar%2388!/:?] {re:classloading}
    at net.minecraft.client.renderer.GameRenderer.m_109093_(GameRenderer.java:870) ~[client-1.18.2-20220404.173914-srg.jar%2383!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:A,pl:runtimedistcleaner:A}
    at net.minecraft.client.Minecraft.m_91383_(Minecraft.java:1044) ~[client-1.18.2-20220404.173914-srg.jar%2383!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:architectury.mixins.json:MixinMinecraft,pl:mixin:APP:flywheel.mixins.json:PausedPartialTickAccessor,pl:mixin:APP:create.mixins.json:WindowResizeMixin,pl:mixin:APP:securitycraft.mixins.json:camera.MinecraftMixin,pl:mixin:A,pl:runtimedistcleaner:A}
    at net.minecraft.client.Minecraft.m_91374_(Minecraft.java:663) ~[client-1.18.2-20220404.173914-srg.jar%2383!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:architectury.mixins.json:MixinMinecraft,pl:mixin:APP:flywheel.mixins.json:PausedPartialTickAccessor,pl:mixin:APP:create.mixins.json:WindowResizeMixin,pl:mixin:APP:securitycraft.mixins.json:camera.MinecraftMixin,pl:mixin:A,pl:runtimedistcleaner:A}
    at net.minecraft.client.main.Main.main(Main.java:205) ~[client-1.18.2-20220404.173914-srg.jar%2383!/:?] {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:31) ~[fmlloader-1.18.2-40.1.54.jar%2316!/:?] {}
    at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-9.1.3.jar%235!/:?] {}
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) [modlauncher-9.1.3.jar%235!/:?] {}
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) [modlauncher-9.1.3.jar%235!/:?] {}
    at cpw.mods.modlauncher.Launcher.run(Launcher.java:106) [modlauncher-9.1.3.jar%235!/:?] {}
    at cpw.mods.modlauncher.Launcher.main(Launcher.java:77) [modlauncher-9.1.3.jar%235!/:?] {}
    at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) [modlauncher-9.1.3.jar%235!/:?] {}
    at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) [modlauncher-9.1.3.jar%235!/:?] {}
    at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:149) [bootstraplauncher-1.0.0.jar:?] {}


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

-- Head --
Thread: Render thread
Stacktrace:
    at atomicstryker.infernalmobs.common.InfernalMobsCore.getIsHealthBarDisabled(InfernalMobsCore.java:738) ~[infernalmobs-1.18.5.jar%2373!/:1.18.5] {re:classloading}
    at atomicstryker.infernalmobs.client.InfernalMobsClient.onPreRenderGameOverlay(InfernalMobsClient.java:108) ~[infernalmobs-1.18.5.jar%2373!/:1.18.5] {re:classloading}
    at net.minecraftforge.eventbus.ASMEventHandler_313_InfernalMobsClient_onPreRenderGameOverlay_Pre.invoke(.dynamic) ~[?:?] {}
    at net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:85) ~[eventbus-5.0.3.jar%232!/:?] {}
    at net.minecraftforge.eventbus.EventBus.post(EventBus.java:302) ~[eventbus-5.0.3.jar%232!/:?] {}
    at net.minecraftforge.eventbus.EventBus.post(EventBus.java:283) ~[eventbus-5.0.3.jar%232!/:?] {}
    at net.minecraftforge.client.gui.ForgeIngameGui.pre(ForgeIngameGui.java:865) ~[forge-1.18.2-40.1.54-universal.jar%2388!/:?] {re:classloading}
    at net.minecraftforge.client.gui.ForgeIngameGui.m_93030_(ForgeIngameGui.java:336) ~[forge-1.18.2-40.1.54-universal.jar%2388!/:?] {re:classloading}
-- Affected level --
Details:
    All players: 0 total; []
    Chunk stats: 529, 322
    Level dimension: minecraft:overworld
    Level spawn location: World: (16,69,80), Section: (at 0,5,0 in 1,4,5; chunk contains blocks 16,-64,80 to 31,319,95), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,-64,0 to 511,319,511)
    Level time: 13074 game time, 13074 day time
    Server brand: forge
    Server type: Non-integrated multiplayer server
Stacktrace:
    at net.minecraft.client.multiplayer.ClientLevel.m_6026_(ClientLevel.java:407) ~[client-1.18.2-20220404.173914-srg.jar%2383!/:?] {re:mixin,pl:runtimedistcleaner:A,re:classloading,pl:mixin:APP:architectury.mixins.json:MixinClientLevel,pl:mixin:APP:flywheel.mixins.json:ClientLevelMixin,pl:mixin:APP:create.mixins.json:DestroyProgressMixin,pl:mixin:A,pl:runtimedistcleaner:A}
    at net.minecraft.client.Minecraft.m_91354_(Minecraft.java:2260) ~[client-1.18.2-20220404.173914-srg.jar%2383!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:architectury.mixins.json:MixinMinecraft,pl:mixin:APP:flywheel.mixins.json:PausedPartialTickAccessor,pl:mixin:APP:create.mixins.json:WindowResizeMixin,pl:mixin:APP:securitycraft.mixins.json:camera.MinecraftMixin,pl:mixin:A,pl:runtimedistcleaner:A}
    at net.minecraft.client.Minecraft.m_91374_(Minecraft.java:685) ~[client-1.18.2-20220404.173914-srg.jar%2383!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:architectury.mixins.json:MixinMinecraft,pl:mixin:APP:flywheel.mixins.json:PausedPartialTickAccessor,pl:mixin:APP:create.mixins.json:WindowResizeMixin,pl:mixin:APP:securitycraft.mixins.json:camera.MinecraftMixin,pl:mixin:A,pl:runtimedistcleaner:A}
    at net.minecraft.client.main.Main.main(Main.java:205) ~[client-1.18.2-20220404.173914-srg.jar%2383!/:?] {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:31) ~[fmlloader-1.18.2-40.1.54.jar%2316!/:?] {}
    at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-9.1.3.jar%235!/:?] {}
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) [modlauncher-9.1.3.jar%235!/:?] {}
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) [modlauncher-9.1.3.jar%235!/:?] {}
    at cpw.mods.modlauncher.Launcher.run(Launcher.java:106) [modlauncher-9.1.3.jar%235!/:?] {}
    at cpw.mods.modlauncher.Launcher.main(Launcher.java:77) [modlauncher-9.1.3.jar%235!/:?] {}
    at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) [modlauncher-9.1.3.jar%235!/:?] {}
    at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) [modlauncher-9.1.3.jar%235!/:?] {}
    at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:149) [bootstraplauncher-1.0.0.jar:?] {}


-- Last reload --
Details:
    Reload number: 1
    Reload reason: initial
    Finished: Yes
    Packs: Mod Resources, Default

-- System Details --
Details:
    Minecraft Version: 1.18.2
    Minecraft Version ID: 1.18.2
    Operating System: Windows 10 (amd64) version 10.0
    Java Version: 17.0.1, Microsoft
    Java VM Version: OpenJDK 64-Bit Server VM (mixed mode), Microsoft
    Memory: 998505560 bytes (952 MiB) / 2147483648 bytes (2048 MiB) up to 2147483648 bytes (2048 MiB)
    CPUs: 6
    Processor Vendor: GenuineIntel
    Processor Name: Intel(R) Core(TM) i5-9600KF CPU @ 3.70GHz
    Identifier: Intel64 Family 6 Model 158 Stepping 13
    Microarchitecture: Coffee Lake
    Frequency (GHz): 3,70
    Number of physical packages: 1
    Number of physical CPUs: 6
    Number of logical CPUs: 6
    Graphics card #0 name: NVIDIA GeForce RTX 2070
    Graphics card #0 vendor: NVIDIA (0x10de)
    Graphics card #0 VRAM (MB): 4095,00
    Graphics card #0 deviceId: 0x1f02
    Graphics card #0 versionInfo: DriverVersion=30.0.14.7111
    Memory slot #0 capacity (MB): 8192,00
    Memory slot #0 clockSpeed (GHz): 3,20
    Memory slot #0 type: DDR4
    Memory slot #1 capacity (MB): 8192,00
    Memory slot #1 clockSpeed (GHz): 3,20
    Memory slot #1 type: DDR4
    Virtual memory max (MB): 23487,54
    Virtual memory used (MB): 20206,77
    Swap memory total (MB): 7168,00
    Swap memory used (MB): 673,43
    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.18.2-forge-40.1.54
    Backend library: LWJGL version 3.2.2 SNAPSHOT
    Backend API: NVIDIA GeForce RTX 2070/PCIe/SSE2 GL version 3.2.0 NVIDIA 471.11, NVIDIA Corporation
    Window size: 1920x1080
    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: vanilla
    Current Language: Español (España)
    CPU: 6x Intel(R) Core(TM) i5-9600KF CPU @ 3.70GHz
    ModLauncher: 9.1.3+9.1.3+main.9b69c82a
    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 
         fml TRANSFORMATIONSERVICE 
    FML Language Providers: 
        [email protected]
        lowcodefml@null
        javafml@null
    Mod List: 
        client-1.18.2-20220404.173914-srg.jar             |Minecraft                     |minecraft                     |1.18.2              |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
        H.e.b+v+1.2.1.jar                                 |Hals Enhanced Biomes          |heb                           |1.0                 |DONE      |Manifest: NOSIGNATURE
        flashnpcs-1.18.1-1.1.4v2.jar                      |Flash's NPCs                  |flashnpcs                     |1.1.4v2             |DONE      |Manifest: NOSIGNATURE
        CreativeCore_FORGE_v2.6.12_mc1.18.2.jar           |CreativeCore                  |creativecore                  |2.6.12              |DONE      |Manifest: NOSIGNATURE
        jei-1.18.2-9.7.1.232.jar                          |Just Enough Items             |jei                           |9.7.1.232           |DONE      |Manifest: NOSIGNATURE
        LibraryFerret-Forge-1.18.2-2.0.0.jar              |Library ferret                |libraryferret                 |2.0.0               |DONE      |Manifest: NOSIGNATURE
        sophisticatedcore-1.18.2-0.0.1.6-alpha.jar        |Sophisticated Core            |sophisticatedcore             |1.18.2-0.0.1.6-alpha|DONE      |Manifest: NOSIGNATURE
        reap-1.18.2-1.0.0.jar                             |Reap Mod                      |reap                          |1.18.2-1.0.0        |DONE      |Manifest: NOSIGNATURE
        flywheel-forge-1.18-0.6.4.jar                     |Flywheel                      |flywheel                      |1.18-0.6.4.87       |DONE      |Manifest: NOSIGNATURE
        curios-forge-1.18.2-5.0.6.3.jar                   |Curios API                    |curios                        |1.18.2-5.0.6.3      |DONE      |Manifest: NOSIGNATURE
        automaticdoors_1.18.2-2.4.jar                     |Automatic Doors               |automaticdoors                |2.4                 |DONE      |Manifest: NOSIGNATURE
        create-mc1.18.2_v0.5.0c.jar                       |Create                        |create                        |0.5.0c              |DONE      |Manifest: NOSIGNATURE
        Croptopia-1.18.2-FORGE-2.0.5.jar                  |Croptopia                     |croptopia                     |2.0.5               |DONE      |Manifest: NOSIGNATURE
        collective-1.18.2-4.25.jar                        |Collective                    |collective                    |4.25                |DONE      |Manifest: NOSIGNATURE
        Clumps-forge-1.18.2-8.0.0+14.jar                  |Clumps                        |clumps                        |8.0.0+14            |DONE      |Manifest: NOSIGNATURE
        journeymap-1.18.2-5.9.0beta1-forge.jar            |Journeymap                    |journeymap                    |5.9.0beta1          |DONE      |Manifest: NOSIGNATURE
        modernlife-1.18.2-1.54.jar                        |Modern Life                   |modernlife                    |1.18.2-1.54         |DONE      |Manifest: NOSIGNATURE
        [1.18.2]+SecurityCraft+v1.9.3.jar                 |SecurityCraft                 |securitycraft                 |1.9.3               |DONE      |Manifest: NOSIGNATURE
        artifacts-1.18.2-4.1.0.jar                        |Artifacts                     |artifacts                     |1.18.2-4.1.0        |DONE      |Manifest: NOSIGNATURE
        BetterVillage-Forge-1.18.2-1.0.2.jar              |Better Village                |bettervillage                 |1                   |DONE      |Manifest: NOSIGNATURE
        elevatorid-1.18.2-1.8.4 (1).jar                   |Elevator Mod                  |elevatorid                    |1.18.2-1.8.4        |DONE      |Manifest: NOSIGNATURE
        tombstone-7.4.10-1.18.2.jar                       |Corail Tombstone              |tombstone                     |7.4.10              |DONE      |Manifest: NOSIGNATURE
        betteranimalsplus-1.18.2-11.0.5-forge.jar         |Better Animals Plus           |betteranimalsplus             |1.18.2-11.0.5       |DONE      |Manifest: NOSIGNATURE
        sophisticatedbackpacks-1.18.2-3.15.18.570.jar     |Sophisticated Backpacks       |sophisticatedbackpacks        |1.18.2-3.15.18.570  |DONE      |Manifest: NOSIGNATURE
        architectury-4.6.77-forge.jar                     |Architectury                  |architectury                  |4.6.77              |DONE      |Manifest: NOSIGNATURE
        FpsReducer2-forge-1.18.2-2.0.jar                  |FPS Reducer                   |fpsreducer                    |1.18.2-2.0          |DONE      |Manifest: NOSIGNATURE
        carryon-1.18.2-1.17.0.8.jar                       |Carry On                      |carryon                       |1.17.0.8            |DONE      |Manifest: NOSIGNATURE
        forge-1.18.2-40.1.54-universal.jar                |Forge                         |forge                         |40.1.54             |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
        expandability-6.0.0.jar                           |ExpandAbility                 |expandability                 |6.0.0               |DONE      |Manifest: NOSIGNATURE
        exoticbirds-1.18.2-1.7.0.jar                      |Exotic Birds                  |exoticbirds                   |1.7.0               |DONE      |Manifest: NOSIGNATURE
        PlayerRevive_FORGE_v2.0.1_mc1.18.2.jar            |PlayerRevive                  |playerrevive                  |2.0.1               |DONE      |Manifest: NOSIGNATURE
        infernalmobs-1.18.5.jar                           |Infernal Mobs                 |infernalmobs                  |1.18.5              |DONE      |Manifest: NOSIGNATURE
        DungeonsArise-1.18.2-2.1.50d-beta.jar             |When Dungeons Arise           |dungeons_arise                |2.1.50d-1.18.2      |DONE      |Manifest: NOSIGNATURE
    Flywheel Backend: GL33 Instanced Arrays
    Crash Report UUID: ddd6aa95-08a0-435a-88cb-a44689885b58
    FML: 40.1
    Forge: net.minecraftforge:40.1.54
 

Link to comment
Share on other sites

I don't get it. Why do you keep asking here for help when you know which mod is the problem?

There is nothing we can do to fix the problem, you need to contact the mod author.

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.

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

    • Yeah, Minecraft.getInstance().player only works on the client side. Is there a way to get the player from the NetworkEvent.Context?
    • I have tried multimc, prism, and curseforge. They all crash without creating any logs.
    • I play with friends a server with mods, funny enough im the only one getting the error. Link to the crash error:https://pastebin.com/Qgn57EXZ
    • I have a keybind where you spit like a llama. On singleplayer both the entity and particle spawn and it's sound is played (https://youtu.be/bpxnFDuWw_I). But on a server only the entity is spawned and nothing else (https://youtu.be/veVQ4zSqnIA), no particles nor sound. Upon starting the server I have noticed this error in the window (https://postimg.cc/K3KDCpMY), don't know if it's relevant. The server works fine but when I want to spit the following pops up in the serverlog '''Attempted to load class net/minecraft/client/player/LocalPlayer for invalid dist DEDICATED_SERVER''' (https://postimg.cc/LqTDP1Sm). I have prepared the following code of the Server-to-Client packet class which I have made to spawn mentioned particles and sounds. package mett.palemannie.tabakmod.networking.packets; import net.minecraft.client.Minecraft; import net.minecraft.core.particles.ParticleTypes; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.sounds.SoundEvents; import net.minecraft.util.RandomSource; import net.minecraft.world.entity.player.Player; import net.minecraft.world.level.Level; import net.minecraft.world.phys.Vec3; import net.minecraftforge.network.NetworkEvent; import java.util.function.Supplier; public class SpuckEffektS2CPacket { public SpuckEffektS2CPacket(){ } public SpuckEffektS2CPacket(FriendlyByteBuf buf){ } public void toBytes(FriendlyByteBuf buf){ } public boolean handle(Supplier<NetworkEvent.Context> supplier){ NetworkEvent.Context context = supplier.get(); context.enqueueWork(()-> { Player player = Minecraft.getInstance().player; //Attempted to load class net/minecraft/client/player/LocalPlayer for invalid dist DEDICATED_SERVER Level level = Minecraft.getInstance().level; RandomSource rdm = RandomSource.create(); float r = rdm.nextInt(80, 120) / 100f; player.playSound(SoundEvents.LLAMA_SPIT, 1f, r); Vec3 MausPos = player.getEyePosition(); Vec3 SchauWinkel = player.getLookAngle(); level.addParticle(ParticleTypes.SPIT, true, MausPos.x, MausPos.y, MausPos.z, SchauWinkel.x/4, SchauWinkel.y/4, SchauWinkel.z/4); }); return true; } } Is there an alternative to Minecraft.getInstance().player;? dumb question. I have looked at other mods (MrCrayfish's Gun Mod, Ars Noveau, Apotheosis) on how they handle such server-to-client sound and particles but I haven't got any wiser.    
    • i keep getting error on minecraft when im trying to play modpack. When i go to logs folder i got this. 
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

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