Advertisement
Guest User

Untitled

a guest
Feb 25th, 2020
511
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.22 KB | None | 0 0
  1. //
  2. // Decompiled by Procyon v0.5.36
  3. //
  4.  
  5. package lionking.common;
  6.  
  7. public class LKItemTunnahDiggah extends LKItemPickaxe
  8. {
  9. public LKItemTunnahDiggah(final int i) {
  10. super(i, yd.c);
  11. this.e(690);
  12. this.a((ww)LKCreativeTabs.tabQuest);
  13. }
  14.  
  15. public boolean a(final aqz block) {
  16. return block.cU == akc.e || block.cF == aqz.A.cF || block.cF == aqz.z.cF;
  17. }
  18.  
  19. private boolean shouldDamageWithLevel(final int level) {
  20. return level == 0 || LKItemTunnahDiggah.f.nextFloat() >= 0.18f;
  21. }
  22.  
  23. public boolean a(final ye itemstack, final abw world, final int i, final int j, final int k, final int l, final of entityliving) {
  24. itemstack.a(1, entityliving);
  25. if (i == aqz.A.cF || i == aqz.z.cF || i == mod_LionKing.pridestone.cF || i == aqz.y.cF || i == aqz.bg.cF || i == aqz.bO.cF) {
  26. for (int level = aaw.a(mod_LionKing.diggahEnchantment.z, itemstack) + 1, j2 = 0 - level; j2 <= level; ++j2) {
  27. for (int k2 = 0 - level; k2 <= level; ++k2) {
  28. for (int l2 = 0 - level; l2 <= level; ++l2) {
  29. final int i2 = world.a(j + j2, k + k2, l + l2);
  30. if (i2 == aqz.A.cF || i2 == aqz.bg.cF || i2 == aqz.bO.cF) {
  31. world.i(j + j2, k + k2, l + l2);
  32. this.dropBlock(itemstack, world, j + j2, k + k2, l + l2, aqz.s[i2]);
  33. if (this.shouldDamageWithLevel(level)) {
  34. itemstack.a(1, entityliving);
  35. }
  36. }
  37. if (i2 == mod_LionKing.pridestone.cF) {
  38. final int metadata = world.h(j + j2, k + k2, l + l2);
  39. world.i(j + j2, k + k2, l + l2);
  40. this.dropBlock(itemstack, world, j + j2, k + k2, l + l2, mod_LionKing.pridestone, metadata);
  41. if (this.shouldDamageWithLevel(level)) {
  42. itemstack.a(1, entityliving);
  43. }
  44. }
  45. if (i2 == aqz.z.cF) {
  46. world.i(j + j2, k + k2, l + l2);
  47. final boolean flag = aaw.a(aau.s.z, itemstack) > 0;
  48. this.dropBlock(itemstack, world, j + j2, k + k2, l + l2, (aqz)(flag ? aqz.z : aqz.A));
  49. if (this.shouldDamageWithLevel(level)) {
  50. itemstack.a(1, entityliving);
  51. }
  52. }
  53. if (i2 == aqz.y.cF) {
  54. world.i(j + j2, k + k2, l + l2);
  55. final boolean flag = aaw.a(aau.s.z, itemstack) > 0;
  56. this.dropBlock(itemstack, world, j + j2, k + k2, l + l2, flag ? aqz.y : aqz.B);
  57. if (this.shouldDamageWithLevel(level)) {
  58. itemstack.a(1, entityliving);
  59. }
  60. }
  61. }
  62. }
  63. }
  64. }
  65. return true;
  66. }
  67.  
  68. private void dropBlock(final ye itemstack, final abw world, final int i, final int j, final int k, final aqz block) {
  69. this.dropBlock(itemstack, world, i, j, k, block, 0);
  70. }
  71.  
  72. private void dropBlock(final ye itemstack, final abw world, final int i, final int j, final int k, final aqz block, final int metadata) {
  73. if (world.I) {
  74. return;
  75. }
  76. boolean drop = LKItemTunnahDiggah.f.nextInt(3) == 0;
  77. if (aaw.a(mod_LionKing.diggahPrecision.z, itemstack) > 0) {
  78. drop = (LKItemTunnahDiggah.f.nextInt(3) > 0);
  79. }
  80. if (drop) {
  81. final float f = 0.7f;
  82. final double d = world.s.nextFloat() * f + (1.0f - f) * 0.5;
  83. final double d2 = world.s.nextFloat() * f + (1.0f - f) * 0.5;
  84. final double d3 = world.s.nextFloat() * f + (1.0f - f) * 0.5;
  85. final ss entityitem = new ss(world, i + d, j + d2, k + d3, new ye(block, 1, metadata));
  86. entityitem.b = 10;
  87. world.d((nn)entityitem);
  88. }
  89. }
  90. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement