Skip to content
Browse files

0.2.1

  • Loading branch information...
0 parents commit fef20f5f04fe7e5be4d8ef983efd0e68b98f83dd @grum grum committed
Showing with 9,266 additions and 0 deletions.
  1. +4 −0 META-INF/MANIFEST.MF
  2. +4 −0 README.md
  3. +350 −0 net/minecraft/server/AxisAlignedBB.java
  4. +439 −0 net/minecraft/server/Block.java
  5. +18 −0 net/minecraft/server/BlockBookshelf.java
  6. +21 −0 net/minecraft/server/BlockBreakable.java
  7. +228 −0 net/minecraft/server/BlockButton.java
  8. +81 −0 net/minecraft/server/BlockCactus.java
  9. +115 −0 net/minecraft/server/BlockChest.java
  10. +18 −0 net/minecraft/server/BlockClay.java
  11. +25 −0 net/minecraft/server/BlockContainer.java
  12. +106 −0 net/minecraft/server/BlockCrops.java
  13. +8 −0 net/minecraft/server/BlockDirt.java
  14. +171 −0 net/minecraft/server/BlockDoor.java
  15. +26 −0 net/minecraft/server/BlockFence.java
  16. +162 −0 net/minecraft/server/BlockFire.java
  17. +55 −0 net/minecraft/server/BlockFlower.java
  18. +275 −0 net/minecraft/server/BlockFlowing.java
  19. +240 −0 net/minecraft/server/BlockFluids.java
  20. +78 −0 net/minecraft/server/BlockFurnace.java
  21. +14 −0 net/minecraft/server/BlockGlass.java
  22. +34 −0 net/minecraft/server/BlockGrass.java
  23. +14 −0 net/minecraft/server/BlockGravel.java
  24. +35 −0 net/minecraft/server/BlockIce.java
  25. +47 −0 net/minecraft/server/BlockJukeBox.java
  26. +99 −0 net/minecraft/server/BlockLadder.java
  27. +116 −0 net/minecraft/server/BlockLeaves.java
  28. +21 −0 net/minecraft/server/BlockLeavesBase.java
  29. +199 −0 net/minecraft/server/BlockLever.java
  30. +23 −0 net/minecraft/server/BlockLog.java
  31. +87 −0 net/minecraft/server/BlockMinecartTrack.java
  32. +26 −0 net/minecraft/server/BlockMobSpawner.java
  33. +19 −0 net/minecraft/server/BlockMushroom.java
  34. +18 −0 net/minecraft/server/BlockObsidian.java
  35. +18 −0 net/minecraft/server/BlockOre.java
  36. +13 −0 net/minecraft/server/BlockOreBlock.java
  37. +138 −0 net/minecraft/server/BlockPressurePlate.java
  38. +96 −0 net/minecraft/server/BlockRedstoneOre.java
  39. +128 −0 net/minecraft/server/BlockRedstoneTorch.java
  40. +291 −0 net/minecraft/server/BlockRedstoneWire.java
  41. +73 −0 net/minecraft/server/BlockReed.java
  42. +56 −0 net/minecraft/server/BlockSand.java
  43. +35 −0 net/minecraft/server/BlockSapling.java
  44. +108 −0 net/minecraft/server/BlockSign.java
  45. +61 −0 net/minecraft/server/BlockSnow.java
  46. +26 −0 net/minecraft/server/BlockSnowBlock.java
  47. +85 −0 net/minecraft/server/BlockSoil.java
  48. +35 −0 net/minecraft/server/BlockSponge.java
  49. +226 −0 net/minecraft/server/BlockStairs.java
  50. +56 −0 net/minecraft/server/BlockStationary.java
  51. +57 −0 net/minecraft/server/BlockStep.java
  52. +14 −0 net/minecraft/server/BlockStone.java
  53. +39 −0 net/minecraft/server/BlockTNT.java
  54. +138 −0 net/minecraft/server/BlockTorch.java
  55. +18 −0 net/minecraft/server/BlockWorkbench.java
  56. +547 −0 net/minecraft/server/Chunk.java
  57. +63 −0 net/minecraft/server/ChunkCache.java
  58. +31 −0 net/minecraft/server/ChunkCoordIntPair.java
  59. +26 −0 net/minecraft/server/ChunkCoordinates.java
  60. +220 −0 net/minecraft/server/ChunkLoader.java
  61. +28 −0 net/minecraft/server/ChunkPosition.java
  62. +492 −0 net/minecraft/server/ChunkProviderGenerate.java
  63. +204 −0 net/minecraft/server/ChunkProviderLoadOrGenerate.java
  64. +205 −0 net/minecraft/server/ChunkProviderServer.java
  65. +83 −0 net/minecraft/server/CompressedStreamTools.java
  66. +51 −0 net/minecraft/server/ConsoleLogFormatter.java
  67. +32 −0 net/minecraft/server/ConsoleLogManager.java
  68. +828 −0 net/minecraft/server/Entity.java
  69. +32 −0 net/minecraft/server/EntityAnimal.java
  70. +229 −0 net/minecraft/server/EntityArrow.java
  71. +219 −0 net/minecraft/server/EntityBoat.java
  72. +76 −0 net/minecraft/server/EntityChicken.java
  73. +40 −0 net/minecraft/server/EntityCow.java
  74. +155 −0 net/minecraft/server/EntityCreature.java
  75. +74 −0 net/minecraft/server/EntityCreeper.java
  76. +75 −0 net/minecraft/server/EntityFallingSand.java
  77. +18 −0 net/minecraft/server/EntityGiantZombie.java
  78. +242 −0 net/minecraft/server/EntityHuman.java
  79. +196 −0 net/minecraft/server/EntityItem.java
  80. +160 −0 net/minecraft/server/EntityList.java
  81. +53 −0 net/minecraft/server/EntityListEntry.java
