Rebuild our patches for upstream changes

Dieser Commit ist enthalten in:
Zach Brown 2015-01-04 20:30:07 -06:00
Ursprung b360cf686f
Commit 6ae735e2e3
3 geänderte Dateien mit 5 neuen und 132 gelöschten Zeilen

Datei anzeigen

@ -400,91 +400,6 @@ index 0000000..7b6f8ae
+
+ }
+}
diff --git a/src/main/java/net/minecraft/server/Slot.java b/src/main/java/net/minecraft/server/Slot.java
new file mode 100644
index 0000000..375989f
--- /dev/null
+++ b/src/main/java/net/minecraft/server/Slot.java
@@ -0,0 +1,79 @@
+package net.minecraft.server;
+
+public class Slot {
+
+ public final int index;
+ public final IInventory inventory;
+ public int rawSlotIndex;
+ public int f;
+ public int g;
+
+ public Slot(IInventory iinventory, int i, int j, int k) {
+ this.inventory = iinventory;
+ this.index = i;
+ this.f = j;
+ this.g = k;
+ }
+
+ public void a(ItemStack itemstack, ItemStack itemstack1) {
+ if (itemstack != null && itemstack1 != null) {
+ if (itemstack.getItem() == itemstack1.getItem()) {
+ int i = itemstack1.count - itemstack.count;
+
+ if (i > 0) {
+ this.a(itemstack, i);
+ }
+
+ }
+ }
+ }
+
+ protected void a(ItemStack itemstack, int i) {}
+
+ protected void c(ItemStack itemstack) {}
+
+ public void a(EntityHuman entityhuman, ItemStack itemstack) {
+ this.f();
+ }
+
+ public boolean isAllowed(ItemStack itemstack) {
+ return true;
+ }
+
+ public ItemStack getItem() {
+ return this.inventory.getItem(this.index);
+ }
+
+ public boolean hasItem() {
+ return this.getItem() != null;
+ }
+
+ public void set(ItemStack itemstack) {
+ this.inventory.setItem(this.index, itemstack);
+ this.f();
+ }
+
+ public void f() {
+ this.inventory.update();
+ }
+
+ public int getMaxStackSize() {
+ return this.inventory.getMaxStackSize();
+ }
+
+ public int getMaxStackSize(ItemStack itemstack) {
+ return this.getMaxStackSize();
+ }
+
+ public ItemStack a(int i) {
+ return this.inventory.splitStack(this.index, i);
+ }
+
+ public boolean a(IInventory iinventory, int i) {
+ return iinventory == this.inventory && i == this.index;
+ }
+
+ public boolean isAllowed(EntityHuman entityhuman) {
+ return true;
+ }
+}
--
--
1.9.1

Datei anzeigen

@ -1,4 +1,4 @@
From dbcc9a05f4b14d5d5e6d77c7d3bba53d134d575c Mon Sep 17 00:00:00 2001
From f4d23e0f111c8fddf84fe42a5d350f23f804f812 Mon Sep 17 00:00:00 2001
From: Zach Brown <Zbob750@live.com>
Date: Tue, 19 Aug 2014 14:25:40 -0500
Subject: [PATCH] RIP metrics
@ -6,7 +6,7 @@ Subject: [PATCH] RIP metrics
diff --git a/src/main/java/org/spigotmc/Metrics.java b/src/main/java/org/spigotmc/Metrics.java
deleted file mode 100644
index d9c3b63..0000000
index a5fd59d..0000000
--- a/src/main/java/org/spigotmc/Metrics.java
+++ /dev/null
@@ -1,645 +0,0 @@
@ -655,9 +655,8 @@ index d9c3b63..0000000
- }
- }
-}
\ No newline at end of file
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
index 3459d87..9fbf21f 100644
index a8140a5..d469a84 100644
--- a/src/main/java/org/spigotmc/SpigotConfig.java
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
@@ -48,7 +48,6 @@ public class SpigotConfig
@ -688,5 +687,5 @@ index 3459d87..9fbf21f 100644
static void readConfig(Class<?> clazz, Object instance)
--
1.9.1
1.9.5.msysgit.0

Datei anzeigen

@ -1,41 +0,0 @@
From fe9819d75b488b738cac8ba273668e4746acbb64 Mon Sep 17 00:00:00 2001
From: Howaner <franzi.moos@googlemail.com>
Date: Sat, 3 Jan 2015 18:25:24 -0600
Subject: [PATCH] Fix kick messages
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 8d97824..ef4d867 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -170,8 +170,8 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
// CraftBukkit end
ChatComponentText chatcomponenttext = new ChatComponentText(s);
- this.a(chatcomponenttext); // CraftBukkit - fire quit instantly
this.networkManager.a(new PacketPlayOutKickDisconnect(chatcomponenttext), new PlayerConnectionFuture(this, chatcomponenttext), new GenericFutureListener[0]);
+ this.a(chatcomponenttext); // CraftBukkit - fire quit instantly // PaperSpigot - Moved down
this.networkManager.k();
this.minecraftServer.postToMainThread(new PlayerConnectionDisconnector(this)); // CraftBukkit - Don't wait
}
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index cc2cc30..19657f0 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -1147,9 +1147,11 @@ public abstract class PlayerList {
}
public void v() {
- for (int i = 0; i < this.players.size(); ++i) {
- ((EntityPlayer) this.players.get(i)).playerConnection.disconnect(this.server.server.getShutdownMessage()); // CraftBukkit - add custom shutdown message
+ // PaperSpigot start - for -> while
+ while (!this.players.isEmpty()) {
+ ((EntityPlayer) this.players.get(0)).playerConnection.disconnect(this.server.server.getShutdownMessage()); // CraftBukkit - add custom shutdown message
}
+ // PaperSpigot end
}
// CraftBukkit start
--
1.9.5.msysgit.0