NullPointerException in DraftOut Piglin barter redirect when LockoutServer.server is null Description: The game crashes with a NullPointerException when a Piglin triggers barter-related behavior. DraftOut injects into PiglinAi.stopHoldingOffHandItem, and its redirect calls LockoutServer.server.overworld(). However, LockoutServer.server is null, causing the crash. This happens in a singleplayer/integrated server environment. I have confirmed this is not a version mismatch issue; the crash is directly caused by an uninitialized LockoutServer.server being accessed without a null check. Steps to Reproduce: Launch Minecraft with DraftOut installed. Enter a world (singleplayer or integrated server). Find a Piglin. Give the Piglin a gold ingot, or wait for it to stop holding the gold ingot. The game crashes when the Piglin processes the barter/stop-holding behavior. Expected Behavior: Piglin bartering should work normally without crashing. DraftOut should either fall back to vanilla behavior or safely handle the case where LockoutServer.server is not initialized. Actual Behavior: The server thread crashes while ticking the Piglin entity. The client also crashes with a reported exception. Crash Report / Stack Trace (key part): text 复制 下载 [13:58:30] [Server thread/ERROR]: Encountered an unexpected exception net.minecraft.ReportedException: Ticking entity at knot//net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1142) ... Caused by: java.lang.NullPointerException: Cannot invoke "net.minecraft.server.MinecraftServer.overworld()" because "com.draftoutmc.draftout.server.LockoutServer.server" is null at knot//net.minecraft.world.entity.monster.piglin.PiglinAi.modifyExpressionValue$zba000$draftout$redirectBarterItems(PiglinAi.java:996) at knot//net.minecraft.world.entity.monster.piglin.PiglinAi.stopHoldingOffHandItem(PiglinAi.java:384) at knot//net.minecraft.world.entity.monster.piglin.StopHoldingItemIfNoLongerAdmiring.lambda$create$2(StopHoldingItemIfNoLongerAdmiring.java:18) at knot//net.minecraft.world.entity.ai.behavior.declarative.BehaviorBuilder$1.trigger(BehaviorBuilder.java:53) at knot//net.minecraft.world.entity.ai.behavior.OneShot.tryStart(OneShot.java:18) at knot//net.minecraft.world.entity.ai.Brain.startEachNonRunningBehavior(Brain.java:663) at knot//net.minecraft.world.entity.ai.Brain.tick(Brain.java:438) at knot//net.minecraft.world.entity.monster.piglin.Piglin.customServerAiStep(Piglin.java:292) ... Environment: Minecraft: 26.1.1 Fabric Loader: 0.19.3 DraftOut: 1.16.0 Fabric API: 0.149.1+26.1.2 Java: 25 (Azul Zulu 25.36+15-CA) OS: Windows (MultiMC instance) Other mods present: Lithium, Sodium, Planifolia, Hermes, SpeedrunAPI, etc. Analysis: DraftOut’s Mixin into PiglinAi assumes that com.draftoutmc.draftout.server.LockoutServer.server is always initialized. In this scenario, it is null. When PiglinAi.stopHoldingOffHandItem runs, DraftOut’s redirect redirectBarterItems calls LockoutServer.server.overworld(), which immediately throws a NullPointerException. This crashes the entity tick and then the entire integrated server. The crash is not caused by a version mismatch. It is a missing null check or an initialization order problem in DraftOut. The LockoutServer instance is not available at the time the Piglin barter logic executes, but the Mixin still tries to use it. Suggested Fix: Add a null check in redirectBarterItems. If LockoutServer.server is null, return the original/vanilla barter logic instead of calling .overworld(). Ensure LockoutServer.server is properly initialized before any Piglin AI ticks, or only apply the redirect when a DraftOut match/lockout session is active. Consider guarding the Mixin with a condition that checks whether DraftOut’s server context is ready. Additional Context: Before the crash, there were repeated errors: Can't access registry ResourceKey[minecraft:root / minecraft:enchantment] These may be unrelated, but they appeared in the same session. The fatal issue is the NullPointerException on LockoutServer.server.