Replace Blocks.FARMLAND checks with instanceof FarmBlock (#10647)

Signed-off-by: Joseph T. McQuigg <[email protected]>
This commit is contained in:
Joseph T. McQuigg authored and GitHub committed 2025-09-10 20:17:42 -07:00
1 parent ef0e7bc17f
commit f06727a205
7 files changed
+68 -2

No files matched your search

@@ -355,7 +355,7 @@ public interface IForgeBlock {
* @return True if the soil should be considered fertile.
*/
default boolean isFertile(BlockState state, BlockGetter level, BlockPos pos) {
if (state.is(Blocks.FARMLAND))
if (state.getBlock() instanceof FarmBlock)
return state.getValue(FarmBlock.MOISTURE) > 0;
return false;