mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-23 11:06:29 +01:00
Closes #1138
This commit is contained in:
parent
727f932d05
commit
0570490d2a
@ -1,4 +1,4 @@
|
||||
From 34d43d8cfc58035d0896f070e7aa8471bad4d0a1 Mon Sep 17 00:00:00 2001
|
||||
From c86880704c90a04a4f7a660823757fea8f2a7f0c Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Fri, 18 Mar 2016 20:16:03 -0400
|
||||
Subject: [PATCH] Add World Util Methods
|
||||
@ -6,7 +6,7 @@ Subject: [PATCH] Add World Util Methods
|
||||
Methods that can be used for other patches to help improve logic.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||
index cc4a9dbe..84a88056 100644
|
||||
index cc4a9dbe6..84a880561 100644
|
||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||
@@ -581,6 +581,7 @@ public class Chunk {
|
||||
@ -18,7 +18,7 @@ index cc4a9dbe..84a88056 100644
|
||||
int j = blockposition.getX() & 15;
|
||||
int k = blockposition.getY();
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 6be9c181..9339bf83 100644
|
||||
index 6be9c1815..b8ae41704 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -77,7 +77,7 @@ public abstract class World implements IBlockAccess {
|
||||
@ -36,7 +36,7 @@ index 6be9c181..9339bf83 100644
|
||||
|
||||
+ // Paper start
|
||||
+ public Chunk getChunkIfLoaded(BlockPosition blockposition) {
|
||||
+ return this.chunkProvider.getLoadedChunkAt(blockposition.getX() >> 4, blockposition.getZ() >> 4);
|
||||
+ return ((ChunkProviderServer) this.chunkProvider).getChunkIfLoaded(blockposition.getX() >> 4, blockposition.getZ() >> 4);
|
||||
+ }
|
||||
+ // Paper end
|
||||
+
|
||||
@ -119,5 +119,5 @@ index 6be9c181..9339bf83 100644
|
||||
// CraftBukkit start - tree generation
|
||||
if (captureTreeGeneration) {
|
||||
--
|
||||
2.14.3
|
||||
2.17.1
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user