paulevsGitch / BetterNether

BetterNether Mod
GNU General Public License v3.0
105 stars 75 forks source link

Running AdventureZ causes game crash when loading chunk with BetterNether mob spawners [Bug] #457

Closed Minothilos closed 2 years ago

Minothilos commented 2 years ago

What happened?

This was first discovered in a 1.18 modpack running a ton of mods so it's possible this happens with other mods but running only BetterNether 6.0.2 and AdventureZ 1.4.5 (+ newest version of dependencies). (Also runs Xaero's mini+world map to find the sctructure in shortest time possible) I don't know the name of the structure but it's the large square one with multiple different spawners (the only one with spawners from what I've seen) and when it's approached it will eventually crash the game. Thanks in advance!

BetterNether

6.0.2

BCLib

1.0.2

Fabric API

0.44.0+1.18

Fabric Loader

0.12.8

Minecraft

1.18

Relevant log output

---- Minecraft Crash Report ----
// Surprise! Haha. Well, this is awkward.

Time: 12/9/21, 6:06 PM
Description: Ticking block entity

java.util.NoSuchElementException: No value present
    at java.base/java.util.Optional.get(Optional.java:143)
    at net.minecraft.class_1917.handler$zzn000$serverTickMixin(class_1917.java:528)
    at net.minecraft.class_1917.method_31588(class_1917.java:91)
    at net.minecraft.class_2636.method_31697(class_2636.java:54)
    at net.minecraft.class_2818$class_5563.method_31703(class_2818.java:659)
    at net.minecraft.class_2818$class_5564.method_31703(class_2818.java:713)
    at net.minecraft.class_1937.method_18471(class_1937.java:477)
    at net.minecraft.class_3218.method_18765(class_3218.java:362)
    at net.minecraft.server.MinecraftServer.method_3813(MinecraftServer.java:879)
    at net.minecraft.server.MinecraftServer.method_3748(MinecraftServer.java:823)
    at net.minecraft.class_1132.method_3748(class_1132.java:99)
    at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:684)
    at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:270)
    at java.base/java.lang.Thread.run(Thread.java:833)

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

-- Head --
Thread: Server thread
Stacktrace:
    at java.base/java.util.Optional.get(Optional.java:143)
    at net.minecraft.class_1917.handler$zzn000$serverTickMixin(class_1917.java:528)
    at net.minecraft.class_1917.method_31588(class_1917.java:91)
    at net.minecraft.class_2636.method_31697(class_2636.java:54)
    at net.minecraft.class_2818$class_5563.method_31703(class_2818.java:659)
    at net.minecraft.class_2818$class_5564.method_31703(class_2818.java:713)
    at net.minecraft.class_1937.method_18471(class_1937.java:477)
    at net.minecraft.class_3218.method_18765(class_3218.java:362)

-- Block entity being ticked --
Details:
    Name: minecraft:mob_spawner // net.minecraft.class_2636
    Block: Block{minecraft:spawner}
    Block location: World: (-1952,36,2781), Section: (at 0,4,13 in -122,2,173; chunk contains blocks -1952,0,2768 to -1937,255,2783), Region: (-4,5; contains chunks -128,160 to -97,191, blocks -2048,0,2560 to -1537,255,3071)
    Block: Block{minecraft:spawner}
    Block location: World: (-1952,36,2781), Section: (at 0,4,13 in -122,2,173; chunk contains blocks -1952,0,2768 to -1937,255,2783), Region: (-4,5; contains chunks -128,160 to -97,191, blocks -2048,0,2560 to -1537,255,3071)
Stacktrace:
    at net.minecraft.class_2818$class_5563.method_31703(class_2818.java:659)
    at net.minecraft.class_2818$class_5564.method_31703(class_2818.java:713)
    at net.minecraft.class_1937.method_18471(class_1937.java:477)
    at net.minecraft.class_3218.method_18765(class_3218.java:362)
    at net.minecraft.server.MinecraftServer.method_3813(MinecraftServer.java:879)
    at net.minecraft.server.MinecraftServer.method_3748(MinecraftServer.java:823)
    at net.minecraft.class_1132.method_3748(class_1132.java:99)
    at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:684)
    at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:270)
    at java.base/java.lang.Thread.run(Thread.java:833)

