KrisCris / AllStackable

A highly customizable Minecraft Fabric Mod that makes items stackable and changes their stack size.
https://www.curseforge.com/minecraft/mc-mods/all-stackable/
GNU Lesser General Public License v3.0
13 stars 6 forks source link

Crash when bartering with Piglins 1.2.8 #8

Closed Cheeseburger23 closed 3 years ago

Cheeseburger23 commented 3 years ago

Game does a hard crash sometimes when bartering with Piglins. I think its after their looking at the gold ingot and go to cough up the new item.

---- Minecraft Crash Report ---- // Shall we play a game?

Time: 12/21/20 3:48 PM Description: Ticking entity

java.lang.NullPointerException: Ticking entity at me.connlost.allstackable.util.ItemsHelper.insertNewItem(ItemsHelper.java:143) at net.minecraft.class_1799.redirect$zch000$splitStackedTools(class_1799.java:1658) at net.minecraft.class_1799.method_7970(class_1799.java:315) at net.minecraft.class_1799.method_7956(class_1799.java:330) at net.minecraft.class_1764.method_7763(class_1764.java:236) at net.minecraft.class_1764.method_7777(class_1764.java:271) at net.minecraft.class_3745.method_24654(class_3745.java:33) at net.minecraft.class_4836.method_7105(class_4836.java:405) at net.minecraft.class_4810.method_24569(class_4810.java:96) at net.minecraft.class_4810.method_24573(class_4810.java:55) at net.minecraft.class_4810.method_18924(class_4810.java:20) at net.minecraft.class_4097.method_18923(class_4097.java:63) at net.minecraft.class_4095.method_19545(class_4095.java:521) at net.minecraft.class_4095.method_19542(class_4095.java:466) at net.minecraft.class_4836.method_5958(class_4836.java:324) at net.minecraft.class_1308.method_6023(class_1308.java:744) at net.minecraft.class_1309.method_6007(class_1309.java:2508) at net.minecraft.class_1308.method_6007(class_1308.java:542) at net.minecraft.class_1588.method_6007(class_1588.java:43) at net.minecraft.class_1309.method_5773(class_1309.java:2254) at net.minecraft.class_1308.method_5773(class_1308.java:342) at net.minecraft.class_3218.method_18762(class_3218.java:621) at net.minecraft.class_3218$$Lambda$6129/1879556335.accept(Unknown Source) at net.minecraft.class_1937.method_18472(class_1937.java:561) at net.minecraft.class_3218.method_18765(class_3218.java:411) at net.minecraft.server.MinecraftServer.method_3813(MinecraftServer.java:871) at net.minecraft.server.MinecraftServer.method_3748(MinecraftServer.java:811) at net.minecraft.class_1132.method_3748(class_1132.java:91) at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:670) at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:257) at net.minecraft.server.MinecraftServer$$Lambda$5778/1174310220.run(Unknown Source) at java.lang.Thread.run(Thread.java:745)

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

-- Head -- Thread: Server thread Stacktrace: at me.connlost.allstackable.util.ItemsHelper.insertNewItem(ItemsHelper.java:143) at net.minecraft.class_1799.redirect$zch000$splitStackedTools(class_1799.java:1658) at net.minecraft.class_1799.method_7970(class_1799.java:315) at net.minecraft.class_1799.method_7956(class_1799.java:330) at net.minecraft.class_1764.method_7763(class_1764.java:236) at net.minecraft.class_1764.method_7777(class_1764.java:271) at net.minecraft.class_3745.method_24654(class_3745.java:33) at net.minecraft.class_4836.method_7105(class_4836.java:405) at net.minecraft.class_4810.method_24569(class_4810.java:96) at net.minecraft.class_4810.method_24573(class_4810.java:55) at net.minecraft.class_4810.method_18924(class_4810.java:20) at net.minecraft.class_4097.method_18923(class_4097.java:63) at net.minecraft.class_4095.method_19545(class_4095.java:521) at net.minecraft.class_4095.method_19542(class_4095.java:466) at net.minecraft.class_4836.method_5958(class_4836.java:324) at net.minecraft.class_1308.method_6023(class_1308.java:744) at net.minecraft.class_1309.method_6007(class_1309.java:2508) at net.minecraft.class_1308.method_6007(class_1308.java:542) at net.minecraft.class_1588.method_6007(class_1588.java:43) at net.minecraft.class_1309.method_5773(class_1309.java:2254) at net.minecraft.class_1308.method_5773(class_1308.java:342) at net.minecraft.class_3218.method_18762(class_3218.java:621) at net.minecraft.class_3218$$Lambda$6129/1879556335.accept(Unknown Source)

