public class RobotUsedTool extends RobotEvent
| Modifier and Type | Class and Description |
|---|---|
static class |
RobotUsedTool.ApplyDamageRate
Fired when a robot used a tool and the previously fired damage rate
computation returned a value smaller than one.
|
static class |
RobotUsedTool.ComputeDamageRate
Fired when a robot used a tool and is about to apply the damage rate to
partially undo the durability loss.
|
| Modifier and Type | Field and Description |
|---|---|
protected double |
damageRate |
net.minecraft.item.ItemStack |
toolAfterUse
The tool that was used, before and after use.
|
net.minecraft.item.ItemStack |
toolBeforeUse
The tool that was used, before and after use.
|
robot| Modifier | Constructor and Description |
|---|---|
protected |
RobotUsedTool(Robot robot,
net.minecraft.item.ItemStack toolBeforeUse,
net.minecraft.item.ItemStack toolAfterUse,
double damageRate) |
| Modifier and Type | Method and Description |
|---|---|
double |
getDamageRate()
The rate at which the used tool should lose durability, where one means
it loses durability at full speed, zero means it doesn't lose durability
at all.
|
public final net.minecraft.item.ItemStack toolBeforeUse
public final net.minecraft.item.ItemStack toolAfterUse
protected double damageRate
protected RobotUsedTool(Robot robot, net.minecraft.item.ItemStack toolBeforeUse, net.minecraft.item.ItemStack toolAfterUse, double damageRate)