Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // mod_UsefulHoe.class
- import net.minecraft.client.Minecraft;
- public class mod_UsefulHoe extends BaseMod
- {
- static hi getHandItem() {
- return getHandItem(ModLoader.getMinecraftInstance());
- }
- static hi getHandItem(Minecraft minecraft) {
- if ((minecraft.g != null) && (minecraft.g.f != null)) {
- return minecraft.g.f.b();
- }
- return null;
- }
- public String Version() {
- return "Useful Hoe v1(1.4_01)";
- }
- }
- // mod_TieredFlint.class
- import net.minecraft.client.Minecraft;
- public class mod_TieredFlint extends BaseMod {
- public String Version() { return "r2 (for b1.5_01)"; }
- static ii getPlayerItemInHand() {
- return getPlayerItemInHand(ModLoader.getMinecraftInstance());
- }
- static ii getPlayerItemInHand(Minecraft game) {
- if ((game.g != null) && (game.g.f != null)) return game.g.f.b();
- return null;
- }
- }
- // BlockFlint (UsefulHoe) - 1.4_01 due to 1.5_01 download not working
- import java.util.Random;
- public class kp extends ff
- {
- public kp(int i, int j) {
- super(i, j);
- }
- public int a(int i, Random random) {
- hi itemstack = mod_UsefulHoe.getHandItem();
- if (itemstack != null) {
- if (itemstack.c == fg.L.bd) {
- if (random.nextInt(7) == 0) {
- return fg.an.bd;
- }
- return this.bl;
- }
- if (itemstack.c == fg.M.bd) {
- if (random.nextInt(5) == 0) {
- return fg.an.bd;
- }
- return this.bl;
- }
- if (itemstack.c == fg.N.bd) {
- if (random.nextInt(3) == 0) {
- return fg.an.bd;
- }
- return this.bl;
- }
- if (itemstack.c == fg.P.bd) {
- if (random.nextInt(2) == 0) {
- return fg.an.bd;
- }
- return this.bl;
- }
- if (itemstack.c == fg.O.bd) {
- if (random.nextInt(1) == 0) {
- return fg.an.bd;
- }
- return this.bl;
- }
- if (random.nextInt(10) == 0) {
- return fg.an.bd;
- }
- }
- return this.bl;
- }
- }
- // BlockFlint (TieredFlint)
- import java.util.Random;
- public class mi extends fz {
- public mi(int paramInt1, int paramInt2) {
- super(paramInt1, paramInt2);
- }
- public int a(int paramInt, Random rand) {
- ii inHand = mod_TieredFlint.getPlayerItemInHand();
- if (rand.nextInt(12) == 0) return gb.an.bd;
- if (inHand != null) {
- if (inHand.c == gb.p.bd) { // wood
- if (rand.nextInt(10) == 0) return gb.an.bd;
- return this.bl; }
- if (inHand.c == gb.F.bd) { // gold
- if (rand.nextInt(9) == 0) return gb.an.bd;
- return this.bl; }
- if (inHand.c == gb.u.bd) { // stone
- if (rand.nextInt(8) == 0) return gb.an.bd;
- return this.bl; }
- if (inHand.c == gb.d.bd) { // iron
- if (rand.nextInt(6) == 0) return gb.an.bd;
- return this.bl; }
- if (inHand.c == gb.y.bd) { // diamond
- if (rand.nextInt(4) == 0) return gb.an.bd;
- return this.bl; }
- }
- return this.bl;
- }
- public int a(Random rand) {
- // This part wasn't copied, it has to do with dropping more then one flint when using diamond.
- ii inHand = mod_TieredFlint.getPlayerItemInHand();
- if ((inHand != null) && (inHand.c == gb.y.bd)) { // diamond
- if (rand.nextInt(8) == 0) return 1 + rand.nextInt(3); }
- return 1;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement