Fixes #3688: Invalidate Storage Bus cache immediately upon missing TE. (#3737)

This commit is contained in:
yueh
2018-09-28 17:36:58 +02:00
committed by GitHub
parent 37d8833b95
commit 038ca23523
@@ -288,7 +288,18 @@ public class PartStorageBus extends PartUpgradeable implements IGridTickable, IC
{
if( pos.offset( this.getSide().getFacing() ).equals( neighbor ) )
{
this.resetCache( false );
final TileEntity te = w.getTileEntity( neighbor );
// In case the TE was destroyed, we have to do a full reset immediately.
if( te == null )
{
this.resetCache( true );
this.resetCache();
}
else
{
this.resetCache( false );
}
}
}