public class TeleportItemEvent
extends net.minecraftforge.eventbus.api.Event
Modifier and Type | Class and Description |
---|---|
static class |
TeleportItemEvent.Post
Fired after the player has been teleported using an item
|
static class |
TeleportItemEvent.Pre
Fired before the teleport occurs, Level, Position and if the item is consumed can be set here to modify where the item teleports the player.
|
Modifier and Type | Field and Description |
---|---|
protected boolean |
consumeItemStack |
protected net.minecraft.item.ItemStack |
itemStack |
protected java.lang.String |
level |
protected net.minecraft.entity.player.PlayerEntity |
player |
protected net.minecraft.util.math.BlockPos |
teleportPosition |
protected boolean |
teleportToSpawnpoint |
Constructor and Description |
---|
TeleportItemEvent(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 |
---|---|
net.minecraft.item.ItemStack |
getItemStack() |
java.lang.String |
getLevel() |
net.minecraft.entity.player.PlayerEntity |
getPlayer() |
net.minecraft.util.math.BlockPos |
getTeleportPosition() |
boolean |
shouldConsumeItemStack() |
boolean |
shouldTeleportToSpawnpoint() |
protected net.minecraft.item.ItemStack itemStack
protected net.minecraft.entity.player.PlayerEntity player
protected java.lang.String level
protected net.minecraft.util.math.BlockPos teleportPosition
protected boolean consumeItemStack
protected boolean teleportToSpawnpoint
public TeleportItemEvent(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 net.minecraft.item.ItemStack getItemStack()
public net.minecraft.entity.player.PlayerEntity getPlayer()
public java.lang.String getLevel()
public net.minecraft.util.math.BlockPos getTeleportPosition()
public boolean shouldConsumeItemStack()
public boolean shouldTeleportToSpawnpoint()