Permalink
Browse files

1.5.1

  • Loading branch information...
1 parent 8d2955c commit 4f6bc387b1c8c33230050d4a6f93da7b3262aa52 @amaranth amaranth committed Mar 17, 2013
Showing with 739 additions and 547 deletions.
  1. +1 −1 net/minecraft/server/BanList.java
  2. +2 −0 net/minecraft/server/BlockChest.java
  3. +2 −0 net/minecraft/server/BlockDispenser.java
  4. +2 −2 net/minecraft/server/BlockDropper.java
  5. +2 −0 net/minecraft/server/BlockFurnace.java
  6. +2 −0 net/minecraft/server/BlockHopper.java
  7. +22 −13 net/minecraft/server/ChunkCache.java
  8. +58 −58 net/minecraft/server/CommandScoreboard.java
  9. +1 −1 net/minecraft/server/ContainerAnvil.java
  10. +23 −0 net/minecraft/server/CrashReportEffectAmbient.java
  11. +23 −0 net/minecraft/server/CrashReportEffectAmplifier.java
  12. +23 −0 net/minecraft/server/CrashReportEffectDuration.java
  13. +23 −0 net/minecraft/server/CrashReportEffectID.java
  14. +23 −0 net/minecraft/server/CrashReportEffectName.java
  15. +23 −0 net/minecraft/server/CrashReportEffectSplash.java
  16. +1 −1 net/minecraft/server/CrashReportVersion.java
  17. +1 −1 net/minecraft/server/DedicatedServer.java
  18. +0 −18 net/minecraft/server/DedicatedServerConnectionThread.java
  19. +8 −8 net/minecraft/server/Entity.java
  20. +1 −1 net/minecraft/server/EntityEnderDragon.java
  21. +7 −7 net/minecraft/server/EntityHuman.java
  22. +20 −6 net/minecraft/server/EntityLiving.java
  23. +2 −2 net/minecraft/server/EntityMinecartHopper.java
  24. +5 −5 net/minecraft/server/EntityPlayer.java
  25. +1 −1 net/minecraft/server/EntitySquid.java
  26. +16 −7 net/minecraft/server/EntityTracker.java
  27. +12 −10 net/minecraft/server/EntityTrackerEntry.java
  28. +3 −0 net/minecraft/server/IEmptyInterface.java
  29. +0 −22 net/minecraft/server/IObjective.java
  30. +22 −0 net/minecraft/server/IScoreboardCriteria.java
  31. +4 −2 net/minecraft/server/IWorldInventory.java
  32. +1 −1 net/minecraft/server/MinecraftServer.java
  33. +4 −0 net/minecraft/server/MobEffect.java
  34. +1 −1 net/minecraft/server/MojangStatisticsGenerator.java
  35. +2 −2 net/minecraft/server/Packet206SetScoreboardObjective.java
  36. +3 −3 net/minecraft/server/Packet207SetScoreboardScore.java
  37. +1 −1 net/minecraft/server/Packet208SetScoreboardDisplayObjective.java
  38. +7 −7 net/minecraft/server/Packet209SetScoreboardTeam.java
  39. +7 −7 net/minecraft/server/PlayerList.java
  40. +84 −84 net/minecraft/server/Scoreboard.java
  41. +25 −0 net/minecraft/server/ScoreboardBaseCriteria.java
  42. +0 −25 net/minecraft/server/ScoreboardBaseObjective.java
  43. +1 −1 net/minecraft/server/ScoreboardComparator.java
  44. +4 −4 net/minecraft/server/{ScoreboardHealthObjective.java → ScoreboardHealthCriteria.java}
  45. +8 −8 net/minecraft/server/ScoreboardObjective.java
  46. +33 −33 net/minecraft/server/ScoreboardSaveData.java
  47. +23 −23 net/minecraft/server/ScoreboardScore.java
  48. +30 −30 net/minecraft/server/ScoreboardServer.java
  49. +22 −22 net/minecraft/server/ScoreboardTeam.java
  50. +22 −16 net/minecraft/server/TileEntityBrewingStand.java
  51. +17 −10 net/minecraft/server/TileEntityFurnace.java
  52. +104 −100 net/minecraft/server/TileEntityHopper.java
  53. +7 −3 net/minecraft/server/World.java
