Remove giant TNT changes patch

This commit is contained in:
Byteflux 2015-06-04 01:42:09 -07:00
parent a5158e4b5c
commit 9420859807
17 changed files with 54 additions and 164 deletions

View File

@ -1,4 +1,4 @@
From 86c6689b38cecf577405044b3c4422a000d7a37b Mon Sep 17 00:00:00 2001
From 21d58890ad896dabf7f4f9ec7673f25f9d456154 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Thu, 5 Mar 2015 15:30:06 -0600
Subject: [PATCH] Check online mode before converting and renaming player data
@ -18,5 +18,5 @@ index 7c51750..e5124af 100644
file = new File( this.playerDir, UUID.nameUUIDFromBytes( ( "OfflinePlayer:" + entityhuman.getName() ).getBytes( "UTF-8" ) ).toString() + ".dat");
if ( file.exists() )
--
2.4.1.windows.1
1.9.5.msysgit.1

View File

@ -1,111 +0,0 @@
From ff725d215c0edacf1b63e937999482594bcf35b9 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Sun, 8 Mar 2015 04:52:37 -0500
Subject: [PATCH] PaperSpigot TNT Changes
PaperSpigot communal TNT modification patch
Original authors for individual changes are listed w/in PaperSpigotWorldConfig
diff --git a/src/main/java/net/minecraft/server/EntityTNTPrimed.java b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
index 1daba4e..dd1ad68 100644
--- a/src/main/java/net/minecraft/server/EntityTNTPrimed.java
+++ b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
@@ -36,6 +36,12 @@ public class EntityTNTPrimed extends Entity {
this.lastY = d1;
this.lastZ = d2;
this.source = entityliving;
+
+ // PaperSpigot start - Fix TNT directional bias
+ if (this.world.paperSpigotConfig.fixTNTDirectionBias) {
+ this.motX = this.motZ = 0;
+ }
+ // PaperSpigot end
}
protected void h() {}
@@ -63,6 +69,12 @@ public class EntityTNTPrimed extends Entity {
}
// PaperSpigot end
+ // PaperSpigot start - Configurable TNT Height Limit
+ if (this.world.paperSpigotConfig.tntHeightLimit != 0 && this.locY > this.world.paperSpigotConfig.tntHeightLimit) {
+ this.die();
+ }
+ // PaperSpigot end
+
this.motX *= 0.9800000190734863D;
this.motY *= 0.9800000190734863D;
this.motZ *= 0.9800000190734863D;
@@ -97,7 +109,15 @@ public class EntityTNTPrimed extends Entity {
server.getPluginManager().callEvent(event);
if (!event.isCancelled()) {
- this.world.createExplosion(this, this.locX, this.locY + (double) (this.length / 2.0F), this.locZ, event.getRadius(), event.getFire(), true);
+ // PaperSpigot start - Configurable legacy TNT explosion height
+ double locY = this.locY;
+
+ if (!this.world.paperSpigotConfig.legacyTNTExplosionHeight) {
+ locY += this.length / 2.0F;
+ }
+
+ this.world.createExplosion(this, this.locX, locY, this.locZ, event.getRadius(), event.getFire(), true);
+ // PaperSpigot end
}
// CraftBukkit end
}
@@ -132,4 +152,12 @@ public class EntityTNTPrimed extends Entity {
public float getHeadHeight() {
return 0.0F;
}
+
+ /**
+ * PaperSpigot - Configurable TNT water movement
+ */
+ @Override
+ public boolean aL() {
+ return world.paperSpigotConfig.tntMovesInWater;
+ }
}
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
index a6d8532..1915a7c 100644
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
@@ -192,4 +192,35 @@ public class PaperSpigotWorldConfig
{
netherVoidTopDamage = getBoolean( "nether-ceiling-void-damage", false );
}
+
+ public boolean fixTNTDirectionBias;
+ public boolean tntMovesInWater;
+ public boolean legacyTNTExplosionHeight;
+ public int tntHeightLimit;
+ private void tntChanges()
+ {
+ // Original Authors: Iceee <andrew@opticgaming.tv>
+ fixTNTDirectionBias = getBoolean( "tnt-gameplay.fix-directional-bias", false );
+ // Original Author: Byteflux <byte@byteflux.net>
+ tntMovesInWater = getBoolean( "tnt-gameplay.moves-in-water", true );
+ // Original Author: Byteflux <byte@byteflux.net>
+ legacyTNTExplosionHeight = getBoolean( "tnt-gameplay.legacy-explosion-height", false );
+ // Original Author: Somebody \o/
+ tntHeightLimit = getInt( "tnt-gameplay.tnt-entity-height-limit", 0 );
+
+ log( "Fix TNT directional bias: " + fixTNTDirectionBias );
+ log( "TNT moves in water: " + tntMovesInWater );
+ log( "Use legacy TNT explosion height " + legacyTNTExplosionHeight );
+ if ( tntHeightLimit != 0 ) {
+ log( "TNT height limit set at " + tntHeightLimit );
+ } else {
+ log( "TNT height limit disabled" );
+ }
+ if (PaperSpigotConfig.version < 7) {
+ System.err.println( "==========================================" );
+ System.err.println( " Many TNT Related Settings Have Moved " );
+ System.err.println( " Please check your config in paper.yml! " );
+ System.err.println( "==========================================" );
+ }
+ }
}
--
2.4.1.windows.1

