Class GlowingEyesComponentImpl

java.lang.Object
me.andreasmelone.glowingeyes.forge.common.component.eyes.GlowingEyesComponentImpl
All Implemented Interfaces:
IGlowingEyesComponent

public class GlowingEyesComponentImpl extends Object implements IGlowingEyesComponent
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected static final net.minecraftforge.common.capabilities.Capability<IGlowingEyes>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    getComponent(net.minecraft.world.entity.player.Player player)
    Get the GlowingEyes capability from a player
    getGlowingEyesMap(net.minecraft.world.entity.player.Player player)
    Gets the glowing eyes map from a player
    boolean
    isToggledOn(net.minecraft.world.entity.player.Player player)
    Gets whether the glowing eyes are toggled on for a player
    static void
    register(net.minecraftforge.common.capabilities.RegisterCapabilitiesEvent event)
     
    void
    sendUpdate(net.minecraft.server.level.ServerPlayer updatedPlayer)
    Server-side-only method to send the updated component to the client
    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
    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
    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

    • INSTANCE

      protected static final net.minecraftforge.common.capabilities.Capability<IGlowingEyes> INSTANCE
  • Constructor Details

    • GlowingEyesComponentImpl

      public GlowingEyesComponentImpl()
  • Method Details

    • register

      public static void register(net.minecraftforge.common.capabilities.RegisterCapabilitiesEvent event)
    • getComponent

      public IGlowingEyes getComponent(net.minecraft.world.entity.player.Player player)
      Get the GlowingEyes capability from a player
      Parameters:
      player - the player to get the capability from
      Returns:
      the GlowingEyes capability
    • getGlowingEyesMap

      public Map<Point,Color> getGlowingEyesMap(net.minecraft.world.entity.player.Player player)
      Description copied from interface: IGlowingEyesComponent
      Gets the glowing eyes map from a player
      Specified by:
      getGlowingEyesMap in interface IGlowingEyesComponent
      Parameters:
      player - the player to get the glowing eyes map from
      Returns:
      the glowing eyes map (Point, Color)
    • setGlowingEyesMap

      public void setGlowingEyesMap(net.minecraft.world.entity.player.Player player, Map<Point,Color> glowingEyesMap)
      Description copied from interface: IGlowingEyesComponent
      Sets the glowing eyes map (should only be using when completely overwriting the map) Otherwise, get the glowing eyes map and modify it
      Specified by:
      setGlowingEyesMap in interface IGlowingEyesComponent
      Parameters:
      player - the player to set the glowing eyes map for
      glowingEyesMap - the glowing eyes map to set
    • isToggledOn

      public boolean isToggledOn(net.minecraft.world.entity.player.Player player)
      Description copied from interface: IGlowingEyesComponent
      Gets whether the glowing eyes are toggled on for a player
      Specified by:
      isToggledOn in interface IGlowingEyesComponent
      Parameters:
      player - the player to get the toggled on status for
      Returns:
      whether the glowing eyes are toggled on
    • setToggledOn

      public void setToggledOn(net.minecraft.world.entity.player.Player player, boolean toggledOn)
      Description copied from interface: IGlowingEyesComponent
      Sets whether the glowing eyes are toggled on for a player
      Specified by:
      setToggledOn in interface IGlowingEyesComponent
      Parameters:
      player - the player to set the toggled on status for
      toggledOn - whether the glowing eyes are toggled on
    • sendUpdate

      public void sendUpdate(net.minecraft.server.level.ServerPlayer updatedPlayer)
      Description copied from interface: IGlowingEyesComponent
      Server-side-only method to send the updated component to the client
      Specified by:
      sendUpdate in interface IGlowingEyesComponent
      Parameters:
      updatedPlayer - the player who has been updated (will receive the update if no second player is specified)
    • sendUpdate

      public void sendUpdate(net.minecraft.server.level.ServerPlayer updatedPlayer, net.minecraft.server.level.ServerPlayer receivingPlayer)
      Description copied from interface: IGlowingEyesComponent
      Server-side-only method to send the updated component to the client
      Specified by:
      sendUpdate in interface IGlowingEyesComponent
      Parameters:
      updatedPlayer - the player who has been updated
      receivingPlayer - another player who will receive the update