-- Entity being ticked -- Details: Entity Type: minecraft:piglin (net.minecraft.class_4836) Entity ID: 6124 Entity Name: Piglin Entity's Exact location: 10.53, 87.00, 293.47 Entity's Block location: World: (10,87,293), Chunk: (at 10,5,5 in 0,18; contains blocks 0,0,288 to 15,255,303), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511) Entity's Momentum: 0.00, -0.08, 0.00 Entity's Passengers: [] Entity's Vehicle: ERROR NullPointerException: null Stacktrace: at net.minecraft.class_1937.method_18472(class_1937.java:561) at net.minecraft.class_3218.method_18765(class_3218.java:411)

-- Affected level -- Details: All players: 1 total; [class_3222['xxxxxxxxx'/143, l='ServerLevel[weee]', x=-90.39, y=90.00, z=283.42]] Chunk stats: ServerChunkCache: 8298 Level dimension: minecraft:the_nether Derived: true Level spawn location: World: (-256,65,-48), Chunk: (at 0,4,0 in -16,-3; contains blocks -256,0,-48 to -241,255,-33), Region: (-1,-1; contains chunks -32,-32 to -1,-1, blocks -512,0,-512 to -1,255,-1) Level time: 954620 game time, 1079620 day time Level name: weee Level game mode: Game mode: survival (ID 0). Hardcore: false. Cheats: false Level weather: Rain time: 145650 (now: false), thunder time: 38710 (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:871) at net.minecraft.server.MinecraftServer.method_3748(MinecraftServer.java:811) at net.minecraft.class_1132.method_3748(class_1132.java:91) at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:670) at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:257) at net.minecraft.server.MinecraftServer$$Lambda$5778/1174310220.run(Unknown Source) at java.lang.Thread.run(Thread.java:745)

