id
int32
0
12.9k
code
sequencelengths
2
264k
9,800
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "List", ";", "import", "java", ".", "util", ".", "Random", ";", "public", "class", "ComponentVillageHouse1", "extends", "ComponentVillage", "{", "private", "int", "averageGroundLevel", ";", "public", "ComponentVillageHouse1", "(", "int", "par1", ",", "Random", "par2Random", ",", "StructureBoundingBox", "par3StructureBoundingBox", ",", "int", "par4", ")", "{", "super", "(", "par1", ")", ";", "averageGroundLevel", "=", "-", "1", ";", "coordBaseMode", "=", "par4", ";", "boundingBox", "=", "par3StructureBoundingBox", ";", "}", "public", "void", "buildComponent", "(", "StructureComponent", "structurecomponent", ",", "List", "list", ",", "Random", "random", ")", "{", "}", "public", "static", "ComponentVillageHouse1", "findValidPlacement", "(", "List", "par0List", ",", "Random", "par1Random", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "int", "par5", ",", "int", "par6", ")", "{", "StructureBoundingBox", "structureboundingbox", "=", "StructureBoundingBox", ".", "getComponentToAddBoundingBox", "(", "par2", ",", "par3", ",", "par4", ",", "0", ",", "0", ",", "0", ",", "9", ",", "9", ",", "6", ",", "par5", ")", ";", "if", "(", "!", "canVillageGoDeeper", "(", "structureboundingbox", ")", "||", "StructureComponent", ".", "findIntersecting", "(", "par0List", ",", "structureboundingbox", ")", "!=", "null", ")", "{", "return", "null", ";", "}", "else", "{", "return", "new", "ComponentVillageHouse1", "(", "par6", ",", "par1Random", ",", "structureboundingbox", ",", "par5", ")", ";", "}", "}", "public", "boolean", "addComponentParts", "(", "World", "par1World", ",", "Random", "par2Random", ",", "StructureBoundingBox", "par3StructureBoundingBox", ")", "{", "if", "(", "averageGroundLevel", "<", "0", ")", "{", "averageGroundLevel", "=", "getAverageGroundLevel", "(", "par1World", ",", "par3StructureBoundingBox", ")", ";", "if", "(", "averageGroundLevel", "<", "0", ")", "{", "return", "true", ";", "}", "boundingBox", ".", "offset", "(", "0", ",", "(", "(", "averageGroundLevel", "-", "boundingBox", ".", "maxY", ")", "+", "9", ")", "-", "1", ",", "0", ")", ";", "}", "fillWithBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "1", ",", "1", ",", "1", ",", "7", ",", "5", ",", "4", ",", "0", ",", "0", ",", "false", ")", ";", "fillWithBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "0", ",", "0", ",", "0", ",", "8", ",", "0", ",", "5", ",", "Block", ".", "cobblestone", ".", "blockID", ",", "Block", ".", "cobblestone", ".", "blockID", ",", "false", ")", ";", "fillWithBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "0", ",", "5", ",", "0", ",", "8", ",", "5", ",", "5", ",", "Block", ".", "cobblestone", ".", "blockID", ",", "Block", ".", "cobblestone", ".", "blockID", ",", "false", ")", ";", "fillWithBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "0", ",", "6", ",", "1", ",", "8", ",", "6", ",", "4", ",", "Block", ".", "cobblestone", ".", "blockID", ",", "Block", ".", "cobblestone", ".", "blockID", ",", "false", ")", ";", "fillWithBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "0", ",", "7", ",", "2", ",", "8", ",", "7", ",", "3", ",", "Block", ".", "cobblestone", ".", "blockID", ",", "Block", ".", "cobblestone", ".", "blockID", ",", "false", ")", ";", "int", "i", "=", "getMetadataWithOffset", "(", "Block", ".", "stairCompactPlanks", ".", "blockID", ",", "3", ")", ";", "int", "j", "=", "getMetadataWithOffset", "(", "Block", ".", "stairCompactPlanks", ".", "blockID", ",", "2", ")", ";", "for", "(", "int", "k", "=", "-", "1", ";", "k", "<=", "2", ";", "k", "++", ")", "{", "for", "(", "int", "i1", "=", "0", ";", "i1", "<=", "8", ";", "i1", "++", ")", "{", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "stairCompactPlanks", ".", "blockID", ",", "i", ",", "i1", ",", "6", "+", "k", ",", "k", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "stairCompactPlanks", ".", "blockID", ",", "j", ",", "i1", ",", "6", "+", "k", ",", "5", "-", "k", ",", "par3StructureBoundingBox", ")", ";", "}", "}", "fillWithBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "0", ",", "1", ",", "0", ",", "0", ",", "1", ",", "5", ",", "Block", ".", "cobblestone", ".", "blockID", ",", "Block", ".", "cobblestone", ".", "blockID", ",", "false", ")", ";", "fillWithBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "1", ",", "1", ",", "5", ",", "8", ",", "1", ",", "5", ",", "Block", ".", "cobblestone", ".", "blockID", ",", "Block", ".", "cobblestone", ".", "blockID", ",", "false", ")", ";", "fillWithBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "8", ",", "1", ",", "0", ",", "8", ",", "1", ",", "4", ",", "Block", ".", "cobblestone", ".", "blockID", ",", "Block", ".", "cobblestone", ".", "blockID", ",", "false", ")", ";", "fillWithBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "2", ",", "1", ",", "0", ",", "7", ",", "1", ",", "0", ",", "Block", ".", "cobblestone", ".", "blockID", ",", "Block", ".", "cobblestone", ".", "blockID", ",", "false", ")", ";", "fillWithBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "0", ",", "2", ",", "0", ",", "0", ",", "4", ",", "0", ",", "Block", ".", "cobblestone", ".", "blockID", ",", "Block", ".", "cobblestone", ".", "blockID", ",", "false", ")", ";", "fillWithBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "0", ",", "2", ",", "5", ",", "0", ",", "4", ",", "5", ",", "Block", ".", "cobblestone", ".", "blockID", ",", "Block", ".", "cobblestone", ".", "blockID", ",", "false", ")", ";", "fillWithBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "8", ",", "2", ",", "5", ",", "8", ",", "4", ",", "5", ",", "Block", ".", "cobblestone", ".", "blockID", ",", "Block", ".", "cobblestone", ".", "blockID", ",", "false", ")", ";", "fillWithBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "8", ",", "2", ",", "0", ",", "8", ",", "4", ",", "0", ",", "Block", ".", "cobblestone", ".", "blockID", ",", "Block", ".", "cobblestone", ".", "blockID", ",", "false", ")", ";", "fillWithBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "0", ",", "2", ",", "1", ",", "0", ",", "4", ",", "4", ",", "Block", ".", "planks", ".", "blockID", ",", "Block", ".", "planks", ".", "blockID", ",", "false", ")", ";", "fillWithBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "1", ",", "2", ",", "5", ",", "7", ",", "4", ",", "5", ",", "Block", ".", "planks", ".", "blockID", ",", "Block", ".", "planks", ".", "blockID", ",", "false", ")", ";", "fillWithBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "8", ",", "2", ",", "1", ",", "8", ",", "4", ",", "4", ",", "Block", ".", "planks", ".", "blockID", ",", "Block", ".", "planks", ".", "blockID", ",", "false", ")", ";", "fillWithBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "1", ",", "2", ",", "0", ",", "7", ",", "4", ",", "0", ",", "Block", ".", "planks", ".", "blockID", ",", "Block", ".", "planks", ".", "blockID", ",", "false", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "thinGlass", ".", "blockID", ",", "0", ",", "4", ",", "2", ",", "0", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "thinGlass", ".", "blockID", ",", "0", ",", "5", ",", "2", ",", "0", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "thinGlass", ".", "blockID", ",", "0", ",", "6", ",", "2", ",", "0", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "thinGlass", ".", "blockID", ",", "0", ",", "4", ",", "3", ",", "0", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "thinGlass", ".", "blockID", ",", "0", ",", "5", ",", "3", ",", "0", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "thinGlass", ".", "blockID", ",", "0", ",", "6", ",", "3", ",", "0", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "thinGlass", ".", "blockID", ",", "0", ",", "0", ",", "2", ",", "2", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "thinGlass", ".", "blockID", ",", "0", ",", "0", ",", "2", ",", "3", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "thinGlass", ".", "blockID", ",", "0", ",", "0", ",", "3", ",", "2", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "thinGlass", ".", "blockID", ",", "0", ",", "0", ",", "3", ",", "3", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "thinGlass", ".", "blockID", ",", "0", ",", "8", ",", "2", ",", "2", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "thinGlass", ".", "blockID", ",", "0", ",", "8", ",", "2", ",", "3", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "thinGlass", ".", "blockID", ",", "0", ",", "8", ",", "3", ",", "2", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "thinGlass", ".", "blockID", ",", "0", ",", "8", ",", "3", ",", "3", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "thinGlass", ".", "blockID", ",", "0", ",", "2", ",", "2", ",", "5", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "thinGlass", ".", "blockID", ",", "0", ",", "3", ",", "2", ",", "5", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "thinGlass", ".", "blockID", ",", "0", ",", "5", ",", "2", ",", "5", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "thinGlass", ".", "blockID", ",", "0", ",", "6", ",", "2", ",", "5", ",", "par3StructureBoundingBox", ")", ";", "fillWithBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "1", ",", "4", ",", "1", ",", "7", ",", "4", ",", "1", ",", "Block", ".", "planks", ".", "blockID", ",", "Block", ".", "planks", ".", "blockID", ",", "false", ")", ";", "fillWithBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "1", ",", "4", ",", "4", ",", "7", ",", "4", ",", "4", ",", "Block", ".", "planks", ".", "blockID", ",", "Block", ".", "planks", ".", "blockID", ",", "false", ")", ";", "fillWithBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "1", ",", "3", ",", "4", ",", "7", ",", "3", ",", "4", ",", "Block", ".", "bookShelf", ".", "blockID", ",", "Block", ".", "bookShelf", ".", "blockID", ",", "false", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "planks", ".", "blockID", ",", "0", ",", "7", ",", "1", ",", "4", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "stairCompactPlanks", ".", "blockID", ",", "getMetadataWithOffset", "(", "Block", ".", "stairCompactPlanks", ".", "blockID", ",", "0", ")", ",", "7", ",", "1", ",", "3", ",", "par3StructureBoundingBox", ")", ";", "int", "l", "=", "getMetadataWithOffset", "(", "Block", ".", "stairCompactPlanks", ".", "blockID", ",", "3", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "stairCompactPlanks", ".", "blockID", ",", "l", ",", "6", ",", "1", ",", "4", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "stairCompactPlanks", ".", "blockID", ",", "l", ",", "5", ",", "1", ",", "4", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "stairCompactPlanks", ".", "blockID", ",", "l", ",", "4", ",", "1", ",", "4", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "stairCompactPlanks", ".", "blockID", ",", "l", ",", "3", ",", "1", ",", "4", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "fence", ".", "blockID", ",", "0", ",", "6", ",", "1", ",", "3", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "pressurePlatePlanks", ".", "blockID", ",", "0", ",", "6", ",", "2", ",", "3", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "fence", ".", "blockID", ",", "0", ",", "4", ",", "1", ",", "3", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "pressurePlatePlanks", ".", "blockID", ",", "0", ",", "4", ",", "2", ",", "3", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "workbench", ".", "blockID", ",", "0", ",", "7", ",", "1", ",", "1", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "0", ",", "0", ",", "1", ",", "1", ",", "0", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "0", ",", "0", ",", "1", ",", "2", ",", "0", ",", "par3StructureBoundingBox", ")", ";", "placeDoorAtCurrentPosition", "(", "par1World", ",", "par3StructureBoundingBox", ",", "par2Random", ",", "1", ",", "1", ",", "0", ",", "getMetadataWithOffset", "(", "Block", ".", "doorWood", ".", "blockID", ",", "1", ")", ")", ";", "if", "(", "getBlockIdAtCurrentPosition", "(", "par1World", ",", "1", ",", "0", ",", "-", "1", ",", "par3StructureBoundingBox", ")", "==", "0", "&&", "getBlockIdAtCurrentPosition", "(", "par1World", ",", "1", ",", "-", "1", ",", "-", "1", ",", "par3StructureBoundingBox", ")", "!=", "0", ")", "{", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "stairCompactCobblestone", ".", "blockID", ",", "getMetadataWithOffset", "(", "Block", ".", "stairCompactCobblestone", ".", "blockID", ",", "3", ")", ",", "1", ",", "0", ",", "-", "1", ",", "par3StructureBoundingBox", ")", ";", "}", "for", "(", "int", "j1", "=", "0", ";", "j1", "<", "6", ";", "j1", "++", ")", "{", "for", "(", "int", "k1", "=", "0", ";", "k1", "<", "9", ";", "k1", "++", ")", "{", "clearCurrentPositionBlocksUpwards", "(", "par1World", ",", "k1", ",", "9", ",", "j1", ",", "par3StructureBoundingBox", ")", ";", "fillCurrentPositionBlocksDownwards", "(", "par1World", ",", "Block", ".", "cobblestone", ".", "blockID", ",", "0", ",", "k1", ",", "-", "1", ",", "j1", ",", "par3StructureBoundingBox", ")", ";", "}", "}", "spawnVillagers", "(", "par1World", ",", "par3StructureBoundingBox", ",", "2", ",", "1", ",", "2", ",", "1", ")", ";", "return", "true", ";", "}", "protected", "int", "getVillagerType", "(", "int", "par1", ")", "{", "return", "1", ";", "}", "}", "</s>" ]
9,801
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "Random", ";", "public", "class", "NoiseGeneratorPerlin", "extends", "NoiseGenerator", "{", "private", "int", "permutations", "[", "]", ";", "public", "double", "xCoord", ";", "public", "double", "yCoord", ";", "public", "double", "zCoord", ";", "public", "NoiseGeneratorPerlin", "(", ")", "{", "this", "(", "new", "Random", "(", ")", ")", ";", "}", "public", "NoiseGeneratorPerlin", "(", "Random", "par1Random", ")", "{", "permutations", "=", "new", "int", "[", "512", "]", ";", "xCoord", "=", "par1Random", ".", "nextDouble", "(", ")", "*", "256D", ";", "yCoord", "=", "par1Random", ".", "nextDouble", "(", ")", "*", "256D", ";", "zCoord", "=", "par1Random", ".", "nextDouble", "(", ")", "*", "256D", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "256", ";", "i", "++", ")", "{", "permutations", "[", "i", "]", "=", "i", ";", "}", "for", "(", "int", "j", "=", "0", ";", "j", "<", "256", ";", "j", "++", ")", "{", "int", "k", "=", "par1Random", ".", "nextInt", "(", "256", "-", "j", ")", "+", "j", ";", "int", "l", "=", "permutations", "[", "j", "]", ";", "permutations", "[", "j", "]", "=", "permutations", "[", "k", "]", ";", "permutations", "[", "k", "]", "=", "l", ";", "permutations", "[", "j", "+", "256", "]", "=", "permutations", "[", "j", "]", ";", "}", "}", "public", "final", "double", "lerp", "(", "double", "par1", ",", "double", "par3", ",", "double", "par5", ")", "{", "return", "par3", "+", "par1", "*", "(", "par5", "-", "par3", ")", ";", "}", "public", "final", "double", "func_4102_a", "(", "int", "par1", ",", "double", "par2", ",", "double", "par4", ")", "{", "int", "i", "=", "par1", "&", "0xf", ";", "double", "d", "=", "(", "double", ")", "(", "1", "-", "(", "(", "i", "&", "8", ")", ">>", "3", ")", ")", "*", "par2", ";", "double", "d1", "=", "i", ">=", "4", "?", "i", "!=", "12", "&&", "i", "!=", "14", "?", "par4", ":", "par2", ":", "0.0D", ";", "return", "(", "(", "i", "&", "1", ")", "!=", "0", "?", "-", "d", ":", "d", ")", "+", "(", "(", "i", "&", "2", ")", "!=", "0", "?", "-", "d1", ":", "d1", ")", ";", "}", "public", "final", "double", "grad", "(", "int", "par1", ",", "double", "par2", ",", "double", "par4", ",", "double", "par6", ")", "{", "int", "i", "=", "par1", "&", "0xf", ";", "double", "d", "=", "i", ">=", "8", "?", "par4", ":", "par2", ";", "double", "d1", "=", "i", ">=", "4", "?", "i", "!=", "12", "&&", "i", "!=", "14", "?", "par6", ":", "par2", ":", "par4", ";", "return", "(", "(", "i", "&", "1", ")", "!=", "0", "?", "-", "d", ":", "d", ")", "+", "(", "(", "i", "&", "2", ")", "!=", "0", "?", "-", "d1", ":", "d1", ")", ";", "}", "public", "void", "func_646_a", "(", "double", "par1ArrayOfDouble", "[", "]", ",", "double", "par2", ",", "double", "par4", ",", "double", "par6", ",", "int", "par8", ",", "int", "par9", ",", "int", "par10", ",", "double", "par11", ",", "double", "par13", ",", "double", "par15", ",", "double", "par17", ")", "{", "if", "(", "par9", "==", "1", ")", "{", "boolean", "flag", "=", "false", ";", "boolean", "flag1", "=", "false", ";", "boolean", "flag2", "=", "false", ";", "boolean", "flag3", "=", "false", ";", "double", "d1", "=", "0.0D", ";", "double", "d3", "=", "0.0D", ";", "int", "k2", "=", "0", ";", "double", "d5", "=", "1.0D", "/", "par17", ";", "for", "(", "int", "j3", "=", "0", ";", "j3", "<", "par8", ";", "j3", "++", ")", "{", "double", "d7", "=", "par2", "+", "(", "double", ")", "j3", "*", "par11", "+", "xCoord", ";", "int", "k3", "=", "(", "int", ")", "d7", ";", "if", "(", "d7", "<", "(", "double", ")", "k3", ")", "{", "k3", "--", ";", "}", "int", "l3", "=", "k3", "&", "0xff", ";", "d7", "-=", "k3", ";", "double", "d10", "=", "d7", "*", "d7", "*", "d7", "*", "(", "d7", "*", "(", "d7", "*", "6D", "-", "15D", ")", "+", "10D", ")", ";", "for", "(", "int", "i4", "=", "0", ";", "i4", "<", "par10", ";", "i4", "++", ")", "{", "double", "d12", "=", "par6", "+", "(", "double", ")", "i4", "*", "par15", "+", "zCoord", ";", "int", "k4", "=", "(", "int", ")", "d12", ";", "if", "(", "d12", "<", "(", "double", ")", "k4", ")", "{", "k4", "--", ";", "}", "int", "i5", "=", "k4", "&", "0xff", ";", "d12", "-=", "k4", ";", "double", "d14", "=", "d12", "*", "d12", "*", "d12", "*", "(", "d12", "*", "(", "d12", "*", "6D", "-", "15D", ")", "+", "10D", ")", ";", "int", "i", "=", "permutations", "[", "l3", "]", "+", "0", ";", "int", "k", "=", "permutations", "[", "i", "]", "+", "i5", ";", "int", "l", "=", "permutations", "[", "l3", "+", "1", "]", "+", "0", ";", "int", "i1", "=", "permutations", "[", "l", "]", "+", "i5", ";", "double", "d2", "=", "lerp", "(", "d10", ",", "func_4102_a", "(", "permutations", "[", "k", "]", ",", "d7", ",", "d12", ")", ",", "grad", "(", "permutations", "[", "i1", "]", ",", "d7", "-", "1.0D", ",", "0.0D", ",", "d12", ")", ")", ";", "double", "d4", "=", "lerp", "(", "d10", ",", "grad", "(", "permutations", "[", "k", "+", "1", "]", ",", "d7", ",", "0.0D", ",", "d12", "-", "1.0D", ")", ",", "grad", "(", "permutations", "[", "i1", "+", "1", "]", ",", "d7", "-", "1.0D", ",", "0.0D", ",", "d12", "-", "1.0D", ")", ")", ";", "double", "d16", "=", "lerp", "(", "d14", ",", "d2", ",", "d4", ")", ";", "par1ArrayOfDouble", "[", "k2", "++", "]", "+=", "d16", "*", "d5", ";", "}", "}", "return", ";", "}", "int", "j", "=", "0", ";", "double", "d", "=", "1.0D", "/", "par17", ";", "int", "j1", "=", "-", "1", ";", "boolean", "flag4", "=", "false", ";", "boolean", "flag5", "=", "false", ";", "boolean", "flag6", "=", "false", ";", "boolean", "flag7", "=", "false", ";", "boolean", "flag8", "=", "false", ";", "boolean", "flag9", "=", "false", ";", "double", "d6", "=", "0.0D", ";", "double", "d8", "=", "0.0D", ";", "double", "d9", "=", "0.0D", ";", "double", "d11", "=", "0.0D", ";", "for", "(", "int", "j4", "=", "0", ";", "j4", "<", "par8", ";", "j4", "++", ")", "{", "double", "d13", "=", "par2", "+", "(", "double", ")", "j4", "*", "par11", "+", "xCoord", ";", "int", "l4", "=", "(", "int", ")", "d13", ";", "if", "(", "d13", "<", "(", "double", ")", "l4", ")", "{", "l4", "--", ";", "}", "int", "j5", "=", "l4", "&", "0xff", ";", "d13", "-=", "l4", ";", "double", "d15", "=", "d13", "*", "d13", "*", "d13", "*", "(", "d13", "*", "(", "d13", "*", "6D", "-", "15D", ")", "+", "10D", ")", ";", "for", "(", "int", "k5", "=", "0", ";", "k5", "<", "par10", ";", "k5", "++", ")", "{", "double", "d17", "=", "par6", "+", "(", "double", ")", "k5", "*", "par15", "+", "zCoord", ";", "int", "l5", "=", "(", "int", ")", "d17", ";", "if", "(", "d17", "<", "(", "double", ")", "l5", ")", "{", "l5", "--", ";", "}", "int", "i6", "=", "l5", "&", "0xff", ";", "d17", "-=", "l5", ";", "double", "d18", "=", "d17", "*", "d17", "*", "d17", "*", "(", "d17", "*", "(", "d17", "*", "6D", "-", "15D", ")", "+", "10D", ")", ";", "for", "(", "int", "j6", "=", "0", ";", "j6", "<", "par9", ";", "j6", "++", ")", "{", "double", "d19", "=", "par4", "+", "(", "double", ")", "j6", "*", "par13", "+", "yCoord", ";", "int", "k6", "=", "(", "int", ")", "d19", ";", "if", "(", "d19", "<", "(", "double", ")", "k6", ")", "{", "k6", "--", ";", "}", "int", "l6", "=", "k6", "&", "0xff", ";", "d19", "-=", "k6", ";", "double", "d20", "=", "d19", "*", "d19", "*", "d19", "*", "(", "d19", "*", "(", "d19", "*", "6D", "-", "15D", ")", "+", "10D", ")", ";", "if", "(", "j6", "==", "0", "||", "l6", "!=", "j1", ")", "{", "j1", "=", "l6", ";", "int", "k1", "=", "permutations", "[", "j5", "]", "+", "l6", ";", "int", "l1", "=", "permutations", "[", "k1", "]", "+", "i6", ";", "int", "i2", "=", "permutations", "[", "k1", "+", "1", "]", "+", "i6", ";", "int", "j2", "=", "permutations", "[", "j5", "+", "1", "]", "+", "l6", ";", "int", "l2", "=", "permutations", "[", "j2", "]", "+", "i6", ";", "int", "i3", "=", "permutations", "[", "j2", "+", "1", "]", "+", "i6", ";", "d6", "=", "lerp", "(", "d15", ",", "grad", "(", "permutations", "[", "l1", "]", ",", "d13", ",", "d19", ",", "d17", ")", ",", "grad", "(", "permutations", "[", "l2", "]", ",", "d13", "-", "1.0D", ",", "d19", ",", "d17", ")", ")", ";", "d8", "=", "lerp", "(", "d15", ",", "grad", "(", "permutations", "[", "i2", "]", ",", "d13", ",", "d19", "-", "1.0D", ",", "d17", ")", ",", "grad", "(", "permutations", "[", "i3", "]", ",", "d13", "-", "1.0D", ",", "d19", "-", "1.0D", ",", "d17", ")", ")", ";", "d9", "=", "lerp", "(", "d15", ",", "grad", "(", "permutations", "[", "l1", "+", "1", "]", ",", "d13", ",", "d19", ",", "d17", "-", "1.0D", ")", ",", "grad", "(", "permutations", "[", "l2", "+", "1", "]", ",", "d13", "-", "1.0D", ",", "d19", ",", "d17", "-", "1.0D", ")", ")", ";", "d11", "=", "lerp", "(", "d15", ",", "grad", "(", "permutations", "[", "i2", "+", "1", "]", ",", "d13", ",", "d19", "-", "1.0D", ",", "d17", "-", "1.0D", ")", ",", "grad", "(", "permutations", "[", "i3", "+", "1", "]", ",", "d13", "-", "1.0D", ",", "d19", "-", "1.0D", ",", "d17", "-", "1.0D", ")", ")", ";", "}", "double", "d21", "=", "lerp", "(", "d20", ",", "d6", ",", "d8", ")", ";", "double", "d22", "=", "lerp", "(", "d20", ",", "d9", ",", "d11", ")", ";", "double", "d23", "=", "lerp", "(", "d18", ",", "d21", ",", "d22", ")", ";", "par1ArrayOfDouble", "[", "j", "++", "]", "+=", "d23", "*", "d", ";", "}", "}", "}", "}", "}", "</s>" ]
9,802
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "public", "interface", "IStatType", "{", "}", "</s>" ]
9,803
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "public", "abstract", "class", "EntityFlying", "extends", "EntityLiving", "{", "public", "EntityFlying", "(", "World", "par1World", ")", "{", "super", "(", "par1World", ")", ";", "}", "protected", "void", "fall", "(", "float", "f", ")", "{", "}", "public", "void", "moveEntityWithHeading", "(", "float", "par1", ",", "float", "par2", ")", "{", "if", "(", "isInWater", "(", ")", ")", "{", "moveFlying", "(", "par1", ",", "par2", ",", "0.02F", ")", ";", "moveEntity", "(", "motionX", ",", "motionY", ",", "motionZ", ")", ";", "motionX", "*=", "0.80000001192092896D", ";", "motionY", "*=", "0.80000001192092896D", ";", "motionZ", "*=", "0.80000001192092896D", ";", "}", "else", "if", "(", "handleLavaMovement", "(", ")", ")", "{", "moveFlying", "(", "par1", ",", "par2", ",", "0.02F", ")", ";", "moveEntity", "(", "motionX", ",", "motionY", ",", "motionZ", ")", ";", "motionX", "*=", "0.5D", ";", "motionY", "*=", "0.5D", ";", "motionZ", "*=", "0.5D", ";", "}", "else", "{", "float", "f", "=", "0.91F", ";", "if", "(", "onGround", ")", "{", "f", "=", "0.5460001F", ";", "int", "i", "=", "worldObj", ".", "getBlockId", "(", "MathHelper", ".", "floor_double", "(", "posX", ")", ",", "MathHelper", ".", "floor_double", "(", "boundingBox", ".", "minY", ")", "-", "1", ",", "MathHelper", ".", "floor_double", "(", "posZ", ")", ")", ";", "if", "(", "i", ">", "0", ")", "{", "f", "=", "Block", ".", "blocksList", "[", "i", "]", ".", "slipperiness", "*", "0.91F", ";", "}", "}", "float", "f1", "=", "0.1627714F", "/", "(", "f", "*", "f", "*", "f", ")", ";", "moveFlying", "(", "par1", ",", "par2", ",", "onGround", "?", "0.1F", "*", "f1", ":", "0.02F", ")", ";", "f", "=", "0.91F", ";", "if", "(", "onGround", ")", "{", "f", "=", "0.5460001F", ";", "int", "j", "=", "worldObj", ".", "getBlockId", "(", "MathHelper", ".", "floor_double", "(", "posX", ")", ",", "MathHelper", ".", "floor_double", "(", "boundingBox", ".", "minY", ")", "-", "1", ",", "MathHelper", ".", "floor_double", "(", "posZ", ")", ")", ";", "if", "(", "j", ">", "0", ")", "{", "f", "=", "Block", ".", "blocksList", "[", "j", "]", ".", "slipperiness", "*", "0.91F", ";", "}", "}", "moveEntity", "(", "motionX", ",", "motionY", ",", "motionZ", ")", ";", "motionX", "*=", "f", ";", "motionY", "*=", "f", ";", "motionZ", "*=", "f", ";", "}", "field_9142_bc", "=", "field_9141_bd", ";", "double", "d", "=", "posX", "-", "prevPosX", ";", "double", "d1", "=", "posZ", "-", "prevPosZ", ";", "float", "f2", "=", "MathHelper", ".", "sqrt_double", "(", "d", "*", "d", "+", "d1", "*", "d1", ")", "*", "4F", ";", "if", "(", "f2", ">", "1.0F", ")", "{", "f2", "=", "1.0F", ";", "}", "field_9141_bd", "+=", "(", "f2", "-", "field_9141_bd", ")", "*", "0.4F", ";", "field_386_ba", "+=", "field_9141_bd", ";", "}", "public", "boolean", "isOnLadder", "(", ")", "{", "return", "false", ";", "}", "}", "</s>" ]
9,804
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "List", ";", "public", "class", "EntityAIAvoidEntity", "extends", "EntityAIBase", "{", "private", "EntityCreature", "theEntity", ";", "private", "float", "field_48235_b", ";", "private", "float", "field_48236_c", ";", "private", "Entity", "field_48233_d", ";", "private", "float", "field_48234_e", ";", "private", "PathEntity", "field_48231_f", ";", "private", "PathNavigate", "entityPathNavigate", ";", "private", "Class", "targetEntityClass", ";", "public", "EntityAIAvoidEntity", "(", "EntityCreature", "par1EntityCreature", ",", "Class", "par2Class", ",", "float", "par3", ",", "float", "par4", ",", "float", "par5", ")", "{", "theEntity", "=", "par1EntityCreature", ";", "targetEntityClass", "=", "par2Class", ";", "field_48234_e", "=", "par3", ";", "field_48235_b", "=", "par4", ";", "field_48236_c", "=", "par5", ";", "entityPathNavigate", "=", "par1EntityCreature", ".", "getNavigator", "(", ")", ";", "setMutexBits", "(", "1", ")", ";", "}", "public", "boolean", "shouldExecute", "(", ")", "{", "if", "(", "targetEntityClass", "==", "(", "net", ".", "minecraft", ".", "src", ".", "EntityPlayer", ".", "class", ")", ")", "{", "if", "(", "(", "theEntity", "instanceof", "EntityTameable", ")", "&&", "(", "(", "EntityTameable", ")", "theEntity", ")", ".", "isTamed", "(", ")", ")", "{", "return", "false", ";", "}", "field_48233_d", "=", "theEntity", ".", "worldObj", ".", "getClosestPlayerToEntity", "(", "theEntity", ",", "field_48234_e", ")", ";", "if", "(", "field_48233_d", "==", "null", ")", "{", "return", "false", ";", "}", "}", "else", "{", "List", "list", "=", "theEntity", ".", "worldObj", ".", "getEntitiesWithinAABB", "(", "targetEntityClass", ",", "theEntity", ".", "boundingBox", ".", "expand", "(", "field_48234_e", ",", "3D", ",", "field_48234_e", ")", ")", ";", "if", "(", "list", ".", "size", "(", ")", "==", "0", ")", "{", "return", "false", ";", "}", "field_48233_d", "=", "(", "Entity", ")", "list", ".", "get", "(", "0", ")", ";", "}", "if", "(", "!", "theEntity", ".", "func_48318_al", "(", ")", ".", "canSee", "(", "field_48233_d", ")", ")", "{", "return", "false", ";", "}", "Vec3D", "vec3d", "=", "RandomPositionGenerator", ".", "func_48394_b", "(", "theEntity", ",", "16", ",", "7", ",", "Vec3D", ".", "createVector", "(", "field_48233_d", ".", "posX", ",", "field_48233_d", ".", "posY", ",", "field_48233_d", ".", "posZ", ")", ")", ";", "if", "(", "vec3d", "==", "null", ")", "{", "return", "false", ";", "}", "if", "(", "field_48233_d", ".", "getDistanceSq", "(", "vec3d", ".", "xCoord", ",", "vec3d", ".", "yCoord", ",", "vec3d", ".", "zCoord", ")", "<", "field_48233_d", ".", "getDistanceSqToEntity", "(", "theEntity", ")", ")", "{", "return", "false", ";", "}", "field_48231_f", "=", "entityPathNavigate", ".", "func_48650_a", "(", "vec3d", ".", "xCoord", ",", "vec3d", ".", "yCoord", ",", "vec3d", ".", "zCoord", ")", ";", "if", "(", "field_48231_f", "==", "null", ")", "{", "return", "false", ";", "}", "return", "field_48231_f", ".", "func_48426_a", "(", "vec3d", ")", ";", "}", "public", "boolean", "continueExecuting", "(", ")", "{", "return", "!", "entityPathNavigate", ".", "noPath", "(", ")", ";", "}", "public", "void", "startExecuting", "(", ")", "{", "entityPathNavigate", ".", "setPath", "(", "field_48231_f", ",", "field_48235_b", ")", ";", "}", "public", "void", "resetTask", "(", ")", "{", "field_48233_d", "=", "null", ";", "}", "public", "void", "updateTask", "(", ")", "{", "if", "(", "theEntity", ".", "getDistanceSqToEntity", "(", "field_48233_d", ")", "<", "49D", ")", "{", "theEntity", ".", "getNavigator", "(", ")", ".", "func_48654_a", "(", "field_48236_c", ")", ";", "}", "else", "{", "theEntity", ".", "getNavigator", "(", ")", ".", "func_48654_a", "(", "field_48235_b", ")", ";", "}", "}", "}", "</s>" ]
9,805
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "Random", ";", "public", "class", "WorldGenClay", "extends", "WorldGenerator", "{", "private", "int", "clayBlockId", ";", "private", "int", "numberOfBlocks", ";", "public", "WorldGenClay", "(", "int", "par1", ")", "{", "clayBlockId", "=", "Block", ".", "blockClay", ".", "blockID", ";", "numberOfBlocks", "=", "par1", ";", "}", "public", "boolean", "generate", "(", "World", "par1World", ",", "Random", "par2Random", ",", "int", "par3", ",", "int", "par4", ",", "int", "par5", ")", "{", "if", "(", "par1World", ".", "getBlockMaterial", "(", "par3", ",", "par4", ",", "par5", ")", "!=", "Material", ".", "water", ")", "{", "return", "false", ";", "}", "int", "i", "=", "par2Random", ".", "nextInt", "(", "numberOfBlocks", "-", "2", ")", "+", "2", ";", "int", "j", "=", "1", ";", "for", "(", "int", "k", "=", "par3", "-", "i", ";", "k", "<=", "par3", "+", "i", ";", "k", "++", ")", "{", "for", "(", "int", "l", "=", "par5", "-", "i", ";", "l", "<=", "par5", "+", "i", ";", "l", "++", ")", "{", "int", "i1", "=", "k", "-", "par3", ";", "int", "j1", "=", "l", "-", "par5", ";", "if", "(", "i1", "*", "i1", "+", "j1", "*", "j1", ">", "i", "*", "i", ")", "{", "continue", ";", "}", "for", "(", "int", "k1", "=", "par4", "-", "j", ";", "k1", "<=", "par4", "+", "j", ";", "k1", "++", ")", "{", "int", "l1", "=", "par1World", ".", "getBlockId", "(", "k", ",", "k1", ",", "l", ")", ";", "if", "(", "l1", "==", "Block", ".", "dirt", ".", "blockID", "||", "l1", "==", "Block", ".", "blockClay", ".", "blockID", ")", "{", "par1World", ".", "setBlock", "(", "k", ",", "k1", ",", "l", ",", "clayBlockId", ")", ";", "}", "}", "}", "}", "return", "true", ";", "}", "}", "</s>" ]
9,806
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "Random", ";", "public", "class", "ItemBow", "extends", "Item", "{", "public", "ItemBow", "(", "int", "par1", ")", "{", "super", "(", "par1", ")", ";", "maxStackSize", "=", "1", ";", "setMaxDamage", "(", "384", ")", ";", "}", "public", "void", "onPlayerStoppedUsing", "(", "ItemStack", "par1ItemStack", ",", "World", "par2World", ",", "EntityPlayer", "par3EntityPlayer", ",", "int", "par4", ")", "{", "boolean", "flag", "=", "par3EntityPlayer", ".", "capabilities", ".", "isCreativeMode", "||", "EnchantmentHelper", ".", "getEnchantmentLevel", "(", "Enchantment", ".", "infinity", ".", "effectId", ",", "par1ItemStack", ")", ">", "0", ";", "if", "(", "flag", "||", "par3EntityPlayer", ".", "inventory", ".", "hasItem", "(", "Item", ".", "arrow", ".", "shiftedIndex", ")", ")", "{", "int", "i", "=", "getMaxItemUseDuration", "(", "par1ItemStack", ")", "-", "par4", ";", "float", "f", "=", "(", "float", ")", "i", "/", "20F", ";", "f", "=", "(", "f", "*", "f", "+", "f", "*", "2.0F", ")", "/", "3F", ";", "if", "(", "(", "double", ")", "f", "<", "0.10000000000000001D", ")", "{", "return", ";", "}", "if", "(", "f", ">", "1.0F", ")", "{", "f", "=", "1.0F", ";", "}", "EntityArrow", "entityarrow", "=", "new", "EntityArrow", "(", "par2World", ",", "par3EntityPlayer", ",", "f", "*", "2.0F", ")", ";", "if", "(", "f", "==", "1.0F", ")", "{", "entityarrow", ".", "arrowCritical", "=", "true", ";", "}", "int", "j", "=", "EnchantmentHelper", ".", "getEnchantmentLevel", "(", "Enchantment", ".", "power", ".", "effectId", ",", "par1ItemStack", ")", ";", "if", "(", "j", ">", "0", ")", "{", "entityarrow", ".", "setDamage", "(", "entityarrow", ".", "getDamage", "(", ")", "+", "(", "double", ")", "j", "*", "0.5D", "+", "0.5D", ")", ";", "}", "int", "k", "=", "EnchantmentHelper", ".", "getEnchantmentLevel", "(", "Enchantment", ".", "punch", ".", "effectId", ",", "par1ItemStack", ")", ";", "if", "(", "k", ">", "0", ")", "{", "entityarrow", ".", "func_46007_b", "(", "k", ")", ";", "}", "if", "(", "EnchantmentHelper", ".", "getEnchantmentLevel", "(", "Enchantment", ".", "flame", ".", "effectId", ",", "par1ItemStack", ")", ">", "0", ")", "{", "entityarrow", ".", "setFire", "(", "100", ")", ";", "}", "par1ItemStack", ".", "damageItem", "(", "1", ",", "par3EntityPlayer", ")", ";", "par2World", ".", "playSoundAtEntity", "(", "par3EntityPlayer", ",", "\"random.bow\"", ",", "1.0F", ",", "1.0F", "/", "(", "itemRand", ".", "nextFloat", "(", ")", "*", "0.4F", "+", "1.2F", ")", "+", "f", "*", "0.5F", ")", ";", "if", "(", "!", "flag", ")", "{", "par3EntityPlayer", ".", "inventory", ".", "consumeInventoryItem", "(", "Item", ".", "arrow", ".", "shiftedIndex", ")", ";", "}", "else", "{", "entityarrow", ".", "doesArrowBelongToPlayer", "=", "false", ";", "}", "if", "(", "!", "par2World", ".", "isRemote", ")", "{", "par2World", ".", "spawnEntityInWorld", "(", "entityarrow", ")", ";", "}", "}", "}", "public", "ItemStack", "onFoodEaten", "(", "ItemStack", "par1ItemStack", ",", "World", "par2World", ",", "EntityPlayer", "par3EntityPlayer", ")", "{", "return", "par1ItemStack", ";", "}", "public", "int", "getMaxItemUseDuration", "(", "ItemStack", "par1ItemStack", ")", "{", "return", "0x11940", ";", "}", "public", "EnumAction", "getItemUseAction", "(", "ItemStack", "par1ItemStack", ")", "{", "return", "EnumAction", ".", "bow", ";", "}", "public", "ItemStack", "onItemRightClick", "(", "ItemStack", "par1ItemStack", ",", "World", "par2World", ",", "EntityPlayer", "par3EntityPlayer", ")", "{", "if", "(", "par3EntityPlayer", ".", "capabilities", ".", "isCreativeMode", "||", "par3EntityPlayer", ".", "inventory", ".", "hasItem", "(", "Item", ".", "arrow", ".", "shiftedIndex", ")", ")", "{", "par3EntityPlayer", ".", "setItemInUse", "(", "par1ItemStack", ",", "getMaxItemUseDuration", "(", "par1ItemStack", ")", ")", ";", "}", "return", "par1ItemStack", ";", "}", "public", "int", "getItemEnchantability", "(", ")", "{", "return", "1", ";", "}", "}", "</s>" ]
9,807
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "Comparator", ";", "class", "RecipeSorter", "implements", "Comparator", "{", "final", "CraftingManager", "craftingManager", ";", "RecipeSorter", "(", "CraftingManager", "par1CraftingManager", ")", "{", "craftingManager", "=", "par1CraftingManager", ";", "}", "public", "int", "compareRecipes", "(", "IRecipe", "par1IRecipe", ",", "IRecipe", "par2IRecipe", ")", "{", "if", "(", "(", "par1IRecipe", "instanceof", "ShapelessRecipes", ")", "&&", "(", "par2IRecipe", "instanceof", "ShapedRecipes", ")", ")", "{", "return", "1", ";", "}", "if", "(", "(", "par2IRecipe", "instanceof", "ShapelessRecipes", ")", "&&", "(", "par1IRecipe", "instanceof", "ShapedRecipes", ")", ")", "{", "return", "-", "1", ";", "}", "if", "(", "par2IRecipe", ".", "getRecipeSize", "(", ")", "<", "par1IRecipe", ".", "getRecipeSize", "(", ")", ")", "{", "return", "-", "1", ";", "}", "return", "par2IRecipe", ".", "getRecipeSize", "(", ")", "<=", "par1IRecipe", ".", "getRecipeSize", "(", ")", "?", "0", ":", "1", ";", "}", "public", "int", "compare", "(", "Object", "par1Obj", ",", "Object", "par2Obj", ")", "{", "return", "compareRecipes", "(", "(", "IRecipe", ")", "par1Obj", ",", "(", "IRecipe", ")", "par2Obj", ")", ";", "}", "}", "</s>" ]
9,808
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "awt", ".", "*", ";", "import", "java", ".", "text", ".", "DecimalFormat", ";", "import", "javax", ".", "swing", ".", "JComponent", ";", "import", "javax", ".", "swing", ".", "Timer", ";", "import", "net", ".", "minecraft", ".", "server", ".", "MinecraftServer", ";", "public", "class", "GuiStatsComponent", "extends", "JComponent", "{", "private", "static", "final", "DecimalFormat", "field_40573_a", "=", "new", "DecimalFormat", "(", "\"\"", ")", ";", "private", "int", "memoryUse", "[", "]", ";", "private", "int", "updateCounter", ";", "private", "String", "displayStrings", "[", "]", ";", "private", "final", "MinecraftServer", "field_40572_e", ";", "public", "GuiStatsComponent", "(", "MinecraftServer", "par1MinecraftServer", ")", "{", "memoryUse", "=", "new", "int", "[", "256", "]", ";", "updateCounter", "=", "0", ";", "displayStrings", "=", "new", "String", "[", "10", "]", ";", "field_40572_e", "=", "par1MinecraftServer", ";", "setPreferredSize", "(", "new", "Dimension", "(", "356", ",", "246", ")", ")", ";", "setMinimumSize", "(", "new", "Dimension", "(", "356", ",", "246", ")", ")", ";", "setMaximumSize", "(", "new", "Dimension", "(", "356", ",", "246", ")", ")", ";", "(", "new", "Timer", "(", "500", ",", "new", "GuiStatsListener", "(", "this", ")", ")", ")", ".", "start", "(", ")", ";", "setBackground", "(", "Color", ".", "BLACK", ")", ";", "}", "private", "void", "updateStats", "(", ")", "{", "int", "i", ";", "long", "l", "=", "Runtime", ".", "getRuntime", "(", ")", ".", "totalMemory", "(", ")", "-", "Runtime", ".", "getRuntime", "(", ")", ".", "freeMemory", "(", ")", ";", "System", ".", "gc", "(", ")", ";", "displayStrings", "[", "0", "]", "=", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "\"Memory", "use:", "\"", ")", ".", "append", "(", "l", "/", "1024L", "/", "1024L", ")", ".", "append", "(", "\"", "mb", "(\"", ")", ".", "append", "(", "(", "Runtime", ".", "getRuntime", "(", ")", ".", "freeMemory", "(", ")", "*", "100L", ")", "/", "Runtime", ".", "getRuntime", "(", ")", ".", "maxMemory", "(", ")", ")", ".", "append", "(", "\"%", "free)\"", ")", ".", "toString", "(", ")", ";", "displayStrings", "[", "1", "]", "=", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "\"Threads:", "\"", ")", ".", "append", "(", "NetworkManager", ".", "numReadThreads", ")", ".", "append", "(", "\"", "+", "\"", ")", ".", "append", "(", "NetworkManager", ".", "numWriteThreads", ")", ".", "toString", "(", ")", ";", "displayStrings", "[", "2", "]", "=", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "\"Avg", "tick:", "\"", ")", ".", "append", "(", "field_40573_a", ".", "format", "(", "func_48551_a", "(", "field_40572_e", ".", "field_40027_f", ")", "*", "9.9999999999999995E-007D", ")", ")", ".", "append", "(", "\"", "ms\"", ")", ".", "toString", "(", ")", ";", "displayStrings", "[", "3", "]", "=", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "\"Avg", "sent:", "\"", ")", ".", "append", "(", "(", "int", ")", "func_48551_a", "(", "field_40572_e", ".", "field_48080_u", ")", ")", ".", "append", "(", "\",", "Avg", "size:", "\"", ")", ".", "append", "(", "(", "int", ")", "func_48551_a", "(", "field_40572_e", ".", "field_48079_v", ")", ")", ".", "toString", "(", ")", ";", "displayStrings", "[", "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", "(", "this", ".", "field_40572_e", ".", "worldMngr", "!=", "null", ")", "{", "for", "(", "int", "var3", "=", "0", ";", "var3", "<", "this", ".", "field_40572_e", ".", "worldMngr", ".", "length", ";", "++", "var3", ")", "{", "this", ".", "displayStrings", "[", "5", "+", "var3", "]", "=", "\"Lvl", "\"", "+", "var3", "+", "\"", "tick:", "\"", "+", "field_40573_a", ".", "format", "(", "this", ".", "func_48551_a", "(", "this", ".", "field_40572_e", ".", "field_40028_g", "[", "var3", "]", ")", "*", "1.0E-6D", ")", "+", "\"", "ms\"", ";", "if", "(", "this", ".", "field_40572_e", ".", "worldMngr", "[", "var3", "]", "!=", "null", "&&", "this", ".", "field_40572_e", ".", "worldMngr", "[", "var3", "]", ".", "chunkProviderServer", "!=", "null", ")", "{", "this", ".", "displayStrings", "[", "5", "+", "var3", "]", "=", "this", ".", "displayStrings", "[", "5", "+", "var3", "]", "+", "\",", "\"", "+", "this", ".", "field_40572_e", ".", "worldMngr", "[", "var3", "]", ".", "chunkProviderServer", ".", "func_46040_d", "(", ")", ";", "}", "}", "}", "memoryUse", "[", "updateCounter", "++", "&", "0xff", "]", "=", "(", "int", ")", "(", "(", "func_48551_a", "(", "field_40572_e", ".", "field_48079_v", ")", "*", "100D", ")", "/", "12500D", ")", ";", "repaint", "(", ")", ";", "return", ";", "}", "private", "double", "func_48551_a", "(", "long", "par1ArrayOfLong", "[", "]", ")", "{", "long", "l", "=", "0L", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "par1ArrayOfLong", ".", "length", ";", "i", "++", ")", "{", "l", "+=", "par1ArrayOfLong", "[", "i", "]", ";", "}", "return", "(", "double", ")", "l", "/", "(", "double", ")", "par1ArrayOfLong", ".", "length", ";", "}", "public", "void", "paint", "(", "Graphics", "par1Graphics", ")", "{", "par1Graphics", ".", "setColor", "(", "new", "Color", "(", "0xffffff", ")", ")", ";", "par1Graphics", ".", "fillRect", "(", "0", ",", "0", ",", "356", ",", "246", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "256", ";", "i", "++", ")", "{", "int", "k", "=", "memoryUse", "[", "i", "+", "updateCounter", "&", "0xff", "]", ";", "par1Graphics", ".", "setColor", "(", "new", "Color", "(", "k", "+", "28", "<<", "16", ")", ")", ";", "par1Graphics", ".", "fillRect", "(", "i", ",", "100", "-", "k", ",", "1", ",", "k", ")", ";", "}", "par1Graphics", ".", "setColor", "(", "Color", ".", "BLACK", ")", ";", "for", "(", "int", "j", "=", "0", ";", "j", "<", "displayStrings", ".", "length", ";", "j", "++", ")", "{", "String", "s", "=", "displayStrings", "[", "j", "]", ";", "if", "(", "s", "!=", "null", ")", "{", "par1Graphics", ".", "drawString", "(", "s", ",", "32", ",", "116", "+", "j", "*", "16", ")", ";", "}", "}", "}", "static", "void", "update", "(", "GuiStatsComponent", "par0GuiStatsComponent", ")", "{", "par0GuiStatsComponent", ".", "updateStats", "(", ")", ";", "}", "}", "</s>" ]
9,809
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "*", ";", "public", "class", "EntityAIMate", "extends", "EntityAIBase", "{", "private", "EntityAnimal", "theAnimal", ";", "World", "theWorld", ";", "private", "EntityAnimal", "targetMate", ";", "int", "field_48201_b", ";", "float", "field_48202_c", ";", "public", "EntityAIMate", "(", "EntityAnimal", "par1EntityAnimal", ",", "float", "par2", ")", "{", "field_48201_b", "=", "0", ";", "theAnimal", "=", "par1EntityAnimal", ";", "theWorld", "=", "par1EntityAnimal", ".", "worldObj", ";", "field_48202_c", "=", "par2", ";", "setMutexBits", "(", "3", ")", ";", "}", "public", "boolean", "shouldExecute", "(", ")", "{", "if", "(", "!", "theAnimal", ".", "isInLove", "(", ")", ")", "{", "return", "false", ";", "}", "else", "{", "targetMate", "=", "func_48198_f", "(", ")", ";", "return", "targetMate", "!=", "null", ";", "}", "}", "public", "boolean", "continueExecuting", "(", ")", "{", "return", "targetMate", ".", "isEntityAlive", "(", ")", "&&", "targetMate", ".", "isInLove", "(", ")", "&&", "field_48201_b", "<", "60", ";", "}", "public", "void", "resetTask", "(", ")", "{", "targetMate", "=", "null", ";", "field_48201_b", "=", "0", ";", "}", "public", "void", "updateTask", "(", ")", "{", "theAnimal", ".", "getLookHelper", "(", ")", ".", "setLookPositionWithEntity", "(", "targetMate", ",", "10F", ",", "theAnimal", ".", "getVerticalFaceSpeed", "(", ")", ")", ";", "theAnimal", ".", "getNavigator", "(", ")", ".", "func_48652_a", "(", "targetMate", ",", "field_48202_c", ")", ";", "field_48201_b", "++", ";", "if", "(", "field_48201_b", "==", "60", ")", "{", "func_48197_i", "(", ")", ";", "}", "}", "private", "EntityAnimal", "func_48198_f", "(", ")", "{", "float", "f", "=", "8F", ";", "List", "list", "=", "theWorld", ".", "getEntitiesWithinAABB", "(", "theAnimal", ".", "getClass", "(", ")", ",", "theAnimal", ".", "boundingBox", ".", "expand", "(", "f", ",", "f", ",", "f", ")", ")", ";", "for", "(", "Iterator", "iterator", "=", "list", ".", "iterator", "(", ")", ";", "iterator", ".", "hasNext", "(", ")", ";", ")", "{", "Entity", "entity", "=", "(", "Entity", ")", "iterator", ".", "next", "(", ")", ";", "EntityAnimal", "entityanimal", "=", "(", "EntityAnimal", ")", "entity", ";", "if", "(", "theAnimal", ".", "func_48362_b", "(", "entityanimal", ")", ")", "{", "return", "entityanimal", ";", "}", "}", "return", "null", ";", "}", "private", "void", "func_48197_i", "(", ")", "{", "EntityAnimal", "entityanimal", "=", "theAnimal", ".", "spawnBabyAnimal", "(", "targetMate", ")", ";", "if", "(", "entityanimal", "==", "null", ")", "{", "return", ";", "}", "theAnimal", ".", "setGrowingAge", "(", "6000", ")", ";", "targetMate", ".", "setGrowingAge", "(", "6000", ")", ";", "theAnimal", ".", "resetInLove", "(", ")", ";", "targetMate", ".", "resetInLove", "(", ")", ";", "entityanimal", ".", "setGrowingAge", "(", "-", "24000", ")", ";", "entityanimal", ".", "setLocationAndAngles", "(", "theAnimal", ".", "posX", ",", "theAnimal", ".", "posY", ",", "theAnimal", ".", "posZ", ",", "0.0F", ",", "0.0F", ")", ";", "theWorld", ".", "spawnEntityInWorld", "(", "entityanimal", ")", ";", "Random", "random", "=", "theAnimal", ".", "getRNG", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "7", ";", "i", "++", ")", "{", "double", "d", "=", "random", ".", "nextGaussian", "(", ")", "*", "0.02D", ";", "double", "d1", "=", "random", ".", "nextGaussian", "(", ")", "*", "0.02D", ";", "double", "d2", "=", "random", ".", "nextGaussian", "(", ")", "*", "0.02D", ";", "theWorld", ".", "spawnParticle", "(", "\"heart\"", ",", "(", "theAnimal", ".", "posX", "+", "(", "double", ")", "(", "random", ".", "nextFloat", "(", ")", "*", "theAnimal", ".", "width", "*", "2.0F", ")", ")", "-", "(", "double", ")", "theAnimal", ".", "width", ",", "theAnimal", ".", "posY", "+", "0.5D", "+", "(", "double", ")", "(", "random", ".", "nextFloat", "(", ")", "*", "theAnimal", ".", "height", ")", ",", "(", "theAnimal", ".", "posZ", "+", "(", "double", ")", "(", "random", ".", "nextFloat", "(", ")", "*", "theAnimal", ".", "width", "*", "2.0F", ")", ")", "-", "(", "double", ")", "theAnimal", ".", "width", ",", "d", ",", "d1", ",", "d2", ")", ";", "}", "}", "}", "</s>" ]
9,810
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "public", "class", "EntityDamageSource", "extends", "DamageSource", "{", "protected", "Entity", "damageSourceEntity", ";", "public", "EntityDamageSource", "(", "String", "par1Str", ",", "Entity", "par2Entity", ")", "{", "super", "(", "par1Str", ")", ";", "damageSourceEntity", "=", "par2Entity", ";", "}", "public", "Entity", "getEntity", "(", ")", "{", "return", "damageSourceEntity", ";", "}", "public", "String", "getDeathMessage", "(", "EntityPlayer", "par1EntityPlayer", ")", "{", "return", "StatCollector", ".", "translateToLocalFormatted", "(", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "\"death.\"", ")", ".", "append", "(", "damageType", ")", ".", "toString", "(", ")", ",", "new", "Object", "[", "]", "{", "par1EntityPlayer", ".", "username", ",", "damageSourceEntity", ".", "getUsername", "(", ")", "}", ")", ";", "}", "}", "</s>" ]
9,811
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "io", ".", "*", ";", "import", "net", ".", "minecraft", ".", "server", ".", "MinecraftServer", ";", "public", "class", "ThreadCommandReader", "extends", "Thread", "{", "final", "MinecraftServer", "mcServer", ";", "public", "ThreadCommandReader", "(", "MinecraftServer", "par1MinecraftServer", ")", "{", "mcServer", "=", "par1MinecraftServer", ";", "}", "public", "void", "run", "(", ")", "{", "BufferedReader", "bufferedreader", "=", "new", "BufferedReader", "(", "new", "InputStreamReader", "(", "System", ".", "in", ")", ")", ";", "String", "s", "=", "null", ";", "try", "{", "while", "(", "!", "mcServer", ".", "serverStopped", "&&", "MinecraftServer", ".", "isServerRunning", "(", "mcServer", ")", "&&", "(", "s", "=", "bufferedreader", ".", "readLine", "(", ")", ")", "!=", "null", ")", "{", "mcServer", ".", "addCommand", "(", "s", ",", "mcServer", ")", ";", "}", "}", "catch", "(", "IOException", "ioexception", ")", "{", "ioexception", ".", "printStackTrace", "(", ")", ";", "}", "}", "}", "</s>" ]
9,812
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "io", ".", "IOException", ";", "import", "java", ".", "net", ".", "*", ";", "import", "java", ".", "util", ".", "ArrayList", ";", "import", "java", ".", "util", ".", "HashMap", ";", "import", "java", ".", "util", ".", "logging", ".", "Level", ";", "import", "java", ".", "util", ".", "logging", ".", "Logger", ";", "import", "net", ".", "minecraft", ".", "server", ".", "MinecraftServer", ";", "public", "class", "NetworkListenThread", "{", "public", "static", "Logger", "logger", "=", "Logger", ".", "getLogger", "(", "\"Minecraft\"", ")", ";", "private", "ServerSocket", "serverSocket", ";", "private", "Thread", "networkAcceptThread", ";", "public", "volatile", "boolean", "isListening", ";", "private", "int", "field_977_f", ";", "private", "ArrayList", "pendingConnections", ";", "private", "ArrayList", "playerList", ";", "public", "MinecraftServer", "mcServer", ";", "private", "HashMap", "field_35506_i", ";", "public", "NetworkListenThread", "(", "MinecraftServer", "par1MinecraftServer", ",", "InetAddress", "par2InetAddress", ",", "int", "par3", ")", "throws", "IOException", "{", "isListening", "=", "false", ";", "field_977_f", "=", "0", ";", "pendingConnections", "=", "new", "ArrayList", "(", ")", ";", "playerList", "=", "new", "ArrayList", "(", ")", ";", "field_35506_i", "=", "new", "HashMap", "(", ")", ";", "mcServer", "=", "par1MinecraftServer", ";", "serverSocket", "=", "new", "ServerSocket", "(", "par3", ",", "0", ",", "par2InetAddress", ")", ";", "serverSocket", ".", "setPerformancePreferences", "(", "0", ",", "2", ",", "1", ")", ";", "isListening", "=", "true", ";", "networkAcceptThread", "=", "new", "NetworkAcceptThread", "(", "this", ",", "\"\"", ",", "par1MinecraftServer", ")", ";", "networkAcceptThread", ".", "start", "(", ")", ";", "}", "public", "void", "func_35505_a", "(", "Socket", "par1Socket", ")", "{", "InetAddress", "inetaddress", "=", "par1Socket", ".", "getInetAddress", "(", ")", ";", "synchronized", "(", "field_35506_i", ")", "{", "field_35506_i", ".", "remove", "(", "inetaddress", ")", ";", "}", "}", "public", "void", "addPlayer", "(", "NetServerHandler", "par1NetServerHandler", ")", "{", "playerList", ".", "add", "(", "par1NetServerHandler", ")", ";", "}", "private", "void", "addPendingConnection", "(", "NetLoginHandler", "par1NetLoginHandler", ")", "{", "if", "(", "par1NetLoginHandler", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"\"", ")", ";", "}", "else", "{", "pendingConnections", ".", "add", "(", "par1NetLoginHandler", ")", ";", "return", ";", "}", "}", "public", "void", "handleNetworkListenThread", "(", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "pendingConnections", ".", "size", "(", ")", ";", "i", "++", ")", "{", "NetLoginHandler", "netloginhandler", "=", "(", "NetLoginHandler", ")", "pendingConnections", ".", "get", "(", "i", ")", ";", "try", "{", "netloginhandler", ".", "tryLogin", "(", ")", ";", "}", "catch", "(", "Exception", "exception", ")", "{", "netloginhandler", ".", "kickUser", "(", "\"\"", ")", ";", "logger", ".", "log", "(", "Level", ".", "WARNING", ",", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "\"\"", ")", ".", "append", "(", "exception", ")", ".", "toString", "(", ")", ",", "exception", ")", ";", "}", "if", "(", "netloginhandler", ".", "finishedProcessing", ")", "{", "pendingConnections", ".", "remove", "(", "i", "--", ")", ";", "}", "netloginhandler", ".", "netManager", ".", "wakeThreads", "(", ")", ";", "}", "for", "(", "int", "j", "=", "0", ";", "j", "<", "playerList", ".", "size", "(", ")", ";", "j", "++", ")", "{", "NetServerHandler", "netserverhandler", "=", "(", "NetServerHandler", ")", "playerList", ".", "get", "(", "j", ")", ";", "try", "{", "netserverhandler", ".", "handlePackets", "(", ")", ";", "}", "catch", "(", "Exception", "exception1", ")", "{", "logger", ".", "log", "(", "Level", ".", "WARNING", ",", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "\"\"", ")", ".", "append", "(", "exception1", ")", ".", "toString", "(", ")", ",", "exception1", ")", ";", "netserverhandler", ".", "kickPlayer", "(", "\"\"", ")", ";", "}", "if", "(", "netserverhandler", ".", "connectionClosed", ")", "{", "playerList", ".", "remove", "(", "j", "--", ")", ";", "}", "netserverhandler", ".", "netManager", ".", "wakeThreads", "(", ")", ";", "}", "}", "static", "ServerSocket", "getServerSocket", "(", "NetworkListenThread", "par0NetworkListenThread", ")", "{", "return", "par0NetworkListenThread", ".", "serverSocket", ";", "}", "static", "HashMap", "func_35504_b", "(", "NetworkListenThread", "par0NetworkListenThread", ")", "{", "return", "par0NetworkListenThread", ".", "field_35506_i", ";", "}", "static", "int", "func_712_b", "(", "NetworkListenThread", "par0NetworkListenThread", ")", "{", "return", "par0NetworkListenThread", ".", "field_977_f", "++", ";", "}", "static", "void", "func_716_a", "(", "NetworkListenThread", "par0NetworkListenThread", ",", "NetLoginHandler", "par1NetLoginHandler", ")", "{", "par0NetworkListenThread", ".", "addPendingConnection", "(", "par1NetLoginHandler", ")", ";", "}", "}", "</s>" ]
9,813
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "io", ".", "IOException", ";", "import", "java", ".", "net", ".", "Socket", ";", "import", "java", ".", "util", ".", "*", ";", "import", "java", ".", "util", ".", "logging", ".", "Logger", ";", "import", "net", ".", "minecraft", ".", "server", ".", "MinecraftServer", ";", "public", "class", "NetLoginHandler", "extends", "NetHandler", "{", "public", "static", "Logger", "logger", "=", "Logger", ".", "getLogger", "(", "\"Minecraft\"", ")", ";", "private", "static", "Random", "rand", "=", "new", "Random", "(", ")", ";", "public", "NetworkManager", "netManager", ";", "public", "boolean", "finishedProcessing", ";", "private", "MinecraftServer", "mcServer", ";", "private", "int", "loginTimer", ";", "private", "String", "username", ";", "private", "Packet1Login", "packet1login", ";", "private", "String", "serverId", ";", "public", "NetLoginHandler", "(", "MinecraftServer", "par1MinecraftServer", ",", "Socket", "par2Socket", ",", "String", "par3Str", ")", "throws", "IOException", "{", "finishedProcessing", "=", "false", ";", "loginTimer", "=", "0", ";", "username", "=", "null", ";", "packet1login", "=", "null", ";", "serverId", "=", "\"\"", ";", "mcServer", "=", "par1MinecraftServer", ";", "netManager", "=", "new", "NetworkManager", "(", "par2Socket", ",", "par3Str", ",", "this", ")", ";", "netManager", ".", "chunkDataSendCounter", "=", "0", ";", "}", "public", "void", "tryLogin", "(", ")", "{", "if", "(", "packet1login", "!=", "null", ")", "{", "doLogin", "(", "packet1login", ")", ";", "packet1login", "=", "null", ";", "}", "if", "(", "loginTimer", "++", "==", "600", ")", "{", "kickUser", "(", "\"\"", ")", ";", "}", "else", "{", "netManager", ".", "processReadPackets", "(", ")", ";", "}", "}", "public", "void", "kickUser", "(", "String", "par1Str", ")", "{", "try", "{", "logger", ".", "info", "(", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "\"\"", ")", ".", "append", "(", "getUserAndIPString", "(", ")", ")", ".", "append", "(", "\":", "\"", ")", ".", "append", "(", "par1Str", ")", ".", "toString", "(", ")", ")", ";", "netManager", ".", "addToSendQueue", "(", "new", "Packet255KickDisconnect", "(", "par1Str", ")", ")", ";", "netManager", ".", "serverShutdown", "(", ")", ";", "finishedProcessing", "=", "true", ";", "}", "catch", "(", "Exception", "exception", ")", "{", "exception", ".", "printStackTrace", "(", ")", ";", "}", "}", "public", "void", "handleHandshake", "(", "Packet2Handshake", "par1Packet2Handshake", ")", "{", "if", "(", "mcServer", ".", "onlineMode", ")", "{", "serverId", "=", "Long", ".", "toString", "(", "rand", ".", "nextLong", "(", ")", ",", "16", ")", ";", "netManager", ".", "addToSendQueue", "(", "new", "Packet2Handshake", "(", "serverId", ")", ")", ";", "}", "else", "{", "netManager", ".", "addToSendQueue", "(", "new", "Packet2Handshake", "(", "\"-\"", ")", ")", ";", "}", "}", "public", "void", "handleLogin", "(", "Packet1Login", "par1Packet1Login", ")", "{", "username", "=", "par1Packet1Login", ".", "username", ";", "if", "(", "par1Packet1Login", ".", "protocolVersion", "!=", "29", ")", "{", "if", "(", "par1Packet1Login", ".", "protocolVersion", ">", "29", ")", "{", "kickUser", "(", "\"\"", ")", ";", "}", "else", "{", "kickUser", "(", "\"\"", ")", ";", "}", "return", ";", "}", "if", "(", "!", "mcServer", ".", "onlineMode", ")", "{", "doLogin", "(", "par1Packet1Login", ")", ";", "}", "else", "{", "(", "new", "ThreadLoginVerifier", "(", "this", ",", "par1Packet1Login", ")", ")", ".", "start", "(", ")", ";", "}", "}", "public", "void", "doLogin", "(", "Packet1Login", "par1Packet1Login", ")", "{", "EntityPlayerMP", "entityplayermp", "=", "mcServer", ".", "configManager", ".", "login", "(", "this", ",", "par1Packet1Login", ".", "username", ")", ";", "if", "(", "entityplayermp", "!=", "null", ")", "{", "mcServer", ".", "configManager", ".", "readPlayerDataFromFile", "(", "entityplayermp", ")", ";", "entityplayermp", ".", "setWorld", "(", "mcServer", ".", "getWorldManager", "(", "entityplayermp", ".", "dimension", ")", ")", ";", "entityplayermp", ".", "itemInWorldManager", ".", "setWorld", "(", "(", "WorldServer", ")", "entityplayermp", ".", "worldObj", ")", ";", "logger", ".", "info", "(", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "getUserAndIPString", "(", ")", ")", ".", "append", "(", "\"\"", ")", ".", "append", "(", "entityplayermp", ".", "entityId", ")", ".", "append", "(", "\"", "at", "(\"", ")", ".", "append", "(", "entityplayermp", ".", "posX", ")", ".", "append", "(", "\",", "\"", ")", ".", "append", "(", "entityplayermp", ".", "posY", ")", ".", "append", "(", "\",", "\"", ")", ".", "append", "(", "entityplayermp", ".", "posZ", ")", ".", "append", "(", "\")\"", ")", ".", "toString", "(", ")", ")", ";", "WorldServer", "worldserver", "=", "mcServer", ".", "getWorldManager", "(", "entityplayermp", ".", "dimension", ")", ";", "ChunkCoordinates", "chunkcoordinates", "=", "worldserver", ".", "getSpawnPoint", "(", ")", ";", "entityplayermp", ".", "itemInWorldManager", ".", "func_35695_b", "(", "worldserver", ".", "getWorldInfo", "(", ")", ".", "getGameType", "(", ")", ")", ";", "NetServerHandler", "netserverhandler", "=", "new", "NetServerHandler", "(", "mcServer", ",", "netManager", ",", "entityplayermp", ")", ";", "netserverhandler", ".", "sendPacket", "(", "new", "Packet1Login", "(", "\"\"", ",", "entityplayermp", ".", "entityId", ",", "worldserver", ".", "getWorldInfo", "(", ")", ".", "getTerrainType", "(", ")", ",", "entityplayermp", ".", "itemInWorldManager", ".", "getGameType", "(", ")", ",", "worldserver", ".", "worldProvider", ".", "worldType", ",", "(", "byte", ")", "worldserver", ".", "difficultySetting", ",", "(", "byte", ")", "worldserver", ".", "getHeight", "(", ")", ",", "(", "byte", ")", "mcServer", ".", "configManager", ".", "getMaxPlayers", "(", ")", ")", ")", ";", "netserverhandler", ".", "sendPacket", "(", "new", "Packet6SpawnPosition", "(", "chunkcoordinates", ".", "posX", ",", "chunkcoordinates", ".", "posY", ",", "chunkcoordinates", ".", "posZ", ")", ")", ";", "netserverhandler", ".", "sendPacket", "(", "new", "Packet202PlayerAbilities", "(", "entityplayermp", ".", "capabilities", ")", ")", ";", "mcServer", ".", "configManager", ".", "func_28170_a", "(", "entityplayermp", ",", "worldserver", ")", ";", "mcServer", ".", "configManager", ".", "sendPacketToAllPlayers", "(", "new", "Packet3Chat", "(", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "\"-UNK-e\"", ")", ".", "append", "(", "entityplayermp", ".", "username", ")", ".", "append", "(", "\"\"", ")", ".", "toString", "(", ")", ")", ")", ";", "mcServer", ".", "configManager", ".", "playerLoggedIn", "(", "entityplayermp", ")", ";", "netserverhandler", ".", "teleportTo", "(", "entityplayermp", ".", "posX", ",", "entityplayermp", ".", "posY", ",", "entityplayermp", ".", "posZ", ",", "entityplayermp", ".", "rotationYaw", ",", "entityplayermp", ".", "rotationPitch", ")", ";", "mcServer", ".", "networkServer", ".", "addPlayer", "(", "netserverhandler", ")", ";", "netserverhandler", ".", "sendPacket", "(", "new", "Packet4UpdateTime", "(", "worldserver", ".", "getWorldTime", "(", ")", ")", ")", ";", "PotionEffect", "potioneffect", ";", "for", "(", "Iterator", "iterator", "=", "entityplayermp", ".", "getActivePotionEffects", "(", ")", ".", "iterator", "(", ")", ";", "iterator", ".", "hasNext", "(", ")", ";", "netserverhandler", ".", "sendPacket", "(", "new", "Packet41EntityEffect", "(", "entityplayermp", ".", "entityId", ",", "potioneffect", ")", ")", ")", "{", "potioneffect", "=", "(", "PotionEffect", ")", "iterator", ".", "next", "(", ")", ";", "}", "entityplayermp", ".", "func_20057_k", "(", ")", ";", "}", "finishedProcessing", "=", "true", ";", "}", "public", "void", "handleErrorMessage", "(", "String", "par1Str", ",", "Object", "par2ArrayOfObj", "[", "]", ")", "{", "logger", ".", "info", "(", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "getUserAndIPString", "(", ")", ")", ".", "append", "(", "\"\"", ")", ".", "toString", "(", ")", ")", ";", "finishedProcessing", "=", "true", ";", "}", "public", "void", "handleServerPing", "(", "Packet254ServerPing", "par1Packet254ServerPing", ")", "{", "try", "{", "String", "s", "=", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "mcServer", ".", "motd", ")", ".", "append", "(", "\"-UNK-\"", ")", ".", "append", "(", "mcServer", ".", "configManager", ".", "playersOnline", "(", ")", ")", ".", "append", "(", "\"-UNK-\"", ")", ".", "append", "(", "mcServer", ".", "configManager", ".", "getMaxPlayers", "(", ")", ")", ".", "toString", "(", ")", ";", "netManager", ".", "addToSendQueue", "(", "new", "Packet255KickDisconnect", "(", "s", ")", ")", ";", "netManager", ".", "serverShutdown", "(", ")", ";", "mcServer", ".", "networkServer", ".", "func_35505_a", "(", "netManager", ".", "getSocket", "(", ")", ")", ";", "finishedProcessing", "=", "true", ";", "}", "catch", "(", "Exception", "exception", ")", "{", "exception", ".", "printStackTrace", "(", ")", ";", "}", "}", "public", "void", "registerPacket", "(", "Packet", "par1Packet", ")", "{", "kickUser", "(", "\"\"", ")", ";", "}", "public", "String", "getUserAndIPString", "(", ")", "{", "if", "(", "username", "!=", "null", ")", "{", "return", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "username", ")", ".", "append", "(", "\"", "[\"", ")", ".", "append", "(", "netManager", ".", "getRemoteAddress", "(", ")", ".", "toString", "(", ")", ")", ".", "append", "(", "\"]\"", ")", ".", "toString", "(", ")", ";", "}", "else", "{", "return", "netManager", ".", "getRemoteAddress", "(", ")", ".", "toString", "(", ")", ";", "}", "}", "public", "boolean", "isServerHandler", "(", ")", "{", "return", "true", ";", "}", "static", "String", "getServerId", "(", "NetLoginHandler", "par0NetLoginHandler", ")", "{", "return", "par0NetLoginHandler", ".", "serverId", ";", "}", "static", "Packet1Login", "setLoginPacket", "(", "NetLoginHandler", "par0NetLoginHandler", ",", "Packet1Login", "par1Packet1Login", ")", "{", "return", "par0NetLoginHandler", ".", "packet1login", "=", "par1Packet1Login", ";", "}", "}", "</s>" ]
9,814
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "*", ";", "public", "class", "ComponentNetherBridgeStartPiece", "extends", "ComponentNetherBridgeCrossing3", "{", "public", "StructureNetherBridgePieceWeight", "field_40296_a", ";", "public", "List", "field_40294_b", ";", "public", "List", "field_40295_c", ";", "public", "ArrayList", "field_40293_d", ";", "public", "ComponentNetherBridgeStartPiece", "(", "Random", "par1Random", ",", "int", "par2", ",", "int", "par3", ")", "{", "super", "(", "par1Random", ",", "par2", ",", "par3", ")", ";", "field_40293_d", "=", "new", "ArrayList", "(", ")", ";", "field_40294_b", "=", "new", "ArrayList", "(", ")", ";", "StructureNetherBridgePieceWeight", "astructurenetherbridgepieceweight", "[", "]", "=", "StructureNetherBridgePieces", ".", "getPrimaryComponents", "(", ")", ";", "int", "i", "=", "astructurenetherbridgepieceweight", ".", "length", ";", "for", "(", "int", "j", "=", "0", ";", "j", "<", "i", ";", "j", "++", ")", "{", "StructureNetherBridgePieceWeight", "structurenetherbridgepieceweight", "=", "astructurenetherbridgepieceweight", "[", "j", "]", ";", "structurenetherbridgepieceweight", ".", "field_40654_c", "=", "0", ";", "field_40294_b", ".", "add", "(", "structurenetherbridgepieceweight", ")", ";", "}", "field_40295_c", "=", "new", "ArrayList", "(", ")", ";", "astructurenetherbridgepieceweight", "=", "StructureNetherBridgePieces", ".", "getSecondaryComponents", "(", ")", ";", "i", "=", "astructurenetherbridgepieceweight", ".", "length", ";", "for", "(", "int", "k", "=", "0", ";", "k", "<", "i", ";", "k", "++", ")", "{", "StructureNetherBridgePieceWeight", "structurenetherbridgepieceweight1", "=", "astructurenetherbridgepieceweight", "[", "k", "]", ";", "structurenetherbridgepieceweight1", ".", "field_40654_c", "=", "0", ";", "field_40295_c", ".", "add", "(", "structurenetherbridgepieceweight1", ")", ";", "}", "}", "}", "</s>" ]
9,815
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "public", "abstract", "class", "GenLayer", "{", "private", "long", "worldGenSeed", ";", "protected", "GenLayer", "parent", ";", "private", "long", "chunkSeed", ";", "private", "long", "baseSeed", ";", "public", "static", "GenLayer", "[", "]", "func_48391_a", "(", "long", "par0", ",", "WorldType", "par2WorldType", ")", "{", "GenLayer", "obj", "=", "new", "GenLayerIsland", "(", "1L", ")", ";", "obj", "=", "new", "GenLayerFuzzyZoom", "(", "2000L", ",", "(", "(", "GenLayer", ")", "(", "obj", ")", ")", ")", ";", "obj", "=", "new", "GenLayerAddIsland", "(", "1L", ",", "(", "(", "GenLayer", ")", "(", "obj", ")", ")", ")", ";", "obj", "=", "new", "GenLayerZoom", "(", "2001L", ",", "(", "(", "GenLayer", ")", "(", "obj", ")", ")", ")", ";", "obj", "=", "new", "GenLayerAddIsland", "(", "2L", ",", "(", "(", "GenLayer", ")", "(", "obj", ")", ")", ")", ";", "obj", "=", "new", "GenLayerAddSnow", "(", "2L", ",", "(", "(", "GenLayer", ")", "(", "obj", ")", ")", ")", ";", "obj", "=", "new", "GenLayerZoom", "(", "2002L", ",", "(", "(", "GenLayer", ")", "(", "obj", ")", ")", ")", ";", "obj", "=", "new", "GenLayerAddIsland", "(", "3L", ",", "(", "(", "GenLayer", ")", "(", "obj", ")", ")", ")", ";", "obj", "=", "new", "GenLayerZoom", "(", "2003L", ",", "(", "(", "GenLayer", ")", "(", "obj", ")", ")", ")", ";", "obj", "=", "new", "GenLayerAddIsland", "(", "4L", ",", "(", "(", "GenLayer", ")", "(", "obj", ")", ")", ")", ";", "obj", "=", "new", "GenLayerAddMushroomIsland", "(", "5L", ",", "(", "(", "GenLayer", ")", "(", "obj", ")", ")", ")", ";", "byte", "byte0", "=", "4", ";", "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", ")", ")", ")", ";", "GenLayer", "obj2", "=", "obj", ";", "obj2", "=", "GenLayerZoom", ".", "func_35025_a", "(", "1000L", ",", "(", "(", "GenLayer", ")", "(", "obj2", ")", ")", ",", "0", ")", ";", "obj2", "=", "new", "GenLayerBiome", "(", "200L", ",", "(", "(", "GenLayer", ")", "(", "obj2", ")", ")", ",", "par2WorldType", ")", ";", "obj2", "=", "GenLayerZoom", ".", "func_35025_a", "(", "1000L", ",", "(", "(", "GenLayer", ")", "(", "obj2", ")", ")", ",", "2", ")", ";", "obj2", "=", "new", "GenLayerHills", "(", "1000L", ",", "(", "(", "GenLayer", ")", "(", "obj2", ")", ")", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "byte0", ";", "i", "++", ")", "{", "obj2", "=", "new", "GenLayerZoom", "(", "1000", "+", "i", ",", "(", "(", "GenLayer", ")", "(", "obj2", ")", ")", ")", ";", "if", "(", "i", "==", "0", ")", "{", "obj2", "=", "new", "GenLayerAddIsland", "(", "3L", ",", "(", "(", "GenLayer", ")", "(", "obj2", ")", ")", ")", ";", "}", "if", "(", "i", "==", "1", ")", "{", "obj2", "=", "new", "GenLayerShore", "(", "1000L", ",", "(", "(", "GenLayer", ")", "(", "obj2", ")", ")", ")", ";", "}", "if", "(", "i", "==", "1", ")", "{", "obj2", "=", "new", "GenLayerSwampRivers", "(", "1000L", ",", "(", "(", "GenLayer", ")", "(", "obj2", ")", ")", ")", ";", "}", "}", "obj2", "=", "new", "GenLayerSmooth", "(", "1000L", ",", "(", "(", "GenLayer", ")", "(", "obj2", ")", ")", ")", ";", "obj2", "=", "new", "GenLayerRiverMix", "(", "100L", ",", "(", "(", "GenLayer", ")", "(", "obj2", ")", ")", ",", "(", "(", "GenLayer", ")", "(", "obj1", ")", ")", ")", ";", "GenLayerRiverMix", "genlayerrivermix", "=", "(", "(", "GenLayerRiverMix", ")", "(", "obj2", ")", ")", ";", "GenLayerVoronoiZoom", "genlayervoronoizoom", "=", "new", "GenLayerVoronoiZoom", "(", "10L", ",", "(", "(", "GenLayer", ")", "(", "obj2", ")", ")", ")", ";", "(", "(", "GenLayer", ")", "(", "obj2", ")", ")", ".", "initWorldGenSeed", "(", "par0", ")", ";", "genlayervoronoizoom", ".", "initWorldGenSeed", "(", "par0", ")", ";", "return", "(", "new", "GenLayer", "[", "]", "{", "obj2", ",", "genlayervoronoizoom", ",", "genlayerrivermix", "}", ")", ";", "}", "public", "GenLayer", "(", "long", "par1", ")", "{", "baseSeed", "=", "par1", ";", "baseSeed", "*=", "baseSeed", "*", "0x5851f42d4c957f2dL", "+", "0x14057b7ef767814fL", ";", "baseSeed", "+=", "par1", ";", "baseSeed", "*=", "baseSeed", "*", "0x5851f42d4c957f2dL", "+", "0x14057b7ef767814fL", ";", "baseSeed", "+=", "par1", ";", "baseSeed", "*=", "baseSeed", "*", "0x5851f42d4c957f2dL", "+", "0x14057b7ef767814fL", ";", "baseSeed", "+=", "par1", ";", "}", "public", "void", "initWorldGenSeed", "(", "long", "par1", ")", "{", "worldGenSeed", "=", "par1", ";", "if", "(", "parent", "!=", "null", ")", "{", "parent", ".", "initWorldGenSeed", "(", "par1", ")", ";", "}", "worldGenSeed", "*=", "worldGenSeed", "*", "0x5851f42d4c957f2dL", "+", "0x14057b7ef767814fL", ";", "worldGenSeed", "+=", "baseSeed", ";", "worldGenSeed", "*=", "worldGenSeed", "*", "0x5851f42d4c957f2dL", "+", "0x14057b7ef767814fL", ";", "worldGenSeed", "+=", "baseSeed", ";", "worldGenSeed", "*=", "worldGenSeed", "*", "0x5851f42d4c957f2dL", "+", "0x14057b7ef767814fL", ";", "worldGenSeed", "+=", "baseSeed", ";", "}", "public", "void", "initChunkSeed", "(", "long", "par1", ",", "long", "par3", ")", "{", "chunkSeed", "=", "worldGenSeed", ";", "chunkSeed", "*=", "chunkSeed", "*", "0x5851f42d4c957f2dL", "+", "0x14057b7ef767814fL", ";", "chunkSeed", "+=", "par1", ";", "chunkSeed", "*=", "chunkSeed", "*", "0x5851f42d4c957f2dL", "+", "0x14057b7ef767814fL", ";", "chunkSeed", "+=", "par3", ";", "chunkSeed", "*=", "chunkSeed", "*", "0x5851f42d4c957f2dL", "+", "0x14057b7ef767814fL", ";", "chunkSeed", "+=", "par1", ";", "chunkSeed", "*=", "chunkSeed", "*", "0x5851f42d4c957f2dL", "+", "0x14057b7ef767814fL", ";", "chunkSeed", "+=", "par3", ";", "}", "protected", "int", "nextInt", "(", "int", "par1", ")", "{", "int", "i", "=", "(", "int", ")", "(", "(", "chunkSeed", ">>", "24", ")", "%", "(", "long", ")", "par1", ")", ";", "if", "(", "i", "<", "0", ")", "{", "i", "+=", "par1", ";", "}", "chunkSeed", "*=", "chunkSeed", "*", "0x5851f42d4c957f2dL", "+", "0x14057b7ef767814fL", ";", "chunkSeed", "+=", "worldGenSeed", ";", "return", "i", ";", "}", "public", "abstract", "int", "[", "]", "getInts", "(", "int", "i", ",", "int", "j", ",", "int", "k", ",", "int", "l", ")", ";", "}", "</s>" ]
9,816
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "List", ";", "import", "java", ".", "util", ".", "Random", ";", "public", "class", "TileEntityMobSpawner", "extends", "TileEntity", "{", "public", "int", "delay", ";", "private", "String", "mobID", ";", "public", "double", "yaw", ";", "public", "double", "yaw2", ";", "public", "TileEntityMobSpawner", "(", ")", "{", "delay", "=", "-", "1", ";", "yaw2", "=", "0.0D", ";", "mobID", "=", "\"Pig\"", ";", "delay", "=", "20", ";", "}", "public", "void", "setMobID", "(", "String", "par1Str", ")", "{", "mobID", "=", "par1Str", ";", "}", "public", "boolean", "anyPlayerInRange", "(", ")", "{", "return", "worldObj", ".", "getClosestPlayer", "(", "(", "double", ")", "xCoord", "+", "0.5D", ",", "(", "double", ")", "yCoord", "+", "0.5D", ",", "(", "double", ")", "zCoord", "+", "0.5D", ",", "16D", ")", "!=", "null", ";", "}", "public", "void", "updateEntity", "(", ")", "{", "yaw2", "=", "yaw", ";", "if", "(", "!", "anyPlayerInRange", "(", ")", ")", "{", "return", ";", "}", "double", "d", "=", "(", "float", ")", "xCoord", "+", "worldObj", ".", "rand", ".", "nextFloat", "(", ")", ";", "double", "d1", "=", "(", "float", ")", "yCoord", "+", "worldObj", ".", "rand", ".", "nextFloat", "(", ")", ";", "double", "d2", "=", "(", "float", ")", "zCoord", "+", "worldObj", ".", "rand", ".", "nextFloat", "(", ")", ";", "worldObj", ".", "spawnParticle", "(", "\"smoke\"", ",", "d", ",", "d1", ",", "d2", ",", "0.0D", ",", "0.0D", ",", "0.0D", ")", ";", "worldObj", ".", "spawnParticle", "(", "\"flame\"", ",", "d", ",", "d1", ",", "d2", ",", "0.0D", ",", "0.0D", ",", "0.0D", ")", ";", "for", "(", "yaw", "+=", "1000F", "/", "(", "(", "float", ")", "delay", "+", "200F", ")", ";", "yaw", ">", "360D", ";", ")", "{", "yaw", "-=", "360D", ";", "yaw2", "-=", "360D", ";", "}", "if", "(", "!", "worldObj", ".", "isRemote", ")", "{", "if", "(", "delay", "==", "-", "1", ")", "{", "updateDelay", "(", ")", ";", "}", "if", "(", "delay", ">", "0", ")", "{", "delay", "--", ";", "return", ";", "}", "byte", "byte0", "=", "4", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "byte0", ";", "i", "++", ")", "{", "EntityLiving", "entityliving", "=", "(", "EntityLiving", ")", "EntityList", ".", "createEntityByName", "(", "mobID", ",", "worldObj", ")", ";", "if", "(", "entityliving", "==", "null", ")", "{", "return", ";", "}", "int", "j", "=", "worldObj", ".", "getEntitiesWithinAABB", "(", "entityliving", ".", "getClass", "(", ")", ",", "AxisAlignedBB", ".", "getBoundingBoxFromPool", "(", "xCoord", ",", "yCoord", ",", "zCoord", ",", "xCoord", "+", "1", ",", "yCoord", "+", "1", ",", "zCoord", "+", "1", ")", ".", "expand", "(", "8D", ",", "4D", ",", "8D", ")", ")", ".", "size", "(", ")", ";", "if", "(", "j", ">=", "6", ")", "{", "updateDelay", "(", ")", ";", "return", ";", "}", "if", "(", "entityliving", "==", "null", ")", "{", "continue", ";", "}", "double", "d3", "=", "(", "double", ")", "xCoord", "+", "(", "worldObj", ".", "rand", ".", "nextDouble", "(", ")", "-", "worldObj", ".", "rand", ".", "nextDouble", "(", ")", ")", "*", "4D", ";", "double", "d4", "=", "(", "yCoord", "+", "worldObj", ".", "rand", ".", "nextInt", "(", "3", ")", ")", "-", "1", ";", "double", "d5", "=", "(", "double", ")", "zCoord", "+", "(", "worldObj", ".", "rand", ".", "nextDouble", "(", ")", "-", "worldObj", ".", "rand", ".", "nextDouble", "(", ")", ")", "*", "4D", ";", "entityliving", ".", "setLocationAndAngles", "(", "d3", ",", "d4", ",", "d5", ",", "worldObj", ".", "rand", ".", "nextFloat", "(", ")", "*", "360F", ",", "0.0F", ")", ";", "if", "(", "entityliving", ".", "getCanSpawnHere", "(", ")", ")", "{", "worldObj", ".", "spawnEntityInWorld", "(", "entityliving", ")", ";", "worldObj", ".", "playAuxSFX", "(", "2004", ",", "xCoord", ",", "yCoord", ",", "zCoord", ",", "0", ")", ";", "entityliving", ".", "spawnExplosionParticle", "(", ")", ";", "updateDelay", "(", ")", ";", "}", "}", "}", "super", ".", "updateEntity", "(", ")", ";", "}", "private", "void", "updateDelay", "(", ")", "{", "delay", "=", "200", "+", "worldObj", ".", "rand", ".", "nextInt", "(", "600", ")", ";", "}", "public", "void", "readFromNBT", "(", "NBTTagCompound", "par1NBTTagCompound", ")", "{", "super", ".", "readFromNBT", "(", "par1NBTTagCompound", ")", ";", "mobID", "=", "par1NBTTagCompound", ".", "getString", "(", "\"EntityId\"", ")", ";", "delay", "=", "par1NBTTagCompound", ".", "getShort", "(", "\"Delay\"", ")", ";", "}", "public", "void", "writeToNBT", "(", "NBTTagCompound", "par1NBTTagCompound", ")", "{", "super", ".", "writeToNBT", "(", "par1NBTTagCompound", ")", ";", "par1NBTTagCompound", ".", "setString", "(", "\"EntityId\"", ",", "mobID", ")", ";", "par1NBTTagCompound", ".", "setShort", "(", "\"Delay\"", ",", "(", "short", ")", "delay", ")", ";", "}", "public", "Packet", "getDescriptionPacket", "(", ")", "{", "int", "i", "=", "EntityList", ".", "getIDFromString", "(", "mobID", ")", ";", "return", "new", "Packet132TileEntityData", "(", "xCoord", ",", "yCoord", ",", "zCoord", ",", "1", ",", "i", ")", ";", "}", "}", "</s>" ]
9,817
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "io", ".", "*", ";", "public", "class", "Packet7UseEntity", "extends", "Packet", "{", "public", "int", "playerEntityId", ";", "public", "int", "targetEntity", ";", "public", "int", "isLeftClick", ";", "public", "Packet7UseEntity", "(", ")", "{", "}", "public", "void", "readPacketData", "(", "DataInputStream", "par1DataInputStream", ")", "throws", "IOException", "{", "playerEntityId", "=", "par1DataInputStream", ".", "readInt", "(", ")", ";", "targetEntity", "=", "par1DataInputStream", ".", "readInt", "(", ")", ";", "isLeftClick", "=", "par1DataInputStream", ".", "readByte", "(", ")", ";", "}", "public", "void", "writePacketData", "(", "DataOutputStream", "par1DataOutputStream", ")", "throws", "IOException", "{", "par1DataOutputStream", ".", "writeInt", "(", "playerEntityId", ")", ";", "par1DataOutputStream", ".", "writeInt", "(", "targetEntity", ")", ";", "par1DataOutputStream", ".", "writeByte", "(", "isLeftClick", ")", ";", "}", "public", "void", "processPacket", "(", "NetHandler", "par1NetHandler", ")", "{", "par1NetHandler", ".", "handleUseEntity", "(", "this", ")", ";", "}", "public", "int", "getPacketSize", "(", ")", "{", "return", "9", ";", "}", "}", "</s>" ]
9,818
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "io", ".", "*", ";", "public", "class", "Packet5PlayerInventory", "extends", "Packet", "{", "public", "int", "entityID", ";", "public", "int", "slot", ";", "public", "int", "itemID", ";", "public", "int", "itemDamage", ";", "public", "Packet5PlayerInventory", "(", ")", "{", "}", "public", "Packet5PlayerInventory", "(", "int", "par1", ",", "int", "par2", ",", "ItemStack", "par3ItemStack", ")", "{", "entityID", "=", "par1", ";", "slot", "=", "par2", ";", "if", "(", "par3ItemStack", "==", "null", ")", "{", "itemID", "=", "-", "1", ";", "itemDamage", "=", "0", ";", "}", "else", "{", "itemID", "=", "par3ItemStack", ".", "itemID", ";", "itemDamage", "=", "par3ItemStack", ".", "getItemDamage", "(", ")", ";", "}", "}", "public", "void", "readPacketData", "(", "DataInputStream", "par1DataInputStream", ")", "throws", "IOException", "{", "entityID", "=", "par1DataInputStream", ".", "readInt", "(", ")", ";", "slot", "=", "par1DataInputStream", ".", "readShort", "(", ")", ";", "itemID", "=", "par1DataInputStream", ".", "readShort", "(", ")", ";", "itemDamage", "=", "par1DataInputStream", ".", "readShort", "(", ")", ";", "}", "public", "void", "writePacketData", "(", "DataOutputStream", "par1DataOutputStream", ")", "throws", "IOException", "{", "par1DataOutputStream", ".", "writeInt", "(", "entityID", ")", ";", "par1DataOutputStream", ".", "writeShort", "(", "slot", ")", ";", "par1DataOutputStream", ".", "writeShort", "(", "itemID", ")", ";", "par1DataOutputStream", ".", "writeShort", "(", "itemDamage", ")", ";", "}", "public", "void", "processPacket", "(", "NetHandler", "par1NetHandler", ")", "{", "par1NetHandler", ".", "handlePlayerInventory", "(", "this", ")", ";", "}", "public", "int", "getPacketSize", "(", ")", "{", "return", "8", ";", "}", "}", "</s>" ]
9,819
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "io", ".", "*", ";", "public", "class", "Packet2Handshake", "extends", "Packet", "{", "public", "String", "username", ";", "public", "Packet2Handshake", "(", ")", "{", "}", "public", "Packet2Handshake", "(", "String", "par1Str", ")", "{", "username", "=", "par1Str", ";", "}", "public", "void", "readPacketData", "(", "DataInputStream", "par1DataInputStream", ")", "throws", "IOException", "{", "username", "=", "readString", "(", "par1DataInputStream", ",", "64", ")", ";", "}", "public", "void", "writePacketData", "(", "DataOutputStream", "par1DataOutputStream", ")", "throws", "IOException", "{", "writeString", "(", "username", ",", "par1DataOutputStream", ")", ";", "}", "public", "void", "processPacket", "(", "NetHandler", "par1NetHandler", ")", "{", "par1NetHandler", ".", "handleHandshake", "(", "this", ")", ";", "}", "public", "int", "getPacketSize", "(", ")", "{", "return", "4", "+", "username", ".", "length", "(", ")", "+", "4", ";", "}", "}", "</s>" ]
9,820
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "io", ".", "*", ";", "import", "java", ".", "util", ".", "Arrays", ";", "public", "class", "NBTTagByteArray", "extends", "NBTBase", "{", "public", "byte", "byteArray", "[", "]", ";", "public", "NBTTagByteArray", "(", "String", "par1Str", ")", "{", "super", "(", "par1Str", ")", ";", "}", "public", "NBTTagByteArray", "(", "String", "par1Str", ",", "byte", "par2ArrayOfByte", "[", "]", ")", "{", "super", "(", "par1Str", ")", ";", "byteArray", "=", "par2ArrayOfByte", ";", "}", "void", "write", "(", "DataOutput", "par1DataOutput", ")", "throws", "IOException", "{", "par1DataOutput", ".", "writeInt", "(", "byteArray", ".", "length", ")", ";", "par1DataOutput", ".", "write", "(", "byteArray", ")", ";", "}", "void", "load", "(", "DataInput", "par1DataInput", ")", "throws", "IOException", "{", "int", "i", "=", "par1DataInput", ".", "readInt", "(", ")", ";", "byteArray", "=", "new", "byte", "[", "i", "]", ";", "par1DataInput", ".", "readFully", "(", "byteArray", ")", ";", "}", "public", "byte", "getId", "(", ")", "{", "return", "7", ";", "}", "public", "String", "toString", "(", ")", "{", "return", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "\"[\"", ")", ".", "append", "(", "byteArray", ".", "length", ")", ".", "append", "(", "\"", "bytes]\"", ")", ".", "toString", "(", ")", ";", "}", "public", "NBTBase", "copy", "(", ")", "{", "byte", "abyte0", "[", "]", "=", "new", "byte", "[", "byteArray", ".", "length", "]", ";", "System", ".", "arraycopy", "(", "byteArray", ",", "0", ",", "abyte0", ",", "0", ",", "byteArray", ".", "length", ")", ";", "return", "new", "NBTTagByteArray", "(", "getName", "(", ")", ",", "abyte0", ")", ";", "}", "public", "boolean", "equals", "(", "Object", "par1Obj", ")", "{", "if", "(", "super", ".", "equals", "(", "par1Obj", ")", ")", "{", "return", "Arrays", ".", "equals", "(", "byteArray", ",", "(", "(", "NBTTagByteArray", ")", "par1Obj", ")", ".", "byteArray", ")", ";", "}", "else", "{", "return", "false", ";", "}", "}", "public", "int", "hashCode", "(", ")", "{", "return", "super", ".", "hashCode", "(", ")", "^", "Arrays", ".", "hashCode", "(", "byteArray", ")", ";", "}", "}", "</s>" ]
9,821
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "*", ";", "public", "class", "ItemPotion", "extends", "Item", "{", "private", "HashMap", "effectCache", ";", "public", "ItemPotion", "(", "int", "par1", ")", "{", "super", "(", "par1", ")", ";", "effectCache", "=", "new", "HashMap", "(", ")", ";", "setMaxStackSize", "(", "1", ")", ";", "setHasSubtypes", "(", "true", ")", ";", "setMaxDamage", "(", "0", ")", ";", "}", "public", "List", "getEffects", "(", "ItemStack", "par1ItemStack", ")", "{", "return", "getEffects", "(", "par1ItemStack", ".", "getItemDamage", "(", ")", ")", ";", "}", "public", "List", "getEffects", "(", "int", "par1", ")", "{", "List", "list", "=", "(", "List", ")", "effectCache", ".", "get", "(", "Integer", ".", "valueOf", "(", "par1", ")", ")", ";", "if", "(", "list", "==", "null", ")", "{", "list", "=", "PotionHelper", ".", "getPotionEffects", "(", "par1", ",", "false", ")", ";", "effectCache", ".", "put", "(", "Integer", ".", "valueOf", "(", "par1", ")", ",", "list", ")", ";", "}", "return", "list", ";", "}", "public", "ItemStack", "onFoodEaten", "(", "ItemStack", "par1ItemStack", ",", "World", "par2World", ",", "EntityPlayer", "par3EntityPlayer", ")", "{", "par1ItemStack", ".", "stackSize", "--", ";", "if", "(", "!", "par2World", ".", "isRemote", ")", "{", "List", "list", "=", "getEffects", "(", "par1ItemStack", ")", ";", "if", "(", "list", "!=", "null", ")", "{", "PotionEffect", "potioneffect", ";", "for", "(", "Iterator", "iterator", "=", "list", ".", "iterator", "(", ")", ";", "iterator", ".", "hasNext", "(", ")", ";", "par3EntityPlayer", ".", "addPotionEffect", "(", "new", "PotionEffect", "(", "potioneffect", ")", ")", ")", "{", "potioneffect", "=", "(", "PotionEffect", ")", "iterator", ".", "next", "(", ")", ";", "}", "}", "}", "if", "(", "par1ItemStack", ".", "stackSize", "<=", "0", ")", "{", "return", "new", "ItemStack", "(", "Item", ".", "glassBottle", ")", ";", "}", "else", "{", "par3EntityPlayer", ".", "inventory", ".", "addItemStackToInventory", "(", "new", "ItemStack", "(", "Item", ".", "glassBottle", ")", ")", ";", "return", "par1ItemStack", ";", "}", "}", "public", "int", "getMaxItemUseDuration", "(", "ItemStack", "par1ItemStack", ")", "{", "return", "32", ";", "}", "public", "EnumAction", "getItemUseAction", "(", "ItemStack", "par1ItemStack", ")", "{", "return", "EnumAction", ".", "drink", ";", "}", "public", "ItemStack", "onItemRightClick", "(", "ItemStack", "par1ItemStack", ",", "World", "par2World", ",", "EntityPlayer", "par3EntityPlayer", ")", "{", "if", "(", "isSplash", "(", "par1ItemStack", ".", "getItemDamage", "(", ")", ")", ")", "{", "par1ItemStack", ".", "stackSize", "--", ";", "par2World", ".", "playSoundAtEntity", "(", "par3EntityPlayer", ",", "\"random.bow\"", ",", "0.5F", ",", "0.4F", "/", "(", "itemRand", ".", "nextFloat", "(", ")", "*", "0.4F", "+", "0.8F", ")", ")", ";", "if", "(", "!", "par2World", ".", "isRemote", ")", "{", "par2World", ".", "spawnEntityInWorld", "(", "new", "EntityPotion", "(", "par2World", ",", "par3EntityPlayer", ",", "par1ItemStack", ".", "getItemDamage", "(", ")", ")", ")", ";", "}", "return", "par1ItemStack", ";", "}", "else", "{", "par3EntityPlayer", ".", "setItemInUse", "(", "par1ItemStack", ",", "getMaxItemUseDuration", "(", "par1ItemStack", ")", ")", ";", "return", "par1ItemStack", ";", "}", "}", "public", "boolean", "onItemUse", "(", "ItemStack", "par1ItemStack", ",", "EntityPlayer", "par2EntityPlayer", ",", "World", "par3World", ",", "int", "i", ",", "int", "j", ",", "int", "k", ",", "int", "l", ")", "{", "return", "false", ";", "}", "public", "static", "boolean", "isSplash", "(", "int", "par0", ")", "{", "return", "(", "par0", "&", "0x4000", ")", "!=", "0", ";", "}", "}", "</s>" ]
9,822
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "logging", ".", "Logger", ";", "import", "net", ".", "minecraft", ".", "server", ".", "MinecraftServer", ";", "public", "class", "ConvertProgressUpdater", "implements", "IProgressUpdate", "{", "private", "long", "lastTimeMillis", ";", "final", "MinecraftServer", "mcServer", ";", "public", "ConvertProgressUpdater", "(", "MinecraftServer", "par1MinecraftServer", ")", "{", "mcServer", "=", "par1MinecraftServer", ";", "lastTimeMillis", "=", "System", ".", "currentTimeMillis", "(", ")", ";", "}", "public", "void", "displaySavingString", "(", "String", "s", ")", "{", "}", "public", "void", "setLoadingProgress", "(", "int", "par1", ")", "{", "if", "(", "System", ".", "currentTimeMillis", "(", ")", "-", "lastTimeMillis", ">=", "1000L", ")", "{", "lastTimeMillis", "=", "System", ".", "currentTimeMillis", "(", ")", ";", "MinecraftServer", ".", "logger", ".", "info", "(", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "\"\"", ")", ".", "append", "(", "par1", ")", ".", "append", "(", "\"%\"", ")", ".", "toString", "(", ")", ")", ";", "}", "}", "public", "void", "displayLoadingString", "(", "String", "s", ")", "{", "}", "}", "</s>" ]
9,823
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "io", ".", "*", ";", "public", "class", "Packet31RelEntityMove", "extends", "Packet30Entity", "{", "public", "Packet31RelEntityMove", "(", ")", "{", "}", "public", "Packet31RelEntityMove", "(", "int", "par1", ",", "byte", "par2", ",", "byte", "par3", ",", "byte", "par4", ")", "{", "super", "(", "par1", ")", ";", "xPosition", "=", "par2", ";", "yPosition", "=", "par3", ";", "zPosition", "=", "par4", ";", "}", "public", "void", "readPacketData", "(", "DataInputStream", "par1DataInputStream", ")", "throws", "IOException", "{", "super", ".", "readPacketData", "(", "par1DataInputStream", ")", ";", "xPosition", "=", "par1DataInputStream", ".", "readByte", "(", ")", ";", "yPosition", "=", "par1DataInputStream", ".", "readByte", "(", ")", ";", "zPosition", "=", "par1DataInputStream", ".", "readByte", "(", ")", ";", "}", "public", "void", "writePacketData", "(", "DataOutputStream", "par1DataOutputStream", ")", "throws", "IOException", "{", "super", ".", "writePacketData", "(", "par1DataOutputStream", ")", ";", "par1DataOutputStream", ".", "writeByte", "(", "xPosition", ")", ";", "par1DataOutputStream", ".", "writeByte", "(", "yPosition", ")", ";", "par1DataOutputStream", ".", "writeByte", "(", "zPosition", ")", ";", "}", "public", "int", "getPacketSize", "(", ")", "{", "return", "7", ";", "}", "}", "</s>" ]
9,824
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "io", ".", "*", ";", "public", "class", "Packet22Collect", "extends", "Packet", "{", "public", "int", "collectedEntityId", ";", "public", "int", "collectorEntityId", ";", "public", "Packet22Collect", "(", ")", "{", "}", "public", "Packet22Collect", "(", "int", "par1", ",", "int", "par2", ")", "{", "collectedEntityId", "=", "par1", ";", "collectorEntityId", "=", "par2", ";", "}", "public", "void", "readPacketData", "(", "DataInputStream", "par1DataInputStream", ")", "throws", "IOException", "{", "collectedEntityId", "=", "par1DataInputStream", ".", "readInt", "(", ")", ";", "collectorEntityId", "=", "par1DataInputStream", ".", "readInt", "(", ")", ";", "}", "public", "void", "writePacketData", "(", "DataOutputStream", "par1DataOutputStream", ")", "throws", "IOException", "{", "par1DataOutputStream", ".", "writeInt", "(", "collectedEntityId", ")", ";", "par1DataOutputStream", ".", "writeInt", "(", "collectorEntityId", ")", ";", "}", "public", "void", "processPacket", "(", "NetHandler", "par1NetHandler", ")", "{", "par1NetHandler", ".", "handleCollect", "(", "this", ")", ";", "}", "public", "int", "getPacketSize", "(", ")", "{", "return", "8", ";", "}", "}", "</s>" ]
9,825
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "List", ";", "import", "java", ".", "util", ".", "Random", ";", "public", "class", "ComponentStrongholdPrison", "extends", "ComponentStronghold", "{", "protected", "final", "EnumDoor", "doorType", ";", "public", "ComponentStrongholdPrison", "(", "int", "par1", ",", "Random", "par2Random", ",", "StructureBoundingBox", "par3StructureBoundingBox", ",", "int", "par4", ")", "{", "super", "(", "par1", ")", ";", "coordBaseMode", "=", "par4", ";", "doorType", "=", "getRandomDoor", "(", "par2Random", ")", ";", "boundingBox", "=", "par3StructureBoundingBox", ";", "}", "public", "void", "buildComponent", "(", "StructureComponent", "par1StructureComponent", ",", "List", "par2List", ",", "Random", "par3Random", ")", "{", "getNextComponentNormal", "(", "(", "ComponentStrongholdStairs2", ")", "par1StructureComponent", ",", "par2List", ",", "par3Random", ",", "1", ",", "1", ")", ";", "}", "public", "static", "ComponentStrongholdPrison", "findValidPlacement", "(", "List", "par0List", ",", "Random", "par1Random", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "int", "par5", ",", "int", "par6", ")", "{", "StructureBoundingBox", "structureboundingbox", "=", "StructureBoundingBox", ".", "getComponentToAddBoundingBox", "(", "par2", ",", "par3", ",", "par4", ",", "-", "1", ",", "-", "1", ",", "0", ",", "9", ",", "5", ",", "11", ",", "par5", ")", ";", "if", "(", "!", "canStrongholdGoDeeper", "(", "structureboundingbox", ")", "||", "StructureComponent", ".", "findIntersecting", "(", "par0List", ",", "structureboundingbox", ")", "!=", "null", ")", "{", "return", "null", ";", "}", "else", "{", "return", "new", "ComponentStrongholdPrison", "(", "par6", ",", "par1Random", ",", "structureboundingbox", ",", "par5", ")", ";", "}", "}", "public", "boolean", "addComponentParts", "(", "World", "par1World", ",", "Random", "par2Random", ",", "StructureBoundingBox", "par3StructureBoundingBox", ")", "{", "if", "(", "isLiquidInStructureBoundingBox", "(", "par1World", ",", "par3StructureBoundingBox", ")", ")", "{", "return", "false", ";", "}", "else", "{", "fillWithRandomizedBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "0", ",", "0", ",", "0", ",", "8", ",", "4", ",", "10", ",", "true", ",", "par2Random", ",", "StructureStrongholdPieces", ".", "getStrongholdStones", "(", ")", ")", ";", "placeDoor", "(", "par1World", ",", "par2Random", ",", "par3StructureBoundingBox", ",", "doorType", ",", "1", ",", "1", ",", "0", ")", ";", "fillWithBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "1", ",", "1", ",", "10", ",", "3", ",", "3", ",", "10", ",", "0", ",", "0", ",", "false", ")", ";", "fillWithRandomizedBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "4", ",", "1", ",", "1", ",", "4", ",", "3", ",", "1", ",", "false", ",", "par2Random", ",", "StructureStrongholdPieces", ".", "getStrongholdStones", "(", ")", ")", ";", "fillWithRandomizedBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "4", ",", "1", ",", "3", ",", "4", ",", "3", ",", "3", ",", "false", ",", "par2Random", ",", "StructureStrongholdPieces", ".", "getStrongholdStones", "(", ")", ")", ";", "fillWithRandomizedBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "4", ",", "1", ",", "7", ",", "4", ",", "3", ",", "7", ",", "false", ",", "par2Random", ",", "StructureStrongholdPieces", ".", "getStrongholdStones", "(", ")", ")", ";", "fillWithRandomizedBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "4", ",", "1", ",", "9", ",", "4", ",", "3", ",", "9", ",", "false", ",", "par2Random", ",", "StructureStrongholdPieces", ".", "getStrongholdStones", "(", ")", ")", ";", "fillWithBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "4", ",", "1", ",", "4", ",", "4", ",", "3", ",", "6", ",", "Block", ".", "fenceIron", ".", "blockID", ",", "Block", ".", "fenceIron", ".", "blockID", ",", "false", ")", ";", "fillWithBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "5", ",", "1", ",", "5", ",", "7", ",", "3", ",", "5", ",", "Block", ".", "fenceIron", ".", "blockID", ",", "Block", ".", "fenceIron", ".", "blockID", ",", "false", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "fenceIron", ".", "blockID", ",", "0", ",", "4", ",", "3", ",", "2", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "fenceIron", ".", "blockID", ",", "0", ",", "4", ",", "3", ",", "8", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "doorSteel", ".", "blockID", ",", "getMetadataWithOffset", "(", "Block", ".", "doorSteel", ".", "blockID", ",", "3", ")", ",", "4", ",", "1", ",", "2", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "doorSteel", ".", "blockID", ",", "getMetadataWithOffset", "(", "Block", ".", "doorSteel", ".", "blockID", ",", "3", ")", "+", "8", ",", "4", ",", "2", ",", "2", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "doorSteel", ".", "blockID", ",", "getMetadataWithOffset", "(", "Block", ".", "doorSteel", ".", "blockID", ",", "3", ")", ",", "4", ",", "1", ",", "8", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "doorSteel", ".", "blockID", ",", "getMetadataWithOffset", "(", "Block", ".", "doorSteel", ".", "blockID", ",", "3", ")", "+", "8", ",", "4", ",", "2", ",", "8", ",", "par3StructureBoundingBox", ")", ";", "return", "true", ";", "}", "}", "}", "</s>" ]
9,826
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "Random", ";", "public", "class", "EntityEnderPearl", "extends", "EntityThrowable", "{", "public", "EntityEnderPearl", "(", "World", "par1World", ")", "{", "super", "(", "par1World", ")", ";", "}", "public", "EntityEnderPearl", "(", "World", "par1World", ",", "EntityLiving", "par2EntityLiving", ")", "{", "super", "(", "par1World", ",", "par2EntityLiving", ")", ";", "}", "public", "EntityEnderPearl", "(", "World", "par1World", ",", "double", "par2", ",", "double", "par4", ",", "double", "par6", ")", "{", "super", "(", "par1World", ",", "par2", ",", "par4", ",", "par6", ")", ";", "}", "protected", "void", "onImpact", "(", "MovingObjectPosition", "par1MovingObjectPosition", ")", "{", "if", "(", "par1MovingObjectPosition", ".", "entityHit", "!=", "null", ")", "{", "if", "(", "!", "par1MovingObjectPosition", ".", "entityHit", ".", "attackEntityFrom", "(", "DamageSource", ".", "causeThrownDamage", "(", "this", ",", "thrower", ")", ",", "0", ")", ")", ";", "}", "for", "(", "int", "i", "=", "0", ";", "i", "<", "32", ";", "i", "++", ")", "{", "worldObj", ".", "spawnParticle", "(", "\"portal\"", ",", "posX", ",", "posY", "+", "rand", ".", "nextDouble", "(", ")", "*", "2D", ",", "posZ", ",", "rand", ".", "nextGaussian", "(", ")", ",", "0.0D", ",", "rand", ".", "nextGaussian", "(", ")", ")", ";", "}", "if", "(", "!", "worldObj", ".", "isRemote", ")", "{", "if", "(", "thrower", "!=", "null", ")", "{", "thrower", ".", "setPositionAndUpdate", "(", "posX", ",", "posY", ",", "posZ", ")", ";", "thrower", ".", "fallDistance", "=", "0.0F", ";", "thrower", ".", "attackEntityFrom", "(", "DamageSource", ".", "fall", ",", "5", ")", ";", "}", "setDead", "(", ")", ";", "}", "}", "}", "</s>" ]
9,827
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "Random", ";", "public", "class", "EntityItem", "extends", "Entity", "{", "public", "ItemStack", "item", ";", "public", "int", "age", ";", "public", "int", "delayBeforeCanPickup", ";", "private", "int", "health", ";", "public", "float", "field_432_ae", ";", "public", "EntityItem", "(", "World", "par1World", ",", "double", "par2", ",", "double", "par4", ",", "double", "par6", ",", "ItemStack", "par8ItemStack", ")", "{", "super", "(", "par1World", ")", ";", "age", "=", "0", ";", "health", "=", "5", ";", "field_432_ae", "=", "(", "float", ")", "(", "Math", ".", "random", "(", ")", "*", "Math", ".", "PI", "*", "2D", ")", ";", "setSize", "(", "0.25F", ",", "0.25F", ")", ";", "yOffset", "=", "height", "/", "2.0F", ";", "setPosition", "(", "par2", ",", "par4", ",", "par6", ")", ";", "item", "=", "par8ItemStack", ";", "rotationYaw", "=", "(", "float", ")", "(", "Math", ".", "random", "(", ")", "*", "360D", ")", ";", "motionX", "=", "(", "float", ")", "(", "Math", ".", "random", "(", ")", "*", "0.20000000298023224D", "-", "0.10000000149011612D", ")", ";", "motionY", "=", "0.20000000298023224D", ";", "motionZ", "=", "(", "float", ")", "(", "Math", ".", "random", "(", ")", "*", "0.20000000298023224D", "-", "0.10000000149011612D", ")", ";", "}", "protected", "boolean", "canTriggerWalking", "(", ")", "{", "return", "false", ";", "}", "public", "EntityItem", "(", "World", "par1World", ")", "{", "super", "(", "par1World", ")", ";", "age", "=", "0", ";", "health", "=", "5", ";", "field_432_ae", "=", "(", "float", ")", "(", "Math", ".", "random", "(", ")", "*", "Math", ".", "PI", "*", "2D", ")", ";", "setSize", "(", "0.25F", ",", "0.25F", ")", ";", "yOffset", "=", "height", "/", "2.0F", ";", "}", "protected", "void", "entityInit", "(", ")", "{", "}", "public", "void", "onUpdate", "(", ")", "{", "super", ".", "onUpdate", "(", ")", ";", "if", "(", "delayBeforeCanPickup", ">", "0", ")", "{", "delayBeforeCanPickup", "--", ";", "}", "prevPosX", "=", "posX", ";", "prevPosY", "=", "posY", ";", "prevPosZ", "=", "posZ", ";", "motionY", "-=", "0.039999999105930328D", ";", "if", "(", "worldObj", ".", "getBlockMaterial", "(", "MathHelper", ".", "floor_double", "(", "posX", ")", ",", "MathHelper", ".", "floor_double", "(", "posY", ")", ",", "MathHelper", ".", "floor_double", "(", "posZ", ")", ")", "==", "Material", ".", "lava", ")", "{", "motionY", "=", "0.20000000298023224D", ";", "motionX", "=", "(", "rand", ".", "nextFloat", "(", ")", "-", "rand", ".", "nextFloat", "(", ")", ")", "*", "0.2F", ";", "motionZ", "=", "(", "rand", ".", "nextFloat", "(", ")", "-", "rand", ".", "nextFloat", "(", ")", ")", "*", "0.2F", ";", "worldObj", ".", "playSoundAtEntity", "(", "this", ",", "\"random.fizz\"", ",", "0.4F", ",", "2.0F", "+", "rand", ".", "nextFloat", "(", ")", "*", "0.4F", ")", ";", "}", "pushOutOfBlocks", "(", "posX", ",", "(", "boundingBox", ".", "minY", "+", "boundingBox", ".", "maxY", ")", "/", "2D", ",", "posZ", ")", ";", "moveEntity", "(", "motionX", ",", "motionY", ",", "motionZ", ")", ";", "float", "f", "=", "0.98F", ";", "if", "(", "onGround", ")", "{", "f", "=", "0.5880001F", ";", "int", "i", "=", "worldObj", ".", "getBlockId", "(", "MathHelper", ".", "floor_double", "(", "posX", ")", ",", "MathHelper", ".", "floor_double", "(", "boundingBox", ".", "minY", ")", "-", "1", ",", "MathHelper", ".", "floor_double", "(", "posZ", ")", ")", ";", "if", "(", "i", ">", "0", ")", "{", "f", "=", "Block", ".", "blocksList", "[", "i", "]", ".", "slipperiness", "*", "0.98F", ";", "}", "}", "motionX", "*=", "f", ";", "motionY", "*=", "0.98000001907348633D", ";", "motionZ", "*=", "f", ";", "if", "(", "onGround", ")", "{", "motionY", "*=", "-", "0.5D", ";", "}", "age", "++", ";", "if", "(", "age", ">=", "6000", ")", "{", "setDead", "(", ")", ";", "}", "}", "public", "void", "func_48316_k", "(", ")", "{", "age", "=", "4800", ";", "}", "public", "boolean", "handleWaterMovement", "(", ")", "{", "return", "worldObj", ".", "handleMaterialAcceleration", "(", "boundingBox", ",", "Material", ".", "water", ",", "this", ")", ";", "}", "protected", "void", "dealFireDamage", "(", "int", "par1", ")", "{", "attackEntityFrom", "(", "DamageSource", ".", "inFire", ",", "par1", ")", ";", "}", "public", "boolean", "attackEntityFrom", "(", "DamageSource", "par1DamageSource", ",", "int", "par2", ")", "{", "setBeenAttacked", "(", ")", ";", "health", "-=", "par2", ";", "if", "(", "health", "<=", "0", ")", "{", "setDead", "(", ")", ";", "}", "return", "false", ";", "}", "public", "void", "writeEntityToNBT", "(", "NBTTagCompound", "par1NBTTagCompound", ")", "{", "par1NBTTagCompound", ".", "setShort", "(", "\"Health\"", ",", "(", "byte", ")", "health", ")", ";", "par1NBTTagCompound", ".", "setShort", "(", "\"Age\"", ",", "(", "short", ")", "age", ")", ";", "par1NBTTagCompound", ".", "setCompoundTag", "(", "\"Item\"", ",", "item", ".", "writeToNBT", "(", "new", "NBTTagCompound", "(", ")", ")", ")", ";", "}", "public", "void", "readEntityFromNBT", "(", "NBTTagCompound", "par1NBTTagCompound", ")", "{", "health", "=", "par1NBTTagCompound", ".", "getShort", "(", "\"Health\"", ")", "&", "0xff", ";", "age", "=", "par1NBTTagCompound", ".", "getShort", "(", "\"Age\"", ")", ";", "NBTTagCompound", "nbttagcompound", "=", "par1NBTTagCompound", ".", "getCompoundTag", "(", "\"Item\"", ")", ";", "item", "=", "ItemStack", ".", "loadItemStackFromNBT", "(", "nbttagcompound", ")", ";", "if", "(", "item", "==", "null", ")", "{", "setDead", "(", ")", ";", "}", "}", "public", "void", "onCollideWithPlayer", "(", "EntityPlayer", "par1EntityPlayer", ")", "{", "if", "(", "worldObj", ".", "isRemote", ")", "{", "return", ";", "}", "int", "i", "=", "item", ".", "stackSize", ";", "if", "(", "delayBeforeCanPickup", "==", "0", "&&", "par1EntityPlayer", ".", "inventory", ".", "addItemStackToInventory", "(", "item", ")", ")", "{", "if", "(", "item", ".", "itemID", "==", "Block", ".", "wood", ".", "blockID", ")", "{", "par1EntityPlayer", ".", "triggerAchievement", "(", "AchievementList", ".", "mineWood", ")", ";", "}", "if", "(", "item", ".", "itemID", "==", "Item", ".", "leather", ".", "shiftedIndex", ")", "{", "par1EntityPlayer", ".", "triggerAchievement", "(", "AchievementList", ".", "killCow", ")", ";", "}", "if", "(", "item", ".", "itemID", "==", "Item", ".", "diamond", ".", "shiftedIndex", ")", "{", "par1EntityPlayer", ".", "triggerAchievement", "(", "AchievementList", ".", "diamonds", ")", ";", "}", "if", "(", "item", ".", "itemID", "==", "Item", ".", "blazeRod", ".", "shiftedIndex", ")", "{", "par1EntityPlayer", ".", "triggerAchievement", "(", "AchievementList", ".", "blazeRod", ")", ";", "}", "worldObj", ".", "playSoundAtEntity", "(", "this", ",", "\"random.pop\"", ",", "0.2F", ",", "(", "(", "rand", ".", "nextFloat", "(", ")", "-", "rand", ".", "nextFloat", "(", ")", ")", "*", "0.7F", "+", "1.0F", ")", "*", "2.0F", ")", ";", "par1EntityPlayer", ".", "onItemPickup", "(", "this", ",", "i", ")", ";", "if", "(", "item", ".", "stackSize", "<=", "0", ")", "{", "setDead", "(", ")", ";", "}", "}", "}", "public", "String", "getUsername", "(", ")", "{", "return", "StatCollector", ".", "translateToLocal", "(", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "\"item.\"", ")", ".", "append", "(", "item", ".", "getItemName", "(", ")", ")", ".", "toString", "(", ")", ")", ";", "}", "public", "boolean", "canAttackWithItem", "(", ")", "{", "return", "false", ";", "}", "}", "</s>" ]
9,828
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "List", ";", "public", "class", "BiomeGenHell", "extends", "BiomeGenBase", "{", "public", "BiomeGenHell", "(", "int", "par1", ")", "{", "super", "(", "par1", ")", ";", "spawnableMonsterList", ".", "clear", "(", ")", ";", "spawnableCreatureList", ".", "clear", "(", ")", ";", "spawnableWaterCreatureList", ".", "clear", "(", ")", ";", "spawnableMonsterList", ".", "add", "(", "new", "SpawnListEntry", "(", "net", ".", "minecraft", ".", "src", ".", "EntityGhast", ".", "class", ",", "50", ",", "4", ",", "4", ")", ")", ";", "spawnableMonsterList", ".", "add", "(", "new", "SpawnListEntry", "(", "net", ".", "minecraft", ".", "src", ".", "EntityPigZombie", ".", "class", ",", "100", ",", "4", ",", "4", ")", ")", ";", "spawnableMonsterList", ".", "add", "(", "new", "SpawnListEntry", "(", "net", ".", "minecraft", ".", "src", ".", "EntityMagmaCube", ".", "class", ",", "1", ",", "4", ",", "4", ")", ")", ";", "}", "}", "</s>" ]
9,829
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "public", "class", "WatchableObject", "{", "private", "final", "int", "objectType", ";", "private", "final", "int", "dataValueId", ";", "private", "Object", "watchedObject", ";", "private", "boolean", "isWatching", ";", "public", "WatchableObject", "(", "int", "par1", ",", "int", "par2", ",", "Object", "par3Obj", ")", "{", "dataValueId", "=", "par2", ";", "watchedObject", "=", "par3Obj", ";", "objectType", "=", "par1", ";", "isWatching", "=", "true", ";", "}", "public", "int", "getDataValueId", "(", ")", "{", "return", "dataValueId", ";", "}", "public", "void", "setObject", "(", "Object", "par1Obj", ")", "{", "watchedObject", "=", "par1Obj", ";", "}", "public", "Object", "getObject", "(", ")", "{", "return", "watchedObject", ";", "}", "public", "int", "getObjectType", "(", ")", "{", "return", "objectType", ";", "}", "public", "boolean", "getWatching", "(", ")", "{", "return", "isWatching", ";", "}", "public", "void", "setWatching", "(", "boolean", "par1", ")", "{", "isWatching", "=", "par1", ";", "}", "}", "</s>" ]
9,830
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "Random", ";", "public", "class", "BlockVine", "extends", "Block", "{", "public", "BlockVine", "(", "int", "par1", ")", "{", "super", "(", "par1", ",", "143", ",", "Material", ".", "vine", ")", ";", "setTickRandomly", "(", "true", ")", ";", "}", "public", "void", "setBlockBoundsForItemRender", "(", ")", "{", "setBlockBounds", "(", "0.0F", ",", "0.0F", ",", "0.0F", ",", "1.0F", ",", "1.0F", ",", "1.0F", ")", ";", "}", "public", "int", "getRenderType", "(", ")", "{", "return", "20", ";", "}", "public", "boolean", "isOpaqueCube", "(", ")", "{", "return", "false", ";", "}", "public", "boolean", "renderAsNormalBlock", "(", ")", "{", "return", "false", ";", "}", "public", "void", "setBlockBoundsBasedOnState", "(", "IBlockAccess", "par1IBlockAccess", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ")", "{", "int", "i", "=", "par1IBlockAccess", ".", "getBlockMetadata", "(", "par2", ",", "par3", ",", "par4", ")", ";", "float", "f", "=", "1.0F", ";", "float", "f1", "=", "1.0F", ";", "float", "f2", "=", "1.0F", ";", "float", "f3", "=", "0.0F", ";", "float", "f4", "=", "0.0F", ";", "float", "f5", "=", "0.0F", ";", "boolean", "flag", "=", "i", ">", "0", ";", "if", "(", "(", "i", "&", "2", ")", "!=", "0", ")", "{", "f3", "=", "Math", ".", "max", "(", "f3", ",", "0.0625F", ")", ";", "f", "=", "0.0F", ";", "f1", "=", "0.0F", ";", "f4", "=", "1.0F", ";", "f2", "=", "0.0F", ";", "f5", "=", "1.0F", ";", "flag", "=", "true", ";", "}", "if", "(", "(", "i", "&", "8", ")", "!=", "0", ")", "{", "f", "=", "Math", ".", "min", "(", "f", ",", "0.9375F", ")", ";", "f3", "=", "1.0F", ";", "f1", "=", "0.0F", ";", "f4", "=", "1.0F", ";", "f2", "=", "0.0F", ";", "f5", "=", "1.0F", ";", "flag", "=", "true", ";", "}", "if", "(", "(", "i", "&", "4", ")", "!=", "0", ")", "{", "f5", "=", "Math", ".", "max", "(", "f5", ",", "0.0625F", ")", ";", "f2", "=", "0.0F", ";", "f", "=", "0.0F", ";", "f3", "=", "1.0F", ";", "f1", "=", "0.0F", ";", "f4", "=", "1.0F", ";", "flag", "=", "true", ";", "}", "if", "(", "(", "i", "&", "1", ")", "!=", "0", ")", "{", "f2", "=", "Math", ".", "min", "(", "f2", ",", "0.9375F", ")", ";", "f5", "=", "1.0F", ";", "f", "=", "0.0F", ";", "f3", "=", "1.0F", ";", "f1", "=", "0.0F", ";", "f4", "=", "1.0F", ";", "flag", "=", "true", ";", "}", "if", "(", "!", "flag", "&&", "canBePlacedOn", "(", "par1IBlockAccess", ".", "getBlockId", "(", "par2", ",", "par3", "+", "1", ",", "par4", ")", ")", ")", "{", "f1", "=", "Math", ".", "min", "(", "f1", ",", "0.9375F", ")", ";", "f4", "=", "1.0F", ";", "f", "=", "0.0F", ";", "f3", "=", "1.0F", ";", "f2", "=", "0.0F", ";", "f5", "=", "1.0F", ";", "}", "setBlockBounds", "(", "f", ",", "f1", ",", "f2", ",", "f3", ",", "f4", ",", "f5", ")", ";", "}", "public", "AxisAlignedBB", "getCollisionBoundingBoxFromPool", "(", "World", "par1World", ",", "int", "par2", ",", "int", "par3", ",", "int", "i", ")", "{", "return", "null", ";", "}", "public", "boolean", "canPlaceBlockOnSide", "(", "World", "par1World", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "int", "par5", ")", "{", "switch", "(", "par5", ")", "{", "default", ":", "return", "false", ";", "case", "1", ":", "return", "canBePlacedOn", "(", "par1World", ".", "getBlockId", "(", "par2", ",", "par3", "+", "1", ",", "par4", ")", ")", ";", "case", "2", ":", "return", "canBePlacedOn", "(", "par1World", ".", "getBlockId", "(", "par2", ",", "par3", ",", "par4", "+", "1", ")", ")", ";", "case", "3", ":", "return", "canBePlacedOn", "(", "par1World", ".", "getBlockId", "(", "par2", ",", "par3", ",", "par4", "-", "1", ")", ")", ";", "case", "5", ":", "return", "canBePlacedOn", "(", "par1World", ".", "getBlockId", "(", "par2", "-", "1", ",", "par3", ",", "par4", ")", ")", ";", "case", "4", ":", "return", "canBePlacedOn", "(", "par1World", ".", "getBlockId", "(", "par2", "+", "1", ",", "par3", ",", "par4", ")", ")", ";", "}", "}", "private", "boolean", "canBePlacedOn", "(", "int", "par1", ")", "{", "if", "(", "par1", "==", "0", ")", "{", "return", "false", ";", "}", "Block", "block", "=", "Block", ".", "blocksList", "[", "par1", "]", ";", "return", "block", ".", "renderAsNormalBlock", "(", ")", "&&", "block", ".", "blockMaterial", ".", "blocksMovement", "(", ")", ";", "}", "private", "boolean", "canVineStay", "(", "World", "par1World", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ")", "{", "int", "i", "=", "par1World", ".", "getBlockMetadata", "(", "par2", ",", "par3", ",", "par4", ")", ";", "int", "j", "=", "i", ";", "if", "(", "j", ">", "0", ")", "{", "for", "(", "int", "k", "=", "0", ";", "k", "<=", "3", ";", "k", "++", ")", "{", "int", "l", "=", "1", "<<", "k", ";", "if", "(", "(", "i", "&", "l", ")", "!=", "0", "&&", "!", "canBePlacedOn", "(", "par1World", ".", "getBlockId", "(", "par2", "+", "Direction", ".", "offsetX", "[", "k", "]", ",", "par3", ",", "par4", "+", "Direction", ".", "offsetZ", "[", "k", "]", ")", ")", "&&", "(", "par1World", ".", "getBlockId", "(", "par2", ",", "par3", "+", "1", ",", "par4", ")", "!=", "blockID", "||", "(", "par1World", ".", "getBlockMetadata", "(", "par2", ",", "par3", "+", "1", ",", "par4", ")", "&", "l", ")", "==", "0", ")", ")", "{", "j", "&=", "~", "l", ";", "}", "}", "}", "if", "(", "j", "==", "0", "&&", "!", "canBePlacedOn", "(", "par1World", ".", "getBlockId", "(", "par2", ",", "par3", "+", "1", ",", "par4", ")", ")", ")", "{", "return", "false", ";", "}", "if", "(", "j", "!=", "i", ")", "{", "par1World", ".", "setBlockMetadataWithNotify", "(", "par2", ",", "par3", ",", "par4", ",", "j", ")", ";", "}", "return", "true", ";", "}", "public", "void", "onNeighborBlockChange", "(", "World", "par1World", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "int", "par5", ")", "{", "if", "(", "!", "par1World", ".", "isRemote", "&&", "!", "canVineStay", "(", "par1World", ",", "par2", ",", "par3", ",", "par4", ")", ")", "{", "dropBlockAsItem", "(", "par1World", ",", "par2", ",", "par3", ",", "par4", ",", "par1World", ".", "getBlockMetadata", "(", "par2", ",", "par3", ",", "par4", ")", ",", "0", ")", ";", "par1World", ".", "setBlockWithNotify", "(", "par2", ",", "par3", ",", "par4", ",", "0", ")", ";", "}", "}", "public", "void", "updateTick", "(", "World", "par1World", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "Random", "par5Random", ")", "{", "if", "(", "!", "par1World", ".", "isRemote", "&&", "par1World", ".", "rand", ".", "nextInt", "(", "4", ")", "==", "0", ")", "{", "byte", "byte0", "=", "4", ";", "int", "i", "=", "5", ";", "boolean", "flag", "=", "false", ";", "int", "j", "=", "par2", "-", "byte0", ";", "label0", ":", "do", "{", "if", "(", "j", ">", "par2", "+", "byte0", ")", "{", "break", ";", "}", "label1", ":", "for", "(", "int", "k", "=", "par4", "-", "byte0", ";", "k", "<=", "par4", "+", "byte0", ";", "k", "++", ")", "{", "int", "i1", "=", "par3", "-", "1", ";", "do", "{", "if", "(", "i1", ">", "par3", "+", "1", ")", "{", "continue", "label1", ";", "}", "if", "(", "par1World", ".", "getBlockId", "(", "j", ",", "i1", ",", "k", ")", "==", "blockID", "&&", "--", "i", "<=", "0", ")", "{", "flag", "=", "true", ";", "break", "label0", ";", "}", "i1", "++", ";", "}", "while", "(", "true", ")", ";", "}", "j", "++", ";", "}", "while", "(", "true", ")", ";", "j", "=", "par1World", ".", "getBlockMetadata", "(", "par2", ",", "par3", ",", "par4", ")", ";", "int", "l", "=", "par1World", ".", "rand", ".", "nextInt", "(", "6", ")", ";", "int", "j1", "=", "Direction", ".", "vineGrowth", "[", "l", "]", ";", "if", "(", "l", "==", "1", "&&", "par3", "<", "255", "&&", "par1World", ".", "isAirBlock", "(", "par2", ",", "par3", "+", "1", ",", "par4", ")", ")", "{", "if", "(", "flag", ")", "{", "return", ";", "}", "int", "k1", "=", "par1World", ".", "rand", ".", "nextInt", "(", "16", ")", "&", "j", ";", "if", "(", "k1", ">", "0", ")", "{", "for", "(", "int", "j2", "=", "0", ";", "j2", "<=", "3", ";", "j2", "++", ")", "{", "if", "(", "!", "canBePlacedOn", "(", "par1World", ".", "getBlockId", "(", "par2", "+", "Direction", ".", "offsetX", "[", "j2", "]", ",", "par3", "+", "1", ",", "par4", "+", "Direction", ".", "offsetZ", "[", "j2", "]", ")", ")", ")", "{", "k1", "&=", "~", "(", "1", "<<", "j2", ")", ";", "}", "}", "if", "(", "k1", ">", "0", ")", "{", "par1World", ".", "setBlockAndMetadataWithNotify", "(", "par2", ",", "par3", "+", "1", ",", "par4", ",", "blockID", ",", "k1", ")", ";", "}", "}", "}", "else", "if", "(", "l", ">=", "2", "&&", "l", "<=", "5", "&&", "(", "j", "&", "1", "<<", "j1", ")", "==", "0", ")", "{", "if", "(", "flag", ")", "{", "return", ";", "}", "int", "l1", "=", "par1World", ".", "getBlockId", "(", "par2", "+", "Direction", ".", "offsetX", "[", "j1", "]", ",", "par3", ",", "par4", "+", "Direction", ".", "offsetZ", "[", "j1", "]", ")", ";", "if", "(", "l1", "==", "0", "||", "Block", ".", "blocksList", "[", "l1", "]", "==", "null", ")", "{", "int", "k2", "=", "j1", "+", "1", "&", "3", ";", "int", "j3", "=", "j1", "+", "3", "&", "3", ";", "if", "(", "(", "j", "&", "1", "<<", "k2", ")", "!=", "0", "&&", "canBePlacedOn", "(", "par1World", ".", "getBlockId", "(", "par2", "+", "Direction", ".", "offsetX", "[", "j1", "]", "+", "Direction", ".", "offsetX", "[", "k2", "]", ",", "par3", ",", "par4", "+", "Direction", ".", "offsetZ", "[", "j1", "]", "+", "Direction", ".", "offsetZ", "[", "k2", "]", ")", ")", ")", "{", "par1World", ".", "setBlockAndMetadataWithNotify", "(", "par2", "+", "Direction", ".", "offsetX", "[", "j1", "]", ",", "par3", ",", "par4", "+", "Direction", ".", "offsetZ", "[", "j1", "]", ",", "blockID", ",", "1", "<<", "k2", ")", ";", "}", "else", "if", "(", "(", "j", "&", "1", "<<", "j3", ")", "!=", "0", "&&", "canBePlacedOn", "(", "par1World", ".", "getBlockId", "(", "par2", "+", "Direction", ".", "offsetX", "[", "j1", "]", "+", "Direction", ".", "offsetX", "[", "j3", "]", ",", "par3", ",", "par4", "+", "Direction", ".", "offsetZ", "[", "j1", "]", "+", "Direction", ".", "offsetZ", "[", "j3", "]", ")", ")", ")", "{", "par1World", ".", "setBlockAndMetadataWithNotify", "(", "par2", "+", "Direction", ".", "offsetX", "[", "j1", "]", ",", "par3", ",", "par4", "+", "Direction", ".", "offsetZ", "[", "j1", "]", ",", "blockID", ",", "1", "<<", "j3", ")", ";", "}", "else", "if", "(", "(", "j", "&", "1", "<<", "k2", ")", "!=", "0", "&&", "par1World", ".", "isAirBlock", "(", "par2", "+", "Direction", ".", "offsetX", "[", "j1", "]", "+", "Direction", ".", "offsetX", "[", "k2", "]", ",", "par3", ",", "par4", "+", "Direction", ".", "offsetZ", "[", "j1", "]", "+", "Direction", ".", "offsetZ", "[", "k2", "]", ")", "&&", "canBePlacedOn", "(", "par1World", ".", "getBlockId", "(", "par2", "+", "Direction", ".", "offsetX", "[", "k2", "]", ",", "par3", ",", "par4", "+", "Direction", ".", "offsetZ", "[", "k2", "]", ")", ")", ")", "{", "par1World", ".", "setBlockAndMetadataWithNotify", "(", "par2", "+", "Direction", ".", "offsetX", "[", "j1", "]", "+", "Direction", ".", "offsetX", "[", "k2", "]", ",", "par3", ",", "par4", "+", "Direction", ".", "offsetZ", "[", "j1", "]", "+", "Direction", ".", "offsetZ", "[", "k2", "]", ",", "blockID", ",", "1", "<<", "(", "j1", "+", "2", "&", "3", ")", ")", ";", "}", "else", "if", "(", "(", "j", "&", "1", "<<", "j3", ")", "!=", "0", "&&", "par1World", ".", "isAirBlock", "(", "par2", "+", "Direction", ".", "offsetX", "[", "j1", "]", "+", "Direction", ".", "offsetX", "[", "j3", "]", ",", "par3", ",", "par4", "+", "Direction", ".", "offsetZ", "[", "j1", "]", "+", "Direction", ".", "offsetZ", "[", "j3", "]", ")", "&&", "canBePlacedOn", "(", "par1World", ".", "getBlockId", "(", "par2", "+", "Direction", ".", "offsetX", "[", "j3", "]", ",", "par3", ",", "par4", "+", "Direction", ".", "offsetZ", "[", "j3", "]", ")", ")", ")", "{", "par1World", ".", "setBlockAndMetadataWithNotify", "(", "par2", "+", "Direction", ".", "offsetX", "[", "j1", "]", "+", "Direction", ".", "offsetX", "[", "j3", "]", ",", "par3", ",", "par4", "+", "Direction", ".", "offsetZ", "[", "j1", "]", "+", "Direction", ".", "offsetZ", "[", "j3", "]", ",", "blockID", ",", "1", "<<", "(", "j1", "+", "2", "&", "3", ")", ")", ";", "}", "else", "if", "(", "canBePlacedOn", "(", "par1World", ".", "getBlockId", "(", "par2", "+", "Direction", ".", "offsetX", "[", "j1", "]", ",", "par3", "+", "1", ",", "par4", "+", "Direction", ".", "offsetZ", "[", "j1", "]", ")", ")", ")", "{", "par1World", ".", "setBlockAndMetadataWithNotify", "(", "par2", "+", "Direction", ".", "offsetX", "[", "j1", "]", ",", "par3", ",", "par4", "+", "Direction", ".", "offsetZ", "[", "j1", "]", ",", "blockID", ",", "0", ")", ";", "}", "}", "else", "if", "(", "Block", ".", "blocksList", "[", "l1", "]", ".", "blockMaterial", ".", "isOpaque", "(", ")", "&&", "Block", ".", "blocksList", "[", "l1", "]", ".", "renderAsNormalBlock", "(", ")", ")", "{", "par1World", ".", "setBlockMetadataWithNotify", "(", "par2", ",", "par3", ",", "par4", ",", "j", "|", "1", "<<", "j1", ")", ";", "}", "}", "else", "if", "(", "par3", ">", "1", ")", "{", "int", "i2", "=", "par1World", ".", "getBlockId", "(", "par2", ",", "par3", "-", "1", ",", "par4", ")", ";", "if", "(", "i2", "==", "0", ")", "{", "int", "l2", "=", "par1World", ".", "rand", ".", "nextInt", "(", "16", ")", "&", "j", ";", "if", "(", "l2", ">", "0", ")", "{", "par1World", ".", "setBlockAndMetadataWithNotify", "(", "par2", ",", "par3", "-", "1", ",", "par4", ",", "blockID", ",", "l2", ")", ";", "}", "}", "else", "if", "(", "i2", "==", "blockID", ")", "{", "int", "i3", "=", "par1World", ".", "rand", ".", "nextInt", "(", "16", ")", "&", "j", ";", "int", "k3", "=", "par1World", ".", "getBlockMetadata", "(", "par2", ",", "par3", "-", "1", ",", "par4", ")", ";", "if", "(", "k3", "!=", "(", "k3", "|", "i3", ")", ")", "{", "par1World", ".", "setBlockMetadataWithNotify", "(", "par2", ",", "par3", "-", "1", ",", "par4", ",", "k3", "|", "i3", ")", ";", "}", "}", "}", "}", "}", "public", "void", "onBlockPlaced", "(", "World", "par1World", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "int", "par5", ")", "{", "byte", "byte0", "=", "0", ";", "switch", "(", "par5", ")", "{", "case", "2", ":", "byte0", "=", "1", ";", "break", ";", "case", "3", ":", "byte0", "=", "4", ";", "break", ";", "case", "4", ":", "byte0", "=", "8", ";", "break", ";", "case", "5", ":", "byte0", "=", "2", ";", "break", ";", "}", "if", "(", "byte0", "!=", "0", ")", "{", "par1World", ".", "setBlockMetadataWithNotify", "(", "par2", ",", "par3", ",", "par4", ",", "byte0", ")", ";", "}", "}", "public", "int", "idDropped", "(", "int", "par1", ",", "Random", "par2Random", ",", "int", "par3", ")", "{", "return", "0", ";", "}", "public", "int", "quantityDropped", "(", "Random", "par1Random", ")", "{", "return", "0", ";", "}", "public", "void", "harvestBlock", "(", "World", "par1World", ",", "EntityPlayer", "par2EntityPlayer", ",", "int", "par3", ",", "int", "par4", ",", "int", "par5", ",", "int", "par6", ")", "{", "if", "(", "!", "par1World", ".", "isRemote", "&&", "par2EntityPlayer", ".", "getCurrentEquippedItem", "(", ")", "!=", "null", "&&", "par2EntityPlayer", ".", "getCurrentEquippedItem", "(", ")", ".", "itemID", "==", "Item", ".", "shears", ".", "shiftedIndex", ")", "{", "par2EntityPlayer", ".", "addStat", "(", "StatList", ".", "mineBlockStatArray", "[", "blockID", "]", ",", "1", ")", ";", "dropBlockAsItem_do", "(", "par1World", ",", "par3", ",", "par4", ",", "par5", ",", "new", "ItemStack", "(", "Block", ".", "vine", ",", "1", ",", "0", ")", ")", ";", "}", "else", "{", "super", ".", "harvestBlock", "(", "par1World", ",", "par2EntityPlayer", ",", "par3", ",", "par4", ",", "par5", ",", "par6", ")", ";", "}", "}", "}", "</s>" ]
9,831
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "io", ".", "BufferedReader", ";", "import", "java", ".", "io", ".", "InputStreamReader", ";", "public", "class", "ChatAllowedCharacters", "{", "public", "static", "final", "String", "allowedCharacters", "=", "getAllowedCharacters", "(", ")", ";", "public", "static", "final", "char", "allowedCharactersArray", "[", "]", "=", "{", "'/'", ",", "'\\n'", ",", "'\\r'", ",", "'\\t'", ",", "'\\0'", ",", "'\\f'", ",", "'`'", ",", "'?'", ",", "'*'", ",", "'\\\\'", ",", "'<'", ",", "'>'", ",", "'|'", ",", "'\"'", ",", "':'", "}", ";", "public", "ChatAllowedCharacters", "(", ")", "{", "}", "private", "static", "String", "getAllowedCharacters", "(", ")", "{", "String", "s", "=", "\"\"", ";", "try", "{", "BufferedReader", "bufferedreader", "=", "new", "BufferedReader", "(", "new", "InputStreamReader", "(", "(", "net", ".", "minecraft", ".", "src", ".", "ChatAllowedCharacters", ".", "class", ")", ".", "getResourceAsStream", "(", "\"/font.txt\"", ")", ",", "\"UTF-8\"", ")", ")", ";", "String", "s1", "=", "\"\"", ";", "do", "{", "String", "s2", ";", "if", "(", "(", "s2", "=", "bufferedreader", ".", "readLine", "(", ")", ")", "==", "null", ")", "{", "break", ";", "}", "if", "(", "!", "s2", ".", "startsWith", "(", "\"#\"", ")", ")", "{", "s", "=", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "s", ")", ".", "append", "(", "s2", ")", ".", "toString", "(", ")", ";", "}", "}", "while", "(", "true", ")", ";", "bufferedreader", ".", "close", "(", ")", ";", "}", "catch", "(", "Exception", "exception", ")", "{", "}", "return", "s", ";", "}", "public", "static", "final", "boolean", "isAllowedCharacter", "(", "char", "par0", ")", "{", "return", "par0", "!=", "'\\247'", "&&", "(", "allowedCharacters", ".", "indexOf", "(", "par0", ")", ">=", "0", "||", "par0", ">", "'", "'", ")", ";", "}", "}", "</s>" ]
9,832
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "io", ".", "PrintStream", ";", "import", "java", ".", "util", ".", "ArrayList", ";", "import", "java", ".", "util", ".", "Iterator", ";", "public", "class", "EntityAITasks", "{", "private", "ArrayList", "tasksToDo", ";", "private", "ArrayList", "executingTasks", ";", "public", "EntityAITasks", "(", ")", "{", "tasksToDo", "=", "new", "ArrayList", "(", ")", ";", "executingTasks", "=", "new", "ArrayList", "(", ")", ";", "}", "public", "void", "addTask", "(", "int", "par1", ",", "EntityAIBase", "par2EntityAIBase", ")", "{", "tasksToDo", ".", "add", "(", "new", "EntityAITaskEntry", "(", "this", ",", "par1", ",", "par2EntityAIBase", ")", ")", ";", "}", "public", "void", "onUpdateTasks", "(", ")", "{", "ArrayList", "arraylist", "=", "new", "ArrayList", "(", ")", ";", "Iterator", "iterator", "=", "tasksToDo", ".", "iterator", "(", ")", ";", "do", "{", "if", "(", "!", "iterator", ".", "hasNext", "(", ")", ")", "{", "break", ";", "}", "EntityAITaskEntry", "entityaitaskentry", "=", "(", "EntityAITaskEntry", ")", "iterator", ".", "next", "(", ")", ";", "boolean", "flag1", "=", "executingTasks", ".", "contains", "(", "entityaitaskentry", ")", ";", "if", "(", "flag1", ")", "{", "if", "(", "func_46136_a", "(", "entityaitaskentry", ")", "&&", "entityaitaskentry", ".", "action", ".", "continueExecuting", "(", ")", ")", "{", "continue", ";", "}", "entityaitaskentry", ".", "action", ".", "resetTask", "(", ")", ";", "executingTasks", ".", "remove", "(", "entityaitaskentry", ")", ";", "}", "if", "(", "func_46136_a", "(", "entityaitaskentry", ")", "&&", "entityaitaskentry", ".", "action", ".", "shouldExecute", "(", ")", ")", "{", "arraylist", ".", "add", "(", "entityaitaskentry", ")", ";", "executingTasks", ".", "add", "(", "entityaitaskentry", ")", ";", "}", "}", "while", "(", "true", ")", ";", "boolean", "flag", "=", "false", ";", "if", "(", "flag", "&&", "arraylist", ".", "size", "(", ")", ">", "0", ")", "{", "System", ".", "out", ".", "println", "(", "\"Starting:", "\"", ")", ";", "}", "EntityAITaskEntry", "entityaitaskentry1", ";", "for", "(", "Iterator", "iterator1", "=", "arraylist", ".", "iterator", "(", ")", ";", "iterator1", ".", "hasNext", "(", ")", ";", "entityaitaskentry1", ".", "action", ".", "startExecuting", "(", ")", ")", "{", "entityaitaskentry1", "=", "(", "EntityAITaskEntry", ")", "iterator1", ".", "next", "(", ")", ";", "if", "(", "flag", ")", "{", "System", ".", "out", ".", "println", "(", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "entityaitaskentry1", ".", "action", ".", "toString", "(", ")", ")", ".", "append", "(", "\",", "\"", ")", ".", "toString", "(", ")", ")", ";", "}", "}", "if", "(", "flag", "&&", "executingTasks", ".", "size", "(", ")", ">", "0", ")", "{", "System", ".", "out", ".", "println", "(", "\"Running:", "\"", ")", ";", "}", "EntityAITaskEntry", "entityaitaskentry2", ";", "for", "(", "Iterator", "iterator2", "=", "executingTasks", ".", "iterator", "(", ")", ";", "iterator2", ".", "hasNext", "(", ")", ";", "entityaitaskentry2", ".", "action", ".", "updateTask", "(", ")", ")", "{", "entityaitaskentry2", "=", "(", "EntityAITaskEntry", ")", "iterator2", ".", "next", "(", ")", ";", "if", "(", "flag", ")", "{", "System", ".", "out", ".", "println", "(", "entityaitaskentry2", ".", "action", ".", "toString", "(", ")", ")", ";", "}", "}", "}", "private", "boolean", "func_46136_a", "(", "EntityAITaskEntry", "par1EntityAITaskEntry", ")", "{", "label0", ":", "{", "Iterator", "iterator", "=", "tasksToDo", ".", "iterator", "(", ")", ";", "EntityAITaskEntry", "entityaitaskentry", ";", "label1", ":", "do", "{", "do", "{", "do", "{", "if", "(", "!", "iterator", ".", "hasNext", "(", ")", ")", "{", "break", "label0", ";", "}", "entityaitaskentry", "=", "(", "EntityAITaskEntry", ")", "iterator", ".", "next", "(", ")", ";", "}", "while", "(", "entityaitaskentry", "==", "par1EntityAITaskEntry", ")", ";", "if", "(", "par1EntityAITaskEntry", ".", "priority", "<", "entityaitaskentry", ".", "priority", ")", "{", "continue", "label1", ";", "}", "}", "while", "(", "!", "executingTasks", ".", "contains", "(", "entityaitaskentry", ")", "||", "areTasksCompatible", "(", "par1EntityAITaskEntry", ",", "entityaitaskentry", ")", ")", ";", "return", "false", ";", "}", "while", "(", "!", "executingTasks", ".", "contains", "(", "entityaitaskentry", ")", "||", "entityaitaskentry", ".", "action", ".", "isContinuous", "(", ")", ")", ";", "return", "false", ";", "}", "return", "true", ";", "}", "private", "boolean", "areTasksCompatible", "(", "EntityAITaskEntry", "par1EntityAITaskEntry", ",", "EntityAITaskEntry", "par2EntityAITaskEntry", ")", "{", "return", "(", "par1EntityAITaskEntry", ".", "action", ".", "getMutexBits", "(", ")", "&", "par2EntityAITaskEntry", ".", "action", ".", "getMutexBits", "(", ")", ")", "==", "0", ";", "}", "}", "</s>" ]
9,833
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "Random", ";", "public", "class", "BlockCake", "extends", "Block", "{", "protected", "BlockCake", "(", "int", "par1", ",", "int", "par2", ")", "{", "super", "(", "par1", ",", "par2", ",", "Material", ".", "cake", ")", ";", "setTickRandomly", "(", "true", ")", ";", "}", "public", "void", "setBlockBoundsBasedOnState", "(", "IBlockAccess", "par1IBlockAccess", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ")", "{", "int", "i", "=", "par1IBlockAccess", ".", "getBlockMetadata", "(", "par2", ",", "par3", ",", "par4", ")", ";", "float", "f", "=", "0.0625F", ";", "float", "f1", "=", "(", "float", ")", "(", "1", "+", "i", "*", "2", ")", "/", "16F", ";", "float", "f2", "=", "0.5F", ";", "setBlockBounds", "(", "f1", ",", "0.0F", ",", "f", ",", "1.0F", "-", "f", ",", "f2", ",", "1.0F", "-", "f", ")", ";", "}", "public", "void", "setBlockBoundsForItemRender", "(", ")", "{", "float", "f", "=", "0.0625F", ";", "float", "f1", "=", "0.5F", ";", "setBlockBounds", "(", "f", ",", "0.0F", ",", "f", ",", "1.0F", "-", "f", ",", "f1", ",", "1.0F", "-", "f", ")", ";", "}", "public", "AxisAlignedBB", "getCollisionBoundingBoxFromPool", "(", "World", "par1World", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ")", "{", "int", "i", "=", "par1World", ".", "getBlockMetadata", "(", "par2", ",", "par3", ",", "par4", ")", ";", "float", "f", "=", "0.0625F", ";", "float", "f1", "=", "(", "float", ")", "(", "1", "+", "i", "*", "2", ")", "/", "16F", ";", "float", "f2", "=", "0.5F", ";", "return", "AxisAlignedBB", ".", "getBoundingBoxFromPool", "(", "(", "float", ")", "par2", "+", "f1", ",", "par3", ",", "(", "float", ")", "par4", "+", "f", ",", "(", "float", ")", "(", "par2", "+", "1", ")", "-", "f", ",", "(", "(", "float", ")", "par3", "+", "f2", ")", "-", "f", ",", "(", "float", ")", "(", "par4", "+", "1", ")", "-", "f", ")", ";", "}", "public", "int", "getBlockTextureFromSideAndMetadata", "(", "int", "par1", ",", "int", "par2", ")", "{", "if", "(", "par1", "==", "1", ")", "{", "return", "blockIndexInTexture", ";", "}", "if", "(", "par1", "==", "0", ")", "{", "return", "blockIndexInTexture", "+", "3", ";", "}", "if", "(", "par2", ">", "0", "&&", "par1", "==", "4", ")", "{", "return", "blockIndexInTexture", "+", "2", ";", "}", "else", "{", "return", "blockIndexInTexture", "+", "1", ";", "}", "}", "public", "int", "getBlockTextureFromSide", "(", "int", "par1", ")", "{", "if", "(", "par1", "==", "1", ")", "{", "return", "blockIndexInTexture", ";", "}", "if", "(", "par1", "==", "0", ")", "{", "return", "blockIndexInTexture", "+", "3", ";", "}", "else", "{", "return", "blockIndexInTexture", "+", "1", ";", "}", "}", "public", "boolean", "renderAsNormalBlock", "(", ")", "{", "return", "false", ";", "}", "public", "boolean", "isOpaqueCube", "(", ")", "{", "return", "false", ";", "}", "public", "boolean", "blockActivated", "(", "World", "par1World", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "EntityPlayer", "par5EntityPlayer", ")", "{", "eatCakeSlice", "(", "par1World", ",", "par2", ",", "par3", ",", "par4", ",", "par5EntityPlayer", ")", ";", "return", "true", ";", "}", "public", "void", "onBlockClicked", "(", "World", "par1World", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "EntityPlayer", "par5EntityPlayer", ")", "{", "eatCakeSlice", "(", "par1World", ",", "par2", ",", "par3", ",", "par4", ",", "par5EntityPlayer", ")", ";", "}", "private", "void", "eatCakeSlice", "(", "World", "par1World", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "EntityPlayer", "par5EntityPlayer", ")", "{", "if", "(", "par5EntityPlayer", ".", "canEat", "(", "false", ")", ")", "{", "par5EntityPlayer", ".", "getFoodStats", "(", ")", ".", "addStats", "(", "2", ",", "0.1F", ")", ";", "int", "i", "=", "par1World", ".", "getBlockMetadata", "(", "par2", ",", "par3", ",", "par4", ")", "+", "1", ";", "if", "(", "i", ">=", "6", ")", "{", "par1World", ".", "setBlockWithNotify", "(", "par2", ",", "par3", ",", "par4", ",", "0", ")", ";", "}", "else", "{", "par1World", ".", "setBlockMetadataWithNotify", "(", "par2", ",", "par3", ",", "par4", ",", "i", ")", ";", "par1World", ".", "markBlockAsNeedsUpdate", "(", "par2", ",", "par3", ",", "par4", ")", ";", "}", "}", "}", "public", "boolean", "canPlaceBlockAt", "(", "World", "par1World", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ")", "{", "if", "(", "!", "super", ".", "canPlaceBlockAt", "(", "par1World", ",", "par2", ",", "par3", ",", "par4", ")", ")", "{", "return", "false", ";", "}", "else", "{", "return", "canBlockStay", "(", "par1World", ",", "par2", ",", "par3", ",", "par4", ")", ";", "}", "}", "public", "void", "onNeighborBlockChange", "(", "World", "par1World", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "int", "par5", ")", "{", "if", "(", "!", "canBlockStay", "(", "par1World", ",", "par2", ",", "par3", ",", "par4", ")", ")", "{", "dropBlockAsItem", "(", "par1World", ",", "par2", ",", "par3", ",", "par4", ",", "par1World", ".", "getBlockMetadata", "(", "par2", ",", "par3", ",", "par4", ")", ",", "0", ")", ";", "par1World", ".", "setBlockWithNotify", "(", "par2", ",", "par3", ",", "par4", ",", "0", ")", ";", "}", "}", "public", "boolean", "canBlockStay", "(", "World", "par1World", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ")", "{", "return", "par1World", ".", "getBlockMaterial", "(", "par2", ",", "par3", "-", "1", ",", "par4", ")", ".", "isSolid", "(", ")", ";", "}", "public", "int", "quantityDropped", "(", "Random", "par1Random", ")", "{", "return", "0", ";", "}", "public", "int", "idDropped", "(", "int", "par1", ",", "Random", "par2Random", ",", "int", "par3", ")", "{", "return", "0", ";", "}", "}", "</s>" ]
9,834
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "List", ";", "import", "java", ".", "util", ".", "Random", ";", "public", "class", "ComponentStrongholdChestCorridor", "extends", "ComponentStronghold", "{", "private", "static", "final", "StructurePieceTreasure", "chestLoot", "[", "]", ";", "private", "final", "EnumDoor", "doorType", ";", "private", "boolean", "hasMadeChest", ";", "public", "ComponentStrongholdChestCorridor", "(", "int", "par1", ",", "Random", "par2Random", ",", "StructureBoundingBox", "par3StructureBoundingBox", ",", "int", "par4", ")", "{", "super", "(", "par1", ")", ";", "coordBaseMode", "=", "par4", ";", "doorType", "=", "getRandomDoor", "(", "par2Random", ")", ";", "boundingBox", "=", "par3StructureBoundingBox", ";", "}", "public", "void", "buildComponent", "(", "StructureComponent", "par1StructureComponent", ",", "List", "par2List", ",", "Random", "par3Random", ")", "{", "getNextComponentNormal", "(", "(", "ComponentStrongholdStairs2", ")", "par1StructureComponent", ",", "par2List", ",", "par3Random", ",", "1", ",", "1", ")", ";", "}", "public", "static", "ComponentStrongholdChestCorridor", "findValidPlacement", "(", "List", "par0List", ",", "Random", "par1Random", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "int", "par5", ",", "int", "par6", ")", "{", "StructureBoundingBox", "structureboundingbox", "=", "StructureBoundingBox", ".", "getComponentToAddBoundingBox", "(", "par2", ",", "par3", ",", "par4", ",", "-", "1", ",", "-", "1", ",", "0", ",", "5", ",", "5", ",", "7", ",", "par5", ")", ";", "if", "(", "!", "canStrongholdGoDeeper", "(", "structureboundingbox", ")", "||", "StructureComponent", ".", "findIntersecting", "(", "par0List", ",", "structureboundingbox", ")", "!=", "null", ")", "{", "return", "null", ";", "}", "else", "{", "return", "new", "ComponentStrongholdChestCorridor", "(", "par6", ",", "par1Random", ",", "structureboundingbox", ",", "par5", ")", ";", "}", "}", "public", "boolean", "addComponentParts", "(", "World", "par1World", ",", "Random", "par2Random", ",", "StructureBoundingBox", "par3StructureBoundingBox", ")", "{", "if", "(", "isLiquidInStructureBoundingBox", "(", "par1World", ",", "par3StructureBoundingBox", ")", ")", "{", "return", "false", ";", "}", "fillWithRandomizedBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "0", ",", "0", ",", "0", ",", "4", ",", "4", ",", "6", ",", "true", ",", "par2Random", ",", "StructureStrongholdPieces", ".", "getStrongholdStones", "(", ")", ")", ";", "placeDoor", "(", "par1World", ",", "par2Random", ",", "par3StructureBoundingBox", ",", "doorType", ",", "1", ",", "1", ",", "0", ")", ";", "placeDoor", "(", "par1World", ",", "par2Random", ",", "par3StructureBoundingBox", ",", "EnumDoor", ".", "OPENING", ",", "1", ",", "1", ",", "6", ")", ";", "fillWithBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "3", ",", "1", ",", "2", ",", "3", ",", "1", ",", "4", ",", "Block", ".", "stoneBrick", ".", "blockID", ",", "Block", ".", "stoneBrick", ".", "blockID", ",", "false", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "stairSingle", ".", "blockID", ",", "5", ",", "3", ",", "1", ",", "1", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "stairSingle", ".", "blockID", ",", "5", ",", "3", ",", "1", ",", "5", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "stairSingle", ".", "blockID", ",", "5", ",", "3", ",", "2", ",", "2", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "stairSingle", ".", "blockID", ",", "5", ",", "3", ",", "2", ",", "4", ",", "par3StructureBoundingBox", ")", ";", "for", "(", "int", "i", "=", "2", ";", "i", "<=", "4", ";", "i", "++", ")", "{", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "stairSingle", ".", "blockID", ",", "5", ",", "2", ",", "1", ",", "i", ",", "par3StructureBoundingBox", ")", ";", "}", "if", "(", "!", "hasMadeChest", ")", "{", "int", "j", "=", "getYWithOffset", "(", "2", ")", ";", "int", "k", "=", "getXWithOffset", "(", "3", ",", "3", ")", ";", "int", "l", "=", "getZWithOffset", "(", "3", ",", "3", ")", ";", "if", "(", "par3StructureBoundingBox", ".", "isVecInside", "(", "k", ",", "j", ",", "l", ")", ")", "{", "hasMadeChest", "=", "true", ";", "createTreasureChestAtCurrentPosition", "(", "par1World", ",", "par3StructureBoundingBox", ",", "par2Random", ",", "3", ",", "2", ",", "3", ",", "chestLoot", ",", "2", "+", "par2Random", ".", "nextInt", "(", "2", ")", ")", ";", "}", "}", "return", "true", ";", "}", "static", "{", "chestLoot", "=", "(", "new", "StructurePieceTreasure", "[", "]", "{", "new", "StructurePieceTreasure", "(", "Item", ".", "enderPearl", ".", "shiftedIndex", ",", "0", ",", "1", ",", "1", ",", "10", ")", ",", "new", "StructurePieceTreasure", "(", "Item", ".", "diamond", ".", "shiftedIndex", ",", "0", ",", "1", ",", "3", ",", "3", ")", ",", "new", "StructurePieceTreasure", "(", "Item", ".", "ingotIron", ".", "shiftedIndex", ",", "0", ",", "1", ",", "5", ",", "10", ")", ",", "new", "StructurePieceTreasure", "(", "Item", ".", "ingotGold", ".", "shiftedIndex", ",", "0", ",", "1", ",", "3", ",", "5", ")", ",", "new", "StructurePieceTreasure", "(", "Item", ".", "redstone", ".", "shiftedIndex", ",", "0", ",", "4", ",", "9", ",", "5", ")", ",", "new", "StructurePieceTreasure", "(", "Item", ".", "bread", ".", "shiftedIndex", ",", "0", ",", "1", ",", "3", ",", "15", ")", ",", "new", "StructurePieceTreasure", "(", "Item", ".", "appleRed", ".", "shiftedIndex", ",", "0", ",", "1", ",", "3", ",", "15", ")", ",", "new", "StructurePieceTreasure", "(", "Item", ".", "pickaxeSteel", ".", "shiftedIndex", ",", "0", ",", "1", ",", "1", ",", "5", ")", ",", "new", "StructurePieceTreasure", "(", "Item", ".", "swordSteel", ".", "shiftedIndex", ",", "0", ",", "1", ",", "1", ",", "5", ")", ",", "new", "StructurePieceTreasure", "(", "Item", ".", "plateSteel", ".", "shiftedIndex", ",", "0", ",", "1", ",", "1", ",", "5", ")", ",", "new", "StructurePieceTreasure", "(", "Item", ".", "helmetSteel", ".", "shiftedIndex", ",", "0", ",", "1", ",", "1", ",", "5", ")", ",", "new", "StructurePieceTreasure", "(", "Item", ".", "legsSteel", ".", "shiftedIndex", ",", "0", ",", "1", ",", "1", ",", "5", ")", ",", "new", "StructurePieceTreasure", "(", "Item", ".", "bootsSteel", ".", "shiftedIndex", ",", "0", ",", "1", ",", "1", ",", "5", ")", ",", "new", "StructurePieceTreasure", "(", "Item", ".", "appleGold", ".", "shiftedIndex", ",", "0", ",", "1", ",", "1", ",", "1", ")", "}", ")", ";", "}", "}", "</s>" ]
9,835
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "logging", ".", "*", ";", "import", "javax", ".", "swing", ".", "JTextArea", ";", "import", "javax", ".", "swing", ".", "text", ".", "Document", ";", "public", "class", "GuiLogOutputHandler", "extends", "Handler", "{", "private", "int", "field_998_b", "[", "]", ";", "private", "int", "field_1001_c", ";", "Formatter", "field_999_a", ";", "private", "JTextArea", "field_1000_d", ";", "public", "GuiLogOutputHandler", "(", "JTextArea", "par1JTextArea", ")", "{", "field_998_b", "=", "new", "int", "[", "1024", "]", ";", "field_1001_c", "=", "0", ";", "field_999_a", "=", "new", "GuiLogFormatter", "(", "this", ")", ";", "setFormatter", "(", "field_999_a", ")", ";", "field_1000_d", "=", "par1JTextArea", ";", "}", "public", "void", "close", "(", ")", "{", "}", "public", "void", "flush", "(", ")", "{", "}", "public", "void", "publish", "(", "LogRecord", "par1LogRecord", ")", "{", "int", "i", "=", "field_1000_d", ".", "getDocument", "(", ")", ".", "getLength", "(", ")", ";", "field_1000_d", ".", "append", "(", "field_999_a", ".", "format", "(", "par1LogRecord", ")", ")", ";", "field_1000_d", ".", "setCaretPosition", "(", "field_1000_d", ".", "getDocument", "(", ")", ".", "getLength", "(", ")", ")", ";", "int", "j", "=", "field_1000_d", ".", "getDocument", "(", ")", ".", "getLength", "(", ")", "-", "i", ";", "if", "(", "field_998_b", "[", "field_1001_c", "]", "!=", "0", ")", "{", "field_1000_d", ".", "replaceRange", "(", "\"\"", ",", "0", ",", "field_998_b", "[", "field_1001_c", "]", ")", ";", "}", "field_998_b", "[", "field_1001_c", "]", "=", "j", ";", "field_1001_c", "=", "(", "field_1001_c", "+", "1", ")", "%", "1024", ";", "}", "}", "</s>" ]
9,836
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "io", ".", "*", ";", "public", "class", "Packet52MultiBlockChange", "extends", "Packet", "{", "public", "int", "xPosition", ";", "public", "int", "zPosition", ";", "public", "byte", "metadataArray", "[", "]", ";", "public", "int", "size", ";", "private", "static", "byte", "field_48123_e", "[", "]", "=", "new", "byte", "[", "0", "]", ";", "public", "Packet52MultiBlockChange", "(", ")", "{", "isChunkDataPacket", "=", "true", ";", "}", "public", "Packet52MultiBlockChange", "(", "int", "par1", ",", "int", "par2", ",", "short", "par3ArrayOfShort", "[", "]", ",", "int", "par4", ",", "World", "par5World", ")", "{", "isChunkDataPacket", "=", "true", ";", "xPosition", "=", "par1", ";", "zPosition", "=", "par2", ";", "size", "=", "par4", ";", "int", "i", "=", "4", "*", "par4", ";", "Chunk", "chunk", "=", "par5World", ".", "getChunkFromChunkCoords", "(", "par1", ",", "par2", ")", ";", "try", "{", "if", "(", "par4", ">=", "64", ")", "{", "System", ".", "out", ".", "println", "(", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "\"\"", ")", ".", "append", "(", "par4", ")", ".", "toString", "(", ")", ")", ";", "if", "(", "field_48123_e", ".", "length", "<", "i", ")", "{", "field_48123_e", "=", "new", "byte", "[", "i", "]", ";", "}", "}", "else", "{", "ByteArrayOutputStream", "bytearrayoutputstream", "=", "new", "ByteArrayOutputStream", "(", "i", ")", ";", "DataOutputStream", "dataoutputstream", "=", "new", "DataOutputStream", "(", "bytearrayoutputstream", ")", ";", "for", "(", "int", "j", "=", "0", ";", "j", "<", "par4", ";", "j", "++", ")", "{", "int", "k", "=", "par3ArrayOfShort", "[", "j", "]", ">>", "12", "&", "0xf", ";", "int", "l", "=", "par3ArrayOfShort", "[", "j", "]", ">>", "8", "&", "0xf", ";", "int", "i1", "=", "par3ArrayOfShort", "[", "j", "]", "&", "0xff", ";", "dataoutputstream", ".", "writeShort", "(", "par3ArrayOfShort", "[", "j", "]", ")", ";", "dataoutputstream", ".", "writeShort", "(", "(", "short", ")", "(", "(", "chunk", ".", "getBlockID", "(", "k", ",", "i1", ",", "l", ")", "&", "0xfff", ")", "<<", "4", "|", "chunk", ".", "getBlockMetadata", "(", "k", ",", "i1", ",", "l", ")", "&", "0xf", ")", ")", ";", "}", "metadataArray", "=", "bytearrayoutputstream", ".", "toByteArray", "(", ")", ";", "if", "(", "metadataArray", ".", "length", "!=", "i", ")", "{", "throw", "new", "RuntimeException", "(", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "\"\"", ")", ".", "append", "(", "i", ")", ".", "append", "(", "\"\"", ")", ".", "append", "(", "metadataArray", ".", "length", ")", ".", "toString", "(", ")", ")", ";", "}", "}", "}", "catch", "(", "IOException", "ioexception", ")", "{", "System", ".", "err", ".", "println", "(", "ioexception", ".", "getMessage", "(", ")", ")", ";", "metadataArray", "=", "null", ";", "}", "}", "public", "void", "readPacketData", "(", "DataInputStream", "par1DataInputStream", ")", "throws", "IOException", "{", "xPosition", "=", "par1DataInputStream", ".", "readInt", "(", ")", ";", "zPosition", "=", "par1DataInputStream", ".", "readInt", "(", ")", ";", "size", "=", "par1DataInputStream", ".", "readShort", "(", ")", "&", "0xffff", ";", "int", "i", "=", "par1DataInputStream", ".", "readInt", "(", ")", ";", "if", "(", "i", ">", "0", ")", "{", "metadataArray", "=", "new", "byte", "[", "i", "]", ";", "par1DataInputStream", ".", "readFully", "(", "metadataArray", ")", ";", "}", "}", "public", "void", "writePacketData", "(", "DataOutputStream", "par1DataOutputStream", ")", "throws", "IOException", "{", "par1DataOutputStream", ".", "writeInt", "(", "xPosition", ")", ";", "par1DataOutputStream", ".", "writeInt", "(", "zPosition", ")", ";", "par1DataOutputStream", ".", "writeShort", "(", "(", "short", ")", "size", ")", ";", "if", "(", "metadataArray", "!=", "null", ")", "{", "par1DataOutputStream", ".", "writeInt", "(", "metadataArray", ".", "length", ")", ";", "par1DataOutputStream", ".", "write", "(", "metadataArray", ")", ";", "}", "else", "{", "par1DataOutputStream", ".", "writeInt", "(", "0", ")", ";", "}", "}", "public", "void", "processPacket", "(", "NetHandler", "par1NetHandler", ")", "{", "par1NetHandler", ".", "handleMultiBlockChange", "(", "this", ")", ";", "}", "public", "int", "getPacketSize", "(", ")", "{", "return", "10", "+", "size", "*", "4", ";", "}", "}", "</s>" ]
9,837
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "io", ".", "PrintStream", ";", "import", "java", ".", "util", ".", "*", ";", "import", "java", ".", "util", ".", "logging", ".", "Logger", ";", "import", "net", ".", "minecraft", ".", "server", ".", "MinecraftServer", ";", "public", "class", "NetServerHandler", "extends", "NetHandler", "implements", "ICommandListener", "{", "public", "static", "Logger", "logger", "=", "Logger", ".", "getLogger", "(", "\"Minecraft\"", ")", ";", "public", "NetworkManager", "netManager", ";", "public", "boolean", "connectionClosed", ";", "private", "MinecraftServer", "mcServer", ";", "private", "EntityPlayerMP", "playerEntity", ";", "private", "int", "field_35009_f", ";", "private", "int", "playerInAirTime", ";", "private", "boolean", "field_22003_h", ";", "private", "int", "field_35013_i", ";", "private", "long", "field_35011_j", ";", "private", "static", "Random", "rndmObj", "=", "new", "Random", "(", ")", ";", "private", "long", "field_35010_l", ";", "private", "int", "field_45001_m", ";", "private", "int", "field_48073_n", ";", "private", "double", "lastPosX", ";", "private", "double", "lastPosY", ";", "private", "double", "lastPosZ", ";", "private", "boolean", "hasMoved", ";", "private", "IntHashMap", "field_10_k", ";", "public", "NetServerHandler", "(", "MinecraftServer", "par1MinecraftServer", ",", "NetworkManager", "par2NetworkManager", ",", "EntityPlayerMP", "par3EntityPlayerMP", ")", "{", "connectionClosed", "=", "false", ";", "field_45001_m", "=", "0", ";", "field_48073_n", "=", "0", ";", "hasMoved", "=", "true", ";", "field_10_k", "=", "new", "IntHashMap", "(", ")", ";", "mcServer", "=", "par1MinecraftServer", ";", "netManager", "=", "par2NetworkManager", ";", "par2NetworkManager", ".", "setNetHandler", "(", "this", ")", ";", "playerEntity", "=", "par3EntityPlayerMP", ";", "par3EntityPlayerMP", ".", "playerNetServerHandler", "=", "this", ";", "}", "public", "void", "handlePackets", "(", ")", "{", "field_22003_h", "=", "false", ";", "field_35009_f", "++", ";", "netManager", ".", "processReadPackets", "(", ")", ";", "if", "(", "(", "long", ")", "field_35009_f", "-", "field_35010_l", ">", "20L", ")", "{", "field_35010_l", "=", "field_35009_f", ";", "field_35011_j", "=", "System", ".", "nanoTime", "(", ")", "/", "0xf4240L", ";", "field_35013_i", "=", "rndmObj", ".", "nextInt", "(", ")", ";", "sendPacket", "(", "new", "Packet0KeepAlive", "(", "field_35013_i", ")", ")", ";", "}", "if", "(", "field_45001_m", ">", "0", ")", "{", "field_45001_m", "--", ";", "}", "if", "(", "field_48073_n", ">", "0", ")", "{", "field_48073_n", "--", ";", "}", "}", "public", "void", "kickPlayer", "(", "String", "par1Str", ")", "{", "if", "(", "connectionClosed", ")", "{", "return", ";", "}", "else", "{", "playerEntity", ".", "func_30002_A", "(", ")", ";", "sendPacket", "(", "new", "Packet255KickDisconnect", "(", "par1Str", ")", ")", ";", "netManager", ".", "serverShutdown", "(", ")", ";", "mcServer", ".", "configManager", ".", "sendPacketToAllPlayers", "(", "new", "Packet3Chat", "(", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "\"-UNK-e\"", ")", ".", "append", "(", "playerEntity", ".", "username", ")", ".", "append", "(", "\"\"", ")", ".", "toString", "(", ")", ")", ")", ";", "mcServer", ".", "configManager", ".", "playerLoggedOut", "(", "playerEntity", ")", ";", "connectionClosed", "=", "true", ";", "return", ";", "}", "}", "public", "void", "handleFlying", "(", "Packet10Flying", "par1Packet10Flying", ")", "{", "WorldServer", "worldserver", "=", "mcServer", ".", "getWorldManager", "(", "playerEntity", ".", "dimension", ")", ";", "field_22003_h", "=", "true", ";", "if", "(", "playerEntity", ".", "gameOver", ")", "{", "return", ";", "}", "if", "(", "!", "hasMoved", ")", "{", "double", "d", "=", "par1Packet10Flying", ".", "yPosition", "-", "lastPosY", ";", "if", "(", "par1Packet10Flying", ".", "xPosition", "==", "lastPosX", "&&", "d", "*", "d", "<", "0.01D", "&&", "par1Packet10Flying", ".", "zPosition", "==", "lastPosZ", ")", "{", "hasMoved", "=", "true", ";", "}", "}", "if", "(", "hasMoved", ")", "{", "if", "(", "playerEntity", ".", "ridingEntity", "!=", "null", ")", "{", "float", "f", "=", "playerEntity", ".", "rotationYaw", ";", "float", "f1", "=", "playerEntity", ".", "rotationPitch", ";", "playerEntity", ".", "ridingEntity", ".", "updateRiderPosition", "(", ")", ";", "double", "d2", "=", "playerEntity", ".", "posX", ";", "double", "d4", "=", "playerEntity", ".", "posY", ";", "double", "d6", "=", "playerEntity", ".", "posZ", ";", "double", "d8", "=", "0.0D", ";", "double", "d9", "=", "0.0D", ";", "if", "(", "par1Packet10Flying", ".", "rotating", ")", "{", "f", "=", "par1Packet10Flying", ".", "yaw", ";", "f1", "=", "par1Packet10Flying", ".", "pitch", ";", "}", "if", "(", "par1Packet10Flying", ".", "moving", "&&", "par1Packet10Flying", ".", "yPosition", "==", "-", "999D", "&&", "par1Packet10Flying", ".", "stance", "==", "-", "999D", ")", "{", "if", "(", "par1Packet10Flying", ".", "xPosition", ">", "1.0D", "||", "par1Packet10Flying", ".", "zPosition", ">", "1.0D", ")", "{", "System", ".", "err", ".", "println", "(", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "playerEntity", ".", "username", ")", ".", "append", "(", "\"\"", ")", ".", "toString", "(", ")", ")", ";", "kickPlayer", "(", "\"Nope!\"", ")", ";", "return", ";", "}", "d8", "=", "par1Packet10Flying", ".", "xPosition", ";", "d9", "=", "par1Packet10Flying", ".", "zPosition", ";", "}", "playerEntity", ".", "onGround", "=", "par1Packet10Flying", ".", "onGround", ";", "playerEntity", ".", "onUpdateEntity", "(", "true", ")", ";", "playerEntity", ".", "moveEntity", "(", "d8", ",", "0.0D", ",", "d9", ")", ";", "playerEntity", ".", "setPositionAndRotation", "(", "d2", ",", "d4", ",", "d6", ",", "f", ",", "f1", ")", ";", "playerEntity", ".", "motionX", "=", "d8", ";", "playerEntity", ".", "motionZ", "=", "d9", ";", "if", "(", "playerEntity", ".", "ridingEntity", "!=", "null", ")", "{", "worldserver", ".", "func_12017_b", "(", "playerEntity", ".", "ridingEntity", ",", "true", ")", ";", "}", "if", "(", "playerEntity", ".", "ridingEntity", "!=", "null", ")", "{", "playerEntity", ".", "ridingEntity", ".", "updateRiderPosition", "(", ")", ";", "}", "mcServer", ".", "configManager", ".", "serverUpdateMountedMovingPlayer", "(", "playerEntity", ")", ";", "lastPosX", "=", "playerEntity", ".", "posX", ";", "lastPosY", "=", "playerEntity", ".", "posY", ";", "lastPosZ", "=", "playerEntity", ".", "posZ", ";", "worldserver", ".", "updateEntity", "(", "playerEntity", ")", ";", "return", ";", "}", "if", "(", "playerEntity", ".", "isPlayerSleeping", "(", ")", ")", "{", "playerEntity", ".", "onUpdateEntity", "(", "true", ")", ";", "playerEntity", ".", "setPositionAndRotation", "(", "lastPosX", ",", "lastPosY", ",", "lastPosZ", ",", "playerEntity", ".", "rotationYaw", ",", "playerEntity", ".", "rotationPitch", ")", ";", "worldserver", ".", "updateEntity", "(", "playerEntity", ")", ";", "return", ";", "}", "double", "d1", "=", "playerEntity", ".", "posY", ";", "lastPosX", "=", "playerEntity", ".", "posX", ";", "lastPosY", "=", "playerEntity", ".", "posY", ";", "lastPosZ", "=", "playerEntity", ".", "posZ", ";", "double", "d3", "=", "playerEntity", ".", "posX", ";", "double", "d5", "=", "playerEntity", ".", "posY", ";", "double", "d7", "=", "playerEntity", ".", "posZ", ";", "float", "f2", "=", "playerEntity", ".", "rotationYaw", ";", "float", "f3", "=", "playerEntity", ".", "rotationPitch", ";", "if", "(", "par1Packet10Flying", ".", "moving", "&&", "par1Packet10Flying", ".", "yPosition", "==", "-", "999D", "&&", "par1Packet10Flying", ".", "stance", "==", "-", "999D", ")", "{", "par1Packet10Flying", ".", "moving", "=", "false", ";", "}", "if", "(", "par1Packet10Flying", ".", "moving", ")", "{", "d3", "=", "par1Packet10Flying", ".", "xPosition", ";", "d5", "=", "par1Packet10Flying", ".", "yPosition", ";", "d7", "=", "par1Packet10Flying", ".", "zPosition", ";", "double", "d10", "=", "par1Packet10Flying", ".", "stance", "-", "par1Packet10Flying", ".", "yPosition", ";", "if", "(", "!", "playerEntity", ".", "isPlayerSleeping", "(", ")", "&&", "(", "d10", ">", "1.6499999999999999D", "||", "d10", "<", "0.10000000000000001D", ")", ")", "{", "kickPlayer", "(", "\"\"", ")", ";", "logger", ".", "warning", "(", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "playerEntity", ".", "username", ")", ".", "append", "(", "\"\"", ")", ".", "append", "(", "d10", ")", ".", "toString", "(", ")", ")", ";", "return", ";", "}", "if", "(", "Math", ".", "abs", "(", "par1Packet10Flying", ".", "xPosition", ")", ">", "32000000D", "||", "Math", ".", "abs", "(", "par1Packet10Flying", ".", "zPosition", ")", ">", "32000000D", ")", "{", "kickPlayer", "(", "\"\"", ")", ";", "return", ";", "}", "}", "if", "(", "par1Packet10Flying", ".", "rotating", ")", "{", "f2", "=", "par1Packet10Flying", ".", "yaw", ";", "f3", "=", "par1Packet10Flying", ".", "pitch", ";", "}", "playerEntity", ".", "onUpdateEntity", "(", "true", ")", ";", "playerEntity", ".", "ySize", "=", "0.0F", ";", "playerEntity", ".", "setPositionAndRotation", "(", "lastPosX", ",", "lastPosY", ",", "lastPosZ", ",", "f2", ",", "f3", ")", ";", "if", "(", "!", "hasMoved", ")", "{", "return", ";", "}", "double", "d11", "=", "d3", "-", "playerEntity", ".", "posX", ";", "double", "d12", "=", "d5", "-", "playerEntity", ".", "posY", ";", "double", "d13", "=", "d7", "-", "playerEntity", ".", "posZ", ";", "double", "d14", "=", "d11", "*", "d11", "+", "d12", "*", "d12", "+", "d13", "*", "d13", ";", "if", "(", "d14", ">", "100D", ")", "{", "logger", ".", "warning", "(", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "playerEntity", ".", "username", ")", ".", "append", "(", "\"\"", ")", ".", "toString", "(", ")", ")", ";", "kickPlayer", "(", "\"\"", ")", ";", "return", ";", "}", "float", "f4", "=", "0.0625F", ";", "boolean", "flag", "=", "worldserver", ".", "getCollidingBoundingBoxes", "(", "playerEntity", ",", "playerEntity", ".", "boundingBox", ".", "copy", "(", ")", ".", "contract", "(", "f4", ",", "f4", ",", "f4", ")", ")", ".", "size", "(", ")", "==", "0", ";", "if", "(", "playerEntity", ".", "onGround", "&&", "!", "par1Packet10Flying", ".", "onGround", "&&", "d12", ">", "0.0D", ")", "{", "playerEntity", ".", "addExhaustion", "(", "0.2F", ")", ";", "}", "playerEntity", ".", "moveEntity", "(", "d11", ",", "d12", ",", "d13", ")", ";", "playerEntity", ".", "onGround", "=", "par1Packet10Flying", ".", "onGround", ";", "playerEntity", ".", "addMovementStat", "(", "d11", ",", "d12", ",", "d13", ")", ";", "double", "d15", "=", "d12", ";", "d11", "=", "d3", "-", "playerEntity", ".", "posX", ";", "d12", "=", "d5", "-", "playerEntity", ".", "posY", ";", "if", "(", "d12", ">", "-", "0.5D", "||", "d12", "<", "0.5D", ")", "{", "d12", "=", "0.0D", ";", "}", "d13", "=", "d7", "-", "playerEntity", ".", "posZ", ";", "d14", "=", "d11", "*", "d11", "+", "d12", "*", "d12", "+", "d13", "*", "d13", ";", "boolean", "flag1", "=", "false", ";", "if", "(", "d14", ">", "0.0625D", "&&", "!", "playerEntity", ".", "isPlayerSleeping", "(", ")", "&&", "!", "playerEntity", ".", "itemInWorldManager", ".", "isCreative", "(", ")", ")", "{", "flag1", "=", "true", ";", "logger", ".", "warning", "(", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "playerEntity", ".", "username", ")", ".", "append", "(", "\"\"", ")", ".", "toString", "(", ")", ")", ";", "System", ".", "out", ".", "println", "(", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "\"\"", ")", ".", "append", "(", "d3", ")", ".", "append", "(", "\",", "\"", ")", ".", "append", "(", "d5", ")", ".", "append", "(", "\",", "\"", ")", ".", "append", "(", "d7", ")", ".", "toString", "(", ")", ")", ";", "System", ".", "out", ".", "println", "(", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "\"Expected", "\"", ")", ".", "append", "(", "playerEntity", ".", "posX", ")", ".", "append", "(", "\",", "\"", ")", ".", "append", "(", "playerEntity", ".", "posY", ")", ".", "append", "(", "\",", "\"", ")", ".", "append", "(", "playerEntity", ".", "posZ", ")", ".", "toString", "(", ")", ")", ";", "}", "playerEntity", ".", "setPositionAndRotation", "(", "d3", ",", "d5", ",", "d7", ",", "f2", ",", "f3", ")", ";", "boolean", "flag2", "=", "worldserver", ".", "getCollidingBoundingBoxes", "(", "playerEntity", ",", "playerEntity", ".", "boundingBox", ".", "copy", "(", ")", ".", "contract", "(", "f4", ",", "f4", ",", "f4", ")", ")", ".", "size", "(", ")", "==", "0", ";", "if", "(", "flag", "&&", "(", "flag1", "||", "!", "flag2", ")", "&&", "!", "playerEntity", ".", "isPlayerSleeping", "(", ")", ")", "{", "teleportTo", "(", "lastPosX", ",", "lastPosY", ",", "lastPosZ", ",", "f2", ",", "f3", ")", ";", "return", ";", "}", "AxisAlignedBB", "axisalignedbb", "=", "playerEntity", ".", "boundingBox", ".", "copy", "(", ")", ".", "expand", "(", "f4", ",", "f4", ",", "f4", ")", ".", "addCoord", "(", "0.0D", ",", "-", "0.55000000000000004D", ",", "0.0D", ")", ";", "if", "(", "!", "mcServer", ".", "allowFlight", "&&", "!", "playerEntity", ".", "itemInWorldManager", ".", "isCreative", "(", ")", "&&", "!", "worldserver", ".", "isAABBEmpty", "(", "axisalignedbb", ")", ")", "{", "if", "(", "d15", ">=", "-", "0.03125D", ")", "{", "playerInAirTime", "++", ";", "if", "(", "playerInAirTime", ">", "80", ")", "{", "logger", ".", "warning", "(", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "playerEntity", ".", "username", ")", ".", "append", "(", "\"\"", ")", ".", "toString", "(", ")", ")", ";", "kickPlayer", "(", "\"\"", ")", ";", "return", ";", "}", "}", "}", "else", "{", "playerInAirTime", "=", "0", ";", "}", "playerEntity", ".", "onGround", "=", "par1Packet10Flying", ".", "onGround", ";", "mcServer", ".", "configManager", ".", "serverUpdateMountedMovingPlayer", "(", "playerEntity", ")", ";", "playerEntity", ".", "handleFalling", "(", "playerEntity", ".", "posY", "-", "d1", ",", "par1Packet10Flying", ".", "onGround", ")", ";", "}", "}", "public", "void", "teleportTo", "(", "double", "par1", ",", "double", "par3", ",", "double", "par5", ",", "float", "par7", ",", "float", "par8", ")", "{", "hasMoved", "=", "false", ";", "lastPosX", "=", "par1", ";", "lastPosY", "=", "par3", ";", "lastPosZ", "=", "par5", ";", "playerEntity", ".", "setPositionAndRotation", "(", "par1", ",", "par3", ",", "par5", ",", "par7", ",", "par8", ")", ";", "playerEntity", ".", "playerNetServerHandler", ".", "sendPacket", "(", "new", "Packet13PlayerLookMove", "(", "par1", ",", "par3", "+", "1.6200000047683716D", ",", "par3", ",", "par5", ",", "par7", ",", "par8", ",", "false", ")", ")", ";", "}", "public", "void", "handleBlockDig", "(", "Packet14BlockDig", "par1Packet14BlockDig", ")", "{", "WorldServer", "worldserver", "=", "mcServer", ".", "getWorldManager", "(", "playerEntity", ".", "dimension", ")", ";", "if", "(", "par1Packet14BlockDig", ".", "status", "==", "4", ")", "{", "playerEntity", ".", "dropOneItem", "(", ")", ";", "return", ";", "}", "if", "(", "par1Packet14BlockDig", ".", "status", "==", "5", ")", "{", "playerEntity", ".", "stopUsingItem", "(", ")", ";", "return", ";", "}", "boolean", "flag", "=", "worldserver", ".", "disableSpawnProtection", "=", "worldserver", ".", "worldProvider", ".", "worldType", "!=", "0", "||", "mcServer", ".", "configManager", ".", "isOp", "(", "playerEntity", ".", "username", ")", ";", "boolean", "flag1", "=", "false", ";", "if", "(", "par1Packet14BlockDig", ".", "status", "==", "0", ")", "{", "flag1", "=", "true", ";", "}", "if", "(", "par1Packet14BlockDig", ".", "status", "==", "2", ")", "{", "flag1", "=", "true", ";", "}", "int", "i", "=", "par1Packet14BlockDig", ".", "xPosition", ";", "int", "j", "=", "par1Packet14BlockDig", ".", "yPosition", ";", "int", "k", "=", "par1Packet14BlockDig", ".", "zPosition", ";", "if", "(", "flag1", ")", "{", "double", "d", "=", "playerEntity", ".", "posX", "-", "(", "(", "double", ")", "i", "+", "0.5D", ")", ";", "double", "d1", "=", "(", "playerEntity", ".", "posY", "-", "(", "(", "double", ")", "j", "+", "0.5D", ")", ")", "+", "1.5D", ";", "double", "d3", "=", "playerEntity", ".", "posZ", "-", "(", "(", "double", ")", "k", "+", "0.5D", ")", ";", "double", "d5", "=", "d", "*", "d", "+", "d1", "*", "d1", "+", "d3", "*", "d3", ";", "if", "(", "d5", ">", "36D", ")", "{", "return", ";", "}", "if", "(", "j", ">=", "mcServer", ".", "buildLimit", ")", "{", "return", ";", "}", "}", "ChunkCoordinates", "chunkcoordinates", "=", "worldserver", ".", "getSpawnPoint", "(", ")", ";", "int", "l", "=", "MathHelper", ".", "abs", "(", "i", "-", "chunkcoordinates", ".", "posX", ")", ";", "int", "i1", "=", "MathHelper", ".", "abs", "(", "k", "-", "chunkcoordinates", ".", "posZ", ")", ";", "if", "(", "l", ">", "i1", ")", "{", "i1", "=", "l", ";", "}", "if", "(", "par1Packet14BlockDig", ".", "status", "==", "0", ")", "{", "if", "(", "i1", ">", "16", "||", "flag", ")", "{", "playerEntity", ".", "itemInWorldManager", ".", "blockClicked", "(", "i", ",", "j", ",", "k", ",", "par1Packet14BlockDig", ".", "face", ")", ";", "}", "else", "{", "playerEntity", ".", "playerNetServerHandler", ".", "sendPacket", "(", "new", "Packet53BlockChange", "(", "i", ",", "j", ",", "k", ",", "worldserver", ")", ")", ";", "}", "}", "else", "if", "(", "par1Packet14BlockDig", ".", "status", "==", "2", ")", "{", "playerEntity", ".", "itemInWorldManager", ".", "blockRemoving", "(", "i", ",", "j", ",", "k", ")", ";", "if", "(", "worldserver", ".", "getBlockId", "(", "i", ",", "j", ",", "k", ")", "!=", "0", ")", "{", "playerEntity", ".", "playerNetServerHandler", ".", "sendPacket", "(", "new", "Packet53BlockChange", "(", "i", ",", "j", ",", "k", ",", "worldserver", ")", ")", ";", "}", "}", "else", "if", "(", "par1Packet14BlockDig", ".", "status", "==", "3", ")", "{", "double", "d2", "=", "playerEntity", ".", "posX", "-", "(", "(", "double", ")", "i", "+", "0.5D", ")", ";", "double", "d4", "=", "playerEntity", ".", "posY", "-", "(", "(", "double", ")", "j", "+", "0.5D", ")", ";", "double", "d6", "=", "playerEntity", ".", "posZ", "-", "(", "(", "double", ")", "k", "+", "0.5D", ")", ";", "double", "d7", "=", "d2", "*", "d2", "+", "d4", "*", "d4", "+", "d6", "*", "d6", ";", "if", "(", "d7", "<", "256D", ")", "{", "playerEntity", ".", "playerNetServerHandler", ".", "sendPacket", "(", "new", "Packet53BlockChange", "(", "i", ",", "j", ",", "k", ",", "worldserver", ")", ")", ";", "}", "}", "worldserver", ".", "disableSpawnProtection", "=", "false", ";", "}", "public", "void", "handlePlace", "(", "Packet15Place", "par1Packet15Place", ")", "{", "WorldServer", "worldserver", "=", "mcServer", ".", "getWorldManager", "(", "playerEntity", ".", "dimension", ")", ";", "ItemStack", "itemstack", "=", "playerEntity", ".", "inventory", ".", "getCurrentItem", "(", ")", ";", "boolean", "flag", "=", "false", ";", "int", "i", "=", "par1Packet15Place", ".", "xPosition", ";", "int", "j", "=", "par1Packet15Place", ".", "yPosition", ";", "int", "k", "=", "par1Packet15Place", ".", "zPosition", ";", "int", "l", "=", "par1Packet15Place", ".", "direction", ";", "boolean", "flag1", "=", "worldserver", ".", "disableSpawnProtection", "=", "worldserver", ".", "worldProvider", ".", "worldType", "!=", "0", "||", "mcServer", ".", "configManager", ".", "isOp", "(", "playerEntity", ".", "username", ")", ";", "if", "(", "par1Packet15Place", ".", "direction", "==", "255", ")", "{", "if", "(", "itemstack", "==", "null", ")", "{", "return", ";", "}", "playerEntity", ".", "itemInWorldManager", ".", "itemUsed", "(", "playerEntity", ",", "worldserver", ",", "itemstack", ")", ";", "}", "else", "if", "(", "par1Packet15Place", ".", "yPosition", "<", "mcServer", ".", "buildLimit", "-", "1", "||", "par1Packet15Place", ".", "direction", "!=", "1", "&&", "par1Packet15Place", ".", "yPosition", "<", "mcServer", ".", "buildLimit", ")", "{", "ChunkCoordinates", "chunkcoordinates", "=", "worldserver", ".", "getSpawnPoint", "(", ")", ";", "int", "i1", "=", "MathHelper", ".", "abs", "(", "i", "-", "chunkcoordinates", ".", "posX", ")", ";", "int", "j1", "=", "MathHelper", ".", "abs", "(", "k", "-", "chunkcoordinates", ".", "posZ", ")", ";", "if", "(", "i1", ">", "j1", ")", "{", "j1", "=", "i1", ";", "}", "if", "(", "hasMoved", "&&", "playerEntity", ".", "getDistanceSq", "(", "(", "double", ")", "i", "+", "0.5D", ",", "(", "double", ")", "j", "+", "0.5D", ",", "(", "double", ")", "k", "+", "0.5D", ")", "<", "64D", "&&", "(", "j1", ">", "16", "||", "flag1", ")", ")", "{", "playerEntity", ".", "itemInWorldManager", ".", "activeBlockOrUseItem", "(", "playerEntity", ",", "worldserver", ",", "itemstack", ",", "i", ",", "j", ",", "k", ",", "l", ")", ";", "}", "flag", "=", "true", ";", "}", "else", "{", "playerEntity", ".", "playerNetServerHandler", ".", "sendPacket", "(", "new", "Packet3Chat", "(", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "\"\"", ")", ".", "append", "(", "mcServer", ".", "buildLimit", ")", ".", "toString", "(", ")", ")", ")", ";", "flag", "=", "true", ";", "}", "if", "(", "flag", ")", "{", "playerEntity", ".", "playerNetServerHandler", ".", "sendPacket", "(", "new", "Packet53BlockChange", "(", "i", ",", "j", ",", "k", ",", "worldserver", ")", ")", ";", "if", "(", "l", "==", "0", ")", "{", "j", "--", ";", "}", "if", "(", "l", "==", "1", ")", "{", "j", "++", ";", "}", "if", "(", "l", "==", "2", ")", "{", "k", "--", ";", "}", "if", "(", "l", "==", "3", ")", "{", "k", "++", ";", "}", "if", "(", "l", "==", "4", ")", "{", "i", "--", ";", "}", "if", "(", "l", "==", "5", ")", "{", "i", "++", ";", "}", "playerEntity", ".", "playerNetServerHandler", ".", "sendPacket", "(", "new", "Packet53BlockChange", "(", "i", ",", "j", ",", "k", ",", "worldserver", ")", ")", ";", "}", "itemstack", "=", "playerEntity", ".", "inventory", ".", "getCurrentItem", "(", ")", ";", "if", "(", "itemstack", "!=", "null", "&&", "itemstack", ".", "stackSize", "==", "0", ")", "{", "playerEntity", ".", "inventory", ".", "mainInventory", "[", "playerEntity", ".", "inventory", ".", "currentItem", "]", "=", "null", ";", "itemstack", "=", "null", ";", "}", "if", "(", "itemstack", "==", "null", "||", "itemstack", ".", "getMaxItemUseDuration", "(", ")", "==", "0", ")", "{", "playerEntity", ".", "isChangingQuantityOnly", "=", "true", ";", "playerEntity", ".", "inventory", ".", "mainInventory", "[", "playerEntity", ".", "inventory", ".", "currentItem", "]", "=", "ItemStack", ".", "copyItemStack", "(", "playerEntity", ".", "inventory", ".", "mainInventory", "[", "playerEntity", ".", "inventory", ".", "currentItem", "]", ")", ";", "Slot", "slot", "=", "playerEntity", ".", "craftingInventory", ".", "func_20127_a", "(", "playerEntity", ".", "inventory", ",", "playerEntity", ".", "inventory", ".", "currentItem", ")", ";", "playerEntity", ".", "craftingInventory", ".", "updateCraftingResults", "(", ")", ";", "playerEntity", ".", "isChangingQuantityOnly", "=", "false", ";", "if", "(", "!", "ItemStack", ".", "areItemStacksEqual", "(", "playerEntity", ".", "inventory", ".", "getCurrentItem", "(", ")", ",", "par1Packet15Place", ".", "itemStack", ")", ")", "{", "sendPacket", "(", "new", "Packet103SetSlot", "(", "playerEntity", ".", "craftingInventory", ".", "windowId", ",", "slot", ".", "slotNumber", ",", "playerEntity", ".", "inventory", ".", "getCurrentItem", "(", ")", ")", ")", ";", "}", "}", "worldserver", ".", "disableSpawnProtection", "=", "false", ";", "}", "public", "void", "handleErrorMessage", "(", "String", "par1Str", ",", "Object", "par2ArrayOfObj", "[", "]", ")", "{", "logger", ".", "info", "(", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "playerEntity", ".", "username", ")", ".", "append", "(", "\"\"", ")", ".", "append", "(", "par1Str", ")", ".", "toString", "(", ")", ")", ";", "mcServer", ".", "configManager", ".", "sendPacketToAllPlayers", "(", "new", "Packet3Chat", "(", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "\"-UNK-e\"", ")", ".", "append", "(", "playerEntity", ".", "username", ")", ".", "append", "(", "\"\"", ")", ".", "toString", "(", ")", ")", ")", ";", "mcServer", ".", "configManager", ".", "playerLoggedOut", "(", "playerEntity", ")", ";", "connectionClosed", "=", "true", ";", "}", "public", "void", "registerPacket", "(", "Packet", "par1Packet", ")", "{", "logger", ".", "warning", "(", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "getClass", "(", ")", ")", ".", "append", "(", "\"\"", ")", ".", "append", "(", "par1Packet", ".", "getClass", "(", ")", ")", ".", "toString", "(", ")", ")", ";", "kickPlayer", "(", "\"\"", ")", ";", "}", "public", "void", "sendPacket", "(", "Packet", "par1Packet", ")", "{", "netManager", ".", "addToSendQueue", "(", "par1Packet", ")", ";", "}", "public", "void", "handleBlockItemSwitch", "(", "Packet16BlockItemSwitch", "par1Packet16BlockItemSwitch", ")", "{", "if", "(", "par1Packet16BlockItemSwitch", ".", "id", "<", "0", "||", "par1Packet16BlockItemSwitch", ".", "id", ">=", "InventoryPlayer", ".", "func_25054_e", "(", ")", ")", "{", "logger", ".", "warning", "(", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "playerEntity", ".", "username", ")", ".", "append", "(", "\"\"", ")", ".", "toString", "(", ")", ")", ";", "return", ";", "}", "else", "{", "playerEntity", ".", "inventory", ".", "currentItem", "=", "par1Packet16BlockItemSwitch", ".", "id", ";", "return", ";", "}", "}", "public", "void", "handleChat", "(", "Packet3Chat", "par1Packet3Chat", ")", "{", "String", "s", "=", "par1Packet3Chat", ".", "message", ";", "if", "(", "s", ".", "length", "(", ")", ">", "100", ")", "{", "kickPlayer", "(", "\"\"", ")", ";", "return", ";", "}", "s", "=", "s", ".", "trim", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "s", ".", "length", "(", ")", ";", "i", "++", ")", "{", "if", "(", "!", "ChatAllowedCharacters", ".", "isAllowedCharacter", "(", "s", ".", "charAt", "(", "i", ")", ")", ")", "{", "kickPlayer", "(", "\"\"", ")", ";", "return", ";", "}", "}", "if", "(", "s", ".", "startsWith", "(", "\"/\"", ")", ")", "{", "handleSlashCommand", "(", "s", ")", ";", "}", "else", "{", "s", "=", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "\"<\"", ")", ".", "append", "(", "playerEntity", ".", "username", ")", ".", "append", "(", "\">", "\"", ")", ".", "append", "(", "s", ")", ".", "toString", "(", ")", ";", "logger", ".", "info", "(", "s", ")", ";", "mcServer", ".", "configManager", ".", "sendPacketToAllPlayers", "(", "new", "Packet3Chat", "(", "s", ")", ")", ";", "}", "field_45001_m", "+=", "20", ";", "if", "(", "field_45001_m", ">", "200", ")", "{", "kickPlayer", "(", "\"\"", ")", ";", "}", "}", "private", "void", "handleSlashCommand", "(", "String", "par1Str", ")", "{", "if", "(", "par1Str", ".", "toLowerCase", "(", ")", ".", "startsWith", "(", "\"/me", "\"", ")", ")", "{", "par1Str", "=", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "\"*", "\"", ")", ".", "append", "(", "playerEntity", ".", "username", ")", ".", "append", "(", "\"", "\"", ")", ".", "append", "(", "par1Str", ".", "substring", "(", "par1Str", ".", "indexOf", "(", "\"", "\"", ")", ")", ".", "trim", "(", ")", ")", ".", "toString", "(", ")", ";", "logger", ".", "info", "(", "par1Str", ")", ";", "mcServer", ".", "configManager", ".", "sendPacketToAllPlayers", "(", "new", "Packet3Chat", "(", "par1Str", ")", ")", ";", "}", "else", "if", "(", "par1Str", ".", "toLowerCase", "(", ")", ".", "startsWith", "(", "\"/kill\"", ")", ")", "{", "playerEntity", ".", "attackEntityFrom", "(", "DamageSource", ".", "generic", ",", "1000", ")", ";", "}", "else", "if", "(", "par1Str", ".", "toLowerCase", "(", ")", ".", "startsWith", "(", "\"/tell", "\"", ")", ")", "{", "String", "as", "[", "]", "=", "par1Str", ".", "split", "(", "\"", "\"", ")", ";", "if", "(", "as", ".", "length", ">=", "3", ")", "{", "par1Str", "=", "par1Str", ".", "substring", "(", "par1Str", ".", "indexOf", "(", "\"", "\"", ")", ")", ".", "trim", "(", ")", ";", "par1Str", "=", "par1Str", ".", "substring", "(", "par1Str", ".", "indexOf", "(", "\"", "\"", ")", ")", ".", "trim", "(", ")", ";", "par1Str", "=", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "\"-UNK-7\"", ")", ".", "append", "(", "playerEntity", ".", "username", ")", ".", "append", "(", "\"", "whispers", "\"", ")", ".", "append", "(", "par1Str", ")", ".", "toString", "(", ")", ";", "logger", ".", "info", "(", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "par1Str", ")", ".", "append", "(", "\"", "to", "\"", ")", ".", "append", "(", "as", "[", "1", "]", ")", ".", "toString", "(", ")", ")", ";", "if", "(", "!", "mcServer", ".", "configManager", ".", "sendPacketToPlayer", "(", "as", "[", "1", "]", ",", "new", "Packet3Chat", "(", "par1Str", ")", ")", ")", "{", "sendPacket", "(", "new", "Packet3Chat", "(", "\"\"", ")", ")", ";", "}", "}", "}", "else", "if", "(", "mcServer", ".", "configManager", ".", "isOp", "(", "playerEntity", ".", "username", ")", ")", "{", "String", "s", "=", "par1Str", ".", "substring", "(", "1", ")", ";", "logger", ".", "info", "(", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "playerEntity", ".", "username", ")", ".", "append", "(", "\"\"", ")", ".", "append", "(", "s", ")", ".", "toString", "(", ")", ")", ";", "mcServer", ".", "addCommand", "(", "s", ",", "this", ")", ";", "}", "else", "{", "String", "s1", "=", "par1Str", ".", "substring", "(", "1", ")", ";", "logger", ".", "info", "(", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "playerEntity", ".", "username", ")", ".", "append", "(", "\"\"", ")", ".", "append", "(", "s1", ")", ".", "toString", "(", ")", ")", ";", "}", "}", "public", "void", "handleAnimation", "(", "Packet18Animation", "par1Packet18Animation", ")", "{", "if", "(", "par1Packet18Animation", ".", "animate", "==", "1", ")", "{", "playerEntity", ".", "swingItem", "(", ")", ";", "}", "}", "public", "void", "handleEntityAction", "(", "Packet19EntityAction", "par1Packet19EntityAction", ")", "{", "if", "(", "par1Packet19EntityAction", ".", "state", "==", "1", ")", "{", "playerEntity", ".", "setSneaking", "(", "true", ")", ";", "}", "else", "if", "(", "par1Packet19EntityAction", ".", "state", "==", "2", ")", "{", "playerEntity", ".", "setSneaking", "(", "false", ")", ";", "}", "else", "if", "(", "par1Packet19EntityAction", ".", "state", "==", "4", ")", "{", "playerEntity", ".", "setSprinting", "(", "true", ")", ";", "}", "else", "if", "(", "par1Packet19EntityAction", ".", "state", "==", "5", ")", "{", "playerEntity", ".", "setSprinting", "(", "false", ")", ";", "}", "else", "if", "(", "par1Packet19EntityAction", ".", "state", "==", "3", ")", "{", "playerEntity", ".", "wakeUpPlayer", "(", "false", ",", "true", ",", "true", ")", ";", "hasMoved", "=", "false", ";", "}", "}", "public", "void", "handleKickDisconnect", "(", "Packet255KickDisconnect", "par1Packet255KickDisconnect", ")", "{", "netManager", ".", "networkShutdown", "(", "\"\"", ",", "new", "Object", "[", "0", "]", ")", ";", "}", "public", "int", "getNumChunkDataPackets", "(", ")", "{", "return", "netManager", ".", "getNumChunkDataPackets", "(", ")", ";", "}", "public", "void", "log", "(", "String", "par1Str", ")", "{", "sendPacket", "(", "new", "Packet3Chat", "(", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "\"-UNK-7\"", ")", ".", "append", "(", "par1Str", ")", ".", "toString", "(", ")", ")", ")", ";", "}", "public", "String", "getUsername", "(", ")", "{", "return", "playerEntity", ".", "username", ";", "}", "public", "void", "handleUseEntity", "(", "Packet7UseEntity", "par1Packet7UseEntity", ")", "{", "WorldServer", "worldserver", "=", "mcServer", ".", "getWorldManager", "(", "playerEntity", ".", "dimension", ")", ";", "Entity", "entity", "=", "worldserver", ".", "func_6158_a", "(", "par1Packet7UseEntity", ".", "targetEntity", ")", ";", "if", "(", "entity", "!=", "null", ")", "{", "boolean", "flag", "=", "playerEntity", ".", "canEntityBeSeen", "(", "entity", ")", ";", "double", "d", "=", "36D", ";", "if", "(", "!", "flag", ")", "{", "d", "=", "9D", ";", "}", "if", "(", "playerEntity", ".", "getDistanceSqToEntity", "(", "entity", ")", "<", "d", ")", "{", "if", "(", "par1Packet7UseEntity", ".", "isLeftClick", "==", "0", ")", "{", "playerEntity", ".", "useCurrentItemOnEntity", "(", "entity", ")", ";", "}", "else", "if", "(", "par1Packet7UseEntity", ".", "isLeftClick", "==", "1", ")", "{", "playerEntity", ".", "attackTargetEntityWithCurrentItem", "(", "entity", ")", ";", "}", "}", "}", "}", "public", "void", "handleRespawn", "(", "Packet9Respawn", "par1Packet9Respawn", ")", "{", "if", "(", "playerEntity", ".", "gameOver", ")", "{", "playerEntity", "=", "mcServer", ".", "configManager", ".", "recreatePlayerEntity", "(", "playerEntity", ",", "0", ",", "true", ")", ";", "}", "else", "{", "if", "(", "playerEntity", ".", "getHealth", "(", ")", ">", "0", ")", "{", "return", ";", "}", "playerEntity", "=", "mcServer", ".", "configManager", ".", "recreatePlayerEntity", "(", "playerEntity", ",", "0", ",", "false", ")", ";", "}", "}", "public", "void", "handleCloseWindow", "(", "Packet101CloseWindow", "par1Packet101CloseWindow", ")", "{", "playerEntity", ".", "closeCraftingGui", "(", ")", ";", "}", "public", "void", "handleWindowClick", "(", "Packet102WindowClick", "par1Packet102WindowClick", ")", "{", "if", "(", "playerEntity", ".", "craftingInventory", ".", "windowId", "==", "par1Packet102WindowClick", ".", "window_Id", "&&", "playerEntity", ".", "craftingInventory", ".", "getCanCraft", "(", "playerEntity", ")", ")", "{", "ItemStack", "itemstack", "=", "playerEntity", ".", "craftingInventory", ".", "slotClick", "(", "par1Packet102WindowClick", ".", "inventorySlot", ",", "par1Packet102WindowClick", ".", "mouseClick", ",", "par1Packet102WindowClick", ".", "holdingShift", ",", "playerEntity", ")", ";", "if", "(", "ItemStack", ".", "areItemStacksEqual", "(", "par1Packet102WindowClick", ".", "itemStack", ",", "itemstack", ")", ")", "{", "playerEntity", ".", "playerNetServerHandler", ".", "sendPacket", "(", "new", "Packet106Transaction", "(", "par1Packet102WindowClick", ".", "window_Id", ",", "par1Packet102WindowClick", ".", "action", ",", "true", ")", ")", ";", "playerEntity", ".", "isChangingQuantityOnly", "=", "true", ";", "playerEntity", ".", "craftingInventory", ".", "updateCraftingResults", "(", ")", ";", "playerEntity", ".", "updateHeldItem", "(", ")", ";", "playerEntity", ".", "isChangingQuantityOnly", "=", "false", ";", "}", "else", "{", "field_10_k", ".", "addKey", "(", "playerEntity", ".", "craftingInventory", ".", "windowId", ",", "Short", ".", "valueOf", "(", "par1Packet102WindowClick", ".", "action", ")", ")", ";", "playerEntity", ".", "playerNetServerHandler", ".", "sendPacket", "(", "new", "Packet106Transaction", "(", "par1Packet102WindowClick", ".", "window_Id", ",", "par1Packet102WindowClick", ".", "action", ",", "false", ")", ")", ";", "playerEntity", ".", "craftingInventory", ".", "setCanCraft", "(", "playerEntity", ",", "false", ")", ";", "ArrayList", "arraylist", "=", "new", "ArrayList", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "playerEntity", ".", "craftingInventory", ".", "inventorySlots", ".", "size", "(", ")", ";", "i", "++", ")", "{", "arraylist", ".", "add", "(", "(", "(", "Slot", ")", "playerEntity", ".", "craftingInventory", ".", "inventorySlots", ".", "get", "(", "i", ")", ")", ".", "getStack", "(", ")", ")", ";", "}", "playerEntity", ".", "updateCraftingInventory", "(", "playerEntity", ".", "craftingInventory", ",", "arraylist", ")", ";", "}", "}", "}", "public", "void", "handleEnchantItem", "(", "Packet108EnchantItem", "par1Packet108EnchantItem", ")", "{", "if", "(", "playerEntity", ".", "craftingInventory", ".", "windowId", "==", "par1Packet108EnchantItem", ".", "windowId", "&&", "playerEntity", ".", "craftingInventory", ".", "getCanCraft", "(", "playerEntity", ")", ")", "{", "playerEntity", ".", "craftingInventory", ".", "enchantItem", "(", "playerEntity", ",", "par1Packet108EnchantItem", ".", "enchantment", ")", ";", "playerEntity", ".", "craftingInventory", ".", "updateCraftingResults", "(", ")", ";", "}", "}", "public", "void", "handleCreativeSetSlot", "(", "Packet107CreativeSetSlot", "par1Packet107CreativeSetSlot", ")", "{", "if", "(", "playerEntity", ".", "itemInWorldManager", ".", "isCreative", "(", ")", ")", "{", "boolean", "flag", "=", "par1Packet107CreativeSetSlot", ".", "slot", "<", "0", ";", "ItemStack", "itemstack", "=", "par1Packet107CreativeSetSlot", ".", "itemStack", ";", "boolean", "flag1", "=", "par1Packet107CreativeSetSlot", ".", "slot", ">=", "36", "&&", "par1Packet107CreativeSetSlot", ".", "slot", "<", "36", "+", "InventoryPlayer", ".", "func_25054_e", "(", ")", ";", "boolean", "flag2", "=", "itemstack", "==", "null", "||", "itemstack", ".", "itemID", "<", "Item", ".", "itemsList", ".", "length", "&&", "itemstack", ".", "itemID", ">=", "0", "&&", "Item", ".", "itemsList", "[", "itemstack", ".", "itemID", "]", "!=", "null", ";", "boolean", "flag3", "=", "itemstack", "==", "null", "||", "itemstack", ".", "getItemDamage", "(", ")", ">=", "0", "&&", "itemstack", ".", "getItemDamage", "(", ")", ">=", "0", "&&", "itemstack", ".", "stackSize", "<=", "64", "&&", "itemstack", ".", "stackSize", ">", "0", ";", "if", "(", "flag1", "&&", "flag2", "&&", "flag3", ")", "{", "if", "(", "itemstack", "==", "null", ")", "{", "playerEntity", ".", "inventorySlots", ".", "putStackInSlot", "(", "par1Packet107CreativeSetSlot", ".", "slot", ",", "null", ")", ";", "}", "else", "{", "playerEntity", ".", "inventorySlots", ".", "putStackInSlot", "(", "par1Packet107CreativeSetSlot", ".", "slot", ",", "itemstack", ")", ";", "}", "playerEntity", ".", "inventorySlots", ".", "setCanCraft", "(", "playerEntity", ",", "true", ")", ";", "}", "else", "if", "(", "flag", "&&", "flag2", "&&", "flag3", "&&", "field_48073_n", "<", "200", ")", "{", "field_48073_n", "+=", "20", ";", "EntityItem", "entityitem", "=", "playerEntity", ".", "dropPlayerItem", "(", "itemstack", ")", ";", "if", "(", "entityitem", "!=", "null", ")", "{", "entityitem", ".", "func_48316_k", "(", ")", ";", "}", "}", "}", "}", "public", "void", "handleTransaction", "(", "Packet106Transaction", "par1Packet106Transaction", ")", "{", "Short", "short1", "=", "(", "Short", ")", "field_10_k", ".", "lookup", "(", "playerEntity", ".", "craftingInventory", ".", "windowId", ")", ";", "if", "(", "short1", "!=", "null", "&&", "par1Packet106Transaction", ".", "shortWindowId", "==", "short1", ".", "shortValue", "(", ")", "&&", "playerEntity", ".", "craftingInventory", ".", "windowId", "==", "par1Packet106Transaction", ".", "windowId", "&&", "!", "playerEntity", ".", "craftingInventory", ".", "getCanCraft", "(", "playerEntity", ")", ")", "{", "playerEntity", ".", "craftingInventory", ".", "setCanCraft", "(", "playerEntity", ",", "true", ")", ";", "}", "}", "public", "void", "handleUpdateSign", "(", "Packet130UpdateSign", "par1Packet130UpdateSign", ")", "{", "WorldServer", "worldserver", "=", "mcServer", ".", "getWorldManager", "(", "playerEntity", ".", "dimension", ")", ";", "if", "(", "worldserver", ".", "blockExists", "(", "par1Packet130UpdateSign", ".", "xPosition", ",", "par1Packet130UpdateSign", ".", "yPosition", ",", "par1Packet130UpdateSign", ".", "zPosition", ")", ")", "{", "TileEntity", "tileentity", "=", "worldserver", ".", "getBlockTileEntity", "(", "par1Packet130UpdateSign", ".", "xPosition", ",", "par1Packet130UpdateSign", ".", "yPosition", ",", "par1Packet130UpdateSign", ".", "zPosition", ")", ";", "if", "(", "tileentity", "instanceof", "TileEntitySign", ")", "{", "TileEntitySign", "tileentitysign", "=", "(", "TileEntitySign", ")", "tileentity", ";", "if", "(", "!", "tileentitysign", ".", "isEditable", "(", ")", ")", "{", "mcServer", ".", "logWarning", "(", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "\"Player", "\"", ")", ".", "append", "(", "playerEntity", ".", "username", ")", ".", "append", "(", "\"\"", ")", ".", "toString", "(", ")", ")", ";", "return", ";", "}", "}", "for", "(", "int", "i", "=", "0", ";", "i", "<", "4", ";", "i", "++", ")", "{", "boolean", "flag", "=", "true", ";", "if", "(", "par1Packet130UpdateSign", ".", "signLines", "[", "i", "]", ".", "length", "(", ")", ">", "15", ")", "{", "flag", "=", "false", ";", "}", "else", "{", "for", "(", "int", "l", "=", "0", ";", "l", "<", "par1Packet130UpdateSign", ".", "signLines", "[", "i", "]", ".", "length", "(", ")", ";", "l", "++", ")", "{", "if", "(", "ChatAllowedCharacters", ".", "allowedCharacters", ".", "indexOf", "(", "par1Packet130UpdateSign", ".", "signLines", "[", "i", "]", ".", "charAt", "(", "l", ")", ")", "<", "0", ")", "{", "flag", "=", "false", ";", "}", "}", "}", "if", "(", "!", "flag", ")", "{", "par1Packet130UpdateSign", ".", "signLines", "[", "i", "]", "=", "\"!?\"", ";", "}", "}", "if", "(", "tileentity", "instanceof", "TileEntitySign", ")", "{", "int", "j", "=", "par1Packet130UpdateSign", ".", "xPosition", ";", "int", "k", "=", "par1Packet130UpdateSign", ".", "yPosition", ";", "int", "i1", "=", "par1Packet130UpdateSign", ".", "zPosition", ";", "TileEntitySign", "tileentitysign1", "=", "(", "TileEntitySign", ")", "tileentity", ";", "for", "(", "int", "j1", "=", "0", ";", "j1", "<", "4", ";", "j1", "++", ")", "{", "tileentitysign1", ".", "signText", "[", "j1", "]", "=", "par1Packet130UpdateSign", ".", "signLines", "[", "j1", "]", ";", "}", "tileentitysign1", ".", "onInventoryChanged", "(", ")", ";", "worldserver", ".", "markBlockNeedsUpdate", "(", "j", ",", "k", ",", "i1", ")", ";", "}", "}", "}", "public", "void", "handleKeepAlive", "(", "Packet0KeepAlive", "par1Packet0KeepAlive", ")", "{", "if", "(", "par1Packet0KeepAlive", ".", "randomId", "==", "field_35013_i", ")", "{", "int", "i", "=", "(", "int", ")", "(", "System", ".", "nanoTime", "(", ")", "/", "0xf4240L", "-", "field_35011_j", ")", ";", "playerEntity", ".", "ping", "=", "(", "playerEntity", ".", "ping", "*", "3", "+", "i", ")", "/", "4", ";", "}", "}", "public", "boolean", "isServerHandler", "(", ")", "{", "return", "true", ";", "}", "public", "void", "func_50003_a", "(", "Packet202PlayerAbilities", "par1Packet202PlayerAbilities", ")", "{", "playerEntity", ".", "capabilities", ".", "isFlying", "=", "par1Packet202PlayerAbilities", ".", "field_50005_b", "&&", "playerEntity", ".", "capabilities", ".", "allowFlying", ";", "}", "}", "</s>" ]
9,838
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "Random", ";", "public", "class", "EntityAILookIdle", "extends", "EntityAIBase", "{", "private", "EntityLiving", "idleEntity", ";", "private", "double", "lookX", ";", "private", "double", "lookZ", ";", "private", "int", "idleTime", ";", "public", "EntityAILookIdle", "(", "EntityLiving", "par1EntityLiving", ")", "{", "idleTime", "=", "0", ";", "idleEntity", "=", "par1EntityLiving", ";", "setMutexBits", "(", "3", ")", ";", "}", "public", "boolean", "shouldExecute", "(", ")", "{", "return", "idleEntity", ".", "getRNG", "(", ")", ".", "nextFloat", "(", ")", "<", "0.02F", ";", "}", "public", "boolean", "continueExecuting", "(", ")", "{", "return", "idleTime", ">=", "0", ";", "}", "public", "void", "startExecuting", "(", ")", "{", "double", "d", "=", "(", "Math", ".", "PI", "*", "2D", ")", "*", "idleEntity", ".", "getRNG", "(", ")", ".", "nextDouble", "(", ")", ";", "lookX", "=", "Math", ".", "cos", "(", "d", ")", ";", "lookZ", "=", "Math", ".", "sin", "(", "d", ")", ";", "idleTime", "=", "20", "+", "idleEntity", ".", "getRNG", "(", ")", ".", "nextInt", "(", "20", ")", ";", "}", "public", "void", "updateTask", "(", ")", "{", "idleTime", "--", ";", "idleEntity", ".", "getLookHelper", "(", ")", ".", "setLookPosition", "(", "idleEntity", ".", "posX", "+", "lookX", ",", "idleEntity", ".", "posY", "+", "(", "double", ")", "idleEntity", ".", "getEyeHeight", "(", ")", ",", "idleEntity", ".", "posZ", "+", "lookZ", ",", "10F", ",", "idleEntity", ".", "getVerticalFaceSpeed", "(", ")", ")", ";", "}", "}", "</s>" ]
9,839
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "Random", ";", "public", "class", "TileEntityChest", "extends", "TileEntity", "implements", "IInventory", "{", "private", "ItemStack", "chestContents", "[", "]", ";", "public", "boolean", "adjacentChestChecked", ";", "public", "TileEntityChest", "adjacentChestZNeg", ";", "public", "TileEntityChest", "adjacentChestXPos", ";", "public", "TileEntityChest", "adjacentChestXNeg", ";", "public", "TileEntityChest", "adjacentChestZPos", ";", "public", "float", "lidAngle", ";", "public", "float", "prevLidAngle", ";", "public", "int", "numUsingPlayers", ";", "private", "int", "ticksSinceSync", ";", "public", "TileEntityChest", "(", ")", "{", "chestContents", "=", "new", "ItemStack", "[", "36", "]", ";", "adjacentChestChecked", "=", "false", ";", "}", "public", "int", "getSizeInventory", "(", ")", "{", "return", "27", ";", "}", "public", "ItemStack", "getStackInSlot", "(", "int", "par1", ")", "{", "return", "chestContents", "[", "par1", "]", ";", "}", "public", "ItemStack", "decrStackSize", "(", "int", "par1", ",", "int", "par2", ")", "{", "if", "(", "chestContents", "[", "par1", "]", "!=", "null", ")", "{", "if", "(", "chestContents", "[", "par1", "]", ".", "stackSize", "<=", "par2", ")", "{", "ItemStack", "itemstack", "=", "chestContents", "[", "par1", "]", ";", "chestContents", "[", "par1", "]", "=", "null", ";", "onInventoryChanged", "(", ")", ";", "return", "itemstack", ";", "}", "ItemStack", "itemstack1", "=", "chestContents", "[", "par1", "]", ".", "splitStack", "(", "par2", ")", ";", "if", "(", "chestContents", "[", "par1", "]", ".", "stackSize", "==", "0", ")", "{", "chestContents", "[", "par1", "]", "=", "null", ";", "}", "onInventoryChanged", "(", ")", ";", "return", "itemstack1", ";", "}", "else", "{", "return", "null", ";", "}", "}", "public", "ItemStack", "getStackInSlotOnClosing", "(", "int", "par1", ")", "{", "if", "(", "chestContents", "[", "par1", "]", "!=", "null", ")", "{", "ItemStack", "itemstack", "=", "chestContents", "[", "par1", "]", ";", "chestContents", "[", "par1", "]", "=", "null", ";", "return", "itemstack", ";", "}", "else", "{", "return", "null", ";", "}", "}", "public", "void", "setInventorySlotContents", "(", "int", "par1", ",", "ItemStack", "par2ItemStack", ")", "{", "chestContents", "[", "par1", "]", "=", "par2ItemStack", ";", "if", "(", "par2ItemStack", "!=", "null", "&&", "par2ItemStack", ".", "stackSize", ">", "getInventoryStackLimit", "(", ")", ")", "{", "par2ItemStack", ".", "stackSize", "=", "getInventoryStackLimit", "(", ")", ";", "}", "onInventoryChanged", "(", ")", ";", "}", "public", "String", "getInvName", "(", ")", "{", "return", "\"\"", ";", "}", "public", "void", "readFromNBT", "(", "NBTTagCompound", "par1NBTTagCompound", ")", "{", "super", ".", "readFromNBT", "(", "par1NBTTagCompound", ")", ";", "NBTTagList", "nbttaglist", "=", "par1NBTTagCompound", ".", "getTagList", "(", "\"Items\"", ")", ";", "chestContents", "=", "new", "ItemStack", "[", "getSizeInventory", "(", ")", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "nbttaglist", ".", "tagCount", "(", ")", ";", "i", "++", ")", "{", "NBTTagCompound", "nbttagcompound", "=", "(", "NBTTagCompound", ")", "nbttaglist", ".", "tagAt", "(", "i", ")", ";", "int", "j", "=", "nbttagcompound", ".", "getByte", "(", "\"Slot\"", ")", "&", "0xff", ";", "if", "(", "j", ">=", "0", "&&", "j", "<", "chestContents", ".", "length", ")", "{", "chestContents", "[", "j", "]", "=", "ItemStack", ".", "loadItemStackFromNBT", "(", "nbttagcompound", ")", ";", "}", "}", "}", "public", "void", "writeToNBT", "(", "NBTTagCompound", "par1NBTTagCompound", ")", "{", "super", ".", "writeToNBT", "(", "par1NBTTagCompound", ")", ";", "NBTTagList", "nbttaglist", "=", "new", "NBTTagList", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "chestContents", ".", "length", ";", "i", "++", ")", "{", "if", "(", "chestContents", "[", "i", "]", "!=", "null", ")", "{", "NBTTagCompound", "nbttagcompound", "=", "new", "NBTTagCompound", "(", ")", ";", "nbttagcompound", ".", "setByte", "(", "\"Slot\"", ",", "(", "byte", ")", "i", ")", ";", "chestContents", "[", "i", "]", ".", "writeToNBT", "(", "nbttagcompound", ")", ";", "nbttaglist", ".", "appendTag", "(", "nbttagcompound", ")", ";", "}", "}", "par1NBTTagCompound", ".", "setTag", "(", "\"Items\"", ",", "nbttaglist", ")", ";", "}", "public", "int", "getInventoryStackLimit", "(", ")", "{", "return", "64", ";", "}", "public", "boolean", "isUseableByPlayer", "(", "EntityPlayer", "par1EntityPlayer", ")", "{", "if", "(", "worldObj", ".", "getBlockTileEntity", "(", "xCoord", ",", "yCoord", ",", "zCoord", ")", "!=", "this", ")", "{", "return", "false", ";", "}", "return", "par1EntityPlayer", ".", "getDistanceSq", "(", "(", "double", ")", "xCoord", "+", "0.5D", ",", "(", "double", ")", "yCoord", "+", "0.5D", ",", "(", "double", ")", "zCoord", "+", "0.5D", ")", "<=", "64D", ";", "}", "public", "void", "updateContainingBlockInfo", "(", ")", "{", "super", ".", "updateContainingBlockInfo", "(", ")", ";", "adjacentChestChecked", "=", "false", ";", "}", "public", "void", "checkForAdjacentChests", "(", ")", "{", "if", "(", "adjacentChestChecked", ")", "{", "return", ";", "}", "adjacentChestChecked", "=", "true", ";", "adjacentChestZNeg", "=", "null", ";", "adjacentChestXPos", "=", "null", ";", "adjacentChestXNeg", "=", "null", ";", "adjacentChestZPos", "=", "null", ";", "if", "(", "worldObj", ".", "getBlockId", "(", "xCoord", "-", "1", ",", "yCoord", ",", "zCoord", ")", "==", "Block", ".", "chest", ".", "blockID", ")", "{", "adjacentChestXNeg", "=", "(", "TileEntityChest", ")", "worldObj", ".", "getBlockTileEntity", "(", "xCoord", "-", "1", ",", "yCoord", ",", "zCoord", ")", ";", "}", "if", "(", "worldObj", ".", "getBlockId", "(", "xCoord", "+", "1", ",", "yCoord", ",", "zCoord", ")", "==", "Block", ".", "chest", ".", "blockID", ")", "{", "adjacentChestXPos", "=", "(", "TileEntityChest", ")", "worldObj", ".", "getBlockTileEntity", "(", "xCoord", "+", "1", ",", "yCoord", ",", "zCoord", ")", ";", "}", "if", "(", "worldObj", ".", "getBlockId", "(", "xCoord", ",", "yCoord", ",", "zCoord", "-", "1", ")", "==", "Block", ".", "chest", ".", "blockID", ")", "{", "adjacentChestZNeg", "=", "(", "TileEntityChest", ")", "worldObj", ".", "getBlockTileEntity", "(", "xCoord", ",", "yCoord", ",", "zCoord", "-", "1", ")", ";", "}", "if", "(", "worldObj", ".", "getBlockId", "(", "xCoord", ",", "yCoord", ",", "zCoord", "+", "1", ")", "==", "Block", ".", "chest", ".", "blockID", ")", "{", "adjacentChestZPos", "=", "(", "TileEntityChest", ")", "worldObj", ".", "getBlockTileEntity", "(", "xCoord", ",", "yCoord", ",", "zCoord", "+", "1", ")", ";", "}", "if", "(", "adjacentChestZNeg", "!=", "null", ")", "{", "adjacentChestZNeg", ".", "updateContainingBlockInfo", "(", ")", ";", "}", "if", "(", "adjacentChestZPos", "!=", "null", ")", "{", "adjacentChestZPos", ".", "updateContainingBlockInfo", "(", ")", ";", "}", "if", "(", "adjacentChestXPos", "!=", "null", ")", "{", "adjacentChestXPos", ".", "updateContainingBlockInfo", "(", ")", ";", "}", "if", "(", "adjacentChestXNeg", "!=", "null", ")", "{", "adjacentChestXNeg", ".", "updateContainingBlockInfo", "(", ")", ";", "}", "}", "public", "void", "updateEntity", "(", ")", "{", "super", ".", "updateEntity", "(", ")", ";", "checkForAdjacentChests", "(", ")", ";", "if", "(", "(", "++", "ticksSinceSync", "%", "20", ")", "*", "4", "==", "0", ")", "{", "worldObj", ".", "playNoteAt", "(", "xCoord", ",", "yCoord", ",", "zCoord", ",", "1", ",", "numUsingPlayers", ")", ";", "}", "prevLidAngle", "=", "lidAngle", ";", "float", "f", "=", "0.1F", ";", "if", "(", "numUsingPlayers", ">", "0", "&&", "lidAngle", "==", "0.0F", "&&", "adjacentChestZNeg", "==", "null", "&&", "adjacentChestXNeg", "==", "null", ")", "{", "double", "d", "=", "(", "double", ")", "xCoord", "+", "0.5D", ";", "double", "d1", "=", "(", "double", ")", "zCoord", "+", "0.5D", ";", "if", "(", "adjacentChestZPos", "!=", "null", ")", "{", "d1", "+=", "0.5D", ";", "}", "if", "(", "adjacentChestXPos", "!=", "null", ")", "{", "d", "+=", "0.5D", ";", "}", "worldObj", ".", "playSoundEffect", "(", "d", ",", "(", "double", ")", "yCoord", "+", "0.5D", ",", "d1", ",", "\"\"", ",", "0.5F", ",", "worldObj", ".", "rand", ".", "nextFloat", "(", ")", "*", "0.1F", "+", "0.9F", ")", ";", "}", "if", "(", "numUsingPlayers", "==", "0", "&&", "lidAngle", ">", "0.0F", "||", "numUsingPlayers", ">", "0", "&&", "lidAngle", "<", "1.0F", ")", "{", "float", "f1", "=", "lidAngle", ";", "if", "(", "numUsingPlayers", ">", "0", ")", "{", "lidAngle", "+=", "f", ";", "}", "else", "{", "lidAngle", "-=", "f", ";", "}", "if", "(", "lidAngle", ">", "1.0F", ")", "{", "lidAngle", "=", "1.0F", ";", "}", "float", "f2", "=", "0.5F", ";", "if", "(", "lidAngle", "<", "f2", "&&", "f1", ">=", "f2", "&&", "adjacentChestZNeg", "==", "null", "&&", "adjacentChestXNeg", "==", "null", ")", "{", "double", "d2", "=", "(", "double", ")", "xCoord", "+", "0.5D", ";", "double", "d3", "=", "(", "double", ")", "zCoord", "+", "0.5D", ";", "if", "(", "adjacentChestZPos", "!=", "null", ")", "{", "d3", "+=", "0.5D", ";", "}", "if", "(", "adjacentChestXPos", "!=", "null", ")", "{", "d2", "+=", "0.5D", ";", "}", "worldObj", ".", "playSoundEffect", "(", "d2", ",", "(", "double", ")", "yCoord", "+", "0.5D", ",", "d3", ",", "\"\"", ",", "0.5F", ",", "worldObj", ".", "rand", ".", "nextFloat", "(", ")", "*", "0.1F", "+", "0.9F", ")", ";", "}", "if", "(", "lidAngle", "<", "0.0F", ")", "{", "lidAngle", "=", "0.0F", ";", "}", "}", "}", "public", "void", "onTileEntityPowered", "(", "int", "par1", ",", "int", "par2", ")", "{", "if", "(", "par1", "==", "1", ")", "{", "numUsingPlayers", "=", "par2", ";", "}", "}", "public", "void", "openChest", "(", ")", "{", "numUsingPlayers", "++", ";", "worldObj", ".", "playNoteAt", "(", "xCoord", ",", "yCoord", ",", "zCoord", ",", "1", ",", "numUsingPlayers", ")", ";", "}", "public", "void", "closeChest", "(", ")", "{", "numUsingPlayers", "--", ";", "worldObj", ".", "playNoteAt", "(", "xCoord", ",", "yCoord", ",", "zCoord", ",", "1", ",", "numUsingPlayers", ")", ";", "}", "public", "void", "invalidate", "(", ")", "{", "updateContainingBlockInfo", "(", ")", ";", "checkForAdjacentChests", "(", ")", ";", "super", ".", "invalidate", "(", ")", ";", "}", "}", "</s>" ]
9,840
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "public", "class", "WeightedRandomChoice", "{", "protected", "int", "itemWeight", ";", "public", "WeightedRandomChoice", "(", "int", "par1", ")", "{", "itemWeight", "=", "par1", ";", "}", "}", "</s>" ]
9,841
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "public", "class", "EnchantmentLootBonus", "extends", "Enchantment", "{", "protected", "EnchantmentLootBonus", "(", "int", "par1", ",", "int", "par2", ",", "EnumEnchantmentType", "par3EnumEnchantmentType", ")", "{", "super", "(", "par1", ",", "par2", ",", "par3EnumEnchantmentType", ")", ";", "setName", "(", "\"lootBonus\"", ")", ";", "if", "(", "par3EnumEnchantmentType", "==", "EnumEnchantmentType", ".", "digger", ")", "{", "setName", "(", "\"\"", ")", ";", "}", "}", "public", "int", "getMinEnchantability", "(", "int", "par1", ")", "{", "return", "20", "+", "(", "par1", "-", "1", ")", "*", "12", ";", "}", "public", "int", "getMaxEnchantability", "(", "int", "par1", ")", "{", "return", "super", ".", "getMinEnchantability", "(", "par1", ")", "+", "50", ";", "}", "public", "int", "getMaxLevel", "(", ")", "{", "return", "3", ";", "}", "public", "boolean", "canApplyTogether", "(", "Enchantment", "par1Enchantment", ")", "{", "return", "super", ".", "canApplyTogether", "(", "par1Enchantment", ")", "&&", "par1Enchantment", ".", "effectId", "!=", "silkTouch", ".", "effectId", ";", "}", "}", "</s>" ]
9,842
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "public", "class", "ItemSeeds", "extends", "Item", "{", "private", "int", "blockType", ";", "private", "int", "soilBlockID", ";", "public", "ItemSeeds", "(", "int", "par1", ",", "int", "par2", ",", "int", "par3", ")", "{", "super", "(", "par1", ")", ";", "blockType", "=", "par2", ";", "soilBlockID", "=", "par3", ";", "}", "public", "boolean", "onItemUse", "(", "ItemStack", "par1ItemStack", ",", "EntityPlayer", "par2EntityPlayer", ",", "World", "par3World", ",", "int", "par4", ",", "int", "par5", ",", "int", "par6", ",", "int", "par7", ")", "{", "if", "(", "par7", "!=", "1", ")", "{", "return", "false", ";", "}", "if", "(", "!", "par2EntityPlayer", ".", "canPlayerEdit", "(", "par4", ",", "par5", ",", "par6", ")", "||", "!", "par2EntityPlayer", ".", "canPlayerEdit", "(", "par4", ",", "par5", "+", "1", ",", "par6", ")", ")", "{", "return", "false", ";", "}", "int", "i", "=", "par3World", ".", "getBlockId", "(", "par4", ",", "par5", ",", "par6", ")", ";", "if", "(", "i", "==", "soilBlockID", "&&", "par3World", ".", "isAirBlock", "(", "par4", ",", "par5", "+", "1", ",", "par6", ")", ")", "{", "par3World", ".", "setBlockWithNotify", "(", "par4", ",", "par5", "+", "1", ",", "par6", ",", "blockType", ")", ";", "par1ItemStack", ".", "stackSize", "--", ";", "return", "true", ";", "}", "else", "{", "return", "false", ";", "}", "}", "}", "</s>" ]
9,843
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "Random", ";", "public", "class", "BlockBookshelf", "extends", "Block", "{", "public", "BlockBookshelf", "(", "int", "par1", ",", "int", "par2", ")", "{", "super", "(", "par1", ",", "par2", ",", "Material", ".", "wood", ")", ";", "}", "public", "int", "getBlockTextureFromSide", "(", "int", "par1", ")", "{", "if", "(", "par1", "<=", "1", ")", "{", "return", "4", ";", "}", "else", "{", "return", "blockIndexInTexture", ";", "}", "}", "public", "int", "quantityDropped", "(", "Random", "par1Random", ")", "{", "return", "3", ";", "}", "public", "int", "idDropped", "(", "int", "par1", ",", "Random", "par2Random", ",", "int", "par3", ")", "{", "return", "Item", ".", "book", ".", "shiftedIndex", ";", "}", "}", "</s>" ]
9,844
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "Random", ";", "public", "class", "BlockMelon", "extends", "Block", "{", "protected", "BlockMelon", "(", "int", "par1", ")", "{", "super", "(", "par1", ",", "Material", ".", "pumpkin", ")", ";", "blockIndexInTexture", "=", "136", ";", "}", "public", "int", "getBlockTextureFromSideAndMetadata", "(", "int", "par1", ",", "int", "par2", ")", "{", "return", "par1", "!=", "1", "&&", "par1", "!=", "0", "?", "136", ":", "137", ";", "}", "public", "int", "getBlockTextureFromSide", "(", "int", "par1", ")", "{", "return", "par1", "!=", "1", "&&", "par1", "!=", "0", "?", "136", ":", "137", ";", "}", "public", "int", "idDropped", "(", "int", "par1", ",", "Random", "par2Random", ",", "int", "par3", ")", "{", "return", "Item", ".", "melon", ".", "shiftedIndex", ";", "}", "public", "int", "quantityDropped", "(", "Random", "par1Random", ")", "{", "return", "3", "+", "par1Random", ".", "nextInt", "(", "5", ")", ";", "}", "public", "int", "quantityDroppedWithBonus", "(", "int", "par1", ",", "Random", "par2Random", ")", "{", "int", "i", "=", "quantityDropped", "(", "par2Random", ")", "+", "par2Random", ".", "nextInt", "(", "1", "+", "par1", ")", ";", "if", "(", "i", ">", "9", ")", "{", "i", "=", "9", ";", "}", "return", "i", ";", "}", "}", "</s>" ]
9,845
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "io", ".", "PrintStream", ";", "import", "java", ".", "util", ".", "Random", ";", "public", "class", "WorldGenDungeons", "extends", "WorldGenerator", "{", "public", "WorldGenDungeons", "(", ")", "{", "}", "public", "boolean", "generate", "(", "World", "par1World", ",", "Random", "par2Random", ",", "int", "par3", ",", "int", "par4", ",", "int", "par5", ")", "{", "byte", "byte0", "=", "3", ";", "int", "i", "=", "par2Random", ".", "nextInt", "(", "2", ")", "+", "2", ";", "int", "j", "=", "par2Random", ".", "nextInt", "(", "2", ")", "+", "2", ";", "int", "k", "=", "0", ";", "for", "(", "int", "l", "=", "par3", "-", "i", "-", "1", ";", "l", "<=", "par3", "+", "i", "+", "1", ";", "l", "++", ")", "{", "for", "(", "int", "k1", "=", "par4", "-", "1", ";", "k1", "<=", "par4", "+", "byte0", "+", "1", ";", "k1", "++", ")", "{", "for", "(", "int", "j2", "=", "par5", "-", "j", "-", "1", ";", "j2", "<=", "par5", "+", "j", "+", "1", ";", "j2", "++", ")", "{", "Material", "material", "=", "par1World", ".", "getBlockMaterial", "(", "l", ",", "k1", ",", "j2", ")", ";", "if", "(", "k1", "==", "par4", "-", "1", "&&", "!", "material", ".", "isSolid", "(", ")", ")", "{", "return", "false", ";", "}", "if", "(", "k1", "==", "par4", "+", "byte0", "+", "1", "&&", "!", "material", ".", "isSolid", "(", ")", ")", "{", "return", "false", ";", "}", "if", "(", "(", "l", "==", "par3", "-", "i", "-", "1", "||", "l", "==", "par3", "+", "i", "+", "1", "||", "j2", "==", "par5", "-", "j", "-", "1", "||", "j2", "==", "par5", "+", "j", "+", "1", ")", "&&", "k1", "==", "par4", "&&", "par1World", ".", "isAirBlock", "(", "l", ",", "k1", ",", "j2", ")", "&&", "par1World", ".", "isAirBlock", "(", "l", ",", "k1", "+", "1", ",", "j2", ")", ")", "{", "k", "++", ";", "}", "}", "}", "}", "if", "(", "k", "<", "1", "||", "k", ">", "5", ")", "{", "return", "false", ";", "}", "for", "(", "int", "i1", "=", "par3", "-", "i", "-", "1", ";", "i1", "<=", "par3", "+", "i", "+", "1", ";", "i1", "++", ")", "{", "for", "(", "int", "l1", "=", "par4", "+", "byte0", ";", "l1", ">=", "par4", "-", "1", ";", "l1", "--", ")", "{", "for", "(", "int", "k2", "=", "par5", "-", "j", "-", "1", ";", "k2", "<=", "par5", "+", "j", "+", "1", ";", "k2", "++", ")", "{", "if", "(", "i1", "==", "par3", "-", "i", "-", "1", "||", "l1", "==", "par4", "-", "1", "||", "k2", "==", "par5", "-", "j", "-", "1", "||", "i1", "==", "par3", "+", "i", "+", "1", "||", "l1", "==", "par4", "+", "byte0", "+", "1", "||", "k2", "==", "par5", "+", "j", "+", "1", ")", "{", "if", "(", "l1", ">=", "0", "&&", "!", "par1World", ".", "getBlockMaterial", "(", "i1", ",", "l1", "-", "1", ",", "k2", ")", ".", "isSolid", "(", ")", ")", "{", "par1World", ".", "setBlockWithNotify", "(", "i1", ",", "l1", ",", "k2", ",", "0", ")", ";", "continue", ";", "}", "if", "(", "!", "par1World", ".", "getBlockMaterial", "(", "i1", ",", "l1", ",", "k2", ")", ".", "isSolid", "(", ")", ")", "{", "continue", ";", "}", "if", "(", "l1", "==", "par4", "-", "1", "&&", "par2Random", ".", "nextInt", "(", "4", ")", "!=", "0", ")", "{", "par1World", ".", "setBlockWithNotify", "(", "i1", ",", "l1", ",", "k2", ",", "Block", ".", "cobblestoneMossy", ".", "blockID", ")", ";", "}", "else", "{", "par1World", ".", "setBlockWithNotify", "(", "i1", ",", "l1", ",", "k2", ",", "Block", ".", "cobblestone", ".", "blockID", ")", ";", "}", "}", "else", "{", "par1World", ".", "setBlockWithNotify", "(", "i1", ",", "l1", ",", "k2", ",", "0", ")", ";", "}", "}", "}", "}", "for", "(", "int", "j1", "=", "0", ";", "j1", "<", "2", ";", "j1", "++", ")", "{", "label0", ":", "for", "(", "int", "i2", "=", "0", ";", "i2", "<", "3", ";", "i2", "++", ")", "{", "int", "l2", "=", "(", "par3", "+", "par2Random", ".", "nextInt", "(", "i", "*", "2", "+", "1", ")", ")", "-", "i", ";", "int", "i3", "=", "par4", ";", "int", "j3", "=", "(", "par5", "+", "par2Random", ".", "nextInt", "(", "j", "*", "2", "+", "1", ")", ")", "-", "j", ";", "if", "(", "!", "par1World", ".", "isAirBlock", "(", "l2", ",", "i3", ",", "j3", ")", ")", "{", "continue", ";", "}", "int", "k3", "=", "0", ";", "if", "(", "par1World", ".", "getBlockMaterial", "(", "l2", "-", "1", ",", "i3", ",", "j3", ")", ".", "isSolid", "(", ")", ")", "{", "k3", "++", ";", "}", "if", "(", "par1World", ".", "getBlockMaterial", "(", "l2", "+", "1", ",", "i3", ",", "j3", ")", ".", "isSolid", "(", ")", ")", "{", "k3", "++", ";", "}", "if", "(", "par1World", ".", "getBlockMaterial", "(", "l2", ",", "i3", ",", "j3", "-", "1", ")", ".", "isSolid", "(", ")", ")", "{", "k3", "++", ";", "}", "if", "(", "par1World", ".", "getBlockMaterial", "(", "l2", ",", "i3", ",", "j3", "+", "1", ")", ".", "isSolid", "(", ")", ")", "{", "k3", "++", ";", "}", "if", "(", "k3", "!=", "1", ")", "{", "continue", ";", "}", "par1World", ".", "setBlockWithNotify", "(", "l2", ",", "i3", ",", "j3", ",", "Block", ".", "chest", ".", "blockID", ")", ";", "TileEntityChest", "tileentitychest", "=", "(", "TileEntityChest", ")", "par1World", ".", "getBlockTileEntity", "(", "l2", ",", "i3", ",", "j3", ")", ";", "if", "(", "tileentitychest", "==", "null", ")", "{", "break", ";", "}", "int", "l3", "=", "0", ";", "do", "{", "if", "(", "l3", ">=", "8", ")", "{", "break", "label0", ";", "}", "ItemStack", "itemstack", "=", "pickCheckLootItem", "(", "par2Random", ")", ";", "if", "(", "itemstack", "!=", "null", ")", "{", "tileentitychest", ".", "setInventorySlotContents", "(", "par2Random", ".", "nextInt", "(", "tileentitychest", ".", "getSizeInventory", "(", ")", ")", ",", "itemstack", ")", ";", "}", "l3", "++", ";", "}", "while", "(", "true", ")", ";", "}", "}", "par1World", ".", "setBlockWithNotify", "(", "par3", ",", "par4", ",", "par5", ",", "Block", ".", "mobSpawner", ".", "blockID", ")", ";", "TileEntityMobSpawner", "tileentitymobspawner", "=", "(", "TileEntityMobSpawner", ")", "par1World", ".", "getBlockTileEntity", "(", "par3", ",", "par4", ",", "par5", ")", ";", "if", "(", "tileentitymobspawner", "!=", "null", ")", "{", "tileentitymobspawner", ".", "setMobID", "(", "pickMobSpawner", "(", "par2Random", ")", ")", ";", "}", "else", "{", "System", ".", "err", ".", "println", "(", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "\"\"", ")", ".", "append", "(", "par3", ")", ".", "append", "(", "\",", "\"", ")", ".", "append", "(", "par4", ")", ".", "append", "(", "\",", "\"", ")", ".", "append", "(", "par5", ")", ".", "append", "(", "\")\"", ")", ".", "toString", "(", ")", ")", ";", "}", "return", "true", ";", "}", "private", "ItemStack", "pickCheckLootItem", "(", "Random", "par1Random", ")", "{", "int", "i", "=", "par1Random", ".", "nextInt", "(", "11", ")", ";", "if", "(", "i", "==", "0", ")", "{", "return", "new", "ItemStack", "(", "Item", ".", "saddle", ")", ";", "}", "if", "(", "i", "==", "1", ")", "{", "return", "new", "ItemStack", "(", "Item", ".", "ingotIron", ",", "par1Random", ".", "nextInt", "(", "4", ")", "+", "1", ")", ";", "}", "if", "(", "i", "==", "2", ")", "{", "return", "new", "ItemStack", "(", "Item", ".", "bread", ")", ";", "}", "if", "(", "i", "==", "3", ")", "{", "return", "new", "ItemStack", "(", "Item", ".", "wheat", ",", "par1Random", ".", "nextInt", "(", "4", ")", "+", "1", ")", ";", "}", "if", "(", "i", "==", "4", ")", "{", "return", "new", "ItemStack", "(", "Item", ".", "gunpowder", ",", "par1Random", ".", "nextInt", "(", "4", ")", "+", "1", ")", ";", "}", "if", "(", "i", "==", "5", ")", "{", "return", "new", "ItemStack", "(", "Item", ".", "silk", ",", "par1Random", ".", "nextInt", "(", "4", ")", "+", "1", ")", ";", "}", "if", "(", "i", "==", "6", ")", "{", "return", "new", "ItemStack", "(", "Item", ".", "bucketEmpty", ")", ";", "}", "if", "(", "i", "==", "7", "&&", "par1Random", ".", "nextInt", "(", "100", ")", "==", "0", ")", "{", "return", "new", "ItemStack", "(", "Item", ".", "appleGold", ")", ";", "}", "if", "(", "i", "==", "8", "&&", "par1Random", ".", "nextInt", "(", "2", ")", "==", "0", ")", "{", "return", "new", "ItemStack", "(", "Item", ".", "redstone", ",", "par1Random", ".", "nextInt", "(", "4", ")", "+", "1", ")", ";", "}", "if", "(", "i", "==", "9", "&&", "par1Random", ".", "nextInt", "(", "10", ")", "==", "0", ")", "{", "return", "new", "ItemStack", "(", "Item", ".", "itemsList", "[", "Item", ".", "record13", ".", "shiftedIndex", "+", "par1Random", ".", "nextInt", "(", "2", ")", "]", ")", ";", "}", "if", "(", "i", "==", "10", ")", "{", "return", "new", "ItemStack", "(", "Item", ".", "dyePowder", ",", "1", ",", "3", ")", ";", "}", "else", "{", "return", "null", ";", "}", "}", "private", "String", "pickMobSpawner", "(", "Random", "par1Random", ")", "{", "int", "i", "=", "par1Random", ".", "nextInt", "(", "4", ")", ";", "if", "(", "i", "==", "0", ")", "{", "return", "\"Skeleton\"", ";", "}", "if", "(", "i", "==", "1", ")", "{", "return", "\"Zombie\"", ";", "}", "if", "(", "i", "==", "2", ")", "{", "return", "\"Zombie\"", ";", "}", "if", "(", "i", "==", "3", ")", "{", "return", "\"Spider\"", ";", "}", "else", "{", "return", "\"\"", ";", "}", "}", "}", "</s>" ]
9,846
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "Random", ";", "public", "class", "EntitySheep", "extends", "EntityAnimal", "{", "public", "static", "final", "float", "fleeceColorTable", "[", "]", "[", "]", "=", "{", "{", "1.0F", ",", "1.0F", ",", "1.0F", "}", ",", "{", "0.95F", ",", "0.7F", ",", "0.2F", "}", ",", "{", "0.9F", ",", "0.5F", ",", "0.85F", "}", ",", "{", "0.6F", ",", "0.7F", ",", "0.95F", "}", ",", "{", "0.9F", ",", "0.9F", ",", "0.2F", "}", ",", "{", "0.5F", ",", "0.8F", ",", "0.1F", "}", ",", "{", "0.95F", ",", "0.7F", ",", "0.8F", "}", ",", "{", "0.3F", ",", "0.3F", ",", "0.3F", "}", ",", "{", "0.6F", ",", "0.6F", ",", "0.6F", "}", ",", "{", "0.3F", ",", "0.6F", ",", "0.7F", "}", ",", "{", "0.7F", ",", "0.4F", ",", "0.9F", "}", ",", "{", "0.2F", ",", "0.4F", ",", "0.8F", "}", ",", "{", "0.5F", ",", "0.4F", ",", "0.3F", "}", ",", "{", "0.4F", ",", "0.5F", ",", "0.2F", "}", ",", "{", "0.8F", ",", "0.3F", ",", "0.3F", "}", ",", "{", "0.1F", ",", "0.1F", ",", "0.1F", "}", "}", ";", "private", "int", "sheepTimer", ";", "private", "EntityAIEatGrass", "aiEatGrass", ";", "public", "EntitySheep", "(", "World", "par1World", ")", "{", "super", "(", "par1World", ")", ";", "aiEatGrass", "=", "new", "EntityAIEatGrass", "(", "this", ")", ";", "texture", "=", "\"\"", ";", "setSize", "(", "0.9F", ",", "1.3F", ")", ";", "float", "f", "=", "0.23F", ";", "getNavigator", "(", ")", ".", "func_48656_a", "(", "true", ")", ";", "tasks", ".", "addTask", "(", "0", ",", "new", "EntityAISwimming", "(", "this", ")", ")", ";", "tasks", ".", "addTask", "(", "1", ",", "new", "EntityAIPanic", "(", "this", ",", "0.38F", ")", ")", ";", "tasks", ".", "addTask", "(", "2", ",", "new", "EntityAIMate", "(", "this", ",", "f", ")", ")", ";", "tasks", ".", "addTask", "(", "3", ",", "new", "EntityAITempt", "(", "this", ",", "0.25F", ",", "Item", ".", "wheat", ".", "shiftedIndex", ",", "false", ")", ")", ";", "tasks", ".", "addTask", "(", "4", ",", "new", "EntityAIFollowParent", "(", "this", ",", "0.25F", ")", ")", ";", "tasks", ".", "addTask", "(", "5", ",", "aiEatGrass", ")", ";", "tasks", ".", "addTask", "(", "6", ",", "new", "EntityAIWander", "(", "this", ",", "f", ")", ")", ";", "tasks", ".", "addTask", "(", "7", ",", "new", "EntityAIWatchClosest", "(", "this", ",", "net", ".", "minecraft", ".", "src", ".", "EntityPlayer", ".", "class", ",", "6F", ")", ")", ";", "tasks", ".", "addTask", "(", "8", ",", "new", "EntityAILookIdle", "(", "this", ")", ")", ";", "}", "protected", "boolean", "isAIEnabled", "(", ")", "{", "return", "true", ";", "}", "protected", "void", "updateAITasks", "(", ")", "{", "sheepTimer", "=", "aiEatGrass", ".", "func_48227_f", "(", ")", ";", "super", ".", "updateAITasks", "(", ")", ";", "}", "public", "void", "onLivingUpdate", "(", ")", "{", "if", "(", "worldObj", ".", "isRemote", ")", "{", "sheepTimer", "=", "Math", ".", "max", "(", "0", ",", "sheepTimer", "-", "1", ")", ";", "}", "super", ".", "onLivingUpdate", "(", ")", ";", "}", "public", "int", "getMaxHealth", "(", ")", "{", "return", "8", ";", "}", "protected", "void", "entityInit", "(", ")", "{", "super", ".", "entityInit", "(", ")", ";", "dataWatcher", ".", "addObject", "(", "16", ",", "new", "Byte", "(", "(", "byte", ")", "0", ")", ")", ";", "}", "protected", "void", "dropFewItems", "(", "boolean", "par1", ",", "int", "par2", ")", "{", "if", "(", "!", "getSheared", "(", ")", ")", "{", "entityDropItem", "(", "new", "ItemStack", "(", "Block", ".", "cloth", ".", "blockID", ",", "1", ",", "getFleeceColor", "(", ")", ")", ",", "0.0F", ")", ";", "}", "}", "protected", "int", "getDropItemId", "(", ")", "{", "return", "Block", ".", "cloth", ".", "blockID", ";", "}", "public", "boolean", "interact", "(", "EntityPlayer", "par1EntityPlayer", ")", "{", "ItemStack", "itemstack", "=", "par1EntityPlayer", ".", "inventory", ".", "getCurrentItem", "(", ")", ";", "if", "(", "itemstack", "!=", "null", "&&", "itemstack", ".", "itemID", "==", "Item", ".", "shears", ".", "shiftedIndex", "&&", "!", "getSheared", "(", ")", "&&", "!", "isChild", "(", ")", ")", "{", "if", "(", "!", "worldObj", ".", "isRemote", ")", "{", "setSheared", "(", "true", ")", ";", "int", "i", "=", "1", "+", "rand", ".", "nextInt", "(", "3", ")", ";", "for", "(", "int", "j", "=", "0", ";", "j", "<", "i", ";", "j", "++", ")", "{", "EntityItem", "entityitem", "=", "entityDropItem", "(", "new", "ItemStack", "(", "Block", ".", "cloth", ".", "blockID", ",", "1", ",", "getFleeceColor", "(", ")", ")", ",", "1.0F", ")", ";", "entityitem", ".", "motionY", "+=", "rand", ".", "nextFloat", "(", ")", "*", "0.05F", ";", "entityitem", ".", "motionX", "+=", "(", "rand", ".", "nextFloat", "(", ")", "-", "rand", ".", "nextFloat", "(", ")", ")", "*", "0.1F", ";", "entityitem", ".", "motionZ", "+=", "(", "rand", ".", "nextFloat", "(", ")", "-", "rand", ".", "nextFloat", "(", ")", ")", "*", "0.1F", ";", "}", "}", "itemstack", ".", "damageItem", "(", "1", ",", "par1EntityPlayer", ")", ";", "}", "return", "super", ".", "interact", "(", "par1EntityPlayer", ")", ";", "}", "public", "void", "writeEntityToNBT", "(", "NBTTagCompound", "par1NBTTagCompound", ")", "{", "super", ".", "writeEntityToNBT", "(", "par1NBTTagCompound", ")", ";", "par1NBTTagCompound", ".", "setBoolean", "(", "\"Sheared\"", ",", "getSheared", "(", ")", ")", ";", "par1NBTTagCompound", ".", "setByte", "(", "\"Color\"", ",", "(", "byte", ")", "getFleeceColor", "(", ")", ")", ";", "}", "public", "void", "readEntityFromNBT", "(", "NBTTagCompound", "par1NBTTagCompound", ")", "{", "super", ".", "readEntityFromNBT", "(", "par1NBTTagCompound", ")", ";", "setSheared", "(", "par1NBTTagCompound", ".", "getBoolean", "(", "\"Sheared\"", ")", ")", ";", "setFleeceColor", "(", "par1NBTTagCompound", ".", "getByte", "(", "\"Color\"", ")", ")", ";", "}", "protected", "String", "getLivingSound", "(", ")", "{", "return", "\"mob.sheep\"", ";", "}", "protected", "String", "getHurtSound", "(", ")", "{", "return", "\"mob.sheep\"", ";", "}", "protected", "String", "getDeathSound", "(", ")", "{", "return", "\"mob.sheep\"", ";", "}", "public", "int", "getFleeceColor", "(", ")", "{", "return", "dataWatcher", ".", "getWatchableObjectByte", "(", "16", ")", "&", "0xf", ";", "}", "public", "void", "setFleeceColor", "(", "int", "par1", ")", "{", "byte", "byte0", "=", "dataWatcher", ".", "getWatchableObjectByte", "(", "16", ")", ";", "dataWatcher", ".", "updateObject", "(", "16", ",", "Byte", ".", "valueOf", "(", "(", "byte", ")", "(", "byte0", "&", "0xf0", "|", "par1", "&", "0xf", ")", ")", ")", ";", "}", "public", "boolean", "getSheared", "(", ")", "{", "return", "(", "dataWatcher", ".", "getWatchableObjectByte", "(", "16", ")", "&", "0x10", ")", "!=", "0", ";", "}", "public", "void", "setSheared", "(", "boolean", "par1", ")", "{", "byte", "byte0", "=", "dataWatcher", ".", "getWatchableObjectByte", "(", "16", ")", ";", "if", "(", "par1", ")", "{", "dataWatcher", ".", "updateObject", "(", "16", ",", "Byte", ".", "valueOf", "(", "(", "byte", ")", "(", "byte0", "|", "0x10", ")", ")", ")", ";", "}", "else", "{", "dataWatcher", ".", "updateObject", "(", "16", ",", "Byte", ".", "valueOf", "(", "(", "byte", ")", "(", "byte0", "&", "0xffffffef", ")", ")", ")", ";", "}", "}", "public", "static", "int", "getRandomFleeceColor", "(", "Random", "par0Random", ")", "{", "int", "i", "=", "par0Random", ".", "nextInt", "(", "100", ")", ";", "if", "(", "i", "<", "5", ")", "{", "return", "15", ";", "}", "if", "(", "i", "<", "10", ")", "{", "return", "7", ";", "}", "if", "(", "i", "<", "15", ")", "{", "return", "8", ";", "}", "if", "(", "i", "<", "18", ")", "{", "return", "12", ";", "}", "return", "par0Random", ".", "nextInt", "(", "500", ")", "!=", "0", "?", "0", ":", "6", ";", "}", "public", "EntityAnimal", "spawnBabyAnimal", "(", "EntityAnimal", "par1EntityAnimal", ")", "{", "EntitySheep", "entitysheep", "=", "(", "EntitySheep", ")", "par1EntityAnimal", ";", "EntitySheep", "entitysheep1", "=", "new", "EntitySheep", "(", "worldObj", ")", ";", "if", "(", "rand", ".", "nextBoolean", "(", ")", ")", "{", "entitysheep1", ".", "setFleeceColor", "(", "getFleeceColor", "(", ")", ")", ";", "}", "else", "{", "entitysheep1", ".", "setFleeceColor", "(", "entitysheep", ".", "getFleeceColor", "(", ")", ")", ";", "}", "return", "entitysheep1", ";", "}", "public", "void", "eatGrassBonus", "(", ")", "{", "setSheared", "(", "false", ")", ";", "if", "(", "isChild", "(", ")", ")", "{", "int", "i", "=", "getGrowingAge", "(", ")", "+", "1200", ";", "if", "(", "i", ">", "0", ")", "{", "i", "=", "0", ";", "}", "setGrowingAge", "(", "i", ")", ";", "}", "}", "}", "</s>" ]
9,847
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "class", "Empty3", "{", "}", "</s>" ]
9,848
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "public", "class", "EntityGiantZombie", "extends", "EntityMob", "{", "public", "EntityGiantZombie", "(", "World", "par1World", ")", "{", "super", "(", "par1World", ")", ";", "texture", "=", "\"\"", ";", "moveSpeed", "=", "0.5F", ";", "attackStrength", "=", "50", ";", "yOffset", "*=", "6F", ";", "setSize", "(", "width", "*", "6F", ",", "height", "*", "6F", ")", ";", "}", "public", "int", "getMaxHealth", "(", ")", "{", "return", "100", ";", "}", "public", "float", "getBlockPathWeight", "(", "int", "par1", ",", "int", "par2", ",", "int", "par3", ")", "{", "return", "worldObj", ".", "getLightBrightness", "(", "par1", ",", "par2", ",", "par3", ")", "-", "0.5F", ";", "}", "}", "</s>" ]
9,849
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "Random", ";", "public", "class", "ItemFireball", "extends", "Item", "{", "public", "ItemFireball", "(", "int", "par1", ")", "{", "super", "(", "par1", ")", ";", "}", "public", "boolean", "onItemUse", "(", "ItemStack", "par1ItemStack", ",", "EntityPlayer", "par2EntityPlayer", ",", "World", "par3World", ",", "int", "par4", ",", "int", "par5", ",", "int", "par6", ",", "int", "par7", ")", "{", "if", "(", "par3World", ".", "isRemote", ")", "{", "return", "true", ";", "}", "if", "(", "par7", "==", "0", ")", "{", "par5", "--", ";", "}", "if", "(", "par7", "==", "1", ")", "{", "par5", "++", ";", "}", "if", "(", "par7", "==", "2", ")", "{", "par6", "--", ";", "}", "if", "(", "par7", "==", "3", ")", "{", "par6", "++", ";", "}", "if", "(", "par7", "==", "4", ")", "{", "par4", "--", ";", "}", "if", "(", "par7", "==", "5", ")", "{", "par4", "++", ";", "}", "if", "(", "!", "par2EntityPlayer", ".", "canPlayerEdit", "(", "par4", ",", "par5", ",", "par6", ")", ")", "{", "return", "false", ";", "}", "int", "i", "=", "par3World", ".", "getBlockId", "(", "par4", ",", "par5", ",", "par6", ")", ";", "if", "(", "i", "==", "0", ")", "{", "par3World", ".", "playSoundEffect", "(", "(", "double", ")", "par4", "+", "0.5D", ",", "(", "double", ")", "par5", "+", "0.5D", ",", "(", "double", ")", "par6", "+", "0.5D", ",", "\"fire.ignite\"", ",", "1.0F", ",", "itemRand", ".", "nextFloat", "(", ")", "*", "0.4F", "+", "0.8F", ")", ";", "par3World", ".", "setBlockWithNotify", "(", "par4", ",", "par5", ",", "par6", ",", "Block", ".", "fire", ".", "blockID", ")", ";", "}", "if", "(", "!", "par2EntityPlayer", ".", "capabilities", ".", "isCreativeMode", ")", "{", "par1ItemStack", ".", "stackSize", "--", ";", "}", "return", "true", ";", "}", "}", "</s>" ]
9,850
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "final", "class", "StepSoundSand", "extends", "StepSound", "{", "StepSoundSand", "(", "String", "par1Str", ",", "float", "par2", ",", "float", "par3", ")", "{", "super", "(", "par1Str", ",", "par2", ",", "par3", ")", ";", "}", "}", "</s>" ]
9,851
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "public", "class", "TileEntityFurnace", "extends", "TileEntity", "implements", "IInventory", "{", "private", "ItemStack", "furnaceItemStacks", "[", "]", ";", "public", "int", "furnaceBurnTime", ";", "public", "int", "currentItemBurnTime", ";", "public", "int", "furnaceCookTime", ";", "public", "TileEntityFurnace", "(", ")", "{", "furnaceItemStacks", "=", "new", "ItemStack", "[", "3", "]", ";", "furnaceBurnTime", "=", "0", ";", "currentItemBurnTime", "=", "0", ";", "furnaceCookTime", "=", "0", ";", "}", "public", "int", "getSizeInventory", "(", ")", "{", "return", "furnaceItemStacks", ".", "length", ";", "}", "public", "ItemStack", "getStackInSlot", "(", "int", "par1", ")", "{", "return", "furnaceItemStacks", "[", "par1", "]", ";", "}", "public", "ItemStack", "decrStackSize", "(", "int", "par1", ",", "int", "par2", ")", "{", "if", "(", "furnaceItemStacks", "[", "par1", "]", "!=", "null", ")", "{", "if", "(", "furnaceItemStacks", "[", "par1", "]", ".", "stackSize", "<=", "par2", ")", "{", "ItemStack", "itemstack", "=", "furnaceItemStacks", "[", "par1", "]", ";", "furnaceItemStacks", "[", "par1", "]", "=", "null", ";", "return", "itemstack", ";", "}", "ItemStack", "itemstack1", "=", "furnaceItemStacks", "[", "par1", "]", ".", "splitStack", "(", "par2", ")", ";", "if", "(", "furnaceItemStacks", "[", "par1", "]", ".", "stackSize", "==", "0", ")", "{", "furnaceItemStacks", "[", "par1", "]", "=", "null", ";", "}", "return", "itemstack1", ";", "}", "else", "{", "return", "null", ";", "}", "}", "public", "ItemStack", "getStackInSlotOnClosing", "(", "int", "par1", ")", "{", "if", "(", "furnaceItemStacks", "[", "par1", "]", "!=", "null", ")", "{", "ItemStack", "itemstack", "=", "furnaceItemStacks", "[", "par1", "]", ";", "furnaceItemStacks", "[", "par1", "]", "=", "null", ";", "return", "itemstack", ";", "}", "else", "{", "return", "null", ";", "}", "}", "public", "void", "setInventorySlotContents", "(", "int", "par1", ",", "ItemStack", "par2ItemStack", ")", "{", "furnaceItemStacks", "[", "par1", "]", "=", "par2ItemStack", ";", "if", "(", "par2ItemStack", "!=", "null", "&&", "par2ItemStack", ".", "stackSize", ">", "getInventoryStackLimit", "(", ")", ")", "{", "par2ItemStack", ".", "stackSize", "=", "getInventoryStackLimit", "(", ")", ";", "}", "}", "public", "String", "getInvName", "(", ")", "{", "return", "\"\"", ";", "}", "public", "void", "readFromNBT", "(", "NBTTagCompound", "par1NBTTagCompound", ")", "{", "super", ".", "readFromNBT", "(", "par1NBTTagCompound", ")", ";", "NBTTagList", "nbttaglist", "=", "par1NBTTagCompound", ".", "getTagList", "(", "\"Items\"", ")", ";", "furnaceItemStacks", "=", "new", "ItemStack", "[", "getSizeInventory", "(", ")", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "nbttaglist", ".", "tagCount", "(", ")", ";", "i", "++", ")", "{", "NBTTagCompound", "nbttagcompound", "=", "(", "NBTTagCompound", ")", "nbttaglist", ".", "tagAt", "(", "i", ")", ";", "byte", "byte0", "=", "nbttagcompound", ".", "getByte", "(", "\"Slot\"", ")", ";", "if", "(", "byte0", ">=", "0", "&&", "byte0", "<", "furnaceItemStacks", ".", "length", ")", "{", "furnaceItemStacks", "[", "byte0", "]", "=", "ItemStack", ".", "loadItemStackFromNBT", "(", "nbttagcompound", ")", ";", "}", "}", "furnaceBurnTime", "=", "par1NBTTagCompound", ".", "getShort", "(", "\"BurnTime\"", ")", ";", "furnaceCookTime", "=", "par1NBTTagCompound", ".", "getShort", "(", "\"CookTime\"", ")", ";", "currentItemBurnTime", "=", "getItemBurnTime", "(", "furnaceItemStacks", "[", "1", "]", ")", ";", "}", "public", "void", "writeToNBT", "(", "NBTTagCompound", "par1NBTTagCompound", ")", "{", "super", ".", "writeToNBT", "(", "par1NBTTagCompound", ")", ";", "par1NBTTagCompound", ".", "setShort", "(", "\"BurnTime\"", ",", "(", "short", ")", "furnaceBurnTime", ")", ";", "par1NBTTagCompound", ".", "setShort", "(", "\"CookTime\"", ",", "(", "short", ")", "furnaceCookTime", ")", ";", "NBTTagList", "nbttaglist", "=", "new", "NBTTagList", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "furnaceItemStacks", ".", "length", ";", "i", "++", ")", "{", "if", "(", "furnaceItemStacks", "[", "i", "]", "!=", "null", ")", "{", "NBTTagCompound", "nbttagcompound", "=", "new", "NBTTagCompound", "(", ")", ";", "nbttagcompound", ".", "setByte", "(", "\"Slot\"", ",", "(", "byte", ")", "i", ")", ";", "furnaceItemStacks", "[", "i", "]", ".", "writeToNBT", "(", "nbttagcompound", ")", ";", "nbttaglist", ".", "appendTag", "(", "nbttagcompound", ")", ";", "}", "}", "par1NBTTagCompound", ".", "setTag", "(", "\"Items\"", ",", "nbttaglist", ")", ";", "}", "public", "int", "getInventoryStackLimit", "(", ")", "{", "return", "64", ";", "}", "public", "boolean", "isBurning", "(", ")", "{", "return", "furnaceBurnTime", ">", "0", ";", "}", "public", "void", "updateEntity", "(", ")", "{", "boolean", "flag", "=", "furnaceBurnTime", ">", "0", ";", "boolean", "flag1", "=", "false", ";", "if", "(", "furnaceBurnTime", ">", "0", ")", "{", "furnaceBurnTime", "--", ";", "}", "if", "(", "!", "worldObj", ".", "isRemote", ")", "{", "if", "(", "furnaceBurnTime", "==", "0", "&&", "canSmelt", "(", ")", ")", "{", "currentItemBurnTime", "=", "furnaceBurnTime", "=", "getItemBurnTime", "(", "furnaceItemStacks", "[", "1", "]", ")", ";", "if", "(", "furnaceBurnTime", ">", "0", ")", "{", "flag1", "=", "true", ";", "if", "(", "furnaceItemStacks", "[", "1", "]", "!=", "null", ")", "{", "furnaceItemStacks", "[", "1", "]", ".", "stackSize", "--", ";", "if", "(", "furnaceItemStacks", "[", "1", "]", ".", "stackSize", "==", "0", ")", "{", "furnaceItemStacks", "[", "1", "]", "=", "null", ";", "}", "}", "}", "}", "if", "(", "isBurning", "(", ")", "&&", "canSmelt", "(", ")", ")", "{", "furnaceCookTime", "++", ";", "if", "(", "furnaceCookTime", "==", "200", ")", "{", "furnaceCookTime", "=", "0", ";", "smeltItem", "(", ")", ";", "flag1", "=", "true", ";", "}", "}", "else", "{", "furnaceCookTime", "=", "0", ";", "}", "if", "(", "flag", "!=", "(", "furnaceBurnTime", ">", "0", ")", ")", "{", "flag1", "=", "true", ";", "BlockFurnace", ".", "updateFurnaceBlockState", "(", "furnaceBurnTime", ">", "0", ",", "worldObj", ",", "xCoord", ",", "yCoord", ",", "zCoord", ")", ";", "}", "}", "if", "(", "flag1", ")", "{", "onInventoryChanged", "(", ")", ";", "}", "}", "private", "boolean", "canSmelt", "(", ")", "{", "if", "(", "furnaceItemStacks", "[", "0", "]", "==", "null", ")", "{", "return", "false", ";", "}", "ItemStack", "itemstack", "=", "FurnaceRecipes", ".", "smelting", "(", ")", ".", "getSmeltingResult", "(", "furnaceItemStacks", "[", "0", "]", ".", "getItem", "(", ")", ".", "shiftedIndex", ")", ";", "if", "(", "itemstack", "==", "null", ")", "{", "return", "false", ";", "}", "if", "(", "furnaceItemStacks", "[", "2", "]", "==", "null", ")", "{", "return", "true", ";", "}", "if", "(", "!", "furnaceItemStacks", "[", "2", "]", ".", "isItemEqual", "(", "itemstack", ")", ")", "{", "return", "false", ";", "}", "if", "(", "furnaceItemStacks", "[", "2", "]", ".", "stackSize", "<", "getInventoryStackLimit", "(", ")", "&&", "furnaceItemStacks", "[", "2", "]", ".", "stackSize", "<", "furnaceItemStacks", "[", "2", "]", ".", "getMaxStackSize", "(", ")", ")", "{", "return", "true", ";", "}", "return", "furnaceItemStacks", "[", "2", "]", ".", "stackSize", "<", "itemstack", ".", "getMaxStackSize", "(", ")", ";", "}", "public", "void", "smeltItem", "(", ")", "{", "if", "(", "!", "canSmelt", "(", ")", ")", "{", "return", ";", "}", "ItemStack", "itemstack", "=", "FurnaceRecipes", ".", "smelting", "(", ")", ".", "getSmeltingResult", "(", "furnaceItemStacks", "[", "0", "]", ".", "getItem", "(", ")", ".", "shiftedIndex", ")", ";", "if", "(", "furnaceItemStacks", "[", "2", "]", "==", "null", ")", "{", "furnaceItemStacks", "[", "2", "]", "=", "itemstack", ".", "copy", "(", ")", ";", "}", "else", "if", "(", "furnaceItemStacks", "[", "2", "]", ".", "itemID", "==", "itemstack", ".", "itemID", ")", "{", "furnaceItemStacks", "[", "2", "]", ".", "stackSize", "++", ";", "}", "furnaceItemStacks", "[", "0", "]", ".", "stackSize", "--", ";", "if", "(", "furnaceItemStacks", "[", "0", "]", ".", "stackSize", "<=", "0", ")", "{", "furnaceItemStacks", "[", "0", "]", "=", "null", ";", "}", "}", "public", "static", "int", "getItemBurnTime", "(", "ItemStack", "par1ItemStack", ")", "{", "if", "(", "par1ItemStack", "==", "null", ")", "{", "return", "0", ";", "}", "int", "i", "=", "par1ItemStack", ".", "getItem", "(", ")", ".", "shiftedIndex", ";", "if", "(", "i", "<", "256", "&&", "Block", ".", "blocksList", "[", "i", "]", ".", "blockMaterial", "==", "Material", ".", "wood", ")", "{", "return", "300", ";", "}", "if", "(", "i", "==", "Item", ".", "stick", ".", "shiftedIndex", ")", "{", "return", "100", ";", "}", "if", "(", "i", "==", "Item", ".", "coal", ".", "shiftedIndex", ")", "{", "return", "1600", ";", "}", "if", "(", "i", "==", "Item", ".", "bucketLava", ".", "shiftedIndex", ")", "{", "return", "20000", ";", "}", "if", "(", "i", "==", "Block", ".", "sapling", ".", "blockID", ")", "{", "return", "100", ";", "}", "return", "i", "!=", "Item", ".", "blazeRod", ".", "shiftedIndex", "?", "0", ":", "2400", ";", "}", "public", "static", "boolean", "func_52006_b", "(", "ItemStack", "par0ItemStack", ")", "{", "return", "getItemBurnTime", "(", "par0ItemStack", ")", ">", "0", ";", "}", "public", "boolean", "isUseableByPlayer", "(", "EntityPlayer", "par1EntityPlayer", ")", "{", "if", "(", "worldObj", ".", "getBlockTileEntity", "(", "xCoord", ",", "yCoord", ",", "zCoord", ")", "!=", "this", ")", "{", "return", "false", ";", "}", "return", "par1EntityPlayer", ".", "getDistanceSq", "(", "(", "double", ")", "xCoord", "+", "0.5D", ",", "(", "double", ")", "yCoord", "+", "0.5D", ",", "(", "double", ")", "zCoord", "+", "0.5D", ")", "<=", "64D", ";", "}", "public", "void", "openChest", "(", ")", "{", "}", "public", "void", "closeChest", "(", ")", "{", "}", "}", "</s>" ]
9,852
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "net", ".", "minecraft", ".", "server", ".", "MinecraftServer", ";", "public", "class", "WorldServerMulti", "extends", "WorldServer", "{", "public", "WorldServerMulti", "(", "MinecraftServer", "par1MinecraftServer", ",", "ISaveHandler", "par2ISaveHandler", ",", "String", "par3Str", ",", "int", "par4", ",", "WorldSettings", "par5WorldSettings", ",", "WorldServer", "par6WorldServer", ")", "{", "super", "(", "par1MinecraftServer", ",", "par2ISaveHandler", ",", "par3Str", ",", "par4", ",", "par5WorldSettings", ")", ";", "mapStorage", "=", "par6WorldServer", ".", "mapStorage", ";", "}", "}", "</s>" ]
9,853
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "public", "class", "RConUtils", "{", "public", "static", "char", "hexDigits", "[", "]", "=", "{", "'0'", ",", "'1'", ",", "'2'", ",", "'3'", ",", "'4'", ",", "'5'", ",", "'6'", ",", "'7'", ",", "'8'", ",", "'9'", ",", "'a'", ",", "'b'", ",", "'c'", ",", "'d'", ",", "'e'", ",", "'f'", "}", ";", "public", "RConUtils", "(", ")", "{", "}", "public", "static", "String", "getBytesAsString", "(", "byte", "par0ArrayOfByte", "[", "]", ",", "int", "par1", ",", "int", "par2", ")", "{", "int", "i", "=", "par2", "-", "1", ";", "int", "j", ";", "for", "(", "j", "=", "par1", "<=", "i", "?", "par1", ":", "i", ";", "0", "!=", "par0ArrayOfByte", "[", "j", "]", "&&", "j", "<", "i", ";", "j", "++", ")", "{", "}", "return", "new", "String", "(", "par0ArrayOfByte", ",", "par1", ",", "j", "-", "par1", ")", ";", "}", "public", "static", "int", "getRemainingBytesAsLEInt", "(", "byte", "par0ArrayOfByte", "[", "]", ",", "int", "par1", ")", "{", "return", "getBytesAsLEInt", "(", "par0ArrayOfByte", ",", "par1", ",", "par0ArrayOfByte", ".", "length", ")", ";", "}", "public", "static", "int", "getBytesAsLEInt", "(", "byte", "par0ArrayOfByte", "[", "]", ",", "int", "par1", ",", "int", "par2", ")", "{", "if", "(", "0", ">", "par2", "-", "par1", "-", "4", ")", "{", "return", "0", ";", "}", "else", "{", "return", "par0ArrayOfByte", "[", "par1", "+", "3", "]", "<<", "24", "|", "(", "par0ArrayOfByte", "[", "par1", "+", "2", "]", "&", "0xff", ")", "<<", "16", "|", "(", "par0ArrayOfByte", "[", "par1", "+", "1", "]", "&", "0xff", ")", "<<", "8", "|", "par0ArrayOfByte", "[", "par1", "]", "&", "0xff", ";", "}", "}", "public", "static", "int", "getBytesAsBEint", "(", "byte", "par0ArrayOfByte", "[", "]", ",", "int", "par1", ",", "int", "par2", ")", "{", "if", "(", "0", ">", "par2", "-", "par1", "-", "4", ")", "{", "return", "0", ";", "}", "else", "{", "return", "par0ArrayOfByte", "[", "par1", "]", "<<", "24", "|", "(", "par0ArrayOfByte", "[", "par1", "+", "1", "]", "&", "0xff", ")", "<<", "16", "|", "(", "par0ArrayOfByte", "[", "par1", "+", "2", "]", "&", "0xff", ")", "<<", "8", "|", "par0ArrayOfByte", "[", "par1", "+", "3", "]", "&", "0xff", ";", "}", "}", "public", "static", "String", "getByteAsHexString", "(", "byte", "par0", ")", "{", "return", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "\"\"", ")", ".", "append", "(", "hexDigits", "[", "(", "par0", "&", "0xf0", ")", ">>>", "4", "]", ")", ".", "append", "(", "hexDigits", "[", "par0", "&", "0xf", "]", ")", ".", "toString", "(", ")", ";", "}", "}", "</s>" ]
9,854
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "public", "class", "ItemShears", "extends", "Item", "{", "public", "ItemShears", "(", "int", "par1", ")", "{", "super", "(", "par1", ")", ";", "setMaxStackSize", "(", "1", ")", ";", "setMaxDamage", "(", "238", ")", ";", "}", "public", "boolean", "onBlockDestroyed", "(", "ItemStack", "par1ItemStack", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "int", "par5", ",", "EntityLiving", "par6EntityLiving", ")", "{", "if", "(", "par2", "==", "Block", ".", "leaves", ".", "blockID", "||", "par2", "==", "Block", ".", "web", ".", "blockID", "||", "par2", "==", "Block", ".", "tallGrass", ".", "blockID", "||", "par2", "==", "Block", ".", "vine", ".", "blockID", ")", "{", "par1ItemStack", ".", "damageItem", "(", "1", ",", "par6EntityLiving", ")", ";", "return", "true", ";", "}", "else", "{", "return", "super", ".", "onBlockDestroyed", "(", "par1ItemStack", ",", "par2", ",", "par3", ",", "par4", ",", "par5", ",", "par6EntityLiving", ")", ";", "}", "}", "public", "boolean", "canHarvestBlock", "(", "Block", "par1Block", ")", "{", "return", "par1Block", ".", "blockID", "==", "Block", ".", "web", ".", "blockID", ";", "}", "public", "float", "getStrVsBlock", "(", "ItemStack", "par1ItemStack", ",", "Block", "par2Block", ")", "{", "if", "(", "par2Block", ".", "blockID", "==", "Block", ".", "web", ".", "blockID", "||", "par2Block", ".", "blockID", "==", "Block", ".", "leaves", ".", "blockID", ")", "{", "return", "15F", ";", "}", "if", "(", "par2Block", ".", "blockID", "==", "Block", ".", "cloth", ".", "blockID", ")", "{", "return", "5F", ";", "}", "else", "{", "return", "super", ".", "getStrVsBlock", "(", "par1ItemStack", ",", "par2Block", ")", ";", "}", "}", "}", "</s>" ]
9,855
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "io", ".", "*", ";", "import", "java", ".", "net", ".", "*", ";", "import", "java", ".", "util", ".", "*", ";", "public", "class", "NetworkManager", "{", "public", "static", "final", "Object", "threadSyncObject", "=", "new", "Object", "(", ")", ";", "public", "static", "int", "numReadThreads", ";", "public", "static", "int", "numWriteThreads", ";", "private", "Object", "sendQueueLock", ";", "private", "Socket", "networkSocket", ";", "private", "final", "SocketAddress", "remoteSocketAddress", ";", "private", "DataInputStream", "socketInputStream", ";", "private", "DataOutputStream", "socketOutputStream", ";", "private", "boolean", "isRunning", ";", "private", "List", "readPackets", ";", "private", "List", "dataPackets", ";", "private", "List", "chunkDataPackets", ";", "private", "NetHandler", "netHandler", ";", "private", "boolean", "isServerTerminating", ";", "private", "Thread", "writeThread", ";", "private", "Thread", "readThread", ";", "private", "boolean", "isTerminating", ";", "private", "String", "terminationReason", ";", "private", "Object", "field_20176_t", "[", "]", ";", "private", "int", "timeSinceLastRead", ";", "private", "int", "sendQueueByteLength", ";", "public", "static", "int", "field_28141_d", "[", "]", "=", "new", "int", "[", "256", "]", ";", "public", "static", "int", "field_28140_e", "[", "]", "=", "new", "int", "[", "256", "]", ";", "public", "int", "chunkDataSendCounter", ";", "private", "int", "field_20175_w", ";", "public", "NetworkManager", "(", "Socket", "par1Socket", ",", "String", "par2Str", ",", "NetHandler", "par3NetHandler", ")", "throws", "IOException", "{", "sendQueueLock", "=", "new", "Object", "(", ")", ";", "isRunning", "=", "true", ";", "readPackets", "=", "Collections", ".", "synchronizedList", "(", "new", "ArrayList", "(", ")", ")", ";", "dataPackets", "=", "Collections", ".", "synchronizedList", "(", "new", "ArrayList", "(", ")", ")", ";", "chunkDataPackets", "=", "Collections", ".", "synchronizedList", "(", "new", "ArrayList", "(", ")", ")", ";", "isServerTerminating", "=", "false", ";", "isTerminating", "=", "false", ";", "terminationReason", "=", "\"\"", ";", "timeSinceLastRead", "=", "0", ";", "sendQueueByteLength", "=", "0", ";", "chunkDataSendCounter", "=", "0", ";", "field_20175_w", "=", "50", ";", "networkSocket", "=", "par1Socket", ";", "remoteSocketAddress", "=", "par1Socket", ".", "getRemoteSocketAddress", "(", ")", ";", "netHandler", "=", "par3NetHandler", ";", "try", "{", "par1Socket", ".", "setSoTimeout", "(", "30000", ")", ";", "par1Socket", ".", "setTrafficClass", "(", "24", ")", ";", "}", "catch", "(", "SocketException", "socketexception", ")", "{", "System", ".", "err", ".", "println", "(", "socketexception", ".", "getMessage", "(", ")", ")", ";", "}", "socketInputStream", "=", "new", "DataInputStream", "(", "par1Socket", ".", "getInputStream", "(", ")", ")", ";", "socketOutputStream", "=", "new", "DataOutputStream", "(", "new", "BufferedOutputStream", "(", "par1Socket", ".", "getOutputStream", "(", ")", ",", "5120", ")", ")", ";", "readThread", "=", "new", "NetworkReaderThread", "(", "this", ",", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "par2Str", ")", ".", "append", "(", "\"", "read", "thread\"", ")", ".", "toString", "(", ")", ")", ";", "writeThread", "=", "new", "NetworkWriterThread", "(", "this", ",", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "par2Str", ")", ".", "append", "(", "\"\"", ")", ".", "toString", "(", ")", ")", ";", "readThread", ".", "start", "(", ")", ";", "writeThread", ".", "start", "(", ")", ";", "}", "public", "void", "setNetHandler", "(", "NetHandler", "par1NetHandler", ")", "{", "netHandler", "=", "par1NetHandler", ";", "}", "public", "void", "addToSendQueue", "(", "Packet", "par1Packet", ")", "{", "if", "(", "isServerTerminating", ")", "{", "return", ";", "}", "synchronized", "(", "sendQueueLock", ")", "{", "sendQueueByteLength", "+=", "par1Packet", ".", "getPacketSize", "(", ")", "+", "1", ";", "if", "(", "par1Packet", ".", "isChunkDataPacket", ")", "{", "chunkDataPackets", ".", "add", "(", "par1Packet", ")", ";", "}", "else", "{", "dataPackets", ".", "add", "(", "par1Packet", ")", ";", "}", "}", "}", "private", "boolean", "sendPacket", "(", ")", "{", "boolean", "flag", "=", "false", ";", "try", "{", "if", "(", "!", "dataPackets", ".", "isEmpty", "(", ")", "&&", "(", "chunkDataSendCounter", "==", "0", "||", "System", ".", "currentTimeMillis", "(", ")", "-", "(", "(", "Packet", ")", "dataPackets", ".", "get", "(", "0", ")", ")", ".", "creationTimeMillis", ">=", "(", "long", ")", "chunkDataSendCounter", ")", ")", "{", "Packet", "packet", ";", "synchronized", "(", "sendQueueLock", ")", "{", "packet", "=", "(", "Packet", ")", "dataPackets", ".", "remove", "(", "0", ")", ";", "sendQueueByteLength", "-=", "packet", ".", "getPacketSize", "(", ")", "+", "1", ";", "}", "Packet", ".", "writePacket", "(", "packet", ",", "socketOutputStream", ")", ";", "field_28140_e", "[", "packet", ".", "getPacketId", "(", ")", "]", "+=", "packet", ".", "getPacketSize", "(", ")", "+", "1", ";", "flag", "=", "true", ";", "}", "if", "(", "field_20175_w", "--", "<=", "0", "&&", "!", "chunkDataPackets", ".", "isEmpty", "(", ")", "&&", "(", "chunkDataSendCounter", "==", "0", "||", "System", ".", "currentTimeMillis", "(", ")", "-", "(", "(", "Packet", ")", "chunkDataPackets", ".", "get", "(", "0", ")", ")", ".", "creationTimeMillis", ">=", "(", "long", ")", "chunkDataSendCounter", ")", ")", "{", "Packet", "packet1", ";", "synchronized", "(", "sendQueueLock", ")", "{", "packet1", "=", "(", "Packet", ")", "chunkDataPackets", ".", "remove", "(", "0", ")", ";", "sendQueueByteLength", "-=", "packet1", ".", "getPacketSize", "(", ")", "+", "1", ";", "}", "Packet", ".", "writePacket", "(", "packet1", ",", "socketOutputStream", ")", ";", "field_28140_e", "[", "packet1", ".", "getPacketId", "(", ")", "]", "+=", "packet1", ".", "getPacketSize", "(", ")", "+", "1", ";", "field_20175_w", "=", "0", ";", "flag", "=", "true", ";", "}", "}", "catch", "(", "Exception", "exception", ")", "{", "if", "(", "!", "isTerminating", ")", "{", "onNetworkError", "(", "exception", ")", ";", "}", "return", "false", ";", "}", "return", "flag", ";", "}", "public", "void", "wakeThreads", "(", ")", "{", "readThread", ".", "interrupt", "(", ")", ";", "writeThread", ".", "interrupt", "(", ")", ";", "}", "private", "boolean", "readPacket", "(", ")", "{", "boolean", "flag", "=", "false", ";", "try", "{", "Packet", "packet", "=", "Packet", ".", "readPacket", "(", "socketInputStream", ",", "netHandler", ".", "isServerHandler", "(", ")", ")", ";", "if", "(", "packet", "!=", "null", ")", "{", "field_28141_d", "[", "packet", ".", "getPacketId", "(", ")", "]", "+=", "packet", ".", "getPacketSize", "(", ")", "+", "1", ";", "if", "(", "!", "isServerTerminating", ")", "{", "readPackets", ".", "add", "(", "packet", ")", ";", "}", "flag", "=", "true", ";", "}", "else", "{", "networkShutdown", "(", "\"\"", ",", "new", "Object", "[", "0", "]", ")", ";", "}", "}", "catch", "(", "Exception", "exception", ")", "{", "if", "(", "!", "isTerminating", ")", "{", "onNetworkError", "(", "exception", ")", ";", "}", "return", "false", ";", "}", "return", "flag", ";", "}", "private", "void", "onNetworkError", "(", "Exception", "par1Exception", ")", "{", "par1Exception", ".", "printStackTrace", "(", ")", ";", "networkShutdown", "(", "\"\"", ",", "new", "Object", "[", "]", "{", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "\"\"", ")", ".", "append", "(", "par1Exception", ".", "toString", "(", ")", ")", ".", "toString", "(", ")", "}", ")", ";", "}", "public", "void", "networkShutdown", "(", "String", "par1Str", ",", "Object", "par2ArrayOfObj", "[", "]", ")", "{", "if", "(", "!", "isRunning", ")", "{", "return", ";", "}", "isTerminating", "=", "true", ";", "terminationReason", "=", "par1Str", ";", "field_20176_t", "=", "par2ArrayOfObj", ";", "(", "new", "NetworkMasterThread", "(", "this", ")", ")", ".", "start", "(", ")", ";", "isRunning", "=", "false", ";", "try", "{", "socketInputStream", ".", "close", "(", ")", ";", "socketInputStream", "=", "null", ";", "}", "catch", "(", "Throwable", "throwable", ")", "{", "}", "try", "{", "socketOutputStream", ".", "close", "(", ")", ";", "socketOutputStream", "=", "null", ";", "}", "catch", "(", "Throwable", "throwable1", ")", "{", "}", "try", "{", "networkSocket", ".", "close", "(", ")", ";", "networkSocket", "=", "null", ";", "}", "catch", "(", "Throwable", "throwable2", ")", "{", "}", "}", "public", "void", "processReadPackets", "(", ")", "{", "if", "(", "sendQueueByteLength", ">", "0x100000", ")", "{", "networkShutdown", "(", "\"\"", ",", "new", "Object", "[", "0", "]", ")", ";", "}", "if", "(", "readPackets", ".", "isEmpty", "(", ")", ")", "{", "if", "(", "timeSinceLastRead", "++", "==", "1200", ")", "{", "networkShutdown", "(", "\"\"", ",", "new", "Object", "[", "0", "]", ")", ";", "}", "}", "else", "{", "timeSinceLastRead", "=", "0", ";", "}", "Packet", "packet", ";", "for", "(", "int", "i", "=", "1000", ";", "!", "readPackets", ".", "isEmpty", "(", ")", "&&", "i", "--", ">=", "0", ";", "packet", ".", "processPacket", "(", "netHandler", ")", ")", "{", "packet", "=", "(", "Packet", ")", "readPackets", ".", "remove", "(", "0", ")", ";", "}", "wakeThreads", "(", ")", ";", "if", "(", "isTerminating", "&&", "readPackets", ".", "isEmpty", "(", ")", ")", "{", "netHandler", ".", "handleErrorMessage", "(", "terminationReason", ",", "field_20176_t", ")", ";", "}", "}", "public", "SocketAddress", "getRemoteAddress", "(", ")", "{", "return", "remoteSocketAddress", ";", "}", "public", "void", "serverShutdown", "(", ")", "{", "if", "(", "isServerTerminating", ")", "{", "return", ";", "}", "else", "{", "wakeThreads", "(", ")", ";", "isServerTerminating", "=", "true", ";", "readThread", ".", "interrupt", "(", ")", ";", "(", "new", "ThreadMonitorConnection", "(", "this", ")", ")", ".", "start", "(", ")", ";", "return", ";", "}", "}", "public", "int", "getNumChunkDataPackets", "(", ")", "{", "return", "chunkDataPackets", ".", "size", "(", ")", ";", "}", "public", "Socket", "getSocket", "(", ")", "{", "return", "networkSocket", ";", "}", "static", "boolean", "isRunning", "(", "NetworkManager", "par0NetworkManager", ")", "{", "return", "par0NetworkManager", ".", "isRunning", ";", "}", "static", "boolean", "isServerTerminating", "(", "NetworkManager", "par0NetworkManager", ")", "{", "return", "par0NetworkManager", ".", "isServerTerminating", ";", "}", "static", "boolean", "readNetworkPacket", "(", "NetworkManager", "par0NetworkManager", ")", "{", "return", "par0NetworkManager", ".", "readPacket", "(", ")", ";", "}", "static", "boolean", "sendNetworkPacket", "(", "NetworkManager", "par0NetworkManager", ")", "{", "return", "par0NetworkManager", ".", "sendPacket", "(", ")", ";", "}", "static", "DataOutputStream", "getOutputStream", "(", "NetworkManager", "par0NetworkManager", ")", "{", "return", "par0NetworkManager", ".", "socketOutputStream", ";", "}", "static", "boolean", "isTerminating", "(", "NetworkManager", "par0NetworkManager", ")", "{", "return", "par0NetworkManager", ".", "isTerminating", ";", "}", "static", "void", "sendError", "(", "NetworkManager", "par0NetworkManager", ",", "Exception", "par1Exception", ")", "{", "par0NetworkManager", ".", "onNetworkError", "(", "par1Exception", ")", ";", "}", "static", "Thread", "getReadThread", "(", "NetworkManager", "par0NetworkManager", ")", "{", "return", "par0NetworkManager", ".", "readThread", ";", "}", "static", "Thread", "getWriteThread", "(", "NetworkManager", "par0NetworkManager", ")", "{", "return", "par0NetworkManager", ".", "writeThread", ";", "}", "}", "</s>" ]
9,856
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "Random", ";", "public", "class", "ItemDye", "extends", "Item", "{", "public", "static", "final", "String", "dyeColorNames", "[", "]", "=", "{", "\"black\"", ",", "\"red\"", ",", "\"green\"", ",", "\"brown\"", ",", "\"blue\"", ",", "\"purple\"", ",", "\"cyan\"", ",", "\"silver\"", ",", "\"gray\"", ",", "\"pink\"", ",", "\"lime\"", ",", "\"yellow\"", ",", "\"lightBlue\"", ",", "\"magenta\"", ",", "\"orange\"", ",", "\"white\"", "}", ";", "public", "static", "final", "int", "dyeColors", "[", "]", "=", "{", "0x1e1b1b", ",", "0xb3312c", ",", "0x3b511a", ",", "0x51301a", ",", "0x253192", ",", "0x7b2fbe", ",", "0x287697", ",", "0x287697", ",", "0x434343", ",", "0xd88198", ",", "0x41cd34", ",", "0xdecf2a", ",", "0x6689d3", ",", "0xc354cd", ",", "0xeb8844", ",", "0xf0f0f0", "}", ";", "public", "ItemDye", "(", "int", "par1", ")", "{", "super", "(", "par1", ")", ";", "setHasSubtypes", "(", "true", ")", ";", "setMaxDamage", "(", "0", ")", ";", "}", "public", "String", "getItemNameIS", "(", "ItemStack", "par1ItemStack", ")", "{", "int", "i", "=", "MathHelper", ".", "clamp_int", "(", "par1ItemStack", ".", "getItemDamage", "(", ")", ",", "0", ",", "15", ")", ";", "return", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "super", ".", "getItemName", "(", ")", ")", ".", "append", "(", "\".\"", ")", ".", "append", "(", "dyeColorNames", "[", "i", "]", ")", ".", "toString", "(", ")", ";", "}", "public", "boolean", "onItemUse", "(", "ItemStack", "par1ItemStack", ",", "EntityPlayer", "par2EntityPlayer", ",", "World", "par3World", ",", "int", "par4", ",", "int", "par5", ",", "int", "par6", ",", "int", "par7", ")", "{", "if", "(", "!", "par2EntityPlayer", ".", "canPlayerEdit", "(", "par4", ",", "par5", ",", "par6", ")", ")", "{", "return", "false", ";", "}", "if", "(", "par1ItemStack", ".", "getItemDamage", "(", ")", "==", "15", ")", "{", "int", "i", "=", "par3World", ".", "getBlockId", "(", "par4", ",", "par5", ",", "par6", ")", ";", "if", "(", "i", "==", "Block", ".", "sapling", ".", "blockID", ")", "{", "if", "(", "!", "par3World", ".", "isRemote", ")", "{", "(", "(", "BlockSapling", ")", "Block", ".", "sapling", ")", ".", "growTree", "(", "par3World", ",", "par4", ",", "par5", ",", "par6", ",", "par3World", ".", "rand", ")", ";", "par1ItemStack", ".", "stackSize", "--", ";", "}", "return", "true", ";", "}", "if", "(", "i", "==", "Block", ".", "mushroomBrown", ".", "blockID", "||", "i", "==", "Block", ".", "mushroomRed", ".", "blockID", ")", "{", "if", "(", "!", "par3World", ".", "isRemote", "&&", "(", "(", "BlockMushroom", ")", "Block", ".", "blocksList", "[", "i", "]", ")", ".", "fertilizeMushroom", "(", "par3World", ",", "par4", ",", "par5", ",", "par6", ",", "par3World", ".", "rand", ")", ")", "{", "par1ItemStack", ".", "stackSize", "--", ";", "}", "return", "true", ";", "}", "if", "(", "i", "==", "Block", ".", "melonStem", ".", "blockID", "||", "i", "==", "Block", ".", "pumpkinStem", ".", "blockID", ")", "{", "if", "(", "!", "par3World", ".", "isRemote", ")", "{", "(", "(", "BlockStem", ")", "Block", ".", "blocksList", "[", "i", "]", ")", ".", "fertilizeStem", "(", "par3World", ",", "par4", ",", "par5", ",", "par6", ")", ";", "par1ItemStack", ".", "stackSize", "--", ";", "}", "return", "true", ";", "}", "if", "(", "i", "==", "Block", ".", "crops", ".", "blockID", ")", "{", "if", "(", "!", "par3World", ".", "isRemote", ")", "{", "(", "(", "BlockCrops", ")", "Block", ".", "crops", ")", ".", "fertilize", "(", "par3World", ",", "par4", ",", "par5", ",", "par6", ")", ";", "par1ItemStack", ".", "stackSize", "--", ";", "}", "return", "true", ";", "}", "if", "(", "i", "==", "Block", ".", "grass", ".", "blockID", ")", "{", "if", "(", "!", "par3World", ".", "isRemote", ")", "{", "par1ItemStack", ".", "stackSize", "--", ";", "label0", ":", "for", "(", "int", "j", "=", "0", ";", "j", "<", "128", ";", "j", "++", ")", "{", "int", "k", "=", "par4", ";", "int", "l", "=", "par5", "+", "1", ";", "int", "i1", "=", "par6", ";", "for", "(", "int", "j1", "=", "0", ";", "j1", "<", "j", "/", "16", ";", "j1", "++", ")", "{", "k", "+=", "itemRand", ".", "nextInt", "(", "3", ")", "-", "1", ";", "l", "+=", "(", "(", "itemRand", ".", "nextInt", "(", "3", ")", "-", "1", ")", "*", "itemRand", ".", "nextInt", "(", "3", ")", ")", "/", "2", ";", "i1", "+=", "itemRand", ".", "nextInt", "(", "3", ")", "-", "1", ";", "if", "(", "par3World", ".", "getBlockId", "(", "k", ",", "l", "-", "1", ",", "i1", ")", "!=", "Block", ".", "grass", ".", "blockID", "||", "par3World", ".", "isBlockNormalCube", "(", "k", ",", "l", ",", "i1", ")", ")", "{", "continue", "label0", ";", "}", "}", "if", "(", "par3World", ".", "getBlockId", "(", "k", ",", "l", ",", "i1", ")", "!=", "0", ")", "{", "continue", ";", "}", "if", "(", "itemRand", ".", "nextInt", "(", "10", ")", "!=", "0", ")", "{", "par3World", ".", "setBlockAndMetadataWithNotify", "(", "k", ",", "l", ",", "i1", ",", "Block", ".", "tallGrass", ".", "blockID", ",", "1", ")", ";", "continue", ";", "}", "if", "(", "itemRand", ".", "nextInt", "(", "3", ")", "!=", "0", ")", "{", "par3World", ".", "setBlockWithNotify", "(", "k", ",", "l", ",", "i1", ",", "Block", ".", "plantYellow", ".", "blockID", ")", ";", "}", "else", "{", "par3World", ".", "setBlockWithNotify", "(", "k", ",", "l", ",", "i1", ",", "Block", ".", "plantRed", ".", "blockID", ")", ";", "}", "}", "}", "return", "true", ";", "}", "}", "return", "false", ";", "}", "public", "void", "useItemOnEntity", "(", "ItemStack", "par1ItemStack", ",", "EntityLiving", "par2EntityLiving", ")", "{", "if", "(", "par2EntityLiving", "instanceof", "EntitySheep", ")", "{", "EntitySheep", "entitysheep", "=", "(", "EntitySheep", ")", "par2EntityLiving", ";", "int", "i", "=", "BlockCloth", ".", "getBlockFromDye", "(", "par1ItemStack", ".", "getItemDamage", "(", ")", ")", ";", "if", "(", "!", "entitysheep", ".", "getSheared", "(", ")", "&&", "entitysheep", ".", "getFleeceColor", "(", ")", "!=", "i", ")", "{", "entitysheep", ".", "setFleeceColor", "(", "i", ")", ";", "par1ItemStack", ".", "stackSize", "--", ";", "}", "}", "}", "}", "</s>" ]
9,857
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "public", "class", "GenLayerRiverMix", "extends", "GenLayer", "{", "private", "GenLayer", "field_35033_b", ";", "private", "GenLayer", "field_35034_c", ";", "public", "GenLayerRiverMix", "(", "long", "par1", ",", "GenLayer", "par3GenLayer", ",", "GenLayer", "par4GenLayer", ")", "{", "super", "(", "par1", ")", ";", "field_35033_b", "=", "par3GenLayer", ";", "field_35034_c", "=", "par4GenLayer", ";", "}", "public", "void", "initWorldGenSeed", "(", "long", "par1", ")", "{", "field_35033_b", ".", "initWorldGenSeed", "(", "par1", ")", ";", "field_35034_c", ".", "initWorldGenSeed", "(", "par1", ")", ";", "super", ".", "initWorldGenSeed", "(", "par1", ")", ";", "}", "public", "int", "[", "]", "getInts", "(", "int", "par1", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ")", "{", "int", "ai", "[", "]", "=", "field_35033_b", ".", "getInts", "(", "par1", ",", "par2", ",", "par3", ",", "par4", ")", ";", "int", "ai1", "[", "]", "=", "field_35034_c", ".", "getInts", "(", "par1", ",", "par2", ",", "par3", ",", "par4", ")", ";", "int", "ai2", "[", "]", "=", "IntCache", ".", "getIntCache", "(", "par3", "*", "par4", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "par3", "*", "par4", ";", "i", "++", ")", "{", "if", "(", "ai", "[", "i", "]", "==", "BiomeGenBase", ".", "ocean", ".", "biomeID", ")", "{", "ai2", "[", "i", "]", "=", "ai", "[", "i", "]", ";", "continue", ";", "}", "if", "(", "ai1", "[", "i", "]", ">=", "0", ")", "{", "if", "(", "ai", "[", "i", "]", "==", "BiomeGenBase", ".", "icePlains", ".", "biomeID", ")", "{", "ai2", "[", "i", "]", "=", "BiomeGenBase", ".", "frozenRiver", ".", "biomeID", ";", "continue", ";", "}", "if", "(", "ai", "[", "i", "]", "==", "BiomeGenBase", ".", "mushroomIsland", ".", "biomeID", "||", "ai", "[", "i", "]", "==", "BiomeGenBase", ".", "mushroomIslandShore", ".", "biomeID", ")", "{", "ai2", "[", "i", "]", "=", "BiomeGenBase", ".", "mushroomIslandShore", ".", "biomeID", ";", "}", "else", "{", "ai2", "[", "i", "]", "=", "ai1", "[", "i", "]", ";", "}", "}", "else", "{", "ai2", "[", "i", "]", "=", "ai", "[", "i", "]", ";", "}", "}", "return", "ai2", ";", "}", "}", "</s>" ]
9,858
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "public", "enum", "EnumArt", "{", "Kebab", "(", "\"Kebab\"", ",", "16", ",", "16", ",", "0", ",", "0", ")", ",", "Aztec", "(", "\"Aztec\"", ",", "16", ",", "16", ",", "16", ",", "0", ")", ",", "Alban", "(", "\"Alban\"", ",", "16", ",", "16", ",", "32", ",", "0", ")", ",", "Aztec2", "(", "\"Aztec2\"", ",", "16", ",", "16", ",", "48", ",", "0", ")", ",", "Bomb", "(", "\"Bomb\"", ",", "16", ",", "16", ",", "64", ",", "0", ")", ",", "Plant", "(", "\"Plant\"", ",", "16", ",", "16", ",", "80", ",", "0", ")", ",", "Wasteland", "(", "\"Wasteland\"", ",", "16", ",", "16", ",", "96", ",", "0", ")", ",", "Pool", "(", "\"Pool\"", ",", "32", ",", "16", ",", "0", ",", "32", ")", ",", "Courbet", "(", "\"Courbet\"", ",", "32", ",", "16", ",", "32", ",", "32", ")", ",", "Sea", "(", "\"Sea\"", ",", "32", ",", "16", ",", "64", ",", "32", ")", ",", "Sunset", "(", "\"Sunset\"", ",", "32", ",", "16", ",", "96", ",", "32", ")", ",", "Creebet", "(", "\"Creebet\"", ",", "32", ",", "16", ",", "128", ",", "32", ")", ",", "Wanderer", "(", "\"Wanderer\"", ",", "16", ",", "32", ",", "0", ",", "64", ")", ",", "Graham", "(", "\"Graham\"", ",", "16", ",", "32", ",", "16", ",", "64", ")", ",", "Match", "(", "\"Match\"", ",", "32", ",", "32", ",", "0", ",", "128", ")", ",", "Bust", "(", "\"Bust\"", ",", "32", ",", "32", ",", "32", ",", "128", ")", ",", "Stage", "(", "\"Stage\"", ",", "32", ",", "32", ",", "64", ",", "128", ")", ",", "Void", "(", "\"Void\"", ",", "32", ",", "32", ",", "96", ",", "128", ")", ",", "SkullAndRoses", "(", "\"\"", ",", "32", ",", "32", ",", "128", ",", "128", ")", ",", "Fighters", "(", "\"Fighters\"", ",", "64", ",", "32", ",", "0", ",", "96", ")", ",", "Pointer", "(", "\"Pointer\"", ",", "64", ",", "64", ",", "0", ",", "192", ")", ",", "Pigscene", "(", "\"Pigscene\"", ",", "64", ",", "64", ",", "64", ",", "192", ")", ",", "BurningSkull", "(", "\"BurningSkull\"", ",", "64", ",", "64", ",", "128", ",", "192", ")", ",", "Skeleton", "(", "\"Skeleton\"", ",", "64", ",", "48", ",", "192", ",", "64", ")", ",", "DonkeyKong", "(", "\"DonkeyKong\"", ",", "64", ",", "48", ",", "192", ",", "112", ")", ";", "public", "static", "final", "int", "maxArtTitleLength", "=", "\"\"", ".", "length", "(", ")", ";", "public", "final", "String", "title", ";", "public", "final", "int", "sizeX", ";", "public", "final", "int", "sizeY", ";", "public", "final", "int", "offsetX", ";", "public", "final", "int", "offsetY", ";", "private", "EnumArt", "(", "String", "par3Str", ",", "int", "par4", ",", "int", "par5", ",", "int", "par6", ",", "int", "par7", ")", "{", "title", "=", "par3Str", ";", "sizeX", "=", "par4", ";", "sizeY", "=", "par5", ";", "offsetX", "=", "par6", ";", "offsetY", "=", "par7", ";", "}", "}", "</s>" ]
9,859
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "Comparator", ";", "public", "class", "EntityAINearestAttackableTargetSorter", "implements", "Comparator", "{", "private", "Entity", "theEntity", ";", "final", "EntityAINearestAttackableTarget", "parent", ";", "public", "EntityAINearestAttackableTargetSorter", "(", "EntityAINearestAttackableTarget", "par1EntityAINearestAttackableTarget", ",", "Entity", "par2Entity", ")", "{", "parent", "=", "par1EntityAINearestAttackableTarget", ";", "theEntity", "=", "par2Entity", ";", "}", "public", "int", "func_48470_a", "(", "Entity", "par1Entity", ",", "Entity", "par2Entity", ")", "{", "double", "d", "=", "theEntity", ".", "getDistanceSqToEntity", "(", "par1Entity", ")", ";", "double", "d1", "=", "theEntity", ".", "getDistanceSqToEntity", "(", "par2Entity", ")", ";", "if", "(", "d", "<", "d1", ")", "{", "return", "-", "1", ";", "}", "return", "d", "<=", "d1", "?", "0", ":", "1", ";", "}", "public", "int", "compare", "(", "Object", "par1Obj", ",", "Object", "par2Obj", ")", "{", "return", "func_48470_a", "(", "(", "Entity", ")", "par1Obj", ",", "(", "Entity", ")", "par2Obj", ")", ";", "}", "}", "</s>" ]
9,860
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "Random", ";", "public", "class", "BlockWeb", "extends", "Block", "{", "public", "BlockWeb", "(", "int", "par1", ",", "int", "par2", ")", "{", "super", "(", "par1", ",", "par2", ",", "Material", ".", "web", ")", ";", "}", "public", "void", "onEntityCollidedWithBlock", "(", "World", "par1World", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "Entity", "par5Entity", ")", "{", "par5Entity", ".", "setInWeb", "(", ")", ";", "}", "public", "boolean", "isOpaqueCube", "(", ")", "{", "return", "false", ";", "}", "public", "AxisAlignedBB", "getCollisionBoundingBoxFromPool", "(", "World", "par1World", ",", "int", "par2", ",", "int", "par3", ",", "int", "i", ")", "{", "return", "null", ";", "}", "public", "int", "getRenderType", "(", ")", "{", "return", "1", ";", "}", "public", "boolean", "renderAsNormalBlock", "(", ")", "{", "return", "false", ";", "}", "public", "int", "idDropped", "(", "int", "par1", ",", "Random", "par2Random", ",", "int", "par3", ")", "{", "return", "Item", ".", "silk", ".", "shiftedIndex", ";", "}", "}", "</s>" ]
9,861
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "Random", ";", "public", "class", "WorldGenPumpkin", "extends", "WorldGenerator", "{", "public", "WorldGenPumpkin", "(", ")", "{", "}", "public", "boolean", "generate", "(", "World", "par1World", ",", "Random", "par2Random", ",", "int", "par3", ",", "int", "par4", ",", "int", "par5", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "64", ";", "i", "++", ")", "{", "int", "j", "=", "(", "par3", "+", "par2Random", ".", "nextInt", "(", "8", ")", ")", "-", "par2Random", ".", "nextInt", "(", "8", ")", ";", "int", "k", "=", "(", "par4", "+", "par2Random", ".", "nextInt", "(", "4", ")", ")", "-", "par2Random", ".", "nextInt", "(", "4", ")", ";", "int", "l", "=", "(", "par5", "+", "par2Random", ".", "nextInt", "(", "8", ")", ")", "-", "par2Random", ".", "nextInt", "(", "8", ")", ";", "if", "(", "par1World", ".", "isAirBlock", "(", "j", ",", "k", ",", "l", ")", "&&", "par1World", ".", "getBlockId", "(", "j", ",", "k", "-", "1", ",", "l", ")", "==", "Block", ".", "grass", ".", "blockID", "&&", "Block", ".", "pumpkin", ".", "canPlaceBlockAt", "(", "par1World", ",", "j", ",", "k", ",", "l", ")", ")", "{", "par1World", ".", "setBlockAndMetadata", "(", "j", ",", "k", ",", "l", ",", "Block", ".", "pumpkin", ".", "blockID", ",", "par2Random", ".", "nextInt", "(", "4", ")", ")", ";", "}", "}", "return", "true", ";", "}", "}", "</s>" ]
9,862
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "List", ";", "public", "class", "BiomeGenEnd", "extends", "BiomeGenBase", "{", "public", "BiomeGenEnd", "(", "int", "par1", ")", "{", "super", "(", "par1", ")", ";", "spawnableMonsterList", ".", "clear", "(", ")", ";", "spawnableCreatureList", ".", "clear", "(", ")", ";", "spawnableWaterCreatureList", ".", "clear", "(", ")", ";", "spawnableMonsterList", ".", "add", "(", "new", "SpawnListEntry", "(", "net", ".", "minecraft", ".", "src", ".", "EntityEnderman", ".", "class", ",", "10", ",", "4", ",", "4", ")", ")", ";", "topBlock", "=", "(", "byte", ")", "Block", ".", "dirt", ".", "blockID", ";", "fillerBlock", "=", "(", "byte", ")", "Block", ".", "dirt", ".", "blockID", ";", "biomeDecorator", "=", "new", "BiomeEndDecorator", "(", "this", ")", ";", "}", "}", "</s>" ]
9,863
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "Random", ";", "public", "class", "WorldGenLakes", "extends", "WorldGenerator", "{", "private", "int", "blockIndex", ";", "public", "WorldGenLakes", "(", "int", "par1", ")", "{", "blockIndex", "=", "par1", ";", "}", "public", "boolean", "generate", "(", "World", "par1World", ",", "Random", "par2Random", ",", "int", "par3", ",", "int", "par4", ",", "int", "par5", ")", "{", "par3", "-=", "8", ";", "for", "(", "par5", "-=", "8", ";", "par4", ">", "5", "&&", "par1World", ".", "isAirBlock", "(", "par3", ",", "par4", ",", "par5", ")", ";", "par4", "--", ")", "{", "}", "if", "(", "par4", "<=", "4", ")", "{", "return", "false", ";", "}", "par4", "-=", "4", ";", "boolean", "aflag", "[", "]", "=", "new", "boolean", "[", "2048", "]", ";", "int", "i", "=", "par2Random", ".", "nextInt", "(", "4", ")", "+", "4", ";", "for", "(", "int", "j", "=", "0", ";", "j", "<", "i", ";", "j", "++", ")", "{", "double", "d", "=", "par2Random", ".", "nextDouble", "(", ")", "*", "6D", "+", "3D", ";", "double", "d1", "=", "par2Random", ".", "nextDouble", "(", ")", "*", "4D", "+", "2D", ";", "double", "d2", "=", "par2Random", ".", "nextDouble", "(", ")", "*", "6D", "+", "3D", ";", "double", "d3", "=", "par2Random", ".", "nextDouble", "(", ")", "*", "(", "16D", "-", "d", "-", "2D", ")", "+", "1.0D", "+", "d", "/", "2D", ";", "double", "d4", "=", "par2Random", ".", "nextDouble", "(", ")", "*", "(", "8D", "-", "d1", "-", "4D", ")", "+", "2D", "+", "d1", "/", "2D", ";", "double", "d5", "=", "par2Random", ".", "nextDouble", "(", ")", "*", "(", "16D", "-", "d2", "-", "2D", ")", "+", "1.0D", "+", "d2", "/", "2D", ";", "for", "(", "int", "i4", "=", "1", ";", "i4", "<", "15", ";", "i4", "++", ")", "{", "for", "(", "int", "j4", "=", "1", ";", "j4", "<", "15", ";", "j4", "++", ")", "{", "for", "(", "int", "k4", "=", "1", ";", "k4", "<", "7", ";", "k4", "++", ")", "{", "double", "d6", "=", "(", "(", "double", ")", "i4", "-", "d3", ")", "/", "(", "d", "/", "2D", ")", ";", "double", "d7", "=", "(", "(", "double", ")", "k4", "-", "d4", ")", "/", "(", "d1", "/", "2D", ")", ";", "double", "d8", "=", "(", "(", "double", ")", "j4", "-", "d5", ")", "/", "(", "d2", "/", "2D", ")", ";", "double", "d9", "=", "d6", "*", "d6", "+", "d7", "*", "d7", "+", "d8", "*", "d8", ";", "if", "(", "d9", "<", "1.0D", ")", "{", "aflag", "[", "(", "i4", "*", "16", "+", "j4", ")", "*", "8", "+", "k4", "]", "=", "true", ";", "}", "}", "}", "}", "}", "for", "(", "int", "k", "=", "0", ";", "k", "<", "16", ";", "k", "++", ")", "{", "for", "(", "int", "l1", "=", "0", ";", "l1", "<", "16", ";", "l1", "++", ")", "{", "for", "(", "int", "i3", "=", "0", ";", "i3", "<", "8", ";", "i3", "++", ")", "{", "boolean", "flag", "=", "!", "aflag", "[", "(", "k", "*", "16", "+", "l1", ")", "*", "8", "+", "i3", "]", "&&", "(", "k", "<", "15", "&&", "aflag", "[", "(", "(", "k", "+", "1", ")", "*", "16", "+", "l1", ")", "*", "8", "+", "i3", "]", "||", "k", ">", "0", "&&", "aflag", "[", "(", "(", "k", "-", "1", ")", "*", "16", "+", "l1", ")", "*", "8", "+", "i3", "]", "||", "l1", "<", "15", "&&", "aflag", "[", "(", "k", "*", "16", "+", "(", "l1", "+", "1", ")", ")", "*", "8", "+", "i3", "]", "||", "l1", ">", "0", "&&", "aflag", "[", "(", "k", "*", "16", "+", "(", "l1", "-", "1", ")", ")", "*", "8", "+", "i3", "]", "||", "i3", "<", "7", "&&", "aflag", "[", "(", "k", "*", "16", "+", "l1", ")", "*", "8", "+", "(", "i3", "+", "1", ")", "]", "||", "i3", ">", "0", "&&", "aflag", "[", "(", "k", "*", "16", "+", "l1", ")", "*", "8", "+", "(", "i3", "-", "1", ")", "]", ")", ";", "if", "(", "!", "flag", ")", "{", "continue", ";", "}", "Material", "material", "=", "par1World", ".", "getBlockMaterial", "(", "par3", "+", "k", ",", "par4", "+", "i3", ",", "par5", "+", "l1", ")", ";", "if", "(", "i3", ">=", "4", "&&", "material", ".", "isLiquid", "(", ")", ")", "{", "return", "false", ";", "}", "if", "(", "i3", "<", "4", "&&", "!", "material", ".", "isSolid", "(", ")", "&&", "par1World", ".", "getBlockId", "(", "par3", "+", "k", ",", "par4", "+", "i3", ",", "par5", "+", "l1", ")", "!=", "blockIndex", ")", "{", "return", "false", ";", "}", "}", "}", "}", "for", "(", "int", "l", "=", "0", ";", "l", "<", "16", ";", "l", "++", ")", "{", "for", "(", "int", "i2", "=", "0", ";", "i2", "<", "16", ";", "i2", "++", ")", "{", "for", "(", "int", "j3", "=", "0", ";", "j3", "<", "8", ";", "j3", "++", ")", "{", "if", "(", "aflag", "[", "(", "l", "*", "16", "+", "i2", ")", "*", "8", "+", "j3", "]", ")", "{", "par1World", ".", "setBlock", "(", "par3", "+", "l", ",", "par4", "+", "j3", ",", "par5", "+", "i2", ",", "j3", "<", "4", "?", "blockIndex", ":", "0", ")", ";", "}", "}", "}", "}", "for", "(", "int", "i1", "=", "0", ";", "i1", "<", "16", ";", "i1", "++", ")", "{", "for", "(", "int", "j2", "=", "0", ";", "j2", "<", "16", ";", "j2", "++", ")", "{", "for", "(", "int", "k3", "=", "4", ";", "k3", "<", "8", ";", "k3", "++", ")", "{", "if", "(", "!", "aflag", "[", "(", "i1", "*", "16", "+", "j2", ")", "*", "8", "+", "k3", "]", "||", "par1World", ".", "getBlockId", "(", "par3", "+", "i1", ",", "(", "par4", "+", "k3", ")", "-", "1", ",", "par5", "+", "j2", ")", "!=", "Block", ".", "dirt", ".", "blockID", "||", "par1World", ".", "getSavedLightValue", "(", "EnumSkyBlock", ".", "Sky", ",", "par3", "+", "i1", ",", "par4", "+", "k3", ",", "par5", "+", "j2", ")", "<=", "0", ")", "{", "continue", ";", "}", "BiomeGenBase", "biomegenbase", "=", "par1World", ".", "getBiomeGenForCoords", "(", "par3", "+", "i1", ",", "par5", "+", "j2", ")", ";", "if", "(", "biomegenbase", ".", "topBlock", "==", "Block", ".", "mycelium", ".", "blockID", ")", "{", "par1World", ".", "setBlock", "(", "par3", "+", "i1", ",", "(", "par4", "+", "k3", ")", "-", "1", ",", "par5", "+", "j2", ",", "Block", ".", "mycelium", ".", "blockID", ")", ";", "}", "else", "{", "par1World", ".", "setBlock", "(", "par3", "+", "i1", ",", "(", "par4", "+", "k3", ")", "-", "1", ",", "par5", "+", "j2", ",", "Block", ".", "grass", ".", "blockID", ")", ";", "}", "}", "}", "}", "if", "(", "Block", ".", "blocksList", "[", "blockIndex", "]", ".", "blockMaterial", "==", "Material", ".", "lava", ")", "{", "for", "(", "int", "j1", "=", "0", ";", "j1", "<", "16", ";", "j1", "++", ")", "{", "for", "(", "int", "k2", "=", "0", ";", "k2", "<", "16", ";", "k2", "++", ")", "{", "for", "(", "int", "l3", "=", "0", ";", "l3", "<", "8", ";", "l3", "++", ")", "{", "boolean", "flag1", "=", "!", "aflag", "[", "(", "j1", "*", "16", "+", "k2", ")", "*", "8", "+", "l3", "]", "&&", "(", "j1", "<", "15", "&&", "aflag", "[", "(", "(", "j1", "+", "1", ")", "*", "16", "+", "k2", ")", "*", "8", "+", "l3", "]", "||", "j1", ">", "0", "&&", "aflag", "[", "(", "(", "j1", "-", "1", ")", "*", "16", "+", "k2", ")", "*", "8", "+", "l3", "]", "||", "k2", "<", "15", "&&", "aflag", "[", "(", "j1", "*", "16", "+", "(", "k2", "+", "1", ")", ")", "*", "8", "+", "l3", "]", "||", "k2", ">", "0", "&&", "aflag", "[", "(", "j1", "*", "16", "+", "(", "k2", "-", "1", ")", ")", "*", "8", "+", "l3", "]", "||", "l3", "<", "7", "&&", "aflag", "[", "(", "j1", "*", "16", "+", "k2", ")", "*", "8", "+", "(", "l3", "+", "1", ")", "]", "||", "l3", ">", "0", "&&", "aflag", "[", "(", "j1", "*", "16", "+", "k2", ")", "*", "8", "+", "(", "l3", "-", "1", ")", "]", ")", ";", "if", "(", "flag1", "&&", "(", "l3", "<", "4", "||", "par2Random", ".", "nextInt", "(", "2", ")", "!=", "0", ")", "&&", "par1World", ".", "getBlockMaterial", "(", "par3", "+", "j1", ",", "par4", "+", "l3", ",", "par5", "+", "k2", ")", ".", "isSolid", "(", ")", ")", "{", "par1World", ".", "setBlock", "(", "par3", "+", "j1", ",", "par4", "+", "l3", ",", "par5", "+", "k2", ",", "Block", ".", "stone", ".", "blockID", ")", ";", "}", "}", "}", "}", "}", "if", "(", "Block", ".", "blocksList", "[", "blockIndex", "]", ".", "blockMaterial", "==", "Material", ".", "water", ")", "{", "for", "(", "int", "k1", "=", "0", ";", "k1", "<", "16", ";", "k1", "++", ")", "{", "for", "(", "int", "l2", "=", "0", ";", "l2", "<", "16", ";", "l2", "++", ")", "{", "byte", "byte0", "=", "4", ";", "if", "(", "par1World", ".", "isBlockHydratedDirectly", "(", "par3", "+", "k1", ",", "par4", "+", "byte0", ",", "par5", "+", "l2", ")", ")", "{", "par1World", ".", "setBlock", "(", "par3", "+", "k1", ",", "par4", "+", "byte0", ",", "par5", "+", "l2", ",", "Block", ".", "ice", ".", "blockID", ")", ";", "}", "}", "}", "}", "return", "true", ";", "}", "}", "</s>" ]
9,864
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "public", "class", "NibbleArrayReader", "{", "public", "final", "byte", "data", "[", "]", ";", "private", "final", "int", "depthBits", ";", "private", "final", "int", "depthBitsPlusFour", ";", "public", "NibbleArrayReader", "(", "byte", "par1ArrayOfByte", "[", "]", ",", "int", "par2", ")", "{", "data", "=", "par1ArrayOfByte", ";", "depthBits", "=", "par2", ";", "depthBitsPlusFour", "=", "par2", "+", "4", ";", "}", "public", "int", "get", "(", "int", "par1", ",", "int", "par2", ",", "int", "par3", ")", "{", "int", "i", "=", "par1", "<<", "depthBitsPlusFour", "|", "par3", "<<", "depthBits", "|", "par2", ";", "int", "j", "=", "i", ">>", "1", ";", "int", "k", "=", "i", "&", "1", ";", "if", "(", "k", "==", "0", ")", "{", "return", "data", "[", "j", "]", "&", "0xf", ";", "}", "else", "{", "return", "data", "[", "j", "]", ">>", "4", "&", "0xf", ";", "}", "}", "}", "</s>" ]
9,865
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "public", "class", "GenLayerRiverInit", "extends", "GenLayer", "{", "public", "GenLayerRiverInit", "(", "long", "par1", ",", "GenLayer", "par3GenLayer", ")", "{", "super", "(", "par1", ")", ";", "parent", "=", "par3GenLayer", ";", "}", "public", "int", "[", "]", "getInts", "(", "int", "par1", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ")", "{", "int", "ai", "[", "]", "=", "parent", ".", "getInts", "(", "par1", ",", "par2", ",", "par3", ",", "par4", ")", ";", "int", "ai1", "[", "]", "=", "IntCache", ".", "getIntCache", "(", "par3", "*", "par4", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "par4", ";", "i", "++", ")", "{", "for", "(", "int", "j", "=", "0", ";", "j", "<", "par3", ";", "j", "++", ")", "{", "initChunkSeed", "(", "j", "+", "par1", ",", "i", "+", "par2", ")", ";", "ai1", "[", "j", "+", "i", "*", "par3", "]", "=", "ai", "[", "j", "+", "i", "*", "par3", "]", "<=", "0", "?", "0", ":", "nextInt", "(", "2", ")", "+", "2", ";", "}", "}", "return", "ai1", ";", "}", "}", "</s>" ]
9,866
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "List", ";", "import", "java", ".", "util", ".", "Random", ";", "public", "class", "ComponentVillageField2", "extends", "ComponentVillage", "{", "private", "int", "averageGroundLevel", ";", "public", "ComponentVillageField2", "(", "int", "par1", ",", "Random", "par2Random", ",", "StructureBoundingBox", "par3StructureBoundingBox", ",", "int", "par4", ")", "{", "super", "(", "par1", ")", ";", "averageGroundLevel", "=", "-", "1", ";", "coordBaseMode", "=", "par4", ";", "boundingBox", "=", "par3StructureBoundingBox", ";", "}", "public", "void", "buildComponent", "(", "StructureComponent", "structurecomponent", ",", "List", "list", ",", "Random", "random", ")", "{", "}", "public", "static", "ComponentVillageField2", "findValidPlacement", "(", "List", "par0List", ",", "Random", "par1Random", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "int", "par5", ",", "int", "par6", ")", "{", "StructureBoundingBox", "structureboundingbox", "=", "StructureBoundingBox", ".", "getComponentToAddBoundingBox", "(", "par2", ",", "par3", ",", "par4", ",", "0", ",", "0", ",", "0", ",", "7", ",", "4", ",", "9", ",", "par5", ")", ";", "if", "(", "!", "canVillageGoDeeper", "(", "structureboundingbox", ")", "||", "StructureComponent", ".", "findIntersecting", "(", "par0List", ",", "structureboundingbox", ")", "!=", "null", ")", "{", "return", "null", ";", "}", "else", "{", "return", "new", "ComponentVillageField2", "(", "par6", ",", "par1Random", ",", "structureboundingbox", ",", "par5", ")", ";", "}", "}", "public", "boolean", "addComponentParts", "(", "World", "par1World", ",", "Random", "par2Random", ",", "StructureBoundingBox", "par3StructureBoundingBox", ")", "{", "if", "(", "averageGroundLevel", "<", "0", ")", "{", "averageGroundLevel", "=", "getAverageGroundLevel", "(", "par1World", ",", "par3StructureBoundingBox", ")", ";", "if", "(", "averageGroundLevel", "<", "0", ")", "{", "return", "true", ";", "}", "boundingBox", ".", "offset", "(", "0", ",", "(", "(", "averageGroundLevel", "-", "boundingBox", ".", "maxY", ")", "+", "4", ")", "-", "1", ",", "0", ")", ";", "}", "fillWithBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "0", ",", "1", ",", "0", ",", "6", ",", "4", ",", "8", ",", "0", ",", "0", ",", "false", ")", ";", "fillWithBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "1", ",", "0", ",", "1", ",", "2", ",", "0", ",", "7", ",", "Block", ".", "tilledField", ".", "blockID", ",", "Block", ".", "tilledField", ".", "blockID", ",", "false", ")", ";", "fillWithBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "4", ",", "0", ",", "1", ",", "5", ",", "0", ",", "7", ",", "Block", ".", "tilledField", ".", "blockID", ",", "Block", ".", "tilledField", ".", "blockID", ",", "false", ")", ";", "fillWithBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "0", ",", "0", ",", "0", ",", "0", ",", "0", ",", "8", ",", "Block", ".", "wood", ".", "blockID", ",", "Block", ".", "wood", ".", "blockID", ",", "false", ")", ";", "fillWithBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "6", ",", "0", ",", "0", ",", "6", ",", "0", ",", "8", ",", "Block", ".", "wood", ".", "blockID", ",", "Block", ".", "wood", ".", "blockID", ",", "false", ")", ";", "fillWithBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "1", ",", "0", ",", "0", ",", "5", ",", "0", ",", "0", ",", "Block", ".", "wood", ".", "blockID", ",", "Block", ".", "wood", ".", "blockID", ",", "false", ")", ";", "fillWithBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "1", ",", "0", ",", "8", ",", "5", ",", "0", ",", "8", ",", "Block", ".", "wood", ".", "blockID", ",", "Block", ".", "wood", ".", "blockID", ",", "false", ")", ";", "fillWithBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "3", ",", "0", ",", "1", ",", "3", ",", "0", ",", "7", ",", "Block", ".", "waterMoving", ".", "blockID", ",", "Block", ".", "waterMoving", ".", "blockID", ",", "false", ")", ";", "for", "(", "int", "i", "=", "1", ";", "i", "<=", "7", ";", "i", "++", ")", "{", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "crops", ".", "blockID", ",", "MathHelper", ".", "getRandomIntegerInRange", "(", "par2Random", ",", "2", ",", "7", ")", ",", "1", ",", "1", ",", "i", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "crops", ".", "blockID", ",", "MathHelper", ".", "getRandomIntegerInRange", "(", "par2Random", ",", "2", ",", "7", ")", ",", "2", ",", "1", ",", "i", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "crops", ".", "blockID", ",", "MathHelper", ".", "getRandomIntegerInRange", "(", "par2Random", ",", "2", ",", "7", ")", ",", "4", ",", "1", ",", "i", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "crops", ".", "blockID", ",", "MathHelper", ".", "getRandomIntegerInRange", "(", "par2Random", ",", "2", ",", "7", ")", ",", "5", ",", "1", ",", "i", ",", "par3StructureBoundingBox", ")", ";", "}", "for", "(", "int", "j", "=", "0", ";", "j", "<", "9", ";", "j", "++", ")", "{", "for", "(", "int", "k", "=", "0", ";", "k", "<", "7", ";", "k", "++", ")", "{", "clearCurrentPositionBlocksUpwards", "(", "par1World", ",", "k", ",", "4", ",", "j", ",", "par3StructureBoundingBox", ")", ";", "fillCurrentPositionBlocksDownwards", "(", "par1World", ",", "Block", ".", "dirt", ".", "blockID", ",", "0", ",", "k", ",", "-", "1", ",", "j", ",", "par3StructureBoundingBox", ")", ";", "}", "}", "return", "true", ";", "}", "}", "</s>" ]
9,867
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "public", "class", "EnchantmentDurability", "extends", "Enchantment", "{", "protected", "EnchantmentDurability", "(", "int", "par1", ",", "int", "par2", ")", "{", "super", "(", "par1", ",", "par2", ",", "EnumEnchantmentType", ".", "digger", ")", ";", "setName", "(", "\"durability\"", ")", ";", "}", "public", "int", "getMinEnchantability", "(", "int", "par1", ")", "{", "return", "5", "+", "(", "par1", "-", "1", ")", "*", "10", ";", "}", "public", "int", "getMaxEnchantability", "(", "int", "par1", ")", "{", "return", "super", ".", "getMinEnchantability", "(", "par1", ")", "+", "50", ";", "}", "public", "int", "getMaxLevel", "(", ")", "{", "return", "3", ";", "}", "}", "</s>" ]
9,868
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "public", "class", "ChunkCoordIntPair", "{", "public", "final", "int", "chunkXPos", ";", "public", "final", "int", "chunkZPos", ";", "public", "ChunkCoordIntPair", "(", "int", "par1", ",", "int", "par2", ")", "{", "chunkXPos", "=", "par1", ";", "chunkZPos", "=", "par2", ";", "}", "public", "static", "long", "chunkXZ2Int", "(", "int", "par0", ",", "int", "par1", ")", "{", "long", "l", "=", "par0", ";", "long", "l1", "=", "par1", ";", "return", "l", "&", "0xffffffffL", "|", "(", "l1", "&", "0xffffffffL", ")", "<<", "32", ";", "}", "public", "int", "hashCode", "(", ")", "{", "long", "l", "=", "chunkXZ2Int", "(", "chunkXPos", ",", "chunkZPos", ")", ";", "int", "i", "=", "(", "int", ")", "l", ";", "int", "j", "=", "(", "int", ")", "(", "l", ">>", "32", ")", ";", "return", "i", "^", "j", ";", "}", "public", "boolean", "equals", "(", "Object", "par1Obj", ")", "{", "ChunkCoordIntPair", "chunkcoordintpair", "=", "(", "ChunkCoordIntPair", ")", "par1Obj", ";", "return", "chunkcoordintpair", ".", "chunkXPos", "==", "chunkXPos", "&&", "chunkcoordintpair", ".", "chunkZPos", "==", "chunkZPos", ";", "}", "public", "double", "func_48477_a", "(", "Entity", "par1Entity", ")", "{", "double", "d", "=", "chunkXPos", "*", "16", "+", "8", ";", "double", "d1", "=", "chunkZPos", "*", "16", "+", "8", ";", "double", "d2", "=", "d", "-", "par1Entity", ".", "posX", ";", "double", "d3", "=", "d1", "-", "par1Entity", ".", "posZ", ";", "return", "d2", "*", "d2", "+", "d3", "*", "d3", ";", "}", "public", "int", "getCenterXPos", "(", ")", "{", "return", "(", "chunkXPos", "<<", "4", ")", "+", "8", ";", "}", "public", "int", "getCenterZPos", "(", ")", "{", "return", "(", "chunkZPos", "<<", "4", ")", "+", "8", ";", "}", "public", "ChunkPosition", "getChunkPosition", "(", "int", "par1", ")", "{", "return", "new", "ChunkPosition", "(", "getCenterXPos", "(", ")", ",", "par1", ",", "getCenterZPos", "(", ")", ")", ";", "}", "public", "String", "toString", "(", ")", "{", "return", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "\"[\"", ")", ".", "append", "(", "chunkXPos", ")", ".", "append", "(", "\",", "\"", ")", ".", "append", "(", "chunkZPos", ")", ".", "append", "(", "\"]\"", ")", ".", "toString", "(", ")", ";", "}", "}", "</s>" ]
9,869
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "*", ";", "public", "class", "WorldChunkManager", "{", "private", "GenLayer", "genBiomes", ";", "private", "GenLayer", "biomeIndexLayer", ";", "private", "BiomeCache", "biomeCache", ";", "private", "List", "biomesToSpawnIn", ";", "protected", "WorldChunkManager", "(", ")", "{", "biomeCache", "=", "new", "BiomeCache", "(", "this", ")", ";", "biomesToSpawnIn", "=", "new", "ArrayList", "(", ")", ";", "biomesToSpawnIn", ".", "add", "(", "BiomeGenBase", ".", "forest", ")", ";", "biomesToSpawnIn", ".", "add", "(", "BiomeGenBase", ".", "plains", ")", ";", "biomesToSpawnIn", ".", "add", "(", "BiomeGenBase", ".", "taiga", ")", ";", "biomesToSpawnIn", ".", "add", "(", "BiomeGenBase", ".", "taigaHills", ")", ";", "biomesToSpawnIn", ".", "add", "(", "BiomeGenBase", ".", "forestHills", ")", ";", "biomesToSpawnIn", ".", "add", "(", "BiomeGenBase", ".", "jungle", ")", ";", "biomesToSpawnIn", ".", "add", "(", "BiomeGenBase", ".", "jungleHills", ")", ";", "}", "public", "WorldChunkManager", "(", "long", "par1", ",", "WorldType", "par3WorldType", ")", "{", "this", "(", ")", ";", "GenLayer", "agenlayer", "[", "]", "=", "GenLayer", ".", "func_48391_a", "(", "par1", ",", "par3WorldType", ")", ";", "genBiomes", "=", "agenlayer", "[", "0", "]", ";", "biomeIndexLayer", "=", "agenlayer", "[", "1", "]", ";", "}", "public", "WorldChunkManager", "(", "World", "par1World", ")", "{", "this", "(", "par1World", ".", "getSeed", "(", ")", ",", "par1World", ".", "getWorldInfo", "(", ")", ".", "getTerrainType", "(", ")", ")", ";", "}", "public", "List", "getBiomesToSpawnIn", "(", ")", "{", "return", "biomesToSpawnIn", ";", "}", "public", "BiomeGenBase", "getBiomeGenAt", "(", "int", "par1", ",", "int", "par2", ")", "{", "return", "biomeCache", ".", "getBiomeGenAt", "(", "par1", ",", "par2", ")", ";", "}", "public", "float", "[", "]", "getRainfall", "(", "float", "par1ArrayOfFloat", "[", "]", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "int", "par5", ")", "{", "IntCache", ".", "resetIntCache", "(", ")", ";", "if", "(", "par1ArrayOfFloat", "==", "null", "||", "par1ArrayOfFloat", ".", "length", "<", "par4", "*", "par5", ")", "{", "par1ArrayOfFloat", "=", "new", "float", "[", "par4", "*", "par5", "]", ";", "}", "int", "ai", "[", "]", "=", "biomeIndexLayer", ".", "getInts", "(", "par2", ",", "par3", ",", "par4", ",", "par5", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "par4", "*", "par5", ";", "i", "++", ")", "{", "float", "f", "=", "(", "float", ")", "BiomeGenBase", ".", "biomeList", "[", "ai", "[", "i", "]", "]", ".", "getIntRainfall", "(", ")", "/", "65536F", ";", "if", "(", "f", ">", "1.0F", ")", "{", "f", "=", "1.0F", ";", "}", "par1ArrayOfFloat", "[", "i", "]", "=", "f", ";", "}", "return", "par1ArrayOfFloat", ";", "}", "public", "float", "[", "]", "getTemperatures", "(", "float", "par1ArrayOfFloat", "[", "]", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "int", "par5", ")", "{", "IntCache", ".", "resetIntCache", "(", ")", ";", "if", "(", "par1ArrayOfFloat", "==", "null", "||", "par1ArrayOfFloat", ".", "length", "<", "par4", "*", "par5", ")", "{", "par1ArrayOfFloat", "=", "new", "float", "[", "par4", "*", "par5", "]", ";", "}", "int", "ai", "[", "]", "=", "biomeIndexLayer", ".", "getInts", "(", "par2", ",", "par3", ",", "par4", ",", "par5", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "par4", "*", "par5", ";", "i", "++", ")", "{", "float", "f", "=", "(", "float", ")", "BiomeGenBase", ".", "biomeList", "[", "ai", "[", "i", "]", "]", ".", "getIntTemperature", "(", ")", "/", "65536F", ";", "if", "(", "f", ">", "1.0F", ")", "{", "f", "=", "1.0F", ";", "}", "par1ArrayOfFloat", "[", "i", "]", "=", "f", ";", "}", "return", "par1ArrayOfFloat", ";", "}", "public", "BiomeGenBase", "[", "]", "getBiomesForGeneration", "(", "BiomeGenBase", "par1ArrayOfBiomeGenBase", "[", "]", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "int", "par5", ")", "{", "IntCache", ".", "resetIntCache", "(", ")", ";", "if", "(", "par1ArrayOfBiomeGenBase", "==", "null", "||", "par1ArrayOfBiomeGenBase", ".", "length", "<", "par4", "*", "par5", ")", "{", "par1ArrayOfBiomeGenBase", "=", "new", "BiomeGenBase", "[", "par4", "*", "par5", "]", ";", "}", "int", "ai", "[", "]", "=", "genBiomes", ".", "getInts", "(", "par2", ",", "par3", ",", "par4", ",", "par5", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "par4", "*", "par5", ";", "i", "++", ")", "{", "par1ArrayOfBiomeGenBase", "[", "i", "]", "=", "BiomeGenBase", ".", "biomeList", "[", "ai", "[", "i", "]", "]", ";", "}", "return", "par1ArrayOfBiomeGenBase", ";", "}", "public", "BiomeGenBase", "[", "]", "loadBlockGeneratorData", "(", "BiomeGenBase", "par1ArrayOfBiomeGenBase", "[", "]", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "int", "par5", ")", "{", "return", "getBiomeGenAt", "(", "par1ArrayOfBiomeGenBase", ",", "par2", ",", "par3", ",", "par4", ",", "par5", ",", "true", ")", ";", "}", "public", "BiomeGenBase", "[", "]", "getBiomeGenAt", "(", "BiomeGenBase", "par1ArrayOfBiomeGenBase", "[", "]", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "int", "par5", ",", "boolean", "par6", ")", "{", "IntCache", ".", "resetIntCache", "(", ")", ";", "if", "(", "par1ArrayOfBiomeGenBase", "==", "null", "||", "par1ArrayOfBiomeGenBase", ".", "length", "<", "par4", "*", "par5", ")", "{", "par1ArrayOfBiomeGenBase", "=", "new", "BiomeGenBase", "[", "par4", "*", "par5", "]", ";", "}", "if", "(", "par6", "&&", "par4", "==", "16", "&&", "par5", "==", "16", "&&", "(", "par2", "&", "0xf", ")", "==", "0", "&&", "(", "par3", "&", "0xf", ")", "==", "0", ")", "{", "BiomeGenBase", "abiomegenbase", "[", "]", "=", "biomeCache", ".", "getCachedBiomes", "(", "par2", ",", "par3", ")", ";", "System", ".", "arraycopy", "(", "abiomegenbase", ",", "0", ",", "par1ArrayOfBiomeGenBase", ",", "0", ",", "par4", "*", "par5", ")", ";", "return", "par1ArrayOfBiomeGenBase", ";", "}", "int", "ai", "[", "]", "=", "biomeIndexLayer", ".", "getInts", "(", "par2", ",", "par3", ",", "par4", ",", "par5", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "par4", "*", "par5", ";", "i", "++", ")", "{", "par1ArrayOfBiomeGenBase", "[", "i", "]", "=", "BiomeGenBase", ".", "biomeList", "[", "ai", "[", "i", "]", "]", ";", "}", "return", "par1ArrayOfBiomeGenBase", ";", "}", "public", "boolean", "areBiomesViable", "(", "int", "par1", ",", "int", "par2", ",", "int", "par3", ",", "List", "par4List", ")", "{", "int", "i", "=", "par1", "-", "par3", ">>", "2", ";", "int", "j", "=", "par2", "-", "par3", ">>", "2", ";", "int", "k", "=", "par1", "+", "par3", ">>", "2", ";", "int", "l", "=", "par2", "+", "par3", ">>", "2", ";", "int", "i1", "=", "(", "k", "-", "i", ")", "+", "1", ";", "int", "j1", "=", "(", "l", "-", "j", ")", "+", "1", ";", "int", "ai", "[", "]", "=", "genBiomes", ".", "getInts", "(", "i", ",", "j", ",", "i1", ",", "j1", ")", ";", "for", "(", "int", "k1", "=", "0", ";", "k1", "<", "i1", "*", "j1", ";", "k1", "++", ")", "{", "BiomeGenBase", "biomegenbase", "=", "BiomeGenBase", ".", "biomeList", "[", "ai", "[", "k1", "]", "]", ";", "if", "(", "!", "par4List", ".", "contains", "(", "biomegenbase", ")", ")", "{", "return", "false", ";", "}", "}", "return", "true", ";", "}", "public", "ChunkPosition", "findBiomePosition", "(", "int", "par1", ",", "int", "par2", ",", "int", "par3", ",", "List", "par4List", ",", "Random", "par5Random", ")", "{", "int", "i", "=", "par1", "-", "par3", ">>", "2", ";", "int", "j", "=", "par2", "-", "par3", ">>", "2", ";", "int", "k", "=", "par1", "+", "par3", ">>", "2", ";", "int", "l", "=", "par2", "+", "par3", ">>", "2", ";", "int", "i1", "=", "(", "k", "-", "i", ")", "+", "1", ";", "int", "j1", "=", "(", "l", "-", "j", ")", "+", "1", ";", "int", "ai", "[", "]", "=", "genBiomes", ".", "getInts", "(", "i", ",", "j", ",", "i1", ",", "j1", ")", ";", "ChunkPosition", "chunkposition", "=", "null", ";", "int", "k1", "=", "0", ";", "for", "(", "int", "l1", "=", "0", ";", "l1", "<", "ai", ".", "length", ";", "l1", "++", ")", "{", "int", "i2", "=", "i", "+", "l1", "%", "i1", "<<", "2", ";", "int", "j2", "=", "j", "+", "l1", "/", "i1", "<<", "2", ";", "BiomeGenBase", "biomegenbase", "=", "BiomeGenBase", ".", "biomeList", "[", "ai", "[", "l1", "]", "]", ";", "if", "(", "par4List", ".", "contains", "(", "biomegenbase", ")", "&&", "(", "chunkposition", "==", "null", "||", "par5Random", ".", "nextInt", "(", "k1", "+", "1", ")", "==", "0", ")", ")", "{", "chunkposition", "=", "new", "ChunkPosition", "(", "i2", ",", "0", ",", "j2", ")", ";", "k1", "++", ";", "}", "}", "return", "chunkposition", ";", "}", "public", "void", "cleanupCache", "(", ")", "{", "biomeCache", ".", "cleanupCache", "(", ")", ";", "}", "}", "</s>" ]
9,870
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "io", ".", "File", ";", "import", "java", ".", "util", ".", "List", ";", "public", "class", "AnvilSaveHandler", "extends", "SaveHandler", "{", "public", "AnvilSaveHandler", "(", "File", "par1File", ",", "String", "par2Str", ",", "boolean", "par3", ")", "{", "super", "(", "par1File", ",", "par2Str", ",", "par3", ")", ";", "}", "public", "IChunkLoader", "getChunkLoader", "(", "WorldProvider", "par1WorldProvider", ")", "{", "File", "file", "=", "getWorldDirectory", "(", ")", ";", "if", "(", "par1WorldProvider", "instanceof", "WorldProviderHell", ")", "{", "File", "file1", "=", "new", "File", "(", "file", ",", "\"DIM-1\"", ")", ";", "file1", ".", "mkdirs", "(", ")", ";", "return", "new", "AnvilChunkLoader", "(", "file1", ")", ";", "}", "if", "(", "par1WorldProvider", "instanceof", "WorldProviderEnd", ")", "{", "File", "file2", "=", "new", "File", "(", "file", ",", "\"DIM1\"", ")", ";", "file2", ".", "mkdirs", "(", ")", ";", "return", "new", "AnvilChunkLoader", "(", "file2", ")", ";", "}", "else", "{", "return", "new", "AnvilChunkLoader", "(", "file", ")", ";", "}", "}", "public", "void", "saveWorldInfoAndPlayer", "(", "WorldInfo", "par1WorldInfo", ",", "List", "par2List", ")", "{", "par1WorldInfo", ".", "setSaveVersion", "(", "19133", ")", ";", "super", ".", "saveWorldInfoAndPlayer", "(", "par1WorldInfo", ",", "par2List", ")", ";", "}", "public", "void", "func_22093_e", "(", ")", "{", "try", "{", "ThreadedFileIOBase", ".", "threadedIOInstance", ".", "waitForFinish", "(", ")", ";", "}", "catch", "(", "InterruptedException", "interruptedexception", ")", "{", "interruptedexception", ".", "printStackTrace", "(", ")", ";", "}", "RegionFileCache", ".", "clearRegionFileReferences", "(", ")", ";", "}", "}", "</s>" ]
9,871
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "io", ".", "PrintStream", ";", "import", "java", ".", "util", ".", "*", ";", "public", "class", "World", "implements", "IBlockAccess", "{", "public", "boolean", "scheduledUpdatesAreImmediate", ";", "public", "List", "loadedEntityList", ";", "private", "List", "unloadedEntityList", ";", "private", "TreeSet", "scheduledTickTreeSet", ";", "private", "Set", "scheduledTickSet", ";", "public", "List", "loadedTileEntityList", ";", "private", "List", "addedTileEntityList", ";", "private", "List", "entityRemoval", ";", "public", "List", "playerEntities", ";", "public", "List", "weatherEffects", ";", "private", "long", "cloudColour", ";", "public", "int", "skylightSubtracted", ";", "protected", "int", "updateLCG", ";", "protected", "final", "int", "DIST_HASH_MAGIC", "=", "0x3c6ef35f", ";", "protected", "float", "prevRainingStrength", ";", "protected", "float", "rainingStrength", ";", "protected", "float", "prevThunderingStrength", ";", "protected", "float", "thunderingStrength", ";", "protected", "int", "lastLightningBolt", ";", "public", "int", "lightningFlash", ";", "public", "boolean", "editingBlocks", ";", "private", "long", "lockTimestamp", ";", "protected", "int", "autosavePeriod", ";", "public", "int", "difficultySetting", ";", "public", "Random", "rand", ";", "public", "boolean", "isNewWorld", ";", "public", "final", "WorldProvider", "worldProvider", ";", "protected", "List", "worldAccesses", ";", "protected", "IChunkProvider", "chunkProvider", ";", "protected", "final", "ISaveHandler", "saveHandler", ";", "protected", "WorldInfo", "worldInfo", ";", "public", "boolean", "findingSpawnPoint", ";", "private", "boolean", "allPlayersSleeping", ";", "public", "MapStorage", "mapStorage", ";", "public", "final", "VillageCollection", "villageCollectionObj", "=", "new", "VillageCollection", "(", "this", ")", ";", "private", "final", "VillageSiege", "villageSiegeObj", "=", "new", "VillageSiege", "(", "this", ")", ";", "private", "ArrayList", "collidingBoundingBoxes", ";", "private", "boolean", "scanningTileEntities", ";", "protected", "boolean", "spawnHostileMobs", ";", "protected", "boolean", "spawnPeacefulMobs", ";", "protected", "Set", "activeChunkSet", ";", "private", "int", "ambientTickCountdown", ";", "int", "lightUpdateBlockList", "[", "]", ";", "private", "List", "entitiesWithinAABBExcludingEntity", ";", "public", "boolean", "isRemote", ";", "public", "BiomeGenBase", "getBiomeGenForCoords", "(", "int", "par1", ",", "int", "par2", ")", "{", "if", "(", "blockExists", "(", "par1", ",", "0", ",", "par2", ")", ")", "{", "Chunk", "chunk", "=", "getChunkFromBlockCoords", "(", "par1", ",", "par2", ")", ";", "if", "(", "chunk", "!=", "null", ")", "{", "return", "chunk", ".", "func_48560_a", "(", "par1", "&", "0xf", ",", "par2", "&", "0xf", ",", "worldProvider", ".", "worldChunkMgr", ")", ";", "}", "}", "return", "worldProvider", ".", "worldChunkMgr", ".", "getBiomeGenAt", "(", "par1", ",", "par2", ")", ";", "}", "public", "WorldChunkManager", "getWorldChunkManager", "(", ")", "{", "return", "worldProvider", ".", "worldChunkMgr", ";", "}", "public", "World", "(", "ISaveHandler", "par1ISaveHandler", ",", "String", "par2Str", ",", "WorldSettings", "par3WorldSettings", ",", "WorldProvider", "par4WorldProvider", ")", "{", "scheduledUpdatesAreImmediate", "=", "false", ";", "loadedEntityList", "=", "new", "ArrayList", "(", ")", ";", "unloadedEntityList", "=", "new", "ArrayList", "(", ")", ";", "scheduledTickTreeSet", "=", "new", "TreeSet", "(", ")", ";", "scheduledTickSet", "=", "new", "HashSet", "(", ")", ";", "loadedTileEntityList", "=", "new", "ArrayList", "(", ")", ";", "addedTileEntityList", "=", "new", "ArrayList", "(", ")", ";", "entityRemoval", "=", "new", "ArrayList", "(", ")", ";", "playerEntities", "=", "new", "ArrayList", "(", ")", ";", "weatherEffects", "=", "new", "ArrayList", "(", ")", ";", "cloudColour", "=", "0xffffffL", ";", "skylightSubtracted", "=", "0", ";", "updateLCG", "=", "(", "new", "Random", "(", ")", ")", ".", "nextInt", "(", ")", ";", "lastLightningBolt", "=", "0", ";", "lightningFlash", "=", "0", ";", "editingBlocks", "=", "false", ";", "lockTimestamp", "=", "System", ".", "currentTimeMillis", "(", ")", ";", "autosavePeriod", "=", "40", ";", "rand", "=", "new", "Random", "(", ")", ";", "isNewWorld", "=", "false", ";", "worldAccesses", "=", "new", "ArrayList", "(", ")", ";", "collidingBoundingBoxes", "=", "new", "ArrayList", "(", ")", ";", "spawnHostileMobs", "=", "true", ";", "spawnPeacefulMobs", "=", "true", ";", "activeChunkSet", "=", "new", "HashSet", "(", ")", ";", "ambientTickCountdown", "=", "rand", ".", "nextInt", "(", "12000", ")", ";", "lightUpdateBlockList", "=", "new", "int", "[", "32768", "]", ";", "entitiesWithinAABBExcludingEntity", "=", "new", "ArrayList", "(", ")", ";", "isRemote", "=", "false", ";", "saveHandler", "=", "par1ISaveHandler", ";", "mapStorage", "=", "new", "MapStorage", "(", "par1ISaveHandler", ")", ";", "worldInfo", "=", "par1ISaveHandler", ".", "loadWorldInfo", "(", ")", ";", "isNewWorld", "=", "worldInfo", "==", "null", ";", "if", "(", "par4WorldProvider", "!=", "null", ")", "{", "worldProvider", "=", "par4WorldProvider", ";", "}", "else", "if", "(", "worldInfo", "!=", "null", "&&", "worldInfo", ".", "getDimension", "(", ")", "!=", "0", ")", "{", "worldProvider", "=", "WorldProvider", ".", "getProviderForDimension", "(", "worldInfo", ".", "getDimension", "(", ")", ")", ";", "}", "else", "{", "worldProvider", "=", "WorldProvider", ".", "getProviderForDimension", "(", "0", ")", ";", "}", "boolean", "flag", "=", "false", ";", "if", "(", "worldInfo", "==", "null", ")", "{", "worldInfo", "=", "new", "WorldInfo", "(", "par3WorldSettings", ",", "par2Str", ")", ";", "flag", "=", "true", ";", "}", "else", "{", "worldInfo", ".", "setWorldName", "(", "par2Str", ")", ";", "}", "worldProvider", ".", "registerWorld", "(", "this", ")", ";", "chunkProvider", "=", "createChunkProvider", "(", ")", ";", "if", "(", "flag", ")", "{", "generateSpawnPoint", "(", ")", ";", "}", "calculateInitialSkylight", "(", ")", ";", "calculateInitialWeather", "(", ")", ";", "}", "protected", "IChunkProvider", "createChunkProvider", "(", ")", "{", "IChunkLoader", "ichunkloader", "=", "saveHandler", ".", "getChunkLoader", "(", "worldProvider", ")", ";", "return", "new", "ChunkProvider", "(", "this", ",", "ichunkloader", ",", "worldProvider", ".", "getChunkProvider", "(", ")", ")", ";", "}", "protected", "void", "generateSpawnPoint", "(", ")", "{", "if", "(", "!", "worldProvider", ".", "canRespawnHere", "(", ")", ")", "{", "worldInfo", ".", "setSpawnPosition", "(", "0", ",", "worldProvider", ".", "getAverageGroundLevel", "(", ")", ",", "0", ")", ";", "return", ";", "}", "findingSpawnPoint", "=", "true", ";", "WorldChunkManager", "worldchunkmanager", "=", "worldProvider", ".", "worldChunkMgr", ";", "List", "list", "=", "worldchunkmanager", ".", "getBiomesToSpawnIn", "(", ")", ";", "Random", "random", "=", "new", "Random", "(", "getSeed", "(", ")", ")", ";", "ChunkPosition", "chunkposition", "=", "worldchunkmanager", ".", "findBiomePosition", "(", "0", ",", "0", ",", "256", ",", "list", ",", "random", ")", ";", "int", "i", "=", "0", ";", "int", "j", "=", "worldProvider", ".", "getAverageGroundLevel", "(", ")", ";", "int", "k", "=", "0", ";", "if", "(", "chunkposition", "!=", "null", ")", "{", "i", "=", "chunkposition", ".", "x", ";", "k", "=", "chunkposition", ".", "z", ";", "}", "else", "{", "System", ".", "out", ".", "println", "(", "\"\"", ")", ";", "}", "int", "l", "=", "0", ";", "do", "{", "if", "(", "worldProvider", ".", "canCoordinateBeSpawn", "(", "i", ",", "k", ")", ")", "{", "break", ";", "}", "i", "+=", "random", ".", "nextInt", "(", "64", ")", "-", "random", ".", "nextInt", "(", "64", ")", ";", "k", "+=", "random", ".", "nextInt", "(", "64", ")", "-", "random", ".", "nextInt", "(", "64", ")", ";", "}", "while", "(", "++", "l", "!=", "1000", ")", ";", "worldInfo", ".", "setSpawnPosition", "(", "i", ",", "j", ",", "k", ")", ";", "findingSpawnPoint", "=", "false", ";", "}", "public", "ChunkCoordinates", "getEntrancePortalLocation", "(", ")", "{", "return", "worldProvider", ".", "getEntrancePortalLocation", "(", ")", ";", "}", "public", "int", "getFirstUncoveredBlock", "(", "int", "par1", ",", "int", "par2", ")", "{", "int", "i", ";", "for", "(", "i", "=", "63", ";", "!", "isAirBlock", "(", "par1", ",", "i", "+", "1", ",", "par2", ")", ";", "i", "++", ")", "{", "}", "return", "getBlockId", "(", "par1", ",", "i", ",", "par2", ")", ";", "}", "public", "void", "saveWorld", "(", "boolean", "par1", ",", "IProgressUpdate", "par2IProgressUpdate", ")", "{", "if", "(", "!", "chunkProvider", ".", "canSave", "(", ")", ")", "{", "return", ";", "}", "if", "(", "par2IProgressUpdate", "!=", "null", ")", "{", "par2IProgressUpdate", ".", "displaySavingString", "(", "\"Saving", "level\"", ")", ";", "}", "saveLevel", "(", ")", ";", "if", "(", "par2IProgressUpdate", "!=", "null", ")", "{", "par2IProgressUpdate", ".", "displayLoadingString", "(", "\"\"", ")", ";", "}", "chunkProvider", ".", "saveChunks", "(", "par1", ",", "par2IProgressUpdate", ")", ";", "}", "private", "void", "saveLevel", "(", ")", "{", "checkSessionLock", "(", ")", ";", "saveHandler", ".", "saveWorldInfoAndPlayer", "(", "worldInfo", ",", "playerEntities", ")", ";", "mapStorage", ".", "saveAllData", "(", ")", ";", "}", "public", "int", "getBlockId", "(", "int", "par1", ",", "int", "par2", ",", "int", "par3", ")", "{", "if", "(", "par1", "<", "0xfe363c80", "||", "par3", "<", "0xfe363c80", "||", "par1", ">=", "0x1c9c380", "||", "par3", ">=", "0x1c9c380", ")", "{", "return", "0", ";", "}", "if", "(", "par2", "<", "0", ")", "{", "return", "0", ";", "}", "if", "(", "par2", ">=", "256", ")", "{", "return", "0", ";", "}", "else", "{", "return", "getChunkFromChunkCoords", "(", "par1", ">>", "4", ",", "par3", ">>", "4", ")", ".", "getBlockID", "(", "par1", "&", "0xf", ",", "par2", ",", "par3", "&", "0xf", ")", ";", "}", "}", "public", "int", "func_48092_f", "(", "int", "par1", ",", "int", "par2", ",", "int", "par3", ")", "{", "if", "(", "par1", "<", "0xfe363c80", "||", "par3", "<", "0xfe363c80", "||", "par1", ">=", "0x1c9c380", "||", "par3", ">=", "0x1c9c380", ")", "{", "return", "0", ";", "}", "if", "(", "par2", "<", "0", ")", "{", "return", "0", ";", "}", "if", "(", "par2", ">=", "256", ")", "{", "return", "0", ";", "}", "else", "{", "return", "getChunkFromChunkCoords", "(", "par1", ">>", "4", ",", "par3", ">>", "4", ")", ".", "getBlockLightOpacity", "(", "par1", "&", "0xf", ",", "par2", ",", "par3", "&", "0xf", ")", ";", "}", "}", "public", "boolean", "isAirBlock", "(", "int", "par1", ",", "int", "par2", ",", "int", "par3", ")", "{", "return", "getBlockId", "(", "par1", ",", "par2", ",", "par3", ")", "==", "0", ";", "}", "public", "boolean", "func_48084_h", "(", "int", "par1", ",", "int", "par2", ",", "int", "par3", ")", "{", "int", "i", "=", "getBlockId", "(", "par1", ",", "par2", ",", "par3", ")", ";", "return", "Block", ".", "blocksList", "[", "i", "]", "!=", "null", "&&", "Block", ".", "blocksList", "[", "i", "]", ".", "hasTileEntity", "(", ")", ";", "}", "public", "boolean", "blockExists", "(", "int", "par1", ",", "int", "par2", ",", "int", "par3", ")", "{", "if", "(", "par2", "<", "0", "||", "par2", ">=", "256", ")", "{", "return", "false", ";", "}", "else", "{", "return", "chunkExists", "(", "par1", ">>", "4", ",", "par3", ">>", "4", ")", ";", "}", "}", "public", "boolean", "doChunksNearChunkExist", "(", "int", "par1", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ")", "{", "return", "checkChunksExist", "(", "par1", "-", "par4", ",", "par2", "-", "par4", ",", "par3", "-", "par4", ",", "par1", "+", "par4", ",", "par2", "+", "par4", ",", "par3", "+", "par4", ")", ";", "}", "public", "boolean", "checkChunksExist", "(", "int", "par1", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "int", "par5", ",", "int", "par6", ")", "{", "if", "(", "par5", "<", "0", "||", "par2", ">=", "256", ")", "{", "return", "false", ";", "}", "par1", ">>=", "4", ";", "par3", ">>=", "4", ";", "par4", ">>=", "4", ";", "par6", ">>=", "4", ";", "for", "(", "int", "i", "=", "par1", ";", "i", "<=", "par4", ";", "i", "++", ")", "{", "for", "(", "int", "j", "=", "par3", ";", "j", "<=", "par6", ";", "j", "++", ")", "{", "if", "(", "!", "chunkExists", "(", "i", ",", "j", ")", ")", "{", "return", "false", ";", "}", "}", "}", "return", "true", ";", "}", "private", "boolean", "chunkExists", "(", "int", "par1", ",", "int", "par2", ")", "{", "return", "chunkProvider", ".", "chunkExists", "(", "par1", ",", "par2", ")", ";", "}", "public", "Chunk", "getChunkFromBlockCoords", "(", "int", "par1", ",", "int", "par2", ")", "{", "return", "getChunkFromChunkCoords", "(", "par1", ">>", "4", ",", "par2", ">>", "4", ")", ";", "}", "public", "Chunk", "getChunkFromChunkCoords", "(", "int", "par1", ",", "int", "par2", ")", "{", "return", "chunkProvider", ".", "provideChunk", "(", "par1", ",", "par2", ")", ";", "}", "public", "boolean", "setBlockAndMetadata", "(", "int", "par1", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "int", "par5", ")", "{", "if", "(", "par1", "<", "0xfe363c80", "||", "par3", "<", "0xfe363c80", "||", "par1", ">=", "0x1c9c380", "||", "par3", ">=", "0x1c9c380", ")", "{", "return", "false", ";", "}", "if", "(", "par2", "<", "0", ")", "{", "return", "false", ";", "}", "if", "(", "par2", ">=", "256", ")", "{", "return", "false", ";", "}", "else", "{", "Chunk", "chunk", "=", "getChunkFromChunkCoords", "(", "par1", ">>", "4", ",", "par3", ">>", "4", ")", ";", "boolean", "flag", "=", "chunk", ".", "setBlockIDWithMetadata", "(", "par1", "&", "0xf", ",", "par2", ",", "par3", "&", "0xf", ",", "par4", ",", "par5", ")", ";", "Profiler", ".", "startSection", "(", "\"checkLight\"", ")", ";", "updateAllLightTypes", "(", "par1", ",", "par2", ",", "par3", ")", ";", "Profiler", ".", "endSection", "(", ")", ";", "return", "flag", ";", "}", "}", "public", "boolean", "setBlock", "(", "int", "par1", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ")", "{", "if", "(", "par1", "<", "0xfe363c80", "||", "par3", "<", "0xfe363c80", "||", "par1", ">=", "0x1c9c380", "||", "par3", ">=", "0x1c9c380", ")", "{", "return", "false", ";", "}", "if", "(", "par2", "<", "0", ")", "{", "return", "false", ";", "}", "if", "(", "par2", ">=", "256", ")", "{", "return", "false", ";", "}", "else", "{", "Chunk", "chunk", "=", "getChunkFromChunkCoords", "(", "par1", ">>", "4", ",", "par3", ">>", "4", ")", ";", "boolean", "flag", "=", "chunk", ".", "setBlockID", "(", "par1", "&", "0xf", ",", "par2", ",", "par3", "&", "0xf", ",", "par4", ")", ";", "Profiler", ".", "startSection", "(", "\"checkLight\"", ")", ";", "updateAllLightTypes", "(", "par1", ",", "par2", ",", "par3", ")", ";", "Profiler", ".", "endSection", "(", ")", ";", "return", "flag", ";", "}", "}", "public", "Material", "getBlockMaterial", "(", "int", "par1", ",", "int", "par2", ",", "int", "par3", ")", "{", "int", "i", "=", "getBlockId", "(", "par1", ",", "par2", ",", "par3", ")", ";", "if", "(", "i", "==", "0", ")", "{", "return", "Material", ".", "air", ";", "}", "else", "{", "return", "Block", ".", "blocksList", "[", "i", "]", ".", "blockMaterial", ";", "}", "}", "public", "int", "getBlockMetadata", "(", "int", "par1", ",", "int", "par2", ",", "int", "par3", ")", "{", "if", "(", "par1", "<", "0xfe363c80", "||", "par3", "<", "0xfe363c80", "||", "par1", ">=", "0x1c9c380", "||", "par3", ">=", "0x1c9c380", ")", "{", "return", "0", ";", "}", "if", "(", "par2", "<", "0", ")", "{", "return", "0", ";", "}", "if", "(", "par2", ">=", "256", ")", "{", "return", "0", ";", "}", "else", "{", "Chunk", "chunk", "=", "getChunkFromChunkCoords", "(", "par1", ">>", "4", ",", "par3", ">>", "4", ")", ";", "par1", "&=", "0xf", ";", "par3", "&=", "0xf", ";", "return", "chunk", ".", "getBlockMetadata", "(", "par1", ",", "par2", ",", "par3", ")", ";", "}", "}", "public", "void", "setBlockMetadataWithNotify", "(", "int", "par1", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ")", "{", "if", "(", "setBlockMetadata", "(", "par1", ",", "par2", ",", "par3", ",", "par4", ")", ")", "{", "int", "i", "=", "getBlockId", "(", "par1", ",", "par2", ",", "par3", ")", ";", "if", "(", "Block", ".", "requiresSelfNotify", "[", "i", "&", "0xfff", "]", ")", "{", "notifyBlockChange", "(", "par1", ",", "par2", ",", "par3", ",", "i", ")", ";", "}", "else", "{", "notifyBlocksOfNeighborChange", "(", "par1", ",", "par2", ",", "par3", ",", "i", ")", ";", "}", "}", "}", "public", "boolean", "setBlockMetadata", "(", "int", "par1", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ")", "{", "if", "(", "par1", "<", "0xfe363c80", "||", "par3", "<", "0xfe363c80", "||", "par1", ">=", "0x1c9c380", "||", "par3", ">=", "0x1c9c380", ")", "{", "return", "false", ";", "}", "if", "(", "par2", "<", "0", ")", "{", "return", "false", ";", "}", "if", "(", "par2", ">=", "256", ")", "{", "return", "false", ";", "}", "else", "{", "Chunk", "chunk", "=", "getChunkFromChunkCoords", "(", "par1", ">>", "4", ",", "par3", ">>", "4", ")", ";", "par1", "&=", "0xf", ";", "par3", "&=", "0xf", ";", "return", "chunk", ".", "setBlockMetadata", "(", "par1", ",", "par2", ",", "par3", ",", "par4", ")", ";", "}", "}", "public", "boolean", "setBlockWithNotify", "(", "int", "par1", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ")", "{", "if", "(", "setBlock", "(", "par1", ",", "par2", ",", "par3", ",", "par4", ")", ")", "{", "notifyBlockChange", "(", "par1", ",", "par2", ",", "par3", ",", "par4", ")", ";", "return", "true", ";", "}", "else", "{", "return", "false", ";", "}", "}", "public", "boolean", "setBlockAndMetadataWithNotify", "(", "int", "par1", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "int", "par5", ")", "{", "if", "(", "setBlockAndMetadata", "(", "par1", ",", "par2", ",", "par3", ",", "par4", ",", "par5", ")", ")", "{", "notifyBlockChange", "(", "par1", ",", "par2", ",", "par3", ",", "par4", ")", ";", "return", "true", ";", "}", "else", "{", "return", "false", ";", "}", "}", "public", "void", "markBlockNeedsUpdate", "(", "int", "par1", ",", "int", "par2", ",", "int", "par3", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "worldAccesses", ".", "size", "(", ")", ";", "i", "++", ")", "{", "(", "(", "IWorldAccess", ")", "worldAccesses", ".", "get", "(", "i", ")", ")", ".", "markBlockNeedsUpdate", "(", "par1", ",", "par2", ",", "par3", ")", ";", "}", "}", "public", "void", "notifyBlockChange", "(", "int", "par1", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ")", "{", "markBlockNeedsUpdate", "(", "par1", ",", "par2", ",", "par3", ")", ";", "notifyBlocksOfNeighborChange", "(", "par1", ",", "par2", ",", "par3", ",", "par4", ")", ";", "}", "public", "void", "markBlocksDirtyVertical", "(", "int", "par1", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ")", "{", "if", "(", "par3", ">", "par4", ")", "{", "int", "i", "=", "par4", ";", "par4", "=", "par3", ";", "par3", "=", "i", ";", "}", "if", "(", "!", "worldProvider", ".", "hasNoSky", ")", "{", "for", "(", "int", "j", "=", "par3", ";", "j", "<=", "par4", ";", "j", "++", ")", "{", "updateLightByType", "(", "EnumSkyBlock", ".", "Sky", ",", "par1", ",", "j", ",", "par2", ")", ";", "}", "}", "markBlocksDirty", "(", "par1", ",", "par3", ",", "par2", ",", "par1", ",", "par4", ",", "par2", ")", ";", "}", "public", "void", "markBlockAsNeedsUpdate", "(", "int", "par1", ",", "int", "par2", ",", "int", "par3", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "worldAccesses", ".", "size", "(", ")", ";", "i", "++", ")", "{", "(", "(", "IWorldAccess", ")", "worldAccesses", ".", "get", "(", "i", ")", ")", ".", "markBlockRangeNeedsUpdate", "(", "par1", ",", "par2", ",", "par3", ",", "par1", ",", "par2", ",", "par3", ")", ";", "}", "}", "public", "void", "markBlocksDirty", "(", "int", "par1", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "int", "par5", ",", "int", "par6", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "worldAccesses", ".", "size", "(", ")", ";", "i", "++", ")", "{", "(", "(", "IWorldAccess", ")", "worldAccesses", ".", "get", "(", "i", ")", ")", ".", "markBlockRangeNeedsUpdate", "(", "par1", ",", "par2", ",", "par3", ",", "par4", ",", "par5", ",", "par6", ")", ";", "}", "}", "public", "void", "notifyBlocksOfNeighborChange", "(", "int", "par1", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ")", "{", "notifyBlockOfNeighborChange", "(", "par1", "-", "1", ",", "par2", ",", "par3", ",", "par4", ")", ";", "notifyBlockOfNeighborChange", "(", "par1", "+", "1", ",", "par2", ",", "par3", ",", "par4", ")", ";", "notifyBlockOfNeighborChange", "(", "par1", ",", "par2", "-", "1", ",", "par3", ",", "par4", ")", ";", "notifyBlockOfNeighborChange", "(", "par1", ",", "par2", "+", "1", ",", "par3", ",", "par4", ")", ";", "notifyBlockOfNeighborChange", "(", "par1", ",", "par2", ",", "par3", "-", "1", ",", "par4", ")", ";", "notifyBlockOfNeighborChange", "(", "par1", ",", "par2", ",", "par3", "+", "1", ",", "par4", ")", ";", "}", "private", "void", "notifyBlockOfNeighborChange", "(", "int", "par1", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ")", "{", "if", "(", "editingBlocks", "||", "isRemote", ")", "{", "return", ";", "}", "Block", "block", "=", "Block", ".", "blocksList", "[", "getBlockId", "(", "par1", ",", "par2", ",", "par3", ")", "]", ";", "if", "(", "block", "!=", "null", ")", "{", "block", ".", "onNeighborBlockChange", "(", "this", ",", "par1", ",", "par2", ",", "par3", ",", "par4", ")", ";", "}", "}", "public", "boolean", "canBlockSeeTheSky", "(", "int", "par1", ",", "int", "par2", ",", "int", "par3", ")", "{", "return", "getChunkFromChunkCoords", "(", "par1", ">>", "4", ",", "par3", ">>", "4", ")", ".", "canBlockSeeTheSky", "(", "par1", "&", "0xf", ",", "par2", ",", "par3", "&", "0xf", ")", ";", "}", "public", "int", "getFullBlockLightValue", "(", "int", "par1", ",", "int", "par2", ",", "int", "par3", ")", "{", "if", "(", "par2", "<", "0", ")", "{", "return", "0", ";", "}", "if", "(", "par2", ">=", "256", ")", "{", "par2", "=", "255", ";", "}", "return", "getChunkFromChunkCoords", "(", "par1", ">>", "4", ",", "par3", ">>", "4", ")", ".", "getBlockLightValue", "(", "par1", "&", "0xf", ",", "par2", ",", "par3", "&", "0xf", ",", "0", ")", ";", "}", "public", "int", "getBlockLightValue", "(", "int", "par1", ",", "int", "par2", ",", "int", "par3", ")", "{", "return", "getBlockLightValue_do", "(", "par1", ",", "par2", ",", "par3", ",", "true", ")", ";", "}", "public", "int", "getBlockLightValue_do", "(", "int", "par1", ",", "int", "par2", ",", "int", "par3", ",", "boolean", "par4", ")", "{", "if", "(", "par1", "<", "0xfe363c80", "||", "par3", "<", "0xfe363c80", "||", "par1", ">=", "0x1c9c380", "||", "par3", ">=", "0x1c9c380", ")", "{", "return", "15", ";", "}", "if", "(", "par4", ")", "{", "int", "i", "=", "getBlockId", "(", "par1", ",", "par2", ",", "par3", ")", ";", "if", "(", "i", "==", "Block", ".", "stairSingle", ".", "blockID", "||", "i", "==", "Block", ".", "tilledField", ".", "blockID", "||", "i", "==", "Block", ".", "stairCompactCobblestone", ".", "blockID", "||", "i", "==", "Block", ".", "stairCompactPlanks", ".", "blockID", ")", "{", "int", "j", "=", "getBlockLightValue_do", "(", "par1", ",", "par2", "+", "1", ",", "par3", ",", "false", ")", ";", "int", "k", "=", "getBlockLightValue_do", "(", "par1", "+", "1", ",", "par2", ",", "par3", ",", "false", ")", ";", "int", "l", "=", "getBlockLightValue_do", "(", "par1", "-", "1", ",", "par2", ",", "par3", ",", "false", ")", ";", "int", "i1", "=", "getBlockLightValue_do", "(", "par1", ",", "par2", ",", "par3", "+", "1", ",", "false", ")", ";", "int", "j1", "=", "getBlockLightValue_do", "(", "par1", ",", "par2", ",", "par3", "-", "1", ",", "false", ")", ";", "if", "(", "k", ">", "j", ")", "{", "j", "=", "k", ";", "}", "if", "(", "l", ">", "j", ")", "{", "j", "=", "l", ";", "}", "if", "(", "i1", ">", "j", ")", "{", "j", "=", "i1", ";", "}", "if", "(", "j1", ">", "j", ")", "{", "j", "=", "j1", ";", "}", "return", "j", ";", "}", "}", "if", "(", "par2", "<", "0", ")", "{", "return", "0", ";", "}", "if", "(", "par2", ">=", "256", ")", "{", "par2", "=", "255", ";", "}", "Chunk", "chunk", "=", "getChunkFromChunkCoords", "(", "par1", ">>", "4", ",", "par3", ">>", "4", ")", ";", "par1", "&=", "0xf", ";", "par3", "&=", "0xf", ";", "return", "chunk", ".", "getBlockLightValue", "(", "par1", ",", "par2", ",", "par3", ",", "skylightSubtracted", ")", ";", "}", "public", "int", "getHeightValue", "(", "int", "par1", ",", "int", "par2", ")", "{", "if", "(", "par1", "<", "0xfe363c80", "||", "par2", "<", "0xfe363c80", "||", "par1", ">=", "0x1c9c380", "||", "par2", ">=", "0x1c9c380", ")", "{", "return", "0", ";", "}", "if", "(", "!", "chunkExists", "(", "par1", ">>", "4", ",", "par2", ">>", "4", ")", ")", "{", "return", "0", ";", "}", "else", "{", "Chunk", "chunk", "=", "getChunkFromChunkCoords", "(", "par1", ">>", "4", ",", "par2", ">>", "4", ")", ";", "return", "chunk", ".", "getHeightValue", "(", "par1", "&", "0xf", ",", "par2", "&", "0xf", ")", ";", "}", "}", "public", "int", "getSavedLightValue", "(", "EnumSkyBlock", "par1EnumSkyBlock", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ")", "{", "if", "(", "par3", "<", "0", ")", "{", "par3", "=", "0", ";", "}", "if", "(", "par3", ">=", "256", ")", "{", "par3", "=", "255", ";", "}", "if", "(", "par2", "<", "0xfe363c80", "||", "par4", "<", "0xfe363c80", "||", "par2", ">=", "0x1c9c380", "||", "par4", ">=", "0x1c9c380", ")", "{", "return", "par1EnumSkyBlock", ".", "defaultLightValue", ";", "}", "int", "i", "=", "par2", ">>", "4", ";", "int", "j", "=", "par4", ">>", "4", ";", "if", "(", "!", "chunkExists", "(", "i", ",", "j", ")", ")", "{", "return", "par1EnumSkyBlock", ".", "defaultLightValue", ";", "}", "else", "{", "Chunk", "chunk", "=", "getChunkFromChunkCoords", "(", "i", ",", "j", ")", ";", "return", "chunk", ".", "getSavedLightValue", "(", "par1EnumSkyBlock", ",", "par2", "&", "0xf", ",", "par3", ",", "par4", "&", "0xf", ")", ";", "}", "}", "public", "void", "setLightValue", "(", "EnumSkyBlock", "par1EnumSkyBlock", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "int", "par5", ")", "{", "if", "(", "par2", "<", "0xfe363c80", "||", "par4", "<", "0xfe363c80", "||", "par2", ">=", "0x1c9c380", "||", "par4", ">=", "0x1c9c380", ")", "{", "return", ";", "}", "if", "(", "par3", "<", "0", ")", "{", "return", ";", "}", "if", "(", "par3", ">=", "256", ")", "{", "return", ";", "}", "if", "(", "!", "chunkExists", "(", "par2", ">>", "4", ",", "par4", ">>", "4", ")", ")", "{", "return", ";", "}", "Chunk", "chunk", "=", "getChunkFromChunkCoords", "(", "par2", ">>", "4", ",", "par4", ">>", "4", ")", ";", "chunk", ".", "setLightValue", "(", "par1EnumSkyBlock", ",", "par2", "&", "0xf", ",", "par3", ",", "par4", "&", "0xf", ",", "par5", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "worldAccesses", ".", "size", "(", ")", ";", "i", "++", ")", "{", "(", "(", "IWorldAccess", ")", "worldAccesses", ".", "get", "(", "i", ")", ")", ".", "markBlockNeedsUpdate2", "(", "par2", ",", "par3", ",", "par4", ")", ";", "}", "}", "public", "void", "func_48086_o", "(", "int", "par1", ",", "int", "par2", ",", "int", "par3", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "worldAccesses", ".", "size", "(", ")", ";", "i", "++", ")", "{", "(", "(", "IWorldAccess", ")", "worldAccesses", ".", "get", "(", "i", ")", ")", ".", "markBlockNeedsUpdate2", "(", "par1", ",", "par2", ",", "par3", ")", ";", "}", "}", "public", "float", "getLightBrightness", "(", "int", "par1", ",", "int", "par2", ",", "int", "par3", ")", "{", "return", "worldProvider", ".", "lightBrightnessTable", "[", "getBlockLightValue", "(", "par1", ",", "par2", ",", "par3", ")", "]", ";", "}", "public", "boolean", "isDaytime", "(", ")", "{", "return", "skylightSubtracted", "<", "4", ";", "}", "public", "MovingObjectPosition", "rayTraceBlocks", "(", "Vec3D", "par1Vec3D", ",", "Vec3D", "par2Vec3D", ")", "{", "return", "rayTraceBlocks_do_do", "(", "par1Vec3D", ",", "par2Vec3D", ",", "false", ",", "false", ")", ";", "}", "public", "MovingObjectPosition", "rayTraceBlocks_do", "(", "Vec3D", "par1Vec3D", ",", "Vec3D", "par2Vec3D", ",", "boolean", "par3", ")", "{", "return", "rayTraceBlocks_do_do", "(", "par1Vec3D", ",", "par2Vec3D", ",", "par3", ",", "false", ")", ";", "}", "public", "MovingObjectPosition", "rayTraceBlocks_do_do", "(", "Vec3D", "par1Vec3D", ",", "Vec3D", "par2Vec3D", ",", "boolean", "par3", ",", "boolean", "par4", ")", "{", "if", "(", "Double", ".", "isNaN", "(", "par1Vec3D", ".", "xCoord", ")", "||", "Double", ".", "isNaN", "(", "par1Vec3D", ".", "yCoord", ")", "||", "Double", ".", "isNaN", "(", "par1Vec3D", ".", "zCoord", ")", ")", "{", "return", "null", ";", "}", "if", "(", "Double", ".", "isNaN", "(", "par2Vec3D", ".", "xCoord", ")", "||", "Double", ".", "isNaN", "(", "par2Vec3D", ".", "yCoord", ")", "||", "Double", ".", "isNaN", "(", "par2Vec3D", ".", "zCoord", ")", ")", "{", "return", "null", ";", "}", "int", "i", "=", "MathHelper", ".", "floor_double", "(", "par2Vec3D", ".", "xCoord", ")", ";", "int", "j", "=", "MathHelper", ".", "floor_double", "(", "par2Vec3D", ".", "yCoord", ")", ";", "int", "k", "=", "MathHelper", ".", "floor_double", "(", "par2Vec3D", ".", "zCoord", ")", ";", "int", "l", "=", "MathHelper", ".", "floor_double", "(", "par1Vec3D", ".", "xCoord", ")", ";", "int", "i1", "=", "MathHelper", ".", "floor_double", "(", "par1Vec3D", ".", "yCoord", ")", ";", "int", "j1", "=", "MathHelper", ".", "floor_double", "(", "par1Vec3D", ".", "zCoord", ")", ";", "int", "k1", "=", "getBlockId", "(", "l", ",", "i1", ",", "j1", ")", ";", "int", "i2", "=", "getBlockMetadata", "(", "l", ",", "i1", ",", "j1", ")", ";", "Block", "block", "=", "Block", ".", "blocksList", "[", "k1", "]", ";", "if", "(", "(", "!", "par4", "||", "block", "==", "null", "||", "block", ".", "getCollisionBoundingBoxFromPool", "(", "this", ",", "l", ",", "i1", ",", "j1", ")", "!=", "null", ")", "&&", "k1", ">", "0", "&&", "block", ".", "canCollideCheck", "(", "i2", ",", "par3", ")", ")", "{", "MovingObjectPosition", "movingobjectposition", "=", "block", ".", "collisionRayTrace", "(", "this", ",", "l", ",", "i1", ",", "j1", ",", "par1Vec3D", ",", "par2Vec3D", ")", ";", "if", "(", "movingobjectposition", "!=", "null", ")", "{", "return", "movingobjectposition", ";", "}", "}", "for", "(", "int", "l1", "=", "200", ";", "l1", "--", ">=", "0", ";", ")", "{", "if", "(", "Double", ".", "isNaN", "(", "par1Vec3D", ".", "xCoord", ")", "||", "Double", ".", "isNaN", "(", "par1Vec3D", ".", "yCoord", ")", "||", "Double", ".", "isNaN", "(", "par1Vec3D", ".", "zCoord", ")", ")", "{", "return", "null", ";", "}", "if", "(", "l", "==", "i", "&&", "i1", "==", "j", "&&", "j1", "==", "k", ")", "{", "return", "null", ";", "}", "boolean", "flag", "=", "true", ";", "boolean", "flag1", "=", "true", ";", "boolean", "flag2", "=", "true", ";", "double", "d", "=", "999D", ";", "double", "d1", "=", "999D", ";", "double", "d2", "=", "999D", ";", "if", "(", "i", ">", "l", ")", "{", "d", "=", "(", "double", ")", "l", "+", "1.0D", ";", "}", "else", "if", "(", "i", "<", "l", ")", "{", "d", "=", "(", "double", ")", "l", "+", "0.0D", ";", "}", "else", "{", "flag", "=", "false", ";", "}", "if", "(", "j", ">", "i1", ")", "{", "d1", "=", "(", "double", ")", "i1", "+", "1.0D", ";", "}", "else", "if", "(", "j", "<", "i1", ")", "{", "d1", "=", "(", "double", ")", "i1", "+", "0.0D", ";", "}", "else", "{", "flag1", "=", "false", ";", "}", "if", "(", "k", ">", "j1", ")", "{", "d2", "=", "(", "double", ")", "j1", "+", "1.0D", ";", "}", "else", "if", "(", "k", "<", "j1", ")", "{", "d2", "=", "(", "double", ")", "j1", "+", "0.0D", ";", "}", "else", "{", "flag2", "=", "false", ";", "}", "double", "d3", "=", "999D", ";", "double", "d4", "=", "999D", ";", "double", "d5", "=", "999D", ";", "double", "d6", "=", "par2Vec3D", ".", "xCoord", "-", "par1Vec3D", ".", "xCoord", ";", "double", "d7", "=", "par2Vec3D", ".", "yCoord", "-", "par1Vec3D", ".", "yCoord", ";", "double", "d8", "=", "par2Vec3D", ".", "zCoord", "-", "par1Vec3D", ".", "zCoord", ";", "if", "(", "flag", ")", "{", "d3", "=", "(", "d", "-", "par1Vec3D", ".", "xCoord", ")", "/", "d6", ";", "}", "if", "(", "flag1", ")", "{", "d4", "=", "(", "d1", "-", "par1Vec3D", ".", "yCoord", ")", "/", "d7", ";", "}", "if", "(", "flag2", ")", "{", "d5", "=", "(", "d2", "-", "par1Vec3D", ".", "zCoord", ")", "/", "d8", ";", "}", "byte", "byte0", "=", "0", ";", "if", "(", "d3", "<", "d4", "&&", "d3", "<", "d5", ")", "{", "if", "(", "i", ">", "l", ")", "{", "byte0", "=", "4", ";", "}", "else", "{", "byte0", "=", "5", ";", "}", "par1Vec3D", ".", "xCoord", "=", "d", ";", "par1Vec3D", ".", "yCoord", "+=", "d7", "*", "d3", ";", "par1Vec3D", ".", "zCoord", "+=", "d8", "*", "d3", ";", "}", "else", "if", "(", "d4", "<", "d5", ")", "{", "if", "(", "j", ">", "i1", ")", "{", "byte0", "=", "0", ";", "}", "else", "{", "byte0", "=", "1", ";", "}", "par1Vec3D", ".", "xCoord", "+=", "d6", "*", "d4", ";", "par1Vec3D", ".", "yCoord", "=", "d1", ";", "par1Vec3D", ".", "zCoord", "+=", "d8", "*", "d4", ";", "}", "else", "{", "if", "(", "k", ">", "j1", ")", "{", "byte0", "=", "2", ";", "}", "else", "{", "byte0", "=", "3", ";", "}", "par1Vec3D", ".", "xCoord", "+=", "d6", "*", "d5", ";", "par1Vec3D", ".", "yCoord", "+=", "d7", "*", "d5", ";", "par1Vec3D", ".", "zCoord", "=", "d2", ";", "}", "Vec3D", "vec3d", "=", "Vec3D", ".", "createVector", "(", "par1Vec3D", ".", "xCoord", ",", "par1Vec3D", ".", "yCoord", ",", "par1Vec3D", ".", "zCoord", ")", ";", "l", "=", "(", "int", ")", "(", "vec3d", ".", "xCoord", "=", "MathHelper", ".", "floor_double", "(", "par1Vec3D", ".", "xCoord", ")", ")", ";", "if", "(", "byte0", "==", "5", ")", "{", "l", "--", ";", "vec3d", ".", "xCoord", "++", ";", "}", "i1", "=", "(", "int", ")", "(", "vec3d", ".", "yCoord", "=", "MathHelper", ".", "floor_double", "(", "par1Vec3D", ".", "yCoord", ")", ")", ";", "if", "(", "byte0", "==", "1", ")", "{", "i1", "--", ";", "vec3d", ".", "yCoord", "++", ";", "}", "j1", "=", "(", "int", ")", "(", "vec3d", ".", "zCoord", "=", "MathHelper", ".", "floor_double", "(", "par1Vec3D", ".", "zCoord", ")", ")", ";", "if", "(", "byte0", "==", "3", ")", "{", "j1", "--", ";", "vec3d", ".", "zCoord", "++", ";", "}", "int", "j2", "=", "getBlockId", "(", "l", ",", "i1", ",", "j1", ")", ";", "int", "k2", "=", "getBlockMetadata", "(", "l", ",", "i1", ",", "j1", ")", ";", "Block", "block1", "=", "Block", ".", "blocksList", "[", "j2", "]", ";", "if", "(", "(", "!", "par4", "||", "block1", "==", "null", "||", "block1", ".", "getCollisionBoundingBoxFromPool", "(", "this", ",", "l", ",", "i1", ",", "j1", ")", "!=", "null", ")", "&&", "j2", ">", "0", "&&", "block1", ".", "canCollideCheck", "(", "k2", ",", "par3", ")", ")", "{", "MovingObjectPosition", "movingobjectposition1", "=", "block1", ".", "collisionRayTrace", "(", "this", ",", "l", ",", "i1", ",", "j1", ",", "par1Vec3D", ",", "par2Vec3D", ")", ";", "if", "(", "movingobjectposition1", "!=", "null", ")", "{", "return", "movingobjectposition1", ";", "}", "}", "}", "return", "null", ";", "}", "public", "void", "playSoundAtEntity", "(", "Entity", "par1Entity", ",", "String", "par2Str", ",", "float", "par3", ",", "float", "par4", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "worldAccesses", ".", "size", "(", ")", ";", "i", "++", ")", "{", "(", "(", "IWorldAccess", ")", "worldAccesses", ".", "get", "(", "i", ")", ")", ".", "playSound", "(", "par2Str", ",", "par1Entity", ".", "posX", ",", "par1Entity", ".", "posY", "-", "(", "double", ")", "par1Entity", ".", "yOffset", ",", "par1Entity", ".", "posZ", ",", "par3", ",", "par4", ")", ";", "}", "}", "public", "void", "playSoundEffect", "(", "double", "par1", ",", "double", "par3", ",", "double", "par5", ",", "String", "par7Str", ",", "float", "par8", ",", "float", "par9", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "worldAccesses", ".", "size", "(", ")", ";", "i", "++", ")", "{", "(", "(", "IWorldAccess", ")", "worldAccesses", ".", "get", "(", "i", ")", ")", ".", "playSound", "(", "par7Str", ",", "par1", ",", "par3", ",", "par5", ",", "par8", ",", "par9", ")", ";", "}", "}", "public", "void", "playRecord", "(", "String", "par1Str", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "worldAccesses", ".", "size", "(", ")", ";", "i", "++", ")", "{", "(", "(", "IWorldAccess", ")", "worldAccesses", ".", "get", "(", "i", ")", ")", ".", "playRecord", "(", "par1Str", ",", "par2", ",", "par3", ",", "par4", ")", ";", "}", "}", "public", "void", "spawnParticle", "(", "String", "par1Str", ",", "double", "par2", ",", "double", "par4", ",", "double", "par6", ",", "double", "par8", ",", "double", "par10", ",", "double", "par12", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "worldAccesses", ".", "size", "(", ")", ";", "i", "++", ")", "{", "(", "(", "IWorldAccess", ")", "worldAccesses", ".", "get", "(", "i", ")", ")", ".", "spawnParticle", "(", "par1Str", ",", "par2", ",", "par4", ",", "par6", ",", "par8", ",", "par10", ",", "par12", ")", ";", "}", "}", "public", "boolean", "addWeatherEffect", "(", "Entity", "par1Entity", ")", "{", "weatherEffects", ".", "add", "(", "par1Entity", ")", ";", "return", "true", ";", "}", "public", "boolean", "spawnEntityInWorld", "(", "Entity", "par1Entity", ")", "{", "int", "i", "=", "MathHelper", ".", "floor_double", "(", "par1Entity", ".", "posX", "/", "16D", ")", ";", "int", "j", "=", "MathHelper", ".", "floor_double", "(", "par1Entity", ".", "posZ", "/", "16D", ")", ";", "boolean", "flag", "=", "false", ";", "if", "(", "par1Entity", "instanceof", "EntityPlayer", ")", "{", "flag", "=", "true", ";", "}", "if", "(", "flag", "||", "chunkExists", "(", "i", ",", "j", ")", ")", "{", "if", "(", "par1Entity", "instanceof", "EntityPlayer", ")", "{", "EntityPlayer", "entityplayer", "=", "(", "EntityPlayer", ")", "par1Entity", ";", "playerEntities", ".", "add", "(", "entityplayer", ")", ";", "updateAllPlayersSleepingFlag", "(", ")", ";", "}", "getChunkFromChunkCoords", "(", "i", ",", "j", ")", ".", "addEntity", "(", "par1Entity", ")", ";", "loadedEntityList", ".", "add", "(", "par1Entity", ")", ";", "obtainEntitySkin", "(", "par1Entity", ")", ";", "return", "true", ";", "}", "else", "{", "return", "false", ";", "}", "}", "protected", "void", "obtainEntitySkin", "(", "Entity", "par1Entity", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "worldAccesses", ".", "size", "(", ")", ";", "i", "++", ")", "{", "(", "(", "IWorldAccess", ")", "worldAccesses", ".", "get", "(", "i", ")", ")", ".", "obtainEntitySkin", "(", "par1Entity", ")", ";", "}", "}", "protected", "void", "releaseEntitySkin", "(", "Entity", "par1Entity", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "worldAccesses", ".", "size", "(", ")", ";", "i", "++", ")", "{", "(", "(", "IWorldAccess", ")", "worldAccesses", ".", "get", "(", "i", ")", ")", ".", "releaseEntitySkin", "(", "par1Entity", ")", ";", "}", "}", "public", "void", "setEntityDead", "(", "Entity", "par1Entity", ")", "{", "if", "(", "par1Entity", ".", "riddenByEntity", "!=", "null", ")", "{", "par1Entity", ".", "riddenByEntity", ".", "mountEntity", "(", "null", ")", ";", "}", "if", "(", "par1Entity", ".", "ridingEntity", "!=", "null", ")", "{", "par1Entity", ".", "mountEntity", "(", "null", ")", ";", "}", "par1Entity", ".", "setDead", "(", ")", ";", "if", "(", "par1Entity", "instanceof", "EntityPlayer", ")", "{", "playerEntities", ".", "remove", "(", "(", "EntityPlayer", ")", "par1Entity", ")", ";", "updateAllPlayersSleepingFlag", "(", ")", ";", "}", "}", "public", "void", "removePlayer", "(", "Entity", "par1Entity", ")", "{", "par1Entity", ".", "setDead", "(", ")", ";", "if", "(", "par1Entity", "instanceof", "EntityPlayer", ")", "{", "playerEntities", ".", "remove", "(", "(", "EntityPlayer", ")", "par1Entity", ")", ";", "updateAllPlayersSleepingFlag", "(", ")", ";", "}", "int", "i", "=", "par1Entity", ".", "chunkCoordX", ";", "int", "j", "=", "par1Entity", ".", "chunkCoordZ", ";", "if", "(", "par1Entity", ".", "addedToChunk", "&&", "chunkExists", "(", "i", ",", "j", ")", ")", "{", "getChunkFromChunkCoords", "(", "i", ",", "j", ")", ".", "removeEntity", "(", "par1Entity", ")", ";", "}", "loadedEntityList", ".", "remove", "(", "par1Entity", ")", ";", "releaseEntitySkin", "(", "par1Entity", ")", ";", "}", "public", "void", "addWorldAccess", "(", "IWorldAccess", "par1IWorldAccess", ")", "{", "worldAccesses", ".", "add", "(", "par1IWorldAccess", ")", ";", "}", "public", "List", "getCollidingBoundingBoxes", "(", "Entity", "par1Entity", ",", "AxisAlignedBB", "par2AxisAlignedBB", ")", "{", "collidingBoundingBoxes", ".", "clear", "(", ")", ";", "int", "i", "=", "MathHelper", ".", "floor_double", "(", "par2AxisAlignedBB", ".", "minX", ")", ";", "int", "j", "=", "MathHelper", ".", "floor_double", "(", "par2AxisAlignedBB", ".", "maxX", "+", "1.0D", ")", ";", "int", "k", "=", "MathHelper", ".", "floor_double", "(", "par2AxisAlignedBB", ".", "minY", ")", ";", "int", "l", "=", "MathHelper", ".", "floor_double", "(", "par2AxisAlignedBB", ".", "maxY", "+", "1.0D", ")", ";", "int", "i1", "=", "MathHelper", ".", "floor_double", "(", "par2AxisAlignedBB", ".", "minZ", ")", ";", "int", "j1", "=", "MathHelper", ".", "floor_double", "(", "par2AxisAlignedBB", ".", "maxZ", "+", "1.0D", ")", ";", "for", "(", "int", "k1", "=", "i", ";", "k1", "<", "j", ";", "k1", "++", ")", "{", "for", "(", "int", "l1", "=", "i1", ";", "l1", "<", "j1", ";", "l1", "++", ")", "{", "if", "(", "!", "blockExists", "(", "k1", ",", "64", ",", "l1", ")", ")", "{", "continue", ";", "}", "for", "(", "int", "i2", "=", "k", "-", "1", ";", "i2", "<", "l", ";", "i2", "++", ")", "{", "Block", "block", "=", "Block", ".", "blocksList", "[", "getBlockId", "(", "k1", ",", "i2", ",", "l1", ")", "]", ";", "if", "(", "block", "!=", "null", ")", "{", "block", ".", "getCollidingBoundingBoxes", "(", "this", ",", "k1", ",", "i2", ",", "l1", ",", "par2AxisAlignedBB", ",", "collidingBoundingBoxes", ")", ";", "}", "}", "}", "}", "double", "d", "=", "0.25D", ";", "List", "list", "=", "getEntitiesWithinAABBExcludingEntity", "(", "par1Entity", ",", "par2AxisAlignedBB", ".", "expand", "(", "d", ",", "d", ",", "d", ")", ")", ";", "for", "(", "int", "j2", "=", "0", ";", "j2", "<", "list", ".", "size", "(", ")", ";", "j2", "++", ")", "{", "AxisAlignedBB", "axisalignedbb", "=", "(", "(", "Entity", ")", "list", ".", "get", "(", "j2", ")", ")", ".", "getBoundingBox", "(", ")", ";", "if", "(", "axisalignedbb", "!=", "null", "&&", "axisalignedbb", ".", "intersectsWith", "(", "par2AxisAlignedBB", ")", ")", "{", "collidingBoundingBoxes", ".", "add", "(", "axisalignedbb", ")", ";", "}", "axisalignedbb", "=", "par1Entity", ".", "getCollisionBox", "(", "(", "Entity", ")", "list", ".", "get", "(", "j2", ")", ")", ";", "if", "(", "axisalignedbb", "!=", "null", "&&", "axisalignedbb", ".", "intersectsWith", "(", "par2AxisAlignedBB", ")", ")", "{", "collidingBoundingBoxes", ".", "add", "(", "axisalignedbb", ")", ";", "}", "}", "return", "collidingBoundingBoxes", ";", "}", "public", "int", "calculateSkylightSubtracted", "(", "float", "par1", ")", "{", "float", "f", "=", "getCelestialAngle", "(", "par1", ")", ";", "float", "f1", "=", "1.0F", "-", "(", "MathHelper", ".", "cos", "(", "f", "*", "(", "float", ")", "Math", ".", "PI", "*", "2.0F", ")", "*", "2.0F", "+", "0.5F", ")", ";", "if", "(", "f1", "<", "0.0F", ")", "{", "f1", "=", "0.0F", ";", "}", "if", "(", "f1", ">", "1.0F", ")", "{", "f1", "=", "1.0F", ";", "}", "f1", "=", "1.0F", "-", "f1", ";", "f1", "=", "(", "float", ")", "(", "(", "double", ")", "f1", "*", "(", "1.0D", "-", "(", "double", ")", "(", "getRainStrength", "(", "par1", ")", "*", "5F", ")", "/", "16D", ")", ")", ";", "f1", "=", "(", "float", ")", "(", "(", "double", ")", "f1", "*", "(", "1.0D", "-", "(", "double", ")", "(", "getWeightedThunderStrength", "(", "par1", ")", "*", "5F", ")", "/", "16D", ")", ")", ";", "f1", "=", "1.0F", "-", "f1", ";", "return", "(", "int", ")", "(", "f1", "*", "11F", ")", ";", "}", "public", "float", "getCelestialAngle", "(", "float", "par1", ")", "{", "return", "worldProvider", ".", "calculateCelestialAngle", "(", "worldInfo", ".", "getWorldTime", "(", ")", ",", "par1", ")", ";", "}", "public", "int", "getPrecipitationHeight", "(", "int", "par1", ",", "int", "par2", ")", "{", "return", "getChunkFromBlockCoords", "(", "par1", ",", "par2", ")", ".", "getPrecipitationHeight", "(", "par1", "&", "0xf", ",", "par2", "&", "0xf", ")", ";", "}", "public", "int", "getTopSolidOrLiquidBlock", "(", "int", "par1", ",", "int", "par2", ")", "{", "Chunk", "chunk", "=", "getChunkFromBlockCoords", "(", "par1", ",", "par2", ")", ";", "int", "i", "=", "chunk", ".", "getTopFilledSegment", "(", ")", "+", "16", ";", "par1", "&=", "0xf", ";", "par2", "&=", "0xf", ";", "while", "(", "i", ">", "0", ")", "{", "int", "j", "=", "chunk", ".", "getBlockID", "(", "par1", ",", "i", ",", "par2", ")", ";", "if", "(", "j", "==", "0", "||", "!", "Block", ".", "blocksList", "[", "j", "]", ".", "blockMaterial", ".", "blocksMovement", "(", ")", "||", "Block", ".", "blocksList", "[", "j", "]", ".", "blockMaterial", "==", "Material", ".", "leaves", ")", "{", "i", "--", ";", "}", "else", "{", "return", "i", "+", "1", ";", "}", "}", "return", "-", "1", ";", "}", "public", "void", "scheduleBlockUpdate", "(", "int", "par1", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "int", "par5", ")", "{", "NextTickListEntry", "nextticklistentry", "=", "new", "NextTickListEntry", "(", "par1", ",", "par2", ",", "par3", ",", "par4", ")", ";", "byte", "byte0", "=", "8", ";", "if", "(", "scheduledUpdatesAreImmediate", ")", "{", "if", "(", "checkChunksExist", "(", "nextticklistentry", ".", "xCoord", "-", "byte0", ",", "nextticklistentry", ".", "yCoord", "-", "byte0", ",", "nextticklistentry", ".", "zCoord", "-", "byte0", ",", "nextticklistentry", ".", "xCoord", "+", "byte0", ",", "nextticklistentry", ".", "yCoord", "+", "byte0", ",", "nextticklistentry", ".", "zCoord", "+", "byte0", ")", ")", "{", "int", "i", "=", "getBlockId", "(", "nextticklistentry", ".", "xCoord", ",", "nextticklistentry", ".", "yCoord", ",", "nextticklistentry", ".", "zCoord", ")", ";", "if", "(", "i", "==", "nextticklistentry", ".", "blockID", "&&", "i", ">", "0", ")", "{", "Block", ".", "blocksList", "[", "i", "]", ".", "updateTick", "(", "this", ",", "nextticklistentry", ".", "xCoord", ",", "nextticklistentry", ".", "yCoord", ",", "nextticklistentry", ".", "zCoord", ",", "rand", ")", ";", "}", "}", "return", ";", "}", "if", "(", "checkChunksExist", "(", "par1", "-", "byte0", ",", "par2", "-", "byte0", ",", "par3", "-", "byte0", ",", "par1", "+", "byte0", ",", "par2", "+", "byte0", ",", "par3", "+", "byte0", ")", ")", "{", "if", "(", "par4", ">", "0", ")", "{", "nextticklistentry", ".", "setScheduledTime", "(", "(", "long", ")", "par5", "+", "worldInfo", ".", "getWorldTime", "(", ")", ")", ";", "}", "if", "(", "!", "scheduledTickSet", ".", "contains", "(", "nextticklistentry", ")", ")", "{", "scheduledTickSet", ".", "add", "(", "nextticklistentry", ")", ";", "scheduledTickTreeSet", ".", "add", "(", "nextticklistentry", ")", ";", "}", "}", "}", "public", "void", "scheduleBlockUpdateFromLoad", "(", "int", "par1", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "int", "par5", ")", "{", "NextTickListEntry", "nextticklistentry", "=", "new", "NextTickListEntry", "(", "par1", ",", "par2", ",", "par3", ",", "par4", ")", ";", "if", "(", "par4", ">", "0", ")", "{", "nextticklistentry", ".", "setScheduledTime", "(", "(", "long", ")", "par5", "+", "worldInfo", ".", "getWorldTime", "(", ")", ")", ";", "}", "if", "(", "!", "scheduledTickSet", ".", "contains", "(", "nextticklistentry", ")", ")", "{", "scheduledTickSet", ".", "add", "(", "nextticklistentry", ")", ";", "scheduledTickTreeSet", ".", "add", "(", "nextticklistentry", ")", ";", "}", "}", "public", "void", "updateEntities", "(", ")", "{", "Profiler", ".", "startSection", "(", "\"entities\"", ")", ";", "Profiler", ".", "startSection", "(", "\"global\"", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "weatherEffects", ".", "size", "(", ")", ";", "i", "++", ")", "{", "Entity", "entity", "=", "(", "Entity", ")", "weatherEffects", ".", "get", "(", "i", ")", ";", "entity", ".", "onUpdate", "(", ")", ";", "if", "(", "entity", ".", "isDead", ")", "{", "weatherEffects", ".", "remove", "(", "i", "--", ")", ";", "}", "}", "Profiler", ".", "endStartSection", "(", "\"remove\"", ")", ";", "loadedEntityList", ".", "removeAll", "(", "unloadedEntityList", ")", ";", "for", "(", "int", "j", "=", "0", ";", "j", "<", "unloadedEntityList", ".", "size", "(", ")", ";", "j", "++", ")", "{", "Entity", "entity1", "=", "(", "Entity", ")", "unloadedEntityList", ".", "get", "(", "j", ")", ";", "int", "i1", "=", "entity1", ".", "chunkCoordX", ";", "int", "k1", "=", "entity1", ".", "chunkCoordZ", ";", "if", "(", "entity1", ".", "addedToChunk", "&&", "chunkExists", "(", "i1", ",", "k1", ")", ")", "{", "getChunkFromChunkCoords", "(", "i1", ",", "k1", ")", ".", "removeEntity", "(", "entity1", ")", ";", "}", "}", "for", "(", "int", "k", "=", "0", ";", "k", "<", "unloadedEntityList", ".", "size", "(", ")", ";", "k", "++", ")", "{", "releaseEntitySkin", "(", "(", "Entity", ")", "unloadedEntityList", ".", "get", "(", "k", ")", ")", ";", "}", "unloadedEntityList", ".", "clear", "(", ")", ";", "Profiler", ".", "endStartSection", "(", "\"regular\"", ")", ";", "for", "(", "int", "l", "=", "0", ";", "l", "<", "loadedEntityList", ".", "size", "(", ")", ";", "l", "++", ")", "{", "Entity", "entity2", "=", "(", "Entity", ")", "loadedEntityList", ".", "get", "(", "l", ")", ";", "if", "(", "entity2", ".", "ridingEntity", "!=", "null", ")", "{", "if", "(", "!", "entity2", ".", "ridingEntity", ".", "isDead", "&&", "entity2", ".", "ridingEntity", ".", "riddenByEntity", "==", "entity2", ")", "{", "continue", ";", "}", "entity2", ".", "ridingEntity", ".", "riddenByEntity", "=", "null", ";", "entity2", ".", "ridingEntity", "=", "null", ";", "}", "if", "(", "!", "entity2", ".", "isDead", ")", "{", "updateEntity", "(", "entity2", ")", ";", "}", "Profiler", ".", "startSection", "(", "\"remove\"", ")", ";", "if", "(", "entity2", ".", "isDead", ")", "{", "int", "j1", "=", "entity2", ".", "chunkCoordX", ";", "int", "l1", "=", "entity2", ".", "chunkCoordZ", ";", "if", "(", "entity2", ".", "addedToChunk", "&&", "chunkExists", "(", "j1", ",", "l1", ")", ")", "{", "getChunkFromChunkCoords", "(", "j1", ",", "l1", ")", ".", "removeEntity", "(", "entity2", ")", ";", "}", "loadedEntityList", ".", "remove", "(", "l", "--", ")", ";", "releaseEntitySkin", "(", "entity2", ")", ";", "}", "Profiler", ".", "endSection", "(", ")", ";", "}", "Profiler", ".", "endStartSection", "(", "\"tileEntities\"", ")", ";", "scanningTileEntities", "=", "true", ";", "Iterator", "iterator", "=", "loadedTileEntityList", ".", "iterator", "(", ")", ";", "do", "{", "if", "(", "!", "iterator", ".", "hasNext", "(", ")", ")", "{", "break", ";", "}", "TileEntity", "tileentity", "=", "(", "TileEntity", ")", "iterator", ".", "next", "(", ")", ";", "if", "(", "!", "tileentity", ".", "isInvalid", "(", ")", "&&", "tileentity", ".", "worldObj", "!=", "null", "&&", "blockExists", "(", "tileentity", ".", "xCoord", ",", "tileentity", ".", "yCoord", ",", "tileentity", ".", "zCoord", ")", ")", "{", "tileentity", ".", "updateEntity", "(", ")", ";", "}", "if", "(", "tileentity", ".", "isInvalid", "(", ")", ")", "{", "iterator", ".", "remove", "(", ")", ";", "if", "(", "chunkExists", "(", "tileentity", ".", "xCoord", ">>", "4", ",", "tileentity", ".", "zCoord", ">>", "4", ")", ")", "{", "Chunk", "chunk", "=", "getChunkFromChunkCoords", "(", "tileentity", ".", "xCoord", ">>", "4", ",", "tileentity", ".", "zCoord", ">>", "4", ")", ";", "if", "(", "chunk", "!=", "null", ")", "{", "chunk", ".", "removeChunkBlockTileEntity", "(", "tileentity", ".", "xCoord", "&", "0xf", ",", "tileentity", ".", "yCoord", ",", "tileentity", ".", "zCoord", "&", "0xf", ")", ";", "}", "}", "}", "}", "while", "(", "true", ")", ";", "scanningTileEntities", "=", "false", ";", "if", "(", "!", "entityRemoval", ".", "isEmpty", "(", ")", ")", "{", "loadedTileEntityList", ".", "removeAll", "(", "entityRemoval", ")", ";", "entityRemoval", ".", "clear", "(", ")", ";", "}", "Profiler", ".", "endStartSection", "(", "\"\"", ")", ";", "if", "(", "!", "addedTileEntityList", ".", "isEmpty", "(", ")", ")", "{", "Iterator", "iterator1", "=", "addedTileEntityList", ".", "iterator", "(", ")", ";", "do", "{", "if", "(", "!", "iterator1", ".", "hasNext", "(", ")", ")", "{", "break", ";", "}", "TileEntity", "tileentity1", "=", "(", "TileEntity", ")", "iterator1", ".", "next", "(", ")", ";", "if", "(", "!", "tileentity1", ".", "isInvalid", "(", ")", ")", "{", "if", "(", "!", "loadedTileEntityList", ".", "contains", "(", "tileentity1", ")", ")", "{", "loadedTileEntityList", ".", "add", "(", "tileentity1", ")", ";", "}", "if", "(", "chunkExists", "(", "tileentity1", ".", "xCoord", ">>", "4", ",", "tileentity1", ".", "zCoord", ">>", "4", ")", ")", "{", "Chunk", "chunk1", "=", "getChunkFromChunkCoords", "(", "tileentity1", ".", "xCoord", ">>", "4", ",", "tileentity1", ".", "zCoord", ">>", "4", ")", ";", "if", "(", "chunk1", "!=", "null", ")", "{", "chunk1", ".", "setChunkBlockTileEntity", "(", "tileentity1", ".", "xCoord", "&", "0xf", ",", "tileentity1", ".", "yCoord", ",", "tileentity1", ".", "zCoord", "&", "0xf", ",", "tileentity1", ")", ";", "}", "}", "markBlockNeedsUpdate", "(", "tileentity1", ".", "xCoord", ",", "tileentity1", ".", "yCoord", ",", "tileentity1", ".", "zCoord", ")", ";", "}", "}", "while", "(", "true", ")", ";", "addedTileEntityList", ".", "clear", "(", ")", ";", "}", "Profiler", ".", "endSection", "(", ")", ";", "Profiler", ".", "endSection", "(", ")", ";", "}", "public", "void", "addTileEntity", "(", "Collection", "par1Collection", ")", "{", "if", "(", "scanningTileEntities", ")", "{", "addedTileEntityList", ".", "addAll", "(", "par1Collection", ")", ";", "}", "else", "{", "loadedTileEntityList", ".", "addAll", "(", "par1Collection", ")", ";", "}", "}", "public", "void", "updateEntity", "(", "Entity", "par1Entity", ")", "{", "updateEntityWithOptionalForce", "(", "par1Entity", ",", "true", ")", ";", "}", "public", "void", "updateEntityWithOptionalForce", "(", "Entity", "par1Entity", ",", "boolean", "par2", ")", "{", "int", "i", "=", "MathHelper", ".", "floor_double", "(", "par1Entity", ".", "posX", ")", ";", "int", "j", "=", "MathHelper", ".", "floor_double", "(", "par1Entity", ".", "posZ", ")", ";", "byte", "byte0", "=", "32", ";", "if", "(", "par2", "&&", "!", "checkChunksExist", "(", "i", "-", "byte0", ",", "0", ",", "j", "-", "byte0", ",", "i", "+", "byte0", ",", "0", ",", "j", "+", "byte0", ")", ")", "{", "return", ";", "}", "par1Entity", ".", "lastTickPosX", "=", "par1Entity", ".", "posX", ";", "par1Entity", ".", "lastTickPosY", "=", "par1Entity", ".", "posY", ";", "par1Entity", ".", "lastTickPosZ", "=", "par1Entity", ".", "posZ", ";", "par1Entity", ".", "prevRotationYaw", "=", "par1Entity", ".", "rotationYaw", ";", "par1Entity", ".", "prevRotationPitch", "=", "par1Entity", ".", "rotationPitch", ";", "if", "(", "par2", "&&", "par1Entity", ".", "addedToChunk", ")", "{", "if", "(", "par1Entity", ".", "ridingEntity", "!=", "null", ")", "{", "par1Entity", ".", "updateRidden", "(", ")", ";", "}", "else", "{", "par1Entity", ".", "onUpdate", "(", ")", ";", "}", "}", "Profiler", ".", "startSection", "(", "\"chunkCheck\"", ")", ";", "if", "(", "Double", ".", "isNaN", "(", "par1Entity", ".", "posX", ")", "||", "Double", ".", "isInfinite", "(", "par1Entity", ".", "posX", ")", ")", "{", "par1Entity", ".", "posX", "=", "par1Entity", ".", "lastTickPosX", ";", "}", "if", "(", "Double", ".", "isNaN", "(", "par1Entity", ".", "posY", ")", "||", "Double", ".", "isInfinite", "(", "par1Entity", ".", "posY", ")", ")", "{", "par1Entity", ".", "posY", "=", "par1Entity", ".", "lastTickPosY", ";", "}", "if", "(", "Double", ".", "isNaN", "(", "par1Entity", ".", "posZ", ")", "||", "Double", ".", "isInfinite", "(", "par1Entity", ".", "posZ", ")", ")", "{", "par1Entity", ".", "posZ", "=", "par1Entity", ".", "lastTickPosZ", ";", "}", "if", "(", "Double", ".", "isNaN", "(", "par1Entity", ".", "rotationPitch", ")", "||", "Double", ".", "isInfinite", "(", "par1Entity", ".", "rotationPitch", ")", ")", "{", "par1Entity", ".", "rotationPitch", "=", "par1Entity", ".", "prevRotationPitch", ";", "}", "if", "(", "Double", ".", "isNaN", "(", "par1Entity", ".", "rotationYaw", ")", "||", "Double", ".", "isInfinite", "(", "par1Entity", ".", "rotationYaw", ")", ")", "{", "par1Entity", ".", "rotationYaw", "=", "par1Entity", ".", "prevRotationYaw", ";", "}", "int", "k", "=", "MathHelper", ".", "floor_double", "(", "par1Entity", ".", "posX", "/", "16D", ")", ";", "int", "l", "=", "MathHelper", ".", "floor_double", "(", "par1Entity", ".", "posY", "/", "16D", ")", ";", "int", "i1", "=", "MathHelper", ".", "floor_double", "(", "par1Entity", ".", "posZ", "/", "16D", ")", ";", "if", "(", "!", "par1Entity", ".", "addedToChunk", "||", "par1Entity", ".", "chunkCoordX", "!=", "k", "||", "par1Entity", ".", "chunkCoordY", "!=", "l", "||", "par1Entity", ".", "chunkCoordZ", "!=", "i1", ")", "{", "if", "(", "par1Entity", ".", "addedToChunk", "&&", "chunkExists", "(", "par1Entity", ".", "chunkCoordX", ",", "par1Entity", ".", "chunkCoordZ", ")", ")", "{", "getChunkFromChunkCoords", "(", "par1Entity", ".", "chunkCoordX", ",", "par1Entity", ".", "chunkCoordZ", ")", ".", "removeEntityAtIndex", "(", "par1Entity", ",", "par1Entity", ".", "chunkCoordY", ")", ";", "}", "if", "(", "chunkExists", "(", "k", ",", "i1", ")", ")", "{", "par1Entity", ".", "addedToChunk", "=", "true", ";", "getChunkFromChunkCoords", "(", "k", ",", "i1", ")", ".", "addEntity", "(", "par1Entity", ")", ";", "}", "else", "{", "par1Entity", ".", "addedToChunk", "=", "false", ";", "}", "}", "Profiler", ".", "endSection", "(", ")", ";", "if", "(", "par2", "&&", "par1Entity", ".", "addedToChunk", "&&", "par1Entity", ".", "riddenByEntity", "!=", "null", ")", "{", "if", "(", "par1Entity", ".", "riddenByEntity", ".", "isDead", "||", "par1Entity", ".", "riddenByEntity", ".", "ridingEntity", "!=", "par1Entity", ")", "{", "par1Entity", ".", "riddenByEntity", ".", "ridingEntity", "=", "null", ";", "par1Entity", ".", "riddenByEntity", "=", "null", ";", "}", "else", "{", "updateEntity", "(", "par1Entity", ".", "riddenByEntity", ")", ";", "}", "}", "}", "public", "boolean", "checkIfAABBIsClear", "(", "AxisAlignedBB", "par1AxisAlignedBB", ")", "{", "List", "list", "=", "getEntitiesWithinAABBExcludingEntity", "(", "null", ",", "par1AxisAlignedBB", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "list", ".", "size", "(", ")", ";", "i", "++", ")", "{", "Entity", "entity", "=", "(", "Entity", ")", "list", ".", "get", "(", "i", ")", ";", "if", "(", "!", "entity", ".", "isDead", "&&", "entity", ".", "preventEntitySpawning", ")", "{", "return", "false", ";", "}", "}", "return", "true", ";", "}", "public", "boolean", "isAABBEmpty", "(", "AxisAlignedBB", "par1AxisAlignedBB", ")", "{", "int", "i", "=", "MathHelper", ".", "floor_double", "(", "par1AxisAlignedBB", ".", "minX", ")", ";", "int", "j", "=", "MathHelper", ".", "floor_double", "(", "par1AxisAlignedBB", ".", "maxX", "+", "1.0D", ")", ";", "int", "k", "=", "MathHelper", ".", "floor_double", "(", "par1AxisAlignedBB", ".", "minY", ")", ";", "int", "l", "=", "MathHelper", ".", "floor_double", "(", "par1AxisAlignedBB", ".", "maxY", "+", "1.0D", ")", ";", "int", "i1", "=", "MathHelper", ".", "floor_double", "(", "par1AxisAlignedBB", ".", "minZ", ")", ";", "int", "j1", "=", "MathHelper", ".", "floor_double", "(", "par1AxisAlignedBB", ".", "maxZ", "+", "1.0D", ")", ";", "if", "(", "par1AxisAlignedBB", ".", "minX", "<", "0.0D", ")", "{", "i", "--", ";", "}", "if", "(", "par1AxisAlignedBB", ".", "minY", "<", "0.0D", ")", "{", "k", "--", ";", "}", "if", "(", "par1AxisAlignedBB", ".", "minZ", "<", "0.0D", ")", "{", "i1", "--", ";", "}", "for", "(", "int", "k1", "=", "i", ";", "k1", "<", "j", ";", "k1", "++", ")", "{", "for", "(", "int", "l1", "=", "k", ";", "l1", "<", "l", ";", "l1", "++", ")", "{", "for", "(", "int", "i2", "=", "i1", ";", "i2", "<", "j1", ";", "i2", "++", ")", "{", "Block", "block", "=", "Block", ".", "blocksList", "[", "getBlockId", "(", "k1", ",", "l1", ",", "i2", ")", "]", ";", "if", "(", "block", "!=", "null", ")", "{", "return", "true", ";", "}", "}", "}", "}", "return", "false", ";", "}", "public", "boolean", "isAnyLiquid", "(", "AxisAlignedBB", "par1AxisAlignedBB", ")", "{", "int", "i", "=", "MathHelper", ".", "floor_double", "(", "par1AxisAlignedBB", ".", "minX", ")", ";", "int", "j", "=", "MathHelper", ".", "floor_double", "(", "par1AxisAlignedBB", ".", "maxX", "+", "1.0D", ")", ";", "int", "k", "=", "MathHelper", ".", "floor_double", "(", "par1AxisAlignedBB", ".", "minY", ")", ";", "int", "l", "=", "MathHelper", ".", "floor_double", "(", "par1AxisAlignedBB", ".", "maxY", "+", "1.0D", ")", ";", "int", "i1", "=", "MathHelper", ".", "floor_double", "(", "par1AxisAlignedBB", ".", "minZ", ")", ";", "int", "j1", "=", "MathHelper", ".", "floor_double", "(", "par1AxisAlignedBB", ".", "maxZ", "+", "1.0D", ")", ";", "if", "(", "par1AxisAlignedBB", ".", "minX", "<", "0.0D", ")", "{", "i", "--", ";", "}", "if", "(", "par1AxisAlignedBB", ".", "minY", "<", "0.0D", ")", "{", "k", "--", ";", "}", "if", "(", "par1AxisAlignedBB", ".", "minZ", "<", "0.0D", ")", "{", "i1", "--", ";", "}", "for", "(", "int", "k1", "=", "i", ";", "k1", "<", "j", ";", "k1", "++", ")", "{", "for", "(", "int", "l1", "=", "k", ";", "l1", "<", "l", ";", "l1", "++", ")", "{", "for", "(", "int", "i2", "=", "i1", ";", "i2", "<", "j1", ";", "i2", "++", ")", "{", "Block", "block", "=", "Block", ".", "blocksList", "[", "getBlockId", "(", "k1", ",", "l1", ",", "i2", ")", "]", ";", "if", "(", "block", "!=", "null", "&&", "block", ".", "blockMaterial", ".", "isLiquid", "(", ")", ")", "{", "return", "true", ";", "}", "}", "}", "}", "return", "false", ";", "}", "public", "boolean", "isBoundingBoxBurning", "(", "AxisAlignedBB", "par1AxisAlignedBB", ")", "{", "int", "i", "=", "MathHelper", ".", "floor_double", "(", "par1AxisAlignedBB", ".", "minX", ")", ";", "int", "j", "=", "MathHelper", ".", "floor_double", "(", "par1AxisAlignedBB", ".", "maxX", "+", "1.0D", ")", ";", "int", "k", "=", "MathHelper", ".", "floor_double", "(", "par1AxisAlignedBB", ".", "minY", ")", ";", "int", "l", "=", "MathHelper", ".", "floor_double", "(", "par1AxisAlignedBB", ".", "maxY", "+", "1.0D", ")", ";", "int", "i1", "=", "MathHelper", ".", "floor_double", "(", "par1AxisAlignedBB", ".", "minZ", ")", ";", "int", "j1", "=", "MathHelper", ".", "floor_double", "(", "par1AxisAlignedBB", ".", "maxZ", "+", "1.0D", ")", ";", "if", "(", "checkChunksExist", "(", "i", ",", "k", ",", "i1", ",", "j", ",", "l", ",", "j1", ")", ")", "{", "for", "(", "int", "k1", "=", "i", ";", "k1", "<", "j", ";", "k1", "++", ")", "{", "for", "(", "int", "l1", "=", "k", ";", "l1", "<", "l", ";", "l1", "++", ")", "{", "for", "(", "int", "i2", "=", "i1", ";", "i2", "<", "j1", ";", "i2", "++", ")", "{", "int", "j2", "=", "getBlockId", "(", "k1", ",", "l1", ",", "i2", ")", ";", "if", "(", "j2", "==", "Block", ".", "fire", ".", "blockID", "||", "j2", "==", "Block", ".", "lavaMoving", ".", "blockID", "||", "j2", "==", "Block", ".", "lavaStill", ".", "blockID", ")", "{", "return", "true", ";", "}", "}", "}", "}", "}", "return", "false", ";", "}", "public", "boolean", "handleMaterialAcceleration", "(", "AxisAlignedBB", "par1AxisAlignedBB", ",", "Material", "par2Material", ",", "Entity", "par3Entity", ")", "{", "int", "i", "=", "MathHelper", ".", "floor_double", "(", "par1AxisAlignedBB", ".", "minX", ")", ";", "int", "j", "=", "MathHelper", ".", "floor_double", "(", "par1AxisAlignedBB", ".", "maxX", "+", "1.0D", ")", ";", "int", "k", "=", "MathHelper", ".", "floor_double", "(", "par1AxisAlignedBB", ".", "minY", ")", ";", "int", "l", "=", "MathHelper", ".", "floor_double", "(", "par1AxisAlignedBB", ".", "maxY", "+", "1.0D", ")", ";", "int", "i1", "=", "MathHelper", ".", "floor_double", "(", "par1AxisAlignedBB", ".", "minZ", ")", ";", "int", "j1", "=", "MathHelper", ".", "floor_double", "(", "par1AxisAlignedBB", ".", "maxZ", "+", "1.0D", ")", ";", "if", "(", "!", "checkChunksExist", "(", "i", ",", "k", ",", "i1", ",", "j", ",", "l", ",", "j1", ")", ")", "{", "return", "false", ";", "}", "boolean", "flag", "=", "false", ";", "Vec3D", "vec3d", "=", "Vec3D", ".", "createVector", "(", "0.0D", ",", "0.0D", ",", "0.0D", ")", ";", "for", "(", "int", "k1", "=", "i", ";", "k1", "<", "j", ";", "k1", "++", ")", "{", "for", "(", "int", "l1", "=", "k", ";", "l1", "<", "l", ";", "l1", "++", ")", "{", "for", "(", "int", "i2", "=", "i1", ";", "i2", "<", "j1", ";", "i2", "++", ")", "{", "Block", "block", "=", "Block", ".", "blocksList", "[", "getBlockId", "(", "k1", ",", "l1", ",", "i2", ")", "]", ";", "if", "(", "block", "==", "null", "||", "block", ".", "blockMaterial", "!=", "par2Material", ")", "{", "continue", ";", "}", "double", "d1", "=", "(", "float", ")", "(", "l1", "+", "1", ")", "-", "BlockFluid", ".", "getFluidHeightPercent", "(", "getBlockMetadata", "(", "k1", ",", "l1", ",", "i2", ")", ")", ";", "if", "(", "(", "double", ")", "l", ">=", "d1", ")", "{", "flag", "=", "true", ";", "block", ".", "velocityToAddToEntity", "(", "this", ",", "k1", ",", "l1", ",", "i2", ",", "par3Entity", ",", "vec3d", ")", ";", "}", "}", "}", "}", "if", "(", "vec3d", ".", "lengthVector", "(", ")", ">", "0.0D", ")", "{", "vec3d", "=", "vec3d", ".", "normalize", "(", ")", ";", "double", "d", "=", "0.014D", ";", "par3Entity", ".", "motionX", "+=", "vec3d", ".", "xCoord", "*", "d", ";", "par3Entity", ".", "motionY", "+=", "vec3d", ".", "yCoord", "*", "d", ";", "par3Entity", ".", "motionZ", "+=", "vec3d", ".", "zCoord", "*", "d", ";", "}", "return", "flag", ";", "}", "public", "boolean", "isMaterialInBB", "(", "AxisAlignedBB", "par1AxisAlignedBB", ",", "Material", "par2Material", ")", "{", "int", "i", "=", "MathHelper", ".", "floor_double", "(", "par1AxisAlignedBB", ".", "minX", ")", ";", "int", "j", "=", "MathHelper", ".", "floor_double", "(", "par1AxisAlignedBB", ".", "maxX", "+", "1.0D", ")", ";", "int", "k", "=", "MathHelper", ".", "floor_double", "(", "par1AxisAlignedBB", ".", "minY", ")", ";", "int", "l", "=", "MathHelper", ".", "floor_double", "(", "par1AxisAlignedBB", ".", "maxY", "+", "1.0D", ")", ";", "int", "i1", "=", "MathHelper", ".", "floor_double", "(", "par1AxisAlignedBB", ".", "minZ", ")", ";", "int", "j1", "=", "MathHelper", ".", "floor_double", "(", "par1AxisAlignedBB", ".", "maxZ", "+", "1.0D", ")", ";", "for", "(", "int", "k1", "=", "i", ";", "k1", "<", "j", ";", "k1", "++", ")", "{", "for", "(", "int", "l1", "=", "k", ";", "l1", "<", "l", ";", "l1", "++", ")", "{", "for", "(", "int", "i2", "=", "i1", ";", "i2", "<", "j1", ";", "i2", "++", ")", "{", "Block", "block", "=", "Block", ".", "blocksList", "[", "getBlockId", "(", "k1", ",", "l1", ",", "i2", ")", "]", ";", "if", "(", "block", "!=", "null", "&&", "block", ".", "blockMaterial", "==", "par2Material", ")", "{", "return", "true", ";", "}", "}", "}", "}", "return", "false", ";", "}", "public", "boolean", "isAABBInMaterial", "(", "AxisAlignedBB", "par1AxisAlignedBB", ",", "Material", "par2Material", ")", "{", "int", "i", "=", "MathHelper", ".", "floor_double", "(", "par1AxisAlignedBB", ".", "minX", ")", ";", "int", "j", "=", "MathHelper", ".", "floor_double", "(", "par1AxisAlignedBB", ".", "maxX", "+", "1.0D", ")", ";", "int", "k", "=", "MathHelper", ".", "floor_double", "(", "par1AxisAlignedBB", ".", "minY", ")", ";", "int", "l", "=", "MathHelper", ".", "floor_double", "(", "par1AxisAlignedBB", ".", "maxY", "+", "1.0D", ")", ";", "int", "i1", "=", "MathHelper", ".", "floor_double", "(", "par1AxisAlignedBB", ".", "minZ", ")", ";", "int", "j1", "=", "MathHelper", ".", "floor_double", "(", "par1AxisAlignedBB", ".", "maxZ", "+", "1.0D", ")", ";", "for", "(", "int", "k1", "=", "i", ";", "k1", "<", "j", ";", "k1", "++", ")", "{", "for", "(", "int", "l1", "=", "k", ";", "l1", "<", "l", ";", "l1", "++", ")", "{", "for", "(", "int", "i2", "=", "i1", ";", "i2", "<", "j1", ";", "i2", "++", ")", "{", "Block", "block", "=", "Block", ".", "blocksList", "[", "getBlockId", "(", "k1", ",", "l1", ",", "i2", ")", "]", ";", "if", "(", "block", "==", "null", "||", "block", ".", "blockMaterial", "!=", "par2Material", ")", "{", "continue", ";", "}", "int", "j2", "=", "getBlockMetadata", "(", "k1", ",", "l1", ",", "i2", ")", ";", "double", "d", "=", "l1", "+", "1", ";", "if", "(", "j2", "<", "8", ")", "{", "d", "=", "(", "double", ")", "(", "l1", "+", "1", ")", "-", "(", "double", ")", "j2", "/", "8D", ";", "}", "if", "(", "d", ">=", "par1AxisAlignedBB", ".", "minY", ")", "{", "return", "true", ";", "}", "}", "}", "}", "return", "false", ";", "}", "public", "Explosion", "createExplosion", "(", "Entity", "par1Entity", ",", "double", "par2", ",", "double", "par4", ",", "double", "par6", ",", "float", "par8", ")", "{", "return", "newExplosion", "(", "par1Entity", ",", "par2", ",", "par4", ",", "par6", ",", "par8", ",", "false", ")", ";", "}", "public", "Explosion", "newExplosion", "(", "Entity", "par1Entity", ",", "double", "par2", ",", "double", "par4", ",", "double", "par6", ",", "float", "par8", ",", "boolean", "par9", ")", "{", "Explosion", "explosion", "=", "new", "Explosion", "(", "this", ",", "par1Entity", ",", "par2", ",", "par4", ",", "par6", ",", "par8", ")", ";", "explosion", ".", "isFlaming", "=", "par9", ";", "explosion", ".", "doExplosionA", "(", ")", ";", "explosion", ".", "doExplosionB", "(", "true", ")", ";", "return", "explosion", ";", "}", "public", "float", "getBlockDensity", "(", "Vec3D", "par1Vec3D", ",", "AxisAlignedBB", "par2AxisAlignedBB", ")", "{", "double", "d", "=", "1.0D", "/", "(", "(", "par2AxisAlignedBB", ".", "maxX", "-", "par2AxisAlignedBB", ".", "minX", ")", "*", "2D", "+", "1.0D", ")", ";", "double", "d1", "=", "1.0D", "/", "(", "(", "par2AxisAlignedBB", ".", "maxY", "-", "par2AxisAlignedBB", ".", "minY", ")", "*", "2D", "+", "1.0D", ")", ";", "double", "d2", "=", "1.0D", "/", "(", "(", "par2AxisAlignedBB", ".", "maxZ", "-", "par2AxisAlignedBB", ".", "minZ", ")", "*", "2D", "+", "1.0D", ")", ";", "int", "i", "=", "0", ";", "int", "j", "=", "0", ";", "for", "(", "float", "f", "=", "0.0F", ";", "f", "<=", "1.0F", ";", "f", "=", "(", "float", ")", "(", "(", "double", ")", "f", "+", "d", ")", ")", "{", "for", "(", "float", "f1", "=", "0.0F", ";", "f1", "<=", "1.0F", ";", "f1", "=", "(", "float", ")", "(", "(", "double", ")", "f1", "+", "d1", ")", ")", "{", "for", "(", "float", "f2", "=", "0.0F", ";", "f2", "<=", "1.0F", ";", "f2", "=", "(", "float", ")", "(", "(", "double", ")", "f2", "+", "d2", ")", ")", "{", "double", "d3", "=", "par2AxisAlignedBB", ".", "minX", "+", "(", "par2AxisAlignedBB", ".", "maxX", "-", "par2AxisAlignedBB", ".", "minX", ")", "*", "(", "double", ")", "f", ";", "double", "d4", "=", "par2AxisAlignedBB", ".", "minY", "+", "(", "par2AxisAlignedBB", ".", "maxY", "-", "par2AxisAlignedBB", ".", "minY", ")", "*", "(", "double", ")", "f1", ";", "double", "d5", "=", "par2AxisAlignedBB", ".", "minZ", "+", "(", "par2AxisAlignedBB", ".", "maxZ", "-", "par2AxisAlignedBB", ".", "minZ", ")", "*", "(", "double", ")", "f2", ";", "if", "(", "rayTraceBlocks", "(", "Vec3D", ".", "createVector", "(", "d3", ",", "d4", ",", "d5", ")", ",", "par1Vec3D", ")", "==", "null", ")", "{", "i", "++", ";", "}", "j", "++", ";", "}", "}", "}", "return", "(", "float", ")", "i", "/", "(", "float", ")", "j", ";", "}", "public", "boolean", "func_48093_a", "(", "EntityPlayer", "par1EntityPlayer", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "int", "par5", ")", "{", "if", "(", "par5", "==", "0", ")", "{", "par3", "--", ";", "}", "if", "(", "par5", "==", "1", ")", "{", "par3", "++", ";", "}", "if", "(", "par5", "==", "2", ")", "{", "par4", "--", ";", "}", "if", "(", "par5", "==", "3", ")", "{", "par4", "++", ";", "}", "if", "(", "par5", "==", "4", ")", "{", "par2", "--", ";", "}", "if", "(", "par5", "==", "5", ")", "{", "par2", "++", ";", "}", "if", "(", "getBlockId", "(", "par2", ",", "par3", ",", "par4", ")", "==", "Block", ".", "fire", ".", "blockID", ")", "{", "playAuxSFXAtEntity", "(", "par1EntityPlayer", ",", "1004", ",", "par2", ",", "par3", ",", "par4", ",", "0", ")", ";", "setBlockWithNotify", "(", "par2", ",", "par3", ",", "par4", ",", "0", ")", ";", "return", "true", ";", "}", "else", "{", "return", "false", ";", "}", "}", "public", "TileEntity", "getBlockTileEntity", "(", "int", "par1", ",", "int", "par2", ",", "int", "par3", ")", "{", "label0", ":", "{", "TileEntity", "tileentity", ";", "label1", ":", "{", "if", "(", "par2", ">=", "256", ")", "{", "return", "null", ";", "}", "Chunk", "chunk", "=", "getChunkFromChunkCoords", "(", "par1", ">>", "4", ",", "par3", ">>", "4", ")", ";", "if", "(", "chunk", "==", "null", ")", "{", "break", "label0", ";", "}", "tileentity", "=", "chunk", ".", "getChunkBlockTileEntity", "(", "par1", "&", "0xf", ",", "par2", ",", "par3", "&", "0xf", ")", ";", "if", "(", "tileentity", "!=", "null", ")", "{", "break", "label1", ";", "}", "Iterator", "iterator", "=", "addedTileEntityList", ".", "iterator", "(", ")", ";", "TileEntity", "tileentity1", ";", "do", "{", "if", "(", "!", "iterator", ".", "hasNext", "(", ")", ")", "{", "break", "label1", ";", "}", "tileentity1", "=", "(", "TileEntity", ")", "iterator", ".", "next", "(", ")", ";", "}", "while", "(", "tileentity1", ".", "isInvalid", "(", ")", "||", "tileentity1", ".", "xCoord", "!=", "par1", "||", "tileentity1", ".", "yCoord", "!=", "par2", "||", "tileentity1", ".", "zCoord", "!=", "par3", ")", ";", "tileentity", "=", "tileentity1", ";", "}", "return", "tileentity", ";", "}", "return", "null", ";", "}", "public", "void", "setBlockTileEntity", "(", "int", "par1", ",", "int", "par2", ",", "int", "par3", ",", "TileEntity", "par4TileEntity", ")", "{", "if", "(", "par4TileEntity", "!=", "null", "&&", "!", "par4TileEntity", ".", "isInvalid", "(", ")", ")", "{", "if", "(", "scanningTileEntities", ")", "{", "par4TileEntity", ".", "xCoord", "=", "par1", ";", "par4TileEntity", ".", "yCoord", "=", "par2", ";", "par4TileEntity", ".", "zCoord", "=", "par3", ";", "addedTileEntityList", ".", "add", "(", "par4TileEntity", ")", ";", "}", "else", "{", "loadedTileEntityList", ".", "add", "(", "par4TileEntity", ")", ";", "Chunk", "chunk", "=", "getChunkFromChunkCoords", "(", "par1", ">>", "4", ",", "par3", ">>", "4", ")", ";", "if", "(", "chunk", "!=", "null", ")", "{", "chunk", ".", "setChunkBlockTileEntity", "(", "par1", "&", "0xf", ",", "par2", ",", "par3", "&", "0xf", ",", "par4TileEntity", ")", ";", "}", "}", "}", "}", "public", "void", "removeBlockTileEntity", "(", "int", "par1", ",", "int", "par2", ",", "int", "par3", ")", "{", "TileEntity", "tileentity", "=", "getBlockTileEntity", "(", "par1", ",", "par2", ",", "par3", ")", ";", "if", "(", "tileentity", "!=", "null", "&&", "scanningTileEntities", ")", "{", "tileentity", ".", "invalidate", "(", ")", ";", "addedTileEntityList", ".", "remove", "(", "tileentity", ")", ";", "}", "else", "{", "if", "(", "tileentity", "!=", "null", ")", "{", "addedTileEntityList", ".", "remove", "(", "tileentity", ")", ";", "loadedTileEntityList", ".", "remove", "(", "tileentity", ")", ";", "}", "Chunk", "chunk", "=", "getChunkFromChunkCoords", "(", "par1", ">>", "4", ",", "par3", ">>", "4", ")", ";", "if", "(", "chunk", "!=", "null", ")", "{", "chunk", ".", "removeChunkBlockTileEntity", "(", "par1", "&", "0xf", ",", "par2", ",", "par3", "&", "0xf", ")", ";", "}", "}", "}", "public", "void", "markTileEntityForDespawn", "(", "TileEntity", "par1TileEntity", ")", "{", "entityRemoval", ".", "add", "(", "par1TileEntity", ")", ";", "}", "public", "boolean", "isBlockOpaqueCube", "(", "int", "par1", ",", "int", "par2", ",", "int", "par3", ")", "{", "Block", "block", "=", "Block", ".", "blocksList", "[", "getBlockId", "(", "par1", ",", "par2", ",", "par3", ")", "]", ";", "if", "(", "block", "==", "null", ")", "{", "return", "false", ";", "}", "else", "{", "return", "block", ".", "isOpaqueCube", "(", ")", ";", "}", "}", "public", "boolean", "isBlockNormalCube", "(", "int", "par1", ",", "int", "par2", ",", "int", "par3", ")", "{", "return", "Block", ".", "isNormalCube", "(", "getBlockId", "(", "par1", ",", "par2", ",", "par3", ")", ")", ";", "}", "public", "boolean", "isBlockNormalCubeDefault", "(", "int", "par1", ",", "int", "par2", ",", "int", "par3", ",", "boolean", "par4", ")", "{", "if", "(", "par1", "<", "0xfe363c80", "||", "par3", "<", "0xfe363c80", "||", "par1", ">=", "0x1c9c380", "||", "par3", ">=", "0x1c9c380", ")", "{", "return", "par4", ";", "}", "Chunk", "chunk", "=", "chunkProvider", ".", "provideChunk", "(", "par1", ">>", "4", ",", "par3", ">>", "4", ")", ";", "if", "(", "chunk", "==", "null", "||", "chunk", ".", "isEmpty", "(", ")", ")", "{", "return", "par4", ";", "}", "Block", "block", "=", "Block", ".", "blocksList", "[", "getBlockId", "(", "par1", ",", "par2", ",", "par3", ")", "]", ";", "if", "(", "block", "==", "null", ")", "{", "return", "false", ";", "}", "else", "{", "return", "block", ".", "blockMaterial", ".", "isOpaque", "(", ")", "&&", "block", ".", "renderAsNormalBlock", "(", ")", ";", "}", "}", "public", "void", "calculateInitialSkylight", "(", ")", "{", "int", "i", "=", "calculateSkylightSubtracted", "(", "1.0F", ")", ";", "if", "(", "i", "!=", "skylightSubtracted", ")", "{", "skylightSubtracted", "=", "i", ";", "}", "}", "public", "void", "setAllowedSpawnTypes", "(", "boolean", "par1", ",", "boolean", "par2", ")", "{", "spawnHostileMobs", "=", "par1", ";", "spawnPeacefulMobs", "=", "par2", ";", "}", "public", "void", "tick", "(", ")", "{", "if", "(", "getWorldInfo", "(", ")", ".", "isHardcoreModeEnabled", "(", ")", "&&", "difficultySetting", "<", "3", ")", "{", "difficultySetting", "=", "3", ";", "}", "worldProvider", ".", "worldChunkMgr", ".", "cleanupCache", "(", ")", ";", "updateWeather", "(", ")", ";", "if", "(", "isAllPlayersFullyAsleep", "(", ")", ")", "{", "boolean", "flag", "=", "false", ";", "if", "(", "spawnHostileMobs", ")", "{", "if", "(", "difficultySetting", "<", "1", ")", ";", "}", "if", "(", "!", "flag", ")", "{", "long", "l", "=", "worldInfo", ".", "getWorldTime", "(", ")", "+", "24000L", ";", "worldInfo", ".", "setWorldTime", "(", "l", "-", "l", "%", "24000L", ")", ";", "wakeUpAllPlayers", "(", ")", ";", "}", "}", "Profiler", ".", "startSection", "(", "\"mobSpawner\"", ")", ";", "SpawnerAnimals", ".", "performSpawning", "(", "this", ",", "spawnHostileMobs", ",", "spawnPeacefulMobs", "&&", "worldInfo", ".", "getWorldTime", "(", ")", "%", "400L", "==", "0L", ")", ";", "Profiler", ".", "endStartSection", "(", "\"chunkSource\"", ")", ";", "chunkProvider", ".", "unload100OldestChunks", "(", ")", ";", "int", "i", "=", "calculateSkylightSubtracted", "(", "1.0F", ")", ";", "if", "(", "i", "!=", "skylightSubtracted", ")", "{", "skylightSubtracted", "=", "i", ";", "}", "long", "l1", "=", "worldInfo", ".", "getWorldTime", "(", ")", "+", "1L", ";", "if", "(", "l1", "%", "(", "long", ")", "autosavePeriod", "==", "0L", ")", "{", "Profiler", ".", "endStartSection", "(", "\"save\"", ")", ";", "saveWorld", "(", "false", ",", "null", ")", ";", "}", "worldInfo", ".", "setWorldTime", "(", "l1", ")", ";", "Profiler", ".", "endStartSection", "(", "\"tickPending\"", ")", ";", "tickUpdates", "(", "false", ")", ";", "Profiler", ".", "endStartSection", "(", "\"tickTiles\"", ")", ";", "tickBlocksAndAmbiance", "(", ")", ";", "Profiler", ".", "endStartSection", "(", "\"village\"", ")", ";", "villageCollectionObj", ".", "tick", "(", ")", ";", "villageSiegeObj", ".", "tick", "(", ")", ";", "Profiler", ".", "endSection", "(", ")", ";", "}", "private", "void", "calculateInitialWeather", "(", ")", "{", "if", "(", "worldInfo", ".", "isRaining", "(", ")", ")", "{", "rainingStrength", "=", "1.0F", ";", "if", "(", "worldInfo", ".", "isThundering", "(", ")", ")", "{", "thunderingStrength", "=", "1.0F", ";", "}", "}", "}", "protected", "void", "updateWeather", "(", ")", "{", "if", "(", "worldProvider", ".", "hasNoSky", ")", "{", "return", ";", "}", "if", "(", "lastLightningBolt", ">", "0", ")", "{", "lastLightningBolt", "--", ";", "}", "int", "i", "=", "worldInfo", ".", "getThunderTime", "(", ")", ";", "if", "(", "i", "<=", "0", ")", "{", "if", "(", "worldInfo", ".", "isThundering", "(", ")", ")", "{", "worldInfo", ".", "setThunderTime", "(", "rand", ".", "nextInt", "(", "12000", ")", "+", "3600", ")", ";", "}", "else", "{", "worldInfo", ".", "setThunderTime", "(", "rand", ".", "nextInt", "(", "0x29040", ")", "+", "12000", ")", ";", "}", "}", "else", "{", "i", "--", ";", "worldInfo", ".", "setThunderTime", "(", "i", ")", ";", "if", "(", "i", "<=", "0", ")", "{", "worldInfo", ".", "setThundering", "(", "!", "worldInfo", ".", "isThundering", "(", ")", ")", ";", "}", "}", "int", "j", "=", "worldInfo", ".", "getRainTime", "(", ")", ";", "if", "(", "j", "<=", "0", ")", "{", "if", "(", "worldInfo", ".", "isRaining", "(", ")", ")", "{", "worldInfo", ".", "setRainTime", "(", "rand", ".", "nextInt", "(", "12000", ")", "+", "12000", ")", ";", "}", "else", "{", "worldInfo", ".", "setRainTime", "(", "rand", ".", "nextInt", "(", "0x29040", ")", "+", "12000", ")", ";", "}", "}", "else", "{", "j", "--", ";", "worldInfo", ".", "setRainTime", "(", "j", ")", ";", "if", "(", "j", "<=", "0", ")", "{", "worldInfo", ".", "setRaining", "(", "!", "worldInfo", ".", "isRaining", "(", ")", ")", ";", "}", "}", "prevRainingStrength", "=", "rainingStrength", ";", "if", "(", "worldInfo", ".", "isRaining", "(", ")", ")", "{", "rainingStrength", "+=", "0.01D", ";", "}", "else", "{", "rainingStrength", "-=", "0.01D", ";", "}", "if", "(", "rainingStrength", "<", "0.0F", ")", "{", "rainingStrength", "=", "0.0F", ";", "}", "if", "(", "rainingStrength", ">", "1.0F", ")", "{", "rainingStrength", "=", "1.0F", ";", "}", "prevThunderingStrength", "=", "thunderingStrength", ";", "if", "(", "worldInfo", ".", "isThundering", "(", ")", ")", "{", "thunderingStrength", "+=", "0.01D", ";", "}", "else", "{", "thunderingStrength", "-=", "0.01D", ";", "}", "if", "(", "thunderingStrength", "<", "0.0F", ")", "{", "thunderingStrength", "=", "0.0F", ";", "}", "if", "(", "thunderingStrength", ">", "1.0F", ")", "{", "thunderingStrength", "=", "1.0F", ";", "}", "}", "private", "void", "clearWeather", "(", ")", "{", "worldInfo", ".", "setRainTime", "(", "0", ")", ";", "worldInfo", ".", "setRaining", "(", "false", ")", ";", "worldInfo", ".", "setThunderTime", "(", "0", ")", ";", "worldInfo", ".", "setThundering", "(", "false", ")", ";", "}", "public", "void", "commandToggleDownfall", "(", ")", "{", "worldInfo", ".", "setRainTime", "(", "1", ")", ";", "}", "protected", "void", "func_48090_k", "(", ")", "{", "activeChunkSet", ".", "clear", "(", ")", ";", "Profiler", ".", "startSection", "(", "\"buildList\"", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "playerEntities", ".", "size", "(", ")", ";", "i", "++", ")", "{", "EntityPlayer", "entityplayer", "=", "(", "EntityPlayer", ")", "playerEntities", ".", "get", "(", "i", ")", ";", "int", "k", "=", "MathHelper", ".", "floor_double", "(", "entityplayer", ".", "posX", "/", "16D", ")", ";", "int", "i1", "=", "MathHelper", ".", "floor_double", "(", "entityplayer", ".", "posZ", "/", "16D", ")", ";", "byte", "byte0", "=", "7", ";", "for", "(", "int", "l1", "=", "-", "byte0", ";", "l1", "<=", "byte0", ";", "l1", "++", ")", "{", "for", "(", "int", "i2", "=", "-", "byte0", ";", "i2", "<=", "byte0", ";", "i2", "++", ")", "{", "activeChunkSet", ".", "add", "(", "new", "ChunkCoordIntPair", "(", "l1", "+", "k", ",", "i2", "+", "i1", ")", ")", ";", "}", "}", "}", "Profiler", ".", "endSection", "(", ")", ";", "if", "(", "ambientTickCountdown", ">", "0", ")", "{", "ambientTickCountdown", "--", ";", "}", "Profiler", ".", "startSection", "(", "\"\"", ")", ";", "if", "(", "!", "playerEntities", ".", "isEmpty", "(", ")", ")", "{", "int", "j", "=", "rand", ".", "nextInt", "(", "playerEntities", ".", "size", "(", ")", ")", ";", "EntityPlayer", "entityplayer1", "=", "(", "EntityPlayer", ")", "playerEntities", ".", "get", "(", "j", ")", ";", "int", "l", "=", "(", "MathHelper", ".", "floor_double", "(", "entityplayer1", ".", "posX", ")", "+", "rand", ".", "nextInt", "(", "11", ")", ")", "-", "5", ";", "int", "j1", "=", "(", "MathHelper", ".", "floor_double", "(", "entityplayer1", ".", "posY", ")", "+", "rand", ".", "nextInt", "(", "11", ")", ")", "-", "5", ";", "int", "k1", "=", "(", "MathHelper", ".", "floor_double", "(", "entityplayer1", ".", "posZ", ")", "+", "rand", ".", "nextInt", "(", "11", ")", ")", "-", "5", ";", "updateAllLightTypes", "(", "l", ",", "j1", ",", "k1", ")", ";", "}", "Profiler", ".", "endSection", "(", ")", ";", "}", "protected", "void", "func_48094_a", "(", "int", "par1", ",", "int", "par2", ",", "Chunk", "par3Chunk", ")", "{", "Profiler", ".", "endStartSection", "(", "\"tickChunk\"", ")", ";", "par3Chunk", ".", "updateSkylight", "(", ")", ";", "Profiler", ".", "endStartSection", "(", "\"moodSound\"", ")", ";", "if", "(", "ambientTickCountdown", "==", "0", ")", "{", "updateLCG", "=", "updateLCG", "*", "3", "+", "0x3c6ef35f", ";", "int", "i", "=", "updateLCG", ">>", "2", ";", "int", "j", "=", "i", "&", "0xf", ";", "int", "k", "=", "i", ">>", "8", "&", "0xf", ";", "int", "l", "=", "i", ">>", "16", "&", "0x7f", ";", "int", "i1", "=", "par3Chunk", ".", "getBlockID", "(", "j", ",", "l", ",", "k", ")", ";", "j", "+=", "par1", ";", "k", "+=", "par2", ";", "if", "(", "i1", "==", "0", "&&", "getFullBlockLightValue", "(", "j", ",", "l", ",", "k", ")", "<=", "rand", ".", "nextInt", "(", "8", ")", "&&", "getSavedLightValue", "(", "EnumSkyBlock", ".", "Sky", ",", "j", ",", "l", ",", "k", ")", "<=", "0", ")", "{", "EntityPlayer", "entityplayer", "=", "getClosestPlayer", "(", "(", "double", ")", "j", "+", "0.5D", ",", "(", "double", ")", "l", "+", "0.5D", ",", "(", "double", ")", "k", "+", "0.5D", ",", "8D", ")", ";", "if", "(", "entityplayer", "!=", "null", "&&", "entityplayer", ".", "getDistanceSq", "(", "(", "double", ")", "j", "+", "0.5D", ",", "(", "double", ")", "l", "+", "0.5D", ",", "(", "double", ")", "k", "+", "0.5D", ")", ">", "4D", ")", "{", "playSoundEffect", "(", "(", "double", ")", "j", "+", "0.5D", ",", "(", "double", ")", "l", "+", "0.5D", ",", "(", "double", ")", "k", "+", "0.5D", ",", "\"\"", ",", "0.7F", ",", "0.8F", "+", "rand", ".", "nextFloat", "(", ")", "*", "0.2F", ")", ";", "ambientTickCountdown", "=", "rand", ".", "nextInt", "(", "12000", ")", "+", "6000", ";", "}", "}", "}", "Profiler", ".", "endStartSection", "(", "\"checkLight\"", ")", ";", "par3Chunk", ".", "enqueueRelightChecks", "(", ")", ";", "}", "protected", "void", "tickBlocksAndAmbiance", "(", ")", "{", "func_48090_k", "(", ")", ";", "int", "i", "=", "0", ";", "int", "j", "=", "0", ";", "for", "(", "Iterator", "iterator", "=", "activeChunkSet", ".", "iterator", "(", ")", ";", "iterator", ".", "hasNext", "(", ")", ";", "Profiler", ".", "endSection", "(", ")", ")", "{", "ChunkCoordIntPair", "chunkcoordintpair", "=", "(", "ChunkCoordIntPair", ")", "iterator", ".", "next", "(", ")", ";", "int", "k", "=", "chunkcoordintpair", ".", "chunkXPos", "*", "16", ";", "int", "l", "=", "chunkcoordintpair", ".", "chunkZPos", "*", "16", ";", "Profiler", ".", "startSection", "(", "\"getChunk\"", ")", ";", "Chunk", "chunk", "=", "getChunkFromChunkCoords", "(", "chunkcoordintpair", ".", "chunkXPos", ",", "chunkcoordintpair", ".", "chunkZPos", ")", ";", "func_48094_a", "(", "k", ",", "l", ",", "chunk", ")", ";", "Profiler", ".", "endStartSection", "(", "\"thunder\"", ")", ";", "if", "(", "rand", ".", "nextInt", "(", "0x186a0", ")", "==", "0", "&&", "isRaining", "(", ")", "&&", "isThundering", "(", ")", ")", "{", "updateLCG", "=", "updateLCG", "*", "3", "+", "0x3c6ef35f", ";", "int", "i1", "=", "updateLCG", ">>", "2", ";", "int", "k1", "=", "k", "+", "(", "i1", "&", "0xf", ")", ";", "int", "j2", "=", "l", "+", "(", "i1", ">>", "8", "&", "0xf", ")", ";", "int", "i3", "=", "getPrecipitationHeight", "(", "k1", ",", "j2", ")", ";", "if", "(", "canLightningStrikeAt", "(", "k1", ",", "i3", ",", "j2", ")", ")", "{", "addWeatherEffect", "(", "new", "EntityLightningBolt", "(", "this", ",", "k1", ",", "i3", ",", "j2", ")", ")", ";", "lastLightningBolt", "=", "2", ";", "}", "}", "Profiler", ".", "endStartSection", "(", "\"iceandsnow\"", ")", ";", "if", "(", "rand", ".", "nextInt", "(", "16", ")", "==", "0", ")", "{", "updateLCG", "=", "updateLCG", "*", "3", "+", "0x3c6ef35f", ";", "int", "j1", "=", "updateLCG", ">>", "2", ";", "int", "l1", "=", "j1", "&", "0xf", ";", "int", "k2", "=", "j1", ">>", "8", "&", "0xf", ";", "int", "j3", "=", "getPrecipitationHeight", "(", "l1", "+", "k", ",", "k2", "+", "l", ")", ";", "if", "(", "isBlockHydratedIndirectly", "(", "l1", "+", "k", ",", "j3", "-", "1", ",", "k2", "+", "l", ")", ")", "{", "setBlockWithNotify", "(", "l1", "+", "k", ",", "j3", "-", "1", ",", "k2", "+", "l", ",", "Block", ".", "ice", ".", "blockID", ")", ";", "}", "if", "(", "isRaining", "(", ")", "&&", "canSnowAt", "(", "l1", "+", "k", ",", "j3", ",", "k2", "+", "l", ")", ")", "{", "setBlockWithNotify", "(", "l1", "+", "k", ",", "j3", ",", "k2", "+", "l", ",", "Block", ".", "snow", ".", "blockID", ")", ";", "}", "}", "Profiler", ".", "endStartSection", "(", "\"tickTiles\"", ")", ";", "ExtendedBlockStorage", "aextendedblockstorage", "[", "]", "=", "chunk", ".", "getBlockStorageArray", "(", ")", ";", "int", "i2", "=", "aextendedblockstorage", ".", "length", ";", "for", "(", "int", "l2", "=", "0", ";", "l2", "<", "i2", ";", "l2", "++", ")", "{", "ExtendedBlockStorage", "extendedblockstorage", "=", "aextendedblockstorage", "[", "l2", "]", ";", "if", "(", "extendedblockstorage", "==", "null", "||", "!", "extendedblockstorage", ".", "getNeedsRandomTick", "(", ")", ")", "{", "continue", ";", "}", "for", "(", "int", "k3", "=", "0", ";", "k3", "<", "3", ";", "k3", "++", ")", "{", "updateLCG", "=", "updateLCG", "*", "3", "+", "0x3c6ef35f", ";", "int", "l3", "=", "updateLCG", ">>", "2", ";", "int", "i4", "=", "l3", "&", "0xf", ";", "int", "j4", "=", "l3", ">>", "8", "&", "0xf", ";", "int", "k4", "=", "l3", ">>", "16", "&", "0xf", ";", "int", "l4", "=", "extendedblockstorage", ".", "getExtBlockID", "(", "i4", ",", "k4", ",", "j4", ")", ";", "j", "++", ";", "Block", "block", "=", "Block", ".", "blocksList", "[", "l4", "]", ";", "if", "(", "block", "!=", "null", "&&", "block", ".", "getTickRandomly", "(", ")", ")", "{", "i", "++", ";", "block", ".", "updateTick", "(", "this", ",", "i4", "+", "k", ",", "k4", "+", "extendedblockstorage", ".", "getYLocation", "(", ")", ",", "j4", "+", "l", ",", "rand", ")", ";", "}", "}", "}", "}", "}", "public", "boolean", "isBlockHydratedDirectly", "(", "int", "par1", ",", "int", "par2", ",", "int", "par3", ")", "{", "return", "isBlockHydrated", "(", "par1", ",", "par2", ",", "par3", ",", "false", ")", ";", "}", "public", "boolean", "isBlockHydratedIndirectly", "(", "int", "par1", ",", "int", "par2", ",", "int", "par3", ")", "{", "return", "isBlockHydrated", "(", "par1", ",", "par2", ",", "par3", ",", "true", ")", ";", "}", "public", "boolean", "isBlockHydrated", "(", "int", "par1", ",", "int", "par2", ",", "int", "par3", ",", "boolean", "par4", ")", "{", "BiomeGenBase", "biomegenbase", "=", "getBiomeGenForCoords", "(", "par1", ",", "par3", ")", ";", "float", "f", "=", "biomegenbase", ".", "getFloatTemperature", "(", ")", ";", "if", "(", "f", ">", "0.15F", ")", "{", "return", "false", ";", "}", "if", "(", "par2", ">=", "0", "&&", "par2", "<", "256", "&&", "getSavedLightValue", "(", "EnumSkyBlock", ".", "Block", ",", "par1", ",", "par2", ",", "par3", ")", "<", "10", ")", "{", "int", "i", "=", "getBlockId", "(", "par1", ",", "par2", ",", "par3", ")", ";", "if", "(", "(", "i", "==", "Block", ".", "waterStill", ".", "blockID", "||", "i", "==", "Block", ".", "waterMoving", ".", "blockID", ")", "&&", "getBlockMetadata", "(", "par1", ",", "par2", ",", "par3", ")", "==", "0", ")", "{", "if", "(", "!", "par4", ")", "{", "return", "true", ";", "}", "boolean", "flag", "=", "true", ";", "if", "(", "flag", "&&", "getBlockMaterial", "(", "par1", "-", "1", ",", "par2", ",", "par3", ")", "!=", "Material", ".", "water", ")", "{", "flag", "=", "false", ";", "}", "if", "(", "flag", "&&", "getBlockMaterial", "(", "par1", "+", "1", ",", "par2", ",", "par3", ")", "!=", "Material", ".", "water", ")", "{", "flag", "=", "false", ";", "}", "if", "(", "flag", "&&", "getBlockMaterial", "(", "par1", ",", "par2", ",", "par3", "-", "1", ")", "!=", "Material", ".", "water", ")", "{", "flag", "=", "false", ";", "}", "if", "(", "flag", "&&", "getBlockMaterial", "(", "par1", ",", "par2", ",", "par3", "+", "1", ")", "!=", "Material", ".", "water", ")", "{", "flag", "=", "false", ";", "}", "if", "(", "!", "flag", ")", "{", "return", "true", ";", "}", "}", "}", "return", "false", ";", "}", "public", "boolean", "canSnowAt", "(", "int", "par1", ",", "int", "par2", ",", "int", "par3", ")", "{", "BiomeGenBase", "biomegenbase", "=", "getBiomeGenForCoords", "(", "par1", ",", "par3", ")", ";", "float", "f", "=", "biomegenbase", ".", "getFloatTemperature", "(", ")", ";", "if", "(", "f", ">", "0.15F", ")", "{", "return", "false", ";", "}", "if", "(", "par2", ">=", "0", "&&", "par2", "<", "256", "&&", "getSavedLightValue", "(", "EnumSkyBlock", ".", "Block", ",", "par1", ",", "par2", ",", "par3", ")", "<", "10", ")", "{", "int", "i", "=", "getBlockId", "(", "par1", ",", "par2", "-", "1", ",", "par3", ")", ";", "int", "j", "=", "getBlockId", "(", "par1", ",", "par2", ",", "par3", ")", ";", "if", "(", "j", "==", "0", "&&", "Block", ".", "snow", ".", "canPlaceBlockAt", "(", "this", ",", "par1", ",", "par2", ",", "par3", ")", "&&", "i", "!=", "0", "&&", "i", "!=", "Block", ".", "ice", ".", "blockID", "&&", "Block", ".", "blocksList", "[", "i", "]", ".", "blockMaterial", ".", "blocksMovement", "(", ")", ")", "{", "return", "true", ";", "}", "}", "return", "false", ";", "}", "public", "void", "updateAllLightTypes", "(", "int", "par1", ",", "int", "par2", ",", "int", "par3", ")", "{", "if", "(", "!", "worldProvider", ".", "hasNoSky", ")", "{", "updateLightByType", "(", "EnumSkyBlock", ".", "Sky", ",", "par1", ",", "par2", ",", "par3", ")", ";", "}", "updateLightByType", "(", "EnumSkyBlock", ".", "Block", ",", "par1", ",", "par2", ",", "par3", ")", ";", "}", "private", "int", "computeSkyLightValue", "(", "int", "par1", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "int", "par5", ",", "int", "par6", ")", "{", "int", "i", "=", "0", ";", "if", "(", "canBlockSeeTheSky", "(", "par2", ",", "par3", ",", "par4", ")", ")", "{", "i", "=", "15", ";", "}", "else", "{", "if", "(", "par6", "==", "0", ")", "{", "par6", "=", "1", ";", "}", "int", "j", "=", "getSavedLightValue", "(", "EnumSkyBlock", ".", "Sky", ",", "par2", "-", "1", ",", "par3", ",", "par4", ")", "-", "par6", ";", "int", "k", "=", "getSavedLightValue", "(", "EnumSkyBlock", ".", "Sky", ",", "par2", "+", "1", ",", "par3", ",", "par4", ")", "-", "par6", ";", "int", "l", "=", "getSavedLightValue", "(", "EnumSkyBlock", ".", "Sky", ",", "par2", ",", "par3", "-", "1", ",", "par4", ")", "-", "par6", ";", "int", "i1", "=", "getSavedLightValue", "(", "EnumSkyBlock", ".", "Sky", ",", "par2", ",", "par3", "+", "1", ",", "par4", ")", "-", "par6", ";", "int", "j1", "=", "getSavedLightValue", "(", "EnumSkyBlock", ".", "Sky", ",", "par2", ",", "par3", ",", "par4", "-", "1", ")", "-", "par6", ";", "int", "k1", "=", "getSavedLightValue", "(", "EnumSkyBlock", ".", "Sky", ",", "par2", ",", "par3", ",", "par4", "+", "1", ")", "-", "par6", ";", "if", "(", "j", ">", "i", ")", "{", "i", "=", "j", ";", "}", "if", "(", "k", ">", "i", ")", "{", "i", "=", "k", ";", "}", "if", "(", "l", ">", "i", ")", "{", "i", "=", "l", ";", "}", "if", "(", "i1", ">", "i", ")", "{", "i", "=", "i1", ";", "}", "if", "(", "j1", ">", "i", ")", "{", "i", "=", "j1", ";", "}", "if", "(", "k1", ">", "i", ")", "{", "i", "=", "k1", ";", "}", "}", "return", "i", ";", "}", "private", "int", "computeBlockLightValue", "(", "int", "par1", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "int", "par5", ",", "int", "par6", ")", "{", "int", "i", "=", "Block", ".", "lightValue", "[", "par5", "]", ";", "int", "j", "=", "getSavedLightValue", "(", "EnumSkyBlock", ".", "Block", ",", "par2", "-", "1", ",", "par3", ",", "par4", ")", "-", "par6", ";", "int", "k", "=", "getSavedLightValue", "(", "EnumSkyBlock", ".", "Block", ",", "par2", "+", "1", ",", "par3", ",", "par4", ")", "-", "par6", ";", "int", "l", "=", "getSavedLightValue", "(", "EnumSkyBlock", ".", "Block", ",", "par2", ",", "par3", "-", "1", ",", "par4", ")", "-", "par6", ";", "int", "i1", "=", "getSavedLightValue", "(", "EnumSkyBlock", ".", "Block", ",", "par2", ",", "par3", "+", "1", ",", "par4", ")", "-", "par6", ";", "int", "j1", "=", "getSavedLightValue", "(", "EnumSkyBlock", ".", "Block", ",", "par2", ",", "par3", ",", "par4", "-", "1", ")", "-", "par6", ";", "int", "k1", "=", "getSavedLightValue", "(", "EnumSkyBlock", ".", "Block", ",", "par2", ",", "par3", ",", "par4", "+", "1", ")", "-", "par6", ";", "if", "(", "j", ">", "i", ")", "{", "i", "=", "j", ";", "}", "if", "(", "k", ">", "i", ")", "{", "i", "=", "k", ";", "}", "if", "(", "l", ">", "i", ")", "{", "i", "=", "l", ";", "}", "if", "(", "i1", ">", "i", ")", "{", "i", "=", "i1", ";", "}", "if", "(", "j1", ">", "i", ")", "{", "i", "=", "j1", ";", "}", "if", "(", "k1", ">", "i", ")", "{", "i", "=", "k1", ";", "}", "return", "i", ";", "}", "public", "void", "updateLightByType", "(", "EnumSkyBlock", "par1EnumSkyBlock", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ")", "{", "if", "(", "!", "doChunksNearChunkExist", "(", "par2", ",", "par3", ",", "par4", ",", "17", ")", ")", "{", "return", ";", "}", "int", "i", "=", "0", ";", "int", "j", "=", "0", ";", "Profiler", ".", "startSection", "(", "\"\"", ")", ";", "int", "k", "=", "getSavedLightValue", "(", "par1EnumSkyBlock", ",", "par2", ",", "par3", ",", "par4", ")", ";", "int", "i1", "=", "0", ";", "int", "k1", "=", "k", ";", "int", "j2", "=", "getBlockId", "(", "par2", ",", "par3", ",", "par4", ")", ";", "int", "i3", "=", "func_48092_f", "(", "par2", ",", "par3", ",", "par4", ")", ";", "if", "(", "i3", "==", "0", ")", "{", "i3", "=", "1", ";", "}", "int", "l3", "=", "0", ";", "if", "(", "par1EnumSkyBlock", "==", "EnumSkyBlock", ".", "Sky", ")", "{", "l3", "=", "computeSkyLightValue", "(", "k1", ",", "par2", ",", "par3", ",", "par4", ",", "j2", ",", "i3", ")", ";", "}", "else", "{", "l3", "=", "computeBlockLightValue", "(", "k1", ",", "par2", ",", "par3", ",", "par4", ",", "j2", ",", "i3", ")", ";", "}", "i1", "=", "l3", ";", "if", "(", "i1", ">", "k", ")", "{", "lightUpdateBlockList", "[", "j", "++", "]", "=", "0x20820", ";", "}", "else", "if", "(", "i1", "<", "k", ")", "{", "if", "(", "par1EnumSkyBlock", "==", "EnumSkyBlock", ".", "Block", ")", ";", "lightUpdateBlockList", "[", "j", "++", "]", "=", "0x20820", "+", "(", "k", "<<", "18", ")", ";", "do", "{", "if", "(", "i", ">=", "j", ")", "{", "break", ";", "}", "int", "l1", "=", "lightUpdateBlockList", "[", "i", "++", "]", ";", "int", "k2", "=", "(", "(", "l1", "&", "0x3f", ")", "-", "32", ")", "+", "par2", ";", "int", "j3", "=", "(", "(", "l1", ">>", "6", "&", "0x3f", ")", "-", "32", ")", "+", "par3", ";", "int", "i4", "=", "(", "(", "l1", ">>", "12", "&", "0x3f", ")", "-", "32", ")", "+", "par4", ";", "int", "k4", "=", "l1", ">>", "18", "&", "0xf", ";", "int", "i5", "=", "getSavedLightValue", "(", "par1EnumSkyBlock", ",", "k2", ",", "j3", ",", "i4", ")", ";", "if", "(", "i5", "==", "k4", ")", "{", "setLightValue", "(", "par1EnumSkyBlock", ",", "k2", ",", "j3", ",", "i4", ",", "0", ")", ";", "if", "(", "k4", ">", "0", ")", "{", "int", "l5", "=", "k2", "-", "par2", ";", "int", "j6", "=", "j3", "-", "par3", ";", "int", "l6", "=", "i4", "-", "par4", ";", "if", "(", "l5", "<", "0", ")", "{", "l5", "=", "-", "l5", ";", "}", "if", "(", "j6", "<", "0", ")", "{", "j6", "=", "-", "j6", ";", "}", "if", "(", "l6", "<", "0", ")", "{", "l6", "=", "-", "l6", ";", "}", "if", "(", "l5", "+", "j6", "+", "l6", "<", "17", ")", "{", "int", "j7", "=", "0", ";", "while", "(", "j7", "<", "6", ")", "{", "int", "k7", "=", "(", "j7", "%", "2", ")", "*", "2", "-", "1", ";", "int", "l7", "=", "k2", "+", "(", "(", "(", "j7", "/", "2", ")", "%", "3", ")", "/", "2", ")", "*", "k7", ";", "int", "i8", "=", "j3", "+", "(", "(", "(", "j7", "/", "2", "+", "1", ")", "%", "3", ")", "/", "2", ")", "*", "k7", ";", "int", "j8", "=", "i4", "+", "(", "(", "(", "j7", "/", "2", "+", "2", ")", "%", "3", ")", "/", "2", ")", "*", "k7", ";", "int", "j5", "=", "getSavedLightValue", "(", "par1EnumSkyBlock", ",", "l7", ",", "i8", ",", "j8", ")", ";", "int", "k8", "=", "Block", ".", "lightOpacity", "[", "getBlockId", "(", "l7", ",", "i8", ",", "j8", ")", "]", ";", "if", "(", "k8", "==", "0", ")", "{", "k8", "=", "1", ";", "}", "if", "(", "j5", "==", "k4", "-", "k8", "&&", "j", "<", "lightUpdateBlockList", ".", "length", ")", "{", "lightUpdateBlockList", "[", "j", "++", "]", "=", "(", "l7", "-", "par2", ")", "+", "32", "+", "(", "(", "i8", "-", "par3", ")", "+", "32", "<<", "6", ")", "+", "(", "(", "j8", "-", "par4", ")", "+", "32", "<<", "12", ")", "+", "(", "k4", "-", "k8", "<<", "18", ")", ";", "}", "j7", "++", ";", "}", "}", "}", "}", "}", "while", "(", "true", ")", ";", "i", "=", "0", ";", "}", "Profiler", ".", "endSection", "(", ")", ";", "Profiler", ".", "startSection", "(", "\"tcp", "<", "tcc\"", ")", ";", "do", "{", "if", "(", "i", ">=", "j", ")", "{", "break", ";", "}", "int", "l", "=", "lightUpdateBlockList", "[", "i", "++", "]", ";", "int", "j1", "=", "(", "(", "l", "&", "0x3f", ")", "-", "32", ")", "+", "par2", ";", "int", "i2", "=", "(", "(", "l", ">>", "6", "&", "0x3f", ")", "-", "32", ")", "+", "par3", ";", "int", "l2", "=", "(", "(", "l", ">>", "12", "&", "0x3f", ")", "-", "32", ")", "+", "par4", ";", "int", "k3", "=", "getSavedLightValue", "(", "par1EnumSkyBlock", ",", "j1", ",", "i2", ",", "l2", ")", ";", "int", "j4", "=", "getBlockId", "(", "j1", ",", "i2", ",", "l2", ")", ";", "int", "l4", "=", "Block", ".", "lightOpacity", "[", "j4", "]", ";", "if", "(", "l4", "==", "0", ")", "{", "l4", "=", "1", ";", "}", "int", "k5", "=", "0", ";", "if", "(", "par1EnumSkyBlock", "==", "EnumSkyBlock", ".", "Sky", ")", "{", "k5", "=", "computeSkyLightValue", "(", "k3", ",", "j1", ",", "i2", ",", "l2", ",", "j4", ",", "l4", ")", ";", "}", "else", "{", "k5", "=", "computeBlockLightValue", "(", "k3", ",", "j1", ",", "i2", ",", "l2", ",", "j4", ",", "l4", ")", ";", "}", "if", "(", "k5", "!=", "k3", ")", "{", "setLightValue", "(", "par1EnumSkyBlock", ",", "j1", ",", "i2", ",", "l2", ",", "k5", ")", ";", "if", "(", "k5", ">", "k3", ")", "{", "int", "i6", "=", "j1", "-", "par2", ";", "int", "k6", "=", "i2", "-", "par3", ";", "int", "i7", "=", "l2", "-", "par4", ";", "if", "(", "i6", "<", "0", ")", "{", "i6", "=", "-", "i6", ";", "}", "if", "(", "k6", "<", "0", ")", "{", "k6", "=", "-", "k6", ";", "}", "if", "(", "i7", "<", "0", ")", "{", "i7", "=", "-", "i7", ";", "}", "if", "(", "i6", "+", "k6", "+", "i7", "<", "17", "&&", "j", "<", "lightUpdateBlockList", ".", "length", "-", "6", ")", "{", "if", "(", "getSavedLightValue", "(", "par1EnumSkyBlock", ",", "j1", "-", "1", ",", "i2", ",", "l2", ")", "<", "k5", ")", "{", "lightUpdateBlockList", "[", "j", "++", "]", "=", "(", "j1", "-", "1", "-", "par2", ")", "+", "32", "+", "(", "(", "i2", "-", "par3", ")", "+", "32", "<<", "6", ")", "+", "(", "(", "l2", "-", "par4", ")", "+", "32", "<<", "12", ")", ";", "}", "if", "(", "getSavedLightValue", "(", "par1EnumSkyBlock", ",", "j1", "+", "1", ",", "i2", ",", "l2", ")", "<", "k5", ")", "{", "lightUpdateBlockList", "[", "j", "++", "]", "=", "(", "(", "j1", "+", "1", ")", "-", "par2", ")", "+", "32", "+", "(", "(", "i2", "-", "par3", ")", "+", "32", "<<", "6", ")", "+", "(", "(", "l2", "-", "par4", ")", "+", "32", "<<", "12", ")", ";", "}", "if", "(", "getSavedLightValue", "(", "par1EnumSkyBlock", ",", "j1", ",", "i2", "-", "1", ",", "l2", ")", "<", "k5", ")", "{", "lightUpdateBlockList", "[", "j", "++", "]", "=", "(", "j1", "-", "par2", ")", "+", "32", "+", "(", "(", "i2", "-", "1", "-", "par3", ")", "+", "32", "<<", "6", ")", "+", "(", "(", "l2", "-", "par4", ")", "+", "32", "<<", "12", ")", ";", "}", "if", "(", "getSavedLightValue", "(", "par1EnumSkyBlock", ",", "j1", ",", "i2", "+", "1", ",", "l2", ")", "<", "k5", ")", "{", "lightUpdateBlockList", "[", "j", "++", "]", "=", "(", "j1", "-", "par2", ")", "+", "32", "+", "(", "(", "(", "i2", "+", "1", ")", "-", "par3", ")", "+", "32", "<<", "6", ")", "+", "(", "(", "l2", "-", "par4", ")", "+", "32", "<<", "12", ")", ";", "}", "if", "(", "getSavedLightValue", "(", "par1EnumSkyBlock", ",", "j1", ",", "i2", ",", "l2", "-", "1", ")", "<", "k5", ")", "{", "lightUpdateBlockList", "[", "j", "++", "]", "=", "(", "j1", "-", "par2", ")", "+", "32", "+", "(", "(", "i2", "-", "par3", ")", "+", "32", "<<", "6", ")", "+", "(", "(", "l2", "-", "1", "-", "par4", ")", "+", "32", "<<", "12", ")", ";", "}", "if", "(", "getSavedLightValue", "(", "par1EnumSkyBlock", ",", "j1", ",", "i2", ",", "l2", "+", "1", ")", "<", "k5", ")", "{", "lightUpdateBlockList", "[", "j", "++", "]", "=", "(", "j1", "-", "par2", ")", "+", "32", "+", "(", "(", "i2", "-", "par3", ")", "+", "32", "<<", "6", ")", "+", "(", "(", "(", "l2", "+", "1", ")", "-", "par4", ")", "+", "32", "<<", "12", ")", ";", "}", "}", "}", "}", "}", "while", "(", "true", ")", ";", "Profiler", ".", "endSection", "(", ")", ";", "}", "public", "boolean", "tickUpdates", "(", "boolean", "par1", ")", "{", "int", "i", "=", "scheduledTickTreeSet", ".", "size", "(", ")", ";", "if", "(", "i", "!=", "scheduledTickSet", ".", "size", "(", ")", ")", "{", "throw", "new", "IllegalStateException", "(", "\"\"", ")", ";", "}", "if", "(", "i", ">", "1000", ")", "{", "i", "=", "1000", ";", "}", "for", "(", "int", "j", "=", "0", ";", "j", "<", "i", ";", "j", "++", ")", "{", "NextTickListEntry", "nextticklistentry", "=", "(", "NextTickListEntry", ")", "scheduledTickTreeSet", ".", "first", "(", ")", ";", "if", "(", "!", "par1", "&&", "nextticklistentry", ".", "scheduledTime", ">", "worldInfo", ".", "getWorldTime", "(", ")", ")", "{", "break", ";", "}", "scheduledTickTreeSet", ".", "remove", "(", "nextticklistentry", ")", ";", "scheduledTickSet", ".", "remove", "(", "nextticklistentry", ")", ";", "byte", "byte0", "=", "8", ";", "if", "(", "!", "checkChunksExist", "(", "nextticklistentry", ".", "xCoord", "-", "byte0", ",", "nextticklistentry", ".", "yCoord", "-", "byte0", ",", "nextticklistentry", ".", "zCoord", "-", "byte0", ",", "nextticklistentry", ".", "xCoord", "+", "byte0", ",", "nextticklistentry", ".", "yCoord", "+", "byte0", ",", "nextticklistentry", ".", "zCoord", "+", "byte0", ")", ")", "{", "continue", ";", "}", "int", "k", "=", "getBlockId", "(", "nextticklistentry", ".", "xCoord", ",", "nextticklistentry", ".", "yCoord", ",", "nextticklistentry", ".", "zCoord", ")", ";", "if", "(", "k", "==", "nextticklistentry", ".", "blockID", "&&", "k", ">", "0", ")", "{", "Block", ".", "blocksList", "[", "k", "]", ".", "updateTick", "(", "this", ",", "nextticklistentry", ".", "xCoord", ",", "nextticklistentry", ".", "yCoord", ",", "nextticklistentry", ".", "zCoord", ",", "rand", ")", ";", "}", "}", "return", "scheduledTickTreeSet", ".", "size", "(", ")", "!=", "0", ";", "}", "public", "List", "getPendingBlockUpdates", "(", "Chunk", "par1Chunk", ",", "boolean", "par2", ")", "{", "ArrayList", "arraylist", "=", "null", ";", "ChunkCoordIntPair", "chunkcoordintpair", "=", "par1Chunk", ".", "getChunkCoordIntPair", "(", ")", ";", "int", "i", "=", "chunkcoordintpair", ".", "chunkXPos", "<<", "4", ";", "int", "j", "=", "i", "+", "16", ";", "int", "k", "=", "chunkcoordintpair", ".", "chunkZPos", "<<", "4", ";", "int", "l", "=", "k", "+", "16", ";", "Iterator", "iterator", "=", "scheduledTickSet", ".", "iterator", "(", ")", ";", "do", "{", "if", "(", "!", "iterator", ".", "hasNext", "(", ")", ")", "{", "break", ";", "}", "NextTickListEntry", "nextticklistentry", "=", "(", "NextTickListEntry", ")", "iterator", ".", "next", "(", ")", ";", "if", "(", "nextticklistentry", ".", "xCoord", ">=", "i", "&&", "nextticklistentry", ".", "xCoord", "<", "j", "&&", "nextticklistentry", ".", "zCoord", ">=", "k", "&&", "nextticklistentry", ".", "zCoord", "<", "l", ")", "{", "if", "(", "par2", ")", "{", "scheduledTickTreeSet", ".", "remove", "(", "nextticklistentry", ")", ";", "iterator", ".", "remove", "(", ")", ";", "}", "if", "(", "arraylist", "==", "null", ")", "{", "arraylist", "=", "new", "ArrayList", "(", ")", ";", "}", "arraylist", ".", "add", "(", "nextticklistentry", ")", ";", "}", "}", "while", "(", "true", ")", ";", "return", "arraylist", ";", "}", "public", "List", "getEntitiesWithinAABBExcludingEntity", "(", "Entity", "par1Entity", ",", "AxisAlignedBB", "par2AxisAlignedBB", ")", "{", "entitiesWithinAABBExcludingEntity", ".", "clear", "(", ")", ";", "int", "i", "=", "MathHelper", ".", "floor_double", "(", "(", "par2AxisAlignedBB", ".", "minX", "-", "2D", ")", "/", "16D", ")", ";", "int", "j", "=", "MathHelper", ".", "floor_double", "(", "(", "par2AxisAlignedBB", ".", "maxX", "+", "2D", ")", "/", "16D", ")", ";", "int", "k", "=", "MathHelper", ".", "floor_double", "(", "(", "par2AxisAlignedBB", ".", "minZ", "-", "2D", ")", "/", "16D", ")", ";", "int", "l", "=", "MathHelper", ".", "floor_double", "(", "(", "par2AxisAlignedBB", ".", "maxZ", "+", "2D", ")", "/", "16D", ")", ";", "for", "(", "int", "i1", "=", "i", ";", "i1", "<=", "j", ";", "i1", "++", ")", "{", "for", "(", "int", "j1", "=", "k", ";", "j1", "<=", "l", ";", "j1", "++", ")", "{", "if", "(", "chunkExists", "(", "i1", ",", "j1", ")", ")", "{", "getChunkFromChunkCoords", "(", "i1", ",", "j1", ")", ".", "getEntitiesWithinAABBForEntity", "(", "par1Entity", ",", "par2AxisAlignedBB", ",", "entitiesWithinAABBExcludingEntity", ")", ";", "}", "}", "}", "return", "entitiesWithinAABBExcludingEntity", ";", "}", "public", "List", "getEntitiesWithinAABB", "(", "Class", "par1Class", ",", "AxisAlignedBB", "par2AxisAlignedBB", ")", "{", "int", "i", "=", "MathHelper", ".", "floor_double", "(", "(", "par2AxisAlignedBB", ".", "minX", "-", "2D", ")", "/", "16D", ")", ";", "int", "j", "=", "MathHelper", ".", "floor_double", "(", "(", "par2AxisAlignedBB", ".", "maxX", "+", "2D", ")", "/", "16D", ")", ";", "int", "k", "=", "MathHelper", ".", "floor_double", "(", "(", "par2AxisAlignedBB", ".", "minZ", "-", "2D", ")", "/", "16D", ")", ";", "int", "l", "=", "MathHelper", ".", "floor_double", "(", "(", "par2AxisAlignedBB", ".", "maxZ", "+", "2D", ")", "/", "16D", ")", ";", "ArrayList", "arraylist", "=", "new", "ArrayList", "(", ")", ";", "for", "(", "int", "i1", "=", "i", ";", "i1", "<=", "j", ";", "i1", "++", ")", "{", "for", "(", "int", "j1", "=", "k", ";", "j1", "<=", "l", ";", "j1", "++", ")", "{", "if", "(", "chunkExists", "(", "i1", ",", "j1", ")", ")", "{", "getChunkFromChunkCoords", "(", "i1", ",", "j1", ")", ".", "getEntitiesOfTypeWithinAAAB", "(", "par1Class", ",", "par2AxisAlignedBB", ",", "arraylist", ")", ";", "}", "}", "}", "return", "arraylist", ";", "}", "public", "Entity", "findNearestEntityWithinAABB", "(", "Class", "par1Class", ",", "AxisAlignedBB", "par2AxisAlignedBB", ",", "Entity", "par3Entity", ")", "{", "List", "list", "=", "getEntitiesWithinAABB", "(", "par1Class", ",", "par2AxisAlignedBB", ")", ";", "Entity", "entity", "=", "null", ";", "double", "d", "=", "Double", ".", "MAX_VALUE", ";", "Iterator", "iterator", "=", "list", ".", "iterator", "(", ")", ";", "do", "{", "if", "(", "!", "iterator", ".", "hasNext", "(", ")", ")", "{", "break", ";", "}", "Entity", "entity1", "=", "(", "Entity", ")", "iterator", ".", "next", "(", ")", ";", "if", "(", "entity1", "!=", "par3Entity", ")", "{", "double", "d1", "=", "par3Entity", ".", "getDistanceSqToEntity", "(", "entity1", ")", ";", "if", "(", "d1", "<=", "d", ")", "{", "entity", "=", "entity1", ";", "d", "=", "d1", ";", "}", "}", "}", "while", "(", "true", ")", ";", "return", "entity", ";", "}", "public", "void", "updateTileEntityChunkAndDoNothing", "(", "int", "par1", ",", "int", "par2", ",", "int", "par3", ",", "TileEntity", "par4TileEntity", ")", "{", "if", "(", "blockExists", "(", "par1", ",", "par2", ",", "par3", ")", ")", "{", "getChunkFromBlockCoords", "(", "par1", ",", "par3", ")", ".", "setChunkModified", "(", ")", ";", "}", "for", "(", "int", "i", "=", "0", ";", "i", "<", "worldAccesses", ".", "size", "(", ")", ";", "i", "++", ")", "{", "(", "(", "IWorldAccess", ")", "worldAccesses", ".", "get", "(", "i", ")", ")", ".", "doNothingWithTileEntity", "(", "par1", ",", "par2", ",", "par3", ",", "par4TileEntity", ")", ";", "}", "}", "public", "int", "countEntities", "(", "Class", "par1Class", ")", "{", "int", "i", "=", "0", ";", "for", "(", "int", "j", "=", "0", ";", "j", "<", "loadedEntityList", ".", "size", "(", ")", ";", "j", "++", ")", "{", "Entity", "entity", "=", "(", "Entity", ")", "loadedEntityList", ".", "get", "(", "j", ")", ";", "if", "(", "par1Class", ".", "isAssignableFrom", "(", "entity", ".", "getClass", "(", ")", ")", ")", "{", "i", "++", ";", "}", "}", "return", "i", ";", "}", "public", "void", "addLoadedEntities", "(", "List", "par1List", ")", "{", "loadedEntityList", ".", "addAll", "(", "par1List", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "par1List", ".", "size", "(", ")", ";", "i", "++", ")", "{", "obtainEntitySkin", "(", "(", "Entity", ")", "par1List", ".", "get", "(", "i", ")", ")", ";", "}", "}", "public", "void", "unloadEntities", "(", "List", "par1List", ")", "{", "unloadedEntityList", ".", "addAll", "(", "par1List", ")", ";", "}", "public", "boolean", "canBlockBePlacedAt", "(", "int", "par1", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "boolean", "par5", ",", "int", "par6", ")", "{", "int", "i", "=", "getBlockId", "(", "par2", ",", "par3", ",", "par4", ")", ";", "Block", "block", "=", "Block", ".", "blocksList", "[", "i", "]", ";", "Block", "block1", "=", "Block", ".", "blocksList", "[", "par1", "]", ";", "AxisAlignedBB", "axisalignedbb", "=", "block1", ".", "getCollisionBoundingBoxFromPool", "(", "this", ",", "par2", ",", "par3", ",", "par4", ")", ";", "if", "(", "par5", ")", "{", "axisalignedbb", "=", "null", ";", "}", "if", "(", "axisalignedbb", "!=", "null", "&&", "!", "checkIfAABBIsClear", "(", "axisalignedbb", ")", ")", "{", "return", "false", ";", "}", "if", "(", "block", "!=", "null", "&&", "(", "block", "==", "Block", ".", "waterMoving", "||", "block", "==", "Block", ".", "waterStill", "||", "block", "==", "Block", ".", "lavaMoving", "||", "block", "==", "Block", ".", "lavaStill", "||", "block", "==", "Block", ".", "fire", "||", "block", ".", "blockMaterial", ".", "isGroundCover", "(", ")", ")", ")", "{", "block", "=", "null", ";", "}", "return", "par1", ">", "0", "&&", "block", "==", "null", "&&", "block1", ".", "canPlaceBlockOnSide", "(", "this", ",", "par2", ",", "par3", ",", "par4", ",", "par6", ")", ";", "}", "public", "PathEntity", "getPathEntityToEntity", "(", "Entity", "par1Entity", ",", "Entity", "par2Entity", ",", "float", "par3", ",", "boolean", "par4", ",", "boolean", "par5", ",", "boolean", "par6", ",", "boolean", "par7", ")", "{", "Profiler", ".", "startSection", "(", "\"pathfind\"", ")", ";", "int", "i", "=", "MathHelper", ".", "floor_double", "(", "par1Entity", ".", "posX", ")", ";", "int", "j", "=", "MathHelper", ".", "floor_double", "(", "par1Entity", ".", "posY", "+", "1.0D", ")", ";", "int", "k", "=", "MathHelper", ".", "floor_double", "(", "par1Entity", ".", "posZ", ")", ";", "int", "l", "=", "(", "int", ")", "(", "par3", "+", "16F", ")", ";", "int", "i1", "=", "i", "-", "l", ";", "int", "j1", "=", "j", "-", "l", ";", "int", "k1", "=", "k", "-", "l", ";", "int", "l1", "=", "i", "+", "l", ";", "int", "i2", "=", "j", "+", "l", ";", "int", "j2", "=", "k", "+", "l", ";", "ChunkCache", "chunkcache", "=", "new", "ChunkCache", "(", "this", ",", "i1", ",", "j1", ",", "k1", ",", "l1", ",", "i2", ",", "j2", ")", ";", "PathEntity", "pathentity", "=", "(", "new", "PathFinder", "(", "chunkcache", ",", "par4", ",", "par5", ",", "par6", ",", "par7", ")", ")", ".", "createEntityPathTo", "(", "par1Entity", ",", "par2Entity", ",", "par3", ")", ";", "Profiler", ".", "endSection", "(", ")", ";", "return", "pathentity", ";", "}", "public", "PathEntity", "getEntityPathToXYZ", "(", "Entity", "par1Entity", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "float", "par5", ",", "boolean", "par6", ",", "boolean", "par7", ",", "boolean", "par8", ",", "boolean", "par9", ")", "{", "Profiler", ".", "startSection", "(", "\"pathfind\"", ")", ";", "int", "i", "=", "MathHelper", ".", "floor_double", "(", "par1Entity", ".", "posX", ")", ";", "int", "j", "=", "MathHelper", ".", "floor_double", "(", "par1Entity", ".", "posY", ")", ";", "int", "k", "=", "MathHelper", ".", "floor_double", "(", "par1Entity", ".", "posZ", ")", ";", "int", "l", "=", "(", "int", ")", "(", "par5", "+", "8F", ")", ";", "int", "i1", "=", "i", "-", "l", ";", "int", "j1", "=", "j", "-", "l", ";", "int", "k1", "=", "k", "-", "l", ";", "int", "l1", "=", "i", "+", "l", ";", "int", "i2", "=", "j", "+", "l", ";", "int", "j2", "=", "k", "+", "l", ";", "ChunkCache", "chunkcache", "=", "new", "ChunkCache", "(", "this", ",", "i1", ",", "j1", ",", "k1", ",", "l1", ",", "i2", ",", "j2", ")", ";", "PathEntity", "pathentity", "=", "(", "new", "PathFinder", "(", "chunkcache", ",", "par6", ",", "par7", ",", "par8", ",", "par9", ")", ")", ".", "createEntityPathTo", "(", "par1Entity", ",", "par2", ",", "par3", ",", "par4", ",", "par5", ")", ";", "Profiler", ".", "endSection", "(", ")", ";", "return", "pathentity", ";", "}", "public", "boolean", "isBlockProvidingPowerTo", "(", "int", "par1", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ")", "{", "int", "i", "=", "getBlockId", "(", "par1", ",", "par2", ",", "par3", ")", ";", "if", "(", "i", "==", "0", ")", "{", "return", "false", ";", "}", "else", "{", "return", "Block", ".", "blocksList", "[", "i", "]", ".", "isIndirectlyPoweringTo", "(", "this", ",", "par1", ",", "par2", ",", "par3", ",", "par4", ")", ";", "}", "}", "public", "boolean", "isBlockGettingPowered", "(", "int", "par1", ",", "int", "par2", ",", "int", "par3", ")", "{", "if", "(", "isBlockProvidingPowerTo", "(", "par1", ",", "par2", "-", "1", ",", "par3", ",", "0", ")", ")", "{", "return", "true", ";", "}", "if", "(", "isBlockProvidingPowerTo", "(", "par1", ",", "par2", "+", "1", ",", "par3", ",", "1", ")", ")", "{", "return", "true", ";", "}", "if", "(", "isBlockProvidingPowerTo", "(", "par1", ",", "par2", ",", "par3", "-", "1", ",", "2", ")", ")", "{", "return", "true", ";", "}", "if", "(", "isBlockProvidingPowerTo", "(", "par1", ",", "par2", ",", "par3", "+", "1", ",", "3", ")", ")", "{", "return", "true", ";", "}", "if", "(", "isBlockProvidingPowerTo", "(", "par1", "-", "1", ",", "par2", ",", "par3", ",", "4", ")", ")", "{", "return", "true", ";", "}", "return", "isBlockProvidingPowerTo", "(", "par1", "+", "1", ",", "par2", ",", "par3", ",", "5", ")", ";", "}", "public", "boolean", "isBlockIndirectlyProvidingPowerTo", "(", "int", "par1", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ")", "{", "if", "(", "isBlockNormalCube", "(", "par1", ",", "par2", ",", "par3", ")", ")", "{", "return", "isBlockGettingPowered", "(", "par1", ",", "par2", ",", "par3", ")", ";", "}", "int", "i", "=", "getBlockId", "(", "par1", ",", "par2", ",", "par3", ")", ";", "if", "(", "i", "==", "0", ")", "{", "return", "false", ";", "}", "else", "{", "return", "Block", ".", "blocksList", "[", "i", "]", ".", "isPoweringTo", "(", "this", ",", "par1", ",", "par2", ",", "par3", ",", "par4", ")", ";", "}", "}", "public", "boolean", "isBlockIndirectlyGettingPowered", "(", "int", "par1", ",", "int", "par2", ",", "int", "par3", ")", "{", "if", "(", "isBlockIndirectlyProvidingPowerTo", "(", "par1", ",", "par2", "-", "1", ",", "par3", ",", "0", ")", ")", "{", "return", "true", ";", "}", "if", "(", "isBlockIndirectlyProvidingPowerTo", "(", "par1", ",", "par2", "+", "1", ",", "par3", ",", "1", ")", ")", "{", "return", "true", ";", "}", "if", "(", "isBlockIndirectlyProvidingPowerTo", "(", "par1", ",", "par2", ",", "par3", "-", "1", ",", "2", ")", ")", "{", "return", "true", ";", "}", "if", "(", "isBlockIndirectlyProvidingPowerTo", "(", "par1", ",", "par2", ",", "par3", "+", "1", ",", "3", ")", ")", "{", "return", "true", ";", "}", "if", "(", "isBlockIndirectlyProvidingPowerTo", "(", "par1", "-", "1", ",", "par2", ",", "par3", ",", "4", ")", ")", "{", "return", "true", ";", "}", "return", "isBlockIndirectlyProvidingPowerTo", "(", "par1", "+", "1", ",", "par2", ",", "par3", ",", "5", ")", ";", "}", "public", "EntityPlayer", "getClosestPlayerToEntity", "(", "Entity", "par1Entity", ",", "double", "par2", ")", "{", "return", "getClosestPlayer", "(", "par1Entity", ".", "posX", ",", "par1Entity", ".", "posY", ",", "par1Entity", ".", "posZ", ",", "par2", ")", ";", "}", "public", "EntityPlayer", "getClosestPlayer", "(", "double", "par1", ",", "double", "par3", ",", "double", "par5", ",", "double", "par7", ")", "{", "double", "d", "=", "-", "1D", ";", "EntityPlayer", "entityplayer", "=", "null", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "playerEntities", ".", "size", "(", ")", ";", "i", "++", ")", "{", "EntityPlayer", "entityplayer1", "=", "(", "EntityPlayer", ")", "playerEntities", ".", "get", "(", "i", ")", ";", "double", "d1", "=", "entityplayer1", ".", "getDistanceSq", "(", "par1", ",", "par3", ",", "par5", ")", ";", "if", "(", "(", "par7", "<", "0.0D", "||", "d1", "<", "par7", "*", "par7", ")", "&&", "(", "d", "==", "-", "1D", "||", "d1", "<", "d", ")", ")", "{", "d", "=", "d1", ";", "entityplayer", "=", "entityplayer1", ";", "}", "}", "return", "entityplayer", ";", "}", "public", "EntityPlayer", "func_48087_a", "(", "double", "par1", ",", "double", "par3", ",", "double", "par5", ")", "{", "double", "d", "=", "-", "1D", ";", "EntityPlayer", "entityplayer", "=", "null", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "playerEntities", ".", "size", "(", ")", ";", "i", "++", ")", "{", "EntityPlayer", "entityplayer1", "=", "(", "EntityPlayer", ")", "playerEntities", ".", "get", "(", "i", ")", ";", "double", "d1", "=", "entityplayer1", ".", "getDistanceSq", "(", "par1", ",", "entityplayer1", ".", "posY", ",", "par3", ")", ";", "if", "(", "(", "par5", "<", "0.0D", "||", "d1", "<", "par5", "*", "par5", ")", "&&", "(", "d", "==", "-", "1D", "||", "d1", "<", "d", ")", ")", "{", "d", "=", "d1", ";", "entityplayer", "=", "entityplayer1", ";", "}", "}", "return", "entityplayer", ";", "}", "public", "EntityPlayer", "getClosestVulnerablePlayerToEntity", "(", "Entity", "par1Entity", ",", "double", "par2", ")", "{", "return", "getClosestVulnerablePlayer", "(", "par1Entity", ".", "posX", ",", "par1Entity", ".", "posY", ",", "par1Entity", ".", "posZ", ",", "par2", ")", ";", "}", "public", "EntityPlayer", "getClosestVulnerablePlayer", "(", "double", "par1", ",", "double", "par3", ",", "double", "par5", ",", "double", "par7", ")", "{", "double", "d", "=", "-", "1D", ";", "EntityPlayer", "entityplayer", "=", "null", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "playerEntities", ".", "size", "(", ")", ";", "i", "++", ")", "{", "EntityPlayer", "entityplayer1", "=", "(", "EntityPlayer", ")", "playerEntities", ".", "get", "(", "i", ")", ";", "if", "(", "entityplayer1", ".", "capabilities", ".", "disableDamage", ")", "{", "continue", ";", "}", "double", "d1", "=", "entityplayer1", ".", "getDistanceSq", "(", "par1", ",", "par3", ",", "par5", ")", ";", "if", "(", "(", "par7", "<", "0.0D", "||", "d1", "<", "par7", "*", "par7", ")", "&&", "(", "d", "==", "-", "1D", "||", "d1", "<", "d", ")", ")", "{", "d", "=", "d1", ";", "entityplayer", "=", "entityplayer1", ";", "}", "}", "return", "entityplayer", ";", "}", "public", "EntityPlayer", "getPlayerEntityByName", "(", "String", "par1Str", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "playerEntities", ".", "size", "(", ")", ";", "i", "++", ")", "{", "if", "(", "par1Str", ".", "equals", "(", "(", "(", "EntityPlayer", ")", "playerEntities", ".", "get", "(", "i", ")", ")", ".", "username", ")", ")", "{", "return", "(", "EntityPlayer", ")", "playerEntities", ".", "get", "(", "i", ")", ";", "}", "}", "return", "null", ";", "}", "public", "void", "checkSessionLock", "(", ")", "{", "saveHandler", ".", "checkSessionLock", "(", ")", ";", "}", "public", "void", "setWorldTime", "(", "long", "par1", ")", "{", "worldInfo", ".", "setWorldTime", "(", "par1", ")", ";", "}", "public", "void", "advanceTime", "(", "long", "par1", ")", "{", "long", "l", "=", "par1", "-", "worldInfo", ".", "getWorldTime", "(", ")", ";", "for", "(", "Iterator", "iterator", "=", "scheduledTickSet", ".", "iterator", "(", ")", ";", "iterator", ".", "hasNext", "(", ")", ";", ")", "{", "NextTickListEntry", "nextticklistentry", "=", "(", "NextTickListEntry", ")", "iterator", ".", "next", "(", ")", ";", "nextticklistentry", ".", "scheduledTime", "+=", "l", ";", "}", "setWorldTime", "(", "par1", ")", ";", "}", "public", "long", "getSeed", "(", ")", "{", "return", "worldInfo", ".", "getSeed", "(", ")", ";", "}", "public", "long", "getWorldTime", "(", ")", "{", "return", "worldInfo", ".", "getWorldTime", "(", ")", ";", "}", "public", "ChunkCoordinates", "getSpawnPoint", "(", ")", "{", "return", "new", "ChunkCoordinates", "(", "worldInfo", ".", "getSpawnX", "(", ")", ",", "worldInfo", ".", "getSpawnY", "(", ")", ",", "worldInfo", ".", "getSpawnZ", "(", ")", ")", ";", "}", "public", "boolean", "canMineBlock", "(", "EntityPlayer", "par1EntityPlayer", ",", "int", "par2", ",", "int", "par3", ",", "int", "i", ")", "{", "return", "true", ";", "}", "public", "void", "setEntityState", "(", "Entity", "entity", ",", "byte", "byte0", ")", "{", "}", "public", "IChunkProvider", "getChunkProvider", "(", ")", "{", "return", "chunkProvider", ";", "}", "public", "void", "playNoteAt", "(", "int", "par1", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "int", "par5", ")", "{", "int", "i", "=", "getBlockId", "(", "par1", ",", "par2", ",", "par3", ")", ";", "if", "(", "i", ">", "0", ")", "{", "Block", ".", "blocksList", "[", "i", "]", ".", "powerBlock", "(", "this", ",", "par1", ",", "par2", ",", "par3", ",", "par4", ",", "par5", ")", ";", "}", "}", "public", "ISaveHandler", "getSaveHandler", "(", ")", "{", "return", "saveHandler", ";", "}", "public", "WorldInfo", "getWorldInfo", "(", ")", "{", "return", "worldInfo", ";", "}", "public", "void", "updateAllPlayersSleepingFlag", "(", ")", "{", "allPlayersSleeping", "=", "!", "playerEntities", ".", "isEmpty", "(", ")", ";", "Iterator", "iterator", "=", "playerEntities", ".", "iterator", "(", ")", ";", "do", "{", "if", "(", "!", "iterator", ".", "hasNext", "(", ")", ")", "{", "break", ";", "}", "EntityPlayer", "entityplayer", "=", "(", "EntityPlayer", ")", "iterator", ".", "next", "(", ")", ";", "if", "(", "entityplayer", ".", "isPlayerSleeping", "(", ")", ")", "{", "continue", ";", "}", "allPlayersSleeping", "=", "false", ";", "break", ";", "}", "while", "(", "true", ")", ";", "}", "protected", "void", "wakeUpAllPlayers", "(", ")", "{", "allPlayersSleeping", "=", "false", ";", "Iterator", "iterator", "=", "playerEntities", ".", "iterator", "(", ")", ";", "do", "{", "if", "(", "!", "iterator", ".", "hasNext", "(", ")", ")", "{", "break", ";", "}", "EntityPlayer", "entityplayer", "=", "(", "EntityPlayer", ")", "iterator", ".", "next", "(", ")", ";", "if", "(", "entityplayer", ".", "isPlayerSleeping", "(", ")", ")", "{", "entityplayer", ".", "wakeUpPlayer", "(", "false", ",", "false", ",", "true", ")", ";", "}", "}", "while", "(", "true", ")", ";", "clearWeather", "(", ")", ";", "}", "public", "boolean", "isAllPlayersFullyAsleep", "(", ")", "{", "if", "(", "allPlayersSleeping", "&&", "!", "isRemote", ")", "{", "for", "(", "Iterator", "iterator", "=", "playerEntities", ".", "iterator", "(", ")", ";", "iterator", ".", "hasNext", "(", ")", ";", ")", "{", "EntityPlayer", "entityplayer", "=", "(", "EntityPlayer", ")", "iterator", ".", "next", "(", ")", ";", "if", "(", "!", "entityplayer", ".", "isPlayerFullyAsleep", "(", ")", ")", "{", "return", "false", ";", "}", "}", "return", "true", ";", "}", "else", "{", "return", "false", ";", "}", "}", "public", "float", "getWeightedThunderStrength", "(", "float", "par1", ")", "{", "return", "(", "prevThunderingStrength", "+", "(", "thunderingStrength", "-", "prevThunderingStrength", ")", "*", "par1", ")", "*", "getRainStrength", "(", "par1", ")", ";", "}", "public", "float", "getRainStrength", "(", "float", "par1", ")", "{", "return", "prevRainingStrength", "+", "(", "rainingStrength", "-", "prevRainingStrength", ")", "*", "par1", ";", "}", "public", "boolean", "isThundering", "(", ")", "{", "return", "(", "double", ")", "getWeightedThunderStrength", "(", "1.0F", ")", ">", "0.90000000000000002D", ";", "}", "public", "boolean", "isRaining", "(", ")", "{", "return", "(", "double", ")", "getRainStrength", "(", "1.0F", ")", ">", "0.20000000000000001D", ";", "}", "public", "boolean", "canLightningStrikeAt", "(", "int", "par1", ",", "int", "par2", ",", "int", "par3", ")", "{", "if", "(", "!", "isRaining", "(", ")", ")", "{", "return", "false", ";", "}", "if", "(", "!", "canBlockSeeTheSky", "(", "par1", ",", "par2", ",", "par3", ")", ")", "{", "return", "false", ";", "}", "if", "(", "getPrecipitationHeight", "(", "par1", ",", "par3", ")", ">", "par2", ")", "{", "return", "false", ";", "}", "BiomeGenBase", "biomegenbase", "=", "getBiomeGenForCoords", "(", "par1", ",", "par3", ")", ";", "if", "(", "biomegenbase", ".", "getEnableSnow", "(", ")", ")", "{", "return", "false", ";", "}", "else", "{", "return", "biomegenbase", ".", "canSpawnLightningBolt", "(", ")", ";", "}", "}", "public", "boolean", "func_48089_z", "(", "int", "par1", ",", "int", "par2", ",", "int", "par3", ")", "{", "BiomeGenBase", "biomegenbase", "=", "getBiomeGenForCoords", "(", "par1", ",", "par3", ")", ";", "return", "biomegenbase", ".", "func_48441_d", "(", ")", ";", "}", "public", "void", "setItemData", "(", "String", "par1Str", ",", "WorldSavedData", "par2WorldSavedData", ")", "{", "mapStorage", ".", "setData", "(", "par1Str", ",", "par2WorldSavedData", ")", ";", "}", "public", "WorldSavedData", "loadItemData", "(", "Class", "par1Class", ",", "String", "par2Str", ")", "{", "return", "mapStorage", ".", "loadData", "(", "par1Class", ",", "par2Str", ")", ";", "}", "public", "int", "getUniqueDataId", "(", "String", "par1Str", ")", "{", "return", "mapStorage", ".", "getUniqueDataId", "(", "par1Str", ")", ";", "}", "public", "void", "playAuxSFX", "(", "int", "par1", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "int", "par5", ")", "{", "playAuxSFXAtEntity", "(", "null", ",", "par1", ",", "par2", ",", "par3", ",", "par4", ",", "par5", ")", ";", "}", "public", "void", "playAuxSFXAtEntity", "(", "EntityPlayer", "par1EntityPlayer", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "int", "par5", ",", "int", "par6", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "worldAccesses", ".", "size", "(", ")", ";", "i", "++", ")", "{", "(", "(", "IWorldAccess", ")", "worldAccesses", ".", "get", "(", "i", ")", ")", ".", "playAuxSFX", "(", "par1EntityPlayer", ",", "par2", ",", "par3", ",", "par4", ",", "par5", ",", "par6", ")", ";", "}", "}", "public", "int", "getHeight", "(", ")", "{", "return", "256", ";", "}", "public", "Random", "setRandomSeed", "(", "int", "par1", ",", "int", "par2", ",", "int", "par3", ")", "{", "long", "l", "=", "(", "long", ")", "par1", "*", "0x4f9939f508L", "+", "(", "long", ")", "par2", "*", "0x1ef1565bd5L", "+", "getWorldInfo", "(", ")", ".", "getSeed", "(", ")", "+", "(", "long", ")", "par3", ";", "rand", ".", "setSeed", "(", "l", ")", ";", "return", "rand", ";", "}", "public", "boolean", "updatingLighting", "(", ")", "{", "return", "false", ";", "}", "public", "SpawnListEntry", "getRandomMob", "(", "EnumCreatureType", "par1EnumCreatureType", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ")", "{", "List", "list", "=", "getChunkProvider", "(", ")", ".", "getPossibleCreatures", "(", "par1EnumCreatureType", ",", "par2", ",", "par3", ",", "par4", ")", ";", "if", "(", "list", "==", "null", "||", "list", ".", "isEmpty", "(", ")", ")", "{", "return", "null", ";", "}", "else", "{", "return", "(", "SpawnListEntry", ")", "WeightedRandom", ".", "getRandomItem", "(", "rand", ",", "list", ")", ";", "}", "}", "public", "ChunkPosition", "findClosestStructure", "(", "String", "par1Str", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ")", "{", "return", "getChunkProvider", "(", ")", ".", "findClosestStructure", "(", "this", ",", "par1Str", ",", "par2", ",", "par3", ",", "par4", ")", ";", "}", "}", "</s>" ]
9,872
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "io", ".", "*", ";", "import", "java", ".", "util", ".", "List", ";", "import", "java", ".", "util", ".", "logging", ".", "Logger", ";", "public", "class", "SaveHandler", "implements", "IPlayerFileData", ",", "ISaveHandler", "{", "private", "static", "final", "Logger", "logger", "=", "Logger", ".", "getLogger", "(", "\"Minecraft\"", ")", ";", "private", "final", "File", "worldDirectory", ";", "private", "final", "File", "worldFile", ";", "private", "final", "File", "mapDataDir", ";", "private", "final", "long", "initializationTime", "=", "System", ".", "currentTimeMillis", "(", ")", ";", "private", "final", "String", "saveDirectoryName", ";", "public", "SaveHandler", "(", "File", "par1File", ",", "String", "par2Str", ",", "boolean", "par3", ")", "{", "worldDirectory", "=", "new", "File", "(", "par1File", ",", "par2Str", ")", ";", "worldDirectory", ".", "mkdirs", "(", ")", ";", "worldFile", "=", "new", "File", "(", "worldDirectory", ",", "\"players\"", ")", ";", "mapDataDir", "=", "new", "File", "(", "worldDirectory", ",", "\"data\"", ")", ";", "mapDataDir", ".", "mkdirs", "(", ")", ";", "saveDirectoryName", "=", "par2Str", ";", "if", "(", "par3", ")", "{", "worldFile", ".", "mkdirs", "(", ")", ";", "}", "setSessionLock", "(", ")", ";", "}", "private", "void", "setSessionLock", "(", ")", "{", "try", "{", "File", "file", "=", "new", "File", "(", "worldDirectory", ",", "\"session.lock\"", ")", ";", "DataOutputStream", "dataoutputstream", "=", "new", "DataOutputStream", "(", "new", "FileOutputStream", "(", "file", ")", ")", ";", "try", "{", "dataoutputstream", ".", "writeLong", "(", "initializationTime", ")", ";", "}", "finally", "{", "dataoutputstream", ".", "close", "(", ")", ";", "}", "}", "catch", "(", "IOException", "ioexception", ")", "{", "ioexception", ".", "printStackTrace", "(", ")", ";", "throw", "new", "RuntimeException", "(", "\"\"", ")", ";", "}", "}", "protected", "File", "getWorldDirectory", "(", ")", "{", "return", "worldDirectory", ";", "}", "public", "void", "checkSessionLock", "(", ")", "{", "try", "{", "File", "file", "=", "new", "File", "(", "worldDirectory", ",", "\"session.lock\"", ")", ";", "DataInputStream", "datainputstream", "=", "new", "DataInputStream", "(", "new", "FileInputStream", "(", "file", ")", ")", ";", "try", "{", "if", "(", "datainputstream", ".", "readLong", "(", ")", "!=", "initializationTime", ")", "{", "throw", "new", "MinecraftException", "(", "\"\"", ")", ";", "}", "}", "finally", "{", "datainputstream", ".", "close", "(", ")", ";", "}", "}", "catch", "(", "IOException", "ioexception", ")", "{", "throw", "new", "MinecraftException", "(", "\"\"", ")", ";", "}", "}", "public", "IChunkLoader", "getChunkLoader", "(", "WorldProvider", "par1WorldProvider", ")", "{", "throw", "new", "RuntimeException", "(", "\"\"", ")", ";", "}", "public", "WorldInfo", "loadWorldInfo", "(", ")", "{", "File", "file", "=", "new", "File", "(", "worldDirectory", ",", "\"level.dat\"", ")", ";", "if", "(", "file", ".", "exists", "(", ")", ")", "{", "try", "{", "NBTTagCompound", "nbttagcompound", "=", "CompressedStreamTools", ".", "readCompressed", "(", "new", "FileInputStream", "(", "file", ")", ")", ";", "NBTTagCompound", "nbttagcompound2", "=", "nbttagcompound", ".", "getCompoundTag", "(", "\"Data\"", ")", ";", "return", "new", "WorldInfo", "(", "nbttagcompound2", ")", ";", "}", "catch", "(", "Exception", "exception", ")", "{", "exception", ".", "printStackTrace", "(", ")", ";", "}", "}", "file", "=", "new", "File", "(", "worldDirectory", ",", "\"\"", ")", ";", "if", "(", "file", ".", "exists", "(", ")", ")", "{", "try", "{", "NBTTagCompound", "nbttagcompound1", "=", "CompressedStreamTools", ".", "readCompressed", "(", "new", "FileInputStream", "(", "file", ")", ")", ";", "NBTTagCompound", "nbttagcompound3", "=", "nbttagcompound1", ".", "getCompoundTag", "(", "\"Data\"", ")", ";", "return", "new", "WorldInfo", "(", "nbttagcompound3", ")", ";", "}", "catch", "(", "Exception", "exception1", ")", "{", "exception1", ".", "printStackTrace", "(", ")", ";", "}", "}", "return", "null", ";", "}", "public", "void", "saveWorldInfoAndPlayer", "(", "WorldInfo", "par1WorldInfo", ",", "List", "par2List", ")", "{", "NBTTagCompound", "nbttagcompound", "=", "par1WorldInfo", ".", "getNBTTagCompoundWithPlayers", "(", "par2List", ")", ";", "NBTTagCompound", "nbttagcompound1", "=", "new", "NBTTagCompound", "(", ")", ";", "nbttagcompound1", ".", "setTag", "(", "\"Data\"", ",", "nbttagcompound", ")", ";", "try", "{", "File", "file", "=", "new", "File", "(", "worldDirectory", ",", "\"\"", ")", ";", "File", "file1", "=", "new", "File", "(", "worldDirectory", ",", "\"\"", ")", ";", "File", "file2", "=", "new", "File", "(", "worldDirectory", ",", "\"level.dat\"", ")", ";", "CompressedStreamTools", ".", "writeCompressed", "(", "nbttagcompound1", ",", "new", "FileOutputStream", "(", "file", ")", ")", ";", "if", "(", "file1", ".", "exists", "(", ")", ")", "{", "file1", ".", "delete", "(", ")", ";", "}", "file2", ".", "renameTo", "(", "file1", ")", ";", "if", "(", "file2", ".", "exists", "(", ")", ")", "{", "file2", ".", "delete", "(", ")", ";", "}", "file", ".", "renameTo", "(", "file2", ")", ";", "if", "(", "file", ".", "exists", "(", ")", ")", "{", "file", ".", "delete", "(", ")", ";", "}", "}", "catch", "(", "Exception", "exception", ")", "{", "exception", ".", "printStackTrace", "(", ")", ";", "}", "}", "public", "void", "saveWorldInfo", "(", "WorldInfo", "par1WorldInfo", ")", "{", "NBTTagCompound", "nbttagcompound", "=", "par1WorldInfo", ".", "getNBTTagCompound", "(", ")", ";", "NBTTagCompound", "nbttagcompound1", "=", "new", "NBTTagCompound", "(", ")", ";", "nbttagcompound1", ".", "setTag", "(", "\"Data\"", ",", "nbttagcompound", ")", ";", "try", "{", "File", "file", "=", "new", "File", "(", "worldDirectory", ",", "\"\"", ")", ";", "File", "file1", "=", "new", "File", "(", "worldDirectory", ",", "\"\"", ")", ";", "File", "file2", "=", "new", "File", "(", "worldDirectory", ",", "\"level.dat\"", ")", ";", "CompressedStreamTools", ".", "writeCompressed", "(", "nbttagcompound1", ",", "new", "FileOutputStream", "(", "file", ")", ")", ";", "if", "(", "file1", ".", "exists", "(", ")", ")", "{", "file1", ".", "delete", "(", ")", ";", "}", "file2", ".", "renameTo", "(", "file1", ")", ";", "if", "(", "file2", ".", "exists", "(", ")", ")", "{", "file2", ".", "delete", "(", ")", ";", "}", "file", ".", "renameTo", "(", "file2", ")", ";", "if", "(", "file", ".", "exists", "(", ")", ")", "{", "file", ".", "delete", "(", ")", ";", "}", "}", "catch", "(", "Exception", "exception", ")", "{", "exception", ".", "printStackTrace", "(", ")", ";", "}", "}", "public", "void", "writePlayerData", "(", "EntityPlayer", "par1EntityPlayer", ")", "{", "try", "{", "NBTTagCompound", "nbttagcompound", "=", "new", "NBTTagCompound", "(", ")", ";", "par1EntityPlayer", ".", "writeToNBT", "(", "nbttagcompound", ")", ";", "File", "file", "=", "new", "File", "(", "worldFile", ",", "\"_tmp_.dat\"", ")", ";", "File", "file1", "=", "new", "File", "(", "worldFile", ",", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "par1EntityPlayer", ".", "username", ")", ".", "append", "(", "\".dat\"", ")", ".", "toString", "(", ")", ")", ";", "CompressedStreamTools", ".", "writeCompressed", "(", "nbttagcompound", ",", "new", "FileOutputStream", "(", "file", ")", ")", ";", "if", "(", "file1", ".", "exists", "(", ")", ")", "{", "file1", ".", "delete", "(", ")", ";", "}", "file", ".", "renameTo", "(", "file1", ")", ";", "}", "catch", "(", "Exception", "exception", ")", "{", "logger", ".", "warning", "(", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "\"\"", ")", ".", "append", "(", "par1EntityPlayer", ".", "username", ")", ".", "toString", "(", ")", ")", ";", "}", "}", "public", "void", "readPlayerData", "(", "EntityPlayer", "par1EntityPlayer", ")", "{", "NBTTagCompound", "nbttagcompound", "=", "getPlayerData", "(", "par1EntityPlayer", ".", "username", ")", ";", "if", "(", "nbttagcompound", "!=", "null", ")", "{", "par1EntityPlayer", ".", "readFromNBT", "(", "nbttagcompound", ")", ";", "}", "}", "public", "NBTTagCompound", "getPlayerData", "(", "String", "par1Str", ")", "{", "try", "{", "File", "file", "=", "new", "File", "(", "worldFile", ",", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "par1Str", ")", ".", "append", "(", "\".dat\"", ")", ".", "toString", "(", ")", ")", ";", "if", "(", "file", ".", "exists", "(", ")", ")", "{", "return", "CompressedStreamTools", ".", "readCompressed", "(", "new", "FileInputStream", "(", "file", ")", ")", ";", "}", "}", "catch", "(", "Exception", "exception", ")", "{", "logger", ".", "warning", "(", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "\"\"", ")", ".", "append", "(", "par1Str", ")", ".", "toString", "(", ")", ")", ";", "}", "return", "null", ";", "}", "public", "IPlayerFileData", "getPlayerNBTManager", "(", ")", "{", "return", "this", ";", "}", "public", "String", "[", "]", "func_52007_g", "(", ")", "{", "return", "worldFile", ".", "list", "(", ")", ";", "}", "public", "void", "func_22093_e", "(", ")", "{", "}", "public", "File", "getMapFileFromName", "(", "String", "par1Str", ")", "{", "return", "new", "File", "(", "mapDataDir", ",", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "par1Str", ")", ".", "append", "(", "\".dat\"", ")", ".", "toString", "(", ")", ")", ";", "}", "}", "</s>" ]
9,873
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "class", "SlotBrewingStandPotion", "extends", "Slot", "{", "private", "EntityPlayer", "player", ";", "final", "ContainerBrewingStand", "container", ";", "public", "SlotBrewingStandPotion", "(", "ContainerBrewingStand", "par1ContainerBrewingStand", ",", "EntityPlayer", "par2EntityPlayer", ",", "IInventory", "par3IInventory", ",", "int", "par4", ",", "int", "par5", ",", "int", "par6", ")", "{", "super", "(", "par3IInventory", ",", "par4", ",", "par5", ",", "par6", ")", ";", "container", "=", "par1ContainerBrewingStand", ";", "player", "=", "par2EntityPlayer", ";", "}", "public", "boolean", "isItemValid", "(", "ItemStack", "par1ItemStack", ")", "{", "return", "par1ItemStack", "!=", "null", "&&", "(", "par1ItemStack", ".", "itemID", "==", "Item", ".", "potion", ".", "shiftedIndex", "||", "par1ItemStack", ".", "itemID", "==", "Item", ".", "glassBottle", ".", "shiftedIndex", ")", ";", "}", "public", "int", "getSlotStackLimit", "(", ")", "{", "return", "1", ";", "}", "public", "void", "onPickupFromSlot", "(", "ItemStack", "par1ItemStack", ")", "{", "if", "(", "par1ItemStack", ".", "itemID", "==", "Item", ".", "potion", ".", "shiftedIndex", "&&", "par1ItemStack", ".", "getItemDamage", "(", ")", ">", "0", ")", "{", "player", ".", "addStat", "(", "AchievementList", ".", "potion", ",", "1", ")", ";", "}", "super", ".", "onPickupFromSlot", "(", "par1ItemStack", ")", ";", "}", "}", "</s>" ]
9,874
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "HashMap", ";", "import", "java", ".", "util", ".", "Map", ";", "public", "class", "FurnaceRecipes", "{", "private", "static", "final", "FurnaceRecipes", "smeltingBase", "=", "new", "FurnaceRecipes", "(", ")", ";", "private", "Map", "smeltingList", ";", "public", "static", "final", "FurnaceRecipes", "smelting", "(", ")", "{", "return", "smeltingBase", ";", "}", "private", "FurnaceRecipes", "(", ")", "{", "smeltingList", "=", "new", "HashMap", "(", ")", ";", "addSmelting", "(", "Block", ".", "oreIron", ".", "blockID", ",", "new", "ItemStack", "(", "Item", ".", "ingotIron", ")", ")", ";", "addSmelting", "(", "Block", ".", "oreGold", ".", "blockID", ",", "new", "ItemStack", "(", "Item", ".", "ingotGold", ")", ")", ";", "addSmelting", "(", "Block", ".", "oreDiamond", ".", "blockID", ",", "new", "ItemStack", "(", "Item", ".", "diamond", ")", ")", ";", "addSmelting", "(", "Block", ".", "sand", ".", "blockID", ",", "new", "ItemStack", "(", "Block", ".", "glass", ")", ")", ";", "addSmelting", "(", "Item", ".", "porkRaw", ".", "shiftedIndex", ",", "new", "ItemStack", "(", "Item", ".", "porkCooked", ")", ")", ";", "addSmelting", "(", "Item", ".", "beefRaw", ".", "shiftedIndex", ",", "new", "ItemStack", "(", "Item", ".", "beefCooked", ")", ")", ";", "addSmelting", "(", "Item", ".", "chickenRaw", ".", "shiftedIndex", ",", "new", "ItemStack", "(", "Item", ".", "chickenCooked", ")", ")", ";", "addSmelting", "(", "Item", ".", "fishRaw", ".", "shiftedIndex", ",", "new", "ItemStack", "(", "Item", ".", "fishCooked", ")", ")", ";", "addSmelting", "(", "Block", ".", "cobblestone", ".", "blockID", ",", "new", "ItemStack", "(", "Block", ".", "stone", ")", ")", ";", "addSmelting", "(", "Item", ".", "clay", ".", "shiftedIndex", ",", "new", "ItemStack", "(", "Item", ".", "brick", ")", ")", ";", "addSmelting", "(", "Block", ".", "cactus", ".", "blockID", ",", "new", "ItemStack", "(", "Item", ".", "dyePowder", ",", "1", ",", "2", ")", ")", ";", "addSmelting", "(", "Block", ".", "wood", ".", "blockID", ",", "new", "ItemStack", "(", "Item", ".", "coal", ",", "1", ",", "1", ")", ")", ";", "addSmelting", "(", "Block", ".", "oreCoal", ".", "blockID", ",", "new", "ItemStack", "(", "Item", ".", "coal", ")", ")", ";", "addSmelting", "(", "Block", ".", "oreRedstone", ".", "blockID", ",", "new", "ItemStack", "(", "Item", ".", "redstone", ")", ")", ";", "addSmelting", "(", "Block", ".", "oreLapis", ".", "blockID", ",", "new", "ItemStack", "(", "Item", ".", "dyePowder", ",", "1", ",", "4", ")", ")", ";", "}", "public", "void", "addSmelting", "(", "int", "par1", ",", "ItemStack", "par2ItemStack", ")", "{", "smeltingList", ".", "put", "(", "Integer", ".", "valueOf", "(", "par1", ")", ",", "par2ItemStack", ")", ";", "}", "public", "ItemStack", "getSmeltingResult", "(", "int", "par1", ")", "{", "return", "(", "ItemStack", ")", "smeltingList", ".", "get", "(", "Integer", ".", "valueOf", "(", "par1", ")", ")", ";", "}", "public", "Map", "getSmeltingList", "(", ")", "{", "return", "smeltingList", ";", "}", "}", "</s>" ]
9,875
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "public", "class", "EnchantmentFireAspect", "extends", "Enchantment", "{", "protected", "EnchantmentFireAspect", "(", "int", "par1", ",", "int", "par2", ")", "{", "super", "(", "par1", ",", "par2", ",", "EnumEnchantmentType", ".", "weapon", ")", ";", "setName", "(", "\"fire\"", ")", ";", "}", "public", "int", "getMinEnchantability", "(", "int", "par1", ")", "{", "return", "10", "+", "20", "*", "(", "par1", "-", "1", ")", ";", "}", "public", "int", "getMaxEnchantability", "(", "int", "par1", ")", "{", "return", "super", ".", "getMinEnchantability", "(", "par1", ")", "+", "50", ";", "}", "public", "int", "getMaxLevel", "(", ")", "{", "return", "2", ";", "}", "}", "</s>" ]
9,876
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "Random", ";", "public", "class", "BlockNetherStalk", "extends", "BlockFlower", "{", "protected", "BlockNetherStalk", "(", "int", "par1", ")", "{", "super", "(", "par1", ",", "226", ")", ";", "setTickRandomly", "(", "true", ")", ";", "float", "f", "=", "0.5F", ";", "setBlockBounds", "(", "0.5F", "-", "f", ",", "0.0F", ",", "0.5F", "-", "f", ",", "0.5F", "+", "f", ",", "0.25F", ",", "0.5F", "+", "f", ")", ";", "}", "protected", "boolean", "canThisPlantGrowOnThisBlockID", "(", "int", "par1", ")", "{", "return", "par1", "==", "Block", ".", "slowSand", ".", "blockID", ";", "}", "public", "boolean", "canBlockStay", "(", "World", "par1World", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ")", "{", "return", "canThisPlantGrowOnThisBlockID", "(", "par1World", ".", "getBlockId", "(", "par2", ",", "par3", "-", "1", ",", "par4", ")", ")", ";", "}", "public", "void", "updateTick", "(", "World", "par1World", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "Random", "par5Random", ")", "{", "int", "i", "=", "par1World", ".", "getBlockMetadata", "(", "par2", ",", "par3", ",", "par4", ")", ";", "if", "(", "i", "<", "3", ")", "{", "BiomeGenBase", "biomegenbase", "=", "par1World", ".", "getBiomeGenForCoords", "(", "par2", ",", "par4", ")", ";", "if", "(", "(", "biomegenbase", "instanceof", "BiomeGenHell", ")", "&&", "par5Random", ".", "nextInt", "(", "10", ")", "==", "0", ")", "{", "i", "++", ";", "par1World", ".", "setBlockMetadataWithNotify", "(", "par2", ",", "par3", ",", "par4", ",", "i", ")", ";", "}", "}", "super", ".", "updateTick", "(", "par1World", ",", "par2", ",", "par3", ",", "par4", ",", "par5Random", ")", ";", "}", "public", "int", "getBlockTextureFromSideAndMetadata", "(", "int", "par1", ",", "int", "par2", ")", "{", "if", "(", "par2", ">=", "3", ")", "{", "return", "blockIndexInTexture", "+", "2", ";", "}", "if", "(", "par2", ">", "0", ")", "{", "return", "blockIndexInTexture", "+", "1", ";", "}", "else", "{", "return", "blockIndexInTexture", ";", "}", "}", "public", "int", "getRenderType", "(", ")", "{", "return", "6", ";", "}", "public", "void", "dropBlockAsItemWithChance", "(", "World", "par1World", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "int", "par5", ",", "float", "par6", ",", "int", "par7", ")", "{", "if", "(", "par1World", ".", "isRemote", ")", "{", "return", ";", "}", "int", "i", "=", "1", ";", "if", "(", "par5", ">=", "3", ")", "{", "i", "=", "2", "+", "par1World", ".", "rand", ".", "nextInt", "(", "3", ")", ";", "if", "(", "par7", ">", "0", ")", "{", "i", "+=", "par1World", ".", "rand", ".", "nextInt", "(", "par7", "+", "1", ")", ";", "}", "}", "for", "(", "int", "j", "=", "0", ";", "j", "<", "i", ";", "j", "++", ")", "{", "dropBlockAsItem_do", "(", "par1World", ",", "par2", ",", "par3", ",", "par4", ",", "new", "ItemStack", "(", "Item", ".", "netherStalkSeeds", ")", ")", ";", "}", "}", "public", "int", "idDropped", "(", "int", "par1", ",", "Random", "par2Random", ",", "int", "par3", ")", "{", "return", "0", ";", "}", "public", "int", "quantityDropped", "(", "Random", "par1Random", ")", "{", "return", "0", ";", "}", "}", "</s>" ]
9,877
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "Random", ";", "public", "class", "WorldGenHellLava", "extends", "WorldGenerator", "{", "private", "int", "hellLavaID", ";", "public", "WorldGenHellLava", "(", "int", "par1", ")", "{", "hellLavaID", "=", "par1", ";", "}", "public", "boolean", "generate", "(", "World", "par1World", ",", "Random", "par2Random", ",", "int", "par3", ",", "int", "par4", ",", "int", "par5", ")", "{", "if", "(", "par1World", ".", "getBlockId", "(", "par3", ",", "par4", "+", "1", ",", "par5", ")", "!=", "Block", ".", "netherrack", ".", "blockID", ")", "{", "return", "false", ";", "}", "if", "(", "par1World", ".", "getBlockId", "(", "par3", ",", "par4", ",", "par5", ")", "!=", "0", "&&", "par1World", ".", "getBlockId", "(", "par3", ",", "par4", ",", "par5", ")", "!=", "Block", ".", "netherrack", ".", "blockID", ")", "{", "return", "false", ";", "}", "int", "i", "=", "0", ";", "if", "(", "par1World", ".", "getBlockId", "(", "par3", "-", "1", ",", "par4", ",", "par5", ")", "==", "Block", ".", "netherrack", ".", "blockID", ")", "{", "i", "++", ";", "}", "if", "(", "par1World", ".", "getBlockId", "(", "par3", "+", "1", ",", "par4", ",", "par5", ")", "==", "Block", ".", "netherrack", ".", "blockID", ")", "{", "i", "++", ";", "}", "if", "(", "par1World", ".", "getBlockId", "(", "par3", ",", "par4", ",", "par5", "-", "1", ")", "==", "Block", ".", "netherrack", ".", "blockID", ")", "{", "i", "++", ";", "}", "if", "(", "par1World", ".", "getBlockId", "(", "par3", ",", "par4", ",", "par5", "+", "1", ")", "==", "Block", ".", "netherrack", ".", "blockID", ")", "{", "i", "++", ";", "}", "if", "(", "par1World", ".", "getBlockId", "(", "par3", ",", "par4", "-", "1", ",", "par5", ")", "==", "Block", ".", "netherrack", ".", "blockID", ")", "{", "i", "++", ";", "}", "int", "j", "=", "0", ";", "if", "(", "par1World", ".", "isAirBlock", "(", "par3", "-", "1", ",", "par4", ",", "par5", ")", ")", "{", "j", "++", ";", "}", "if", "(", "par1World", ".", "isAirBlock", "(", "par3", "+", "1", ",", "par4", ",", "par5", ")", ")", "{", "j", "++", ";", "}", "if", "(", "par1World", ".", "isAirBlock", "(", "par3", ",", "par4", ",", "par5", "-", "1", ")", ")", "{", "j", "++", ";", "}", "if", "(", "par1World", ".", "isAirBlock", "(", "par3", ",", "par4", ",", "par5", "+", "1", ")", ")", "{", "j", "++", ";", "}", "if", "(", "par1World", ".", "isAirBlock", "(", "par3", ",", "par4", "-", "1", ",", "par5", ")", ")", "{", "j", "++", ";", "}", "if", "(", "i", "==", "4", "&&", "j", "==", "1", ")", "{", "par1World", ".", "setBlockWithNotify", "(", "par3", ",", "par4", ",", "par5", ",", "hellLavaID", ")", ";", "par1World", ".", "scheduledUpdatesAreImmediate", "=", "true", ";", "Block", ".", "blocksList", "[", "hellLavaID", "]", ".", "updateTick", "(", "par1World", ",", "par3", ",", "par4", ",", "par5", ",", "par2Random", ")", ";", "par1World", ".", "scheduledUpdatesAreImmediate", "=", "false", ";", "}", "return", "true", ";", "}", "}", "</s>" ]
9,878
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "Random", ";", "public", "class", "BlockGrass", "extends", "Block", "{", "protected", "BlockGrass", "(", "int", "par1", ")", "{", "super", "(", "par1", ",", "Material", ".", "grass", ")", ";", "blockIndexInTexture", "=", "3", ";", "setTickRandomly", "(", "true", ")", ";", "}", "public", "int", "getBlockTextureFromSideAndMetadata", "(", "int", "par1", ",", "int", "par2", ")", "{", "if", "(", "par1", "==", "1", ")", "{", "return", "0", ";", "}", "return", "par1", "!=", "0", "?", "3", ":", "2", ";", "}", "public", "void", "updateTick", "(", "World", "par1World", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "Random", "par5Random", ")", "{", "if", "(", "par1World", ".", "isRemote", ")", "{", "return", ";", "}", "if", "(", "par1World", ".", "getBlockLightValue", "(", "par2", ",", "par3", "+", "1", ",", "par4", ")", "<", "4", "&&", "Block", ".", "lightOpacity", "[", "par1World", ".", "getBlockId", "(", "par2", ",", "par3", "+", "1", ",", "par4", ")", "]", ">", "2", ")", "{", "par1World", ".", "setBlockWithNotify", "(", "par2", ",", "par3", ",", "par4", ",", "Block", ".", "dirt", ".", "blockID", ")", ";", "}", "else", "if", "(", "par1World", ".", "getBlockLightValue", "(", "par2", ",", "par3", "+", "1", ",", "par4", ")", ">=", "9", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "4", ";", "i", "++", ")", "{", "int", "j", "=", "(", "par2", "+", "par5Random", ".", "nextInt", "(", "3", ")", ")", "-", "1", ";", "int", "k", "=", "(", "par3", "+", "par5Random", ".", "nextInt", "(", "5", ")", ")", "-", "3", ";", "int", "l", "=", "(", "par4", "+", "par5Random", ".", "nextInt", "(", "3", ")", ")", "-", "1", ";", "int", "i1", "=", "par1World", ".", "getBlockId", "(", "j", ",", "k", "+", "1", ",", "l", ")", ";", "if", "(", "par1World", ".", "getBlockId", "(", "j", ",", "k", ",", "l", ")", "==", "Block", ".", "dirt", ".", "blockID", "&&", "par1World", ".", "getBlockLightValue", "(", "j", ",", "k", "+", "1", ",", "l", ")", ">=", "4", "&&", "Block", ".", "lightOpacity", "[", "i1", "]", "<=", "2", ")", "{", "par1World", ".", "setBlockWithNotify", "(", "j", ",", "k", ",", "l", ",", "Block", ".", "grass", ".", "blockID", ")", ";", "}", "}", "}", "}", "public", "int", "idDropped", "(", "int", "par1", ",", "Random", "par2Random", ",", "int", "par3", ")", "{", "return", "Block", ".", "dirt", ".", "idDropped", "(", "0", ",", "par2Random", ",", "par3", ")", ";", "}", "}", "</s>" ]
9,879
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "public", "class", "StatCollector", "{", "private", "static", "StringTranslate", "localizedName", "=", "StringTranslate", ".", "getInstance", "(", ")", ";", "public", "StatCollector", "(", ")", "{", "}", "public", "static", "String", "translateToLocal", "(", "String", "par0Str", ")", "{", "return", "localizedName", ".", "translateKey", "(", "par0Str", ")", ";", "}", "public", "static", "String", "translateToLocalFormatted", "(", "String", "par0Str", ",", "Object", "par1ArrayOfObj", "[", "]", ")", "{", "return", "localizedName", ".", "translateKeyFormat", "(", "par0Str", ",", "par1ArrayOfObj", ")", ";", "}", "}", "</s>" ]
9,880
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "io", ".", "*", ";", "import", "java", ".", "util", ".", "ArrayList", ";", "import", "java", ".", "util", ".", "Iterator", ";", "public", "class", "AnvilSaveConverter", "extends", "SaveFormatOld", "{", "public", "AnvilSaveConverter", "(", "File", "par1File", ")", "{", "super", "(", "par1File", ")", ";", "}", "protected", "int", "func_48495_a", "(", ")", "{", "return", "19133", ";", "}", "public", "ISaveHandler", "getSaveLoader", "(", "String", "par1Str", ",", "boolean", "par2", ")", "{", "return", "new", "AnvilSaveHandler", "(", "savesDirectory", ",", "par1Str", ",", "par2", ")", ";", "}", "public", "boolean", "isOldMapFormat", "(", "String", "par1Str", ")", "{", "WorldInfo", "worldinfo", "=", "getWorldInfo", "(", "par1Str", ")", ";", "return", "worldinfo", "!=", "null", "&&", "worldinfo", ".", "getSaveVersion", "(", ")", "!=", "func_48495_a", "(", ")", ";", "}", "public", "boolean", "convertMapFormat", "(", "String", "par1Str", ",", "IProgressUpdate", "par2IProgressUpdate", ")", "{", "par2IProgressUpdate", ".", "setLoadingProgress", "(", "0", ")", ";", "ArrayList", "arraylist", "=", "new", "ArrayList", "(", ")", ";", "ArrayList", "arraylist1", "=", "new", "ArrayList", "(", ")", ";", "ArrayList", "arraylist2", "=", "new", "ArrayList", "(", ")", ";", "File", "file", "=", "new", "File", "(", "savesDirectory", ",", "par1Str", ")", ";", "File", "file1", "=", "new", "File", "(", "file", ",", "\"DIM-1\"", ")", ";", "File", "file2", "=", "new", "File", "(", "file", ",", "\"DIM1\"", ")", ";", "System", ".", "out", ".", "println", "(", "\"\"", ")", ";", "func_48499_a", "(", "file", ",", "arraylist", ")", ";", "if", "(", "file1", ".", "exists", "(", ")", ")", "{", "func_48499_a", "(", "file1", ",", "arraylist1", ")", ";", "}", "if", "(", "file2", ".", "exists", "(", ")", ")", "{", "func_48499_a", "(", "file2", ",", "arraylist2", ")", ";", "}", "int", "i", "=", "arraylist", ".", "size", "(", ")", "+", "arraylist1", ".", "size", "(", ")", "+", "arraylist2", ".", "size", "(", ")", ";", "System", ".", "out", ".", "println", "(", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "\"\"", ")", ".", "append", "(", "i", ")", ".", "toString", "(", ")", ")", ";", "WorldInfo", "worldinfo", "=", "getWorldInfo", "(", "par1Str", ")", ";", "Object", "obj", "=", "null", ";", "if", "(", "worldinfo", ".", "getTerrainType", "(", ")", "==", "WorldType", ".", "FLAT", ")", "{", "obj", "=", "new", "WorldChunkManagerHell", "(", "BiomeGenBase", ".", "plains", ",", "0.5F", ",", "0.5F", ")", ";", "}", "else", "{", "obj", "=", "new", "WorldChunkManager", "(", "worldinfo", ".", "getSeed", "(", ")", ",", "worldinfo", ".", "getTerrainType", "(", ")", ")", ";", "}", "func_48497_a", "(", "new", "File", "(", "file", ",", "\"region\"", ")", ",", "arraylist", ",", "(", "(", "WorldChunkManager", ")", "(", "obj", ")", ")", ",", "0", ",", "i", ",", "par2IProgressUpdate", ")", ";", "func_48497_a", "(", "new", "File", "(", "file1", ",", "\"region\"", ")", ",", "arraylist1", ",", "new", "WorldChunkManagerHell", "(", "BiomeGenBase", ".", "hell", ",", "1.0F", ",", "0.0F", ")", ",", "arraylist", ".", "size", "(", ")", ",", "i", ",", "par2IProgressUpdate", ")", ";", "func_48497_a", "(", "new", "File", "(", "file2", ",", "\"region\"", ")", ",", "arraylist2", ",", "new", "WorldChunkManagerHell", "(", "BiomeGenBase", ".", "sky", ",", "0.5F", ",", "0.0F", ")", ",", "arraylist", ".", "size", "(", ")", "+", "arraylist1", ".", "size", "(", ")", ",", "i", ",", "par2IProgressUpdate", ")", ";", "worldinfo", ".", "setSaveVersion", "(", "19133", ")", ";", "if", "(", "worldinfo", ".", "getTerrainType", "(", ")", "==", "WorldType", ".", "DEFAULT_1_1", ")", "{", "worldinfo", ".", "setTerrainType", "(", "WorldType", ".", "DEFAULT", ")", ";", "}", "func_48498_c", "(", "par1Str", ")", ";", "ISaveHandler", "isavehandler", "=", "getSaveLoader", "(", "par1Str", ",", "false", ")", ";", "isavehandler", ".", "saveWorldInfo", "(", "worldinfo", ")", ";", "return", "true", ";", "}", "private", "void", "func_48498_c", "(", "String", "par1Str", ")", "{", "File", "file", "=", "new", "File", "(", "savesDirectory", ",", "par1Str", ")", ";", "if", "(", "!", "file", ".", "exists", "(", ")", ")", "{", "System", ".", "out", ".", "println", "(", "\"\"", ")", ";", "return", ";", "}", "File", "file1", "=", "new", "File", "(", "file", ",", "\"level.dat\"", ")", ";", "if", "(", "!", "file1", ".", "exists", "(", ")", ")", "{", "System", ".", "out", ".", "println", "(", "\"\"", ")", ";", "return", ";", "}", "File", "file2", "=", "new", "File", "(", "file", ",", "\"\"", ")", ";", "if", "(", "!", "file1", ".", "renameTo", "(", "file2", ")", ")", "{", "System", ".", "out", ".", "println", "(", "\"\"", ")", ";", "}", "}", "private", "void", "func_48497_a", "(", "File", "par1File", ",", "ArrayList", "par2ArrayList", ",", "WorldChunkManager", "par3WorldChunkManager", ",", "int", "par4", ",", "int", "par5", ",", "IProgressUpdate", "par6IProgressUpdate", ")", "{", "int", "i", ";", "for", "(", "Iterator", "iterator", "=", "par2ArrayList", ".", "iterator", "(", ")", ";", "iterator", ".", "hasNext", "(", ")", ";", "par6IProgressUpdate", ".", "setLoadingProgress", "(", "i", ")", ")", "{", "File", "file", "=", "(", "File", ")", "iterator", ".", "next", "(", ")", ";", "func_48496_a", "(", "par1File", ",", "file", ",", "par3WorldChunkManager", ",", "par4", ",", "par5", ",", "par6IProgressUpdate", ")", ";", "par4", "++", ";", "i", "=", "(", "int", ")", "Math", ".", "round", "(", "(", "100D", "*", "(", "double", ")", "par4", ")", "/", "(", "double", ")", "par5", ")", ";", "}", "}", "private", "void", "func_48496_a", "(", "File", "par1File", ",", "File", "par2File", ",", "WorldChunkManager", "par3WorldChunkManager", ",", "int", "par4", ",", "int", "par5", ",", "IProgressUpdate", "par6IProgressUpdate", ")", "{", "try", "{", "String", "s", "=", "par2File", ".", "getName", "(", ")", ";", "RegionFile", "regionfile", "=", "new", "RegionFile", "(", "par2File", ")", ";", "RegionFile", "regionfile1", "=", "new", "RegionFile", "(", "new", "File", "(", "par1File", ",", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "s", ".", "substring", "(", "0", ",", "s", ".", "length", "(", ")", "-", "\".mcr\"", ".", "length", "(", ")", ")", ")", ".", "append", "(", "\".mca\"", ")", ".", "toString", "(", ")", ")", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "32", ";", "i", "++", ")", "{", "for", "(", "int", "j", "=", "0", ";", "j", "<", "32", ";", "j", "++", ")", "{", "if", "(", "!", "regionfile", ".", "isChunkSaved", "(", "i", ",", "j", ")", "||", "regionfile1", ".", "isChunkSaved", "(", "i", ",", "j", ")", ")", "{", "continue", ";", "}", "DataInputStream", "datainputstream", "=", "regionfile", ".", "getChunkDataInputStream", "(", "i", ",", "j", ")", ";", "if", "(", "datainputstream", "==", "null", ")", "{", "System", ".", "out", ".", "println", "(", "\"\"", ")", ";", "}", "else", "{", "NBTTagCompound", "nbttagcompound", "=", "CompressedStreamTools", ".", "read", "(", "datainputstream", ")", ";", "datainputstream", ".", "close", "(", ")", ";", "NBTTagCompound", "nbttagcompound1", "=", "nbttagcompound", ".", "getCompoundTag", "(", "\"Level\"", ")", ";", "AnvilConverterData", "anvilconverterdata", "=", "ChunkLoader", ".", "load", "(", "nbttagcompound1", ")", ";", "NBTTagCompound", "nbttagcompound2", "=", "new", "NBTTagCompound", "(", ")", ";", "NBTTagCompound", "nbttagcompound3", "=", "new", "NBTTagCompound", "(", ")", ";", "nbttagcompound2", ".", "setTag", "(", "\"Level\"", ",", "nbttagcompound3", ")", ";", "ChunkLoader", ".", "convertToAnvilFormat", "(", "anvilconverterdata", ",", "nbttagcompound3", ",", "par3WorldChunkManager", ")", ";", "DataOutputStream", "dataoutputstream", "=", "regionfile1", ".", "getChunkDataOutputStream", "(", "i", ",", "j", ")", ";", "CompressedStreamTools", ".", "write", "(", "nbttagcompound2", ",", "dataoutputstream", ")", ";", "dataoutputstream", ".", "close", "(", ")", ";", "}", "}", "int", "k", "=", "(", "int", ")", "Math", ".", "round", "(", "(", "100D", "*", "(", "double", ")", "(", "par4", "*", "1024", ")", ")", "/", "(", "double", ")", "(", "par5", "*", "1024", ")", ")", ";", "int", "l", "=", "(", "int", ")", "Math", ".", "round", "(", "(", "100D", "*", "(", "double", ")", "(", "(", "i", "+", "1", ")", "*", "32", "+", "par4", "*", "1024", ")", ")", "/", "(", "double", ")", "(", "par5", "*", "1024", ")", ")", ";", "if", "(", "l", ">", "k", ")", "{", "par6IProgressUpdate", ".", "setLoadingProgress", "(", "l", ")", ";", "}", "}", "regionfile", ".", "close", "(", ")", ";", "regionfile1", ".", "close", "(", ")", ";", "}", "catch", "(", "IOException", "ioexception", ")", "{", "ioexception", ".", "printStackTrace", "(", ")", ";", "}", "}", "private", "void", "func_48499_a", "(", "File", "par1File", ",", "ArrayList", "par2ArrayList", ")", "{", "File", "file", "=", "new", "File", "(", "par1File", ",", "\"region\"", ")", ";", "File", "afile", "[", "]", "=", "file", ".", "listFiles", "(", "new", "AnvilSaveConverterFileFilter", "(", "this", ")", ")", ";", "if", "(", "afile", "!=", "null", ")", "{", "File", "afile1", "[", "]", "=", "afile", ";", "int", "i", "=", "afile1", ".", "length", ";", "for", "(", "int", "j", "=", "0", ";", "j", "<", "i", ";", "j", "++", ")", "{", "File", "file1", "=", "afile1", "[", "j", "]", ";", "par2ArrayList", ".", "add", "(", "file1", ")", ";", "}", "}", "}", "}", "</s>" ]
9,881
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "HashMap", ";", "import", "java", ".", "util", ".", "Map", ";", "public", "class", "PacketCount", "{", "public", "static", "boolean", "allowCounting", "=", "true", ";", "private", "static", "final", "Map", "packetCountForID", "=", "new", "HashMap", "(", ")", ";", "private", "static", "final", "Map", "sizeCountForID", "=", "new", "HashMap", "(", ")", ";", "private", "static", "final", "Object", "lock", "=", "new", "Object", "(", ")", ";", "public", "PacketCount", "(", ")", "{", "}", "public", "static", "void", "countPacket", "(", "int", "par0", ",", "long", "par1", ")", "{", "if", "(", "!", "allowCounting", ")", "{", "return", ";", "}", "synchronized", "(", "lock", ")", "{", "if", "(", "packetCountForID", ".", "containsKey", "(", "Integer", ".", "valueOf", "(", "par0", ")", ")", ")", "{", "packetCountForID", ".", "put", "(", "Integer", ".", "valueOf", "(", "par0", ")", ",", "Long", ".", "valueOf", "(", "(", "(", "Long", ")", "packetCountForID", ".", "get", "(", "Integer", ".", "valueOf", "(", "par0", ")", ")", ")", ".", "longValue", "(", ")", "+", "1L", ")", ")", ";", "sizeCountForID", ".", "put", "(", "Integer", ".", "valueOf", "(", "par0", ")", ",", "Long", ".", "valueOf", "(", "(", "(", "Long", ")", "sizeCountForID", ".", "get", "(", "Integer", ".", "valueOf", "(", "par0", ")", ")", ")", ".", "longValue", "(", ")", "+", "par1", ")", ")", ";", "}", "else", "{", "packetCountForID", ".", "put", "(", "Integer", ".", "valueOf", "(", "par0", ")", ",", "Long", ".", "valueOf", "(", "1L", ")", ")", ";", "sizeCountForID", ".", "put", "(", "Integer", ".", "valueOf", "(", "par0", ")", ",", "Long", ".", "valueOf", "(", "par1", ")", ")", ";", "}", "}", "}", "}", "</s>" ]
9,882
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "*", ";", "public", "abstract", "class", "Container", "{", "public", "List", "inventoryItemStacks", ";", "public", "List", "inventorySlots", ";", "public", "int", "windowId", ";", "private", "short", "transactionID", ";", "protected", "List", "crafters", ";", "private", "Set", "field_20131_b", ";", "public", "Container", "(", ")", "{", "inventoryItemStacks", "=", "new", "ArrayList", "(", ")", ";", "inventorySlots", "=", "new", "ArrayList", "(", ")", ";", "windowId", "=", "0", ";", "transactionID", "=", "0", ";", "crafters", "=", "new", "ArrayList", "(", ")", ";", "field_20131_b", "=", "new", "HashSet", "(", ")", ";", "}", "protected", "void", "addSlot", "(", "Slot", "par1Slot", ")", "{", "par1Slot", ".", "slotNumber", "=", "inventorySlots", ".", "size", "(", ")", ";", "inventorySlots", ".", "add", "(", "par1Slot", ")", ";", "inventoryItemStacks", ".", "add", "(", "null", ")", ";", "}", "public", "void", "onCraftGuiOpened", "(", "ICrafting", "par1ICrafting", ")", "{", "if", "(", "crafters", ".", "contains", "(", "par1ICrafting", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"\"", ")", ";", "}", "else", "{", "crafters", ".", "add", "(", "par1ICrafting", ")", ";", "par1ICrafting", ".", "updateCraftingInventory", "(", "this", ",", "func_28127_b", "(", ")", ")", ";", "updateCraftingResults", "(", ")", ";", "return", ";", "}", "}", "public", "List", "func_28127_b", "(", ")", "{", "ArrayList", "arraylist", "=", "new", "ArrayList", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "inventorySlots", ".", "size", "(", ")", ";", "i", "++", ")", "{", "arraylist", ".", "add", "(", "(", "(", "Slot", ")", "inventorySlots", ".", "get", "(", "i", ")", ")", ".", "getStack", "(", ")", ")", ";", "}", "return", "arraylist", ";", "}", "public", "void", "updateCraftingResults", "(", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "inventorySlots", ".", "size", "(", ")", ";", "i", "++", ")", "{", "ItemStack", "itemstack", "=", "(", "(", "Slot", ")", "inventorySlots", ".", "get", "(", "i", ")", ")", ".", "getStack", "(", ")", ";", "ItemStack", "itemstack1", "=", "(", "ItemStack", ")", "inventoryItemStacks", ".", "get", "(", "i", ")", ";", "if", "(", "ItemStack", ".", "areItemStacksEqual", "(", "itemstack1", ",", "itemstack", ")", ")", "{", "continue", ";", "}", "itemstack1", "=", "itemstack", "!=", "null", "?", "itemstack", ".", "copy", "(", ")", ":", "null", ";", "inventoryItemStacks", ".", "set", "(", "i", ",", "itemstack1", ")", ";", "for", "(", "int", "j", "=", "0", ";", "j", "<", "crafters", ".", "size", "(", ")", ";", "j", "++", ")", "{", "(", "(", "ICrafting", ")", "crafters", ".", "get", "(", "j", ")", ")", ".", "updateCraftingInventorySlot", "(", "this", ",", "i", ",", "itemstack1", ")", ";", "}", "}", "}", "public", "boolean", "enchantItem", "(", "EntityPlayer", "par1EntityPlayer", ",", "int", "par2", ")", "{", "return", "false", ";", "}", "public", "Slot", "func_20127_a", "(", "IInventory", "par1IInventory", ",", "int", "par2", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "inventorySlots", ".", "size", "(", ")", ";", "i", "++", ")", "{", "Slot", "slot", "=", "(", "Slot", ")", "inventorySlots", ".", "get", "(", "i", ")", ";", "if", "(", "slot", ".", "isHere", "(", "par1IInventory", ",", "par2", ")", ")", "{", "return", "slot", ";", "}", "}", "return", "null", ";", "}", "public", "Slot", "getSlot", "(", "int", "par1", ")", "{", "return", "(", "Slot", ")", "inventorySlots", ".", "get", "(", "par1", ")", ";", "}", "public", "ItemStack", "transferStackInSlot", "(", "int", "par1", ")", "{", "Slot", "slot", "=", "(", "Slot", ")", "inventorySlots", ".", "get", "(", "par1", ")", ";", "if", "(", "slot", "!=", "null", ")", "{", "return", "slot", ".", "getStack", "(", ")", ";", "}", "else", "{", "return", "null", ";", "}", "}", "public", "ItemStack", "slotClick", "(", "int", "par1", ",", "int", "par2", ",", "boolean", "par3", ",", "EntityPlayer", "par4EntityPlayer", ")", "{", "ItemStack", "itemstack", "=", "null", ";", "if", "(", "par2", ">", "1", ")", "{", "return", "null", ";", "}", "if", "(", "par2", "==", "0", "||", "par2", "==", "1", ")", "{", "InventoryPlayer", "inventoryplayer", "=", "par4EntityPlayer", ".", "inventory", ";", "if", "(", "par1", "==", "-", "999", ")", "{", "if", "(", "inventoryplayer", ".", "getItemStack", "(", ")", "!=", "null", "&&", "par1", "==", "-", "999", ")", "{", "if", "(", "par2", "==", "0", ")", "{", "par4EntityPlayer", ".", "dropPlayerItem", "(", "inventoryplayer", ".", "getItemStack", "(", ")", ")", ";", "inventoryplayer", ".", "setItemStack", "(", "null", ")", ";", "}", "if", "(", "par2", "==", "1", ")", "{", "par4EntityPlayer", ".", "dropPlayerItem", "(", "inventoryplayer", ".", "getItemStack", "(", ")", ".", "splitStack", "(", "1", ")", ")", ";", "if", "(", "inventoryplayer", ".", "getItemStack", "(", ")", ".", "stackSize", "==", "0", ")", "{", "inventoryplayer", ".", "setItemStack", "(", "null", ")", ";", "}", "}", "}", "}", "else", "if", "(", "par3", ")", "{", "ItemStack", "itemstack1", "=", "transferStackInSlot", "(", "par1", ")", ";", "if", "(", "itemstack1", "!=", "null", ")", "{", "int", "i", "=", "itemstack1", ".", "itemID", ";", "itemstack", "=", "itemstack1", ".", "copy", "(", ")", ";", "Slot", "slot1", "=", "(", "Slot", ")", "inventorySlots", ".", "get", "(", "par1", ")", ";", "if", "(", "slot1", "!=", "null", "&&", "slot1", ".", "getStack", "(", ")", "!=", "null", "&&", "slot1", ".", "getStack", "(", ")", ".", "itemID", "==", "i", ")", "{", "retrySlotClick", "(", "par1", ",", "par2", ",", "par3", ",", "par4EntityPlayer", ")", ";", "}", "}", "}", "else", "{", "if", "(", "par1", "<", "0", ")", "{", "return", "null", ";", "}", "Slot", "slot", "=", "(", "Slot", ")", "inventorySlots", ".", "get", "(", "par1", ")", ";", "if", "(", "slot", "!=", "null", ")", "{", "slot", ".", "onSlotChanged", "(", ")", ";", "ItemStack", "itemstack2", "=", "slot", ".", "getStack", "(", ")", ";", "ItemStack", "itemstack4", "=", "inventoryplayer", ".", "getItemStack", "(", ")", ";", "if", "(", "itemstack2", "!=", "null", ")", "{", "itemstack", "=", "itemstack2", ".", "copy", "(", ")", ";", "}", "if", "(", "itemstack2", "==", "null", ")", "{", "if", "(", "itemstack4", "!=", "null", "&&", "slot", ".", "isItemValid", "(", "itemstack4", ")", ")", "{", "int", "j", "=", "par2", "!=", "0", "?", "1", ":", "itemstack4", ".", "stackSize", ";", "if", "(", "j", ">", "slot", ".", "getSlotStackLimit", "(", ")", ")", "{", "j", "=", "slot", ".", "getSlotStackLimit", "(", ")", ";", "}", "slot", ".", "putStack", "(", "itemstack4", ".", "splitStack", "(", "j", ")", ")", ";", "if", "(", "itemstack4", ".", "stackSize", "==", "0", ")", "{", "inventoryplayer", ".", "setItemStack", "(", "null", ")", ";", "}", "}", "}", "else", "if", "(", "itemstack4", "==", "null", ")", "{", "int", "k", "=", "par2", "!=", "0", "?", "(", "itemstack2", ".", "stackSize", "+", "1", ")", "/", "2", ":", "itemstack2", ".", "stackSize", ";", "ItemStack", "itemstack6", "=", "slot", ".", "decrStackSize", "(", "k", ")", ";", "inventoryplayer", ".", "setItemStack", "(", "itemstack6", ")", ";", "if", "(", "itemstack2", ".", "stackSize", "==", "0", ")", "{", "slot", ".", "putStack", "(", "null", ")", ";", "}", "slot", ".", "onPickupFromSlot", "(", "inventoryplayer", ".", "getItemStack", "(", ")", ")", ";", "}", "else", "if", "(", "slot", ".", "isItemValid", "(", "itemstack4", ")", ")", "{", "if", "(", "itemstack2", ".", "itemID", "!=", "itemstack4", ".", "itemID", "||", "itemstack2", ".", "getHasSubtypes", "(", ")", "&&", "itemstack2", ".", "getItemDamage", "(", ")", "!=", "itemstack4", ".", "getItemDamage", "(", ")", "||", "!", "ItemStack", ".", "func_46124_a", "(", "itemstack2", ",", "itemstack4", ")", ")", "{", "if", "(", "itemstack4", ".", "stackSize", "<=", "slot", ".", "getSlotStackLimit", "(", ")", ")", "{", "ItemStack", "itemstack5", "=", "itemstack2", ";", "slot", ".", "putStack", "(", "itemstack4", ")", ";", "inventoryplayer", ".", "setItemStack", "(", "itemstack5", ")", ";", "}", "}", "else", "{", "int", "l", "=", "par2", "!=", "0", "?", "1", ":", "itemstack4", ".", "stackSize", ";", "if", "(", "l", ">", "slot", ".", "getSlotStackLimit", "(", ")", "-", "itemstack2", ".", "stackSize", ")", "{", "l", "=", "slot", ".", "getSlotStackLimit", "(", ")", "-", "itemstack2", ".", "stackSize", ";", "}", "if", "(", "l", ">", "itemstack4", ".", "getMaxStackSize", "(", ")", "-", "itemstack2", ".", "stackSize", ")", "{", "l", "=", "itemstack4", ".", "getMaxStackSize", "(", ")", "-", "itemstack2", ".", "stackSize", ";", "}", "itemstack4", ".", "splitStack", "(", "l", ")", ";", "if", "(", "itemstack4", ".", "stackSize", "==", "0", ")", "{", "inventoryplayer", ".", "setItemStack", "(", "null", ")", ";", "}", "itemstack2", ".", "stackSize", "+=", "l", ";", "}", "}", "else", "if", "(", "itemstack2", ".", "itemID", "==", "itemstack4", ".", "itemID", "&&", "itemstack4", ".", "getMaxStackSize", "(", ")", ">", "1", "&&", "(", "!", "itemstack2", ".", "getHasSubtypes", "(", ")", "||", "itemstack2", ".", "getItemDamage", "(", ")", "==", "itemstack4", ".", "getItemDamage", "(", ")", ")", "&&", "ItemStack", ".", "func_46124_a", "(", "itemstack2", ",", "itemstack4", ")", ")", "{", "int", "i1", "=", "itemstack2", ".", "stackSize", ";", "if", "(", "i1", ">", "0", "&&", "i1", "+", "itemstack4", ".", "stackSize", "<=", "itemstack4", ".", "getMaxStackSize", "(", ")", ")", "{", "itemstack4", ".", "stackSize", "+=", "i1", ";", "ItemStack", "itemstack3", "=", "slot", ".", "decrStackSize", "(", "i1", ")", ";", "if", "(", "itemstack3", ".", "stackSize", "==", "0", ")", "{", "slot", ".", "putStack", "(", "null", ")", ";", "}", "slot", ".", "onPickupFromSlot", "(", "inventoryplayer", ".", "getItemStack", "(", ")", ")", ";", "}", "}", "}", "}", "}", "return", "itemstack", ";", "}", "protected", "void", "retrySlotClick", "(", "int", "par1", ",", "int", "par2", ",", "boolean", "par3", ",", "EntityPlayer", "par4EntityPlayer", ")", "{", "slotClick", "(", "par1", ",", "par2", ",", "par3", ",", "par4EntityPlayer", ")", ";", "}", "public", "void", "onCraftGuiClosed", "(", "EntityPlayer", "par1EntityPlayer", ")", "{", "InventoryPlayer", "inventoryplayer", "=", "par1EntityPlayer", ".", "inventory", ";", "if", "(", "inventoryplayer", ".", "getItemStack", "(", ")", "!=", "null", ")", "{", "par1EntityPlayer", ".", "dropPlayerItem", "(", "inventoryplayer", ".", "getItemStack", "(", ")", ")", ";", "inventoryplayer", ".", "setItemStack", "(", "null", ")", ";", "}", "}", "public", "void", "onCraftMatrixChanged", "(", "IInventory", "par1IInventory", ")", "{", "updateCraftingResults", "(", ")", ";", "}", "public", "void", "putStackInSlot", "(", "int", "par1", ",", "ItemStack", "par2ItemStack", ")", "{", "getSlot", "(", "par1", ")", ".", "putStack", "(", "par2ItemStack", ")", ";", "}", "public", "boolean", "getCanCraft", "(", "EntityPlayer", "par1EntityPlayer", ")", "{", "return", "!", "field_20131_b", ".", "contains", "(", "par1EntityPlayer", ")", ";", "}", "public", "void", "setCanCraft", "(", "EntityPlayer", "par1EntityPlayer", ",", "boolean", "par2", ")", "{", "if", "(", "par2", ")", "{", "field_20131_b", ".", "remove", "(", "par1EntityPlayer", ")", ";", "}", "else", "{", "field_20131_b", ".", "add", "(", "par1EntityPlayer", ")", ";", "}", "}", "public", "abstract", "boolean", "canInteractWith", "(", "EntityPlayer", "entityplayer", ")", ";", "protected", "boolean", "mergeItemStack", "(", "ItemStack", "par1ItemStack", ",", "int", "par2", ",", "int", "par3", ",", "boolean", "par4", ")", "{", "boolean", "flag", "=", "false", ";", "int", "i", "=", "par2", ";", "if", "(", "par4", ")", "{", "i", "=", "par3", "-", "1", ";", "}", "if", "(", "par1ItemStack", ".", "isStackable", "(", ")", ")", "{", "while", "(", "par1ItemStack", ".", "stackSize", ">", "0", "&&", "(", "!", "par4", "&&", "i", "<", "par3", "||", "par4", "&&", "i", ">=", "par2", ")", ")", "{", "Slot", "slot", "=", "(", "Slot", ")", "inventorySlots", ".", "get", "(", "i", ")", ";", "ItemStack", "itemstack", "=", "slot", ".", "getStack", "(", ")", ";", "if", "(", "itemstack", "!=", "null", "&&", "itemstack", ".", "itemID", "==", "par1ItemStack", ".", "itemID", "&&", "(", "!", "par1ItemStack", ".", "getHasSubtypes", "(", ")", "||", "par1ItemStack", ".", "getItemDamage", "(", ")", "==", "itemstack", ".", "getItemDamage", "(", ")", ")", "&&", "ItemStack", ".", "func_46124_a", "(", "par1ItemStack", ",", "itemstack", ")", ")", "{", "int", "k", "=", "itemstack", ".", "stackSize", "+", "par1ItemStack", ".", "stackSize", ";", "if", "(", "k", "<=", "par1ItemStack", ".", "getMaxStackSize", "(", ")", ")", "{", "par1ItemStack", ".", "stackSize", "=", "0", ";", "itemstack", ".", "stackSize", "=", "k", ";", "slot", ".", "onSlotChanged", "(", ")", ";", "flag", "=", "true", ";", "}", "else", "if", "(", "itemstack", ".", "stackSize", "<", "par1ItemStack", ".", "getMaxStackSize", "(", ")", ")", "{", "par1ItemStack", ".", "stackSize", "-=", "par1ItemStack", ".", "getMaxStackSize", "(", ")", "-", "itemstack", ".", "stackSize", ";", "itemstack", ".", "stackSize", "=", "par1ItemStack", ".", "getMaxStackSize", "(", ")", ";", "slot", ".", "onSlotChanged", "(", ")", ";", "flag", "=", "true", ";", "}", "}", "if", "(", "par4", ")", "{", "i", "--", ";", "}", "else", "{", "i", "++", ";", "}", "}", "}", "if", "(", "par1ItemStack", ".", "stackSize", ">", "0", ")", "{", "int", "j", ";", "if", "(", "par4", ")", "{", "j", "=", "par3", "-", "1", ";", "}", "else", "{", "j", "=", "par2", ";", "}", "do", "{", "if", "(", "(", "par4", "||", "j", ">=", "par3", ")", "&&", "(", "!", "par4", "||", "j", "<", "par2", ")", ")", "{", "break", ";", "}", "Slot", "slot1", "=", "(", "Slot", ")", "inventorySlots", ".", "get", "(", "j", ")", ";", "ItemStack", "itemstack1", "=", "slot1", ".", "getStack", "(", ")", ";", "if", "(", "itemstack1", "==", "null", ")", "{", "slot1", ".", "putStack", "(", "par1ItemStack", ".", "copy", "(", ")", ")", ";", "slot1", ".", "onSlotChanged", "(", ")", ";", "par1ItemStack", ".", "stackSize", "=", "0", ";", "flag", "=", "true", ";", "break", ";", "}", "if", "(", "par4", ")", "{", "j", "--", ";", "}", "else", "{", "j", "++", ";", "}", "}", "while", "(", "true", ")", ";", "}", "return", "flag", ";", "}", "}", "</s>" ]
9,883
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "public", "class", "BiomeGenSnow", "extends", "BiomeGenBase", "{", "public", "BiomeGenSnow", "(", "int", "par1", ")", "{", "super", "(", "par1", ")", ";", "}", "}", "</s>" ]
9,884
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "Random", ";", "public", "class", "WorldGenCactus", "extends", "WorldGenerator", "{", "public", "WorldGenCactus", "(", ")", "{", "}", "public", "boolean", "generate", "(", "World", "par1World", ",", "Random", "par2Random", ",", "int", "par3", ",", "int", "par4", ",", "int", "par5", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "10", ";", "i", "++", ")", "{", "int", "j", "=", "(", "par3", "+", "par2Random", ".", "nextInt", "(", "8", ")", ")", "-", "par2Random", ".", "nextInt", "(", "8", ")", ";", "int", "k", "=", "(", "par4", "+", "par2Random", ".", "nextInt", "(", "4", ")", ")", "-", "par2Random", ".", "nextInt", "(", "4", ")", ";", "int", "l", "=", "(", "par5", "+", "par2Random", ".", "nextInt", "(", "8", ")", ")", "-", "par2Random", ".", "nextInt", "(", "8", ")", ";", "if", "(", "!", "par1World", ".", "isAirBlock", "(", "j", ",", "k", ",", "l", ")", ")", "{", "continue", ";", "}", "int", "i1", "=", "1", "+", "par2Random", ".", "nextInt", "(", "par2Random", ".", "nextInt", "(", "3", ")", "+", "1", ")", ";", "for", "(", "int", "j1", "=", "0", ";", "j1", "<", "i1", ";", "j1", "++", ")", "{", "if", "(", "Block", ".", "cactus", ".", "canBlockStay", "(", "par1World", ",", "j", ",", "k", "+", "j1", ",", "l", ")", ")", "{", "par1World", ".", "setBlock", "(", "j", ",", "k", "+", "j1", ",", "l", ",", "Block", ".", "cactus", ".", "blockID", ")", ";", "}", "}", "}", "return", "true", ";", "}", "}", "</s>" ]
9,885
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "net", ".", "minecraft", ".", "server", ".", "MinecraftServer", ";", "public", "class", "WorldManager", "implements", "IWorldAccess", "{", "private", "MinecraftServer", "mcServer", ";", "private", "WorldServer", "world", ";", "public", "WorldManager", "(", "MinecraftServer", "par1MinecraftServer", ",", "WorldServer", "par2WorldServer", ")", "{", "mcServer", "=", "par1MinecraftServer", ";", "world", "=", "par2WorldServer", ";", "}", "public", "void", "spawnParticle", "(", "String", "s", ",", "double", "d", ",", "double", "d1", ",", "double", "d2", ",", "double", "d3", ",", "double", "d4", ",", "double", "d5", ")", "{", "}", "public", "void", "obtainEntitySkin", "(", "Entity", "par1Entity", ")", "{", "mcServer", ".", "getEntityTracker", "(", "world", ".", "worldProvider", ".", "worldType", ")", ".", "trackEntity", "(", "par1Entity", ")", ";", "}", "public", "void", "releaseEntitySkin", "(", "Entity", "par1Entity", ")", "{", "mcServer", ".", "getEntityTracker", "(", "world", ".", "worldProvider", ".", "worldType", ")", ".", "untrackEntity", "(", "par1Entity", ")", ";", "}", "public", "void", "playSound", "(", "String", "s", ",", "double", "d", ",", "double", "d1", ",", "double", "d2", ",", "float", "f", ",", "float", "f1", ")", "{", "}", "public", "void", "markBlockRangeNeedsUpdate", "(", "int", "i", ",", "int", "j", ",", "int", "k", ",", "int", "l", ",", "int", "i1", ",", "int", "j1", ")", "{", "}", "public", "void", "markBlockNeedsUpdate", "(", "int", "par1", ",", "int", "par2", ",", "int", "par3", ")", "{", "mcServer", ".", "configManager", ".", "markBlockNeedsUpdate", "(", "par1", ",", "par2", ",", "par3", ",", "world", ".", "worldProvider", ".", "worldType", ")", ";", "}", "public", "void", "markBlockNeedsUpdate2", "(", "int", "i", ",", "int", "j", ",", "int", "k", ")", "{", "}", "public", "void", "playRecord", "(", "String", "s", ",", "int", "i", ",", "int", "j", ",", "int", "k", ")", "{", "}", "public", "void", "doNothingWithTileEntity", "(", "int", "par1", ",", "int", "par2", ",", "int", "par3", ",", "TileEntity", "par4TileEntity", ")", "{", "mcServer", ".", "configManager", ".", "sentTileEntityToPlayer", "(", "par1", ",", "par2", ",", "par3", ",", "par4TileEntity", ")", ";", "}", "public", "void", "playAuxSFX", "(", "EntityPlayer", "par1EntityPlayer", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "int", "par5", ",", "int", "par6", ")", "{", "mcServer", ".", "configManager", ".", "func_28171_a", "(", "par1EntityPlayer", ",", "par3", ",", "par4", ",", "par5", ",", "64D", ",", "world", ".", "worldProvider", ".", "worldType", ",", "new", "Packet61DoorChange", "(", "par2", ",", "par3", ",", "par4", ",", "par5", ",", "par6", ")", ")", ";", "}", "}", "</s>" ]
9,886
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "public", "interface", "IWorldAccess", "{", "public", "abstract", "void", "markBlockNeedsUpdate", "(", "int", "i", ",", "int", "j", ",", "int", "k", ")", ";", "public", "abstract", "void", "markBlockNeedsUpdate2", "(", "int", "i", ",", "int", "j", ",", "int", "k", ")", ";", "public", "abstract", "void", "markBlockRangeNeedsUpdate", "(", "int", "i", ",", "int", "j", ",", "int", "k", ",", "int", "l", ",", "int", "i1", ",", "int", "j1", ")", ";", "public", "abstract", "void", "playSound", "(", "String", "s", ",", "double", "d", ",", "double", "d1", ",", "double", "d2", ",", "float", "f", ",", "float", "f1", ")", ";", "public", "abstract", "void", "spawnParticle", "(", "String", "s", ",", "double", "d", ",", "double", "d1", ",", "double", "d2", ",", "double", "d3", ",", "double", "d4", ",", "double", "d5", ")", ";", "public", "abstract", "void", "obtainEntitySkin", "(", "Entity", "entity", ")", ";", "public", "abstract", "void", "releaseEntitySkin", "(", "Entity", "entity", ")", ";", "public", "abstract", "void", "playRecord", "(", "String", "s", ",", "int", "i", ",", "int", "j", ",", "int", "k", ")", ";", "public", "abstract", "void", "doNothingWithTileEntity", "(", "int", "i", ",", "int", "j", ",", "int", "k", ",", "TileEntity", "tileentity", ")", ";", "public", "abstract", "void", "playAuxSFX", "(", "EntityPlayer", "entityplayer", ",", "int", "i", ",", "int", "j", ",", "int", "k", ",", "int", "l", ",", "int", "i1", ")", ";", "}", "</s>" ]
9,887
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "public", "class", "EntityAIMoveTwardsRestriction", "extends", "EntityAIBase", "{", "private", "EntityCreature", "theEntity", ";", "private", "double", "movePosX", ";", "private", "double", "movePosY", ";", "private", "double", "movePosZ", ";", "private", "float", "field_48149_e", ";", "public", "EntityAIMoveTwardsRestriction", "(", "EntityCreature", "par1EntityCreature", ",", "float", "par2", ")", "{", "theEntity", "=", "par1EntityCreature", ";", "field_48149_e", "=", "par2", ";", "setMutexBits", "(", "1", ")", ";", "}", "public", "boolean", "shouldExecute", "(", ")", "{", "if", "(", "theEntity", ".", "isWithinHomeDistanceCurrentPosition", "(", ")", ")", "{", "return", "false", ";", "}", "ChunkCoordinates", "chunkcoordinates", "=", "theEntity", ".", "getHomePosition", "(", ")", ";", "Vec3D", "vec3d", "=", "RandomPositionGenerator", ".", "func_48395_a", "(", "theEntity", ",", "16", ",", "7", ",", "Vec3D", ".", "createVector", "(", "chunkcoordinates", ".", "posX", ",", "chunkcoordinates", ".", "posY", ",", "chunkcoordinates", ".", "posZ", ")", ")", ";", "if", "(", "vec3d", "==", "null", ")", "{", "return", "false", ";", "}", "else", "{", "movePosX", "=", "vec3d", ".", "xCoord", ";", "movePosY", "=", "vec3d", ".", "yCoord", ";", "movePosZ", "=", "vec3d", ".", "zCoord", ";", "return", "true", ";", "}", "}", "public", "boolean", "continueExecuting", "(", ")", "{", "return", "!", "theEntity", ".", "getNavigator", "(", ")", ".", "noPath", "(", ")", ";", "}", "public", "void", "startExecuting", "(", ")", "{", "theEntity", ".", "getNavigator", "(", ")", ".", "func_48658_a", "(", "movePosX", ",", "movePosY", ",", "movePosZ", ",", "field_48149_e", ")", ";", "}", "}", "</s>" ]
9,888
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "Random", ";", "public", "class", "EntityIronGolem", "extends", "EntityGolem", "{", "private", "int", "field_48385_b", ";", "Village", "villageObj", ";", "private", "int", "field_48386_c", ";", "private", "int", "field_48384_g", ";", "public", "EntityIronGolem", "(", "World", "par1World", ")", "{", "super", "(", "par1World", ")", ";", "field_48385_b", "=", "0", ";", "villageObj", "=", "null", ";", "texture", "=", "\"\"", ";", "setSize", "(", "1.4F", ",", "2.9F", ")", ";", "getNavigator", "(", ")", ".", "func_48656_a", "(", "true", ")", ";", "tasks", ".", "addTask", "(", "1", ",", "new", "EntityAIAttackOnCollide", "(", "this", ",", "0.25F", ",", "true", ")", ")", ";", "tasks", ".", "addTask", "(", "2", ",", "new", "EntityAIMoveTowardsTarget", "(", "this", ",", "0.22F", ",", "32F", ")", ")", ";", "tasks", ".", "addTask", "(", "3", ",", "new", "EntityAIMoveThroughVillage", "(", "this", ",", "0.16F", ",", "true", ")", ")", ";", "tasks", ".", "addTask", "(", "4", ",", "new", "EntityAIMoveTwardsRestriction", "(", "this", ",", "0.16F", ")", ")", ";", "tasks", ".", "addTask", "(", "5", ",", "new", "EntityAILookAtVillager", "(", "this", ")", ")", ";", "tasks", ".", "addTask", "(", "6", ",", "new", "EntityAIWander", "(", "this", ",", "0.16F", ")", ")", ";", "tasks", ".", "addTask", "(", "7", ",", "new", "EntityAIWatchClosest", "(", "this", ",", "net", ".", "minecraft", ".", "src", ".", "EntityPlayer", ".", "class", ",", "6F", ")", ")", ";", "tasks", ".", "addTask", "(", "8", ",", "new", "EntityAILookIdle", "(", "this", ")", ")", ";", "targetTasks", ".", "addTask", "(", "1", ",", "new", "EntityAIDefendVillage", "(", "this", ")", ")", ";", "targetTasks", ".", "addTask", "(", "2", ",", "new", "EntityAIHurtByTarget", "(", "this", ",", "false", ")", ")", ";", "targetTasks", ".", "addTask", "(", "3", ",", "new", "EntityAINearestAttackableTarget", "(", "this", ",", "net", ".", "minecraft", ".", "src", ".", "EntityMob", ".", "class", ",", "16F", ",", "0", ",", "false", ",", "true", ")", ")", ";", "}", "protected", "void", "entityInit", "(", ")", "{", "super", ".", "entityInit", "(", ")", ";", "dataWatcher", ".", "addObject", "(", "16", ",", "Byte", ".", "valueOf", "(", "(", "byte", ")", "0", ")", ")", ";", "}", "public", "boolean", "isAIEnabled", "(", ")", "{", "return", "true", ";", "}", "protected", "void", "updateAITick", "(", ")", "{", "if", "(", "--", "field_48385_b", "<=", "0", ")", "{", "field_48385_b", "=", "70", "+", "rand", ".", "nextInt", "(", "50", ")", ";", "villageObj", "=", "worldObj", ".", "villageCollectionObj", ".", "findNearestVillage", "(", "MathHelper", ".", "floor_double", "(", "posX", ")", ",", "MathHelper", ".", "floor_double", "(", "posY", ")", ",", "MathHelper", ".", "floor_double", "(", "posZ", ")", ",", "32", ")", ";", "if", "(", "villageObj", "==", "null", ")", "{", "detachHome", "(", ")", ";", "}", "else", "{", "ChunkCoordinates", "chunkcoordinates", "=", "villageObj", ".", "getCenter", "(", ")", ";", "setHomeArea", "(", "chunkcoordinates", ".", "posX", ",", "chunkcoordinates", ".", "posY", ",", "chunkcoordinates", ".", "posZ", ",", "villageObj", ".", "getVillageRadius", "(", ")", ")", ";", "}", "}", "super", ".", "updateAITick", "(", ")", ";", "}", "public", "int", "getMaxHealth", "(", ")", "{", "return", "100", ";", "}", "protected", "int", "decreaseAirSupply", "(", "int", "par1", ")", "{", "return", "par1", ";", "}", "public", "void", "onLivingUpdate", "(", ")", "{", "super", ".", "onLivingUpdate", "(", ")", ";", "if", "(", "field_48386_c", ">", "0", ")", "{", "field_48386_c", "--", ";", "}", "if", "(", "field_48384_g", ">", "0", ")", "{", "field_48384_g", "--", ";", "}", "if", "(", "motionX", "*", "motionX", "+", "motionZ", "*", "motionZ", ">", "2.5000002779052011E-007D", "&&", "rand", ".", "nextInt", "(", "5", ")", "==", "0", ")", "{", "int", "i", "=", "MathHelper", ".", "floor_double", "(", "posX", ")", ";", "int", "j", "=", "MathHelper", ".", "floor_double", "(", "posY", "-", "0.20000000298023224D", "-", "(", "double", ")", "yOffset", ")", ";", "int", "k", "=", "MathHelper", ".", "floor_double", "(", "posZ", ")", ";", "int", "l", "=", "worldObj", ".", "getBlockId", "(", "i", ",", "j", ",", "k", ")", ";", "if", "(", "l", ">", "0", ")", "{", "worldObj", ".", "spawnParticle", "(", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "\"tilecrack_\"", ")", ".", "append", "(", "l", ")", ".", "toString", "(", ")", ",", "posX", "+", "(", "(", "double", ")", "rand", ".", "nextFloat", "(", ")", "-", "0.5D", ")", "*", "(", "double", ")", "width", ",", "boundingBox", ".", "minY", "+", "0.10000000000000001D", ",", "posZ", "+", "(", "(", "double", ")", "rand", ".", "nextFloat", "(", ")", "-", "0.5D", ")", "*", "(", "double", ")", "width", ",", "4D", "*", "(", "(", "double", ")", "rand", ".", "nextFloat", "(", ")", "-", "0.5D", ")", ",", "0.5D", ",", "(", "(", "double", ")", "rand", ".", "nextFloat", "(", ")", "-", "0.5D", ")", "*", "4D", ")", ";", "}", "}", "}", "public", "boolean", "func_48336_a", "(", "Class", "par1Class", ")", "{", "if", "(", "func_48379_n_", "(", ")", "&&", "(", "net", ".", "minecraft", ".", "src", ".", "EntityPlayer", ".", "class", ")", ".", "isAssignableFrom", "(", "par1Class", ")", ")", "{", "return", "false", ";", "}", "else", "{", "return", "super", ".", "func_48336_a", "(", "par1Class", ")", ";", "}", "}", "public", "void", "writeEntityToNBT", "(", "NBTTagCompound", "par1NBTTagCompound", ")", "{", "super", ".", "writeEntityToNBT", "(", "par1NBTTagCompound", ")", ";", "par1NBTTagCompound", ".", "setBoolean", "(", "\"\"", ",", "func_48379_n_", "(", ")", ")", ";", "}", "public", "void", "readEntityFromNBT", "(", "NBTTagCompound", "par1NBTTagCompound", ")", "{", "super", ".", "readEntityFromNBT", "(", "par1NBTTagCompound", ")", ";", "func_48381_b", "(", "par1NBTTagCompound", ".", "getBoolean", "(", "\"\"", ")", ")", ";", "}", "public", "boolean", "attackEntityAsMob", "(", "Entity", "par1Entity", ")", "{", "field_48386_c", "=", "10", ";", "worldObj", ".", "setEntityState", "(", "this", ",", "(", "byte", ")", "4", ")", ";", "boolean", "flag", "=", "par1Entity", ".", "attackEntityFrom", "(", "DamageSource", ".", "causeMobDamage", "(", "this", ")", ",", "7", "+", "rand", ".", "nextInt", "(", "15", ")", ")", ";", "if", "(", "flag", ")", "{", "par1Entity", ".", "motionY", "+=", "0.40000000596046448D", ";", "}", "worldObj", ".", "playSoundAtEntity", "(", "this", ",", "\"\"", ",", "1.0F", ",", "1.0F", ")", ";", "return", "flag", ";", "}", "public", "Village", "getVillage", "(", ")", "{", "return", "villageObj", ";", "}", "public", "void", "func_48383_a", "(", "boolean", "par1", ")", "{", "field_48384_g", "=", "par1", "?", "400", ":", "0", ";", "worldObj", ".", "setEntityState", "(", "this", ",", "(", "byte", ")", "11", ")", ";", "}", "protected", "String", "getLivingSound", "(", ")", "{", "return", "\"none\"", ";", "}", "protected", "String", "getHurtSound", "(", ")", "{", "return", "\"\"", ";", "}", "protected", "String", "getDeathSound", "(", ")", "{", "return", "\"\"", ";", "}", "protected", "void", "playStepSound", "(", "int", "par1", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ")", "{", "worldObj", ".", "playSoundAtEntity", "(", "this", ",", "\"\"", ",", "1.0F", ",", "1.0F", ")", ";", "}", "protected", "void", "dropFewItems", "(", "boolean", "par1", ",", "int", "par2", ")", "{", "int", "i", "=", "rand", ".", "nextInt", "(", "3", ")", ";", "for", "(", "int", "j", "=", "0", ";", "j", "<", "i", ";", "j", "++", ")", "{", "dropItem", "(", "Block", ".", "plantRed", ".", "blockID", ",", "1", ")", ";", "}", "int", "k", "=", "3", "+", "rand", ".", "nextInt", "(", "3", ")", ";", "for", "(", "int", "l", "=", "0", ";", "l", "<", "k", ";", "l", "++", ")", "{", "dropItem", "(", "Item", ".", "ingotIron", ".", "shiftedIndex", ",", "1", ")", ";", "}", "}", "public", "int", "func_48382_m_", "(", ")", "{", "return", "field_48384_g", ";", "}", "public", "boolean", "func_48379_n_", "(", ")", "{", "return", "(", "dataWatcher", ".", "getWatchableObjectByte", "(", "16", ")", "&", "1", ")", "!=", "0", ";", "}", "public", "void", "func_48381_b", "(", "boolean", "par1", ")", "{", "byte", "byte0", "=", "dataWatcher", ".", "getWatchableObjectByte", "(", "16", ")", ";", "if", "(", "par1", ")", "{", "dataWatcher", ".", "updateObject", "(", "16", ",", "Byte", ".", "valueOf", "(", "(", "byte", ")", "(", "byte0", "|", "1", ")", ")", ")", ";", "}", "else", "{", "dataWatcher", ".", "updateObject", "(", "16", ",", "Byte", ".", "valueOf", "(", "(", "byte", ")", "(", "byte0", "&", "-", "2", ")", ")", ")", ";", "}", "}", "}", "</s>" ]
9,889
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "public", "interface", "INpc", "extends", "IAnimals", "{", "}", "</s>" ]
9,890
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "public", "class", "WorldProviderSurface", "extends", "WorldProvider", "{", "public", "WorldProviderSurface", "(", ")", "{", "}", "}", "</s>" ]
9,891
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "List", ";", "import", "java", ".", "util", ".", "Random", ";", "public", "class", "ComponentStrongholdPortalRoom", "extends", "ComponentStronghold", "{", "private", "boolean", "hasSpawner", ";", "public", "ComponentStrongholdPortalRoom", "(", "int", "par1", ",", "Random", "par2Random", ",", "StructureBoundingBox", "par3StructureBoundingBox", ",", "int", "par4", ")", "{", "super", "(", "par1", ")", ";", "coordBaseMode", "=", "par4", ";", "boundingBox", "=", "par3StructureBoundingBox", ";", "}", "public", "void", "buildComponent", "(", "StructureComponent", "par1StructureComponent", ",", "List", "par2List", ",", "Random", "par3Random", ")", "{", "if", "(", "par1StructureComponent", "!=", "null", ")", "{", "(", "(", "ComponentStrongholdStairs2", ")", "par1StructureComponent", ")", ".", "portalRoom", "=", "this", ";", "}", "}", "public", "static", "ComponentStrongholdPortalRoom", "findValidPlacement", "(", "List", "par0List", ",", "Random", "par1Random", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "int", "par5", ",", "int", "par6", ")", "{", "StructureBoundingBox", "structureboundingbox", "=", "StructureBoundingBox", ".", "getComponentToAddBoundingBox", "(", "par2", ",", "par3", ",", "par4", ",", "-", "4", ",", "-", "1", ",", "0", ",", "11", ",", "8", ",", "16", ",", "par5", ")", ";", "if", "(", "!", "canStrongholdGoDeeper", "(", "structureboundingbox", ")", "||", "StructureComponent", ".", "findIntersecting", "(", "par0List", ",", "structureboundingbox", ")", "!=", "null", ")", "{", "return", "null", ";", "}", "else", "{", "return", "new", "ComponentStrongholdPortalRoom", "(", "par6", ",", "par1Random", ",", "structureboundingbox", ",", "par5", ")", ";", "}", "}", "public", "boolean", "addComponentParts", "(", "World", "par1World", ",", "Random", "par2Random", ",", "StructureBoundingBox", "par3StructureBoundingBox", ")", "{", "fillWithRandomizedBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "0", ",", "0", ",", "0", ",", "10", ",", "7", ",", "15", ",", "false", ",", "par2Random", ",", "StructureStrongholdPieces", ".", "getStrongholdStones", "(", ")", ")", ";", "placeDoor", "(", "par1World", ",", "par2Random", ",", "par3StructureBoundingBox", ",", "EnumDoor", ".", "GRATES", ",", "4", ",", "1", ",", "0", ")", ";", "byte", "byte0", "=", "6", ";", "fillWithRandomizedBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "1", ",", "byte0", ",", "1", ",", "1", ",", "byte0", ",", "14", ",", "false", ",", "par2Random", ",", "StructureStrongholdPieces", ".", "getStrongholdStones", "(", ")", ")", ";", "fillWithRandomizedBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "9", ",", "byte0", ",", "1", ",", "9", ",", "byte0", ",", "14", ",", "false", ",", "par2Random", ",", "StructureStrongholdPieces", ".", "getStrongholdStones", "(", ")", ")", ";", "fillWithRandomizedBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "2", ",", "byte0", ",", "1", ",", "8", ",", "byte0", ",", "2", ",", "false", ",", "par2Random", ",", "StructureStrongholdPieces", ".", "getStrongholdStones", "(", ")", ")", ";", "fillWithRandomizedBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "2", ",", "byte0", ",", "14", ",", "8", ",", "byte0", ",", "14", ",", "false", ",", "par2Random", ",", "StructureStrongholdPieces", ".", "getStrongholdStones", "(", ")", ")", ";", "fillWithRandomizedBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "1", ",", "1", ",", "1", ",", "2", ",", "1", ",", "4", ",", "false", ",", "par2Random", ",", "StructureStrongholdPieces", ".", "getStrongholdStones", "(", ")", ")", ";", "fillWithRandomizedBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "8", ",", "1", ",", "1", ",", "9", ",", "1", ",", "4", ",", "false", ",", "par2Random", ",", "StructureStrongholdPieces", ".", "getStrongholdStones", "(", ")", ")", ";", "fillWithBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "1", ",", "1", ",", "1", ",", "1", ",", "1", ",", "3", ",", "Block", ".", "lavaMoving", ".", "blockID", ",", "Block", ".", "lavaMoving", ".", "blockID", ",", "false", ")", ";", "fillWithBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "9", ",", "1", ",", "1", ",", "9", ",", "1", ",", "3", ",", "Block", ".", "lavaMoving", ".", "blockID", ",", "Block", ".", "lavaMoving", ".", "blockID", ",", "false", ")", ";", "fillWithRandomizedBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "3", ",", "1", ",", "8", ",", "7", ",", "1", ",", "12", ",", "false", ",", "par2Random", ",", "StructureStrongholdPieces", ".", "getStrongholdStones", "(", ")", ")", ";", "fillWithBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "4", ",", "1", ",", "9", ",", "6", ",", "1", ",", "11", ",", "Block", ".", "lavaMoving", ".", "blockID", ",", "Block", ".", "lavaMoving", ".", "blockID", ",", "false", ")", ";", "for", "(", "int", "j", "=", "3", ";", "j", "<", "14", ";", "j", "+=", "2", ")", "{", "fillWithBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "0", ",", "3", ",", "j", ",", "0", ",", "4", ",", "j", ",", "Block", ".", "fenceIron", ".", "blockID", ",", "Block", ".", "fenceIron", ".", "blockID", ",", "false", ")", ";", "fillWithBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "10", ",", "3", ",", "j", ",", "10", ",", "4", ",", "j", ",", "Block", ".", "fenceIron", ".", "blockID", ",", "Block", ".", "fenceIron", ".", "blockID", ",", "false", ")", ";", "}", "for", "(", "int", "k", "=", "2", ";", "k", "<", "9", ";", "k", "+=", "2", ")", "{", "fillWithBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "k", ",", "3", ",", "15", ",", "k", ",", "4", ",", "15", ",", "Block", ".", "fenceIron", ".", "blockID", ",", "Block", ".", "fenceIron", ".", "blockID", ",", "false", ")", ";", "}", "int", "l", "=", "getMetadataWithOffset", "(", "Block", ".", "stairsStoneBrickSmooth", ".", "blockID", ",", "3", ")", ";", "fillWithRandomizedBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "4", ",", "1", ",", "5", ",", "6", ",", "1", ",", "7", ",", "false", ",", "par2Random", ",", "StructureStrongholdPieces", ".", "getStrongholdStones", "(", ")", ")", ";", "fillWithRandomizedBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "4", ",", "2", ",", "6", ",", "6", ",", "2", ",", "7", ",", "false", ",", "par2Random", ",", "StructureStrongholdPieces", ".", "getStrongholdStones", "(", ")", ")", ";", "fillWithRandomizedBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "4", ",", "3", ",", "7", ",", "6", ",", "3", ",", "7", ",", "false", ",", "par2Random", ",", "StructureStrongholdPieces", ".", "getStrongholdStones", "(", ")", ")", ";", "for", "(", "int", "i1", "=", "4", ";", "i1", "<=", "6", ";", "i1", "++", ")", "{", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "stairsStoneBrickSmooth", ".", "blockID", ",", "l", ",", "i1", ",", "1", ",", "4", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "stairsStoneBrickSmooth", ".", "blockID", ",", "l", ",", "i1", ",", "2", ",", "5", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "stairsStoneBrickSmooth", ".", "blockID", ",", "l", ",", "i1", ",", "3", ",", "6", ",", "par3StructureBoundingBox", ")", ";", "}", "byte", "byte1", "=", "2", ";", "byte", "byte2", "=", "0", ";", "byte", "byte3", "=", "3", ";", "byte", "byte4", "=", "1", ";", "switch", "(", "coordBaseMode", ")", "{", "case", "0", ":", "byte1", "=", "0", ";", "byte2", "=", "2", ";", "break", ";", "case", "3", ":", "byte1", "=", "3", ";", "byte2", "=", "1", ";", "byte3", "=", "0", ";", "byte4", "=", "2", ";", "break", ";", "case", "1", ":", "byte1", "=", "1", ";", "byte2", "=", "3", ";", "byte3", "=", "0", ";", "byte4", "=", "2", ";", "break", ";", "}", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "endPortalFrame", ".", "blockID", ",", "byte1", "+", "(", "par2Random", ".", "nextFloat", "(", ")", "<=", "0.9F", "?", "0", ":", "4", ")", ",", "4", ",", "3", ",", "8", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "endPortalFrame", ".", "blockID", ",", "byte1", "+", "(", "par2Random", ".", "nextFloat", "(", ")", "<=", "0.9F", "?", "0", ":", "4", ")", ",", "5", ",", "3", ",", "8", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "endPortalFrame", ".", "blockID", ",", "byte1", "+", "(", "par2Random", ".", "nextFloat", "(", ")", "<=", "0.9F", "?", "0", ":", "4", ")", ",", "6", ",", "3", ",", "8", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "endPortalFrame", ".", "blockID", ",", "byte2", "+", "(", "par2Random", ".", "nextFloat", "(", ")", "<=", "0.9F", "?", "0", ":", "4", ")", ",", "4", ",", "3", ",", "12", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "endPortalFrame", ".", "blockID", ",", "byte2", "+", "(", "par2Random", ".", "nextFloat", "(", ")", "<=", "0.9F", "?", "0", ":", "4", ")", ",", "5", ",", "3", ",", "12", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "endPortalFrame", ".", "blockID", ",", "byte2", "+", "(", "par2Random", ".", "nextFloat", "(", ")", "<=", "0.9F", "?", "0", ":", "4", ")", ",", "6", ",", "3", ",", "12", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "endPortalFrame", ".", "blockID", ",", "byte3", "+", "(", "par2Random", ".", "nextFloat", "(", ")", "<=", "0.9F", "?", "0", ":", "4", ")", ",", "3", ",", "3", ",", "9", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "endPortalFrame", ".", "blockID", ",", "byte3", "+", "(", "par2Random", ".", "nextFloat", "(", ")", "<=", "0.9F", "?", "0", ":", "4", ")", ",", "3", ",", "3", ",", "10", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "endPortalFrame", ".", "blockID", ",", "byte3", "+", "(", "par2Random", ".", "nextFloat", "(", ")", "<=", "0.9F", "?", "0", ":", "4", ")", ",", "3", ",", "3", ",", "11", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "endPortalFrame", ".", "blockID", ",", "byte4", "+", "(", "par2Random", ".", "nextFloat", "(", ")", "<=", "0.9F", "?", "0", ":", "4", ")", ",", "7", ",", "3", ",", "9", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "endPortalFrame", ".", "blockID", ",", "byte4", "+", "(", "par2Random", ".", "nextFloat", "(", ")", "<=", "0.9F", "?", "0", ":", "4", ")", ",", "7", ",", "3", ",", "10", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "endPortalFrame", ".", "blockID", ",", "byte4", "+", "(", "par2Random", ".", "nextFloat", "(", ")", "<=", "0.9F", "?", "0", ":", "4", ")", ",", "7", ",", "3", ",", "11", ",", "par3StructureBoundingBox", ")", ";", "if", "(", "!", "hasSpawner", ")", "{", "int", "i", "=", "getYWithOffset", "(", "3", ")", ";", "int", "j1", "=", "getXWithOffset", "(", "5", ",", "6", ")", ";", "int", "k1", "=", "getZWithOffset", "(", "5", ",", "6", ")", ";", "if", "(", "par3StructureBoundingBox", ".", "isVecInside", "(", "j1", ",", "i", ",", "k1", ")", ")", "{", "hasSpawner", "=", "true", ";", "par1World", ".", "setBlockWithNotify", "(", "j1", ",", "i", ",", "k1", ",", "Block", ".", "mobSpawner", ".", "blockID", ")", ";", "TileEntityMobSpawner", "tileentitymobspawner", "=", "(", "TileEntityMobSpawner", ")", "par1World", ".", "getBlockTileEntity", "(", "j1", ",", "i", ",", "k1", ")", ";", "if", "(", "tileentitymobspawner", "!=", "null", ")", "{", "tileentitymobspawner", ".", "setMobID", "(", "\"Silverfish\"", ")", ";", "}", "}", "}", "return", "true", ";", "}", "}", "</s>" ]
9,892
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "Random", ";", "public", "class", "EntityAISwimming", "extends", "EntityAIBase", "{", "private", "EntityLiving", "theEntity", ";", "public", "EntityAISwimming", "(", "EntityLiving", "par1EntityLiving", ")", "{", "theEntity", "=", "par1EntityLiving", ";", "setMutexBits", "(", "4", ")", ";", "par1EntityLiving", ".", "getNavigator", "(", ")", ".", "func_48660_e", "(", "true", ")", ";", "}", "public", "boolean", "shouldExecute", "(", ")", "{", "return", "theEntity", ".", "isInWater", "(", ")", "||", "theEntity", ".", "handleLavaMovement", "(", ")", ";", "}", "public", "void", "updateTask", "(", ")", "{", "if", "(", "theEntity", ".", "getRNG", "(", ")", ".", "nextFloat", "(", ")", "<", "0.8F", ")", "{", "theEntity", ".", "getJumpHelper", "(", ")", ".", "setJumping", "(", ")", ";", "}", "}", "}", "</s>" ]
9,893
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "public", "class", "BlockEnchantmentTable", "extends", "BlockContainer", "{", "protected", "BlockEnchantmentTable", "(", "int", "par1", ")", "{", "super", "(", "par1", ",", "166", ",", "Material", ".", "rock", ")", ";", "setBlockBounds", "(", "0.0F", ",", "0.0F", ",", "0.0F", ",", "1.0F", ",", "0.75F", ",", "1.0F", ")", ";", "setLightOpacity", "(", "0", ")", ";", "}", "public", "boolean", "renderAsNormalBlock", "(", ")", "{", "return", "false", ";", "}", "public", "boolean", "isOpaqueCube", "(", ")", "{", "return", "false", ";", "}", "public", "int", "getBlockTextureFromSideAndMetadata", "(", "int", "par1", ",", "int", "par2", ")", "{", "return", "getBlockTextureFromSide", "(", "par1", ")", ";", "}", "public", "int", "getBlockTextureFromSide", "(", "int", "par1", ")", "{", "if", "(", "par1", "==", "0", ")", "{", "return", "blockIndexInTexture", "+", "17", ";", "}", "if", "(", "par1", "==", "1", ")", "{", "return", "blockIndexInTexture", ";", "}", "else", "{", "return", "blockIndexInTexture", "+", "16", ";", "}", "}", "public", "TileEntity", "getBlockEntity", "(", ")", "{", "return", "new", "TileEntityEnchantmentTable", "(", ")", ";", "}", "public", "boolean", "blockActivated", "(", "World", "par1World", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "EntityPlayer", "par5EntityPlayer", ")", "{", "if", "(", "par1World", ".", "isRemote", ")", "{", "return", "true", ";", "}", "else", "{", "par5EntityPlayer", ".", "displayGUIEnchantment", "(", "par2", ",", "par3", ",", "par4", ")", ";", "return", "true", ";", "}", "}", "}", "</s>" ]
9,894
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "io", ".", "*", ";", "public", "class", "Packet61DoorChange", "extends", "Packet", "{", "public", "int", "sfxID", ";", "public", "int", "auxData", ";", "public", "int", "posX", ";", "public", "int", "posY", ";", "public", "int", "posZ", ";", "public", "Packet61DoorChange", "(", ")", "{", "}", "public", "Packet61DoorChange", "(", "int", "par1", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "int", "par5", ")", "{", "sfxID", "=", "par1", ";", "posX", "=", "par2", ";", "posY", "=", "par3", ";", "posZ", "=", "par4", ";", "auxData", "=", "par5", ";", "}", "public", "void", "readPacketData", "(", "DataInputStream", "par1DataInputStream", ")", "throws", "IOException", "{", "sfxID", "=", "par1DataInputStream", ".", "readInt", "(", ")", ";", "posX", "=", "par1DataInputStream", ".", "readInt", "(", ")", ";", "posY", "=", "par1DataInputStream", ".", "readByte", "(", ")", "&", "0xff", ";", "posZ", "=", "par1DataInputStream", ".", "readInt", "(", ")", ";", "auxData", "=", "par1DataInputStream", ".", "readInt", "(", ")", ";", "}", "public", "void", "writePacketData", "(", "DataOutputStream", "par1DataOutputStream", ")", "throws", "IOException", "{", "par1DataOutputStream", ".", "writeInt", "(", "sfxID", ")", ";", "par1DataOutputStream", ".", "writeInt", "(", "posX", ")", ";", "par1DataOutputStream", ".", "writeByte", "(", "posY", "&", "0xff", ")", ";", "par1DataOutputStream", ".", "writeInt", "(", "posZ", ")", ";", "par1DataOutputStream", ".", "writeInt", "(", "auxData", ")", ";", "}", "public", "void", "processPacket", "(", "NetHandler", "par1NetHandler", ")", "{", "par1NetHandler", ".", "handleDoorChange", "(", "this", ")", ";", "}", "public", "int", "getPacketSize", "(", ")", "{", "return", "20", ";", "}", "}", "</s>" ]
9,895
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "Random", ";", "public", "class", "BlockMobSpawner", "extends", "BlockContainer", "{", "protected", "BlockMobSpawner", "(", "int", "par1", ",", "int", "par2", ")", "{", "super", "(", "par1", ",", "par2", ",", "Material", ".", "rock", ")", ";", "}", "public", "TileEntity", "getBlockEntity", "(", ")", "{", "return", "new", "TileEntityMobSpawner", "(", ")", ";", "}", "public", "int", "idDropped", "(", "int", "par1", ",", "Random", "par2Random", ",", "int", "par3", ")", "{", "return", "0", ";", "}", "public", "int", "quantityDropped", "(", "Random", "par1Random", ")", "{", "return", "0", ";", "}", "public", "boolean", "isOpaqueCube", "(", ")", "{", "return", "false", ";", "}", "}", "</s>" ]
9,896
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "public", "class", "WorldType", "{", "public", "static", "final", "WorldType", "worldTypes", "[", "]", "=", "new", "WorldType", "[", "16", "]", ";", "public", "static", "final", "WorldType", "DEFAULT", "=", "(", "new", "WorldType", "(", "0", ",", "\"default\"", ",", "1", ")", ")", ".", "func_48448_d", "(", ")", ";", "public", "static", "final", "WorldType", "FLAT", "=", "new", "WorldType", "(", "1", ",", "\"flat\"", ")", ";", "public", "static", "final", "WorldType", "DEFAULT_1_1", "=", "(", "new", "WorldType", "(", "8", ",", "\"default_1_1\"", ",", "0", ")", ")", ".", "setCanBeCreated", "(", "false", ")", ";", "private", "final", "String", "worldType", ";", "private", "final", "int", "generatorVersion", ";", "private", "boolean", "canBeCreated", ";", "private", "boolean", "field_48460_h", ";", "private", "WorldType", "(", "int", "par1", ",", "String", "par2Str", ")", "{", "this", "(", "par1", ",", "par2Str", ",", "0", ")", ";", "}", "private", "WorldType", "(", "int", "par1", ",", "String", "par2Str", ",", "int", "par3", ")", "{", "worldType", "=", "par2Str", ";", "generatorVersion", "=", "par3", ";", "canBeCreated", "=", "true", ";", "worldTypes", "[", "par1", "]", "=", "this", ";", "}", "public", "String", "func_48449_a", "(", ")", "{", "return", "worldType", ";", "}", "public", "int", "getGeneratorVersion", "(", ")", "{", "return", "generatorVersion", ";", "}", "public", "WorldType", "func_48451_a", "(", "int", "par1", ")", "{", "if", "(", "this", "==", "DEFAULT", "&&", "par1", "==", "0", ")", "{", "return", "DEFAULT_1_1", ";", "}", "else", "{", "return", "this", ";", "}", "}", "private", "WorldType", "setCanBeCreated", "(", "boolean", "par1", ")", "{", "canBeCreated", "=", "par1", ";", "return", "this", ";", "}", "private", "WorldType", "func_48448_d", "(", ")", "{", "field_48460_h", "=", "true", ";", "return", "this", ";", "}", "public", "boolean", "func_48453_c", "(", ")", "{", "return", "field_48460_h", ";", "}", "public", "static", "WorldType", "parseWorldType", "(", "String", "par0Str", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "worldTypes", ".", "length", ";", "i", "++", ")", "{", "if", "(", "worldTypes", "[", "i", "]", "!=", "null", "&&", "worldTypes", "[", "i", "]", ".", "worldType", ".", "equalsIgnoreCase", "(", "par0Str", ")", ")", "{", "return", "worldTypes", "[", "i", "]", ";", "}", "}", "return", "null", ";", "}", "}", "</s>" ]
9,897
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "io", ".", "IOException", ";", "import", "java", ".", "net", ".", "DatagramSocket", ";", "import", "java", ".", "net", ".", "ServerSocket", ";", "import", "java", ".", "util", ".", "*", ";", "public", "abstract", "class", "RConThreadBase", "implements", "Runnable", "{", "protected", "boolean", "running", ";", "protected", "IServer", "server", ";", "protected", "Thread", "rconThread", ";", "protected", "int", "field_40415_d", ";", "protected", "List", "socketList", ";", "protected", "List", "serverSocketList", ";", "RConThreadBase", "(", "IServer", "par1IServer", ")", "{", "running", "=", "false", ";", "field_40415_d", "=", "5", ";", "socketList", "=", "new", "ArrayList", "(", ")", ";", "serverSocketList", "=", "new", "ArrayList", "(", ")", ";", "server", "=", "par1IServer", ";", "if", "(", "server", ".", "isDebuggingEnabled", "(", ")", ")", "{", "logWarning", "(", "\"\"", ")", ";", "}", "}", "public", "synchronized", "void", "startThread", "(", ")", "{", "rconThread", "=", "new", "Thread", "(", "this", ")", ";", "rconThread", ".", "start", "(", ")", ";", "running", "=", "true", ";", "}", "public", "boolean", "isRunning", "(", ")", "{", "return", "running", ";", "}", "protected", "void", "logInfo", "(", "String", "par1Str", ")", "{", "server", ".", "logIn", "(", "par1Str", ")", ";", "}", "protected", "void", "log", "(", "String", "par1Str", ")", "{", "server", ".", "log", "(", "par1Str", ")", ";", "}", "protected", "void", "logWarning", "(", "String", "par1Str", ")", "{", "server", ".", "logWarning", "(", "par1Str", ")", ";", "}", "protected", "void", "logSevere", "(", "String", "par1Str", ")", "{", "server", ".", "logSevere", "(", "par1Str", ")", ";", "}", "protected", "int", "getNumberOfPlayers", "(", ")", "{", "return", "server", ".", "playersOnline", "(", ")", ";", "}", "protected", "void", "registerSocket", "(", "DatagramSocket", "par1DatagramSocket", ")", "{", "logInfo", "(", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "\"\"", ")", ".", "append", "(", "par1DatagramSocket", ")", ".", "toString", "(", ")", ")", ";", "socketList", ".", "add", "(", "par1DatagramSocket", ")", ";", "}", "protected", "boolean", "closeSocket", "(", "DatagramSocket", "par1DatagramSocket", ",", "boolean", "par2", ")", "{", "logInfo", "(", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "\"\"", ")", ".", "append", "(", "par1DatagramSocket", ")", ".", "toString", "(", ")", ")", ";", "if", "(", "null", "==", "par1DatagramSocket", ")", "{", "return", "false", ";", "}", "boolean", "flag", "=", "false", ";", "if", "(", "!", "par1DatagramSocket", ".", "isClosed", "(", ")", ")", "{", "par1DatagramSocket", ".", "close", "(", ")", ";", "flag", "=", "true", ";", "}", "if", "(", "par2", ")", "{", "socketList", ".", "remove", "(", "par1DatagramSocket", ")", ";", "}", "return", "flag", ";", "}", "protected", "boolean", "closeServerSocket", "(", "ServerSocket", "par1ServerSocket", ")", "{", "return", "closeServerSocket_do", "(", "par1ServerSocket", ",", "true", ")", ";", "}", "protected", "boolean", "closeServerSocket_do", "(", "ServerSocket", "par1ServerSocket", ",", "boolean", "par2", ")", "{", "logInfo", "(", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "\"\"", ")", ".", "append", "(", "par1ServerSocket", ")", ".", "toString", "(", ")", ")", ";", "if", "(", "null", "==", "par1ServerSocket", ")", "{", "return", "false", ";", "}", "boolean", "flag", "=", "false", ";", "try", "{", "if", "(", "!", "par1ServerSocket", ".", "isClosed", "(", ")", ")", "{", "par1ServerSocket", ".", "close", "(", ")", ";", "flag", "=", "true", ";", "}", "}", "catch", "(", "IOException", "ioexception", ")", "{", "logWarning", "(", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "\"IO:", "\"", ")", ".", "append", "(", "ioexception", ".", "getMessage", "(", ")", ")", ".", "toString", "(", ")", ")", ";", "}", "if", "(", "par2", ")", "{", "serverSocketList", ".", "remove", "(", "par1ServerSocket", ")", ";", "}", "return", "flag", ";", "}", "protected", "void", "closeAllSockets", "(", ")", "{", "clos", "(", "false", ")", ";", "}", "protected", "void", "clos", "(", "boolean", "par1", ")", "{", "int", "i", "=", "0", ";", "Iterator", "iterator", "=", "socketList", ".", "iterator", "(", ")", ";", "do", "{", "if", "(", "!", "iterator", ".", "hasNext", "(", ")", ")", "{", "break", ";", "}", "DatagramSocket", "datagramsocket", "=", "(", "DatagramSocket", ")", "iterator", ".", "next", "(", ")", ";", "if", "(", "closeSocket", "(", "datagramsocket", ",", "false", ")", ")", "{", "i", "++", ";", "}", "}", "while", "(", "true", ")", ";", "socketList", ".", "clear", "(", ")", ";", "iterator", "=", "serverSocketList", ".", "iterator", "(", ")", ";", "do", "{", "if", "(", "!", "iterator", ".", "hasNext", "(", ")", ")", "{", "break", ";", "}", "ServerSocket", "serversocket", "=", "(", "ServerSocket", ")", "iterator", ".", "next", "(", ")", ";", "if", "(", "closeServerSocket_do", "(", "serversocket", ",", "false", ")", ")", "{", "i", "++", ";", "}", "}", "while", "(", "true", ")", ";", "serverSocketList", ".", "clear", "(", ")", ";", "if", "(", "par1", "&&", "0", "<", "i", ")", "{", "logWarning", "(", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "\"\"", ")", ".", "append", "(", "i", ")", ".", "append", "(", "\"", "sockets\"", ")", ".", "toString", "(", ")", ")", ";", "}", "}", "}", "</s>" ]
9,898
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "*", ";", "public", "class", "WeightedRandom", "{", "public", "WeightedRandom", "(", ")", "{", "}", "public", "static", "int", "getTotalWeight", "(", "Collection", "par0Collection", ")", "{", "int", "i", "=", "0", ";", "for", "(", "Iterator", "iterator", "=", "par0Collection", ".", "iterator", "(", ")", ";", "iterator", ".", "hasNext", "(", ")", ";", ")", "{", "WeightedRandomChoice", "weightedrandomchoice", "=", "(", "WeightedRandomChoice", ")", "iterator", ".", "next", "(", ")", ";", "i", "+=", "weightedrandomchoice", ".", "itemWeight", ";", "}", "return", "i", ";", "}", "public", "static", "WeightedRandomChoice", "getRandomItem", "(", "Random", "par0Random", ",", "Collection", "par1Collection", ",", "int", "par2", ")", "{", "if", "(", "par2", "<=", "0", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "int", "i", "=", "par0Random", ".", "nextInt", "(", "par2", ")", ";", "for", "(", "Iterator", "iterator", "=", "par1Collection", ".", "iterator", "(", ")", ";", "iterator", ".", "hasNext", "(", ")", ";", ")", "{", "WeightedRandomChoice", "weightedrandomchoice", "=", "(", "WeightedRandomChoice", ")", "iterator", ".", "next", "(", ")", ";", "i", "-=", "weightedrandomchoice", ".", "itemWeight", ";", "if", "(", "i", "<", "0", ")", "{", "return", "weightedrandomchoice", ";", "}", "}", "return", "null", ";", "}", "public", "static", "WeightedRandomChoice", "getRandomItem", "(", "Random", "par0Random", ",", "Collection", "par1Collection", ")", "{", "return", "getRandomItem", "(", "par0Random", ",", "par1Collection", ",", "getTotalWeight", "(", "par1Collection", ")", ")", ";", "}", "public", "static", "int", "getTotalWeight", "(", "WeightedRandomChoice", "par0ArrayOfWeightedRandomChoice", "[", "]", ")", "{", "int", "i", "=", "0", ";", "WeightedRandomChoice", "aweightedrandomchoice", "[", "]", "=", "par0ArrayOfWeightedRandomChoice", ";", "int", "j", "=", "aweightedrandomchoice", ".", "length", ";", "for", "(", "int", "k", "=", "0", ";", "k", "<", "j", ";", "k", "++", ")", "{", "WeightedRandomChoice", "weightedrandomchoice", "=", "aweightedrandomchoice", "[", "k", "]", ";", "i", "+=", "weightedrandomchoice", ".", "itemWeight", ";", "}", "return", "i", ";", "}", "public", "static", "WeightedRandomChoice", "getRandomItem", "(", "Random", "par0Random", ",", "WeightedRandomChoice", "par1ArrayOfWeightedRandomChoice", "[", "]", ",", "int", "par2", ")", "{", "if", "(", "par2", "<=", "0", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "int", "i", "=", "par0Random", ".", "nextInt", "(", "par2", ")", ";", "WeightedRandomChoice", "aweightedrandomchoice", "[", "]", "=", "par1ArrayOfWeightedRandomChoice", ";", "int", "j", "=", "aweightedrandomchoice", ".", "length", ";", "for", "(", "int", "k", "=", "0", ";", "k", "<", "j", ";", "k", "++", ")", "{", "WeightedRandomChoice", "weightedrandomchoice", "=", "aweightedrandomchoice", "[", "k", "]", ";", "i", "-=", "weightedrandomchoice", ".", "itemWeight", ";", "if", "(", "i", "<", "0", ")", "{", "return", "weightedrandomchoice", ";", "}", "}", "return", "null", ";", "}", "public", "static", "WeightedRandomChoice", "getRandomItem", "(", "Random", "par0Random", ",", "WeightedRandomChoice", "par1ArrayOfWeightedRandomChoice", "[", "]", ")", "{", "return", "getRandomItem", "(", "par0Random", ",", "par1ArrayOfWeightedRandomChoice", ",", "getTotalWeight", "(", "par1ArrayOfWeightedRandomChoice", ")", ")", ";", "}", "}", "</s>" ]
9,899
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "*", ";", "public", "class", "Explosion", "{", "public", "boolean", "isFlaming", ";", "private", "Random", "explosionRNG", ";", "private", "World", "worldObj", ";", "public", "double", "explosionX", ";", "public", "double", "explosionY", ";", "public", "double", "explosionZ", ";", "public", "Entity", "exploder", ";", "public", "float", "explosionSize", ";", "public", "Set", "destroyedBlockPositions", ";", "public", "Explosion", "(", "World", "par1World", ",", "Entity", "par2Entity", ",", "double", "par3", ",", "double", "par5", ",", "double", "par7", ",", "float", "par9", ")", "{", "isFlaming", "=", "false", ";", "explosionRNG", "=", "new", "Random", "(", ")", ";", "destroyedBlockPositions", "=", "new", "HashSet", "(", ")", ";", "worldObj", "=", "par1World", ";", "exploder", "=", "par2Entity", ";", "explosionSize", "=", "par9", ";", "explosionX", "=", "par3", ";", "explosionY", "=", "par5", ";", "explosionZ", "=", "par7", ";", "}", "public", "void", "doExplosionA", "(", ")", "{", "float", "f", "=", "explosionSize", ";", "int", "i", "=", "16", ";", "for", "(", "int", "j", "=", "0", ";", "j", "<", "i", ";", "j", "++", ")", "{", "for", "(", "int", "l", "=", "0", ";", "l", "<", "i", ";", "l", "++", ")", "{", "label0", ":", "for", "(", "int", "j1", "=", "0", ";", "j1", "<", "i", ";", "j1", "++", ")", "{", "if", "(", "j", "!=", "0", "&&", "j", "!=", "i", "-", "1", "&&", "l", "!=", "0", "&&", "l", "!=", "i", "-", "1", "&&", "j1", "!=", "0", "&&", "j1", "!=", "i", "-", "1", ")", "{", "continue", ";", "}", "double", "d", "=", "(", "(", "float", ")", "j", "/", "(", "(", "float", ")", "i", "-", "1.0F", ")", ")", "*", "2.0F", "-", "1.0F", ";", "double", "d1", "=", "(", "(", "float", ")", "l", "/", "(", "(", "float", ")", "i", "-", "1.0F", ")", ")", "*", "2.0F", "-", "1.0F", ";", "double", "d2", "=", "(", "(", "float", ")", "j1", "/", "(", "(", "float", ")", "i", "-", "1.0F", ")", ")", "*", "2.0F", "-", "1.0F", ";", "double", "d3", "=", "Math", ".", "sqrt", "(", "d", "*", "d", "+", "d1", "*", "d1", "+", "d2", "*", "d2", ")", ";", "d", "/=", "d3", ";", "d1", "/=", "d3", ";", "d2", "/=", "d3", ";", "float", "f1", "=", "explosionSize", "*", "(", "0.7F", "+", "worldObj", ".", "rand", ".", "nextFloat", "(", ")", "*", "0.6F", ")", ";", "double", "d5", "=", "explosionX", ";", "double", "d7", "=", "explosionY", ";", "double", "d9", "=", "explosionZ", ";", "float", "f2", "=", "0.3F", ";", "do", "{", "if", "(", "f1", "<=", "0.0F", ")", "{", "continue", "label0", ";", "}", "int", "l2", "=", "MathHelper", ".", "floor_double", "(", "d5", ")", ";", "int", "i3", "=", "MathHelper", ".", "floor_double", "(", "d7", ")", ";", "int", "j3", "=", "MathHelper", ".", "floor_double", "(", "d9", ")", ";", "int", "k3", "=", "worldObj", ".", "getBlockId", "(", "l2", ",", "i3", ",", "j3", ")", ";", "if", "(", "k3", ">", "0", ")", "{", "f1", "-=", "(", "Block", ".", "blocksList", "[", "k3", "]", ".", "getExplosionResistance", "(", "exploder", ")", "+", "0.3F", ")", "*", "f2", ";", "}", "if", "(", "f1", ">", "0.0F", ")", "{", "destroyedBlockPositions", ".", "add", "(", "new", "ChunkPosition", "(", "l2", ",", "i3", ",", "j3", ")", ")", ";", "}", "d5", "+=", "d", "*", "(", "double", ")", "f2", ";", "d7", "+=", "d1", "*", "(", "double", ")", "f2", ";", "d9", "+=", "d2", "*", "(", "double", ")", "f2", ";", "f1", "-=", "f2", "*", "0.75F", ";", "}", "while", "(", "true", ")", ";", "}", "}", "}", "explosionSize", "*=", "2.0F", ";", "int", "k", "=", "MathHelper", ".", "floor_double", "(", "explosionX", "-", "(", "double", ")", "explosionSize", "-", "1.0D", ")", ";", "int", "i1", "=", "MathHelper", ".", "floor_double", "(", "explosionX", "+", "(", "double", ")", "explosionSize", "+", "1.0D", ")", ";", "int", "k1", "=", "MathHelper", ".", "floor_double", "(", "explosionY", "-", "(", "double", ")", "explosionSize", "-", "1.0D", ")", ";", "int", "l1", "=", "MathHelper", ".", "floor_double", "(", "explosionY", "+", "(", "double", ")", "explosionSize", "+", "1.0D", ")", ";", "int", "i2", "=", "MathHelper", ".", "floor_double", "(", "explosionZ", "-", "(", "double", ")", "explosionSize", "-", "1.0D", ")", ";", "int", "j2", "=", "MathHelper", ".", "floor_double", "(", "explosionZ", "+", "(", "double", ")", "explosionSize", "+", "1.0D", ")", ";", "List", "list", "=", "worldObj", ".", "getEntitiesWithinAABBExcludingEntity", "(", "exploder", ",", "AxisAlignedBB", ".", "getBoundingBoxFromPool", "(", "k", ",", "k1", ",", "i2", ",", "i1", ",", "l1", ",", "j2", ")", ")", ";", "Vec3D", "vec3d", "=", "Vec3D", ".", "createVector", "(", "explosionX", ",", "explosionY", ",", "explosionZ", ")", ";", "for", "(", "int", "k2", "=", "0", ";", "k2", "<", "list", ".", "size", "(", ")", ";", "k2", "++", ")", "{", "Entity", "entity", "=", "(", "Entity", ")", "list", ".", "get", "(", "k2", ")", ";", "double", "d4", "=", "entity", ".", "getDistance", "(", "explosionX", ",", "explosionY", ",", "explosionZ", ")", "/", "(", "double", ")", "explosionSize", ";", "if", "(", "d4", "<=", "1.0D", ")", "{", "double", "d6", "=", "entity", ".", "posX", "-", "explosionX", ";", "double", "d8", "=", "entity", ".", "posY", "-", "explosionY", ";", "double", "d10", "=", "entity", ".", "posZ", "-", "explosionZ", ";", "double", "d11", "=", "MathHelper", ".", "sqrt_double", "(", "d6", "*", "d6", "+", "d8", "*", "d8", "+", "d10", "*", "d10", ")", ";", "d6", "/=", "d11", ";", "d8", "/=", "d11", ";", "d10", "/=", "d11", ";", "double", "d12", "=", "worldObj", ".", "getBlockDensity", "(", "vec3d", ",", "entity", ".", "boundingBox", ")", ";", "double", "d13", "=", "(", "1.0D", "-", "d4", ")", "*", "d12", ";", "entity", ".", "attackEntityFrom", "(", "DamageSource", ".", "explosion", ",", "(", "int", ")", "(", "(", "(", "d13", "*", "d13", "+", "d13", ")", "/", "2D", ")", "*", "8D", "*", "(", "double", ")", "explosionSize", "+", "1.0D", ")", ")", ";", "double", "d14", "=", "d13", ";", "entity", ".", "motionX", "+=", "d6", "*", "d14", ";", "entity", ".", "motionY", "+=", "d8", "*", "d14", ";", "entity", ".", "motionZ", "+=", "d10", "*", "d14", ";", "}", "}", "explosionSize", "=", "f", ";", "ArrayList", "arraylist", "=", "new", "ArrayList", "(", ")", ";", "arraylist", ".", "addAll", "(", "destroyedBlockPositions", ")", ";", "}", "public", "void", "doExplosionB", "(", "boolean", "par1", ")", "{", "worldObj", ".", "playSoundEffect", "(", "explosionX", ",", "explosionY", ",", "explosionZ", ",", "\"\"", ",", "4F", ",", "(", "1.0F", "+", "(", "worldObj", ".", "rand", ".", "nextFloat", "(", ")", "-", "worldObj", ".", "rand", ".", "nextFloat", "(", ")", ")", "*", "0.2F", ")", "*", "0.7F", ")", ";", "worldObj", ".", "spawnParticle", "(", "\"\"", ",", "explosionX", ",", "explosionY", ",", "explosionZ", ",", "0.0D", ",", "0.0D", ",", "0.0D", ")", ";", "ArrayList", "arraylist", "=", "new", "ArrayList", "(", ")", ";", "arraylist", ".", "addAll", "(", "destroyedBlockPositions", ")", ";", "for", "(", "int", "i", "=", "arraylist", ".", "size", "(", ")", "-", "1", ";", "i", ">=", "0", ";", "i", "--", ")", "{", "ChunkPosition", "chunkposition", "=", "(", "ChunkPosition", ")", "arraylist", ".", "get", "(", "i", ")", ";", "int", "k", "=", "chunkposition", ".", "x", ";", "int", "i1", "=", "chunkposition", ".", "y", ";", "int", "k1", "=", "chunkposition", ".", "z", ";", "int", "i2", "=", "worldObj", ".", "getBlockId", "(", "k", ",", "i1", ",", "k1", ")", ";", "if", "(", "par1", ")", "{", "double", "d", "=", "(", "float", ")", "k", "+", "worldObj", ".", "rand", ".", "nextFloat", "(", ")", ";", "double", "d1", "=", "(", "float", ")", "i1", "+", "worldObj", ".", "rand", ".", "nextFloat", "(", ")", ";", "double", "d2", "=", "(", "float", ")", "k1", "+", "worldObj", ".", "rand", ".", "nextFloat", "(", ")", ";", "double", "d3", "=", "d", "-", "explosionX", ";", "double", "d4", "=", "d1", "-", "explosionY", ";", "double", "d5", "=", "d2", "-", "explosionZ", ";", "double", "d6", "=", "MathHelper", ".", "sqrt_double", "(", "d3", "*", "d3", "+", "d4", "*", "d4", "+", "d5", "*", "d5", ")", ";", "d3", "/=", "d6", ";", "d4", "/=", "d6", ";", "d5", "/=", "d6", ";", "double", "d7", "=", "0.5D", "/", "(", "d6", "/", "(", "double", ")", "explosionSize", "+", "0.10000000000000001D", ")", ";", "d7", "*=", "worldObj", ".", "rand", ".", "nextFloat", "(", ")", "*", "worldObj", ".", "rand", ".", "nextFloat", "(", ")", "+", "0.3F", ";", "d3", "*=", "d7", ";", "d4", "*=", "d7", ";", "d5", "*=", "d7", ";", "worldObj", ".", "spawnParticle", "(", "\"explode\"", ",", "(", "d", "+", "explosionX", "*", "1.0D", ")", "/", "2D", ",", "(", "d1", "+", "explosionY", "*", "1.0D", ")", "/", "2D", ",", "(", "d2", "+", "explosionZ", "*", "1.0D", ")", "/", "2D", ",", "d3", ",", "d4", ",", "d5", ")", ";", "worldObj", ".", "spawnParticle", "(", "\"smoke\"", ",", "d", ",", "d1", ",", "d2", ",", "d3", ",", "d4", ",", "d5", ")", ";", "}", "if", "(", "i2", ">", "0", ")", "{", "Block", ".", "blocksList", "[", "i2", "]", ".", "dropBlockAsItemWithChance", "(", "worldObj", ",", "k", ",", "i1", ",", "k1", ",", "worldObj", ".", "getBlockMetadata", "(", "k", ",", "i1", ",", "k1", ")", ",", "0.3F", ",", "0", ")", ";", "worldObj", ".", "setBlockWithNotify", "(", "k", ",", "i1", ",", "k1", ",", "0", ")", ";", "Block", ".", "blocksList", "[", "i2", "]", ".", "onBlockDestroyedByExplosion", "(", "worldObj", ",", "k", ",", "i1", ",", "k1", ")", ";", "}", "}", "if", "(", "isFlaming", ")", "{", "for", "(", "int", "j", "=", "arraylist", ".", "size", "(", ")", "-", "1", ";", "j", ">=", "0", ";", "j", "--", ")", "{", "ChunkPosition", "chunkposition1", "=", "(", "ChunkPosition", ")", "arraylist", ".", "get", "(", "j", ")", ";", "int", "l", "=", "chunkposition1", ".", "x", ";", "int", "j1", "=", "chunkposition1", ".", "y", ";", "int", "l1", "=", "chunkposition1", ".", "z", ";", "int", "j2", "=", "worldObj", ".", "getBlockId", "(", "l", ",", "j1", ",", "l1", ")", ";", "int", "k2", "=", "worldObj", ".", "getBlockId", "(", "l", ",", "j1", "-", "1", ",", "l1", ")", ";", "if", "(", "j2", "==", "0", "&&", "Block", ".", "opaqueCubeLookup", "[", "k2", "]", "&&", "explosionRNG", ".", "nextInt", "(", "3", ")", "==", "0", ")", "{", "worldObj", ".", "setBlockWithNotify", "(", "l", ",", "j1", ",", "l1", ",", "Block", ".", "fire", ".", "blockID", ")", ";", "}", "}", "}", "}", "}", "</s>" ]