public class DropEvent
extends net.minecraftforge.eventbus.api.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.CreatureEntity |
entity
The entity dropping the items.
|
net.minecraft.entity.player.ServerPlayerEntity |
player
The player who will be given the drops
|
Constructor and Description |
---|
DropEvent(net.minecraft.entity.player.ServerPlayerEntity player,
net.minecraft.entity.CreatureEntity 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.ServerPlayerEntity player
public final net.minecraft.entity.CreatureEntity entity
public final ItemDropMode dropMode
ItemDropMode.NormalPokemon
is not usedpublic DropEvent(net.minecraft.entity.player.ServerPlayerEntity player, net.minecraft.entity.CreatureEntity 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()