Compare commits

...

3 Commits

Author SHA1 Message Date
PeytonPlayz595
ac548b8c9b Compile 2024-03-27 22:45:51 -04:00
PeytonPlayz595
509ef5e0f2 double preloaded chunks, spawn protection warning 2024-03-27 22:43:06 -04:00
PeytonPlayz595
520e11d10b Do some things 2024-03-27 22:40:31 -04:00
8 changed files with 1513 additions and 1489 deletions

Binary file not shown.

View File

@ -114,7 +114,7 @@ public class MinecraftServer implements ICommandListener, Runnable {
this.worldMngr.func_4072_a(new WorldManager(this));
this.worldMngr.monstersEnabled = this.propertyManagerObj.getBooleanProperty("spawn-monsters", true) ? 1 : 0;
this.configManager.setPlayerManager(this.worldMngr);
byte var2 = 10;
byte var2 = 20;
for(int var3 = -var2; var3 <= var2; ++var3) {
this.func_6019_a("Preparing spawn area", (var3 + var2) * 100 / (var2 + var2 + 1));

View File

@ -231,6 +231,9 @@ public class NetServerHandler extends NetHandler implements ICommandListener {
if(var16 < 256.0D) {
this.playerEntity.field_421_a.sendPacket(new Packet53BlockChange(var4, var5, var6, this.mcServer.worldMngr));
}
if(!(var19 > 16 || var2)) {
this.playerEntity.field_421_a.sendPacket(new Packet3Chat("You cannot place/break blocks in this area!"));
}
}
this.mcServer.worldMngr.field_819_z = false;
@ -252,10 +255,8 @@ public class NetServerHandler extends NetHandler implements ICommandListener {
var8 = var7;
}
if(var8 > 16 || var2) {
ItemStack var9 = var1.id >= 0 ? new ItemStack(var1.id) : null;
this.playerEntity.field_425_ad.func_327_a(this.playerEntity, this.mcServer.worldMngr, var9, var10, var4, var5, var6);
}
ItemStack var9 = var1.id >= 0 ? new ItemStack(var1.id) : null;
this.playerEntity.field_425_ad.func_327_a(this.playerEntity, this.mcServer.worldMngr, var9, var10, var4, var5, var6);
this.playerEntity.field_421_a.sendPacket(new Packet53BlockChange(var10, var4, var5, this.mcServer.worldMngr));
if(var6 == 0) {
@ -283,6 +284,23 @@ public class NetServerHandler extends NetHandler implements ICommandListener {
}
this.playerEntity.field_421_a.sendPacket(new Packet53BlockChange(var10, var4, var5, this.mcServer.worldMngr));
if(!(var8 > 16 | var2)) {
if(field_10_k != null) {
this.playerEntity.field_421_a.sendPacket(new Packet3Chat("You cannot place/break blocks in this area!"));
this.playerEntity.field_425_ad.func_323_b(var10, var4, var5);
this.playerEntity.field_421_a.sendPacket(new Packet53BlockChange(var10, var4, var5, this.mcServer.worldMngr));
ItemStack[] stack = this.playerEntity.inventory.mainInventory.clone();
ItemStack stack1 = new ItemStack(var1.id);
if(stack[this.playerEntity.inventory.currentItem] != null) {
stack1.stackSize = stack[this.playerEntity.inventory.currentItem].stackSize + 1;
} else {
stack1.stackSize = 1;
}
stack[this.playerEntity.inventory.currentItem] = stack1;
this.playerEntity.field_421_a.sendPacket(new Packet5PlayerInventory(-1, stack));
}
}
}
this.mcServer.worldMngr.field_819_z = false;

File diff suppressed because it is too large Load Diff

View File

@ -59,7 +59,7 @@ public class Chunk {
}
public int getHeightValue(int var1, int var2) {
return this.heightMap[var2 << 4 | var1] & 255;
return this.heightMap[var2 << 4 | var1] & 0xff;
}
public void func_1014_a() {

View File

@ -15,17 +15,21 @@ public class NibbleArray {
int var4 = var1 << 11 | var3 << 7 | var2;
int var5 = var4 >> 1;
int var6 = var4 & 1;
return var6 == 0 ? this.data[var5] & 15 : this.data[var5] >> 4 & 15;
if (var6 == 0) {
return data[var5] & 0xf;
} else {
return data[var5] >> 4 & 0xf;
}
}
public void setNibble(int var1, int var2, int var3, int var4) {
int var5 = var1 << 11 | var3 << 7 | var2;
int var6 = var5 >> 1;
int var7 = var5 & 1;
if(var7 == 0) {
this.data[var6] = (byte)(this.data[var6] & 240 | var4 & 15);
if (var7 == 0) {
data[var6] = (byte) (data[var6] & 0xf0 | var4 & 0xf);
} else {
this.data[var6] = (byte)(this.data[var6] & 15 | (var4 & 15) << 4);
data[var6] = (byte) (data[var6] & 0xf | (var4 & 0xf) << 4);
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long