Class GlowingEyesComponent
java.lang.Object
me.andreasmelone.glowingeyes.common.component.eyes.GlowingEyesComponent
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.minecraft.resources.ResourceLocation -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetGlowingEyesMap(net.minecraft.world.entity.player.Player player) Gets the glowing eyes map from a playerstatic IGlowingEyesComponentstatic booleanisToggledOn(net.minecraft.world.entity.player.Player player) Gets whether the glowing eyes are toggled on for a playerstatic voidsendUpdate(net.minecraft.server.level.ServerPlayer updatedPlayer) Server-side-only method to send the updated component to the clientstatic voidsendUpdate(net.minecraft.server.level.ServerPlayer updatedPlayer, net.minecraft.server.level.ServerPlayer receivingPlayer) Server-side-only method to send the updated component to the clientstatic voidsetGlowingEyesMap(net.minecraft.world.entity.player.Player player, Map<Point, Color> glowingEyesMap) Sets the glowing eyes map (should only be using when completely overwriting the map) Otherwise, get the glowing eyes map and modify itstatic voidsetImplementation(IGlowingEyesComponent implementation) static voidsetToggledOn(net.minecraft.world.entity.player.Player player, boolean toggledOn) Sets whether the glowing eyes are toggled on for a player
-
Field Details
-
IDENTIFIER
public static final net.minecraft.resources.ResourceLocation IDENTIFIER
-
-
Constructor Details
-
GlowingEyesComponent
public GlowingEyesComponent()
-
-
Method Details
-
getGlowingEyesMap
Gets the glowing eyes map from a player- Parameters:
player- the player to get the glowing eyes map from- Returns:
- the glowing eyes map (Point, Color)
-
setGlowingEyesMap
public static void setGlowingEyesMap(net.minecraft.world.entity.player.Player player, Map<Point, Color> glowingEyesMap) Sets the glowing eyes map (should only be using when completely overwriting the map) Otherwise, get the glowing eyes map and modify it- Parameters:
player- the player to set the glowing eyes map forglowingEyesMap- the glowing eyes map to set
-
isToggledOn
public static boolean isToggledOn(net.minecraft.world.entity.player.Player player) Gets whether the glowing eyes are toggled on for a player- Parameters:
player- the player to get the toggled on status for- Returns:
- whether the glowing eyes are toggled on
-
setToggledOn
public static void setToggledOn(net.minecraft.world.entity.player.Player player, boolean toggledOn) Sets whether the glowing eyes are toggled on for a player- Parameters:
player- the player to set the toggled on status fortoggledOn- whether the glowing eyes are toggled on
-
sendUpdate
public static void sendUpdate(net.minecraft.server.level.ServerPlayer updatedPlayer) Server-side-only method to send the updated component to the client- Parameters:
updatedPlayer- the player who has been updated (will receive the update if no second player is specified)
-
sendUpdate
public static void sendUpdate(net.minecraft.server.level.ServerPlayer updatedPlayer, net.minecraft.server.level.ServerPlayer receivingPlayer) Server-side-only method to send the updated component to the client- Parameters:
updatedPlayer- the player who has been updatedreceivingPlayer- another player who will receive the update
-
setImplementation
-
getImplementation
-