aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0122-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/server/0122-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch')
-rw-r--r--patches/server/0122-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch42
1 files changed, 21 insertions, 21 deletions
diff --git a/patches/server/0122-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch b/patches/server/0122-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch
index 60cce7817d..0294d6985b 100644
--- a/patches/server/0122-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch
+++ b/patches/server/0122-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch
@@ -21,10 +21,10 @@ index 4f3c82f1b5ae24d5f70318fa96fae2a58ce7fd9f..45236a077d798d6a257a2e982b589011
return true;
diff --git a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
-index 59bad6c92cc421dd05c7315e2ab694a669433ab4..ae70ad9d6c02fcb5631a3c45db283b29844bbb0d 100644
+index 7ce46bd254e0f14b1bbafe37e0eb97a468a07083..00b46fd0b4a718756f8b21f203fd5679bc2a79d8 100644
--- a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
+++ b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
-@@ -39,9 +39,63 @@ public class ExperienceOrb extends Entity {
+@@ -40,9 +40,63 @@ public class ExperienceOrb extends Entity {
public int value;
private int count;
private Player followingPlayer;
@@ -88,7 +88,7 @@ index 59bad6c92cc421dd05c7315e2ab694a669433ab4..ae70ad9d6c02fcb5631a3c45db283b29
this.setPos(x, y, z);
this.setYRot((float) (this.random.nextDouble() * 360.0D));
this.setDeltaMovement((this.random.nextDouble() * 0.20000000298023224D - 0.10000000149011612D) * 2.0D, this.random.nextDouble() * 0.2D * 2.0D, (this.random.nextDouble() * 0.20000000298023224D - 0.10000000149011612D) * 2.0D);
-@@ -160,12 +214,20 @@ public class ExperienceOrb extends Entity {
+@@ -161,12 +215,20 @@ public class ExperienceOrb extends Entity {
}
public static void award(ServerLevel world, Vec3 pos, int amount) {
@@ -110,7 +110,7 @@ index 59bad6c92cc421dd05c7315e2ab694a669433ab4..ae70ad9d6c02fcb5631a3c45db283b29
}
}
-@@ -235,6 +297,7 @@ public class ExperienceOrb extends Entity {
+@@ -236,6 +298,7 @@ public class ExperienceOrb extends Entity {
nbt.putShort("Age", (short) this.age);
nbt.putShort("Value", (short) this.value);
nbt.putInt("Count", this.count);
@@ -118,7 +118,7 @@ index 59bad6c92cc421dd05c7315e2ab694a669433ab4..ae70ad9d6c02fcb5631a3c45db283b29
}
@Override
-@@ -243,6 +306,7 @@ public class ExperienceOrb extends Entity {
+@@ -244,6 +307,7 @@ public class ExperienceOrb extends Entity {
this.age = nbt.getShort("Age");
this.value = nbt.getShort("Value");
this.count = Math.max(nbt.getInt("Count"), 1);
@@ -127,10 +127,10 @@ index 59bad6c92cc421dd05c7315e2ab694a669433ab4..ae70ad9d6c02fcb5631a3c45db283b29
@Override
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index 9b55a2b2863c546e88f1bfa9014eb84fd317f3c8..6ac549316d056a0de02e062fd4a28d7ac02a9d98 100644
+index 5ba65d647903077b39d9475ef28bfa0c400edd7a..2c3439d12e40003032904ebdb480fa95dd2a9682 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -1787,7 +1787,8 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -1795,7 +1795,8 @@ public abstract class LivingEntity extends Entity implements Attackable {
protected void dropExperience() {
// CraftBukkit start - Update getExpReward() above if the removed if() changes!
if (true && !(this instanceof net.minecraft.world.entity.boss.enderdragon.EnderDragon)) { // CraftBukkit - SPIGOT-2420: Special case ender dragon will drop the xp over time
@@ -173,10 +173,10 @@ index f307f9077917f426a90523708c572b95cc7b6778..907ed82fea71254d6624eda878e2668c
// CraftBukkit end
}
diff --git a/src/main/java/net/minecraft/world/entity/animal/Fox.java b/src/main/java/net/minecraft/world/entity/animal/Fox.java
-index 335249181f34bfe8b0e359c591e4eae0af63b0fe..8670d8b2a08e96df787a91f36c48df8b345080dc 100644
+index d2d89a47ceae2431969502cb81ae93391a2ee16c..6376908df89af1eff3a948ca1faef5d4925f0c3b 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Fox.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Fox.java
-@@ -909,7 +909,7 @@ public class Fox extends Animal implements VariantHolder<Fox.Type> {
+@@ -913,7 +913,7 @@ public class Fox extends Animal implements VariantHolder<Fox.Type> {
if (this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) {
// CraftBukkit start - use event experience
if (experience > 0) {
@@ -199,10 +199,10 @@ index 5385f0a1d0c5522a94e2a5ded779d68826537883..11322066522a3268063bad7267ef4dd4
}
diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
-index 2471800014d1661c2f422e5a24f0f3b00fa838f2..f5ce6423b8146cc741023e15004fe9814a035da8 100644
+index 0df9780c1689532d0d9f236077400b298d8e9f68..9ab60fb1b7f9c8a342d9116e99f7f0a1e463a626 100644
--- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
+++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
-@@ -673,7 +673,7 @@ public class EnderDragon extends Mob implements Enemy {
+@@ -674,7 +674,7 @@ public class EnderDragon extends Mob implements Enemy {
if (this.level() instanceof ServerLevel) {
if (this.dragonDeathTime > 150 && this.dragonDeathTime % 5 == 0 && true) { // CraftBukkit - SPIGOT-2420: Already checked for the game rule when calculating the xp
@@ -211,7 +211,7 @@ index 2471800014d1661c2f422e5a24f0f3b00fa838f2..f5ce6423b8146cc741023e15004fe981
}
if (this.dragonDeathTime == 1 && !this.isSilent()) {
-@@ -702,7 +702,7 @@ public class EnderDragon extends Mob implements Enemy {
+@@ -703,7 +703,7 @@ public class EnderDragon extends Mob implements Enemy {
this.move(MoverType.SELF, new Vec3(0.0D, 0.10000000149011612D, 0.0D));
if (this.dragonDeathTime == 200 && this.level() instanceof ServerLevel) {
if (true) { // CraftBukkit - SPIGOT-2420: Already checked for the game rule when calculating the xp
@@ -221,10 +221,10 @@ index 2471800014d1661c2f422e5a24f0f3b00fa838f2..f5ce6423b8146cc741023e15004fe981
if (this.dragonFight != null) {
diff --git a/src/main/java/net/minecraft/world/entity/npc/Villager.java b/src/main/java/net/minecraft/world/entity/npc/Villager.java
-index 4034b8e7503f611dc9be121d8da2020ae7155b8c..f0d5e45d0d6ac51106379d20690d34a032a24c39 100644
+index e7db715d45d27cbc9b3ed7cad1d907273b225c7f..0b34003058205f26a89d18dad06b2067dbe897d7 100644
--- a/src/main/java/net/minecraft/world/entity/npc/Villager.java
+++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java
-@@ -638,7 +638,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
+@@ -639,7 +639,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
}
if (offer.shouldRewardExp()) {
@@ -234,10 +234,10 @@ index 4034b8e7503f611dc9be121d8da2020ae7155b8c..f0d5e45d0d6ac51106379d20690d34a0
}
diff --git a/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java b/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java
-index d4d1cad7963a5adcc8c32e1bc02104eb70514331..0321b4bb622930bfe57661b0e6b893d7635668fb 100644
+index 09448ca61b7d1faf3b2f83d7c9f8a14afee39b7b..6b8d6ae203b7f7f2b591c35586baa4e8951a3677 100644
--- a/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java
+++ b/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java
-@@ -207,7 +207,7 @@ public class WanderingTrader extends net.minecraft.world.entity.npc.AbstractVill
+@@ -208,7 +208,7 @@ public class WanderingTrader extends net.minecraft.world.entity.npc.AbstractVill
if (offer.shouldRewardExp()) {
int i = 3 + this.random.nextInt(4);
@@ -247,10 +247,10 @@ index d4d1cad7963a5adcc8c32e1bc02104eb70514331..0321b4bb622930bfe57661b0e6b893d7
}
diff --git a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
-index 8b27b5118cbeeb0b25fb6a23056e51899be32035..94bdd467108bc5fd0211f67a792787ef7c356619 100644
+index 9bf5b67922f3368e1ee4d76f6297ebe425f3ceab..d7548eb7cd6986dcea6fbf4efb76b647cc350642 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
-@@ -522,7 +522,7 @@ public class FishingHook extends Projectile {
+@@ -523,7 +523,7 @@ public class FishingHook extends Projectile {
this.level().addFreshEntity(entityitem);
// CraftBukkit start - this.random.nextInt(6) + 1 -> playerFishEvent.getExpToDrop()
if (playerFishEvent.getExpToDrop() > 0) {
@@ -260,16 +260,16 @@ index 8b27b5118cbeeb0b25fb6a23056e51899be32035..94bdd467108bc5fd0211f67a792787ef
// CraftBukkit end
if (itemstack1.is(ItemTags.FISHES)) {
diff --git a/src/main/java/net/minecraft/world/entity/projectile/ThrownExperienceBottle.java b/src/main/java/net/minecraft/world/entity/projectile/ThrownExperienceBottle.java
-index 5d0e2c53d41e897532a8ec3c0a7b33e9b60e9ab5..e53046c6d47b4fd3d82132bc980a31b9491df6a7 100644
+index fdab4a51ec7068047e899771aad1b9949a0113cb..7e46b1958f1139b3a97a5f11e06c6f85172d6192 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/ThrownExperienceBottle.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/ThrownExperienceBottle.java
-@@ -51,7 +51,7 @@ public class ThrownExperienceBottle extends ThrowableItemProjectile {
+@@ -54,7 +54,7 @@ public class ThrownExperienceBottle extends ThrowableItemProjectile {
}
// CraftBukkit end
- ExperienceOrb.award((ServerLevel) this.level(), this.position(), i);
+ ExperienceOrb.award((ServerLevel) this.level(), this.position(), i, org.bukkit.entity.ExperienceOrb.SpawnReason.EXP_BOTTLE, this.getOwner(), this); // Paper
- this.discard();
+ this.discard(EntityRemoveEvent.Cause.HIT); // CraftBukkit - add Bukkit remove cause
}
diff --git a/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java b/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java