aria1th / litematica-printer

Printer with AccurateBlockPlacement, FlippinCactus(why), Observer Update Order, some QC fix, Xcom's Lavasponge, Smart string spamming, Composter Support, bedrock breaking
Creative Commons Zero v1.0 Universal
87 stars 7 forks source link

[bug] crash when replace liquid #32

Closed AbrasiveBoar902 closed 2 years ago

AbrasiveBoar902 commented 2 years ago

If there is a seagrass, it will try to get the 'level' of it. and it will crash.

AbrasiveBoar902 commented 2 years ago

I'm using client 1.18.1 to connect to a 1.17.1 server. maybe the check can't work?

java.lang.IllegalArgumentException: Cannot get property class_2758{name=level, clazz=class java.lang.Integer, values=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]} as it does not exist in Block{minecraft:bubble_column} at Not Enough Crashes deobfuscated stack trace.(1.18.1+build.18) at net.minecraft.state.State.get(State:98) at io.github.eatmyvenom.litematicin.utils.Printer.isReplaceableWaterFluidSource(Printer.java:1143) at io.github.eatmyvenom.litematicin.utils.Printer.doPrinterAction(Printer.java:615) at fi.dy.masa.litematica.util.WorldUtils.doEasyPlaceAction(WorldUtils.java:1177)

private static boolean isReplaceableWaterFluidSource(BlockState checkState){ return checkState.getFluidState().getFluid() instanceof WaterFluid && checkState.get(FluidBlock.LEVEL) == 0 || checkState.getBlock() instanceof BubbleColumnBlock || checkState.isOf(Blocks.SEAGRASS) || checkState.isOf(Blocks.TALL_SEAGRASS) || checkState.getBlock() instanceof Waterloggable && checkState.get(Properties.WATERLOGGED) && checkState.getMaterial().isReplaceable(); }

aria1th commented 2 years ago

yeah I should've made seagrass check first, will be fixed asap

aria1th commented 2 years ago

Fixed in 2.8.7