HyCodeYourTale
classpublicPriority 3

CapturedNPCMetadata

com.hypixel.hytale.server.npc.metadata.CapturedNPCMetadata

8

Methods

8

Public Methods

4

Fields

1

Constructors

Constants

BuilderCodec<CapturedNPCMetadata>CODEC= BuilderCodec.builder(CapturedNPCMetadata.class, CapturedNPCMetadata::new) .appendInherited(...
StringKEY= "CapturedEntity"
KeyedCodec<CapturedNPCMetadata>KEYED_CODEC= new KeyedCodec<>("CapturedEntity", CODEC)

Constructors

public
CapturedNPCMetadata()

Methods

Public Methods (8)

public
String getFullItemIcon()
public
String getIconPath()
public
String getNpcNameKey()
public
int getRoleIndex()
public
void setFullItemIcon(String fullItemIcon)
public
void setIconPath(String iconPath)
public
void setNpcNameKey(String npcNameKey)
public
void setRoleIndex(int roleIndex)

Fields

Private/Package Fields (4)

privateString fullItemIcon
privateString iconPath
privateString npcNameKey
privateint roleIndex

Related Classes

Source Code

package com.hypixel.hytale.server.npc.metadata;

import com.hypixel.hytale.codec.Codec;
import com.hypixel.hytale.codec.KeyedCodec;
import com.hypixel.hytale.codec.builder.BuilderCodec;

public class CapturedNPCMetadata {
   public static final String KEY = "CapturedEntity";
   public static final BuilderCodec<CapturedNPCMetadata> CODEC = BuilderCodec.builder(CapturedNPCMetadata.class, CapturedNPCMetadata::new)
      .appendInherited(
         new KeyedCodec<>("IconPath", Codec.STRING), (meta, s) -> meta.iconPath = s, meta -> meta.iconPath, (meta, parent) -> meta.iconPath = parent.iconPath
      )
      .add()
      .appendInherited(
         new KeyedCodec<>("RoleIndex", Codec.INTEGER),
         (meta, s) -> meta.roleIndex = s,
         meta -> meta.roleIndex,
         (meta, parent) -> meta.roleIndex = parent.roleIndex
      )
      .add()
      .appendInherited(
         new KeyedCodec<>("NpcNameKey", Codec.STRING),
         (meta, s) -> meta.npcNameKey = s,
         meta -> meta.npcNameKey,
         (meta, parent) -> meta.npcNameKey = parent.npcNameKey
      )
      .add()
      .appendInherited(
         new KeyedCodec<>("FullItemIcon", Codec.STRING),
         (meta, s) -> meta.fullItemIcon = s,
         meta -> meta.fullItemIcon,
         (meta, parent) -> meta.fullItemIcon = parent.fullItemIcon
      )
      .add()
      .build();
   public static final KeyedCodec<CapturedNPCMetadata> KEYED_CODEC = new KeyedCodec<>("CapturedEntity", CODEC);
   private String iconPath;
   private int roleIndex;
   private String npcNameKey;
   private String fullItemIcon;

   public CapturedNPCMetadata() {
   }

   public int getRoleIndex() {
      return this.roleIndex;
   }

   public String getIconPath() {
      return this.iconPath;
   }

   public String getNpcNameKey() {
      return this.npcNameKey;
   }

   public String getFullItemIcon() {
      return this.fullItemIcon;
   }

   public void setIconPath(String iconPath) {
      this.iconPath = iconPath;
   }

   public void setRoleIndex(int roleIndex) {
      this.roleIndex = roleIndex;
   }

   public void setNpcNameKey(String npcNameKey) {
      this.npcNameKey = npcNameKey;
   }

   public void setFullItemIcon(String fullItemIcon) {
      this.fullItemIcon = fullItemIcon;
   }
}