aboutsummaryrefslogtreecommitdiffhomepage
path: root/patch-remap/mache-spigotflower/net/minecraft/world/entity/projectile/ThrownExperienceBottle.java.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patch-remap/mache-spigotflower/net/minecraft/world/entity/projectile/ThrownExperienceBottle.java.patch')
-rw-r--r--patch-remap/mache-spigotflower/net/minecraft/world/entity/projectile/ThrownExperienceBottle.java.patch59
1 files changed, 59 insertions, 0 deletions
diff --git a/patch-remap/mache-spigotflower/net/minecraft/world/entity/projectile/ThrownExperienceBottle.java.patch b/patch-remap/mache-spigotflower/net/minecraft/world/entity/projectile/ThrownExperienceBottle.java.patch
new file mode 100644
index 0000000000..1768b5d3fa
--- /dev/null
+++ b/patch-remap/mache-spigotflower/net/minecraft/world/entity/projectile/ThrownExperienceBottle.java.patch
@@ -0,0 +1,59 @@
+--- a/net/minecraft/world/entity/projectile/ThrownExperienceBottle.java
++++ b/net/minecraft/world/entity/projectile/ThrownExperienceBottle.java
+@@ -13,38 +13,44 @@
+
+ public class ThrownExperienceBottle extends ThrowableItemProjectile {
+
+- public ThrownExperienceBottle(EntityType<? extends ThrownExperienceBottle> entitytype, Level level) {
+- super(entitytype, level);
++ public ThrownExperienceBottle(EntityType<? extends ThrownExperienceBottle> entityType, Level level) {
++ super(entityType, level);
+ }
+
+- public ThrownExperienceBottle(Level level, LivingEntity livingentity) {
+- super(EntityType.EXPERIENCE_BOTTLE, livingentity, level);
++ public ThrownExperienceBottle(Level level, LivingEntity shooter) {
++ super(EntityType.EXPERIENCE_BOTTLE, shooter, level);
+ }
+
+- public ThrownExperienceBottle(Level level, double d0, double d1, double d2) {
+- super(EntityType.EXPERIENCE_BOTTLE, d0, d1, d2, level);
++ public ThrownExperienceBottle(Level level, double x, double d1, double y) {
++ super(EntityType.EXPERIENCE_BOTTLE, x, d1, y, level);
+ }
+
+ @Override
+- @Override
+ protected Item getDefaultItem() {
+ return Items.EXPERIENCE_BOTTLE;
+ }
+
+ @Override
+- @Override
+ protected float getGravity() {
+ return 0.07F;
+ }
+
+ @Override
+- @Override
+- protected void onHit(HitResult hitresult) {
+- super.onHit(hitresult);
++ protected void onHit(HitResult result) {
++ super.onHit(result);
+ if (this.level() instanceof ServerLevel) {
+- this.level().levelEvent(2002, this.blockPosition(), PotionUtils.getColor(Potions.WATER));
++ // CraftBukkit - moved to after event
++ // this.level().levelEvent(2002, this.blockPosition(), PotionUtil.getColor(Potions.WATER));
+ int i = 3 + this.level().random.nextInt(5) + this.level().random.nextInt(5);
+
++ // CraftBukkit start
++ org.bukkit.event.entity.ExpBottleEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callExpBottleEvent(this, result, i);
++ i = event.getExperience();
++ if (event.getShowEffect()) {
++ this.level().levelEvent(2002, this.blockPosition(), PotionUtils.getColor(Potions.WATER));
++ }
++ // CraftBukkit end
++
+ ExperienceOrb.award((ServerLevel) this.level(), this.position(), i);
+ this.discard();
+ }