Update PaperSpigot to Minecraft 1.8.3

This commit is contained in:
Zach Brown
2015-03-07 19:16:09 -06:00
parent 64cd5dcd0c
commit 6538ccd924
44 changed files with 813 additions and 726 deletions

View File

@@ -24,7 +24,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
- <artifactId>spigot-api</artifactId> - <artifactId>spigot-api</artifactId>
+ <groupId>org.github.paperspigot</groupId> + <groupId>org.github.paperspigot</groupId>
+ <artifactId>paperspigot-api</artifactId> + <artifactId>paperspigot-api</artifactId>
<version>1.8-R0.1-SNAPSHOT</version> <version>1.8.3-R0.1-SNAPSHOT</version>
<packaging>jar</packaging> <packaging>jar</packaging>
- <name>Spigot-API</name> - <name>Spigot-API</name>

View File

@@ -1,6 +1,6 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Zach Brown <1254957+zachbr@users.noreply.github.com> From: Zach Brown <1254957+zachbr@users.noreply.github.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 Subject: [PATCH] Ability to disable asynccatcher
@@ -10,15 +10,16 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+++ b/src/main/java/org/github/paperspigot/PaperSpigotConfig.java +++ b/src/main/java/org/github/paperspigot/PaperSpigotConfig.java
@@ -0,0 +0,0 @@ public class PaperSpigotConfig @@ -0,0 +0,0 @@ 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; + public static boolean asyncCatcherFeature;
+ private static void asyncCatcherFeature() + private static void asyncCatcherFeature()
+ { + {
+ asyncCatcherFeature = getBoolean( "settings.async-plugin-bad-magic-catcher", true ); + asyncCatcherFeature = getBoolean( "settings.async-plugin-bad-magic-catcher", true );
+ if (!asyncCatcherFeature) { + if ( !asyncCatcherFeature )
+ Bukkit.getLogger().log( Level.INFO, "Disabling async plugin bad ju-ju catcher, this may be bad depending on your plugins" ); + {
+ Bukkit.getLogger().log( Level.INFO, "Disabling async plugin bad ju-ju catcher, this is not recommended and may cause issues" );
+ } + }
+ } + }
} }
@@ -35,6 +36,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
public static void catchOp(String reason) public static void catchOp(String reason)
{ {
-- --
1.9.5.msysgit.0

View File

@@ -1,6 +1,6 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> 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 Subject: [PATCH] Add TNT source location API
@@ -11,8 +11,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
@@ -0,0 +0,0 @@ public class BlockTNT extends Block { @@ -0,0 +0,0 @@ public class BlockTNT extends Block {
public void wasExploded(World world, BlockPosition blockposition, Explosion explosion) { public void wasExploded(World world, BlockPosition blockposition, Explosion explosion) {
if (!world.isStatic) { if (!world.isClientSide) {
- 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()); - 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 + 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 + 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,27 +20,27 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
world.addEntity(entitytntprimed); world.addEntity(entitytntprimed);
@@ -0,0 +0,0 @@ public class BlockTNT extends Block { @@ -0,0 +0,0 @@ public class BlockTNT extends Block {
public void a(World world, BlockPosition blockposition, IBlockData iblockdata, EntityLiving entityliving) { public void a(World world, BlockPosition blockposition, IBlockData iblockdata, EntityLiving entityliving) {
if (!world.isStatic) { if (!world.isClientSide) {
if (((Boolean) iblockdata.get(BlockTNT.EXPLODE)).booleanValue()) { 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 + 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 + 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.addEntity(entitytntprimed);
world.makeSound(entitytntprimed, "game.tnt.primed", 1.0F, 1.0F); 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 diff --git a/src/main/java/net/minecraft/server/DispenserRegistry.java b/src/main/java/net/minecraft/server/DispenserRegistry.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/server/DispenseBehaviorTNT.java --- a/src/main/java/net/minecraft/server/DispenserRegistry.java
+++ b/src/main/java/net/minecraft/server/DispenseBehaviorTNT.java +++ b/src/main/java/net/minecraft/server/DispenserRegistry.java
@@ -0,0 +0,0 @@ final class DispenseBehaviorTNT extends DispenseBehaviorItem { @@ -0,0 +0,0 @@ public class DispenserRegistry {
} }
} }
- EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(world, event.getVelocity().getX(), event.getVelocity().getY(), event.getVelocity().getZ(), (EntityLiving) null); - EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(world, event.getVelocity().getX(), event.getVelocity().getY(), event.getVelocity().getZ(), (EntityLiving) null);
+ EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(block.getLocation(), world, event.getVelocity().getX(), event.getVelocity().getY(), event.getVelocity().getZ(), (EntityLiving) null); // PaperSpigot + EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(block.getLocation(), world, event.getVelocity().getX(), event.getVelocity().getY(), event.getVelocity().getZ(), (EntityLiving) null); // PaperSpigot
// CraftBukkit end // CraftBukkit end
world.addEntity(entitytntprimed); world.addEntity(entitytntprimed);
diff --git a/src/main/java/net/minecraft/server/EntityTNTPrimed.java b/src/main/java/net/minecraft/server/EntityTNTPrimed.java diff --git a/src/main/java/net/minecraft/server/EntityTNTPrimed.java b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/server/EntityTNTPrimed.java --- a/src/main/java/net/minecraft/server/EntityTNTPrimed.java
@@ -57,11 +57,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ } + }
+ +
+ public EntityTNTPrimed(org.bukkit.Location loc, World world) { + public EntityTNTPrimed(org.bukkit.Location loc, World world) {
+ // PaperSpigot end
super(world); super(world);
+ sourceLoc = loc; // PaperSpigot + sourceLoc = loc;
+ // PaperSpigot end
this.k = true; 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) { - public EntityTNTPrimed(World world, double d0, double d1, double d2, EntityLiving entityliving) {
@@ -127,6 +127,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ } + }
+ // PaperSpigot end + // PaperSpigot end
} }
-- --
1.9.5.msysgit.0

View File

@@ -1,27 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Zach Brown <1254957+zachbr@users.noreply.github.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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/server/PacketPlayOutPlayerListHeaderFooter.java
+++ b/src/main/java/net/minecraft/server/PacketPlayOutPlayerListHeaderFooter.java
@@ -0,0 +0,0 @@ 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

View File

@@ -33,6 +33,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
public Chunk getChunkAt(int x, int z) { public Chunk getChunkAt(int x, int z) {
return this.world.chunkProviderServer.getChunkAt(x, z).bukkitChunk; return this.world.chunkProviderServer.getChunkAt(x, z).bukkitChunk;
} }
-- --
1.9.5.msysgit.0

View File

@@ -1,6 +1,6 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Suddenly <suddenly@suddenly.coffee> 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 Subject: [PATCH] Add configurable despawn distances for living entities
@@ -17,30 +17,21 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
this.die(); this.die();
} }
- if (this.aO > 600 && this.random.nextInt(800) == 0 && d3 > 1024.0D) { // CraftBukkit - remove isTypeNotPersistent() check - if (this.ticksFarFromPlayer > 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 > this.world.paperSpigotConfig.softDespawnDistance) { // CraftBukkit - remove isTypeNotPersistent() check // PaperSpigot - custom despawn distance
this.die(); this.die();
- } else if (d3 < 1024.0D) { - } else if (d3 < 1024.0D) {
+ } else if (d3 < this.world.paperSpigotConfig.softDespawnDistance) { // PaperSpigot - custom despawn distances + } 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 diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java --- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java +++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
@@ -0,0 +0,0 @@ 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);
}
@@ -0,0 +0,0 @@ public class PaperSpigotWorldConfig @@ -0,0 +0,0 @@ public class PaperSpigotWorldConfig
blockBreakExhaustion = getFloat( "player-exhaustion.block-break", 0.025F ); 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; + public int softDespawnDistance;
@@ -50,7 +41,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ softDespawnDistance = getInt( "despawn-ranges.soft", 32 ); // 32^2 = 1024, Minecraft Default + softDespawnDistance = getInt( "despawn-ranges.soft", 32 ); // 32^2 = 1024, Minecraft Default
+ hardDespawnDistance = getInt( "despawn-ranges.hard", 128 ); // 128^2 = 16384, Minecraft Default; + hardDespawnDistance = getInt( "despawn-ranges.hard", 128 ); // 128^2 = 16384, Minecraft Default;
+ +
+ if ( softDespawnDistance > hardDespawnDistance) { + if ( softDespawnDistance > hardDespawnDistance ) {
+ softDespawnDistance = hardDespawnDistance; + softDespawnDistance = hardDespawnDistance;
+ } + }
+ +
@@ -60,6 +51,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ hardDespawnDistance = hardDespawnDistance*hardDespawnDistance; + hardDespawnDistance = hardDespawnDistance*hardDespawnDistance;
+ } + }
} }
-- --
1.9.5.msysgit.0

View File

@@ -1,6 +1,6 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Dmck2b <itallhappenedverysuddenly@gmail.com> 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 Subject: [PATCH] Allow for toggling of spawn chunks
@@ -9,13 +9,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
--- a/src/main/java/net/minecraft/server/World.java --- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java
@@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess { @@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess {
this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns(); // CraftBukkit });
this.ticksPerMonsterSpawns = this.getServer().getTicksPerMonsterSpawns(); // CraftBukkit this.getServer().addWorld(this.world);
// CraftBukkit end // CraftBukkit end
+ this.keepSpawnInMemory = this.paperSpigotConfig.keepSpawnInMemory; // PaperSpigot + this.keepSpawnInMemory = this.paperSpigotConfig.keepSpawnInMemory; // PaperSpigot
// Spigot start timings = new SpigotTimings.WorldTimingsHandler(this); // Spigot - code below can generate new world and access timings
this.chunkTickRadius = (byte) ( ( this.getServer().getViewDistance() < 7 ) ? this.getServer().getViewDistance() : 7 ); this.entityLimiter = new org.spigotmc.TickLimiter(spigotConfig.entityMaxTickTime);
this.chunkTickList = new gnu.trove.map.hash.TLongShortHashMap( spigotConfig.chunksPerTick * 5, 0.7f, Long.MIN_VALUE, Short.MIN_VALUE ); 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 diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java --- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
@@ -32,6 +32,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ log( "Keep spawn chunk loaded: " + keepSpawnInMemory ); + log( "Keep spawn chunk loaded: " + keepSpawnInMemory );
+ } + }
} }
-- --
1.9.5.msysgit.0

