Switch to using ForgeFlower for Paper Only mc-dev imports

ForgeFlower is better than Spigots FernFlower at decompiling the source.

However, in order to maintain the CraftBukkit patches, we must keep
using spigots for the primary.

However, for any file that we import on top of Spigots imported files
there is nothing stopping us from using better decompiled files.

So these changes will use ForgeFlower to maintain a better set of
decomped files, so anything we add on top of Paper can start off
in a better spot.
This commit is contained in:
Aikar
2018-08-31 18:56:57 -04:00
parent bd4da1aea0
commit e82ef9ec05
74 changed files with 987 additions and 1045 deletions

View File

@@ -4,8 +4,21 @@ Date: Sun, 8 Mar 2015 22:55:25 -0600
Subject: [PATCH] Optimize TileEntity Ticking
diff --git a/src/main/java/net/minecraft/server/BlockChest.java b/src/main/java/net/minecraft/server/BlockChest.java
index 9ffec378a9..5401f7d754 100644
--- a/src/main/java/net/minecraft/server/BlockChest.java
+++ b/src/main/java/net/minecraft/server/BlockChest.java
@@ -0,0 +0,0 @@ public class BlockChest extends BlockTileEntity implements IFluidSource, IFluidC
}
private boolean b(World world, BlockPosition blockposition) {
- List list = world.a(EntityOcelot.class, new AxisAlignedBB((double)blockposition.getX(), (double)(blockposition.getY() + 1), (double)blockposition.getZ(), (double)(blockposition.getX() + 1), (double)(blockposition.getY() + 2), (double)(blockposition.getZ() + 1)));
+ List<EntityOcelot> list = world.a(EntityOcelot.class, new AxisAlignedBB((double)blockposition.getX(), (double)(blockposition.getY() + 1), (double)blockposition.getZ(), (double)(blockposition.getX() + 1), (double)(blockposition.getY() + 2), (double)(blockposition.getZ() + 1))); // Paper - decompile fix
if (!list.isEmpty()) {
for(EntityOcelot entityocelot : list) {
if (entityocelot.isSitting()) {
diff --git a/src/main/java/net/minecraft/server/TileEntityChest.java b/src/main/java/net/minecraft/server/TileEntityChest.java
index a534c441a..591524f1e 100644
index ad601a39d9..9573a4ecdf 100644
--- a/src/main/java/net/minecraft/server/TileEntityChest.java
+++ b/src/main/java/net/minecraft/server/TileEntityChest.java
@@ -0,0 +0,0 @@ import org.bukkit.craftbukkit.entity.CraftHumanEntity;
@@ -91,7 +104,7 @@ index a534c441a..591524f1e 100644
int newPower = Math.max(0, Math.min(15, this.f));
diff --git a/src/main/java/net/minecraft/server/TileEntityEnderChest.java b/src/main/java/net/minecraft/server/TileEntityEnderChest.java
index 61edd7cc6..9407a8c97 100644
index 05de26405e..bc851d2a04 100644
--- a/src/main/java/net/minecraft/server/TileEntityEnderChest.java
+++ b/src/main/java/net/minecraft/server/TileEntityEnderChest.java
@@ -0,0 +0,0 @@
@@ -99,9 +112,9 @@ index 61edd7cc6..9407a8c97 100644
-public class TileEntityEnderChest extends TileEntity implements ITickable {
+public class TileEntityEnderChest extends TileEntity { // Paper - Remove ITickable
public float a;
public float e;
public int f;
@@ -0,0 +0,0 @@ public class TileEntityEnderChest extends TileEntity implements ITickable {
}
@@ -111,9 +124,7 @@ index 61edd7cc6..9407a8c97 100644
int i = this.position.getX();
int j = this.position.getY();
int k = this.position.getZ();
float f = 0.1F;
double d0;
-
float fx = 0.1F;
+ */
+ // Paper start
+ }
@@ -121,13 +132,11 @@ index 61edd7cc6..9407a8c97 100644
+ int i = this.position.getX();
+ int j = this.position.getY();
+ int k = this.position.getZ();
+ double d0;
+ // Paper end
if (this.f > 0 && this.a == 0.0F) {
double d1 = (double) i + 0.5D;
d0 = (double) k + 0.5D;
this.world.a((EntityHuman) null, d1, (double) j + 0.5D, d0, SoundEffects.BLOCK_ENDER_CHEST_OPEN, SoundCategory.BLOCKS, 0.5F, this.world.random.nextFloat() * 0.1F + 0.9F);
double d0 = (double)i + 0.5D;
double d1 = (double)k + 0.5D;
this.world.a((EntityHuman)null, d0, (double)j + 0.5D, d1, SoundEffects.BLOCK_ENDER_CHEST_OPEN, SoundCategory.BLOCKS, 0.5F, this.world.random.nextFloat() * 0.1F + 0.9F);
}
-
+ // Paper start
@@ -140,8 +149,8 @@ index 61edd7cc6..9407a8c97 100644
+ double d0;
+ // Paper end
if (this.f == 0 && this.a > 0.0F || this.f > 0 && this.a < 1.0F) {
float f1 = this.a;
float f2 = this.a;
if (this.f > 0) {
@@ -0,0 +0,0 @@ public class TileEntityEnderChest extends TileEntity implements ITickable {
public void c() {
++this.f;