Package petrolpark.mc.library.core.flags
Class UnflaggableFlagPole
java.lang.Object
petrolpark.mc.library.core.flags.UnflaggableFlagPole
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionbooleanRemove all extrinsic Flags.booleanbooleanAdd several Flags, anddoublegetType()booleanbooleanbooleanbooleanisIntrinsic(net.minecraft.core.Holder<Flag> flagHolder) voidsave()Called whenever theIFlagPoleis changed, to save the changes to the underlying object.Stream all Flags in this FlagPole that: Are notintrinsicHave no parents in this FlagPole This is the minimum set of Flags needed to uniquely define a FlagPole instance.booleanRemove a Flag and anychildrenit has that don't belong to another parent.booleanunflagOnly(net.minecraft.core.Holder<Flag> flag) Remove a Flag, but not any of its children.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface petrolpark.mc.library.core.flags.IFlagPole
streamShownAbsentFlags, streamShownFlags
-
Field Details
-
INSTANCE
-
-
Method Details
-
getFlaggable
- Specified by:
getFlaggablein interfaceIFlagPole<Object,Object>
-
getType
-
getAmount
public double getAmount() -
save
public void save()Description copied from interface:IFlagPoleCalled whenever theIFlagPoleis changed, to save the changes to the underlying object. -
has
-
hasAnyFlag
public boolean hasAnyFlag()- Specified by:
hasAnyFlagin interfaceIFlagPole<Object,Object>
-
hasAnyExtrinsicFlag
public boolean hasAnyExtrinsicFlag()- Specified by:
hasAnyExtrinsicFlagin interfaceIFlagPole<Object,Object>
-
streamAllFlags
- Specified by:
streamAllFlagsin interfaceIFlagPole<Object,Object>
-
streamOrphanExtrinsicFlags
Description copied from interface:IFlagPoleStream all Flags in this FlagPole that:- Are not
intrinsic - Have no parents in this FlagPole
- Specified by:
streamOrphanExtrinsicFlagsin interfaceIFlagPole<Object,Object> - Returns:
- Distinct Stream of Flags
- Are not
-
flag
-
flagAll
Description copied from interface:IFlagPoleAdd several Flags, and -
unflag
Description copied from interface:IFlagPoleRemove a Flag and anychildrenit has that don't belong to another parent. If the Flag has any parents in this FlagPole, it will not be removed. -
unflagOnly
Description copied from interface:IFlagPoleRemove a Flag, but not any of its children. If the Flag has any parents in this FlagPole, it will not be removed.- Specified by:
unflagOnlyin interfaceIFlagPole<Object,Object> - Parameters:
flag-- Returns:
- Whether this FlagPole changed (the Flag was removed)
- See Also:
-
clearFlags
public boolean clearFlags()Description copied from interface:IFlagPoleRemove all extrinsic Flags.- Specified by:
clearFlagsin interfaceIFlagPole<Object,Object> - Returns:
- Whether this FlagPole changed (whether it had any extrinsic Flags)
-
streamIntrinsicFlags
- Specified by:
streamIntrinsicFlagsin interfaceIFlagPole<Object,Object>
-
streamShownIfAbsentFlags
- Specified by:
streamShownIfAbsentFlagsin interfaceIFlagPole<Object,Object>
-
isIntrinsic
- Specified by:
isIntrinsicin interfaceIFlagPole<Object,Object>
-