In this way, I can only prevent the flow of liquid, and I can’t get the properties related to the downward flow.
I want to allow liquid to flow laterally, not downward.
for (Transaction<BlockSnapshot> trans : event.getTransactions()) {
Optional<MatterProperty> matter = trans.getFinal().getState().getProperty(MatterProperty.class);
if (matter.isPresent() && matter.get().getValue() == MatterProperty.Matter.LIQUID) {
event.setCancelled(true);
}
}