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.
Extending MCWorld
MCServerWorld extends MCWorld. That means all methods available in MCWorld are also available in MCServerWorld
Methods
Gets entities in the world that match the given Predicate and the given MCEntityType (if provided).
Returns: A List of Entities that match.
Return Type: stdlib.List<MCEntity>
Parameter | Type | Description | Optional | DefaultValue |
---|---|---|---|---|
Parameter predicate | Type Predicate<MCEntity> | Description The predicate to check against. | Optional false | DefaultValue |
Parameter type | Type MCEntityType | Description No Description Provided | Optional true | DefaultValue |
Checks if a position is within an active raid.
Returns: Whether or not the position was inside an active raid.
Return Type: boolean
Parameter | Type | Description |
---|---|---|
Parameter pos | Type BlockPos | Description The position to look up. |
Checks if a position is within a chunk that is considered a slime chunk.
Returns: Whether or not the position was inside a slime chunk.
Return Type: boolean
Parameter | Type | Description |
---|---|---|
Parameter pos | Type BlockPos | Description The position to look up. |
Checks if a position is within a village.
Returns: Whether or not the position was inside a village.
Return Type: boolean
Parameter | Type | Description |
---|---|---|
Parameter pos | Type BlockPos | Description The position to look up. |
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
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
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
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
Properties
Name | Type | Has Getter | Has Setter | Description |
---|---|---|---|---|
Name seed | Type long | Has Getter true | Has Setter false | Description Gets the random seed of the world. |
Name server | Type MCServer | Has Getter true | Has Setter false | Description No Description Provided |
Name timeOfDay | Type MCServerWorld | Has Getter false | Has Setter true | Description Sets the time of the Minecraft day. |