use of net.minecraft.block.BlockAnvil in project SpongeCommon by SpongePowered.
the class DefaultTeleportHelperFilter method isSafeBodyMaterial.
@Override
public boolean isSafeBodyMaterial(BlockState blockState) {
IBlockState state = BlockUtil.toNative(blockState);
Material material = state.getMaterial();
// Deny blocks that suffocate
if (state.causesSuffocation()) {
return false;
}
// Deny dangerous lava
if (material == Material.LAVA) {
return false;
}
// Deny non-passable non "full" blocks
return !(state.getBlock() instanceof BlockSlab || state.getBlock() instanceof BlockCauldron || state.getBlock() instanceof BlockAnvil || state.getBlock() instanceof BlockFence || state.getBlock() instanceof BlockChorusPlant || state.getBlock() instanceof BlockSnow || material == Material.GLASS || material == Material.LEAVES);
}
use of net.minecraft.block.BlockAnvil in project BaseMetals by MinecraftModDevelopmentMods.
the class Blocks method maybeMakeItemBlock.
private static void maybeMakeItemBlock(final Block block, final MMDMaterial material, final String fullName) {
if (!(block instanceof BlockAnvil) && !(block instanceof BlockDoor) && !(block instanceof BlockSlab) && (!material.isEmpty())) {
final ItemBlock itemBlock = new ItemMMDBlock(material, block);
itemBlock.setRegistryName(block.getRegistryName());
itemBlock.setUnlocalizedName(block.getRegistryName().getResourceDomain() + "." + fullName);
material.addNewItem("ItemBlock_" + fullName, itemBlock);
}
}
Aggregations