-- Affected level --
Details:
    All players: 1 total; [class_3222['Minothilos'/159, l='ServerLevel[New World]', x=-1952.68, y=33.00, z=2793.59]]
    Chunk stats: 957
    Level dimension: minecraft:the_nether
    Derived: true
    Level spawn location: World: (-128,75,-64), Section: (at 0,11,0 in -8,4,-4; chunk contains blocks -128,0,-64 to -113,255,-49), Region: (-1,-1; contains chunks -32,-32 to -1,-1, blocks -512,0,-512 to -1,255,-1)
    Level time: 20309 game time, 20309 day time
    Level name: New World
    Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: true
    Level weather: Rain time: 67174 (now: false), thunder time: 19509 (now: false)
    Known server brands: fabric
    Level was modded: true
    Level storage version: 0x04ABD - Anvil
Stacktrace:
    at net.minecraft.server.MinecraftServer.method_3813(MinecraftServer.java:879)
    at net.minecraft.server.MinecraftServer.method_3748(MinecraftServer.java:823)
    at net.minecraft.class_1132.method_3748(class_1132.java:99)
    at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:684)
    at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:270)
    at java.base/java.lang.Thread.run(Thread.java:833)

-- System Details --
Details:
    Minecraft Version: 1.18
    Minecraft Version ID: 1.18
    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: 877656064 bytes (836 MiB) / 3854565376 bytes (3676 MiB) up to 4294967296 bytes (4096 MiB)
    CPUs: 8
    Processor Vendor: GenuineIntel
    Processor Name: Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz
    Identifier: Intel64 Family 6 Model 60 Stepping 3
    Microarchitecture: Haswell (Client)
    Frequency (GHz): 3.60
    Number of physical packages: 1
    Number of physical CPUs: 4
    Number of logical CPUs: 8
    Graphics card #0 name: NVIDIA GeForce GTX 970
    Graphics card #0 vendor: NVIDIA (0x10de)
    Graphics card #0 VRAM (MB): 4095.00
    Graphics card #0 deviceId: 0x13c2
    Graphics card #0 versionInfo: DriverVersion=30.0.14.9613
    Memory slot #0 capacity (MB): 4096.00
    Memory slot #0 clockSpeed (GHz): 1.60
    Memory slot #0 type: DDR3
    Memory slot #1 capacity (MB): 4096.00
    Memory slot #1 clockSpeed (GHz): 1.60
    Memory slot #1 type: DDR3
    Virtual memory max (MB): 19383.92
    Virtual memory used (MB): 13463.55
    Swap memory total (MB): 11264.00
    Swap memory used (MB): 1247.74
    JVM Flags: 4 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xss1M -Xmx4096m -Xms256m
    Fabric Mods: 
        adventurez: AdventureZ 1.4.5
        bclib: BCLib 1.0.2
        betternether: Better Nether 6.0.2
        cloth-basic-math: cloth-basic-math 0.6.0
        cloth-config: Cloth Config v6 6.0.45
        fabric: Fabric API 0.44.0+1.18
        fabric-api-base: Fabric API Base 0.4.1+b4f4f6cdc8
        fabric-api-lookup-api-v1: Fabric API Lookup API (v1) 1.4.0+16d92c47c8
        fabric-biome-api-v1: Fabric Biome API (v1) 6.0.1+ded849a9c8
        fabric-blockrenderlayer-v1: Fabric BlockRenderLayer Registration (v1) 1.1.9+3ac43d95c8
        fabric-command-api-v1: Fabric Command API (v1) 1.1.6+3ac43d95c8
        fabric-commands-v0: Fabric Commands (v0) 0.2.5+b4f4f6cdc8
        fabric-containers-v0: Fabric Containers (v0) 0.1.18+d154e2c6c8
        fabric-content-registries-v0: Fabric Content Registries (v0) 0.4.5+6f53a73dc8
        fabric-crash-report-info-v1: Fabric Crash Report Info (v1) 0.1.8+3ac43d95c8
        fabric-dimensions-v1: Fabric Dimensions API (v1) 2.1.7+43d29571c8
        fabric-entity-events-v1: Fabric Entity Events (v1) 1.4.5+6b21378ac8
        fabric-events-interaction-v0: Fabric Events Interaction (v0) 0.4.16+bfa23f17c8
        fabric-events-lifecycle-v0: Fabric Events Lifecycle (v0) 0.2.6+b4f4f6cdc8
        fabric-game-rule-api-v1: Fabric Game Rule API (v1) 1.0.10+3ac43d95c8
        fabric-item-api-v1: Fabric Item API (v1) 1.3.0+691a79b5c8
        fabric-item-groups-v0: Fabric Item Groups (v0) 0.3.3+3ac43d95c8
        fabric-key-binding-api-v1: Fabric Key Binding API (v1) 1.0.8+c8aba2f3c8
        fabric-keybindings-v0: Fabric Key Bindings (v0) 0.2.6+b4f4f6cdc8
        fabric-lifecycle-events-v1: Fabric Lifecycle Events (v1) 1.4.10+c15ca335c8
        fabric-loot-tables-v1: Fabric Loot Tables (v1) 1.0.8+3ac43d95c8
        fabric-mining-level-api-v1: Fabric Mining Level API (v1) 1.0.3+3ac43d95c8
        fabric-mining-levels-v0: Fabric Mining Levels (v0) 0.1.7+b4f4f6cdc8
        fabric-models-v0: Fabric Models (v0) 0.3.3+3ac43d95c8
        fabric-networking-api-v1: Fabric Networking API (v1) 1.0.18+3ac43d95c8
        fabric-networking-v0: Fabric Networking (v0) 0.3.5+b4f4f6cdc8
        fabric-object-builder-api-v1: Fabric Object Builder API (v1) 1.11.0+3b82842ec8
        fabric-object-builders-v0: Fabric Object Builders (v0) 0.7.8+3ac43d95c8
        fabric-particles-v1: Fabric Particles (v1) 0.2.9+526dc1acc8
        fabric-registry-sync-v0: Fabric Registry Sync (v0) 0.8.5+3ac43d95c8
        fabric-renderer-api-v1: Fabric Renderer API (v1) 0.4.9+3ac43d95c8
        fabric-renderer-indigo: Fabric Renderer - Indigo 0.4.12+3ac43d95c8
        fabric-renderer-registries-v1: Fabric Renderer Registries (v1) 3.2.7+b4f4f6cdc8
        fabric-rendering-data-attachment-v1: Fabric Rendering Data Attachment (v1) 0.3.4+7242e9d7c8
        fabric-rendering-fluids-v1: Fabric Rendering Fluids (v1) 0.1.18+3ac43d95c8
        fabric-rendering-v0: Fabric Rendering (v0) 1.1.9+b4f4f6cdc8
        fabric-rendering-v1: Fabric Rendering (v1) 1.10.3+6b21378ac8
        fabric-resource-loader-v0: Fabric Resource Loader (v0) 0.4.11+3ac43d95c8
        fabric-screen-api-v1: Fabric Screen API (v1) 1.0.7+3ac43d95c8
        fabric-screen-handler-api-v1: Fabric Screen Handler API (v1) 1.1.11+3ac43d95c8
        fabric-structure-api-v1: Fabric Structure API (v1) 2.0.8+295197a7c8
        fabric-tag-extensions-v0: Fabric Tag Extensions (v0) 1.2.5+3ac43d95c8
        fabric-textures-v0: Fabric Textures (v0) 1.0.9+3ac43d95c8
        fabric-tool-attribute-api-v1: Fabric Tool Attribute API (v1) 1.3.4+7de09f55c8
        fabric-transfer-api-v1: Fabric Transfer API (v1) 1.5.5+b4f4f6cdc8
        fabricloader: Fabric Loader 0.12.8
        java: OpenJDK 64-Bit Server VM 17
        minecraft: Minecraft 1.18
        xaerominimap: Xaero's Minimap 21.22.3.1
        xaeroworldmap: Xaero's World Map 1.18.6.1
    Server Running: true
    Player Count: 1 / 8; [class_3222['Minothilos'/159, l='ServerLevel[New World]', x=-1952.68, y=33.00, z=2793.59]]
    Data Packs: vanilla, Fabric Mods
    Type: Integrated Server (map_client.txt)
    Is Modded: Definitely; Client brand changed to 'fabric'; Server brand changed to 'fabric'