View File

@@ -1,6 +1,6 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Zach Brown <1254957+zachbr@users.noreply.github.com> From: Zach Brown <1254957+zachbr@users.noreply.github.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 Subject: [PATCH] Allow nerfed mobs to jump
@@ -21,6 +21,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
return; return;
} }
// Spigot End // Spigot End
-- --
1.9.5.msysgit.0

View File

@@ -63,6 +63,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ Bukkit.getLogger().info( "Data value allowed items: " + StringUtils.join(dataValueAllowedItems, ", ") ); + Bukkit.getLogger().info( "Data value allowed items: " + StringUtils.join(dataValueAllowedItems, ", ") );
+ } + }
} }
-- --
1.9.5.msysgit.0

View File

@@ -1,6 +1,6 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Zach Brown <1254957+zachbr@users.noreply.github.com> From: Zach Brown <1254957+zachbr@users.noreply.github.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 Subject: [PATCH] Allow undead horse types to be leashed
@@ -11,18 +11,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
@@ -0,0 +0,0 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener { @@ -0,0 +0,0 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
} }
public boolean ca() { public boolean cb() {
- return !this.cP() && super.ca();
+ // PaperSpigot start - Configurable undead horse leashing + // PaperSpigot start - Configurable undead horse leashing
+ if (this.world.paperSpigotConfig.allowUndeadHorseLeashing) { + if (this.world.paperSpigotConfig.allowUndeadHorseLeashing) {
+ return super.ca(); + return super.cb();
+ } else {
+ return !this.cP() && super.ca();
+ } + }
+ // PaperSpigot end + // 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 diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java --- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
@@ -35,7 +32,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ public boolean allowUndeadHorseLeashing; + public boolean allowUndeadHorseLeashing;
+ private void 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 ); + log( "Allow undead horse types to be leashed: " + allowUndeadHorseLeashing );
+ } + }
} }

View File

@@ -17,6 +17,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
{ {
file = new File( this.playerDir, UUID.nameUUIDFromBytes( ( "OfflinePlayer:" + entityhuman.getName() ).getBytes( "UTF-8" ) ).toString() + ".dat"); file = new File( this.playerDir, UUID.nameUUIDFromBytes( ( "OfflinePlayer:" + entityhuman.getName() ).getBytes( "UTF-8" ) ).toString() + ".dat");
if ( file.exists() ) if ( file.exists() )
-- --
1.9.5.msysgit.0

View File

@@ -1,6 +1,6 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Zach Brown <1254957+zachbr@users.noreply.github.com> From: Zach Brown <1254957+zachbr@users.noreply.github.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 Subject: [PATCH] Configurable baby zombie movement speed
@@ -10,14 +10,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+++ b/src/main/java/net/minecraft/server/EntityZombie.java +++ b/src/main/java/net/minecraft/server/EntityZombie.java
@@ -0,0 +0,0 @@ public class EntityZombie extends EntityMonster { @@ -0,0 +0,0 @@ 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"); 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 c = UUID.fromString("B9766B59-9566-4402-BC1F-2EE2A276D836"); private static final UUID b = UUID.fromString("B9766B59-9566-4402-BC1F-2EE2A276D836");
- private static final AttributeModifier bk = new AttributeModifier(EntityZombie.c, "Baby speed boost", 0.5D, 1); - private static final AttributeModifier c = new AttributeModifier(EntityZombie.b, "Baby speed boost", 0.5D, 1);
+ // PaperSpigot - Configurable baby zombie movement speed + 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 static final AttributeModifier bk = new AttributeModifier(EntityZombie.c, "Baby speed boost", org.github.paperspigot.PaperSpigotConfig.babyZombieMovementSpeed, 1); private final PathfinderGoalBreakDoor bm = new PathfinderGoalBreakDoor(this);
private final PathfinderGoalBreakDoor bl = new PathfinderGoalBreakDoor(this); private int bn;
private int bm; private boolean bo = false;
private boolean bn = false;
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotConfig.java diff --git a/src/main/java/org/github/paperspigot/PaperSpigotConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotConfig.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/github/paperspigot/PaperSpigotConfig.java --- a/src/main/java/org/github/paperspigot/PaperSpigotConfig.java
@@ -30,9 +29,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ public static double babyZombieMovementSpeed; + public static double babyZombieMovementSpeed;
+ private static void 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

View File

@@ -1,6 +1,6 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Zach Brown <1254957+zachbr@users.noreply.github.com> From: Zach Brown <1254957+zachbr@users.noreply.github.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 Subject: [PATCH] Configurable cactus and reed natural growth heights
@@ -13,7 +13,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
} }
- if (i < 3) { - 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(); int j = ((Integer) iblockdata.get(BlockCactus.AGE)).intValue();
if (j >= (byte) range(3, (world.growthOdds / world.spigotConfig.cactusModifier * 15) + 0.5F, 15)) { // Spigot if (j >= (byte) range(3, (world.growthOdds / world.spigotConfig.cactusModifier * 15) + 0.5F, 15)) { // Spigot
@@ -26,7 +26,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
} }
- if (i < 3) { - 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(); int j = ((Integer) iblockdata.get(BlockReed.AGE)).intValue();
if (j >= (byte) range(3, (world.growthOdds / world.spigotConfig.caneModifier * 15) + 0.5F, 15)) { // Spigot if (j >= (byte) range(3, (world.growthOdds / world.spigotConfig.caneModifier * 15) + 0.5F, 15)) { // Spigot
@@ -36,7 +36,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java +++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
@@ -0,0 +0,0 @@ public class PaperSpigotWorldConfig @@ -0,0 +0,0 @@ public class PaperSpigotWorldConfig
playerBlockingDamageMultiplier = getFloat( "player-blocking-damage-multiplier", 0.5F ); 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; + public int cactusMaxHeight;
@@ -45,9 +45,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ { + {
+ cactusMaxHeight = getInt( "max-growth-height.cactus", 3 ); + 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); + log( "Max height for cactus growth " + cactusMaxHeight + ". Max height for reed growth " + reedMaxHeight );
+ } + }
} }
-- --
1.9.5.msysgit.0

View File

@@ -1,6 +1,6 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Zach Brown <1254957+zachbr@users.noreply.github.com> From: Zach Brown <1254957+zachbr@users.noreply.github.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 Subject: [PATCH] Configurable damage multiplier for PvP blocking
@@ -13,7 +13,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
if (!this.isInvulnerable(damagesource)) { if (!this.isInvulnerable(damagesource)) {
if (!damagesource.ignoresArmor() && this.isBlocking() && f > 0.0F) { if (!damagesource.ignoresArmor() && this.isBlocking() && f > 0.0F) {
- f = (1.0F + f) * 0.5F; - 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); f = this.applyArmorModifier(damagesource, f);
@@ -23,16 +23,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java +++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
@@ -0,0 +0,0 @@ public class PaperSpigotWorldConfig @@ -0,0 +0,0 @@ public class PaperSpigotWorldConfig
squidMaxSpawnHeight = getDouble( "squid-spawn-height.maximum", 63.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 );
} }
+ +
+ public float playerBlockingDamageMultiplier; + public float playerBlockingDamageMultiplier;
+ private void playerBlockingDamageMultiplier() + private void playerBlockingDamageMultiplier()
+ { + {
+ playerBlockingDamageMultiplier = getFloat( "player-blocking-damage-multiplier", 0.5F ); + 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

View File

@@ -1,6 +1,6 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Zach Brown <1254957+zachbr@users.noreply.github.com> From: Zach Brown <1254957+zachbr@users.noreply.github.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 Subject: [PATCH] Configurable fishing time ranges
@@ -9,13 +9,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
--- a/src/main/java/net/minecraft/server/EntityFishingHook.java --- a/src/main/java/net/minecraft/server/EntityFishingHook.java
+++ b/src/main/java/net/minecraft/server/EntityFishingHook.java +++ b/src/main/java/net/minecraft/server/EntityFishingHook.java
@@ -0,0 +0,0 @@ public class EntityFishingHook extends Entity { @@ -0,0 +0,0 @@ public class EntityFishingHook extends Entity {
this.av = MathHelper.nextInt(this.random, 20, 80); this.ax = MathHelper.nextInt(this.random, 20, 80);
} }
} else { } else {
- this.au = MathHelper.nextInt(this.random, 100, 900); - this.aw = MathHelper.nextInt(this.random, 100, 900);
+ // PaperSpigot - Configurable fishing tick range + this.aw = MathHelper.nextInt(this.random, this.world.paperSpigotConfig.fishingMinTicks, this.world.paperSpigotConfig.fishingMaxTicks); // PaperSpigot - Configurable fishing tick range
+ this.au = MathHelper.nextInt(this.random, this.world.paperSpigotConfig.fishingMinTicks, this.world.paperSpigotConfig.fishingMaxTicks); this.aw -= EnchantmentManager.h(this.owner) * 20 * 5;
this.au -= 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 diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
@@ -24,7 +23,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java +++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
@@ -0,0 +0,0 @@ public class PaperSpigotWorldConfig @@ -0,0 +0,0 @@ public class PaperSpigotWorldConfig
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); log( "Max height for cactus growth " + cactusMaxHeight + ". Max height for reed growth " + reedMaxHeight );
} }
+ +
+ public int fishingMinTicks; + public int fishingMinTicks;
@@ -35,6 +34,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ fishingMaxTicks = getInt( "fishing-time-range.MaximumTicks", 900 ); + fishingMaxTicks = getInt( "fishing-time-range.MaximumTicks", 900 );
+ } + }
} }
-- --
1.9.5.msysgit.0

View File

