Skip to content

Commit

Permalink
1.6.6_01
Browse files Browse the repository at this point in the history
  • Loading branch information
grum committed Jun 26, 2011
1 parent 5c511d8 commit da37ae7
Show file tree
Hide file tree
Showing 104 changed files with 732 additions and 732 deletions.
2 changes: 1 addition & 1 deletion net/minecraft/server/BlockDispenser.java
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ private void dispense(World world, int i, int j, int k, Random random) {
EntityArrow entityarrow = new EntityArrow(world, d0, d1, d2);

entityarrow.a((double) b0, 0.10000000149011612D, (double) b1, 1.1F, 6.0F);
entityarrow.a = true;
entityarrow.fromPlayer = true;
world.addEntity(entityarrow);
world.e(1002, i, j, k, 0);
} else if (itemstack.id == Item.EGG.id) {
Expand Down
4 changes: 2 additions & 2 deletions net/minecraft/server/BlockPortal.java
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,15 @@ public boolean a_(World world, int i, int j, int k) {
}
}

world.o = true;
world.suppressPhysics = true;

for (l = 0; l < 2; ++l) {
for (i1 = 0; i1 < 3; ++i1) {
world.setTypeId(i + b0 * l, j + i1, k + b1 * l, Block.PORTAL.id);
}
}

world.o = false;
world.suppressPhysics = false;
return true;
}
}
Expand Down
4 changes: 2 additions & 2 deletions net/minecraft/server/BlockRedstoneWire.java
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,10 @@ private void a(World world, int i, int j, int k, int l, int i1, int j1) {
}

