This commit is contained in:
Aikar 2018-06-04 01:53:37 -04:00
parent 727f932d05
commit 0570490d2a
No known key found for this signature in database
GPG Key ID: 401ADFC9891FAAFE

View File

@ -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> From: Aikar <aikar@aikar.co>
Date: Fri, 18 Mar 2016 20:16:03 -0400 Date: Fri, 18 Mar 2016 20:16:03 -0400
Subject: [PATCH] Add World Util Methods 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. 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 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 --- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -581,6 +581,7 @@ public class Chunk { @@ -581,6 +581,7 @@ public class Chunk {
@ -18,7 +18,7 @@ index cc4a9dbe..84a88056 100644
int j = blockposition.getX() & 15; int j = blockposition.getX() & 15;
int k = blockposition.getY(); int k = blockposition.getY();
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java 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 --- a/src/main/java/net/minecraft/server/World.java
+++ b/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 { @@ -77,7 +77,7 @@ public abstract class World implements IBlockAccess {
@ -36,7 +36,7 @@ index 6be9c181..9339bf83 100644
+ // Paper start + // Paper start
+ public Chunk getChunkIfLoaded(BlockPosition blockposition) { + 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 + // Paper end
+ +
@ -119,5 +119,5 @@ index 6be9c181..9339bf83 100644
// CraftBukkit start - tree generation // CraftBukkit start - tree generation
if (captureTreeGeneration) { if (captureTreeGeneration) {
-- --
2.14.3 2.17.1