Class ExpandServerLevel
java.lang.Object
com.blamejared.crafttweaker.natives.world.ExpandServerLevel
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic net.minecraft.world.damagesource.DamageSourcesdamageSources(net.minecraft.server.level.ServerLevel level) static CraftTweakerSavedDatagetCustomData(net.minecraft.server.level.ServerLevel internal) Gets the custom data that is saved/loaded to/from disk when the level is saved/loaded to/from disk.static List<net.minecraft.world.entity.Entity> getEntities(net.minecraft.server.level.ServerLevel internal, Predicate<net.minecraft.world.entity.Entity> predicate, net.minecraft.world.entity.EntityType<net.minecraft.world.entity.Entity> type) Gets entities in the world that match the given Predicate and the given EntityType (if provided).static longgetSeed(net.minecraft.server.level.ServerLevel internal) Gets the random seed of the world.static net.minecraft.server.MinecraftServergetServer(net.minecraft.server.level.ServerLevel internal) static booleanisRaided(net.minecraft.server.level.ServerLevel internal, net.minecraft.core.BlockPos pos) Checks if a position is within an active raid.static booleanisSlimeChunk(net.minecraft.server.level.ServerLevel internal, net.minecraft.core.BlockPos pos) Checks if a position is within a chunk that is considered a slime chunk.static booleanisVillage(net.minecraft.server.level.ServerLevel internal, net.minecraft.core.BlockPos pos) Checks if a position is within a village.static voidsetDayTime(net.minecraft.server.level.ServerLevel internal, long time) Sets the time of the Minecraft day.static voidsetTimeToDay(net.minecraft.server.level.ServerLevel internal) Sets the time of the Minecraft day to day.static voidsetTimeToMidnight(net.minecraft.server.level.ServerLevel internal) Sets the time of the Minecraft day to midnight.static voidsetTimeToNight(net.minecraft.server.level.ServerLevel internal) Sets the time of the Minecraft day to night.static voidsetTimeToNoon(net.minecraft.server.level.ServerLevel internal) Sets the time of the Minecraft day to noon.
-
Constructor Details
-
ExpandServerLevel
public ExpandServerLevel()
-
-
Method Details
-
getCustomData
Gets the custom data that is saved/loaded to/from disk when the level is saved/loaded to/from disk.This lets you store data on this specific level, so data stored in the Overworld will not be accessible from the Nether.
- Returns:
- The custom data for this world.
-
setDayTime
public static void setDayTime(net.minecraft.server.level.ServerLevel internal, long time) Sets the time of the Minecraft day.- Parameters:
time- The new time of day. Should be between 0 and 24000.- DocParam:
- time 6000
-
setTimeToDay
public static void setTimeToDay(net.minecraft.server.level.ServerLevel internal) Sets the time of the Minecraft day to day. This is like using the "time set day" command or setting the time to 1000. -
setTimeToNoon
public static void setTimeToNoon(net.minecraft.server.level.ServerLevel internal) Sets the time of the Minecraft day to noon. This is like using the "time set noon" command or setting the time to 6000. -
setTimeToNight
public static void setTimeToNight(net.minecraft.server.level.ServerLevel internal) Sets the time of the Minecraft day to night. This is like using the "time set night" command or setting the time to 13000. -
setTimeToMidnight
public static void setTimeToMidnight(net.minecraft.server.level.ServerLevel internal) Sets the time of the Minecraft day to midnight. This is like using the "time set midnight" command or setting the time to 18000. -
getSeed
public static long getSeed(net.minecraft.server.level.ServerLevel internal) Gets the random seed of the world.- Returns:
- The random seed of the world.
-
isVillage
public static boolean isVillage(net.minecraft.server.level.ServerLevel internal, net.minecraft.core.BlockPos pos) Checks if a position is within a village.- Parameters:
pos- The position to look up.- Returns:
- Whether the position was inside a village.
- DocParam:
- pos new BlockPos(0, 1, 2)
-
isRaided
public static boolean isRaided(net.minecraft.server.level.ServerLevel internal, net.minecraft.core.BlockPos pos) Checks if a position is within an active raid.- Parameters:
pos- The position to look up.- Returns:
- Whether the position was inside an active raid.
- DocParam:
- pos new BlockPos(0, 1, 2)
-
isSlimeChunk
public static boolean isSlimeChunk(net.minecraft.server.level.ServerLevel internal, net.minecraft.core.BlockPos pos) Checks if a position is within a chunk that is considered a slime chunk.- Parameters:
pos- The position to look up.- Returns:
- Whether the position was inside a slime chunk.
- DocParam:
- pos new BlockPos(0, 1, 2)
-
getServer
public static net.minecraft.server.MinecraftServer getServer(net.minecraft.server.level.ServerLevel internal) -
getEntities
public static List<net.minecraft.world.entity.Entity> getEntities(net.minecraft.server.level.ServerLevel internal, Predicate<net.minecraft.world.entity.Entity> predicate, net.minecraft.world.entity.EntityType<net.minecraft.world.entity.Entity> type) Gets entities in the world that match the given Predicate and the given EntityType (if provided).- Parameters:
predicate- The predicate to check against.- Returns:
- A List of Entities that match.
- DocParam:
- predicate (entity as MCEntity) => entity.isImmuneToFire(), type invalid input: '<'entitytype:minecraft:sheep>
-
damageSources
public static net.minecraft.world.damagesource.DamageSources damageSources(net.minecraft.server.level.ServerLevel level)
-