Class SlimePropertyMap
java.lang.Object
com.infernalsuite.aswm.api.world.properties.SlimePropertyMap
A Property Map object.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionclone()
static SlimePropertyMap
fromCompound
(com.flowpowered.nbt.CompoundTag compound) com.flowpowered.nbt.CompoundMap
Return the properties (CompoundMap)<T> T
getValue
(SlimeProperty<T> property) Return the current value of the given propertyvoid
merge
(SlimePropertyMap propertyMap) Copies all values from the specifiedSlimePropertyMap
.<T> void
setValue
(SlimeProperty<T> property, T value) Update the value of the given propertycom.flowpowered.nbt.CompoundTag
Returns aCompoundTag
containing every property set in this map.toString()
-
Constructor Details
-
SlimePropertyMap
public SlimePropertyMap(com.flowpowered.nbt.CompoundMap compoundMap) -
SlimePropertyMap
public SlimePropertyMap()
-
-
Method Details
-
getValue
Return the current value of the given property- Parameters:
property
- The slime property- Returns:
- The current value
-
getProperties
public com.flowpowered.nbt.CompoundMap getProperties()Return the properties (CompoundMap)- Returns:
- The properties
-
setValue
Update the value of the given property- Parameters:
property
- The slime propertyvalue
- The new value- Throws:
IllegalArgumentException
- if the value fails validation.
-
merge
Copies all values from the specifiedSlimePropertyMap
. If the same property has different values on both maps, the one on the providen map will be used.- Parameters:
propertyMap
- ASlimePropertyMap
.
-
toCompound
public com.flowpowered.nbt.CompoundTag toCompound()Returns aCompoundTag
containing every property set in this map.- Returns:
- A
CompoundTag
with all the properties stored in this map.
-
fromCompound
-
clone
-
toString
-