Rebuild patches

This commit is contained in:
Zach Brown 2015-09-01 20:14:41 -05:00
parent ad15d9065d
commit 1f41387610
8 changed files with 60 additions and 56 deletions

View file

@ -1,17 +1,17 @@
From 239a7bfece56045f4f17a3f762aeb075b1880c2c Mon Sep 17 00:00:00 2001
From 8892ee45c27775cac74e3e9d8a51aac4123d8337 Mon Sep 17 00:00:00 2001
From: Iceee <andrew@opticgaming.tv>
Date: Sun, 8 Mar 2015 03:34:15 -0500
Subject: [PATCH] Remove certain entities that fly through unloaded chunks
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index d6bef0b..1470c21 100644
index e345dd7..3e89aa9 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -114,6 +114,7 @@ public abstract class Entity implements ICommandListener {
private final CommandObjectiveExecutor au;
@@ -115,6 +115,7 @@ public abstract class Entity implements ICommandListener {
public boolean valid; // CraftBukkit
public org.bukkit.projectiles.ProjectileSource projectileSource; // CraftBukkit - For projectiles only
public boolean forceExplosionKnockback; // CraftBukkit - SPIGOT-949
+ public boolean inUnloadedChunk = false; // PaperSpigot - Remove entities in unloaded chunks
// Spigot start
@ -70,7 +70,7 @@ index 2d22327..50423eb 100644
this.motY *= 0.9800000190734863D;
this.motZ *= 0.9800000190734863D;
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 67c739e..530e60f 100644
index ba40490..624352c 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -1156,6 +1156,7 @@ public abstract class World implements IBlockAccess {
@ -97,7 +97,7 @@ index 67c739e..530e60f 100644
entity.tickTimer.startTiming(); // Spigot
// CraftBukkit end
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
index e1b9a6c..7804086 100644
index 5aa368f..729cbf1 100644
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
@@ -212,4 +212,14 @@ public class PaperSpigotWorldConfig
@ -116,5 +116,5 @@ index e1b9a6c..7804086 100644
+ }
}
--
1.9.5.msysgit.1
2.5.1

View file

@ -1,14 +1,14 @@
From 217c02646bdc15d5f6907cd1aae4437e05b47bf7 Mon Sep 17 00:00:00 2001
From 24980479558d3b0fb8eccbbf428518d78514c161 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Mon, 23 Feb 2015 14:57:28 -0600
Subject: [PATCH] Configurable top of nether void damage
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 0234ad3..2611007 100644
index 3e89aa9..a3b4cdb 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -247,6 +247,13 @@ public abstract class Entity implements ICommandListener {
@@ -248,6 +248,13 @@ public abstract class Entity implements ICommandListener {
this.K();
}
@ -22,7 +22,7 @@ index 0234ad3..2611007 100644
public void K() {
this.world.methodProfiler.a("entityBaseTick");
if (this.vehicle != null && this.vehicle.dead) {
@@ -323,7 +330,7 @@ public abstract class Entity implements ICommandListener {
@@ -324,7 +331,7 @@ public abstract class Entity implements ICommandListener {
this.fallDistance *= 0.5F;
}
@ -32,7 +32,7 @@ index 0234ad3..2611007 100644
}
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
index 9e2f4d1..e0926a2 100644
index 88ee38a..c1f21ae 100644
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
@@ -228,4 +228,10 @@ public class PaperSpigotWorldConfig
@ -47,5 +47,5 @@ index 9e2f4d1..e0926a2 100644
+ }
}
--
1.9.5.msysgit.1
2.5.1

View file

@ -1,4 +1,4 @@
From 0693755e94548a13ac3ffadc3830dc0a7fa240fe Mon Sep 17 00:00:00 2001
From 2f171ca378d3e21e98af7b0c15209d882a64af2d Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net>
Date: Tue, 30 Jun 2015 20:45:24 -0700
Subject: [PATCH] Force load chunks for specific entities that fly through
@ -27,18 +27,18 @@ index ae0f276..0e6a37f 100644
if (!this.world.c(i, j)) {
// CraftBukkit start
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 2611007..f76c67d 100644
index a3b4cdb..68126c4 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -115,6 +115,7 @@ public abstract class Entity implements ICommandListener {
public boolean valid; // CraftBukkit
@@ -116,6 +116,7 @@ public abstract class Entity implements ICommandListener {
public org.bukkit.projectiles.ProjectileSource projectileSource; // CraftBukkit - For projectiles only
public boolean forceExplosionKnockback; // CraftBukkit - SPIGOT-949
public boolean inUnloadedChunk = false; // PaperSpigot - Remove entities in unloaded chunks
+ public boolean loadChunks = false; // PaperSpigot - Entities can load chunks they move through and keep them loaded
// Spigot start
public CustomTimingsHandler tickTimer = org.bukkit.craftbukkit.SpigotTimings.getEntityTimings(this); // Spigot
@@ -402,8 +403,20 @@ public abstract class Entity implements ICommandListener {
@@ -403,8 +404,21 @@ public abstract class Entity implements ICommandListener {
return this.world.getCubes(this, axisalignedbb).isEmpty() && !this.world.containsLiquid(axisalignedbb);
}
@ -52,6 +52,7 @@ index 2611007..f76c67d 100644
+ }
+ }
+ }
+
+
public void move(double d0, double d1, double d2) {
org.bukkit.craftbukkit.SpigotTimings.entityMoveTimer.startTiming(); // Spigot
@ -98,7 +99,7 @@ index 44219cd..34627c6 100644
protected boolean s_() {
diff --git a/src/main/java/net/minecraft/server/EntityTNTPrimed.java b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
index 1daba4e..3e16472 100644
index 1daba4e..3a7c4fa 100644
--- a/src/main/java/net/minecraft/server/EntityTNTPrimed.java
+++ b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
@@ -21,6 +21,7 @@ public class EntityTNTPrimed extends Entity {
@ -109,11 +110,12 @@ index 1daba4e..3e16472 100644
}
public EntityTNTPrimed(org.bukkit.Location loc, World world, double d0, double d1, double d2, EntityLiving entityliving) {
@@ -90,7 +91,13 @@ public class EntityTNTPrimed extends Entity {
@@ -90,7 +91,15 @@ public class EntityTNTPrimed extends Entity {
private void explode() {
// CraftBukkit start
// float f = 4.0F;
-
+
+ // PaperSpigot start - Force load chunks during TNT explosions
+ ChunkProviderServer chunkProviderServer = ((ChunkProviderServer) world.chunkProvider);
+ boolean forceChunkLoad = chunkProviderServer.forceChunkLoad;
@ -121,13 +123,15 @@ index 1daba4e..3e16472 100644
+ chunkProviderServer.forceChunkLoad = true;
+ }
+ // PaperSpigot end
+
org.bukkit.craftbukkit.CraftServer server = this.world.getServer();
ExplosionPrimeEvent event = new ExplosionPrimeEvent((org.bukkit.entity.Explosive) org.bukkit.craftbukkit.entity.CraftEntity.getEntity(server, this));
@@ -100,6 +107,11 @@ public class EntityTNTPrimed extends Entity {
@@ -100,6 +109,12 @@ public class EntityTNTPrimed extends Entity {
this.world.createExplosion(this, this.locX, this.locY + (double) (this.length / 2.0F), this.locZ, event.getRadius(), event.getFire(), true);
}
// CraftBukkit end
+
+ // PaperSpigot start - Force load chunks during TNT explosions
+ if (world.paperSpigotConfig.loadUnloadedTNTEntities) {
+ chunkProviderServer.forceChunkLoad = forceChunkLoad;
@ -137,7 +141,7 @@ index 1daba4e..3e16472 100644
protected void b(NBTTagCompound nbttagcompound) {
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index b66dd81..baedb39 100644
index 1779a5b..27cb4ed 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -1163,8 +1163,14 @@ public abstract class World implements IBlockAccess {
@ -166,7 +170,7 @@ index b66dd81..baedb39 100644
this.getChunkAt(entity.ae, entity.ag).a(entity, entity.af);
}
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
index 6de509c..e6ecaff 100644
index 36e0948..a78d748 100644
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
@@ -259,4 +259,14 @@ public class PaperSpigotWorldConfig
@ -185,7 +189,7 @@ index 6de509c..e6ecaff 100644
+ }
}
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
index 7ca1b24..6cf26ff 100644
index 7ca1b24..6f3734b 100644
--- a/src/main/java/org/spigotmc/ActivationRange.java
+++ b/src/main/java/org/spigotmc/ActivationRange.java
@@ -247,7 +247,7 @@ public class ActivationRange
@ -193,10 +197,10 @@ index 7ca1b24..6cf26ff 100644
SpigotTimings.checkIfActiveTimer.startTiming();
// Never safe to skip fireworks or entities not yet added to chunk
- if ( !entity.isAddedToChunk() || entity instanceof EntityFireworks ) {
+ if ( !entity.isAddedToChunk() || entity instanceof EntityFireworks || entity.loadChunks ) {
+ if ( !entity.isAddedToChunk() || entity instanceof EntityFireworks || entity.loadChunks ) { // PaperSpigot
SpigotTimings.checkIfActiveTimer.stopTiming();
return true;
}
--
1.9.5.msysgit.1
2.5.1

View file

@ -1,11 +1,11 @@
From de2d117505e212ebe0de8288f7ec4297bc4d923b Mon Sep 17 00:00:00 2001
From cfda7e08ad109fcd5f7afaa1407d26993c6d3878 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 31 May 2015 01:44:02 -0500
Subject: [PATCH] Teleport passenger/vehicle with player
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index f76c67d..70ac612 100644
index 68126c4..d7b0dc6 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -41,6 +41,15 @@ public abstract class Entity implements ICommandListener {
@ -24,7 +24,7 @@ index f76c67d..70ac612 100644
private static final AxisAlignedBB a = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D);
private static int entityCount;
private int id;
@@ -1966,7 +1975,7 @@ public abstract class Entity implements ICommandListener {
@@ -1968,7 +1977,7 @@ public abstract class Entity implements ICommandListener {
// minecraftserver.getPlayerList().changeWorld(this, j, worldserver, worldserver1);
boolean before = worldserver1.chunkProviderServer.forceChunkLoad;
worldserver1.chunkProviderServer.forceChunkLoad = true;
@ -33,7 +33,7 @@ index f76c67d..70ac612 100644
worldserver1.chunkProviderServer.forceChunkLoad = before;
// CraftBukkit end
this.world.methodProfiler.c("reloading");
@@ -1974,6 +1983,12 @@ public abstract class Entity implements ICommandListener {
@@ -1976,6 +1985,12 @@ public abstract class Entity implements ICommandListener {
if (entity != null) {
entity.n(this);
@ -97,5 +97,5 @@ index 506a03c..9612c79 100644
}
--
1.9.5.msysgit.1
2.5.1

View file

@ -1,4 +1,4 @@
From 9df302fa507958256667fb6d4a81e2d56e9d6cbd Mon Sep 17 00:00:00 2001
From c153230c831cd274fc10dd655874fae09034d247 Mon Sep 17 00:00:00 2001
From: Iceee <andrew@opticgaming.tv>
Date: Thu, 4 Jun 2015 13:55:02 -0700
Subject: [PATCH] Configurable TNT cannon fix
@ -199,7 +199,7 @@ index 34627c6..cf02997 100644
+ // PaperSpigot end
}
diff --git a/src/main/java/net/minecraft/server/EntityTNTPrimed.java b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
index 3e16472..2df3921 100644
index 3a7c4fa..b5fdbe6 100644
--- a/src/main/java/net/minecraft/server/EntityTNTPrimed.java
+++ b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
@@ -37,6 +37,7 @@ public class EntityTNTPrimed extends Entity {
@ -210,7 +210,7 @@ index 3e16472..2df3921 100644
}
protected void h() {}
@@ -141,7 +142,64 @@ public class EntityTNTPrimed extends Entity {
@@ -144,7 +145,64 @@ public class EntityTNTPrimed extends Entity {
return this.source;
}
@ -277,10 +277,10 @@ index 3e16472..2df3921 100644
+ // PaperSpigot end
}
diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java
index b1bca26..a078799 100644
index 78e3a7d..0e8af2e 100644
--- a/src/main/java/net/minecraft/server/Explosion.java
+++ b/src/main/java/net/minecraft/server/Explosion.java
@@ -142,9 +142,16 @@ public class Explosion {
@@ -143,9 +143,16 @@ public class Explosion {
// CraftBukkit end
double d14 = EnchantmentProtection.a(entity, d13);
@ -298,7 +298,7 @@ index b1bca26..a078799 100644
this.k.put((EntityHuman) entity, new Vec3D(d8 * d13, d9 * d13, d10 * d13));
}
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
index b9b76ce..37369e8 100644
index d2fe995..beeaa0b 100644
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
@@ -293,4 +293,43 @@ public class PaperSpigotWorldConfig
@ -346,5 +346,5 @@ index b9b76ce..37369e8 100644
+ }
}
--
2.4.5.windows.1
2.5.1

View file

@ -1,4 +1,4 @@
From d1a32ea2d12b2932234fa650ca538f9d7634c90e Mon Sep 17 00:00:00 2001
From 55a6cbf5107d0b99e62cbcf5a94707e692366871 Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net>
Date: Tue, 16 Jun 2015 05:52:58 -0700
Subject: [PATCH] Optimize explosions
@ -10,7 +10,7 @@ This patch adds a per-tick cache that is used for storing and retrieving
an entity's exposure during an explosion.
diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java
index a078799..0f722c2 100644
index 0e8af2e..f6067ce 100644
--- a/src/main/java/net/minecraft/server/Explosion.java
+++ b/src/main/java/net/minecraft/server/Explosion.java
@@ -129,7 +129,7 @@ public class Explosion {
@ -22,7 +22,7 @@ index a078799..0f722c2 100644
double d13 = (1.0D - d7) * d12;
// entity.damageEntity(DamageSource.explosion(this), (float) ((int) ((d13 * d13 + d13) / 2.0D * 8.0D * (double) f3 + 1.0D)));+ // CraftBukkit start
@@ -293,4 +293,86 @@ public class Explosion {
@@ -294,4 +294,86 @@ public class Explosion {
public List<BlockPosition> getBlocks() {
return this.blocks;
}
@ -149,5 +149,5 @@ index 88e0644..f3228d9 100644
+ }
}
--
2.4.6.windows.1
2.5.1

View file

@ -1,14 +1,14 @@
From 8fa94297f64a5c59b5b323bb17b3272a24676438 Mon Sep 17 00:00:00 2001
From 50af34629e3423ad5e945f3206a9a65ff752d905 Mon Sep 17 00:00:00 2001
From: Sudzzy <originmc@outlook.com>
Date: Tue, 14 Jul 2015 09:20:44 -0700
Subject: [PATCH] Disable explosion knockback
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 8090a0c..b2484a7 100644
index 3c852fd..b0618e4 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -778,7 +778,10 @@ public abstract class EntityLiving extends Entity {
@@ -779,7 +779,10 @@ public abstract class EntityLiving extends Entity {
}
}
@ -20,7 +20,7 @@ index 8090a0c..b2484a7 100644
this.world.broadcastEntityEffect(this, (byte) 2);
if (damagesource != DamageSource.DROWN) {
this.ac();
@@ -800,6 +803,8 @@ public abstract class EntityLiving extends Entity {
@@ -801,6 +804,8 @@ public abstract class EntityLiving extends Entity {
}
}
@ -30,10 +30,10 @@ index 8090a0c..b2484a7 100644
if (this.getHealth() <= 0.0F) {
diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java
index 4afb8d7..f23245e 100644
index f6067ce..a60d3dd 100644
--- a/src/main/java/net/minecraft/server/Explosion.java
+++ b/src/main/java/net/minecraft/server/Explosion.java
@@ -140,7 +140,7 @@ public class Explosion {
@@ -141,7 +141,7 @@ public class Explosion {
continue;
}
// CraftBukkit end
@ -42,7 +42,7 @@ index 4afb8d7..f23245e 100644
// PaperSpigot start - Fix cannons
/*
@@ -152,7 +152,7 @@ public class Explosion {
@@ -153,7 +153,7 @@ public class Explosion {
entity.g(d8 * d14, d9 * d14, d10 * d14);
// PaperSpigot end
@ -52,7 +52,7 @@ index 4afb8d7..f23245e 100644
}
}
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
index 20cf3ce..178f251 100644
index 9ae1b18..b5bc358 100644
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
@@ -360,4 +360,10 @@ public class PaperSpigotWorldConfig
@ -67,5 +67,5 @@ index 20cf3ce..178f251 100644
+ }
}
--
1.9.5.msysgit.1
2.5.1

View file

@ -1,14 +1,14 @@
From 410ae1f136e532793a05d6508ab7c8629c660185 Mon Sep 17 00:00:00 2001
From 3c3dbe0aa96bc079b72af96ec63ec2d48a98f634 Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net>
Date: Tue, 4 Aug 2015 17:45:00 -0700
Subject: [PATCH] Configurable TNT explosion volume
diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java
index 6617899..2763e74 100644
index a60d3dd..b7d410e 100644
--- a/src/main/java/net/minecraft/server/Explosion.java
+++ b/src/main/java/net/minecraft/server/Explosion.java
@@ -163,7 +163,10 @@ public class Explosion {
@@ -164,7 +164,10 @@ public class Explosion {
}
public void a(boolean flag) {
@ -21,7 +21,7 @@ index 6617899..2763e74 100644
this.world.addParticle(EnumParticle.EXPLOSION_HUGE, this.posX, this.posY, this.posZ, 1.0D, 0.0D, 0.0D, new int[0]);
} else {
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
index 84cdb12..d16c9fe 100644
index 84cdb12..3f8bffc 100644
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
@@ -402,4 +402,10 @@ public class PaperSpigotWorldConfig
@ -36,5 +36,5 @@ index 84cdb12..d16c9fe 100644
+ }
}
--
2.4.6.windows.1
2.5.1