Interface IPlatformHelper
- All Known Implementing Classes:
FabricPlatformHelper
public interface IPlatformHelper
-
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.net.minecraft.world.entity.EntityType<?>getEntityType(net.minecraft.resources.ResourceLocation location) Returns the associated EntityType for the given ResourceLocation.net.minecraft.resources.ResourceLocationgetEntityTypeLocation(net.minecraft.world.entity.EntityType<?> entityType) Returns the associated ResourceLocation for the given EntityType.net.minecraft.world.entity.ai.attributes.AttributeReturns the gravity attribute used for the Lunar 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.
-
Method Details
-
syncEvent
Syncing the lunar event to the clients.- Parameters:
level- The level to get the players fromevent- The event that gets synced
-
syncEvent
Syncing the lunar event to a specific client.- Parameters:
player- The player it gets synced toevent- 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 todeltaMovement- 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
-