Class Flag

java.lang.Object
petrolpark.mc.library.core.flags.Flag

public class Flag extends Object
  • Field Details

    • DIRECT_CODEC

      public static final com.mojang.serialization.Codec<Flag> DIRECT_CODEC
    • CODEC

      public static final com.mojang.serialization.Codec<net.minecraft.core.Holder<Flag>> CODEC
    • STREAM_CODEC

      public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,net.minecraft.core.Holder<Flag>> STREAM_CODEC
    • preservationProportion

      public final float preservationProportion
    • color

      public final int color
    • absentColor

      public final int absentColor
    • directChildrenHolders

      protected final net.minecraft.core.HolderSet<Flag> directChildrenHolders
    • childrenHolders

      protected final Set<net.minecraft.core.Holder<Flag>> childrenHolders
    • parentHolders

      protected final Set<net.minecraft.core.Holder<Flag>> parentHolders
    • familyInitialized

      protected boolean familyInitialized
    • descriptionId

      protected String descriptionId
    • absentDescriptionId

      protected String absentDescriptionId
    • childrenView

      protected Set<net.minecraft.core.Holder<Flag>> childrenView
    • parentsView

      protected Set<net.minecraft.core.Holder<Flag>> parentsView
  • Constructor Details

    • Flag

      public Flag(float preservationProportion, int color, int absentColor, net.minecraft.core.HolderSet<Flag> directChildrenHolders)
  • Method Details

    • compareHolders

      public static int compareHolders(net.minecraft.core.Holder<Flag> holder1, net.minecraft.core.Holder<Flag> holder2)
    • getPreservationProportion

      public float getPreservationProportion()
    • isPreserved

      public boolean isPreserved(double proportion)
    • getColor

      public int getColor()
    • getAbsentColor

      public int getAbsentColor()
    • getDirectChildrenHolders

      protected net.minecraft.core.HolderSet<Flag> getDirectChildrenHolders()
    • getChildren

      public Set<net.minecraft.core.Holder<Flag>> getChildren()
      All Flags (not just direct children) which any Flags automatically has if they have this Flag.
    • getParents

      public Set<net.minecraft.core.Holder<Flag>> getParents()
      Any Flags (not just direct parents) which, if a Flags has, will also belong to that Flags.
    • getName

      public static net.minecraft.network.chat.Component getName(net.minecraft.core.Holder<Flag> flagHolder)
    • getNameColored

      public static net.minecraft.network.chat.Component getNameColored(net.minecraft.core.Holder<Flag> flagHolder)
    • getAbsentName

      public static net.minecraft.network.chat.Component getAbsentName(net.minecraft.core.Holder<Flag> flagHolder)
    • getAbsentNameColored

      public static net.minecraft.network.chat.Component getAbsentNameColored(net.minecraft.core.Holder<Flag> flagHolder)
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • loadChildren

      public static final void loadChildren(net.minecraft.core.RegistryAccess registries)
    • onTagsUpdated

      public static final void onTagsUpdated(net.neoforged.neoforge.event.TagsUpdatedEvent event)