diff --git a/src/main/java/alexiil/mc/lib/attributes/item/mixin/impl/HopperBlockEntityMixin.java b/src/main/java/alexiil/mc/lib/attributes/item/mixin/impl/HopperBlockEntityMixin.java index 1be1f10..a6f91a2 100644 --- a/src/main/java/alexiil/mc/lib/attributes/item/mixin/impl/HopperBlockEntityMixin.java +++ b/src/main/java/alexiil/mc/lib/attributes/item/mixin/impl/HopperBlockEntityMixin.java @@ -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 cri) { - HopperBlockEntity self = (HopperBlockEntity) inventory; - ActionResult result = HopperHooks.tryInsert(self); + private static void onInsert(World world, BlockPos pos, HopperBlockEntity blockEntity, CallbackInfoReturnable cir) { + ActionResult result = HopperHooks.tryInsert(blockEntity); if (result != ActionResult.PASS) { - cri.setReturnValue(result.isAccepted()); + cir.setReturnValue(result.isAccepted()); } }