Skip to content

Commit

Permalink
Use CAPTURE_FAILHARD instead of CAPTURE_FAILEXCEPTION
Browse files Browse the repository at this point in the history
  • Loading branch information
Juuxel committed Jul 26, 2021
1 parent f55fe50 commit e43b2d3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ private void onIsSleepingInBed(BlockPos pos, CallbackInfoReturnable<Boolean> inf
}

// Lambda: Optional.ifPresent in wakeUp()
@Inject(method = "method_18404", at = @At(value = "INVOKE_ASSIGN", target = "Lnet/minecraft/world/World;getBlockState(Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/block/BlockState;", ordinal = 0), locals = LocalCapture.CAPTURE_FAILEXCEPTION)
@Inject(method = "method_18404", at = @At(value = "INVOKE_ASSIGN", target = "Lnet/minecraft/world/World;getBlockState(Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/block/BlockState;", ordinal = 0), locals = LocalCapture.CAPTURE_FAILHARD)
private void onWakeUp(BlockPos pos, CallbackInfo info, BlockState state) {
if (state.getBlock() instanceof SofaBlock) {
world.setBlockState(pos, state.with(SeatBlock.OCCUPIED, false));
Expand Down

0 comments on commit e43b2d3

Please sign in to comment.