Other Mods

AdventureZ 1.4.5
Cloth Config API (Fabric) 6.0.45
Xaero's Minimap 21.22.3.1
Xaero's World Map 1.18.6.1
quiqueck commented 2 years ago

Thanks for reporting. Do you have the seed of that world from the error log you attached? And is this a new 1.18 world or a converted one from a previous game version?

mr-poyo commented 2 years ago

Hello,

I am also experiencing this crash. Brand new world.

better-nether-6.0.2.jar fabric-api-0.44.0+1.18.jar fabric loader: 0.12.8 Minecraft 1.18

Crash Report: https://pastebin.com/vW2hnxfa

I was flying around in creative mode, exploring the BetterNether in my custom modpack. For me, the crash happened when I approached a black building structure. I approached it and crashed, and can no longer enter this world.

Update: Created a new world and replicated the crash. Took a screen shot of the structure. 2021-12-10_10 54 43

Minothilos commented 2 years ago

I didn't have the seed from the inital test but I replicated the crash again with the seed 8251594535286918331 (I've perlicated several times, seed doesn't seem to make a difference) Picture of the structure (same as for mr-poyo) 2021-12-10_12 48 43 This instance runs the same mods as my intial post but no Cloth Config API (I only meant to go back and install 6.0.42, down from the newest version 6.0.45 but it looks like it just got removed completely)

