3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-15 04:20:04 +01:00

Update to MC 1.12-pre2

Dieser Commit ist enthalten in:
Zach Brown 2017-05-14 13:05:01 -05:00
Ursprung 828d600143
Commit 491286def4
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: CC9DA35FC5450B76
151 geänderte Dateien mit 1315 neuen und 1636 gelöschten Zeilen

Datei anzeigen

@ -1,11 +1,11 @@
From 1f8f0180d8a5714931673fe8fabce687a0c24095 Mon Sep 17 00:00:00 2001
From 617559d05de68cd645b17492c511e62ae593de4b Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Mon, 29 Feb 2016 20:40:33 -0600
Subject: [PATCH] POM Changes
diff --git a/pom.xml b/pom.xml
index 6d019d1..0e88ae2 100644
index 4f14d6f41..a833892e3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,12 +1,12 @@
@ -17,7 +17,7 @@ index 6d019d1..0e88ae2 100644
+ <groupId>com.destroystokyo.paper</groupId>
+ <artifactId>paper</artifactId>
<packaging>jar</packaging>
<version>1.11.2-R0.1-SNAPSHOT</version>
<version>1.12-pre2-SNAPSHOT</version>
- <name>Spigot</name>
- <url>http://www.spigotmc.org</url>
+ <name>Paper</name>
@ -25,15 +25,7 @@ index 6d019d1..0e88ae2 100644
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@@ -16,21 +16,22 @@
<buildtag.prefix>git-Bukkit-</buildtag.prefix>
<buildtag.suffix></buildtag.suffix>
<maven.build.timestamp.format>yyyyMMdd-HHmm</maven.build.timestamp.format>
- <maven.compiler.source>1.6</maven.compiler.source>
- <maven.compiler.target>1.6</maven.compiler.target>
+ <!--Paper - Bump to 1.8 - This will haunt me -->
+ <maven.compiler.source>1.8</maven.compiler.source>
+ <maven.compiler.target>1.8</maven.compiler.target>
@@ -21,16 +21,16 @@
</properties>
<parent>
@ -54,7 +46,7 @@ index 6d019d1..0e88ae2 100644
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
@@ -94,34 +95,22 @@
@@ -94,34 +94,22 @@
<!-- This builds a completely 'ready to start' jar with all dependencies inside -->
<build>
@ -100,7 +92,7 @@ index 6d019d1..0e88ae2 100644
</goals>
</execution>
</executions>
@@ -131,11 +120,12 @@
@@ -131,11 +119,12 @@
<artifactId>maven-jar-plugin</artifactId>
<version>3.0.2</version>
<configuration>
@ -114,34 +106,7 @@ index 6d019d1..0e88ae2 100644
<Implementation-Vendor>${maven.build.timestamp}</Implementation-Vendor>
<Specification-Title>Bukkit</Specification-Title>
<Specification-Version>${api.version}</Specification-Version>
@@ -165,26 +155,6 @@
</configuration>
</plugin>
<plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>animal-sniffer-maven-plugin</artifactId>
- <version>1.15</version>
- <executions>
- <execution>
- <phase>process-classes</phase>
- <goals>
- <goal>check</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <signature>
- <groupId>org.codehaus.mojo.signature</groupId>
- <artifactId>java16</artifactId>
- <version>1.1</version>
- </signature>
- </configuration>
- </plugin>
- <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.4.3</version>
@@ -195,11 +165,13 @@
@@ -195,11 +184,13 @@
<goal>shade</goal>
</goals>
<configuration>
@ -159,7 +124,7 @@ index 6d019d1..0e88ae2 100644
<relocation>
<pattern>jline</pattern>
<shadedPattern>org.bukkit.craftbukkit.libs.jline</shadedPattern>
@@ -238,20 +210,6 @@
@@ -234,20 +225,6 @@
<artifactId>maven-compiler-plugin</artifactId>
<!-- versions after this appear to be broken -->
<version>3.1</version>
@ -181,7 +146,7 @@ index 6d019d1..0e88ae2 100644
<plugin>
<groupId>org.apache.maven.plugins</groupId>
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
index 9304637..674096c 100644
index 93046379d..674096cab 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
@@ -11,7 +11,7 @@ public final class Versioning {
@ -194,5 +159,5 @@ index 9304637..674096c 100644
if (stream != null) {
--
2.9.3
2.13.0

Datei anzeigen

@ -1,4 +1,4 @@
From 592ca37122a5eb5a53cc83cd94dcd1a7c36ebaf8 Mon Sep 17 00:00:00 2001
From 79288da44d41aa22fd80969a8ad4447b475f67c7 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Mon, 29 Feb 2016 21:02:09 -0600
Subject: [PATCH] Paper config files
@ -6,7 +6,7 @@ Subject: [PATCH] Paper config files
diff --git a/src/main/java/com/destroystokyo/paper/PaperCommand.java b/src/main/java/com/destroystokyo/paper/PaperCommand.java
new file mode 100644
index 00000000..2096d3f9
index 000000000..2096d3f97
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/PaperCommand.java
@@ -0,0 +1,49 @@
@ -61,7 +61,7 @@ index 00000000..2096d3f9
+}
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
new file mode 100644
index 00000000..328ff012
index 000000000..3d8ee9ed3
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -0,0 +1,173 @@
@ -124,8 +124,8 @@ index 00000000..328ff012
+ commands = new HashMap<String, Command>();
+ commands.put("paper", new PaperCommand("paper"));
+
+ version = getInt("config-version", 12);
+ set("config-version", 12);
+ version = getInt("config-version", 13);
+ set("config-version", 13);
+ readConfig(PaperConfig.class, null);
+ }
+
@ -240,7 +240,7 @@ index 00000000..328ff012
+}
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
new file mode 100644
index 00000000..621bf705
index 000000000..621bf7051
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -0,0 +1,66 @@
@ -311,10 +311,10 @@ index 00000000..621bf705
+ }
+}
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
index 31756b80..cb83e4f5 100644
index 072dff9b5..30538d8ec 100644
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
@@ -183,6 +183,10 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
@@ -184,6 +184,10 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
org.spigotmc.SpigotConfig.init((File) options.valueOf("spigot-settings"));
org.spigotmc.SpigotConfig.registerCommands();
// Spigot end
@ -326,10 +326,10 @@ index 31756b80..cb83e4f5 100644
DedicatedServer.LOGGER.info("Generating keypair");
this.a(MinecraftEncryption.b());
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index eab11685..758962e6 100644
index b2cc418a7..a366b2d70 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -125,6 +125,8 @@ public abstract class World implements IBlockAccess {
@@ -127,6 +127,8 @@ public abstract class World implements IBlockAccess {
private int tickPosition;
public final org.spigotmc.SpigotWorldConfig spigotConfig; // Spigot
@ -338,7 +338,7 @@ index eab11685..758962e6 100644
public final SpigotTimings.WorldTimingsHandler timings; // Spigot
private boolean guardEntityList; // Spigot
public static boolean haveWeSilencedAPhysicsCrash;
@@ -147,6 +149,7 @@ public abstract class World implements IBlockAccess {
@@ -149,6 +151,7 @@ public abstract class World implements IBlockAccess {
protected World(IDataManager idatamanager, WorldData worlddata, WorldProvider worldprovider, MethodProfiler methodprofiler, boolean flag, ChunkGenerator gen, org.bukkit.World.Environment env) {
this.spigotConfig = new org.spigotmc.SpigotWorldConfig( worlddata.getName() ); // Spigot
@ -347,10 +347,10 @@ index eab11685..758962e6 100644
this.world = new CraftWorld((WorldServer) this, gen, env);
this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns(); // CraftBukkit
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index b7e1f182..587d23df 100644
index 8a0043d3c..440b23cf5 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -697,6 +697,7 @@ public final class CraftServer implements Server {
@@ -689,6 +689,7 @@ public final class CraftServer implements Server {
}
org.spigotmc.SpigotConfig.init((File) console.options.valueOf("spigot-settings")); // Spigot
@ -358,7 +358,7 @@ index b7e1f182..587d23df 100644
for (WorldServer world : console.worlds) {
world.worldData.setDifficulty(difficulty);
world.setSpawnFlags(monsters, animals);
@@ -712,12 +713,14 @@ public final class CraftServer implements Server {
@@ -704,6 +705,7 @@ public final class CraftServer implements Server {
world.ticksPerMonsterSpawns = this.getTicksPerMonsterSpawns();
}
world.spigotConfig.init(); // Spigot
@ -366,15 +366,16 @@ index b7e1f182..587d23df 100644
}
pluginManager.clearPlugins();
commandMap.clearCommands();
@@ -711,6 +713,7 @@ public final class CraftServer implements Server {
resetRecipes();
reloadData();
org.spigotmc.SpigotConfig.registerCommands(); // Spigot
+ com.destroystokyo.paper.PaperConfig.registerCommands(); // Paper
overrideAllCommandBlockCommands = commandsConfiguration.getStringList("command-block-overrides").contains("*");
int pollCount = 0;
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index ee8ec5a6..4399faf6 100644
index 21170f377..30b6f3477 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -126,6 +126,14 @@ public class Main {
@ -393,7 +394,7 @@ index ee8ec5a6..4399faf6 100644
};
diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java
index 01e73eb8..0b66f5e3 100644
index 01e73eb89..0b66f5e35 100644
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java
@@ -39,31 +39,31 @@ public class SpigotWorldConfig
@ -434,5 +435,5 @@ index 01e73eb8..0b66f5e3 100644
config.addDefault( "world-settings.default." + path, def );
return config.getString( "world-settings." + worldName + "." + path, config.getString( "world-settings.default." + path ) );
--
2.12.2
2.13.0

Datei anzeigen

@ -1,15 +1,15 @@
From d53c24fef5ec8a7ba7a0681d0b7361d10eba2d40 Mon Sep 17 00:00:00 2001
From d96016cb6d0bc3a710cf6e081872d2f4117e1dda Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 30 Mar 2016 19:36:20 -0400
Subject: [PATCH] MC Dev fixes
diff --git a/src/main/java/net/minecraft/server/BaseBlockPosition.java b/src/main/java/net/minecraft/server/BaseBlockPosition.java
index f02fc607..d60e7550 100644
index d4f412742..d55e180d7 100644
--- a/src/main/java/net/minecraft/server/BaseBlockPosition.java
+++ b/src/main/java/net/minecraft/server/BaseBlockPosition.java
@@ -89,7 +89,7 @@ public class BaseBlockPosition implements Comparable<BaseBlockPosition> {
return Objects.toStringHelper(this).add("x", this.getX()).add("y", this.getY()).add("z", this.getZ()).toString();
return MoreObjects.toStringHelper(this).add("x", this.getX()).add("y", this.getY()).add("z", this.getZ()).toString();
}
- public int compareTo(Object object) {
@ -18,11 +18,11 @@ index f02fc607..d60e7550 100644
}
}
diff --git a/src/main/java/net/minecraft/server/BiomeBase.java b/src/main/java/net/minecraft/server/BiomeBase.java
index e62df5c1..62a338e9 100644
index 62a9c92f8..1b7599769 100644
--- a/src/main/java/net/minecraft/server/BiomeBase.java
+++ b/src/main/java/net/minecraft/server/BiomeBase.java
@@ -49,7 +49,7 @@ public abstract class BiomeBase {
protected List<BiomeBase.BiomeMeta> x;
@@ -46,7 +46,7 @@ public abstract class BiomeBase {
protected List<BiomeBase.BiomeMeta> w;
public static int a(BiomeBase biomebase) {
- return BiomeBase.REGISTRY_ID.a((Object) biomebase);
@ -31,7 +31,7 @@ index e62df5c1..62a338e9 100644
@Nullable
diff --git a/src/main/java/net/minecraft/server/BlockStateEnum.java b/src/main/java/net/minecraft/server/BlockStateEnum.java
index 71524f2c..288c52c5 100644
index 71524f2cd..288c52c55 100644
--- a/src/main/java/net/minecraft/server/BlockStateEnum.java
+++ b/src/main/java/net/minecraft/server/BlockStateEnum.java
@@ -29,7 +29,7 @@ public class BlockStateEnum<T extends Enum<T> & INamable> extends BlockState<T>
@ -44,10 +44,10 @@ index 71524f2c..288c52c5 100644
}
diff --git a/src/main/java/net/minecraft/server/CommandAbstract.java b/src/main/java/net/minecraft/server/CommandAbstract.java
index fe74068e..b669884d 100644
index 14a7b9c92..8b703db42 100644
--- a/src/main/java/net/minecraft/server/CommandAbstract.java
+++ b/src/main/java/net/minecraft/server/CommandAbstract.java
@@ -223,7 +223,7 @@ public abstract class CommandAbstract implements ICommand {
@@ -231,7 +231,7 @@ public abstract class CommandAbstract implements ICommand {
}
if (object != null && oclass.isAssignableFrom(object.getClass())) {
@ -56,7 +56,7 @@ index fe74068e..b669884d 100644
} else {
throw new ExceptionEntityNotFound(s);
}
@@ -440,7 +440,7 @@ public abstract class CommandAbstract implements ICommand {
@@ -448,7 +448,7 @@ public abstract class CommandAbstract implements ICommand {
}
private static <T extends Comparable<T>> IBlockData a(IBlockData iblockdata, IBlockState<T> iblockstate, Comparable<?> comparable) {
@ -65,7 +65,7 @@ index fe74068e..b669884d 100644
}
public static Predicate<IBlockData> b(final Block block, String s) throws ExceptionInvalidBlockState {
@@ -533,7 +533,7 @@ public abstract class CommandAbstract implements ICommand {
@@ -541,7 +541,7 @@ public abstract class CommandAbstract implements ICommand {
@Nullable
private static <T extends Comparable<T>> T a(IBlockState<T> iblockstate, String s) {
@ -74,7 +74,7 @@ index fe74068e..b669884d 100644
}
public static String a(Object[] aobject) {
@@ -684,7 +684,7 @@ public abstract class CommandAbstract implements ICommand {
@@ -692,7 +692,7 @@ public abstract class CommandAbstract implements ICommand {
return this.getCommand().compareTo(icommand.getCommand());
}
@ -84,7 +84,7 @@ index fe74068e..b669884d 100644
}
diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/ItemFactoryTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/ItemFactoryTest.java
index f5bcbdbe..3190cadf 100644
index f5bcbdbe1..3190cadfc 100644
--- a/src/test/java/org/bukkit/craftbukkit/inventory/ItemFactoryTest.java
+++ b/src/test/java/org/bukkit/craftbukkit/inventory/ItemFactoryTest.java
@@ -20,7 +20,7 @@ public class ItemFactoryTest extends AbstractTestingBase {
@ -97,5 +97,5 @@ index f5bcbdbe..3190cadf 100644
for (ZipEntry clazzEntry; (clazzEntry = nmsZipStream.getNextEntry()) != null; ) {
final String entryName = clazzEntry.getName();
--
2.12.2
2.13.0

Datei anzeigen

@ -1,11 +1,11 @@
From a703dc3147918196659551ad173b9072f80e983c Mon Sep 17 00:00:00 2001
From 2ff1a095a26d78e4e5de5a878259f8094cbb0d90 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 28 Mar 2016 20:55:47 -0400
Subject: [PATCH] MC Utils
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index b0aba6089..81fc04ed3 100644
index 38d69b944..7fee74d80 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -675,6 +675,7 @@ public class Chunk {
@ -212,19 +212,19 @@ index 000000000..1159eea1a
+ }
+}
diff --git a/src/main/java/net/minecraft/server/NBTTagCompound.java b/src/main/java/net/minecraft/server/NBTTagCompound.java
index 90d18f489..2a2f53c82 100644
index aa1ca6d91..e15c23367 100644
--- a/src/main/java/net/minecraft/server/NBTTagCompound.java
+++ b/src/main/java/net/minecraft/server/NBTTagCompound.java
@@ -19,7 +19,7 @@ import org.apache.logging.log4j.Logger;
public class NBTTagCompound extends NBTBase {
@@ -22,7 +22,7 @@ public class NBTTagCompound extends NBTBase {
private static final Logger b = LogManager.getLogger();
private static final Pattern c = Pattern.compile("[A-Za-z0-9._+-]+");
- private final Map<String, NBTBase> map = Maps.newHashMap();
+ public final Map<String, NBTBase> map = Maps.newHashMap(); // Paper
public NBTTagCompound() {}
@@ -91,11 +91,13 @@ public class NBTTagCompound extends NBTBase {
@@ -94,11 +94,13 @@ public class NBTTagCompound extends NBTBase {
this.map.put(s, new NBTTagLong(i));
}
@ -239,10 +239,10 @@ index 90d18f489..2a2f53c82 100644
public UUID a(String s) {
return new UUID(this.getLong(s + "Most"), this.getLong(s + "Least"));
diff --git a/src/main/java/net/minecraft/server/NBTTagList.java b/src/main/java/net/minecraft/server/NBTTagList.java
index 370203b2d..ae7498c03 100644
index e0cb6aa6e..bc6383669 100644
--- a/src/main/java/net/minecraft/server/NBTTagList.java
+++ b/src/main/java/net/minecraft/server/NBTTagList.java
@@ -12,7 +12,7 @@ import org.apache.logging.log4j.Logger;
@@ -13,7 +13,7 @@ import org.apache.logging.log4j.Logger;
public class NBTTagList extends NBTBase {
private static final Logger b = LogManager.getLogger();
@ -252,5 +252,5 @@ index 370203b2d..ae7498c03 100644
public NBTTagList() {}
--
2.12.0.windows.1
2.13.0

Datei anzeigen

@ -1,14 +1,14 @@
From 1c2a256ac8dc0122b4a34665f614bb09ea329fe4 Mon Sep 17 00:00:00 2001
From 52903d99be9e34ce9c9871eaecc2a371db5b4497 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 3 Mar 2016 04:00:11 -0600
Subject: [PATCH] Timings v2
diff --git a/pom.xml b/pom.xml
index 8b96966d8..8d1e8680b 100644
index a833892e3..3090f79f3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -66,6 +66,12 @@
@@ -65,6 +65,12 @@
<scope>compile</scope>
</dependency>
<dependency>
@ -23,10 +23,10 @@ index 8b96966d8..8d1e8680b 100644
<version>3.0.3</version>
diff --git a/src/main/java/co/aikar/timings/MinecraftTimings.java b/src/main/java/co/aikar/timings/MinecraftTimings.java
new file mode 100644
index 000000000..4b4b77a5c
index 000000000..1b33390de
--- /dev/null
+++ b/src/main/java/co/aikar/timings/MinecraftTimings.java
@@ -0,0 +1,124 @@
@@ -0,0 +1,125 @@
+package co.aikar.timings;
+
+import net.minecraft.server.*;
@ -38,6 +38,7 @@ index 000000000..4b4b77a5c
+public final class MinecraftTimings {
+
+ public static final Timing playerListTimer = Timings.ofSafe("Player List");
+ public static final Timing commandFunctionsTimer = Timings.ofSafe("Command Functions");
+ public static final Timing connectionTimer = Timings.ofSafe("Connection Handler");
+ public static final Timing tickablesTimer = Timings.ofSafe("Tickables");
+ public static final Timing minecraftSchedulerTimer = Timings.ofSafe("Minecraft Scheduler");
@ -153,10 +154,10 @@ index 000000000..4b4b77a5c
+}
diff --git a/src/main/java/co/aikar/timings/TimedChunkGenerator.java b/src/main/java/co/aikar/timings/TimedChunkGenerator.java
new file mode 100644
index 000000000..b79f1be7a
index 000000000..089154f62
--- /dev/null
+++ b/src/main/java/co/aikar/timings/TimedChunkGenerator.java
@@ -0,0 +1,126 @@
@@ -0,0 +1,131 @@
+/*
+ * This file is licensed under the MIT License (MIT).
+ *
@ -282,6 +283,11 @@ index 000000000..b79f1be7a
+ timedGenerator.recreateStructures(chunk, i, j);
+ }
+ }
+
+ @Override
+ public boolean a(World world, String s, BlockPosition blockPosition) {
+ return timedGenerator.a(world, s, blockPosition);
+ }
+}
diff --git a/src/main/java/co/aikar/timings/WorldTimingsHandler.java b/src/main/java/co/aikar/timings/WorldTimingsHandler.java
new file mode 100644
@ -391,7 +397,7 @@ index 000000000..e7789117b
+ }
+}
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index 1594d7ca4..007589314 100644
index 5ab2cf6ee..b5795b6d3 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -14,11 +14,14 @@ import java.util.concurrent.TimeUnit;
@ -435,7 +441,7 @@ index 1594d7ca4..007589314 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java
index e8511ac9a..d3f1a4ac0 100644
index 0ee47df3f..ba3913667 100644
--- a/src/main/java/net/minecraft/server/Block.java
+++ b/src/main/java/net/minecraft/server/Block.java
@@ -35,6 +35,15 @@ public class Block {
@ -455,7 +461,7 @@ index e8511ac9a..d3f1a4ac0 100644
public static int getId(Block block) {
return Block.REGISTRY.a(block); // CraftBukkit - decompile error
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index 81fc04ed3..bd3b16025 100644
index 7fee74d80..39ad8d691 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -900,7 +900,7 @@ public class Chunk {
@ -503,7 +509,7 @@ index 81fc04ed3..bd3b16025 100644
private void z() {
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index 2d267e44b..2762d1838 100644
index 9dcab42de..c1b0d6cea 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -195,7 +195,7 @@ public class ChunkProviderServer implements IChunkProvider {
@ -525,7 +531,7 @@ index 2d267e44b..2762d1838 100644
this.chunkLoader.a(this.world, chunk);
} catch (IOException ioexception) {
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
index 65fe4e2ec..bee52d783 100644
index fe387e218..6550686ee 100644
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
@@ -388,7 +388,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
@ -565,10 +571,10 @@ index 65fe4e2ec..bee52d783 100644
// return chunk; // CraftBukkit
}
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
index cb83e4f56..e6819139f 100644
index 30538d8ec..840ffeb93 100644
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
@@ -23,7 +23,7 @@ import java.io.PrintStream;
@@ -24,7 +24,7 @@ import java.io.PrintStream;
import org.apache.logging.log4j.Level;
import org.bukkit.craftbukkit.LoggerOutputStream;
@ -577,16 +583,16 @@ index cb83e4f56..e6819139f 100644
import org.bukkit.event.server.ServerCommandEvent;
import org.bukkit.craftbukkit.util.Waitable;
import org.bukkit.event.server.RemoteServerCommandEvent;
@@ -427,7 +427,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
@@ -433,7 +433,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
}
public void aM() {
public void aP() {
- SpigotTimings.serverCommandTimer.startTiming(); // Spigot
+ MinecraftTimings.serverCommandTimer.startTiming(); // Spigot
while (!this.serverCommandQueue.isEmpty()) {
ServerCommand servercommand = (ServerCommand) this.serverCommandQueue.remove(0);
@@ -442,7 +442,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
@@ -448,7 +448,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
// CraftBukkit end
}
@ -595,7 +601,7 @@ index cb83e4f56..e6819139f 100644
}
public boolean aa() {
@@ -692,7 +692,20 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
@@ -694,7 +694,20 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
return remoteControlCommandListener.getMessages();
}
};
@ -618,7 +624,7 @@ index cb83e4f56..e6819139f 100644
return waitable.get();
} catch (java.util.concurrent.ExecutionException e) {
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 9bd9dc28b..14d23556f 100644
index bae717b18..c6b7d6c22 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -25,7 +25,8 @@ import org.bukkit.block.BlockFace;
@ -631,7 +637,7 @@ index 9bd9dc28b..14d23556f 100644
import org.bukkit.event.entity.EntityCombustByEntityEvent;
import org.bukkit.event.hanging.HangingBreakByEntityEvent;
import org.bukkit.event.vehicle.VehicleBlockCollisionEvent;
@@ -145,7 +146,7 @@ public abstract class Entity implements ICommandListener {
@@ -146,7 +147,7 @@ public abstract class Entity implements ICommandListener {
public boolean valid; // CraftBukkit
public org.bukkit.projectiles.ProjectileSource projectileSource; // CraftBukkit - For projectiles only
public boolean forceExplosionKnockback; // CraftBukkit - SPIGOT-949
@ -640,7 +646,7 @@ index 9bd9dc28b..14d23556f 100644
// Spigot start
public final byte activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this);
public final boolean defaultActivationState;
@@ -523,7 +524,6 @@ public abstract class Entity implements ICommandListener {
@@ -525,7 +526,6 @@ public abstract class Entity implements ICommandListener {
}
public void move(EnumMoveType enummovetype, double d0, double d1, double d2) {
@ -648,7 +654,7 @@ index 9bd9dc28b..14d23556f 100644
if (this.noclip) {
this.a(this.getBoundingBox().d(d0, d1, d2));
this.recalcPosition();
@@ -915,7 +915,6 @@ public abstract class Entity implements ICommandListener {
@@ -919,7 +919,6 @@ public abstract class Entity implements ICommandListener {
this.world.methodProfiler.b();
}
@ -657,7 +663,7 @@ index 9bd9dc28b..14d23556f 100644
public void recalcPosition() {
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index e9002c953..b22f81b12 100644
index 3a92c468c..2c22b6ca2 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -31,7 +31,7 @@ import org.bukkit.event.entity.EntityTeleportEvent;
@ -669,15 +675,15 @@ index e9002c953..b22f81b12 100644
public abstract class EntityLiving extends Entity {
@@ -1816,7 +1816,6 @@ public abstract class EntityLiving extends Entity {
@@ -1861,7 +1861,6 @@ public abstract class EntityLiving extends Entity {
}
public void A_() {
public void B_() {
- SpigotTimings.timerEntityBaseTick.startTiming(); // Spigot
super.A_();
this.cA();
super.B_();
this.cG();
if (!this.world.isClientSide) {
@@ -1889,9 +1888,7 @@ public abstract class EntityLiving extends Entity {
@@ -1934,9 +1933,7 @@ public abstract class EntityLiving extends Entity {
}
}
@ -687,16 +693,16 @@ index e9002c953..b22f81b12 100644
double d0 = this.locX - this.lastX;
double d1 = this.locZ - this.lastZ;
float f = (float) (d0 * d0 + d1 * d1);
@@ -1960,8 +1957,6 @@ public abstract class EntityLiving extends Entity {
@@ -2012,8 +2009,6 @@ public abstract class EntityLiving extends Entity {
} else {
this.bp = 0;
this.bq = 0;
}
-
- SpigotTimings.timerEntityTickRest.stopTiming(); // Spigot
}
protected float h(float f, float f1) {
@@ -2026,7 +2021,6 @@ public abstract class EntityLiving extends Entity {
protected float g(float f, float f1) {
@@ -2078,7 +2073,6 @@ public abstract class EntityLiving extends Entity {
}
this.world.methodProfiler.a("ai");
@ -704,7 +710,7 @@ index e9002c953..b22f81b12 100644
if (this.isFrozen()) {
this.bd = false;
this.be = 0.0F;
@@ -2037,7 +2031,6 @@ public abstract class EntityLiving extends Entity {
@@ -2089,7 +2083,6 @@ public abstract class EntityLiving extends Entity {
this.doTick();
this.world.methodProfiler.b();
}
@ -712,23 +718,23 @@ index e9002c953..b22f81b12 100644
this.world.methodProfiler.b();
this.world.methodProfiler.a("jump");
@@ -2060,14 +2053,10 @@ public abstract class EntityLiving extends Entity {
this.bf *= 0.98F;
this.bg *= 0.9F;
@@ -2112,14 +2105,10 @@ public abstract class EntityLiving extends Entity {
this.bg *= 0.98F;
this.bh *= 0.9F;
this.r();
- SpigotTimings.timerEntityAIMove.startTiming(); // Spigot
this.g(this.be, this.bf);
this.a(this.be, this.bf, this.bg);
- SpigotTimings.timerEntityAIMove.stopTiming(); // Spigot
this.world.methodProfiler.b();
this.world.methodProfiler.a("push");
- SpigotTimings.timerEntityAICollision.startTiming(); // Spigot
this.ct();
this.cz();
- SpigotTimings.timerEntityAICollision.stopTiming(); // Spigot
this.world.methodProfiler.b();
}
diff --git a/src/main/java/net/minecraft/server/EntityTracker.java b/src/main/java/net/minecraft/server/EntityTracker.java
index 347a2b671..aceb08ce1 100644
index c840f6761..14504cbcc 100644
--- a/src/main/java/net/minecraft/server/EntityTracker.java
+++ b/src/main/java/net/minecraft/server/EntityTracker.java
@@ -175,7 +175,7 @@ public class EntityTracker {
@ -759,7 +765,7 @@ index 347a2b671..aceb08ce1 100644
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index cc0efa2e0..1b432f0d7 100644
index 39318aaf1..e847f3f1a 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -47,8 +47,8 @@ import org.bukkit.Bukkit;
@ -770,9 +776,9 @@ index cc0efa2e0..1b432f0d7 100644
import org.spigotmc.SlackActivityAccountant; // Spigot
+import co.aikar.timings.MinecraftTimings; // Paper
public abstract class MinecraftServer implements Runnable, ICommandListener, IAsyncTaskHandler, IMojangStatistics {
public abstract class MinecraftServer implements ICommandListener, Runnable, IAsyncTaskHandler, IMojangStatistics {
@@ -459,6 +459,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
@@ -459,6 +459,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs
}
// CraftBukkit end
MinecraftServer.LOGGER.info("Stopping server");
@ -780,7 +786,7 @@ index cc0efa2e0..1b432f0d7 100644
// CraftBukkit start
if (this.server != null) {
this.server.disablePlugins();
@@ -663,7 +664,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
@@ -663,7 +664,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs
public void B() {}
protected void C() throws ExceptionWorldConflict { // CraftBukkit - added throws
@ -789,7 +795,7 @@ index cc0efa2e0..1b432f0d7 100644
this.slackActivityAccountant.tickStarted(); // Spigot
long i = System.nanoTime();
@@ -691,7 +692,6 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
@@ -691,7 +692,6 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs
}
if (autosavePeriod > 0 && this.ticks % autosavePeriod == 0) { // CraftBukkit
@ -797,7 +803,7 @@ index cc0efa2e0..1b432f0d7 100644
this.methodProfiler.a("save");
this.v.savePlayers();
// Spigot Start
@@ -706,7 +706,6 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
@@ -706,7 +706,6 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs
// this.saveChunks(true);
// Spigot End
this.methodProfiler.b();
@ -805,7 +811,7 @@ index cc0efa2e0..1b432f0d7 100644
}
this.methodProfiler.a("tallying");
@@ -729,14 +728,14 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
@@ -729,14 +728,14 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs
org.spigotmc.WatchdogThread.tick(); // Spigot
this.slackActivityAccountant.tickEnded(tickNanos); // Spigot
@ -824,7 +830,7 @@ index cc0efa2e0..1b432f0d7 100644
this.methodProfiler.a("jobs");
Queue queue = this.j;
@@ -747,22 +746,23 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
@@ -747,22 +746,23 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs
SystemUtils.a(entry, MinecraftServer.LOGGER);
}
// Spigot end
@ -853,7 +859,7 @@ index cc0efa2e0..1b432f0d7 100644
// Send time updates to everyone, it will get the right time from the world the player is in.
if (this.ticks % 20 == 0) {
for (int i = 0; i < this.getPlayerList().players.size(); ++i) {
@@ -770,7 +770,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
@@ -770,7 +770,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs
entityplayer.playerConnection.sendPacket(new PacketPlayOutUpdateTime(entityplayer.world.getTime(), entityplayer.getPlayerTime(), entityplayer.world.getGameRules().getBoolean("doDaylightCycle"))); // Add support for per player time
}
}
@ -862,7 +868,7 @@ index cc0efa2e0..1b432f0d7 100644
int i;
@@ -827,9 +827,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
@@ -827,9 +827,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs
this.methodProfiler.b();
this.methodProfiler.a("tracker");
@ -872,7 +878,7 @@ index cc0efa2e0..1b432f0d7 100644
this.methodProfiler.b();
this.methodProfiler.b();
// } // CraftBukkit
@@ -838,20 +836,20 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
@@ -838,24 +836,24 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs
}
this.methodProfiler.c("connection");
@ -887,12 +893,18 @@ index cc0efa2e0..1b432f0d7 100644
this.v.tick();
- SpigotTimings.playerListTimer.stopTiming(); // Spigot
+ MinecraftTimings.playerListTimer.stopTiming(); // Spigot
this.methodProfiler.c("commandFunctions");
- SpigotTimings.commandFunctionsTimer.startTiming(); // Spigot
+ MinecraftTimings.commandFunctionsTimer.startTiming(); // Spigot
this.aL().e();
- SpigotTimings.commandFunctionsTimer.stopTiming();// Spigot
+ MinecraftTimings.commandFunctionsTimer.stopTiming(); // Spigot
this.methodProfiler.c("tickables");
- SpigotTimings.tickablesTimer.startTiming(); // Spigot
+ MinecraftTimings.tickablesTimer.startTiming(); // Spigot
for (i = 0; i < this.o.size(); ++i) {
((ITickable) this.o.get(i)).F_();
((ITickable) this.o.get(i)).e();
}
- SpigotTimings.tickablesTimer.stopTiming(); // Spigot
+ MinecraftTimings.tickablesTimer.stopTiming(); // Spigot
@ -900,7 +912,7 @@ index cc0efa2e0..1b432f0d7 100644
this.methodProfiler.b();
}
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index 703d5813d..021dfba14 100644
index eeac34998..e4ed2e991 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -1,5 +1,6 @@
@ -1000,7 +1012,7 @@ index 703d5813d..021dfba14 100644
}
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 9897bade8..27283efad 100644
index 1dbdcfa57..63ea04fb4 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -56,6 +56,7 @@ import org.bukkit.inventory.CraftingInventory;
@ -1011,7 +1023,7 @@ index 9897bade8..27283efad 100644
// CraftBukkit end
public class PlayerConnection implements PacketListenerPlayIn, ITickable {
@@ -1335,7 +1336,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
@@ -1346,7 +1347,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
// CraftBukkit end
private void handleCommand(String s) {
@ -1020,7 +1032,7 @@ index 9897bade8..27283efad 100644
// CraftBukkit start - whole method
if ( org.spigotmc.SpigotConfig.logCommands ) // Spigot
this.LOGGER.info(this.player.getName() + " issued server command: " + s);
@@ -1346,22 +1347,22 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
@@ -1357,22 +1358,22 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
this.server.getPluginManager().callEvent(event);
if (event.isCancelled()) {
@ -1044,7 +1056,7 @@ index 9897bade8..27283efad 100644
}
- org.bukkit.craftbukkit.SpigotTimings.playerCommandTimer.stopTiming(); // Spigot
+ MinecraftTimings.playerCommandTimer.stopTiming(); // Paper
// this.minecraftServer.getCommandHandler().a(this.player, s);
// this.minecraftServer.getCommandHandler().b(this.player, s);
// CraftBukkit end
}
diff --git a/src/main/java/net/minecraft/server/PlayerConnectionUtils.java b/src/main/java/net/minecraft/server/PlayerConnectionUtils.java
@ -1078,7 +1090,7 @@ index f74b06794..1fc632e0c 100644
+ // Paper end
}
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 411720f2d..80bf61164 100644
index f79683a60..4aaf287ae 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -1,5 +1,6 @@
@ -1088,7 +1100,7 @@ index 411720f2d..80bf61164 100644
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
@@ -1174,10 +1175,11 @@ public abstract class PlayerList {
@@ -1197,10 +1198,11 @@ public abstract class PlayerList {
}
public void savePlayers() {
@ -1102,7 +1114,7 @@ index 411720f2d..80bf61164 100644
public void addWhitelist(GameProfile gameprofile) {
diff --git a/src/main/java/net/minecraft/server/StructureGenerator.java b/src/main/java/net/minecraft/server/StructureGenerator.java
index f1f206501..fb350c408 100644
index 74e3f42cd..2580a4cf6 100644
--- a/src/main/java/net/minecraft/server/StructureGenerator.java
+++ b/src/main/java/net/minecraft/server/StructureGenerator.java
@@ -1,5 +1,7 @@
@ -1144,7 +1156,7 @@ index f1f206501..fb350c408 100644
return flag;
}
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
index 6958a2e0f..b3d3df4cf 100644
index 591f4ad7f..e02f0c442 100644
--- a/src/main/java/net/minecraft/server/TileEntity.java
+++ b/src/main/java/net/minecraft/server/TileEntity.java
@@ -4,12 +4,13 @@ import javax.annotation.Nullable;
@ -1164,7 +1176,7 @@ index 6958a2e0f..b3d3df4cf 100644
private static final RegistryMaterials<MinecraftKey, Class<? extends TileEntity>> f = new RegistryMaterials();
protected World world;
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 758962e67..a87b37277 100644
index a366b2d70..eafb76003 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -18,11 +18,11 @@ import com.google.common.collect.Maps;
@ -1180,7 +1192,7 @@ index 758962e67..a87b37277 100644
import org.bukkit.event.block.BlockCanBuildEvent;
import org.bukkit.event.block.BlockPhysicsEvent;
import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason;
@@ -127,7 +127,7 @@ public abstract class World implements IBlockAccess {
@@ -129,7 +129,7 @@ public abstract class World implements IBlockAccess {
public final com.destroystokyo.paper.PaperWorldConfig paperConfig; // Paper
@ -1189,7 +1201,7 @@ index 758962e67..a87b37277 100644
private boolean guardEntityList; // Spigot
public static boolean haveWeSilencedAPhysicsCrash;
public static String blockLocation;
@@ -197,7 +197,7 @@ public abstract class World implements IBlockAccess {
@@ -199,7 +199,7 @@ public abstract class World implements IBlockAccess {
});
this.getServer().addWorld(this.world);
// CraftBukkit end
@ -1198,7 +1210,7 @@ index 758962e67..a87b37277 100644
this.entityLimiter = new org.spigotmc.TickLimiter(spigotConfig.entityMaxTickTime);
this.tileLimiter = new org.spigotmc.TickLimiter(spigotConfig.tileMaxTickTime);
}
@@ -1381,6 +1381,7 @@ public abstract class World implements IBlockAccess {
@@ -1383,6 +1383,7 @@ public abstract class World implements IBlockAccess {
}
this.methodProfiler.c("remove");
@ -1206,7 +1218,7 @@ index 758962e67..a87b37277 100644
this.entityList.removeAll(this.f);
int j;
@@ -1401,6 +1402,7 @@ public abstract class World implements IBlockAccess {
@@ -1403,6 +1404,7 @@ public abstract class World implements IBlockAccess {
this.f.clear();
this.l();
@ -1214,7 +1226,7 @@ index 758962e67..a87b37277 100644
this.methodProfiler.c("regular");
CrashReportSystemDetails crashreportsystemdetails1;
@@ -1410,6 +1412,7 @@ public abstract class World implements IBlockAccess {
@@ -1412,6 +1414,7 @@ public abstract class World implements IBlockAccess {
timings.entityTick.startTiming(); // Spigot
guardEntityList = true; // Spigot
// CraftBukkit start - Use field for loop variable
@ -1222,7 +1234,7 @@ index 758962e67..a87b37277 100644
int entitiesThisCycle = 0;
if (tickPosition < 0) tickPosition = 0;
for (entityLimiter.initTick();
@@ -1431,10 +1434,11 @@ public abstract class World implements IBlockAccess {
@@ -1433,10 +1436,11 @@ public abstract class World implements IBlockAccess {
this.methodProfiler.a("tick");
if (!entity.dead && !(entity instanceof EntityPlayer)) {
try {
@ -1236,7 +1248,7 @@ index 758962e67..a87b37277 100644
crashreport1 = CrashReport.a(throwable1, "Ticking entity");
crashreportsystemdetails1 = crashreport1.a("Entity being ticked");
entity.appendEntityCrashDetails(crashreportsystemdetails1);
@@ -1567,6 +1571,7 @@ public abstract class World implements IBlockAccess {
@@ -1569,6 +1573,7 @@ public abstract class World implements IBlockAccess {
}
timings.tileEntityPending.stopTiming(); // Spigot
@ -1244,7 +1256,7 @@ index 758962e67..a87b37277 100644
this.methodProfiler.b();
this.methodProfiler.b();
}
@@ -1619,7 +1624,6 @@ public abstract class World implements IBlockAccess {
@@ -1621,7 +1626,6 @@ public abstract class World implements IBlockAccess {
entity.ticksLived++;
entity.inactiveTick();
} else {
@ -1252,15 +1264,15 @@ index 758962e67..a87b37277 100644
// CraftBukkit end
entity.M = entity.locX;
entity.N = entity.locY;
@@ -1628,6 +1632,7 @@ public abstract class World implements IBlockAccess {
@@ -1630,6 +1634,7 @@ public abstract class World implements IBlockAccess {
entity.lastPitch = entity.pitch;
if (flag && entity.aa) {
++entity.ticksLived;
+ ++co.aikar.timings.TimingHistory.activatedEntityTicks; // Paper
if (entity.isPassenger()) {
entity.aw();
entity.leaveVehicle();
} else {
@@ -1687,8 +1692,6 @@ public abstract class World implements IBlockAccess {
@@ -1689,8 +1694,6 @@ public abstract class World implements IBlockAccess {
}
}
}
@ -1270,10 +1282,10 @@ index 758962e67..a87b37277 100644
}
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 391a09c52..966938997 100644
index c48a16682..6856aac64 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -247,13 +247,13 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@@ -256,13 +256,13 @@ public class WorldServer extends World implements IAsyncTaskHandler {
timings.doChunkUnload.stopTiming(); // Spigot
this.methodProfiler.c("tickPending");
@ -1291,7 +1303,7 @@ index 391a09c52..966938997 100644
this.methodProfiler.c("chunkMap");
timings.doChunkMap.startTiming(); // Spigot
this.manager.flush();
@@ -469,7 +469,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@@ -478,7 +478,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
}
}
@ -1300,7 +1312,7 @@ index 391a09c52..966938997 100644
if (i > 0) {
ChunkSection[] achunksection = chunk.getSections();
int i1 = achunksection.length;
@@ -497,6 +497,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@@ -506,6 +506,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
}
}
}
@ -1308,7 +1320,7 @@ index 391a09c52..966938997 100644
}
this.methodProfiler.b();
@@ -692,6 +693,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@@ -691,6 +692,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
this.methodProfiler.a("cleaning");
@ -1316,19 +1328,20 @@ index 391a09c52..966938997 100644
NextTickListEntry nextticklistentry;
for (int j = 0; j < i; ++j) {
@@ -705,9 +707,11 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@@ -704,10 +706,12 @@ public class WorldServer extends World implements IAsyncTaskHandler {
// this.nextTickListHash.remove(nextticklistentry);
this.U.add(nextticklistentry);
this.W.add(nextticklistentry);
}
+ timings.scheduledBlocksCleanup.stopTiming(); // Paper
this.methodProfiler.b();
this.methodProfiler.a("ticking");
Iterator iterator = this.W.iterator();
+ timings.scheduledBlocksTicking.startTiming(); // Paper
Iterator iterator = this.U.iterator();
while (iterator.hasNext()) {
@@ -717,6 +721,8 @@ public class WorldServer extends World implements IAsyncTaskHandler {
nextticklistentry = (NextTickListEntry) iterator.next();
@@ -716,6 +720,8 @@ public class WorldServer extends World implements IAsyncTaskHandler {
if (this.areChunksLoadedBetween(nextticklistentry.a.a(0, 0, 0), nextticklistentry.a.a(0, 0, 0))) {
IBlockData iblockdata = this.getType(nextticklistentry.a);
@ -1337,7 +1350,7 @@ index 391a09c52..966938997 100644
if (iblockdata.getMaterial() != Material.AIR && Block.a(iblockdata.getBlock(), nextticklistentry.a())) {
try {
@@ -729,10 +735,12 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@@ -728,10 +734,12 @@ public class WorldServer extends World implements IAsyncTaskHandler {
throw new ReportedException(crashreport);
}
}
@ -1349,8 +1362,8 @@ index 391a09c52..966938997 100644
+ timings.scheduledBlocksTicking.stopTiming(); // Paper
this.methodProfiler.b();
this.U.clear();
@@ -828,7 +836,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
this.W.clear();
@@ -827,7 +835,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
gen = new org.bukkit.craftbukkit.generator.NormalChunkGenerator(this, this.getSeed());
}
@ -1359,7 +1372,7 @@ index 391a09c52..966938997 100644
// CraftBukkit end
}
@@ -993,6 +1001,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@@ -992,6 +1000,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
if (chunkproviderserver.e()) {
org.bukkit.Bukkit.getPluginManager().callEvent(new org.bukkit.event.world.WorldSaveEvent(getWorld())); // CraftBukkit
@ -1367,7 +1380,7 @@ index 391a09c52..966938997 100644
if (iprogressupdate != null) {
iprogressupdate.a("Saving level");
}
@@ -1002,7 +1011,9 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@@ -1001,7 +1010,9 @@ public class WorldServer extends World implements IAsyncTaskHandler {
iprogressupdate.c("Saving chunks");
}
@ -1377,7 +1390,7 @@ index 391a09c52..966938997 100644
// CraftBukkit - ArrayList -> Collection
Collection arraylist = chunkproviderserver.a();
Iterator iterator = arraylist.iterator();
@@ -1014,7 +1025,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@@ -1013,7 +1024,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
chunkproviderserver.unload(chunk);
}
}
@ -1386,7 +1399,7 @@ index 391a09c52..966938997 100644
}
}
@@ -1027,6 +1038,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@@ -1026,6 +1037,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
}
protected void a() throws ExceptionWorldConflict {
@ -1394,7 +1407,7 @@ index 391a09c52..966938997 100644
this.checkSession();
WorldServer[] aworldserver = this.server.worldServer;
int i = aworldserver.length;
@@ -1056,6 +1068,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@@ -1055,6 +1067,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
this.worldData.e(this.getWorldBorder().i());
this.dataManager.saveWorldData(this.worldData, this.server.getPlayerList().t());
this.worldMaps.a();
@ -1403,10 +1416,10 @@ index 391a09c52..966938997 100644
// CraftBukkit start
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 587d23dfd..d27e2ce98 100644
index 440b23cf5..42d3dd542 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1741,6 +1741,7 @@ public final class CraftServer implements Server {
@@ -1727,6 +1727,7 @@ public final class CraftServer implements Server {
private final Spigot spigot = new Spigot()
{
@ -1414,7 +1427,7 @@ index 587d23dfd..d27e2ce98 100644
@Override
public YamlConfiguration getConfig()
{
@@ -1748,6 +1749,24 @@ public final class CraftServer implements Server {
@@ -1734,6 +1735,24 @@ public final class CraftServer implements Server {
}
@Override
@ -1441,10 +1454,10 @@ index 587d23dfd..d27e2ce98 100644
}
diff --git a/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java b/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java
deleted file mode 100644
index 41d2d87ee..000000000
index 311a2c3f6..000000000
--- a/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java
+++ /dev/null
@@ -1,173 +0,0 @@
@@ -1,174 +0,0 @@
-package org.bukkit.craftbukkit;
-
-import com.google.common.collect.Maps;
@ -1462,6 +1475,7 @@ index 41d2d87ee..000000000
-
- public static final CustomTimingsHandler serverTickTimer = new CustomTimingsHandler("** Full Server Tick");
- public static final CustomTimingsHandler playerListTimer = new CustomTimingsHandler("Player List");
- public static final CustomTimingsHandler commandFunctionsTimer = new CustomTimingsHandler("Command Functions");
- public static final CustomTimingsHandler connectionTimer = new CustomTimingsHandler("Connection Handler");
- public static final CustomTimingsHandler tickablesTimer = new CustomTimingsHandler("Tickables");
- public static final CustomTimingsHandler schedulerTimer = new CustomTimingsHandler("Scheduler");
@ -1663,10 +1677,10 @@ index 3a95b4465..b5efb9c3f 100644
public void callStage3(QueuedChunk queuedChunk, Chunk chunk, Runnable runnable) throws RuntimeException {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 0c8295435..f4d71683a 100644
index e6dcddc64..433aafb33 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -39,15 +39,9 @@ import org.bukkit.configuration.serialization.DelegateDeserialization;
@@ -39,7 +39,7 @@ import org.bukkit.configuration.serialization.DelegateDeserialization;
import org.bukkit.conversations.Conversation;
import org.bukkit.conversations.ConversationAbandonedEvent;
import org.bukkit.conversations.ManuallyAbandonedConversationCanceller;
@ -1674,16 +1688,8 @@ index 0c8295435..f4d71683a 100644
+import org.bukkit.craftbukkit.*;
import org.bukkit.craftbukkit.block.CraftSign;
import org.bukkit.craftbukkit.conversations.ConversationTracker;
-import org.bukkit.craftbukkit.CraftEffect;
-import org.bukkit.craftbukkit.CraftOfflinePlayer;
-import org.bukkit.craftbukkit.CraftServer;
-import org.bukkit.craftbukkit.CraftSound;
-import org.bukkit.craftbukkit.CraftStatistic;
-import org.bukkit.craftbukkit.CraftWorld;
import org.bukkit.craftbukkit.map.CraftMapView;
import org.bukkit.craftbukkit.map.RenderData;
import org.bukkit.craftbukkit.scoreboard.CraftScoreboard;
@@ -1595,6 +1589,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
import org.bukkit.craftbukkit.CraftEffect;
@@ -1587,6 +1587,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
packet.components = components;
getHandle().playerConnection.sendPacket(packet);
}
@ -1867,7 +1873,7 @@ index e52ef47b7..3d90b3426 100644
this.value = value;
}
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
index c32d44df0..5c2fb0058 100644
index be23631b2..9eb36f3e9 100644
--- a/src/main/java/org/spigotmc/ActivationRange.java
+++ b/src/main/java/org/spigotmc/ActivationRange.java
@@ -29,7 +29,7 @@ import net.minecraft.server.EntityWither;
@ -1929,5 +1935,5 @@ index c32d44df0..5c2fb0058 100644
}
}
--
2.12.2.windows.2
2.13.0

Datei anzeigen

@ -1,4 +1,4 @@
From ffac25bb34932ef90c85baca9c77303e9ccf3702 Mon Sep 17 00:00:00 2001
From fbea6e7aa23f4b7e63d3ad5671c1bc18a1e4189d Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 1 Mar 2016 12:45:11 -0600
Subject: [PATCH] Configurable squid spawn ranges
@ -22,18 +22,18 @@ index 621bf7051..f24839378 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/EntitySquid.java b/src/main/java/net/minecraft/server/EntitySquid.java
index 549e3434b..bc0652874 100644
index 20b71b455..ee8e50706 100644
--- a/src/main/java/net/minecraft/server/EntitySquid.java
+++ b/src/main/java/net/minecraft/server/EntitySquid.java
@@ -141,7 +141,7 @@ public class EntitySquid extends EntityWaterAnimal {
}
public boolean cM() {
- return this.locY > 45.0D && this.locY < (double) this.world.K() && super.cM();
+ return this.locY > world.paperConfig.squidMinSpawnHeight && this.locY < world.paperConfig.squidMaxSpawnHeight && super.cM(); // Paper - Configurable squid spawn height range
public boolean P() {
- return this.locY > 45.0D && this.locY < (double) this.world.getSeaLevel() && super.P();
+ return this.locY > world.paperConfig.squidMinSpawnHeight && this.locY < world.paperConfig.squidMaxSpawnHeight && super.P(); // Paper - Configurable squid spawn height range
}
public void b(float f, float f1, float f2) {
--
2.12.0.windows.1
2.13.0

Datei anzeigen

@ -1,4 +1,4 @@
From 4f7e02a3e570583d2510848d700901e72de644c8 Mon Sep 17 00:00:00 2001
From 729eb0ea88be715b9a00822f01f963c86361ecd0 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 1 Mar 2016 13:09:16 -0600
Subject: [PATCH] Configurable baby zombie movement speed
@ -20,7 +20,7 @@ index 6228bc1f6..fe9e7b342 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java
index 497d5593c..897882c97 100644
index 36afc8f07..bf059a746 100644
--- a/src/main/java/net/minecraft/server/EntityZombie.java
+++ b/src/main/java/net/minecraft/server/EntityZombie.java
@@ -16,7 +16,7 @@ public class EntityZombie extends EntityMonster {
@ -29,9 +29,9 @@ index 497d5593c..897882c97 100644
private static final UUID b = UUID.fromString("B9766B59-9566-4402-BC1F-2EE2A276D836");
- private static final AttributeModifier c = new AttributeModifier(EntityZombie.b, "Baby speed boost", 0.5D, 1);
+ private final AttributeModifier c = new AttributeModifier(EntityZombie.b, "Baby speed boost", world.paperConfig.babyZombieMovementSpeed, 1); // Paper - Remove static - Make baby speed configurable
private static final DataWatcherObject<Boolean> bw = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.h);
private static final DataWatcherObject<Integer> bx = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.b);
private static final DataWatcherObject<Boolean> by = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.h);
private static final DataWatcherObject<Boolean> bx = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.h);
private static final DataWatcherObject<Integer> by = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.b);
private static final DataWatcherObject<Boolean> bz = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.h);
@@ -102,9 +102,9 @@ public class EntityZombie extends EntityMonster {
if (this.world != null && !this.world.isClientSide) {
AttributeInstance attributeinstance = this.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED);
@ -45,5 +45,5 @@ index 497d5593c..897882c97 100644
}
--
2.12.0.windows.1
2.13.0

Datei anzeigen

@ -1,4 +1,4 @@
From 6601ad2f54c73981b4fe6198097e131cb22f75e4 Mon Sep 17 00:00:00 2001
From a2b70ad6f16f9f9ed468870ddc0e36ad7200ed59 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 1 Mar 2016 13:24:16 -0600
Subject: [PATCH] Allow nerfed mobs to jump
@ -31,18 +31,18 @@ index 4f2fa59ac..8af52a61f 100644
this.b.l(this.a);
this.a = false;
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
index 48ff4c811..c23bd2e9b 100644
index 254955156..09e5408ac 100644
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
@@ -44,6 +44,7 @@ public abstract class EntityInsentient extends EntityLiving {
private boolean bD;
private boolean bE;
private Entity leashHolder;
private NBTTagCompound bF;
private NBTTagCompound bG;
+ public PathfinderGoalFloat goalFloat; // Paper
public EntityInsentient(World world) {
super(world);
@@ -645,6 +646,12 @@ public abstract class EntityInsentient extends EntityLiving {
@@ -641,6 +642,12 @@ public abstract class EntityInsentient extends EntityLiving {
// Spigot Start
if ( this.fromMobSpawner )
{
@ -56,21 +56,24 @@ index 48ff4c811..c23bd2e9b 100644
}
// Spigot End
diff --git a/src/main/java/net/minecraft/server/PathfinderGoalFloat.java b/src/main/java/net/minecraft/server/PathfinderGoalFloat.java
index e3b405856..2d27aa63a 100644
index b3b303b3b..fc8be86fd 100644
--- a/src/main/java/net/minecraft/server/PathfinderGoalFloat.java
+++ b/src/main/java/net/minecraft/server/PathfinderGoalFloat.java
@@ -6,14 +6,17 @@ public class PathfinderGoalFloat extends PathfinderGoal {
@@ -6,6 +6,7 @@ public class PathfinderGoalFloat extends PathfinderGoal {
public PathfinderGoalFloat(EntityInsentient entityinsentient) {
this.a = entityinsentient;
+ if (entityinsentient.fromMobSpawner && entityinsentient.getWorld().paperConfig.nerfedMobsShouldJump) entityinsentient.goalFloat = this; // Paper
this.a(4);
if (entityinsentient.getNavigation() instanceof Navigation) {
((Navigation) entityinsentient.getNavigation()).c(true);
@@ -15,10 +16,12 @@ public class PathfinderGoalFloat extends PathfinderGoal {
}
+ public boolean validConditions() { return this.a(); } // Paper - OBFHELPER
public boolean a() {
return this.a.isInWater() || this.a.ao();
return this.a.isInWater() || this.a.au();
}
+ public void update() { this.e(); } // Paper - OBFHELPER
@ -78,5 +81,5 @@ index e3b405856..2d27aa63a 100644
if (this.a.getRandom().nextFloat() < 0.8F) {
this.a.getControllerJump().a();
--
2.12.1.windows.1
2.13.0

Datei anzeigen

@ -1,4 +1,4 @@
From 71ef92829982f9b99e1b96d8e903a5064341ff03 Mon Sep 17 00:00:00 2001
From 10fdbe916be252c01a51a6b68695eaa90e5619f1 Mon Sep 17 00:00:00 2001
From: Suddenly <suddenly@suddenly.coffee>
Date: Tue, 1 Mar 2016 13:51:54 -0600
Subject: [PATCH] Add configurable despawn distances for living entities
@ -30,10 +30,10 @@ index 5f13fbff3..4b64ccaa0 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
index c23bd2e9b..a9e3b632b 100644
index 09e5408ac..be3422adc 100644
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
@@ -624,13 +624,13 @@ public abstract class EntityInsentient extends EntityLiving {
@@ -620,13 +620,13 @@ public abstract class EntityInsentient extends EntityLiving {
double d2 = entityhuman.locZ - this.locZ;
double d3 = d0 * d0 + d1 * d1 + d2 * d2;
@ -51,5 +51,5 @@ index c23bd2e9b..a9e3b632b 100644
}
}
--
2.12.1.windows.1
2.13.0

Datei anzeigen

@ -1,4 +1,4 @@
From 93cedb6f2ccf3c12457a4f0662bfc01ba6aacdfb Mon Sep 17 00:00:00 2001
From 63f3013587dc1e8a42ed59e62d6b6bb5225a91dc Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Thu, 3 Mar 2016 03:53:43 -0600
Subject: [PATCH] Allow for toggling of spawn chunks
@ -20,10 +20,10 @@ index 4b64ccaa0..7ac6a5f1f 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index a87b37277..edd6c3b5e 100644
index eafb76003..1ff2263eb 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -198,6 +198,7 @@ public abstract class World implements IBlockAccess {
@@ -200,6 +200,7 @@ public abstract class World implements IBlockAccess {
this.getServer().addWorld(this.world);
// CraftBukkit end
timings = new co.aikar.timings.WorldTimingsHandler(this); // Paper - code below can generate new world and access timings
@ -32,5 +32,5 @@ index a87b37277..edd6c3b5e 100644
this.tileLimiter = new org.spigotmc.TickLimiter(spigotConfig.tileMaxTickTime);
}
--
2.12.0.windows.1
2.13.0

Datei anzeigen

@ -1,4 +1,4 @@
From c626ab09022ba5bd9efab830624989ecffdcc36a Mon Sep 17 00:00:00 2001
From 289d49cb724c7f24f635dfb88410a2b490a80629 Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net>
Date: Tue, 1 Mar 2016 14:14:15 -0600
Subject: [PATCH] Drop falling block and tnt entities at the specified height
@ -23,11 +23,23 @@ index 7ac6a5f1f..8cdeb34d4 100644
+ if (entityTNTHeightNerf != 0) log("TNT Entity Height Limit set to Y: " + entityTNTHeightNerf);
+ }
}
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index c6b7d6c22..bbbd1689e 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -1745,6 +1745,7 @@ public abstract class Entity implements ICommandListener {
return this.a(new ItemStack(item, i, 0), f);
}
+ @Nullable public final EntityItem dropItem(ItemStack itemstack, float offset) { return this.a(itemstack, offset); } // Paper - OBFHELPER
@Nullable
public EntityItem a(ItemStack itemstack, float f) {
if (itemstack.isEmpty()) {
diff --git a/src/main/java/net/minecraft/server/EntityFallingBlock.java b/src/main/java/net/minecraft/server/EntityFallingBlock.java
index 5c5038402..4c168d333 100644
index 3c7488965..0fd29b17e 100644
--- a/src/main/java/net/minecraft/server/EntityFallingBlock.java
+++ b/src/main/java/net/minecraft/server/EntityFallingBlock.java
@@ -80,6 +80,16 @@ public class EntityFallingBlock extends Entity {
@@ -84,6 +84,17 @@ public class EntityFallingBlock extends Entity {
}
this.move(EnumMoveType.SELF, this.motX, this.motY, this.motZ);
@ -35,20 +47,21 @@ index 5c5038402..4c168d333 100644
+ // Paper start - Configurable EntityFallingBlock height nerf
+ if (this.world.paperConfig.fallingBlockHeightNerf != 0 && this.locY > this.world.paperConfig.fallingBlockHeightNerf) {
+ if (this.dropItem && this.world.getGameRules().getBoolean("doEntityDrops")) {
+ this.a(new ItemStack(block, 1, block.getDropData(this.block)), 0.0F);
+ this.dropItem(new ItemStack(block, 1, block.getDropData(this.block)), 0.0F);
+ }
+
+ this.die();
+ }
+ // Paper end
this.motX *= 0.9800000190734863D;
this.motY *= 0.9800000190734863D;
this.motZ *= 0.9800000190734863D;
+
if (!this.world.isClientSide) {
blockposition = new BlockPosition(this);
boolean flag = this.block.getBlock() == Blocks.dS;
diff --git a/src/main/java/net/minecraft/server/EntityTNTPrimed.java b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
index 0fbdbd69b..fd0735611 100644
index 44b2d4735..0d70dd1d2 100644
--- a/src/main/java/net/minecraft/server/EntityTNTPrimed.java
+++ b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
@@ -56,6 +56,13 @@ public class EntityTNTPrimed extends Entity {
@@ -57,6 +57,13 @@ public class EntityTNTPrimed extends Entity {
}
this.move(EnumMoveType.SELF, this.motX, this.motY, this.motZ);
@ -63,5 +76,5 @@ index 0fbdbd69b..fd0735611 100644
this.motY *= 0.9800000190734863D;
this.motZ *= 0.9800000190734863D;
--
2.12.0.windows.1
2.13.0

Datei anzeigen

@ -1,4 +1,4 @@
From 8936094d98b21ebe52e725f7c1ac99e196a8822a Mon Sep 17 00:00:00 2001
From 2648079c107410003372409a96c7ef61f035b661 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 1 Mar 2016 14:32:43 -0600
Subject: [PATCH] Show 'Paper' in client crashes, server lists, and Mojang
@ -6,7 +6,7 @@ Subject: [PATCH] Show 'Paper' in client crashes, server lists, and Mojang
diff --git a/src/main/java/net/minecraft/server/EULA.java b/src/main/java/net/minecraft/server/EULA.java
index a8b507961..ebbc1fcaf 100644
index 8361888c2..3623751bf 100644
--- a/src/main/java/net/minecraft/server/EULA.java
+++ b/src/main/java/net/minecraft/server/EULA.java
@@ -51,7 +51,8 @@ public class EULA {
@ -17,13 +17,13 @@ index a8b507961..ebbc1fcaf 100644
+ properties.store(fileoutputstream, "By changing the setting below to TRUE you are indicating your agreement to our EULA (https://account.mojang.com/documents/minecraft_eula)." +
+ "\nand also agreeing that tacos are tasty."); // Paper - fix lag
} catch (Exception exception) {
EULA.a.warn("Failed to save {}", new Object[] { this.b, exception});
EULA.a.warn("Failed to save {}", this.b, exception);
} finally {
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 8f7b148a1..7539bb215 100644
index e847f3f1a..577a1b92a 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1042,7 +1042,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
@@ -1046,7 +1046,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs
}
public String getServerModName() {
@ -33,10 +33,10 @@ index 8f7b148a1..7539bb215 100644
public CrashReport b(CrashReport crashreport) {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 38ce05828..24fd62b53 100644
index 42d3dd542..a06b7f325 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -135,7 +135,7 @@ import net.md_5.bungee.api.chat.BaseComponent;
@@ -134,7 +134,7 @@ import net.md_5.bungee.api.chat.BaseComponent;
public final class CraftServer implements Server {
private static final Player[] EMPTY_PLAYER_ARRAY = new Player[0];
@ -80,5 +80,5 @@ index 94a3d4237..3ed983cc0 100644
log.log( Level.SEVERE, "------------------------------" );
//
--
2.12.0.windows.1
2.13.0

Datei anzeigen

@ -1,15 +1,15 @@
From 3cba9d06727dbd8332e08f22fa33572434be2c51 Mon Sep 17 00:00:00 2001
From 6ca60e1e0afcb2035f962b12d6079ca9a3347d28 Mon Sep 17 00:00:00 2001
From: Jedediah Smith <jedediah@silencegreys.com>
Date: Tue, 1 Mar 2016 14:47:52 -0600
Subject: [PATCH] Player affects spawning API
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index ec8f581ad..43e28d61c 100644
index fc3d05394..b4507fe0c 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -63,6 +63,7 @@ public abstract class EntityHuman extends EntityLiving {
private final ItemCooldown bV;
@@ -65,6 +65,7 @@ public abstract class EntityHuman extends EntityLiving {
private final ItemCooldown bX;
@Nullable
public EntityFishingHook hookedFish;
+ public boolean affectsSpawning = true;
@ -17,10 +17,10 @@ index ec8f581ad..43e28d61c 100644
// CraftBukkit start
public boolean fauxSleeping;
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
index a9e3b632b..1d26555d3 100644
index be3422adc..2802cc062 100644
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
@@ -618,7 +618,7 @@ public abstract class EntityInsentient extends EntityLiving {
@@ -614,7 +614,7 @@ public abstract class EntityInsentient extends EntityLiving {
} else {
EntityHuman entityhuman = this.world.findNearbyPlayer(this, -1.0D);
@ -30,12 +30,12 @@ index a9e3b632b..1d26555d3 100644
double d1 = entityhuman.locY - this.locY;
double d2 = entityhuman.locZ - this.locZ;
diff --git a/src/main/java/net/minecraft/server/EntitySilverfish.java b/src/main/java/net/minecraft/server/EntitySilverfish.java
index 5af51cc0a..7531c9ba9 100644
index dcc251e31..d8344ddc9 100644
--- a/src/main/java/net/minecraft/server/EntitySilverfish.java
+++ b/src/main/java/net/minecraft/server/EntitySilverfish.java
@@ -99,8 +99,7 @@ public class EntitySilverfish extends EntityMonster {
public boolean cM() {
if (super.cM()) {
public boolean P() {
if (super.P()) {
EntityHuman entityhuman = this.world.b(this, 5.0D);
-
- return entityhuman == null;
@ -44,7 +44,7 @@ index 5af51cc0a..7531c9ba9 100644
return false;
}
diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java
index b23c0be2a..e42a0c776 100644
index 4c65dc0a9..c56a8e9c2 100644
--- a/src/main/java/net/minecraft/server/SpawnerCreature.java
+++ b/src/main/java/net/minecraft/server/SpawnerCreature.java
@@ -52,7 +52,7 @@ public final class SpawnerCreature {
@ -57,10 +57,10 @@ index b23c0be2a..e42a0c776 100644
j = MathHelper.floor(entityhuman.locZ / 16.0D);
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index edd6c3b5e..751fc01d1 100644
index 1ff2263eb..b87273aca 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -2722,7 +2722,7 @@ public abstract class World implements IBlockAccess {
@@ -2724,7 +2724,7 @@ public abstract class World implements IBlockAccess {
for (int i = 0; i < this.players.size(); ++i) {
EntityHuman entityhuman = (EntityHuman) this.players.get(i);
@ -70,14 +70,13 @@ index edd6c3b5e..751fc01d1 100644
if (d3 < 0.0D || d4 < d3 * d3) {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index b56ae7a36..6509df573 100644
index 433aafb33..c5924a2be 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1458,6 +1458,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1456,6 +1456,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
return new CraftAdvancementProgress(craft, data, progress);
}
+ @Override
+ public void setAffectsSpawning(boolean affects) {
+ this.getHandle().affectsSpawning = affects;
+ }
@ -91,5 +90,5 @@ index b56ae7a36..6509df573 100644
private final Player.Spigot spigot = new Player.Spigot()
{
--
2.12.1.windows.1
2.13.0

Datei anzeigen

@ -1,11 +1,11 @@
From 25724130e87f1b906d5143058d200b6d04b59e18 Mon Sep 17 00:00:00 2001
From ca3dd164ec111c629ea4e92778c786d2d9a61ba2 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 1 Mar 2016 22:01:19 -0600
Subject: [PATCH] Optimize TileEntity Ticking
diff --git a/src/main/java/net/minecraft/server/TileEntityChest.java b/src/main/java/net/minecraft/server/TileEntityChest.java
index 28a514a64..60452e83b 100644
index af8c2cfa8..3cf80495e 100644
--- a/src/main/java/net/minecraft/server/TileEntityChest.java
+++ b/src/main/java/net/minecraft/server/TileEntityChest.java
@@ -8,17 +8,17 @@ import org.bukkit.craftbukkit.entity.CraftHumanEntity;
@ -36,7 +36,7 @@ index 28a514a64..60452e83b 100644
@@ -190,6 +190,8 @@ public class TileEntityChest extends TileEntityLootable implements ITickable {
}
public void F_() {
public void e() {
+ // Paper - Disable all of this, just in case this does get ticked
+ /*
this.o();
@ -74,7 +74,7 @@ index 28a514a64..60452e83b 100644
+ d1 += 0.5D;
+ }
+
+ this.world.a((EntityHuman) null, d1, (double) this.position.getY() + 0.5D, d0, SoundEffects.Z, SoundCategory.BLOCKS, 0.5F, this.world.random.nextFloat() * 0.1F + 0.9F);
+ this.world.a((EntityHuman) null, d1, (double) this.position.getY() + 0.5D, d0, SoundEffects.ac, SoundCategory.BLOCKS, 0.5F, this.world.random.nextFloat() * 0.1F + 0.9F);
+ }
+ // Paper end
+
@ -108,7 +108,7 @@ index 28a514a64..60452e83b 100644
+ d0 += 0.5D;
+ }
+
+ this.world.a((EntityHuman) null, d0, (double) yLoc + 0.5D, d2, SoundEffects.X, SoundCategory.BLOCKS, 0.5F, this.world.random.nextFloat() * 0.1F + 0.9F);
+ this.world.a((EntityHuman) null, d0, (double) yLoc + 0.5D, d2, SoundEffects.aa, SoundCategory.BLOCKS, 0.5F, this.world.random.nextFloat() * 0.1F + 0.9F);
+ this.j = 0.0F;
+ }
+ // Paper end
@ -117,7 +117,7 @@ index 28a514a64..60452e83b 100644
this.world.applyPhysics(this.position, this.getBlock(), false);
diff --git a/src/main/java/net/minecraft/server/TileEntityEnderChest.java b/src/main/java/net/minecraft/server/TileEntityEnderChest.java
index 3d61c2d68..586ceaa67 100644
index 31585757b..1c1741c56 100644
--- a/src/main/java/net/minecraft/server/TileEntityEnderChest.java
+++ b/src/main/java/net/minecraft/server/TileEntityEnderChest.java
@@ -1,15 +1,17 @@
@ -135,7 +135,7 @@ index 3d61c2d68..586ceaa67 100644
public TileEntityEnderChest() {}
public void F_() {
public void e() {
+ // Paper start - Disable all of this, just in case this does get ticked
+ /*
if (++this.h % 20 * 4 == 0) {
@ -162,14 +162,14 @@ index 3d61c2d68..586ceaa67 100644
+ double d1 = (double) this.getPosition().getX() + 0.5D;
+ double d0 = (double) this.getPosition().getZ() + 0.5D;
+
+ this.world.a((EntityHuman) null, d1, (double) this.getPosition().getY() + 0.5D, d0, SoundEffects.aQ, SoundCategory.BLOCKS, 0.5F, this.world.random.nextFloat() * 0.1F + 0.9F);
+ this.world.a((EntityHuman) null, d1, (double) this.getPosition().getY() + 0.5D, d0, SoundEffects.aT, SoundCategory.BLOCKS, 0.5F, this.world.random.nextFloat() * 0.1F + 0.9F);
+ }
+ // Paper end
+
this.world.playBlockAction(this.position, Blocks.ENDER_CHEST, 1, this.g);
}
public void e() {
public void f() {
--this.g;
+
+ // Paper start - Move enderchest close sounds out of the tick loop
@ -177,7 +177,7 @@ index 3d61c2d68..586ceaa67 100644
+ double d0 = (double) this.getPosition().getX() + 0.5D;
+ double d2 = (double) this.getPosition().getZ() + 0.5D;
+
+ this.world.a((EntityHuman) null, d0, (double) this.getPosition().getY() + 0.5D, d2, SoundEffects.aP, SoundCategory.BLOCKS, 0.5F, this.world.random.nextFloat() * 0.1F + 0.9F);
+ this.world.a((EntityHuman) null, d0, (double) this.getPosition().getY() + 0.5D, d2, SoundEffects.aS, SoundCategory.BLOCKS, 0.5F, this.world.random.nextFloat() * 0.1F + 0.9F);
+ this.a = 0.0F;
+ }
+ // Paper end
@ -186,5 +186,5 @@ index 3d61c2d68..586ceaa67 100644
}
--
2.12.2
2.13.0

Datei anzeigen

@ -1,4 +1,4 @@
From dff249a4a075a2bab36f65251537d6b8882e0768 Mon Sep 17 00:00:00 2001
From 46d88a1e4205ca1ee13725c24884d9ad9bf6b600 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 1 Mar 2016 23:09:29 -0600
Subject: [PATCH] Further improve server tick loop
@ -12,10 +12,10 @@ Previous implementation did not calculate TPS correctly.
Switch to a realistic rolling average and factor in std deviation as an extra reporting variable
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index d9e4f1a9f..c4497aaa6 100644
index 577a1b92a..995542ab9 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -113,16 +113,12 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
@@ -113,16 +113,12 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs
public org.bukkit.command.ConsoleCommandSender console;
public org.bukkit.command.RemoteConsoleCommandSender remoteConsole;
public ConsoleReader reader;
@ -33,7 +33,7 @@ index d9e4f1a9f..c4497aaa6 100644
public final SlackActivityAccountant slackActivityAccountant = new SlackActivityAccountant();
// Spigot end
@@ -533,12 +529,54 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
@@ -533,12 +529,54 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs
this.isRunning = false;
}
@ -93,7 +93,7 @@ index d9e4f1a9f..c4497aaa6 100644
public void run() {
try {
@@ -552,24 +590,41 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
@@ -552,24 +590,41 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs
// Spigot start
Arrays.fill( recentTps, 20 );
@ -147,10 +147,10 @@ index d9e4f1a9f..c4497aaa6 100644
}
lastTick = curTime;
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index db4ac484f..0f77d0674 100644
index a06b7f325..e5dcd4094 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1738,6 +1738,17 @@ public final class CraftServer implements Server {
@@ -1724,6 +1724,17 @@ public final class CraftServer implements Server {
return CraftMagicNumbers.INSTANCE;
}
@ -210,5 +210,5 @@ index be2e31dea..6d21c3269 100644
return ( ( tps > 18.0 ) ? ChatColor.GREEN : ( tps > 16.0 ) ? ChatColor.YELLOW : ChatColor.RED ).toString()
+ ( ( tps > 20.0 ) ? "*" : "" ) + Math.min( Math.round( tps * 100.0 ) / 100.0, 20.0 );
--
2.12.2
2.13.0

Datei anzeigen

@ -1,14 +1,14 @@
From a876defc63064db6b4c54a0af7cc133dd2479aec Mon Sep 17 00:00:00 2001
From a84b405e20bf60222b6a5f9608c84a3918686512 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 1 Mar 2016 23:12:03 -0600
Subject: [PATCH] Only refresh abilities if needed
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 6509df573..87ac74420 100644
index c5924a2be..94cca69a4 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1174,12 +1174,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1161,12 +1161,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override
public void setFlying(boolean value) {
@ -24,5 +24,5 @@ index 6509df573..87ac74420 100644
@Override
--
2.12.2
2.13.0

Datei anzeigen

@ -1,14 +1,14 @@
From 1f83e96b7750ff012aa3510df4eba6f2f25efde8 Mon Sep 17 00:00:00 2001
From c1ba97de870d45dada1e69a8d76ba8e4e0c12429 Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net>
Date: Tue, 1 Mar 2016 23:45:08 -0600
Subject: [PATCH] Entity Origin API
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 14d23556f..313100aed 100644
index bbbd1689e..3dff98596 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -147,6 +147,7 @@ public abstract class Entity implements ICommandListener {
@@ -148,6 +148,7 @@ public abstract class Entity implements ICommandListener {
public org.bukkit.projectiles.ProjectileSource projectileSource; // CraftBukkit - For projectiles only
public boolean forceExplosionKnockback; // CraftBukkit - SPIGOT-949
public Timing tickTimer = MinecraftTimings.getEntityTimings(this); // Paper
@ -16,7 +16,7 @@ index 14d23556f..313100aed 100644
// Spigot start
public final byte activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this);
public final boolean defaultActivationState;
@@ -1513,6 +1514,11 @@ public abstract class Entity implements ICommandListener {
@@ -1539,6 +1540,11 @@ public abstract class Entity implements ICommandListener {
}
}
@ -28,21 +28,21 @@ index 14d23556f..313100aed 100644
return nbttagcompound;
} catch (Throwable throwable) {
CrashReport crashreport = CrashReport.a(throwable, "Saving entity NBT");
@@ -1657,6 +1663,13 @@ public abstract class Entity implements ICommandListener {
@@ -1683,6 +1689,13 @@ public abstract class Entity implements ICommandListener {
}
// CraftBukkit end
+ // Paper start - Restore the entity's origin location
+ NBTTagList originTag = nbttagcompound.getList("Paper.Origin", 6);
+ if (!originTag.isEmpty()) {
+ origin = new Location(world.getWorld(), originTag.e(0), originTag.e(1), originTag.e(2));
+ origin = new Location(world.getWorld(), originTag.getDoubleAt(0), originTag.getDoubleAt(1), originTag.getDoubleAt(2));
+ }
+ // Paper end
+
} catch (Throwable throwable) {
CrashReport crashreport = CrashReport.a(throwable, "Loading entity NBT");
CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Entity being loaded");
@@ -1681,6 +1694,7 @@ public abstract class Entity implements ICommandListener {
@@ -1707,6 +1720,7 @@ public abstract class Entity implements ICommandListener {
protected abstract void b(NBTTagCompound nbttagcompound);
@ -51,10 +51,10 @@ index 14d23556f..313100aed 100644
NBTTagList nbttaglist = new NBTTagList();
double[] adouble1 = adouble;
diff --git a/src/main/java/net/minecraft/server/EntityFallingBlock.java b/src/main/java/net/minecraft/server/EntityFallingBlock.java
index 4c168d333..307a44c85 100644
index 0fd29b17e..18e7cf2ad 100644
--- a/src/main/java/net/minecraft/server/EntityFallingBlock.java
+++ b/src/main/java/net/minecraft/server/EntityFallingBlock.java
@@ -247,6 +247,14 @@ public class EntityFallingBlock extends Entity {
@@ -267,6 +267,14 @@ public class EntityFallingBlock extends Entity {
this.block = Blocks.SAND.getBlockData();
}
@ -70,10 +70,10 @@ index 4c168d333..307a44c85 100644
public void a(boolean flag) {
diff --git a/src/main/java/net/minecraft/server/EntityTNTPrimed.java b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
index fd0735611..25e471d37 100644
index 0d70dd1d2..bb0904f86 100644
--- a/src/main/java/net/minecraft/server/EntityTNTPrimed.java
+++ b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
@@ -108,6 +108,14 @@ public class EntityTNTPrimed extends Entity {
@@ -109,6 +109,14 @@ public class EntityTNTPrimed extends Entity {
protected void a(NBTTagCompound nbttagcompound) {
this.setFuseTicks(nbttagcompound.getShort("Fuse"));
@ -88,11 +88,23 @@ index fd0735611..25e471d37 100644
}
@Nullable
diff --git a/src/main/java/net/minecraft/server/NBTTagList.java b/src/main/java/net/minecraft/server/NBTTagList.java
index bc6383669..ca9eb2f3b 100644
--- a/src/main/java/net/minecraft/server/NBTTagList.java
+++ b/src/main/java/net/minecraft/server/NBTTagList.java
@@ -153,6 +153,7 @@ public class NBTTagList extends NBTBase {
return new int[0];
}
+ public final double getDoubleAt(int i) { return this.f(i); } // Paper - OBFHELPER
public double f(int i) {
if (i >= 0 && i < this.list.size()) {
NBTBase nbtbase = (NBTBase) this.list.get(i);
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 751fc01d1..39919ab1c 100644
index b87273aca..c6cf7754b 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -1021,6 +1021,12 @@ public abstract class World implements IBlockAccess {
@@ -1023,6 +1023,12 @@ public abstract class World implements IBlockAccess {
int j = MathHelper.floor(entity.locZ / 16.0D);
boolean flag = entity.attachedToPlayer;
@ -106,10 +118,10 @@ index 751fc01d1..39919ab1c 100644
flag = true;
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index b3cd6ec17..6497905b9 100644
index a7fb58a9e..9cb05e067 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -711,4 +711,12 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
@@ -728,4 +728,12 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
return spigot;
}
// Spigot end
@ -155,5 +167,5 @@ index c493c9c0c..93843aa50 100644
+ // Paper end
}
--
2.12.2
2.13.0

Datei anzeigen

@ -1,11 +1,11 @@
From d19627bd77a6f4f3b3360d3ba224224b206344ce Mon Sep 17 00:00:00 2001
From 7ba47ec34e529b95814c1ffe95d06319411647bc Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 1 Mar 2016 23:52:34 -0600
Subject: [PATCH] Prevent tile entity and entity crashes
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
index b3d3df4cf..d0c0371fc 100644
index e02f0c442..39be107fd 100644
--- a/src/main/java/net/minecraft/server/TileEntity.java
+++ b/src/main/java/net/minecraft/server/TileEntity.java
@@ -175,7 +175,12 @@ public abstract class TileEntity {
@ -23,10 +23,10 @@ index b3d3df4cf..d0c0371fc 100644
public String a() throws Exception {
int i = Block.getId(TileEntity.this.world.getType(TileEntity.this.position).getBlock());
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 39919ab1c..632d5c760 100644
index c6cf7754b..b1addedeb 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -1446,10 +1446,12 @@ public abstract class World implements IBlockAccess {
@@ -1448,10 +1448,12 @@ public abstract class World implements IBlockAccess {
entity.tickTimer.stopTiming(); // Paper
} catch (Throwable throwable1) {
entity.tickTimer.stopTiming();
@ -43,8 +43,8 @@ index 39919ab1c..632d5c760 100644
}
}
@@ -1512,10 +1514,13 @@ public abstract class World implements IBlockAccess {
((ITickable) tileentity).F_();
@@ -1514,10 +1516,13 @@ public abstract class World implements IBlockAccess {
((ITickable) tileentity).e();
this.methodProfiler.b();
} catch (Throwable throwable2) {
- crashreport1 = CrashReport.a(throwable2, "Ticking block entity");
@ -62,5 +62,5 @@ index 39919ab1c..632d5c760 100644
// Spigot start
finally {
--
2.12.2
2.13.0

Datei anzeigen

@ -1,4 +1,4 @@
From 52e6992f765e671f1ed612870e81947d646aca17 Mon Sep 17 00:00:00 2001
From 145fbb067892a319be146f8d65e5b89de7f1abb2 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 1 Mar 2016 23:58:50 -0600
Subject: [PATCH] Configurable top of nether void damage
@ -20,10 +20,10 @@ index 62e6830aa..e524a464f 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 313100aed..7feed2995 100644
index 3dff98596..e712ab370 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -442,9 +442,15 @@ public abstract class Entity implements ICommandListener {
@@ -444,9 +444,15 @@ public abstract class Entity implements ICommandListener {
this.fallDistance *= 0.5F;
}
@ -31,7 +31,7 @@ index 313100aed..7feed2995 100644
+ // Extracted to own function
+ /*
if (this.locY < -64.0D) {
this.Y();
this.ac();
}
+ */
+ this.checkAndDoHeightDamage();
@ -39,7 +39,7 @@ index 313100aed..7feed2995 100644
if (!this.world.isClientSide) {
this.setFlag(0, this.fireTicks > 0);
@@ -454,6 +460,18 @@ public abstract class Entity implements ICommandListener {
@@ -456,6 +462,18 @@ public abstract class Entity implements ICommandListener {
this.world.methodProfiler.b();
}
@ -55,19 +55,19 @@ index 313100aed..7feed2995 100644
+ }
+ // Paper end
+
protected void H() {
protected void I() {
if (this.portalCooldown > 0) {
--this.portalCooldown;
@@ -510,6 +528,7 @@ public abstract class Entity implements ICommandListener {
@@ -512,6 +530,7 @@ public abstract class Entity implements ICommandListener {
this.fireTicks = 0;
}
+ protected final void kill() { this.Y(); } // Paper - OBFHELPER
protected void Y() {
+ protected final void kill() { this.ac(); } // Paper - OBFHELPER
protected void ac() {
this.die();
}
diff --git a/src/main/java/net/minecraft/server/EntityMinecartAbstract.java b/src/main/java/net/minecraft/server/EntityMinecartAbstract.java
index fd3337d3f..ca1faa41d 100644
index f4ad25dae..4b1c7ad99 100644
--- a/src/main/java/net/minecraft/server/EntityMinecartAbstract.java
+++ b/src/main/java/net/minecraft/server/EntityMinecartAbstract.java
@@ -204,9 +204,15 @@ public abstract class EntityMinecartAbstract extends Entity implements INamableT
@ -78,7 +78,7 @@ index fd3337d3f..ca1faa41d 100644
+ // Extracted to own function
+ /*
if (this.locY < -64.0D) {
this.Y();
this.ac();
}
+ */
+ this.checkAndDoHeightDamage();
@ -87,5 +87,5 @@ index fd3337d3f..ca1faa41d 100644
int i;
--
2.12.2
2.13.0

Datei anzeigen

@ -1,15 +1,15 @@
From 3119d5d5e0f90c64083736d6665a65950b605149 Mon Sep 17 00:00:00 2001
From 1370c5a99e145e2ec03f3b39b3d3498b36184a4f Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Wed, 2 Mar 2016 00:03:55 -0600
Subject: [PATCH] Check online mode before converting and renaming player data
diff --git a/src/main/java/net/minecraft/server/WorldNBTStorage.java b/src/main/java/net/minecraft/server/WorldNBTStorage.java
index caec56824..30b54a50e 100644
index ba124665f..7eaa8d511 100644
--- a/src/main/java/net/minecraft/server/WorldNBTStorage.java
+++ b/src/main/java/net/minecraft/server/WorldNBTStorage.java
@@ -167,7 +167,7 @@ public class WorldNBTStorage implements IDataManager, IPlayerFileData {
File file = new File(this.playerDir, entityhuman.bf() + ".dat");
File file = new File(this.playerDir, entityhuman.bl() + ".dat");
// Spigot Start
boolean usingWrongFile = false;
- if ( !file.exists() )
@ -18,5 +18,5 @@ index caec56824..30b54a50e 100644
file = new File( this.playerDir, UUID.nameUUIDFromBytes( ( "OfflinePlayer:" + entityhuman.getName() ).getBytes( "UTF-8" ) ).toString() + ".dat");
if ( file.exists() )
--
2.12.2
2.13.0

Datei anzeigen

@ -1,4 +1,4 @@
From ddc58c0259cad56358f0e79c327658a407436af5 Mon Sep 17 00:00:00 2001
From aeebe23ba3a84e1939ee2919198c8ee307b63ce6 Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net>
Date: Wed, 2 Mar 2016 00:52:31 -0600
Subject: [PATCH] Lighting Queue
@ -42,7 +42,7 @@ index e524a464f..fd606ee14 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index 1c0108ef1..b80f95159 100644
index e55aa73e9..972654790 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 {
@ -85,7 +85,7 @@ index 1c0108ef1..b80f95159 100644
TileEntity tileentity;
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index 3ba489d4f..f7f2d12cf 100644
index c1b0d6cea..ba720204d 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -295,6 +295,7 @@ public class ChunkProviderServer implements IChunkProvider {
@ -97,10 +97,10 @@ index 3ba489d4f..f7f2d12cf 100644
// Update neighbor counts
for (int x = -2; x < 3; x++) {
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index c4497aaa6..ca0ff4d30 100644
index 995542ab9..43ec2d9dc 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -721,7 +721,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
@@ -721,7 +721,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs
protected void C() throws ExceptionWorldConflict { // CraftBukkit - added throws
co.aikar.timings.TimingsManager.FULL_SERVER_TICK.startTiming(); // Paper
this.slackActivityAccountant.tickStarted(); // Spigot
@ -109,7 +109,7 @@ index c4497aaa6..ca0ff4d30 100644
++this.ticks;
if (this.T) {
@@ -782,6 +782,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
@@ -782,6 +782,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs
this.methodProfiler.b();
org.spigotmc.WatchdogThread.tick(); // Spigot
@ -225,10 +225,10 @@ index 000000000..d8d3e1efd
+ }
+}
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 632d5c760..e6e85e7a8 100644
index b1addedeb..5d039f049 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -387,7 +387,7 @@ public abstract class World implements IBlockAccess {
@@ -389,7 +389,7 @@ public abstract class World implements IBlockAccess {
} else {
if (iblockdata.c() != iblockdata1.c() || iblockdata.d() != iblockdata1.d()) {
this.methodProfiler.a("checkLight");
@ -238,5 +238,5 @@ index 632d5c760..e6e85e7a8 100644
}
--
2.12.2
2.13.0

Datei anzeigen

@ -1,4 +1,4 @@
From c5e40e9bfa3083bdbf6c1eb91991e96b585320f5 Mon Sep 17 00:00:00 2001
From 3044d2ae539fbe4d31af51351181e00ac6aed4ba Mon Sep 17 00:00:00 2001
From: DoctorDark <doctordark11@gmail.com>
Date: Wed, 16 Mar 2016 02:21:39 -0500
Subject: [PATCH] Configurable end credits
@ -20,37 +20,26 @@ index fd606ee14..c00fa83d5 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index f7edd9aa1..dbc5cf632 100644
index 3ef2ffd2d..586c4ad0d 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -516,6 +516,15 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
return this.world.pvpMode;
}
+
+ // Paper start - Give "theEnd2" achievement if the player doesn't already have it
+ private void giveTheEnd2() {
+ if (!this.a(AchievementList.D)) {
+ this.b(AchievementList.D);
+ }
+ }
+ // Paper end
+
@Nullable
public Entity c(int i) {
if (this.isSleeping()) return this; // CraftBukkit - SPIGOT-3154
@@ -525,7 +534,10 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -56,7 +56,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
private long co = System.currentTimeMillis();
private Entity cp;
public boolean worldChangeInvuln;
- private boolean cr;
+ private boolean cr; private void setHasSeenCredits(boolean has) { this.cr = has; } // Paper - OBFHELPER
private final RecipeBookServer cs = new RecipeBookServer();
private Vec3D ct;
private int cu;
@@ -603,6 +603,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
this.world.kill(this);
if (!this.viewingCredits) {
this.viewingCredits = true;
- if (this.a(AchievementList.D)) {
+ // Paper start - Allow configurable end portal credits
+ if (world.paperConfig.disableEndCredits || this.a(AchievementList.D)) {
+ this.giveTheEnd2();
+ // Paper end
this.playerConnection.sendPacket(new PacketPlayOutGameStateChange(4, 0.0F));
} else {
this.b((Statistic) AchievementList.D);
+ if (world.paperConfig.disableEndCredits) this.setHasSeenCredits(true); // Paper - Toggle to always disable end credits
this.playerConnection.sendPacket(new PacketPlayOutGameStateChange(4, this.cr ? 0.0F : 1.0F));
this.cr = true;
}
--
2.12.2.windows.2
2.13.0

Datei anzeigen

@ -1,4 +1,4 @@
From 886b8af6b9e07e9214c61bf0ba100e8d4c5a0ac3 Mon Sep 17 00:00:00 2001
From 73b4d3a44527decb181748068a02c35cf587593d Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net>
Date: Wed, 2 Mar 2016 02:17:54 -0600
Subject: [PATCH] Generator Settings
@ -38,10 +38,10 @@ index c00fa83d5..3b19b53a8 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/BiomeBase.java b/src/main/java/net/minecraft/server/BiomeBase.java
index 62a338e95..d3f1dceb6 100644
index 1b7599769..ab6db7468 100644
--- a/src/main/java/net/minecraft/server/BiomeBase.java
+++ b/src/main/java/net/minecraft/server/BiomeBase.java
@@ -179,7 +179,7 @@ public abstract class BiomeBase {
@@ -176,7 +176,7 @@ public abstract class BiomeBase {
BlockPosition.MutableBlockPosition blockposition_mutableblockposition = new BlockPosition.MutableBlockPosition();
for (int l1 = 255; l1 >= 0; --l1) {
@ -51,7 +51,7 @@ index 62a338e95..d3f1dceb6 100644
} else {
IBlockData iblockdata2 = chunksnapshot.a(k1, l1, j1);
diff --git a/src/main/java/net/minecraft/server/BiomeMesa.java b/src/main/java/net/minecraft/server/BiomeMesa.java
index 3d0a60b93..121419302 100644
index f2dd96a32..0541403f0 100644
--- a/src/main/java/net/minecraft/server/BiomeMesa.java
+++ b/src/main/java/net/minecraft/server/BiomeMesa.java
@@ -99,7 +99,7 @@ public class BiomeMesa extends BiomeBase {
@ -61,10 +61,10 @@ index 3d0a60b93..121419302 100644
- if (i2 <= random.nextInt(5)) {
+ if (i2 <= (world.paperConfig.generateFlatBedrock ? 0 : random.nextInt(5))) { // Paper - Configurable flat bedrock
chunksnapshot.a(l, i2, k, BiomeMesa.c);
} else if (l1 < 15 || this.J) {
} else if (l1 < 15 || this.I) {
IBlockData iblockdata2 = chunksnapshot.a(l, i2, k);
diff --git a/src/main/java/net/minecraft/server/ChunkProviderFlat.java b/src/main/java/net/minecraft/server/ChunkProviderFlat.java
index d958a6654..f8a9f499f 100644
index 1452ff657..8b1b79380 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderFlat.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderFlat.java
@@ -26,7 +26,7 @@ public class ChunkProviderFlat implements ChunkGenerator {
@ -110,7 +110,7 @@ index d958a6654..f8a9f499f 100644
int k = 0;
boolean flag1 = true;
diff --git a/src/main/java/net/minecraft/server/ChunkProviderGenerate.java b/src/main/java/net/minecraft/server/ChunkProviderGenerate.java
index 7ba6b9add..776ebd653 100644
index 22a24a39f..ee9e00e64 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderGenerate.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderGenerate.java
@@ -160,32 +160,32 @@ public class ChunkProviderGenerate implements ChunkGenerator {
@ -191,7 +191,7 @@ index 7ba6b9add..776ebd653 100644
for (k1 = 0; k1 < this.s.t; ++k1) {
l1 = this.i.nextInt(16) + 8;
i2 = this.i.nextInt(256);
@@ -439,23 +439,23 @@ public class ChunkProviderGenerate implements ChunkGenerator {
@@ -443,23 +443,23 @@ public class ChunkProviderGenerate implements ChunkGenerator {
public void recreateStructures(Chunk chunk, int i, int j) {
if (this.o) {
@ -221,7 +221,7 @@ index 7ba6b9add..776ebd653 100644
}
diff --git a/src/main/java/net/minecraft/server/ChunkProviderHell.java b/src/main/java/net/minecraft/server/ChunkProviderHell.java
index f9519d7e1..ca64ae067 100644
index 9f738749f..12bc10ff0 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderHell.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderHell.java
@@ -151,7 +151,10 @@ public class ChunkProviderHell implements ChunkGenerator {
@ -236,7 +236,7 @@ index f9519d7e1..ca64ae067 100644
IBlockData iblockdata2 = chunksnapshot.a(i1, l1, l);
if (iblockdata2.getBlock() != null && iblockdata2.getMaterial() != Material.AIR) {
@@ -380,6 +383,6 @@ public class ChunkProviderHell implements ChunkGenerator {
@@ -384,6 +387,6 @@ public class ChunkProviderHell implements ChunkGenerator {
}
public void recreateStructures(Chunk chunk, int i, int j) {
@ -245,18 +245,10 @@ index f9519d7e1..ca64ae067 100644
}
}
diff --git a/src/main/java/net/minecraft/server/StructureGenerator.java b/src/main/java/net/minecraft/server/StructureGenerator.java
index fb350c408..9c1605b14 100644
index 2580a4cf6..078957aac 100644
--- a/src/main/java/net/minecraft/server/StructureGenerator.java
+++ b/src/main/java/net/minecraft/server/StructureGenerator.java
@@ -96,6 +96,7 @@ public abstract class StructureGenerator extends WorldGenBase {
}
public boolean b(BlockPosition blockposition) {
+ if (this.g == null) return false; // Paper
this.a(this.g);
return this.c(blockposition) != null;
}
@@ -124,6 +125,7 @@ public abstract class StructureGenerator extends WorldGenBase {
@@ -128,6 +128,7 @@ public abstract class StructureGenerator extends WorldGenBase {
}
public boolean a(World world, BlockPosition blockposition) {
@ -265,5 +257,5 @@ index fb350c408..9c1605b14 100644
ObjectIterator objectiterator = this.c.values().iterator();
--
2.12.2
2.13.0

Datei anzeigen

@ -1,4 +1,4 @@
From 000f618c3793428ef5abd2cb979e9241f44fcc5a Mon Sep 17 00:00:00 2001
From c0220cd1bc53c8ddbdc7a4574dcef456037ce806 Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net>
Date: Wed, 2 Mar 2016 11:59:48 -0600
Subject: [PATCH] Optimize explosions
@ -25,7 +25,7 @@ index 3b19b53a8..a7dfd2af7 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java
index 4e05bcdfa..49fc95e35 100644
index bb5345a1a..63b70d60c 100644
--- a/src/main/java/net/minecraft/server/Explosion.java
+++ b/src/main/java/net/minecraft/server/Explosion.java
@@ -130,7 +130,7 @@ public class Explosion {
@ -124,10 +124,10 @@ index 4e05bcdfa..49fc95e35 100644
+ // Paper end
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index ca0ff4d30..e7c63a953 100644
index 43ec2d9dc..ecdb92397 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -886,6 +886,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
@@ -886,6 +886,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs
worldserver.getTracker().updatePlayers();
this.methodProfiler.b();
this.methodProfiler.b();
@ -136,7 +136,7 @@ index ca0ff4d30..e7c63a953 100644
// this.i[i][this.ticks % 100] = System.nanoTime() - j; // CraftBukkit
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index e6e85e7a8..5f7590e11 100644
index 5d039f049..dfd6c8a3d 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -15,6 +15,7 @@ import javax.annotation.Nullable;
@ -147,7 +147,7 @@ index e6e85e7a8..5f7590e11 100644
import java.util.Map;
import org.bukkit.Bukkit;
import org.bukkit.block.BlockState;
@@ -134,6 +135,7 @@ public abstract class World implements IBlockAccess {
@@ -136,6 +137,7 @@ public abstract class World implements IBlockAccess {
private org.spigotmc.TickLimiter entityLimiter;
private org.spigotmc.TickLimiter tileLimiter;
private int tileTickPosition;
@ -156,5 +156,5 @@ index e6e85e7a8..5f7590e11 100644
public CraftWorld getWorld() {
return this.world;
--
2.12.2
2.13.0

Datei anzeigen

@ -1,14 +1,14 @@
From 5ef6465bc8b487a3f06e10963e579fde91f5251d Mon Sep 17 00:00:00 2001
From a3a19d58d3ed3baa6550ad32073c2478eba08ef7 Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net>
Date: Wed, 2 Mar 2016 14:35:27 -0600
Subject: [PATCH] Add player view distance API
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 79c9601fa..1ed1859b8 100644
index 586c4ad0d..1a5e5d944 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -59,6 +59,15 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -66,6 +66,15 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
public boolean f;
public int ping;
public boolean viewingCredits;
@ -25,7 +25,7 @@ index 79c9601fa..1ed1859b8 100644
// CraftBukkit start
public String displayName;
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index 021dfba14..9012a63a0 100644
index e4ed2e991..cfac05750 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -47,7 +47,7 @@ public class PlayerChunkMap {
@ -194,10 +194,10 @@ index 021dfba14..9012a63a0 100644
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 87ac74420..16dcaba3f 100644
index 94cca69a4..efcf383e7 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1469,6 +1469,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1466,6 +1466,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
return this.getHandle().affectsSpawning;
}
@ -215,5 +215,5 @@ index 87ac74420..16dcaba3f 100644
private final Player.Spigot spigot = new Player.Spigot()
{
--
2.12.2
2.13.0

Datei anzeigen

@ -1,4 +1,4 @@
From 91cdc4554cebe5d6b7ae636e7768ce5fe8365855 Mon Sep 17 00:00:00 2001
From 7197a213cc0ee3f96c122d16a7f3c9fc46cc75d6 Mon Sep 17 00:00:00 2001
From: Sudzzy <originmc@outlook.com>
Date: Wed, 2 Mar 2016 14:48:03 -0600
Subject: [PATCH] Disable explosion knockback
@ -19,10 +19,10 @@ index a197af84f..2217f680c 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index b22f81b12..e5fa1c3ba 100644
index c9bf14d77..64876f134 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -893,12 +893,14 @@ public abstract class EntityLiving extends Entity {
@@ -900,6 +900,7 @@ public abstract class EntityLiving extends Entity {
}
}
@ -30,24 +30,25 @@ index b22f81b12..e5fa1c3ba 100644
if (flag1) {
if (flag) {
this.world.broadcastEntityEffect(this, (byte) 29);
} else if (damagesource instanceof EntityDamageSource && ((EntityDamageSource) damagesource).x()) {
this.world.broadcastEntityEffect(this, (byte) 33);
} else {
+ if (!knockbackCancelled) // Paper - Disable explosion knockback
this.world.broadcastEntityEffect(this, (byte) 2);
@@ -916,6 +917,7 @@ public abstract class EntityLiving extends Entity {
b0 = 2;
}
@@ -922,6 +924,8 @@ public abstract class EntityLiving extends Entity {
+ if (!knockbackCancelled) // Paper - Disable explosion knockback
this.world.broadcastEntityEffect(this, b0);
}
@@ -939,6 +941,8 @@ public abstract class EntityLiving extends Entity {
}
}
+ if (knockbackCancelled) this.world.broadcastEntityEffect(this, (byte) 2); // Paper - Disable explosion knockback
+
if (this.getHealth() <= 0.0F) {
if (!this.d(damagesource)) {
SoundEffect soundeffect = this.bX();
if (!this.e(damagesource)) {
SoundEffect soundeffect = this.cd();
diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java
index 49fc95e35..d7bc6a0ed 100644
index 63b70d60c..0d434544d 100644
--- a/src/main/java/net/minecraft/server/Explosion.java
+++ b/src/main/java/net/minecraft/server/Explosion.java
@@ -146,7 +146,7 @@ public class Explosion {
@ -69,5 +70,5 @@ index 49fc95e35..d7bc6a0ed 100644
}
}
--
2.12.2
2.13.0

Datei anzeigen

@ -1,4 +1,4 @@
From 05106693177445d76ea1325231181bd3404e6da1 Mon Sep 17 00:00:00 2001
From 27c8181330a79124a88ca63d871b0cc6dbb5569e Mon Sep 17 00:00:00 2001
From: Sudzzy <originmc@outlook.com>
Date: Wed, 2 Mar 2016 14:52:43 -0600
Subject: [PATCH] Disable thunder
@ -19,10 +19,10 @@ index 2217f680c..a40d4887c 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 966938997..ce087eb7d 100644
index 6856aac64..1432c6c85 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -428,7 +428,8 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@@ -437,7 +437,8 @@ public class WorldServer extends World implements IAsyncTaskHandler {
int l;
BlockPosition blockposition;
@ -33,5 +33,5 @@ index 966938997..ce087eb7d 100644
l = this.l >> 2;
blockposition = this.a(new BlockPosition(j + (l & 15), 0, k + (l >> 8 & 15)));
--
2.12.2
2.13.0

Datei anzeigen

@ -1,4 +1,4 @@
From 84e563f38e936dd47f7390190f080b89f445b76f Mon Sep 17 00:00:00 2001
From ddfcd21f06dee67cad8b9a3e5357b45188b26b6d Mon Sep 17 00:00:00 2001
From: Sudzzy <originmc@outlook.com>
Date: Wed, 2 Mar 2016 14:57:24 -0600
Subject: [PATCH] Disable ice and snow
@ -19,10 +19,10 @@ index a40d4887c..4fea4b359 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index ce087eb7d..ac8dc5f2f 100644
index 1432c6c85..04eb5ad9a 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -451,7 +451,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@@ -460,7 +460,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
}
this.methodProfiler.c("iceandsnow");
@ -32,5 +32,5 @@ index ce087eb7d..ac8dc5f2f 100644
l = this.l >> 2;
blockposition = this.p(new BlockPosition(j + (l & 15), 0, k + (l >> 8 & 15)));
--
2.12.2
2.13.0

Datei anzeigen

@ -1,4 +1,4 @@
From 154ee18ea861801364d933168a27c5fcda6d6459 Mon Sep 17 00:00:00 2001
From 9f3c6605d96924c379901e55a92da9afe5aa0fbf Mon Sep 17 00:00:00 2001
From: Sudzzy <originmc@outlook.com>
Date: Wed, 2 Mar 2016 23:34:44 -0600
Subject: [PATCH] Configurable container update tick rate
@ -19,10 +19,10 @@ index 1bb956515..e6aae7317 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index b830f833f..bf3e46c35 100644
index 1a5e5d944..42f6b7206 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -68,6 +68,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -75,6 +75,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
this.viewDistance = viewDistance;
}
// Paper end
@ -30,7 +30,7 @@ index b830f833f..bf3e46c35 100644
// CraftBukkit start
public String displayName;
@@ -231,7 +232,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -266,7 +267,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
--this.noDamageTicks;
}
@ -45,5 +45,5 @@ index b830f833f..bf3e46c35 100644
this.closeInventory();
this.activeContainer = this.defaultContainer;
--
2.12.2.windows.2
2.13.0

Datei anzeigen

@ -1,14 +1,14 @@
From bf5743f31df9d1cd46c219f13808a0063a09e6b0 Mon Sep 17 00:00:00 2001
From 6a671d7b63704d31fbe9e8516894678c7d38d63c Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Wed, 2 Mar 2016 23:45:17 -0600
Subject: [PATCH] Disable spigot tick limiters
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 5f7590e11..a1cdcd71b 100644
index dfd6c8a3d..4b49d1976 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -1423,10 +1423,10 @@ public abstract class World implements IBlockAccess {
@@ -1425,10 +1425,10 @@ public abstract class World implements IBlockAccess {
// CraftBukkit start - Use field for loop variable
co.aikar.timings.TimingHistory.entityTicks += this.entityList.size(); // Paper
int entitiesThisCycle = 0;
@ -23,7 +23,7 @@ index 5f7590e11..a1cdcd71b 100644
tickPosition = (tickPosition < entityList.size()) ? tickPosition : 0;
entity = (Entity) this.entityList.get(this.tickPosition);
// CraftBukkit end
@@ -1492,9 +1492,7 @@ public abstract class World implements IBlockAccess {
@@ -1494,9 +1494,7 @@ public abstract class World implements IBlockAccess {
// Spigot start
// Iterator iterator = this.tileEntityListTick.iterator();
int tilesThisCycle = 0;
@ -35,5 +35,5 @@ index 5f7590e11..a1cdcd71b 100644
TileEntity tileentity = (TileEntity) this.tileEntityListTick.get(tileTickPosition);
// Spigot start
--
2.12.2
2.13.0

Datei anzeigen

@ -1,4 +1,4 @@
From 5f5ff59c74f2094741e3cf0f5c615d34d2231005 Mon Sep 17 00:00:00 2001
From 15eda5f02abe75614df683675329df4080bf6394 Mon Sep 17 00:00:00 2001
From: Steve Anton <anxuiz.nx@gmail.com>
Date: Thu, 3 Mar 2016 00:09:38 -0600
Subject: [PATCH] Add PlayerInitialSpawnEvent
@ -6,10 +6,10 @@ Subject: [PATCH] Add PlayerInitialSpawnEvent
For modifying a player's initial spawn location as they join the server
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 80bf61164..59c7e78b8 100644
index 4aaf287ae..7c73e08c3 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -104,6 +104,21 @@ public abstract class PlayerList {
@@ -106,6 +106,21 @@ public abstract class PlayerList {
}
// CraftBukkit end
@ -32,5 +32,5 @@ index 80bf61164..59c7e78b8 100644
entityplayer.playerInteractManager.a((WorldServer) entityplayer.world);
String s1 = "local";
--
2.12.2.windows.2
2.13.0

Datei anzeigen

@ -1,4 +1,4 @@
From c121bda3726ac920a54e7d3462c86cc16e114a8c Mon Sep 17 00:00:00 2001
From 9fc404dab5a61059531f51be43e3ea0a7811a554 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 3 Mar 2016 01:17:12 -0600
Subject: [PATCH] Ensure commands are not ran async
@ -14,10 +14,10 @@ big slowdown in execution but throwing an exception at same time to raise awaren
that it is happening so that plugin authors can fix their code to stop executing commands async.
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 27283efad..57879c76d 100644
index 63ea04fb4..65ab76cc5 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1268,6 +1268,29 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
@@ -1279,6 +1279,29 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
}
if (!async && s.startsWith("/")) {
@ -48,10 +48,10 @@ index 27283efad..57879c76d 100644
} else if (this.player.getChatFlags() == EntityHuman.EnumChatVisibility.SYSTEM) {
// Do nothing, this is coming from a plugin
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 0f77d0674..5302bb283 100644
index e5dcd4094..374956d5e 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -647,6 +647,29 @@ public final class CraftServer implements Server {
@@ -639,6 +639,29 @@ public final class CraftServer implements Server {
Validate.notNull(sender, "Sender cannot be null");
Validate.notNull(commandLine, "CommandLine cannot be null");
@ -82,5 +82,5 @@ index 0f77d0674..5302bb283 100644
return true;
}
--
2.12.2.windows.2
2.13.0

Datei anzeigen

@ -1,4 +1,4 @@
From 6b81f8f28de16733bff9a2d833a2397f6af7fe9e Mon Sep 17 00:00:00 2001
From 95af696519a3738b8dd148142fecc34108d3ef7b Mon Sep 17 00:00:00 2001
From: vemacs <d@nkmem.es>
Date: Thu, 3 Mar 2016 01:19:22 -0600
Subject: [PATCH] All chunks are slime spawn chunks toggle
@ -19,19 +19,20 @@ index 6ce62827a..ab7e81a0d 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/EntitySlime.java b/src/main/java/net/minecraft/server/EntitySlime.java
index 8fb14d6b5..c68429fb1 100644
index 24aac10da..31cf1df5d 100644
--- a/src/main/java/net/minecraft/server/EntitySlime.java
+++ b/src/main/java/net/minecraft/server/EntitySlime.java
@@ -252,7 +252,8 @@ public class EntitySlime extends EntityInsentient implements IMonster {
return super.cM();
@@ -251,8 +251,8 @@ public class EntitySlime extends EntityInsentient implements IMonster {
if (biomebase == Biomes.h && this.locY > 50.0D && this.locY < 70.0D && this.random.nextFloat() < 0.5F && this.random.nextFloat() < this.world.G() && this.world.getLightLevel(new BlockPosition(this)) <= this.random.nextInt(8)) {
return super.P();
}
-
- if (this.random.nextInt(10) == 0 && chunk.a(world.spigotConfig.slimeSeed).nextInt(10) == 0 && this.locY < 40.0D) { // Spigot
+ boolean isSlimeChunk = world.paperConfig.allChunksAreSlimeChunks || chunk.a(world.spigotConfig.slimeSeed).nextInt(10) == 0; // Spigot // Paper
+ if (this.random.nextInt(10) == 0 && isSlimeChunk && this.locY < 40.0D) { // Paper
return super.cM();
return super.P();
}
}
--
2.12.2.windows.2
2.13.0

Datei anzeigen

@ -1,4 +1,4 @@
From 3cca34b5a315231f82eaf848a700b684e4263560 Mon Sep 17 00:00:00 2001
From 185916cee82574977ec5fd0b7a038cdcfb3c5317 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 3 Mar 2016 02:02:07 -0600
Subject: [PATCH] Optimize Pathfinding
@ -7,7 +7,7 @@ Prevents pathfinding from spamming failures for things such as
arrow attacks.
diff --git a/src/main/java/net/minecraft/server/NavigationAbstract.java b/src/main/java/net/minecraft/server/NavigationAbstract.java
index 4f28b8819..43b2be505 100644
index 26319d9b7..3e598afd4 100644
--- a/src/main/java/net/minecraft/server/NavigationAbstract.java
+++ b/src/main/java/net/minecraft/server/NavigationAbstract.java
@@ -118,10 +118,26 @@ public abstract class NavigationAbstract {
@ -38,14 +38,14 @@ index 4f28b8819..43b2be505 100644
public boolean a(@Nullable PathEntity pathentity, double d0) {
if (pathentity == null) {
@@ -255,6 +271,7 @@ public abstract class NavigationAbstract {
@@ -256,6 +272,7 @@ public abstract class NavigationAbstract {
}
public void o() {
public void p() {
+ this.pathfindFailures = 0; this.lastFailure = 0; // Paper - Pathfinding optimizations
this.c = null;
}
--
2.12.2.windows.2
2.13.0

Datei anzeigen

@ -1,14 +1,14 @@
From bf934f8ce2b8aed42e8412904cf5bd84f5163e3d Mon Sep 17 00:00:00 2001
From f8e285f87b4297e3d5db10f6192c59c69b44b9cd Mon Sep 17 00:00:00 2001
From: kashike <kashike@vq.lc>
Date: Thu, 3 Mar 2016 02:15:57 -0600
Subject: [PATCH] Expose server CommandMap
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 5302bb283..cab671d68 100644
index 374956d5e..01b1ef39f 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1567,6 +1567,7 @@ public final class CraftServer implements Server {
@@ -1545,6 +1545,7 @@ public final class CraftServer implements Server {
return helpMap;
}
@ -17,5 +17,5 @@ index 5302bb283..cab671d68 100644
return commandMap;
}
--
2.12.2.windows.2
2.13.0

Datei anzeigen

@ -1,4 +1,4 @@
From 1de05f6089976c4332bb594dfcae72d598747e42 Mon Sep 17 00:00:00 2001
From cbcc5dfe43b8a0f3e379ef3deb74d1fe79713850 Mon Sep 17 00:00:00 2001
From: Techcable <Techcable@outlook.com>
Date: Thu, 3 Mar 2016 02:32:10 -0600
Subject: [PATCH] Player Tab List and Title APIs
@ -78,7 +78,7 @@ index 7bcafa8bb..4f6c1c2e7 100644
if (this.a == PacketPlayOutTitle.EnumTitleAction.TIMES) {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index c86a48070..0df01186f 100644
index efcf383e7..b1c06388b 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1,5 +1,6 @@
@ -88,7 +88,7 @@ index c86a48070..0df01186f 100644
import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableSet;
import com.google.common.io.BaseEncoding;
@@ -158,6 +159,85 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -166,6 +167,85 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
}
@ -175,5 +175,5 @@ index c86a48070..0df01186f 100644
public String getDisplayName() {
return getHandle().displayName;
--
2.12.2.windows.2
2.13.0

Datei anzeigen

@ -1,17 +1,17 @@
From 19528dbbeee2a72cb791ff414a47e84fd9e30efb Mon Sep 17 00:00:00 2001
From be4684520ec4356ba4564281649d047f21d8e4a3 Mon Sep 17 00:00:00 2001
From: Joseph Hirschfeld <joe@ibj.io>
Date: Thu, 3 Mar 2016 02:39:54 -0600
Subject: [PATCH] Change implementation of (tile)entity removal list
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 7feed2995..5b5e0e73c 100644
index e712ab370..e9a7565ae 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -121,10 +121,10 @@ public abstract class Entity implements ICommandListener {
private static final DataWatcherObject<Boolean> aB = DataWatcher.a(Entity.class, DataWatcherRegistry.h);
@@ -122,10 +122,10 @@ public abstract class Entity implements ICommandListener {
private static final DataWatcherObject<Boolean> aC = DataWatcher.a(Entity.class, DataWatcherRegistry.h);
private static final DataWatcherObject<Boolean> aD = DataWatcher.a(Entity.class, DataWatcherRegistry.h);
private static final DataWatcherObject<Boolean> aE = DataWatcher.a(Entity.class, DataWatcherRegistry.h);
- public boolean aa;
- public int ab;
- public int ac;
@ -24,7 +24,7 @@ index 7feed2995..5b5e0e73c 100644
public boolean impulse;
public int portalCooldown;
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index a1cdcd71b..354a7309b 100644
index 4b49d1976..b7f502ecd 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -30,6 +30,11 @@ import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason;
@ -53,7 +53,7 @@ index a1cdcd71b..354a7309b 100644
public final List<EntityHuman> players = Lists.newArrayList();
public final List<Entity> j = Lists.newArrayList();
protected final IntHashMap<Entity> entitiesById = new IntHashMap();
@@ -1394,20 +1399,20 @@ public abstract class World implements IBlockAccess {
@@ -1396,20 +1401,20 @@ public abstract class World implements IBlockAccess {
this.entityList.removeAll(this.f);
int j;
@ -84,5 +84,5 @@ index a1cdcd71b..354a7309b 100644
this.f.clear();
this.l();
--
2.12.2.windows.2
2.13.0

Datei anzeigen

@ -1,14 +1,14 @@
From c310ea8c337901ad0bfa65949f78a0716a7fd0e0 Mon Sep 17 00:00:00 2001
From 3634e6fefd10b173ebb5bd2c4f66e21c42090fbb Mon Sep 17 00:00:00 2001
From: Joseph Hirschfeld <joe@ibj.io>
Date: Thu, 3 Mar 2016 02:48:12 -0600
Subject: [PATCH] Add velocity warnings
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index cab671d68..28da39cbd 100644
index 01b1ef39f..0b7c02d36 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -173,6 +173,7 @@ public final class CraftServer implements Server {
@@ -172,6 +172,7 @@ public final class CraftServer implements Server {
private final UUID invalidUserUUID = UUID.nameUUIDFromBytes("InvalidUsername".getBytes(Charsets.UTF_8));
private final List<CraftPlayer> playerView;
public int reloadCount;
@ -17,10 +17,10 @@ index cab671d68..28da39cbd 100644
private final class BooleanWrapper {
private boolean value = true;
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index 6497905b9..463289199 100644
index 9cb05e067..917fa3d21 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -229,6 +229,11 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
@@ -237,6 +237,11 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
}
public void setVelocity(Vector vel) {
@ -58,5 +58,5 @@ index 3ed983cc0..6384d50e7 100644
log.log( Level.SEVERE, "Server thread dump (Look for plugins here before reporting to Paper!):" );
dumpThread( ManagementFactory.getThreadMXBean().getThreadInfo( MinecraftServer.getServer().primaryThread.getId(), Integer.MAX_VALUE ), log );
--
2.12.2.windows.2
2.13.0

Datei anzeigen

@ -1,4 +1,4 @@
From c91c1828836d0c7465029ed20177dcb79f267005 Mon Sep 17 00:00:00 2001
From 7c20e7de295ba750b809d3069615637e6d5d337c Mon Sep 17 00:00:00 2001
From: Sudzzy <originmc@outlook.com>
Date: Thu, 3 Mar 2016 02:50:31 -0600
Subject: [PATCH] Fix inter-world teleportation glitches
@ -25,10 +25,10 @@ index 4cc74cd65..fa49397ea 100644
+ }
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 0df01186f..88fcadbfd 100644
index b1c06388b..cf753d362 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -579,7 +579,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -587,7 +587,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
if (fromWorld == toWorld) {
entity.playerConnection.teleport(to);
} else {
@ -39,5 +39,5 @@ index 0df01186f..88fcadbfd 100644
return true;
}
--
2.12.2.windows.2
2.13.0

Datei anzeigen

@ -1,4 +1,4 @@
From cbc43c201ce24ad2ba92a6720ec15fade9c971ef Mon Sep 17 00:00:00 2001
From f886b587c1e143d75dd7495dca68cde2e3175d1f Mon Sep 17 00:00:00 2001
From: Joseph Hirschfeld <joe@ibj.io>
Date: Thu, 3 Mar 2016 03:15:41 -0600
Subject: [PATCH] Add exception reporting event
@ -50,7 +50,7 @@ index 000000000..93397188b
+}
\ No newline at end of file
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index e1fc4ea6c..8f1a68d67 100644
index 9c7b81a8b..491278646 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -1,5 +1,6 @@
@ -89,7 +89,7 @@ index e1fc4ea6c..8f1a68d67 100644
}
}
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index fab36ec15..0ad57afba 100644
index ba720204d..9449b645d 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -12,6 +12,7 @@ import java.util.Iterator;
@ -144,17 +144,18 @@ index fab36ec15..0ad57afba 100644
}
diff --git a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java
index 016c64e82..2ff8a6da0 100644
index 83322b85b..b943a9b20 100644
--- a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java
+++ b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java
@@ -1,5 +1,6 @@
@@ -1,5 +1,7 @@
package net.minecraft.server;
+import com.destroystokyo.paper.exception.ServerInternalException;
import com.google.common.base.Charsets;
+import com.google.common.base.Charsets;
import com.google.common.base.Predicate;
import com.google.common.collect.Iterators;
@@ -361,6 +362,7 @@ public class NameReferencingFileConverter {
import com.google.common.collect.Lists;
@@ -361,6 +363,7 @@ public class NameReferencingFileConverter {
root = NBTCompressedStreamTools.a(new java.io.FileInputStream(file1));
} catch (Exception exception) {
exception.printStackTrace();
@ -162,7 +163,7 @@ index 016c64e82..2ff8a6da0 100644
}
if (root != null) {
@@ -374,6 +376,7 @@ public class NameReferencingFileConverter {
@@ -374,6 +377,7 @@ public class NameReferencingFileConverter {
NBTCompressedStreamTools.a(root, new java.io.FileOutputStream(file2));
} catch (Exception exception) {
exception.printStackTrace();
@ -198,7 +199,7 @@ index 936d6c640..50056f49a 100644
}
diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java
index 8d1b65885..5f9678aad 100644
index 1ba26de5c..6a92b5af8 100644
--- a/src/main/java/net/minecraft/server/RegionFile.java
+++ b/src/main/java/net/minecraft/server/RegionFile.java
@@ -1,5 +1,6 @@
@ -225,7 +226,7 @@ index 8d1b65885..5f9678aad 100644
}
diff --git a/src/main/java/net/minecraft/server/RegionFileCache.java b/src/main/java/net/minecraft/server/RegionFileCache.java
index 6ec72689c..02b9bc8df 100644
index c15a0d1f8..5f9e9ddef 100644
--- a/src/main/java/net/minecraft/server/RegionFileCache.java
+++ b/src/main/java/net/minecraft/server/RegionFileCache.java
@@ -1,5 +1,6 @@
@ -244,7 +245,7 @@ index 6ec72689c..02b9bc8df 100644
}
diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java
index e42a0c776..c79fb7d57 100644
index c56a8e9c2..fdc439914 100644
--- a/src/main/java/net/minecraft/server/SpawnerCreature.java
+++ b/src/main/java/net/minecraft/server/SpawnerCreature.java
@@ -7,6 +7,7 @@ import java.util.Random;
@ -272,7 +273,7 @@ index e42a0c776..c79fb7d57 100644
}
diff --git a/src/main/java/net/minecraft/server/VillageSiege.java b/src/main/java/net/minecraft/server/VillageSiege.java
index 7af5b7dd7..2b498024c 100644
index 9ff4f23ab..6fce3015f 100644
--- a/src/main/java/net/minecraft/server/VillageSiege.java
+++ b/src/main/java/net/minecraft/server/VillageSiege.java
@@ -1,5 +1,7 @@
@ -292,7 +293,7 @@ index 7af5b7dd7..2b498024c 100644
}
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 354a7309b..cc7369e52 100644
index b7f502ecd..1fc7ec6f4 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -1,5 +1,7 @@
@ -301,9 +302,9 @@ index 354a7309b..cc7369e52 100644
+import com.destroystokyo.paper.event.server.ServerExceptionEvent;
+import com.destroystokyo.paper.exception.ServerInternalException;
import com.google.common.base.Function;
import com.google.common.base.Objects;
import com.google.common.base.MoreObjects;
import com.google.common.base.Predicate;
@@ -1454,8 +1456,10 @@ public abstract class World implements IBlockAccess {
@@ -1456,8 +1458,10 @@ public abstract class World implements IBlockAccess {
} catch (Throwable throwable1) {
entity.tickTimer.stopTiming();
// Paper start - Prevent tile entity and entity crashes
@ -315,7 +316,7 @@ index 354a7309b..cc7369e52 100644
entity.dead = true;
continue;
// Paper end
@@ -1520,8 +1524,10 @@ public abstract class World implements IBlockAccess {
@@ -1522,8 +1526,10 @@ public abstract class World implements IBlockAccess {
this.methodProfiler.b();
} catch (Throwable throwable2) {
// Paper start - Prevent tile entity and entity crashes
@ -372,5 +373,5 @@ index 9952b64be..e30cfb7b7 100644
// (async tasks must live with race-conditions if they attempt to cancel between these few lines of code)
}
--
2.12.2.windows.2
2.13.0

Datei anzeigen

@ -1,4 +1,4 @@
From 60f5daf8819357295a0fe9cbf2c9e6eaed5832d3 Mon Sep 17 00:00:00 2001
From fe118acf4eb8ef1aa3a14ff4679bbec755960ec7 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 8 Mar 2016 23:25:45 -0500
Subject: [PATCH] Disable Scoreboards for non players by default
@ -25,7 +25,7 @@ index fa49397ea..9987a5c7a 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/CommandScoreboard.java b/src/main/java/net/minecraft/server/CommandScoreboard.java
index 7af5d0aef..ab9aa132a 100644
index 06523f683..00a34e85a 100644
--- a/src/main/java/net/minecraft/server/CommandScoreboard.java
+++ b/src/main/java/net/minecraft/server/CommandScoreboard.java
@@ -492,6 +492,7 @@ public class CommandScoreboard extends CommandAbstract {
@ -33,21 +33,21 @@ index 7af5d0aef..ab9aa132a 100644
while (iterator.hasNext()) {
Entity entity = (Entity) iterator.next();
+ if (!entity.world.paperConfig.nonPlayerEntitiesOnScoreboards && !(entity instanceof EntityHuman)) { continue; } // Paper
String s2 = e(minecraftserver, icommandlistener, entity.bf());
String s2 = f(minecraftserver, icommandlistener, entity.bl());
if (scoreboard.addPlayerToTeam(s2, s)) {
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 5b5e0e73c..be54c807b 100644
index e9a7565ae..dbaf2863b 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -2047,6 +2047,7 @@ public abstract class Entity implements ICommandListener {
@@ -2074,6 +2074,7 @@ public abstract class Entity implements ICommandListener {
@Nullable
public ScoreboardTeamBase aQ() {
public ScoreboardTeamBase aW() {
+ if (!this.world.paperConfig.nonPlayerEntitiesOnScoreboards && !(this instanceof EntityHuman)) { return null; } // Paper
return this.world.getScoreboard().getPlayerTeam(this.bf());
return this.world.getScoreboard().getPlayerTeam(this.bl());
}
--
2.12.2.windows.2
2.13.0

Datei anzeigen

@ -1,28 +1,11 @@
From b8425c39d7e6296671d9ddc5862172ab9da70d57 Mon Sep 17 00:00:00 2001
From 6d78130c5cdd3c5e947ca2f4cd3c2c4bc9eff7c3 Mon Sep 17 00:00:00 2001
From: mrapple <tony@oc.tc>
Date: Sun, 25 Nov 2012 13:43:39 -0600
Subject: [PATCH] Add methods for working with arrows stuck in living entities
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index e5fa1c3ba..247224117 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -1380,10 +1380,12 @@ public abstract class EntityLiving extends Entity {
return (float) this.getAttributeInstance(GenericAttributes.maxHealth).getValue();
}
+ public final int getStuckArrows() { return this.cc(); } // Paper - OBFHELPER
public final int cc() {
return ((Integer) this.datawatcher.get(EntityLiving.bq)).intValue();
}
+ public final void setStuckArrows(int arrows) { this.f(arrows); } // Paper - OBFHELPER
public final void f(int i) {
this.datawatcher.set(EntityLiving.bq, Integer.valueOf(i));
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index 61032eb2f..348a8c758 100644
index 062a0fd55..8ed91e82a 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -572,4 +572,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@ -33,15 +16,15 @@ index 61032eb2f..348a8c758 100644
+ // Paper start
+ @Override
+ public int getArrowsStuck() {
+ return this.getHandle().getStuckArrows();
+ return getHandle().getArrowCount();
+ }
+
+ @Override
+ public void setArrowsStuck(int arrows) {
+ this.getHandle().setStuckArrows(arrows);
+ getHandle().setArrowCount(arrows);
+ }
+ // Paper end
}
--
2.12.2.windows.2
2.13.0

Datei anzeigen

@ -1,14 +1,14 @@
From 258b0dd3501ba87edaadf75dc2bd065a29753105 Mon Sep 17 00:00:00 2001
From 276acf46a94df17de9758755ef9aee7b7933c0e2 Mon Sep 17 00:00:00 2001
From: Jedediah Smith <jedediah@silencegreys.com>
Date: Sat, 4 Apr 2015 23:17:52 -0400
Subject: [PATCH] Complete resource pack API
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 57879c76d..b67837dd2 100644
index 65ab76cc5..1bc61ef43 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1029,7 +1029,12 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
@@ -1040,7 +1040,12 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
// CraftBukkit start
public void a(PacketPlayInResourcePackStatus packetplayinresourcepackstatus) {
PlayerConnectionUtils.ensureMainThread(packetplayinresourcepackstatus, this, this.player.x());
@ -23,10 +23,10 @@ index 57879c76d..b67837dd2 100644
// CraftBukkit end
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 88fcadbfd..dd8380f71 100644
index cf753d362..5839801f5 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -74,6 +74,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -82,6 +82,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
private double health = 20;
private boolean scaledHealth = false;
private double healthScale = 20;
@ -37,7 +37,7 @@ index 88fcadbfd..dd8380f71 100644
public CraftPlayer(CraftServer server, EntityPlayer entity) {
super(server, entity);
@@ -1560,6 +1564,32 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1557,6 +1561,32 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
((WorldServer) getHandle().world).getPlayerChunkMap().updateViewDistance(getHandle(), viewDistance);
}
@ -71,5 +71,5 @@ index 88fcadbfd..dd8380f71 100644
private final Player.Spigot spigot = new Player.Spigot()
{
--
2.12.2.windows.2
2.13.0

Datei anzeigen

@ -1,4 +1,4 @@
From 6faebb0cebf9a14b2b752145de89394a16604e53 Mon Sep 17 00:00:00 2001
From 927dcc40693024aad07e9335f4f993d23d0f1e4e Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 4 Mar 2016 18:18:37 -0600
Subject: [PATCH] Chunk save queue improvements
@ -41,12 +41,12 @@ index 9a6f87e59..873ffa77d 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
index bee52d783..8e91be4a1 100644
index 6550686ee..17005d677 100644
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
@@ -12,14 +12,17 @@ import java.util.Map;
@@ -12,14 +12,17 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import javax.annotation.Nullable;
+import java.util.concurrent.ConcurrentLinkedQueue; // Paper
import org.apache.logging.log4j.LogManager;
@ -57,9 +57,9 @@ index bee52d783..8e91be4a1 100644
+ private ConcurrentLinkedQueue<QueuedChunk> queue = new ConcurrentLinkedQueue<>(); // Paper - Chunk queue improvements
+ private final Object lock = new Object(); // Paper - Chunk queue improvements
private static final Logger a = LogManager.getLogger();
private final Map<ChunkCoordIntPair, NBTTagCompound> b = new ConcurrentHashMap();
- private final Set<ChunkCoordIntPair> c = Collections.newSetFromMap(new ConcurrentHashMap());
+ //private final Set<ChunkCoordIntPair> c = Collections.newSetFromMap(new ConcurrentHashMap()); // Paper - Chunk queue improvements
private final Map<ChunkCoordIntPair, NBTTagCompound> b = Maps.newConcurrentMap();
- private final Set<ChunkCoordIntPair> c = Collections.newSetFromMap(Maps.newConcurrentMap());
+ //private final Set<ChunkCoordIntPair> c = Collections.newSetFromMap(Maps.newConcurrentMap()); // Paper - Chunk queue improvements
private final File d;
private final DataConverterManager e;
private boolean f;
@ -76,7 +76,7 @@ index bee52d783..8e91be4a1 100644
FileIOThread.a().a(this);
}
public boolean c() {
public boolean a() {
- // CraftBukkit start
- Iterator<Map.Entry<ChunkCoordIntPair, NBTTagCompound>> iter = this.b.entrySet().iterator();
- if (!iter.hasNext()) {
@ -86,7 +86,7 @@ index bee52d783..8e91be4a1 100644
+ if (chunk == null) {
+ // Paper - end
if (this.f) {
ChunkRegionLoader.a.info("ThreadedAnvilChunkStorage ({}): All chunks are saved", new Object[] { this.d.getName()});
ChunkRegionLoader.a.info("ThreadedAnvilChunkStorage ({}): All chunks are saved", this.d.getName());
}
return false;
@ -139,7 +139,7 @@ index bee52d783..8e91be4a1 100644
+ // Paper end
}
diff --git a/src/main/java/net/minecraft/server/FileIOThread.java b/src/main/java/net/minecraft/server/FileIOThread.java
index acfdd52dc..fdbaf5fbd 100644
index 1d6b1874c..9ee4115be 100644
--- a/src/main/java/net/minecraft/server/FileIOThread.java
+++ b/src/main/java/net/minecraft/server/FileIOThread.java
@@ -39,11 +39,15 @@ public class FileIOThread implements Runnable {
@ -163,5 +163,5 @@ index acfdd52dc..fdbaf5fbd 100644
if (this.b.isEmpty()) {
--
2.12.2.windows.2
2.13.0

Datei anzeigen

@ -1,4 +1,4 @@
From 0c3c5d0949ca3e6635a5935f5e9cb162b6e28fa7 Mon Sep 17 00:00:00 2001
From bd91198bc1c3e488aaa7eacedf84b180050fde59 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 18 Mar 2016 13:17:38 -0400
Subject: [PATCH] Default loading permissions.yml before plugins
@ -30,10 +30,10 @@ index 873ffa77d..b5ff26c71 100644
+ }
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 28da39cbd..9df6c0ebb 100644
index 0b7c02d36..e1ae5f878 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -318,6 +318,7 @@ public final class CraftServer implements Server {
@@ -317,6 +317,7 @@ public final class CraftServer implements Server {
if (type == PluginLoadOrder.STARTUP) {
helpMap.clear();
helpMap.initializeGeneralTopics();
@ -41,7 +41,7 @@ index 28da39cbd..9df6c0ebb 100644
}
Plugin[] plugins = pluginManager.getPlugins();
@@ -335,7 +336,7 @@ public final class CraftServer implements Server {
@@ -334,7 +335,7 @@ public final class CraftServer implements Server {
setVanillaCommands(false);
// Spigot end
commandMap.registerServerAliases();
@ -51,5 +51,5 @@ index 28da39cbd..9df6c0ebb 100644
CraftDefaultPermissions.registerCorePermissions();
helpMap.initializeCommands();
--
2.12.2.windows.2
2.13.0

Datei anzeigen

@ -1,4 +1,4 @@
From 1b592b3b573635540cf12d730926ede918b22e19 Mon Sep 17 00:00:00 2001
From 5c4d9a3b11c3a72967d23e94299074761a4fce81 Mon Sep 17 00:00:00 2001
From: William <admin@domnian.com>
Date: Fri, 18 Mar 2016 03:30:17 -0400
Subject: [PATCH] Allow Reloading of Custom Permissions
@ -6,10 +6,10 @@ Subject: [PATCH] Allow Reloading of Custom Permissions
https://github.com/PaperMC/Paper/issues/49
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 9df6c0ebb..e77307c35 100644
index e1ae5f878..0dca774af 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1827,4 +1827,21 @@ public final class CraftServer implements Server {
@@ -1813,4 +1813,21 @@ public final class CraftServer implements Server {
{
return spigot;
}
@ -32,5 +32,5 @@ index 9df6c0ebb..e77307c35 100644
+ // Paper end
}
--
2.12.2.windows.2
2.13.0

Datei anzeigen

@ -1,4 +1,4 @@
From 6ad5adc9ed459e196fc415dba3914509def9b240 Mon Sep 17 00:00:00 2001
From d4673f5e5b1a04e2bef7bcbf696030a11d663625 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 18 Mar 2016 13:50:14 -0400
Subject: [PATCH] Remove Metadata on reload
@ -7,10 +7,10 @@ Metadata is not meant to persist reload as things break badly with non primitive
This will remove metadata on reload so it does not crash everything if a plugin uses it.
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index e77307c35..4d761d32a 100644
index 0dca774af..fcc20d28e 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -741,6 +741,14 @@ public final class CraftServer implements Server {
@@ -733,6 +733,14 @@ public final class CraftServer implements Server {
world.paperConfig.init(); // Paper
}
@ -26,5 +26,5 @@ index e77307c35..4d761d32a 100644
commandMap.clearCommands();
resetRecipes();
--
2.12.2.windows.2
2.13.0

Datei anzeigen

@ -1,4 +1,4 @@
From 1e3c4136cd2e9eec214fb9b730c3a01e486d841c Mon Sep 17 00:00:00 2001
From 0b2c23e0f9ef9496c70ffc151913ad91f1fd1cfe Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 18 Mar 2016 14:19:19 -0400
Subject: [PATCH] Undead horse leashing
@ -20,7 +20,7 @@ index 9987a5c7a..0873febb6 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/EntityHorseAbstract.java b/src/main/java/net/minecraft/server/EntityHorseAbstract.java
index d74ccd68d..3416c7a7d 100644
index bed01b8c0..a3c41130f 100644
--- a/src/main/java/net/minecraft/server/EntityHorseAbstract.java
+++ b/src/main/java/net/minecraft/server/EntityHorseAbstract.java
@@ -115,7 +115,7 @@ public abstract class EntityHorseAbstract extends EntityAnimal implements IInven
@ -31,7 +31,7 @@ index d74ccd68d..3416c7a7d 100644
+ return world.paperConfig.allowLeashingUndeadHorse ? super.a(entityhuman) : super.a(entityhuman) && this.getMonsterType() != EnumMonsterType.UNDEAD; // Paper
}
protected void q(float f) {
protected void s(float f) {
--
2.12.2.windows.2
2.13.0

Datei anzeigen

@ -1,4 +1,4 @@
From 96ff410272199eb91bc1607e2b57ceaa9470b610 Mon Sep 17 00:00:00 2001
From 15898664587209c5044cc40622c9079734bbbb17 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 28 May 2015 23:00:19 -0400
Subject: [PATCH] Handle Item Meta Inconsistencies
@ -18,7 +18,7 @@ For consistency, the old API methods now forward to use the
ItemMeta API equivalents, and should deprecate the old API's.
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
index a54bc7c42..81ec8f69e 100644
index 3f11e4279..ebb3e04bc 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
@@ -4,6 +4,7 @@ import static org.bukkit.craftbukkit.inventory.CraftMetaItem.ENCHANTMENTS;
@ -144,7 +144,7 @@ index a54bc7c42..81ec8f69e 100644
static Map<Enchantment, Integer> getEnchantments(net.minecraft.server.ItemStack item) {
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
index 9d0c05cd0..ab50ee92e 100644
index 2bf7e9f35..523c14df0 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -6,13 +6,8 @@ import java.lang.annotation.RetentionPolicy;
@ -181,7 +181,7 @@ index 9d0c05cd0..ab50ee92e 100644
import java.util.logging.Level;
import java.util.logging.Logger;
import net.minecraft.server.NBTCompressedStreamTools;
@@ -225,7 +228,7 @@ class CraftMetaItem implements ItemMeta, Repairable {
@@ -226,7 +229,7 @@ class CraftMetaItem implements ItemMeta, Repairable {
private String displayName;
private String locName;
private List<String> lore;
@ -190,7 +190,7 @@ index 9d0c05cd0..ab50ee92e 100644
private int repairCost;
private int hideFlag;
private boolean unbreakable;
@@ -233,7 +236,7 @@ class CraftMetaItem implements ItemMeta, Repairable {
@@ -234,7 +237,7 @@ class CraftMetaItem implements ItemMeta, Repairable {
private static final Set<String> HANDLED_TAGS = Sets.newHashSet();
private NBTTagCompound internalTag;
@ -199,7 +199,7 @@ index 9d0c05cd0..ab50ee92e 100644
CraftMetaItem(CraftMetaItem meta) {
if (meta == null) {
@@ -248,7 +251,7 @@ class CraftMetaItem implements ItemMeta, Repairable {
@@ -249,7 +252,7 @@ class CraftMetaItem implements ItemMeta, Repairable {
}
if (meta.enchantments != null) { // Spigot
@ -208,7 +208,7 @@ index 9d0c05cd0..ab50ee92e 100644
}
this.repairCost = meta.repairCost;
@@ -469,13 +472,13 @@ class CraftMetaItem implements ItemMeta, Repairable {
@@ -470,13 +473,13 @@ class CraftMetaItem implements ItemMeta, Repairable {
}
}
@ -224,7 +224,7 @@ index 9d0c05cd0..ab50ee92e 100644
for (int i = 0; i < ench.size(); i++) {
int id = 0xffff & ((NBTTagCompound) ench.get(i)).getShort(ENCHANTMENTS_ID.NBT);
@@ -545,13 +548,13 @@ class CraftMetaItem implements ItemMeta, Repairable {
@@ -546,13 +549,13 @@ class CraftMetaItem implements ItemMeta, Repairable {
void deserializeInternal(NBTTagCompound tag) {
}
@ -240,7 +240,7 @@ index 9d0c05cd0..ab50ee92e 100644
for (Map.Entry<?, ?> entry : ench.entrySet()) {
Enchantment enchantment = Enchantment.getByName(entry.getKey().toString());
@@ -695,12 +698,12 @@ class CraftMetaItem implements ItemMeta, Repairable {
@@ -696,12 +699,12 @@ class CraftMetaItem implements ItemMeta, Repairable {
}
public Map<Enchantment, Integer> getEnchants() {
@ -255,7 +255,7 @@ index 9d0c05cd0..ab50ee92e 100644
}
if (ignoreRestrictions || level >= ench.getStartLevel() && level <= ench.getMaxLevel()) {
@@ -870,7 +873,7 @@ class CraftMetaItem implements ItemMeta, Repairable {
@@ -871,7 +874,7 @@ class CraftMetaItem implements ItemMeta, Repairable {
clone.lore = new ArrayList<String>(this.lore);
}
if (this.enchantments != null) {
@ -264,7 +264,7 @@ index 9d0c05cd0..ab50ee92e 100644
}
clone.hideFlag = this.hideFlag;
clone.unbreakable = this.unbreakable;
@@ -1027,6 +1030,23 @@ class CraftMetaItem implements ItemMeta, Repairable {
@@ -1029,6 +1032,23 @@ class CraftMetaItem implements ItemMeta, Repairable {
}
}
@ -289,5 +289,5 @@ index 9d0c05cd0..ab50ee92e 100644
private final Spigot spigot = new Spigot()
{
--
2.12.2.windows.2
2.13.0

Datei anzeigen

@ -1,15 +1,36 @@
From e6cab2b2737495bda0da7f5bea283749cf2d99be Mon Sep 17 00:00:00 2001
From 0a7c4b8b28a8d72061bbfc35c2aeb0a9bc05674f Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 18 Mar 2016 20:16:03 -0400
Subject: [PATCH] Add World Util Methods
Methods that can be used for other patches to help improve logic.
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index 491278646..c0d6e056d 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -580,6 +580,7 @@ public class Chunk {
}
+ public final int getLightSubtracted(BlockPosition blockposition, int i) { return this.a(blockposition, i); } // Paper - OBFHELPER
public int a(BlockPosition blockposition, int i) {
int j = blockposition.getX() & 15;
int k = blockposition.getY();
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index cc7369e52..1d2d174e8 100644
index 1fc7ec6f4..20bdf4055 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -152,6 +152,12 @@ public abstract class World implements IBlockAccess {
@@ -76,7 +76,7 @@ public abstract class World implements IBlockAccess {
public final List<Entity> j = Lists.newArrayList();
protected final IntHashMap<Entity> entitiesById = new IntHashMap();
private final long K = 16777215L;
- private int L;
+ private int L; private int getSkylightSubtracted() { return this.L; } // Paper - OBFHELPER
protected int l = (new Random()).nextInt();
protected final int m = 1013904223;
protected float n;
@@ -154,6 +154,12 @@ public abstract class World implements IBlockAccess {
return (CraftServer) Bukkit.getServer();
}
@ -22,7 +43,7 @@ index cc7369e52..1d2d174e8 100644
public Chunk getChunkIfLoaded(int x, int z) {
return ((ChunkProviderServer) this.chunkProvider).getChunkIfLoaded(x, z);
}
@@ -682,6 +688,41 @@ public abstract class World implements IBlockAccess {
@@ -684,10 +690,46 @@ public abstract class World implements IBlockAccess {
}
}
@ -53,7 +74,7 @@ index cc7369e52..1d2d174e8 100644
+ }
+
+ Chunk chunk = this.getChunkAtWorldCoords(blockposition);
+ return chunk.a(blockposition, this.J) >= level;
+ return chunk.getLightSubtracted(blockposition, this.getSkylightSubtracted()) >= level;
+ }
+ } else {
+ return true;
@ -64,7 +85,12 @@ index cc7369e52..1d2d174e8 100644
public int getLightLevel(BlockPosition blockposition) {
return this.c(blockposition, true);
}
@@ -801,6 +842,27 @@ public abstract class World implements IBlockAccess {
+ public final int getLight(BlockPosition blockposition, boolean checkNeighbors) { return this.c(blockposition, checkNeighbors); } // Paper - OBFHELPER
public int c(BlockPosition blockposition, boolean flag) {
if (blockposition.getX() >= -30000000 && blockposition.getZ() >= -30000000 && blockposition.getX() < 30000000 && blockposition.getZ() < 30000000) {
if (flag && this.getType(blockposition).f()) {
@@ -803,6 +845,27 @@ public abstract class World implements IBlockAccess {
return this.worldProvider.o()[this.getLightLevel(blockposition)];
}
@ -93,5 +119,5 @@ index cc7369e52..1d2d174e8 100644
// CraftBukkit start - tree generation
if (captureTreeGeneration) {
--
2.12.2.windows.2
2.13.0

Datei anzeigen

@ -1,4 +1,4 @@
From ca1b25eea56895788212adb3ecb23dedc8ae132c Mon Sep 17 00:00:00 2001
From 4db1c6925294438d675336f3f9193cb7f6589de5 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 18 Mar 2016 21:22:56 -0400
Subject: [PATCH] Optimized Light Level Comparisons
@ -91,7 +91,7 @@ index c74b6284f..bb96e164e 100644
if (random.nextInt((int) ((100.0F / (this == Blocks.PUMPKIN_STEM ? world.spigotConfig.pumpkinModifier : world.spigotConfig.melonModifier)) * (25.0F / f)) + 1) == 0) { // Spigot
diff --git a/src/main/java/net/minecraft/server/EntityMonster.java b/src/main/java/net/minecraft/server/EntityMonster.java
index 3ee52139c..59d8bb6e7 100644
index 21539ff9b..1585bf3bc 100644
--- a/src/main/java/net/minecraft/server/EntityMonster.java
+++ b/src/main/java/net/minecraft/server/EntityMonster.java
@@ -118,17 +118,17 @@ public abstract class EntityMonster extends EntityCreature implements IMonster {
@ -102,8 +102,8 @@ index 3ee52139c..59d8bb6e7 100644
-
+ //int i = this.world.getLightLevel(blockposition); // Paper
+ boolean passes; // Paper
if (this.world.V()) {
int j = this.world.af();
if (this.world.X()) {
int j = this.world.ah();
this.world.c(10);
- i = this.world.getLightLevel(blockposition);
@ -118,7 +118,7 @@ index 3ee52139c..59d8bb6e7 100644
}
diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java
index 897882c97..970fabf71 100644
index bf059a746..003e06156 100644
--- a/src/main/java/net/minecraft/server/EntityZombie.java
+++ b/src/main/java/net/minecraft/server/EntityZombie.java
@@ -178,7 +178,7 @@ public class EntityZombie extends EntityMonster {
@ -131,5 +131,5 @@ index 897882c97..970fabf71 100644
if (!this.world.isPlayerNearby((double) i1, (double) j1, (double) k1, 7.0D) && this.world.a(entityzombie.getBoundingBox(), (Entity) entityzombie) && this.world.getCubes(entityzombie, entityzombie.getBoundingBox()).isEmpty() && !this.world.containsLiquid(entityzombie.getBoundingBox())) {
this.world.addEntity(entityzombie, CreatureSpawnEvent.SpawnReason.REINFORCEMENTS); // CraftBukkit
--
2.12.2.windows.2
2.13.0

Datei anzeigen

@ -1,19 +1,19 @@
From c267a846efc3860d0dd8c2664eb5363fcf2c2f01 Mon Sep 17 00:00:00 2001
From 8d2c7044a378483beaf90ef87cbd0ecdb5f92215 Mon Sep 17 00:00:00 2001
From: Jedediah Smith <jedediah@silencegreys.com>
Date: Sun, 21 Jun 2015 15:07:20 -0400
Subject: [PATCH] Custom replacement for eaten items
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 247224117..9cb3b22fb 100644
index 1ad33521c..2b20a0205 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -2323,12 +2323,13 @@ public abstract class EntityLiving extends Entity {
@@ -2369,12 +2369,13 @@ public abstract class EntityLiving extends Entity {
protected void v() {
if (!this.activeItem.isEmpty() && this.isHandRaised()) {
+ PlayerItemConsumeEvent event = null; // Paper
this.a(this.activeItem, 16);
this.b(this.activeItem, 16);
// CraftBukkit start - fire PlayerItemConsumeEvent
ItemStack itemstack;
if (this instanceof EntityPlayer) {
@ -23,7 +23,7 @@ index 247224117..9cb3b22fb 100644
world.getServer().getPluginManager().callEvent(event);
if (event.isCancelled()) {
@@ -2343,9 +2344,21 @@ public abstract class EntityLiving extends Entity {
@@ -2389,9 +2390,21 @@ public abstract class EntityLiving extends Entity {
itemstack = this.activeItem.a(this.world, this);
}
@ -34,9 +34,9 @@ index 247224117..9cb3b22fb 100644
+ }
+ // Paper end
+
this.a(this.cz(), itemstack);
this.a(this.cF(), itemstack);
// CraftBukkit end
this.cF();
this.cL();
+
+ // Paper start - if the replacement is anything but the default, update the client inventory
+ if (this instanceof EntityPlayer && !com.google.common.base.Objects.equal(defaultReplacement, itemstack)) {
@ -46,5 +46,5 @@ index 247224117..9cb3b22fb 100644
}
--
2.12.2.windows.2
2.13.0

Datei anzeigen

@ -1,14 +1,14 @@
From cd0818fe9a15de0585fe4ad9816f44521361de2c Mon Sep 17 00:00:00 2001
From 3d32a01b2bdddf62287fb6e4d45db50f4392299b Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 27 Sep 2015 01:18:02 -0400
Subject: [PATCH] handle NaN health/absorb values and repair bad data
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 9cb3b22fb..c70f14a15 100644
index 2b20a0205..793353ac7 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -481,7 +481,13 @@ public abstract class EntityLiving extends Entity {
@@ -482,7 +482,13 @@ public abstract class EntityLiving extends Entity {
}
public void a(NBTTagCompound nbttagcompound) {
@ -23,7 +23,7 @@ index 9cb3b22fb..c70f14a15 100644
if (nbttagcompound.hasKeyOfType("Attributes", 9) && this.world != null && !this.world.isClientSide) {
GenericAttributes.a(this.getAttributeMap(), nbttagcompound.getList("Attributes", 10));
}
@@ -780,6 +786,10 @@ public abstract class EntityLiving extends Entity {
@@ -785,6 +791,10 @@ public abstract class EntityLiving extends Entity {
}
public void setHealth(float f) {
@ -34,7 +34,7 @@ index 9cb3b22fb..c70f14a15 100644
// CraftBukkit start - Handle scaled health
if (this instanceof EntityPlayer) {
org.bukkit.craftbukkit.entity.CraftPlayer player = ((EntityPlayer) this).getBukkitEntity();
@@ -2211,7 +2221,7 @@ public abstract class EntityLiving extends Entity {
@@ -2257,7 +2267,7 @@ public abstract class EntityLiving extends Entity {
}
public void setAbsorptionHearts(float f) {
@ -44,10 +44,10 @@ index 9cb3b22fb..c70f14a15 100644
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index dd8380f71..0a9e8b9cd 100644
index 5839801f5..78aab5c63 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1398,6 +1398,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1385,6 +1385,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
public void setRealHealth(double health) {
@ -56,5 +56,5 @@ index dd8380f71..0a9e8b9cd 100644
}
--
2.12.2
2.13.0

Datei anzeigen

@ -1,4 +1,4 @@
From af92277b1e36fec281d2486e1b8122f45b1b38b0 Mon Sep 17 00:00:00 2001
From 973464436acb53d2f606b3007faf0bf176912a26 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 22 Mar 2016 00:33:47 -0400
Subject: [PATCH] Use a Shared Random for Entities
@ -6,7 +6,7 @@ Subject: [PATCH] Use a Shared Random for Entities
Reduces memory usage and provides ensures more randomness, Especially since a lot of garbage entity objects get created.
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index be54c807b..42bd79b10 100644
index dbaf2863b..aabf25cf2 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -46,6 +46,7 @@ public abstract class Entity implements ICommandListener {
@ -17,15 +17,15 @@ index be54c807b..42bd79b10 100644
static boolean isLevelAtLeast(NBTTagCompound tag, int level) {
return tag.hasKey("Bukkit.updateLevel") && tag.getInt("Bukkit.updateLevel") >= level;
}
@@ -163,7 +164,7 @@ public abstract class Entity implements ICommandListener {
this.width = 0.6F;
@@ -165,7 +166,7 @@ public abstract class Entity implements ICommandListener {
this.length = 1.8F;
this.ax = 1;
this.ay = 1.0F;
- this.random = new Random();
+ this.random = SHARED_RANDOM; // Paper
this.fireTicks = -this.getMaxFireTicks();
this.justCreated = true;
this.uniqueID = MathHelper.a(this.random);
--
2.12.2
2.13.0

Datei anzeigen

@ -1,4 +1,4 @@
From 9a7b6ab52a15652e1563cfd5517ccd2e3d88257e Mon Sep 17 00:00:00 2001
From d21c30d407d2f865c3bed78c6a195302b44fadd4 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 22 Mar 2016 00:55:23 -0400
Subject: [PATCH] Don't teleport dead entities
@ -7,10 +7,10 @@ Had some issue with this in past, and this is the vanilla logic.
Potentially an old CB change that's no longer needed.
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 42bd79b10..70a431a63 100644
index aabf25cf2..b3911fa9f 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -2317,7 +2317,7 @@ public abstract class Entity implements ICommandListener {
@@ -2344,7 +2344,7 @@ public abstract class Entity implements ICommandListener {
}
public Entity teleportTo(Location exit, boolean portal) {
@ -20,5 +20,5 @@ index 42bd79b10..70a431a63 100644
WorldServer worldserver1 = ((CraftWorld) exit.getWorld()).getHandle();
int i = worldserver1.dimension;
--
2.12.2
2.13.0

Datei anzeigen

@ -1,4 +1,4 @@
From 80c0b91baf607f0b1625abbd20588b4be44c80c8 Mon Sep 17 00:00:00 2001
From d7b87a048189cfd45f61489882361646b9a8cc6d Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 22 Mar 2016 12:04:28 -0500
Subject: [PATCH] Configurable spawn chances for skeleton horses
@ -19,10 +19,10 @@ index b37b5901b..adc810720 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 9b059e52c..de900920a 100644
index 04eb5ad9a..7d7f3d39e 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -436,7 +436,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@@ -445,7 +445,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
if (this.isRainingAt(blockposition)) {
DifficultyDamageScaler difficultydamagescaler = this.D(blockposition);
@ -32,5 +32,5 @@ index 9b059e52c..de900920a 100644
entityhorseskeleton.p(true);
--
2.12.2
2.13.0

Datei anzeigen

@ -1,4 +1,4 @@
From 1979a3eba27bfc1b815da4923498bbe652906e95 Mon Sep 17 00:00:00 2001
From bc65ae40e324298b8ab016670f728b7731197a31 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 3 Mar 2016 02:07:55 -0600
Subject: [PATCH] Optimize isValidLocation, getType and getBlockData for inling
@ -12,7 +12,7 @@ Replace all calls to the new place to the unnecessary forward.
Optimize getType and getBlockData to manually inline and optimize the calls
diff --git a/src/main/java/net/minecraft/server/BaseBlockPosition.java b/src/main/java/net/minecraft/server/BaseBlockPosition.java
index d60e75502..f772c7cdf 100644
index d55e180d7..679d5504e 100644
--- a/src/main/java/net/minecraft/server/BaseBlockPosition.java
+++ b/src/main/java/net/minecraft/server/BaseBlockPosition.java
@@ -10,6 +10,14 @@ public class BaseBlockPosition implements Comparable<BaseBlockPosition> {
@ -52,10 +52,10 @@ index 67b476b22..008ed206d 100644
public MutableBlockPosition() {
this(0, 0, 0);
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index 8f1a68d67..736fa1f62 100644
index c0d6e056d..88f5ce9e2 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -406,11 +406,26 @@ public class Chunk {
@@ -406,11 +406,27 @@ public class Chunk {
return this.a(i, j, k).c();
}
@ -79,9 +79,10 @@ index 8f1a68d67..736fa1f62 100644
public IBlockData a(final int i, final int j, final int k) {
+ return getBlockData(i, j, k);
+ }
+
+ public IBlockData unused(final int i, final int j, final int k) {
+ // Paper end
if (this.world.L() == WorldType.DEBUG_ALL_BLOCK_STATES) {
if (this.world.N() == WorldType.DEBUG_ALL_BLOCK_STATES) {
IBlockData iblockdata = null;
diff --git a/src/main/java/net/minecraft/server/ChunkSection.java b/src/main/java/net/minecraft/server/ChunkSection.java
@ -98,10 +99,10 @@ index 3d784d0dc..afdc4a779 100644
private NibbleArray skyLight;
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 1d2d174e8..9427fc080 100644
index 20bdf4055..1cd81e533 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -273,12 +273,12 @@ public abstract class World implements IBlockAccess {
@@ -275,12 +275,12 @@ public abstract class World implements IBlockAccess {
return this.getType(blockposition1);
}
@ -118,7 +119,7 @@ index 1d2d174e8..9427fc080 100644
}
public boolean isEmpty(BlockPosition blockposition) {
@@ -374,7 +374,7 @@ public abstract class World implements IBlockAccess {
@@ -376,7 +376,7 @@ public abstract class World implements IBlockAccess {
return true;
}
// CraftBukkit end
@ -127,7 +128,7 @@ index 1d2d174e8..9427fc080 100644
return false;
} else if (!this.isClientSide && this.worldData.getType() == WorldType.DEBUG_ALL_BLOCK_STATES) {
return false;
@@ -691,7 +691,7 @@ public abstract class World implements IBlockAccess {
@@ -693,7 +693,7 @@ public abstract class World implements IBlockAccess {
// Paper start - test if meets light level, return faster
// logic copied from below
public boolean isLightLevel(BlockPosition blockposition, int level) {
@ -136,7 +137,7 @@ index 1d2d174e8..9427fc080 100644
if (this.getType(blockposition).f()) {
if (this.c(blockposition.up(), false) >= level) {
return true;
@@ -809,7 +809,7 @@ public abstract class World implements IBlockAccess {
@@ -812,7 +812,7 @@ public abstract class World implements IBlockAccess {
blockposition = new BlockPosition(blockposition.getX(), 0, blockposition.getZ());
}
@ -145,7 +146,7 @@ index 1d2d174e8..9427fc080 100644
return enumskyblock.c;
} else if (!this.isLoaded(blockposition)) {
return enumskyblock.c;
@@ -821,7 +821,7 @@ public abstract class World implements IBlockAccess {
@@ -824,7 +824,7 @@ public abstract class World implements IBlockAccess {
}
public void a(EnumSkyBlock enumskyblock, BlockPosition blockposition, int i) {
@ -154,7 +155,7 @@ index 1d2d174e8..9427fc080 100644
if (this.isLoaded(blockposition)) {
Chunk chunk = this.getChunkAtWorldCoords(blockposition);
@@ -845,19 +845,19 @@ public abstract class World implements IBlockAccess {
@@ -848,19 +848,19 @@ public abstract class World implements IBlockAccess {
// Paper start - reduces need to do isLoaded before getType
public IBlockData getTypeIfLoaded(BlockPosition blockposition) {
// CraftBukkit start - tree generation
@ -182,7 +183,7 @@ index 1d2d174e8..9427fc080 100644
}
return null;
}
@@ -865,24 +865,33 @@ public abstract class World implements IBlockAccess {
@@ -868,24 +868,33 @@ public abstract class World implements IBlockAccess {
public IBlockData getType(BlockPosition blockposition) {
// CraftBukkit start - tree generation
@ -225,9 +226,9 @@ index 1d2d174e8..9427fc080 100644
}
+ // Paper end
public boolean B() {
return this.J < 4;
@@ -2017,7 +2026,7 @@ public abstract class World implements IBlockAccess {
public boolean D() {
return this.L < 4;
@@ -2020,7 +2029,7 @@ public abstract class World implements IBlockAccess {
public Map<BlockPosition, TileEntity> capturedTileEntities = Maps.newHashMap();
@Nullable
public TileEntity getTileEntity(BlockPosition blockposition) {
@ -236,7 +237,7 @@ index 1d2d174e8..9427fc080 100644
return null;
} else {
// CraftBukkit start
@@ -2058,7 +2067,7 @@ public abstract class World implements IBlockAccess {
@@ -2061,7 +2070,7 @@ public abstract class World implements IBlockAccess {
}
public void setTileEntity(BlockPosition blockposition, @Nullable TileEntity tileentity) {
@ -245,7 +246,7 @@ index 1d2d174e8..9427fc080 100644
if (tileentity != null && !tileentity.y()) {
// CraftBukkit start
if (captureBlockStates) {
@@ -2121,7 +2130,7 @@ public abstract class World implements IBlockAccess {
@@ -2124,7 +2133,7 @@ public abstract class World implements IBlockAccess {
}
public boolean d(BlockPosition blockposition, boolean flag) {
@ -255,5 +256,5 @@ index 1d2d174e8..9427fc080 100644
} else {
Chunk chunk = this.chunkProvider.getLoadedChunkAt(blockposition.getX() >> 4, blockposition.getZ() >> 4);
--
2.12.2
2.13.0

Datei anzeigen

@ -1,4 +1,4 @@
From c80926a9307c1543849b7120dcf44c831275834e Mon Sep 17 00:00:00 2001
From 3a92a6ebcf07d8b478c345526d2d3896c0df237a Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 28 Mar 2016 19:55:45 -0400
Subject: [PATCH] Option to disable BlockPhysicsEvent for Redstone
@ -25,10 +25,10 @@ index adc810720..e706efff5 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 9427fc080..8cbdbda92 100644
index 1cd81e533..b8719ba91 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -578,7 +578,7 @@ public abstract class World implements IBlockAccess {
@@ -580,7 +580,7 @@ public abstract class World implements IBlockAccess {
try {
// CraftBukkit start
CraftWorld world = ((WorldServer) this).getWorld();
@ -38,7 +38,7 @@ index 9427fc080..8cbdbda92 100644
this.getServer().getPluginManager().callEvent(event);
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index de900920a..f80647b31 100644
index 7d7f3d39e..36e6fdd16 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -34,6 +34,7 @@ import org.bukkit.event.weather.LightningStrikeEvent;
@ -49,7 +49,7 @@ index de900920a..f80647b31 100644
private final MinecraftServer server;
public EntityTracker tracker;
private final PlayerChunkMap manager;
@@ -727,6 +728,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@@ -726,6 +727,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
if (iblockdata.getMaterial() != Material.AIR && Block.a(iblockdata.getBlock(), nextticklistentry.a())) {
try {
@ -57,7 +57,7 @@ index de900920a..f80647b31 100644
iblockdata.getBlock().b((World) this, nextticklistentry.a, iblockdata, this.random);
} catch (Throwable throwable) {
CrashReport crashreport = CrashReport.a(throwable, "Exception while ticking a block");
@@ -734,7 +736,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@@ -733,7 +735,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
CrashReportSystemDetails.a(crashreportsystemdetails, nextticklistentry.a, iblockdata);
throw new ReportedException(crashreport);
@ -67,5 +67,5 @@ index de900920a..f80647b31 100644
timing.stopTiming(); // Paper
} else {
--
2.12.2
2.13.0

Datei anzeigen

@ -1,14 +1,14 @@
From fbb0b9f15da52c572235a4a38164da7fd5aecc5b Mon Sep 17 00:00:00 2001
From e58bd8dd6ef47687c17109b69e0fcabec2e9a25d Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 28 Mar 2016 20:32:58 -0400
Subject: [PATCH] Entity AddTo/RemoveFrom World Events
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 8cbdbda92..f86c64cb2 100644
index b8719ba91..ae470656b 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -1182,6 +1182,7 @@ public abstract class World implements IBlockAccess {
@@ -1185,6 +1185,7 @@ public abstract class World implements IBlockAccess {
}
entity.valid = true; // CraftBukkit
@ -16,7 +16,7 @@ index 8cbdbda92..f86c64cb2 100644
}
protected void c(Entity entity) {
@@ -1189,6 +1190,7 @@ public abstract class World implements IBlockAccess {
@@ -1192,6 +1193,7 @@ public abstract class World implements IBlockAccess {
((IWorldAccess) this.u.get(i)).b(entity);
}
@ -25,5 +25,5 @@ index 8cbdbda92..f86c64cb2 100644
}
--
2.12.2
2.13.0

Datei anzeigen

@ -1,4 +1,4 @@
From 898cc9c9a103418974e27f5ed4c82b96f954cef8 Mon Sep 17 00:00:00 2001
From 4547f644988475da576ddf500a86a4334f875115 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 28 Mar 2016 20:46:14 -0400
Subject: [PATCH] Configurable Chunk Inhabited Timer
@ -23,10 +23,10 @@ index e706efff5..2c682ccf7 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index 736fa1f62..61d34fc37 100644
index 88f5ce9e2..15494d0b1 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -1405,7 +1405,7 @@ public class Chunk {
@@ -1407,7 +1407,7 @@ public class Chunk {
}
public long x() {
@ -36,5 +36,5 @@ index 736fa1f62..61d34fc37 100644
public void c(long i) {
--
2.12.2
2.13.0

Datei anzeigen

@ -1,4 +1,4 @@
From d3c9388de3e0dc2bbc6c1b12eb76d09c48af1d08 Mon Sep 17 00:00:00 2001
From 41b32f64e3ff49cf3317f8b5e0309ad4a2597dc7 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 28 Mar 2016 21:22:26 -0400
Subject: [PATCH] EntityPathfindEvent
@ -6,7 +6,7 @@ Subject: [PATCH] EntityPathfindEvent
Fires when an Entity decides to start moving to a location.
diff --git a/src/main/java/net/minecraft/server/NavigationAbstract.java b/src/main/java/net/minecraft/server/NavigationAbstract.java
index 43b2be505..c0ef2400b 100644
index 3e598afd4..3871ad017 100644
--- a/src/main/java/net/minecraft/server/NavigationAbstract.java
+++ b/src/main/java/net/minecraft/server/NavigationAbstract.java
@@ -4,7 +4,7 @@ import javax.annotation.Nullable;
@ -24,7 +24,7 @@ index 43b2be505..c0ef2400b 100644
} else {
+ if (!new com.destroystokyo.paper.event.entity.EntityPathfindEvent(getEntity().getBukkitEntity(), MCUtil.toLocation(getEntity().world, blockposition), null).callEvent()) { return null; } // Paper
this.q = blockposition;
float f = this.h();
float f = this.i();
@@ -98,6 +99,7 @@ public abstract class NavigationAbstract {
if (this.c != null && !this.c.b() && blockposition.equals(this.q)) {
@ -32,8 +32,8 @@ index 43b2be505..c0ef2400b 100644
} else {
+ if (!new com.destroystokyo.paper.event.entity.EntityPathfindEvent(getEntity().getBukkitEntity(), MCUtil.toLocation(entity.world, blockposition), entity.getBukkitEntity()).callEvent()) { return null; } // Paper
this.q = blockposition;
float f = this.h();
float f = this.i();
--
2.12.2
2.13.0

Datei anzeigen

@ -1,4 +1,4 @@
From ddaa32482b51ab2ef6141ae0e48d26565599be40 Mon Sep 17 00:00:00 2001
From 9c522bb9ad65ef25793a4b39034ba45e9d7fe8a4 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 31 Mar 2016 19:17:58 -0400
Subject: [PATCH] Do not load chunks for light checks
@ -7,10 +7,10 @@ Should only happen for blocks on the edge that uses neighbors light level
(certain blocks). In that case, there will be 3-4 other neighbors to get a light level from.
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index f86c64cb2..7e6459654 100644
index ae470656b..036d96fa7 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -759,6 +759,7 @@ public abstract class World implements IBlockAccess {
@@ -762,6 +762,7 @@ public abstract class World implements IBlockAccess {
if (blockposition.getY() >= 256) {
blockposition = new BlockPosition(blockposition.getX(), 255, blockposition.getZ());
}
@ -19,5 +19,5 @@ index f86c64cb2..7e6459654 100644
Chunk chunk = this.getChunkAtWorldCoords(blockposition);
--
2.12.2
2.13.0

Datei anzeigen

@ -1,4 +1,4 @@
From 3ef06b376d5d7091fa982931e4a0a66ff0f76a2d Mon Sep 17 00:00:00 2001
From e8548ec5455f5fb85d3a3d9fdaf9aabad959d2ba Mon Sep 17 00:00:00 2001
From: Jedediah Smith <jedediah@silencegreys.com>
Date: Sat, 2 Apr 2016 05:09:16 -0400
Subject: [PATCH] Add PlayerUseUnknownEntityEvent
@ -18,10 +18,10 @@ index c67cb54a3..521f46262 100644
private Vec3D c;
private EnumHand d;
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index b67837dd2..840448995 100644
index 1bc61ef43..25c02c727 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1614,6 +1614,16 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
@@ -1625,6 +1625,16 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
}
}
}
@ -39,5 +39,5 @@ index b67837dd2..840448995 100644
}
--
2.12.2
2.13.0

Datei anzeigen

@ -1,21 +1,21 @@
From 97885a33964fffa97584963cbe542dccb797b0bc Mon Sep 17 00:00:00 2001
From f7d4407c751b874ca036f5621c2b9610b6c1bd9d Mon Sep 17 00:00:00 2001
From: Jedediah Smith <jedediah@silencegreys.com>
Date: Sat, 2 Apr 2016 20:37:03 -0400
Subject: [PATCH] Fix reducedDebugInfo not initialized on client
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 59c7e78b8..e303b45f0 100644
index 7c73e08c3..45ad22c8f 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -154,6 +154,7 @@ public abstract class PlayerList {
@@ -156,6 +156,7 @@ public abstract class PlayerList {
playerconnection.sendPacket(new PacketPlayOutServerDifficulty(worlddata.getDifficulty(), worlddata.isDifficultyLocked()));
playerconnection.sendPacket(new PacketPlayOutAbilities(entityplayer.abilities));
playerconnection.sendPacket(new PacketPlayOutHeldItemSlot(entityplayer.inventory.itemInHandIndex));
+ playerconnection.sendPacket(new PacketPlayOutEntityStatus(entityplayer, (byte) (worldserver.getGameRules().getBoolean("reducedDebugInfo") ? 22 : 23))); // Paper - fix this rule not being initialized on the client
this.f(entityplayer);
entityplayer.getStatisticManager().d();
entityplayer.getStatisticManager().updateStatistics(entityplayer);
entityplayer.getStatisticManager().c();
entityplayer.F().a(entityplayer);
--
2.12.2
2.13.0

Datei anzeigen

@ -1,4 +1,4 @@
From 9f82f1d72fa9ec99080e660e69cee7822085bf44 Mon Sep 17 00:00:00 2001
From 3f5c4a27566f6700dec08348db62862580e22069 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sat, 13 Sep 2014 23:14:43 -0400
Subject: [PATCH] Configurable Keep Spawn Loaded range per world
@ -21,10 +21,10 @@ index 74a49a5fb..3a942c763 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index e7c63a953..3aea41f76 100644
index ecdb92397..b55ce6b1a 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -356,8 +356,11 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
@@ -356,8 +356,11 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs
long j = aw();
i = 0;
@ -39,10 +39,10 @@ index e7c63a953..3aea41f76 100644
if (i1 - j > 1000L) {
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 7e6459654..dba3fb167 100644
index 036d96fa7..b3c580836 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -3194,8 +3194,9 @@ public abstract class World implements IBlockAccess {
@@ -3197,8 +3197,9 @@ public abstract class World implements IBlockAccess {
int k = i * 16 + 8 - blockposition.getX();
int l = j * 16 + 8 - blockposition.getZ();
boolean flag = true;
@ -54,10 +54,10 @@ index 7e6459654..dba3fb167 100644
public void a(Packet<?> packet) {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 4d761d32a..a958ce998 100644
index fcc20d28e..f4fd25c29 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -952,7 +952,7 @@ public final class CraftServer implements Server {
@@ -949,7 +949,7 @@ public final class CraftServer implements Server {
System.out.print("Preparing start region for level " + (console.worlds.size() - 1) + " (Seed: " + internal.getSeed() + ")");
if (internal.getWorld().getKeepSpawnInMemory()) {
@ -67,10 +67,10 @@ index 4d761d32a..a958ce998 100644
for (int j = -short1; j <= short1; j += 16) {
for (int k = -short1; k <= short1; k += 16) {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index f65611a6a..9965235ab 100644
index 7c1bbb491..1f88cc94c 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1265,8 +1265,9 @@ public class CraftWorld implements World {
@@ -1273,8 +1273,9 @@ public class CraftWorld implements World {
int chunkCoordX = chunkcoordinates.getX() >> 4;
int chunkCoordZ = chunkcoordinates.getZ() >> 4;
// Cycle through the 25x25 Chunks around it to load/unload the chunks.
@ -83,5 +83,5 @@ index f65611a6a..9965235ab 100644
loadChunk(chunkCoordX + x, chunkCoordZ + z);
} else {
--
2.12.2
2.13.0

Datei anzeigen

@ -1,14 +1,14 @@
From 8ae180ad3f8cf80824fe419082538df82a2b0e2a Mon Sep 17 00:00:00 2001
From 907e7c092e0da791c9f24d9c649391fa30158081 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 3 Apr 2016 17:48:50 -0400
Subject: [PATCH] Fix Cancelling BlockPlaceEvent triggering physics
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index dba3fb167..44108ab9a 100644
index b3c580836..fb24b5407 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -532,6 +532,7 @@ public abstract class World implements IBlockAccess {
@@ -534,6 +534,7 @@ public abstract class World implements IBlockAccess {
}
public void applyPhysics(BlockPosition blockposition, Block block, boolean flag) {
@ -17,5 +17,5 @@ index dba3fb167..44108ab9a 100644
this.a(blockposition.east(), block, blockposition);
this.a(blockposition.down(), block, blockposition);
--
2.12.2
2.13.0

Datei anzeigen

@ -1,15 +1,15 @@
From cc0692ecfec0f490e91b5c5665030027fd1d5843 Mon Sep 17 00:00:00 2001
From d8fdffcf773a9d75b1b7751a46e1f5bf4e45e56c Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 5 Apr 2016 19:42:22 -0400
Subject: [PATCH] Don't spam reload spawn chunks in nether/end
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 44108ab9a..9bc8ce64c 100644
index fb24b5407..e301eaf9d 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -3190,6 +3190,7 @@ public abstract class World implements IBlockAccess {
return this.N;
@@ -3193,6 +3193,7 @@ public abstract class World implements IBlockAccess {
return this.P;
}
+ public boolean shouldStayLoaded(int i, int j) { return e(i, j); } // Paper - OBFHELPER
@ -17,7 +17,7 @@ index 44108ab9a..9bc8ce64c 100644
BlockPosition blockposition = this.getSpawn();
int k = i * 16 + 8 - blockposition.getX();
diff --git a/src/main/java/net/minecraft/server/WorldProvider.java b/src/main/java/net/minecraft/server/WorldProvider.java
index a27512c0f..4691b3d8f 100644
index d0265f960..35d8d1a6e 100644
--- a/src/main/java/net/minecraft/server/WorldProvider.java
+++ b/src/main/java/net/minecraft/server/WorldProvider.java
@@ -138,6 +138,6 @@ public abstract class WorldProvider {
@ -29,5 +29,5 @@ index a27512c0f..4691b3d8f 100644
}
}
--
2.12.2
2.13.0

Datei anzeigen

@ -1,4 +1,4 @@
From 6f11a33876ceebf398760bcd2bb8915910975f6c Mon Sep 17 00:00:00 2001
From ff60a18cc8906862956622e06a7b712bf8603d19 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Wed, 6 Apr 2016 01:04:23 -0500
Subject: [PATCH] Option to use vanilla per-world scoreboard coloring on names
@ -19,22 +19,22 @@ index 3a942c763..3bd29650c 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 70a431a63..8908d8b8d 100644
index b3911fa9f..fa940ad31 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -2046,6 +2046,7 @@ public abstract class Entity implements ICommandListener {
@@ -2073,6 +2073,7 @@ public abstract class Entity implements ICommandListener {
return this.getFlag(5);
}
+ @Nullable public ScoreboardTeamBase getTeam() { return this.aQ(); } // Paper - OBFHELPER
+ @Nullable public ScoreboardTeamBase getTeam() { return this.aW(); } // Paper - OBFHELPER
@Nullable
public ScoreboardTeamBase aQ() {
public ScoreboardTeamBase aW() {
if (!this.world.paperConfig.nonPlayerEntitiesOnScoreboards && !(this instanceof EntityHuman)) { return null; } // Paper
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 840448995..dfbae01f4 100644
index 25c02c727..353e73b15 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1347,7 +1347,14 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
@@ -1358,7 +1358,14 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
return;
}
@ -51,5 +51,5 @@ index 840448995..dfbae01f4 100644
if (((LazyPlayerSet) event.getRecipients()).isLazy()) {
for (Object recipient : minecraftServer.getPlayerList().players) {
--
2.12.2
2.13.0

Datei anzeigen

@ -1,4 +1,4 @@
From 5f2091113092bb84e8ce6b9e09c5042201d8508d Mon Sep 17 00:00:00 2001
From 47707ae66e07a5a249d29be95801f530ba0dfec1 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Sun, 10 Apr 2016 03:23:32 -0500
Subject: [PATCH] Workaround for setting passengers on players
@ -6,10 +6,10 @@ Subject: [PATCH] Workaround for setting passengers on players
SPIGOT-1915 & GH-114
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 0a9e8b9cd..8e06c2140 100644
index 78aab5c63..00f9229f0 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -589,6 +589,17 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -597,6 +597,17 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
return true;
}
@ -28,5 +28,5 @@ index 0a9e8b9cd..8e06c2140 100644
public void setSneaking(boolean sneak) {
getHandle().setSneaking(sneak);
--
2.12.2
2.13.0

Datei anzeigen

@ -1,4 +1,4 @@
From d8532410334ad90c176c7553d1b3bca14f95f54b Mon Sep 17 00:00:00 2001
From fed630f23449d74c70787fc317255c14d8a5329f Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 13 Apr 2016 00:25:28 -0400
Subject: [PATCH] Remove unused World Tile Entity List
@ -6,7 +6,7 @@ Subject: [PATCH] Remove unused World Tile Entity List
Massive hit to performance and it is completely unnecessary.
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 9bc8ce64c..2f4728b0d 100644
index e301eaf9d..0ddc03507 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -68,7 +68,7 @@ public abstract class World implements IBlockAccess {
@ -18,7 +18,7 @@ index 9bc8ce64c..2f4728b0d 100644
public final List<TileEntity> tileEntityListTick = Lists.newArrayList();
private final List<TileEntity> b = Lists.newArrayList();
private final Set<TileEntity> tileEntityListUnload = Sets.newHashSet(); // Paper
@@ -1568,7 +1568,7 @@ public abstract class World implements IBlockAccess {
@@ -1571,7 +1571,7 @@ public abstract class World implements IBlockAccess {
// CraftBukkit start - From below, clean up tile entities before ticking them
if (!this.tileEntityListUnload.isEmpty()) {
this.tileEntityListTick.removeAll(this.tileEntityListUnload);
@ -27,7 +27,7 @@ index 9bc8ce64c..2f4728b0d 100644
this.tileEntityListUnload.clear();
}
// CraftBukkit end
@@ -1619,7 +1619,7 @@ public abstract class World implements IBlockAccess {
@@ -1622,7 +1622,7 @@ public abstract class World implements IBlockAccess {
if (tileentity.y()) {
tilesThisCycle--;
this.tileEntityListTick.remove(tileTickPosition--);
@ -36,7 +36,7 @@ index 9bc8ce64c..2f4728b0d 100644
if (this.isLoaded(tileentity.getPosition())) {
this.getChunkAtWorldCoords(tileentity.getPosition()).d(tileentity.getPosition());
}
@@ -1657,7 +1657,7 @@ public abstract class World implements IBlockAccess {
@@ -1660,7 +1660,7 @@ public abstract class World implements IBlockAccess {
this.notify(tileentity1.getPosition(), iblockdata, iblockdata, 3);
// CraftBukkit start
// From above, don't screw this up - SPIGOT-1746
@ -45,7 +45,7 @@ index 9bc8ce64c..2f4728b0d 100644
this.a(tileentity1);
}
// CraftBukkit end
@@ -1677,9 +1677,9 @@ public abstract class World implements IBlockAccess {
@@ -1680,9 +1680,9 @@ public abstract class World implements IBlockAccess {
protected void l() {}
public boolean a(TileEntity tileentity) {
@ -57,7 +57,7 @@ index 9bc8ce64c..2f4728b0d 100644
this.tileEntityListTick.add(tileentity);
}
@@ -2114,7 +2114,7 @@ public abstract class World implements IBlockAccess {
@@ -2117,7 +2117,7 @@ public abstract class World implements IBlockAccess {
} else {
if (tileentity != null) {
this.b.remove(tileentity);
@ -67,5 +67,5 @@ index 9bc8ce64c..2f4728b0d 100644
}
--
2.12.2
2.13.0

Datei anzeigen

@ -1,4 +1,4 @@
From c11d79dd373a10c5cc3e190d7ac9f0fe1993463a Mon Sep 17 00:00:00 2001
From 591afbb70543d86d73dad41a3615fb93cb7dff33 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 13 Apr 2016 02:10:49 -0400
Subject: [PATCH] Configurable Player Collision
@ -19,7 +19,7 @@ index 62cbe0cf3..dae321d01 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/CommandScoreboard.java b/src/main/java/net/minecraft/server/CommandScoreboard.java
index ab9aa132a..f9f59e559 100644
index 00a34e85a..3e1ee96d1 100644
--- a/src/main/java/net/minecraft/server/CommandScoreboard.java
+++ b/src/main/java/net/minecraft/server/CommandScoreboard.java
@@ -183,6 +183,13 @@ public class CommandScoreboard extends CommandAbstract {
@ -37,10 +37,10 @@ index ab9aa132a..f9f59e559 100644
}
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 3aea41f76..430168d21 100644
index b55ce6b1a..9099eb64f 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -331,6 +331,20 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
@@ -331,6 +331,20 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs
this.v.setPlayerFileData(this.worldServer);
this.a(this.getDifficulty());
this.l();
@ -75,10 +75,10 @@ index d8ec50455..eb45d3cf2 100644
}
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index e303b45f0..97322c5da 100644
index 45ad22c8f..e7017883f 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -71,6 +71,7 @@ public abstract class PlayerList {
@@ -72,6 +72,7 @@ public abstract class PlayerList {
// CraftBukkit start
private CraftServer cserver;
private final Map<String,EntityPlayer> playersByName = new org.spigotmc.CaseInsensitiveMap<EntityPlayer>();
@ -86,7 +86,7 @@ index e303b45f0..97322c5da 100644
public PlayerList(MinecraftServer minecraftserver) {
this.cserver = minecraftserver.server = new CraftServer(minecraftserver, this);
@@ -228,6 +229,12 @@ public abstract class PlayerList {
@@ -230,6 +231,12 @@ public abstract class PlayerList {
}
entityplayer.syncInventory();
@ -99,7 +99,7 @@ index e303b45f0..97322c5da 100644
// CraftBukkit - Moved from above, added world
PlayerList.f.info(entityplayer.getName() + "[" + s1 + "] logged in with entity id " + entityplayer.getId() + " at ([" + entityplayer.world.worldData.getName() + "]" + entityplayer.locX + ", " + entityplayer.locY + ", " + entityplayer.locZ + ")");
}
@@ -400,6 +407,16 @@ public abstract class PlayerList {
@@ -415,6 +422,16 @@ public abstract class PlayerList {
entityplayer.playerTick();// SPIGOT-924
// CraftBukkit end
@ -116,7 +116,7 @@ index e303b45f0..97322c5da 100644
this.savePlayerFile(entityplayer);
if (entityplayer.isPassenger()) {
Entity entity = entityplayer.getVehicle();
@@ -1314,7 +1331,13 @@ public abstract class PlayerList {
@@ -1337,7 +1354,13 @@ public abstract class PlayerList {
player.playerConnection.disconnect(this.server.server.getShutdownMessage()); // CraftBukkit - add custom shutdown message
}
// CraftBukkit end
@ -132,5 +132,5 @@ index e303b45f0..97322c5da 100644
// CraftBukkit start
--
2.12.2
2.13.0

Datei anzeigen

@ -1,17 +1,17 @@
From a32a3ff851c3d8ff864c9597bd35a0b43dcb1c34 Mon Sep 17 00:00:00 2001
From 5ca04945098d575cbb62e424747d07ab701eeee0 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Thu, 14 Apr 2016 17:48:56 -0500
Subject: [PATCH] Water mobs should only spawn in the water
diff --git a/src/main/java/net/minecraft/server/EntityWaterAnimal.java b/src/main/java/net/minecraft/server/EntityWaterAnimal.java
index 90d33af95..251555713 100644
index 203e387fb..6ddb1aa8a 100644
--- a/src/main/java/net/minecraft/server/EntityWaterAnimal.java
+++ b/src/main/java/net/minecraft/server/EntityWaterAnimal.java
@@ -11,7 +11,15 @@ public abstract class EntityWaterAnimal extends EntityInsentient implements IAni
}
public boolean cM() {
public boolean P() {
- return true;
+ // Paper start - Don't let water mobs spawn in non-water blocks
+ // Based around EntityAnimal's implementation
@ -26,5 +26,5 @@ index 90d33af95..251555713 100644
public boolean canSpawn() {
--
2.12.2
2.13.0

Datei anzeigen

@ -1,4 +1,4 @@
From 0210004d78643b561dbd88a5916cd55c9aae3dda Mon Sep 17 00:00:00 2001
From 9a94f770eac122c917dab083c8ba65d68a73381a Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 14 Apr 2016 21:01:39 -0400
Subject: [PATCH] Fix Bugs with Spigot Mob Spawn Logic
@ -14,10 +14,10 @@ Specially with servers using smaller mob spawn ranges than view distance, as wel
This patch returns mob counting to use all loaded chunks, and 17x17 division.
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index 61d34fc37..a6cf1d83d 100644
index 15494d0b1..f743efca4 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -680,7 +680,7 @@ public class Chunk {
@@ -682,7 +682,7 @@ public class Chunk {
i = this.entitySlices.length - 1;
}
@ -27,7 +27,7 @@ index 61d34fc37..a6cf1d83d 100644
if (entity instanceof EntityItem) {
itemCounts[i]--;
diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java
index 8749a1879..29d4c0866 100644
index 79a93a862..1d0c9cc4e 100644
--- a/src/main/java/net/minecraft/server/SpawnerCreature.java
+++ b/src/main/java/net/minecraft/server/SpawnerCreature.java
@@ -23,6 +23,15 @@ public final class SpawnerCreature {
@ -56,5 +56,5 @@ index 8749a1879..29d4c0866 100644
Iterator iterator1 = this.b.iterator();
--
2.12.2
2.13.0

Datei anzeigen

@ -1,4 +1,4 @@
From cf26fbf700eb4d7f23c9a35ef6cb56859d52ca39 Mon Sep 17 00:00:00 2001
From 7959c2a0963e4ee323b9d1f4a6fd4100f86b6f94 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 17 Apr 2016 17:27:09 -0400
Subject: [PATCH] Prevent Fire from loading chunks
@ -7,7 +7,7 @@ This causes the nether to spam unload/reload chunks, plus overall
bad behavior.
diff --git a/src/main/java/net/minecraft/server/BlockFire.java b/src/main/java/net/minecraft/server/BlockFire.java
index 94cb9d462..dfc328850 100644
index 74c76fd6b..36df22215 100644
--- a/src/main/java/net/minecraft/server/BlockFire.java
+++ b/src/main/java/net/minecraft/server/BlockFire.java
@@ -164,6 +164,7 @@ public class BlockFire extends Block {
@ -18,16 +18,14 @@ index 94cb9d462..dfc328850 100644
int j1 = this.d(world, blockposition1);
if (j1 > 0) {
@@ -232,10 +233,14 @@ public class BlockFire extends Block {
@@ -232,10 +233,13 @@ public class BlockFire extends Block {
}
private void a(World world, BlockPosition blockposition, int i, Random random, int j, BlockPosition sourceposition) { // CraftBukkit add sourceposition
- int k = this.c(world.getType(blockposition).getBlock());
+ // Paper start
+ final IBlockData iblockdata = world.getTypeIfLoaded(blockposition);
+ if (iblockdata == null) return;
+ int k = this.c(iblockdata.getBlock());
+ // Paper end
int k = this.e(world.getType(blockposition).getBlock());
if (random.nextInt(i) < k) {
- IBlockData iblockdata = world.getType(blockposition);
@ -35,17 +33,15 @@ index 94cb9d462..dfc328850 100644
// CraftBukkit start
org.bukkit.block.Block theBlock = world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ());
@@ -294,7 +299,9 @@ public class BlockFire extends Block {
@@ -294,6 +298,8 @@ public class BlockFire extends Block {
for (int k = 0; k < j; ++k) {
EnumDirection enumdirection = aenumdirection[k];
- i = Math.max(this.d(world.getType(blockposition.shift(enumdirection)).getBlock()), i);
+ final IBlockData type = world.getTypeIfLoaded(blockposition.shift(enumdirection)); // Paper
+ if (type == null) continue; // Paper
+ i = Math.max(this.d(type.getBlock()), i); // Paper
i = Math.max(this.f(world.getType(blockposition.shift(enumdirection)).getBlock()), i);
}
return i;
--
2.12.2
2.13.0

Datei anzeigen

@ -1,23 +1,23 @@
From 543ab4972cabde6a82feebcf5145c143f8d8978f Mon Sep 17 00:00:00 2001
From ad0cb65019f11a4d6994a21e88fa3b504f60193d Mon Sep 17 00:00:00 2001
From: Isaac Moore <rmsy@me.com>
Date: Tue, 19 Apr 2016 14:09:31 -0500
Subject: [PATCH] Implement PlayerLocaleChangeEvent
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index bf3e46c35..ad1bb7bab 100644
index 42f6b7206..f4a2e748d 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -31,7 +31,7 @@ import org.bukkit.inventory.MainHand;
public class EntityPlayer extends EntityHuman implements ICrafting {
private static final Logger bR = LogManager.getLogger();
private static final Logger bW = LogManager.getLogger();
- public String locale = "en_US"; // Spigot private -> public
+ public String locale = null; // Spigot private -> public // Paper - default to null
public PlayerConnection playerConnection;
public final MinecraftServer server;
public final PlayerInteractManager playerInteractManager;
@@ -1105,7 +1105,15 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -1224,7 +1224,15 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
this.server.server.getPluginManager().callEvent(event);
}
// CraftBukkit end
@ -30,14 +30,14 @@ index bf3e46c35..ad1bb7bab 100644
+ new com.destroystokyo.paper.event.player.PlayerLocaleChangeEvent(this.getBukkitEntity(), oldLocale, this.locale).callEvent();
+ }
+ // Paper end
this.cg = packetplayinsettings.c();
this.ch = packetplayinsettings.d();
this.getDataWatcher().set(EntityPlayer.bq, Byte.valueOf((byte) packetplayinsettings.e()));
this.cm = packetplayinsettings.c();
this.cn = packetplayinsettings.d();
this.getDataWatcher().set(EntityPlayer.br, Byte.valueOf((byte) packetplayinsettings.e()));
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 8e06c2140..61c32223d 100644
index 00f9229f0..d1f70af51 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1691,7 +1691,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1688,7 +1688,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override
public String getLocale()
{
@ -50,5 +50,5 @@ index 8e06c2140..61c32223d 100644
@Override
--
2.12.2
2.13.0

Datei anzeigen

@ -1,4 +1,4 @@
From 941eca8221f54c49f6bce1728a322e7e0657f08b Mon Sep 17 00:00:00 2001
From bb2896c078064b96b79ef2c93111c5de084f0663 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Fri, 22 Apr 2016 01:43:11 -0500
Subject: [PATCH] EntityRegainHealthEvent isFastRegen API
@ -6,10 +6,10 @@ Subject: [PATCH] EntityRegainHealthEvent isFastRegen API
Don't even get me started
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index c70f14a15..ec901150d 100644
index 98cb3c7c2..95700bf68 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -762,10 +762,16 @@ public abstract class EntityLiving extends Entity {
@@ -767,10 +767,16 @@ public abstract class EntityLiving extends Entity {
}
public void heal(float f, EntityRegainHealthEvent.RegainReason regainReason) {
@ -28,7 +28,7 @@ index c70f14a15..ec901150d 100644
if (!event.isCancelled()) {
diff --git a/src/main/java/net/minecraft/server/FoodMetaData.java b/src/main/java/net/minecraft/server/FoodMetaData.java
index b6e978668..8d95d148f 100644
index 401002b61..0f63055b5 100644
--- a/src/main/java/net/minecraft/server/FoodMetaData.java
+++ b/src/main/java/net/minecraft/server/FoodMetaData.java
@@ -65,7 +65,7 @@ public class FoodMetaData {
@ -41,5 +41,5 @@ index b6e978668..8d95d148f 100644
this.foodTickTimer = 0;
}
--
2.12.2
2.13.0

Datei anzeigen

@ -1,11 +1,11 @@
From 9e7656b1f8f69832a1bea2e23c6992bbaed9fe97 Mon Sep 17 00:00:00 2001
From 5d6a70e63f2dbf871c2c7ed62ee6e6c4245bee15 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Fri, 22 Apr 2016 18:20:05 -0500
Subject: [PATCH] Vehicle Event Cancellation Changes
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 8908d8b8d..0f4a1b66b 100644
index fa940ad31..0ec78ec2f 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -70,7 +70,7 @@ public abstract class Entity implements ICommandListener {
@ -17,7 +17,7 @@ index 8908d8b8d..0f4a1b66b 100644
public boolean attachedToPlayer;
public World world;
public double lastX;
@@ -1928,6 +1928,7 @@ public abstract class Entity implements ICommandListener {
@@ -1955,6 +1955,7 @@ public abstract class Entity implements ICommandListener {
throw new IllegalStateException("Use x.stopRiding(y), not y.removePassenger(x)");
} else {
// CraftBukkit start
@ -25,7 +25,7 @@ index 8908d8b8d..0f4a1b66b 100644
CraftEntity craft = (CraftEntity) entity.getBukkitEntity().getVehicle();
Entity orig = craft == null ? null : craft.getHandle();
if (getBukkitEntity() instanceof Vehicle && entity.getBukkitEntity() instanceof LivingEntity) {
@@ -1943,7 +1944,13 @@ public abstract class Entity implements ICommandListener {
@@ -1970,7 +1971,13 @@ public abstract class Entity implements ICommandListener {
}
}
// CraftBukkit end
@ -41,5 +41,5 @@ index 8908d8b8d..0f4a1b66b 100644
entity.j = 60;
}
--
2.12.2
2.13.0

Datei anzeigen

@ -1,4 +1,4 @@
From b90b6e56102b563fc5dedfd20d1cfc5f901201d4 Mon Sep 17 00:00:00 2001
From 0fd48f8ca0b302871c4bccf779578385e53f8c33 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 27 Apr 2016 22:09:52 -0400
Subject: [PATCH] Improve Minecraft Hopper Performance
@ -8,7 +8,7 @@ Also reset cooldown each hopper tick that a hopper is full.
Also don't constantly clone ItemStacks without merit
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
index d0c0371fc..d2662ae14 100644
index 39be107fd..6e23d325f 100644
--- a/src/main/java/net/minecraft/server/TileEntity.java
+++ b/src/main/java/net/minecraft/server/TileEntity.java
@@ -33,6 +33,7 @@ public abstract class TileEntity {
@ -28,7 +28,7 @@ index d0c0371fc..d2662ae14 100644
this.g = iblockdata.getBlock().toLegacyData(iblockdata);
diff --git a/src/main/java/net/minecraft/server/TileEntityHopper.java b/src/main/java/net/minecraft/server/TileEntityHopper.java
index 6acce15e7..44b6ecc5d 100644
index e38411f35..f99812989 100644
--- a/src/main/java/net/minecraft/server/TileEntityHopper.java
+++ b/src/main/java/net/minecraft/server/TileEntityHopper.java
@@ -220,11 +220,13 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi
@ -68,7 +68,7 @@ index 6acce15e7..44b6ecc5d 100644
} else {
iinventory.setItem(i, itemstack1);
@@ -459,7 +463,9 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi
boolean flag1 = iinventory1.w_();
boolean flag1 = iinventory1.x_();
if (itemstack1.isEmpty()) {
+ IGNORE_TILE_UPDATES = true; // Paper
@ -86,5 +86,5 @@ index 6acce15e7..44b6ecc5d 100644
return this.f > 0;
}
--
2.12.2
2.13.0

Datei anzeigen

@ -1,4 +1,4 @@
From 0beac52797d106b00aae3d72abf1377f736dbff9 Mon Sep 17 00:00:00 2001
From 72456dedf5e3b0b1abd45465540107db5ac7175f Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 28 Apr 2016 00:57:27 -0400
Subject: [PATCH] remove null possibility for getServer singleton
@ -6,18 +6,18 @@ Subject: [PATCH] remove null possibility for getServer singleton
to stop IDE complaining about potential NPE
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 430168d21..83b62da55 100644
index 9099eb64f..111c363c7 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -52,6 +52,7 @@ import co.aikar.timings.MinecraftTimings; // Paper
public abstract class MinecraftServer implements Runnable, ICommandListener, IAsyncTaskHandler, IMojangStatistics {
public abstract class MinecraftServer implements ICommandListener, Runnable, IAsyncTaskHandler, IMojangStatistics {
+ private static MinecraftServer SERVER; // Paper
public static final Logger LOGGER = LogManager.getLogger();
public static final File a = new File("usercache.json");
public Convertable convertable;
@@ -123,6 +124,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
@@ -123,6 +124,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs
// Spigot end
public MinecraftServer(OptionSet options, Proxy proxy, DataConverterManager dataconvertermanager, YggdrasilAuthenticationService yggdrasilauthenticationservice, MinecraftSessionService minecraftsessionservice, GameProfileRepository gameprofilerepository, UserCache usercache) {
@ -25,7 +25,7 @@ index 430168d21..83b62da55 100644
io.netty.util.ResourceLeakDetector.setEnabled( false ); // Spigot - disable
this.e = proxy;
this.V = yggdrasilauthenticationservice;
@@ -1634,7 +1636,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
@@ -1633,7 +1635,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs
// CraftBukkit start
@Deprecated
public static MinecraftServer getServer() {
@ -35,5 +35,5 @@ index 430168d21..83b62da55 100644
// CraftBukkit end
}
--
2.12.2
2.13.0

Datei anzeigen

@ -1,4 +1,4 @@
From 08d92972cd60988bb13c33c398aa89d95a90bf8a Mon Sep 17 00:00:00 2001
From e77006067f56fb55e05d1d378412ef6316111889 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 29 Apr 2016 20:02:00 -0400
Subject: [PATCH] Improve Maps (in item frames) performance and bug fixes
@ -13,10 +13,10 @@ custom renderers are in use, defaulting to the much simpler Vanilla system.
Additionally, numerous issues to player position tracking on maps has been fixed.
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index 43e28d61c..af173a137 100644
index b4507fe0c..29c2fd4c9 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -597,6 +597,12 @@ public abstract class EntityHuman extends EntityLiving {
@@ -549,6 +549,12 @@ public abstract class EntityHuman extends EntityLiving {
return null;
}
// CraftBukkit end
@ -30,7 +30,7 @@ index 43e28d61c..af173a137 100644
ItemStack itemstack1 = this.a(entityitem);
diff --git a/src/main/java/net/minecraft/server/EntityTrackerEntry.java b/src/main/java/net/minecraft/server/EntityTrackerEntry.java
index f542bf491..fbda70a39 100644
index 10cafe057..1d0d7453a 100644
--- a/src/main/java/net/minecraft/server/EntityTrackerEntry.java
+++ b/src/main/java/net/minecraft/server/EntityTrackerEntry.java
@@ -90,11 +90,11 @@ public class EntityTrackerEntry {
@ -48,10 +48,10 @@ index f542bf491..fbda70a39 100644
Iterator iterator = this.trackedPlayers.iterator(); // CraftBukkit
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 2f4728b0d..7ed3a0677 100644
index 0ddc03507..634f1c28c 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -1219,6 +1219,7 @@ public abstract class World implements IBlockAccess {
@@ -1222,6 +1222,7 @@ public abstract class World implements IBlockAccess {
{
if ( iter.next().trackee == entity )
{
@ -60,7 +60,7 @@ index 2f4728b0d..7ed3a0677 100644
}
}
diff --git a/src/main/java/net/minecraft/server/WorldMap.java b/src/main/java/net/minecraft/server/WorldMap.java
index dd5412e69..dbe6a80f2 100644
index b4296a0fc..5394e37f8 100644
--- a/src/main/java/net/minecraft/server/WorldMap.java
+++ b/src/main/java/net/minecraft/server/WorldMap.java
@@ -28,6 +28,7 @@ public class WorldMap extends PersistentBase {
@ -145,5 +145,5 @@ index 256a13178..5768cd512 100644
public RenderData() {
--
2.12.2
2.13.0

Datei anzeigen

@ -1,4 +1,4 @@
From 4bdde79d22ddc115153bde7b44d60857053d79b7 Mon Sep 17 00:00:00 2001
From 2004f4a874f0c86805f21348b443ea5f0a8222cb Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 1 May 2016 21:19:14 -0400
Subject: [PATCH] LootTable API & Replenishable Lootables Feature
@ -418,7 +418,7 @@ index 000000000..01c2713d3
+ }
+}
diff --git a/src/main/java/net/minecraft/server/EntityMinecartContainer.java b/src/main/java/net/minecraft/server/EntityMinecartContainer.java
index a79919696..965aa5c23 100644
index 4a8eee119..0eece3933 100644
--- a/src/main/java/net/minecraft/server/EntityMinecartContainer.java
+++ b/src/main/java/net/minecraft/server/EntityMinecartContainer.java
@@ -6,17 +6,21 @@ import javax.annotation.Nullable;
@ -475,7 +475,7 @@ index a79919696..965aa5c23 100644
public void f(@Nullable EntityHuman entityhuman) {
- if (this.c != null) {
+ if (lootableData.shouldReplenish(entityhuman)) { // Paper
LootTable loottable = this.world.ak().a(this.c);
LootTable loottable = this.world.getLootTableRegistry().a(this.c);
- this.c = null;
+ lootableData.processRefill(entityhuman); // Paper
@ -536,7 +536,7 @@ index a79919696..965aa5c23 100644
+ // Paper end
}
diff --git a/src/main/java/net/minecraft/server/TileEntityLootable.java b/src/main/java/net/minecraft/server/TileEntityLootable.java
index 5632f2e78..01d0d8071 100644
index 243ae3533..548b8f4f5 100644
--- a/src/main/java/net/minecraft/server/TileEntityLootable.java
+++ b/src/main/java/net/minecraft/server/TileEntityLootable.java
@@ -1,44 +1,50 @@
@ -589,7 +589,7 @@ index 5632f2e78..01d0d8071 100644
public void d(@Nullable EntityHuman entityhuman) {
- if (this.m != null) {
+ if (lootableData.shouldReplenish(entityhuman)) { // Paper
LootTable loottable = this.world.ak().a(this.m);
LootTable loottable = this.world.getLootTableRegistry().a(this.m);
- this.m = null;
+ lootableData.processRefill(entityhuman); // Paper
@ -713,7 +713,7 @@ index b7a04bd84..5d4a5519d 100644
public CraftHopper(final Block block) {
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftShulkerBox.java b/src/main/java/org/bukkit/craftbukkit/block/CraftShulkerBox.java
index 8a7ce92bf..02f56bc0d 100644
index 788c60263..dc2648094 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftShulkerBox.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftShulkerBox.java
@@ -1,5 +1,6 @@
@ -782,5 +782,5 @@ index e9963e21c..acb4dee04 100644
CraftMinecartHopper(CraftServer server, EntityMinecartHopper entity) {
--
2.12.2
2.13.0

Datei anzeigen

@ -1,4 +1,4 @@
From 77fa2b88a5c877348527dfa1a8ca29fefaf8c520 Mon Sep 17 00:00:00 2001
From c1cda881a32b419fc1119bcba3189ec108f0af64 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 12 May 2016 01:55:17 -0400
Subject: [PATCH] Do not mark chunks as active for neighbor updates
@ -6,10 +6,10 @@ Subject: [PATCH] Do not mark chunks as active for neighbor updates
Fixes chunk unload issues
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index a6cf1d83d..3db29161d 100644
index f743efca4..6a64053ca 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -1004,25 +1004,25 @@ public class Chunk {
@@ -1006,25 +1006,25 @@ public class Chunk {
// CraftBukkit end
world.timings.syncChunkLoadPostTimer.stopTiming(); // Paper
world.timings.syncChunkLoadPopulateNeighbors.startTiming(); // Paper
@ -44,5 +44,5 @@ index a6cf1d83d..3db29161d 100644
if (chunk4 != null) {
chunk4.a(chunkgenerator);
--
2.12.2
2.13.0

Datei anzeigen

@ -1,4 +1,4 @@
From 0f23636d65d6937af2c1e37f32a255db6850b097 Mon Sep 17 00:00:00 2001
From dbe6ae53cbd3b831b7f0fc3f3e1705371d89b67f Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 16 May 2016 20:47:41 -0400
Subject: [PATCH] Optimize UserCache / Thread Safe
@ -10,10 +10,10 @@ Additionally, move Saving of the User cache to be done async, incase
the user never changed the default setting for Spigot's save on stop only.
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 83b62da55..2349c3ade 100644
index 111c363c7..19a66b64c 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -527,7 +527,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
@@ -527,7 +527,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs
// Spigot start
if (org.spigotmc.SpigotConfig.saveUserCacheOnStopOnly) {
LOGGER.info("Saving usercache.json");
@ -23,10 +23,10 @@ index 83b62da55..2349c3ade 100644
// Spigot end
}
diff --git a/src/main/java/net/minecraft/server/UserCache.java b/src/main/java/net/minecraft/server/UserCache.java
index ccfc755d2..989758cdf 100644
index 487fc11f1..924dc63a4 100644
--- a/src/main/java/net/minecraft/server/UserCache.java
+++ b/src/main/java/net/minecraft/server/UserCache.java
@@ -108,7 +108,7 @@ public class UserCache {
@@ -109,7 +109,7 @@ public class UserCache {
this.a(gameprofile, (Date) null);
}
@ -35,7 +35,7 @@ index ccfc755d2..989758cdf 100644
UUID uuid = gameprofile.getId();
if (date == null) {
@@ -122,8 +122,9 @@ public class UserCache {
@@ -123,8 +123,9 @@ public class UserCache {
String s = gameprofile.getName().toLowerCase(Locale.ROOT);
UserCache.UserCacheEntry usercache_usercacheentry = new UserCache.UserCacheEntry(gameprofile, date, null);
@ -46,7 +46,7 @@ index ccfc755d2..989758cdf 100644
this.d.remove(usercache_usercacheentry1.a().getName().toLowerCase(Locale.ROOT));
this.f.remove(gameprofile);
@@ -136,7 +137,7 @@ public class UserCache {
@@ -137,7 +138,7 @@ public class UserCache {
}
@Nullable
@ -55,7 +55,7 @@ index ccfc755d2..989758cdf 100644
String s1 = s.toLowerCase(Locale.ROOT);
UserCache.UserCacheEntry usercache_usercacheentry = (UserCache.UserCacheEntry) this.d.get(s1);
@@ -165,7 +166,7 @@ public class UserCache {
@@ -166,7 +167,7 @@ public class UserCache {
return usercache_usercacheentry == null ? null : usercache_usercacheentry.a();
}
@ -64,7 +64,7 @@ index ccfc755d2..989758cdf 100644
ArrayList arraylist = Lists.newArrayList(this.d.keySet());
return (String[]) arraylist.toArray(new String[arraylist.size()]);
@@ -227,8 +228,15 @@ public class UserCache {
@@ -228,8 +229,15 @@ public class UserCache {
}
@ -80,7 +80,7 @@ index ccfc755d2..989758cdf 100644
BufferedWriter bufferedwriter = null;
try {
@@ -242,6 +250,14 @@ public class UserCache {
@@ -243,6 +251,14 @@ public class UserCache {
} finally {
IOUtils.closeQuietly(bufferedwriter);
}
@ -96,5 +96,5 @@ index ccfc755d2..989758cdf 100644
}
--
2.12.2
2.13.0

Datei anzeigen

@ -0,0 +1,116 @@
From 64acbadada6d70f6748c8f415122555db6ec8e0d Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Sun, 22 May 2016 20:20:55 -0500
Subject: [PATCH] Optional TNT doesn't move in water
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index fbe769eb3..d2a542354 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -2,7 +2,6 @@ package com.destroystokyo.paper;
import java.util.List;
-import org.bukkit.Bukkit;
import org.bukkit.configuration.file.YamlConfiguration;
import org.spigotmc.SpigotWorldConfig;
@@ -327,4 +326,14 @@ public class PaperWorldConfig {
);
}
}
+
+ public boolean preventTntFromMovingInWater;
+ private void preventTntFromMovingInWater() {
+ if (PaperConfig.version < 13) {
+ boolean oldVal = getBoolean("enable-old-tnt-cannon-behaviors", false);
+ set("prevent-tnt-from-moving-in-water", oldVal);
+ }
+ preventTntFromMovingInWater = getBoolean("prevent-tnt-from-moving-in-water", false);
+ log("Prevent TNT from moving in water: " + preventTntFromMovingInWater);
+ }
}
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 094891057..5cd82f1b2 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -1108,6 +1108,11 @@ public abstract class Entity implements ICommandListener {
}
public boolean aq() {
+ return this.doWaterMovement();
+ }
+
+ public boolean doWaterMovement() {
+ // Paper end
if (this.bH() instanceof EntityBoat) {
this.inWater = false;
} else if (this.world.a(this.getBoundingBox().grow(0.0D, -0.4000000059604645D, 0.0D).shrink(0.001D), Material.WATER, this)) {
@@ -2532,6 +2537,11 @@ public abstract class Entity implements ICommandListener {
}
public boolean bm() {
+ return this.pushedByWater();
+ }
+
+ public boolean pushedByWater() {
+ // Paper end
return true;
}
diff --git a/src/main/java/net/minecraft/server/EntityTNTPrimed.java b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
index bb0904f86..ac81808c3 100644
--- a/src/main/java/net/minecraft/server/EntityTNTPrimed.java
+++ b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
@@ -147,4 +147,47 @@ public class EntityTNTPrimed extends Entity {
public int getFuseTicks() {
return this.c;
}
+
+ // Paper start - Optional prevent TNT from moving in water
+ @Override
+ public boolean pushedByWater() {
+ return !world.paperConfig.preventTntFromMovingInWater && super.pushedByWater();
+ }
+
+ /**
+ * Author: Jedediah Smith <jedediah@silencegreys.com>
+ */
+ @Override
+ public boolean doWaterMovement() {
+ if (!world.paperConfig.preventTntFromMovingInWater) return super.doWaterMovement();
+
+ // Preserve velocity while calling the super method
+ double oldMotX = this.motX;
+ double oldMotY = this.motY;
+ double oldMotZ = this.motZ;
+
+ super.doWaterMovement();
+
+ this.motX = oldMotX;
+ this.motY = oldMotY;
+ this.motZ = oldMotZ;
+
+ if (this.inWater) {
+ // Send position and velocity updates to nearby players on every tick while the TNT is in water.
+ // This does pretty well at keeping their clients in sync with the server.
+ EntityTrackerEntry ete = ((WorldServer) this.getWorld()).getTracker().trackedEntities.get(this.getId());
+ if (ete != null) {
+ PacketPlayOutEntityVelocity velocityPacket = new PacketPlayOutEntityVelocity(this);
+ PacketPlayOutEntityTeleport positionPacket = new PacketPlayOutEntityTeleport(this);
+
+ ete.trackedPlayers.stream().filter(viewer -> (viewer.locX - this.locX) * (viewer.locY - this.locY) * (viewer.locZ - this.locZ) < 16 * 16).forEach(viewer -> {
+ viewer.playerConnection.sendPacket(velocityPacket);
+ viewer.playerConnection.sendPacket(positionPacket);
+ });
+ }
+ }
+
+ return this.inWater;
+ }
+ // Paper end
}
--
2.13.0

Datei anzeigen

@ -1,393 +0,0 @@
From 05fa0e17dc7ea46a6a78ddf70e0f29d49edf114a Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Sun, 22 May 2016 20:20:55 -0500
Subject: [PATCH] Optional old TNT cannon behaviors
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index fbe769eb3..c4acb7597 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -327,4 +327,12 @@ public class PaperWorldConfig {
);
}
}
+
+ public boolean oldCannonBehaviors;
+ private void oldCannonBehaviors() {
+ oldCannonBehaviors = getBoolean("enable-old-tnt-cannon-behaviors", false);
+ if (oldCannonBehaviors) {
+ log("Old Cannon Behaviors: This feature may not be working entirely properly at the moment");
+ }
+ }
}
diff --git a/src/main/java/net/minecraft/server/BlockDiodeAbstract.java b/src/main/java/net/minecraft/server/BlockDiodeAbstract.java
index 59ee13de8..40c9f18bf 100644
--- a/src/main/java/net/minecraft/server/BlockDiodeAbstract.java
+++ b/src/main/java/net/minecraft/server/BlockDiodeAbstract.java
@@ -76,6 +76,17 @@ public abstract class BlockDiodeAbstract extends BlockFacingHorizontal {
} else {
this.b(world, blockposition, iblockdata, 0);
world.setAir(blockposition);
+ // Paper start - Old TNT cannon behaviors
+ if (world.paperConfig.oldCannonBehaviors) {
+ world.applyPhysics(blockposition.shift(EnumDirection.EAST), this, false);
+ world.applyPhysics(blockposition.shift(EnumDirection.WEST), this, false);
+ world.applyPhysics(blockposition.shift(EnumDirection.SOUTH), this, false);
+ world.applyPhysics(blockposition.shift(EnumDirection.NORTH), this, false);
+ world.applyPhysics(blockposition.shift(EnumDirection.DOWN), this, false);
+ world.applyPhysics(blockposition.shift(EnumDirection.UP), this, false);
+ return;
+ }
+ // Paper end
EnumDirection[] aenumdirection = EnumDirection.values();
int i = aenumdirection.length;
@@ -173,6 +184,17 @@ public abstract class BlockDiodeAbstract extends BlockFacingHorizontal {
public void postBreak(World world, BlockPosition blockposition, IBlockData iblockdata) {
if (this.d) {
+ // Paper start - Old TNT cannon behaviors
+ if (world.paperConfig.oldCannonBehaviors) {
+ world.applyPhysics(blockposition.shift(EnumDirection.EAST), this, false);
+ world.applyPhysics(blockposition.shift(EnumDirection.WEST), this, false);
+ world.applyPhysics(blockposition.shift(EnumDirection.NORTH), this, false);
+ world.applyPhysics(blockposition.shift(EnumDirection.SOUTH), this, false);
+ world.applyPhysics(blockposition.shift(EnumDirection.DOWN), this, false);
+ world.applyPhysics(blockposition.shift(EnumDirection.UP), this, false);
+ return;
+ }
+ // Paper end
EnumDirection[] aenumdirection = EnumDirection.values();
int i = aenumdirection.length;
diff --git a/src/main/java/net/minecraft/server/BlockRedstoneTorch.java b/src/main/java/net/minecraft/server/BlockRedstoneTorch.java
index c7e095a11..741236289 100644
--- a/src/main/java/net/minecraft/server/BlockRedstoneTorch.java
+++ b/src/main/java/net/minecraft/server/BlockRedstoneTorch.java
@@ -52,6 +52,12 @@ public class BlockRedstoneTorch extends BlockTorch {
public void onPlace(World world, BlockPosition blockposition, IBlockData iblockdata) {
if (this.isOn) {
+ // Paper start - Old TNT cannon behaviors
+ if (world.paperConfig.oldCannonBehaviors) {
+ this.shiftPositions(world, blockposition);
+ return;
+ }
+ // Paper end
EnumDirection[] aenumdirection = EnumDirection.values();
int i = aenumdirection.length;
@@ -66,6 +72,12 @@ public class BlockRedstoneTorch extends BlockTorch {
public void remove(World world, BlockPosition blockposition, IBlockData iblockdata) {
if (this.isOn) {
+ // Paper start - Old TNT cannon behaviors
+ if (world.paperConfig.oldCannonBehaviors) {
+ this.shiftPositions(world, blockposition);
+ return;
+ }
+ // Paper end
EnumDirection[] aenumdirection = EnumDirection.values();
int i = aenumdirection.length;
@@ -78,6 +90,17 @@ public class BlockRedstoneTorch extends BlockTorch {
}
+ // Paper start - Old TNT cannon behaviors
+ private void shiftPositions(World world, BlockPosition blockposition) {
+ world.applyPhysics(blockposition.shift(EnumDirection.DOWN), this, false);
+ world.applyPhysics(blockposition.shift(EnumDirection.UP), this, false);
+ world.applyPhysics(blockposition.shift(EnumDirection.WEST), this, false);
+ world.applyPhysics(blockposition.shift(EnumDirection.EAST), this, false);
+ world.applyPhysics(blockposition.shift(EnumDirection.SOUTH), this, false);
+ world.applyPhysics(blockposition.shift(EnumDirection.NORTH), this, false);
+ }
+ // Paper end
+
public int b(IBlockData iblockdata, IBlockAccess iblockaccess, BlockPosition blockposition, EnumDirection enumdirection) {
return this.isOn && iblockdata.get(BlockRedstoneTorch.FACING) != enumdirection ? 15 : 0;
}
diff --git a/src/main/java/net/minecraft/server/BlockRedstoneWire.java b/src/main/java/net/minecraft/server/BlockRedstoneWire.java
index 5a0f026b1..20b9465e7 100644
--- a/src/main/java/net/minecraft/server/BlockRedstoneWire.java
+++ b/src/main/java/net/minecraft/server/BlockRedstoneWire.java
@@ -20,7 +20,7 @@ public class BlockRedstoneWire extends Block {
public static final BlockStateInteger POWER = BlockStateInteger.of("power", 0, 15);
protected static final AxisAlignedBB[] f = new AxisAlignedBB[] { new AxisAlignedBB(0.1875D, 0.0D, 0.1875D, 0.8125D, 0.0625D, 0.8125D), new AxisAlignedBB(0.1875D, 0.0D, 0.1875D, 0.8125D, 0.0625D, 1.0D), new AxisAlignedBB(0.0D, 0.0D, 0.1875D, 0.8125D, 0.0625D, 0.8125D), new AxisAlignedBB(0.0D, 0.0D, 0.1875D, 0.8125D, 0.0625D, 1.0D), new AxisAlignedBB(0.1875D, 0.0D, 0.0D, 0.8125D, 0.0625D, 0.8125D), new AxisAlignedBB(0.1875D, 0.0D, 0.0D, 0.8125D, 0.0625D, 1.0D), new AxisAlignedBB(0.0D, 0.0D, 0.0D, 0.8125D, 0.0625D, 0.8125D), new AxisAlignedBB(0.0D, 0.0D, 0.0D, 0.8125D, 0.0625D, 1.0D), new AxisAlignedBB(0.1875D, 0.0D, 0.1875D, 1.0D, 0.0625D, 0.8125D), new AxisAlignedBB(0.1875D, 0.0D, 0.1875D, 1.0D, 0.0625D, 1.0D), new AxisAlignedBB(0.0D, 0.0D, 0.1875D, 1.0D, 0.0625D, 0.8125D), new AxisAlignedBB(0.0D, 0.0D, 0.1875D, 1.0D, 0.0625D, 1.0D), new AxisAlignedBB(0.1875D, 0.0D, 0.0D, 1.0D, 0.0625D, 0.8125D), new AxisAlignedBB(0.1875D, 0.0D, 0.0D, 1.0D, 0.0625D, 1.0D), new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 0.0625D, 0.8125D), new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 0.0625D, 1.0D)};
private boolean g = true;
- private final Set<BlockPosition> B = Sets.newHashSet();
+ private final Set<BlockPosition> B = Sets.newHashSet(); private final Set<BlockPosition> blocksToUpdate = B; // Paper - OBFHELPER
public BlockRedstoneWire() {
super(Material.ORIENTABLE);
@@ -186,6 +186,19 @@ public class BlockRedstoneWire extends Block {
}
this.B.add(blockposition);
+ // Paper start - Old TNT cannon behaviors
+ if (world.paperConfig.oldCannonBehaviors) {
+ this.blocksToUpdate.add(blockposition.shift(EnumDirection.WEST));
+ this.blocksToUpdate.add(blockposition.shift(EnumDirection.EAST));
+ this.blocksToUpdate.add(blockposition.shift(EnumDirection.DOWN));
+ this.blocksToUpdate.add(blockposition.shift(EnumDirection.UP));
+ this.blocksToUpdate.add(blockposition.shift(EnumDirection.NORTH));
+ this.blocksToUpdate.add(blockposition.shift(EnumDirection.SOUTH));
+ return iblockdata;
+ }
+ // Paper end
+
+
EnumDirection[] aenumdirection = EnumDirection.values();
int i1 = aenumdirection.length;
@@ -202,6 +215,16 @@ public class BlockRedstoneWire extends Block {
private void b(World world, BlockPosition blockposition) {
if (world.getType(blockposition).getBlock() == this) {
world.applyPhysics(blockposition, this, false);
+ if (world.paperConfig.oldCannonBehaviors) {
+ world.applyPhysics(blockposition.shift(EnumDirection.WEST), this, false);
+ world.applyPhysics(blockposition.shift(EnumDirection.EAST), this, false);
+ world.applyPhysics(blockposition.shift(EnumDirection.NORTH), this, false);
+ world.applyPhysics(blockposition.shift(EnumDirection.SOUTH), this, false);
+ world.applyPhysics(blockposition.shift(EnumDirection.DOWN), this, false);
+ world.applyPhysics(blockposition.shift(EnumDirection.UP), this, false);
+ return;
+ }
+ // Paper end
EnumDirection[] aenumdirection = EnumDirection.values();
int i = aenumdirection.length;
diff --git a/src/main/java/net/minecraft/server/BlockTNT.java b/src/main/java/net/minecraft/server/BlockTNT.java
index 6b6aa892a..5cec4160c 100644
--- a/src/main/java/net/minecraft/server/BlockTNT.java
+++ b/src/main/java/net/minecraft/server/BlockTNT.java
@@ -29,7 +29,11 @@ public class BlockTNT extends Block {
public void wasExploded(World world, BlockPosition blockposition, Explosion explosion) {
if (!world.isClientSide) {
- EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(world, (double) ((float) blockposition.getX() + 0.5F), (double) blockposition.getY(), (double) ((float) blockposition.getZ() + 0.5F), explosion.getSource());
+ // Paper start - Old TNT cannon behaviors
+ double y = blockposition.getY();
+ if (!world.paperConfig.oldCannonBehaviors) y += 0.5;
+ EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(world, (double) ((float) blockposition.getX() + 0.5F), y, (double) ((float) blockposition.getZ() + 0.5F), explosion.getSource());
+ // Paper end
entitytntprimed.setFuseTicks((short) (world.random.nextInt(entitytntprimed.getFuseTicks() / 4) + entitytntprimed.getFuseTicks() / 8));
world.addEntity(entitytntprimed);
@@ -43,7 +47,11 @@ public class BlockTNT extends Block {
public void a(World world, BlockPosition blockposition, IBlockData iblockdata, EntityLiving entityliving) {
if (!world.isClientSide) {
if (((Boolean) iblockdata.get(BlockTNT.EXPLODE)).booleanValue()) {
- EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(world, (double) ((float) blockposition.getX() + 0.5F), (double) blockposition.getY(), (double) ((float) blockposition.getZ() + 0.5F), entityliving);
+ // Paper start - Old TNT cannon behaviors
+ double y = blockposition.getY();
+ if (!world.paperConfig.oldCannonBehaviors) y += 0.5;
+ EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(world, (double) ((float) blockposition.getX() + 0.5F), y, (double) ((float) blockposition.getZ() + 0.5F), entityliving);
+ // Paper end
world.addEntity(entitytntprimed);
world.a((EntityHuman) null, entitytntprimed.locX, entitytntprimed.locY, entitytntprimed.locZ, SoundEffects.gV, SoundCategory.BLOCKS, 1.0F, 1.0F);
diff --git a/src/main/java/net/minecraft/server/DispenserRegistry.java b/src/main/java/net/minecraft/server/DispenserRegistry.java
index 6af9f206b..bec623c4d 100644
--- a/src/main/java/net/minecraft/server/DispenserRegistry.java
+++ b/src/main/java/net/minecraft/server/DispenserRegistry.java
@@ -507,7 +507,11 @@ public class DispenserRegistry {
org.bukkit.block.Block block = world.getWorld().getBlockAt(isourceblock.getBlockPosition().getX(), isourceblock.getBlockPosition().getY(), isourceblock.getBlockPosition().getZ());
CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack1);
- BlockDispenseEvent event = new BlockDispenseEvent(block, craftItem.clone(), new org.bukkit.util.Vector((double) blockposition.getX() + 0.5D, (double) blockposition.getY(), (double) blockposition.getZ() + 0.5D));
+ // Paper start - Old TNT cannon behaviors
+ double y = blockposition.getY();
+ if (!world.paperConfig.oldCannonBehaviors) y += 0.5;
+ BlockDispenseEvent event = new BlockDispenseEvent(block, craftItem.clone(), new org.bukkit.util.Vector((double) blockposition.getX() + 0.5D, y, (double) blockposition.getZ() + 0.5D));
+ // Paper end
if (!BlockDispenser.eventFired) {
world.getServer().getPluginManager().callEvent(event);
}
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 96b1e9a78..0d1fdd3ee 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -1089,6 +1089,12 @@ public abstract class Entity implements ICommandListener {
}
public boolean ak() {
+ // Paper start - OBFHELPER
+ return this.doWaterMovement();
+ }
+
+ public boolean doWaterMovement() {
+ // Paper end
if (this.bB() instanceof EntityBoat) {
this.inWater = false;
} else if (this.world.a(this.getBoundingBox().grow(0.0D, -0.4000000059604645D, 0.0D).shrink(0.001D), Material.WATER, this)) {
@@ -1292,6 +1298,12 @@ public abstract class Entity implements ICommandListener {
}
public double e(double d0, double d1, double d2) {
+ // Paper start - OBFHELPER
+ return this.getDistance(d0, d1, d2);
+ }
+
+ public double getDistance(double d0, double d1, double d2) {
+ // Paper end
double d3 = this.locX - d0;
double d4 = this.locY - d1;
double d5 = this.locZ - d2;
@@ -1346,6 +1358,11 @@ public abstract class Entity implements ICommandListener {
}
public void f(double d0, double d1, double d2) {
+ // Paper start - OBFHELPER
+ this.addVelocity(d0, d1, d2);
+ }
+
+ public void addVelocity(double d0, double d1, double d2) {
this.motX += d0;
this.motY += d1;
this.motZ += d2;
@@ -2505,6 +2522,12 @@ public abstract class Entity implements ICommandListener {
}
public boolean bg() {
+ // Paper start - OBFHELPER
+ return this.pushedByWater();
+ }
+
+ public boolean pushedByWater() {
+ // Paper end
return true;
}
diff --git a/src/main/java/net/minecraft/server/EntityFallingBlock.java b/src/main/java/net/minecraft/server/EntityFallingBlock.java
index 307a44c85..bb01929e8 100644
--- a/src/main/java/net/minecraft/server/EntityFallingBlock.java
+++ b/src/main/java/net/minecraft/server/EntityFallingBlock.java
@@ -280,4 +280,19 @@ public class EntityFallingBlock extends Entity {
public boolean bu() {
return true;
}
+
+ // Paper start - Old TNT cannon behaviors
+ @Override
+ public double getDistance(double d0, double d1, double d2) {
+ if (!world.paperConfig.oldCannonBehaviors) return super.getDistance(d0, d1, d2);
+
+ double newX = this.locX - d0;
+ double newY = this.locY + this.getHeadHeight() - d1;
+ double newZ = this.locZ - d2;
+
+ return (double) MathHelper.sqrt(newX * newX + newY * newY + newZ * newZ);
+ }
+
+
+ // Paper end
}
diff --git a/src/main/java/net/minecraft/server/EntityTNTPrimed.java b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
index 25e471d37..e796ade87 100644
--- a/src/main/java/net/minecraft/server/EntityTNTPrimed.java
+++ b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
@@ -32,6 +32,7 @@ public class EntityTNTPrimed extends Entity {
this.lastY = d1;
this.lastZ = d2;
this.source = entityliving;
+ if (world.paperConfig.oldCannonBehaviors) this.motX = this.motZ = 0.0F; // Paper - Old TNT cannon behaviors
}
protected void i() {
@@ -124,7 +125,7 @@ public class EntityTNTPrimed extends Entity {
}
public float getHeadHeight() {
- return 0.0F;
+ return world.paperConfig.oldCannonBehaviors ? this.length / 16F : 0.0F; // Paper - Old TNT cannon behaviors
}
public void setFuseTicks(int i) {
@@ -146,4 +147,58 @@ public class EntityTNTPrimed extends Entity {
public int getFuseTicks() {
return this.c;
}
+
+ // Paper start - Old TNT cannon behaviors
+ @Override
+ public double getDistance(double d0, double d1, double d2) {
+ if (!world.paperConfig.oldCannonBehaviors) return super.getDistance(d0, d1, d2);
+
+ double newX = this.locX - d0;
+ double newY = this.locY + this.getHeadHeight() - d1;
+ double newZ = this.locZ - d2;
+
+ return (double) MathHelper.sqrt(newX * newX + newY * newY + newZ * newZ);
+ }
+
+ @Override
+ public boolean pushedByWater() {
+ return !world.paperConfig.oldCannonBehaviors && super.pushedByWater();
+ }
+
+ /**
+ * Author: Jedediah Smith <jedediah@silencegreys.com>
+ */
+ @Override
+ public boolean doWaterMovement() {
+ if (!world.paperConfig.oldCannonBehaviors) return super.doWaterMovement();
+
+ // Preserve velocity while calling the super method
+ double oldMotX = this.motX;
+ double oldMotY = this.motY;
+ double oldMotZ = this.motZ;
+
+ super.doWaterMovement();
+
+ this.motX = oldMotX;
+ this.motY = oldMotY;
+ this.motZ = oldMotZ;
+
+ if (this.inWater) {
+ // Send position and velocity updates to nearby players on every tick while the TNT is in water.
+ // This does pretty well at keeping their clients in sync with the server.
+ EntityTrackerEntry ete = ((WorldServer) this.getWorld()).getTracker().trackedEntities.get(this.getId());
+ if (ete != null) {
+ PacketPlayOutEntityVelocity velocityPacket = new PacketPlayOutEntityVelocity(this);
+ PacketPlayOutEntityTeleport positionPacket = new PacketPlayOutEntityTeleport(this);
+
+ ete.trackedPlayers.stream().filter(viewer -> (viewer.locX - this.locX) * (viewer.locY - this.locY) * (viewer.locZ - this.locZ) < 16 * 16).forEach(viewer -> {
+ viewer.playerConnection.sendPacket(velocityPacket);
+ viewer.playerConnection.sendPacket(positionPacket);
+ });
+ }
+ }
+
+ return this.inWater;
+ }
+ // Paper end
}
diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java
index d7bc6a0ed..f2785d86c 100644
--- a/src/main/java/net/minecraft/server/Explosion.java
+++ b/src/main/java/net/minecraft/server/Explosion.java
@@ -149,9 +149,15 @@ public class Explosion {
d14 = entity instanceof EntityHuman && world.paperConfig.disableExplosionKnockback ? 0 : EnchantmentProtection.a((EntityLiving) entity, d13); // Paper - Disable explosion knockback
}
- entity.motX += d8 * d14;
- entity.motY += d9 * d14;
- entity.motZ += d10 * d14;
+ // Paper start - Fix cannons
+ /*
+ entity.motX += d8 * d14;
+ entity.motY += d9 * d14;
+ entity.motZ += d10 * d14;
+ */
+ // This impulse method sets the dirty flag, so clients will get an immediate velocity update
+ entity.addVelocity(d8 * d14, d9 * d14, d10 * d14);
+ // Paper end
if (entity instanceof EntityHuman) {
EntityHuman entityhuman = (EntityHuman) entity;
--
2.12.2

Datei anzeigen

@ -1,4 +1,4 @@
From f4d997da0a100cd7f4d80996a0ec158649a277e6 Mon Sep 17 00:00:00 2001
From fee9819b52897421317394c759b8a6850fbab9a9 Mon Sep 17 00:00:00 2001
From: Martin Panzer <postremus1996@googlemail.com>
Date: Mon, 23 May 2016 12:12:37 +0200
Subject: [PATCH] Faster redstone torch rapid clock removal
@ -6,10 +6,10 @@ Subject: [PATCH] Faster redstone torch rapid clock removal
Only resize the the redstone torch list once, since resizing arrays / lists is costly
diff --git a/src/main/java/net/minecraft/server/BlockRedstoneTorch.java b/src/main/java/net/minecraft/server/BlockRedstoneTorch.java
index 741236289..25a2a5d36 100644
index 5b0028a78..429f26ed5 100644
--- a/src/main/java/net/minecraft/server/BlockRedstoneTorch.java
+++ b/src/main/java/net/minecraft/server/BlockRedstoneTorch.java
@@ -117,9 +117,17 @@ public class BlockRedstoneTorch extends BlockTorch {
@@ -94,9 +94,17 @@ public class BlockRedstoneTorch extends BlockTorch {
boolean flag = this.g(world, blockposition, iblockdata);
List list = (List) BlockRedstoneTorch.g.get(world);
@ -29,7 +29,7 @@ index 741236289..25a2a5d36 100644
// CraftBukkit start
org.bukkit.plugin.PluginManager manager = world.getServer().getPluginManager();
@@ -202,7 +210,7 @@ public class BlockRedstoneTorch extends BlockTorch {
@@ -179,7 +187,7 @@ public class BlockRedstoneTorch extends BlockTorch {
static class RedstoneUpdateInfo {
BlockPosition a;
@ -39,5 +39,5 @@ index 741236289..25a2a5d36 100644
public RedstoneUpdateInfo(BlockPosition blockposition, long i) {
this.a = blockposition;
--
2.12.2
2.13.0

Datei anzeigen

@ -1,4 +1,4 @@
From 552bbf4ff08db7dc30722e581a6bb019e8ef12cc Mon Sep 17 00:00:00 2001
From 5b0e458f61ad7845469a3cc9cee4231ae01a896d Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 31 May 2016 22:53:50 -0400
Subject: [PATCH] Only send Dragon/Wither Death sounds to same world
@ -6,11 +6,11 @@ Subject: [PATCH] Only send Dragon/Wither Death sounds to same world
Also fix view distance lookup
diff --git a/src/main/java/net/minecraft/server/EntityEnderDragon.java b/src/main/java/net/minecraft/server/EntityEnderDragon.java
index e24be3ccd..e93819fc1 100644
index f8e84f413..e88082485 100644
--- a/src/main/java/net/minecraft/server/EntityEnderDragon.java
+++ b/src/main/java/net/minecraft/server/EntityEnderDragon.java
@@ -573,8 +573,12 @@ public class EntityEnderDragon extends EntityInsentient implements IComplex, IMo
if (this.bG == 1) {
if (this.bH == 1) {
// CraftBukkit start - Use relative location for far away sounds
// this.world.a(1028, new BlockPosition(this), 0);
- int viewDistance = ((WorldServer) this.world).getServer().getViewDistance() * 16;
@ -25,10 +25,10 @@ index e24be3ccd..e93819fc1 100644
double deltaZ = this.locZ - player.locZ;
double distanceSquared = deltaX * deltaX + deltaZ * deltaZ;
diff --git a/src/main/java/net/minecraft/server/EntityWither.java b/src/main/java/net/minecraft/server/EntityWither.java
index 9af34ba60..031507574 100644
index b7954362d..202774a7c 100644
--- a/src/main/java/net/minecraft/server/EntityWither.java
+++ b/src/main/java/net/minecraft/server/EntityWither.java
@@ -211,8 +211,12 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
@@ -210,8 +210,12 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
// CraftBukkit start - Use relative location for far away sounds
// this.world.a(1023, new BlockPosition(this), 0);
@ -44,5 +44,5 @@ index 9af34ba60..031507574 100644
double deltaZ = this.locZ - player.locZ;
double distanceSquared = deltaX * deltaX + deltaZ * deltaZ;
--
2.12.2
2.13.0

Datei anzeigen

@ -1,4 +1,4 @@
From 2ffd7565f95c0fe3ddef701c688263469aeb42ae Mon Sep 17 00:00:00 2001
From 76311e2cf535fc498b5e98604d1ea28dc7e6356f Mon Sep 17 00:00:00 2001
From: Martin Panzer <postremus1996@googlemail.com>
Date: Fri, 3 Jun 2016 23:13:39 +0200
Subject: [PATCH] Fix FallingBlocks being stuck on fences
@ -11,12 +11,12 @@ We now first check, if if we are already on the ground.
if not, we check if the falling block is inside of the hitbox of the block at y - 1.
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index c4acb7597..7bd745a27 100644
index d2a542354..c74071eb1 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -335,4 +335,9 @@ public class PaperWorldConfig {
log("Old Cannon Behaviors: This feature may not be working entirely properly at the moment");
}
@@ -336,4 +336,9 @@ public class PaperWorldConfig {
preventTntFromMovingInWater = getBoolean("prevent-tnt-from-moving-in-water", false);
log("Prevent TNT from moving in water: " + preventTntFromMovingInWater);
}
+
+ public boolean altFallingBlockOnGround;
@ -25,7 +25,7 @@ index c4acb7597..7bd745a27 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/BlockFalling.java b/src/main/java/net/minecraft/server/BlockFalling.java
index dcdae998c..3c777418b 100644
index db5c0deae..9bcfc336f 100644
--- a/src/main/java/net/minecraft/server/BlockFalling.java
+++ b/src/main/java/net/minecraft/server/BlockFalling.java
@@ -71,6 +71,12 @@ public class BlockFalling extends Block {
@ -38,29 +38,26 @@ index dcdae998c..3c777418b 100644
+ }
+ // Paper end
+
public void a_(World world, BlockPosition blockposition) {}
public void a(World world, BlockPosition blockposition, IBlockData iblockdata, IBlockData iblockdata1) {}
public void b(World world, BlockPosition blockposition) {}
public void a_(World world, BlockPosition blockposition) {}
diff --git a/src/main/java/net/minecraft/server/EntityFallingBlock.java b/src/main/java/net/minecraft/server/EntityFallingBlock.java
index bb01929e8..8059e6dcd 100644
index 18e7cf2ad..6a22dce51 100644
--- a/src/main/java/net/minecraft/server/EntityFallingBlock.java
+++ b/src/main/java/net/minecraft/server/EntityFallingBlock.java
@@ -2,7 +2,9 @@ package net.minecraft.server;
@@ -3,6 +3,7 @@ package net.minecraft.server;
import com.google.common.collect.Lists;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.Iterator;
+import java.util.List;
import javax.annotation.Nullable;
import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit
@@ -97,10 +99,9 @@ public class EntityFallingBlock extends Entity {
blockposition = new BlockPosition(this);
if (this.onGround) {
@@ -121,9 +122,9 @@ public class EntityFallingBlock extends Entity {
} else {
IBlockData iblockdata = this.world.getType(blockposition);
-
- if (BlockFalling.i(this.world.getType(new BlockPosition(this.locX, this.locY - 0.009999999776482582D, this.locZ)))) {
- if (!flag1 && BlockFalling.i(this.world.getType(new BlockPosition(this.locX, this.locY - 0.009999999776482582D, this.locZ)))) {
+ if (!isOnGround()) {
this.onGround = false;
- // return; // CraftBukkit
@ -68,7 +65,7 @@ index bb01929e8..8059e6dcd 100644
}
this.motX *= 0.699999988079071D;
@@ -159,6 +160,32 @@ public class EntityFallingBlock extends Entity {
@@ -179,6 +180,32 @@ public class EntityFallingBlock extends Entity {
}
}
@ -102,5 +99,5 @@ index bb01929e8..8059e6dcd 100644
Block block = this.block.getBlock();
--
2.12.2
2.13.0

Datei anzeigen

@ -1,4 +1,4 @@
From b6948fdd96baaba6bb2ef88bb94c34a355ffa1b5 Mon Sep 17 00:00:00 2001
From da00e43894f069931ea9803a4c2d570ae9073e7e Mon Sep 17 00:00:00 2001
From: Techcable <Techcable@outlook.com>
Date: Sat, 18 Jun 2016 01:01:37 -0500
Subject: [PATCH] Make entities look for hoppers
@ -78,10 +78,10 @@ index 000000000..aef7c2be9
+ double getZ();
+}
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 7bd745a27..894d40662 100644
index c74071eb1..d5d6e7fcd 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -340,4 +340,9 @@ public class PaperWorldConfig {
@@ -341,4 +341,9 @@ public class PaperWorldConfig {
private void altFallingBlockOnGround() {
altFallingBlockOnGround = getBoolean("use-alternate-fallingblock-onGround-detection", false);
}
@ -132,7 +132,7 @@ index 008ed206d..b3c1f550c 100644
this.b = i;
this.c = j;
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 0d1fdd3ee..0479b7551 100644
index 5cd82f1b2..c81f88bce 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -80,6 +80,19 @@ public abstract class Entity implements ICommandListener {
@ -156,7 +156,7 @@ index 0d1fdd3ee..0479b7551 100644
public double motY;
public double motZ;
diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java
index 9742afc65..95ca1b8e4 100644
index 7b137d847..0a7f1476d 100644
--- a/src/main/java/net/minecraft/server/EntityItem.java
+++ b/src/main/java/net/minecraft/server/EntityItem.java
@@ -5,8 +5,15 @@ import javax.annotation.Nullable;
@ -179,7 +179,7 @@ index 9742afc65..95ca1b8e4 100644
@@ -56,6 +63,7 @@ public class EntityItem extends Entity {
this.die();
} else {
super.A_();
super.B_();
+ if (tryPutInHopper()) return; // Paper
// CraftBukkit start - Use wall time for pickup and despawn timers
int elapsedTicks = MinecraftServer.currentTick - this.lastTick;
@ -193,7 +193,7 @@ index 9742afc65..95ca1b8e4 100644
int elapsedTicks = MinecraftServer.currentTick - this.lastTick;
if (this.pickupDelay != 32767) this.pickupDelay -= elapsedTicks;
diff --git a/src/main/java/net/minecraft/server/EntityMinecartContainer.java b/src/main/java/net/minecraft/server/EntityMinecartContainer.java
index 965aa5c23..04256898b 100644
index 0eece3933..8415832d1 100644
--- a/src/main/java/net/minecraft/server/EntityMinecartContainer.java
+++ b/src/main/java/net/minecraft/server/EntityMinecartContainer.java
@@ -7,6 +7,7 @@ import javax.annotation.Nullable;
@ -217,8 +217,8 @@ index 965aa5c23..04256898b 100644
+ }
+
+ @Override
+ public void A_() {
+ super.A_();
+ public void B_() {
+ super.B_();
+ tryPutInHopper();
+ }
+
@ -249,7 +249,7 @@ index 804215a1c..e830d8390 100644
+ double G(); default double getZ() { return G(); } // Paper - OBFHELPER
}
diff --git a/src/main/java/net/minecraft/server/TileEntityHopper.java b/src/main/java/net/minecraft/server/TileEntityHopper.java
index 44b6ecc5d..022e64520 100644
index f99812989..d22261646 100644
--- a/src/main/java/net/minecraft/server/TileEntityHopper.java
+++ b/src/main/java/net/minecraft/server/TileEntityHopper.java
@@ -126,6 +126,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi
@ -321,7 +321,7 @@ index 44b6ecc5d..022e64520 100644
@@ -506,18 +524,44 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi
private IInventory I() {
EnumDirection enumdirection = BlockHopper.e(this.v());
EnumDirection enumdirection = BlockHopper.b(this.v());
- return b(this.getWorld(), this.E() + (double) enumdirection.getAdjacentX(), this.F() + (double) enumdirection.getAdjacentY(), this.G() + (double) enumdirection.getAdjacentZ());
+ // Paper start - don't search for entities in push mode
@ -378,5 +378,5 @@ index 44b6ecc5d..022e64520 100644
if (!list.isEmpty()) {
--
2.12.2
2.13.0

Datei anzeigen

@ -1,4 +1,4 @@
From a725b4f641d3fd25f235a4d4e4d9ff73ae7e03c3 Mon Sep 17 00:00:00 2001
From acf6e5cc937888e032399cb90b3ff680196356dc Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sat, 18 Jun 2016 23:22:12 -0400
Subject: [PATCH] Delay Chunk Unloads based on Player Movement
@ -17,10 +17,10 @@ This allows servers with smaller worlds who do less long distance exploring to s
wasting cpu cycles on saving/unloading/reloading chunks repeatedly.
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 894d40662..04861f146 100644
index d5d6e7fcd..ef60c15bd 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -345,4 +345,13 @@ public class PaperWorldConfig {
@@ -346,4 +346,13 @@ public class PaperWorldConfig {
private void isHopperPushBased() {
isHopperPushBased = getBoolean("hopper.push-based", false);
}
@ -35,7 +35,7 @@ index 894d40662..04861f146 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index 98f2cff15..88437d77a 100644
index d37221f09..a639ab2a8 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -30,6 +30,7 @@ public class Chunk {
@ -47,7 +47,7 @@ index 98f2cff15..88437d77a 100644
public final int locZ;
private boolean m;
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index eb3225ef2..81b9bb884 100644
index a512a4113..9836c0c5a 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -315,6 +315,19 @@ public class ChunkProviderServer implements IChunkProvider {
@ -68,10 +68,10 @@ index eb3225ef2..81b9bb884 100644
+ }
+ // Paper end
this.chunkLoader.a();
this.chunkLoader.b();
}
diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java
index dd40e98c8..f109e986d 100644
index 3d30e1831..48a008e0a 100644
--- a/src/main/java/net/minecraft/server/PlayerChunk.java
+++ b/src/main/java/net/minecraft/server/PlayerChunk.java
@@ -32,8 +32,16 @@ public class PlayerChunk {
@ -127,10 +127,10 @@ index 0a0b5261b..14ea89c91 100644
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 9965235ab..3f8859a1f 100644
index 1f88cc94c..0466a4f00 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1558,7 +1558,7 @@ public class CraftWorld implements World {
@@ -1566,7 +1566,7 @@ public class CraftWorld implements World {
ChunkProviderServer cps = world.getChunkProviderServer();
for (net.minecraft.server.Chunk chunk : cps.chunks.values()) {
// If in use, skip it
@ -140,5 +140,5 @@ index 9965235ab..3f8859a1f 100644
}
--
2.12.2
2.13.0

Datei anzeigen

@ -1,4 +1,4 @@
From e886fbb60bda14fbb78a182375a6de088da67aaf Mon Sep 17 00:00:00 2001
From b44a6c7ed51c15e5a7ef671cbe747dc68953d5e4 Mon Sep 17 00:00:00 2001
From: Jadon Fowler <jadonflower@gmail.com>
Date: Sat, 18 Jun 2016 23:13:59 -0700
Subject: [PATCH] Toggleable Elytra Wall Damage
@ -7,10 +7,10 @@ Instead of calculating the damage taken from hitting a wall, you can
disable it in the config.
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 04861f146..dc96bd7f4 100644
index ef60c15bd..cec9ea74c 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -354,4 +354,9 @@ public class PaperWorldConfig {
@@ -355,4 +355,9 @@ public class PaperWorldConfig {
delayChunkUnloadsBy *= 1000;
}
}
@ -21,19 +21,19 @@ index 04861f146..dc96bd7f4 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index ec901150d..b8ac99e5d 100644
index 9587704d7..97b498507 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -1690,6 +1690,7 @@ public abstract class EntityLiving extends Entity {
@@ -1731,6 +1731,7 @@ public abstract class EntityLiving extends Entity {
this.motY = 0.30000001192092896D;
}
} else if (this.cH()) {
} else if (this.cN()) {
+ if (world.paperConfig.elytraHitWallDamage) { // Paper start - Toggleable Elytra Wall Damage
if (this.motY > -0.5D) {
this.fallDistance = 1.0F;
}
@@ -1739,6 +1740,7 @@ public abstract class EntityLiving extends Entity {
this.damageEntity(DamageSource.FLY_INTO_WALL, f7);
@@ -1780,6 +1781,7 @@ public abstract class EntityLiving extends Entity {
this.damageEntity(DamageSource.FLY_INTO_WALL, f8);
}
}
+ } // Paper end - Elyta Wall Damage if statement
@ -41,5 +41,5 @@ index ec901150d..b8ac99e5d 100644
if (this.onGround && !this.world.isClientSide) {
if (getFlag(7) && !CraftEventFactory.callToggleGlideEvent(this, false).isCancelled()) // CraftBukkit
--
2.12.2
2.13.0

Datei anzeigen

@ -1,4 +1,4 @@
From 98c65b22db11cb425f4426f1b52114971dcf12f0 Mon Sep 17 00:00:00 2001
From 5853695491a09dde341b26e3dcec2a64d2c63d98 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 21 Jun 2016 22:54:34 -0400
Subject: [PATCH] Fix Double World Add issues
@ -8,7 +8,7 @@ Vanilla will double add Spider Jockeys to the world, so ignore already added.
Also add debug if something else tries to, and abort before world gets bad state
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
index 721a3cd81..90d069539 100644
index 911f527f8..0d73e41f2 100644
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
@@ -508,7 +508,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
@ -18,13 +18,13 @@ index 721a3cd81..90d069539 100644
- if (world.addEntity(entity, reason) && entity.isVehicle()) {
+ if (!entity.valid && world.addEntity(entity, reason) && entity.isVehicle()) { // Paper
// CraftBukkit end
Iterator iterator = entity.bx().iterator();
Iterator iterator = entity.bD().iterator();
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 7ed3a0677..7900fca57 100644
index 634f1c28c..0a473d7d2 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -1098,6 +1098,7 @@ public abstract class World implements IBlockAccess {
@@ -1101,6 +1101,7 @@ public abstract class World implements IBlockAccess {
public boolean addEntity(Entity entity, SpawnReason spawnReason) { // Changed signature, added SpawnReason
org.spigotmc.AsyncCatcher.catchOp( "entity add"); // Spigot
if (entity == null) return false;
@ -33,5 +33,5 @@ index 7ed3a0677..7900fca57 100644
int i = MathHelper.floor(entity.locX / 16.0D);
int j = MathHelper.floor(entity.locZ / 16.0D);
--
2.12.2
2.13.0

Datei anzeigen

@ -1,4 +1,4 @@
From d2dfe71fdaf52ea8e53deeba1362d3db3c40a09d Mon Sep 17 00:00:00 2001
From 9630abafb8d98c636c2f0c5c20fa9cddb23d3da0 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 17 Jun 2016 20:50:11 -0400
Subject: [PATCH] Fix Old Sign Conversion
@ -9,7 +9,7 @@ Subject: [PATCH] Fix Old Sign Conversion
This causes Igloos and such to render broken signs. We fix this by ignoring sign conversion for Defined Structures
diff --git a/src/main/java/net/minecraft/server/DefinedStructure.java b/src/main/java/net/minecraft/server/DefinedStructure.java
index a3dc6fe31..83646341b 100644
index 32020e39d..f13752362 100644
--- a/src/main/java/net/minecraft/server/DefinedStructure.java
+++ b/src/main/java/net/minecraft/server/DefinedStructure.java
@@ -203,9 +203,11 @@ public class DefinedStructure {
@ -34,7 +34,7 @@ index a3dc6fe31..83646341b 100644
public Iterator<IBlockData> iterator() {
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
index d2662ae14..e6b79a571 100644
index 6e23d325f..ddea15cfe 100644
--- a/src/main/java/net/minecraft/server/TileEntity.java
+++ b/src/main/java/net/minecraft/server/TileEntity.java
@@ -11,6 +11,7 @@ import org.bukkit.inventory.InventoryHolder; // CraftBukkit
@ -46,10 +46,10 @@ index d2662ae14..e6b79a571 100644
private static final RegistryMaterials<MinecraftKey, Class<? extends TileEntity>> f = new RegistryMaterials();
protected World world;
diff --git a/src/main/java/net/minecraft/server/TileEntitySign.java b/src/main/java/net/minecraft/server/TileEntitySign.java
index 34ade146c..242552c36 100644
index f04b7aa99..50a8d7977 100644
--- a/src/main/java/net/minecraft/server/TileEntitySign.java
+++ b/src/main/java/net/minecraft/server/TileEntitySign.java
@@ -93,13 +93,14 @@ public class TileEntitySign extends TileEntity {
@@ -77,13 +77,14 @@ public class TileEntitySign extends TileEntity {
}
try {
@ -67,5 +67,5 @@ index 34ade146c..242552c36 100644
try {
this.lines[i] = ChatComponentUtils.filterForDisplay(icommandlistener, ichatbasecomponent, (Entity) null);
--
2.12.2
2.13.0

Datei anzeigen

@ -1,14 +1,14 @@
From 150459125f9aefe49a503c6cb1aa048d03291684 Mon Sep 17 00:00:00 2001
From 2790458a20fcda14067cb339e644baf678aef02b Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Sat, 16 Jul 2016 19:11:17 -0500
Subject: [PATCH] Don't lookup game profiles that have no UUID and no name
diff --git a/src/main/java/net/minecraft/server/UserCache.java b/src/main/java/net/minecraft/server/UserCache.java
index 989758cdf..1c619c596 100644
index 924dc63a4..07d39d46a 100644
--- a/src/main/java/net/minecraft/server/UserCache.java
+++ b/src/main/java/net/minecraft/server/UserCache.java
@@ -86,7 +86,7 @@ public class UserCache {
@@ -87,7 +87,7 @@ public class UserCache {
};
gameprofilerepository.findProfilesByNames(new String[] { s}, Agent.MINECRAFT, profilelookupcallback);
@ -18,5 +18,5 @@ index 989758cdf..1c619c596 100644
GameProfile gameprofile = new GameProfile(uuid, s);
--
2.12.2
2.13.0

Datei anzeigen

@ -1,22 +1,22 @@
From 372f6272bcaf410777335b661a2d091b296c12c2 Mon Sep 17 00:00:00 2001
From c07deef294fa84147dfaf65f385f3ed3e78fc82c Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Thu, 28 Jul 2016 17:58:53 -0500
Subject: [PATCH] More informative vehicle moved wrongly message
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index dfbae01f4..4b79031f0 100644
index 353e73b15..b8ec71a93 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -343,7 +343,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
if (d10 > org.spigotmc.SpigotConfig.movedWronglyThreshold) { // Spigot
flag1 = true;
- PlayerConnection.LOGGER.warn("{} moved wrongly!", new Object[] { entity.getName()});
- PlayerConnection.LOGGER.warn("{} moved wrongly!", entity.getName());
+ PlayerConnection.LOGGER.warn(entity.getName() + " (vehicle of " + this.player.getName() + ") moved wrongly!"); // Paper - More informative
}
entity.setLocation(d3, d4, d5, f, f1);
--
2.12.2
2.13.0

Datei anzeigen

@ -1,14 +1,14 @@
From 470600a7c74fb5ee9f01d43ee827e576c98c722e Mon Sep 17 00:00:00 2001
From 8a8cc57b3143fb893806580589ec22d297519155 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Sun, 31 Jul 2016 16:33:03 -0500
Subject: [PATCH] Re-track players that dismount from other players
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index ad1bb7bab..4e8efc549 100644
index f4a2e748d..2b01c5395 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -654,6 +654,13 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -715,6 +715,13 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
if (entity1 != entity && this.playerConnection != null) {
this.playerConnection.a(this.locX, this.locY, this.locZ, this.yaw, this.pitch);
}
@ -23,5 +23,5 @@ index ad1bb7bab..4e8efc549 100644
}
--
2.12.2
2.13.0

Datei anzeigen

@ -1,4 +1,4 @@
From c6c96c233b11b2ad11e28e3a11f8a3f7be84440e Mon Sep 17 00:00:00 2001
From 15f78808f7f1771e1ec4edd29f3fb17bbc2fbf64 Mon Sep 17 00:00:00 2001
From: Gabriele C <sgdc3.mail@gmail.com>
Date: Fri, 5 Aug 2016 01:03:08 +0200
Subject: [PATCH] Add setting for proxy online mode status
@ -19,10 +19,10 @@ index 0140d1981..c758bde3f 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java
index 2ff8a6da0..52e736080 100644
index b943a9b20..8f3b93dc1 100644
--- a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java
+++ b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java
@@ -65,7 +65,8 @@ public class NameReferencingFileConverter {
@@ -66,7 +66,8 @@ public class NameReferencingFileConverter {
}
}), String.class);
@ -33,10 +33,10 @@ index 2ff8a6da0..52e736080 100644
} else {
String[] astring1 = astring;
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index a958ce998..8ade16865 100644
index f4fd25c29..8f8f5e36f 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1336,7 +1336,8 @@ public final class CraftServer implements Server {
@@ -1314,7 +1314,8 @@ public final class CraftServer implements Server {
// Spigot Start
GameProfile profile = null;
// Only fetch an online UUID in online mode
@ -47,5 +47,5 @@ index a958ce998..8ade16865 100644
profile = console.getUserCache().getProfile( name );
}
--
2.12.2
2.13.0

Datei anzeigen

@ -1,14 +1,14 @@
From 8dae01a4e5890255459de98f20d4bc36d50c0aea Mon Sep 17 00:00:00 2001
From 08dcbdf8047ae290ac2c4ab36659bf6a1b41823d Mon Sep 17 00:00:00 2001
From: Brokkonaut <hannos17@gmx.de>
Date: Sun, 4 Sep 2016 16:35:43 -0500
Subject: [PATCH] Fix AIOOBE in inventory handling
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 4b79031f0..060434f32 100644
index b8ec71a93..bac3ba83d 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1809,7 +1809,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
@@ -1816,7 +1816,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
case CLONE:
if (packetplayinwindowclick.c() == 2) {
click = ClickType.MIDDLE;
@ -18,5 +18,5 @@ index 4b79031f0..060434f32 100644
} else {
Slot slot = this.player.activeContainer.getSlot(packetplayinwindowclick.b());
--
2.12.2
2.13.0

Datei anzeigen

@ -1,4 +1,4 @@
From b81c66363a4118495a786c69be2c447d6c0c24d7 Mon Sep 17 00:00:00 2001
From ddf7bf9141ddfb1453d79fbe35f88b1cee457219 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Sun, 11 Sep 2016 14:30:57 -0500
Subject: [PATCH] Configurable packet in spam threshold
@ -23,10 +23,10 @@ index c758bde3f..d765607c0 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 060434f32..6281fe4d5 100644
index bac3ba83d..7b8e7f343 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -871,13 +871,14 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
@@ -882,13 +882,14 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
// Spigot start - limit place/interactions
private int limitedPackets;
private long lastLimitedPacket = -1;
@ -44,5 +44,5 @@ index 060434f32..6281fe4d5 100644
limitedPackets = 0;
return true;
--
2.12.2
2.13.0

Datei anzeigen

@ -1,4 +1,4 @@
From 611ccc1d0db15c1a217e6657c25061e186b55fac Mon Sep 17 00:00:00 2001
From 6e44ed8bac401fbec4992cd29181c000a1473c51 Mon Sep 17 00:00:00 2001
From: kashike <kashike@vq.lc>
Date: Tue, 20 Sep 2016 00:58:01 +0000
Subject: [PATCH] Configurable flying kick messages
@ -21,27 +21,27 @@ index d765607c0..5b4d715a4 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 6281fe4d5..51d27351d 100644
index 7b8e7f343..d2742df61 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -143,7 +143,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
if (this.B) {
if (++this.C > 80) {
PlayerConnection.LOGGER.warn("{} was kicked for floating too long!", new Object[] { this.player.getName()});
PlayerConnection.LOGGER.warn("{} was kicked for floating too long!", this.player.getName());
- this.disconnect("Flying is not enabled on this server");
+ this.disconnect(com.destroystokyo.paper.PaperConfig.flyingKickPlayerMessage); // Paper - use configurable kick message
return;
}
} else {
@@ -162,7 +162,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
if (this.D && this.player.getVehicle().bw() == this.player) {
if (this.D && this.player.getVehicle().bC() == this.player) {
if (++this.E > 80) {
PlayerConnection.LOGGER.warn("{} was kicked for floating a vehicle too long!", new Object[] { this.player.getName()});
PlayerConnection.LOGGER.warn("{} was kicked for floating a vehicle too long!", this.player.getName());
- this.disconnect("Flying is not enabled on this server");
+ this.disconnect(com.destroystokyo.paper.PaperConfig.flyingKickVehicleMessage); // Paper - use configurable kick message
return;
}
} else {
--
2.12.2
2.13.0

Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden Mehr anzeigen