Skip to content

Commit

Permalink
Fix hopper mixin
Browse files Browse the repository at this point in the history
  • Loading branch information
Kneelawk committed Apr 26, 2024
1 parent f819faf commit b3bf7be
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,10 @@
public class HopperBlockEntityMixin {

@Inject(method = "insert", at = @At("HEAD"), cancellable = true, require = 1, allow = 1)
private static void onInsert(World world, BlockPos blockPos, BlockState blockState, Inventory inventory, CallbackInfoReturnable<Boolean> cri) {
HopperBlockEntity self = (HopperBlockEntity) inventory;
ActionResult result = HopperHooks.tryInsert(self);
private static void onInsert(World world, BlockPos pos, HopperBlockEntity blockEntity, CallbackInfoReturnable<Boolean> cir) {
ActionResult result = HopperHooks.tryInsert(blockEntity);
if (result != ActionResult.PASS) {
cri.setReturnValue(result.isAccepted());
cir.setReturnValue(result.isAccepted());
}
}

Expand Down

0 comments on commit b3bf7be

Please sign in to comment.