Package de.z0rdak.yawp.core.flag
Class FlagContainer
- All Implemented Interfaces:
IFlagContainer,INbtSerializable<net.minecraft.nbt.CompoundTag>,Serializable,Cloneable,Map<String,IFlag>
Represents a simple map holding the flag values to the corresponding flag names for a region and providing methods handling the flags.
[Key] FlagName -> [Value] IFlag
E.g. "break_blocks" -> BooleanFlag {"value": false, ...}
[Key] FlagName -> [Value] IFlag
E.g. "break_blocks" -> BooleanFlag {"value": false, ...}
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleandeepCopy()voiddeserializeNBT(net.minecraft.nbt.CompoundTag nbt) voidnet.minecraft.nbt.CompoundTagvoidtoggleFlag(String flag, boolean enable) voidupdateFlag(IFlag flag) Methods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, valuesMethods inherited from class java.util.AbstractMap
equals, hashCode, toString
-
Constructor Details
-
FlagContainer
public FlagContainer(net.minecraft.nbt.CompoundTag nbt) -
FlagContainer
public FlagContainer()
-
-
Method Details
-
serializeNBT
public net.minecraft.nbt.CompoundTag serializeNBT()- Specified by:
serializeNBTin interfaceINbtSerializable<net.minecraft.nbt.CompoundTag>
-
deserializeNBT
public void deserializeNBT(net.minecraft.nbt.CompoundTag nbt) - Specified by:
deserializeNBTin interfaceINbtSerializable<net.minecraft.nbt.CompoundTag>
-
deepCopy
-
put
- Specified by:
putin interfaceIFlagContainer
-
flagState
- Specified by:
flagStatein interfaceIFlagContainer
-
getActiveFlags
-
getFlags
- Specified by:
getFlagsin interfaceIFlagContainer
-
contains
- Specified by:
containsin interfaceIFlagContainer
-
updateFlag
- Specified by:
updateFlagin interfaceIFlagContainer
-
toggleFlag
- Specified by:
toggleFlagin interfaceIFlagContainer
-