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:
@@ -108,6 +108,7 @@ public class BalloonEntity {
|
|||||||
|
|
||||||
public void setLocation(Location location) {
|
public void setLocation(Location location) {
|
||||||
//this.megEntity.teleportTo(location.getX(), location.getY(), location.getZ());
|
//this.megEntity.teleportTo(location.getX(), location.getY(), location.getZ());
|
||||||
|
location = location.add(Settings.getBalloonOffset());
|
||||||
this.modelEntity.teleport(location);
|
this.modelEntity.teleport(location);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,15 +4,16 @@ import com.hibiscusmc.hmccosmetics.HMCCosmeticsPlugin;
|
|||||||
import com.hibiscusmc.hmccosmetics.util.MessagesUtil;
|
import com.hibiscusmc.hmccosmetics.util.MessagesUtil;
|
||||||
import net.minecraft.world.entity.EntityType;
|
import net.minecraft.world.entity.EntityType;
|
||||||
import net.minecraft.world.entity.ambient.Bat;
|
import net.minecraft.world.entity.ambient.Bat;
|
||||||
|
import net.minecraft.world.entity.animal.Cod;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.NamespacedKey;
|
import org.bukkit.NamespacedKey;
|
||||||
import org.bukkit.craftbukkit.v1_19_R1.CraftWorld;
|
import org.bukkit.craftbukkit.v1_19_R1.CraftWorld;
|
||||||
import org.bukkit.persistence.PersistentDataType;
|
import org.bukkit.persistence.PersistentDataType;
|
||||||
|
|
||||||
public class MEGEntity extends Bat {
|
public class MEGEntity extends Cod {
|
||||||
|
|
||||||
public MEGEntity(Location loc) {
|
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());
|
this.setPos(loc.getX(), loc.getY(), loc.getZ());
|
||||||
MessagesUtil.sendDebugMessages("Spawned MEGEntity at " + loc);
|
MessagesUtil.sendDebugMessages("Spawned MEGEntity at " + loc);
|
||||||
getBukkitLivingEntity().setInvisible(true);
|
getBukkitLivingEntity().setInvisible(true);
|
||||||
@@ -27,5 +28,4 @@ public class MEGEntity extends Bat {
|
|||||||
|
|
||||||
((CraftWorld) loc.getWorld()).getHandle().addFreshEntity(this);
|
((CraftWorld) loc.getWorld()).getHandle().addFreshEntity(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user