Jump to content

Recommended Posts

Posted

---- Minecraft Crash Report ----
// This is a token for 1 free hug. Redeem at your nearest Mojangsta: [~~HUG~~]

Time: 1/18/24 1:49 AM
Description: Ticking player

java.lang.IllegalStateException: Could not access capability
    at net.silentchaos512.scalinghealth.utils.SHPlayers.lambda$getPlayerData$0(SHPlayers.java:19) ~[scalinghealth:4.0.5+5] {re:classloading}
    at net.minecraftforge.common.util.LazyOptional.orElseThrow(LazyOptional.java:282) ~[forge:?] {re:classloading}
    at net.silentchaos512.scalinghealth.utils.SHPlayers.getPlayerData(SHPlayers.java:19) ~[scalinghealth:4.0.5+5] {re:classloading}
    at net.silentchaos512.scalinghealth.event.ScalingHealthCommonEvents.playerTick(ScalingHealthCommonEvents.java:109) ~[scalinghealth:4.0.5+5] {re:classloading}
    at net.minecraftforge.eventbus.ASMEventHandler_358_ScalingHealthCommonEvents_playerTick_PlayerTickEvent.invoke(.dynamic) ~[?:?] {}
    at net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:85) ~[eventbus-4.0.0.jar:?] {}
    at net.minecraftforge.eventbus.EventBus.post(EventBus.java:302) ~[eventbus-4.0.0.jar:?] {}
    at net.minecraftforge.eventbus.EventBus.post(EventBus.java:283) ~[eventbus-4.0.0.jar:?] {}
    at net.minecraftforge.fml.hooks.BasicEventHooks.onPlayerPostTick(BasicEventHooks.java:76) ~[forge:?] {re:classloading}
    at net.minecraft.entity.player.PlayerEntity.func_70071_h_(PlayerEntity.java:292) ~[?:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:computing_frames,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:pehkui.mixins.json:reach.PlayerEntityMixin,pl:mixin:APP:pehkui.mixins.json:PlayerEntityMixin,pl:mixin:APP:pehkui.mixins.json:compat115plus.PlayerEntityMixin,pl:mixin:APP:pehkui.mixins.json:compat116minus.PlayerEntityMixin,pl:mixin:APP:pehkui.mixins.json:compat1193minus.PlayerEntityMixin,pl:mixin:APP:pehkui.mixins.json:compat1201minus.EntityVehicleHeightOffsetMixin,pl:mixin:A,pl:runtimedistcleaner:A}
    at net.minecraft.entity.player.ServerPlayerEntity.func_71127_g(ServerPlayerEntity.java:530) ~[?:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:pehkui.mixins.json:ServerPlayerEntityMixin,pl:mixin:A}
    at net.minecraft.server.management.PlayerList.func_72367_e(PlayerList.java:445) ~[?:?] {re:mixin,pl:runtimedistcleaner:A,re:classloading,pl:mixin:APP:pehkui.mixins.json:compat1201minus.PlayerManagerMixin,pl:mixin:A,pl:runtimedistcleaner:A}
    at net.minecraft.server.management.PlayerList.disconnect(PlayerList.java:428) ~[?:?] {re:mixin,pl:runtimedistcleaner:A,re:classloading,pl:mixin:APP:pehkui.mixins.json:compat1201minus.PlayerManagerMixin,pl:mixin:A,pl:runtimedistcleaner:A}
    at net.minecraft.network.play.ServerPlayNetHandler.func_147231_a(ServerPlayNetHandler.java:1488) ~[?:?] {re:mixin,re:classloading,pl:mixin:APP:pehkui.mixins.json:reach.compat118minus.ServerPlayNetworkHandlerMixin,pl:mixin:APP:pehkui.mixins.json:ServerPlayNetworkHandlerMixin,pl:mixin:APP:pehkui.mixins.json:compat118minus.ServerPlayNetworkHandlerMixin,pl:mixin:A}
    at net.minecraft.network.NetworkManager.func_179293_l(NetworkManager.java:382) ~[?:?] {re:mixin,pl:runtimedistcleaner:A,re:classloading,pl:runtimedistcleaner:A}
    at net.minecraft.network.NetworkSystem.func_151269_c(NetworkSystem.java:160) ~[?:?] {re:classloading,pl:runtimedistcleaner:A}
    at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:1142) ~[?:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:381) ~[?:?] {re:classloading,pl:accesstransformer:B}
    at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:1033) ~[?:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    at net.minecraft.server.MinecraftServer.func_240802_v_(MinecraftServer.java:870) ~[?:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    at net.minecraft.server.MinecraftServer.func_240783_a_(MinecraftServer.java:286) ~[?:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    at java.lang.Thread.run(Thread.java:748) [?:1.8.0_312] {}


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

-- Head --
Thread: Server thread
Stacktrace:
    at net.silentchaos512.scalinghealth.utils.SHPlayers.lambda$getPlayerData$0(SHPlayers.java:19) ~[scalinghealth:4.0.5+5] {re:classloading}
    at net.minecraftforge.common.util.LazyOptional.orElseThrow(LazyOptional.java:282) ~[forge:?] {re:classloading}
    at net.silentchaos512.scalinghealth.utils.SHPlayers.getPlayerData(SHPlayers.java:19) ~[scalinghealth:4.0.5+5] {re:classloading}
    at net.silentchaos512.scalinghealth.event.ScalingHealthCommonEvents.playerTick(ScalingHealthCommonEvents.java:109) ~[scalinghealth:4.0.5+5] {re:classloading}
    at net.minecraftforge.eventbus.ASMEventHandler_358_ScalingHealthCommonEvents_playerTick_PlayerTickEvent.invoke(.dynamic) ~[?:?] {}
    at net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:85) ~[eventbus-4.0.0.jar:?] {}
    at net.minecraftforge.eventbus.EventBus.post(EventBus.java:302) ~[eventbus-4.0.0.jar:?] {}
    at net.minecraftforge.eventbus.EventBus.post(EventBus.java:283) ~[eventbus-4.0.0.jar:?] {}
    at net.minecraftforge.fml.hooks.BasicEventHooks.onPlayerPostTick(BasicEventHooks.java:76) ~[forge:?] {re:classloading}
    at net.minecraft.entity.player.PlayerEntity.func_70071_h_(PlayerEntity.java:292) ~[?:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:computing_frames,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:pehkui.mixins.json:reach.PlayerEntityMixin,pl:mixin:APP:pehkui.mixins.json:PlayerEntityMixin,pl:mixin:APP:pehkui.mixins.json:compat115plus.PlayerEntityMixin,pl:mixin:APP:pehkui.mixins.json:compat116minus.PlayerEntityMixin,pl:mixin:APP:pehkui.mixins.json:compat1193minus.PlayerEntityMixin,pl:mixin:APP:pehkui.mixins.json:compat1201minus.EntityVehicleHeightOffsetMixin,pl:mixin:A,pl:runtimedistcleaner:A}
-- Player being ticked --
Details:
    Entity Type: minecraft:player (net.minecraft.entity.player.ServerPlayerEntity)
    Entity ID: 273
    Entity Name: Ashf0rc3
    Entity's Exact location: 10.86, 70.00, -0.98
    Entity's Block location: World: (10,70,-1), Chunk: (at 10,4,15 in 0,-1; contains blocks 0,0,-16 to 15,255,-1), Region: (0,-1; contains chunks 0,-32 to 31,-1, blocks 0,0,-512 to 511,255,-1)
    Entity's Momentum: 0.00, -0.08, 0.00
    Entity's Passengers: []
    Entity's Vehicle: ~~ERROR~~ NullPointerException: null
Stacktrace:
    at net.minecraft.entity.player.ServerPlayerEntity.func_71127_g(ServerPlayerEntity.java:530) ~[?:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:pehkui.mixins.json:ServerPlayerEntityMixin,pl:mixin:A}
    at net.minecraft.server.management.PlayerList.func_72367_e(PlayerList.java:445) ~[?:?] {re:mixin,pl:runtimedistcleaner:A,re:classloading,pl:mixin:APP:pehkui.mixins.json:compat1201minus.PlayerManagerMixin,pl:mixin:A,pl:runtimedistcleaner:A}
    at net.minecraft.server.management.PlayerList.disconnect(PlayerList.java:428) ~[?:?] {re:mixin,pl:runtimedistcleaner:A,re:classloading,pl:mixin:APP:pehkui.mixins.json:compat1201minus.PlayerManagerMixin,pl:mixin:A,pl:runtimedistcleaner:A}
    at net.minecraft.network.play.ServerPlayNetHandler.func_147231_a(ServerPlayNetHandler.java:1488) ~[?:?] {re:mixin,re:classloading,pl:mixin:APP:pehkui.mixins.json:reach.compat118minus.ServerPlayNetworkHandlerMixin,pl:mixin:APP:pehkui.mixins.json:ServerPlayNetworkHandlerMixin,pl:mixin:APP:pehkui.mixins.json:compat118minus.ServerPlayNetworkHandlerMixin,pl:mixin:A}
    at net.minecraft.network.NetworkManager.func_179293_l(NetworkManager.java:382) ~[?:?] {re:mixin,pl:runtimedistcleaner:A,re:classloading,pl:runtimedistcleaner:A}
    at net.minecraft.network.NetworkSystem.func_151269_c(NetworkSystem.java:160) ~[?:?] {re:classloading,pl:runtimedistcleaner:A}
    at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:1142) ~[?:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:381) ~[?:?] {re:classloading,pl:accesstransformer:B}
    at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:1033) ~[?:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    at net.minecraft.server.MinecraftServer.func_240802_v_(MinecraftServer.java:870) ~[?:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    at net.minecraft.server.MinecraftServer.func_240783_a_(MinecraftServer.java:286) ~[?:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    at java.lang.Thread.run(Thread.java:748) [?:1.8.0_312] {}


-- System Details --
Details:
    Minecraft Version: 1.16.5
    Minecraft Version ID: 1.16.5
    Operating System: Linux (amd64) version 5.15.0-76-generic
    Java Version: 1.8.0_312, Oracle Corporation
    Java VM Version: OpenJDK 64-Bit Server VM (mixed mode), Oracle Corporation
    Memory: 1286019984 bytes (1226 MB) / 1989672960 bytes (1897 MB) up to 4772593664 bytes (4551 MB)
    CPUs: 12
    JVM Flags: 2 total; -Xms128M -Xmx5120M
    ModLauncher: 8.1.3+8.1.3+main-8.1.x.c94d18ec
    ModLauncher launch target: fmlserver
    ModLauncher naming: srg
    ModLauncher services: 
        /mixin-0.8.4.jar mixin PLUGINSERVICE 
        /eventbus-4.0.0.jar eventbus PLUGINSERVICE 
        /Magma-1.16.5-36.2.39-c1c5a946-server.jar object_holder_definalize PLUGINSERVICE 
        /Magma-1.16.5-36.2.39-c1c5a946-server.jar runtime_enum_extender PLUGINSERVICE 
        /accesstransformers-3.0.1.jar accesstransformer PLUGINSERVICE 
        /Magma-1.16.5-36.2.39-c1c5a946-server.jar capability_inject_definalize PLUGINSERVICE 
        /Magma-1.16.5-36.2.39-c1c5a946-server.jar runtimedistcleaner PLUGINSERVICE 
        /mixin-0.8.4.jar mixin TRANSFORMATIONSERVICE 
        /Magma-1.16.5-36.2.39-c1c5a946-server.jar fml TRANSFORMATIONSERVICE 
    FML: 36.2
    Forge: net.minecraftforge:36.2.39-c1c5a946
    FML Language Providers: 
        [email protected]
        minecraft@1
    Mod List: 
        forge-1.16.5-36.2.39-c1c5a946-server.jar          |Minecraft                     |minecraft                     |1.16.5              |DONE      |Manifest: NOSIGNATURE
        JujutsuCraftAcery_1.16.5_ver1.jar                 |Jujutsu Craft GT              |jujutsu_craft_gt              |1.0.0               |DONE      |Manifest: NOSIGNATURE
        ftb-essentials-1605.1.5-build.32.jar              |FTB Essentials                |ftbessentials                 |1605.1.5-build.32   |DONE      |Manifest: NOSIGNATURE
        silent-lib-1.16.3-4.9.6.jar                       |Silent Lib                    |silentlib                     |4.9.6               |DONE      |Manifest: NOSIGNATURE
        CreativeCore_v2.2.1_mc1.16.5.jar                  |CreativeCore                  |creativecore                  |2.0.0               |DONE      |Manifest: NOSIGNATURE
        kill_for_health_v1.1.jar                          |Kill for Health               |kill_for_health               |1.0                 |DONE      |Manifest: NOSIGNATURE
        jei-1.16.5-7.8.0.1009.jar                         |Just Enough Items             |jei                           |7.8.0.1009          |DONE      |Manifest: NOSIGNATURE
        HealthOverlay-1.16.5-3.0.1.jar                    |Health Overlay                |healthoverlay                 |3.0.1               |DONE      |Manifest: NOSIGNATURE
        Pehkui-3.7.9+1.16.5-forge.jar                     |Pehkui                        |pehkui                        |3.7.9+1.16.5-forge  |DONE      |Manifest: NOSIGNATURE
        corpsecomplex-forge-1.16.5-4.0.2.8.jar            |Corpse Complex                |corpsecomplex                 |1.16.5-4.0.2.8      |DONE      |Manifest: NOSIGNATURE
        spark-1.9.1-forge.jar                             |spark                         |spark                         |1.9.1               |DONE      |Manifest: NOSIGNATURE
        gravestone-1.16.5-1.0.6.jar                       |Gravestone Mod                |gravestone                    |1.16.5-1.0.6        |DONE      |Manifest: NOSIGNATURE
        collective-1.16.5-5.49.jar                        |Collective                    |collective                    |5.49                |DONE      |Manifest: NOSIGNATURE
        Clumps-6.0.0.28.jar                               |Clumps                        |clumps                        |6.0.0.28            |DONE      |Manifest: NOSIGNATURE
        JujutsuAnimation_1.16.5_ver6.jar                  |Jujutsu Animation             |jujutsuanimation              |6                   |DONE      |Manifest: NOSIGNATURE
        obfuscate-0.6.3-1.16.5.jar                        |Obfuscate                     |obfuscate                     |0.6.3               |DONE      |Manifest: NOSIGNATURE
        JujutsuCraft_1.16.5_ver23.2.jar                   |jujutsu_craft                 |jujutsucraft                  |23                  |DONE      |Manifest: NOSIGNATURE
        magnesium-1.5.jar                                 |Magnesium                     |magnesium                     |1.5                 |DONE      |Manifest: NOSIGNATURE
        JJKF v10.1.jar                                    |JJKF                          |jjkf                          |1.0.0               |DONE      |Manifest: NOSIGNATURE
        Cursed_v1.3.jar                                   |Charge Curse Energy           |charge_curse_energy           |1.3                 |DONE      |Manifest: NOSIGNATURE
        architectury-1.32.68.jar                          |Architectury                  |architectury                  |1.32.68             |DONE      |Manifest: NOSIGNATURE
        ftb-library-forge-1605.3.4-build.90.jar           |FTB Library                   |ftblibrary                    |1605.3.4-build.90   |DONE      |Manifest: NOSIGNATURE
        lootr-1.16.5-0.2.18.49.jar                        |Lootr                         |lootr                         |0.1.15.46           |DONE      |Manifest: NOSIGNATURE
        PrisonRealm.jar                                   |JJK Tech Addon                |jjk_tech                      |1.0.0               |DONE      |Manifest: NOSIGNATURE
        ftb-teams-forge-1605.2.3-build.40.jar             |FTB Teams                     |ftbteams                      |1605.2.3-build.40   |DONE      |Manifest: NOSIGNATURE
        ftb-chunks-forge-1605.3.4-build.220.jar           |FTB Chunks                    |ftbchunks                     |1605.3.4-build.220  |DONE      |Manifest: NOSIGNATURE
        forge-1.16.5-36.2.39-c1c5a946-universal.jar       |Forge                         |forge                         |36.2.39-c1c5a946    |DONE      |Manifest: NOSIGNATURE
        appleskin-forge-mc1.16.x-2.5.1.jar                |AppleSkin                     |appleskin                     |2.5.1+mc1.16.4      |DONE      |Manifest: NOSIGNATURE
        ScalingHealth-1.16.5-4.0.5+5.jar                  |Scaling Health                |scalinghealth                 |4.0.5+5             |DONE      |Manifest: NOSIGNATURE
        CosmeticArmorReworked-1.16.5-v5.jar               |CosmeticArmorReworked         |cosmeticarmorreworked         |1.16.5-v5           |DONE      |Manifest: 5e:ed:25:99:e4:44:14:c0:dd:89:c1:a9:4c:10:b5:0d:e4:b1:52:50:45:82:13:d8:d0:32:89:67:56:57:01:53
        PlayerRevive_v2.0.0-pre04_mc1.16.5.jar            |PlayerRevive                  |playerrevive                  |2.0.0               |DONE      |Manifest: NOSIGNATURE
    Crash Report UUID: d457ae40-a742-47d4-a35b-7a4c88b7c044
    CraftBukkit Information: 
   Running: Magma version git-Magma-1.16.5-c1c5a946 (MC: 1.16.5) (Implementing API version 1.16.5-R0.1-SNAPSHOT) true
   Plugins: { SkinsRestorer v15.0.4 net.skinsrestorer.bukkit.SRBukkitBootstrap [knat, AlexProgrammerDE, Th3Tr0LLeR, McLive, DoNotSpamPls], AntiXRay v1.9.0 me.ryanhamshire.AntiXRay.AntiXRay [blablubbabc, bigscary], MachinaBanItem v1.1* org.MachinaBanItem.ThePrometeus.Main [], SleepFixer v2.0.3 me.lokka30.sleepfixer.SleepFixer [lokka30],}
   Warnings: DEFAULT
   Reload Count: 0
   Threads: { RUNNABLE Server thread: [java.lang.Thread.dumpThreads(Native Method), java.lang.Thread.getAllStackTraces(Thread.java:1610), org.bukkit.craftbukkit.v1_16_R3.CraftCrashReport.call(CraftCrashReport.java:33), net.minecraft.crash.CrashReportCategory.func_189529_a(CrashReportCategory.java:81), net.minecraft.crash.CrashReport.func_71504_g(CrashReport.java:74), net.minecraft.crash.CrashReport.<init>(CrashReport.java:39), net.minecraft.crash.CrashReport.func_85055_a(CrashReport.java:243), net.minecraft.entity.player.ServerPlayerEntity.func_71127_g(ServerPlayerEntity.java:606), net.minecraft.server.management.PlayerList.func_72367_e(PlayerList.java:445), net.minecraft.server.management.PlayerList.disconnect(PlayerList.java:428), net.minecraft.network.play.ServerPlayNetHandler.func_147231_a(ServerPlayNetHandler.java:1488), net.minecraft.network.NetworkManager.func_179293_l(NetworkManager.java:382), net.minecraft.network.NetworkSystem.func_151269_c(NetworkSystem.java:160), net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:1142), net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:381), net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:1033), net.minecraft.server.MinecraftServer.func_240802_v_(MinecraftServer.java:870), net.minecraft.server.MinecraftServer.func_240783_a_(MinecraftServer.java:286), net.minecraft.server.MinecraftServer$$Lambda$6332/1570234573.run(Unknown Source), java.lang.Thread.run(Thread.java:748)], TIMED_WAITING Timer hack thread: [java.lang.Thread.sleep(Native Method), net.minecraft.util.Util$6.run(Util.java:505)], RUNNABLE Thread-3: [sun.nio.fs.LinuxWatchService.poll(Native Method), sun.nio.fs.LinuxWatchService.access$600(LinuxWatchService.java:47), sun.nio.fs.LinuxWatchService$Poller.run(LinuxWatchService.java:314), java.lang.Thread.run(Thread.java:748)], WAITING Worker-Main-28: [sun.misc.Unsafe.park(Native Method), java.util.concurrent.ForkJoinPool.awaitWork(ForkJoinPool.java:1824), java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1693), java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:175)], WAITING Java2D Disposer: [java.lang.Object.wait(Native Method), java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:144), java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:165), sun.java2d.Disposer.run(Disposer.java:148), java.lang.Thread.run(Thread.java:748)], TIMED_WAITING Timer-0: [java.lang.Object.wait(Native Method), java.util.TimerThread.mainLoop(Timer.java:552), java.util.TimerThread.run(Timer.java:505)], WAITING Worker-Main-9: [sun.misc.Unsafe.park(Native Method), java.util.concurrent.ForkJoinPool.awaitWork(ForkJoinPool.java:1824), java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1693), java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:175)], WAITING Worker-Main-27: [sun.misc.Unsafe.park(Native Method), java.util.concurrent.ForkJoinPool.awaitWork(ForkJoinPool.java:1824), java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1693), java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:175)], WAITING Worker-Main-29: [sun.misc.Unsafe.park(Native Method), java.util.concurrent.ForkJoinPool.awaitWork(ForkJoinPool.java:1824), java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1693), java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:175)], TIMED_WAITING Thread-1: [sun.misc.Unsafe.park(Native Method), java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:338), com.electronwill.nightconfig.core.file.FileWatcher$WatcherThread.run(FileWatcher.java:190)], WAITING ProgressBar: [sun.misc.Unsafe.park(Native Method), java.util.concurrent.locks.LockSupport.park(LockSupport.java:175), java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039), java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1081), java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809), java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074), java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134), java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624), java.lang.Thread.run(Thread.java:748)], WAITING Worker-Main-30: [sun.misc.Unsafe.park(Native Method), java.util.concurrent.ForkJoinPool.awaitWork(ForkJoinPool.java:1824), java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1693), java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:175)], WAITING spark-worker-pool-1-thread-1: [sun.misc.Unsafe.park(Native Method), java.util.concurrent.locks.LockSupport.park(LockSupport.java:175), java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039), java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1081), java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809), java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074), java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134), java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624), java.lang.Thread.run(Thread.java:748)], TIMED_WAITING Worker-Main-23: [sun.misc.Unsafe.park(Native Method), java.util.concurrent.ForkJoinPool.awaitWork(ForkJoinPool.java:1824), java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1693), java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:175)], TIMED_WAITING bStats-Metrics: [sun.misc.Unsafe.park(Native Method), java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215), java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078), java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1093), java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809), java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074), java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134), java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624), java.lang.Thread.run(Thread.java:748)], RUNNABLE TerminalConsoleWriter: [org.bukkit.craftbukkit.v1_16_R3.util.TerminalConsoleWriterThread.run(TerminalConsoleWriterThread.java:33)], TIMED_WAITING Timer-1: [java.lang.Object.wait(Native Method), java.util.TimerThread.mainLoop(Timer.java:552), java.util.TimerThread.run(Timer.java:505)], WAITING Snooper Timer: [java.lang.Object.wait(Native Method), java.lang.Object.wait(Object.java:502), java.util.TimerThread.mainLoop(Timer.java:526), java.util.TimerThread.run(Timer.java:505)], RUNNABLE Netty Epoll Server IO #0: [io.netty.channel.epoll.Native.epollWait0(Native Method), io.netty.channel.epoll.Native.epollWait(Native.java:114), io.netty.channel.epoll.EpollEventLoop.epollWait(EpollEventLoop.java:239), io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:256), io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884), java.lang.Thread.run(Thread.java:748)], RUNNABLE Thread-11: [sun.nio.fs.LinuxWatchService.poll(Native Method), sun.nio.fs.LinuxWatchService.access$600(LinuxWatchService.java:47), sun.nio.fs.LinuxWatchService$Poller.run(LinuxWatchService.java:314), java.lang.Thread.run(Thread.java:748)], RUNNABLE Thread-2: [sun.nio.fs.LinuxWatchService.poll(Native Method), sun.nio.fs.LinuxWatchService.access$600(LinuxWatchService.java:47), sun.nio.fs.LinuxWatchService$Poller.run(LinuxWatchService.java:314), java.lang.Thread.run(Thread.java:748)], RUNNABLE Netty Epoll Server IO #1: [io.netty.channel.epoll.Native.epollWait0(Native Method), io.netty.channel.epoll.Native.epollWait(Native.java:114), io.netty.channel.epoll.EpollEventLoop.epollWait(EpollEventLoop.java:239), io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:256), io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884), java.lang.Thread.run(Thread.java:748)], RUNNABLE DestroyJavaVM: [], RUNNABLE Signal Dispatcher: [], TIMED_WAITING spark-monitor: [sun.misc.Unsafe.park(Native Method), java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215), java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078), java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1093), java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809), java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074), java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134), java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624), java.lang.Thread.run(Thread.java:748)], TIMED_WAITING IO-Worker-15: [sun.misc.Unsafe.park(Native Method), java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215), java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill(SynchronousQueue.java:460), java.util.concurrent.SynchronousQueue$TransferStack.transfer(SynchronousQueue.java:362), java.util.concurrent.SynchronousQueue.poll(SynchronousQueue.java:941), java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1073), java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134), java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624), java.lang.Thread.run(Thread.java:748)], TIMED_WAITING Craft Scheduler Thread - 2: [sun.misc.Unsafe.park(Native Method), java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215), java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill(SynchronousQueue.java:460), java.util.concurrent.SynchronousQueue$TransferStack.transfer(SynchronousQueue.java:362), java.util.concurrent.SynchronousQueue.poll(SynchronousQueue.java:941), java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1073), java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134), java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624), java.lang.Thread.run(Thread.java:748)], TIMED_WAITING ObjectCleanerThread: [java.lang.Object.wait(Native Method), java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:144), io.netty.util.internal.ObjectCleaner$1.run(ObjectCleaner.java:54), io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30), java.lang.Thread.run(Thread.java:748)], WAITING Worker-Main-26: [sun.misc.Unsafe.park(Native Method), java.util.concurrent.ForkJoinPool.awaitWork(ForkJoinPool.java:1824), java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1693), java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:175)], TIMED_WAITING modloading-worker-3: [sun.misc.Unsafe.park(Native Method), java.util.concurrent.ForkJoinPool.awaitWork(ForkJoinPool.java:1824), java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1693), java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:175)], WAITING Finalizer: [java.lang.Object.wait(Native Method), java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:144), java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:165), java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:216)], WAITING modloading-worker-8: [sun.misc.Unsafe.park(Native Method), java.util.concurrent.ForkJoinPool.awaitWork(ForkJoinPool.java:1824), java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1693), java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:175)], WAITING modloading-worker-11: [sun.misc.Unsafe.park(Native Method), java.util.concurrent.ForkJoinPool.awaitWork(ForkJoinPool.java:1824), java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1693), java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:175)], TIMED_WAITING bStats-Metrics: [sun.misc.Unsafe.park(Native Method), java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215), java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078), java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1093), java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809), java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074), java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134), java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624), java.lang.Thread.run(Thread.java:748)], RUNNABLE Netty Epoll Server IO #3: [io.netty.channel.epoll.Native.epollWait0(Native Method), io.netty.channel.epoll.Native.epollWait(Native.java:114), io.netty.channel.epoll.EpollEventLoop.epollWait(EpollEventLoop.java:239), io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:256), io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884), java.lang.Thread.run(Thread.java:748)], TIMED_WAITING Spigot Watchdog Thread: [java.lang.Thread.sleep(Native Method), org.spigotmc.WatchdogThread.run(WatchdogThread.java:88)], WAITING Reference Handler: [java.lang.Object.wait(Native Method), java.lang.Object.wait(Object.java:502), java.lang.ref.Reference.tryHandlePending(Reference.java:191), java.lang.ref.Reference$ReferenceHandler.run(Reference.java:153)], RUNNABLE Server console handler: [java.io.FileInputStream.read0(Native Method), java.io.FileInputStream.read(FileInputStream.java:207), org.jline.terminal.impl.AbstractPty$PtyInputStream.read(AbstractPty.java:73), org.jline.utils.NonBlockingInputStream.read(NonBlockingInputStream.java:62), org.jline.utils.NonBlocking$NonBlockingInputStreamReader.read(NonBlocking.java:168), org.jline.utils.NonBlockingReader.read(NonBlockingReader.java:57), org.jline.keymap.BindingReader.readCharacter(BindingReader.java:133), org.jline.keymap.BindingReader.readBinding(BindingReader.java:110), org.jline.keymap.BindingReader.readBinding(BindingReader.java:61), org.jline.reader.impl.LineReaderImpl.doReadBinding(LineReaderImpl.java:848), org.jline.reader.impl.LineReaderImpl.readBinding(LineReaderImpl.java:868), org.jline.reader.impl.LineReaderImpl.readLine(LineReaderImpl.java:575), org.jline.reader.impl.LineReaderImpl.readLine(LineReaderImpl.java:418), net.minecraftforge.server.console.TerminalHandler.handleCommands(TerminalHandler.java:46), net.minecraft.server.dedicated.DedicatedServer$1.run(DedicatedServer.java:93)], RUNNABLE Netty Epoll Server IO #2: [io.netty.channel.epoll.Native.epollWait0(Native Method), io.netty.channel.epoll.Native.epollWait(Native.java:114), io.netty.channel.epoll.EpollEventLoop.epollWait(EpollEventLoop.java:239), io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:256), io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884), java.lang.Thread.run(Thread.java:748)], WAITING NonBlockingInputStreamThread: [java.lang.Object.wait(Native Method), jline.internal.NonBlockingInputStream.run(NonBlockingInputStream.java:275), java.lang.Thread.run(Thread.java:748)], TIMED_WAITING IO-Worker-19: [sun.misc.Unsafe.park(Native Method), java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215), java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill(SynchronousQueue.java:460), java.util.concurrent.SynchronousQueue$TransferStack.transfer(SynchronousQueue.java:362), java.util.concurrent.SynchronousQueue.poll(SynchronousQueue.java:941), java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1073), java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134), java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624), java.lang.Thread.run(Thread.java:748)],}
   Recent tasks from 1284-1314{SkinsRestorer:net.skinsrestorer.shared.plugin.SRPlugin$$Lambda$6939/1801945511@1229,}
   Force Loaded Chunks: { world: {}, DIM-1: {}, DIM1: {}, prison_realm: {}, prison_realm_dimenson: {}, cursed_spirit_manipulation_dimension: {}, jjkfdim: {},}
    Player Count: 0 / 20; []
    Data Packs: vanilla, mod:forge (incompatible), file/bukkit, mod:jujutsu_craft_gt, mod:obfuscate, mod:ftbessentials, mod:jujutsucraft, mod:jjkf, mod:architectury, mod:ftblibrary, mod:jjk_tech, mod:pehkui, mod:spark, mod:ftbteams, mod:ftbchunks, mod:appleskin, mod:collective, mod:clumps, mod:jujutsuanimation, mod:charge_curse_energy, mod:creativecore, mod:playerrevive, mod:lootr (incompatible), mod:kill_for_health, mod:corpsecomplex (incompatible), mod:gravestone, mod:silentlib (incompatible), mod:healthoverlay, mod:scalinghealth, mod:cosmeticarmorreworked (incompatible), mod:jei, mod:magnesium
    Is Modded: Definitely; Server brand changed to 'Magma'
    Type: Dedicated Server (map_server.txt)

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

    • Version 1.19 - Forge 41.0.63 I want to create a wolf entity that I can ride, so far it seems to be working, but the problem is that when I get on the wolf, I can’t control it. I then discovered that the issue is that the server doesn’t detect that I’m riding the wolf, so I’m struggling with synchronization. However, it seems to not be working properly. As I understand it, the server receives the packet but doesn’t register it correctly. I’m a bit new to Java, and I’ll try to provide all the relevant code and prints *The comments and prints are translated by chatgpt since they were originally in Spanish* Thank you very much in advance No player is mounted, or the passenger is not a player. No player is mounted, or the passenger is not a player. No player is mounted, or the passenger is not a player. No player is mounted, or the passenger is not a player. No player is mounted, or the passenger is not a player. MountableWolfEntity package com.vals.valscraft.entity; import com.vals.valscraft.network.MountSyncPacket; import com.vals.valscraft.network.NetworkHandler; import net.minecraft.client.Minecraft; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.network.syncher.EntityDataSerializers; import net.minecraft.network.syncher.SynchedEntityData; import net.minecraft.server.MinecraftServer; import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.Mob; import net.minecraft.world.entity.ai.attributes.AttributeSupplier; import net.minecraft.world.entity.ai.attributes.Attributes; import net.minecraft.world.entity.animal.Wolf; import net.minecraft.world.entity.player.Player; import net.minecraft.world.entity.Entity; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.Items; import net.minecraft.world.level.Level; import net.minecraft.world.phys.Vec3; import net.minecraftforge.event.TickEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.network.PacketDistributor; public class MountableWolfEntity extends Wolf { private boolean hasSaddle; private static final EntityDataAccessor<Byte> DATA_ID_FLAGS = SynchedEntityData.defineId(MountableWolfEntity.class, EntityDataSerializers.BYTE); public MountableWolfEntity(EntityType<? extends Wolf> type, Level level) { super(type, level); this.hasSaddle = false; } @Override protected void defineSynchedData() { super.defineSynchedData(); this.entityData.define(DATA_ID_FLAGS, (byte)0); } public static AttributeSupplier.Builder createAttributes() { return Wolf.createAttributes() .add(Attributes.MAX_HEALTH, 20.0) .add(Attributes.MOVEMENT_SPEED, 0.3); } @Override public InteractionResult mobInteract(Player player, InteractionHand hand) { ItemStack itemstack = player.getItemInHand(hand); if (itemstack.getItem() == Items.SADDLE && !this.hasSaddle()) { if (!player.isCreative()) { itemstack.shrink(1); } this.setSaddle(true); return InteractionResult.SUCCESS; } else if (!level.isClientSide && this.hasSaddle()) { player.startRiding(this); MountSyncPacket packet = new MountSyncPacket(true); // 'true' means the player is mounted NetworkHandler.CHANNEL.sendToServer(packet); // Ensure the server handles the packet return InteractionResult.SUCCESS; } return InteractionResult.PASS; } @Override public void travel(Vec3 travelVector) { if (this.isVehicle() && this.getControllingPassenger() instanceof Player) { System.out.println("The wolf has a passenger."); System.out.println("The passenger is a player."); Player player = (Player) this.getControllingPassenger(); // Ensure the player is the controller this.setYRot(player.getYRot()); this.yRotO = this.getYRot(); this.setXRot(player.getXRot() * 0.5F); this.setRot(this.getYRot(), this.getXRot()); this.yBodyRot = this.getYRot(); this.yHeadRot = this.yBodyRot; float forward = player.zza; float strafe = player.xxa; if (forward <= 0.0F) { forward *= 0.25F; } this.flyingSpeed = this.getSpeed() * 0.1F; this.setSpeed((float) this.getAttributeValue(Attributes.MOVEMENT_SPEED) * 1.5F); this.setDeltaMovement(new Vec3(strafe, travelVector.y, forward).scale(this.getSpeed())); this.calculateEntityAnimation(this, false); } else { // The wolf does not have a passenger or the passenger is not a player System.out.println("No player is mounted, or the passenger is not a player."); super.travel(travelVector); } } public boolean hasSaddle() { return this.hasSaddle; } public void setSaddle(boolean hasSaddle) { this.hasSaddle = hasSaddle; } @Override protected void dropEquipment() { super.dropEquipment(); if (this.hasSaddle()) { this.spawnAtLocation(Items.SADDLE); this.setSaddle(false); } } @SubscribeEvent public static void onServerTick(TickEvent.ServerTickEvent event) { if (event.phase == TickEvent.Phase.START) { MinecraftServer server = net.minecraftforge.server.ServerLifecycleHooks.getCurrentServer(); if (server != null) { for (ServerPlayer player : server.getPlayerList().getPlayers()) { if (player.isPassenger() && player.getVehicle() instanceof MountableWolfEntity) { MountableWolfEntity wolf = (MountableWolfEntity) player.getVehicle(); System.out.println("Tick: " + player.getName().getString() + " is correctly mounted on " + wolf); } } } } } private boolean lastMountedState = false; @Override public void tick() { super.tick(); if (!this.level.isClientSide) { // Only on the server boolean isMounted = this.isVehicle() && this.getControllingPassenger() instanceof Player; // Only print if the state changed if (isMounted != lastMountedState) { if (isMounted) { Player player = (Player) this.getControllingPassenger(); // Verify the passenger is a player System.out.println("Server: Player " + player.getName().getString() + " is now mounted."); } else { System.out.println("Server: The wolf no longer has a passenger."); } lastMountedState = isMounted; } } } @Override public void addPassenger(Entity passenger) { super.addPassenger(passenger); if (passenger instanceof Player) { Player player = (Player) passenger; if (!this.level.isClientSide && player instanceof ServerPlayer) { // Send the packet to the server to indicate the player is mounted NetworkHandler.CHANNEL.send(PacketDistributor.PLAYER.with(() -> (ServerPlayer) player), new MountSyncPacket(true)); } } } @Override public void removePassenger(Entity passenger) { super.removePassenger(passenger); if (passenger instanceof Player) { Player player = (Player) passenger; if (!this.level.isClientSide && player instanceof ServerPlayer) { // Send the packet to the server to indicate the player is no longer mounted NetworkHandler.CHANNEL.send(PacketDistributor.PLAYER.with(() -> (ServerPlayer) player), new MountSyncPacket(false)); } } } @Override public boolean isControlledByLocalInstance() { Entity entity = this.getControllingPassenger(); return entity instanceof Player; } @Override public void positionRider(Entity passenger) { if (this.hasPassenger(passenger)) { double xOffset = Math.cos(Math.toRadians(this.getYRot() + 90)) * 0.4; double zOffset = Math.sin(Math.toRadians(this.getYRot() + 90)) * 0.4; passenger.setPos(this.getX() + xOffset, this.getY() + this.getPassengersRidingOffset() + passenger.getMyRidingOffset(), this.getZ() + zOffset); } } } MountSyncPacket package com.vals.valscraft.network; import com.vals.valscraft.entity.MountableWolfEntity; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.server.level.ServerLevel; import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.player.Player; import net.minecraftforge.network.NetworkEvent; import java.util.function.Supplier; public class MountSyncPacket { private final boolean isMounted; public MountSyncPacket(boolean isMounted) { this.isMounted = isMounted; } public void encode(FriendlyByteBuf buffer) { buffer.writeBoolean(isMounted); } public static MountSyncPacket decode(FriendlyByteBuf buffer) { return new MountSyncPacket(buffer.readBoolean()); } public void handle(NetworkEvent.Context context) { context.enqueueWork(() -> { ServerPlayer player = context.getSender(); // Get the player from the context if (player != null) { // Verifies if the player has dismounted if (!isMounted) { Entity vehicle = player.getVehicle(); if (vehicle instanceof MountableWolfEntity wolf) { // Logic to remove the player as a passenger wolf.removePassenger(player); System.out.println("Server: Player " + player.getName().getString() + " is no longer mounted."); } } } }); context.setPacketHandled(true); // Marks the packet as handled } } networkHandler package com.vals.valscraft.network; import com.vals.valscraft.valscraft; import net.minecraft.resources.ResourceLocation; import net.minecraftforge.network.NetworkRegistry; import net.minecraftforge.network.simple.SimpleChannel; import net.minecraftforge.network.NetworkEvent; import java.util.function.Supplier; public class NetworkHandler { private static final String PROTOCOL_VERSION = "1"; public static final SimpleChannel CHANNEL = NetworkRegistry.newSimpleChannel( new ResourceLocation(valscraft.MODID, "main"), () -> PROTOCOL_VERSION, PROTOCOL_VERSION::equals, PROTOCOL_VERSION::equals ); public static void init() { int packetId = 0; // Register the mount synchronization packet CHANNEL.registerMessage( packetId++, MountSyncPacket.class, MountSyncPacket::encode, MountSyncPacket::decode, (msg, context) -> msg.handle(context.get()) // Get the context with context.get() ); } }  
    • Do you use features of inventory profiles next (ipnext) or is there a change without it?
    • Remove rubidium - you are already using embeddium, which is a fork of rubidium
  • Topics

×
×
  • Create New...

Important Information

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