@@ -105,7 +105,7 @@ public void save(boolean flag) {
PrintWriter printwriter = new PrintWriter(new FileWriter(this.b, false));
if (flag) {
- printwriter.println("# Updated " + (new SimpleDateFormat()).format(new Date()) + " by Minecraft " + "1.5");
+ printwriter.println("# Updated " + (new SimpleDateFormat()).format(new Date()) + " by Minecraft " + "1.5.1");
printwriter.println("# victim name | ban date | banned by | banned until | reason");
printwriter.println();
}
@@ -269,6 +269,8 @@ public void remove(World world, int i, int j, int k, int l, int i1) {
}
}
}
+
+ world.m(i, j, k, l);
}
super.remove(world, i, j, k, l, i1);
@@ -156,6 +156,8 @@ public void remove(World world, int i, int j, int k, int l, int i1) {
}
}
}
+
+ world.m(i, j, k, l);
}
super.remove(world, i, j, k, l, i1);
@@ -28,11 +28,11 @@ protected void dispense(World world, int i, int j, int k) {
} else {
ItemStack itemstack = tileentitydispenser.getItem(l);
int i1 = world.getData(i, j, k) & 7;
- IInventory iinventory = TileEntityHopper.b(world, (double) (i + Facing.b[i1]), (double) (j + Facing.c[i1]), (double) (k + Facing.d[i1]));
+ IInventory iinventory = TileEntityHopper.getInventoryAt(world, (double) (i + Facing.b[i1]), (double) (j + Facing.c[i1]), (double) (k + Facing.d[i1]));
ItemStack itemstack1;
if (iinventory != null) {
- itemstack1 = TileEntityHopper.a(iinventory, itemstack.cloneItemStack().a(1), Facing.OPPOSITE_FACING[i1]);
+ itemstack1 = TileEntityHopper.addItem(iinventory, itemstack.cloneItemStack().a(1), Facing.OPPOSITE_FACING[i1]);
if (itemstack1 == null) {
itemstack1 = itemstack.cloneItemStack();
if (--itemstack1.count == 0) {
@@ -147,6 +147,8 @@ public void remove(World world, int i, int j, int k, int l, int i1) {
}
}
}
+
+ world.m(i, j, k, l);
}
}
@@ -125,6 +125,8 @@ public void remove(World world, int i, int j, int k, int l, int i1) {
}
}
}
+
+ world.m(i, j, k, l);
}
super.remove(world, i, j, k, l, i1);
@@ -8,25 +8,34 @@
private boolean d;
private World e;
- public ChunkCache(World world, int i, int j, int k, int l, int i1, int j1) {
+ public ChunkCache(World world, int i, int j, int k, int l, int i1, int j1, int k1) {
this.e = world;
- this.a = i >> 4;
- this.b = k >> 4;
- int k1 = l >> 4;
- int l1 = j1 >> 4;
+ this.a = i - k1 >> 4;
+ this.b = k - k1 >> 4;
+ int l1 = l + k1 >> 4;
+ int i2 = j1 + k1 >> 4;
- this.c = new Chunk[k1 - this.a + 1][l1 - this.b + 1];
+ this.c = new Chunk[l1 - this.a + 1][i2 - this.b + 1];
this.d = true;
- for (int i2 = this.a; i2 <= k1; ++i2) {
- for (int j2 = this.b; j2 <= l1; ++j2) {
- Chunk chunk = world.getChunkAt(i2, j2);
+ int j2;
+ int k2;
+ Chunk chunk;
+ for (j2 = this.a; j2 <= l1; ++j2) {
+ for (k2 = this.b; k2 <= i2; ++k2) {
+ chunk = world.getChunkAt(j2, k2);
if (chunk != null) {
- this.c[i2 - this.a][j2 - this.b] = chunk;
- if (!chunk.c(j, i1)) {
- this.d = false;
- }
+ this.c[j2 - this.a][k2 - this.b] = chunk;
+ }
+ }
+ }
+
+ for (j2 = i >> 4; j2 <= l >> 4; ++j2) {
+ for (k2 = k >> 4; k2 <= j1 >> 4; ++k2) {
+ chunk = this.c[j2 - this.a][k2 - this.b];
+ if (chunk != null && !chunk.c(j, i1)) {
+ this.d = false;
}
}
}

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -137,7 +137,7 @@ public void e() {
int k2 = l1 - k1;
boolean flag1 = enchantment.canEnchant(itemstack);
- if (this.n.abilities.canInstantlyBuild) {
+ if (this.n.abilities.canInstantlyBuild || itemstack.id == ItemEnchantedBook.ENCHANTED_BOOK.id) {
flag1 = true;
}
@@ -0,0 +1,23 @@
+package net.minecraft.server;
+
+import java.util.concurrent.Callable;
+
+class CrashReportEffectAmbient implements Callable {
+
+ final MobEffect a;
+
+ final EntityLiving b;
+
+ CrashReportEffectAmbient(EntityLiving entityliving, MobEffect mobeffect) {
+ this.b = entityliving;
+ this.a = mobeffect;
+ }
+
+ public String a() {
+ return this.a.isAmbient() + "";
+ }
+
+ public Object call() {
+ return this.a();
+ }
+}
@@ -0,0 +1,23 @@
+package net.minecraft.server;
+
+import java.util.concurrent.Callable;
+
+class CrashReportEffectAmplifier implements Callable {
+
+ final MobEffect a;
+
+ final EntityLiving b;
+
+ CrashReportEffectAmplifier(EntityLiving entityliving, MobEffect mobeffect) {
+ this.b = entityliving;
+ this.a = mobeffect;
+ }
+
+ public String a() {
+ return this.a.getAmplifier() + "";
+ }
+
+ public Object call() {
+ return this.a();
+ }
+}
@@ -0,0 +1,23 @@
+package net.minecraft.server;
+
+import java.util.concurrent.Callable;
+
+class CrashReportEffectDuration implements Callable {
+
+ final MobEffect a;
+
+ final EntityLiving b;
+
+ CrashReportEffectDuration(EntityLiving entityliving, MobEffect mobeffect) {
+ this.b = entityliving;
+ this.a = mobeffect;
+ }
+
+ public String a() {
+ return this.a.getDuration() + "";
+ }
+
+ public Object call() {
+ return this.a();
+ }
+}
@@ -0,0 +1,23 @@
+package net.minecraft.server;
+
+import java.util.concurrent.Callable;
+
+class CrashReportEffectID implements Callable {
+
+ final MobEffect a;
+
+ final EntityLiving b;
+
+ CrashReportEffectID(EntityLiving entityliving, MobEffect mobeffect) {
+ this.b = entityliving;
+ this.a = mobeffect;
+ }
+
+ public String a() {
+ return this.a.getEffectId() + "";
+ }
+
+ public Object call() {
+ return this.a();
+ }
+}
@@ -0,0 +1,23 @@
+package net.minecraft.server;
+
+import java.util.concurrent.Callable;
+
+class CrashReportEffectName implements Callable {
+
+ final MobEffect a;
+
+ final EntityLiving b;
+
+ CrashReportEffectName(EntityLiving entityliving, MobEffect mobeffect) {
+ this.b = entityliving;
+ this.a = mobeffect;
+ }
+
+ public String a() {
+ return MobEffectList.byId[this.a.getEffectId()].a();
+ }
+
+ public Object call() {
+ return this.a();
+ }
+}
@@ -0,0 +1,23 @@
+package net.minecraft.server;
+
+import java.util.concurrent.Callable;
+
+class CrashReportEffectSplash implements Callable {
+
+ final MobEffect a;
+
+ final EntityLiving b;
+
+ CrashReportEffectSplash(EntityLiving entityliving, MobEffect mobeffect) {
+ this.b = entityliving;
+ this.a = mobeffect;
+ }
+
+ public String a() {
+ return this.a.isSplash() + "";
+ }
+
+ public Object call() {
+ return this.a();
+ }
+}
@@ -11,7 +11,7 @@
}
public String a() {
- return "1.5";
+ return "1.5.1";
}
public Object call() {
@@ -32,7 +32,7 @@ protected boolean init() {
threadcommandreader.setDaemon(true);
threadcommandreader.start();
- this.getLogger().info("Starting minecraft server version 1.5");
+ this.getLogger().info("Starting minecraft server version 1.5.1");
if (Runtime.getRuntime().maxMemory() / 1024L / 1024L < 512L) {
this.getLogger().warning("To start the server with more ram, launch it as \"java -Xmx1024M -Xms1024M -jar minecraft_server.jar\"");
}
@@ -55,20 +55,6 @@ public void run() {
while (this.e.a) {
try {
Socket socket = this.d.accept();
- InetAddress inetaddress = socket.getInetAddress();
- long i = System.currentTimeMillis();
- HashMap hashmap = this.b;
-
- synchronized (this.b) {
- if (this.b.containsKey(inetaddress) && !b(inetaddress) && i - ((Long) this.b.get(inetaddress)).longValue() < 4000L) {
- this.b.put(inetaddress, Long.valueOf(i));
- socket.close();
- continue;
- }
-
- this.b.put(inetaddress, Long.valueOf(i));
- }
-
PendingConnection pendingconnection = new PendingConnection(this.e.d(), socket, "Connection #" + this.c++);
this.a(pendingconnection);
@@ -92,10 +78,6 @@ private void a(PendingConnection pendingconnection) {
}
}
- private static boolean b(InetAddress inetaddress) {
- return "127.0.0.1".equals(inetaddress.getHostAddress());
- }
-
public void a(InetAddress inetaddress) {
if (inetaddress != null) {
HashMap hashmap = this.b;
@@ -56,7 +56,7 @@
public int ticksLived;
public int maxFireTicks;
private int fireTicks;
- protected boolean ae;
+ protected boolean inWater;
public int noDamageTicks;
private boolean justCreated;
protected boolean fireProof;
@@ -104,7 +104,7 @@ public Entity(World world) {
this.ticksLived = 0;
this.maxFireTicks = 1;
this.fireTicks = 0;
- this.ae = false;
+ this.inWater = false;
this.noDamageTicks = 0;
this.justCreated = true;
this.fireProof = false;
@@ -671,16 +671,16 @@ protected void a(float f) {
}
public boolean F() {
- return this.ae || this.world.F(MathHelper.floor(this.locX), MathHelper.floor(this.locY), MathHelper.floor(this.locZ)) || this.world.F(MathHelper.floor(this.locX), MathHelper.floor(this.locY + (double) this.length), MathHelper.floor(this.locZ));
+ return this.inWater || this.world.F(MathHelper.floor(this.locX), MathHelper.floor(this.locY), MathHelper.floor(this.locZ)) || this.world.F(MathHelper.floor(this.locX), MathHelper.floor(this.locY + (double) this.length), MathHelper.floor(this.locZ));
}
public boolean G() {
- return this.ae;
+ return this.inWater;
}
public boolean H() {
if (this.world.a(this.boundingBox.grow(0.0D, -0.4000000059604645D, 0.0D).shrink(0.001D, 0.001D, 0.001D), Material.WATER, this)) {
- if (!this.ae && !this.justCreated) {
+ if (!this.inWater && !this.justCreated) {
float f = MathHelper.sqrt(this.motX * this.motX * 0.20000000298023224D + this.motY * this.motY + this.motZ * this.motZ * 0.20000000298023224D) * 0.2F;
if (f > 1.0F) {
@@ -708,13 +708,13 @@ public boolean H() {
}
this.fallDistance = 0.0F;
- this.ae = true;
+ this.inWater = true;
this.fireTicks = 0;
} else {
- this.ae = false;
+ this.inWater = false;
}
- return this.ae;
+ return this.inWater;
}
public boolean a(Material material) {
@@ -395,7 +395,7 @@ private boolean a(AxisAlignedBB axisalignedbb) {
int j2 = this.world.getTypeId(k1, l1, i2);
if (j2 != 0) {
- if (j2 != Block.OBSIDIAN.id && j2 != Block.WHITESTONE.id && j2 != Block.BEDROCK.id) {
+ if (j2 != Block.OBSIDIAN.id && j2 != Block.WHITESTONE.id && j2 != Block.BEDROCK.id && this.world.getGameRules().getBoolean("mobGriefing")) {
flag1 = this.world.setAir(k1, l1, i2) || flag1;
} else {
flag = true;
Oops, something went wrong.

0 comments on commit 4f6bc38

Please sign in to comment.