Record Class GrowthContext
java.lang.Object
java.lang.Record
at.minecraftschurli.mods.arsmagicalegacy.api.plant.GrowthContext
- Record Components:
plant- ThePlantto use.player- TheServerPlayerto use.level- TheServerLevelto use.pos- TheBlockPosto use.state- TheBlockStateto use.tool- TheItemStackto use.
public record GrowthContext(Plant plant, net.minecraft.server.level.ServerPlayer player, net.minecraft.server.level.ServerLevel level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.item.ItemStack tool)
extends Record
A context record used for most methods in
GrowthType.-
Constructor Summary
ConstructorsConstructorDescriptionGrowthContext(Plant plant, net.minecraft.server.level.ServerPlayer player, net.minecraft.server.level.ServerLevel level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.item.ItemStack tool) Creates an instance of aGrowthContextrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal 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.plant()Returns the value of theplantrecord component.net.minecraft.server.level.ServerPlayerplayer()Returns the value of theplayerrecord component.net.minecraft.core.BlockPospos()Returns the value of theposrecord component.net.minecraft.world.level.block.state.BlockStatestate()Returns the value of thestaterecord component.net.minecraft.world.item.ItemStacktool()Returns the value of thetoolrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
GrowthContext
public GrowthContext(Plant plant, net.minecraft.server.level.ServerPlayer player, net.minecraft.server.level.ServerLevel level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.item.ItemStack tool) Creates an instance of aGrowthContextrecord class.- Parameters:
plant- the value for theplantrecord componentplayer- the value for theplayerrecord componentlevel- the value for thelevelrecord componentpos- the value for theposrecord componentstate- the value for thestaterecord componenttool- the value for thetoolrecord 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 withObjects::equals(Object,Object). -
plant
-
player
-
level
-
pos
-
state
-
tool
-