Record Class EntityMiningCostCalculator
java.lang.Object
java.lang.Record
com.soulfiremc.server.pathfinding.cost.EntityMiningCostCalculator
- All Implemented Interfaces:
MiningCostCalculator
public record EntityMiningCostCalculator(net.minecraft.client.player.LocalPlayer player)
extends Record
implements MiningCostCalculator
-
Constructor Summary
ConstructorsConstructorDescriptionEntityMiningCostCalculator(net.minecraft.client.player.LocalPlayer player) Creates an instance of aEntityMiningCostCalculatorrecord class. -
Method Summary
Modifier and TypeMethodDescription@Nullable BlockMiningCostscalculateBlockBreakCost(ProjectedInventory inventory, net.minecraft.world.level.block.state.BlockState blockState, double breakBlockPenalty) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.net.minecraft.client.player.LocalPlayerplayer()Returns the value of theplayerrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
EntityMiningCostCalculator
public EntityMiningCostCalculator(net.minecraft.client.player.LocalPlayer player) Creates an instance of aEntityMiningCostCalculatorrecord class.- Parameters:
player- the value for theplayerrecord component
-
-
Method Details
-
calculateBlockBreakCost
public @Nullable BlockMiningCosts calculateBlockBreakCost(ProjectedInventory inventory, net.minecraft.world.level.block.state.BlockState blockState, double breakBlockPenalty) - Specified by:
calculateBlockBreakCostin interfaceMiningCostCalculator
-
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). -
player
public net.minecraft.client.player.LocalPlayer player()Returns the value of theplayerrecord component.- Returns:
- the value of the
playerrecord component
-