Archiviert
13
0

PaperSpigot TNT Changes

Brought our multiple TNT change patches into a single patch and
configuraiton section.
You /will/ need to update your configs, sorry.

Adds additional configuration and features as well.
Dieser Commit ist enthalten in:
Zach Brown 2015-02-23 15:03:10 -06:00
Ursprung 188acb8688
Commit d28dd3edbd
33 geänderte Dateien mit 214 neuen und 173 gelöschten Zeilen

Datei anzeigen

@ -1,4 +1,4 @@
From a219468eb44541f05fc0209db98f8f8b65bdc108 Mon Sep 17 00:00:00 2001 From 2cd548a4147654425d101a8a112cc59fe6f9314d Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com> From: Zach Brown <zach.brown@destroystokyo.com>
Date: Fri, 28 Nov 2014 01:29:35 -0600 Date: Fri, 28 Nov 2014 01:29:35 -0600
Subject: [PATCH] Configurable fishing time ranges Subject: [PATCH] Configurable fishing time ranges

Datei anzeigen

@ -1,28 +0,0 @@
From 77ab7df400008e421f7415601732e94efcfc636d Mon Sep 17 00:00:00 2001
From: Iceee <andrew@opticgaming.tv>
Date: Fri, 11 Jul 2014 03:54:06 -0500
Subject: [PATCH] Fix directional TNT bias
diff --git a/src/main/java/net/minecraft/server/EntityTNTPrimed.java b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
index 3621faf..4823698 100644
--- a/src/main/java/net/minecraft/server/EntityTNTPrimed.java
+++ b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
@@ -18,11 +18,11 @@ public class EntityTNTPrimed extends Entity {
public EntityTNTPrimed(World world, double d0, double d1, double d2, EntityLiving entityliving) {
this(world);
this.setPosition(d0, d1, d2);
- float f = (float) (Math.random() * 3.1415927410125732D * 2.0D);
+ //float f = (float) (Math.random() * 3.1415927410125732D * 2.0D); // PaperSpigot - Fix directional TNT bias
- this.motX = (double) (-((float) Math.sin((double) f)) * 0.02F);
+ this.motX = 0; // PaperSpigot - Fix directional TNT bias //(double) (-((float) Math.sin((double) f)) * 0.02F);
this.motY = 0.20000000298023224D;
- this.motZ = (double) (-((float) Math.cos((double) f)) * 0.02F);
+ this.motZ = 0; // PaperSpigot - Fix directional TNT bias //(double) (-((float) Math.cos((double) f)) * 0.02F);
this.fuseTicks = 80;
this.lastX = d0;
this.lastY = d1;
--
1.9.5.msysgit.0

Datei anzeigen

@ -1,4 +1,4 @@
From 025da359b8d3bb8c4afcb13eb2a5830e78283097 Mon Sep 17 00:00:00 2001 From d31ec5cfef234a997563a3c58639f8bd6830bfdf Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com> From: Zach Brown <zach.brown@destroystokyo.com>
Date: Sun, 29 Jun 2014 13:32:36 -0500 Date: Sun, 29 Jun 2014 13:32:36 -0500
Subject: [PATCH] Allow nerfed mobs to jump Subject: [PATCH] Allow nerfed mobs to jump

Datei anzeigen

@ -1,11 +1,11 @@
From deda4bb20fd6b6aa6839d3f5ffdcd92b8cac8d61 Mon Sep 17 00:00:00 2001 From 0f98d5f5793dde56cee3130d5d418e28d2412fdb Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com> From: Zach Brown <zach.brown@destroystokyo.com>
Date: Fri, 28 Nov 2014 01:33:25 -0600 Date: Fri, 28 Nov 2014 01:33:25 -0600
Subject: [PATCH] Toggle for player interact limiter Subject: [PATCH] Toggle for player interact limiter
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 5c17e44..69efb4f 100644 index a09e793..a7c629b 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java --- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -626,7 +626,8 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList @@ -626,7 +626,8 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList

Datei anzeigen

@ -1,4 +1,4 @@
From 354488007bdff51cbc37667320cfeb68432de2cd Mon Sep 17 00:00:00 2001 From 3a70598613bfb2b290ff383bd1f0a91fc012c4e0 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: Fri, 28 Nov 2014 01:41:54 -0600
Subject: [PATCH] Player Exhaustion Multipliers Subject: [PATCH] Player Exhaustion Multipliers

Datei anzeigen

@ -1,4 +1,4 @@
From eebbac57234fdb36d364372ad595d354f3ed09b9 Mon Sep 17 00:00:00 2001 From 149b5f2a1899cf88e34c194342b625fbc7f54eac 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: Fri, 28 Nov 2014 01:49:53 -0600
Subject: [PATCH] Add configurable despawn distances for living entities Subject: [PATCH] Add configurable despawn distances for living entities

Datei anzeigen

@ -1,11 +1,11 @@
From ee72aae8f02c2bb498dac033036a830b7feaf0fe Mon Sep 17 00:00:00 2001 From da87cfffb5d8d8c4d73a35760ededba300fc1c2c 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: Fri, 28 Nov 2014 01:53:14 -0600
Subject: [PATCH] Allow for toggling of spawn chunks Subject: [PATCH] Allow for toggling of spawn chunks
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 2920d56..ba37e02 100644 index f85700f..60cdf2e 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
@@ -219,6 +219,7 @@ public abstract class World implements IBlockAccess { @@ -219,6 +219,7 @@ public abstract class World implements IBlockAccess {

Datei anzeigen

@ -1,4 +1,4 @@
From 523316f92cef57584b2bbb7eedc4ef05eafa13db Mon Sep 17 00:00:00 2001 From a0cbd2c7aa88d123844823389a1542ebb9f3851e 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: Fri, 28 Nov 2014 02:03:43 -0600
Subject: [PATCH] Drop falling block entities that are above the specified Subject: [PATCH] Drop falling block entities that are above the specified
@ -28,21 +28,20 @@ index fd78677..81a5dc9 100644
this.motY *= 0.9800000190734863D; this.motY *= 0.9800000190734863D;
this.motZ *= 0.9800000190734863D; this.motZ *= 0.9800000190734863D;
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
index 00303dc..5306e9a 100644 index 00303dc..4b384bf 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
@@ -146,4 +146,14 @@ public class PaperSpigotWorldConfig @@ -146,4 +146,13 @@ public class PaperSpigotWorldConfig
keepSpawnInMemory = getBoolean( "keep-spawn-loaded", true ); keepSpawnInMemory = getBoolean( "keep-spawn-loaded", true );
log( "Keep spawn chunk loaded: " + keepSpawnInMemory ); log( "Keep spawn chunk loaded: " + keepSpawnInMemory );
} }
+ +
+ public double fallingBlockHeightNerf; + public int fallingBlockHeightNerf;
+ private void fallingBlockheightNerf() + private void fallingBlockheightNerf()
+ { + {
+ // Technically a little disingenuous as it applies to all falling blocks but alas, backwards compat prevails! + fallingBlockHeightNerf = getInt( "falling-block-height-nerf", 0 );
+ fallingBlockHeightNerf = getDouble( "tnt-entity-height-nerf", 0 );
+ if (fallingBlockHeightNerf != 0) { + if (fallingBlockHeightNerf != 0) {
+ log( "TNT/Falling Block Height Limit set to Y: " + fallingBlockHeightNerf); + log( "Falling Block Height Limit set to Y: " + fallingBlockHeightNerf);
+ } + }
+ } + }
} }

