Package com.mrbysco.lunar.platform
Class FabricPlatformHelper
java.lang.Object
com.mrbysco.lunar.platform.FabricPlatformHelper
- All Implemented Interfaces:
IPlatformHelper
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanSleepIn(net.minecraft.resources.ResourceLocation moonID) Checks if sleeping is allowed during the given moon event.intReturns the configured weight of the Bad Omen Moon event.intReturns the configured weight of the Big Moon event.intReturns the configured weight of the Blood Moon event.intReturns 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 eventintReturns the configured weight of the Eclipse Moon event.intReturns the configured weight of the Hero Moon event.floatReturns the configured chance of a Lunar Event happening.intReturns the configured weight of the Miner Moon event.intReturns the configured weight of the Tiny Moon event.intReturns the configured weight of the White Moon event.intReturns the max level of Bad Omen applied during the Bad Omen Moon Event.voidsyncDeltaMovement(net.minecraft.server.level.ServerPlayer player, net.minecraft.world.phys.Vec3 deltaMovement) Sync the deltaMovement to the client.voidsyncEvent(net.minecraft.server.level.ServerPlayer player, ILunarEvent event) Syncing the lunar event to a specific client.voidsyncEvent(net.minecraft.world.level.Level level, ILunarEvent event) Syncing the lunar event to the clients.
-
Constructor Details
-
FabricPlatformHelper
public FabricPlatformHelper()
-
-
Method Details
-
syncEvent
Description copied from interface:IPlatformHelperSyncing the lunar event to the clients.- Specified by:
syncEventin interfaceIPlatformHelper- Parameters:
level- The level to get the players fromevent- The event that gets synced
-
syncEvent
Description copied from interface:IPlatformHelperSyncing the lunar event to a specific client.- Specified by:
syncEventin interfaceIPlatformHelper- Parameters:
player- The player it gets synced toevent- 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:IPlatformHelperSync the deltaMovement to the client.- Specified by:
syncDeltaMovementin interfaceIPlatformHelper- Parameters:
player- The player to sync todeltaMovement- The deltaMovement to sync
-
getLunarChance
public float getLunarChance()Description copied from interface:IPlatformHelperReturns the configured chance of a Lunar Event happening.- Specified by:
getLunarChancein interfaceIPlatformHelper- Returns:
- the Lunar Event Chance
-
getBloodMoonWeight
public int getBloodMoonWeight()Description copied from interface:IPlatformHelperReturns the configured weight of the Blood Moon event.- Specified by:
getBloodMoonWeightin interfaceIPlatformHelper- Returns:
- the Blood Moon Weight
-
getCrimsonMoonWeight
public int getCrimsonMoonWeight()Description copied from interface:IPlatformHelperReturns the configured weight of the Crimson Moon event.- Specified by:
getCrimsonMoonWeightin interfaceIPlatformHelper- Returns:
- the Crimson Moon Weight
-
getMinerMoonWeight
public int getMinerMoonWeight()Description copied from interface:IPlatformHelperReturns the configured weight of the Miner Moon event.- Specified by:
getMinerMoonWeightin interfaceIPlatformHelper- Returns:
- the Miner Moon Weight
-
getWhiteMoonWeight
public int getWhiteMoonWeight()Description copied from interface:IPlatformHelperReturns the configured weight of the White Moon event.- Specified by:
getWhiteMoonWeightin interfaceIPlatformHelper- Returns:
- the White Moon Weight
-
getBigMoonWeight
public int getBigMoonWeight()Description copied from interface:IPlatformHelperReturns the configured weight of the Big Moon event.- Specified by:
getBigMoonWeightin interfaceIPlatformHelper- Returns:
- the Big Moon Weight
-
getTinyMoonWeight
public int getTinyMoonWeight()Description copied from interface:IPlatformHelperReturns the configured weight of the Tiny Moon event.- Specified by:
getTinyMoonWeightin interfaceIPlatformHelper- Returns:
- the Tiny Moon Weight
-
getBadOmenMoonWeight
public int getBadOmenMoonWeight()Description copied from interface:IPlatformHelperReturns the configured weight of the Bad Omen Moon event.- Specified by:
getBadOmenMoonWeightin interfaceIPlatformHelper- Returns:
- the Bad Omen Moon Weight
-
getHeroMoonWeight
public int getHeroMoonWeight()Description copied from interface:IPlatformHelperReturns the configured weight of the Hero Moon event.- Specified by:
getHeroMoonWeightin interfaceIPlatformHelper- Returns:
- the Hero Moon Weight
-
getEclipseMoonWeight
public int getEclipseMoonWeight()Description copied from interface:IPlatformHelperReturns the configured weight of the Eclipse Moon event.- Specified by:
getEclipseMoonWeightin interfaceIPlatformHelper- Returns:
- the Eclipse Moon Weight
-
getCrimsonReplacementMap
public Map<net.minecraft.resources.ResourceLocation,net.minecraft.resources.ResourceLocation> getCrimsonReplacementMap()Description copied from interface:IPlatformHelperReturns the configured Crimson Replacement Map to be used during the Crimson Moon event- Specified by:
getCrimsonReplacementMapin interfaceIPlatformHelper- Returns:
- the configured Crimson Replacement Map.
-
canSleepIn
public boolean canSleepIn(net.minecraft.resources.ResourceLocation moonID) Description copied from interface:IPlatformHelperChecks if sleeping is allowed during the given moon event.- Specified by:
canSleepInin interfaceIPlatformHelper- Parameters:
moonID- the moon event to check- Returns:
- true if sleeping is allowed, false otherwise
-
maxBadOmen
public int maxBadOmen()Description copied from interface:IPlatformHelperReturns the max level of Bad Omen applied during the Bad Omen Moon Event.- Specified by:
maxBadOmenin interfaceIPlatformHelper- Returns:
- the max level of Bad Omen
-