mirror of
https://github.com/PaperMC/Paper.git
synced 2025-02-07 16:12:02 +01:00
Update Paper to MC 1.11.1
This commit is contained in:
parent
f7f9ba8639
commit
ec68dfff5a
@ -48,15 +48,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
* @param component the components to send
|
||||
*/
|
||||
+ @Override
|
||||
public void sendMessage(net.md_5.bungee.api.chat.BaseComponent component);
|
||||
|
||||
/**
|
||||
public default void sendMessage(net.md_5.bungee.api.chat.BaseComponent component) {
|
||||
spigot().sendMessage(component);
|
||||
}
|
||||
@@ -0,0 +0,0 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline
|
||||
*
|
||||
* @param components the components to send
|
||||
*/
|
||||
+ @Override
|
||||
public void sendMessage(net.md_5.bungee.api.chat.BaseComponent... components);
|
||||
|
||||
/**
|
||||
public default void sendMessage(net.md_5.bungee.api.chat.BaseComponent... components) {
|
||||
spigot().sendMessage(components);
|
||||
}
|
||||
--
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add String based Action Bar API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index bf4c31ba..5c38b3f3 100644
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -0,0 +0,0 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline
|
||||
|
@ -1,23 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Zach Brown <1254957+zachbr@users.noreply.github.com>
|
||||
Date: Wed, 26 Oct 2016 15:49:28 -0500
|
||||
Subject: [PATCH] Add debug logging to Timings enable setter
|
||||
|
||||
Potentially temporary, will be merged back into main Timings patch if not.
|
||||
`java -Dtimings.throwOnChange=true -jar paperclip.jar`
|
||||
|
||||
diff --git a/src/main/java/co/aikar/timings/Timings.java b/src/main/java/co/aikar/timings/Timings.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/co/aikar/timings/Timings.java
|
||||
+++ b/src/main/java/co/aikar/timings/Timings.java
|
||||
@@ -0,0 +0,0 @@ public final class Timings {
|
||||
public static void setTimingsEnabled(boolean enabled) {
|
||||
timingsEnabled = enabled;
|
||||
reset();
|
||||
+ if (Boolean.getBoolean("timings.throwOnChange")) {
|
||||
+ new RuntimeException("The enable state of timings has been changed to: " + enabled).printStackTrace();
|
||||
+ }
|
||||
}
|
||||
|
||||
/**
|
||||
--
|
@ -50,14 +50,18 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ *
|
||||
+ * @param component the component to send
|
||||
+ */
|
||||
+ public void broadcast(net.md_5.bungee.api.chat.BaseComponent component);
|
||||
+ public default void broadcast(net.md_5.bungee.api.chat.BaseComponent component) {
|
||||
+ spigot().broadcast(component);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Sends an array of components as a single message to all online players.
|
||||
+ *
|
||||
+ * @param components the components to send
|
||||
+ */
|
||||
+ public void broadcast(net.md_5.bungee.api.chat.BaseComponent... components);
|
||||
+ public default void broadcast(net.md_5.bungee.api.chat.BaseComponent... components) {
|
||||
+ spigot().broadcast(components);
|
||||
+ }
|
||||
+ // Paper end
|
||||
+
|
||||
/**
|
||||
@ -77,14 +81,18 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ *
|
||||
+ * @param component the components to send
|
||||
+ */
|
||||
+ public void sendMessage(net.md_5.bungee.api.chat.BaseComponent component);
|
||||
+ public default void sendMessage(net.md_5.bungee.api.chat.BaseComponent component) {
|
||||
+ spigot().sendMessage(component);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Sends an array of components as a single message to the player
|
||||
+ *
|
||||
+ * @param components the components to send
|
||||
+ */
|
||||
+ public void sendMessage(net.md_5.bungee.api.chat.BaseComponent... components);
|
||||
+ public default void sendMessage(net.md_5.bungee.api.chat.BaseComponent... components) {
|
||||
+ spigot().sendMessage(components);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Sends an array of components as a single message to the specified screen position of this player
|
||||
@ -92,7 +100,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ * @param position the screen position
|
||||
+ * @param components the components to send
|
||||
+ */
|
||||
+ public void sendMessage(net.md_5.bungee.api.ChatMessageType position, net.md_5.bungee.api.chat.BaseComponent... components);
|
||||
+ public default void sendMessage(net.md_5.bungee.api.ChatMessageType position, net.md_5.bungee.api.chat.BaseComponent... components) {
|
||||
+ spigot().sendMessage(position, components);
|
||||
+ }
|
||||
+ // Paper end
|
||||
+
|
||||
/**
|
||||
|
@ -24,7 +24,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
- <artifactId>spigot-api</artifactId>
|
||||
+ <groupId>com.destroystokyo.paper</groupId>
|
||||
+ <artifactId>paper-api</artifactId>
|
||||
<version>1.11-R0.1-SNAPSHOT</version>
|
||||
<version>1.11.1-R0.1-SNAPSHOT</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
- <name>Spigot-API</name>
|
||||
|
@ -381,9 +381,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Effect;
|
||||
@@ -0,0 +0,0 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline
|
||||
* @param components the components to send
|
||||
*/
|
||||
public void sendMessage(net.md_5.bungee.api.ChatMessageType position, net.md_5.bungee.api.chat.BaseComponent... components);
|
||||
public default void sendMessage(net.md_5.bungee.api.ChatMessageType position, net.md_5.bungee.api.chat.BaseComponent... components) {
|
||||
spigot().sendMessage(position, components);
|
||||
}
|
||||
+
|
||||
+ /**
|
||||
+ * Set the text displayed in the player list header and footer for this player
|
||||
|
@ -11,7 +11,7 @@ that is outside happens to be closer, but unreachable, yet another reachable
|
||||
one is in border that would of been missed.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/StructureGenerator.java b/src/main/java/net/minecraft/server/StructureGenerator.java
|
||||
index 9c1605b14..b566d5eee 100644
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/StructureGenerator.java
|
||||
+++ b/src/main/java/net/minecraft/server/StructureGenerator.java
|
||||
@@ -0,0 +0,0 @@ public abstract class StructureGenerator extends WorldGenBase {
|
||||
@ -25,7 +25,7 @@ index 9c1605b14..b566d5eee 100644
|
||||
if (!flag1 || !world.b(l2, i3)) {
|
||||
return new BlockPosition((l2 << 4) + 8, 64, (i3 << 4) + 8);
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldBorder.java b/src/main/java/net/minecraft/server/WorldBorder.java
|
||||
index 632eb1c9d..1bb172bbf 100644
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldBorder.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldBorder.java
|
||||
@@ -0,0 +0,0 @@ public class WorldBorder {
|
||||
|
@ -9,7 +9,7 @@ Also allow turning off treasure maps all together as they can eat up Map ID's
|
||||
which are limited in quantity.
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index 73bf74422..a655b3310 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 {
|
||||
@ -28,7 +28,7 @@ index 73bf74422..a655b3310 100644
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java
|
||||
index 4a6b3da1b..35675d9a5 100644
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityVillager.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityVillager.java
|
||||
@@ -0,0 +0,0 @@ public class EntityVillager extends EntityAgeable implements NPC, IMerchant {
|
||||
|
@ -30,8 +30,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
}
|
||||
} else {
|
||||
- this.h = MathHelper.nextInt(this.random, 100, 600);
|
||||
+ this.h = MathHelper.nextInt(this.random, world.paperConfig.fishingMinTicks, world.paperConfig.fishingMaxTicks); // Paper - Configurable fishing time range
|
||||
this.h -= EnchantmentManager.g(this.owner) * 20 * 5;
|
||||
+ this.h = MathHelper.nextInt(this.random, world.paperConfig.fishingMinTicks, world.paperConfig.fishingMaxTicks); // Paper
|
||||
this.h -= this.ax * 20 * 5;
|
||||
}
|
||||
}
|
||||
--
|
@ -94,7 +94,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+
|
||||
+ // OBFHELPER
|
||||
+ private void addCollisions(IBlockData blockData, World world, BlockPosition where, AxisAlignedBB collider, List<AxisAlignedBB> list, Entity entity) {
|
||||
+ blockData.a(world, where, collider, list, entity);
|
||||
+ blockData.a(world, where, collider, list, entity, false);
|
||||
+ }
|
||||
+ // Paper end
|
||||
+
|
||||
|
@ -1,58 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Zach Brown <1254957+zachbr@users.noreply.github.com>
|
||||
Date: Thu, 3 Mar 2016 02:21:58 -0600
|
||||
Subject: [PATCH] Graduate bungeecord chat API from spigot subclasses
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -0,0 +0,0 @@ public final class CraftServer implements Server {
|
||||
return count;
|
||||
}
|
||||
|
||||
+ // Paper start
|
||||
+ @Override
|
||||
+ public void broadcast(BaseComponent component) {
|
||||
+ this.spigot.broadcast(component);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void broadcast(BaseComponent... components) {
|
||||
+ this.spigot.broadcast(components);
|
||||
+ }
|
||||
+ // Paper end
|
||||
+
|
||||
@Override
|
||||
@Deprecated
|
||||
public OfflinePlayer getOfflinePlayer(String name) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
}
|
||||
}
|
||||
|
||||
+ // Paper start
|
||||
+ @Override
|
||||
+ public void sendMessage(BaseComponent component) {
|
||||
+ this.spigot.sendMessage(component);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void sendMessage(BaseComponent... components) {
|
||||
+ this.spigot.sendMessage(components);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void sendMessage(net.md_5.bungee.api.ChatMessageType position, BaseComponent... components) {
|
||||
+ this.spigot.sendMessage(position, components);
|
||||
+ }
|
||||
+ // Paper end
|
||||
+
|
||||
@Override
|
||||
public String getDisplayName() {
|
||||
return getHandle().displayName;
|
||||
--
|
@ -6,7 +6,7 @@ Subject: [PATCH] Ignore invalid Marker Icon ID's in maps
|
||||
Replace with the red marker. Should of only happened by creative abuse.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldMap.java b/src/main/java/net/minecraft/server/WorldMap.java
|
||||
index dbe6a80f2..dfd8e4d84 100644
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldMap.java
|
||||
@@ -0,0 +0,0 @@ public class WorldMap extends PersistentBase {
|
||||
|
@ -225,10 +225,10 @@ diff --git a/src/main/java/net/minecraft/server/NBTTagCompound.java b/src/main/j
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/NBTTagCompound.java
|
||||
+++ b/src/main/java/net/minecraft/server/NBTTagCompound.java
|
||||
@@ -0,0 +0,0 @@ import javax.annotation.Nullable;
|
||||
|
||||
@@ -0,0 +0,0 @@ import org.apache.logging.log4j.Logger;
|
||||
public class NBTTagCompound extends NBTBase {
|
||||
|
||||
private static final Logger b = LogManager.getLogger();
|
||||
- private final Map<String, NBTBase> map = Maps.newHashMap();
|
||||
+ public final Map<String, NBTBase> map = Maps.newHashMap(); // Paper
|
||||
|
||||
|
@ -17,7 +17,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ <groupId>com.destroystokyo.paper</groupId>
|
||||
+ <artifactId>paper</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>1.11-R0.1-SNAPSHOT</version>
|
||||
<version>1.11.1-R0.1-SNAPSHOT</version>
|
||||
- <name>Spigot</name>
|
||||
- <url>http://www.spigotmc.org</url>
|
||||
+ <name>Paper</name>
|
||||
|
@ -89,10 +89,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.mojang.authlib.GameProfile;
|
||||
@@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
public void sendMessage(net.md_5.bungee.api.ChatMessageType position, BaseComponent... components) {
|
||||
this.spigot.sendMessage(position, components);
|
||||
}
|
||||
}
|
||||
+
|
||||
|
||||
+ // Paper start
|
||||
+ @Override
|
||||
+ public void setPlayerListHeaderFooter(BaseComponent[] header, BaseComponent[] footer) {
|
||||
+ PacketPlayOutPlayerListHeaderFooter packet = new PacketPlayOutPlayerListHeaderFooter();
|
||||
@ -169,7 +169,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ public void hideTitle() {
|
||||
+ getHandle().playerConnection.sendPacket(new PacketPlayOutTitle(PacketPlayOutTitle.EnumTitleAction.CLEAR, (BaseComponent[]) null, 0, 0, 0));
|
||||
+ }
|
||||
// Paper end
|
||||
|
||||
+ // Paper end
|
||||
+
|
||||
@Override
|
||||
public String getDisplayName() {
|
||||
return getHandle().displayName;
|
||||
--
|
@ -6,7 +6,7 @@ Subject: [PATCH] Prevent Pathfinding out of World Border
|
||||
This prevents Entities from trying to run outside of the World Border
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/NavigationAbstract.java b/src/main/java/net/minecraft/server/NavigationAbstract.java
|
||||
index c0ef2400b..74d1fd6b2 100644
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/NavigationAbstract.java
|
||||
+++ b/src/main/java/net/minecraft/server/NavigationAbstract.java
|
||||
@@ -0,0 +0,0 @@ public abstract class NavigationAbstract {
|
||||
@ -26,7 +26,7 @@ index c0ef2400b..74d1fd6b2 100644
|
||||
if (this.c != null && !this.c.b() && blockposition.equals(this.q)) {
|
||||
return this.c;
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldBorder.java b/src/main/java/net/minecraft/server/WorldBorder.java
|
||||
index 9038d52eb..632eb1c9d 100644
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldBorder.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldBorder.java
|
||||
@@ -0,0 +0,0 @@ public class WorldBorder {
|
||||
|
@ -1,89 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: DemonWav <demonwav@gmail.com>
|
||||
Date: Sat, 26 Mar 2016 21:36:05 -0500
|
||||
Subject: [PATCH] Prevent possible infinite loop in BlockPosition iterator
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/BlockPosition.java
|
||||
+++ b/src/main/java/net/minecraft/server/BlockPosition.java
|
||||
@@ -0,0 +0,0 @@ public class BlockPosition extends BaseBlockPosition {
|
||||
|
||||
protected BlockPosition a() {
|
||||
if (this.b == null) {
|
||||
- this.b = blockposition;
|
||||
+ this.b = blockposition2; // Paper - use blockposition2 instead of blockposition to prevent infinite loops
|
||||
return this.b;
|
||||
- } else if (this.b.equals(blockposition1)) {
|
||||
+ } else if (this.b.equals(blockposition3)) { // Paper - use blockposition3 instead of blockposition1 to prevent infinite loops
|
||||
return (BlockPosition) this.endOfData();
|
||||
} else {
|
||||
int i = this.b.getX();
|
||||
int j = this.b.getY();
|
||||
int k = this.b.getZ();
|
||||
|
||||
+ // Paper start - use blockposition2 and blockposition3 to prevent infinite loops
|
||||
+ /*
|
||||
if (i < blockposition1.getX()) {
|
||||
++i;
|
||||
} else if (j < blockposition1.getY()) {
|
||||
@@ -0,0 +0,0 @@ public class BlockPosition extends BaseBlockPosition {
|
||||
j = blockposition.getY();
|
||||
++k;
|
||||
}
|
||||
+ */
|
||||
+ if (i < blockposition3.getX()) {
|
||||
+ ++i;
|
||||
+ } else if (j < blockposition3.getY()) {
|
||||
+ i = blockposition2.getX();
|
||||
+ ++j;
|
||||
+ } else if (k < blockposition3.getZ()) {
|
||||
+ i = blockposition2.getX();
|
||||
+ j = blockposition2.getY();
|
||||
+ ++k;
|
||||
+ }
|
||||
+ // Paper end
|
||||
|
||||
this.b = new BlockPosition(i, j, k);
|
||||
return this.b;
|
||||
@@ -0,0 +0,0 @@ public class BlockPosition extends BaseBlockPosition {
|
||||
|
||||
protected BlockPosition.MutableBlockPosition a() {
|
||||
if (this.b == null) {
|
||||
- this.b = new BlockPosition.MutableBlockPosition(blockposition.getX(), blockposition.getY(), blockposition.getZ());
|
||||
+ this.b = new BlockPosition.MutableBlockPosition(blockposition2.getX(), blockposition2.getY(), blockposition2.getZ()); // Paper - use blockposition2 instead of blockposition to prevent infinite loops
|
||||
return this.b;
|
||||
- } else if (this.b.equals(blockposition1)) {
|
||||
+ } else if (this.b.equals(blockposition3)) { // Paper - use blockposition3 instead of blockposition1 to prevent infinite loops
|
||||
return (BlockPosition.MutableBlockPosition) this.endOfData();
|
||||
} else {
|
||||
int i = this.b.getX();
|
||||
int j = this.b.getY();
|
||||
int k = this.b.getZ();
|
||||
|
||||
+ // Paper start - use blockposition2 and blockposition3 to prevent infinite loops
|
||||
+ /*
|
||||
if (i < blockposition1.getX()) {
|
||||
++i;
|
||||
} else if (j < blockposition1.getY()) {
|
||||
@@ -0,0 +0,0 @@ public class BlockPosition extends BaseBlockPosition {
|
||||
j = blockposition.getY();
|
||||
++k;
|
||||
}
|
||||
+ */
|
||||
+ if (i < blockposition3.getX()) {
|
||||
+ ++i;
|
||||
+ } else if (j < blockposition3.getY()) {
|
||||
+ i = blockposition2.getX();
|
||||
+ ++j;
|
||||
+ } else if (k < blockposition3.getZ()) {
|
||||
+ i = blockposition2.getX();
|
||||
+ j = blockposition2.getY();
|
||||
+ ++k;
|
||||
+ }
|
||||
+ // Paper end
|
||||
|
||||
this.b.b = i;
|
||||
this.b.c = j;
|
||||
--
|
@ -33,52 +33,33 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
- private final int c;
|
||||
- // Paper start
|
||||
- public boolean isValidLocation() {
|
||||
- return a >= -30000000 && c >= -30000000 && a < 30000000 && c < 30000000 && b >= 0 && b < 256;
|
||||
+ // Paper start - Make mutable and protected for MutableBlockPos and PooledBlockPos
|
||||
+ protected int x;
|
||||
+ protected int y;
|
||||
+ protected int z;
|
||||
+ protected int a;
|
||||
+ protected int b;
|
||||
+ protected int c;
|
||||
+
|
||||
+ public final boolean isValidLocation() {
|
||||
+ return x >= -30000000 && z >= -30000000 && x < 30000000 && z < 30000000 && y >= 0 && y < 256;
|
||||
return a >= -30000000 && c >= -30000000 && a < 30000000 && c < 30000000 && b >= 0 && b < 256;
|
||||
}
|
||||
public boolean isInvalidYLocation() {
|
||||
- return b < 0 || b >= 256;
|
||||
+ return y < 0 || y >= 256;
|
||||
}
|
||||
// Paper end
|
||||
|
||||
public BaseBlockPosition(int i, int j, int k) {
|
||||
- this.a = i;
|
||||
- this.b = j;
|
||||
- this.c = k;
|
||||
+ this.x = i;
|
||||
+ this.y = j;
|
||||
+ this.z = k;
|
||||
}
|
||||
|
||||
public BaseBlockPosition(double d0, double d1, double d2) {
|
||||
@@ -0,0 +0,0 @@ public class BaseBlockPosition implements Comparable<BaseBlockPosition> {
|
||||
return this.getY() == baseblockposition.getY() ? (this.getZ() == baseblockposition.getZ() ? this.getX() - baseblockposition.getX() : this.getZ() - baseblockposition.getZ()) : this.getY() - baseblockposition.getY();
|
||||
}
|
||||
|
||||
- public int getX() {
|
||||
- return this.a;
|
||||
+ // Paper start - Only allow a single implementation
|
||||
+ public final int getX() {
|
||||
+ return this.x;
|
||||
return this.a;
|
||||
}
|
||||
|
||||
- public int getY() {
|
||||
- return this.b;
|
||||
+ public final int getY() {
|
||||
+ return this.y;
|
||||
return this.b;
|
||||
}
|
||||
|
||||
- public int getZ() {
|
||||
- return this.c;
|
||||
+ public final int getZ() {
|
||||
+ return this.z;
|
||||
return this.c;
|
||||
}
|
||||
+ // Paper end
|
||||
|
||||
@ -89,18 +70,37 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
--- a/src/main/java/net/minecraft/server/BlockPosition.java
|
||||
+++ b/src/main/java/net/minecraft/server/BlockPosition.java
|
||||
@@ -0,0 +0,0 @@ public class BlockPosition extends BaseBlockPosition {
|
||||
if (this.b == null) {
|
||||
this.b = new BlockPosition.MutableBlockPosition(i, j, k);
|
||||
return this.b;
|
||||
- } else if (this.b.b == l && this.b.c == i1 && this.b.d == j1) {
|
||||
+ // Paper start - b, c, d, refer to x, y, z, and as such, a, b, c of BaseBlockPosition
|
||||
+ } else if (((BaseBlockPosition)this.b).a == l && ((BaseBlockPosition)this.b).b == i1 && ((BaseBlockPosition)this.b).c == j1) {
|
||||
return (BlockPosition.MutableBlockPosition) this.endOfData();
|
||||
} else {
|
||||
- if (this.b.b < l) {
|
||||
- ++this.b.b;
|
||||
- } else if (this.b.c < i1) {
|
||||
- this.b.b = i;
|
||||
- ++this.b.c;
|
||||
- } else if (this.b.d < j1) {
|
||||
- this.b.b = i;
|
||||
- this.b.c = j;
|
||||
- ++this.b.d;
|
||||
+ if (((BaseBlockPosition)this.b).a < l) {
|
||||
+ ++((BaseBlockPosition)this.b).a;
|
||||
+ } else if (((BaseBlockPosition)this.b).b < i1) {
|
||||
+ ((BaseBlockPosition)this.b).a = i;
|
||||
+ ++((BaseBlockPosition)this.b).b;
|
||||
+ } else if (((BaseBlockPosition)this.b).c < j1) {
|
||||
+ ((BaseBlockPosition) this.b).a = i;
|
||||
+ ((BaseBlockPosition) this.b).b = j;
|
||||
+ ++((BaseBlockPosition) this.b).c;
|
||||
}
|
||||
// Paper end
|
||||
+ // Paper end
|
||||
|
||||
- this.b.b = i;
|
||||
- this.b.c = j;
|
||||
- this.b.d = k;
|
||||
+ ((BaseBlockPosition) this.b).x = i;
|
||||
+ ((BaseBlockPosition) this.b).y = j;
|
||||
+ ((BaseBlockPosition) this.b).z = k;
|
||||
return this.b;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +0,0 @@ public class BlockPosition extends BaseBlockPosition {
|
||||
|
||||
public static class MutableBlockPosition extends BlockPosition {
|
||||
@ -126,9 +126,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
- this.c = j;
|
||||
- this.d = k;
|
||||
+ // Paper start - Modify base position variables
|
||||
+ ((BaseBlockPosition) this).x = i;
|
||||
+ ((BaseBlockPosition) this).y = j;
|
||||
+ ((BaseBlockPosition) this).z = k;
|
||||
+ ((BaseBlockPosition) this).a = i;
|
||||
+ ((BaseBlockPosition) this).b = j;
|
||||
+ ((BaseBlockPosition) this).c = k;
|
||||
+ // Paper end
|
||||
}
|
||||
|
||||
@ -155,9 +155,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
- this.c = j;
|
||||
- this.d = k;
|
||||
+ // Paper start - Modify base position variables
|
||||
+ ((BaseBlockPosition) this).x = i;
|
||||
+ ((BaseBlockPosition) this).y = j;
|
||||
+ ((BaseBlockPosition) this).z = k;
|
||||
+ ((BaseBlockPosition) this).a = i;
|
||||
+ ((BaseBlockPosition) this).b = j;
|
||||
+ ((BaseBlockPosition) this).c = k;
|
||||
+ // Paper end
|
||||
return this;
|
||||
}
|
||||
@ -172,7 +172,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
|
||||
public void p(int i) {
|
||||
- this.c = i;
|
||||
+ ((BaseBlockPosition) this).y = i; // Paper - Modify base variable
|
||||
+ ((BaseBlockPosition) this).b = i; // Paper - Modify base variable
|
||||
}
|
||||
|
||||
public BlockPosition h() {
|
||||
|
@ -1167,8 +1167,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
try {
|
||||
- SpigotTimings.tickEntityTimer.startTiming(); // Spigot
|
||||
+ entity.tickTimer.startTiming(); // Paper
|
||||
this.g(entity);
|
||||
this.h(entity);
|
||||
- SpigotTimings.tickEntityTimer.stopTiming(); // Spigot
|
||||
+ entity.tickTimer.stopTiming(); // Paper
|
||||
+ entity.tickTimer.startTiming(); // Paper
|
||||
+ this.g(entity);
|
||||
+ entity.tickTimer.stopTiming(); // Paper
|
||||
} catch (Throwable throwable1) {
|
||||
+ entity.tickTimer.stopTiming();
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 77931c01e72ff84c004a310b121a72b52f0efdd5
|
||||
Subproject commit bc05720eba5ca92c3f0da3b21314876c509111a1
|
@ -1 +1 @@
|
||||
Subproject commit 55fa63e8b9c8f5f315f3d631fad2096a008074df
|
||||
Subproject commit 506e9411267240a81a016a47b2c093bedad50a81
|
@ -1 +1 @@
|
||||
Subproject commit c8ff65136f23a3c2770b8d9ca508f61927f8acba
|
||||
Subproject commit 8ea0c87f515290c35baf0029f7b2e046c1ff49cb
|
@ -1 +1 @@
|
||||
Subproject commit 6f7aabf0f73188de2433ec4570412235772f8fba
|
||||
Subproject commit 9deaa4c15ed177075d5b3906878a888571ab1a5e
|
Loading…
Reference in New Issue
Block a user