View File

@ -1,4 +1,4 @@
From 776171aa01cd66d7c53aec724dbb9e0afda9223e Mon Sep 17 00:00:00 2001
From beee34f74449648f71aed69681ccfb448156534c Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Mon, 13 Apr 2015 15:47:15 -0500
Subject: [PATCH] Fix redstone lag issues
@ -54,12 +54,12 @@ index d76b965..7624984 100644
this.methodProfiler.a("ticking");
Iterator iterator = this.V.iterator();
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
index 1915a7c..e00581c 100644
index a6d8532..134d43b 100644
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
@@ -223,4 +223,14 @@ public class PaperSpigotWorldConfig
System.err.println( "==========================================" );
}
@@ -192,4 +192,14 @@ public class PaperSpigotWorldConfig
{
netherVoidTopDamage = getBoolean( "nether-ceiling-void-damage", false );
}
+
+ public int tickNextTickCap;
@ -73,5 +73,5 @@ index 1915a7c..e00581c 100644
+ }
}
--
2.4.1.windows.1
1.9.5.msysgit.1

View File

@ -1,4 +1,4 @@
From a9abb0aacbdd552d1ba8fff85f4d5dec3d33fbc3 Mon Sep 17 00:00:00 2001
From c1a44d6af5951474105fbf073f2e23baefd130af Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Fri, 10 Apr 2015 18:07:36 -0500
Subject: [PATCH] Always tick falling blocks
@ -25,5 +25,5 @@ index 621a717..7ca1b24 100644
|| entity instanceof EntityFireworks )
{
--
2.4.1.windows.1
1.9.5.msysgit.1

View File

@ -1,4 +1,4 @@
From a6bb5db33f564cae6404a869426d4e741aec5b99 Mon Sep 17 00:00:00 2001
From 87587c598e48d91a11651621025f5d72fdd558f8 Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net>
Date: Fri, 17 Apr 2015 02:26:14 -0700
Subject: [PATCH] Add FallingBlock source location API
@ -141,5 +141,5 @@ index 788f26b..f2dfedd 100644
+ // PaperSpigot end
}
--
2.4.1.windows.1
1.9.5.msysgit.1

View File

