Record Class BuiltinTemperatureSourcesImpl
java.lang.Object
java.lang.Record
com.github.thedeathlycow.thermoo.impl.core.BuiltinTemperatureSourcesImpl
- All Implemented Interfaces:
BuiltinTemperatureSources
public record BuiltinTemperatureSourcesImpl(TemperatureChange absolute, TemperatureChange active, TemperatureChange passive, TemperatureChange environment, net.minecraft.core.RegistryAccess access)
extends Record
implements BuiltinTemperatureSources
-
Constructor Summary
ConstructorsConstructorDescriptionBuiltinTemperatureSourcesImpl(TemperatureChange absolute, TemperatureChange active, TemperatureChange passive, TemperatureChange environment, net.minecraft.core.RegistryAccess access) Creates an instance of aBuiltinTemperatureSourcesImplrecord class.BuiltinTemperatureSourcesImpl(net.minecraft.core.RegistryAccess access) -
Method Summary
Modifier and TypeMethodDescriptionabsolute()Returns the value of theabsoluterecord component.net.minecraft.core.RegistryAccessaccess()Returns the value of theaccessrecord component.active()Returns the value of theactiverecord component.create(net.minecraft.resources.ResourceKey<TemperatureSource> sourceKey) Creates a simple temperature change context with only a type and no cause or position.create(net.minecraft.resources.ResourceKey<TemperatureSource> sourceKey, net.minecraft.world.entity.Entity directCause) Creates a temperature change context with a type and a directCause entity.create(net.minecraft.resources.ResourceKey<TemperatureSource> sourceKey, net.minecraft.world.entity.Entity cause, net.minecraft.world.entity.Entity directCause) Creates a temperature change context with a type, a cause entity, and a direct cause entity.create(net.minecraft.resources.ResourceKey<TemperatureSource> sourceKey, net.minecraft.world.phys.Vec3 position) Creates a temperature change context with a type and a position, but no cause.Returns the value of theenvironmentrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.passive()Returns the value of thepassiverecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
BuiltinTemperatureSourcesImpl
public BuiltinTemperatureSourcesImpl(net.minecraft.core.RegistryAccess access) -
BuiltinTemperatureSourcesImpl
public BuiltinTemperatureSourcesImpl(TemperatureChange absolute, TemperatureChange active, TemperatureChange passive, TemperatureChange environment, net.minecraft.core.RegistryAccess access) Creates an instance of aBuiltinTemperatureSourcesImplrecord class.- Parameters:
absolute- the value for theabsoluterecord componentactive- the value for theactiverecord componentpassive- the value for thepassiverecord componentenvironment- the value for theenvironmentrecord componentaccess- the value for theaccessrecord component
-
-
Method Details
-
create
Description copied from interface:BuiltinTemperatureSourcesCreates a simple temperature change context with only a type and no cause or position.- Specified by:
createin interfaceBuiltinTemperatureSources- Parameters:
sourceKey- The key of the change source, may not benull.
-
create
public TemperatureChange create(net.minecraft.resources.ResourceKey<TemperatureSource> sourceKey, net.minecraft.world.phys.Vec3 position) Description copied from interface:BuiltinTemperatureSourcesCreates a temperature change context with a type and a position, but no cause.- Specified by:
createin interfaceBuiltinTemperatureSources- Parameters:
sourceKey- The key of the change source, may not benull.position- The position of the temperature change source, may not benull.
-
create
public TemperatureChange create(net.minecraft.resources.ResourceKey<TemperatureSource> sourceKey, net.minecraft.world.entity.Entity directCause) Description copied from interface:BuiltinTemperatureSourcesCreates a temperature change context with a type and a directCause entity. If thedirectCauseis aTraceableEntityand has a non-null owner, then theTemperatureChange.cause()will refer to the owner. Otherwise, theTemperatureChange.directCause()andTemperatureChange.cause()will refer to the same entity. In either case, theTemperatureChange.position()will be the directCause's position.- Specified by:
createin interfaceBuiltinTemperatureSources- Parameters:
sourceKey- The key of the change source, may not benull.directCause- The entity directly responsible for the change, may not benull.
-
create
public TemperatureChange create(net.minecraft.resources.ResourceKey<TemperatureSource> sourceKey, net.minecraft.world.entity.Entity cause, net.minecraft.world.entity.Entity directCause) Description copied from interface:BuiltinTemperatureSourcesCreates a temperature change context with a type, a cause entity, and a direct cause entity. TheTemperatureChange.position()will be the direct cause's position.- Specified by:
createin interfaceBuiltinTemperatureSources- Parameters:
sourceKey- The key of the change source, may not benull.cause- The entity responsible for the change, may not benull.directCause- The entity directly responsible for the change, may not benull.
-
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). -
absolute
Returns the value of theabsoluterecord component.- Specified by:
absolutein interfaceBuiltinTemperatureSources- Returns:
- the value of the
absoluterecord component
-
active
Returns the value of theactiverecord component.- Specified by:
activein interfaceBuiltinTemperatureSources- Returns:
- the value of the
activerecord component
-
passive
Returns the value of thepassiverecord component.- Specified by:
passivein interfaceBuiltinTemperatureSources- Returns:
- the value of the
passiverecord component
-
environment
Returns the value of theenvironmentrecord component.- Specified by:
environmentin interfaceBuiltinTemperatureSources- Returns:
- the value of the
environmentrecord component
-
access
public net.minecraft.core.RegistryAccess access()Returns the value of theaccessrecord component.- Returns:
- the value of the
accessrecord component
-