Package petrolpark.mc.library.core.flags
Class AbstractFlagPole<OBJECT,OBJECT_STACK>
java.lang.Object
petrolpark.mc.library.core.flags.AbstractFlagPole<OBJECT,OBJECT_STACK>
- All Implemented Interfaces:
IFlagPole<OBJECT,OBJECT_STACK>
- Direct Known Subclasses:
ComponentHolderFlagPole,GenericFlagPole
-
Field Summary
FieldsModifier and TypeFieldDescriptionAll extrinsicFlags, whether added themselves or by parental proxy.static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, List<net.minecraft.core.Holder<Flag>>> ExtrinsicFlags that do not have a parent (if one exists) in this Flags.protected final OBJECT_STACK -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanRemove all extrinsic Flags.final booleanfinal booleanAdd several Flags, andfinal booleanfinal booleanfinal booleanbooleanisIntrinsic(net.minecraft.core.Holder<Flag> flagHolder) 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.final booleanRemove a Flag and anychildrenit has that don't belong to another parent.final 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
getAmount, getFlaggable, getType, save, streamShownAbsentFlags, streamShownFlags
-
Field Details
-
Constructor Details
-
AbstractFlagPole
-
-
Method Details
-
has
- Specified by:
hasin interfaceIFlagPole<OBJECT,OBJECT_STACK>
-
hasAnyFlag
public final boolean hasAnyFlag()- Specified by:
hasAnyFlagin interfaceIFlagPole<OBJECT,OBJECT_STACK>
-
hasAnyExtrinsicFlag
public final boolean hasAnyExtrinsicFlag()- Specified by:
hasAnyExtrinsicFlagin interfaceIFlagPole<OBJECT,OBJECT_STACK>
-
streamAllFlags
- Specified by:
streamAllFlagsin interfaceIFlagPole<OBJECT,OBJECT_STACK>
-
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_STACK> - Returns:
- Distinct Stream of Flags
- Are not
-
flag
- Specified by:
flagin interfaceIFlagPole<OBJECT,OBJECT_STACK>
-
flagAll
Description copied from interface:IFlagPoleAdd several Flags, and- Specified by:
flagAllin interfaceIFlagPole<OBJECT,OBJECT_STACK> - Parameters:
flagsStream-- Returns:
-
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.- Specified by:
unflagin interfaceIFlagPole<OBJECT,OBJECT_STACK> - Parameters:
flag-- Returns:
- Whether this FlagPole changed
- See Also:
-
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_STACK> - Parameters:
flag-- Returns:
- Whether this FlagPole changed (the Flag was removed)
- See Also:
-
clearFlags
public final boolean clearFlags()Description copied from interface:IFlagPoleRemove all extrinsic Flags.- Specified by:
clearFlagsin interfaceIFlagPole<OBJECT,OBJECT_STACK> - Returns:
- Whether this FlagPole changed (whether it had any extrinsic Flags)
-
getOrphanHolderList
-
streamIntrinsicFlags
- Specified by:
streamIntrinsicFlagsin interfaceIFlagPole<OBJECT,OBJECT_STACK>
-
streamShownIfAbsentFlags
- Specified by:
streamShownIfAbsentFlagsin interfaceIFlagPole<OBJECT,OBJECT_STACK>
-
isIntrinsic
- Specified by:
isIntrinsicin interfaceIFlagPole<OBJECT,OBJECT_STACK>
-