This commit is contained in:
md_5 2015-04-09 13:45:13 +10:00 committed by Zach Brown
parent 8b5be7ad8e
commit 7a214c95e6
14 changed files with 55 additions and 55 deletions

View File

@ -1,4 +1,4 @@
From 77ed864e5acb8a0e55ab48d6a73af57979427555 Mon Sep 17 00:00:00 2001
From 7ce9aac0d6815ed3c55ae98084d432ce046951b4 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 10 Jan 2013 00:18:11 -0500
Subject: [PATCH] Spigot Timings
@ -171,7 +171,7 @@ index d004df3..d3c7d1b 100644
private void recalcPosition() {
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 256953f..24aaec5 100644
index 296ec31..1b11563 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -23,6 +23,8 @@ import org.bukkit.event.entity.EntityRegainHealthEvent;
@ -183,7 +183,7 @@ index 256953f..24aaec5 100644
public abstract class EntityLiving extends Entity {
private static final UUID a = UUID.fromString("662A6B8D-DA3E-4C1C-8813-96EA6097278D");
@@ -1430,6 +1432,7 @@ public abstract class EntityLiving extends Entity {
@@ -1434,6 +1436,7 @@ public abstract class EntityLiving extends Entity {
}
public void t_() {
@ -191,7 +191,7 @@ index 256953f..24aaec5 100644
super.t_();
if (!this.world.isClientSide) {
int i = this.bv();
@@ -1468,7 +1471,9 @@ public abstract class EntityLiving extends Entity {
@@ -1472,7 +1475,9 @@ public abstract class EntityLiving extends Entity {
}
}
@ -201,7 +201,7 @@ index 256953f..24aaec5 100644
double d0 = this.locX - this.lastX;
double d1 = this.locZ - this.lastZ;
float f = (float) (d0 * d0 + d1 * d1);
@@ -1533,6 +1538,7 @@ public abstract class EntityLiving extends Entity {
@@ -1537,6 +1542,7 @@ public abstract class EntityLiving extends Entity {
this.world.methodProfiler.b();
this.aT += f2;
@ -209,7 +209,7 @@ index 256953f..24aaec5 100644
}
protected float h(float f, float f1) {
@@ -1597,6 +1603,7 @@ public abstract class EntityLiving extends Entity {
@@ -1601,6 +1607,7 @@ public abstract class EntityLiving extends Entity {
}
this.world.methodProfiler.a("ai");
@ -217,7 +217,7 @@ index 256953f..24aaec5 100644
if (this.bD()) {
this.aY = false;
this.aZ = 0.0F;
@@ -1607,6 +1614,7 @@ public abstract class EntityLiving extends Entity {
@@ -1611,6 +1618,7 @@ public abstract class EntityLiving extends Entity {
this.doTick();
this.world.methodProfiler.b();
}
@ -225,7 +225,7 @@ index 256953f..24aaec5 100644
this.world.methodProfiler.b();
this.world.methodProfiler.a("jump");
@@ -1628,11 +1636,15 @@ public abstract class EntityLiving extends Entity {
@@ -1632,11 +1640,15 @@ public abstract class EntityLiving extends Entity {
this.aZ *= 0.98F;
this.ba *= 0.98F;
this.bb *= 0.9F;
@ -367,10 +367,10 @@ index 611a623..af2e9bc 100644
this.methodProfiler.b();
}
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 961a0aa..a273c82 100644
index 5fd0c41..13fb3d8 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1065,6 +1065,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
@@ -1066,6 +1066,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
// CraftBukkit end
private void handleCommand(String s) {
@ -378,7 +378,7 @@ index 961a0aa..a273c82 100644
// CraftBukkit start - whole method
this.c.info(this.player.getName() + " issued server command: " + s);
@@ -1074,18 +1075,22 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
@@ -1075,18 +1076,22 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
this.server.getPluginManager().callEvent(event);
if (event.isCancelled()) {

View File

@ -1,14 +1,14 @@
From 75dfb4e655634137e5d32ebd718d4b2d7d4d9a73 Mon Sep 17 00:00:00 2001
From dedc6e0b11fdf3bfab634d69aa2bf9d9d61ca1fc Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Fri, 21 Jun 2013 18:01:29 +1000
Subject: [PATCH] Allow Disabling of Command Logging
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index a273c82..2ad2dc3 100644
index 13fb3d8..5842bd0 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1067,6 +1067,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
@@ -1068,6 +1068,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
private void handleCommand(String s) {
org.bukkit.craftbukkit.SpigotTimings.playerCommandTimer.startTiming(); // Spigot
// CraftBukkit start - whole method

View File

@ -1,14 +1,14 @@
From b0900f4035c4bdf3d5cbec3306e94150b2ea5e45 Mon Sep 17 00:00:00 2001
From 2882358b67636dc08c5892c18ab1778f19a5f70b Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Fri, 28 Jun 2013 19:52:54 +1000
Subject: [PATCH] Disallow Interaction With Self
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 2ad2dc3..f772206 100644
index 5842bd0..eb4f17b 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1202,6 +1202,13 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
@@ -1203,6 +1203,13 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
PlayerConnectionUtils.ensureMainThread(packetplayinuseentity, this, this.player.u());
WorldServer worldserver = this.minecraftServer.getWorldServer(this.player.dimension);
Entity entity = packetplayinuseentity.a((World) worldserver);

View File

@ -1,4 +1,4 @@
From ac4280f01c590647298a017692373b3eeccf7f39 Mon Sep 17 00:00:00 2001
From 68cfae5df64b4d24920ffe1eb8cc3077be5e7b9b Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sat, 3 Aug 2013 19:27:07 +1000
Subject: [PATCH] Player Collision API
@ -25,10 +25,10 @@ index 55340ab..96ed585 100644
}
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index e90ff2f..ca0430d 100644
index bbae608..c6244a5 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -1670,7 +1670,7 @@ public abstract class EntityLiving extends Entity {
@@ -1674,7 +1674,7 @@ public abstract class EntityLiving extends Entity {
}
}));

View File

@ -1,11 +1,11 @@
From 9f04d69a1f42ed238491ac6bad04cd8930251b99 Mon Sep 17 00:00:00 2001
From 831b4e3f9b8c22ee9222d7156c6d4ddc22172949 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sun, 6 Oct 2013 17:36:28 +1100
Subject: [PATCH] Don't Special Case X Move Value
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index f772206..2eef96d 100644
index eb4f17b..21da86e 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -109,6 +109,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
@ -41,9 +41,9 @@ index f772206..2eef96d 100644
// Skip the first time we do this
- if (from.getX() != Double.MAX_VALUE) {
+ if (true) { // Spigot - don't skip any move events
Location oldTo = to.clone();
PlayerMoveEvent event = new PlayerMoveEvent(player, from, to);
this.server.getPluginManager().callEvent(event);
--
2.1.0

View File

@ -1,4 +1,4 @@
From c73b71490b9152bc870c3a02f00e96c90680ebd8 Mon Sep 17 00:00:00 2001
From b1e0831238da2e176d7af809832d3e7466946d3f Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 31 Jan 2014 11:18:34 -0500
Subject: [PATCH] Cap Entity Collisions
@ -19,10 +19,10 @@ index b930c0d..82accf4 100644
if (entity.passenger != this && entity.vehicle != this) {
if (!entity.noclip && !this.noclip) {
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index ca0430d..c67f0ee 100644
index c6244a5..99b120a 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -1671,7 +1671,9 @@ public abstract class EntityLiving extends Entity {
@@ -1675,7 +1675,9 @@ public abstract class EntityLiving extends Entity {
}));
if (this.ad() && !list.isEmpty()) { // Spigot: Add this.ad() condition
@ -32,7 +32,7 @@ index ca0430d..c67f0ee 100644
Entity entity = (Entity) list.get(i);
// TODO better check now?
@@ -1681,8 +1683,11 @@ public abstract class EntityLiving extends Entity {
@@ -1685,8 +1687,11 @@ public abstract class EntityLiving extends Entity {
}
// CraftBukkit end

View File

@ -1,14 +1,14 @@
From 79dac22179617874f09904275da744678638ba0a Mon Sep 17 00:00:00 2001
From ac4d5a7cd5d3018d2574cc62bccf351888faedd8 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sat, 8 Feb 2014 08:13:40 +0000
Subject: [PATCH] Spam Filter Exclusions
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 2eef96d..2e191a2 100644
index 21da86e..f39beb6 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -973,9 +973,20 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
@@ -974,9 +974,20 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
this.minecraftServer.getPlayerList().sendMessage(chatmessage1, false);
}

View File

@ -1,14 +1,14 @@
From 34048df211127ea6f6f8d9e6e55ac1d39bcfde87 Mon Sep 17 00:00:00 2001
From eb03c893b06b2a2943b7f35230a258e60fed9f30 Mon Sep 17 00:00:00 2001
From: md_5 <git@md-5.net>
Date: Wed, 12 Feb 2014 18:18:01 +1100
Subject: [PATCH] Allow Disabling Creative Item Filter
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 2e191a2..7812c76 100644
index f39beb6..41c2b20 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1703,7 +1703,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
@@ -1704,7 +1704,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
boolean flag1 = packetplayinsetcreativeslot.a() >= 1 && packetplayinsetcreativeslot.a() < 36 + PlayerInventory.getHotbarSize();
// CraftBukkit - Add invalidItems check

View File

@ -1,4 +1,4 @@
From ed6259454482e529f7dd7b0810f93d5424723134 Mon Sep 17 00:00:00 2001
From 1cd4ac34c24e01fbe015e26eaef655a207bd7e8a Mon Sep 17 00:00:00 2001
From: hcherndon <hcherndon@gmail.com>
Date: Sat, 15 Feb 2014 01:51:20 -0600
Subject: [PATCH] Unfinalize the isDisconnected() method by bukkit.
@ -6,10 +6,10 @@ Subject: [PATCH] Unfinalize the isDisconnected() method by bukkit.
This would literally mean the world to me. You have no idea how much this method being final is fucking me over right now. (Working with NPC's and what not.)
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 7812c76..cf450d2 100644
index 41c2b20..f1139e4 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -2064,7 +2064,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
@@ -2065,7 +2065,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
}
// CraftBukkit start - Add "isDisconnected" method

View File

@ -1,4 +1,4 @@
From 80e801fc657ff45ecbab4918903f43228359ef9f Mon Sep 17 00:00:00 2001
From 61f1ef4a946033a3e50ab6b381ab6c44040abd04 Mon Sep 17 00:00:00 2001
From: drXor <mcyoungsota@gmail.com>
Date: Sat, 15 Mar 2014 01:30:05 -0400
Subject: [PATCH] Descriptive kick reasons instead of Nope!
@ -27,7 +27,7 @@ index 82accf4..d6bef0b 100644
f1 = 0;
}
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index cf450d2..80615cc 100644
index f1139e4..28a604d 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -200,7 +200,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
@ -39,7 +39,7 @@ index cf450d2..80615cc 100644
return;
}
// CraftBukkit end
@@ -896,7 +896,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
@@ -897,7 +897,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
this.player.z();
} else {
PlayerConnection.c.warn(this.player.getName() + " tried to set an invalid carried item");

View File

@ -1,4 +1,4 @@
From 125b8d03b30b94113980a9989108dad16bc69033 Mon Sep 17 00:00:00 2001
From f5b6a2271b0d258880c89ddf09f497cf411927ec Mon Sep 17 00:00:00 2001
From: riking <rikingcoding@gmail.com>
Date: Wed, 14 May 2014 13:46:48 -0700
Subject: [PATCH] Process conversation input on the main thread. Fixes
@ -6,10 +6,10 @@ Subject: [PATCH] Process conversation input on the main thread. Fixes
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 80615cc..5465e12 100644
index 28a604d..dfdd8c3 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -958,7 +958,18 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
@@ -959,7 +959,18 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
} else if (s.isEmpty()) {
c.warn(this.player.getName() + " tried to send an empty message");
} else if (getPlayer().isConversing()) {

View File

@ -1,4 +1,4 @@
From f7b551edcc999a33c676d402f4469e4f3ebc791c Mon Sep 17 00:00:00 2001
From b5d686ef919877ea53d010a47c7adb74e31a7b0a Mon Sep 17 00:00:00 2001
From: Thinkofdeath <thinkofdeath@spigotmc.org>
Date: Sun, 29 Jun 2014 21:10:34 +0100
Subject: [PATCH] Limit block placement/interaction packets
@ -24,10 +24,10 @@ index c611db1..28cb5e3 100644
public void b(PacketDataSerializer packetdataserializer) throws IOException {}
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 5465e12..0ab9b56 100644
index dfdd8c3..8158f1b 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -630,10 +630,23 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
@@ -631,10 +631,23 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
// CraftBukkit end
}
@ -52,7 +52,7 @@ index 5465e12..0ab9b56 100644
// CraftBukkit start
if (this.player.dead) return;
@@ -656,7 +669,8 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
@@ -657,7 +670,8 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
// CraftBukkit start
int itemstackAmount = itemstack.count;
@ -62,7 +62,7 @@ index 5465e12..0ab9b56 100644
// Raytrace to look for 'rogue armswings'
float f1 = this.player.pitch;
float f2 = this.player.yaw;
@@ -692,6 +706,8 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
@@ -693,6 +707,8 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
if (!cancelled) {
this.player.playerInteractManager.useItem(this.player, this.player.world, itemstack);
}
@ -71,7 +71,7 @@ index 5465e12..0ab9b56 100644
// CraftBukkit - notch decrements the counter by 1 in the above method with food,
// snowballs and so forth, but he does it in a place that doesn't cause the
@@ -717,7 +733,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
@@ -718,7 +734,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
}
if (this.checkMovement && this.player.e((double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D) < 64.0D && !this.minecraftServer.a(worldserver, blockposition, this.player) && worldserver.getWorldBorder().a(blockposition)) {
@ -80,7 +80,7 @@ index 5465e12..0ab9b56 100644
}
flag = true;
@@ -1134,6 +1150,19 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
@@ -1135,6 +1151,19 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
public void a(PacketPlayInArmAnimation packetplayinarmanimation) {
if (this.player.dead) return; // CraftBukkit
PlayerConnectionUtils.ensureMainThread(packetplayinarmanimation, this, this.player.u());

View File

@ -1,14 +1,14 @@
From 33f9b7a246cb39835d73912acd0eb679d3db4e6d Mon Sep 17 00:00:00 2001
From 151d9fe1ee12e743abdc3428ff633a839ce72d26 Mon Sep 17 00:00:00 2001
From: Jonas Konrad <me@yawk.at>
Date: Fri, 4 Jul 2014 23:03:13 +0200
Subject: [PATCH] Make "moved wrongly" limit configurable
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 0ab9b56..a550d80 100644
index 8158f1b..f4730c0 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -420,7 +420,8 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
@@ -421,7 +421,8 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
d17 = d11 * d11 + d12 * d12 + d13 * d13;
boolean flag1 = false;

View File

@ -1,14 +1,14 @@
From fe14e1a3b231e83f62f1386123c85d28478e42bf Mon Sep 17 00:00:00 2001
From 66f1f399e6fb8089c5a51ab4671d71e347d0a55a Mon Sep 17 00:00:00 2001
From: Jonas Konrad <me@yawk.at>
Date: Tue, 22 Jul 2014 15:59:01 +0200
Subject: [PATCH] Make "moved too quickly" limit configurable
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index a550d80..284c776 100644
index f4730c0..97631e6 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -393,7 +393,8 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
@@ -394,7 +394,8 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
// CraftBukkit end
double d17 = d14 * d14 + d15 * d15 + d16 * d16;