-- System Details -- Details: Minecraft Version: 1.16.4 Minecraft Version ID: 1.16.4 Operating System: Windows 10 (amd64) version 10.0 Java Version: 1.8.0_51, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 6814160528 bytes (6498 MB) / 10603200512 bytes (10112 MB) up to 17179869184 bytes (16384 MB) CPUs: 16 JVM Flags: 9 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xss1M -Xmx16G -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M Fabric Mods: advancements-enlarger: Advancements Enlarger 0.2.3 allstackable: All Stackable 1.2.8 angerable-patch: Angerable Patch 1.1.0-1.16.4 anvil_fix: AnvilFix 1.1.3+build.7-1.16 appleskin: AppleSkin 1.0.11 ate: Iron Tnt 1.1.1 autoconfig1u: Auto Config v1 Updated 3.3.1 autofish: Autofish 0.9.1 beenfo: Beenfo 1.16.4-fabric0.25.1-1.3 betterend: Better End 0.8.1-beta bettermineshafts: YUNG's Better Mineshafts 1.16.4-1.0 betterthanmending: BetterThanMending 1.2.0 blast: BLAST 1.5 blue_endless_jankson: jankson + boostedbrightness: Boosted Brightness 1.1.0 campanion: Campanion 1.2.0+build.39 cardinal-components: Cardinal Components API 2.7.9 cardinal-components-base: Cardinal Components API (base) 2.7.9 cardinal-components-block: Cardinal Components API (blocks) 2.7.9 cardinal-components-chunk: Cardinal Components API (chunks) 2.7.9 cardinal-components-entity: Cardinal Components API (entities) 2.7.9 cardinal-components-item: Cardinal Components API (items) 2.7.9 cardinal-components-level: Cardinal Components API (world saves) 2.7.9 cardinal-components-scoreboard: Cardinal Components API (scoreboard) 2.7.9 cardinal-components-util: Cardinal Components API (utilities) 2.7.9 cardinal-components-world: Cardinal Components API (worlds) 2.7.9 chainmail: Chainmail 0.5.0 cloth-basic-math: Cloth Basic Math 0.5.1 cloth-client-events-v0: Cloth Client Events v0 1.4.5 cloth-config2: Cloth Config v4 4.8.3 cloth-dynamic-registry-api-v1: Cloth Dynamic Registry API v1 1.2.1 crowdin-translate: CrowdinTranslate 1.2 diggusmaximus: Diggus Maximus 1.4.2-1.16.3 disable_custom_worlds_advice: Disable Custom Worlds Advice 1.2 expandedstorage: ExpandedStorage 5.6.31 extratnt: Extra TNT 1.0.1 fabric: Fabric API 0.28.1+1.16 fabric-api-base: Fabric API Base 0.2.0+ab87788d3a fabric-biome-api-v1: Fabric Biome API (v1) 3.1.0+2e23b97c3a fabric-blockrenderlayer-v1: Fabric BlockRenderLayer Registration (v1) 1.1.4+6a2618f53a fabric-command-api-v1: Fabric Command API (v1) 1.0.9+6a2618f53a fabric-commands-v0: Fabric Commands (v0) 0.2.0+6a2618f53a fabric-containers-v0: Fabric Containers (v0) 0.1.9+a03e98793a fabric-content-registries-v0: Fabric Content Registries (v0) 0.2.0+e77439c73a fabric-crash-report-info-v1: Fabric Crash Report Info (v1) 0.1.2+b7f9825d3a fabric-dimensions-v1: fabric-dimensions-v1 2.0.1+9a6c75813a fabric-events-interaction-v0: Fabric Events Interaction (v0) 0.4.1+6a2618f53a fabric-events-lifecycle-v0: Fabric Events Lifecycle (v0) 0.2.0+6a2618f53a fabric-furnaces: Fabric Furnaces 1.3.2-1.16.2 fabric-game-rule-api-v1: Fabric Game Rule API (v1) 1.0.3+a4467d2a3a fabric-item-api-v1: Fabric Item API (v1) 1.2.0+6a2618f53a fabric-item-groups-v0: Fabric Item Groups (v0) 0.2.1+6a2618f53a fabric-key-binding-api-v1: Fabric Key Binding API (v1) 1.0.1+730711c63a fabric-keybindings-v0: Fabric Key Bindings (v0) 0.2.0+6a2618f53a fabric-language-kotlin: Fabric Language Kotlin 1.4.21+build.1 fabric-lifecycle-events-v1: Fabric Lifecycle Events (v1) 1.2.0+ffb68a873a fabric-loot-tables-v1: Fabric Loot Tables (v1) 1.0.1+6a2618f53a fabric-mining-levels-v0: Fabric Mining Levels (v0) 0.1.2+6a2618f53a fabric-models-v0: Fabric Models (v0) 0.1.1+6a2618f53a fabric-networking-api-v1: Fabric Networking API (v1) 1.0.0+4358fbc63a fabric-networking-blockentity-v0: Fabric Networking Block Entity (v0) 0.2.7+a03e98793a fabric-networking-v0: Fabric Networking (v0) 0.3.0+a03e98793a fabric-object-builder-api-v1: Fabric Object Builder API (v1) 1.9.2+6a2618f53a fabric-object-builders-v0: Fabric Object Builders (v0) 0.7.1+6a2618f53a fabric-particles-v1: fabric-particles-v1 0.2.2+6a2618f53a fabric-registry-sync-v0: Fabric Registry Sync (v0) 0.7.3+be155ae23a fabric-renderer-api-v1: Fabric Renderer API (v1) 0.3.3+6a2618f53a fabric-renderer-indigo: Fabric Renderer - Indigo 0.4.3+6a2618f53a fabric-renderer-registries-v1: Fabric Renderer Registries (v1) 2.2.0+6a2618f53a fabric-rendering-data-attachment-v1: Fabric Rendering Data Attachment (v1) 0.1.4+6a2618f53a fabric-rendering-fluids-v1: Fabric Rendering Fluids (v1) 0.1.12+6a2618f53a fabric-rendering-v0: Fabric Rendering (v0) 1.1.1+6a2618f53a fabric-rendering-v1: Fabric Rendering (v1) 1.4.0+6a2618f53a fabric-resource-loader-v0: Fabric Resource Loader (v0) 0.3.2+1944f3e03a fabric-screen-handler-api-v1: Fabric Screen Handler API (v1) 1.1.0+6a2618f53a fabric-structure-api-v1: Fabric Structure API (v1) 1.1.1+f1d8af063a fabric-tag-extensions-v0: Fabric Tag Extensions (v0) 1.1.0+e77439c73a fabric-textures-v0: Fabric Textures (v0) 1.0.5+6a2618f53a fabric-tool-attribute-api-v1: Fabric Tool Attribute API (v1) 1.2.5+6a2618f53a fabricloader: Fabric Loader 0.10.8 fallflyinglib: FallFlyingLib 1.1.0 fatxporbs: Fat Experience Orbs 0.0.9 flora-doubling: Flora Doubling 1.3.0+1.16.4-fabric gbfabrictools: GBfabrictools 1.3.2+1.16.4 godown: Go Down 0.2.0+1.16.1 greater_eye: Greater Eye of Ender 1.1.3 grindenchantments: Grind Enchantments 1.1.3+1.16.3 horsestatsvanilla: Horse Stats Vanilla 4.1.4 inventorysorter: Inventory Sorter 1.7.4-1.16 jankson: Jankson 3.0.1+j1.2.0 kibe: Kibe 1.5.2-BETA kyrptconfig: Kytpt Config 1.1.6-1.16 ladderwarp: LadderWarp 1.1.0+1.16.x launchersmod: Launchers 2.2.0 libblockattributes_core: LibBlockAttributes (Core) 0.8.3-pre.3 libblockattributes_fluids: LibBlockAttributes (Fluids) 0.8.3-pre.3 libcd: LibCapableData 3.0.3+1.16.3 libgui: LibGui 3.0.0+1.16.3 lightoverlay: Light Overlay 5.5.4 lithium: Lithium 0.6.0 lithium-api: Lithium API 0.6.0 magna: Magna 1.4.2-1.16.2 malilib: MaLiLib 0.10.0-dev.21+arne.2 minecraft: Minecraft 1.16.4 minihud: MiniHUD 0.19.0-dev.20201103.184029 mo_glass: Mo Glass 1.5-MC1.16.4 modmenu: Mod Menu 1.14.13+build.19 mostructures: Mo' Structures 1.0.1+mc.1.16.4 org_jetbrains_annotations: annotations 20.0.0 org_jetbrains_kotlin_kotlin-reflect: kotlin-reflect 1.4.21 org_jetbrains_kotlin_kotlin-stdlib: kotlin-stdlib 1.4.21 org_jetbrains_kotlin_kotlin-stdlib-jdk7: kotlin-stdlib-jdk7 1.4.21 org_jetbrains_kotlin_kotlin-stdlib-jdk8: kotlin-stdlib-jdk8 1.4.21 org_jetbrains_kotlinx_kotlinx-coroutines-core-jvm: kotlinx-coroutines-core-jvm 1.4.2 org_jetbrains_kotlinx_kotlinx-coroutines-jdk8: kotlinx-coroutines-jdk8 1.4.2 phosphor: Phosphor 0.6.0+build.7 plantusmaximus: Plantus Maximus 0.0.2-1.16.4 playerabilitylib: Pal 1.2.1 quickshulker: Quick Shulker 1.1.11-1.16 rare-ice: Rare Ice 0.2.2 reach-entity-attributes: Reach Entity Attribute 1.0.1 repurposed_structures: Repurposed Structures 1.16.4-1.7.3 ring_of_growth: Ring Of Growth 1.0.23 roughlyenoughitems: Roughly Enough Items 5.8.9 roughlyenoughitems-api: REI (API) 5.8.9 roughlyenoughitems-default-plugin: REI (Default Plugin) 5.8.9 roughlyenoughitems-runtime: REI (Runtime) 5.8.9 shulkerboxtooltip: Shulker Box Tooltip 2.3.3+1.16.4 sodium: Sodium 0.1.0 static-content: Static Content 1.0.1-1.16.2 staticdata: Static Data 1.1.2 stepup: StepUp 1.16.4-fabric0.25.1-1.1 toms_storage: Tom's Simple Storage Mod 1.1.3 torohealth: ToroHealth Damage Indicators 1.16.4-fabric-4 vanilla-hammers: Vanilla Hammers 3.0.1-1.16.3 voyager: Voyager 1.0.0 waystones: Waystones 1.0.10 wi_zoom: WI Zoom 1.3-MC1.16.4 winged: Winged Mod 1.16.2-1.4.1 xaerominimap: Xaero's Minimap 20.28.2 xaeroworldmap: Xaero's World Map 1.11.4 yungsapi: YUNG's API 1.16.4-Fabric-1 Player Count: 1 / 8; [class_3222['xxxxxxxxx'/143, l='ServerLevel[weee]', x=-90.39, y=90.00, z=283.42]] Data Packs: vanilla, fabric/extratnt, fabric/kibe, fabric/mo_glass, fabric/repurposed_structures, fabric/greater_eye, fabric/flora-doubling, fabric/launchersmod, fabric/fabric-tool-attribute-api-v1, fabric/rare-ice (incompatible), fabric/mostructures, fabric/expandedstorage, fabric/blast, fabric/toms_storage, fabric/ate, fabric/waystones, fabric/campanion, fabric/ring_of_growth, fabric/winged, fabric/fabric-furnaces, fabric/betterend, file/GGDK v1.0 data.zip, file/ICYTNT.zip, file/anvil-mending-e1820.zip, file/arcane-smithing-e1920.zip, file/bac_adv_hardcore, file/bac_advancements, file/blast-furnace-golden-stuff.zip, file/cauldron concrete v2.0.3.zip, file/illager-fortresses-v8-for-1-16-4.zip, file/infinity_buckets_by_jpdude98.zip, file/recipe-unlock-1565120749.zip, file/the-headsman-s-axe-e2400.zip, file/treecapitator-v2-6-2.zip, file/underminer-1556231214.zip, file/DatapackUtilities_pre6.zip, fabric/libcd, fabric/vanilla-hammers, file/graves v2.8.0.zip Type: Integrated Server (map_client.txt) Is Modded: Definitely; Client brand changed to 'fabric'

KrisCris commented 3 years ago

Thanks for letting me know!

Just realized that I may introduce a stupid bug when trying to fix another... Let me test it

KrisCris commented 3 years ago

I tried many times bartering with Piglins and just couldn't trigger this bug... According to the crash log, tho, I made some changes to the code, and potentially this bug is fixed.

Anyway, please test it :) AllStackable-1.2.9-1.16.x.jar.zip

Cheeseburger23 commented 3 years ago

I tried the new version with 3 different piglins, and it seems to be working well now. Thank you for the quick help.

KrisCris commented 3 years ago

Glad to hear that!