Class BloodMoonEvent

java.lang.Object
com.mrbysco.lunar.api.LunarEvent
com.mrbysco.lunar.registry.events.BloodMoonEvent
All Implemented Interfaces:
ILunarEvent

public class BloodMoonEvent extends LunarEvent
  • Constructor Details

    • BloodMoonEvent

      public BloodMoonEvent()
  • Method Details

    • spawnWeight

      public int spawnWeight()
      Description copied from interface: ILunarEvent
      The weight in which the lunar event will be picked.
      Returns:
      The spawn weight, 0 being disabled and 100 being really common (min 0, max 100)
    • getTranslationKey

      public String getTranslationKey()
      Description copied from interface: ILunarEvent
      Get the translation key for the lunar event.
      Returns:
      the translation key
    • applySpawnEffect

      public boolean applySpawnEffect()
      Description copied from interface: ILunarEvent
      Called when the lunar event checks if it can apply an effect to living entities upon spawn.
      Returns:
      if the entity should have an effect applied to it
    • applySpawnEffect

      public void applySpawnEffect(net.minecraft.world.entity.LivingEntity livingEntity, net.minecraft.world.entity.MobSpawnType spawnType)
      Description copied from interface: ILunarEvent
      Called when the lunar event tries to apply an effect to a living entity upon spawn.
      Parameters:
      livingEntity - the entity the effect is applied to
      spawnType - the spawn reason
    • stopEffects

      public void stopEffects(net.minecraft.world.level.Level level)
      Description copied from interface: ILunarEvent
      Called when the lunar event is over and the effects are removed.
      Parameters:
      level - the level where the event took place
    • canSleep

      public EventResult canSleep(net.minecraft.world.entity.player.Player player, net.minecraft.core.BlockPos sleepingLocation)
      Description copied from interface: ILunarEvent
      Called when a player is about to try and sleep through the lunar event.
      Parameters:
      player - The sleeping player
      sleepingLocation - The position of the sleeping player
      Returns:
      if the player is allowed to sleep