shiftthedev / PickableVillagers

IssueTracker for minecraft mod Pickable Villagers
0 stars 0 forks source link

Trader blocks crash server #29

Open taddmencer opened 1 day ago

taddmencer commented 1 day ago

Hello!

Been loving this mod. I've been using it on my servers, and my users absolutely love the ease.

HOWEVER .. we went from 1.20.4 and upgraded the server to 1.21.1 and that's where the issues started to happen.

Any villagers with trades in a chest when we upgraded, all trades where broken. Like, books said "enchanted book" and that was it. It would also cause the server to crash.

We cleared that issue by "firing" villagers.

BUT, some of the users decided to use the new trading blocks. Now the server crashes constantly. We can't get into the server long enough to remove them, and trying to clear with a setblock ~ ~ ~ air or something doesn't work.

My users are getting very frustrated and my next live stream is Monday and I usually stream from the server. Any insight on how to resolve would be fantastic.

---- Minecraft Crash Report ----
// I feel sad now :(

Time: 2024-11-15 03:43:44
Description: Ticking entity

java.lang.NullPointerException: Cannot invoke "dev.architectury.registry.registries.RegistrySupplier.get()" because "com.shiftthedev.pickablevillagers.PVRegistry.TRADER" is null
    at knot//net.minecraft.class_4295.handler$beh000$pickablevillagers$checkForTrader(class_4295.java:522)
    at knot//net.minecraft.class_4295.method_47038(class_4295.java)
    at knot//net.minecraft.class_7898$1.trigger(class_7898.java:53)
    at knot//net.minecraft.class_7894.method_18922(class_7894.java:20)
    at knot//net.minecraft.class_4095.method_18891(class_4095.java:736)
    at knot//net.minecraft.class_4095.method_19542(class_4095.java:492)
    at knot//net.minecraft.class_1646.method_5958(class_1646.java:279)
    at knot//net.minecraft.class_1308.method_6023(class_1308.java:811)
    at knot//net.minecraft.class_1309.method_6007(class_1309.java:2778)
    at knot//net.minecraft.class_1308.method_6007(class_1308.java:572)
    at knot//net.minecraft.class_1296.method_6007(class_1296.java:128)
    at knot//net.minecraft.class_1309.method_5773(class_1309.java:2507)
    at knot//net.minecraft.class_1308.method_5773(class_1308.java:372)
    at knot//net.minecraft.class_1646.method_5773(class_1646.java:320)
    at knot//net.minecraft.class_3218.method_18762(class_3218.java:770)
    at knot//net.minecraft.class_1937.method_18472(class_1937.java:498)
    at knot//net.minecraft.class_3218.method_31420(class_3218.java:408)
    at knot//net.minecraft.class_5574.method_31791(class_5574.java:54)
    at knot//net.minecraft.class_3218.method_18765(class_3218.java:372)
    at knot//net.minecraft.server.MinecraftServer.method_3813(MinecraftServer.java:1021)
    at knot//net.minecraft.class_3176.method_3813(class_3176.java:299)
    at knot//net.minecraft.server.MinecraftServer.method_3748(MinecraftServer.java:912)
    at knot//net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:697)
    at knot//net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:281)
    at java.base/java.lang.Thread.run(Thread.java:1583)

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

-- Head --
Thread: Server thread
Stacktrace:
    at knot//net.minecraft.class_4295.handler$beh000$pickablevillagers$checkForTrader(class_4295.java:522)
    at knot//net.minecraft.class_4295.method_47038(class_4295.java)
    at knot//net.minecraft.class_7898$1.trigger(class_7898.java:53)
    at knot//net.minecraft.class_7894.method_18922(class_7894.java:20)
    at knot//net.minecraft.class_4095.method_18891(class_4095.java:736)
    at knot//net.minecraft.class_4095.method_19542(class_4095.java:492)
    at knot//net.minecraft.class_1646.method_5958(class_1646.java:279)
    at knot//net.minecraft.class_1308.method_6023(class_1308.java:811)
    at knot//net.minecraft.class_1309.method_6007(class_1309.java:2778)
    at knot//net.minecraft.class_1308.method_6007(class_1308.java:572)
    at knot//net.minecraft.class_1296.method_6007(class_1296.java:128)
    at knot//net.minecraft.class_1309.method_5773(class_1309.java:2507)
    at knot//net.minecraft.class_1308.method_5773(class_1308.java:372)
    at knot//net.minecraft.class_1646.method_5773(class_1646.java:320)
    at knot//net.minecraft.class_3218.method_18762(class_3218.java:770)
    at knot//net.minecraft.class_1937.method_18472(class_1937.java:498)
    at knot//net.minecraft.class_3218.method_31420(class_3218.java:408)
    at knot//net.minecraft.class_5574.method_31791(class_5574.java:54)

