MCServerWorld

Represents the logical (server) implementation of the world. These are not limited to dedicated servers, they exist in single player worlds as part of the integrated server.

Importing the class

It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.

import crafttweaker.api.world.MCServerWorld;

Extending MCWorld

MCServerWorld extends MCWorld. That means all methods available in MCWorld are also available in MCServerWorld

Methods

isRaid

Checks if a position is within an active raid.

Return Type: boolean

MCServerWorld.isRaid(pos as BlockPos) as boolean
world as MCServerWorld.isRaid(new BlockPos(0, 1, 2));
ParameterTypeDescription
posBlockPosThe position to look up.

isSlimeChunk

Checks if a position is within a chunk that is considered a slime chunk.

Return Type: boolean

MCServerWorld.isSlimeChunk(pos as BlockPos) as boolean
world as MCServerWorld.isSlimeChunk(new BlockPos(0, 1, 2));
ParameterTypeDescription
posBlockPosThe position to look up.

isVillage

Checks if a position is within a village.

Return Type: boolean

MCServerWorld.isVillage(pos as BlockPos) as boolean
world as MCServerWorld.isVillage(new BlockPos(0, 1, 2));
ParameterTypeDescription
posBlockPosThe position to look up.

setTimeToDay

Sets the time of the Minecraft day to day. This is like using the "time set day" command or setting the time to 1000.

Return Type: void

MCServerWorld.setTimeToDay() as void
world as MCServerWorld.setTimeToDay();

setTimeToMidnight

Sets the time of the Minecraft day to midnight. This is like using the "time set midnight" command or setting the time to 18000.

Return Type: void

MCServerWorld.setTimeToMidnight() as void
world as MCServerWorld.setTimeToMidnight();

setTimeToNight

Sets the time of the Minecraft day to night. This is like using the "time set night" command or setting the time to 13000.

Return Type: void

MCServerWorld.setTimeToNight() as void
world as MCServerWorld.setTimeToNight();

setTimeToNoon

Sets the time of the Minecraft day to noon. This is like using the "time set noon" command or setting the time to 6000.

Return Type: void

MCServerWorld.setTimeToNoon() as void
world as MCServerWorld.setTimeToNoon();

Properties

NameTypeHas GetterHas Setter
seedlongtruefalse
serverMCServertruefalse
timeOfDayMCServerWorldfalsetrue