Spellbound Enchantments [Fabric]

Spellbound Enchantments [Fabric]

544k Downloads

Some mobs make the game crash

innocenzi opened this issue · 2 comments

commented

I have spellbound on a server, and I was fighting piglins in the nether. I think they're the reason the game crashed, maybe one spawned with an enchantment that is bugged?

Details
---- Minecraft Crash Report ----
// Daisy, daisy...

Time: 17/12/2021 19:56
Description: Ticking entity

java.lang.NullPointerException: Cannot read field "field_6002" because "entity" is null
	at net.tigereye.spellbound.enchantments.unbreaking.SaturatedEnchantment.beforeDurabilityLoss(SaturatedEnchantment.java:49)
	at net.tigereye.spellbound.util.SBEnchantmentHelper.lambda$beforeDurabilityLoss$0(SBEnchantmentHelper.java:51)
	at net.tigereye.spellbound.util.SBEnchantmentHelper.lambda$forEachSpellboundEnchantment$23(SBEnchantmentHelper.java:219)
	at java.base/java.util.Optional.ifPresent(Optional.java:178)
	at net.tigereye.spellbound.util.SBEnchantmentHelper.forEachSpellboundEnchantment(SBEnchantmentHelper.java:217)
	at net.tigereye.spellbound.util.SBEnchantmentHelper.beforeDurabilityLoss(SBEnchantmentHelper.java:51)
	at net.minecraft.class_1799.localvar$zpj000$spellboundItemStackUnbreakingMixin(class_1799.java:5144)
	at net.minecraft.class_1799.method_7970(class_1799.java:309)
	at net.minecraft.class_1799.method_7956(class_1799.java:343)
	at net.minecraft.class_1764.method_7763(class_1764.java:243)
	at net.minecraft.class_1764.method_7777(class_1764.java:278)
	at net.minecraft.class_3745.method_24654(class_3745.java:32)
	at net.minecraft.class_4836.method_7105(class_4836.java:405)
	at net.minecraft.class_4810.method_24569(class_4810.java:94)
	at net.minecraft.class_4810.method_24573(class_4810.java:56)
	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:526)
	at net.minecraft.class_4095.method_19542(class_4095.java:471)
	at net.minecraft.class_4836.method_5958(class_4836.java:324)
	at net.minecraft.class_1308.method_6023(class_1308.java:758)
	at net.minecraft.class_1309.method_6007(class_1309.java:2604)
	at net.minecraft.class_1308.method_6007(class_1308.java:545)
	at net.minecraft.class_1588.method_6007(class_1588.java:43)
	at net.minecraft.class_1309.method_5773(class_1309.java:2349)
	at net.minecraft.class_1308.method_5773(class_1308.java:345)
	at net.minecraft.class_3218.method_18762(class_3218.java:699)
	at net.minecraft.class_1937.method_18472(class_1937.java:487)
	at net.minecraft.class_3218.method_31420(class_3218.java:360)
	at net.minecraft.class_5574.method_31791(class_5574.java:54)
	at net.minecraft.class_3218.method_18765(class_3218.java:328)
	at net.minecraft.server.MinecraftServer.method_3813(MinecraftServer.java:879)
	at net.minecraft.class_3176.method_3813(class_3176.java:324)
	at net.minecraft.server.MinecraftServer.method_3748(MinecraftServer.java:823)
	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 net.tigereye.spellbound.enchantments.unbreaking.SaturatedEnchantment.beforeDurabilityLoss(SaturatedEnchantment.java:49)
	at net.tigereye.spellbound.util.SBEnchantmentHelper.lambda$beforeDurabilityLoss$0(SBEnchantmentHelper.java:51)
	at net.tigereye.spellbound.util.SBEnchantmentHelper.lambda$forEachSpellboundEnchantment$23(SBEnchantmentHelper.java:219)
	at java.base/java.util.Optional.ifPresent(Optional.java:178)
	at net.tigereye.spellbound.util.SBEnchantmentHelper.forEachSpellboundEnchantment(SBEnchantmentHelper.java:217)
	at net.tigereye.spellbound.util.SBEnchantmentHelper.beforeDurabilityLoss(SBEnchantmentHelper.java:51)
	at net.minecraft.class_1799.localvar$zpj000$spellboundItemStackUnbreakingMixin(class_1799.java:5144)
	at net.minecraft.class_1799.method_7970(class_1799.java:309)
	at net.minecraft.class_1799.method_7956(class_1799.java:343)
	at net.minecraft.class_1764.method_7763(class_1764.java:243)
	at net.minecraft.class_1764.method_7777(class_1764.java:278)
	at net.minecraft.class_3745.method_24654(class_3745.java:32)
	at net.minecraft.class_4836.method_7105(class_4836.java:405)
	at net.minecraft.class_4810.method_24569(class_4810.java:94)
	at net.minecraft.class_4810.method_24573(class_4810.java:56)
	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:526)
	at net.minecraft.class_4095.method_19542(class_4095.java:471)
	at net.minecraft.class_4836.method_5958(class_4836.java:324)
	at net.minecraft.class_1308.method_6023(class_1308.java:758)
	at net.minecraft.class_1309.method_6007(class_1309.java:2604)
	at net.minecraft.class_1308.method_6007(class_1308.java:545)
	at net.minecraft.class_1588.method_6007(class_1588.java:43)
	at net.minecraft.class_1309.method_5773(class_1309.java:2349)
	at net.minecraft.class_1308.method_5773(class_1308.java:345)
	at net.minecraft.class_3218.method_18762(class_3218.java:699)
	at net.minecraft.class_1937.method_18472(class_1937.java:487)
	at net.minecraft.class_3218.method_31420(class_3218.java:360)
	at net.minecraft.class_5574.method_31791(class_5574.java:54)
	at net.minecraft.class_3218.method_18765(class_3218.java:328)

