daily pastebin goal
88%
SHARE
TWEET

Untitled

a guest Apr 27th, 2011 135 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // mod_UsefulHoe.class
  2. import net.minecraft.client.Minecraft;
  3.  
  4. public class mod_UsefulHoe extends BaseMod
  5. {
  6.   static hi getHandItem() {
  7.     return getHandItem(ModLoader.getMinecraftInstance());
  8.   }
  9.  
  10.   static hi getHandItem(Minecraft minecraft) {
  11.     if ((minecraft.g != null) && (minecraft.g.f != null)) {
  12.       return minecraft.g.f.b();
  13.     }
  14.  
  15.     return null;
  16.   }
  17.  
  18.   public String Version() {
  19.     return "Useful Hoe v1(1.4_01)";
  20.   }
  21. }
  22.  
  23. // mod_TieredFlint.class
  24. import net.minecraft.client.Minecraft;
  25.  
  26. public class mod_TieredFlint extends BaseMod {
  27.   public String Version() { return "r2 (for b1.5_01)"; }
  28.  
  29.   static ii getPlayerItemInHand() {
  30.     return getPlayerItemInHand(ModLoader.getMinecraftInstance());
  31.   }
  32.  
  33.   static ii getPlayerItemInHand(Minecraft game) {
  34.     if ((game.g != null) && (game.g.f != null)) return game.g.f.b();
  35.     return null;
  36.   }
  37. }
  38.  
  39. // BlockFlint (UsefulHoe) - 1.4_01 due to 1.5_01 download not working
  40. import java.util.Random;
  41.  
  42. public class kp extends ff
  43. {
  44.   public kp(int i, int j) {
  45.     super(i, j);
  46.   }
  47.  
  48.   public int a(int i, Random random) {
  49.     hi itemstack = mod_UsefulHoe.getHandItem();
  50.     if (itemstack != null) {
  51.       if (itemstack.c == fg.L.bd) {
  52.         if (random.nextInt(7) == 0) {
  53.           return fg.an.bd;
  54.         }
  55.  
  56.         return this.bl;
  57.       }
  58.  
  59.       if (itemstack.c == fg.M.bd) {
  60.         if (random.nextInt(5) == 0) {
  61.           return fg.an.bd;
  62.         }
  63.  
  64.         return this.bl;
  65.       }
  66.  
  67.       if (itemstack.c == fg.N.bd) {
  68.         if (random.nextInt(3) == 0) {
  69.           return fg.an.bd;
  70.         }
  71.  
  72.         return this.bl;
  73.       }
  74.  
  75.       if (itemstack.c == fg.P.bd) {
  76.         if (random.nextInt(2) == 0) {
  77.           return fg.an.bd;
  78.         }
  79.  
  80.         return this.bl;
  81.       }
  82.  
  83.       if (itemstack.c == fg.O.bd) {
  84.         if (random.nextInt(1) == 0) {
  85.           return fg.an.bd;
  86.         }
  87.  
  88.         return this.bl;
  89.       }
  90.  
  91.       if (random.nextInt(10) == 0) {
  92.         return fg.an.bd;
  93.       }
  94.     }
  95.     return this.bl;
  96.   }
  97. }
  98.  
  99. // BlockFlint (TieredFlint)
  100. import java.util.Random;
  101.  
  102. public class mi extends fz {
  103.   public mi(int paramInt1, int paramInt2) {
  104.     super(paramInt1, paramInt2);
  105.   }
  106.  
  107.   public int a(int paramInt, Random rand) {
  108.     ii inHand = mod_TieredFlint.getPlayerItemInHand();
  109.  
  110.     if (rand.nextInt(12) == 0) return gb.an.bd;
  111.  
  112.     if (inHand != null) {
  113.       if (inHand.c == gb.p.bd) { // wood
  114.         if (rand.nextInt(10) == 0) return gb.an.bd;
  115.         return this.bl; }
  116.       if (inHand.c == gb.F.bd) { // gold
  117.         if (rand.nextInt(9) == 0) return gb.an.bd;
  118.         return this.bl; }
  119.       if (inHand.c == gb.u.bd) { // stone
  120.         if (rand.nextInt(8) == 0) return gb.an.bd;
  121.         return this.bl; }
  122.       if (inHand.c == gb.d.bd) { // iron
  123.         if (rand.nextInt(6) == 0) return gb.an.bd;
  124.         return this.bl; }
  125.       if (inHand.c == gb.y.bd) { // diamond
  126.         if (rand.nextInt(4) == 0) return gb.an.bd;
  127.         return this.bl; }
  128.     }
  129.  
  130.     return this.bl;
  131.   }
  132.  
  133.   public int a(Random rand) {
  134. // This part wasn't copied, it has to do with dropping more then one flint when using diamond.
  135.     ii inHand = mod_TieredFlint.getPlayerItemInHand();
  136.    
  137.     if ((inHand != null) && (inHand.c == gb.y.bd)) { // diamond
  138.       if (rand.nextInt(8) == 0) return 1 + rand.nextInt(3); }
  139.     return 1;
  140.   }
  141. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top