public class LensUsedEvent
extends net.minecraftforge.eventbus.api.Event
Cancelling this event will prevent the Pokémon from having its information revealed. By default, it will also
prevent the item from being damaged by the use. This can be changed by setting shouldItemBeDamaged
to false.
Created by Waterdude
Modifier and Type | Field and Description |
---|---|
RasLensItem |
lens
The specific
RasLensItem that the player is using. |
PixelmonEntity |
pixelmon
The
PixelmonEntity the lens is being used on. |
net.minecraft.entity.player.ServerPlayerEntity |
player
The player using the lens.
|
boolean |
shouldItemBeDamaged
Whether or not the lens item should be damaged by this interaction, defaulting to true.
|
net.minecraft.item.ItemStack |
stack
The
ItemStack representing the lens. |
Constructor and Description |
---|
LensUsedEvent(net.minecraft.entity.player.ServerPlayerEntity player,
PixelmonEntity pixelmon,
net.minecraft.item.ItemStack stack) |
Modifier and Type | Method and Description |
---|---|
void |
setCanceled(boolean cancelled) |
public boolean shouldItemBeDamaged
public final net.minecraft.entity.player.ServerPlayerEntity player
public final PixelmonEntity pixelmon
PixelmonEntity
the lens is being used on.public final net.minecraft.item.ItemStack stack
ItemStack
representing the lens.public final RasLensItem lens
RasLensItem
that the player is using. This is easily derived from stack
and is just for convenience.public LensUsedEvent(net.minecraft.entity.player.ServerPlayerEntity player, PixelmonEntity pixelmon, net.minecraft.item.ItemStack stack)