I am not sure but
if (level.isClientSide()) { ... } here always return false (singleplayer is some kind of local server) - so this is used for client-thread stuff like changing GUIs or working with effects
So this code block is completely ignored - to make sure, test it with LOGGER.info() lines or System.out.println()
So if I am correct, just unwrap it from the if (level.isClientSide()) { ... } check
By
TileEntity ·