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.world.ServerWorld world, net.minecraft.util.math.BlockPos pos, net.minecraft.component.ComponentMap components)
extends Record
implements EnvironmentTickContext<T>
-
Constructor Summary
ConstructorsConstructorDescriptionEnvironmentTickContextImpl(T affected, net.minecraft.server.world.ServerWorld world, net.minecraft.util.math.BlockPos pos, net.minecraft.component.ComponentMap components) Creates an instance of aEnvironmentTickContextImplrecord class. -
Method Summary
Modifier and TypeMethodDescriptionaffected()Returns the value of theaffectedrecord component.net.minecraft.component.ComponentMapReturns 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.util.math.BlockPospos()Returns the value of theposrecord component.final StringtoString()Returns a string representation of this record class.net.minecraft.server.world.ServerWorldworld()Returns the value of theworldrecord component.
-
Constructor Details
-
EnvironmentTickContextImpl
public EnvironmentTickContextImpl(T affected, net.minecraft.server.world.ServerWorld world, net.minecraft.util.math.BlockPos pos, net.minecraft.component.ComponentMap components) Creates an instance of aEnvironmentTickContextImplrecord class.- Parameters:
affected- the value for theaffectedrecord componentworld- the value for theworldrecord 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
-
world
public net.minecraft.server.world.ServerWorld world()Returns the value of theworldrecord component.- Specified by:
worldin interfaceEnvironmentTickContext<T extends TemperatureAware & Soakable>- Returns:
- the value of the
worldrecord component
-
pos
public net.minecraft.util.math.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.component.ComponentMap components()Returns the value of thecomponentsrecord component.- Specified by:
componentsin interfaceEnvironmentTickContext<T extends TemperatureAware & Soakable>- Returns:
- the value of the
componentsrecord component
-