Class Contaminant
java.lang.Object
com.petrolpark.core.contamination.Contaminant
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal intprotected Stringprotected final Set<net.minecraft.core.Holder<Contaminant>> protected Set<net.minecraft.core.Holder<Contaminant>> static final com.mojang.serialization.Codec<net.minecraft.core.Holder<Contaminant>> final intprotected Stringstatic final com.mojang.serialization.Codec<Contaminant> protected final net.minecraft.core.HolderSet<Contaminant> protected booleanprotected final Set<net.minecraft.core.Holder<Contaminant>> protected Set<net.minecraft.core.Holder<Contaminant>> final floatstatic final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, net.minecraft.core.Holder<Contaminant>> -
Constructor Summary
ConstructorsConstructorDescriptionContaminant(float preservationProportion, int color, int absentColor, net.minecraft.core.HolderSet<Contaminant> directChildrenHolders) -
Method Summary
Modifier and TypeMethodDescriptionstatic intcompareHolders(net.minecraft.core.Holder<Contaminant> holder1, net.minecraft.core.Holder<Contaminant> holder2) booleanintstatic net.minecraft.network.chat.ComponentgetAbsentName(net.minecraft.core.Holder<Contaminant> contaminantHolder) static net.minecraft.network.chat.ComponentgetAbsentNameColored(net.minecraft.core.Holder<Contaminant> contaminantHolder) Set<net.minecraft.core.Holder<Contaminant>> All Contaminants (not just direct children) which any Contamination automatically has if they have this Contaminant.intgetColor()protected net.minecraft.core.HolderSet<Contaminant> static net.minecraft.network.chat.ComponentgetName(net.minecraft.core.Holder<Contaminant> contaminantHolder) static net.minecraft.network.chat.ComponentgetNameColored(net.minecraft.core.Holder<Contaminant> contaminantHolder) Set<net.minecraft.core.Holder<Contaminant>> Any Contaminants (not just direct parents) which, if a Contamination has, will also belong to that Contamination.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<Contaminant>> 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
-
Contaminant
public Contaminant(float preservationProportion, int color, int absentColor, net.minecraft.core.HolderSet<Contaminant> directChildrenHolders)
-
-
Method Details
-
compareHolders
public static int compareHolders(net.minecraft.core.Holder<Contaminant> holder1, net.minecraft.core.Holder<Contaminant> holder2) -
getPreservationProportion
public float getPreservationProportion() -
isPreserved
public boolean isPreserved(double proportion) -
getColor
public int getColor() -
getAbsentColor
public int getAbsentColor() -
getDirectChildrenHolders
-
getChildren
All Contaminants (not just direct children) which any Contamination automatically has if they have this Contaminant. -
getParents
Any Contaminants (not just direct parents) which, if a Contamination has, will also belong to that Contamination. -
getName
public static net.minecraft.network.chat.Component getName(net.minecraft.core.Holder<Contaminant> contaminantHolder) -
getNameColored
public static net.minecraft.network.chat.Component getNameColored(net.minecraft.core.Holder<Contaminant> contaminantHolder) -
getAbsentName
public static net.minecraft.network.chat.Component getAbsentName(net.minecraft.core.Holder<Contaminant> contaminantHolder) -
getAbsentNameColored
public static net.minecraft.network.chat.Component getAbsentNameColored(net.minecraft.core.Holder<Contaminant> contaminantHolder) -
equals
-
loadChildren
public static final void loadChildren(net.minecraft.core.RegistryAccess registries) -
onTagsUpdated
public static final void onTagsUpdated(net.neoforged.neoforge.event.TagsUpdatedEvent event)
-