class
Rosegold::Dimension
- Rosegold::Dimension
- Reference
- Object
Defined in:
rosegold/world/dimension.crConstant Summary
-
REGISTRY_ID =
"minecraft:dimension_type"
Constructors
Class Method Summary
- .for_dimension_name(name : String)
-
.from_registry(name : String, dimension_type : UInt32, registries : Hash(String, Rosegold::Clientbound::RegistryData))
Build a Dimension from the server-provided dimension_type registry entry.
- .new_end
- .new_nether
Instance Method Summary
- #block_state(x : Int32, y : Int32, z : Int32) : UInt16 | Nil
- #block_state(location : Vec3d) : UInt16 | Nil
- #block_state(location : Vec3i) : UInt16 | Nil
- #chunk_at?(x : Int32, z : Int32) : Chunk | Nil
- #chunks : Hash({Int32, Int32}, Rosegold::Chunk)
- #dimension_type : UInt32
- #dimension_type=(dimension_type : UInt32)
- #entities : Hash(UInt64, Entity)
- #entities=(entities : Hash(UInt64, Entity))
- #load_chunk(chunk : Chunk)
- #min_y : Int32
- #name : String
- #nbt : Minecraft::NBT::Tag
- #raycast_entity(start : Vec3d, look : Vec3d, max_distance : Float64) : Entity | Nil
- #set_block_state(x : Int32, y : Int32, z : Int32, block_state : UInt16)
- #set_block_state(location : Vec3i, block_state : UInt16)
- #time_of_day : Int64
- #time_of_day=(time_of_day : Int64)
- #unload_chunk(chunk_pos : ChunkPos)
- #world_age : Int64
- #world_age=(world_age : Int64)
- #world_height : Int32
Constructor Detail
Class Method Detail
def self.from_registry(name : String, dimension_type : UInt32, registries : Hash(String, Rosegold::Clientbound::RegistryData))
#
Build a Dimension from the server-provided dimension_type registry entry.
#dimension_type indexes into minecraft:dimension_type, whose codec NBT
carries the authoritative #min_y / height for this server. Falls back
to vanilla defaults keyed by dimension name when the registry is missing
or the entry is unparseable.