[1.17.1] Crash upon ticking entity
Friskygote opened this issue ยท 2 comments
Hello!
I have just updated Bewitchment and stumbled upon this crash.
---- Minecraft Crash Report ----
// Sorry :(
Time: 9/21/21, 2:06 PM
Description: Ticking entity
java.lang.NullPointerException: Cannot invoke "net.minecraft.class_2371.size()" because "inventory" is null
at moriyashiine.bewitchment.api.BewitchmentAPI.getPoppetFromInventory(BewitchmentAPI.java:81)
at moriyashiine.bewitchment.api.BewitchmentAPI.getPoppet(BewitchmentAPI.java:109)
at net.minecraft.class_1309.localvar$bof004$modifyDamage(class_1309.java:22119)
at net.minecraft.class_1309.method_6132(class_1309.java)
at net.minecraft.class_1309.method_6074(class_1309.java:1617)
at net.minecraft.class_1309.method_5643(class_1309.java:1099)
at net.minecraft.class_1297.method_5670(class_1297.java:486)
at net.minecraft.class_1309.method_5670(class_1309.java:342)
at net.minecraft.class_1308.method_5670(class_1308.java:272)
at net.minecraft.class_1297.method_5773(class_1297.java:444)
at net.minecraft.class_1309.method_5773(class_1309.java:2308)
at net.minecraft.class_1308.method_5773(class_1308.java:339)
at net.minecraft.class_1613.method_5773(class_1613.java:71)
at net.minecraft.class_3218.method_18762(class_3218.java:655)
at net.minecraft.class_1937.method_18472(class_1937.java:483)
at net.minecraft.class_3218.method_31420(class_3218.java:417)
at net.minecraft.class_5574.method_31791(class_5574.java:54)
at net.minecraft.class_3218.method_18765(class_3218.java:392)
at net.minecraft.server.MinecraftServer.method_3813(MinecraftServer.java:891)
at net.minecraft.class_3176.method_3813(class_3176.java:335)
at net.minecraft.server.MinecraftServer.method_3748(MinecraftServer.java:831)
at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:697)
at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:270)
at java.base/java.lang.Thread.run(Thread.java:831)
A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------
-- Head --
Thread: Server thread
Stacktrace:
at moriyashiine.bewitchment.api.BewitchmentAPI.getPoppetFromInventory(BewitchmentAPI.java:81)
at moriyashiine.bewitchment.api.BewitchmentAPI.getPoppet(BewitchmentAPI.java:109)
at net.minecraft.class_1309.localvar$bof004$modifyDamage(class_1309.java:22119)
at net.minecraft.class_1309.method_6132(class_1309.java)
at net.minecraft.class_1309.method_6074(class_1309.java:1617)
at net.minecraft.class_1309.method_5643(class_1309.java:1099)
at net.minecraft.class_1297.method_5670(class_1297.java:486)
at net.minecraft.class_1309.method_5670(class_1309.java:342)
at net.minecraft.class_1308.method_5670(class_1308.java:272)
at net.minecraft.class_1297.method_5773(class_1297.java:444)
at net.minecraft.class_1309.method_5773(class_1309.java:2308)
at net.minecraft.class_1308.method_5773(class_1308.java:339)
at net.minecraft.class_1613.method_5773(class_1613.java:71)
at net.minecraft.class_3218.method_18762(class_3218.java:655)
-- Entity being ticked --
Details:
Entity Type: minecraft:skeleton (net.minecraft.class_1613)
Entity ID: 103
Entity Name: Skeleton
Entity's Exact location: 172.74, 72.00, 194.72
Entity's Block location: World: (172,72,194), Section: (at 12,8,2 in 10,4,12; chunk contains blocks 160,0,192 to 175,255,207), 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: null
Stacktrace:
at net.minecraft.class_1937.method_18472(class_1937.java:483)
at net.minecraft.class_3218.method_31420(class_3218.java:417)
at net.minecraft.class_5574.method_31791(class_5574.java:54)
at net.minecraft.class_3218.method_18765(class_3218.java:392)
-- Affected level --
Details:
Chunk stats: 2142
Level dimension: minecraft:overworld
Level spawn location: World: (-16,80,208), Section: (at 0,0,0 in -1,5,13; chunk contains blocks -16,0,208 to -1,255,223), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,0,0 to -1,255,511)
Level time: 20450777 game time, 21905306 day time
Level name: world
Level game mode: Game mode: survival (ID 0). Hardcore: false. Cheats: false
Level weather: Rain time: 76250 (now: false), thunder time: 57174 (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:891)
at net.minecraft.class_3176.method_3813(class_3176.java:335)
at net.minecraft.server.MinecraftServer.method_3748(MinecraftServer.java:831)
at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:697)
at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:270)
at java.base/java.lang.Thread.run(Thread.java:831)
-- System Details --
Details:
Minecraft Version: 1.17.1
Minecraft Version ID: 1.17.1
Identifier: Intel64 Family 6 Model 60 Stepping 3
Microarchitecture: Haswell (Client)
Frequency (GHz): 4.00
Number of physical packages: 1
Number of physical CPUs: 4
Number of logical CPUs: 8
Graphics card #0 name: Tonga PRO [Radeon R9 285/380]
Graphics card #0 vendor: Advanced Micro Devices, Inc. [AMD/ATI] (0x1002)
Graphics card #0 VRAM (MB): 258.00
Graphics card #0 deviceId: 0x6939
Graphics card #0 versionInfo: unknown
Virtual memory max (MB): 12946.70
Virtual memory used (MB): 14830.92
Swap memory total (MB): 4970.71
Swap memory used (MB): 110.87
JVM Flags: 2 total; -Xmx4G -Xms4G
Fabric Mods:
additionaladditions: Additional Additions 2.1.3
adorn: Adorn 2.1.5+1.17.1
alloy_forgery: Alloy Forgery 2.0.3
arfo: Artificial Foliage 1.9
awokenworld: Awoken World 1.2.0-beta
bclib: BCLib 0.3.1
betterbeacon: Better Beacons 1.0.5
betterend: Better End 0.11.0-pre
bewitchment: Bewitchment 1.17-6
blue_endless_jankson: jankson 1.2.1
cardinal-components-base: Cardinal Components API (base) 3.0.0
cardinal-components-entity: Cardinal Components API (entities) 3.0.0
charm: Charm 3.3.2
cloth-api: Cloth API 2.0.54
cloth-basic-math: Cloth Basic Math 0.5.1
cloth-client-events-v0: Cloth Client Events v0 2.0.54
cloth-common-events-v1: Cloth Common Events v1 2.0.54
cloth-config2: Cloth Config v5 5.0.38
cloth-datagen-api-v1: Cloth Datagen v1 2.0.54
cloth-utils-v1: Cloth Utils v1 2.0.54
colouredmoss: Colorful Azaleas 1.2
com_electronwill_night-config_core: core 3.6.2
com_electronwill_night-config_toml: toml 3.6.2
com_moandjiezana_toml_toml4j: toml4j 0.7.2
compressed: Compressed Mod 1.3.3
cpm: Customizable Player Models 0.1.0a
environmentz: EnvironmentZ 1.1.5
extraalchemy: Extra Alchemy 1.6.1
fabric: Fabric API 0.40.1+1.17
fabric-api-base: Fabric API Base 0.3.0+a02b4463d5
fabric-api-lookup-api-v1: Fabric API Lookup API (v1) 1.3.0+cbda931818
fabric-biome-api-v1: Fabric Biome API (v1) 3.2.0+cbda931818
fabric-command-api-v1: Fabric Command API (v1) 1.1.3+5ab9934c18
fabric-commands-v0: Fabric Commands (v0) 0.2.2+92519afa18
fabric-containers-v0: Fabric Containers (v0) 0.1.12+cbda931818
fabric-content-registries-v0: Fabric Content Registries (v0) 0.3.0+cbda931818
fabric-crash-report-info-v1: Fabric Crash Report Info (v1) 0.1.5+be9da31018
fabric-dimensions-v1: Fabric Dimensions API (v1) 2.0.11+6cefd57718
fabric-entity-events-v1: Fabric Entity Events (v1) 1.2.3+87cc6e4c18
fabric-events-interaction-v0: Fabric Events Interaction (v0) 0.4.10+fc40aa9d18
fabric-events-lifecycle-v0: Fabric Events Lifecycle (v0) 0.2.1+92519afa18
fabric-game-rule-api-v1: Fabric Game Rule API (v1) 1.0.7+cbda931818
fabric-item-api-v1: Fabric Item API (v1) 1.2.4+cbda931818
fabric-item-groups-v0: Fabric Item Groups (v0) 0.2.10+b7ab612118
fabric-language-kotlin: Fabric Language Kotlin 1.6.2+kotlin.1.5.20
fabric-lifecycle-events-v1: Fabric Lifecycle Events (v1) 1.4.4+a02b446318
fabric-loot-tables-v1: Fabric Loot Tables (v1) 1.0.4+a02b446318
fabric-mining-levels-v0: Fabric Mining Levels (v0) 0.1.3+92519afa18
fabric-networking-api-v1: Fabric Networking API (v1) 1.0.13+cbda931818
fabric-networking-blockentity-v0: Fabric Networking Block Entity (v0) 0.2.11+a02b446318
fabric-networking-v0: Fabric Networking (v0) 0.3.2+92519afa18
fabric-object-builder-api-v1: Fabric Object Builder API (v1) 1.10.9+cbda931818
fabric-object-builders-v0: Fabric Object Builders (v0) 0.7.3+a02b446318
fabric-particles-v1: Fabric Particles (v1) 0.2.4+a02b446318
fabric-permissions-api-v0: fabric-permissions-api 0.1-SNAPSHOT
fabric-registry-sync-v0: Fabric Registry Sync (v0) 0.7.10+e2961fee18
fabric-rendering-data-attachment-v1: Fabric Rendering Data Attachment (v1) 0.1.5+a02b446318
fabric-rendering-fluids-v1: Fabric Rendering Fluids (v1) 0.1.14+4658223018
fabric-resource-loader-v0: Fabric Resource Loader (v0) 0.4.8+a00e834b18
fabric-screen-handler-api-v1: Fabric Screen Handler API (v1) 1.1.8+cbda931818
fabric-structure-api-v1: Fabric Structure API (v1) 1.1.13+5ab9934c18
fabric-tag-extensions-v0: Fabric Tag Extensions (v0) 1.2.1+b06cb95b18
fabric-tool-attribute-api-v1: Fabric Tool Attribute API (v1) 1.2.12+b7ab612118
fabric-transfer-api-v1: Fabric Transfer API (v1) 1.3.1+4658223018
fabricloader: Fabric Loader 0.11.6
farmersdelight: Farmer's Delight 1.17.1-0.1.1
ferritecore: FerriteCore 3.0.3
fiber: fiber 0.23.0-2
geckolib3: Geckolib 3.0.13
go-fish: Go Fish 1.3.0-beta-1.17.1
haema: Haema 1.7.5+1.17
harvest_scythes: Harvest Scythes 2.0.5
impersonate: Impersonate 2.3.3
jankson: Jankson 3.0.1+j1.2.0
java: OpenJDK 64-Bit Server VM 16
kanos_config: Kanos Config 0.1.4+1.14.4-1.17.1
kyrptconfig: Kytpt Config 1.1.10-1.17
libcd: LibCapableData 3.0.3+1.16.3
libgui: LibGui 4.1.3+1.17.1
libninepatch: LibNinePatch 1.1.0
lithium: Lithium 0.7.4
maybe-data: Maybe data 1.0.1-1.17
minecraft: Minecraft 1.17.1
moreblockbricks: More Block Bricks 1.3.1
moreblocksmod: More Blocks Mod 0.1.8
mostructures: Mo' Structures 1.2.1-1.17
mythic-mounts: Mythic Mounts 1.17.1-1.3
omega-config: OmegaConfig 1.0.8
org_jetbrains_kotlin_kotlin-reflect: kotlin-reflect 1.5.20
org_jetbrains_kotlin_kotlin-stdlib: kotlin-stdlib 1.5.20
org_jetbrains_kotlin_kotlin-stdlib-jdk7: kotlin-stdlib-jdk7 1.5.20
org_jetbrains_kotlin_kotlin-stdlib-jdk8: kotlin-stdlib-jdk8 1.5.20
org_jetbrains_kotlinx_kotlinx-coroutines-core-jvm: kotlinx-coroutines-core-jvm 1.5.0
org_jetbrains_kotlinx_kotlinx-coroutines-jdk8: kotlinx-coroutines-jdk8 1.5.0
org_jetbrains_kotlinx_kotlinx-serialization-core-jvm: kotlinx-serialization-core-jvm 1.2.1
org_jetbrains_kotlinx_kotlinx-serialization-json-jvm: kotlinx-serialization-json-jvm 1.2.1
owo: OwO 0.1
patchouli: Patchouli 1.17-54-FABRIC
pehkui: Pehkui 2.4.0+1.14.4-1.17.1
physicsmod: Physics Mod 2.5.11
pitch-dark: Pitch Dark 2.0.0
playerabilitylib: Pal 1.3.0
quickshulker: Quick Shulker 1.2.2-1.17
reach-entity-attributes: Reach Entity Attributes 2.1.1
repurposed_structures: Repurposed Structures 2.3.1+1.17.1
shulkerutils: shulkerutils 1.0.4-1.17
somnus: Somnus API 0.0.14-1.17.1
spark: spark 1.6.1
staffofbuilding: Staff of Building 1.3.2-1.17
static-content: Static Content 1.0.1-1.16.2
staticdata: Static Data 1.1.2
step-height-entity-attribute: Step Height Entity Attribute 1.0.0
terraform-wood-api-v1: Terraform Wood API (v1) 2.0.2
trinketofundying: Trinket of Undying 2.0.0-1.17
trinkets: Trinkets 3.0.2
ttc: Tiny Trash Can 1.3.0
upgradedshulkers: Upgraded Shulkers 1.0.1-1.17
vehiclefix: VehicleFix 1.1
waystones: Waystones 2.0.3
whereisit: Where Is It 1.13.3
wolveswitharmor: Wolves With Armor 1.6.0-1.17
Data Packs: vanilla, Fabric Mods, file/friskstweaks.zip, file/enderman-griefing.zip
Is Modded: Definitely; Server brand changed to 'fabric'
Type: Dedicated Server (map_server.txt)
Because I'm myself changing some Bewitchment stuff I confirmed that the file in question is identical with the one on master and no other changes by myself shouldn't have affected this outcome.
At the moment I've fixed it manually on my server file by checking if inventory is null before that for.