@@ -1,6 +1,6 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: gsand <gsandowns@gmail.com> 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 Subject: [PATCH] Configurable game mechanics changes
@@ -10,8 +10,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+++ b/src/main/java/net/minecraft/server/EntityBoat.java +++ b/src/main/java/net/minecraft/server/EntityBoat.java
@@ -0,0 +0,0 @@ public class EntityBoat extends Entity { @@ -0,0 +0,0 @@ public class EntityBoat extends Entity {
if (!destroyEvent.isCancelled()) { if (!destroyEvent.isCancelled()) {
this.die(); this.die();
if (this.world.getGameRules().getBoolean("doEntityDrops")) {
- for (k = 0; k < 3; ++k) { - for (k = 0; k < 3; ++k) {
- this.a(Item.getItemOf(Blocks.PLANKS), 1, 0.0F); - this.a(Item.getItemOf(Blocks.PLANKS), 1, 0.0F);
- } - }
@@ -21,12 +21,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
- } - }
+ breakNaturally(); // PaperSpigot + breakNaturally(); // PaperSpigot
} }
// CraftBukkit end } // CraftBukkit end
} }
@@ -0,0 +0,0 @@ public class EntityBoat extends Entity { @@ -0,0 +0,0 @@ public class EntityBoat extends Entity {
if (!destroyEvent.isCancelled()) { if (!destroyEvent.isCancelled()) {
this.die(); this.die();
if (this.world.getGameRules().getBoolean("doEntityDrops")) {
- int i; - int i;
- -
- for (i = 0; i < 3; ++i) { - for (i = 0; i < 3; ++i) {
@@ -38,7 +38,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
- } - }
+ breakNaturally(); // PaperSpigot + breakNaturally(); // PaperSpigot
} }
// CraftBukkit end } // CraftBukkit end
} }
@@ -0,0 +0,0 @@ public class EntityBoat extends Entity { @@ -0,0 +0,0 @@ public class EntityBoat extends Entity {
public int m() { public int m() {
@@ -77,6 +77,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ boatsDropBoats = getBoolean( "game-mechanics.boats-drop-boats", false ); + boatsDropBoats = getBoolean( "game-mechanics.boats-drop-boats", false );
+ } + }
} }
-- --
1.9.5.msysgit.0

View File

@@ -1,6 +1,6 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net> 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 Subject: [PATCH] Configurable speed for water flowing over lava
@@ -32,7 +32,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ */ + */
+ public int getFlowSpeed(World world, BlockPosition blockposition) { + public int getFlowSpeed(World world, BlockPosition blockposition) {
+ if (this.getMaterial() == Material.WATER && ( + 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.north(1)).getBlock().getMaterial() == Material.LAVA ||
+ world.getType(blockposition.south(1)).getBlock().getMaterial() == Material.LAVA || + world.getType(blockposition.south(1)).getBlock().getMaterial() == Material.LAVA ||
+ world.getType(blockposition.west(1)).getBlock().getMaterial() == Material.LAVA || + world.getType(blockposition.west(1)).getBlock().getMaterial() == Material.LAVA ||
@@ -47,7 +46,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java --- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java +++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
@@ -0,0 +0,0 @@ public class PaperSpigotWorldConfig @@ -0,0 +0,0 @@ public class PaperSpigotWorldConfig
log( "Falling Block Height Limit set to Y: " + fallingBlockHeightNerf); log( "Falling Block Height Limit set to Y: " + fallingBlockHeightNerf );
} }
} }
+ +
@@ -58,6 +57,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ log( "Water over lava flow speed: " + waterOverLavaFlowSpeed ); + log( "Water over lava flow speed: " + waterOverLavaFlowSpeed );
+ } + }
} }
-- --
1.9.5.msysgit.0

View File

@@ -1,6 +1,6 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Zach Brown <1254957+zachbr@users.noreply.github.com> From: Zach Brown <1254957+zachbr@users.noreply.github.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 Subject: [PATCH] Configurable squid spawn ranges
@@ -11,10 +11,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
@@ -0,0 +0,0 @@ public class EntitySquid extends EntityWaterAnimal { @@ -0,0 +0,0 @@ public class EntitySquid extends EntityWaterAnimal {
} }
public boolean bQ() { public boolean bR() {
- return this.locY > 45.0D && this.locY < 63.0D && super.bQ(); - return this.locY > 45.0D && this.locY < (double) this.world.F() && super.bR();
+ // PaperSpigot - Configurable squid spawn range + // 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) { public void b(float f, float f1, float f2) {
@@ -23,7 +23,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java --- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java +++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
@@ -0,0 +0,0 @@ public class PaperSpigotWorldConfig @@ -0,0 +0,0 @@ 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 ); log( "Allow undead horse types to be leashed: " + allowUndeadHorseLeashing );
} }
+ +
@@ -33,9 +33,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ { + {
+ squidMinSpawnHeight = getDouble( "squid-spawn-height.minimum", 45.0D ); + squidMinSpawnHeight = getDouble( "squid-spawn-height.minimum", 45.0D );
+ squidMaxSpawnHeight = getDouble( "squid-spawn-height.maximum", 63.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

View File

@@ -1,6 +1,6 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: gsand <gsandowns@gmail.com> 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 Subject: [PATCH] Configurable strength and weakness effect modifiers
@@ -14,7 +14,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
public double a(int i, AttributeModifier attributemodifier) { public double a(int i, AttributeModifier attributemodifier) {
- return this.id == MobEffectList.WEAKNESS.id ? (double) (-0.5F * (float) (i + 1)) : 1.3D * (double) (i + 1); - 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 + // 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 diff --git a/src/main/java/org/github/paperspigot/PaperSpigotConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotConfig.java
@@ -34,6 +34,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ weaknessEffectModifier = getDouble( "effect-modifiers.weakness", -0.5D ); + weaknessEffectModifier = getDouble( "effect-modifiers.weakness", -0.5D );
+ } + }
} }
-- --
1.9.5.msysgit.0

View File

@@ -46,6 +46,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ netherVoidTopDamage = getBoolean( "nether-ceiling-void-damage", false ); + netherVoidTopDamage = getBoolean( "nether-ceiling-void-damage", false );
+ } + }
} }
-- --
1.9.5.msysgit.0

View File

@@ -1,6 +1,6 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: T00thpick1 <t00thpick1dirko@gmail.com> 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 Subject: [PATCH] Do not remove player in world change
@@ -13,17 +13,17 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
// entityplayer.u().getTracker().untrackEntity(entityplayer); // CraftBukkit // entityplayer.u().getTracker().untrackEntity(entityplayer); // CraftBukkit
entityplayer.u().getPlayerChunkMap().removePlayer(entityplayer); entityplayer.u().getPlayerChunkMap().removePlayer(entityplayer);
- this.players.remove(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); this.server.getWorldServer(entityplayer.dimension).removeEntity(entityplayer);
BlockPosition blockposition = entityplayer.getBed(); BlockPosition blockposition = entityplayer.getBed();
boolean flag1 = entityplayer.isRespawnForced(); boolean flag1 = entityplayer.isRespawnForced();
@@ -0,0 +0,0 @@ public abstract class PlayerList { @@ -0,0 +0,0 @@ public abstract class PlayerList {
if (!entityplayer.playerConnection.isDisconnected()) { if (!entityplayer.playerConnection.isDisconnected()) {
worldserver.getPlayerChunkMap().addPlayer(entityplayer1); worldserver.getPlayerChunkMap().addPlayer(entityplayer1);
worldserver.addEntity(entityplayer1); - worldserver.addEntity(entityplayer1);
- this.players.add(entityplayer1); + //worldserver.addEntity(entityplayer1); // PaperSpigot - Don't remove player in world change. Fixes BUKKIT-4561, BUKKIT-4082, and BUKKIT-2094
+ //this.players.add(entityplayer1); // PaperSpigot - Fixes BUKKIT-4561, BUKKIT-4082, and BUKKIT-2094 this.players.add(entityplayer1);
this.f.put(entityplayer1.getUniqueID(), entityplayer1); this.j.put(entityplayer1.getUniqueID(), entityplayer1);
} }
// Added from changeDimension
-- --

View File

@@ -1,6 +1,6 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net> 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 Subject: [PATCH] Drop falling block entities that are above the specified
height height
@@ -40,11 +40,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ private void fallingBlockheightNerf() + private void fallingBlockheightNerf()
+ { + {
+ fallingBlockHeightNerf = getInt( "falling-block-height-nerf", 0 ); + fallingBlockHeightNerf = getInt( "falling-block-height-nerf", 0 );
+ if (fallingBlockHeightNerf != 0) { + if ( fallingBlockHeightNerf != 0 )
+ log( "Falling Block Height Limit set to Y: " + fallingBlockHeightNerf); + {
+ log( "Falling Block Height Limit set to Y: " + fallingBlockHeightNerf );
+ } + }
+ } + }
} }
-- --
1.9.5.msysgit.0

View File

