DynamicLight class

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

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

implements: Component<EntityStore>

Поля (2)

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

Методы (4)

МодификаторыВозвратСигнатура
public boolean consumeNetworkOutdatedboolean consumeNetworkOutdated()
public ColorLight getColorLightColorLight getColorLight()
static ComponentType<EntityStore, DynamicLight> getComponentTypeComponentType<EntityStore, DynamicLight> getComponentType()
public void setColorLightvoid setColorLight(ColorLight 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.ColorLight;
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 DynamicLight class="kw">implements Component<EntityStore> {
   class="kw">private ColorLight colorLight = new ColorLight();
   class="kw">private boolean isNetworkOutdated = true;

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

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

   class="kw">public DynamicLight(ColorLight var1) {
      this.colorLight = var1;
   }

   class="kw">public ColorLight getColorLight() {
      class="kw">return this.colorLight;
   }

   class="kw">public void setColorLight(ColorLight var1) {
      this.colorLight = 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 DynamicLight(new ColorLight(this.colorLight));
   }
}