PrefabPreview class

Пакет: com.hypixel.hytale.server.core.modules.entity.component

Файл: com/hypixel/hytale/server/core/modules/entity/component/PrefabPreview.java

implements: Component<EntityStore>

Поля (1)

МодификаторыТипИмя
boolean var1

Методы (6)

МодификаторыВозвратСигнатура
public boolean consumeNetworkOutdatedboolean consumeNetworkOutdated()
public int getBiomeTintint getBiomeTint()
static ComponentType<EntityStore, PrefabPreview> getComponentTypeComponentType<EntityStore, PrefabPreview> getComponentType()
public int getVisibleLayerCountint getVisibleLayerCount()
public int getWaterTintint getWaterTint()
public void setVisibleLayerCountvoid setVisibleLayerCount(int var1)

Исходный код

Показать/скрыть
class="kw">package com.hypixel.hytale.server.core.modules.entity.component;

class="kw">import com.hypixel.hytale.component.Component;
class="kw">import com.hypixel.hytale.component.ComponentType;
class="kw">import com.hypixel.hytale.protocol.packets.interface_.BlockChange;
class="kw">import com.hypixel.hytale.protocol.packets.interface_.FluidChange;
class="kw">import com.hypixel.hytale.server.core.modules.entity.EntityModule;
class="kw">import com.hypixel.hytale.server.core.universe.world.storage.EntityStore;
class="kw">import javax.annotation.Nonnull;

class="kw">public class PrefabPreview class="kw">implements Component<EntityStore> {
   @Nonnull
   class="kw">private class="kw">final BlockChange[] blocks;
   @Nonnull
   class="kw">private class="kw">final FluidChange[] fluids;
   class="kw">private class="kw">final int biomeTint;
   class="kw">private class="kw">final int waterTint;
   class="kw">private int visibleLayerCount;
   class="kw">private boolean isNetworkOutdated = true;

   class="kw">public class="kw">static ComponentType<EntityStore, PrefabPreview> getComponentType() {
      class="kw">return EntityModule.get().getPrefabPreviewComponentType();
   }

   class="kw">public PrefabPreview() {
      this.blocks = new BlockChange[0];
      this.fluids = new FluidChange[0];
      this.biomeTint = 0;
      this.waterTint = 0;
   }

   class="kw">public PrefabPreview(@Nonnull BlockChange[] var1, @Nonnull FluidChange[] var2, int var3, int var4, int var5) {
      this.blocks = var1;
      this.fluids = var2;
      this.visibleLayerCount = var3;
      this.biomeTint = var4;
      this.waterTint = var5;
   }

   @Nonnull
   class="kw">public BlockChange[] getBlocks() {
      class="kw">return this.blocks;
   }

   @Nonnull
   class="kw">public FluidChange[] getFluids() {
      class="kw">return this.fluids;
   }

   class="kw">public int getBiomeTint() {
      class="kw">return this.biomeTint;
   }

   class="kw">public int getWaterTint() {
      class="kw">return this.waterTint;
   }

   class="kw">public int getVisibleLayerCount() {
      class="kw">return this.visibleLayerCount;
   }

   class="kw">public void setVisibleLayerCount(int var1) {
      this.visibleLayerCount = var1;
      this.isNetworkOutdated = true;
   }

   class="kw">public boolean consumeNetworkOutdated() {
      boolean var1 = this.isNetworkOutdated;
      this.isNetworkOutdated = false;
      class="kw">return var1;
   }

   @Nonnull
   @Override
   class="kw">public Component<EntityStore> clone() {
      class="kw">return new PrefabPreview(this.blocks, this.fluids, this.visibleLayerCount, this.biomeTint, this.waterTint);
   }
}