Record Class TemperatureSourceImpl
java.lang.Object
java.lang.Record
com.github.thedeathlycow.thermoo.impl.core.TemperatureSourceImpl
- All Implemented Interfaces:
TemperatureSource
public record TemperatureSourceImpl(net.minecraft.network.chat.Component description, Optional<TemperatureReduction> reduction, @Range(from=0L,to=2147483647L) int tickInterval)
extends Record
implements TemperatureSource
-
Nested Class Summary
Nested classes/interfaces inherited from interface TemperatureSource
TemperatureSource.Builder -
Field Summary
Fields inherited from interface TemperatureSource
CODEC, DIRECT_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionTemperatureSourceImpl(net.minecraft.network.chat.Component description, Optional<TemperatureReduction> reduction, @Range(from=0L,to=2147483647L) int tickInterval) Creates an instance of aTemperatureSourceImplrecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.network.chat.ComponentReturns the value of thedescriptionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thereductionrecord component.@Range(from=0L,to=2147483647L) intReturns the value of thetickIntervalrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
TemperatureSourceImpl
public TemperatureSourceImpl(net.minecraft.network.chat.Component description, Optional<TemperatureReduction> reduction, @Range(from=0L,to=2147483647L) int tickInterval) Creates an instance of aTemperatureSourceImplrecord class.- Parameters:
description- the value for thedescriptionrecord componentreduction- the value for thereductionrecord componenttickInterval- the value for thetickIntervalrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
description
public net.minecraft.network.chat.Component description()Returns the value of thedescriptionrecord component.- Specified by:
descriptionin interfaceTemperatureSource- Returns:
- the value of the
descriptionrecord component
-
reduction
Returns the value of thereductionrecord component.- Specified by:
reductionin interfaceTemperatureSource- Returns:
- the value of the
reductionrecord component
-
tickInterval
public @Range(from=0L,to=2147483647L) int tickInterval()Returns the value of thetickIntervalrecord component.- Specified by:
tickIntervalin interfaceTemperatureSource- Returns:
- the value of the
tickIntervalrecord component
-