From d2bbdffbe5526c54cad14cfbd60171ae8f0dd878 Mon Sep 17 00:00:00 2001 From: LoJoSho Date: Thu, 29 Dec 2022 14:06:02 -0600 Subject: [PATCH] Improvements to balloons --- .../com/hibiscusmc/hmccosmetics/entities/BalloonEntity.java | 1 + .../com/hibiscusmc/hmccosmetics/nms/v1_19_R1/MEGEntity.java | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/common/src/main/java/com/hibiscusmc/hmccosmetics/entities/BalloonEntity.java b/common/src/main/java/com/hibiscusmc/hmccosmetics/entities/BalloonEntity.java index cac29361..22b84c44 100644 --- a/common/src/main/java/com/hibiscusmc/hmccosmetics/entities/BalloonEntity.java +++ b/common/src/main/java/com/hibiscusmc/hmccosmetics/entities/BalloonEntity.java @@ -108,6 +108,7 @@ public class BalloonEntity { public void setLocation(Location location) { //this.megEntity.teleportTo(location.getX(), location.getY(), location.getZ()); + location = location.add(Settings.getBalloonOffset()); this.modelEntity.teleport(location); } diff --git a/v1_19_R1/src/main/java/com/hibiscusmc/hmccosmetics/nms/v1_19_R1/MEGEntity.java b/v1_19_R1/src/main/java/com/hibiscusmc/hmccosmetics/nms/v1_19_R1/MEGEntity.java index 3c3256ec..3802b60d 100644 --- a/v1_19_R1/src/main/java/com/hibiscusmc/hmccosmetics/nms/v1_19_R1/MEGEntity.java +++ b/v1_19_R1/src/main/java/com/hibiscusmc/hmccosmetics/nms/v1_19_R1/MEGEntity.java @@ -4,15 +4,16 @@ import com.hibiscusmc.hmccosmetics.HMCCosmeticsPlugin; import com.hibiscusmc.hmccosmetics.util.MessagesUtil; import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.ambient.Bat; +import net.minecraft.world.entity.animal.Cod; import org.bukkit.Location; import org.bukkit.NamespacedKey; import org.bukkit.craftbukkit.v1_19_R1.CraftWorld; import org.bukkit.persistence.PersistentDataType; -public class MEGEntity extends Bat { +public class MEGEntity extends Cod { public MEGEntity(Location loc) { - super(EntityType.BAT, ((CraftWorld) loc.getWorld()).getHandle()); + super(EntityType.COD, ((CraftWorld) loc.getWorld()).getHandle()); this.setPos(loc.getX(), loc.getY(), loc.getZ()); MessagesUtil.sendDebugMessages("Spawned MEGEntity at " + loc); getBukkitLivingEntity().setInvisible(true); @@ -27,5 +28,4 @@ public class MEGEntity extends Bat { ((CraftWorld) loc.getWorld()).getHandle().addFreshEntity(this); } - }