ticking entity crash from chemical sprayer
ziad25139 opened this issue ยท 4 comments
Info:
Cause Of Crash: "fire = getEntityData().get(DATA).getBoolean("Fire");"
Caused By: entity.chemical_sprayer_projectile
Bug Finder: ziad25139 and Lazeryeet
Crash Report: https://mclo.gs/E1hEV4n (aternos)
Same bug happened to me: https://github.com/george8188625/Create-Diesel-Generators/blob/1.20.1/src/main/java/com/jesz/createdieselgenerators/entity/ChemicalSprayerProjectileEntity.java#L121
level() instanceof ClientLevel
doesn't work on multiplayer, the class ClientLevel only exists on the client, not in the server. The correct way to detect the client side with level().isClientSide
Ref: https://nekoyue.github.io/ForgeJavaDocs-NG/javadoc/1.18.2/net/minecraft/world/level/Level.html#isClientSide
I believe that's why the crash only applies to servers and not single player worlds which I tried testing on one