Inspired by 2020's April Fools' 20w14infinite Snapshot, this mod brings endless randomly generated dimensions into Minecraft.

try catches for coral

+6 -2
+3 -1
src/main/java/net/lerariemann/infinity/mixin/qol/CoralBlockBlockMixin.java
··· 14 14 @Inject(method = "scanForWater(Lnet/minecraft/world/level/BlockGetter;Lnet/minecraft/core/BlockPos;)Z", 15 15 at = @At("HEAD"), cancellable = true) 16 16 private void noCoralDecay(BlockGetter world, BlockPos pos, CallbackInfoReturnable<Boolean> cir) { 17 - if (InfinityMethods.isBiomeInfinity(world, pos)) cir.setReturnValue(true); 17 + try { 18 + if (InfinityMethods.isBiomeInfinity(world, pos)) cir.setReturnValue(true); 19 + } catch (IllegalStateException ignored) {} 18 20 } 19 21 }
+3 -1
src/main/java/net/lerariemann/infinity/mixin/qol/CoralParentBlockMixin.java
··· 16 16 @Inject(method = "scanForWater(Lnet/minecraft/world/level/block/state/BlockState;Lnet/minecraft/world/level/BlockGetter;Lnet/minecraft/core/BlockPos;)Z", 17 17 at = @At("HEAD"), cancellable = true) 18 18 private static void noParentCoralDecay(BlockState state, BlockGetter world, BlockPos pos, CallbackInfoReturnable<Boolean> cir) { 19 - if (InfinityMethods.isBiomeInfinity(world, pos)) cir.setReturnValue(true); 19 + try { 20 + if (InfinityMethods.isBiomeInfinity(world, pos)) cir.setReturnValue(true); 21 + } catch (IllegalStateException ignored) {} 20 22 } 21 23 }