Class Property<T>
java.lang.Object
com.github.darksoulq.abyssallib.world.block.property.Property<T>
- Type Parameters:
T- the type of the value held by this property
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<D> voiddecode(DynamicOps<D> ops, D input) Decodes a value from a serialized format and updates the property.<D> Dencode(DynamicOps<D> ops) Encodes the current value into a serialized format.get()Retrieves the current value of the property.Retrieves the default value defined at creation.voidUpdates the current value of the property.
-
Constructor Details
-
Property
-
-
Method Details
-
get
-
getDefault
-
set
Updates the current value of the property.- Parameters:
value- the new value to set
-
encode
Encodes the current value into a serialized format.- Type Parameters:
D- the data format type- Parameters:
ops- the dynamic operations logic- Returns:
- the encoded data object
- Throws:
Codec.CodecException- if serialization fails
-
decode
Decodes a value from a serialized format and updates the property.- Type Parameters:
D- the data format type- Parameters:
ops- the dynamic operations logicinput- the serialized data object- Throws:
Codec.CodecException- if deserialization fails
-