-- Entity being ticked --
Details:
	Entity Type: minecraft:piglin (net.minecraft.class_4836)
	Entity ID: 186
	Entity Name: Piglin
	Entity's Exact location: 689.11, 33.00, -310.82
	Entity's Block location: World: (689,33,-311), Section: (at 1,1,9 in 43,2,-20; chunk contains blocks 688,0,-320 to 703,255,-305), Region: (1,-1; contains chunks 32,-32 to 63,-1, blocks 512,0,-512 to 1023,255,-1)
	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:487)
	at net.minecraft.class_3218.method_31420(class_3218.java:360)
	at net.minecraft.class_5574.method_31791(class_5574.java:54)
	at net.minecraft.class_3218.method_18765(class_3218.java:328)
	at net.minecraft.server.MinecraftServer.method_3813(MinecraftServer.java:879)
	at net.minecraft.class_3176.method_3813(class_3176.java:324)
	at net.minecraft.server.MinecraftServer.method_3748(MinecraftServer.java:823)
	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['Haew'/148, l='ServerLevel[layah]', x=687.31, y=33.00, z=-315.70]]
	Chunk stats: 2054
	Level dimension: minecraft:the_nether
	Derived: true
	Level spawn location: World: (0,105,0), Section: (at 0,9,0 in 0,6,0; chunk contains blocks 0,0,0 to 15,255,15), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511)
	Level time: 1177552 game time, 1351611 day time
	Level name: layah
	Level game mode: Game mode: survival (ID 0). Hardcore: false. Cheats: false
	Level weather: Rain time: 5415 (now: true), thunder time: 48704 (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.class_3176.method_3813(class_3176.java:324)
	at net.minecraft.server.MinecraftServer.method_3748(MinecraftServer.java:823)
	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.1
	Minecraft Version ID: 1.18.1
	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: 1152615936 bytes (1099 MiB) / 2147483648 bytes (2048 MiB) up to 2147483648 bytes (2048 MiB)
	CPUs: 8
	Processor Vendor: GenuineIntel
	Processor Name: Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz
	Identifier: Intel64 Family 6 Model 158 Stepping 9
	Microarchitecture: Kaby Lake
	Frequency (GHz): 4,20
	Number of physical packages: 1
	Number of physical CPUs: 4
	Number of logical CPUs: 8
	Graphics card #0 name: NVIDIA GeForce GTX 1080
	Graphics card #0 vendor: NVIDIA (0x10de)
	Graphics card #0 VRAM (MB): 4095,00
	Graphics card #0 deviceId: 0x1b80
	Graphics card #0 versionInfo: DriverVersion=30.0.14.9676
	Memory slot #0 capacity (MB): 8192,00
	Memory slot #0 clockSpeed (GHz): 2,13
	Memory slot #0 type: DDR4
	Memory slot #1 capacity (MB): 8192,00
	Memory slot #1 clockSpeed (GHz): 2,13
	Memory slot #1 type: DDR4
	Virtual memory max (MB): 23749,66
	Virtual memory used (MB): 20520,68
	Swap memory total (MB): 7432,39
	Swap memory used (MB): 276,35
	JVM Flags: 1 total; -Xmx2G
	Fabric Mods: 
		apoli: Apoli 2.2.2
		barkcarpets: Bark Carpets 1.18
		calio: Calio 1.4.2
		cardinal-components-base: Cardinal Components API (base) 4.0.0
		cardinal-components-entity: Cardinal Components API (entities) 4.0.0
		cloth-basic-math: cloth-basic-math 0.6.0
		cloth-config: Cloth Config v6 6.1.48
		com_electronwill_night-config_core: core 3.6.5
		com_electronwill_night-config_toml: toml 3.6.5
		com_typesafe_config: config 1.4.1
		confabricate: confabricate 2.2.0-SNAPSHOT+4.1.1
		couplings: Couplings 1.7.1+1.18
		croptopia: Croptopia 1.7.2
		customfence_fabric: Customfence 1-18-1
		enchant_giver: Enchant Giver 1.1.0
		exlinefurniture: Exline's Furniture 1.18
		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-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-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-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-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-resource-loader-v0: Fabric Resource Loader (v0) 0.4.11+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-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.11
		fiber: fiber 0.23.0-2
		io_leangen_geantyref_geantyref: geantyref 1.3.11
		java: OpenJDK 64-Bit Server VM 17
		map_atlases: Map Atlases 1.3.0
		mcdw: MC Dungeons Weapons 3.6.0-1.18
		minecraft: Minecraft 1.18.1
		moreberries: More Berries 1.4.5
		omega-config: OmegaConfig 1.0.8
		org_spongepowered_configurate-core: configurate-core 4.1.1
		org_spongepowered_configurate-extra-dfu4: configurate-extra-dfu4 4.1.1
		org_spongepowered_configurate-gson: configurate-gson 4.1.1
		org_spongepowered_configurate-hocon: configurate-hocon 4.1.1
		origins: Origins 1.3.1
		origins-classes: Origins: Classes 1.2.4
		owo: oωo 0.3.8+1.18
		patchouli: Patchouli 1.18-60-FABRIC
		playerabilitylib: Pal 1.3.0
		reach-entity-attributes: Reach Entity Attributes 2.1.1
		repurposed_structures: Repurposed Structures 3.1.10+1.18.1
		sentimentality3: Sentimentality 3 1.3.4
		sit: Sit 1.18-14
		skylorlib: SkyLib 1.0.6
		spellbound: Spellbound 1.7.0
		things: Things 0.2.8+1.18
		towers_of_the_wild_reworked: Towers of the Wild: Reworked 2.0.0
		trinkets: Trinkets 3.1.0
		waystones: Waystones 2.3.4
		yigd: You're in Grave Danger 1.2.7
	Server Running: true
	Player Count: 1 / 2; [class_3222['Haew'/148, l='ServerLevel[layah]', x=687.31, y=33.00, z=-315.70]]
	Data Packs: vanilla, Fabric Mods
	Is Modded: Definitely; Server brand changed to 'fabric'
	Type: Dedicated Server (map_server.txt)
commented

fixed in 1.7.1

commented

Thanks!