geforkt von Mirrors/Paper
Fix remapping issue with RangedAttackMob and RangedEntity (#7167)
Dieser Commit ist enthalten in:
Ursprung
b391c1cb92
Commit
f9788fc8a1
@ -14,37 +14,24 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
@@ -0,0 +0,0 @@
|
@@ -0,0 +0,0 @@
|
||||||
+package com.destroystokyo.paper.entity;
|
+package com.destroystokyo.paper.entity;
|
||||||
+
|
+
|
||||||
|
+import net.minecraft.world.entity.Mob;
|
||||||
+import net.minecraft.world.entity.monster.RangedAttackMob;
|
+import net.minecraft.world.entity.monster.RangedAttackMob;
|
||||||
+import org.bukkit.craftbukkit.entity.CraftLivingEntity;
|
+import org.bukkit.craftbukkit.entity.CraftLivingEntity;
|
||||||
+import org.bukkit.entity.LivingEntity;
|
+import org.bukkit.entity.LivingEntity;
|
||||||
+
|
+
|
||||||
+public interface CraftRangedEntity<T extends RangedAttackMob> extends RangedEntity {
|
+public interface CraftRangedEntity<T extends Mob & RangedAttackMob> extends RangedEntity {
|
||||||
+ T getHandle();
|
+ T getHandle();
|
||||||
+
|
+
|
||||||
+ @Override
|
+ @Override
|
||||||
+ default void rangedAttack(LivingEntity target, float charge) {
|
+ default void rangedAttack(LivingEntity target, float charge) {
|
||||||
+ getHandle().rangedAttack(((CraftLivingEntity) target).getHandle(), charge);
|
+ getHandle().performRangedAttack(((CraftLivingEntity) target).getHandle(), charge);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ @Override
|
+ @Override
|
||||||
+ default void setChargingAttack(boolean raiseHands) {
|
+ 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
|
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
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractSkeleton.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractSkeleton.java
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren