BonsaiTrees icon indicating copy to clipboard operation
BonsaiTrees copied to clipboard

Bonsai Pot Block Entitiy loads Client class

Open Tschipp opened this issue 2 years ago • 0 comments

Related issue: https://github.com/Tschipp/CarryOn/issues/369

Carry on calls the BlockEntity#load function on the server side, which then classloads BonsaiPotBlockEntity. BonsaiPotBlockEntity imports ClientLevel here: https://github.com/thraaawn/BonsaiTrees/blob/1.18.1/src/main/java/com/davenonymous/bonsaitrees3/blocks/BonsaiPotBlockEntity.java#L14

Instead of checking for ClientLevel, do level.isClientSide instead. I will add safeguards on carry on's side to prevent duplication of carried blocks.

Tschipp avatar Apr 25 '23 14:04 Tschipp