-- Entity being ticked --
Details:
    Entity Type: minecraft:villager (net.minecraft.class_1646)
    Entity ID: 476
    Entity Name: Villager
    Entity's Exact location: 1729.50, 60.69, 1186.50
    Entity's Block location: World: (1729,60,1186), Section: (at 1,12,2 in 108,3,74; chunk contains blocks 1728,-64,1184 to 1743,319,1199), Region: (3,2; contains chunks 96,64 to 127,95, blocks 1536,-64,1024 to 2047,319,1535)
    Entity's Momentum: 0.00, 0.00, 0.00
    Entity's Passengers: []
    Entity's Vehicle: null
Stacktrace:
    at knot//net.minecraft.class_1937.method_18472(class_1937.java:498)
    at knot//net.minecraft.class_3218.method_31420(class_3218.java:408)
    at knot//net.minecraft.class_5574.method_31791(class_5574.java:54)
    at knot//net.minecraft.class_3218.method_18765(class_3218.java:372)
    at knot//net.minecraft.server.MinecraftServer.method_3813(MinecraftServer.java:1021)
    at knot//net.minecraft.class_3176.method_3813(class_3176.java:299)
    at knot//net.minecraft.server.MinecraftServer.method_3748(MinecraftServer.java:912)
    at knot//net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:697)
    at knot//net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:281)
    at java.base/java.lang.Thread.run(Thread.java:1583)

-- Affected level --
Details:
    All players: 1 total; [class_3222['LuvaniDarkwings'/475, l='ServerLevel[Chill]', x=1739.18, y=62.00, z=1208.89]]
    Chunk stats: 1682
    Level dimension: minecraft:overworld
    Level spawn location: World: (0,103,-16), Section: (at 0,7,0 in 0,6,-1; chunk contains blocks 0,-64,-16 to 15,319,-1), Region: (0,-1; contains chunks 0,-32 to 31,-1, blocks 0,-64,-512 to 511,319,-1)
    Level time: 226569357 game time, 170389960 day time
    Level name: Chill
    Level game mode: Game mode: survival (ID 0). Hardcore: false. Commands: false
    Level weather: Rain time: 55349 (now: false), thunder time: 61381 (now: false)
    Known server brands: fabric
    Removed feature flags: minecraft:update_1_21
    Level was modded: true
    Level storage version: 0x04ABD - Anvil
    Loaded entity count: 173
Stacktrace:
    at knot//net.minecraft.class_3218.method_8538(class_3218.java:1693)
    at knot//net.minecraft.server.MinecraftServer.method_3813(MinecraftServer.java:1024)
    at knot//net.minecraft.class_3176.method_3813(class_3176.java:299)
    at knot//net.minecraft.server.MinecraftServer.method_3748(MinecraftServer.java:912)
    at knot//net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:697)
    at knot//net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:281)
    at java.base/java.lang.Thread.run(Thread.java:1583)

