Exemplo n.º 1
0
 @Override
 public boolean canDecayAt(Block block) {
   block = block.translate(BlockFace.TOP);
   BlockMaterial mat = block.getMaterial();
   if ((!(mat instanceof Snow)) || (!(mat.isMaterial(VanillaMaterials.SLAB)))) {
     return (block.getMaterial().getOpacity() > 0 && block.getLight() < 4);
   }
   return false;
 }
Exemplo n.º 2
0
 @Override
 public boolean isValidPosition(Block block, BlockFace attachedFace, boolean seekAlternative) {
   if (super.isValidPosition(block, attachedFace, seekAlternative)) {
     final Block under = block.translate(BlockFace.BOTTOM);
     return under.isMaterial(VanillaMaterials.MYCELIUM)
         || block.getLight() <= 12 && under.getMaterial().isOpaque();
   }
   return false;
 }
Exemplo n.º 3
0
 @Override
 public boolean canDecayAt(Block block) {
   block = block.translate(BlockFace.TOP);
   return block.getMaterial().getOpacity() > 1 && block.getLight() < 4;
 }