mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-19 06:42:02 +01:00
SPIGOT-927: Only schedule ticks for blocks in loaded chunks
This commit is contained in:
parent
a18bcfaf43
commit
83492e7bf2
@ -177,6 +177,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ // Helper method for scheduleTicks. If the hopper at blockposition is pointed
|
||||
+ // toward this tile, then make the hopper active
|
||||
+ private void scheduleTick(BlockPosition blockposition) {
|
||||
+ if (!world.isLoaded(blockposition)) {
|
||||
+ return;
|
||||
+ }
|
||||
+ TileEntity tileEntity = this.world.getTileEntity(blockposition);
|
||||
+ if (tileEntity instanceof TileEntityHopper) {
|
||||
+ // i is the metadeta assoiated with the direction the hopper faces.
|
||||
|
Loading…
Reference in New Issue
Block a user