Create Fabric

Create Fabric

10M Downloads

Game crashes on deployer kill 1.20.2

GrayThorne opened this issue ยท 8 comments

commented

Describe the Bug

No matter if it has a sword or not game crashes. Did it with both hand crank and power

Reproduction Steps

  1. set up deployer
  2. have mob in front
  3. kill it
  4. game crash
    ...

Expected Result

The game crashed after I did some testing happens every time a deployer kills a mod.

Screenshots and Videos

No response

Crash Report or Log

https://gist.github.com/GrayThorne/4a3950d8ecbdec0fa2743120bedbe861

Operating System

windows 11

Mod Version

0.5.1d

Minecraft Version

1.20.1

Other Mods

"https://modrinth.com/modpack/rpg-create+" This is a link to the modpack I have been playing on for a list of mods.

Additional Context

No response

commented

Have also confirmed with 1.20.1 (Create Fabric version: 0.5.1-d-build.1161+mc1.20.1).
Saw it on our server with a zombie spawner and a blaze spawner (thought maybe the first was a weird one-off). I made a single player creative world to try it in (using a skeleton spawner) and crashed the single player. Below is the relevant portion of log from Modrinth (not really enough to be worth a file).
The relevant part seems to be Cannot invoke "java.util.List.forEach(java.util.function.Consumer)" because "capturedDrops" is null
[07:32:11] [Server thread/ERROR]: Encountered an unexpected exception net.minecraft.class_148: Ticking block entity at net.minecraft.server.MinecraftServer.method_3813(MinecraftServer.java:901) ~[client-intermediary.jar:?] at net.minecraft.server.MinecraftServer.method_3748(MinecraftServer.java:824) ~[client-intermediary.jar:?] at net.minecraft.class_1132.method_3748(class_1132.java:105) ~[client-intermediary.jar:?] at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:671) ~[client-intermediary.jar:?] at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:265) ~[client-intermediary.jar:?] at java.lang.Thread.run(Unknown Source) ~[?:?] Caused by: java.lang.NullPointerException: Cannot invoke "java.util.List.forEach(java.util.function.Consumer)" because "capturedDrops" is null at com.simibubi.create.content.kinetics.deployer.DeployerHandler.activateInner(DeployerHandler.java:207) ~[create-fabric-0.5.1-d-build.1161+mc1.20.1.jar:?] at com.simibubi.create.content.kinetics.deployer.DeployerHandler.activate(DeployerHandler.java:134) ~[create-fabric-0.5.1-d-build.1161+mc1.20.1.jar:?] at com.simibubi.create.content.kinetics.deployer.DeployerBlockEntity.activate(DeployerBlockEntity.java:358) ~[create-fabric-0.5.1-d-build.1161+mc1.20.1.jar:?] at com.simibubi.create.content.kinetics.deployer.DeployerBlockEntity.tick(DeployerBlockEntity.java:244) ~[create-fabric-0.5.1-d-build.1161+mc1.20.1.jar:?] at com.simibubi.create.foundation.blockEntity.SmartBlockEntityTicker.tick(SmartBlockEntityTicker.java:15) ~[create-fabric-0.5.1-d-build.1161+mc1.20.1.jar:?] at net.minecraft.class_2818$class_5563.method_31703(class_2818.java:662) ~[client-intermediary.jar:?] at net.minecraft.class_2818$class_5564.method_31703(class_2818.java:716) ~[client-intermediary.jar:?] at net.minecraft.class_1937.method_18471(class_1937.java:470) ~[client-intermediary.jar:?] at net.minecraft.class_3218.method_18765(class_3218.java:390) ~[client-intermediary.jar:?] at net.minecraft.server.MinecraftServer.method_3813(MinecraftServer.java:897) ~[client-intermediary.jar:?] ... 5 more

commented

please correctly attach the crash report

commented

ok I hope that fixed it sorry and thank you

commented
commented

duplicate of #1096

commented

its a known issue https://discord.com/channels/570630340075454474/1180983709126639626/1181360079023386666 (link to aof7 discord)

specifically LivingEntity that are killed clear the capturedDrops during the deployer use/attack method when they die, causing the error at the end of the method

commented

Let's maybe create some temporary workaround until the normal one is done, so playera won't get crashed?

For example disable attacking entities :)

commented

should be easy enough to do, you would really just have to add a mixin wrapping the assignment here:

https://github.com/Fabricators-of-Create/Create/blob/mc1.20.1/fabric/dev/src/main/java/com/simibubi/create/content/kinetics/deployer/DeployerHandler.java#L206

that null checks and sets it to an empty list if null.