Another log: https://pastebin.com/DxaayAqu

Cloth Config API have also recieved updates in the past days so I tried running the latest version (6.0.45) to begin with (all the other mods from initial test were the same) to see if there was a difference and the game crashed as soon as I approached the first BetterNether structure I could find which was the smaller blackstone temple without spawners, I was then unable to rejoin the world. I tried to replicate with a new world however and had no problem approaching spawnerless structures, but the larger temple still caused a crash when approached. I'm pasting the seed and log for that aswell, just in case. -5936975925744017617 https://pastebin.com/Fzv9Uk0u

quiqueck commented 2 years ago

6.0.3 will fix this for newly generated structures. However, since this is a bug in the way spawners were placed, existing worlds are not fixed. You can delete the affected chunks manually and the regenerated structures should get the fix

chgeri commented 2 years ago

6.0.3 will fix this for newly generated structures. However, since this is a bug in the way spawners were placed, existing worlds are not fixed. You can delete the affected chunks manually and the regenerated structures should get the fix

How exactly can you delete the affected chunks? Having the same issue with the same structure and would love to know. Or perhaps a way to remove the structure/spawners in the structure from the game entirely.

quiqueck commented 2 years ago

https://github.com/Querz/mcaselector is a great UI-tool to select and delete multiple chunks fro a world It even has filters where it can select chunks based on the time you spent there.

Didn't try it for 1.18 worlds tho

mr-poyo commented 2 years ago

You could probably do a command as well with /fill* of some sort. You should be able to get close enough and run the command.

Edit: Actually sounds like a fun exercise. Let me test it out.

Update: Albeit, not exactly practical, it worked! Best for anybody who only generated a few of these structures. I lined myself up to the negative/negative side of the structure and I ran this command: /fill ~ ~-1 ~ ~75 ~3 ~75 air replace minecraft:spawner Slowly made my way close to it going up and down.

Could probably do this easier with a command block, but it was nice for a test run. Do note this won't regenerate the proper spawners, it just replaces them with air.

quiqueck commented 2 years ago

I'll close the issue for now. If you still have problems in new worlds, please re-open.