@ -1,4 +1,4 @@
From c3469d7ff27645aab2eb0ee8fd23db4fed4a2516 Mon Sep 17 00:00:00 2001
From 2207bdc6f09a92810a4b02fb72383c89eeab32bc Mon Sep 17 00:00:00 2001
From: Roman Alexander <romanalexander@users.noreply.github.com>
Date: Wed, 25 Mar 2015 20:27:13 -0500
Subject: [PATCH] Configurable async light updates
@ -333,10 +333,10 @@ index 51e59c0..86913f4 100644
public boolean a(boolean flag) {
return false;
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
index e00581c..dc8bebd 100644
index 134d43b..0bf4d21 100644
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
@@ -233,4 +233,11 @@ public class PaperSpigotWorldConfig
@@ -202,4 +202,11 @@ public class PaperSpigotWorldConfig
log( "WorldServer TickNextTick cap set at " + tickNextTickCap );
log( "WorldServer TickNextTickList cap always processes redstone: " + tickNextTickListCapIgnoresRedstone );
}
@ -349,5 +349,5 @@ index e00581c..dc8bebd 100644
+ }
}
--
2.4.1.windows.1
1.9.5.msysgit.1

View File

@ -1,4 +1,4 @@
From 64506d4ff5992f83e11201d20dbace097cdce21e Mon Sep 17 00:00:00 2001
From 36ace97ecfaceaac3b26402c8f8b53ce6ec2f4ab Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net>
Date: Fri, 10 Apr 2015 02:24:20 -0700
Subject: [PATCH] Optimize draining
@ -29,10 +29,10 @@ index de1dddb..d8de1fc 100644
}
} else {
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
index dc8bebd..1ca8b0d 100644
index 0bf4d21..2375379 100644
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
@@ -240,4 +240,10 @@ public class PaperSpigotWorldConfig
@@ -209,4 +209,10 @@ public class PaperSpigotWorldConfig
useAsyncLighting = getBoolean( "use-async-lighting", false );
log( "World async lighting: " + useAsyncLighting );
}
@ -44,5 +44,5 @@ index dc8bebd..1ca8b0d 100644
+ }
}
--
2.4.1.windows.1
1.9.5.msysgit.1

View File

@ -1,4 +1,4 @@
From 1c6759f6dfffa5640159950db063e10efb6064a9 Mon Sep 17 00:00:00 2001
From 7a2369a343236adfdff897ba935f75033b504c53 Mon Sep 17 00:00:00 2001
From: Roman Alexander <romanalexander@users.noreply.github.com>
Date: Fri, 27 Mar 2015 00:52:24 -0400
Subject: [PATCH] Toggleable player crits, helps mitigate hacked clients.
@ -18,7 +18,7 @@ index 8d2b3a1..961b53b 100644
if (flag && f > 0.0F) {
f *= 1.5F;
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
index 1ca8b0d..64f8630 100644
index 2375379..acbe522 100644
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
@@ -182,9 +182,11 @@ public class PaperSpigotWorldConfig
@ -34,5 +34,5 @@ index 1ca8b0d..64f8630 100644
public boolean netherVoidTopDamage;
--
2.4.1.windows.1
1.9.5.msysgit.1

View File

@ -1,4 +1,4 @@
From d1999bf881ee1cd3891d59c49ac2a3a8874d5ed4 Mon Sep 17 00:00:00 2001
From 915d7b0216e0027dd72441eb46034459d714a83d Mon Sep 17 00:00:00 2001
From: Isaac Moore <rmsy@me.com>
Date: Mon, 27 Apr 2015 21:41:39 -0500
Subject: [PATCH] Add PlayerLocaleChangeEvent
@ -41,5 +41,5 @@ index 211c421..0950b8a 100644
+ // PaperSpigot end
}
--
2.4.1.windows.1
1.9.5.msysgit.1

View File

@ -1,4 +1,4 @@
From 4d5be815a524c78f7dd7665f0a3229513123db9f Mon Sep 17 00:00:00 2001
From 730c4aa970ce747e826e3bced65b27bc36bf09a6 Mon Sep 17 00:00:00 2001
From: Anonymoose <MrAnonHimself@anon.life>
Date: Sun, 3 May 2015 17:44:20 -0500
Subject: [PATCH] Add ArmorStand Marker NBT API
@ -48,5 +48,5 @@ index 741b765..591c5a1 100644
+ // PaperSpigot end
}
--
2.4.1.windows.1
1.9.5.msysgit.1

View File

@ -1,4 +1,4 @@
From 70e515c0c6018904a9c4c48c0e7bb531096cd348 Mon Sep 17 00:00:00 2001
From f8a08f5a78478854fa5b0d9eefa87cf6db3c8c08 Mon Sep 17 00:00:00 2001
From: Jedediah Smith <jedediah@silencegreys.com>
Date: Thu, 30 Apr 2015 22:42:34 -0400
Subject: [PATCH] Fix jar being shaded multiple times
@ -17,5 +17,5 @@ index 6aeddce..60c1bd0 100644
<manifestEntries>
<Main-Class>org.bukkit.craftbukkit.Main</Main-Class>
--
2.4.1.windows.1
1.9.5.msysgit.1

View File

@ -1,4 +1,4 @@
From 9e26a0ea06ca8a34892bf9a34b1b276a391c81c0 Mon Sep 17 00:00:00 2001
From c2d3f2f244f11d21bd24127faafb878faff07a27 Mon Sep 17 00:00:00 2001
From: DoctorDark <doctordark11@gmail.com>
Date: Thu, 28 May 2015 20:12:38 -0500
Subject: [PATCH] Configurable end credits when leaving the end
@ -74,10 +74,10 @@ index f4f78e8..fac50e4 100644
return;
}
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
index 64f8630..6a690ee 100644
index acbe522..4d16fa7 100644
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
@@ -248,4 +248,10 @@ public class PaperSpigotWorldConfig
@@ -217,4 +217,10 @@ public class PaperSpigotWorldConfig
{
optimizeDraining = getBoolean( "optimize-draining", false );
}
@ -89,5 +89,5 @@ index 64f8630..6a690ee 100644
+ }
}
--
2.4.1.windows.1
1.9.5.msysgit.1

View File

