mirror of
https://github.com/PaperMC/Paper.git
synced 2025-02-17 02:34:30 +01:00
Revert updates to TNT bias patch
This commit is contained in:
parent
9bb4978a15
commit
2208ce722b
1 changed files with 0 additions and 26 deletions
|
@ -23,30 +23,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
this.fuseTicks = 80;
|
||||
this.lastX = d0;
|
||||
this.lastY = d1;
|
||||
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 directional TNT bias
|
||||
+ // Shift the sample points so they are centered on the BB, to avoid 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.a(vec3d2.b(d3, d4, d5), vec3d) == null) { // CraftBukkit
|
||||
+ if (this.a(vec3d2.b(xOffset + d3, d4, zOffset + d5), vec3d) == null) { // PaperSpigot - Fix directional TNT bias // CraftBukkit
|
||||
++i;
|
||||
}
|
||||
|
||||
--
|
Loading…
Add table
Reference in a new issue