public static class TeleportItemEvent.Pre extends TeleportItemEvent
TeleportItemEvent.Post, TeleportItemEvent.Pre
consumeItemStack, itemStack, level, player, teleportPosition, teleportToSpawnpoint
Constructor and Description |
---|
Pre(net.minecraft.item.ItemStack item,
net.minecraft.entity.player.PlayerEntity player,
java.lang.String level,
net.minecraft.util.math.BlockPos teleportPosition,
boolean consumeItemStack,
boolean teleportToSpawnpoint) |
Modifier and Type | Method and Description |
---|---|
void |
setConsumeItem(boolean consumeItemStack) |
void |
setLevel(java.lang.String level) |
void |
setTeleportPosition(net.minecraft.util.math.BlockPos teleportPosition) |
void |
setTeleportToSpawnpoint(boolean teleportToSpawnpoint) |
getItemStack, getLevel, getPlayer, getTeleportPosition, shouldConsumeItemStack, shouldTeleportToSpawnpoint
public Pre(net.minecraft.item.ItemStack item, net.minecraft.entity.player.PlayerEntity player, java.lang.String level, net.minecraft.util.math.BlockPos teleportPosition, boolean consumeItemStack, boolean teleportToSpawnpoint)
public void setLevel(java.lang.String level)
level
- - The level you would like the player to teleport topublic void setTeleportPosition(net.minecraft.util.math.BlockPos teleportPosition)
teleportPosition
- - The Blockpos to teleport the player topublic void setConsumeItem(boolean consumeItemStack)
consumeItemStack
- - If the item should be consumeed on usepublic void setTeleportToSpawnpoint(boolean teleportToSpawnpoint)
teleportToSpawnpoint
- - If the location should be overriden and the item should teleport a user to their spawnpoint