Package me.hackware.api.mining
Record Class MineTargetView
java.lang.Object
java.lang.Record
me.hackware.api.mining.MineTargetView
- Record Components:
pos- the block positionphase- which pipeline slot holds the blockprogress- accumulated break progress 0.0–1.0 (0.0for queued blocks that haven't started)source- what requested the breakowner- the ownership tag given on the request, ornullfor untagged requests (manual mining, built-in modules)fromQueue- true when the block was fed from a queue rather than requested directly
public record MineTargetView(net.minecraft.core.BlockPos pos, MinePhase phase, double progress, me.hackware.client.modules.categories.player.SilentMine.MineSource source, String owner, boolean fromQueue)
extends Record
Immutable snapshot of a block tracked by the mining pipeline. Handed out by
MiningManager instead of the live internal target, so holding one
across ticks never observes (or corrupts) in-flight mining state.-
Constructor Summary
ConstructorsConstructorDescriptionMineTargetView(net.minecraft.core.BlockPos pos, MinePhase phase, double progress, me.hackware.client.modules.categories.player.SilentMine.MineSource source, String owner, boolean fromQueue) Creates an instance of aMineTargetViewrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.booleanReturns the value of thefromQueuerecord component.final inthashCode()Returns a hash code value for this object.owner()Returns the value of theownerrecord component.phase()Returns the value of thephaserecord component.net.minecraft.core.BlockPospos()Returns the value of theposrecord component.doubleprogress()Returns the value of theprogressrecord component.me.hackware.client.modules.categories.player.SilentMine.MineSourcesource()Returns the value of thesourcerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
MineTargetView
public MineTargetView(net.minecraft.core.BlockPos pos, MinePhase phase, double progress, me.hackware.client.modules.categories.player.SilentMine.MineSource source, String owner, boolean fromQueue) Creates an instance of aMineTargetViewrecord class.- Parameters:
pos- the value for theposrecord componentphase- the value for thephaserecord componentprogress- the value for theprogressrecord componentsource- the value for thesourcerecord componentowner- the value for theownerrecord componentfromQueue- the value for thefromQueuerecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
pos
public net.minecraft.core.BlockPos pos()Returns the value of theposrecord component.- Returns:
- the value of the
posrecord component
-
phase
Returns the value of thephaserecord component.- Returns:
- the value of the
phaserecord component
-
progress
public double progress()Returns the value of theprogressrecord component.- Returns:
- the value of the
progressrecord component
-
source
public me.hackware.client.modules.categories.player.SilentMine.MineSource source()Returns the value of thesourcerecord component.- Returns:
- the value of the
sourcerecord component
-
owner
Returns the value of theownerrecord component.- Returns:
- the value of the
ownerrecord component
-
fromQueue
public boolean fromQueue()Returns the value of thefromQueuerecord component.- Returns:
- the value of the
fromQueuerecord component
-