Class FillBucketEvent
- java.lang.Object
-
- net.minecraftforge.eventbus.api.Event
-
- net.minecraftforge.event.entity.EntityEvent
-
- net.minecraftforge.event.entity.living.LivingEvent
-
- net.minecraftforge.event.entity.player.PlayerEvent
-
- net.minecraftforge.event.entity.player.FillBucketEvent
-
public class FillBucketEvent extends PlayerEvent
This event is fired when a player attempts to use a Empty bucket, it can be canceled to completely prevent any further processing. If you set the result to 'ALLOW', it means that you have processed the event and wants the basic functionality of adding the new ItemStack to your inventory and reducing the stack size to process. setResult(ALLOW) is the same as the old setHandled();
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.minecraftforge.event.entity.player.PlayerEvent
PlayerEvent.BreakSpeed, PlayerEvent.Clone, PlayerEvent.HarvestCheck, PlayerEvent.ItemCraftedEvent, PlayerEvent.ItemPickupEvent, PlayerEvent.ItemSmeltedEvent, PlayerEvent.LoadFromFile, PlayerEvent.NameFormat, PlayerEvent.PlayerChangedDimensionEvent, PlayerEvent.PlayerChangeGameModeEvent, PlayerEvent.PlayerLoggedInEvent, PlayerEvent.PlayerLoggedOutEvent, PlayerEvent.PlayerRespawnEvent, PlayerEvent.SaveToFile, PlayerEvent.StartTracking, PlayerEvent.StopTracking, PlayerEvent.TabListNameFormat, PlayerEvent.Visibility
-
Nested classes/interfaces inherited from class net.minecraftforge.event.entity.living.LivingEvent
LivingEvent.LivingJumpEvent, LivingEvent.LivingUpdateEvent, LivingEvent.LivingVisibilityEvent
-
Nested classes/interfaces inherited from class net.minecraftforge.event.entity.EntityEvent
EntityEvent.CanUpdate, EntityEvent.EnteringChunk, EntityEvent.EntityConstructing, EntityEvent.Size
-
-
Constructor Summary
Constructors Constructor Description FillBucketEvent(PlayerEntity player, ItemStack current, World world, RayTraceResult target)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ItemStack
getEmptyBucket()
ItemStack
getFilledBucket()
RayTraceResult
getTarget()
World
getWorld()
void
setFilledBucket(ItemStack bucket)
-
Methods inherited from class net.minecraftforge.event.entity.player.PlayerEvent
getPlayer
-
Methods inherited from class net.minecraftforge.event.entity.living.LivingEvent
getEntityLiving
-
Methods inherited from class net.minecraftforge.event.entity.EntityEvent
getEntity
-
-
-
-
Field Detail
-
current
private final ItemStack current
-
world
private final World world
-
target
@Nullable private final RayTraceResult target
-
result
private ItemStack result
-
-
Constructor Detail
-
FillBucketEvent
public FillBucketEvent(PlayerEntity player, @Nonnull ItemStack current, World world, @Nullable RayTraceResult target)
-
-
Method Detail
-
getEmptyBucket
@Nonnull public ItemStack getEmptyBucket()
-
getWorld
public World getWorld()
-
getTarget
@Nullable public RayTraceResult getTarget()
-
getFilledBucket
@Nonnull public ItemStack getFilledBucket()
-
setFilledBucket
public void setFilledBucket(@Nonnull ItemStack bucket)
-
-