3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-15 11:00:06 +01:00
Dieser Commit ist enthalten in:
Thinkofdeath 2015-04-16 11:19:45 +01:00 committet von Zach Brown
Ursprung e62cf21c8f
Commit fbc208645c
28 geänderte Dateien mit 132 neuen und 132 gelöschten Zeilen

Datei anzeigen

@ -1,4 +1,4 @@
From ea20c209ed09e9662bf1a939b9db516333eaad87 Mon Sep 17 00:00:00 2001
From f8adc00eb44d01b70012f7247e4e5e76813ced4d Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sun, 2 Jun 2013 15:10:56 +1000
Subject: [PATCH] Skeleton API Implementations
@ -124,10 +124,10 @@ index 16a35b8..c1879f4 100644
+ // Spigot end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
index 40d7fca..23cf3b9 100644
index 8b18e1f..8c4f734 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -791,4 +791,16 @@ class CraftMetaItem implements ItemMeta, Repairable {
@@ -819,4 +819,16 @@ class CraftMetaItem implements ItemMeta, Repairable {
return HANDLED_TAGS;
}
}

Datei anzeigen

@ -1,4 +1,4 @@
From 033cd16b40a5567285419fc695b395aca2abc7ec Mon Sep 17 00:00:00 2001
From b77b6805e5dbf69e76e5dc928f9ed9129228e14c Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Tue, 11 Jun 2013 12:56:02 +1000
Subject: [PATCH] Better Chunk Tick Selection
@ -112,10 +112,10 @@ index 52e3cfa..75e0714 100644
this.methodProfiler.b();
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 04da01e..24ee706 100644
index 40e63fc..5fd3934 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -356,12 +356,15 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@@ -357,12 +357,15 @@ public class WorldServer extends World implements IAsyncTaskHandler {
protected void h() {
super.h();
if (this.worldData.getType() == WorldType.DEBUG_ALL_BLOCK_STATES) {
@ -134,7 +134,7 @@ index 04da01e..24ee706 100644
}
} else {
@@ -373,9 +376,21 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@@ -374,9 +377,21 @@ public class WorldServer extends World implements IAsyncTaskHandler {
// ChunkCoordIntPair chunkcoordintpair1 = (ChunkCoordIntPair) iterator1.next();
// int k = chunkcoordintpair1.x * 16;
// int l = chunkcoordintpair1.z * 16;
@ -159,7 +159,7 @@ index 04da01e..24ee706 100644
int k = chunkX * 16;
int l = chunkZ * 16;
@@ -469,6 +484,12 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@@ -470,6 +485,12 @@ public class WorldServer extends World implements IAsyncTaskHandler {
}
}

Datei anzeigen

@ -1,4 +1,4 @@
From aff8b90e5255c5e12f2d4e6d740086847f2431d5 Mon Sep 17 00:00:00 2001
From 82ace6763d2f76de660ec454ed803eb8ddefa14e Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sat, 23 Mar 2013 09:52:41 +1100
Subject: [PATCH] View Distance
@ -22,10 +22,10 @@ index 688d6f0..abb24c8 100644
public WorldServer a() {
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 24ee706..d40c194 100644
index 5fd3934..ea9e2fb 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -61,7 +61,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@@ -62,7 +62,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
// CraftBukkit end
this.server = minecraftserver;
this.tracker = new EntityTracker(this);

Datei anzeigen

@ -1,4 +1,4 @@
From 7ce9aac0d6815ed3c55ae98084d432ce046951b4 Mon Sep 17 00:00:00 2001
From 00b24e2eea1e526a6d351ae508f66f9e5f71d474 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
@ -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 5fd0c41..13fb3d8 100644
index 459752b..d6f6291 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1066,6 +1066,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
@@ -1061,6 +1061,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
// CraftBukkit end
private void handleCommand(String s) {
@ -378,7 +378,7 @@ index 5fd0c41..13fb3d8 100644
// CraftBukkit start - whole method
this.c.info(this.player.getName() + " issued server command: " + s);
@@ -1075,18 +1076,22 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
@@ -1070,18 +1071,22 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
this.server.getPluginManager().callEvent(event);
if (event.isCancelled()) {
@ -529,10 +529,10 @@ index d238c81..47778d1 100644
}
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index d40c194..6ec9648 100644
index ea9e2fb..1d1ea9b 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -222,10 +222,13 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@@ -223,10 +223,13 @@ public class WorldServer extends World implements IAsyncTaskHandler {
// CraftBukkit start - Only call spawner if we have players online and the world allows for mobs or animals
long time = this.worldData.getTime();
if (this.getGameRules().getBoolean("doMobSpawning") && this.worldData.getType() != WorldType.DEBUG_ALL_BLOCK_STATES && (this.allowMonsters || this.allowAnimals) && (this instanceof WorldServer && this.players.size() > 0)) {
@ -547,7 +547,7 @@ index d40c194..6ec9648 100644
this.methodProfiler.c("chunkSource");
this.chunkProvider.unloadChunks();
int j = this.a(1.0F);
@@ -239,21 +242,34 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@@ -240,21 +243,34 @@ public class WorldServer extends World implements IAsyncTaskHandler {
this.worldData.setDayTime(this.worldData.getDayTime() + 1L);
}

Datei anzeigen

@ -1,14 +1,14 @@
From 6017e565a2dd5505bbf9e8370b28819961b24ae5 Mon Sep 17 00:00:00 2001
From b9f6f612efda2ede563c17125596cc5e54ff0e79 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Mon, 4 Mar 2013 18:45:52 +1100
Subject: [PATCH] PlayerItemDamageEvent
diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java
index b966307..4976174 100644
index 3752690..b51da0e 100644
--- a/src/main/java/net/minecraft/server/ItemStack.java
+++ b/src/main/java/net/minecraft/server/ItemStack.java
@@ -330,6 +330,11 @@ public final class ItemStack {
@@ -338,6 +338,11 @@ public final class ItemStack {
}
public boolean isDamaged(int i, Random random) {
@ -20,7 +20,7 @@ index b966307..4976174 100644
if (!this.e()) {
return false;
} else {
@@ -344,7 +349,16 @@ public final class ItemStack {
@@ -352,7 +357,16 @@ public final class ItemStack {
}
i -= k;
@ -38,7 +38,7 @@ index b966307..4976174 100644
return false;
}
}
@@ -357,7 +371,7 @@ public final class ItemStack {
@@ -365,7 +379,7 @@ public final class ItemStack {
public void damage(int i, EntityLiving entityliving) {
if (!(entityliving instanceof EntityHuman) || !((EntityHuman) entityliving).abilities.canInstantlyBuild) {
if (this.e()) {

Datei anzeigen

@ -1,4 +1,4 @@
From d1b5ef6383556297513ca279dff21c3a67c876ef Mon Sep 17 00:00:00 2001
From 3571d158bf5b247a039862f71f3e397e1cbc6630 Mon Sep 17 00:00:00 2001
From: Andy Shulman <andy.shulman@hotmail.com>
Date: Mon, 15 Apr 2013 20:06:37 -0500
Subject: [PATCH] Implement SpawnerSpawnEvent.
@ -64,7 +64,7 @@ index 8d668fa..41cfde8 100644
return entity;
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 7da317c..218fd1f 100644
index 10ac959..c5eca56 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -18,6 +18,7 @@ import org.bukkit.Statistic.Type;
@ -75,7 +75,7 @@ index 7da317c..218fd1f 100644
import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.craftbukkit.CraftStatistic;
import org.bukkit.craftbukkit.CraftWorld;
@@ -127,6 +128,22 @@ public class CraftEventFactory {
@@ -128,6 +129,22 @@ public class CraftEventFactory {
}
/**

Datei anzeigen

@ -1,14 +1,14 @@
From dedc6e0b11fdf3bfab634d69aa2bf9d9d61ca1fc Mon Sep 17 00:00:00 2001
From d18bd3032e8271601709a7c841c72716cfc6f624 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 13fb3d8..5842bd0 100644
index d6f6291..5b1900a 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1068,6 +1068,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
@@ -1063,6 +1063,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
private void handleCommand(String s) {
org.bukkit.craftbukkit.SpigotTimings.playerCommandTimer.startTiming(); // Spigot
// CraftBukkit start - whole method

Datei anzeigen

@ -1,14 +1,14 @@
From 2882358b67636dc08c5892c18ab1778f19a5f70b Mon Sep 17 00:00:00 2001
From 38cd29103c2ced5c7da0603821c4f75d47960f42 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 5842bd0..eb4f17b 100644
index 5b1900a..60fa768 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1203,6 +1203,13 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
@@ -1198,6 +1198,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);

Datei anzeigen

@ -1,11 +1,11 @@
From 831b4e3f9b8c22ee9222d7156c6d4ddc22172949 Mon Sep 17 00:00:00 2001
From 3044bd3231f451f14810c8382a6bac82b877d1b7 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 eb4f17b..21da86e 100644
index 60fa768..1e8dcc1 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
@ -16,7 +16,7 @@ index eb4f17b..21da86e 100644
public CraftPlayer getPlayer() {
return (this.player == null) ? null : (CraftPlayer) this.player.getBukkitEntity();
@@ -223,6 +224,18 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
@@ -217,6 +218,18 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
}
// CraftBukkit start - fire PlayerMoveEvent
Player player = this.getPlayer();
@ -35,7 +35,7 @@ index eb4f17b..21da86e 100644
Location from = new Location(player.getWorld(), lastPosX, lastPosY, lastPosZ, lastYaw, lastPitch); // Get the Players previous Event location.
Location to = player.getLocation().clone(); // Start off the To location as the Players current location.
@@ -251,7 +264,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
@@ -245,7 +258,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
this.lastPitch = to.getPitch();
// Skip the first time we do this

Datei anzeigen

@ -1,4 +1,4 @@
From 0ace2fce8a94bec8d0251ebe7dfe03a47061feca Mon Sep 17 00:00:00 2001
From 6f07b5b8fb96bdfa7b2bd48ae6e302f0f175a14c Mon Sep 17 00:00:00 2001
From: md_5 <git@md-5.net>
Date: Sun, 2 Feb 2014 16:55:46 +0000
Subject: [PATCH] Add Option to Nerf Mobs from Spawner's
@ -17,10 +17,10 @@ index 5e1e695..b930c0d 100644
// Spigot end
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
index c8156aa..7c23753 100644
index d0769c6..acf0578 100644
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
@@ -450,6 +450,12 @@ public abstract class EntityInsentient extends EntityLiving {
@@ -457,6 +457,12 @@ public abstract class EntityInsentient extends EntityLiving {
this.world.methodProfiler.a("checkDespawn");
this.D();
this.world.methodProfiler.b();

Datei anzeigen

@ -1,14 +1,14 @@
From 1f5b13035c2d5ad4217aae71be5509e5cc4518df Mon Sep 17 00:00:00 2001
From f27c285f4893aeeb368b073e33c6d26a302b5d6c Mon Sep 17 00:00:00 2001
From: md_5 <git@md-5.net>
Date: Fri, 10 Jan 2014 15:15:50 +1100
Subject: [PATCH] Fix ItemStack Unbreakable Code
diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java
index 4976174..bbe816c 100644
index b51da0e..86b20c7 100644
--- a/src/main/java/net/minecraft/server/ItemStack.java
+++ b/src/main/java/net/minecraft/server/ItemStack.java
@@ -278,7 +278,13 @@ public final class ItemStack {
@@ -286,7 +286,13 @@ public final class ItemStack {
}
public boolean e() {

Datei anzeigen

@ -1,14 +1,14 @@
From ac4d5a7cd5d3018d2574cc62bccf351888faedd8 Mon Sep 17 00:00:00 2001
From eafea3420ac76bfdc51785764024dc8f74086cad 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 21da86e..f39beb6 100644
index 1e8dcc1..63fe40e 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -974,9 +974,20 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
@@ -969,9 +969,20 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
this.minecraftServer.getPlayerList().sendMessage(chatmessage1, false);
}

Datei anzeigen

@ -1,14 +1,14 @@
From eb03c893b06b2a2943b7f35230a258e60fed9f30 Mon Sep 17 00:00:00 2001
From 62f6d3d586be6666187e97e5dcd38689dddf6567 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 f39beb6..41c2b20 100644
index 63fe40e..cf794b5 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1704,7 +1704,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
@@ -1695,7 +1695,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
boolean flag1 = packetplayinsetcreativeslot.a() >= 1 && packetplayinsetcreativeslot.a() < 36 + PlayerInventory.getHotbarSize();
// CraftBukkit - Add invalidItems check

Datei anzeigen

@ -1,4 +1,4 @@
From 1cd4ac34c24e01fbe015e26eaef655a207bd7e8a Mon Sep 17 00:00:00 2001
From b1bae6016141e328ccc661362d7cbba0833f3ab2 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 41c2b20..f1139e4 100644
index cf794b5..d8f9299 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -2065,7 +2065,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
@@ -2058,7 +2058,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
}
// CraftBukkit start - Add "isDisconnected" method

Datei anzeigen

@ -1,4 +1,4 @@
From 61f1ef4a946033a3e50ab6b381ab6c44040abd04 Mon Sep 17 00:00:00 2001
From 4c5b325c337e4824aadd558eb5dc9321481fb3d6 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,10 +27,10 @@ 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 f1139e4..28a604d 100644
index d8f9299..8e8f1cf 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
@@ -194,7 +194,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
|| !NumberConversions.isFinite(packetplayinflying.yaw)
|| !NumberConversions.isFinite(packetplayinflying.pitch)) {
c.warn(player.getName() + " was caught trying to crash the server with an invalid position.");
@ -39,7 +39,7 @@ index f1139e4..28a604d 100644
return;
}
// CraftBukkit end
@@ -897,7 +897,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
@@ -892,7 +892,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
this.player.z();
} else {
PlayerConnection.c.warn(this.player.getName() + " tried to set an invalid carried item");

Datei anzeigen

@ -1,4 +1,4 @@
From f5b6a2271b0d258880c89ddf09f497cf411927ec Mon Sep 17 00:00:00 2001
From a4f10950a712aa45be78dc52b0649bd0840bed42 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 28a604d..dfdd8c3 100644
index 8e8f1cf..188e6ce 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -959,7 +959,18 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
@@ -954,7 +954,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()) {

Datei anzeigen

@ -1,14 +1,14 @@
From 34c073d1b7b4308e14e5e2e8278e7581a3021ad8 Mon Sep 17 00:00:00 2001
From 97810be397989619822db3a86c28981216c5d80c Mon Sep 17 00:00:00 2001
From: Thinkofdeath <thinkofdeath@spigotmc.org>
Date: Thu, 26 Jun 2014 23:42:52 +0100
Subject: [PATCH] Add damager to the unhandled error
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 218fd1f..ed762cd 100644
index c5eca56..211c421 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -184,7 +184,7 @@ public class CraftEventFactory {
@@ -185,7 +185,7 @@ public class CraftEventFactory {
*/
public static PlayerInteractEvent callPlayerInteractEvent(EntityHuman who, Action action, ItemStack itemstack) {
if (action != Action.LEFT_CLICK_AIR && action != Action.RIGHT_CLICK_AIR) {
@ -17,7 +17,7 @@ index 218fd1f..ed762cd 100644
}
return callPlayerInteractEvent(who, action, new BlockPosition(0, 256, 0), EnumDirection.SOUTH, itemstack);
}
@@ -468,7 +468,7 @@ public class CraftEventFactory {
@@ -469,7 +469,7 @@ public class CraftEventFactory {
if (source == DamageSource.CACTUS) {
cause = DamageCause.CONTACT;
} else {
@ -26,7 +26,7 @@ index 218fd1f..ed762cd 100644
}
EntityDamageEvent event = callEvent(new EntityDamageByBlockEvent(damager, entity.getBukkitEntity(), cause, modifiers, modifierFunctions));
if (!event.isCancelled()) {
@@ -486,7 +486,7 @@ public class CraftEventFactory {
@@ -487,7 +487,7 @@ public class CraftEventFactory {
} else if (source == DamageSource.FALL) {
cause = DamageCause.FALL;
} else {
@ -35,7 +35,7 @@ index 218fd1f..ed762cd 100644
}
EntityDamageEvent event = callEvent(new EntityDamageByEntityEvent(damager, entity.getBukkitEntity(), cause, modifiers, modifierFunctions));
if (!event.isCancelled()) {
@@ -524,7 +524,7 @@ public class CraftEventFactory {
@@ -525,7 +525,7 @@ public class CraftEventFactory {
return callEntityDamageEvent(null, entity, cause, modifiers, modifierFunctions);
}

Datei anzeigen

@ -1,4 +1,4 @@
From b5d686ef919877ea53d010a47c7adb74e31a7b0a Mon Sep 17 00:00:00 2001
From 84ab4d1c872c790b2dd1c43afbd2a429dbd76f89 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 dfdd8c3..8158f1b 100644
index 188e6ce..9ea05bd 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -631,10 +631,23 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
@@ -626,10 +626,23 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
// CraftBukkit end
}
@ -52,7 +52,7 @@ index dfdd8c3..8158f1b 100644
// CraftBukkit start
if (this.player.dead) return;
@@ -657,7 +670,8 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
@@ -652,7 +665,8 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
// CraftBukkit start
int itemstackAmount = itemstack.count;
@ -62,7 +62,7 @@ index dfdd8c3..8158f1b 100644
// Raytrace to look for 'rogue armswings'
float f1 = this.player.pitch;
float f2 = this.player.yaw;
@@ -693,6 +707,8 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
@@ -688,6 +702,8 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
if (!cancelled) {
this.player.playerInteractManager.useItem(this.player, this.player.world, itemstack);
}
@ -71,7 +71,7 @@ index dfdd8c3..8158f1b 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
@@ -718,7 +734,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
@@ -713,7 +729,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 dfdd8c3..8158f1b 100644
}
flag = true;
@@ -1135,6 +1151,19 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
@@ -1130,6 +1146,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());

Datei anzeigen

@ -1,4 +1,4 @@
From fd93ccd779ee1794a5697138effc89d031c651d1 Mon Sep 17 00:00:00 2001
From c02583cfbdf7d21f05143d08754d5a06ed8c8cb5 Mon Sep 17 00:00:00 2001
From: Thinkofdeath <thinkofdeath@spigotmc.org>
Date: Wed, 2 Jul 2014 23:35:51 +0100
Subject: [PATCH] Better item validation
@ -64,7 +64,7 @@ index 32af4ee..f426c2e 100644
}
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java
index f23decd..13dbcd4 100644
index 0318958..0b5ada0 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java
@@ -22,6 +22,10 @@ import net.minecraft.server.IChatBaseComponent;
@ -76,9 +76,9 @@ index f23decd..13dbcd4 100644
+// Spigot end
+
@DelegateDeserialization(SerializableMeta.class)
class CraftMetaBook extends CraftMetaItem implements BookMeta {
public class CraftMetaBook extends CraftMetaItem implements BookMeta {
static final ItemMetaKey BOOK_TITLE = new ItemMetaKey("title");
@@ -57,11 +61,11 @@ class CraftMetaBook extends CraftMetaItem implements BookMeta {
@@ -57,11 +61,11 @@ public class CraftMetaBook extends CraftMetaItem implements BookMeta {
super(tag);
if (tag.hasKey(BOOK_TITLE.NBT)) {
@ -92,7 +92,7 @@ index f23decd..13dbcd4 100644
}
boolean resolved = false;
@@ -86,7 +90,7 @@ class CraftMetaBook extends CraftMetaItem implements BookMeta {
@@ -86,7 +90,7 @@ public class CraftMetaBook extends CraftMetaItem implements BookMeta {
// Ignore and treat as an old book
}
}
@ -102,12 +102,12 @@ index f23decd..13dbcd4 100644
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
index 23cf3b9..c081ec7 100644
index 8c4f734..2429eef 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -43,6 +43,10 @@ import java.util.HashSet;
import java.util.Set;
import org.bukkit.block.BlockState;
@@ -47,6 +47,10 @@ import java.util.logging.Logger;
import net.minecraft.server.NBTCompressedStreamTools;
import org.apache.commons.codec.binary.Base64;
+// Spigot start
+import static org.spigotmc.ValidateUtils.*;
@ -116,7 +116,7 @@ index 23cf3b9..c081ec7 100644
/**
* Children must include the following:
*
@@ -246,7 +250,7 @@ class CraftMetaItem implements ItemMeta, Repairable {
@@ -247,7 +251,7 @@ class CraftMetaItem implements ItemMeta, Repairable {
NBTTagCompound display = tag.getCompound(DISPLAY.NBT);
if (display.hasKey(NAME.NBT)) {
@ -125,7 +125,7 @@ index 23cf3b9..c081ec7 100644
}
if (display.hasKey(LORE.NBT)) {
@@ -254,7 +258,7 @@ class CraftMetaItem implements ItemMeta, Repairable {
@@ -255,7 +259,7 @@ class CraftMetaItem implements ItemMeta, Repairable {
lore = new ArrayList<String>(list.size());
for (int index = 0; index < list.size(); index++) {

Datei anzeigen

@ -1,14 +1,14 @@
From 151d9fe1ee12e743abdc3428ff633a839ce72d26 Mon Sep 17 00:00:00 2001
From d56ab7af0599afc6674b4825f22cab3cda051ad4 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 8158f1b..f4730c0 100644
index 9ea05bd..056516c 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -421,7 +421,8 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
@@ -416,7 +416,8 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
d17 = d11 * d11 + d12 * d12 + d13 * d13;
boolean flag1 = false;

Datei anzeigen

@ -1,14 +1,14 @@
From 66f1f399e6fb8089c5a51ab4671d71e347d0a55a Mon Sep 17 00:00:00 2001
From 9c6f37051dbfb75d73f01f7437d14e125b300ccd 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 f4730c0..97631e6 100644
index 056516c..5f3884a 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -394,7 +394,8 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
@@ -389,7 +389,8 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
// CraftBukkit end
double d17 = d14 * d14 + d15 * d15 + d16 * d16;

Datei anzeigen

@ -1,4 +1,4 @@
From caf797b43931de5b1cddcc0ff713b9639d6ce120 Mon Sep 17 00:00:00 2001
From dc7a41d7197231eea336e1030f780c7a09a9a5ab Mon Sep 17 00:00:00 2001
From: Thinkofdeath <thinkofdeath@spigotmc.org>
Date: Thu, 31 Jul 2014 17:48:20 +0100
Subject: [PATCH] Filter attribute modifiers which cause the attribute to go
@ -6,10 +6,10 @@ Subject: [PATCH] Filter attribute modifiers which cause the attribute to go
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
index c081ec7..bf5edf8 100644
index 2429eef..dbdd47d 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -45,6 +45,8 @@ import org.bukkit.block.BlockState;
@@ -49,6 +49,8 @@ import org.apache.commons.codec.binary.Base64;
// Spigot start
import static org.spigotmc.ValidateUtils.*;
@ -18,7 +18,7 @@ index c081ec7..bf5edf8 100644
// Spigot end
/**
@@ -278,6 +280,123 @@ class CraftMetaItem implements ItemMeta, Repairable {
@@ -279,6 +281,123 @@ class CraftMetaItem implements ItemMeta, Repairable {
NBTTagList save = null;
NBTTagList nbttaglist = tag.getList(ATTRIBUTES.NBT, 10);

Datei anzeigen

@ -1,4 +1,4 @@
From 2b5d40314c8f0208bbbd01d2fc8dcba073d344e8 Mon Sep 17 00:00:00 2001
From 49337acf281653a30930c7ba78f3909e45b54707 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 15 Aug 2014 00:56:41 -0400
Subject: [PATCH] Fix Corrupted Trapped Chest
@ -9,10 +9,10 @@ If a Trapped Chest gets its Tile Entity corrupted, it will crash the server ever
This will now fix Trapped Chests too.
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 6ec9648..054f679 100644
index 1d1ea9b..a502e06 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -125,7 +125,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@@ -126,7 +126,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
TileEntity result = super.getTileEntity(pos);
Block type = getType(pos).getBlock();

Datei anzeigen

@ -1,14 +1,14 @@
From 30bd1eb3d35f595c9e1bf5704529ae38cf40459f Mon Sep 17 00:00:00 2001
From 4f4e345db08d04567c10f3f9dab0120cf4934e97 Mon Sep 17 00:00:00 2001
From: drXor <mcyoung@mit.edu>
Date: Fri, 15 Aug 2014 18:11:09 -0400
Subject: [PATCH] Remove uneeded validation
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
index bf5edf8..60c4bad 100644
index dbdd47d..6c4c524 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -237,7 +237,7 @@ class CraftMetaItem implements ItemMeta, Repairable {
@@ -239,7 +239,7 @@ class CraftMetaItem implements ItemMeta, Repairable {
this.lore = new ArrayList<String>(meta.lore);
}
@ -17,7 +17,7 @@ index bf5edf8..60c4bad 100644
this.enchantments = new HashMap<Enchantment, Integer>(meta.enchantments);
}
@@ -559,7 +559,7 @@ class CraftMetaItem implements ItemMeta, Repairable {
@@ -573,7 +573,7 @@ class CraftMetaItem implements ItemMeta, Repairable {
}
static void applyEnchantments(Map<Enchantment, Integer> enchantments, NBTTagCompound tag, ItemMetaKey key) {
@ -26,7 +26,7 @@ index bf5edf8..60c4bad 100644
return;
}
@@ -650,7 +650,14 @@ class CraftMetaItem implements ItemMeta, Repairable {
@@ -660,7 +660,14 @@ class CraftMetaItem implements ItemMeta, Repairable {
}
public boolean removeEnchant(Enchantment ench) {

Datei anzeigen

@ -1,4 +1,4 @@
From a8f1f582c3b217c9f5e826e0b65b144a95058128 Mon Sep 17 00:00:00 2001
From 1fca4b8a4edfb11b71487b5eeb88e17736b5d4c0 Mon Sep 17 00:00:00 2001
From: Thinkofdeath <thinkofdeath@spigotmc.org>
Date: Tue, 19 Aug 2014 11:04:21 +0100
Subject: [PATCH] Skip invalid enchants in CraftMetaItem
@ -8,10 +8,10 @@ CraftMetaItem would add a null enchantment into the enchantment map which causes
NullPointers later
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
index 60c4bad..9b1ab44 100644
index 6c4c524..74cb365 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -461,7 +461,11 @@ class CraftMetaItem implements ItemMeta, Repairable {
@@ -460,7 +460,11 @@ class CraftMetaItem implements ItemMeta, Repairable {
int id = 0xffff & ((NBTTagCompound) ench.get(i)).getShort(ENCHANTMENTS_ID.NBT);
int level = 0xffff & ((NBTTagCompound) ench.get(i)).getShort(ENCHANTMENTS_LVL.NBT);

Datei anzeigen

@ -1,4 +1,4 @@
From 65254fddd00867e0612e8fda6ba37d7bbb7bd6da Mon Sep 17 00:00:00 2001
From 91215e91d81b53509def42bc44d4a027eb3ac704 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 20 Aug 2014 18:12:32 -0400
Subject: [PATCH] Limit TNT Detonations per tick
@ -19,10 +19,10 @@ index 10f6e47..2d22327 100644
this.lastY = this.locY;
this.lastZ = this.locZ;
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 054f679..a599869 100644
index a502e06..261c86c 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -594,6 +594,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@@ -595,6 +595,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
}
super.tickEntities();

Datei anzeigen

@ -1,14 +1,14 @@
From 512e4b36486898479e6803216a58eb934b188b2b Mon Sep 17 00:00:00 2001
From 8886c689b97e063543858d545c60af9368702699 Mon Sep 17 00:00:00 2001
From: libraryaddict <redwarfare@live.com>
Date: Fri, 22 Aug 2014 05:35:16 -0400
Subject: [PATCH] Added isUnbreakable and setUnbreakable to ItemMeta
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
index 9b1ab44..bef5ff2 100644
index 74cb365..5580404 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -213,6 +213,8 @@ class CraftMetaItem implements ItemMeta, Repairable {
@@ -217,6 +217,8 @@ class CraftMetaItem implements ItemMeta, Repairable {
static final ItemMetaKey ATTRIBUTES_UUID_LOW = new ItemMetaKey("UUIDLeast");
@Specific(Specific.To.NBT)
static final ItemMetaKey HIDEFLAGS = new ItemMetaKey("HideFlags", "ItemFlags");
@ -17,15 +17,15 @@ index 9b1ab44..bef5ff2 100644
private String displayName;
private List<String> lore;
@@ -245,6 +247,7 @@ class CraftMetaItem implements ItemMeta, Repairable {
this.attributes = meta.attributes;
@@ -246,6 +248,7 @@ class CraftMetaItem implements ItemMeta, Repairable {
this.repairCost = meta.repairCost;
this.hideFlag = meta.hideFlag;
this.unhandledTags.putAll(meta.unhandledTags);
+ spigot.setUnbreakable( meta.spigot.isUnbreakable() ); // Spigot
}
CraftMetaItem(NBTTagCompound tag) {
@@ -447,6 +450,12 @@ class CraftMetaItem implements ItemMeta, Repairable {
@@ -446,6 +449,12 @@ class CraftMetaItem implements ItemMeta, Repairable {
unhandledTags.put(key, tag.get(key));
}
}
@ -38,11 +38,10 @@ index 9b1ab44..bef5ff2 100644
}
static Map<Enchantment, Integer> buildEnchantments(NBTTagCompound tag, ItemMetaKey key) {
@@ -500,6 +509,14 @@ class CraftMetaItem implements ItemMeta, Repairable {
}
@@ -498,6 +507,14 @@ class CraftMetaItem implements ItemMeta, Repairable {
}
}
+
+ // Spigot start
+ Boolean unbreakable = SerializableMeta.getObject( Boolean.class, map, UNBREAKABLE.BUKKIT, true );
+ if ( unbreakable != null )
@ -50,10 +49,11 @@ index 9b1ab44..bef5ff2 100644
+ spigot.setUnbreakable( unbreakable );
+ }
+ // Spigot end
}
static Map<Enchantment, Integer> buildEnchantments(Map<String, Object> map, ItemMetaKey key) {
@@ -535,6 +552,14 @@ class CraftMetaItem implements ItemMeta, Repairable {
+
String internal = SerializableMeta.getString(map, "internal", true);
if (internal != null) {
ByteArrayInputStream buf = new ByteArrayInputStream(Base64.decodeBase64(internal));
@@ -553,6 +570,14 @@ class CraftMetaItem implements ItemMeta, Repairable {
}
applyEnchantments(enchantments, itemTag, ENCHANTMENTS);
@ -68,17 +68,17 @@ index 9b1ab44..bef5ff2 100644
if (hasRepairCost()) {
itemTag.setInt(REPAIR.NBT, repairCost);
@@ -598,7 +623,7 @@ class CraftMetaItem implements ItemMeta, Repairable {
@@ -612,7 +637,7 @@ class CraftMetaItem implements ItemMeta, Repairable {
@Overridden
boolean isEmpty() {
- return !(hasDisplayName() || hasEnchants() || hasLore() || hasAttributes() || hasRepairCost() || !unhandledTags.isEmpty() || hideFlag != 0);
+ return !(hasDisplayName() || hasEnchants() || hasLore() || hasAttributes() || hasRepairCost() || !unhandledTags.isEmpty() || hideFlag != 0 || spigot.isUnbreakable()); // Spigot
- return !(hasDisplayName() || hasEnchants() || hasLore() || hasRepairCost() || !unhandledTags.isEmpty() || hideFlag != 0);
+ return !(hasDisplayName() || hasEnchants() || hasLore() || hasRepairCost() || !unhandledTags.isEmpty() || hideFlag != 0 || spigot.isUnbreakable()); // Spigot
}
public String getDisplayName() {
@@ -761,7 +786,8 @@ class CraftMetaItem implements ItemMeta, Repairable {
&& (this.hasAttributes() ? that.hasAttributes() && this.attributes.equals(that.attributes) : !that.hasAttributes())
@@ -770,7 +795,8 @@ class CraftMetaItem implements ItemMeta, Repairable {
&& (this.hasLore() ? that.hasLore() && this.lore.equals(that.lore) : !that.hasLore())
&& (this.hasRepairCost() ? that.hasRepairCost() && this.repairCost == that.repairCost : !that.hasRepairCost())
&& (this.unhandledTags.equals(that.unhandledTags))
- && (this.hideFlag == that.hideFlag);
@ -87,7 +87,7 @@ index 9b1ab44..bef5ff2 100644
}
/**
@@ -789,6 +815,7 @@ class CraftMetaItem implements ItemMeta, Repairable {
@@ -797,6 +823,7 @@ class CraftMetaItem implements ItemMeta, Repairable {
hash = 61 * hash + (hasRepairCost() ? this.repairCost : 0);
hash = 61 * hash + unhandledTags.hashCode();
hash = 61 * hash + hideFlag;
@ -95,7 +95,7 @@ index 9b1ab44..bef5ff2 100644
return hash;
}
@@ -832,6 +859,14 @@ class CraftMetaItem implements ItemMeta, Repairable {
@@ -840,6 +867,14 @@ class CraftMetaItem implements ItemMeta, Repairable {
if (hasRepairCost()) {
builder.put(REPAIR.BUKKIT, repairCost);
}
@ -110,15 +110,15 @@ index 9b1ab44..bef5ff2 100644
Set<String> hideFlags = new HashSet<String>();
for (ItemFlag hideFlagEnum : getItemFlags()) {
@@ -904,6 +939,7 @@ class CraftMetaItem implements ItemMeta, Repairable {
@@ -932,6 +967,7 @@ class CraftMetaItem implements ItemMeta, Repairable {
synchronized (HANDLED_TAGS) {
if (HANDLED_TAGS.isEmpty()) {
HANDLED_TAGS.addAll(Arrays.asList(
+ UNBREAKABLE.NBT, // Spigot
DISPLAY.NBT,
REPAIR.NBT,
ATTRIBUTES.NBT,
@@ -929,6 +965,19 @@ class CraftMetaItem implements ItemMeta, Repairable {
ENCHANTMENTS.NBT,
@@ -957,6 +993,19 @@ class CraftMetaItem implements ItemMeta, Repairable {
// Spigot start
private final Spigot spigot = new Spigot()
{

Datei anzeigen

@ -1,4 +1,4 @@
From 581fc53f2e6ba6f73e0a6452240ae5d39a6b7c8c Mon Sep 17 00:00:00 2001
From 58ef79a6596bccbbde8cd968377d54c260dd2eff Mon Sep 17 00:00:00 2001
From: md_5 <git@md-5.net>
Date: Sun, 22 Feb 2015 12:27:40 +1100
Subject: [PATCH] Use FastMatches for ItemStack Dirty Check
@ -35,10 +35,10 @@ index 9c53acd..3e29730 100644
}
diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java
index bbe816c..9a7c7cb 100644
index 86b20c7..1984e7c 100644
--- a/src/main/java/net/minecraft/server/ItemStack.java
+++ b/src/main/java/net/minecraft/server/ItemStack.java
@@ -446,6 +446,18 @@ public final class ItemStack {
@@ -454,6 +454,18 @@ public final class ItemStack {
return itemstack == null && itemstack1 == null ? true : (itemstack != null && itemstack1 != null ? (itemstack.tag == null && itemstack1.tag != null ? false : itemstack.tag == null || itemstack.tag.equals(itemstack1.tag)) : false);
}