@@ -22,6 +22,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
} }
public void setCarried(IBlockData iblockdata) { public void setCarried(IBlockData iblockdata) {
-- --
1.9.5.msysgit.0

View File

@@ -1,6 +1,6 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Iceee <andrew@opticgaming.tv> 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 Subject: [PATCH] Fix redstone lag issues
@@ -12,7 +12,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
if (i != this.L.size()) { if (i != this.L.size()) {
throw new IllegalStateException("TickNextTick list out of synch"); throw new IllegalStateException("TickNextTick list out of synch");
} else { } else {
+ // PaperSpigot start - Fix redstone lag issues + // PaperSpigot start - No, stop doing this, it affects things like redstone
+ /* + /*
if (i > 1000) { if (i > 1000) {
// CraftBukkit start - If the server has too much to process over time, try to alleviate that // CraftBukkit start - If the server has too much to process over time, try to alleviate that
@@ -20,9 +20,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
@@ -0,0 +0,0 @@ public class WorldServer extends World implements IAsyncTaskHandler { @@ -0,0 +0,0 @@ public class WorldServer extends World implements IAsyncTaskHandler {
i = 1000; i = 1000;
} }
// CraftBukkit end // CraftBukkit end
+ } */ + */
+
+ if (i > 10000) { + if (i > 10000) {
+ i = 10000; + i = 10000;
} }
@@ -30,6 +29,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
this.methodProfiler.a("cleaning"); this.methodProfiler.a("cleaning");
-- --
1.9.5.msysgit.0

View File

@@ -1,6 +1,6 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> 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 Subject: [PATCH] Further improve server tick loop
Improves how the catchup buffer is handled, allowing it to roll both ways Improves how the catchup buffer is handled, allowing it to roll both ways
@@ -15,7 +15,7 @@ diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs @@ -0,0 +0,0 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
public org.bukkit.command.ConsoleCommandSender console; public org.bukkit.command.ConsoleCommandSender console;
public org.bukkit.command.RemoteConsoleCommandSender remoteConsole; public org.bukkit.command.RemoteConsoleCommandSender remoteConsole;
public ConsoleReader reader; public ConsoleReader reader;
@@ -34,7 +34,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
public MinecraftServer(OptionSet options, Proxy proxy, File file1) { public MinecraftServer(OptionSet options, Proxy proxy, File file1) {
io.netty.util.ResourceLeakDetector.setEnabled( false ); // Spigot - disable io.netty.util.ResourceLeakDetector.setEnabled( false ); // Spigot - disable
@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs @@ -0,0 +0,0 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
this.isRunning = false; this.isRunning = false;
} }
@@ -93,7 +93,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
public void run() { public void run() {
try { try {
@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs @@ -0,0 +0,0 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
this.a(this.r); this.a(this.r);
// Spigot start // Spigot start
@@ -211,6 +211,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
{ {
return ( ( tps > 18.0 ) ? ChatColor.GREEN : ( tps > 16.0 ) ? ChatColor.YELLOW : ChatColor.RED ).toString() return ( ( tps > 18.0 ) ? ChatColor.GREEN : ( tps > 16.0 ) ? ChatColor.YELLOW : ChatColor.RED ).toString()
+ ( ( tps > 20.0 ) ? "*" : "" ) + Math.min( Math.round( tps * 100.0 ) / 100.0, 20.0 ); + ( ( tps > 20.0 ) ? "*" : "" ) + Math.min( Math.round( tps * 100.0 ) / 100.0, 20.0 );
-- --
1.9.5.msysgit.0

View File

@@ -1,10 +1,8 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Iceee <andrew@opticgaming.tv> 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 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 diff --git a/src/main/java/net/minecraft/server/TileEntityChest.java b/src/main/java/net/minecraft/server/TileEntityChest.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
@@ -34,7 +32,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
} }
public void c() { 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(); this.m();
int i = this.position.getX(); int i = this.position.getX();
@@ -43,28 +41,25 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
this.j = 0.0F; this.j = 0.0F;
} }
} }
-
+ */ + */
+ // PaperSpigot end + // PaperSpigot end
} }
public boolean c(int i, int j) {
@@ -0,0 +0,0 @@ public class TileEntityChest extends TileEntityContainer implements IUpdatePlaye @@ -0,0 +0,0 @@ public class TileEntityChest extends TileEntityContainer implements IUpdatePlaye
++this.l; ++this.l;
if (this.world == null) return; // CraftBukkit 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(); + this.m();
+ +
+ if (this.l > 0 && this.j == 0.0F && this.f == null && this.h == null) { + if (this.l > 0 && this.j == 0.0F && this.f == null && this.h == null) {
+ this.j = 0.7F; + this.j = 0.7F;
+ +
+ int locX = this.position.getX(); + double d0 = (double) this.position.getZ() + 0.5D;
+ int locY = this.position.getY(); + double d1 = (double) this.position.getX() + 0.5D;
+ int locZ = this.position.getZ();
+
+ double d0 = (double) locZ + 0.5D;
+ double d1 = (double) locX + 0.5D;
+ +
+ if (this.i != null) { + if (this.i != null) {
+ d0 += 0.5D; + d0 += 0.5D;
@@ -74,7 +69,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ d1 += 0.5D; + 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 + // PaperSpigot end
+ +
@@ -82,17 +77,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
// CraftBukkit start - Call redstone event // CraftBukkit start - Call redstone event
@@ -0,0 +0,0 @@ public class TileEntityChest extends TileEntityContainer implements IUpdatePlaye @@ -0,0 +0,0 @@ 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; --this.l;
if (this.world == null) return; // CraftBukkit if (this.world == null) return; // CraftBukkit
+ +
+ // PaperSpigot start - Move chest close sound handling out of the tick loop + // 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) { + 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; + float f = 0.1F;
+ +
+ if (this.l > 0) { + if (this.l > 0) {
@@ -101,8 +91,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ this.j -= f; + this.j -= f;
+ } + }
+ +
+ double d0 = (double) locX + 0.5D; + double d0 = (double) this.getPosition().getX() + 0.5D;
+ double d2 = (double) locZ + 0.5D; + double d2 = (double) this.getPosition().getZ() + 0.5D;
+ +
+ if (this.i != null) { + if (this.i != null) {
+ d2 += 0.5D; + d2 += 0.5D;
@@ -112,14 +102,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ d0 += 0.5D; + 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; + this.j = 0.0F;
+ } + }
+ // PaperSpigot end + // PaperSpigot end
+ +
this.world.playBlockAction(this.position, this.w(), 1, this.l); this.world.playBlockAction(this.position, this.w(), 1, this.l);
// CraftBukkit start - Call redstone event // 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 diff --git a/src/main/java/net/minecraft/server/TileEntityEnderChest.java b/src/main/java/net/minecraft/server/TileEntityEnderChest.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
@@ -139,20 +128,21 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
public TileEntityEnderChest() {} public TileEntityEnderChest() {}
public void c() { 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); this.world.playBlockAction(this.position, Blocks.ENDER_CHEST, 1, this.g);
} }
@@ -0,0 +0,0 @@ public class TileEntityEnderChest extends TileEntity implements IUpdatePlayerLis @@ -0,0 +0,0 @@ public class TileEntityEnderChest extends TileEntity implements IUpdatePlayerLis
this.a = 0.0F; this.a = 0.0F;
} }
} }
-
+ */ + */
+ // PaperSpigot end + // PaperSpigot end
} }
public boolean c(int i, int j) {
@@ -0,0 +0,0 @@ public class TileEntityEnderChest extends TileEntity implements IUpdatePlayerLis @@ -0,0 +0,0 @@ public class TileEntityEnderChest extends TileEntity implements IUpdatePlayerLis
public void b() { public void b() {
@@ -162,14 +152,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ if (this.g > 0 && this.a == 0.0F) { + if (this.g > 0 && this.a == 0.0F) {
+ this.a = 0.7F; + this.a = 0.7F;
+ +
+ int locX = this.position.getX(); + double d1 = (double) this.getPosition().getX() + 0.5D;
+ int locY = this.position.getY(); + double d0 = (double) this.getPosition().getZ() + 0.5D;
+ int locZ = this.position.getZ();
+ +
+ double d1 = (double) locX + 0.5D; + this.world.makeSound(d1, (double) this.getPosition().getY() + 0.5D, d0, "random.chestopen", 0.5F, this.world.random.nextFloat() * 0.1F + 0.9F);
+ 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);
+ } + }
+ // PaperSpigot end + // PaperSpigot end
+ +
@@ -181,15 +167,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ +
+ // PaperSpigot start - Move enderchest close sounds out of the tick loop + // 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) { + if (this.g == 0 && this.a > 0.0F || this.g > 0 && this.a < 1.0F) {
+ int locX = this.position.getX(); + double d0 = (double) this.getPosition().getX() + 0.5D;
+ int locY = this.position.getY(); + double d2 = (double) this.getPosition().getZ() + 0.5D;
+ 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);
+ +
+ 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; + this.a = 0.0F;
+ } + }
+ // PaperSpigot end + // PaperSpigot end
@@ -197,6 +178,19 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
this.world.playBlockAction(this.position, Blocks.ENDER_CHEST, 1, this.g); 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
1.9.5.msysgit.0 index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/github/paperspigot/WorldTileEntityList.java
+++ b/src/main/java/org/github/paperspigot/WorldTileEntityList.java
@@ -0,0 +0,0 @@ public class WorldTileEntityList extends HashSet<TileEntity> {
TileEntityCommand.class,
TileEntitySkull.class,
TileEntityComparator.class,
- TileEntityFlowerPot.class
+ TileEntityFlowerPot.class,
+ TileEntityChest.class,
+ TileEntityEnderChest.class
}) {
put(ignored, -1);
}
--

View File

@@ -23,6 +23,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
} }
@Override @Override
-- --
1.9.5.msysgit.0

View File

