Skip to content

Commit

Permalink
1.7_00
Browse files Browse the repository at this point in the history
  • Loading branch information
grum committed Jun 30, 2011
1 parent a0d7890 commit a52f7eb
Show file tree
Hide file tree
Showing 48 changed files with 155 additions and 119 deletions.
8 changes: 4 additions & 4 deletions net/minecraft/server/Block.java
Expand Up @@ -237,14 +237,14 @@ public int a(int i) {
}

public void a(World world, int i, int j, int k, AxisAlignedBB axisalignedbb, ArrayList arraylist) {
AxisAlignedBB axisalignedbb1 = this.d(world, i, j, k);
AxisAlignedBB axisalignedbb1 = this.e(world, i, j, k);

if (axisalignedbb1 != null && axisalignedbb.a(axisalignedbb1)) {
arraylist.add(axisalignedbb1);
}
}

public AxisAlignedBB d(World world, int i, int j, int k) {
public AxisAlignedBB e(World world, int i, int j, int k) {
return AxisAlignedBB.b((double) i + this.minX, (double) j + this.minY, (double) k + this.minZ, (double) i + this.maxX, (double) j + this.maxY, (double) k + this.maxZ);
}

Expand All @@ -270,7 +270,7 @@ public int c() {
return 10;
}

public void e(World world, int i, int j, int k) {}
public void c(World world, int i, int j, int k) {}

public void remove(World world, int i, int j, int k) {}

Expand Down Expand Up @@ -433,7 +433,7 @@ private boolean c(Vec3D vec3d) {
return vec3d == null ? false : vec3d.a >= this.minX && vec3d.a <= this.maxX && vec3d.b >= this.minY && vec3d.b <= this.maxY;
}

public void c(World world, int i, int j, int k) {}
public void d(World world, int i, int j, int k) {}

public boolean canPlace(World world, int i, int j, int k, int l) {
return this.canPlace(world, i, j, k);
Expand Down
2 changes: 1 addition & 1 deletion net/minecraft/server/BlockButton.java
Expand Up @@ -9,7 +9,7 @@ protected BlockButton(int i, int j) {
this.a(true);
}

public AxisAlignedBB d(World world, int i, int j, int k) {
public AxisAlignedBB e(World world, int i, int j, int k) {
return null;
}

Expand Down
2 changes: 1 addition & 1 deletion net/minecraft/server/BlockCactus.java
Expand Up @@ -30,7 +30,7 @@ public void a(World world, int i, int j, int k, Random random) {
}
}

public AxisAlignedBB d(World world, int i, int j, int k) {
public AxisAlignedBB e(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));
Expand Down
2 changes: 1 addition & 1 deletion net/minecraft/server/BlockCake.java
Expand Up @@ -18,7 +18,7 @@ public void a(IBlockAccess iblockaccess, int i, int j, int k) {
this.a(f1, 0.0F, f, 1.0F - f, f2, 1.0F - f);
}

public AxisAlignedBB d(World world, int i, int j, int k) {
public AxisAlignedBB e(World world, int i, int j, int k) {
int l = world.getData(i, j, k);
float f = 0.0625F;
float f1 = (float) (1 + l * 2) / 16.0F;
Expand Down
4 changes: 2 additions & 2 deletions net/minecraft/server/BlockContainer.java
Expand Up @@ -12,8 +12,8 @@ protected BlockContainer(int i, int j, Material material) {
isTileEntity[i] = true;
}

public void e(World world, int i, int j, int k) {
super.e(world, i, j, k);
public void c(World world, int i, int j, int k) {
super.c(world, i, j, k);
world.setTileEntity(i, j, k, this.a_());
}

Expand Down
2 changes: 1 addition & 1 deletion net/minecraft/server/BlockDiode.java
Expand Up @@ -126,7 +126,7 @@ public void postPlace(World world, int i, int j, int k, EntityLiving entitylivin
}
}

public void e(World world, int i, int j, int k) {
public void c(World world, int i, int j, int k) {
world.applyPhysics(i + 1, j, k, this.id);
world.applyPhysics(i - 1, j, k, this.id);
world.applyPhysics(i, j, k + 1, this.id);
Expand Down
4 changes: 2 additions & 2 deletions net/minecraft/server/BlockDispenser.java
Expand Up @@ -19,8 +19,8 @@ public int a(int i, Random random) {
return Block.DISPENSER.id;
}

public void e(World world, int i, int j, int k) {
super.e(world, i, j, k);
public void c(World world, int i, int j, int k) {
super.c(world, i, j, k);
this.g(world, i, j, k);
}

Expand Down
4 changes: 2 additions & 2 deletions net/minecraft/server/BlockDoor.java
Expand Up @@ -48,9 +48,9 @@ public boolean b() {
return false;
}

public AxisAlignedBB d(World world, int i, int j, int k) {
public AxisAlignedBB e(World world, int i, int j, int k) {
this.a(world, i, j, k);
return super.d(world, i, j, k);
return super.e(world, i, j, k);
}

public void a(IBlockAccess iblockaccess, int i, int j, int k) {
Expand Down
2 changes: 1 addition & 1 deletion net/minecraft/server/BlockFence.java
Expand Up @@ -10,7 +10,7 @@ public boolean canPlace(World world, int i, int j, int k) {
return world.getTypeId(i, j - 1, k) == this.id ? true : (!world.getMaterial(i, j - 1, k).isBuildable() ? false : super.canPlace(world, i, j, k));
}

public AxisAlignedBB d(World world, int i, int j, int k) {
public AxisAlignedBB e(World world, int i, int j, int k) {
return AxisAlignedBB.b((double) i, (double) j, (double) k, (double) (i + 1), (double) ((float) j + 1.5F), (double) (k + 1));
}

Expand Down
4 changes: 2 additions & 2 deletions net/minecraft/server/BlockFire.java
Expand Up @@ -29,7 +29,7 @@ private void a(int i, int j, int k) {
this.b[i] = k;
}

public AxisAlignedBB d(World world, int i, int j, int k) {
public AxisAlignedBB e(World world, int i, int j, int k) {
return null;
}

Expand Down Expand Up @@ -182,7 +182,7 @@ public void doPhysics(World world, int i, int j, int k, int l) {
}
}

public void e(World world, int i, int j, int k) {
public void c(World world, int i, int j, int k) {
if (world.getTypeId(i, j - 1, k) != Block.OBSIDIAN.id || !Block.PORTAL.a_(world, i, j, k)) {
if (!world.e(i, j - 1, k) && !this.g(world, i, j, k)) {
world.setTypeId(i, j, k, 0);
Expand Down
2 changes: 1 addition & 1 deletion net/minecraft/server/BlockFlower.java
Expand Up @@ -41,7 +41,7 @@ public boolean f(World world, int i, int j, int k) {
return (world.k(i, j, k) >= 8 || world.isChunkLoaded(i, j, k)) && this.c(world.getTypeId(i, j - 1, k));
}

public AxisAlignedBB d(World world, int i, int j, int k) {
public AxisAlignedBB e(World world, int i, int j, int k) {
return null;
}

Expand Down
4 changes: 2 additions & 2 deletions net/minecraft/server/BlockFlowing.java
Expand Up @@ -268,8 +268,8 @@ private boolean l(World world, int i, int j, int k) {
return material == this.material ? false : (material == Material.LAVA ? false : !this.k(world, i, j, k));
}

public void e(World world, int i, int j, int k) {
super.e(world, i, j, k);
public void c(World world, int i, int j, int k) {
super.c(world, i, j, k);
if (world.getTypeId(i, j, k) == this.id) {
world.c(i, j, k, this.id, this.c());
}
Expand Down
6 changes: 3 additions & 3 deletions net/minecraft/server/BlockFluids.java
Expand Up @@ -63,7 +63,7 @@ public boolean b(IBlockAccess iblockaccess, int i, int j, int k, int l) {
return material == this.material ? false : (material == Material.ICE ? false : (l == 1 ? true : super.b(iblockaccess, i, j, k, l)));
}

public AxisAlignedBB d(World world, int i, int j, int k) {
public AxisAlignedBB e(World world, int i, int j, int k) {
return null;
}

Expand Down Expand Up @@ -161,7 +161,7 @@ private Vec3D c(IBlockAccess iblockaccess, int i, int j, int k) {
}

public void a(World world, int i, int j, int k, Entity entity, Vec3D vec3d) {
Vec3D vec3d1 = this.c(world, i, j, k);
Vec3D vec3d1 = this.c((IBlockAccess) world, i, j, k);

vec3d.a += vec3d1.a;
vec3d.b += vec3d1.b;
Expand All @@ -176,7 +176,7 @@ public void a(World world, int i, int j, int k, Random random) {
super.a(world, i, j, k, random);
}

public void e(World world, int i, int j, int k) {
public void c(World world, int i, int j, int k) {
this.i(world, i, j, k);
}

Expand Down
4 changes: 2 additions & 2 deletions net/minecraft/server/BlockFurnace.java
Expand Up @@ -18,8 +18,8 @@ public int a(int i, Random random) {
return Block.FURNACE.id;
}

public void e(World world, int i, int j, int k) {
super.e(world, i, j, k);
public void c(World world, int i, int j, int k) {
super.c(world, i, j, k);
this.g(world, i, j, k);
}

Expand Down
4 changes: 2 additions & 2 deletions net/minecraft/server/BlockLadder.java
Expand Up @@ -8,7 +8,7 @@ protected BlockLadder(int i, int j) {
super(i, j, Material.ORIENTABLE);
}

public AxisAlignedBB d(World world, int i, int j, int k) {
public AxisAlignedBB e(World world, int i, int j, int k) {
int l = world.getData(i, j, k);
float f = 0.125F;

Expand All @@ -28,7 +28,7 @@ public AxisAlignedBB d(World world, int i, int j, int k) {
this.a(0.0F, 0.0F, 0.0F, f, 1.0F, 1.0F);
}

return super.d(world, i, j, k);
return super.e(world, i, j, k);
}

public boolean a() {
Expand Down
2 changes: 1 addition & 1 deletion net/minecraft/server/BlockLever.java
Expand Up @@ -6,7 +6,7 @@ protected BlockLever(int i, int j) {
super(i, j, Material.ORIENTABLE);
}

public AxisAlignedBB d(World world, int i, int j, int k) {
public AxisAlignedBB e(World world, int i, int j, int k) {
return null;
}

Expand Down
4 changes: 2 additions & 2 deletions net/minecraft/server/BlockMinecartTrack.java
Expand Up @@ -26,7 +26,7 @@ public boolean e() {
return this.a;
}

public AxisAlignedBB d(World world, int i, int j, int k) {
public AxisAlignedBB e(World world, int i, int j, int k) {
return null;
}

Expand Down Expand Up @@ -73,7 +73,7 @@ public boolean canPlace(World world, int i, int j, int k) {
return world.e(i, j - 1, k);
}

public void e(World world, int i, int j, int k) {
public void c(World world, int i, int j, int k) {
if (!world.isStatic) {
this.a(world, i, j, k, true);
}
Expand Down
32 changes: 26 additions & 6 deletions net/minecraft/server/BlockPiston.java
Expand Up @@ -38,24 +38,40 @@ public void postPlace(World world, int i, int j, int k, EntityLiving entitylivin

public void doPhysics(World world, int i, int j, int k, int l) {
if (!world.isStatic) {
int i1 = world.getData(i, j, k);

if (d(i1)) {
int j1 = c(i1);
int k1 = i + PistonBlockTextures.b[j1];
int l1 = j + PistonBlockTextures.c[j1];
int i2 = k + PistonBlockTextures.d[j1];
int j2 = world.getTypeId(k1, l1, i2);

if (j2 != Block.PISTON_EXTENSION.id && j2 != Block.PISTON_MOVING.id) {
this.g(world, i, j, k, i1);
world.setTypeId(i, j, k, 0);
return;
}
}

this.g(world, i, j, k);
}
}

public void e(World world, int i, int j, int k) {
public void c(World world, int i, int j, int k) {
if (!world.isStatic && world.getTileEntity(i, j, k) == null) {
this.g(world, i, j, k);
}
}

private void g(World world, int i, int j, int k) {
boolean flag = world.isBlockIndirectlyPowered(i, j, k) || world.isBlockIndirectlyPowered(i, j + 1, k) || world.isBlockFaceIndirectlyPowered(i, j - 1, k, 0);
int l = world.getData(i, j, k);
int i1 = c(l);
boolean flag = this.f(world, i, j, k, i1);

if (l != 7) {
if (flag && !d(l)) {
if (f(world, i, j, k, i1)) {
if (h(world, i, j, k, i1)) {
world.setRawData(i, j, k, i1 | 8);
world.playNote(i, j, k, 0, i1);
}
Expand All @@ -66,9 +82,13 @@ private void g(World world, int i, int j, int k) {
}
}

private boolean f(World world, int i, int j, int k, int l) {
return l != 0 && world.isBlockFaceIndirectlyPowered(i, j - 1, k, 0) ? true : (l != 1 && world.isBlockFaceIndirectlyPowered(i, j + 1, k, 1) ? true : (l != 2 && world.isBlockFaceIndirectlyPowered(i, j, k - 1, 2) ? true : (l != 3 && world.isBlockFaceIndirectlyPowered(i, j, k + 1, 3) ? true : (l != 5 && world.isBlockFaceIndirectlyPowered(i + 1, j, k, 5) ? true : (l != 4 && world.isBlockFaceIndirectlyPowered(i - 1, j, k, 4) ? true : (world.isBlockFaceIndirectlyPowered(i, j, k, 0) ? true : (world.isBlockFaceIndirectlyPowered(i, j + 2, k, 1) ? true : (world.isBlockFaceIndirectlyPowered(i, j + 1, k - 1, 2) ? true : (world.isBlockFaceIndirectlyPowered(i, j + 1, k + 1, 3) ? true : (world.isBlockFaceIndirectlyPowered(i - 1, j + 1, k, 4) ? true : world.isBlockFaceIndirectlyPowered(i + 1, j + 1, k, 5)))))))))));
}

public void a(World world, int i, int j, int k, int l, int i1) {
if (l == 0) {
if (this.h(world, i, j, k, i1)) {
if (this.i(world, i, j, k, i1)) {
world.setData(i, j, k, i1 | 8);
world.makeSound((double) i + 0.5D, (double) j + 0.5D, (double) k + 0.5D, "tile.piston.out", 0.5F, world.random.nextFloat() * 0.25F + 0.6F);
}
Expand Down Expand Up @@ -212,7 +232,7 @@ private static boolean a(int i, World world, int j, int k, int l) {
}
}

private static boolean f(World world, int i, int j, int k, int l) {
private static boolean h(World world, int i, int j, int k, int l) {
int i1 = i + PistonBlockTextures.b[l];
int j1 = j + PistonBlockTextures.c[l];
int k1 = k + PistonBlockTextures.d[l];
Expand Down Expand Up @@ -249,7 +269,7 @@ private static boolean f(World world, int i, int j, int k, int l) {
}
}

private boolean h(World world, int i, int j, int k, int l) {
private boolean i(World world, int i, int j, int k, int l) {
int i1 = i + PistonBlockTextures.b[l];
int j1 = j + PistonBlockTextures.c[l];
int k1 = k + PistonBlockTextures.d[l];
Expand Down
2 changes: 1 addition & 1 deletion net/minecraft/server/BlockPistonExtension.java
Expand Up @@ -10,7 +10,7 @@ public class BlockPistonExtension extends Block {
public BlockPistonExtension(int i, int j) {
super(i, j, Material.PISTON);
this.a(h);
this.c(-1.0F);
this.c(0.5F);
}

public int a(int i, int j) {
Expand Down
6 changes: 3 additions & 3 deletions net/minecraft/server/BlockPistonMoving.java
Expand Up @@ -13,7 +13,7 @@ protected TileEntity a_() {
return null;
}

public void e(World world, int i, int j, int k) {}
public void c(World world, int i, int j, int k) {}

public void remove(World world, int i, int j, int k) {
TileEntity tileentity = world.getTileEntity(i, j, k);
Expand Down Expand Up @@ -65,7 +65,7 @@ public static TileEntity a(int i, int j, int k, boolean flag, boolean flag1) {
return new TileEntityPiston(i, j, k, flag, flag1);
}

public AxisAlignedBB d(World world, int i, int j, int k) {
public AxisAlignedBB e(World world, int i, int j, int k) {
TileEntityPiston tileentitypiston = this.b(world, i, j, k);

if (tileentitypiston == null) {
Expand Down Expand Up @@ -106,7 +106,7 @@ public void a(IBlockAccess iblockaccess, int i, int j, int k) {
}

public AxisAlignedBB a(World world, int i, int j, int k, int l, float f, int i1) {
AxisAlignedBB axisalignedbb = Block.byId[l].d(world, i, j, k);
AxisAlignedBB axisalignedbb = Block.byId[l].e(world, i, j, k);

if (axisalignedbb == null) {
return null;
Expand Down
2 changes: 1 addition & 1 deletion net/minecraft/server/BlockPortal.java
Expand Up @@ -8,7 +8,7 @@ public BlockPortal(int i, int j) {
super(i, j, Material.PORTAL, false);
}

public AxisAlignedBB d(World world, int i, int j, int k) {
public AxisAlignedBB e(World world, int i, int j, int k) {
return null;
}

Expand Down
4 changes: 2 additions & 2 deletions net/minecraft/server/BlockPressurePlate.java
Expand Up @@ -20,7 +20,7 @@ public int c() {
return 20;
}

public AxisAlignedBB d(World world, int i, int j, int k) {
public AxisAlignedBB e(World world, int i, int j, int k) {
return null;
}

Expand All @@ -36,7 +36,7 @@ public boolean canPlace(World world, int i, int j, int k) {
return world.e(i, j - 1, k);
}

public void e(World world, int i, int j, int k) {}
public void c(World world, int i, int j, int k) {}

public void doPhysics(World world, int i, int j, int k, int l) {
boolean flag = false;
Expand Down
4 changes: 2 additions & 2 deletions net/minecraft/server/BlockPumpkin.java
Expand Up @@ -31,8 +31,8 @@ public int a(int i) {
return i == 1 ? this.textureId : (i == 0 ? this.textureId : (i == 3 ? this.textureId + 1 + 16 : this.textureId + 16));
}

public void e(World world, int i, int j, int k) {
super.e(world, i, j, k);
public void c(World world, int i, int j, int k) {
super.c(world, i, j, k);
}

public boolean canPlace(World world, int i, int j, int k) {
Expand Down
4 changes: 2 additions & 2 deletions net/minecraft/server/BlockRedstoneTorch.java
Expand Up @@ -44,9 +44,9 @@ public int c() {
return 2;
}

public void e(World world, int i, int j, int k) {
public void c(World world, int i, int j, int k) {
if (world.getData(i, j, k) == 0) {
super.e(world, i, j, k);
super.c(world, i, j, k);
}

if (this.isOn) {
Expand Down

0 comments on commit a52f7eb

Please sign in to comment.