Fork of Poseidon providing Bukkit #1060 to older Beta versions (b1.0-b1.7.3)
at develop 31 lines 860 B view raw
1package net.minecraft.server; 2 3import java.util.Random; 4 5import uk.betacraft.uberbukkit.UberbukkitConfig; 6 7public class BlockOre extends Block { 8 9 public BlockOre(int i, int j) { 10 super(i, j, Material.STONE); 11 } 12 13 public int a(int i, Random random) { 14 return this.id == Block.COAL_ORE.id ? Item.COAL.id : (this.id == Block.DIAMOND_ORE.id ? Item.DIAMOND.id : (this.id == Block.LAPIS_ORE.id ? Item.INK_SACK.id : this.id)); 15 } 16 17 public int a(Random random) { 18 if (this.id == Block.LAPIS_ORE.id) { 19 if (UberbukkitConfig.getInstance().getBoolean("mechanics.drop_lapis_as_b1_2", false)) { 20 return 1; 21 } 22 return 4 + random.nextInt(5); 23 } else { 24 return 1; 25 } 26 } 27 28 protected int a_(int i) { 29 return this.id == Block.LAPIS_ORE.id ? 4 : 0; 30 } 31}