@@ -65,37 +65,37 @@ private void onAttackBlock(BlockPos pos, Direction direction, CallbackInfoReturn
6565
6666 @ Inject (at = @ At ("HEAD" ), method = "interactBlock" , cancellable = true )
6767 private void onInteractBlock (ClientPlayerEntity player , Hand hand , BlockHitResult hitResult , CallbackInfoReturnable <ActionResult > cir ) {
68- if (!this .sees .call (new InteractBlockEvent (player , hand , hitResult ))) return ;
68+ if (!this .sees .call (new InteractBlockEvent (hand , hitResult ))) return ;
6969 cir .setReturnValue (ActionResult .FAIL );
7070 cir .cancel ();
7171 }
7272
7373 @ Inject (at = @ At ("HEAD" ), method = "interactItem" , cancellable = true )
7474 private void onInteractItem (PlayerEntity player , Hand hand , CallbackInfoReturnable <ActionResult > cir ) {
75- if (!this .sees .call (new InteractItemEvent (player , hand ))) return ;
75+ if (!this .sees .call (new InteractItemEvent (hand ))) return ;
7676 cir .setReturnValue (ActionResult .FAIL );
7777 cir .cancel ();
7878 }
7979
8080 @ Inject (at = @ At ("HEAD" ), method = "attackEntity" , cancellable = true )
8181 private void onAttackEntity (PlayerEntity player , Entity target , CallbackInfo ci ) {
8282 System .out .println ("AttackEntityEvent called for " + target .getName ().getString () + " by " + player .getName ().getString ());
83- if (!this .sees .call (new AttackEntityEvent (player , target ))) return ;
83+ if (!this .sees .call (new AttackEntityEvent (target ))) return ;
8484
8585 ci .cancel ();
8686 Utilize .blockSwingHandOnce ();
8787 }
8888
8989 @ Inject (at = @ At ("HEAD" ), method = "interactEntity" , cancellable = true )
9090 private void onInteractEntity (PlayerEntity player , Entity target , Hand hand , CallbackInfoReturnable <ActionResult > cir ) {
91- if (!this .sees .call (new InteractEntityEvent (player , target , hand ))) return ;
91+ if (!this .sees .call (new InteractEntityEvent (target , hand ))) return ;
9292 cir .setReturnValue (ActionResult .FAIL );
9393 cir .cancel ();
9494 }
9595
9696 @ Inject (at = @ At ("HEAD" ), method = "clickSlot" , cancellable = true )
9797 private void onClickSlot (int syncId , int slotId , int button , SlotActionType actionType , PlayerEntity player , CallbackInfo ci ) {
98- if (!this .sees .call (new SlotClickEvent (syncId , slotId , button , actionType , player ))) return ;
98+ if (!this .sees .call (new SlotClickEvent (syncId , slotId , button , actionType ))) return ;
9999 ci .cancel ();
100100 }
101101
0 commit comments