I have a function that is being called for every block. And I want that the function returns true when it is a fluid (not only Minecraft fluids aka other mod fluids example: oil)
This is my code:
public boolean shouldDestroy(BlockPos pos) {
Block block = this.getLevel().getBlockState(pos).getBlock();
boolean isDestructable = block == Blocks.BEDROCK || block == Blocks.AIR;
// liquids
boolean isDrainable = false; // set to true if block is a liquid
return !isDestructable && isDrainable;
}
I searched, and I didn't found anything that could help me