mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-17 02:55:17 +00:00
Allow modded blocks overriding canStickTo prevent sticking to vanilla blocks/other modded blocks (#8837)
This commit is contained in:
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);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user