Rename HologramPosition to Position and Position to PositionCoordinates

This commit is contained in:
filoghost 2021-08-25 18:27:45 +02:00
parent da2b221642
commit 66d49727b8
105 changed files with 294 additions and 294 deletions

View File

@ -6,7 +6,6 @@
package me.filoghost.holographicdisplays.api;
import me.filoghost.holographicdisplays.api.hologram.Hologram;
import me.filoghost.holographicdisplays.api.hologram.HologramPosition;
import me.filoghost.holographicdisplays.api.internal.HolographicDisplaysAPIProvider;
import me.filoghost.holographicdisplays.api.placeholder.PlaceholderReplacer;
import org.bukkit.Location;
@ -65,7 +64,7 @@ public interface HolographicDisplaysAPI {
*/
@NotNull Hologram createHologram(@NotNull Location location);
@NotNull Hologram createHologram(@NotNull HologramPosition position);
@NotNull Hologram createHologram(@NotNull Position position);
/**
* Returns all the active holograms. A hologram is no longer active after {@link Hologram#delete()} is invoked.

View File

@ -3,7 +3,7 @@
*
* SPDX-License-Identifier: GPL-3.0-or-later
*/
package me.filoghost.holographicdisplays.api.hologram;
package me.filoghost.holographicdisplays.api;
import me.filoghost.holographicdisplays.api.internal.HolographicDisplaysAPIProvider;
import org.bukkit.Location;
@ -11,18 +11,18 @@ import org.bukkit.World;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
public interface HologramPosition {
public interface Position {
static @NotNull HologramPosition create(@NotNull World world, double x, double y, double z) {
return HolographicDisplaysAPIProvider.getImplementation().createHologramPosition(world, x, y, z);
static @NotNull Position create(@NotNull World world, double x, double y, double z) {
return HolographicDisplaysAPIProvider.getImplementation().createPosition(world, x, y, z);
}
static @NotNull HologramPosition create(@NotNull String worldName, double x, double y, double z) {
return HolographicDisplaysAPIProvider.getImplementation().createHologramPosition(worldName, x, y, z);
static @NotNull Position create(@NotNull String worldName, double x, double y, double z) {
return HolographicDisplaysAPIProvider.getImplementation().createPosition(worldName, x, y, z);
}
static @NotNull HologramPosition fromLocation(@NotNull Location location) {
return HolographicDisplaysAPIProvider.getImplementation().createHologramPosition(location);
static @NotNull Position fromLocation(@NotNull Location location) {
return HolographicDisplaysAPIProvider.getImplementation().createPosition(location);
}
@NotNull String getWorldName();
@ -35,7 +35,7 @@ public interface HologramPosition {
double getZ();
@NotNull HologramPosition add(double x, double y, double z);
@NotNull Position add(double x, double y, double z);
int getBlockX();

View File

@ -6,6 +6,7 @@
package me.filoghost.holographicdisplays.api.hologram;
import me.filoghost.holographicdisplays.api.HolographicDisplaysAPI;
import me.filoghost.holographicdisplays.api.Position;
import org.bukkit.Location;
import org.bukkit.World;
import org.jetbrains.annotations.NotNull;
@ -31,7 +32,7 @@ public interface Hologram {
* @return the current position
* @since 1
*/
@NotNull HologramPosition getPosition();
@NotNull Position getPosition();
/**
* Moves the hologram to the given position.
@ -39,7 +40,7 @@ public interface Hologram {
* @param position the new position
* @since 1
*/
void setPosition(@NotNull HologramPosition position);
void setPosition(@NotNull Position position);
/**
* Moves the hologram to the given position.

View File

@ -6,7 +6,7 @@
package me.filoghost.holographicdisplays.api.internal;
import me.filoghost.holographicdisplays.api.HolographicDisplaysAPI;
import me.filoghost.holographicdisplays.api.hologram.HologramPosition;
import me.filoghost.holographicdisplays.api.Position;
import org.bukkit.Location;
import org.bukkit.World;
import org.bukkit.plugin.Plugin;
@ -33,10 +33,10 @@ public abstract class HolographicDisplaysAPIProvider {
public abstract HolographicDisplaysAPI getHolographicDisplaysAPI(Plugin plugin);
public abstract HologramPosition createHologramPosition(World world, double x, double y, double z);
public abstract Position createPosition(World world, double x, double y, double z);
public abstract HologramPosition createHologramPosition(String worldName, double x, double y, double z);
public abstract Position createPosition(String worldName, double x, double y, double z);
public abstract HologramPosition createHologramPosition(Location location);
public abstract Position createPosition(Location location);
}

View File

@ -5,11 +5,11 @@
*/
package me.filoghost.holographicdisplays.common;
public final class Position {
public final class PositionCoordinates {
private final double x, y, z;
public Position(double x, double y, double z) {
public PositionCoordinates(double x, double y, double z) {
this.x = x;
this.y = y;
this.z = z;
@ -27,12 +27,12 @@ public final class Position {
return z;
}
public Position addY(double y) {
public PositionCoordinates addY(double y) {
if (y == 0) {
return this;
}
return new Position(this.x, this.y + y, this.z);
return new PositionCoordinates(this.x, this.y + y, this.z);
}
@Override
@ -44,7 +44,7 @@ public final class Position {
return false;
}
Position other = (Position) obj;
PositionCoordinates other = (PositionCoordinates) obj;
return Double.doubleToLongBits(this.x) == Double.doubleToLongBits(other.x)
&& Double.doubleToLongBits(this.y) == Double.doubleToLongBits(other.y)
&& Double.doubleToLongBits(this.z) == Double.doubleToLongBits(other.z);

View File

@ -5,7 +5,7 @@
*/
package me.filoghost.holographicdisplays.nms.common.entity;
import me.filoghost.holographicdisplays.common.Position;
import me.filoghost.holographicdisplays.common.PositionCoordinates;
import me.filoghost.holographicdisplays.nms.common.EntityID;
import me.filoghost.holographicdisplays.nms.common.NMSPacketList;
@ -16,6 +16,6 @@ public interface ClickableNMSPacketEntity extends NMSPacketEntity {
EntityID getID();
void addSpawnPackets(NMSPacketList packetList, Position position);
void addSpawnPackets(NMSPacketList packetList, PositionCoordinates position);
}

View File

@ -5,7 +5,7 @@
*/
package me.filoghost.holographicdisplays.nms.common.entity;
import me.filoghost.holographicdisplays.common.Position;
import me.filoghost.holographicdisplays.common.PositionCoordinates;
import me.filoghost.holographicdisplays.nms.common.NMSPacketList;
import org.bukkit.inventory.ItemStack;
@ -14,7 +14,7 @@ public interface ItemNMSPacketEntity extends NMSPacketEntity {
double ITEM_Y_OFFSET = 0;
double ITEM_HEIGHT = 0.7;
void addSpawnPackets(NMSPacketList packetList, Position position, ItemStack itemStack);
void addSpawnPackets(NMSPacketList packetList, PositionCoordinates position, ItemStack itemStack);
void addChangePackets(NMSPacketList packetList, ItemStack itemStack);

View File

@ -5,12 +5,12 @@
*/
package me.filoghost.holographicdisplays.nms.common.entity;
import me.filoghost.holographicdisplays.common.Position;
import me.filoghost.holographicdisplays.common.PositionCoordinates;
import me.filoghost.holographicdisplays.nms.common.NMSPacketList;
public interface NMSPacketEntity {
void addTeleportPackets(NMSPacketList packetList, Position position);
void addTeleportPackets(NMSPacketList packetList, PositionCoordinates position);
void addDestroyPackets(NMSPacketList packetList);

View File

@ -5,7 +5,7 @@
*/
package me.filoghost.holographicdisplays.nms.common.entity;
import me.filoghost.holographicdisplays.common.Position;
import me.filoghost.holographicdisplays.common.PositionCoordinates;
import me.filoghost.holographicdisplays.nms.common.IndividualText;
import me.filoghost.holographicdisplays.nms.common.NMSPacketList;
@ -14,9 +14,9 @@ public interface TextNMSPacketEntity extends NMSPacketEntity {
double ARMOR_STAND_Y_OFFSET = -0.29;
double ARMOR_STAND_TEXT_HEIGHT = 0.23;
void addSpawnPackets(NMSPacketList packetList, Position position, String text);
void addSpawnPackets(NMSPacketList packetList, PositionCoordinates position, String text);
void addSpawnPackets(NMSPacketList packetList, Position position, IndividualText individualText);
void addSpawnPackets(NMSPacketList packetList, PositionCoordinates position, IndividualText individualText);
void addChangePackets(NMSPacketList packetList, String text);

View File

@ -6,7 +6,7 @@
package me.filoghost.holographicdisplays.nms.v1_10_R1;
import me.filoghost.fcommons.reflection.ReflectField;
import me.filoghost.holographicdisplays.common.Position;
import me.filoghost.holographicdisplays.common.PositionCoordinates;
import me.filoghost.holographicdisplays.nms.common.EntityID;
import net.minecraft.server.v1_10_R1.DataWatcher;
import net.minecraft.server.v1_10_R1.Packet;
@ -35,7 +35,7 @@ class EntityLivingSpawnNMSPacket extends VersionNMSPacket {
}
public static DataWatcherPacketBuilder<EntityLivingSpawnNMSPacket> builder(
EntityID entityID, int entityTypeID, Position position, double positionOffsetY) {
EntityID entityID, int entityTypeID, PositionCoordinates position, double positionOffsetY) {
PacketByteBuffer packetByteBuffer = PacketByteBuffer.get();
packetByteBuffer.writeVarInt(entityID.getNumericID());

View File

@ -5,7 +5,7 @@
*/
package me.filoghost.holographicdisplays.nms.v1_10_R1;
import me.filoghost.holographicdisplays.common.Position;
import me.filoghost.holographicdisplays.common.PositionCoordinates;
import me.filoghost.holographicdisplays.nms.common.EntityID;
import net.minecraft.server.v1_10_R1.Packet;
import net.minecraft.server.v1_10_R1.PacketPlayOutSpawnEntity;
@ -14,7 +14,7 @@ class EntitySpawnNMSPacket extends VersionNMSPacket {
private final Packet<?> rawPacket;
EntitySpawnNMSPacket(EntityID entityID, int entityTypeID, Position position, double positionOffsetY) {
EntitySpawnNMSPacket(EntityID entityID, int entityTypeID, PositionCoordinates position, double positionOffsetY) {
PacketByteBuffer packetByteBuffer = PacketByteBuffer.get();
packetByteBuffer.writeVarInt(entityID.getNumericID());

View File

@ -5,7 +5,7 @@
*/
package me.filoghost.holographicdisplays.nms.v1_10_R1;
import me.filoghost.holographicdisplays.common.Position;
import me.filoghost.holographicdisplays.common.PositionCoordinates;
import me.filoghost.holographicdisplays.nms.common.EntityID;
import net.minecraft.server.v1_10_R1.Packet;
import net.minecraft.server.v1_10_R1.PacketPlayOutEntityTeleport;
@ -14,7 +14,7 @@ class EntityTeleportNMSPacket extends VersionNMSPacket {
private final Packet<?> rawPacket;
EntityTeleportNMSPacket(EntityID entityID, Position position, double positionOffsetY) {
EntityTeleportNMSPacket(EntityID entityID, PositionCoordinates position, double positionOffsetY) {
PacketByteBuffer packetByteBuffer = PacketByteBuffer.get();
packetByteBuffer.writeVarInt(entityID.getNumericID());

View File

@ -5,7 +5,7 @@
*/
package me.filoghost.holographicdisplays.nms.v1_10_R1;
import me.filoghost.holographicdisplays.common.Position;
import me.filoghost.holographicdisplays.common.PositionCoordinates;
import me.filoghost.holographicdisplays.nms.common.EntityID;
import me.filoghost.holographicdisplays.nms.common.NMSPacketList;
import me.filoghost.holographicdisplays.nms.common.entity.ClickableNMSPacketEntity;
@ -24,7 +24,7 @@ public class VersionClickableNMSPacketEntity implements ClickableNMSPacketEntity
}
@Override
public void addSpawnPackets(NMSPacketList packetList, Position position) {
public void addSpawnPackets(NMSPacketList packetList, PositionCoordinates position) {
packetList.add(EntityLivingSpawnNMSPacket.builder(slimeID, EntityTypeID.SLIME, position, SLIME_Y_OFFSET)
.setInvisible()
.setSlimeSmall() // Required for a correct client-side collision box
@ -33,7 +33,7 @@ public class VersionClickableNMSPacketEntity implements ClickableNMSPacketEntity
}
@Override
public void addTeleportPackets(NMSPacketList packetList, Position position) {
public void addTeleportPackets(NMSPacketList packetList, PositionCoordinates position) {
packetList.add(new EntityTeleportNMSPacket(slimeID, position, SLIME_Y_OFFSET));
}

View File

@ -5,7 +5,7 @@
*/
package me.filoghost.holographicdisplays.nms.v1_10_R1;
import me.filoghost.holographicdisplays.common.Position;
import me.filoghost.holographicdisplays.common.PositionCoordinates;
import me.filoghost.holographicdisplays.nms.common.EntityID;
import me.filoghost.holographicdisplays.nms.common.NMSPacketList;
import me.filoghost.holographicdisplays.nms.common.entity.ItemNMSPacketEntity;
@ -22,7 +22,7 @@ public class VersionItemNMSPacketEntity implements ItemNMSPacketEntity {
}
@Override
public void addSpawnPackets(NMSPacketList packetList, Position position, ItemStack itemStack) {
public void addSpawnPackets(NMSPacketList packetList, PositionCoordinates position, ItemStack itemStack) {
packetList.add(new EntitySpawnNMSPacket(vehicleID, EntityTypeID.ARMOR_STAND, position, ITEM_Y_OFFSET));
packetList.add(EntityMetadataNMSPacket.builder(vehicleID)
.setArmorStandMarker()
@ -45,7 +45,7 @@ public class VersionItemNMSPacketEntity implements ItemNMSPacketEntity {
}
@Override
public void addTeleportPackets(NMSPacketList packetList, Position position) {
public void addTeleportPackets(NMSPacketList packetList, PositionCoordinates position) {
packetList.add(new EntityTeleportNMSPacket(vehicleID, position, ITEM_Y_OFFSET));
}

View File

@ -5,7 +5,7 @@
*/
package me.filoghost.holographicdisplays.nms.v1_10_R1;
import me.filoghost.holographicdisplays.common.Position;
import me.filoghost.holographicdisplays.common.PositionCoordinates;
import me.filoghost.holographicdisplays.nms.common.EntityID;
import me.filoghost.holographicdisplays.nms.common.IndividualNMSPacket;
import me.filoghost.holographicdisplays.nms.common.IndividualText;
@ -21,7 +21,7 @@ class VersionTextNMSPacketEntity implements TextNMSPacketEntity {
}
@Override
public void addSpawnPackets(NMSPacketList packetList, Position position, String text) {
public void addSpawnPackets(NMSPacketList packetList, PositionCoordinates position, String text) {
packetList.add(new EntitySpawnNMSPacket(armorStandID, EntityTypeID.ARMOR_STAND, position, ARMOR_STAND_Y_OFFSET));
packetList.add(EntityMetadataNMSPacket.builder(armorStandID)
.setArmorStandMarker()
@ -31,7 +31,7 @@ class VersionTextNMSPacketEntity implements TextNMSPacketEntity {
}
@Override
public void addSpawnPackets(NMSPacketList packetList, Position position, IndividualText individualText) {
public void addSpawnPackets(NMSPacketList packetList, PositionCoordinates position, IndividualText individualText) {
packetList.add(new EntitySpawnNMSPacket(armorStandID, EntityTypeID.ARMOR_STAND, position, ARMOR_STAND_Y_OFFSET));
packetList.add(new IndividualNMSPacket(player ->
EntityMetadataNMSPacket.builder(armorStandID)
@ -59,7 +59,7 @@ class VersionTextNMSPacketEntity implements TextNMSPacketEntity {
}
@Override
public void addTeleportPackets(NMSPacketList packetList, Position position) {
public void addTeleportPackets(NMSPacketList packetList, PositionCoordinates position) {
packetList.add(new EntityTeleportNMSPacket(armorStandID, position, ARMOR_STAND_Y_OFFSET));
}

View File

@ -6,7 +6,7 @@
package me.filoghost.holographicdisplays.nms.v1_11_R1;
import me.filoghost.fcommons.reflection.ReflectField;
import me.filoghost.holographicdisplays.common.Position;
import me.filoghost.holographicdisplays.common.PositionCoordinates;
import me.filoghost.holographicdisplays.nms.common.EntityID;
import net.minecraft.server.v1_11_R1.DataWatcher;
import net.minecraft.server.v1_11_R1.Packet;
@ -35,7 +35,7 @@ class EntityLivingSpawnNMSPacket extends VersionNMSPacket {
}
public static DataWatcherPacketBuilder<EntityLivingSpawnNMSPacket> builder(
EntityID entityID, int entityTypeID, Position position, double positionOffsetY) {
EntityID entityID, int entityTypeID, PositionCoordinates position, double positionOffsetY) {
PacketByteBuffer packetByteBuffer = PacketByteBuffer.get();
packetByteBuffer.writeVarInt(entityID.getNumericID());

View File

@ -5,7 +5,7 @@
*/
package me.filoghost.holographicdisplays.nms.v1_11_R1;
import me.filoghost.holographicdisplays.common.Position;
import me.filoghost.holographicdisplays.common.PositionCoordinates;
import me.filoghost.holographicdisplays.nms.common.EntityID;
import net.minecraft.server.v1_11_R1.Packet;
import net.minecraft.server.v1_11_R1.PacketPlayOutSpawnEntity;
@ -14,7 +14,7 @@ class EntitySpawnNMSPacket extends VersionNMSPacket {
private final Packet<?> rawPacket;
EntitySpawnNMSPacket(EntityID entityID, int entityTypeID, Position position, double positionOffsetY) {
EntitySpawnNMSPacket(EntityID entityID, int entityTypeID, PositionCoordinates position, double positionOffsetY) {
PacketByteBuffer packetByteBuffer = PacketByteBuffer.get();
packetByteBuffer.writeVarInt(entityID.getNumericID());

View File

@ -5,7 +5,7 @@
*/
package me.filoghost.holographicdisplays.nms.v1_11_R1;
import me.filoghost.holographicdisplays.common.Position;
import me.filoghost.holographicdisplays.common.PositionCoordinates;
import me.filoghost.holographicdisplays.nms.common.EntityID;
import net.minecraft.server.v1_11_R1.Packet;
import net.minecraft.server.v1_11_R1.PacketPlayOutEntityTeleport;
@ -14,7 +14,7 @@ class EntityTeleportNMSPacket extends VersionNMSPacket {
private final Packet<?> rawPacket;
EntityTeleportNMSPacket(EntityID entityID, Position position, double positionOffsetY) {
EntityTeleportNMSPacket(EntityID entityID, PositionCoordinates position, double positionOffsetY) {
PacketByteBuffer packetByteBuffer = PacketByteBuffer.get();
packetByteBuffer.writeVarInt(entityID.getNumericID());

View File

@ -5,7 +5,7 @@
*/
package me.filoghost.holographicdisplays.nms.v1_11_R1;
import me.filoghost.holographicdisplays.common.Position;
import me.filoghost.holographicdisplays.common.PositionCoordinates;
import me.filoghost.holographicdisplays.nms.common.EntityID;
import me.filoghost.holographicdisplays.nms.common.NMSPacketList;
import me.filoghost.holographicdisplays.nms.common.entity.ClickableNMSPacketEntity;
@ -24,7 +24,7 @@ public class VersionClickableNMSPacketEntity implements ClickableNMSPacketEntity
}
@Override
public void addSpawnPackets(NMSPacketList packetList, Position position) {
public void addSpawnPackets(NMSPacketList packetList, PositionCoordinates position) {
packetList.add(EntityLivingSpawnNMSPacket.builder(slimeID, EntityTypeID.SLIME, position, SLIME_Y_OFFSET)
.setInvisible()
.setSlimeSmall() // Required for a correct client-side collision box
@ -33,7 +33,7 @@ public class VersionClickableNMSPacketEntity implements ClickableNMSPacketEntity
}
@Override
public void addTeleportPackets(NMSPacketList packetList, Position position) {
public void addTeleportPackets(NMSPacketList packetList, PositionCoordinates position) {
packetList.add(new EntityTeleportNMSPacket(slimeID, position, SLIME_Y_OFFSET));
}

View File

@ -5,7 +5,7 @@
*/
package me.filoghost.holographicdisplays.nms.v1_11_R1;
import me.filoghost.holographicdisplays.common.Position;
import me.filoghost.holographicdisplays.common.PositionCoordinates;
import me.filoghost.holographicdisplays.nms.common.EntityID;
import me.filoghost.holographicdisplays.nms.common.NMSPacketList;
import me.filoghost.holographicdisplays.nms.common.entity.ItemNMSPacketEntity;
@ -22,7 +22,7 @@ public class VersionItemNMSPacketEntity implements ItemNMSPacketEntity {
}
@Override
public void addSpawnPackets(NMSPacketList packetList, Position position, ItemStack itemStack) {
public void addSpawnPackets(NMSPacketList packetList, PositionCoordinates position, ItemStack itemStack) {
packetList.add(new EntitySpawnNMSPacket(vehicleID, EntityTypeID.ARMOR_STAND, position, ITEM_Y_OFFSET));
packetList.add(EntityMetadataNMSPacket.builder(vehicleID)
.setArmorStandMarker()
@ -45,7 +45,7 @@ public class VersionItemNMSPacketEntity implements ItemNMSPacketEntity {
}
@Override
public void addTeleportPackets(NMSPacketList packetList, Position position) {
public void addTeleportPackets(NMSPacketList packetList, PositionCoordinates position) {
packetList.add(new EntityTeleportNMSPacket(vehicleID, position, ITEM_Y_OFFSET));
}

View File

@ -5,7 +5,7 @@
*/
package me.filoghost.holographicdisplays.nms.v1_11_R1;
import me.filoghost.holographicdisplays.common.Position;
import me.filoghost.holographicdisplays.common.PositionCoordinates;
import me.filoghost.holographicdisplays.nms.common.EntityID;
import me.filoghost.holographicdisplays.nms.common.IndividualNMSPacket;
import me.filoghost.holographicdisplays.nms.common.IndividualText;
@ -21,7 +21,7 @@ class VersionTextNMSPacketEntity implements TextNMSPacketEntity {
}
@Override
public void addSpawnPackets(NMSPacketList packetList, Position position, String text) {
public void addSpawnPackets(NMSPacketList packetList, PositionCoordinates position, String text) {
packetList.add(new EntitySpawnNMSPacket(armorStandID, EntityTypeID.ARMOR_STAND, position, ARMOR_STAND_Y_OFFSET));
packetList.add(EntityMetadataNMSPacket.builder(armorStandID)
.setArmorStandMarker()
@ -31,7 +31,7 @@ class VersionTextNMSPacketEntity implements TextNMSPacketEntity {
}
@Override
public void addSpawnPackets(NMSPacketList packetList, Position position, IndividualText individualText) {
public void addSpawnPackets(NMSPacketList packetList, PositionCoordinates position, IndividualText individualText) {
packetList.add(new EntitySpawnNMSPacket(armorStandID, EntityTypeID.ARMOR_STAND, position, ARMOR_STAND_Y_OFFSET));
packetList.add(new IndividualNMSPacket(player ->
EntityMetadataNMSPacket.builder(armorStandID)
@ -59,7 +59,7 @@ class VersionTextNMSPacketEntity implements TextNMSPacketEntity {
}
@Override
public void addTeleportPackets(NMSPacketList packetList, Position position) {
public void addTeleportPackets(NMSPacketList packetList, PositionCoordinates position) {
packetList.add(new EntityTeleportNMSPacket(armorStandID, position, ARMOR_STAND_Y_OFFSET));
}

View File

@ -6,7 +6,7 @@
package me.filoghost.holographicdisplays.nms.v1_12_R1;
import me.filoghost.fcommons.reflection.ReflectField;
import me.filoghost.holographicdisplays.common.Position;
import me.filoghost.holographicdisplays.common.PositionCoordinates;
import me.filoghost.holographicdisplays.nms.common.EntityID;
import net.minecraft.server.v1_12_R1.DataWatcher;
import net.minecraft.server.v1_12_R1.Packet;
@ -35,7 +35,7 @@ class EntityLivingSpawnNMSPacket extends VersionNMSPacket {
}
public static DataWatcherPacketBuilder<EntityLivingSpawnNMSPacket> builder(
EntityID entityID, int entityTypeID, Position position, double positionOffsetY) {
EntityID entityID, int entityTypeID, PositionCoordinates position, double positionOffsetY) {
PacketByteBuffer packetByteBuffer = PacketByteBuffer.get();
packetByteBuffer.writeVarInt(entityID.getNumericID());

View File

@ -5,7 +5,7 @@
*/
package me.filoghost.holographicdisplays.nms.v1_12_R1;
import me.filoghost.holographicdisplays.common.Position;
import me.filoghost.holographicdisplays.common.PositionCoordinates;
import me.filoghost.holographicdisplays.nms.common.EntityID;
import net.minecraft.server.v1_12_R1.Packet;
import net.minecraft.server.v1_12_R1.PacketPlayOutSpawnEntity;
@ -14,7 +14,7 @@ class EntitySpawnNMSPacket extends VersionNMSPacket {
private final Packet<?> rawPacket;
EntitySpawnNMSPacket(EntityID entityID, int entityTypeID, Position position, double positionOffsetY) {
EntitySpawnNMSPacket(EntityID entityID, int entityTypeID, PositionCoordinates position, double positionOffsetY) {
PacketByteBuffer packetByteBuffer = PacketByteBuffer.get();
packetByteBuffer.writeVarInt(entityID.getNumericID());

View File

@ -5,7 +5,7 @@
*/
package me.filoghost.holographicdisplays.nms.v1_12_R1;
import me.filoghost.holographicdisplays.common.Position;
import me.filoghost.holographicdisplays.common.PositionCoordinates;
import me.filoghost.holographicdisplays.nms.common.EntityID;
import net.minecraft.server.v1_12_R1.Packet;
import net.minecraft.server.v1_12_R1.PacketPlayOutEntityTeleport;
@ -14,7 +14,7 @@ class EntityTeleportNMSPacket extends VersionNMSPacket {
private final Packet<?> rawPacket;
EntityTeleportNMSPacket(EntityID entityID, Position position, double positionOffsetY) {
EntityTeleportNMSPacket(EntityID entityID, PositionCoordinates position, double positionOffsetY) {
PacketByteBuffer packetByteBuffer = PacketByteBuffer.get();
packetByteBuffer.writeVarInt(entityID.getNumericID());

View File

@ -5,7 +5,7 @@
*/
package me.filoghost.holographicdisplays.nms.v1_12_R1;
import me.filoghost.holographicdisplays.common.Position;
import me.filoghost.holographicdisplays.common.PositionCoordinates;
import me.filoghost.holographicdisplays.nms.common.EntityID;
import me.filoghost.holographicdisplays.nms.common.NMSPacketList;
import me.filoghost.holographicdisplays.nms.common.entity.ClickableNMSPacketEntity;
@ -24,7 +24,7 @@ public class VersionClickableNMSPacketEntity implements ClickableNMSPacketEntity
}
@Override
public void addSpawnPackets(NMSPacketList packetList, Position position) {
public void addSpawnPackets(NMSPacketList packetList, PositionCoordinates position) {
packetList.add(EntityLivingSpawnNMSPacket.builder(slimeID, EntityTypeID.SLIME, position, SLIME_Y_OFFSET)
.setInvisible()
.setSlimeSmall() // Required for a correct client-side collision box
@ -33,7 +33,7 @@ public class VersionClickableNMSPacketEntity implements ClickableNMSPacketEntity
}
@Override
public void addTeleportPackets(NMSPacketList packetList, Position position) {
public void addTeleportPackets(NMSPacketList packetList, PositionCoordinates position) {
packetList.add(new EntityTeleportNMSPacket(slimeID, position, SLIME_Y_OFFSET));
}

View File

@ -5,7 +5,7 @@
*/
package me.filoghost.holographicdisplays.nms.v1_12_R1;
import me.filoghost.holographicdisplays.common.Position;
import me.filoghost.holographicdisplays.common.PositionCoordinates;
import me.filoghost.holographicdisplays.nms.common.EntityID;
import me.filoghost.holographicdisplays.nms.common.NMSPacketList;
import me.filoghost.holographicdisplays.nms.common.entity.ItemNMSPacketEntity;
@ -22,7 +22,7 @@ public class VersionItemNMSPacketEntity implements ItemNMSPacketEntity {
}
@Override
public void addSpawnPackets(NMSPacketList packetList, Position position, ItemStack itemStack) {
public void addSpawnPackets(NMSPacketList packetList, PositionCoordinates position, ItemStack itemStack) {
packetList.add(new EntitySpawnNMSPacket(vehicleID, EntityTypeID.ARMOR_STAND, position, ITEM_Y_OFFSET));
packetList.add(EntityMetadataNMSPacket.builder(vehicleID)
.setArmorStandMarker()
@ -45,7 +45,7 @@ public class VersionItemNMSPacketEntity implements ItemNMSPacketEntity {
}
@Override
public void addTeleportPackets(NMSPacketList packetList, Position position) {
public void addTeleportPackets(NMSPacketList packetList, PositionCoordinates position) {
packetList.add(new EntityTeleportNMSPacket(vehicleID, position, ITEM_Y_OFFSET));
}

View File

@ -5,7 +5,7 @@
*/
package me.filoghost.holographicdisplays.nms.v1_12_R1;
import me.filoghost.holographicdisplays.common.Position;
import me.filoghost.holographicdisplays.common.PositionCoordinates;
import me.filoghost.holographicdisplays.nms.common.EntityID;
import me.filoghost.holographicdisplays.nms.common.IndividualNMSPacket;
import me.filoghost.holographicdisplays.nms.common.IndividualText;
@ -21,7 +21,7 @@ class VersionTextNMSPacketEntity implements TextNMSPacketEntity {
}
@Override
public void addSpawnPackets(NMSPacketList packetList, Position position, String text) {
public void addSpawnPackets(NMSPacketList packetList, PositionCoordinates position, String text) {
packetList.add(new EntitySpawnNMSPacket(armorStandID, EntityTypeID.ARMOR_STAND, position, ARMOR_STAND_Y_OFFSET));
packetList.add(EntityMetadataNMSPacket.builder(armorStandID)
.setArmorStandMarker()
@ -31,7 +31,7 @@ class VersionTextNMSPacketEntity implements TextNMSPacketEntity {
}
@Override
public void addSpawnPackets(NMSPacketList packetList, Position position, IndividualText individualText) {
public void addSpawnPackets(NMSPacketList packetList, PositionCoordinates position, IndividualText individualText) {
packetList.add(new EntitySpawnNMSPacket(armorStandID, EntityTypeID.ARMOR_STAND, position, ARMOR_STAND_Y_OFFSET));
packetList.add(new IndividualNMSPacket(player ->
EntityMetadataNMSPacket.builder(armorStandID)
@ -59,7 +59,7 @@ class VersionTextNMSPacketEntity implements TextNMSPacketEntity {
}
@Override
public void addTeleportPackets(NMSPacketList packetList, Position position) {
public void addTeleportPackets(NMSPacketList packetList, PositionCoordinates position) {
packetList.add(new EntityTeleportNMSPacket(armorStandID, position, ARMOR_STAND_Y_OFFSET));
}

View File

@ -6,7 +6,7 @@
package me.filoghost.holographicdisplays.nms.v1_13_R2;
import me.filoghost.fcommons.reflection.ReflectField;
import me.filoghost.holographicdisplays.common.Position;
import me.filoghost.holographicdisplays.common.PositionCoordinates;
import me.filoghost.holographicdisplays.nms.common.EntityID;
import net.minecraft.server.v1_13_R2.DataWatcher;
import net.minecraft.server.v1_13_R2.Packet;
@ -35,7 +35,7 @@ class EntityLivingSpawnNMSPacket extends VersionNMSPacket {
}
public static DataWatcherPacketBuilder<EntityLivingSpawnNMSPacket> builder(
EntityID entityID, int entityTypeID, Position position, double positionOffsetY) {
EntityID entityID, int entityTypeID, PositionCoordinates position, double positionOffsetY) {
PacketByteBuffer packetByteBuffer = PacketByteBuffer.get();
packetByteBuffer.writeVarInt(entityID.getNumericID());

View File

@ -5,7 +5,7 @@
*/
package me.filoghost.holographicdisplays.nms.v1_13_R2;
import me.filoghost.holographicdisplays.common.Position;
import me.filoghost.holographicdisplays.common.PositionCoordinates;
import me.filoghost.holographicdisplays.nms.common.EntityID;
import net.minecraft.server.v1_13_R2.Packet;
import net.minecraft.server.v1_13_R2.PacketPlayOutSpawnEntity;
@ -14,7 +14,7 @@ class EntitySpawnNMSPacket extends VersionNMSPacket {
private final Packet<?> rawPacket;
EntitySpawnNMSPacket(EntityID entityID, int entityTypeID, Position position, double positionOffsetY) {
EntitySpawnNMSPacket(EntityID entityID, int entityTypeID, PositionCoordinates position, double positionOffsetY) {
PacketByteBuffer packetByteBuffer = PacketByteBuffer.get();
packetByteBuffer.writeVarInt(entityID.getNumericID());

View File

@ -5,7 +5,7 @@
*/
package me.filoghost.holographicdisplays.nms.v1_13_R2;
import me.filoghost.holographicdisplays.common.Position;
import me.filoghost.holographicdisplays.common.PositionCoordinates;
import me.filoghost.holographicdisplays.nms.common.EntityID;
import net.minecraft.server.v1_13_R2.Packet;
import net.minecraft.server.v1_13_R2.PacketPlayOutEntityTeleport;
@ -14,7 +14,7 @@ class EntityTeleportNMSPacket extends VersionNMSPacket {
private final Packet<?> rawPacket;
EntityTeleportNMSPacket(EntityID entityID, Position position, double positionOffsetY) {
EntityTeleportNMSPacket(EntityID entityID, PositionCoordinates position, double positionOffsetY) {
PacketByteBuffer packetByteBuffer = PacketByteBuffer.get();
packetByteBuffer.writeVarInt(entityID.getNumericID());

View File

@ -5,7 +5,7 @@
*/
package me.filoghost.holographicdisplays.nms.v1_13_R2;
import me.filoghost.holographicdisplays.common.Position;
import me.filoghost.holographicdisplays.common.PositionCoordinates;
import me.filoghost.holographicdisplays.nms.common.EntityID;
import me.filoghost.holographicdisplays.nms.common.NMSPacketList;
import me.filoghost.holographicdisplays.nms.common.entity.ClickableNMSPacketEntity;
@ -24,7 +24,7 @@ public class VersionClickableNMSPacketEntity implements ClickableNMSPacketEntity
}
@Override
public void addSpawnPackets(NMSPacketList packetList, Position position) {
public void addSpawnPackets(NMSPacketList packetList, PositionCoordinates position) {
packetList.add(EntityLivingSpawnNMSPacket.builder(slimeID, EntityTypeID.SLIME, position, SLIME_Y_OFFSET)
.setInvisible()
.setSlimeSmall() // Required for a correct client-side collision box
@ -33,7 +33,7 @@ public class VersionClickableNMSPacketEntity implements ClickableNMSPacketEntity
}
@Override
public void addTeleportPackets(NMSPacketList packetList, Position position) {
public void addTeleportPackets(NMSPacketList packetList, PositionCoordinates position) {
packetList.add(new EntityTeleportNMSPacket(slimeID, position, SLIME_Y_OFFSET));
}

View File

@ -5,7 +5,7 @@
*/
package me.filoghost.holographicdisplays.nms.v1_13_R2;
import me.filoghost.holographicdisplays.common.Position;
import me.filoghost.holographicdisplays.common.PositionCoordinates;
import me.filoghost.holographicdisplays.nms.common.EntityID;
import me.filoghost.holographicdisplays.nms.common.NMSPacketList;
import me.filoghost.holographicdisplays.nms.common.entity.ItemNMSPacketEntity;
@ -22,7 +22,7 @@ public class VersionItemNMSPacketEntity implements ItemNMSPacketEntity {
}
@Override
public void addSpawnPackets(NMSPacketList packetList, Position position, ItemStack itemStack) {
public void addSpawnPackets(NMSPacketList packetList, PositionCoordinates position, ItemStack itemStack) {
packetList.add(new EntitySpawnNMSPacket(vehicleID, EntityTypeID.ARMOR_STAND, position, ITEM_Y_OFFSET));
packetList.add(EntityMetadataNMSPacket.builder(vehicleID)
.setArmorStandMarker()
@ -45,7 +45,7 @@ public class VersionItemNMSPacketEntity implements ItemNMSPacketEntity {
}
@Override
public void addTeleportPackets(NMSPacketList packetList, Position position) {
public void addTeleportPackets(NMSPacketList packetList, PositionCoordinates position) {
packetList.add(new EntityTeleportNMSPacket(vehicleID, position, ITEM_Y_OFFSET));
}

View File

@ -5,7 +5,7 @@
*/
package me.filoghost.holographicdisplays.nms.v1_13_R2;
import me.filoghost.holographicdisplays.common.Position;
import me.filoghost.holographicdisplays.common.PositionCoordinates;
import me.filoghost.holographicdisplays.nms.common.EntityID;
import me.filoghost.holographicdisplays.nms.common.IndividualNMSPacket;
import me.filoghost.holographicdisplays.nms.common.IndividualText;
@ -21,7 +21,7 @@ class VersionTextNMSPacketEntity implements TextNMSPacketEntity {
}
@Override
public void addSpawnPackets(NMSPacketList packetList, Position position, String text) {
public void addSpawnPackets(NMSPacketList packetList, PositionCoordinates position, String text) {
packetList.add(new EntitySpawnNMSPacket(armorStandID, EntityTypeID.ARMOR_STAND, position, ARMOR_STAND_Y_OFFSET));
packetList.add(EntityMetadataNMSPacket.builder(armorStandID)
.setArmorStandMarker()
@ -31,7 +31,7 @@ class VersionTextNMSPacketEntity implements TextNMSPacketEntity {
}
@Override
public void addSpawnPackets(NMSPacketList packetList, Position position, IndividualText individualText) {
public void addSpawnPackets(NMSPacketList packetList, PositionCoordinates position, IndividualText individualText) {
packetList.add(new EntitySpawnNMSPacket(armorStandID, EntityTypeID.ARMOR_STAND, position, ARMOR_STAND_Y_OFFSET));
packetList.add(new IndividualNMSPacket(player ->
EntityMetadataNMSPacket.builder(armorStandID)
@ -59,7 +59,7 @@ class VersionTextNMSPacketEntity implements TextNMSPacketEntity {
}
@Override
public void addTeleportPackets(NMSPacketList packetList, Position position) {
public void addTeleportPackets(NMSPacketList packetList, PositionCoordinates position) {
packetList.add(new EntityTeleportNMSPacket(armorStandID, position, ARMOR_STAND_Y_OFFSET));
}

View File

@ -6,7 +6,7 @@
package me.filoghost.holographicdisplays.nms.v1_14_R1;
import me.filoghost.fcommons.reflection.ReflectField;
import me.filoghost.holographicdisplays.common.Position;
import me.filoghost.holographicdisplays.common.PositionCoordinates;
import me.filoghost.holographicdisplays.nms.common.EntityID;
import net.minecraft.server.v1_14_R1.DataWatcher;
import net.minecraft.server.v1_14_R1.Packet;
@ -35,7 +35,7 @@ class EntityLivingSpawnNMSPacket extends VersionNMSPacket {
}
public static DataWatcherPacketBuilder<EntityLivingSpawnNMSPacket> builder(
EntityID entityID, int entityTypeID, Position position, double positionOffsetY) {
EntityID entityID, int entityTypeID, PositionCoordinates position, double positionOffsetY) {
PacketByteBuffer packetByteBuffer = PacketByteBuffer.get();
packetByteBuffer.writeVarInt(entityID.getNumericID());

View File

@ -5,7 +5,7 @@
*/
package me.filoghost.holographicdisplays.nms.v1_14_R1;
import me.filoghost.holographicdisplays.common.Position;
import me.filoghost.holographicdisplays.common.PositionCoordinates;
import me.filoghost.holographicdisplays.nms.common.EntityID;
import net.minecraft.server.v1_14_R1.Packet;
import net.minecraft.server.v1_14_R1.PacketPlayOutSpawnEntity;
@ -14,7 +14,7 @@ class EntitySpawnNMSPacket extends VersionNMSPacket {
private final Packet<?> rawPacket;
EntitySpawnNMSPacket(EntityID entityID, int entityTypeID, Position position, double positionOffsetY) {
EntitySpawnNMSPacket(EntityID entityID, int entityTypeID, PositionCoordinates position, double positionOffsetY) {
PacketByteBuffer packetByteBuffer = PacketByteBuffer.get();
packetByteBuffer.writeVarInt(entityID.getNumericID());

View File

@ -5,7 +5,7 @@
*/
package me.filoghost.holographicdisplays.nms.v1_14_R1;
import me.filoghost.holographicdisplays.common.Position;
import me.filoghost.holographicdisplays.common.PositionCoordinates;
import me.filoghost.holographicdisplays.nms.common.EntityID;
import net.minecraft.server.v1_14_R1.Packet;
import net.minecraft.server.v1_14_R1.PacketPlayOutEntityTeleport;
@ -14,7 +14,7 @@ class EntityTeleportNMSPacket extends VersionNMSPacket {
private final Packet<?> rawPacket;
EntityTeleportNMSPacket(EntityID entityID, Position position, double positionOffsetY) {
EntityTeleportNMSPacket(EntityID entityID, PositionCoordinates position, double positionOffsetY) {
PacketByteBuffer packetByteBuffer = PacketByteBuffer.get();
packetByteBuffer.writeVarInt(entityID.getNumericID());

View File

@ -5,7 +5,7 @@
*/
package me.filoghost.holographicdisplays.nms.v1_14_R1;
import me.filoghost.holographicdisplays.common.Position;
import me.filoghost.holographicdisplays.common.PositionCoordinates;
import me.filoghost.holographicdisplays.nms.common.EntityID;
import me.filoghost.holographicdisplays.nms.common.NMSPacketList;
import me.filoghost.holographicdisplays.nms.common.entity.ClickableNMSPacketEntity;
@ -24,7 +24,7 @@ public class VersionClickableNMSPacketEntity implements ClickableNMSPacketEntity
}
@Override
public void addSpawnPackets(NMSPacketList packetList, Position position) {
public void addSpawnPackets(NMSPacketList packetList, PositionCoordinates position) {
packetList.add(EntityLivingSpawnNMSPacket.builder(slimeID, EntityTypeID.SLIME, position, SLIME_Y_OFFSET)
.setInvisible()
.setSlimeSmall() // Required for a correct client-side collision box
@ -33,7 +33,7 @@ public class VersionClickableNMSPacketEntity implements ClickableNMSPacketEntity
}
@Override
public void addTeleportPackets(NMSPacketList packetList, Position position) {
public void addTeleportPackets(NMSPacketList packetList, PositionCoordinates position) {
packetList.add(new EntityTeleportNMSPacket(slimeID, position, SLIME_Y_OFFSET));
}

View File

@ -5,7 +5,7 @@
*/
package me.filoghost.holographicdisplays.nms.v1_14_R1;
import me.filoghost.holographicdisplays.common.Position;
import me.filoghost.holographicdisplays.common.PositionCoordinates;
import me.filoghost.holographicdisplays.nms.common.EntityID;
import me.filoghost.holographicdisplays.nms.common.NMSPacketList;
import me.filoghost.holographicdisplays.nms.common.entity.ItemNMSPacketEntity;
@ -22,7 +22,7 @@ public class VersionItemNMSPacketEntity implements ItemNMSPacketEntity {
}
@Override
public void addSpawnPackets(NMSPacketList packetList, Position position, ItemStack itemStack) {
public void addSpawnPackets(NMSPacketList packetList, PositionCoordinates position, ItemStack itemStack) {
packetList.add(EntityLivingSpawnNMSPacket.builder(vehicleID, EntityTypeID.ARMOR_STAND, position, ITEM_Y_OFFSET)
.setArmorStandMarker()
.build()
@ -44,7 +44,7 @@ public class VersionItemNMSPacketEntity implements ItemNMSPacketEntity {
}
@Override
public void addTeleportPackets(NMSPacketList packetList, Position position) {
public void addTeleportPackets(NMSPacketList packetList, PositionCoordinates position) {
packetList.add(new EntityTeleportNMSPacket(vehicleID, position, ITEM_Y_OFFSET));
}

View File

@ -5,7 +5,7 @@
*/
package me.filoghost.holographicdisplays.nms.v1_14_R1;
import me.filoghost.holographicdisplays.common.Position;
import me.filoghost.holographicdisplays.common.PositionCoordinates;
import me.filoghost.holographicdisplays.nms.common.EntityID;
import me.filoghost.holographicdisplays.nms.common.IndividualNMSPacket;
import me.filoghost.holographicdisplays.nms.common.IndividualText;
@ -21,7 +21,7 @@ class VersionTextNMSPacketEntity implements TextNMSPacketEntity {
}
@Override
public void addSpawnPackets(NMSPacketList packetList, Position position, String text) {
public void addSpawnPackets(NMSPacketList packetList, PositionCoordinates position, String text) {
packetList.add(EntityLivingSpawnNMSPacket.builder(armorStandID, EntityTypeID.ARMOR_STAND, position, ARMOR_STAND_Y_OFFSET)
.setArmorStandMarker()
.setCustomName(text)
@ -30,7 +30,7 @@ class VersionTextNMSPacketEntity implements TextNMSPacketEntity {
}
@Override
public void addSpawnPackets(NMSPacketList packetList, Position position, IndividualText individualText) {
public void addSpawnPackets(NMSPacketList packetList, PositionCoordinates position, IndividualText individualText) {
packetList.add(new IndividualNMSPacket(player ->
EntityLivingSpawnNMSPacket.builder(armorStandID, EntityTypeID.ARMOR_STAND, position, ARMOR_STAND_Y_OFFSET)
.setArmorStandMarker()
@ -57,7 +57,7 @@ class VersionTextNMSPacketEntity implements TextNMSPacketEntity {
}
@Override
public void addTeleportPackets(NMSPacketList packetList, Position position) {
public void addTeleportPackets(NMSPacketList packetList, PositionCoordinates position) {
packetList.add(new EntityTeleportNMSPacket(armorStandID, position, ARMOR_STAND_Y_OFFSET));
}

View File

@ -5,7 +5,7 @@
*/
package me.filoghost.holographicdisplays.nms.v1_15_R1;
import me.filoghost.holographicdisplays.common.Position;
import me.filoghost.holographicdisplays.common.PositionCoordinates;
import me.filoghost.holographicdisplays.nms.common.EntityID;
import net.minecraft.server.v1_15_R1.Packet;
import net.minecraft.server.v1_15_R1.PacketPlayOutSpawnEntityLiving;
@ -14,7 +14,7 @@ class EntityLivingSpawnNMSPacket extends VersionNMSPacket {
private final Packet<?> rawPacket;
EntityLivingSpawnNMSPacket(EntityID entityID, int entityTypeID, Position position, double positionOffsetY) {
EntityLivingSpawnNMSPacket(EntityID entityID, int entityTypeID, PositionCoordinates position, double positionOffsetY) {
PacketByteBuffer packetByteBuffer = PacketByteBuffer.get();
packetByteBuffer.writeVarInt(entityID.getNumericID());

View File

@ -5,7 +5,7 @@
*/
package me.filoghost.holographicdisplays.nms.v1_15_R1;
import me.filoghost.holographicdisplays.common.Position;
import me.filoghost.holographicdisplays.common.PositionCoordinates;
import me.filoghost.holographicdisplays.nms.common.EntityID;
import net.minecraft.server.v1_15_R1.Packet;
import net.minecraft.server.v1_15_R1.PacketPlayOutSpawnEntity;
@ -14,7 +14,7 @@ class EntitySpawnNMSPacket extends VersionNMSPacket {
private final Packet<?> rawPacket;
EntitySpawnNMSPacket(EntityID entityID, int entityTypeID, Position position, double positionOffsetY) {
EntitySpawnNMSPacket(EntityID entityID, int entityTypeID, PositionCoordinates position, double positionOffsetY) {
PacketByteBuffer packetByteBuffer = PacketByteBuffer.get();
packetByteBuffer.writeVarInt(entityID.getNumericID());

View File

@ -5,7 +5,7 @@
*/
package me.filoghost.holographicdisplays.nms.v1_15_R1;
import me.filoghost.holographicdisplays.common.Position;
import me.filoghost.holographicdisplays.common.PositionCoordinates;
import me.filoghost.holographicdisplays.nms.common.EntityID;
import net.minecraft.server.v1_15_R1.Packet;
import net.minecraft.server.v1_15_R1.PacketPlayOutEntityTeleport;
@ -14,7 +14,7 @@ class EntityTeleportNMSPacket extends VersionNMSPacket {
private final Packet<?> rawPacket;
EntityTeleportNMSPacket(EntityID entityID, Position position, double positionOffsetY) {
EntityTeleportNMSPacket(EntityID entityID, PositionCoordinates position, double positionOffsetY) {
PacketByteBuffer packetByteBuffer = PacketByteBuffer.get();
packetByteBuffer.writeVarInt(entityID.getNumericID());

View File

@ -5,7 +5,7 @@
*/
package me.filoghost.holographicdisplays.nms.v1_15_R1;
import me.filoghost.holographicdisplays.common.Position;
import me.filoghost.holographicdisplays.common.PositionCoordinates;
import me.filoghost.holographicdisplays.nms.common.EntityID;
import me.filoghost.holographicdisplays.nms.common.NMSPacketList;
import me.filoghost.holographicdisplays.nms.common.entity.ClickableNMSPacketEntity;
@ -24,7 +24,7 @@ public class VersionClickableNMSPacketEntity implements ClickableNMSPacketEntity
}
@Override
public void addSpawnPackets(NMSPacketList packetList, Position position) {
public void addSpawnPackets(NMSPacketList packetList, PositionCoordinates position) {
packetList.add(new EntityLivingSpawnNMSPacket(slimeID, EntityTypeID.SLIME, position, SLIME_Y_OFFSET));
packetList.add(EntityMetadataNMSPacket.builder(slimeID)
.setInvisible()
@ -34,7 +34,7 @@ public class VersionClickableNMSPacketEntity implements ClickableNMSPacketEntity
}
@Override
public void addTeleportPackets(NMSPacketList packetList, Position position) {
public void addTeleportPackets(NMSPacketList packetList, PositionCoordinates position) {
packetList.add(new EntityTeleportNMSPacket(slimeID, position, SLIME_Y_OFFSET));
}

View File

@ -5,7 +5,7 @@
*/
package me.filoghost.holographicdisplays.nms.v1_15_R1;
import me.filoghost.holographicdisplays.common.Position;
import me.filoghost.holographicdisplays.common.PositionCoordinates;
import me.filoghost.holographicdisplays.nms.common.EntityID;
import me.filoghost.holographicdisplays.nms.common.NMSPacketList;
import me.filoghost.holographicdisplays.nms.common.entity.ItemNMSPacketEntity;
@ -22,7 +22,7 @@ public class VersionItemNMSPacketEntity implements ItemNMSPacketEntity {
}
@Override
public void addSpawnPackets(NMSPacketList packetList, Position position, ItemStack itemStack) {
public void addSpawnPackets(NMSPacketList packetList, PositionCoordinates position, ItemStack itemStack) {
packetList.add(new EntityLivingSpawnNMSPacket(vehicleID, EntityTypeID.ARMOR_STAND, position, ITEM_Y_OFFSET));
packetList.add(EntityMetadataNMSPacket.builder(vehicleID)
.setArmorStandMarker()
@ -45,7 +45,7 @@ public class VersionItemNMSPacketEntity implements ItemNMSPacketEntity {
}
@Override
public void addTeleportPackets(NMSPacketList packetList, Position position) {
public void addTeleportPackets(NMSPacketList packetList, PositionCoordinates position) {
packetList.add(new EntityTeleportNMSPacket(vehicleID, position, ITEM_Y_OFFSET));
}

View File

@ -5,7 +5,7 @@
*/
package me.filoghost.holographicdisplays.nms.v1_15_R1;
import me.filoghost.holographicdisplays.common.Position;
import me.filoghost.holographicdisplays.common.PositionCoordinates;
import me.filoghost.holographicdisplays.nms.common.EntityID;
import me.filoghost.holographicdisplays.nms.common.IndividualNMSPacket;
import me.filoghost.holographicdisplays.nms.common.IndividualText;
@ -21,7 +21,7 @@ class VersionTextNMSPacketEntity implements TextNMSPacketEntity {
}
@Override
public void addSpawnPackets(NMSPacketList packetList, Position position, String text) {
public void addSpawnPackets(NMSPacketList packetList, PositionCoordinates position, String text) {
packetList.add(new EntityLivingSpawnNMSPacket(armorStandID, EntityTypeID.ARMOR_STAND, position, ARMOR_STAND_Y_OFFSET));
packetList.add(EntityMetadataNMSPacket.builder(armorStandID)
.setArmorStandMarker()
@ -31,7 +31,7 @@ class VersionTextNMSPacketEntity implements TextNMSPacketEntity {
}
@Override
public void addSpawnPackets(NMSPacketList packetList, Position position, IndividualText individualText) {
public void addSpawnPackets(NMSPacketList packetList, PositionCoordinates position, IndividualText individualText) {
packetList.add(new EntityLivingSpawnNMSPacket(armorStandID, EntityTypeID.ARMOR_STAND, position, ARMOR_STAND_Y_OFFSET));
packetList.add(new IndividualNMSPacket(player ->
EntityMetadataNMSPacket.builder(armorStandID)
@ -59,7 +59,7 @@ class VersionTextNMSPacketEntity implements TextNMSPacketEntity {
}
@Override
public void addTeleportPackets(NMSPacketList packetList, Position position) {
public void addTeleportPackets(NMSPacketList packetList, PositionCoordinates position) {
packetList.add(new EntityTeleportNMSPacket(armorStandID, position, ARMOR_STAND_Y_OFFSET));
}

View File

@ -5,7 +5,7 @@
*/
package me.filoghost.holographicdisplays.nms.v1_16_R1;
import me.filoghost.holographicdisplays.common.Position;
import me.filoghost.holographicdisplays.common.PositionCoordinates;
import me.filoghost.holographicdisplays.nms.common.EntityID;
import net.minecraft.server.v1_16_R1.Packet;
import net.minecraft.server.v1_16_R1.PacketPlayOutSpawnEntityLiving;
@ -14,7 +14,7 @@ class EntityLivingSpawnNMSPacket extends VersionNMSPacket {
private final Packet<?> rawPacket;
EntityLivingSpawnNMSPacket(EntityID entityID, int entityTypeID, Position position, double positionOffsetY) {
EntityLivingSpawnNMSPacket(EntityID entityID, int entityTypeID, PositionCoordinates position, double positionOffsetY) {
PacketByteBuffer packetByteBuffer = PacketByteBuffer.get();
packetByteBuffer.writeVarInt(entityID.getNumericID());

View File

@ -5,7 +5,7 @@
*/
package me.filoghost.holographicdisplays.nms.v1_16_R1;
import me.filoghost.holographicdisplays.common.Position;
import me.filoghost.holographicdisplays.common.PositionCoordinates;
import me.filoghost.holographicdisplays.nms.common.EntityID;
import net.minecraft.server.v1_16_R1.Packet;
import net.minecraft.server.v1_16_R1.PacketPlayOutSpawnEntity;
@ -14,7 +14,7 @@ class EntitySpawnNMSPacket extends VersionNMSPacket {
private final Packet<?> rawPacket;
EntitySpawnNMSPacket(EntityID entityID, int entityTypeID, Position position, double positionOffsetY) {
EntitySpawnNMSPacket(EntityID entityID, int entityTypeID, PositionCoordinates position, double positionOffsetY) {
PacketByteBuffer packetByteBuffer = PacketByteBuffer.get();
packetByteBuffer.writeVarInt(entityID.getNumericID());

View File

@ -5,7 +5,7 @@
*/
package me.filoghost.holographicdisplays.nms.v1_16_R1;
import me.filoghost.holographicdisplays.common.Position;
import me.filoghost.holographicdisplays.common.PositionCoordinates;
import me.filoghost.holographicdisplays.nms.common.EntityID;
import net.minecraft.server.v1_16_R1.Packet;
import net.minecraft.server.v1_16_R1.PacketPlayOutEntityTeleport;
@ -14,7 +14,7 @@ class EntityTeleportNMSPacket extends VersionNMSPacket {
private final Packet<?> rawPacket;
EntityTeleportNMSPacket(EntityID entityID, Position position, double positionOffsetY) {
EntityTeleportNMSPacket(EntityID entityID, PositionCoordinates position, double positionOffsetY) {
PacketByteBuffer packetByteBuffer = PacketByteBuffer.get();
packetByteBuffer.writeVarInt(entityID.getNumericID());

View File

@ -5,7 +5,7 @@
*/
package me.filoghost.holographicdisplays.nms.v1_16_R1;
import me.filoghost.holographicdisplays.common.Position;
import me.filoghost.holographicdisplays.common.PositionCoordinates;
import me.filoghost.holographicdisplays.nms.common.EntityID;
import me.filoghost.holographicdisplays.nms.common.NMSPacketList;
import me.filoghost.holographicdisplays.nms.common.entity.ClickableNMSPacketEntity;
@ -24,7 +24,7 @@ public class VersionClickableNMSPacketEntity implements ClickableNMSPacketEntity
}
@Override
public void addSpawnPackets(NMSPacketList packetList, Position position) {
public void addSpawnPackets(NMSPacketList packetList, PositionCoordinates position) {
packetList.add(new EntityLivingSpawnNMSPacket(slimeID, EntityTypeID.SLIME, position, SLIME_Y_OFFSET));
packetList.add(EntityMetadataNMSPacket.builder(slimeID)
.setInvisible()
@ -34,7 +34,7 @@ public class VersionClickableNMSPacketEntity implements ClickableNMSPacketEntity
}
@Override
public void addTeleportPackets(NMSPacketList packetList, Position position) {
public void addTeleportPackets(NMSPacketList packetList, PositionCoordinates position) {
packetList.add(new EntityTeleportNMSPacket(slimeID, position, SLIME_Y_OFFSET));
}

View File

@ -5,7 +5,7 @@
*/
package me.filoghost.holographicdisplays.nms.v1_16_R1;
import me.filoghost.holographicdisplays.common.Position;
import me.filoghost.holographicdisplays.common.PositionCoordinates;
import me.filoghost.holographicdisplays.nms.common.EntityID;
import me.filoghost.holographicdisplays.nms.common.NMSPacketList;
import me.filoghost.holographicdisplays.nms.common.entity.ItemNMSPacketEntity;
@ -22,7 +22,7 @@ public class VersionItemNMSPacketEntity implements ItemNMSPacketEntity {
}
@Override
public void addSpawnPackets(NMSPacketList packetList, Position position, ItemStack itemStack) {
public void addSpawnPackets(NMSPacketList packetList, PositionCoordinates position, ItemStack itemStack) {
packetList.add(new EntityLivingSpawnNMSPacket(vehicleID, EntityTypeID.ARMOR_STAND, position, ITEM_Y_OFFSET));
packetList.add(EntityMetadataNMSPacket.builder(vehicleID)
.setArmorStandMarker()
@ -45,7 +45,7 @@ public class VersionItemNMSPacketEntity implements ItemNMSPacketEntity {
}
@Override
public void addTeleportPackets(NMSPacketList packetList, Position position) {
public void addTeleportPackets(NMSPacketList packetList, PositionCoordinates position) {
packetList.add(new EntityTeleportNMSPacket(vehicleID, position, ITEM_Y_OFFSET));
}

View File

@ -5,7 +5,7 @@
*/
package me.filoghost.holographicdisplays.nms.v1_16_R1;
import me.filoghost.holographicdisplays.common.Position;
import me.filoghost.holographicdisplays.common.PositionCoordinates;
import me.filoghost.holographicdisplays.nms.common.EntityID;
import me.filoghost.holographicdisplays.nms.common.IndividualNMSPacket;
import me.filoghost.holographicdisplays.nms.common.IndividualText;
@ -21,7 +21,7 @@ class VersionTextNMSPacketEntity implements TextNMSPacketEntity {
}
@Override
public void addSpawnPackets(NMSPacketList packetList, Position position, String text) {
public void addSpawnPackets(NMSPacketList packetList, PositionCoordinates position, String text) {
packetList.add(new EntityLivingSpawnNMSPacket(armorStandID, EntityTypeID.ARMOR_STAND, position, ARMOR_STAND_Y_OFFSET));
packetList.add(EntityMetadataNMSPacket.builder(armorStandID)
.setArmorStandMarker()
@ -31,7 +31,7 @@ class VersionTextNMSPacketEntity implements TextNMSPacketEntity {
}
@Override
public void addSpawnPackets(NMSPacketList packetList, Position position, IndividualText individualText) {
public void addSpawnPackets(NMSPacketList packetList, PositionCoordinates position, IndividualText individualText) {
packetList.add(new EntityLivingSpawnNMSPacket(armorStandID, EntityTypeID.ARMOR_STAND, position, ARMOR_STAND_Y_OFFSET));
packetList.add(new IndividualNMSPacket(player ->
EntityMetadataNMSPacket.builder(armorStandID)
@ -59,7 +59,7 @@ class VersionTextNMSPacketEntity implements TextNMSPacketEntity {
}
@Override
public void addTeleportPackets(NMSPacketList packetList, Position position) {
public void addTeleportPackets(NMSPacketList packetList, PositionCoordinates position) {
packetList.add(new EntityTeleportNMSPacket(armorStandID, position, ARMOR_STAND_Y_OFFSET));
}

View File

@ -5,7 +5,7 @@
*/
package me.filoghost.holographicdisplays.nms.v1_16_R2;
import me.filoghost.holographicdisplays.common.Position;
import me.filoghost.holographicdisplays.common.PositionCoordinates;
import me.filoghost.holographicdisplays.nms.common.EntityID;
import net.minecraft.server.v1_16_R2.Packet;
import net.minecraft.server.v1_16_R2.PacketPlayOutSpawnEntityLiving;
@ -14,7 +14,7 @@ class EntityLivingSpawnNMSPacket extends VersionNMSPacket {
private final Packet<?> rawPacket;
EntityLivingSpawnNMSPacket(EntityID entityID, int entityTypeID, Position position, double positionOffsetY) {
EntityLivingSpawnNMSPacket(EntityID entityID, int entityTypeID, PositionCoordinates position, double positionOffsetY) {
PacketByteBuffer packetByteBuffer = PacketByteBuffer.get();
packetByteBuffer.writeVarInt(entityID.getNumericID());

View File

@ -5,7 +5,7 @@
*/
package me.filoghost.holographicdisplays.nms.v1_16_R2;
import me.filoghost.holographicdisplays.common.Position;
import me.filoghost.holographicdisplays.common.PositionCoordinates;
import me.filoghost.holographicdisplays.nms.common.EntityID;
import net.minecraft.server.v1_16_R2.Packet;
import net.minecraft.server.v1_16_R2.PacketPlayOutSpawnEntity;
@ -14,7 +14,7 @@ class EntitySpawnNMSPacket extends VersionNMSPacket {
private final Packet<?> rawPacket;
EntitySpawnNMSPacket(EntityID entityID, int entityTypeID, Position position, double positionOffsetY) {
EntitySpawnNMSPacket(EntityID entityID, int entityTypeID, PositionCoordinates position, double positionOffsetY) {
PacketByteBuffer packetByteBuffer = PacketByteBuffer.get();
packetByteBuffer.writeVarInt(entityID.getNumericID());

View File

@ -5,7 +5,7 @@
*/
package me.filoghost.holographicdisplays.nms.v1_16_R2;
import me.filoghost.holographicdisplays.common.Position;
import me.filoghost.holographicdisplays.common.PositionCoordinates;
import me.filoghost.holographicdisplays.nms.common.EntityID;
import net.minecraft.server.v1_16_R2.Packet;
import net.minecraft.server.v1_16_R2.PacketPlayOutEntityTeleport;
@ -14,7 +14,7 @@ class EntityTeleportNMSPacket extends VersionNMSPacket {
private final Packet<?> rawPacket;
EntityTeleportNMSPacket(EntityID entityID, Position position, double positionOffsetY) {
EntityTeleportNMSPacket(EntityID entityID, PositionCoordinates position, double positionOffsetY) {
PacketByteBuffer packetByteBuffer = PacketByteBuffer.get();
packetByteBuffer.writeVarInt(entityID.getNumericID());

View File

@ -5,7 +5,7 @@
*/
package me.filoghost.holographicdisplays.nms.v1_16_R2;
import me.filoghost.holographicdisplays.common.Position;
import me.filoghost.holographicdisplays.common.PositionCoordinates;
import me.filoghost.holographicdisplays.nms.common.EntityID;
import me.filoghost.holographicdisplays.nms.common.NMSPacketList;
import me.filoghost.holographicdisplays.nms.common.entity.ClickableNMSPacketEntity;
@ -24,7 +24,7 @@ public class VersionClickableNMSPacketEntity implements ClickableNMSPacketEntity
}
@Override
public void addSpawnPackets(NMSPacketList packetList, Position position) {
public void addSpawnPackets(NMSPacketList packetList, PositionCoordinates position) {
packetList.add(new EntityLivingSpawnNMSPacket(slimeID, EntityTypeID.SLIME, position, SLIME_Y_OFFSET));
packetList.add(EntityMetadataNMSPacket.builder(slimeID)
.setInvisible()
@ -34,7 +34,7 @@ public class VersionClickableNMSPacketEntity implements ClickableNMSPacketEntity
}
@Override
public void addTeleportPackets(NMSPacketList packetList, Position position) {
public void addTeleportPackets(NMSPacketList packetList, PositionCoordinates position) {
packetList.add(new EntityTeleportNMSPacket(slimeID, position, SLIME_Y_OFFSET));
}

View File

@ -5,7 +5,7 @@
*/
package me.filoghost.holographicdisplays.nms.v1_16_R2;
import me.filoghost.holographicdisplays.common.Position;
import me.filoghost.holographicdisplays.common.PositionCoordinates;
import me.filoghost.holographicdisplays.nms.common.EntityID;
import me.filoghost.holographicdisplays.nms.common.NMSPacketList;
import me.filoghost.holographicdisplays.nms.common.entity.ItemNMSPacketEntity;
@ -22,7 +22,7 @@ public class VersionItemNMSPacketEntity implements ItemNMSPacketEntity {
}
@Override
public void addSpawnPackets(NMSPacketList packetList, Position position, ItemStack itemStack) {
public void addSpawnPackets(NMSPacketList packetList, PositionCoordinates position, ItemStack itemStack) {
packetList.add(new EntityLivingSpawnNMSPacket(vehicleID, EntityTypeID.ARMOR_STAND, position, ITEM_Y_OFFSET));
packetList.add(EntityMetadataNMSPacket.builder(vehicleID)
.setArmorStandMarker()
@ -45,7 +45,7 @@ public class VersionItemNMSPacketEntity implements ItemNMSPacketEntity {
}
@Override
public void addTeleportPackets(NMSPacketList packetList, Position position) {
public void addTeleportPackets(NMSPacketList packetList, PositionCoordinates position) {
packetList.add(new EntityTeleportNMSPacket(vehicleID, position, ITEM_Y_OFFSET));
}

View File

@ -5,7 +5,7 @@
*/
package me.filoghost.holographicdisplays.nms.v1_16_R2;
import me.filoghost.holographicdisplays.common.Position;
import me.filoghost.holographicdisplays.common.PositionCoordinates;
import me.filoghost.holographicdisplays.nms.common.EntityID;
import me.filoghost.holographicdisplays.nms.common.IndividualNMSPacket;
import me.filoghost.holographicdisplays.nms.common.IndividualText;
@ -21,7 +21,7 @@ class VersionTextNMSPacketEntity implements TextNMSPacketEntity {
}
@Override
public void addSpawnPackets(NMSPacketList packetList, Position position, String text) {
public void addSpawnPackets(NMSPacketList packetList, PositionCoordinates position, String text) {
packetList.add(new EntityLivingSpawnNMSPacket(armorStandID, EntityTypeID.ARMOR_STAND, position, ARMOR_STAND_Y_OFFSET));
packetList.add(EntityMetadataNMSPacket.builder(armorStandID)
.setArmorStandMarker()
@ -31,7 +31,7 @@ class VersionTextNMSPacketEntity implements TextNMSPacketEntity {
}
@Override
public void addSpawnPackets(NMSPacketList packetList, Position position, IndividualText individualText) {
public void addSpawnPackets(NMSPacketList packetList, PositionCoordinates position, IndividualText individualText) {
packetList.add(new EntityLivingSpawnNMSPacket(armorStandID, EntityTypeID.ARMOR_STAND, position, ARMOR_STAND_Y_OFFSET));
packetList.add(new IndividualNMSPacket(player ->
EntityMetadataNMSPacket.builder(armorStandID)
@ -59,7 +59,7 @@ class VersionTextNMSPacketEntity implements TextNMSPacketEntity {
}
@Override
public void addTeleportPackets(NMSPacketList packetList, Position position) {
public void addTeleportPackets(NMSPacketList packetList, PositionCoordinates position) {
packetList.add(new EntityTeleportNMSPacket(armorStandID, position, ARMOR_STAND_Y_OFFSET));
}

View File

@ -5,7 +5,7 @@
*/
package me.filoghost.holographicdisplays.nms.v1_16_R3;
import me.filoghost.holographicdisplays.common.Position;
import me.filoghost.holographicdisplays.common.PositionCoordinates;
import me.filoghost.holographicdisplays.nms.common.EntityID;
import net.minecraft.server.v1_16_R3.Packet;
import net.minecraft.server.v1_16_R3.PacketPlayOutSpawnEntityLiving;
@ -14,7 +14,7 @@ class EntityLivingSpawnNMSPacket extends VersionNMSPacket {
private final Packet<?> rawPacket;
EntityLivingSpawnNMSPacket(EntityID entityID, int entityTypeID, Position position, double positionOffsetY) {
EntityLivingSpawnNMSPacket(EntityID entityID, int entityTypeID, PositionCoordinates position, double positionOffsetY) {
PacketByteBuffer packetByteBuffer = PacketByteBuffer.get();
packetByteBuffer.writeVarInt(entityID.getNumericID());

View File

@ -5,7 +5,7 @@
*/
package me.filoghost.holographicdisplays.nms.v1_16_R3;
import me.filoghost.holographicdisplays.common.Position;
import me.filoghost.holographicdisplays.common.PositionCoordinates;
import me.filoghost.holographicdisplays.nms.common.EntityID;
import net.minecraft.server.v1_16_R3.Packet;
import net.minecraft.server.v1_16_R3.PacketPlayOutSpawnEntity;
@ -14,7 +14,7 @@ class EntitySpawnNMSPacket extends VersionNMSPacket {
private final Packet<?> rawPacket;
EntitySpawnNMSPacket(EntityID entityID, int entityTypeID, Position position, double positionOffsetY) {
EntitySpawnNMSPacket(EntityID entityID, int entityTypeID, PositionCoordinates position, double positionOffsetY) {
PacketByteBuffer packetByteBuffer = PacketByteBuffer.get();
packetByteBuffer.writeVarInt(entityID.getNumericID());

View File

@ -5,7 +5,7 @@
*/
package me.filoghost.holographicdisplays.nms.v1_16_R3;
import me.filoghost.holographicdisplays.common.Position;
import me.filoghost.holographicdisplays.common.PositionCoordinates;
import me.filoghost.holographicdisplays.nms.common.EntityID;
import net.minecraft.server.v1_16_R3.Packet;
import net.minecraft.server.v1_16_R3.PacketPlayOutEntityTeleport;
@ -14,7 +14,7 @@ class EntityTeleportNMSPacket extends VersionNMSPacket {
private final Packet<?> rawPacket;
EntityTeleportNMSPacket(EntityID entityID, Position position, double positionOffsetY) {
EntityTeleportNMSPacket(EntityID entityID, PositionCoordinates position, double positionOffsetY) {
PacketByteBuffer packetByteBuffer = PacketByteBuffer.get();
packetByteBuffer.writeVarInt(entityID.getNumericID());

View File

@ -5,7 +5,7 @@
*/
package me.filoghost.holographicdisplays.nms.v1_16_R3;
import me.filoghost.holographicdisplays.common.Position;
import me.filoghost.holographicdisplays.common.PositionCoordinates;
import me.filoghost.holographicdisplays.nms.common.EntityID;
import me.filoghost.holographicdisplays.nms.common.NMSPacketList;
import me.filoghost.holographicdisplays.nms.common.entity.ClickableNMSPacketEntity;
@ -24,7 +24,7 @@ public class VersionClickableNMSPacketEntity implements ClickableNMSPacketEntity
}
@Override
public void addSpawnPackets(NMSPacketList packetList, Position position) {
public void addSpawnPackets(NMSPacketList packetList, PositionCoordinates position) {
packetList.add(new EntityLivingSpawnNMSPacket(slimeID, EntityTypeID.SLIME, position, SLIME_Y_OFFSET));
packetList.add(EntityMetadataNMSPacket.builder(slimeID)
.setInvisible()
@ -34,7 +34,7 @@ public class VersionClickableNMSPacketEntity implements ClickableNMSPacketEntity
}
@Override
public void addTeleportPackets(NMSPacketList packetList, Position position) {
public void addTeleportPackets(NMSPacketList packetList, PositionCoordinates position) {
packetList.add(new EntityTeleportNMSPacket(slimeID, position, SLIME_Y_OFFSET));
}

View File

@ -5,7 +5,7 @@
*/
package me.filoghost.holographicdisplays.nms.v1_16_R3;
import me.filoghost.holographicdisplays.common.Position;
import me.filoghost.holographicdisplays.common.PositionCoordinates;
import me.filoghost.holographicdisplays.nms.common.EntityID;
import me.filoghost.holographicdisplays.nms.common.NMSPacketList;
import me.filoghost.holographicdisplays.nms.common.entity.ItemNMSPacketEntity;
@ -22,7 +22,7 @@ public class VersionItemNMSPacketEntity implements ItemNMSPacketEntity {
}
@Override
public void addSpawnPackets(NMSPacketList packetList, Position position, ItemStack itemStack) {
public void addSpawnPackets(NMSPacketList packetList, PositionCoordinates position, ItemStack itemStack) {
packetList.add(new EntityLivingSpawnNMSPacket(vehicleID, EntityTypeID.ARMOR_STAND, position, ITEM_Y_OFFSET));
packetList.add(EntityMetadataNMSPacket.builder(vehicleID)
.setArmorStandMarker()
@ -45,7 +45,7 @@ public class VersionItemNMSPacketEntity implements ItemNMSPacketEntity {
}
@Override
public void addTeleportPackets(NMSPacketList packetList, Position position) {
public void addTeleportPackets(NMSPacketList packetList, PositionCoordinates position) {
packetList.add(new EntityTeleportNMSPacket(vehicleID, position, ITEM_Y_OFFSET));
}

View File

@ -5,7 +5,7 @@
*/
package me.filoghost.holographicdisplays.nms.v1_16_R3;
import me.filoghost.holographicdisplays.common.Position;
import me.filoghost.holographicdisplays.common.PositionCoordinates;
import me.filoghost.holographicdisplays.nms.common.EntityID;
import me.filoghost.holographicdisplays.nms.common.IndividualNMSPacket;
import me.filoghost.holographicdisplays.nms.common.IndividualText;
@ -21,7 +21,7 @@ class VersionTextNMSPacketEntity implements TextNMSPacketEntity {
}
@Override
public void addSpawnPackets(NMSPacketList packetList, Position position, String text) {
public void addSpawnPackets(NMSPacketList packetList, PositionCoordinates position, String text) {
packetList.add(new EntityLivingSpawnNMSPacket(armorStandID, EntityTypeID.ARMOR_STAND, position, ARMOR_STAND_Y_OFFSET));
packetList.add(EntityMetadataNMSPacket.builder(armorStandID)
.setArmorStandMarker()
@ -31,7 +31,7 @@ class VersionTextNMSPacketEntity implements TextNMSPacketEntity {
}
@Override
public void addSpawnPackets(NMSPacketList packetList, Position position, IndividualText individualText) {
public void addSpawnPackets(NMSPacketList packetList, PositionCoordinates position, IndividualText individualText) {
packetList.add(new EntityLivingSpawnNMSPacket(armorStandID, EntityTypeID.ARMOR_STAND, position, ARMOR_STAND_Y_OFFSET));
packetList.add(new IndividualNMSPacket(player ->
EntityMetadataNMSPacket.builder(armorStandID)
@ -59,7 +59,7 @@ class VersionTextNMSPacketEntity implements TextNMSPacketEntity {
}
@Override
public void addTeleportPackets(NMSPacketList packetList, Position position) {
public void addTeleportPackets(NMSPacketList packetList, PositionCoordinates position) {
packetList.add(new EntityTeleportNMSPacket(armorStandID, position, ARMOR_STAND_Y_OFFSET));
}

View File

@ -5,7 +5,7 @@
*/
package me.filoghost.holographicdisplays.nms.v1_17_R1;
import me.filoghost.holographicdisplays.common.Position;
import me.filoghost.holographicdisplays.common.PositionCoordinates;
import me.filoghost.holographicdisplays.nms.common.EntityID;
import net.minecraft.network.protocol.Packet;
import net.minecraft.network.protocol.game.PacketPlayOutSpawnEntityLiving;
@ -14,7 +14,7 @@ class EntityLivingSpawnNMSPacket extends VersionNMSPacket {
private final Packet<?> rawPacket;
EntityLivingSpawnNMSPacket(EntityID entityID, int entityTypeID, Position position, double positionOffsetY) {
EntityLivingSpawnNMSPacket(EntityID entityID, int entityTypeID, PositionCoordinates position, double positionOffsetY) {
PacketByteBuffer packetByteBuffer = PacketByteBuffer.get();
packetByteBuffer.writeVarInt(entityID.getNumericID());

View File

@ -5,7 +5,7 @@
*/
package me.filoghost.holographicdisplays.nms.v1_17_R1;
import me.filoghost.holographicdisplays.common.Position;
import me.filoghost.holographicdisplays.common.PositionCoordinates;
import me.filoghost.holographicdisplays.nms.common.EntityID;
import net.minecraft.network.protocol.Packet;
import net.minecraft.network.protocol.game.PacketPlayOutSpawnEntity;
@ -14,7 +14,7 @@ class EntitySpawnNMSPacket extends VersionNMSPacket {
private final Packet<?> rawPacket;
EntitySpawnNMSPacket(EntityID entityID, int entityTypeID, Position position, double positionOffsetY) {
EntitySpawnNMSPacket(EntityID entityID, int entityTypeID, PositionCoordinates position, double positionOffsetY) {
PacketByteBuffer packetByteBuffer = PacketByteBuffer.get();
packetByteBuffer.writeVarInt(entityID.getNumericID());

View File

@ -5,7 +5,7 @@
*/
package me.filoghost.holographicdisplays.nms.v1_17_R1;
import me.filoghost.holographicdisplays.common.Position;
import me.filoghost.holographicdisplays.common.PositionCoordinates;
import me.filoghost.holographicdisplays.nms.common.EntityID;
import net.minecraft.network.protocol.Packet;
import net.minecraft.network.protocol.game.PacketPlayOutEntityTeleport;
@ -14,7 +14,7 @@ class EntityTeleportNMSPacket extends VersionNMSPacket {
private final Packet<?> rawPacket;
EntityTeleportNMSPacket(EntityID entityID, Position position, double positionOffsetY) {
EntityTeleportNMSPacket(EntityID entityID, PositionCoordinates position, double positionOffsetY) {
PacketByteBuffer packetByteBuffer = PacketByteBuffer.get();
packetByteBuffer.writeVarInt(entityID.getNumericID());

View File

@ -5,7 +5,7 @@
*/
package me.filoghost.holographicdisplays.nms.v1_17_R1;
import me.filoghost.holographicdisplays.common.Position;
import me.filoghost.holographicdisplays.common.PositionCoordinates;
import me.filoghost.holographicdisplays.nms.common.EntityID;
import me.filoghost.holographicdisplays.nms.common.NMSPacketList;
import me.filoghost.holographicdisplays.nms.common.entity.ClickableNMSPacketEntity;
@ -24,7 +24,7 @@ public class VersionClickableNMSPacketEntity implements ClickableNMSPacketEntity
}
@Override
public void addSpawnPackets(NMSPacketList packetList, Position position) {
public void addSpawnPackets(NMSPacketList packetList, PositionCoordinates position) {
packetList.add(new EntityLivingSpawnNMSPacket(slimeID, EntityTypeID.SLIME, position, SLIME_Y_OFFSET));
packetList.add(EntityMetadataNMSPacket.builder(slimeID)
.setInvisible()
@ -34,7 +34,7 @@ public class VersionClickableNMSPacketEntity implements ClickableNMSPacketEntity
}
@Override
public void addTeleportPackets(NMSPacketList packetList, Position position) {
public void addTeleportPackets(NMSPacketList packetList, PositionCoordinates position) {
packetList.add(new EntityTeleportNMSPacket(slimeID, position, SLIME_Y_OFFSET));
}

View File

@ -5,7 +5,7 @@
*/
package me.filoghost.holographicdisplays.nms.v1_17_R1;
import me.filoghost.holographicdisplays.common.Position;
import me.filoghost.holographicdisplays.common.PositionCoordinates;
import me.filoghost.holographicdisplays.nms.common.EntityID;
import me.filoghost.holographicdisplays.nms.common.NMSPacketList;
import me.filoghost.holographicdisplays.nms.common.entity.ItemNMSPacketEntity;
@ -22,7 +22,7 @@ public class VersionItemNMSPacketEntity implements ItemNMSPacketEntity {
}
@Override
public void addSpawnPackets(NMSPacketList packetList, Position position, ItemStack itemStack) {
public void addSpawnPackets(NMSPacketList packetList, PositionCoordinates position, ItemStack itemStack) {
packetList.add(new EntityLivingSpawnNMSPacket(vehicleID, EntityTypeID.ARMOR_STAND, position, ITEM_Y_OFFSET));
packetList.add(EntityMetadataNMSPacket.builder(vehicleID)
.setArmorStandMarker()
@ -45,7 +45,7 @@ public class VersionItemNMSPacketEntity implements ItemNMSPacketEntity {
}
@Override
public void addTeleportPackets(NMSPacketList packetList, Position position) {
public void addTeleportPackets(NMSPacketList packetList, PositionCoordinates position) {
packetList.add(new EntityTeleportNMSPacket(vehicleID, position, ITEM_Y_OFFSET));
}

View File

@ -5,7 +5,7 @@
*/
package me.filoghost.holographicdisplays.nms.v1_17_R1;
import me.filoghost.holographicdisplays.common.Position;
import me.filoghost.holographicdisplays.common.PositionCoordinates;
import me.filoghost.holographicdisplays.nms.common.EntityID;
import me.filoghost.holographicdisplays.nms.common.IndividualNMSPacket;
import me.filoghost.holographicdisplays.nms.common.IndividualText;
@ -21,7 +21,7 @@ class VersionTextNMSPacketEntity implements TextNMSPacketEntity {
}
@Override
public void addSpawnPackets(NMSPacketList packetList, Position position, String text) {
public void addSpawnPackets(NMSPacketList packetList, PositionCoordinates position, String text) {
packetList.add(new EntityLivingSpawnNMSPacket(armorStandID, EntityTypeID.ARMOR_STAND, position, ARMOR_STAND_Y_OFFSET));
packetList.add(EntityMetadataNMSPacket.builder(armorStandID)
.setArmorStandMarker()
@ -31,7 +31,7 @@ class VersionTextNMSPacketEntity implements TextNMSPacketEntity {
}
@Override
public void addSpawnPackets(NMSPacketList packetList, Position position, IndividualText individualText) {
public void addSpawnPackets(NMSPacketList packetList, PositionCoordinates position, IndividualText individualText) {
packetList.add(new EntityLivingSpawnNMSPacket(armorStandID, EntityTypeID.ARMOR_STAND, position, ARMOR_STAND_Y_OFFSET));
packetList.add(new IndividualNMSPacket(player ->
EntityMetadataNMSPacket.builder(armorStandID)
@ -59,7 +59,7 @@ class VersionTextNMSPacketEntity implements TextNMSPacketEntity {
}
@Override
public void addTeleportPackets(NMSPacketList packetList, Position position) {
public void addTeleportPackets(NMSPacketList packetList, PositionCoordinates position) {
packetList.add(new EntityTeleportNMSPacket(armorStandID, position, ARMOR_STAND_Y_OFFSET));
}

View File

@ -6,7 +6,7 @@
package me.filoghost.holographicdisplays.nms.v1_8_R3;
import me.filoghost.fcommons.reflection.ReflectField;
import me.filoghost.holographicdisplays.common.Position;
import me.filoghost.holographicdisplays.common.PositionCoordinates;
import me.filoghost.holographicdisplays.nms.common.EntityID;
import net.minecraft.server.v1_8_R3.DataWatcher;
import net.minecraft.server.v1_8_R3.MathHelper;
@ -36,7 +36,7 @@ class EntityLivingSpawnNMSPacket extends VersionNMSPacket {
}
public static DataWatcherPacketBuilder<EntityLivingSpawnNMSPacket> builder(
EntityID entityID, int entityTypeID, Position position, double positionOffsetY) {
EntityID entityID, int entityTypeID, PositionCoordinates position, double positionOffsetY) {
PacketByteBuffer packetByteBuffer = PacketByteBuffer.get();
packetByteBuffer.writeVarInt(entityID.getNumericID());

View File

@ -5,7 +5,7 @@
*/
package me.filoghost.holographicdisplays.nms.v1_8_R3;
import me.filoghost.holographicdisplays.common.Position;
import me.filoghost.holographicdisplays.common.PositionCoordinates;
import me.filoghost.holographicdisplays.nms.common.EntityID;
import net.minecraft.server.v1_8_R3.MathHelper;
import net.minecraft.server.v1_8_R3.Packet;
@ -15,7 +15,7 @@ class EntitySpawnNMSPacket extends VersionNMSPacket {
private final Packet<?> rawPacket;
EntitySpawnNMSPacket(EntityID entityID, int entityTypeID, Position position, double positionOffsetY) {
EntitySpawnNMSPacket(EntityID entityID, int entityTypeID, PositionCoordinates position, double positionOffsetY) {
PacketByteBuffer packetByteBuffer = PacketByteBuffer.get();
packetByteBuffer.writeVarInt(entityID.getNumericID());

View File

@ -5,7 +5,7 @@
*/
package me.filoghost.holographicdisplays.nms.v1_8_R3;
import me.filoghost.holographicdisplays.common.Position;
import me.filoghost.holographicdisplays.common.PositionCoordinates;
import me.filoghost.holographicdisplays.nms.common.EntityID;
import net.minecraft.server.v1_8_R3.MathHelper;
import net.minecraft.server.v1_8_R3.Packet;
@ -15,7 +15,7 @@ class EntityTeleportNMSPacket extends VersionNMSPacket {
private final Packet<?> rawPacket;
EntityTeleportNMSPacket(EntityID entityID, Position position, double positionOffsetY) {
EntityTeleportNMSPacket(EntityID entityID, PositionCoordinates position, double positionOffsetY) {
PacketByteBuffer packetByteBuffer = PacketByteBuffer.get();
packetByteBuffer.writeVarInt(entityID.getNumericID());

View File

@ -5,7 +5,7 @@
*/
package me.filoghost.holographicdisplays.nms.v1_8_R3;
import me.filoghost.holographicdisplays.common.Position;
import me.filoghost.holographicdisplays.common.PositionCoordinates;
import me.filoghost.holographicdisplays.nms.common.EntityID;
import me.filoghost.holographicdisplays.nms.common.NMSPacketList;
import me.filoghost.holographicdisplays.nms.common.entity.ClickableNMSPacketEntity;
@ -24,7 +24,7 @@ public class VersionClickableNMSPacketEntity implements ClickableNMSPacketEntity
}
@Override
public void addSpawnPackets(NMSPacketList packetList, Position position) {
public void addSpawnPackets(NMSPacketList packetList, PositionCoordinates position) {
packetList.add(EntityLivingSpawnNMSPacket.builder(slimeID, EntityTypeID.SLIME, position, SLIME_Y_OFFSET)
.setInvisible()
.setSlimeSmall() // Required for a correct client-side collision box
@ -33,7 +33,7 @@ public class VersionClickableNMSPacketEntity implements ClickableNMSPacketEntity
}
@Override
public void addTeleportPackets(NMSPacketList packetList, Position position) {
public void addTeleportPackets(NMSPacketList packetList, PositionCoordinates position) {
packetList.add(new EntityTeleportNMSPacket(slimeID, position, SLIME_Y_OFFSET));
}

View File

@ -5,7 +5,7 @@
*/
package me.filoghost.holographicdisplays.nms.v1_8_R3;
import me.filoghost.holographicdisplays.common.Position;
import me.filoghost.holographicdisplays.common.PositionCoordinates;
import me.filoghost.holographicdisplays.nms.common.EntityID;
import me.filoghost.holographicdisplays.nms.common.NMSPacketList;
import me.filoghost.holographicdisplays.nms.common.entity.ItemNMSPacketEntity;
@ -22,7 +22,7 @@ public class VersionItemNMSPacketEntity implements ItemNMSPacketEntity {
}
@Override
public void addSpawnPackets(NMSPacketList packetList, Position position, ItemStack itemStack) {
public void addSpawnPackets(NMSPacketList packetList, PositionCoordinates position, ItemStack itemStack) {
packetList.add(new EntitySpawnNMSPacket(vehicleID, EntityTypeID.ARMOR_STAND, position, ITEM_Y_OFFSET));
packetList.add(EntityMetadataNMSPacket.builder(vehicleID)
.setArmorStandMarker()
@ -45,7 +45,7 @@ public class VersionItemNMSPacketEntity implements ItemNMSPacketEntity {
}
@Override
public void addTeleportPackets(NMSPacketList packetList, Position position) {
public void addTeleportPackets(NMSPacketList packetList, PositionCoordinates position) {
packetList.add(new EntityTeleportNMSPacket(vehicleID, position, ITEM_Y_OFFSET));
}

View File

@ -5,7 +5,7 @@
*/
package me.filoghost.holographicdisplays.nms.v1_8_R3;
import me.filoghost.holographicdisplays.common.Position;
import me.filoghost.holographicdisplays.common.PositionCoordinates;
import me.filoghost.holographicdisplays.nms.common.EntityID;
import me.filoghost.holographicdisplays.nms.common.IndividualNMSPacket;
import me.filoghost.holographicdisplays.nms.common.IndividualText;
@ -21,7 +21,7 @@ class VersionTextNMSPacketEntity implements TextNMSPacketEntity {
}
@Override
public void addSpawnPackets(NMSPacketList packetList, Position position, String text) {
public void addSpawnPackets(NMSPacketList packetList, PositionCoordinates position, String text) {
packetList.add(new EntitySpawnNMSPacket(armorStandID, EntityTypeID.ARMOR_STAND, position, ARMOR_STAND_Y_OFFSET));
packetList.add(EntityMetadataNMSPacket.builder(armorStandID)
.setArmorStandMarker()
@ -31,7 +31,7 @@ class VersionTextNMSPacketEntity implements TextNMSPacketEntity {
}
@Override
public void addSpawnPackets(NMSPacketList packetList, Position position, IndividualText individualText) {
public void addSpawnPackets(NMSPacketList packetList, PositionCoordinates position, IndividualText individualText) {
packetList.add(new EntitySpawnNMSPacket(armorStandID, EntityTypeID.ARMOR_STAND, position, ARMOR_STAND_Y_OFFSET));
packetList.add(new IndividualNMSPacket(player ->
EntityMetadataNMSPacket.builder(armorStandID)
@ -59,7 +59,7 @@ class VersionTextNMSPacketEntity implements TextNMSPacketEntity {
}
@Override
public void addTeleportPackets(NMSPacketList packetList, Position position) {
public void addTeleportPackets(NMSPacketList packetList, PositionCoordinates position) {
packetList.add(new EntityTeleportNMSPacket(armorStandID, position, ARMOR_STAND_Y_OFFSET));
}

View File

@ -6,7 +6,7 @@
package me.filoghost.holographicdisplays.nms.v1_9_R2;
import me.filoghost.fcommons.reflection.ReflectField;
import me.filoghost.holographicdisplays.common.Position;
import me.filoghost.holographicdisplays.common.PositionCoordinates;
import me.filoghost.holographicdisplays.nms.common.EntityID;
import net.minecraft.server.v1_9_R2.DataWatcher;
import net.minecraft.server.v1_9_R2.Packet;
@ -35,7 +35,7 @@ class EntityLivingSpawnNMSPacket extends VersionNMSPacket {
}
public static DataWatcherPacketBuilder<EntityLivingSpawnNMSPacket> builder(
EntityID entityID, int entityTypeID, Position position, double positionOffsetY) {
EntityID entityID, int entityTypeID, PositionCoordinates position, double positionOffsetY) {
PacketByteBuffer packetByteBuffer = PacketByteBuffer.get();
packetByteBuffer.writeVarInt(entityID.getNumericID());

View File

@ -5,7 +5,7 @@
*/
package me.filoghost.holographicdisplays.nms.v1_9_R2;
import me.filoghost.holographicdisplays.common.Position;
import me.filoghost.holographicdisplays.common.PositionCoordinates;
import me.filoghost.holographicdisplays.nms.common.EntityID;
import net.minecraft.server.v1_9_R2.Packet;
import net.minecraft.server.v1_9_R2.PacketPlayOutSpawnEntity;
@ -14,7 +14,7 @@ class EntitySpawnNMSPacket extends VersionNMSPacket {
private final Packet<?> rawPacket;
EntitySpawnNMSPacket(EntityID entityID, int entityTypeID, Position position, double positionOffsetY) {
EntitySpawnNMSPacket(EntityID entityID, int entityTypeID, PositionCoordinates position, double positionOffsetY) {
PacketByteBuffer packetByteBuffer = PacketByteBuffer.get();
packetByteBuffer.writeVarInt(entityID.getNumericID());

View File

@ -5,7 +5,7 @@
*/
package me.filoghost.holographicdisplays.nms.v1_9_R2;
import me.filoghost.holographicdisplays.common.Position;
import me.filoghost.holographicdisplays.common.PositionCoordinates;
import me.filoghost.holographicdisplays.nms.common.EntityID;
import net.minecraft.server.v1_9_R2.Packet;
import net.minecraft.server.v1_9_R2.PacketPlayOutEntityTeleport;
@ -14,7 +14,7 @@ class EntityTeleportNMSPacket extends VersionNMSPacket {
private final Packet<?> rawPacket;
EntityTeleportNMSPacket(EntityID entityID, Position position, double positionOffsetY) {
EntityTeleportNMSPacket(EntityID entityID, PositionCoordinates position, double positionOffsetY) {
PacketByteBuffer packetByteBuffer = PacketByteBuffer.get();
packetByteBuffer.writeVarInt(entityID.getNumericID());

View File

@ -5,7 +5,7 @@
*/
package me.filoghost.holographicdisplays.nms.v1_9_R2;
import me.filoghost.holographicdisplays.common.Position;
import me.filoghost.holographicdisplays.common.PositionCoordinates;
import me.filoghost.holographicdisplays.nms.common.EntityID;
import me.filoghost.holographicdisplays.nms.common.NMSPacketList;
import me.filoghost.holographicdisplays.nms.common.entity.ClickableNMSPacketEntity;
@ -24,7 +24,7 @@ public class VersionClickableNMSPacketEntity implements ClickableNMSPacketEntity
}
@Override
public void addSpawnPackets(NMSPacketList packetList, Position position) {
public void addSpawnPackets(NMSPacketList packetList, PositionCoordinates position) {
packetList.add(EntityLivingSpawnNMSPacket.builder(slimeID, EntityTypeID.SLIME, position, SLIME_Y_OFFSET)
.setInvisible()
.setSlimeSmall() // Required for a correct client-side collision box
@ -33,7 +33,7 @@ public class VersionClickableNMSPacketEntity implements ClickableNMSPacketEntity
}
@Override
public void addTeleportPackets(NMSPacketList packetList, Position position) {
public void addTeleportPackets(NMSPacketList packetList, PositionCoordinates position) {
packetList.add(new EntityTeleportNMSPacket(slimeID, position, SLIME_Y_OFFSET));
}

View File

@ -5,7 +5,7 @@
*/
package me.filoghost.holographicdisplays.nms.v1_9_R2;
import me.filoghost.holographicdisplays.common.Position;
import me.filoghost.holographicdisplays.common.PositionCoordinates;
import me.filoghost.holographicdisplays.nms.common.EntityID;
import me.filoghost.holographicdisplays.nms.common.NMSPacketList;
import me.filoghost.holographicdisplays.nms.common.entity.ItemNMSPacketEntity;
@ -22,7 +22,7 @@ public class VersionItemNMSPacketEntity implements ItemNMSPacketEntity {
}
@Override
public void addSpawnPackets(NMSPacketList packetList, Position position, ItemStack itemStack) {
public void addSpawnPackets(NMSPacketList packetList, PositionCoordinates position, ItemStack itemStack) {
packetList.add(new EntitySpawnNMSPacket(vehicleID, EntityTypeID.ARMOR_STAND, position, ITEM_Y_OFFSET));
packetList.add(EntityMetadataNMSPacket.builder(vehicleID)
.setArmorStandMarker()
@ -45,7 +45,7 @@ public class VersionItemNMSPacketEntity implements ItemNMSPacketEntity {
}
@Override
public void addTeleportPackets(NMSPacketList packetList, Position position) {
public void addTeleportPackets(NMSPacketList packetList, PositionCoordinates position) {
packetList.add(new EntityTeleportNMSPacket(vehicleID, position, ITEM_Y_OFFSET));
}

View File

@ -5,7 +5,7 @@
*/
package me.filoghost.holographicdisplays.nms.v1_9_R2;
import me.filoghost.holographicdisplays.common.Position;
import me.filoghost.holographicdisplays.common.PositionCoordinates;
import me.filoghost.holographicdisplays.nms.common.EntityID;
import me.filoghost.holographicdisplays.nms.common.IndividualNMSPacket;
import me.filoghost.holographicdisplays.nms.common.IndividualText;
@ -21,7 +21,7 @@ class VersionTextNMSPacketEntity implements TextNMSPacketEntity {
}
@Override
public void addSpawnPackets(NMSPacketList packetList, Position position, String text) {
public void addSpawnPackets(NMSPacketList packetList, PositionCoordinates position, String text) {
packetList.add(new EntitySpawnNMSPacket(armorStandID, EntityTypeID.ARMOR_STAND, position, ARMOR_STAND_Y_OFFSET));
packetList.add(EntityMetadataNMSPacket.builder(armorStandID)
.setArmorStandMarker()
@ -31,7 +31,7 @@ class VersionTextNMSPacketEntity implements TextNMSPacketEntity {
}
@Override
public void addSpawnPackets(NMSPacketList packetList, Position position, IndividualText individualText) {
public void addSpawnPackets(NMSPacketList packetList, PositionCoordinates position, IndividualText individualText) {
packetList.add(new EntitySpawnNMSPacket(armorStandID, EntityTypeID.ARMOR_STAND, position, ARMOR_STAND_Y_OFFSET));
packetList.add(new IndividualNMSPacket(player ->
EntityMetadataNMSPacket.builder(armorStandID)
@ -59,7 +59,7 @@ class VersionTextNMSPacketEntity implements TextNMSPacketEntity {
}
@Override
public void addTeleportPackets(NMSPacketList packetList, Position position) {
public void addTeleportPackets(NMSPacketList packetList, PositionCoordinates position) {
packetList.add(new EntityTeleportNMSPacket(armorStandID, position, ARMOR_STAND_Y_OFFSET));
}

View File

@ -8,7 +8,7 @@ package me.filoghost.holographicdisplays.plugin.api.current;
import me.filoghost.fcommons.Preconditions;
import me.filoghost.holographicdisplays.api.hologram.Hologram;
import me.filoghost.holographicdisplays.plugin.hologram.base.BaseHologram;
import me.filoghost.holographicdisplays.plugin.hologram.base.BaseHologramPosition;
import me.filoghost.holographicdisplays.plugin.hologram.base.ImmutablePosition;
import me.filoghost.holographicdisplays.plugin.hologram.tracking.LineTrackerManager;
import org.bukkit.entity.Player;
import org.bukkit.plugin.Plugin;
@ -24,7 +24,7 @@ public class APIHologram extends BaseHologram implements Hologram {
private boolean allowPlaceholders;
protected APIHologram(
BaseHologramPosition position,
ImmutablePosition position,
Plugin plugin,
APIHologramManager apiHologramManager,
LineTrackerManager lineTrackerManager) {

View File

@ -7,7 +7,7 @@ package me.filoghost.holographicdisplays.plugin.api.current;
import me.filoghost.holographicdisplays.api.hologram.Hologram;
import me.filoghost.holographicdisplays.plugin.hologram.base.BaseHologramManager;
import me.filoghost.holographicdisplays.plugin.hologram.base.BaseHologramPosition;
import me.filoghost.holographicdisplays.plugin.hologram.base.ImmutablePosition;
import me.filoghost.holographicdisplays.plugin.hologram.tracking.LineTrackerManager;
import org.bukkit.plugin.Plugin;
@ -24,7 +24,7 @@ public class APIHologramManager extends BaseHologramManager<APIHologram> {
this.lineTrackerManager = lineTrackerManager;
}
public APIHologram createHologram(BaseHologramPosition position, Plugin plugin) {
public APIHologram createHologram(ImmutablePosition position, Plugin plugin) {
APIHologram hologram = new APIHologram(position, plugin, this, lineTrackerManager);
super.addHologram(hologram);
return hologram;

View File

@ -8,9 +8,9 @@ package me.filoghost.holographicdisplays.plugin.api.current;
import me.filoghost.fcommons.Preconditions;
import me.filoghost.holographicdisplays.api.HolographicDisplaysAPI;
import me.filoghost.holographicdisplays.api.hologram.Hologram;
import me.filoghost.holographicdisplays.api.hologram.HologramPosition;
import me.filoghost.holographicdisplays.api.Position;
import me.filoghost.holographicdisplays.api.placeholder.PlaceholderReplacer;
import me.filoghost.holographicdisplays.plugin.hologram.base.BaseHologramPosition;
import me.filoghost.holographicdisplays.plugin.hologram.base.ImmutablePosition;
import me.filoghost.holographicdisplays.plugin.placeholder.registry.PlaceholderRegistry;
import org.bukkit.Location;
import org.bukkit.plugin.Plugin;
@ -36,16 +36,16 @@ class DefaultHolographicDisplaysAPI implements HolographicDisplaysAPI {
Preconditions.notNull(location.getWorld(), "location.getWorld()");
Preconditions.checkMainThread("async hologram creation");
return apiHologramManager.createHologram(new BaseHologramPosition(location), plugin);
return apiHologramManager.createHologram(new ImmutablePosition(location), plugin);
}
@Override
public @NotNull Hologram createHologram(@NotNull HologramPosition position) {
public @NotNull Hologram createHologram(@NotNull Position position) {
Preconditions.notNull(position, "position");
Preconditions.notNull(position.getWorldName(), "position world name");
Preconditions.checkMainThread("async hologram creation");
return apiHologramManager.createHologram(new BaseHologramPosition(position), plugin);
return apiHologramManager.createHologram(new ImmutablePosition(position), plugin);
}
@Override

View File

@ -7,9 +7,9 @@ package me.filoghost.holographicdisplays.plugin.api.current;
import me.filoghost.fcommons.Preconditions;
import me.filoghost.holographicdisplays.api.HolographicDisplaysAPI;
import me.filoghost.holographicdisplays.api.hologram.HologramPosition;
import me.filoghost.holographicdisplays.api.Position;
import me.filoghost.holographicdisplays.api.internal.HolographicDisplaysAPIProvider;
import me.filoghost.holographicdisplays.plugin.hologram.base.BaseHologramPosition;
import me.filoghost.holographicdisplays.plugin.hologram.base.ImmutablePosition;
import me.filoghost.holographicdisplays.plugin.placeholder.registry.PlaceholderRegistry;
import org.bukkit.Location;
import org.bukkit.World;
@ -41,19 +41,19 @@ public class DefaultHolographicDisplaysAPIProvider extends HolographicDisplaysAP
}
@Override
public HologramPosition createHologramPosition(World world, double x, double y, double z) {
public Position createPosition(World world, double x, double y, double z) {
Preconditions.notNull(world, "world");
return new BaseHologramPosition(world.getName(), x, y, z);
return new ImmutablePosition(world.getName(), x, y, z);
}
@Override
public HologramPosition createHologramPosition(String worldName, double x, double y, double z) {
return new BaseHologramPosition(worldName, x, y, z);
public Position createPosition(String worldName, double x, double y, double z) {
return new ImmutablePosition(worldName, x, y, z);
}
@Override
public HologramPosition createHologramPosition(Location location) {
return new BaseHologramPosition(location);
public Position createPosition(Location location) {
return new ImmutablePosition(location);
}
}

View File

@ -12,7 +12,7 @@ import com.gmail.filoghost.holographicdisplays.api.line.ItemLine;
import com.gmail.filoghost.holographicdisplays.api.line.TextLine;
import me.filoghost.holographicdisplays.plugin.hologram.base.BaseHologram;
import me.filoghost.holographicdisplays.plugin.hologram.base.BaseHologramLines;
import me.filoghost.holographicdisplays.plugin.hologram.base.BaseHologramPosition;
import me.filoghost.holographicdisplays.plugin.hologram.base.ImmutablePosition;
import me.filoghost.holographicdisplays.plugin.hologram.tracking.LineTrackerManager;
import org.bukkit.Location;
import org.bukkit.World;
@ -31,7 +31,7 @@ public class V2Hologram extends BaseHologram implements Hologram {
private boolean allowPlaceholders;
public V2Hologram(
BaseHologramPosition position,
ImmutablePosition position,
Plugin plugin,
LineTrackerManager lineTrackerManager,
V2HologramManager hologramManager) {

View File

@ -6,7 +6,7 @@
package me.filoghost.holographicdisplays.plugin.api.v2;
import me.filoghost.holographicdisplays.plugin.hologram.base.BaseHologramManager;
import me.filoghost.holographicdisplays.plugin.hologram.base.BaseHologramPosition;
import me.filoghost.holographicdisplays.plugin.hologram.base.ImmutablePosition;
import me.filoghost.holographicdisplays.plugin.hologram.tracking.LineTrackerManager;
import org.bukkit.plugin.Plugin;
@ -18,7 +18,7 @@ public class V2HologramManager extends BaseHologramManager<V2Hologram> {
this.lineTrackerManager = lineTrackerManager;
}
public V2Hologram createHologram(BaseHologramPosition position, Plugin plugin) {
public V2Hologram createHologram(ImmutablePosition position, Plugin plugin) {
V2Hologram hologram = new V2Hologram(position, plugin, lineTrackerManager, this);
super.addHologram(hologram);
return hologram;

View File

@ -9,7 +9,7 @@ import com.gmail.filoghost.holographicdisplays.api.Hologram;
import com.gmail.filoghost.holographicdisplays.api.internal.HologramsAPIProvider;
import com.gmail.filoghost.holographicdisplays.api.placeholder.PlaceholderReplacer;
import me.filoghost.fcommons.Preconditions;
import me.filoghost.holographicdisplays.plugin.hologram.base.BaseHologramPosition;
import me.filoghost.holographicdisplays.plugin.hologram.base.ImmutablePosition;
import me.filoghost.holographicdisplays.plugin.placeholder.registry.PlaceholderRegistry;
import org.bukkit.Location;
import org.bukkit.entity.Entity;
@ -38,7 +38,7 @@ public class V2HologramsAPIProvider extends HologramsAPIProvider {
Preconditions.notNull(source.getWorld(), "source.getWorld()");
Preconditions.checkMainThread("async hologram creation");
return hologramManager.createHologram(new BaseHologramPosition(source), plugin);
return hologramManager.createHologram(new ImmutablePosition(source), plugin);
}
@Override

View File

@ -13,7 +13,7 @@ import me.filoghost.holographicdisplays.plugin.config.HologramLineParser;
import me.filoghost.holographicdisplays.plugin.config.HologramLoadException;
import me.filoghost.holographicdisplays.plugin.event.InternalHologramChangeEvent;
import me.filoghost.holographicdisplays.plugin.event.InternalHologramChangeEvent.ChangeType;
import me.filoghost.holographicdisplays.plugin.hologram.base.BaseHologramPosition;
import me.filoghost.holographicdisplays.plugin.hologram.base.ImmutablePosition;
import me.filoghost.holographicdisplays.plugin.internal.hologram.InternalHologram;
import me.filoghost.holographicdisplays.plugin.internal.hologram.InternalHologramLine;
import me.filoghost.holographicdisplays.plugin.internal.hologram.InternalHologramManager;
@ -73,7 +73,7 @@ public class InternalHologramEditor {
return internalHologramManager.getHolograms();
}
public InternalHologram create(BaseHologramPosition spawnPosition, String hologramName) {
public InternalHologram create(ImmutablePosition spawnPosition, String hologramName) {
return internalHologramManager.createHologram(spawnPosition, hologramName);
}

View File

@ -12,7 +12,7 @@ import me.filoghost.holographicdisplays.plugin.commands.HologramSubCommand;
import me.filoghost.holographicdisplays.plugin.commands.InternalHologramEditor;
import me.filoghost.holographicdisplays.plugin.event.InternalHologramChangeEvent.ChangeType;
import me.filoghost.holographicdisplays.plugin.format.ColorScheme;
import me.filoghost.holographicdisplays.plugin.hologram.base.BaseHologramPosition;
import me.filoghost.holographicdisplays.plugin.hologram.base.ImmutablePosition;
import me.filoghost.holographicdisplays.plugin.internal.hologram.InternalHologram;
import org.bukkit.command.CommandSender;
@ -36,8 +36,8 @@ public class AlignCommand extends HologramSubCommand {
CommandValidate.check(hologram != referenceHologram, "The holograms must not be the same.");
BaseHologramPosition referencePosition = referenceHologram.getPosition();
BaseHologramPosition newPosition = hologram.getPosition();
ImmutablePosition referencePosition = referenceHologram.getPosition();
ImmutablePosition newPosition = hologram.getPosition();
String axis = args[0];
if (axis.equalsIgnoreCase("x")) {

View File

@ -13,7 +13,7 @@ import me.filoghost.holographicdisplays.plugin.commands.HologramSubCommand;
import me.filoghost.holographicdisplays.plugin.commands.InternalHologramEditor;
import me.filoghost.holographicdisplays.plugin.event.InternalHologramChangeEvent.ChangeType;
import me.filoghost.holographicdisplays.plugin.format.ColorScheme;
import me.filoghost.holographicdisplays.plugin.hologram.base.BaseHologramPosition;
import me.filoghost.holographicdisplays.plugin.hologram.base.ImmutablePosition;
import me.filoghost.holographicdisplays.plugin.internal.hologram.InternalHologram;
import me.filoghost.holographicdisplays.plugin.internal.hologram.InternalHologramLine;
import net.md_5.bungee.api.ChatColor;
@ -46,7 +46,7 @@ public class CreateCommand extends HologramSubCommand {
"The name must contain only alphanumeric characters, underscores and hyphens.");
CommandValidate.check(!hologramEditor.hologramExists(hologramName), "A hologram with that name already exists.");
BaseHologramPosition spawnPosition = new BaseHologramPosition(player.getLocation());
ImmutablePosition spawnPosition = new ImmutablePosition(player.getLocation());
boolean moveUp = player.isOnGround();
if (moveUp) {

View File

@ -11,7 +11,7 @@ import me.filoghost.fcommons.command.validation.CommandValidate;
import me.filoghost.holographicdisplays.plugin.commands.HologramSubCommand;
import me.filoghost.holographicdisplays.plugin.commands.InternalHologramEditor;
import me.filoghost.holographicdisplays.plugin.format.DisplayFormat;
import me.filoghost.holographicdisplays.plugin.hologram.base.BaseHologramPosition;
import me.filoghost.holographicdisplays.plugin.hologram.base.ImmutablePosition;
import me.filoghost.holographicdisplays.plugin.internal.hologram.InternalHologram;
import org.bukkit.World;
import org.bukkit.command.CommandSender;
@ -43,7 +43,7 @@ public class NearCommand extends HologramSubCommand {
List<InternalHologram> nearHolograms = new ArrayList<>();
for (InternalHologram hologram : hologramEditor.getHolograms()) {
BaseHologramPosition position = hologram.getPosition();
ImmutablePosition position = hologram.getPosition();
if (position.isInWorld(world) && position.distance(player.getLocation()) <= radius) {
nearHolograms.add(hologram);
}

View File

@ -7,7 +7,7 @@ package me.filoghost.holographicdisplays.plugin.config;
import me.filoghost.fcommons.config.ConfigSection;
import me.filoghost.fcommons.config.exception.ConfigValueException;
import me.filoghost.holographicdisplays.plugin.hologram.base.BaseHologramPosition;
import me.filoghost.holographicdisplays.plugin.hologram.base.ImmutablePosition;
import me.filoghost.holographicdisplays.plugin.internal.hologram.InternalHologram;
import me.filoghost.holographicdisplays.plugin.internal.hologram.InternalHologramLine;
import me.filoghost.holographicdisplays.plugin.internal.hologram.InternalHologramManager;
@ -34,7 +34,7 @@ public class HologramConfig {
serializedLines.add(line.getSerializedConfigValue());
}
BaseHologramPosition position = hologram.getPosition();
ImmutablePosition position = hologram.getPosition();
this.positionConfigSection = new ConfigSection();
positionConfigSection.setString("world", position.getWorldName());
positionConfigSection.setDouble("x", position.getX());
@ -57,7 +57,7 @@ public class HologramConfig {
throw new HologramLoadException("no position set");
}
BaseHologramPosition position = parsePosition();
ImmutablePosition position = parsePosition();
InternalHologram hologram = internalHologramManager.createHologram(position, name);
List<InternalHologramLine> lines = new ArrayList<>();
@ -73,13 +73,13 @@ public class HologramConfig {
hologram.lines().addAll(lines);
}
private BaseHologramPosition parsePosition() throws HologramLoadException {
private ImmutablePosition parsePosition() throws HologramLoadException {
try {
String worldName = positionConfigSection.getRequiredString("world");
double x = positionConfigSection.getRequiredDouble("x");
double y = positionConfigSection.getRequiredDouble("y");
double z = positionConfigSection.getRequiredDouble("z");
return new BaseHologramPosition(worldName, x, y, z);
return new ImmutablePosition(worldName, x, y, z);
} catch (ConfigValueException e) {
throw new HologramLoadException("invalid position attribute \"" + e.getConfigPath() + "\"", e);
}

View File

@ -8,7 +8,7 @@ package me.filoghost.holographicdisplays.plugin.format;
import me.filoghost.fcommons.Colors;
import me.filoghost.holographicdisplays.plugin.config.StaticReplacements;
import me.filoghost.holographicdisplays.plugin.hologram.base.BaseHologramPosition;
import me.filoghost.holographicdisplays.plugin.hologram.base.ImmutablePosition;
import me.filoghost.holographicdisplays.plugin.internal.hologram.InternalHologram;
import net.md_5.bungee.api.ChatColor;
import net.md_5.bungee.api.chat.ClickEvent;
@ -87,7 +87,7 @@ public class DisplayFormat {
}
public static void sendHologramSummary(CommandSender sender, InternalHologram hologram, boolean showWorld) {
BaseHologramPosition position = hologram.getPosition();
ImmutablePosition position = hologram.getPosition();
sender.sendMessage(ColorScheme.SECONDARY_DARK + "- " + ColorScheme.SECONDARY_BOLD + hologram.getName()
+ ColorScheme.SECONDARY_DARK + " (" + hologram.lines().size() + " lines) at "
+ (showWorld ? "world: \"" + position.getWorldName() + "\", " : "")

View File

@ -5,7 +5,7 @@
*/
package me.filoghost.holographicdisplays.plugin.hologram.base;
import me.filoghost.holographicdisplays.common.Position;
import me.filoghost.holographicdisplays.common.PositionCoordinates;
import org.bukkit.Location;
import org.bukkit.entity.Player;
@ -23,7 +23,7 @@ public abstract class BaseClickableHologramLine extends BaseHologramLine impleme
private boolean isInClickRange(Player player) {
Location playerLocation = player.getLocation();
Position position = this.getPosition();
PositionCoordinates position = this.getPosition();
double xDiff = playerLocation.getX() - position.getX();
double yDiff = playerLocation.getY() + 1.3 - position.getY(); // Use shoulder height

View File

@ -6,7 +6,7 @@
package me.filoghost.holographicdisplays.plugin.hologram.base;
import me.filoghost.fcommons.Preconditions;
import me.filoghost.holographicdisplays.api.hologram.HologramPosition;
import me.filoghost.holographicdisplays.api.Position;
import me.filoghost.holographicdisplays.plugin.hologram.tracking.LineTrackerManager;
import org.bukkit.Chunk;
import org.bukkit.Location;
@ -18,11 +18,11 @@ import org.jetbrains.annotations.Nullable;
public abstract class BaseHologram extends BaseHologramComponent {
private final WorldAwareHologramPosition position;
private final HologramPosition position;
private final LineTrackerManager lineTrackerManager;
public BaseHologram(BaseHologramPosition position, LineTrackerManager lineTrackerManager) {
this.position = new WorldAwareHologramPosition(position);
public BaseHologram(ImmutablePosition position, LineTrackerManager lineTrackerManager) {
this.position = new HologramPosition(position);
this.lineTrackerManager = lineTrackerManager;
}
@ -42,7 +42,7 @@ public abstract class BaseHologram extends BaseHologramComponent {
lines().setDeleted();
}
public @NotNull BaseHologramPosition getPosition() {
public @NotNull ImmutablePosition getPosition() {
return position.getPosition();
}
@ -50,7 +50,7 @@ public abstract class BaseHologram extends BaseHologramComponent {
return position.getWorldIfLoaded();
}
public void setPosition(@NotNull HologramPosition position) {
public void setPosition(@NotNull Position position) {
Preconditions.notNull(position, "position");
setPosition(position.getWorldName(), position.getX(), position.getY(), position.getZ());
}

View File

@ -6,7 +6,7 @@
package me.filoghost.holographicdisplays.plugin.hologram.base;
import me.filoghost.fcommons.Preconditions;
import me.filoghost.holographicdisplays.common.Position;
import me.filoghost.holographicdisplays.common.PositionCoordinates;
import me.filoghost.holographicdisplays.plugin.hologram.tracking.LineTracker;
import me.filoghost.holographicdisplays.plugin.hologram.tracking.LineTrackerManager;
import org.bukkit.GameMode;
@ -21,7 +21,7 @@ public abstract class BaseHologramLine extends BaseHologramComponent implements
private final BaseHologram hologram;
private final LineTracker<?> tracker;
private Position position;
private PositionCoordinates position;
protected BaseHologramLine(BaseHologram hologram) {
Preconditions.notNull(hologram, "hologram");
@ -41,11 +41,11 @@ public abstract class BaseHologramLine extends BaseHologramComponent implements
@Override
public final void setPosition(double x, double y, double z) {
position = new Position(x, y, z);
position = new PositionCoordinates(x, y, z);
setChanged();
}
public @NotNull Position getPosition() {
public @NotNull PositionCoordinates getPosition() {
if (position == null) {
throw new IllegalStateException("position not set");
}

View File

@ -5,7 +5,7 @@
*/
package me.filoghost.holographicdisplays.plugin.hologram.base;
import me.filoghost.holographicdisplays.api.hologram.HologramPosition;
import me.filoghost.holographicdisplays.api.Position;
import me.filoghost.holographicdisplays.plugin.config.Settings;
import org.jetbrains.annotations.NotNull;
@ -116,7 +116,7 @@ public class BaseHologramLines<T extends EditableHologramLine> implements Iterab
* The second line is below the first, and so on.
*/
public void updatePositions() {
HologramPosition hologramPosition = hologram.getPosition();
Position hologramPosition = hologram.getPosition();
double currentLineY = hologramPosition.getY();
for (int i = 0; i < lines.size(); i++) {

View File

@ -14,14 +14,14 @@ import org.bukkit.World;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
class WorldAwareHologramPosition {
class HologramPosition {
private @NotNull BaseHologramPosition position;
private @NotNull ImmutablePosition position;
private @Nullable World world;
private int chunkX, chunkZ;
private final CachedBoolean chunkLoaded;
WorldAwareHologramPosition(@NotNull BaseHologramPosition position) {
HologramPosition(@NotNull ImmutablePosition position) {
Preconditions.notNull(position, "position");
this.position = position;
this.world = Bukkit.getWorld(position.getWorldName());
@ -35,7 +35,7 @@ class WorldAwareHologramPosition {
int chunkX = getChunkCoordinate(x);
int chunkZ = getChunkCoordinate(z);
position = new BaseHologramPosition(worldName, x, y, z);
position = new ImmutablePosition(worldName, x, y, z);
if (worldChanged || this.chunkX != chunkX || this.chunkZ != chunkZ) {
if (worldChanged) {
@ -85,7 +85,7 @@ class WorldAwareHologramPosition {
return world;
}
@NotNull BaseHologramPosition getPosition() {
@NotNull ImmutablePosition getPosition() {
return position;
}

View File

@ -5,7 +5,7 @@
*/
package me.filoghost.holographicdisplays.plugin.hologram.tracking;
import me.filoghost.holographicdisplays.common.Position;
import me.filoghost.holographicdisplays.common.PositionCoordinates;
import me.filoghost.holographicdisplays.nms.common.NMSManager;
import me.filoghost.holographicdisplays.nms.common.NMSPacketList;
import me.filoghost.holographicdisplays.nms.common.entity.ClickableNMSPacketEntity;
@ -98,7 +98,7 @@ public abstract class ClickableLineTracker<T extends BaseClickableHologramLine>
}
}
private Position getClickableEntityPosition() {
private PositionCoordinates getClickableEntityPosition() {
return position.addY(positionOffsetY);
}

Some files were not shown because too many files have changed in this diff Show More