ForgePatch/forge/conf/patches/minecraft_server.patch
2012-03-04 03:06:56 -08:00

1071 lines
51 KiB
Diff

diff -r -U 3 minecraft_server\net\minecraft\server\MinecraftServer.java minecraft_server_patched\net\minecraft\server\MinecraftServer.java
--- minecraft_server\net\minecraft\server\MinecraftServer.java Sat Mar 03 17:55:41 2012
+++ minecraft_server_patched\net\minecraft\server\MinecraftServer.java Sat Mar 03 18:14:53 2012
@@ -400,6 +400,9 @@
interruptedexception1.printStackTrace();
}
}
+ }
+ finally
+ {
try
{
func_6013_g();
@@ -413,6 +416,8 @@
{
System.exit(0);
}
+ }
+/*
break MISSING_BLOCK_LABEL_346;
}
try
@@ -445,6 +450,7 @@
System.exit(0);
}
throw exception2;
+*/
}
private void func_6018_h()
diff -r -U 3 minecraft_server\net\minecraft\src\Block.java minecraft_server_patched\net\minecraft\src\Block.java
--- minecraft_server\net\minecraft\src\Block.java Sat Mar 03 17:55:41 2012
+++ minecraft_server_patched\net\minecraft\src\Block.java Sat Mar 03 18:38:14 2012
@@ -81,18 +81,18 @@
public static final Block field_9041_O;
public static final Block field_9040_P;
public static final Block field_9039_Q;
- public static final Block field_9038_R = (new BlockNote(25)).func_237_c(0.8F).func_20037_a("musicBlock").func_28027_k();
- public static final Block field_9037_S = (new BlockBed(26)).func_237_c(0.2F).func_20037_a("bed").func_27021_h().func_28027_k();
+ public static final Block field_9038_R;
+ public static final Block field_9037_S;
public static final Block field_9036_T;
public static final Block field_9034_U;
public static final Block field_9033_V;
- public static final Block field_9032_W = (new BlockWeb(30, 11)).func_258_c(1).func_237_c(4F).func_20037_a("web");
+ public static final Block field_9032_W;
public static final BlockTallGrass field_9031_X;
public static final BlockDeadBush field_9030_Y;
public static final Block field_9029_Z;
- public static final BlockPistonExtension field_9049_aa = (BlockPistonExtension)(new BlockPistonExtension(34, 107)).func_28027_k();
+ public static final BlockPistonExtension field_9049_aa;
public static final Block field_616_ac;
- public static final BlockPistonMoving field_9048_ac = new BlockPistonMoving(36);
+ public static final BlockPistonMoving field_9048_ac;
public static final BlockFlower field_4072_ae;
public static final BlockFlower field_4071_af;
public static final BlockFlower field_4070_ag;
@@ -153,7 +153,7 @@
public static final Block field_22010_bi;
public static final Block field_25013_bj;
public static final Block field_28030_bl;
- public static final Block field_35056_bm = (new BlockSilverfish(97)).func_237_c(0.75F);
+ public static final Block field_35056_bm;
public static final Block field_35052_bn;
public static final Block field_35053_bo;
public static final Block field_35054_bp;
@@ -171,10 +171,10 @@
public static final Block field_40171_bB;
public static final Block field_40172_bC;
public static final Block field_40169_bD;
- public static final Block field_40170_bE = (new BlockNetherStalk(115)).func_20037_a("netherStalk").func_28027_k();
- public static final Block field_40175_bF = (new BlockEnchantmentTable(116)).func_237_c(5F).func_232_b(2000F).func_20037_a("enchantmentTable");
- public static final Block field_40176_bG = (new BlockBrewingStand(117)).func_237_c(0.5F).func_224_a(0.125F).func_20037_a("brewingStand").func_28027_k();
- public static final Block field_40173_bH = (new BlockCauldron(118)).func_237_c(2.0F).func_20037_a("cauldron").func_28027_k();
+ public static final Block field_40170_bE;
+ public static final Block field_40175_bF;
+ public static final Block field_40176_bG;
+ public static final Block field_40173_bH;
public static final Block field_40174_bI;
public static final Block field_40167_bJ;
public static final Block field_40168_bK;
@@ -795,13 +795,18 @@
field_9041_O = (new Block(22, 144, Material.field_523_d)).func_237_c(3F).func_232_b(5F).func_4026_a(field_9025_h).func_20037_a("blockLapis");
field_9040_P = (new BlockDispenser(23)).func_237_c(3.5F).func_4026_a(field_9025_h).func_20037_a("dispenser").func_28027_k();
field_9039_Q = (new BlockSandStone(24)).func_4026_a(field_9025_h).func_237_c(0.8F).func_20037_a("sandStone");
+ field_9038_R = (new BlockNote(25)).func_237_c(0.8F).func_20037_a("musicBlock").func_28027_k();
+ field_9037_S = (new BlockBed(26)).func_237_c(0.2F).func_20037_a("bed").func_27021_h().func_28027_k();
field_9036_T = (new BlockRail(27, 179, true)).func_237_c(0.7F).func_4026_a(field_9024_i).func_20037_a("goldenRail").func_28027_k();
field_9034_U = (new BlockDetectorRail(28, 195)).func_237_c(0.7F).func_4026_a(field_9024_i).func_20037_a("detectorRail").func_28027_k();
field_9033_V = (new BlockPistonBase(29, 106, true)).func_20037_a("pistonStickyBase").func_28027_k();
+ field_9032_W = (new BlockWeb(30, 11)).func_258_c(1).func_237_c(4F).func_20037_a("web");
field_9031_X = (BlockTallGrass)(new BlockTallGrass(31, 39)).func_237_c(0.0F).func_4026_a(field_9026_g).func_20037_a("tallgrass");
field_9030_Y = (BlockDeadBush)(new BlockDeadBush(32, 55)).func_237_c(0.0F).func_4026_a(field_9026_g).func_20037_a("deadbush");
field_9029_Z = (new BlockPistonBase(33, 107, false)).func_20037_a("pistonBase").func_28027_k();
+ field_9049_aa = (BlockPistonExtension)(new BlockPistonExtension(34, 107)).func_28027_k();
field_616_ac = (new BlockCloth()).func_237_c(0.8F).func_4026_a(field_9022_k).func_20037_a("cloth").func_28027_k();
+ field_9048_ac = new BlockPistonMoving(36);
field_4072_ae = (BlockFlower)(new BlockFlower(37, 13)).func_237_c(0.0F).func_4026_a(field_9026_g).func_20037_a("flower");
field_4071_af = (BlockFlower)(new BlockFlower(38, 12)).func_237_c(0.0F).func_4026_a(field_9026_g).func_20037_a("rose");
field_4070_ag = (BlockFlower)(new BlockMushroom(39, 29)).func_237_c(0.0F).func_4026_a(field_9026_g).func_224_a(0.125F).func_20037_a("mushroom");
@@ -862,6 +867,7 @@
field_22010_bi = (new BlockRedstoneRepeater(94, true)).func_237_c(0.0F).func_224_a(0.625F).func_4026_a(field_9028_e).func_20037_a("diode").func_27021_h().func_28027_k();
field_25013_bj = (new BlockLockedChest(95)).func_237_c(0.0F).func_224_a(1.0F).func_4026_a(field_9028_e).func_20037_a("lockedchest").func_231_a(true).func_28027_k();
field_28030_bl = (new BlockTrapDoor(96, Material.field_524_c)).func_237_c(3F).func_4026_a(field_9028_e).func_20037_a("trapdoor").func_27021_h().func_28027_k();
+ field_35056_bm = (new BlockSilverfish(97)).func_237_c(0.75F);
field_35052_bn = (new BlockStoneBrick(98)).func_237_c(1.5F).func_232_b(10F).func_4026_a(field_9025_h).func_20037_a("stonebricksmooth");
field_35053_bo = (new BlockMushroomCap(99, Material.field_524_c, 142, 0)).func_237_c(0.2F).func_4026_a(field_9028_e).func_20037_a("mushroom").func_28027_k();
field_35054_bp = (new BlockMushroomCap(100, Material.field_524_c, 142, 1)).func_237_c(0.2F).func_4026_a(field_9028_e).func_20037_a("mushroom").func_28027_k();
@@ -879,6 +885,10 @@
field_40171_bB = (new Block(112, 224, Material.field_523_d)).func_237_c(2.0F).func_232_b(10F).func_4026_a(field_9025_h).func_20037_a("netherBrick");
field_40172_bC = (new BlockFence(113, 224, Material.field_523_d)).func_237_c(2.0F).func_232_b(10F).func_4026_a(field_9025_h).func_20037_a("netherFence");
field_40169_bD = (new BlockStairs(114, field_40171_bB)).func_20037_a("stairsNetherBrick").func_28027_k();
+ field_40170_bE = (new BlockNetherStalk(115)).func_20037_a("netherStalk").func_28027_k();
+ field_40175_bF = (new BlockEnchantmentTable(116)).func_237_c(5F).func_232_b(2000F).func_20037_a("enchantmentTable");
+ field_40176_bG = (new BlockBrewingStand(117)).func_237_c(0.5F).func_224_a(0.125F).func_20037_a("brewingStand").func_28027_k();
+ field_40173_bH = (new BlockCauldron(118)).func_237_c(2.0F).func_20037_a("cauldron").func_28027_k();
field_40174_bI = (new BlockEndPortal(119, Material.field_4212_x)).func_237_c(-1F).func_232_b(6000000F);
field_40167_bJ = (new BlockEndPortalFrame(120)).func_4026_a(field_9023_j).func_224_a(0.125F).func_237_c(-1F).func_20037_a("endPortalFrame").func_28027_k().func_232_b(6000000F);
field_40168_bK = (new Block(121, 175, Material.field_523_d)).func_237_c(3F).func_232_b(15F).func_4026_a(field_9025_h).func_20037_a("whiteStone");
diff -r -U 3 minecraft_server\net\minecraft\src\ComponentNetherBridgePiece.java minecraft_server_patched\net\minecraft\src\ComponentNetherBridgePiece.java
--- minecraft_server\net\minecraft\src\ComponentNetherBridgePiece.java Sat Mar 03 17:55:43 2012
+++ minecraft_server_patched\net\minecraft\src\ComponentNetherBridgePiece.java Sat Mar 03 18:28:22 2012
@@ -37,48 +37,40 @@
private ComponentNetherBridgePiece func_40284_a(ComponentNetherBridgeStartPiece p_40284_1_, List p_40284_2_, List p_40284_3_, Random p_40284_4_, int p_40284_5_, int p_40284_6_, int p_40284_7_, int p_40284_8_, int p_40284_9_)
{
- int i;
- boolean flag;
- int j;
- i = func_40282_a(p_40284_2_);
- flag = i > 0 && p_40284_9_ <= 30;
- j = 0;
-_L2:
- int k;
- Iterator iterator;
- if(j >= 5 || !flag)
+ int var10 = this.func_40282_a(p_40284_2_);
+ boolean var11 = var10 > 0 && p_40284_9_ <= 30;
+ int var12 = 0;
+ while(var12 < 5 && var11)
{
- break MISSING_BLOCK_LABEL_195;
+ ++var12;
+ int var13 = p_40284_4_.nextInt(var10);
+ Iterator var14 = p_40284_2_.iterator();
+ while(var14.hasNext())
+ {
+ StructureNetherBridgePieceWeight var15 = (StructureNetherBridgePieceWeight)var14.next();
+ var13 -= var15.field_40653_b;
+ if(var13 < 0)
+ {
+ if(!var15.func_40649_a(p_40284_9_) || var15 == p_40284_1_.field_40296_a && !var15.field_40652_e)
+ {
+ break;
+ }
+ ComponentNetherBridgePiece var16 = StructureNetherBridgePieces.func_40538_a(var15, p_40284_3_, p_40284_4_, p_40284_5_, p_40284_6_, p_40284_7_, p_40284_8_, p_40284_9_);
+ if(var16 != null)
+ {
+ ++var15.field_40654_c;
+ p_40284_1_.field_40296_a = var15;
+ if(!var15.func_40650_a())
+ {
+ p_40284_2_.remove(var15);
+ }
+ return var16;
+ }
+ }
+ }
}
- j++;
- k = p_40284_4_.nextInt(i);
- iterator = p_40284_2_.iterator();
-_L4:
- if(!(!iterator.hasNext()))
-## JADFIX _L1 _L2
-_L1:
- StructureNetherBridgePieceWeight structurenetherbridgepieceweight;
- structurenetherbridgepieceweight = (StructureNetherBridgePieceWeight)iterator.next();
- k -= structurenetherbridgepieceweight.field_40653_b;
- if(!(k >= 0))
-## JADFIX _L3 _L4
-_L3:
- if(structurenetherbridgepieceweight.func_40649_a(p_40284_9_) && (structurenetherbridgepieceweight != p_40284_1_.field_40296_a || structurenetherbridgepieceweight.field_40652_e))
-## JADFIX _L5 _L2
-_L5:
- ComponentNetherBridgePiece componentnetherbridgepiece = StructureNetherBridgePieces.func_40538_a(structurenetherbridgepieceweight, p_40284_3_, p_40284_4_, p_40284_5_, p_40284_6_, p_40284_7_, p_40284_8_, p_40284_9_);
- if(!(componentnetherbridgepiece == null))
-## JADFIX _L6 _L4
-_L6:
- structurenetherbridgepieceweight.field_40654_c++;
- p_40284_1_.field_40296_a = structurenetherbridgepieceweight;
- if(!structurenetherbridgepieceweight.func_40650_a())
- {
- p_40284_2_.remove(structurenetherbridgepieceweight);
- }
- return componentnetherbridgepiece;
- ComponentNetherBridgeEnd componentnetherbridgeend = ComponentNetherBridgeEnd.func_40301_a(p_40284_3_, p_40284_4_, p_40284_5_, p_40284_6_, p_40284_7_, p_40284_8_, p_40284_9_);
- return componentnetherbridgeend;
+ ComponentNetherBridgeEnd var17 = ComponentNetherBridgeEnd.func_40301_a(p_40284_3_, p_40284_4_, p_40284_5_, p_40284_6_, p_40284_7_, p_40284_8_, p_40284_9_);
+ return var17;
}
private StructureComponent func_40283_a(ComponentNetherBridgeStartPiece p_40283_1_, List p_40283_2_, Random p_40283_3_, int p_40283_4_, int p_40283_5_, int p_40283_6_, int p_40283_7_, int p_40283_8_, boolean p_40283_9_)
diff -r -U 3 minecraft_server\net\minecraft\src\GenLayer.java minecraft_server_patched\net\minecraft\src\GenLayer.java
--- minecraft_server\net\minecraft\src\GenLayer.java Sat Mar 03 17:55:44 2012
+++ minecraft_server_patched\net\minecraft\src\GenLayer.java Sat Mar 03 18:15:52 2012
@@ -20,7 +20,7 @@
public static GenLayer[] func_48391_a(long p_48391_0_, WorldType p_48391_2_)
{
- Object obj = new GenLayerIsland(1L);
+ GenLayer obj = new GenLayerIsland(1L);
obj = new GenLayerFuzzyZoom(2000L, ((GenLayer) (obj)));
obj = new GenLayerAddIsland(1L, ((GenLayer) (obj)));
obj = new GenLayerZoom(2001L, ((GenLayer) (obj)));
@@ -32,13 +32,13 @@
obj = new GenLayerAddIsland(4L, ((GenLayer) (obj)));
obj = new GenLayerAddMushroomIsland(5L, ((GenLayer) (obj)));
byte byte0 = 4;
- Object obj1 = obj;
+ GenLayer obj1 = obj;
obj1 = GenLayerZoom.func_35025_a(1000L, ((GenLayer) (obj1)), 0);
obj1 = new GenLayerRiverInit(100L, ((GenLayer) (obj1)));
obj1 = GenLayerZoom.func_35025_a(1000L, ((GenLayer) (obj1)), byte0 + 2);
obj1 = new GenLayerRiver(1L, ((GenLayer) (obj1)));
obj1 = new GenLayerSmooth(1000L, ((GenLayer) (obj1)));
- Object obj2 = obj;
+ GenLayer obj2 = obj;
obj2 = GenLayerZoom.func_35025_a(1000L, ((GenLayer) (obj2)), 0);
obj2 = new GenLayerBiome(200L, ((GenLayer) (obj2)), p_48391_2_);
obj2 = GenLayerZoom.func_35025_a(1000L, ((GenLayer) (obj2)), 2);
diff -r -U 3 minecraft_server\net\minecraft\src\GuiStatsComponent.java minecraft_server_patched\net\minecraft\src\GuiStatsComponent.java
--- minecraft_server\net\minecraft\src\GuiStatsComponent.java Sat Mar 03 17:55:44 2012
+++ minecraft_server_patched\net\minecraft\src\GuiStatsComponent.java Sat Mar 03 18:17:17 2012
@@ -47,22 +47,20 @@
field_768_c[4] = (new StringBuilder()).append("Avg rec: ").append((int)func_48551_a(field_40572_e.field_48078_w)).append(", Avg size: ").append((int)func_48551_a(field_40572_e.field_48082_x)).toString();
if(field_40572_e.field_6034_e == null)
{
- break MISSING_BLOCK_LABEL_446;
+ return;
}
i = 0;
-_L3:
- if(!(i >= field_40572_e.field_6034_e.length))
-## JADFIX _L1 _L2
-_L1:
+ while(!(i >= field_40572_e.field_6034_e.length))
+ {
field_768_c[5 + i] = (new StringBuilder()).append("Lvl ").append(i).append(" tick: ").append(field_40573_a.format(func_48551_a(field_40572_e.field_40028_g[i]) * 9.9999999999999995E-007D)).append(" ms").toString();
if(field_40572_e.field_6034_e[i] == null || field_40572_e.field_6034_e[i].field_20911_y == null)
{
+ i++;
continue; /* Loop/switch isn't completed */
}
field_768_c[5 + i] += ", " + field_40572_e.field_6034_e[i].field_20911_y.func_46040_d();
i++;
- goto _L3
-_L2:
+ }
field_767_a[field_766_b++ & 0xff] = (int)((func_48551_a(field_40572_e.field_48079_v) * 100D) / 12500D);
repaint();
return;
diff -r -U 3 minecraft_server\net\minecraft\src\MapGenCaves.java minecraft_server_patched\net\minecraft\src\MapGenCaves.java
--- minecraft_server\net\minecraft\src\MapGenCaves.java Sat Mar 03 17:55:45 2012
+++ minecraft_server_patched\net\minecraft\src\MapGenCaves.java Sat Mar 03 18:18:45 2012
@@ -74,11 +74,11 @@
{
continue;
}
- double d4 = p_668_6_ - d;
- double d5 = p_668_10_ - d1;
- double d6 = p_668_16_ - p_668_15_;
+ double d4a = p_668_6_ - d;
+ double d5a = p_668_10_ - d1;
+ double d6a = p_668_16_ - p_668_15_;
double d7 = p_668_12_ + 2.0F + 16F;
- if((d4 * d4 + d5 * d5) - d6 * d6 > d7 * d7)
+ if((d4a * d4a + d5a * d5a) - d6a * d6a > d7 * d7)
{
return;
}
@@ -86,11 +86,11 @@
{
continue;
}
- d4 = MathHelper.func_584_b(p_668_6_ - d2) - p_668_3_ * 16 - 1;
+ int d4 = MathHelper.func_584_b(p_668_6_ - d2) - p_668_3_ * 16 - 1;
int k = (MathHelper.func_584_b(p_668_6_ + d2) - p_668_3_ * 16) + 1;
- d5 = MathHelper.func_584_b(p_668_8_ - d3) - 1;
+ int d5 = MathHelper.func_584_b(p_668_8_ - d3) - 1;
int l = MathHelper.func_584_b(p_668_8_ + d3) + 1;
- d6 = MathHelper.func_584_b(p_668_10_ - d2) - p_668_4_ * 16 - 1;
+ int d6 = MathHelper.func_584_b(p_668_10_ - d2) - p_668_4_ * 16 - 1;
int i1 = (MathHelper.func_584_b(p_668_10_ + d2) - p_668_4_ * 16) + 1;
if(d4 < 0)
{
diff -r -U 3 minecraft_server\net\minecraft\src\MapGenCavesHell.java minecraft_server_patched\net\minecraft\src\MapGenCavesHell.java
--- minecraft_server\net\minecraft\src\MapGenCavesHell.java Sat Mar 03 17:55:45 2012
+++ minecraft_server_patched\net\minecraft\src\MapGenCavesHell.java Sat Mar 03 18:19:04 2012
@@ -74,11 +74,11 @@
{
continue;
}
- double d4 = p_4105_4_ - d;
- double d5 = p_4105_8_ - d1;
- double d6 = p_4105_14_ - p_4105_13_;
+ double d4a = p_4105_4_ - d;
+ double d5a = p_4105_8_ - d1;
+ double d6a = p_4105_14_ - p_4105_13_;
double d7 = p_4105_10_ + 2.0F + 16F;
- if((d4 * d4 + d5 * d5) - d6 * d6 > d7 * d7)
+ if((d4a * d4a + d5a * d5a) - d6a * d6a > d7 * d7)
{
return;
}
@@ -86,11 +86,11 @@
{
continue;
}
- d4 = MathHelper.func_584_b(p_4105_4_ - d2) - p_4105_1_ * 16 - 1;
+ int d4 = MathHelper.func_584_b(p_4105_4_ - d2) - p_4105_1_ * 16 - 1;
int k = (MathHelper.func_584_b(p_4105_4_ + d2) - p_4105_1_ * 16) + 1;
- d5 = MathHelper.func_584_b(p_4105_6_ - d3) - 1;
+ int d5 = MathHelper.func_584_b(p_4105_6_ - d3) - 1;
int l = MathHelper.func_584_b(p_4105_6_ + d3) + 1;
- d6 = MathHelper.func_584_b(p_4105_8_ - d2) - p_4105_2_ * 16 - 1;
+ int d6 = MathHelper.func_584_b(p_4105_8_ - d2) - p_4105_2_ * 16 - 1;
int i1 = (MathHelper.func_584_b(p_4105_8_ + d2) - p_4105_2_ * 16) + 1;
if(d4 < 0)
{
diff -r -U 3 minecraft_server\net\minecraft\src\MapGenRavine.java minecraft_server_patched\net\minecraft\src\MapGenRavine.java
--- minecraft_server\net\minecraft\src\MapGenRavine.java Sat Mar 03 17:55:45 2012
+++ minecraft_server_patched\net\minecraft\src\MapGenRavine.java Sat Mar 03 18:19:23 2012
@@ -70,11 +70,11 @@
{
continue;
}
- double d4 = p_35539_6_ - d;
- double d5 = p_35539_10_ - d1;
- double d6 = p_35539_16_ - p_35539_15_;
+ double d4a = p_35539_6_ - d;
+ double d5a = p_35539_10_ - d1;
+ double d6a = p_35539_16_ - p_35539_15_;
double d7 = p_35539_12_ + 2.0F + 16F;
- if((d4 * d4 + d5 * d5) - d6 * d6 > d7 * d7)
+ if((d4a * d4a + d5a * d5a) - d6a * d6a > d7 * d7)
{
return;
}
@@ -82,11 +82,11 @@
{
continue;
}
- d4 = MathHelper.func_584_b(p_35539_6_ - d2) - p_35539_3_ * 16 - 1;
+ int d4 = MathHelper.func_584_b(p_35539_6_ - d2) - p_35539_3_ * 16 - 1;
int k = (MathHelper.func_584_b(p_35539_6_ + d2) - p_35539_3_ * 16) + 1;
- d5 = MathHelper.func_584_b(p_35539_8_ - d3) - 1;
+ int d5 = MathHelper.func_584_b(p_35539_8_ - d3) - 1;
int l = MathHelper.func_584_b(p_35539_8_ + d3) + 1;
- d6 = MathHelper.func_584_b(p_35539_10_ - d2) - p_35539_4_ * 16 - 1;
+ int d6 = MathHelper.func_584_b(p_35539_10_ - d2) - p_35539_4_ * 16 - 1;
int i1 = (MathHelper.func_584_b(p_35539_10_ + d2) - p_35539_4_ * 16) + 1;
if(d4 < 0)
{
diff -r -U 3 minecraft_server\net\minecraft\src\NetworkReaderThread.java minecraft_server_patched\net\minecraft\src\NetworkReaderThread.java
--- minecraft_server\net\minecraft\src\NetworkReaderThread.java Sat Mar 03 17:55:45 2012
+++ minecraft_server_patched\net\minecraft\src\NetworkReaderThread.java Sat Mar 03 18:19:56 2012
@@ -24,6 +24,8 @@
{
NetworkManager.field_1052_b++;
}
+ try
+ {
while(NetworkManager.func_743_a(field_827_a) && !NetworkManager.func_740_b(field_827_a))
{
while(NetworkManager.func_751_c(field_827_a)) ;
@@ -33,10 +35,15 @@
}
catch(InterruptedException interruptedexception) { }
}
+ }
+ finally
+ {
synchronized(NetworkManager.field_1053_a)
{
NetworkManager.field_1052_b--;
}
+ }
+/*
break MISSING_BLOCK_LABEL_131;
Exception exception2;
exception2;
@@ -45,5 +52,6 @@
NetworkManager.field_1052_b--;
}
throw exception2;
+*/
}
}
diff -r -U 3 minecraft_server\net\minecraft\src\NetworkWriterThread.java minecraft_server_patched\net\minecraft\src\NetworkWriterThread.java
--- minecraft_server\net\minecraft\src\NetworkWriterThread.java Sat Mar 03 17:55:45 2012
+++ minecraft_server_patched\net\minecraft\src\NetworkWriterThread.java Sat Mar 03 18:20:36 2012
@@ -27,6 +27,8 @@
{
NetworkManager.field_1051_c++;
}
+ try
+ {
while(NetworkManager.func_743_a(field_826_a))
{
while(NetworkManager.func_749_d(field_826_a)) ;
@@ -51,10 +53,15 @@
}
catch(InterruptedException interruptedexception) { }
}
+ }
+ finally
+ {
synchronized(NetworkManager.field_1053_a)
{
NetworkManager.field_1051_c--;
}
+ }
+/*
break MISSING_BLOCK_LABEL_167;
Exception exception2;
exception2;
@@ -63,5 +70,6 @@
NetworkManager.field_1051_c--;
}
throw exception2;
+*/
}
}
diff -r -U 3 minecraft_server\net\minecraft\src\PathNavigate.java minecraft_server_patched\net\minecraft\src\PathNavigate.java
--- minecraft_server\net\minecraft\src\PathNavigate.java Sat Mar 03 17:55:45 2012
+++ minecraft_server_patched\net\minecraft\src\PathNavigate.java Sat Mar 03 18:47:44 2012
@@ -184,7 +184,7 @@
{
Vec3D vec3d = func_48665_h();
int i = field_46038_c.func_48424_d();
- float f = field_46038_c.func_48423_e();
+ int f = field_46038_c.func_48423_e();
do
{
if(f >= field_46038_c.func_48424_d())
@@ -198,10 +198,10 @@
}
f++;
} while(true);
- f = field_46039_a.field_300_D * field_46039_a.field_300_D;
+ float fa = field_46039_a.field_300_D * field_46039_a.field_300_D;
for(int j = field_46038_c.func_48423_e(); j < i; j++)
{
- if(vec3d.func_764_b(field_46038_c.func_48428_a(field_46039_a, j)) < (double)f)
+ if(vec3d.func_764_b(field_46038_c.func_48428_a(field_46039_a, j)) < (double)fa)
{
field_46038_c.func_48422_c(j + 1);
}
diff -r -U 3 minecraft_server\net\minecraft\src\SpawnerAnimals.java minecraft_server_patched\net\minecraft\src\SpawnerAnimals.java
--- minecraft_server\net\minecraft\src\SpawnerAnimals.java Sat Mar 03 17:55:45 2012
+++ minecraft_server_patched\net\minecraft\src\SpawnerAnimals.java Sat Mar 03 18:29:41 2012
@@ -35,169 +35,141 @@
public static final int func_4111_a(World p_4111_0_, boolean p_4111_1_, boolean p_4111_2_)
{
- int j;
- ChunkCoordinates chunkcoordinates;
- EnumCreatureType aenumcreaturetype[];
- int i1;
- int j1;
if(!p_4111_1_ && !p_4111_2_)
{
return 0;
}
- field_4311_a.clear();
- for(int i = 0; i < p_4111_0_.field_805_k.size(); i++)
+ else
{
- EntityPlayer entityplayer = (EntityPlayer)p_4111_0_.field_805_k.get(i);
- int k = MathHelper.func_584_b(entityplayer.field_322_l / 16D);
- int l = MathHelper.func_584_b(entityplayer.field_320_n / 16D);
- byte byte0 = 8;
- for(int k1 = -byte0; k1 <= byte0; k1++)
+ field_4311_a.clear();
+ int var3;
+ int var6;
+ for(var3 = 0; var3 < p_4111_0_.field_805_k.size(); ++var3)
{
- for(int l1 = -byte0; l1 <= byte0; l1++)
+ EntityPlayer var4 = (EntityPlayer)p_4111_0_.field_805_k.get(var3);
+ int var5 = MathHelper.func_584_b(var4.field_322_l / 16.0D);
+ var6 = MathHelper.func_584_b(var4.field_320_n / 16.0D);
+ byte var7 = 8;
+ for(int var8 = -var7; var8 <= var7; ++var8)
{
- boolean flag = k1 == -byte0 || k1 == byte0 || l1 == -byte0 || l1 == byte0;
- ChunkCoordIntPair chunkcoordintpair1 = new ChunkCoordIntPair(k1 + k, l1 + l);
- if(!flag)
+ for(int var9 = -var7; var9 <= var7; ++var9)
{
- field_4311_a.put(chunkcoordintpair1, Boolean.valueOf(false));
- continue;
- }
- if(!field_4311_a.containsKey(chunkcoordintpair1))
- {
- field_4311_a.put(chunkcoordintpair1, Boolean.valueOf(true));
+ boolean var10 = var8 == -var7 || var8 == var7 || var9 == -var7 || var9 == var7;
+ ChunkCoordIntPair var11 = new ChunkCoordIntPair(var8 + var5, var9 + var6);
+ if(!var10)
+ {
+ field_4311_a.put(var11, Boolean.valueOf(false));
+ }
+ else if(!field_4311_a.containsKey(var11))
+ {
+ field_4311_a.put(var11, Boolean.valueOf(true));
+ }
}
}
-
}
-
- }
-
- j = 0;
- chunkcoordinates = p_4111_0_.func_22078_l();
- aenumcreaturetype = EnumCreatureType.values();
- i1 = aenumcreaturetype.length;
- j1 = 0;
-_L10:
- if(!(j1 >= i1))
-## JADFIX _L1 _L2
-_L1:
- EnumCreatureType enumcreaturetype;
- Iterator iterator;
- enumcreaturetype = aenumcreaturetype[j1];
- if(enumcreaturetype.func_21103_d() && !p_4111_2_ || !enumcreaturetype.func_21103_d() && !p_4111_1_ || p_4111_0_.func_487_a(enumcreaturetype.func_21105_a()) > (enumcreaturetype.func_21104_b() * field_4311_a.size()) / 256)
- {
- continue; /* Loop/switch isn't completed */
- }
- iterator = field_4311_a.keySet().iterator();
-_L4:
- int i2;
- int j2;
- int k2;
- int l2;
- int i3;
- do
- {
- ChunkCoordIntPair chunkcoordintpair;
- do
+ var3 = 0;
+ ChunkCoordinates var31 = p_4111_0_.func_22078_l();
+ EnumCreatureType[] var32 = EnumCreatureType.values();
+ var6 = var32.length;
+ for(int var33 = 0; var33 < var6; ++var33)
{
- if(!iterator.hasNext())
+ EnumCreatureType var34 = var32[var33];
+ if((!var34.func_21103_d() || p_4111_2_) && (var34.func_21103_d() || p_4111_1_) && p_4111_0_.func_487_a(var34.func_21105_a()) <= var34.func_21104_b() * field_4311_a.size() / 256)
{
- continue; /* Loop/switch isn't completed */
+ Iterator var35 = field_4311_a.keySet().iterator();
+ label108: while(var35.hasNext())
+ {
+ ChunkCoordIntPair var37 = (ChunkCoordIntPair)var35.next();
+ if(!((Boolean)field_4311_a.get(var37)).booleanValue())
+ {
+ ChunkPosition var36 = func_4112_a(p_4111_0_, var37.field_152_a, var37.field_151_b);
+ int var12 = var36.field_846_a;
+ int var13 = var36.field_845_b;
+ int var14 = var36.field_847_c;
+ if(!p_4111_0_.func_445_d(var12, var13, var14) && p_4111_0_.func_443_c(var12, var13, var14) == var34.func_21102_c())
+ {
+ int var15 = 0;
+ int var16 = 0;
+ while(var16 < 3)
+ {
+ int var17 = var12;
+ int var18 = var13;
+ int var19 = var14;
+ byte var20 = 6;
+ SpawnListEntry var21 = null;
+ int var22 = 0;
+ while(true)
+ {
+ if(var22 < 4)
+ {
+ label101:
+ {
+ var17 += p_4111_0_.field_803_m.nextInt(var20) - p_4111_0_.field_803_m.nextInt(var20);
+ var18 += p_4111_0_.field_803_m.nextInt(1) - p_4111_0_.field_803_m.nextInt(1);
+ var19 += p_4111_0_.field_803_m.nextInt(var20) - p_4111_0_.field_803_m.nextInt(var20);
+ if(func_21167_a(var34, p_4111_0_, var17, var18, var19))
+ {
+ float var23 = (float)var17 + 0.5F;
+ float var24 = (float)var18;
+ float var25 = (float)var19 + 0.5F;
+ if(p_4111_0_.func_456_a((double)var23, (double)var24, (double)var25, 24.0D) == null)
+ {
+ float var26 = var23 - (float)var31.field_22216_a;
+ float var27 = var24 - (float)var31.field_529_a;
+ float var28 = var25 - (float)var31.field_528_b;
+ float var29 = var26 * var26 + var27 * var27 + var28 * var28;
+ if(var29 >= 576.0F)
+ {
+ if(var21 == null)
+ {
+ var21 = p_4111_0_.func_40216_a(var34, var17, var18, var19);
+ if(var21 == null)
+ {
+ break label101;
+ }
+ }
+ EntityLiving var38;
+ try
+ {
+ var38 = (EntityLiving)var21.field_25145_a.getConstructor(new Class[]
+ { World.class }).newInstance(new Object[]
+ { p_4111_0_ });
+ }
+ catch(Exception var30)
+ {
+ var30.printStackTrace();
+ return var3;
+ }
+ var38.func_107_c((double)var23, (double)var24, (double)var25, p_4111_0_.field_803_m.nextFloat() * 360.0F, 0.0F);
+ if(var38.func_155_a())
+ {
+ ++var15;
+ p_4111_0_.func_526_a(var38);
+ func_21166_a(var38, p_4111_0_, var23, var24, var25);
+ if(var15 >= var38.func_4045_i())
+ {
+ continue label108;
+ }
+ }
+ var3 += var15;
+ }
+ }
+ }
+ ++var22;
+ continue;
+ }
+ }
+ ++var16;
+ break;
+ }
+ }
+ }
+ }
+ }
}
- chunkcoordintpair = (ChunkCoordIntPair)iterator.next();
- } while(((Boolean)field_4311_a.get(chunkcoordintpair)).booleanValue());
- ChunkPosition chunkposition = func_4112_a(p_4111_0_, chunkcoordintpair.field_152_a, chunkcoordintpair.field_151_b);
- i2 = chunkposition.field_846_a;
- j2 = chunkposition.field_845_b;
- k2 = chunkposition.field_847_c;
- } while(p_4111_0_.func_445_d(i2, j2, k2) || p_4111_0_.func_443_c(i2, j2, k2) != enumcreaturetype.func_21102_c());
- l2 = 0;
- i3 = 0;
-_L9:
- if(!(i3 >= 3))
-## JADFIX _L3 _L4
-_L3:
- int j3;
- int k3;
- int l3;
- byte byte1;
- SpawnListEntry spawnlistentry;
- int i4;
- j3 = i2;
- k3 = j2;
- l3 = k2;
- byte1 = 6;
- spawnlistentry = null;
- i4 = 0;
-_L8:
- if(!(i4 >= 4))
-## JADFIX _L5 _L6
-_L5:
- EntityLiving entityliving;
- j3 += p_4111_0_.field_803_m.nextInt(byte1) - p_4111_0_.field_803_m.nextInt(byte1);
- k3 += p_4111_0_.field_803_m.nextInt(1) - p_4111_0_.field_803_m.nextInt(1);
- l3 += p_4111_0_.field_803_m.nextInt(byte1) - p_4111_0_.field_803_m.nextInt(byte1);
- if(!func_21167_a(enumcreaturetype, p_4111_0_, j3, k3, l3))
- {
- continue; /* Loop/switch isn't completed */
- }
- float f = (float)j3 + 0.5F;
- float f1 = k3;
- float f2 = (float)l3 + 0.5F;
- if(p_4111_0_.func_456_a(f, f1, f2, 24D) != null)
- {
- continue; /* Loop/switch isn't completed */
- }
- float f3 = f - (float)chunkcoordinates.field_22216_a;
- float f4 = f1 - (float)chunkcoordinates.field_529_a;
- float f5 = f2 - (float)chunkcoordinates.field_528_b;
- float f6 = f3 * f3 + f4 * f4 + f5 * f5;
- if(f6 < 576F)
- {
- continue; /* Loop/switch isn't completed */
- }
- if(spawnlistentry == null)
- {
- spawnlistentry = p_4111_0_.func_40216_a(enumcreaturetype, j3, k3, l3);
- if(spawnlistentry == null)
- {
- break; /* Loop/switch isn't completed */
}
+ return var3;
}
- try
- {
- entityliving = (EntityLiving)spawnlistentry.field_25145_a.getConstructor(new Class[] {
- net.minecraft.src.World.class
- }).newInstance(new Object[] {
- p_4111_0_
- });
- }
- catch(Exception exception)
- {
- exception.printStackTrace();
- return j;
- }
- entityliving.func_107_c(f, f1, f2, p_4111_0_.field_803_m.nextFloat() * 360F, 0.0F);
- if(!entityliving.func_155_a())
- {
- break; /* Loop/switch isn't completed */
- }
- l2++;
- p_4111_0_.func_526_a(entityliving);
- func_21166_a(entityliving, p_4111_0_, f, f1, f2);
- if(l2 < entityliving.func_4045_i())
-## JADFIX _L7 _L4
-_L7:
- j += l2;
- i4++;
- goto _L8
-_L6:
- i3++;
- goto _L9
- j1++;
- goto _L10
-_L2:
- return j;
}
public static boolean func_21167_a(EnumCreatureType p_21167_0_, World p_21167_1_, int p_21167_2_, int p_21167_3_, int p_21167_4_)
diff -r -U 3 minecraft_server\net\minecraft\src\StringTranslate.java minecraft_server_patched\net\minecraft\src\StringTranslate.java
--- minecraft_server\net\minecraft\src\StringTranslate.java Sat Mar 03 17:55:45 2012
+++ minecraft_server_patched\net\minecraft\src\StringTranslate.java Sat Mar 03 18:30:17 2012
@@ -73,60 +73,51 @@
public void func_44010_a(String p_44010_1_)
{
- Properties properties;
- if(p_44010_1_.equals(field_44012_d))
+ if(!p_44010_1_.equals(this.field_44012_d))
{
- return;
- }
- properties = new Properties();
- try
- {
- func_44011_a(properties, "en_US");
- }
- catch(IOException ioexception) { }
- field_46121_e = false;
- if("en_US".equals(p_44010_1_))
- {
- break MISSING_BLOCK_LABEL_152;
- }
- Enumeration enumeration;
- func_44011_a(properties, p_44010_1_);
- enumeration = properties.propertyNames();
-_L2:
- String s;
- int i;
- Object obj1;
- do
- {
- if(!enumeration.hasMoreElements() || field_46121_e)
+ Properties var2 = new Properties();
+ try
{
- break MISSING_BLOCK_LABEL_152;
+ this.func_44011_a(var2, "en_US");
}
- Object obj = enumeration.nextElement();
- obj1 = properties.get(obj);
- } while(obj1 == null);
- s = obj1.toString();
- i = 0;
-_L5:
- if(!(i >= s.length()))
-## JADFIX _L1 _L2
-_L1:
- if(!(s.charAt(i) < '\u0100'))
-## JADFIX _L3 _L4
-_L3:
- field_46121_e = true;
- goto _L2
-_L4:
- i++;
- goto _L5
- IOException ioexception1;
- ioexception1;
- ioexception1.printStackTrace();
- return;
- field_44012_d = p_44010_1_;
- field_25081_b = properties;
- return;
- goto _L2
+ catch(IOException var8)
+ {
+ ;
+ }
+ this.field_46121_e = false;
+ if(!"en_US".equals(p_44010_1_))
+ {
+ try
+ {
+ this.func_44011_a(var2, p_44010_1_);
+ Enumeration var3 = var2.propertyNames();
+ while(var3.hasMoreElements() && !this.field_46121_e)
+ {
+ Object var4 = var3.nextElement();
+ Object var5 = var2.get(var4);
+ if(var5 != null)
+ {
+ String var6 = var5.toString();
+ for(int var7 = 0; var7 < var6.length(); ++var7)
+ {
+ if(var6.charAt(var7) >= 256)
+ {
+ this.field_46121_e = true;
+ break;
+ }
+ }
+ }
+ }
+ }
+ catch(IOException var9)
+ {
+ var9.printStackTrace();
+ return;
+ }
+ }
+ this.field_44012_d = p_44010_1_;
+ this.field_25081_b = var2;
+ }
}
public String func_25080_a(String p_25080_1_)
diff -r -U 3 minecraft_server\net\minecraft\src\StructureStrongholdPieces.java minecraft_server_patched\net\minecraft\src\StructureStrongholdPieces.java
--- minecraft_server\net\minecraft\src\StructureStrongholdPieces.java Sat Mar 03 17:55:45 2012
+++ minecraft_server_patched\net\minecraft\src\StructureStrongholdPieces.java Sat Mar 03 18:31:03 2012
@@ -110,62 +110,60 @@
private static ComponentStronghold func_35623_b(ComponentStrongholdStairs2 p_35623_0_, List p_35623_1_, Random p_35623_2_, int p_35623_3_, int p_35623_4_, int p_35623_5_, int p_35623_6_, int p_35623_7_)
{
- int i;
if(!func_35626_c())
{
return null;
}
- if(field_40542_d != null)
+ else
{
- ComponentStronghold componentstronghold = func_35620_a(field_40542_d, p_35623_1_, p_35623_2_, p_35623_3_, p_35623_4_, p_35623_5_, p_35623_6_, p_35623_7_);
- field_40542_d = null;
- if(componentstronghold != null)
+ if(field_40542_d != null)
{
- return componentstronghold;
+ ComponentStronghold var8 = func_35620_a(field_40542_d, p_35623_1_, p_35623_2_, p_35623_3_, p_35623_4_, p_35623_5_, p_35623_6_, p_35623_7_);
+ field_40542_d = null;
+ if(var8 != null)
+ {
+ return var8;
+ }
+ }
+ int var13 = 0;
+ while(var13 < 5)
+ {
+ ++var13;
+ int var9 = p_35623_2_.nextInt(field_35630_a);
+ Iterator var10 = field_35629_c.iterator();
+ while(var10.hasNext())
+ {
+ StructureStrongholdPieceWeight var11 = (StructureStrongholdPieceWeight)var10.next();
+ var9 -= var11.field_35578_b;
+ if(var9 < 0)
+ {
+ if(!var11.func_35575_a(p_35623_7_) || var11 == p_35623_0_.field_35329_a)
+ {
+ break;
+ }
+ ComponentStronghold var12 = func_35620_a(var11.field_35580_a, p_35623_1_, p_35623_2_, p_35623_3_, p_35623_4_, p_35623_5_, p_35623_6_, p_35623_7_);
+ if(var12 != null)
+ {
+ ++var11.field_35579_c;
+ p_35623_0_.field_35329_a = var11;
+ if(!var11.func_35576_a())
+ {
+ field_35629_c.remove(var11);
+ }
+ return var12;
+ }
+ }
+ }
+ }
+ StructureBoundingBox var14 = ComponentStrongholdCorridor.func_35342_a(p_35623_1_, p_35623_2_, p_35623_3_, p_35623_4_, p_35623_5_, p_35623_6_);
+ if(var14 != null && var14.field_35676_b > 1)
+ {
+ return new ComponentStrongholdCorridor(p_35623_7_, p_35623_2_, var14, p_35623_6_);
+ }
+ else
+ {
+ return null;
}
- }
- i = 0;
-_L2:
- int j;
- Iterator iterator;
- if(i >= 5)
- {
- break MISSING_BLOCK_LABEL_206;
- }
- i++;
- j = p_35623_2_.nextInt(field_35630_a);
- iterator = field_35629_c.iterator();
-_L4:
- if(!(!iterator.hasNext()))
-## JADFIX _L1 _L2
-_L1:
- StructureStrongholdPieceWeight structurestrongholdpieceweight;
- structurestrongholdpieceweight = (StructureStrongholdPieceWeight)iterator.next();
- j -= structurestrongholdpieceweight.field_35578_b;
- if(!(j >= 0))
-## JADFIX _L3 _L4
-_L3:
- if(structurestrongholdpieceweight.func_35575_a(p_35623_7_) && structurestrongholdpieceweight != p_35623_0_.field_35329_a)
-## JADFIX _L5 _L2
-_L5:
- ComponentStronghold componentstronghold1 = func_35620_a(structurestrongholdpieceweight.field_35580_a, p_35623_1_, p_35623_2_, p_35623_3_, p_35623_4_, p_35623_5_, p_35623_6_, p_35623_7_);
- if(!(componentstronghold1 == null))
-## JADFIX _L6 _L4
-_L6:
- structurestrongholdpieceweight.field_35579_c++;
- p_35623_0_.field_35329_a = structurestrongholdpieceweight;
- if(!structurestrongholdpieceweight.func_35576_a())
- {
- field_35629_c.remove(structurestrongholdpieceweight);
- }
- return componentstronghold1;
- StructureBoundingBox structureboundingbox = ComponentStrongholdCorridor.func_35342_a(p_35623_1_, p_35623_2_, p_35623_3_, p_35623_4_, p_35623_5_, p_35623_6_);
- if(structureboundingbox != null && structureboundingbox.field_35676_b > 1)
- {
- return new ComponentStrongholdCorridor(p_35623_7_, p_35623_2_, structureboundingbox, p_35623_6_);
- } else
- {
- return null;
}
}
diff -r -U 3 minecraft_server\net\minecraft\src\StructureVillagePieces.java minecraft_server_patched\net\minecraft\src\StructureVillagePieces.java
--- minecraft_server\net\minecraft\src\StructureVillagePieces.java Sat Mar 03 17:55:45 2012
+++ minecraft_server_patched\net\minecraft\src\StructureVillagePieces.java Sat Mar 03 18:31:47 2012
@@ -109,55 +109,52 @@
private static ComponentVillage func_35643_c(ComponentVillageStartPiece p_35643_0_, List p_35643_1_, Random p_35643_2_, int p_35643_3_, int p_35643_4_, int p_35643_5_, int p_35643_6_, int p_35643_7_)
{
- int i;
- int j;
- i = func_35645_a(p_35643_0_.field_35388_d);
- if(i <= 0)
+ int var8 = func_35645_a(p_35643_0_.field_35388_d);
+ if(var8 <= 0)
{
return null;
}
- j = 0;
-_L2:
- int k;
- Iterator iterator;
- if(j >= 5)
+ else
{
- break MISSING_BLOCK_LABEL_182;
- }
- j++;
- k = p_35643_2_.nextInt(i);
- iterator = p_35643_0_.field_35388_d.iterator();
-_L4:
- if(!(!iterator.hasNext()))
-## JADFIX _L1 _L2
-_L1:
- StructureVillagePieceWeight structurevillagepieceweight;
- structurevillagepieceweight = (StructureVillagePieceWeight)iterator.next();
- k -= structurevillagepieceweight.field_35494_b;
- if(!(k >= 0))
-## JADFIX _L3 _L4
-_L3:
- if(structurevillagepieceweight.func_35491_a(p_35643_7_) && (structurevillagepieceweight != p_35643_0_.field_35391_c || p_35643_0_.field_35388_d.size() <= 1))
-## JADFIX _L5 _L2
-_L5:
- ComponentVillage componentvillage = func_35639_a(structurevillagepieceweight, p_35643_1_, p_35643_2_, p_35643_3_, p_35643_4_, p_35643_5_, p_35643_6_, p_35643_7_);
- if(!(componentvillage == null))
-## JADFIX _L6 _L4
-_L6:
- structurevillagepieceweight.field_35495_c++;
- p_35643_0_.field_35391_c = structurevillagepieceweight;
- if(!structurevillagepieceweight.func_35492_a())
- {
- p_35643_0_.field_35388_d.remove(structurevillagepieceweight);
- }
- return componentvillage;
- StructureBoundingBox structureboundingbox = ComponentVillageTorch.func_35382_a(p_35643_1_, p_35643_2_, p_35643_3_, p_35643_4_, p_35643_5_, p_35643_6_);
- if(structureboundingbox != null)
- {
- return new ComponentVillageTorch(p_35643_7_, p_35643_2_, structureboundingbox, p_35643_6_);
- } else
- {
- return null;
+ int var9 = 0;
+ while(var9 < 5)
+ {
+ ++var9;
+ int var10 = p_35643_2_.nextInt(var8);
+ Iterator var11 = p_35643_0_.field_35388_d.iterator();
+ while(var11.hasNext())
+ {
+ StructureVillagePieceWeight var12 = (StructureVillagePieceWeight)var11.next();
+ var10 -= var12.field_35494_b;
+ if(var10 < 0)
+ {
+ if(!var12.func_35491_a(p_35643_7_) || var12 == p_35643_0_.field_35391_c && p_35643_0_.field_35388_d.size() > 1)
+ {
+ break;
+ }
+ ComponentVillage var13 = func_35639_a(var12, p_35643_1_, p_35643_2_, p_35643_3_, p_35643_4_, p_35643_5_, p_35643_6_, p_35643_7_);
+ if(var13 != null)
+ {
+ ++var12.field_35495_c;
+ p_35643_0_.field_35391_c = var12;
+ if(!var12.func_35492_a())
+ {
+ p_35643_0_.field_35388_d.remove(var12);
+ }
+ return var13;
+ }
+ }
+ }
+ }
+ StructureBoundingBox var14 = ComponentVillageTorch.func_35382_a(p_35643_1_, p_35643_2_, p_35643_3_, p_35643_4_, p_35643_5_, p_35643_6_);
+ if(var14 != null)
+ {
+ return new ComponentVillageTorch(p_35643_7_, p_35643_2_, var14, p_35643_6_);
+ }
+ else
+ {
+ return null;
+ }
}
}