Skip to content

Commit

Permalink
1.8.1 rename revision 1
Browse files Browse the repository at this point in the history
  • Loading branch information
Dinnerbone committed Sep 24, 2011
1 parent a5f8cf4 commit 35c01ae
Show file tree
Hide file tree
Showing 45 changed files with 370 additions and 370 deletions.
4 changes: 2 additions & 2 deletions net/minecraft/server/BiomeCacheBlock.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ public BiomeCacheBlock(BiomeCache biomecache, int i, int j) {
this.c = new BiomeBase[256];
this.d = i;
this.e = j;
BiomeCache.a(biomecache).a(this.a, i << 4, j << 4, 16, 16);
BiomeCache.a(biomecache).b(this.b, i << 4, j << 4, 16, 16);
BiomeCache.a(biomecache).getTemperatures(this.a, i << 4, j << 4, 16, 16);
BiomeCache.a(biomecache).getWetness(this.b, i << 4, j << 4, 16, 16);
BiomeCache.a(biomecache).a(this.c, i << 4, j << 4, 16, 16, false);
}

Expand Down
2 changes: 1 addition & 1 deletion net/minecraft/server/ChunkProviderGenerate.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public void a(int i, int j, byte[] abyte) {
int i1 = 128 / 8 + 1;
int j1 = b0 + 1;

this.y = this.s.getWorldChunkManager().b(this.y, i * 4 - 2, j * 4 - 2, l + 5, j1 + 5);
this.y = this.s.getWorldChunkManager().getBiomes(this.y, i * 4 - 2, j * 4 - 2, l + 5, j1 + 5);
this.u = this.a(this.u, i * b0, 0, j * b0, l, i1, j1);

for (int k1 = 0; k1 < b0; ++k1) {
Expand Down
4 changes: 2 additions & 2 deletions net/minecraft/server/ChunkProviderServer.java
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public boolean saveChunks(boolean flag, IProgressUpdate iprogressupdate) {
}

public boolean unloadChunks() {
if (!this.world.canSave) {
if (!this.world.savingDisabled) {
for (int i = 0; i < 100; ++i) {
if (!this.unloadQueue.isEmpty()) {
Long olong = (Long) this.unloadQueue.iterator().next();
Expand All @@ -186,6 +186,6 @@ public boolean unloadChunks() {
}

public boolean canSave() {
return !this.world.canSave;
return !this.world.savingDisabled;
}
}
30 changes: 15 additions & 15 deletions net/minecraft/server/ConsoleCommandHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public void handle(ServerCommand servercommand) {
icommandlistener.sendMessage("Connected players: " + serverconfigurationmanager.c());
} else if (s.toLowerCase().startsWith("stop")) {
this.print(s1, "Stopping the server..");
this.server.a();
this.server.safeShutdown();
} else {
int i;
WorldServer worldserver;
Expand All @@ -46,50 +46,50 @@ public void handle(ServerCommand servercommand) {

for (i = 0; i < this.server.worldServer.length; ++i) {
worldserver = this.server.worldServer[i];
worldserver.canSave = true;
worldserver.savingDisabled = true;
}
} else if (s.toLowerCase().startsWith("save-on")) {
this.print(s1, "Enabling level saving..");

for (i = 0; i < this.server.worldServer.length; ++i) {
worldserver = this.server.worldServer[i];
worldserver.canSave = false;
worldserver.savingDisabled = false;
}
} else {
String s2;

if (s.toLowerCase().startsWith("op ")) {
s2 = s.substring(s.indexOf(" ")).trim();
serverconfigurationmanager.e(s2);
serverconfigurationmanager.addOp(s2);
this.print(s1, "Opping " + s2);
serverconfigurationmanager.a(s2, "\u00A7eYou are now op!");
} else if (s.toLowerCase().startsWith("deop ")) {
s2 = s.substring(s.indexOf(" ")).trim();
serverconfigurationmanager.f(s2);
serverconfigurationmanager.removeOp(s2);
serverconfigurationmanager.a(s2, "\u00A7eYou are no longer op!");
this.print(s1, "De-opping " + s2);
} else if (s.toLowerCase().startsWith("ban-ip ")) {
s2 = s.substring(s.indexOf(" ")).trim();
serverconfigurationmanager.c(s2);
serverconfigurationmanager.addIpBan(s2);
this.print(s1, "Banning ip " + s2);
} else if (s.toLowerCase().startsWith("pardon-ip ")) {
s2 = s.substring(s.indexOf(" ")).trim();
serverconfigurationmanager.d(s2);
serverconfigurationmanager.removeIpBan(s2);
this.print(s1, "Pardoning ip " + s2);
} else {
EntityPlayer entityplayer;

if (s.toLowerCase().startsWith("ban ")) {
s2 = s.substring(s.indexOf(" ")).trim();
serverconfigurationmanager.a(s2);
serverconfigurationmanager.addUserBan(s2);
this.print(s1, "Banning " + s2);
entityplayer = serverconfigurationmanager.i(s2);
if (entityplayer != null) {
entityplayer.netServerHandler.disconnect("Banned by admin");
}
} else if (s.toLowerCase().startsWith("pardon ")) {
s2 = s.substring(s.indexOf(" ")).trim();
serverconfigurationmanager.b(s2);
serverconfigurationmanager.removeUserBan(s2);
this.print(s1, "Pardoning " + s2);
} else {
int j;
Expand Down Expand Up @@ -272,12 +272,12 @@ private void a(String s, String s1, ICommandListener icommandlistener) {

if ("on".equals(s2)) {
this.print(s, "Turned on white-listing");
this.server.propertyManager.b("white-list", true);
this.server.propertyManager.setBoolean("white-list", true);
} else if ("off".equals(s2)) {
this.print(s, "Turned off white-listing");
this.server.propertyManager.b("white-list", false);
this.server.propertyManager.setBoolean("white-list", false);
} else if ("list".equals(s2)) {
Set set = this.server.serverConfigurationManager.e();
Set set = this.server.serverConfigurationManager.getWhitelisted();
String s3 = "";

String s4;
Expand All @@ -292,14 +292,14 @@ private void a(String s, String s1, ICommandListener icommandlistener) {

if ("add".equals(s2) && astring.length == 3) {
s5 = astring[2].toLowerCase();
this.server.serverConfigurationManager.k(s5);
this.server.serverConfigurationManager.addWhitelist(s5);
this.print(s, "Added " + s5 + " to white-list");
} else if ("remove".equals(s2) && astring.length == 3) {
s5 = astring[2].toLowerCase();
this.server.serverConfigurationManager.l(s5);
this.server.serverConfigurationManager.removeWhitelist(s5);
this.print(s, "Removed " + s5 + " from white-list");
} else if ("reload".equals(s2)) {
this.server.serverConfigurationManager.f();
this.server.serverConfigurationManager.reloadWhitelist();
this.print(s, "Reloaded white-list from file");
}
}
Expand Down
6 changes: 3 additions & 3 deletions net/minecraft/server/DataWatcher.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ public void a(int i, Object object) {
}
}

public byte a(int i) {
public byte getByte(int i) {
return ((Byte) ((WatchableObject) this.b.get(Integer.valueOf(i))).b()).byteValue();
}

public int b(int i) {
public int getInt(int i) {
return ((Integer) ((WatchableObject) this.b.get(Integer.valueOf(i))).b()).intValue();
}

public String c(int i) {
public String getString(int i) {
return (String) ((WatchableObject) this.b.get(Integer.valueOf(i))).b();
}

Expand Down
12 changes: 6 additions & 6 deletions net/minecraft/server/Entity.java
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public Entity(World world) {

protected abstract void b();

public DataWatcher al() {
public DataWatcher getDataWatcher() {
return this.datawatcher;
}

Expand Down Expand Up @@ -163,7 +163,7 @@ public void aa() {
this.lastYaw = this.yaw;
int i;

if (this.at()) {
if (this.isSprinting()) {
int j = MathHelper.floor(this.locX);
int k = MathHelper.floor(this.locY - 0.20000000298023224D - (double) this.height);

Expand Down Expand Up @@ -997,11 +997,11 @@ public void setSneak(boolean flag) {
this.a(1, flag);
}

public boolean at() {
public boolean isSprinting() {
return this.e(3);
}

public void g(boolean flag) {
public void setSprinting(boolean flag) {
this.a(3, flag);
}

Expand All @@ -1010,11 +1010,11 @@ public void h(boolean flag) {
}

protected boolean e(int i) {
return (this.datawatcher.a(0) & 1 << i) != 0;
return (this.datawatcher.getByte(0) & 1 << i) != 0;
}

protected void a(int i, boolean flag) {
byte b0 = this.datawatcher.a(0);
byte b0 = this.datawatcher.getByte(0);

if (flag) {
this.datawatcher.watch(0, Byte.valueOf((byte) (b0 | 1 << i)));
Expand Down
8 changes: 4 additions & 4 deletions net/minecraft/server/EntityCaveSpider.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ protected boolean c(Entity entity) {
if (entity instanceof EntityLiving) {
byte b0 = 0;

if (this.world.spawnMonsters > 1) {
if (this.world.spawnMonsters == 2) {
if (this.world.difficulty > 1) {
if (this.world.difficulty == 2) {
b0 = 7;
} else if (this.world.spawnMonsters == 3) {
} else if (this.world.difficulty == 3) {
b0 = 15;
}
}

if (b0 > 0) {
((EntityLiving) entity).d(new MobEffect(MobEffectList.u.H, b0 * 20, 0));
((EntityLiving) entity).addEffect(new MobEffect(MobEffectList.POISON.id, b0 * 20, 0));
}
}

Expand Down
6 changes: 3 additions & 3 deletions net/minecraft/server/EntityCreeper.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ protected void b() {

public void b(NBTTagCompound nbttagcompound) {
super.b(nbttagcompound);
if (this.datawatcher.a(17) == 1) {
if (this.datawatcher.getByte(17) == 1) {
nbttagcompound.a("powered", true);
}
}
Expand Down Expand Up @@ -117,15 +117,15 @@ protected void a(Entity entity, float f) {
}

public boolean isPowered() {
return this.datawatcher.a(17) == 1;
return this.datawatcher.getByte(17) == 1;
}

protected int k() {
return Item.SULPHUR.id;
}

private int w() {
return this.datawatcher.a(16);
return this.datawatcher.getByte(16);
}

private void b(int i) {
Expand Down
4 changes: 2 additions & 2 deletions net/minecraft/server/EntityEnderman.java
Original file line number Diff line number Diff line change
Expand Up @@ -260,15 +260,15 @@ public void setCarriedId(int i) {
}

public int getCarriedId() {
return this.datawatcher.a(16);
return this.datawatcher.getByte(16);
}

public void setCarriedData(int i) {
this.datawatcher.watch(17, Byte.valueOf((byte) (i & 255)));
}

public int getCarriedData() {
return this.datawatcher.a(17);
return this.datawatcher.getByte(17);
}

static {
Expand Down
24 changes: 12 additions & 12 deletions net/minecraft/server/EntityFireball.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ public class EntityFireball extends Entity {
public EntityLiving shooter;
private int k;
private int l = 0;
public double c;
public double d;
public double e;
public double dirX;
public double dirY;
public double dirZ;

public EntityFireball(World world) {
super(world);
Expand All @@ -37,9 +37,9 @@ public EntityFireball(World world, EntityLiving entityliving, double d0, double
d2 += this.random.nextGaussian() * 0.4D;
double d3 = (double) MathHelper.a(d0 * d0 + d1 * d1 + d2 * d2);

this.c = d0 / d3 * 0.1D;
this.d = d1 / d3 * 0.1D;
this.e = d2 / d3 * 0.1D;
this.dirX = d0 / d3 * 0.1D;
this.dirY = d1 / d3 * 0.1D;
this.dirZ = d2 / d3 * 0.1D;
}

public void s_() {
Expand Down Expand Up @@ -157,9 +157,9 @@ public void s_() {
f2 = 0.8F;
}

this.motX += this.c;
this.motY += this.d;
this.motZ += this.e;
this.motX += this.dirX;
this.motY += this.dirY;
this.motZ += this.dirZ;
this.motX *= (double) f2;
this.motY *= (double) f2;
this.motZ *= (double) f2;
Expand Down Expand Up @@ -198,9 +198,9 @@ public boolean damageEntity(DamageSource damagesource, int i) {
this.motX = vec3d.a;
this.motY = vec3d.b;
this.motZ = vec3d.c;
this.c = this.motX * 0.1D;
this.d = this.motY * 0.1D;
this.e = this.motZ * 0.1D;
this.dirX = this.motX * 0.1D;
this.dirY = this.motY * 0.1D;
this.dirZ = this.motZ * 0.1D;
}

return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import java.util.List;

public class EntityFish extends Entity {
public class EntityFishingHook extends Entity {

private int d = -1;
private int e = -1;
Expand All @@ -22,13 +22,13 @@ public class EntityFish extends Entity {
private double p;
private double q;

public EntityFish(World world) {
public EntityFishingHook(World world) {
super(world);
this.b(0.25F, 0.25F);
this.bZ = true;
}

public EntityFish(World world, EntityHuman entityhuman) {
public EntityFishingHook(World world, EntityHuman entityhuman) {
super(world);
this.bZ = true;
this.owner = entityhuman;
Expand Down
8 changes: 4 additions & 4 deletions net/minecraft/server/EntityGhast.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ protected void b() {

public void s_() {
super.s_();
byte b0 = this.datawatcher.a(16);
byte b0 = this.datawatcher.getByte(16);

this.texture = b0 == 1 ? "/mob/ghast_fire.png" : "/mob/ghast.png";
}

protected void c_() {
if (!this.world.isStatic && this.world.spawnMonsters == 0) {
if (!this.world.isStatic && this.world.difficulty == 0) {
this.die();
}

Expand Down Expand Up @@ -110,7 +110,7 @@ protected void c_() {
}

if (!this.world.isStatic) {
byte b0 = this.datawatcher.a(16);
byte b0 = this.datawatcher.getByte(16);
byte b1 = (byte) (this.f > 10 ? 1 : 0);

if (b0 != b1) {
Expand Down Expand Up @@ -156,7 +156,7 @@ protected float l() {
}

public boolean d() {
return this.random.nextInt(20) == 0 && super.d() && this.world.spawnMonsters > 0;
return this.random.nextInt(20) == 0 && super.d() && this.world.difficulty > 0;
}

public int m() {
Expand Down
Loading

0 comments on commit 35c01ae

Please sign in to comment.