Contents
Class PrefabPreview
java.lang.Object
com.hypixel.hytale.server.core.modules.entity.component.PrefabPreview
- All Implemented Interfaces:
Component<EntityStore>, Cloneable
Runtime, network-synced counterpart of
PersistentPrefabPreview. Holds the prefab resolved to
a flat block list plus the current visible-layer count. The blocks are immutable once resolved, so a
viewer receives them once when it first sees the entity. A visible-layer change re-sends only the count,
and the client re-meshes from its cached blocks.-
Field Summary
Fields inherited from interface Component
EMPTY_ARRAY -
Constructor Summary
ConstructorsConstructorDescriptionPrefabPreview(BlockChange[] blocks, FluidChange[] fluids, int visibleLayerCount, int biomeTint, int waterTint) -
Method Summary
Modifier and TypeMethodDescriptionclone()booleanintstatic ComponentType<EntityStore, PrefabPreview> intintvoidsetVisibleLayerCount(int visibleLayerCount) Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Component
cloneSerializable
-
Constructor Details
-
PrefabPreview
public PrefabPreview() -
PrefabPreview
public PrefabPreview(@Nonnull BlockChange[] blocks, @Nonnull FluidChange[] fluids, int visibleLayerCount, int biomeTint, int waterTint)
-
-
Method Details
-
getComponentType
-
getBlocks
-
getFluids
-
getBiomeTint
public int getBiomeTint() -
getWaterTint
public int getWaterTint() -
getVisibleLayerCount
public int getVisibleLayerCount() -
setVisibleLayerCount
public void setVisibleLayerCount(int visibleLayerCount) -
consumeNetworkOutdated
public boolean consumeNetworkOutdated() -
clone
- Specified by:
clonein interfaceComponent<EntityStore>- Returns:
- a clone instance of the original component instance.
-