Skip to content

Commit

Permalink
1.7.2
Browse files Browse the repository at this point in the history
  • Loading branch information
grum committed Jul 1, 2011
1 parent 8aab727 commit d195eb7
Show file tree
Hide file tree
Showing 8 changed files with 43 additions and 16 deletions.
2 changes: 1 addition & 1 deletion net/minecraft/server/Block.java
Expand Up @@ -508,7 +508,7 @@ protected Block n() {
return this;
}

public int f() {
public int e() {
return this.material.j();
}

Expand Down
10 changes: 10 additions & 0 deletions net/minecraft/server/BlockBed.java
Expand Up @@ -186,4 +186,14 @@ public static ChunkCoordinates f(World world, int i, int j, int k, int l) {

return null;
}

public void dropNaturally(World world, int i, int j, int k, int l, float f) {
if (!d(l)) {
super.dropNaturally(world, i, j, k, l, f);
}
}

public int e() {
return 1;
}
}
4 changes: 2 additions & 2 deletions net/minecraft/server/BlockMinecartTrack.java
Expand Up @@ -22,7 +22,7 @@ protected BlockMinecartTrack(int i, int j, boolean flag) {
this.a(0.0F, 0.0F, 0.0F, 1.0F, 0.125F, 1.0F);
}

public boolean e() {
public boolean f() {
return this.a;
}

Expand Down Expand Up @@ -248,7 +248,7 @@ private boolean a(World world, int i, int j, int k, boolean flag, int l, int i1)
return false;
}

