mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Fix dolphin spit and phantom flames
This commit is contained in:
@@ -6093,10 +6093,10 @@ index 0000000000..1b08a0905b
|
||||
+}
|
||||
diff --git a/src/main/java/net/pl3x/purpur/entity/DolphinSpit.java b/src/main/java/net/pl3x/purpur/entity/DolphinSpit.java
|
||||
new file mode 100644
|
||||
index 0000000000..3b777c54f9
|
||||
index 0000000000..a01524c6ab
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/net/pl3x/purpur/entity/DolphinSpit.java
|
||||
@@ -0,0 +1,115 @@
|
||||
@@ -0,0 +1,120 @@
|
||||
+package net.pl3x.purpur.entity;
|
||||
+
|
||||
+import net.minecraft.server.BlockBase;
|
||||
@@ -6107,6 +6107,7 @@ index 0000000000..3b777c54f9
|
||||
+import net.minecraft.server.EntityLlamaSpit;
|
||||
+import net.minecraft.server.EntityTypes;
|
||||
+import net.minecraft.server.IBlockData;
|
||||
+import net.minecraft.server.MathHelper;
|
||||
+import net.minecraft.server.MovingObjectPosition;
|
||||
+import net.minecraft.server.MovingObjectPositionBlock;
|
||||
+import net.minecraft.server.MovingObjectPositionEntity;
|
||||
@@ -6127,8 +6128,12 @@ index 0000000000..3b777c54f9
|
||||
+
|
||||
+ public DolphinSpit(World world, EntityDolphin dolphin) {
|
||||
+ this(EntityTypes.LLAMA_SPIT, world);
|
||||
+ setShooter(dolphin);
|
||||
+ setShooter(dolphin.hasRider() ? dolphin.getRider() : dolphin);
|
||||
+ this.dolphin = dolphin;
|
||||
+ this.setPosition(
|
||||
+ dolphin.locX() - (double) (dolphin.getWidth() + 1.0F) * 0.5D * (double) MathHelper.sin(dolphin.getRenderYawOffset() * 0.017453292F),
|
||||
+ dolphin.getHeadY() - 0.10000000149011612D,
|
||||
+ dolphin.locZ() + (double) (dolphin.getWidth() + 1.0F) * 0.5D * (double) MathHelper.cos(dolphin.getRenderYawOffset() * 0.017453292F));
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
@@ -6214,10 +6219,10 @@ index 0000000000..3b777c54f9
|
||||
+}
|
||||
diff --git a/src/main/java/net/pl3x/purpur/entity/PhantomFlames.java b/src/main/java/net/pl3x/purpur/entity/PhantomFlames.java
|
||||
new file mode 100644
|
||||
index 0000000000..f5da00b100
|
||||
index 0000000000..929e4ff91c
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/net/pl3x/purpur/entity/PhantomFlames.java
|
||||
@@ -0,0 +1,120 @@
|
||||
@@ -0,0 +1,125 @@
|
||||
+package net.pl3x.purpur.entity;
|
||||
+
|
||||
+import net.minecraft.server.BlockBase;
|
||||
@@ -6228,6 +6233,7 @@ index 0000000000..f5da00b100
|
||||
+import net.minecraft.server.EntityPhantom;
|
||||
+import net.minecraft.server.EntityTypes;
|
||||
+import net.minecraft.server.IBlockData;
|
||||
+import net.minecraft.server.MathHelper;
|
||||
+import net.minecraft.server.MovingObjectPosition;
|
||||
+import net.minecraft.server.MovingObjectPositionBlock;
|
||||
+import net.minecraft.server.MovingObjectPositionEntity;
|
||||
@@ -6248,8 +6254,12 @@ index 0000000000..f5da00b100
|
||||
+
|
||||
+ public PhantomFlames(World world, EntityPhantom phantom) {
|
||||
+ this(EntityTypes.LLAMA_SPIT, world);
|
||||
+ setShooter(phantom);
|
||||
+ setShooter(phantom.hasRider() ? phantom.getRider() : phantom);
|
||||
+ this.phantom = phantom;
|
||||
+ this.setPosition(
|
||||
+ phantom.locX() - (double) (phantom.getWidth() + 1.0F) * 0.5D * (double) MathHelper.sin(phantom.getRenderYawOffset() * 0.017453292F),
|
||||
+ phantom.getHeadY() - 0.10000000149011612D,
|
||||
+ phantom.locZ() + (double) (phantom.getWidth() + 1.0F) * 0.5D * (double) MathHelper.cos(phantom.getRenderYawOffset() * 0.017453292F));
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
|
||||
Reference in New Issue
Block a user