Sorry, we could not display the entire diff because it was too big.
4 META-INF/MANIFEST.MF
@@ -0,0 +1,4 @@
+Manifest-Version: 1.0
+Created-By: 1.6.0
+Main-Class: net.minecraft.server.MinecraftServer
+
4 README.md
@@ -0,0 +1,4 @@
+mc-dev
+======
+
+This repository contains [automatically generated](https://github.com/Bukkit/Bukkit-MinecraftServer/) decompiled sources of a (internally renamed) minecraft_server.jar. The original minecraft_server.jar (and therefor this code) is copyrighted by [Mojang AB](http://www.mojang.com).
@Jckf
Jckf added a note

The "automatically generated" link is dead.

@grum The Bukkit Project member
grum added a note

Not for the cool people ;D

its just a private repo..

How exactly is the code generated?

@grum The Bukkit Project member
grum added a note

By code in a private repo.

This is the complete vanilla server source code?

Also, why is there no src?

@feildmaster The Bukkit Project member

You aren't supposed to do anything with this repo... (directly)

Yeah I learned that recently, just for the net.minecraft.server package in CraftBukkit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
350 net/minecraft/server/AxisAlignedBB.java
@@ -0,0 +1,350 @@
+package net.minecraft.server;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class AxisAlignedBB {
+
+ private static List g = new ArrayList();
+ private static int h = 0;
+ public double a;
+ public double b;
+ public double c;
+ public double d;
+ public double e;
+ public double f;
+
+ public static AxisAlignedBB a(double d0, double d1, double d2, double d3, double d4, double d5) {
+ return new AxisAlignedBB(d0, d1, d2, d3, d4, d5);
+ }
+
+ public static void a() {
+ h = 0;
+ }
+
+ public static AxisAlignedBB b(double d0, double d1, double d2, double d3, double d4, double d5) {
+ if (h >= g.size()) {
+ g.add(a(0.0D, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D));
+ }
+
+ return ((AxisAlignedBB) g.get(h++)).c(d0, d1, d2, d3, d4, d5);
+ }
+
+ private AxisAlignedBB(double d0, double d1, double d2, double d3, double d4, double d5) {
+ this.a = d0;
+ this.b = d1;
+ this.c = d2;
+ this.d = d3;
+ this.e = d4;
+ this.f = d5;
+ }
+
+ public AxisAlignedBB c(double d0, double d1, double d2, double d3, double d4, double d5) {
+ this.a = d0;
+ this.b = d1;
+ this.c = d2;
+ this.d = d3;
+ this.e = d4;
+ this.f = d5;
+ return this;
+ }
+
+ public AxisAlignedBB a(double d0, double d1, double d2) {
+ double d3 = this.a;
+ double d4 = this.b;
+ double d5 = this.c;
+ double d6 = this.d;
+ double d7 = this.e;
+ double d8 = this.f;
+
+ if (d0 < 0.0D) {
+ d3 += d0;
+ }
+
+ if (d0 > 0.0D) {
+ d6 += d0;
+ }
+
+ if (d1 < 0.0D) {
+ d4 += d1;
+ }
+
+ if (d1 > 0.0D) {
+ d7 += d1;
+ }
+
+ if (d2 < 0.0D) {
+ d5 += d2;
+ }
+
+ if (d2 > 0.0D) {
+ d8 += d2;
+ }
+
+ return b(d3, d4, d5, d6, d7, d8);
+ }
+
+ public AxisAlignedBB b(double d0, double d1, double d2) {
+ double d3 = this.a - d0;
+ double d4 = this.b - d1;
+ double d5 = this.c - d2;
+ double d6 = this.d + d0;
+ double d7 = this.e + d1;
+ double d8 = this.f + d2;
+
+ return b(d3, d4, d5, d6, d7, d8);
+ }
+
+ public AxisAlignedBB c(double d0, double d1, double d2) {
+ return b(this.a + d0, this.b + d1, this.c + d2, this.d + d0, this.e + d1, this.f + d2);
+ }
+
+ public double a(AxisAlignedBB axisalignedbb, double d0) {
+ if (axisalignedbb.e > this.b && axisalignedbb.b < this.e) {
+ if (axisalignedbb.f > this.c && axisalignedbb.c < this.f) {
+ double d1;
+
+ if (d0 > 0.0D && axisalignedbb.d <= this.a) {
+ d1 = this.a - axisalignedbb.d;
+ if (d1 < d0) {
+ d0 = d1;
+ }
+ }
+
+ if (d0 < 0.0D && axisalignedbb.a >= this.d) {
+ d1 = this.d - axisalignedbb.a;
+ if (d1 > d0) {
+ d0 = d1;
+ }
+ }
+
+ return d0;
+ } else {
+ return d0;
+ }
+ } else {
+ return d0;
+ }
+ }
+
+ public double b(AxisAlignedBB axisalignedbb, double d0) {
+ if (axisalignedbb.d > this.a && axisalignedbb.a < this.d) {
+ if (axisalignedbb.f > this.c && axisalignedbb.c < this.f) {
+ double d1;
+
+ if (d0 > 0.0D && axisalignedbb.e <= this.b) {
+ d1 = this.b - axisalignedbb.e;
+ if (d1 < d0) {
+ d0 = d1;
+ }
+ }
+
+ if (d0 < 0.0D && axisalignedbb.b >= this.e) {
+ d1 = this.e - axisalignedbb.b;
+ if (d1 > d0) {
+ d0 = d1;
+ }
+ }
+
+ return d0;
+ } else {
+ return d0;
+ }
+ } else {
+ return d0;
+ }
+ }
+
+ public double c(AxisAlignedBB axisalignedbb, double d0) {
+ if (axisalignedbb.d > this.a && axisalignedbb.a < this.d) {
+ if (axisalignedbb.e > this.b && axisalignedbb.b < this.e) {
+ double d1;
+
+ if (d0 > 0.0D && axisalignedbb.f <= this.c) {
+ d1 = this.c - axisalignedbb.f;
+ if (d1 < d0) {
+ d0 = d1;
+ }
+ }
+
+ if (d0 < 0.0D && axisalignedbb.c >= this.f) {
+ d1 = this.f - axisalignedbb.c;
+ if (d1 > d0) {
+ d0 = d1;
+ }
+ }
+
+ return d0;
+ } else {
+ return d0;
+ }
+ } else {
+ return d0;
+ }
+ }
+
+ public boolean a(AxisAlignedBB axisalignedbb) {
+ return axisalignedbb.d > this.a && axisalignedbb.a < this.d ? (axisalignedbb.e > this.b && axisalignedbb.b < this.e ? axisalignedbb.f > this.c && axisalignedbb.c < this.f : false) : false;
+ }
+
+ public AxisAlignedBB d(double d0, double d1, double d2) {
+ this.a += d0;
+ this.b += d1;
+ this.c += d2;
+ this.d += d0;
+ this.e += d1;
+ this.f += d2;
+ return this;
+ }
+
+ public AxisAlignedBB e(double d0, double d1, double d2) {
+ double d3 = this.a;
+ double d4 = this.b;
+ double d5 = this.c;
+ double d6 = this.d;
+ double d7 = this.e;
+ double d8 = this.f;
+
+ if (d0 < 0.0D) {
+ d3 -= d0;
+ }
+
+ if (d0 > 0.0D) {
+ d6 -= d0;
+ }
+
+ if (d1 < 0.0D) {
+ d4 -= d1;
+ }
+
+ if (d1 > 0.0D) {
+ d7 -= d1;
+ }
+
+ if (d2 < 0.0D) {
+ d5 -= d2;
+ }
+
+ if (d2 > 0.0D) {
+ d8 -= d2;
+ }
+
+ return b(d3, d4, d5, d6, d7, d8);
+ }
+
+ public AxisAlignedBB b() {
+ return b(this.a, this.b, this.c, this.d, this.e, this.f);
+ }
+
+ public MovingObjectPosition a(Vec3D vec3d, Vec3D vec3d1) {
+ Vec3D vec3d2 = vec3d.a(vec3d1, this.a);
+ Vec3D vec3d3 = vec3d.a(vec3d1, this.d);
+ Vec3D vec3d4 = vec3d.b(vec3d1, this.b);
+ Vec3D vec3d5 = vec3d.b(vec3d1, this.e);
+ Vec3D vec3d6 = vec3d.c(vec3d1, this.c);
+ Vec3D vec3d7 = vec3d.c(vec3d1, this.f);
+
+ if (!this.a(vec3d2)) {
+ vec3d2 = null;
+ }
+
+ if (!this.a(vec3d3)) {
+ vec3d3 = null;
+ }
+
+ if (!this.b(vec3d4)) {
+ vec3d4 = null;
+ }
+
+ if (!this.b(vec3d5)) {
+ vec3d5 = null;
+ }
+
+ if (!this.c(vec3d6)) {
+ vec3d6 = null;
+ }
+
+ if (!this.c(vec3d7)) {
+ vec3d7 = null;
+ }
+
+ Vec3D vec3d8 = null;
+
+ if (vec3d2 != null && (vec3d8 == null || vec3d.b(vec3d2) < vec3d.b(vec3d8))) {
+ vec3d8 = vec3d2;
+ }
+
+ if (vec3d3 != null && (vec3d8 == null || vec3d.b(vec3d3) < vec3d.b(vec3d8))) {
+ vec3d8 = vec3d3;
+ }
+
+ if (vec3d4 != null && (vec3d8 == null || vec3d.b(vec3d4) < vec3d.b(vec3d8))) {
+ vec3d8 = vec3d4;
+ }
+
+ if (vec3d5 != null && (vec3d8 == null || vec3d.b(vec3d5) < vec3d.b(vec3d8))) {
+ vec3d8 = vec3d5;
+ }
+
+ if (vec3d6 != null && (vec3d8 == null || vec3d.b(vec3d6) < vec3d.b(vec3d8))) {
+ vec3d8 = vec3d6;
+ }
+
+ if (vec3d7 != null && (vec3d8 == null || vec3d.b(vec3d7) < vec3d.b(vec3d8))) {
+ vec3d8 = vec3d7;
+ }
+
+ if (vec3d8 == null) {
+ return null;
+ } else {
+ byte b0 = -1;
+
+ if (vec3d8 == vec3d2) {
+ b0 = 4;
+ }
+
+ if (vec3d8 == vec3d3) {
+ b0 = 5;
+ }
+
+ if (vec3d8 == vec3d4) {
+ b0 = 0;
+ }
+
+ if (vec3d8 == vec3d5) {
+ b0 = 1;
+ }
+
+ if (vec3d8 == vec3d6) {
+ b0 = 2;
+ }
+
+ if (vec3d8 == vec3d7) {
+ b0 = 3;
+ }
+
+ return new MovingObjectPosition(0, 0, 0, b0, vec3d8);
+ }
+ }
+
+ private boolean a(Vec3D vec3d) {
+ return vec3d == null ? false : vec3d.b >= this.b && vec3d.b <= this.e && vec3d.c >= this.c && vec3d.c <= this.f;
+ }
+
+ private boolean b(Vec3D vec3d) {
+ return vec3d == null ? false : vec3d.a >= this.a && vec3d.a <= this.d && vec3d.c >= this.c && vec3d.c <= this.f;
+ }
+
+ private boolean c(Vec3D vec3d) {
+ return vec3d == null ? false : vec3d.a >= this.a && vec3d.a <= this.d && vec3d.b >= this.b && vec3d.b <= this.e;
+ }
+
+ public void b(AxisAlignedBB axisalignedbb) {
+ this.a = axisalignedbb.a;
+ this.b = axisalignedbb.b;
+ this.c = axisalignedbb.c;
+ this.d = axisalignedbb.d;
+ this.e = axisalignedbb.e;
+ this.f = axisalignedbb.f;
+ }
+}
439 net/minecraft/server/Block.java
@@ -0,0 +1,439 @@
+package net.minecraft.server;
+
+import java.util.ArrayList;
+import java.util.Random;
+
+public class Block {
+
+ public static final StepSound e = new StepSound("stone", 1.0F, 1.0F);
+ public static final StepSound f = new StepSound("wood", 1.0F, 1.0F);
+ public static final StepSound g = new StepSound("gravel", 1.0F, 1.0F);
+ public static final StepSound h = new StepSound("grass", 1.0F, 1.0F);
+ public static final StepSound i = new StepSound("stone", 1.0F, 1.0F);
+ public static final StepSound j = new StepSound("stone", 1.0F, 1.5F);
+ public static final StepSound k = new StepSoundStone("stone", 1.0F, 1.0F);
+ public static final StepSound l = new StepSound("cloth", 1.0F, 1.0F);
+ public static final StepSound m = new StepSoundSand("sand", 1.0F, 1.0F);
+ public static final Block[] n = new Block[256];
+ public static final boolean[] o = new boolean[256];
+ public static final boolean[] p = new boolean[256];
+ public static final boolean[] q = new boolean[256];
+ public static final int[] r = new int[256];
+ public static final boolean[] s = new boolean[256];
+ public static final int[] t = new int[256];
+ public static final Block STONE = (new BlockStone(1, 1)).c(1.5F).b(10.0F).a(i);
+ public static final BlockGrass GRASS = (BlockGrass) (new BlockGrass(2)).c(0.6F).a(h);
+ public static final Block DIRT = (new BlockDirt(3, 2)).c(0.5F).a(g);
+ public static final Block COBBLESTONE = (new Block(4, 16, Material.d)).c(2.0F).b(10.0F).a(i);
+ public static final Block WOOD = (new Block(5, 4, Material.c)).c(2.0F).b(5.0F).a(f);
+ public static final Block SAPLING = (new BlockSapling(6, 15)).c(0.0F).a(h);
+ public static final Block BEDROCK = (new Block(7, 17, Material.d)).c(-1.0F).b(6000000.0F).a(i);
+ public static final Block WATER = (new BlockFlowing(8, Material.f)).c(100.0F).c(3);
+ public static final Block STATIONARY_WATER = (new BlockStationary(9, Material.f)).c(100.0F).c(3);
+ public static final Block LAVA = (new BlockFlowing(10, Material.g)).c(0.0F).a(1.0F).c(255);
+ public static final Block STATIONARY_LAVA = (new BlockStationary(11, Material.g)).c(100.0F).a(1.0F).c(255);
+ public static final Block SAND = (new BlockSand(12, 18)).c(0.5F).a(m);
+ public static final Block GRAVEL = (new BlockGravel(13, 19)).c(0.6F).a(g);
+ public static final Block GOLD_ORE = (new BlockOre(14, 32)).c(3.0F).b(5.0F).a(i);
+ public static final Block IRON_ORE = (new BlockOre(15, 33)).c(3.0F).b(5.0F).a(i);
+ public static final Block COAL_ORE = (new BlockOre(16, 34)).c(3.0F).b(5.0F).a(i);
+ public static final Block LOG = (new BlockLog(17)).c(2.0F).a(f);
+ public static final BlockLeaves LEAVES = (BlockLeaves) (new BlockLeaves(18, 52)).c(0.2F).c(1).a(h);
+ public static final Block SPONGE = (new BlockSponge(19)).c(0.6F).a(h);
+ public static final Block GLASS = (new BlockGlass(20, 49, Material.o, false)).c(0.3F).a(k);
+ public static final Block O = null;
+ public static final Block P = null;
+ public static final Block Q = null;
+ public static final Block R = null;
+ public static final Block S = null;
+ public static final Block T = null;
+ public static final Block U = null;
+ public static final Block V = null;
+ public static final Block W = null;
+ public static final Block X = null;
+ public static final Block Y = null;
+ public static final Block Z = null;
+ public static final Block aa = null;
+ public static final Block ab = null;
+ public static final Block WOOL = (new Block(35, 64, Material.k)).c(0.8F).a(l);
+ public static final Block ad = null;
+ public static final BlockFlower YELLOW_FLOWER = (BlockFlower) (new BlockFlower(37, 13)).c(0.0F).a(h);
+ public static final BlockFlower RED_ROSE = (BlockFlower) (new BlockFlower(38, 12)).c(0.0F).a(h);
+ public static final BlockFlower BROWN_MUSHROOM = (BlockFlower) (new BlockMushroom(39, 29)).c(0.0F).a(h).a(0.125F);
+ public static final BlockFlower RED_MUSHROOM = (BlockFlower) (new BlockMushroom(40, 28)).c(0.0F).a(h);
+ public static final Block GOLD_BLOCK = (new BlockOreBlock(41, 39)).c(3.0F).b(10.0F).a(j);
+ public static final Block IRON_BLOCK = (new BlockOreBlock(42, 38)).c(5.0F).b(10.0F).a(j);
+ public static final Block DOUBLE_STEP = (new BlockStep(43, true)).c(2.0F).b(10.0F).a(i);
+ public static final Block STEP = (new BlockStep(44, false)).c(2.0F).b(10.0F).a(i);
+ public static final Block BRICK = (new Block(45, 7, Material.d)).c(2.0F).b(10.0F).a(i);
+ public static final Block TNT = (new BlockTNT(46, 8)).c(0.0F).a(h);
+ public static final Block BOOKSHELF = (new BlockBookshelf(47, 35)).c(1.5F).a(f);
+ public static final Block MOSSY_COBBLESTONE = (new Block(48, 36, Material.d)).c(2.0F).b(10.0F).a(i);
+ public static final Block OBSIDIAN = (new BlockObsidian(49, 37)).c(10.0F).b(2000.0F).a(i);
+ public static final Block TORCH = (new BlockTorch(50, 80)).c(0.0F).a(0.9375F).a(f);
+ public static final BlockFire FIRE = (BlockFire) ((BlockFire) (new BlockFire(51, 31)).c(0.0F).a(1.0F).a(f));
+ public static final Block MOB_SPAWNER = (new BlockMobSpawner(52, 65)).c(5.0F).a(j);
+ public static final Block WOOD_STAIRS = new BlockStairs(53, WOOD);
+ public static final Block CHEST = (new BlockChest(54)).c(2.5F).a(f);
+ public static final Block REDSTONE_WIRE = (new BlockRedstoneWire(55, 84)).c(0.0F).a(e);
+ public static final Block DIAMOND_ORE = (new BlockOre(56, 50)).c(3.0F).b(5.0F).a(i);
+ public static final Block DIAMOND_BLOCK = (new BlockOreBlock(57, 40)).c(5.0F).b(10.0F).a(j);
+ public static final Block WORKBENCH = (new BlockWorkbench(58)).c(2.5F).a(f);
+ public static final Block CROPS = (new BlockCrops(59, 88)).c(0.0F).a(h);
+ public static final Block SOIL = (new BlockSoil(60)).c(0.6F).a(g);
+ public static final Block FURNACE = (new BlockFurnace(61, false)).c(3.5F).a(i);
+ public static final Block BURNING_FURNACE = (new BlockFurnace(62, true)).c(3.5F).a(i).a(0.875F);
+ public static final Block SIGN_POST = (new BlockSign(63, TileEntitySign.class, true)).c(1.0F).a(f);
+ public static final Block WOODEN_DOOR = (new BlockDoor(64, Material.c)).c(3.0F).a(f);
+ public static final Block LADDER = (new BlockLadder(65, 83)).c(0.4F).a(f);
+ public static final Block RAILS = (new BlockMinecartTrack(66, 128)).c(0.7F).a(j);
+ public static final Block COBBLESTONE_STAIRS = new BlockStairs(67, COBBLESTONE);
+ public static final Block WALL_SIGN = (new BlockSign(68, TileEntitySign.class, false)).c(1.0F).a(f);
+ public static final Block LEVER = (new BlockLever(69, 96)).c(0.5F).a(f);
+ public static final Block STONE_PLATE = (new BlockPressurePlate(70, STONE.bb, EnumMobType.MOBS)).c(0.5F).a(i);
+ public static final Block IRON_DOOR_BLOCK = (new BlockDoor(71, Material.e)).c(5.0F).a(j);
+ public static final Block WOOD_PLATE = (new BlockPressurePlate(72, WOOD.bb, EnumMobType.EVERYTHING)).c(0.5F).a(f);
+ public static final Block REDSTONE_ORE = (new BlockRedstoneOre(73, 51, false)).c(3.0F).b(5.0F).a(i);
+ public static final Block GLOWING_REDSTONE_ORE = (new BlockRedstoneOre(74, 51, true)).a(0.625F).c(3.0F).b(5.0F).a(i);
+ public static final Block REDSTONE_TORCH_OFF = (new BlockRedstoneTorch(75, 115, false)).c(0.0F).a(f);
+ public static final Block REDSTONE_TORCH_ON = (new BlockRedstoneTorch(76, 99, true)).c(0.0F).a(0.5F).a(f);
+ public static final Block STONE_BUTTON = (new BlockButton(77, STONE.bb)).c(0.5F).a(i);
+ public static final Block SNOW = (new BlockSnow(78, 66)).c(0.1F).a(l);
+ public static final Block ICE = (new BlockIce(79, 67)).c(0.5F).c(3).a(k);
+ public static final Block SNOW_BLOCK = (new BlockSnowBlock(80, 66)).c(0.2F).a(l);
+ public static final Block CACTUS = (new BlockCactus(81, 70)).c(0.4F).a(l);
+ public static final Block CLAY = (new BlockClay(82, 72)).c(0.6F).a(g);
+ public static final Block SUGAR_CANE_BLOCK = (new BlockReed(83, 73)).c(0.0F).a(h);
+ public static final Block JUKEBOX = (new BlockJukeBox(84, 74)).c(2.0F).b(10.0F).a(i);
+ public static final Block FENCE = (new BlockFence(85, 4)).c(2.0F).b(5.0F).a(f);
+ public int bb;
+ public final int bc;
+ protected float bd;
+ protected float be;
+ public double bf;
+ public double bg;
+ public double bh;
+ public double bi;
+ public double bj;
+ public double bk;
+ public StepSound bl;
+ public float bm;
+ public final Material bn;
+ public float bo;
+
+ protected Block(int i, Material material) {
+ this.bl = e;
+ this.bm = 1.0F;
+ this.bo = 0.6F;
+ if (n[i] != null) {
+ throw new IllegalArgumentException("Slot " + i + " is already occupied by " + n[i] + " when adding " + this);
+ } else {
+ this.bn = material;
+ n[i] = this;
+ this.bc = i;
+ this.a(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
+ p[i] = this.b();
+ r[i] = this.b() ? 255 : 0;
+ s[i] = this.f();
+ q[i] = false;
+ }
+ }
+
+ protected Block(int i, int j, Material material) {
+ this(i, material);
+ this.bb = j;
+ }
+
+ protected Block a(StepSound stepsound) {
+ this.bl = stepsound;
+ return this;
+ }
+
+ protected Block c(int i) {
+ r[this.bc] = i;
+ return this;
+ }
+
+ protected Block a(float f) {
+ t[this.bc] = (int) (15.0F * f);
+ return this;
+ }
+
+ protected Block b(float f) {
+ this.be = f * 3.0F;
+ return this;
+ }
+
+ private boolean f() {
+ return false;
+ }
+
+ public int a() {
+ return 0;
+ }
+
+ protected Block c(float f) {
+ this.bd = f;
+ if (this.be < f * 5.0F) {
+ this.be = f * 5.0F;
+ }
+
+ return this;
+ }
+
+ protected void a(boolean flag) {
+ o[this.bc] = flag;
+ }
+
+ public void a(float f, float f1, float f2, float f3, float f4, float f5) {
+ this.bf = (double) f;
+ this.bg = (double) f1;
+ this.bh = (double) f2;
+ this.bi = (double) f3;
+ this.bj = (double) f4;
+ this.bk = (double) f5;
+ }
+
+ public boolean a(IBlockAccess iblockaccess, int i, int j, int k, int l) {
+ return l == 0 && this.bg > 0.0D ? true : (l == 1 && this.bj < 1.0D ? true : (l == 2 && this.bh > 0.0D ? true : (l == 3 && this.bk < 1.0D ? true : (l == 4 && this.bf > 0.0D ? true : (l == 5 && this.bi < 1.0D ? true : !iblockaccess.d(i, j, k))))));
+ }
+
+ public int a(int i) {
+ return this.bb;
+ }
+
+ public void a(World world, int i, int j, int k, AxisAlignedBB axisalignedbb, ArrayList arraylist) {
+ AxisAlignedBB axisalignedbb1 = this.d(world, i, j, k);
+
+ if (axisalignedbb1 != null && axisalignedbb.a(axisalignedbb1)) {
+ arraylist.add(axisalignedbb1);
+ }
+ }
+
+ public AxisAlignedBB d(World world, int i, int j, int k) {
+ return AxisAlignedBB.b((double) i + this.bf, (double) j + this.bg, (double) k + this.bh, (double) i + this.bi, (double) j + this.bj, (double) k + this.bk);
+ }
+
+ public boolean b() {
+ return true;
+ }
+
+ public boolean a(int i, boolean flag) {
+ return this.e();
+ }
+
+ public boolean e() {
+ return true;
+ }
+
+ public void a(World world, int i, int j, int k, Random random) {}
+
+ public void a(World world, int i, int j, int k, int l) {}
+
+ public void b(World world, int i, int j, int k, int l) {}
+
+ public int c() {
+ return 10;
+ }
+
+ public void e(World world, int i, int j, int k) {}
+
+ public void b(World world, int i, int j, int k) {}
+
+ public int a(Random random) {
+ return 1;
+ }
+
+ public int a(int i, Random random) {
+ return this.bc;
+ }
+
+ public float a(EntityHuman entityhuman) {
+ return this.bd < 0.0F ? 0.0F : (!entityhuman.b(this) ? 1.0F / this.bd / 100.0F : entityhuman.a(this) / this.bd / 30.0F);
+ }
+
+ public void a_(World world, int i, int j, int k, int l) {
+ this.a(world, i, j, k, l, 1.0F);
+ }
+
+ public void a(World world, int i, int j, int k, int l, float f) {
+ if (!world.x) {
+ int i1 = this.a(world.m);
+
+ for (int j1 = 0; j1 < i1; ++j1) {
+ if (world.m.nextFloat() <= f) {
+ int k1 = this.a(l, world.m);
+
+ if (k1 > 0) {
+ float f1 = 0.7F;
+ double d0 = (double) (world.m.nextFloat() * f1) + (double) (1.0F - f1) * 0.5D;
+ double d1 = (double) (world.m.nextFloat() * f1) + (double) (1.0F - f1) * 0.5D;
+ double d2 = (double) (world.m.nextFloat() * f1) + (double) (1.0F - f1) * 0.5D;
+ EntityItem entityitem = new EntityItem(world, (double) i + d0, (double) j + d1, (double) k + d2, new ItemStack(k1));
+
+ entityitem.ad = 10;
+ world.a((Entity) entityitem);
+ }
+ }
+ }
+ }
+ }
+
+ public float a(Entity entity) {
+ return this.be / 5.0F;
+ }
+
+ public MovingObjectPosition a(World world, int i, int j, int k, Vec3D vec3d, Vec3D vec3d1) {
+ this.a((IBlockAccess) world, i, j, k);
+ vec3d = vec3d.c((double) (-i), (double) (-j), (double) (-k));
+ vec3d1 = vec3d1.c((double) (-i), (double) (-j), (double) (-k));
+ Vec3D vec3d2 = vec3d.a(vec3d1, this.bf);
+ Vec3D vec3d3 = vec3d.a(vec3d1, this.bi);
+ Vec3D vec3d4 = vec3d.b(vec3d1, this.bg);
+ Vec3D vec3d5 = vec3d.b(vec3d1, this.bj);
+ Vec3D vec3d6 = vec3d.c(vec3d1, this.bh);
+ Vec3D vec3d7 = vec3d.c(vec3d1, this.bk);
+
+ if (!this.a(vec3d2)) {
+ vec3d2 = null;
+ }
+
+ if (!this.a(vec3d3)) {
+ vec3d3 = null;
+ }
+
+ if (!this.b(vec3d4)) {
+ vec3d4 = null;
+ }
+
+ if (!this.b(vec3d5)) {
+ vec3d5 = null;
+ }
+
+ if (!this.c(vec3d6)) {
+ vec3d6 = null;
+ }
+
+ if (!this.c(vec3d7)) {
+ vec3d7 = null;
+ }
+
+ Vec3D vec3d8 = null;
+
+ if (vec3d2 != null && (vec3d8 == null || vec3d.a(vec3d2) < vec3d.a(vec3d8))) {
+ vec3d8 = vec3d2;
+ }
+
+ if (vec3d3 != null && (vec3d8 == null || vec3d.a(vec3d3) < vec3d.a(vec3d8))) {
+ vec3d8 = vec3d3;
+ }
+
+ if (vec3d4 != null && (vec3d8 == null || vec3d.a(vec3d4) < vec3d.a(vec3d8))) {
+ vec3d8 = vec3d4;
+ }
+
+ if (vec3d5 != null && (vec3d8 == null || vec3d.a(vec3d5) < vec3d.a(vec3d8))) {
+ vec3d8 = vec3d5;
+ }
+
+ if (vec3d6 != null && (vec3d8 == null || vec3d.a(vec3d6) < vec3d.a(vec3d8))) {
+ vec3d8 = vec3d6;
+ }
+
+ if (vec3d7 != null && (vec3d8 == null || vec3d.a(vec3d7) < vec3d.a(vec3d8))) {
+ vec3d8 = vec3d7;
+ }
+
+ if (vec3d8 == null) {
+ return null;
+ } else {
+ byte b0 = -1;
+
+ if (vec3d8 == vec3d2) {
+ b0 = 4;
+ }
+
+ if (vec3d8 == vec3d3) {
+ b0 = 5;
+ }
+
+ if (vec3d8 == vec3d4) {
+ b0 = 0;
+ }
+
+ if (vec3d8 == vec3d5) {
+ b0 = 1;
+ }
+
+ if (vec3d8 == vec3d6) {
+ b0 = 2;
+ }
+
+ if (vec3d8 == vec3d7) {
+ b0 = 3;
+ }
+
+ return new MovingObjectPosition(i, j, k, b0, vec3d8.c((double) i, (double) j, (double) k));
+ }
+ }
+
+ private boolean a(Vec3D vec3d) {
+ return vec3d == null ? false : vec3d.b >= this.bg && vec3d.b <= this.bj && vec3d.c >= this.bh && vec3d.c <= this.bk;
+ }
+
+ private boolean b(Vec3D vec3d) {
+ return vec3d == null ? false : vec3d.a >= this.bf && vec3d.a <= this.bi && vec3d.c >= this.bh && vec3d.c <= this.bk;
+ }
+
+ private boolean c(Vec3D vec3d) {
+ return vec3d == null ? false : vec3d.a >= this.bf && vec3d.a <= this.bi && vec3d.b >= this.bg && vec3d.b <= this.bj;
+ }
+
+ public void c(World world, int i, int j, int k) {}
+
+ public boolean a(World world, int i, int j, int k) {
+ int l = world.a(i, j, k);
+
+ return l == 0 || n[l].bn.d();
+ }
+
+ public boolean a(World world, int i, int j, int k, EntityHuman entityhuman) {
+ return false;
+ }
+
+ public void b(World world, int i, int j, int k, Entity entity) {}
+
+ public void c(World world, int i, int j, int k, int l) {}
+
+ public void b(World world, int i, int j, int k, EntityHuman entityhuman) {}
+
+ public void a(World world, int i, int j, int k, Entity entity, Vec3D vec3d) {}
+
+ public void a(IBlockAccess iblockaccess, int i, int j, int k) {}
+
+ public boolean b(IBlockAccess iblockaccess, int i, int j, int k, int l) {
+ return false;
+ }
+
+ public boolean d() {
+ return false;
+ }
+
+ public void a(World world, int i, int j, int k, Entity entity) {}
+
+ public boolean d(World world, int i, int j, int k, int l) {
+ return false;
+ }
+
+ public boolean f(World world, int i, int j, int k) {
+ return true;
+ }
+
+ static {
+ for (int i = 0; i < 256; ++i) {
+ if (n[i] != null) {
+ Item.c[i] = new ItemBlock(i - 256);
+ }
+ }
+ }
+}
18 net/minecraft/server/BlockBookshelf.java
@@ -0,0 +1,18 @@
+package net.minecraft.server;
+
+import java.util.Random;
+
+public class BlockBookshelf extends Block {
+
+ public BlockBookshelf(int i, int j) {
+ super(i, j, Material.c);
+ }
+
+ public int a(int i) {
+ return i <= 1 ? 4 : this.bb;
+ }
+
+ public int a(Random random) {
+ return 0;
+ }
+}
21 net/minecraft/server/BlockBreakable.java
@@ -0,0 +1,21 @@
+package net.minecraft.server;
+
+public class BlockBreakable extends Block {
+
+ private boolean a;
+
+ protected BlockBreakable(int i, int j, Material material, boolean flag) {
+ super(i, j, material);
+ this.a = flag;
+ }
+
+ public boolean b() {
+ return false;
+ }
+
+ public boolean a(IBlockAccess iblockaccess, int i, int j, int k, int l) {
+ int i1 = iblockaccess.a(i, j, k);
+
+ return !this.a && i1 == this.bc ? false : super.a(iblockaccess, i, j, k, l);
+ }
+}
228 net/minecraft/server/BlockButton.java
@@ -0,0 +1,228 @@
+package net.minecraft.server;
+
+import java.util.Random;
+
+public class BlockButton extends Block {
+
+ protected BlockButton(int i, int j) {
+ super(i, j, Material.n);
+ this.a(true);
+ }
+
+ public AxisAlignedBB d(World world, int i, int j, int k) {
+ return null;
+ }
+
+ public int c() {
+ return 20;
+ }
+
+ public boolean b() {
+ return false;
+ }
+
+ public boolean a(World world, int i, int j, int k) {
+ return world.d(i - 1, j, k) ? true : (world.d(i + 1, j, k) ? true : (world.d(i, j, k - 1) ? true : world.d(i, j, k + 1)));
+ }
+
+ public void c(World world, int i, int j, int k, int l) {
+ int i1 = world.b(i, j, k);
+ int j1 = i1 & 8;
+
+ i1 &= 7;
+ if (l == 2 && world.d(i, j, k + 1)) {
+ i1 = 4;
+ }
+
+ if (l == 3 && world.d(i, j, k - 1)) {
+ i1 = 3;
+ }
+
+ if (l == 4 && world.d(i + 1, j, k)) {
+ i1 = 2;
+ }
+
+ if (l == 5 && world.d(i - 1, j, k)) {
+ i1 = 1;
+ }
+
+ world.b(i, j, k, i1 + j1);
+ }
+
+ public void e(World world, int i, int j, int k) {
+ if (world.d(i - 1, j, k)) {
+ world.b(i, j, k, 1);
+ } else if (world.d(i + 1, j, k)) {
+ world.b(i, j, k, 2);
+ } else if (world.d(i, j, k - 1)) {
+ world.b(i, j, k, 3);
+ } else if (world.d(i, j, k + 1)) {
+ world.b(i, j, k, 4);
+ }
+
+ this.g(world, i, j, k);
+ }
+
+ public void b(World world, int i, int j, int k, int l) {
+ if (this.g(world, i, j, k)) {
+ int i1 = world.b(i, j, k) & 7;
+ boolean flag = false;
+
+ if (!world.d(i - 1, j, k) && i1 == 1) {
+ flag = true;
+ }
+
+ if (!world.d(i + 1, j, k) && i1 == 2) {
+ flag = true;
+ }
+
+ if (!world.d(i, j, k - 1) && i1 == 3) {
+ flag = true;
+ }
+
+ if (!world.d(i, j, k + 1) && i1 == 4) {
+ flag = true;
+ }
+
+ if (flag) {
+ this.a_(world, i, j, k, world.b(i, j, k));
+ world.d(i, j, k, 0);
+ }
+ }
+ }
+
+ private boolean g(World world, int i, int j, int k) {
+ if (!this.a(world, i, j, k)) {
+ this.a_(world, i, j, k, world.b(i, j, k));
+ world.d(i, j, k, 0);
+ return false;
+ } else {
+ return true;
+ }
+ }
+
+ public void a(IBlockAccess iblockaccess, int i, int j, int k) {
+ int l = iblockaccess.b(i, j, k);
+ int i1 = l & 7;
+ boolean flag = (l & 8) > 0;
+ float f = 0.375F;
+ float f1 = 0.625F;
+ float f2 = 0.1875F;
+ float f3 = 0.125F;
+
+ if (flag) {
+ f3 = 0.0625F;
+ }
+
+ if (i1 == 1) {
+ this.a(0.0F, f, 0.5F - f2, f3, f1, 0.5F + f2);
+ } else if (i1 == 2) {
+ this.a(1.0F - f3, f, 0.5F - f2, 1.0F, f1, 0.5F + f2);
+ } else if (i1 == 3) {
+ this.a(0.5F - f2, f, 0.0F, 0.5F + f2, f1, f3);
+ } else if (i1 == 4) {
+ this.a(0.5F - f2, f, 1.0F - f3, 0.5F + f2, f1, 1.0F);
+ }
+ }
+
+ public void b(World world, int i, int j, int k, EntityHuman entityhuman) {
+ this.a(world, i, j, k, entityhuman);
+ }
+
+ public boolean a(World world, int i, int j, int k, EntityHuman entityhuman) {
+ int l = world.b(i, j, k);
+ int i1 = l & 7;
+ int j1 = 8 - (l & 8);
+
+ if (j1 == 0) {
+ return true;
+ } else {
+ world.b(i, j, k, i1 + j1);
+ world.b(i, j, k, i, j, k);
+ world.a((double) i + 0.5D, (double) j + 0.5D, (double) k + 0.5D, "random.click", 0.3F, 0.6F);
+ world.g(i, j, k, this.bc);
+ if (i1 == 1) {
+ world.g(i - 1, j, k, this.bc);
+ } else if (i1 == 2) {
+ world.g(i + 1, j, k, this.bc);
+ } else if (i1 == 3) {
+ world.g(i, j, k - 1, this.bc);
+ } else if (i1 == 4) {
+ world.g(i, j, k + 1, this.bc);
+ } else {
+ world.g(i, j - 1, k, this.bc);
+ }
+
+ world.h(i, j, k, this.bc);
+ return true;
+ }
+ }
+
+ public void b(World world, int i, int j, int k) {
+ int l = world.b(i, j, k);
+
+ if ((l & 8) > 0) {
+ world.g(i, j, k, this.bc);
+ int i1 = l & 7;
+
+ if (i1 == 1) {
+ world.g(i - 1, j, k, this.bc);
+ } else if (i1 == 2) {
+ world.g(i + 1, j, k, this.bc);
+ } else if (i1 == 3) {
+ world.g(i, j, k - 1, this.bc);
+ } else if (i1 == 4) {
+ world.g(i, j, k + 1, this.bc);
+ } else {
+ world.g(i, j - 1, k, this.bc);
+ }
+ }
+
+ super.b(world, i, j, k);
+ }
+
+ public boolean b(IBlockAccess iblockaccess, int i, int j, int k, int l) {
+ return (iblockaccess.b(i, j, k) & 8) > 0;
+ }
+
+ public boolean d(World world, int i, int j, int k, int l) {
+ int i1 = world.b(i, j, k);
+
+ if ((i1 & 8) == 0) {
+ return false;
+ } else {
+ int j1 = i1 & 7;
+
+ return j1 == 5 && l == 1 ? true : (j1 == 4 && l == 2 ? true : (j1 == 3 && l == 3 ? true : (j1 == 2 && l == 4 ? true : j1 == 1 && l == 5)));
+ }
+ }
+
+ public boolean d() {
+ return true;
+ }
+
+ public void a(World world, int i, int j, int k, Random random) {
+ int l = world.b(i, j, k);
+
+ if ((l & 8) != 0) {
+ world.b(i, j, k, l & 7);
+ world.g(i, j, k, this.bc);
+ int i1 = l & 7;
+
+ if (i1 == 1) {
+ world.g(i - 1, j, k, this.bc);
+ } else if (i1 == 2) {
+ world.g(i + 1, j, k, this.bc);
+ } else if (i1 == 3) {
+ world.g(i, j, k - 1, this.bc);
+ } else if (i1 == 4) {
+ world.g(i, j, k + 1, this.bc);
+ } else {
+ world.g(i, j - 1, k, this.bc);
+ }
+
+ world.a((double) i + 0.5D, (double) j + 0.5D, (double) k + 0.5D, "random.click", 0.3F, 0.5F);
+ world.b(i, j, k, i, j, k);
+ }
+ }
+}
81 net/minecraft/server/BlockCactus.java
@@ -0,0 +1,81 @@
+package net.minecraft.server;
+
+import java.util.Random;
+
+public class BlockCactus extends Block {
+
+ protected BlockCactus(int i, int j) {
+ super(i, j, Material.u);
+ this.a(true);
+ }
+
+ public void a(World world, int i, int j, int k, Random random) {
+ if (world.a(i, j + 1, k) == 0) {
+ int l;
+
+ for (l = 1; world.a(i, j - l, k) == this.bc; ++l) {
+ ;
+ }
+
+ if (l < 3) {
+ int i1 = world.b(i, j, k);
+
+ if (i1 == 15) {
+ world.d(i, j + 1, k, this.bc);
+ world.b(i, j, k, 0);
+ } else {
+ world.b(i, j, k, i1 + 1);
+ }
+ }
+ }
+ }
+
+ public AxisAlignedBB d(World world, int i, int j, int k) {
+ float f = 0.0625F;
+
+ return AxisAlignedBB.b((double) ((float) i + f), (double) j, (double) ((float) k + f), (double) ((float) (i + 1) - f), (double) ((float) (j + 1) - f), (double) ((float) (k + 1) - f));
+ }
+
+ public int a(int i) {
+ return i == 1 ? this.bb - 1 : (i == 0 ? this.bb + 1 : this.bb);
+ }
+
+ public boolean b() {
+ return false;
+ }
+
+ public int a() {
+ return 13;
+ }
+
+ public boolean a(World world, int i, int j, int k) {
+ return !super.a(world, i, j, k) ? false : this.f(world, i, j, k);
+ }
+
+ public void b(World world, int i, int j, int k, int l) {
+ if (!this.f(world, i, j, k)) {
+ this.a_(world, i, j, k, world.b(i, j, k));
+ world.d(i, j, k, 0);
+ }
+ }
+
+ public boolean f(World world, int i, int j, int k) {
+ if (world.c(i - 1, j, k).a()) {
+ return false;
+ } else if (world.c(i + 1, j, k).a()) {
+ return false;
+ } else if (world.c(i, j, k - 1).a()) {
+ return false;
+ } else if (world.c(i, j, k + 1).a()) {
+ return false;
+ } else {
+ int l = world.a(i, j - 1, k);
+
+ return l == Block.CACTUS.bc || l == Block.SAND.bc;
+ }
+ }
+
+ public void a(World world, int i, int j, int k, Entity entity) {
+ entity.a((Entity) null, 1);
+ }
+}
115 net/minecraft/server/BlockChest.java
@@ -0,0 +1,115 @@
+package net.minecraft.server;
+
+import java.util.Random;
+
+public class BlockChest extends BlockContainer {
+
+ private Random a = new Random();
+
+ protected BlockChest(int i) {
+ super(i, Material.c);
+ this.bb = 26;
+ }
+
+ public int a(int i) {
+ return i == 1 ? this.bb - 1 : (i == 0 ? this.bb - 1 : (i == 3 ? this.bb + 1 : this.bb));
+ }
+
+ public boolean a(World world, int i, int j, int k) {
+ int l = 0;
+
+ if (world.a(i - 1, j, k) == this.bc) {
+ ++l;
+ }
+
+ if (world.a(i + 1, j, k) == this.bc) {
+ ++l;
+ }
+
+ if (world.a(i, j, k - 1) == this.bc) {
+ ++l;
+ }
+
+ if (world.a(i, j, k + 1) == this.bc) {
+ ++l;
+ }
+
+ return l > 1 ? false : (this.g(world, i - 1, j, k) ? false : (this.g(world, i + 1, j, k) ? false : (this.g(world, i, j, k - 1) ? false : !this.g(world, i, j, k + 1))));
+ }
+
+ private boolean g(World world, int i, int j, int k) {
+ return world.a(i, j, k) != this.bc ? false : (world.a(i - 1, j, k) == this.bc ? true : (world.a(i + 1, j, k) == this.bc ? true : (world.a(i, j, k - 1) == this.bc ? true : world.a(i, j, k + 1) == this.bc)));
+ }
+
+ public void b(World world, int i, int j, int k) {
+ TileEntityChest tileentitychest = (TileEntityChest) world.k(i, j, k);
+
+ for (int l = 0; l < tileentitychest.a(); ++l) {
+ ItemStack itemstack = tileentitychest.a(l);
+
+ if (itemstack != null) {
+ float f = this.a.nextFloat() * 0.8F + 0.1F;
+ float f1 = this.a.nextFloat() * 0.8F + 0.1F;
+ float f2 = this.a.nextFloat() * 0.8F + 0.1F;
+
+ while (itemstack.a > 0) {
+ int i1 = this.a.nextInt(21) + 10;
+
+ if (i1 > itemstack.a) {
+ i1 = itemstack.a;
+ }
+
+ itemstack.a -= i1;
+ EntityItem entityitem = new EntityItem(world, (double) ((float) i + f), (double) ((float) j + f1), (double) ((float) k + f2), new ItemStack(itemstack.c, i1, itemstack.d));
+ float f3 = 0.05F;
+
+ entityitem.o = (double) ((float) this.a.nextGaussian() * f3);
+ entityitem.p = (double) ((float) this.a.nextGaussian() * f3 + 0.2F);
+ entityitem.q = (double) ((float) this.a.nextGaussian() * f3);
+ world.a((Entity) entityitem);
+ }
+ }
+ }
+
+ super.b(world, i, j, k);
+ }
+
+ public boolean a(World world, int i, int j, int k, EntityHuman entityhuman) {
+ Object object = (TileEntityChest) world.k(i, j, k);
+
+ if (world.d(i, j + 1, k)) {
+ return true;
+ } else if (world.a(i - 1, j, k) == this.bc && world.d(i - 1, j + 1, k)) {
+ return true;
+ } else if (world.a(i + 1, j, k) == this.bc && world.d(i + 1, j + 1, k)) {
+ return true;
+ } else if (world.a(i, j, k - 1) == this.bc && world.d(i, j + 1, k - 1)) {
+ return true;
+ } else if (world.a(i, j, k + 1) == this.bc && world.d(i, j + 1, k + 1)) {
+ return true;
+ } else {
+ if (world.a(i - 1, j, k) == this.bc) {
+ object = new InventoryLargeChest("Large chest", (TileEntityChest) world.k(i - 1, j, k), (IInventory) object);
+ }
+
+ if (world.a(i + 1, j, k) == this.bc) {
+ object = new InventoryLargeChest("Large chest", (IInventory) object, (TileEntityChest) world.k(i + 1, j, k));
+ }
+
+ if (world.a(i, j, k - 1) == this.bc) {
+ object = new InventoryLargeChest("Large chest", (TileEntityChest) world.k(i, j, k - 1), (IInventory) object);
+ }
+
+ if (world.a(i, j, k + 1) == this.bc) {
+ object = new InventoryLargeChest("Large chest", (IInventory) object, (TileEntityChest) world.k(i, j, k + 1));
+ }
+
+ entityhuman.a((IInventory) object);
+ return true;
+ }
+ }
+
+ protected TileEntity a_() {
+ return new TileEntityChest();
+ }
+}
18 net/minecraft/server/BlockClay.java
@@ -0,0 +1,18 @@
+package net.minecraft.server;
+
+import java.util.Random;
+
+public class BlockClay extends Block {
+
+ public BlockClay(int i, int j) {
+ super(i, j, Material.v);
+ }
+
+ public int a(int i, Random random) {
+ return Item.CLAY_BALL.aS;
+ }
+
+ public int a(Random random) {
+ return 4;
+ }
+}
25 net/minecraft/server/BlockContainer.java
@@ -0,0 +1,25 @@
+package net.minecraft.server;
+
+public abstract class BlockContainer extends Block {
+
+ protected BlockContainer(int i, Material material) {
+ super(i, material);
+ q[i] = true;
+ }
+
+ protected BlockContainer(int i, int j, Material material) {
+ super(i, j, material);
+ }
+
+ public void e(World world, int i, int j, int k) {
+ super.e(world, i, j, k);
+ world.a(i, j, k, this.a_());
+ }
+
+ public void b(World world, int i, int j, int k) {
+ super.b(world, i, j, k);
+ world.l(i, j, k);
+ }
+
+ protected abstract TileEntity a_();
+}
106 net/minecraft/server/BlockCrops.java
@@ -0,0 +1,106 @@
+package net.minecraft.server;
+
+import java.util.Random;
+
+public class BlockCrops extends BlockFlower {
+
+ protected BlockCrops(int i, int j) {
+ super(i, j);
+ this.bb = j;
+ this.a(true);
+ float f = 0.5F;
+
+ this.a(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, 0.25F, 0.5F + f);
+ }
+
+ protected boolean b(int i) {
+ return i == Block.SOIL.bc;
+ }
+
+ public void a(World world, int i, int j, int k, Random random) {
+ super.a(world, i, j, k, random);
+ if (world.h(i, j + 1, k) >= 9) {
+ int l = world.b(i, j, k);
+
+ if (l < 7) {
+ float f = this.h(world, i, j, k);
+
+ if (random.nextInt((int) (100.0F / f)) == 0) {
+ ++l;
+ world.b(i, j, k, l);
+ }
+ }
+ }
+ }
+
+ private float h(World world, int i, int j, int k) {
+ float f = 1.0F;
+ int l = world.a(i, j, k - 1);
+ int i1 = world.a(i, j, k + 1);
+ int j1 = world.a(i - 1, j, k);
+ int k1 = world.a(i + 1, j, k);
+ int l1 = world.a(i - 1, j, k - 1);
+ int i2 = world.a(i + 1, j, k - 1);
+ int j2 = world.a(i + 1, j, k + 1);
+ int k2 = world.a(i - 1, j, k + 1);
+ boolean flag = j1 == this.bc || k1 == this.bc;
+ boolean flag1 = l == this.bc || i1 == this.bc;
+ boolean flag2 = l1 == this.bc || i2 == this.bc || j2 == this.bc || k2 == this.bc;
+
+ for (int l2 = i - 1; l2 <= i + 1; ++l2) {
+ for (int i3 = k - 1; i3 <= k + 1; ++i3) {
+ int j3 = world.a(l2, j - 1, i3);
+ float f1 = 0.0F;
+
+ if (j3 == Block.SOIL.bc) {
+ f1 = 1.0F;
+ if (world.b(l2, j - 1, i3) > 0) {
+ f1 = 3.0F;
+ }
+ }
+
+ if (l2 != i || i3 != k) {
+ f1 /= 4.0F;
+ }
+
+ f += f1;
+ }
+ }
+
+ if (flag2 || flag && flag1) {
+ f /= 2.0F;
+ }
+
+ return f;
+ }
+
+ public int a() {
+ return 6;
+ }
+
+ public void a(World world, int i, int j, int k, int l) {
+ super.a(world, i, j, k, l);
+
+ for (int i1 = 0; i1 < 3; ++i1) {
+ if (world.m.nextInt(15) <= l) {
+ float f = 0.7F;
+ float f1 = world.m.nextFloat() * f + (1.0F - f) * 0.5F;
+ float f2 = world.m.nextFloat() * f + (1.0F - f) * 0.5F;
+ float f3 = world.m.nextFloat() * f + (1.0F - f) * 0.5F;
+ EntityItem entityitem = new EntityItem(world, (double) ((float) i + f1), (double) ((float) j + f2), (double) ((float) k + f3), new ItemStack(Item.SEEDS));
+
+ entityitem.ad = 10;
+ world.a((Entity) entityitem);
+ }
+ }
+ }
+
+ public int a(int i, Random random) {
+ System.out.println("Get resource: " + i);
+ return i == 7 ? Item.WHEAT.aS : -1;
+ }
+
+ public int a(Random random) {
+ return 1;
+ }
+}
8 net/minecraft/server/BlockDirt.java
@@ -0,0 +1,8 @@
+package net.minecraft.server;
+
+public class BlockDirt extends Block {
+
+ protected BlockDirt(int i, int j) {
+ super(i, j, Material.b);
+ }
+}
171 net/minecraft/server/BlockDoor.java
@@ -0,0 +1,171 @@
+package net.minecraft.server;
+
+import java.util.Random;
+
+public class BlockDoor extends Block {
+
+ protected BlockDoor(int i, Material material) {
+ super(i, material);
+ this.bb = 97;
+ if (material == Material.e) {
+ ++this.bb;
+ }
+
+ float f = 0.5F;
+ float f1 = 1.0F;
+
+ this.a(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, f1, 0.5F + f);
+ }
+
+ public boolean b() {
+ return false;
+ }
+
+ public int a() {
+ return 7;
+ }
+
+ public AxisAlignedBB d(World world, int i, int j, int k) {
+ this.a((IBlockAccess) world, i, j, k);
+ return super.d(world, i, j, k);
+ }
+
+ public void a(IBlockAccess iblockaccess, int i, int j, int k) {
+ this.b(this.d(iblockaccess.b(i, j, k)));
+ }
+
+ public void b(int i) {
+ float f = 0.1875F;
+
+ this.a(0.0F, 0.0F, 0.0F, 1.0F, 2.0F, 1.0F);
+ if (i == 0) {
+ this.a(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, f);
+ }
+
+ if (i == 1) {
+ this.a(1.0F - f, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
+ }
+
+ if (i == 2) {
+ this.a(0.0F, 0.0F, 1.0F - f, 1.0F, 1.0F, 1.0F);
+ }
+
+ if (i == 3) {
+ this.a(0.0F, 0.0F, 0.0F, f, 1.0F, 1.0F);
+ }
+ }
+
+ public void b(World world, int i, int j, int k, EntityHuman entityhuman) {
+ this.a(world, i, j, k, entityhuman);
+ }
+
+ public boolean a(World world, int i, int j, int k, EntityHuman entityhuman) {
+ if (this.bn == Material.e) {
+ return true;
+ } else {
+ int l = world.b(i, j, k);
+
+ if ((l & 8) != 0) {
+ if (world.a(i, j - 1, k) == this.bc) {
+ this.a(world, i, j - 1, k, entityhuman);
+ }
+
+ return true;
+ } else {
+ if (world.a(i, j + 1, k) == this.bc) {
+ world.b(i, j + 1, k, (l ^ 4) + 8);
+ }
+
+ world.b(i, j, k, l ^ 4);
+ world.b(i, j - 1, k, i, j, k);
+ if (Math.random() < 0.5D) {
+ world.a((double) i + 0.5D, (double) j + 0.5D, (double) k + 0.5D, "random.door_open", 1.0F, world.m.nextFloat() * 0.1F + 0.9F);
+ } else {
+ world.a((double) i + 0.5D, (double) j + 0.5D, (double) k + 0.5D, "random.door_close", 1.0F, world.m.nextFloat() * 0.1F + 0.9F);
+ }
+
+ return true;
+ }
+ }
+ }
+
+ public void a(World world, int i, int j, int k, boolean flag) {
+ int l = world.b(i, j, k);
+
+ if ((l & 8) != 0) {
+ if (world.a(i, j - 1, k) == this.bc) {
+ this.a(world, i, j - 1, k, flag);
+ }
+ } else {
+ boolean flag1 = (world.b(i, j, k) & 4) > 0;
+
+ if (flag1 != flag) {
+ if (world.a(i, j + 1, k) == this.bc) {
+ world.b(i, j + 1, k, (l ^ 4) + 8);
+ }
+
+ world.b(i, j, k, l ^ 4);
+ world.b(i, j - 1, k, i, j, k);
+ if (Math.random() < 0.5D) {
+ world.a((double) i + 0.5D, (double) j + 0.5D, (double) k + 0.5D, "random.door_open", 1.0F, world.m.nextFloat() * 0.1F + 0.9F);
+ } else {
+ world.a((double) i + 0.5D, (double) j + 0.5D, (double) k + 0.5D, "random.door_close", 1.0F, world.m.nextFloat() * 0.1F + 0.9F);
+ }
+ }
+ }
+ }
+
+ public void b(World world, int i, int j, int k, int l) {
+ int i1 = world.b(i, j, k);
+
+ if ((i1 & 8) != 0) {
+ if (world.a(i, j - 1, k) != this.bc) {
+ world.d(i, j, k, 0);
+ }
+
+ if (l > 0 && Block.n[l].d()) {
+ this.b(world, i, j - 1, k, l);
+ }
+ } else {
+ boolean flag = false;
+
+ if (world.a(i, j + 1, k) != this.bc) {
+ world.d(i, j, k, 0);
+ flag = true;
+ }
+
+ if (!world.d(i, j - 1, k)) {
+ world.d(i, j, k, 0);
+ flag = true;
+ if (world.a(i, j + 1, k) == this.bc) {
+ world.d(i, j + 1, k, 0);
+ }
+ }
+
+ if (flag) {
+ this.a_(world, i, j, k, i1);
+ } else if (l > 0 && Block.n[l].d()) {
+ boolean flag1 = world.n(i, j, k) || world.n(i, j + 1, k);
+
+ this.a(world, i, j, k, flag1);
+ }
+ }
+ }
+
+ public int a(int i, Random random) {
+ return (i & 8) != 0 ? 0 : (this.bn == Material.e ? Item.IRON_DOOR.aS : Item.WOOD_DOOR.aS);
+ }
+
+ public MovingObjectPosition a(World world, int i, int j, int k, Vec3D vec3d, Vec3D vec3d1) {
+ this.a((IBlockAccess) world, i, j, k);
+ return super.a(world, i, j, k, vec3d, vec3d1);
+ }
+
+ public int d(int i) {
+ return (i & 4) == 0 ? i - 1 & 3 : i & 3;
+ }
+
+ public boolean a(World world, int i, int j, int k) {
+ return j >= 127 ? false : world.d(i, j - 1, k) && super.a(world, i, j, k) && super.a(world, i, j + 1, k);
+ }
+}
26 net/minecraft/server/BlockFence.java
@@ -0,0 +1,26 @@
+package net.minecraft.server;
+
+import java.util.ArrayList;
+
+public class BlockFence extends Block {
+
+ public BlockFence(int i, int j) {
+ super(i, j, Material.c);
+ }
+
+ public void a(World world, int i, int j, int k, AxisAlignedBB axisalignedbb, ArrayList arraylist) {
+ arraylist.add(AxisAlignedBB.b((double) i, (double) j, (double) k, (double) (i + 1), (double) j + 1.5D, (double) (k + 1)));
+ }
+
+ public boolean a(World world, int i, int j, int k) {
+ return world.a(i, j - 1, k) == this.bc ? false : (!world.c(i, j - 1, k).a() ? false : super.a(world, i, j, k));
+ }
+
+ public boolean b() {
+ return false;
+ }
+
+ public int a() {
+ return 11;
+ }
+}
162 net/minecraft/server/BlockFire.java
@@ -0,0 +1,162 @@
+package net.minecraft.server;
+
+import java.util.Random;
+
+public class BlockFire extends Block {
+
+ private int[] a = new int[256];
+ private int[] b = new int[256];
+
+ protected BlockFire(int i, int j) {
+ super(i, j, Material.l);
+ this.a(Block.WOOD.bc, 5, 20);
+ this.a(Block.LOG.bc, 5, 5);
+ this.a(Block.LEAVES.bc, 30, 60);
+ this.a(Block.BOOKSHELF.bc, 30, 20);
+ this.a(Block.TNT.bc, 15, 100);
+ this.a(Block.WOOL.bc, 30, 60);
+ this.a(true);
+ }
+
+ private void a(int i, int j, int k) {
+ this.a[i] = j;
+ this.b[i] = k;
+ }
+
+ public AxisAlignedBB d(World world, int i, int j, int k) {
+ return null;
+ }
+
+ public boolean b() {
+ return false;
+ }
+
+ public int a() {
+ return 3;
+ }
+
+ public int a(Random random) {
+ return 0;
+ }
+
+ public int c() {
+ return 10;
+ }
+
+ public void a(World world, int i, int j, int k, Random random) {
+ int l = world.b(i, j, k);
+
+ if (l < 15) {
+ world.b(i, j, k, l + 1);
+ world.h(i, j, k, this.bc);
+ }
+
+ if (!this.g(world, i, j, k)) {
+ if (!world.d(i, j - 1, k) || l > 3) {
+ world.d(i, j, k, 0);
+ }
+ } else if (!this.b(world, i, j - 1, k) && l == 15 && random.nextInt(4) == 0) {
+ world.d(i, j, k, 0);
+ } else {
+ if (l % 2 == 0 && l > 2) {
+ this.a(world, i + 1, j, k, 300, random);
+ this.a(world, i - 1, j, k, 300, random);
+ this.a(world, i, j - 1, k, 200, random);
+ this.a(world, i, j + 1, k, 250, random);
+ this.a(world, i, j, k - 1, 300, random);
+ this.a(world, i, j, k + 1, 300, random);
+
+ for (int i1 = i - 1; i1 <= i + 1; ++i1) {
+ for (int j1 = k - 1; j1 <= k + 1; ++j1) {
+ for (int k1 = j - 1; k1 <= j + 4; ++k1) {
+ if (i1 != i || k1 != j || j1 != k) {
+ int l1 = 100;
+
+ if (k1 > j + 1) {
+ l1 += (k1 - (j + 1)) * 100;
+ }
+
+ int i2 = this.h(world, i1, k1, j1);
+
+ if (i2 > 0 && random.nextInt(l1) <= i2) {
+ world.d(i1, k1, j1, this.bc);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ private void a(World world, int i, int j, int k, int l, Random random) {
+ int i1 = this.b[world.a(i, j, k)];
+
+ if (random.nextInt(l) < i1) {
+ boolean flag = world.a(i, j, k) == Block.TNT.bc;
+
+ if (random.nextInt(2) == 0) {
+ world.d(i, j, k, this.bc);
+ } else {
+ world.d(i, j, k, 0);
+ }
+
+ if (flag) {
+ Block.TNT.a(world, i, j, k, 0);
+ }
+ }
+ }
+
+ private boolean g(World world, int i, int j, int k) {
+ return this.b(world, i + 1, j, k) ? true : (this.b(world, i - 1, j, k) ? true : (this.b(world, i, j - 1, k) ? true : (this.b(world, i, j + 1, k) ? true : (this.b(world, i, j, k - 1) ? true : this.b(world, i, j, k + 1)))));
+ }
+
+ private int h(World world, int i, int j, int k) {
+ byte b0 = 0;
+
+ if (world.a(i, j, k) != 0) {
+ return 0;
+ } else {
+ int l = this.f(world, i + 1, j, k, b0);
+
+ l = this.f(world, i - 1, j, k, l);
+ l = this.f(world, i, j - 1, k, l);
+ l = this.f(world, i, j + 1, k, l);
+ l = this.f(world, i, j, k - 1, l);
+ l = this.f(world, i, j, k + 1, l);
+ return l;
+ }
+ }
+
+ public boolean e() {
+ return false;
+ }
+
+ public boolean b(IBlockAccess iblockaccess, int i, int j, int k) {
+ return this.a[iblockaccess.a(i, j, k)] > 0;
+ }
+
+ public int f(World world, int i, int j, int k, int l) {
+ int i1 = this.a[world.a(i, j, k)];
+
+ return i1 > l ? i1 : l;
+ }
+
+ public boolean a(World world, int i, int j, int k) {
+ return world.d(i, j - 1, k) || this.g(world, i, j, k);
+ }
+
+ public void b(World world, int i, int j, int k, int l) {
+ if (!world.d(i, j - 1, k) && !this.g(world, i, j, k)) {
+ world.d(i, j, k, 0);
+ }
+ }
+
+ public void e(World world, int i, int j, int k) {
+ if (!world.d(i, j - 1, k) && !this.g(world, i, j, k)) {
+ world.d(i, j, k, 0);
+ } else {
+ world.h(i, j, k, this.bc);
+ }
+ }
+}
55 net/minecraft/server/BlockFlower.java
@@ -0,0 +1,55 @@
+package net.minecraft.server;
+
+import java.util.Random;
+
+public class BlockFlower extends Block {
+
+ protected BlockFlower(int i, int j) {
+ super(i, Material.i);
+ this.bb = j;
+ this.a(true);
+ float f = 0.2F;
+
+ this.a(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, f * 3.0F, 0.5F + f);
+ }
+
+ public boolean a(World world, int i, int j, int k) {
+ return this.b(world.a(i, j - 1, k));
+ }
+
+ protected boolean b(int i) {
+ return i == Block.GRASS.bc || i == Block.DIRT.bc || i == Block.SOIL.bc;
+ }
+
+ public void b(World world, int i, int j, int k, int l) {
+ super.b(world, i, j, k, l);
+ this.g(world, i, j, k);
+ }
+
+ public void a(World world, int i, int j, int k, Random random) {
+ this.g(world, i, j, k);
+ }
+
+ protected final void g(World world, int i, int j, int k) {
+ if (!this.f(world, i, j, k)) {
+ this.a_(world, i, j, k, world.b(i, j, k));
+ world.d(i, j, k, 0);
+ }
+ }
+
+ public boolean f(World world, int i, int j, int k) {
+ return (world.h(i, j, k) >= 8 || world.g(i, j, k)) && this.b(world.a(i, j - 1, k));
+ }
+
+ public AxisAlignedBB d(World world, int i, int j, int k) {
+ return null;
+ }
+
+ public boolean b() {
+ return false;
+ }
+
+ public int a() {
+ return 1;
+ }
+}
275 net/minecraft/server/BlockFlowing.java
@@ -0,0 +1,275 @@
+package net.minecraft.server;
+
+import java.util.Random;
+
+public class BlockFlowing extends BlockFluids {
+
+ int a = 0;
+ boolean[] b = new boolean[4];
+ int[] c = new int[4];
+
+ protected BlockFlowing(int i, Material material) {
+ super(i, material);
+ }
+
+ private void i(World world, int i, int j, int k) {
+ int i = world.b(i, j, k);
+
+ world.a(i, j, k, this.bc + 1, i);
+ world.b(i, j, k, i, j, k);
+ world.f(i, j, k);
+ }
+
+ public void a(World world, int i, int j, int k, Random random) {
+ if (this.bc != 10 && this.bc != 11 || world.a(i, j - 1, k) <= 1) {
+ int i = this.g(world, i, j, k);
+ boolean j = true;
+ int l;
+
+ if (i > 0) {
+ byte arrayOfBoolean = -100;
+
+ this.a = 0;
+ int arrayOfBoolean1 = this.e(world, i - 1, j, k, arrayOfBoolean);
+
+ arrayOfBoolean1 = this.e(world, i + 1, j, k, arrayOfBoolean1);
+ arrayOfBoolean1 = this.e(world, i, j, k - 1, arrayOfBoolean1);
+ arrayOfBoolean1 = this.e(world, i, j, k + 1, arrayOfBoolean1);
+ l = arrayOfBoolean1 + this.d;
+ if (l >= 8 || arrayOfBoolean1 < 0) {
+ l = -1;
+ }
+
+ if (this.g(world, i, j + 1, k) >= 0) {
+ int i1 = this.g(world, i, j + 1, k);
+
+ if (i1 >= 8) {
+ l = i1;
+ } else {
+ l = i1 + 8;
+ }
+ }
+
+ if (this.a >= 2 && this.bn == Material.f) {
+ if (world.d(i, j - 1, k)) {
+ l = 0;
+ } else if (world.c(i, j - 1, k) == this.bn && world.b(i, j, k) == 0) {
+ l = 0;
+ }
+ }
+
+ if (this.bn == Material.g && i < 8 && l < 8 && l > i && random.nextInt(4) != 0) {
+ l = i;
+ j = false;
+ }
+
+ if (l != i) {
+ i = l;
+ if (l < 0) {
+ world.d(i, j, k, 0);
+ } else {
+ world.b(i, j, k, l);
+ world.h(i, j, k, this.bc);
+ world.g(i, j, k, this.bc);
+ }
+ } else if (j) {
+ this.i(world, i, j, k);
+ }
+ } else {
+ this.i(world, i, j, k);
+ }
+
+ if (this.l(world, i, j - 1, k)) {
+ if (i >= 8) {
+ world.b(i, j - 1, k, this.bc, i);
+ } else {
+ world.b(i, j - 1, k, this.bc, i + 8);
+ }
+ } else if (i >= 0 && (i == 0 || this.k(world, i, j - 1, k))) {
+ boolean[] arrayOfBoolean2 = this.j(world, i, j, k);
+
+ l = i + this.d;
+ if (i >= 8) {
+ l = 1;
+ }
+
+ if (l >= 8) {
+ return;
+ }
+
+ if (arrayOfBoolean2[0]) {
+ this.f(world, i - 1, j, k, l);
+ }
+
+ if (arrayOfBoolean2[1]) {
+ this.f(world, i + 1, j, k, l);
+ }
+
+ if (arrayOfBoolean2[2]) {
+ this.f(world, i, j, k - 1, l);
+ }
+
+ if (!arrayOfBoolean2[3]) {
+ return;
+ }
+
+ this.f(world, i, j, k + 1, l);
+ }
+ }
+ }
+
+ private void f(World world, int i, int j, int k, int l) {
+ if (this.l(world, i, j, k)) {
+ int i = world.a(i, j, k);
+
+ if (i > 0) {
+ if (this.bn == Material.g) {
+ this.h(world, i, j, k);
+ } else {
+ Block.n[i].a_(world, i, j, k, world.b(i, j, k));
+ }
+ }
+
+ world.b(i, j, k, this.bc, l);
+ }
+ }
+
+ private int a(World world, int i, int j, int k, int l, int i1) {
+ int i = 1000;
+
+ for (int j = 0; j < 4; ++j) {
+ if ((j != 0 || i1 != 1) && (j != 1 || i1 != 0) && (j != 2 || i1 != 3) && (j != 3 || i1 != 2)) {
+ int k = i;
+ int i1 = k;
+
+ if (j == 0) {
+ k = i - 1;
+ }
+
+ if (j == 1) {
+ ++k;
+ }
+
+ if (j == 2) {
+ i1 = k - 1;
+ }
+
+ if (j == 3) {
+ ++i1;
+ }
+
+ if (!this.k(world, k, j, i1) && (world.c(k, j, i1) != this.bn || world.b(k, j, i1) != 0)) {
+ if (!this.k(world, k, j - 1, i1)) {
+ return l;
+ }
+
+ if (l < 4) {
+ int i2 = this.a(world, k, j, i1, l + 1, j);
+
+ if (i2 < i) {
+ i = i2;
+ }
+ }
+ }
+ }
+ }
+
+ return i;
+ }
+
+ private boolean[] j(World world, int i, int j, int k) {
+ int i;
+ int j;
+