public int f() {
public int e() {
return 0;
}

Expand Down
16 changes: 10 additions & 6 deletions net/minecraft/server/BlockPiston.java
Expand Up @@ -5,6 +5,7 @@
public class BlockPiston extends Block {

private boolean a;
private boolean b;

public BlockPiston(int i, int j, boolean flag) {
super(i, j, Material.PISTON);
Expand Down Expand Up @@ -37,7 +38,7 @@ 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) {
if (!world.isStatic && !this.b) {
this.g(world, i, j, k);
}
}
Expand Down Expand Up @@ -71,6 +72,7 @@ private boolean f(World world, int i, int j, int k, int l) {
}

public void a(World world, int i, int j, int k, int l, int i1) {
this.b = true;
if (l == 0) {
if (this.i(world, i, j, k, i1)) {
world.setData(i, j, k, i1 | 8);
Expand Down Expand Up @@ -108,7 +110,7 @@ public void a(World world, int i, int j, int k, int l, int i1) {
}
}

if (i2 > 0 && (flag || a(i2, world, j1, k1, l1)) && (Block.byId[i2].f() == 0 || i2 == Block.PISTON.id || i2 == Block.PISTON_STICKY.id)) {
if (i2 > 0 && (flag || a(i2, world, j1, k1, l1)) && (Block.byId[i2].e() == 0 || i2 == Block.PISTON.id || i2 == Block.PISTON_STICKY.id)) {
world.setTypeId(j1, k1, l1, 0);
i += PistonBlockTextures.b[i1];
j += PistonBlockTextures.c[i1];
Expand All @@ -124,6 +126,8 @@ public void a(World world, int i, int j, int k, int l, int i1) {

world.makeSound((double) i + 0.5D, (double) j + 0.5D, (double) k + 0.5D, "tile.piston.in", 0.5F, world.random.nextFloat() * 0.15F + 0.6F);
}

this.b = false;
}

public void a(IBlockAccess iblockaccess, int i, int j, int k) {
Expand Down Expand Up @@ -203,7 +207,7 @@ private static boolean a(int i, World world, int j, int k, int l) {
return false;
}

if (Block.byId[i].f() == 2) {
if (Block.byId[i].e() == 2) {
return false;
}
} else if (d(world.getData(j, k, l))) {
Expand Down Expand Up @@ -235,7 +239,7 @@ private static boolean h(World world, int i, int j, int k, int l) {
return false;
}

if (Block.byId[i2].f() != 1) {
if (Block.byId[i2].e() != 1) {
if (l1 == 12) {
return false;
}
Expand Down Expand Up @@ -273,7 +277,7 @@ private boolean i(World world, int i, int j, int k, int l) {
return false;
}

if (Block.byId[i2].f() != 1) {
if (Block.byId[i2].e() != 1) {
if (l1 == 12) {
return false;
}
Expand All @@ -285,7 +289,7 @@ private boolean i(World world, int i, int j, int k, int l) {
continue;
}

Block.byId[i2].g(world, i1, j1, k1, 0);
Block.byId[i2].g(world, i1, j1, k1, world.getData(i1, j1, k1));
world.setTypeId(i1, j1, k1, 0);
}
}
Expand Down
17 changes: 13 additions & 4 deletions net/minecraft/server/BlockPistonMoving.java
Expand Up @@ -41,6 +41,15 @@ public boolean b() {
return false;
}

public boolean interact(World world, int i, int j, int k, EntityHuman entityhuman) {
if (!world.isStatic && world.getTileEntity(i, j, k) == null) {
world.setTypeId(i, j, k, 0);
return true;
} else {
return false;
}
}

public int a(int i, Random random) {
return 0;
}
Expand Down Expand Up @@ -87,7 +96,7 @@ public void a(IBlockAccess iblockaccess, int i, int j, int k) {
if (tileentitypiston != null) {
Block block = Block.byId[tileentitypiston.a()];

if (block == null) {
if (block == null || block == this) {
return;
}

Expand All @@ -110,9 +119,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) {
if (l == 0) {
return null;
} else {
if (l != 0 && l != this.id) {
AxisAlignedBB axisalignedbb = Block.byId[l].e(world, i, j, k);

if (axisalignedbb == null) {
Expand All @@ -126,6 +133,8 @@ public AxisAlignedBB a(World world, int i, int j, int k, int l, float f, int i1)
axisalignedbb.f -= (double) ((float) PistonBlockTextures.d[i1] * f);
return axisalignedbb;
}
} else {
return null;
}
}

Expand Down
4 changes: 4 additions & 0 deletions net/minecraft/server/BlockPressurePlate.java
Expand Up @@ -143,4 +143,8 @@ public boolean d(World world, int i, int j, int k, int l) {
public boolean isPowerSource() {
return true;
}

public int e() {
return 1;
}
}
4 changes: 2 additions & 2 deletions net/minecraft/server/EntityMinecart.java
Expand Up @@ -223,7 +223,7 @@ public void m_() {
flag2 = !flag1;
}

if (((BlockMinecartTrack) Block.byId[l]).e()) {
if (((BlockMinecartTrack) Block.byId[l]).f()) {
i1 &= 7;
}

Expand Down Expand Up @@ -526,7 +526,7 @@ public Vec3D h(double d0, double d1, double d2) {
int i1 = this.world.getData(i, j, k);

d1 = (double) j;
if (((BlockMinecartTrack) Block.byId[l]).e()) {
if (((BlockMinecartTrack) Block.byId[l]).f()) {
i1 &= 7;
}

Expand Down
2 changes: 1 addition & 1 deletion net/minecraft/server/MinecraftServer.java
Expand Up @@ -46,7 +46,7 @@ private boolean init() {
threadcommandreader.setDaemon(true);
threadcommandreader.start();
ConsoleLogManager.init();
log.info("Starting minecraft server version Beta 1.7_01");
log.info("Starting minecraft server version Beta 1.7.2");
if (Runtime.getRuntime().maxMemory() / 1024L / 1024L < 512L) {
log.warning("**** NOT ENOUGH RAM!");
log.warning("To start the server with more ram, launch it as \"java -Xmx1024M -Xms1024M -jar minecraft_server.jar\"");
Expand Down

0 comments on commit d195eb7

Please sign in to comment.