public class DropEvent
extends net.minecraftforge.fml.common.eventhandler.Event
Canceling this event will prevent any items from being dropped
Modifier and Type | Field and Description |
---|---|
ItemDropMode |
dropMode
The drop mode for these drops.
|
net.minecraft.entity.EntityCreature |
entity
The entity dropping the items.
|
net.minecraft.entity.player.EntityPlayerMP |
player
The player who will be given the drops
|
Constructor and Description |
---|
DropEvent(net.minecraft.entity.player.EntityPlayerMP player,
net.minecraft.entity.EntityCreature entity,
ItemDropMode dropMode,
java.util.ArrayList<DroppedItem> items) |
Modifier and Type | Method and Description |
---|---|
void |
addDrop(net.minecraft.item.ItemStack drop)
Adds an ItemStack to the drop list.
|
com.google.common.collect.ImmutableList<DroppedItem> |
getDrops()
All of the planned drops
|
boolean |
isPokemon()
Whether the entity dropping these items is a Pokémon
|
boolean |
isTrainer()
Whether the entity dropping these items is a Trainer
|
void |
removeDrop(DroppedItem drop)
Removes the given DroppedItem from the list of planned drops
|
public final net.minecraft.entity.player.EntityPlayerMP player
public final net.minecraft.entity.EntityCreature entity
public final ItemDropMode dropMode
ItemDropMode.NormalPokemon
is not usedpublic DropEvent(net.minecraft.entity.player.EntityPlayerMP player, net.minecraft.entity.EntityCreature entity, ItemDropMode dropMode, java.util.ArrayList<DroppedItem> items)
public com.google.common.collect.ImmutableList<DroppedItem> getDrops()
public void addDrop(net.minecraft.item.ItemStack drop)
public void removeDrop(DroppedItem drop)
public boolean isPokemon()
public boolean isTrainer()