geforkt von Mirrors/Paper
Update to Minecraft 1.6.1 - Phase 1
Dieser Commit ist enthalten in:
Ursprung
011b0d5923
Commit
5d790af909
@ -1,11 +1,11 @@
|
||||
From 2dd1e832500d42db77b2e7f905e6d2c7287ed664 Mon Sep 17 00:00:00 2001
|
||||
From 40b3f27d6135511d5061142bf55a0d9ae3c6722b Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Tue, 23 Apr 2013 11:34:54 +1000
|
||||
Subject: [PATCH] POM Changes
|
||||
|
||||
|
||||
diff --git a/pom.xml b/pom.xml
|
||||
index 4ead01e..8c9f66b 100644
|
||||
index 7257f87..88b41b1 100644
|
||||
--- a/pom.xml
|
||||
+++ b/pom.xml
|
||||
@@ -1,12 +1,20 @@
|
||||
@ -25,7 +25,7 @@ index 4ead01e..8c9f66b 100644
|
||||
+ <groupId>org.spigotmc</groupId>
|
||||
+ <artifactId>spigot</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>1.5.2-R1.1-SNAPSHOT</version>
|
||||
<version>1.6.1-R0.1-SNAPSHOT</version>
|
||||
- <name>CraftBukkit</name>
|
||||
- <url>http://www.bukkit.org</url>
|
||||
+ <name>Spigot</name>
|
||||
@ -34,7 +34,7 @@ index 4ead01e..8c9f66b 100644
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
@@ -16,25 +24,6 @@
|
||||
<minecraft_version>1_5_R3</minecraft_version>
|
||||
<minecraft_version>1_6_R1</minecraft_version>
|
||||
</properties>
|
||||
|
||||
- <scm>
|
||||
@ -86,7 +86,7 @@ index 4ead01e..8c9f66b 100644
|
||||
+ <dependency>
|
||||
+ <groupId>net.sf.trove4j</groupId>
|
||||
+ <artifactId>trove4j</artifactId>
|
||||
+ <version>3.0.2</version>
|
||||
+ <version>3.0.3</version>
|
||||
+ </dependency>
|
||||
</dependencies>
|
||||
|
||||
|
@ -1,11 +1,11 @@
|
||||
From f32217fa6c8e63549ae37fb3f16ab3b881c4af80 Mon Sep 17 00:00:00 2001
|
||||
From 8e1fe60b678de75432cbd146c31eaa867ccf99aa Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Sun, 2 Jun 2013 15:10:56 +1000
|
||||
Subject: [PATCH] Skeleton API Implementations
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 6c7f570..c0fb528 100644
|
||||
index e06e23b..4c16040 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -1263,4 +1263,14 @@ public class CraftWorld implements World {
|
||||
@ -43,10 +43,10 @@ index b46b9c4..c91b12c 100644
|
||||
+ // Spigot end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 8c30bf5..df07a9b 100644
|
||||
index 583b99c..1d97430 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -993,4 +993,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -997,4 +997,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
|
||||
this.server.getScoreboardManager().setPlayerBoard(this, scoreboard);
|
||||
}
|
||||
|
@ -1,15 +1,15 @@
|
||||
From 05523e9ca5b7f91133e2fa0a43f4d00bb73c23f8 Mon Sep 17 00:00:00 2001
|
||||
From dfa59327db305e9cb30180e752e30d29962f979b Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Sat, 22 Jun 2013 14:06:41 +1000
|
||||
Subject: [PATCH] Spigot Configuration
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||
index 7261dc9..59444cb 100644
|
||||
index 0ce6c49..ddb32ac 100644
|
||||
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||
@@ -89,6 +89,11 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
|
||||
if (this.G() < 0) {
|
||||
if (this.I() < 0) {
|
||||
this.setPort(this.propertyManager.getInt("server-port", 25565));
|
||||
}
|
||||
+ // Spigot start
|
||||
@ -30,7 +30,7 @@ index 7261dc9..59444cb 100644
|
||||
if (!this.getOnlineMode()) {
|
||||
this.getLogger().warning("**** 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
|
||||
index 3a4ddea..de052bd 100644
|
||||
index f134856..0dc673d 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -99,6 +99,7 @@ public abstract class World implements IBlockAccess {
|
||||
|
@ -1,11 +1,11 @@
|
||||
From a4f3a529237119d805302947bd76ddb384bd9379 Mon Sep 17 00:00:00 2001
|
||||
From 7b266e982dfda605efd4355fd0947d5f1ef34bac Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Tue, 11 Jun 2013 12:56:02 +1000
|
||||
Subject: [PATCH] Better Chunk Tick Selection
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index de052bd..bc692dd 100644
|
||||
index 0dc673d..41baf2b 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -66,13 +66,35 @@ public abstract class World implements IBlockAccess {
|
||||
@ -57,7 +57,7 @@ index de052bd..bc692dd 100644
|
||||
|
||||
this.O = this.random.nextInt(12000);
|
||||
this.H = new int['\u8000'];
|
||||
@@ -1956,24 +1983,44 @@ public abstract class World implements IBlockAccess {
|
||||
@@ -1955,24 +1982,44 @@ public abstract class World implements IBlockAccess {
|
||||
int j;
|
||||
int k;
|
||||
|
||||
@ -113,10 +113,10 @@ index de052bd..bc692dd 100644
|
||||
|
||||
this.methodProfiler.b();
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index 49360c1..6c3fcf1 100644
|
||||
index e787fb1..09d076e 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -301,9 +301,19 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
|
||||
@@ -300,9 +300,19 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
|
||||
// CraftBukkit start
|
||||
// Iterator iterator = this.chunkTickList.iterator();
|
||||
|
||||
@ -139,7 +139,7 @@ index 49360c1..6c3fcf1 100644
|
||||
// ChunkCoordIntPair chunkcoordintpair = (ChunkCoordIntPair) iterator.next();
|
||||
int k = chunkX * 16;
|
||||
int l = chunkZ * 16;
|
||||
@@ -401,6 +411,7 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
|
||||
@@ -400,6 +410,7 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
|
||||
|
||||
if (block != null && block.isTicking()) {
|
||||
++i;
|
||||
|
@ -1,14 +1,14 @@
|
||||
From abf5bc5b131b439231197b1a3159b0dcdc3c82ec Mon Sep 17 00:00:00 2001
|
||||
From e57cb696c341a8ec945e3b4cb90613add51ff8e1 Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Fri, 21 Jun 2013 17:17:20 +1000
|
||||
Subject: [PATCH] Crop Growth Rates
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java
|
||||
index 4392cb2..8e041c2 100644
|
||||
index 2a85c1c..afe8735 100644
|
||||
--- a/src/main/java/net/minecraft/server/Block.java
|
||||
+++ b/src/main/java/net/minecraft/server/Block.java
|
||||
@@ -768,4 +768,16 @@ public class Block {
|
||||
@@ -781,4 +781,16 @@ public class Block {
|
||||
return 0;
|
||||
}
|
||||
// CraftBukkit end
|
||||
@ -26,7 +26,7 @@ index 4392cb2..8e041c2 100644
|
||||
+ // Spigot end
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/BlockCactus.java b/src/main/java/net/minecraft/server/BlockCactus.java
|
||||
index 83cc09d..4376051 100644
|
||||
index 03eece7..758ab84 100644
|
||||
--- a/src/main/java/net/minecraft/server/BlockCactus.java
|
||||
+++ b/src/main/java/net/minecraft/server/BlockCactus.java
|
||||
@@ -23,7 +23,7 @@ public class BlockCactus extends Block {
|
||||
@ -39,7 +39,7 @@ index 83cc09d..4376051 100644
|
||||
world.setData(i, j, k, 0, 4);
|
||||
this.doPhysics(world, i, j + 1, k, this.id);
|
||||
diff --git a/src/main/java/net/minecraft/server/BlockCrops.java b/src/main/java/net/minecraft/server/BlockCrops.java
|
||||
index 14a1c3b..d3b6095 100644
|
||||
index e157fbe..84a809b 100644
|
||||
--- a/src/main/java/net/minecraft/server/BlockCrops.java
|
||||
+++ b/src/main/java/net/minecraft/server/BlockCrops.java
|
||||
@@ -28,7 +28,7 @@ public class BlockCrops extends BlockFlower {
|
||||
@ -66,10 +66,10 @@ index 6f9301d..2ccc0b8 100644
|
||||
int j1 = j + random.nextInt(5) - 3;
|
||||
int k1 = k + random.nextInt(3) - 1;
|
||||
diff --git a/src/main/java/net/minecraft/server/BlockMushroom.java b/src/main/java/net/minecraft/server/BlockMushroom.java
|
||||
index 872ad00..abc31ac 100644
|
||||
index 796527d..b4a6800 100644
|
||||
--- a/src/main/java/net/minecraft/server/BlockMushroom.java
|
||||
+++ b/src/main/java/net/minecraft/server/BlockMushroom.java
|
||||
@@ -27,7 +27,7 @@ public class BlockMushroom extends BlockFlower {
|
||||
@@ -24,7 +24,7 @@ public class BlockMushroom extends BlockFlower {
|
||||
|
||||
public void a(World world, int i, int j, int k, Random random) {
|
||||
final int sourceX = i, sourceY = j, sourceZ = k; // CraftBukkit
|
||||
@ -106,10 +106,10 @@ index 8657860..cf52501 100644
|
||||
world.setData(i, j, k, 0, 4);
|
||||
} else {
|
||||
diff --git a/src/main/java/net/minecraft/server/BlockSapling.java b/src/main/java/net/minecraft/server/BlockSapling.java
|
||||
index 3b00939..ea34899 100644
|
||||
index 706d6c9..fe675b3 100644
|
||||
--- a/src/main/java/net/minecraft/server/BlockSapling.java
|
||||
+++ b/src/main/java/net/minecraft/server/BlockSapling.java
|
||||
@@ -26,7 +26,7 @@ public class BlockSapling extends BlockFlower {
|
||||
@@ -25,7 +25,7 @@ public class BlockSapling extends BlockFlower {
|
||||
public void a(World world, int i, int j, int k, Random random) {
|
||||
if (!world.isStatic) {
|
||||
super.a(world, i, j, k, random);
|
||||
@ -119,7 +119,7 @@ index 3b00939..ea34899 100644
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/BlockStem.java b/src/main/java/net/minecraft/server/BlockStem.java
|
||||
index 8339a35..c7e2344 100644
|
||||
index f2d4e57..5fe0a81 100644
|
||||
--- a/src/main/java/net/minecraft/server/BlockStem.java
|
||||
+++ b/src/main/java/net/minecraft/server/BlockStem.java
|
||||
@@ -27,7 +27,7 @@ public class BlockStem extends BlockFlower {
|
||||
|
@ -1,14 +1,14 @@
|
||||
From fbb1eeb9f5d6d721eed18bbe1ffae9cc31dd8ae5 Mon Sep 17 00:00:00 2001
|
||||
From d7b9305d672eb1fdb2e248e4f0f2c274e5021d70 Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Tue, 11 Jun 2013 12:17:37 +1000
|
||||
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
|
||||
index bc692dd..afe3e4d 100644
|
||||
index 41baf2b..18994b6 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -1045,19 +1045,47 @@ public abstract class World implements IBlockAccess {
|
||||
@@ -1044,19 +1044,47 @@ public abstract class World implements IBlockAccess {
|
||||
int i1 = MathHelper.floor(axisalignedbb.c);
|
||||
int j1 = MathHelper.floor(axisalignedbb.f + 1.0D);
|
||||
|
||||
|
@ -1,11 +1,11 @@
|
||||
From 6c8715e0ffd4ce12e51b1505bab0af4908744c2e Mon Sep 17 00:00:00 2001
|
||||
From af630d59b1f8a97ccf6d73b1d183a73d03c6f845 Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Tue, 23 Apr 2013 11:22:07 +1000
|
||||
Subject: [PATCH] Proxy IP Filter
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/ThreadLoginVerifier.java b/src/main/java/net/minecraft/server/ThreadLoginVerifier.java
|
||||
index 0686ba0..1254e63 100644
|
||||
index 2ce2e3a..f87ebf9 100644
|
||||
--- a/src/main/java/net/minecraft/server/ThreadLoginVerifier.java
|
||||
+++ b/src/main/java/net/minecraft/server/ThreadLoginVerifier.java
|
||||
@@ -28,6 +28,7 @@ class ThreadLoginVerifier extends Thread {
|
||||
@ -13,9 +13,9 @@ index 0686ba0..1254e63 100644
|
||||
public void run() {
|
||||
try {
|
||||
+ if (org.spigotmc.SpamHaus.filterIp(pendingConnection)) return; // Spigot
|
||||
String s = (new BigInteger(MinecraftEncryption.a(PendingConnection.a(this.pendingConnection), PendingConnection.b(this.pendingConnection).F().getPublic(), PendingConnection.c(this.pendingConnection)))).toString(16);
|
||||
String s = (new BigInteger(MinecraftEncryption.a(PendingConnection.a(this.pendingConnection), PendingConnection.b(this.pendingConnection).H().getPublic(), PendingConnection.c(this.pendingConnection)))).toString(16);
|
||||
URL url = new URL("http://session.minecraft.net/game/checkserver.jsp?user=" + URLEncoder.encode(PendingConnection.d(this.pendingConnection), "UTF-8") + "&serverId=" + URLEncoder.encode(s, "UTF-8"));
|
||||
BufferedReader bufferedreader = new BufferedReader(new InputStreamReader(url.openStream()));
|
||||
BufferedReader bufferedreader = new BufferedReader(new InputStreamReader(url.openConnection(PendingConnection.b(this.pendingConnection).ap()).getInputStream()));
|
||||
diff --git a/src/main/java/org/spigotmc/SpamHaus.java b/src/main/java/org/spigotmc/SpamHaus.java
|
||||
new file mode 100644
|
||||
index 0000000..55d8d12
|
||||
@ -67,7 +67,7 @@ index 0000000..55d8d12
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
|
||||
index 1d915fb..56ac067 100644
|
||||
index b7dbda4..e4eaecd 100644
|
||||
--- a/src/main/java/org/spigotmc/SpigotConfig.java
|
||||
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
|
||||
@@ -111,4 +111,10 @@ public class SpigotConfig
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 7ec8ae26036858173a7c318944efa17ad2100cea Mon Sep 17 00:00:00 2001
|
||||
From dcf697293680dd7593a8e1f92ac65b36c7be48db Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Sat, 23 Mar 2013 09:46:33 +1100
|
||||
Subject: [PATCH] Merge tweaks and configuration
|
||||
@ -6,13 +6,13 @@ 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.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java
|
||||
index 0225f53..048e8fa 100644
|
||||
index cb2b114..6895b53 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityItem.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityItem.java
|
||||
@@ -114,7 +114,10 @@ public class EntityItem extends Entity {
|
||||
@@ -112,7 +112,10 @@ public class EntityItem extends Entity {
|
||||
}
|
||||
|
||||
private void g() {
|
||||
private void e() {
|
||||
- Iterator iterator = this.world.a(EntityItem.class, this.boundingBox.grow(0.5D, 0.0D, 0.5D)).iterator();
|
||||
+ // Spigot start
|
||||
+ double radius = world.spigotConfig.itemMerge;
|
||||
@ -21,7 +21,7 @@ index 0225f53..048e8fa 100644
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
EntityItem entityitem = (EntityItem) iterator.next();
|
||||
@@ -143,11 +146,13 @@ public class EntityItem extends Entity {
|
||||
@@ -141,11 +144,13 @@ public class EntityItem extends Entity {
|
||||
} else if (itemstack1.count + itemstack.count > itemstack1.getMaxStackSize()) {
|
||||
return false;
|
||||
} else {
|
||||
@ -41,10 +41,10 @@ index 0225f53..048e8fa 100644
|
||||
}
|
||||
} else {
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index afe3e4d..97da2cd 100644
|
||||
index 18994b6..3e7c493 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -957,6 +957,23 @@ public abstract class World implements IBlockAccess {
|
||||
@@ -956,6 +956,23 @@ public abstract class World implements IBlockAccess {
|
||||
// Not all projectiles extend EntityProjectile, so check for Bukkit interface instead
|
||||
event = CraftEventFactory.callProjectileLaunchEvent(entity);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
From a8c529d46c95e00dc30e16fec26a5af608e2db78 Mon Sep 17 00:00:00 2001
|
||||
From 20ac68be1e39187e6c5f68d20619c86bacd05cb9 Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Thu, 7 Mar 2013 20:12:46 +1100
|
||||
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.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityTracker.java b/src/main/java/net/minecraft/server/EntityTracker.java
|
||||
index 9e2b76f..d7efe3e 100644
|
||||
index a8e45dd..7f23f71 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityTracker.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityTracker.java
|
||||
@@ -89,6 +89,7 @@ public class EntityTracker {
|
||||
@@ -87,6 +87,7 @@ public class EntityTracker {
|
||||
}
|
||||
|
||||
public void addEntity(Entity entity, int i, int j, boolean flag) {
|
||||
@ -17,7 +17,7 @@ index 9e2b76f..d7efe3e 100644
|
||||
if (i > this.d) {
|
||||
i = this.d;
|
||||
}
|
||||
@@ -124,6 +125,7 @@ public class EntityTracker {
|
||||
@@ -122,6 +123,7 @@ public class EntityTracker {
|
||||
}
|
||||
|
||||
public void untrackEntity(Entity entity) {
|
||||
@ -26,10 +26,10 @@ index 9e2b76f..d7efe3e 100644
|
||||
EntityPlayer entityplayer = (EntityPlayer) entity;
|
||||
Iterator iterator = this.b.iterator();
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityTrackerEntry.java b/src/main/java/net/minecraft/server/EntityTrackerEntry.java
|
||||
index 5c03732..5f3c780 100644
|
||||
index e58af63..edd2460 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityTrackerEntry.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityTrackerEntry.java
|
||||
@@ -286,6 +286,7 @@ public class EntityTrackerEntry {
|
||||
@@ -292,6 +292,7 @@ public class EntityTrackerEntry {
|
||||
}
|
||||
|
||||
public void updatePlayer(EntityPlayer entityplayer) {
|
||||
@ -37,7 +37,7 @@ index 5c03732..5f3c780 100644
|
||||
if (entityplayer != this.tracker) {
|
||||
double d0 = entityplayer.locX - (double) (this.xLoc / 32);
|
||||
double d1 = entityplayer.locZ - (double) (this.zLoc / 32);
|
||||
@@ -474,6 +475,7 @@ public class EntityTrackerEntry {
|
||||
@@ -501,6 +502,7 @@ public class EntityTrackerEntry {
|
||||
}
|
||||
|
||||
public void clear(EntityPlayer entityplayer) {
|
||||
@ -46,10 +46,10 @@ index 5c03732..5f3c780 100644
|
||||
this.trackedPlayers.remove(entityplayer);
|
||||
entityplayer.removeQueue.add(Integer.valueOf(this.tracker.id));
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index d7e5301..e353caa 100644
|
||||
index 3e7c493..04fa7d6 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -926,6 +926,7 @@ public abstract class World implements IBlockAccess {
|
||||
@@ -925,6 +925,7 @@ public abstract class World implements IBlockAccess {
|
||||
}
|
||||
|
||||
public boolean addEntity(Entity entity, SpawnReason spawnReason) { // Changed signature, added SpawnReason
|
||||
@ -57,7 +57,7 @@ index d7e5301..e353caa 100644
|
||||
if (entity == null) return false;
|
||||
// CraftBukkit end
|
||||
|
||||
@@ -1032,6 +1033,7 @@ public abstract class World implements IBlockAccess {
|
||||
@@ -1031,6 +1032,7 @@ public abstract class World implements IBlockAccess {
|
||||
}
|
||||
|
||||
public void removeEntity(Entity entity) {
|
||||
@ -65,7 +65,7 @@ index d7e5301..e353caa 100644
|
||||
entity.die();
|
||||
if (entity instanceof EntityHuman) {
|
||||
this.players.remove(entity);
|
||||
@@ -2449,6 +2451,7 @@ public abstract class World implements IBlockAccess {
|
||||
@@ -2448,6 +2450,7 @@ public abstract class World implements IBlockAccess {
|
||||
}
|
||||
|
||||
public void a(List list) {
|
||||
@ -74,7 +74,7 @@ index d7e5301..e353caa 100644
|
||||
Entity entity = null;
|
||||
for (int i = 0; i < list.size(); ++i) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index c0fb528..edc59b1 100644
|
||||
index 4c16040..8508d22 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -160,6 +160,7 @@ public class CraftWorld implements World {
|
||||
@ -102,7 +102,7 @@ index c0fb528..edc59b1 100644
|
||||
if (generate) {
|
||||
// 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
|
||||
index df07a9b..7cae665 100644
|
||||
index 1d97430..b3bb702 100644
|
||||
--- a/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 {
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 25fa2cfa4437bbbe2eb832d7ec12070d8842a087 Mon Sep 17 00:00:00 2001
|
||||
From 70bf4a9446eddbe4a3dad0be25ecfdefe1f0af39 Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Sat, 23 Mar 2013 09:52:41 +1100
|
||||
Subject: [PATCH] View Distance
|
||||
@ -6,10 +6,10 @@ 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!
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
index 0dfd190..c543bed 100644
|
||||
index 4e0398c..ae4ca63 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
@@ -22,7 +22,7 @@ public class PlayerChunkMap {
|
||||
@@ -24,7 +24,7 @@ public class PlayerChunkMap {
|
||||
public PlayerChunkMap(WorldServer worldserver, int i) {
|
||||
if (i > 15) {
|
||||
throw new IllegalArgumentException("Too big view radius!");
|
||||
@ -17,12 +17,12 @@ index 0dfd190..c543bed 100644
|
||||
+ } else if (i < 1) {
|
||||
throw new IllegalArgumentException("Too small view radius!");
|
||||
} else {
|
||||
this.e = i;
|
||||
this.f = i;
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index 6c3fcf1..614a17f 100644
|
||||
index 09d076e..c4248d0 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -48,7 +48,7 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
|
||||
@@ -49,7 +49,7 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
|
||||
// CraftBukkit end
|
||||
this.server = minecraftserver;
|
||||
this.tracker = new EntityTracker(this);
|
||||
@ -32,7 +32,7 @@ index 6c3fcf1..614a17f 100644
|
||||
this.entitiesById = new IntHashMap();
|
||||
}
|
||||
diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
||||
index ea7c211..81879e6 100644
|
||||
index 8a6d656..c2da03b 100644
|
||||
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
||||
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
||||
@@ -116,4 +116,11 @@ public class SpigotWorldConfig
|
||||
|
@ -1,4 +1,4 @@
|
||||
From c34bbcf522c081442110baf7b9499eff7939b4a1 Mon Sep 17 00:00:00 2001
|
||||
From 92a6ffad3c78692c77614e848c7b42c76b273889 Mon Sep 17 00:00:00 2001
|
||||
From: Mike Primm <mike@primmhome.com>
|
||||
Date: Sun, 13 Jan 2013 03:49:07 -0800
|
||||
Subject: [PATCH] Compressed Nibble Arrays
|
||||
@ -12,10 +12,10 @@ Finish up NibbleArray lightening work - use for Snapshots, reduce copies
|
||||
Fix nibble handling with NBT - arrays aren't copied by NBTByteArray
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
index 5c67fe4..3f3c07e 100644
|
||||
index ba6d32f..0b086a2 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
@@ -217,15 +217,15 @@ public class ChunkRegionLoader implements IAsyncChunkSaver, IChunkLoader {
|
||||
@@ -218,15 +218,15 @@ public class ChunkRegionLoader implements IAsyncChunkSaver, IChunkLoader {
|
||||
nbttagcompound1.setByte("Y", (byte) (chunksection.getYPosition() >> 4 & 255));
|
||||
nbttagcompound1.setByteArray("Blocks", chunksection.getIdArray());
|
||||
if (chunksection.getExtendedIdArray() != null) {
|
||||
@ -271,64 +271,209 @@ index 53c1cb5..9a9e20f 100644
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/Packet51MapChunk.java b/src/main/java/net/minecraft/server/Packet51MapChunk.java
|
||||
index 97c953b..3c3bdbf 100644
|
||||
--- a/src/main/java/net/minecraft/server/Packet51MapChunk.java
|
||||
new file mode 100644
|
||||
index 0000000..3c3bdbf
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/net/minecraft/server/Packet51MapChunk.java
|
||||
@@ -139,16 +139,22 @@ public class Packet51MapChunk extends Packet {
|
||||
for (l = 0; l < achunksection.length; ++l) {
|
||||
if (achunksection[l] != null && (!flag || !achunksection[l].isEmpty()) && (i & 1 << l) != 0) {
|
||||
nibblearray = achunksection[l].getDataArray();
|
||||
- System.arraycopy(nibblearray.a, 0, abyte, j, nibblearray.a.length);
|
||||
- j += nibblearray.a.length;
|
||||
@@ -0,0 +1,198 @@
|
||||
+package net.minecraft.server;
|
||||
+
|
||||
+import java.io.DataInputStream;
|
||||
+import java.io.DataOutputStream;
|
||||
+import java.io.IOException;
|
||||
+import java.util.zip.DataFormatException;
|
||||
+import java.util.zip.Deflater;
|
||||
+import java.util.zip.Inflater;
|
||||
+
|
||||
+public class Packet51MapChunk extends Packet {
|
||||
+
|
||||
+ public int a;
|
||||
+ public int b;
|
||||
+ public int c;
|
||||
+ public int d;
|
||||
+ private byte[] buffer;
|
||||
+ private byte[] inflatedBuffer;
|
||||
+ public boolean e;
|
||||
+ private int size;
|
||||
+ private static byte[] buildBuffer = new byte[196864];
|
||||
+
|
||||
+ public Packet51MapChunk() {
|
||||
+ this.lowPriority = true;
|
||||
+ }
|
||||
+
|
||||
+ public Packet51MapChunk(Chunk chunk, boolean flag, int i) {
|
||||
+ this.lowPriority = true;
|
||||
+ this.a = chunk.x;
|
||||
+ this.b = chunk.z;
|
||||
+ this.e = flag;
|
||||
+ ChunkMap chunkmap = a(chunk, flag, i);
|
||||
+ Deflater deflater = new Deflater(-1);
|
||||
+
|
||||
+ this.d = chunkmap.c;
|
||||
+ this.c = chunkmap.b;
|
||||
+
|
||||
+ try {
|
||||
+ this.inflatedBuffer = chunkmap.a;
|
||||
+ deflater.setInput(chunkmap.a, 0, chunkmap.a.length);
|
||||
+ deflater.finish();
|
||||
+ this.buffer = new byte[chunkmap.a.length];
|
||||
+ this.size = deflater.deflate(this.buffer);
|
||||
+ } finally {
|
||||
+ deflater.end();
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ public void a(DataInputStream datainputstream) throws IOException { // CraftBukkit - throws IOException
|
||||
+ this.a = datainputstream.readInt();
|
||||
+ this.b = datainputstream.readInt();
|
||||
+ this.e = datainputstream.readBoolean();
|
||||
+ this.c = datainputstream.readShort();
|
||||
+ this.d = datainputstream.readShort();
|
||||
+ this.size = datainputstream.readInt();
|
||||
+ if (buildBuffer.length < this.size) {
|
||||
+ buildBuffer = new byte[this.size];
|
||||
+ }
|
||||
+
|
||||
+ datainputstream.readFully(buildBuffer, 0, this.size);
|
||||
+ int i = 0;
|
||||
+
|
||||
+ int j;
|
||||
+
|
||||
+ for (j = 0; j < 16; ++j) {
|
||||
+ i += this.c >> j & 1;
|
||||
+ }
|
||||
+
|
||||
+ j = 12288 * i;
|
||||
+ if (this.e) {
|
||||
+ j += 256;
|
||||
+ }
|
||||
+
|
||||
+ this.inflatedBuffer = new byte[j];
|
||||
+ Inflater inflater = new Inflater();
|
||||
+
|
||||
+ inflater.setInput(buildBuffer, 0, this.size);
|
||||
+
|
||||
+ try {
|
||||
+ inflater.inflate(this.inflatedBuffer);
|
||||
+ } catch (DataFormatException dataformatexception) {
|
||||
+ throw new IOException("Bad compressed data format");
|
||||
+ } finally {
|
||||
+ inflater.end();
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ public void a(DataOutputStream dataoutputstream) throws IOException { // CraftBukkit - throws IOException
|
||||
+ dataoutputstream.writeInt(this.a);
|
||||
+ dataoutputstream.writeInt(this.b);
|
||||
+ dataoutputstream.writeBoolean(this.e);
|
||||
+ dataoutputstream.writeShort((short) (this.c & '\uffff'));
|
||||
+ dataoutputstream.writeShort((short) (this.d & '\uffff'));
|
||||
+ dataoutputstream.writeInt(this.size);
|
||||
+ dataoutputstream.write(this.buffer, 0, this.size);
|
||||
+ }
|
||||
+
|
||||
+ public void handle(Connection connection) {
|
||||
+ connection.a(this);
|
||||
+ }
|
||||
+
|
||||
+ public int a() {
|
||||
+ return 17 + this.size;
|
||||
+ }
|
||||
+
|
||||
+ public static ChunkMap a(Chunk chunk, boolean flag, int i) {
|
||||
+ int j = 0;
|
||||
+ ChunkSection[] achunksection = chunk.i();
|
||||
+ int k = 0;
|
||||
+ ChunkMap chunkmap = new ChunkMap();
|
||||
+ byte[] abyte = buildBuffer;
|
||||
+
|
||||
+ if (flag) {
|
||||
+ chunk.seenByPlayer = true;
|
||||
+ }
|
||||
+
|
||||
+ int l;
|
||||
+
|
||||
+ for (l = 0; l < achunksection.length; ++l) {
|
||||
+ if (achunksection[l] != null && (!flag || !achunksection[l].isEmpty()) && (i & 1 << l) != 0) {
|
||||
+ chunkmap.b |= 1 << l;
|
||||
+ if (achunksection[l].getExtendedIdArray() != null) {
|
||||
+ chunkmap.c |= 1 << l;
|
||||
+ ++k;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ for (l = 0; l < achunksection.length; ++l) {
|
||||
+ if (achunksection[l] != null && (!flag || !achunksection[l].isEmpty()) && (i & 1 << l) != 0) {
|
||||
+ byte[] abyte1 = achunksection[l].getIdArray();
|
||||
+
|
||||
+ System.arraycopy(abyte1, 0, abyte, j, abyte1.length);
|
||||
+ j += abyte1.length;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ NibbleArray nibblearray;
|
||||
+
|
||||
+ for (l = 0; l < achunksection.length; ++l) {
|
||||
+ if (achunksection[l] != null && (!flag || !achunksection[l].isEmpty()) && (i & 1 << l) != 0) {
|
||||
+ nibblearray = achunksection[l].getDataArray();
|
||||
+ // Spigot start
|
||||
+ // System.arraycopy(nibblearray.a, 0, abyte, j, nibblearray.a.length);
|
||||
+ // j += nibblearray.a.length;
|
||||
+ j = nibblearray.copyToByteArray(abyte, j);
|
||||
+ // Spigot end
|
||||
}
|
||||
}
|
||||
|
||||
for (l = 0; l < achunksection.length; ++l) {
|
||||
if (achunksection[l] != null && (!flag || !achunksection[l].isEmpty()) && (i & 1 << l) != 0) {
|
||||
nibblearray = achunksection[l].getEmittedLightArray();
|
||||
- System.arraycopy(nibblearray.a, 0, abyte, j, nibblearray.a.length);
|
||||
- j += nibblearray.a.length;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ for (l = 0; l < achunksection.length; ++l) {
|
||||
+ if (achunksection[l] != null && (!flag || !achunksection[l].isEmpty()) && (i & 1 << l) != 0) {
|
||||
+ nibblearray = achunksection[l].getEmittedLightArray();
|
||||
+ // Spigot start
|
||||
+ // System.arraycopy(nibblearray.a, 0, abyte, j, nibblearray.a.length);
|
||||
+ // j += nibblearray.a.length;
|
||||
+ j = nibblearray.copyToByteArray(abyte, j);
|
||||
+ // Spigot end
|
||||
}
|
||||
}
|
||||
|
||||
@@ -156,8 +162,11 @@ public class Packet51MapChunk extends Packet {
|
||||
for (l = 0; l < achunksection.length; ++l) {
|
||||
if (achunksection[l] != null && (!flag || !achunksection[l].isEmpty()) && (i & 1 << l) != 0) {
|
||||
nibblearray = achunksection[l].getSkyLightArray();
|
||||
- System.arraycopy(nibblearray.a, 0, abyte, j, nibblearray.a.length);
|
||||
- j += nibblearray.a.length;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (!chunk.world.worldProvider.f) {
|
||||
+ for (l = 0; l < achunksection.length; ++l) {
|
||||
+ if (achunksection[l] != null && (!flag || !achunksection[l].isEmpty()) && (i & 1 << l) != 0) {
|
||||
+ nibblearray = achunksection[l].getSkyLightArray();
|
||||
+ // Spigot start
|
||||
+ // System.arraycopy(nibblearray.a, 0, abyte, j, nibblearray.a.length);
|
||||
+ // j += nibblearray.a.length;
|
||||
+ j = nibblearray.copyToByteArray(abyte, j);
|
||||
+ // Spigot end
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -166,8 +175,11 @@ public class Packet51MapChunk extends Packet {
|
||||
for (l = 0; l < achunksection.length; ++l) {
|
||||
if (achunksection[l] != null && (!flag || !achunksection[l].isEmpty()) && achunksection[l].getExtendedIdArray() != null && (i & 1 << l) != 0) {
|
||||
nibblearray = achunksection[l].getExtendedIdArray();
|
||||
- System.arraycopy(nibblearray.a, 0, abyte, j, nibblearray.a.length);
|
||||
- j += nibblearray.a.length;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (k > 0) {
|
||||
+ for (l = 0; l < achunksection.length; ++l) {
|
||||
+ if (achunksection[l] != null && (!flag || !achunksection[l].isEmpty()) && achunksection[l].getExtendedIdArray() != null && (i & 1 << l) != 0) {
|
||||
+ nibblearray = achunksection[l].getExtendedIdArray();
|
||||
+ // Spigot start
|
||||
+ //System.arraycopy(nibblearray.a, 0, abyte, j, nibblearray.a.length);
|
||||
+ //j += nibblearray.a.length;
|
||||
+ j = nibblearray.copyToByteArray(abyte, j);
|
||||
+ // Spigot end
|
||||
}
|
||||
}
|
||||
}
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (flag) {
|
||||
+ byte[] abyte2 = chunk.m();
|
||||
+
|
||||
+ System.arraycopy(abyte2, 0, abyte, j, abyte2.length);
|
||||
+ j += abyte2.length;
|
||||
+ }
|
||||
+
|
||||
+ chunkmap.a = new byte[j];
|
||||
+ System.arraycopy(abyte, 0, chunkmap.a, 0, j);
|
||||
+ return chunkmap;
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
|
||||
index 1a21516..6921206 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 93bb757069c358d8f45c8e92d005a45c83de9286 Mon Sep 17 00:00:00 2001
|
||||
From 9007f313ede8a4a7711890086191f20e8c6b14f8 Mon Sep 17 00:00:00 2001
|
||||
From: Ammar Askar <ammar@ammaraskar.com>
|
||||
Date: Fri, 18 Jan 2013 16:20:01 +0500
|
||||
Subject: [PATCH] Optimize Chunk Unload Packet
|
||||
@ -35,14 +35,17 @@ index 3c3bdbf..d11c0ea 100644
|
||||
this.lowPriority = true;
|
||||
this.a = chunk.x;
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java
|
||||
index 10a43b6..20f8e8a 100644
|
||||
index 81d66e4..c4a6724 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerChunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerChunk.java
|
||||
@@ -52,7 +52,7 @@ class PlayerChunk {
|
||||
@@ -56,9 +56,9 @@ class PlayerChunk {
|
||||
|
||||
public void b(EntityPlayer entityplayer) {
|
||||
if (this.b.contains(entityplayer)) {
|
||||
- entityplayer.playerConnection.sendPacket(new Packet51MapChunk(PlayerChunkMap.a(this.playerChunkMap).getChunkAt(this.location.x, this.location.z), true, 0));
|
||||
- Chunk chunk = PlayerChunkMap.a(this.playerChunkMap).getChunkAt(this.location.x, this.location.z);
|
||||
+ // Chunk chunk = PlayerChunkMap.a(this.playerChunkMap).getChunkAt(this.location.x, this.location.z);
|
||||
|
||||
- entityplayer.playerConnection.sendPacket(new Packet51MapChunk(chunk, true, 0));
|
||||
+ entityplayer.playerConnection.sendPacket(new Packet51MapChunk(this.location.x, this.location.z)); // Spigot - remove chunk load call just to unload in favour of specialized constructor
|
||||
this.b.remove(entityplayer);
|
||||
entityplayer.chunkCoordIntPairQueue.remove(this.location);
|
||||
|
@ -1,14 +1,14 @@
|
||||
From 27aa389075a5b22ffad6e7c8d4d42b9315aa1bc0 Mon Sep 17 00:00:00 2001
|
||||
From a1a850630d7e5f670fded63744285f7160e47257 Mon Sep 17 00:00:00 2001
|
||||
From: Mike Primm <mike@primmhome.com>
|
||||
Date: Wed, 16 Jan 2013 15:27:22 -0600
|
||||
Subject: [PATCH] Sync Free Chunk Reference Cache
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index e353caa..a81e06d 100644
|
||||
index 04fa7d6..8c4bbf9 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -301,15 +301,13 @@ public abstract class World implements IBlockAccess {
|
||||
@@ -300,15 +300,13 @@ public abstract class World implements IBlockAccess {
|
||||
|
||||
// CraftBukkit start
|
||||
public Chunk getChunkAt(int i, int j) {
|
||||
|
@ -1,14 +1,14 @@
|
||||
From ac8a1f6656ae9cd13e08c9e25b379769c9a6c7ae Mon Sep 17 00:00:00 2001
|
||||
From 9eb7c67eb82703dcffc537f751b364062345f23d Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Sun, 3 Feb 2013 12:28:17 +1100
|
||||
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
|
||||
index 3e134fb..3c80340 100644
|
||||
index 96d291d..4c845ca 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -84,6 +84,12 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
|
||||
@@ -86,6 +86,12 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
|
||||
public java.util.Queue<Runnable> processQueue = new java.util.concurrent.ConcurrentLinkedQueue<Runnable>();
|
||||
public int autosavePeriod;
|
||||
// CraftBukkit end
|
||||
@ -20,22 +20,22 @@ index 3e134fb..3c80340 100644
|
||||
+ // Spigot end
|
||||
|
||||
public MinecraftServer(OptionSet options) { // CraftBukkit - signature file -> OptionSet
|
||||
k = this;
|
||||
@@ -380,39 +386,23 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
|
||||
this.c = Proxy.NO_PROXY;
|
||||
@@ -390,39 +396,23 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
|
||||
public void run() {
|
||||
try {
|
||||
if (this.init()) {
|
||||
- long i = System.currentTimeMillis();
|
||||
- long i = aq();
|
||||
-
|
||||
- for (long j = 0L; this.isRunning; this.P = true) {
|
||||
- long k = System.currentTimeMillis();
|
||||
- for (long j = 0L; this.isRunning; this.Q = true) {
|
||||
- long k = aq();
|
||||
- long l = k - i;
|
||||
-
|
||||
- if (l > 2000L && i - this.Q >= 15000L) {
|
||||
- if (l > 2000L && i - this.R >= 15000L) {
|
||||
- if (this.server.getWarnOnOverload()) // CraftBukkit - Added option to suppress warning messages
|
||||
- this.getLogger().warning("Can\'t keep up! Did the system time change, or is the server overloaded?");
|
||||
- l = 2000L;
|
||||
- this.Q = i;
|
||||
- this.R = i;
|
||||
- }
|
||||
-
|
||||
- if (l < 0L) {
|
||||
@ -46,10 +46,10 @@ index 3e134fb..3c80340 100644
|
||||
- j += l;
|
||||
- i = k;
|
||||
- if (this.worlds.get(0).everyoneDeeplySleeping()) { // CraftBukkit
|
||||
- this.q();
|
||||
- this.s();
|
||||
- j = 0L;
|
||||
+ // Spigot start
|
||||
+ for (long lastTick = 0L; this.isRunning; this.P = true) {
|
||||
+ for (long lastTick = 0L; this.isRunning; this.Q = true) {
|
||||
+ long curTime = System.nanoTime();
|
||||
+ long wait = TICK_TIME - (curTime - lastTick) - catchupTime;
|
||||
+ if (wait > 0) {
|
||||
@ -60,7 +60,7 @@ index 3e134fb..3c80340 100644
|
||||
- while (j > 50L) {
|
||||
- MinecraftServer.currentTick = (int) (System.currentTimeMillis() / 50); // CraftBukkit
|
||||
- j -= 50L;
|
||||
- this.q();
|
||||
- this.s();
|
||||
- }
|
||||
+ catchupTime = Math.min(TICK_TIME * TPS, Math.abs(wait));
|
||||
}
|
||||
@ -69,7 +69,7 @@ index 3e134fb..3c80340 100644
|
||||
+ currentTPS = (currentTPS * 0.95) + (1E9 / (curTime - lastTick) * 0.05);
|
||||
+ lastTick = curTime;
|
||||
+ MinecraftServer.currentTick++;
|
||||
+ this.q();
|
||||
+ this.s();
|
||||
}
|
||||
+ // Spigot end
|
||||
} else {
|
||||
@ -117,7 +117,7 @@ index 0000000..f114a31
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
|
||||
index 56ac067..d22e8e5 100644
|
||||
index e4eaecd..7880a31 100644
|
||||
--- a/src/main/java/org/spigotmc/SpigotConfig.java
|
||||
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
|
||||
@@ -14,6 +14,7 @@ import net.minecraft.server.MinecraftServer;
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 6a85506600fad57b57f604edc72a6ef581d12845 Mon Sep 17 00:00:00 2001
|
||||
From 3f038fef4412774a096de4906029304cd000af27 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Thu, 10 Jan 2013 00:18:11 -0500
|
||||
Subject: [PATCH] Improved Timings System
|
||||
@ -26,7 +26,7 @@ index b73f69c..17934c0 100644
|
||||
|
||||
// CraftBukkit start - If we didn't need to load the chunk run the callback now
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 0f7be97..978b6ef 100644
|
||||
index 3953bc4..72c6e66 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -14,6 +14,7 @@ import org.bukkit.block.BlockFace;
|
||||
@ -39,14 +39,14 @@ index 0f7be97..978b6ef 100644
|
||||
import org.bukkit.event.vehicle.VehicleBlockCollisionEvent;
|
||||
@@ -110,6 +111,8 @@ public abstract class Entity {
|
||||
public EnumEntitySize at;
|
||||
public boolean valid = false; // CraftBukkit
|
||||
public boolean valid; // CraftBukkit
|
||||
|
||||
+ public CustomTimingsHandler tickTimer = org.bukkit.craftbukkit.SpigotTimings.getEntityTimings(this); // Spigot
|
||||
+
|
||||
public Entity(World world) {
|
||||
this.id = entityCount++;
|
||||
this.l = 1.0D;
|
||||
@@ -423,6 +426,7 @@ public abstract class Entity {
|
||||
@@ -400,6 +403,7 @@ public abstract class Entity {
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
@ -54,7 +54,7 @@ index 0f7be97..978b6ef 100644
|
||||
if (this.Z) {
|
||||
this.boundingBox.d(d0, d1, d2);
|
||||
this.locX = (this.boundingBox.a + this.boundingBox.d) / 2.0D;
|
||||
@@ -722,6 +726,7 @@ public abstract class Entity {
|
||||
@@ -708,6 +712,7 @@ public abstract class Entity {
|
||||
|
||||
this.world.methodProfiler.b();
|
||||
}
|
||||
@ -62,80 +62,11 @@ index 0f7be97..978b6ef 100644
|
||||
}
|
||||
|
||||
protected void C() {
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
index 965e6ce..58a4acb 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
@@ -497,6 +497,7 @@ public abstract class EntityLiving extends Entity {
|
||||
}
|
||||
|
||||
public void l_() {
|
||||
+ org.bukkit.craftbukkit.SpigotTimings.timerEntityBaseTick.startTiming(); // Spigot
|
||||
super.l_();
|
||||
if (!this.world.isStatic) {
|
||||
int i;
|
||||
@@ -523,7 +524,9 @@ public abstract class EntityLiving extends Entity {
|
||||
}
|
||||
}
|
||||
|
||||
+ org.bukkit.craftbukkit.SpigotTimings.timerEntityBaseTick.stopTiming(); // Spigot
|
||||
this.c();
|
||||
+ org.bukkit.craftbukkit.SpigotTimings.timerEntityTickRest.startTiming(); // Spigot
|
||||
double d0 = this.locX - this.lastX;
|
||||
double d1 = this.locZ - this.lastZ;
|
||||
float f = (float) (d0 * d0 + d1 * d1);
|
||||
@@ -614,6 +617,7 @@ public abstract class EntityLiving extends Entity {
|
||||
|
||||
this.world.methodProfiler.b();
|
||||
this.aE += f2;
|
||||
+ org.bukkit.craftbukkit.SpigotTimings.timerEntityTickRest.stopTiming(); // Spigot
|
||||
}
|
||||
|
||||
// CraftBukkit start - Delegate so we can handle providing a reason for health being regained
|
||||
@@ -1254,6 +1258,7 @@ public abstract class EntityLiving extends Entity {
|
||||
}
|
||||
|
||||
public void c() {
|
||||
+ org.bukkit.craftbukkit.SpigotTimings.timerEntityAI.startTiming(); // Spigot
|
||||
if (this.bX > 0) {
|
||||
--this.bX;
|
||||
}
|
||||
@@ -1305,6 +1310,7 @@ public abstract class EntityLiving extends Entity {
|
||||
this.aA = this.yaw;
|
||||
}
|
||||
}
|
||||
+ org.bukkit.craftbukkit.SpigotTimings.timerEntityAI.stopTiming(); // Spigot
|
||||
|
||||
this.world.methodProfiler.b();
|
||||
this.world.methodProfiler.a("jump");
|
||||
@@ -1323,6 +1329,7 @@ public abstract class EntityLiving extends Entity {
|
||||
|
||||
this.world.methodProfiler.b();
|
||||
this.world.methodProfiler.a("travel");
|
||||
+ org.bukkit.craftbukkit.SpigotTimings.timerEntityAIMove.startTiming(); // Spigot
|
||||
this.bD *= 0.98F;
|
||||
this.bE *= 0.98F;
|
||||
this.bF *= 0.9F;
|
||||
@@ -1331,11 +1338,14 @@ public abstract class EntityLiving extends Entity {
|
||||
this.aO *= this.bE();
|
||||
this.e(this.bD, this.bE);
|
||||
this.aO = f;
|
||||
+ org.bukkit.craftbukkit.SpigotTimings.timerEntityAIMove.stopTiming(); // Spigot
|
||||
this.world.methodProfiler.b();
|
||||
this.world.methodProfiler.a("push");
|
||||
+ org.bukkit.craftbukkit.SpigotTimings.timerEntityAICollision.startTiming(); // Spigot
|
||||
if (!this.world.isStatic) {
|
||||
this.bg();
|
||||
}
|
||||
+ org.bukkit.craftbukkit.SpigotTimings.timerEntityAICollision.stopTiming(); // Spigot
|
||||
|
||||
this.world.methodProfiler.b();
|
||||
this.world.methodProfiler.a("looting");
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 3c80340..db396b3 100644
|
||||
index 4c845ca..f114444 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -6,7 +6,6 @@ import java.security.KeyPair;
|
||||
@@ -7,7 +7,6 @@ import java.security.KeyPair;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
@ -143,7 +74,7 @@ index 3c80340..db396b3 100644
|
||||
import java.util.List;
|
||||
import java.util.concurrent.Callable;
|
||||
import java.util.logging.Level;
|
||||
@@ -19,6 +18,7 @@ import jline.console.ConsoleReader;
|
||||
@@ -20,6 +19,7 @@ import jline.console.ConsoleReader;
|
||||
import joptsimple.OptionSet;
|
||||
|
||||
import org.bukkit.World.Environment;
|
||||
@ -151,26 +82,26 @@ index 3c80340..db396b3 100644
|
||||
import org.bukkit.craftbukkit.util.Waitable;
|
||||
import org.bukkit.event.server.RemoteServerCommandEvent;
|
||||
import org.bukkit.event.world.WorldSaveEvent;
|
||||
@@ -400,7 +400,10 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
|
||||
@@ -410,7 +410,10 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
|
||||
currentTPS = (currentTPS * 0.95) + (1E9 / (curTime - lastTick) * 0.05);
|
||||
lastTick = curTime;
|
||||
MinecraftServer.currentTick++;
|
||||
+ SpigotTimings.serverTickTimer.startTiming();
|
||||
this.q();
|
||||
this.s();
|
||||
+ SpigotTimings.serverTickTimer.stopTiming();
|
||||
+ org.spigotmc.CustomTimingsHandler.tick();
|
||||
}
|
||||
// Spigot end
|
||||
} else {
|
||||
@@ -499,6 +502,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
|
||||
public void r() {
|
||||
@@ -509,6 +512,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
|
||||
public void t() {
|
||||
this.methodProfiler.a("levels");
|
||||
|
||||
+ SpigotTimings.schedulerTimer.startTiming(); // Spigot
|
||||
// CraftBukkit start
|
||||
this.server.getScheduler().mainThreadHeartbeat(this.ticks);
|
||||
|
||||
@@ -507,7 +511,10 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
|
||||
@@ -517,7 +521,10 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
|
||||
processQueue.remove().run();
|
||||
}
|
||||
|
||||
@ -181,7 +112,7 @@ index 3c80340..db396b3 100644
|
||||
|
||||
// Send time updates to everyone, it will get the right time from the world the player is in.
|
||||
if (this.ticks % 20 == 0) {
|
||||
@@ -559,7 +566,9 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
|
||||
@@ -569,7 +576,9 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
|
||||
|
||||
this.methodProfiler.b();
|
||||
this.methodProfiler.a("tracker");
|
||||
@ -191,32 +122,32 @@ index 3c80340..db396b3 100644
|
||||
this.methodProfiler.b();
|
||||
this.methodProfiler.b();
|
||||
// } // CraftBukkit
|
||||
@@ -568,14 +577,20 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
|
||||
@@ -578,14 +587,20 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
|
||||
}
|
||||
|
||||
this.methodProfiler.c("connection");
|
||||
+ SpigotTimings.connectionTimer.startTiming(); // Spigot
|
||||
this.ae().b();
|
||||
this.ag().b();
|
||||
+ SpigotTimings.connectionTimer.stopTiming(); // Spigot
|
||||
this.methodProfiler.c("players");
|
||||
+ SpigotTimings.playerListTimer.startTiming(); // Spigot
|
||||
this.s.tick();
|
||||
this.t.tick();
|
||||
+ SpigotTimings.playerListTimer.stopTiming(); // Spigot
|
||||
this.methodProfiler.c("tickables");
|
||||
|
||||
+ SpigotTimings.tickablesTimer.startTiming(); // Spigot
|
||||
for (i = 0; i < this.o.size(); ++i) {
|
||||
((IUpdatePlayerListBox) this.o.get(i)).a();
|
||||
for (i = 0; i < this.p.size(); ++i) {
|
||||
((IUpdatePlayerListBox) this.p.get(i)).a();
|
||||
}
|
||||
+ SpigotTimings.tickablesTimer.stopTiming(); // Spigot
|
||||
|
||||
this.methodProfiler.b();
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index 018c314..8deba1b 100644
|
||||
index f82d932..e5937fc 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -956,6 +956,7 @@ public class PlayerConnection extends Connection {
|
||||
@@ -968,6 +968,7 @@ public class PlayerConnection extends Connection {
|
||||
// CraftBukkit end
|
||||
|
||||
private void handleCommand(String s) {
|
||||
@ -224,7 +155,7 @@ index 018c314..8deba1b 100644
|
||||
// CraftBukkit start
|
||||
CraftPlayer player = this.getPlayer();
|
||||
|
||||
@@ -963,19 +964,23 @@ public class PlayerConnection extends Connection {
|
||||
@@ -975,19 +976,23 @@ public class PlayerConnection extends Connection {
|
||||
this.server.getPluginManager().callEvent(event);
|
||||
|
||||
if (event.isCancelled()) {
|
||||
@ -249,7 +180,7 @@ index 018c314..8deba1b 100644
|
||||
|
||||
/* CraftBukkit start - No longer needed as we have already handled it in server.dispatchServerCommand above.
|
||||
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
|
||||
index db3fc42..ffa9bb6 100644
|
||||
index f4be980..6ae7cb3 100644
|
||||
--- a/src/main/java/net/minecraft/server/TileEntity.java
|
||||
+++ b/src/main/java/net/minecraft/server/TileEntity.java
|
||||
@@ -4,10 +4,12 @@ import java.util.HashMap;
|
||||
@ -266,7 +197,7 @@ index db3fc42..ffa9bb6 100644
|
||||
private static Map b = new HashMap();
|
||||
protected World world;
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index a81e06d..da069f7 100644
|
||||
index 8c4bbf9..75402e7 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -13,6 +13,7 @@ import java.util.concurrent.Callable;
|
||||
@ -286,7 +217,7 @@ index a81e06d..da069f7 100644
|
||||
public CraftWorld getWorld() {
|
||||
return this.world;
|
||||
}
|
||||
@@ -201,6 +204,7 @@ public abstract class World implements IBlockAccess {
|
||||
@@ -200,6 +203,7 @@ public abstract class World implements IBlockAccess {
|
||||
this.a();
|
||||
|
||||
this.getServer().addWorld(this.world); // CraftBukkit
|
||||
@ -294,7 +225,7 @@ index a81e06d..da069f7 100644
|
||||
}
|
||||
|
||||
protected abstract IChunkProvider j();
|
||||
@@ -1273,6 +1277,7 @@ public abstract class World implements IBlockAccess {
|
||||
@@ -1272,6 +1276,7 @@ public abstract class World implements IBlockAccess {
|
||||
this.f.clear();
|
||||
this.methodProfiler.c("regular");
|
||||
|
||||
@ -302,7 +233,7 @@ index a81e06d..da069f7 100644
|
||||
for (i = 0; i < this.entityList.size(); ++i) {
|
||||
entity = (Entity) this.entityList.get(i);
|
||||
|
||||
@@ -1295,7 +1300,9 @@ public abstract class World implements IBlockAccess {
|
||||
@@ -1294,7 +1299,9 @@ public abstract class World implements IBlockAccess {
|
||||
this.methodProfiler.a("tick");
|
||||
if (!entity.dead) {
|
||||
try {
|
||||
@ -312,7 +243,7 @@ index a81e06d..da069f7 100644
|
||||
} catch (Throwable throwable1) {
|
||||
crashreport = CrashReport.a(throwable1, "Ticking entity");
|
||||
crashreportsystemdetails = crashreport.a("Entity being ticked");
|
||||
@@ -1320,7 +1327,9 @@ public abstract class World implements IBlockAccess {
|
||||
@@ -1319,7 +1326,9 @@ public abstract class World implements IBlockAccess {
|
||||
this.methodProfiler.b();
|
||||
}
|
||||
|
||||
@ -322,7 +253,7 @@ index a81e06d..da069f7 100644
|
||||
this.N = true;
|
||||
Iterator iterator = this.tileEntityList.iterator();
|
||||
|
||||
@@ -1335,8 +1344,11 @@ public abstract class World implements IBlockAccess {
|
||||
@@ -1334,8 +1343,11 @@ public abstract class World implements IBlockAccess {
|
||||
|
||||
if (!tileentity.r() && tileentity.o() && this.isLoaded(tileentity.x, tileentity.y, tileentity.z)) {
|
||||
try {
|
||||
@ -334,7 +265,7 @@ index a81e06d..da069f7 100644
|
||||
crashreport = CrashReport.a(throwable2, "Ticking tile entity");
|
||||
crashreportsystemdetails = crashreport.a("Tile entity being ticked");
|
||||
tileentity.a(crashreportsystemdetails);
|
||||
@@ -1356,6 +1368,8 @@ public abstract class World implements IBlockAccess {
|
||||
@@ -1355,6 +1367,8 @@ public abstract class World implements IBlockAccess {
|
||||
}
|
||||
}
|
||||
|
||||
@ -343,7 +274,7 @@ index a81e06d..da069f7 100644
|
||||
this.N = false;
|
||||
if (!this.b.isEmpty()) {
|
||||
this.tileEntityList.removeAll(this.b);
|
||||
@@ -1394,6 +1408,7 @@ public abstract class World implements IBlockAccess {
|
||||
@@ -1393,6 +1407,7 @@ public abstract class World implements IBlockAccess {
|
||||
this.a.clear();
|
||||
}
|
||||
|
||||
@ -351,7 +282,7 @@ index a81e06d..da069f7 100644
|
||||
this.methodProfiler.b();
|
||||
this.methodProfiler.b();
|
||||
}
|
||||
@@ -1416,6 +1431,7 @@ public abstract class World implements IBlockAccess {
|
||||
@@ -1415,6 +1430,7 @@ public abstract class World implements IBlockAccess {
|
||||
byte b0 = 32;
|
||||
|
||||
if (!flag || this.e(i - b0, 0, j - b0, i + b0, 0, j + b0)) {
|
||||
@ -359,7 +290,7 @@ index a81e06d..da069f7 100644
|
||||
entity.U = entity.locX;
|
||||
entity.V = entity.locY;
|
||||
entity.W = entity.locZ;
|
||||
@@ -1477,6 +1493,7 @@ public abstract class World implements IBlockAccess {
|
||||
@@ -1476,6 +1492,7 @@ public abstract class World implements IBlockAccess {
|
||||
entity.passenger = null;
|
||||
}
|
||||
}
|
||||
@ -368,15 +299,15 @@ index a81e06d..da069f7 100644
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index 614a17f..69d955f 100644
|
||||
index c4248d0..b7e0551 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -183,9 +183,12 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
|
||||
@@ -179,9 +179,12 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
|
||||
// CraftBukkit start - Only call spawner if we have players online and the world allows for mobs or animals
|
||||
long time = this.worldData.getTime();
|
||||
if (this.getGameRules().getBoolean("doMobSpawning") && (this.allowMonsters || this.allowAnimals) && (this instanceof WorldServer && this.players.size() > 0)) {
|
||||
+ timings.mobSpawn.startTiming(); // Spigot
|
||||
SpawnerCreature.spawnEntities(this, this.allowMonsters && (this.ticksPerMonsterSpawns != 0 && time % this.ticksPerMonsterSpawns == 0L), this.allowAnimals && (this.ticksPerAnimalSpawns != 0 && time % this.ticksPerAnimalSpawns == 0L), this.worldData.getTime() % 400L == 0L);
|
||||
this.Q.spawnEntities(this, this.allowMonsters && (this.ticksPerMonsterSpawns != 0 && time % this.ticksPerMonsterSpawns == 0L), this.allowAnimals && (this.ticksPerAnimalSpawns != 0 && time % this.ticksPerAnimalSpawns == 0L), this.worldData.getTime() % 400L == 0L);
|
||||
+ timings.mobSpawn.stopTiming(); // Spigot
|
||||
}
|
||||
// CraftBukkit end
|
||||
@ -384,10 +315,10 @@ index 614a17f..69d955f 100644
|
||||
this.methodProfiler.c("chunkSource");
|
||||
this.chunkProvider.unloadChunks();
|
||||
int j = this.a(1.0F);
|
||||
@@ -196,21 +199,36 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
|
||||
@@ -195,21 +198,36 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
|
||||
this.worldData.setDayTime(this.worldData.getDayTime() + 1L);
|
||||
}
|
||||
|
||||
this.worldData.setTime(this.worldData.getTime() + 1L);
|
||||
this.worldData.setDayTime(this.worldData.getDayTime() + 1L);
|
||||
+ timings.doChunkUnload.stopTiming(); // Spigot
|
||||
this.methodProfiler.c("tickPending");
|
||||
+ timings.doTickPending.startTiming(); // Spigot
|
||||
@ -412,13 +343,12 @@ index 614a17f..69d955f 100644
|
||||
+ timings.doPortalForcer.stopTiming(); // Spigot
|
||||
this.methodProfiler.b();
|
||||
+ timings.doSounds.startTiming(); // Spigot
|
||||
this.Z();
|
||||
-
|
||||
this.aa();
|
||||
+ timings.doSounds.stopTiming(); // Spigot
|
||||
|
||||
+ timings.doChunkGC.startTiming(); // Spigot
|
||||
this.getWorld().processChunkGC(); // CraftBukkit
|
||||
+ timings.doChunkGC.stopTiming(); // Spigot
|
||||
+
|
||||
}
|
||||
|
||||
public BiomeMeta a(EnumCreatureType enumcreaturetype, int i, int j, int k) {
|
||||
|
@ -1,14 +1,14 @@
|
||||
From 90de56da643bde4b842cc958a4b449634bb9ba8c Mon Sep 17 00:00:00 2001
|
||||
From 701fc14fd49aa989ecfdfb3986155036d594844b Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Thu, 16 May 2013 18:51:05 +1000
|
||||
Subject: [PATCH] Orebfuscator
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityFallingBlock.java b/src/main/java/net/minecraft/server/EntityFallingBlock.java
|
||||
index 17d837d..c7cd0ca 100644
|
||||
index daa376c..79c94dc 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityFallingBlock.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityFallingBlock.java
|
||||
@@ -94,6 +94,7 @@ public class EntityFallingBlock extends Entity {
|
||||
@@ -86,6 +86,7 @@ public class EntityFallingBlock extends Entity {
|
||||
}
|
||||
|
||||
this.world.setAir(i, j, k);
|
||||
@ -17,7 +17,7 @@ index 17d837d..c7cd0ca 100644
|
||||
|
||||
if (this.onGround) {
|
||||
diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java
|
||||
index ef220c1..2063769 100644
|
||||
index 758d447..1d1c88c 100644
|
||||
--- a/src/main/java/net/minecraft/server/Explosion.java
|
||||
+++ b/src/main/java/net/minecraft/server/Explosion.java
|
||||
@@ -240,6 +240,7 @@ public class Explosion {
|
||||
@ -41,7 +41,7 @@ index d11c0ea..efe102e 100644
|
||||
try {
|
||||
this.inflatedBuffer = chunkmap.a;
|
||||
diff --git a/src/main/java/net/minecraft/server/Packet56MapChunkBulk.java b/src/main/java/net/minecraft/server/Packet56MapChunkBulk.java
|
||||
index 129dc4f..a2cd9b0 100644
|
||||
index 04c44fc..a6e3be2 100644
|
||||
--- a/src/main/java/net/minecraft/server/Packet56MapChunkBulk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Packet56MapChunkBulk.java
|
||||
@@ -28,6 +28,7 @@ public class Packet56MapChunkBulk extends Packet {
|
||||
@ -95,7 +95,7 @@ index 129dc4f..a2cd9b0 100644
|
||||
Deflater deflater = localDeflater.get();
|
||||
deflater.reset();
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerInteractManager.java b/src/main/java/net/minecraft/server/PlayerInteractManager.java
|
||||
index 1243d1d..9ec8997 100644
|
||||
index d77a4cc..4aa9ab7 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerInteractManager.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerInteractManager.java
|
||||
@@ -184,6 +184,7 @@ public class PlayerInteractManager {
|
||||
@ -316,7 +316,7 @@ index 0000000..c29b789
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
||||
index 81879e6..0a304e8 100644
|
||||
index c2da03b..a788d8d 100644
|
||||
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
||||
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
||||
@@ -1,5 +1,6 @@
|
||||
|
@ -1,22 +1,22 @@
|
||||
From d1a43b7d46685cdaa095ef806f9300db709c5d84 Mon Sep 17 00:00:00 2001
|
||||
From 33a9339848ae800087b9b00f0d3bd09eae007ff2 Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Fri, 21 Jun 2013 17:29:54 +1000
|
||||
Subject: [PATCH] Fix Mob Spawning Relative to View Distance
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||
index 7416edc..e8d30c5 100644
|
||||
index 61e56ab..04cb6fb 100644
|
||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||
@@ -33,6 +33,7 @@ public class Chunk {
|
||||
public int p;
|
||||
public long q;
|
||||
private int u;
|
||||
boolean q;
|
||||
+ protected gnu.trove.map.hash.TObjectIntHashMap<Class> entityCount = new gnu.trove.map.hash.TObjectIntHashMap<Class>(); // Spigot
|
||||
|
||||
public Chunk(World world, int i, int j) {
|
||||
this.sections = new ChunkSection[16];
|
||||
@@ -560,6 +561,15 @@ public class Chunk {
|
||||
@@ -552,6 +553,15 @@ public class Chunk {
|
||||
entity.ak = k;
|
||||
entity.al = this.z;
|
||||
this.entitySlices[k].add(entity);
|
||||
@ -32,7 +32,7 @@ index 7416edc..e8d30c5 100644
|
||||
}
|
||||
|
||||
public void b(Entity entity) {
|
||||
@@ -576,6 +586,15 @@ public class Chunk {
|
||||
@@ -568,6 +578,15 @@ public class Chunk {
|
||||
}
|
||||
|
||||
this.entitySlices[i].remove(entity);
|
||||
@ -49,10 +49,10 @@ index 7416edc..e8d30c5 100644
|
||||
|
||||
public boolean d(int i, int j, int k) {
|
||||
diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java
|
||||
index 056100f..bec0d91 100644
|
||||
index aa7698b..3a0d2ef 100644
|
||||
--- a/src/main/java/net/minecraft/server/SpawnerCreature.java
|
||||
+++ b/src/main/java/net/minecraft/server/SpawnerCreature.java
|
||||
@@ -26,6 +26,23 @@ public final class SpawnerCreature {
|
||||
@@ -27,6 +27,23 @@ public final class SpawnerCreature {
|
||||
return new ChunkPosition(k, i1, l);
|
||||
}
|
||||
|
||||
@ -73,10 +73,10 @@ index 056100f..bec0d91 100644
|
||||
+ }
|
||||
+ // Spigot end
|
||||
+
|
||||
public static final int spawnEntities(WorldServer worldserver, boolean flag, boolean flag1, boolean flag2) {
|
||||
public int spawnEntities(WorldServer worldserver, boolean flag, boolean flag1, boolean flag2) {
|
||||
if (!flag && !flag1) {
|
||||
return 0;
|
||||
@@ -41,6 +58,11 @@ public final class SpawnerCreature {
|
||||
@@ -42,6 +59,11 @@ public final class SpawnerCreature {
|
||||
|
||||
j = MathHelper.floor(entityhuman.locZ / 16.0D);
|
||||
byte b0 = 8;
|
||||
@ -88,16 +88,16 @@ index 056100f..bec0d91 100644
|
||||
|
||||
for (int l = -b0; l <= b0; ++l) {
|
||||
for (int i1 = -b0; i1 <= b0; ++i1) {
|
||||
@@ -88,13 +110,15 @@ public final class SpawnerCreature {
|
||||
@@ -89,13 +111,15 @@ public final class SpawnerCreature {
|
||||
if (limit == 0) {
|
||||
continue;
|
||||
}
|
||||
+ int mobcnt = 0;
|
||||
// CraftBukkit end
|
||||
|
||||
- if ((!enumcreaturetype.d() || flag1) && (enumcreaturetype.d() || flag) && (!enumcreaturetype.e() || flag2) && worldserver.a(enumcreaturetype.a()) <= limit * b.size() / 256) { // CraftBukkit - use per-world limits
|
||||
+ if ((!enumcreaturetype.d() || flag1) && (enumcreaturetype.d() || flag) && (!enumcreaturetype.e() || flag2) && (mobcnt = getEntityCount(worldserver, enumcreaturetype.a())) <= limit * b.size() / 256) { // Spigot - use per-world limits and use all loaded chunks
|
||||
Iterator iterator = b.keySet().iterator();
|
||||
- if ((!enumcreaturetype.d() || flag1) && (enumcreaturetype.d() || flag) && (!enumcreaturetype.e() || flag2) && worldserver.a(enumcreaturetype.a()) <= limit * this.a.size() / 256) { // CraftBukkit - use per-world limits
|
||||
+ if ((!enumcreaturetype.d() || flag1) && (enumcreaturetype.d() || flag) && (!enumcreaturetype.e() || flag2) && (mobcnt = getEntityCount(worldserver, enumcreaturetype.a())) <= limit * this.a.size() / 256) { // Spigot - use per-world limits and use all loaded chunks
|
||||
Iterator iterator = this.a.keySet().iterator();
|
||||
|
||||
+ int moblimit = (limit * b.size() / 256) - mobcnt + 1; // Spigot - up to 1 more than limit
|
||||
label110:
|
||||
@ -106,9 +106,9 @@ index 056100f..bec0d91 100644
|
||||
// CraftBukkit start
|
||||
long key = ((Long) iterator.next()).longValue();
|
||||
|
||||
@@ -158,6 +182,13 @@ public final class SpawnerCreature {
|
||||
a(entityliving, worldserver, f, f1, f2);
|
||||
worldserver.addEntity(entityliving, SpawnReason.NATURAL);
|
||||
@@ -160,6 +184,13 @@ public final class SpawnerCreature {
|
||||
groupdataentity = entityinsentient.a(groupdataentity);
|
||||
worldserver.addEntity(entityinsentient, SpawnReason.NATURAL);
|
||||
// CraftBukkit end
|
||||
+ // Spigot start
|
||||
+ if ( --moblimit <= 0 )
|
||||
@ -117,11 +117,11 @@ index 056100f..bec0d91 100644
|
||||
+ continue label110;
|
||||
+ }
|
||||
+ // Spigot end
|
||||
if (j2 >= entityliving.by()) {
|
||||
if (j2 >= entityinsentient.br()) {
|
||||
continue label110;
|
||||
}
|
||||
diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
||||
index 0a304e8..6c2a430 100644
|
||||
index a788d8d..8bb0483 100644
|
||||
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
||||
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
||||
@@ -145,4 +145,11 @@ public class SpigotWorldConfig
|
||||
|
@ -1,14 +1,14 @@
|
||||
From 6231d399bc448b884b4b85b68f3ef632605b1ebd Mon Sep 17 00:00:00 2001
|
||||
From 98cd9362bbfa70e5639c086cca3887341b81a7a4 Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Sun, 3 Feb 2013 09:20:19 +1100
|
||||
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
|
||||
index da069f7..d4d8f04 100644
|
||||
index 75402e7..fd76af0 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -1335,6 +1335,13 @@ public abstract class World implements IBlockAccess {
|
||||
@@ -1334,6 +1334,13 @@ public abstract class World implements IBlockAccess {
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
TileEntity tileentity = (TileEntity) iterator.next();
|
||||
|
@ -1,4 +1,4 @@
|
||||
From df64c572448edbe8dcefa1eeaaccc7a389f626f7 Mon Sep 17 00:00:00 2001
|
||||
From c7558b9d826023a2080737a9231026645a9f6e6a Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Sun, 3 Feb 2013 05:10:21 -0500
|
||||
Subject: [PATCH] Entity Activation Range
|
||||
@ -9,7 +9,7 @@ This will drastically cut down on tick timings for entities that are not in rang
|
||||
This change can have dramatic impact on gameplay if configured too low. Balance according to your servers desired gameplay.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 978b6ef..438a26a 100644
|
||||
index 72c6e66..e438df5 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -88,7 +88,7 @@ public abstract class Entity {
|
||||
@ -23,7 +23,7 @@ index 978b6ef..438a26a 100644
|
||||
protected boolean fireProof;
|
||||
@@ -111,8 +111,15 @@ public abstract class Entity {
|
||||
public EnumEntitySize at;
|
||||
public boolean valid = false; // CraftBukkit
|
||||
public boolean valid; // CraftBukkit
|
||||
|
||||
+ // Spigot start
|
||||
public CustomTimingsHandler tickTimer = org.bukkit.craftbukkit.SpigotTimings.getEntityTimings(this); // Spigot
|
||||
@ -37,7 +37,7 @@ index 978b6ef..438a26a 100644
|
||||
public Entity(World world) {
|
||||
this.id = entityCount++;
|
||||
this.l = 1.0D;
|
||||
@@ -153,7 +160,12 @@ public abstract class Entity {
|
||||
@@ -131,7 +138,12 @@ public abstract class Entity {
|
||||
this.setPosition(0.0D, 0.0D, 0.0D);
|
||||
if (world != null) {
|
||||
this.dimension = world.worldProvider.dimension;
|
||||
@ -51,11 +51,11 @@ index 978b6ef..438a26a 100644
|
||||
this.datawatcher.a(0, Byte.valueOf((byte) 0));
|
||||
this.datawatcher.a(1, Short.valueOf((short) 300));
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityAgeable.java b/src/main/java/net/minecraft/server/EntityAgeable.java
|
||||
index fdc9167..16b7261 100644
|
||||
index 5ba19f3..4c73a5f 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityAgeable.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityAgeable.java
|
||||
@@ -6,6 +6,31 @@ public abstract class EntityAgeable extends EntityCreature {
|
||||
private float e;
|
||||
private float bq;
|
||||
public boolean ageLocked = false; // CraftBukkit
|
||||
|
||||
+ // Spigot start
|
||||
@ -87,25 +87,25 @@ index fdc9167..16b7261 100644
|
||||
super(world);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityArrow.java b/src/main/java/net/minecraft/server/EntityArrow.java
|
||||
index f46c920..1699059 100644
|
||||
index affeca6..f44f5e2 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityArrow.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityArrow.java
|
||||
@@ -14,7 +14,7 @@ public class EntityArrow extends Entity implements IProjectile {
|
||||
private int f = -1;
|
||||
private int g = 0;
|
||||
private int h = 0;
|
||||
- private boolean inGround = false;
|
||||
private int g;
|
||||
private int h;
|
||||
- private boolean inGround;
|
||||
+ public boolean inGround = false; // Spigot - private -> public
|
||||
public int fromPlayer = 0;
|
||||
public int shake = 0;
|
||||
public int fromPlayer;
|
||||
public int shake;
|
||||
public Entity shooter;
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
index 58a4acb..35f3fea 100644
|
||||
index 0d9ba82..f043040 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
@@ -113,6 +113,13 @@ public abstract class EntityLiving extends Entity {
|
||||
@@ -79,6 +79,13 @@ public abstract class EntityLiving extends Entity {
|
||||
public int maxAirTicks = 300;
|
||||
public int maxHealth = this.getMaxHealth();
|
||||
public float maxHealth;
|
||||
// CraftBukkit end
|
||||
+ // Spigot start
|
||||
+ public void inactiveTick()
|
||||
@ -118,10 +118,10 @@ index 58a4acb..35f3fea 100644
|
||||
public EntityLiving(World world) {
|
||||
super(world);
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 3a6a63d..5866abb 100644
|
||||
index fd76af0..039ba6e 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -1277,6 +1277,7 @@ public abstract class World implements IBlockAccess {
|
||||
@@ -1276,6 +1276,7 @@ public abstract class World implements IBlockAccess {
|
||||
this.f.clear();
|
||||
this.methodProfiler.c("regular");
|
||||
|
||||
@ -129,7 +129,7 @@ index 3a6a63d..5866abb 100644
|
||||
timings.entityTick.startTiming(); // Spigot
|
||||
for (i = 0; i < this.entityList.size(); ++i) {
|
||||
entity = (Entity) this.entityList.get(i);
|
||||
@@ -1437,8 +1438,13 @@ public abstract class World implements IBlockAccess {
|
||||
@@ -1436,8 +1437,13 @@ public abstract class World implements IBlockAccess {
|
||||
int j = MathHelper.floor(entity.locZ);
|
||||
byte b0 = 32;
|
||||
|
||||
@ -462,7 +462,7 @@ index 0000000..93ce20e
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
||||
index 6c2a430..8b2c1d7 100644
|
||||
index 8bb0483..eb721f5 100644
|
||||
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
||||
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
||||
@@ -152,4 +152,15 @@ public class SpigotWorldConfig
|
||||
|
@ -1,22 +1,22 @@
|
||||
From 3c8f2ccaa98803166178f16290fce2b8626e6ebb Mon Sep 17 00:00:00 2001
|
||||
From 4a44e729ad0a7d469c386cfa15d3cdda48f67695 Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Sat, 23 Feb 2013 12:33:20 +1100
|
||||
Subject: [PATCH] Watchdog Thread.
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index db396b3..d197f06 100644
|
||||
index f114444..399db47 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -404,6 +404,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
|
||||
this.q();
|
||||
@@ -414,6 +414,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
|
||||
this.s();
|
||||
SpigotTimings.serverTickTimer.stopTiming();
|
||||
org.spigotmc.CustomTimingsHandler.tick();
|
||||
+ org.spigotmc.WatchdogThread.tick();
|
||||
}
|
||||
// Spigot end
|
||||
} else {
|
||||
@@ -431,6 +432,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
|
||||
@@ -441,6 +442,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
|
||||
this.a(crashreport);
|
||||
} finally {
|
||||
try {
|
||||
@ -142,7 +142,7 @@ index 0000000..a5c4549
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
|
||||
index 8f53ca9..b7f3896 100644
|
||||
index 3028526..a0a7790 100644
|
||||
--- a/src/main/java/org/spigotmc/SpigotConfig.java
|
||||
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
|
||||
@@ -136,4 +136,16 @@ public class SpigotConfig
|
||||
|
@ -1,16 +1,16 @@
|
||||
From f3179d3cf334bf4a99db417230cc37b8997da4a6 Mon Sep 17 00:00:00 2001
|
||||
From a909284799fb1461906c4cc9fa866b391e16972e Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Tue, 2 Jul 2013 09:06:29 +1000
|
||||
Subject: [PATCH] Netty
|
||||
|
||||
|
||||
diff --git a/pom.xml b/pom.xml
|
||||
index 8c9f66b..f1a4d4c 100644
|
||||
index 88b41b1..cb5e36d 100644
|
||||
--- a/pom.xml
|
||||
+++ b/pom.xml
|
||||
@@ -132,6 +132,16 @@
|
||||
<artifactId>trove4j</artifactId>
|
||||
<version>3.0.2</version>
|
||||
<version>3.0.3</version>
|
||||
</dependency>
|
||||
+ <dependency>
|
||||
+ <groupId>io.netty</groupId>
|
||||
@ -26,18 +26,18 @@ index 8c9f66b..f1a4d4c 100644
|
||||
|
||||
<!-- This builds a completely 'ready to start' jar with all dependencies inside -->
|
||||
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||
index 59444cb..121ed89 100644
|
||||
index ddb32ac..ec3d104 100644
|
||||
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||
@@ -100,7 +100,11 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
|
||||
this.getLogger().info("Starting Minecraft server on " + (this.getServerIp().length() == 0 ? "*" : this.getServerIp()) + ":" + this.G());
|
||||
this.getLogger().info("Starting Minecraft server on " + (this.getServerIp().length() == 0 ? "*" : this.getServerIp()) + ":" + this.I());
|
||||
|
||||
try {
|
||||
- this.r = new DedicatedServerConnection(this, inetaddress, this.G());
|
||||
- this.s = new DedicatedServerConnection(this, inetaddress, this.I());
|
||||
+ // Spigot start
|
||||
+ this.r = ( org.spigotmc.SpigotConfig.listeners.get( 0 ).netty )
|
||||
+ ? new org.spigotmc.netty.NettyServerConnection( this, inetaddress, this.G() )
|
||||
+ : new DedicatedServerConnection( this, inetaddress, this.G() );
|
||||
+ this.s = ( org.spigotmc.SpigotConfig.listeners.get( 0 ).netty )
|
||||
+ ? new org.spigotmc.netty.NettyServerConnection( this, inetaddress, this.I() )
|
||||
+ : new DedicatedServerConnection( this, inetaddress, this.I() );
|
||||
+ // Spigot end
|
||||
} catch (Throwable ioexception) { // CraftBukkit - IOException -> Throwable
|
||||
this.getLogger().warning("**** FAILED TO BIND TO PORT!");
|
||||
@ -75,10 +75,10 @@ index 0000000..6fcc5d7
|
||||
+ void setSocketAddress(java.net.SocketAddress address); // Spigot
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java
|
||||
index 1862863..5a24f2a 100644
|
||||
index c60abf1..e1b259b 100644
|
||||
--- a/src/main/java/net/minecraft/server/NetworkManager.java
|
||||
+++ b/src/main/java/net/minecraft/server/NetworkManager.java
|
||||
@@ -24,7 +24,7 @@ public class NetworkManager implements INetworkManager {
|
||||
@@ -25,7 +25,7 @@ public class NetworkManager implements INetworkManager {
|
||||
private final Object h = new Object();
|
||||
private final IConsoleLogManager i;
|
||||
public Socket socket; // CraftBukkit - private -> public
|
||||
@ -87,7 +87,7 @@ index 1862863..5a24f2a 100644
|
||||
private volatile DataInputStream input;
|
||||
private volatile DataOutputStream output;
|
||||
private volatile boolean n = true;
|
||||
@@ -369,4 +369,6 @@ public class NetworkManager implements INetworkManager {
|
||||
@@ -370,4 +370,6 @@ public class NetworkManager implements INetworkManager {
|
||||
static Thread h(NetworkManager networkmanager) {
|
||||
return networkmanager.u;
|
||||
}
|
||||
@ -95,20 +95,20 @@ index 1862863..5a24f2a 100644
|
||||
+ public void setSocketAddress(SocketAddress address) { k = address; } // Spigot
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/PendingConnection.java b/src/main/java/net/minecraft/server/PendingConnection.java
|
||||
index 17cfacc..292fa49 100644
|
||||
index 252cea7..d0ccbff 100644
|
||||
--- a/src/main/java/net/minecraft/server/PendingConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PendingConnection.java
|
||||
@@ -17,7 +17,7 @@ public class PendingConnection extends Connection {
|
||||
@@ -16,7 +16,7 @@ public class PendingConnection extends Connection {
|
||||
private static Random random = new Random();
|
||||
private byte[] d;
|
||||
private final MinecraftServer server;
|
||||
- public final NetworkManager networkManager;
|
||||
+ public final INetworkManager networkManager;
|
||||
public boolean b = false;
|
||||
private int f = 0;
|
||||
private String g = null;
|
||||
@@ -27,10 +27,15 @@ public class PendingConnection extends Connection {
|
||||
private SecretKey k = null;
|
||||
public boolean b;
|
||||
private int f;
|
||||
private String g;
|
||||
@@ -26,10 +26,15 @@ public class PendingConnection extends Connection {
|
||||
private SecretKey k;
|
||||
public String hostname = ""; // CraftBukkit - add field
|
||||
|
||||
+ public PendingConnection(MinecraftServer minecraftserver, org.spigotmc.netty.NettyNetworkManager networkManager) {
|
||||
@ -118,33 +118,33 @@ index 17cfacc..292fa49 100644
|
||||
+
|
||||
public PendingConnection(MinecraftServer minecraftserver, Socket socket, String s) throws java.io.IOException { // CraftBukkit - throws IOException
|
||||
this.server = minecraftserver;
|
||||
this.networkManager = new NetworkManager(minecraftserver.getLogger(), socket, s, this, minecraftserver.F().getPrivate());
|
||||
this.networkManager = new NetworkManager(minecraftserver.getLogger(), socket, s, this, minecraftserver.H().getPrivate());
|
||||
- this.networkManager.e = 0;
|
||||
+ // this.networkManager.e = 0;
|
||||
}
|
||||
|
||||
// CraftBukkit start
|
||||
@@ -146,7 +151,7 @@ public class PendingConnection extends Connection {
|
||||
String s = null;
|
||||
// CraftBukkit
|
||||
org.bukkit.event.server.ServerListPingEvent pingEvent = org.bukkit.craftbukkit.event.CraftEventFactory.callServerListPingEvent(this.server.server, getSocket().getInetAddress(), this.server.getMotd(), playerlist.getPlayerCount(), playerlist.getMaxPlayers());
|
||||
|
||||
- if (packet254getinfo.a == 1) {
|
||||
+ if (true) {
|
||||
// CraftBukkit start - Fix decompile issues, don't create a list from an array
|
||||
Object[] list = new Object[] { 1, 61, this.server.getVersion(), pingEvent.getMotd(), playerlist.getPlayerCount(), pingEvent.getMaxPlayers() };
|
||||
|
||||
@@ -173,9 +178,18 @@ public class PendingConnection extends Connection {
|
||||
- if (packet254getinfo.d()) {
|
||||
+ if (galse) { // Spigot: TODO: Use trick from Bungee maybe?
|
||||
// CraftBukkit
|
||||
s = pingEvent.getMotd() + "\u00A7" + playerlist.getPlayerCount() + "\u00A7" + pingEvent.getMaxPlayers();
|
||||
} else {
|
||||
@@ -172,9 +177,18 @@ public class PendingConnection extends Connection {
|
||||
|
||||
this.networkManager.queue(new Packet255KickDisconnect(s));
|
||||
this.networkManager.d();
|
||||
- if (inetaddress != null && this.server.ae() instanceof DedicatedServerConnection) {
|
||||
- ((DedicatedServerConnection) this.server.ae()).a(inetaddress);
|
||||
- if (inetaddress != null && this.server.ag() instanceof DedicatedServerConnection) {
|
||||
- ((DedicatedServerConnection) this.server.ag()).a(inetaddress);
|
||||
+ // Spigot start
|
||||
+ if ( inetaddress != null )
|
||||
+ {
|
||||
+ if ( this.server.ae() instanceof DedicatedServerConnection )
|
||||
+ if ( this.server.ag() instanceof DedicatedServerConnection )
|
||||
+ {
|
||||
+ ((DedicatedServerConnection) this.server.ae()).a(inetaddress);
|
||||
+ ((DedicatedServerConnection) this.server.ag()).a(inetaddress);
|
||||
+ } else
|
||||
+ {
|
||||
+ ((org.spigotmc.netty.NettyServerConnection)this.server.ae()).unThrottle( inetaddress );
|
||||
|
@ -1,11 +1,11 @@
|
||||
From f52dba2bbbe1ac2d868fc37d95d8a33e4e17a46e Mon Sep 17 00:00:00 2001
|
||||
From 56e4b96d211d5e45d14982673922397d775ab22d Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Mon, 4 Mar 2013 18:45:52 +1100
|
||||
Subject: [PATCH] PlayerItemDamageEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java
|
||||
index 343b8cb..9c2fce6 100644
|
||||
index f42f162..3a3fc27 100644
|
||||
--- a/src/main/java/net/minecraft/server/ItemStack.java
|
||||
+++ b/src/main/java/net/minecraft/server/ItemStack.java
|
||||
@@ -178,7 +178,13 @@ public final class ItemStack {
|
||||
@ -44,11 +44,11 @@ index 343b8cb..9c2fce6 100644
|
||||
public void damage(int i, EntityLiving entityliving) {
|
||||
if (!(entityliving instanceof EntityHuman) || !((EntityHuman) entityliving).abilities.canInstantlyBuild) {
|
||||
if (this.g()) {
|
||||
- if (this.isDamaged(i, entityliving.aE())) {
|
||||
+ if (this.isDamaged(i, entityliving.aE(), entityliving)) {
|
||||
- if (this.isDamaged(i, entityliving.aB())) {
|
||||
+ if (this.isDamaged(i, entityliving.aB(), entityliving)) {
|
||||
entityliving.a(this);
|
||||
--this.count;
|
||||
if (entityliving instanceof EntityHuman) {
|
||||
((EntityHuman) entityliving).a(StatisticList.F[this.id], 1);
|
||||
--
|
||||
1.8.1.2
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From dbd0d8f7e14ce0dbe01087ea315ef44fc26193ab Mon Sep 17 00:00:00 2001
|
||||
From f5c31d0e676d9ca15e19cf5e4468de0e1800a9d0 Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Sun, 17 Mar 2013 19:02:50 +1100
|
||||
Subject: [PATCH] Faster UUID for entities
|
||||
@ -6,13 +6,13 @@ Subject: [PATCH] Faster UUID for entities
|
||||
It is overkill to create a new SecureRandom on each entity create and then use it to make a new Entity ID for every entity instance created. Instead we will just use a pseudo random UUID based off the random instance we already have.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 438a26a..97b2522 100644
|
||||
index e438df5..700e450 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -154,7 +154,7 @@ public abstract class Entity {
|
||||
this.ai = false;
|
||||
this.as = 0;
|
||||
this.invulnerable = false;
|
||||
@@ -132,7 +132,7 @@ public abstract class Entity {
|
||||
this.maxFireTicks = 1;
|
||||
this.justCreated = true;
|
||||
this.datawatcher = new DataWatcher();
|
||||
- this.uniqueID = UUID.randomUUID();
|
||||
+ this.uniqueID = new UUID(random.nextLong(), random.nextLong()); // Spigot
|
||||
this.at = EnumEntitySize.SIZE_2;
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 17fbd3f0e6586b3b59b8bbd9f4327e4a09512b24 Mon Sep 17 00:00:00 2001
|
||||
From 448c1c548527355aff640dca36ca4cc9813580c7 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Wed, 20 Feb 2013 11:58:47 -0500
|
||||
Subject: [PATCH] Entity Tracking Ranges
|
||||
@ -12,10 +12,10 @@ 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.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityTracker.java b/src/main/java/net/minecraft/server/EntityTracker.java
|
||||
index d7efe3e..59586c2 100644
|
||||
index 7f23f71..7bb153c 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityTracker.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityTracker.java
|
||||
@@ -90,6 +90,7 @@ public class EntityTracker {
|
||||
@@ -88,6 +88,7 @@ public class EntityTracker {
|
||||
|
||||
public void addEntity(Entity entity, int i, int j, boolean flag) {
|
||||
if (Thread.currentThread() != MinecraftServer.getServer().primaryThread) throw new IllegalStateException("Asynchronous entity track!"); // Spigot
|
||||
@ -24,7 +24,7 @@ index d7efe3e..59586c2 100644
|
||||
i = this.d;
|
||||
}
|
||||
diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
||||
index 8b2c1d7..89d716c 100644
|
||||
index eb721f5..820c576 100644
|
||||
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
||||
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
||||
@@ -163,4 +163,19 @@ public class SpigotWorldConfig
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 6475f2a601cf734bf3e5d7b3971fd1c44a60d75f Mon Sep 17 00:00:00 2001
|
||||
From fbdeb351e9e22395803d7563bb347cce2eb722eb Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Sat, 23 Mar 2013 11:15:11 +1100
|
||||
Subject: [PATCH] BungeeCord Support
|
||||
@ -6,10 +6,10 @@ Subject: [PATCH] BungeeCord Support
|
||||
- Allows BungeeCord to set the players real IP address very early in the login process, so that the BungeeCord proxy IP is never even seen by a plugin.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PendingConnection.java b/src/main/java/net/minecraft/server/PendingConnection.java
|
||||
index 292fa49..ff32606 100644
|
||||
index d0ccbff..6308331 100644
|
||||
--- a/src/main/java/net/minecraft/server/PendingConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PendingConnection.java
|
||||
@@ -228,4 +228,17 @@ public class PendingConnection extends Connection {
|
||||
@@ -227,4 +227,17 @@ public class PendingConnection extends Connection {
|
||||
static boolean a(PendingConnection pendingconnection, boolean flag) {
|
||||
return pendingconnection.h = flag;
|
||||
}
|
||||
@ -28,12 +28,12 @@ index 292fa49..ff32606 100644
|
||||
+ // Spigot end
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
index b7e327b..30c6503 100644
|
||||
index b98a078..018feb2 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
@@ -293,7 +293,7 @@ public abstract class PlayerList {
|
||||
// depending on the outcome.
|
||||
EntityPlayer entity = new EntityPlayer(this.server, this.server.getWorldServer(0), s, this.server.M() ? new DemoPlayerInteractManager(this.server.getWorldServer(0)) : new PlayerInteractManager(this.server.getWorldServer(0)));
|
||||
EntityPlayer entity = new EntityPlayer(this.server, this.server.getWorldServer(0), s, this.server.O() ? new DemoPlayerInteractManager(this.server.getWorldServer(0)) : new PlayerInteractManager(this.server.getWorldServer(0)));
|
||||
Player player = entity.getBukkitEntity();
|
||||
- PlayerLoginEvent event = new PlayerLoginEvent(player, hostname, pendingconnection.getSocket().getInetAddress());
|
||||
+ PlayerLoginEvent event = new PlayerLoginEvent(player, hostname, ((java.net.InetSocketAddress) pendingconnection.networkManager.getSocketAddress()).getAddress(), pendingconnection.getSocket().getInetAddress()); // Spigot
|
||||
@ -41,7 +41,7 @@ index b7e327b..30c6503 100644
|
||||
SocketAddress socketaddress = pendingconnection.networkManager.getSocketAddress();
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/ThreadLoginVerifier.java b/src/main/java/net/minecraft/server/ThreadLoginVerifier.java
|
||||
index 1254e63..a4eae65 100644
|
||||
index f87ebf9..f5032be 100644
|
||||
--- a/src/main/java/net/minecraft/server/ThreadLoginVerifier.java
|
||||
+++ b/src/main/java/net/minecraft/server/ThreadLoginVerifier.java
|
||||
@@ -45,11 +45,11 @@ class ThreadLoginVerifier extends Thread {
|
||||
@ -59,10 +59,10 @@ index 1254e63..a4eae65 100644
|
||||
event.disallow(asyncEvent.getResult(), asyncEvent.getKickMessage());
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 7cae665..21141f2 100644
|
||||
index b3bb702..b81a07e 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -998,6 +998,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -1002,6 +1002,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
// Spigot start
|
||||
private final Spigot spigot = new Spigot()
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 2f81e3294321a9bfcb00956f75bb54ea5cdfecf5 Mon Sep 17 00:00:00 2001
|
||||
From 56ce9a93bd0f4a45c2168bfc323a62ddfb23b405 Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Sat, 23 Mar 2013 19:08:41 +1100
|
||||
Subject: [PATCH] Limit Custom Map Rendering
|
||||
@ -6,10 +6,10 @@ Subject: [PATCH] Limit Custom Map Rendering
|
||||
The default CraftBukkit render sequence for maps is ridiculously slow. By only using it when a custom renderer has been added (rarely in most cases), we can fallback to the Vanilla renderer for general usage. This leads to a much higher effiency overall, especially if no plugins are rendering such maps.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldMapHumanTracker.java b/src/main/java/net/minecraft/server/WorldMapHumanTracker.java
|
||||
index bf3e6fe..305dceb 100644
|
||||
index 22d9c7e..bed8705 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldMapHumanTracker.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldMapHumanTracker.java
|
||||
@@ -41,23 +41,29 @@ public class WorldMapHumanTracker {
|
||||
@@ -38,23 +38,29 @@ public class WorldMapHumanTracker {
|
||||
int i;
|
||||
int j;
|
||||
|
||||
@ -46,8 +46,8 @@ index bf3e6fe..305dceb 100644
|
||||
+ // Spigot end
|
||||
// CraftBukkit end
|
||||
|
||||
boolean flag = !itemstack.z();
|
||||
@@ -92,7 +98,7 @@ public class WorldMapHumanTracker {
|
||||
boolean flag = !itemstack.A();
|
||||
@@ -89,7 +95,7 @@ public class WorldMapHumanTracker {
|
||||
abyte1[2] = (byte) j;
|
||||
|
||||
for (int i1 = 0; i1 < abyte1.length - 3; ++i1) {
|
||||
|
@ -1,14 +1,14 @@
|
||||
From 093c26055d78b7e52e6653e47dc73ae765decf5c Mon Sep 17 00:00:00 2001
|
||||
From 20feb3e62fef472d80e0685dc55b74ea8ad90675 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Sun, 24 Feb 2013 20:45:20 +1100
|
||||
Subject: [PATCH] Enable Improved Ping Sending
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
index 7de5b48..35a579c 100644
|
||||
index 094da96..8d7a59a 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
@@ -51,6 +51,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@@ -52,6 +52,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
public int newLevel = 0;
|
||||
public int newTotalExp = 0;
|
||||
public boolean keepLevel = false;
|
||||
@ -17,11 +17,11 @@ index 7de5b48..35a579c 100644
|
||||
|
||||
public EntityPlayer(MinecraftServer minecraftserver, World world, String s, PlayerInteractManager playerinteractmanager) {
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
index 30c6503..1891308 100644
|
||||
index 018feb2..0e5bf6c 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
@@ -717,6 +717,25 @@ public abstract class PlayerList {
|
||||
this.sendAll(new Packet201PlayerInfo(entityplayer.name, true, entityplayer.ping));
|
||||
this.sendAll(new Packet201PlayerInfo(entityplayer.getName(), true, entityplayer.ping));
|
||||
}
|
||||
// CraftBukkit end */
|
||||
+ // Spigot start
|
||||
|
@ -1,27 +1,28 @@
|
||||
From 47e90e4e5c72a105ff5b9901ef6929ef7511d1fb Mon Sep 17 00:00:00 2001
|
||||
From 8612d2a39a8fe4631c5c38810989282e65cba8af Mon Sep 17 00:00:00 2001
|
||||
From: Benjamin James Harrison-Sims <tehrainbowguy@gmail.com>
|
||||
Date: Sun, 14 Apr 2013 21:19:57 +0500
|
||||
Subject: [PATCH] Filter Invalid Names
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Packet2Handshake.java b/src/main/java/net/minecraft/server/Packet2Handshake.java
|
||||
index 343af93..26de0b5 100644
|
||||
index 1e7bad0..f25afb6 100644
|
||||
--- a/src/main/java/net/minecraft/server/Packet2Handshake.java
|
||||
+++ b/src/main/java/net/minecraft/server/Packet2Handshake.java
|
||||
@@ -14,11 +14,13 @@ public class Packet2Handshake extends Packet {
|
||||
@@ -14,11 +14,14 @@ public class Packet2Handshake extends Packet {
|
||||
|
||||
public Packet2Handshake() {}
|
||||
|
||||
+ public static final java.util.regex.Pattern validName = java.util.regex.Pattern.compile("^[a-zA-Z0-9_-]{2,16}$");
|
||||
public void a(DataInputStream datainputstream) throws IOException { // CraftBukkit - throws IOException
|
||||
this.a = datainputstream.readByte();
|
||||
this.b = a(datainputstream, 16);
|
||||
this.c = a(datainputstream, 255);
|
||||
this.d = datainputstream.readInt();
|
||||
public void a(DataInput datainput) throws IOException { // CraftBukkit - throws IOException
|
||||
this.a = datainput.readByte();
|
||||
this.b = a(datainput, 16);
|
||||
this.c = a(datainput, 255);
|
||||
this.d = datainput.readInt();
|
||||
+ // Spigot: TODO: md_5 hates this
|
||||
+ if(!validName.matcher(this.b).matches()) throw new IOException("Invalid name!"); // Spigot
|
||||
}
|
||||
|
||||
public void a(DataOutputStream dataoutputstream) throws IOException { // CraftBukkit - throws IOException
|
||||
public void a(DataOutput dataoutput) throws IOException { // CraftBukkit - throws IOException
|
||||
--
|
||||
1.8.1.2
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 3ffe256945a7df36f9b9fe08be2b44547d8e9c14 Mon Sep 17 00:00:00 2001
|
||||
From d94b6e73ee42e11ee17ac1790d326da128236375 Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Tue, 23 Apr 2013 11:50:27 +1000
|
||||
Subject: [PATCH] Thread Naming and Tweaks
|
||||
@ -6,13 +6,13 @@ Subject: [PATCH] Thread Naming and Tweaks
|
||||
Removes the sleep forever thread and adds useful names for debugging to all staged thread files.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||
index b2a4229..2a6250d 100644
|
||||
index ec3d104..ccbd6bc 100644
|
||||
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||
@@ -34,7 +34,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
|
||||
super(options);
|
||||
// CraftBukkit end
|
||||
this.l = new ConsoleLogManager("Minecraft-Server", (String) null, (String) null); // CraftBukkit - null last argument
|
||||
this.m = new ConsoleLogManager("Minecraft-Server", (String) null, (String) null); // CraftBukkit - null last argument
|
||||
- new ThreadSleepForever(this);
|
||||
+ // new ThreadSleepForever(this);
|
||||
}
|
||||
@ -31,7 +31,7 @@ index 489e184..bfd219c 100644
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/ThreadLoginVerifier.java b/src/main/java/net/minecraft/server/ThreadLoginVerifier.java
|
||||
index a4eae65..496cfe4 100644
|
||||
index f5032be..5e45cae 100644
|
||||
--- a/src/main/java/net/minecraft/server/ThreadLoginVerifier.java
|
||||
+++ b/src/main/java/net/minecraft/server/ThreadLoginVerifier.java
|
||||
@@ -21,6 +21,7 @@ class ThreadLoginVerifier extends Thread {
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 79812d32f7cfef51de310b72ed9eb59410395573 Mon Sep 17 00:00:00 2001
|
||||
From ee7f3f6e22ddeacbad8b9ec13b96870fe585dbe2 Mon Sep 17 00:00:00 2001
|
||||
From: Mike Primm <mike@primmhome.com>
|
||||
Date: Wed, 24 Apr 2013 01:43:33 -0500
|
||||
Subject: [PATCH] Improve NextTickList Performance
|
||||
@ -20,7 +20,7 @@ index 52a70a1..08a4240 100644
|
||||
|
||||
public NextTickListEntry a(long i) {
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index 69d955f..7cdb549 100644
|
||||
index b7e0551..1b69737 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -25,8 +25,8 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
|
||||
@ -34,17 +34,17 @@ index 69d955f..7cdb549 100644
|
||||
public ChunkProviderServer chunkProviderServer;
|
||||
public boolean savingDisabled;
|
||||
private boolean N;
|
||||
@@ -35,7 +35,8 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
|
||||
private NoteDataList[] Q = new NoteDataList[] { new NoteDataList((EmptyClass2) null), new NoteDataList((EmptyClass2) null)};
|
||||
private int R = 0;
|
||||
private static final StructurePieceTreasure[] S = new StructurePieceTreasure[] { new StructurePieceTreasure(Item.STICK.id, 0, 1, 3, 10), new StructurePieceTreasure(Block.WOOD.id, 0, 1, 3, 10), new StructurePieceTreasure(Block.LOG.id, 0, 1, 3, 10), new StructurePieceTreasure(Item.STONE_AXE.id, 0, 1, 1, 3), new StructurePieceTreasure(Item.WOOD_AXE.id, 0, 1, 1, 5), new StructurePieceTreasure(Item.STONE_PICKAXE.id, 0, 1, 1, 3), new StructurePieceTreasure(Item.WOOD_PICKAXE.id, 0, 1, 1, 5), new StructurePieceTreasure(Item.APPLE.id, 0, 2, 3, 5), new StructurePieceTreasure(Item.BREAD.id, 0, 2, 3, 3)};
|
||||
- private ArrayList T = new ArrayList();
|
||||
@@ -36,7 +36,8 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
|
||||
private NoteDataList[] R = new NoteDataList[] { new NoteDataList((EmptyClass2) null), new NoteDataList((EmptyClass2) null)};
|
||||
private int S;
|
||||
private static final StructurePieceTreasure[] T = new StructurePieceTreasure[] { new StructurePieceTreasure(Item.STICK.id, 0, 1, 3, 10), new StructurePieceTreasure(Block.WOOD.id, 0, 1, 3, 10), new StructurePieceTreasure(Block.LOG.id, 0, 1, 3, 10), new StructurePieceTreasure(Item.STONE_AXE.id, 0, 1, 1, 3), new StructurePieceTreasure(Item.WOOD_AXE.id, 0, 1, 1, 5), new StructurePieceTreasure(Item.STONE_PICKAXE.id, 0, 1, 1, 3), new StructurePieceTreasure(Item.WOOD_PICKAXE.id, 0, 1, 1, 5), new StructurePieceTreasure(Item.APPLE.id, 0, 2, 3, 5), new StructurePieceTreasure(Item.BREAD.id, 0, 2, 3, 3)};
|
||||
- private List U = new ArrayList();
|
||||
+ private ArrayList<NextTickListEntry> pendingTickEntries = new ArrayList<NextTickListEntry>(); // Spigot
|
||||
+ private int nextPendingTickEntry; // Spigot
|
||||
private IntHashMap entitiesById;
|
||||
|
||||
// CraftBukkit start
|
||||
@@ -53,13 +54,15 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
|
||||
@@ -54,13 +55,15 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
|
||||
this.entitiesById = new IntHashMap();
|
||||
}
|
||||
|
||||
@ -64,13 +64,13 @@ index 69d955f..7cdb549 100644
|
||||
|
||||
this.P = new org.bukkit.craftbukkit.CraftTravelAgent(this); // CraftBukkit
|
||||
this.scoreboard = new ScoreboardServer(minecraftserver);
|
||||
@@ -441,9 +444,16 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
|
||||
@@ -440,9 +443,16 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
|
||||
}
|
||||
|
||||
public boolean a(int i, int j, int k, int l) {
|
||||
- NextTickListEntry nextticklistentry = new NextTickListEntry(i, j, k, l);
|
||||
-
|
||||
- return this.T.contains(nextticklistentry);
|
||||
- return this.U.contains(nextticklistentry);
|
||||
+ // Spigot start
|
||||
+ int te_cnt = this.pendingTickEntries.size();
|
||||
+ for (int idx = this.nextPendingTickEntry; idx < te_cnt; idx++) {
|
||||
@ -141,7 +141,7 @@ index 69d955f..7cdb549 100644
|
||||
|
||||
- this.M.remove(nextticklistentry);
|
||||
- this.L.remove(nextticklistentry);
|
||||
- this.T.add(nextticklistentry);
|
||||
- this.U.add(nextticklistentry);
|
||||
+ // Spigot start
|
||||
+ this.removeNextTickIfNeeded(nextticklistentry);
|
||||
+ this.pendingTickEntries.add(nextticklistentry);
|
||||
@ -150,7 +150,7 @@ index 69d955f..7cdb549 100644
|
||||
|
||||
this.methodProfiler.b();
|
||||
this.methodProfiler.a("ticking");
|
||||
- Iterator iterator = this.T.iterator();
|
||||
- Iterator iterator = this.U.iterator();
|
||||
-
|
||||
- while (iterator.hasNext()) {
|
||||
- nextticklistentry = (NextTickListEntry) iterator.next();
|
||||
@ -167,7 +167,7 @@ index 69d955f..7cdb549 100644
|
||||
}
|
||||
|
||||
this.methodProfiler.b();
|
||||
- this.T.clear();
|
||||
- this.U.clear();
|
||||
- return !this.M.isEmpty();
|
||||
- }
|
||||
+ // Spigot start
|
||||
@ -192,10 +192,10 @@ index 69d955f..7cdb549 100644
|
||||
- if (i1 == 0) {
|
||||
- iterator = this.M.iterator();
|
||||
- } else {
|
||||
- iterator = this.T.iterator();
|
||||
- iterator = this.U.iterator();
|
||||
- /* CraftBukkit start - Comment out debug spam
|
||||
- if (!this.T.isEmpty()) {
|
||||
- System.out.println(this.T.size());
|
||||
- if (!this.U.isEmpty()) {
|
||||
- System.out.println(this.U.size());
|
||||
- }
|
||||
- // CraftBukkit end */
|
||||
- }
|
||||
@ -224,8 +224,8 @@ index 69d955f..7cdb549 100644
|
||||
+ // Spigot end
|
||||
}
|
||||
|
||||
public void entityJoinedWorld(Entity entity, boolean flag) {
|
||||
@@ -703,13 +679,15 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
|
||||
/* CraftBukkit start - We prevent spawning in general, so this butchering is not needed
|
||||
@@ -712,13 +688,15 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
|
||||
this.entitiesById = new IntHashMap();
|
||||
}
|
||||
|
||||
@ -245,7 +245,7 @@ index 69d955f..7cdb549 100644
|
||||
|
||||
this.b(worldsettings);
|
||||
super.a(worldsettings);
|
||||
@@ -996,4 +974,62 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
|
||||
@@ -1005,4 +983,62 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
|
||||
return this.setTypeIdAndData(x, y, z, typeId, data, 3);
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 584fae45430e0fd52bcdb5742ca77f893a862264 Mon Sep 17 00:00:00 2001
|
||||
From ee9df7fc1702b48e1080b8ebeb07ce65a910e214 Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Sat, 1 Jun 2013 16:34:38 +1000
|
||||
Subject: [PATCH] Recipe Deconstruction
|
||||
@ -17,7 +17,7 @@ index bb28c12..c0836e4 100644
|
||||
+ 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
|
||||
index a70b828..6d0c8ca 100644
|
||||
index 8f4246b..ac92050 100644
|
||||
--- a/src/main/java/net/minecraft/server/ShapedRecipes.java
|
||||
+++ b/src/main/java/net/minecraft/server/ShapedRecipes.java
|
||||
@@ -10,7 +10,7 @@ public class ShapedRecipes implements IRecipe {
|
||||
@ -27,7 +27,7 @@ index a70b828..6d0c8ca 100644
|
||||
- private ItemStack result;
|
||||
+ public ItemStack result; // Spigot
|
||||
public final int a;
|
||||
private boolean f = false;
|
||||
private boolean f;
|
||||
|
||||
@@ -158,4 +158,11 @@ public class ShapedRecipes implements IRecipe {
|
||||
this.f = true;
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 5537a2a1c5596e5df2f5f3d9c953f46ef7e3d372 Mon Sep 17 00:00:00 2001
|
||||
From 0a26bbedcd04bb3f6da1e48107710865af35feed Mon Sep 17 00:00:00 2001
|
||||
From: Nick Minkler <sleaker@gmail.com>
|
||||
Date: Sun, 2 Jun 2013 14:54:11 +1000
|
||||
Subject: [PATCH] Fix Health Scaling
|
||||
@ -6,12 +6,12 @@ Subject: [PATCH] Fix Health Scaling
|
||||
Fix scaled health sending incorrect values to client. No longer attempts to scale health above maximum. Hopefully fixes 'flash' when player eats food.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
index 35f3fea..ae9415c 100644
|
||||
index f043040..e0bb0a5 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
@@ -423,7 +423,10 @@ public abstract class EntityLiving extends Entity {
|
||||
@@ -251,7 +251,10 @@ public abstract class EntityLiving extends Entity {
|
||||
|
||||
public int getScaledHealth() {
|
||||
public float getScaledHealth() {
|
||||
if (this.maxHealth != this.getMaxHealth() && this.getHealth() > 0) {
|
||||
- return this.getHealth() * this.getMaxHealth() / this.maxHealth + 1;
|
||||
+ // Spigot start
|
||||
@ -22,7 +22,7 @@ index 35f3fea..ae9415c 100644
|
||||
return this.getHealth();
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/FoodMetaData.java b/src/main/java/net/minecraft/server/FoodMetaData.java
|
||||
index f26d552..8fcdbae 100644
|
||||
index 543a430..fcf359b 100644
|
||||
--- a/src/main/java/net/minecraft/server/FoodMetaData.java
|
||||
+++ b/src/main/java/net/minecraft/server/FoodMetaData.java
|
||||
@@ -39,7 +39,8 @@ public class FoodMetaData {
|
||||
@ -36,7 +36,7 @@ index f26d552..8fcdbae 100644
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/ItemFood.java b/src/main/java/net/minecraft/server/ItemFood.java
|
||||
index 409addf..c8a7f41 100644
|
||||
index 5b77fc7..56eab3f 100644
|
||||
--- a/src/main/java/net/minecraft/server/ItemFood.java
|
||||
+++ b/src/main/java/net/minecraft/server/ItemFood.java
|
||||
@@ -36,7 +36,8 @@ public class ItemFood extends Item {
|
||||
@ -48,7 +48,7 @@ index 409addf..c8a7f41 100644
|
||||
+ ((EntityPlayer) entityhuman).playerConnection.sendPacket(new Packet8UpdateHealth(((EntityPlayer) entityhuman).getScaledHealth(), entityhuman.getFoodData().foodLevel, entityhuman.getFoodData().saturationLevel));
|
||||
// CraftBukkit end
|
||||
|
||||
world.makeSound(entityhuman, "random.burp", 0.5F, world.random.nextFloat() * 0.1F + 0.9F);
|
||||
entityhuman.getFoodData().a(this);
|
||||
--
|
||||
1.8.1.2
|
||||
|
||||
|
@ -1,15 +1,15 @@
|
||||
From 88def699bf4f7a11ff3764f0ecd9831c162ad0e2 Mon Sep 17 00:00:00 2001
|
||||
From 9de57bd9b69a1c413d231f763ad5d2eeee1ee37f Mon Sep 17 00:00:00 2001
|
||||
From: Nick Minkler <sleaker@gmail.com>
|
||||
Date: Sun, 2 Jun 2013 15:04:37 +1000
|
||||
Subject: [PATCH] Fix EntityShootBowEvent with Skeletons
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntitySkeleton.java b/src/main/java/net/minecraft/server/EntitySkeleton.java
|
||||
index 9494627..dba2257 100644
|
||||
index e5db8a1..e175344 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntitySkeleton.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntitySkeleton.java
|
||||
@@ -245,9 +245,21 @@ public class EntitySkeleton extends EntityMonster implements IRangedEntity {
|
||||
if (EnchantmentManager.getEnchantmentLevel(Enchantment.ARROW_FIRE.id, this.bG()) > 0 || this.getSkeletonType() == 1) {
|
||||
@@ -242,9 +242,21 @@ public class EntitySkeleton extends EntityMonster implements IRangedEntity {
|
||||
if (EnchantmentManager.getEnchantmentLevel(Enchantment.ARROW_FIRE.id, this.aV()) > 0 || this.getSkeletonType() == 1) {
|
||||
entityarrow.setOnFire(100);
|
||||
}
|
||||
+ // Spigot - Skeletons should throw EntityShootBowEvents
|
||||
@ -25,7 +25,7 @@ index 9494627..dba2257 100644
|
||||
+ }
|
||||
+ // Spigot end
|
||||
|
||||
this.makeSound("random.bow", 1.0F, 1.0F / (this.aE().nextFloat() * 0.4F + 0.8F));
|
||||
this.makeSound("random.bow", 1.0F, 1.0F / (this.aB().nextFloat() * 0.4F + 0.8F));
|
||||
- this.world.addEntity(entityarrow);
|
||||
+ // this.world.addEntity(entityarrow); // Spigot - moved up
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
From d1725f257553f7abf4fa2f13734713972b756b06 Mon Sep 17 00:00:00 2001
|
||||
From e35ea6d5ff7784e40efa156226e52ffae59afe4a Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Sun, 2 Jun 2013 16:14:30 +1000
|
||||
Subject: [PATCH] Particle API
|
||||
@ -43,7 +43,7 @@ index 7de0de5..7eca388 100644
|
||||
datavalue = 0;
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index edc59b1..0778a66 100644
|
||||
index 8508d22..9da1a47 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -766,31 +766,21 @@ public class CraftWorld implements World {
|
||||
@ -152,7 +152,7 @@ index edc59b1..0778a66 100644
|
||||
|
||||
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
|
||||
index 21141f2..feed78e 100644
|
||||
index b81a07e..011b5fa 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -266,13 +266,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@ -191,7 +191,7 @@ index 21141f2..feed78e 100644
|
||||
}
|
||||
|
||||
public void sendBlockChange(Location loc, Material material, byte data) {
|
||||
@@ -1003,6 +1006,43 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -1007,6 +1010,43 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
{
|
||||
return ( getHandle().playerConnection == null ) ? null : (InetSocketAddress) getHandle().playerConnection.networkManager.getSocket().getRemoteSocketAddress();
|
||||
}
|
||||
|
@ -1,16 +1,16 @@
|
||||
From 2a158ef53f85cf5004c22e680bfe80dcd1f4f573 Mon Sep 17 00:00:00 2001
|
||||
From db80377236dd2416e98541e7c4b5c0bdf6de28b5 Mon Sep 17 00:00:00 2001
|
||||
From: DerFlash <bte@freenet.de>
|
||||
Date: Sun, 2 Jun 2013 16:23:46 +1000
|
||||
Subject: [PATCH] Hopper Cooldowns
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/TileEntityHopper.java b/src/main/java/net/minecraft/server/TileEntityHopper.java
|
||||
index f6d269d..1f69c7b 100644
|
||||
index 054cea4..37e8f3c 100644
|
||||
--- a/src/main/java/net/minecraft/server/TileEntityHopper.java
|
||||
+++ b/src/main/java/net/minecraft/server/TileEntityHopper.java
|
||||
@@ -181,16 +181,19 @@ public class TileEntityHopper extends TileEntity implements IHopper {
|
||||
boolean flag = this.u() | suckInItems(this);
|
||||
@@ -182,16 +182,19 @@ public class TileEntityHopper extends TileEntity implements IHopper {
|
||||
|
||||
flag = suckInItems(this) || flag;
|
||||
if (flag) {
|
||||
- this.c(8);
|
||||
+ this.c(world.spigotConfig.hopperTransfer); // Spigot
|
||||
@ -33,7 +33,7 @@ index f6d269d..1f69c7b 100644
|
||||
}
|
||||
|
||||
private boolean u() {
|
||||
@@ -217,7 +220,7 @@ public class TileEntityHopper extends TileEntity implements IHopper {
|
||||
@@ -218,7 +221,7 @@ public class TileEntityHopper extends TileEntity implements IHopper {
|
||||
this.getWorld().getServer().getPluginManager().callEvent(event);
|
||||
if (event.isCancelled()) {
|
||||
this.setItem(i, itemstack);
|
||||
@ -42,29 +42,29 @@ index f6d269d..1f69c7b 100644
|
||||
return false;
|
||||
}
|
||||
ItemStack itemstack1 = addItem(iinventory, CraftItemStack.asNMSCopy(event.getItem()), Facing.OPPOSITE_FACING[BlockHopper.c(this.p())]);
|
||||
@@ -298,9 +301,9 @@ public class TileEntityHopper extends TileEntity implements IHopper {
|
||||
@@ -299,9 +302,9 @@ public class TileEntityHopper extends TileEntity implements IHopper {
|
||||
iinventory.setItem(i, itemstack1);
|
||||
|
||||
if (ihopper instanceof TileEntityHopper) {
|
||||
- ((TileEntityHopper) ihopper).c(8); // Delay hopper checks
|
||||
+ ((TileEntityHopper) ihopper).c(ihopper.getWorld().spigotConfig.hopperTransfer); // Spigot
|
||||
} else if (ihopper instanceof EntityMinecartHopper) {
|
||||
- ((EntityMinecartHopper) ihopper).n(4); // Delay hopper minecart checks
|
||||
- ((EntityMinecartHopper) ihopper).l(4); // Delay hopper minecart checks
|
||||
+ ((EntityMinecartHopper) ihopper).n(ihopper.getWorld().spigotConfig.hopperTransfer / 2); // Spigot
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -404,7 +407,7 @@ public class TileEntityHopper extends TileEntity implements IHopper {
|
||||
@@ -405,7 +408,7 @@ public class TileEntityHopper extends TileEntity implements IHopper {
|
||||
|
||||
if (flag) {
|
||||
if (iinventory instanceof TileEntityHopper) {
|
||||
- ((TileEntityHopper) iinventory).c(8);
|
||||
+ ((TileEntityHopper) iinventory).c(((TileEntityHopper) iinventory).world.spigotConfig.hopperTransfer); // Spigot
|
||||
iinventory.update();
|
||||
}
|
||||
|
||||
iinventory.update();
|
||||
diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
||||
index 89d716c..8f13fa9 100644
|
||||
index 820c576..56af938 100644
|
||||
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
||||
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
||||
@@ -178,4 +178,13 @@ public class SpigotWorldConfig
|
||||
|
@ -1,4 +1,4 @@
|
||||
From c18ceeae093ea461e065fbea7051ab0917bf29dd Mon Sep 17 00:00:00 2001
|
||||
From dd5a9e11c5991ac7ffc5f7fec36058d353ca9418 Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Tue, 11 Jun 2013 11:54:32 +1000
|
||||
Subject: [PATCH] Prevent Shutdown Hang
|
||||
@ -6,10 +6,10 @@ Subject: [PATCH] Prevent Shutdown Hang
|
||||
Prevents server hanging if players disconnect during the shutdown sequence.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
index 1891308..fe846af 100644
|
||||
index 0e5bf6c..1276ec4 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
@@ -1067,7 +1067,14 @@ public abstract class PlayerList {
|
||||
@@ -1061,7 +1061,14 @@ public abstract class PlayerList {
|
||||
|
||||
public void r() {
|
||||
while (!this.players.isEmpty()) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 6257069117c3870c0b8640386252867a3f4f5c0a Mon Sep 17 00:00:00 2001
|
||||
From d16b6fed78847a022e2898b61512adc00a86f6ac Mon Sep 17 00:00:00 2001
|
||||
From: Andy Shulman <andy.shulman@hotmail.com>
|
||||
Date: Mon, 15 Apr 2013 20:06:37 -0500
|
||||
Subject: [PATCH] Implement SpawnerSpawnEvent.
|
||||
@ -6,7 +6,7 @@ Subject: [PATCH] Implement SpawnerSpawnEvent.
|
||||
Adds BUKKIT-267
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
|
||||
index 4ba4735..d860c88 100644
|
||||
index 108b375..4edd5e3 100644
|
||||
--- a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
|
||||
+++ b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
|
||||
@@ -5,7 +5,11 @@ import java.util.Collection;
|
||||
@ -30,13 +30,13 @@ index 4ba4735..d860c88 100644
|
||||
+ // CraftBukkit start - call SpawnerSpawnEvent, abort if cancelled
|
||||
+ SpawnerSpawnEvent event = CraftEventFactory.callSpawnerSpawnEvent(entity, this.b(), this.c(), this.d());
|
||||
+ if (!event.isCancelled()) {
|
||||
+ entity.world.addEntity(entity, CreatureSpawnEvent.SpawnReason.SPAWNER);
|
||||
+ entity.world.addEntity(entity, CreatureSpawnEvent.SpawnReason.SPAWNER); // CraftBukkit
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
}
|
||||
|
||||
NBTTagCompound nbttagcompound1;
|
||||
@@ -150,6 +159,12 @@ public abstract class MobSpawnerAbstract {
|
||||
@@ -150,6 +159,11 @@ public abstract class MobSpawnerAbstract {
|
||||
|
||||
entity2.f(nbttagcompound2);
|
||||
entity2.setPositionRotation(entity1.locX, entity1.locY, entity1.locZ, entity1.yaw, entity1.pitch);
|
||||
@ -45,29 +45,28 @@ index 4ba4735..d860c88 100644
|
||||
+ if (event.isCancelled()) {
|
||||
+ continue;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
this.a().addEntity(entity2, CreatureSpawnEvent.SpawnReason.SPAWNER); // CraftBukkit);
|
||||
entity1.mount(entity2);
|
||||
}
|
||||
@@ -158,7 +173,12 @@ public abstract class MobSpawnerAbstract {
|
||||
if (entity.world != null) {
|
||||
entity.world.addEntity(entity2, CreatureSpawnEvent.SpawnReason.SPAWNER); // CraftBukkit
|
||||
}
|
||||
@@ -161,7 +175,12 @@ public abstract class MobSpawnerAbstract {
|
||||
}
|
||||
} else if (entity instanceof EntityLiving && entity.world != null) {
|
||||
((EntityLiving) entity).bJ();
|
||||
- this.a().addEntity(entity, CreatureSpawnEvent.SpawnReason.SPAWNER); // CraftBukkit);
|
||||
((EntityInsentient) entity).a((GroupDataEntity) null);
|
||||
- this.a().addEntity(entity, CreatureSpawnEvent.SpawnReason.SPAWNER); // CraftBukkit
|
||||
+ // CraftBukkit start - call SpawnerSpawnEvent, abort if cancelled
|
||||
+ SpawnerSpawnEvent event = CraftEventFactory.callSpawnerSpawnEvent(entity, this.b(), this.c(), this.d());
|
||||
+ if (!event.isCancelled()) {
|
||||
+ this.a().addEntity(entity, CreatureSpawnEvent.SpawnReason.SPAWNER);
|
||||
+ this.a().addEntity(entity, CreatureSpawnEvent.SpawnReason.SPAWNER); // CraftBukkit
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
}
|
||||
|
||||
return entity;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index 2b56c75..4ba43a0 100644
|
||||
index 9986b7a..b026e54 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -34,6 +34,7 @@ import org.bukkit.Material;
|
||||
@@ -35,6 +35,7 @@ import org.bukkit.Material;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.block.BlockFace;
|
||||
import org.bukkit.block.BlockState;
|
||||
@ -75,7 +74,7 @@ index 2b56c75..4ba43a0 100644
|
||||
import org.bukkit.craftbukkit.CraftServer;
|
||||
import org.bukkit.craftbukkit.CraftWorld;
|
||||
import org.bukkit.craftbukkit.block.CraftBlock;
|
||||
@@ -115,6 +116,22 @@ public class CraftEventFactory {
|
||||
@@ -116,6 +117,22 @@ public class CraftEventFactory {
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,14 +1,14 @@
|
||||
From ba0018601961308c4c4213daaeef9c23e62ef37f Mon Sep 17 00:00:00 2001
|
||||
From ae268b91679cfb9c2fc4d94e095cd01ba4d6bcba Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Fri, 21 Jun 2013 17:53:03 +1000
|
||||
Subject: [PATCH] Enable Foreign Language Signs
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index 8deba1b..998ac8d 100644
|
||||
index e5937fc..1422d67 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -1559,7 +1559,7 @@ public class PlayerConnection extends Connection {
|
||||
@@ -1578,7 +1578,7 @@ public class PlayerConnection extends Connection {
|
||||
flag = false;
|
||||
} else {
|
||||
for (i = 0; i < packet130updatesign.lines[j].length(); ++i) {
|
||||
|
@ -1,18 +1,18 @@
|
||||
From 2ccdffc75467d7bca0ae9cf2f92f9441a0aa1459 Mon Sep 17 00:00:00 2001
|
||||
From 6c60d0e5cb8690f7a022ff2bc24731a7e4a43891 Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Fri, 21 Jun 2013 17:59:22 +1000
|
||||
Subject: [PATCH] Spam Filter Exclusions
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index 998ac8d..03e0e1c 100644
|
||||
index 1422d67..fc174b2 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -846,7 +846,17 @@ public class PlayerConnection extends Connection {
|
||||
@@ -858,7 +858,17 @@ public class PlayerConnection extends Connection {
|
||||
this.chat(s, packet3chat.a_());
|
||||
|
||||
// This section stays because it is only applicable to packets
|
||||
- if (chatSpamField.addAndGet(this, 20) > 200 && !this.minecraftServer.getPlayerList().isOp(this.player.name)) { // CraftBukkit use thread-safe spam
|
||||
- if (chatSpamField.addAndGet(this, 20) > 200 && !this.minecraftServer.getPlayerList().isOp(this.player.getName())) { // CraftBukkit use thread-safe spam
|
||||
+ // Spigot - spam exclusions
|
||||
+ boolean counted = true;
|
||||
+ for ( String exclude : org.spigotmc.SpigotConfig.spamExclusions )
|
||||
@ -23,7 +23,7 @@ index 998ac8d..03e0e1c 100644
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ if (counted && chatSpamField.addAndGet(this, 20) > 200 && !this.minecraftServer.getPlayerList().isOp(this.player.name)) { // CraftBukkit use thread-safe spam
|
||||
+ if (counted && chatSpamField.addAndGet(this, 20) > 200 && !this.minecraftServer.getPlayerList().isOp(this.player.getName())) { // CraftBukkit use thread-safe spam
|
||||
if (packet3chat.a_()) {
|
||||
Waitable waitable = new Waitable() {
|
||||
@Override
|
||||
|
@ -1,14 +1,14 @@
|
||||
From f7c4774dfba4058a1c67d8d99589396abee5958b Mon Sep 17 00:00:00 2001
|
||||
From b2fb1342018352db6b72d88ed4891ef0f4fd5808 Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Fri, 21 Jun 2013 18:01:29 +1000
|
||||
Subject: [PATCH] Allow Disabling of Command Logging
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index 03e0e1c..be44514 100644
|
||||
index fc174b2..c2a9878 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -979,7 +979,12 @@ public class PlayerConnection extends Connection {
|
||||
@@ -991,7 +991,12 @@ public class PlayerConnection extends Connection {
|
||||
}
|
||||
|
||||
try {
|
||||
|
@ -1,14 +1,14 @@
|
||||
From 2c4c883f2678a7b884bb7b135a93da0935f858a5 Mon Sep 17 00:00:00 2001
|
||||
From e73fc332b824f38374b26960ec134c67a271a6f4 Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Sat, 22 Jun 2013 16:12:02 +1000
|
||||
Subject: [PATCH] Allow Disabling of Random Lighting Updates
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 5866abb..9f87b0e 100644
|
||||
index 039ba6e..6060288 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -2104,7 +2104,7 @@ public abstract class World implements IBlockAccess {
|
||||
@@ -2103,7 +2103,7 @@ public abstract class World implements IBlockAccess {
|
||||
}
|
||||
|
||||
this.methodProfiler.a("playerCheckLight");
|
||||
|
@ -1,24 +1,24 @@
|
||||
From 73fe7ed8c117bbdb3ee02a5a0f336fc5adeea12e Mon Sep 17 00:00:00 2001
|
||||
From 22b6fb72ab5ba663f138f46bab8fba97ee194286 Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Tue, 25 Jun 2013 18:09:26 +1000
|
||||
Subject: [PATCH] Always Fire PreLoginEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PendingConnection.java b/src/main/java/net/minecraft/server/PendingConnection.java
|
||||
index e78781e..3f4c311 100644
|
||||
index 6308331..7984666 100644
|
||||
--- a/src/main/java/net/minecraft/server/PendingConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PendingConnection.java
|
||||
@@ -105,7 +105,7 @@ public class PendingConnection extends Connection {
|
||||
@@ -110,7 +110,7 @@ public class PendingConnection extends Connection {
|
||||
}
|
||||
|
||||
public void a(Packet205ClientCommand packet205clientcommand) {
|
||||
if (packet205clientcommand.a == 0) {
|
||||
this.j = true;
|
||||
- if (this.server.getOnlineMode()) {
|
||||
+ if (true) { // Spigot - Always fire
|
||||
if (this.j) {
|
||||
this.disconnect("Duplicate login");
|
||||
return;
|
||||
(new ThreadLoginVerifier(this, server.server)).start(); // CraftBukkit - add CraftServer
|
||||
} else {
|
||||
this.h = true;
|
||||
diff --git a/src/main/java/net/minecraft/server/ThreadLoginVerifier.java b/src/main/java/net/minecraft/server/ThreadLoginVerifier.java
|
||||
index 496cfe4..44ea39e 100644
|
||||
index 5e45cae..70f9fea 100644
|
||||
--- a/src/main/java/net/minecraft/server/ThreadLoginVerifier.java
|
||||
+++ b/src/main/java/net/minecraft/server/ThreadLoginVerifier.java
|
||||
@@ -27,24 +27,29 @@ class ThreadLoginVerifier extends Thread {
|
||||
@ -26,9 +26,9 @@ index 496cfe4..44ea39e 100644
|
||||
}
|
||||
|
||||
+ private boolean auth() throws java.io.IOException {
|
||||
+ String s = (new BigInteger(MinecraftEncryption.a(PendingConnection.a(this.pendingConnection), PendingConnection.b(this.pendingConnection).F().getPublic(), PendingConnection.c(this.pendingConnection)))).toString(16);
|
||||
+ String s = (new BigInteger(MinecraftEncryption.a(PendingConnection.a(this.pendingConnection), PendingConnection.b(this.pendingConnection).H().getPublic(), PendingConnection.c(this.pendingConnection)))).toString(16);
|
||||
+ URL url = new URL("http://session.minecraft.net/game/checkserver.jsp?user=" + URLEncoder.encode(PendingConnection.d(this.pendingConnection), "UTF-8") + "&serverId=" + URLEncoder.encode(s, "UTF-8"));
|
||||
+ BufferedReader bufferedreader = new BufferedReader(new InputStreamReader(url.openStream()));
|
||||
+ BufferedReader bufferedreader = new BufferedReader(new InputStreamReader(url.openConnection(PendingConnection.b(this.pendingConnection).ap()).getInputStream()));
|
||||
+ String s1 = bufferedreader.readLine();
|
||||
+
|
||||
+ bufferedreader.close();
|
||||
@ -47,9 +47,9 @@ index 496cfe4..44ea39e 100644
|
||||
public void run() {
|
||||
try {
|
||||
if (org.spigotmc.SpamHaus.filterIp(pendingConnection)) return; // Spigot
|
||||
- String s = (new BigInteger(MinecraftEncryption.a(PendingConnection.a(this.pendingConnection), PendingConnection.b(this.pendingConnection).F().getPublic(), PendingConnection.c(this.pendingConnection)))).toString(16);
|
||||
- String s = (new BigInteger(MinecraftEncryption.a(PendingConnection.a(this.pendingConnection), PendingConnection.b(this.pendingConnection).H().getPublic(), PendingConnection.c(this.pendingConnection)))).toString(16);
|
||||
- URL url = new URL("http://session.minecraft.net/game/checkserver.jsp?user=" + URLEncoder.encode(PendingConnection.d(this.pendingConnection), "UTF-8") + "&serverId=" + URLEncoder.encode(s, "UTF-8"));
|
||||
- BufferedReader bufferedreader = new BufferedReader(new InputStreamReader(url.openStream()));
|
||||
- BufferedReader bufferedreader = new BufferedReader(new InputStreamReader(url.openConnection(PendingConnection.b(this.pendingConnection).ap()).getInputStream()));
|
||||
- String s1 = bufferedreader.readLine();
|
||||
-
|
||||
- bufferedreader.close();
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 7a8b5c8e972137ad02eb50e9ce7da758dab61d99 Mon Sep 17 00:00:00 2001
|
||||
From 2868feb3889d95d778dcaec82889cd0cad10f0a5 Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Thu, 27 Jun 2013 17:26:09 +1000
|
||||
Subject: [PATCH] Properly Close Inventories
|
||||
@ -6,7 +6,7 @@ Subject: [PATCH] Properly Close Inventories
|
||||
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
|
||||
index e8d30c5..4879db6 100644
|
||||
index 04cb6fb..34d07f2 100644
|
||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||
@@ -690,6 +690,15 @@ public class Chunk {
|
||||
@ -42,13 +42,13 @@ index e8d30c5..4879db6 100644
|
||||
// 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)
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityMinecartContainer.java b/src/main/java/net/minecraft/server/EntityMinecartContainer.java
|
||||
index c207076..8f9f558 100644
|
||||
index e89b106..f58cd7e 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityMinecartContainer.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityMinecartContainer.java
|
||||
@@ -149,6 +149,12 @@ public abstract class EntityMinecartContainer extends EntityMinecartAbstract imp
|
||||
}
|
||||
|
||||
public void c(int i) {
|
||||
public void b(int i) {
|
||||
+ // Spigot Start
|
||||
+ for ( HumanEntity human : new java.util.ArrayList<HumanEntity>( transaction ) )
|
||||
+ {
|
||||
@ -56,7 +56,7 @@ index c207076..8f9f558 100644
|
||||
+ }
|
||||
+ // Spigot End
|
||||
this.b = false;
|
||||
super.c(i);
|
||||
super.b(i);
|
||||
}
|
||||
--
|
||||
1.8.1.2
|
||||
|
@ -1,14 +1,14 @@
|
||||
From 91608f72be55d36c57c22e85b4740c23f129a735 Mon Sep 17 00:00:00 2001
|
||||
From a8399a4077723881c4dc54d714ef746f706b6c7d Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Fri, 28 Jun 2013 19:52:54 +1000
|
||||
Subject: [PATCH] Disallow Interaction With Self
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index be44514..f5544a3 100644
|
||||
index c2a9878..6bfc289 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -1091,6 +1091,13 @@ public class PlayerConnection extends Connection {
|
||||
@@ -1109,6 +1109,13 @@ public class PlayerConnection extends Connection {
|
||||
|
||||
WorldServer worldserver = this.minecraftServer.getWorldServer(this.player.dimension);
|
||||
Entity entity = worldserver.getEntity(packet7useentity.target);
|
||||
@ -21,7 +21,7 @@ index be44514..f5544a3 100644
|
||||
+ // Spigot End
|
||||
|
||||
if (entity != null) {
|
||||
boolean flag = this.player.n(entity);
|
||||
boolean flag = this.player.o(entity);
|
||||
--
|
||||
1.8.1.2
|
||||
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren