Remove giant TNT changes patch

This commit is contained in:
Byteflux 2015-06-04 01:42:09 -07:00
parent 2778f5e485
commit 5866cac361
14 changed files with 48 additions and 130 deletions

View file

@ -47,4 +47,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ }
+ // PaperSpigot end
}
--
--
1.9.5.msysgit.1

View file

@ -140,4 +140,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ }
+ // PaperSpigot end
}
--
--
1.9.5.msysgit.1

View file

@ -40,4 +40,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ }
+ // PaperSpigot end
}
--
--
1.9.5.msysgit.1

View file

@ -24,4 +24,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|| entity instanceof EntityEnderCrystal
|| entity instanceof EntityFireworks )
{
--
--
1.9.5.msysgit.1

View file

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

View file

@ -348,4 +348,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ log( "World async lighting: " + useAsyncLighting );
+ }
}
--
--
1.9.5.msysgit.1

View file

@ -88,4 +88,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ disableEndCredits = getBoolean( "game-mechanics.disable-end-credits", false );
+ }
}
--
--
1.9.5.msysgit.1

View file

@ -16,4 +16,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
<archive>
<manifestEntries>
<Main-Class>org.bukkit.craftbukkit.Main</Main-Class>
--
--
1.9.5.msysgit.1

View file

@ -58,8 +58,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
@@ -0,0 +0,0 @@ public class PaperSpigotWorldConfig
System.err.println( "==========================================" );
}
{
netherVoidTopDamage = getBoolean( "nether-ceiling-void-damage", false );
}
+
+ public int tickNextTickCap;
@ -72,4 +72,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ log( "WorldServer TickNextTickList cap always processes redstone: " + tickNextTickListCapIgnoresRedstone );
+ }
}
--
--
1.9.5.msysgit.1

View file

@ -83,25 +83,26 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
this.lastY = this.locY;
this.lastZ = this.locZ;
@@ -0,0 +0,0 @@ public class EntityTNTPrimed extends Entity {
locY += this.length / 2.0F;
}
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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/server/World.java
@ -167,4 +168,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
SpigotTimings.checkIfActiveTimer.stopTiming();
return true;
}
--
--
1.9.5.msysgit.1

View file

@ -43,4 +43,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ optimizeDraining = getBoolean( "optimize-draining", false );
+ }
}
--
--
1.9.5.msysgit.1

View file

@ -1,109 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Zach Brown <1254957+zachbr@users.noreply.github.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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/server/EntityTNTPrimed.java
+++ b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
@@ -0,0 +0,0 @@ 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() {}
@@ -0,0 +0,0 @@ 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;
@@ -0,0 +0,0 @@ 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
}
@@ -0,0 +0,0 @@ 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
@@ -0,0 +0,0 @@ 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( "==========================================" );
+ }
+ }
}
--

View file

@ -96,4 +96,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
return true;
}
--
--
1.9.5.msysgit.1

View file

@ -33,4 +33,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
}
public boolean netherVoidTopDamage;
--
--
1.9.5.msysgit.1