Update PaperSpigot to 1.8.4
This commit is contained in:
parent
033b54d5de
commit
4c8a717466
15 changed files with 151 additions and 94 deletions
|
@ -1,11 +1,11 @@
|
||||||
From 64c05befc1e1204e32698b10f45283dad6affb62 Mon Sep 17 00:00:00 2001
|
From 28f77537223157f9bd5c5f6849eb763c9db72e86 Mon Sep 17 00:00:00 2001
|
||||||
From: Zach Brown <Zbob750@live.com>
|
From: Zach Brown <Zbob750@live.com>
|
||||||
Date: Tue, 6 Jan 2015 22:12:31 -0600
|
Date: Tue, 6 Jan 2015 22:12:31 -0600
|
||||||
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 3e52a20..20a2cc9 100644
|
index 989f030..c91f2c1 100644
|
||||||
--- a/pom.xml
|
--- a/pom.xml
|
||||||
+++ b/pom.xml
|
+++ b/pom.xml
|
||||||
@@ -4,18 +4,18 @@
|
@@ -4,18 +4,18 @@
|
||||||
|
@ -24,7 +24,7 @@ index 3e52a20..20a2cc9 100644
|
||||||
- <artifactId>spigot-api</artifactId>
|
- <artifactId>spigot-api</artifactId>
|
||||||
+ <groupId>org.github.paperspigot</groupId>
|
+ <groupId>org.github.paperspigot</groupId>
|
||||||
+ <artifactId>paperspigot-api</artifactId>
|
+ <artifactId>paperspigot-api</artifactId>
|
||||||
<version>1.8.3-R0.1-SNAPSHOT</version>
|
<version>1.8.4-R0.1-SNAPSHOT</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
- <name>Spigot-API</name>
|
- <name>Spigot-API</name>
|
||||||
|
@ -35,5 +35,5 @@ index 3e52a20..20a2cc9 100644
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
--
|
--
|
||||||
1.9.1
|
2.4.1.windows.1
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
From d3b5c90ffd39747dff09972ed7cf9c5e6a8b9327 Mon Sep 17 00:00:00 2001
|
From 0975c9110ce278a67e0df5457ca2cc22a8779f33 Mon Sep 17 00:00:00 2001
|
||||||
From: Zach Brown <zach.brown@destroystokyo.com>
|
From: Zach Brown <zach.brown@destroystokyo.com>
|
||||||
Date: Thu, 19 Mar 2015 19:41:15 -0500
|
Date: Thu, 19 Mar 2015 19:41:15 -0500
|
||||||
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 1c8d4ea..9d5b419 100644
|
index 333f528..b3982e1 100644
|
||||||
--- a/pom.xml
|
--- a/pom.xml
|
||||||
+++ b/pom.xml
|
+++ b/pom.xml
|
||||||
@@ -1,12 +1,12 @@
|
@@ -1,12 +1,12 @@
|
||||||
|
@ -17,7 +17,7 @@ index 1c8d4ea..9d5b419 100644
|
||||||
+ <groupId>org.github.paperspigot</groupId>
|
+ <groupId>org.github.paperspigot</groupId>
|
||||||
+ <artifactId>paperspigot</artifactId>
|
+ <artifactId>paperspigot</artifactId>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
<version>1.8.3-R0.1-SNAPSHOT</version>
|
<version>1.8.4-R0.1-SNAPSHOT</version>
|
||||||
- <name>Spigot</name>
|
- <name>Spigot</name>
|
||||||
- <url>http://www.spigotmc.org</url>
|
- <url>http://www.spigotmc.org</url>
|
||||||
+ <name>PaperSpigot</name>
|
+ <name>PaperSpigot</name>
|
||||||
|
@ -94,5 +94,5 @@ index 9304637..3a4b142 100644
|
||||||
|
|
||||||
if (stream != null) {
|
if (stream != null) {
|
||||||
--
|
--
|
||||||
1.9.1
|
2.4.1.windows.1
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
From 87f7b6f12d357afe2d1cffc42baaa726e3fbd95d Mon Sep 17 00:00:00 2001
|
From 70713e64a607952dc3ffc9a7d5cda1fb3d281877 Mon Sep 17 00:00:00 2001
|
||||||
From: Zach Brown <zach.brown@destroystokyo.com>
|
From: Zach Brown <zach.brown@destroystokyo.com>
|
||||||
Date: Sat, 7 Mar 2015 19:44:29 -0600
|
Date: Mon, 18 May 2015 17:32:46 -0500
|
||||||
Subject: [PATCH] mc-dev imports
|
Subject: [PATCH] mc-dev imports
|
||||||
|
|
||||||
|
|
||||||
|
@ -918,5 +918,5 @@ index 0000000..f75e2de
|
||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
--
|
--
|
||||||
1.9.4.msysgit.2
|
2.4.1.windows.1
|
||||||
|
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
From 3f8f70c97cbdcc1ecc64d7ae417b98e11bdd72fe Mon Sep 17 00:00:00 2001
|
From 9031da4fcbb0a318f997e732acb6d366f1f66b39 Mon Sep 17 00:00:00 2001
|
||||||
From: Zach Brown <zach.brown@destroystokyo.com>
|
From: Zach Brown <zach.brown@destroystokyo.com>
|
||||||
Date: Sat, 7 Mar 2015 21:03:06 -0600
|
Date: Sat, 7 Mar 2015 21:03:06 -0600
|
||||||
Subject: [PATCH] Allow nerfed mobs to jump
|
Subject: [PATCH] Allow nerfed mobs to jump
|
||||||
|
|
||||||
|
|
||||||
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 9621ce0..261bfb7 100644
|
index 73cdd41..120e75b 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
|
||||||
@@ -461,6 +461,12 @@ public abstract class EntityInsentient extends EntityLiving {
|
@@ -460,6 +460,12 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||||
// Spigot Start
|
// Spigot Start
|
||||||
if ( this.fromMobSpawner )
|
if ( this.fromMobSpawner )
|
||||||
{
|
{
|
||||||
|
@ -22,5 +22,5 @@ index 9621ce0..261bfb7 100644
|
||||||
}
|
}
|
||||||
// Spigot End
|
// Spigot End
|
||||||
--
|
--
|
||||||
2.3.5
|
2.4.1.windows.1
|
||||||
|
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
From 3f91d9981a23c8842f7102035900b7944af4afc9 Mon Sep 17 00:00:00 2001
|
From d55f015904ac32180e82497bc90fa5e491e1e831 Mon Sep 17 00:00:00 2001
|
||||||
From: Zach Brown <zach.brown@destroystokyo.com>
|
From: Zach Brown <zach.brown@destroystokyo.com>
|
||||||
Date: Sat, 7 Mar 2015 21:07:10 -0600
|
Date: Sat, 7 Mar 2015 21:07:10 -0600
|
||||||
Subject: [PATCH] Toggle for player interact limiter
|
Subject: [PATCH] Toggle for player interact limiter
|
||||||
|
|
||||||
|
|
||||||
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 3108938..0c8dda6 100644
|
index 9e50ad7..9a82f3b 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
|
||||||
@@ -642,7 +642,8 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
|
@@ -638,7 +638,8 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
|
||||||
PlayerConnectionUtils.ensureMainThread(packetplayinblockplace, this, this.player.u());
|
PlayerConnectionUtils.ensureMainThread(packetplayinblockplace, this, this.player.u());
|
||||||
WorldServer worldserver = this.minecraftServer.getWorldServer(this.player.dimension);
|
WorldServer worldserver = this.minecraftServer.getWorldServer(this.player.dimension);
|
||||||
boolean throttled = false;
|
boolean throttled = false;
|
||||||
|
@ -38,5 +38,5 @@ index bff794a..02c4004 100644
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
--
|
--
|
||||||
2.3.5
|
2.4.1.windows.1
|
||||||
|
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
From 0a3b20f045f56f1d5f879b9cb76e87eab1ab8ee6 Mon Sep 17 00:00:00 2001
|
From d2087b8499048bc411ed3d619cb73f344b8fc800 Mon Sep 17 00:00:00 2001
|
||||||
From: Suddenly <suddenly@suddenly.coffee>
|
From: Suddenly <suddenly@suddenly.coffee>
|
||||||
Date: Sat, 7 Mar 2015 21:40:48 -0600
|
Date: Sat, 7 Mar 2015 21:40:48 -0600
|
||||||
Subject: [PATCH] Add configurable despawn distances for living entities
|
Subject: [PATCH] Add configurable despawn distances for living entities
|
||||||
|
|
||||||
|
|
||||||
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 261bfb7..b0cae5b 100644
|
index 120e75b..fdca016 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
|
||||||
@@ -439,13 +439,13 @@ public abstract class EntityInsentient extends EntityLiving {
|
@@ -438,13 +438,13 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||||
double d2 = entityhuman.locZ - this.locZ;
|
double d2 = entityhuman.locZ - this.locZ;
|
||||||
double d3 = d0 * d0 + d1 * d1 + d2 * d2;
|
double d3 = d0 * d0 + d1 * d1 + d2 * d2;
|
||||||
|
|
||||||
|
@ -52,5 +52,5 @@ index ac2f470..7ad9bb3 100644
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
--
|
--
|
||||||
2.3.5
|
2.4.1.windows.1
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
From 869dbe46052c9b5bc254f32bac1dfd06e5c005bf Mon Sep 17 00:00:00 2001
|
From 2a8b0ca92aee9d8899acdf6ea483e9d16e4da532 Mon Sep 17 00:00:00 2001
|
||||||
From: Jedediah Smith <jedediah@silencegreys.com>
|
From: Zach Brown <zach.brown@destroystokyo.com>
|
||||||
Date: Sat, 7 Mar 2015 22:52:21 -0600
|
Date: Mon, 18 May 2015 17:52:45 -0500
|
||||||
Subject: [PATCH] Player affects spawning API
|
Subject: [PATCH] Player affects spawning 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 e7fd331..4aa8096 100644
|
index 0fac7c9..9fd8b3c 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
|
||||||
@@ -61,6 +61,7 @@ public abstract class EntityHuman extends EntityLiving {
|
@@ -61,6 +61,7 @@ public abstract class EntityHuman extends EntityLiving {
|
||||||
|
@ -17,10 +17,10 @@ index e7fd331..4aa8096 100644
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
public boolean fauxSleeping;
|
public boolean fauxSleeping;
|
||||||
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 b0cae5b..e4c1cd8 100644
|
index fdca016..2a57b24 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
|
||||||
@@ -431,7 +431,7 @@ public abstract class EntityInsentient extends EntityLiving {
|
@@ -430,7 +430,7 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||||
if (this.persistent) {
|
if (this.persistent) {
|
||||||
this.ticksFarFromPlayer = 0;
|
this.ticksFarFromPlayer = 0;
|
||||||
} else {
|
} else {
|
||||||
|
@ -30,7 +30,7 @@ index b0cae5b..e4c1cd8 100644
|
||||||
if (entityhuman != null) {
|
if (entityhuman != null) {
|
||||||
double d0 = entityhuman.locX - this.locX;
|
double d0 = entityhuman.locX - this.locX;
|
||||||
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 df71db5..00754cd 100644
|
index 1680918..eca4679 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
|
||||||
@@ -52,7 +52,7 @@ public abstract class MobSpawnerAbstract {
|
@@ -52,7 +52,7 @@ public abstract class MobSpawnerAbstract {
|
||||||
|
@ -43,15 +43,15 @@ index df71db5..00754cd 100644
|
||||||
|
|
||||||
public void c() {
|
public void c() {
|
||||||
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 aeb0a44..7df5b84 100644
|
index 3964e3f..6c8e4df 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
|
||||||
@@ -52,7 +52,7 @@ public final class SpawnerCreature {
|
@@ -52,7 +52,7 @@ public final class SpawnerCreature {
|
||||||
while (iterator.hasNext()) {
|
while (iterator.hasNext()) {
|
||||||
EntityHuman entityhuman = (EntityHuman) iterator.next();
|
EntityHuman entityhuman = (EntityHuman) iterator.next();
|
||||||
|
|
||||||
- if (!entityhuman.v()) {
|
- if (!entityhuman.isSpectator()) {
|
||||||
+ if (!entityhuman.v() || !entityhuman.affectsSpawning) { // PaperSpigot
|
+ if (!entityhuman.isSpectator() || !entityhuman.affectsSpawning) { // PaperSpigot) {
|
||||||
int l = MathHelper.floor(entityhuman.locX / 16.0D);
|
int l = MathHelper.floor(entityhuman.locX / 16.0D);
|
||||||
|
|
||||||
j = MathHelper.floor(entityhuman.locZ / 16.0D);
|
j = MathHelper.floor(entityhuman.locZ / 16.0D);
|
||||||
|
@ -65,14 +65,57 @@ index aeb0a44..7df5b84 100644
|
||||||
biomebase_biomemeta = worldserver.a(enumcreaturetype, blockposition2);
|
biomebase_biomemeta = worldserver.a(enumcreaturetype, blockposition2);
|
||||||
if (biomebase_biomemeta == null) {
|
if (biomebase_biomemeta == null) {
|
||||||
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 05f9351..cf4bf4e 100644
|
index e1757c0..d30b406 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
|
||||||
@@ -3137,4 +3137,50 @@ public abstract class World implements IBlockAccess {
|
@@ -2,35 +2,23 @@ package net.minecraft.server;
|
||||||
|
|
||||||
return k >= -short0 && k <= short0 && l >= -short0 && l <= short0 && this.keepSpawnInMemory; // CraftBukkit - Added 'this.keepSpawnInMemory'
|
import com.google.common.base.Predicate;
|
||||||
}
|
import com.google.common.collect.Lists;
|
||||||
|
-import com.google.common.collect.Sets;
|
||||||
|
-import java.util.ArrayList;
|
||||||
|
-import java.util.Calendar;
|
||||||
|
-import java.util.Collection;
|
||||||
|
-import java.util.Iterator;
|
||||||
|
-import java.util.List;
|
||||||
|
-import java.util.Random;
|
||||||
|
-import java.util.Set;
|
||||||
|
-import java.util.UUID;
|
||||||
|
-import java.util.concurrent.Callable;
|
||||||
|
-
|
||||||
|
-// CraftBukkit start
|
||||||
|
import com.google.common.collect.Maps;
|
||||||
|
-import java.util.Map;
|
||||||
|
-
|
||||||
|
import org.bukkit.Bukkit;
|
||||||
|
import org.bukkit.block.BlockState;
|
||||||
|
-import org.bukkit.craftbukkit.util.CraftMagicNumbers;
|
||||||
|
-import org.bukkit.craftbukkit.util.LongHashSet;
|
||||||
|
-import org.bukkit.craftbukkit.SpigotTimings; // Spigot
|
||||||
|
-import org.bukkit.generator.ChunkGenerator;
|
||||||
|
import org.bukkit.craftbukkit.CraftServer;
|
||||||
|
import org.bukkit.craftbukkit.CraftWorld;
|
||||||
|
+import org.bukkit.craftbukkit.SpigotTimings;
|
||||||
|
import org.bukkit.craftbukkit.event.CraftEventFactory;
|
||||||
|
+import org.bukkit.craftbukkit.util.CraftMagicNumbers;
|
||||||
|
import org.bukkit.event.block.BlockCanBuildEvent;
|
||||||
|
import org.bukkit.event.block.BlockPhysicsEvent;
|
||||||
|
import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason;
|
||||||
|
-import org.bukkit.event.weather.WeatherChangeEvent;
|
||||||
|
-import org.bukkit.event.weather.ThunderChangeEvent;
|
||||||
|
+import org.bukkit.generator.ChunkGenerator;
|
||||||
+
|
+
|
||||||
|
+import java.util.*;
|
||||||
|
+import java.util.concurrent.Callable;
|
||||||
|
+
|
||||||
|
+// CraftBukkit start
|
||||||
|
// CraftBukkit end
|
||||||
|
|
||||||
|
public abstract class World implements IBlockAccess {
|
||||||
|
@@ -2816,6 +2804,53 @@ public abstract class World implements IBlockAccess {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
+ // PaperSpigot start - Modified methods for affects spawning
|
+ // PaperSpigot start - Modified methods for affects spawning
|
||||||
+ public EntityHuman findNearbyPlayerWhoAffectsSpawning(Entity entity, double d0) {
|
+ public EntityHuman findNearbyPlayerWhoAffectsSpawning(Entity entity, double d0) {
|
||||||
+ return this.findNearbyPlayerWhoAffectsSpawning(entity.locX, entity.locY, entity.locZ, d0);
|
+ return this.findNearbyPlayerWhoAffectsSpawning(entity.locX, entity.locY, entity.locZ, d0);
|
||||||
|
@ -118,12 +161,24 @@ index 05f9351..cf4bf4e 100644
|
||||||
+
|
+
|
||||||
+ return false;
|
+ return false;
|
||||||
+ }
|
+ }
|
||||||
}
|
+ // PaperSpigot end
|
||||||
|
+
|
||||||
|
public EntityHuman a(String s) {
|
||||||
|
for (int i = 0; i < this.players.size(); ++i) {
|
||||||
|
EntityHuman entityhuman = (EntityHuman) this.players.get(i);
|
||||||
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 06e014c..5d5f987 100644
|
index 40ee4d3..130dcce 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
|
||||||
@@ -1443,6 +1443,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@@ -6,6 +6,7 @@ import io.netty.buffer.Unpooled;
|
||||||
|
|
||||||
|
import java.io.ByteArrayOutputStream;
|
||||||
|
import java.io.IOException;
|
||||||
|
+import java.lang.Override;
|
||||||
|
import java.net.InetSocketAddress;
|
||||||
|
import java.net.SocketAddress;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
@@ -1443,6 +1444,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
packet.components = components;
|
packet.components = components;
|
||||||
getHandle().playerConnection.sendPacket(packet);
|
getHandle().playerConnection.sendPacket(packet);
|
||||||
}
|
}
|
||||||
|
@ -143,5 +198,5 @@ index 06e014c..5d5f987 100644
|
||||||
|
|
||||||
public Player.Spigot spigot()
|
public Player.Spigot spigot()
|
||||||
--
|
--
|
||||||
2.4.0.windows.2
|
2.4.1.windows.1
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
From 7df449f2b44f1e7781f120053506b5b290b04fe2 Mon Sep 17 00:00:00 2001
|
From e1282376a286df21f984c03807f8aa4bf0b4a172 Mon Sep 17 00:00:00 2001
|
||||||
From: Zach Brown <zach.brown@destroystokyo.com>
|
From: Zach Brown <zach.brown@destroystokyo.com>
|
||||||
Date: Sat, 7 Mar 2015 22:55:25 -0600
|
Date: Sat, 7 Mar 2015 22:55:25 -0600
|
||||||
Subject: [PATCH] Show 'PaperSpigot' in client crashes, server lists, and
|
Subject: [PATCH] Show 'PaperSpigot' in client crashes, server lists, and
|
||||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Show 'PaperSpigot' in client crashes, server lists, and
|
||||||
|
|
||||||
|
|
||||||
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 b189c19..e0d7998 100644
|
index 7580b47..1ded833 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
|
||||||
@@ -1020,7 +1020,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
|
@@ -1026,7 +1026,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getServerModName() {
|
public String getServerModName() {
|
||||||
|
@ -19,5 +19,5 @@ index b189c19..e0d7998 100644
|
||||||
|
|
||||||
public CrashReport b(CrashReport crashreport) {
|
public CrashReport b(CrashReport crashreport) {
|
||||||
--
|
--
|
||||||
1.9.1
|
2.4.1.windows.1
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
From 1ed5764045977352072c7a6d34aee8c824d3fae8 Mon Sep 17 00:00:00 2001
|
From 3f4d3ad27f80c5b292f11e816613384de6ff640a Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Sun, 8 Mar 2015 01:56:22 -0600
|
Date: Sun, 8 Mar 2015 01:56:22 -0600
|
||||||
Subject: [PATCH] Optimize TileEntity Ticking
|
Subject: [PATCH] Optimize TileEntity Ticking
|
||||||
|
@ -35,7 +35,7 @@ index da43134..88e4fa9 100644
|
||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/TileEntityChest.java b/src/main/java/net/minecraft/server/TileEntityChest.java
|
diff --git a/src/main/java/net/minecraft/server/TileEntityChest.java b/src/main/java/net/minecraft/server/TileEntityChest.java
|
||||||
index a2bd9e1..8af9e32 100644
|
index 189fa93..07891ec 100644
|
||||||
--- a/src/main/java/net/minecraft/server/TileEntityChest.java
|
--- a/src/main/java/net/minecraft/server/TileEntityChest.java
|
||||||
+++ b/src/main/java/net/minecraft/server/TileEntityChest.java
|
+++ b/src/main/java/net/minecraft/server/TileEntityChest.java
|
||||||
@@ -246,7 +246,7 @@ public class TileEntityChest extends TileEntityContainer implements IUpdatePlaye
|
@@ -246,7 +246,7 @@ public class TileEntityChest extends TileEntityContainer implements IUpdatePlaye
|
||||||
|
@ -74,10 +74,10 @@ index f75e2de..7119612 100644
|
||||||
if (this.e instanceof BlockDaylightDetector) {
|
if (this.e instanceof BlockDaylightDetector) {
|
||||||
((BlockDaylightDetector) this.e).f(this.world, this.position);
|
((BlockDaylightDetector) this.e).f(this.world, this.position);
|
||||||
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 cf4bf4e..15fe976 100644
|
index d30b406..dcfceed 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
|
||||||
@@ -65,7 +65,7 @@ public abstract class World implements IBlockAccess {
|
@@ -53,7 +53,7 @@ public abstract class World implements IBlockAccess {
|
||||||
// Spigot end
|
// Spigot end
|
||||||
protected final List<Entity> g = Lists.newArrayList();
|
protected final List<Entity> g = Lists.newArrayList();
|
||||||
public final List<TileEntity> h = Lists.newArrayList();
|
public final List<TileEntity> h = Lists.newArrayList();
|
||||||
|
@ -86,7 +86,7 @@ index cf4bf4e..15fe976 100644
|
||||||
private final List<TileEntity> b = Lists.newArrayList();
|
private final List<TileEntity> b = Lists.newArrayList();
|
||||||
private final List<TileEntity> c = Lists.newArrayList();
|
private final List<TileEntity> c = Lists.newArrayList();
|
||||||
public final List<EntityHuman> players = Lists.newArrayList();
|
public final List<EntityHuman> players = Lists.newArrayList();
|
||||||
@@ -138,8 +138,10 @@ public abstract class World implements IBlockAccess {
|
@@ -126,8 +126,10 @@ public abstract class World implements IBlockAccess {
|
||||||
public static boolean haveWeSilencedAPhysicsCrash;
|
public static boolean haveWeSilencedAPhysicsCrash;
|
||||||
public static String blockLocation;
|
public static String blockLocation;
|
||||||
private org.spigotmc.TickLimiter entityLimiter;
|
private org.spigotmc.TickLimiter entityLimiter;
|
||||||
|
@ -99,7 +99,7 @@ index cf4bf4e..15fe976 100644
|
||||||
|
|
||||||
public static long chunkToKey(int x, int z)
|
public static long chunkToKey(int x, int z)
|
||||||
{
|
{
|
||||||
@@ -233,7 +235,7 @@ public abstract class World implements IBlockAccess {
|
@@ -221,7 +223,7 @@ public abstract class World implements IBlockAccess {
|
||||||
this.keepSpawnInMemory = this.paperSpigotConfig.keepSpawnInMemory; // PaperSpigot
|
this.keepSpawnInMemory = this.paperSpigotConfig.keepSpawnInMemory; // PaperSpigot
|
||||||
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
|
||||||
this.entityLimiter = new org.spigotmc.TickLimiter(spigotConfig.entityMaxTickTime);
|
this.entityLimiter = new org.spigotmc.TickLimiter(spigotConfig.entityMaxTickTime);
|
||||||
|
@ -108,7 +108,7 @@ index cf4bf4e..15fe976 100644
|
||||||
}
|
}
|
||||||
|
|
||||||
public World b() {
|
public World b() {
|
||||||
@@ -1467,6 +1469,12 @@ public abstract class World implements IBlockAccess {
|
@@ -1455,6 +1457,12 @@ public abstract class World implements IBlockAccess {
|
||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
|
@ -121,7 +121,7 @@ index cf4bf4e..15fe976 100644
|
||||||
// Spigot start
|
// Spigot start
|
||||||
int tilesThisCycle = 0;
|
int tilesThisCycle = 0;
|
||||||
for (tileLimiter.initTick();
|
for (tileLimiter.initTick();
|
||||||
@@ -1474,11 +1482,12 @@ public abstract class World implements IBlockAccess {
|
@@ -1462,11 +1470,12 @@ public abstract class World implements IBlockAccess {
|
||||||
tileTickPosition++, tilesThisCycle++) {
|
tileTickPosition++, tilesThisCycle++) {
|
||||||
tileTickPosition = (tileTickPosition < tileEntityList.size()) ? tileTickPosition : 0;
|
tileTickPosition = (tileTickPosition < tileEntityList.size()) ? tileTickPosition : 0;
|
||||||
TileEntity tileentity = (TileEntity) this.tileEntityList.get(tileTickPosition);
|
TileEntity tileentity = (TileEntity) this.tileEntityList.get(tileTickPosition);
|
||||||
|
@ -136,7 +136,7 @@ index cf4bf4e..15fe976 100644
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// Spigot end
|
// Spigot end
|
||||||
@@ -1506,8 +1515,7 @@ public abstract class World implements IBlockAccess {
|
@@ -1494,8 +1503,7 @@ public abstract class World implements IBlockAccess {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tileentity.x()) {
|
if (tileentity.x()) {
|
||||||
|
@ -322,5 +322,5 @@ index 0000000..5af5dcc
|
||||||
+}
|
+}
|
||||||
\ No newline at end of file
|
\ No newline at end of file
|
||||||
--
|
--
|
||||||
2.4.0.windows.2
|
2.4.1.windows.1
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
From aeaa678d95303de968269960a3c48dc0ac0fd46b Mon Sep 17 00:00:00 2001
|
From afecc5fd9057398210f7a48af97affbefd84e1b0 Mon Sep 17 00:00:00 2001
|
||||||
From: Iceee <andrew@opticgaming.tv>
|
From: Iceee <andrew@opticgaming.tv>
|
||||||
Date: Sun, 8 Mar 2015 03:34:15 -0500
|
Date: Sun, 8 Mar 2015 03:34:15 -0500
|
||||||
Subject: [PATCH] Remove certain entities that fly through unloaded chunks
|
Subject: [PATCH] Remove certain entities that fly through unloaded chunks
|
||||||
|
@ -70,10 +70,10 @@ index 2d22327..50423eb 100644
|
||||||
this.motY *= 0.9800000190734863D;
|
this.motY *= 0.9800000190734863D;
|
||||||
this.motZ *= 0.9800000190734863D;
|
this.motZ *= 0.9800000190734863D;
|
||||||
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 15fe976..7425bbf 100644
|
index dcfceed..431fc0d 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
|
||||||
@@ -1174,6 +1174,7 @@ public abstract class World implements IBlockAccess {
|
@@ -1162,6 +1162,7 @@ public abstract class World implements IBlockAccess {
|
||||||
{
|
{
|
||||||
if ( !this.isChunkLoaded( chunkx, chunkz, true ) )
|
if ( !this.isChunkLoaded( chunkx, chunkz, true ) )
|
||||||
{
|
{
|
||||||
|
@ -81,7 +81,7 @@ index 15fe976..7425bbf 100644
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
int cz = chunkz << 4;
|
int cz = chunkz << 4;
|
||||||
@@ -1603,6 +1604,14 @@ public abstract class World implements IBlockAccess {
|
@@ -1591,6 +1592,14 @@ public abstract class World implements IBlockAccess {
|
||||||
if (!org.spigotmc.ActivationRange.checkIfActive(entity)) {
|
if (!org.spigotmc.ActivationRange.checkIfActive(entity)) {
|
||||||
entity.ticksLived++;
|
entity.ticksLived++;
|
||||||
entity.inactiveTick();
|
entity.inactiveTick();
|
||||||
|
@ -116,5 +116,5 @@ index 31dedce..ac02b90 100644
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
--
|
--
|
||||||
1.9.1
|
2.4.1.windows.1
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
From 6bcd687996b2504fa884f0f50aac658a5bc4d425 Mon Sep 17 00:00:00 2001
|
From 4d8ac043bb719036af19ff4b5b64cd5727f50b03 Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Sun, 8 Mar 2015 03:47:32 -0500
|
Date: Sun, 8 Mar 2015 03:47:32 -0500
|
||||||
Subject: [PATCH] Further improve server tick loop
|
Subject: [PATCH] Further improve server tick loop
|
||||||
|
@ -12,7 +12,7 @@ Previous implementation did not calculate TPS correctly.
|
||||||
Switch to a realistic rolling average and factor in std deviation as an extra reporting variable
|
Switch to a realistic rolling average and factor in std deviation as an extra reporting variable
|
||||||
|
|
||||||
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 b9b8bba..9a9de19 100644
|
index 1ded833..07422b8 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
|
||||||
@@ -115,17 +115,11 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
|
@@ -115,17 +115,11 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
|
||||||
|
@ -34,7 +34,7 @@ index b9b8bba..9a9de19 100644
|
||||||
|
|
||||||
public MinecraftServer(OptionSet options, Proxy proxy, File file1) {
|
public MinecraftServer(OptionSet options, Proxy proxy, File file1) {
|
||||||
io.netty.util.ResourceLeakDetector.setEnabled( false ); // Spigot - disable
|
io.netty.util.ResourceLeakDetector.setEnabled( false ); // Spigot - disable
|
||||||
@@ -510,12 +504,53 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
|
@@ -516,12 +510,53 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
|
||||||
this.isRunning = false;
|
this.isRunning = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -93,7 +93,7 @@ index b9b8bba..9a9de19 100644
|
||||||
|
|
||||||
public void run() {
|
public void run() {
|
||||||
try {
|
try {
|
||||||
@@ -528,26 +563,43 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
|
@@ -534,26 +569,43 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
|
||||||
this.a(this.r);
|
this.a(this.r);
|
||||||
|
|
||||||
// Spigot start
|
// Spigot start
|
||||||
|
@ -212,5 +212,5 @@ index be2e31d..21fd7ef 100644
|
||||||
return ( ( tps > 18.0 ) ? ChatColor.GREEN : ( tps > 16.0 ) ? ChatColor.YELLOW : ChatColor.RED ).toString()
|
return ( ( tps > 18.0 ) ? ChatColor.GREEN : ( tps > 16.0 ) ? ChatColor.YELLOW : ChatColor.RED ).toString()
|
||||||
+ ( ( tps > 20.0 ) ? "*" : "" ) + Math.min( Math.round( tps * 100.0 ) / 100.0, 20.0 );
|
+ ( ( tps > 20.0 ) ? "*" : "" ) + Math.min( Math.round( tps * 100.0 ) / 100.0, 20.0 );
|
||||||
--
|
--
|
||||||
1.9.1
|
2.4.1.windows.1
|
||||||
|
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
From 5cff72e10eb8de4fb44661db5cb083957cd0bbeb Mon Sep 17 00:00:00 2001
|
From fac3d26d0a1927d84ab379d24c2fdef18f955979 Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Fri, 28 Nov 2014 13:20:22 -0600
|
Date: Fri, 28 Nov 2014 13:20:22 -0600
|
||||||
Subject: [PATCH] Only refresh abilities if needed
|
Subject: [PATCH] Only refresh abilities if needed
|
||||||
|
|
||||||
|
|
||||||
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 5d5f987..20287d2 100644
|
index 130dcce..3c5d90d 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
|
||||||
@@ -1146,12 +1146,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@@ -1147,12 +1147,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setFlying(boolean value) {
|
public void setFlying(boolean value) {
|
||||||
|
@ -24,5 +24,5 @@ index 5d5f987..20287d2 100644
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
--
|
--
|
||||||
1.9.1
|
2.4.1.windows.1
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
From f1976dd6704c5cad38c48a61834c781cad708264 Mon Sep 17 00:00:00 2001
|
From d48be99422100816e1b6a67a4332ad055d970ca3 Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Sun, 8 Mar 2015 04:03:56 -0500
|
Date: Sun, 8 Mar 2015 04:03:56 -0500
|
||||||
Subject: [PATCH] Player lookup improvements
|
Subject: [PATCH] Player lookup improvements
|
||||||
|
@ -13,7 +13,7 @@ By using a map based approach for player lookups, player lookup should
|
||||||
be consistent in performance regardless of how many players are online.
|
be consistent in performance regardless of how many players are online.
|
||||||
|
|
||||||
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 49a14ea..74741cd 100644
|
index a88be23..f4f78e8 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
|
||||||
@@ -49,6 +49,31 @@ public abstract class PlayerList {
|
@@ -49,6 +49,31 @@ public abstract class PlayerList {
|
||||||
|
@ -153,10 +153,10 @@ index 6aa57ae..6150255 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 20287d2..af71b8e 100644
|
index 3c5d90d..ae75b36 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
|
||||||
@@ -104,13 +104,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@@ -105,13 +105,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isOnline() {
|
public boolean isOnline() {
|
||||||
|
@ -172,5 +172,5 @@ index 20287d2..af71b8e 100644
|
||||||
|
|
||||||
public InetSocketAddress getAddress() {
|
public InetSocketAddress getAddress() {
|
||||||
--
|
--
|
||||||
1.9.1
|
2.4.1.windows.1
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
From e441393dd8fc9d33934c0fde7733cd91aee6be4e Mon Sep 17 00:00:00 2001
|
From 1fb4dc33fce6c03c3f59247be6ea2115b9ac41a2 Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Sun, 8 Mar 2015 04:37:23 -0500
|
Date: Sun, 8 Mar 2015 04:37:23 -0500
|
||||||
Subject: [PATCH] Prevent tile entity and entity crashes
|
Subject: [PATCH] Prevent tile entity and entity crashes
|
||||||
|
@ -23,10 +23,10 @@ index 0a21872..bbcca2a 100644
|
||||||
public String a() throws Exception {
|
public String a() throws Exception {
|
||||||
int i = Block.getId(TileEntity.this.world.getType(TileEntity.this.position).getBlock());
|
int i = Block.getId(TileEntity.this.world.getType(TileEntity.this.position).getBlock());
|
||||||
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 7425bbf..c6d82db 100644
|
index 431fc0d..7d90de2 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
|
||||||
@@ -1432,10 +1432,13 @@ public abstract class World implements IBlockAccess {
|
@@ -1420,10 +1420,13 @@ public abstract class World implements IBlockAccess {
|
||||||
this.g(entity);
|
this.g(entity);
|
||||||
SpigotTimings.tickEntityTimer.stopTiming(); // Spigot
|
SpigotTimings.tickEntityTimer.stopTiming(); // Spigot
|
||||||
} catch (Throwable throwable1) {
|
} catch (Throwable throwable1) {
|
||||||
|
@ -44,7 +44,7 @@ index 7425bbf..c6d82db 100644
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1501,11 +1504,13 @@ public abstract class World implements IBlockAccess {
|
@@ -1489,11 +1492,13 @@ public abstract class World implements IBlockAccess {
|
||||||
tileentity.tickTimer.startTiming(); // Spigot
|
tileentity.tickTimer.startTiming(); // Spigot
|
||||||
((IUpdatePlayerListBox) tileentity).c();
|
((IUpdatePlayerListBox) tileentity).c();
|
||||||
} catch (Throwable throwable2) {
|
} catch (Throwable throwable2) {
|
||||||
|
@ -64,5 +64,5 @@ index 7425bbf..c6d82db 100644
|
||||||
// Spigot start
|
// Spigot start
|
||||||
finally {
|
finally {
|
||||||
--
|
--
|
||||||
1.9.1
|
2.4.1.windows.1
|
||||||
|
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
From 2dc93d418d81b29b876d6453dea3e316eb970dcc Mon Sep 17 00:00:00 2001
|
From 3e2edfd6cf5378a589da51fab5094ad02a55ecb0 Mon Sep 17 00:00:00 2001
|
||||||
From: Roman Alexander <romanalexander@users.noreply.github.com>
|
From: Roman Alexander <romanalexander@users.noreply.github.com>
|
||||||
Date: Wed, 25 Mar 2015 20:27:13 -0500
|
Date: Wed, 25 Mar 2015 20:27:13 -0500
|
||||||
Subject: [PATCH] Configurable async light updates
|
Subject: [PATCH] Configurable async light updates
|
||||||
|
|
||||||
|
|
||||||
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 e5d1c2b..7c63d9b 100644
|
index 7d90de2..d49e833 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
|
||||||
@@ -13,6 +13,12 @@ import java.util.Set;
|
@@ -18,6 +18,12 @@ import org.bukkit.generator.ChunkGenerator;
|
||||||
import java.util.UUID;
|
import java.util.*;
|
||||||
import java.util.concurrent.Callable;
|
import java.util.concurrent.Callable;
|
||||||
|
|
||||||
+// PaperSpigot start
|
+// PaperSpigot start
|
||||||
|
@ -19,27 +19,27 @@ index e5d1c2b..7c63d9b 100644
|
||||||
+// PaperSpigot end
|
+// PaperSpigot end
|
||||||
+
|
+
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
import com.google.common.collect.Maps;
|
// CraftBukkit end
|
||||||
import java.util.Map;
|
|
||||||
@@ -732,22 +738,26 @@ public abstract class World implements IBlockAccess {
|
@@ -720,22 +726,26 @@ public abstract class World implements IBlockAccess {
|
||||||
blockposition = new BlockPosition(blockposition.getX(), 0, blockposition.getZ());
|
blockposition = new BlockPosition(blockposition.getX(), 0, blockposition.getZ());
|
||||||
}
|
}
|
||||||
|
|
||||||
+ // PaperSpigot start - Configurable async light updates
|
+ // PaperSpigot start - configurable async light updates
|
||||||
if (!this.isValidLocation(blockposition)) {
|
if (!this.isValidLocation(blockposition)) {
|
||||||
return enumskyblock.c;
|
return enumskyblock.c;
|
||||||
- } else if (!this.isLoaded(blockposition)) {
|
- } else if (!this.isLoaded(blockposition)) {
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ Chunk chunk = this.getChunkIfLoaded(blockposition.getX() >> 4, blockposition.getZ() >> 4);
|
+ Chunk chunk = this.getChunkIfLoaded(blockposition.getX() >> 4, blockposition.getZ() >> 4);
|
||||||
+ if (chunk == null) {
|
+ if (chunk != null) {
|
||||||
return enumskyblock.c;
|
return enumskyblock.c;
|
||||||
} else {
|
} else {
|
||||||
- Chunk chunk = this.getChunkAtWorldCoords(blockposition);
|
- Chunk chunk = this.getChunkAtWorldCoords(blockposition);
|
||||||
-
|
-
|
||||||
|
+ // PaperSpigot end
|
||||||
return chunk.getBrightness(enumskyblock, blockposition);
|
return chunk.getBrightness(enumskyblock, blockposition);
|
||||||
}
|
}
|
||||||
+ // PaperSpigot end
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(EnumSkyBlock enumskyblock, BlockPosition blockposition, int i) {
|
public void a(EnumSkyBlock enumskyblock, BlockPosition blockposition, int i) {
|
||||||
|
@ -54,13 +54,15 @@ index e5d1c2b..7c63d9b 100644
|
||||||
chunk.a(enumskyblock, blockposition, i);
|
chunk.a(enumskyblock, blockposition, i);
|
||||||
this.n(blockposition);
|
this.n(blockposition);
|
||||||
}
|
}
|
||||||
@@ -2354,10 +2364,11 @@ public abstract class World implements IBlockAccess {
|
@@ -2342,10 +2352,13 @@ public abstract class World implements IBlockAccess {
|
||||||
}
|
}
|
||||||
|
|
||||||
private int a(BlockPosition blockposition, EnumSkyBlock enumskyblock) {
|
private int a(BlockPosition blockposition, EnumSkyBlock enumskyblock) {
|
||||||
- if (enumskyblock == EnumSkyBlock.SKY && this.i(blockposition)) {
|
- if (enumskyblock == EnumSkyBlock.SKY && this.i(blockposition)) {
|
||||||
+ Chunk chunk = this.getChunkIfLoaded(blockposition.getX() >> 4, blockposition.getZ() >> 4); // PaperSpigot - Configurable async light updates
|
+ // PaperSpigot start - Configurable async light updates
|
||||||
|
+ Chunk chunk = this.getChunkIfLoaded(blockposition.getX() >> 4, blockposition.getZ() >> 4);
|
||||||
+ if (chunk == null || (enumskyblock == EnumSkyBlock.SKY && chunk.d(blockposition))) {
|
+ if (chunk == null || (enumskyblock == EnumSkyBlock.SKY && chunk.d(blockposition))) {
|
||||||
|
+ // PaperSpigot end
|
||||||
return 15;
|
return 15;
|
||||||
} else {
|
} else {
|
||||||
- Block block = this.getType(blockposition).getBlock();
|
- Block block = this.getType(blockposition).getBlock();
|
||||||
|
@ -68,7 +70,7 @@ index e5d1c2b..7c63d9b 100644
|
||||||
int i = enumskyblock == EnumSkyBlock.SKY ? 0 : block.r();
|
int i = enumskyblock == EnumSkyBlock.SKY ? 0 : block.r();
|
||||||
int j = block.p();
|
int j = block.p();
|
||||||
|
|
||||||
@@ -2396,131 +2407,154 @@ public abstract class World implements IBlockAccess {
|
@@ -2384,131 +2397,154 @@ public abstract class World implements IBlockAccess {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -139,7 +141,7 @@ index e5d1c2b..7c63d9b 100644
|
||||||
+ public boolean c(final EnumSkyBlock enumskyblock, final BlockPosition blockposition) {
|
+ public boolean c(final EnumSkyBlock enumskyblock, final BlockPosition blockposition) {
|
||||||
+ Callable<Boolean> callable = new Callable<Boolean>() {
|
+ Callable<Boolean> callable = new Callable<Boolean>() {
|
||||||
+ @Override
|
+ @Override
|
||||||
+ public Boolean call() {
|
+ public Boolean call() throws Exception {
|
||||||
+ // CraftBukkit start - Use neighbor cache instead of looking up
|
+ // CraftBukkit start - Use neighbor cache instead of looking up
|
||||||
+ Chunk chunk = World.this.getChunkIfLoaded(blockposition.getX() >> 4, blockposition.getZ() >> 4);
|
+ Chunk chunk = World.this.getChunkIfLoaded(blockposition.getX() >> 4, blockposition.getZ() >> 4);
|
||||||
+ if (chunk == null || !chunk.areNeighborsLoaded(1) /*!this.areChunksLoaded(blockposition, 17, false)*/) {
|
+ if (chunk == null || !chunk.areNeighborsLoaded(1) /*!this.areChunksLoaded(blockposition, 17, false)*/) {
|
||||||
|
@ -347,5 +349,5 @@ index e00581c..dc8bebd 100644
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
--
|
--
|
||||||
2.3.5
|
2.4.1.windows.1
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue