NPCMountComponent class

Пакет: com.hypixel.hytale.builtin.mounts

Файл: com/hypixel/hytale/builtin/mounts/NPCMountComponent.java

implements: Component<EntityStore>

Поля (2)

МодификаторыТипИмя
final BuilderCodec<NPCMountComponent> CODEC
NPCMountComponent var1

Методы (8)

МодификаторыВозвратСигнатура
public float getAnchorXfloat getAnchorX()
public float getAnchorYfloat getAnchorY()
public float getAnchorZfloat getAnchorZ()
static ComponentType<EntityStore, NPCMountComponent> getComponentTypeComponentType<EntityStore, NPCMountComponent> getComponentType()
public int getOriginalRoleIndexint getOriginalRoleIndex()
public void setAnchorvoid setAnchor(float var1, float var2, float var3)
public void setOriginalRoleIndexvoid setOriginalRoleIndex(int var1)
public void setOwnerPlayerRefvoid setOwnerPlayerRef(PlayerRef var1)

Исходный код

Показать/скрыть
class="kw">package com.hypixel.hytale.builtin.mounts;

class="kw">import com.hypixel.hytale.codec.Codec;
class="kw">import com.hypixel.hytale.codec.KeyedCodec;
class="kw">import com.hypixel.hytale.codec.builder.BuilderCodec;
class="kw">import com.hypixel.hytale.component.Component;
class="kw">import com.hypixel.hytale.component.ComponentType;
class="kw">import com.hypixel.hytale.server.core.universe.PlayerRef;
class="kw">import com.hypixel.hytale.server.core.universe.world.storage.EntityStore;
class="kw">import javax.annotation.Nonnull;
class="kw">import javax.annotation.Nullable;

class="kw">public class NPCMountComponent class="kw">implements Component<EntityStore> {
   class="kw">public class="kw">static class="kw">final BuilderCodec<NPCMountComponent> CODEC = BuilderCodec.builder(NPCMountComponent.class, NPCMountComponent::new)
      .append(new KeyedCodec<>("OriginalRoleIndex", Codec.INTEGER), (var0, var1) -> var0.originalRoleIndex = var1, var0 -> var0.originalRoleIndex)
      .add()
      .build();
   class="kw">private int originalRoleIndex;
   @Nullable
   class="kw">private PlayerRef ownerPlayerRef;
   class="kw">private float anchorX;
   class="kw">private float anchorY;
   class="kw">private float anchorZ;

   class="kw">public NPCMountComponent() {
   }

   class="kw">public class="kw">static ComponentType<EntityStore, NPCMountComponent> getComponentType() {
      class="kw">return MountPlugin.getInstance().getMountComponentType();
   }

   class="kw">public int getOriginalRoleIndex() {
      class="kw">return this.originalRoleIndex;
   }

   class="kw">public void setOriginalRoleIndex(int var1) {
      this.originalRoleIndex = var1;
   }

   @Nullable
   class="kw">public PlayerRef getOwnerPlayerRef() {
      class="kw">return this.ownerPlayerRef;
   }

   class="kw">public void setOwnerPlayerRef(PlayerRef var1) {
      this.ownerPlayerRef = var1;
   }

   class="kw">public float getAnchorX() {
      class="kw">return this.anchorX;
   }

   class="kw">public float getAnchorY() {
      class="kw">return this.anchorY;
   }

   class="kw">public float getAnchorZ() {
      class="kw">return this.anchorZ;
   }

   class="kw">public void setAnchor(float var1, float var2, float var3) {
      this.anchorX = var1;
      this.anchorY = var2;
      this.anchorZ = var3;
   }

   @Nonnull
   @Override
   class="kw">public Component<EntityStore> clone() {
      NPCMountComponent var1 = new NPCMountComponent();
      var1.originalRoleIndex = this.originalRoleIndex;
      var1.ownerPlayerRef = this.ownerPlayerRef;
      var1.anchorX = this.anchorX;
      var1.anchorY = this.anchorY;
      var1.anchorZ = this.anchorZ;
      class="kw">return var1;
   }
}