-- System Details --
Details:
    Minecraft Version: 1.21.1
    Minecraft Version ID: 1.21.1
    Operating System: Linux (amd64) version 4.18.0-425.13.1.el8_7.x86_64
    Java Version: 21.0.2, Eclipse Adoptium
    Java VM Version: OpenJDK 64-Bit Server VM (mixed mode, sharing), Eclipse Adoptium
    Memory: 190838784 bytes (181 MiB) / 675282944 bytes (644 MiB) up to 7759462400 bytes (7400 MiB)
    CPUs: 4
    Processor Vendor: AuthenticAMD
    Processor Name: AMD Ryzen 7 5800X 8-Core Processor
    Identifier: AuthenticAMD Family 25 Model 33 Stepping 0
    Microarchitecture: Zen 3
    Frequency (GHz): -0.00
    Number of physical packages: 1
    Number of physical CPUs: 8
    Number of logical CPUs: 16
    Graphics card #0 name: unknown
    Graphics card #0 vendor: unknown
    Graphics card #0 VRAM (MiB): 0.00
    Graphics card #0 deviceId: unknown
    Graphics card #0 versionInfo: unknown
    Virtual memory max (MiB): 130960.73
    Virtual memory used (MiB): 146292.13
    Swap memory total (MiB): 66559.98
    Swap memory used (MiB): 33953.13
    Space in storage for jna.tmpdir (MiB): <path not set>
    Space in storage for org.lwjgl.system.SharedLibraryExtractPath (MiB): <path not set>
    Space in storage for io.netty.native.workdir (MiB): <path not set>
    Space in storage for java.io.tmpdir (MiB): available: 499.87, total: 500.00
    Space in storage for workdir (MiB): available: 1558529.13, total: 1826179.50
    JVM Flags: 5 total; -Xmx7400M -Xms128M -XX:MaxDirectMemorySize=600M -XX:MaxMetaspaceSize=1024M -XX:MaxRAMPercentage=90.0
    Fabric Mods: 
        architectury: Architectury 13.0.8
        armorposer: Armor Poser 6.1.3
        cloth-config: Cloth Config v15 15.0.140
            cloth-basic-math: cloth-basic-math 0.6.1
        dynmap: Dynmap 3.7-SNAPSHOT
        fabric-api: Fabric API 0.107.0+1.21.1
            fabric-api-base: Fabric API Base 0.4.42+6573ed8c19
            fabric-api-lookup-api-v1: Fabric API Lookup API (v1) 1.6.69+b559734419
            fabric-biome-api-v1: Fabric Biome API (v1) 13.0.30+be1ed2d719
            fabric-block-api-v1: Fabric Block API (v1) 1.0.22+0af3f5a719
            fabric-block-view-api-v2: Fabric BlockView API (v2) 1.0.10+6573ed8c19
            fabric-command-api-v1: Fabric Command API (v1) 1.2.49+f71b366f19
            fabric-command-api-v2: Fabric Command API (v2) 2.2.28+6ced4dd919
            fabric-commands-v0: Fabric Commands (v0) 0.2.66+df3654b319
            fabric-content-registries-v0: Fabric Content Registries (v0) 8.0.17+b559734419
            fabric-convention-tags-v1: Fabric Convention Tags 2.1.1+7f945d5b19
            fabric-convention-tags-v2: Fabric Convention Tags (v2) 2.9.1+7fd4837519
            fabric-crash-report-info-v1: Fabric Crash Report Info (v1) 0.2.29+0af3f5a719
            fabric-data-attachment-api-v1: Fabric Data Attachment API (v1) 1.2.0+e49211d819
            fabric-data-generation-api-v1: Fabric Data Generation API (v1) 20.2.22+16c4ae2519
            fabric-dimensions-v1: Fabric Dimensions API (v1) 4.0.0+6fc22b9919
            fabric-entity-events-v1: Fabric Entity Events (v1) 1.7.0+2122d82819
            fabric-events-interaction-v0: Fabric Events Interaction (v0) 0.7.13+ba9dae0619
            fabric-game-rule-api-v1: Fabric Game Rule API (v1) 1.0.53+6ced4dd919
            fabric-item-api-v1: Fabric Item API (v1) 11.1.1+d5debaed19
            fabric-item-group-api-v1: Fabric Item Group API (v1) 4.1.6+6823f7cd19
            fabric-lifecycle-events-v1: Fabric Lifecycle Events (v1) 2.4.0+0f6c53cd19
            fabric-loot-api-v2: Fabric Loot API (v2) 3.0.15+3f89f5a519
            fabric-loot-api-v3: Fabric Loot API (v3) 1.0.3+3f89f5a519
            fabric-message-api-v1: Fabric Message API (v1) 6.0.13+6573ed8c19
            fabric-networking-api-v1: Fabric Networking API (v1) 4.3.0+c7469b2119
            fabric-object-builder-api-v1: Fabric Object Builder API (v1) 15.2.1+40875a9319
            fabric-particles-v1: Fabric Particles (v1) 4.0.2+6573ed8c19
            fabric-recipe-api-v1: Fabric Recipe API (v1) 5.0.13+6508971219
            fabric-registry-sync-v0: Fabric Registry Sync (v0) 5.1.3+60c3209b19
            fabric-rendering-data-attachment-v1: Fabric Rendering Data Attachment (v1) 0.3.48+73761d2e19
            fabric-rendering-fluids-v1: Fabric Rendering Fluids (v1) 3.1.6+1daea21519
            fabric-resource-conditions-api-v1: Fabric Resource Conditions API (v1) 4.3.0+8dc279b119
            fabric-resource-loader-v0: Fabric Resource Loader (v0) 1.3.1+5b5275af19
            fabric-screen-handler-api-v1: Fabric Screen Handler API (v1) 1.3.87+b559734419
            fabric-transfer-api-v1: Fabric Transfer API (v1) 5.4.1+95bead5f19
            fabric-transitive-access-wideners-v1: Fabric Transitive Access Wideners (v1) 6.1.0+1daea21519
        fabricloader: Fabric Loader 0.16.9
            mixinextras: MixinExtras 0.4.1
        ferritecore: FerriteCore 7.0.2-hotfix
        forgeconfigapiport: Forge Config API Port 21.1.1
            com_electronwill_night-config_core: core 3.8.0
            com_electronwill_night-config_toml: toml 3.8.0
        java: OpenJDK 64-Bit Server VM 21
        lithium: Lithium 0.13.1
        minecraft: Minecraft 1.21.1
        mysql-jdbc: MySQL JDBC 8.0.33+20230506
        pickablevillagers: Pickable Villagers 2.0.2
        puzzleslib: Puzzles Lib 21.1.22
        sit: Sit 1.21-28
        spark: spark 1.10.109
            fabric-permissions-api-v0: fabric-permissions-api 0.3.1
        status: Status 1.21.1-1.0.6
        voicechat: Simple Voice Chat 1.21.1-2.5.25
    Server Running: true
    Player Count: 1 / 20; [class_3222['LuvaniDarkwings'/475, l='ServerLevel[Chill]', x=1739.18, y=62.00, z=1208.89]]
    Active Data Packs: vanilla, fabric, fabric-convention-tags-v2, pickablevillagers, file/anti enderman grief v1.1.9 (MC 1.21-1.21.3).zip, file/armor statues v2.8.14 (MC 1.21-1.21.3).zip, file/fast leaf decay v2.0.12 (MC 1.21-1.21.3).zip, file/mini blocks v1.0.1 (MC 1.21-1.21.3).zip, file/more mob heads v2.14.2 (MC 1.21-1.21.3).zip, file/multiplayer sleep v2.6.9 (MC 1.21-1.21.3).zip, file/player head drops v1.1.9 (MC 1.21-1.21.3).zip, file/silence mobs v1.2.3 (MC 1.21-1.21.3).zip, file/wandering trades v1.7.7 (MC 1.21-1.21.3).zip, file/timber v2.1.11 (MC 1.21-1.21.3).zip
    Available Data Packs: bundle, fabric, fabric-convention-tags-v2, file/anti enderman grief v1.1.9 (MC 1.21-1.21.3).zip, file/armor statues v2.8.14 (MC 1.21-1.21.3).zip, file/fast leaf decay v2.0.12 (MC 1.21-1.21.3).zip, file/mini blocks v1.0.1 (MC 1.21-1.21.3).zip, file/more mob heads v2.14.2 (MC 1.21-1.21.3).zip, file/multiplayer sleep v2.6.9 (MC 1.21-1.21.3).zip, file/player head drops v1.1.9 (MC 1.21-1.21.3).zip, file/silence mobs v1.2.3 (MC 1.21-1.21.3).zip, file/timber v2.1.11 (MC 1.21-1.21.3).zip, file/wandering trades v1.7.7 (MC 1.21-1.21.3).zip, pickablevillagers, trade_rebalance, vanilla
    Enabled Feature Flags: minecraft:vanilla
    World Generation: Stable
    World Seed: 6765086925720439653
    Is Modded: Definitely; Server brand changed to 'fabric'
    Type: Dedicated Server (map_server.txt)