@ -1,4 +1,4 @@
From a7954c623d317f72957411ec5d1338fa76a94d7f Mon Sep 17 00:00:00 2001
From 8a9a9c387f3eef8338ed3d8e9d89dfc0b10a7349 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Thu, 28 May 2015 22:01:25 -0500
Subject: [PATCH] Force load chunks for specific entities that fly through
@ -57,10 +57,10 @@ index 44219cd..a0452ac 100644
this.lastY = this.locY;
this.lastZ = this.locZ;
diff --git a/src/main/java/net/minecraft/server/EntityTNTPrimed.java b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
index dd1ad68..c272060 100644
index 1daba4e..db33c98 100644
--- a/src/main/java/net/minecraft/server/EntityTNTPrimed.java
+++ b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
@@ -56,6 +56,21 @@ public class EntityTNTPrimed extends Entity {
@@ -50,6 +50,21 @@ public class EntityTNTPrimed extends Entity {
public void t_() {
if (world.spigotConfig.currentPrimedTnt++ > world.spigotConfig.maxTntTicksPerTick) { return; } // Spigot
@ -82,26 +82,27 @@ index dd1ad68..c272060 100644
this.lastX = this.locX;
this.lastY = this.locY;
this.lastZ = this.locZ;
@@ -116,7 +131,18 @@ public class EntityTNTPrimed extends Entity {
locY += this.length / 2.0F;
}
@@ -97,7 +112,19 @@ public class EntityTNTPrimed extends Entity {
server.getPluginManager().callEvent(event);
- this.world.createExplosion(this, this.locX, locY, this.locZ, event.getRadius(), event.getFire(), true);
if (!event.isCancelled()) {
- this.world.createExplosion(this, this.locX, this.locY + (double) (this.length / 2.0F), this.locZ, event.getRadius(), event.getFire(), true);
+ // PaperSpigot start - Force load chunks for specific entities that fly through
+ if (world.paperSpigotConfig.loadUnloadedTNTEntities) {
+ ChunkProviderServer chunkProvider = (ChunkProviderServer) world.chunkProvider;
+ boolean before = chunkProvider.forceChunkLoad;
+ chunkProvider.forceChunkLoad = true;
+
+ this.world.createExplosion(this, this.locX, locY, this.locZ, event.getRadius(), event.getFire(), true);
+ this.world.createExplosion(this, this.locX, this.locY + (double) (this.length / 2.0F), this.locZ, event.getRadius(), event.getFire(), true);
+
+ chunkProvider.forceChunkLoad = before;
+ } else {
+ this.world.createExplosion(this, this.locX, locY, this.locZ, event.getRadius(), event.getFire(), true);
+ this.world.createExplosion(this, this.locX, this.locY + (double) (this.length / 2.0F), this.locZ, event.getRadius(), event.getFire(), true);
+ }
// PaperSpigot end
+ // PaperSpigot end
}
// CraftBukkit end
}
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 86913f4..385d742 100644
--- a/src/main/java/net/minecraft/server/World.java
@ -125,10 +126,10 @@ index 86913f4..385d742 100644
entity.ad = false;
}
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
index 6a690ee..557561c 100644
index 4d16fa7..fd2174a 100644
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
@@ -254,4 +254,14 @@ public class PaperSpigotWorldConfig
@@ -223,4 +223,14 @@ public class PaperSpigotWorldConfig
{
disableEndCredits = getBoolean( "game-mechanics.disable-end-credits", false );
}
@ -168,5 +169,5 @@ index 7ca1b24..dcab40c 100644
return true;
}
--
2.4.1.windows.1
1.9.5.msysgit.1

View File

@ -1,4 +1,4 @@
From e70c96da4657c54e7792c134b1ca6f7fe34f2249 Mon Sep 17 00:00:00 2001
From 8d7a7e6e06ca173cf6e69624b5a432977ca25f73 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
@ -97,5 +97,5 @@ index ae75b36..f12cf8a 100644
}
--
2.4.1.windows.1
1.9.5.msysgit.1

View File

@ -1,4 +1,4 @@
From 6fe5ba0882a8d943c3fbb78fb7619e5b77a1dc85 Mon Sep 17 00:00:00 2001
From dc006c675c9b591b911bad185bf11b9a68b3372d Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net>
Date: Mon, 1 Jun 2015 22:21:52 -0700
Subject: [PATCH] Stackable Buckets

View File

@ -1,4 +1,4 @@
From 68d1459d3bcdf6511939362dc87a94af899af2ea Mon Sep 17 00:00:00 2001
From fca81c0d7fe54905b1c7891ed88ff7cba6e419ca Mon Sep 17 00:00:00 2001
From: Iceee <andrew@opticgaming.tv>
Date: Mon, 1 Jun 2015 22:54:18 -0700
Subject: [PATCH] Fix lag from explosions processing dead entities

View File

@ -1,4 +1,4 @@
From aac3585edb181f425933b7e2034f351f64aa3b62 Mon Sep 17 00:00:00 2001
From 5e05406190489a48b24d722dbf117e7e33d6d3bf Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net>
Date: Tue, 2 Jun 2015 00:41:23 -0700
Subject: [PATCH] Generator Settings
@ -243,10 +243,10 @@ index 0f8211a..e76acfc 100644
Iterator iterator = this.e.values().iterator();
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
index 557561c..8491d3b 100644
index fd2174a..f50eb1f 100644
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
@@ -264,4 +264,28 @@ public class PaperSpigotWorldConfig
@@ -233,4 +233,28 @@ public class PaperSpigotWorldConfig
loadUnloadedTNTEntities = getBoolean( "load-chunks.tnt-entities", false );
loadUnloadedFallingBlocks = getBoolean( "load-chunks.falling-blocks", false );
}