Package org.moddingx.libx.event
Class InteractBlockEmptyHandEvent
java.lang.Object
net.neoforged.bus.api.Event
org.moddingx.libx.event.InteractBlockEmptyHandEvent
- All Implemented Interfaces:
- ICancellableEvent
Fired on right click with an empty hand but after the block action was processed. If this
 is not canceled, 
InteractionResult.PASS is returned from the click. If this is canceled,
 the value of cancellationResult is returned.
 This is only fired on the server.
 IMPORTANT: Canceling this with InteractionResult.CONSUME for the main hand does not mean
 it won't be posted for the offhand. For this cancel PlayerInteractEvent.RightClickBlock
 on the client.
 Returning InteractionResult.SUCCESS will swing the arm. However, it will first try to
 propagate to the offhand. So in order to swing the main hand, the event for the main hand has to
 return InteractionResult.SUCCESS and for the offhand InteractionResult.PASS.- 
Constructor SummaryConstructorsConstructorDescriptionInteractBlockEmptyHandEvent(net.minecraft.server.level.ServerPlayer player, net.minecraft.world.level.Level level, net.minecraft.world.InteractionHand hand, net.minecraft.world.phys.BlockHitResult hit) 
- 
Method SummaryModifier and TypeMethodDescriptionnet.minecraft.world.InteractionResultnet.minecraft.world.InteractionHandgetHand()net.minecraft.world.phys.BlockHitResultgetHit()net.minecraft.world.level.LevelgetLevel()net.minecraft.server.level.ServerPlayervoidsetCancellationResult(net.minecraft.world.InteractionResult cancellationResult) Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.neoforged.bus.api.ICancellableEventisCanceled, setCanceled
- 
Constructor Details- 
InteractBlockEmptyHandEventpublic InteractBlockEmptyHandEvent(net.minecraft.server.level.ServerPlayer player, net.minecraft.world.level.Level level, net.minecraft.world.InteractionHand hand, net.minecraft.world.phys.BlockHitResult hit) 
 
- 
- 
Method Details- 
getPlayerpublic net.minecraft.server.level.ServerPlayer getPlayer()
- 
getLevelpublic net.minecraft.world.level.Level getLevel()
- 
getHandpublic net.minecraft.world.InteractionHand getHand()
- 
getHitpublic net.minecraft.world.phys.BlockHitResult getHit()
- 
getCancellationResultpublic net.minecraft.world.InteractionResult getCancellationResult()
- 
setCancellationResultpublic void setCancellationResult(net.minecraft.world.InteractionResult cancellationResult) 
 
-