Create: Diesel Generators

Create: Diesel Generators

652k Downloads

ticking entity crash from chemical sprayer

ziad25139 opened this issue ยท 4 comments

commented

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)

commented

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

commented

Oh I'm stupid

commented

I believe that's why the crash only applies to servers and not single player worlds which I tried testing on one

commented

yup, dedicated servers don't have client classes