diff --git a/patches/server/RangedEntity-API.patch b/patches/server/RangedEntity-API.patch index c8a407fee2..d4a7f90463 100644 --- a/patches/server/RangedEntity-API.patch +++ b/patches/server/RangedEntity-API.patch @@ -14,37 +14,24 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @@ -0,0 +0,0 @@ +package com.destroystokyo.paper.entity; + ++import net.minecraft.world.entity.Mob; +import net.minecraft.world.entity.monster.RangedAttackMob; +import org.bukkit.craftbukkit.entity.CraftLivingEntity; +import org.bukkit.entity.LivingEntity; + -+public interface CraftRangedEntity extends RangedEntity { ++public interface CraftRangedEntity extends RangedEntity { + T getHandle(); + + @Override + default void rangedAttack(LivingEntity target, float charge) { -+ getHandle().rangedAttack(((CraftLivingEntity) target).getHandle(), charge); ++ getHandle().performRangedAttack(((CraftLivingEntity) target).getHandle(), charge); + } + + @Override + default void setChargingAttack(boolean raiseHands) { -+ getHandle().setChargingAttack(raiseHands); ++ getHandle().setAggressive(raiseHands); + } +} -diff --git a/src/main/java/net/minecraft/world/entity/monster/RangedAttackMob.java b/src/main/java/net/minecraft/world/entity/monster/RangedAttackMob.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/world/entity/monster/RangedAttackMob.java -+++ b/src/main/java/net/minecraft/world/entity/monster/RangedAttackMob.java -@@ -0,0 +0,0 @@ package net.minecraft.world.entity.monster; - import net.minecraft.world.entity.LivingEntity; - - public interface RangedAttackMob { -- void performRangedAttack(LivingEntity target, float pullProgress); -+ void performRangedAttack(LivingEntity target, float pullProgress); @Deprecated default void rangedAttack(LivingEntity entityliving, float f) { performRangedAttack(entityliving, f); } // Paper - OBFHELPER -+ -+ // - see EntitySkeletonAbstract melee goal -+ void setAggressive(boolean flag); default void setChargingAttack(boolean charging) { setAggressive(charging); }; // Paper - } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractSkeleton.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractSkeleton.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractSkeleton.java