Package petrolpark.mc.library.core.flags
Class Flag
java.lang.Object
petrolpark.mc.library.core.flags.Flag
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal intprotected Stringstatic final com.mojang.serialization.Codec<net.minecraft.core.Holder<Flag>> final intprotected Stringstatic final com.mojang.serialization.Codec<Flag> protected final net.minecraft.core.HolderSet<Flag> protected booleanfinal floatstatic final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, net.minecraft.core.Holder<Flag>> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic intcompareHolders(net.minecraft.core.Holder<Flag> holder1, net.minecraft.core.Holder<Flag> holder2) booleanintstatic net.minecraft.network.chat.ComponentgetAbsentName(net.minecraft.core.Holder<Flag> flagHolder) static net.minecraft.network.chat.ComponentgetAbsentNameColored(net.minecraft.core.Holder<Flag> flagHolder) All Flags (not just direct children) which any Flags automatically has if they have this Flag.intgetColor()protected net.minecraft.core.HolderSet<Flag> static net.minecraft.network.chat.Componentstatic net.minecraft.network.chat.ComponentgetNameColored(net.minecraft.core.Holder<Flag> flagHolder) Any Flags (not just direct parents) which, if a Flags has, will also belong to that Flags.floatbooleanisPreserved(double proportion) static final voidloadChildren(net.minecraft.core.RegistryAccess registries) static final voidonTagsUpdated(net.neoforged.neoforge.event.TagsUpdatedEvent event)
-
Field Details
-
DIRECT_CODEC
-
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
-
childrenHolders
-
parentHolders
-
familyInitialized
protected boolean familyInitialized -
descriptionId
-
absentDescriptionId
-
childrenView
-
parentsView
-
-
Constructor Details
-
Flag
public Flag(float preservationProportion, int color, int absentColor, net.minecraft.core.HolderSet<Flag> directChildrenHolders)
-
-
Method Details
-
compareHolders
-
getPreservationProportion
public float getPreservationProportion() -
isPreserved
public boolean isPreserved(double proportion) -
getColor
public int getColor() -
getAbsentColor
public int getAbsentColor() -
getDirectChildrenHolders
-
getChildren
All Flags (not just direct children) which any Flags automatically has if they have this 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
-
loadChildren
public static final void loadChildren(net.minecraft.core.RegistryAccess registries) -
onTagsUpdated
public static final void onTagsUpdated(net.neoforged.neoforge.event.TagsUpdatedEvent event)
-