Record Class EnvironmentTickContextImpl<T extends TemperatureAware & Soakable>
java.lang.Object
java.lang.Record
com.github.thedeathlycow.thermoo.impl.environment.EnvironmentTickContextImpl<T>
- All Implemented Interfaces:
EnvironmentTickContext<T>
public record EnvironmentTickContextImpl<T extends TemperatureAware & Soakable>(T extends TemperatureAware & Soakable affected, net.minecraft.server.level.ServerLevel level, net.minecraft.core.BlockPos pos, net.minecraft.core.component.DataComponentMap components)
extends Record
implements EnvironmentTickContext<T>
-
Constructor Summary
ConstructorsConstructorDescriptionEnvironmentTickContextImpl(T affected, net.minecraft.server.level.ServerLevel level, net.minecraft.core.BlockPos pos, net.minecraft.core.component.DataComponentMap components) Creates an instance of aEnvironmentTickContextImplrecord class. -
Method Summary
Modifier and TypeMethodDescriptionaffected()Returns the value of theaffectedrecord component.net.minecraft.core.component.DataComponentMapReturns the value of thecomponentsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.net.minecraft.server.level.ServerLevellevel()Returns the value of thelevelrecord component.net.minecraft.core.BlockPospos()Returns the value of theposrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.github.thedeathlycow.thermoo.api.temperature.event.EnvironmentTickContext
world
-
Constructor Details
-
EnvironmentTickContextImpl
public EnvironmentTickContextImpl(T affected, net.minecraft.server.level.ServerLevel level, net.minecraft.core.BlockPos pos, net.minecraft.core.component.DataComponentMap components) Creates an instance of aEnvironmentTickContextImplrecord class.- Parameters:
affected- the value for theaffectedrecord componentlevel- the value for thelevelrecord componentpos- the value for theposrecord componentcomponents- the value for thecomponentsrecord component
-
-
Method Details
-
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). -
affected
Returns the value of theaffectedrecord component.- Specified by:
affectedin interfaceEnvironmentTickContext<T extends TemperatureAware & Soakable>- Returns:
- the value of the
affectedrecord component
-
level
public net.minecraft.server.level.ServerLevel level()Returns the value of thelevelrecord component.- Specified by:
levelin interfaceEnvironmentTickContext<T extends TemperatureAware & Soakable>- Returns:
- the value of the
levelrecord component
-
pos
public net.minecraft.core.BlockPos pos()Returns the value of theposrecord component.- Specified by:
posin interfaceEnvironmentTickContext<T extends TemperatureAware & Soakable>- Returns:
- the value of the
posrecord component
-
components
public net.minecraft.core.component.DataComponentMap components()Returns the value of thecomponentsrecord component.- Specified by:
componentsin interfaceEnvironmentTickContext<T extends TemperatureAware & Soakable>- Returns:
- the value of the
componentsrecord component
-