Record Class VanillaBlockCodecs.Campfire
java.lang.Object
java.lang.Record
net.rebel459.unified.api.registry.VanillaBlockCodecs.Campfire
- Enclosing class:
VanillaBlockCodecs
public static record VanillaBlockCodecs.Campfire(boolean spawnParticles, int fireDamage)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<VanillaBlockCodecs.Campfire> -
Constructor Summary
ConstructorsConstructorDescriptionCampfire(boolean spawnParticles, int fireDamage) Creates an instance of aCampfirerecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.intReturns the value of thefireDamagerecord component.final inthashCode()Returns a hash code value for this object.booleanReturns the value of thespawnParticlesrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
CODEC
-
-
Constructor Details
-
Campfire
public Campfire(boolean spawnParticles, int fireDamage) Creates an instance of aCampfirerecord class.- Parameters:
spawnParticles- the value for thespawnParticlesrecord componentfireDamage- the value for thefireDamagerecord component
-
-
Method Details
-
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 with thecomparemethod from their corresponding wrapper classes. -
spawnParticles
public boolean spawnParticles()Returns the value of thespawnParticlesrecord component.- Returns:
- the value of the
spawnParticlesrecord component
-
fireDamage
public int fireDamage()Returns the value of thefireDamagerecord component.- Returns:
- the value of the
fireDamagerecord component
-