Class FabricPlatformHelper

java.lang.Object
com.mrbysco.lunar.platform.FabricPlatformHelper
All Implemented Interfaces:
IPlatformHelper

public class FabricPlatformHelper extends Object implements IPlatformHelper
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    canSleepIn(net.minecraft.resources.ResourceLocation moonID)
    Checks if sleeping is allowed during the given moon event.
    int
    Returns the configured weight of the Bad Omen Moon event.
    int
    Returns the configured weight of the Big Moon event.
    int
    Returns the configured weight of the Blood Moon event.
    int
    Returns the configured weight of the Crimson Moon event.
    Map<net.minecraft.resources.ResourceLocation,net.minecraft.resources.ResourceLocation>
    Returns the configured Crimson Replacement Map to be used during the Crimson Moon event
    int
    Returns the configured weight of the Eclipse Moon event.
    int
    Returns the configured weight of the Hero Moon event.
    float
    Returns the configured chance of a Lunar Event happening.
    int
    Returns the configured weight of the Miner Moon event.
    int
    Returns the configured weight of the Tiny Moon event.
    int
    Returns the configured weight of the White Moon event.
    void
    syncDeltaMovement(net.minecraft.server.level.ServerPlayer player, net.minecraft.world.phys.Vec3 deltaMovement)
    Sync the deltaMovement to the client.
    void
    syncEvent(net.minecraft.server.level.ServerPlayer player, ILunarEvent event)
    Syncing the lunar event to a specific client.
    void
    syncEvent(net.minecraft.world.level.Level level, ILunarEvent event)
    Syncing the lunar event to the clients.

    Methods inherited from class java.lang.Object

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

    • FabricPlatformHelper

      public FabricPlatformHelper()
  • Method Details

    • syncEvent

      public void syncEvent(net.minecraft.world.level.Level level, ILunarEvent event)
      Description copied from interface: IPlatformHelper
      Syncing the lunar event to the clients.
      Specified by:
      syncEvent in interface IPlatformHelper
      Parameters:
      level - The level to get the players from
      event - The event that gets synced
    • syncEvent

      public void syncEvent(net.minecraft.server.level.ServerPlayer player, ILunarEvent event)
      Description copied from interface: IPlatformHelper
      Syncing the lunar event to a specific client.
      Specified by:
      syncEvent in interface IPlatformHelper
      Parameters:
      player - The player it gets synced to
      event - The event that gets synced
    • syncDeltaMovement

      public void syncDeltaMovement(net.minecraft.server.level.ServerPlayer player, net.minecraft.world.phys.Vec3 deltaMovement)
      Description copied from interface: IPlatformHelper
      Sync the deltaMovement to the client.
      Specified by:
      syncDeltaMovement in interface IPlatformHelper
      Parameters:
      player - The player to sync to
      deltaMovement - The deltaMovement to sync
    • getLunarChance

      public float getLunarChance()
      Description copied from interface: IPlatformHelper
      Returns the configured chance of a Lunar Event happening.
      Specified by:
      getLunarChance in interface IPlatformHelper
      Returns:
      the Lunar Event Chance
    • getBloodMoonWeight

      public int getBloodMoonWeight()
      Description copied from interface: IPlatformHelper
      Returns the configured weight of the Blood Moon event.
      Specified by:
      getBloodMoonWeight in interface IPlatformHelper
      Returns:
      the Blood Moon Weight
    • getCrimsonMoonWeight

      public int getCrimsonMoonWeight()
      Description copied from interface: IPlatformHelper
      Returns the configured weight of the Crimson Moon event.
      Specified by:
      getCrimsonMoonWeight in interface IPlatformHelper
      Returns:
      the Crimson Moon Weight
    • getMinerMoonWeight

      public int getMinerMoonWeight()
      Description copied from interface: IPlatformHelper
      Returns the configured weight of the Miner Moon event.
      Specified by:
      getMinerMoonWeight in interface IPlatformHelper
      Returns:
      the Miner Moon Weight
    • getWhiteMoonWeight

      public int getWhiteMoonWeight()
      Description copied from interface: IPlatformHelper
      Returns the configured weight of the White Moon event.
      Specified by:
      getWhiteMoonWeight in interface IPlatformHelper
      Returns:
      the White Moon Weight
    • getBigMoonWeight

      public int getBigMoonWeight()
      Description copied from interface: IPlatformHelper
      Returns the configured weight of the Big Moon event.
      Specified by:
      getBigMoonWeight in interface IPlatformHelper
      Returns:
      the Big Moon Weight
    • getTinyMoonWeight

      public int getTinyMoonWeight()
      Description copied from interface: IPlatformHelper
      Returns the configured weight of the Tiny Moon event.
      Specified by:
      getTinyMoonWeight in interface IPlatformHelper
      Returns:
      the Tiny Moon Weight
    • getBadOmenMoonWeight

      public int getBadOmenMoonWeight()
      Description copied from interface: IPlatformHelper
      Returns the configured weight of the Bad Omen Moon event.
      Specified by:
      getBadOmenMoonWeight in interface IPlatformHelper
      Returns:
      the Bad Omen Moon Weight
    • getHeroMoonWeight

      public int getHeroMoonWeight()
      Description copied from interface: IPlatformHelper
      Returns the configured weight of the Hero Moon event.
      Specified by:
      getHeroMoonWeight in interface IPlatformHelper
      Returns:
      the Hero Moon Weight
    • getEclipseMoonWeight

      public int getEclipseMoonWeight()
      Description copied from interface: IPlatformHelper
      Returns the configured weight of the Eclipse Moon event.
      Specified by:
      getEclipseMoonWeight in interface IPlatformHelper
      Returns:
      the Eclipse Moon Weight
    • getCrimsonReplacementMap

      public Map<net.minecraft.resources.ResourceLocation,net.minecraft.resources.ResourceLocation> getCrimsonReplacementMap()
      Description copied from interface: IPlatformHelper
      Returns the configured Crimson Replacement Map to be used during the Crimson Moon event
      Specified by:
      getCrimsonReplacementMap in interface IPlatformHelper
      Returns:
      the configured Crimson Replacement Map.
    • canSleepIn

      public boolean canSleepIn(net.minecraft.resources.ResourceLocation moonID)
      Description copied from interface: IPlatformHelper
      Checks if sleeping is allowed during the given moon event.
      Specified by:
      canSleepIn in interface IPlatformHelper
      Parameters:
      moonID - the moon event to check
      Returns:
      true if sleeping is allowed, false otherwise