Hi, I am trying to modify a block entity's variable from its block entity renderer class. The variable facing is direction of the entity in degrees. The renderer class access the variable facing and rotates it to face towards the entity it is tracking. However, the changes are not reflected in the block entity class. Printing out entity.facing to console in the block entity renderer class displays the correct output in degrees but printing out facing in the block entity class shows it is stuck at -1.
I figure it might be something to do with renderers being client side, if so, could someone point me in the right direction? Thanks
Block Entity
Block entity renderer