Record Class SoakedLootCondition
java.lang.Object
java.lang.Record
com.github.thedeathlycow.thermoo.api.predicate.SoakedLootCondition
- Record Components:
value- The soaking valuescale- The soaking scale
- All Implemented Interfaces:
Predicate<net.minecraft.world.level.storage.loot.LootContext>, net.minecraft.world.level.storage.loot.LootContextUser, net.minecraft.world.level.storage.loot.predicates.LootItemCondition, net.minecraft.world.level.storage.loot.Validatable
public record SoakedLootCondition(net.minecraft.advancements.criterion.MinMaxBounds.Ints value, net.minecraft.advancements.criterion.MinMaxBounds.Doubles scale)
extends Record
implements net.minecraft.world.level.storage.loot.predicates.LootItemCondition
Loot condition used to test the soaking values of an entity in a predicate. Only works for entities that implement
Soakable, which by default is only LivingEntity. All other entities will return
always false.-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.world.level.storage.loot.predicates.LootItemCondition
net.minecraft.world.level.storage.loot.predicates.LootItemCondition.Builder -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<SoakedLootCondition> Fields inherited from interface net.minecraft.world.level.storage.loot.predicates.LootItemCondition
DIRECT_CODEC, TYPED_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionSoakedLootCondition(net.minecraft.advancements.criterion.MinMaxBounds.Ints value, net.minecraft.advancements.criterion.MinMaxBounds.Doubles scale) Creates an instance of aSoakedLootConditionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic net.minecraft.world.level.storage.loot.predicates.LootItemCondition.Builderbuilder(net.minecraft.advancements.criterion.MinMaxBounds.Doubles scale) static net.minecraft.world.level.storage.loot.predicates.LootItemCondition.Builderbuilder(net.minecraft.advancements.criterion.MinMaxBounds.Ints value) com.mojang.serialization.MapCodec<SoakedLootCondition> codec()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.net.minecraft.advancements.criterion.MinMaxBounds.Doublesscale()Returns the value of thescalerecord component.booleantest(net.minecraft.world.level.storage.loot.LootContext lootContext) final StringtoString()Returns a string representation of this record class.net.minecraft.advancements.criterion.MinMaxBounds.Intsvalue()Returns the value of thevaluerecord component.Methods inherited from interface net.minecraft.world.level.storage.loot.LootContextUser
getReferencedContextParams, validate
-
Field Details
-
CODEC
-
-
Constructor Details
-
SoakedLootCondition
public SoakedLootCondition(net.minecraft.advancements.criterion.MinMaxBounds.Ints value, net.minecraft.advancements.criterion.MinMaxBounds.Doubles scale) Creates an instance of aSoakedLootConditionrecord class.
-
-
Method Details
-
codec
- Specified by:
codecin interfacenet.minecraft.world.level.storage.loot.predicates.LootItemCondition
-
test
-
builder
public static net.minecraft.world.level.storage.loot.predicates.LootItemCondition.Builder builder(net.minecraft.advancements.criterion.MinMaxBounds.Ints value) -
builder
public static net.minecraft.world.level.storage.loot.predicates.LootItemCondition.Builder builder(net.minecraft.advancements.criterion.MinMaxBounds.Doubles scale) -
toString
-
hashCode
-
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). -
value
-
scale
-