13
0
geforkt von Mirrors/Paper

Update PaperSpigot to Minecraft 1.8.3

Dieser Commit ist enthalten in:
Zach Brown 2015-03-07 19:16:09 -06:00
Ursprung d049872b83
Commit 78fa2af57a
44 geänderte Dateien mit 1023 neuen und 864 gelöschten Zeilen

Datei anzeigen

@ -1,11 +1,11 @@
From 75be04f38d3f75ac21ecad2bf1ee949e419247da Mon Sep 17 00:00:00 2001
From 64c05befc1e1204e32698b10f45283dad6affb62 Mon Sep 17 00:00:00 2001
From: Zach Brown <Zbob750@live.com>
Date: Tue, 6 Jan 2015 22:12:31 -0600
Subject: [PATCH] POM changes
diff --git a/pom.xml b/pom.xml
index 44aa858..5981842 100644
index 3e52a20..20a2cc9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,18 +4,18 @@
@ -24,7 +24,7 @@ index 44aa858..5981842 100644
- <artifactId>spigot-api</artifactId>
+ <groupId>org.github.paperspigot</groupId>
+ <artifactId>paperspigot-api</artifactId>
<version>1.8-R0.1-SNAPSHOT</version>
<version>1.8.3-R0.1-SNAPSHOT</version>
<packaging>jar</packaging>
- <name>Spigot-API</name>

Datei anzeigen

@ -1,11 +1,11 @@
From e7cac10d2cbd228ba6715da4592dcf78ba0a0303 Mon Sep 17 00:00:00 2001
From c65b3c8564cbf825621c13279504c5e98625fd0c Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Mon, 12 Jan 2015 11:21:04 -0600
Subject: [PATCH] POM changes
Date: Sat, 7 Mar 2015 19:16:09 -0600
Subject: [PATCH] POM Changes
diff --git a/pom.xml b/pom.xml
index bcd3a30..003caf1 100644
index 1c4f56e..4f7f9cf 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,12 +1,12 @@
@ -17,7 +17,7 @@ index bcd3a30..003caf1 100644
+ <groupId>org.github.paperspigot</groupId>
+ <artifactId>paperspigot</artifactId>
<packaging>jar</packaging>
<version>1.8-R0.1-SNAPSHOT</version>
<version>1.8.3-R0.1-SNAPSHOT</version>
- <name>Spigot</name>
- <url>http://www.spigotmc.org</url>
+ <name>PaperSpigot</name>
@ -25,7 +25,7 @@ index bcd3a30..003caf1 100644
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@@ -21,16 +21,16 @@
@@ -21,8 +21,8 @@
</properties>
<parent>
@ -36,8 +36,9 @@ index bcd3a30..003caf1 100644
<version>dev-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<dependencies>
@@ -34,8 +34,8 @@
<version>3.0.3</version>
</dependency>
<dependency>
- <groupId>org.spigotmc</groupId>
- <artifactId>spigot-api</artifactId>

Datei anzeigen

