Class CrimsonMoonEvent
java.lang.Object
com.mrbysco.lunar.api.LunarEvent
com.mrbysco.lunar.registry.events.CrimsonMoonEvent
- All Implemented Interfaces:
ILunarEvent
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncanSleep(net.minecraft.world.entity.player.Player player, net.minecraft.core.BlockPos sleepingLocation) Called when a player is about to try and sleep through the lunar event.booleanCalled when the lunar event tries check if a mob is allowed to spawn.getSpawnResult(net.minecraft.world.entity.LivingEntity livingEntity, net.minecraft.world.entity.MobSpawnType spawnType) Called when the lunar event tries check if a mob is allowed to spawn.Get the translation key for the lunar event.net.minecraft.resources.ResourceLocationCalled to change the texture of the moon.intThe weight in which the lunar event will be picked.Methods inherited from class com.mrbysco.lunar.api.LunarEvent
getID, moonColor, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.mrbysco.lunar.api.ILunarEvent
applyEntityEffect, applyEntityEffect, applyPlayerEffect, applyPlayerEffect, applySpawnEffect, applySpawnEffect, canAppear, moonScale, removeEntityEffect, stopEffects
-
Constructor Details
-
CrimsonMoonEvent
public CrimsonMoonEvent()
-
-
Method Details
-
spawnWeight
public int spawnWeight()Description copied from interface:ILunarEventThe 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
Description copied from interface:ILunarEventGet the translation key for the lunar event.- Returns:
- the translation key
-
canSleep
public EventResult canSleep(net.minecraft.world.entity.player.Player player, net.minecraft.core.BlockPos sleepingLocation) Description copied from interface:ILunarEventCalled when a player is about to try and sleep through the lunar event.- Parameters:
player- The sleeping playersleepingLocation- The position of the sleeping player- Returns:
- if the player is allowed to sleep
-
dictatesMobSpawn
public boolean dictatesMobSpawn()Description copied from interface:ILunarEventCalled when the lunar event tries check if a mob is allowed to spawn.- Returns:
- if the lunar event changes mob spawning rules
-
moonTexture
public net.minecraft.resources.ResourceLocation moonTexture()Description copied from interface:ILunarEventCalled to change the texture of the moon.- Returns:
- the resource location of the custom moon texture
-
getSpawnResult
public EventResult getSpawnResult(net.minecraft.world.entity.LivingEntity livingEntity, net.minecraft.world.entity.MobSpawnType spawnType) Description copied from interface:ILunarEventCalled when the lunar event tries check if a mob is allowed to spawn.- Parameters:
livingEntity- the entity being checkedspawnType- the spawn reason- Returns:
- if the lunar event changes mob spawning rules
-