@@ -1,6 +1,6 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> 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 Subject: [PATCH] Optimize TileEntity Ticking
@@ -9,10 +9,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
--- a/src/main/java/net/minecraft/server/TileEntity.java --- a/src/main/java/net/minecraft/server/TileEntity.java
+++ b/src/main/java/net/minecraft/server/TileEntity.java +++ b/src/main/java/net/minecraft/server/TileEntity.java
@@ -0,0 +0,0 @@ public abstract class TileEntity { @@ -0,0 +0,0 @@ public abstract class TileEntity {
} private int h;
// Spigot end protected Block e;
+ // PaperSpigot start - Optimized TileEntity Tick changes + // PaperSpigot start - Optimized TileEntity tick changes
+ private static int tileEntityCounter = 0; + private static int tileEntityCounter = 0;
+ public boolean isAdded = false; + public boolean isAdded = false;
+ public int tileId = tileEntityCounter++; + public int tileId = tileEntityCounter++;
@@ -30,7 +30,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
public void c() { public void c() {
- if (this.world.getTime() % 80L == 0L) { - 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(); this.m();
} }
@@ -42,8 +42,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
++this.n; ++this.n;
float f; float f;
- if (!this.world.isStatic && this.l != 0 && (this.n + i + j + k) % 200 == 0) { - if (!this.world.isClientSide && 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) % 10 == 0) { // PaperSpigot - Reduced 200 -> 10 due to reduced interval from improved tick handling
this.l = 0; this.l = 0;
f = 5.0F; 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))); 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)));
@@ -56,7 +56,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
public void c() { public void c() {
- if (++this.h % 20 * 4 == 0) { - 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); this.world.playBlockAction(this.position, Blocks.ENDER_CHEST, 1, this.g);
} }
@@ -68,53 +68,40 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
public TileEntityLightDetector() {} public TileEntityLightDetector() {}
public void c() { 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) {
+ 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*/) { // PaperSpigot - interval controlled by improved tick handling
this.e = this.w(); this.e = this.w();
if (this.e instanceof BlockDaylightDetector) { 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 diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/server/World.java --- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java
@@ -0,0 +0,0 @@ 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
@@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess { @@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess {
// Spigot end // Spigot end
protected final List g = Lists.newArrayList(); protected final List<Entity> g = Lists.newArrayList();
public final List h = Lists.newArrayList(); public final List<TileEntity> h = Lists.newArrayList();
- public final List tileEntityList = Lists.newArrayList(); - public final List<TileEntity> tileEntityList = Lists.newArrayList();
+ public final Set tileEntityList = new org.github.paperspigot.WorldTileEntityList(this); // PaperSpigot + public final Set<TileEntity> tileEntityList = new org.github.paperspigot.WorldTileEntityList(this); // PaperSpigot
private final List a = Lists.newArrayList(); private final List<TileEntity> b = Lists.newArrayList();
private final List b = Lists.newArrayList(); private final List<TileEntity> c = Lists.newArrayList();
public final List players = Lists.newArrayList(); public final List<EntityHuman> players = Lists.newArrayList();
@@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess { @@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess {
public static boolean haveWeSilencedAPhysicsCrash;
public static String blockLocation; 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 entityLimiter;
- private org.spigotmc.TickLimiter tileLimiter; - private org.spigotmc.TickLimiter tileLimiter;
- private int tileTickPosition; - private int tileTickPosition;
+ //private org.spigotmc.TickLimiter tileLimiter; // PaperSpigot - Disable Spigot's TE handling in favor of our own + // PaperSpigot start - Disable Spigot's TE handling in favor of our own
+ //private int tileTickPosition; // PaperSpigot - 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) public static long chunkToKey(int x, int z)
{ {
@@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess { @@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess {
this.getServer().addWorld(this.world); // CraftBukkit this.keepSpawnInMemory = this.paperSpigotConfig.keepSpawnInMemory; // PaperSpigot
timings = new SpigotTimings.WorldTimingsHandler(this); // Spigot - code below can generate new world and access timings timings = new SpigotTimings.WorldTimingsHandler(this); // Spigot - code below can generate new world and access timings
this.entityLimiter = new org.spigotmc.TickLimiter(spigotConfig.entityMaxTickTime); this.entityLimiter = new org.spigotmc.TickLimiter(spigotConfig.entityMaxTickTime);
- this.tileLimiter = new org.spigotmc.TickLimiter(spigotConfig.tileMaxTickTime); - this.tileLimiter = new org.spigotmc.TickLimiter(spigotConfig.tileMaxTickTime);
+ //this.tileLimiter = new org.spigotmc.TickLimiter(spigotConfig.tileMaxTickTime); // PaperSpigot - Disable Spigot's TE handling in favor of our own + //this.tileLimiter = new org.spigotmc.TickLimiter(spigotConfig.tileMaxTickTime); // PaperSpigot - Disable Spigot's TE handling in favor of our own
@@ -122,12 +109,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
public World b() { public World b() {
@@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess { @@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess {
}
// CraftBukkit end // 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(); + Iterator iterator = this.tileEntityList.iterator();
+
+ while (iterator.hasNext()) { + while (iterator.hasNext()) {
+ TileEntity tileentity = (TileEntity) iterator.next(); + TileEntity tileentity = (TileEntity) iterator.next();
+ /* + /*
@@ -182,9 +169,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ // Use -1 for no ticking + // Use -1 for no ticking
+ // These TE's have empty tick methods, doing nothing. Never bother ticking them. + // These TE's have empty tick methods, doing nothing. Never bother ticking them.
+ for (Class<? extends TileEntity> ignored : new Class[]{ + for (Class<? extends TileEntity> ignored : new Class[]{
+ TileEntityChest.class, // PaperSpigot - Don't tick chests either + BlockJukeBox.TileEntityRecordPlayer.class,
+ TileEntityEnderChest.class, // PaperSpigot - Don't tick chests either
+ TileEntityRecordPlayer.class,
+ TileEntityDispenser.class, + TileEntityDispenser.class,
+ TileEntityDropper.class, + TileEntityDropper.class,
+ TileEntitySign.class, + TileEntitySign.class,
@@ -201,11 +186,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ // does findPlayer lookup, so this helps performance to slow down + // does findPlayer lookup, so this helps performance to slow down
+ put(TileEntityEnchantTable.class, 20); + 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 + // Vanilla controlled values - These are checks already done in vanilla, so don't tick on ticks we know
+ // won't do anything anyways + // won't do anything anyways
+ put(TileEntityBeacon.class, 80); + put(TileEntityBeacon.class, 80);
@@ -339,6 +319,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ } + }
+} +}
\ No newline at end of file \ No newline at end of file
-- --
1.9.5.msysgit.0

View File

@@ -1,7 +1,7 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Zach Brown <1254957+zachbr@users.noreply.github.com> From: Zach Brown <1254957+zachbr@users.noreply.github.com>
Date: Mon, 12 Jan 2015 11:21:04 -0600 Date: Sat, 7 Mar 2015 19:16:09 -0600
Subject: [PATCH] POM changes Subject: [PATCH] POM Changes
diff --git a/pom.xml b/pom.xml diff --git a/pom.xml b/pom.xml
@@ -17,7 +17,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ <groupId>org.github.paperspigot</groupId> + <groupId>org.github.paperspigot</groupId>
+ <artifactId>paperspigot</artifactId> + <artifactId>paperspigot</artifactId>
<packaging>jar</packaging> <packaging>jar</packaging>
<version>1.8-R0.1-SNAPSHOT</version> <version>1.8.3-R0.1-SNAPSHOT</version>
- <name>Spigot</name> - <name>Spigot</name>
- <url>http://www.spigotmc.org</url> - <url>http://www.spigotmc.org</url>
+ <name>PaperSpigot</name> + <name>PaperSpigot</name>
@@ -36,8 +36,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
<version>dev-SNAPSHOT</version> <version>dev-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
@@ -0,0 +0,0 @@
<dependencies> <version>3.0.3</version>
</dependency>
<dependency> <dependency>
- <groupId>org.spigotmc</groupId> - <groupId>org.spigotmc</groupId>
- <artifactId>spigot-api</artifactId> - <artifactId>spigot-api</artifactId>

View File

@@ -1,6 +1,6 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Zach Brown <1254957+zachbr@users.noreply.github.com> From: Zach Brown <1254957+zachbr@users.noreply.github.com>
Date: Mon, 23 Feb 2015 15:54:17 -0600 Date: Sun, 8 Mar 2015 04:52:37 -0500
Subject: [PATCH] PaperSpigot TNT Changes Subject: [PATCH] PaperSpigot TNT Changes
PaperSpigot communal TNT modification patch PaperSpigot communal TNT modification patch
@@ -62,44 +62,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ * PaperSpigot - Configurable TNT water movement + * PaperSpigot - Configurable TNT water movement
+ */ + */
+ @Override + @Override
+ public boolean aK() { + public boolean aL() {
+ return world.paperSpigotConfig.tntMovesInWater; + 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -0,0 +0,0 @@ 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;
@@ -0,0 +0,0 @@ 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 diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java --- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
@@ -115,7 +81,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ public int tntHeightLimit; + public int tntHeightLimit;
+ private void tntChanges() + 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 ); + fixTNTDirectionBias = getBoolean( "tnt-gameplay.fix-directional-bias", false );
+ // Original Author: Byteflux <byte@byteflux.net> + // Original Author: Byteflux <byte@byteflux.net>
+ tntMovesInWater = getBoolean( "tnt-gameplay.moves-in-water", true ); + tntMovesInWater = getBoolean( "tnt-gameplay.moves-in-water", true );
@@ -132,15 +98,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ } else { + } else {
+ log( "TNT height limit disabled" ); + log( "TNT height limit disabled" );
+ } + }
+
+ if (PaperSpigotConfig.version < 7) { + if (PaperSpigotConfig.version < 7) {
+ System.err.println( "==========================================" ); + System.err.println( "==========================================" );
+ System.err.println( " Many TNT Related Settings Have Moved " ); + System.err.println( " Many TNT Related Settings Have Moved " );
+ System.err.println( " Please check your config in paper.yml! " ); + System.err.println( " Please check your config in paper.yml! " );
+ System.err.println( "==========================================" ); + System.err.println( "==========================================" );
+ }
+ } + }
+ }
} }
-- --
1.9.5.msysgit.0

View File

@@ -39,7 +39,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ this.paperSpigotConfig = new org.github.paperspigot.PaperSpigotWorldConfig( worlddata.getName() ); // PaperSpigot + this.paperSpigotConfig = new org.github.paperspigot.PaperSpigotWorldConfig( worlddata.getName() ); // PaperSpigot
this.generator = gen; this.generator = gen;
this.world = new CraftWorld((WorldServer) this, gen, env); 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 diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java

View File

@@ -1,6 +1,6 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: gsand <gsandowns@gmail.com> 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 Subject: [PATCH] Player Exhaustion Multipliers
@@ -14,7 +14,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
entityhuman.b(StatisticList.MINE_BLOCK_COUNT[getId(this)]); entityhuman.b(StatisticList.MINE_BLOCK_COUNT[getId(this)]);
- entityhuman.applyExhaustion(0.025F); - entityhuman.applyExhaustion(0.025F);
+ entityhuman.applyExhaustion(world.paperSpigotConfig.blockBreakExhaustion); // PaperSpigot - Configurable block break exhaustion + 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); 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 diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -35,7 +35,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
- this.applyExhaustion(0.015F * (float) i * 0.01F); - this.applyExhaustion(0.015F * (float) i * 0.01F);
+ this.applyExhaustion(world.paperSpigotConfig.playerSwimmingExhaustion * (float) i * 0.01F); // PaperSpigot - Configurable swimming (diving) exhaustion + 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) { if (d1 > 0.0D) {
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
@@ -48,12 +48,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ +
+ public float blockBreakExhaustion; + public float blockBreakExhaustion;
+ public float playerSwimmingExhaustion; + public float playerSwimmingExhaustion;
+ private void exhaustionValues () + private void exhaustionValues()
+ { + {
+ blockBreakExhaustion = getFloat( "player-exhaustion.block-break", 0.025F ); + 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

View File

@@ -1,6 +1,6 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jedediah Smith <jedediah@silencegreys.com> 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 Subject: [PATCH] Player affects spawning API
@@ -9,11 +9,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
--- a/src/main/java/net/minecraft/server/EntityHuman.java --- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -0,0 +0,0 @@ public abstract class EntityHuman extends EntityLiving { @@ -0,0 +0,0 @@ public abstract class EntityHuman extends EntityLiving {
private final GameProfile bF; private final GameProfile bH;
private boolean bG = false; private boolean bI = false;
public EntityFishingHook hookedFish; public EntityFishingHook hookedFish;
+ public boolean affectsSpawning = true; // PaperSpigot + public boolean affectsSpawning = true; // PaperSpigot
// CraftBukkit start // CraftBukkit start
public boolean fauxSleeping; public boolean fauxSleeping;
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
@@ -22,7 +22,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java +++ b/src/main/java/net/minecraft/server/EntityInsentient.java
@@ -0,0 +0,0 @@ public abstract class EntityInsentient extends EntityLiving { @@ -0,0 +0,0 @@ public abstract class EntityInsentient extends EntityLiving {
if (this.persistent) { if (this.persistent) {
this.aO = 0; this.ticksFarFromPlayer = 0;
} else { } else {
- EntityHuman entityhuman = this.world.findNearbyPlayer(this, -1.0D); - EntityHuman entityhuman = this.world.findNearbyPlayer(this, -1.0D);
+ EntityHuman entityhuman = this.world.findNearbyPlayerWhoAffectsSpawning(this, -1.0D); // PaperSpigot - Affects Spawning API + EntityHuman entityhuman = this.world.findNearbyPlayerWhoAffectsSpawning(this, -1.0D); // PaperSpigot - Affects Spawning API
@@ -38,8 +38,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
BlockPosition blockposition = this.b(); 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); - 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); // 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);
} }
public void c() { public void c() {
@@ -61,44 +60,49 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
float f1 = (float) l3 + 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) { - 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) { // 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 (biomebase_biomemeta == null) {
if (biomemeta == null) { biomebase_biomemeta = worldserver.a(enumcreaturetype, blockposition2);
biomemeta = worldserver.a(enumcreaturetype, blockposition2); if (biomebase_biomemeta == null) {
if (biomemeta == null) {
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/server/World.java --- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java
@@ -0,0 +0,0 @@ package net.minecraft.server;
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;
@@ -0,0 +0,0 @@ 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;
@@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess { @@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess {
return false;
}
+ // PaperSpigot start - Affects spawning API return k >= -short0 && k <= short0 && l >= -short0 && l <= short0 && this.keepSpawnInMemory; // CraftBukkit - Added 'this.keepSpawnInMemory'
}
+
+ // 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) { + public boolean isPlayerNearbyWhoAffectsSpawning(double d0, double d1, double d2, double d3) {
+ for (int i = 0; i < this.players.size(); ++i) { + for (int i = 0; i < this.players.size(); ++i) {
+ EntityHuman entityhuman = (EntityHuman) this.players.get(i); + EntityHuman entityhuman = (EntityHuman) this.players.get(i);
@@ -114,37 +118,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ +
+ return false; + 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 diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -154,18 +128,18 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
getHandle().playerConnection.sendPacket(packet); getHandle().playerConnection.sendPacket(packet);
} }
+ +
+ // PaperSpigot start - Add affects spawning API + // PaperSpigot start - Implement affects spawning API
+ public void setAffectsSpawning(boolean affects) { + @Override
+ getHandle().affectsSpawning = affects;
+ }
+
+ public boolean getAffectsSpawning() { + public boolean getAffectsSpawning() {
+ return getHandle().affectsSpawning; + return getHandle().affectsSpawning;
+ } + }
+
+ @Override
+ public void setAffectsSpawning(boolean affects) {
+ getHandle().affectsSpawning = affects;
+ }
+ // PaperSpigot end + // PaperSpigot end
}; };
public Player.Spigot spigot() public Player.Spigot spigot()
-- --
1.9.5.msysgit.0

View File

@@ -1,6 +1,6 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> 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 Subject: [PATCH] Player lookup improvements
Minecraft and CraftBukkit both use Arrays to store online players, Minecraft and CraftBukkit both use Arrays to store online players,
@@ -17,9 +17,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
--- a/src/main/java/net/minecraft/server/PlayerList.java --- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -0,0 +0,0 @@ public abstract class PlayerList { @@ -0,0 +0,0 @@ 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; 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 + // PaperSpigot start - Player lookup improvements
+ public final Map<String, EntityPlayer> playerMap = new java.util.HashMap<String, EntityPlayer>() { + public final Map<String, EntityPlayer> playerMap = new java.util.HashMap<String, EntityPlayer>() {
+ @Override + @Override
@@ -45,7 +45,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ } + }
+ }; + };
+ // PaperSpigot end + // PaperSpigot end
public final Map f = Maps.newHashMap(); private final Map<UUID, EntityPlayer> j = Maps.newHashMap();
private final GameProfileBanList k; private final GameProfileBanList k;
private final IpBanList l; private final IpBanList l;
@@ -0,0 +0,0 @@ public abstract class PlayerList { @@ -0,0 +0,0 @@ public abstract class PlayerList {
@@ -53,22 +53,22 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
public void onPlayerJoin(EntityPlayer entityplayer, String joinMessage) { // CraftBukkit added param public void onPlayerJoin(EntityPlayer entityplayer, String joinMessage) { // CraftBukkit added param
this.players.add(entityplayer); this.players.add(entityplayer);
+ this.playerMap.put(entityplayer.getName(), entityplayer); // PaperSpigot + this.playerMap.put(entityplayer.getName(), entityplayer); // PaperSpigot
this.f.put(entityplayer.getUniqueID(), entityplayer); this.j.put(entityplayer.getUniqueID(), entityplayer);
// this.sendAll(new PacketPlayOutPlayerInfo(EnumPlayerInfoAction.ADD_PLAYER, new EntityPlayer[] { entityplayer})); // CraftBukkit - replaced with loop below // this.sendAll(new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.ADD_PLAYER, new EntityPlayer[] { entityplayer})); // CraftBukkit - replaced with loop below
WorldServer worldserver = this.server.getWorldServer(entityplayer.dimension); WorldServer worldserver = this.server.getWorldServer(entityplayer.dimension);
@@ -0,0 +0,0 @@ public abstract class PlayerList { @@ -0,0 +0,0 @@ public abstract class PlayerList {
worldserver.kill(entityplayer); worldserver.kill(entityplayer);
worldserver.getPlayerChunkMap().removePlayer(entityplayer); worldserver.getPlayerChunkMap().removePlayer(entityplayer);
this.players.remove(entityplayer); this.players.remove(entityplayer);
+ this.playerMap.remove(entityplayer.getName()); // PaperSpigot + this.playerMap.remove(entityplayer.getName()); // PaperSpigot
this.f.remove(entityplayer.getUniqueID()); UUID uuid = entityplayer.getUniqueID();
this.o.remove(entityplayer.getUniqueID()); EntityPlayer entityplayer1 = (EntityPlayer) this.j.get(uuid);
// CraftBukkit start
@@ -0,0 +0,0 @@ public abstract class PlayerList { @@ -0,0 +0,0 @@ public abstract class PlayerList {
EntityPlayer entityplayer; EntityPlayer entityplayer;
+ // PaperSpigot - Use exact lookup below + // PaperSpigot start - Use exact lookup below
+ /* + /*
for (int i = 0; i < this.players.size(); ++i) { for (int i = 0; i < this.players.size(); ++i) {
entityplayer = (EntityPlayer) this.players.get(i); entityplayer = (EntityPlayer) this.players.get(i);
@@ -79,6 +79,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
entityplayer = (EntityPlayer) iterator.next(); entityplayer = (EntityPlayer) iterator.next();
+ */ + */
+ if ((entityplayer = this.a(uuid)) != null) { + if ((entityplayer = this.a(uuid)) != null) {
+ // PaperSpigot end
savePlayerFile(entityplayer); // CraftBukkit - Force the player's inventory to be saved savePlayerFile(entityplayer); // CraftBukkit - Force the player's inventory to be saved
entityplayer.playerConnection.disconnect("You logged in from another location"); entityplayer.playerConnection.disconnect("You logged in from another location");
} }
@@ -147,7 +148,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ // PaperSpigot start - Improved player lookup, replace whole method + // PaperSpigot start - Improved player lookup, replace whole method
+ EntityPlayer player = playerList.playerMap.get(name); + EntityPlayer player = playerList.playerMap.get(name);
+ return player != null ? player.getBukkitEntity() : null; + return player != null ? player.getBukkitEntity() : null;
+ // PaperSpigot end + // PaperSpigot end
} }
@Override @Override
@@ -170,6 +171,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
} }
public InetSocketAddress getAddress() { public InetSocketAddress getAddress() {
-- --
1.9.5.msysgit.0

View File

@@ -1,6 +1,6 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> 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 Subject: [PATCH] Prevent tile entity and entity crashes
@@ -9,20 +9,19 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
--- a/src/main/java/net/minecraft/server/TileEntity.java --- a/src/main/java/net/minecraft/server/TileEntity.java
+++ b/src/main/java/net/minecraft/server/TileEntity.java +++ b/src/main/java/net/minecraft/server/TileEntity.java
@@ -0,0 +0,0 @@ public abstract class TileEntity { @@ -0,0 +0,0 @@ public abstract class TileEntity {
public void a(CrashReportSystemDetails crashreportsystemdetails) { }
crashreportsystemdetails.a("Name", (Callable) (new CrashReportTileEntityName(this))); });
if (this.world != null) { if (this.world != null) {
- CrashReportSystemDetails.a(crashreportsystemdetails, this.position, this.w(), this.u()); - CrashReportSystemDetails.a(crashreportsystemdetails, this.position, this.w(), this.u());
+ // PaperSpigot start - Prevent tile entity and entity crashes + // PaperSpigot start - Prevent tile entity and entity crashes
+ Block block = this.w(); + Block block = this.w();
+ if ( block != null ) + if (block != null) {
+ {
+ CrashReportSystemDetails.a(crashreportsystemdetails, this.position, this.w(), this.u()); + CrashReportSystemDetails.a(crashreportsystemdetails, this.position, this.w(), this.u());
+ } + }
+ // PaperSpigot end + // PaperSpigot end
crashreportsystemdetails.a("Actual block type", (Callable) (new CrashReportTileEntityType(this))); crashreportsystemdetails.a("Actual block type", new Callable() {
crashreportsystemdetails.a("Actual block data value", (Callable) (new CrashReportTileEntityData(this))); 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 diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/server/World.java --- a/src/main/java/net/minecraft/server/World.java
@@ -64,6 +63,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
} }
// Spigot start // Spigot start
finally { finally {
-- --
1.9.5.msysgit.0

View File

@@ -1,6 +1,6 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Zach Brown <1254957+zachbr@users.noreply.github.com> From: Zach Brown <1254957+zachbr@users.noreply.github.com>
Date: Tue, 19 Aug 2014 14:25:40 -0500 Date: Sat, 7 Mar 2015 22:57:07 -0600
Subject: [PATCH] RIP metrics Subject: [PATCH] RIP metrics
@@ -686,6 +686,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
} }
static void readConfig(Class<?> clazz, Object instance) static void readConfig(Class<?> clazz, Object instance)
-- --
1.9.5.msysgit.0

View File

@@ -1,154 +0,0 @@
From 0000000000000000000000000000000000000000 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/server/DispenseBehaviorItem.java
+++ b/src/main/java/net/minecraft/server/DispenseBehaviorItem.java
@@ -0,0 +0,0 @@ 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/server/EntityAgeable.java
+++ b/src/main/java/net/minecraft/server/EntityAgeable.java
@@ -0,0 +0,0 @@ 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/server/EntityHorse.java
+++ b/src/main/java/net/minecraft/server/EntityHorse.java
@@ -0,0 +0,0 @@ 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -0,0 +0,0 @@ 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();
@@ -0,0 +0,0 @@ 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/server/ItemStack.java
+++ b/src/main/java/net/minecraft/server/ItemStack.java
@@ -0,0 +0,0 @@ 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -0,0 +0,0 @@ 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/server/PlayerInteractManager.java
+++ b/src/main/java/net/minecraft/server/PlayerInteractManager.java
@@ -0,0 +0,0 @@ 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();
}
}
@@ -0,0 +0,0 @@ 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/server/PlayerInventory.java
+++ b/src/main/java/net/minecraft/server/PlayerInventory.java
@@ -0,0 +0,0 @@ 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/server/Slot.java
+++ b/src/main/java/net/minecraft/server/Slot.java
@@ -0,0 +0,0 @@ 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/server/TileEntityDispenser.java
+++ b/src/main/java/net/minecraft/server/TileEntityDispenser.java
@@ -0,0 +0,0 @@ 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

View File

@@ -1,7 +1,7 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Iceee <andrew@opticgaming.tv> From: Iceee <andrew@opticgaming.tv>
Date: Fri, 28 Nov 2014 12:11:03 -0600 Date: Sun, 8 Mar 2015 03:34:15 -0500
Subject: [PATCH] Remove specific entities that fly through an unloaded chunk 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 diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
@@ -9,7 +9,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
--- a/src/main/java/net/minecraft/server/Entity.java --- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java
@@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener { @@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener {
private final CommandObjectiveExecutor as; private final CommandObjectiveExecutor au;
public boolean valid; // CraftBukkit public boolean valid; // CraftBukkit
public org.bukkit.projectiles.ProjectileSource projectileSource; // CraftBukkit - For projectiles only public org.bukkit.projectiles.ProjectileSource projectileSource; // CraftBukkit - For projectiles only
+ public boolean inUnloadedChunk = false; // PaperSpigot - Remove entities in unloaded chunks + public boolean inUnloadedChunk = false; // PaperSpigot - Remove entities in unloaded chunks
@@ -25,8 +25,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
} }
+ // PaperSpigot start - Remove entities in unloaded chunks + // PaperSpigot start - Remove entities in unloaded chunks
+ if (inUnloadedChunk && world.paperSpigotConfig.removeUnloadedEnderPearls) { + if (this.inUnloadedChunk && world.paperSpigotConfig.removeUnloadedEnderPearls) {
+ die(); + this.die();
+ } + }
+ // PaperSpigot end + // PaperSpigot end
+ +
@@ -89,7 +89,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ if (entity instanceof EntityEnderPearl || (!this.isChunkLoaded(i, j, true) && + if (entity instanceof EntityEnderPearl || (!this.isChunkLoaded(i, j, true) &&
+ (entity instanceof EntityFallingBlock && this.paperSpigotConfig.removeUnloadedFallingBlocks) || + (entity instanceof EntityFallingBlock && this.paperSpigotConfig.removeUnloadedFallingBlocks) ||
+ (entity instanceof EntityTNTPrimed && this.paperSpigotConfig.removeUnloadedTNTEntities))) { + (entity instanceof EntityTNTPrimed && this.paperSpigotConfig.removeUnloadedTNTEntities))) {
+ entity.inUnloadedChunk = true; + entity.inUnloadedChunk = true;
+ entity.die(); + entity.die();
+ } + }
+ // PaperSpigot end + // PaperSpigot end
@@ -115,6 +115,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ removeUnloadedFallingBlocks = getBoolean( "remove-unloaded.falling-blocks", true ); + removeUnloadedFallingBlocks = getBoolean( "remove-unloaded.falling-blocks", true );
+ } + }
} }
-- --
1.9.5.msysgit.0

View File

@@ -1,6 +1,6 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net> 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 Subject: [PATCH] Remove invalid mob spawner tile entities
@@ -9,17 +9,17 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
--- a/src/main/java/net/minecraft/server/Chunk.java --- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -0,0 +0,0 @@ public class Chunk { @@ -0,0 +0,0 @@ public class Chunk {
this.world.triggerHoppersList.add(tileentity); tileentity.D();
} this.tileEntities.put(blockposition, tileentity);
// Spigot end // CraftBukkit start
+ // PaperSpigot start - Remove invalid mob spawner Tile Entities + // PaperSpigot start - Remove invalid mob spawner tile entities
+ } else if (this.world.paperSpigotConfig.removeInvalidMobSpawnerTEs && tileentity instanceof TileEntityMobSpawner && + } else if (this.world.paperSpigotConfig.removeInvalidMobSpawnerTEs && tileentity instanceof TileEntityMobSpawner &&
+ org.bukkit.craftbukkit.util.CraftMagicNumbers.getMaterial(getType(blockposition)) != org.bukkit.Material.MOB_SPAWNER) { + org.bukkit.craftbukkit.util.CraftMagicNumbers.getMaterial(getType(blockposition)) != org.bukkit.Material.MOB_SPAWNER) {
+ this.tileEntities.remove(blockposition); + this.tileEntities.remove(blockposition);
+ // PaperSpigot end + // PaperSpigot end
// CraftBukkit start
} else { } else {
System.out.println("Attempted to place a tile entity (" + tileentity + ") at " + tileentity.position.getX() + "," + tileentity.position.getY() + "," + tileentity.position.getZ() 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 diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java --- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
@@ -36,6 +36,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ log( "Remove invalid mob spawner tile entities: " + removeInvalidMobSpawnerTEs ); + log( "Remove invalid mob spawner tile entities: " + removeInvalidMobSpawnerTEs );
+ } + }
} }
-- --
1.9.5.msysgit.0

View File

@@ -1,6 +1,6 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Zach Brown <1254957+zachbr@users.noreply.github.com> From: Zach Brown <1254957+zachbr@users.noreply.github.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 Subject: [PATCH] Show 'PaperSpigot' in client crashes, server lists, and
Mojang stats Mojang stats
@@ -9,7 +9,7 @@ diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs @@ -0,0 +0,0 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
} }
public String getServerModName() { public String getServerModName() {
@@ -18,6 +18,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
} }
public CrashReport b(CrashReport crashreport) { public CrashReport b(CrashReport crashreport) {
-- --
1.9.5.msysgit.0

View File

@@ -1,6 +1,6 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Dmck2b <suddenly@suddenly.coffee> 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 Subject: [PATCH] Temporary fix for rails dupe
@@ -23,6 +23,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
} else { } else {
this.b(world, blockposition, iblockdata, block); this.b(world, blockposition, iblockdata, block);
} }
-- --
1.9.5.msysgit.0

View File

@@ -1,6 +1,6 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Zach Brown <1254957+zachbr@users.noreply.github.com> From: Zach Brown <1254957+zachbr@users.noreply.github.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 Subject: [PATCH] Toggle for player interact limiter
@@ -23,7 +23,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
--- a/src/main/java/org/github/paperspigot/PaperSpigotConfig.java --- a/src/main/java/org/github/paperspigot/PaperSpigotConfig.java
+++ b/src/main/java/org/github/paperspigot/PaperSpigotConfig.java +++ b/src/main/java/org/github/paperspigot/PaperSpigotConfig.java
@@ -0,0 +0,0 @@ public class PaperSpigotConfig @@ -0,0 +0,0 @@ public class PaperSpigotConfig
Bukkit.getLogger().log( Level.INFO, "Disabling async plugin bad ju-ju catcher, this may be bad depending on your plugins" ); Bukkit.getLogger().log( Level.INFO, "Disabling async plugin bad ju-ju catcher, this is not recommended and may cause issues" );
} }
} }
+ +
@@ -31,11 +31,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ private static void interactLimitEnabled() + private static void interactLimitEnabled()
+ { + {
+ interactLimitEnabled = getBoolean( "settings.limit-player-interactions", true ); + 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" ); + Bukkit.getLogger().log( Level.INFO, "Disabling player interaction limiter, your server may be more vulnerable to malicious users" );
+ } + }
+ } + }
} }
-- --
1.9.5.msysgit.0

View File

@@ -1,6 +1,6 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Zach Brown <1254957+zachbr@users.noreply.github.com> From: Zach Brown <1254957+zachbr@users.noreply.github.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 Subject: [PATCH] Vanished players don't have rights
@@ -9,8 +9,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
--- a/src/main/java/net/minecraft/server/EntityArrow.java --- a/src/main/java/net/minecraft/server/EntityArrow.java
+++ b/src/main/java/net/minecraft/server/EntityArrow.java +++ b/src/main/java/net/minecraft/server/EntityArrow.java
@@ -0,0 +0,0 @@ public class EntityArrow extends Entity implements IProjectile { @@ -0,0 +0,0 @@ public class EntityArrow extends Entity implements IProjectile {
float f2;
float f3; float f3;
float f4;
+ // PaperSpigot start - Allow arrows to fly through vanished players the shooter can't see + // 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) { + if (movingobjectposition != null && movingobjectposition.entity instanceof EntityPlayer && shooter != null && shooter instanceof EntityPlayer) {
@@ -22,7 +22,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ +
if (movingobjectposition != null) { if (movingobjectposition != null) {
org.bukkit.craftbukkit.event.CraftEventFactory.callProjectileHitEvent(this); // CraftBukkit - Call event 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 diff --git a/src/main/java/net/minecraft/server/EntityProjectile.java b/src/main/java/net/minecraft/server/EntityProjectile.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/server/EntityProjectile.java --- a/src/main/java/net/minecraft/server/EntityProjectile.java
@@ -40,15 +40,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ // PaperSpigot end + // PaperSpigot end
+ +
if (movingobjectposition != null) { if (movingobjectposition != null) {
if (movingobjectposition.type == EnumMovingObjectType.BLOCK && this.world.getType(movingobjectposition.a()).getBlock() == Blocks.PORTAL) { if (movingobjectposition.type == MovingObjectPosition.EnumMovingObjectType.BLOCK && this.world.getType(movingobjectposition.a()).getBlock() == Blocks.PORTAL) {
this.aq(); this.d(movingobjectposition.a());
diff --git a/src/main/java/net/minecraft/server/ItemBlock.java b/src/main/java/net/minecraft/server/ItemBlock.java diff --git a/src/main/java/net/minecraft/server/ItemBlock.java b/src/main/java/net/minecraft/server/ItemBlock.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/server/ItemBlock.java --- a/src/main/java/net/minecraft/server/ItemBlock.java
+++ b/src/main/java/net/minecraft/server/ItemBlock.java +++ b/src/main/java/net/minecraft/server/ItemBlock.java
@@ -0,0 +0,0 @@ public class ItemBlock extends Item { @@ -0,0 +0,0 @@ public class ItemBlock extends Item {
return false; return false;
} else if (blockposition.getY() == 255 && this.a.getMaterial().isBuildable()) { } else if (!entityhuman.a(blockposition, enumdirection, itemstack)) {
return false; return false;
- } else if (world.a(this.a, blockposition, false, enumdirection, (Entity) null, itemstack)) { - } 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 + } else if (world.a(this.a, blockposition, false, enumdirection, entityhuman, itemstack)) { // PaperSpigot - Pass entityhuman instead of null
@@ -69,11 +69,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ continue; + continue;
+ } + }
+ } + }
+ // PaperSpigot end
+ +
if (!entity1.dead && entity1.k && entity1 != entity && (entity == null || entity.vehicle != entity1 && entity.passenger != entity1)) { if (!entity1.dead && entity1.k && entity1 != entity && (entity == null || entity.vehicle != entity1 && entity.passenger != entity1)) {
return false; return false;
} }
-- --
1.9.5.msysgit.0

View File

@@ -1,6 +1,6 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Zach Brown <1254957+zachbr@users.noreply.github.com> From: Zach Brown <1254957+zachbr@users.noreply.github.com>
Date: Thu, 27 Nov 2014 23:53:56 -0600 Date: Sat, 7 Mar 2015 19:44:29 -0600
Subject: [PATCH] mc-dev imports Subject: [PATCH] mc-dev imports
@@ -12,11 +12,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
@@ -0,0 +0,0 @@ @@ -0,0 +0,0 @@
+package net.minecraft.server; +package net.minecraft.server;
+ +
+import com.google.common.collect.Lists;
+import java.util.Iterator;
+import java.util.List;
+
+public abstract class BlockMinecartTrackAbstract extends Block { +public abstract class BlockMinecartTrackAbstract extends Block {
+ +
+ protected final boolean a; + 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)); + return d(world.getType(blockposition));
+ } + }
+ +
@@ -48,9 +52,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ +
+ public void updateShape(IBlockAccess iblockaccess, BlockPosition blockposition) { + public void updateShape(IBlockAccess iblockaccess, BlockPosition blockposition) {
+ IBlockData iblockdata = iblockaccess.getType(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); + this.a(0.0F, 0.0F, 0.0F, 1.0F, 0.625F, 1.0F);
+ } else { + } else {
+ this.a(0.0F, 0.0F, 0.0F, 1.0F, 0.125F, 1.0F); + this.a(0.0F, 0.0F, 0.0F, 1.0F, 0.125F, 1.0F);
@@ -67,7 +71,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ } + }
+ +
+ public void onPlace(World world, BlockPosition blockposition, IBlockData iblockdata) { + public void onPlace(World world, BlockPosition blockposition, IBlockData iblockdata) {
+ if (!world.isStatic) { + if (!world.isClientSide) {
+ iblockdata = this.a(world, blockposition, iblockdata, true); + iblockdata = this.a(world, blockposition, iblockdata, true);
+ if (this.a) { + if (this.a) {
+ this.doPhysics(world, blockposition, iblockdata, this); + this.doPhysics(world, blockposition, iblockdata, this);
@@ -77,21 +81,21 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ } + }
+ +
+ public void doPhysics(World world, BlockPosition blockposition, IBlockData iblockdata, Block block) { + public void doPhysics(World world, BlockPosition blockposition, IBlockData iblockdata, Block block) {
+ if (!world.isStatic) { + if (!world.isClientSide) {
+ EnumTrackPosition enumtrackposition = (EnumTrackPosition) iblockdata.get(this.l()); + EnumTrackPosition blockminecarttrackabstract_enumtrackposition = (EnumTrackPosition) iblockdata.get(this.n());
+ boolean flag = false; + boolean flag = false;
+ +
+ if (!World.a((IBlockAccess) world, blockposition.down())) { + if (!World.a((IBlockAccess) world, blockposition.down())) {
+ flag = true; + 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; + 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; + 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; + 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; + flag = true;
+ } + }
+ +
@@ -108,16 +112,16 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ protected void b(World world, BlockPosition blockposition, IBlockData iblockdata, Block block) {} + protected void b(World world, BlockPosition blockposition, IBlockData iblockdata, Block block) {}
+ +
+ protected IBlockData a(World world, BlockPosition blockposition, IBlockData iblockdata, boolean flag) { + 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; + return 0;
+ } + }
+ +
+ public void remove(World world, BlockPosition blockposition, IBlockData iblockdata) { + public void remove(World world, BlockPosition blockposition, IBlockData iblockdata) {
+ super.remove(world, blockposition, 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); + world.applyPhysics(blockposition.up(), this);
+ } + }
+ +
@@ -128,7 +132,480 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ +
+ } + }
+ +
+ 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 diff --git a/src/main/java/net/minecraft/server/ItemBlock.java b/src/main/java/net/minecraft/server/ItemBlock.java
new file mode 100644 new file mode 100644
@@ -155,9 +632,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ IBlockData iblockdata = world.getType(blockposition); + IBlockData iblockdata = world.getType(blockposition);
+ Block block = iblockdata.getBlock(); + Block block = iblockdata.getBlock();
+ +
+ if (block == Blocks.SNOW_LAYER && ((Integer) iblockdata.get(BlockSnow.LAYERS)).intValue() < 1) { + if (!block.a(world, blockposition)) {
+ enumdirection = EnumDirection.UP;
+ } else if (!block.f(world, blockposition)) {
+ blockposition = blockposition.shift(enumdirection); + blockposition = blockposition.shift(enumdirection);
+ } + }
+ +
@@ -165,8 +640,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ return false; + return false;
+ } else if (!entityhuman.a(blockposition, enumdirection, itemstack)) { + } else if (!entityhuman.a(blockposition, enumdirection, itemstack)) {
+ return false; + 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)) { + } else if (world.a(this.a, blockposition, false, enumdirection, (Entity) null, itemstack)) {
+ int i = this.filterData(itemstack.getData()); + int i = this.filterData(itemstack.getData());
+ IBlockData iblockdata1 = this.a.getPlacedState(world, blockposition, enumdirection, f, f1, f2, i, entityhuman); + IBlockData iblockdata1 = this.a.getPlacedState(world, blockposition, enumdirection, f, f1, f2, i, entityhuman);
@@ -248,43 +721,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ return this.id == MobEffectList.WEAKNESS.id ? (double) (-0.5F * (float) (i + 1)) : 1.3D * (double) (i + 1); + 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
--- /dev/null
+++ b/src/main/java/net/minecraft/server/PacketPlayOutPlayerListHeaderFooter.java
@@ -0,0 +0,0 @@
+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 diff --git a/src/main/java/net/minecraft/server/TileEntityEnderChest.java b/src/main/java/net/minecraft/server/TileEntityEnderChest.java
new file mode 100644 new file mode 100644
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
@@ -391,10 +827,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ public TileEntityLightDetector() {} + public TileEntityLightDetector() {}
+ +
+ public void c() { + 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(); + this.e = this.w();
+ if (this.e instanceof BlockDaylightDetector) { + if (this.e instanceof BlockDaylightDetector) {
+ ((BlockDaylightDetector) this.e).d(this.world, this.position); + ((BlockDaylightDetector) this.e).f(this.world, this.position);
+ } + }
+ } + }
+ +