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,18 +5,18 @@ Subject: [PATCH] PlayerLaunchProjectileEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/ItemEgg.java b/src/main/java/net/minecraft/server/ItemEgg.java
|
||||
index 9ae1f5b318..0a9680bf5d 100644
|
||||
index adc38763b9..776c86f1fe 100644
|
||||
--- a/src/main/java/net/minecraft/server/ItemEgg.java
|
||||
+++ b/src/main/java/net/minecraft/server/ItemEgg.java
|
||||
@@ -0,0 +0,0 @@ public class ItemEgg extends Item {
|
||||
|
||||
public InteractionResultWrapper<ItemStack> a(World world, EntityHuman entityhuman, EnumHand enumhand) {
|
||||
ItemStack itemstack = entityhuman.b(enumhand);
|
||||
|
||||
- if (!entityhuman.abilities.canInstantlyBuild) {
|
||||
- itemstack.subtract(1);
|
||||
- }
|
||||
-
|
||||
- world.a((EntityHuman) null, entityhuman.locX, entityhuman.locY, entityhuman.locZ, SoundEffects.ENTITY_EGG_THROW, SoundCategory.PLAYERS, 0.5F, 0.4F / (ItemEgg.i.nextFloat() * 0.4F + 0.8F));
|
||||
|
||||
- world.a((EntityHuman)null, entityhuman.locX, entityhuman.locY, entityhuman.locZ, SoundEffects.ENTITY_EGG_THROW, SoundCategory.PLAYERS, 0.5F, 0.4F / (i.nextFloat() * 0.4F + 0.8F));
|
||||
+ // Paper start - moved down
|
||||
+ //if (!entityhuman.abilities.canInstantlyBuild) {
|
||||
+ // itemstack.subtract(1);
|
||||
@@ -26,7 +26,6 @@ index 9ae1f5b318..0a9680bf5d 100644
|
||||
+ // Paper end
|
||||
if (!world.isClientSide) {
|
||||
EntityEgg entityegg = new EntityEgg(world, entityhuman);
|
||||
|
||||
entityegg.a(entityhuman, entityhuman.pitch, entityhuman.yaw, 0.0F, 1.5F, 1.0F);
|
||||
- world.addEntity(entityegg);
|
||||
+ // Paper start
|
||||
@@ -98,18 +97,18 @@ index 876384f37b..8b8bc8ec1c 100644
|
||||
entityhuman.b(StatisticList.ITEM_USED.b(this));
|
||||
return new InteractionResultWrapper(EnumInteractionResult.SUCCESS, itemstack);
|
||||
diff --git a/src/main/java/net/minecraft/server/ItemExpBottle.java b/src/main/java/net/minecraft/server/ItemExpBottle.java
|
||||
index 5312c473ea..7b5eca925f 100644
|
||||
index b167c54417..42a0329c29 100644
|
||||
--- a/src/main/java/net/minecraft/server/ItemExpBottle.java
|
||||
+++ b/src/main/java/net/minecraft/server/ItemExpBottle.java
|
||||
@@ -0,0 +0,0 @@ public class ItemExpBottle extends Item {
|
||||
|
||||
public InteractionResultWrapper<ItemStack> a(World world, EntityHuman entityhuman, EnumHand enumhand) {
|
||||
ItemStack itemstack = entityhuman.b(enumhand);
|
||||
|
||||
- if (!entityhuman.abilities.canInstantlyBuild) {
|
||||
- itemstack.subtract(1);
|
||||
- }
|
||||
-
|
||||
- world.a((EntityHuman) null, entityhuman.locX, entityhuman.locY, entityhuman.locZ, SoundEffects.ENTITY_EXPERIENCE_BOTTLE_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (ItemExpBottle.i.nextFloat() * 0.4F + 0.8F));
|
||||
|
||||
- world.a((EntityHuman)null, entityhuman.locX, entityhuman.locY, entityhuman.locZ, SoundEffects.ENTITY_EXPERIENCE_BOTTLE_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (i.nextFloat() * 0.4F + 0.8F));
|
||||
+ // Paper start - moved down
|
||||
+ //if (!entityhuman.abilities.canInstantlyBuild) {
|
||||
+ // itemstack.subtract(1);
|
||||
@@ -119,7 +118,6 @@ index 5312c473ea..7b5eca925f 100644
|
||||
+ // Paper end
|
||||
if (!world.isClientSide) {
|
||||
EntityThrownExpBottle entitythrownexpbottle = new EntityThrownExpBottle(world, entityhuman);
|
||||
|
||||
entitythrownexpbottle.a(entityhuman, entityhuman.pitch, entityhuman.yaw, -20.0F, 0.7F, 1.0F);
|
||||
- world.addEntity(entitythrownexpbottle);
|
||||
+ // Paper start
|
||||
@@ -143,7 +141,7 @@ index 5312c473ea..7b5eca925f 100644
|
||||
|
||||
entityhuman.b(StatisticList.ITEM_USED.b(this));
|
||||
diff --git a/src/main/java/net/minecraft/server/ItemLingeringPotion.java b/src/main/java/net/minecraft/server/ItemLingeringPotion.java
|
||||
index e1c6ad80f0..7acdb63f7b 100644
|
||||
index ab7807d832..46c64c760f 100644
|
||||
--- a/src/main/java/net/minecraft/server/ItemLingeringPotion.java
|
||||
+++ b/src/main/java/net/minecraft/server/ItemLingeringPotion.java
|
||||
@@ -0,0 +0,0 @@ public class ItemLingeringPotion extends ItemPotion {
|
||||
@@ -151,10 +149,10 @@ index e1c6ad80f0..7acdb63f7b 100644
|
||||
public InteractionResultWrapper<ItemStack> a(World world, EntityHuman entityhuman, EnumHand enumhand) {
|
||||
ItemStack itemstack = entityhuman.b(enumhand);
|
||||
- ItemStack itemstack1 = entityhuman.abilities.canInstantlyBuild ? itemstack.cloneItemStack() : itemstack.cloneAndSubtract(1);
|
||||
- world.a((EntityHuman)null, entityhuman.locX, entityhuman.locY, entityhuman.locZ, SoundEffects.ENTITY_LINGERING_POTION_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (i.nextFloat() * 0.4F + 0.8F));
|
||||
+ // Paper start - moved down
|
||||
+ //ItemStack itemstack1 = entityhuman.abilities.canInstantlyBuild ? itemstack.cloneItemStack() : itemstack.cloneAndSubtract(1);
|
||||
|
||||
- world.a((EntityHuman) null, entityhuman.locX, entityhuman.locY, entityhuman.locZ, SoundEffects.ENTITY_LINGERING_POTION_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (ItemLingeringPotion.i.nextFloat() * 0.4F + 0.8F));
|
||||
+
|
||||
+ //world.a((EntityHuman) null, entityhuman.locX, entityhuman.locY, entityhuman.locZ, SoundEffects.ENTITY_LINGERING_POTION_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (ItemLingeringPotion.i.nextFloat() * 0.4F + 0.8F));
|
||||
+ // Paper end
|
||||
if (!world.isClientSide) {
|
||||
@@ -165,7 +163,6 @@ index e1c6ad80f0..7acdb63f7b 100644
|
||||
+ }
|
||||
+ // Paper end
|
||||
EntityPotion entitypotion = new EntityPotion(world, entityhuman, itemstack1);
|
||||
|
||||
entitypotion.a(entityhuman, entityhuman.pitch, entityhuman.yaw, -20.0F, 0.5F, 1.0F);
|
||||
- world.addEntity(entitypotion);
|
||||
+ // Paper start
|
||||
@@ -222,7 +219,7 @@ index 332145c32b..5c23c9ae0c 100644
|
||||
// CraftBukkit end
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/ItemSplashPotion.java b/src/main/java/net/minecraft/server/ItemSplashPotion.java
|
||||
index 593009579b..d935ae834f 100644
|
||||
index 426b42a12c..a4e2f70c7c 100644
|
||||
--- a/src/main/java/net/minecraft/server/ItemSplashPotion.java
|
||||
+++ b/src/main/java/net/minecraft/server/ItemSplashPotion.java
|
||||
@@ -0,0 +0,0 @@ public class ItemSplashPotion extends ItemPotion {
|
||||
@@ -230,11 +227,10 @@ index 593009579b..d935ae834f 100644
|
||||
public InteractionResultWrapper<ItemStack> a(World world, EntityHuman entityhuman, EnumHand enumhand) {
|
||||
ItemStack itemstack = entityhuman.b(enumhand);
|
||||
- ItemStack itemstack1 = entityhuman.abilities.canInstantlyBuild ? itemstack.cloneItemStack() : itemstack.cloneAndSubtract(1);
|
||||
- world.a((EntityHuman)null, entityhuman.locX, entityhuman.locY, entityhuman.locZ, SoundEffects.ENTITY_SPLASH_POTION_THROW, SoundCategory.PLAYERS, 0.5F, 0.4F / (i.nextFloat() * 0.4F + 0.8F));
|
||||
+ // Paper start - moved sound down, clone handled diff
|
||||
+ //ItemStack itemstack1 = entityhuman.abilities.canInstantlyBuild ? itemstack.cloneItemStack() : itemstack.cloneAndSubtract(1);
|
||||
|
||||
- world.a((EntityHuman) null, entityhuman.locX, entityhuman.locY, entityhuman.locZ, SoundEffects.ENTITY_SPLASH_POTION_THROW, SoundCategory.PLAYERS, 0.5F, 0.4F / (ItemSplashPotion.i.nextFloat() * 0.4F + 0.8F));
|
||||
+ //world.a((EntityHuman) null, entityhuman.locX, entityhuman.locY, entityhuman.locZ, SoundEffects.ENTITY_SPLASH_POTION_THROW, SoundCategory.PLAYERS, 0.5F, 0.4F / (ItemSplashPotion.i.nextFloat() * 0.4F + 0.8F));
|
||||
+ //world.a((EntityHuman)null, entityhuman.locX, entityhuman.locY, entityhuman.locZ, SoundEffects.ENTITY_SPLASH_POTION_THROW, SoundCategory.PLAYERS, 0.5F, 0.4F / (i.nextFloat() * 0.4F + 0.8F));
|
||||
+ // Paper end
|
||||
if (!world.isClientSide) {
|
||||
+ // Paper start - ensure stack count matches vanilla behavior without modifying original stack yet
|
||||
@@ -244,7 +240,6 @@ index 593009579b..d935ae834f 100644
|
||||
+ }
|
||||
+ // Paper end
|
||||
EntityPotion entitypotion = new EntityPotion(world, entityhuman, itemstack1);
|
||||
|
||||
entitypotion.a(entityhuman, entityhuman.pitch, entityhuman.yaw, -20.0F, 0.5F, 1.0F);
|
||||
- world.addEntity(entitypotion);
|
||||
+ // Paper start
|
||||
|
||||
Reference in New Issue
Block a user