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
-
#acknowledge_interaction_predictions(sequence : Int32) : Nil
Ends predictions up to and including
sequence, revealing the latest authoritative block state wherever a prediction ends. - #acknowledge_mining_predictions(sequence : Int32) : Nil
- #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)
- #clear_interaction_predictions : Nil
- #clear_mining_predictions : Nil
- #dimension_type : UInt32
- #dimension_type=(dimension_type : UInt32)
- #entities : Hash(UInt64, Entity)
- #entities=(entities : Hash(UInt64, Entity))
-
#eye_in_water?(eyes : Vec3d) : Bool
Vanilla Entity#updateFluidOnEyes: the water at the eye block, raised to a full block when water is also above it, must reach above the eye.
- #interaction_block_state(x : Int32, y : Int32, z : Int32) : UInt16 | Nil
-
#interaction_block_state(location : Vec3i) : UInt16 | Nil
Returns the pending interaction state or the authoritative block state.
- #load_chunk(chunk : Chunk)
- #min_y : Int32
- #mining_block_state(x : Int32, y : Int32, z : Int32) : UInt16 | Nil
- #name : String
- #nbt : Minecraft::NBT::Tag
-
#predict_block_break(location : Vec3i, sequence : Int32) : Bool
Predicts the fluid block state (or air) left by breaking a loaded non-air block.
-
#predict_interaction_block_state(location : Vec3i, state : UInt16, sequence : Int32) : Bool
Records a verified interaction result separately from chunk data.
- #raycast_entity(start : Vec3d, look : Vec3d, max_distance : Float64, passenger_id : UInt32 | Nil = nil) : 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
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.
Instance Method Detail
Ends predictions up to and including sequence, revealing the latest
authoritative block state wherever a prediction ends.
Vanilla Entity#updateFluidOnEyes: the water at the eye block, raised to a full block when water is also above it, must reach above the eye. Uses authoritative geometry.
Returns the pending interaction state or the authoritative block state.
Predicts the fluid block state (or air) left by breaking a loaded non-air block.
Records a verified interaction result separately from chunk data. Returns false for unknown states, unloaded or out-of-bounds positions, or a sequence older than the prediction already pending at this position.