taddmencer commented 1 day ago

I did disable the trader block from being used going forward but the damage is done and I can't get out of the death loop.

Is there a kill command I can run to remove all instances of the block from the server command line?

shiftthedev commented 1 day ago

First of all, sorry this happen. Now, the enchanted book issue is probably something to do with the changes to Minecraft code itself, and unfortunately a retro-fix isn't possible, but I'll try to fix it so it won't happen in the future.

Did the Trader crash happen before or after you disabled it? And by disable you mean you went into the config and set "TraderBlock": false ?

taddmencer commented 1 day ago

First of all, sorry this happen. Now, the enchanted book issue is probably something to do with the changes to Minecraft code itself, and unfortunately a retro-fix isn't possible, but I'll try to fix it so it won't happen in the future.

Did the Trader crash happen before or after you disabled it? And by disable you mean you went into the config and set "TraderBlock": false ?

The books I don't care as much about. It is what it is.

the crash was happening before - I disabled it - still happening because the blocks are still technically there. And yes, in the config:

{ "SneakRightClick": true, "KeyShortcut": true, "InventoryTrade": true, "OnlyAdults": true, "PickupCostMultiplier": 0, // Use Open Parties and Claims Chunk claim protection. "UseOPACClaimProtection": false, // Enable / Disable trader block. "TraderBlock": false }

shiftthedev commented 1 day ago

And is always the same crash? the one you shared above?

taddmencer commented 1 day ago

Yeah, always a villager it seems. I considered disabling the mod, but I don't want anyone who has a chest load of legit villagers losing their chest full of .. legit-agers.

shiftthedev commented 1 day ago

OK. I'll do a small fix that should stop that crash.

taddmencer commented 1 day ago

Perfection - thank you so much.

shiftthedev commented 1 day ago

If you can,

taddmencer commented 1 day ago

OK - tested it out, have it running. Went to all the locations and seemed to be great!

thank you! (donated a thanks!)

shiftthedev commented 1 day ago

Happy it worked fine. Thank you for the tip.