Interface IPlatformHelper


public interface IPlatformHelper
  • 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.
    net.minecraft.world.entity.EntityType<?>
    getEntityType(net.minecraft.resources.ResourceLocation location)
    Returns the associated EntityType for the given ResourceLocation.
    net.minecraft.resources.ResourceLocation
    getEntityTypeLocation(net.minecraft.world.entity.EntityType<?> entityType)
    Returns the associated ResourceLocation for the given EntityType.
    net.minecraft.world.entity.ai.attributes.Attribute
    Returns the gravity attribute used for the Lunar 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.
    int
    Returns the max level of Bad Omen applied during the Bad Omen 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.
  • Method Details

    • syncEvent

      void syncEvent(net.minecraft.world.level.Level level, ILunarEvent event)
      Syncing the lunar event to the clients.
      Parameters:
      level - The level to get the players from
      event - The event that gets synced
    • syncEvent

      void syncEvent(net.minecraft.server.level.ServerPlayer player, ILunarEvent event)
      Syncing the lunar event to a specific client.
      Parameters:
      player - The player it gets synced to
      event - The event that gets synced
    • syncDeltaMovement

      void syncDeltaMovement(net.minecraft.server.level.ServerPlayer player, net.minecraft.world.phys.Vec3 deltaMovement)
      Sync the deltaMovement to the client.
      Parameters:
      player - The player to sync to
      deltaMovement - The deltaMovement to sync
    • getLunarChance

      float getLunarChance()
      Returns the configured chance of a Lunar Event happening.
      Returns:
      the Lunar Event Chance
    • getBloodMoonWeight

      int getBloodMoonWeight()
      Returns the configured weight of the Blood Moon event.
      Returns:
      the Blood Moon Weight
    • getCrimsonMoonWeight

      int getCrimsonMoonWeight()
      Returns the configured weight of the Crimson Moon event.
      Returns:
      the Crimson Moon Weight
    • getMinerMoonWeight

      int getMinerMoonWeight()
      Returns the configured weight of the Miner Moon event.
      Returns:
      the Miner Moon Weight
    • getWhiteMoonWeight

      int getWhiteMoonWeight()
      Returns the configured weight of the White Moon event.
      Returns:
      the White Moon Weight
    • getBigMoonWeight

      int getBigMoonWeight()
      Returns the configured weight of the Big Moon event.
      Returns:
      the Big Moon Weight
    • getTinyMoonWeight

      int getTinyMoonWeight()
      Returns the configured weight of the Tiny Moon event.
      Returns:
      the Tiny Moon Weight
    • getBadOmenMoonWeight

      int getBadOmenMoonWeight()
      Returns the configured weight of the Bad Omen Moon event.
      Returns:
      the Bad Omen Moon Weight
    • getHeroMoonWeight

      int getHeroMoonWeight()
      Returns the configured weight of the Hero Moon event.
      Returns:
      the Hero Moon Weight
    • getEclipseMoonWeight

      int getEclipseMoonWeight()
      Returns the configured weight of the Eclipse Moon event.
      Returns:
      the Eclipse Moon Weight
    • getCrimsonReplacementMap

      Map<net.minecraft.resources.ResourceLocation,net.minecraft.resources.ResourceLocation> getCrimsonReplacementMap()
      Returns the configured Crimson Replacement Map to be used during the Crimson Moon event
      Returns:
      the configured Crimson Replacement Map.
    • getEntityTypeLocation

      net.minecraft.resources.ResourceLocation getEntityTypeLocation(net.minecraft.world.entity.EntityType<?> entityType)
      Returns the associated ResourceLocation for the given EntityType.
      Returns:
      the ResourceLocation.
    • getEntityType

      net.minecraft.world.entity.EntityType<?> getEntityType(net.minecraft.resources.ResourceLocation location)
      Returns the associated EntityType for the given ResourceLocation.
      Returns:
      the EntityType.
    • getGravityAttribute

      net.minecraft.world.entity.ai.attributes.Attribute getGravityAttribute()
      Returns the gravity attribute used for the Lunar Event.
      Returns:
      the gravity attribute
    • canSleepIn

      boolean canSleepIn(net.minecraft.resources.ResourceLocation moonID)
      Checks if sleeping is allowed during the given moon event.
      Parameters:
      moonID - the moon event to check
      Returns:
      true if sleeping is allowed, false otherwise
    • maxBadOmen

      int maxBadOmen()
      Returns the max level of Bad Omen applied during the Bad Omen Moon Event.
      Returns:
      the max level of Bad Omen