Fix speed for launched trident using api (#10936)
This commit is contained in:
parent
97afc9a00c
commit
5ae4758c8b
8 changed files with 18 additions and 9 deletions
|
@ -515,9 +515,18 @@ index 6e2f91423371ead9890095cf4b1e2299c4dcba28..9d8f4b7176e60180565e3134a14ecf19
|
|||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
index 464d67075e052f13e86b51f3e71d05a6536ef540..cc33f39dc31692e9309e62c09463e1cc621e2534 100644
|
||||
index 464d67075e052f13e86b51f3e71d05a6536ef540..34276233751a41b41ee6af99afa97ef7d4bca836 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
@@ -596,7 +596,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||
} else {
|
||||
launch = new net.minecraft.world.entity.projectile.Arrow(world, this.getHandle(), new net.minecraft.world.item.ItemStack(net.minecraft.world.item.Items.ARROW), null);
|
||||
}
|
||||
- ((net.minecraft.world.entity.projectile.AbstractArrow) launch).shootFromRotation(this.getHandle(), this.getHandle().getXRot(), this.getHandle().getYRot(), 0.0F, 3.0F, 1.0F); // ItemBow
|
||||
+ ((net.minecraft.world.entity.projectile.AbstractArrow) launch).shootFromRotation(this.getHandle(), this.getHandle().getXRot(), this.getHandle().getYRot(), 0.0F, Trident.class.isAssignableFrom(projectile) ? net.minecraft.world.item.TridentItem.SHOOT_POWER : 3.0F, 1.0F); // ItemBow // Paper - see TridentItem
|
||||
} else if (ThrownPotion.class.isAssignableFrom(projectile)) {
|
||||
if (LingeringPotion.class.isAssignableFrom(projectile)) {
|
||||
launch = new net.minecraft.world.entity.projectile.ThrownPotion(world, this.getHandle());
|
||||
@@ -650,7 +650,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||
} else if (Firework.class.isAssignableFrom(projectile)) {
|
||||
Location location = this.getEyeLocation();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue