mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-30 03:28:00 +01:00
Fix speed for launched trident using api (#10936)
This commit is contained in:
parent
189504bc7f
commit
35acc5b73b
1 changed files with 9 additions and 0 deletions
|
@ -518,6 +518,15 @@ diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||||
|
@@ -0,0 +0,0 @@ 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());
|
||||||
@@ -0,0 +0,0 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
@@ -0,0 +0,0 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||||
} else if (Firework.class.isAssignableFrom(projectile)) {
|
} else if (Firework.class.isAssignableFrom(projectile)) {
|
||||||
Location location = this.getEyeLocation();
|
Location location = this.getEyeLocation();
|
||||||
|
|
Loading…
Add table
Reference in a new issue