Allow modded blocks overriding canStickTo prevent sticking to vanilla blocks/other modded blocks (#8837)

This commit is contained in:
TelepathicGrunt authored and GitHub committed 2022-07-21 13:06:02 -07:00
1 parent 8cd2c9c63f
commit f41d493552
3 files changed
+49 -18

No files matched your search

@@ -39,6 +39,7 @@ import net.minecraft.world.level.block.SoundType;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraftforge.common.ToolAction;
import net.minecraftforge.common.ToolActions;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
public interface IForgeBlockState
@@ -441,7 +442,7 @@ public interface IForgeBlockState
* @param other Other block
* @return True to link blocks
*/
default boolean canStickTo(BlockState other)
default boolean canStickTo(@NotNull BlockState other)
{
return self().getBlock().canStickTo(self(), other);
}