public void doBreakShovel( World var1, EntityHuman var2, ItemStack var3, int var4, int var5, int var6, int var7) { int typeId = var1.getTypeId(var5, var6, var7); int var8 = var1.getData(var5, var6, var7); ArrayList var9 = Block.byId[var4].getBlockDropped(var1, var5, var6, var7, var8, 0); Iterator var10 = var9.iterator(); if (!breakBlock(null, var2, var1, var5, var6, var7, typeId, var8)) return; while (var10.hasNext()) { ItemStack var11 = (ItemStack) var10.next(); addToDroplist(var3, var11); } BigWorldHook.setTypeIdHooked(var1, var5, var6, var7, 0); for (int var14 = -1; var14 <= 1; var14++) { for (int var13 = -1; var13 <= 1; var13++) { for (int var12 = -1; var12 <= 1; var12++) { if (var1.getTypeId(var5 + var14, var6 + var13, var7 + var12) != var4) continue; doBreakShovelAdd(var1, var2, var3, var4, var5 + var14, var6 + var13, var7 + var12); } } } if (var1.random.nextInt(8) == 0) { var1.a("largesmoke", var5, var6 + 1, var7, 0.0D, 0.0D, 0.0D); } if (var1.random.nextInt(8) == 0) { var1.a("explode", var5, var6 + 1, var7, 0.0D, 0.0D, 0.0D); } ejectDropList(var1, var3, var5, var6, var7); }
public boolean interactWith( ItemStack var1, EntityHuman var2, World var3, BlockPosition var4, EnumDirection var5, float var6, float var7, float var8) { if (var3.isClientSide) { return true; } else if (var5 != EnumDirection.UP) { return false; } else { IBlockData var9 = var3.getType(var4); Block var10 = var9.getBlock(); boolean var11 = var10.a(var3, var4); if (!var11) { var4 = var4.up(); } int var12 = MathHelper.floor((double) (var2.yaw * 4.0F / 360.0F) + 0.5D) & 3; EnumDirection var13 = EnumDirection.fromType2(var12); BlockPosition var14 = var4.shift(var13); if (var2.a(var4, var5, var1) && var2.a(var14, var5, var1)) { boolean var15 = var3.getType(var14).getBlock().a(var3, var14); boolean var16 = var11 || var3.isEmpty(var4); boolean var17 = var15 || var3.isEmpty(var14); if (var16 && var17 && World.a((IBlockAccess) var3, (BlockPosition) var4.down()) && World.a((IBlockAccess) var3, (BlockPosition) var14.down())) { IBlockData var18 = Blocks.BED .getBlockData() .set(BlockBed.OCCUPIED, Boolean.valueOf(false)) .set(BlockBed.FACING, var13) .set(BlockBed.PART, BlockBed.EnumBedPart.FOOT); if (var3.setTypeAndData(var4, var18, 3)) { IBlockData var19 = var18.set(BlockBed.PART, BlockBed.EnumBedPart.HEAD); var3.setTypeAndData(var14, var19, 3); } --var1.count; return true; } else { return false; } } else { return false; } } }
public void scanBlockAndBreak(World var1, ItemStack var2, int var3, int var4, int var5) { int var6 = var1.getTypeId(var3, var4, var5); int var7 = var1.getData(var3, var4, var5); ArrayList var8 = Block.byId[var6].getBlockDropped(var1, var3, var4, var5, var7, 0); ItemStack var10; for (Iterator var9 = var8.iterator(); var9.hasNext(); addToDroplist(var2, var10)) var10 = (ItemStack) var9.next(); var1.setTypeId(var3, var4, var5, 0); if (var1.random.nextInt(8) == 0) var1.a("largesmoke", var3, var4, var5, 0.0D, 0.0D, 0.0D); if (var1.random.nextInt(8) == 0) var1.a("explode", var3, var4, var5, 0.0D, 0.0D, 0.0D); }
public boolean interactWith( ItemStack var1, EntityHuman var2, World var3, int var4, int var5, int var6, int var7) { if (EEProxy.isClient(var3)) return false; boolean var8 = true; if (chargeLevel(var1) > 0) { cleanDroplist(var1); var2.C_(); var3.makeSound(var2, "flash", 0.8F, 1.5F); for (int var9 = -(chargeLevel(var1) * (var7 != 5 ? (byte) (var7 != 4 ? 1 : 0) : 2)); var9 <= chargeLevel(var1) * (var7 != 5 ? var7 != 4 ? 1 : 2 : 0); var9++) { for (int var10 = -(chargeLevel(var1) * (var7 != 1 ? (byte) (var7 != 0 ? 1 : 0) : 2)); var10 <= chargeLevel(var1) * (var7 != 1 ? var7 != 0 ? 1 : 2 : 0); var10++) { for (int var11 = -(chargeLevel(var1) * (var7 != 3 ? (byte) (var7 != 2 ? 1 : 0) : 2)); var11 <= chargeLevel(var1) * (var7 != 3 ? var7 != 2 ? 1 : 2 : 0); var11++) { int var12 = var4 + var9; int var13 = var5 + var10; int var14 = var6 + var11; int var15 = var3.getTypeId(var12, var13, var14); int var16 = var3.getData(var12, var13, var14); if (canBreak(var15, var16) && attemptBreak(var2, var12, var13, var14)) { if (getFuelRemaining(var1) < 1) { ConsumeReagent(var1, var2, var8); var8 = false; } if (getFuelRemaining(var1) > 0) { ArrayList var17 = Block.byId[var15].getBlockDropped(var3, var12, var13, var14, var16, 0); ItemStack var19; for (Iterator var18 = var17.iterator(); var18.hasNext(); addToDroplist(var1, var19)) var19 = (ItemStack) var18.next(); var3.setTypeId(var12, var13, var14, 0); if (var3.random.nextInt(8) == 0) var3.a("largesmoke", var12, var13, var14, 0.0D, 0.0D, 0.0D); if (var3.random.nextInt(8) == 0) var3.a("explode", var12, var13, var14, 0.0D, 0.0D, 0.0D); setShort(var1, "fuelRemaining", getFuelRemaining(var1) - 1); } } } } } ejectDropList(var3, var1, var4, var5, var6); } return false; }
public void b(World var1, BlockPosition var2, IBlockData var3, Random var4) { super.b(var1, var2, var3, var4); if (var1.worldProvider.d() && var1.getGameRules().getBoolean("doMobSpawning") && var4.nextInt(2000) < var1.getDifficulty().a()) { int var5 = var2.getY(); BlockPosition var6; for (var6 = var2; !World.a((IBlockAccess) var1, (BlockPosition) var6) && var6.getY() > 0; var6 = var6.down()) {; } if (var5 > 0 && !var1.getType(var6.up()).getBlock().isOccluding()) { Entity var7 = ItemMonsterEgg.a( var1, 57, (double) var6.getX() + 0.5D, (double) var6.getY() + 1.1D, (double) var6.getZ() + 0.5D); if (var7 != null) { var7.portalCooldown = var7.aq(); } } } }
public void scanBlockAndBreak( EntityHuman player, World var1, ItemStack var2, int var3, int var4, int var5) { int var6 = var1.getTypeId(var3, var4, var5); int var7 = var1.getData(var3, var4, var5); ArrayList var8 = Block.byId[var6].getBlockDropped(var1, var3, var4, var5, var7, 0); Iterator var9 = var8.iterator(); if (!breakBlock(null, player, var1, var3, var4, var5, var6, var7)) return; while (var9.hasNext()) { ItemStack var10 = (ItemStack) var9.next(); addToDroplist(var2, var10); } if (var1.random.nextInt(8) == 0) { var1.a("largesmoke", var3, var4, var5, 0.0D, 0.0D, 0.0D); } if (var1.random.nextInt(8) == 0) { var1.a("explode", var3, var4, var5, 0.0D, 0.0D, 0.0D); } }
public void doBreakShovelAdd( World var1, EntityHuman var2, ItemStack var3, int var4, int var5, int var6, int var7) { if (getFuelRemaining(var3) < 1) { ConsumeReagent(var3, var2, false); } if (getFuelRemaining(var3) > 0) { int var8 = var1.getData(var5, var6, var7); ArrayList var9 = Block.byId[var4].getBlockDropped(var1, var5, var6, var7, var8, 0); Iterator var10 = var9.iterator(); while (var10.hasNext()) { ItemStack var11 = (ItemStack) var10.next(); addToDroplist(var3, var11); } BigWorldHook.setTypeIdHooked(var1, var5, var6, var7, 0); setShort(var3, "fuelRemaining", getFuelRemaining(var3) - 1); for (int var14 = -1; var14 <= 1; var14++) { for (int var13 = -1; var13 <= 1; var13++) { for (int var12 = -1; var12 <= 1; var12++) { if (var1.getTypeId(var5 + var14, var6 + var13, var7 + var12) != var4) continue; doBreakShovelAdd(var1, var2, var3, var4, var5 + var14, var6 + var13, var7 + var12); } } } if (var1.random.nextInt(8) == 0) { var1.a("largesmoke", var5, var6 + 1, var7, 0.0D, 0.0D, 0.0D); } if (var1.random.nextInt(8) == 0) { var1.a("explode", var5, var6 + 1, var7, 0.0D, 0.0D, 0.0D); } } }
private void f(World var1, BlockPosition var2, IBlockData var3) { BlockFlowing var4 = a(this.material); var1.setTypeAndData(var2, var4.getBlockData().set(LEVEL, var3.get(LEVEL)), 2); var1.a((BlockPosition) var2, (Block) var4, this.a(var1)); }
public boolean interactWithSpecial( ItemStack var1, EntityHuman var2, World var3, int var4, int var5, int var6, int var7) { if (EEProxy.isClient(var3)) { return false; } if (chargeLevel(var1) >= 1) { cleanDroplist(var1); int var8 = var3.getTypeId(var4, var5, var6); if (var8 == Block.GRAVEL.id) { startSearch(var3, var2, var1, var8, var4, var5, var6, false); return true; } } if (chargeLevel(var1) <= 0) { return false; } boolean var19 = true; cleanDroplist(var1); var2.C_(); var3.makeSound(var2, "flash", 0.8F, 1.5F); for (int var9 = -chargeLevel(var1); var9 <= chargeLevel(var1); var9++) { for (int var10 = -chargeLevel(var1); var10 <= chargeLevel(var1); var10++) { int var11 = var4 + var9; int var13 = var6 + var10; if (var7 == 2) { var13 += chargeLevel(var1); } else if (var7 == 3) { var13 -= chargeLevel(var1); } else if (var7 == 4) { var11 += chargeLevel(var1); } else if (var7 == 5) { var11 -= chargeLevel(var1); } int var14 = var3.getTypeId(var11, var5, var13); int var15 = var3.getData(var11, var5, var13); if (!canBreak(var14, var15)) continue; ArrayList var16 = Block.byId[var14].getBlockDropped(var3, var11, var5, var13, var15, 0); Iterator var17 = var16.iterator(); if (!breakBlock(null, var2, var3, var11, var5, var13, var14, var15)) continue; while (var17.hasNext()) { ItemStack var18 = (ItemStack) var17.next(); addToDroplist(var1, var18); } if (var3.random.nextInt(8) == 0) { var3.a("largesmoke", var11, var5, var13, 0.0D, 0.0D, 0.0D); } if (var3.random.nextInt(8) != 0) continue; var3.a("explode", var11, var5, var13, 0.0D, 0.0D, 0.0D); } } ejectDropList(var3, var1, var4, var5, var6); return true; }
public boolean canPlace(World var1, BlockPosition var2) { return var1.getType(var2).getBlock().material.isReplaceable() && World.a((IBlockAccess) var1, (BlockPosition) var2.down()); }