public final class DeathChestInteractions extends Object
| Modifier and Type | Method and Description |
|---|---|
static boolean |
attemptBreak(net.minecraft.util.math.BlockPos pos,
DeathChest deathChest,
net.minecraft.server.network.ServerPlayerEntity player)
Called when a player attempts to break a death chest.
|
static boolean |
attemptInteract(DeathChest deathChest,
net.minecraft.server.network.ServerPlayerEntity player)
If the specified death chest is locked, an unlock attempt is performed.
|
static net.minecraft.util.ActionResult |
interact(net.minecraft.entity.player.PlayerEntity player,
net.minecraft.world.World world,
net.minecraft.util.Hand hand,
net.minecraft.util.hit.BlockHitResult blockHitResult)
Called when a block is right-clicked.
|
public static net.minecraft.util.ActionResult interact(net.minecraft.entity.player.PlayerEntity player,
net.minecraft.world.World world,
net.minecraft.util.Hand hand,
net.minecraft.util.hit.BlockHitResult blockHitResult)
player - the player.world - the world.hand - the hand.blockHitResult - the BlockHitResult.ActionResult.PASS if the interaction can occur,
or ActionResult.SUCCESS if it cannot.public static boolean attemptInteract(DeathChest deathChest, net.minecraft.server.network.ServerPlayerEntity player)
deathChest - a death chest.player - a player.true if the player can interact with the death chest,
or otherwise false.public static boolean attemptBreak(net.minecraft.util.math.BlockPos pos,
DeathChest deathChest,
net.minecraft.server.network.ServerPlayerEntity player)
true and the death chest is a double chest, the other death chest
block is automatically destroyed.pos - a position.deathChest - a death chest.player - a player.true if the death chest should be broken, or otherwise false.