geforkt von Mirrors/Paper
Update upstream B/CB/S
Dieser Commit ist enthalten in:
Ursprung
21a724147a
Commit
65a99a06a8
@ -5,13 +5,13 @@ Subject: [PATCH] Expose WorldBorder#isInBounds(Location) check
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/WorldBorder.java b/src/main/java/org/bukkit/WorldBorder.java
|
||||
index 55c8983b..1957507c 100644
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/WorldBorder.java
|
||||
+++ b/src/main/java/org/bukkit/WorldBorder.java
|
||||
@@ -0,0 +0,0 @@ public interface WorldBorder {
|
||||
* @param distance The distance in blocks. (The default is 5 blocks.)
|
||||
* @return if this location is inside the border or not
|
||||
*/
|
||||
public void setWarningDistance(int distance);
|
||||
public boolean isInside(Location location);
|
||||
+
|
||||
+ // Paper start
|
||||
+ /**
|
||||
@ -19,8 +19,12 @@ index 55c8983b..1957507c 100644
|
||||
+ *
|
||||
+ * @param location specific location to check
|
||||
+ * @return true if the location is within the bounds of this border, false otherwise.
|
||||
+ * @deprecated use {@link #isInside(Location)} for an upstream compatible replacement
|
||||
+ */
|
||||
+ public boolean isInBounds(Location location);
|
||||
+ @Deprecated
|
||||
+ public default boolean isInBounds(Location location) {
|
||||
+ return this.isInside(location);
|
||||
+ }
|
||||
+ // Paper end
|
||||
}
|
||||
--
|
@ -26,9 +26,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
return super.cM();
|
||||
}
|
||||
|
||||
- if (this.random.nextInt(10) == 0 && chunk.a(987234911L).nextInt(10) == 0 && this.locY < 40.0D) {
|
||||
+ boolean isSlimeChunk = world.paperConfig.allChunksAreSlimeChunks || chunk.a(987234911L).nextInt(10) == 0; // Paper
|
||||
+ if (this.random.nextInt(10) == 0 && isSlimeChunk && this.locY < 40.0D) {
|
||||
- if (this.random.nextInt(10) == 0 && chunk.a(world.spigotConfig.slimeSeed).nextInt(10) == 0 && this.locY < 40.0D) { // Spigot
|
||||
+ boolean isSlimeChunk = world.paperConfig.allChunksAreSlimeChunks || chunk.a(world.spigotConfig.slimeSeed).nextInt(10) == 0; // Spigot // Paper
|
||||
+ if (this.random.nextInt(10) == 0 && isSlimeChunk && this.locY < 40.0D) { // Paper
|
||||
return super.cM();
|
||||
}
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ just as it does in Vanilla, but entity pushing logic will be capped.
|
||||
You can set this to 0 to disable collisions.
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index e8762c487..dba1c477e 100644
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -0,0 +0,0 @@ public class PaperWorldConfig {
|
||||
@ -27,7 +27,7 @@ index e8762c487..dba1c477e 100644
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index a1d2233ba..37dc29f63 100644
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener {
|
||||
@ -39,7 +39,7 @@ index a1d2233ba..37dc29f63 100644
|
||||
// Spigot end
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
index 07688b1ce..6ac6a4062 100644
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
@@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity {
|
||||
|
@ -1,23 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Zach Brown <1254957+zachbr@users.noreply.github.com>
|
||||
Date: Sat, 21 Jan 2017 16:58:09 -0600
|
||||
Subject: [PATCH] Expose WorldBorder#isInBounds(Location) method
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorldBorder.java b/src/main/java/org/bukkit/craftbukkit/CraftWorldBorder.java
|
||||
index e5395a1cc..92b738c2b 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorldBorder.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorldBorder.java
|
||||
@@ -0,0 +0,0 @@ public class CraftWorldBorder implements WorldBorder {
|
||||
public void setWarningDistance(int distance) {
|
||||
this.handle.setWarningDistance(distance);
|
||||
}
|
||||
+
|
||||
+ // Paper start
|
||||
+ @Override
|
||||
+ public boolean isInBounds(Location location) {
|
||||
+ return this.handle.isInBounds(new net.minecraft.server.BlockPosition(location.getBlockX(), location.getBlockY(), location.getBlockZ()));
|
||||
+ }
|
||||
+ // Paper end
|
||||
}
|
||||
--
|
@ -1 +1 @@
|
||||
Subproject commit 4bef447a073792a0858dc49e33593acb1c1948f5
|
||||
Subproject commit 50702e72bc019590101e6c47b14b42db33de46a9
|
@ -1 +1 @@
|
||||
Subproject commit 4d3bf2015504897fc69af2a209d4c8bbe217394d
|
||||
Subproject commit 16b5116c7c528a99a4270324fa05133852ff6bf4
|
@ -1 +1 @@
|
||||
Subproject commit b32c8f871b2da575c1d9e9fa0532ba3e7e2eaa54
|
||||
Subproject commit 6de2fbc3377792b16f704e188aa34e72ce460354
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren