mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-23 02:55:47 +01:00
Update Spigot to Minecraft 1.6.2
This commit is contained in:
parent
3ec60528a2
commit
9018b1d7ba
2
Bukkit
2
Bukkit
@ -1 +1 @@
|
||||
Subproject commit dd745127a298fc2adb1b8e96d4c6805d6fe51967
|
||||
Subproject commit a70ffc5519c0f2d4a33eeb74486e3af1ab2f80c3
|
@ -1,11 +1,11 @@
|
||||
From e73321d034e8457dde548fbf9fcdb45dd8414bda Mon Sep 17 00:00:00 2001
|
||||
From 8452737fcbc24d005dce588dd62e42f64fbee981 Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Sun, 2 Jun 2013 10:36:24 +1000
|
||||
Subject: [PATCH] POM Changes
|
||||
|
||||
|
||||
diff --git a/pom.xml b/pom.xml
|
||||
index 1794291..bc164c0 100644
|
||||
index 2401f81..95d042b 100644
|
||||
--- a/pom.xml
|
||||
+++ b/pom.xml
|
||||
@@ -1,43 +1,23 @@
|
||||
@ -23,7 +23,7 @@ index 1794291..bc164c0 100644
|
||||
+
|
||||
+ <groupId>org.spigotmc</groupId>
|
||||
+ <artifactId>spigot-api</artifactId>
|
||||
<version>1.6.1-R0.1-SNAPSHOT</version>
|
||||
<version>1.6.2-R0.1-SNAPSHOT</version>
|
||||
- <name>Bukkit</name>
|
||||
- <url>http://www.bukkit.org</url>
|
||||
+ <name>Spigot-API</name>
|
||||
|
@ -1,46 +0,0 @@
|
||||
From d2c9c65d41116c92c03c09aa6f90ab080358ffc2 Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Mon, 8 Jul 2013 12:37:21 +1000
|
||||
Subject: [PATCH] Add 1.6 Potion Effects
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/potion/PotionEffectType.java b/src/main/java/org/bukkit/potion/PotionEffectType.java
|
||||
index 536e59b..855bda1 100644
|
||||
--- a/src/main/java/org/bukkit/potion/PotionEffectType.java
|
||||
+++ b/src/main/java/org/bukkit/potion/PotionEffectType.java
|
||||
@@ -108,6 +108,32 @@ public abstract class PotionEffectType {
|
||||
* Deals damage to an entity over time and gives the health to the shooter.
|
||||
*/
|
||||
public static final PotionEffectType WITHER = new PotionEffectTypeWrapper(20);
|
||||
+ // Spigot Start
|
||||
+ /**
|
||||
+ * Adds 4 HP points.
|
||||
+ *
|
||||
+ * @deprecated this is a Spigot API which may be subject to removal or
|
||||
+ * change pending Bukkit addition.
|
||||
+ */
|
||||
+ @Deprecated
|
||||
+ public static final PotionEffectType HEALTH_BOOST = new PotionEffectTypeWrapper( 21 );
|
||||
+ /**
|
||||
+ * Adds 4 absorption HP which absorb damage inflicted.
|
||||
+ *
|
||||
+ * @deprecated this is a Spigot API which may be subject to removal or
|
||||
+ * change pending Bukkit addition.
|
||||
+ */
|
||||
+ @Deprecated
|
||||
+ public static final PotionEffectType ABSORPTION = new PotionEffectTypeWrapper( 22 );
|
||||
+ /**
|
||||
+ * Causes the food meter to be replenished by 1 point each tick.
|
||||
+ *
|
||||
+ * @deprecated this is a Spigot API which may be subject to removal or
|
||||
+ * change pending Bukkit addition.
|
||||
+ */
|
||||
+ @Deprecated
|
||||
+ public static final PotionEffectType SATURATION = new PotionEffectTypeWrapper( 23 );
|
||||
+ // Spigot End
|
||||
|
||||
private final int id;
|
||||
|
||||
--
|
||||
1.8.1.2
|
||||
|
@ -0,0 +1,54 @@
|
||||
From fb9382fe420c5f7d200cedb929bbeba37eef4531 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Sun, 7 Jul 2013 10:32:05 -0400
|
||||
Subject: [PATCH] InventoryClickEvent getClickedInventory
|
||||
|
||||
Add InventoryClickEvent.getClickedInventory. Adds BUKKIT-4495
|
||||
Plugins currently have to do the logic themselves on the raw slot ID
|
||||
in order to determine the inventory clicked. This provides the logic for plugins to
|
||||
readily identify which inventory was clicked.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/event/inventory/InventoryClickEvent.java b/src/main/java/org/bukkit/event/inventory/InventoryClickEvent.java
|
||||
index 28198b8..3313d91 100644
|
||||
--- a/src/main/java/org/bukkit/event/inventory/InventoryClickEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/inventory/InventoryClickEvent.java
|
||||
@@ -47,6 +47,7 @@ public class InventoryClickEvent extends InventoryInteractEvent {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private final ClickType click;
|
||||
private final InventoryAction action;
|
||||
+ private final Inventory clickedInventory;
|
||||
private SlotType slot_type;
|
||||
private int whichSlot;
|
||||
private int rawSlot;
|
||||
@@ -62,6 +63,13 @@ public class InventoryClickEvent extends InventoryInteractEvent {
|
||||
super(view);
|
||||
this.slot_type = type;
|
||||
this.rawSlot = slot;
|
||||
+ if (slot < 0) {
|
||||
+ this.clickedInventory = null;
|
||||
+ } else if (view.getTopInventory() != null && slot < view.getTopInventory().getSize()) {
|
||||
+ this.clickedInventory = view.getTopInventory();
|
||||
+ } else {
|
||||
+ this.clickedInventory = view.getBottomInventory();
|
||||
+ }
|
||||
this.whichSlot = view.convertSlot(slot);
|
||||
this.click = click;
|
||||
this.action = action;
|
||||
@@ -73,6 +81,14 @@ public class InventoryClickEvent extends InventoryInteractEvent {
|
||||
}
|
||||
|
||||
/**
|
||||
+ * Gets the inventory that was clicked, or null if outside of window
|
||||
+ * @return The clicked inventory
|
||||
+ */
|
||||
+ public Inventory getClickedInventory() {
|
||||
+ return clickedInventory;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
* Gets the type of slot that was clicked.
|
||||
*
|
||||
* @return the slot type
|
||||
--
|
||||
1.8.1.2
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 1c077814e15daca28d31e8adb4056b9cc89ce731
|
||||
Subproject commit a8c0dc105cbd347c5b8138efb78805afb3b7c115
|
@ -1,11 +1,11 @@
|
||||
From d049c9dd36773629cf8d52ddd74c5f844f637460 Mon Sep 17 00:00:00 2001
|
||||
From 82ed6fd2bc75dbead3183ee5c2ec0b3345d72df2 Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Tue, 2 Jul 2013 13:07:39 +1000
|
||||
Subject: [PATCH] POM Changes
|
||||
|
||||
|
||||
diff --git a/pom.xml b/pom.xml
|
||||
index 8b22a1c..d1cc48d 100644
|
||||
index 8139fbf..afe0225 100644
|
||||
--- a/pom.xml
|
||||
+++ b/pom.xml
|
||||
@@ -1,12 +1,20 @@
|
||||
@ -25,7 +25,7 @@ index 8b22a1c..d1cc48d 100644
|
||||
+ <groupId>org.spigotmc</groupId>
|
||||
+ <artifactId>spigot</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>1.6.1-R0.1-SNAPSHOT</version>
|
||||
<version>1.6.2-R0.1-SNAPSHOT</version>
|
||||
- <name>CraftBukkit</name>
|
||||
- <url>http://www.bukkit.org</url>
|
||||
+ <name>Spigot</name>
|
||||
@ -34,7 +34,7 @@ index 8b22a1c..d1cc48d 100644
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
@@ -16,25 +24,6 @@
|
||||
<minecraft_version>1_6_R1</minecraft_version>
|
||||
<minecraft_version>1_6_R2</minecraft_version>
|
||||
</properties>
|
||||
|
||||
- <scm>
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 52574dc6475c15ac44314e9913500b2f8eaa2d02 Mon Sep 17 00:00:00 2001
|
||||
From 056cb7e59eb35bc88af1e5f39d0035106087d6f6 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Thu, 10 Jan 2013 00:18:11 -0500
|
||||
Subject: [PATCH] Improved Timings System
|
||||
@ -26,7 +26,7 @@ index b73f69c..17934c0 100644
|
||||
|
||||
// CraftBukkit start - If we didn't need to load the chunk run the callback now
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 06f85fd..fd62164 100644
|
||||
index 671384d..e095ae0 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -14,6 +14,7 @@ import org.bukkit.block.BlockFace;
|
||||
@ -46,7 +46,7 @@ index 06f85fd..fd62164 100644
|
||||
public Entity(World world) {
|
||||
this.id = entityCount++;
|
||||
this.l = 1.0D;
|
||||
@@ -400,6 +403,7 @@ public abstract class Entity {
|
||||
@@ -405,6 +408,7 @@ public abstract class Entity {
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
@ -54,7 +54,7 @@ index 06f85fd..fd62164 100644
|
||||
if (this.Z) {
|
||||
this.boundingBox.d(d0, d1, d2);
|
||||
this.locX = (this.boundingBox.a + this.boundingBox.d) / 2.0D;
|
||||
@@ -708,6 +712,7 @@ public abstract class Entity {
|
||||
@@ -713,6 +717,7 @@ public abstract class Entity {
|
||||
|
||||
this.world.methodProfiler.b();
|
||||
}
|
||||
@ -63,7 +63,7 @@ index 06f85fd..fd62164 100644
|
||||
|
||||
protected void C() {
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index d8e9e8d..994b260 100644
|
||||
index 5652710..7b8ea64 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -7,7 +7,6 @@ import java.security.KeyPair;
|
||||
@ -144,10 +144,10 @@ index d8e9e8d..994b260 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 f82d932..e5937fc 100644
|
||||
index ff685d5..54e96c2 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -968,6 +968,7 @@ public class PlayerConnection extends Connection {
|
||||
@@ -949,6 +949,7 @@ public class PlayerConnection extends Connection {
|
||||
// CraftBukkit end
|
||||
|
||||
private void handleCommand(String s) {
|
||||
@ -155,7 +155,7 @@ index f82d932..e5937fc 100644
|
||||
// CraftBukkit start
|
||||
CraftPlayer player = this.getPlayer();
|
||||
|
||||
@@ -975,19 +976,23 @@ public class PlayerConnection extends Connection {
|
||||
@@ -956,19 +957,23 @@ public class PlayerConnection extends Connection {
|
||||
this.server.getPluginManager().callEvent(event);
|
||||
|
||||
if (event.isCancelled()) {
|
||||
@ -197,7 +197,7 @@ index f4be980..6ae7cb3 100644
|
||||
private static Map b = new HashMap();
|
||||
protected World world;
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 8c4bbf9..75402e7 100644
|
||||
index d5552b6..9da3f13 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -13,6 +13,7 @@ import java.util.concurrent.Callable;
|
||||
@ -299,7 +299,7 @@ index 8c4bbf9..75402e7 100644
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index c4248d0..b7e0551 100644
|
||||
index 1a34feb..db0345d 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -179,9 +179,12 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
|
||||
|
@ -1,11 +1,11 @@
|
||||
From dd6315c676cba1aeb9765878d21b07ce45bf2645 Mon Sep 17 00:00:00 2001
|
||||
From 272cbeba4ae7fb24c5f5a56689d88381715bd32b Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Fri, 21 Jun 2013 17:29:54 +1000
|
||||
Subject: [PATCH] Fix Mob Spawning Relative to View Distance
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||
index 61e56ab..04cb6fb 100644
|
||||
index 5b13dea..51db2db 100644
|
||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||
@@ -33,6 +33,7 @@ public class Chunk {
|
||||
@ -49,7 +49,7 @@ index 61e56ab..04cb6fb 100644
|
||||
|
||||
public boolean d(int i, int j, int k) {
|
||||
diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java
|
||||
index aa7698b..02ca87f 100644
|
||||
index 9812538..ecf13aa 100644
|
||||
--- a/src/main/java/net/minecraft/server/SpawnerCreature.java
|
||||
+++ b/src/main/java/net/minecraft/server/SpawnerCreature.java
|
||||
@@ -27,6 +27,23 @@ public final class SpawnerCreature {
|
||||
@ -117,7 +117,7 @@ index aa7698b..02ca87f 100644
|
||||
+ continue label110;
|
||||
+ }
|
||||
+ // Spigot end
|
||||
if (j2 >= entityinsentient.br()) {
|
||||
if (j2 >= entityinsentient.bv()) {
|
||||
continue label110;
|
||||
}
|
||||
diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 0d4073efa46306a7f80b9707cf0592201ecb6d95 Mon Sep 17 00:00:00 2001
|
||||
From 0b1f4f7d9d57f2c04277b404fe0bc53f22fb39d2 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Sun, 3 Feb 2013 05:10:21 -0500
|
||||
Subject: [PATCH] Entity Activation Range
|
||||
@ -9,7 +9,7 @@ This will drastically cut down on tick timings for entities that are not in rang
|
||||
This change can have dramatic impact on gameplay if configured too low. Balance according to your servers desired gameplay.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index fd62164..46eb430 100644
|
||||
index e095ae0..4a769ed 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -88,7 +88,7 @@ public abstract class Entity {
|
||||
@ -87,7 +87,7 @@ index 5ba19f3..4c73a5f 100644
|
||||
super(world);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityArrow.java b/src/main/java/net/minecraft/server/EntityArrow.java
|
||||
index affeca6..f44f5e2 100644
|
||||
index 65e7a88..7015f21 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityArrow.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityArrow.java
|
||||
@@ -14,7 +14,7 @@ public class EntityArrow extends Entity implements IProjectile {
|
||||
@ -100,10 +100,10 @@ index affeca6..f44f5e2 100644
|
||||
public int shake;
|
||||
public Entity shooter;
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
index 0adbfcd..a01106c 100644
|
||||
index 45b1410..a65567d 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
@@ -77,6 +77,13 @@ public abstract class EntityLiving extends Entity {
|
||||
@@ -78,6 +78,13 @@ public abstract class EntityLiving extends Entity {
|
||||
public int expToDrop;
|
||||
public int maxAirTicks = 300;
|
||||
// CraftBukkit end
|
||||
@ -118,7 +118,7 @@ index 0adbfcd..a01106c 100644
|
||||
public EntityLiving(World world) {
|
||||
super(world);
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index fd76af0..039ba6e 100644
|
||||
index 6206167..211127b 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -1276,6 +1276,7 @@ public abstract class World implements IBlockAccess {
|
||||
@ -161,7 +161,7 @@ index f6e507e..4328ecf 100644
|
||||
public static final HashMap<String, CustomTimingsHandler> pluginTaskTimingMap = new HashMap<String, CustomTimingsHandler>();
|
||||
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
|
||||
new file mode 100644
|
||||
index 0000000..71d8e59
|
||||
index 0000000..9285a0d
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/org/spigotmc/ActivationRange.java
|
||||
@@ -0,0 +1,296 @@
|
||||
@ -401,14 +401,14 @@ index 0000000..71d8e59
|
||||
+ {
|
||||
+ return true;
|
||||
+ }
|
||||
+ if ( entity instanceof EntityVillager && ( (EntityVillager) entity ).bQ() /* Getter for first boolean */ )
|
||||
+ if ( entity instanceof EntityVillager && ( (EntityVillager) entity ).bU() /* Getter for first boolean */ )
|
||||
+ {
|
||||
+ return true;
|
||||
+ }
|
||||
+ if ( entity instanceof EntityAnimal )
|
||||
+ {
|
||||
+ EntityAnimal animal = (EntityAnimal) entity;
|
||||
+ if ( animal.isBaby() || animal.bU() /*love*/ )
|
||||
+ if ( animal.isBaby() || animal.bY() /*love*/ )
|
||||
+ {
|
||||
+ return true;
|
||||
+ }
|
||||
|
@ -1,11 +1,11 @@
|
||||
From ee34b94e8d33a76135afca40f9331fc1868e2300 Mon Sep 17 00:00:00 2001
|
||||
From 18669c7ef82c128985c43f16d2fd0545a787871b Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Tue, 2 Jul 2013 09:06:29 +1000
|
||||
Subject: [PATCH] Netty
|
||||
|
||||
|
||||
diff --git a/pom.xml b/pom.xml
|
||||
index d1cc48d..69e596b 100644
|
||||
index afe0225..4cffec7 100644
|
||||
--- a/pom.xml
|
||||
+++ b/pom.xml
|
||||
@@ -112,6 +112,21 @@
|
||||
@ -31,7 +31,7 @@ index d1cc48d..69e596b 100644
|
||||
|
||||
<!-- This builds a completely 'ready to start' jar with all dependencies inside -->
|
||||
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||
index ddb32ac..ec3d104 100644
|
||||
index 6fe33d0..fa02974 100644
|
||||
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||
@@ -100,7 +100,11 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
|
||||
@ -80,10 +80,10 @@ index 0000000..6fcc5d7
|
||||
+ void setSocketAddress(java.net.SocketAddress address); // Spigot
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java
|
||||
index c60abf1..e1b259b 100644
|
||||
index a2bdfa3..fd6acab 100644
|
||||
--- a/src/main/java/net/minecraft/server/NetworkManager.java
|
||||
+++ b/src/main/java/net/minecraft/server/NetworkManager.java
|
||||
@@ -25,7 +25,7 @@ public class NetworkManager implements INetworkManager {
|
||||
@@ -27,7 +27,7 @@ public class NetworkManager implements INetworkManager {
|
||||
private final Object h = new Object();
|
||||
private final IConsoleLogManager i;
|
||||
public Socket socket; // CraftBukkit - private -> public
|
||||
@ -92,7 +92,7 @@ index c60abf1..e1b259b 100644
|
||||
private volatile DataInputStream input;
|
||||
private volatile DataOutputStream output;
|
||||
private volatile boolean n = true;
|
||||
@@ -370,4 +370,6 @@ public class NetworkManager implements INetworkManager {
|
||||
@@ -374,4 +374,6 @@ public class NetworkManager implements INetworkManager {
|
||||
static Thread h(NetworkManager networkmanager) {
|
||||
return networkmanager.u;
|
||||
}
|
||||
@ -100,7 +100,7 @@ index c60abf1..e1b259b 100644
|
||||
+ public void setSocketAddress(SocketAddress address) { k = address; } // Spigot
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/PendingConnection.java b/src/main/java/net/minecraft/server/PendingConnection.java
|
||||
index 043321d..8b66470 100644
|
||||
index c9e187e..b433c60 100644
|
||||
--- a/src/main/java/net/minecraft/server/PendingConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PendingConnection.java
|
||||
@@ -16,7 +16,7 @@ public class PendingConnection extends Connection {
|
||||
|
@ -1,11 +1,11 @@
|
||||
From c008928d367fc3c4717cf6f66eb2c0a86396fb03 Mon Sep 17 00:00:00 2001
|
||||
From 49745f38fc434eae538b673b41be1fdc6683f990 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 f42f162..3a3fc27 100644
|
||||
index 41ba8fe..e2011ea 100644
|
||||
--- a/src/main/java/net/minecraft/server/ItemStack.java
|
||||
+++ b/src/main/java/net/minecraft/server/ItemStack.java
|
||||
@@ -178,7 +178,13 @@ public final class ItemStack {
|
||||
@ -44,8 +44,8 @@ index f42f162..3a3fc27 100644
|
||||
public void damage(int i, EntityLiving entityliving) {
|
||||
if (!(entityliving instanceof EntityHuman) || !((EntityHuman) entityliving).abilities.canInstantlyBuild) {
|
||||
if (this.g()) {
|
||||
- if (this.isDamaged(i, entityliving.aB())) {
|
||||
+ if (this.isDamaged(i, entityliving.aB(), entityliving)) {
|
||||
- if (this.isDamaged(i, entityliving.aC())) {
|
||||
+ if (this.isDamaged(i, entityliving.aC(), entityliving)) {
|
||||
entityliving.a(this);
|
||||
--this.count;
|
||||
if (entityliving instanceof EntityHuman) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
From f71f95a3cdcc53fec5d01450691202e21360ae08 Mon Sep 17 00:00:00 2001
|
||||
From 8661bb93ba528c7a76cdc5f96c0d43f1d53dd0cc Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Sat, 23 Mar 2013 11:15:11 +1100
|
||||
Subject: [PATCH] BungeeCord Support
|
||||
@ -6,10 +6,10 @@ Subject: [PATCH] BungeeCord Support
|
||||
- Allows BungeeCord to set the players real IP address very early in the login process, so that the BungeeCord proxy IP is never even seen by a plugin.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PendingConnection.java b/src/main/java/net/minecraft/server/PendingConnection.java
|
||||
index 8b66470..d26b4d2 100644
|
||||
index b433c60..0eacd84 100644
|
||||
--- a/src/main/java/net/minecraft/server/PendingConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PendingConnection.java
|
||||
@@ -230,4 +230,17 @@ public class PendingConnection extends Connection {
|
||||
@@ -234,4 +234,17 @@ public class PendingConnection extends Connection {
|
||||
static boolean a(PendingConnection pendingconnection, boolean flag) {
|
||||
return pendingconnection.h = flag;
|
||||
}
|
||||
@ -28,10 +28,10 @@ index 8b66470..d26b4d2 100644
|
||||
+ // Spigot end
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
index b98a078..018feb2 100644
|
||||
index f24ba95..a031af1 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
@@ -293,7 +293,7 @@ public abstract class PlayerList {
|
||||
@@ -295,7 +295,7 @@ public abstract class PlayerList {
|
||||
// depending on the outcome.
|
||||
EntityPlayer entity = new EntityPlayer(this.server, this.server.getWorldServer(0), s, this.server.O() ? new DemoPlayerInteractManager(this.server.getWorldServer(0)) : new PlayerInteractManager(this.server.getWorldServer(0)));
|
||||
Player player = entity.getBukkitEntity();
|
||||
|
@ -1,11 +1,11 @@
|
||||
From 74ae97b613d7b51502d26a3c99a5d70c4f6e9faa Mon Sep 17 00:00:00 2001
|
||||
From 875bc5fe23f26ed5d5d7cf2db951f2070e33e1db Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Sun, 24 Feb 2013 20:45:20 +1100
|
||||
Subject: [PATCH] Enable Improved Ping Sending
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
index 69a7679..4d1bb53 100644
|
||||
index 8ccf851..55a0612 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
@@ -51,6 +51,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@ -17,10 +17,10 @@ index 69a7679..4d1bb53 100644
|
||||
|
||||
public EntityPlayer(MinecraftServer minecraftserver, World world, String s, PlayerInteractManager playerinteractmanager) {
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
index 018feb2..0e5bf6c 100644
|
||||
index a031af1..f0bc5c4 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
@@ -717,6 +717,25 @@ public abstract class PlayerList {
|
||||
@@ -719,6 +719,25 @@ public abstract class PlayerList {
|
||||
this.sendAll(new Packet201PlayerInfo(entityplayer.getName(), true, entityplayer.ping));
|
||||
}
|
||||
// CraftBukkit end */
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 72e9b135797dfd1380fcb3f2fb87aca60437fe69 Mon Sep 17 00:00:00 2001
|
||||
From 3e56952e4d09068e39785a562bdb8057e93a0155 Mon Sep 17 00:00:00 2001
|
||||
From: Mike Primm <mike@primmhome.com>
|
||||
Date: Wed, 24 Apr 2013 01:43:33 -0500
|
||||
Subject: [PATCH] Improve NextTickList Performance
|
||||
@ -20,7 +20,7 @@ index acf8838..1e3e0f8 100644
|
||||
|
||||
public NextTickListEntry a(long i) {
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index b7e0551..1b69737 100644
|
||||
index db0345d..1f864a2 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -25,8 +25,8 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
|
||||
@ -225,7 +225,7 @@ index b7e0551..1b69737 100644
|
||||
}
|
||||
|
||||
/* CraftBukkit start - We prevent spawning in general, so this butchering is not needed
|
||||
@@ -712,13 +688,15 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
|
||||
@@ -698,13 +674,15 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
|
||||
this.entitiesById = new IntHashMap();
|
||||
}
|
||||
|
||||
@ -245,7 +245,7 @@ index b7e0551..1b69737 100644
|
||||
|
||||
this.b(worldsettings);
|
||||
super.a(worldsettings);
|
||||
@@ -1005,4 +983,62 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
|
||||
@@ -991,4 +969,62 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
|
||||
return this.setTypeIdAndData(x, y, z, typeId, data, 3);
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
@ -1,4 +1,4 @@
|
||||
From f9c17cfa3500f63131897bacdd70ea977b4ec4c2 Mon Sep 17 00:00:00 2001
|
||||
From c5c676b1b10d279b5309913517b6d0aec529d1f7 Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Tue, 11 Jun 2013 11:54:32 +1000
|
||||
Subject: [PATCH] Prevent Shutdown Hang
|
||||
@ -6,10 +6,10 @@ Subject: [PATCH] Prevent Shutdown Hang
|
||||
Prevents server hanging if players disconnect during the shutdown sequence.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
index 0e5bf6c..1276ec4 100644
|
||||
index f0bc5c4..16df7ae 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
@@ -1061,7 +1061,14 @@ public abstract class PlayerList {
|
||||
@@ -1063,7 +1063,14 @@ public abstract class PlayerList {
|
||||
|
||||
public void r() {
|
||||
while (!this.players.isEmpty()) {
|
||||
|
@ -1,14 +1,14 @@
|
||||
From cacfe32fe6f8f4440709700758ea102d97042fed Mon Sep 17 00:00:00 2001
|
||||
From b0d75828c17738dd796e0c14ae1739827666f05a Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Fri, 21 Jun 2013 17:53:03 +1000
|
||||
Subject: [PATCH] Enable Foreign Language Signs
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index 2f6cd41..7c7c07a 100644
|
||||
index 54e96c2..40ea712 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -1586,7 +1586,7 @@ public class PlayerConnection extends Connection {
|
||||
@@ -1567,7 +1567,7 @@ public class PlayerConnection extends Connection {
|
||||
flag = false;
|
||||
} else {
|
||||
for (i = 0; i < packet130updatesign.lines[j].length(); ++i) {
|
||||
|
@ -1,14 +1,14 @@
|
||||
From 0d7fc293b27d13dbb22bd21696309d027f2c9ad2 Mon Sep 17 00:00:00 2001
|
||||
From 6dbc7b15e1b041b93767db6c1f078ffbde126604 Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Fri, 21 Jun 2013 17:59:22 +1000
|
||||
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 1422d67..fc174b2 100644
|
||||
index 40ea712..f1a4dfe 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -858,7 +858,17 @@ public class PlayerConnection extends Connection {
|
||||
@@ -839,7 +839,17 @@ public class PlayerConnection extends Connection {
|
||||
this.chat(s, packet3chat.a_());
|
||||
|
||||
// This section stays because it is only applicable to packets
|
||||
|
@ -1,14 +1,14 @@
|
||||
From c267d44c2cbdde30d95cb7b336b9f1d2d63931d1 Mon Sep 17 00:00:00 2001
|
||||
From 179d632758f88e6810b89505f27d914f1f99967c 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 fc174b2..c2a9878 100644
|
||||
index f1a4dfe..34613dc 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -991,7 +991,12 @@ public class PlayerConnection extends Connection {
|
||||
@@ -972,7 +972,12 @@ public class PlayerConnection extends Connection {
|
||||
}
|
||||
|
||||
try {
|
||||
|
@ -1,14 +1,14 @@
|
||||
From a78cb65a00236b38edcf758fb5d9834c26639fc1 Mon Sep 17 00:00:00 2001
|
||||
From e9cbb8956e0b8c65b6c23a8775a9d2a55aa1fea8 Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Fri, 21 Jun 2013 19:21:58 +1000
|
||||
Subject: [PATCH] Configurable Messages
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
index 1276ec4..cbe823f 100644
|
||||
index 16df7ae..79c3b98 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
@@ -307,7 +307,7 @@ public abstract class PlayerList {
|
||||
@@ -309,7 +309,7 @@ public abstract class PlayerList {
|
||||
|
||||
event.disallow(PlayerLoginEvent.Result.KICK_BANNED, s1);
|
||||
} else if (!this.isWhitelisted(s)) {
|
||||
@ -17,7 +17,7 @@ index 1276ec4..cbe823f 100644
|
||||
} else {
|
||||
String s2 = socketaddress.toString();
|
||||
|
||||
@@ -323,7 +323,7 @@ public abstract class PlayerList {
|
||||
@@ -325,7 +325,7 @@ public abstract class PlayerList {
|
||||
|
||||
event.disallow(PlayerLoginEvent.Result.KICK_BANNED, s3);
|
||||
} else if (this.players.size() >= this.maxPlayers) {
|
||||
|
@ -1,14 +1,14 @@
|
||||
From 726fc5818b238c910ad06a08aa07542cb48cab90 Mon Sep 17 00:00:00 2001
|
||||
From 078a585d0a3719c1559bb58a71b210ef45c53856 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 c2a9878..6bfc289 100644
|
||||
index 34613dc..98b2622 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -1109,6 +1109,13 @@ public class PlayerConnection extends Connection {
|
||||
@@ -1090,6 +1090,13 @@ public class PlayerConnection extends Connection {
|
||||
|
||||
WorldServer worldserver = this.minecraftServer.getWorldServer(this.player.dimension);
|
||||
Entity entity = worldserver.getEntity(packet7useentity.target);
|
||||
|
@ -1,14 +1,14 @@
|
||||
From dc989aecc7c147d1b86e9c92739db6f996c9213a Mon Sep 17 00:00:00 2001
|
||||
From ddff742213ed919561eecebcec331cad67cf8468 Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Tue, 2 Jul 2013 20:32:49 +1000
|
||||
Subject: [PATCH] Entity Mount and Dismount Events
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 8fbf811..3b1d9e4 100644
|
||||
index d4bd4ed..0653ff2 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -1411,6 +1411,7 @@ public abstract class Entity {
|
||||
@@ -1421,6 +1421,7 @@ public abstract class Entity {
|
||||
pluginManager.callEvent(event);
|
||||
}
|
||||
// CraftBukkit end
|
||||
@ -16,7 +16,7 @@ index 8fbf811..3b1d9e4 100644
|
||||
|
||||
this.setPositionRotation(this.vehicle.locX, this.vehicle.boundingBox.b + (double) this.vehicle.length, this.vehicle.locZ, this.yaw, this.pitch);
|
||||
this.vehicle.passenger = null;
|
||||
@@ -1428,6 +1429,17 @@ public abstract class Entity {
|
||||
@@ -1438,6 +1439,17 @@ public abstract class Entity {
|
||||
}
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 43802c41faf4edae4752b4ab06cb36ab19ef2e35 Mon Sep 17 00:00:00 2001
|
||||
From 918e293626aa88f3c390a1397474f5e861a688d1 Mon Sep 17 00:00:00 2001
|
||||
From: Alex Ciuba <alexciuba@gmail.com>
|
||||
Date: Tue, 11 Jun 2013 15:23:03 -0400
|
||||
Subject: [PATCH] Prevent Ghost Players Caused by Plugins
|
||||
@ -6,10 +6,10 @@ Subject: [PATCH] Prevent Ghost Players Caused by Plugins
|
||||
Check if the player is still connected after firing event. Fixes BUKKIT-4327
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
index cbe823f..f33fdc1 100644
|
||||
index 79c3b98..971cfa5 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
@@ -420,6 +420,9 @@ public abstract class PlayerList {
|
||||
@@ -422,6 +422,9 @@ public abstract class PlayerList {
|
||||
Player respawnPlayer = this.cserver.getPlayer(entityplayer1);
|
||||
PlayerRespawnEvent respawnEvent = new PlayerRespawnEvent(respawnPlayer, location, isBedSpawn);
|
||||
this.cserver.getPluginManager().callEvent(respawnEvent);
|
||||
|
@ -1,4 +1,4 @@
|
||||
From e867d1a24268826a4ee4e655243c2cbfd73d4057 Mon Sep 17 00:00:00 2001
|
||||
From 382891b2f5b82a30114ea150233113710a72da94 Mon Sep 17 00:00:00 2001
|
||||
From: Phillip Schichtel <quick_wango@code-infection.de>
|
||||
Date: Fri, 5 Jul 2013 21:55:00 +1000
|
||||
Subject: [PATCH] Console Command Completion
|
||||
@ -13,10 +13,10 @@ This commit implements tab completion in the console by providing the
|
||||
ConsoleReader with a Completer implementation.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
index f33fdc1..2354ed2 100644
|
||||
index 971cfa5..7cf2a94 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
@@ -16,6 +16,7 @@ import java.util.Map.Entry;
|
||||
@@ -17,6 +17,7 @@ import java.util.Map.Entry;
|
||||
import org.bukkit.craftbukkit.CraftServer;
|
||||
import org.bukkit.craftbukkit.CraftWorld;
|
||||
import org.bukkit.craftbukkit.chunkio.ChunkIOExecutor;
|
||||
@ -24,7 +24,7 @@ index f33fdc1..2354ed2 100644
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
@@ -54,6 +55,7 @@ public abstract class PlayerList {
|
||||
@@ -55,6 +56,7 @@ public abstract class PlayerList {
|
||||
public PlayerList(MinecraftServer minecraftserver) {
|
||||
minecraftserver.server = new CraftServer(minecraftserver, this);
|
||||
minecraftserver.console = org.bukkit.craftbukkit.command.ColouredConsoleSender.getInstance();
|
||||
|
@ -1,28 +0,0 @@
|
||||
From 77f73822be50a7878ad4caa37a92fc008aace1c1 Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Mon, 8 Jul 2013 12:37:24 +1000
|
||||
Subject: [PATCH] Add 1.6 Potion Effects
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionEffectType.java b/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionEffectType.java
|
||||
index 900dc7d..2ef2bb2 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionEffectType.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionEffectType.java
|
||||
@@ -64,6 +64,14 @@ public class CraftPotionEffectType extends PotionEffectType {
|
||||
return "POISON";
|
||||
case 20:
|
||||
return "WITHER";
|
||||
+ // Spigot Start
|
||||
+ case 21:
|
||||
+ return "HEALTH_BOOST";
|
||||
+ case 22:
|
||||
+ return "ABSORPTION";
|
||||
+ case 23:
|
||||
+ return "SATURATION";
|
||||
+ // Spigot End
|
||||
default:
|
||||
return "UNKNOWN_EFFECT_TYPE_" + handle.id;
|
||||
}
|
||||
--
|
||||
1.8.1.2
|
||||
|
@ -1,261 +0,0 @@
|
||||
From 58f01e434d47d9543b1ef368c99503645fe6495e Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Mon, 8 Jul 2013 21:27:40 +1000
|
||||
Subject: [PATCH] Snapshot Protocol
|
||||
|
||||
|
||||
diff --git a/pom.xml b/pom.xml
|
||||
index 69e596b..f91396f 100644
|
||||
--- a/pom.xml
|
||||
+++ b/pom.xml
|
||||
@@ -12,7 +12,7 @@
|
||||
<groupId>org.spigotmc</groupId>
|
||||
<artifactId>spigot</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
- <version>1.6.1-R0.1-SNAPSHOT</version>
|
||||
+ <version>1.6.2-R0.1-SNAPSHOT</version>
|
||||
<name>Spigot</name>
|
||||
<url>http://www.spigotmc.org</url>
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
<dependency>
|
||||
<groupId>org.spigotmc</groupId>
|
||||
<artifactId>spigot-api</artifactId>
|
||||
- <version>${project.version}</version>
|
||||
+ <version>1.6.1-R0.1-SNAPSHOT</version>
|
||||
<type>jar</type>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
diff --git a/src/main/java/net/minecraft/server/ItemBlock.java b/src/main/java/net/minecraft/server/ItemBlock.java
|
||||
index b2c3ed8..e46cb2a 100644
|
||||
--- a/src/main/java/net/minecraft/server/ItemBlock.java
|
||||
+++ b/src/main/java/net/minecraft/server/ItemBlock.java
|
||||
@@ -110,6 +110,12 @@ public class ItemBlock extends Item {
|
||||
|
||||
world.makeSound((double) ((float) x + 0.5F), (double) ((float) y + 0.5F), (double) ((float) z + 0.5F), block.stepSound.getPlaceSound(), (block.stepSound.getVolume1() + 1.0F) / 2.0F, block.stepSound.getVolume2() * 0.8F);
|
||||
}
|
||||
+ // Spigot Start
|
||||
+ if ( org.spigotmc.SpigotConfig.snapshotProtocol && block instanceof BlockSign )
|
||||
+ {
|
||||
+ ( (EntityPlayer) entityhuman ).playerConnection.sendPacket( new Packet133SignPlace( x, y, z ) );
|
||||
+ }
|
||||
+ // Spigot End
|
||||
|
||||
if (itemstack != null) {
|
||||
--itemstack.count;
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 415087a..de730fa 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -762,7 +762,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
|
||||
}
|
||||
|
||||
public String getVersion() {
|
||||
- return "1.6.1";
|
||||
+ return org.spigotmc.SpigotConfig.gameVersion; // Spigot
|
||||
}
|
||||
|
||||
public int A() {
|
||||
diff --git a/src/main/java/net/minecraft/server/Packet.java b/src/main/java/net/minecraft/server/Packet.java
|
||||
index 9389a7d..4a75e71 100644
|
||||
--- a/src/main/java/net/minecraft/server/Packet.java
|
||||
+++ b/src/main/java/net/minecraft/server/Packet.java
|
||||
@@ -321,6 +321,7 @@ public abstract class Packet {
|
||||
a(130, true, true, Packet130UpdateSign.class);
|
||||
a(131, true, false, Packet131ItemData.class);
|
||||
a(132, true, false, Packet132TileEntityData.class);
|
||||
+ a(133, true, false, Packet133SignPlace.class); // Spigot
|
||||
a(200, true, false, Packet200Statistic.class);
|
||||
a(201, true, false, Packet201PlayerInfo.class);
|
||||
a(202, true, true, Packet202Abilities.class);
|
||||
diff --git a/src/main/java/net/minecraft/server/Packet133SignPlace.java b/src/main/java/net/minecraft/server/Packet133SignPlace.java
|
||||
new file mode 100644
|
||||
index 0000000..a1b2bbb
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/net/minecraft/server/Packet133SignPlace.java
|
||||
@@ -0,0 +1,49 @@
|
||||
+package net.minecraft.server;
|
||||
+
|
||||
+import java.io.DataInput;
|
||||
+import java.io.DataOutput;
|
||||
+import java.io.IOException;
|
||||
+
|
||||
+public class Packet133SignPlace extends Packet
|
||||
+{
|
||||
+
|
||||
+ private int x, y, z;
|
||||
+
|
||||
+ public Packet133SignPlace()
|
||||
+ {
|
||||
+ }
|
||||
+
|
||||
+ public Packet133SignPlace(int x, int y, int z)
|
||||
+ {
|
||||
+ this.x = x;
|
||||
+ this.y = y;
|
||||
+ this.z = z;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void a(DataInput datainput) throws IOException
|
||||
+ {
|
||||
+ throw new UnsupportedOperationException( "Not supported yet." ); //To change body of generated methods, choose Tools | Templates.
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void a(DataOutput dataoutput) throws IOException
|
||||
+ {
|
||||
+ dataoutput.writeByte( 0 );
|
||||
+ dataoutput.writeInt( x );
|
||||
+ dataoutput.writeInt( y );
|
||||
+ dataoutput.writeInt( z );
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void handle(Connection connection)
|
||||
+ {
|
||||
+ throw new UnsupportedOperationException( "Not supported yet." ); //To change body of generated methods, choose Tools | Templates.
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public int a()
|
||||
+ {
|
||||
+ return 13;
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/Packet44UpdateAttributes.java b/src/main/java/net/minecraft/server/Packet44UpdateAttributes.java
|
||||
new file mode 100644
|
||||
index 0000000..f0a5d99
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/net/minecraft/server/Packet44UpdateAttributes.java
|
||||
@@ -0,0 +1,75 @@
|
||||
+package net.minecraft.server;
|
||||
+
|
||||
+import java.io.DataInput;
|
||||
+import java.io.DataOutput;
|
||||
+import java.util.Collection;
|
||||
+import java.util.Iterator;
|
||||
+
|
||||
+public class Packet44UpdateAttributes extends Packet {
|
||||
+
|
||||
+ private class AttributeSnapshot
|
||||
+ {
|
||||
+
|
||||
+ private final String a;
|
||||
+ private final double b;
|
||||
+ private final Collection c;
|
||||
+
|
||||
+ public AttributeSnapshot(String a, double b, Collection c)
|
||||
+ {
|
||||
+ this.a = a;
|
||||
+ this.b = b;
|
||||
+ this.c = c;
|
||||
+ }
|
||||
+ }
|
||||
+ private int a;
|
||||
+ private final java.util.List<AttributeSnapshot> b = new java.util.ArrayList<AttributeSnapshot>();
|
||||
+
|
||||
+ public Packet44UpdateAttributes() {}
|
||||
+
|
||||
+ public Packet44UpdateAttributes(int i, Collection collection) {
|
||||
+ this.a = i;
|
||||
+ Iterator iterator = collection.iterator();
|
||||
+
|
||||
+ while (iterator.hasNext()) {
|
||||
+ AttributeInstance attributeinstance = (AttributeInstance) iterator.next();
|
||||
+
|
||||
+ this.b.add( new AttributeSnapshot( attributeinstance.a().a(),attributeinstance.b(),attributeinstance.c() ) );
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ public void a(DataInput datainput) throws java.io.IOException { // Spigot - throws
|
||||
+ throw new UnsupportedOperationException();
|
||||
+ }
|
||||
+
|
||||
+ public void a(DataOutput dataoutput) throws java.io.IOException { // Spigot - throws
|
||||
+ dataoutput.writeInt( this.a );
|
||||
+ dataoutput.writeInt( this.b.size() );
|
||||
+ Iterator<AttributeSnapshot> iter = this.b.iterator();
|
||||
+
|
||||
+ while(iter.hasNext())
|
||||
+ {
|
||||
+ AttributeSnapshot attribute = iter.next();
|
||||
+ a( attribute.a, dataoutput );
|
||||
+ dataoutput.writeDouble( attribute.b );
|
||||
+ dataoutput.writeShort( attribute.c.size() );
|
||||
+
|
||||
+ Iterator<AttributeModifier> inner = attribute.c.iterator();
|
||||
+ while(inner.hasNext())
|
||||
+ {
|
||||
+ AttributeModifier modifier = (AttributeModifier) inner.next();
|
||||
+ dataoutput.writeLong( modifier.a().getMostSignificantBits() );
|
||||
+ dataoutput.writeLong( modifier.a().getLeastSignificantBits() );
|
||||
+ dataoutput.writeDouble( modifier.d() );
|
||||
+ dataoutput.writeByte( modifier.c() );
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ public void handle(Connection connection) {
|
||||
+ connection.a(this);
|
||||
+ }
|
||||
+
|
||||
+ public int a() {
|
||||
+ return 8 + this.b.size() * 24;
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/PendingConnection.java b/src/main/java/net/minecraft/server/PendingConnection.java
|
||||
index 9b8ddd2..3664a1c 100644
|
||||
--- a/src/main/java/net/minecraft/server/PendingConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PendingConnection.java
|
||||
@@ -76,8 +76,8 @@ public class PendingConnection extends Connection {
|
||||
} else {
|
||||
PublicKey publickey = this.server.H().getPublic();
|
||||
|
||||
- if (packet2handshake.d() != 73) {
|
||||
- if (packet2handshake.d() > 73) {
|
||||
+ if (packet2handshake.d() != org.spigotmc.SpigotConfig.protocolVersion) { // Spigot
|
||||
+ if (packet2handshake.d() > org.spigotmc.SpigotConfig.protocolVersion) { // Spigot
|
||||
this.disconnect("Outdated server!");
|
||||
} else {
|
||||
this.disconnect("Outdated client!");
|
||||
@@ -156,7 +156,7 @@ public class PendingConnection extends Connection {
|
||||
s = pingEvent.getMotd() + "\u00A7" + playerlist.getPlayerCount() + "\u00A7" + pingEvent.getMaxPlayers();
|
||||
} else {
|
||||
// CraftBukkit start - Don't create a list from an array
|
||||
- Object[] list = new Object[] { 1, 73, this.server.getVersion(), pingEvent.getMotd(), playerlist.getPlayerCount(), pingEvent.getMaxPlayers() };
|
||||
+ Object[] list = new Object[] { 1, org.spigotmc.SpigotConfig.protocolVersion, this.server.getVersion(), pingEvent.getMotd(), playerlist.getPlayerCount(), pingEvent.getMaxPlayers() }; // Spigot
|
||||
|
||||
StringBuilder builder = new StringBuilder();
|
||||
for (Object object : list) {
|
||||
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
|
||||
index e8039d7..982f503 100644
|
||||
--- a/src/main/java/org/spigotmc/SpigotConfig.java
|
||||
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
|
||||
@@ -280,4 +280,23 @@ public class SpigotConfig
|
||||
|
||||
Bukkit.getLogger().setFilter( new LogFilter() );
|
||||
}
|
||||
+
|
||||
+ public static boolean snapshotProtocol;
|
||||
+ public static String gameVersion;
|
||||
+ public static byte protocolVersion;
|
||||
+ private static void snapshotProtocol()
|
||||
+ {
|
||||
+ snapshotProtocol = getBoolean( "settings.snapshot-protocol", false );
|
||||
+ snapshotProtocol = true;
|
||||
+
|
||||
+ gameVersion = ( snapshotProtocol ) ? "1.6.2" : "1.6.1";
|
||||
+ protocolVersion = (byte) ( ( snapshotProtocol ) ? 74 : 73 );
|
||||
+ if ( snapshotProtocol )
|
||||
+ {
|
||||
+ Bukkit.getLogger().severe( "================ [Snapshot Protocol] ================" );
|
||||
+ Bukkit.getLogger().severe( "Initialised Snapshot Protocol for " + gameVersion + " (" + protocolVersion + ")" );
|
||||
+ Bukkit.getLogger().severe( "Features may NOT be implemented! Use at your own risk!" );
|
||||
+ Bukkit.getLogger().severe( "================ ====================================" );
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
--
|
||||
1.8.1.2
|
||||
|
Loading…
Reference in New Issue
Block a user