Class ColorComponent
java.lang.Object
me.emafire003.dev.coloredglowlib.component.ColorComponent
- All Implemented Interfaces:
org.ladysnake.cca.api.v3.component.Component,org.ladysnake.cca.api.v3.component.ComponentV3,org.ladysnake.cca.api.v3.component.sync.AutoSyncedComponent,org.ladysnake.cca.api.v3.component.sync.ComponentPacketWriter,org.ladysnake.cca.api.v3.component.sync.PlayerSyncPredicate
public class ColorComponent
extends Object
implements org.ladysnake.cca.api.v3.component.ComponentV3, org.ladysnake.cca.api.v3.component.sync.AutoSyncedComponent
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringstatic final org.ladysnake.cca.api.v3.component.ComponentKey<ColorComponent> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()getColor()voidreadFromNbt(net.minecraft.nbt.NbtCompound tag, net.minecraft.registry.RegistryWrapper.WrapperLookup registryLookup) voidvoidwriteToNbt(net.minecraft.nbt.NbtCompound tag, net.minecraft.registry.RegistryWrapper.WrapperLookup registryLookup) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.ladysnake.cca.api.v3.component.sync.AutoSyncedComponent
applySyncPacket, shouldSyncWith, writeSyncPacketMethods inherited from interface org.ladysnake.cca.api.v3.component.Component
equalsMethods inherited from interface org.ladysnake.cca.api.v3.component.sync.PlayerSyncPredicate
isRequiredOnClient
-
Field Details
-
COLOR_COMPONENT
-
color
-
-
Constructor Details
-
ColorComponent
public ColorComponent(net.minecraft.entity.Entity entity)
-
-
Method Details
-
getColor
- Returns:
- A hex color or "rainbow". If no color has been set, returns the default white one
-
setColor
- Parameters:
color- A hex color or "rainbow"
-
clear
public void clear() -
readFromNbt
public void readFromNbt(net.minecraft.nbt.NbtCompound tag, net.minecraft.registry.RegistryWrapper.WrapperLookup registryLookup) - Specified by:
readFromNbtin interfaceorg.ladysnake.cca.api.v3.component.Component
-
writeToNbt
public void writeToNbt(net.minecraft.nbt.NbtCompound tag, net.minecraft.registry.RegistryWrapper.WrapperLookup registryLookup) - Specified by:
writeToNbtin interfaceorg.ladysnake.cca.api.v3.component.Component
-