9
0
mirror of https://github.com/HibiscusMC/HMCCosmetics.git synced 2025-12-19 15:09:19 +00:00

Improvements to balloons

This commit is contained in:
LoJoSho
2022-12-29 14:06:02 -06:00
parent ee2d46c1e1
commit d2bbdffbe5
2 changed files with 4 additions and 3 deletions

View File

@@ -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);
}

View File

@@ -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);
}
}