More Rendering Fixes

This commit is contained in:
Sebastian Hartte
2020-06-07 15:56:48 +02:00
parent 2dc2f90d5b
commit 1c7a28c606
29 changed files with 300 additions and 217 deletions
+7 -1
View File
@@ -297,6 +297,9 @@ public class AEBaseTile extends TileEntity implements IOrientable, ICommonTile,
// TODO: Optimize Network Load
if( this.world != null )
{
this.requestModelDataUpdate();
boolean alreadyUpdated = false;
// Let the block update it's own state with our internal state changes
BlockState currentState = getBlockState();
if (currentState.getBlock() instanceof AEBaseTileBlock) {
@@ -305,10 +308,13 @@ public class AEBaseTile extends TileEntity implements IOrientable, ICommonTile,
if (currentState != newState) {
AELog.blockUpdate(this.pos, currentState, newState, this);
this.world.setBlockState(pos, newState);
alreadyUpdated = true;
}
}
this.requestModelDataUpdate();
if (!alreadyUpdated) {
this.world.notifyBlockUpdate(this.pos, currentState, currentState, 1);
}
}
}
}