22
33import gregtech .api .metatileentity .interfaces .INeighborCache ;
44
5- import net .minecraft .block .state .IBlockState ;
65import net .minecraft .tileentity .TileEntity ;
76import net .minecraft .util .EnumFacing ;
87import net .minecraft .util .math .BlockPos ;
@@ -26,20 +25,12 @@ public abstract class NeighborCacheTileEntityBase extends SyncedTileEntityBase i
2625 private boolean neighborsInvalidated = false ;
2726
2827 public NeighborCacheTileEntityBase () {
29- invalidateNeighbors (false );
28+ invalidateNeighbors ();
3029 }
3130
32- protected void invalidateNeighbors (boolean notify ) {
31+ protected void invalidateNeighbors () {
3332 if (!this .neighborsInvalidated ) {
3433 for (EnumFacing value : EnumFacing .VALUES ) {
35- if (notify && crossesChunk (value )) {
36- // notify neighbor on a different chunk to invalidate us
37- TileEntity neighbor = getNeighbor (value );
38- if (neighbor != null ) {
39- IBlockState state = getWorld ().getBlockState (neighbor .getPos ());
40- state .neighborChanged (getWorld (), neighbor .getPos (), getBlockType (), getPos ());
41- }
42- }
4334 this .neighbors .set (value .getIndex (), INVALID );
4435 }
4536 this .neighborsInvalidated = true ;
@@ -50,28 +41,28 @@ protected void invalidateNeighbors(boolean notify) {
5041 @ Override
5142 public void setWorld (@ NotNull World worldIn ) {
5243 super .setWorld (worldIn );
53- invalidateNeighbors (false );
44+ invalidateNeighbors ();
5445 }
5546
5647 @ MustBeInvokedByOverriders
5748 @ Override
5849 public void setPos (@ NotNull BlockPos posIn ) {
5950 super .setPos (posIn );
60- invalidateNeighbors (false );
51+ invalidateNeighbors ();
6152 }
6253
6354 @ MustBeInvokedByOverriders
6455 @ Override
6556 public void invalidate () {
6657 super .invalidate ();
67- invalidateNeighbors (false );
58+ invalidateNeighbors ();
6859 }
6960
7061 @ MustBeInvokedByOverriders
7162 @ Override
7263 public void onChunkUnload () {
7364 super .onChunkUnload ();
74- invalidateNeighbors (true );
65+ invalidateNeighbors ();
7566 }
7667
7768 @ Override
0 commit comments