Update for latest CraftBukkit changes.
This commit is contained in:
parent
881dfe09c2
commit
6a6ecc5d1d
|
@ -1,4 +1,4 @@
|
|||
From f11a143d3addb06ea169772e070441fabd20114d Mon Sep 17 00:00:00 2001
|
||||
From e3594bfb2e702b31dfb5ed0e2b1c00d58036449c Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Sun, 1 Dec 2013 15:10:48 +1100
|
||||
Subject: [PATCH] mc-dev imports
|
||||
|
@ -892,7 +892,7 @@ index 0000000..9f9b45d
|
|||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/BlockTNT.java b/src/main/java/net/minecraft/server/BlockTNT.java
|
||||
new file mode 100644
|
||||
index 0000000..f15b199
|
||||
index 0000000..de2d648
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/net/minecraft/server/BlockTNT.java
|
||||
@@ -0,0 +1,102 @@
|
||||
|
@ -927,7 +927,7 @@ index 0000000..f15b199
|
|||
+
|
||||
+ public void wasExploded(World world, BlockPosition blockposition, Explosion explosion) {
|
||||
+ if (!world.isClientSide) {
|
||||
+ EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(world, (double) ((float) blockposition.getX() + 0.5F), (double) blockposition.getY(), (double) ((float) blockposition.getZ() + 0.5F), explosion.c());
|
||||
+ EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(world, (double) ((float) blockposition.getX() + 0.5F), (double) blockposition.getY(), (double) ((float) blockposition.getZ() + 0.5F), explosion.getSource());
|
||||
+
|
||||
+ entitytntprimed.fuseTicks = world.random.nextInt(entitytntprimed.fuseTicks / 4) + entitytntprimed.fuseTicks / 8;
|
||||
+ world.addEntity(entitytntprimed);
|
||||
|
@ -2000,7 +2000,7 @@ index 0000000..27ce9d9
|
|||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/GenericAttributes.java b/src/main/java/net/minecraft/server/GenericAttributes.java
|
||||
new file mode 100644
|
||||
index 0000000..59b06c4
|
||||
index 0000000..3ed721a
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/net/minecraft/server/GenericAttributes.java
|
||||
@@ -0,0 +1,114 @@
|
||||
|
@ -2015,11 +2015,11 @@ index 0000000..59b06c4
|
|||
+public class GenericAttributes {
|
||||
+
|
||||
+ private static final Logger f = LogManager.getLogger();
|
||||
+ public static final IAttribute maxHealth = (new AttributeRanged((IAttribute) null, "generic.maxHealth", 20.0D, 0.0D, Double.MAX_VALUE)).a("Max Health").a(true);
|
||||
+ public static final IAttribute maxHealth = (new AttributeRanged((IAttribute) null, "generic.maxHealth", 20.0D, 0.0D, 1024.0D)).a("Max Health").a(true);
|
||||
+ public static final IAttribute FOLLOW_RANGE = (new AttributeRanged((IAttribute) null, "generic.followRange", 32.0D, 0.0D, 2048.0D)).a("Follow Range");
|
||||
+ public static final IAttribute c = (new AttributeRanged((IAttribute) null, "generic.knockbackResistance", 0.0D, 0.0D, 1.0D)).a("Knockback Resistance");
|
||||
+ public static final IAttribute MOVEMENT_SPEED = (new AttributeRanged((IAttribute) null, "generic.movementSpeed", 0.699999988079071D, 0.0D, Double.MAX_VALUE)).a("Movement Speed").a(true);
|
||||
+ public static final IAttribute ATTACK_DAMAGE = new AttributeRanged((IAttribute) null, "generic.attackDamage", 2.0D, 0.0D, Double.MAX_VALUE);
|
||||
+ public static final IAttribute MOVEMENT_SPEED = (new AttributeRanged((IAttribute) null, "generic.movementSpeed", 0.699999988079071D, 0.0D, 1024.0D)).a("Movement Speed").a(true);
|
||||
+ public static final IAttribute ATTACK_DAMAGE = new AttributeRanged((IAttribute) null, "generic.attackDamage", 2.0D, 0.0D, 2048.0D);
|
||||
+
|
||||
+ public static NBTTagList a(AttributeMapBase attributemapbase) {
|
||||
+ NBTTagList nbttaglist = new NBTTagList();
|
||||
|
@ -3008,6 +3008,51 @@ index 0000000..670d626
|
|||
+ }
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/PacketHandshakingInSetProtocol.java b/src/main/java/net/minecraft/server/PacketHandshakingInSetProtocol.java
|
||||
new file mode 100644
|
||||
index 0000000..9c7b691
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/net/minecraft/server/PacketHandshakingInSetProtocol.java
|
||||
@@ -0,0 +1,39 @@
|
||||
+package net.minecraft.server;
|
||||
+
|
||||
+import java.io.IOException;
|
||||
+
|
||||
+public class PacketHandshakingInSetProtocol implements Packet<PacketHandshakingInListener> {
|
||||
+
|
||||
+ private int a;
|
||||
+ public String hostname;
|
||||
+ public int port;
|
||||
+ private EnumProtocol d;
|
||||
+
|
||||
+ public PacketHandshakingInSetProtocol() {}
|
||||
+
|
||||
+ public void a(PacketDataSerializer packetdataserializer) throws IOException {
|
||||
+ this.a = packetdataserializer.e();
|
||||
+ this.hostname = packetdataserializer.c(255);
|
||||
+ this.port = packetdataserializer.readUnsignedShort();
|
||||
+ this.d = EnumProtocol.a(packetdataserializer.e());
|
||||
+ }
|
||||
+
|
||||
+ public void b(PacketDataSerializer packetdataserializer) throws IOException {
|
||||
+ packetdataserializer.b(this.a);
|
||||
+ packetdataserializer.a(this.hostname);
|
||||
+ packetdataserializer.writeShort(this.port);
|
||||
+ packetdataserializer.b(this.d.a());
|
||||
+ }
|
||||
+
|
||||
+ public void a(PacketHandshakingInListener packethandshakinginlistener) {
|
||||
+ packethandshakinginlistener.a(this);
|
||||
+ }
|
||||
+
|
||||
+ public EnumProtocol a() {
|
||||
+ return this.d;
|
||||
+ }
|
||||
+
|
||||
+ public int b() {
|
||||
+ return this.a;
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/PacketPlayInArmAnimation.java b/src/main/java/net/minecraft/server/PacketPlayInArmAnimation.java
|
||||
new file mode 100644
|
||||
index 0000000..c611db1
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From 23a90b4cf1ac5f80a05667740682f33132c9942a Mon Sep 17 00:00:00 2001
|
||||
From 64df9839b2e8d17ad823bf8141192f40fe10e073 Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Sun, 1 Dec 2013 18:18:41 +1100
|
||||
Subject: [PATCH] BungeeCord Support
|
||||
|
@ -6,7 +6,7 @@ Subject: [PATCH] BungeeCord Support
|
|||
Provides support for IP forwarding via BungeeCord.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/HandshakeListener.java b/src/main/java/net/minecraft/server/HandshakeListener.java
|
||||
index e122df9..36af75a 100644
|
||||
index 53823c6..64f6a9b 100644
|
||||
--- a/src/main/java/net/minecraft/server/HandshakeListener.java
|
||||
+++ b/src/main/java/net/minecraft/server/HandshakeListener.java
|
||||
@@ -7,6 +7,7 @@ import java.util.HashMap;
|
||||
|
@ -23,9 +23,9 @@ index e122df9..36af75a 100644
|
|||
this.b.a((PacketListener) (new LoginListener(this.a, this.b)));
|
||||
+ // Spigot Start
|
||||
+ if (org.spigotmc.SpigotConfig.bungee) {
|
||||
+ String[] split = packethandshakinginsetprotocol.b.split("\00");
|
||||
+ String[] split = packethandshakinginsetprotocol.hostname.split("\00");
|
||||
+ if ( split.length == 3 || split.length == 4 ) {
|
||||
+ packethandshakinginsetprotocol.b = split[0];
|
||||
+ packethandshakinginsetprotocol.hostname = split[0];
|
||||
+ b.l = new java.net.InetSocketAddress(split[1], ((java.net.InetSocketAddress) b.getSocketAddress()).getPort());
|
||||
+ b.spoofedUUID = com.mojang.util.UUIDTypeAdapter.fromString( split[2] );
|
||||
+ } else
|
||||
|
@ -41,7 +41,7 @@ index e122df9..36af75a 100644
|
|||
+ }
|
||||
+ }
|
||||
+ // Spigot End
|
||||
((LoginListener) this.b.getPacketListener()).hostname = packethandshakinginsetprotocol.b + ":" + packethandshakinginsetprotocol.c; // CraftBukkit - set hostname
|
||||
((LoginListener) this.b.getPacketListener()).hostname = packethandshakinginsetprotocol.hostname + ":" + packethandshakinginsetprotocol.port; // CraftBukkit - set hostname
|
||||
}
|
||||
break;
|
||||
diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java
|
||||
|
@ -131,16 +131,16 @@ index 7623b42..7959242 100644
|
|||
+ // Spigot End
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/PacketHandshakingInSetProtocol.java b/src/main/java/net/minecraft/server/PacketHandshakingInSetProtocol.java
|
||||
index a1c5869..c91a695 100644
|
||||
index 9c7b691..fba8bba 100644
|
||||
--- a/src/main/java/net/minecraft/server/PacketHandshakingInSetProtocol.java
|
||||
+++ b/src/main/java/net/minecraft/server/PacketHandshakingInSetProtocol.java
|
||||
@@ -13,7 +13,7 @@ public class PacketHandshakingInSetProtocol implements Packet<PacketHandshakingI
|
||||
|
||||
public void a(PacketDataSerializer packetdataserializer) throws IOException {
|
||||
this.a = packetdataserializer.e();
|
||||
- this.b = packetdataserializer.c(255);
|
||||
+ this.b = packetdataserializer.c(Short.MAX_VALUE); // Spigot
|
||||
this.c = packetdataserializer.readUnsignedShort();
|
||||
- this.hostname = packetdataserializer.c(255);
|
||||
+ this.hostname = packetdataserializer.c(Short.MAX_VALUE); // Spigot
|
||||
this.port = packetdataserializer.readUnsignedShort();
|
||||
this.d = EnumProtocol.a(packetdataserializer.e());
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From 4c2b941fe224eee039c7f65edf58b8ad77b1426a Mon Sep 17 00:00:00 2001
|
||||
From 8c1f3c1d533505cf492769301b6a2b7a613291cd Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <git@md-5.net>
|
||||
Date: Mon, 28 Jul 2014 16:55:51 +1000
|
||||
Subject: [PATCH] Allow Attribute Capping.
|
||||
|
@ -19,20 +19,20 @@ index 13602f0..838daed 100644
|
|||
|
||||
public AttributeRanged(IAttribute iattribute, String s, double d0, double d1, double d2) {
|
||||
diff --git a/src/main/java/net/minecraft/server/GenericAttributes.java b/src/main/java/net/minecraft/server/GenericAttributes.java
|
||||
index 59b06c4..0cc3e2f 100644
|
||||
index 3ed721a..0cc3e2f 100644
|
||||
--- a/src/main/java/net/minecraft/server/GenericAttributes.java
|
||||
+++ b/src/main/java/net/minecraft/server/GenericAttributes.java
|
||||
@@ -9,11 +9,13 @@ import org.apache.logging.log4j.Logger;
|
||||
public class GenericAttributes {
|
||||
|
||||
private static final Logger f = LogManager.getLogger();
|
||||
- public static final IAttribute maxHealth = (new AttributeRanged((IAttribute) null, "generic.maxHealth", 20.0D, 0.0D, Double.MAX_VALUE)).a("Max Health").a(true);
|
||||
- public static final IAttribute maxHealth = (new AttributeRanged((IAttribute) null, "generic.maxHealth", 20.0D, 0.0D, 1024.0D)).a("Max Health").a(true);
|
||||
+ // Spigot start
|
||||
+ public static final IAttribute maxHealth = (new AttributeRanged((IAttribute) null, "generic.maxHealth", 20.0D, 0.1D, org.spigotmc.SpigotConfig.maxHealth)).a("Max Health").a(true);
|
||||
public static final IAttribute FOLLOW_RANGE = (new AttributeRanged((IAttribute) null, "generic.followRange", 32.0D, 0.0D, 2048.0D)).a("Follow Range");
|
||||
public static final IAttribute c = (new AttributeRanged((IAttribute) null, "generic.knockbackResistance", 0.0D, 0.0D, 1.0D)).a("Knockback Resistance");
|
||||
- public static final IAttribute MOVEMENT_SPEED = (new AttributeRanged((IAttribute) null, "generic.movementSpeed", 0.699999988079071D, 0.0D, Double.MAX_VALUE)).a("Movement Speed").a(true);
|
||||
- public static final IAttribute ATTACK_DAMAGE = new AttributeRanged((IAttribute) null, "generic.attackDamage", 2.0D, 0.0D, Double.MAX_VALUE);
|
||||
- public static final IAttribute MOVEMENT_SPEED = (new AttributeRanged((IAttribute) null, "generic.movementSpeed", 0.699999988079071D, 0.0D, 1024.0D)).a("Movement Speed").a(true);
|
||||
- public static final IAttribute ATTACK_DAMAGE = new AttributeRanged((IAttribute) null, "generic.attackDamage", 2.0D, 0.0D, 2048.0D);
|
||||
+ public static final IAttribute MOVEMENT_SPEED = (new AttributeRanged((IAttribute) null, "generic.movementSpeed", 0.699999988079071D, 0.0D, org.spigotmc.SpigotConfig.movementSpeed)).a("Movement Speed").a(true);
|
||||
+ public static final IAttribute ATTACK_DAMAGE = new AttributeRanged((IAttribute) null, "generic.attackDamage", 2.0D, 0.0D, org.spigotmc.SpigotConfig.attackDamage);
|
||||
+ // Spigot end
|
||||
|
|
Loading…
Reference in New Issue