Record Class FluidTagEmptyCondition
java.lang.Object
java.lang.Record
com.petrolpark.core.data.condition.FluidTagEmptyCondition
- All Implemented Interfaces:
net.neoforged.neoforge.common.conditions.ICondition
public record FluidTagEmptyCondition(net.minecraft.tags.TagKey<net.minecraft.world.level.material.Fluid> tag)
extends Record
implements net.neoforged.neoforge.common.conditions.ICondition
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.neoforged.neoforge.common.conditions.ICondition
net.neoforged.neoforge.common.conditions.ICondition.IContext -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<FluidTagEmptyCondition> Fields inherited from interface net.neoforged.neoforge.common.conditions.ICondition
LIST_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionFluidTagEmptyCondition(String location) FluidTagEmptyCondition(String namespace, String path) FluidTagEmptyCondition(net.minecraft.resources.ResourceLocation tag) FluidTagEmptyCondition(net.minecraft.tags.TagKey<net.minecraft.world.level.material.Fluid> tag) Creates an instance of aFluidTagEmptyConditionrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.MapCodec<FluidTagEmptyCondition> codec()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.net.minecraft.tags.TagKey<net.minecraft.world.level.material.Fluid> tag()Returns the value of thetagrecord component.booleantest(net.neoforged.neoforge.common.conditions.ICondition.IContext context) toString()Returns a string representation of this record class.
-
Field Details
-
CODEC
-
-
Constructor Details
-
FluidTagEmptyCondition
-
FluidTagEmptyCondition
-
FluidTagEmptyCondition
public FluidTagEmptyCondition(net.minecraft.resources.ResourceLocation tag) -
FluidTagEmptyCondition
public FluidTagEmptyCondition(net.minecraft.tags.TagKey<net.minecraft.world.level.material.Fluid> tag) Creates an instance of aFluidTagEmptyConditionrecord class.- Parameters:
tag- the value for thetagrecord component
-
-
Method Details
-
test
public boolean test(@Nonnull net.neoforged.neoforge.common.conditions.ICondition.IContext context) - Specified by:
testin interfacenet.neoforged.neoforge.common.conditions.ICondition
-
codec
- Specified by:
codecin interfacenet.neoforged.neoforge.common.conditions.ICondition
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
tag
public net.minecraft.tags.TagKey<net.minecraft.world.level.material.Fluid> tag()Returns the value of thetagrecord component.- Returns:
- the value of the
tagrecord component
-