public class LensUsedEvent
extends net.minecraftforge.fml.common.eventhandler.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 Hiroku
Modifier and Type | Field and Description |
---|---|
ItemHirokusLens |
lens
The specific
ItemHirokusLens that the player is using. |
EntityPixelmon |
pixelmon
The
EntityPixelmon the lens is being used on. |
net.minecraft.entity.player.EntityPlayerMP |
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.EntityPlayerMP player,
EntityPixelmon 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.EntityPlayerMP player
public final EntityPixelmon pixelmon
EntityPixelmon
the lens is being used on.public final net.minecraft.item.ItemStack stack
ItemStack
representing the lens.public final ItemHirokusLens lens
ItemHirokusLens
that the player is using. This is easily derived from stack
and is just for convenience.public LensUsedEvent(net.minecraft.entity.player.EntityPlayerMP player, EntityPixelmon pixelmon, net.minecraft.item.ItemStack stack)