mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
21 lines
595 B
Java
21 lines
595 B
Java
package com.hbm.blocks.bomb;
|
|
|
|
import net.minecraft.block.Block;
|
|
import net.minecraft.world.IBlockAccess;
|
|
import net.minecraftforge.common.util.ForgeDirection;
|
|
|
|
public interface IDetConnectible {
|
|
|
|
public default boolean canConnectToDetCord(IBlockAccess world, int x, int y, int z, ForgeDirection dir) {
|
|
return true;
|
|
}
|
|
|
|
public static boolean isConnectible(IBlockAccess world, int x, int y, int z, ForgeDirection dir) {
|
|
Block b = world.getBlock(x, y, z);
|
|
if(b instanceof IDetConnectible) {
|
|
return ((IDetConnectible)b).canConnectToDetCord(world, x, y, z, dir);
|
|
}
|
|
return false;
|
|
}
|
|
}
|