CoopResidentComponent class
Пакет: com.hypixel.hytale.builtin.adventure.farming.component
Файл: com/hypixel/hytale/builtin/adventure/farming/component/CoopResidentComponent.java
implements: Component<EntityStore>
Поля (1)
| Модификаторы | Тип | Имя |
|---|---|---|
|
CoopResidentComponent |
var1 |
Методы (4)
| Модификаторы | Возврат | Сигнатура |
|---|---|---|
static |
ComponentType<EntityStore, CoopResidentComponent> |
getComponentTypeComponentType<EntityStore, CoopResidentComponent> getComponentType() |
public |
boolean |
getMarkedForDespawnboolean getMarkedForDespawn() |
public |
void |
setCoopLocationvoid setCoopLocation(@Nonnull Vector3i var1) |
public |
void |
setMarkedForDespawnvoid setMarkedForDespawn(boolean var1) |
Исходный код
Показать/скрыть
class="kw">package com.hypixel.hytale.builtin.adventure.farming.component;
class="kw">import com.hypixel.hytale.builtin.adventure.farming.FarmingPlugin;
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.math.vector.Vector3iUtil;
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">import org.joml.Vector3i;
class="kw">public class CoopResidentComponent class="kw">implements Component<EntityStore> {
@Nonnull
class="kw">public class="kw">static class="kw">final BuilderCodec<CoopResidentComponent> CODEC = BuilderCodec.builder(CoopResidentComponent.class, CoopResidentComponent::new)
.append(new KeyedCodec<>("CoopLocation", Vector3iUtil.CODEC), (var0, var1) -> var0.coopLocation = var1, var0 -> var0.coopLocation)
.add()
.append(new KeyedCodec<>("MarkedForDespawn", BuilderCodec.BOOLEAN), (var0, var1) -> var0.markedForDespawn = var1, var0 -> var0.markedForDespawn)
.add()
.build();
@Nonnull
class="kw">private Vector3i coopLocation = new Vector3i();
class="kw">private boolean markedForDespawn;
class="kw">public CoopResidentComponent() {
}
class="kw">public class="kw">static ComponentType<EntityStore, CoopResidentComponent> getComponentType() {
class="kw">return FarmingPlugin.get().getCoopResidentComponentType();
}
class="kw">public void setCoopLocation(@Nonnull Vector3i var1) {
this.coopLocation = var1;
}
@Nonnull
class="kw">public Vector3i getCoopLocation() {
class="kw">return this.coopLocation;
}
class="kw">public void setMarkedForDespawn(boolean var1) {
this.markedForDespawn = var1;
}
class="kw">public boolean getMarkedForDespawn() {
class="kw">return this.markedForDespawn;
}
@Nullable
@Override
class="kw">public Component<EntityStore> clone() {
CoopResidentComponent var1 = new CoopResidentComponent();
var1.coopLocation.set(this.coopLocation);
var1.markedForDespawn = this.markedForDespawn;
class="kw">return var1;
}
}