Fixed incorrect block state conversion turning water into ice

This commit is contained in:
Sollace 2021-12-26 20:35:05 +02:00
parent bb29d97ff3
commit 6337b86219

View file

@ -34,7 +34,7 @@ interface StateMapping extends Predicate<BlockState>, BiFunction<World, BlockSta
} }
static StateMapping replaceMaterial(Material mat, Block block) { static StateMapping replaceMaterial(Material mat, Block block) {
return build(isOf(Material.WATER), Blocks.ICE); return build(isOf(mat), block);
} }
static Predicate<BlockState> isOf(Material mat) { static Predicate<BlockState> isOf(Material mat) {
return s -> s.getMaterial() == mat; return s -> s.getMaterial() == mat;