Fixes #4661: Do not update a tile entity when it's in an unloaded chunk (i.e. during chunk unloading) (#4708)
This commit is contained in:
@@ -253,9 +253,11 @@ public class AEBaseTileEntity extends TileEntity implements IOrientable, ICommon
|
|||||||
if (this.renderFragment > 0) {
|
if (this.renderFragment > 0) {
|
||||||
this.renderFragment |= 1;
|
this.renderFragment |= 1;
|
||||||
} else {
|
} else {
|
||||||
|
// Clearing the cached model-data is always harmless regardless of status
|
||||||
|
this.requestModelDataUpdate();
|
||||||
|
|
||||||
// TODO: Optimize Network Load
|
// TODO: Optimize Network Load
|
||||||
if (this.world != null && !this.isRemoved()) {
|
if (this.world != null && !this.isRemoved() && !notLoaded()) {
|
||||||
this.requestModelDataUpdate();
|
|
||||||
|
|
||||||
boolean alreadyUpdated = false;
|
boolean alreadyUpdated = false;
|
||||||
// Let the block update it's own state with our internal state changes
|
// Let the block update it's own state with our internal state changes
|
||||||
@@ -368,7 +370,6 @@ public class AEBaseTileEntity extends TileEntity implements IOrientable, ICommon
|
|||||||
* null means nothing to store...
|
* null means nothing to store...
|
||||||
*
|
*
|
||||||
* @param from source of settings
|
* @param from source of settings
|
||||||
*
|
|
||||||
* @return compound of source
|
* @return compound of source
|
||||||
*/
|
*/
|
||||||
public CompoundNBT downloadSettings(final SettingsFrom from) {
|
public CompoundNBT downloadSettings(final SettingsFrom from) {
|
||||||
|
|||||||
Reference in New Issue
Block a user