mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-29 12:27:59 +01:00
Update to Minecraft 1.8.3
This commit is contained in:
parent
9b05d00764
commit
e5290a457a
@ -1,11 +1,11 @@
|
|||||||
From 3944fc93fc9dda3a79b13b15b159b75875ea7ee0 Mon Sep 17 00:00:00 2001
|
From eaef9b5a74b7256497d5f048a61118d7403c7114 Mon Sep 17 00:00:00 2001
|
||||||
From: md_5 <md_5@live.com.au>
|
From: md_5 <md_5@live.com.au>
|
||||||
Date: Sun, 2 Jun 2013 10:36:24 +1000
|
Date: Sun, 2 Jun 2013 10:36:24 +1000
|
||||||
Subject: [PATCH] POM Changes
|
Subject: [PATCH] POM Changes
|
||||||
|
|
||||||
|
|
||||||
diff --git a/pom.xml b/pom.xml
|
diff --git a/pom.xml b/pom.xml
|
||||||
index 853fab1..7be35f3 100644
|
index 085883e..f29b8f7 100644
|
||||||
--- a/pom.xml
|
--- a/pom.xml
|
||||||
+++ b/pom.xml
|
+++ b/pom.xml
|
||||||
@@ -9,14 +9,14 @@
|
@@ -9,14 +9,14 @@
|
||||||
@ -16,7 +16,7 @@ index 853fab1..7be35f3 100644
|
|||||||
- <artifactId>bukkit</artifactId>
|
- <artifactId>bukkit</artifactId>
|
||||||
+ <groupId>org.spigotmc</groupId>
|
+ <groupId>org.spigotmc</groupId>
|
||||||
+ <artifactId>spigot-api</artifactId>
|
+ <artifactId>spigot-api</artifactId>
|
||||||
<version>1.8-R0.1-SNAPSHOT</version>
|
<version>1.8.3-R0.1-SNAPSHOT</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
- <name>Bukkit</name>
|
- <name>Bukkit</name>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From 9993323860c8eb9bb972aaaf06e5fbea29727378 Mon Sep 17 00:00:00 2001
|
From d2ba450a4a2ae61f6d3ba8b45bf56a696d0c7eb4 Mon Sep 17 00:00:00 2001
|
||||||
From: md_5 <md_5@live.com.au>
|
From: md_5 <md_5@live.com.au>
|
||||||
Date: Tue, 2 Jul 2013 13:07:39 +1000
|
Date: Tue, 2 Jul 2013 13:07:39 +1000
|
||||||
Subject: [PATCH] POM Changes
|
Subject: [PATCH] POM Changes
|
||||||
@ -6,7 +6,7 @@ Subject: [PATCH] POM Changes
|
|||||||
Basic changes to the build system which mark the artifact as Spigot, and the necessary code changes to ensure proper functionality. Also disables the auto updater provided by CraftBukkit as it is useless to us.
|
Basic changes to the build system which mark the artifact as Spigot, and the necessary code changes to ensure proper functionality. Also disables the auto updater provided by CraftBukkit as it is useless to us.
|
||||||
|
|
||||||
diff --git a/pom.xml b/pom.xml
|
diff --git a/pom.xml b/pom.xml
|
||||||
index fec390d..bcd3a30 100644
|
index 7f49330..eb0128a 100644
|
||||||
--- a/pom.xml
|
--- a/pom.xml
|
||||||
+++ b/pom.xml
|
+++ b/pom.xml
|
||||||
@@ -1,12 +1,12 @@
|
@@ -1,12 +1,12 @@
|
||||||
@ -18,7 +18,7 @@ index fec390d..bcd3a30 100644
|
|||||||
+ <groupId>org.spigotmc</groupId>
|
+ <groupId>org.spigotmc</groupId>
|
||||||
+ <artifactId>spigot</artifactId>
|
+ <artifactId>spigot</artifactId>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
<version>1.8-R0.1-SNAPSHOT</version>
|
<version>1.8.3-R0.1-SNAPSHOT</version>
|
||||||
- <name>CraftBukkit</name>
|
- <name>CraftBukkit</name>
|
||||||
- <url>http://www.bukkit.org</url>
|
- <url>http://www.bukkit.org</url>
|
||||||
+ <name>Spigot</name>
|
+ <name>Spigot</name>
|
||||||
@ -26,7 +26,7 @@ index fec390d..bcd3a30 100644
|
|||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
@@ -20,10 +20,17 @@
|
@@ -20,10 +20,22 @@
|
||||||
<maven.compiler.target>1.6</maven.compiler.target>
|
<maven.compiler.target>1.6</maven.compiler.target>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
@ -41,12 +41,17 @@ index fec390d..bcd3a30 100644
|
|||||||
<dependency>
|
<dependency>
|
||||||
- <groupId>org.bukkit</groupId>
|
- <groupId>org.bukkit</groupId>
|
||||||
- <artifactId>bukkit</artifactId>
|
- <artifactId>bukkit</artifactId>
|
||||||
|
+ <groupId>net.sf.trove4j</groupId>
|
||||||
|
+ <artifactId>trove4j</artifactId>
|
||||||
|
+ <version>3.0.3</version>
|
||||||
|
+ </dependency>
|
||||||
|
+ <dependency>
|
||||||
+ <groupId>org.spigotmc</groupId>
|
+ <groupId>org.spigotmc</groupId>
|
||||||
+ <artifactId>spigot-api</artifactId>
|
+ <artifactId>spigot-api</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
<type>jar</type>
|
<type>jar</type>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
@@ -93,21 +100,39 @@
|
@@ -93,21 +105,39 @@
|
||||||
|
|
||||||
<!-- This builds a completely 'ready to start' jar with all dependencies inside -->
|
<!-- This builds a completely 'ready to start' jar with all dependencies inside -->
|
||||||
<build>
|
<build>
|
||||||
@ -89,7 +94,7 @@ index fec390d..bcd3a30 100644
|
|||||||
<phase>compile</phase>
|
<phase>compile</phase>
|
||||||
<goals>
|
<goals>
|
||||||
<goal>gitdescribe</goal>
|
<goal>gitdescribe</goal>
|
||||||
@@ -124,7 +149,7 @@
|
@@ -124,7 +154,7 @@
|
||||||
<manifestEntries>
|
<manifestEntries>
|
||||||
<Main-Class>org.bukkit.craftbukkit.Main</Main-Class>
|
<Main-Class>org.bukkit.craftbukkit.Main</Main-Class>
|
||||||
<Implementation-Title>CraftBukkit</Implementation-Title>
|
<Implementation-Title>CraftBukkit</Implementation-Title>
|
||||||
@ -98,7 +103,7 @@ index fec390d..bcd3a30 100644
|
|||||||
<Implementation-Vendor>Bukkit Team</Implementation-Vendor>
|
<Implementation-Vendor>Bukkit Team</Implementation-Vendor>
|
||||||
<Specification-Title>Bukkit</Specification-Title>
|
<Specification-Title>Bukkit</Specification-Title>
|
||||||
<Specification-Version>${api.version}</Specification-Version>
|
<Specification-Version>${api.version}</Specification-Version>
|
||||||
@@ -169,7 +194,7 @@
|
@@ -169,7 +199,7 @@
|
||||||
<configuration>
|
<configuration>
|
||||||
<signature>
|
<signature>
|
||||||
<groupId>org.codehaus.mojo.signature</groupId>
|
<groupId>org.codehaus.mojo.signature</groupId>
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,4 @@
|
|||||||
From af4dd992f13829f1991cfb775e0726ba5fe49d09 Mon Sep 17 00:00:00 2001
|
From e31c5dbce193a2d4aaedd1094e2d37821bdeba7b Mon Sep 17 00:00:00 2001
|
||||||
From: md_5 <md_5@live.com.au>
|
From: md_5 <md_5@live.com.au>
|
||||||
Date: Sun, 2 Jun 2013 15:10:56 +1000
|
Date: Sun, 2 Jun 2013 15:10:56 +1000
|
||||||
Subject: [PATCH] Skeleton API Implementations
|
Subject: [PATCH] Skeleton API Implementations
|
||||||
@ -6,10 +6,10 @@ Subject: [PATCH] Skeleton API Implementations
|
|||||||
This contains the basic, empty implementations for some Spigot-API extensions. They are included early in the patching progress so that compilation will still succeed midway despite the APIs only being provided by subsequent patches.
|
This contains the basic, empty implementations for some Spigot-API extensions. They are included early in the patching progress so that compilation will still succeed midway despite the APIs only being provided by subsequent patches.
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
index 1f936b0..cd304ac 100644
|
index 629e6b8..4b3fcac 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
@@ -1628,4 +1628,14 @@ public final class CraftServer implements Server {
|
@@ -1642,4 +1642,14 @@ public final class CraftServer implements Server {
|
||||||
public UnsafeValues getUnsafe() {
|
public UnsafeValues getUnsafe() {
|
||||||
return CraftMagicNumbers.INSTANCE;
|
return CraftMagicNumbers.INSTANCE;
|
||||||
}
|
}
|
||||||
@ -25,10 +25,10 @@ index 1f936b0..cd304ac 100644
|
|||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||||
index dac2ad0..5ef7d97 100644
|
index 621c89f..20357f9 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||||
@@ -1345,4 +1345,14 @@ public class CraftWorld implements World {
|
@@ -1353,4 +1353,14 @@ public class CraftWorld implements World {
|
||||||
cps.queueUnload(chunk.locX, chunk.locZ);
|
cps.queueUnload(chunk.locX, chunk.locZ);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -104,7 +104,7 @@ index 64e346d..243e8e5 100644
|
|||||||
+ // Spigot end
|
+ // Spigot end
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
index 6361b44..fed7b4d 100644
|
index 05923b4..058141d 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
@@ -1313,4 +1313,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@@ -1313,4 +1313,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
@ -161,10 +161,10 @@ index d3ae91b..0b71b53 100644
|
|||||||
+ // Spigot end
|
+ // Spigot end
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java
|
||||||
index c4db462..fa6e826 100644
|
index ce42b30..342d4af 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java
|
--- a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java
|
||||||
@@ -214,5 +214,26 @@ final class CraftTeam extends CraftScoreboardComponent implements Team {
|
@@ -212,5 +212,26 @@ final class CraftTeam extends CraftScoreboardComponent implements Team {
|
||||||
return !(this.team != other.team && (this.team == null || !this.team.equals(other.team)));
|
return !(this.team != other.team && (this.team == null || !this.team.equals(other.team)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From 3985866c3e05358f49461327fa3d04b610eaf494 Mon Sep 17 00:00:00 2001
|
From a5d8ed7311a8a717390419672a8b7b4165adad01 Mon Sep 17 00:00:00 2001
|
||||||
From: md_5 <git@md-5.net>
|
From: md_5 <git@md-5.net>
|
||||||
Date: Mon, 14 Apr 2014 10:38:04 +1000
|
Date: Mon, 14 Apr 2014 10:38:04 +1000
|
||||||
Subject: [PATCH] Obfuscation Helpers
|
Subject: [PATCH] Obfuscation Helpers
|
||||||
@ -6,10 +6,10 @@ Subject: [PATCH] Obfuscation Helpers
|
|||||||
Provides several friendly named methods which map to a obfuscated method. Obfuscated methods which are used frequently should be added to this file to ease with updates to new Minecraft versions.
|
Provides several friendly named methods which map to a obfuscated method. Obfuscated methods which are used frequently should be added to this file to ease with updates to new Minecraft versions.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
index 4bd0c85..0a707eb 100644
|
index 4219e7b..486e652 100644
|
||||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
@@ -1309,6 +1309,12 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs
|
@@ -1288,6 +1288,12 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -19,7 +19,7 @@ index 4bd0c85..0a707eb 100644
|
|||||||
+ return this.q;
|
+ return this.q;
|
||||||
+ }
|
+ }
|
||||||
+ // Spigot End
|
+ // Spigot End
|
||||||
public ServerConnection ao() {
|
public ServerConnection ap() {
|
||||||
return this.q;
|
return this.q;
|
||||||
}
|
}
|
||||||
--
|
--
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From 6c38d387d270dea5a06c8e784e2831e65c500ac6 Mon Sep 17 00:00:00 2001
|
From 0b8be4fd43a70c45431189ab67cc200fa0669586 Mon Sep 17 00:00:00 2001
|
||||||
From: md_5 <md_5@live.com.au>
|
From: md_5 <md_5@live.com.au>
|
||||||
Date: Sun, 7 Jul 2013 09:32:53 +1000
|
Date: Sun, 7 Jul 2013 09:32:53 +1000
|
||||||
Subject: [PATCH] Spigot Configuration
|
Subject: [PATCH] Spigot Configuration
|
||||||
@ -6,10 +6,10 @@ Subject: [PATCH] Spigot Configuration
|
|||||||
Provides the basic infrastructure to load and save the Spigot configuration file, spigot.yml
|
Provides the basic infrastructure to load and save the Spigot configuration file, spigot.yml
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
|
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||||
index 29c0a34..424b71d 100644
|
index d57a796..8bc6ad6 100644
|
||||||
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
|
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
|
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||||
@@ -116,6 +116,11 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
|
@@ -163,6 +163,11 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
|
||||||
if (this.Q() < 0) {
|
if (this.Q() < 0) {
|
||||||
this.setPort(this.propertyManager.getInt("server-port", 25565));
|
this.setPort(this.propertyManager.getInt("server-port", 25565));
|
||||||
}
|
}
|
||||||
@ -21,7 +21,7 @@ index 29c0a34..424b71d 100644
|
|||||||
|
|
||||||
DedicatedServer.LOGGER.info("Generating keypair");
|
DedicatedServer.LOGGER.info("Generating keypair");
|
||||||
this.a(MinecraftEncryption.b());
|
this.a(MinecraftEncryption.b());
|
||||||
@@ -130,7 +135,11 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
|
@@ -177,7 +182,11 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -35,10 +35,10 @@ index 29c0a34..424b71d 100644
|
|||||||
if (!this.getOnlineMode()) {
|
if (!this.getOnlineMode()) {
|
||||||
DedicatedServer.LOGGER.warn("**** SERVER IS RUNNING IN OFFLINE/INSECURE MODE!");
|
DedicatedServer.LOGGER.warn("**** SERVER IS RUNNING IN OFFLINE/INSECURE MODE!");
|
||||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||||
index 8dde097..3c1ba5b 100644
|
index 5c2e218..345ede9 100644
|
||||||
--- a/src/main/java/net/minecraft/server/World.java
|
--- a/src/main/java/net/minecraft/server/World.java
|
||||||
+++ b/src/main/java/net/minecraft/server/World.java
|
+++ b/src/main/java/net/minecraft/server/World.java
|
||||||
@@ -98,6 +98,7 @@ public abstract class World implements IBlockAccess {
|
@@ -99,6 +99,7 @@ public abstract class World implements IBlockAccess {
|
||||||
public long ticksPerMonsterSpawns;
|
public long ticksPerMonsterSpawns;
|
||||||
public boolean populating;
|
public boolean populating;
|
||||||
private int tickPosition;
|
private int tickPosition;
|
||||||
@ -46,7 +46,7 @@ index 8dde097..3c1ba5b 100644
|
|||||||
|
|
||||||
public CraftWorld getWorld() {
|
public CraftWorld getWorld() {
|
||||||
return this.world;
|
return this.world;
|
||||||
@@ -112,6 +113,7 @@ public abstract class World implements IBlockAccess {
|
@@ -113,6 +114,7 @@ public abstract class World implements IBlockAccess {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected World(IDataManager idatamanager, WorldData worlddata, WorldProvider worldprovider, MethodProfiler methodprofiler, boolean flag, ChunkGenerator gen, org.bukkit.World.Environment env) {
|
protected World(IDataManager idatamanager, WorldData worlddata, WorldProvider worldprovider, MethodProfiler methodprofiler, boolean flag, ChunkGenerator gen, org.bukkit.World.Environment env) {
|
||||||
@ -55,7 +55,7 @@ index 8dde097..3c1ba5b 100644
|
|||||||
this.world = new CraftWorld((WorldServer) this, gen, env);
|
this.world = new CraftWorld((WorldServer) this, gen, env);
|
||||||
this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns(); // CraftBukkit
|
this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns(); // CraftBukkit
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
index cd304ac..09c723f 100644
|
index 4b3fcac..2aceeb4 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
@@ -247,8 +247,10 @@ public final class CraftServer implements Server {
|
@@ -247,8 +247,10 @@ public final class CraftServer implements Server {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From c013f6381cd2c734afb9b84301b85cbeedad8315 Mon Sep 17 00:00:00 2001
|
From 47268e1d09430b441ffbd123d6cab9b2da8c9bda Mon Sep 17 00:00:00 2001
|
||||||
From: md_5 <md_5@live.com.au>
|
From: md_5 <md_5@live.com.au>
|
||||||
Date: Tue, 11 Jun 2013 12:56:02 +1000
|
Date: Tue, 11 Jun 2013 12:56:02 +1000
|
||||||
Subject: [PATCH] Better Chunk Tick Selection
|
Subject: [PATCH] Better Chunk Tick Selection
|
||||||
@ -6,19 +6,19 @@ Subject: [PATCH] Better Chunk Tick Selection
|
|||||||
An optimized chunk ticking algorithm which better selects chunks around players which are active on the server.
|
An optimized chunk ticking algorithm which better selects chunks around players which are active on the server.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||||
index 3c1ba5b..6d8a5e8 100644
|
index 345ede9..bed457a 100644
|
||||||
--- a/src/main/java/net/minecraft/server/World.java
|
--- a/src/main/java/net/minecraft/server/World.java
|
||||||
+++ b/src/main/java/net/minecraft/server/World.java
|
+++ b/src/main/java/net/minecraft/server/World.java
|
||||||
@@ -64,7 +64,7 @@ public abstract class World implements IBlockAccess {
|
@@ -65,7 +65,7 @@ public abstract class World implements IBlockAccess {
|
||||||
public Scoreboard scoreboard = new Scoreboard();
|
public Scoreboard scoreboard = new Scoreboard(); // CraftBukkit - public
|
||||||
public final boolean isStatic;
|
public final boolean isClientSide;
|
||||||
// CraftBukkit - longhashset
|
// CraftBukkit - longhashset
|
||||||
- protected LongHashSet chunkTickList = new LongHashSet();
|
- protected LongHashSet chunkTickList = new LongHashSet();
|
||||||
+ // protected LongHashSet chunkTickList = new LongHashSet(); // Spigot
|
+ // protected LongHashSet chunkTickList = new LongHashSet(); // Spigot
|
||||||
private int K;
|
private int L;
|
||||||
public boolean allowMonsters;
|
public boolean allowMonsters; // CraftBukkit - public
|
||||||
public boolean allowAnimals;
|
public boolean allowAnimals; // CraftBukkit - public
|
||||||
@@ -98,6 +98,31 @@ public abstract class World implements IBlockAccess {
|
@@ -99,6 +99,31 @@ public abstract class World implements IBlockAccess {
|
||||||
public long ticksPerMonsterSpawns;
|
public long ticksPerMonsterSpawns;
|
||||||
public boolean populating;
|
public boolean populating;
|
||||||
private int tickPosition;
|
private int tickPosition;
|
||||||
@ -50,7 +50,7 @@ index 3c1ba5b..6d8a5e8 100644
|
|||||||
public final org.spigotmc.SpigotWorldConfig spigotConfig; // Spigot
|
public final org.spigotmc.SpigotWorldConfig spigotConfig; // Spigot
|
||||||
|
|
||||||
public CraftWorld getWorld() {
|
public CraftWorld getWorld() {
|
||||||
@@ -119,6 +144,11 @@ public abstract class World implements IBlockAccess {
|
@@ -120,6 +145,12 @@ public abstract class World implements IBlockAccess {
|
||||||
this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns(); // CraftBukkit
|
this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns(); // CraftBukkit
|
||||||
this.ticksPerMonsterSpawns = this.getServer().getTicksPerMonsterSpawns(); // CraftBukkit
|
this.ticksPerMonsterSpawns = this.getServer().getTicksPerMonsterSpawns(); // CraftBukkit
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
@ -59,10 +59,11 @@ index 3c1ba5b..6d8a5e8 100644
|
|||||||
+ this.chunkTickList = new gnu.trove.map.hash.TLongShortHashMap( spigotConfig.chunksPerTick * 5, 0.7f, Long.MIN_VALUE, Short.MIN_VALUE );
|
+ this.chunkTickList = new gnu.trove.map.hash.TLongShortHashMap( spigotConfig.chunksPerTick * 5, 0.7f, Long.MIN_VALUE, Short.MIN_VALUE );
|
||||||
+ this.chunkTickList.setAutoCompactionFactor( 0 );
|
+ this.chunkTickList.setAutoCompactionFactor( 0 );
|
||||||
+ // Spigot end
|
+ // Spigot end
|
||||||
|
+
|
||||||
this.K = this.random.nextInt(12000);
|
this.L = this.random.nextInt(12000);
|
||||||
this.allowMonsters = true;
|
this.allowMonsters = true;
|
||||||
@@ -1892,17 +1922,44 @@ public abstract class World implements IBlockAccess {
|
this.allowAnimals = true;
|
||||||
|
@@ -1945,17 +1976,44 @@ public abstract class World implements IBlockAccess {
|
||||||
int k;
|
int k;
|
||||||
int l;
|
int l;
|
||||||
|
|
||||||
@ -111,7 +112,7 @@ index 3c1ba5b..6d8a5e8 100644
|
|||||||
|
|
||||||
this.methodProfiler.b();
|
this.methodProfiler.b();
|
||||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||||
index 80c464a..b81b1ff 100644
|
index 32bf7ff..383a491 100644
|
||||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||||
@@ -343,12 +343,15 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
@@ -343,12 +343,15 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||||
@ -158,7 +159,7 @@ index 80c464a..b81b1ff 100644
|
|||||||
int k = chunkX * 16;
|
int k = chunkX * 16;
|
||||||
int l = chunkZ * 16;
|
int l = chunkZ * 16;
|
||||||
|
|
||||||
@@ -457,6 +472,12 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
@@ -456,6 +471,12 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From 2543375c589c3493a9016a245ffa1b13395296fc Mon Sep 17 00:00:00 2001
|
From b018b675a420b7150b58a336044582a1ce034ba6 Mon Sep 17 00:00:00 2001
|
||||||
From: md_5 <md_5@live.com.au>
|
From: md_5 <md_5@live.com.au>
|
||||||
Date: Fri, 21 Jun 2013 17:17:20 +1000
|
Date: Fri, 21 Jun 2013 17:17:20 +1000
|
||||||
Subject: [PATCH] Crop Growth Rates
|
Subject: [PATCH] Crop Growth Rates
|
||||||
@ -6,10 +6,10 @@ Subject: [PATCH] Crop Growth Rates
|
|||||||
Allows configuring the growth rates of crops as a percentage of their normal growth rate.
|
Allows configuring the growth rates of crops as a percentage of their normal growth rate.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java
|
diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java
|
||||||
index 59d03ce..12e2b79 100644
|
index 4923f8b..6b02059 100644
|
||||||
--- a/src/main/java/net/minecraft/server/Block.java
|
--- a/src/main/java/net/minecraft/server/Block.java
|
||||||
+++ b/src/main/java/net/minecraft/server/Block.java
|
+++ b/src/main/java/net/minecraft/server/Block.java
|
||||||
@@ -927,4 +927,16 @@ public class Block {
|
@@ -1009,4 +1009,16 @@ public class Block {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
@ -27,7 +27,7 @@ index 59d03ce..12e2b79 100644
|
|||||||
+ // Spigot end
|
+ // Spigot end
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/BlockCactus.java b/src/main/java/net/minecraft/server/BlockCactus.java
|
diff --git a/src/main/java/net/minecraft/server/BlockCactus.java b/src/main/java/net/minecraft/server/BlockCactus.java
|
||||||
index 6277752..d9f6e0b 100644
|
index 7f5e5ca..488e5c2 100644
|
||||||
--- a/src/main/java/net/minecraft/server/BlockCactus.java
|
--- a/src/main/java/net/minecraft/server/BlockCactus.java
|
||||||
+++ b/src/main/java/net/minecraft/server/BlockCactus.java
|
+++ b/src/main/java/net/minecraft/server/BlockCactus.java
|
||||||
@@ -29,7 +29,7 @@ public class BlockCactus extends Block {
|
@@ -29,7 +29,7 @@ public class BlockCactus extends Block {
|
||||||
@ -40,7 +40,7 @@ index 6277752..d9f6e0b 100644
|
|||||||
IBlockData iblockdata1 = iblockdata.set(BlockCactus.AGE, Integer.valueOf(0));
|
IBlockData iblockdata1 = iblockdata.set(BlockCactus.AGE, Integer.valueOf(0));
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/BlockCrops.java b/src/main/java/net/minecraft/server/BlockCrops.java
|
diff --git a/src/main/java/net/minecraft/server/BlockCrops.java b/src/main/java/net/minecraft/server/BlockCrops.java
|
||||||
index 2ce2e34..d61251f 100644
|
index e3e898e..b91b220 100644
|
||||||
--- a/src/main/java/net/minecraft/server/BlockCrops.java
|
--- a/src/main/java/net/minecraft/server/BlockCrops.java
|
||||||
+++ b/src/main/java/net/minecraft/server/BlockCrops.java
|
+++ b/src/main/java/net/minecraft/server/BlockCrops.java
|
||||||
@@ -32,8 +32,7 @@ public class BlockCrops extends BlockPlant implements IBlockFragilePlantElement
|
@@ -32,8 +32,7 @@ public class BlockCrops extends BlockPlant implements IBlockFragilePlantElement
|
||||||
@ -54,7 +54,7 @@ index 2ce2e34..d61251f 100644
|
|||||||
CraftEventFactory.handleBlockGrowEvent(world, blockposition.getX(), blockposition.getY(), blockposition.getZ(), this, toLegacyData(data));
|
CraftEventFactory.handleBlockGrowEvent(world, blockposition.getX(), blockposition.getY(), blockposition.getZ(), this, toLegacyData(data));
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
diff --git a/src/main/java/net/minecraft/server/BlockGrass.java b/src/main/java/net/minecraft/server/BlockGrass.java
|
diff --git a/src/main/java/net/minecraft/server/BlockGrass.java b/src/main/java/net/minecraft/server/BlockGrass.java
|
||||||
index fc0e540..09cdd8a 100644
|
index 147fb1f..844ad30 100644
|
||||||
--- a/src/main/java/net/minecraft/server/BlockGrass.java
|
--- a/src/main/java/net/minecraft/server/BlockGrass.java
|
||||||
+++ b/src/main/java/net/minecraft/server/BlockGrass.java
|
+++ b/src/main/java/net/minecraft/server/BlockGrass.java
|
||||||
@@ -45,7 +45,7 @@ public class BlockGrass extends Block implements IBlockFragilePlantElement {
|
@@ -45,7 +45,7 @@ public class BlockGrass extends Block implements IBlockFragilePlantElement {
|
||||||
@ -67,7 +67,7 @@ index fc0e540..09cdd8a 100644
|
|||||||
Block block = world.getType(blockposition1.up()).getBlock();
|
Block block = world.getType(blockposition1.up()).getBlock();
|
||||||
IBlockData iblockdata1 = world.getType(blockposition1);
|
IBlockData iblockdata1 = world.getType(blockposition1);
|
||||||
diff --git a/src/main/java/net/minecraft/server/BlockMushroom.java b/src/main/java/net/minecraft/server/BlockMushroom.java
|
diff --git a/src/main/java/net/minecraft/server/BlockMushroom.java b/src/main/java/net/minecraft/server/BlockMushroom.java
|
||||||
index f2944be..decefa9 100644
|
index 160a063..7cf7a08 100644
|
||||||
--- a/src/main/java/net/minecraft/server/BlockMushroom.java
|
--- a/src/main/java/net/minecraft/server/BlockMushroom.java
|
||||||
+++ b/src/main/java/net/minecraft/server/BlockMushroom.java
|
+++ b/src/main/java/net/minecraft/server/BlockMushroom.java
|
||||||
@@ -20,7 +20,7 @@ public class BlockMushroom extends BlockPlant implements IBlockFragilePlantEleme
|
@@ -20,7 +20,7 @@ public class BlockMushroom extends BlockPlant implements IBlockFragilePlantEleme
|
||||||
@ -80,7 +80,7 @@ index f2944be..decefa9 100644
|
|||||||
boolean flag = true;
|
boolean flag = true;
|
||||||
Iterator iterator = BlockPosition.b(blockposition.a(-4, -1, -4), blockposition.a(4, 1, 4)).iterator();
|
Iterator iterator = BlockPosition.b(blockposition.a(-4, -1, -4), blockposition.a(4, 1, 4)).iterator();
|
||||||
diff --git a/src/main/java/net/minecraft/server/BlockMycel.java b/src/main/java/net/minecraft/server/BlockMycel.java
|
diff --git a/src/main/java/net/minecraft/server/BlockMycel.java b/src/main/java/net/minecraft/server/BlockMycel.java
|
||||||
index 8f792e4..cb383a5 100644
|
index 70405d5..d2bd4dd 100644
|
||||||
--- a/src/main/java/net/minecraft/server/BlockMycel.java
|
--- a/src/main/java/net/minecraft/server/BlockMycel.java
|
||||||
+++ b/src/main/java/net/minecraft/server/BlockMycel.java
|
+++ b/src/main/java/net/minecraft/server/BlockMycel.java
|
||||||
@@ -44,7 +44,7 @@ public class BlockMycel extends Block {
|
@@ -44,7 +44,7 @@ public class BlockMycel extends Block {
|
||||||
@ -93,7 +93,7 @@ index 8f792e4..cb383a5 100644
|
|||||||
IBlockData iblockdata1 = world.getType(blockposition1);
|
IBlockData iblockdata1 = world.getType(blockposition1);
|
||||||
Block block = world.getType(blockposition1.up()).getBlock();
|
Block block = world.getType(blockposition1.up()).getBlock();
|
||||||
diff --git a/src/main/java/net/minecraft/server/BlockReed.java b/src/main/java/net/minecraft/server/BlockReed.java
|
diff --git a/src/main/java/net/minecraft/server/BlockReed.java b/src/main/java/net/minecraft/server/BlockReed.java
|
||||||
index f453c36..27b7f81 100644
|
index fae75fa..d00067d 100644
|
||||||
--- a/src/main/java/net/minecraft/server/BlockReed.java
|
--- a/src/main/java/net/minecraft/server/BlockReed.java
|
||||||
+++ b/src/main/java/net/minecraft/server/BlockReed.java
|
+++ b/src/main/java/net/minecraft/server/BlockReed.java
|
||||||
@@ -28,7 +28,7 @@ public class BlockReed extends Block {
|
@@ -28,7 +28,7 @@ public class BlockReed extends Block {
|
||||||
@ -106,12 +106,12 @@ index f453c36..27b7f81 100644
|
|||||||
// world.setTypeUpdate(blockposition.up(), this.getBlockData()); // CraftBukkit
|
// world.setTypeUpdate(blockposition.up(), this.getBlockData()); // CraftBukkit
|
||||||
BlockPosition upPos = blockposition.up();
|
BlockPosition upPos = blockposition.up();
|
||||||
diff --git a/src/main/java/net/minecraft/server/BlockSapling.java b/src/main/java/net/minecraft/server/BlockSapling.java
|
diff --git a/src/main/java/net/minecraft/server/BlockSapling.java b/src/main/java/net/minecraft/server/BlockSapling.java
|
||||||
index ff4f576..39c0cba 100644
|
index a2667d9..45fbf5c 100644
|
||||||
--- a/src/main/java/net/minecraft/server/BlockSapling.java
|
--- a/src/main/java/net/minecraft/server/BlockSapling.java
|
||||||
+++ b/src/main/java/net/minecraft/server/BlockSapling.java
|
+++ b/src/main/java/net/minecraft/server/BlockSapling.java
|
||||||
@@ -28,7 +28,7 @@ public class BlockSapling extends BlockPlant implements IBlockFragilePlantElemen
|
@@ -32,7 +32,7 @@ public class BlockSapling extends BlockPlant implements IBlockFragilePlantElemen
|
||||||
public void b(World world, BlockPosition blockposition, IBlockData iblockdata, Random random) {
|
public void b(World world, BlockPosition blockposition, IBlockData iblockdata, Random random) {
|
||||||
if (!world.isStatic) {
|
if (!world.isClientSide) {
|
||||||
super.b(world, blockposition, iblockdata, random);
|
super.b(world, blockposition, iblockdata, random);
|
||||||
- if (world.getLightLevel(blockposition.up()) >= 9 && random.nextInt(7) == 0) {
|
- if (world.getLightLevel(blockposition.up()) >= 9 && random.nextInt(7) == 0) {
|
||||||
+ if (world.getLightLevel(blockposition.up()) >= 9 && (random.nextInt(Math.max(2, (int) ((world.growthOdds / world.spigotConfig.saplingModifier * 7) + 0.5F))) == 0)) { // Spigot) {
|
+ if (world.getLightLevel(blockposition.up()) >= 9 && (random.nextInt(Math.max(2, (int) ((world.growthOdds / world.spigotConfig.saplingModifier * 7) + 0.5F))) == 0)) { // Spigot) {
|
||||||
@ -119,10 +119,10 @@ index ff4f576..39c0cba 100644
|
|||||||
world.captureTreeGeneration = true;
|
world.captureTreeGeneration = true;
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
diff --git a/src/main/java/net/minecraft/server/BlockStem.java b/src/main/java/net/minecraft/server/BlockStem.java
|
diff --git a/src/main/java/net/minecraft/server/BlockStem.java b/src/main/java/net/minecraft/server/BlockStem.java
|
||||||
index e4c65ff..dba443a 100644
|
index 2ff1a6b..2618c40 100644
|
||||||
--- a/src/main/java/net/minecraft/server/BlockStem.java
|
--- a/src/main/java/net/minecraft/server/BlockStem.java
|
||||||
+++ b/src/main/java/net/minecraft/server/BlockStem.java
|
+++ b/src/main/java/net/minecraft/server/BlockStem.java
|
||||||
@@ -47,7 +47,7 @@ public class BlockStem extends BlockPlant implements IBlockFragilePlantElement {
|
@@ -55,7 +55,7 @@ public class BlockStem extends BlockPlant implements IBlockFragilePlantElement {
|
||||||
if (world.getLightLevel(blockposition.up()) >= 9) {
|
if (world.getLightLevel(blockposition.up()) >= 9) {
|
||||||
float f = BlockCrops.a((Block) this, world, blockposition);
|
float f = BlockCrops.a((Block) this, world, blockposition);
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From 61c9eb61268478e85737ae6fc1c51fb5a6c659d1 Mon Sep 17 00:00:00 2001
|
From a343b092ffaac6e336eef36fac78bb6ad4962d1c Mon Sep 17 00:00:00 2001
|
||||||
From: md_5 <md_5@live.com.au>
|
From: md_5 <md_5@live.com.au>
|
||||||
Date: Tue, 11 Jun 2013 12:09:45 +1000
|
Date: Tue, 11 Jun 2013 12:09:45 +1000
|
||||||
Subject: [PATCH] More Efficient Chunk Save Queue
|
Subject: [PATCH] More Efficient Chunk Save Queue
|
||||||
@ -6,24 +6,24 @@ Subject: [PATCH] More Efficient Chunk Save Queue
|
|||||||
Optimizes the data structures behind the chunk save queue into ones more suitable for the type of data and access which they are used for.
|
Optimizes the data structures behind the chunk save queue into ones more suitable for the type of data and access which they are used for.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||||
index 527ab42..33bb889 100644
|
index 044a09d..b7d09a9 100644
|
||||||
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||||
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||||
@@ -15,8 +15,11 @@ import org.apache.logging.log4j.Logger;
|
@@ -16,8 +16,11 @@ import org.apache.logging.log4j.Logger;
|
||||||
public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
|
public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
|
||||||
|
|
||||||
private static final Logger a = LogManager.getLogger();
|
private static final Logger a = LogManager.getLogger();
|
||||||
- private List b = Lists.newArrayList();
|
- private List<ChunkRegionLoader.PendingChunkToSave> b = Lists.newArrayList();
|
||||||
- private Set c = Sets.newHashSet();
|
- private Set<ChunkCoordIntPair> c = Sets.newHashSet();
|
||||||
+ // Spigot start
|
+ // Spigot start
|
||||||
+ private java.util.LinkedHashMap<ChunkCoordIntPair, PendingChunkToSave> pendingSaves = new java.util.LinkedHashMap<ChunkCoordIntPair, PendingChunkToSave>();
|
+ private java.util.LinkedHashMap<ChunkCoordIntPair, PendingChunkToSave> pendingSaves = new java.util.LinkedHashMap<ChunkCoordIntPair, PendingChunkToSave>();
|
||||||
+ // private List b = Lists.newArrayList();
|
+ // private List<ChunkRegionLoader.PendingChunkToSave> b = Lists.newArrayList();
|
||||||
+ // private Set c = Sets.newHashSet();
|
+ // private Set<ChunkCoordIntPair> c = Sets.newHashSet();
|
||||||
+ // Spigot end
|
+ // Spigot end
|
||||||
private Object d = new Object();
|
private Object d = new Object();
|
||||||
private final File e;
|
private final File e;
|
||||||
|
|
||||||
@@ -29,13 +32,11 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
|
@@ -30,13 +33,11 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
|
||||||
ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(i, j);
|
ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(i, j);
|
||||||
|
|
||||||
synchronized (this.d) {
|
synchronized (this.d) {
|
||||||
@ -42,14 +42,14 @@ index 527ab42..33bb889 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
return RegionFileCache.a(this.e, i, j).chunkExists(i & 31, j & 31);
|
return RegionFileCache.a(this.e, i, j).chunkExists(i & 31, j & 31);
|
||||||
@@ -62,14 +63,12 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
|
@@ -63,14 +64,12 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
|
||||||
Object object = this.d;
|
Object object = this.d;
|
||||||
|
|
||||||
synchronized (this.d) {
|
synchronized (this.d) {
|
||||||
- if (this.c.contains(chunkcoordintpair)) {
|
- if (this.c.contains(chunkcoordintpair)) {
|
||||||
- for (int k = 0; k < this.b.size(); ++k) {
|
- for (int k = 0; k < this.b.size(); ++k) {
|
||||||
- if (((PendingChunkToSave) this.b.get(k)).a.equals(chunkcoordintpair)) {
|
- if (((ChunkRegionLoader.PendingChunkToSave) this.b.get(k)).a.equals(chunkcoordintpair)) {
|
||||||
- nbttagcompound = ((PendingChunkToSave) this.b.get(k)).b;
|
- nbttagcompound = ((ChunkRegionLoader.PendingChunkToSave) this.b.get(k)).b;
|
||||||
- break;
|
- break;
|
||||||
- }
|
- }
|
||||||
- }
|
- }
|
||||||
@ -62,14 +62,14 @@ index 527ab42..33bb889 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (nbttagcompound == null) {
|
if (nbttagcompound == null) {
|
||||||
@@ -150,17 +149,14 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
|
@@ -149,17 +148,14 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
|
||||||
Object object = this.d;
|
Object object = this.d;
|
||||||
|
|
||||||
synchronized (this.d) {
|
synchronized (this.d) {
|
||||||
- if (this.c.contains(chunkcoordintpair)) {
|
- if (this.c.contains(chunkcoordintpair)) {
|
||||||
- for (int i = 0; i < this.b.size(); ++i) {
|
- for (int i = 0; i < this.b.size(); ++i) {
|
||||||
- if (((PendingChunkToSave) this.b.get(i)).a.equals(chunkcoordintpair)) {
|
- if (((ChunkRegionLoader.PendingChunkToSave) this.b.get(i)).a.equals(chunkcoordintpair)) {
|
||||||
- this.b.set(i, new PendingChunkToSave(chunkcoordintpair, nbttagcompound));
|
- this.b.set(i, new ChunkRegionLoader.PendingChunkToSave(chunkcoordintpair, nbttagcompound));
|
||||||
- return;
|
- return;
|
||||||
- }
|
- }
|
||||||
- }
|
- }
|
||||||
@ -78,15 +78,15 @@ index 527ab42..33bb889 100644
|
|||||||
+ return;
|
+ return;
|
||||||
}
|
}
|
||||||
|
|
||||||
- this.b.add(new PendingChunkToSave(chunkcoordintpair, nbttagcompound));
|
- this.b.add(new ChunkRegionLoader.PendingChunkToSave(chunkcoordintpair, nbttagcompound));
|
||||||
- this.c.add(chunkcoordintpair);
|
- this.c.add(chunkcoordintpair);
|
||||||
+ // this.b.add(new PendingChunkToSave(chunkcoordintpair, nbttagcompound));
|
+ // this.b.add(new ChunkRegionLoader.PendingChunkToSave(chunkcoordintpair, nbttagcompound));
|
||||||
+ // this.c.add(chunkcoordintpair);
|
+ // this.c.add(chunkcoordintpair);
|
||||||
+ // Spigot end
|
+ // Spigot end
|
||||||
FileIOThread.a().a(this);
|
FileIOThread.a().a(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -170,12 +166,14 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
|
@@ -169,12 +165,14 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
|
||||||
Object object = this.d;
|
Object object = this.d;
|
||||||
|
|
||||||
synchronized (this.d) {
|
synchronized (this.d) {
|
||||||
@ -96,14 +96,14 @@ index 527ab42..33bb889 100644
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
- pendingchunktosave = (PendingChunkToSave) this.b.remove(0);
|
- chunkregionloader_pendingchunktosave = (ChunkRegionLoader.PendingChunkToSave) this.b.remove(0);
|
||||||
- this.c.remove(pendingchunktosave.a);
|
- this.c.remove(chunkregionloader_pendingchunktosave.a);
|
||||||
+ pendingchunktosave = this.pendingSaves.values().iterator().next();
|
+ chunkregionloader_pendingchunktosave = this.pendingSaves.values().iterator().next();
|
||||||
+ this.pendingSaves.remove(pendingchunktosave.a);
|
+ this.pendingSaves.remove(chunkregionloader_pendingchunktosave.a);
|
||||||
+ // Spigot end
|
+ // Spigot end
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pendingchunktosave != null) {
|
if (chunkregionloader_pendingchunktosave != null) {
|
||||||
--
|
--
|
||||||
2.1.0
|
2.1.0
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From 01d4432152e449698e95ac5ff2e98c5570fb239b Mon Sep 17 00:00:00 2001
|
From d715d750c402d8651a2df9457336ad821ba3085a Mon Sep 17 00:00:00 2001
|
||||||
From: md_5 <md_5@live.com.au>
|
From: md_5 <md_5@live.com.au>
|
||||||
Date: Sat, 23 Mar 2013 09:46:33 +1100
|
Date: Sat, 23 Mar 2013 09:46:33 +1100
|
||||||
Subject: [PATCH] Merge tweaks and configuration
|
Subject: [PATCH] Merge tweaks and configuration
|
||||||
@ -6,10 +6,10 @@ Subject: [PATCH] Merge tweaks and configuration
|
|||||||
This allows the merging of Experience orbs, as well as the configuration of the merge radius of items. Additionally it refactors the merge algorithm to be a better experience for players.
|
This allows the merging of Experience orbs, as well as the configuration of the merge radius of items. Additionally it refactors the merge algorithm to be a better experience for players.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java
|
diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java
|
||||||
index 21117cc..3f2c5f5 100644
|
index 1e575fe..fa7e6df 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityItem.java
|
--- a/src/main/java/net/minecraft/server/EntityItem.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityItem.java
|
+++ b/src/main/java/net/minecraft/server/EntityItem.java
|
||||||
@@ -122,7 +122,10 @@ public class EntityItem extends Entity {
|
@@ -123,7 +123,10 @@ public class EntityItem extends Entity {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void w() {
|
private void w() {
|
||||||
@ -21,7 +21,7 @@ index 21117cc..3f2c5f5 100644
|
|||||||
|
|
||||||
while (iterator.hasNext()) {
|
while (iterator.hasNext()) {
|
||||||
EntityItem entityitem = (EntityItem) iterator.next();
|
EntityItem entityitem = (EntityItem) iterator.next();
|
||||||
@@ -156,11 +159,13 @@ public class EntityItem extends Entity {
|
@@ -157,11 +160,13 @@ public class EntityItem extends Entity {
|
||||||
} else if (itemstack1.count + itemstack.count > itemstack1.getMaxStackSize()) {
|
} else if (itemstack1.count + itemstack.count > itemstack1.getMaxStackSize()) {
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
@ -41,10 +41,10 @@ index 21117cc..3f2c5f5 100644
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||||
index 6d8a5e8..30b5fed 100644
|
index bed457a..581224f 100644
|
||||||
--- a/src/main/java/net/minecraft/server/World.java
|
--- a/src/main/java/net/minecraft/server/World.java
|
||||||
+++ b/src/main/java/net/minecraft/server/World.java
|
+++ b/src/main/java/net/minecraft/server/World.java
|
||||||
@@ -923,6 +923,23 @@ public abstract class World implements IBlockAccess {
|
@@ -967,6 +967,23 @@ public abstract class World implements IBlockAccess {
|
||||||
// Not all projectiles extend EntityProjectile, so check for Bukkit interface instead
|
// Not all projectiles extend EntityProjectile, so check for Bukkit interface instead
|
||||||
event = CraftEventFactory.callProjectileLaunchEvent(entity);
|
event = CraftEventFactory.callProjectileLaunchEvent(entity);
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From ebf7df36d00536e84229a9a839b9325248bad306 Mon Sep 17 00:00:00 2001
|
From 96589be25d952b55e40a187d76180559f16c4e66 Mon Sep 17 00:00:00 2001
|
||||||
From: md_5 <git@md-5.net>
|
From: md_5 <git@md-5.net>
|
||||||
Date: Tue, 25 Mar 2014 16:10:01 +1100
|
Date: Tue, 25 Mar 2014 16:10:01 +1100
|
||||||
Subject: [PATCH] Async Operation Catching
|
Subject: [PATCH] Async Operation Catching
|
||||||
@ -6,10 +6,10 @@ Subject: [PATCH] Async Operation Catching
|
|||||||
Catch and throw an exception when a potentially unsafe operation occurs on a thread other than the main server thread.
|
Catch and throw an exception when a potentially unsafe operation occurs on a thread other than the main server thread.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java
|
diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java
|
||||||
index 12e2b79..9a19752 100644
|
index 6b02059..66e099f 100644
|
||||||
--- a/src/main/java/net/minecraft/server/Block.java
|
--- a/src/main/java/net/minecraft/server/Block.java
|
||||||
+++ b/src/main/java/net/minecraft/server/Block.java
|
+++ b/src/main/java/net/minecraft/server/Block.java
|
||||||
@@ -268,9 +268,13 @@ public class Block {
|
@@ -309,9 +309,13 @@ public class Block {
|
||||||
return 10;
|
return 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -26,10 +26,10 @@ index 12e2b79..9a19752 100644
|
|||||||
public int a(Random random) {
|
public int a(Random random) {
|
||||||
return 1;
|
return 1;
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||||
index e0bde4a..778bcd3 100644
|
index 9973ff7..256953f 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||||
@@ -565,6 +565,7 @@ public abstract class EntityLiving extends Entity {
|
@@ -570,6 +570,7 @@ public abstract class EntityLiving extends Entity {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addEffect(MobEffect mobeffect) {
|
public void addEffect(MobEffect mobeffect) {
|
||||||
@ -38,18 +38,18 @@ index e0bde4a..778bcd3 100644
|
|||||||
if (isTickingEffects) {
|
if (isTickingEffects) {
|
||||||
effectsToProcess.add(mobeffect);
|
effectsToProcess.add(mobeffect);
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityTracker.java b/src/main/java/net/minecraft/server/EntityTracker.java
|
diff --git a/src/main/java/net/minecraft/server/EntityTracker.java b/src/main/java/net/minecraft/server/EntityTracker.java
|
||||||
index c9058db..350f2f7 100644
|
index 1cc9c95..de38e80 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityTracker.java
|
--- a/src/main/java/net/minecraft/server/EntityTracker.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityTracker.java
|
+++ b/src/main/java/net/minecraft/server/EntityTracker.java
|
||||||
@@ -94,6 +94,7 @@ public class EntityTracker {
|
@@ -94,6 +94,7 @@ public class EntityTracker {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addEntity(Entity entity, int i, int j, boolean flag) {
|
public void addEntity(Entity entity, int i, final int j, boolean flag) {
|
||||||
+ org.spigotmc.AsyncCatcher.catchOp( "entity track"); // Spigot
|
+ org.spigotmc.AsyncCatcher.catchOp( "entity track"); // Spigot
|
||||||
if (i > this.e) {
|
if (i > this.e) {
|
||||||
i = this.e;
|
i = this.e;
|
||||||
}
|
}
|
||||||
@@ -129,6 +130,7 @@ public class EntityTracker {
|
@@ -144,6 +145,7 @@ public class EntityTracker {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void untrackEntity(Entity entity) {
|
public void untrackEntity(Entity entity) {
|
||||||
@ -58,10 +58,10 @@ index c9058db..350f2f7 100644
|
|||||||
EntityPlayer entityplayer = (EntityPlayer) entity;
|
EntityPlayer entityplayer = (EntityPlayer) entity;
|
||||||
Iterator iterator = this.c.iterator();
|
Iterator iterator = this.c.iterator();
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityTrackerEntry.java b/src/main/java/net/minecraft/server/EntityTrackerEntry.java
|
diff --git a/src/main/java/net/minecraft/server/EntityTrackerEntry.java b/src/main/java/net/minecraft/server/EntityTrackerEntry.java
|
||||||
index 1204c56..640d7ff 100644
|
index 5ef2be4..8d50e05 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityTrackerEntry.java
|
--- a/src/main/java/net/minecraft/server/EntityTrackerEntry.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityTrackerEntry.java
|
+++ b/src/main/java/net/minecraft/server/EntityTrackerEntry.java
|
||||||
@@ -308,6 +308,7 @@ public class EntityTrackerEntry {
|
@@ -310,6 +310,7 @@ public class EntityTrackerEntry {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updatePlayer(EntityPlayer entityplayer) {
|
public void updatePlayer(EntityPlayer entityplayer) {
|
||||||
@ -69,7 +69,7 @@ index 1204c56..640d7ff 100644
|
|||||||
if (entityplayer != this.tracker) {
|
if (entityplayer != this.tracker) {
|
||||||
if (this.c(entityplayer)) {
|
if (this.c(entityplayer)) {
|
||||||
if (!this.trackedPlayers.contains(entityplayer) && (this.e(entityplayer) || this.tracker.attachedToPlayer)) {
|
if (!this.trackedPlayers.contains(entityplayer) && (this.e(entityplayer) || this.tracker.attachedToPlayer)) {
|
||||||
@@ -538,6 +539,7 @@ public class EntityTrackerEntry {
|
@@ -540,6 +541,7 @@ public class EntityTrackerEntry {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void clear(EntityPlayer entityplayer) {
|
public void clear(EntityPlayer entityplayer) {
|
||||||
@ -78,10 +78,10 @@ index 1204c56..640d7ff 100644
|
|||||||
this.trackedPlayers.remove(entityplayer);
|
this.trackedPlayers.remove(entityplayer);
|
||||||
entityplayer.d(this.tracker);
|
entityplayer.d(this.tracker);
|
||||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||||
index 30b5fed..86be044 100644
|
index 581224f..a67736a 100644
|
||||||
--- a/src/main/java/net/minecraft/server/World.java
|
--- a/src/main/java/net/minecraft/server/World.java
|
||||||
+++ b/src/main/java/net/minecraft/server/World.java
|
+++ b/src/main/java/net/minecraft/server/World.java
|
||||||
@@ -893,6 +893,7 @@ public abstract class World implements IBlockAccess {
|
@@ -937,6 +937,7 @@ public abstract class World implements IBlockAccess {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean addEntity(Entity entity, SpawnReason spawnReason) { // Changed signature, added SpawnReason
|
public boolean addEntity(Entity entity, SpawnReason spawnReason) { // Changed signature, added SpawnReason
|
||||||
@ -89,7 +89,7 @@ index 30b5fed..86be044 100644
|
|||||||
if (entity == null) return false;
|
if (entity == null) return false;
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
int i = MathHelper.floor(entity.locX / 16.0D);
|
int i = MathHelper.floor(entity.locX / 16.0D);
|
||||||
@@ -1000,6 +1001,7 @@ public abstract class World implements IBlockAccess {
|
@@ -1044,6 +1045,7 @@ public abstract class World implements IBlockAccess {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void removeEntity(Entity entity) {
|
public void removeEntity(Entity entity) {
|
||||||
@ -97,16 +97,16 @@ index 30b5fed..86be044 100644
|
|||||||
entity.die();
|
entity.die();
|
||||||
if (entity instanceof EntityHuman) {
|
if (entity instanceof EntityHuman) {
|
||||||
this.players.remove(entity);
|
this.players.remove(entity);
|
||||||
@@ -2418,6 +2420,7 @@ public abstract class World implements IBlockAccess {
|
@@ -2474,6 +2476,7 @@ public abstract class World implements IBlockAccess {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void b(Collection collection) {
|
public void b(Collection<Entity> collection) {
|
||||||
+ org.spigotmc.AsyncCatcher.catchOp( "entity world add"); // Spigot
|
+ org.spigotmc.AsyncCatcher.catchOp( "entity world add"); // Spigot
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
// this.entityList.addAll(collection);
|
// this.entityList.addAll(collection);
|
||||||
Iterator iterator = collection.iterator();
|
Iterator iterator = collection.iterator();
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||||
index 5ef7d97..faefbe7 100644
|
index 20357f9..7b05b6a 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||||
@@ -165,6 +165,7 @@ public class CraftWorld implements World {
|
@@ -165,6 +165,7 @@ public class CraftWorld implements World {
|
||||||
@ -134,7 +134,7 @@ index 5ef7d97..faefbe7 100644
|
|||||||
if (generate) {
|
if (generate) {
|
||||||
// Use the default variant of loadChunk when generate == true.
|
// Use the default variant of loadChunk when generate == true.
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
index fed7b4d..9268686 100644
|
index 058141d..5dafb80 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
@@ -214,6 +214,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@@ -214,6 +214,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
@ -146,7 +146,7 @@ index fed7b4d..9268686 100644
|
|||||||
|
|
||||||
getHandle().playerConnection.disconnect(message == null ? "" : message);
|
getHandle().playerConnection.disconnect(message == null ? "" : message);
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardManager.java b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardManager.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardManager.java b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardManager.java
|
||||||
index 87259f1..295aed2 100644
|
index 197086e..fbea5db 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardManager.java
|
--- a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardManager.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardManager.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardManager.java
|
||||||
@@ -42,6 +42,7 @@ public final class CraftScoreboardManager implements ScoreboardManager {
|
@@ -42,6 +42,7 @@ public final class CraftScoreboardManager implements ScoreboardManager {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From 5837c58367bc1875f9bd8855ff5d0d96983427d0 Mon Sep 17 00:00:00 2001
|
From 379a48509beb86d658aad372cde149f162da4277 Mon Sep 17 00:00:00 2001
|
||||||
From: md_5 <md_5@live.com.au>
|
From: md_5 <md_5@live.com.au>
|
||||||
Date: Sat, 23 Mar 2013 09:52:41 +1100
|
Date: Sat, 23 Mar 2013 09:52:41 +1100
|
||||||
Subject: [PATCH] View Distance
|
Subject: [PATCH] View Distance
|
||||||
@ -6,23 +6,23 @@ Subject: [PATCH] View Distance
|
|||||||
This commit allows the user to select per world view distances, and view distances below 3. Be wary of the issues selecting a view distance of 1 or 2 may cause!
|
This commit allows the user to select per world view distances, and view distances below 3. Be wary of the issues selecting a view distance of 1 or 2 may cause!
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||||
index 8ac9387..5ca5935 100644
|
index 688d6f0..abb24c8 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||||
@@ -26,9 +26,9 @@ public class PlayerChunkMap {
|
@@ -28,9 +28,9 @@ public class PlayerChunkMap {
|
||||||
private final int[][] i = new int[][] { { 1, 0}, { 0, 1}, { -1, 0}, { 0, -1}};
|
private final int[][] i = new int[][] { { 1, 0}, { 0, 1}, { -1, 0}, { 0, -1}};
|
||||||
private boolean wasNotEmpty; // CraftBukkit - add field
|
private boolean wasNotEmpty; // CraftBukkit - add field
|
||||||
|
|
||||||
- public PlayerChunkMap(WorldServer worldserver) {
|
- public PlayerChunkMap(WorldServer worldserver) {
|
||||||
+ public PlayerChunkMap(WorldServer worldserver, int viewDistance /* Spigot */) {
|
+ public PlayerChunkMap(WorldServer worldserver, int viewDistance /* Spigot */) {
|
||||||
this.world = worldserver;
|
this.world = worldserver;
|
||||||
- this.a(worldserver.getMinecraftServer().getPlayerList().t());
|
- this.a(worldserver.getMinecraftServer().getPlayerList().s());
|
||||||
+ this.a(viewDistance); // Spigot
|
+ this.a(viewDistance); // Spigot
|
||||||
}
|
}
|
||||||
|
|
||||||
public WorldServer a() {
|
public WorldServer a() {
|
||||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||||
index b81b1ff..8a09a79 100644
|
index 383a491..a3c3c78 100644
|
||||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||||
@@ -60,7 +60,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
@@ -60,7 +60,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From e38f480ecc388d126b04fa163159f90ecc314e90 Mon Sep 17 00:00:00 2001
|
From 0db746ad5cbf69d3f04721e57e4371d9af9af713 Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Thu, 10 Jan 2013 00:18:11 -0500
|
Date: Thu, 10 Jan 2013 00:18:11 -0500
|
||||||
Subject: [PATCH] Spigot Timings
|
Subject: [PATCH] Spigot Timings
|
||||||
@ -6,10 +6,10 @@ Subject: [PATCH] Spigot Timings
|
|||||||
Overhauls the Timings System adding performance tracking all around the Minecraft Server
|
Overhauls the Timings System adding performance tracking all around the Minecraft Server
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||||
index bf48742..867caca 100644
|
index aade3f5..cfcd71e 100644
|
||||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||||
@@ -864,6 +864,7 @@ public class Chunk {
|
@@ -893,6 +893,7 @@ public class Chunk {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void loadNearby(IChunkProvider ichunkprovider, IChunkProvider ichunkprovider1, int i, int j) {
|
public void loadNearby(IChunkProvider ichunkprovider, IChunkProvider ichunkprovider1, int i, int j) {
|
||||||
@ -17,7 +17,7 @@ index bf48742..867caca 100644
|
|||||||
boolean flag = ichunkprovider.isChunkLoaded(i, j - 1);
|
boolean flag = ichunkprovider.isChunkLoaded(i, j - 1);
|
||||||
boolean flag1 = ichunkprovider.isChunkLoaded(i + 1, j);
|
boolean flag1 = ichunkprovider.isChunkLoaded(i + 1, j);
|
||||||
boolean flag2 = ichunkprovider.isChunkLoaded(i, j + 1);
|
boolean flag2 = ichunkprovider.isChunkLoaded(i, j + 1);
|
||||||
@@ -910,6 +911,7 @@ public class Chunk {
|
@@ -939,6 +940,7 @@ public class Chunk {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -26,10 +26,10 @@ index bf48742..867caca 100644
|
|||||||
|
|
||||||
public BlockPosition h(BlockPosition blockposition) {
|
public BlockPosition h(BlockPosition blockposition) {
|
||||||
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||||
index a363af7..9ee7e75 100644
|
index 5d75348..e7cdb4e 100644
|
||||||
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||||
@@ -130,6 +130,7 @@ public class ChunkProviderServer implements IChunkProvider {
|
@@ -132,6 +132,7 @@ public class ChunkProviderServer implements IChunkProvider {
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
if (chunk == null) {
|
if (chunk == null) {
|
||||||
@ -37,15 +37,15 @@ index a363af7..9ee7e75 100644
|
|||||||
chunk = this.loadChunk(i, j);
|
chunk = this.loadChunk(i, j);
|
||||||
if (chunk == null) {
|
if (chunk == null) {
|
||||||
if (this.chunkProvider == null) {
|
if (this.chunkProvider == null) {
|
||||||
@@ -181,6 +182,7 @@ public class ChunkProviderServer implements IChunkProvider {
|
@@ -182,6 +183,7 @@ public class ChunkProviderServer implements IChunkProvider {
|
||||||
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
chunk.loadNearby(this, this, i, j);
|
chunk.loadNearby(this, this, i, j);
|
||||||
+ world.timings.syncChunkLoadTimer.stopTiming(); // Spigot
|
+ world.timings.syncChunkLoadTimer.stopTiming(); // Spigot
|
||||||
}
|
}
|
||||||
|
|
||||||
return chunk;
|
return chunk;
|
||||||
@@ -215,7 +217,9 @@ public class ChunkProviderServer implements IChunkProvider {
|
@@ -216,7 +218,9 @@ public class ChunkProviderServer implements IChunkProvider {
|
||||||
if (chunk != null) {
|
if (chunk != null) {
|
||||||
chunk.setLastSaved(this.world.getTime());
|
chunk.setLastSaved(this.world.getTime());
|
||||||
if (this.chunkProvider != null) {
|
if (this.chunkProvider != null) {
|
||||||
@ -56,28 +56,29 @@ index a363af7..9ee7e75 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||||
index 33bb889..7caddb5 100644
|
index b7d09a9..5c0ab6c 100644
|
||||||
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||||
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||||
@@ -45,7 +45,9 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
|
@@ -46,7 +46,9 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
|
||||||
|
|
||||||
// CraftBukkit start - Add async variant, provide compatibility
|
// CraftBukkit start - Add async variant, provide compatibility
|
||||||
public Chunk a(World world, int i, int j) {
|
public Chunk a(World world, int i, int j) throws IOException {
|
||||||
+ world.timings.syncChunkLoadDataTimer.startTiming(); // Spigot
|
+ world.timings.syncChunkLoadDataTimer.startTiming(); // Spigot
|
||||||
Object[] data = loadChunk(world, i, j);
|
Object[] data = loadChunk(world, i, j);
|
||||||
+ world.timings.syncChunkLoadDataTimer.stopTiming(); // Spigot
|
+ world.timings.syncChunkLoadDataTimer.stopTiming(); // Spigot
|
||||||
if (data != null) {
|
if (data != null) {
|
||||||
Chunk chunk = (Chunk) data[0];
|
Chunk chunk = (Chunk) data[0];
|
||||||
NBTTagCompound nbttagcompound = (NBTTagCompound) data[1];
|
NBTTagCompound nbttagcompound = (NBTTagCompound) data[1];
|
||||||
@@ -400,6 +402,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
|
@@ -399,7 +401,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
|
||||||
|
|
||||||
public void loadEntities(Chunk chunk, NBTTagCompound nbttagcompound, World world) {
|
public void loadEntities(Chunk chunk, NBTTagCompound nbttagcompound, World world) {
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
-
|
||||||
+ world.timings.syncChunkLoadEntitiesTimer.startTiming(); // Spigot
|
+ world.timings.syncChunkLoadEntitiesTimer.startTiming(); // Spigot
|
||||||
NBTTagList nbttaglist1 = nbttagcompound.getList("Entities", 10);
|
NBTTagList nbttaglist1 = nbttagcompound.getList("Entities", 10);
|
||||||
|
|
||||||
if (nbttaglist1 != null) {
|
if (nbttaglist1 != null) {
|
||||||
@@ -425,7 +428,8 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
|
@@ -425,7 +427,8 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -87,7 +88,7 @@ index 33bb889..7caddb5 100644
|
|||||||
NBTTagList nbttaglist2 = nbttagcompound.getList("TileEntities", 10);
|
NBTTagList nbttaglist2 = nbttagcompound.getList("TileEntities", 10);
|
||||||
|
|
||||||
if (nbttaglist2 != null) {
|
if (nbttaglist2 != null) {
|
||||||
@@ -438,6 +442,8 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
|
@@ -438,6 +441,8 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -96,7 +97,7 @@ index 33bb889..7caddb5 100644
|
|||||||
|
|
||||||
if (nbttagcompound.hasKeyOfType("TileTicks", 9)) {
|
if (nbttagcompound.hasKeyOfType("TileTicks", 9)) {
|
||||||
NBTTagList nbttaglist3 = nbttagcompound.getList("TileTicks", 10);
|
NBTTagList nbttaglist3 = nbttagcompound.getList("TileTicks", 10);
|
||||||
@@ -457,6 +463,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
|
@@ -457,6 +462,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -105,26 +106,26 @@ index 33bb889..7caddb5 100644
|
|||||||
// return chunk; // CraftBukkit
|
// return chunk; // CraftBukkit
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
|
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||||
index 424b71d..390c6eb 100644
|
index 8bc6ad6..1e682e9 100644
|
||||||
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
|
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
|
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||||
@@ -18,6 +18,7 @@ import java.io.PrintStream;
|
@@ -20,6 +20,7 @@ import java.io.PrintStream;
|
||||||
import org.apache.logging.log4j.Level;
|
import org.apache.logging.log4j.Level;
|
||||||
|
|
||||||
import org.bukkit.craftbukkit.LoggerOutputStream;
|
import org.bukkit.craftbukkit.LoggerOutputStream;
|
||||||
+import org.bukkit.craftbukkit.SpigotTimings; // Spigot
|
+import org.bukkit.craftbukkit.SpigotTimings; // Spigot
|
||||||
import org.bukkit.event.server.ServerCommandEvent;
|
import org.bukkit.event.server.ServerCommandEvent;
|
||||||
// CraftBukkit end
|
import org.bukkit.craftbukkit.util.Waitable;
|
||||||
|
import org.bukkit.event.server.RemoteServerCommandEvent;
|
||||||
@@ -317,6 +318,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
|
@@ -369,6 +370,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
|
||||||
}
|
}
|
||||||
|
|
||||||
public void aM() {
|
public void aN() {
|
||||||
+ SpigotTimings.serverCommandTimer.startTiming(); // Spigot
|
+ SpigotTimings.serverCommandTimer.startTiming(); // Spigot
|
||||||
while (!this.k.isEmpty()) {
|
while (!this.l.isEmpty()) {
|
||||||
ServerCommand servercommand = (ServerCommand) this.k.remove(0);
|
ServerCommand servercommand = (ServerCommand) this.l.remove(0);
|
||||||
|
|
||||||
@@ -330,6 +332,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
|
@@ -382,6 +384,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -133,7 +134,7 @@ index 424b71d..390c6eb 100644
|
|||||||
|
|
||||||
public boolean ad() {
|
public boolean ad() {
|
||||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||||
index ccf6479..c699dd1 100644
|
index d004df3..d3c7d1b 100644
|
||||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||||
@@ -16,6 +16,7 @@ import org.bukkit.entity.Hanging;
|
@@ -16,6 +16,7 @@ import org.bukkit.entity.Hanging;
|
||||||
@ -144,7 +145,7 @@ index ccf6479..c699dd1 100644
|
|||||||
import org.bukkit.event.entity.EntityCombustByEntityEvent;
|
import org.bukkit.event.entity.EntityCombustByEntityEvent;
|
||||||
import org.bukkit.event.hanging.HangingBreakByEntityEvent;
|
import org.bukkit.event.hanging.HangingBreakByEntityEvent;
|
||||||
import org.bukkit.event.painting.PaintingBreakByEntityEvent;
|
import org.bukkit.event.painting.PaintingBreakByEntityEvent;
|
||||||
@@ -112,6 +113,8 @@ public abstract class Entity implements ICommandListener {
|
@@ -114,6 +115,8 @@ public abstract class Entity implements ICommandListener {
|
||||||
public boolean valid; // CraftBukkit
|
public boolean valid; // CraftBukkit
|
||||||
public org.bukkit.projectiles.ProjectileSource projectileSource; // CraftBukkit - For projectiles only
|
public org.bukkit.projectiles.ProjectileSource projectileSource; // CraftBukkit - For projectiles only
|
||||||
|
|
||||||
@ -153,16 +154,15 @@ index ccf6479..c699dd1 100644
|
|||||||
public int getId() {
|
public int getId() {
|
||||||
return this.id;
|
return this.id;
|
||||||
}
|
}
|
||||||
@@ -379,6 +382,8 @@ public abstract class Entity implements ICommandListener {
|
@@ -380,6 +383,7 @@ public abstract class Entity implements ICommandListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void move(double d0, double d1, double d2) {
|
public void move(double d0, double d1, double d2) {
|
||||||
+ org.bukkit.craftbukkit.SpigotTimings.entityMoveTimer.startTiming(); // Spigot
|
+ org.bukkit.craftbukkit.SpigotTimings.entityMoveTimer.startTiming(); // Spigot
|
||||||
+
|
if (this.noclip) {
|
||||||
if (this.T) {
|
|
||||||
this.a(this.getBoundingBox().c(d0, d1, d2));
|
this.a(this.getBoundingBox().c(d0, d1, d2));
|
||||||
this.recalcPosition();
|
this.recalcPosition();
|
||||||
@@ -715,6 +720,7 @@ public abstract class Entity implements ICommandListener {
|
@@ -716,6 +720,7 @@ public abstract class Entity implements ICommandListener {
|
||||||
|
|
||||||
this.world.methodProfiler.b();
|
this.world.methodProfiler.b();
|
||||||
}
|
}
|
||||||
@ -171,10 +171,10 @@ index ccf6479..c699dd1 100644
|
|||||||
|
|
||||||
private void recalcPosition() {
|
private void recalcPosition() {
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||||
index 778bcd3..cd56586 100644
|
index 256953f..24aaec5 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||||
@@ -21,6 +21,8 @@ import org.bukkit.event.entity.EntityRegainHealthEvent;
|
@@ -23,6 +23,8 @@ import org.bukkit.event.entity.EntityRegainHealthEvent;
|
||||||
import org.bukkit.event.vehicle.VehicleExitEvent;
|
import org.bukkit.event.vehicle.VehicleExitEvent;
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
@ -183,15 +183,15 @@ index 778bcd3..cd56586 100644
|
|||||||
public abstract class EntityLiving extends Entity {
|
public abstract class EntityLiving extends Entity {
|
||||||
|
|
||||||
private static final UUID a = UUID.fromString("662A6B8D-DA3E-4C1C-8813-96EA6097278D");
|
private static final UUID a = UUID.fromString("662A6B8D-DA3E-4C1C-8813-96EA6097278D");
|
||||||
@@ -1425,6 +1427,7 @@ public abstract class EntityLiving extends Entity {
|
@@ -1430,6 +1432,7 @@ public abstract class EntityLiving extends Entity {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void s_() {
|
public void t_() {
|
||||||
+ SpigotTimings.timerEntityBaseTick.startTiming(); // Spigot
|
+ SpigotTimings.timerEntityBaseTick.startTiming(); // Spigot
|
||||||
super.s_();
|
super.t_();
|
||||||
if (!this.world.isStatic) {
|
if (!this.world.isClientSide) {
|
||||||
int i = this.bu();
|
int i = this.bv();
|
||||||
@@ -1463,7 +1466,9 @@ public abstract class EntityLiving extends Entity {
|
@@ -1468,7 +1471,9 @@ public abstract class EntityLiving extends Entity {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -201,23 +201,23 @@ index 778bcd3..cd56586 100644
|
|||||||
double d0 = this.locX - this.lastX;
|
double d0 = this.locX - this.lastX;
|
||||||
double d1 = this.locZ - this.lastZ;
|
double d1 = this.locZ - this.lastZ;
|
||||||
float f = (float) (d0 * d0 + d1 * d1);
|
float f = (float) (d0 * d0 + d1 * d1);
|
||||||
@@ -1528,6 +1533,7 @@ public abstract class EntityLiving extends Entity {
|
@@ -1533,6 +1538,7 @@ public abstract class EntityLiving extends Entity {
|
||||||
|
|
||||||
this.world.methodProfiler.b();
|
this.world.methodProfiler.b();
|
||||||
this.aR += f2;
|
this.aT += f2;
|
||||||
+ SpigotTimings.timerEntityTickRest.stopTiming(); // Spigot
|
+ SpigotTimings.timerEntityTickRest.stopTiming(); // Spigot
|
||||||
}
|
}
|
||||||
|
|
||||||
protected float h(float f, float f1) {
|
protected float h(float f, float f1) {
|
||||||
@@ -1592,6 +1598,7 @@ public abstract class EntityLiving extends Entity {
|
@@ -1597,6 +1603,7 @@ public abstract class EntityLiving extends Entity {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.world.methodProfiler.a("ai");
|
this.world.methodProfiler.a("ai");
|
||||||
+ SpigotTimings.timerEntityAI.startTiming(); // Spigot
|
+ SpigotTimings.timerEntityAI.startTiming(); // Spigot
|
||||||
if (this.bC()) {
|
if (this.bD()) {
|
||||||
this.aW = false;
|
this.aY = false;
|
||||||
this.aX = 0.0F;
|
this.aZ = 0.0F;
|
||||||
@@ -1602,6 +1609,7 @@ public abstract class EntityLiving extends Entity {
|
@@ -1607,6 +1614,7 @@ public abstract class EntityLiving extends Entity {
|
||||||
this.doTick();
|
this.doTick();
|
||||||
this.world.methodProfiler.b();
|
this.world.methodProfiler.b();
|
||||||
}
|
}
|
||||||
@ -225,27 +225,27 @@ index 778bcd3..cd56586 100644
|
|||||||
|
|
||||||
this.world.methodProfiler.b();
|
this.world.methodProfiler.b();
|
||||||
this.world.methodProfiler.a("jump");
|
this.world.methodProfiler.a("jump");
|
||||||
@@ -1623,11 +1631,15 @@ public abstract class EntityLiving extends Entity {
|
@@ -1628,11 +1636,15 @@ public abstract class EntityLiving extends Entity {
|
||||||
this.aX *= 0.98F;
|
this.aZ *= 0.98F;
|
||||||
this.aY *= 0.98F;
|
this.ba *= 0.98F;
|
||||||
this.aZ *= 0.9F;
|
this.bb *= 0.9F;
|
||||||
+ SpigotTimings.timerEntityAIMove.startTiming(); // Spigot
|
+ SpigotTimings.timerEntityAIMove.startTiming(); // Spigot
|
||||||
this.g(this.aX, this.aY);
|
this.g(this.aZ, this.ba);
|
||||||
+ SpigotTimings.timerEntityAIMove.stopTiming(); // Spigot
|
+ SpigotTimings.timerEntityAIMove.stopTiming(); // Spigot
|
||||||
this.world.methodProfiler.b();
|
this.world.methodProfiler.b();
|
||||||
this.world.methodProfiler.a("push");
|
this.world.methodProfiler.a("push");
|
||||||
if (!this.world.isStatic) {
|
if (!this.world.isClientSide) {
|
||||||
+ SpigotTimings.timerEntityAICollision.startTiming(); // Spigot
|
+ SpigotTimings.timerEntityAICollision.startTiming(); // Spigot
|
||||||
this.bK();
|
this.bL();
|
||||||
+ SpigotTimings.timerEntityAICollision.stopTiming(); // Spigot
|
+ SpigotTimings.timerEntityAICollision.stopTiming(); // Spigot
|
||||||
}
|
}
|
||||||
|
|
||||||
this.world.methodProfiler.b();
|
this.world.methodProfiler.b();
|
||||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
index 0a707eb..76591fb 100644
|
index 486e652..61abf67 100644
|
||||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
@@ -45,6 +45,7 @@ import joptsimple.OptionSet;
|
@@ -46,6 +46,7 @@ import joptsimple.OptionSet;
|
||||||
|
|
||||||
import org.bukkit.craftbukkit.Main;
|
import org.bukkit.craftbukkit.Main;
|
||||||
import org.bukkit.World.Environment;
|
import org.bukkit.World.Environment;
|
||||||
@ -253,15 +253,15 @@ index 0a707eb..76591fb 100644
|
|||||||
import org.bukkit.craftbukkit.util.Waitable;
|
import org.bukkit.craftbukkit.util.Waitable;
|
||||||
import org.bukkit.event.server.RemoteServerCommandEvent;
|
import org.bukkit.event.server.RemoteServerCommandEvent;
|
||||||
import org.bukkit.event.world.WorldSaveEvent;
|
import org.bukkit.event.world.WorldSaveEvent;
|
||||||
@@ -596,6 +597,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs
|
@@ -617,6 +618,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
|
||||||
protected void x() {}
|
protected void y() {}
|
||||||
|
|
||||||
protected void y() throws ExceptionWorldConflict { // CraftBukkit - added throws
|
protected void z() throws ExceptionWorldConflict { // CraftBukkit - added throws
|
||||||
+ SpigotTimings.serverTickTimer.startTiming(); // Spigot
|
+ SpigotTimings.serverTickTimer.startTiming(); // Spigot
|
||||||
long i = System.nanoTime();
|
long i = System.nanoTime();
|
||||||
|
|
||||||
++this.ticks;
|
++this.ticks;
|
||||||
@@ -622,10 +624,12 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs
|
@@ -643,10 +645,12 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
|
||||||
}
|
}
|
||||||
|
|
||||||
if (autosavePeriod > 0 && this.ticks % autosavePeriod == 0) { // CraftBukkit
|
if (autosavePeriod > 0 && this.ticks % autosavePeriod == 0) { // CraftBukkit
|
||||||
@ -274,7 +274,7 @@ index 0a707eb..76591fb 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.methodProfiler.a("tallying");
|
this.methodProfiler.a("tallying");
|
||||||
@@ -642,6 +646,8 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs
|
@@ -663,6 +667,8 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
|
||||||
|
|
||||||
this.methodProfiler.b();
|
this.methodProfiler.b();
|
||||||
this.methodProfiler.b();
|
this.methodProfiler.b();
|
||||||
@ -282,8 +282,8 @@ index 0a707eb..76591fb 100644
|
|||||||
+ org.spigotmc.CustomTimingsHandler.tick(); // Spigot
|
+ org.spigotmc.CustomTimingsHandler.tick(); // Spigot
|
||||||
}
|
}
|
||||||
|
|
||||||
public void z() {
|
public void A() {
|
||||||
@@ -664,16 +670,23 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs
|
@@ -677,16 +683,23 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
|
||||||
|
|
||||||
this.methodProfiler.c("levels");
|
this.methodProfiler.c("levels");
|
||||||
|
|
||||||
@ -307,7 +307,7 @@ index 0a707eb..76591fb 100644
|
|||||||
// Send time updates to everyone, it will get the right time from the world the player is in.
|
// Send time updates to everyone, it will get the right time from the world the player is in.
|
||||||
if (this.ticks % 20 == 0) {
|
if (this.ticks % 20 == 0) {
|
||||||
for (int i = 0; i < this.getPlayerList().players.size(); ++i) {
|
for (int i = 0; i < this.getPlayerList().players.size(); ++i) {
|
||||||
@@ -681,6 +694,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs
|
@@ -694,6 +707,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
|
||||||
entityplayer.playerConnection.sendPacket(new PacketPlayOutUpdateTime(entityplayer.world.getTime(), entityplayer.getPlayerTime(), entityplayer.world.getGameRules().getBoolean("doDaylightCycle"))); // Add support for per player time
|
entityplayer.playerConnection.sendPacket(new PacketPlayOutUpdateTime(entityplayer.world.getTime(), entityplayer.getPlayerTime(), entityplayer.world.getGameRules().getBoolean("doDaylightCycle"))); // Add support for per player time
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -315,27 +315,27 @@ index 0a707eb..76591fb 100644
|
|||||||
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
@@ -704,7 +718,9 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs
|
@@ -717,7 +731,9 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
|
||||||
CrashReport crashreport;
|
CrashReport crashreport;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
+ worldserver.timings.doTick.startTiming(); // Spigot
|
+ worldserver.timings.doTick.startTiming(); // Spigot
|
||||||
worldserver.doTick();
|
worldserver.doTick();
|
||||||
+ worldserver.timings.doTick.stopTiming(); // Spigot
|
+ worldserver.timings.doTick.stopTiming(); // Spigot
|
||||||
} catch (Throwable throwable1) {
|
} catch (Throwable throwable) {
|
||||||
crashreport = CrashReport.a(throwable1, "Exception ticking world");
|
crashreport = CrashReport.a(throwable, "Exception ticking world");
|
||||||
worldserver.a(crashreport);
|
worldserver.a(crashreport);
|
||||||
@@ -712,7 +728,9 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs
|
@@ -725,7 +741,9 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
+ worldserver.timings.tickEntities.startTiming(); // Spigot
|
+ worldserver.timings.tickEntities.startTiming(); // Spigot
|
||||||
worldserver.tickEntities();
|
worldserver.tickEntities();
|
||||||
+ worldserver.timings.tickEntities.stopTiming(); // Spigot
|
+ worldserver.timings.tickEntities.stopTiming(); // Spigot
|
||||||
} catch (Throwable throwable2) {
|
} catch (Throwable throwable1) {
|
||||||
crashreport = CrashReport.a(throwable2, "Exception ticking world entities");
|
crashreport = CrashReport.a(throwable1, "Exception ticking world entities");
|
||||||
worldserver.a(crashreport);
|
worldserver.a(crashreport);
|
||||||
@@ -721,7 +739,9 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs
|
@@ -734,7 +752,9 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
|
||||||
|
|
||||||
this.methodProfiler.b();
|
this.methodProfiler.b();
|
||||||
this.methodProfiler.a("tracker");
|
this.methodProfiler.a("tracker");
|
||||||
@ -345,12 +345,12 @@ index 0a707eb..76591fb 100644
|
|||||||
this.methodProfiler.b();
|
this.methodProfiler.b();
|
||||||
this.methodProfiler.b();
|
this.methodProfiler.b();
|
||||||
// } // CraftBukkit
|
// } // CraftBukkit
|
||||||
@@ -730,14 +750,20 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs
|
@@ -743,14 +763,20 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
|
||||||
}
|
}
|
||||||
|
|
||||||
this.methodProfiler.c("connection");
|
this.methodProfiler.c("connection");
|
||||||
+ SpigotTimings.connectionTimer.startTiming(); // Spigot
|
+ SpigotTimings.connectionTimer.startTiming(); // Spigot
|
||||||
this.ao().c();
|
this.ap().c();
|
||||||
+ SpigotTimings.connectionTimer.stopTiming(); // Spigot
|
+ SpigotTimings.connectionTimer.stopTiming(); // Spigot
|
||||||
this.methodProfiler.c("players");
|
this.methodProfiler.c("players");
|
||||||
+ SpigotTimings.playerListTimer.startTiming(); // Spigot
|
+ SpigotTimings.playerListTimer.startTiming(); // Spigot
|
||||||
@ -359,27 +359,26 @@ index 0a707eb..76591fb 100644
|
|||||||
this.methodProfiler.c("tickables");
|
this.methodProfiler.c("tickables");
|
||||||
|
|
||||||
+ SpigotTimings.tickablesTimer.startTiming(); // Spigot
|
+ SpigotTimings.tickablesTimer.startTiming(); // Spigot
|
||||||
for (i = 0; i < this.o.size(); ++i) {
|
for (i = 0; i < this.p.size(); ++i) {
|
||||||
((IUpdatePlayerListBox) this.o.get(i)).c();
|
((IUpdatePlayerListBox) this.p.get(i)).c();
|
||||||
}
|
}
|
||||||
+ SpigotTimings.tickablesTimer.stopTiming(); // Spigot
|
+ SpigotTimings.tickablesTimer.stopTiming(); // Spigot
|
||||||
|
|
||||||
this.methodProfiler.b();
|
this.methodProfiler.b();
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||||
index 8d669a4..5c24333 100644
|
index 6649c0b..20e09e5 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||||
@@ -1042,6 +1042,8 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
|
@@ -1061,6 +1061,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
private void handleCommand(String s) {
|
private void handleCommand(String s) {
|
||||||
+ org.bukkit.craftbukkit.SpigotTimings.playerCommandTimer.startTiming(); // Spigot
|
+ org.bukkit.craftbukkit.SpigotTimings.playerCommandTimer.startTiming(); // Spigot
|
||||||
+
|
|
||||||
// CraftBukkit start - whole method
|
// CraftBukkit start - whole method
|
||||||
this.c.info(this.player.getName() + " issued server command: " + s);
|
this.c.info(this.player.getName() + " issued server command: " + s);
|
||||||
|
|
||||||
@@ -1051,18 +1053,22 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
|
@@ -1070,18 +1071,22 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
|
||||||
this.server.getPluginManager().callEvent(event);
|
this.server.getPluginManager().callEvent(event);
|
||||||
|
|
||||||
if (event.isCancelled()) {
|
if (event.isCancelled()) {
|
||||||
@ -403,7 +402,7 @@ index 8d669a4..5c24333 100644
|
|||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
|
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
|
||||||
index ec76148..a93ad27 100644
|
index 8afd376..71bf63a 100644
|
||||||
--- a/src/main/java/net/minecraft/server/TileEntity.java
|
--- a/src/main/java/net/minecraft/server/TileEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/server/TileEntity.java
|
+++ b/src/main/java/net/minecraft/server/TileEntity.java
|
||||||
@@ -6,10 +6,12 @@ import java.util.concurrent.Callable;
|
@@ -6,10 +6,12 @@ import java.util.concurrent.Callable;
|
||||||
@ -417,10 +416,10 @@ index ec76148..a93ad27 100644
|
|||||||
|
|
||||||
+ public CustomTimingsHandler tickTimer = org.bukkit.craftbukkit.SpigotTimings.getTileEntityTimings(this); // Spigot
|
+ public CustomTimingsHandler tickTimer = org.bukkit.craftbukkit.SpigotTimings.getTileEntityTimings(this); // Spigot
|
||||||
private static final Logger a = LogManager.getLogger();
|
private static final Logger a = LogManager.getLogger();
|
||||||
private static Map f = Maps.newHashMap();
|
private static Map<String, Class<? extends TileEntity>> f = Maps.newHashMap();
|
||||||
private static Map g = Maps.newHashMap();
|
private static Map<Class<? extends TileEntity>, String> g = Maps.newHashMap();
|
||||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||||
index 86be044..06bd661 100644
|
index a67736a..bf4c758 100644
|
||||||
--- a/src/main/java/net/minecraft/server/World.java
|
--- a/src/main/java/net/minecraft/server/World.java
|
||||||
+++ b/src/main/java/net/minecraft/server/World.java
|
+++ b/src/main/java/net/minecraft/server/World.java
|
||||||
@@ -18,6 +18,7 @@ import org.bukkit.Bukkit;
|
@@ -18,6 +18,7 @@ import org.bukkit.Bukkit;
|
||||||
@ -431,7 +430,7 @@ index 86be044..06bd661 100644
|
|||||||
import org.bukkit.generator.ChunkGenerator;
|
import org.bukkit.generator.ChunkGenerator;
|
||||||
import org.bukkit.craftbukkit.CraftServer;
|
import org.bukkit.craftbukkit.CraftServer;
|
||||||
import org.bukkit.craftbukkit.CraftWorld;
|
import org.bukkit.craftbukkit.CraftWorld;
|
||||||
@@ -125,6 +126,8 @@ public abstract class World implements IBlockAccess {
|
@@ -126,6 +127,8 @@ public abstract class World implements IBlockAccess {
|
||||||
|
|
||||||
public final org.spigotmc.SpigotWorldConfig spigotConfig; // Spigot
|
public final org.spigotmc.SpigotWorldConfig spigotConfig; // Spigot
|
||||||
|
|
||||||
@ -440,15 +439,15 @@ index 86be044..06bd661 100644
|
|||||||
public CraftWorld getWorld() {
|
public CraftWorld getWorld() {
|
||||||
return this.world;
|
return this.world;
|
||||||
}
|
}
|
||||||
@@ -164,6 +167,7 @@ public abstract class World implements IBlockAccess {
|
@@ -190,6 +193,7 @@ public abstract class World implements IBlockAccess {
|
||||||
this.M.a(new WorldBorderListener(((WorldServer) this).getServer().getHandle())); // CraftBukkit
|
});
|
||||||
|
this.getServer().addWorld(this.world);
|
||||||
this.getServer().addWorld(this.world); // CraftBukkit
|
// CraftBukkit end
|
||||||
+ timings = new SpigotTimings.WorldTimingsHandler(this); // Spigot - code below can generate new world and access timings
|
+ timings = new SpigotTimings.WorldTimingsHandler(this); // Spigot - code below can generate new world and access timings
|
||||||
}
|
}
|
||||||
|
|
||||||
public World b() {
|
public World b() {
|
||||||
@@ -1254,6 +1258,7 @@ public abstract class World implements IBlockAccess {
|
@@ -1299,6 +1303,7 @@ public abstract class World implements IBlockAccess {
|
||||||
this.g.clear();
|
this.g.clear();
|
||||||
this.methodProfiler.c("regular");
|
this.methodProfiler.c("regular");
|
||||||
|
|
||||||
@ -456,7 +455,7 @@ index 86be044..06bd661 100644
|
|||||||
// CraftBukkit start - Use field for loop variable
|
// CraftBukkit start - Use field for loop variable
|
||||||
for (this.tickPosition = 0; this.tickPosition < this.entityList.size(); ++this.tickPosition) {
|
for (this.tickPosition = 0; this.tickPosition < this.entityList.size(); ++this.tickPosition) {
|
||||||
entity = (Entity) this.entityList.get(this.tickPosition);
|
entity = (Entity) this.entityList.get(this.tickPosition);
|
||||||
@@ -1270,7 +1275,9 @@ public abstract class World implements IBlockAccess {
|
@@ -1315,7 +1320,9 @@ public abstract class World implements IBlockAccess {
|
||||||
this.methodProfiler.a("tick");
|
this.methodProfiler.a("tick");
|
||||||
if (!entity.dead) {
|
if (!entity.dead) {
|
||||||
try {
|
try {
|
||||||
@ -466,25 +465,25 @@ index 86be044..06bd661 100644
|
|||||||
} catch (Throwable throwable1) {
|
} catch (Throwable throwable1) {
|
||||||
crashreport = CrashReport.a(throwable1, "Ticking entity");
|
crashreport = CrashReport.a(throwable1, "Ticking entity");
|
||||||
crashreportsystemdetails = crashreport.a("Entity being ticked");
|
crashreportsystemdetails = crashreport.a("Entity being ticked");
|
||||||
@@ -1295,7 +1302,9 @@ public abstract class World implements IBlockAccess {
|
@@ -1340,7 +1347,9 @@ public abstract class World implements IBlockAccess {
|
||||||
this.methodProfiler.b();
|
this.methodProfiler.b();
|
||||||
}
|
}
|
||||||
|
|
||||||
+ timings.entityTick.stopTiming(); // Spigot
|
+ timings.entityTick.stopTiming(); // Spigot
|
||||||
this.methodProfiler.c("blockEntities");
|
this.methodProfiler.c("blockEntities");
|
||||||
+ timings.tileEntityTick.startTiming(); // Spigot
|
+ timings.tileEntityTick.startTiming(); // Spigot
|
||||||
this.L = true;
|
this.M = true;
|
||||||
// CraftBukkit start - From below, clean up tile entities before ticking them
|
// CraftBukkit start - From below, clean up tile entities before ticking them
|
||||||
if (!this.b.isEmpty()) {
|
if (!this.c.isEmpty()) {
|
||||||
@@ -1315,6 +1324,7 @@ public abstract class World implements IBlockAccess {
|
@@ -1359,6 +1368,7 @@ public abstract class World implements IBlockAccess {
|
||||||
|
|
||||||
if (this.isLoaded(blockposition) && this.M.a(blockposition)) {
|
if (this.isLoaded(blockposition) && this.N.a(blockposition)) {
|
||||||
try {
|
try {
|
||||||
+ tileentity.tickTimer.startTiming(); // Spigot
|
+ tileentity.tickTimer.startTiming(); // Spigot
|
||||||
((IUpdatePlayerListBox) tileentity).c();
|
((IUpdatePlayerListBox) tileentity).c();
|
||||||
} catch (Throwable throwable2) {
|
} catch (Throwable throwable2) {
|
||||||
CrashReport crashreport1 = CrashReport.a(throwable2, "Ticking block entity");
|
CrashReport crashreport1 = CrashReport.a(throwable2, "Ticking block entity");
|
||||||
@@ -1323,6 +1333,11 @@ public abstract class World implements IBlockAccess {
|
@@ -1367,6 +1377,11 @@ public abstract class World implements IBlockAccess {
|
||||||
tileentity.a(crashreportsystemdetails1);
|
tileentity.a(crashreportsystemdetails1);
|
||||||
throw new ReportedException(crashreport1);
|
throw new ReportedException(crashreport1);
|
||||||
}
|
}
|
||||||
@ -496,24 +495,24 @@ index 86be044..06bd661 100644
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1335,6 +1350,8 @@ public abstract class World implements IBlockAccess {
|
@@ -1379,6 +1394,8 @@ public abstract class World implements IBlockAccess {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
+ timings.tileEntityTick.stopTiming(); // Spigot
|
+ timings.tileEntityTick.stopTiming(); // Spigot
|
||||||
+ timings.tileEntityPending.startTiming(); // Spigot
|
+ timings.tileEntityPending.startTiming(); // Spigot
|
||||||
this.L = false;
|
this.M = false;
|
||||||
/* CraftBukkit start - Moved up
|
/* CraftBukkit start - Moved up
|
||||||
if (!this.b.isEmpty()) {
|
if (!this.c.isEmpty()) {
|
||||||
@@ -1367,6 +1384,7 @@ public abstract class World implements IBlockAccess {
|
@@ -1411,6 +1428,7 @@ public abstract class World implements IBlockAccess {
|
||||||
this.a.clear();
|
this.b.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
+ timings.tileEntityPending.stopTiming(); // Spigot
|
+ timings.tileEntityPending.stopTiming(); // Spigot
|
||||||
this.methodProfiler.b();
|
this.methodProfiler.b();
|
||||||
this.methodProfiler.b();
|
this.methodProfiler.b();
|
||||||
}
|
}
|
||||||
@@ -1411,6 +1429,7 @@ public abstract class World implements IBlockAccess {
|
@@ -1455,6 +1473,7 @@ public abstract class World implements IBlockAccess {
|
||||||
// CraftBukkit start - Use neighbor cache instead of looking up
|
// CraftBukkit start - Use neighbor cache instead of looking up
|
||||||
Chunk startingChunk = this.getChunkIfLoaded(i >> 4, j >> 4);
|
Chunk startingChunk = this.getChunkIfLoaded(i >> 4, j >> 4);
|
||||||
if (!flag || (startingChunk != null && startingChunk.areNeighborsLoaded(2)) /* this.isAreaLoaded(i - b0, 0, j - b0, i + b0, 0, j + b0) */) {
|
if (!flag || (startingChunk != null && startingChunk.areNeighborsLoaded(2)) /* this.isAreaLoaded(i - b0, 0, j - b0, i + b0, 0, j + b0) */) {
|
||||||
@ -521,7 +520,7 @@ index 86be044..06bd661 100644
|
|||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
entity.P = entity.locX;
|
entity.P = entity.locX;
|
||||||
entity.Q = entity.locY;
|
entity.Q = entity.locY;
|
||||||
@@ -1474,6 +1493,7 @@ public abstract class World implements IBlockAccess {
|
@@ -1518,6 +1537,7 @@ public abstract class World implements IBlockAccess {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -530,10 +529,10 @@ index 86be044..06bd661 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||||
index 8a09a79..1d6be5f 100644
|
index a3c3c78..6ed7078 100644
|
||||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||||
@@ -210,10 +210,13 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
@@ -209,10 +209,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
|
// CraftBukkit start - Only call spawner if we have players online and the world allows for mobs or animals
|
||||||
long time = this.worldData.getTime();
|
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)) {
|
if (this.getGameRules().getBoolean("doMobSpawning") && this.worldData.getType() != WorldType.DEBUG_ALL_BLOCK_STATES && (this.allowMonsters || this.allowAnimals) && (this instanceof WorldServer && this.players.size() > 0)) {
|
||||||
@ -548,7 +547,7 @@ index 8a09a79..1d6be5f 100644
|
|||||||
this.methodProfiler.c("chunkSource");
|
this.methodProfiler.c("chunkSource");
|
||||||
this.chunkProvider.unloadChunks();
|
this.chunkProvider.unloadChunks();
|
||||||
int j = this.a(1.0F);
|
int j = this.a(1.0F);
|
||||||
@@ -227,21 +230,34 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
@@ -226,21 +229,34 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||||
this.worldData.setDayTime(this.worldData.getDayTime() + 1L);
|
this.worldData.setDayTime(this.worldData.getDayTime() + 1L);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -582,12 +581,12 @@ index 8a09a79..1d6be5f 100644
|
|||||||
+ timings.doChunkGC.stopTiming(); // Spigot
|
+ timings.doChunkGC.stopTiming(); // Spigot
|
||||||
}
|
}
|
||||||
|
|
||||||
public BiomeMeta a(EnumCreatureType enumcreaturetype, BlockPosition blockposition) {
|
public BiomeBase.BiomeMeta a(EnumCreatureType enumcreaturetype, BlockPosition blockposition) {
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
index 09c723f..07f15d1 100644
|
index 2aceeb4..ed0c30c 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
@@ -1638,6 +1638,11 @@ public final class CraftServer implements Server {
|
@@ -1652,6 +1652,11 @@ public final class CraftServer implements Server {
|
||||||
private final Spigot spigot = new Spigot()
|
private final Spigot spigot = new Spigot()
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -600,7 +599,7 @@ index 09c723f..07f15d1 100644
|
|||||||
|
|
||||||
public Spigot spigot()
|
public Spigot spigot()
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||||
index faefbe7..8105872 100644
|
index 7b05b6a..609b483 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||||
@@ -255,9 +255,11 @@ public class CraftWorld implements World {
|
@@ -255,9 +255,11 @@ public class CraftWorld implements World {
|
||||||
@ -792,10 +791,10 @@ index 0000000..558574f
|
|||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java b/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java b/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java
|
||||||
index 26ea0d3..7fabfa3 100644
|
index 5b56898..5f58a59 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java
|
--- a/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java
|
||||||
@@ -40,7 +40,9 @@ class ChunkIOProvider implements AsynchronousExecutor.CallBackProvider<QueuedChu
|
@@ -47,7 +47,9 @@ class ChunkIOProvider implements AsynchronousExecutor.CallBackProvider<QueuedChu
|
||||||
chunk.addEntities();
|
chunk.addEntities();
|
||||||
|
|
||||||
if (queuedChunk.provider.chunkProvider != null) {
|
if (queuedChunk.provider.chunkProvider != null) {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From de4e58e3a910e9704c09042f4863344f8bbe6a4d Mon Sep 17 00:00:00 2001
|
From 5bf8504ba7b121589bb1244e4d1bc77eea87e938 Mon Sep 17 00:00:00 2001
|
||||||
From: md_5 <md_5@live.com.au>
|
From: md_5 <md_5@live.com.au>
|
||||||
Date: Fri, 21 Jun 2013 17:29:54 +1000
|
Date: Fri, 21 Jun 2013 17:29:54 +1000
|
||||||
Subject: [PATCH] Fix Mob Spawning Relative to View Distance
|
Subject: [PATCH] Fix Mob Spawning Relative to View Distance
|
||||||
@ -8,18 +8,18 @@ Changes the mob spawning algorithm to properly account for view distance and the
|
|||||||
Needs better documentation.
|
Needs better documentation.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||||
index 867caca..9e65ff7 100644
|
index cfcd71e..92b25f0 100644
|
||||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||||
@@ -42,6 +42,7 @@ public class Chunk {
|
@@ -42,6 +42,7 @@ public class Chunk {
|
||||||
private long u;
|
private long u;
|
||||||
private int v;
|
private int v;
|
||||||
private ConcurrentLinkedQueue w;
|
private ConcurrentLinkedQueue<BlockPosition> w;
|
||||||
+ protected gnu.trove.map.hash.TObjectIntHashMap<Class> entityCount = new gnu.trove.map.hash.TObjectIntHashMap<Class>(); // Spigot
|
+ protected gnu.trove.map.hash.TObjectIntHashMap<Class> entityCount = new gnu.trove.map.hash.TObjectIntHashMap<Class>(); // Spigot
|
||||||
|
|
||||||
// CraftBukkit start - Neighbor loaded cache for chunk lighting and entity ticking
|
// CraftBukkit start - Neighbor loaded cache for chunk lighting and entity ticking
|
||||||
private int neighbors = 0x1 << 12;
|
private int neighbors = 0x1 << 12;
|
||||||
@@ -650,6 +651,22 @@ public class Chunk {
|
@@ -674,6 +675,22 @@ public class Chunk {
|
||||||
entity.af = k;
|
entity.af = k;
|
||||||
entity.ag = this.locZ;
|
entity.ag = this.locZ;
|
||||||
this.entitySlices[k].add(entity);
|
this.entitySlices[k].add(entity);
|
||||||
@ -42,7 +42,7 @@ index 867caca..9e65ff7 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void b(Entity entity) {
|
public void b(Entity entity) {
|
||||||
@@ -666,6 +683,22 @@ public class Chunk {
|
@@ -690,6 +707,22 @@ public class Chunk {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.entitySlices[i].remove(entity);
|
this.entitySlices[i].remove(entity);
|
||||||
@ -66,7 +66,7 @@ index 867caca..9e65ff7 100644
|
|||||||
|
|
||||||
public boolean d(BlockPosition blockposition) {
|
public boolean d(BlockPosition blockposition) {
|
||||||
diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java
|
diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java
|
||||||
index 25988d4..43954b3 100644
|
index 1b9af34..aeb0a44 100644
|
||||||
--- a/src/main/java/net/minecraft/server/SpawnerCreature.java
|
--- a/src/main/java/net/minecraft/server/SpawnerCreature.java
|
||||||
+++ b/src/main/java/net/minecraft/server/SpawnerCreature.java
|
+++ b/src/main/java/net/minecraft/server/SpawnerCreature.java
|
||||||
@@ -19,6 +19,25 @@ public final class SpawnerCreature {
|
@@ -19,6 +19,25 @@ public final class SpawnerCreature {
|
||||||
@ -107,7 +107,7 @@ index 25988d4..43954b3 100644
|
|||||||
|
|
||||||
for (int i1 = -b0; i1 <= b0; ++i1) {
|
for (int i1 = -b0; i1 <= b0; ++i1) {
|
||||||
for (k = -b0; k <= b0; ++k) {
|
for (k = -b0; k <= b0; ++k) {
|
||||||
@@ -88,17 +112,19 @@ public final class SpawnerCreature {
|
@@ -87,17 +111,19 @@ public final class SpawnerCreature {
|
||||||
if (limit == 0) {
|
if (limit == 0) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -140,7 +140,7 @@ index 25988d4..43954b3 100644
|
|||||||
+ continue label115;
|
+ continue label115;
|
||||||
+ }
|
+ }
|
||||||
+ // Spigot end
|
+ // Spigot end
|
||||||
if (l2 >= entityinsentient.bU()) {
|
if (l2 >= entityinsentient.bV()) {
|
||||||
continue label115;
|
continue label115;
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
From de6f762085ae230640f23c628f61fb90cc50c95f Mon Sep 17 00:00:00 2001
|
From e05b61bd35a73364115bba2cf092b4a168a85dcc Mon Sep 17 00:00:00 2001
|
||||||
From: md_5 <md_5@live.com.au>
|
From: md_5 <md_5@live.com.au>
|
||||||
Date: Sun, 3 Feb 2013 09:20:19 +1100
|
Date: Sun, 3 Feb 2013 09:20:19 +1100
|
||||||
Subject: [PATCH] Handle Null Tile Entities
|
Subject: [PATCH] Handle Null Tile Entities
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||||
index 06bd661..b6a509c 100644
|
index bf4c758..c78c2d8 100644
|
||||||
--- a/src/main/java/net/minecraft/server/World.java
|
--- a/src/main/java/net/minecraft/server/World.java
|
||||||
+++ b/src/main/java/net/minecraft/server/World.java
|
+++ b/src/main/java/net/minecraft/server/World.java
|
||||||
@@ -1318,6 +1318,13 @@ public abstract class World implements IBlockAccess {
|
@@ -1362,6 +1362,13 @@ public abstract class World implements IBlockAccess {
|
||||||
|
|
||||||
while (iterator.hasNext()) {
|
while (iterator.hasNext()) {
|
||||||
TileEntity tileentity = (TileEntity) iterator.next();
|
TileEntity tileentity = (TileEntity) iterator.next();
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From f483fb8bd514291b3f1a4dd68acf32fd7fa7a79c Mon Sep 17 00:00:00 2001
|
From 8bf46817709567086980648b133a6f148823dafd Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Sun, 3 Feb 2013 05:10:21 -0500
|
Date: Sun, 3 Feb 2013 05:10:21 -0500
|
||||||
Subject: [PATCH] Entity Activation Range
|
Subject: [PATCH] Entity Activation Range
|
||||||
@ -9,27 +9,27 @@ 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.
|
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
|
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||||
index c699dd1..9dcddb1 100644
|
index d3c7d1b..ebdcaab 100644
|
||||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||||
@@ -89,14 +89,14 @@ public abstract class Entity implements ICommandListener {
|
@@ -89,14 +89,14 @@ public abstract class Entity implements ICommandListener {
|
||||||
public int ticksLived;
|
public int ticksLived;
|
||||||
public int maxFireTicks;
|
public int maxFireTicks;
|
||||||
public int fireTicks;
|
public int fireTicks; // CraftBukkit - public
|
||||||
- protected boolean inWater;
|
- protected boolean inWater;
|
||||||
+ public boolean inWater; // Spigot - protected -> public
|
+ public boolean inWater; // Spigot - protected -> public
|
||||||
public int noDamageTicks;
|
public int noDamageTicks;
|
||||||
protected boolean justCreated;
|
protected boolean justCreated;
|
||||||
protected boolean fireProof;
|
protected boolean fireProof;
|
||||||
protected DataWatcher datawatcher;
|
protected DataWatcher datawatcher;
|
||||||
private double ap;
|
private double ar;
|
||||||
private double aq;
|
private double as;
|
||||||
- public boolean ad;
|
- public boolean ad;
|
||||||
+ public boolean ad;public boolean isAddedToChunk() { return ad; } // Spigot
|
+ public boolean ad; public boolean isAddedToChunk() { return ad; } // Spigot
|
||||||
public int ae;
|
public int ae;
|
||||||
public int af;
|
public int af;
|
||||||
public int ag;
|
public int ag;
|
||||||
@@ -113,7 +113,13 @@ public abstract class Entity implements ICommandListener {
|
@@ -115,7 +115,13 @@ public abstract class Entity implements ICommandListener {
|
||||||
public boolean valid; // CraftBukkit
|
public boolean valid; // CraftBukkit
|
||||||
public org.bukkit.projectiles.ProjectileSource projectileSource; // CraftBukkit - For projectiles only
|
public org.bukkit.projectiles.ProjectileSource projectileSource; // CraftBukkit - For projectiles only
|
||||||
|
|
||||||
@ -43,7 +43,7 @@ index c699dd1..9dcddb1 100644
|
|||||||
|
|
||||||
public int getId() {
|
public int getId() {
|
||||||
return this.id;
|
return this.id;
|
||||||
@@ -143,7 +149,12 @@ public abstract class Entity implements ICommandListener {
|
@@ -145,7 +151,12 @@ public abstract class Entity implements ICommandListener {
|
||||||
this.setPosition(0.0D, 0.0D, 0.0D);
|
this.setPosition(0.0D, 0.0D, 0.0D);
|
||||||
if (world != null) {
|
if (world != null) {
|
||||||
this.dimension = world.worldProvider.getDimension();
|
this.dimension = world.worldProvider.getDimension();
|
||||||
@ -57,11 +57,11 @@ index c699dd1..9dcddb1 100644
|
|||||||
this.datawatcher = new DataWatcher(this);
|
this.datawatcher = new DataWatcher(this);
|
||||||
this.datawatcher.a(0, Byte.valueOf((byte) 0));
|
this.datawatcher.a(0, Byte.valueOf((byte) 0));
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityAgeable.java b/src/main/java/net/minecraft/server/EntityAgeable.java
|
diff --git a/src/main/java/net/minecraft/server/EntityAgeable.java b/src/main/java/net/minecraft/server/EntityAgeable.java
|
||||||
index 2adcc19..23091bd 100644
|
index 8a74059..09d4335 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityAgeable.java
|
--- a/src/main/java/net/minecraft/server/EntityAgeable.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityAgeable.java
|
+++ b/src/main/java/net/minecraft/server/EntityAgeable.java
|
||||||
@@ -9,6 +9,31 @@ public abstract class EntityAgeable extends EntityCreature {
|
@@ -9,6 +9,31 @@ public abstract class EntityAgeable extends EntityCreature {
|
||||||
private float bl;
|
private float bn;
|
||||||
public boolean ageLocked = false; // CraftBukkit
|
public boolean ageLocked = false; // CraftBukkit
|
||||||
|
|
||||||
+ // Spigot start
|
+ // Spigot start
|
||||||
@ -69,7 +69,7 @@ index 2adcc19..23091bd 100644
|
|||||||
+ public void inactiveTick()
|
+ public void inactiveTick()
|
||||||
+ {
|
+ {
|
||||||
+ super.inactiveTick();
|
+ super.inactiveTick();
|
||||||
+ if ( this.world.isStatic || this.ageLocked )
|
+ if ( this.world.isClientSide || this.ageLocked )
|
||||||
+ { // CraftBukkit
|
+ { // CraftBukkit
|
||||||
+ this.a( this.isBaby() );
|
+ this.a( this.isBaby() );
|
||||||
+ } else
|
+ } else
|
||||||
@ -93,7 +93,7 @@ index 2adcc19..23091bd 100644
|
|||||||
super(world);
|
super(world);
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityArrow.java b/src/main/java/net/minecraft/server/EntityArrow.java
|
diff --git a/src/main/java/net/minecraft/server/EntityArrow.java b/src/main/java/net/minecraft/server/EntityArrow.java
|
||||||
index 3ba285a..6e5450a 100644
|
index d0e5f11..01c66e3 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityArrow.java
|
--- a/src/main/java/net/minecraft/server/EntityArrow.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityArrow.java
|
+++ b/src/main/java/net/minecraft/server/EntityArrow.java
|
||||||
@@ -15,7 +15,7 @@ public class EntityArrow extends Entity implements IProjectile {
|
@@ -15,7 +15,7 @@ public class EntityArrow extends Entity implements IProjectile {
|
||||||
@ -107,7 +107,7 @@ index 3ba285a..6e5450a 100644
|
|||||||
public Entity shooter;
|
public Entity shooter;
|
||||||
@@ -24,6 +24,18 @@ public class EntityArrow extends Entity implements IProjectile {
|
@@ -24,6 +24,18 @@ public class EntityArrow extends Entity implements IProjectile {
|
||||||
private double damage = 2.0D;
|
private double damage = 2.0D;
|
||||||
public int knockbackStrength;
|
public int knockbackStrength; // CraftBukkit - public
|
||||||
|
|
||||||
+ // Spigot Start
|
+ // Spigot Start
|
||||||
+ @Override
|
+ @Override
|
||||||
@ -115,7 +115,7 @@ index 3ba285a..6e5450a 100644
|
|||||||
+ {
|
+ {
|
||||||
+ if ( this.inGround )
|
+ if ( this.inGround )
|
||||||
+ {
|
+ {
|
||||||
+ this.ap += 1; // Despawn counter. First int after shooter
|
+ this.ar += 1; // Despawn counter. First int after shooter
|
||||||
+ }
|
+ }
|
||||||
+ super.inactiveTick();
|
+ super.inactiveTick();
|
||||||
+ }
|
+ }
|
||||||
@ -125,12 +125,12 @@ index 3ba285a..6e5450a 100644
|
|||||||
super(world);
|
super(world);
|
||||||
this.j = 10.0D;
|
this.j = 10.0D;
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityFireworks.java b/src/main/java/net/minecraft/server/EntityFireworks.java
|
diff --git a/src/main/java/net/minecraft/server/EntityFireworks.java b/src/main/java/net/minecraft/server/EntityFireworks.java
|
||||||
index 8357157..f5b794b 100644
|
index 607608f..02f1603 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityFireworks.java
|
--- a/src/main/java/net/minecraft/server/EntityFireworks.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityFireworks.java
|
+++ b/src/main/java/net/minecraft/server/EntityFireworks.java
|
||||||
@@ -5,6 +5,15 @@ public class EntityFireworks extends Entity {
|
@@ -5,6 +5,15 @@ public class EntityFireworks extends Entity {
|
||||||
private int ticksFlown;
|
private int ticksFlown;
|
||||||
public int expectedLifespan;
|
public int expectedLifespan; // CraftBukkit - public
|
||||||
|
|
||||||
+ // Spigot Start
|
+ // Spigot Start
|
||||||
+ @Override
|
+ @Override
|
||||||
@ -143,12 +143,12 @@ index 8357157..f5b794b 100644
|
|||||||
+
|
+
|
||||||
public EntityFireworks(World world) {
|
public EntityFireworks(World world) {
|
||||||
super(world);
|
super(world);
|
||||||
this.a(0.25F, 0.25F);
|
this.setSize(0.25F, 0.25F);
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java
|
diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java
|
||||||
index 3f2c5f5..652b803 100644
|
index fa7e6df..65a03df 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityItem.java
|
--- a/src/main/java/net/minecraft/server/EntityItem.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityItem.java
|
+++ b/src/main/java/net/minecraft/server/EntityItem.java
|
||||||
@@ -121,6 +121,28 @@ public class EntityItem extends Entity {
|
@@ -122,6 +122,28 @@ public class EntityItem extends Entity {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -162,7 +162,7 @@ index 3f2c5f5..652b803 100644
|
|||||||
+ this.lastTick = MinecraftServer.currentTick;
|
+ this.lastTick = MinecraftServer.currentTick;
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
+
|
+
|
||||||
+ if (!this.world.isStatic && this.age >= world.spigotConfig.itemDespawnRate) { // Spigot
|
+ if (!this.world.isClientSide && this.age >= world.spigotConfig.itemDespawnRate) { // Spigot
|
||||||
+ // CraftBukkit start - fire ItemDespawnEvent
|
+ // CraftBukkit start - fire ItemDespawnEvent
|
||||||
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callItemDespawnEvent(this).isCancelled()) {
|
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callItemDespawnEvent(this).isCancelled()) {
|
||||||
+ this.age = 0;
|
+ this.age = 0;
|
||||||
@ -178,10 +178,10 @@ index 3f2c5f5..652b803 100644
|
|||||||
// Spigot start
|
// Spigot start
|
||||||
double radius = world.spigotConfig.itemMerge;
|
double radius = world.spigotConfig.itemMerge;
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||||
index cd56586..89374d7 100644
|
index 24aaec5..e90ff2f 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||||
@@ -87,6 +87,13 @@ public abstract class EntityLiving extends Entity {
|
@@ -89,6 +89,13 @@ public abstract class EntityLiving extends Entity {
|
||||||
public int maxAirTicks = 300;
|
public int maxAirTicks = 300;
|
||||||
ArrayList<org.bukkit.inventory.ItemStack> drops = null;
|
ArrayList<org.bukkit.inventory.ItemStack> drops = null;
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
@ -189,17 +189,17 @@ index cd56586..89374d7 100644
|
|||||||
+ public void inactiveTick()
|
+ public void inactiveTick()
|
||||||
+ {
|
+ {
|
||||||
+ super.inactiveTick();
|
+ super.inactiveTick();
|
||||||
+ ++this.aO; // Above all the floats
|
+ ++this.ticksFarFromPlayer; // Above all the floats
|
||||||
+ }
|
+ }
|
||||||
+ // Spigot end
|
+ // Spigot end
|
||||||
|
|
||||||
public void G() {
|
public void G() {
|
||||||
this.damageEntity(DamageSource.OUT_OF_WORLD, Float.MAX_VALUE);
|
this.damageEntity(DamageSource.OUT_OF_WORLD, Float.MAX_VALUE);
|
||||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||||
index b6a509c..d85479b 100644
|
index c78c2d8..6a975d3 100644
|
||||||
--- a/src/main/java/net/minecraft/server/World.java
|
--- a/src/main/java/net/minecraft/server/World.java
|
||||||
+++ b/src/main/java/net/minecraft/server/World.java
|
+++ b/src/main/java/net/minecraft/server/World.java
|
||||||
@@ -1258,6 +1258,7 @@ public abstract class World implements IBlockAccess {
|
@@ -1303,6 +1303,7 @@ public abstract class World implements IBlockAccess {
|
||||||
this.g.clear();
|
this.g.clear();
|
||||||
this.methodProfiler.c("regular");
|
this.methodProfiler.c("regular");
|
||||||
|
|
||||||
@ -207,7 +207,7 @@ index b6a509c..d85479b 100644
|
|||||||
timings.entityTick.startTiming(); // Spigot
|
timings.entityTick.startTiming(); // Spigot
|
||||||
// CraftBukkit start - Use field for loop variable
|
// CraftBukkit start - Use field for loop variable
|
||||||
for (this.tickPosition = 0; this.tickPosition < this.entityList.size(); ++this.tickPosition) {
|
for (this.tickPosition = 0; this.tickPosition < this.entityList.size(); ++this.tickPosition) {
|
||||||
@@ -1433,9 +1434,11 @@ public abstract class World implements IBlockAccess {
|
@@ -1477,9 +1478,11 @@ public abstract class World implements IBlockAccess {
|
||||||
int j = MathHelper.floor(entity.locZ);
|
int j = MathHelper.floor(entity.locZ);
|
||||||
byte b0 = 32;
|
byte b0 = 32;
|
||||||
|
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
From 6e805f1310bdc9c60ae053b397f741c66abb40d4 Mon Sep 17 00:00:00 2001
|
From 1447382b4c93fa76fea2224645c098378fed842f Mon Sep 17 00:00:00 2001
|
||||||
From: md_5 <md_5@live.com.au>
|
From: md_5 <md_5@live.com.au>
|
||||||
Date: Mon, 4 Mar 2013 18:45:52 +1100
|
Date: Mon, 4 Mar 2013 18:45:52 +1100
|
||||||
Subject: [PATCH] PlayerItemDamageEvent
|
Subject: [PATCH] PlayerItemDamageEvent
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java
|
diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java
|
||||||
index 0457ede..3e0d808 100644
|
index 25c6877..62b2136 100644
|
||||||
--- a/src/main/java/net/minecraft/server/ItemStack.java
|
--- a/src/main/java/net/minecraft/server/ItemStack.java
|
||||||
+++ b/src/main/java/net/minecraft/server/ItemStack.java
|
+++ b/src/main/java/net/minecraft/server/ItemStack.java
|
||||||
@@ -323,6 +323,11 @@ public final class ItemStack {
|
@@ -324,6 +324,11 @@ public final class ItemStack {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isDamaged(int i, Random random) {
|
public boolean isDamaged(int i, Random random) {
|
||||||
@ -20,7 +20,7 @@ index 0457ede..3e0d808 100644
|
|||||||
if (!this.e()) {
|
if (!this.e()) {
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
@@ -337,7 +342,16 @@ public final class ItemStack {
|
@@ -338,7 +343,16 @@ public final class ItemStack {
|
||||||
}
|
}
|
||||||
|
|
||||||
i -= k;
|
i -= k;
|
||||||
@ -38,12 +38,12 @@ index 0457ede..3e0d808 100644
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -350,7 +364,7 @@ public final class ItemStack {
|
@@ -351,7 +365,7 @@ public final class ItemStack {
|
||||||
public void damage(int i, EntityLiving entityliving) {
|
public void damage(int i, EntityLiving entityliving) {
|
||||||
if (!(entityliving instanceof EntityHuman) || !((EntityHuman) entityliving).abilities.canInstantlyBuild) {
|
if (!(entityliving instanceof EntityHuman) || !((EntityHuman) entityliving).abilities.canInstantlyBuild) {
|
||||||
if (this.e()) {
|
if (this.e()) {
|
||||||
- if (this.isDamaged(i, entityliving.bb())) {
|
- if (this.isDamaged(i, entityliving.bc())) {
|
||||||
+ if (this.isDamaged(i, entityliving.bb(), entityliving)) { // Spigot
|
+ if (this.isDamaged(i, entityliving.bc(), entityliving)) { // Spigot
|
||||||
entityliving.b(this);
|
entityliving.b(this);
|
||||||
--this.count;
|
--this.count;
|
||||||
if (entityliving instanceof EntityHuman) {
|
if (entityliving instanceof EntityHuman) {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From f6c53d37393f337957319ad8b8d46e634e7fecab Mon Sep 17 00:00:00 2001
|
From 3610083330f3022f069598e344801350f76fa74e Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Wed, 20 Feb 2013 11:58:47 -0500
|
Date: Wed, 20 Feb 2013 11:58:47 -0500
|
||||||
Subject: [PATCH] Entity Tracking Ranges
|
Subject: [PATCH] Entity Tracking Ranges
|
||||||
@ -12,17 +12,56 @@ This has multiple benefits:
|
|||||||
4) Less client lag - Not trying to render distant item frames and paintings and entities will reduce entity count on the client, which is major for shop/town worlds which may use tons of item frames.
|
4) Less client lag - Not trying to render distant item frames and paintings and entities will reduce entity count on the client, which is major for shop/town worlds which may use tons of item frames.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityTracker.java b/src/main/java/net/minecraft/server/EntityTracker.java
|
diff --git a/src/main/java/net/minecraft/server/EntityTracker.java b/src/main/java/net/minecraft/server/EntityTracker.java
|
||||||
index 350f2f7..e3b2864 100644
|
index de38e80..1f7dd1a 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityTracker.java
|
--- a/src/main/java/net/minecraft/server/EntityTracker.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityTracker.java
|
+++ b/src/main/java/net/minecraft/server/EntityTracker.java
|
||||||
@@ -95,6 +95,7 @@ public class EntityTracker {
|
@@ -95,6 +95,7 @@ public class EntityTracker {
|
||||||
|
|
||||||
public void addEntity(Entity entity, int i, int j, boolean flag) {
|
public void addEntity(Entity entity, int i, final int j, boolean flag) {
|
||||||
org.spigotmc.AsyncCatcher.catchOp( "entity track"); // Spigot
|
org.spigotmc.AsyncCatcher.catchOp( "entity track"); // Spigot
|
||||||
+ i = org.spigotmc.TrackingRange.getEntityTrackingRange(entity, i); // Spigot
|
+ i = org.spigotmc.TrackingRange.getEntityTrackingRange(entity, i); // Spigot
|
||||||
if (i > this.e) {
|
if (i > this.e) {
|
||||||
i = this.e;
|
i = this.e;
|
||||||
}
|
}
|
||||||
|
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
|
||||||
|
index d3f4af1..0143623 100644
|
||||||
|
--- a/src/main/java/org/spigotmc/ActivationRange.java
|
||||||
|
+++ b/src/main/java/org/spigotmc/ActivationRange.java
|
||||||
|
@@ -106,7 +106,7 @@ public class ActivationRange
|
||||||
|
maxRange = Math.max( maxRange, miscActivationRange );
|
||||||
|
maxRange = Math.min( ( world.spigotConfig.viewDistance << 4 ) - 8, maxRange );
|
||||||
|
|
||||||
|
- for ( Entity player : (List<Entity>) world.players )
|
||||||
|
+ for ( Entity player : (List<Entity>) (List) world.players )
|
||||||
|
{
|
||||||
|
|
||||||
|
player.activatedTick = MinecraftServer.currentTick;
|
||||||
|
@@ -188,7 +188,7 @@ public class ActivationRange
|
||||||
|
public static boolean checkEntityImmunities(Entity entity)
|
||||||
|
{
|
||||||
|
// quick checks.
|
||||||
|
- if ( entity.inWater /* isInWater */ || entity.fireTicks > 0 )
|
||||||
|
+ if ( entity.inWater || entity.fireTicks > 0 )
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
@@ -215,14 +215,14 @@ public class ActivationRange
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
- if ( entity instanceof EntityVillager && ( (EntityVillager) entity ).ck() /* Getter for first boolean */ )
|
||||||
|
+ if ( entity instanceof EntityVillager && ( (EntityVillager) entity ).cm() /* Getter for first boolean */ )
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if ( entity instanceof EntityAnimal )
|
||||||
|
{
|
||||||
|
EntityAnimal animal = (EntityAnimal) entity;
|
||||||
|
- if ( animal.isBaby() || animal.cp() /*love*/ )
|
||||||
|
+ if ( animal.isBaby() || animal.isInLove() )
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
||||||
index ed2836a..6421bf2 100644
|
index ed2836a..6421bf2 100644
|
||||||
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From 1447e11573baf2733066d84f7af8f3ace5671c03 Mon Sep 17 00:00:00 2001
|
From 4a0dd916ac1f28729c9a269f5213c7340f1aad0e Mon Sep 17 00:00:00 2001
|
||||||
From: md_5 <md_5@live.com.au>
|
From: md_5 <md_5@live.com.au>
|
||||||
Date: Tue, 23 Apr 2013 11:50:27 +1000
|
Date: Tue, 23 Apr 2013 11:50:27 +1000
|
||||||
Subject: [PATCH] Thread Naming and Tweaks
|
Subject: [PATCH] Thread Naming and Tweaks
|
||||||
|
@ -1,27 +1,27 @@
|
|||||||
From bd686bb6d5799cecc1e84d821535613b3826fbc2 Mon Sep 17 00:00:00 2001
|
From 0e944971858decdee97370dc2da8cc1f94bce1e1 Mon Sep 17 00:00:00 2001
|
||||||
From: Antony Riley <antony@cyberiantiger.org>
|
From: Antony Riley <antony@cyberiantiger.org>
|
||||||
Date: Wed, 27 Mar 2013 01:41:54 +0200
|
Date: Wed, 27 Mar 2013 01:41:54 +0200
|
||||||
Subject: [PATCH] Close Unloaded Save Files
|
Subject: [PATCH] Close Unloaded Save Files
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/RegionFileCache.java b/src/main/java/net/minecraft/server/RegionFileCache.java
|
diff --git a/src/main/java/net/minecraft/server/RegionFileCache.java b/src/main/java/net/minecraft/server/RegionFileCache.java
|
||||||
index f4f72ef..1b03878 100644
|
index b07e7d5..5528019 100644
|
||||||
--- a/src/main/java/net/minecraft/server/RegionFileCache.java
|
--- a/src/main/java/net/minecraft/server/RegionFileCache.java
|
||||||
+++ b/src/main/java/net/minecraft/server/RegionFileCache.java
|
+++ b/src/main/java/net/minecraft/server/RegionFileCache.java
|
||||||
@@ -10,7 +10,7 @@ import java.util.Map;
|
@@ -10,7 +10,7 @@ import java.util.Map;
|
||||||
|
|
||||||
public class RegionFileCache {
|
public class RegionFileCache {
|
||||||
|
|
||||||
- private static final Map a = Maps.newHashMap();
|
- private static final Map<File, RegionFile> a = Maps.newHashMap();
|
||||||
+ public static final Map a = Maps.newHashMap(); // Spigot - private -> public
|
+ public static final Map<File, RegionFile> a = Maps.newHashMap(); // Spigot - private -> public
|
||||||
|
|
||||||
public static synchronized RegionFile a(File file, int i, int j) {
|
public static synchronized RegionFile a(File file, int i, int j) {
|
||||||
File file1 = new File(file, "region");
|
File file1 = new File(file, "region");
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
index 07f15d1..fa8ae87 100644
|
index ed0c30c..58d52d8 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
@@ -953,6 +953,31 @@ public final class CraftServer implements Server {
|
@@ -967,6 +967,31 @@ public final class CraftServer implements Server {
|
||||||
|
|
||||||
worlds.remove(world.getName().toLowerCase());
|
worlds.remove(world.getName().toLowerCase());
|
||||||
console.worlds.remove(console.worlds.indexOf(handle));
|
console.worlds.remove(console.worlds.indexOf(handle));
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From afc2bc63a5b6ddf07e88b38976ac0878fc319655 Mon Sep 17 00:00:00 2001
|
From 6edd9fd1c7bd9f906f4668e9be876fc679557e08 Mon Sep 17 00:00:00 2001
|
||||||
From: md_5 <md_5@live.com.au>
|
From: md_5 <md_5@live.com.au>
|
||||||
Date: Sun, 19 May 2013 18:29:48 +1000
|
Date: Sun, 19 May 2013 18:29:48 +1000
|
||||||
Subject: [PATCH] Remove -o Option
|
Subject: [PATCH] Remove -o Option
|
||||||
@ -6,10 +6,10 @@ Subject: [PATCH] Remove -o Option
|
|||||||
Serves no purpose other than to confuse users.
|
Serves no purpose other than to confuse users.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/PropertyManager.java b/src/main/java/net/minecraft/server/PropertyManager.java
|
diff --git a/src/main/java/net/minecraft/server/PropertyManager.java b/src/main/java/net/minecraft/server/PropertyManager.java
|
||||||
index 00b35a1..622d6e0 100644
|
index dbb329c..0549a0f 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PropertyManager.java
|
--- a/src/main/java/net/minecraft/server/PropertyManager.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PropertyManager.java
|
+++ b/src/main/java/net/minecraft/server/PropertyManager.java
|
||||||
@@ -53,7 +53,7 @@ public class PropertyManager {
|
@@ -54,7 +54,7 @@ public class PropertyManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
private <T> T getOverride(String name, T value) {
|
private <T> T getOverride(String name, T value) {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From 40d1381d320d2c39caa8503827a2ede8eb239739 Mon Sep 17 00:00:00 2001
|
From 157bffdb7ed6d858ad9055e98c25ba08488126eb Mon Sep 17 00:00:00 2001
|
||||||
From: md_5 <md_5@live.com.au>
|
From: md_5 <md_5@live.com.au>
|
||||||
Date: Sat, 1 Jun 2013 16:34:38 +1000
|
Date: Sat, 1 Jun 2013 16:34:38 +1000
|
||||||
Subject: [PATCH] Recipe Deconstruction
|
Subject: [PATCH] Recipe Deconstruction
|
||||||
@ -6,7 +6,7 @@ Subject: [PATCH] Recipe Deconstruction
|
|||||||
Some non API methods contributed by Asphodan to allow recipe deconstruction.
|
Some non API methods contributed by Asphodan to allow recipe deconstruction.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/IRecipe.java b/src/main/java/net/minecraft/server/IRecipe.java
|
diff --git a/src/main/java/net/minecraft/server/IRecipe.java b/src/main/java/net/minecraft/server/IRecipe.java
|
||||||
index d2655a0..e5b116f 100644
|
index babf604..e7aba17 100644
|
||||||
--- a/src/main/java/net/minecraft/server/IRecipe.java
|
--- a/src/main/java/net/minecraft/server/IRecipe.java
|
||||||
+++ b/src/main/java/net/minecraft/server/IRecipe.java
|
+++ b/src/main/java/net/minecraft/server/IRecipe.java
|
||||||
@@ -13,4 +13,6 @@ public interface IRecipe {
|
@@ -13,4 +13,6 @@ public interface IRecipe {
|
||||||
@ -17,10 +17,10 @@ index d2655a0..e5b116f 100644
|
|||||||
+ java.util.List<ItemStack> getIngredients(); // Spigot
|
+ java.util.List<ItemStack> getIngredients(); // Spigot
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/ShapedRecipes.java b/src/main/java/net/minecraft/server/ShapedRecipes.java
|
diff --git a/src/main/java/net/minecraft/server/ShapedRecipes.java b/src/main/java/net/minecraft/server/ShapedRecipes.java
|
||||||
index 407cbfb..6c3de90 100644
|
index a387e2d..825b6d9 100644
|
||||||
--- a/src/main/java/net/minecraft/server/ShapedRecipes.java
|
--- a/src/main/java/net/minecraft/server/ShapedRecipes.java
|
||||||
+++ b/src/main/java/net/minecraft/server/ShapedRecipes.java
|
+++ b/src/main/java/net/minecraft/server/ShapedRecipes.java
|
||||||
@@ -11,7 +11,7 @@ public class ShapedRecipes implements IRecipe {
|
@@ -10,7 +10,7 @@ public class ShapedRecipes implements IRecipe {
|
||||||
private final int width;
|
private final int width;
|
||||||
private final int height;
|
private final int height;
|
||||||
private final ItemStack[] items;
|
private final ItemStack[] items;
|
||||||
@ -29,9 +29,9 @@ index 407cbfb..6c3de90 100644
|
|||||||
private boolean e;
|
private boolean e;
|
||||||
|
|
||||||
public ShapedRecipes(int i, int j, ItemStack[] aitemstack, ItemStack itemstack) {
|
public ShapedRecipes(int i, int j, ItemStack[] aitemstack, ItemStack itemstack) {
|
||||||
@@ -171,4 +171,11 @@ public class ShapedRecipes implements IRecipe {
|
@@ -165,4 +165,11 @@ public class ShapedRecipes implements IRecipe {
|
||||||
this.e = true;
|
public int a() {
|
||||||
return this;
|
return this.width * this.height;
|
||||||
}
|
}
|
||||||
+
|
+
|
||||||
+ // Spigot start
|
+ // Spigot start
|
||||||
@ -42,7 +42,7 @@ index 407cbfb..6c3de90 100644
|
|||||||
+ // Spigot end
|
+ // Spigot end
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/ShapelessRecipes.java b/src/main/java/net/minecraft/server/ShapelessRecipes.java
|
diff --git a/src/main/java/net/minecraft/server/ShapelessRecipes.java b/src/main/java/net/minecraft/server/ShapelessRecipes.java
|
||||||
index 2d243d1..b6106db 100644
|
index b13dcb7..aa0e9aa 100644
|
||||||
--- a/src/main/java/net/minecraft/server/ShapelessRecipes.java
|
--- a/src/main/java/net/minecraft/server/ShapelessRecipes.java
|
||||||
+++ b/src/main/java/net/minecraft/server/ShapelessRecipes.java
|
+++ b/src/main/java/net/minecraft/server/ShapelessRecipes.java
|
||||||
@@ -12,7 +12,7 @@ import org.bukkit.craftbukkit.inventory.CraftShapelessRecipe;
|
@@ -12,7 +12,7 @@ import org.bukkit.craftbukkit.inventory.CraftShapelessRecipe;
|
||||||
@ -51,9 +51,9 @@ index 2d243d1..b6106db 100644
|
|||||||
|
|
||||||
- private final ItemStack result;
|
- private final ItemStack result;
|
||||||
+ public final ItemStack result; // Spigot
|
+ public final ItemStack result; // Spigot
|
||||||
private final List ingredients;
|
private final List<ItemStack> ingredients;
|
||||||
|
|
||||||
public ShapelessRecipes(ItemStack itemstack, List list) {
|
public ShapelessRecipes(ItemStack itemstack, List<ItemStack> list) {
|
||||||
@@ -90,4 +90,11 @@ public class ShapelessRecipes implements IRecipe {
|
@@ -90,4 +90,11 @@ public class ShapelessRecipes implements IRecipe {
|
||||||
public int a() {
|
public int a() {
|
||||||
return this.ingredients.size();
|
return this.ingredients.size();
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From 3e06be67869c79404fc040387909522a02228088 Mon Sep 17 00:00:00 2001
|
From 094f53bc27b0ac80ef7d0142db127b8ffecfd12d Mon Sep 17 00:00:00 2001
|
||||||
From: md_5 <md_5@live.com.au>
|
From: md_5 <md_5@live.com.au>
|
||||||
Date: Sun, 2 Jun 2013 15:16:05 +1000
|
Date: Sun, 2 Jun 2013 15:16:05 +1000
|
||||||
Subject: [PATCH] Implement Arrow API
|
Subject: [PATCH] Implement Arrow API
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From 204f59aebe0db94c0d288bc4fc3b2cf4c25ffb47 Mon Sep 17 00:00:00 2001
|
From a1f5331d1b57175a29474e6c1465db9c9d56b5af Mon Sep 17 00:00:00 2001
|
||||||
From: erocs <github@erocs.org>
|
From: erocs <github@erocs.org>
|
||||||
Date: Sun, 8 Sep 2013 12:06:15 -0700
|
Date: Sun, 8 Sep 2013 12:06:15 -0700
|
||||||
Subject: [PATCH] Hopper Customisations
|
Subject: [PATCH] Hopper Customisations
|
||||||
@ -6,10 +6,10 @@ Subject: [PATCH] Hopper Customisations
|
|||||||
Allows editing hopper cooldowns and amount transferred per tick.
|
Allows editing hopper cooldowns and amount transferred per tick.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/TileEntityHopper.java b/src/main/java/net/minecraft/server/TileEntityHopper.java
|
diff --git a/src/main/java/net/minecraft/server/TileEntityHopper.java b/src/main/java/net/minecraft/server/TileEntityHopper.java
|
||||||
index 7fe1f46..f4dc9c7 100644
|
index 72d067a..b3bf687 100644
|
||||||
--- a/src/main/java/net/minecraft/server/TileEntityHopper.java
|
--- a/src/main/java/net/minecraft/server/TileEntityHopper.java
|
||||||
+++ b/src/main/java/net/minecraft/server/TileEntityHopper.java
|
+++ b/src/main/java/net/minecraft/server/TileEntityHopper.java
|
||||||
@@ -193,12 +193,18 @@ public class TileEntityHopper extends TileEntityContainer implements IHopper, IU
|
@@ -194,12 +194,18 @@ public class TileEntityHopper extends TileEntityContainer implements IHopper, IU
|
||||||
}
|
}
|
||||||
|
|
||||||
if (flag) {
|
if (flag) {
|
||||||
@ -29,7 +29,7 @@ index 7fe1f46..f4dc9c7 100644
|
|||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
@@ -252,7 +258,7 @@ public class TileEntityHopper extends TileEntityContainer implements IHopper, IU
|
@@ -253,7 +259,7 @@ public class TileEntityHopper extends TileEntityContainer implements IHopper, IU
|
||||||
// ItemStack itemstack1 = addItem(iinventory, this.splitStack(i, 1), enumdirection);
|
// ItemStack itemstack1 = addItem(iinventory, this.splitStack(i, 1), enumdirection);
|
||||||
|
|
||||||
// CraftBukkit start - Call event when pushing items into other inventories
|
// CraftBukkit start - Call event when pushing items into other inventories
|
||||||
@ -38,7 +38,7 @@ index 7fe1f46..f4dc9c7 100644
|
|||||||
|
|
||||||
Inventory destinationInventory;
|
Inventory destinationInventory;
|
||||||
// Have to special case large chests as they work oddly
|
// Have to special case large chests as they work oddly
|
||||||
@@ -266,9 +272,10 @@ public class TileEntityHopper extends TileEntityContainer implements IHopper, IU
|
@@ -267,9 +273,10 @@ public class TileEntityHopper extends TileEntityContainer implements IHopper, IU
|
||||||
this.getWorld().getServer().getPluginManager().callEvent(event);
|
this.getWorld().getServer().getPluginManager().callEvent(event);
|
||||||
if (event.isCancelled()) {
|
if (event.isCancelled()) {
|
||||||
this.setItem(i, itemstack);
|
this.setItem(i, itemstack);
|
||||||
@ -50,7 +50,7 @@ index 7fe1f46..f4dc9c7 100644
|
|||||||
ItemStack itemstack1 = addItem(iinventory, CraftItemStack.asNMSCopy(event.getItem()), enumdirection);
|
ItemStack itemstack1 = addItem(iinventory, CraftItemStack.asNMSCopy(event.getItem()), enumdirection);
|
||||||
|
|
||||||
if (itemstack1 == null || itemstack1.count == 0) {
|
if (itemstack1 == null || itemstack1.count == 0) {
|
||||||
@@ -280,7 +287,7 @@ public class TileEntityHopper extends TileEntityContainer implements IHopper, IU
|
@@ -281,7 +288,7 @@ public class TileEntityHopper extends TileEntityContainer implements IHopper, IU
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -59,7 +59,7 @@ index 7fe1f46..f4dc9c7 100644
|
|||||||
this.setItem(i, itemstack);
|
this.setItem(i, itemstack);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -386,7 +393,7 @@ public class TileEntityHopper extends TileEntityContainer implements IHopper, IU
|
@@ -391,7 +398,7 @@ public class TileEntityHopper extends TileEntityContainer implements IHopper, IU
|
||||||
ItemStack itemstack1 = itemstack.cloneItemStack();
|
ItemStack itemstack1 = itemstack.cloneItemStack();
|
||||||
// ItemStack itemstack2 = addItem(ihopper, iinventory.splitStack(i, 1), (EnumDirection) null);
|
// ItemStack itemstack2 = addItem(ihopper, iinventory.splitStack(i, 1), (EnumDirection) null);
|
||||||
// CraftBukkit start - Call event on collection of items from inventories into the hopper
|
// CraftBukkit start - Call event on collection of items from inventories into the hopper
|
||||||
@ -68,24 +68,24 @@ index 7fe1f46..f4dc9c7 100644
|
|||||||
|
|
||||||
Inventory sourceInventory;
|
Inventory sourceInventory;
|
||||||
// Have to special case large chests as they work oddly
|
// Have to special case large chests as they work oddly
|
||||||
@@ -403,13 +410,14 @@ public class TileEntityHopper extends TileEntityContainer implements IHopper, IU
|
@@ -408,13 +415,13 @@ public class TileEntityHopper extends TileEntityContainer implements IHopper, IU
|
||||||
iinventory.setItem(i, itemstack1);
|
iinventory.setItem(i, itemstack1);
|
||||||
|
|
||||||
if (ihopper instanceof TileEntityHopper) {
|
if (ihopper instanceof TileEntityHopper) {
|
||||||
- ((TileEntityHopper) ihopper).d(8); // Delay hopper checks
|
- ((TileEntityHopper) ihopper).d(8); // Delay hopper checks
|
||||||
+ ((TileEntityHopper) ihopper).d(ihopper.getWorld().spigotConfig.hopperTransfer); // Spigot
|
+ ((TileEntityHopper) ihopper).d(ihopper.getWorld().spigotConfig.hopperTransfer); // Spigot
|
||||||
} else if (ihopper instanceof EntityMinecartHopper) {
|
} else if (ihopper instanceof EntityMinecartHopper) {
|
||||||
- ((EntityMinecartHopper) ihopper).l(4); // Delay hopper minecart checks
|
- ((EntityMinecartHopper) ihopper).m(4); // Delay hopper minecart checks
|
||||||
+ ((EntityMinecartHopper) ihopper).l(ihopper.getWorld().spigotConfig.hopperTransfer / 2); // Spigot
|
+ ((EntityMinecartHopper) ihopper).m(ihopper.getWorld().spigotConfig.hopperTransfer / 2); // Spigot
|
||||||
}
|
}
|
||||||
|
-
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
+ int origCount = event.getItem().getAmount(); // Spigot
|
+ int origCount = event.getItem().getAmount(); // Spigot
|
||||||
ItemStack itemstack2 = addItem(ihopper, CraftItemStack.asNMSCopy(event.getItem()), null);
|
ItemStack itemstack2 = addItem(ihopper, CraftItemStack.asNMSCopy(event.getItem()), null);
|
||||||
|
|
||||||
if (itemstack2 == null || itemstack2.count == 0) {
|
if (itemstack2 == null || itemstack2.count == 0) {
|
||||||
@@ -421,6 +429,7 @@ public class TileEntityHopper extends TileEntityContainer implements IHopper, IU
|
@@ -426,6 +433,7 @@ public class TileEntityHopper extends TileEntityContainer implements IHopper, IU
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -93,7 +93,7 @@ index 7fe1f46..f4dc9c7 100644
|
|||||||
|
|
||||||
iinventory.setItem(i, itemstack1);
|
iinventory.setItem(i, itemstack1);
|
||||||
}
|
}
|
||||||
@@ -511,7 +520,7 @@ public class TileEntityHopper extends TileEntityContainer implements IHopper, IU
|
@@ -515,7 +523,7 @@ public class TileEntityHopper extends TileEntityContainer implements IHopper, IU
|
||||||
TileEntityHopper tileentityhopper = (TileEntityHopper) iinventory;
|
TileEntityHopper tileentityhopper = (TileEntityHopper) iinventory;
|
||||||
|
|
||||||
if (tileentityhopper.o()) {
|
if (tileentityhopper.o()) {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From 9666b42d5eb9966872cd10ef837ed0b1b28a2e03 Mon Sep 17 00:00:00 2001
|
From 7c6666fbd139bdc6e3b1171158299b8b00429488 Mon Sep 17 00:00:00 2001
|
||||||
From: Andy Shulman <andy.shulman@hotmail.com>
|
From: Andy Shulman <andy.shulman@hotmail.com>
|
||||||
Date: Mon, 15 Apr 2013 20:06:37 -0500
|
Date: Mon, 15 Apr 2013 20:06:37 -0500
|
||||||
Subject: [PATCH] Implement SpawnerSpawnEvent.
|
Subject: [PATCH] Implement SpawnerSpawnEvent.
|
||||||
@ -6,7 +6,7 @@ Subject: [PATCH] Implement SpawnerSpawnEvent.
|
|||||||
Adds BUKKIT-267
|
Adds BUKKIT-267
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
|
diff --git a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
|
||||||
index e597d77..4bbd288 100644
|
index 8d668fa..41cfde8 100644
|
||||||
--- a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
|
--- a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
|
||||||
+++ b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
|
+++ b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
|
||||||
@@ -4,7 +4,11 @@ import com.google.common.collect.Lists;
|
@@ -4,7 +4,11 @@ import com.google.common.collect.Lists;
|
||||||
@ -48,10 +48,11 @@ index e597d77..4bbd288 100644
|
|||||||
if (entity.world != null && flag) {
|
if (entity.world != null && flag) {
|
||||||
entity.world.addEntity(entity2, CreatureSpawnEvent.SpawnReason.SPAWNER); // CraftBukkit
|
entity.world.addEntity(entity2, CreatureSpawnEvent.SpawnReason.SPAWNER); // CraftBukkit
|
||||||
}
|
}
|
||||||
@@ -171,7 +185,12 @@ public abstract class MobSpawnerAbstract {
|
@@ -173,8 +187,12 @@ public abstract class MobSpawnerAbstract {
|
||||||
|
if (entity instanceof EntityInsentient) {
|
||||||
|
((EntityInsentient) entity).prepare(entity.world.E(new BlockPosition(entity)), (GroupDataEntity) null);
|
||||||
}
|
}
|
||||||
} else if (entity instanceof EntityInsentient && entity.world != null && flag) { // CraftBukkit - EntityLiving -> EntityInsentient
|
-
|
||||||
((EntityInsentient) entity).prepare(entity.world.E(new BlockPosition(entity)), (GroupDataEntity) null);
|
|
||||||
- entity.world.addEntity(entity, CreatureSpawnEvent.SpawnReason.SPAWNER); // CraftBukkit
|
- entity.world.addEntity(entity, CreatureSpawnEvent.SpawnReason.SPAWNER); // CraftBukkit
|
||||||
+ // Spigot start - call SpawnerSpawnEvent, abort if cancelled
|
+ // Spigot start - call SpawnerSpawnEvent, abort if cancelled
|
||||||
+ SpawnerSpawnEvent event = CraftEventFactory.callSpawnerSpawnEvent(entity, this.b().getX(), this.b().getY(), this.b().getZ());
|
+ SpawnerSpawnEvent event = CraftEventFactory.callSpawnerSpawnEvent(entity, this.b().getX(), this.b().getY(), this.b().getZ());
|
||||||
@ -63,7 +64,7 @@ index e597d77..4bbd288 100644
|
|||||||
|
|
||||||
return entity;
|
return entity;
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||||
index 60e2a4f..dd0cab1 100644
|
index 7da317c..218fd1f 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||||
+++ b/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;
|
@@ -18,6 +18,7 @@ import org.bukkit.Statistic.Type;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From b0b821c92e898f1c6d82743abdd81cbe4327bb22 Mon Sep 17 00:00:00 2001
|
From a10a1d12c71d080ddbd92db34de2bfe18a2fbc78 Mon Sep 17 00:00:00 2001
|
||||||
From: md_5 <md_5@live.com.au>
|
From: md_5 <md_5@live.com.au>
|
||||||
Date: Sat, 15 Jun 2013 21:34:48 +1000
|
Date: Sat, 15 Jun 2013 21:34:48 +1000
|
||||||
Subject: [PATCH] Firework Meta Crash Fix
|
Subject: [PATCH] Firework Meta Crash Fix
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
From 2f99b2e55476a79e54bbcffb4f3c092594fbdff4 Mon Sep 17 00:00:00 2001
|
From 13dc74685ff2babf3e4f068a0b1c519f515b884c Mon Sep 17 00:00:00 2001
|
||||||
From: md_5 <md_5@live.com.au>
|
From: md_5 <md_5@live.com.au>
|
||||||
Date: Fri, 21 Jun 2013 18:01:29 +1000
|
Date: Fri, 21 Jun 2013 18:01:29 +1000
|
||||||
Subject: [PATCH] Allow Disabling of Command Logging
|
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
|
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||||
index 5c24333..6a96c37 100644
|
index 20e09e5..9afd03f 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||||
@@ -1045,6 +1045,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
|
org.bukkit.craftbukkit.SpigotTimings.playerCommandTimer.startTiming(); // Spigot
|
||||||
|
|
||||||
// CraftBukkit start - whole method
|
// CraftBukkit start - whole method
|
||||||
+ if ( org.spigotmc.SpigotConfig.logCommands ) // Spigot
|
+ if ( org.spigotmc.SpigotConfig.logCommands ) // Spigot
|
||||||
this.c.info(this.player.getName() + " issued server command: " + s);
|
this.c.info(this.player.getName() + " issued server command: " + s);
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
From 429ac7e3e8cbd6989d11f6d34f280899b1f98748 Mon Sep 17 00:00:00 2001
|
From 68e5367a039241677a762a1af4b76c90a5ef6e53 Mon Sep 17 00:00:00 2001
|
||||||
From: md_5 <md_5@live.com.au>
|
From: md_5 <md_5@live.com.au>
|
||||||
Date: Fri, 21 Jun 2013 18:05:54 +1000
|
Date: Fri, 21 Jun 2013 18:05:54 +1000
|
||||||
Subject: [PATCH] Allow Disabling of Command TabComplete
|
Subject: [PATCH] Allow Disabling of Command TabComplete
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
index fa8ae87..3c83b5a 100644
|
index 58d52d8..905573c 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
@@ -1557,6 +1557,13 @@ public final class CraftServer implements Server {
|
@@ -1571,6 +1571,13 @@ public final class CraftServer implements Server {
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<String> tabCompleteCommand(Player player, String message) {
|
public List<String> tabCompleteCommand(Player player, String message) {
|
||||||
|
@ -1,32 +1,32 @@
|
|||||||
From 204d50e3026b1e3efb49eab3519636ef96ae5253 Mon Sep 17 00:00:00 2001
|
From 2697f8ced8ddd323cd47b8c74799dc4dafedc5a8 Mon Sep 17 00:00:00 2001
|
||||||
From: md_5 <md_5@live.com.au>
|
From: md_5 <md_5@live.com.au>
|
||||||
Date: Fri, 21 Jun 2013 19:21:58 +1000
|
Date: Fri, 21 Jun 2013 19:21:58 +1000
|
||||||
Subject: [PATCH] Configurable Messages
|
Subject: [PATCH] Configurable Messages
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/HandshakeListener.java b/src/main/java/net/minecraft/server/HandshakeListener.java
|
diff --git a/src/main/java/net/minecraft/server/HandshakeListener.java b/src/main/java/net/minecraft/server/HandshakeListener.java
|
||||||
index f8bac48..e036bc6 100644
|
index 98f40f1..8f421f3 100644
|
||||||
--- a/src/main/java/net/minecraft/server/HandshakeListener.java
|
--- a/src/main/java/net/minecraft/server/HandshakeListener.java
|
||||||
+++ b/src/main/java/net/minecraft/server/HandshakeListener.java
|
+++ b/src/main/java/net/minecraft/server/HandshakeListener.java
|
||||||
@@ -62,11 +62,11 @@ public class HandshakeListener implements PacketHandshakingInListener {
|
@@ -62,11 +62,11 @@ public class HandshakeListener implements PacketHandshakingInListener {
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
if (packethandshakinginsetprotocol.b() > 47) {
|
if (packethandshakinginsetprotocol.b() > 47) {
|
||||||
- chatcomponenttext = new ChatComponentText("Outdated server! I\'m still on 1.8");
|
- chatcomponenttext = new ChatComponentText("Outdated server! I\'m still on 1.8.3");
|
||||||
+ chatcomponenttext = new ChatComponentText( java.text.MessageFormat.format( org.spigotmc.SpigotConfig.outdatedServerMessage, "1.8" ) ); // Spigot
|
+ chatcomponenttext = new ChatComponentText( java.text.MessageFormat.format( org.spigotmc.SpigotConfig.outdatedServerMessage, "1.8.3" ) ); // Spigot
|
||||||
this.b.handle(new PacketLoginOutDisconnect(chatcomponenttext));
|
this.b.handle(new PacketLoginOutDisconnect(chatcomponenttext));
|
||||||
this.b.close(chatcomponenttext);
|
this.b.close(chatcomponenttext);
|
||||||
} else if (packethandshakinginsetprotocol.b() < 47) {
|
} else if (packethandshakinginsetprotocol.b() < 47) {
|
||||||
- chatcomponenttext = new ChatComponentText("Outdated client! Please use 1.8");
|
- chatcomponenttext = new ChatComponentText("Outdated client! Please use 1.8.3");
|
||||||
+ chatcomponenttext = new ChatComponentText(java.text.MessageFormat.format( org.spigotmc.SpigotConfig.outdatedClientMessage, "1.8" ) ); // Spigot
|
+ chatcomponenttext = new ChatComponentText( java.text.MessageFormat.format( org.spigotmc.SpigotConfig.outdatedClientMessage, "1.8.3" ) ); // Spigot
|
||||||
this.b.handle(new PacketLoginOutDisconnect(chatcomponenttext));
|
this.b.handle(new PacketLoginOutDisconnect(chatcomponenttext));
|
||||||
this.b.close(chatcomponenttext);
|
this.b.close(chatcomponenttext);
|
||||||
} else {
|
} else {
|
||||||
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
|
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
|
||||||
index f10cfa9..b29820c 100644
|
index 64b755d..e396288 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PlayerList.java
|
+++ b/src/main/java/net/minecraft/server/PlayerList.java
|
||||||
@@ -388,7 +388,7 @@ public abstract class PlayerList {
|
@@ -418,7 +418,7 @@ public abstract class PlayerList {
|
||||||
event.disallow(PlayerLoginEvent.Result.KICK_BANNED, s);
|
event.disallow(PlayerLoginEvent.Result.KICK_BANNED, s);
|
||||||
} else if (!this.isWhitelisted(gameprofile)) {
|
} else if (!this.isWhitelisted(gameprofile)) {
|
||||||
// return "You are not white-listed on this server!";
|
// return "You are not white-listed on this server!";
|
||||||
@ -35,7 +35,7 @@ index f10cfa9..b29820c 100644
|
|||||||
} else if (getIPBans().isBanned(socketaddress) && !getIPBans().get(socketaddress).hasExpired()) {
|
} else if (getIPBans().isBanned(socketaddress) && !getIPBans().get(socketaddress).hasExpired()) {
|
||||||
IpBanEntry ipbanentry = this.l.get(socketaddress);
|
IpBanEntry ipbanentry = this.l.get(socketaddress);
|
||||||
|
|
||||||
@@ -402,7 +402,7 @@ public abstract class PlayerList {
|
@@ -432,7 +432,7 @@ public abstract class PlayerList {
|
||||||
} else {
|
} else {
|
||||||
// return this.players.size() >= this.maxPlayers ? "The server is full!" : null;
|
// return this.players.size() >= this.maxPlayers ? "The server is full!" : null;
|
||||||
if (this.players.size() >= this.maxPlayers) {
|
if (this.players.size() >= this.maxPlayers) {
|
||||||
@ -45,7 +45,7 @@ index f10cfa9..b29820c 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
index 3c83b5a..18e736a 100644
|
index 905573c..f0453e6 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
@@ -628,11 +628,7 @@ public final class CraftServer implements Server {
|
@@ -628,11 +628,7 @@ public final class CraftServer implements Server {
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
From 8a7bd05a3ec26589a239e62d70cccc005095c620 Mon Sep 17 00:00:00 2001
|
From 1efa3a7b78341805aff195eedcce8094fca56682 Mon Sep 17 00:00:00 2001
|
||||||
From: md_5 <md_5@live.com.au>
|
From: md_5 <md_5@live.com.au>
|
||||||
Date: Sat, 22 Jun 2013 16:12:02 +1000
|
Date: Sat, 22 Jun 2013 16:12:02 +1000
|
||||||
Subject: [PATCH] Allow Disabling of Random Lighting Updates
|
Subject: [PATCH] Allow Disabling of Random Lighting Updates
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||||
index 9e65ff7..2e715b3 100644
|
index 92b25f0..ab971cf 100644
|
||||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||||
@@ -982,7 +982,7 @@ public class Chunk {
|
@@ -1011,7 +1011,7 @@ public class Chunk {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.p = true;
|
this.p = true;
|
||||||
@ -18,10 +18,10 @@ index 9e65ff7..2e715b3 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||||
index d85479b..dad3d19 100644
|
index 6a975d3..8fc5c71 100644
|
||||||
--- a/src/main/java/net/minecraft/server/World.java
|
--- a/src/main/java/net/minecraft/server/World.java
|
||||||
+++ b/src/main/java/net/minecraft/server/World.java
|
+++ b/src/main/java/net/minecraft/server/World.java
|
||||||
@@ -2017,7 +2017,7 @@ public abstract class World implements IBlockAccess {
|
@@ -2071,7 +2071,7 @@ public abstract class World implements IBlockAccess {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.methodProfiler.a("playerCheckLight");
|
this.methodProfiler.a("playerCheckLight");
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From e59b9c6809c13422cad7fe4d06bef09ed52b0451 Mon Sep 17 00:00:00 2001
|
From 1aee6e97da0635b4c3df6e10290b98ee9ae03850 Mon Sep 17 00:00:00 2001
|
||||||
From: md_5 <md_5@live.com.au>
|
From: md_5 <md_5@live.com.au>
|
||||||
Date: Thu, 27 Jun 2013 17:26:09 +1000
|
Date: Thu, 27 Jun 2013 17:26:09 +1000
|
||||||
Subject: [PATCH] Properly Close Inventories
|
Subject: [PATCH] Properly Close Inventories
|
||||||
@ -6,10 +6,10 @@ Subject: [PATCH] Properly Close Inventories
|
|||||||
Properly close inventories when unloading and switching worlds.
|
Properly close inventories when unloading and switching worlds.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||||
index 2e715b3..49eab04 100644
|
index ab971cf..5f07158 100644
|
||||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||||
@@ -796,6 +796,18 @@ public class Chunk {
|
@@ -820,6 +820,18 @@ public class Chunk {
|
||||||
|
|
||||||
while (iterator.hasNext()) {
|
while (iterator.hasNext()) {
|
||||||
TileEntity tileentity = (TileEntity) iterator.next();
|
TileEntity tileentity = (TileEntity) iterator.next();
|
||||||
@ -28,7 +28,7 @@ index 2e715b3..49eab04 100644
|
|||||||
|
|
||||||
this.world.b(tileentity);
|
this.world.b(tileentity);
|
||||||
}
|
}
|
||||||
@@ -806,6 +818,18 @@ public class Chunk {
|
@@ -830,6 +842,18 @@ public class Chunk {
|
||||||
java.util.Iterator<Entity> iter = newList.iterator();
|
java.util.Iterator<Entity> iter = newList.iterator();
|
||||||
while (iter.hasNext()) {
|
while (iter.hasNext()) {
|
||||||
Entity entity = iter.next();
|
Entity entity = iter.next();
|
||||||
@ -48,10 +48,10 @@ index 2e715b3..49eab04 100644
|
|||||||
// Do not pass along players, as doing so can get them stuck outside of time.
|
// Do not pass along players, as doing so can get them stuck outside of time.
|
||||||
// (which for example disables inventory icon updates and prevents block breaking)
|
// (which for example disables inventory icon updates and prevents block breaking)
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityMinecartContainer.java b/src/main/java/net/minecraft/server/EntityMinecartContainer.java
|
diff --git a/src/main/java/net/minecraft/server/EntityMinecartContainer.java b/src/main/java/net/minecraft/server/EntityMinecartContainer.java
|
||||||
index ab1b3a5..bf882de 100644
|
index 712018a..17b5714 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityMinecartContainer.java
|
--- a/src/main/java/net/minecraft/server/EntityMinecartContainer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityMinecartContainer.java
|
+++ b/src/main/java/net/minecraft/server/EntityMinecartContainer.java
|
||||||
@@ -124,6 +124,12 @@ public abstract class EntityMinecartContainer extends EntityMinecartAbstract imp
|
@@ -127,6 +127,12 @@ public abstract class EntityMinecartContainer extends EntityMinecartAbstract imp
|
||||||
}
|
}
|
||||||
|
|
||||||
public void c(int i) {
|
public void c(int i) {
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
From 53f8e931acadf9c42c011e9fa779829ac8810d1a Mon Sep 17 00:00:00 2001
|
From 35548f6d4f97ccfd58b93c6758e5bcf5b07c12ca Mon Sep 17 00:00:00 2001
|
||||||
From: md_5 <md_5@live.com.au>
|
From: md_5 <md_5@live.com.au>
|
||||||
Date: Fri, 28 Jun 2013 19:52:54 +1000
|
Date: Fri, 28 Jun 2013 19:52:54 +1000
|
||||||
Subject: [PATCH] Disallow Interaction With Self
|
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
|
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||||
index 6a96c37..1a2c8f8 100644
|
index 9afd03f..a868a19 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||||
@@ -1179,6 +1179,13 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
|
@@ -1198,6 +1198,13 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
|
||||||
PlayerConnectionUtils.ensureMainThread(packetplayinuseentity, this, this.player.u());
|
PlayerConnectionUtils.ensureMainThread(packetplayinuseentity, this, this.player.u());
|
||||||
WorldServer worldserver = this.minecraftServer.getWorldServer(this.player.dimension);
|
WorldServer worldserver = this.minecraftServer.getWorldServer(this.player.dimension);
|
||||||
Entity entity = packetplayinuseentity.a((World) worldserver);
|
Entity entity = packetplayinuseentity.a((World) worldserver);
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
From 6c0d9ff5e5043eccd210f7f838a9ad0c80e57f77 Mon Sep 17 00:00:00 2001
|
From b52a30de982b0edca30416c5075cc4228fb76cf2 Mon Sep 17 00:00:00 2001
|
||||||
From: md_5 <md_5@live.com.au>
|
From: md_5 <md_5@live.com.au>
|
||||||
Date: Tue, 2 Jul 2013 20:32:49 +1000
|
Date: Tue, 2 Jul 2013 20:32:49 +1000
|
||||||
Subject: [PATCH] Entity Mount and Dismount Events
|
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
|
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||||
index 9dcddb1..8f7d865 100644
|
index ebdcaab..5cf3833 100644
|
||||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||||
@@ -1537,6 +1537,7 @@ public abstract class Entity implements ICommandListener {
|
@@ -1540,6 +1540,7 @@ public abstract class Entity implements ICommandListener {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
@ -16,7 +16,7 @@ index 9dcddb1..8f7d865 100644
|
|||||||
this.setPositionRotation(this.vehicle.locX, this.vehicle.getBoundingBox().b + (double) this.vehicle.length, this.vehicle.locZ, this.yaw, this.pitch);
|
this.setPositionRotation(this.vehicle.locX, this.vehicle.getBoundingBox().b + (double) this.vehicle.length, this.vehicle.locZ, this.yaw, this.pitch);
|
||||||
this.vehicle.passenger = null;
|
this.vehicle.passenger = null;
|
||||||
}
|
}
|
||||||
@@ -1571,6 +1572,18 @@ public abstract class Entity implements ICommandListener {
|
@@ -1574,6 +1575,18 @@ public abstract class Entity implements ICommandListener {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From e8cfec1c1b15854e523489b9fa2a79980ce613cb Mon Sep 17 00:00:00 2001
|
From d2dadf6c02543ca71f6f8b85e5cb2f6046dbbc12 Mon Sep 17 00:00:00 2001
|
||||||
From: Alex Ciuba <alexciuba@gmail.com>
|
From: Alex Ciuba <alexciuba@gmail.com>
|
||||||
Date: Tue, 11 Jun 2013 15:23:03 -0400
|
Date: Tue, 11 Jun 2013 15:23:03 -0400
|
||||||
Subject: [PATCH] Prevent Ghost Players Caused by Plugins
|
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
|
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
|
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
|
||||||
index b29820c..74091d5 100644
|
index e396288..f24739d 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PlayerList.java
|
+++ b/src/main/java/net/minecraft/server/PlayerList.java
|
||||||
@@ -515,6 +515,11 @@ public abstract class PlayerList {
|
@@ -548,6 +548,11 @@ public abstract class PlayerList {
|
||||||
Player respawnPlayer = cserver.getPlayer(entityplayer1);
|
Player respawnPlayer = cserver.getPlayer(entityplayer1);
|
||||||
PlayerRespawnEvent respawnEvent = new PlayerRespawnEvent(respawnPlayer, location, isBedSpawn);
|
PlayerRespawnEvent respawnEvent = new PlayerRespawnEvent(respawnPlayer, location, isBedSpawn);
|
||||||
cserver.getPluginManager().callEvent(respawnEvent);
|
cserver.getPluginManager().callEvent(respawnEvent);
|
||||||
|
@ -1,19 +1,19 @@
|
|||||||
From 4fd9b5495f938f14b6b258b1ede36292ed333fb5 Mon Sep 17 00:00:00 2001
|
From b61ff25808179d81c140fdff162e6e84f1e43fab Mon Sep 17 00:00:00 2001
|
||||||
From: md_5 <md_5@live.com.au>
|
From: md_5 <md_5@live.com.au>
|
||||||
Date: Sat, 3 Aug 2013 19:02:59 +1000
|
Date: Sat, 3 Aug 2013 19:02:59 +1000
|
||||||
Subject: [PATCH] Plug World Unload Memory Leak
|
Subject: [PATCH] Plug World Unload Memory Leak
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/BlockRedstoneTorch.java b/src/main/java/net/minecraft/server/BlockRedstoneTorch.java
|
diff --git a/src/main/java/net/minecraft/server/BlockRedstoneTorch.java b/src/main/java/net/minecraft/server/BlockRedstoneTorch.java
|
||||||
index 2cdf7d3..6acfb62 100644
|
index 125cefe..6a7e7b3 100644
|
||||||
--- a/src/main/java/net/minecraft/server/BlockRedstoneTorch.java
|
--- a/src/main/java/net/minecraft/server/BlockRedstoneTorch.java
|
||||||
+++ b/src/main/java/net/minecraft/server/BlockRedstoneTorch.java
|
+++ b/src/main/java/net/minecraft/server/BlockRedstoneTorch.java
|
||||||
@@ -10,7 +10,7 @@ import org.bukkit.event.block.BlockRedstoneEvent; // CraftBukkit
|
@@ -10,7 +10,7 @@ import org.bukkit.event.block.BlockRedstoneEvent; // CraftBukkit
|
||||||
|
|
||||||
public class BlockRedstoneTorch extends BlockTorch {
|
public class BlockRedstoneTorch extends BlockTorch {
|
||||||
|
|
||||||
- private static Map b = Maps.newHashMap();
|
- private static Map<World, List<BlockRedstoneTorch.RedstoneUpdateInfo>> b = Maps.newHashMap();
|
||||||
+ private static Map b = new java.util.WeakHashMap(); // Spigot
|
+ private static Map<World, List<BlockRedstoneTorch.RedstoneUpdateInfo>> b = new java.util.WeakHashMap(); // Spigot
|
||||||
private final boolean isOn;
|
private final boolean isOn;
|
||||||
|
|
||||||
private boolean a(World world, BlockPosition blockposition, boolean flag) {
|
private boolean a(World world, BlockPosition blockposition, boolean flag) {
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
From b0a27025f00b99c90fd70dc7cfac95cde1b1e591 Mon Sep 17 00:00:00 2001
|
From a3aa58034bd77397a293f64aab4e88ac804917a2 Mon Sep 17 00:00:00 2001
|
||||||
From: md_5 <md_5@live.com.au>
|
From: md_5 <md_5@live.com.au>
|
||||||
Date: Sat, 3 Aug 2013 19:27:07 +1000
|
Date: Sat, 3 Aug 2013 19:27:07 +1000
|
||||||
Subject: [PATCH] Player Collision API
|
Subject: [PATCH] Player Collision API
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
|
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
|
||||||
index 7eb41e1..b65c225 100644
|
index 55340ab..96ed585 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityHuman.java
|
--- a/src/main/java/net/minecraft/server/EntityHuman.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
|
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
|
||||||
@@ -427,6 +427,7 @@ public abstract class EntityHuman extends EntityLiving {
|
@@ -427,6 +427,7 @@ public abstract class EntityHuman extends EntityLiving {
|
||||||
@ -25,20 +25,20 @@ index 7eb41e1..b65c225 100644
|
|||||||
|
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||||
index 89374d7..5edefa0 100644
|
index e90ff2f..ca0430d 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||||
@@ -1657,7 +1657,7 @@ public abstract class EntityLiving extends Entity {
|
@@ -1670,7 +1670,7 @@ public abstract class EntityLiving extends Entity {
|
||||||
protected void bK() {
|
}
|
||||||
List list = this.world.getEntities(this, this.getBoundingBox().grow(0.20000000298023224D, 0.0D, 0.20000000298023224D));
|
}));
|
||||||
|
|
||||||
- if (list != null && !list.isEmpty()) {
|
- if (!list.isEmpty()) {
|
||||||
+ if (this.ad() && list != null && !list.isEmpty()) { // Spigot: Add this.ad() condition
|
+ if (this.ad() && !list.isEmpty()) { // Spigot: Add this.ad() condition
|
||||||
for (int i = 0; i < list.size(); ++i) {
|
for (int i = 0; i < list.size(); ++i) {
|
||||||
Entity entity = (Entity) list.get(i);
|
Entity entity = (Entity) list.get(i);
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||||
index 1a51836..5c961ba 100644
|
index aefed46..657f3f5 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||||
@@ -62,6 +62,21 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
@@ -62,6 +62,21 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||||
@ -64,7 +64,7 @@ index 1a51836..5c961ba 100644
|
|||||||
public EntityPlayer(MinecraftServer minecraftserver, WorldServer worldserver, GameProfile gameprofile, PlayerInteractManager playerinteractmanager) {
|
public EntityPlayer(MinecraftServer minecraftserver, WorldServer worldserver, GameProfile gameprofile, PlayerInteractManager playerinteractmanager) {
|
||||||
super(worldserver, gameprofile);
|
super(worldserver, gameprofile);
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
index 9268686..dfef8cb 100644
|
index 5dafb80..3dc0255 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
@@ -1318,6 +1318,19 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@@ -1318,6 +1318,19 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
|
@ -1,25 +1,25 @@
|
|||||||
From 19a5fa4ce25bee4eb0dd9975b6f8343c5d381885 Mon Sep 17 00:00:00 2001
|
From 4bd1dd657b32a94cbc065a2189d77e5a7779732f Mon Sep 17 00:00:00 2001
|
||||||
From: agentk20 <agentkid20@gmail.com>
|
From: agentk20 <agentkid20@gmail.com>
|
||||||
Date: Sat, 3 Aug 2013 19:28:48 +1000
|
Date: Sat, 3 Aug 2013 19:28:48 +1000
|
||||||
Subject: [PATCH] Fully Disable Snooper When Not Required
|
Subject: [PATCH] Fully Disable Snooper When Not Required
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
index 76591fb..6ba24ac 100644
|
index 61abf67..b7a8a4c 100644
|
||||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
@@ -636,11 +636,11 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs
|
@@ -657,11 +657,11 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
|
||||||
this.g[this.ticks % 100] = System.nanoTime() - i;
|
this.h[this.ticks % 100] = System.nanoTime() - i;
|
||||||
this.methodProfiler.b();
|
this.methodProfiler.b();
|
||||||
this.methodProfiler.a("snooper");
|
this.methodProfiler.a("snooper");
|
||||||
- if (!this.m.d() && this.ticks > 100) {
|
- if (!this.n.d() && this.ticks > 100) {
|
||||||
+ if (getSnooperEnabled() && !this.m.d() && this.ticks > 100) { // Spigot
|
+ if (getSnooperEnabled() && !this.n.d() && this.ticks > 100) { // Spigot
|
||||||
this.m.a();
|
this.n.a();
|
||||||
}
|
}
|
||||||
|
|
||||||
- if (this.ticks % 6000 == 0) {
|
- if (this.ticks % 6000 == 0) {
|
||||||
+ if (getSnooperEnabled() && this.ticks % 6000 == 0) { // Spigot
|
+ if (getSnooperEnabled() && this.ticks % 6000 == 0) { // Spigot
|
||||||
this.m.b();
|
this.n.b();
|
||||||
}
|
}
|
||||||
|
|
||||||
--
|
--
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From f4f4d9c8ac1cb7b1da1ec97f5251050c59b23b87 Mon Sep 17 00:00:00 2001
|
From 49d817977c0e7021a305e98a9df7d3575f1c298e Mon Sep 17 00:00:00 2001
|
||||||
From: DerFlash <bte@freenet.de>
|
From: DerFlash <bte@freenet.de>
|
||||||
Date: Sat, 3 Aug 2013 19:53:48 +1000
|
Date: Sat, 3 Aug 2013 19:53:48 +1000
|
||||||
Subject: [PATCH] Add Getter for Entity Invulnerability
|
Subject: [PATCH] Add Getter for Entity Invulnerability
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
From eb503329561dc70abbcfc1e3166af1232927499e Mon Sep 17 00:00:00 2001
|
From 8ac4f210d0dd342a3569297679026acda3533ba2 Mon Sep 17 00:00:00 2001
|
||||||
From: md_5 <md_5@live.com.au>
|
From: md_5 <md_5@live.com.au>
|
||||||
Date: Mon, 5 Aug 2013 20:17:20 +1000
|
Date: Mon, 5 Aug 2013 20:17:20 +1000
|
||||||
Subject: [PATCH] Cap Minimum Player Speed
|
Subject: [PATCH] Cap Minimum Player Speed
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
index dfef8cb..348b6e2 100644
|
index 3dc0255..027ca4d 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
@@ -1182,7 +1182,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@@ -1182,7 +1182,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
From ff433233faf63a2d234c73c6e54aef64e3a463e0 Mon Sep 17 00:00:00 2001
|
From 68e60e378b8ac8c3799012194a71f417f9726159 Mon Sep 17 00:00:00 2001
|
||||||
From: md_5 <md_5@live.com.au>
|
From: md_5 <md_5@live.com.au>
|
||||||
Date: Sat, 14 Sep 2013 10:16:38 +1000
|
Date: Sat, 14 Sep 2013 10:16:38 +1000
|
||||||
Subject: [PATCH] Update Inventory and Health for PlayerConsumeItemEvent
|
Subject: [PATCH] Update Inventory and Health for PlayerConsumeItemEvent
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
|
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
|
||||||
index b65c225..eaa5879 100644
|
index 96ed585..2004d67 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityHuman.java
|
--- a/src/main/java/net/minecraft/server/EntityHuman.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
|
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
|
||||||
@@ -300,6 +300,10 @@ public abstract class EntityHuman extends EntityLiving {
|
@@ -300,6 +300,10 @@ public abstract class EntityHuman extends EntityLiving {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From a4bd9805229e2bf5fe1484c7396c372969a85977 Mon Sep 17 00:00:00 2001
|
From 83d50f5bf12811352b54643722ddfc0348a5c658 Mon Sep 17 00:00:00 2001
|
||||||
From: BlackHole <black-hole@live.com>
|
From: BlackHole <black-hole@live.com>
|
||||||
Date: Tue, 16 Jul 2013 22:34:50 +0200
|
Date: Tue, 16 Jul 2013 22:34:50 +0200
|
||||||
Subject: [PATCH] Call EntityChangeBlockEvent for Fire Arrows hitting TNT
|
Subject: [PATCH] Call EntityChangeBlockEvent for Fire Arrows hitting TNT
|
||||||
@ -6,7 +6,7 @@ Subject: [PATCH] Call EntityChangeBlockEvent for Fire Arrows hitting TNT
|
|||||||
Adds BUKKIT-4355
|
Adds BUKKIT-4355
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/BlockTNT.java b/src/main/java/net/minecraft/server/BlockTNT.java
|
diff --git a/src/main/java/net/minecraft/server/BlockTNT.java b/src/main/java/net/minecraft/server/BlockTNT.java
|
||||||
index cc61759..7443873 100644
|
index f15b199..40c0a87 100644
|
||||||
--- a/src/main/java/net/minecraft/server/BlockTNT.java
|
--- a/src/main/java/net/minecraft/server/BlockTNT.java
|
||||||
+++ b/src/main/java/net/minecraft/server/BlockTNT.java
|
+++ b/src/main/java/net/minecraft/server/BlockTNT.java
|
||||||
@@ -77,6 +77,11 @@ public class BlockTNT extends Block {
|
@@ -77,6 +77,11 @@ public class BlockTNT extends Block {
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
From ed80edcc31f4e5b9ca408c38dac3b1fafdd78484 Mon Sep 17 00:00:00 2001
|
From 9fe0e6a0eb3e48eb3b1668c800cba2b45dd052a4 Mon Sep 17 00:00:00 2001
|
||||||
From: md_5 <md_5@live.com.au>
|
From: md_5 <md_5@live.com.au>
|
||||||
Date: Sat, 21 Sep 2013 12:33:09 +1000
|
Date: Sat, 21 Sep 2013 12:33:09 +1000
|
||||||
Subject: [PATCH] Allow Disabling of 1.6.3 Structure Saving
|
Subject: [PATCH] Allow Disabling of 1.6.3 Structure Saving
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/StructureGenerator.java b/src/main/java/net/minecraft/server/StructureGenerator.java
|
diff --git a/src/main/java/net/minecraft/server/StructureGenerator.java b/src/main/java/net/minecraft/server/StructureGenerator.java
|
||||||
index 49b7aa1..ecab5d1 100644
|
index 0bced98..bb1a11e 100644
|
||||||
--- a/src/main/java/net/minecraft/server/StructureGenerator.java
|
--- a/src/main/java/net/minecraft/server/StructureGenerator.java
|
||||||
+++ b/src/main/java/net/minecraft/server/StructureGenerator.java
|
+++ b/src/main/java/net/minecraft/server/StructureGenerator.java
|
||||||
@@ -171,7 +171,15 @@ public abstract class StructureGenerator extends WorldGenBase {
|
@@ -195,7 +195,15 @@ public abstract class StructureGenerator extends WorldGenBase {
|
||||||
|
|
||||||
private void a(World world) {
|
private void a(World world) {
|
||||||
if (this.d == null) {
|
if (this.d == null) {
|
||||||
|
@ -1,19 +1,19 @@
|
|||||||
From 867901c33416a8b9b4522a83a95db7b15dc928b0 Mon Sep 17 00:00:00 2001
|
From 37d47654d1062f881edd92496fb62005521b8127 Mon Sep 17 00:00:00 2001
|
||||||
From: md_5 <md_5@live.com.au>
|
From: md_5 <md_5@live.com.au>
|
||||||
Date: Sun, 22 Sep 2013 19:10:53 +1000
|
Date: Sun, 22 Sep 2013 19:10:53 +1000
|
||||||
Subject: [PATCH] Item Despawn Rate
|
Subject: [PATCH] Item Despawn Rate
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java
|
diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java
|
||||||
index 652b803..81bba48 100644
|
index 65a03df..d6d83fe 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityItem.java
|
--- a/src/main/java/net/minecraft/server/EntityItem.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityItem.java
|
+++ b/src/main/java/net/minecraft/server/EntityItem.java
|
||||||
@@ -108,7 +108,7 @@ public class EntityItem extends Entity {
|
@@ -109,7 +109,7 @@ public class EntityItem extends Entity {
|
||||||
// Craftbukkit end */
|
|
||||||
|
|
||||||
this.W();
|
this.W();
|
||||||
- if (!this.world.isStatic && this.age >= 6000) {
|
- if (!this.world.isClientSide && this.age >= 6000) {
|
||||||
+ if (!this.world.isStatic && this.age >= world.spigotConfig.itemDespawnRate) { // Spigot
|
+ if (!this.world.isClientSide && this.age >= world.spigotConfig.itemDespawnRate) { // Spigot
|
||||||
// CraftBukkit start - fire ItemDespawnEvent
|
// CraftBukkit start - fire ItemDespawnEvent
|
||||||
if (org.bukkit.craftbukkit.event.CraftEventFactory.callItemDespawnEvent(this).isCancelled()) {
|
if (org.bukkit.craftbukkit.event.CraftEventFactory.callItemDespawnEvent(this).isCancelled()) {
|
||||||
this.age = 0;
|
this.age = 0;
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
From 72172cc543759a0be6d71c589a72a54d87234db2 Mon Sep 17 00:00:00 2001
|
From b1712073a0f13630cfb261c29299ccc1328d8d02 Mon Sep 17 00:00:00 2001
|
||||||
From: md_5 <md_5@live.com.au>
|
From: md_5 <md_5@live.com.au>
|
||||||
Date: Sun, 6 Oct 2013 17:36:28 +1100
|
Date: Sun, 6 Oct 2013 17:36:28 +1100
|
||||||
Subject: [PATCH] Don't Special Case X Move Value
|
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
|
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||||
index 1a2c8f8..c30e96e 100644
|
index a868a19..9fa0e67 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||||
@@ -108,6 +108,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
|
@@ -109,6 +109,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
|
||||||
private float lastPitch = Float.MAX_VALUE;
|
private float lastPitch = Float.MAX_VALUE;
|
||||||
private float lastYaw = Float.MAX_VALUE;
|
private float lastYaw = Float.MAX_VALUE;
|
||||||
private boolean justTeleported = false;
|
private boolean justTeleported = false;
|
||||||
@ -16,7 +16,7 @@ index 1a2c8f8..c30e96e 100644
|
|||||||
|
|
||||||
public CraftPlayer getPlayer() {
|
public CraftPlayer getPlayer() {
|
||||||
return (this.player == null) ? null : (CraftPlayer) this.player.getBukkitEntity();
|
return (this.player == null) ? null : (CraftPlayer) this.player.getBukkitEntity();
|
||||||
@@ -209,6 +210,18 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
|
@@ -219,6 +220,18 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
|
||||||
}
|
}
|
||||||
// CraftBukkit start - fire PlayerMoveEvent
|
// CraftBukkit start - fire PlayerMoveEvent
|
||||||
Player player = this.getPlayer();
|
Player player = this.getPlayer();
|
||||||
@ -35,7 +35,7 @@ index 1a2c8f8..c30e96e 100644
|
|||||||
Location from = new Location(player.getWorld(), lastPosX, lastPosY, lastPosZ, lastYaw, lastPitch); // Get the Players previous Event location.
|
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.
|
Location to = player.getLocation().clone(); // Start off the To location as the Players current location.
|
||||||
|
|
||||||
@@ -237,7 +250,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
|
@@ -247,7 +260,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
|
||||||
this.lastPitch = to.getPitch();
|
this.lastPitch = to.getPitch();
|
||||||
|
|
||||||
// Skip the first time we do this
|
// Skip the first time we do this
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
From c49b50666a4ad0e35112cdd1a3e5904e749ebe79 Mon Sep 17 00:00:00 2001
|
From e779bd6a7bcec77b4cafc43b02749891a844c57f Mon Sep 17 00:00:00 2001
|
||||||
From: ninja- <xninja@openmailbox.org>
|
From: ninja- <xninja@openmailbox.org>
|
||||||
Date: Tue, 8 Oct 2013 14:34:49 +0200
|
Date: Tue, 8 Oct 2013 14:34:49 +0200
|
||||||
Subject: [PATCH] Implement respawn API.
|
Subject: [PATCH] Implement respawn API.
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
index 348b6e2..272f7df 100644
|
index 027ca4d..00043de 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
@@ -1331,6 +1331,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@@ -1331,6 +1331,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
|
@ -1,22 +1,22 @@
|
|||||||
From 447d33d7376eae95e7a492d463c8e326bd6528e6 Mon Sep 17 00:00:00 2001
|
From c9433b9cc24018bc3fb0c172a7792aebc8bbf536 Mon Sep 17 00:00:00 2001
|
||||||
From: md_5 <md_5@live.com.au>
|
From: md_5 <md_5@live.com.au>
|
||||||
Date: Mon, 14 Oct 2013 19:20:10 +1100
|
Date: Mon, 14 Oct 2013 19:20:10 +1100
|
||||||
Subject: [PATCH] Arrow Despawn Rate
|
Subject: [PATCH] Arrow Despawn Rate
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityArrow.java b/src/main/java/net/minecraft/server/EntityArrow.java
|
diff --git a/src/main/java/net/minecraft/server/EntityArrow.java b/src/main/java/net/minecraft/server/EntityArrow.java
|
||||||
index 6e5450a..ead7eef 100644
|
index 01c66e3..46f6374 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityArrow.java
|
--- a/src/main/java/net/minecraft/server/EntityArrow.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityArrow.java
|
+++ b/src/main/java/net/minecraft/server/EntityArrow.java
|
||||||
@@ -155,7 +155,7 @@ public class EntityArrow extends Entity implements IProjectile {
|
@@ -155,7 +155,7 @@ public class EntityArrow extends Entity implements IProjectile {
|
||||||
|
|
||||||
if (block == this.g && i == this.h) {
|
if (block == this.g && i == this.h) {
|
||||||
++this.ap;
|
++this.ar;
|
||||||
- if (this.ap >= 1200) {
|
- if (this.ar >= 1200) {
|
||||||
+ if (this.ap >= world.spigotConfig.arrowDespawnRate) { // Spigot - First int after shooter
|
+ if (this.ar >= world.spigotConfig.arrowDespawnRate) { // Spigot - First int after shooter
|
||||||
this.die();
|
this.die();
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
||||||
index a5786ea..af0c4b2 100644
|
index a5786ea..af0c4b2 100644
|
||||||
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
||||||
|
@ -1,25 +1,25 @@
|
|||||||
From 2bde17cffe96cc498b18d34c312cb4716abb52a6 Mon Sep 17 00:00:00 2001
|
From ac1c585ef55565675089fe2fd8e73955f6f94532 Mon Sep 17 00:00:00 2001
|
||||||
From: md_5 <md_5@live.com.au>
|
From: md_5 <md_5@live.com.au>
|
||||||
Date: Sun, 1 Dec 2013 17:52:14 +1100
|
Date: Sun, 1 Dec 2013 17:52:14 +1100
|
||||||
Subject: [PATCH] Fix packed ice generation
|
Subject: [PATCH] Fix packed ice generation
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/WorldGenPackedIce2.java b/src/main/java/net/minecraft/server/WorldGenPackedIce2.java
|
diff --git a/src/main/java/net/minecraft/server/WorldGenPackedIce2.java b/src/main/java/net/minecraft/server/WorldGenPackedIce2.java
|
||||||
index 38e9602..3d08a82 100644
|
index dcd085a..3d08a82 100644
|
||||||
--- a/src/main/java/net/minecraft/server/WorldGenPackedIce2.java
|
--- a/src/main/java/net/minecraft/server/WorldGenPackedIce2.java
|
||||||
+++ b/src/main/java/net/minecraft/server/WorldGenPackedIce2.java
|
+++ b/src/main/java/net/minecraft/server/WorldGenPackedIce2.java
|
||||||
@@ -40,13 +40,13 @@ public class WorldGenPackedIce2 extends WorldGenerator {
|
@@ -40,13 +40,13 @@ public class WorldGenPackedIce2 extends WorldGenerator {
|
||||||
Block block = world.getType(blockposition.a(i1, k, j1)).getBlock();
|
Block block = world.getType(blockposition.a(i1, k, j1)).getBlock();
|
||||||
|
|
||||||
if (block.getMaterial() == Material.AIR || block == Blocks.DIRT || block == Blocks.SNOW || block == Blocks.ICE) {
|
if (block.getMaterial() == Material.AIR || block == Blocks.DIRT || block == Blocks.SNOW || block == Blocks.ICE) {
|
||||||
- this.a(world, blockposition.a(i1, k, j1), Blocks.PACKED_ICE);
|
- this.a(world, blockposition.a(i1, k, j1), Blocks.PACKED_ICE.getBlockData());
|
||||||
+ world.setTypeUpdate(blockposition.a(i1, k, j1), Blocks.PACKED_ICE.getBlockData()); // Spigot
|
+ world.setTypeUpdate(blockposition.a(i1, k, j1), Blocks.PACKED_ICE.getBlockData()); // Spigot
|
||||||
}
|
}
|
||||||
|
|
||||||
if (k != 0 && l > 1) {
|
if (k != 0 && l > 1) {
|
||||||
block = world.getType(blockposition.a(i1, -k, j1)).getBlock();
|
block = world.getType(blockposition.a(i1, -k, j1)).getBlock();
|
||||||
if (block.getMaterial() == Material.AIR || block == Blocks.DIRT || block == Blocks.SNOW || block == Blocks.ICE) {
|
if (block.getMaterial() == Material.AIR || block == Blocks.DIRT || block == Blocks.SNOW || block == Blocks.ICE) {
|
||||||
- this.a(world, blockposition.a(i1, -k, j1), Blocks.PACKED_ICE);
|
- this.a(world, blockposition.a(i1, -k, j1), Blocks.PACKED_ICE.getBlockData());
|
||||||
+ world.setTypeUpdate(blockposition.a(i1, -k, j1), Blocks.PACKED_ICE.getBlockData()); // Spigot
|
+ world.setTypeUpdate(blockposition.a(i1, -k, j1), Blocks.PACKED_ICE.getBlockData()); // Spigot
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -28,7 +28,7 @@ index 38e9602..3d08a82 100644
|
|||||||
Block block1 = world.getType(blockposition1).getBlock();
|
Block block1 = world.getType(blockposition1).getBlock();
|
||||||
|
|
||||||
if (block1.getMaterial() == Material.AIR || block1 == Blocks.DIRT || block1 == Blocks.SNOW || block1 == Blocks.ICE || block1 == Blocks.PACKED_ICE) {
|
if (block1.getMaterial() == Material.AIR || block1 == Blocks.DIRT || block1 == Blocks.SNOW || block1 == Blocks.ICE || block1 == Blocks.PACKED_ICE) {
|
||||||
- this.a(world, blockposition1, Blocks.PACKED_ICE);
|
- this.a(world, blockposition1, Blocks.PACKED_ICE.getBlockData());
|
||||||
+ world.setTypeUpdate(blockposition1, Blocks.PACKED_ICE.getBlockData()); // Spigot
|
+ world.setTypeUpdate(blockposition1, Blocks.PACKED_ICE.getBlockData()); // Spigot
|
||||||
blockposition1 = blockposition1.down();
|
blockposition1 = blockposition1.down();
|
||||||
--l1;
|
--l1;
|
||||||
|
@ -1,35 +1,35 @@
|
|||||||
From a14b8d2bee4eff2100f569903a2c6d2427edb216 Mon Sep 17 00:00:00 2001
|
From 6e9323fac10fa52d12de38ee61b2aaccc1ff3bec Mon Sep 17 00:00:00 2001
|
||||||
From: md_5 <md_5@live.com.au>
|
From: md_5 <md_5@live.com.au>
|
||||||
Date: Tue, 5 Aug 2014 17:20:19 +0100
|
Date: Tue, 5 Aug 2014 17:20:19 +0100
|
||||||
Subject: [PATCH] Watchdog Thread.
|
Subject: [PATCH] Watchdog Thread.
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
|
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||||
index 390c6eb..240c909 100644
|
index 1e682e9..ae9e255 100644
|
||||||
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
|
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
|
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||||
@@ -225,7 +225,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
|
@@ -271,7 +271,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
|
||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
- if (this.aQ() > 0L) {
|
- if (this.aR() > 0L) {
|
||||||
+ if (false && this.aQ() > 0L) { // Spigot - disable
|
+ if (false && this.aR() > 0L) { // Spigot - disable
|
||||||
Thread thread = new Thread(new ThreadWatchdog(this));
|
Thread thread1 = new Thread(new ThreadWatchdog(this));
|
||||||
|
|
||||||
thread.setName("Server Watchdog");
|
thread1.setName("Server Watchdog");
|
||||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
index 6ba24ac..84f27a3 100644
|
index b7a8a4c..bcdd918 100644
|
||||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
@@ -546,6 +546,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs
|
@@ -567,6 +567,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
|
||||||
this.a(crashreport);
|
this.a(crashreport);
|
||||||
} finally {
|
} finally {
|
||||||
try {
|
try {
|
||||||
+ org.spigotmc.WatchdogThread.doStop();
|
+ org.spigotmc.WatchdogThread.doStop();
|
||||||
this.stop();
|
|
||||||
this.isStopped = true;
|
this.isStopped = true;
|
||||||
|
this.stop();
|
||||||
} catch (Throwable throwable1) {
|
} catch (Throwable throwable1) {
|
||||||
@@ -646,6 +647,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs
|
@@ -667,6 +668,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
|
||||||
|
|
||||||
this.methodProfiler.b();
|
this.methodProfiler.b();
|
||||||
this.methodProfiler.b();
|
this.methodProfiler.b();
|
||||||
@ -39,7 +39,7 @@ index 6ba24ac..84f27a3 100644
|
|||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/spigotmc/RestartCommand.java b/src/main/java/org/spigotmc/RestartCommand.java
|
diff --git a/src/main/java/org/spigotmc/RestartCommand.java b/src/main/java/org/spigotmc/RestartCommand.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000..429c258
|
index 0000000..429c2580
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/org/spigotmc/RestartCommand.java
|
+++ b/src/main/java/org/spigotmc/RestartCommand.java
|
||||||
@@ -0,0 +1,124 @@
|
@@ -0,0 +1,124 @@
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
From 289e193139e4dad6f37e57888e17a8471ed414cd Mon Sep 17 00:00:00 2001
|
From 5498542d2f34ab0718066833f973fb2b4f9de6b8 Mon Sep 17 00:00:00 2001
|
||||||
From: md_5 <md_5@live.com.au>
|
From: md_5 <md_5@live.com.au>
|
||||||
Date: Tue, 3 Dec 2013 11:07:48 +1100
|
Date: Tue, 3 Dec 2013 11:07:48 +1100
|
||||||
Subject: [PATCH] Clear Flower Pot on Drop
|
Subject: [PATCH] Clear Flower Pot on Drop
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/BlockFlowerPot.java b/src/main/java/net/minecraft/server/BlockFlowerPot.java
|
diff --git a/src/main/java/net/minecraft/server/BlockFlowerPot.java b/src/main/java/net/minecraft/server/BlockFlowerPot.java
|
||||||
index d1275a3..0fdfdde 100644
|
index fd77047..ce46138 100644
|
||||||
--- a/src/main/java/net/minecraft/server/BlockFlowerPot.java
|
--- a/src/main/java/net/minecraft/server/BlockFlowerPot.java
|
||||||
+++ b/src/main/java/net/minecraft/server/BlockFlowerPot.java
|
+++ b/src/main/java/net/minecraft/server/BlockFlowerPot.java
|
||||||
@@ -90,6 +90,7 @@ public class BlockFlowerPot extends BlockContainer {
|
@@ -95,6 +95,7 @@ public class BlockFlowerPot extends BlockContainer {
|
||||||
|
|
||||||
if (tileentityflowerpot != null && tileentityflowerpot.b() != null) {
|
if (tileentityflowerpot != null && tileentityflowerpot.b() != null) {
|
||||||
a(world, blockposition, new ItemStack(tileentityflowerpot.b(), 1, tileentityflowerpot.c()));
|
a(world, blockposition, new ItemStack(tileentityflowerpot.b(), 1, tileentityflowerpot.c()));
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
From 922374f93b9f94b020d7a461940293f8864390c0 Mon Sep 17 00:00:00 2001
|
From d57ae577426a74a98f9b776aceffad9ae6297e9f Mon Sep 17 00:00:00 2001
|
||||||
From: Thinkofdeath <thethinkofdeath@gmail.com>
|
From: Thinkofdeath <thethinkofdeath@gmail.com>
|
||||||
Date: Mon, 2 Dec 2013 23:42:09 +0000
|
Date: Mon, 2 Dec 2013 23:42:09 +0000
|
||||||
Subject: [PATCH] Fix some chunks not being sent to the client
|
Subject: [PATCH] Fix some chunks not being sent to the client
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||||
index 49eab04..372d90f 100644
|
index 5f07158..b2ce05f 100644
|
||||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||||
@@ -1024,7 +1024,15 @@ public class Chunk {
|
@@ -1053,7 +1053,15 @@ public class Chunk {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isReady() {
|
public boolean isReady() {
|
||||||
|
@ -1,24 +1,22 @@
|
|||||||
From cafc66c0b55ab4064e949c5a70e16c2b5385c6fc Mon Sep 17 00:00:00 2001
|
From add640221c6a7a23228de32c3147fb2f0daa4cbd Mon Sep 17 00:00:00 2001
|
||||||
From: md_5 <md_5@live.com.au>
|
From: md_5 <md_5@live.com.au>
|
||||||
Date: Thu, 5 Dec 2013 13:55:53 +1100
|
Date: Thu, 5 Dec 2013 13:55:53 +1100
|
||||||
Subject: [PATCH] Fix Broken Async Chat
|
Subject: [PATCH] Fix Broken Async Chat
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/PacketPlayInChat.java b/src/main/java/net/minecraft/server/PacketPlayInChat.java
|
diff --git a/src/main/java/net/minecraft/server/PacketPlayInChat.java b/src/main/java/net/minecraft/server/PacketPlayInChat.java
|
||||||
index 8e1740d..cb614ef 100644
|
index 0ab90f3..18358b4 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PacketPlayInChat.java
|
--- a/src/main/java/net/minecraft/server/PacketPlayInChat.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PacketPlayInChat.java
|
+++ b/src/main/java/net/minecraft/server/PacketPlayInChat.java
|
||||||
@@ -30,7 +30,26 @@ public class PacketPlayInChat implements Packet {
|
@@ -24,7 +24,24 @@ public class PacketPlayInChat implements Packet<PacketListenerPlayIn> {
|
||||||
return this.a;
|
packetdataserializer.a(this.a);
|
||||||
}
|
}
|
||||||
|
|
||||||
- public void a(PacketListener packetlistener) {
|
- public void a(PacketListenerPlayIn packetlistenerplayin) {
|
||||||
+ // Spigot Start
|
+ // Spigot Start
|
||||||
+ private static final java.util.concurrent.ExecutorService executors = java.util.concurrent.Executors.newCachedThreadPool(
|
+ private static final java.util.concurrent.ExecutorService executors = java.util.concurrent.Executors.newCachedThreadPool(
|
||||||
+ new com.google.common.util.concurrent.ThreadFactoryBuilder().setDaemon( true ).setNameFormat( "Async Chat Thread - #%d" ).build() );
|
+ new com.google.common.util.concurrent.ThreadFactoryBuilder().setDaemon( true ).setNameFormat( "Async Chat Thread - #%d" ).build() );
|
||||||
+ @Override
|
+ public void a(final PacketListenerPlayIn packetlistenerplayin) {
|
||||||
+ public void a(final PacketListener packetlistener)
|
|
||||||
+ {
|
|
||||||
+ if ( !a.startsWith("/") )
|
+ if ( !a.startsWith("/") )
|
||||||
+ {
|
+ {
|
||||||
+ executors.submit( new Runnable()
|
+ executors.submit( new Runnable()
|
||||||
@ -27,15 +25,15 @@ index 8e1740d..cb614ef 100644
|
|||||||
+ @Override
|
+ @Override
|
||||||
+ public void run()
|
+ public void run()
|
||||||
+ {
|
+ {
|
||||||
+ PacketPlayInChat.this.a( (PacketListenerPlayIn) packetlistener );
|
+ packetlistenerplayin.a( PacketPlayInChat.this );
|
||||||
+ }
|
+ }
|
||||||
+ } );
|
+ } );
|
||||||
+ return;
|
+ return;
|
||||||
+ }
|
+ }
|
||||||
+ // Spigot End
|
+ // Spigot End
|
||||||
this.a((PacketListenerPlayIn) packetlistener);
|
packetlistenerplayin.a(this);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
--
|
--
|
||||||
2.1.0
|
2.1.0
|
||||||
|
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
From c58f0fe1ac9b081c3f140ea23bbde86dc31fe435 Mon Sep 17 00:00:00 2001
|
From 178ba754758e09c17d82ac88d52f0f86591f7142 Mon Sep 17 00:00:00 2001
|
||||||
From: md_5 <md_5@live.com.au>
|
From: md_5 <md_5@live.com.au>
|
||||||
Date: Thu, 16 May 2013 18:51:05 +1000
|
Date: Thu, 16 May 2013 18:51:05 +1000
|
||||||
Subject: [PATCH] Orebfuscator
|
Subject: [PATCH] Orebfuscator
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityFallingBlock.java b/src/main/java/net/minecraft/server/EntityFallingBlock.java
|
diff --git a/src/main/java/net/minecraft/server/EntityFallingBlock.java b/src/main/java/net/minecraft/server/EntityFallingBlock.java
|
||||||
index 22dc42d..fd78677 100644
|
index 9e0d5ad..ce91553 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityFallingBlock.java
|
--- a/src/main/java/net/minecraft/server/EntityFallingBlock.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityFallingBlock.java
|
+++ b/src/main/java/net/minecraft/server/EntityFallingBlock.java
|
||||||
@@ -60,6 +60,7 @@ public class EntityFallingBlock extends Entity {
|
@@ -60,6 +60,7 @@ public class EntityFallingBlock extends Entity {
|
||||||
@ -13,22 +13,22 @@ index 22dc42d..fd78677 100644
|
|||||||
if (this.world.getType(blockposition).getBlock() == block && !CraftEventFactory.callEntityChangeBlockEvent(this, blockposition.getX(), blockposition.getY(), blockposition.getZ(), Blocks.AIR, 0).isCancelled()) {
|
if (this.world.getType(blockposition).getBlock() == block && !CraftEventFactory.callEntityChangeBlockEvent(this, blockposition.getX(), blockposition.getY(), blockposition.getZ(), Blocks.AIR, 0).isCancelled()) {
|
||||||
this.world.setAir(blockposition);
|
this.world.setAir(blockposition);
|
||||||
+ world.spigotConfig.antiXrayInstance.updateNearbyBlocks(world, blockposition); // Spigot
|
+ world.spigotConfig.antiXrayInstance.updateNearbyBlocks(world, blockposition); // Spigot
|
||||||
} else if (!this.world.isStatic) {
|
} else if (!this.world.isClientSide) {
|
||||||
this.die();
|
this.die();
|
||||||
return;
|
return;
|
||||||
@@ -84,6 +85,7 @@ public class EntityFallingBlock extends Entity {
|
@@ -85,6 +86,7 @@ public class EntityFallingBlock extends Entity {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.world.setTypeAndData(blockposition, this.block, 3);
|
this.world.setTypeAndData(blockposition, this.block, 3);
|
||||||
+ world.spigotConfig.antiXrayInstance.updateNearbyBlocks(world, blockposition); // Spigot
|
+ world.spigotConfig.antiXrayInstance.updateNearbyBlocks(world, blockposition); // Spigot
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
if (block instanceof BlockFalling) {
|
if (block instanceof BlockFalling) {
|
||||||
((BlockFalling) block).a_(this.world, blockposition);
|
((BlockFalling) block).a_(this.world, blockposition);
|
||||||
diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java
|
diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java
|
||||||
index 85bd257..19759e8 100644
|
index 71c78bd..4564877 100644
|
||||||
--- a/src/main/java/net/minecraft/server/Explosion.java
|
--- a/src/main/java/net/minecraft/server/Explosion.java
|
||||||
+++ b/src/main/java/net/minecraft/server/Explosion.java
|
+++ b/src/main/java/net/minecraft/server/Explosion.java
|
||||||
@@ -198,6 +198,7 @@ public class Explosion {
|
@@ -194,6 +194,7 @@ public class Explosion {
|
||||||
blockposition = (BlockPosition) iterator.next();
|
blockposition = (BlockPosition) iterator.next();
|
||||||
Block block = this.world.getType(blockposition).getBlock();
|
Block block = this.world.getType(blockposition).getBlock();
|
||||||
|
|
||||||
@ -37,40 +37,40 @@ index 85bd257..19759e8 100644
|
|||||||
double d0 = (double) ((float) blockposition.getX() + this.world.random.nextFloat());
|
double d0 = (double) ((float) blockposition.getX() + this.world.random.nextFloat());
|
||||||
double d1 = (double) ((float) blockposition.getY() + this.world.random.nextFloat());
|
double d1 = (double) ((float) blockposition.getY() + this.world.random.nextFloat());
|
||||||
diff --git a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
|
diff --git a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
|
||||||
index e24d3ae..e106a1f 100644
|
index 6e368f5..58c0275 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
|
--- a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
|
+++ b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
|
||||||
@@ -18,6 +18,7 @@ public class PacketPlayOutMapChunk implements Packet {
|
@@ -19,6 +19,7 @@ public class PacketPlayOutMapChunk implements Packet<PacketListenerPlayOut> {
|
||||||
this.b = chunk.locZ;
|
this.b = chunk.locZ;
|
||||||
this.d = flag;
|
this.d = flag;
|
||||||
this.c = a(chunk, flag, !chunk.getWorld().worldProvider.o(), i);
|
this.c = a(chunk, flag, !chunk.getWorld().worldProvider.o(), i);
|
||||||
+ chunk.world.spigotConfig.antiXrayInstance.obfuscateSync(chunk.locX, chunk.locZ, c.b, c.a, chunk.world);
|
+ chunk.world.spigotConfig.antiXrayInstance.obfuscateSync(chunk.locX, chunk.locZ, c.b, c.a, chunk.world);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(PacketDataSerializer packetdataserializer) {
|
public void a(PacketDataSerializer packetdataserializer) throws IOException {
|
||||||
diff --git a/src/main/java/net/minecraft/server/PacketPlayOutMapChunkBulk.java b/src/main/java/net/minecraft/server/PacketPlayOutMapChunkBulk.java
|
diff --git a/src/main/java/net/minecraft/server/PacketPlayOutMapChunkBulk.java b/src/main/java/net/minecraft/server/PacketPlayOutMapChunkBulk.java
|
||||||
index 8af5e1f..9df0d53 100644
|
index 63b90f7..10c0e34 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PacketPlayOutMapChunkBulk.java
|
--- a/src/main/java/net/minecraft/server/PacketPlayOutMapChunkBulk.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PacketPlayOutMapChunkBulk.java
|
+++ b/src/main/java/net/minecraft/server/PacketPlayOutMapChunkBulk.java
|
||||||
@@ -8,6 +8,7 @@ public class PacketPlayOutMapChunkBulk implements Packet {
|
@@ -9,6 +9,7 @@ public class PacketPlayOutMapChunkBulk implements Packet<PacketListenerPlayOut>
|
||||||
private int[] b;
|
private int[] b;
|
||||||
private ChunkMap[] c;
|
private PacketPlayOutMapChunk.ChunkMap[] c;
|
||||||
private boolean d;
|
private boolean d;
|
||||||
+ private World world; // Spigot
|
+ private World world; // Spigot
|
||||||
|
|
||||||
public PacketPlayOutMapChunkBulk() {}
|
public PacketPlayOutMapChunkBulk() {}
|
||||||
|
|
||||||
@@ -27,7 +28,8 @@ public class PacketPlayOutMapChunkBulk implements Packet {
|
@@ -28,7 +29,8 @@ public class PacketPlayOutMapChunkBulk implements Packet<PacketListenerPlayOut>
|
||||||
this.b[j] = chunk.locZ;
|
this.b[j] = chunk.locZ;
|
||||||
this.c[j] = chunkmap;
|
this.c[j] = packetplayoutmapchunk_chunkmap;
|
||||||
}
|
}
|
||||||
-
|
-
|
||||||
+
|
+
|
||||||
+ world = ((Chunk) list.get(0)).getWorld(); // Spigot
|
+ world = ((Chunk) list.get(0)).getWorld(); // Spigot
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(PacketDataSerializer packetdataserializer) {
|
public void a(PacketDataSerializer packetdataserializer) throws IOException {
|
||||||
@@ -67,6 +69,7 @@ public class PacketPlayOutMapChunkBulk implements Packet {
|
@@ -68,6 +70,7 @@ public class PacketPlayOutMapChunkBulk implements Packet<PacketListenerPlayOut>
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < this.a.length; ++i) {
|
for (i = 0; i < this.a.length; ++i) {
|
||||||
@ -79,7 +79,7 @@ index 8af5e1f..9df0d53 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/PlayerInteractManager.java b/src/main/java/net/minecraft/server/PlayerInteractManager.java
|
diff --git a/src/main/java/net/minecraft/server/PlayerInteractManager.java b/src/main/java/net/minecraft/server/PlayerInteractManager.java
|
||||||
index b2431d9..7b469e1 100644
|
index 0301fba..7a84a95 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PlayerInteractManager.java
|
--- a/src/main/java/net/minecraft/server/PlayerInteractManager.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PlayerInteractManager.java
|
+++ b/src/main/java/net/minecraft/server/PlayerInteractManager.java
|
||||||
@@ -197,6 +197,7 @@ public class PlayerInteractManager {
|
@@ -197,6 +197,7 @@ public class PlayerInteractManager {
|
||||||
@ -91,10 +91,10 @@ index b2431d9..7b469e1 100644
|
|||||||
|
|
||||||
public void a(BlockPosition blockposition) {
|
public void a(BlockPosition blockposition) {
|
||||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||||
index dad3d19..f6b1dac 100644
|
index 8fc5c71..a4fda33 100644
|
||||||
--- a/src/main/java/net/minecraft/server/World.java
|
--- a/src/main/java/net/minecraft/server/World.java
|
||||||
+++ b/src/main/java/net/minecraft/server/World.java
|
+++ b/src/main/java/net/minecraft/server/World.java
|
||||||
@@ -460,6 +460,7 @@ public abstract class World implements IBlockAccess {
|
@@ -494,6 +494,7 @@ public abstract class World implements IBlockAccess {
|
||||||
this.d(blockposition.up(), block);
|
this.d(blockposition.up(), block);
|
||||||
this.d(blockposition.north(), block);
|
this.d(blockposition.north(), block);
|
||||||
this.d(blockposition.south(), block);
|
this.d(blockposition.south(), block);
|
||||||
@ -102,7 +102,7 @@ index dad3d19..f6b1dac 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void a(BlockPosition blockposition, Block block, EnumDirection enumdirection) {
|
public void a(BlockPosition blockposition, Block block, EnumDirection enumdirection) {
|
||||||
@@ -673,9 +674,16 @@ public abstract class World implements IBlockAccess {
|
@@ -719,9 +720,16 @@ public abstract class World implements IBlockAccess {
|
||||||
return this.worldProvider.p()[this.getLightLevel(blockposition)];
|
return this.worldProvider.p()[this.getLightLevel(blockposition)];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From c1863e84d7af9c8e328c2928f3db960ce2d7215a Mon Sep 17 00:00:00 2001
|
From 13c622659e5b7767c3240d9ab5f260252a5226b6 Mon Sep 17 00:00:00 2001
|
||||||
From: md_5 <git@md-5.net>
|
From: md_5 <git@md-5.net>
|
||||||
Date: Fri, 13 Dec 2013 11:45:47 +1100
|
Date: Fri, 13 Dec 2013 11:45:47 +1100
|
||||||
Subject: [PATCH] Optimize DataWatcher
|
Subject: [PATCH] Optimize DataWatcher
|
||||||
@ -6,69 +6,69 @@ Subject: [PATCH] Optimize DataWatcher
|
|||||||
Use primitive orientated collections, as well as more effective copies across collections.
|
Use primitive orientated collections, as well as more effective copies across collections.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/DataWatcher.java b/src/main/java/net/minecraft/server/DataWatcher.java
|
diff --git a/src/main/java/net/minecraft/server/DataWatcher.java b/src/main/java/net/minecraft/server/DataWatcher.java
|
||||||
index e21e68d..966d737 100644
|
index 2bf9196..aa46c28 100644
|
||||||
--- a/src/main/java/net/minecraft/server/DataWatcher.java
|
--- a/src/main/java/net/minecraft/server/DataWatcher.java
|
||||||
+++ b/src/main/java/net/minecraft/server/DataWatcher.java
|
+++ b/src/main/java/net/minecraft/server/DataWatcher.java
|
||||||
@@ -14,8 +14,13 @@ public class DataWatcher {
|
@@ -15,8 +15,13 @@ public class DataWatcher {
|
||||||
|
|
||||||
private final Entity a;
|
private final Entity a;
|
||||||
private boolean b = true;
|
private boolean b = true;
|
||||||
- private static final Map c = Maps.newHashMap();
|
- private static final Map<Class<?>, Integer> c = Maps.newHashMap();
|
||||||
- private final Map d = Maps.newHashMap();
|
- private final Map<Integer, DataWatcher.WatchableObject> d = Maps.newHashMap();
|
||||||
+ // Spigot Start
|
+ // Spigot Start
|
||||||
+ private static final gnu.trove.map.TObjectIntMap classToId = new gnu.trove.map.hash.TObjectIntHashMap( 10, 0.5f, -1 );
|
+ private static final gnu.trove.map.TObjectIntMap classToId = new gnu.trove.map.hash.TObjectIntHashMap( 10, 0.5f, -1 );
|
||||||
+ private final gnu.trove.map.TIntObjectMap dataValues = new gnu.trove.map.hash.TIntObjectHashMap( 10, 0.5f, -1 );
|
+ private final gnu.trove.map.TIntObjectMap dataValues = new gnu.trove.map.hash.TIntObjectHashMap( 10, 0.5f, -1 );
|
||||||
+ // These exist as an attempt at backwards compatability for (broken) NMS plugins
|
+ // These exist as an attempt at backwards compatability for (broken) NMS plugins
|
||||||
+ private static final Map c = gnu.trove.TDecorators.wrap( classToId );
|
+ private static final Map<Class<?>, Integer> c = gnu.trove.TDecorators.wrap( classToId );
|
||||||
+ private final Map d = gnu.trove.TDecorators.wrap( dataValues );
|
+ private final Map<Integer, DataWatcher.WatchableObject> d = gnu.trove.TDecorators.wrap( dataValues );
|
||||||
+ // Spigot End
|
+ // Spigot End
|
||||||
private boolean e;
|
private boolean e;
|
||||||
private ReadWriteLock f = new ReentrantReadWriteLock();
|
private ReadWriteLock f = new ReentrantReadWriteLock();
|
||||||
|
|
||||||
@@ -24,19 +29,19 @@ public class DataWatcher {
|
@@ -25,19 +30,19 @@ public class DataWatcher {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(int i, Object object) {
|
public <T> void a(int i, T t0) {
|
||||||
- Integer integer = (Integer) DataWatcher.c.get(object.getClass());
|
- Integer integer = (Integer) DataWatcher.c.get(t0.getClass());
|
||||||
+ int integer = classToId.get(object.getClass()); // Spigot
|
+ int integer = classToId.get(t0.getClass()); // Spigot
|
||||||
|
|
||||||
- if (integer == null) {
|
- if (integer == null) {
|
||||||
+ if (integer == -1) { // Spigot
|
+ if (integer == -1) { // Spigot
|
||||||
throw new IllegalArgumentException("Unknown data type: " + object.getClass());
|
throw new IllegalArgumentException("Unknown data type: " + t0.getClass());
|
||||||
} else if (i > 31) {
|
} else if (i > 31) {
|
||||||
throw new IllegalArgumentException("Data value id is too big with " + i + "! (Max is " + 31 + ")");
|
throw new IllegalArgumentException("Data value id is too big with " + i + "! (Max is " + 31 + ")");
|
||||||
- } else if (this.d.containsKey(Integer.valueOf(i))) {
|
- } else if (this.d.containsKey(Integer.valueOf(i))) {
|
||||||
+ } else if (this.dataValues.containsKey(i)) { // Spigot
|
+ } else if (this.dataValues.containsKey(i)) { // Spigot
|
||||||
throw new IllegalArgumentException("Duplicate id value for " + i + "!");
|
throw new IllegalArgumentException("Duplicate id value for " + i + "!");
|
||||||
} else {
|
} else {
|
||||||
- WatchableObject watchableobject = new WatchableObject(integer.intValue(), i, object);
|
- DataWatcher.WatchableObject datawatcher_watchableobject = new DataWatcher.WatchableObject(integer.intValue(), i, t0);
|
||||||
+ WatchableObject watchableobject = new WatchableObject(integer, i, object); // Spigot
|
+ DataWatcher.WatchableObject datawatcher_watchableobject = new DataWatcher.WatchableObject(integer, i, t0); // Spigot
|
||||||
|
|
||||||
this.f.writeLock().lock();
|
this.f.writeLock().lock();
|
||||||
- this.d.put(Integer.valueOf(i), watchableobject);
|
- this.d.put(Integer.valueOf(i), datawatcher_watchableobject);
|
||||||
+ this.dataValues.put(i, watchableobject); // Spigot
|
+ this.dataValues.put(i, datawatcher_watchableobject); // Spigot
|
||||||
this.f.writeLock().unlock();
|
this.f.writeLock().unlock();
|
||||||
this.b = false;
|
this.b = false;
|
||||||
}
|
}
|
||||||
@@ -46,7 +51,7 @@ public class DataWatcher {
|
@@ -47,7 +52,7 @@ public class DataWatcher {
|
||||||
WatchableObject watchableobject = new WatchableObject(j, i, (Object) null);
|
DataWatcher.WatchableObject datawatcher_watchableobject = new DataWatcher.WatchableObject(j, i, (Object) null);
|
||||||
|
|
||||||
this.f.writeLock().lock();
|
this.f.writeLock().lock();
|
||||||
- this.d.put(Integer.valueOf(i), watchableobject);
|
- this.d.put(Integer.valueOf(i), datawatcher_watchableobject);
|
||||||
+ this.dataValues.put(i, watchableobject); // Spigot
|
+ this.dataValues.put(i, datawatcher_watchableobject); // Spigot
|
||||||
this.f.writeLock().unlock();
|
this.f.writeLock().unlock();
|
||||||
this.b = false;
|
this.b = false;
|
||||||
}
|
}
|
||||||
@@ -81,7 +86,7 @@ public class DataWatcher {
|
@@ -82,7 +87,7 @@ public class DataWatcher {
|
||||||
WatchableObject watchableobject;
|
DataWatcher.WatchableObject datawatcher_watchableobject;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
- watchableobject = (WatchableObject) this.d.get(Integer.valueOf(i));
|
- datawatcher_watchableobject = (DataWatcher.WatchableObject) this.d.get(Integer.valueOf(i));
|
||||||
+ watchableobject = (WatchableObject) this.dataValues.get(i); // Spigot
|
+ datawatcher_watchableobject = (DataWatcher.WatchableObject) this.dataValues.get(i); // Spigot
|
||||||
} catch (Throwable throwable) {
|
} catch (Throwable throwable) {
|
||||||
CrashReport crashreport = CrashReport.a(throwable, "Getting synched entity data");
|
CrashReport crashreport = CrashReport.a(throwable, "Getting synched entity data");
|
||||||
CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Synched entity data");
|
CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Synched entity data");
|
||||||
@@ -138,7 +143,7 @@ public class DataWatcher {
|
@@ -139,7 +144,7 @@ public class DataWatcher {
|
||||||
|
|
||||||
if (this.e) {
|
if (this.e) {
|
||||||
this.f.readLock().lock();
|
this.f.readLock().lock();
|
||||||
@ -76,29 +76,29 @@ index e21e68d..966d737 100644
|
|||||||
+ Iterator iterator = this.dataValues.valueCollection().iterator(); // Spigot
|
+ Iterator iterator = this.dataValues.valueCollection().iterator(); // Spigot
|
||||||
|
|
||||||
while (iterator.hasNext()) {
|
while (iterator.hasNext()) {
|
||||||
WatchableObject watchableobject = (WatchableObject) iterator.next();
|
DataWatcher.WatchableObject datawatcher_watchableobject = (DataWatcher.WatchableObject) iterator.next();
|
||||||
@@ -162,7 +167,7 @@ public class DataWatcher {
|
@@ -163,7 +168,7 @@ public class DataWatcher {
|
||||||
|
|
||||||
public void a(PacketDataSerializer packetdataserializer) {
|
public void a(PacketDataSerializer packetdataserializer) throws IOException {
|
||||||
this.f.readLock().lock();
|
this.f.readLock().lock();
|
||||||
- Iterator iterator = this.d.values().iterator();
|
- Iterator iterator = this.d.values().iterator();
|
||||||
+ Iterator iterator = this.dataValues.valueCollection().iterator(); // Spigot
|
+ Iterator iterator = this.dataValues.valueCollection().iterator(); // Spigot
|
||||||
|
|
||||||
while (iterator.hasNext()) {
|
while (iterator.hasNext()) {
|
||||||
WatchableObject watchableobject = (WatchableObject) iterator.next();
|
DataWatcher.WatchableObject datawatcher_watchableobject = (DataWatcher.WatchableObject) iterator.next();
|
||||||
@@ -175,18 +180,11 @@ public class DataWatcher {
|
@@ -176,18 +181,11 @@ public class DataWatcher {
|
||||||
}
|
}
|
||||||
|
|
||||||
public List c() {
|
public List<DataWatcher.WatchableObject> c() {
|
||||||
- ArrayList arraylist = null;
|
- ArrayList arraylist = null;
|
||||||
+ ArrayList arraylist = Lists.newArrayList(); // Spigot
|
+ ArrayList arraylist = Lists.newArrayList(); // Spigot
|
||||||
|
|
||||||
this.f.readLock().lock();
|
this.f.readLock().lock();
|
||||||
|
|
||||||
- WatchableObject watchableobject;
|
- DataWatcher.WatchableObject datawatcher_watchableobject;
|
||||||
-
|
-
|
||||||
- for (Iterator iterator = this.d.values().iterator(); iterator.hasNext(); arraylist.add(watchableobject)) {
|
- for (Iterator iterator = this.d.values().iterator(); iterator.hasNext(); arraylist.add(datawatcher_watchableobject)) {
|
||||||
- watchableobject = (WatchableObject) iterator.next();
|
- datawatcher_watchableobject = (DataWatcher.WatchableObject) iterator.next();
|
||||||
- if (arraylist == null) {
|
- if (arraylist == null) {
|
||||||
- arraylist = Lists.newArrayList();
|
- arraylist = Lists.newArrayList();
|
||||||
- }
|
- }
|
||||||
@ -107,7 +107,7 @@ index e21e68d..966d737 100644
|
|||||||
|
|
||||||
this.f.readLock().unlock();
|
this.f.readLock().unlock();
|
||||||
return arraylist;
|
return arraylist;
|
||||||
@@ -309,13 +307,15 @@ public class DataWatcher {
|
@@ -310,14 +308,16 @@ public class DataWatcher {
|
||||||
}
|
}
|
||||||
|
|
||||||
static {
|
static {
|
||||||
@ -130,7 +130,8 @@ index e21e68d..966d737 100644
|
|||||||
+ classToId.put(Vector3f.class, 7);
|
+ classToId.put(Vector3f.class, 7);
|
||||||
+ // Spigot End
|
+ // Spigot End
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
public static class WatchableObject {
|
||||||
--
|
--
|
||||||
2.1.0
|
2.1.0
|
||||||
|
|
||||||
|
@ -1,14 +1,22 @@
|
|||||||
From a2254fd7c9d928ddc9c9ef5cc74feac8ff0d0ee0 Mon Sep 17 00:00:00 2001
|
From aefb2679c827a044b2b9d8522b6b0040de3f727f Mon Sep 17 00:00:00 2001
|
||||||
From: md_5 <git@md-5.net>
|
From: md_5 <git@md-5.net>
|
||||||
Date: Wed, 18 Dec 2013 13:32:10 +1100
|
Date: Wed, 18 Dec 2013 13:32:10 +1100
|
||||||
Subject: [PATCH] Fire PreLogin Events in Offline Mode
|
Subject: [PATCH] Fire PreLogin Events in Offline Mode
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java
|
diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java
|
||||||
index ba2b912..a59ea80 100644
|
index 50beec2..42905fd 100644
|
||||||
--- a/src/main/java/net/minecraft/server/LoginListener.java
|
--- a/src/main/java/net/minecraft/server/LoginListener.java
|
||||||
+++ b/src/main/java/net/minecraft/server/LoginListener.java
|
+++ b/src/main/java/net/minecraft/server/LoginListener.java
|
||||||
@@ -60,10 +60,23 @@ public class LoginListener implements PacketLoginInListener, IUpdatePlayerListBo
|
@@ -13,6 +13,7 @@ import java.util.Arrays;
|
||||||
|
import java.util.Random;
|
||||||
|
import java.util.UUID;
|
||||||
|
import java.util.concurrent.atomic.AtomicInteger;
|
||||||
|
+import java.util.logging.Level;
|
||||||
|
import javax.crypto.SecretKey;
|
||||||
|
import org.apache.commons.lang3.Validate;
|
||||||
|
import org.apache.logging.log4j.LogManager;
|
||||||
|
@@ -80,10 +81,23 @@ public class LoginListener implements PacketLoginInListener, IUpdatePlayerListBo
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -32,128 +40,99 @@ index ba2b912..a59ea80 100644
|
|||||||
|
|
||||||
// CraftBukkit start - fire PlayerLoginEvent
|
// CraftBukkit start - fire PlayerLoginEvent
|
||||||
EntityPlayer s = this.server.getPlayerList().attemptLogin(this, this.i, hostname);
|
EntityPlayer s = this.server.getPlayerList().attemptLogin(this, this.i, hostname);
|
||||||
@@ -98,7 +111,7 @@ public class LoginListener implements PacketLoginInListener, IUpdatePlayerListBo
|
@@ -133,7 +147,14 @@ public class LoginListener implements PacketLoginInListener, IUpdatePlayerListBo
|
||||||
this.g = EnumProtocolState.KEY;
|
this.g = LoginListener.EnumProtocolState.KEY;
|
||||||
this.networkManager.handle(new PacketLoginOutEncryptionBegin(this.j, this.server.P().getPublic(), this.e));
|
this.networkManager.handle(new PacketLoginOutEncryptionBegin(this.j, this.server.P().getPublic(), this.e));
|
||||||
} else {
|
} else {
|
||||||
- this.g = EnumProtocolState.READY_TO_ACCEPT;
|
- this.g = LoginListener.EnumProtocolState.READY_TO_ACCEPT;
|
||||||
+ (new ThreadPlayerLookupUUID(this, "User Authenticator #" + b.incrementAndGet())).start(); // Spigot
|
+ // Spigot start
|
||||||
|
+ try {
|
||||||
|
+ new LoginHandler().fireEvents();
|
||||||
|
+ } catch (Exception ex) {
|
||||||
|
+ disconnect("Failed to verify username!");
|
||||||
|
+ server.server.getLogger().log(java.util.logging.Level.WARNING, "Exception verifying " + i.getName(), ex);
|
||||||
|
+ }
|
||||||
|
+ // Spigot end
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/ThreadPlayerLookupUUID.java b/src/main/java/net/minecraft/server/ThreadPlayerLookupUUID.java
|
@@ -162,6 +183,40 @@ public class LoginListener implements PacketLoginInListener, IUpdatePlayerListBo
|
||||||
index 34843be..021cb59 100644
|
return;
|
||||||
--- a/src/main/java/net/minecraft/server/ThreadPlayerLookupUUID.java
|
}
|
||||||
+++ b/src/main/java/net/minecraft/server/ThreadPlayerLookupUUID.java
|
|
||||||
@@ -24,50 +24,19 @@ class ThreadPlayerLookupUUID extends Thread {
|
|
||||||
GameProfile gameprofile = LoginListener.b(this.a);
|
|
||||||
|
|
||||||
try {
|
+ new LoginHandler().fireEvents();
|
||||||
+ // Spigot Start
|
+ } else if (LoginListener.this.server.S()) {
|
||||||
+ if ( !LoginListener.a( this.a ).getOnlineMode() )
|
+ LoginListener.c.warn("Failed to verify username but will let them in anyway!");
|
||||||
+ {
|
+ LoginListener.this.i = LoginListener.this.a(gameprofile);
|
||||||
+ a.initUUID();
|
+ LoginListener.this.g = LoginListener.EnumProtocolState.READY_TO_ACCEPT;
|
||||||
+ fireLoginEvents();
|
+ } else {
|
||||||
+ return;
|
+ LoginListener.this.disconnect("Failed to verify username!");
|
||||||
+ }
|
+ LoginListener.c.error("Username \'" + gameprofile.getName() + "\' tried to join with an invalid session"); // CraftBukkit - fix null pointer
|
||||||
+ // Spigot End
|
+ }
|
||||||
String s = (new BigInteger(MinecraftEncryption.a(LoginListener.c(this.a), LoginListener.a(this.a).P().getPublic(), LoginListener.d(this.a)))).toString(16);
|
+ } catch (AuthenticationUnavailableException authenticationunavailableexception) {
|
||||||
|
+ if (LoginListener.this.server.S()) {
|
||||||
LoginListener.a(this.a, LoginListener.a(this.a).aB().hasJoinedServer(new GameProfile((UUID) null, gameprofile.getName()), s));
|
+ LoginListener.c.warn("Authentication servers are down but will let them in anyway!");
|
||||||
if (LoginListener.b(this.a) != null) {
|
+ LoginListener.this.i = LoginListener.this.a(gameprofile);
|
||||||
- // CraftBukkit start - fire PlayerPreLoginEvent
|
+ LoginListener.this.g = LoginListener.EnumProtocolState.READY_TO_ACCEPT;
|
||||||
- if (!this.a.networkManager.g()) {
|
+ } else {
|
||||||
- return;
|
+ LoginListener.this.disconnect("Authentication servers are down. Please try again later, sorry!");
|
||||||
- }
|
+ LoginListener.c.error("Couldn\'t verify username because servers are unavailable");
|
||||||
-
|
+ }
|
||||||
- String playerName = LoginListener.b(this.a).getName();
|
+ // CraftBukkit start - catch all exceptions
|
||||||
- java.net.InetAddress address = ((java.net.InetSocketAddress) a.networkManager.getSocketAddress()).getAddress();
|
+ } catch (Exception exception) {
|
||||||
- java.util.UUID uniqueId = LoginListener.b(this.a).getId();
|
+ disconnect("Failed to verify username!");
|
||||||
- final org.bukkit.craftbukkit.CraftServer server = LoginListener.a(this.a).server;
|
+ server.server.getLogger().log(java.util.logging.Level.WARNING, "Exception verifying " + gameprofile.getName(), exception);
|
||||||
-
|
+ // CraftBukkit end
|
||||||
- AsyncPlayerPreLoginEvent asyncEvent = new AsyncPlayerPreLoginEvent(playerName, address, uniqueId);
|
+ }
|
||||||
- server.getPluginManager().callEvent(asyncEvent);
|
|
||||||
-
|
|
||||||
- if (PlayerPreLoginEvent.getHandlerList().getRegisteredListeners().length != 0) {
|
|
||||||
- final PlayerPreLoginEvent event = new PlayerPreLoginEvent(playerName, address, uniqueId);
|
|
||||||
- if (asyncEvent.getResult() != PlayerPreLoginEvent.Result.ALLOWED) {
|
|
||||||
- event.disallow(asyncEvent.getResult(), asyncEvent.getKickMessage());
|
|
||||||
- }
|
|
||||||
- Waitable<PlayerPreLoginEvent.Result> waitable = new Waitable<PlayerPreLoginEvent.Result>() {
|
|
||||||
- @Override
|
|
||||||
- protected PlayerPreLoginEvent.Result evaluate() {
|
|
||||||
- server.getPluginManager().callEvent(event);
|
|
||||||
- return event.getResult();
|
|
||||||
- }};
|
|
||||||
-
|
|
||||||
- LoginListener.a(this.a).processQueue.add(waitable);
|
|
||||||
- if (waitable.get() != PlayerPreLoginEvent.Result.ALLOWED) {
|
|
||||||
- this.a.disconnect(event.getKickMessage());
|
|
||||||
- return;
|
|
||||||
- }
|
|
||||||
- } else {
|
|
||||||
- if (asyncEvent.getLoginResult() != AsyncPlayerPreLoginEvent.Result.ALLOWED) {
|
|
||||||
- this.a.disconnect(asyncEvent.getKickMessage());
|
|
||||||
- return;
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
- // CraftBukkit end
|
|
||||||
-
|
|
||||||
- LoginListener.e().info("UUID of player " + LoginListener.b(this.a).getName() + " is " + LoginListener.b(this.a).getId());
|
|
||||||
- LoginListener.a(this.a, EnumProtocolState.READY_TO_ACCEPT);
|
|
||||||
+ fireLoginEvents(); // Spigot
|
|
||||||
} else if (LoginListener.a(this.a).S()) {
|
|
||||||
LoginListener.e().warn("Failed to verify username but will let them in anyway!");
|
|
||||||
LoginListener.a(this.a, this.a.a(gameprofile));
|
|
||||||
@@ -93,4 +62,48 @@ class ThreadPlayerLookupUUID extends Thread {
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
+
|
+
|
||||||
+ private void fireLoginEvents() throws Exception
|
+ }
|
||||||
+ {
|
+ }).start();
|
||||||
+ // CraftBukkit start - fire PlayerPreLoginEvent
|
|
||||||
+ if (!this.a.networkManager.g()) {
|
|
||||||
+ return;
|
|
||||||
+ }
|
+ }
|
||||||
+
|
|
||||||
+ String playerName = LoginListener.b(this.a).getName();
|
|
||||||
+ java.net.InetAddress address = ((java.net.InetSocketAddress) a.networkManager.getSocketAddress()).getAddress();
|
|
||||||
+ java.util.UUID uniqueId = LoginListener.b(this.a).getId();
|
|
||||||
+ final org.bukkit.craftbukkit.CraftServer server = LoginListener.a(this.a).server;
|
|
||||||
+
|
|
||||||
+ AsyncPlayerPreLoginEvent asyncEvent = new AsyncPlayerPreLoginEvent(playerName, address, uniqueId);
|
|
||||||
+ server.getPluginManager().callEvent(asyncEvent);
|
|
||||||
+
|
|
||||||
+ if (PlayerPreLoginEvent.getHandlerList().getRegisteredListeners().length != 0) {
|
|
||||||
+ final PlayerPreLoginEvent event = new PlayerPreLoginEvent(playerName, address, uniqueId);
|
|
||||||
+ if (asyncEvent.getResult() != PlayerPreLoginEvent.Result.ALLOWED) {
|
|
||||||
+ event.disallow(asyncEvent.getResult(), asyncEvent.getKickMessage());
|
|
||||||
+ }
|
|
||||||
+ Waitable<PlayerPreLoginEvent.Result> waitable = new Waitable<PlayerPreLoginEvent.Result>() {
|
|
||||||
+ @Override
|
|
||||||
+ protected PlayerPreLoginEvent.Result evaluate() {
|
|
||||||
+ server.getPluginManager().callEvent(event);
|
|
||||||
+ return event.getResult();
|
|
||||||
+ }};
|
|
||||||
+
|
|
||||||
+ LoginListener.a(this.a).processQueue.add(waitable);
|
|
||||||
+ if (waitable.get() != PlayerPreLoginEvent.Result.ALLOWED) {
|
|
||||||
+ this.a.disconnect(event.getKickMessage());
|
|
||||||
+ return;
|
|
||||||
+ }
|
|
||||||
+ } else {
|
|
||||||
+ if (asyncEvent.getLoginResult() != AsyncPlayerPreLoginEvent.Result.ALLOWED) {
|
|
||||||
+ this.a.disconnect(asyncEvent.getKickMessage());
|
|
||||||
+ return;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ // CraftBukkit end
|
|
||||||
+
|
|
||||||
+ LoginListener.e().info("UUID of player " + LoginListener.b(this.a).getName() + " is " + LoginListener.b(this.a).getId());
|
|
||||||
+ LoginListener.a(this.a, EnumProtocolState.READY_TO_ACCEPT);
|
|
||||||
+ }
|
+ }
|
||||||
}
|
+
|
||||||
|
+ // Spigot start
|
||||||
|
+ public class LoginHandler {
|
||||||
|
+
|
||||||
|
+ public void fireEvents() throws Exception {
|
||||||
|
String playerName = i.getName();
|
||||||
|
java.net.InetAddress address = ((java.net.InetSocketAddress) networkManager.getSocketAddress()).getAddress();
|
||||||
|
java.util.UUID uniqueId = i.getId();
|
||||||
|
@@ -196,34 +251,9 @@ public class LoginListener implements PacketLoginInListener, IUpdatePlayerListBo
|
||||||
|
// CraftBukkit end
|
||||||
|
LoginListener.c.info("UUID of player " + LoginListener.this.i.getName() + " is " + LoginListener.this.i.getId());
|
||||||
|
LoginListener.this.g = LoginListener.EnumProtocolState.READY_TO_ACCEPT;
|
||||||
|
- } else if (LoginListener.this.server.S()) {
|
||||||
|
- LoginListener.c.warn("Failed to verify username but will let them in anyway!");
|
||||||
|
- LoginListener.this.i = LoginListener.this.a(gameprofile);
|
||||||
|
- LoginListener.this.g = LoginListener.EnumProtocolState.READY_TO_ACCEPT;
|
||||||
|
- } else {
|
||||||
|
- LoginListener.this.disconnect("Failed to verify username!");
|
||||||
|
- LoginListener.c.error("Username \'" + gameprofile.getName() + "\' tried to join with an invalid session"); // CraftBukkit - fix null pointer
|
||||||
|
- }
|
||||||
|
- } catch (AuthenticationUnavailableException authenticationunavailableexception) {
|
||||||
|
- if (LoginListener.this.server.S()) {
|
||||||
|
- LoginListener.c.warn("Authentication servers are down but will let them in anyway!");
|
||||||
|
- LoginListener.this.i = LoginListener.this.a(gameprofile);
|
||||||
|
- LoginListener.this.g = LoginListener.EnumProtocolState.READY_TO_ACCEPT;
|
||||||
|
- } else {
|
||||||
|
- LoginListener.this.disconnect("Authentication servers are down. Please try again later, sorry!");
|
||||||
|
- LoginListener.c.error("Couldn\'t verify username because servers are unavailable");
|
||||||
|
- }
|
||||||
|
- // CraftBukkit start - catch all exceptions
|
||||||
|
- } catch (Exception exception) {
|
||||||
|
- disconnect("Failed to verify username!");
|
||||||
|
- server.server.getLogger().log(java.util.logging.Level.WARNING, "Exception verifying " + gameprofile.getName(), exception);
|
||||||
|
- // CraftBukkit end
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- }
|
||||||
|
- }).start();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
+ // Spigot end
|
||||||
|
|
||||||
|
protected GameProfile a(GameProfile gameprofile) {
|
||||||
|
UUID uuid = UUID.nameUUIDFromBytes(("OfflinePlayer:" + gameprofile.getName()).getBytes(Charsets.UTF_8));
|
||||||
--
|
--
|
||||||
2.1.0
|
2.1.0
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From 7c7903f9cd5589868c13b305e9c77c5bee6152d0 Mon Sep 17 00:00:00 2001
|
From 5c24f2e31369f0c038b9fdde57327bd0e9c1f99c Mon Sep 17 00:00:00 2001
|
||||||
From: md_5 <md_5@live.com.au>
|
From: md_5 <md_5@live.com.au>
|
||||||
Date: Sun, 1 Dec 2013 18:18:41 +1100
|
Date: Sun, 1 Dec 2013 18:18:41 +1100
|
||||||
Subject: [PATCH] BungeeCord Support
|
Subject: [PATCH] BungeeCord Support
|
||||||
@ -6,15 +6,13 @@ Subject: [PATCH] BungeeCord Support
|
|||||||
Provides support for IP forwarding via BungeeCord.
|
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
|
diff --git a/src/main/java/net/minecraft/server/HandshakeListener.java b/src/main/java/net/minecraft/server/HandshakeListener.java
|
||||||
index e036bc6..c9a7839 100644
|
index 8f421f3..727948a 100644
|
||||||
--- a/src/main/java/net/minecraft/server/HandshakeListener.java
|
--- a/src/main/java/net/minecraft/server/HandshakeListener.java
|
||||||
+++ b/src/main/java/net/minecraft/server/HandshakeListener.java
|
+++ b/src/main/java/net/minecraft/server/HandshakeListener.java
|
||||||
@@ -6,7 +6,8 @@ import java.util.HashMap;
|
@@ -7,6 +7,7 @@ import java.util.HashMap;
|
||||||
// CraftBukkit end
|
|
||||||
|
|
||||||
public class HandshakeListener implements PacketHandshakingInListener {
|
public class HandshakeListener implements PacketHandshakingInListener {
|
||||||
-
|
|
||||||
+
|
|
||||||
+ private static final com.google.gson.Gson gson = new com.google.gson.Gson(); // Spigot
|
+ private static final com.google.gson.Gson gson = new com.google.gson.Gson(); // Spigot
|
||||||
// CraftBukkit start - add fields
|
// CraftBukkit start - add fields
|
||||||
private static final HashMap<InetAddress, Long> throttleTracker = new HashMap<InetAddress, Long>();
|
private static final HashMap<InetAddress, Long> throttleTracker = new HashMap<InetAddress, Long>();
|
||||||
@ -28,7 +26,7 @@ index e036bc6..c9a7839 100644
|
|||||||
+ String[] split = packethandshakinginsetprotocol.b.split("\00");
|
+ String[] split = packethandshakinginsetprotocol.b.split("\00");
|
||||||
+ if ( split.length == 3 || split.length == 4 ) {
|
+ if ( split.length == 3 || split.length == 4 ) {
|
||||||
+ packethandshakinginsetprotocol.b = split[0];
|
+ packethandshakinginsetprotocol.b = split[0];
|
||||||
+ b.j = new java.net.InetSocketAddress(split[1], ((java.net.InetSocketAddress) b.getSocketAddress()).getPort());
|
+ b.l = new java.net.InetSocketAddress(split[1], ((java.net.InetSocketAddress) b.getSocketAddress()).getPort());
|
||||||
+ b.spoofedUUID = com.mojang.util.UUIDTypeAdapter.fromString( split[2] );
|
+ b.spoofedUUID = com.mojang.util.UUIDTypeAdapter.fromString( split[2] );
|
||||||
+ } else
|
+ } else
|
||||||
+ {
|
+ {
|
||||||
@ -47,10 +45,10 @@ index e036bc6..c9a7839 100644
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java
|
diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java
|
||||||
index a59ea80..df651d5 100644
|
index 42905fd..3508f87 100644
|
||||||
--- a/src/main/java/net/minecraft/server/LoginListener.java
|
--- a/src/main/java/net/minecraft/server/LoginListener.java
|
||||||
+++ b/src/main/java/net/minecraft/server/LoginListener.java
|
+++ b/src/main/java/net/minecraft/server/LoginListener.java
|
||||||
@@ -63,9 +63,24 @@ public class LoginListener implements PacketLoginInListener, IUpdatePlayerListBo
|
@@ -84,9 +84,24 @@ public class LoginListener implements PacketLoginInListener, IUpdatePlayerListBo
|
||||||
// Spigot start
|
// Spigot start
|
||||||
public void initUUID()
|
public void initUUID()
|
||||||
{
|
{
|
||||||
@ -77,41 +75,41 @@ index a59ea80..df651d5 100644
|
|||||||
// Spigot end
|
// Spigot end
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java
|
diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java
|
||||||
index 33166a3..78d5949 100644
|
index e120462..f7a011a 100644
|
||||||
--- a/src/main/java/net/minecraft/server/NetworkManager.java
|
--- a/src/main/java/net/minecraft/server/NetworkManager.java
|
||||||
+++ b/src/main/java/net/minecraft/server/NetworkManager.java
|
+++ b/src/main/java/net/minecraft/server/NetworkManager.java
|
||||||
@@ -31,7 +31,11 @@ public class NetworkManager extends SimpleChannelInboundHandler {
|
@@ -64,7 +64,11 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet> {
|
||||||
private final EnumProtocolDirection g;
|
private final Queue<NetworkManager.QueuedPacket> i = Queues.newConcurrentLinkedQueue();
|
||||||
private final Queue h = Queues.newConcurrentLinkedQueue();
|
private final ReentrantReadWriteLock j = new ReentrantReadWriteLock();
|
||||||
private Channel i;
|
public Channel k; // CraftBukkit - public, PAIL: rename
|
||||||
- private SocketAddress j;
|
- private SocketAddress l;
|
||||||
+ // Spigot Start
|
+ // Spigot Start
|
||||||
+ public SocketAddress j;
|
+ public SocketAddress l;
|
||||||
+ public java.util.UUID spoofedUUID;
|
+ public java.util.UUID spoofedUUID;
|
||||||
+ public com.mojang.authlib.properties.Property[] spoofedProfile;
|
+ public com.mojang.authlib.properties.Property[] spoofedProfile;
|
||||||
+ // Spigot End
|
+ // Spigot End
|
||||||
private PacketListener k;
|
private PacketListener m;
|
||||||
private IChatBaseComponent l;
|
private IChatBaseComponent n;
|
||||||
private boolean m;
|
private boolean o;
|
||||||
@@ -239,4 +243,11 @@ public class NetworkManager extends SimpleChannelInboundHandler {
|
@@ -322,4 +326,11 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet> {
|
||||||
static Channel a(NetworkManager networkmanager) {
|
this.b = agenericfuturelistener;
|
||||||
return networkmanager.i;
|
}
|
||||||
}
|
}
|
||||||
+
|
+
|
||||||
+ // Spigot Start
|
+ // Spigot Start
|
||||||
+ public SocketAddress getRawAddress()
|
+ public SocketAddress getRawAddress()
|
||||||
+ {
|
+ {
|
||||||
+ return this.i.remoteAddress();
|
+ return this.k.remoteAddress();
|
||||||
+ }
|
+ }
|
||||||
+ // Spigot End
|
+ // Spigot End
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/PacketHandshakingInSetProtocol.java b/src/main/java/net/minecraft/server/PacketHandshakingInSetProtocol.java
|
diff --git a/src/main/java/net/minecraft/server/PacketHandshakingInSetProtocol.java b/src/main/java/net/minecraft/server/PacketHandshakingInSetProtocol.java
|
||||||
index 97920b0..0b86011 100644
|
index cc5aee0..18d0c6b 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PacketHandshakingInSetProtocol.java
|
--- a/src/main/java/net/minecraft/server/PacketHandshakingInSetProtocol.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PacketHandshakingInSetProtocol.java
|
+++ b/src/main/java/net/minecraft/server/PacketHandshakingInSetProtocol.java
|
||||||
@@ -11,7 +11,7 @@ public class PacketHandshakingInSetProtocol implements Packet {
|
@@ -13,7 +13,7 @@ public class PacketHandshakingInSetProtocol implements Packet<PacketHandshakingI
|
||||||
|
|
||||||
public void a(PacketDataSerializer packetdataserializer) {
|
public void a(PacketDataSerializer packetdataserializer) throws IOException {
|
||||||
this.a = packetdataserializer.e();
|
this.a = packetdataserializer.e();
|
||||||
- this.b = packetdataserializer.c(255);
|
- this.b = packetdataserializer.c(255);
|
||||||
+ this.b = packetdataserializer.c(Short.MAX_VALUE); // Spigot
|
+ this.b = packetdataserializer.c(Short.MAX_VALUE); // Spigot
|
||||||
@ -119,10 +117,10 @@ index 97920b0..0b86011 100644
|
|||||||
this.d = EnumProtocol.a(packetdataserializer.e());
|
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
|
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
|
||||||
index 74091d5..c942db1 100644
|
index f24739d..b674e67 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PlayerList.java
|
+++ b/src/main/java/net/minecraft/server/PlayerList.java
|
||||||
@@ -373,7 +373,7 @@ public abstract class PlayerList {
|
@@ -403,7 +403,7 @@ public abstract class PlayerList {
|
||||||
|
|
||||||
EntityPlayer entity = new EntityPlayer(server, server.getWorldServer(0), gameprofile, new PlayerInteractManager(server.getWorldServer(0)));
|
EntityPlayer entity = new EntityPlayer(server, server.getWorldServer(0), gameprofile, new PlayerInteractManager(server.getWorldServer(0)));
|
||||||
Player player = entity.getBukkitEntity();
|
Player player = entity.getBukkitEntity();
|
||||||
@ -132,7 +130,7 @@ index 74091d5..c942db1 100644
|
|||||||
|
|
||||||
if (getProfileBans().isBanned(gameprofile) && !getProfileBans().get(gameprofile).hasExpired()) {
|
if (getProfileBans().isBanned(gameprofile) && !getProfileBans().get(gameprofile).hasExpired()) {
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
index 18e736a..be4a647 100644
|
index f0453e6..46710d8 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
@@ -561,7 +561,13 @@ public final class CraftServer implements Server {
|
@@ -561,7 +561,13 @@ public final class CraftServer implements Server {
|
||||||
@ -151,7 +149,7 @@ index 18e736a..be4a647 100644
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
index 272f7df..2841e94 100644
|
index 00043de..c28b6bc 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
@@ -1320,6 +1320,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@@ -1320,6 +1320,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From e4a0b9c3cc7c08b13cbe010a55519589f293d982 Mon Sep 17 00:00:00 2001
|
From 96c4623c1ce960e00d9998d7c0fbeab9d9eaa10f Mon Sep 17 00:00:00 2001
|
||||||
From: Dylan Xaldin <Puremin0rez515@gmail.com>
|
From: Dylan Xaldin <Puremin0rez515@gmail.com>
|
||||||
Date: Thu, 12 Dec 2013 18:05:03 -0600
|
Date: Thu, 12 Dec 2013 18:05:03 -0600
|
||||||
Subject: [PATCH] Allow Disabling Zombie Villager Aggression
|
Subject: [PATCH] Allow Disabling Zombie Villager Aggression
|
||||||
@ -6,10 +6,10 @@ Subject: [PATCH] Allow Disabling Zombie Villager Aggression
|
|||||||
Ability to configure if Zombies will be aggressive towards Villagers.
|
Ability to configure if Zombies will be aggressive towards Villagers.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java
|
diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java
|
||||||
index aa609ef..3e6a101 100644
|
index 4b56058..2c0c74c 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityZombie.java
|
--- a/src/main/java/net/minecraft/server/EntityZombie.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityZombie.java
|
+++ b/src/main/java/net/minecraft/server/EntityZombie.java
|
||||||
@@ -39,12 +39,12 @@ public class EntityZombie extends EntityMonster {
|
@@ -38,12 +38,12 @@ public class EntityZombie extends EntityMonster {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void n() {
|
protected void n() {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From 8a7194cd0bc661597b091020b8876bd5312d1a34 Mon Sep 17 00:00:00 2001
|
From a52ed5af41b4f75024cbeba009eaa85aabc1e37b Mon Sep 17 00:00:00 2001
|
||||||
From: md_5 <git@md-5.net>
|
From: md_5 <git@md-5.net>
|
||||||
Date: Fri, 13 Dec 2013 11:58:58 +1100
|
Date: Fri, 13 Dec 2013 11:58:58 +1100
|
||||||
Subject: [PATCH] Configurable Amount of Netty Threads
|
Subject: [PATCH] Configurable Amount of Netty Threads
|
||||||
@ -6,36 +6,36 @@ Subject: [PATCH] Configurable Amount of Netty Threads
|
|||||||
This brings back the option that the Spigot version of netty saw. By default Netty will try and use cores*2 threads, however if running multiple servers on the same machine, this can be too many threads. Additionally some people have 16 core servers. If 32 Netty threads are allowed in this setup, then the lock contention, and thus blocking between threads becomes much greater, leading to decreased performance.
|
This brings back the option that the Spigot version of netty saw. By default Netty will try and use cores*2 threads, however if running multiple servers on the same machine, this can be too many threads. Additionally some people have 16 core servers. If 32 Netty threads are allowed in this setup, then the lock contention, and thus blocking between threads becomes much greater, leading to decreased performance.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
index 84f27a3..6ff18f0 100644
|
index bcdd918..4c18e24 100644
|
||||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
@@ -61,7 +61,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs
|
@@ -63,7 +63,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
|
||||||
private final List o = Lists.newArrayList();
|
private final List<IUpdatePlayerListBox> p = Lists.newArrayList();
|
||||||
private final ICommandHandler p;
|
protected final ICommandHandler b;
|
||||||
public final MethodProfiler methodProfiler = new MethodProfiler();
|
public final MethodProfiler methodProfiler = new MethodProfiler();
|
||||||
- private final ServerConnection q;
|
- private final ServerConnection q;
|
||||||
+ private ServerConnection q; // Spigot
|
+ private ServerConnection q; // Spigot
|
||||||
private final ServerPing r = new ServerPing();
|
private final ServerPing r = new ServerPing();
|
||||||
private final Random s = new Random();
|
private final Random s = new Random();
|
||||||
private String serverIp;
|
private String serverIp;
|
||||||
@@ -123,7 +123,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs
|
@@ -125,7 +125,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
|
||||||
this.d = proxy;
|
this.e = proxy;
|
||||||
MinecraftServer.k = this;
|
MinecraftServer.l = this;
|
||||||
// this.universe = file; // CraftBukkit
|
// this.universe = file; // CraftBukkit
|
||||||
- this.q = new ServerConnection(this);
|
- this.q = new ServerConnection(this);
|
||||||
+ // this.q = new ServerConnection(this); // Spigot
|
+ // this.q = new ServerConnection(this); // Spigot
|
||||||
this.Z = new UserCache(this, file1);
|
this.Z = new UserCache(this, file1);
|
||||||
this.p = this.h();
|
this.b = this.h();
|
||||||
// this.convertable = new WorldLoaderServer(file); // CraftBukkit - moved to DedicatedServer.init
|
// this.convertable = new WorldLoaderServer(file); // CraftBukkit - moved to DedicatedServer.init
|
||||||
@@ -1344,7 +1344,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs
|
@@ -1323,7 +1323,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
|
||||||
}
|
}
|
||||||
// Spigot End
|
// Spigot End
|
||||||
public ServerConnection ao() {
|
public ServerConnection ap() {
|
||||||
- return this.q;
|
- return this.q;
|
||||||
+ return this.q == null ? this.q = new ServerConnection(this) : this.q; // Spigot
|
+ return this.q == null ? this.q = new ServerConnection(this) : this.q; // Spigot
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean aq() {
|
public boolean ar() {
|
||||||
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
|
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
|
||||||
index 47ab82f..865a17f 100644
|
index 47ab82f..865a17f 100644
|
||||||
--- a/src/main/java/org/spigotmc/SpigotConfig.java
|
--- a/src/main/java/org/spigotmc/SpigotConfig.java
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
From ff86af308bf2727020508b941887e83a8399f0c9 Mon Sep 17 00:00:00 2001
|
From 975fbd6108019d07c966a3d2d6b1100794a54c20 Mon Sep 17 00:00:00 2001
|
||||||
From: md_5 <git@md-5.net>
|
From: md_5 <git@md-5.net>
|
||||||
Date: Fri, 13 Dec 2013 15:21:02 +1100
|
Date: Fri, 13 Dec 2013 15:21:02 +1100
|
||||||
Subject: [PATCH] Prevent Mineshaft Saving
|
Subject: [PATCH] Prevent Mineshaft Saving
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/StructureGenerator.java b/src/main/java/net/minecraft/server/StructureGenerator.java
|
diff --git a/src/main/java/net/minecraft/server/StructureGenerator.java b/src/main/java/net/minecraft/server/StructureGenerator.java
|
||||||
index ecab5d1..dde9929 100644
|
index bb1a11e..0f8211a 100644
|
||||||
--- a/src/main/java/net/minecraft/server/StructureGenerator.java
|
--- a/src/main/java/net/minecraft/server/StructureGenerator.java
|
||||||
+++ b/src/main/java/net/minecraft/server/StructureGenerator.java
|
+++ b/src/main/java/net/minecraft/server/StructureGenerator.java
|
||||||
@@ -172,7 +172,7 @@ public abstract class StructureGenerator extends WorldGenBase {
|
@@ -196,7 +196,7 @@ public abstract class StructureGenerator extends WorldGenBase {
|
||||||
private void a(World world) {
|
private void a(World world) {
|
||||||
if (this.d == null) {
|
if (this.d == null) {
|
||||||
// Spigot Start
|
// Spigot Start
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
From a012b081db4e38b2a392d150dbbda1919ac05d73 Mon Sep 17 00:00:00 2001
|
From 51d23beae4d968713dc6c8bdf2c7c41c470a333b Mon Sep 17 00:00:00 2001
|
||||||
From: md_5 <git@md-5.net>
|
From: md_5 <git@md-5.net>
|
||||||
Date: Wed, 18 Dec 2013 13:39:14 +1100
|
Date: Wed, 18 Dec 2013 13:39:14 +1100
|
||||||
Subject: [PATCH] Log Cause of Unexpected Exceptions
|
Subject: [PATCH] Log Cause of Unexpected Exceptions
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
index 6ff18f0..85b4bf9 100644
|
index 4c18e24..d57af9e 100644
|
||||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
@@ -527,6 +527,12 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs
|
@@ -548,6 +548,12 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
|
||||||
}
|
}
|
||||||
} catch (Throwable throwable) {
|
} catch (Throwable throwable) {
|
||||||
MinecraftServer.LOGGER.error("Encountered an unexpected exception", throwable);
|
MinecraftServer.LOGGER.error("Encountered an unexpected exception", throwable);
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From 789c7ec28f8a13d350b4fcad31f215a04f251716 Mon Sep 17 00:00:00 2001
|
From 113c3cdca3e582d522b1ff90f5a486b8092cc28d Mon Sep 17 00:00:00 2001
|
||||||
From: Thinkofdeath <thethinkofdeath@gmail.com>
|
From: Thinkofdeath <thethinkofdeath@gmail.com>
|
||||||
Date: Fri, 20 Dec 2013 21:36:06 +0000
|
Date: Fri, 20 Dec 2013 21:36:06 +0000
|
||||||
Subject: [PATCH] Particle API
|
Subject: [PATCH] Particle API
|
||||||
@ -19,10 +19,10 @@ index 7de0de5..13f9e9d 100644
|
|||||||
datavalue = 0;
|
datavalue = 0;
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||||
index 8105872..204acdb 100644
|
index 609b483..5dc77b1 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||||
@@ -814,28 +814,18 @@ public class CraftWorld implements World {
|
@@ -822,28 +822,18 @@ public class CraftWorld implements World {
|
||||||
Validate.isTrue(effect.getData() == null, "Wrong kind of data for this effect!");
|
Validate.isTrue(effect.getData() == null, "Wrong kind of data for this effect!");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -60,7 +60,7 @@ index 8105872..204acdb 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
public <T extends Entity> T spawn(Location location, Class<T> clazz) throws IllegalArgumentException {
|
public <T extends Entity> T spawn(Location location, Class<T> clazz) throws IllegalArgumentException {
|
||||||
@@ -1353,6 +1343,70 @@ public class CraftWorld implements World {
|
@@ -1361,6 +1351,70 @@ public class CraftWorld implements World {
|
||||||
// Spigot start
|
// Spigot start
|
||||||
private final Spigot spigot = new Spigot()
|
private final Spigot spigot = new Spigot()
|
||||||
{
|
{
|
||||||
@ -132,7 +132,7 @@ index 8105872..204acdb 100644
|
|||||||
|
|
||||||
public Spigot spigot()
|
public Spigot spigot()
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
index 2841e94..9f3e610 100644
|
index c28b6bc..276c9fd 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
@@ -322,9 +322,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@@ -322,9 +322,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
From 29e58880faa0e54cc4a10353bb2fb52dae36c60d Mon Sep 17 00:00:00 2001
|
From 07ac2c012866680de5f9301196a037e5806bff2f Mon Sep 17 00:00:00 2001
|
||||||
From: DerFlash <bte@freenet.de>
|
From: DerFlash <bte@freenet.de>
|
||||||
Date: Tue, 9 Jul 2013 00:11:12 +0200
|
Date: Tue, 9 Jul 2013 00:11:12 +0200
|
||||||
Subject: [PATCH] Save ticks lived to nbttag
|
Subject: [PATCH] Save ticks lived to nbttag
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||||
index 8f7d865..d7e610b 100644
|
index 5cf3833..5e1e695 100644
|
||||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||||
@@ -1198,6 +1198,7 @@ public abstract class Entity implements ICommandListener {
|
@@ -1191,6 +1191,7 @@ public abstract class Entity implements ICommandListener {
|
||||||
nbttagcompound.setLong("WorldUUIDLeast", this.world.getDataManager().getUUID().getLeastSignificantBits());
|
nbttagcompound.setLong("WorldUUIDLeast", this.world.getDataManager().getUUID().getLeastSignificantBits());
|
||||||
nbttagcompound.setLong("WorldUUIDMost", this.world.getDataManager().getUUID().getMostSignificantBits());
|
nbttagcompound.setLong("WorldUUIDMost", this.world.getDataManager().getUUID().getMostSignificantBits());
|
||||||
nbttagcompound.setInt("Bukkit.updateLevel", CURRENT_LEVEL);
|
nbttagcompound.setInt("Bukkit.updateLevel", CURRENT_LEVEL);
|
||||||
@ -16,7 +16,7 @@ index 8f7d865..d7e610b 100644
|
|||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
if (this.getCustomName() != null && this.getCustomName().length() > 0) {
|
if (this.getCustomName() != null && this.getCustomName().length() > 0) {
|
||||||
nbttagcompound.setString("CustomName", this.getCustomName());
|
nbttagcompound.setString("CustomName", this.getCustomName());
|
||||||
@@ -1285,6 +1286,8 @@ public abstract class Entity implements ICommandListener {
|
@@ -1282,6 +1283,8 @@ public abstract class Entity implements ICommandListener {
|
||||||
if (this instanceof EntityLiving) {
|
if (this instanceof EntityLiving) {
|
||||||
EntityLiving entity = (EntityLiving) this;
|
EntityLiving entity = (EntityLiving) this;
|
||||||
|
|
||||||
|
@ -1,30 +1,29 @@
|
|||||||
From 253f5cf92dddb7284528dfbc34fbc9937311e90d Mon Sep 17 00:00:00 2001
|
From 162e0a05ba706a962485f55cb36cd998a9446cd1 Mon Sep 17 00:00:00 2001
|
||||||
From: md_5 <md_5@live.com.au>
|
From: md_5 <md_5@live.com.au>
|
||||||
Date: Tue, 11 Jun 2013 12:17:37 +1000
|
Date: Tue, 11 Jun 2013 12:17:37 +1000
|
||||||
Subject: [PATCH] More Efficient GetCubes
|
Subject: [PATCH] More Efficient GetCubes
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||||
index f6b1dac..248f485 100644
|
index a4fda33..974fe77 100644
|
||||||
--- a/src/main/java/net/minecraft/server/World.java
|
--- a/src/main/java/net/minecraft/server/World.java
|
||||||
+++ b/src/main/java/net/minecraft/server/World.java
|
+++ b/src/main/java/net/minecraft/server/World.java
|
||||||
@@ -1052,33 +1052,60 @@ public abstract class World implements IBlockAccess {
|
@@ -1101,28 +1101,56 @@ public abstract class World implements IBlockAccess {
|
||||||
int i1 = MathHelper.floor(axisalignedbb.c);
|
IBlockData iblockdata = Blocks.STONE.getBlockData();
|
||||||
int j1 = MathHelper.floor(axisalignedbb.f + 1.0D);
|
BlockPosition.MutableBlockPosition blockposition_mutableblockposition = new BlockPosition.MutableBlockPosition();
|
||||||
|
|
||||||
- for (int k1 = i; k1 < j; ++k1) {
|
- for (int k1 = i; k1 < j; ++k1) {
|
||||||
- for (int l1 = i1; l1 < j1; ++l1) {
|
- for (int l1 = i1; l1 < j1; ++l1) {
|
||||||
- if (this.isLoaded(new BlockPosition(k1, 64, l1))) {
|
- if (this.isLoaded(blockposition_mutableblockposition.c(k1, 64, l1))) {
|
||||||
- for (int i2 = k - 1; i2 < l; ++i2) {
|
- for (int i2 = k - 1; i2 < l; ++i2) {
|
||||||
- BlockPosition blockposition = new BlockPosition(k1, i2, l1);
|
- blockposition_mutableblockposition.c(k1, i2, l1);
|
||||||
- boolean flag = entity.aS();
|
|
||||||
- boolean flag1 = this.a(this.af(), entity);
|
|
||||||
-
|
|
||||||
- if (flag && flag1) {
|
- if (flag && flag1) {
|
||||||
- entity.h(false);
|
- entity.h(false);
|
||||||
- } else if (!flag && !flag1) {
|
- } else if (!flag && !flag1) {
|
||||||
- entity.h(true);
|
- entity.h(true);
|
||||||
- }
|
- }
|
||||||
|
-
|
||||||
|
- IBlockData iblockdata1 = iblockdata;
|
||||||
+ // Spigot start
|
+ // Spigot start
|
||||||
+ int ystart = ( ( k - 1 ) < 0 ) ? 0 : ( k - 1 );
|
+ int ystart = ( ( k - 1 ) < 0 ) ? 0 : ( k - 1 );
|
||||||
+ for ( int chunkx = ( i >> 4 ); chunkx <= ( ( j - 1 ) >> 4 ); chunkx++ )
|
+ for ( int chunkx = ( i >> 4 ); chunkx <= ( ( j - 1 ) >> 4 ); chunkx++ )
|
||||||
@ -51,8 +50,6 @@ index f6b1dac..248f485 100644
|
|||||||
+ for ( int y = ystart; y < l; y++ )
|
+ for ( int y = ystart; y < l; y++ )
|
||||||
+ {
|
+ {
|
||||||
+ BlockPosition blockposition = new BlockPosition( x, y, z );
|
+ BlockPosition blockposition = new BlockPosition( x, y, z );
|
||||||
+ boolean flag = entity.aS();
|
|
||||||
+ boolean flag1 = this.a(this.af(), entity);
|
|
||||||
+
|
+
|
||||||
+ if (flag && flag1) {
|
+ if (flag && flag1) {
|
||||||
+ entity.h(false);
|
+ entity.h(false);
|
||||||
@ -60,15 +57,10 @@ index f6b1dac..248f485 100644
|
|||||||
+ entity.h(true);
|
+ entity.h(true);
|
||||||
+ }
|
+ }
|
||||||
|
|
||||||
- IBlockData iblockdata;
|
- if (worldborder.a((BlockPosition) blockposition_mutableblockposition) || !flag1) {
|
||||||
+ IBlockData iblockdata;
|
- iblockdata1 = this.getType(blockposition_mutableblockposition);
|
||||||
|
|
||||||
- if (!this.af().a(blockposition) && flag1) {
|
|
||||||
- iblockdata = Blocks.STONE.getBlockData();
|
|
||||||
- } else {
|
|
||||||
- iblockdata = this.getType(blockposition);
|
|
||||||
+ IBlockData block;
|
+ IBlockData block;
|
||||||
+ if (!this.af().a(blockposition) && flag1) {
|
+ if (!this.getWorldBorder().a(blockposition) && flag1) {
|
||||||
+ block = Blocks.STONE.getBlockData();
|
+ block = Blocks.STONE.getBlockData();
|
||||||
+ } else
|
+ } else
|
||||||
+ {
|
+ {
|
||||||
@ -80,7 +72,7 @@ index f6b1dac..248f485 100644
|
|||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
-
|
-
|
||||||
- iblockdata.getBlock().a(this, blockposition, iblockdata, axisalignedbb, arraylist, entity);
|
- iblockdata1.getBlock().a(this, blockposition_mutableblockposition, iblockdata1, axisalignedbb, arraylist, entity);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
From 2b450241577ab91631bfc4e4c362728d51b8bf81 Mon Sep 17 00:00:00 2001
|
From 4bb35602ee6638ad0778370e8b8f97c210469400 Mon Sep 17 00:00:00 2001
|
||||||
From: md_5 <git@md-5.net>
|
From: md_5 <git@md-5.net>
|
||||||
Date: Sun, 2 Feb 2014 16:55:46 +0000
|
Date: Sun, 2 Feb 2014 16:55:46 +0000
|
||||||
Subject: [PATCH] Add Option to Nerf Mobs from Spawner's
|
Subject: [PATCH] Add Option to Nerf Mobs from Spawner's
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||||
index d7e610b..a1d51a8 100644
|
index 5e1e695..b930c0d 100644
|
||||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||||
@@ -118,6 +118,7 @@ public abstract class Entity implements ICommandListener {
|
@@ -120,6 +120,7 @@ public abstract class Entity implements ICommandListener {
|
||||||
public final byte activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this);
|
public final byte activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this);
|
||||||
public final boolean defaultActivationState;
|
public final boolean defaultActivationState;
|
||||||
public long activatedTick = Integer.MIN_VALUE;
|
public long activatedTick = Integer.MIN_VALUE;
|
||||||
@ -17,7 +17,7 @@ index d7e610b..a1d51a8 100644
|
|||||||
// Spigot end
|
// Spigot end
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
|
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||||
index f387687..5ef61d9 100644
|
index c8156aa..7c23753 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
|
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||||
+++ b/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 {
|
@@ -450,6 +450,12 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||||
@ -31,10 +31,10 @@ index f387687..5ef61d9 100644
|
|||||||
+ }
|
+ }
|
||||||
+ // Spigot End
|
+ // Spigot End
|
||||||
this.world.methodProfiler.a("sensing");
|
this.world.methodProfiler.a("sensing");
|
||||||
this.bi.a();
|
this.bk.a();
|
||||||
this.world.methodProfiler.b();
|
this.world.methodProfiler.b();
|
||||||
diff --git a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
|
diff --git a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
|
||||||
index 4bbd288..67273f7 100644
|
index 41cfde8..df71db5 100644
|
||||||
--- a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
|
--- a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
|
||||||
+++ b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
|
+++ b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
|
||||||
@@ -144,6 +144,12 @@ public abstract class MobSpawnerAbstract {
|
@@ -144,6 +144,12 @@ public abstract class MobSpawnerAbstract {
|
||||||
@ -50,7 +50,7 @@ index 4bbd288..67273f7 100644
|
|||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
}
|
}
|
||||||
@@ -189,6 +195,12 @@ public abstract class MobSpawnerAbstract {
|
@@ -191,6 +197,12 @@ public abstract class MobSpawnerAbstract {
|
||||||
SpawnerSpawnEvent event = CraftEventFactory.callSpawnerSpawnEvent(entity, this.b().getX(), this.b().getY(), this.b().getZ());
|
SpawnerSpawnEvent event = CraftEventFactory.callSpawnerSpawnEvent(entity, this.b().getX(), this.b().getY(), this.b().getZ());
|
||||||
if (!event.isCancelled()) {
|
if (!event.isCancelled()) {
|
||||||
entity.world.addEntity(entity, CreatureSpawnEvent.SpawnReason.SPAWNER); // CraftBukkit
|
entity.world.addEntity(entity, CreatureSpawnEvent.SpawnReason.SPAWNER); // CraftBukkit
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From 48f3305a08768dbae35142074ac26f0b2e2b3406 Mon Sep 17 00:00:00 2001
|
From 75a2543c83ce99ca4c1b60a45c6caca5d604adeb Mon Sep 17 00:00:00 2001
|
||||||
From: md_5 <git@md-5.net>
|
From: md_5 <git@md-5.net>
|
||||||
Date: Mon, 23 Dec 2013 14:07:41 +1100
|
Date: Mon, 23 Dec 2013 14:07:41 +1100
|
||||||
Subject: [PATCH] Warn if PermGen may be insufficient
|
Subject: [PATCH] Warn if PermGen may be insufficient
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
From 273dc143ae33035ea2415266a0d3983f92b0ad48 Mon Sep 17 00:00:00 2001
|
From dcf83e0337de967e36ed1e2a028c4a976d26c1f6 Mon Sep 17 00:00:00 2001
|
||||||
From: md_5 <git@md-5.net>
|
From: md_5 <git@md-5.net>
|
||||||
Date: Mon, 23 Dec 2013 15:57:57 +1100
|
Date: Mon, 23 Dec 2013 15:57:57 +1100
|
||||||
Subject: [PATCH] Disable Connected Check on setScoreboard
|
Subject: [PATCH] Disable Connected Check on setScoreboard
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
index 9f3e610..2fc4839 100644
|
index 276c9fd..cbbcfc9 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
@@ -1241,7 +1241,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@@ -1241,7 +1241,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From 5b926b4e80215c772f0f6f8db5423af7018d5cdf Mon Sep 17 00:00:00 2001
|
From 325f69316cc1566252e7b178f281d36ec5fb65e0 Mon Sep 17 00:00:00 2001
|
||||||
From: slide23 <me@slide.ws>
|
From: slide23 <me@slide.ws>
|
||||||
Date: Fri, 20 Dec 2013 20:15:33 -0600
|
Date: Fri, 20 Dec 2013 20:15:33 -0600
|
||||||
Subject: [PATCH] Add Late Bind Option
|
Subject: [PATCH] Add Late Bind Option
|
||||||
@ -6,18 +6,18 @@ Subject: [PATCH] Add Late Bind Option
|
|||||||
Add late-bind config option to delay binding until loading is done.
|
Add late-bind config option to delay binding until loading is done.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
|
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||||
index 240c909..ced9efa 100644
|
index ae9e255..188a094 100644
|
||||||
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
|
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
|
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||||
@@ -127,6 +127,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
|
@@ -174,6 +174,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
|
||||||
this.a(MinecraftEncryption.b());
|
this.a(MinecraftEncryption.b());
|
||||||
DedicatedServer.LOGGER.info("Starting Minecraft server on " + (this.getServerIp().length() == 0 ? "*" : this.getServerIp()) + ":" + this.Q());
|
DedicatedServer.LOGGER.info("Starting Minecraft server on " + (this.getServerIp().length() == 0 ? "*" : this.getServerIp()) + ":" + this.Q());
|
||||||
|
|
||||||
+ if (!org.spigotmc.SpigotConfig.lateBind) {
|
+ if (!org.spigotmc.SpigotConfig.lateBind) {
|
||||||
try {
|
try {
|
||||||
this.ao().a(inetaddress, this.Q());
|
this.ap().a(inetaddress, this.Q());
|
||||||
} catch (Throwable ioexception) { // CraftBukkit - IOException -> Throwable
|
} catch (IOException ioexception) {
|
||||||
@@ -135,6 +136,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
|
@@ -182,6 +183,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
|
||||||
DedicatedServer.LOGGER.warn("Perhaps a server is already running on that port?");
|
DedicatedServer.LOGGER.warn("Perhaps a server is already running on that port?");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -25,14 +25,14 @@ index 240c909..ced9efa 100644
|
|||||||
|
|
||||||
// Spigot Start - Move DedicatedPlayerList up and bring plugin loading from CraftServer to here
|
// Spigot Start - Move DedicatedPlayerList up and bring plugin loading from CraftServer to here
|
||||||
// this.a((PlayerList) (new DedicatedPlayerList(this))); // CraftBukkit
|
// this.a((PlayerList) (new DedicatedPlayerList(this))); // CraftBukkit
|
||||||
@@ -225,6 +227,17 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
|
@@ -271,6 +273,17 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
|
||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
+ if (org.spigotmc.SpigotConfig.lateBind) {
|
+ if (org.spigotmc.SpigotConfig.lateBind) {
|
||||||
+ try {
|
+ try {
|
||||||
+ this.ao().a(inetaddress, this.Q());
|
+ this.ap().a(inetaddress, this.Q());
|
||||||
+ } catch (Throwable ioexception) { // CraftBukkit - IOException -> Throwable
|
+ } catch (IOException ioexception) {
|
||||||
+ DedicatedServer.LOGGER.warn("**** FAILED TO BIND TO PORT!");
|
+ DedicatedServer.LOGGER.warn("**** FAILED TO BIND TO PORT!");
|
||||||
+ DedicatedServer.LOGGER.warn("The exception was: {}", new Object[] { ioexception.toString()});
|
+ DedicatedServer.LOGGER.warn("The exception was: {}", new Object[] { ioexception.toString()});
|
||||||
+ DedicatedServer.LOGGER.warn("Perhaps a server is already running on that port?");
|
+ DedicatedServer.LOGGER.warn("Perhaps a server is already running on that port?");
|
||||||
@ -40,8 +40,8 @@ index 240c909..ced9efa 100644
|
|||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
if (false && this.aQ() > 0L) { // Spigot - disable
|
if (false && this.aR() > 0L) { // Spigot - disable
|
||||||
Thread thread = new Thread(new ThreadWatchdog(this));
|
Thread thread1 = new Thread(new ThreadWatchdog(this));
|
||||||
|
|
||||||
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
|
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
|
||||||
index 865a17f..f3187f8 100644
|
index 865a17f..f3187f8 100644
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
From 8df8e6fc29a4c1c9d93b862e04bd38cfd7a2ae37 Mon Sep 17 00:00:00 2001
|
From 5428d854f3be41d9a03048775e572f867464cab0 Mon Sep 17 00:00:00 2001
|
||||||
From: Thinkofdeath <thethinkofdeath@gmail.com>
|
From: Thinkofdeath <thethinkofdeath@gmail.com>
|
||||||
Date: Tue, 7 Jan 2014 15:56:26 +0000
|
Date: Tue, 7 Jan 2014 15:56:26 +0000
|
||||||
Subject: [PATCH] Allow statistics to be disabled/forced
|
Subject: [PATCH] Allow statistics to be disabled/forced
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/ServerStatisticManager.java b/src/main/java/net/minecraft/server/ServerStatisticManager.java
|
diff --git a/src/main/java/net/minecraft/server/ServerStatisticManager.java b/src/main/java/net/minecraft/server/ServerStatisticManager.java
|
||||||
index 4561825..9906b56 100644
|
index 97c3e79..dc1dffb 100644
|
||||||
--- a/src/main/java/net/minecraft/server/ServerStatisticManager.java
|
--- a/src/main/java/net/minecraft/server/ServerStatisticManager.java
|
||||||
+++ b/src/main/java/net/minecraft/server/ServerStatisticManager.java
|
+++ b/src/main/java/net/minecraft/server/ServerStatisticManager.java
|
||||||
@@ -31,6 +31,14 @@ public class ServerStatisticManager extends StatisticManager {
|
@@ -31,6 +31,14 @@ public class ServerStatisticManager extends StatisticManager {
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
From d897805eec1424c915fb8296104b0524fe55f7c8 Mon Sep 17 00:00:00 2001
|
From fc35ee9742d0f9352ad14e2345eeb2fe342205a7 Mon Sep 17 00:00:00 2001
|
||||||
From: md_5 <git@md-5.net>
|
From: md_5 <git@md-5.net>
|
||||||
Date: Fri, 10 Jan 2014 15:15:50 +1100
|
Date: Fri, 10 Jan 2014 15:15:50 +1100
|
||||||
Subject: [PATCH] Fix ItemStack Unbreakable Code
|
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
|
diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java
|
||||||
index 3e0d808..596db09 100644
|
index 62b2136..4b33dbd 100644
|
||||||
--- a/src/main/java/net/minecraft/server/ItemStack.java
|
--- a/src/main/java/net/minecraft/server/ItemStack.java
|
||||||
+++ b/src/main/java/net/minecraft/server/ItemStack.java
|
+++ b/src/main/java/net/minecraft/server/ItemStack.java
|
||||||
@@ -270,7 +270,13 @@ public final class ItemStack {
|
@@ -272,7 +272,13 @@ public final class ItemStack {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean e() {
|
public boolean e() {
|
||||||
|
@ -1,20 +1,20 @@
|
|||||||
From 36b00fa112a13f5390455a150aac049d86393a8a Mon Sep 17 00:00:00 2001
|
From 9489a7b68288b5b2c19bc3ab0418ed17df89c17b Mon Sep 17 00:00:00 2001
|
||||||
From: md_5 <git@md-5.net>
|
From: md_5 <git@md-5.net>
|
||||||
Date: Sun, 12 Jan 2014 20:56:41 +1100
|
Date: Sun, 12 Jan 2014 20:56:41 +1100
|
||||||
Subject: [PATCH] Try and Debug Crash Reports Crashing
|
Subject: [PATCH] Try and Debug Crash Reports Crashing
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
index 85b4bf9..0ee0c21 100644
|
index d57af9e..1fe3014 100644
|
||||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
@@ -730,7 +730,13 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs
|
@@ -743,7 +743,13 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
|
||||||
worldserver.doTick();
|
worldserver.doTick();
|
||||||
worldserver.timings.doTick.stopTiming(); // Spigot
|
worldserver.timings.doTick.stopTiming(); // Spigot
|
||||||
} catch (Throwable throwable1) {
|
} catch (Throwable throwable) {
|
||||||
+ // Spigot Start
|
+ // Spigot Start
|
||||||
+ try {
|
+ try {
|
||||||
crashreport = CrashReport.a(throwable1, "Exception ticking world");
|
crashreport = CrashReport.a(throwable, "Exception ticking world");
|
||||||
+ } catch (Throwable t){
|
+ } catch (Throwable t){
|
||||||
+ throw new RuntimeException("Error generating crash report", t);
|
+ throw new RuntimeException("Error generating crash report", t);
|
||||||
+ }
|
+ }
|
||||||
@ -22,13 +22,13 @@ index 85b4bf9..0ee0c21 100644
|
|||||||
worldserver.a(crashreport);
|
worldserver.a(crashreport);
|
||||||
throw new ReportedException(crashreport);
|
throw new ReportedException(crashreport);
|
||||||
}
|
}
|
||||||
@@ -740,7 +746,13 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs
|
@@ -753,7 +759,13 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
|
||||||
worldserver.tickEntities();
|
worldserver.tickEntities();
|
||||||
worldserver.timings.tickEntities.stopTiming(); // Spigot
|
worldserver.timings.tickEntities.stopTiming(); // Spigot
|
||||||
} catch (Throwable throwable2) {
|
} catch (Throwable throwable1) {
|
||||||
+ // Spigot Start
|
+ // Spigot Start
|
||||||
+ try {
|
+ try {
|
||||||
crashreport = CrashReport.a(throwable2, "Exception ticking world entities");
|
crashreport = CrashReport.a(throwable1, "Exception ticking world entities");
|
||||||
+ } catch (Throwable t){
|
+ } catch (Throwable t){
|
||||||
+ throw new RuntimeException("Error generating crash report", t);
|
+ throw new RuntimeException("Error generating crash report", t);
|
||||||
+ }
|
+ }
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From 7637dd80826ce060950cd9b0afc55559ec1e17d5 Mon Sep 17 00:00:00 2001
|
From 1eb61c31c972d2eeb44c69d3fe3d889cc470c933 Mon Sep 17 00:00:00 2001
|
||||||
From: md_5 <git@md-5.net>
|
From: md_5 <git@md-5.net>
|
||||||
Date: Sun, 12 Jan 2014 21:07:18 +1100
|
Date: Sun, 12 Jan 2014 21:07:18 +1100
|
||||||
Subject: [PATCH] Improve AutoSave Mechanism
|
Subject: [PATCH] Improve AutoSave Mechanism
|
||||||
@ -11,10 +11,10 @@ Instead we will mimic the save-all command in its behaviour, which is both safe
|
|||||||
Also, only save modified chunks, or chunks with entities after 4 auto save passes
|
Also, only save modified chunks, or chunks with entities after 4 auto save passes
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||||
index 372d90f..c0e2a50 100644
|
index b2ce05f..a59ff8e 100644
|
||||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||||
@@ -905,7 +905,7 @@ public class Chunk {
|
@@ -934,7 +934,7 @@ public class Chunk {
|
||||||
if (this.r && this.world.getTime() != this.lastSaved || this.q) {
|
if (this.r && this.world.getTime() != this.lastSaved || this.q) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -24,10 +24,10 @@ index 372d90f..c0e2a50 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
index 0ee0c21..bc0c405 100644
|
index 1fe3014..fbd9b4e 100644
|
||||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
@@ -634,7 +634,17 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs
|
@@ -655,7 +655,17 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
|
||||||
SpigotTimings.worldSaveTimer.startTiming(); // Spigot
|
SpigotTimings.worldSaveTimer.startTiming(); // Spigot
|
||||||
this.methodProfiler.a("save");
|
this.methodProfiler.a("save");
|
||||||
this.v.savePlayers();
|
this.v.savePlayers();
|
||||||
@ -47,10 +47,10 @@ index 0ee0c21..bc0c405 100644
|
|||||||
SpigotTimings.worldSaveTimer.stopTiming(); // Spigot
|
SpigotTimings.worldSaveTimer.stopTiming(); // Spigot
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||||
index 204acdb..660fd07 100644
|
index 5dc77b1..62ad47d 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||||
@@ -718,12 +718,17 @@ public class CraftWorld implements World {
|
@@ -726,12 +726,17 @@ public class CraftWorld implements World {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void save() {
|
public void save() {
|
||||||
|
@ -1,28 +1,28 @@
|
|||||||
From 0c1b7399d0730eb1c33474daf4fa7503f7493085 Mon Sep 17 00:00:00 2001
|
From 289d597d3a8ae0d0e35fac45c701e4c636baa461 Mon Sep 17 00:00:00 2001
|
||||||
From: md_5 <git@md-5.net>
|
From: md_5 <git@md-5.net>
|
||||||
Date: Mon, 20 Jan 2014 13:44:07 +1100
|
Date: Mon, 20 Jan 2014 13:44:07 +1100
|
||||||
Subject: [PATCH] Catch stalling on corrupted map data / NBT arrays.
|
Subject: [PATCH] Catch stalling on corrupted map data / NBT arrays.
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/NBTTagByteArray.java b/src/main/java/net/minecraft/server/NBTTagByteArray.java
|
diff --git a/src/main/java/net/minecraft/server/NBTTagByteArray.java b/src/main/java/net/minecraft/server/NBTTagByteArray.java
|
||||||
index 7525469..7a293eb 100644
|
index 3eeed3e..4e9b714 100644
|
||||||
--- a/src/main/java/net/minecraft/server/NBTTagByteArray.java
|
--- a/src/main/java/net/minecraft/server/NBTTagByteArray.java
|
||||||
+++ b/src/main/java/net/minecraft/server/NBTTagByteArray.java
|
+++ b/src/main/java/net/minecraft/server/NBTTagByteArray.java
|
||||||
@@ -21,6 +21,7 @@ public class NBTTagByteArray extends NBTBase {
|
@@ -22,6 +22,7 @@ public class NBTTagByteArray extends NBTBase {
|
||||||
|
|
||||||
void load(DataInput datainput, int i, NBTReadLimiter nbtreadlimiter) throws java.io.IOException {
|
void load(DataInput datainput, int i, NBTReadLimiter nbtreadlimiter) throws IOException {
|
||||||
int j = datainput.readInt();
|
int j = datainput.readInt();
|
||||||
+ com.google.common.base.Preconditions.checkArgument( j < 1 << 24);
|
+ com.google.common.base.Preconditions.checkArgument( j < 1 << 24);
|
||||||
|
|
||||||
nbtreadlimiter.a((long) (8 * j));
|
nbtreadlimiter.a((long) (8 * j));
|
||||||
this.data = new byte[j];
|
this.data = new byte[j];
|
||||||
diff --git a/src/main/java/net/minecraft/server/NBTTagIntArray.java b/src/main/java/net/minecraft/server/NBTTagIntArray.java
|
diff --git a/src/main/java/net/minecraft/server/NBTTagIntArray.java b/src/main/java/net/minecraft/server/NBTTagIntArray.java
|
||||||
index f331ef3..17b0c3d 100644
|
index 63c3bf9..1ff0902 100644
|
||||||
--- a/src/main/java/net/minecraft/server/NBTTagIntArray.java
|
--- a/src/main/java/net/minecraft/server/NBTTagIntArray.java
|
||||||
+++ b/src/main/java/net/minecraft/server/NBTTagIntArray.java
|
+++ b/src/main/java/net/minecraft/server/NBTTagIntArray.java
|
||||||
@@ -25,6 +25,7 @@ public class NBTTagIntArray extends NBTBase {
|
@@ -26,6 +26,7 @@ public class NBTTagIntArray extends NBTBase {
|
||||||
|
|
||||||
void load(DataInput datainput, int i, NBTReadLimiter nbtreadlimiter) throws java.io.IOException {
|
void load(DataInput datainput, int i, NBTReadLimiter nbtreadlimiter) throws IOException {
|
||||||
int j = datainput.readInt();
|
int j = datainput.readInt();
|
||||||
+ com.google.common.base.Preconditions.checkArgument( j < 1 << 24);
|
+ com.google.common.base.Preconditions.checkArgument( j < 1 << 24);
|
||||||
|
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
From 2c5f50b13981a490c622293f19f956743f301247 Mon Sep 17 00:00:00 2001
|
From d9bd763503896640fe63b1654de83d47c3ef7bb2 Mon Sep 17 00:00:00 2001
|
||||||
From: Dmck2b <dmck2b+github@gmail.com>
|
From: Dmck2b <dmck2b+github@gmail.com>
|
||||||
Date: Mon, 20 Jan 2014 20:18:23 +0000
|
Date: Mon, 20 Jan 2014 20:18:23 +0000
|
||||||
Subject: [PATCH] Allow toggling of ZombiePigmen spawning in portal blocks
|
Subject: [PATCH] Allow toggling of ZombiePigmen spawning in portal blocks
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/BlockPortal.java b/src/main/java/net/minecraft/server/BlockPortal.java
|
diff --git a/src/main/java/net/minecraft/server/BlockPortal.java b/src/main/java/net/minecraft/server/BlockPortal.java
|
||||||
index 7565dfb..368d67c 100644
|
index 030f4e9..4dc40eb 100644
|
||||||
--- a/src/main/java/net/minecraft/server/BlockPortal.java
|
--- a/src/main/java/net/minecraft/server/BlockPortal.java
|
||||||
+++ b/src/main/java/net/minecraft/server/BlockPortal.java
|
+++ b/src/main/java/net/minecraft/server/BlockPortal.java
|
||||||
@@ -16,7 +16,7 @@ public class BlockPortal extends BlockHalfTransparent {
|
@@ -18,7 +18,7 @@ public class BlockPortal extends BlockHalfTransparent {
|
||||||
|
|
||||||
public void b(World world, BlockPosition blockposition, IBlockData iblockdata, Random random) {
|
public void b(World world, BlockPosition blockposition, IBlockData iblockdata, Random random) {
|
||||||
super.b(world, blockposition, iblockdata, random);
|
super.b(world, blockposition, iblockdata, random);
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
From 1b44d6ca241d06f64df228d26fac47641fe433ce Mon Sep 17 00:00:00 2001
|
From fdcb23ae30c7e144baba75b1ea021186943d4bf6 Mon Sep 17 00:00:00 2001
|
||||||
From: md_5 <git@md-5.net>
|
From: md_5 <git@md-5.net>
|
||||||
Date: Sat, 25 Jan 2014 14:08:35 +1100
|
Date: Sat, 25 Jan 2014 14:08:35 +1100
|
||||||
Subject: [PATCH] Highly Optimized Tick Loop
|
Subject: [PATCH] Highly Optimized Tick Loop
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
index bc0c405..34fb946 100644
|
index fbd9b4e..c831ce3 100644
|
||||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
@@ -118,6 +118,12 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs
|
@@ -120,6 +120,12 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
|
||||||
public java.util.Queue<Runnable> processQueue = new java.util.concurrent.ConcurrentLinkedQueue<Runnable>();
|
public java.util.Queue<Runnable> processQueue = new java.util.concurrent.ConcurrentLinkedQueue<Runnable>();
|
||||||
public int autosavePeriod;
|
public int autosavePeriod;
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
@ -20,8 +20,8 @@ index bc0c405..34fb946 100644
|
|||||||
+ // Spigot end
|
+ // Spigot end
|
||||||
|
|
||||||
public MinecraftServer(OptionSet options, Proxy proxy, File file1) {
|
public MinecraftServer(OptionSet options, Proxy proxy, File file1) {
|
||||||
this.d = proxy;
|
this.e = proxy;
|
||||||
@@ -480,6 +486,13 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs
|
@@ -501,6 +507,13 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
|
||||||
this.isRunning = false;
|
this.isRunning = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -35,15 +35,15 @@ index bc0c405..34fb946 100644
|
|||||||
public void run() {
|
public void run() {
|
||||||
try {
|
try {
|
||||||
if (this.init()) {
|
if (this.init()) {
|
||||||
@@ -490,38 +503,34 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs
|
@@ -511,38 +524,34 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
|
||||||
this.r.setServerInfo(new ServerPingServerData("1.8", 47));
|
this.r.setServerInfo(new ServerPing.ServerData("1.8.3", 47));
|
||||||
this.a(this.r);
|
this.a(this.r);
|
||||||
|
|
||||||
+ // Spigot start
|
+ // Spigot start
|
||||||
+ Arrays.fill( recentTps, 20 );
|
+ Arrays.fill( recentTps, 20 );
|
||||||
+ long lastTick = System.nanoTime(), catchupTime = 0, curTime, wait, tickSection = lastTick;
|
+ long lastTick = System.nanoTime(), catchupTime = 0, curTime, wait, tickSection = lastTick;
|
||||||
while (this.isRunning) {
|
while (this.isRunning) {
|
||||||
- long j = ax();
|
- long j = ay();
|
||||||
- long k = j - this.ab;
|
- long k = j - this.ab;
|
||||||
-
|
-
|
||||||
- if (k > 2000L && this.ab - this.R >= 15000L) {
|
- if (k > 2000L && this.ab - this.R >= 15000L) {
|
||||||
@ -68,14 +68,14 @@ index bc0c405..34fb946 100644
|
|||||||
|
|
||||||
- i += k;
|
- i += k;
|
||||||
- this.ab = j;
|
- this.ab = j;
|
||||||
- if (this.worlds.get(0).everyoneDeeplySleeping()) { // CraftBukkit
|
- if (this.worlds.get(0).everyoneDeeplySleeping()) {
|
||||||
- this.y();
|
- this.z();
|
||||||
- i = 0L;
|
- i = 0L;
|
||||||
- } else {
|
- } else {
|
||||||
- while (i > 50L) {
|
- while (i > 50L) {
|
||||||
- MinecraftServer.currentTick = (int) (System.currentTimeMillis() / 50); // CraftBukkit
|
- MinecraftServer.currentTick = (int) (System.currentTimeMillis() / 50); // CraftBukkit
|
||||||
- i -= 50L;
|
- i -= 50L;
|
||||||
- this.y();
|
- this.z();
|
||||||
- }
|
- }
|
||||||
+ if ( MinecraftServer.currentTick++ % SAMPLE_INTERVAL == 0 )
|
+ if ( MinecraftServer.currentTick++ % SAMPLE_INTERVAL == 0 )
|
||||||
+ {
|
+ {
|
||||||
@ -88,7 +88,7 @@ index bc0c405..34fb946 100644
|
|||||||
+ lastTick = curTime;
|
+ lastTick = curTime;
|
||||||
|
|
||||||
- Thread.sleep(Math.max(1L, 50L - i));
|
- Thread.sleep(Math.max(1L, 50L - i));
|
||||||
+ this.y();
|
+ this.z();
|
||||||
this.Q = true;
|
this.Q = true;
|
||||||
}
|
}
|
||||||
+ // Spigot end
|
+ // Spigot end
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From fb40c21776d9184c8c0864c403c0f23c4cac8d9b Mon Sep 17 00:00:00 2001
|
From 28faf58f9ce67f8ea804ed5c38954b51d81542bc Mon Sep 17 00:00:00 2001
|
||||||
From: md_5 <git@md-5.net>
|
From: md_5 <git@md-5.net>
|
||||||
Date: Thu, 23 Jan 2014 13:17:35 +1100
|
Date: Thu, 23 Jan 2014 13:17:35 +1100
|
||||||
Subject: [PATCH] Add Spigot Links
|
Subject: [PATCH] Add Spigot Links
|
||||||
|
@ -1,17 +1,17 @@
|
|||||||
From cedbae210cab866f083ca06211a900f84eb52246 Mon Sep 17 00:00:00 2001
|
From 02cbdc383eccf55a0263cfd0052d013ff55f831c Mon Sep 17 00:00:00 2001
|
||||||
From: md_5 <git@md-5.net>
|
From: md_5 <git@md-5.net>
|
||||||
Date: Sun, 26 Jan 2014 21:48:34 +1100
|
Date: Sun, 26 Jan 2014 21:48:34 +1100
|
||||||
Subject: [PATCH] Configurable Ping Sample Size
|
Subject: [PATCH] Configurable Ping Sample Size
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/PacketStatusListener.java b/src/main/java/net/minecraft/server/PacketStatusListener.java
|
diff --git a/src/main/java/net/minecraft/server/PacketStatusListener.java b/src/main/java/net/minecraft/server/PacketStatusListener.java
|
||||||
index 939907b..17d37ac 100644
|
index 8966bfb..b996558 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PacketStatusListener.java
|
--- a/src/main/java/net/minecraft/server/PacketStatusListener.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PacketStatusListener.java
|
+++ b/src/main/java/net/minecraft/server/PacketStatusListener.java
|
||||||
@@ -113,6 +113,13 @@ public class PacketStatusListener implements PacketStatusInListener {
|
@@ -113,6 +113,13 @@ public class PacketStatusListener implements PacketStatusInListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
ServerPingPlayerSample playerSample = new ServerPingPlayerSample(event.getMaxPlayers(), profiles.size());
|
ServerPing.ServerPingPlayerSample playerSample = new ServerPing.ServerPingPlayerSample(event.getMaxPlayers(), profiles.size());
|
||||||
+ // Spigot Start
|
+ // Spigot Start
|
||||||
+ if ( !profiles.isEmpty() )
|
+ if ( !profiles.isEmpty() )
|
||||||
+ {
|
+ {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From 8a0501a6c9a5c70cc1a7abebc403f033f4222e6d Mon Sep 17 00:00:00 2001
|
From 6af0da4859d4348adc3ac9e36f3c84f0df0d29df Mon Sep 17 00:00:00 2001
|
||||||
From: md_5 <git@md-5.net>
|
From: md_5 <git@md-5.net>
|
||||||
Date: Mon, 27 Jan 2014 08:39:26 +1100
|
Date: Mon, 27 Jan 2014 08:39:26 +1100
|
||||||
Subject: [PATCH] Add Optional Tick Shuffling
|
Subject: [PATCH] Add Optional Tick Shuffling
|
||||||
@ -6,21 +6,21 @@ Subject: [PATCH] Add Optional Tick Shuffling
|
|||||||
This prevents players from 'gaming' the server, and strategically relogging to increase their position in the tick order.
|
This prevents players from 'gaming' the server, and strategically relogging to increase their position in the tick order.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/ServerConnection.java b/src/main/java/net/minecraft/server/ServerConnection.java
|
diff --git a/src/main/java/net/minecraft/server/ServerConnection.java b/src/main/java/net/minecraft/server/ServerConnection.java
|
||||||
index 6508fdf..6c6ffa7 100644
|
index 42188fa..931ab66 100644
|
||||||
--- a/src/main/java/net/minecraft/server/ServerConnection.java
|
--- a/src/main/java/net/minecraft/server/ServerConnection.java
|
||||||
+++ b/src/main/java/net/minecraft/server/ServerConnection.java
|
+++ b/src/main/java/net/minecraft/server/ServerConnection.java
|
||||||
@@ -57,6 +57,13 @@ public class ServerConnection {
|
@@ -123,6 +123,13 @@ public class ServerConnection {
|
||||||
List list = this.g;
|
List list = this.h;
|
||||||
|
|
||||||
synchronized (this.g) {
|
synchronized (this.h) {
|
||||||
+ // Spigot Start
|
+ // Spigot Start
|
||||||
+ // This prevents players from 'gaming' the server, and strategically relogging to increase their position in the tick order
|
+ // This prevents players from 'gaming' the server, and strategically relogging to increase their position in the tick order
|
||||||
+ if ( org.spigotmc.SpigotConfig.playerShuffle > 0 && MinecraftServer.currentTick % org.spigotmc.SpigotConfig.playerShuffle == 0 )
|
+ if ( org.spigotmc.SpigotConfig.playerShuffle > 0 && MinecraftServer.currentTick % org.spigotmc.SpigotConfig.playerShuffle == 0 )
|
||||||
+ {
|
+ {
|
||||||
+ Collections.shuffle( this.g );
|
+ Collections.shuffle( this.h );
|
||||||
+ }
|
+ }
|
||||||
+ // Spigot End
|
+ // Spigot End
|
||||||
Iterator iterator = this.g.iterator();
|
Iterator iterator = this.h.iterator();
|
||||||
|
|
||||||
while (iterator.hasNext()) {
|
while (iterator.hasNext()) {
|
||||||
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
|
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
From 6658e45f4661e3959442f89b3e5c92b1f97c89d6 Mon Sep 17 00:00:00 2001
|
From 8b80b654e0ea8885fc8b98db6eac1023caaca109 Mon Sep 17 00:00:00 2001
|
||||||
From: md_5 <git@md-5.net>
|
From: md_5 <git@md-5.net>
|
||||||
Date: Tue, 28 Jan 2014 20:35:35 +1100
|
Date: Tue, 28 Jan 2014 20:35:35 +1100
|
||||||
Subject: [PATCH] Allow Configuring Chunks per Packet
|
Subject: [PATCH] Allow Configuring Chunks per Packet
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||||
index 5c961ba..c087acc 100644
|
index 657f3f5..5751844 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||||
@@ -220,7 +220,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
@@ -223,7 +223,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||||
|
|
||||||
Chunk chunk;
|
Chunk chunk;
|
||||||
|
|
||||||
|
@ -1,24 +1,24 @@
|
|||||||
From 1b98229898a57d63e9bc8cf5448c45dcc358639f Mon Sep 17 00:00:00 2001
|
From 6731885bf6ad51d1aebc132eabc69c05ce7aca48 Mon Sep 17 00:00:00 2001
|
||||||
From: Smove <jan@lavasurvival.net>
|
From: Smove <jan@lavasurvival.net>
|
||||||
Date: Sat, 1 Feb 2014 18:12:16 +1100
|
Date: Sat, 1 Feb 2014 18:12:16 +1100
|
||||||
Subject: [PATCH] Implement Locale Getter for Players
|
Subject: [PATCH] Implement Locale Getter for Players
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||||
index c087acc..7719d03 100644
|
index 5751844..3854edf 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||||
@@ -27,7 +27,7 @@ import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause;
|
@@ -27,7 +27,7 @@ import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause;
|
||||||
public class EntityPlayer extends EntityHuman implements ICrafting {
|
public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||||
|
|
||||||
private static final Logger bF = LogManager.getLogger();
|
private static final Logger bH = LogManager.getLogger();
|
||||||
- private String locale = "en_US";
|
- private String locale = "en_US";
|
||||||
+ public String locale = "en_US"; // Spigot
|
+ public String locale = "en_US"; // Spigot
|
||||||
public PlayerConnection playerConnection;
|
public PlayerConnection playerConnection;
|
||||||
public final MinecraftServer server;
|
public final MinecraftServer server;
|
||||||
public final PlayerInteractManager playerInteractManager;
|
public final PlayerInteractManager playerInteractManager;
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
index 2fc4839..827b8dd 100644
|
index cbbcfc9..b494159 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
@@ -1401,6 +1401,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@@ -1401,6 +1401,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From fc96fff109b53cafa5017dee69d65e8ed08ad022 Mon Sep 17 00:00:00 2001
|
From 4bae06e72ab3132d8ae68b93f9616c7c7d12cc11 Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Fri, 31 Jan 2014 11:18:34 -0500
|
Date: Fri, 31 Jan 2014 11:18:34 -0500
|
||||||
Subject: [PATCH] Cap Entity Collisions
|
Subject: [PATCH] Cap Entity Collisions
|
||||||
@ -7,39 +7,38 @@ Limit a single entity to colliding a max of configurable times per tick.
|
|||||||
This will alleviate issues where living entities are hoarded in 1x1 pens.
|
This will alleviate issues where living entities are hoarded in 1x1 pens.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||||
index a1d51a8..25192f3 100644
|
index b930c0d..82accf4 100644
|
||||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||||
@@ -1059,6 +1059,7 @@ public abstract class Entity implements ICommandListener {
|
@@ -1052,6 +1052,7 @@ public abstract class Entity implements ICommandListener {
|
||||||
|
|
||||||
public void d(EntityHuman entityhuman) {}
|
public void d(EntityHuman entityhuman) {}
|
||||||
|
|
||||||
+ int numCollisions = 0; // Spigot
|
+ int numCollisions = 0; // Spigot
|
||||||
public void collide(Entity entity) {
|
public void collide(Entity entity) {
|
||||||
if (entity.passenger != this && entity.vehicle != this) {
|
if (entity.passenger != this && entity.vehicle != this) {
|
||||||
if (!entity.T && !this.T) {
|
if (!entity.noclip && !this.noclip) {
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||||
index 5edefa0..7c8f361 100644
|
index ca0430d..c67f0ee 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||||
@@ -1658,7 +1658,9 @@ public abstract class EntityLiving extends Entity {
|
@@ -1671,7 +1671,9 @@ public abstract class EntityLiving extends Entity {
|
||||||
List list = this.world.getEntities(this, this.getBoundingBox().grow(0.20000000298023224D, 0.0D, 0.20000000298023224D));
|
}));
|
||||||
|
|
||||||
if (this.ad() && list != null && !list.isEmpty()) { // Spigot: Add this.ad() condition
|
if (this.ad() && !list.isEmpty()) { // Spigot: Add this.ad() condition
|
||||||
+ numCollisions -= world.spigotConfig.maxCollisionsPerEntity; // Spigot
|
+ numCollisions -= world.spigotConfig.maxCollisionsPerEntity; // Spigot
|
||||||
for (int i = 0; i < list.size(); ++i) {
|
for (int i = 0; i < list.size(); ++i) {
|
||||||
+ if (numCollisions > world.spigotConfig.maxCollisionsPerEntity) { break; } // Spigot
|
+ if (numCollisions > world.spigotConfig.maxCollisionsPerEntity) { break; } // Spigot
|
||||||
Entity entity = (Entity) list.get(i);
|
Entity entity = (Entity) list.get(i);
|
||||||
|
|
||||||
// TODO better check now?
|
// TODO better check now?
|
||||||
@@ -1669,9 +1671,12 @@ public abstract class EntityLiving extends Entity {
|
@@ -1681,8 +1683,11 @@ public abstract class EntityLiving extends Entity {
|
||||||
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
if (entity.ae()) {
|
+ entity.numCollisions++; // Spigot
|
||||||
+ entity.numCollisions++; // Spigot
|
+ numCollisions++; // Spigot
|
||||||
+ numCollisions++; // Spigot
|
this.s(entity);
|
||||||
this.s(entity);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
+ numCollisions = 0; // Spigot
|
+ numCollisions = 0; // Spigot
|
||||||
}
|
}
|
||||||
|
@ -1,22 +1,22 @@
|
|||||||
From 7bea711b892234d60b8efe3b1d6fec867d7049cb Mon Sep 17 00:00:00 2001
|
From d36dcb2ae4108a697242904dff0741f918ad4c69 Mon Sep 17 00:00:00 2001
|
||||||
From: Thinkofdeath <thethinkofdeath@gmail.com>
|
From: Thinkofdeath <thethinkofdeath@gmail.com>
|
||||||
Date: Thu, 6 Feb 2014 21:59:20 +0000
|
Date: Thu, 6 Feb 2014 21:59:20 +0000
|
||||||
Subject: [PATCH] Fix dispensing bone meal not having the correct data value
|
Subject: [PATCH] Fix dispensing bone meal not having the correct data value
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/DispenseBehaviorBonemeal.java b/src/main/java/net/minecraft/server/DispenseBehaviorBonemeal.java
|
diff --git a/src/main/java/net/minecraft/server/DispenserRegistry.java b/src/main/java/net/minecraft/server/DispenserRegistry.java
|
||||||
index 1fb976c..b0ecb35 100644
|
index f730e97..4d1c04e 100644
|
||||||
--- a/src/main/java/net/minecraft/server/DispenseBehaviorBonemeal.java
|
--- a/src/main/java/net/minecraft/server/DispenserRegistry.java
|
||||||
+++ b/src/main/java/net/minecraft/server/DispenseBehaviorBonemeal.java
|
+++ b/src/main/java/net/minecraft/server/DispenserRegistry.java
|
||||||
@@ -18,7 +18,7 @@ final class DispenseBehaviorBonemeal extends DispenseBehaviorItem {
|
@@ -463,7 +463,7 @@ public class DispenserRegistry {
|
||||||
|
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
org.bukkit.block.Block block = world.getWorld().getBlockAt(isourceblock.getBlockPosition().getX(), isourceblock.getBlockPosition().getY(), isourceblock.getBlockPosition().getZ());
|
org.bukkit.block.Block block = world.getWorld().getBlockAt(isourceblock.getBlockPosition().getX(), isourceblock.getBlockPosition().getY(), isourceblock.getBlockPosition().getZ());
|
||||||
- CraftItemStack craftItem = CraftItemStack.asNewCraftStack(itemstack.getItem());
|
- CraftItemStack craftItem = CraftItemStack.asNewCraftStack(itemstack.getItem());
|
||||||
+ CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack); // Spigot
|
+ CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack); // Spigot
|
||||||
|
|
||||||
BlockDispenseEvent event = new BlockDispenseEvent(block, craftItem.clone(), new org.bukkit.util.Vector(0, 0, 0));
|
BlockDispenseEvent event = new BlockDispenseEvent(block, craftItem.clone(), new org.bukkit.util.Vector(0, 0, 0));
|
||||||
if (!BlockDispenser.eventFired) {
|
if (!BlockDispenser.eventFired) {
|
||||||
--
|
--
|
||||||
2.1.0
|
2.1.0
|
||||||
|
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
From 8afc8d7c7c063110343752af6218a01cbf62318b Mon Sep 17 00:00:00 2001
|
From 89f01f61bc5dd98b3435de3aaaa717cd0680c9b4 Mon Sep 17 00:00:00 2001
|
||||||
From: md_5 <md_5@live.com.au>
|
From: md_5 <md_5@live.com.au>
|
||||||
Date: Sat, 8 Feb 2014 08:13:40 +0000
|
Date: Sat, 8 Feb 2014 08:13:40 +0000
|
||||||
Subject: [PATCH] Spam Filter Exclusions
|
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
|
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||||
index c30e96e..8148371 100644
|
index 9fa0e67..e62c2f3 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||||
@@ -951,9 +951,20 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
|
@@ -969,9 +969,20 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
|
||||||
this.minecraftServer.getPlayerList().sendMessage(chatmessage1, false);
|
this.minecraftServer.getPlayerList().sendMessage(chatmessage1, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
From ba1d1daf0341129b0fe180b58868057371409611 Mon Sep 17 00:00:00 2001
|
From 864fe313d03905e3cb0f660fc02b1a6d53b504c0 Mon Sep 17 00:00:00 2001
|
||||||
From: md_5 <git@md-5.net>
|
From: md_5 <git@md-5.net>
|
||||||
Date: Sun, 9 Feb 2014 14:39:01 +1100
|
Date: Sun, 9 Feb 2014 14:39:01 +1100
|
||||||
Subject: [PATCH] Add Option to Silence CommandBlock Console
|
Subject: [PATCH] Add Option to Silence CommandBlock Console
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/CommandDispatcher.java b/src/main/java/net/minecraft/server/CommandDispatcher.java
|
diff --git a/src/main/java/net/minecraft/server/CommandDispatcher.java b/src/main/java/net/minecraft/server/CommandDispatcher.java
|
||||||
index c6032b2..8bd58c9 100644
|
index 54133a7..53fbc3e 100644
|
||||||
--- a/src/main/java/net/minecraft/server/CommandDispatcher.java
|
--- a/src/main/java/net/minecraft/server/CommandDispatcher.java
|
||||||
+++ b/src/main/java/net/minecraft/server/CommandDispatcher.java
|
+++ b/src/main/java/net/minecraft/server/CommandDispatcher.java
|
||||||
@@ -95,7 +95,7 @@ public class CommandDispatcher extends CommandHandler implements ICommandDispatc
|
@@ -95,7 +95,7 @@ public class CommandDispatcher extends CommandHandler implements ICommandDispatc
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
From 51721b3e27f0775fcb72d536eaeb8a9b201eb70a Mon Sep 17 00:00:00 2001
|
From 221131d48bf4531fa60cde7877e9ff5f6e5b1939 Mon Sep 17 00:00:00 2001
|
||||||
From: Tux <write@imaginarycode.com>
|
From: Tux <write@imaginarycode.com>
|
||||||
Date: Sun, 9 Feb 2014 14:03:03 -0500
|
Date: Sun, 9 Feb 2014 14:03:03 -0500
|
||||||
Subject: [PATCH] Add support for fetching hidden players
|
Subject: [PATCH] Add support for fetching hidden players
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
index 827b8dd..fd0c2d2 100644
|
index b494159..c2e87b1 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
@@ -1407,6 +1407,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@@ -1407,6 +1407,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
|
@ -1,22 +1,22 @@
|
|||||||
From 1be493de51d3d7bd56b4ce6df97a2523f728471c Mon Sep 17 00:00:00 2001
|
From 9a9500938f601950f1d64ba0248ebb661f2445cd Mon Sep 17 00:00:00 2001
|
||||||
From: md_5 <git@md-5.net>
|
From: md_5 <git@md-5.net>
|
||||||
Date: Wed, 12 Feb 2014 18:18:01 +1100
|
Date: Wed, 12 Feb 2014 18:18:01 +1100
|
||||||
Subject: [PATCH] Allow Disabling Creative Item Filter
|
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
|
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||||
index 8148371..0dee302 100644
|
index e62c2f3..8fff72f 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||||
@@ -1682,7 +1682,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
|
@@ -1699,7 +1699,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
|
||||||
|
|
||||||
boolean flag1 = packetplayinsetcreativeslot.a() >= 1 && packetplayinsetcreativeslot.a() < 36 + PlayerInventory.getHotbarSize();
|
boolean flag1 = packetplayinsetcreativeslot.a() >= 1 && packetplayinsetcreativeslot.a() < 36 + PlayerInventory.getHotbarSize();
|
||||||
// CraftBukkit - Add invalidItems check
|
// CraftBukkit - Add invalidItems check
|
||||||
- boolean flag2 = itemstack == null || itemstack.getItem() != null && !invalidItems.contains(Item.getId(itemstack.getItem()));
|
- boolean flag2 = itemstack == null || itemstack.getItem() != null && !invalidItems.contains(Item.getId(itemstack.getItem()));
|
||||||
+ boolean flag2 = itemstack == null || itemstack.getItem() != null && (!invalidItems.contains(Item.getId(itemstack.getItem())) || !org.spigotmc.SpigotConfig.filterCreativeItems); // Spigot
|
+ boolean flag2 = itemstack == null || itemstack.getItem() != null && (!invalidItems.contains(Item.getId(itemstack.getItem())) || !org.spigotmc.SpigotConfig.filterCreativeItems); // Spigot
|
||||||
boolean flag3 = itemstack == null || itemstack.getData() >= 0 && itemstack.count <= 64 && itemstack.count > 0;
|
boolean flag3 = itemstack == null || itemstack.getData() >= 0 && itemstack.count <= 64 && itemstack.count > 0;
|
||||||
|
// CraftBukkit start - Call click event
|
||||||
|
if (flag || (flag1 && !ItemStack.matches(this.player.defaultContainer.getSlot(packetplayinsetcreativeslot.a()).getItem(), packetplayinsetcreativeslot.getItemStack()))) { // Insist on valid slot
|
||||||
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
|
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
|
||||||
index f58208e..86c45c6 100644
|
index f58208e..86c45c6 100644
|
||||||
--- a/src/main/java/org/spigotmc/SpigotConfig.java
|
--- a/src/main/java/org/spigotmc/SpigotConfig.java
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
From d948ca461b0bdfe0a46c85c2a8c83b2156f00c61 Mon Sep 17 00:00:00 2001
|
From e6ce2e83cdc2491641c200c1f860b029fb59bb42 Mon Sep 17 00:00:00 2001
|
||||||
From: md_5 <git@md-5.net>
|
From: md_5 <git@md-5.net>
|
||||||
Date: Wed, 12 Feb 2014 20:02:58 +1100
|
Date: Wed, 12 Feb 2014 20:02:58 +1100
|
||||||
Subject: [PATCH] Cap Channel Registrations
|
Subject: [PATCH] Cap Channel Registrations
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
index fd0c2d2..c6caeec 100644
|
index c2e87b1..0ab028c 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
@@ -1061,6 +1061,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@@ -1061,6 +1061,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
From 4861273a957bfb20cfcaf68d28242a0e89a109bf Mon Sep 17 00:00:00 2001
|
From 5592d63ffecfc0badf3c17d5863cfa2dc87ffa88 Mon Sep 17 00:00:00 2001
|
||||||
From: Thinkofdeath <thethinkofdeath@gmail.com>
|
From: Thinkofdeath <thethinkofdeath@gmail.com>
|
||||||
Date: Wed, 12 Feb 2014 20:44:14 +0000
|
Date: Wed, 12 Feb 2014 20:44:14 +0000
|
||||||
Subject: [PATCH] Allow vanilla commands to be the main version of a command
|
Subject: [PATCH] Allow vanilla commands to be the main version of a command
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
index be4a647..36c0f7e 100644
|
index 46710d8..238e282 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
@@ -317,8 +317,11 @@ public final class CraftServer implements Server {
|
@@ -317,8 +317,11 @@ public final class CraftServer implements Server {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From eba64c36ac125bfb19ab3f8017d535aee822a407 Mon Sep 17 00:00:00 2001
|
From 81df68f800f262fe65c108319400ec47b91d9c40 Mon Sep 17 00:00:00 2001
|
||||||
From: hcherndon <hcherndon@gmail.com>
|
From: hcherndon <hcherndon@gmail.com>
|
||||||
Date: Sat, 15 Feb 2014 01:51:20 -0600
|
Date: Sat, 15 Feb 2014 01:51:20 -0600
|
||||||
Subject: [PATCH] Unfinalize the isDisconnected() method by bukkit.
|
Subject: [PATCH] Unfinalize the isDisconnected() method by bukkit.
|
||||||
@ -6,18 +6,18 @@ 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.)
|
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
|
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||||
index 0dee302..cabd1fa 100644
|
index 8fff72f..b650419 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||||
@@ -2039,7 +2039,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
|
@@ -2060,7 +2060,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
|
||||||
}
|
}
|
||||||
|
|
||||||
// CraftBukkit start - Add "isDisconnected" method
|
// CraftBukkit start - Add "isDisconnected" method
|
||||||
- public final boolean isDisconnected() {
|
- public final boolean isDisconnected() {
|
||||||
+ public boolean isDisconnected() {
|
+ public boolean isDisconnected() { // Spigot
|
||||||
return !this.player.joining && !NetworkManager.a(this.networkManager).config().isAutoRead();
|
return !this.player.joining && !this.networkManager.k.config().isAutoRead();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
--
|
--
|
||||||
2.1.0
|
2.1.0
|
||||||
|
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
From 1b1517f403c2a3d34c3eddbcb8f78e7d0ce42134 Mon Sep 17 00:00:00 2001
|
From 4c6fabefb7e61513178c4d93e46d3c5b58434030 Mon Sep 17 00:00:00 2001
|
||||||
From: drXor <mcyoungsota@gmail.com>
|
From: drXor <mcyoungsota@gmail.com>
|
||||||
Date: Sun, 23 Feb 2014 16:16:59 -0400
|
Date: Sun, 23 Feb 2014 16:16:59 -0400
|
||||||
Subject: [PATCH] Implement Silenceable Lightning API
|
Subject: [PATCH] Implement Silenceable Lightning API
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityLightning.java b/src/main/java/net/minecraft/server/EntityLightning.java
|
diff --git a/src/main/java/net/minecraft/server/EntityLightning.java b/src/main/java/net/minecraft/server/EntityLightning.java
|
||||||
index 5bda5d3..1bbce9b 100644
|
index d355e68..286fdef 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityLightning.java
|
--- a/src/main/java/net/minecraft/server/EntityLightning.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityLightning.java
|
+++ b/src/main/java/net/minecraft/server/EntityLightning.java
|
||||||
@@ -13,6 +13,8 @@ public class EntityLightning extends EntityWeather {
|
@@ -13,6 +13,8 @@ public class EntityLightning extends EntityWeather {
|
||||||
@ -17,7 +17,7 @@ index 5bda5d3..1bbce9b 100644
|
|||||||
public EntityLightning(World world, double d0, double d1, double d2) {
|
public EntityLightning(World world, double d0, double d1, double d2) {
|
||||||
this(world, d0, d1, d2, false);
|
this(world, d0, d1, d2, false);
|
||||||
}
|
}
|
||||||
@@ -53,12 +55,19 @@ public class EntityLightning extends EntityWeather {
|
@@ -52,12 +54,19 @@ public class EntityLightning extends EntityWeather {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -31,18 +31,18 @@ index 5bda5d3..1bbce9b 100644
|
|||||||
}
|
}
|
||||||
+ // Spigot end
|
+ // Spigot end
|
||||||
|
|
||||||
public void s_() {
|
public void t_() {
|
||||||
super.s_();
|
super.t_();
|
||||||
- if (this.lifeTicks == 2) {
|
- if (this.lifeTicks == 2) {
|
||||||
+ if (!isSilent && this.lifeTicks == 2) { // Spigot
|
+ if (!isSilent && this.lifeTicks == 2) { // Spigot
|
||||||
// CraftBukkit start - Use relative location for far away sounds
|
// CraftBukkit start - Use relative location for far away sounds
|
||||||
//this.world.makeSound(this.locX, this.locY, this.locZ, "ambient.weather.thunder", 10000.0F, 0.8F + this.random.nextFloat() * 0.2F);
|
//this.world.makeSound(this.locX, this.locY, this.locZ, "ambient.weather.thunder", 10000.0F, 0.8F + this.random.nextFloat() * 0.2F);
|
||||||
float pitch = 0.8F + this.random.nextFloat() * 0.2F;
|
float pitch = 0.8F + this.random.nextFloat() * 0.2F;
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||||
index 660fd07..f07d87d 100644
|
index 62ad47d..6b26c8f 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||||
@@ -1412,6 +1412,22 @@ public class CraftWorld implements World {
|
@@ -1420,6 +1420,22 @@ public class CraftWorld implements World {
|
||||||
{
|
{
|
||||||
CraftWorld.this.playEffect( location, effect, 0 );
|
CraftWorld.this.playEffect( location, effect, 0 );
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From ffb7bbd08c48ce8a96f80193e164273203c02ab9 Mon Sep 17 00:00:00 2001
|
From 768bcde3e79b42a77e37ad7b26ab497e0bc12762 Mon Sep 17 00:00:00 2001
|
||||||
From: FrozenBrain <carstenbamsti@googlemail.com>
|
From: FrozenBrain <carstenbamsti@googlemail.com>
|
||||||
Date: Sun, 2 Mar 2014 21:13:46 +0100
|
Date: Sun, 2 Mar 2014 21:13:46 +0100
|
||||||
Subject: [PATCH] Use one PermissibleBase for all Command Blocks
|
Subject: [PATCH] Use one PermissibleBase for all Command Blocks
|
||||||
|
@ -1,21 +1,21 @@
|
|||||||
From 0a2ce284436e4ec54b52915f09433c02544ec922 Mon Sep 17 00:00:00 2001
|
From 61bbf0df8768aaf437b957eb136ea27f9f083090 Mon Sep 17 00:00:00 2001
|
||||||
From: Thinkofdeath <thethinkofdeath@gmail.com>
|
From: Thinkofdeath <thethinkofdeath@gmail.com>
|
||||||
Date: Wed, 5 Mar 2014 20:27:27 +0000
|
Date: Wed, 5 Mar 2014 20:27:27 +0000
|
||||||
Subject: [PATCH] Prevent hoppers from loading chunks
|
Subject: [PATCH] Prevent hoppers from loading chunks
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/TileEntityHopper.java b/src/main/java/net/minecraft/server/TileEntityHopper.java
|
diff --git a/src/main/java/net/minecraft/server/TileEntityHopper.java b/src/main/java/net/minecraft/server/TileEntityHopper.java
|
||||||
index f4dc9c7..280d64f 100644
|
index b3bf687..4f50a47 100644
|
||||||
--- a/src/main/java/net/minecraft/server/TileEntityHopper.java
|
--- a/src/main/java/net/minecraft/server/TileEntityHopper.java
|
||||||
+++ b/src/main/java/net/minecraft/server/TileEntityHopper.java
|
+++ b/src/main/java/net/minecraft/server/TileEntityHopper.java
|
||||||
@@ -555,6 +555,7 @@ public class TileEntityHopper extends TileEntityContainer implements IHopper, IU
|
@@ -556,6 +556,7 @@ public class TileEntityHopper extends TileEntityContainer implements IHopper, IU
|
||||||
int j = MathHelper.floor(d1);
|
int j = MathHelper.floor(d1);
|
||||||
int k = MathHelper.floor(d2);
|
int k = MathHelper.floor(d2);
|
||||||
BlockPosition blockposition = new BlockPosition(i, j, k);
|
BlockPosition blockposition = new BlockPosition(i, j, k);
|
||||||
+ if ( !world.isLoaded( blockposition ) ) return null; // Spigot
|
+ if ( !world.isLoaded( blockposition ) ) return null; // Spigot
|
||||||
TileEntity tileentity = world.getTileEntity(new BlockPosition(i, j, k));
|
Block block = world.getType(blockposition).getBlock();
|
||||||
|
|
||||||
if (tileentity instanceof IInventory) {
|
if (block.isTileEntity()) {
|
||||||
--
|
--
|
||||||
2.1.0
|
2.1.0
|
||||||
|
|
||||||
|
@ -1,23 +1,23 @@
|
|||||||
From 4621df9d2cb409141bc86e08543b51623560ca39 Mon Sep 17 00:00:00 2001
|
From 3686a1f9bc04251600256dd63e5c90c891cddca6 Mon Sep 17 00:00:00 2001
|
||||||
From: md_5 <git@md-5.net>
|
From: md_5 <git@md-5.net>
|
||||||
Date: Mon, 10 Mar 2014 09:03:28 +1100
|
Date: Mon, 10 Mar 2014 09:03:28 +1100
|
||||||
Subject: [PATCH] Guard Entity List
|
Subject: [PATCH] Guard Entity List
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||||
index 248f485..59bd847 100644
|
index 974fe77..2ea78c2 100644
|
||||||
--- a/src/main/java/net/minecraft/server/World.java
|
--- a/src/main/java/net/minecraft/server/World.java
|
||||||
+++ b/src/main/java/net/minecraft/server/World.java
|
+++ b/src/main/java/net/minecraft/server/World.java
|
||||||
@@ -33,7 +33,32 @@ import org.bukkit.event.weather.ThunderChangeEvent;
|
@@ -34,7 +34,32 @@ public abstract class World implements IBlockAccess {
|
||||||
public abstract class World implements IBlockAccess {
|
|
||||||
|
|
||||||
|
private int a = 63;
|
||||||
protected boolean e;
|
protected boolean e;
|
||||||
- public final List entityList = Lists.newArrayList();
|
- public final List<Entity> entityList = Lists.newArrayList();
|
||||||
+ // Spigot start - guard entity list from removals
|
+ // Spigot start - guard entity list from removals
|
||||||
+ public List entityList = new java.util.ArrayList()
|
+ public final List<Entity> entityList = new java.util.ArrayList<Entity>()
|
||||||
+ {
|
+ {
|
||||||
+ @Override
|
+ @Override
|
||||||
+ public Object remove(int index)
|
+ public Entity remove(int index)
|
||||||
+ {
|
+ {
|
||||||
+ guard();
|
+ guard();
|
||||||
+ return super.remove( index );
|
+ return super.remove( index );
|
||||||
@ -39,10 +39,10 @@ index 248f485..59bd847 100644
|
|||||||
+ }
|
+ }
|
||||||
+ };
|
+ };
|
||||||
+ // Spigot end
|
+ // Spigot end
|
||||||
protected final List g = Lists.newArrayList();
|
protected final List<Entity> g = Lists.newArrayList();
|
||||||
public final List h = Lists.newArrayList();
|
public final List<TileEntity> h = Lists.newArrayList();
|
||||||
public final List tileEntityList = Lists.newArrayList();
|
public final List<TileEntity> tileEntityList = Lists.newArrayList();
|
||||||
@@ -101,6 +126,7 @@ public abstract class World implements IBlockAccess {
|
@@ -102,6 +127,7 @@ public abstract class World implements IBlockAccess {
|
||||||
private int tickPosition;
|
private int tickPosition;
|
||||||
|
|
||||||
// Spigot start
|
// Spigot start
|
||||||
@ -50,7 +50,7 @@ index 248f485..59bd847 100644
|
|||||||
protected final gnu.trove.map.hash.TLongShortHashMap chunkTickList;
|
protected final gnu.trove.map.hash.TLongShortHashMap chunkTickList;
|
||||||
protected float growthOdds = 100;
|
protected float growthOdds = 100;
|
||||||
protected float modifiedOdds = 100;
|
protected float modifiedOdds = 100;
|
||||||
@@ -1295,6 +1321,7 @@ public abstract class World implements IBlockAccess {
|
@@ -1341,6 +1367,7 @@ public abstract class World implements IBlockAccess {
|
||||||
|
|
||||||
org.spigotmc.ActivationRange.activateEntities(this); // Spigot
|
org.spigotmc.ActivationRange.activateEntities(this); // Spigot
|
||||||
timings.entityTick.startTiming(); // Spigot
|
timings.entityTick.startTiming(); // Spigot
|
||||||
@ -58,7 +58,7 @@ index 248f485..59bd847 100644
|
|||||||
// CraftBukkit start - Use field for loop variable
|
// CraftBukkit start - Use field for loop variable
|
||||||
for (this.tickPosition = 0; this.tickPosition < this.entityList.size(); ++this.tickPosition) {
|
for (this.tickPosition = 0; this.tickPosition < this.entityList.size(); ++this.tickPosition) {
|
||||||
entity = (Entity) this.entityList.get(this.tickPosition);
|
entity = (Entity) this.entityList.get(this.tickPosition);
|
||||||
@@ -1331,12 +1358,15 @@ public abstract class World implements IBlockAccess {
|
@@ -1377,12 +1404,15 @@ public abstract class World implements IBlockAccess {
|
||||||
this.getChunkAt(j, k).b(entity);
|
this.getChunkAt(j, k).b(entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From f665effb267d8740b909cf1c2c32dae1916b5a2f Mon Sep 17 00:00:00 2001
|
From 74a9ae442876b923afc2ffee51d06900fc15f166 Mon Sep 17 00:00:00 2001
|
||||||
From: Thinkofdeath <thethinkofdeath@gmail.com>
|
From: Thinkofdeath <thethinkofdeath@gmail.com>
|
||||||
Date: Tue, 14 Jan 2014 20:11:25 +0000
|
Date: Tue, 14 Jan 2014 20:11:25 +0000
|
||||||
Subject: [PATCH] Fix ConcurrentModificationException while being idle kicked
|
Subject: [PATCH] Fix ConcurrentModificationException while being idle kicked
|
||||||
@ -6,10 +6,10 @@ Subject: [PATCH] Fix ConcurrentModificationException while being idle kicked
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||||
index 59bd847..1fe5cf9 100644
|
index 2ea78c2..57fda56 100644
|
||||||
--- a/src/main/java/net/minecraft/server/World.java
|
--- a/src/main/java/net/minecraft/server/World.java
|
||||||
+++ b/src/main/java/net/minecraft/server/World.java
|
+++ b/src/main/java/net/minecraft/server/World.java
|
||||||
@@ -1046,6 +1046,7 @@ public abstract class World implements IBlockAccess {
|
@@ -1090,6 +1090,7 @@ public abstract class World implements IBlockAccess {
|
||||||
this.everyoneSleeping();
|
this.everyoneSleeping();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -17,7 +17,7 @@ index 59bd847..1fe5cf9 100644
|
|||||||
int i = entity.ae;
|
int i = entity.ae;
|
||||||
int j = entity.ag;
|
int j = entity.ag;
|
||||||
|
|
||||||
@@ -1062,6 +1063,7 @@ public abstract class World implements IBlockAccess {
|
@@ -1106,6 +1107,7 @@ public abstract class World implements IBlockAccess {
|
||||||
this.entityList.remove(index);
|
this.entityList.remove(index);
|
||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
From 77438a1939346d53bed1c6f42498f5070089251e Mon Sep 17 00:00:00 2001
|
From f6f9ff67f4e3210480843d9d2a3a7e5c74fca239 Mon Sep 17 00:00:00 2001
|
||||||
From: drXor <mcyoungsota@gmail.com>
|
From: drXor <mcyoungsota@gmail.com>
|
||||||
Date: Tue, 25 Feb 2014 15:15:26 -0400
|
Date: Tue, 25 Feb 2014 15:15:26 -0400
|
||||||
Subject: [PATCH] Cancellable WitherSkull potion effect
|
Subject: [PATCH] Cancellable WitherSkull potion effect
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityWitherSkull.java b/src/main/java/net/minecraft/server/EntityWitherSkull.java
|
diff --git a/src/main/java/net/minecraft/server/EntityWitherSkull.java b/src/main/java/net/minecraft/server/EntityWitherSkull.java
|
||||||
index a78e84c..e3f26a4 100644
|
index e169184..f0e627b 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityWitherSkull.java
|
--- a/src/main/java/net/minecraft/server/EntityWitherSkull.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityWitherSkull.java
|
+++ b/src/main/java/net/minecraft/server/EntityWitherSkull.java
|
||||||
@@ -35,8 +35,11 @@ public class EntityWitherSkull extends EntityFireball {
|
@@ -36,8 +36,11 @@ public class EntityWitherSkull extends EntityFireball {
|
||||||
protected void a(MovingObjectPosition movingobjectposition) {
|
protected void a(MovingObjectPosition movingobjectposition) {
|
||||||
if (!this.world.isStatic) {
|
if (!this.world.isClientSide) {
|
||||||
if (movingobjectposition.entity != null) {
|
if (movingobjectposition.entity != null) {
|
||||||
+ // Spigot start
|
+ // Spigot start
|
||||||
+ boolean didDamage = false;
|
+ boolean didDamage = false;
|
||||||
@ -21,7 +21,7 @@ index a78e84c..e3f26a4 100644
|
|||||||
if (!movingobjectposition.entity.isAlive()) {
|
if (!movingobjectposition.entity.isAlive()) {
|
||||||
this.shooter.heal(5.0F, org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason.WITHER); // CraftBukkit
|
this.shooter.heal(5.0F, org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason.WITHER); // CraftBukkit
|
||||||
} else {
|
} else {
|
||||||
@@ -44,10 +47,11 @@ public class EntityWitherSkull extends EntityFireball {
|
@@ -45,10 +48,11 @@ public class EntityWitherSkull extends EntityFireball {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
From 6305a93fd09c6970888d987c81787daa63701e4c Mon Sep 17 00:00:00 2001
|
From 5366ec74774f139c46dc97f76cedabcf60753a10 Mon Sep 17 00:00:00 2001
|
||||||
From: drXor <mcyoungsota@gmail.com>
|
From: drXor <mcyoungsota@gmail.com>
|
||||||
Date: Sat, 15 Mar 2014 01:30:05 -0400
|
Date: Sat, 15 Mar 2014 01:30:05 -0400
|
||||||
Subject: [PATCH] Descriptive kick reasons instead of Nope!
|
Subject: [PATCH] Descriptive kick reasons instead of Nope!
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||||
index 25192f3..dfb4299 100644
|
index 82accf4..d6bef0b 100644
|
||||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||||
@@ -208,7 +208,7 @@ public abstract class Entity implements ICommandListener {
|
@@ -209,7 +209,7 @@ public abstract class Entity implements ICommandListener {
|
||||||
if (f == Float.POSITIVE_INFINITY || f == Float.NEGATIVE_INFINITY) {
|
if (f == Float.POSITIVE_INFINITY || f == Float.NEGATIVE_INFINITY) {
|
||||||
if (this instanceof EntityPlayer) {
|
if (this instanceof EntityPlayer) {
|
||||||
this.world.getServer().getLogger().warning(this.getName() + " was caught trying to crash the server with an invalid yaw");
|
this.world.getServer().getLogger().warning(this.getName() + " was caught trying to crash the server with an invalid yaw");
|
||||||
@ -17,7 +17,7 @@ index 25192f3..dfb4299 100644
|
|||||||
}
|
}
|
||||||
f = 0;
|
f = 0;
|
||||||
}
|
}
|
||||||
@@ -221,7 +221,7 @@ public abstract class Entity implements ICommandListener {
|
@@ -222,7 +222,7 @@ public abstract class Entity implements ICommandListener {
|
||||||
if (f1 == Float.POSITIVE_INFINITY || f1 == Float.NEGATIVE_INFINITY) {
|
if (f1 == Float.POSITIVE_INFINITY || f1 == Float.NEGATIVE_INFINITY) {
|
||||||
if (this instanceof EntityPlayer) {
|
if (this instanceof EntityPlayer) {
|
||||||
this.world.getServer().getLogger().warning(this.getName() + " was caught trying to crash the server with an invalid pitch");
|
this.world.getServer().getLogger().warning(this.getName() + " was caught trying to crash the server with an invalid pitch");
|
||||||
@ -27,10 +27,10 @@ index 25192f3..dfb4299 100644
|
|||||||
f1 = 0;
|
f1 = 0;
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||||
index e8f0167..80e03bc 100644
|
index b650419..0bcdef4 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||||
@@ -186,7 +186,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
|
@@ -196,7 +196,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
|
||||||
// CraftBukkit start - Check for NaN
|
// CraftBukkit start - Check for NaN
|
||||||
if (!NumberConversions.isFinite(packetplayinflying.x) || !NumberConversions.isFinite(packetplayinflying.y) || !NumberConversions.isFinite(packetplayinflying.z)) {
|
if (!NumberConversions.isFinite(packetplayinflying.x) || !NumberConversions.isFinite(packetplayinflying.y) || !NumberConversions.isFinite(packetplayinflying.z)) {
|
||||||
c.warn(player.getName() + " was caught trying to crash the server with an invalid position.");
|
c.warn(player.getName() + " was caught trying to crash the server with an invalid position.");
|
||||||
@ -39,7 +39,7 @@ index e8f0167..80e03bc 100644
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
@@ -874,7 +874,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
|
@@ -892,7 +892,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
|
||||||
this.player.z();
|
this.player.z();
|
||||||
} else {
|
} else {
|
||||||
PlayerConnection.c.warn(this.player.getName() + " tried to set an invalid carried item");
|
PlayerConnection.c.warn(this.player.getName() + " tried to set an invalid carried item");
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
From 56599097f688176bf735a8e0134b380443aed751 Mon Sep 17 00:00:00 2001
|
From 2516216206c3330ccc1057fe4e9bcc11e9fd2760 Mon Sep 17 00:00:00 2001
|
||||||
From: drXor <mcyoungsota@gmail.com>
|
From: drXor <mcyoungsota@gmail.com>
|
||||||
Date: Sat, 29 Mar 2014 13:44:25 -0400
|
Date: Sat, 29 Mar 2014 13:44:25 -0400
|
||||||
Subject: [PATCH] Configurable dragon death and wither spawn sounds
|
Subject: [PATCH] Configurable dragon death and wither spawn sounds
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityEnderDragon.java b/src/main/java/net/minecraft/server/EntityEnderDragon.java
|
diff --git a/src/main/java/net/minecraft/server/EntityEnderDragon.java b/src/main/java/net/minecraft/server/EntityEnderDragon.java
|
||||||
index 51686c4..ec94142 100644
|
index 253e60b..2b038e0 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityEnderDragon.java
|
--- a/src/main/java/net/minecraft/server/EntityEnderDragon.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityEnderDragon.java
|
+++ b/src/main/java/net/minecraft/server/EntityEnderDragon.java
|
||||||
@@ -572,6 +572,7 @@ public class EntityEnderDragon extends EntityInsentient implements IComplex, IMo
|
@@ -578,6 +578,7 @@ public class EntityEnderDragon extends EntityInsentient implements IComplex, IMo
|
||||||
double deltaX = this.locX - player.locX;
|
double deltaX = this.locX - player.locX;
|
||||||
double deltaZ = this.locZ - player.locZ;
|
double deltaZ = this.locZ - player.locZ;
|
||||||
double distanceSquared = deltaX * deltaX + deltaZ * deltaZ;
|
double distanceSquared = deltaX * deltaX + deltaZ * deltaZ;
|
||||||
@ -17,10 +17,10 @@ index 51686c4..ec94142 100644
|
|||||||
double deltaLength = Math.sqrt(distanceSquared);
|
double deltaLength = Math.sqrt(distanceSquared);
|
||||||
double relativeX = player.locX + (deltaX / deltaLength) * viewDistance;
|
double relativeX = player.locX + (deltaX / deltaLength) * viewDistance;
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityWither.java b/src/main/java/net/minecraft/server/EntityWither.java
|
diff --git a/src/main/java/net/minecraft/server/EntityWither.java b/src/main/java/net/minecraft/server/EntityWither.java
|
||||||
index d21c0e9..8ed2b4b 100644
|
index 2816af1..d904a3f 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityWither.java
|
--- a/src/main/java/net/minecraft/server/EntityWither.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityWither.java
|
+++ b/src/main/java/net/minecraft/server/EntityWither.java
|
||||||
@@ -183,6 +183,7 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
|
@@ -191,6 +191,7 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
|
||||||
double deltaX = this.locX - player.locX;
|
double deltaX = this.locX - player.locX;
|
||||||
double deltaZ = this.locZ - player.locZ;
|
double deltaZ = this.locZ - player.locZ;
|
||||||
double distanceSquared = deltaX * deltaX + deltaZ * deltaZ;
|
double distanceSquared = deltaX * deltaX + deltaZ * deltaZ;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From 671c6af2057b601d2ca7efee24fe3c79ed5e687c Mon Sep 17 00:00:00 2001
|
From 98a6c5b5dc1486fe21610b16ae5e0fea70c6d67e Mon Sep 17 00:00:00 2001
|
||||||
From: Thinkofdeath <thethinkofdeath@gmail.com>
|
From: Thinkofdeath <thethinkofdeath@gmail.com>
|
||||||
Date: Fri, 11 Apr 2014 11:16:34 +0100
|
Date: Fri, 11 Apr 2014 11:16:34 +0100
|
||||||
Subject: [PATCH] Display 'Spigot' in client crashes, server lists and Mojang
|
Subject: [PATCH] Display 'Spigot' in client crashes, server lists and Mojang
|
||||||
@ -6,10 +6,10 @@ Subject: [PATCH] Display 'Spigot' in client crashes, server lists and Mojang
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
index 34fb946..ff98d02 100644
|
index a5cca2b..b2ad2ca 100644
|
||||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
@@ -1053,7 +1053,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs
|
@@ -1015,7 +1015,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getServerModName() {
|
public String getServerModName() {
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
From 6aef733e905e1ec1c487d21ff858f2f49f4022ec Mon Sep 17 00:00:00 2001
|
From b505768f38abdcb3d062cd825ebb4ec02422a002 Mon Sep 17 00:00:00 2001
|
||||||
From: md_5 <git@md-5.net>
|
From: md_5 <git@md-5.net>
|
||||||
Date: Sat, 12 Apr 2014 21:23:58 +1000
|
Date: Sat, 12 Apr 2014 21:23:58 +1000
|
||||||
Subject: [PATCH] Treat Bungee as Online Mode
|
Subject: [PATCH] Treat Bungee as Online Mode
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java
|
diff --git a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java
|
||||||
index 33d0702..3b50d40 100644
|
index 31aa200..c1f8ff6 100644
|
||||||
--- a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java
|
--- a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java
|
||||||
+++ b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java
|
+++ b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java
|
||||||
@@ -53,7 +53,7 @@ public class NameReferencingFileConverter {
|
@@ -63,7 +63,7 @@ public class NameReferencingFileConverter {
|
||||||
private static void a(MinecraftServer minecraftserver, Collection collection, ProfileLookupCallback profilelookupcallback) {
|
}
|
||||||
String[] astring = (String[]) Iterators.toArray(Iterators.filter(collection.iterator(), new PredicateEmptyList()), String.class);
|
}), String.class);
|
||||||
|
|
||||||
- if (minecraftserver.getOnlineMode()) {
|
- if (minecraftserver.getOnlineMode()) {
|
||||||
+ if (minecraftserver.getOnlineMode() || org.spigotmc.SpigotConfig.bungee) { // Spigot: bungee = online mode, for now.
|
+ if (minecraftserver.getOnlineMode() || org.spigotmc.SpigotConfig.bungee) { // Spigot: bungee = online mode, for now.
|
||||||
|
@ -1,17 +1,17 @@
|
|||||||
From 75adf09cba4e053a9918a79a62215cf7fd0233d1 Mon Sep 17 00:00:00 2001
|
From bcfef4b5882636b74d1535d0bb40df88f4e8bc1f Mon Sep 17 00:00:00 2001
|
||||||
From: md_5 <git@md-5.net>
|
From: md_5 <git@md-5.net>
|
||||||
Date: Sat, 12 Apr 2014 23:30:44 +1000
|
Date: Sat, 12 Apr 2014 23:30:44 +1000
|
||||||
Subject: [PATCH] Add Conversion Message
|
Subject: [PATCH] Add Conversion Message
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
|
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||||
index ced9efa..80755dd 100644
|
index 188a094..28135ba 100644
|
||||||
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
|
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
|
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||||
@@ -453,6 +453,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
|
@@ -513,6 +513,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
|
||||||
}
|
}
|
||||||
|
|
||||||
protected boolean aP() {
|
protected boolean aQ() {
|
||||||
+ server.getLogger().info( "**** Beginning UUID conversion, this may take A LONG time ****"); // Spigot, let the user know whats up!
|
+ server.getLogger().info( "**** Beginning UUID conversion, this may take A LONG time ****"); // Spigot, let the user know whats up!
|
||||||
boolean flag = false;
|
boolean flag = false;
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From 294401c8382d6ee3e78a42288a30ff9fb0a626f1 Mon Sep 17 00:00:00 2001
|
From 2f62f2f27a069a33ffdea27c32ad77d41a45b4a1 Mon Sep 17 00:00:00 2001
|
||||||
From: "gjmcferrin@gmail.com" <gjmcferrin@gmail.com>
|
From: "gjmcferrin@gmail.com" <gjmcferrin@gmail.com>
|
||||||
Date: Mon, 10 Feb 2014 10:05:11 -0500
|
Date: Mon, 10 Feb 2014 10:05:11 -0500
|
||||||
Subject: [PATCH] Properly cancel fishing event. Fixes BUKKIT-5396
|
Subject: [PATCH] Properly cancel fishing event. Fixes BUKKIT-5396
|
||||||
@ -10,7 +10,7 @@ cleared. This ensures that the player's hooked entity value is set to null so
|
|||||||
that the next attempt will result in the proper state being called.
|
that the next attempt will result in the proper state being called.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/ItemFishingRod.java b/src/main/java/net/minecraft/server/ItemFishingRod.java
|
diff --git a/src/main/java/net/minecraft/server/ItemFishingRod.java b/src/main/java/net/minecraft/server/ItemFishingRod.java
|
||||||
index 423a776..c14d261 100644
|
index 3cf292f..050a504 100644
|
||||||
--- a/src/main/java/net/minecraft/server/ItemFishingRod.java
|
--- a/src/main/java/net/minecraft/server/ItemFishingRod.java
|
||||||
+++ b/src/main/java/net/minecraft/server/ItemFishingRod.java
|
+++ b/src/main/java/net/minecraft/server/ItemFishingRod.java
|
||||||
@@ -23,6 +23,7 @@ public class ItemFishingRod extends Item {
|
@@ -23,6 +23,7 @@ public class ItemFishingRod extends Item {
|
||||||
|
@ -1,21 +1,21 @@
|
|||||||
From 8a26917a0a8b00bcbc5534681dc1d97e96c43bf5 Mon Sep 17 00:00:00 2001
|
From 7bff30bb6fb6973f318d5108010fd39c2089ce91 Mon Sep 17 00:00:00 2001
|
||||||
From: md_5 <git@md-5.net>
|
From: md_5 <git@md-5.net>
|
||||||
Date: Sun, 13 Apr 2014 09:00:59 +1000
|
Date: Sun, 13 Apr 2014 09:00:59 +1000
|
||||||
Subject: [PATCH] Print Stack on InternalException
|
Subject: [PATCH] Print Stack on InternalException
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java
|
diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java
|
||||||
index 78d5949..65b66cd 100644
|
index f7a011a..b62cc5a 100644
|
||||||
--- a/src/main/java/net/minecraft/server/NetworkManager.java
|
--- a/src/main/java/net/minecraft/server/NetworkManager.java
|
||||||
+++ b/src/main/java/net/minecraft/server/NetworkManager.java
|
+++ b/src/main/java/net/minecraft/server/NetworkManager.java
|
||||||
@@ -71,6 +71,7 @@ public class NetworkManager extends SimpleChannelInboundHandler {
|
@@ -111,6 +111,7 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet> {
|
||||||
public void exceptionCaught(ChannelHandlerContext channelhandlercontext, Throwable throwable) {
|
}
|
||||||
NetworkManager.f.debug("Disconnecting " + this.getSocketAddress(), throwable);
|
|
||||||
this.close(new ChatMessage("disconnect.genericReason", new Object[] { "Internal Exception: " + throwable}));
|
this.close(chatmessage);
|
||||||
+ if (MinecraftServer.getServer().isDebugging()) throwable.printStackTrace(); // Spigot
|
+ if (MinecraftServer.getServer().isDebugging()) throwable.printStackTrace(); // Spigot
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void a(ChannelHandlerContext channelhandlercontext, Packet packet) {
|
protected void a(ChannelHandlerContext channelhandlercontext, Packet packet) throws Exception {
|
||||||
--
|
--
|
||||||
2.1.0
|
2.1.0
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user