Record Class Costs.BlockMiningCosts
java.lang.Object
java.lang.Record
com.soulfiremc.server.pathfinding.Costs.BlockMiningCosts
- Enclosing class:
Costs
public static record Costs.BlockMiningCosts(double miningCost, @NonNull net.minecraft.world.item.ItemStack usedTool, boolean willDropUsableBlockItem)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionBlockMiningCosts(double miningCost, @NonNull net.minecraft.world.item.ItemStack usedTool, boolean willDropUsableBlockItem) Creates an instance of aBlockMiningCostsrecord 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.doubleReturns the value of theminingCostrecord component.final StringtoString()Returns a string representation of this record class.@NonNull net.minecraft.world.item.ItemStackusedTool()Returns the value of theusedToolrecord component.booleanReturns the value of thewillDropUsableBlockItemrecord component.
-
Constructor Details
-
BlockMiningCosts
public BlockMiningCosts(double miningCost, @NonNull net.minecraft.world.item.ItemStack usedTool, boolean willDropUsableBlockItem) Creates an instance of aBlockMiningCostsrecord class.- Parameters:
miningCost- the value for theminingCostrecord componentusedTool- the value for theusedToolrecord componentwillDropUsableBlockItem- the value for thewillDropUsableBlockItemrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
miningCost
public double miningCost()Returns the value of theminingCostrecord component.- Returns:
- the value of the
miningCostrecord component
-
usedTool
public @NonNull net.minecraft.world.item.ItemStack usedTool()Returns the value of theusedToolrecord component.- Returns:
- the value of the
usedToolrecord component
-
willDropUsableBlockItem
public boolean willDropUsableBlockItem()Returns the value of thewillDropUsableBlockItemrecord component.- Returns:
- the value of the
willDropUsableBlockItemrecord component
-