@Override public boolean isTranslucent() { return material.isTransparent(); } }
@Override public boolean isTransparent() { return m.isTransparent(); }
/** * Get a HashSet containing every transparent block * * @return HashSet with the IDs of every transparent block */ public static HashSet<Material> getTransparentBlocks() { HashSet<Material> transparentBlocks = new HashSet<Material>(); for (Material material : Material.values()) { if (material.isTransparent()) { transparentBlocks.add(material); } } return transparentBlocks; }
@Override @Deprecated public boolean isTransparent(Material material) { if (targetingSpell != null) { return targetingSpell.isTransparent(material); } return material.isTransparent(); }
@Override @Deprecated public boolean isPassthrough(Material material) { if (baseSpell != null) { return baseSpell.isPassthrough(material); } return material.isTransparent(); }
@Override public boolean isTransparent() { return b.getType().isTransparent(); }
@Override public boolean isPassthrough(Block block) { if (baseSpell != null) { return baseSpell.isPassthrough(block); } return block.getType().isTransparent(); }
@Override public boolean isTransparent(Block block) { if (targetingSpell != null) { return targetingSpell.isTransparent(block); } return block.getType().isTransparent(); }
@SuppressWarnings("deprecation") private boolean guessItchyBlockPre1_13(final Material mat) { return !mat.isOccluding() || !mat.isSolid() || mat.isTransparent(); }
@Deprecated // Material protected boolean canAttachTo(Material attachMaterial, Material material, boolean vertical) { // For double-high blocks, a material can always attach to itself. if (vertical && attachMaterial == material) return true; // Should I use my own list for this? This one seems good and efficient. if (material.isTransparent()) return false; // Can't attach to any attachables either- some of these (like signs) aren't transparent. return !attachables.testMaterial(material) && !attachablesWall.testMaterial(material) && !attachablesDouble.testMaterial(material); }
private static boolean isTransparent(Block block, boolean waterIsTransparent) { return ( block.getType() != Material.SNOW && ( block.getType() == Material.AIR || block.getType() == Material.FENCE || block.getType() == Material.ACACIA_FENCE || block.getType() == Material.BIRCH_FENCE || block.getType() == Material.DARK_OAK_FENCE || block.getType() == Material.JUNGLE_FENCE || block.getType() == Material.NETHER_FENCE || block.getType() == Material.SPRUCE_FENCE || block.getType() == Material.FENCE_GATE || block.getType() == Material.ACACIA_FENCE_GATE || block.getType() == Material.BIRCH_FENCE_GATE || block.getType() == Material.DARK_OAK_FENCE_GATE || block.getType() == Material.SPRUCE_FENCE_GATE || block.getType() == Material.JUNGLE_FENCE_GATE || block.getType() == Material.SIGN || block.getType() == Material.SIGN_POST || block.getType() == Material.WALL_SIGN || (waterIsTransparent && block.getType() == Material.STATIONARY_WATER) || block.getType().isTransparent())); }