Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 04:20:04 +01:00
SPIGOT-1964: Remove 1.9.1 patch
Dieser Commit ist enthalten in:
Ursprung
c909c3b884
Commit
de235263df
@ -1,4 +1,4 @@
|
||||
From a09ff91264b91a13d52cc68e9fe61792ab5a8c2e Mon Sep 17 00:00:00 2001
|
||||
From 904cf475635d450be360cb181e0e4fb6d0a19670 Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Sun, 1 Dec 2013 15:10:48 +1100
|
||||
Subject: [PATCH] mc-dev imports
|
||||
@ -968,81 +968,6 @@ index 0000000..5f17034
|
||||
+ return this.data;
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/NavigationListener.java b/src/main/java/net/minecraft/server/NavigationListener.java
|
||||
new file mode 100644
|
||||
index 0000000..f82ea80
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/net/minecraft/server/NavigationListener.java
|
||||
@@ -0,0 +1,69 @@
|
||||
+package net.minecraft.server;
|
||||
+
|
||||
+import java.util.WeakHashMap;
|
||||
+
|
||||
+public class NavigationListener implements IWorldAccess {
|
||||
+
|
||||
+ private static final Object a = new Object();
|
||||
+ private final WeakHashMap<NavigationAbstract, Object> b = new WeakHashMap();
|
||||
+
|
||||
+ public NavigationListener() {}
|
||||
+
|
||||
+ public void a(NavigationAbstract navigationabstract) {
|
||||
+ this.b.put(navigationabstract, NavigationListener.a);
|
||||
+ }
|
||||
+
|
||||
+ public void a(World world, BlockPosition blockposition, IBlockData iblockdata, IBlockData iblockdata1, int i) {
|
||||
+ if (this.a(world, blockposition, iblockdata, iblockdata1)) {
|
||||
+ NavigationAbstract[] anavigationabstract = (NavigationAbstract[]) this.b.keySet().toArray(new NavigationAbstract[0]);
|
||||
+ NavigationAbstract[] anavigationabstract1 = anavigationabstract;
|
||||
+ int j = anavigationabstract.length;
|
||||
+
|
||||
+ for (int k = 0; k < j; ++k) {
|
||||
+ NavigationAbstract navigationabstract = anavigationabstract1[k];
|
||||
+
|
||||
+ if (navigationabstract != null && !navigationabstract.i()) {
|
||||
+ PathEntity pathentity = navigationabstract.k();
|
||||
+
|
||||
+ if (pathentity != null && !pathentity.b() && pathentity.d() != 0) {
|
||||
+ PathPoint pathpoint = navigationabstract.c.c();
|
||||
+ double d0 = blockposition.distanceSquared(((double) pathpoint.a + navigationabstract.a.locX) / 2.0D, ((double) pathpoint.b + navigationabstract.a.locY) / 2.0D, ((double) pathpoint.c + navigationabstract.a.locZ) / 2.0D);
|
||||
+ int l = (pathentity.d() - pathentity.e()) * (pathentity.d() - pathentity.e());
|
||||
+
|
||||
+ if (d0 < (double) l) {
|
||||
+ navigationabstract.j();
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ protected boolean a(World world, BlockPosition blockposition, IBlockData iblockdata, IBlockData iblockdata1) {
|
||||
+ AxisAlignedBB axisalignedbb = iblockdata.d(world, blockposition);
|
||||
+ AxisAlignedBB axisalignedbb1 = iblockdata1.d(world, blockposition);
|
||||
+
|
||||
+ return axisalignedbb != axisalignedbb1 && (axisalignedbb == null || !axisalignedbb.equals(axisalignedbb1));
|
||||
+ }
|
||||
+
|
||||
+ public void a(BlockPosition blockposition) {}
|
||||
+
|
||||
+ public void a(int i, int j, int k, int l, int i1, int j1) {}
|
||||
+
|
||||
+ public void a(EntityHuman entityhuman, SoundEffect soundeffect, SoundCategory soundcategory, double d0, double d1, double d2, float f, float f1) {}
|
||||
+
|
||||
+ public void a(int i, boolean flag, double d0, double d1, double d2, double d3, double d4, double d5, int... aint) {}
|
||||
+
|
||||
+ public void a(Entity entity) {}
|
||||
+
|
||||
+ public void b(Entity entity) {}
|
||||
+
|
||||
+ public void a(SoundEffect soundeffect, BlockPosition blockposition) {}
|
||||
+
|
||||
+ public void a(int i, BlockPosition blockposition, int j) {}
|
||||
+
|
||||
+ public void a(EntityHuman entityhuman, int i, BlockPosition blockposition, int j) {}
|
||||
+
|
||||
+ public void b(int i, BlockPosition blockposition, int j) {}
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/PacketHandshakingInSetProtocol.java b/src/main/java/net/minecraft/server/PacketHandshakingInSetProtocol.java
|
||||
new file mode 100644
|
||||
index 0000000..86f1be7
|
||||
|
@ -1,34 +0,0 @@
|
||||
From 9972735b263dcf4615b6e27f0b1ca1a18c10ad2b Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <git@md-5.net>
|
||||
Date: Fri, 18 Mar 2016 14:41:20 +1100
|
||||
Subject: [PATCH] Don't copy NavigationListener Map on Iteration.
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/NavigationListener.java b/src/main/java/net/minecraft/server/NavigationListener.java
|
||||
index f82ea80..39a4032 100644
|
||||
--- a/src/main/java/net/minecraft/server/NavigationListener.java
|
||||
+++ b/src/main/java/net/minecraft/server/NavigationListener.java
|
||||
@@ -15,12 +15,14 @@ public class NavigationListener implements IWorldAccess {
|
||||
|
||||
public void a(World world, BlockPosition blockposition, IBlockData iblockdata, IBlockData iblockdata1, int i) {
|
||||
if (this.a(world, blockposition, iblockdata, iblockdata1)) {
|
||||
- NavigationAbstract[] anavigationabstract = (NavigationAbstract[]) this.b.keySet().toArray(new NavigationAbstract[0]);
|
||||
- NavigationAbstract[] anavigationabstract1 = anavigationabstract;
|
||||
- int j = anavigationabstract.length;
|
||||
-
|
||||
- for (int k = 0; k < j; ++k) {
|
||||
- NavigationAbstract navigationabstract = anavigationabstract1[k];
|
||||
+ // Spigot start
|
||||
+ // NavigationAbstract[] anavigationabstract = (NavigationAbstract[]) this.b.keySet().toArray(new NavigationAbstract[0]);
|
||||
+ // NavigationAbstract[] anavigationabstract1 = anavigationabstract;
|
||||
+ // int j = anavigationabstract.length;
|
||||
+
|
||||
+ for (NavigationAbstract navigationabstract : this.b.keySet()) {
|
||||
+ // NavigationAbstract navigationabstract = anavigationabstract1[k];
|
||||
+ // Spigot end
|
||||
|
||||
if (navigationabstract != null && !navigationabstract.i()) {
|
||||
PathEntity pathentity = navigationabstract.k();
|
||||
--
|
||||
2.5.0
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren