Class ColorComponent
java.lang.Object
me.emafire003.dev.coloredglowlib.component.ColorComponent
- All Implemented Interfaces:
dev.onyxstudios.cca.api.v3.component.Component,dev.onyxstudios.cca.api.v3.component.ComponentV3,dev.onyxstudios.cca.api.v3.component.sync.AutoSyncedComponent,dev.onyxstudios.cca.api.v3.component.sync.ComponentPacketWriter,dev.onyxstudios.cca.api.v3.component.sync.PlayerSyncPredicate
public class ColorComponent
extends Object
implements dev.onyxstudios.cca.api.v3.component.ComponentV3, dev.onyxstudios.cca.api.v3.component.sync.AutoSyncedComponent
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringstatic final dev.onyxstudios.cca.api.v3.component.ComponentKey<ColorComponent> protected net.minecraft.nbt.NbtCompound -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddExclusiveColorFor(UUID uuid, String color) voidclear()voidclearExclusiveColorFor(UUID uuid) getColor()getExclusiveColorFor(UUID uuid) voidreadFromNbt(net.minecraft.nbt.NbtCompound tag) voidvoidsetExclusiveColorFor(UUID uuid, String color) WARNING!voidwriteToNbt(net.minecraft.nbt.NbtCompound tag) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.onyxstudios.cca.api.v3.component.sync.AutoSyncedComponent
applySyncPacket, shouldSyncWith, writeSyncPacketMethods inherited from interface dev.onyxstudios.cca.api.v3.component.Component
equals
-
Field Details
-
COLOR_COMPONENT
public static final dev.onyxstudios.cca.api.v3.component.ComponentKey<ColorComponent> COLOR_COMPONENT -
color
-
exclusiveTargetColorMap
protected net.minecraft.nbt.NbtCompound exclusiveTargetColorMap
-
-
Constructor Details
-
ColorComponent
public ColorComponent(net.minecraft.entity.Entity entity)
-
-
Method Details
-
readFromNbt
public void readFromNbt(net.minecraft.nbt.NbtCompound tag) - Specified by:
readFromNbtin interfacedev.onyxstudios.cca.api.v3.component.Component
-
writeToNbt
public void writeToNbt(net.minecraft.nbt.NbtCompound tag) - Specified by:
writeToNbtin interfacedev.onyxstudios.cca.api.v3.component.Component
-
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"
-
getExclusiveTargetColorMap
-
addExclusiveColorFor
- Parameters:
uuid- The uuid of the player that will see the specific colorcolor- A hex color or "rainbow"
-
setExclusiveColorFor
WARNING! THIS CANNOT BE USED TO CLEAR A TYPE! USE clearExclusiveColor INSTEAD!- Parameters:
uuid- The uuid of the player that will see the specific colorcolor- A hex color or "rainbow"
-
clearExclusiveColorFor
-
getExclusiveColorFor
-
clear
public void clear()
-