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:
@@ -5,7 +5,7 @@ Subject: [PATCH] Firework API's
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityFireworks.java b/src/main/java/net/minecraft/server/EntityFireworks.java
|
||||
index 6e2592e96d..f9332d3fda 100644
|
||||
index 6e2592e96d..7ff57d9cda 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityFireworks.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityFireworks.java
|
||||
@@ -0,0 +0,0 @@ package net.minecraft.server;
|
||||
@@ -28,17 +28,18 @@ index 6e2592e96d..f9332d3fda 100644
|
||||
public EntityFireworks(World world) {
|
||||
super(EntityTypes.FIREWORK_ROCKET, world);
|
||||
@@ -0,0 +0,0 @@ public class EntityFireworks extends Entity {
|
||||
if (!itemstack.isEmpty()) {
|
||||
nbttagcompound.set("FireworksItem", itemstack.save(new NBTTagCompound()));
|
||||
}
|
||||
|
||||
+ // Paper start
|
||||
+ if (spawningEntity != null) {
|
||||
+ nbttagcompound.setUUID("SpawningEntity", spawningEntity);
|
||||
+ }
|
||||
+ // Paper end
|
||||
|
||||
+
|
||||
}
|
||||
|
||||
public void a(NBTTagCompound nbttagcompound) {
|
||||
@@ -0,0 +0,0 @@ public class EntityFireworks extends Entity {
|
||||
if (!itemstack.isEmpty()) {
|
||||
this.datawatcher.set(EntityFireworks.FIREWORK_ITEM, itemstack);
|
||||
@@ -53,27 +54,27 @@ index 6e2592e96d..f9332d3fda 100644
|
||||
|
||||
public boolean bk() {
|
||||
diff --git a/src/main/java/net/minecraft/server/ItemFireworks.java b/src/main/java/net/minecraft/server/ItemFireworks.java
|
||||
index 5eae1724ed..d4420e68fb 100644
|
||||
index 936faccbf8..d971bbc76c 100644
|
||||
--- a/src/main/java/net/minecraft/server/ItemFireworks.java
|
||||
+++ b/src/main/java/net/minecraft/server/ItemFireworks.java
|
||||
@@ -0,0 +0,0 @@ public class ItemFireworks extends Item {
|
||||
BlockPosition blockposition = itemactioncontext.getClickPosition();
|
||||
ItemStack itemstack = itemactioncontext.getItemStack();
|
||||
EntityFireworks entityfireworks = new EntityFireworks(world, (double) ((float) blockposition.getX() + itemactioncontext.m()), (double) ((float) blockposition.getY() + itemactioncontext.n()), (double) ((float) blockposition.getZ() + itemactioncontext.o()), itemstack);
|
||||
|
||||
EntityFireworks entityfireworks = new EntityFireworks(world, (double)((float)blockposition.getX() + itemactioncontext.m()), (double)((float)blockposition.getY() + itemactioncontext.n()), (double)((float)blockposition.getZ() + itemactioncontext.o()), itemstack);
|
||||
+ entityfireworks.spawningEntity = itemactioncontext.b.getUniqueID(); // Paper
|
||||
world.addEntity(entityfireworks);
|
||||
itemstack.subtract(1);
|
||||
}
|
||||
@@ -0,0 +0,0 @@ public class ItemFireworks extends Item {
|
||||
ItemStack itemstack = entityhuman.b(enumhand);
|
||||
if (!world.isClientSide) {
|
||||
EntityFireworks entityfireworks = new EntityFireworks(world, itemstack, entityhuman);
|
||||
|
||||
+ entityfireworks.spawningEntity = entityhuman.getUniqueID(); // Paper
|
||||
world.addEntity(entityfireworks);
|
||||
if (!entityhuman.abilities.canInstantlyBuild) {
|
||||
itemstack.subtract(1);
|
||||
diff --git a/src/main/java/net/minecraft/server/NBTTagCompound.java b/src/main/java/net/minecraft/server/NBTTagCompound.java
|
||||
index e658816c24..0d69deb51c 100644
|
||||
index 2a66a30264..6046e3e7b9 100644
|
||||
--- a/src/main/java/net/minecraft/server/NBTTagCompound.java
|
||||
+++ b/src/main/java/net/minecraft/server/NBTTagCompound.java
|
||||
@@ -0,0 +0,0 @@ public class NBTTagCompound implements NBTBase {
|
||||
|
||||
Reference in New Issue
Block a user