Hi there, I'm new one to try write forge mods find some problems and search some topics may not help for this question...
I write a test project about this:
https://github.com/IceLitty/forge-1.12.2-14.23.1.2555-mod-test-project
And problem lines:
https://github.com/IceLitty/forge-1.12.2-14.23.1.2555-mod-test-project/blob/master/src/main/java/com/gmail/litalways/icykingdoms/growBlock.java#L77
When I run client and into client world, I use Bone Meal to change this block states 'stage', it can cycle from 0 to 1.
And I start server, join client into it, IDE log can output correctly cycle 0 and 1, but client shows not changed..
Even if I not write world.isRemote, or tried this update function, they all not help:
this.requiresUpdates();
worldIn.updateObservingBlocksAt(pos, this);
worldIn.markBlockRangeForRenderUpdate(pos, pos);
worldIn.notifyBlockUpdate(pos, state, state.withProperty(STAGE, 1), 4);
worldIn.scheduleUpdate(pos, this, 0);
worldIn.scheduleBlockUpdate(pos, this, 0, 1);
worldIn.markAndNotifyBlock(pos, worldIn.getChunkFromBlockCoords(pos), state, state.withProperty(STAGE, 1), 4);
worldIn.markBlocksDirtyVertical(pos.getX(), pos.getZ(), pos.getY(), pos.getY());
worldIn.updateBlockTick(pos, this, 0, 1);