Datei anzeigen

@ -1,4 +1,4 @@
From 8d89115daeb46ccbbdbf237fc1f05cb511871503 Mon Sep 17 00:00:00 2001 From 54b9feb9bc83830fb78462796e18eef583566b32 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: Fri, 28 Nov 2014 02:31:02 -0600
Subject: [PATCH] Configurable speed for water flowing over lava Subject: [PATCH] Configurable speed for water flowing over lava
@ -43,11 +43,11 @@ index 5184715..bc4cee5 100644
+ } + }
} }
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
index 5306e9a..670f78f 100644 index 4b384bf..3b55750 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
@@ -156,4 +156,11 @@ public class PaperSpigotWorldConfig @@ -155,4 +155,11 @@ public class PaperSpigotWorldConfig
log( "TNT/Falling Block Height Limit set to Y: " + fallingBlockHeightNerf); log( "Falling Block Height Limit set to Y: " + fallingBlockHeightNerf);
} }
} }
+ +

Datei anzeigen

@ -1,4 +1,4 @@
From 8bc83195afec263e5e6e5a72d87f1d0a98348749 Mon Sep 17 00:00:00 2001 From cb66a69be962f8aeeca6af180305442dc985c027 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: Fri, 28 Nov 2014 03:31:21 -0600
Subject: [PATCH] Player affects spawning API Subject: [PATCH] Player affects spawning API
@ -67,7 +67,7 @@ index 43954b3..932a572 100644
biomemeta = worldserver.a(enumcreaturetype, blockposition2); biomemeta = worldserver.a(enumcreaturetype, blockposition2);
if (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 22a8b59..a105351 100644 index 60cdf2e..26f4d96 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
@@ -2,14 +2,13 @@ package net.minecraft.server; @@ -2,14 +2,13 @@ package net.minecraft.server;
@ -94,7 +94,7 @@ index 22a8b59..a105351 100644
import org.bukkit.craftbukkit.SpigotTimings; // Spigot import org.bukkit.craftbukkit.SpigotTimings; // Spigot
import org.bukkit.generator.ChunkGenerator; import org.bukkit.generator.ChunkGenerator;
import org.bukkit.craftbukkit.CraftServer; import org.bukkit.craftbukkit.CraftServer;
@@ -2775,6 +2773,50 @@ public abstract class World implements IBlockAccess { @@ -2769,6 +2767,50 @@ public abstract class World implements IBlockAccess {
return false; return false;
} }

Datei anzeigen

@ -1,35 +0,0 @@
From 01e10685a9d781cec3a70951baa46b907202a29a Mon Sep 17 00:00:00 2001
From: Jedediah Smith <jedediah@silencegreys.com>
Date: Fri, 28 Nov 2014 02:36:18 -0600
Subject: [PATCH] Center TNT grid sample points
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index ba37e02..22a8b59 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -1875,6 +1875,12 @@ 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 - Center TNT sample points for more accurate calculations
+ // Shift the sample points so they are centered on the BB
+ 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;
@@ -1886,7 +1892,7 @@ 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) {
+ if (this.rayTrace(new Vec3D(xOffset, d4, zOffset + d5), vec3d) == null) { // PaperSpigot - Center TNT sample points
++i;
}
--
1.9.5.msysgit.0

Datei anzeigen

@ -1,4 +1,4 @@
From c353c92f3435e1a7ae166172936b75d0732a414a Mon Sep 17 00:00:00 2001 From 8a53e3c8579c132d53f8d85f5fc2df322450374f Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com> From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 19 Aug 2014 14:21:37 -0500 Date: Tue, 19 Aug 2014 14:21:37 -0500
Subject: [PATCH] Show 'PaperSpigot' in client crashes, server lists, and Subject: [PATCH] Show 'PaperSpigot' in client crashes, server lists, and
@ -19,5 +19,5 @@ index 7e91511..fbc2e61 100644
public CrashReport b(CrashReport crashreport) { public CrashReport b(CrashReport crashreport) {
-- --
2.3.0 1.9.5.msysgit.0

Datei anzeigen

@ -1,4 +1,4 @@
From 507f9ffecad6d490ced5ae89eadb7369e1bfbecb Mon Sep 17 00:00:00 2001 From f0a774c60ae25b1dfec79c60c95843f5d3418982 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com> From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 19 Aug 2014 14:25:40 -0500 Date: Tue, 19 Aug 2014 14:25:40 -0500
Subject: [PATCH] RIP metrics Subject: [PATCH] RIP metrics
@ -687,5 +687,5 @@ index c03388d..eeb1aec 100644
static void readConfig(Class<?> clazz, Object instance) static void readConfig(Class<?> clazz, Object instance)
-- --
2.2.2 1.9.5.msysgit.0

Datei anzeigen

@ -1,11 +1,11 @@
From 6904cc9f13c765652bec13688c575815fc914f78 Mon Sep 17 00:00:00 2001 From d9c73f504f132d34904c1445fa9391823b96c3d3 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: Fri, 28 Nov 2014 03:43:14 -0600
Subject: [PATCH] Remove invalid mob spawner tile entities Subject: [PATCH] Remove invalid mob spawner tile entities
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index c50ab45..234d2c8 100644 index b76b446..2d99252 100644
--- 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
@@ -756,6 +756,11 @@ public class Chunk { @@ -756,6 +756,11 @@ public class Chunk {
@ -21,10 +21,10 @@ index c50ab45..234d2c8 100644
} 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()
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 670f78f..0642f12 100644 index 3b55750..59a9387 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
@@ -163,4 +163,11 @@ public class PaperSpigotWorldConfig @@ -162,4 +162,11 @@ public class PaperSpigotWorldConfig
waterOverLavaFlowSpeed = getInt( "water-over-lava-flow-speed", 5 ); waterOverLavaFlowSpeed = getInt( "water-over-lava-flow-speed", 5 );
log( "Water over lava flow speed: " + waterOverLavaFlowSpeed ); log( "Water over lava flow speed: " + waterOverLavaFlowSpeed );
} }

Datei anzeigen

@ -1,4 +1,4 @@
From f239a7099cb973e65d130657977527269e7d3d32 Mon Sep 17 00:00:00 2001 From a54f2fe608b2d5ccbc117dec28be3531eda48ca5 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: Fri, 28 Nov 2014 04:14:14 -0600
Subject: [PATCH] Optimize TileEntity Ticking Subject: [PATCH] Optimize TileEntity Ticking
@ -74,7 +74,7 @@ index 7b6f8ae..c6b593f 100644
if (this.e instanceof BlockDaylightDetector) { if (this.e instanceof BlockDaylightDetector) {
((BlockDaylightDetector) this.e).d(this.world, this.position); ((BlockDaylightDetector) this.e).d(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 a105351..b59e88a 100644 index 26f4d96..7730e2c 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
@@ -3,13 +3,7 @@ package net.minecraft.server; @@ -3,13 +3,7 @@ package net.minecraft.server;

Datei anzeigen

@ -1,4 +1,4 @@
From 329cf8e6cb3aed1ba4b212e5a368d3642615e4c7 Mon Sep 17 00:00:00 2001 From e82339befdcab7f8c3956e3ff9f6c0d2d8785f93 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: Fri, 28 Nov 2014 11:56:55 -0600
Subject: [PATCH] Move sound handling out of the chest tick loop Subject: [PATCH] Move sound handling out of the chest tick loop

Datei anzeigen

@ -1,4 +1,4 @@
From 55bbadaa2107d3a9e7635abbb11dc5807a0420b7 Mon Sep 17 00:00:00 2001 From 2ac679151195e7aa1b660fde7949474282daee34 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: Fri, 28 Nov 2014 12:11:03 -0600
Subject: [PATCH] Remove specific entities that fly through an unloaded chunk Subject: [PATCH] Remove specific entities that fly through an unloaded chunk
@ -51,7 +51,7 @@ index 81a5dc9..336e575 100644
if (this.world.paperSpigotConfig.fallingBlockHeightNerf != 0 && this.locY > this.world.paperSpigotConfig.fallingBlockHeightNerf) { if (this.world.paperSpigotConfig.fallingBlockHeightNerf != 0 && this.locY > this.world.paperSpigotConfig.fallingBlockHeightNerf) {
if (this.dropItem) { if (this.dropItem) {
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 4823698..7b856ef 100644 index 3621faf..287039c 100644
--- a/src/main/java/net/minecraft/server/EntityTNTPrimed.java --- a/src/main/java/net/minecraft/server/EntityTNTPrimed.java
+++ b/src/main/java/net/minecraft/server/EntityTNTPrimed.java +++ b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
@@ -47,6 +47,14 @@ public class EntityTNTPrimed extends Entity { @@ -47,6 +47,14 @@ public class EntityTNTPrimed extends Entity {
@ -70,7 +70,7 @@ index 4823698..7b856ef 100644
this.motY *= 0.9800000190734863D; this.motY *= 0.9800000190734863D;
this.motZ *= 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 diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index b59e88a..c350281 100644 index 7730e2c..1933f5f 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
@@ -1158,6 +1158,7 @@ public abstract class World implements IBlockAccess { @@ -1158,6 +1158,7 @@ public abstract class World implements IBlockAccess {
@ -97,10 +97,10 @@ index b59e88a..c350281 100644
entity.tickTimer.startTiming(); // Spigot entity.tickTimer.startTiming(); // Spigot
// CraftBukkit end // CraftBukkit end
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 0642f12..9507ab5 100644 index 59a9387..cffb145 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
@@ -170,4 +170,14 @@ public class PaperSpigotWorldConfig @@ -169,4 +169,14 @@ public class PaperSpigotWorldConfig
removeInvalidMobSpawnerTEs = getBoolean( "remove-invalid-mob-spawner-tile-entities", true ); removeInvalidMobSpawnerTEs = getBoolean( "remove-invalid-mob-spawner-tile-entities", true );
log( "Remove invalid mob spawner tile entities: " + removeInvalidMobSpawnerTEs ); log( "Remove invalid mob spawner tile entities: " + removeInvalidMobSpawnerTEs );
} }

Datei anzeigen

@ -1,4 +1,4 @@
From 6929e63583a63e15680ce543596b0271b74e1635 Mon Sep 17 00:00:00 2001 From eb2be3ee1ac1079e5023e8b9de83f4e86bb9b5a9 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: Fri, 28 Nov 2014 12:23:02 -0600
Subject: [PATCH] Configurable strength and weakness effect modifiers Subject: [PATCH] Configurable strength and weakness effect modifiers

Datei anzeigen

@ -1,4 +1,4 @@
From e20a0fb77d352bd22f55070452b35d5731e2d64d Mon Sep 17 00:00:00 2001 From 713d5992f6f6777bd71ea4a98295c757aa98b81e 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: Fri, 28 Nov 2014 12:30:47 -0600
Subject: [PATCH] Temporary fix for rails dupe Subject: [PATCH] Temporary fix for rails dupe

Datei anzeigen

@ -1,4 +1,4 @@
From 43723d4317f9fc2ed6bdce8ef090b9847e236bbf Mon Sep 17 00:00:00 2001 From 26e30543319472acad2768609c97c4ee485e30d4 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: Fri, 28 Nov 2014 12:48:26 -0600
Subject: [PATCH] Further improve server tick loop Subject: [PATCH] Further improve server tick loop
@ -212,5 +212,5 @@ index be2e31d..21fd7ef 100644
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 );
-- --
2.3.0 1.9.5.msysgit.0

Datei anzeigen

@ -1,4 +1,4 @@
From ed8b2184c38475b4f496c6c6db4bfd636b87b8e6 Mon Sep 17 00:00:00 2001 From b787bc58e8224d8db379608f104cd935f17889fc Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Fri, 28 Nov 2014 13:20:22 -0600 Date: Fri, 28 Nov 2014 13:20:22 -0600
Subject: [PATCH] Only refresh abilities if needed Subject: [PATCH] Only refresh abilities if needed

Datei anzeigen

@ -1,4 +1,4 @@
From af4ebcf09a2982aea9de423e717a3868b25effea Mon Sep 17 00:00:00 2001 From a658e1ae5cb763266cc2e3edeaea49ba6082656e 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: Fri, 28 Nov 2014 13:43:11 -0600
Subject: [PATCH] Player lookup improvements Subject: [PATCH] Player lookup improvements
@ -13,7 +13,7 @@ By using a map based approach for player lookups, player lookup should
be consistent in performance regardless of how many players are online. be consistent in performance regardless of how many players are online.
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 9e9bccf..535e43b 100644 index 1693efc..d3f2dfe 100644
--- 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
@@ -49,6 +49,31 @@ public abstract class PlayerList { @@ -49,6 +49,31 @@ public abstract class PlayerList {
@ -82,7 +82,7 @@ index 9e9bccf..535e43b 100644
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");
} }
@@ -967,6 +998,7 @@ public abstract class PlayerList { @@ -966,6 +997,7 @@ public abstract class PlayerList {
} }
public EntityPlayer getPlayer(String s) { public EntityPlayer getPlayer(String s) {
@ -171,5 +171,5 @@ index 0c9f241..e7c61fd 100644
public InetSocketAddress getAddress() { public InetSocketAddress getAddress() {
-- --
2.2.2 1.9.5.msysgit.0

Datei anzeigen

@ -1,4 +1,4 @@
From 3d4f74eca88c363209d02f64020a781597420236 Mon Sep 17 00:00:00 2001 From ba5e12d756d97484b9e742104f3f6668b37f7681 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: Fri, 28 Nov 2014 13:53:48 -0600
Subject: [PATCH] Configurable game mechanics changes Subject: [PATCH] Configurable game mechanics changes
@ -63,10 +63,10 @@ index dc4f526..45b5ac5 100644
+ } + }
} }
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
index 9507ab5..7f02e29 100644 index cffb145..bdf06fb 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
@@ -180,4 +180,10 @@ public class PaperSpigotWorldConfig @@ -179,4 +179,10 @@ public class PaperSpigotWorldConfig
removeUnloadedTNTEntities = getBoolean( "remove-unloaded.tnt-entities", true ); removeUnloadedTNTEntities = getBoolean( "remove-unloaded.tnt-entities", true );
removeUnloadedFallingBlocks = getBoolean( "remove-unloaded.falling-blocks", true ); removeUnloadedFallingBlocks = getBoolean( "remove-unloaded.falling-blocks", true );
} }

Datei anzeigen

@ -1,4 +1,4 @@
From 54ddb82a4005cb701c1fc141b212afd14f597bde Mon Sep 17 00:00:00 2001 From fedfc18c899bf25bc429f7417f496020f50388f7 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Thu, 6 Nov 2014 18:29:20 -0600 Date: Thu, 6 Nov 2014 18:29:20 -0600
Subject: [PATCH] Add async chunk load API Subject: [PATCH] Add async chunk load API

Datei anzeigen

@ -1,11 +1,11 @@
From bd555ed341785d0de3e363096cae37d788b7b403 Mon Sep 17 00:00:00 2001 From b7a7da6495b1dab1ef146167cfc36203b44d7d4a Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net> From: Byteflux <byte@byteflux.net>
Date: Sun, 30 Nov 2014 18:58:07 -0600 Date: Sun, 30 Nov 2014 18:58:07 -0600
Subject: [PATCH] Allow specified ItemStacks to retain their invalid data Subject: [PATCH] Allow specified ItemStacks to retain their invalid data
diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java
index 596db09..5e8f1c7 100644 index 169706e..fa6178b 100644
--- a/src/main/java/net/minecraft/server/ItemStack.java --- a/src/main/java/net/minecraft/server/ItemStack.java
+++ b/src/main/java/net/minecraft/server/ItemStack.java +++ b/src/main/java/net/minecraft/server/ItemStack.java
@@ -17,6 +17,8 @@ import org.bukkit.entity.Player; @@ -17,6 +17,8 @@ import org.bukkit.entity.Player;

Datei anzeigen

@ -1,4 +1,4 @@
From cecc2d146aafd4f69e0d390f094655acfe974e6a Mon Sep 17 00:00:00 2001 From 4bf725b31996da8637cb5efce367e6d55e84aaf7 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, 30 Nov 2014 22:57:18 -0600
Subject: [PATCH] Add TNT source location API Subject: [PATCH] Add TNT source location API
@ -42,7 +42,7 @@ index 6d02141..3e5a77f 100644
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 b5763bb..611bac8 100644 index 287039c..ddff5a8 100644
--- a/src/main/java/net/minecraft/server/EntityTNTPrimed.java --- a/src/main/java/net/minecraft/server/EntityTNTPrimed.java
+++ b/src/main/java/net/minecraft/server/EntityTNTPrimed.java +++ b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
@@ -8,15 +8,23 @@ public class EntityTNTPrimed extends Entity { @@ -8,15 +8,23 @@ public class EntityTNTPrimed extends Entity {
@ -69,7 +69,7 @@ index b5763bb..611bac8 100644
+ public EntityTNTPrimed(org.bukkit.Location loc, World world, double d0, double d1, double d2, EntityLiving entityliving) { + public EntityTNTPrimed(org.bukkit.Location loc, World world, double d0, double d1, double d2, EntityLiving entityliving) {
+ this(loc, world); + this(loc, world);
this.setPosition(d0, d1, d2); this.setPosition(d0, d1, d2);
//float f = (float) (Math.random() * 3.1415927410125732D * 2.0D); // PaperSpigot - Fix directional TNT bias float f = (float) (Math.random() * 3.1415927410125732D * 2.0D);
@@ -96,10 +104,25 @@ public class EntityTNTPrimed extends Entity { @@ -96,10 +104,25 @@ public class EntityTNTPrimed extends Entity {

Datei anzeigen

@ -1,4 +1,4 @@
From 3f217e4361be07e0c8e4766310f6304c21f66c4c Mon Sep 17 00:00:00 2001 From 52f989f6e94a23192a2d76e4d84d100f5d5dfb85 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com> From: Zach Brown <zach.brown@destroystokyo.com>
Date: Fri, 5 Dec 2014 22:44:50 -0600 Date: Fri, 5 Dec 2014 22:44:50 -0600
Subject: [PATCH] Add a constructor for setting header and footer Subject: [PATCH] Add a constructor for setting header and footer

Datei anzeigen

@ -1,41 +0,0 @@
From b7ae0052d97f71cd39b386d8039a74a14c272306 Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net>
Date: Sat, 29 Nov 2014 23:05:52 -0800
Subject: [PATCH] Configurable TNT water movement
diff --git a/src/main/java/net/minecraft/server/EntityTNTPrimed.java b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
index 7b856ef..b5763bb 100644
--- a/src/main/java/net/minecraft/server/EntityTNTPrimed.java
+++ b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
@@ -109,4 +109,12 @@ public class EntityTNTPrimed extends Entity {
public float getHeadHeight() {
return 0.0F;
}
+
+ /**
+ * PaperSpigot - Configurable TNT water movement
+ */
+ @Override
+ public boolean aK() {
+ 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 7f02e29..74d1017 100644
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
@@ -186,4 +186,10 @@ public class PaperSpigotWorldConfig
{
boatsDropBoats = getBoolean( "game-mechanics.boats-drop-boats", false );
}
+
+ public boolean tntMovesInWater;
+ private void tntMovesInWater()
+ {
+ tntMovesInWater = getBoolean("tnt-moves-in-water", true );
+ }
}
--
1.9.5.msysgit.0

Datei anzeigen

@ -1,4 +1,4 @@
From 7fb18d989c5d335b8686f0ef4ba9f519a4ed0234 Mon Sep 17 00:00:00 2001 From 21634289a89ad5e111cfd9314ee98038484c16d2 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Fri, 19 Dec 2014 16:28:22 -0600 Date: Fri, 19 Dec 2014 16:28:22 -0600
Subject: [PATCH] Remove CraftBukkit "Feature" of ItemStack's having infinite Subject: [PATCH] Remove CraftBukkit "Feature" of ItemStack's having infinite
@ -66,7 +66,7 @@ index 0199856..4f3bc3c 100644
} }
diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java
index e5af375..4084dd3 100644 index fa6178b..9547b4d 100644
--- a/src/main/java/net/minecraft/server/ItemStack.java --- a/src/main/java/net/minecraft/server/ItemStack.java
+++ b/src/main/java/net/minecraft/server/ItemStack.java +++ b/src/main/java/net/minecraft/server/ItemStack.java
@@ -73,6 +73,7 @@ public final class ItemStack { @@ -73,6 +73,7 @@ public final class ItemStack {
@ -78,7 +78,7 @@ index e5af375..4084dd3 100644
} }
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 69efb4f..b73fa58 100644 index a7c629b..ffcbfb2 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java --- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -735,7 +735,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList @@ -735,7 +735,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList

Datei anzeigen

@ -1,4 +1,4 @@
From 66a31ac97a2475d69922718578ec3f410a4d8a67 Mon Sep 17 00:00:00 2001 From 7b7a341c8b247ccffd179d4c79580701592fffef 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: Wed, 3 Jul 2013 08:29:26 -0400
Subject: [PATCH] Prevent tile entity and entity crashes Subject: [PATCH] Prevent tile entity and entity crashes
@ -24,7 +24,7 @@ index 76cdc7e..d976515 100644
crashreportsystemdetails.a("Actual block data value", (Callable) (new CrashReportTileEntityData(this))); crashreportsystemdetails.a("Actual block data value", (Callable) (new CrashReportTileEntityData(this)));
} }
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 c350281..e5e6030 100644 index 1933f5f..e4a1bb2 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
@@ -1418,10 +1418,13 @@ public abstract class World implements IBlockAccess { @@ -1418,10 +1418,13 @@ public abstract class World implements IBlockAccess {

Datei anzeigen

@ -1,6 +1,6 @@
From 5941b0e2bfb3d341eb6d07832a2443f6193c495b Mon Sep 17 00:00:00 2001 From 8037f86a24fd4ba5a90e088bc811bf4c810821a8 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com> From: Zach Brown <zach.brown@destroystokyo.com>
Date: Thu, 29 Jan 2015 15:11:31 -0600 Date: Mon, 23 Feb 2015 14:57:28 -0600
Subject: [PATCH] Configurable top of nether void damage Subject: [PATCH] Configurable top of nether void damage
@ -32,12 +32,12 @@ index 4848e09..be59806 100644
} }
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 74d1017..00a418b 100644 index bdf06fb..a756395 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
@@ -192,4 +192,10 @@ public class PaperSpigotWorldConfig @@ -185,4 +185,10 @@ public class PaperSpigotWorldConfig
{ {
tntMovesInWater = getBoolean("tnt-moves-in-water", true ); boatsDropBoats = getBoolean( "game-mechanics.boats-drop-boats", false );
} }
+ +
+ public boolean netherVoidTopDamage; + public boolean netherVoidTopDamage;

Datei anzeigen

@ -1,4 +1,4 @@
From 33ae554d6f47a2bae0f23671d84a7cc7c5d174ad Mon Sep 17 00:00:00 2001 From 9cd798fbfcb245029b35c8caad7b2754ba38f553 Mon Sep 17 00:00:00 2001
From: Zach <zach.brown@destroystokyo.com> From: Zach <zach.brown@destroystokyo.com>
Date: Fri, 13 Feb 2015 14:49:30 -0600 Date: Fri, 13 Feb 2015 14:49:30 -0600
Subject: [PATCH] Enderman drop the block they're holding when they die Subject: [PATCH] Enderman drop the block they're holding when they die
@ -23,5 +23,5 @@ index fe198c9..6c85f3d 100644
public void setCarried(IBlockData iblockdata) { public void setCarried(IBlockData iblockdata) {
-- --
2.3.0 1.9.5.msysgit.0

Datei anzeigen

@ -0,0 +1,146 @@
From 825d2eb3b84c72194294491432a5f3625315ed31 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Mon, 23 Feb 2015 15:54:17 -0600
Subject: [PATCH] PaperSpigot TNT Changes
PaperSpigot communal TNT modification patch
Original authors for individual changes are listed w/in PaperSpigotWorldConfig
diff --git a/src/main/java/net/minecraft/server/EntityTNTPrimed.java b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
index ddff5a8..7c94d99 100644
--- 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 aK() {
+ 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 e4a1bb2..7bac43c 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -1888,6 +1888,11 @@ public abstract class World implements IBlockAccess {
double d1 = 1.0D / ((axisalignedbb.e - axisalignedbb.b) * 2.0D + 1.0D);
double d2 = 1.0D / ((axisalignedbb.f - axisalignedbb.c) * 2.0D + 1.0D);
+ // PaperSpigot start - Fix TNT directional bias
+ double xOffset = (1.0 - Math.floor(1.0 / d0) * d0) / 2.0;
+ double zOffset = (1.0 - Math.floor(1.0 / d2) * d2) / 2.0;
+ // PaperSpigot end
+
if (d0 >= 0.0D && d1 >= 0.0D && d2 >= 0.0D) {
int i = 0;
int j = 0;
@@ -1899,7 +1904,16 @@ public abstract class World implements IBlockAccess {
double d4 = axisalignedbb.b + (axisalignedbb.e - axisalignedbb.b) * (double) f1;
double d5 = axisalignedbb.c + (axisalignedbb.f - axisalignedbb.c) * (double) f2;
- if (this.rayTrace(new Vec3D(d3, d4, d5), vec3d) == null) {
+ // PaperSpigot start - Fix TNT directional bias
+ Vec3D vec3d1;
+ if (this.paperSpigotConfig.fixTNTDirectionBias) {
+ vec3d1 = new Vec3D(xOffset, d4, zOffset + d5);
+ } else {
+ vec3d1 = new Vec3D(d3, d4, d5);
+ }
+
+ if (this.rayTrace(vec3d1, vec3d) == null) {
+ // PaperSpigot end
++i;
}
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
index a756395..b2d8a03 100644
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
@@ -191,4 +191,36 @@ public class PaperSpigotWorldConfig
{
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> and Jedediah Smith <jedediah@silencegreys.com>
+ 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( "==========================================" );
+ }
+ }
}
--
1.9.5.msysgit.0