Class TinyMoonEvent
java.lang.Object
com.mrbysco.lunar.api.LunarEvent
com.mrbysco.lunar.registry.events.TinyMoonEvent
- All Implemented Interfaces:
ILunarEvent
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanCalled when the lunar event checks if it can apply an effect to entities.voidapplyEntityEffect(net.minecraft.world.entity.Entity entity) Called when the lunar event tries to apply an effect to an entity.canSleep(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.List<org.apache.commons.lang3.tuple.Pair<net.minecraft.core.Holder<net.minecraft.world.entity.ai.attributes.Attribute>, net.minecraft.resources.Identifier>> Returns a list of attribute pairs that are associated with the lunar event.Get the translation key for the lunar event.floatCalled to check if the moon should get scaled.net.minecraft.resources.IdentifierCalled to change the texture of the moon.voidremoveEntityEffect(net.minecraft.world.entity.Entity entity) Called when the lunar event tries to remove an effect from an entity.intThe weight in which the lunar event will be picked.Methods inherited from class LunarEvent
getID, moonColor, toStringMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface ILunarEvent
applyPlayerEffect, applyPlayerEffect, applySpawnEffect, applySpawnEffect, canAppear, dictatesMobSpawn, getSpawnResult, removePlayerEffect
-
Constructor Details
-
TinyMoonEvent
public TinyMoonEvent()
-
-
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
-
applyEntityEffect
public boolean applyEntityEffect()Description copied from interface:ILunarEventCalled when the lunar event checks if it can apply an effect to entities.- Returns:
- if the entity should have an effect applied to it
-
applyEntityEffect
public void applyEntityEffect(net.minecraft.world.entity.Entity entity) Description copied from interface:ILunarEventCalled when the lunar event tries to apply an effect to an entity.- Parameters:
entity- the entity the effect is applied to
-
removeEntityEffect
public void removeEntityEffect(net.minecraft.world.entity.Entity entity) Description copied from interface:ILunarEventCalled when the lunar event tries to remove an effect from an entity.- Parameters:
entity- the entity the effect is removed from
-
getAttributePairs
public List<org.apache.commons.lang3.tuple.Pair<net.minecraft.core.Holder<net.minecraft.world.entity.ai.attributes.Attribute>, net.minecraft.resources.Identifier>> getAttributePairs()Description copied from interface:ILunarEventReturns a list of attribute pairs that are associated with the lunar event.- Returns:
- a list of pairs containing the attribute and the resource location of the modifier
-
moonTexture
public net.minecraft.resources.Identifier moonTexture()Description copied from interface:ILunarEventCalled to change the texture of the moon.- Returns:
- the resource location of the custom moon texture
-
moonScale
public float moonScale()Description copied from interface:ILunarEventCalled to check if the moon should get scaled.- Returns:
- the scale of the moon (1.0 = normal, 0.5 = half size, 2.0 = double size)
-
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
-