SPIGOT-927: Only schedule ticks for blocks in loaded chunks
This commit is contained in:
@@ -177,6 +177,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ // Helper method for scheduleTicks. If the hopper at blockposition is pointed
|
+ // Helper method for scheduleTicks. If the hopper at blockposition is pointed
|
||||||
+ // toward this tile, then make the hopper active
|
+ // toward this tile, then make the hopper active
|
||||||
+ private void scheduleTick(BlockPosition blockposition) {
|
+ private void scheduleTick(BlockPosition blockposition) {
|
||||||
|
+ if (!world.isLoaded(blockposition)) {
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
+ TileEntity tileEntity = this.world.getTileEntity(blockposition);
|
+ TileEntity tileEntity = this.world.getTileEntity(blockposition);
|
||||||
+ if (tileEntity instanceof TileEntityHopper) {
|
+ if (tileEntity instanceof TileEntityHopper) {
|
||||||
+ // i is the metadeta assoiated with the direction the hopper faces.
|
+ // i is the metadeta assoiated with the direction the hopper faces.
|
||||||
|
|||||||
Reference in New Issue
Block a user