if (k1 != l1) {
world.o = true;
world.suppressPhysics = true;
world.setData(i, j, k, l1);
world.b(i, j, k, i, j, k);
world.o = false;
world.suppressPhysics = false;

for (i2 = 0; i2 < 4; ++i2) {
j2 = i;
Expand Down
4 changes: 2 additions & 2 deletions net/minecraft/server/BlockSand.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

public class BlockSand extends Block {

public static boolean a = false;
public static boolean instaFall = false;

public BlockSand(int i, int j) {
super(i, j, Material.SAND);
Expand All @@ -26,7 +26,7 @@ private void g(World world, int i, int j, int k) {
if (c_(world, i, j - 1, k) && j >= 0) {
byte b0 = 32;

if (!a && world.a(i - b0, j - b0, k - b0, i + b0, j + b0, k + b0)) {
if (!instaFall && world.a(i - b0, j - b0, k - b0, i + b0, j + b0, k + b0)) {
EntityFallingSand entityfallingsand = new EntityFallingSand(world, (double) ((float) i + 0.5F), (double) ((float) j + 0.5F), (double) ((float) k + 0.5F), this.id);

world.addEntity(entityfallingsand);
Expand Down
4 changes: 2 additions & 2 deletions net/minecraft/server/BlockStationary.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ public void doPhysics(World world, int i, int j, int k, int l) {
private void i(World world, int i, int j, int k) {
int l = world.getData(i, j, k);

world.o = true;
world.suppressPhysics = true;
world.setRawTypeIdAndData(i, j, k, this.id - 1, l);
world.b(i, j, k, i, j, k);
world.c(i, j, k, this.id - 1, this.c());
world.o = false;
world.suppressPhysics = false;
}

public void a(World world, int i, int j, int k, Random random) {
Expand Down
2 changes: 1 addition & 1 deletion net/minecraft/server/BlockTNT.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public int a(Random random) {
public void c(World world, int i, int j, int k) {
EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(world, (double) ((float) i + 0.5F), (double) ((float) j + 0.5F), (double) ((float) k + 0.5F));

entitytntprimed.a = world.random.nextInt(entitytntprimed.a / 4) + entitytntprimed.a / 8;
entitytntprimed.fuseTicks = world.random.nextInt(entitytntprimed.fuseTicks / 4) + entitytntprimed.fuseTicks / 8;
world.addEntity(entitytntprimed);
}

Expand Down
40 changes: 20 additions & 20 deletions net/minecraft/server/Chunk.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public class Chunk {
public NibbleArray e;
public NibbleArray f;
public NibbleArray g;
public byte[] h;
public byte[] heightMap;
public int i;
public final int x;
public final int z;
Expand All @@ -37,7 +37,7 @@ public Chunk(World world, int i, int j) {
this.world = world;
this.x = i;
this.z = j;
this.h = new byte[256];
this.heightMap = new byte[256];

for (int k = 0; k < this.entitySlices.length; ++k) {
this.entitySlices[k] = new ArrayList();
Expand All @@ -57,12 +57,12 @@ public boolean a(int i, int j) {
}

public int b(int i, int j) {
return this.h[j << 4 | i] & 255;
return this.heightMap[j << 4 | i] & 255;
}

public void a() {}

public void b() {
public void initLighting() {
int i = 127;

int j;
Expand All @@ -78,7 +78,7 @@ public void b() {
;
}

this.h[k << 4 | j] = (byte) l;
this.heightMap[k << 4 | j] = (byte) l;
if (l < i) {
i = l;
}
Expand Down Expand Up @@ -136,7 +136,7 @@ private void f(int i, int j, int k) {
}

private void g(int i, int j, int k) {
int l = this.h[k << 4 | i] & 255;
int l = this.heightMap[k << 4 | i] & 255;
int i1 = l;

if (j > l) {
Expand All @@ -149,7 +149,7 @@ private void g(int i, int j, int k) {

if (i1 != l) {
this.world.g(i, k, i1, l);
this.h[k << 4 | i] = (byte) i1;
this.heightMap[k << 4 | i] = (byte) i1;
int k1;
int l1;
int i2;
Expand All @@ -161,8 +161,8 @@ private void g(int i, int j, int k) {

for (l1 = 0; l1 < 16; ++l1) {
for (i2 = 0; i2 < 16; ++i2) {
if ((this.h[i2 << 4 | l1] & 255) < k1) {
k1 = this.h[i2 << 4 | l1] & 255;
if ((this.heightMap[i2 << 4 | l1] & 255) < k1) {
k1 = this.heightMap[i2 << 4 | l1] & 255;
}
}
}
Expand Down Expand Up @@ -220,7 +220,7 @@ public int getTypeId(int i, int j, int k) {

public boolean a(int i, int j, int k, int l, int i1) {
byte b0 = (byte) l;
int j1 = this.h[k << 4 | i] & 255;
int j1 = this.heightMap[k << 4 | i] & 255;
int k1 = this.b[i << 11 | k << 7 | j] & 255;

if (k1 == l && this.e.a(i, j, k) == i1) {
Expand Down Expand Up @@ -261,7 +261,7 @@ public boolean a(int i, int j, int k, int l, int i1) {

public boolean a(int i, int j, int k, int l) {
byte b0 = (byte) l;
int i1 = this.h[k << 4 | i] & 255;
int i1 = this.heightMap[k << 4 | i] & 255;
int j1 = this.b[i << 11 | k << 7 | j] & 255;

if (j1 == l) {
Expand Down Expand Up @@ -383,7 +383,7 @@ public void a(Entity entity, int i) {
}

public boolean c(int i, int j, int k) {
return j >= (this.h[k << 4 | i] & 255);
return j >= (this.heightMap[k << 4 | i] & 255);
}

public TileEntity d(int i, int j, int k) {
Expand All @@ -407,9 +407,9 @@ public TileEntity d(int i, int j, int k) {
}

public void a(TileEntity tileentity) {
int i = tileentity.e - this.x * 16;
int j = tileentity.f;
int k = tileentity.g - this.z * 16;
int i = tileentity.x - this.x * 16;
int j = tileentity.y;
int k = tileentity.z - this.z * 16;

this.a(i, j, k, tileentity);
}
Expand All @@ -418,9 +418,9 @@ public void a(int i, int j, int k, TileEntity tileentity) {
ChunkPosition chunkposition = new ChunkPosition(i, j, k);

tileentity.world = this.world;
tileentity.e = this.x * 16 + i;
tileentity.f = j;
tileentity.g = this.z * 16 + k;
tileentity.x = this.x * 16 + i;
tileentity.y = j;
tileentity.z = this.z * 16 + k;
if (this.getTypeId(i, j, k) != 0 && Block.byId[this.getTypeId(i, j, k)] instanceof BlockContainer) {
if (this.c) {
if (this.tileEntities.get(chunkposition) != null) {
Expand Down Expand Up @@ -532,7 +532,7 @@ public boolean a(boolean flag) {
}
}

public int a(byte[] abyte, int i, int j, int k, int l, int i1, int j1, int k1) {
public int getData(byte[] abyte, int i, int j, int k, int l, int i1, int j1, int k1) {
int l1 = l - i;
int i2 = i1 - j;
int j2 = j1 - k;
Expand Down Expand Up @@ -597,7 +597,7 @@ public Random a(long i) {
return new Random(this.world.getSeed() + (long) (this.x * this.x * 4987142) + (long) (this.x * 5947611) + (long) (this.z * this.z) * 4392871L + (long) (this.z * 389711) ^ i);
}

public boolean g() {
public boolean isEmpty() {
return false;
}

Expand Down
12 changes: 6 additions & 6 deletions net/minecraft/server/ChunkLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,12 @@ public static void a(Chunk chunk, World world, NBTTagCompound nbttagcompound) {
world.k();
nbttagcompound.a("xPos", chunk.x);
nbttagcompound.a("zPos", chunk.z);
nbttagcompound.a("LastUpdate", world.getTime());
nbttagcompound.setLong("LastUpdate", world.getTime());
nbttagcompound.a("Blocks", chunk.b);
nbttagcompound.a("Data", chunk.e.a);
nbttagcompound.a("SkyLight", chunk.f.a);
nbttagcompound.a("BlockLight", chunk.g.a);
nbttagcompound.a("HeightMap", chunk.h);
nbttagcompound.a("HeightMap", chunk.heightMap);
nbttagcompound.a("TerrainPopulated", chunk.done);
chunk.q = false;
NBTTagList nbttaglist = new NBTTagList();
Expand Down Expand Up @@ -170,16 +170,16 @@ public static Chunk a(World world, NBTTagCompound nbttagcompound) {
chunk.e = new NibbleArray(nbttagcompound.j("Data"));
chunk.f = new NibbleArray(nbttagcompound.j("SkyLight"));
chunk.g = new NibbleArray(nbttagcompound.j("BlockLight"));
chunk.h = nbttagcompound.j("HeightMap");
chunk.heightMap = nbttagcompound.j("HeightMap");
chunk.done = nbttagcompound.m("TerrainPopulated");
if (!chunk.e.a()) {
chunk.e = new NibbleArray(chunk.b.length);
}

if (chunk.h == null || !chunk.f.a()) {
chunk.h = new byte[256];
if (chunk.heightMap == null || !chunk.f.a()) {
chunk.heightMap = new byte[256];
chunk.f = new NibbleArray(chunk.b.length);
chunk.b();
chunk.initLighting();
}

if (!chunk.g.a()) {
Expand Down
14 changes: 7 additions & 7 deletions net/minecraft/server/ChunkProviderGenerate.java
Original file line number Diff line number Diff line change
Expand Up @@ -200,12 +200,12 @@ public Chunk getOrCreateChunk(int i, int j) {
Chunk chunk = new Chunk(this.p, abyte, i, j);

this.v = this.p.getWorldChunkManager().a(this.v, i * 16, j * 16, 16, 16);
double[] adouble = this.p.getWorldChunkManager().a;
double[] adouble = this.p.getWorldChunkManager().temperature;

this.a(i, j, abyte, this.v, adouble);
this.a(i, j, abyte, this.v);
this.u.a(this, this.p, i, j, abyte);
chunk.b();
chunk.initLighting();
return chunk;
}

Expand All @@ -216,8 +216,8 @@ private double[] a(double[] adouble, int i, int j, int k, int l, int i1, int j1)

double d0 = 684.412D;
double d1 = 684.412D;
double[] adouble1 = this.p.getWorldChunkManager().a;
double[] adouble2 = this.p.getWorldChunkManager().b;
double[] adouble1 = this.p.getWorldChunkManager().temperature;
double[] adouble2 = this.p.getWorldChunkManager().rain;

this.g = this.a.a(this.g, i, k, l, j1, 1.121D, 1.121D, 0.5D);
this.h = this.b.a(this.h, i, k, l, j1, 200.0D, 200.0D, 0.5D);
Expand Down Expand Up @@ -322,7 +322,7 @@ public boolean isChunkLoaded(int i, int j) {
}

public void getChunkAt(IChunkProvider ichunkprovider, int i, int j) {
BlockSand.a = true;
BlockSand.instaFall = true;
int k = i * 16;
int l = j * 16;
BiomeBase biomebase = this.p.getWorldChunkManager().getBiome(k + 16, l + 16);
Expand Down Expand Up @@ -625,7 +625,7 @@ public void getChunkAt(IChunkProvider ichunkprovider, int i, int j) {
}
}

BlockSand.a = false;
BlockSand.instaFall = false;
}

public boolean saveChunks(boolean flag, IProgressUpdate iprogressupdate) {
Expand All @@ -636,7 +636,7 @@ public boolean unloadChunks() {
return false;
}

public boolean b() {
public boolean canSave() {
return true;
}
}
6 changes: 3 additions & 3 deletions net/minecraft/server/ChunkProviderHell.java
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ public boolean isChunkLoaded(int i, int j) {
}

public void getChunkAt(IChunkProvider ichunkprovider, int i, int j) {
BlockSand.a = true;
BlockSand.instaFall = true;
int k = i * 16;
int l = j * 16;

Expand Down Expand Up @@ -370,7 +370,7 @@ public void getChunkAt(IChunkProvider ichunkprovider, int i, int j) {
(new WorldGenFlowers(Block.RED_MUSHROOM.id)).a(this.n, this.h, j1, k1, l1);
}

BlockSand.a = false;
BlockSand.instaFall = false;
}

public boolean saveChunks(boolean flag, IProgressUpdate iprogressupdate) {
Expand All @@ -381,7 +381,7 @@ public boolean unloadChunks() {
return false;
}

public boolean b() {
public boolean canSave() {
return true;
}
}
2 changes: 1 addition & 1 deletion net/minecraft/server/ChunkProviderLoadOrGenerate.java
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ public boolean unloadChunks() {
return this.c.unloadChunks();
}

public boolean b() {
public boolean canSave() {
return true;
}
}
10 changes: 5 additions & 5 deletions net/minecraft/server/ChunkProviderServer.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public class ChunkProviderServer implements IChunkProvider {
private Chunk emptyChunk;
private IChunkProvider chunkProvider;
private IChunkLoader e;
public boolean a = false;
public boolean forceChunkLoad = false;
private Map chunks = new HashMap();
private List chunkList = new ArrayList();
private WorldServer world;
Expand Down Expand Up @@ -87,7 +87,7 @@ public Chunk getChunkAt(int i, int j) {
public Chunk getOrCreateChunk(int i, int j) {
Chunk chunk = (Chunk) this.chunks.get(Integer.valueOf(ChunkCoordIntPair.a(i, j)));

return chunk == null ? (!this.world.isLoading && !this.a ? this.emptyChunk : this.getChunkAt(i, j)) : chunk;
return chunk == null ? (!this.world.isLoading && !this.forceChunkLoad ? this.emptyChunk : this.getChunkAt(i, j)) : chunk;
}

private Chunk loadChunk(int i, int j) {
Expand Down Expand Up @@ -174,7 +174,7 @@ public boolean saveChunks(boolean flag, IProgressUpdate iprogressupdate) {
}

public boolean unloadChunks() {
if (!this.world.E) {
if (!this.world.canSave) {
for (int i = 0; i < 100; ++i) {
if (!this.unloadQueue.isEmpty()) {
Integer integer = (Integer) this.unloadQueue.iterator().next();
Expand All @@ -197,7 +197,7 @@ public boolean unloadChunks() {
return this.chunkProvider.unloadChunks();
}

public boolean b() {
return !this.world.E;
public boolean canSave() {
return !this.world.canSave;
}
}
Loading

0 comments on commit da37ae7

Please sign in to comment.