/[projects]/miscJava/bukkit-minecraft-plugins/HoerupUtils/src/dk/thoerup/bukkit/hoeruputils/PowerMiner.java
ViewVC logotype

Diff of /miscJava/bukkit-minecraft-plugins/HoerupUtils/src/dk/thoerup/bukkit/hoeruputils/PowerMiner.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1389 by torben, Mon Apr 25 19:45:54 2011 UTC revision 1390 by torben, Mon Apr 25 20:10:53 2011 UTC
# Line 59  public class PowerMiner extends BlockLis Line 59  public class PowerMiner extends BlockLis
59                          return new ItemStack(263,1);                          return new ItemStack(263,1);
60                  case 17:                  case 17:
61                          return null; //instabreak drops wood                          return null; //instabreak drops wood
62                    case 18:
63                            return (rand.nextInt(16) == 0) ? new ItemStack(6,1,(short)0, (byte)rand.nextInt(4) ) : null;  //leaves has 6.25% chance of dropping sapplings - the sappling type is randomized
64                    case 21: //lapis lazuli
65                            int count = rand.nextInt(5) + 4;
66                            return new ItemStack(351,count,(short)0, (byte)4);
67                  case 56: //diamond ore drops diamond                  case 56: //diamond ore drops diamond
68                          return new ItemStack(264,1);                          return new ItemStack(264,1);
69                  case 73:                  case 73:
# Line 77  public class PowerMiner extends BlockLis Line 82  public class PowerMiner extends BlockLis
82                                    
83                  if ( miners.contains(p.getName()) ) {                  if ( miners.contains(p.getName()) ) {
84                          if (p.getItemInHand().getType() == Material.FEATHER) {                          if (p.getItemInHand().getType() == Material.FEATHER) {
                                 event.setInstaBreak(true);  
85                                                                    
86                                  Block b = event.getBlock();                                  Block b = event.getBlock();
87                                    
88                                    if (b.getTypeId() == 7) //don't remove bedrock
89                                            return;
90                                    
91                                    event.setInstaBreak(true);
92                                    
93    
94                                  ItemStack items = getDropItems(b);                                  ItemStack items = getDropItems(b);
95                                                                    
96                                    
97                                  if (items != null) {                                                              if (items != null) {                            
98                                          b.getWorld().dropItemNaturally(b.getLocation(), items);                                          b.getWorld().dropItemNaturally(b.getLocation(), items);
99                                  }                                  }

Legend:
Removed from v.1389  
changed lines
  Added in v.1390

  ViewVC Help
Powered by ViewVC 1.1.20