class Rosegold::MiningPrediction

Overview

Pending block interaction states, separate from authoritative chunk data. Each position keeps its latest prediction until a cumulative acknowledgement.

Defined in:

rosegold/world/mining_prediction.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new #

[View source]

Class Method Detail

def self.fluid_table(mc : Rosegold::MCData) : FluidTable #

[View source]
def self.replacement_state(state : UInt16, mc : Rosegold::MCData = Rosegold::MCData.default) : UInt16 #

createLegacyBlock of the fluid occupying state: its source/flowing water or lava block state, otherwise air.


[View source]
def self.water_own_height(state : UInt16, mc : Rosegold::MCData = Rosegold::MCData.default) : Float64 | Nil #

Fluid height in blocks of the water in state (FlowingFluid#getOwnHeight, amount / 9), or nil when it holds no water.


[View source]

Instance Method Detail

def [](x : Int32, y : Int32, z : Int32) : UInt16 | Nil #

[View source]
def acknowledge(sequence : Int32) : Nil #

[View source]
def clear : Nil #

[View source]
def clear_chunk(chunk_pos : ChunkPos) : Nil #

[View source]
def empty? : Bool #

[View source]
def predict(x : Int32, y : Int32, z : Int32, sequence : Int32, state : UInt16) : Bool #

[View source]