forked from BLOCKFANTASY/LOOHP-Limbo
Use Adventure Key replacing NamespacedKey
This commit is contained in:
@@ -19,8 +19,6 @@
|
||||
|
||||
package com.loohp.limbo.entity;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import com.loohp.limbo.Limbo;
|
||||
import com.loohp.limbo.entity.DataWatcher.WatchableField;
|
||||
import com.loohp.limbo.entity.DataWatcher.WatchableObjectType;
|
||||
@@ -28,6 +26,8 @@ import com.loohp.limbo.location.Location;
|
||||
import com.loohp.limbo.utils.Rotation3f;
|
||||
import com.loohp.limbo.world.World;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
public class ArmorStand extends LivingEntity {
|
||||
|
||||
@WatchableField(MetadataIndex = 15, WatchableObjectType = WatchableObjectType.BYTE, IsBitmask = true, Bitmask = 0x01)
|
||||
|
||||
@@ -19,20 +19,19 @@
|
||||
|
||||
package com.loohp.limbo.entity;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import com.loohp.limbo.Limbo;
|
||||
import com.loohp.limbo.entity.DataWatcher.WatchableField;
|
||||
import com.loohp.limbo.entity.DataWatcher.WatchableObjectType;
|
||||
import com.loohp.limbo.location.Location;
|
||||
import com.loohp.limbo.utils.BungeecordAdventureConversionUtils;
|
||||
import com.loohp.limbo.world.World;
|
||||
|
||||
import net.kyori.adventure.sound.Sound;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer;
|
||||
import net.md_5.bungee.api.chat.BaseComponent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
public abstract class Entity implements Sound.Emitter {
|
||||
|
||||
@WatchableField(MetadataIndex = 0, WatchableObjectType = WatchableObjectType.BYTE, IsBitmask = true, Bitmask = 0x01)
|
||||
|
||||
@@ -19,13 +19,13 @@
|
||||
|
||||
package com.loohp.limbo.entity;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import com.loohp.limbo.location.Location;
|
||||
import com.loohp.limbo.player.Player;
|
||||
import com.loohp.limbo.utils.NamespacedKey;
|
||||
import com.loohp.limbo.world.World;
|
||||
import net.kyori.adventure.key.Key;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public enum EntityType {
|
||||
|
||||
@@ -294,7 +294,7 @@ public enum EntityType {
|
||||
private final short typeId;
|
||||
private final boolean independent;
|
||||
private final boolean living;
|
||||
private final NamespacedKey key;
|
||||
private final Key key;
|
||||
|
||||
private static final Map<String, EntityType> NAME_MAP = new HashMap<>();
|
||||
private static final Map<Short, EntityType> ID_MAP = new HashMap<>();
|
||||
@@ -337,7 +337,7 @@ public enum EntityType {
|
||||
this.typeId = (short) typeId;
|
||||
this.independent = independent;
|
||||
this.living = clazz != null && LivingEntity.class.isAssignableFrom(clazz);
|
||||
this.key = (name == null) ? null : NamespacedKey.minecraft(name);
|
||||
this.key = (name == null) ? null : Key.key(Key.MINECRAFT_NAMESPACE, name);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -351,7 +351,7 @@ public enum EntityType {
|
||||
return name;
|
||||
}
|
||||
|
||||
public NamespacedKey getKey() {
|
||||
public Key getKey() {
|
||||
return key;
|
||||
}
|
||||
|
||||
|
||||
@@ -19,8 +19,6 @@
|
||||
|
||||
package com.loohp.limbo.entity;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import com.loohp.limbo.Limbo;
|
||||
import com.loohp.limbo.entity.DataWatcher.WatchableField;
|
||||
import com.loohp.limbo.entity.DataWatcher.WatchableObjectType;
|
||||
@@ -29,6 +27,8 @@ import com.loohp.limbo.location.Location;
|
||||
import com.loohp.limbo.world.BlockPosition;
|
||||
import com.loohp.limbo.world.World;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
public abstract class LivingEntity extends Entity {
|
||||
|
||||
@WatchableField(MetadataIndex = 8, WatchableObjectType = WatchableObjectType.BYTE, IsBitmask = true, Bitmask = 0x01)
|
||||
|
||||
Reference in New Issue
Block a user