@ -1,14 +1,14 @@
From 43c2e536c0f107384894b535ab02e25fef71d9a8 Mon Sep 17 00:00:00 2001
From bc080a4a08b6df777ec3b59a04af73905bf5180f Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Sat, 12 Jul 2014 19:32:01 -0500
Subject: [PATCH] PaperSpigot config files
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
index 2806f1e..2e38fec 100644
index 86ff385..b80ffe5 100644
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
@@ -131,6 +131,10 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
@@ -178,6 +178,10 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
org.spigotmc.SpigotConfig.init();
org.spigotmc.SpigotConfig.registerCommands();
// Spigot end
@ -20,10 +20,10 @@ index 2806f1e..2e38fec 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 c50aa62..ac11b9a 100644
index 34d3697..31df781 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -192,6 +192,8 @@ public abstract class World implements IBlockAccess {
@@ -158,6 +158,8 @@ public abstract class World implements IBlockAccess {
public final org.spigotmc.SpigotWorldConfig spigotConfig; // Spigot
@ -32,16 +32,16 @@ index c50aa62..ac11b9a 100644
public final SpigotTimings.WorldTimingsHandler timings; // Spigot
public CraftWorld getWorld() {
@@ -208,6 +210,7 @@ public abstract class World implements IBlockAccess {
@@ -174,6 +176,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
+ this.paperSpigotConfig = new org.github.paperspigot.PaperSpigotWorldConfig( worlddata.getName() ); // PaperSpigot
this.generator = gen;
this.world = new CraftWorld((WorldServer) this, gen, env);
this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns(); // CraftBukkit
if (gen != null) {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index d7e3919..d67d3d4 100644
index 6174417..b5bf0ec 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -693,6 +693,7 @@ public final class CraftServer implements Server {
@ -69,7 +69,7 @@ index d7e3919..d67d3d4 100644
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotConfig.java
new file mode 100644
index 0000000..7ea1617
index 0000000..fa41614
--- /dev/null
+++ b/src/main/java/org/github/paperspigot/PaperSpigotConfig.java
@@ -0,0 +1,140 @@
@ -297,5 +297,5 @@ index 0000000..f3bc3aa
+ }
+}
--
2.2.2
1.9.1

Datei anzeigen

@ -1,22 +1,26 @@
From 246d917ad943f9e6fb6e3c8fa248bddfe37ec50f Mon Sep 17 00:00:00 2001
From 3ac4aa5507b3eb96cbd4ce5d01a25c391475f834 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Thu, 27 Nov 2014 23:53:56 -0600
Date: Sat, 7 Mar 2015 19:44:29 -0600
Subject: [PATCH] mc-dev imports
diff --git a/src/main/java/net/minecraft/server/BlockMinecartTrackAbstract.java b/src/main/java/net/minecraft/server/BlockMinecartTrackAbstract.java
new file mode 100644
index 0000000..063177d
index 0000000..0d108eb
--- /dev/null
+++ b/src/main/java/net/minecraft/server/BlockMinecartTrackAbstract.java
@@ -0,0 +1,120 @@
@@ -0,0 +1,597 @@
+package net.minecraft.server;
+
+import com.google.common.collect.Lists;
+import java.util.Iterator;
+import java.util.List;
+
+public abstract class BlockMinecartTrackAbstract extends Block {
+
+ protected final boolean a;
+
+ public static boolean d(World world, BlockPosition blockposition) {
+ public static boolean e(World world, BlockPosition blockposition) {
+ return d(world.getType(blockposition));
+ }
+
@ -48,9 +52,9 @@ index 0000000..063177d
+
+ public void updateShape(IBlockAccess iblockaccess, BlockPosition blockposition) {
+ IBlockData iblockdata = iblockaccess.getType(blockposition);
+ EnumTrackPosition enumtrackposition = iblockdata.getBlock() == this ? (EnumTrackPosition) iblockdata.get(this.l()) : null;
+ EnumTrackPosition blockminecarttrackabstract_enumtrackposition = iblockdata.getBlock() == this ? (EnumTrackPosition) iblockdata.get(this.n()) : null;
+
+ if (enumtrackposition != null && enumtrackposition.c()) {
+ if (blockminecarttrackabstract_enumtrackposition != null && blockminecarttrackabstract_enumtrackposition.c()) {
+ this.a(0.0F, 0.0F, 0.0F, 1.0F, 0.625F, 1.0F);
+ } else {
+ this.a(0.0F, 0.0F, 0.0F, 1.0F, 0.125F, 1.0F);
@ -67,7 +71,7 @@ index 0000000..063177d
+ }
+
+ public void onPlace(World world, BlockPosition blockposition, IBlockData iblockdata) {
+ if (!world.isStatic) {
+ if (!world.isClientSide) {
+ iblockdata = this.a(world, blockposition, iblockdata, true);
+ if (this.a) {
+ this.doPhysics(world, blockposition, iblockdata, this);
@ -77,21 +81,21 @@ index 0000000..063177d
+ }
+
+ public void doPhysics(World world, BlockPosition blockposition, IBlockData iblockdata, Block block) {
+ if (!world.isStatic) {
+ EnumTrackPosition enumtrackposition = (EnumTrackPosition) iblockdata.get(this.l());
+ if (!world.isClientSide) {
+ EnumTrackPosition blockminecarttrackabstract_enumtrackposition = (EnumTrackPosition) iblockdata.get(this.n());
+ boolean flag = false;
+
+ if (!World.a((IBlockAccess) world, blockposition.down())) {
+ flag = true;
+ }
+
+ if (enumtrackposition == EnumTrackPosition.ASCENDING_EAST && !World.a((IBlockAccess) world, blockposition.east())) {
+ if (blockminecarttrackabstract_enumtrackposition == EnumTrackPosition.ASCENDING_EAST && !World.a((IBlockAccess) world, blockposition.east())) {
+ flag = true;
+ } else if (enumtrackposition == EnumTrackPosition.ASCENDING_WEST && !World.a((IBlockAccess) world, blockposition.west())) {
+ } else if (blockminecarttrackabstract_enumtrackposition == EnumTrackPosition.ASCENDING_WEST && !World.a((IBlockAccess) world, blockposition.west())) {
+ flag = true;
+ } else if (enumtrackposition == EnumTrackPosition.ASCENDING_NORTH && !World.a((IBlockAccess) world, blockposition.north())) {
+ } else if (blockminecarttrackabstract_enumtrackposition == EnumTrackPosition.ASCENDING_NORTH && !World.a((IBlockAccess) world, blockposition.north())) {
+ flag = true;
+ } else if (enumtrackposition == EnumTrackPosition.ASCENDING_SOUTH && !World.a((IBlockAccess) world, blockposition.south())) {
+ } else if (blockminecarttrackabstract_enumtrackposition == EnumTrackPosition.ASCENDING_SOUTH && !World.a((IBlockAccess) world, blockposition.south())) {
+ flag = true;
+ }
+
@ -108,16 +112,16 @@ index 0000000..063177d
+ protected void b(World world, BlockPosition blockposition, IBlockData iblockdata, Block block) {}
+
+ protected IBlockData a(World world, BlockPosition blockposition, IBlockData iblockdata, boolean flag) {
+ return world.isStatic ? iblockdata : (new MinecartTrackLogic(this, world, blockposition, iblockdata)).a(world.isBlockIndirectlyPowered(blockposition), flag).b();
+ return world.isClientSide ? iblockdata : (new MinecartTrackLogic(world, blockposition, iblockdata)).a(world.isBlockIndirectlyPowered(blockposition), flag).b();
+ }
+
+ public int i() {
+ public int k() {
+ return 0;
+ }
+
+ public void remove(World world, BlockPosition blockposition, IBlockData iblockdata) {
+ super.remove(world, blockposition, iblockdata);
+ if (((EnumTrackPosition) iblockdata.get(this.l())).c()) {
+ if (((EnumTrackPosition) iblockdata.get(this.n())).c()) {
+ world.applyPhysics(blockposition.up(), this);
+ }
+
@ -128,14 +132,487 @@ index 0000000..063177d
+
+ }
+
+ public abstract IBlockState l();
+ public abstract IBlockState<EnumTrackPosition> n();
+
+ static class SyntheticClass_1 {
+
+ static final int[] a = new int[EnumTrackPosition.values().length];
+
+ static {
+ try {
+ SyntheticClass_1.a[EnumTrackPosition.NORTH_SOUTH.ordinal()] = 1;
+ } catch (NoSuchFieldError nosuchfielderror) {
+ ;
+ }
+
+ try {
+ SyntheticClass_1.a[EnumTrackPosition.EAST_WEST.ordinal()] = 2;
+ } catch (NoSuchFieldError nosuchfielderror1) {
+ ;
+ }
+
+ try {
+ SyntheticClass_1.a[EnumTrackPosition.ASCENDING_EAST.ordinal()] = 3;
+ } catch (NoSuchFieldError nosuchfielderror2) {
+ ;
+ }
+
+ try {
+ SyntheticClass_1.a[EnumTrackPosition.ASCENDING_WEST.ordinal()] = 4;
+ } catch (NoSuchFieldError nosuchfielderror3) {
+ ;
+ }
+
+ try {
+ SyntheticClass_1.a[EnumTrackPosition.ASCENDING_NORTH.ordinal()] = 5;
+ } catch (NoSuchFieldError nosuchfielderror4) {
+ ;
+ }
+
+ try {
+ SyntheticClass_1.a[EnumTrackPosition.ASCENDING_SOUTH.ordinal()] = 6;
+ } catch (NoSuchFieldError nosuchfielderror5) {
+ ;
+ }
+
+ try {
+ SyntheticClass_1.a[EnumTrackPosition.SOUTH_EAST.ordinal()] = 7;
+ } catch (NoSuchFieldError nosuchfielderror6) {
+ ;
+ }
+
+ try {
+ SyntheticClass_1.a[EnumTrackPosition.SOUTH_WEST.ordinal()] = 8;
+ } catch (NoSuchFieldError nosuchfielderror7) {
+ ;
+ }
+
+ try {
+ SyntheticClass_1.a[EnumTrackPosition.NORTH_WEST.ordinal()] = 9;
+ } catch (NoSuchFieldError nosuchfielderror8) {
+ ;
+ }
+
+ try {
+ SyntheticClass_1.a[EnumTrackPosition.NORTH_EAST.ordinal()] = 10;
+ } catch (NoSuchFieldError nosuchfielderror9) {
+ ;
+ }
+
+ }
+ }
+
+ public static enum EnumTrackPosition implements INamable {
+
+ NORTH_SOUTH(0, "north_south"), EAST_WEST(1, "east_west"), ASCENDING_EAST(2, "ascending_east"), ASCENDING_WEST(3, "ascending_west"), ASCENDING_NORTH(4, "ascending_north"), ASCENDING_SOUTH(5, "ascending_south"), SOUTH_EAST(6, "south_east"), SOUTH_WEST(7, "south_west"), NORTH_WEST(8, "north_west"), NORTH_EAST(9, "north_east");
+
+ private static final EnumTrackPosition[] k = new EnumTrackPosition[values().length];
+ private final int l;
+ private final String m;
+
+ private EnumTrackPosition(int i, String s) {
+ this.l = i;
+ this.m = s;
+ }
+
+ public int a() {
+ return this.l;
+ }
+
+ public String toString() {
+ return this.m;
+ }
+
+ public boolean c() {
+ return this == EnumTrackPosition.ASCENDING_NORTH || this == EnumTrackPosition.ASCENDING_EAST || this == EnumTrackPosition.ASCENDING_SOUTH || this == EnumTrackPosition.ASCENDING_WEST;
+ }
+
+ public static EnumTrackPosition a(int i) {
+ if (i < 0 || i >= EnumTrackPosition.k.length) {
+ i = 0;
+ }
+
+ return EnumTrackPosition.k[i];
+ }
+
+ public String getName() {
+ return this.m;
+ }
+
+ static {
+ EnumTrackPosition[] ablockminecarttrackabstract_enumtrackposition = values();
+ int i = ablockminecarttrackabstract_enumtrackposition.length;
+
+ for (int j = 0; j < i; ++j) {
+ EnumTrackPosition blockminecarttrackabstract_enumtrackposition = ablockminecarttrackabstract_enumtrackposition[j];
+
+ EnumTrackPosition.k[blockminecarttrackabstract_enumtrackposition.a()] = blockminecarttrackabstract_enumtrackposition;
+ }
+
+ }
+ }
+
+ public class MinecartTrackLogic {
+
+ private final World b;
+ private final BlockPosition c;
+ private final BlockMinecartTrackAbstract d;
+ private IBlockData e;
+ private final boolean f;
+ private final List<BlockPosition> g = Lists.newArrayList();
+
+ public MinecartTrackLogic(World world, BlockPosition blockposition, IBlockData iblockdata) {
+ this.b = world;
+ this.c = blockposition;
+ this.e = iblockdata;
+ this.d = (BlockMinecartTrackAbstract) iblockdata.getBlock();
+ EnumTrackPosition blockminecarttrackabstract_enumtrackposition = (EnumTrackPosition) iblockdata.get(BlockMinecartTrackAbstract.this.n());
+
+ this.f = this.d.a;
+ this.a(blockminecarttrackabstract_enumtrackposition);
+ }
+
+ private void a(EnumTrackPosition blockminecarttrackabstract_enumtrackposition) {
+ this.g.clear();
+ switch (SyntheticClass_1.a[blockminecarttrackabstract_enumtrackposition.ordinal()]) {
+ case 1:
+ this.g.add(this.c.north());
+ this.g.add(this.c.south());
+ break;
+
+ case 2:
+ this.g.add(this.c.west());
+ this.g.add(this.c.east());
+ break;
+
+ case 3:
+ this.g.add(this.c.west());
+ this.g.add(this.c.east().up());
+ break;
+
+ case 4:
+ this.g.add(this.c.west().up());
+ this.g.add(this.c.east());
+ break;
+
+ case 5:
+ this.g.add(this.c.north().up());
+ this.g.add(this.c.south());
+ break;
+
+ case 6:
+ this.g.add(this.c.north());
+ this.g.add(this.c.south().up());
+ break;
+
+ case 7:
+ this.g.add(this.c.east());
+ this.g.add(this.c.south());
+ break;
+
+ case 8:
+ this.g.add(this.c.west());
+ this.g.add(this.c.south());
+ break;
+
+ case 9:
+ this.g.add(this.c.west());
+ this.g.add(this.c.north());
+ break;
+
+ case 10:
+ this.g.add(this.c.east());
+ this.g.add(this.c.north());
+ }
+
+ }
+
+ private void c() {
+ for (int i = 0; i < this.g.size(); ++i) {
+ MinecartTrackLogic blockminecarttrackabstract_minecarttracklogic = this.b((BlockPosition) this.g.get(i));
+
+ if (blockminecarttrackabstract_minecarttracklogic != null && blockminecarttrackabstract_minecarttracklogic.a(this)) {
+ this.g.set(i, blockminecarttrackabstract_minecarttracklogic.c);
+ } else {
+ this.g.remove(i--);
+ }
+ }
+
+ }
+
+ private boolean a(BlockPosition blockposition) {
+ return BlockMinecartTrackAbstract.e(this.b, blockposition) || BlockMinecartTrackAbstract.e(this.b, blockposition.up()) || BlockMinecartTrackAbstract.e(this.b, blockposition.down());
+ }
+
+ private MinecartTrackLogic b(BlockPosition blockposition) {
+ IBlockData iblockdata = this.b.getType(blockposition);
+
+ if (BlockMinecartTrackAbstract.d(iblockdata)) {
+ return BlockMinecartTrackAbstract.this.new MinecartTrackLogic(this.b, blockposition, iblockdata);
+ } else {
+ BlockPosition blockposition1 = blockposition.up();
+
+ iblockdata = this.b.getType(blockposition1);
+ if (BlockMinecartTrackAbstract.d(iblockdata)) {
+ return BlockMinecartTrackAbstract.this.new MinecartTrackLogic(this.b, blockposition1, iblockdata);
+ } else {
+ blockposition1 = blockposition.down();
+ iblockdata = this.b.getType(blockposition1);
+ return BlockMinecartTrackAbstract.d(iblockdata) ? BlockMinecartTrackAbstract.this.new MinecartTrackLogic(this.b, blockposition1, iblockdata) : null;
+ }
+ }
+ }
+
+ private boolean a(MinecartTrackLogic blockminecarttrackabstract_minecarttracklogic) {
+ return this.c(blockminecarttrackabstract_minecarttracklogic.c);
+ }
+
+ private boolean c(BlockPosition blockposition) {
+ for (int i = 0; i < this.g.size(); ++i) {
+ BlockPosition blockposition1 = (BlockPosition) this.g.get(i);
+
+ if (blockposition1.getX() == blockposition.getX() && blockposition1.getZ() == blockposition.getZ()) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ protected int a() {
+ int i = 0;
+ Iterator iterator = EnumDirection.EnumDirectionLimit.HORIZONTAL.iterator();
+
+ while (iterator.hasNext()) {
+ EnumDirection enumdirection = (EnumDirection) iterator.next();
+
+ if (this.a(this.c.shift(enumdirection))) {
+ ++i;
+ }
+ }
+
+ return i;
+ }
+
+ private boolean b(MinecartTrackLogic blockminecarttrackabstract_minecarttracklogic) {
+ return this.a(blockminecarttrackabstract_minecarttracklogic) || this.g.size() != 2;
+ }
+
+ private void c(MinecartTrackLogic blockminecarttrackabstract_minecarttracklogic) {
+ this.g.add(blockminecarttrackabstract_minecarttracklogic.c);
+ BlockPosition blockposition = this.c.north();
+ BlockPosition blockposition1 = this.c.south();
+ BlockPosition blockposition2 = this.c.west();
+ BlockPosition blockposition3 = this.c.east();
+ boolean flag = this.c(blockposition);
+ boolean flag1 = this.c(blockposition1);
+ boolean flag2 = this.c(blockposition2);
+ boolean flag3 = this.c(blockposition3);
+ EnumTrackPosition blockminecarttrackabstract_enumtrackposition = null;
+
+ if (flag || flag1) {
+ blockminecarttrackabstract_enumtrackposition = EnumTrackPosition.NORTH_SOUTH;
+ }
+
+ if (flag2 || flag3) {
+ blockminecarttrackabstract_enumtrackposition = EnumTrackPosition.EAST_WEST;
+ }
+
+ if (!this.f) {
+ if (flag1 && flag3 && !flag && !flag2) {
+ blockminecarttrackabstract_enumtrackposition = EnumTrackPosition.SOUTH_EAST;
+ }
+
+ if (flag1 && flag2 && !flag && !flag3) {
+ blockminecarttrackabstract_enumtrackposition = EnumTrackPosition.SOUTH_WEST;
+ }
+
+ if (flag && flag2 && !flag1 && !flag3) {
+ blockminecarttrackabstract_enumtrackposition = EnumTrackPosition.NORTH_WEST;
+ }
+
+ if (flag && flag3 && !flag1 && !flag2) {
+ blockminecarttrackabstract_enumtrackposition = EnumTrackPosition.NORTH_EAST;
+ }
+ }
+
+ if (blockminecarttrackabstract_enumtrackposition == EnumTrackPosition.NORTH_SOUTH) {
+ if (BlockMinecartTrackAbstract.e(this.b, blockposition.up())) {
+ blockminecarttrackabstract_enumtrackposition = EnumTrackPosition.ASCENDING_NORTH;
+ }
+
+ if (BlockMinecartTrackAbstract.e(this.b, blockposition1.up())) {
+ blockminecarttrackabstract_enumtrackposition = EnumTrackPosition.ASCENDING_SOUTH;
+ }
+ }
+
+ if (blockminecarttrackabstract_enumtrackposition == EnumTrackPosition.EAST_WEST) {
+ if (BlockMinecartTrackAbstract.e(this.b, blockposition3.up())) {
+ blockminecarttrackabstract_enumtrackposition = EnumTrackPosition.ASCENDING_EAST;
+ }
+
+ if (BlockMinecartTrackAbstract.e(this.b, blockposition2.up())) {
+ blockminecarttrackabstract_enumtrackposition = EnumTrackPosition.ASCENDING_WEST;
+ }
+ }
+
+ if (blockminecarttrackabstract_enumtrackposition == null) {
+ blockminecarttrackabstract_enumtrackposition = EnumTrackPosition.NORTH_SOUTH;
+ }
+
+ this.e = this.e.set(this.d.n(), blockminecarttrackabstract_enumtrackposition);
+ this.b.setTypeAndData(this.c, this.e, 3);
+ }
+
+ private boolean d(BlockPosition blockposition) {
+ MinecartTrackLogic blockminecarttrackabstract_minecarttracklogic = this.b(blockposition);
+
+ if (blockminecarttrackabstract_minecarttracklogic == null) {
+ return false;
+ } else {
+ blockminecarttrackabstract_minecarttracklogic.c();
+ return blockminecarttrackabstract_minecarttracklogic.b(this);
+ }
+ }
+
+ public MinecartTrackLogic a(boolean flag, boolean flag1) {
+ BlockPosition blockposition = this.c.north();
+ BlockPosition blockposition1 = this.c.south();
+ BlockPosition blockposition2 = this.c.west();
+ BlockPosition blockposition3 = this.c.east();
+ boolean flag2 = this.d(blockposition);
+ boolean flag3 = this.d(blockposition1);
+ boolean flag4 = this.d(blockposition2);
+ boolean flag5 = this.d(blockposition3);
+ EnumTrackPosition blockminecarttrackabstract_enumtrackposition = null;
+
+ if ((flag2 || flag3) && !flag4 && !flag5) {
+ blockminecarttrackabstract_enumtrackposition = EnumTrackPosition.NORTH_SOUTH;
+ }
+
+ if ((flag4 || flag5) && !flag2 && !flag3) {
+ blockminecarttrackabstract_enumtrackposition = EnumTrackPosition.EAST_WEST;
+ }
+
+ if (!this.f) {
+ if (flag3 && flag5 && !flag2 && !flag4) {
+ blockminecarttrackabstract_enumtrackposition = EnumTrackPosition.SOUTH_EAST;
+ }
+
+ if (flag3 && flag4 && !flag2 && !flag5) {
+ blockminecarttrackabstract_enumtrackposition = EnumTrackPosition.SOUTH_WEST;
+ }
+
+ if (flag2 && flag4 && !flag3 && !flag5) {
+ blockminecarttrackabstract_enumtrackposition = EnumTrackPosition.NORTH_WEST;
+ }
+
+ if (flag2 && flag5 && !flag3 && !flag4) {
+ blockminecarttrackabstract_enumtrackposition = EnumTrackPosition.NORTH_EAST;
+ }
+ }
+
+ if (blockminecarttrackabstract_enumtrackposition == null) {
+ if (flag2 || flag3) {
+ blockminecarttrackabstract_enumtrackposition = EnumTrackPosition.NORTH_SOUTH;
+ }
+
+ if (flag4 || flag5) {
+ blockminecarttrackabstract_enumtrackposition = EnumTrackPosition.EAST_WEST;
+ }
+
+ if (!this.f) {
+ if (flag) {
+ if (flag3 && flag5) {
+ blockminecarttrackabstract_enumtrackposition = EnumTrackPosition.SOUTH_EAST;
+ }
+
+ if (flag4 && flag3) {
+ blockminecarttrackabstract_enumtrackposition = EnumTrackPosition.SOUTH_WEST;
+ }
+
+ if (flag5 && flag2) {
+ blockminecarttrackabstract_enumtrackposition = EnumTrackPosition.NORTH_EAST;
+ }
+
+ if (flag2 && flag4) {
+ blockminecarttrackabstract_enumtrackposition = EnumTrackPosition.NORTH_WEST;
+ }
+ } else {
+ if (flag2 && flag4) {
+ blockminecarttrackabstract_enumtrackposition = EnumTrackPosition.NORTH_WEST;
+ }
+
+ if (flag5 && flag2) {
+ blockminecarttrackabstract_enumtrackposition = EnumTrackPosition.NORTH_EAST;
+ }
+
+ if (flag4 && flag3) {
+ blockminecarttrackabstract_enumtrackposition = EnumTrackPosition.SOUTH_WEST;
+ }
+
+ if (flag3 && flag5) {
+ blockminecarttrackabstract_enumtrackposition = EnumTrackPosition.SOUTH_EAST;
+ }
+ }
+ }
+ }
+
+ if (blockminecarttrackabstract_enumtrackposition == EnumTrackPosition.NORTH_SOUTH) {
+ if (BlockMinecartTrackAbstract.e(this.b, blockposition.up())) {
+ blockminecarttrackabstract_enumtrackposition = EnumTrackPosition.ASCENDING_NORTH;
+ }
+
+ if (BlockMinecartTrackAbstract.e(this.b, blockposition1.up())) {
+ blockminecarttrackabstract_enumtrackposition = EnumTrackPosition.ASCENDING_SOUTH;
+ }
+ }
+
+ if (blockminecarttrackabstract_enumtrackposition == EnumTrackPosition.EAST_WEST) {
+ if (BlockMinecartTrackAbstract.e(this.b, blockposition3.up())) {
+ blockminecarttrackabstract_enumtrackposition = EnumTrackPosition.ASCENDING_EAST;
+ }
+
+ if (BlockMinecartTrackAbstract.e(this.b, blockposition2.up())) {
+ blockminecarttrackabstract_enumtrackposition = EnumTrackPosition.ASCENDING_WEST;
+ }
+ }
+
+ if (blockminecarttrackabstract_enumtrackposition == null) {
+ blockminecarttrackabstract_enumtrackposition = EnumTrackPosition.NORTH_SOUTH;
+ }
+
+ this.a(blockminecarttrackabstract_enumtrackposition);
+ this.e = this.e.set(this.d.n(), blockminecarttrackabstract_enumtrackposition);
+ if (flag1 || this.b.getType(this.c) != this.e) {
+ this.b.setTypeAndData(this.c, this.e, 3);
+
+ for (int i = 0; i < this.g.size(); ++i) {
+ MinecartTrackLogic blockminecarttrackabstract_minecarttracklogic = this.b((BlockPosition) this.g.get(i));
+
+ if (blockminecarttrackabstract_minecarttracklogic != null) {
+ blockminecarttrackabstract_minecarttracklogic.c();
+ if (blockminecarttrackabstract_minecarttracklogic.b(this)) {
+ blockminecarttrackabstract_minecarttracklogic.c(this);
+ }
+ }
+ }
+ }
+
+ return this;
+ }
+
+ public IBlockData b() {
+ return this.e;
+ }
+ }
+}
diff --git a/src/main/java/net/minecraft/server/ItemBlock.java b/src/main/java/net/minecraft/server/ItemBlock.java
new file mode 100644
index 0000000..a4b50fe
index 0000000..451a0bb
--- /dev/null
+++ b/src/main/java/net/minecraft/server/ItemBlock.java
@@ -0,0 +1,94 @@
@@ -0,0 +1,90 @@
+package net.minecraft.server;
+
+public class ItemBlock extends Item {
@ -155,9 +632,7 @@ index 0000000..a4b50fe
+ IBlockData iblockdata = world.getType(blockposition);
+ Block block = iblockdata.getBlock();
+
+ if (block == Blocks.SNOW_LAYER && ((Integer) iblockdata.get(BlockSnow.LAYERS)).intValue() < 1) {
+ enumdirection = EnumDirection.UP;
+ } else if (!block.f(world, blockposition)) {
+ if (!block.a(world, blockposition)) {
+ blockposition = blockposition.shift(enumdirection);
+ }
+
@ -165,8 +640,6 @@ index 0000000..a4b50fe
+ return false;
+ } else if (!entityhuman.a(blockposition, enumdirection, itemstack)) {
+ return false;
+ } else if (blockposition.getY() == 255 && this.a.getMaterial().isBuildable()) {
+ return false;
+ } else if (world.a(this.a, blockposition, false, enumdirection, (Entity) null, itemstack)) {
+ int i = this.filterData(itemstack.getData());
+ IBlockData iblockdata1 = this.a.getPlacedState(world, blockposition, enumdirection, f, f1, f2, i, entityhuman);
@ -248,43 +721,6 @@ index 0000000..620685a
+ return this.id == MobEffectList.WEAKNESS.id ? (double) (-0.5F * (float) (i + 1)) : 1.3D * (double) (i + 1);
+ }
+}
diff --git a/src/main/java/net/minecraft/server/PacketPlayOutPlayerListHeaderFooter.java b/src/main/java/net/minecraft/server/PacketPlayOutPlayerListHeaderFooter.java
new file mode 100644
index 0000000..985e437
--- /dev/null
+++ b/src/main/java/net/minecraft/server/PacketPlayOutPlayerListHeaderFooter.java
@@ -0,0 +1,31 @@
+package net.minecraft.server;
+
+public class PacketPlayOutPlayerListHeaderFooter implements Packet {
+
+ private IChatBaseComponent a;
+ private IChatBaseComponent b;
+
+ public PacketPlayOutPlayerListHeaderFooter() {}
+
+ public PacketPlayOutPlayerListHeaderFooter(IChatBaseComponent ichatbasecomponent) {
+ this.a = ichatbasecomponent;
+ }
+
+ public void a(PacketDataSerializer packetdataserializer) {
+ this.a = packetdataserializer.d();
+ this.b = packetdataserializer.d();
+ }
+
+ public void b(PacketDataSerializer packetdataserializer) {
+ packetdataserializer.a(this.a);
+ packetdataserializer.a(this.b);
+ }
+
+ public void a(PacketListenerPlayOut packetlistenerplayout) {
+ packetlistenerplayout.a(this);
+ }
+
+ public void a(PacketListener packetlistener) {
+ this.a((PacketListenerPlayOut) packetlistener);
+ }
+}
diff --git a/src/main/java/net/minecraft/server/TileEntityEnderChest.java b/src/main/java/net/minecraft/server/TileEntityEnderChest.java
new file mode 100644
index 0000000..794cdc8
@ -380,7 +816,7 @@ index 0000000..794cdc8
+}
diff --git a/src/main/java/net/minecraft/server/TileEntityLightDetector.java b/src/main/java/net/minecraft/server/TileEntityLightDetector.java
new file mode 100644
index 0000000..7b6f8ae
index 0000000..f75e2de
--- /dev/null
+++ b/src/main/java/net/minecraft/server/TileEntityLightDetector.java
@@ -0,0 +1,16 @@
@ -391,10 +827,10 @@ index 0000000..7b6f8ae
+ public TileEntityLightDetector() {}
+
+ public void c() {
+ if (this.world != null && !this.world.isStatic && this.world.getTime() % 20L == 0L) {
+ if (this.world != null && !this.world.isClientSide && this.world.getTime() % 20L == 0L) {
+ this.e = this.w();
+ if (this.e instanceof BlockDaylightDetector) {
+ ((BlockDaylightDetector) this.e).d(this.world, this.position);
+ ((BlockDaylightDetector) this.e).f(this.world, this.position);
+ }
+ }
+

Datei anzeigen

@ -1,16 +1,16 @@
From 748dbbdcd8b0f5a6cda6d1e4366c361324f20676 Mon Sep 17 00:00:00 2001
From 85b439d4648ae4766f5c54754219b5fd0ea315ac Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Fri, 28 Nov 2014 00:35:56 -0600
Date: Sat, 7 Mar 2015 19:50:01 -0600
Subject: [PATCH] Vanished players don't have rights
diff --git a/src/main/java/net/minecraft/server/EntityArrow.java b/src/main/java/net/minecraft/server/EntityArrow.java
index ead7eef..a77ebfe 100644
index 46f6374..6aa8cad 100644
--- a/src/main/java/net/minecraft/server/EntityArrow.java
+++ b/src/main/java/net/minecraft/server/EntityArrow.java
@@ -221,6 +221,14 @@ public class EntityArrow extends Entity implements IProjectile {
@@ -220,6 +220,14 @@ public class EntityArrow extends Entity implements IProjectile {
float f2;
float f3;
float f4;
+ // PaperSpigot start - Allow arrows to fly through vanished players the shooter can't see
+ if (movingobjectposition != null && movingobjectposition.entity instanceof EntityPlayer && shooter != null && shooter instanceof EntityPlayer) {
@ -22,12 +22,12 @@ index ead7eef..a77ebfe 100644
+
if (movingobjectposition != null) {
org.bukkit.craftbukkit.event.CraftEventFactory.callProjectileHitEvent(this); // CraftBukkit - Call event
if (movingobjectposition.entity != null) {
diff --git a/src/main/java/net/minecraft/server/EntityProjectile.java b/src/main/java/net/minecraft/server/EntityProjectile.java
index ce3e628..005e995 100644
index d4e5971..fbcb6ac 100644
--- a/src/main/java/net/minecraft/server/EntityProjectile.java
+++ b/src/main/java/net/minecraft/server/EntityProjectile.java
@@ -146,6 +146,14 @@ public abstract class EntityProjectile extends Entity implements IProjectile {
@@ -147,6 +147,14 @@ public abstract class EntityProjectile extends Entity implements IProjectile {
}
}
@ -40,15 +40,15 @@ index ce3e628..005e995 100644
+ // PaperSpigot end
+
if (movingobjectposition != null) {
if (movingobjectposition.type == EnumMovingObjectType.BLOCK && this.world.getType(movingobjectposition.a()).getBlock() == Blocks.PORTAL) {
this.aq();
if (movingobjectposition.type == MovingObjectPosition.EnumMovingObjectType.BLOCK && this.world.getType(movingobjectposition.a()).getBlock() == Blocks.PORTAL) {
this.d(movingobjectposition.a());
diff --git a/src/main/java/net/minecraft/server/ItemBlock.java b/src/main/java/net/minecraft/server/ItemBlock.java
index a4b50fe..14ea66d 100644
index 451a0bb..24601c7 100644
--- a/src/main/java/net/minecraft/server/ItemBlock.java
+++ b/src/main/java/net/minecraft/server/ItemBlock.java
@@ -29,7 +29,7 @@ public class ItemBlock extends Item {
@@ -25,7 +25,7 @@ public class ItemBlock extends Item {
return false;
} else if (blockposition.getY() == 255 && this.a.getMaterial().isBuildable()) {
} else if (!entityhuman.a(blockposition, enumdirection, itemstack)) {
return false;
- } else if (world.a(this.a, blockposition, false, enumdirection, (Entity) null, itemstack)) {
+ } else if (world.a(this.a, blockposition, false, enumdirection, entityhuman, itemstack)) { // PaperSpigot - Pass entityhuman instead of null
@ -56,10 +56,10 @@ index a4b50fe..14ea66d 100644
IBlockData iblockdata1 = this.a.getPlacedState(world, blockposition, enumdirection, f, f1, f2, i, entityhuman);
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index e071cbf..6b77fda 100644
index 31df781..4838e84 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -1670,6 +1670,14 @@ public abstract class World implements IBlockAccess {
@@ -1671,6 +1671,13 @@ public abstract class World implements IBlockAccess {
for (int i = 0; i < list.size(); ++i) {
Entity entity1 = (Entity) list.get(i);
@ -69,11 +69,10 @@ index e071cbf..6b77fda 100644
+ continue;
+ }
+ }
+ // PaperSpigot end
+
if (!entity1.dead && entity1.k && entity1 != entity && (entity == null || entity.vehicle != entity1 && entity.passenger != entity1)) {
return false;
}
--
1.9.5.msysgit.0
1.9.1

Datei anzeigen

@ -1,30 +1,27 @@
From c09702cef82655997b7ace1787a8ee295b1f7211 Mon Sep 17 00:00:00 2001
From 0105ce07d38b5554882c5c8293218219baf01c74 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Fri, 28 Nov 2014 00:08:37 -0600
Date: Sat, 7 Mar 2015 19:57:50 -0600
Subject: [PATCH] Allow undead horse types to be leashed
diff --git a/src/main/java/net/minecraft/server/EntityHorse.java b/src/main/java/net/minecraft/server/EntityHorse.java
index 50e9292..0bcf8c9 100644
index 688099f..d1d45b6 100644
--- a/src/main/java/net/minecraft/server/EntityHorse.java
+++ b/src/main/java/net/minecraft/server/EntityHorse.java
@@ -173,7 +173,13 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
@@ -179,6 +179,11 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
}
public boolean ca() {
- return !this.cP() && super.ca();
public boolean cb() {
+ // PaperSpigot start - Configurable undead horse leashing
+ if (this.world.paperSpigotConfig.allowUndeadHorseLeashing) {
+ return super.ca();
+ } else {
+ return !this.cP() && super.ca();
+ return super.cb();
+ }
+ // PaperSpigot end
return !this.cR() && super.cb();
}
protected void n(float f) {
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
index f3bc3aa..b9d1afe 100644
index f3bc3aa..0b47234 100644
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
@@ -74,4 +74,11 @@ public class PaperSpigotWorldConfig
@ -35,7 +32,7 @@ index f3bc3aa..b9d1afe 100644
+ public boolean allowUndeadHorseLeashing;
+ private void allowUndeadHorseLeashing()
+ {
+ allowUndeadHorseLeashing = getBoolean( "allow-undead-horse-leashing", true );
+ allowUndeadHorseLeashing = getBoolean( "allow-undead-horse-leashing", false );
+ log( "Allow undead horse types to be leashed: " + allowUndeadHorseLeashing );
+ }
}

Datei anzeigen

@ -1,29 +1,29 @@
From 2475b727707230bcf5e97c384ce2e5c512392afa Mon Sep 17 00:00:00 2001
From 6b5d69ae84764c2a11f03c5fd257486181017987 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Fri, 28 Nov 2014 00:41:04 -0600
Date: Sat, 7 Mar 2015 20:20:29 -0600
Subject: [PATCH] Configurable squid spawn ranges
diff --git a/src/main/java/net/minecraft/server/EntitySquid.java b/src/main/java/net/minecraft/server/EntitySquid.java
index ee93dfe..0868017 100644
index 511bec7..31996b4 100644
--- a/src/main/java/net/minecraft/server/EntitySquid.java
+++ b/src/main/java/net/minecraft/server/EntitySquid.java
@@ -145,7 +145,8 @@ public class EntitySquid extends EntityWaterAnimal {
@@ -141,7 +141,8 @@ public class EntitySquid extends EntityWaterAnimal {
}
public boolean bQ() {
- return this.locY > 45.0D && this.locY < 63.0D && super.bQ();
public boolean bR() {
- return this.locY > 45.0D && this.locY < (double) this.world.F() && super.bR();
+ // PaperSpigot - Configurable squid spawn range
+ return this.locY > this.world.paperSpigotConfig.squidMinSpawnHeight && this.locY < this.world.paperSpigotConfig.squidMaxSpawnHeight && super.bQ();
+ return this.locY > this.world.paperSpigotConfig.squidMinSpawnHeight && this.locY < (double) this.world.paperSpigotConfig.squidMaxSpawnHeight && super.bR();
}
public void b(float f, float f1, float f2) {
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
index b9d1afe..f6b0349 100644
index 0b47234..f3bbac8 100644
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
@@ -81,4 +81,13 @@ public class PaperSpigotWorldConfig
allowUndeadHorseLeashing = getBoolean( "allow-undead-horse-leashing", true );
allowUndeadHorseLeashing = getBoolean( "allow-undead-horse-leashing", false );
log( "Allow undead horse types to be leashed: " + allowUndeadHorseLeashing );
}
+
@ -33,9 +33,9 @@ index b9d1afe..f6b0349 100644
+ {
+ squidMinSpawnHeight = getDouble( "squid-spawn-height.minimum", 45.0D );
+ squidMaxSpawnHeight = getDouble( "squid-spawn-height.maximum", 63.0D );
+ log( "Squids will spawn between Y: " + squidMinSpawnHeight + " and Y: " + squidMaxSpawnHeight);
+ log( "Squids will spawn between Y: " + squidMinSpawnHeight + " and Y: " + squidMaxSpawnHeight );
+ }
}
--
1.9.5.msysgit.0
1.9.1

Datei anzeigen

@ -1,38 +1,38 @@
From 490c255eaa142d4712b7fb492d7ccb0fca59d408 Mon Sep 17 00:00:00 2001
From 9b9c2851ddafd52f5e631de7ec1be02a35ad64e1 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Fri, 28 Nov 2014 00:45:14 -0600
Date: Sat, 7 Mar 2015 20:27:02 -0600
Subject: [PATCH] Configurable damage multiplier for PvP blocking
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index 00aa03d..876cf4e 100644
index d73395a..9dce3ac 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -862,7 +862,7 @@ public abstract class EntityHuman extends EntityLiving {
@@ -861,7 +861,7 @@ public abstract class EntityHuman extends EntityLiving {
// CraftBukkit end
if (!this.isInvulnerable(damagesource)) {
if (!damagesource.ignoresArmor() && this.isBlocking() && f > 0.0F) {
- f = (1.0F + f) * 0.5F;
+ f = (1.0F + f) * this.world.paperSpigotConfig.playerBlockingDamageMultiplier; // PaperSpigot - Configurable damage multiplier for blocking
+ f = (1.0F + f) * this.world.paperSpigotConfig.playerBlockingDamageMultiplier; // PaperSpigot - Configurable damage multiplier for blocking;
}
f = this.applyArmorModifier(damagesource, f);
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
index f6b0349..5cda463 100644
index f3bbac8..2a84879 100644
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
@@ -90,4 +90,11 @@ public class PaperSpigotWorldConfig
squidMaxSpawnHeight = getDouble( "squid-spawn-height.maximum", 63.0D );
log( "Squids will spawn between Y: " + squidMinSpawnHeight + " and Y: " + squidMaxSpawnHeight);
log( "Squids will spawn between Y: " + squidMinSpawnHeight + " and Y: " + squidMaxSpawnHeight );
}
+
+ public float playerBlockingDamageMultiplier;
+ private void playerBlockingDamageMultiplier()
+ {
+ playerBlockingDamageMultiplier = getFloat( "player-blocking-damage-multiplier", 0.5F );
+ log( "Player blocking damage multiplier set to " + playerBlockingDamageMultiplier);
+ log( "Player blocking damage multiplier set to " + playerBlockingDamageMultiplier );
+ }
}
--
1.9.5.msysgit.0
1.9.1

Datei anzeigen

@ -1,11 +1,11 @@
From 381b93978d20e3a2aa75108b6bd18c00dd4152d1 Mon Sep 17 00:00:00 2001
From 5ac0e55838b5e0bf667cc3759af1e2744eea2a2a Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Fri, 28 Nov 2014 00:55:17 -0600
Date: Sat, 7 Mar 2015 20:32:13 -0600
Subject: [PATCH] Configurable cactus and reed natural growth heights
diff --git a/src/main/java/net/minecraft/server/BlockCactus.java b/src/main/java/net/minecraft/server/BlockCactus.java
index d9f6e0b..d0b1bcf 100644
index 488e5c2..ddc2135 100644
--- a/src/main/java/net/minecraft/server/BlockCactus.java
+++ b/src/main/java/net/minecraft/server/BlockCactus.java
@@ -26,7 +26,7 @@ public class BlockCactus extends Block {
@ -13,12 +13,12 @@ index d9f6e0b..d0b1bcf 100644
}
- if (i < 3) {
+ if (i < world.paperSpigotConfig.cactusMaxHeight) { // PaperSpigot - Configurable max growth height for cactus blocks
+ if (i < world.paperSpigotConfig.cactusMaxHeight) { // PaperSpigot - Configurable max growth height for cactus blocks) {
int j = ((Integer) iblockdata.get(BlockCactus.AGE)).intValue();
if (j >= (byte) range(3, (world.growthOdds / world.spigotConfig.cactusModifier * 15) + 0.5F, 15)) { // Spigot
diff --git a/src/main/java/net/minecraft/server/BlockReed.java b/src/main/java/net/minecraft/server/BlockReed.java
index 27b7f81..d04de80 100644
index d00067d..337f2c4 100644
--- a/src/main/java/net/minecraft/server/BlockReed.java
+++ b/src/main/java/net/minecraft/server/BlockReed.java
@@ -25,7 +25,7 @@ public class BlockReed extends Block {
@ -26,17 +26,17 @@ index 27b7f81..d04de80 100644
}
- if (i < 3) {
+ if (i < world.paperSpigotConfig.reedMaxHeight) { // PaperSpigot - Configurable max growth height for reed blocks
+ if (i < world.paperSpigotConfig.reedMaxHeight) { // PaperSpigot - Configurable max growth height for reed blocks) {
int j = ((Integer) iblockdata.get(BlockReed.AGE)).intValue();
if (j >= (byte) range(3, (world.growthOdds / world.spigotConfig.caneModifier * 15) + 0.5F, 15)) { // Spigot
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
index 5cda463..0878ea7 100644
index 2a84879..c8b428c 100644
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
@@ -97,4 +97,13 @@ public class PaperSpigotWorldConfig
playerBlockingDamageMultiplier = getFloat( "player-blocking-damage-multiplier", 0.5F );
log( "Player blocking damage multiplier set to " + playerBlockingDamageMultiplier);
log( "Player blocking damage multiplier set to " + playerBlockingDamageMultiplier );
}
+
+ public int cactusMaxHeight;
@ -45,9 +45,9 @@ index 5cda463..0878ea7 100644
+ {
+ cactusMaxHeight = getInt( "max-growth-height.cactus", 3 );
+ reedMaxHeight = getInt( "max-growth-height.reeds", 3 );
+ log( "Max height for cactus growth " + cactusMaxHeight + ". Max height for reed growth " + reedMaxHeight);
+ log( "Max height for cactus growth " + cactusMaxHeight + ". Max height for reed growth " + reedMaxHeight );
+ }
}
--
1.9.5.msysgit.0
1.9.1

Datei anzeigen

@ -1,25 +1,24 @@
From f372b0402915aab3c5069327ff9e5e0a337a3978 Mon Sep 17 00:00:00 2001
From 3a58172910a843143496837f4de1a5185c337360 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Fri, 28 Nov 2014 01:01:51 -0600
Date: Sat, 7 Mar 2015 20:41:55 -0600
Subject: [PATCH] Configurable baby zombie movement speed
diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java
index 3e6a101..b2d9e67 100644
index 2c0c74c..e915f68 100644
--- a/src/main/java/net/minecraft/server/EntityZombie.java
+++ b/src/main/java/net/minecraft/server/EntityZombie.java
@@ -16,7 +16,8 @@ public class EntityZombie extends EntityMonster {
@@ -16,7 +16,7 @@ public class EntityZombie extends EntityMonster {
protected static final IAttribute b = (new AttributeRanged((IAttribute) null, "zombie.spawnReinforcements", 0.0D, 0.0D, 1.0D)).a("Spawn Reinforcements Chance");
private static final UUID c = UUID.fromString("B9766B59-9566-4402-BC1F-2EE2A276D836");
- private static final AttributeModifier bk = new AttributeModifier(EntityZombie.c, "Baby speed boost", 0.5D, 1);
+ // PaperSpigot - Configurable baby zombie movement speed
+ private static final AttributeModifier bk = new AttributeModifier(EntityZombie.c, "Baby speed boost", org.github.paperspigot.PaperSpigotConfig.babyZombieMovementSpeed, 1);
private final PathfinderGoalBreakDoor bl = new PathfinderGoalBreakDoor(this);
private int bm;
private boolean bn = false;
protected static final IAttribute a = (new AttributeRanged((IAttribute) null, "zombie.spawnReinforcements", 0.0D, 0.0D, 1.0D)).a("Spawn Reinforcements Chance");
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 static final AttributeModifier c = new AttributeModifier(EntityZombie.b, "Baby speed boost", org.github.paperspigot.PaperSpigotConfig.babyZombieMovementSpeed, 1); // PaperSpigot - Configurable baby zombie movement speed
private final PathfinderGoalBreakDoor bm = new PathfinderGoalBreakDoor(this);
private int bn;
private boolean bo = false;
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotConfig.java
index 7ea1617..f4acbb3 100644
index fa41614..c2003a3 100644
--- a/src/main/java/org/github/paperspigot/PaperSpigotConfig.java
+++ b/src/main/java/org/github/paperspigot/PaperSpigotConfig.java
@@ -137,4 +137,10 @@ public class PaperSpigotConfig
@ -30,9 +29,9 @@ index 7ea1617..f4acbb3 100644
+ public static double babyZombieMovementSpeed;
+ private static void babyZombieMovementSpeed()
+ {
+ babyZombieMovementSpeed = getDouble( "settings.baby-zombie-movement-speed", 0.5D); // Player moves at 0.1F, for reference
+ babyZombieMovementSpeed = getDouble( "settings.baby-zombie-movement-speed", 0.5D ); // Player moves at 0.1F, for reference
+ }
}
--
1.9.5.msysgit.0
1.9.1

Datei anzeigen

@ -1,24 +1,25 @@
From 63fd30acfedd9886f2cd0baf86f8d335dd1199e2 Mon Sep 17 00:00:00 2001
From 28494b41113a7159f6ef4c828238c0492225dd89 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 5 Aug 2014 17:39:04 -0500
Date: Sat, 7 Mar 2015 20:46:54 -0600
Subject: [PATCH] Ability to disable asynccatcher
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotConfig.java
index f4acbb3..2cc159b 100644
index c2003a3..57363d5 100644
--- a/src/main/java/org/github/paperspigot/PaperSpigotConfig.java
+++ b/src/main/java/org/github/paperspigot/PaperSpigotConfig.java
@@ -143,4 +143,13 @@ public class PaperSpigotConfig
@@ -143,4 +143,14 @@ public class PaperSpigotConfig
{
babyZombieMovementSpeed = getDouble( "settings.baby-zombie-movement-speed", 0.5D); // Player moves at 0.1F, for reference
babyZombieMovementSpeed = getDouble( "settings.baby-zombie-movement-speed", 0.5D ); // Player moves at 0.1F, for reference
}
+
+ public static boolean asyncCatcherFeature;
+ private static void asyncCatcherFeature()
+ {
+ asyncCatcherFeature = getBoolean( "settings.async-plugin-bad-magic-catcher", true );
+ if (!asyncCatcherFeature) {
+ Bukkit.getLogger().log( Level.INFO, "Disabling async plugin bad ju-ju catcher, this may be bad depending on your plugins" );
+ if ( !asyncCatcherFeature )
+ {
+ Bukkit.getLogger().log( Level.INFO, "Disabling async plugin bad ju-ju catcher, this is not recommended and may cause issues" );
+ }
+ }
}
@ -36,5 +37,5 @@ index 4b3aa85..f7e8d16 100644
public static void catchOp(String reason)
{
--
1.9.5.msysgit.0
1.9.1

Datei anzeigen

@ -1,28 +1,27 @@
From 47f9adf94abdfcb6fefd5a2efbbf3bcb172a2027 Mon Sep 17 00:00:00 2001
From 4be2389b6d3bd729c67031f327b9aaa8612d3838 Mon Sep 17 00:00:00 2001
From: Iceee <andrew@opticgaming.tv>
Date: Fri, 28 Nov 2014 01:21:27 -0600
Date: Sat, 7 Mar 2015 20:49:31 -0600
Subject: [PATCH] Fix redstone lag issues
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index a61655f..34fd259 100644
index 22e4b10..29dcd9e 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -590,6 +590,8 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@@ -598,6 +598,8 @@ public class WorldServer extends World implements IAsyncTaskHandler {
if (i != this.L.size()) {
throw new IllegalStateException("TickNextTick list out of synch");
} else {
+ // PaperSpigot start - Fix redstone lag issues
+ // PaperSpigot start - No, stop doing this, it affects things like redstone
+ /*
if (i > 1000) {
// CraftBukkit start - If the server has too much to process over time, try to alleviate that
if (i > 20 * 1000) {
@@ -598,7 +600,12 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@@ -606,7 +608,11 @@ public class WorldServer extends World implements IAsyncTaskHandler {
i = 1000;
}
// CraftBukkit end
+ } */
+
+ */
+ if (i > 10000) {
+ i = 10000;
}
@ -31,5 +30,5 @@ index a61655f..34fd259 100644
this.methodProfiler.a("cleaning");
--
1.9.5.msysgit.0
1.9.1

Datei anzeigen

@ -1,31 +1,31 @@
From 62b4352fcbd5d30e516fa3f016beaee2bf5b860f Mon Sep 17 00:00:00 2001
From 0d6c8bb4db762171aa4466e1d26a2b285fdc23df Mon Sep 17 00:00:00 2001
From: T00thpick1 <t00thpick1dirko@gmail.com>
Date: Fri, 28 Nov 2014 01:25:45 -0600
Date: Sat, 7 Mar 2015 20:54:33 -0600
Subject: [PATCH] Do not remove player in world change
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 7466eec..9e9bccf 100644
index c7d26ce..d93b00c 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -474,7 +474,7 @@ public abstract class PlayerList {
@@ -507,7 +507,7 @@ public abstract class PlayerList {
entityplayer.u().getTracker().untrackPlayer(entityplayer);
// entityplayer.u().getTracker().untrackEntity(entityplayer); // CraftBukkit
entityplayer.u().getPlayerChunkMap().removePlayer(entityplayer);
- this.players.remove(entityplayer);
+ // this.players.remove(entityplayer); // PaperSpigot - Fixes BUKKIT-4561, BUKKIT-4082, and BUKKIT-2094
+ //this.players.remove(entityplayer); // PaperSpigot - Don't remove player in world change. Fixes BUKKIT-4561, BUKKIT-4082, and BUKKIT-2094
this.server.getWorldServer(entityplayer.dimension).removeEntity(entityplayer);
BlockPosition blockposition = entityplayer.getBed();
boolean flag1 = entityplayer.isRespawnForced();
@@ -568,7 +568,7 @@ public abstract class PlayerList {
@@ -601,7 +601,7 @@ public abstract class PlayerList {
if (!entityplayer.playerConnection.isDisconnected()) {
worldserver.getPlayerChunkMap().addPlayer(entityplayer1);
worldserver.addEntity(entityplayer1);
- this.players.add(entityplayer1);
+ //this.players.add(entityplayer1); // PaperSpigot - Fixes BUKKIT-4561, BUKKIT-4082, and BUKKIT-2094
this.f.put(entityplayer1.getUniqueID(), entityplayer1);
- worldserver.addEntity(entityplayer1);
+ //worldserver.addEntity(entityplayer1); // PaperSpigot - Don't remove player in world change. Fixes BUKKIT-4561, BUKKIT-4082, and BUKKIT-2094
this.players.add(entityplayer1);
this.j.put(entityplayer1.getUniqueID(), entityplayer1);
}
// Added from changeDimension
--
2.2.2
1.9.1

Datei anzeigen

@ -1,30 +1,29 @@
From 2cd548a4147654425d101a8a112cc59fe6f9314d Mon Sep 17 00:00:00 2001
From 0ecae352d8b5b7e106d8473acb4677f553bcc50c Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Fri, 28 Nov 2014 01:29:35 -0600
Date: Sat, 7 Mar 2015 21:00:13 -0600
Subject: [PATCH] Configurable fishing time ranges
diff --git a/src/main/java/net/minecraft/server/EntityFishingHook.java b/src/main/java/net/minecraft/server/EntityFishingHook.java
index b1a6daf..e94c4c7 100644
index c2bfb1f..28d698d 100644
--- a/src/main/java/net/minecraft/server/EntityFishingHook.java
+++ b/src/main/java/net/minecraft/server/EntityFishingHook.java
@@ -324,7 +324,8 @@ public class EntityFishingHook extends Entity {
this.av = MathHelper.nextInt(this.random, 20, 80);
@@ -331,7 +331,7 @@ public class EntityFishingHook extends Entity {
this.ax = MathHelper.nextInt(this.random, 20, 80);
}
} else {
- this.au = MathHelper.nextInt(this.random, 100, 900);
+ // PaperSpigot - Configurable fishing tick range
+ this.au = MathHelper.nextInt(this.random, this.world.paperSpigotConfig.fishingMinTicks, this.world.paperSpigotConfig.fishingMaxTicks);
this.au -= EnchantmentManager.h(this.owner) * 20 * 5;
- this.aw = MathHelper.nextInt(this.random, 100, 900);
+ this.aw = MathHelper.nextInt(this.random, this.world.paperSpigotConfig.fishingMinTicks, this.world.paperSpigotConfig.fishingMaxTicks); // PaperSpigot - Configurable fishing tick range
this.aw -= EnchantmentManager.h(this.owner) * 20 * 5;
}
}
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
index 0878ea7..b67b856 100644
index c8b428c..1d8448c 100644
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
@@ -106,4 +106,12 @@ public class PaperSpigotWorldConfig
reedMaxHeight = getInt( "max-growth-height.reeds", 3 );
log( "Max height for cactus growth " + cactusMaxHeight + ". Max height for reed growth " + reedMaxHeight);
log( "Max height for cactus growth " + cactusMaxHeight + ". Max height for reed growth " + reedMaxHeight );
}
+
+ public int fishingMinTicks;
@ -36,5 +35,5 @@ index 0878ea7..b67b856 100644
+ }
}
--
1.9.5.msysgit.0
1.9.1

Datei anzeigen

@ -1,11 +1,11 @@
From d31ec5cfef234a997563a3c58639f8bd6830bfdf Mon Sep 17 00:00:00 2001
From e9811e3e812eb16f55045df9e643d1dc302d7a1c Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Sun, 29 Jun 2014 13:32:36 -0500
Date: Sat, 7 Mar 2015 21:03:06 -0600
Subject: [PATCH] Allow nerfed mobs to jump
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
index 214c0ca..196b45a 100644
index 134897a..b580217 100644
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
@@ -454,6 +454,12 @@ public abstract class EntityInsentient extends EntityLiving {
@ -22,5 +22,5 @@ index 214c0ca..196b45a 100644
}
// Spigot End
--
1.9.5.msysgit.0
1.9.1

Datei anzeigen

@ -1,14 +1,14 @@
From 0f98d5f5793dde56cee3130d5d418e28d2412fdb Mon Sep 17 00:00:00 2001
From c153d5c158a9b9f8c11469555ac1fc8967dea55d Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Fri, 28 Nov 2014 01:33:25 -0600
Date: Sat, 7 Mar 2015 21:07:10 -0600
Subject: [PATCH] Toggle for player interact limiter
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index a09e793..a7c629b 100644
index 7f5044d..a5f86d3 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -626,7 +626,8 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
@@ -636,7 +636,8 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
PlayerConnectionUtils.ensureMainThread(packetplayinblockplace, this, this.player.u());
WorldServer worldserver = this.minecraftServer.getWorldServer(this.player.dimension);
boolean throttled = false;
@ -19,11 +19,11 @@ index a09e793..a7c629b 100644
} else if ( packetplayinblockplace.timestamp - lastPlace >= 30 || lastPlace == -1 )
{
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotConfig.java
index 2cc159b..25a94a6 100644
index bff794a..02c4004 100644
--- a/src/main/java/org/github/paperspigot/PaperSpigotConfig.java
+++ b/src/main/java/org/github/paperspigot/PaperSpigotConfig.java
@@ -152,4 +152,13 @@ public class PaperSpigotConfig
Bukkit.getLogger().log( Level.INFO, "Disabling async plugin bad ju-ju catcher, this may be bad depending on your plugins" );
@@ -153,4 +153,14 @@ public class PaperSpigotConfig
Bukkit.getLogger().log( Level.INFO, "Disabling async plugin bad ju-ju catcher, this is not recommended and may cause issues" );
}
}
+
@ -31,11 +31,12 @@ index 2cc159b..25a94a6 100644
+ private static void interactLimitEnabled()
+ {
+ interactLimitEnabled = getBoolean( "settings.limit-player-interactions", true );
+ if (!interactLimitEnabled) {
+ if ( !interactLimitEnabled )
+ {
+ Bukkit.getLogger().log( Level.INFO, "Disabling player interaction limiter, your server may be more vulnerable to malicious users" );
+ }
+ }
}
--
1.9.5.msysgit.0
1.9.1

Datei anzeigen

@ -1,27 +1,27 @@
From 3a70598613bfb2b290ff383bd1f0a91fc012c4e0 Mon Sep 17 00:00:00 2001
From ec63672d6c3a3879d5ddaefb117a3310961478ee Mon Sep 17 00:00:00 2001
From: gsand <gsandowns@gmail.com>
Date: Fri, 28 Nov 2014 01:41:54 -0600
Date: Sat, 7 Mar 2015 21:35:14 -0600
Subject: [PATCH] Player Exhaustion Multipliers
diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java
index 9a19752..32d678d 100644
index 66e099f..df7e8e8 100644
--- a/src/main/java/net/minecraft/server/Block.java
+++ b/src/main/java/net/minecraft/server/Block.java
@@ -525,7 +525,7 @@ public class Block {
@@ -566,7 +566,7 @@ public class Block {
public void a(World world, EntityHuman entityhuman, BlockPosition blockposition, IBlockData iblockdata, TileEntity tileentity) {
entityhuman.b(StatisticList.MINE_BLOCK_COUNT[getId(this)]);
- entityhuman.applyExhaustion(0.025F);
+ entityhuman.applyExhaustion(world.paperSpigotConfig.blockBreakExhaustion); // PaperSpigot - Configurable block break exhaustion
if (this.G() && EnchantmentManager.hasSilkTouchEnchantment(entityhuman)) {
if (this.I() && EnchantmentManager.hasSilkTouchEnchantment(entityhuman)) {
ItemStack itemstack = this.i(iblockdata);
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index 876cf4e..2bc2ef6 100644
index 9dce3ac..e7fd331 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -1371,13 +1371,13 @@ public abstract class EntityHuman extends EntityLiving {
@@ -1370,13 +1370,13 @@ public abstract class EntityHuman extends EntityLiving {
i = Math.round(MathHelper.sqrt(d0 * d0 + d1 * d1 + d2 * d2) * 100.0F);
if (i > 0) {
this.a(StatisticList.p, i);
@ -35,10 +35,10 @@ index 876cf4e..2bc2ef6 100644
- this.applyExhaustion(0.015F * (float) i * 0.01F);
+ this.applyExhaustion(world.paperSpigotConfig.playerSwimmingExhaustion * (float) i * 0.01F); // PaperSpigot - Configurable swimming (diving) exhaustion
}
} else if (this.j_()) {
} else if (this.k_()) {
if (d1 > 0.0D) {
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
index b67b856..1b8683a 100644
index b7afd3e..ac2f470 100644
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
@@ -114,4 +114,12 @@ public class PaperSpigotWorldConfig
@ -48,12 +48,12 @@ index b67b856..1b8683a 100644
+
+ public float blockBreakExhaustion;
+ public float playerSwimmingExhaustion;
+ private void exhaustionValues ()
+ private void exhaustionValues()
+ {
+ blockBreakExhaustion = getFloat( "player-exhaustion.block-break", 0.025F );
+ playerSwimmingExhaustion = getFloat("player-exhaustion.swimming", 0.015F );
+ playerSwimmingExhaustion = getFloat( "player-exhaustion.swimming", 0.015F );
+ }
}
--
1.9.5.msysgit.0
1.9.1

Datei anzeigen

@ -1,11 +1,11 @@
From 149b5f2a1899cf88e34c194342b625fbc7f54eac Mon Sep 17 00:00:00 2001
From 288bc1583961b89530659d9e968bac8fea1cb02e Mon Sep 17 00:00:00 2001
From: Suddenly <suddenly@suddenly.coffee>
Date: Fri, 28 Nov 2014 01:49:53 -0600
Date: Sat, 7 Mar 2015 21:40:48 -0600
Subject: [PATCH] Add configurable despawn distances for living entities
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
index 196b45a..71d4249 100644
index b580217..4f49ed0 100644
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
@@ -432,13 +432,13 @@ public abstract class EntityInsentient extends EntityLiving {
@ -17,30 +17,21 @@ index 196b45a..71d4249 100644
this.die();
}
- if (this.aO > 600 && this.random.nextInt(800) == 0 && d3 > 1024.0D) { // CraftBukkit - remove isTypeNotPersistent() check
+ if (this.aO > 600 && this.random.nextInt(800) == 0 && d3 > this.world.paperSpigotConfig.softDespawnDistance) { // CraftBukkit - remove isTypeNotPersistent() check // PaperSpigot - custom despawn distances
- if (this.ticksFarFromPlayer > 600 && this.random.nextInt(800) == 0 && d3 > 1024.0D) { // CraftBukkit - remove isTypeNotPersistent() check
+ if (this.ticksFarFromPlayer > 600 && this.random.nextInt(800) == 0 && d3 > this.world.paperSpigotConfig.softDespawnDistance) { // CraftBukkit - remove isTypeNotPersistent() check // PaperSpigot - custom despawn distance
this.die();
- } else if (d3 < 1024.0D) {
+ } else if (d3 < this.world.paperSpigotConfig.softDespawnDistance) { // PaperSpigot - custom despawn distances
this.aO = 0;
this.ticksFarFromPlayer = 0;
}
}
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
index 1b8683a..522a214 100644
index ac2f470..0bdfa44 100644
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
@@ -103,7 +103,7 @@ public class PaperSpigotWorldConfig
private void blockGrowthHeight()
{
cactusMaxHeight = getInt( "max-growth-height.cactus", 3 );
- reedMaxHeight = getInt( "max-growth-height.reeds", 3 );
+ reedMaxHeight = getInt("max-growth-height.reeds", 3);
log( "Max height for cactus growth " + cactusMaxHeight + ". Max height for reed growth " + reedMaxHeight);
}
@@ -122,4 +122,21 @@ public class PaperSpigotWorldConfig
blockBreakExhaustion = getFloat( "player-exhaustion.block-break", 0.025F );
playerSwimmingExhaustion = getFloat("player-exhaustion.swimming", 0.015F );
playerSwimmingExhaustion = getFloat( "player-exhaustion.swimming", 0.015F );
}
+
+ public int softDespawnDistance;
@ -50,7 +41,7 @@ index 1b8683a..522a214 100644
+ softDespawnDistance = getInt( "despawn-ranges.soft", 32 ); // 32^2 = 1024, Minecraft Default
+ hardDespawnDistance = getInt( "despawn-ranges.hard", 128 ); // 128^2 = 16384, Minecraft Default;
+
+ if ( softDespawnDistance > hardDespawnDistance) {
+ if ( softDespawnDistance > hardDespawnDistance ) {
+ softDespawnDistance = hardDespawnDistance;
+ }
+
@ -61,5 +52,5 @@ index 1b8683a..522a214 100644
+ }
}
--
1.9.5.msysgit.0
1.9.1

Datei anzeigen

@ -1,23 +1,23 @@
From da87cfffb5d8d8c4d73a35760ededba300fc1c2c Mon Sep 17 00:00:00 2001
From 2b22e3d08ec2571481e97963d548e3c7a0c854d7 Mon Sep 17 00:00:00 2001
From: Dmck2b <itallhappenedverysuddenly@gmail.com>
Date: Fri, 28 Nov 2014 01:53:14 -0600
Date: Sat, 7 Mar 2015 21:50:40 -0600
Subject: [PATCH] Allow for toggling of spawn chunks
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index f85700f..60cdf2e 100644
index 4838e84..3523abf 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -219,6 +219,7 @@ public abstract class World implements IBlockAccess {
this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns(); // CraftBukkit
this.ticksPerMonsterSpawns = this.getServer().getTicksPerMonsterSpawns(); // CraftBukkit
@@ -230,6 +230,7 @@ public abstract class World implements IBlockAccess {
});
this.getServer().addWorld(this.world);
// CraftBukkit end
+ this.keepSpawnInMemory = this.paperSpigotConfig.keepSpawnInMemory; // PaperSpigot
// Spigot start
this.chunkTickRadius = (byte) ( ( this.getServer().getViewDistance() < 7 ) ? this.getServer().getViewDistance() : 7 );
this.chunkTickList = new gnu.trove.map.hash.TLongShortHashMap( spigotConfig.chunksPerTick * 5, 0.7f, Long.MIN_VALUE, Short.MIN_VALUE );
timings = new SpigotTimings.WorldTimingsHandler(this); // Spigot - code below can generate new world and access timings
this.entityLimiter = new org.spigotmc.TickLimiter(spigotConfig.entityMaxTickTime);
this.tileLimiter = new org.spigotmc.TickLimiter(spigotConfig.tileMaxTickTime);
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
index 522a214..00303dc 100644
index 7ad9bb3..8d707f7 100644
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
@@ -139,4 +139,11 @@ public class PaperSpigotWorldConfig
@ -33,5 +33,5 @@ index 522a214..00303dc 100644
+ }
}
--
1.9.5.msysgit.0
1.9.1

Datei anzeigen

@ -1,12 +1,12 @@
From a0cbd2c7aa88d123844823389a1542ebb9f3851e Mon Sep 17 00:00:00 2001
From 1926d5b0e32bea76d0dc80f0ff385a308e99265d Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net>
Date: Fri, 28 Nov 2014 02:03:43 -0600
Date: Sat, 7 Mar 2015 22:03:47 -0600
Subject: [PATCH] Drop falling block entities that are above the specified
height
diff --git a/src/main/java/net/minecraft/server/EntityFallingBlock.java b/src/main/java/net/minecraft/server/EntityFallingBlock.java
index fd78677..81a5dc9 100644
index ce91553..ef93776 100644
--- a/src/main/java/net/minecraft/server/EntityFallingBlock.java
+++ b/src/main/java/net/minecraft/server/EntityFallingBlock.java
@@ -69,6 +69,17 @@ public class EntityFallingBlock extends Entity {
@ -28,10 +28,10 @@ index fd78677..81a5dc9 100644
this.motY *= 0.9800000190734863D;
this.motZ *= 0.9800000190734863D;
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
index 00303dc..4b384bf 100644
index b740016..4cf8676 100644
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
@@ -146,4 +146,13 @@ public class PaperSpigotWorldConfig
@@ -146,4 +146,14 @@ public class PaperSpigotWorldConfig
keepSpawnInMemory = getBoolean( "keep-spawn-loaded", true );
log( "Keep spawn chunk loaded: " + keepSpawnInMemory );
}
@ -40,11 +40,12 @@ index 00303dc..4b384bf 100644
+ private void fallingBlockheightNerf()
+ {
+ fallingBlockHeightNerf = getInt( "falling-block-height-nerf", 0 );
+ if (fallingBlockHeightNerf != 0) {
+ log( "Falling Block Height Limit set to Y: " + fallingBlockHeightNerf);
+ if ( fallingBlockHeightNerf != 0 )
+ {
+ log( "Falling Block Height Limit set to Y: " + fallingBlockHeightNerf );
+ }
+ }
}
--
1.9.5.msysgit.0
1.9.1

Datei anzeigen

@ -1,11 +1,11 @@
From 54b9feb9bc83830fb78462796e18eef583566b32 Mon Sep 17 00:00:00 2001
From 0c31964584bae44bf1ebae9887513715c45f2d3d Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net>
Date: Fri, 28 Nov 2014 02:31:02 -0600
Date: Sat, 7 Mar 2015 22:17:03 -0600
Subject: [PATCH] Configurable speed for water flowing over lava
diff --git a/src/main/java/net/minecraft/server/BlockFlowing.java b/src/main/java/net/minecraft/server/BlockFlowing.java
index 5184715..bc4cee5 100644
index 842a27a..449b12f 100644
--- a/src/main/java/net/minecraft/server/BlockFlowing.java
+++ b/src/main/java/net/minecraft/server/BlockFlowing.java
@@ -35,7 +35,7 @@ public class BlockFlowing extends BlockFluids {
@ -17,7 +17,7 @@ index 5184715..bc4cee5 100644
int k;
if (i > 0) {
@@ -259,8 +259,23 @@ public class BlockFlowing extends BlockFluids {
@@ -259,8 +259,22 @@ public class BlockFlowing extends BlockFluids {
public void onPlace(World world, BlockPosition blockposition, IBlockData iblockdata) {
if (!this.e(world, blockposition, iblockdata)) {
@ -32,7 +32,6 @@ index 5184715..bc4cee5 100644
+ */
+ public int getFlowSpeed(World world, BlockPosition blockposition) {
+ if (this.getMaterial() == Material.WATER && (
+ // TODO: Double check that this does what I think it does
+ world.getType(blockposition.north(1)).getBlock().getMaterial() == Material.LAVA ||
+ world.getType(blockposition.south(1)).getBlock().getMaterial() == Material.LAVA ||
+ world.getType(blockposition.west(1)).getBlock().getMaterial() == Material.LAVA ||
@ -43,11 +42,11 @@ index 5184715..bc4cee5 100644
+ }
}
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
index 4b384bf..3b55750 100644
index 4cf8676..e415e15 100644
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
@@ -155,4 +155,11 @@ public class PaperSpigotWorldConfig
log( "Falling Block Height Limit set to Y: " + fallingBlockHeightNerf);
@@ -156,4 +156,11 @@ public class PaperSpigotWorldConfig
log( "Falling Block Height Limit set to Y: " + fallingBlockHeightNerf );
}
}
+
@ -59,5 +58,5 @@ index 4b384bf..3b55750 100644
+ }
}
--
1.9.5.msysgit.0
1.9.1

Datei anzeigen

@ -1,28 +1,28 @@
From 2562f17c456e63f56623f6d936a4bc4cb762892f Mon Sep 17 00:00:00 2001
From 531e69345a9a1546a0a517891ba5cf0df3ecd9c5 Mon Sep 17 00:00:00 2001
From: Jedediah Smith <jedediah@silencegreys.com>
Date: Fri, 28 Nov 2014 03:31:21 -0600
Date: Sat, 7 Mar 2015 22:52:21 -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 2bc2ef6..0199856 100644
index e7fd331..4aa8096 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -61,6 +61,7 @@ public abstract class EntityHuman extends EntityLiving {
private final GameProfile bF;
private boolean bG = false;
private final GameProfile bH;
private boolean bI = false;
public EntityFishingHook hookedFish;
+ public boolean affectsSpawning = true; // PaperSpigot
// 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 71d4249..438ec3b 100644
index 4f49ed0..c0d1c13 100644
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
@@ -424,7 +424,7 @@ public abstract class EntityInsentient extends EntityLiving {
if (this.persistent) {
this.aO = 0;
this.ticksFarFromPlayer = 0;
} else {
- EntityHuman entityhuman = this.world.findNearbyPlayer(this, -1.0D);
+ EntityHuman entityhuman = this.world.findNearbyPlayerWhoAffectsSpawning(this, -1.0D); // PaperSpigot - Affects Spawning API
@ -30,21 +30,20 @@ index 71d4249..438ec3b 100644
if (entityhuman != null) {
double d0 = entityhuman.locX - this.locX;
diff --git a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
index 67273f7..3571ead 100644
index df71db5..00754cd 100644
--- a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
+++ b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
@@ -52,7 +52,8 @@ public abstract class MobSpawnerAbstract {
@@ -52,7 +52,7 @@ public abstract class MobSpawnerAbstract {
private boolean g() {
BlockPosition blockposition = this.b();
- return this.a().isPlayerNearby((double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D, (double) this.requiredPlayerRange);
+ // PaperSpigot - Affects Spawning API
+ return this.a().isPlayerNearbyWhoAffectsSpawning((double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D, (double) this.requiredPlayerRange);
+ return this.a().isPlayerNearbyWhoAffectsSpawning((double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D, (double) this.requiredPlayerRange); // PaperSpigot - Affects Spawning API
}
public void c() {
diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java
index 43954b3..932a572 100644
index aeb0a44..7df5b84 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 {
@ -56,49 +55,54 @@ index 43954b3..932a572 100644
int l = MathHelper.floor(entityhuman.locX / 16.0D);
j = MathHelper.floor(entityhuman.locZ / 16.0D);
@@ -156,7 +156,8 @@ public final class SpawnerCreature {
@@ -156,7 +156,7 @@ public final class SpawnerCreature {
float f = (float) j3 + 0.5F;
float f1 = (float) l3 + 0.5F;
- if (!worldserver.isPlayerNearby((double) f, (double) k3, (double) f1, 24.0D) && blockposition.c((double) f, (double) k3, (double) f1) >= 576.0D) {
+ // PaperSpigot - Affects Spawning API
+ if (!worldserver.isPlayerNearbyWhoAffectsSpawning((double) f, (double) k3, (double) f1, 24.0D) && blockposition.c((double) f, (double) k3, (double) f1) >= 576.0D) {
if (biomemeta == null) {
biomemeta = worldserver.a(enumcreaturetype, blockposition2);
if (biomemeta == null) {
+ if (!worldserver.isPlayerNearbyWhoAffectsSpawning((double) f, (double) k3, (double) f1, 24.0D) && blockposition.c((double) f, (double) k3, (double) f1) >= 576.0D) { // PaperSpigot - Affects Spawning API
if (biomebase_biomemeta == null) {
biomebase_biomemeta = worldserver.a(enumcreaturetype, blockposition2);
if (biomebase_biomemeta == null) {
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 76da3e6..4e1d779 100644
index 3523abf..d8464b2 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -2,14 +2,13 @@ package net.minecraft.server;
@@ -3119,4 +3119,50 @@ public abstract class World implements IBlockAccess {
import com.google.common.base.Predicate;
import com.google.common.collect.Lists;
-import com.google.common.collect.Sets;
+
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import java.util.Random;
-import java.util.Set;
import java.util.UUID;
import java.util.concurrent.Callable;
@@ -17,7 +16,6 @@ import java.util.concurrent.Callable;
import org.bukkit.Bukkit;
import org.bukkit.block.BlockState;
import org.bukkit.craftbukkit.util.CraftMagicNumbers;
-import org.bukkit.craftbukkit.util.LongHashSet;
import org.bukkit.craftbukkit.SpigotTimings; // Spigot
import org.bukkit.generator.ChunkGenerator;
import org.bukkit.craftbukkit.CraftServer;
@@ -2770,6 +2768,50 @@ public abstract class World implements IBlockAccess {
return false;
return k >= -short0 && k <= short0 && l >= -short0 && l <= short0 && this.keepSpawnInMemory; // CraftBukkit - Added 'this.keepSpawnInMemory'
}
+ // PaperSpigot start - Affects spawning API
+
+ // PaperSpigot start - Modified methods for affects spawning
+ public EntityHuman findNearbyPlayerWhoAffectsSpawning(Entity entity, double d0) {
+ return this.findNearbyPlayerWhoAffectsSpawning(entity.locX, entity.locY, entity.locZ, d0);
+ }
+
+ public EntityHuman findNearbyPlayerWhoAffectsSpawning(double d0, double d1, double d2, double d3) {
+ double d4 = -1.0D;
+ EntityHuman entityhuman = null;
+
+ for (int i = 0; i < this.players.size(); ++i) {
+ EntityHuman entityhuman1 = (EntityHuman) this.players.get(i);
+ // CraftBukkit start - Fixed an NPE
+ if (entityhuman1 == null || entityhuman1.dead || !entityhuman1.affectsSpawning) {
+ continue;
+ }
+ // CraftBukkit end
+
+ if (IEntitySelector.d.apply(entityhuman1)) {
+ double d5 = entityhuman1.e(d0, d1, d2);
+
+ if ((d3 < 0.0D || d5 < d3 * d3) && (d4 == -1.0D || d5 < d4)) {
+ d4 = d5;
+ entityhuman = entityhuman1;
+ }
+ }
+ }
+
+ return entityhuman;
+ }
+
+ public boolean isPlayerNearbyWhoAffectsSpawning(double d0, double d1, double d2, double d3) {
+ for (int i = 0; i < this.players.size(); ++i) {
+ EntityHuman entityhuman = (EntityHuman) this.players.get(i);
@ -114,58 +118,30 @@ index 76da3e6..4e1d779 100644
+
+ return false;
+ }
+
+ public EntityHuman findNearbyPlayerWhoAffectsSpawning(Entity entity, double radius) {
+ return this.findNearbyPlayerWhoAffectsSpawning(entity.locX, entity.locY, entity.locZ, radius);
+ }
+
+ public EntityHuman findNearbyPlayerWhoAffectsSpawning(double x, double y, double z, double radius) {
+ double nearestRadius = - 1.0D;
+ EntityHuman entityHuman = null;
+
+ for (int i = 0; i < this.players.size(); ++i) {
+ EntityHuman nearestPlayer = (EntityHuman) this.players.get(i);
+
+ if (nearestPlayer == null || nearestPlayer.dead || !nearestPlayer.affectsSpawning) {
+ continue;
+ }
+
+ double distance = nearestPlayer.e(x, y, z);
+
+ if ((radius < 0.0D || distance < radius * radius) && (nearestRadius == -1.0D || distance < nearestRadius)) {
+ nearestRadius = distance;
+ entityHuman = nearestPlayer;
+ }
+ }
+
+ return entityHuman;
+ }
+ // PaperSpigot end
+
public EntityHuman a(String s) {
for (int i = 0; i < this.players.size(); ++i) {
EntityHuman entityhuman = (EntityHuman) this.players.get(i);
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index c81d5d2..942a6ab 100644
index 8091b4e..571e066 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1443,6 +1443,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1443,6 +1443,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
packet.components = components;
getHandle().playerConnection.sendPacket(packet);
}
+
+ // PaperSpigot start - Add affects spawning API
+ public void setAffectsSpawning(boolean affects) {
+ getHandle().affectsSpawning = affects;
+ }
+
+ // PaperSpigot start - Implement affects spawning API
+ @Override
+ public boolean getAffectsSpawning() {
+ return getHandle().affectsSpawning;
+ }
+
+ @Override
+ public void setAffectsSpawning(boolean affects) {
+ getHandle().affectsSpawning = affects;
+ }
+ // PaperSpigot end
};
public Player.Spigot spigot()
--
1.9.5.msysgit.0
1.9.1

Datei anzeigen

@ -1,15 +1,15 @@
From 8a53e3c8579c132d53f8d85f5fc2df322450374f Mon Sep 17 00:00:00 2001
From c655d292ef72c3ba8482b9579f0bd498f43604ee Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 19 Aug 2014 14:21:37 -0500
Date: Sat, 7 Mar 2015 22:55:25 -0600
Subject: [PATCH] Show 'PaperSpigot' in client crashes, server lists, and
Mojang stats
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 7e91511..fbc2e61 100644
index e211647..ac8d1a7 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1060,7 +1060,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs
@@ -1018,7 +1018,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
}
public String getServerModName() {
@ -19,5 +19,5 @@ index 7e91511..fbc2e61 100644
public CrashReport b(CrashReport crashreport) {
--
1.9.5.msysgit.0
1.9.1

Datei anzeigen

@ -1,6 +1,6 @@
From f0a774c60ae25b1dfec79c60c95843f5d3418982 Mon Sep 17 00:00:00 2001
From dc843ffc9374210bbdbef3871117c59e8aa2cf2e Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 19 Aug 2014 14:25:40 -0500
Date: Sat, 7 Mar 2015 22:57:07 -0600
Subject: [PATCH] RIP metrics
@ -687,5 +687,5 @@ index c03388d..eeb1aec 100644
static void readConfig(Class<?> clazz, Object instance)
--
1.9.5.msysgit.0
1.9.1

Datei anzeigen

@ -1,30 +1,30 @@
From d9c73f504f132d34904c1445fa9391823b96c3d3 Mon Sep 17 00:00:00 2001
From 5b559214f1d5f55103d9e166d05e8e19abe6c3f7 Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net>
Date: Fri, 28 Nov 2014 03:43:14 -0600
Date: Sun, 8 Mar 2015 01:06:14 -0600
Subject: [PATCH] Remove invalid mob spawner tile entities
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index b76b446..2d99252 100644
index 5794345..76b0e65 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -756,6 +756,11 @@ public class Chunk {
this.world.triggerHoppersList.add(tileentity);
}
// Spigot end
+ // PaperSpigot start - Remove invalid mob spawner Tile Entities
@@ -776,6 +776,11 @@ public class Chunk {
tileentity.D();
this.tileEntities.put(blockposition, tileentity);
// CraftBukkit start
+ // PaperSpigot start - Remove invalid mob spawner tile entities
+ } else if (this.world.paperSpigotConfig.removeInvalidMobSpawnerTEs && tileentity instanceof TileEntityMobSpawner &&
+ org.bukkit.craftbukkit.util.CraftMagicNumbers.getMaterial(getType(blockposition)) != org.bukkit.Material.MOB_SPAWNER) {
+ this.tileEntities.remove(blockposition);
+ // PaperSpigot end
// CraftBukkit start
} else {
System.out.println("Attempted to place a tile entity (" + tileentity + ") at " + tileentity.position.getX() + "," + tileentity.position.getY() + "," + tileentity.position.getZ()
+ " (" + org.bukkit.craftbukkit.util.CraftMagicNumbers.getMaterial(getType(blockposition)) + ") where there was no entity tile!");
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
index 3b55750..59a9387 100644
index 41a80da..31dedce 100644
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
@@ -162,4 +162,11 @@ public class PaperSpigotWorldConfig
@@ -163,4 +163,11 @@ public class PaperSpigotWorldConfig
waterOverLavaFlowSpeed = getInt( "water-over-lava-flow-speed", 5 );
log( "Water over lava flow speed: " + waterOverLavaFlowSpeed );
}
@ -37,5 +37,5 @@ index 3b55750..59a9387 100644
+ }
}
--
1.9.5.msysgit.0
1.9.1

Datei anzeigen

@ -1,18 +1,18 @@
From 6592278669315ae213de6950d84a5adb7a01456f Mon Sep 17 00:00:00 2001
From aa360f67f1544600d0efc94ae896e6e328abd1de Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 28 Nov 2014 04:14:14 -0600
Date: Sun, 8 Mar 2015 01:56:22 -0600
Subject: [PATCH] Optimize TileEntity Ticking
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
index 7cf38ea..76cdc7e 100644
index a829555..2118c08 100644
--- a/src/main/java/net/minecraft/server/TileEntity.java
+++ b/src/main/java/net/minecraft/server/TileEntity.java
@@ -56,6 +56,12 @@ public abstract class TileEntity {
}
// Spigot end
@@ -21,6 +21,12 @@ public abstract class TileEntity {
private int h;
protected Block e;
+ // PaperSpigot start - Optimized TileEntity Tick changes
+ // PaperSpigot start - Optimized TileEntity tick changes
+ private static int tileEntityCounter = 0;
+ public boolean isAdded = false;
+ public int tileId = tileEntityCounter++;
@ -22,7 +22,7 @@ index 7cf38ea..76cdc7e 100644
this.position = BlockPosition.ZERO;
this.h = -1;
diff --git a/src/main/java/net/minecraft/server/TileEntityBeacon.java b/src/main/java/net/minecraft/server/TileEntityBeacon.java
index 6bfde41..35d82ab 100644
index da43134..88e4fa9 100644
--- a/src/main/java/net/minecraft/server/TileEntityBeacon.java
+++ b/src/main/java/net/minecraft/server/TileEntityBeacon.java
@@ -48,7 +48,7 @@ public class TileEntityBeacon extends TileEntityContainer implements IUpdatePlay
@ -30,25 +30,25 @@ index 6bfde41..35d82ab 100644
public void c() {
- if (this.world.getTime() % 80L == 0L) {
+ if (true || this.world.getTime() % 80L == 0L) { // PaperSpigot - controlled by Improved Tick Handling
+ if (true || this.world.getTime() % 80L == 0L) { // PaperSpigot - Controlled by improved tick handling
this.m();
}
diff --git a/src/main/java/net/minecraft/server/TileEntityChest.java b/src/main/java/net/minecraft/server/TileEntityChest.java
index 7444f4f..0f29365 100644
index a2bd9e1..8af9e32 100644
--- a/src/main/java/net/minecraft/server/TileEntityChest.java
+++ b/src/main/java/net/minecraft/server/TileEntityChest.java
@@ -246,7 +246,7 @@ public class TileEntityChest extends TileEntityContainer implements IUpdatePlaye
++this.n;
float f;
- if (!this.world.isStatic && this.l != 0 && (this.n + i + j + k) % 200 == 0) {
+ if (!this.world.isStatic && this.l != 0 && (this.n + i + j + k) % 10 == 0) { // PaperSpigot Reduced 200 -> 10 interval due to reduced tick rate from Improved Tick Handling
- if (!this.world.isClientSide && this.l != 0 && (this.n + i + j + k) % 200 == 0) {
+ if (!this.world.isClientSide && this.l != 0 && (this.n + i + j + k) % 10 == 0) { // PaperSpigot - Reduced 200 -> 10 due to reduced interval from improved tick handling
this.l = 0;
f = 5.0F;
List list = this.world.a(EntityHuman.class, new AxisAlignedBB((double) ((float) i - f), (double) ((float) j - f), (double) ((float) k - f), (double) ((float) (i + 1) + f), (double) ((float) (j + 1) + f), (double) ((float) (k + 1) + f)));
diff --git a/src/main/java/net/minecraft/server/TileEntityEnderChest.java b/src/main/java/net/minecraft/server/TileEntityEnderChest.java
index 794cdc8..218b801 100644
index 794cdc8..f712885 100644
--- a/src/main/java/net/minecraft/server/TileEntityEnderChest.java
+++ b/src/main/java/net/minecraft/server/TileEntityEnderChest.java
@@ -10,7 +10,7 @@ public class TileEntityEnderChest extends TileEntity implements IUpdatePlayerLis
@ -56,64 +56,51 @@ index 794cdc8..218b801 100644
public void c() {
- if (++this.h % 20 * 4 == 0) {
+ if (++this.h % 4 == 0) { // PaperSpigot Reduced (20 * 4) -> 4 interval due to reduced tick rate from Improved Tick Handling
+ if (++this.h % 4 == 0) { // PaperSpigot - Reduced (20 * 4) -> 4 interval due to reduced tick rate from improved tick handling
this.world.playBlockAction(this.position, Blocks.ENDER_CHEST, 1, this.g);
}
diff --git a/src/main/java/net/minecraft/server/TileEntityLightDetector.java b/src/main/java/net/minecraft/server/TileEntityLightDetector.java
index 7b6f8ae..c6b593f 100644
index f75e2de..7119612 100644
--- a/src/main/java/net/minecraft/server/TileEntityLightDetector.java
+++ b/src/main/java/net/minecraft/server/TileEntityLightDetector.java
@@ -5,7 +5,7 @@ public class TileEntityLightDetector extends TileEntity implements IUpdatePlayer
public TileEntityLightDetector() {}
public void c() {
- if (this.world != null && !this.world.isStatic && this.world.getTime() % 20L == 0L) {
+ if (this.world != null && !this.world.isStatic /*&& this.world.getTime() % 20L == 0L*/) { // PaperSpigot - interval controlled by Improved Tick Handling
- if (this.world != null && !this.world.isClientSide && this.world.getTime() % 20L == 0L) {
+ if (this.world != null && !this.world.isClientSide /*&& this.world.getTime() % 20L == 0L*/) { // PaperSpigot - interval controlled by improved tick handling
this.e = this.w();
if (this.e instanceof BlockDaylightDetector) {
((BlockDaylightDetector) this.e).d(this.world, this.position);
((BlockDaylightDetector) this.e).f(this.world, this.position);
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 4e1d779..7622a92 100644
index d8464b2..6fb32a2 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -3,13 +3,7 @@ package net.minecraft.server;
import com.google.common.base.Predicate;
import com.google.common.collect.Lists;
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Random;
-import java.util.UUID;
+import java.util.*;
import java.util.concurrent.Callable;
// CraftBukkit start
@@ -59,7 +53,7 @@ public abstract class World implements IBlockAccess {
@@ -62,7 +62,7 @@ public abstract class World implements IBlockAccess {
// Spigot end
protected final List g = Lists.newArrayList();
public final List h = Lists.newArrayList();
- public final List tileEntityList = Lists.newArrayList();
+ public final Set tileEntityList = new org.github.paperspigot.WorldTileEntityList(this); // PaperSpigot
private final List a = Lists.newArrayList();
private final List b = Lists.newArrayList();
public final List players = Lists.newArrayList();
@@ -133,8 +127,8 @@ public abstract class World implements IBlockAccess {
protected final List<Entity> g = Lists.newArrayList();
public final List<TileEntity> h = Lists.newArrayList();
- public final List<TileEntity> tileEntityList = Lists.newArrayList();
+ public final Set<TileEntity> tileEntityList = new org.github.paperspigot.WorldTileEntityList(this); // PaperSpigot
private final List<TileEntity> b = Lists.newArrayList();
private final List<TileEntity> c = Lists.newArrayList();
public final List<EntityHuman> players = Lists.newArrayList();
@@ -135,8 +135,10 @@ public abstract class World implements IBlockAccess {
public static boolean haveWeSilencedAPhysicsCrash;
public static String blockLocation;
public List<TileEntity> triggerHoppersList = new ArrayList<TileEntity>(); // Spigot, When altHopperTicking, tile entities being added go through here.
private org.spigotmc.TickLimiter entityLimiter;
- private org.spigotmc.TickLimiter tileLimiter;
- private int tileTickPosition;
+ //private org.spigotmc.TickLimiter tileLimiter; // PaperSpigot - Disable Spigot's TE handling in favor of our own
+ //private int tileTickPosition; // PaperSpigot - Disable Spigot's TE handling in favor of our own
+ // PaperSpigot start - Disable Spigot's TE handling in favor of our own
+ //private org.spigotmc.TickLimiter tileLimiter;
+ //private int tileTickPosition;
+ // PaperSpigot end
public static long chunkToKey(int x, int z)
{
@@ -240,7 +234,7 @@ public abstract class World implements IBlockAccess {
this.getServer().addWorld(this.world); // CraftBukkit
@@ -233,7 +235,7 @@ public abstract class World implements IBlockAccess {
this.keepSpawnInMemory = this.paperSpigotConfig.keepSpawnInMemory; // PaperSpigot
timings = new SpigotTimings.WorldTimingsHandler(this); // Spigot - code below can generate new world and access timings
this.entityLimiter = new org.spigotmc.TickLimiter(spigotConfig.entityMaxTickTime);
- this.tileLimiter = new org.spigotmc.TickLimiter(spigotConfig.tileMaxTickTime);
@ -121,20 +108,20 @@ index 4e1d779..7622a92 100644
}
public World b() {
@@ -1463,7 +1457,12 @@ public abstract class World implements IBlockAccess {
@@ -1467,6 +1469,12 @@ public abstract class World implements IBlockAccess {
}
// CraftBukkit end
this.initializeHoppers(); // Spigot - Initializes hoppers which have been added recently.
+ // PaperSpigot Start - Return to previous behavior, theoretically tile entity ticks should no longer be long enough for this to be an issue
+ // PaperSpigot start - Return to previous behavior, theoretically tile entity ticks should no longer be long enough for this to be an issue
+ Iterator iterator = this.tileEntityList.iterator();
+
+ while (iterator.hasNext()) {
+ TileEntity tileentity = (TileEntity) iterator.next();
+ /*
// Spigot start
int tilesThisCycle = 0;
for (tileLimiter.initTick();
@@ -1471,10 +1470,12 @@ public abstract class World implements IBlockAccess {
@@ -1474,10 +1482,12 @@ public abstract class World implements IBlockAccess {
tileTickPosition++, tilesThisCycle++) {
tileTickPosition = (tileTickPosition < tileEntityList.size()) ? tileTickPosition : 0;
TileEntity tileentity = (TileEntity) this.tileEntityList.get(tileTickPosition);
@ -148,7 +135,7 @@ index 4e1d779..7622a92 100644
continue;
}
// Spigot end
@@ -1502,7 +1503,7 @@ public abstract class World implements IBlockAccess {
@@ -1505,7 +1515,7 @@ public abstract class World implements IBlockAccess {
}
if (tileentity.x()) {
@ -159,10 +146,10 @@ index 4e1d779..7622a92 100644
this.getChunkAtWorldCoords(tileentity.getPosition()).e(tileentity.getPosition());
diff --git a/src/main/java/org/github/paperspigot/WorldTileEntityList.java b/src/main/java/org/github/paperspigot/WorldTileEntityList.java
new file mode 100644
index 0000000..1a53e94
index 0000000..5af5dcc
--- /dev/null
+++ b/src/main/java/org/github/paperspigot/WorldTileEntityList.java
@@ -0,0 +1,175 @@
@@ -0,0 +1,168 @@
+package org.github.paperspigot;
+
+import com.google.common.collect.ArrayListMultimap;
@ -182,9 +169,7 @@ index 0000000..1a53e94
+ // Use -1 for no ticking
+ // These TE's have empty tick methods, doing nothing. Never bother ticking them.
+ for (Class<? extends TileEntity> ignored : new Class[]{
+ TileEntityChest.class, // PaperSpigot - Don't tick chests either
+ TileEntityEnderChest.class, // PaperSpigot - Don't tick chests either
+ TileEntityRecordPlayer.class,
+ BlockJukeBox.TileEntityRecordPlayer.class,
+ TileEntityDispenser.class,
+ TileEntityDropper.class,
+ TileEntitySign.class,
@ -201,11 +186,6 @@ index 0000000..1a53e94
+ // does findPlayer lookup, so this helps performance to slow down
+ put(TileEntityEnchantTable.class, 20);
+
+ // Slow things down that players won't notice due to craftbukkit "wall time" patches.
+ // These need to be investigated further before they can be safely used here
+ //put(TileEntityFurnace.class, 20);
+ //put(TileEntityBrewingStand.class, 10);
+
+ // Vanilla controlled values - These are checks already done in vanilla, so don't tick on ticks we know
+ // won't do anything anyways
+ put(TileEntityBeacon.class, 80);
@ -340,5 +320,5 @@ index 0000000..1a53e94
+}
\ No newline at end of file
--
1.9.5.msysgit.0
1.9.1

Datei anzeigen

@ -1,13 +1,11 @@
From e82339befdcab7f8c3956e3ff9f6c0d2d8785f93 Mon Sep 17 00:00:00 2001
From 3c8a5a4a7370224e942ade00b02f474f9eae7f48 Mon Sep 17 00:00:00 2001
From: Iceee <andrew@opticgaming.tv>
Date: Fri, 28 Nov 2014 11:56:55 -0600
Date: Sun, 8 Mar 2015 03:16:39 -0500
Subject: [PATCH] Move sound handling out of the chest tick loop
This allows us to disable ticking chests and enderchests without any
noticeable difference to players
diff --git a/src/main/java/net/minecraft/server/TileEntityChest.java b/src/main/java/net/minecraft/server/TileEntityChest.java
index 0f29365..f61a43d 100644
index 8af9e32..d30f2f8 100644
--- a/src/main/java/net/minecraft/server/TileEntityChest.java
+++ b/src/main/java/net/minecraft/server/TileEntityChest.java
@@ -12,13 +12,13 @@ public class TileEntityChest extends TileEntityContainer implements IUpdatePlaye
@ -34,37 +32,34 @@ index 0f29365..f61a43d 100644
}
public void c() {
+ // PaperSpigot start - Move chest sounds out of tick loop - TileEntity Tick Improvements
+ // PaperSpigot - Move chest sounds out of the tick loop
+ /*
this.m();
int i = this.position.getX();
int j = this.position.getY();
@@ -318,6 +320,8 @@ public class TileEntityChest extends TileEntityContainer implements IUpdatePlaye
@@ -318,7 +320,8 @@ public class TileEntityChest extends TileEntityContainer implements IUpdatePlaye
this.j = 0.0F;
}
}
-
+ */
+ // PaperSpigot end
}
@@ -340,6 +344,32 @@ public class TileEntityChest extends TileEntityContainer implements IUpdatePlaye
public boolean c(int i, int j) {
@@ -339,6 +342,28 @@ public class TileEntityChest extends TileEntityContainer implements IUpdatePlaye
++this.l;
if (this.world == null) return; // CraftBukkit
+
+ // PaperSpigot - Move chest open sound out of the tick loop
+ // PaperSpigot start - Move chest open sound out of the tick loop
+ this.m();
+
+ if (this.l > 0 && this.j == 0.0F && this.f == null && this.h == null) {
+ this.j = 0.7F;
+
+ int locX = this.position.getX();
+ int locY = this.position.getY();
+ int locZ = this.position.getZ();
+
+ double d0 = (double) locZ + 0.5D;
+ double d1 = (double) locX + 0.5D;
+ double d0 = (double) this.position.getZ() + 0.5D;
+ double d1 = (double) this.position.getX() + 0.5D;
+
+ if (this.i != null) {
+ d0 += 0.5D;
@ -74,25 +69,20 @@ index 0f29365..f61a43d 100644
+ d1 += 0.5D;
+ }
+
+ this.world.makeSound(d1, (double) locY + 0.5D, d0, "random.chestopen", 0.5F, this.world.random.nextFloat() * 0.1F + 0.9F);
+ this.world.makeSound(d1, (double) this.position.getY() + 0.5D, d0, "random.chestopen", 0.5F, this.world.random.nextFloat() * 0.1F + 0.9F);
+ }
+ // PaperSpigot end
+
this.world.playBlockAction(this.position, this.w(), 1, this.l);
// CraftBukkit start - Call redstone event
@@ -363,6 +393,39 @@ public class TileEntityChest extends TileEntityContainer implements IUpdatePlaye
@@ -361,6 +386,33 @@ public class TileEntityChest extends TileEntityContainer implements IUpdatePlaye
int oldPower = Math.max(0, Math.min(15, this.l)); // CraftBukkit - Get power before new viewer is added
--this.l;
if (this.world == null) return; // CraftBukkit
+
+ // PaperSpigot start - Move chest close sound handling out of the tick loop
+ if (this.l == 0 && this.j > 0.0F || this.l > 0 && this.j < 1.0F) {
+ int locX = this.position.getX();
+ int locY = this.position.getY();
+ int locZ = this.position.getZ();
+ float f1 = this.j;
+
+ float f = 0.1F;
+
+ if (this.l > 0) {
@ -101,8 +91,8 @@ index 0f29365..f61a43d 100644
+ this.j -= f;
+ }
+
+ double d0 = (double) locX + 0.5D;
+ double d2 = (double) locZ + 0.5D;
+ double d0 = (double) this.getPosition().getX() + 0.5D;
+ double d2 = (double) this.getPosition().getZ() + 0.5D;
+
+ if (this.i != null) {
+ d2 += 0.5D;
@ -112,8 +102,7 @@ index 0f29365..f61a43d 100644
+ d0 += 0.5D;
+ }
+
+ this.world.makeSound(d0, (double) locY + 0.5D, d2, "random.chestclosed", 0.5F, this.world.random.nextFloat() * 0.1F + 0.9F);
+
+ this.world.makeSound(d0, (double) this.getPosition().getY() + 0.5D, d2, "random.chestclosed", 0.5F, this.world.random.nextFloat() * 0.1F + 0.9F);
+ this.j = 0.0F;
+ }
+ // PaperSpigot end
@ -122,7 +111,7 @@ index 0f29365..f61a43d 100644
// CraftBukkit start - Call redstone event
diff --git a/src/main/java/net/minecraft/server/TileEntityEnderChest.java b/src/main/java/net/minecraft/server/TileEntityEnderChest.java
index 218b801..15600ca 100644
index f712885..d2ef4c4 100644
--- a/src/main/java/net/minecraft/server/TileEntityEnderChest.java
+++ b/src/main/java/net/minecraft/server/TileEntityEnderChest.java
@@ -2,14 +2,16 @@ package net.minecraft.server;
@ -139,21 +128,22 @@ index 218b801..15600ca 100644
public TileEntityEnderChest() {}
public void c() {
+ // PaperSpigot - Move enderchest sound handling out of the tick loop
+ // PaperSpigot start - Move enderchest sound handling out of the tick loop
+ /*
if (++this.h % 4 == 0) { // PaperSpigot Reduced (20 * 4) -> 4 interval due to reduced tick rate from Improved Tick Handling
if (++this.h % 4 == 0) { // PaperSpigot - Reduced (20 * 4) -> 4 interval due to reduced tick rate from improved tick handling
this.world.playBlockAction(this.position, Blocks.ENDER_CHEST, 1, this.g);
}
@@ -54,6 +56,8 @@ public class TileEntityEnderChest extends TileEntity implements IUpdatePlayerLis
@@ -54,7 +56,8 @@ public class TileEntityEnderChest extends TileEntity implements IUpdatePlayerLis
this.a = 0.0F;
}
}
-
+ */
+ // PaperSpigot end
}
@@ -73,11 +77,43 @@ public class TileEntityEnderChest extends TileEntity implements IUpdatePlayerLis
public boolean c(int i, int j) {
@@ -73,11 +76,34 @@ public class TileEntityEnderChest extends TileEntity implements IUpdatePlayerLis
public void b() {
++this.g;
@ -162,14 +152,10 @@ index 218b801..15600ca 100644
+ if (this.g > 0 && this.a == 0.0F) {
+ this.a = 0.7F;
+
+ int locX = this.position.getX();
+ int locY = this.position.getY();
+ int locZ = this.position.getZ();
+ double d1 = (double) this.getPosition().getX() + 0.5D;
+ double d0 = (double) this.getPosition().getZ() + 0.5D;
+
+ double d1 = (double) locX + 0.5D;
+ double d0 = (double) locZ + 0.5D;
+
+ this.world.makeSound(d1, (double) locY + 0.5D, d0, "random.chestopen", 0.5F, this.world.random.nextFloat() * 0.1F + 0.9F);
+ this.world.makeSound(d1, (double) this.getPosition().getY() + 0.5D, d0, "random.chestopen", 0.5F, this.world.random.nextFloat() * 0.1F + 0.9F);
+ }
+ // PaperSpigot end
+
@ -181,15 +167,10 @@ index 218b801..15600ca 100644
+
+ // PaperSpigot start - Move enderchest close sounds out of the tick loop
+ if (this.g == 0 && this.a > 0.0F || this.g > 0 && this.a < 1.0F) {
+ int locX = this.position.getX();
+ int locY = this.position.getY();
+ int locZ = this.position.getZ();
+
+ double d0 = (double) locX + 0.5D;
+ double d2 = (double) locZ + 0.5D;
+
+ this.world.makeSound(d0, (double) locY + 0.5D, d2, "random.chestclosed", 0.5F, this.world.random.nextFloat() * 0.1F + 0.9F);
+ double d0 = (double) this.getPosition().getX() + 0.5D;
+ double d2 = (double) this.getPosition().getZ() + 0.5D;
+
+ this.world.makeSound(d0, (double) this.getPosition().getY() + 0.5D, d2, "random.chestclosed", 0.5F, this.world.random.nextFloat() * 0.1F + 0.9F);
+ this.a = 0.0F;
+ }
+ // PaperSpigot end
@ -197,6 +178,21 @@ index 218b801..15600ca 100644
this.world.playBlockAction(this.position, Blocks.ENDER_CHEST, 1, this.g);
}
diff --git a/src/main/java/org/github/paperspigot/WorldTileEntityList.java b/src/main/java/org/github/paperspigot/WorldTileEntityList.java
index 5af5dcc..693f75c 100644
--- a/src/main/java/org/github/paperspigot/WorldTileEntityList.java
+++ b/src/main/java/org/github/paperspigot/WorldTileEntityList.java
@@ -26,7 +26,9 @@ public class WorldTileEntityList extends HashSet<TileEntity> {
TileEntityCommand.class,
TileEntitySkull.class,
TileEntityComparator.class,
- TileEntityFlowerPot.class
+ TileEntityFlowerPot.class,
+ TileEntityChest.class,
+ TileEntityEnderChest.class
}) {
put(ignored, -1);
}
--
1.9.5.msysgit.0
1.9.1

Datei anzeigen

@ -1,15 +1,15 @@
From 9d9bcf820969779811228b510941018104dae591 Mon Sep 17 00:00:00 2001
From 6442bb1cb89024243a3a5192ec4e93f4be114a81 Mon Sep 17 00:00:00 2001
From: Iceee <andrew@opticgaming.tv>
Date: Fri, 28 Nov 2014 12:11:03 -0600
Subject: [PATCH] Remove specific entities that fly through an unloaded chunk
Date: Sun, 8 Mar 2015 03:34:15 -0500
Subject: [PATCH] Remove certain entities that fly through unloaded chunks
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index dfb4299..4848e09 100644
index d6bef0b..1470c21 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -112,6 +112,7 @@ public abstract class Entity implements ICommandListener {
private final CommandObjectiveExecutor as;
@@ -114,6 +114,7 @@ public abstract class Entity implements ICommandListener {
private final CommandObjectiveExecutor au;
public boolean valid; // CraftBukkit
public org.bukkit.projectiles.ProjectileSource projectileSource; // CraftBukkit - For projectiles only
+ public boolean inUnloadedChunk = false; // PaperSpigot - Remove entities in unloaded chunks
@ -17,16 +17,16 @@ index dfb4299..4848e09 100644
// Spigot start
public CustomTimingsHandler tickTimer = org.bukkit.craftbukkit.SpigotTimings.getEntityTimings(this); // Spigot
diff --git a/src/main/java/net/minecraft/server/EntityEnderPearl.java b/src/main/java/net/minecraft/server/EntityEnderPearl.java
index 6fd43da..3c103c7 100644
index 929a66e..4ebed9c 100644
--- a/src/main/java/net/minecraft/server/EntityEnderPearl.java
+++ b/src/main/java/net/minecraft/server/EntityEnderPearl.java
@@ -26,6 +26,12 @@ public class EntityEnderPearl extends EntityProjectile {
@@ -30,6 +30,12 @@ public class EntityEnderPearl extends EntityProjectile {
movingobjectposition.entity.damageEntity(DamageSource.projectile(this, entityliving), 0.0F);
}
+ // PaperSpigot start - Remove entities in unloaded chunks
+ if (inUnloadedChunk && world.paperSpigotConfig.removeUnloadedEnderPearls) {
+ die();
+ if (this.inUnloadedChunk && world.paperSpigotConfig.removeUnloadedEnderPearls) {
+ this.die();
+ }
+ // PaperSpigot end
+
@ -34,7 +34,7 @@ index 6fd43da..3c103c7 100644
this.world.addParticle(EnumParticle.PORTAL, this.locX, this.locY + this.random.nextDouble() * 2.0D, this.locZ, this.random.nextGaussian(), 0.0D, this.random.nextGaussian(), new int[0]);
}
diff --git a/src/main/java/net/minecraft/server/EntityFallingBlock.java b/src/main/java/net/minecraft/server/EntityFallingBlock.java
index 81a5dc9..336e575 100644
index ef93776..5931e1d 100644
--- a/src/main/java/net/minecraft/server/EntityFallingBlock.java
+++ b/src/main/java/net/minecraft/server/EntityFallingBlock.java
@@ -70,6 +70,12 @@ public class EntityFallingBlock extends Entity {
@ -51,7 +51,7 @@ index 81a5dc9..336e575 100644
if (this.world.paperSpigotConfig.fallingBlockHeightNerf != 0 && this.locY > this.world.paperSpigotConfig.fallingBlockHeightNerf) {
if (this.dropItem) {
diff --git a/src/main/java/net/minecraft/server/EntityTNTPrimed.java b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
index 3621faf..287039c 100644
index 2d22327..50423eb 100644
--- a/src/main/java/net/minecraft/server/EntityTNTPrimed.java
+++ b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
@@ -47,6 +47,14 @@ public class EntityTNTPrimed extends Entity {
@ -70,10 +70,10 @@ index 3621faf..287039c 100644
this.motY *= 0.9800000190734863D;
this.motZ *= 0.9800000190734863D;
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 7622a92..e2988a0 100644
index 6fb32a2..698e3d9 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -1158,6 +1158,7 @@ public abstract class World implements IBlockAccess {
@@ -1174,6 +1174,7 @@ public abstract class World implements IBlockAccess {
{
if ( !this.isChunkLoaded( chunkx, chunkz, true ) )
{
@ -81,7 +81,7 @@ index 7622a92..e2988a0 100644
continue;
}
int cz = chunkz << 4;
@@ -1591,6 +1592,14 @@ public abstract class World implements IBlockAccess {
@@ -1603,6 +1604,14 @@ public abstract class World implements IBlockAccess {
if (!org.spigotmc.ActivationRange.checkIfActive(entity)) {
entity.ticksLived++;
entity.inactiveTick();
@ -97,10 +97,10 @@ index 7622a92..e2988a0 100644
entity.tickTimer.startTiming(); // Spigot
// CraftBukkit end
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
index 59a9387..cffb145 100644
index 31dedce..ac02b90 100644
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
@@ -169,4 +169,14 @@ public class PaperSpigotWorldConfig
@@ -170,4 +170,14 @@ public class PaperSpigotWorldConfig
removeInvalidMobSpawnerTEs = getBoolean( "remove-invalid-mob-spawner-tile-entities", true );
log( "Remove invalid mob spawner tile entities: " + removeInvalidMobSpawnerTEs );
}
@ -116,5 +116,5 @@ index 59a9387..cffb145 100644
+ }
}
--
1.9.5.msysgit.0
1.9.1

Datei anzeigen

@ -1,11 +1,11 @@
From eb2be3ee1ac1079e5023e8b9de83f4e86bb9b5a9 Mon Sep 17 00:00:00 2001
From 8e9936e9bb7d39767e2f08ffacec8ab5bd0876f2 Mon Sep 17 00:00:00 2001
From: gsand <gsandowns@gmail.com>
Date: Fri, 28 Nov 2014 12:23:02 -0600
Date: Sun, 8 Mar 2015 03:41:33 -0500
Subject: [PATCH] Configurable strength and weakness effect modifiers
diff --git a/src/main/java/net/minecraft/server/MobEffectAttackDamage.java b/src/main/java/net/minecraft/server/MobEffectAttackDamage.java
index 620685a..175503b 100644
index 620685a..3411b78 100644
--- a/src/main/java/net/minecraft/server/MobEffectAttackDamage.java
+++ b/src/main/java/net/minecraft/server/MobEffectAttackDamage.java
@@ -7,6 +7,7 @@ public class MobEffectAttackDamage extends MobEffectList {
@ -14,14 +14,14 @@ index 620685a..175503b 100644
public double a(int i, AttributeModifier attributemodifier) {
- return this.id == MobEffectList.WEAKNESS.id ? (double) (-0.5F * (float) (i + 1)) : 1.3D * (double) (i + 1);
+ // PaperSpigot - Configurable modifiers for strength and weakness effects
+ return this.id == MobEffectList.WEAKNESS.id ? (double) (org.github.paperspigot.PaperSpigotConfig.weaknessEffectModifier * (float) (i + 1)) : org.github.paperspigot.PaperSpigotConfig.strengthEffectModifier * (double) (i + 1);
+ return this.id == MobEffectList.WEAKNESS.id ? (double) (org.github.paperspigot.PaperSpigotConfig.weaknessEffectModifier * (float) (i + 1)) : org.github.paperspigot.PaperSpigotConfig.strengthEffectModifier * (double) i + 1;
}
}
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotConfig.java
index 25a94a6..a7b18e4 100644
index 02c4004..c57f83b 100644
--- a/src/main/java/org/github/paperspigot/PaperSpigotConfig.java
+++ b/src/main/java/org/github/paperspigot/PaperSpigotConfig.java
@@ -161,4 +161,12 @@ public class PaperSpigotConfig
@@ -163,4 +163,12 @@ public class PaperSpigotConfig
Bukkit.getLogger().log( Level.INFO, "Disabling player interaction limiter, your server may be more vulnerable to malicious users" );
}
}
@ -35,5 +35,5 @@ index 25a94a6..a7b18e4 100644
+ }
}
--
1.9.5.msysgit.0
1.9.1

Datei anzeigen

@ -1,14 +1,14 @@
From 713d5992f6f6777bd71ea4a98295c757aa98b81e Mon Sep 17 00:00:00 2001
From 343facd4d7480a320e76434e3861d45bae4b4b41 Mon Sep 17 00:00:00 2001
From: Dmck2b <suddenly@suddenly.coffee>
Date: Fri, 28 Nov 2014 12:30:47 -0600
Date: Sun, 8 Mar 2015 03:45:49 -0500
Subject: [PATCH] Temporary fix for rails dupe
diff --git a/src/main/java/net/minecraft/server/BlockMinecartTrackAbstract.java b/src/main/java/net/minecraft/server/BlockMinecartTrackAbstract.java
index 063177d..f1e299f 100644
index 0d108eb..3f34eac 100644
--- a/src/main/java/net/minecraft/server/BlockMinecartTrackAbstract.java
+++ b/src/main/java/net/minecraft/server/BlockMinecartTrackAbstract.java
@@ -84,8 +84,12 @@ public abstract class BlockMinecartTrackAbstract extends Block {
@@ -88,8 +88,12 @@ public abstract class BlockMinecartTrackAbstract extends Block {
}
if (flag) {
@ -24,5 +24,5 @@ index 063177d..f1e299f 100644
this.b(world, blockposition, iblockdata, block);
}
--
1.9.5.msysgit.0
1.9.1

Datei anzeigen

@ -1,6 +1,6 @@
From 26e30543319472acad2768609c97c4ee485e30d4 Mon Sep 17 00:00:00 2001
From 4c9d2a549ef6b87993ae719b2f6d412014ef0093 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 28 Nov 2014 12:48:26 -0600
Date: Sun, 8 Mar 2015 03:47:32 -0500
Subject: [PATCH] Further improve server tick loop
Improves how the catchup buffer is handled, allowing it to roll both ways
@ -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 fbc2e61..43567fc 100644
index ac8d1a7..d9c386e 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -113,17 +113,11 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs
@@ -115,17 +115,11 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
public org.bukkit.command.ConsoleCommandSender console;
public org.bukkit.command.RemoteConsoleCommandSender remoteConsole;
public ConsoleReader reader;
@ -34,7 +34,7 @@ index fbc2e61..43567fc 100644
public MinecraftServer(OptionSet options, Proxy proxy, File file1) {
io.netty.util.ResourceLeakDetector.setEnabled( false ); // Spigot - disable
@@ -493,12 +487,53 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs
@@ -510,12 +504,53 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
this.isRunning = false;
}
@ -93,7 +93,7 @@ index fbc2e61..43567fc 100644
public void run() {
try {
@@ -511,26 +546,43 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs
@@ -528,26 +563,43 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
this.a(this.r);
// Spigot start
@ -150,10 +150,10 @@ index fbc2e61..43567fc 100644
lastTick = curTime;
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index d67d3d4..885c51a 100644
index b5bf0ec..6aa57ae 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1690,6 +1690,17 @@ public final class CraftServer implements Server {
@@ -1704,6 +1704,17 @@ public final class CraftServer implements Server {
private final Spigot spigot = new Spigot()
{
@ -212,5 +212,5 @@ index be2e31d..21fd7ef 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 );
--
1.9.5.msysgit.0
1.9.1

Datei anzeigen

@ -1,11 +1,11 @@
From b787bc58e8224d8db379608f104cd935f17889fc Mon Sep 17 00:00:00 2001
From 626395696a01106645f4109cb146982aa461c230 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 28 Nov 2014 13:20:22 -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 942a6ab..0c9f241 100644
index 571e066..53d7874 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1146,12 +1146,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@ -24,5 +24,5 @@ index 942a6ab..0c9f241 100644
@Override
--
1.9.5.msysgit.0
1.9.1

Datei anzeigen

@ -1,6 +1,6 @@
From a658e1ae5cb763266cc2e3edeaea49ba6082656e Mon Sep 17 00:00:00 2001
From 8b952f990dc321b91a929ad3b421227b5da923e5 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 28 Nov 2014 13:43:11 -0600
Date: Sun, 8 Mar 2015 04:03:56 -0500
Subject: [PATCH] Player lookup improvements
Minecraft and CraftBukkit both use Arrays to store online players,
@ -13,13 +13,13 @@ By using a map based approach for player lookups, player lookup should
be consistent in performance regardless of how many players are online.
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 1693efc..d3f2dfe 100644
index d93b00c..063cd81 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -49,6 +49,31 @@ public abstract class PlayerList {
private static final SimpleDateFormat i = new SimpleDateFormat("yyyy-MM-dd \'at\' HH:mm:ss z");
private static final SimpleDateFormat g = new SimpleDateFormat("yyyy-MM-dd \'at\' HH:mm:ss z");
private final MinecraftServer server;
public final List players = new java.util.concurrent.CopyOnWriteArrayList(); // CraftBukkit - ArrayList -> CopyOnWriteArrayList: Iterator safety
public final List<EntityPlayer> players = new java.util.concurrent.CopyOnWriteArrayList(); // CraftBukkit - ArrayList -> CopyOnWriteArrayList: Iterator safety, public
+ // PaperSpigot start - Player lookup improvements
+ public final Map<String, EntityPlayer> playerMap = new java.util.HashMap<String, EntityPlayer>() {
+ @Override
@ -45,44 +45,45 @@ index 1693efc..d3f2dfe 100644
+ }
+ };
+ // PaperSpigot end
public final Map f = Maps.newHashMap();
private final Map<UUID, EntityPlayer> j = Maps.newHashMap();
private final GameProfileBanList k;
private final IpBanList l;
@@ -263,6 +288,7 @@ public abstract class PlayerList {
@@ -287,6 +312,7 @@ public abstract class PlayerList {
public void onPlayerJoin(EntityPlayer entityplayer, String joinMessage) { // CraftBukkit added param
this.players.add(entityplayer);
+ this.playerMap.put(entityplayer.getName(), entityplayer); // PaperSpigot
this.f.put(entityplayer.getUniqueID(), entityplayer);
// this.sendAll(new PacketPlayOutPlayerInfo(EnumPlayerInfoAction.ADD_PLAYER, new EntityPlayer[] { entityplayer})); // CraftBukkit - replaced with loop below
this.j.put(entityplayer.getUniqueID(), entityplayer);
// this.sendAll(new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.ADD_PLAYER, new EntityPlayer[] { entityplayer})); // CraftBukkit - replaced with loop below
WorldServer worldserver = this.server.getWorldServer(entityplayer.dimension);
@@ -334,6 +360,7 @@ public abstract class PlayerList {
@@ -358,6 +384,7 @@ public abstract class PlayerList {
worldserver.kill(entityplayer);
worldserver.getPlayerChunkMap().removePlayer(entityplayer);
this.players.remove(entityplayer);
+ this.playerMap.remove(entityplayer.getName()); // PaperSpigot
this.f.remove(entityplayer.getUniqueID());
this.o.remove(entityplayer.getUniqueID());
// CraftBukkit start
@@ -365,6 +392,8 @@ public abstract class PlayerList {
UUID uuid = entityplayer.getUniqueID();
EntityPlayer entityplayer1 = (EntityPlayer) this.j.get(uuid);
@@ -395,6 +422,8 @@ public abstract class PlayerList {
EntityPlayer entityplayer;
+ // PaperSpigot - Use exact lookup below
+ // PaperSpigot start - Use exact lookup below
+ /*
for (int i = 0; i < this.players.size(); ++i) {
entityplayer = (EntityPlayer) this.players.get(i);
if (entityplayer.getUniqueID().equals(uuid)) {
@@ -376,6 +405,8 @@ public abstract class PlayerList {
@@ -406,6 +435,9 @@ public abstract class PlayerList {
while (iterator.hasNext()) {
entityplayer = (EntityPlayer) iterator.next();
+ */
+ if ((entityplayer = this.a(uuid)) != null) {
+ // PaperSpigot end
savePlayerFile(entityplayer); // CraftBukkit - Force the player's inventory to be saved
entityplayer.playerConnection.disconnect("You logged in from another location");
}
@@ -966,6 +997,7 @@ public abstract class PlayerList {
@@ -1004,6 +1036,7 @@ public abstract class PlayerList {
}
public EntityPlayer getPlayer(String s) {
@ -114,7 +115,7 @@ index 8be0698..4a908c6 100644
@Override
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 885c51a..cf3b140 100644
index 6aa57ae..6150255 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -401,7 +401,12 @@ public final class CraftServer implements Server {
@ -152,7 +153,7 @@ index 885c51a..cf3b140 100644
@Override
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 0c9f241..e7c61fd 100644
index 53d7874..0e6d96c 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -104,13 +104,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@ -171,5 +172,5 @@ index 0c9f241..e7c61fd 100644
public InetSocketAddress getAddress() {
--
1.9.5.msysgit.0
1.9.1

Datei anzeigen

@ -1,17 +1,17 @@
From ba5e12d756d97484b9e742104f3f6668b37f7681 Mon Sep 17 00:00:00 2001
From 53a6285f845766bdf8fb86fa3cb7dcbc0549070a Mon Sep 17 00:00:00 2001
From: gsand <gsandowns@gmail.com>
Date: Fri, 28 Nov 2014 13:53:48 -0600
Date: Sun, 8 Mar 2015 04:10:02 -0500
Subject: [PATCH] Configurable game mechanics changes
diff --git a/src/main/java/net/minecraft/server/EntityBoat.java b/src/main/java/net/minecraft/server/EntityBoat.java
index dc4f526..45b5ac5 100644
index a756192..ce44b25 100644
--- a/src/main/java/net/minecraft/server/EntityBoat.java
+++ b/src/main/java/net/minecraft/server/EntityBoat.java
@@ -340,13 +340,7 @@ public class EntityBoat extends Entity {
if (!destroyEvent.isCancelled()) {
this.die();
if (this.world.getGameRules().getBoolean("doEntityDrops")) {
- for (k = 0; k < 3; ++k) {
- this.a(Item.getItemOf(Blocks.PLANKS), 1, 0.0F);
- }
@ -21,12 +21,12 @@ index dc4f526..45b5ac5 100644
- }
+ breakNaturally(); // PaperSpigot
}
// CraftBukkit end
} // CraftBukkit end
}
@@ -452,15 +446,7 @@ public class EntityBoat extends Entity {
@@ -451,15 +445,7 @@ public class EntityBoat extends Entity {
if (!destroyEvent.isCancelled()) {
this.die();
if (this.world.getGameRules().getBoolean("doEntityDrops")) {
- int i;
-
- for (i = 0; i < 3; ++i) {
@ -38,9 +38,9 @@ index dc4f526..45b5ac5 100644
- }
+ breakNaturally(); // PaperSpigot
}
// CraftBukkit end
} // CraftBukkit end
}
@@ -496,4 +482,21 @@ public class EntityBoat extends Entity {
@@ -495,4 +481,21 @@ public class EntityBoat extends Entity {
public int m() {
return this.datawatcher.getInt(18);
}
@ -63,10 +63,10 @@ index dc4f526..45b5ac5 100644
+ }
}
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
index cffb145..bdf06fb 100644
index ac02b90..f33142a 100644
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
@@ -179,4 +179,10 @@ public class PaperSpigotWorldConfig
@@ -180,4 +180,10 @@ public class PaperSpigotWorldConfig
removeUnloadedTNTEntities = getBoolean( "remove-unloaded.tnt-entities", true );
removeUnloadedFallingBlocks = getBoolean( "remove-unloaded.falling-blocks", true );
}
@ -78,5 +78,5 @@ index cffb145..bdf06fb 100644
+ }
}
--
1.9.5.msysgit.0
1.9.1

Datei anzeigen

@ -1,11 +1,11 @@
From fedfc18c899bf25bc429f7417f496020f50388f7 Mon Sep 17 00:00:00 2001
From 20f44a91c23ff03618ac22e7b3e297be34128947 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 6 Nov 2014 18:29:20 -0600
Subject: [PATCH] Add async chunk load API
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index e06d2cd..db7eed4 100644
index 2bbe104..d8401c4 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -120,6 +120,24 @@ public class CraftWorld implements World {
@ -34,5 +34,5 @@ index e06d2cd..db7eed4 100644
return this.world.chunkProviderServer.getChunkAt(x, z).bukkitChunk;
}
--
1.9.5.msysgit.0
1.9.1

Datei anzeigen

@ -1,11 +1,11 @@
From b7a7da6495b1dab1ef146167cfc36203b44d7d4a Mon Sep 17 00:00:00 2001
From 1370eab3d6f63ae56c9c02765f5f0c216a847716 Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net>
Date: Sun, 30 Nov 2014 18:58:07 -0600
Subject: [PATCH] Allow specified ItemStacks to retain their invalid data
diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java
index 169706e..fa6178b 100644
index de60437..bace99c 100644
--- a/src/main/java/net/minecraft/server/ItemStack.java
+++ b/src/main/java/net/minecraft/server/ItemStack.java
@@ -17,6 +17,8 @@ import org.bukkit.entity.Player;
@ -17,7 +17,7 @@ index 169706e..fa6178b 100644
public final class ItemStack {
public static final DecimalFormat a = new DecimalFormat("#.###");
@@ -304,9 +306,13 @@ public final class ItemStack {
@@ -306,9 +308,13 @@ public final class ItemStack {
}
// Is this a block?
@ -34,7 +34,7 @@ index 169706e..fa6178b 100644
}
}
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotConfig.java
index a7b18e4..01cd24a 100644
index c57f83b..19ef586 100644
--- a/src/main/java/org/github/paperspigot/PaperSpigotConfig.java
+++ b/src/main/java/org/github/paperspigot/PaperSpigotConfig.java
@@ -6,11 +6,10 @@ import java.io.IOException;
@ -51,7 +51,7 @@ index a7b18e4..01cd24a 100644
import org.bukkit.Bukkit;
import org.bukkit.command.Command;
import org.bukkit.configuration.InvalidConfigurationException;
@@ -169,4 +168,11 @@ public class PaperSpigotConfig
@@ -171,4 +170,11 @@ public class PaperSpigotConfig
strengthEffectModifier = getDouble( "effect-modifiers.strength", 1.3D );
weaknessEffectModifier = getDouble( "effect-modifiers.weakness", -0.5D );
}
@ -64,5 +64,5 @@ index a7b18e4..01cd24a 100644
+ }
}
--
1.9.5.msysgit.0
1.9.1

Datei anzeigen

@ -1,18 +1,18 @@
From 4bf725b31996da8637cb5efce367e6d55e84aaf7 Mon Sep 17 00:00:00 2001
From b92f67d7de492bf639da984d09d1067fa53575b8 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 30 Nov 2014 22:57:18 -0600
Date: Sun, 8 Mar 2015 04:23:41 -0500
Subject: [PATCH] Add TNT source location API
diff --git a/src/main/java/net/minecraft/server/BlockTNT.java b/src/main/java/net/minecraft/server/BlockTNT.java
index 7443873..ee0f4e5 100644
index 40c0a87..3a0bc4b 100644
--- a/src/main/java/net/minecraft/server/BlockTNT.java
+++ b/src/main/java/net/minecraft/server/BlockTNT.java
@@ -29,7 +29,8 @@ public class BlockTNT extends Block {
public void wasExploded(World world, BlockPosition blockposition, Explosion explosion) {
if (!world.isStatic) {
- EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(world, (double) ((float) blockposition.getX() + 0.5F), (double) ((float) blockposition.getY() + 0.5F), (double) ((float) blockposition.getZ() + 0.5F), explosion.c());
if (!world.isClientSide) {
- EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(world, (double) ((float) blockposition.getX() + 0.5F), (double) blockposition.getY(), (double) ((float) blockposition.getZ() + 0.5F), explosion.c());
+ org.bukkit.Location loc = explosion.source instanceof EntityTNTPrimed ? ((EntityTNTPrimed) explosion.source).sourceLoc : new org.bukkit.Location(world.getWorld(), blockposition.getX(), blockposition.getY(), blockposition.getZ()); // PaperSpigot
+ EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(loc, world, (double) ((float) blockposition.getX() + 0.5F), (double) ((float) blockposition.getY() + 0.5F), (double) ((float) blockposition.getZ() + 0.5F), explosion.c()); // PaperSpigot - add loc
@ -20,19 +20,19 @@ index 7443873..ee0f4e5 100644
world.addEntity(entitytntprimed);
@@ -43,7 +44,8 @@ public class BlockTNT extends Block {
public void a(World world, BlockPosition blockposition, IBlockData iblockdata, EntityLiving entityliving) {
if (!world.isStatic) {
if (!world.isClientSide) {
if (((Boolean) iblockdata.get(BlockTNT.EXPLODE)).booleanValue()) {
- EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(world, (double) ((float) blockposition.getX() + 0.5F), (double) ((float) blockposition.getY() + 0.5F), (double) ((float) blockposition.getZ() + 0.5F), entityliving);
- EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(world, (double) ((float) blockposition.getX() + 0.5F), (double) blockposition.getY(), (double) ((float) blockposition.getZ() + 0.5F), entityliving);
+ org.bukkit.Location loc = new org.bukkit.Location(world.getWorld(), blockposition.getX(), blockposition.getY(), blockposition.getZ()); // PaperSpigot
+ EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(loc, world, (double) ((float) blockposition.getX() + 0.5F), (double) ((float) blockposition.getY() + 0.5F), (double) ((float) blockposition.getZ() + 0.5F), entityliving); // PaperSpigot - add loc
world.addEntity(entitytntprimed);
world.makeSound(entitytntprimed, "game.tnt.primed", 1.0F, 1.0F);
diff --git a/src/main/java/net/minecraft/server/DispenseBehaviorTNT.java b/src/main/java/net/minecraft/server/DispenseBehaviorTNT.java
index 6d02141..3e5a77f 100644
--- a/src/main/java/net/minecraft/server/DispenseBehaviorTNT.java
+++ b/src/main/java/net/minecraft/server/DispenseBehaviorTNT.java
@@ -40,7 +40,7 @@ final class DispenseBehaviorTNT extends DispenseBehaviorItem {
diff --git a/src/main/java/net/minecraft/server/DispenserRegistry.java b/src/main/java/net/minecraft/server/DispenserRegistry.java
index 4d1c04e..37e6608 100644
--- a/src/main/java/net/minecraft/server/DispenserRegistry.java
+++ b/src/main/java/net/minecraft/server/DispenserRegistry.java
@@ -540,7 +540,7 @@ public class DispenserRegistry {
}
}
@ -42,7 +42,7 @@ index 6d02141..3e5a77f 100644
world.addEntity(entitytntprimed);
diff --git a/src/main/java/net/minecraft/server/EntityTNTPrimed.java b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
index 287039c..ddff5a8 100644
index 50423eb..1daba4e 100644
--- a/src/main/java/net/minecraft/server/EntityTNTPrimed.java
+++ b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
@@ -8,15 +8,23 @@ public class EntityTNTPrimed extends Entity {
@ -57,11 +57,11 @@ index 287039c..ddff5a8 100644
+ }
+
+ public EntityTNTPrimed(org.bukkit.Location loc, World world) {
+ // PaperSpigot end
super(world);
+ sourceLoc = loc; // PaperSpigot
+ sourceLoc = loc;
+ // PaperSpigot end
this.k = true;
this.a(0.98F, 0.98F);
this.setSize(0.98F, 0.98F);
}
- public EntityTNTPrimed(World world, double d0, double d1, double d2, EntityLiving entityliving) {
@ -98,10 +98,10 @@ index 287039c..ddff5a8 100644
public EntityLiving getSource() {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index db7eed4..e2ca1c5 100644
index d8401c4..6ee6889 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1088,7 +1088,8 @@ public class CraftWorld implements World {
@@ -1096,7 +1096,8 @@ public class CraftWorld implements World {
throw new IllegalArgumentException("Cannot spawn hanging entity for " + clazz.getName() + " at " + location);
}
} else if (TNTPrimed.class.isAssignableFrom(clazz)) {
@ -128,5 +128,5 @@ index e08ad47..b7e8b4d 100644
+ // PaperSpigot end
}
--
1.9.5.msysgit.0
1.9.1

Datei anzeigen

@ -1,27 +0,0 @@
From 52f989f6e94a23192a2d76e4d84d100f5d5dfb85 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Fri, 5 Dec 2014 22:44:50 -0600
Subject: [PATCH] Add a constructor for setting header and footer
diff --git a/src/main/java/net/minecraft/server/PacketPlayOutPlayerListHeaderFooter.java b/src/main/java/net/minecraft/server/PacketPlayOutPlayerListHeaderFooter.java
index 985e437..8acd298 100644
--- a/src/main/java/net/minecraft/server/PacketPlayOutPlayerListHeaderFooter.java
+++ b/src/main/java/net/minecraft/server/PacketPlayOutPlayerListHeaderFooter.java
@@ -21,6 +21,13 @@ public class PacketPlayOutPlayerListHeaderFooter implements Packet {
packetdataserializer.a(this.b);
}
+ // PaperSpigot start - Add a constructor for setting both the header and the footer
+ public PacketPlayOutPlayerListHeaderFooter(IChatBaseComponent header, IChatBaseComponent footer) {
+ this.a = header;
+ this.b = footer;
+ }
+ // PaperSpigot end
+
public void a(PacketListenerPlayOut packetlistenerplayout) {
packetlistenerplayout.a(this);
}
--
1.9.5.msysgit.0

Datei anzeigen

@ -1,33 +1,32 @@
From bacdc44538b85985c04e459b6d83e2abfd62c80f Mon Sep 17 00:00:00 2001
From ff2332b83eb0f24d8d2168026a1e6c32643831e7 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 3 Jul 2013 08:29:26 -0400
Date: Sun, 8 Mar 2015 04:37:23 -0500
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 76cdc7e..d976515 100644
index 2118c08..bd8278a 100644
--- a/src/main/java/net/minecraft/server/TileEntity.java
+++ b/src/main/java/net/minecraft/server/TileEntity.java
@@ -194,7 +194,13 @@ public abstract class TileEntity {
public void a(CrashReportSystemDetails crashreportsystemdetails) {
crashreportsystemdetails.a("Name", (Callable) (new CrashReportTileEntityName(this)));
@@ -163,7 +163,12 @@ public abstract class TileEntity {
}
});
if (this.world != null) {
- CrashReportSystemDetails.a(crashreportsystemdetails, this.position, this.w(), this.u());
+ // PaperSpigot start - Prevent tile entity and entity crashes
+ Block block = this.w();
+ if ( block != null )
+ {
+ if (block != null) {
+ CrashReportSystemDetails.a(crashreportsystemdetails, this.position, this.w(), this.u());
+ }
+ // PaperSpigot end
crashreportsystemdetails.a("Actual block type", (Callable) (new CrashReportTileEntityType(this)));
crashreportsystemdetails.a("Actual block data value", (Callable) (new CrashReportTileEntityData(this)));
}
crashreportsystemdetails.a("Actual block type", new Callable() {
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 e2988a0..3ea9c92 100644
index 698e3d9..91998cc 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -1419,10 +1419,13 @@ public abstract class World implements IBlockAccess {
@@ -1432,10 +1432,13 @@ public abstract class World implements IBlockAccess {
this.g(entity);
SpigotTimings.tickEntityTimer.stopTiming(); // Spigot
} catch (Throwable throwable1) {
@ -45,7 +44,7 @@ index e2988a0..3ea9c92 100644
}
}
@@ -1489,11 +1492,13 @@ public abstract class World implements IBlockAccess {
@@ -1501,11 +1504,13 @@ public abstract class World implements IBlockAccess {
tileentity.tickTimer.startTiming(); // Spigot
((IUpdatePlayerListBox) tileentity).c();
} catch (Throwable throwable2) {
@ -65,5 +64,5 @@ index e2988a0..3ea9c92 100644
// Spigot start
finally {
--
1.9.5.msysgit.0
1.9.1

Datei anzeigen

@ -1,14 +1,14 @@
From 8037f86a24fd4ba5a90e088bc811bf4c810821a8 Mon Sep 17 00:00:00 2001
From 2ee7ab93b17fd721016e8891dbe6b42859019592 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Mon, 23 Feb 2015 14:57:28 -0600
Subject: [PATCH] Configurable top of nether void damage
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 4848e09..be59806 100644
index 1470c21..79837ef 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -246,6 +246,13 @@ public abstract class Entity implements ICommandListener {
@@ -247,6 +247,13 @@ public abstract class Entity implements ICommandListener {
this.K();
}
@ -22,7 +22,7 @@ index 4848e09..be59806 100644
public void K() {
this.world.methodProfiler.a("entityBaseTick");
if (this.vehicle != null && this.vehicle.dead) {
@@ -322,7 +329,7 @@ public abstract class Entity implements ICommandListener {
@@ -323,7 +330,7 @@ public abstract class Entity implements ICommandListener {
this.fallDistance *= 0.5F;
}
@ -32,10 +32,10 @@ index 4848e09..be59806 100644
}
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
index bdf06fb..a756395 100644
index f33142a..a6d8532 100644
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
@@ -185,4 +185,10 @@ public class PaperSpigotWorldConfig
@@ -186,4 +186,10 @@ public class PaperSpigotWorldConfig
{
boatsDropBoats = getBoolean( "game-mechanics.boats-drop-boats", false );
}
@ -47,5 +47,5 @@ index bdf06fb..a756395 100644
+ }
}
--
1.9.5.msysgit.0
1.9.1

Datei anzeigen

@ -1,154 +0,0 @@
From 21634289a89ad5e111cfd9314ee98038484c16d2 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 19 Dec 2014 16:28:22 -0600
Subject: [PATCH] Remove CraftBukkit "Feature" of ItemStack's having infinite
use if less than 0 stack size
diff --git a/src/main/java/net/minecraft/server/DispenseBehaviorItem.java b/src/main/java/net/minecraft/server/DispenseBehaviorItem.java
index 63388cf..0195cdc 100644
--- a/src/main/java/net/minecraft/server/DispenseBehaviorItem.java
+++ b/src/main/java/net/minecraft/server/DispenseBehaviorItem.java
@@ -10,6 +10,7 @@ public class DispenseBehaviorItem implements IDispenseBehavior {
public DispenseBehaviorItem() {}
public final ItemStack a(ISourceBlock isourceblock, ItemStack itemstack) {
+ if (itemstack != null && itemstack.count < 0) itemstack.count = 0; // PaperSpigot - Remove CB 'feature' of infinite items
ItemStack itemstack1 = this.b(isourceblock, itemstack);
this.a(isourceblock);
diff --git a/src/main/java/net/minecraft/server/EntityAgeable.java b/src/main/java/net/minecraft/server/EntityAgeable.java
index 23091bd..930682a 100644
--- a/src/main/java/net/minecraft/server/EntityAgeable.java
+++ b/src/main/java/net/minecraft/server/EntityAgeable.java
@@ -60,7 +60,7 @@ public abstract class EntityAgeable extends EntityCreature {
if (!entityhuman.abilities.canInstantlyBuild) {
--itemstack.count;
- if (itemstack.count == 0) { // CraftBukkit - allow less than 0 stacks as "infinite"
+ if (itemstack.count <= 0) { // PaperSpigot - Remove CB 'feature' of infinite items
entityhuman.inventory.setItem(entityhuman.inventory.itemInHandIndex, (ItemStack) null);
}
}
diff --git a/src/main/java/net/minecraft/server/EntityHorse.java b/src/main/java/net/minecraft/server/EntityHorse.java
index 326c043..f93a291 100644
--- a/src/main/java/net/minecraft/server/EntityHorse.java
+++ b/src/main/java/net/minecraft/server/EntityHorse.java
@@ -635,7 +635,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
}
if (flag) {
- if (!entityhuman.abilities.canInstantlyBuild && --itemstack.count == 0) {
+ if (!entityhuman.abilities.canInstantlyBuild && --itemstack.count <= 0) { // PaperSpigot - Remove CB 'feature' of infinite items
entityhuman.inventory.setItem(entityhuman.inventory.itemInHandIndex, (ItemStack) null);
}
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index 0199856..4f3bc3c 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -563,7 +563,7 @@ public abstract class EntityHuman extends EntityLiving {
public EntityItem a(ItemStack itemstack, boolean flag, boolean flag1) {
if (itemstack == null) {
return null;
- } else if (itemstack.count == 0) {
+ } else if (itemstack.count <= 0) { // PaperSpigot - Remove CB 'feature' of infinite items
return null;
} else {
double d0 = this.locY - 0.30000001192092896D + (double) this.getHeadHeight();
@@ -920,7 +920,7 @@ public abstract class EntityHuman extends EntityLiving {
if (itemstack.a(this, (EntityLiving) entity)) {
// CraftBukkit - bypass infinite items; <= 0 -> == 0
- if (itemstack.count == 0 && !this.abilities.canInstantlyBuild) {
+ if (itemstack.count <= 0 && !this.abilities.canInstantlyBuild) { // PaperSpigot - Remove CB 'feature' of infinite items
this.bZ();
}
diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java
index fa6178b..9547b4d 100644
--- a/src/main/java/net/minecraft/server/ItemStack.java
+++ b/src/main/java/net/minecraft/server/ItemStack.java
@@ -73,6 +73,7 @@ public final class ItemStack {
ItemStack itemstack = new ItemStack();
itemstack.c(nbttagcompound);
+ if (itemstack.count < 0) itemstack.count = 0; // PaperSpigot - Remove CB 'feature' of infinite items
return itemstack.getItem() != null ? itemstack : null;
}
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index a7c629b..ffcbfb2 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -735,7 +735,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
}
itemstack = this.player.inventory.getItemInHand();
- if (itemstack != null && itemstack.count == 0) {
+ if (itemstack != null && itemstack.count <= 0) { // PaperSpigot - Remove CB 'feature' of infinite items
this.player.inventory.items[this.player.inventory.itemInHandIndex] = null;
itemstack = null;
}
diff --git a/src/main/java/net/minecraft/server/PlayerInteractManager.java b/src/main/java/net/minecraft/server/PlayerInteractManager.java
index 7b469e1..06cd711 100644
--- a/src/main/java/net/minecraft/server/PlayerInteractManager.java
+++ b/src/main/java/net/minecraft/server/PlayerInteractManager.java
@@ -342,7 +342,7 @@ public class PlayerInteractManager {
if (itemstack1 != null) {
itemstack1.a(this.world, iblockdata.getBlock(), blockposition, this.player);
- if (itemstack1.count == 0) {
+ if (itemstack1.count <= 0) { // PaperSpigot - Remove CB 'feature' of infinite items
this.player.bZ();
}
}
@@ -381,7 +381,7 @@ public class PlayerInteractManager {
}
}
- if (itemstack1.count == 0) {
+ if (itemstack1.count <= 0) { // PaperSpigot - Remove CB 'feature' of infinite items
entityhuman.inventory.items[entityhuman.inventory.itemInHandIndex] = null;
}
diff --git a/src/main/java/net/minecraft/server/PlayerInventory.java b/src/main/java/net/minecraft/server/PlayerInventory.java
index 1c27843..ea593e5 100644
--- a/src/main/java/net/minecraft/server/PlayerInventory.java
+++ b/src/main/java/net/minecraft/server/PlayerInventory.java
@@ -515,7 +515,7 @@ public class PlayerInventory implements IInventory {
public ItemStack getCarried() {
// CraftBukkit start
- if (this.f != null && this.f.count == 0) {
+ if (this.f != null && this.f.count <= 0) { // PaperSpigot - Remove CB 'feature' of infinite items
this.setCarried(null);
}
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/server/Slot.java b/src/main/java/net/minecraft/server/Slot.java
index 3e8e7af..6c246a5 100644
--- a/src/main/java/net/minecraft/server/Slot.java
+++ b/src/main/java/net/minecraft/server/Slot.java
@@ -52,6 +52,7 @@ public class Slot {
}
public void set(ItemStack itemstack) {
+ if (itemstack != null && itemstack.count < 0) itemstack.count = 0; // PaperSpigot - Remove CB 'feature' of infinite items
this.inventory.setItem(this.index, itemstack);
this.f();
}
diff --git a/src/main/java/net/minecraft/server/TileEntityDispenser.java b/src/main/java/net/minecraft/server/TileEntityDispenser.java
index 040a69f..3269d39 100644
--- a/src/main/java/net/minecraft/server/TileEntityDispenser.java
+++ b/src/main/java/net/minecraft/server/TileEntityDispenser.java
@@ -100,6 +100,7 @@ public class TileEntityDispenser extends TileEntityContainer implements IInvento
public void setItem(int i, ItemStack itemstack) {
this.items[i] = itemstack;
+ if (itemstack != null && itemstack.count < 0) itemstack.count = 0; // PaperSpigot - Remove CB 'feature' of infinite items
if (itemstack != null && itemstack.count > this.getMaxStackSize()) {
itemstack.count = this.getMaxStackSize();
}
--
1.9.5.msysgit.0

Datei anzeigen

@ -1,14 +1,14 @@
From 9cd798fbfcb245029b35c8caad7b2754ba38f553 Mon Sep 17 00:00:00 2001
From 82519270768b7b9abc1c721eeca22a6b0714f855 Mon Sep 17 00:00:00 2001
From: Zach <zach.brown@destroystokyo.com>
Date: Fri, 13 Feb 2015 14:49:30 -0600
Subject: [PATCH] Enderman drop the block they're holding when they die
diff --git a/src/main/java/net/minecraft/server/EntityEnderman.java b/src/main/java/net/minecraft/server/EntityEnderman.java
index fe198c9..6c85f3d 100644
index 2bf00b0..ef8225b 100644
--- a/src/main/java/net/minecraft/server/EntityEnderman.java
+++ b/src/main/java/net/minecraft/server/EntityEnderman.java
@@ -239,6 +239,13 @@ public class EntityEnderman extends EntityMonster {
@@ -251,6 +251,13 @@ public class EntityEnderman extends EntityMonster {
}
}
@ -23,5 +23,5 @@ index fe198c9..6c85f3d 100644
public void setCarried(IBlockData iblockdata) {
--
1.9.5.msysgit.0
1.9.1

Datei anzeigen

@ -1,13 +1,13 @@
From a67ca6c100a61600fa215e1b6b0872bc62ebdd4a Mon Sep 17 00:00:00 2001
From ec5c9469d4ea7c4fa2c526e823ffc4a29ecdb436 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Mon, 23 Feb 2015 15:54:17 -0600
Date: Sun, 8 Mar 2015 04:52:37 -0500
Subject: [PATCH] PaperSpigot TNT Changes
PaperSpigot communal TNT modification patch
Original authors for individual changes are listed w/in PaperSpigotWorldConfig
diff --git a/src/main/java/net/minecraft/server/EntityTNTPrimed.java b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
index ddff5a8..7c94d99 100644
index 1daba4e..dd1ad68 100644
--- a/src/main/java/net/minecraft/server/EntityTNTPrimed.java
+++ b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
@@ -36,6 +36,12 @@ public class EntityTNTPrimed extends Entity {
@ -62,49 +62,15 @@ index ddff5a8..7c94d99 100644
+ * PaperSpigot - Configurable TNT water movement
+ */
+ @Override
+ public boolean aK() {
+ public boolean aL() {
+ return world.paperSpigotConfig.tntMovesInWater;
+ }
}
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 3ea9c92..5deeb76 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -1889,6 +1889,11 @@ public abstract class World implements IBlockAccess {
double d1 = 1.0D / ((axisalignedbb.e - axisalignedbb.b) * 2.0D + 1.0D);
double d2 = 1.0D / ((axisalignedbb.f - axisalignedbb.c) * 2.0D + 1.0D);
+ // PaperSpigot start - Fix TNT directional bias
+ double xOffset = (1.0 - Math.floor(1.0 / d0) * d0) / 2.0;
+ double zOffset = (1.0 - Math.floor(1.0 / d2) * d2) / 2.0;
+ // PaperSpigot end
+
if (d0 >= 0.0D && d1 >= 0.0D && d2 >= 0.0D) {
int i = 0;
int j = 0;
@@ -1900,7 +1905,16 @@ public abstract class World implements IBlockAccess {
double d4 = axisalignedbb.b + (axisalignedbb.e - axisalignedbb.b) * (double) f1;
double d5 = axisalignedbb.c + (axisalignedbb.f - axisalignedbb.c) * (double) f2;
- if (this.rayTrace(new Vec3D(d3, d4, d5), vec3d) == null) {
+ // PaperSpigot start - Fix TNT directional bias
+ Vec3D vec3d1;
+ if (this.paperSpigotConfig.fixTNTDirectionBias) {
+ vec3d1 = new Vec3D(xOffset, d4, zOffset + d5);
+ } else {
+ vec3d1 = new Vec3D(d3, d4, d5);
+ }
+
+ if (this.rayTrace(vec3d1, vec3d) == null) {
+ // PaperSpigot end
++i;
}
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
index a756395..720b4a7 100644
index a6d8532..ceb5e64 100644
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
@@ -191,4 +191,36 @@ public class PaperSpigotWorldConfig
@@ -192,4 +192,35 @@ public class PaperSpigotWorldConfig
{
netherVoidTopDamage = getBoolean( "nether-ceiling-void-damage", false );
}
@ -115,7 +81,7 @@ index a756395..720b4a7 100644
+ public int tntHeightLimit;
+ private void tntChanges()
+ {
+ // Original Authors: Iceee <andrew@opticgaming.tv> and Jedediah Smith <jedediah@silencegreys.com>
+ // Original Authors: Iceee <andrew@opticgaming.tv>
+ fixTNTDirectionBias = getBoolean( "tnt-gameplay.fix-directional-bias", false );
+ // Original Author: Byteflux <byte@byteflux.net>
+ tntMovesInWater = getBoolean( "tnt-gameplay.moves-in-water", true );
@ -132,7 +98,6 @@ index a756395..720b4a7 100644
+ } else {
+ log( "TNT height limit disabled" );
+ }
+
+ if (PaperSpigotConfig.version < 7) {
+ System.err.println( "==========================================" );
+ System.err.println( " Many TNT Related Settings Have Moved " );
@ -142,5 +107,5 @@ index a756395..720b4a7 100644
+ }
}
--
1.9.5.msysgit.0
1.9.1

Datei anzeigen

@ -1,11 +1,11 @@
From c5fdb8aa93f070a26da634ae211991f57bbb33fa Mon Sep 17 00:00:00 2001
From f4fe33616c5bdeb316e1ff4752facc9918f5c41c Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Thu, 5 Mar 2015 15:30:06 -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 b187aed..4eefefc 100644
index 007846a..8f05851 100644
--- a/src/main/java/net/minecraft/server/WorldNBTStorage.java
+++ b/src/main/java/net/minecraft/server/WorldNBTStorage.java
@@ -202,7 +202,7 @@ public class WorldNBTStorage implements IDataManager, IPlayerFileData {
@ -18,5 +18,5 @@ index b187aed..4eefefc 100644
file = new File( this.playerDir, UUID.nameUUIDFromBytes( ( "OfflinePlayer:" + entityhuman.getName() ).getBytes( "UTF-8" ) ).toString() + ".dat");
if ( file.exists() )
--
1.9.5.msysgit.0
1.9.1