Class GlowingEyesComponent

java.lang.Object
me.andreasmelone.glowingeyes.common.component.eyes.GlowingEyesComponent

public class GlowingEyesComponent extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final net.minecraft.resources.ResourceLocation
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static Map<Point,Color>
    getGlowingEyesMap(net.minecraft.world.entity.player.Player player)
    Gets the glowing eyes map from a player
     
    static boolean
    isToggledOn(net.minecraft.world.entity.player.Player player)
    Gets whether the glowing eyes are toggled on for a player
    static void
    sendUpdate(net.minecraft.server.level.ServerPlayer updatedPlayer)
    Server-side-only method to send the updated component to the client
    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
    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
    static void
     
    static void
    setToggledOn(net.minecraft.world.entity.player.Player player, boolean toggledOn)
    Sets whether the glowing eyes are toggled on for a player

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • IDENTIFIER

      public static final net.minecraft.resources.ResourceLocation IDENTIFIER
  • Constructor Details

    • GlowingEyesComponent

      public GlowingEyesComponent()
  • Method Details

    • getGlowingEyesMap

      public static Map<Point,Color> getGlowingEyesMap(net.minecraft.world.entity.player.Player player)
      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 for
      glowingEyesMap - 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 for
      toggledOn - 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 updated
      receivingPlayer - another player who will receive the update
    • setImplementation

      public static void setImplementation(IGlowingEyesComponent implementation)
    • getImplementation

      public static IGlowingEyesComponent getImplementation()