id
int32 0
12.9k
| code
sequencelengths 2
264k
|
---|---|
9,300 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"BlockMushroom",
"extends",
"BlockFlower",
"{",
"protected",
"BlockMushroom",
"(",
"int",
"par1",
",",
"int",
"par2",
")",
"{",
"super",
"(",
"par1",
",",
"par2",
")",
";",
"float",
"f",
"=",
"0.2F",
";",
"setBlockBounds",
"(",
"0.5F",
"-",
"f",
",",
"0.0F",
",",
"0.5F",
"-",
"f",
",",
"0.5F",
"+",
"f",
",",
"f",
"*",
"2.0F",
",",
"0.5F",
"+",
"f",
")",
";",
"setTickRandomly",
"(",
"true",
")",
";",
"}",
"public",
"void",
"updateTick",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"Random",
"par5Random",
")",
"{",
"if",
"(",
"par5Random",
".",
"nextInt",
"(",
"25",
")",
"==",
"0",
")",
"{",
"byte",
"byte0",
"=",
"4",
";",
"int",
"i",
"=",
"5",
";",
"for",
"(",
"int",
"j",
"=",
"par2",
"-",
"byte0",
";",
"j",
"<=",
"par2",
"+",
"byte0",
";",
"j",
"++",
")",
"{",
"for",
"(",
"int",
"l",
"=",
"par4",
"-",
"byte0",
";",
"l",
"<=",
"par4",
"+",
"byte0",
";",
"l",
"++",
")",
"{",
"for",
"(",
"int",
"j1",
"=",
"par3",
"-",
"1",
";",
"j1",
"<=",
"par3",
"+",
"1",
";",
"j1",
"++",
")",
"{",
"if",
"(",
"par1World",
".",
"getBlockId",
"(",
"j",
",",
"j1",
",",
"l",
")",
"==",
"blockID",
"&&",
"--",
"i",
"<=",
"0",
")",
"{",
"return",
";",
"}",
"}",
"}",
"}",
"int",
"k",
"=",
"(",
"par2",
"+",
"par5Random",
".",
"nextInt",
"(",
"3",
")",
")",
"-",
"1",
";",
"int",
"i1",
"=",
"(",
"par3",
"+",
"par5Random",
".",
"nextInt",
"(",
"2",
")",
")",
"-",
"par5Random",
".",
"nextInt",
"(",
"2",
")",
";",
"int",
"k1",
"=",
"(",
"par4",
"+",
"par5Random",
".",
"nextInt",
"(",
"3",
")",
")",
"-",
"1",
";",
"for",
"(",
"int",
"l1",
"=",
"0",
";",
"l1",
"<",
"4",
";",
"l1",
"++",
")",
"{",
"if",
"(",
"par1World",
".",
"isAirBlock",
"(",
"k",
",",
"i1",
",",
"k1",
")",
"&&",
"canBlockStay",
"(",
"par1World",
",",
"k",
",",
"i1",
",",
"k1",
")",
")",
"{",
"par2",
"=",
"k",
";",
"par3",
"=",
"i1",
";",
"par4",
"=",
"k1",
";",
"}",
"k",
"=",
"(",
"par2",
"+",
"par5Random",
".",
"nextInt",
"(",
"3",
")",
")",
"-",
"1",
";",
"i1",
"=",
"(",
"par3",
"+",
"par5Random",
".",
"nextInt",
"(",
"2",
")",
")",
"-",
"par5Random",
".",
"nextInt",
"(",
"2",
")",
";",
"k1",
"=",
"(",
"par4",
"+",
"par5Random",
".",
"nextInt",
"(",
"3",
")",
")",
"-",
"1",
";",
"}",
"if",
"(",
"par1World",
".",
"isAirBlock",
"(",
"k",
",",
"i1",
",",
"k1",
")",
"&&",
"canBlockStay",
"(",
"par1World",
",",
"k",
",",
"i1",
",",
"k1",
")",
")",
"{",
"par1World",
".",
"setBlockWithNotify",
"(",
"k",
",",
"i1",
",",
"k1",
",",
"blockID",
")",
";",
"}",
"}",
"}",
"public",
"boolean",
"canPlaceBlockAt",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"return",
"super",
".",
"canPlaceBlockAt",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
")",
"&&",
"canBlockStay",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"}",
"protected",
"boolean",
"canThisPlantGrowOnThisBlockID",
"(",
"int",
"par1",
")",
"{",
"return",
"Block",
".",
"opaqueCubeLookup",
"[",
"par1",
"]",
";",
"}",
"public",
"boolean",
"canBlockStay",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"if",
"(",
"par3",
"<",
"0",
"||",
"par3",
">=",
"256",
")",
"{",
"return",
"false",
";",
"}",
"else",
"{",
"int",
"i",
"=",
"par1World",
".",
"getBlockId",
"(",
"par2",
",",
"par3",
"-",
"1",
",",
"par4",
")",
";",
"return",
"i",
"==",
"Block",
".",
"mycelium",
".",
"blockID",
"||",
"par1World",
".",
"getFullBlockLightValue",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
"<",
"13",
"&&",
"canThisPlantGrowOnThisBlockID",
"(",
"i",
")",
";",
"}",
"}",
"public",
"boolean",
"fertilizeMushroom",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"Random",
"par5Random",
")",
"{",
"int",
"i",
"=",
"par1World",
".",
"getBlockMetadata",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"par1World",
".",
"setBlock",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"0",
")",
";",
"WorldGenBigMushroom",
"worldgenbigmushroom",
"=",
"null",
";",
"if",
"(",
"blockID",
"==",
"Block",
".",
"mushroomBrown",
".",
"blockID",
")",
"{",
"worldgenbigmushroom",
"=",
"new",
"WorldGenBigMushroom",
"(",
"0",
")",
";",
"}",
"else",
"if",
"(",
"blockID",
"==",
"Block",
".",
"mushroomRed",
".",
"blockID",
")",
"{",
"worldgenbigmushroom",
"=",
"new",
"WorldGenBigMushroom",
"(",
"1",
")",
";",
"}",
"if",
"(",
"worldgenbigmushroom",
"==",
"null",
"||",
"!",
"worldgenbigmushroom",
".",
"generate",
"(",
"par1World",
",",
"par5Random",
",",
"par2",
",",
"par3",
",",
"par4",
")",
")",
"{",
"par1World",
".",
"setBlockAndMetadata",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"blockID",
",",
"i",
")",
";",
"return",
"false",
";",
"}",
"else",
"{",
"return",
"true",
";",
"}",
"}",
"}",
"</s>"
] |
9,301 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"BlockMushroomCap",
"extends",
"Block",
"{",
"private",
"int",
"mushroomType",
";",
"public",
"BlockMushroomCap",
"(",
"int",
"par1",
",",
"Material",
"par2Material",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"super",
"(",
"par1",
",",
"par3",
",",
"par2Material",
")",
";",
"mushroomType",
"=",
"par4",
";",
"}",
"public",
"int",
"getBlockTextureFromSideAndMetadata",
"(",
"int",
"par1",
",",
"int",
"par2",
")",
"{",
"if",
"(",
"par2",
"==",
"10",
"&&",
"par1",
">",
"1",
")",
"{",
"return",
"blockIndexInTexture",
"-",
"1",
";",
"}",
"if",
"(",
"par2",
">=",
"1",
"&&",
"par2",
"<=",
"9",
"&&",
"par1",
"==",
"1",
")",
"{",
"return",
"blockIndexInTexture",
"-",
"16",
"-",
"mushroomType",
";",
"}",
"if",
"(",
"par2",
">=",
"1",
"&&",
"par2",
"<=",
"3",
"&&",
"par1",
"==",
"2",
")",
"{",
"return",
"blockIndexInTexture",
"-",
"16",
"-",
"mushroomType",
";",
"}",
"if",
"(",
"par2",
">=",
"7",
"&&",
"par2",
"<=",
"9",
"&&",
"par1",
"==",
"3",
")",
"{",
"return",
"blockIndexInTexture",
"-",
"16",
"-",
"mushroomType",
";",
"}",
"if",
"(",
"(",
"par2",
"==",
"1",
"||",
"par2",
"==",
"4",
"||",
"par2",
"==",
"7",
")",
"&&",
"par1",
"==",
"4",
")",
"{",
"return",
"blockIndexInTexture",
"-",
"16",
"-",
"mushroomType",
";",
"}",
"if",
"(",
"(",
"par2",
"==",
"3",
"||",
"par2",
"==",
"6",
"||",
"par2",
"==",
"9",
")",
"&&",
"par1",
"==",
"5",
")",
"{",
"return",
"blockIndexInTexture",
"-",
"16",
"-",
"mushroomType",
";",
"}",
"if",
"(",
"par2",
"==",
"14",
")",
"{",
"return",
"blockIndexInTexture",
"-",
"16",
"-",
"mushroomType",
";",
"}",
"if",
"(",
"par2",
"==",
"15",
")",
"{",
"return",
"blockIndexInTexture",
"-",
"1",
";",
"}",
"else",
"{",
"return",
"blockIndexInTexture",
";",
"}",
"}",
"public",
"int",
"quantityDropped",
"(",
"Random",
"par1Random",
")",
"{",
"int",
"i",
"=",
"par1Random",
".",
"nextInt",
"(",
"10",
")",
"-",
"7",
";",
"if",
"(",
"i",
"<",
"0",
")",
"{",
"i",
"=",
"0",
";",
"}",
"return",
"i",
";",
"}",
"public",
"int",
"idDropped",
"(",
"int",
"par1",
",",
"Random",
"par2Random",
",",
"int",
"par3",
")",
"{",
"return",
"Block",
".",
"mushroomBrown",
".",
"blockID",
"+",
"mushroomType",
";",
"}",
"}",
"</s>"
] |
9,302 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"ComponentVillageField",
"extends",
"ComponentVillage",
"{",
"private",
"int",
"averageGroundLevel",
";",
"public",
"ComponentVillageField",
"(",
"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",
"ComponentVillageField",
"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",
",",
"13",
",",
"4",
",",
"9",
",",
"par5",
")",
";",
"if",
"(",
"!",
"canVillageGoDeeper",
"(",
"structureboundingbox",
")",
"||",
"StructureComponent",
".",
"findIntersecting",
"(",
"par0List",
",",
"structureboundingbox",
")",
"!=",
"null",
")",
"{",
"return",
"null",
";",
"}",
"else",
"{",
"return",
"new",
"ComponentVillageField",
"(",
"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",
",",
"12",
",",
"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",
",",
"7",
",",
"0",
",",
"1",
",",
"8",
",",
"0",
",",
"7",
",",
"Block",
".",
"tilledField",
".",
"blockID",
",",
"Block",
".",
"tilledField",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"10",
",",
"0",
",",
"1",
",",
"11",
",",
"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",
",",
"12",
",",
"0",
",",
"0",
",",
"12",
",",
"0",
",",
"8",
",",
"Block",
".",
"wood",
".",
"blockID",
",",
"Block",
".",
"wood",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"1",
",",
"0",
",",
"0",
",",
"11",
",",
"0",
",",
"0",
",",
"Block",
".",
"wood",
".",
"blockID",
",",
"Block",
".",
"wood",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"1",
",",
"0",
",",
"8",
",",
"11",
",",
"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",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"9",
",",
"0",
",",
"1",
",",
"9",
",",
"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",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"crops",
".",
"blockID",
",",
"MathHelper",
".",
"getRandomIntegerInRange",
"(",
"par2Random",
",",
"2",
",",
"7",
")",
",",
"7",
",",
"1",
",",
"i",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"crops",
".",
"blockID",
",",
"MathHelper",
".",
"getRandomIntegerInRange",
"(",
"par2Random",
",",
"2",
",",
"7",
")",
",",
"8",
",",
"1",
",",
"i",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"crops",
".",
"blockID",
",",
"MathHelper",
".",
"getRandomIntegerInRange",
"(",
"par2Random",
",",
"2",
",",
"7",
")",
",",
"10",
",",
"1",
",",
"i",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"crops",
".",
"blockID",
",",
"MathHelper",
".",
"getRandomIntegerInRange",
"(",
"par2Random",
",",
"2",
",",
"7",
")",
",",
"11",
",",
"1",
",",
"i",
",",
"par3StructureBoundingBox",
")",
";",
"}",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
"9",
";",
"j",
"++",
")",
"{",
"for",
"(",
"int",
"k",
"=",
"0",
";",
"k",
"<",
"13",
";",
"k",
"++",
")",
"{",
"clearCurrentPositionBlocksUpwards",
"(",
"par1World",
",",
"k",
",",
"4",
",",
"j",
",",
"par3StructureBoundingBox",
")",
";",
"fillCurrentPositionBlocksDownwards",
"(",
"par1World",
",",
"Block",
".",
"dirt",
".",
"blockID",
",",
"0",
",",
"k",
",",
"-",
"1",
",",
"j",
",",
"par3StructureBoundingBox",
")",
";",
"}",
"}",
"return",
"true",
";",
"}",
"}",
"</s>"
] |
9,303 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"abstract",
"class",
"EntityWeatherEffect",
"extends",
"Entity",
"{",
"public",
"EntityWeatherEffect",
"(",
"World",
"par1World",
")",
"{",
"super",
"(",
"par1World",
")",
";",
"}",
"}",
"</s>"
] |
9,304 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"ItemFood",
"extends",
"Item",
"{",
"public",
"final",
"int",
"field_35427_a",
"=",
"32",
";",
"private",
"final",
"int",
"healAmount",
";",
"private",
"final",
"float",
"saturationModifier",
";",
"private",
"final",
"boolean",
"isWolfsFavoriteMeat",
";",
"private",
"boolean",
"alwaysEdible",
";",
"private",
"int",
"potionId",
";",
"private",
"int",
"potionDuration",
";",
"private",
"int",
"potionAmplifier",
";",
"private",
"float",
"potionEffectProbability",
";",
"public",
"ItemFood",
"(",
"int",
"par1",
",",
"int",
"par2",
",",
"float",
"par3",
",",
"boolean",
"par4",
")",
"{",
"super",
"(",
"par1",
")",
";",
"healAmount",
"=",
"par2",
";",
"isWolfsFavoriteMeat",
"=",
"par4",
";",
"saturationModifier",
"=",
"par3",
";",
"}",
"public",
"ItemFood",
"(",
"int",
"par1",
",",
"int",
"par2",
",",
"boolean",
"par3",
")",
"{",
"this",
"(",
"par1",
",",
"par2",
",",
"0.6F",
",",
"par3",
")",
";",
"}",
"public",
"ItemStack",
"onFoodEaten",
"(",
"ItemStack",
"par1ItemStack",
",",
"World",
"par2World",
",",
"EntityPlayer",
"par3EntityPlayer",
")",
"{",
"par1ItemStack",
".",
"stackSize",
"--",
";",
"par3EntityPlayer",
".",
"getFoodStats",
"(",
")",
".",
"addStats",
"(",
"this",
")",
";",
"par2World",
".",
"playSoundAtEntity",
"(",
"par3EntityPlayer",
",",
"\"random.burp\"",
",",
"0.5F",
",",
"par2World",
".",
"rand",
".",
"nextFloat",
"(",
")",
"*",
"0.1F",
"+",
"0.9F",
")",
";",
"if",
"(",
"!",
"par2World",
".",
"isRemote",
"&&",
"potionId",
">",
"0",
"&&",
"par2World",
".",
"rand",
".",
"nextFloat",
"(",
")",
"<",
"potionEffectProbability",
")",
"{",
"par3EntityPlayer",
".",
"addPotionEffect",
"(",
"new",
"PotionEffect",
"(",
"potionId",
",",
"potionDuration",
"*",
"20",
",",
"potionAmplifier",
")",
")",
";",
"}",
"return",
"par1ItemStack",
";",
"}",
"public",
"int",
"getMaxItemUseDuration",
"(",
"ItemStack",
"par1ItemStack",
")",
"{",
"return",
"32",
";",
"}",
"public",
"EnumAction",
"getItemUseAction",
"(",
"ItemStack",
"par1ItemStack",
")",
"{",
"return",
"EnumAction",
".",
"eat",
";",
"}",
"public",
"ItemStack",
"onItemRightClick",
"(",
"ItemStack",
"par1ItemStack",
",",
"World",
"par2World",
",",
"EntityPlayer",
"par3EntityPlayer",
")",
"{",
"if",
"(",
"par3EntityPlayer",
".",
"canEat",
"(",
"alwaysEdible",
")",
")",
"{",
"par3EntityPlayer",
".",
"setItemInUse",
"(",
"par1ItemStack",
",",
"getMaxItemUseDuration",
"(",
"par1ItemStack",
")",
")",
";",
"}",
"return",
"par1ItemStack",
";",
"}",
"public",
"int",
"getHealAmount",
"(",
")",
"{",
"return",
"healAmount",
";",
"}",
"public",
"float",
"getSaturationModifier",
"(",
")",
"{",
"return",
"saturationModifier",
";",
"}",
"public",
"boolean",
"isWolfsFavoriteMeat",
"(",
")",
"{",
"return",
"isWolfsFavoriteMeat",
";",
"}",
"public",
"ItemFood",
"setPotionEffect",
"(",
"int",
"par1",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"float",
"par4",
")",
"{",
"potionId",
"=",
"par1",
";",
"potionDuration",
"=",
"par2",
";",
"potionAmplifier",
"=",
"par3",
";",
"potionEffectProbability",
"=",
"par4",
";",
"return",
"this",
";",
"}",
"public",
"ItemFood",
"setAlwaysEdible",
"(",
")",
"{",
"alwaysEdible",
"=",
"true",
";",
"return",
"this",
";",
"}",
"public",
"Item",
"setItemName",
"(",
"String",
"par1Str",
")",
"{",
"return",
"super",
".",
"setItemName",
"(",
"par1Str",
")",
";",
"}",
"}",
"</s>"
] |
9,305 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"WorldGenTrees",
"extends",
"WorldGenerator",
"{",
"private",
"final",
"int",
"field_48402_a",
";",
"private",
"final",
"boolean",
"field_48400_b",
";",
"private",
"final",
"int",
"field_48401_c",
";",
"private",
"final",
"int",
"field_48399_d",
";",
"public",
"WorldGenTrees",
"(",
"boolean",
"par1",
")",
"{",
"this",
"(",
"par1",
",",
"4",
",",
"0",
",",
"0",
",",
"false",
")",
";",
"}",
"public",
"WorldGenTrees",
"(",
"boolean",
"par1",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"boolean",
"par5",
")",
"{",
"super",
"(",
"par1",
")",
";",
"field_48402_a",
"=",
"par2",
";",
"field_48401_c",
"=",
"par3",
";",
"field_48399_d",
"=",
"par4",
";",
"field_48400_b",
"=",
"par5",
";",
"}",
"public",
"boolean",
"generate",
"(",
"World",
"par1World",
",",
"Random",
"par2Random",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
")",
"{",
"int",
"i",
"=",
"par2Random",
".",
"nextInt",
"(",
"3",
")",
"+",
"field_48402_a",
";",
"boolean",
"flag",
"=",
"true",
";",
"if",
"(",
"par4",
"<",
"1",
"||",
"par4",
"+",
"i",
"+",
"1",
">",
"256",
")",
"{",
"return",
"false",
";",
"}",
"for",
"(",
"int",
"j",
"=",
"par4",
";",
"j",
"<=",
"par4",
"+",
"1",
"+",
"i",
";",
"j",
"++",
")",
"{",
"byte",
"byte0",
"=",
"1",
";",
"if",
"(",
"j",
"==",
"par4",
")",
"{",
"byte0",
"=",
"0",
";",
"}",
"if",
"(",
"j",
">=",
"(",
"par4",
"+",
"1",
"+",
"i",
")",
"-",
"2",
")",
"{",
"byte0",
"=",
"2",
";",
"}",
"for",
"(",
"int",
"l",
"=",
"par3",
"-",
"byte0",
";",
"l",
"<=",
"par3",
"+",
"byte0",
"&&",
"flag",
";",
"l",
"++",
")",
"{",
"for",
"(",
"int",
"j1",
"=",
"par5",
"-",
"byte0",
";",
"j1",
"<=",
"par5",
"+",
"byte0",
"&&",
"flag",
";",
"j1",
"++",
")",
"{",
"if",
"(",
"j",
">=",
"0",
"&&",
"j",
"<",
"256",
")",
"{",
"int",
"j2",
"=",
"par1World",
".",
"getBlockId",
"(",
"l",
",",
"j",
",",
"j1",
")",
";",
"if",
"(",
"j2",
"!=",
"0",
"&&",
"j2",
"!=",
"Block",
".",
"leaves",
".",
"blockID",
"&&",
"j2",
"!=",
"Block",
".",
"grass",
".",
"blockID",
"&&",
"j2",
"!=",
"Block",
".",
"dirt",
".",
"blockID",
"&&",
"j2",
"!=",
"Block",
".",
"wood",
".",
"blockID",
")",
"{",
"flag",
"=",
"false",
";",
"}",
"}",
"else",
"{",
"flag",
"=",
"false",
";",
"}",
"}",
"}",
"}",
"if",
"(",
"!",
"flag",
")",
"{",
"return",
"false",
";",
"}",
"int",
"k",
"=",
"par1World",
".",
"getBlockId",
"(",
"par3",
",",
"par4",
"-",
"1",
",",
"par5",
")",
";",
"if",
"(",
"k",
"!=",
"Block",
".",
"grass",
".",
"blockID",
"&&",
"k",
"!=",
"Block",
".",
"dirt",
".",
"blockID",
"||",
"par4",
">=",
"256",
"-",
"i",
"-",
"1",
")",
"{",
"return",
"false",
";",
"}",
"func_50023_a",
"(",
"par1World",
",",
"par3",
",",
"par4",
"-",
"1",
",",
"par5",
",",
"Block",
".",
"dirt",
".",
"blockID",
")",
";",
"byte",
"byte1",
"=",
"3",
";",
"int",
"i1",
"=",
"0",
";",
"for",
"(",
"int",
"k1",
"=",
"(",
"par4",
"-",
"byte1",
")",
"+",
"i",
";",
"k1",
"<=",
"par4",
"+",
"i",
";",
"k1",
"++",
")",
"{",
"int",
"k2",
"=",
"k1",
"-",
"(",
"par4",
"+",
"i",
")",
";",
"int",
"j3",
"=",
"(",
"i1",
"+",
"1",
")",
"-",
"k2",
"/",
"2",
";",
"for",
"(",
"int",
"l3",
"=",
"par3",
"-",
"j3",
";",
"l3",
"<=",
"par3",
"+",
"j3",
";",
"l3",
"++",
")",
"{",
"int",
"j4",
"=",
"l3",
"-",
"par3",
";",
"for",
"(",
"int",
"l4",
"=",
"par5",
"-",
"j3",
";",
"l4",
"<=",
"par5",
"+",
"j3",
";",
"l4",
"++",
")",
"{",
"int",
"i5",
"=",
"l4",
"-",
"par5",
";",
"if",
"(",
"(",
"Math",
".",
"abs",
"(",
"j4",
")",
"!=",
"j3",
"||",
"Math",
".",
"abs",
"(",
"i5",
")",
"!=",
"j3",
"||",
"par2Random",
".",
"nextInt",
"(",
"2",
")",
"!=",
"0",
"&&",
"k2",
"!=",
"0",
")",
"&&",
"!",
"Block",
".",
"opaqueCubeLookup",
"[",
"par1World",
".",
"getBlockId",
"(",
"l3",
",",
"k1",
",",
"l4",
")",
"]",
")",
"{",
"setBlockAndMetadata",
"(",
"par1World",
",",
"l3",
",",
"k1",
",",
"l4",
",",
"Block",
".",
"leaves",
".",
"blockID",
",",
"field_48399_d",
")",
";",
"}",
"}",
"}",
"}",
"for",
"(",
"int",
"l1",
"=",
"0",
";",
"l1",
"<",
"i",
";",
"l1",
"++",
")",
"{",
"int",
"l2",
"=",
"par1World",
".",
"getBlockId",
"(",
"par3",
",",
"par4",
"+",
"l1",
",",
"par5",
")",
";",
"if",
"(",
"l2",
"!=",
"0",
"&&",
"l2",
"!=",
"Block",
".",
"leaves",
".",
"blockID",
")",
"{",
"continue",
";",
"}",
"setBlockAndMetadata",
"(",
"par1World",
",",
"par3",
",",
"par4",
"+",
"l1",
",",
"par5",
",",
"Block",
".",
"wood",
".",
"blockID",
",",
"field_48401_c",
")",
";",
"if",
"(",
"!",
"field_48400_b",
"||",
"l1",
"<=",
"0",
")",
"{",
"continue",
";",
"}",
"if",
"(",
"par2Random",
".",
"nextInt",
"(",
"3",
")",
">",
"0",
"&&",
"par1World",
".",
"isAirBlock",
"(",
"par3",
"-",
"1",
",",
"par4",
"+",
"l1",
",",
"par5",
")",
")",
"{",
"setBlockAndMetadata",
"(",
"par1World",
",",
"par3",
"-",
"1",
",",
"par4",
"+",
"l1",
",",
"par5",
",",
"Block",
".",
"vine",
".",
"blockID",
",",
"8",
")",
";",
"}",
"if",
"(",
"par2Random",
".",
"nextInt",
"(",
"3",
")",
">",
"0",
"&&",
"par1World",
".",
"isAirBlock",
"(",
"par3",
"+",
"1",
",",
"par4",
"+",
"l1",
",",
"par5",
")",
")",
"{",
"setBlockAndMetadata",
"(",
"par1World",
",",
"par3",
"+",
"1",
",",
"par4",
"+",
"l1",
",",
"par5",
",",
"Block",
".",
"vine",
".",
"blockID",
",",
"2",
")",
";",
"}",
"if",
"(",
"par2Random",
".",
"nextInt",
"(",
"3",
")",
">",
"0",
"&&",
"par1World",
".",
"isAirBlock",
"(",
"par3",
",",
"par4",
"+",
"l1",
",",
"par5",
"-",
"1",
")",
")",
"{",
"setBlockAndMetadata",
"(",
"par1World",
",",
"par3",
",",
"par4",
"+",
"l1",
",",
"par5",
"-",
"1",
",",
"Block",
".",
"vine",
".",
"blockID",
",",
"1",
")",
";",
"}",
"if",
"(",
"par2Random",
".",
"nextInt",
"(",
"3",
")",
">",
"0",
"&&",
"par1World",
".",
"isAirBlock",
"(",
"par3",
",",
"par4",
"+",
"l1",
",",
"par5",
"+",
"1",
")",
")",
"{",
"setBlockAndMetadata",
"(",
"par1World",
",",
"par3",
",",
"par4",
"+",
"l1",
",",
"par5",
"+",
"1",
",",
"Block",
".",
"vine",
".",
"blockID",
",",
"4",
")",
";",
"}",
"}",
"if",
"(",
"field_48400_b",
")",
"{",
"for",
"(",
"int",
"i2",
"=",
"(",
"par4",
"-",
"3",
")",
"+",
"i",
";",
"i2",
"<=",
"par4",
"+",
"i",
";",
"i2",
"++",
")",
"{",
"int",
"i3",
"=",
"i2",
"-",
"(",
"par4",
"+",
"i",
")",
";",
"int",
"k3",
"=",
"2",
"-",
"i3",
"/",
"2",
";",
"for",
"(",
"int",
"i4",
"=",
"par3",
"-",
"k3",
";",
"i4",
"<=",
"par3",
"+",
"k3",
";",
"i4",
"++",
")",
"{",
"for",
"(",
"int",
"k4",
"=",
"par5",
"-",
"k3",
";",
"k4",
"<=",
"par5",
"+",
"k3",
";",
"k4",
"++",
")",
"{",
"if",
"(",
"par1World",
".",
"getBlockId",
"(",
"i4",
",",
"i2",
",",
"k4",
")",
"!=",
"Block",
".",
"leaves",
".",
"blockID",
")",
"{",
"continue",
";",
"}",
"if",
"(",
"par2Random",
".",
"nextInt",
"(",
"4",
")",
"==",
"0",
"&&",
"par1World",
".",
"getBlockId",
"(",
"i4",
"-",
"1",
",",
"i2",
",",
"k4",
")",
"==",
"0",
")",
"{",
"func_48398_a",
"(",
"par1World",
",",
"i4",
"-",
"1",
",",
"i2",
",",
"k4",
",",
"8",
")",
";",
"}",
"if",
"(",
"par2Random",
".",
"nextInt",
"(",
"4",
")",
"==",
"0",
"&&",
"par1World",
".",
"getBlockId",
"(",
"i4",
"+",
"1",
",",
"i2",
",",
"k4",
")",
"==",
"0",
")",
"{",
"func_48398_a",
"(",
"par1World",
",",
"i4",
"+",
"1",
",",
"i2",
",",
"k4",
",",
"2",
")",
";",
"}",
"if",
"(",
"par2Random",
".",
"nextInt",
"(",
"4",
")",
"==",
"0",
"&&",
"par1World",
".",
"getBlockId",
"(",
"i4",
",",
"i2",
",",
"k4",
"-",
"1",
")",
"==",
"0",
")",
"{",
"func_48398_a",
"(",
"par1World",
",",
"i4",
",",
"i2",
",",
"k4",
"-",
"1",
",",
"1",
")",
";",
"}",
"if",
"(",
"par2Random",
".",
"nextInt",
"(",
"4",
")",
"==",
"0",
"&&",
"par1World",
".",
"getBlockId",
"(",
"i4",
",",
"i2",
",",
"k4",
"+",
"1",
")",
"==",
"0",
")",
"{",
"func_48398_a",
"(",
"par1World",
",",
"i4",
",",
"i2",
",",
"k4",
"+",
"1",
",",
"4",
")",
";",
"}",
"}",
"}",
"}",
"}",
"return",
"true",
";",
"}",
"private",
"void",
"func_48398_a",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
")",
"{",
"setBlockAndMetadata",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
",",
"Block",
".",
"vine",
".",
"blockID",
",",
"par5",
")",
";",
"for",
"(",
"int",
"i",
"=",
"4",
";",
"par1World",
".",
"getBlockId",
"(",
"par2",
",",
"--",
"par3",
",",
"par4",
")",
"==",
"0",
"&&",
"i",
">",
"0",
";",
"i",
"--",
")",
"{",
"setBlockAndMetadata",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
",",
"Block",
".",
"vine",
".",
"blockID",
",",
"par5",
")",
";",
"}",
"}",
"}",
"</s>"
] |
9,306 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"*",
";",
"public",
"abstract",
"class",
"EntityPlayer",
"extends",
"EntityLiving",
"{",
"public",
"InventoryPlayer",
"inventory",
";",
"public",
"Container",
"inventorySlots",
";",
"public",
"Container",
"craftingInventory",
";",
"protected",
"FoodStats",
"foodStats",
";",
"protected",
"int",
"flyToggleTimer",
";",
"public",
"byte",
"field_9152_am",
";",
"public",
"int",
"score",
";",
"public",
"float",
"prevCameraYaw",
";",
"public",
"float",
"cameraYaw",
";",
"public",
"boolean",
"isSwinging",
";",
"public",
"int",
"swingProgressInt",
";",
"public",
"String",
"username",
";",
"public",
"int",
"dimension",
";",
"public",
"int",
"xpCooldown",
";",
"public",
"double",
"field_20047_ay",
";",
"public",
"double",
"field_20046_az",
";",
"public",
"double",
"field_20051_aA",
";",
"public",
"double",
"field_20050_aB",
";",
"public",
"double",
"field_20049_aC",
";",
"public",
"double",
"field_20048_aD",
";",
"protected",
"boolean",
"sleeping",
";",
"public",
"ChunkCoordinates",
"playerLocation",
";",
"private",
"int",
"sleepTimer",
";",
"public",
"float",
"field_22066_z",
";",
"public",
"float",
"field_22067_A",
";",
"private",
"ChunkCoordinates",
"spawnChunk",
";",
"private",
"ChunkCoordinates",
"startMinecartRidingCoordinate",
";",
"public",
"int",
"timeUntilPortal",
";",
"protected",
"boolean",
"inPortal",
";",
"public",
"float",
"timeInPortal",
";",
"public",
"PlayerCapabilities",
"capabilities",
";",
"public",
"int",
"experienceLevel",
";",
"public",
"int",
"experienceTotal",
";",
"public",
"float",
"experience",
";",
"private",
"ItemStack",
"itemInUse",
";",
"private",
"int",
"itemInUseCount",
";",
"protected",
"float",
"speedOnGround",
";",
"protected",
"float",
"speedInAir",
";",
"public",
"EntityFishHook",
"fishEntity",
";",
"public",
"EntityPlayer",
"(",
"World",
"par1World",
")",
"{",
"super",
"(",
"par1World",
")",
";",
"inventory",
"=",
"new",
"InventoryPlayer",
"(",
"this",
")",
";",
"foodStats",
"=",
"new",
"FoodStats",
"(",
")",
";",
"flyToggleTimer",
"=",
"0",
";",
"field_9152_am",
"=",
"0",
";",
"score",
"=",
"0",
";",
"isSwinging",
"=",
"false",
";",
"swingProgressInt",
"=",
"0",
";",
"xpCooldown",
"=",
"0",
";",
"timeUntilPortal",
"=",
"20",
";",
"inPortal",
"=",
"false",
";",
"capabilities",
"=",
"new",
"PlayerCapabilities",
"(",
")",
";",
"speedOnGround",
"=",
"0.1F",
";",
"speedInAir",
"=",
"0.02F",
";",
"fishEntity",
"=",
"null",
";",
"inventorySlots",
"=",
"new",
"ContainerPlayer",
"(",
"inventory",
",",
"!",
"par1World",
".",
"isRemote",
")",
";",
"craftingInventory",
"=",
"inventorySlots",
";",
"yOffset",
"=",
"1.62F",
";",
"ChunkCoordinates",
"chunkcoordinates",
"=",
"par1World",
".",
"getSpawnPoint",
"(",
")",
";",
"setLocationAndAngles",
"(",
"(",
"double",
")",
"chunkcoordinates",
".",
"posX",
"+",
"0.5D",
",",
"chunkcoordinates",
".",
"posY",
"+",
"1",
",",
"(",
"double",
")",
"chunkcoordinates",
".",
"posZ",
"+",
"0.5D",
",",
"0.0F",
",",
"0.0F",
")",
";",
"entityType",
"=",
"\"humanoid\"",
";",
"field_9117_aI",
"=",
"180F",
";",
"fireResistance",
"=",
"20",
";",
"texture",
"=",
"\"\"",
";",
"}",
"public",
"int",
"getMaxHealth",
"(",
")",
"{",
"return",
"20",
";",
"}",
"protected",
"void",
"entityInit",
"(",
")",
"{",
"super",
".",
"entityInit",
"(",
")",
";",
"dataWatcher",
".",
"addObject",
"(",
"16",
",",
"Byte",
".",
"valueOf",
"(",
"(",
"byte",
")",
"0",
")",
")",
";",
"dataWatcher",
".",
"addObject",
"(",
"17",
",",
"Byte",
".",
"valueOf",
"(",
"(",
"byte",
")",
"0",
")",
")",
";",
"}",
"public",
"boolean",
"isUsingItem",
"(",
")",
"{",
"return",
"itemInUse",
"!=",
"null",
";",
"}",
"public",
"void",
"stopUsingItem",
"(",
")",
"{",
"if",
"(",
"itemInUse",
"!=",
"null",
")",
"{",
"itemInUse",
".",
"onPlayerStoppedUsing",
"(",
"worldObj",
",",
"this",
",",
"itemInUseCount",
")",
";",
"}",
"clearItemInUse",
"(",
")",
";",
"}",
"public",
"void",
"clearItemInUse",
"(",
")",
"{",
"itemInUse",
"=",
"null",
";",
"itemInUseCount",
"=",
"0",
";",
"if",
"(",
"!",
"worldObj",
".",
"isRemote",
")",
"{",
"setEating",
"(",
"false",
")",
";",
"}",
"}",
"public",
"boolean",
"isBlocking",
"(",
")",
"{",
"return",
"isUsingItem",
"(",
")",
"&&",
"Item",
".",
"itemsList",
"[",
"itemInUse",
".",
"itemID",
"]",
".",
"getItemUseAction",
"(",
"itemInUse",
")",
"==",
"EnumAction",
".",
"block",
";",
"}",
"public",
"void",
"onUpdate",
"(",
")",
"{",
"if",
"(",
"itemInUse",
"!=",
"null",
")",
"{",
"ItemStack",
"itemstack",
"=",
"inventory",
".",
"getCurrentItem",
"(",
")",
";",
"if",
"(",
"itemstack",
"!=",
"itemInUse",
")",
"{",
"clearItemInUse",
"(",
")",
";",
"}",
"else",
"{",
"if",
"(",
"itemInUseCount",
"<=",
"25",
"&&",
"itemInUseCount",
"%",
"4",
"==",
"0",
")",
"{",
"updateItemUse",
"(",
"itemstack",
",",
"5",
")",
";",
"}",
"if",
"(",
"--",
"itemInUseCount",
"==",
"0",
"&&",
"!",
"worldObj",
".",
"isRemote",
")",
"{",
"onItemUseFinish",
"(",
")",
";",
"}",
"}",
"}",
"if",
"(",
"xpCooldown",
">",
"0",
")",
"{",
"xpCooldown",
"--",
";",
"}",
"if",
"(",
"isPlayerSleeping",
"(",
")",
")",
"{",
"sleepTimer",
"++",
";",
"if",
"(",
"sleepTimer",
">",
"100",
")",
"{",
"sleepTimer",
"=",
"100",
";",
"}",
"if",
"(",
"!",
"worldObj",
".",
"isRemote",
")",
"{",
"if",
"(",
"!",
"isInBed",
"(",
")",
")",
"{",
"wakeUpPlayer",
"(",
"true",
",",
"true",
",",
"false",
")",
";",
"}",
"else",
"if",
"(",
"worldObj",
".",
"isDaytime",
"(",
")",
")",
"{",
"wakeUpPlayer",
"(",
"false",
",",
"true",
",",
"true",
")",
";",
"}",
"}",
"}",
"else",
"if",
"(",
"sleepTimer",
">",
"0",
")",
"{",
"sleepTimer",
"++",
";",
"if",
"(",
"sleepTimer",
">=",
"110",
")",
"{",
"sleepTimer",
"=",
"0",
";",
"}",
"}",
"super",
".",
"onUpdate",
"(",
")",
";",
"if",
"(",
"!",
"worldObj",
".",
"isRemote",
"&&",
"craftingInventory",
"!=",
"null",
"&&",
"!",
"craftingInventory",
".",
"canInteractWith",
"(",
"this",
")",
")",
"{",
"closeScreen",
"(",
")",
";",
"craftingInventory",
"=",
"inventorySlots",
";",
"}",
"if",
"(",
"capabilities",
".",
"isFlying",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"8",
";",
"i",
"++",
")",
"{",
"}",
"}",
"if",
"(",
"isBurning",
"(",
")",
"&&",
"capabilities",
".",
"disableDamage",
")",
"{",
"extinguish",
"(",
")",
";",
"}",
"field_20047_ay",
"=",
"field_20050_aB",
";",
"field_20046_az",
"=",
"field_20049_aC",
";",
"field_20051_aA",
"=",
"field_20048_aD",
";",
"double",
"d",
"=",
"posX",
"-",
"field_20050_aB",
";",
"double",
"d1",
"=",
"posY",
"-",
"field_20049_aC",
";",
"double",
"d2",
"=",
"posZ",
"-",
"field_20048_aD",
";",
"double",
"d3",
"=",
"10D",
";",
"if",
"(",
"d",
">",
"d3",
")",
"{",
"field_20047_ay",
"=",
"field_20050_aB",
"=",
"posX",
";",
"}",
"if",
"(",
"d2",
">",
"d3",
")",
"{",
"field_20051_aA",
"=",
"field_20048_aD",
"=",
"posZ",
";",
"}",
"if",
"(",
"d1",
">",
"d3",
")",
"{",
"field_20046_az",
"=",
"field_20049_aC",
"=",
"posY",
";",
"}",
"if",
"(",
"d",
"<",
"-",
"d3",
")",
"{",
"field_20047_ay",
"=",
"field_20050_aB",
"=",
"posX",
";",
"}",
"if",
"(",
"d2",
"<",
"-",
"d3",
")",
"{",
"field_20051_aA",
"=",
"field_20048_aD",
"=",
"posZ",
";",
"}",
"if",
"(",
"d1",
"<",
"-",
"d3",
")",
"{",
"field_20046_az",
"=",
"field_20049_aC",
"=",
"posY",
";",
"}",
"field_20050_aB",
"+=",
"d",
"*",
"0.25D",
";",
"field_20048_aD",
"+=",
"d2",
"*",
"0.25D",
";",
"field_20049_aC",
"+=",
"d1",
"*",
"0.25D",
";",
"addStat",
"(",
"StatList",
".",
"minutesPlayedStat",
",",
"1",
")",
";",
"if",
"(",
"ridingEntity",
"==",
"null",
")",
"{",
"startMinecartRidingCoordinate",
"=",
"null",
";",
"}",
"if",
"(",
"!",
"worldObj",
".",
"isRemote",
")",
"{",
"foodStats",
".",
"onUpdate",
"(",
"this",
")",
";",
"}",
"}",
"protected",
"void",
"updateItemUse",
"(",
"ItemStack",
"par1ItemStack",
",",
"int",
"par2",
")",
"{",
"if",
"(",
"par1ItemStack",
".",
"getItemUseAction",
"(",
")",
"==",
"EnumAction",
".",
"drink",
")",
"{",
"worldObj",
".",
"playSoundAtEntity",
"(",
"this",
",",
"\"random.drink\"",
",",
"0.5F",
",",
"worldObj",
".",
"rand",
".",
"nextFloat",
"(",
")",
"*",
"0.1F",
"+",
"0.9F",
")",
";",
"}",
"if",
"(",
"par1ItemStack",
".",
"getItemUseAction",
"(",
")",
"==",
"EnumAction",
".",
"eat",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"par2",
";",
"i",
"++",
")",
"{",
"Vec3D",
"vec3d",
"=",
"Vec3D",
".",
"createVector",
"(",
"(",
"(",
"double",
")",
"rand",
".",
"nextFloat",
"(",
")",
"-",
"0.5D",
")",
"*",
"0.10000000000000001D",
",",
"Math",
".",
"random",
"(",
")",
"*",
"0.10000000000000001D",
"+",
"0.10000000000000001D",
",",
"0.0D",
")",
";",
"vec3d",
".",
"rotateAroundX",
"(",
"(",
"-",
"rotationPitch",
"*",
"(",
"float",
")",
"Math",
".",
"PI",
")",
"/",
"180F",
")",
";",
"vec3d",
".",
"rotateAroundY",
"(",
"(",
"-",
"rotationYaw",
"*",
"(",
"float",
")",
"Math",
".",
"PI",
")",
"/",
"180F",
")",
";",
"Vec3D",
"vec3d1",
"=",
"Vec3D",
".",
"createVector",
"(",
"(",
"(",
"double",
")",
"rand",
".",
"nextFloat",
"(",
")",
"-",
"0.5D",
")",
"*",
"0.29999999999999999D",
",",
"(",
"double",
")",
"(",
"-",
"rand",
".",
"nextFloat",
"(",
")",
")",
"*",
"0.59999999999999998D",
"-",
"0.29999999999999999D",
",",
"0.59999999999999998D",
")",
";",
"vec3d1",
".",
"rotateAroundX",
"(",
"(",
"-",
"rotationPitch",
"*",
"(",
"float",
")",
"Math",
".",
"PI",
")",
"/",
"180F",
")",
";",
"vec3d1",
".",
"rotateAroundY",
"(",
"(",
"-",
"rotationYaw",
"*",
"(",
"float",
")",
"Math",
".",
"PI",
")",
"/",
"180F",
")",
";",
"vec3d1",
"=",
"vec3d1",
".",
"addVector",
"(",
"posX",
",",
"posY",
"+",
"(",
"double",
")",
"getEyeHeight",
"(",
")",
",",
"posZ",
")",
";",
"worldObj",
".",
"spawnParticle",
"(",
"(",
"new",
"StringBuilder",
"(",
")",
")",
".",
"append",
"(",
"\"iconcrack_\"",
")",
".",
"append",
"(",
"par1ItemStack",
".",
"getItem",
"(",
")",
".",
"shiftedIndex",
")",
".",
"toString",
"(",
")",
",",
"vec3d1",
".",
"xCoord",
",",
"vec3d1",
".",
"yCoord",
",",
"vec3d1",
".",
"zCoord",
",",
"vec3d",
".",
"xCoord",
",",
"vec3d",
".",
"yCoord",
"+",
"0.050000000000000003D",
",",
"vec3d",
".",
"zCoord",
")",
";",
"}",
"worldObj",
".",
"playSoundAtEntity",
"(",
"this",
",",
"\"random.eat\"",
",",
"0.5F",
"+",
"0.5F",
"*",
"(",
"float",
")",
"rand",
".",
"nextInt",
"(",
"2",
")",
",",
"(",
"rand",
".",
"nextFloat",
"(",
")",
"-",
"rand",
".",
"nextFloat",
"(",
")",
")",
"*",
"0.2F",
"+",
"1.0F",
")",
";",
"}",
"}",
"protected",
"void",
"onItemUseFinish",
"(",
")",
"{",
"if",
"(",
"itemInUse",
"!=",
"null",
")",
"{",
"updateItemUse",
"(",
"itemInUse",
",",
"16",
")",
";",
"int",
"i",
"=",
"itemInUse",
".",
"stackSize",
";",
"ItemStack",
"itemstack",
"=",
"itemInUse",
".",
"onFoodEaten",
"(",
"worldObj",
",",
"this",
")",
";",
"if",
"(",
"itemstack",
"!=",
"itemInUse",
"||",
"itemstack",
"!=",
"null",
"&&",
"itemstack",
".",
"stackSize",
"!=",
"i",
")",
"{",
"inventory",
".",
"mainInventory",
"[",
"inventory",
".",
"currentItem",
"]",
"=",
"itemstack",
";",
"if",
"(",
"itemstack",
".",
"stackSize",
"==",
"0",
")",
"{",
"inventory",
".",
"mainInventory",
"[",
"inventory",
".",
"currentItem",
"]",
"=",
"null",
";",
"}",
"}",
"clearItemInUse",
"(",
")",
";",
"}",
"}",
"protected",
"boolean",
"isMovementBlocked",
"(",
")",
"{",
"return",
"getHealth",
"(",
")",
"<=",
"0",
"||",
"isPlayerSleeping",
"(",
")",
";",
"}",
"protected",
"void",
"closeScreen",
"(",
")",
"{",
"craftingInventory",
"=",
"inventorySlots",
";",
"}",
"public",
"void",
"updateRidden",
"(",
")",
"{",
"double",
"d",
"=",
"posX",
";",
"double",
"d1",
"=",
"posY",
";",
"double",
"d2",
"=",
"posZ",
";",
"super",
".",
"updateRidden",
"(",
")",
";",
"prevCameraYaw",
"=",
"cameraYaw",
";",
"cameraYaw",
"=",
"0.0F",
";",
"addMountedMovementStat",
"(",
"posX",
"-",
"d",
",",
"posY",
"-",
"d1",
",",
"posZ",
"-",
"d2",
")",
";",
"}",
"private",
"int",
"getSwingSpeedModifier",
"(",
")",
"{",
"if",
"(",
"isPotionActive",
"(",
"Potion",
".",
"digSpeed",
")",
")",
"{",
"return",
"6",
"-",
"(",
"1",
"+",
"getActivePotionEffect",
"(",
"Potion",
".",
"digSpeed",
")",
".",
"getAmplifier",
"(",
")",
")",
"*",
"1",
";",
"}",
"if",
"(",
"isPotionActive",
"(",
"Potion",
".",
"digSlowdown",
")",
")",
"{",
"return",
"6",
"+",
"(",
"1",
"+",
"getActivePotionEffect",
"(",
"Potion",
".",
"digSlowdown",
")",
".",
"getAmplifier",
"(",
")",
")",
"*",
"2",
";",
"}",
"else",
"{",
"return",
"6",
";",
"}",
"}",
"protected",
"void",
"updateEntityActionState",
"(",
")",
"{",
"int",
"i",
"=",
"getSwingSpeedModifier",
"(",
")",
";",
"if",
"(",
"isSwinging",
")",
"{",
"swingProgressInt",
"++",
";",
"if",
"(",
"swingProgressInt",
">=",
"i",
")",
"{",
"swingProgressInt",
"=",
"0",
";",
"isSwinging",
"=",
"false",
";",
"}",
"}",
"else",
"{",
"swingProgressInt",
"=",
"0",
";",
"}",
"swingProgress",
"=",
"(",
"float",
")",
"swingProgressInt",
"/",
"(",
"float",
")",
"i",
";",
"}",
"public",
"void",
"onLivingUpdate",
"(",
")",
"{",
"if",
"(",
"flyToggleTimer",
">",
"0",
")",
"{",
"flyToggleTimer",
"--",
";",
"}",
"if",
"(",
"worldObj",
".",
"difficultySetting",
"==",
"0",
"&&",
"getHealth",
"(",
")",
"<",
"getMaxHealth",
"(",
")",
"&&",
"(",
"ticksExisted",
"%",
"20",
")",
"*",
"12",
"==",
"0",
")",
"{",
"heal",
"(",
"1",
")",
";",
"}",
"inventory",
".",
"decrementAnimations",
"(",
")",
";",
"prevCameraYaw",
"=",
"cameraYaw",
";",
"super",
".",
"onLivingUpdate",
"(",
")",
";",
"landMovementFactor",
"=",
"speedOnGround",
";",
"jumpMovementFactor",
"=",
"speedInAir",
";",
"if",
"(",
"isSprinting",
"(",
")",
")",
"{",
"landMovementFactor",
"+=",
"(",
"double",
")",
"speedOnGround",
"*",
"0.29999999999999999D",
";",
"jumpMovementFactor",
"+=",
"(",
"double",
")",
"speedInAir",
"*",
"0.29999999999999999D",
";",
"}",
"float",
"f",
"=",
"MathHelper",
".",
"sqrt_double",
"(",
"motionX",
"*",
"motionX",
"+",
"motionZ",
"*",
"motionZ",
")",
";",
"float",
"f1",
"=",
"(",
"float",
")",
"Math",
".",
"atan",
"(",
"-",
"motionY",
"*",
"0.20000000298023224D",
")",
"*",
"15F",
";",
"if",
"(",
"f",
">",
"0.1F",
")",
"{",
"f",
"=",
"0.1F",
";",
"}",
"if",
"(",
"!",
"onGround",
"||",
"getHealth",
"(",
")",
"<=",
"0",
")",
"{",
"f",
"=",
"0.0F",
";",
"}",
"if",
"(",
"onGround",
"||",
"getHealth",
"(",
")",
"<=",
"0",
")",
"{",
"f1",
"=",
"0.0F",
";",
"}",
"cameraYaw",
"+=",
"(",
"f",
"-",
"cameraYaw",
")",
"*",
"0.4F",
";",
"cameraPitch",
"+=",
"(",
"f1",
"-",
"cameraPitch",
")",
"*",
"0.8F",
";",
"if",
"(",
"getHealth",
"(",
")",
">",
"0",
")",
"{",
"List",
"list",
"=",
"worldObj",
".",
"getEntitiesWithinAABBExcludingEntity",
"(",
"this",
",",
"boundingBox",
".",
"expand",
"(",
"1.0D",
",",
"0.0D",
",",
"1.0D",
")",
")",
";",
"if",
"(",
"list",
"!=",
"null",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"list",
".",
"size",
"(",
")",
";",
"i",
"++",
")",
"{",
"Entity",
"entity",
"=",
"(",
"Entity",
")",
"list",
".",
"get",
"(",
"i",
")",
";",
"if",
"(",
"!",
"entity",
".",
"isDead",
")",
"{",
"collideWithPlayer",
"(",
"entity",
")",
";",
"}",
"}",
"}",
"}",
"}",
"private",
"void",
"collideWithPlayer",
"(",
"Entity",
"par1Entity",
")",
"{",
"par1Entity",
".",
"onCollideWithPlayer",
"(",
"this",
")",
";",
"}",
"public",
"void",
"onDeath",
"(",
"DamageSource",
"par1DamageSource",
")",
"{",
"super",
".",
"onDeath",
"(",
"par1DamageSource",
")",
";",
"setSize",
"(",
"0.2F",
",",
"0.2F",
")",
";",
"setPosition",
"(",
"posX",
",",
"posY",
",",
"posZ",
")",
";",
"motionY",
"=",
"0.10000000149011612D",
";",
"if",
"(",
"username",
".",
"equals",
"(",
"\"Notch\"",
")",
")",
"{",
"dropPlayerItemWithRandomChoice",
"(",
"new",
"ItemStack",
"(",
"Item",
".",
"appleRed",
",",
"1",
")",
",",
"true",
")",
";",
"}",
"inventory",
".",
"dropAllItems",
"(",
")",
";",
"if",
"(",
"par1DamageSource",
"!=",
"null",
")",
"{",
"motionX",
"=",
"-",
"MathHelper",
".",
"cos",
"(",
"(",
"(",
"attackedAtYaw",
"+",
"rotationYaw",
")",
"*",
"(",
"float",
")",
"Math",
".",
"PI",
")",
"/",
"180F",
")",
"*",
"0.1F",
";",
"motionZ",
"=",
"-",
"MathHelper",
".",
"sin",
"(",
"(",
"(",
"attackedAtYaw",
"+",
"rotationYaw",
")",
"*",
"(",
"float",
")",
"Math",
".",
"PI",
")",
"/",
"180F",
")",
"*",
"0.1F",
";",
"}",
"else",
"{",
"motionX",
"=",
"motionZ",
"=",
"0.0D",
";",
"}",
"yOffset",
"=",
"0.1F",
";",
"addStat",
"(",
"StatList",
".",
"deathsStat",
",",
"1",
")",
";",
"}",
"public",
"void",
"addToPlayerScore",
"(",
"Entity",
"par1Entity",
",",
"int",
"par2",
")",
"{",
"score",
"+=",
"par2",
";",
"if",
"(",
"par1Entity",
"instanceof",
"EntityPlayer",
")",
"{",
"addStat",
"(",
"StatList",
".",
"playerKillsStat",
",",
"1",
")",
";",
"}",
"else",
"{",
"addStat",
"(",
"StatList",
".",
"mobKillsStat",
",",
"1",
")",
";",
"}",
"}",
"protected",
"int",
"decreaseAirSupply",
"(",
"int",
"par1",
")",
"{",
"int",
"i",
"=",
"EnchantmentHelper",
".",
"getRespiration",
"(",
"inventory",
")",
";",
"if",
"(",
"i",
">",
"0",
"&&",
"rand",
".",
"nextInt",
"(",
"i",
"+",
"1",
")",
">",
"0",
")",
"{",
"return",
"par1",
";",
"}",
"else",
"{",
"return",
"super",
".",
"decreaseAirSupply",
"(",
"par1",
")",
";",
"}",
"}",
"public",
"EntityItem",
"dropOneItem",
"(",
")",
"{",
"return",
"dropPlayerItemWithRandomChoice",
"(",
"inventory",
".",
"decrStackSize",
"(",
"inventory",
".",
"currentItem",
",",
"1",
")",
",",
"false",
")",
";",
"}",
"public",
"EntityItem",
"dropPlayerItem",
"(",
"ItemStack",
"par1ItemStack",
")",
"{",
"return",
"dropPlayerItemWithRandomChoice",
"(",
"par1ItemStack",
",",
"false",
")",
";",
"}",
"public",
"EntityItem",
"dropPlayerItemWithRandomChoice",
"(",
"ItemStack",
"par1ItemStack",
",",
"boolean",
"par2",
")",
"{",
"if",
"(",
"par1ItemStack",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"EntityItem",
"entityitem",
"=",
"new",
"EntityItem",
"(",
"worldObj",
",",
"posX",
",",
"(",
"posY",
"-",
"0.30000001192092896D",
")",
"+",
"(",
"double",
")",
"getEyeHeight",
"(",
")",
",",
"posZ",
",",
"par1ItemStack",
")",
";",
"entityitem",
".",
"delayBeforeCanPickup",
"=",
"40",
";",
"float",
"f",
"=",
"0.1F",
";",
"if",
"(",
"par2",
")",
"{",
"float",
"f2",
"=",
"rand",
".",
"nextFloat",
"(",
")",
"*",
"0.5F",
";",
"float",
"f4",
"=",
"rand",
".",
"nextFloat",
"(",
")",
"*",
"(",
"float",
")",
"Math",
".",
"PI",
"*",
"2.0F",
";",
"entityitem",
".",
"motionX",
"=",
"-",
"MathHelper",
".",
"sin",
"(",
"f4",
")",
"*",
"f2",
";",
"entityitem",
".",
"motionZ",
"=",
"MathHelper",
".",
"cos",
"(",
"f4",
")",
"*",
"f2",
";",
"entityitem",
".",
"motionY",
"=",
"0.20000000298023224D",
";",
"}",
"else",
"{",
"float",
"f1",
"=",
"0.3F",
";",
"entityitem",
".",
"motionX",
"=",
"-",
"MathHelper",
".",
"sin",
"(",
"(",
"rotationYaw",
"/",
"180F",
")",
"*",
"(",
"float",
")",
"Math",
".",
"PI",
")",
"*",
"MathHelper",
".",
"cos",
"(",
"(",
"rotationPitch",
"/",
"180F",
")",
"*",
"(",
"float",
")",
"Math",
".",
"PI",
")",
"*",
"f1",
";",
"entityitem",
".",
"motionZ",
"=",
"MathHelper",
".",
"cos",
"(",
"(",
"rotationYaw",
"/",
"180F",
")",
"*",
"(",
"float",
")",
"Math",
".",
"PI",
")",
"*",
"MathHelper",
".",
"cos",
"(",
"(",
"rotationPitch",
"/",
"180F",
")",
"*",
"(",
"float",
")",
"Math",
".",
"PI",
")",
"*",
"f1",
";",
"entityitem",
".",
"motionY",
"=",
"-",
"MathHelper",
".",
"sin",
"(",
"(",
"rotationPitch",
"/",
"180F",
")",
"*",
"(",
"float",
")",
"Math",
".",
"PI",
")",
"*",
"f1",
"+",
"0.1F",
";",
"f1",
"=",
"0.02F",
";",
"float",
"f3",
"=",
"rand",
".",
"nextFloat",
"(",
")",
"*",
"(",
"float",
")",
"Math",
".",
"PI",
"*",
"2.0F",
";",
"f1",
"*=",
"rand",
".",
"nextFloat",
"(",
")",
";",
"entityitem",
".",
"motionX",
"+=",
"Math",
".",
"cos",
"(",
"f3",
")",
"*",
"(",
"double",
")",
"f1",
";",
"entityitem",
".",
"motionY",
"+=",
"(",
"rand",
".",
"nextFloat",
"(",
")",
"-",
"rand",
".",
"nextFloat",
"(",
")",
")",
"*",
"0.1F",
";",
"entityitem",
".",
"motionZ",
"+=",
"Math",
".",
"sin",
"(",
"f3",
")",
"*",
"(",
"double",
")",
"f1",
";",
"}",
"joinEntityItemWithWorld",
"(",
"entityitem",
")",
";",
"addStat",
"(",
"StatList",
".",
"dropStat",
",",
"1",
")",
";",
"return",
"entityitem",
";",
"}",
"protected",
"void",
"joinEntityItemWithWorld",
"(",
"EntityItem",
"par1EntityItem",
")",
"{",
"worldObj",
".",
"spawnEntityInWorld",
"(",
"par1EntityItem",
")",
";",
"}",
"public",
"float",
"getCurrentPlayerStrVsBlock",
"(",
"Block",
"par1Block",
")",
"{",
"float",
"f",
"=",
"inventory",
".",
"getStrVsBlock",
"(",
"par1Block",
")",
";",
"float",
"f1",
"=",
"f",
";",
"int",
"i",
"=",
"EnchantmentHelper",
".",
"getEfficiencyModifier",
"(",
"inventory",
")",
";",
"if",
"(",
"i",
">",
"0",
"&&",
"inventory",
".",
"canHarvestBlock",
"(",
"par1Block",
")",
")",
"{",
"f1",
"+=",
"i",
"*",
"i",
"+",
"1",
";",
"}",
"if",
"(",
"isPotionActive",
"(",
"Potion",
".",
"digSpeed",
")",
")",
"{",
"f1",
"*=",
"1.0F",
"+",
"(",
"float",
")",
"(",
"getActivePotionEffect",
"(",
"Potion",
".",
"digSpeed",
")",
".",
"getAmplifier",
"(",
")",
"+",
"1",
")",
"*",
"0.2F",
";",
"}",
"if",
"(",
"isPotionActive",
"(",
"Potion",
".",
"digSlowdown",
")",
")",
"{",
"f1",
"*=",
"1.0F",
"-",
"(",
"float",
")",
"(",
"getActivePotionEffect",
"(",
"Potion",
".",
"digSlowdown",
")",
".",
"getAmplifier",
"(",
")",
"+",
"1",
")",
"*",
"0.2F",
";",
"}",
"if",
"(",
"isInsideOfMaterial",
"(",
"Material",
".",
"water",
")",
"&&",
"!",
"EnchantmentHelper",
".",
"getAquaAffinityModifier",
"(",
"inventory",
")",
")",
"{",
"f1",
"/=",
"5F",
";",
"}",
"if",
"(",
"!",
"onGround",
")",
"{",
"f1",
"/=",
"5F",
";",
"}",
"return",
"f1",
";",
"}",
"public",
"boolean",
"canHarvestBlock",
"(",
"Block",
"par1Block",
")",
"{",
"return",
"inventory",
".",
"canHarvestBlock",
"(",
"par1Block",
")",
";",
"}",
"public",
"void",
"readEntityFromNBT",
"(",
"NBTTagCompound",
"par1NBTTagCompound",
")",
"{",
"super",
".",
"readEntityFromNBT",
"(",
"par1NBTTagCompound",
")",
";",
"NBTTagList",
"nbttaglist",
"=",
"par1NBTTagCompound",
".",
"getTagList",
"(",
"\"Inventory\"",
")",
";",
"inventory",
".",
"readFromNBT",
"(",
"nbttaglist",
")",
";",
"dimension",
"=",
"par1NBTTagCompound",
".",
"getInteger",
"(",
"\"Dimension\"",
")",
";",
"sleeping",
"=",
"par1NBTTagCompound",
".",
"getBoolean",
"(",
"\"Sleeping\"",
")",
";",
"sleepTimer",
"=",
"par1NBTTagCompound",
".",
"getShort",
"(",
"\"SleepTimer\"",
")",
";",
"experience",
"=",
"par1NBTTagCompound",
".",
"getFloat",
"(",
"\"XpP\"",
")",
";",
"experienceLevel",
"=",
"par1NBTTagCompound",
".",
"getInteger",
"(",
"\"XpLevel\"",
")",
";",
"experienceTotal",
"=",
"par1NBTTagCompound",
".",
"getInteger",
"(",
"\"XpTotal\"",
")",
";",
"if",
"(",
"sleeping",
")",
"{",
"playerLocation",
"=",
"new",
"ChunkCoordinates",
"(",
"MathHelper",
".",
"floor_double",
"(",
"posX",
")",
",",
"MathHelper",
".",
"floor_double",
"(",
"posY",
")",
",",
"MathHelper",
".",
"floor_double",
"(",
"posZ",
")",
")",
";",
"wakeUpPlayer",
"(",
"true",
",",
"true",
",",
"false",
")",
";",
"}",
"if",
"(",
"par1NBTTagCompound",
".",
"hasKey",
"(",
"\"SpawnX\"",
")",
"&&",
"par1NBTTagCompound",
".",
"hasKey",
"(",
"\"SpawnY\"",
")",
"&&",
"par1NBTTagCompound",
".",
"hasKey",
"(",
"\"SpawnZ\"",
")",
")",
"{",
"spawnChunk",
"=",
"new",
"ChunkCoordinates",
"(",
"par1NBTTagCompound",
".",
"getInteger",
"(",
"\"SpawnX\"",
")",
",",
"par1NBTTagCompound",
".",
"getInteger",
"(",
"\"SpawnY\"",
")",
",",
"par1NBTTagCompound",
".",
"getInteger",
"(",
"\"SpawnZ\"",
")",
")",
";",
"}",
"foodStats",
".",
"readNBT",
"(",
"par1NBTTagCompound",
")",
";",
"capabilities",
".",
"readCapabilitiesFromNBT",
"(",
"par1NBTTagCompound",
")",
";",
"}",
"public",
"void",
"writeEntityToNBT",
"(",
"NBTTagCompound",
"par1NBTTagCompound",
")",
"{",
"super",
".",
"writeEntityToNBT",
"(",
"par1NBTTagCompound",
")",
";",
"par1NBTTagCompound",
".",
"setTag",
"(",
"\"Inventory\"",
",",
"inventory",
".",
"writeToNBT",
"(",
"new",
"NBTTagList",
"(",
")",
")",
")",
";",
"par1NBTTagCompound",
".",
"setInteger",
"(",
"\"Dimension\"",
",",
"dimension",
")",
";",
"par1NBTTagCompound",
".",
"setBoolean",
"(",
"\"Sleeping\"",
",",
"sleeping",
")",
";",
"par1NBTTagCompound",
".",
"setShort",
"(",
"\"SleepTimer\"",
",",
"(",
"short",
")",
"sleepTimer",
")",
";",
"par1NBTTagCompound",
".",
"setFloat",
"(",
"\"XpP\"",
",",
"experience",
")",
";",
"par1NBTTagCompound",
".",
"setInteger",
"(",
"\"XpLevel\"",
",",
"experienceLevel",
")",
";",
"par1NBTTagCompound",
".",
"setInteger",
"(",
"\"XpTotal\"",
",",
"experienceTotal",
")",
";",
"if",
"(",
"spawnChunk",
"!=",
"null",
")",
"{",
"par1NBTTagCompound",
".",
"setInteger",
"(",
"\"SpawnX\"",
",",
"spawnChunk",
".",
"posX",
")",
";",
"par1NBTTagCompound",
".",
"setInteger",
"(",
"\"SpawnY\"",
",",
"spawnChunk",
".",
"posY",
")",
";",
"par1NBTTagCompound",
".",
"setInteger",
"(",
"\"SpawnZ\"",
",",
"spawnChunk",
".",
"posZ",
")",
";",
"}",
"foodStats",
".",
"writeNBT",
"(",
"par1NBTTagCompound",
")",
";",
"capabilities",
".",
"writeCapabilitiesToNBT",
"(",
"par1NBTTagCompound",
")",
";",
"}",
"public",
"void",
"displayGUIChest",
"(",
"IInventory",
"iinventory",
")",
"{",
"}",
"public",
"void",
"displayGUIEnchantment",
"(",
"int",
"i",
",",
"int",
"j",
",",
"int",
"k",
")",
"{",
"}",
"public",
"void",
"displayWorkbenchGUI",
"(",
"int",
"i",
",",
"int",
"j",
",",
"int",
"k",
")",
"{",
"}",
"public",
"void",
"onItemPickup",
"(",
"Entity",
"entity",
",",
"int",
"i",
")",
"{",
"}",
"public",
"float",
"getEyeHeight",
"(",
")",
"{",
"return",
"0.12F",
";",
"}",
"protected",
"void",
"resetHeight",
"(",
")",
"{",
"yOffset",
"=",
"1.62F",
";",
"}",
"public",
"boolean",
"attackEntityFrom",
"(",
"DamageSource",
"par1DamageSource",
",",
"int",
"par2",
")",
"{",
"if",
"(",
"capabilities",
".",
"disableDamage",
"&&",
"!",
"par1DamageSource",
".",
"canHarmInCreative",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",
"entityAge",
"=",
"0",
";",
"if",
"(",
"getHealth",
"(",
")",
"<=",
"0",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"isPlayerSleeping",
"(",
")",
"&&",
"!",
"worldObj",
".",
"isRemote",
")",
"{",
"wakeUpPlayer",
"(",
"true",
",",
"true",
",",
"false",
")",
";",
"}",
"Entity",
"entity",
"=",
"par1DamageSource",
".",
"getEntity",
"(",
")",
";",
"if",
"(",
"(",
"entity",
"instanceof",
"EntityMob",
")",
"||",
"(",
"entity",
"instanceof",
"EntityArrow",
")",
")",
"{",
"if",
"(",
"worldObj",
".",
"difficultySetting",
"==",
"0",
")",
"{",
"par2",
"=",
"0",
";",
"}",
"if",
"(",
"worldObj",
".",
"difficultySetting",
"==",
"1",
")",
"{",
"par2",
"=",
"par2",
"/",
"2",
"+",
"1",
";",
"}",
"if",
"(",
"worldObj",
".",
"difficultySetting",
"==",
"3",
")",
"{",
"par2",
"=",
"(",
"par2",
"*",
"3",
")",
"/",
"2",
";",
"}",
"}",
"if",
"(",
"par2",
"==",
"0",
")",
"{",
"return",
"false",
";",
"}",
"Entity",
"entity1",
"=",
"entity",
";",
"if",
"(",
"(",
"entity1",
"instanceof",
"EntityArrow",
")",
"&&",
"(",
"(",
"EntityArrow",
")",
"entity1",
")",
".",
"shootingEntity",
"!=",
"null",
")",
"{",
"entity1",
"=",
"(",
"(",
"EntityArrow",
")",
"entity1",
")",
".",
"shootingEntity",
";",
"}",
"if",
"(",
"entity1",
"instanceof",
"EntityLiving",
")",
"{",
"alertWolves",
"(",
"(",
"EntityLiving",
")",
"entity1",
",",
"false",
")",
";",
"}",
"addStat",
"(",
"StatList",
".",
"damageTakenStat",
",",
"par2",
")",
";",
"return",
"super",
".",
"attackEntityFrom",
"(",
"par1DamageSource",
",",
"par2",
")",
";",
"}",
"protected",
"int",
"applyPotionDamageCalculations",
"(",
"DamageSource",
"par1DamageSource",
",",
"int",
"par2",
")",
"{",
"int",
"i",
"=",
"super",
".",
"applyPotionDamageCalculations",
"(",
"par1DamageSource",
",",
"par2",
")",
";",
"if",
"(",
"i",
"<=",
"0",
")",
"{",
"return",
"0",
";",
"}",
"int",
"j",
"=",
"EnchantmentHelper",
".",
"getEnchantmentModifierDamage",
"(",
"inventory",
",",
"par1DamageSource",
")",
";",
"if",
"(",
"j",
">",
"20",
")",
"{",
"j",
"=",
"20",
";",
"}",
"if",
"(",
"j",
">",
"0",
"&&",
"j",
"<=",
"20",
")",
"{",
"int",
"k",
"=",
"25",
"-",
"j",
";",
"int",
"l",
"=",
"i",
"*",
"k",
"+",
"carryoverDamage",
";",
"i",
"=",
"l",
"/",
"25",
";",
"carryoverDamage",
"=",
"l",
"%",
"25",
";",
"}",
"return",
"i",
";",
"}",
"protected",
"boolean",
"isPVPEnabled",
"(",
")",
"{",
"return",
"false",
";",
"}",
"protected",
"void",
"alertWolves",
"(",
"EntityLiving",
"par1EntityLiving",
",",
"boolean",
"par2",
")",
"{",
"if",
"(",
"(",
"par1EntityLiving",
"instanceof",
"EntityCreeper",
")",
"||",
"(",
"par1EntityLiving",
"instanceof",
"EntityGhast",
")",
")",
"{",
"return",
";",
"}",
"if",
"(",
"par1EntityLiving",
"instanceof",
"EntityWolf",
")",
"{",
"EntityWolf",
"entitywolf",
"=",
"(",
"EntityWolf",
")",
"par1EntityLiving",
";",
"if",
"(",
"entitywolf",
".",
"isTamed",
"(",
")",
"&&",
"username",
".",
"equals",
"(",
"entitywolf",
".",
"getOwnerName",
"(",
")",
")",
")",
"{",
"return",
";",
"}",
"}",
"if",
"(",
"(",
"par1EntityLiving",
"instanceof",
"EntityPlayer",
")",
"&&",
"!",
"isPVPEnabled",
"(",
")",
")",
"{",
"return",
";",
"}",
"List",
"list",
"=",
"worldObj",
".",
"getEntitiesWithinAABB",
"(",
"net",
".",
"minecraft",
".",
"src",
".",
"EntityWolf",
".",
"class",
",",
"AxisAlignedBB",
".",
"getBoundingBoxFromPool",
"(",
"posX",
",",
"posY",
",",
"posZ",
",",
"posX",
"+",
"1.0D",
",",
"posY",
"+",
"1.0D",
",",
"posZ",
"+",
"1.0D",
")",
".",
"expand",
"(",
"16D",
",",
"4D",
",",
"16D",
")",
")",
";",
"Iterator",
"iterator",
"=",
"list",
".",
"iterator",
"(",
")",
";",
"do",
"{",
"if",
"(",
"!",
"iterator",
".",
"hasNext",
"(",
")",
")",
"{",
"break",
";",
"}",
"Entity",
"entity",
"=",
"(",
"Entity",
")",
"iterator",
".",
"next",
"(",
")",
";",
"EntityWolf",
"entitywolf1",
"=",
"(",
"EntityWolf",
")",
"entity",
";",
"if",
"(",
"entitywolf1",
".",
"isTamed",
"(",
")",
"&&",
"entitywolf1",
".",
"getEntityToAttack",
"(",
")",
"==",
"null",
"&&",
"username",
".",
"equals",
"(",
"entitywolf1",
".",
"getOwnerName",
"(",
")",
")",
"&&",
"(",
"!",
"par2",
"||",
"!",
"entitywolf1",
".",
"isSitting",
"(",
")",
")",
")",
"{",
"entitywolf1",
".",
"func_48369_c",
"(",
"false",
")",
";",
"entitywolf1",
".",
"setTarget",
"(",
"par1EntityLiving",
")",
";",
"}",
"}",
"while",
"(",
"true",
")",
";",
"}",
"protected",
"void",
"damageArmor",
"(",
"int",
"par1",
")",
"{",
"inventory",
".",
"damageArmor",
"(",
"par1",
")",
";",
"}",
"public",
"int",
"getTotalArmorValue",
"(",
")",
"{",
"return",
"inventory",
".",
"getTotalArmorValue",
"(",
")",
";",
"}",
"protected",
"void",
"damageEntity",
"(",
"DamageSource",
"par1DamageSource",
",",
"int",
"par2",
")",
"{",
"if",
"(",
"!",
"par1DamageSource",
".",
"isUnblockable",
"(",
")",
"&&",
"isBlocking",
"(",
")",
")",
"{",
"par2",
"=",
"1",
"+",
"par2",
">>",
"1",
";",
"}",
"par2",
"=",
"applyArmorCalculations",
"(",
"par1DamageSource",
",",
"par2",
")",
";",
"par2",
"=",
"applyPotionDamageCalculations",
"(",
"par1DamageSource",
",",
"par2",
")",
";",
"addExhaustion",
"(",
"par1DamageSource",
".",
"getHungerDamage",
"(",
")",
")",
";",
"health",
"-=",
"par2",
";",
"}",
"public",
"void",
"displayGUIFurnace",
"(",
"TileEntityFurnace",
"tileentityfurnace",
")",
"{",
"}",
"public",
"void",
"displayGUIDispenser",
"(",
"TileEntityDispenser",
"tileentitydispenser",
")",
"{",
"}",
"public",
"void",
"displayGUIEditSign",
"(",
"TileEntitySign",
"tileentitysign",
")",
"{",
"}",
"public",
"void",
"displayGUIBrewingStand",
"(",
"TileEntityBrewingStand",
"tileentitybrewingstand",
")",
"{",
"}",
"public",
"void",
"useCurrentItemOnEntity",
"(",
"Entity",
"par1Entity",
")",
"{",
"if",
"(",
"par1Entity",
".",
"interact",
"(",
"this",
")",
")",
"{",
"return",
";",
"}",
"ItemStack",
"itemstack",
"=",
"getCurrentEquippedItem",
"(",
")",
";",
"if",
"(",
"itemstack",
"!=",
"null",
"&&",
"(",
"par1Entity",
"instanceof",
"EntityLiving",
")",
")",
"{",
"itemstack",
".",
"useItemOnEntity",
"(",
"(",
"EntityLiving",
")",
"par1Entity",
")",
";",
"if",
"(",
"itemstack",
".",
"stackSize",
"<=",
"0",
")",
"{",
"itemstack",
".",
"onItemDestroyedByUse",
"(",
"this",
")",
";",
"destroyCurrentEquippedItem",
"(",
")",
";",
"}",
"}",
"}",
"public",
"ItemStack",
"getCurrentEquippedItem",
"(",
")",
"{",
"return",
"inventory",
".",
"getCurrentItem",
"(",
")",
";",
"}",
"public",
"void",
"destroyCurrentEquippedItem",
"(",
")",
"{",
"inventory",
".",
"setInventorySlotContents",
"(",
"inventory",
".",
"currentItem",
",",
"null",
")",
";",
"}",
"public",
"double",
"getYOffset",
"(",
")",
"{",
"return",
"(",
"double",
")",
"(",
"yOffset",
"-",
"0.5F",
")",
";",
"}",
"public",
"void",
"swingItem",
"(",
")",
"{",
"if",
"(",
"!",
"isSwinging",
"||",
"swingProgressInt",
">=",
"getSwingSpeedModifier",
"(",
")",
"/",
"2",
"||",
"swingProgressInt",
"<",
"0",
")",
"{",
"swingProgressInt",
"=",
"-",
"1",
";",
"isSwinging",
"=",
"true",
";",
"}",
"}",
"public",
"void",
"attackTargetEntityWithCurrentItem",
"(",
"Entity",
"par1Entity",
")",
"{",
"if",
"(",
"!",
"par1Entity",
".",
"canAttackWithItem",
"(",
")",
")",
"{",
"return",
";",
"}",
"int",
"i",
"=",
"inventory",
".",
"getDamageVsEntity",
"(",
"par1Entity",
")",
";",
"if",
"(",
"isPotionActive",
"(",
"Potion",
".",
"damageBoost",
")",
")",
"{",
"i",
"+=",
"3",
"<<",
"getActivePotionEffect",
"(",
"Potion",
".",
"damageBoost",
")",
".",
"getAmplifier",
"(",
")",
";",
"}",
"if",
"(",
"isPotionActive",
"(",
"Potion",
".",
"weakness",
")",
")",
"{",
"i",
"-=",
"2",
"<<",
"getActivePotionEffect",
"(",
"Potion",
".",
"weakness",
")",
".",
"getAmplifier",
"(",
")",
";",
"}",
"int",
"j",
"=",
"0",
";",
"int",
"k",
"=",
"0",
";",
"if",
"(",
"par1Entity",
"instanceof",
"EntityLiving",
")",
"{",
"k",
"=",
"EnchantmentHelper",
".",
"getEnchantmentModifierLiving",
"(",
"inventory",
",",
"(",
"EntityLiving",
")",
"par1Entity",
")",
";",
"j",
"+=",
"EnchantmentHelper",
".",
"getKnockbackModifier",
"(",
"inventory",
",",
"(",
"EntityLiving",
")",
"par1Entity",
")",
";",
"}",
"if",
"(",
"isSprinting",
"(",
")",
")",
"{",
"j",
"++",
";",
"}",
"if",
"(",
"i",
">",
"0",
"||",
"k",
">",
"0",
")",
"{",
"boolean",
"flag",
"=",
"fallDistance",
">",
"0.0F",
"&&",
"!",
"onGround",
"&&",
"!",
"isOnLadder",
"(",
")",
"&&",
"!",
"isInWater",
"(",
")",
"&&",
"!",
"isPotionActive",
"(",
"Potion",
".",
"blindness",
")",
"&&",
"ridingEntity",
"==",
"null",
"&&",
"(",
"par1Entity",
"instanceof",
"EntityLiving",
")",
";",
"if",
"(",
"flag",
")",
"{",
"i",
"+=",
"rand",
".",
"nextInt",
"(",
"i",
"/",
"2",
"+",
"2",
")",
";",
"}",
"i",
"+=",
"k",
";",
"boolean",
"flag1",
"=",
"par1Entity",
".",
"attackEntityFrom",
"(",
"DamageSource",
".",
"causePlayerDamage",
"(",
"this",
")",
",",
"i",
")",
";",
"if",
"(",
"flag1",
")",
"{",
"if",
"(",
"j",
">",
"0",
")",
"{",
"par1Entity",
".",
"addVelocity",
"(",
"-",
"MathHelper",
".",
"sin",
"(",
"(",
"rotationYaw",
"*",
"(",
"float",
")",
"Math",
".",
"PI",
")",
"/",
"180F",
")",
"*",
"(",
"float",
")",
"j",
"*",
"0.5F",
",",
"0.10000000000000001D",
",",
"MathHelper",
".",
"cos",
"(",
"(",
"rotationYaw",
"*",
"(",
"float",
")",
"Math",
".",
"PI",
")",
"/",
"180F",
")",
"*",
"(",
"float",
")",
"j",
"*",
"0.5F",
")",
";",
"motionX",
"*=",
"0.59999999999999998D",
";",
"motionZ",
"*=",
"0.59999999999999998D",
";",
"setSprinting",
"(",
"false",
")",
";",
"}",
"if",
"(",
"flag",
")",
"{",
"onCriticalHit",
"(",
"par1Entity",
")",
";",
"}",
"if",
"(",
"k",
">",
"0",
")",
"{",
"onEnchantmentCritical",
"(",
"par1Entity",
")",
";",
"}",
"if",
"(",
"i",
">=",
"18",
")",
"{",
"triggerAchievement",
"(",
"AchievementList",
".",
"overkill",
")",
";",
"}",
"setLastAttackingEntity",
"(",
"par1Entity",
")",
";",
"}",
"ItemStack",
"itemstack",
"=",
"getCurrentEquippedItem",
"(",
")",
";",
"if",
"(",
"itemstack",
"!=",
"null",
"&&",
"(",
"par1Entity",
"instanceof",
"EntityLiving",
")",
")",
"{",
"itemstack",
".",
"hitEntity",
"(",
"(",
"EntityLiving",
")",
"par1Entity",
",",
"this",
")",
";",
"if",
"(",
"itemstack",
".",
"stackSize",
"<=",
"0",
")",
"{",
"itemstack",
".",
"onItemDestroyedByUse",
"(",
"this",
")",
";",
"destroyCurrentEquippedItem",
"(",
")",
";",
"}",
"}",
"if",
"(",
"par1Entity",
"instanceof",
"EntityLiving",
")",
"{",
"if",
"(",
"par1Entity",
".",
"isEntityAlive",
"(",
")",
")",
"{",
"alertWolves",
"(",
"(",
"EntityLiving",
")",
"par1Entity",
",",
"true",
")",
";",
"}",
"addStat",
"(",
"StatList",
".",
"damageDealtStat",
",",
"i",
")",
";",
"int",
"l",
"=",
"EnchantmentHelper",
".",
"getFireAspectModifier",
"(",
"inventory",
",",
"(",
"EntityLiving",
")",
"par1Entity",
")",
";",
"if",
"(",
"l",
">",
"0",
")",
"{",
"par1Entity",
".",
"setFire",
"(",
"l",
"*",
"4",
")",
";",
"}",
"}",
"addExhaustion",
"(",
"0.3F",
")",
";",
"}",
"}",
"public",
"void",
"onCriticalHit",
"(",
"Entity",
"entity",
")",
"{",
"}",
"public",
"void",
"onEnchantmentCritical",
"(",
"Entity",
"entity",
")",
"{",
"}",
"public",
"void",
"onItemStackChanged",
"(",
"ItemStack",
"itemstack",
")",
"{",
"}",
"public",
"void",
"setDead",
"(",
")",
"{",
"super",
".",
"setDead",
"(",
")",
";",
"inventorySlots",
".",
"onCraftGuiClosed",
"(",
"this",
")",
";",
"if",
"(",
"craftingInventory",
"!=",
"null",
")",
"{",
"craftingInventory",
".",
"onCraftGuiClosed",
"(",
"this",
")",
";",
"}",
"}",
"public",
"boolean",
"isEntityInsideOpaqueBlock",
"(",
")",
"{",
"return",
"!",
"sleeping",
"&&",
"super",
".",
"isEntityInsideOpaqueBlock",
"(",
")",
";",
"}",
"public",
"EnumStatus",
"sleepInBedAt",
"(",
"int",
"par1",
",",
"int",
"par2",
",",
"int",
"par3",
")",
"{",
"if",
"(",
"!",
"worldObj",
".",
"isRemote",
")",
"{",
"if",
"(",
"isPlayerSleeping",
"(",
")",
"||",
"!",
"isEntityAlive",
"(",
")",
")",
"{",
"return",
"EnumStatus",
".",
"OTHER_PROBLEM",
";",
"}",
"if",
"(",
"!",
"worldObj",
".",
"worldProvider",
".",
"func_48567_d",
"(",
")",
")",
"{",
"return",
"EnumStatus",
".",
"NOT_POSSIBLE_HERE",
";",
"}",
"if",
"(",
"worldObj",
".",
"isDaytime",
"(",
")",
")",
"{",
"return",
"EnumStatus",
".",
"NOT_POSSIBLE_NOW",
";",
"}",
"if",
"(",
"Math",
".",
"abs",
"(",
"posX",
"-",
"(",
"double",
")",
"par1",
")",
">",
"3D",
"||",
"Math",
".",
"abs",
"(",
"posY",
"-",
"(",
"double",
")",
"par2",
")",
">",
"2D",
"||",
"Math",
".",
"abs",
"(",
"posZ",
"-",
"(",
"double",
")",
"par3",
")",
">",
"3D",
")",
"{",
"return",
"EnumStatus",
".",
"TOO_FAR_AWAY",
";",
"}",
"double",
"d",
"=",
"8D",
";",
"double",
"d1",
"=",
"5D",
";",
"List",
"list",
"=",
"worldObj",
".",
"getEntitiesWithinAABB",
"(",
"net",
".",
"minecraft",
".",
"src",
".",
"EntityMob",
".",
"class",
",",
"AxisAlignedBB",
".",
"getBoundingBoxFromPool",
"(",
"(",
"double",
")",
"par1",
"-",
"d",
",",
"(",
"double",
")",
"par2",
"-",
"d1",
",",
"(",
"double",
")",
"par3",
"-",
"d",
",",
"(",
"double",
")",
"par1",
"+",
"d",
",",
"(",
"double",
")",
"par2",
"+",
"d1",
",",
"(",
"double",
")",
"par3",
"+",
"d",
")",
")",
";",
"if",
"(",
"!",
"list",
".",
"isEmpty",
"(",
")",
")",
"{",
"return",
"EnumStatus",
".",
"NOT_SAFE",
";",
"}",
"}",
"setSize",
"(",
"0.2F",
",",
"0.2F",
")",
";",
"yOffset",
"=",
"0.2F",
";",
"if",
"(",
"worldObj",
".",
"blockExists",
"(",
"par1",
",",
"par2",
",",
"par3",
")",
")",
"{",
"int",
"i",
"=",
"worldObj",
".",
"getBlockMetadata",
"(",
"par1",
",",
"par2",
",",
"par3",
")",
";",
"int",
"j",
"=",
"BlockBed",
".",
"getDirection",
"(",
"i",
")",
";",
"float",
"f",
"=",
"0.5F",
";",
"float",
"f1",
"=",
"0.5F",
";",
"switch",
"(",
"j",
")",
"{",
"case",
"0",
":",
"f1",
"=",
"0.9F",
";",
"break",
";",
"case",
"2",
":",
"f1",
"=",
"0.1F",
";",
"break",
";",
"case",
"1",
":",
"f",
"=",
"0.1F",
";",
"break",
";",
"case",
"3",
":",
"f",
"=",
"0.9F",
";",
"break",
";",
"}",
"func_22059_e",
"(",
"j",
")",
";",
"setPosition",
"(",
"(",
"float",
")",
"par1",
"+",
"f",
",",
"(",
"float",
")",
"par2",
"+",
"0.9375F",
",",
"(",
"float",
")",
"par3",
"+",
"f1",
")",
";",
"}",
"else",
"{",
"setPosition",
"(",
"(",
"float",
")",
"par1",
"+",
"0.5F",
",",
"(",
"float",
")",
"par2",
"+",
"0.9375F",
",",
"(",
"float",
")",
"par3",
"+",
"0.5F",
")",
";",
"}",
"sleeping",
"=",
"true",
";",
"sleepTimer",
"=",
"0",
";",
"playerLocation",
"=",
"new",
"ChunkCoordinates",
"(",
"par1",
",",
"par2",
",",
"par3",
")",
";",
"motionX",
"=",
"motionZ",
"=",
"motionY",
"=",
"0.0D",
";",
"if",
"(",
"!",
"worldObj",
".",
"isRemote",
")",
"{",
"worldObj",
".",
"updateAllPlayersSleepingFlag",
"(",
")",
";",
"}",
"return",
"EnumStatus",
".",
"OK",
";",
"}",
"private",
"void",
"func_22059_e",
"(",
"int",
"par1",
")",
"{",
"field_22066_z",
"=",
"0.0F",
";",
"field_22067_A",
"=",
"0.0F",
";",
"switch",
"(",
"par1",
")",
"{",
"case",
"0",
":",
"field_22067_A",
"=",
"-",
"1.8F",
";",
"break",
";",
"case",
"2",
":",
"field_22067_A",
"=",
"1.8F",
";",
"break",
";",
"case",
"1",
":",
"field_22066_z",
"=",
"1.8F",
";",
"break",
";",
"case",
"3",
":",
"field_22066_z",
"=",
"-",
"1.8F",
";",
"break",
";",
"}",
"}",
"public",
"void",
"wakeUpPlayer",
"(",
"boolean",
"par1",
",",
"boolean",
"par2",
",",
"boolean",
"par3",
")",
"{",
"setSize",
"(",
"0.6F",
",",
"1.8F",
")",
";",
"resetHeight",
"(",
")",
";",
"ChunkCoordinates",
"chunkcoordinates",
"=",
"playerLocation",
";",
"ChunkCoordinates",
"chunkcoordinates1",
"=",
"playerLocation",
";",
"if",
"(",
"chunkcoordinates",
"!=",
"null",
"&&",
"worldObj",
".",
"getBlockId",
"(",
"chunkcoordinates",
".",
"posX",
",",
"chunkcoordinates",
".",
"posY",
",",
"chunkcoordinates",
".",
"posZ",
")",
"==",
"Block",
".",
"bed",
".",
"blockID",
")",
"{",
"BlockBed",
".",
"setBedOccupied",
"(",
"worldObj",
",",
"chunkcoordinates",
".",
"posX",
",",
"chunkcoordinates",
".",
"posY",
",",
"chunkcoordinates",
".",
"posZ",
",",
"false",
")",
";",
"ChunkCoordinates",
"chunkcoordinates2",
"=",
"BlockBed",
".",
"getNearestEmptyChunkCoordinates",
"(",
"worldObj",
",",
"chunkcoordinates",
".",
"posX",
",",
"chunkcoordinates",
".",
"posY",
",",
"chunkcoordinates",
".",
"posZ",
",",
"0",
")",
";",
"if",
"(",
"chunkcoordinates2",
"==",
"null",
")",
"{",
"chunkcoordinates2",
"=",
"new",
"ChunkCoordinates",
"(",
"chunkcoordinates",
".",
"posX",
",",
"chunkcoordinates",
".",
"posY",
"+",
"1",
",",
"chunkcoordinates",
".",
"posZ",
")",
";",
"}",
"setPosition",
"(",
"(",
"float",
")",
"chunkcoordinates2",
".",
"posX",
"+",
"0.5F",
",",
"(",
"float",
")",
"chunkcoordinates2",
".",
"posY",
"+",
"yOffset",
"+",
"0.1F",
",",
"(",
"float",
")",
"chunkcoordinates2",
".",
"posZ",
"+",
"0.5F",
")",
";",
"}",
"sleeping",
"=",
"false",
";",
"if",
"(",
"!",
"worldObj",
".",
"isRemote",
"&&",
"par2",
")",
"{",
"worldObj",
".",
"updateAllPlayersSleepingFlag",
"(",
")",
";",
"}",
"if",
"(",
"par1",
")",
"{",
"sleepTimer",
"=",
"0",
";",
"}",
"else",
"{",
"sleepTimer",
"=",
"100",
";",
"}",
"if",
"(",
"par3",
")",
"{",
"setSpawnChunk",
"(",
"playerLocation",
")",
";",
"}",
"}",
"private",
"boolean",
"isInBed",
"(",
")",
"{",
"return",
"worldObj",
".",
"getBlockId",
"(",
"playerLocation",
".",
"posX",
",",
"playerLocation",
".",
"posY",
",",
"playerLocation",
".",
"posZ",
")",
"==",
"Block",
".",
"bed",
".",
"blockID",
";",
"}",
"public",
"static",
"ChunkCoordinates",
"verifyRespawnCoordinates",
"(",
"World",
"par0World",
",",
"ChunkCoordinates",
"par1ChunkCoordinates",
")",
"{",
"IChunkProvider",
"ichunkprovider",
"=",
"par0World",
".",
"getChunkProvider",
"(",
")",
";",
"ichunkprovider",
".",
"loadChunk",
"(",
"par1ChunkCoordinates",
".",
"posX",
"-",
"3",
">>",
"4",
",",
"par1ChunkCoordinates",
".",
"posZ",
"-",
"3",
">>",
"4",
")",
";",
"ichunkprovider",
".",
"loadChunk",
"(",
"par1ChunkCoordinates",
".",
"posX",
"+",
"3",
">>",
"4",
",",
"par1ChunkCoordinates",
".",
"posZ",
"-",
"3",
">>",
"4",
")",
";",
"ichunkprovider",
".",
"loadChunk",
"(",
"par1ChunkCoordinates",
".",
"posX",
"-",
"3",
">>",
"4",
",",
"par1ChunkCoordinates",
".",
"posZ",
"+",
"3",
">>",
"4",
")",
";",
"ichunkprovider",
".",
"loadChunk",
"(",
"par1ChunkCoordinates",
".",
"posX",
"+",
"3",
">>",
"4",
",",
"par1ChunkCoordinates",
".",
"posZ",
"+",
"3",
">>",
"4",
")",
";",
"if",
"(",
"par0World",
".",
"getBlockId",
"(",
"par1ChunkCoordinates",
".",
"posX",
",",
"par1ChunkCoordinates",
".",
"posY",
",",
"par1ChunkCoordinates",
".",
"posZ",
")",
"!=",
"Block",
".",
"bed",
".",
"blockID",
")",
"{",
"return",
"null",
";",
"}",
"else",
"{",
"ChunkCoordinates",
"chunkcoordinates",
"=",
"BlockBed",
".",
"getNearestEmptyChunkCoordinates",
"(",
"par0World",
",",
"par1ChunkCoordinates",
".",
"posX",
",",
"par1ChunkCoordinates",
".",
"posY",
",",
"par1ChunkCoordinates",
".",
"posZ",
",",
"0",
")",
";",
"return",
"chunkcoordinates",
";",
"}",
"}",
"public",
"boolean",
"isPlayerSleeping",
"(",
")",
"{",
"return",
"sleeping",
";",
"}",
"public",
"boolean",
"isPlayerFullyAsleep",
"(",
")",
"{",
"return",
"sleeping",
"&&",
"sleepTimer",
">=",
"100",
";",
"}",
"public",
"void",
"addChatMessage",
"(",
"String",
"s",
")",
"{",
"}",
"public",
"ChunkCoordinates",
"getSpawnChunk",
"(",
")",
"{",
"return",
"spawnChunk",
";",
"}",
"public",
"void",
"setSpawnChunk",
"(",
"ChunkCoordinates",
"par1ChunkCoordinates",
")",
"{",
"if",
"(",
"par1ChunkCoordinates",
"!=",
"null",
")",
"{",
"spawnChunk",
"=",
"new",
"ChunkCoordinates",
"(",
"par1ChunkCoordinates",
")",
";",
"}",
"else",
"{",
"spawnChunk",
"=",
"null",
";",
"}",
"}",
"public",
"void",
"triggerAchievement",
"(",
"StatBase",
"par1StatBase",
")",
"{",
"addStat",
"(",
"par1StatBase",
",",
"1",
")",
";",
"}",
"public",
"void",
"addStat",
"(",
"StatBase",
"statbase",
",",
"int",
"i",
")",
"{",
"}",
"protected",
"void",
"jump",
"(",
")",
"{",
"super",
".",
"jump",
"(",
")",
";",
"addStat",
"(",
"StatList",
".",
"jumpStat",
",",
"1",
")",
";",
"if",
"(",
"isSprinting",
"(",
")",
")",
"{",
"addExhaustion",
"(",
"0.8F",
")",
";",
"}",
"else",
"{",
"addExhaustion",
"(",
"0.2F",
")",
";",
"}",
"}",
"public",
"void",
"moveEntityWithHeading",
"(",
"float",
"par1",
",",
"float",
"par2",
")",
"{",
"double",
"d",
"=",
"posX",
";",
"double",
"d1",
"=",
"posY",
";",
"double",
"d2",
"=",
"posZ",
";",
"if",
"(",
"capabilities",
".",
"isFlying",
")",
"{",
"double",
"d3",
"=",
"motionY",
";",
"float",
"f",
"=",
"jumpMovementFactor",
";",
"jumpMovementFactor",
"=",
"0.05F",
";",
"super",
".",
"moveEntityWithHeading",
"(",
"par1",
",",
"par2",
")",
";",
"motionY",
"=",
"d3",
"*",
"0.59999999999999998D",
";",
"jumpMovementFactor",
"=",
"f",
";",
"}",
"else",
"{",
"super",
".",
"moveEntityWithHeading",
"(",
"par1",
",",
"par2",
")",
";",
"}",
"addMovementStat",
"(",
"posX",
"-",
"d",
",",
"posY",
"-",
"d1",
",",
"posZ",
"-",
"d2",
")",
";",
"}",
"public",
"void",
"addMovementStat",
"(",
"double",
"par1",
",",
"double",
"par3",
",",
"double",
"par5",
")",
"{",
"if",
"(",
"ridingEntity",
"!=",
"null",
")",
"{",
"return",
";",
"}",
"if",
"(",
"isInsideOfMaterial",
"(",
"Material",
".",
"water",
")",
")",
"{",
"int",
"i",
"=",
"Math",
".",
"round",
"(",
"MathHelper",
".",
"sqrt_double",
"(",
"par1",
"*",
"par1",
"+",
"par3",
"*",
"par3",
"+",
"par5",
"*",
"par5",
")",
"*",
"100F",
")",
";",
"if",
"(",
"i",
">",
"0",
")",
"{",
"addStat",
"(",
"StatList",
".",
"distanceDoveStat",
",",
"i",
")",
";",
"addExhaustion",
"(",
"0.015F",
"*",
"(",
"float",
")",
"i",
"*",
"0.01F",
")",
";",
"}",
"}",
"else",
"if",
"(",
"isInWater",
"(",
")",
")",
"{",
"int",
"j",
"=",
"Math",
".",
"round",
"(",
"MathHelper",
".",
"sqrt_double",
"(",
"par1",
"*",
"par1",
"+",
"par5",
"*",
"par5",
")",
"*",
"100F",
")",
";",
"if",
"(",
"j",
">",
"0",
")",
"{",
"addStat",
"(",
"StatList",
".",
"distanceSwumStat",
",",
"j",
")",
";",
"addExhaustion",
"(",
"0.015F",
"*",
"(",
"float",
")",
"j",
"*",
"0.01F",
")",
";",
"}",
"}",
"else",
"if",
"(",
"isOnLadder",
"(",
")",
")",
"{",
"if",
"(",
"par3",
">",
"0.0D",
")",
"{",
"addStat",
"(",
"StatList",
".",
"distanceClimbedStat",
",",
"(",
"int",
")",
"Math",
".",
"round",
"(",
"par3",
"*",
"100D",
")",
")",
";",
"}",
"}",
"else",
"if",
"(",
"onGround",
")",
"{",
"int",
"k",
"=",
"Math",
".",
"round",
"(",
"MathHelper",
".",
"sqrt_double",
"(",
"par1",
"*",
"par1",
"+",
"par5",
"*",
"par5",
")",
"*",
"100F",
")",
";",
"if",
"(",
"k",
">",
"0",
")",
"{",
"addStat",
"(",
"StatList",
".",
"distanceWalkedStat",
",",
"k",
")",
";",
"if",
"(",
"isSprinting",
"(",
")",
")",
"{",
"addExhaustion",
"(",
"0.09999999F",
"*",
"(",
"float",
")",
"k",
"*",
"0.01F",
")",
";",
"}",
"else",
"{",
"addExhaustion",
"(",
"0.01F",
"*",
"(",
"float",
")",
"k",
"*",
"0.01F",
")",
";",
"}",
"}",
"}",
"else",
"{",
"int",
"l",
"=",
"Math",
".",
"round",
"(",
"MathHelper",
".",
"sqrt_double",
"(",
"par1",
"*",
"par1",
"+",
"par5",
"*",
"par5",
")",
"*",
"100F",
")",
";",
"if",
"(",
"l",
">",
"25",
")",
"{",
"addStat",
"(",
"StatList",
".",
"distanceFlownStat",
",",
"l",
")",
";",
"}",
"}",
"}",
"private",
"void",
"addMountedMovementStat",
"(",
"double",
"par1",
",",
"double",
"par3",
",",
"double",
"par5",
")",
"{",
"if",
"(",
"ridingEntity",
"!=",
"null",
")",
"{",
"int",
"i",
"=",
"Math",
".",
"round",
"(",
"MathHelper",
".",
"sqrt_double",
"(",
"par1",
"*",
"par1",
"+",
"par3",
"*",
"par3",
"+",
"par5",
"*",
"par5",
")",
"*",
"100F",
")",
";",
"if",
"(",
"i",
">",
"0",
")",
"{",
"if",
"(",
"ridingEntity",
"instanceof",
"EntityMinecart",
")",
"{",
"addStat",
"(",
"StatList",
".",
"distanceByMinecartStat",
",",
"i",
")",
";",
"if",
"(",
"startMinecartRidingCoordinate",
"==",
"null",
")",
"{",
"startMinecartRidingCoordinate",
"=",
"new",
"ChunkCoordinates",
"(",
"MathHelper",
".",
"floor_double",
"(",
"posX",
")",
",",
"MathHelper",
".",
"floor_double",
"(",
"posY",
")",
",",
"MathHelper",
".",
"floor_double",
"(",
"posZ",
")",
")",
";",
"}",
"else",
"if",
"(",
"startMinecartRidingCoordinate",
".",
"getEuclideanDistanceTo",
"(",
"MathHelper",
".",
"floor_double",
"(",
"posX",
")",
",",
"MathHelper",
".",
"floor_double",
"(",
"posY",
")",
",",
"MathHelper",
".",
"floor_double",
"(",
"posZ",
")",
")",
">=",
"1000D",
")",
"{",
"addStat",
"(",
"AchievementList",
".",
"onARail",
",",
"1",
")",
";",
"}",
"}",
"else",
"if",
"(",
"ridingEntity",
"instanceof",
"EntityBoat",
")",
"{",
"addStat",
"(",
"StatList",
".",
"distanceByBoatStat",
",",
"i",
")",
";",
"}",
"else",
"if",
"(",
"ridingEntity",
"instanceof",
"EntityPig",
")",
"{",
"addStat",
"(",
"StatList",
".",
"distanceByPigStat",
",",
"i",
")",
";",
"}",
"}",
"}",
"}",
"protected",
"void",
"fall",
"(",
"float",
"par1",
")",
"{",
"if",
"(",
"capabilities",
".",
"allowFlying",
")",
"{",
"return",
";",
"}",
"if",
"(",
"par1",
">=",
"2.0F",
")",
"{",
"addStat",
"(",
"StatList",
".",
"distanceFallenStat",
",",
"(",
"int",
")",
"Math",
".",
"round",
"(",
"(",
"double",
")",
"par1",
"*",
"100D",
")",
")",
";",
"}",
"super",
".",
"fall",
"(",
"par1",
")",
";",
"}",
"public",
"void",
"onKillEntity",
"(",
"EntityLiving",
"par1EntityLiving",
")",
"{",
"if",
"(",
"par1EntityLiving",
"instanceof",
"EntityMob",
")",
"{",
"triggerAchievement",
"(",
"AchievementList",
".",
"killEnemy",
")",
";",
"}",
"}",
"public",
"void",
"setInPortal",
"(",
")",
"{",
"if",
"(",
"timeUntilPortal",
">",
"0",
")",
"{",
"timeUntilPortal",
"=",
"10",
";",
"return",
";",
"}",
"else",
"{",
"inPortal",
"=",
"true",
";",
"return",
";",
"}",
"}",
"public",
"void",
"addExperience",
"(",
"int",
"par1",
")",
"{",
"score",
"+=",
"par1",
";",
"int",
"i",
"=",
"0x7fffffff",
"-",
"experienceTotal",
";",
"if",
"(",
"par1",
">",
"i",
")",
"{",
"par1",
"=",
"i",
";",
"}",
"experience",
"+=",
"(",
"float",
")",
"par1",
"/",
"(",
"float",
")",
"xpBarCap",
"(",
")",
";",
"experienceTotal",
"+=",
"par1",
";",
"for",
"(",
";",
"experience",
">=",
"1.0F",
";",
"experience",
"=",
"experience",
"/",
"(",
"float",
")",
"xpBarCap",
"(",
")",
")",
"{",
"experience",
"=",
"(",
"experience",
"-",
"1.0F",
")",
"*",
"(",
"float",
")",
"xpBarCap",
"(",
")",
";",
"increaseLevel",
"(",
")",
";",
"}",
"}",
"public",
"void",
"removeExperience",
"(",
"int",
"par1",
")",
"{",
"experienceLevel",
"-=",
"par1",
";",
"if",
"(",
"experienceLevel",
"<",
"0",
")",
"{",
"experienceLevel",
"=",
"0",
";",
"}",
"}",
"public",
"int",
"xpBarCap",
"(",
")",
"{",
"return",
"7",
"+",
"(",
"experienceLevel",
"*",
"7",
">>",
"1",
")",
";",
"}",
"private",
"void",
"increaseLevel",
"(",
")",
"{",
"experienceLevel",
"++",
";",
"}",
"public",
"void",
"addExhaustion",
"(",
"float",
"par1",
")",
"{",
"if",
"(",
"capabilities",
".",
"disableDamage",
")",
"{",
"return",
";",
"}",
"if",
"(",
"!",
"worldObj",
".",
"isRemote",
")",
"{",
"foodStats",
".",
"addExhaustion",
"(",
"par1",
")",
";",
"}",
"}",
"public",
"FoodStats",
"getFoodStats",
"(",
")",
"{",
"return",
"foodStats",
";",
"}",
"public",
"boolean",
"canEat",
"(",
"boolean",
"par1",
")",
"{",
"return",
"(",
"par1",
"||",
"foodStats",
".",
"needFood",
"(",
")",
")",
"&&",
"!",
"capabilities",
".",
"disableDamage",
";",
"}",
"public",
"boolean",
"shouldHeal",
"(",
")",
"{",
"return",
"getHealth",
"(",
")",
">",
"0",
"&&",
"getHealth",
"(",
")",
"<",
"getMaxHealth",
"(",
")",
";",
"}",
"public",
"void",
"setItemInUse",
"(",
"ItemStack",
"par1ItemStack",
",",
"int",
"par2",
")",
"{",
"if",
"(",
"par1ItemStack",
"==",
"itemInUse",
")",
"{",
"return",
";",
"}",
"itemInUse",
"=",
"par1ItemStack",
";",
"itemInUseCount",
"=",
"par2",
";",
"if",
"(",
"!",
"worldObj",
".",
"isRemote",
")",
"{",
"setEating",
"(",
"true",
")",
";",
"}",
"}",
"public",
"boolean",
"canPlayerEdit",
"(",
"int",
"par1",
",",
"int",
"par2",
",",
"int",
"par3",
")",
"{",
"return",
"true",
";",
"}",
"protected",
"int",
"getExperiencePoints",
"(",
"EntityPlayer",
"par1EntityPlayer",
")",
"{",
"int",
"i",
"=",
"experienceLevel",
"*",
"7",
";",
"if",
"(",
"i",
">",
"100",
")",
"{",
"return",
"100",
";",
"}",
"else",
"{",
"return",
"i",
";",
"}",
"}",
"protected",
"boolean",
"isPlayer",
"(",
")",
"{",
"return",
"true",
";",
"}",
"public",
"String",
"getUsername",
"(",
")",
"{",
"return",
"username",
";",
"}",
"public",
"void",
"travelToTheEnd",
"(",
"int",
"i",
")",
"{",
"}",
"public",
"void",
"copyPlayer",
"(",
"EntityPlayer",
"par1EntityPlayer",
")",
"{",
"inventory",
".",
"copyInventory",
"(",
"par1EntityPlayer",
".",
"inventory",
")",
";",
"health",
"=",
"par1EntityPlayer",
".",
"health",
";",
"foodStats",
"=",
"par1EntityPlayer",
".",
"foodStats",
";",
"experienceLevel",
"=",
"par1EntityPlayer",
".",
"experienceLevel",
";",
"experienceTotal",
"=",
"par1EntityPlayer",
".",
"experienceTotal",
";",
"experience",
"=",
"par1EntityPlayer",
".",
"experience",
";",
"score",
"=",
"par1EntityPlayer",
".",
"score",
";",
"}",
"protected",
"boolean",
"canTriggerWalking",
"(",
")",
"{",
"return",
"!",
"capabilities",
".",
"isFlying",
";",
"}",
"public",
"void",
"func_50022_L",
"(",
")",
"{",
"}",
"}",
"</s>"
] |
9,307 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"class",
"EnchantmentArrowInfinite",
"extends",
"Enchantment",
"{",
"public",
"EnchantmentArrowInfinite",
"(",
"int",
"par1",
",",
"int",
"par2",
")",
"{",
"super",
"(",
"par1",
",",
"par2",
",",
"EnumEnchantmentType",
".",
"bow",
")",
";",
"setName",
"(",
"\"\"",
")",
";",
"}",
"public",
"int",
"getMinEnchantability",
"(",
"int",
"par1",
")",
"{",
"return",
"20",
";",
"}",
"public",
"int",
"getMaxEnchantability",
"(",
"int",
"par1",
")",
"{",
"return",
"50",
";",
"}",
"public",
"int",
"getMaxLevel",
"(",
")",
"{",
"return",
"1",
";",
"}",
"}",
"</s>"
] |
9,308 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"class",
"EnchantmentArrowKnockback",
"extends",
"Enchantment",
"{",
"public",
"EnchantmentArrowKnockback",
"(",
"int",
"par1",
",",
"int",
"par2",
")",
"{",
"super",
"(",
"par1",
",",
"par2",
",",
"EnumEnchantmentType",
".",
"bow",
")",
";",
"setName",
"(",
"\"\"",
")",
";",
"}",
"public",
"int",
"getMinEnchantability",
"(",
"int",
"par1",
")",
"{",
"return",
"12",
"+",
"(",
"par1",
"-",
"1",
")",
"*",
"20",
";",
"}",
"public",
"int",
"getMaxEnchantability",
"(",
"int",
"par1",
")",
"{",
"return",
"getMinEnchantability",
"(",
"par1",
")",
"+",
"25",
";",
"}",
"public",
"int",
"getMaxLevel",
"(",
")",
"{",
"return",
"2",
";",
"}",
"}",
"</s>"
] |
9,309 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"class",
"EntityJumpHelper",
"{",
"private",
"EntityLiving",
"entity",
";",
"private",
"boolean",
"isJumping",
";",
"public",
"EntityJumpHelper",
"(",
"EntityLiving",
"par1EntityLiving",
")",
"{",
"isJumping",
"=",
"false",
";",
"entity",
"=",
"par1EntityLiving",
";",
"}",
"public",
"void",
"setJumping",
"(",
")",
"{",
"isJumping",
"=",
"true",
";",
"}",
"public",
"void",
"doJump",
"(",
")",
"{",
"entity",
".",
"setJumping",
"(",
"isJumping",
")",
";",
"isJumping",
"=",
"false",
";",
"}",
"}",
"</s>"
] |
9,310 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"WorldGenDeadBush",
"extends",
"WorldGenerator",
"{",
"private",
"int",
"deadBushID",
";",
"public",
"WorldGenDeadBush",
"(",
"int",
"par1",
")",
"{",
"deadBushID",
"=",
"par1",
";",
"}",
"public",
"boolean",
"generate",
"(",
"World",
"par1World",
",",
"Random",
"par2Random",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"(",
"(",
"i",
"=",
"par1World",
".",
"getBlockId",
"(",
"par3",
",",
"par4",
",",
"par5",
")",
")",
"==",
"0",
"||",
"i",
"==",
"Block",
".",
"leaves",
".",
"blockID",
")",
"&&",
"par4",
">",
"0",
";",
"par4",
"--",
")",
"{",
"}",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
"4",
";",
"j",
"++",
")",
"{",
"int",
"k",
"=",
"(",
"par3",
"+",
"par2Random",
".",
"nextInt",
"(",
"8",
")",
")",
"-",
"par2Random",
".",
"nextInt",
"(",
"8",
")",
";",
"int",
"l",
"=",
"(",
"par4",
"+",
"par2Random",
".",
"nextInt",
"(",
"4",
")",
")",
"-",
"par2Random",
".",
"nextInt",
"(",
"4",
")",
";",
"int",
"i1",
"=",
"(",
"par5",
"+",
"par2Random",
".",
"nextInt",
"(",
"8",
")",
")",
"-",
"par2Random",
".",
"nextInt",
"(",
"8",
")",
";",
"if",
"(",
"par1World",
".",
"isAirBlock",
"(",
"k",
",",
"l",
",",
"i1",
")",
"&&",
"(",
"(",
"BlockFlower",
")",
"Block",
".",
"blocksList",
"[",
"deadBushID",
"]",
")",
".",
"canBlockStay",
"(",
"par1World",
",",
"k",
",",
"l",
",",
"i1",
")",
")",
"{",
"par1World",
".",
"setBlock",
"(",
"k",
",",
"l",
",",
"i1",
",",
"deadBushID",
")",
";",
"}",
"}",
"return",
"true",
";",
"}",
"}",
"</s>"
] |
9,311 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"class",
"VillageAgressor",
"{",
"public",
"EntityLiving",
"agressor",
";",
"public",
"int",
"agressionTime",
";",
"final",
"Village",
"villageObj",
";",
"VillageAgressor",
"(",
"Village",
"par1Village",
",",
"EntityLiving",
"par2EntityLiving",
",",
"int",
"par3",
")",
"{",
"villageObj",
"=",
"par1Village",
";",
"agressor",
"=",
"par2EntityLiving",
";",
"agressionTime",
"=",
"par3",
";",
"}",
"}",
"</s>"
] |
9,312 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"io",
".",
"*",
";",
"public",
"class",
"Packet16BlockItemSwitch",
"extends",
"Packet",
"{",
"public",
"int",
"id",
";",
"public",
"Packet16BlockItemSwitch",
"(",
")",
"{",
"}",
"public",
"void",
"readPacketData",
"(",
"DataInputStream",
"par1DataInputStream",
")",
"throws",
"IOException",
"{",
"id",
"=",
"par1DataInputStream",
".",
"readShort",
"(",
")",
";",
"}",
"public",
"void",
"writePacketData",
"(",
"DataOutputStream",
"par1DataOutputStream",
")",
"throws",
"IOException",
"{",
"par1DataOutputStream",
".",
"writeShort",
"(",
"id",
")",
";",
"}",
"public",
"void",
"processPacket",
"(",
"NetHandler",
"par1NetHandler",
")",
"{",
"par1NetHandler",
".",
"handleBlockItemSwitch",
"(",
"this",
")",
";",
"}",
"public",
"int",
"getPacketSize",
"(",
")",
"{",
"return",
"2",
";",
"}",
"}",
"</s>"
] |
9,313 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"interface",
"IEnchantmentModifier",
"{",
"public",
"abstract",
"void",
"calculateModifier",
"(",
"Enchantment",
"enchantment",
",",
"int",
"i",
")",
";",
"}",
"</s>"
] |
9,314 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"interface",
"IBlockAccess",
"{",
"public",
"abstract",
"int",
"getBlockId",
"(",
"int",
"i",
",",
"int",
"j",
",",
"int",
"k",
")",
";",
"public",
"abstract",
"TileEntity",
"getBlockTileEntity",
"(",
"int",
"i",
",",
"int",
"j",
",",
"int",
"k",
")",
";",
"public",
"abstract",
"int",
"getBlockMetadata",
"(",
"int",
"i",
",",
"int",
"j",
",",
"int",
"k",
")",
";",
"public",
"abstract",
"Material",
"getBlockMaterial",
"(",
"int",
"i",
",",
"int",
"j",
",",
"int",
"k",
")",
";",
"public",
"abstract",
"boolean",
"isBlockNormalCube",
"(",
"int",
"i",
",",
"int",
"j",
",",
"int",
"k",
")",
";",
"}",
"</s>"
] |
9,315 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"io",
".",
"*",
";",
"public",
"class",
"Packet15Place",
"extends",
"Packet",
"{",
"public",
"int",
"xPosition",
";",
"public",
"int",
"yPosition",
";",
"public",
"int",
"zPosition",
";",
"public",
"int",
"direction",
";",
"public",
"ItemStack",
"itemStack",
";",
"public",
"Packet15Place",
"(",
")",
"{",
"}",
"public",
"void",
"readPacketData",
"(",
"DataInputStream",
"par1DataInputStream",
")",
"throws",
"IOException",
"{",
"xPosition",
"=",
"par1DataInputStream",
".",
"readInt",
"(",
")",
";",
"yPosition",
"=",
"par1DataInputStream",
".",
"read",
"(",
")",
";",
"zPosition",
"=",
"par1DataInputStream",
".",
"readInt",
"(",
")",
";",
"direction",
"=",
"par1DataInputStream",
".",
"read",
"(",
")",
";",
"itemStack",
"=",
"readItemStack",
"(",
"par1DataInputStream",
")",
";",
"}",
"public",
"void",
"writePacketData",
"(",
"DataOutputStream",
"par1DataOutputStream",
")",
"throws",
"IOException",
"{",
"par1DataOutputStream",
".",
"writeInt",
"(",
"xPosition",
")",
";",
"par1DataOutputStream",
".",
"write",
"(",
"yPosition",
")",
";",
"par1DataOutputStream",
".",
"writeInt",
"(",
"zPosition",
")",
";",
"par1DataOutputStream",
".",
"write",
"(",
"direction",
")",
";",
"writeItemStack",
"(",
"itemStack",
",",
"par1DataOutputStream",
")",
";",
"}",
"public",
"void",
"processPacket",
"(",
"NetHandler",
"par1NetHandler",
")",
"{",
"par1NetHandler",
".",
"handlePlace",
"(",
"this",
")",
";",
"}",
"public",
"int",
"getPacketSize",
"(",
")",
"{",
"return",
"15",
";",
"}",
"}",
"</s>"
] |
9,316 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"class",
"BlockFence",
"extends",
"Block",
"{",
"public",
"BlockFence",
"(",
"int",
"par1",
",",
"int",
"par2",
")",
"{",
"super",
"(",
"par1",
",",
"par2",
",",
"Material",
".",
"wood",
")",
";",
"}",
"public",
"BlockFence",
"(",
"int",
"par1",
",",
"int",
"par2",
",",
"Material",
"par3Material",
")",
"{",
"super",
"(",
"par1",
",",
"par2",
",",
"par3Material",
")",
";",
"}",
"public",
"boolean",
"canPlaceBlockAt",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"return",
"super",
".",
"canPlaceBlockAt",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"}",
"public",
"AxisAlignedBB",
"getCollisionBoundingBoxFromPool",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"boolean",
"flag",
"=",
"canConnectFenceTo",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
"-",
"1",
")",
";",
"boolean",
"flag1",
"=",
"canConnectFenceTo",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
"+",
"1",
")",
";",
"boolean",
"flag2",
"=",
"canConnectFenceTo",
"(",
"par1World",
",",
"par2",
"-",
"1",
",",
"par3",
",",
"par4",
")",
";",
"boolean",
"flag3",
"=",
"canConnectFenceTo",
"(",
"par1World",
",",
"par2",
"+",
"1",
",",
"par3",
",",
"par4",
")",
";",
"float",
"f",
"=",
"0.375F",
";",
"float",
"f1",
"=",
"0.625F",
";",
"float",
"f2",
"=",
"0.375F",
";",
"float",
"f3",
"=",
"0.625F",
";",
"if",
"(",
"flag",
")",
"{",
"f2",
"=",
"0.0F",
";",
"}",
"if",
"(",
"flag1",
")",
"{",
"f3",
"=",
"1.0F",
";",
"}",
"if",
"(",
"flag2",
")",
"{",
"f",
"=",
"0.0F",
";",
"}",
"if",
"(",
"flag3",
")",
"{",
"f1",
"=",
"1.0F",
";",
"}",
"return",
"AxisAlignedBB",
".",
"getBoundingBoxFromPool",
"(",
"(",
"float",
")",
"par2",
"+",
"f",
",",
"par3",
",",
"(",
"float",
")",
"par4",
"+",
"f2",
",",
"(",
"float",
")",
"par2",
"+",
"f1",
",",
"(",
"float",
")",
"par3",
"+",
"1.5F",
",",
"(",
"float",
")",
"par4",
"+",
"f3",
")",
";",
"}",
"public",
"void",
"setBlockBoundsBasedOnState",
"(",
"IBlockAccess",
"par1IBlockAccess",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"boolean",
"flag",
"=",
"canConnectFenceTo",
"(",
"par1IBlockAccess",
",",
"par2",
",",
"par3",
",",
"par4",
"-",
"1",
")",
";",
"boolean",
"flag1",
"=",
"canConnectFenceTo",
"(",
"par1IBlockAccess",
",",
"par2",
",",
"par3",
",",
"par4",
"+",
"1",
")",
";",
"boolean",
"flag2",
"=",
"canConnectFenceTo",
"(",
"par1IBlockAccess",
",",
"par2",
"-",
"1",
",",
"par3",
",",
"par4",
")",
";",
"boolean",
"flag3",
"=",
"canConnectFenceTo",
"(",
"par1IBlockAccess",
",",
"par2",
"+",
"1",
",",
"par3",
",",
"par4",
")",
";",
"float",
"f",
"=",
"0.375F",
";",
"float",
"f1",
"=",
"0.625F",
";",
"float",
"f2",
"=",
"0.375F",
";",
"float",
"f3",
"=",
"0.625F",
";",
"if",
"(",
"flag",
")",
"{",
"f2",
"=",
"0.0F",
";",
"}",
"if",
"(",
"flag1",
")",
"{",
"f3",
"=",
"1.0F",
";",
"}",
"if",
"(",
"flag2",
")",
"{",
"f",
"=",
"0.0F",
";",
"}",
"if",
"(",
"flag3",
")",
"{",
"f1",
"=",
"1.0F",
";",
"}",
"setBlockBounds",
"(",
"f",
",",
"0.0F",
",",
"f2",
",",
"f1",
",",
"1.0F",
",",
"f3",
")",
";",
"}",
"public",
"boolean",
"isOpaqueCube",
"(",
")",
"{",
"return",
"false",
";",
"}",
"public",
"boolean",
"renderAsNormalBlock",
"(",
")",
"{",
"return",
"false",
";",
"}",
"public",
"boolean",
"getBlocksMovement",
"(",
"IBlockAccess",
"par1IBlockAccess",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"i",
")",
"{",
"return",
"false",
";",
"}",
"public",
"int",
"getRenderType",
"(",
")",
"{",
"return",
"11",
";",
"}",
"public",
"boolean",
"canConnectFenceTo",
"(",
"IBlockAccess",
"par1IBlockAccess",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"int",
"i",
"=",
"par1IBlockAccess",
".",
"getBlockId",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"if",
"(",
"i",
"==",
"blockID",
"||",
"i",
"==",
"Block",
".",
"fenceGate",
".",
"blockID",
")",
"{",
"return",
"true",
";",
"}",
"Block",
"block",
"=",
"Block",
".",
"blocksList",
"[",
"i",
"]",
";",
"if",
"(",
"block",
"!=",
"null",
"&&",
"block",
".",
"blockMaterial",
".",
"isOpaque",
"(",
")",
"&&",
"block",
".",
"renderAsNormalBlock",
"(",
")",
")",
"{",
"return",
"block",
".",
"blockMaterial",
"!=",
"Material",
".",
"pumpkin",
";",
"}",
"else",
"{",
"return",
"false",
";",
"}",
"}",
"}",
"</s>"
] |
9,317 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"class",
"StructureStrongholdStones",
"extends",
"StructurePieceBlockSelector",
"{",
"private",
"StructureStrongholdStones",
"(",
")",
"{",
"}",
"public",
"void",
"selectBlocks",
"(",
"Random",
"par1Random",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"boolean",
"par5",
")",
"{",
"if",
"(",
"!",
"par5",
")",
"{",
"selectedBlockId",
"=",
"0",
";",
"selectedBlockMetaData",
"=",
"0",
";",
"}",
"else",
"{",
"selectedBlockId",
"=",
"Block",
".",
"stoneBrick",
".",
"blockID",
";",
"float",
"f",
"=",
"par1Random",
".",
"nextFloat",
"(",
")",
";",
"if",
"(",
"f",
"<",
"0.2F",
")",
"{",
"selectedBlockMetaData",
"=",
"2",
";",
"}",
"else",
"if",
"(",
"f",
"<",
"0.5F",
")",
"{",
"selectedBlockMetaData",
"=",
"1",
";",
"}",
"else",
"if",
"(",
"f",
"<",
"0.55F",
")",
"{",
"selectedBlockId",
"=",
"Block",
".",
"silverfish",
".",
"blockID",
";",
"selectedBlockMetaData",
"=",
"2",
";",
"}",
"else",
"{",
"selectedBlockMetaData",
"=",
"0",
";",
"}",
"}",
"}",
"StructureStrongholdStones",
"(",
"StructureStrongholdPieceWeight2",
"par1StructureStrongholdPieceWeight2",
")",
"{",
"this",
"(",
")",
";",
"}",
"}",
"</s>"
] |
9,318 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"class",
"PathNavigate",
"{",
"private",
"EntityLiving",
"theEntity",
";",
"private",
"World",
"worldObj",
";",
"private",
"PathEntity",
"currentPath",
";",
"private",
"float",
"field_46036_d",
";",
"private",
"float",
"field_48672_e",
";",
"private",
"boolean",
"noSunPathfind",
";",
"private",
"int",
"field_48671_g",
";",
"private",
"int",
"field_48677_h",
";",
"private",
"Vec3D",
"field_48678_i",
";",
"private",
"boolean",
"field_48675_j",
";",
"private",
"boolean",
"field_48676_k",
";",
"private",
"boolean",
"field_48673_l",
";",
"private",
"boolean",
"field_48674_m",
";",
"public",
"PathNavigate",
"(",
"EntityLiving",
"par1EntityLiving",
",",
"World",
"par2World",
",",
"float",
"par3",
")",
"{",
"noSunPathfind",
"=",
"false",
";",
"field_48678_i",
"=",
"Vec3D",
".",
"createVectorHelper",
"(",
"0.0D",
",",
"0.0D",
",",
"0.0D",
")",
";",
"field_48675_j",
"=",
"true",
";",
"field_48676_k",
"=",
"false",
";",
"field_48673_l",
"=",
"false",
";",
"field_48674_m",
"=",
"false",
";",
"theEntity",
"=",
"par1EntityLiving",
";",
"worldObj",
"=",
"par2World",
";",
"field_48672_e",
"=",
"par3",
";",
"}",
"public",
"void",
"func_48656_a",
"(",
"boolean",
"par1",
")",
"{",
"field_48673_l",
"=",
"par1",
";",
"}",
"public",
"boolean",
"func_48649_a",
"(",
")",
"{",
"return",
"field_48673_l",
";",
"}",
"public",
"void",
"setBreakDoors",
"(",
"boolean",
"par1",
")",
"{",
"field_48676_k",
"=",
"par1",
";",
"}",
"public",
"void",
"func_48655_c",
"(",
"boolean",
"par1",
")",
"{",
"field_48675_j",
"=",
"par1",
";",
"}",
"public",
"boolean",
"func_48657_b",
"(",
")",
"{",
"return",
"field_48676_k",
";",
"}",
"public",
"void",
"func_48669_d",
"(",
"boolean",
"par1",
")",
"{",
"noSunPathfind",
"=",
"par1",
";",
"}",
"public",
"void",
"func_48654_a",
"(",
"float",
"par1",
")",
"{",
"field_46036_d",
"=",
"par1",
";",
"}",
"public",
"void",
"func_48660_e",
"(",
"boolean",
"par1",
")",
"{",
"field_48674_m",
"=",
"par1",
";",
"}",
"public",
"PathEntity",
"func_48650_a",
"(",
"double",
"par1",
",",
"double",
"par3",
",",
"double",
"par5",
")",
"{",
"if",
"(",
"!",
"canNavigate",
"(",
")",
")",
"{",
"return",
"null",
";",
"}",
"else",
"{",
"return",
"worldObj",
".",
"getEntityPathToXYZ",
"(",
"theEntity",
",",
"MathHelper",
".",
"floor_double",
"(",
"par1",
")",
",",
"(",
"int",
")",
"par3",
",",
"MathHelper",
".",
"floor_double",
"(",
"par5",
")",
",",
"field_48672_e",
",",
"field_48675_j",
",",
"field_48676_k",
",",
"field_48673_l",
",",
"field_48674_m",
")",
";",
"}",
"}",
"public",
"boolean",
"func_48658_a",
"(",
"double",
"par1",
",",
"double",
"par3",
",",
"double",
"par5",
",",
"float",
"par7",
")",
"{",
"PathEntity",
"pathentity",
"=",
"func_48650_a",
"(",
"MathHelper",
".",
"floor_double",
"(",
"par1",
")",
",",
"(",
"int",
")",
"par3",
",",
"MathHelper",
".",
"floor_double",
"(",
"par5",
")",
")",
";",
"return",
"setPath",
"(",
"pathentity",
",",
"par7",
")",
";",
"}",
"public",
"PathEntity",
"func_48661_a",
"(",
"EntityLiving",
"par1EntityLiving",
")",
"{",
"if",
"(",
"!",
"canNavigate",
"(",
")",
")",
"{",
"return",
"null",
";",
"}",
"else",
"{",
"return",
"worldObj",
".",
"getPathEntityToEntity",
"(",
"theEntity",
",",
"par1EntityLiving",
",",
"field_48672_e",
",",
"field_48675_j",
",",
"field_48676_k",
",",
"field_48673_l",
",",
"field_48674_m",
")",
";",
"}",
"}",
"public",
"boolean",
"func_48652_a",
"(",
"EntityLiving",
"par1EntityLiving",
",",
"float",
"par2",
")",
"{",
"PathEntity",
"pathentity",
"=",
"func_48661_a",
"(",
"par1EntityLiving",
")",
";",
"if",
"(",
"pathentity",
"!=",
"null",
")",
"{",
"return",
"setPath",
"(",
"pathentity",
",",
"par2",
")",
";",
"}",
"else",
"{",
"return",
"false",
";",
"}",
"}",
"public",
"boolean",
"setPath",
"(",
"PathEntity",
"par1PathEntity",
",",
"float",
"par2",
")",
"{",
"if",
"(",
"par1PathEntity",
"==",
"null",
")",
"{",
"currentPath",
"=",
"null",
";",
"return",
"false",
";",
"}",
"if",
"(",
"!",
"par1PathEntity",
".",
"func_48427_a",
"(",
"currentPath",
")",
")",
"{",
"currentPath",
"=",
"par1PathEntity",
";",
"}",
"if",
"(",
"noSunPathfind",
")",
"{",
"removeSunnyPath",
"(",
")",
";",
"}",
"if",
"(",
"currentPath",
".",
"getCurrentPathLength",
"(",
")",
"==",
"0",
")",
"{",
"return",
"false",
";",
"}",
"else",
"{",
"field_46036_d",
"=",
"par2",
";",
"Vec3D",
"vec3d",
"=",
"getEntityPosition",
"(",
")",
";",
"field_48677_h",
"=",
"field_48671_g",
";",
"field_48678_i",
".",
"xCoord",
"=",
"vec3d",
".",
"xCoord",
";",
"field_48678_i",
".",
"yCoord",
"=",
"vec3d",
".",
"yCoord",
";",
"field_48678_i",
".",
"zCoord",
"=",
"vec3d",
".",
"zCoord",
";",
"return",
"true",
";",
"}",
"}",
"public",
"PathEntity",
"getPath",
"(",
")",
"{",
"return",
"currentPath",
";",
"}",
"public",
"void",
"onUpdateNavigation",
"(",
")",
"{",
"field_48671_g",
"++",
";",
"if",
"(",
"noPath",
"(",
")",
")",
"{",
"return",
";",
"}",
"if",
"(",
"canNavigate",
"(",
")",
")",
"{",
"pathFollow",
"(",
")",
";",
"}",
"if",
"(",
"noPath",
"(",
")",
")",
"{",
"return",
";",
"}",
"Vec3D",
"vec3d",
"=",
"currentPath",
".",
"getPosition",
"(",
"theEntity",
")",
";",
"if",
"(",
"vec3d",
"==",
"null",
")",
"{",
"return",
";",
"}",
"else",
"{",
"theEntity",
".",
"getMoveHelper",
"(",
")",
".",
"setMoveTo",
"(",
"vec3d",
".",
"xCoord",
",",
"vec3d",
".",
"yCoord",
",",
"vec3d",
".",
"zCoord",
",",
"field_46036_d",
")",
";",
"return",
";",
"}",
"}",
"private",
"void",
"pathFollow",
"(",
")",
"{",
"Vec3D",
"vec3d",
"=",
"getEntityPosition",
"(",
")",
";",
"int",
"i",
"=",
"currentPath",
".",
"getCurrentPathLength",
"(",
")",
";",
"int",
"i2",
"=",
"currentPath",
".",
"getCurrentPathIndex",
"(",
")",
";",
"do",
"{",
"if",
"(",
"i2",
">=",
"currentPath",
".",
"getCurrentPathLength",
"(",
")",
")",
"{",
"break",
";",
"}",
"if",
"(",
"currentPath",
".",
"getPathPointFromIndex",
"(",
"i2",
")",
".",
"yCoord",
"!=",
"(",
"int",
")",
"vec3d",
".",
"yCoord",
")",
"{",
"i",
"=",
"i2",
";",
"break",
";",
"}",
"i2",
"++",
";",
"}",
"while",
"(",
"true",
")",
";",
"float",
"f",
"=",
"theEntity",
".",
"width",
"*",
"theEntity",
".",
"width",
";",
"for",
"(",
"int",
"j",
"=",
"currentPath",
".",
"getCurrentPathIndex",
"(",
")",
";",
"j",
"<",
"i",
";",
"j",
"++",
")",
"{",
"if",
"(",
"vec3d",
".",
"squareDistanceTo",
"(",
"currentPath",
".",
"getVectorFromIndex",
"(",
"theEntity",
",",
"j",
")",
")",
"<",
"(",
"double",
")",
"f",
")",
"{",
"currentPath",
".",
"setCurrentPathIndex",
"(",
"j",
"+",
"1",
")",
";",
"}",
"}",
"int",
"k",
"=",
"(",
"int",
")",
"Math",
".",
"ceil",
"(",
"theEntity",
".",
"width",
")",
";",
"int",
"l",
"=",
"(",
"int",
")",
"theEntity",
".",
"height",
"+",
"1",
";",
"int",
"i1",
"=",
"k",
";",
"int",
"j1",
"=",
"i",
"-",
"1",
";",
"do",
"{",
"if",
"(",
"j1",
"<",
"currentPath",
".",
"getCurrentPathIndex",
"(",
")",
")",
"{",
"break",
";",
"}",
"if",
"(",
"func_48653_a",
"(",
"vec3d",
",",
"currentPath",
".",
"getVectorFromIndex",
"(",
"theEntity",
",",
"j1",
")",
",",
"k",
",",
"l",
",",
"i1",
")",
")",
"{",
"currentPath",
".",
"setCurrentPathIndex",
"(",
"j1",
")",
";",
"break",
";",
"}",
"j1",
"--",
";",
"}",
"while",
"(",
"true",
")",
";",
"if",
"(",
"field_48671_g",
"-",
"field_48677_h",
">",
"100",
")",
"{",
"if",
"(",
"vec3d",
".",
"squareDistanceTo",
"(",
"field_48678_i",
")",
"<",
"2.25D",
")",
"{",
"clearPathEntity",
"(",
")",
";",
"}",
"field_48677_h",
"=",
"field_48671_g",
";",
"field_48678_i",
".",
"xCoord",
"=",
"vec3d",
".",
"xCoord",
";",
"field_48678_i",
".",
"yCoord",
"=",
"vec3d",
".",
"yCoord",
";",
"field_48678_i",
".",
"zCoord",
"=",
"vec3d",
".",
"zCoord",
";",
"}",
"}",
"public",
"boolean",
"noPath",
"(",
")",
"{",
"return",
"currentPath",
"==",
"null",
"||",
"currentPath",
".",
"isFinished",
"(",
")",
";",
"}",
"public",
"void",
"clearPathEntity",
"(",
")",
"{",
"currentPath",
"=",
"null",
";",
"}",
"private",
"Vec3D",
"getEntityPosition",
"(",
")",
"{",
"return",
"Vec3D",
".",
"createVector",
"(",
"theEntity",
".",
"posX",
",",
"getPathableYPos",
"(",
")",
",",
"theEntity",
".",
"posZ",
")",
";",
"}",
"private",
"int",
"getPathableYPos",
"(",
")",
"{",
"if",
"(",
"!",
"theEntity",
".",
"isInWater",
"(",
")",
"||",
"!",
"field_48674_m",
")",
"{",
"return",
"(",
"int",
")",
"(",
"theEntity",
".",
"boundingBox",
".",
"minY",
"+",
"0.5D",
")",
";",
"}",
"int",
"i",
"=",
"(",
"int",
")",
"theEntity",
".",
"boundingBox",
".",
"minY",
";",
"int",
"j",
"=",
"worldObj",
".",
"getBlockId",
"(",
"MathHelper",
".",
"floor_double",
"(",
"theEntity",
".",
"posX",
")",
",",
"i",
",",
"MathHelper",
".",
"floor_double",
"(",
"theEntity",
".",
"posZ",
")",
")",
";",
"int",
"k",
"=",
"0",
";",
"while",
"(",
"j",
"==",
"Block",
".",
"waterMoving",
".",
"blockID",
"||",
"j",
"==",
"Block",
".",
"waterStill",
".",
"blockID",
")",
"{",
"i",
"++",
";",
"j",
"=",
"worldObj",
".",
"getBlockId",
"(",
"MathHelper",
".",
"floor_double",
"(",
"theEntity",
".",
"posX",
")",
",",
"i",
",",
"MathHelper",
".",
"floor_double",
"(",
"theEntity",
".",
"posZ",
")",
")",
";",
"if",
"(",
"++",
"k",
">",
"16",
")",
"{",
"return",
"(",
"int",
")",
"theEntity",
".",
"boundingBox",
".",
"minY",
";",
"}",
"}",
"return",
"i",
";",
"}",
"private",
"boolean",
"canNavigate",
"(",
")",
"{",
"return",
"theEntity",
".",
"onGround",
"||",
"field_48674_m",
"&&",
"func_48648_k",
"(",
")",
";",
"}",
"private",
"boolean",
"func_48648_k",
"(",
")",
"{",
"return",
"theEntity",
".",
"isInWater",
"(",
")",
"||",
"theEntity",
".",
"handleLavaMovement",
"(",
")",
";",
"}",
"private",
"void",
"removeSunnyPath",
"(",
")",
"{",
"if",
"(",
"worldObj",
".",
"canBlockSeeTheSky",
"(",
"MathHelper",
".",
"floor_double",
"(",
"theEntity",
".",
"posX",
")",
",",
"(",
"int",
")",
"(",
"theEntity",
".",
"boundingBox",
".",
"minY",
"+",
"0.5D",
")",
",",
"MathHelper",
".",
"floor_double",
"(",
"theEntity",
".",
"posZ",
")",
")",
")",
"{",
"return",
";",
"}",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"currentPath",
".",
"getCurrentPathLength",
"(",
")",
";",
"i",
"++",
")",
"{",
"PathPoint",
"pathpoint",
"=",
"currentPath",
".",
"getPathPointFromIndex",
"(",
"i",
")",
";",
"if",
"(",
"worldObj",
".",
"canBlockSeeTheSky",
"(",
"pathpoint",
".",
"xCoord",
",",
"pathpoint",
".",
"yCoord",
",",
"pathpoint",
".",
"zCoord",
")",
")",
"{",
"currentPath",
".",
"setCurrentPathLength",
"(",
"i",
"-",
"1",
")",
";",
"return",
";",
"}",
"}",
"}",
"private",
"boolean",
"func_48653_a",
"(",
"Vec3D",
"par1Vec3D",
",",
"Vec3D",
"par2Vec3D",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
")",
"{",
"int",
"i",
"=",
"MathHelper",
".",
"floor_double",
"(",
"par1Vec3D",
".",
"xCoord",
")",
";",
"int",
"j",
"=",
"MathHelper",
".",
"floor_double",
"(",
"par1Vec3D",
".",
"zCoord",
")",
";",
"double",
"d",
"=",
"par2Vec3D",
".",
"xCoord",
"-",
"par1Vec3D",
".",
"xCoord",
";",
"double",
"d1",
"=",
"par2Vec3D",
".",
"zCoord",
"-",
"par1Vec3D",
".",
"zCoord",
";",
"double",
"d2",
"=",
"d",
"*",
"d",
"+",
"d1",
"*",
"d1",
";",
"if",
"(",
"d2",
"<",
"1E-008D",
")",
"{",
"return",
"false",
";",
"}",
"double",
"d3",
"=",
"1.0D",
"/",
"Math",
".",
"sqrt",
"(",
"d2",
")",
";",
"d",
"*=",
"d3",
";",
"d1",
"*=",
"d3",
";",
"par3",
"+=",
"2",
";",
"par5",
"+=",
"2",
";",
"if",
"(",
"!",
"func_48646_a",
"(",
"i",
",",
"(",
"int",
")",
"par1Vec3D",
".",
"yCoord",
",",
"j",
",",
"par3",
",",
"par4",
",",
"par5",
",",
"par1Vec3D",
",",
"d",
",",
"d1",
")",
")",
"{",
"return",
"false",
";",
"}",
"par3",
"-=",
"2",
";",
"par5",
"-=",
"2",
";",
"double",
"d4",
"=",
"1.0D",
"/",
"Math",
".",
"abs",
"(",
"d",
")",
";",
"double",
"d5",
"=",
"1.0D",
"/",
"Math",
".",
"abs",
"(",
"d1",
")",
";",
"double",
"d6",
"=",
"(",
"double",
")",
"(",
"i",
"*",
"1",
")",
"-",
"par1Vec3D",
".",
"xCoord",
";",
"double",
"d7",
"=",
"(",
"double",
")",
"(",
"j",
"*",
"1",
")",
"-",
"par1Vec3D",
".",
"zCoord",
";",
"if",
"(",
"d",
">=",
"0.0D",
")",
"{",
"d6",
"++",
";",
"}",
"if",
"(",
"d1",
">=",
"0.0D",
")",
"{",
"d7",
"++",
";",
"}",
"d6",
"/=",
"d",
";",
"d7",
"/=",
"d1",
";",
"byte",
"byte0",
"=",
"(",
"(",
"byte",
")",
"(",
"d",
">=",
"0.0D",
"?",
"1",
":",
"-",
"1",
")",
")",
";",
"byte",
"byte1",
"=",
"(",
"(",
"byte",
")",
"(",
"d1",
">=",
"0.0D",
"?",
"1",
":",
"-",
"1",
")",
")",
";",
"int",
"k",
"=",
"MathHelper",
".",
"floor_double",
"(",
"par2Vec3D",
".",
"xCoord",
")",
";",
"int",
"l",
"=",
"MathHelper",
".",
"floor_double",
"(",
"par2Vec3D",
".",
"zCoord",
")",
";",
"int",
"i1",
"=",
"k",
"-",
"i",
";",
"for",
"(",
"int",
"j1",
"=",
"l",
"-",
"j",
";",
"i1",
"*",
"byte0",
">",
"0",
"||",
"j1",
"*",
"byte1",
">",
"0",
";",
")",
"{",
"if",
"(",
"d6",
"<",
"d7",
")",
"{",
"d6",
"+=",
"d4",
";",
"i",
"+=",
"byte0",
";",
"i1",
"=",
"k",
"-",
"i",
";",
"}",
"else",
"{",
"d7",
"+=",
"d5",
";",
"j",
"+=",
"byte1",
";",
"j1",
"=",
"l",
"-",
"j",
";",
"}",
"if",
"(",
"!",
"func_48646_a",
"(",
"i",
",",
"(",
"int",
")",
"par1Vec3D",
".",
"yCoord",
",",
"j",
",",
"par3",
",",
"par4",
",",
"par5",
",",
"par1Vec3D",
",",
"d",
",",
"d1",
")",
")",
"{",
"return",
"false",
";",
"}",
"}",
"return",
"true",
";",
"}",
"private",
"boolean",
"func_48646_a",
"(",
"int",
"par1",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
",",
"int",
"par6",
",",
"Vec3D",
"par7Vec3D",
",",
"double",
"par8",
",",
"double",
"par10",
")",
"{",
"int",
"i",
"=",
"par1",
"-",
"par4",
"/",
"2",
";",
"int",
"j",
"=",
"par3",
"-",
"par6",
"/",
"2",
";",
"if",
"(",
"!",
"func_48666_b",
"(",
"i",
",",
"par2",
",",
"j",
",",
"par4",
",",
"par5",
",",
"par6",
",",
"par7Vec3D",
",",
"par8",
",",
"par10",
")",
")",
"{",
"return",
"false",
";",
"}",
"for",
"(",
"int",
"k",
"=",
"i",
";",
"k",
"<",
"i",
"+",
"par4",
";",
"k",
"++",
")",
"{",
"for",
"(",
"int",
"l",
"=",
"j",
";",
"l",
"<",
"j",
"+",
"par6",
";",
"l",
"++",
")",
"{",
"double",
"d",
"=",
"(",
"(",
"double",
")",
"k",
"+",
"0.5D",
")",
"-",
"par7Vec3D",
".",
"xCoord",
";",
"double",
"d1",
"=",
"(",
"(",
"double",
")",
"l",
"+",
"0.5D",
")",
"-",
"par7Vec3D",
".",
"zCoord",
";",
"if",
"(",
"d",
"*",
"par8",
"+",
"d1",
"*",
"par10",
"<",
"0.0D",
")",
"{",
"continue",
";",
"}",
"int",
"i1",
"=",
"worldObj",
".",
"getBlockId",
"(",
"k",
",",
"par2",
"-",
"1",
",",
"l",
")",
";",
"if",
"(",
"i1",
"<=",
"0",
")",
"{",
"return",
"false",
";",
"}",
"Material",
"material",
"=",
"Block",
".",
"blocksList",
"[",
"i1",
"]",
".",
"blockMaterial",
";",
"if",
"(",
"material",
"==",
"Material",
".",
"water",
"&&",
"!",
"theEntity",
".",
"isInWater",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"material",
"==",
"Material",
".",
"lava",
")",
"{",
"return",
"false",
";",
"}",
"}",
"}",
"return",
"true",
";",
"}",
"private",
"boolean",
"func_48666_b",
"(",
"int",
"par1",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
",",
"int",
"par6",
",",
"Vec3D",
"par7Vec3D",
",",
"double",
"par8",
",",
"double",
"par10",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"par1",
";",
"i",
"<",
"par1",
"+",
"par4",
";",
"i",
"++",
")",
"{",
"for",
"(",
"int",
"j",
"=",
"par2",
";",
"j",
"<",
"par2",
"+",
"par5",
";",
"j",
"++",
")",
"{",
"for",
"(",
"int",
"k",
"=",
"par3",
";",
"k",
"<",
"par3",
"+",
"par6",
";",
"k",
"++",
")",
"{",
"double",
"d",
"=",
"(",
"(",
"double",
")",
"i",
"+",
"0.5D",
")",
"-",
"par7Vec3D",
".",
"xCoord",
";",
"double",
"d1",
"=",
"(",
"(",
"double",
")",
"k",
"+",
"0.5D",
")",
"-",
"par7Vec3D",
".",
"zCoord",
";",
"if",
"(",
"d",
"*",
"par8",
"+",
"d1",
"*",
"par10",
"<",
"0.0D",
")",
"{",
"continue",
";",
"}",
"int",
"l",
"=",
"worldObj",
".",
"getBlockId",
"(",
"i",
",",
"j",
",",
"k",
")",
";",
"if",
"(",
"l",
">",
"0",
"&&",
"!",
"Block",
".",
"blocksList",
"[",
"l",
"]",
".",
"getBlocksMovement",
"(",
"worldObj",
",",
"i",
",",
"j",
",",
"k",
")",
")",
"{",
"return",
"false",
";",
"}",
"}",
"}",
"}",
"return",
"true",
";",
"}",
"}",
"</s>"
] |
9,319 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"class",
"TileEntityEndPortal",
"extends",
"TileEntity",
"{",
"public",
"TileEntityEndPortal",
"(",
")",
"{",
"}",
"}",
"</s>"
] |
9,320 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"ArrayList",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"public",
"class",
"BiomeCache",
"{",
"private",
"final",
"WorldChunkManager",
"chunkManager",
";",
"private",
"long",
"lastCleanupTime",
";",
"private",
"LongHashMap",
"cacheMap",
";",
"private",
"List",
"cache",
";",
"public",
"BiomeCache",
"(",
"WorldChunkManager",
"par1WorldChunkManager",
")",
"{",
"lastCleanupTime",
"=",
"0L",
";",
"cacheMap",
"=",
"new",
"LongHashMap",
"(",
")",
";",
"cache",
"=",
"new",
"ArrayList",
"(",
")",
";",
"chunkManager",
"=",
"par1WorldChunkManager",
";",
"}",
"public",
"BiomeCacheBlock",
"getBiomeCacheBlock",
"(",
"int",
"par1",
",",
"int",
"par2",
")",
"{",
"par1",
">>=",
"4",
";",
"par2",
">>=",
"4",
";",
"long",
"l",
"=",
"(",
"long",
")",
"par1",
"&",
"0xffffffffL",
"|",
"(",
"(",
"long",
")",
"par2",
"&",
"0xffffffffL",
")",
"<<",
"32",
";",
"BiomeCacheBlock",
"biomecacheblock",
"=",
"(",
"BiomeCacheBlock",
")",
"cacheMap",
".",
"getValueByKey",
"(",
"l",
")",
";",
"if",
"(",
"biomecacheblock",
"==",
"null",
")",
"{",
"biomecacheblock",
"=",
"new",
"BiomeCacheBlock",
"(",
"this",
",",
"par1",
",",
"par2",
")",
";",
"cacheMap",
".",
"add",
"(",
"l",
",",
"biomecacheblock",
")",
";",
"cache",
".",
"add",
"(",
"biomecacheblock",
")",
";",
"}",
"biomecacheblock",
".",
"lastAccessTime",
"=",
"System",
".",
"currentTimeMillis",
"(",
")",
";",
"return",
"biomecacheblock",
";",
"}",
"public",
"BiomeGenBase",
"getBiomeGenAt",
"(",
"int",
"par1",
",",
"int",
"par2",
")",
"{",
"return",
"getBiomeCacheBlock",
"(",
"par1",
",",
"par2",
")",
".",
"getBiomeGenAt",
"(",
"par1",
",",
"par2",
")",
";",
"}",
"public",
"void",
"cleanupCache",
"(",
")",
"{",
"long",
"l",
"=",
"System",
".",
"currentTimeMillis",
"(",
")",
";",
"long",
"l1",
"=",
"l",
"-",
"lastCleanupTime",
";",
"if",
"(",
"l1",
">",
"7500L",
"||",
"l1",
"<",
"0L",
")",
"{",
"lastCleanupTime",
"=",
"l",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"cache",
".",
"size",
"(",
")",
";",
"i",
"++",
")",
"{",
"BiomeCacheBlock",
"biomecacheblock",
"=",
"(",
"BiomeCacheBlock",
")",
"cache",
".",
"get",
"(",
"i",
")",
";",
"long",
"l2",
"=",
"l",
"-",
"biomecacheblock",
".",
"lastAccessTime",
";",
"if",
"(",
"l2",
">",
"30000L",
"||",
"l2",
"<",
"0L",
")",
"{",
"cache",
".",
"remove",
"(",
"i",
"--",
")",
";",
"long",
"l3",
"=",
"(",
"long",
")",
"biomecacheblock",
".",
"xPosition",
"&",
"0xffffffffL",
"|",
"(",
"(",
"long",
")",
"biomecacheblock",
".",
"zPosition",
"&",
"0xffffffffL",
")",
"<<",
"32",
";",
"cacheMap",
".",
"remove",
"(",
"l3",
")",
";",
"}",
"}",
"}",
"}",
"public",
"BiomeGenBase",
"[",
"]",
"getCachedBiomes",
"(",
"int",
"par1",
",",
"int",
"par2",
")",
"{",
"return",
"getBiomeCacheBlock",
"(",
"par1",
",",
"par2",
")",
".",
"biomes",
";",
"}",
"static",
"WorldChunkManager",
"getChunkManager",
"(",
"BiomeCache",
"par0BiomeCache",
")",
"{",
"return",
"par0BiomeCache",
".",
"chunkManager",
";",
"}",
"}",
"</s>"
] |
9,321 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"BlockStationary",
"extends",
"BlockFluid",
"{",
"protected",
"BlockStationary",
"(",
"int",
"par1",
",",
"Material",
"par2Material",
")",
"{",
"super",
"(",
"par1",
",",
"par2Material",
")",
";",
"setTickRandomly",
"(",
"false",
")",
";",
"if",
"(",
"par2Material",
"==",
"Material",
".",
"lava",
")",
"{",
"setTickRandomly",
"(",
"true",
")",
";",
"}",
"}",
"public",
"boolean",
"getBlocksMovement",
"(",
"IBlockAccess",
"par1IBlockAccess",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"return",
"blockMaterial",
"!=",
"Material",
".",
"lava",
";",
"}",
"public",
"void",
"onNeighborBlockChange",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
")",
"{",
"super",
".",
"onNeighborBlockChange",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
",",
"par5",
")",
";",
"if",
"(",
"par1World",
".",
"getBlockId",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
"==",
"blockID",
")",
"{",
"setNotStationary",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"}",
"}",
"private",
"void",
"setNotStationary",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"int",
"i",
"=",
"par1World",
".",
"getBlockMetadata",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"par1World",
".",
"editingBlocks",
"=",
"true",
";",
"par1World",
".",
"setBlockAndMetadata",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"blockID",
"-",
"1",
",",
"i",
")",
";",
"par1World",
".",
"markBlocksDirty",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"par1World",
".",
"scheduleBlockUpdate",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"blockID",
"-",
"1",
",",
"tickRate",
"(",
")",
")",
";",
"par1World",
".",
"editingBlocks",
"=",
"false",
";",
"}",
"public",
"void",
"updateTick",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"Random",
"par5Random",
")",
"{",
"if",
"(",
"blockMaterial",
"==",
"Material",
".",
"lava",
")",
"{",
"int",
"i",
"=",
"par5Random",
".",
"nextInt",
"(",
"3",
")",
";",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
"i",
";",
"j",
"++",
")",
"{",
"par2",
"+=",
"par5Random",
".",
"nextInt",
"(",
"3",
")",
"-",
"1",
";",
"par3",
"++",
";",
"par4",
"+=",
"par5Random",
".",
"nextInt",
"(",
"3",
")",
"-",
"1",
";",
"int",
"l",
"=",
"par1World",
".",
"getBlockId",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"if",
"(",
"l",
"==",
"0",
")",
"{",
"if",
"(",
"isFlammable",
"(",
"par1World",
",",
"par2",
"-",
"1",
",",
"par3",
",",
"par4",
")",
"||",
"isFlammable",
"(",
"par1World",
",",
"par2",
"+",
"1",
",",
"par3",
",",
"par4",
")",
"||",
"isFlammable",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
"-",
"1",
")",
"||",
"isFlammable",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
"+",
"1",
")",
"||",
"isFlammable",
"(",
"par1World",
",",
"par2",
",",
"par3",
"-",
"1",
",",
"par4",
")",
"||",
"isFlammable",
"(",
"par1World",
",",
"par2",
",",
"par3",
"+",
"1",
",",
"par4",
")",
")",
"{",
"par1World",
".",
"setBlockWithNotify",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"Block",
".",
"fire",
".",
"blockID",
")",
";",
"return",
";",
"}",
"continue",
";",
"}",
"if",
"(",
"Block",
".",
"blocksList",
"[",
"l",
"]",
".",
"blockMaterial",
".",
"blocksMovement",
"(",
")",
")",
"{",
"return",
";",
"}",
"}",
"if",
"(",
"i",
"==",
"0",
")",
"{",
"int",
"k",
"=",
"par2",
";",
"int",
"i1",
"=",
"par4",
";",
"for",
"(",
"int",
"j1",
"=",
"0",
";",
"j1",
"<",
"3",
";",
"j1",
"++",
")",
"{",
"par2",
"=",
"(",
"k",
"+",
"par5Random",
".",
"nextInt",
"(",
"3",
")",
")",
"-",
"1",
";",
"par4",
"=",
"(",
"i1",
"+",
"par5Random",
".",
"nextInt",
"(",
"3",
")",
")",
"-",
"1",
";",
"if",
"(",
"par1World",
".",
"isAirBlock",
"(",
"par2",
",",
"par3",
"+",
"1",
",",
"par4",
")",
"&&",
"isFlammable",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
")",
")",
"{",
"par1World",
".",
"setBlockWithNotify",
"(",
"par2",
",",
"par3",
"+",
"1",
",",
"par4",
",",
"Block",
".",
"fire",
".",
"blockID",
")",
";",
"}",
"}",
"}",
"}",
"}",
"private",
"boolean",
"isFlammable",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"return",
"par1World",
".",
"getBlockMaterial",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
".",
"getCanBurn",
"(",
")",
";",
"}",
"}",
"</s>"
] |
9,322 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"class",
"ItemMapBase",
"extends",
"Item",
"{",
"protected",
"ItemMapBase",
"(",
"int",
"par1",
")",
"{",
"super",
"(",
"par1",
")",
";",
"}",
"public",
"boolean",
"func_28019_b",
"(",
")",
"{",
"return",
"true",
";",
"}",
"public",
"Packet",
"getUpdatePacket",
"(",
"ItemStack",
"par1ItemStack",
",",
"World",
"par2World",
",",
"EntityPlayer",
"par3EntityPlayer",
")",
"{",
"return",
"null",
";",
"}",
"}",
"</s>"
] |
9,323 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"EntityChicken",
"extends",
"EntityAnimal",
"{",
"public",
"boolean",
"field_392_a",
";",
"public",
"float",
"field_391_b",
";",
"public",
"float",
"destPos",
";",
"public",
"float",
"field_394_ae",
";",
"public",
"float",
"field_393_af",
";",
"public",
"float",
"field_390_ai",
";",
"public",
"int",
"timeUntilNextEgg",
";",
"public",
"EntityChicken",
"(",
"World",
"par1World",
")",
"{",
"super",
"(",
"par1World",
")",
";",
"field_392_a",
"=",
"false",
";",
"field_391_b",
"=",
"0.0F",
";",
"destPos",
"=",
"0.0F",
";",
"field_390_ai",
"=",
"1.0F",
";",
"texture",
"=",
"\"\"",
";",
"setSize",
"(",
"0.3F",
",",
"0.7F",
")",
";",
"timeUntilNextEgg",
"=",
"rand",
".",
"nextInt",
"(",
"6000",
")",
"+",
"6000",
";",
"float",
"f",
"=",
"0.25F",
";",
"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.28F",
")",
")",
";",
"tasks",
".",
"addTask",
"(",
"5",
",",
"new",
"EntityAIWander",
"(",
"this",
",",
"f",
")",
")",
";",
"tasks",
".",
"addTask",
"(",
"6",
",",
"new",
"EntityAIWatchClosest",
"(",
"this",
",",
"net",
".",
"minecraft",
".",
"src",
".",
"EntityPlayer",
".",
"class",
",",
"6F",
")",
")",
";",
"tasks",
".",
"addTask",
"(",
"7",
",",
"new",
"EntityAILookIdle",
"(",
"this",
")",
")",
";",
"}",
"public",
"boolean",
"isAIEnabled",
"(",
")",
"{",
"return",
"true",
";",
"}",
"public",
"int",
"getMaxHealth",
"(",
")",
"{",
"return",
"4",
";",
"}",
"public",
"void",
"onLivingUpdate",
"(",
")",
"{",
"super",
".",
"onLivingUpdate",
"(",
")",
";",
"field_393_af",
"=",
"field_391_b",
";",
"field_394_ae",
"=",
"destPos",
";",
"destPos",
"+=",
"(",
"double",
")",
"(",
"onGround",
"?",
"-",
"1",
":",
"4",
")",
"*",
"0.29999999999999999D",
";",
"if",
"(",
"destPos",
"<",
"0.0F",
")",
"{",
"destPos",
"=",
"0.0F",
";",
"}",
"if",
"(",
"destPos",
">",
"1.0F",
")",
"{",
"destPos",
"=",
"1.0F",
";",
"}",
"if",
"(",
"!",
"onGround",
"&&",
"field_390_ai",
"<",
"1.0F",
")",
"{",
"field_390_ai",
"=",
"1.0F",
";",
"}",
"field_390_ai",
"*=",
"0.90000000000000002D",
";",
"if",
"(",
"!",
"onGround",
"&&",
"motionY",
"<",
"0.0D",
")",
"{",
"motionY",
"*=",
"0.59999999999999998D",
";",
"}",
"field_391_b",
"+=",
"field_390_ai",
"*",
"2.0F",
";",
"if",
"(",
"!",
"isChild",
"(",
")",
"&&",
"!",
"worldObj",
".",
"isRemote",
"&&",
"--",
"timeUntilNextEgg",
"<=",
"0",
")",
"{",
"worldObj",
".",
"playSoundAtEntity",
"(",
"this",
",",
"\"\"",
",",
"1.0F",
",",
"(",
"rand",
".",
"nextFloat",
"(",
")",
"-",
"rand",
".",
"nextFloat",
"(",
")",
")",
"*",
"0.2F",
"+",
"1.0F",
")",
";",
"dropItem",
"(",
"Item",
".",
"egg",
".",
"shiftedIndex",
",",
"1",
")",
";",
"timeUntilNextEgg",
"=",
"rand",
".",
"nextInt",
"(",
"6000",
")",
"+",
"6000",
";",
"}",
"}",
"protected",
"void",
"fall",
"(",
"float",
"f",
")",
"{",
"}",
"public",
"void",
"writeEntityToNBT",
"(",
"NBTTagCompound",
"par1NBTTagCompound",
")",
"{",
"super",
".",
"writeEntityToNBT",
"(",
"par1NBTTagCompound",
")",
";",
"}",
"public",
"void",
"readEntityFromNBT",
"(",
"NBTTagCompound",
"par1NBTTagCompound",
")",
"{",
"super",
".",
"readEntityFromNBT",
"(",
"par1NBTTagCompound",
")",
";",
"}",
"protected",
"String",
"getLivingSound",
"(",
")",
"{",
"return",
"\"mob.chicken\"",
";",
"}",
"protected",
"String",
"getHurtSound",
"(",
")",
"{",
"return",
"\"\"",
";",
"}",
"protected",
"String",
"getDeathSound",
"(",
")",
"{",
"return",
"\"\"",
";",
"}",
"protected",
"int",
"getDropItemId",
"(",
")",
"{",
"return",
"Item",
".",
"feather",
".",
"shiftedIndex",
";",
"}",
"protected",
"void",
"dropFewItems",
"(",
"boolean",
"par1",
",",
"int",
"par2",
")",
"{",
"int",
"i",
"=",
"rand",
".",
"nextInt",
"(",
"3",
")",
"+",
"rand",
".",
"nextInt",
"(",
"1",
"+",
"par2",
")",
";",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
"i",
";",
"j",
"++",
")",
"{",
"dropItem",
"(",
"Item",
".",
"feather",
".",
"shiftedIndex",
",",
"1",
")",
";",
"}",
"if",
"(",
"isBurning",
"(",
")",
")",
"{",
"dropItem",
"(",
"Item",
".",
"chickenCooked",
".",
"shiftedIndex",
",",
"1",
")",
";",
"}",
"else",
"{",
"dropItem",
"(",
"Item",
".",
"chickenRaw",
".",
"shiftedIndex",
",",
"1",
")",
";",
"}",
"}",
"public",
"EntityAnimal",
"spawnBabyAnimal",
"(",
"EntityAnimal",
"par1EntityAnimal",
")",
"{",
"return",
"new",
"EntityChicken",
"(",
"worldObj",
")",
";",
"}",
"}",
"</s>"
] |
9,324 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"BlockRail",
"extends",
"Block",
"{",
"private",
"final",
"boolean",
"isPowered",
";",
"public",
"static",
"final",
"boolean",
"isRailBlockAt",
"(",
"World",
"par0World",
",",
"int",
"par1",
",",
"int",
"par2",
",",
"int",
"par3",
")",
"{",
"int",
"i",
"=",
"par0World",
".",
"getBlockId",
"(",
"par1",
",",
"par2",
",",
"par3",
")",
";",
"return",
"i",
"==",
"Block",
".",
"rail",
".",
"blockID",
"||",
"i",
"==",
"Block",
".",
"railPowered",
".",
"blockID",
"||",
"i",
"==",
"Block",
".",
"railDetector",
".",
"blockID",
";",
"}",
"public",
"static",
"final",
"boolean",
"isRailBlock",
"(",
"int",
"par0",
")",
"{",
"return",
"par0",
"==",
"Block",
".",
"rail",
".",
"blockID",
"||",
"par0",
"==",
"Block",
".",
"railPowered",
".",
"blockID",
"||",
"par0",
"==",
"Block",
".",
"railDetector",
".",
"blockID",
";",
"}",
"protected",
"BlockRail",
"(",
"int",
"par1",
",",
"int",
"par2",
",",
"boolean",
"par3",
")",
"{",
"super",
"(",
"par1",
",",
"par2",
",",
"Material",
".",
"circuits",
")",
";",
"isPowered",
"=",
"par3",
";",
"setBlockBounds",
"(",
"0.0F",
",",
"0.0F",
",",
"0.0F",
",",
"1.0F",
",",
"0.125F",
",",
"1.0F",
")",
";",
"}",
"public",
"boolean",
"isPowered",
"(",
")",
"{",
"return",
"isPowered",
";",
"}",
"public",
"AxisAlignedBB",
"getCollisionBoundingBoxFromPool",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"i",
")",
"{",
"return",
"null",
";",
"}",
"public",
"boolean",
"isOpaqueCube",
"(",
")",
"{",
"return",
"false",
";",
"}",
"public",
"MovingObjectPosition",
"collisionRayTrace",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"Vec3D",
"par5Vec3D",
",",
"Vec3D",
"par6Vec3D",
")",
"{",
"setBlockBoundsBasedOnState",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"return",
"super",
".",
"collisionRayTrace",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
",",
"par5Vec3D",
",",
"par6Vec3D",
")",
";",
"}",
"public",
"void",
"setBlockBoundsBasedOnState",
"(",
"IBlockAccess",
"par1IBlockAccess",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"int",
"i",
"=",
"par1IBlockAccess",
".",
"getBlockMetadata",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"if",
"(",
"i",
">=",
"2",
"&&",
"i",
"<=",
"5",
")",
"{",
"setBlockBounds",
"(",
"0.0F",
",",
"0.0F",
",",
"0.0F",
",",
"1.0F",
",",
"0.625F",
",",
"1.0F",
")",
";",
"}",
"else",
"{",
"setBlockBounds",
"(",
"0.0F",
",",
"0.0F",
",",
"0.0F",
",",
"1.0F",
",",
"0.125F",
",",
"1.0F",
")",
";",
"}",
"}",
"public",
"int",
"getBlockTextureFromSideAndMetadata",
"(",
"int",
"par1",
",",
"int",
"par2",
")",
"{",
"if",
"(",
"isPowered",
")",
"{",
"if",
"(",
"blockID",
"==",
"Block",
".",
"railPowered",
".",
"blockID",
"&&",
"(",
"par2",
"&",
"8",
")",
"==",
"0",
")",
"{",
"return",
"blockIndexInTexture",
"-",
"16",
";",
"}",
"}",
"else",
"if",
"(",
"par2",
">=",
"6",
")",
"{",
"return",
"blockIndexInTexture",
"-",
"16",
";",
"}",
"return",
"blockIndexInTexture",
";",
"}",
"public",
"boolean",
"renderAsNormalBlock",
"(",
")",
"{",
"return",
"false",
";",
"}",
"public",
"int",
"getRenderType",
"(",
")",
"{",
"return",
"9",
";",
"}",
"public",
"int",
"quantityDropped",
"(",
"Random",
"par1Random",
")",
"{",
"return",
"1",
";",
"}",
"public",
"boolean",
"canPlaceBlockAt",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"return",
"par1World",
".",
"isBlockNormalCube",
"(",
"par2",
",",
"par3",
"-",
"1",
",",
"par4",
")",
";",
"}",
"public",
"void",
"onBlockAdded",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"if",
"(",
"!",
"par1World",
".",
"isRemote",
")",
"{",
"refreshTrackShape",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
",",
"true",
")",
";",
"if",
"(",
"blockID",
"==",
"Block",
".",
"railPowered",
".",
"blockID",
")",
"{",
"onNeighborBlockChange",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
",",
"blockID",
")",
";",
"}",
"}",
"}",
"public",
"void",
"onNeighborBlockChange",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
")",
"{",
"if",
"(",
"par1World",
".",
"isRemote",
")",
"{",
"return",
";",
"}",
"int",
"i",
"=",
"par1World",
".",
"getBlockMetadata",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"int",
"j",
"=",
"i",
";",
"if",
"(",
"isPowered",
")",
"{",
"j",
"&=",
"7",
";",
"}",
"boolean",
"flag",
"=",
"false",
";",
"if",
"(",
"!",
"par1World",
".",
"isBlockNormalCube",
"(",
"par2",
",",
"par3",
"-",
"1",
",",
"par4",
")",
")",
"{",
"flag",
"=",
"true",
";",
"}",
"if",
"(",
"j",
"==",
"2",
"&&",
"!",
"par1World",
".",
"isBlockNormalCube",
"(",
"par2",
"+",
"1",
",",
"par3",
",",
"par4",
")",
")",
"{",
"flag",
"=",
"true",
";",
"}",
"if",
"(",
"j",
"==",
"3",
"&&",
"!",
"par1World",
".",
"isBlockNormalCube",
"(",
"par2",
"-",
"1",
",",
"par3",
",",
"par4",
")",
")",
"{",
"flag",
"=",
"true",
";",
"}",
"if",
"(",
"j",
"==",
"4",
"&&",
"!",
"par1World",
".",
"isBlockNormalCube",
"(",
"par2",
",",
"par3",
",",
"par4",
"-",
"1",
")",
")",
"{",
"flag",
"=",
"true",
";",
"}",
"if",
"(",
"j",
"==",
"5",
"&&",
"!",
"par1World",
".",
"isBlockNormalCube",
"(",
"par2",
",",
"par3",
",",
"par4",
"+",
"1",
")",
")",
"{",
"flag",
"=",
"true",
";",
"}",
"if",
"(",
"flag",
")",
"{",
"dropBlockAsItem",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
",",
"par1World",
".",
"getBlockMetadata",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
",",
"0",
")",
";",
"par1World",
".",
"setBlockWithNotify",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"0",
")",
";",
"}",
"else",
"if",
"(",
"blockID",
"==",
"Block",
".",
"railPowered",
".",
"blockID",
")",
"{",
"boolean",
"flag1",
"=",
"par1World",
".",
"isBlockIndirectlyGettingPowered",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"flag1",
"=",
"flag1",
"||",
"isNeighborRailPowered",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
",",
"i",
",",
"true",
",",
"0",
")",
"||",
"isNeighborRailPowered",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
",",
"i",
",",
"false",
",",
"0",
")",
";",
"boolean",
"flag2",
"=",
"false",
";",
"if",
"(",
"flag1",
"&&",
"(",
"i",
"&",
"8",
")",
"==",
"0",
")",
"{",
"par1World",
".",
"setBlockMetadataWithNotify",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"j",
"|",
"8",
")",
";",
"flag2",
"=",
"true",
";",
"}",
"else",
"if",
"(",
"!",
"flag1",
"&&",
"(",
"i",
"&",
"8",
")",
"!=",
"0",
")",
"{",
"par1World",
".",
"setBlockMetadataWithNotify",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"j",
")",
";",
"flag2",
"=",
"true",
";",
"}",
"if",
"(",
"flag2",
")",
"{",
"par1World",
".",
"notifyBlocksOfNeighborChange",
"(",
"par2",
",",
"par3",
"-",
"1",
",",
"par4",
",",
"blockID",
")",
";",
"if",
"(",
"j",
"==",
"2",
"||",
"j",
"==",
"3",
"||",
"j",
"==",
"4",
"||",
"j",
"==",
"5",
")",
"{",
"par1World",
".",
"notifyBlocksOfNeighborChange",
"(",
"par2",
",",
"par3",
"+",
"1",
",",
"par4",
",",
"blockID",
")",
";",
"}",
"}",
"}",
"else",
"if",
"(",
"par5",
">",
"0",
"&&",
"Block",
".",
"blocksList",
"[",
"par5",
"]",
".",
"canProvidePower",
"(",
")",
"&&",
"!",
"isPowered",
"&&",
"RailLogic",
".",
"getNAdjacentTracks",
"(",
"new",
"RailLogic",
"(",
"this",
",",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
")",
")",
"==",
"3",
")",
"{",
"refreshTrackShape",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
",",
"false",
")",
";",
"}",
"}",
"private",
"void",
"refreshTrackShape",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"boolean",
"par5",
")",
"{",
"if",
"(",
"par1World",
".",
"isRemote",
")",
"{",
"return",
";",
"}",
"else",
"{",
"(",
"new",
"RailLogic",
"(",
"this",
",",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
")",
")",
".",
"refreshTrackShape",
"(",
"par1World",
".",
"isBlockIndirectlyGettingPowered",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
",",
"par5",
")",
";",
"return",
";",
"}",
"}",
"private",
"boolean",
"isNeighborRailPowered",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
",",
"boolean",
"par6",
",",
"int",
"par7",
")",
"{",
"if",
"(",
"par7",
">=",
"8",
")",
"{",
"return",
"false",
";",
"}",
"int",
"i",
"=",
"par5",
"&",
"7",
";",
"boolean",
"flag",
"=",
"true",
";",
"switch",
"(",
"i",
")",
"{",
"case",
"0",
":",
"if",
"(",
"par6",
")",
"{",
"par4",
"++",
";",
"}",
"else",
"{",
"par4",
"--",
";",
"}",
"break",
";",
"case",
"1",
":",
"if",
"(",
"par6",
")",
"{",
"par2",
"--",
";",
"}",
"else",
"{",
"par2",
"++",
";",
"}",
"break",
";",
"case",
"2",
":",
"if",
"(",
"par6",
")",
"{",
"par2",
"--",
";",
"}",
"else",
"{",
"par2",
"++",
";",
"par3",
"++",
";",
"flag",
"=",
"false",
";",
"}",
"i",
"=",
"1",
";",
"break",
";",
"case",
"3",
":",
"if",
"(",
"par6",
")",
"{",
"par2",
"--",
";",
"par3",
"++",
";",
"flag",
"=",
"false",
";",
"}",
"else",
"{",
"par2",
"++",
";",
"}",
"i",
"=",
"1",
";",
"break",
";",
"case",
"4",
":",
"if",
"(",
"par6",
")",
"{",
"par4",
"++",
";",
"}",
"else",
"{",
"par4",
"--",
";",
"par3",
"++",
";",
"flag",
"=",
"false",
";",
"}",
"i",
"=",
"0",
";",
"break",
";",
"case",
"5",
":",
"if",
"(",
"par6",
")",
"{",
"par4",
"++",
";",
"par3",
"++",
";",
"flag",
"=",
"false",
";",
"}",
"else",
"{",
"par4",
"--",
";",
"}",
"i",
"=",
"0",
";",
"break",
";",
"}",
"if",
"(",
"isRailPassingPower",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
",",
"par6",
",",
"par7",
",",
"i",
")",
")",
"{",
"return",
"true",
";",
"}",
"return",
"flag",
"&&",
"isRailPassingPower",
"(",
"par1World",
",",
"par2",
",",
"par3",
"-",
"1",
",",
"par4",
",",
"par6",
",",
"par7",
",",
"i",
")",
";",
"}",
"private",
"boolean",
"isRailPassingPower",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"boolean",
"par5",
",",
"int",
"par6",
",",
"int",
"par7",
")",
"{",
"int",
"i",
"=",
"par1World",
".",
"getBlockId",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"if",
"(",
"i",
"==",
"Block",
".",
"railPowered",
".",
"blockID",
")",
"{",
"int",
"j",
"=",
"par1World",
".",
"getBlockMetadata",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"int",
"k",
"=",
"j",
"&",
"7",
";",
"if",
"(",
"par7",
"==",
"1",
"&&",
"(",
"k",
"==",
"0",
"||",
"k",
"==",
"4",
"||",
"k",
"==",
"5",
")",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"par7",
"==",
"0",
"&&",
"(",
"k",
"==",
"1",
"||",
"k",
"==",
"2",
"||",
"k",
"==",
"3",
")",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"(",
"j",
"&",
"8",
")",
"!=",
"0",
")",
"{",
"if",
"(",
"par1World",
".",
"isBlockIndirectlyGettingPowered",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
")",
"{",
"return",
"true",
";",
"}",
"else",
"{",
"return",
"isNeighborRailPowered",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
",",
"j",
",",
"par5",
",",
"par6",
"+",
"1",
")",
";",
"}",
"}",
"}",
"return",
"false",
";",
"}",
"public",
"int",
"getMobilityFlag",
"(",
")",
"{",
"return",
"0",
";",
"}",
"static",
"boolean",
"isPoweredBlockRail",
"(",
"BlockRail",
"par0BlockRail",
")",
"{",
"return",
"par0BlockRail",
".",
"isPowered",
";",
"}",
"}",
"</s>"
] |
9,325 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"BlockDeadBush",
"extends",
"BlockFlower",
"{",
"protected",
"BlockDeadBush",
"(",
"int",
"par1",
",",
"int",
"par2",
")",
"{",
"super",
"(",
"par1",
",",
"par2",
",",
"Material",
".",
"vine",
")",
";",
"float",
"f",
"=",
"0.4F",
";",
"setBlockBounds",
"(",
"0.5F",
"-",
"f",
",",
"0.0F",
",",
"0.5F",
"-",
"f",
",",
"0.5F",
"+",
"f",
",",
"0.8F",
",",
"0.5F",
"+",
"f",
")",
";",
"}",
"protected",
"boolean",
"canThisPlantGrowOnThisBlockID",
"(",
"int",
"par1",
")",
"{",
"return",
"par1",
"==",
"Block",
".",
"sand",
".",
"blockID",
";",
"}",
"public",
"int",
"getBlockTextureFromSideAndMetadata",
"(",
"int",
"par1",
",",
"int",
"par2",
")",
"{",
"return",
"blockIndexInTexture",
";",
"}",
"public",
"int",
"idDropped",
"(",
"int",
"par1",
",",
"Random",
"par2Random",
",",
"int",
"par3",
")",
"{",
"return",
"-",
"1",
";",
"}",
"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",
".",
"deadBush",
",",
"1",
",",
"par6",
")",
")",
";",
"}",
"else",
"{",
"super",
".",
"harvestBlock",
"(",
"par1World",
",",
"par2EntityPlayer",
",",
"par3",
",",
"par4",
",",
"par5",
",",
"par6",
")",
";",
"}",
"}",
"}",
"</s>"
] |
9,326 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"class",
"ChunkLoader",
"{",
"public",
"ChunkLoader",
"(",
")",
"{",
"}",
"public",
"static",
"AnvilConverterData",
"load",
"(",
"NBTTagCompound",
"par0NBTTagCompound",
")",
"{",
"int",
"i",
"=",
"par0NBTTagCompound",
".",
"getInteger",
"(",
"\"xPos\"",
")",
";",
"int",
"j",
"=",
"par0NBTTagCompound",
".",
"getInteger",
"(",
"\"zPos\"",
")",
";",
"AnvilConverterData",
"anvilconverterdata",
"=",
"new",
"AnvilConverterData",
"(",
"i",
",",
"j",
")",
";",
"anvilconverterdata",
".",
"blocks",
"=",
"par0NBTTagCompound",
".",
"getByteArray",
"(",
"\"Blocks\"",
")",
";",
"anvilconverterdata",
".",
"data",
"=",
"new",
"NibbleArrayReader",
"(",
"par0NBTTagCompound",
".",
"getByteArray",
"(",
"\"Data\"",
")",
",",
"7",
")",
";",
"anvilconverterdata",
".",
"skyLight",
"=",
"new",
"NibbleArrayReader",
"(",
"par0NBTTagCompound",
".",
"getByteArray",
"(",
"\"SkyLight\"",
")",
",",
"7",
")",
";",
"anvilconverterdata",
".",
"blockLight",
"=",
"new",
"NibbleArrayReader",
"(",
"par0NBTTagCompound",
".",
"getByteArray",
"(",
"\"BlockLight\"",
")",
",",
"7",
")",
";",
"anvilconverterdata",
".",
"heightmap",
"=",
"par0NBTTagCompound",
".",
"getByteArray",
"(",
"\"HeightMap\"",
")",
";",
"anvilconverterdata",
".",
"terrainPopulated",
"=",
"par0NBTTagCompound",
".",
"getBoolean",
"(",
"\"\"",
")",
";",
"anvilconverterdata",
".",
"entities",
"=",
"par0NBTTagCompound",
".",
"getTagList",
"(",
"\"Entities\"",
")",
";",
"anvilconverterdata",
".",
"tileEntities",
"=",
"par0NBTTagCompound",
".",
"getTagList",
"(",
"\"TileEntities\"",
")",
";",
"anvilconverterdata",
".",
"tileTicks",
"=",
"par0NBTTagCompound",
".",
"getTagList",
"(",
"\"TileTicks\"",
")",
";",
"try",
"{",
"anvilconverterdata",
".",
"lastUpdated",
"=",
"par0NBTTagCompound",
".",
"getLong",
"(",
"\"LastUpdate\"",
")",
";",
"}",
"catch",
"(",
"ClassCastException",
"classcastexception",
")",
"{",
"anvilconverterdata",
".",
"lastUpdated",
"=",
"par0NBTTagCompound",
".",
"getInteger",
"(",
"\"LastUpdate\"",
")",
";",
"}",
"return",
"anvilconverterdata",
";",
"}",
"public",
"static",
"void",
"convertToAnvilFormat",
"(",
"AnvilConverterData",
"par0AnvilConverterData",
",",
"NBTTagCompound",
"par1NBTTagCompound",
",",
"WorldChunkManager",
"par2WorldChunkManager",
")",
"{",
"par1NBTTagCompound",
".",
"setInteger",
"(",
"\"xPos\"",
",",
"par0AnvilConverterData",
".",
"x",
")",
";",
"par1NBTTagCompound",
".",
"setInteger",
"(",
"\"zPos\"",
",",
"par0AnvilConverterData",
".",
"z",
")",
";",
"par1NBTTagCompound",
".",
"setLong",
"(",
"\"LastUpdate\"",
",",
"par0AnvilConverterData",
".",
"lastUpdated",
")",
";",
"int",
"ai",
"[",
"]",
"=",
"new",
"int",
"[",
"par0AnvilConverterData",
".",
"heightmap",
".",
"length",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"par0AnvilConverterData",
".",
"heightmap",
".",
"length",
";",
"i",
"++",
")",
"{",
"ai",
"[",
"i",
"]",
"=",
"par0AnvilConverterData",
".",
"heightmap",
"[",
"i",
"]",
";",
"}",
"par1NBTTagCompound",
".",
"func_48446_a",
"(",
"\"HeightMap\"",
",",
"ai",
")",
";",
"par1NBTTagCompound",
".",
"setBoolean",
"(",
"\"\"",
",",
"par0AnvilConverterData",
".",
"terrainPopulated",
")",
";",
"NBTTagList",
"nbttaglist",
"=",
"new",
"NBTTagList",
"(",
"\"Sections\"",
")",
";",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
"8",
";",
"j",
"++",
")",
"{",
"boolean",
"flag",
"=",
"true",
";",
"for",
"(",
"int",
"l",
"=",
"0",
";",
"l",
"<",
"16",
"&&",
"flag",
";",
"l",
"++",
")",
"{",
"label0",
":",
"for",
"(",
"int",
"j1",
"=",
"0",
";",
"j1",
"<",
"16",
"&&",
"flag",
";",
"j1",
"++",
")",
"{",
"int",
"k1",
"=",
"0",
";",
"do",
"{",
"if",
"(",
"k1",
">=",
"16",
")",
"{",
"continue",
"label0",
";",
"}",
"int",
"l1",
"=",
"l",
"<<",
"11",
"|",
"k1",
"<<",
"7",
"|",
"j1",
"+",
"(",
"j",
"<<",
"4",
")",
";",
"byte",
"byte0",
"=",
"par0AnvilConverterData",
".",
"blocks",
"[",
"l1",
"]",
";",
"if",
"(",
"byte0",
"!=",
"0",
")",
"{",
"flag",
"=",
"false",
";",
"continue",
"label0",
";",
"}",
"k1",
"++",
";",
"}",
"while",
"(",
"true",
")",
";",
"}",
"}",
"if",
"(",
"flag",
")",
"{",
"continue",
";",
"}",
"byte",
"abyte1",
"[",
"]",
"=",
"new",
"byte",
"[",
"4096",
"]",
";",
"NibbleArray",
"nibblearray",
"=",
"new",
"NibbleArray",
"(",
"abyte1",
".",
"length",
",",
"4",
")",
";",
"NibbleArray",
"nibblearray1",
"=",
"new",
"NibbleArray",
"(",
"abyte1",
".",
"length",
",",
"4",
")",
";",
"NibbleArray",
"nibblearray2",
"=",
"new",
"NibbleArray",
"(",
"abyte1",
".",
"length",
",",
"4",
")",
";",
"for",
"(",
"int",
"i2",
"=",
"0",
";",
"i2",
"<",
"16",
";",
"i2",
"++",
")",
"{",
"for",
"(",
"int",
"j2",
"=",
"0",
";",
"j2",
"<",
"16",
";",
"j2",
"++",
")",
"{",
"for",
"(",
"int",
"k2",
"=",
"0",
";",
"k2",
"<",
"16",
";",
"k2",
"++",
")",
"{",
"int",
"l2",
"=",
"i2",
"<<",
"11",
"|",
"k2",
"<<",
"7",
"|",
"j2",
"+",
"(",
"j",
"<<",
"4",
")",
";",
"byte",
"byte1",
"=",
"par0AnvilConverterData",
".",
"blocks",
"[",
"l2",
"]",
";",
"abyte1",
"[",
"j2",
"<<",
"8",
"|",
"k2",
"<<",
"4",
"|",
"i2",
"]",
"=",
"(",
"byte",
")",
"(",
"byte1",
"&",
"0xff",
")",
";",
"nibblearray",
".",
"set",
"(",
"i2",
",",
"j2",
",",
"k2",
",",
"par0AnvilConverterData",
".",
"data",
".",
"get",
"(",
"i2",
",",
"j2",
"+",
"(",
"j",
"<<",
"4",
")",
",",
"k2",
")",
")",
";",
"nibblearray1",
".",
"set",
"(",
"i2",
",",
"j2",
",",
"k2",
",",
"par0AnvilConverterData",
".",
"skyLight",
".",
"get",
"(",
"i2",
",",
"j2",
"+",
"(",
"j",
"<<",
"4",
")",
",",
"k2",
")",
")",
";",
"nibblearray2",
".",
"set",
"(",
"i2",
",",
"j2",
",",
"k2",
",",
"par0AnvilConverterData",
".",
"blockLight",
".",
"get",
"(",
"i2",
",",
"j2",
"+",
"(",
"j",
"<<",
"4",
")",
",",
"k2",
")",
")",
";",
"}",
"}",
"}",
"NBTTagCompound",
"nbttagcompound",
"=",
"new",
"NBTTagCompound",
"(",
")",
";",
"nbttagcompound",
".",
"setByte",
"(",
"\"Y\"",
",",
"(",
"byte",
")",
"(",
"j",
"&",
"0xff",
")",
")",
";",
"nbttagcompound",
".",
"setByteArray",
"(",
"\"Blocks\"",
",",
"abyte1",
")",
";",
"nbttagcompound",
".",
"setByteArray",
"(",
"\"Data\"",
",",
"nibblearray",
".",
"data",
")",
";",
"nbttagcompound",
".",
"setByteArray",
"(",
"\"SkyLight\"",
",",
"nibblearray1",
".",
"data",
")",
";",
"nbttagcompound",
".",
"setByteArray",
"(",
"\"BlockLight\"",
",",
"nibblearray2",
".",
"data",
")",
";",
"nbttaglist",
".",
"appendTag",
"(",
"nbttagcompound",
")",
";",
"}",
"par1NBTTagCompound",
".",
"setTag",
"(",
"\"Sections\"",
",",
"nbttaglist",
")",
";",
"byte",
"abyte0",
"[",
"]",
"=",
"new",
"byte",
"[",
"256",
"]",
";",
"for",
"(",
"int",
"k",
"=",
"0",
";",
"k",
"<",
"16",
";",
"k",
"++",
")",
"{",
"for",
"(",
"int",
"i1",
"=",
"0",
";",
"i1",
"<",
"16",
";",
"i1",
"++",
")",
"{",
"abyte0",
"[",
"i1",
"<<",
"4",
"|",
"k",
"]",
"=",
"(",
"byte",
")",
"(",
"par2WorldChunkManager",
".",
"getBiomeGenAt",
"(",
"par0AnvilConverterData",
".",
"x",
"<<",
"4",
"|",
"k",
",",
"par0AnvilConverterData",
".",
"z",
"<<",
"4",
"|",
"i1",
")",
".",
"biomeID",
"&",
"0xff",
")",
";",
"}",
"}",
"par1NBTTagCompound",
".",
"setByteArray",
"(",
"\"Biomes\"",
",",
"abyte0",
")",
";",
"par1NBTTagCompound",
".",
"setTag",
"(",
"\"Entities\"",
",",
"par0AnvilConverterData",
".",
"entities",
")",
";",
"par1NBTTagCompound",
".",
"setTag",
"(",
"\"TileEntities\"",
",",
"par0AnvilConverterData",
".",
"tileEntities",
")",
";",
"if",
"(",
"par0AnvilConverterData",
".",
"tileTicks",
"!=",
"null",
")",
"{",
"par1NBTTagCompound",
".",
"setTag",
"(",
"\"TileTicks\"",
",",
"par0AnvilConverterData",
".",
"tileTicks",
")",
";",
"}",
"}",
"}",
"</s>"
] |
9,327 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"abstract",
"class",
"ComponentVillageRoadPiece",
"extends",
"ComponentVillage",
"{",
"protected",
"ComponentVillageRoadPiece",
"(",
"int",
"par1",
")",
"{",
"super",
"(",
"par1",
")",
";",
"}",
"}",
"</s>"
] |
9,328 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"class",
"PlayerCapabilities",
"{",
"public",
"boolean",
"disableDamage",
";",
"public",
"boolean",
"isFlying",
";",
"public",
"boolean",
"allowFlying",
";",
"public",
"boolean",
"isCreativeMode",
";",
"public",
"PlayerCapabilities",
"(",
")",
"{",
"disableDamage",
"=",
"false",
";",
"isFlying",
"=",
"false",
";",
"allowFlying",
"=",
"false",
";",
"isCreativeMode",
"=",
"false",
";",
"}",
"public",
"void",
"writeCapabilitiesToNBT",
"(",
"NBTTagCompound",
"par1NBTTagCompound",
")",
"{",
"NBTTagCompound",
"nbttagcompound",
"=",
"new",
"NBTTagCompound",
"(",
")",
";",
"nbttagcompound",
".",
"setBoolean",
"(",
"\"invulnerable\"",
",",
"disableDamage",
")",
";",
"nbttagcompound",
".",
"setBoolean",
"(",
"\"flying\"",
",",
"isFlying",
")",
";",
"nbttagcompound",
".",
"setBoolean",
"(",
"\"mayfly\"",
",",
"allowFlying",
")",
";",
"nbttagcompound",
".",
"setBoolean",
"(",
"\"instabuild\"",
",",
"isCreativeMode",
")",
";",
"par1NBTTagCompound",
".",
"setTag",
"(",
"\"abilities\"",
",",
"nbttagcompound",
")",
";",
"}",
"public",
"void",
"readCapabilitiesFromNBT",
"(",
"NBTTagCompound",
"par1NBTTagCompound",
")",
"{",
"if",
"(",
"par1NBTTagCompound",
".",
"hasKey",
"(",
"\"abilities\"",
")",
")",
"{",
"NBTTagCompound",
"nbttagcompound",
"=",
"par1NBTTagCompound",
".",
"getCompoundTag",
"(",
"\"abilities\"",
")",
";",
"disableDamage",
"=",
"nbttagcompound",
".",
"getBoolean",
"(",
"\"invulnerable\"",
")",
";",
"isFlying",
"=",
"nbttagcompound",
".",
"getBoolean",
"(",
"\"flying\"",
")",
";",
"allowFlying",
"=",
"nbttagcompound",
".",
"getBoolean",
"(",
"\"mayfly\"",
")",
";",
"isCreativeMode",
"=",
"nbttagcompound",
".",
"getBoolean",
"(",
"\"instabuild\"",
")",
";",
"}",
"}",
"}",
"</s>"
] |
9,329 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"Iterator",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"public",
"class",
"EntityAIFollowParent",
"extends",
"EntityAIBase",
"{",
"EntityAnimal",
"childAnimal",
";",
"EntityAnimal",
"parentAnimal",
";",
"float",
"field_48140_c",
";",
"private",
"int",
"field_48138_d",
";",
"public",
"EntityAIFollowParent",
"(",
"EntityAnimal",
"par1EntityAnimal",
",",
"float",
"par2",
")",
"{",
"childAnimal",
"=",
"par1EntityAnimal",
";",
"field_48140_c",
"=",
"par2",
";",
"}",
"public",
"boolean",
"shouldExecute",
"(",
")",
"{",
"if",
"(",
"childAnimal",
".",
"getGrowingAge",
"(",
")",
">=",
"0",
")",
"{",
"return",
"false",
";",
"}",
"List",
"list",
"=",
"childAnimal",
".",
"worldObj",
".",
"getEntitiesWithinAABB",
"(",
"childAnimal",
".",
"getClass",
"(",
")",
",",
"childAnimal",
".",
"boundingBox",
".",
"expand",
"(",
"8D",
",",
"4D",
",",
"8D",
")",
")",
";",
"EntityAnimal",
"entityanimal",
"=",
"null",
";",
"double",
"d",
"=",
"Double",
".",
"MAX_VALUE",
";",
"Iterator",
"iterator",
"=",
"list",
".",
"iterator",
"(",
")",
";",
"do",
"{",
"if",
"(",
"!",
"iterator",
".",
"hasNext",
"(",
")",
")",
"{",
"break",
";",
"}",
"Entity",
"entity",
"=",
"(",
"Entity",
")",
"iterator",
".",
"next",
"(",
")",
";",
"EntityAnimal",
"entityanimal1",
"=",
"(",
"EntityAnimal",
")",
"entity",
";",
"if",
"(",
"entityanimal1",
".",
"getGrowingAge",
"(",
")",
">=",
"0",
")",
"{",
"double",
"d1",
"=",
"childAnimal",
".",
"getDistanceSqToEntity",
"(",
"entityanimal1",
")",
";",
"if",
"(",
"d1",
"<=",
"d",
")",
"{",
"d",
"=",
"d1",
";",
"entityanimal",
"=",
"entityanimal1",
";",
"}",
"}",
"}",
"while",
"(",
"true",
")",
";",
"if",
"(",
"entityanimal",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"d",
"<",
"9D",
")",
"{",
"return",
"false",
";",
"}",
"else",
"{",
"parentAnimal",
"=",
"entityanimal",
";",
"return",
"true",
";",
"}",
"}",
"public",
"boolean",
"continueExecuting",
"(",
")",
"{",
"if",
"(",
"!",
"parentAnimal",
".",
"isEntityAlive",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",
"double",
"d",
"=",
"childAnimal",
".",
"getDistanceSqToEntity",
"(",
"parentAnimal",
")",
";",
"return",
"d",
">=",
"9D",
"&&",
"d",
"<=",
"256D",
";",
"}",
"public",
"void",
"startExecuting",
"(",
")",
"{",
"field_48138_d",
"=",
"0",
";",
"}",
"public",
"void",
"resetTask",
"(",
")",
"{",
"parentAnimal",
"=",
"null",
";",
"}",
"public",
"void",
"updateTask",
"(",
")",
"{",
"if",
"(",
"--",
"field_48138_d",
">",
"0",
")",
"{",
"return",
";",
"}",
"else",
"{",
"field_48138_d",
"=",
"10",
";",
"childAnimal",
".",
"getNavigator",
"(",
")",
".",
"func_48652_a",
"(",
"parentAnimal",
",",
"field_48140_c",
")",
";",
"return",
";",
"}",
"}",
"}",
"</s>"
] |
9,330 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"io",
".",
"*",
";",
"import",
"java",
".",
"util",
".",
"Properties",
";",
"import",
"java",
".",
"util",
".",
"logging",
".",
"Level",
";",
"import",
"java",
".",
"util",
".",
"logging",
".",
"Logger",
";",
"public",
"class",
"PropertyManager",
"{",
"public",
"static",
"Logger",
"logger",
"=",
"Logger",
".",
"getLogger",
"(",
"\"Minecraft\"",
")",
";",
"private",
"Properties",
"serverProperties",
";",
"private",
"File",
"serverPropertiesFile",
";",
"public",
"PropertyManager",
"(",
"File",
"par1File",
")",
"{",
"serverProperties",
"=",
"new",
"Properties",
"(",
")",
";",
"serverPropertiesFile",
"=",
"par1File",
";",
"if",
"(",
"par1File",
".",
"exists",
"(",
")",
")",
"{",
"try",
"{",
"serverProperties",
".",
"load",
"(",
"new",
"FileInputStream",
"(",
"par1File",
")",
")",
";",
"}",
"catch",
"(",
"Exception",
"exception",
")",
"{",
"logger",
".",
"log",
"(",
"Level",
".",
"WARNING",
",",
"(",
"new",
"StringBuilder",
"(",
")",
")",
".",
"append",
"(",
"\"\"",
")",
".",
"append",
"(",
"par1File",
")",
".",
"toString",
"(",
")",
",",
"exception",
")",
";",
"generateNewProperties",
"(",
")",
";",
"}",
"}",
"else",
"{",
"logger",
".",
"log",
"(",
"Level",
".",
"WARNING",
",",
"(",
"new",
"StringBuilder",
"(",
")",
")",
".",
"append",
"(",
"par1File",
")",
".",
"append",
"(",
"\"\"",
")",
".",
"toString",
"(",
")",
")",
";",
"generateNewProperties",
"(",
")",
";",
"}",
"}",
"public",
"void",
"generateNewProperties",
"(",
")",
"{",
"logger",
".",
"log",
"(",
"Level",
".",
"INFO",
",",
"\"\"",
")",
";",
"saveProperties",
"(",
")",
";",
"}",
"public",
"void",
"saveProperties",
"(",
")",
"{",
"try",
"{",
"serverProperties",
".",
"store",
"(",
"new",
"FileOutputStream",
"(",
"serverPropertiesFile",
")",
",",
"\"\"",
")",
";",
"}",
"catch",
"(",
"Exception",
"exception",
")",
"{",
"logger",
".",
"log",
"(",
"Level",
".",
"WARNING",
",",
"(",
"new",
"StringBuilder",
"(",
")",
")",
".",
"append",
"(",
"\"\"",
")",
".",
"append",
"(",
"serverPropertiesFile",
")",
".",
"toString",
"(",
")",
",",
"exception",
")",
";",
"generateNewProperties",
"(",
")",
";",
"}",
"}",
"public",
"File",
"getPropertiesFile",
"(",
")",
"{",
"return",
"serverPropertiesFile",
";",
"}",
"public",
"String",
"getStringProperty",
"(",
"String",
"par1Str",
",",
"String",
"par2Str",
")",
"{",
"if",
"(",
"!",
"serverProperties",
".",
"containsKey",
"(",
"par1Str",
")",
")",
"{",
"serverProperties",
".",
"setProperty",
"(",
"par1Str",
",",
"par2Str",
")",
";",
"saveProperties",
"(",
")",
";",
"}",
"return",
"serverProperties",
".",
"getProperty",
"(",
"par1Str",
",",
"par2Str",
")",
";",
"}",
"public",
"int",
"getIntProperty",
"(",
"String",
"par1Str",
",",
"int",
"par2",
")",
"{",
"try",
"{",
"return",
"Integer",
".",
"parseInt",
"(",
"getStringProperty",
"(",
"par1Str",
",",
"(",
"new",
"StringBuilder",
"(",
")",
")",
".",
"append",
"(",
"\"\"",
")",
".",
"append",
"(",
"par2",
")",
".",
"toString",
"(",
")",
")",
")",
";",
"}",
"catch",
"(",
"Exception",
"exception",
")",
"{",
"serverProperties",
".",
"setProperty",
"(",
"par1Str",
",",
"(",
"new",
"StringBuilder",
"(",
")",
")",
".",
"append",
"(",
"\"\"",
")",
".",
"append",
"(",
"par2",
")",
".",
"toString",
"(",
")",
")",
";",
"}",
"return",
"par2",
";",
"}",
"public",
"boolean",
"getBooleanProperty",
"(",
"String",
"par1Str",
",",
"boolean",
"par2",
")",
"{",
"try",
"{",
"return",
"Boolean",
".",
"parseBoolean",
"(",
"getStringProperty",
"(",
"par1Str",
",",
"(",
"new",
"StringBuilder",
"(",
")",
")",
".",
"append",
"(",
"\"\"",
")",
".",
"append",
"(",
"par2",
")",
".",
"toString",
"(",
")",
")",
")",
";",
"}",
"catch",
"(",
"Exception",
"exception",
")",
"{",
"serverProperties",
".",
"setProperty",
"(",
"par1Str",
",",
"(",
"new",
"StringBuilder",
"(",
")",
")",
".",
"append",
"(",
"\"\"",
")",
".",
"append",
"(",
"par2",
")",
".",
"toString",
"(",
")",
")",
";",
"}",
"return",
"par2",
";",
"}",
"public",
"void",
"setProperty",
"(",
"String",
"par1Str",
",",
"Object",
"par2Obj",
")",
"{",
"serverProperties",
".",
"setProperty",
"(",
"par1Str",
",",
"(",
"new",
"StringBuilder",
"(",
")",
")",
".",
"append",
"(",
"\"\"",
")",
".",
"append",
"(",
"par2Obj",
")",
".",
"toString",
"(",
")",
")",
";",
"}",
"public",
"void",
"setProperty",
"(",
"String",
"par1Str",
",",
"boolean",
"par2",
")",
"{",
"serverProperties",
".",
"setProperty",
"(",
"par1Str",
",",
"(",
"new",
"StringBuilder",
"(",
")",
")",
".",
"append",
"(",
"\"\"",
")",
".",
"append",
"(",
"par2",
")",
".",
"toString",
"(",
")",
")",
";",
"saveProperties",
"(",
")",
";",
"}",
"}",
"</s>"
] |
9,331 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"EntityWolf",
"extends",
"EntityTameable",
"{",
"private",
"boolean",
"looksWithInterest",
";",
"private",
"float",
"field_25038_b",
";",
"private",
"float",
"field_25044_c",
";",
"private",
"boolean",
"isShaking",
";",
"private",
"boolean",
"field_25042_g",
";",
"private",
"float",
"timeWolfIsShaking",
";",
"private",
"float",
"prevTimeWolfIsShaking",
";",
"public",
"EntityWolf",
"(",
"World",
"par1World",
")",
"{",
"super",
"(",
"par1World",
")",
";",
"looksWithInterest",
"=",
"false",
";",
"texture",
"=",
"\"\"",
";",
"setSize",
"(",
"0.6F",
",",
"0.8F",
")",
";",
"moveSpeed",
"=",
"0.3F",
";",
"getNavigator",
"(",
")",
".",
"func_48656_a",
"(",
"true",
")",
";",
"tasks",
".",
"addTask",
"(",
"1",
",",
"new",
"EntityAISwimming",
"(",
"this",
")",
")",
";",
"tasks",
".",
"addTask",
"(",
"2",
",",
"aiSit",
")",
";",
"tasks",
".",
"addTask",
"(",
"3",
",",
"new",
"EntityAILeapAtTarget",
"(",
"this",
",",
"0.4F",
")",
")",
";",
"tasks",
".",
"addTask",
"(",
"4",
",",
"new",
"EntityAIAttackOnCollide",
"(",
"this",
",",
"moveSpeed",
",",
"true",
")",
")",
";",
"tasks",
".",
"addTask",
"(",
"5",
",",
"new",
"EntityAIFollowOwner",
"(",
"this",
",",
"moveSpeed",
",",
"10F",
",",
"2.0F",
")",
")",
";",
"tasks",
".",
"addTask",
"(",
"6",
",",
"new",
"EntityAIMate",
"(",
"this",
",",
"moveSpeed",
")",
")",
";",
"tasks",
".",
"addTask",
"(",
"7",
",",
"new",
"EntityAIWander",
"(",
"this",
",",
"moveSpeed",
")",
")",
";",
"tasks",
".",
"addTask",
"(",
"8",
",",
"new",
"EntityAIBeg",
"(",
"this",
",",
"8F",
")",
")",
";",
"tasks",
".",
"addTask",
"(",
"9",
",",
"new",
"EntityAIWatchClosest",
"(",
"this",
",",
"net",
".",
"minecraft",
".",
"src",
".",
"EntityPlayer",
".",
"class",
",",
"8F",
")",
")",
";",
"tasks",
".",
"addTask",
"(",
"9",
",",
"new",
"EntityAILookIdle",
"(",
"this",
")",
")",
";",
"targetTasks",
".",
"addTask",
"(",
"1",
",",
"new",
"EntityAIOwnerHurtByTarget",
"(",
"this",
")",
")",
";",
"targetTasks",
".",
"addTask",
"(",
"2",
",",
"new",
"EntityAIOwnerHurtTarget",
"(",
"this",
")",
")",
";",
"targetTasks",
".",
"addTask",
"(",
"3",
",",
"new",
"EntityAIHurtByTarget",
"(",
"this",
",",
"true",
")",
")",
";",
"targetTasks",
".",
"addTask",
"(",
"4",
",",
"new",
"EntityAITargetNonTamed",
"(",
"this",
",",
"net",
".",
"minecraft",
".",
"src",
".",
"EntitySheep",
".",
"class",
",",
"16F",
",",
"200",
",",
"false",
")",
")",
";",
"}",
"public",
"boolean",
"isAIEnabled",
"(",
")",
"{",
"return",
"true",
";",
"}",
"public",
"void",
"setAttackTarget",
"(",
"EntityLiving",
"par1EntityLiving",
")",
"{",
"super",
".",
"setAttackTarget",
"(",
"par1EntityLiving",
")",
";",
"if",
"(",
"par1EntityLiving",
"instanceof",
"EntityPlayer",
")",
"{",
"setAngry",
"(",
"true",
")",
";",
"}",
"}",
"protected",
"void",
"updateAITick",
"(",
")",
"{",
"dataWatcher",
".",
"updateObject",
"(",
"18",
",",
"Integer",
".",
"valueOf",
"(",
"getHealth",
"(",
")",
")",
")",
";",
"}",
"public",
"int",
"getMaxHealth",
"(",
")",
"{",
"return",
"!",
"isTamed",
"(",
")",
"?",
"8",
":",
"20",
";",
"}",
"protected",
"void",
"entityInit",
"(",
")",
"{",
"super",
".",
"entityInit",
"(",
")",
";",
"dataWatcher",
".",
"addObject",
"(",
"18",
",",
"new",
"Integer",
"(",
"getHealth",
"(",
")",
")",
")",
";",
"}",
"protected",
"boolean",
"canTriggerWalking",
"(",
")",
"{",
"return",
"false",
";",
"}",
"public",
"void",
"writeEntityToNBT",
"(",
"NBTTagCompound",
"par1NBTTagCompound",
")",
"{",
"super",
".",
"writeEntityToNBT",
"(",
"par1NBTTagCompound",
")",
";",
"par1NBTTagCompound",
".",
"setBoolean",
"(",
"\"Angry\"",
",",
"isAngry",
"(",
")",
")",
";",
"}",
"public",
"void",
"readEntityFromNBT",
"(",
"NBTTagCompound",
"par1NBTTagCompound",
")",
"{",
"super",
".",
"readEntityFromNBT",
"(",
"par1NBTTagCompound",
")",
";",
"setAngry",
"(",
"par1NBTTagCompound",
".",
"getBoolean",
"(",
"\"Angry\"",
")",
")",
";",
"}",
"protected",
"boolean",
"canDespawn",
"(",
")",
"{",
"return",
"isAngry",
"(",
")",
";",
"}",
"protected",
"String",
"getLivingSound",
"(",
")",
"{",
"if",
"(",
"isAngry",
"(",
")",
")",
"{",
"return",
"\"\"",
";",
"}",
"if",
"(",
"rand",
".",
"nextInt",
"(",
"3",
")",
"==",
"0",
")",
"{",
"if",
"(",
"isTamed",
"(",
")",
"&&",
"dataWatcher",
".",
"getWatchableObjectInt",
"(",
"18",
")",
"<",
"10",
")",
"{",
"return",
"\"\"",
";",
"}",
"else",
"{",
"return",
"\"\"",
";",
"}",
"}",
"else",
"{",
"return",
"\"\"",
";",
"}",
"}",
"protected",
"String",
"getHurtSound",
"(",
")",
"{",
"return",
"\"\"",
";",
"}",
"protected",
"String",
"getDeathSound",
"(",
")",
"{",
"return",
"\"\"",
";",
"}",
"protected",
"float",
"getSoundVolume",
"(",
")",
"{",
"return",
"0.4F",
";",
"}",
"protected",
"int",
"getDropItemId",
"(",
")",
"{",
"return",
"-",
"1",
";",
"}",
"public",
"void",
"onLivingUpdate",
"(",
")",
"{",
"super",
".",
"onLivingUpdate",
"(",
")",
";",
"if",
"(",
"!",
"worldObj",
".",
"isRemote",
"&&",
"isShaking",
"&&",
"!",
"field_25042_g",
"&&",
"!",
"hasPath",
"(",
")",
"&&",
"onGround",
")",
"{",
"field_25042_g",
"=",
"true",
";",
"timeWolfIsShaking",
"=",
"0.0F",
";",
"prevTimeWolfIsShaking",
"=",
"0.0F",
";",
"worldObj",
".",
"setEntityState",
"(",
"this",
",",
"(",
"byte",
")",
"8",
")",
";",
"}",
"}",
"public",
"void",
"onUpdate",
"(",
")",
"{",
"super",
".",
"onUpdate",
"(",
")",
";",
"field_25044_c",
"=",
"field_25038_b",
";",
"if",
"(",
"looksWithInterest",
")",
"{",
"field_25038_b",
"=",
"field_25038_b",
"+",
"(",
"1.0F",
"-",
"field_25038_b",
")",
"*",
"0.4F",
";",
"}",
"else",
"{",
"field_25038_b",
"=",
"field_25038_b",
"+",
"(",
"0.0F",
"-",
"field_25038_b",
")",
"*",
"0.4F",
";",
"}",
"if",
"(",
"looksWithInterest",
")",
"{",
"numTicksToChaseTarget",
"=",
"10",
";",
"}",
"if",
"(",
"isWet",
"(",
")",
")",
"{",
"isShaking",
"=",
"true",
";",
"field_25042_g",
"=",
"false",
";",
"timeWolfIsShaking",
"=",
"0.0F",
";",
"prevTimeWolfIsShaking",
"=",
"0.0F",
";",
"}",
"else",
"if",
"(",
"(",
"isShaking",
"||",
"field_25042_g",
")",
"&&",
"field_25042_g",
")",
"{",
"if",
"(",
"timeWolfIsShaking",
"==",
"0.0F",
")",
"{",
"worldObj",
".",
"playSoundAtEntity",
"(",
"this",
",",
"\"\"",
",",
"getSoundVolume",
"(",
")",
",",
"(",
"rand",
".",
"nextFloat",
"(",
")",
"-",
"rand",
".",
"nextFloat",
"(",
")",
")",
"*",
"0.2F",
"+",
"1.0F",
")",
";",
"}",
"prevTimeWolfIsShaking",
"=",
"timeWolfIsShaking",
";",
"timeWolfIsShaking",
"+=",
"0.05F",
";",
"if",
"(",
"prevTimeWolfIsShaking",
">=",
"2.0F",
")",
"{",
"isShaking",
"=",
"false",
";",
"field_25042_g",
"=",
"false",
";",
"prevTimeWolfIsShaking",
"=",
"0.0F",
";",
"timeWolfIsShaking",
"=",
"0.0F",
";",
"}",
"if",
"(",
"timeWolfIsShaking",
">",
"0.4F",
")",
"{",
"float",
"f",
"=",
"(",
"float",
")",
"boundingBox",
".",
"minY",
";",
"int",
"i",
"=",
"(",
"int",
")",
"(",
"MathHelper",
".",
"sin",
"(",
"(",
"timeWolfIsShaking",
"-",
"0.4F",
")",
"*",
"(",
"float",
")",
"Math",
".",
"PI",
")",
"*",
"7F",
")",
";",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
"i",
";",
"j",
"++",
")",
"{",
"float",
"f1",
"=",
"(",
"rand",
".",
"nextFloat",
"(",
")",
"*",
"2.0F",
"-",
"1.0F",
")",
"*",
"width",
"*",
"0.5F",
";",
"float",
"f2",
"=",
"(",
"rand",
".",
"nextFloat",
"(",
")",
"*",
"2.0F",
"-",
"1.0F",
")",
"*",
"width",
"*",
"0.5F",
";",
"worldObj",
".",
"spawnParticle",
"(",
"\"splash\"",
",",
"posX",
"+",
"(",
"double",
")",
"f1",
",",
"f",
"+",
"0.8F",
",",
"posZ",
"+",
"(",
"double",
")",
"f2",
",",
"motionX",
",",
"motionY",
",",
"motionZ",
")",
";",
"}",
"}",
"}",
"}",
"public",
"float",
"getEyeHeight",
"(",
")",
"{",
"return",
"height",
"*",
"0.8F",
";",
"}",
"public",
"int",
"getVerticalFaceSpeed",
"(",
")",
"{",
"if",
"(",
"isSitting",
"(",
")",
")",
"{",
"return",
"20",
";",
"}",
"else",
"{",
"return",
"super",
".",
"getVerticalFaceSpeed",
"(",
")",
";",
"}",
"}",
"public",
"boolean",
"attackEntityFrom",
"(",
"DamageSource",
"par1DamageSource",
",",
"int",
"par2",
")",
"{",
"Entity",
"entity",
"=",
"par1DamageSource",
".",
"getEntity",
"(",
")",
";",
"aiSit",
".",
"func_48210_a",
"(",
"false",
")",
";",
"if",
"(",
"entity",
"!=",
"null",
"&&",
"!",
"(",
"entity",
"instanceof",
"EntityPlayer",
")",
"&&",
"!",
"(",
"entity",
"instanceof",
"EntityArrow",
")",
")",
"{",
"par2",
"=",
"(",
"par2",
"+",
"1",
")",
"/",
"2",
";",
"}",
"return",
"super",
".",
"attackEntityFrom",
"(",
"par1DamageSource",
",",
"par2",
")",
";",
"}",
"public",
"boolean",
"attackEntityAsMob",
"(",
"Entity",
"par1Entity",
")",
"{",
"byte",
"byte0",
"=",
"(",
"(",
"byte",
")",
"(",
"isTamed",
"(",
")",
"?",
"4",
":",
"2",
")",
")",
";",
"return",
"par1Entity",
".",
"attackEntityFrom",
"(",
"DamageSource",
".",
"causeMobDamage",
"(",
"this",
")",
",",
"byte0",
")",
";",
"}",
"public",
"boolean",
"interact",
"(",
"EntityPlayer",
"par1EntityPlayer",
")",
"{",
"ItemStack",
"itemstack",
"=",
"par1EntityPlayer",
".",
"inventory",
".",
"getCurrentItem",
"(",
")",
";",
"if",
"(",
"!",
"isTamed",
"(",
")",
")",
"{",
"if",
"(",
"itemstack",
"!=",
"null",
"&&",
"itemstack",
".",
"itemID",
"==",
"Item",
".",
"bone",
".",
"shiftedIndex",
"&&",
"!",
"isAngry",
"(",
")",
")",
"{",
"if",
"(",
"!",
"par1EntityPlayer",
".",
"capabilities",
".",
"isCreativeMode",
")",
"{",
"itemstack",
".",
"stackSize",
"--",
";",
"}",
"if",
"(",
"itemstack",
".",
"stackSize",
"<=",
"0",
")",
"{",
"par1EntityPlayer",
".",
"inventory",
".",
"setInventorySlotContents",
"(",
"par1EntityPlayer",
".",
"inventory",
".",
"currentItem",
",",
"null",
")",
";",
"}",
"if",
"(",
"!",
"worldObj",
".",
"isRemote",
")",
"{",
"if",
"(",
"rand",
".",
"nextInt",
"(",
"3",
")",
"==",
"0",
")",
"{",
"setTamed",
"(",
"true",
")",
";",
"setPathToEntity",
"(",
"null",
")",
";",
"setAttackTarget",
"(",
"null",
")",
";",
"aiSit",
".",
"func_48210_a",
"(",
"true",
")",
";",
"setEntityHealth",
"(",
"20",
")",
";",
"setOwner",
"(",
"par1EntityPlayer",
".",
"username",
")",
";",
"func_48370_a",
"(",
"true",
")",
";",
"worldObj",
".",
"setEntityState",
"(",
"this",
",",
"(",
"byte",
")",
"7",
")",
";",
"}",
"else",
"{",
"func_48370_a",
"(",
"false",
")",
";",
"worldObj",
".",
"setEntityState",
"(",
"this",
",",
"(",
"byte",
")",
"6",
")",
";",
"}",
"}",
"return",
"true",
";",
"}",
"}",
"else",
"{",
"if",
"(",
"itemstack",
"!=",
"null",
"&&",
"(",
"Item",
".",
"itemsList",
"[",
"itemstack",
".",
"itemID",
"]",
"instanceof",
"ItemFood",
")",
")",
"{",
"ItemFood",
"itemfood",
"=",
"(",
"ItemFood",
")",
"Item",
".",
"itemsList",
"[",
"itemstack",
".",
"itemID",
"]",
";",
"if",
"(",
"itemfood",
".",
"isWolfsFavoriteMeat",
"(",
")",
"&&",
"dataWatcher",
".",
"getWatchableObjectInt",
"(",
"18",
")",
"<",
"20",
")",
"{",
"if",
"(",
"!",
"par1EntityPlayer",
".",
"capabilities",
".",
"isCreativeMode",
")",
"{",
"itemstack",
".",
"stackSize",
"--",
";",
"}",
"heal",
"(",
"itemfood",
".",
"getHealAmount",
"(",
")",
")",
";",
"if",
"(",
"itemstack",
".",
"stackSize",
"<=",
"0",
")",
"{",
"par1EntityPlayer",
".",
"inventory",
".",
"setInventorySlotContents",
"(",
"par1EntityPlayer",
".",
"inventory",
".",
"currentItem",
",",
"null",
")",
";",
"}",
"return",
"true",
";",
"}",
"}",
"if",
"(",
"par1EntityPlayer",
".",
"username",
".",
"equalsIgnoreCase",
"(",
"getOwnerName",
"(",
")",
")",
"&&",
"!",
"worldObj",
".",
"isRemote",
"&&",
"!",
"isWheat",
"(",
"itemstack",
")",
")",
"{",
"aiSit",
".",
"func_48210_a",
"(",
"!",
"isSitting",
"(",
")",
")",
";",
"isJumping",
"=",
"false",
";",
"setPathToEntity",
"(",
"null",
")",
";",
"}",
"}",
"return",
"super",
".",
"interact",
"(",
"par1EntityPlayer",
")",
";",
"}",
"public",
"boolean",
"isWheat",
"(",
"ItemStack",
"par1ItemStack",
")",
"{",
"if",
"(",
"par1ItemStack",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"!",
"(",
"Item",
".",
"itemsList",
"[",
"par1ItemStack",
".",
"itemID",
"]",
"instanceof",
"ItemFood",
")",
")",
"{",
"return",
"false",
";",
"}",
"else",
"{",
"return",
"(",
"(",
"ItemFood",
")",
"Item",
".",
"itemsList",
"[",
"par1ItemStack",
".",
"itemID",
"]",
")",
".",
"isWolfsFavoriteMeat",
"(",
")",
";",
"}",
"}",
"public",
"int",
"getMaxSpawnedInChunk",
"(",
")",
"{",
"return",
"8",
";",
"}",
"public",
"boolean",
"isAngry",
"(",
")",
"{",
"return",
"(",
"dataWatcher",
".",
"getWatchableObjectByte",
"(",
"16",
")",
"&",
"2",
")",
"!=",
"0",
";",
"}",
"public",
"void",
"setAngry",
"(",
"boolean",
"par1",
")",
"{",
"byte",
"byte0",
"=",
"dataWatcher",
".",
"getWatchableObjectByte",
"(",
"16",
")",
";",
"if",
"(",
"par1",
")",
"{",
"dataWatcher",
".",
"updateObject",
"(",
"16",
",",
"Byte",
".",
"valueOf",
"(",
"(",
"byte",
")",
"(",
"byte0",
"|",
"2",
")",
")",
")",
";",
"}",
"else",
"{",
"dataWatcher",
".",
"updateObject",
"(",
"16",
",",
"Byte",
".",
"valueOf",
"(",
"(",
"byte",
")",
"(",
"byte0",
"&",
"-",
"3",
")",
")",
")",
";",
"}",
"}",
"public",
"EntityAnimal",
"spawnBabyAnimal",
"(",
"EntityAnimal",
"par1EntityAnimal",
")",
"{",
"EntityWolf",
"entitywolf",
"=",
"new",
"EntityWolf",
"(",
"worldObj",
")",
";",
"entitywolf",
".",
"setOwner",
"(",
"getOwnerName",
"(",
")",
")",
";",
"entitywolf",
".",
"setTamed",
"(",
"true",
")",
";",
"return",
"entitywolf",
";",
"}",
"public",
"void",
"func_48378_e",
"(",
"boolean",
"par1",
")",
"{",
"looksWithInterest",
"=",
"par1",
";",
"}",
"public",
"boolean",
"func_48362_b",
"(",
"EntityAnimal",
"par1EntityAnimal",
")",
"{",
"if",
"(",
"par1EntityAnimal",
"==",
"this",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"!",
"isTamed",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"!",
"(",
"par1EntityAnimal",
"instanceof",
"EntityWolf",
")",
")",
"{",
"return",
"false",
";",
"}",
"EntityWolf",
"entitywolf",
"=",
"(",
"EntityWolf",
")",
"par1EntityAnimal",
";",
"if",
"(",
"!",
"entitywolf",
".",
"isTamed",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"entitywolf",
".",
"isSitting",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",
"else",
"{",
"return",
"isInLove",
"(",
")",
"&&",
"entitywolf",
".",
"isInLove",
"(",
")",
";",
"}",
"}",
"}",
"</s>"
] |
9,332 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"ComponentNetherBridgeCrossing3",
"extends",
"ComponentNetherBridgePiece",
"{",
"public",
"ComponentNetherBridgeCrossing3",
"(",
"int",
"par1",
",",
"Random",
"par2Random",
",",
"StructureBoundingBox",
"par3StructureBoundingBox",
",",
"int",
"par4",
")",
"{",
"super",
"(",
"par1",
")",
";",
"coordBaseMode",
"=",
"par4",
";",
"boundingBox",
"=",
"par3StructureBoundingBox",
";",
"}",
"protected",
"ComponentNetherBridgeCrossing3",
"(",
"Random",
"par1Random",
",",
"int",
"par2",
",",
"int",
"par3",
")",
"{",
"super",
"(",
"0",
")",
";",
"coordBaseMode",
"=",
"par1Random",
".",
"nextInt",
"(",
"4",
")",
";",
"switch",
"(",
"coordBaseMode",
")",
"{",
"case",
"0",
":",
"case",
"2",
":",
"boundingBox",
"=",
"new",
"StructureBoundingBox",
"(",
"par2",
",",
"64",
",",
"par3",
",",
"(",
"par2",
"+",
"19",
")",
"-",
"1",
",",
"73",
",",
"(",
"par3",
"+",
"19",
")",
"-",
"1",
")",
";",
"break",
";",
"default",
":",
"boundingBox",
"=",
"new",
"StructureBoundingBox",
"(",
"par2",
",",
"64",
",",
"par3",
",",
"(",
"par2",
"+",
"19",
")",
"-",
"1",
",",
"73",
",",
"(",
"par3",
"+",
"19",
")",
"-",
"1",
")",
";",
"break",
";",
"}",
"}",
"public",
"void",
"buildComponent",
"(",
"StructureComponent",
"par1StructureComponent",
",",
"List",
"par2List",
",",
"Random",
"par3Random",
")",
"{",
"getNextComponentNormal",
"(",
"(",
"ComponentNetherBridgeStartPiece",
")",
"par1StructureComponent",
",",
"par2List",
",",
"par3Random",
",",
"8",
",",
"3",
",",
"false",
")",
";",
"getNextComponentX",
"(",
"(",
"ComponentNetherBridgeStartPiece",
")",
"par1StructureComponent",
",",
"par2List",
",",
"par3Random",
",",
"3",
",",
"8",
",",
"false",
")",
";",
"getNextComponentZ",
"(",
"(",
"ComponentNetherBridgeStartPiece",
")",
"par1StructureComponent",
",",
"par2List",
",",
"par3Random",
",",
"3",
",",
"8",
",",
"false",
")",
";",
"}",
"public",
"static",
"ComponentNetherBridgeCrossing3",
"createValidComponent",
"(",
"List",
"par0List",
",",
"Random",
"par1Random",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
",",
"int",
"par6",
")",
"{",
"StructureBoundingBox",
"structureboundingbox",
"=",
"StructureBoundingBox",
".",
"getComponentToAddBoundingBox",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"-",
"8",
",",
"-",
"3",
",",
"0",
",",
"19",
",",
"10",
",",
"19",
",",
"par5",
")",
";",
"if",
"(",
"!",
"isAboveGround",
"(",
"structureboundingbox",
")",
"||",
"StructureComponent",
".",
"findIntersecting",
"(",
"par0List",
",",
"structureboundingbox",
")",
"!=",
"null",
")",
"{",
"return",
"null",
";",
"}",
"else",
"{",
"return",
"new",
"ComponentNetherBridgeCrossing3",
"(",
"par6",
",",
"par1Random",
",",
"structureboundingbox",
",",
"par5",
")",
";",
"}",
"}",
"public",
"boolean",
"addComponentParts",
"(",
"World",
"par1World",
",",
"Random",
"par2Random",
",",
"StructureBoundingBox",
"par3StructureBoundingBox",
")",
"{",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"7",
",",
"3",
",",
"0",
",",
"11",
",",
"4",
",",
"18",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"0",
",",
"3",
",",
"7",
",",
"18",
",",
"4",
",",
"11",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"8",
",",
"5",
",",
"0",
",",
"10",
",",
"7",
",",
"18",
",",
"0",
",",
"0",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"0",
",",
"5",
",",
"8",
",",
"18",
",",
"7",
",",
"10",
",",
"0",
",",
"0",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"7",
",",
"5",
",",
"0",
",",
"7",
",",
"5",
",",
"7",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"7",
",",
"5",
",",
"11",
",",
"7",
",",
"5",
",",
"18",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"11",
",",
"5",
",",
"0",
",",
"11",
",",
"5",
",",
"7",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"11",
",",
"5",
",",
"11",
",",
"11",
",",
"5",
",",
"18",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"0",
",",
"5",
",",
"7",
",",
"7",
",",
"5",
",",
"7",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"11",
",",
"5",
",",
"7",
",",
"18",
",",
"5",
",",
"7",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"0",
",",
"5",
",",
"11",
",",
"7",
",",
"5",
",",
"11",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"11",
",",
"5",
",",
"11",
",",
"18",
",",
"5",
",",
"11",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"7",
",",
"2",
",",
"0",
",",
"11",
",",
"2",
",",
"5",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"7",
",",
"2",
",",
"13",
",",
"11",
",",
"2",
",",
"18",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"7",
",",
"0",
",",
"0",
",",
"11",
",",
"1",
",",
"3",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"7",
",",
"0",
",",
"15",
",",
"11",
",",
"1",
",",
"18",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"for",
"(",
"int",
"i",
"=",
"7",
";",
"i",
"<=",
"11",
";",
"i",
"++",
")",
"{",
"for",
"(",
"int",
"k",
"=",
"0",
";",
"k",
"<=",
"2",
";",
"k",
"++",
")",
"{",
"fillCurrentPositionBlocksDownwards",
"(",
"par1World",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"0",
",",
"i",
",",
"-",
"1",
",",
"k",
",",
"par3StructureBoundingBox",
")",
";",
"fillCurrentPositionBlocksDownwards",
"(",
"par1World",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"0",
",",
"i",
",",
"-",
"1",
",",
"18",
"-",
"k",
",",
"par3StructureBoundingBox",
")",
";",
"}",
"}",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"0",
",",
"2",
",",
"7",
",",
"5",
",",
"2",
",",
"11",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"13",
",",
"2",
",",
"7",
",",
"18",
",",
"2",
",",
"11",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"0",
",",
"0",
",",
"7",
",",
"3",
",",
"1",
",",
"11",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"15",
",",
"0",
",",
"7",
",",
"18",
",",
"1",
",",
"11",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<=",
"2",
";",
"j",
"++",
")",
"{",
"for",
"(",
"int",
"l",
"=",
"7",
";",
"l",
"<=",
"11",
";",
"l",
"++",
")",
"{",
"fillCurrentPositionBlocksDownwards",
"(",
"par1World",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"0",
",",
"j",
",",
"-",
"1",
",",
"l",
",",
"par3StructureBoundingBox",
")",
";",
"fillCurrentPositionBlocksDownwards",
"(",
"par1World",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"0",
",",
"18",
"-",
"j",
",",
"-",
"1",
",",
"l",
",",
"par3StructureBoundingBox",
")",
";",
"}",
"}",
"return",
"true",
";",
"}",
"}",
"</s>"
] |
9,333 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"class",
"PlayerUsageSnooperThread",
"extends",
"Thread",
"{",
"final",
"PlayerUsageSnooper",
"field_52017_a",
";",
"PlayerUsageSnooperThread",
"(",
"PlayerUsageSnooper",
"par1PlayerUsageSnooper",
",",
"String",
"par2Str",
")",
"{",
"super",
"(",
"par2Str",
")",
";",
"field_52017_a",
"=",
"par1PlayerUsageSnooper",
";",
"}",
"public",
"void",
"run",
"(",
")",
"{",
"PostHttp",
".",
"func_52010_a",
"(",
"PlayerUsageSnooper",
".",
"func_52013_a",
"(",
"field_52017_a",
")",
",",
"PlayerUsageSnooper",
".",
"func_52011_b",
"(",
"field_52017_a",
")",
",",
"true",
")",
";",
"}",
"}",
"</s>"
] |
9,334 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"ComponentStrongholdCrossing",
"extends",
"ComponentStronghold",
"{",
"protected",
"final",
"EnumDoor",
"doorType",
";",
"private",
"boolean",
"field_35353_b",
";",
"private",
"boolean",
"field_35354_c",
";",
"private",
"boolean",
"field_35351_d",
";",
"private",
"boolean",
"field_35352_e",
";",
"public",
"ComponentStrongholdCrossing",
"(",
"int",
"par1",
",",
"Random",
"par2Random",
",",
"StructureBoundingBox",
"par3StructureBoundingBox",
",",
"int",
"par4",
")",
"{",
"super",
"(",
"par1",
")",
";",
"coordBaseMode",
"=",
"par4",
";",
"doorType",
"=",
"getRandomDoor",
"(",
"par2Random",
")",
";",
"boundingBox",
"=",
"par3StructureBoundingBox",
";",
"field_35353_b",
"=",
"par2Random",
".",
"nextBoolean",
"(",
")",
";",
"field_35354_c",
"=",
"par2Random",
".",
"nextBoolean",
"(",
")",
";",
"field_35351_d",
"=",
"par2Random",
".",
"nextBoolean",
"(",
")",
";",
"field_35352_e",
"=",
"par2Random",
".",
"nextInt",
"(",
"3",
")",
">",
"0",
";",
"}",
"public",
"void",
"buildComponent",
"(",
"StructureComponent",
"par1StructureComponent",
",",
"List",
"par2List",
",",
"Random",
"par3Random",
")",
"{",
"int",
"i",
"=",
"3",
";",
"int",
"j",
"=",
"5",
";",
"if",
"(",
"coordBaseMode",
"==",
"1",
"||",
"coordBaseMode",
"==",
"2",
")",
"{",
"i",
"=",
"8",
"-",
"i",
";",
"j",
"=",
"8",
"-",
"j",
";",
"}",
"getNextComponentNormal",
"(",
"(",
"ComponentStrongholdStairs2",
")",
"par1StructureComponent",
",",
"par2List",
",",
"par3Random",
",",
"5",
",",
"1",
")",
";",
"if",
"(",
"field_35353_b",
")",
"{",
"getNextComponentX",
"(",
"(",
"ComponentStrongholdStairs2",
")",
"par1StructureComponent",
",",
"par2List",
",",
"par3Random",
",",
"i",
",",
"1",
")",
";",
"}",
"if",
"(",
"field_35354_c",
")",
"{",
"getNextComponentX",
"(",
"(",
"ComponentStrongholdStairs2",
")",
"par1StructureComponent",
",",
"par2List",
",",
"par3Random",
",",
"j",
",",
"7",
")",
";",
"}",
"if",
"(",
"field_35351_d",
")",
"{",
"getNextComponentZ",
"(",
"(",
"ComponentStrongholdStairs2",
")",
"par1StructureComponent",
",",
"par2List",
",",
"par3Random",
",",
"i",
",",
"1",
")",
";",
"}",
"if",
"(",
"field_35352_e",
")",
"{",
"getNextComponentZ",
"(",
"(",
"ComponentStrongholdStairs2",
")",
"par1StructureComponent",
",",
"par2List",
",",
"par3Random",
",",
"j",
",",
"7",
")",
";",
"}",
"}",
"public",
"static",
"ComponentStrongholdCrossing",
"findValidPlacement",
"(",
"List",
"par0List",
",",
"Random",
"par1Random",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
",",
"int",
"par6",
")",
"{",
"StructureBoundingBox",
"structureboundingbox",
"=",
"StructureBoundingBox",
".",
"getComponentToAddBoundingBox",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"-",
"4",
",",
"-",
"3",
",",
"0",
",",
"10",
",",
"9",
",",
"11",
",",
"par5",
")",
";",
"if",
"(",
"!",
"canStrongholdGoDeeper",
"(",
"structureboundingbox",
")",
"||",
"StructureComponent",
".",
"findIntersecting",
"(",
"par0List",
",",
"structureboundingbox",
")",
"!=",
"null",
")",
"{",
"return",
"null",
";",
"}",
"else",
"{",
"return",
"new",
"ComponentStrongholdCrossing",
"(",
"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",
",",
"9",
",",
"8",
",",
"10",
",",
"true",
",",
"par2Random",
",",
"StructureStrongholdPieces",
".",
"getStrongholdStones",
"(",
")",
")",
";",
"placeDoor",
"(",
"par1World",
",",
"par2Random",
",",
"par3StructureBoundingBox",
",",
"doorType",
",",
"4",
",",
"3",
",",
"0",
")",
";",
"if",
"(",
"field_35353_b",
")",
"{",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"0",
",",
"3",
",",
"1",
",",
"0",
",",
"5",
",",
"3",
",",
"0",
",",
"0",
",",
"false",
")",
";",
"}",
"if",
"(",
"field_35351_d",
")",
"{",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"9",
",",
"3",
",",
"1",
",",
"9",
",",
"5",
",",
"3",
",",
"0",
",",
"0",
",",
"false",
")",
";",
"}",
"if",
"(",
"field_35354_c",
")",
"{",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"0",
",",
"5",
",",
"7",
",",
"0",
",",
"7",
",",
"9",
",",
"0",
",",
"0",
",",
"false",
")",
";",
"}",
"if",
"(",
"field_35352_e",
")",
"{",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"9",
",",
"5",
",",
"7",
",",
"9",
",",
"7",
",",
"9",
",",
"0",
",",
"0",
",",
"false",
")",
";",
"}",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"5",
",",
"1",
",",
"10",
",",
"7",
",",
"3",
",",
"10",
",",
"0",
",",
"0",
",",
"false",
")",
";",
"fillWithRandomizedBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"1",
",",
"2",
",",
"1",
",",
"8",
",",
"2",
",",
"6",
",",
"false",
",",
"par2Random",
",",
"StructureStrongholdPieces",
".",
"getStrongholdStones",
"(",
")",
")",
";",
"fillWithRandomizedBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"4",
",",
"1",
",",
"5",
",",
"4",
",",
"4",
",",
"9",
",",
"false",
",",
"par2Random",
",",
"StructureStrongholdPieces",
".",
"getStrongholdStones",
"(",
")",
")",
";",
"fillWithRandomizedBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"8",
",",
"1",
",",
"5",
",",
"8",
",",
"4",
",",
"9",
",",
"false",
",",
"par2Random",
",",
"StructureStrongholdPieces",
".",
"getStrongholdStones",
"(",
")",
")",
";",
"fillWithRandomizedBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"1",
",",
"4",
",",
"7",
",",
"3",
",",
"4",
",",
"9",
",",
"false",
",",
"par2Random",
",",
"StructureStrongholdPieces",
".",
"getStrongholdStones",
"(",
")",
")",
";",
"fillWithRandomizedBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"1",
",",
"3",
",",
"5",
",",
"3",
",",
"3",
",",
"6",
",",
"false",
",",
"par2Random",
",",
"StructureStrongholdPieces",
".",
"getStrongholdStones",
"(",
")",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"1",
",",
"3",
",",
"4",
",",
"3",
",",
"3",
",",
"4",
",",
"Block",
".",
"stairSingle",
".",
"blockID",
",",
"Block",
".",
"stairSingle",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"1",
",",
"4",
",",
"6",
",",
"3",
",",
"4",
",",
"6",
",",
"Block",
".",
"stairSingle",
".",
"blockID",
",",
"Block",
".",
"stairSingle",
".",
"blockID",
",",
"false",
")",
";",
"fillWithRandomizedBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"5",
",",
"1",
",",
"7",
",",
"7",
",",
"1",
",",
"8",
",",
"false",
",",
"par2Random",
",",
"StructureStrongholdPieces",
".",
"getStrongholdStones",
"(",
")",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"5",
",",
"1",
",",
"9",
",",
"7",
",",
"1",
",",
"9",
",",
"Block",
".",
"stairSingle",
".",
"blockID",
",",
"Block",
".",
"stairSingle",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"5",
",",
"2",
",",
"7",
",",
"7",
",",
"2",
",",
"7",
",",
"Block",
".",
"stairSingle",
".",
"blockID",
",",
"Block",
".",
"stairSingle",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"4",
",",
"5",
",",
"7",
",",
"4",
",",
"5",
",",
"9",
",",
"Block",
".",
"stairSingle",
".",
"blockID",
",",
"Block",
".",
"stairSingle",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"8",
",",
"5",
",",
"7",
",",
"8",
",",
"5",
",",
"9",
",",
"Block",
".",
"stairSingle",
".",
"blockID",
",",
"Block",
".",
"stairSingle",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"5",
",",
"5",
",",
"7",
",",
"7",
",",
"5",
",",
"9",
",",
"Block",
".",
"stairDouble",
".",
"blockID",
",",
"Block",
".",
"stairDouble",
".",
"blockID",
",",
"false",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"torchWood",
".",
"blockID",
",",
"0",
",",
"6",
",",
"5",
",",
"6",
",",
"par3StructureBoundingBox",
")",
";",
"return",
"true",
";",
"}",
"}",
"</s>"
] |
9,335 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"BiomeGenJungle",
"extends",
"BiomeGenBase",
"{",
"public",
"BiomeGenJungle",
"(",
"int",
"par1",
")",
"{",
"super",
"(",
"par1",
")",
";",
"biomeDecorator",
".",
"treesPerChunk",
"=",
"50",
";",
"biomeDecorator",
".",
"grassPerChunk",
"=",
"25",
";",
"biomeDecorator",
".",
"flowersPerChunk",
"=",
"4",
";",
"spawnableMonsterList",
".",
"add",
"(",
"new",
"SpawnListEntry",
"(",
"net",
".",
"minecraft",
".",
"src",
".",
"EntityOcelot",
".",
"class",
",",
"2",
",",
"1",
",",
"1",
")",
")",
";",
"spawnableCreatureList",
".",
"add",
"(",
"new",
"SpawnListEntry",
"(",
"net",
".",
"minecraft",
".",
"src",
".",
"EntityChicken",
".",
"class",
",",
"10",
",",
"4",
",",
"4",
")",
")",
";",
"}",
"public",
"WorldGenerator",
"getRandomWorldGenForTrees",
"(",
"Random",
"par1Random",
")",
"{",
"if",
"(",
"par1Random",
".",
"nextInt",
"(",
"10",
")",
"==",
"0",
")",
"{",
"return",
"worldGenBigTree",
";",
"}",
"if",
"(",
"par1Random",
".",
"nextInt",
"(",
"2",
")",
"==",
"0",
")",
"{",
"return",
"new",
"WorldGenShrub",
"(",
"3",
",",
"0",
")",
";",
"}",
"if",
"(",
"par1Random",
".",
"nextInt",
"(",
"3",
")",
"==",
"0",
")",
"{",
"return",
"new",
"WorldGenHugeTrees",
"(",
"false",
",",
"10",
"+",
"par1Random",
".",
"nextInt",
"(",
"20",
")",
",",
"3",
",",
"3",
")",
";",
"}",
"else",
"{",
"return",
"new",
"WorldGenTrees",
"(",
"false",
",",
"4",
"+",
"par1Random",
".",
"nextInt",
"(",
"7",
")",
",",
"3",
",",
"3",
",",
"true",
")",
";",
"}",
"}",
"public",
"WorldGenerator",
"func_48440_b",
"(",
"Random",
"par1Random",
")",
"{",
"if",
"(",
"par1Random",
".",
"nextInt",
"(",
"4",
")",
"==",
"0",
")",
"{",
"return",
"new",
"WorldGenTallGrass",
"(",
"Block",
".",
"tallGrass",
".",
"blockID",
",",
"2",
")",
";",
"}",
"else",
"{",
"return",
"new",
"WorldGenTallGrass",
"(",
"Block",
".",
"tallGrass",
".",
"blockID",
",",
"1",
")",
";",
"}",
"}",
"public",
"void",
"decorate",
"(",
"World",
"par1World",
",",
"Random",
"par2Random",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"super",
".",
"decorate",
"(",
"par1World",
",",
"par2Random",
",",
"par3",
",",
"par4",
")",
";",
"WorldGenVines",
"worldgenvines",
"=",
"new",
"WorldGenVines",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"50",
";",
"i",
"++",
")",
"{",
"int",
"j",
"=",
"par3",
"+",
"par2Random",
".",
"nextInt",
"(",
"16",
")",
"+",
"8",
";",
"byte",
"byte0",
"=",
"64",
";",
"int",
"k",
"=",
"par4",
"+",
"par2Random",
".",
"nextInt",
"(",
"16",
")",
"+",
"8",
";",
"worldgenvines",
".",
"generate",
"(",
"par1World",
",",
"par2Random",
",",
"j",
",",
"byte0",
",",
"k",
")",
";",
"}",
"}",
"}",
"</s>"
] |
9,336 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"class",
"EntityLookHelper",
"{",
"private",
"EntityLiving",
"entity",
";",
"private",
"float",
"field_46066_b",
";",
"private",
"float",
"field_46067_c",
";",
"private",
"boolean",
"field_46064_d",
";",
"private",
"double",
"posX",
";",
"private",
"double",
"posY",
";",
"private",
"double",
"posZ",
";",
"public",
"EntityLookHelper",
"(",
"EntityLiving",
"par1EntityLiving",
")",
"{",
"field_46064_d",
"=",
"false",
";",
"entity",
"=",
"par1EntityLiving",
";",
"}",
"public",
"void",
"setLookPositionWithEntity",
"(",
"Entity",
"par1Entity",
",",
"float",
"par2",
",",
"float",
"par3",
")",
"{",
"posX",
"=",
"par1Entity",
".",
"posX",
";",
"if",
"(",
"par1Entity",
"instanceof",
"EntityLiving",
")",
"{",
"posY",
"=",
"par1Entity",
".",
"posY",
"+",
"(",
"double",
")",
"(",
"(",
"EntityLiving",
")",
"par1Entity",
")",
".",
"getEyeHeight",
"(",
")",
";",
"}",
"else",
"{",
"posY",
"=",
"(",
"par1Entity",
".",
"boundingBox",
".",
"minY",
"+",
"par1Entity",
".",
"boundingBox",
".",
"maxY",
")",
"/",
"2D",
";",
"}",
"posZ",
"=",
"par1Entity",
".",
"posZ",
";",
"field_46066_b",
"=",
"par2",
";",
"field_46067_c",
"=",
"par3",
";",
"field_46064_d",
"=",
"true",
";",
"}",
"public",
"void",
"setLookPosition",
"(",
"double",
"par1",
",",
"double",
"par3",
",",
"double",
"par5",
",",
"float",
"par7",
",",
"float",
"par8",
")",
"{",
"posX",
"=",
"par1",
";",
"posY",
"=",
"par3",
";",
"posZ",
"=",
"par5",
";",
"field_46066_b",
"=",
"par7",
";",
"field_46067_c",
"=",
"par8",
";",
"field_46064_d",
"=",
"true",
";",
"}",
"public",
"void",
"onUpdateLook",
"(",
")",
"{",
"entity",
".",
"rotationPitch",
"=",
"0.0F",
";",
"if",
"(",
"field_46064_d",
")",
"{",
"field_46064_d",
"=",
"false",
";",
"double",
"d",
"=",
"posX",
"-",
"entity",
".",
"posX",
";",
"double",
"d1",
"=",
"posY",
"-",
"(",
"entity",
".",
"posY",
"+",
"(",
"double",
")",
"entity",
".",
"getEyeHeight",
"(",
")",
")",
";",
"double",
"d2",
"=",
"posZ",
"-",
"entity",
".",
"posZ",
";",
"double",
"d3",
"=",
"MathHelper",
".",
"sqrt_double",
"(",
"d",
"*",
"d",
"+",
"d2",
"*",
"d2",
")",
";",
"float",
"f1",
"=",
"(",
"float",
")",
"(",
"(",
"Math",
".",
"atan2",
"(",
"d2",
",",
"d",
")",
"*",
"180D",
")",
"/",
"Math",
".",
"PI",
")",
"-",
"90F",
";",
"float",
"f2",
"=",
"(",
"float",
")",
"(",
"-",
"(",
"(",
"Math",
".",
"atan2",
"(",
"d1",
",",
"d3",
")",
"*",
"180D",
")",
"/",
"Math",
".",
"PI",
")",
")",
";",
"entity",
".",
"rotationPitch",
"=",
"updateRotation",
"(",
"entity",
".",
"rotationPitch",
",",
"f2",
",",
"field_46067_c",
")",
";",
"entity",
".",
"rotationYawHead",
"=",
"updateRotation",
"(",
"entity",
".",
"rotationYawHead",
",",
"f1",
",",
"field_46066_b",
")",
";",
"}",
"else",
"{",
"entity",
".",
"rotationYawHead",
"=",
"updateRotation",
"(",
"entity",
".",
"rotationYawHead",
",",
"entity",
".",
"renderYawOffset",
",",
"10F",
")",
";",
"}",
"float",
"f",
";",
"for",
"(",
"f",
"=",
"entity",
".",
"rotationYawHead",
"-",
"entity",
".",
"renderYawOffset",
";",
"f",
"<",
"-",
"180F",
";",
"f",
"+=",
"360F",
")",
"{",
"}",
"for",
"(",
";",
"f",
">=",
"180F",
";",
"f",
"-=",
"360F",
")",
"{",
"}",
"if",
"(",
"!",
"entity",
".",
"getNavigator",
"(",
")",
".",
"noPath",
"(",
")",
")",
"{",
"if",
"(",
"f",
"<",
"-",
"75F",
")",
"{",
"entity",
".",
"rotationYawHead",
"=",
"entity",
".",
"renderYawOffset",
"-",
"75F",
";",
"}",
"if",
"(",
"f",
">",
"75F",
")",
"{",
"entity",
".",
"rotationYawHead",
"=",
"entity",
".",
"renderYawOffset",
"+",
"75F",
";",
"}",
"}",
"}",
"private",
"float",
"updateRotation",
"(",
"float",
"par1",
",",
"float",
"par2",
",",
"float",
"par3",
")",
"{",
"float",
"f",
";",
"for",
"(",
"f",
"=",
"par2",
"-",
"par1",
";",
"f",
"<",
"-",
"180F",
";",
"f",
"+=",
"360F",
")",
"{",
"}",
"for",
"(",
";",
"f",
">=",
"180F",
";",
"f",
"-=",
"360F",
")",
"{",
"}",
"if",
"(",
"f",
">",
"par3",
")",
"{",
"f",
"=",
"par3",
";",
"}",
"if",
"(",
"f",
"<",
"-",
"par3",
")",
"{",
"f",
"=",
"-",
"par3",
";",
"}",
"return",
"par1",
"+",
"f",
";",
"}",
"}",
"</s>"
] |
9,337 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"class",
"ItemBucketMilk",
"extends",
"Item",
"{",
"public",
"ItemBucketMilk",
"(",
"int",
"par1",
")",
"{",
"super",
"(",
"par1",
")",
";",
"setMaxStackSize",
"(",
"1",
")",
";",
"}",
"public",
"ItemStack",
"onFoodEaten",
"(",
"ItemStack",
"par1ItemStack",
",",
"World",
"par2World",
",",
"EntityPlayer",
"par3EntityPlayer",
")",
"{",
"par1ItemStack",
".",
"stackSize",
"--",
";",
"if",
"(",
"!",
"par2World",
".",
"isRemote",
")",
"{",
"par3EntityPlayer",
".",
"clearActivePotions",
"(",
")",
";",
"}",
"if",
"(",
"par1ItemStack",
".",
"stackSize",
"<=",
"0",
")",
"{",
"return",
"new",
"ItemStack",
"(",
"Item",
".",
"bucketEmpty",
")",
";",
"}",
"else",
"{",
"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",
")",
"{",
"par3EntityPlayer",
".",
"setItemInUse",
"(",
"par1ItemStack",
",",
"getMaxItemUseDuration",
"(",
"par1ItemStack",
")",
")",
";",
"return",
"par1ItemStack",
";",
"}",
"}",
"</s>"
] |
9,338 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"class",
"EntityAICreeperSwell",
"extends",
"EntityAIBase",
"{",
"EntityCreeper",
"swellingCreeper",
";",
"EntityLiving",
"creeperAttackTarget",
";",
"public",
"EntityAICreeperSwell",
"(",
"EntityCreeper",
"par1EntityCreeper",
")",
"{",
"swellingCreeper",
"=",
"par1EntityCreeper",
";",
"setMutexBits",
"(",
"1",
")",
";",
"}",
"public",
"boolean",
"shouldExecute",
"(",
")",
"{",
"EntityLiving",
"entityliving",
"=",
"swellingCreeper",
".",
"getAttackTarget",
"(",
")",
";",
"return",
"swellingCreeper",
".",
"getCreeperState",
"(",
")",
">",
"0",
"||",
"entityliving",
"!=",
"null",
"&&",
"swellingCreeper",
".",
"getDistanceSqToEntity",
"(",
"entityliving",
")",
"<",
"9D",
";",
"}",
"public",
"void",
"startExecuting",
"(",
")",
"{",
"swellingCreeper",
".",
"getNavigator",
"(",
")",
".",
"clearPathEntity",
"(",
")",
";",
"creeperAttackTarget",
"=",
"swellingCreeper",
".",
"getAttackTarget",
"(",
")",
";",
"}",
"public",
"void",
"resetTask",
"(",
")",
"{",
"creeperAttackTarget",
"=",
"null",
";",
"}",
"public",
"void",
"updateTask",
"(",
")",
"{",
"if",
"(",
"creeperAttackTarget",
"==",
"null",
")",
"{",
"swellingCreeper",
".",
"setCreeperState",
"(",
"-",
"1",
")",
";",
"return",
";",
"}",
"if",
"(",
"swellingCreeper",
".",
"getDistanceSqToEntity",
"(",
"creeperAttackTarget",
")",
">",
"49D",
")",
"{",
"swellingCreeper",
".",
"setCreeperState",
"(",
"-",
"1",
")",
";",
"return",
";",
"}",
"if",
"(",
"!",
"swellingCreeper",
".",
"func_48318_al",
"(",
")",
".",
"canSee",
"(",
"creeperAttackTarget",
")",
")",
"{",
"swellingCreeper",
".",
"setCreeperState",
"(",
"-",
"1",
")",
";",
"return",
";",
"}",
"else",
"{",
"swellingCreeper",
".",
"setCreeperState",
"(",
"1",
")",
";",
"return",
";",
"}",
"}",
"}",
"</s>"
] |
9,339 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"ComponentNetherBridgeThrone",
"extends",
"ComponentNetherBridgePiece",
"{",
"private",
"boolean",
"hasSpawner",
";",
"public",
"ComponentNetherBridgeThrone",
"(",
"int",
"par1",
",",
"Random",
"par2Random",
",",
"StructureBoundingBox",
"par3StructureBoundingBox",
",",
"int",
"par4",
")",
"{",
"super",
"(",
"par1",
")",
";",
"coordBaseMode",
"=",
"par4",
";",
"boundingBox",
"=",
"par3StructureBoundingBox",
";",
"}",
"public",
"void",
"buildComponent",
"(",
"StructureComponent",
"structurecomponent",
",",
"List",
"list",
",",
"Random",
"random",
")",
"{",
"}",
"public",
"static",
"ComponentNetherBridgeThrone",
"createValidComponent",
"(",
"List",
"par0List",
",",
"Random",
"par1Random",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
",",
"int",
"par6",
")",
"{",
"StructureBoundingBox",
"structureboundingbox",
"=",
"StructureBoundingBox",
".",
"getComponentToAddBoundingBox",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"-",
"2",
",",
"0",
",",
"0",
",",
"7",
",",
"8",
",",
"9",
",",
"par5",
")",
";",
"if",
"(",
"!",
"isAboveGround",
"(",
"structureboundingbox",
")",
"||",
"StructureComponent",
".",
"findIntersecting",
"(",
"par0List",
",",
"structureboundingbox",
")",
"!=",
"null",
")",
"{",
"return",
"null",
";",
"}",
"else",
"{",
"return",
"new",
"ComponentNetherBridgeThrone",
"(",
"par6",
",",
"par1Random",
",",
"structureboundingbox",
",",
"par5",
")",
";",
"}",
"}",
"public",
"boolean",
"addComponentParts",
"(",
"World",
"par1World",
",",
"Random",
"par2Random",
",",
"StructureBoundingBox",
"par3StructureBoundingBox",
")",
"{",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"0",
",",
"2",
",",
"0",
",",
"6",
",",
"7",
",",
"7",
",",
"0",
",",
"0",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"1",
",",
"0",
",",
"0",
",",
"5",
",",
"1",
",",
"7",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"1",
",",
"2",
",",
"1",
",",
"5",
",",
"2",
",",
"7",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"1",
",",
"3",
",",
"2",
",",
"5",
",",
"3",
",",
"7",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"1",
",",
"4",
",",
"3",
",",
"5",
",",
"4",
",",
"7",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"1",
",",
"2",
",",
"0",
",",
"1",
",",
"4",
",",
"2",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"5",
",",
"2",
",",
"0",
",",
"5",
",",
"4",
",",
"2",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"1",
",",
"5",
",",
"2",
",",
"1",
",",
"5",
",",
"3",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"5",
",",
"5",
",",
"2",
",",
"5",
",",
"5",
",",
"3",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"0",
",",
"5",
",",
"3",
",",
"0",
",",
"5",
",",
"8",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"6",
",",
"5",
",",
"3",
",",
"6",
",",
"5",
",",
"8",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"1",
",",
"5",
",",
"8",
",",
"5",
",",
"5",
",",
"8",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"0",
",",
"1",
",",
"6",
",",
"3",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"0",
",",
"5",
",",
"6",
",",
"3",
",",
"par3StructureBoundingBox",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"0",
",",
"6",
",",
"3",
",",
"0",
",",
"6",
",",
"8",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"6",
",",
"6",
",",
"3",
",",
"6",
",",
"6",
",",
"8",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"1",
",",
"6",
",",
"8",
",",
"5",
",",
"7",
",",
"8",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"2",
",",
"8",
",",
"8",
",",
"4",
",",
"8",
",",
"8",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"false",
")",
";",
"if",
"(",
"!",
"hasSpawner",
")",
"{",
"int",
"i",
"=",
"getYWithOffset",
"(",
"5",
")",
";",
"int",
"k",
"=",
"getXWithOffset",
"(",
"3",
",",
"5",
")",
";",
"int",
"i1",
"=",
"getZWithOffset",
"(",
"3",
",",
"5",
")",
";",
"if",
"(",
"par3StructureBoundingBox",
".",
"isVecInside",
"(",
"k",
",",
"i",
",",
"i1",
")",
")",
"{",
"hasSpawner",
"=",
"true",
";",
"par1World",
".",
"setBlockWithNotify",
"(",
"k",
",",
"i",
",",
"i1",
",",
"Block",
".",
"mobSpawner",
".",
"blockID",
")",
";",
"TileEntityMobSpawner",
"tileentitymobspawner",
"=",
"(",
"TileEntityMobSpawner",
")",
"par1World",
".",
"getBlockTileEntity",
"(",
"k",
",",
"i",
",",
"i1",
")",
";",
"if",
"(",
"tileentitymobspawner",
"!=",
"null",
")",
"{",
"tileentitymobspawner",
".",
"setMobID",
"(",
"\"Blaze\"",
")",
";",
"}",
"}",
"}",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<=",
"6",
";",
"j",
"++",
")",
"{",
"for",
"(",
"int",
"l",
"=",
"0",
";",
"l",
"<=",
"6",
";",
"l",
"++",
")",
"{",
"fillCurrentPositionBlocksDownwards",
"(",
"par1World",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"0",
",",
"j",
",",
"-",
"1",
",",
"l",
",",
"par3StructureBoundingBox",
")",
";",
"}",
"}",
"return",
"true",
";",
"}",
"}",
"</s>"
] |
9,340 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"*",
";",
"public",
"abstract",
"class",
"StructureComponent",
"{",
"protected",
"StructureBoundingBox",
"boundingBox",
";",
"protected",
"int",
"coordBaseMode",
";",
"protected",
"int",
"componentType",
";",
"protected",
"StructureComponent",
"(",
"int",
"par1",
")",
"{",
"componentType",
"=",
"par1",
";",
"coordBaseMode",
"=",
"-",
"1",
";",
"}",
"public",
"void",
"buildComponent",
"(",
"StructureComponent",
"structurecomponent",
",",
"List",
"list",
",",
"Random",
"random",
")",
"{",
"}",
"public",
"abstract",
"boolean",
"addComponentParts",
"(",
"World",
"world",
",",
"Random",
"random",
",",
"StructureBoundingBox",
"structureboundingbox",
")",
";",
"public",
"StructureBoundingBox",
"getBoundingBox",
"(",
")",
"{",
"return",
"boundingBox",
";",
"}",
"public",
"int",
"getComponentType",
"(",
")",
"{",
"return",
"componentType",
";",
"}",
"public",
"static",
"StructureComponent",
"findIntersecting",
"(",
"List",
"par0List",
",",
"StructureBoundingBox",
"par1StructureBoundingBox",
")",
"{",
"for",
"(",
"Iterator",
"iterator",
"=",
"par0List",
".",
"iterator",
"(",
")",
";",
"iterator",
".",
"hasNext",
"(",
")",
";",
")",
"{",
"StructureComponent",
"structurecomponent",
"=",
"(",
"StructureComponent",
")",
"iterator",
".",
"next",
"(",
")",
";",
"if",
"(",
"structurecomponent",
".",
"getBoundingBox",
"(",
")",
"!=",
"null",
"&&",
"structurecomponent",
".",
"getBoundingBox",
"(",
")",
".",
"intersectsWith",
"(",
"par1StructureBoundingBox",
")",
")",
"{",
"return",
"structurecomponent",
";",
"}",
"}",
"return",
"null",
";",
"}",
"public",
"ChunkPosition",
"getCenter",
"(",
")",
"{",
"return",
"new",
"ChunkPosition",
"(",
"boundingBox",
".",
"getCenterX",
"(",
")",
",",
"boundingBox",
".",
"getCenterY",
"(",
")",
",",
"boundingBox",
".",
"getCenterZ",
"(",
")",
")",
";",
"}",
"protected",
"boolean",
"isLiquidInStructureBoundingBox",
"(",
"World",
"par1World",
",",
"StructureBoundingBox",
"par2StructureBoundingBox",
")",
"{",
"int",
"i",
"=",
"Math",
".",
"max",
"(",
"boundingBox",
".",
"minX",
"-",
"1",
",",
"par2StructureBoundingBox",
".",
"minX",
")",
";",
"int",
"j",
"=",
"Math",
".",
"max",
"(",
"boundingBox",
".",
"minY",
"-",
"1",
",",
"par2StructureBoundingBox",
".",
"minY",
")",
";",
"int",
"k",
"=",
"Math",
".",
"max",
"(",
"boundingBox",
".",
"minZ",
"-",
"1",
",",
"par2StructureBoundingBox",
".",
"minZ",
")",
";",
"int",
"l",
"=",
"Math",
".",
"min",
"(",
"boundingBox",
".",
"maxX",
"+",
"1",
",",
"par2StructureBoundingBox",
".",
"maxX",
")",
";",
"int",
"i1",
"=",
"Math",
".",
"min",
"(",
"boundingBox",
".",
"maxY",
"+",
"1",
",",
"par2StructureBoundingBox",
".",
"maxY",
")",
";",
"int",
"j1",
"=",
"Math",
".",
"min",
"(",
"boundingBox",
".",
"maxZ",
"+",
"1",
",",
"par2StructureBoundingBox",
".",
"maxZ",
")",
";",
"for",
"(",
"int",
"k1",
"=",
"i",
";",
"k1",
"<=",
"l",
";",
"k1",
"++",
")",
"{",
"for",
"(",
"int",
"j2",
"=",
"k",
";",
"j2",
"<=",
"j1",
";",
"j2",
"++",
")",
"{",
"int",
"i3",
"=",
"par1World",
".",
"getBlockId",
"(",
"k1",
",",
"j",
",",
"j2",
")",
";",
"if",
"(",
"i3",
">",
"0",
"&&",
"Block",
".",
"blocksList",
"[",
"i3",
"]",
".",
"blockMaterial",
".",
"isLiquid",
"(",
")",
")",
"{",
"return",
"true",
";",
"}",
"i3",
"=",
"par1World",
".",
"getBlockId",
"(",
"k1",
",",
"i1",
",",
"j2",
")",
";",
"if",
"(",
"i3",
">",
"0",
"&&",
"Block",
".",
"blocksList",
"[",
"i3",
"]",
".",
"blockMaterial",
".",
"isLiquid",
"(",
")",
")",
"{",
"return",
"true",
";",
"}",
"}",
"}",
"for",
"(",
"int",
"l1",
"=",
"i",
";",
"l1",
"<=",
"l",
";",
"l1",
"++",
")",
"{",
"for",
"(",
"int",
"k2",
"=",
"j",
";",
"k2",
"<=",
"i1",
";",
"k2",
"++",
")",
"{",
"int",
"j3",
"=",
"par1World",
".",
"getBlockId",
"(",
"l1",
",",
"k2",
",",
"k",
")",
";",
"if",
"(",
"j3",
">",
"0",
"&&",
"Block",
".",
"blocksList",
"[",
"j3",
"]",
".",
"blockMaterial",
".",
"isLiquid",
"(",
")",
")",
"{",
"return",
"true",
";",
"}",
"j3",
"=",
"par1World",
".",
"getBlockId",
"(",
"l1",
",",
"k2",
",",
"j1",
")",
";",
"if",
"(",
"j3",
">",
"0",
"&&",
"Block",
".",
"blocksList",
"[",
"j3",
"]",
".",
"blockMaterial",
".",
"isLiquid",
"(",
")",
")",
"{",
"return",
"true",
";",
"}",
"}",
"}",
"for",
"(",
"int",
"i2",
"=",
"k",
";",
"i2",
"<=",
"j1",
";",
"i2",
"++",
")",
"{",
"for",
"(",
"int",
"l2",
"=",
"j",
";",
"l2",
"<=",
"i1",
";",
"l2",
"++",
")",
"{",
"int",
"k3",
"=",
"par1World",
".",
"getBlockId",
"(",
"i",
",",
"l2",
",",
"i2",
")",
";",
"if",
"(",
"k3",
">",
"0",
"&&",
"Block",
".",
"blocksList",
"[",
"k3",
"]",
".",
"blockMaterial",
".",
"isLiquid",
"(",
")",
")",
"{",
"return",
"true",
";",
"}",
"k3",
"=",
"par1World",
".",
"getBlockId",
"(",
"l",
",",
"l2",
",",
"i2",
")",
";",
"if",
"(",
"k3",
">",
"0",
"&&",
"Block",
".",
"blocksList",
"[",
"k3",
"]",
".",
"blockMaterial",
".",
"isLiquid",
"(",
")",
")",
"{",
"return",
"true",
";",
"}",
"}",
"}",
"return",
"false",
";",
"}",
"protected",
"int",
"getXWithOffset",
"(",
"int",
"par1",
",",
"int",
"par2",
")",
"{",
"switch",
"(",
"coordBaseMode",
")",
"{",
"case",
"0",
":",
"case",
"2",
":",
"return",
"boundingBox",
".",
"minX",
"+",
"par1",
";",
"case",
"1",
":",
"return",
"boundingBox",
".",
"maxX",
"-",
"par2",
";",
"case",
"3",
":",
"return",
"boundingBox",
".",
"minX",
"+",
"par2",
";",
"}",
"return",
"par1",
";",
"}",
"protected",
"int",
"getYWithOffset",
"(",
"int",
"par1",
")",
"{",
"if",
"(",
"coordBaseMode",
"==",
"-",
"1",
")",
"{",
"return",
"par1",
";",
"}",
"else",
"{",
"return",
"par1",
"+",
"boundingBox",
".",
"minY",
";",
"}",
"}",
"protected",
"int",
"getZWithOffset",
"(",
"int",
"par1",
",",
"int",
"par2",
")",
"{",
"switch",
"(",
"coordBaseMode",
")",
"{",
"case",
"2",
":",
"return",
"boundingBox",
".",
"maxZ",
"-",
"par2",
";",
"case",
"0",
":",
"return",
"boundingBox",
".",
"minZ",
"+",
"par2",
";",
"case",
"1",
":",
"case",
"3",
":",
"return",
"boundingBox",
".",
"minZ",
"+",
"par1",
";",
"}",
"return",
"par2",
";",
"}",
"protected",
"int",
"getMetadataWithOffset",
"(",
"int",
"par1",
",",
"int",
"par2",
")",
"{",
"if",
"(",
"par1",
"==",
"Block",
".",
"rail",
".",
"blockID",
")",
"{",
"if",
"(",
"coordBaseMode",
"==",
"1",
"||",
"coordBaseMode",
"==",
"3",
")",
"{",
"return",
"par2",
"!=",
"1",
"?",
"1",
":",
"0",
";",
"}",
"}",
"else",
"if",
"(",
"par1",
"==",
"Block",
".",
"doorWood",
".",
"blockID",
"||",
"par1",
"==",
"Block",
".",
"doorSteel",
".",
"blockID",
")",
"{",
"if",
"(",
"coordBaseMode",
"==",
"0",
")",
"{",
"if",
"(",
"par2",
"==",
"0",
")",
"{",
"return",
"2",
";",
"}",
"if",
"(",
"par2",
"==",
"2",
")",
"{",
"return",
"0",
";",
"}",
"}",
"else",
"{",
"if",
"(",
"coordBaseMode",
"==",
"1",
")",
"{",
"return",
"par2",
"+",
"1",
"&",
"3",
";",
"}",
"if",
"(",
"coordBaseMode",
"==",
"3",
")",
"{",
"return",
"par2",
"+",
"3",
"&",
"3",
";",
"}",
"}",
"}",
"else",
"if",
"(",
"par1",
"==",
"Block",
".",
"stairCompactCobblestone",
".",
"blockID",
"||",
"par1",
"==",
"Block",
".",
"stairCompactPlanks",
".",
"blockID",
"||",
"par1",
"==",
"Block",
".",
"stairsNetherBrick",
".",
"blockID",
"||",
"par1",
"==",
"Block",
".",
"stairsStoneBrickSmooth",
".",
"blockID",
")",
"{",
"if",
"(",
"coordBaseMode",
"==",
"0",
")",
"{",
"if",
"(",
"par2",
"==",
"2",
")",
"{",
"return",
"3",
";",
"}",
"if",
"(",
"par2",
"==",
"3",
")",
"{",
"return",
"2",
";",
"}",
"}",
"else",
"if",
"(",
"coordBaseMode",
"==",
"1",
")",
"{",
"if",
"(",
"par2",
"==",
"0",
")",
"{",
"return",
"2",
";",
"}",
"if",
"(",
"par2",
"==",
"1",
")",
"{",
"return",
"3",
";",
"}",
"if",
"(",
"par2",
"==",
"2",
")",
"{",
"return",
"0",
";",
"}",
"if",
"(",
"par2",
"==",
"3",
")",
"{",
"return",
"1",
";",
"}",
"}",
"else",
"if",
"(",
"coordBaseMode",
"==",
"3",
")",
"{",
"if",
"(",
"par2",
"==",
"0",
")",
"{",
"return",
"2",
";",
"}",
"if",
"(",
"par2",
"==",
"1",
")",
"{",
"return",
"3",
";",
"}",
"if",
"(",
"par2",
"==",
"2",
")",
"{",
"return",
"1",
";",
"}",
"if",
"(",
"par2",
"==",
"3",
")",
"{",
"return",
"0",
";",
"}",
"}",
"}",
"else",
"if",
"(",
"par1",
"==",
"Block",
".",
"ladder",
".",
"blockID",
")",
"{",
"if",
"(",
"coordBaseMode",
"==",
"0",
")",
"{",
"if",
"(",
"par2",
"==",
"2",
")",
"{",
"return",
"3",
";",
"}",
"if",
"(",
"par2",
"==",
"3",
")",
"{",
"return",
"2",
";",
"}",
"}",
"else",
"if",
"(",
"coordBaseMode",
"==",
"1",
")",
"{",
"if",
"(",
"par2",
"==",
"2",
")",
"{",
"return",
"4",
";",
"}",
"if",
"(",
"par2",
"==",
"3",
")",
"{",
"return",
"5",
";",
"}",
"if",
"(",
"par2",
"==",
"4",
")",
"{",
"return",
"2",
";",
"}",
"if",
"(",
"par2",
"==",
"5",
")",
"{",
"return",
"3",
";",
"}",
"}",
"else",
"if",
"(",
"coordBaseMode",
"==",
"3",
")",
"{",
"if",
"(",
"par2",
"==",
"2",
")",
"{",
"return",
"5",
";",
"}",
"if",
"(",
"par2",
"==",
"3",
")",
"{",
"return",
"4",
";",
"}",
"if",
"(",
"par2",
"==",
"4",
")",
"{",
"return",
"2",
";",
"}",
"if",
"(",
"par2",
"==",
"5",
")",
"{",
"return",
"3",
";",
"}",
"}",
"}",
"else",
"if",
"(",
"par1",
"==",
"Block",
".",
"button",
".",
"blockID",
")",
"{",
"if",
"(",
"coordBaseMode",
"==",
"0",
")",
"{",
"if",
"(",
"par2",
"==",
"3",
")",
"{",
"return",
"4",
";",
"}",
"if",
"(",
"par2",
"==",
"4",
")",
"{",
"return",
"3",
";",
"}",
"}",
"else",
"if",
"(",
"coordBaseMode",
"==",
"1",
")",
"{",
"if",
"(",
"par2",
"==",
"3",
")",
"{",
"return",
"1",
";",
"}",
"if",
"(",
"par2",
"==",
"4",
")",
"{",
"return",
"2",
";",
"}",
"if",
"(",
"par2",
"==",
"2",
")",
"{",
"return",
"3",
";",
"}",
"if",
"(",
"par2",
"==",
"1",
")",
"{",
"return",
"4",
";",
"}",
"}",
"else",
"if",
"(",
"coordBaseMode",
"==",
"3",
")",
"{",
"if",
"(",
"par2",
"==",
"3",
")",
"{",
"return",
"2",
";",
"}",
"if",
"(",
"par2",
"==",
"4",
")",
"{",
"return",
"1",
";",
"}",
"if",
"(",
"par2",
"==",
"2",
")",
"{",
"return",
"3",
";",
"}",
"if",
"(",
"par2",
"==",
"1",
")",
"{",
"return",
"4",
";",
"}",
"}",
"}",
"return",
"par2",
";",
"}",
"protected",
"void",
"placeBlockAtCurrentPosition",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
",",
"int",
"par6",
",",
"StructureBoundingBox",
"par7StructureBoundingBox",
")",
"{",
"int",
"i",
"=",
"getXWithOffset",
"(",
"par4",
",",
"par6",
")",
";",
"int",
"j",
"=",
"getYWithOffset",
"(",
"par5",
")",
";",
"int",
"k",
"=",
"getZWithOffset",
"(",
"par4",
",",
"par6",
")",
";",
"if",
"(",
"!",
"par7StructureBoundingBox",
".",
"isVecInside",
"(",
"i",
",",
"j",
",",
"k",
")",
")",
"{",
"return",
";",
"}",
"else",
"{",
"par1World",
".",
"setBlockAndMetadata",
"(",
"i",
",",
"j",
",",
"k",
",",
"par2",
",",
"par3",
")",
";",
"return",
";",
"}",
"}",
"protected",
"int",
"getBlockIdAtCurrentPosition",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"StructureBoundingBox",
"par5StructureBoundingBox",
")",
"{",
"int",
"i",
"=",
"getXWithOffset",
"(",
"par2",
",",
"par4",
")",
";",
"int",
"j",
"=",
"getYWithOffset",
"(",
"par3",
")",
";",
"int",
"k",
"=",
"getZWithOffset",
"(",
"par2",
",",
"par4",
")",
";",
"if",
"(",
"!",
"par5StructureBoundingBox",
".",
"isVecInside",
"(",
"i",
",",
"j",
",",
"k",
")",
")",
"{",
"return",
"0",
";",
"}",
"else",
"{",
"return",
"par1World",
".",
"getBlockId",
"(",
"i",
",",
"j",
",",
"k",
")",
";",
"}",
"}",
"protected",
"void",
"fillWithBlocks",
"(",
"World",
"par1World",
",",
"StructureBoundingBox",
"par2StructureBoundingBox",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
",",
"int",
"par6",
",",
"int",
"par7",
",",
"int",
"par8",
",",
"int",
"par9",
",",
"int",
"par10",
",",
"boolean",
"par11",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"par4",
";",
"i",
"<=",
"par7",
";",
"i",
"++",
")",
"{",
"for",
"(",
"int",
"j",
"=",
"par3",
";",
"j",
"<=",
"par6",
";",
"j",
"++",
")",
"{",
"for",
"(",
"int",
"k",
"=",
"par5",
";",
"k",
"<=",
"par8",
";",
"k",
"++",
")",
"{",
"if",
"(",
"par11",
"&&",
"getBlockIdAtCurrentPosition",
"(",
"par1World",
",",
"j",
",",
"i",
",",
"k",
",",
"par2StructureBoundingBox",
")",
"==",
"0",
")",
"{",
"continue",
";",
"}",
"if",
"(",
"i",
"==",
"par4",
"||",
"i",
"==",
"par7",
"||",
"j",
"==",
"par3",
"||",
"j",
"==",
"par6",
"||",
"k",
"==",
"par5",
"||",
"k",
"==",
"par8",
")",
"{",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"par9",
",",
"0",
",",
"j",
",",
"i",
",",
"k",
",",
"par2StructureBoundingBox",
")",
";",
"}",
"else",
"{",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"par10",
",",
"0",
",",
"j",
",",
"i",
",",
"k",
",",
"par2StructureBoundingBox",
")",
";",
"}",
"}",
"}",
"}",
"}",
"protected",
"void",
"fillWithRandomizedBlocks",
"(",
"World",
"par1World",
",",
"StructureBoundingBox",
"par2StructureBoundingBox",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
",",
"int",
"par6",
",",
"int",
"par7",
",",
"int",
"par8",
",",
"boolean",
"par9",
",",
"Random",
"par10Random",
",",
"StructurePieceBlockSelector",
"par11StructurePieceBlockSelector",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"par4",
";",
"i",
"<=",
"par7",
";",
"i",
"++",
")",
"{",
"for",
"(",
"int",
"j",
"=",
"par3",
";",
"j",
"<=",
"par6",
";",
"j",
"++",
")",
"{",
"for",
"(",
"int",
"k",
"=",
"par5",
";",
"k",
"<=",
"par8",
";",
"k",
"++",
")",
"{",
"if",
"(",
"!",
"par9",
"||",
"getBlockIdAtCurrentPosition",
"(",
"par1World",
",",
"j",
",",
"i",
",",
"k",
",",
"par2StructureBoundingBox",
")",
"!=",
"0",
")",
"{",
"par11StructurePieceBlockSelector",
".",
"selectBlocks",
"(",
"par10Random",
",",
"j",
",",
"i",
",",
"k",
",",
"i",
"==",
"par4",
"||",
"i",
"==",
"par7",
"||",
"j",
"==",
"par3",
"||",
"j",
"==",
"par6",
"||",
"k",
"==",
"par5",
"||",
"k",
"==",
"par8",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"par11StructurePieceBlockSelector",
".",
"getSelectedBlockId",
"(",
")",
",",
"par11StructurePieceBlockSelector",
".",
"getSelectedBlockMetaData",
"(",
")",
",",
"j",
",",
"i",
",",
"k",
",",
"par2StructureBoundingBox",
")",
";",
"}",
"}",
"}",
"}",
"}",
"protected",
"void",
"randomlyFillWithBlocks",
"(",
"World",
"par1World",
",",
"StructureBoundingBox",
"par2StructureBoundingBox",
",",
"Random",
"par3Random",
",",
"float",
"par4",
",",
"int",
"par5",
",",
"int",
"par6",
",",
"int",
"par7",
",",
"int",
"par8",
",",
"int",
"par9",
",",
"int",
"par10",
",",
"int",
"par11",
",",
"int",
"par12",
",",
"boolean",
"par13",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"par6",
";",
"i",
"<=",
"par9",
";",
"i",
"++",
")",
"{",
"for",
"(",
"int",
"j",
"=",
"par5",
";",
"j",
"<=",
"par8",
";",
"j",
"++",
")",
"{",
"for",
"(",
"int",
"k",
"=",
"par7",
";",
"k",
"<=",
"par10",
";",
"k",
"++",
")",
"{",
"if",
"(",
"par3Random",
".",
"nextFloat",
"(",
")",
">",
"par4",
"||",
"par13",
"&&",
"getBlockIdAtCurrentPosition",
"(",
"par1World",
",",
"j",
",",
"i",
",",
"k",
",",
"par2StructureBoundingBox",
")",
"==",
"0",
")",
"{",
"continue",
";",
"}",
"if",
"(",
"i",
"==",
"par6",
"||",
"i",
"==",
"par9",
"||",
"j",
"==",
"par5",
"||",
"j",
"==",
"par8",
"||",
"k",
"==",
"par7",
"||",
"k",
"==",
"par10",
")",
"{",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"par11",
",",
"0",
",",
"j",
",",
"i",
",",
"k",
",",
"par2StructureBoundingBox",
")",
";",
"}",
"else",
"{",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"par12",
",",
"0",
",",
"j",
",",
"i",
",",
"k",
",",
"par2StructureBoundingBox",
")",
";",
"}",
"}",
"}",
"}",
"}",
"protected",
"void",
"randomlyPlaceBlock",
"(",
"World",
"par1World",
",",
"StructureBoundingBox",
"par2StructureBoundingBox",
",",
"Random",
"par3Random",
",",
"float",
"par4",
",",
"int",
"par5",
",",
"int",
"par6",
",",
"int",
"par7",
",",
"int",
"par8",
",",
"int",
"par9",
")",
"{",
"if",
"(",
"par3Random",
".",
"nextFloat",
"(",
")",
"<",
"par4",
")",
"{",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"par8",
",",
"par9",
",",
"par5",
",",
"par6",
",",
"par7",
",",
"par2StructureBoundingBox",
")",
";",
"}",
"}",
"protected",
"void",
"randomlyRareFillWithBlocks",
"(",
"World",
"par1World",
",",
"StructureBoundingBox",
"par2StructureBoundingBox",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
",",
"int",
"par6",
",",
"int",
"par7",
",",
"int",
"par8",
",",
"int",
"par9",
",",
"boolean",
"par10",
")",
"{",
"float",
"f",
"=",
"(",
"par6",
"-",
"par3",
")",
"+",
"1",
";",
"float",
"f1",
"=",
"(",
"par7",
"-",
"par4",
")",
"+",
"1",
";",
"float",
"f2",
"=",
"(",
"par8",
"-",
"par5",
")",
"+",
"1",
";",
"float",
"f3",
"=",
"(",
"float",
")",
"par3",
"+",
"f",
"/",
"2.0F",
";",
"float",
"f4",
"=",
"(",
"float",
")",
"par5",
"+",
"f2",
"/",
"2.0F",
";",
"for",
"(",
"int",
"i",
"=",
"par4",
";",
"i",
"<=",
"par7",
";",
"i",
"++",
")",
"{",
"float",
"f5",
"=",
"(",
"float",
")",
"(",
"i",
"-",
"par4",
")",
"/",
"f1",
";",
"for",
"(",
"int",
"j",
"=",
"par3",
";",
"j",
"<=",
"par6",
";",
"j",
"++",
")",
"{",
"float",
"f6",
"=",
"(",
"(",
"float",
")",
"j",
"-",
"f3",
")",
"/",
"(",
"f",
"*",
"0.5F",
")",
";",
"for",
"(",
"int",
"k",
"=",
"par5",
";",
"k",
"<=",
"par8",
";",
"k",
"++",
")",
"{",
"float",
"f7",
"=",
"(",
"(",
"float",
")",
"k",
"-",
"f4",
")",
"/",
"(",
"f2",
"*",
"0.5F",
")",
";",
"if",
"(",
"par10",
"&&",
"getBlockIdAtCurrentPosition",
"(",
"par1World",
",",
"j",
",",
"i",
",",
"k",
",",
"par2StructureBoundingBox",
")",
"==",
"0",
")",
"{",
"continue",
";",
"}",
"float",
"f8",
"=",
"f6",
"*",
"f6",
"+",
"f5",
"*",
"f5",
"+",
"f7",
"*",
"f7",
";",
"if",
"(",
"f8",
"<=",
"1.05F",
")",
"{",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"par9",
",",
"0",
",",
"j",
",",
"i",
",",
"k",
",",
"par2StructureBoundingBox",
")",
";",
"}",
"}",
"}",
"}",
"}",
"protected",
"void",
"clearCurrentPositionBlocksUpwards",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"StructureBoundingBox",
"par5StructureBoundingBox",
")",
"{",
"int",
"i",
"=",
"getXWithOffset",
"(",
"par2",
",",
"par4",
")",
";",
"int",
"j",
"=",
"getYWithOffset",
"(",
"par3",
")",
";",
"int",
"k",
"=",
"getZWithOffset",
"(",
"par2",
",",
"par4",
")",
";",
"if",
"(",
"!",
"par5StructureBoundingBox",
".",
"isVecInside",
"(",
"i",
",",
"j",
",",
"k",
")",
")",
"{",
"return",
";",
"}",
"for",
"(",
";",
"!",
"par1World",
".",
"isAirBlock",
"(",
"i",
",",
"j",
",",
"k",
")",
"&&",
"j",
"<",
"255",
";",
"j",
"++",
")",
"{",
"par1World",
".",
"setBlockAndMetadata",
"(",
"i",
",",
"j",
",",
"k",
",",
"0",
",",
"0",
")",
";",
"}",
"}",
"protected",
"void",
"fillCurrentPositionBlocksDownwards",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
",",
"int",
"par6",
",",
"StructureBoundingBox",
"par7StructureBoundingBox",
")",
"{",
"int",
"i",
"=",
"getXWithOffset",
"(",
"par4",
",",
"par6",
")",
";",
"int",
"j",
"=",
"getYWithOffset",
"(",
"par5",
")",
";",
"int",
"k",
"=",
"getZWithOffset",
"(",
"par4",
",",
"par6",
")",
";",
"if",
"(",
"!",
"par7StructureBoundingBox",
".",
"isVecInside",
"(",
"i",
",",
"j",
",",
"k",
")",
")",
"{",
"return",
";",
"}",
"for",
"(",
";",
"(",
"par1World",
".",
"isAirBlock",
"(",
"i",
",",
"j",
",",
"k",
")",
"||",
"par1World",
".",
"getBlockMaterial",
"(",
"i",
",",
"j",
",",
"k",
")",
".",
"isLiquid",
"(",
")",
")",
"&&",
"j",
">",
"1",
";",
"j",
"--",
")",
"{",
"par1World",
".",
"setBlockAndMetadata",
"(",
"i",
",",
"j",
",",
"k",
",",
"par2",
",",
"par3",
")",
";",
"}",
"}",
"protected",
"void",
"createTreasureChestAtCurrentPosition",
"(",
"World",
"par1World",
",",
"StructureBoundingBox",
"par2StructureBoundingBox",
",",
"Random",
"par3Random",
",",
"int",
"par4",
",",
"int",
"par5",
",",
"int",
"par6",
",",
"StructurePieceTreasure",
"par7ArrayOfStructurePieceTreasure",
"[",
"]",
",",
"int",
"par8",
")",
"{",
"int",
"i",
"=",
"getXWithOffset",
"(",
"par4",
",",
"par6",
")",
";",
"int",
"j",
"=",
"getYWithOffset",
"(",
"par5",
")",
";",
"int",
"k",
"=",
"getZWithOffset",
"(",
"par4",
",",
"par6",
")",
";",
"if",
"(",
"par2StructureBoundingBox",
".",
"isVecInside",
"(",
"i",
",",
"j",
",",
"k",
")",
"&&",
"par1World",
".",
"getBlockId",
"(",
"i",
",",
"j",
",",
"k",
")",
"!=",
"Block",
".",
"chest",
".",
"blockID",
")",
"{",
"par1World",
".",
"setBlockWithNotify",
"(",
"i",
",",
"j",
",",
"k",
",",
"Block",
".",
"chest",
".",
"blockID",
")",
";",
"TileEntityChest",
"tileentitychest",
"=",
"(",
"TileEntityChest",
")",
"par1World",
".",
"getBlockTileEntity",
"(",
"i",
",",
"j",
",",
"k",
")",
";",
"if",
"(",
"tileentitychest",
"!=",
"null",
")",
"{",
"fillTreasureChestWithLoot",
"(",
"par3Random",
",",
"par7ArrayOfStructurePieceTreasure",
",",
"tileentitychest",
",",
"par8",
")",
";",
"}",
"}",
"}",
"private",
"static",
"void",
"fillTreasureChestWithLoot",
"(",
"Random",
"par0Random",
",",
"StructurePieceTreasure",
"par1ArrayOfStructurePieceTreasure",
"[",
"]",
",",
"TileEntityChest",
"par2TileEntityChest",
",",
"int",
"par3",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"par3",
";",
"i",
"++",
")",
"{",
"StructurePieceTreasure",
"structurepiecetreasure",
"=",
"(",
"StructurePieceTreasure",
")",
"WeightedRandom",
".",
"getRandomItem",
"(",
"par0Random",
",",
"par1ArrayOfStructurePieceTreasure",
")",
";",
"int",
"j",
"=",
"structurepiecetreasure",
".",
"minItemStack",
"+",
"par0Random",
".",
"nextInt",
"(",
"(",
"structurepiecetreasure",
".",
"maxItemStack",
"-",
"structurepiecetreasure",
".",
"minItemStack",
")",
"+",
"1",
")",
";",
"if",
"(",
"Item",
".",
"itemsList",
"[",
"structurepiecetreasure",
".",
"itemID",
"]",
".",
"getItemStackLimit",
"(",
")",
">=",
"j",
")",
"{",
"par2TileEntityChest",
".",
"setInventorySlotContents",
"(",
"par0Random",
".",
"nextInt",
"(",
"par2TileEntityChest",
".",
"getSizeInventory",
"(",
")",
")",
",",
"new",
"ItemStack",
"(",
"structurepiecetreasure",
".",
"itemID",
",",
"j",
",",
"structurepiecetreasure",
".",
"itemMetadata",
")",
")",
";",
"continue",
";",
"}",
"for",
"(",
"int",
"k",
"=",
"0",
";",
"k",
"<",
"j",
";",
"k",
"++",
")",
"{",
"par2TileEntityChest",
".",
"setInventorySlotContents",
"(",
"par0Random",
".",
"nextInt",
"(",
"par2TileEntityChest",
".",
"getSizeInventory",
"(",
")",
")",
",",
"new",
"ItemStack",
"(",
"structurepiecetreasure",
".",
"itemID",
",",
"1",
",",
"structurepiecetreasure",
".",
"itemMetadata",
")",
")",
";",
"}",
"}",
"}",
"protected",
"void",
"placeDoorAtCurrentPosition",
"(",
"World",
"par1World",
",",
"StructureBoundingBox",
"par2StructureBoundingBox",
",",
"Random",
"par3Random",
",",
"int",
"par4",
",",
"int",
"par5",
",",
"int",
"par6",
",",
"int",
"par7",
")",
"{",
"int",
"i",
"=",
"getXWithOffset",
"(",
"par4",
",",
"par6",
")",
";",
"int",
"j",
"=",
"getYWithOffset",
"(",
"par5",
")",
";",
"int",
"k",
"=",
"getZWithOffset",
"(",
"par4",
",",
"par6",
")",
";",
"if",
"(",
"par2StructureBoundingBox",
".",
"isVecInside",
"(",
"i",
",",
"j",
",",
"k",
")",
")",
"{",
"ItemDoor",
".",
"placeDoorBlock",
"(",
"par1World",
",",
"i",
",",
"j",
",",
"k",
",",
"par7",
",",
"Block",
".",
"doorWood",
")",
";",
"}",
"}",
"}",
"</s>"
] |
9,341 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"io",
".",
"*",
";",
"public",
"class",
"NBTTagByte",
"extends",
"NBTBase",
"{",
"public",
"byte",
"data",
";",
"public",
"NBTTagByte",
"(",
"String",
"par1Str",
")",
"{",
"super",
"(",
"par1Str",
")",
";",
"}",
"public",
"NBTTagByte",
"(",
"String",
"par1Str",
",",
"byte",
"par2",
")",
"{",
"super",
"(",
"par1Str",
")",
";",
"data",
"=",
"par2",
";",
"}",
"void",
"write",
"(",
"DataOutput",
"par1DataOutput",
")",
"throws",
"IOException",
"{",
"par1DataOutput",
".",
"writeByte",
"(",
"data",
")",
";",
"}",
"void",
"load",
"(",
"DataInput",
"par1DataInput",
")",
"throws",
"IOException",
"{",
"data",
"=",
"par1DataInput",
".",
"readByte",
"(",
")",
";",
"}",
"public",
"byte",
"getId",
"(",
")",
"{",
"return",
"1",
";",
"}",
"public",
"String",
"toString",
"(",
")",
"{",
"return",
"(",
"new",
"StringBuilder",
"(",
")",
")",
".",
"append",
"(",
"\"\"",
")",
".",
"append",
"(",
"data",
")",
".",
"toString",
"(",
")",
";",
"}",
"public",
"NBTBase",
"copy",
"(",
")",
"{",
"return",
"new",
"NBTTagByte",
"(",
"getName",
"(",
")",
",",
"data",
")",
";",
"}",
"public",
"boolean",
"equals",
"(",
"Object",
"par1Obj",
")",
"{",
"if",
"(",
"super",
".",
"equals",
"(",
"par1Obj",
")",
")",
"{",
"NBTTagByte",
"nbttagbyte",
"=",
"(",
"NBTTagByte",
")",
"par1Obj",
";",
"return",
"data",
"==",
"nbttagbyte",
".",
"data",
";",
"}",
"else",
"{",
"return",
"false",
";",
"}",
"}",
"public",
"int",
"hashCode",
"(",
")",
"{",
"return",
"super",
".",
"hashCode",
"(",
")",
"^",
"data",
";",
"}",
"}",
"</s>"
] |
9,342 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"BlockFlowing",
"extends",
"BlockFluid",
"{",
"int",
"numAdjacentSources",
";",
"boolean",
"isOptimalFlowDirection",
"[",
"]",
";",
"int",
"flowCost",
"[",
"]",
";",
"protected",
"BlockFlowing",
"(",
"int",
"par1",
",",
"Material",
"par2Material",
")",
"{",
"super",
"(",
"par1",
",",
"par2Material",
")",
";",
"numAdjacentSources",
"=",
"0",
";",
"isOptimalFlowDirection",
"=",
"new",
"boolean",
"[",
"4",
"]",
";",
"flowCost",
"=",
"new",
"int",
"[",
"4",
"]",
";",
"}",
"private",
"void",
"updateFlow",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"int",
"i",
"=",
"par1World",
".",
"getBlockMetadata",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"par1World",
".",
"setBlockAndMetadata",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"blockID",
"+",
"1",
",",
"i",
")",
";",
"par1World",
".",
"markBlocksDirty",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"par1World",
".",
"markBlockNeedsUpdate",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"}",
"public",
"boolean",
"getBlocksMovement",
"(",
"IBlockAccess",
"par1IBlockAccess",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"return",
"blockMaterial",
"!=",
"Material",
".",
"lava",
";",
"}",
"public",
"void",
"updateTick",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"Random",
"par5Random",
")",
"{",
"int",
"i",
"=",
"getFlowDecay",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"byte",
"byte0",
"=",
"1",
";",
"if",
"(",
"blockMaterial",
"==",
"Material",
".",
"lava",
"&&",
"!",
"par1World",
".",
"worldProvider",
".",
"isHellWorld",
")",
"{",
"byte0",
"=",
"2",
";",
"}",
"boolean",
"flag",
"=",
"true",
";",
"if",
"(",
"i",
">",
"0",
")",
"{",
"int",
"j",
"=",
"-",
"100",
";",
"numAdjacentSources",
"=",
"0",
";",
"j",
"=",
"getSmallestFlowDecay",
"(",
"par1World",
",",
"par2",
"-",
"1",
",",
"par3",
",",
"par4",
",",
"j",
")",
";",
"j",
"=",
"getSmallestFlowDecay",
"(",
"par1World",
",",
"par2",
"+",
"1",
",",
"par3",
",",
"par4",
",",
"j",
")",
";",
"j",
"=",
"getSmallestFlowDecay",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
"-",
"1",
",",
"j",
")",
";",
"j",
"=",
"getSmallestFlowDecay",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
"+",
"1",
",",
"j",
")",
";",
"int",
"k",
"=",
"j",
"+",
"byte0",
";",
"if",
"(",
"k",
">=",
"8",
"||",
"j",
"<",
"0",
")",
"{",
"k",
"=",
"-",
"1",
";",
"}",
"if",
"(",
"getFlowDecay",
"(",
"par1World",
",",
"par2",
",",
"par3",
"+",
"1",
",",
"par4",
")",
">=",
"0",
")",
"{",
"int",
"i1",
"=",
"getFlowDecay",
"(",
"par1World",
",",
"par2",
",",
"par3",
"+",
"1",
",",
"par4",
")",
";",
"if",
"(",
"i1",
">=",
"8",
")",
"{",
"k",
"=",
"i1",
";",
"}",
"else",
"{",
"k",
"=",
"i1",
"+",
"8",
";",
"}",
"}",
"if",
"(",
"numAdjacentSources",
">=",
"2",
"&&",
"blockMaterial",
"==",
"Material",
".",
"water",
")",
"{",
"if",
"(",
"par1World",
".",
"getBlockMaterial",
"(",
"par2",
",",
"par3",
"-",
"1",
",",
"par4",
")",
".",
"isSolid",
"(",
")",
")",
"{",
"k",
"=",
"0",
";",
"}",
"else",
"if",
"(",
"par1World",
".",
"getBlockMaterial",
"(",
"par2",
",",
"par3",
"-",
"1",
",",
"par4",
")",
"==",
"blockMaterial",
"&&",
"par1World",
".",
"getBlockMetadata",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
"==",
"0",
")",
"{",
"k",
"=",
"0",
";",
"}",
"}",
"if",
"(",
"blockMaterial",
"==",
"Material",
".",
"lava",
"&&",
"i",
"<",
"8",
"&&",
"k",
"<",
"8",
"&&",
"k",
">",
"i",
"&&",
"par5Random",
".",
"nextInt",
"(",
"4",
")",
"!=",
"0",
")",
"{",
"k",
"=",
"i",
";",
"flag",
"=",
"false",
";",
"}",
"if",
"(",
"k",
"!=",
"i",
")",
"{",
"i",
"=",
"k",
";",
"if",
"(",
"i",
"<",
"0",
")",
"{",
"par1World",
".",
"setBlockWithNotify",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"0",
")",
";",
"}",
"else",
"{",
"par1World",
".",
"setBlockMetadataWithNotify",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"i",
")",
";",
"par1World",
".",
"scheduleBlockUpdate",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"blockID",
",",
"tickRate",
"(",
")",
")",
";",
"par1World",
".",
"notifyBlocksOfNeighborChange",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"blockID",
")",
";",
"}",
"}",
"else",
"if",
"(",
"flag",
")",
"{",
"updateFlow",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"}",
"}",
"else",
"{",
"updateFlow",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"}",
"if",
"(",
"liquidCanDisplaceBlock",
"(",
"par1World",
",",
"par2",
",",
"par3",
"-",
"1",
",",
"par4",
")",
")",
"{",
"if",
"(",
"blockMaterial",
"==",
"Material",
".",
"lava",
"&&",
"par1World",
".",
"getBlockMaterial",
"(",
"par2",
",",
"par3",
"-",
"1",
",",
"par4",
")",
"==",
"Material",
".",
"water",
")",
"{",
"par1World",
".",
"setBlockWithNotify",
"(",
"par2",
",",
"par3",
"-",
"1",
",",
"par4",
",",
"Block",
".",
"stone",
".",
"blockID",
")",
";",
"triggerLavaMixEffects",
"(",
"par1World",
",",
"par2",
",",
"par3",
"-",
"1",
",",
"par4",
")",
";",
"return",
";",
"}",
"if",
"(",
"i",
">=",
"8",
")",
"{",
"par1World",
".",
"setBlockAndMetadataWithNotify",
"(",
"par2",
",",
"par3",
"-",
"1",
",",
"par4",
",",
"blockID",
",",
"i",
")",
";",
"}",
"else",
"{",
"par1World",
".",
"setBlockAndMetadataWithNotify",
"(",
"par2",
",",
"par3",
"-",
"1",
",",
"par4",
",",
"blockID",
",",
"i",
"+",
"8",
")",
";",
"}",
"}",
"else",
"if",
"(",
"i",
">=",
"0",
"&&",
"(",
"i",
"==",
"0",
"||",
"blockBlocksFlow",
"(",
"par1World",
",",
"par2",
",",
"par3",
"-",
"1",
",",
"par4",
")",
")",
")",
"{",
"boolean",
"aflag",
"[",
"]",
"=",
"getOptimalFlowDirections",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"int",
"l",
"=",
"i",
"+",
"byte0",
";",
"if",
"(",
"i",
">=",
"8",
")",
"{",
"l",
"=",
"1",
";",
"}",
"if",
"(",
"l",
">=",
"8",
")",
"{",
"return",
";",
"}",
"if",
"(",
"aflag",
"[",
"0",
"]",
")",
"{",
"flowIntoBlock",
"(",
"par1World",
",",
"par2",
"-",
"1",
",",
"par3",
",",
"par4",
",",
"l",
")",
";",
"}",
"if",
"(",
"aflag",
"[",
"1",
"]",
")",
"{",
"flowIntoBlock",
"(",
"par1World",
",",
"par2",
"+",
"1",
",",
"par3",
",",
"par4",
",",
"l",
")",
";",
"}",
"if",
"(",
"aflag",
"[",
"2",
"]",
")",
"{",
"flowIntoBlock",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
"-",
"1",
",",
"l",
")",
";",
"}",
"if",
"(",
"aflag",
"[",
"3",
"]",
")",
"{",
"flowIntoBlock",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
"+",
"1",
",",
"l",
")",
";",
"}",
"}",
"}",
"private",
"void",
"flowIntoBlock",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
")",
"{",
"if",
"(",
"liquidCanDisplaceBlock",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
")",
")",
"{",
"int",
"i",
"=",
"par1World",
".",
"getBlockId",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"if",
"(",
"i",
">",
"0",
")",
"{",
"if",
"(",
"blockMaterial",
"==",
"Material",
".",
"lava",
")",
"{",
"triggerLavaMixEffects",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"}",
"else",
"{",
"Block",
".",
"blocksList",
"[",
"i",
"]",
".",
"dropBlockAsItem",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
",",
"par1World",
".",
"getBlockMetadata",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
",",
"0",
")",
";",
"}",
"}",
"par1World",
".",
"setBlockAndMetadataWithNotify",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"blockID",
",",
"par5",
")",
";",
"}",
"}",
"private",
"int",
"calculateFlowCost",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
",",
"int",
"par6",
")",
"{",
"int",
"i",
"=",
"1000",
";",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
"4",
";",
"j",
"++",
")",
"{",
"if",
"(",
"j",
"==",
"0",
"&&",
"par6",
"==",
"1",
"||",
"j",
"==",
"1",
"&&",
"par6",
"==",
"0",
"||",
"j",
"==",
"2",
"&&",
"par6",
"==",
"3",
"||",
"j",
"==",
"3",
"&&",
"par6",
"==",
"2",
")",
"{",
"continue",
";",
"}",
"int",
"k",
"=",
"par2",
";",
"int",
"l",
"=",
"par3",
";",
"int",
"i1",
"=",
"par4",
";",
"if",
"(",
"j",
"==",
"0",
")",
"{",
"k",
"--",
";",
"}",
"if",
"(",
"j",
"==",
"1",
")",
"{",
"k",
"++",
";",
"}",
"if",
"(",
"j",
"==",
"2",
")",
"{",
"i1",
"--",
";",
"}",
"if",
"(",
"j",
"==",
"3",
")",
"{",
"i1",
"++",
";",
"}",
"if",
"(",
"blockBlocksFlow",
"(",
"par1World",
",",
"k",
",",
"l",
",",
"i1",
")",
"||",
"par1World",
".",
"getBlockMaterial",
"(",
"k",
",",
"l",
",",
"i1",
")",
"==",
"blockMaterial",
"&&",
"par1World",
".",
"getBlockMetadata",
"(",
"k",
",",
"l",
",",
"i1",
")",
"==",
"0",
")",
"{",
"continue",
";",
"}",
"if",
"(",
"!",
"blockBlocksFlow",
"(",
"par1World",
",",
"k",
",",
"l",
"-",
"1",
",",
"i1",
")",
")",
"{",
"return",
"par5",
";",
"}",
"if",
"(",
"par5",
">=",
"4",
")",
"{",
"continue",
";",
"}",
"int",
"j1",
"=",
"calculateFlowCost",
"(",
"par1World",
",",
"k",
",",
"l",
",",
"i1",
",",
"par5",
"+",
"1",
",",
"j",
")",
";",
"if",
"(",
"j1",
"<",
"i",
")",
"{",
"i",
"=",
"j1",
";",
"}",
"}",
"return",
"i",
";",
"}",
"private",
"boolean",
"[",
"]",
"getOptimalFlowDirections",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"4",
";",
"i",
"++",
")",
"{",
"flowCost",
"[",
"i",
"]",
"=",
"1000",
";",
"int",
"k",
"=",
"par2",
";",
"int",
"j1",
"=",
"par3",
";",
"int",
"k1",
"=",
"par4",
";",
"if",
"(",
"i",
"==",
"0",
")",
"{",
"k",
"--",
";",
"}",
"if",
"(",
"i",
"==",
"1",
")",
"{",
"k",
"++",
";",
"}",
"if",
"(",
"i",
"==",
"2",
")",
"{",
"k1",
"--",
";",
"}",
"if",
"(",
"i",
"==",
"3",
")",
"{",
"k1",
"++",
";",
"}",
"if",
"(",
"blockBlocksFlow",
"(",
"par1World",
",",
"k",
",",
"j1",
",",
"k1",
")",
"||",
"par1World",
".",
"getBlockMaterial",
"(",
"k",
",",
"j1",
",",
"k1",
")",
"==",
"blockMaterial",
"&&",
"par1World",
".",
"getBlockMetadata",
"(",
"k",
",",
"j1",
",",
"k1",
")",
"==",
"0",
")",
"{",
"continue",
";",
"}",
"if",
"(",
"!",
"blockBlocksFlow",
"(",
"par1World",
",",
"k",
",",
"j1",
"-",
"1",
",",
"k1",
")",
")",
"{",
"flowCost",
"[",
"i",
"]",
"=",
"0",
";",
"}",
"else",
"{",
"flowCost",
"[",
"i",
"]",
"=",
"calculateFlowCost",
"(",
"par1World",
",",
"k",
",",
"j1",
",",
"k1",
",",
"1",
",",
"i",
")",
";",
"}",
"}",
"int",
"j",
"=",
"flowCost",
"[",
"0",
"]",
";",
"for",
"(",
"int",
"l",
"=",
"1",
";",
"l",
"<",
"4",
";",
"l",
"++",
")",
"{",
"if",
"(",
"flowCost",
"[",
"l",
"]",
"<",
"j",
")",
"{",
"j",
"=",
"flowCost",
"[",
"l",
"]",
";",
"}",
"}",
"for",
"(",
"int",
"i1",
"=",
"0",
";",
"i1",
"<",
"4",
";",
"i1",
"++",
")",
"{",
"isOptimalFlowDirection",
"[",
"i1",
"]",
"=",
"flowCost",
"[",
"i1",
"]",
"==",
"j",
";",
"}",
"return",
"isOptimalFlowDirection",
";",
"}",
"private",
"boolean",
"blockBlocksFlow",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"int",
"i",
"=",
"par1World",
".",
"getBlockId",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"if",
"(",
"i",
"==",
"Block",
".",
"doorWood",
".",
"blockID",
"||",
"i",
"==",
"Block",
".",
"doorSteel",
".",
"blockID",
"||",
"i",
"==",
"Block",
".",
"signPost",
".",
"blockID",
"||",
"i",
"==",
"Block",
".",
"ladder",
".",
"blockID",
"||",
"i",
"==",
"Block",
".",
"reed",
".",
"blockID",
")",
"{",
"return",
"true",
";",
"}",
"if",
"(",
"i",
"==",
"0",
")",
"{",
"return",
"false",
";",
"}",
"Material",
"material",
"=",
"Block",
".",
"blocksList",
"[",
"i",
"]",
".",
"blockMaterial",
";",
"if",
"(",
"material",
"==",
"Material",
".",
"portal",
")",
"{",
"return",
"true",
";",
"}",
"return",
"material",
".",
"blocksMovement",
"(",
")",
";",
"}",
"protected",
"int",
"getSmallestFlowDecay",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
")",
"{",
"int",
"i",
"=",
"getFlowDecay",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"if",
"(",
"i",
"<",
"0",
")",
"{",
"return",
"par5",
";",
"}",
"if",
"(",
"i",
"==",
"0",
")",
"{",
"numAdjacentSources",
"++",
";",
"}",
"if",
"(",
"i",
">=",
"8",
")",
"{",
"i",
"=",
"0",
";",
"}",
"return",
"par5",
">=",
"0",
"&&",
"i",
">=",
"par5",
"?",
"par5",
":",
"i",
";",
"}",
"private",
"boolean",
"liquidCanDisplaceBlock",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"Material",
"material",
"=",
"par1World",
".",
"getBlockMaterial",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"if",
"(",
"material",
"==",
"blockMaterial",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"material",
"==",
"Material",
".",
"lava",
")",
"{",
"return",
"false",
";",
"}",
"else",
"{",
"return",
"!",
"blockBlocksFlow",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"}",
"}",
"public",
"void",
"onBlockAdded",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"super",
".",
"onBlockAdded",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"if",
"(",
"par1World",
".",
"getBlockId",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
"==",
"blockID",
")",
"{",
"par1World",
".",
"scheduleBlockUpdate",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"blockID",
",",
"tickRate",
"(",
")",
")",
";",
"}",
"}",
"}",
"</s>"
] |
9,343 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"abstract",
"class",
"EntityAIBase",
"{",
"private",
"int",
"mutexBits",
";",
"public",
"EntityAIBase",
"(",
")",
"{",
"mutexBits",
"=",
"0",
";",
"}",
"public",
"abstract",
"boolean",
"shouldExecute",
"(",
")",
";",
"public",
"boolean",
"continueExecuting",
"(",
")",
"{",
"return",
"shouldExecute",
"(",
")",
";",
"}",
"public",
"boolean",
"isContinuous",
"(",
")",
"{",
"return",
"true",
";",
"}",
"public",
"void",
"startExecuting",
"(",
")",
"{",
"}",
"public",
"void",
"resetTask",
"(",
")",
"{",
"}",
"public",
"void",
"updateTask",
"(",
")",
"{",
"}",
"public",
"void",
"setMutexBits",
"(",
"int",
"par1",
")",
"{",
"mutexBits",
"=",
"par1",
";",
"}",
"public",
"int",
"getMutexBits",
"(",
")",
"{",
"return",
"mutexBits",
";",
"}",
"}",
"</s>"
] |
9,344 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"class",
"PathEntity",
"{",
"private",
"final",
"PathPoint",
"points",
"[",
"]",
";",
"private",
"int",
"currentPathIndex",
";",
"private",
"int",
"pathLength",
";",
"public",
"PathEntity",
"(",
"PathPoint",
"par1ArrayOfPathPoint",
"[",
"]",
")",
"{",
"points",
"=",
"par1ArrayOfPathPoint",
";",
"pathLength",
"=",
"par1ArrayOfPathPoint",
".",
"length",
";",
"}",
"public",
"void",
"incrementPathIndex",
"(",
")",
"{",
"currentPathIndex",
"++",
";",
"}",
"public",
"boolean",
"isFinished",
"(",
")",
"{",
"return",
"currentPathIndex",
">=",
"pathLength",
";",
"}",
"public",
"PathPoint",
"getFinalPathPoint",
"(",
")",
"{",
"if",
"(",
"pathLength",
">",
"0",
")",
"{",
"return",
"points",
"[",
"pathLength",
"-",
"1",
"]",
";",
"}",
"else",
"{",
"return",
"null",
";",
"}",
"}",
"public",
"PathPoint",
"getPathPointFromIndex",
"(",
"int",
"par1",
")",
"{",
"return",
"points",
"[",
"par1",
"]",
";",
"}",
"public",
"int",
"getCurrentPathLength",
"(",
")",
"{",
"return",
"pathLength",
";",
"}",
"public",
"void",
"setCurrentPathLength",
"(",
"int",
"par1",
")",
"{",
"pathLength",
"=",
"par1",
";",
"}",
"public",
"int",
"getCurrentPathIndex",
"(",
")",
"{",
"return",
"currentPathIndex",
";",
"}",
"public",
"void",
"setCurrentPathIndex",
"(",
"int",
"par1",
")",
"{",
"currentPathIndex",
"=",
"par1",
";",
"}",
"public",
"Vec3D",
"getVectorFromIndex",
"(",
"Entity",
"par1Entity",
",",
"int",
"par2",
")",
"{",
"double",
"d",
"=",
"(",
"double",
")",
"points",
"[",
"par2",
"]",
".",
"xCoord",
"+",
"(",
"double",
")",
"(",
"int",
")",
"(",
"par1Entity",
".",
"width",
"+",
"1.0F",
")",
"*",
"0.5D",
";",
"double",
"d1",
"=",
"points",
"[",
"par2",
"]",
".",
"yCoord",
";",
"double",
"d2",
"=",
"(",
"double",
")",
"points",
"[",
"par2",
"]",
".",
"zCoord",
"+",
"(",
"double",
")",
"(",
"int",
")",
"(",
"par1Entity",
".",
"width",
"+",
"1.0F",
")",
"*",
"0.5D",
";",
"return",
"Vec3D",
".",
"createVector",
"(",
"d",
",",
"d1",
",",
"d2",
")",
";",
"}",
"public",
"Vec3D",
"getPosition",
"(",
"Entity",
"par1Entity",
")",
"{",
"return",
"getVectorFromIndex",
"(",
"par1Entity",
",",
"currentPathIndex",
")",
";",
"}",
"public",
"boolean",
"func_48427_a",
"(",
"PathEntity",
"par1PathEntity",
")",
"{",
"if",
"(",
"par1PathEntity",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"par1PathEntity",
".",
"points",
".",
"length",
"!=",
"points",
".",
"length",
")",
"{",
"return",
"false",
";",
"}",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"points",
".",
"length",
";",
"i",
"++",
")",
"{",
"if",
"(",
"points",
"[",
"i",
"]",
".",
"xCoord",
"!=",
"par1PathEntity",
".",
"points",
"[",
"i",
"]",
".",
"xCoord",
"||",
"points",
"[",
"i",
"]",
".",
"yCoord",
"!=",
"par1PathEntity",
".",
"points",
"[",
"i",
"]",
".",
"yCoord",
"||",
"points",
"[",
"i",
"]",
".",
"zCoord",
"!=",
"par1PathEntity",
".",
"points",
"[",
"i",
"]",
".",
"zCoord",
")",
"{",
"return",
"false",
";",
"}",
"}",
"return",
"true",
";",
"}",
"public",
"boolean",
"func_48426_a",
"(",
"Vec3D",
"par1Vec3D",
")",
"{",
"PathPoint",
"pathpoint",
"=",
"getFinalPathPoint",
"(",
")",
";",
"if",
"(",
"pathpoint",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"else",
"{",
"return",
"pathpoint",
".",
"xCoord",
"==",
"(",
"int",
")",
"par1Vec3D",
".",
"xCoord",
"&&",
"pathpoint",
".",
"zCoord",
"==",
"(",
"int",
")",
"par1Vec3D",
".",
"zCoord",
";",
"}",
"}",
"}",
"</s>"
] |
9,345 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"abstract",
"class",
"EntityCreature",
"extends",
"EntityLiving",
"{",
"private",
"PathEntity",
"pathToEntity",
";",
"protected",
"Entity",
"entityToAttack",
";",
"protected",
"boolean",
"hasAttacked",
";",
"protected",
"int",
"fleeingTick",
";",
"public",
"EntityCreature",
"(",
"World",
"par1World",
")",
"{",
"super",
"(",
"par1World",
")",
";",
"hasAttacked",
"=",
"false",
";",
"fleeingTick",
"=",
"0",
";",
"}",
"protected",
"boolean",
"isMovementCeased",
"(",
")",
"{",
"return",
"false",
";",
"}",
"protected",
"void",
"updateEntityActionState",
"(",
")",
"{",
"Profiler",
".",
"startSection",
"(",
"\"ai\"",
")",
";",
"if",
"(",
"fleeingTick",
">",
"0",
")",
"{",
"fleeingTick",
"--",
";",
"}",
"hasAttacked",
"=",
"isMovementCeased",
"(",
")",
";",
"float",
"f",
"=",
"16F",
";",
"if",
"(",
"entityToAttack",
"==",
"null",
")",
"{",
"entityToAttack",
"=",
"findPlayerToAttack",
"(",
")",
";",
"if",
"(",
"entityToAttack",
"!=",
"null",
")",
"{",
"pathToEntity",
"=",
"worldObj",
".",
"getPathEntityToEntity",
"(",
"this",
",",
"entityToAttack",
",",
"f",
",",
"true",
",",
"false",
",",
"false",
",",
"true",
")",
";",
"}",
"}",
"else",
"if",
"(",
"!",
"entityToAttack",
".",
"isEntityAlive",
"(",
")",
")",
"{",
"entityToAttack",
"=",
"null",
";",
"}",
"else",
"{",
"float",
"f1",
"=",
"entityToAttack",
".",
"getDistanceToEntity",
"(",
"this",
")",
";",
"if",
"(",
"canEntityBeSeen",
"(",
"entityToAttack",
")",
")",
"{",
"attackEntity",
"(",
"entityToAttack",
",",
"f1",
")",
";",
"}",
"else",
"{",
"attackBlockedEntity",
"(",
"entityToAttack",
",",
"f1",
")",
";",
"}",
"}",
"Profiler",
".",
"endSection",
"(",
")",
";",
"if",
"(",
"!",
"hasAttacked",
"&&",
"entityToAttack",
"!=",
"null",
"&&",
"(",
"pathToEntity",
"==",
"null",
"||",
"rand",
".",
"nextInt",
"(",
"20",
")",
"==",
"0",
")",
")",
"{",
"pathToEntity",
"=",
"worldObj",
".",
"getPathEntityToEntity",
"(",
"this",
",",
"entityToAttack",
",",
"f",
",",
"true",
",",
"false",
",",
"false",
",",
"true",
")",
";",
"}",
"else",
"if",
"(",
"!",
"hasAttacked",
"&&",
"(",
"pathToEntity",
"==",
"null",
"&&",
"rand",
".",
"nextInt",
"(",
"180",
")",
"==",
"0",
"||",
"rand",
".",
"nextInt",
"(",
"120",
")",
"==",
"0",
"||",
"fleeingTick",
">",
"0",
")",
"&&",
"entityAge",
"<",
"100",
")",
"{",
"updateWanderPath",
"(",
")",
";",
"}",
"int",
"i",
"=",
"MathHelper",
".",
"floor_double",
"(",
"boundingBox",
".",
"minY",
"+",
"0.5D",
")",
";",
"boolean",
"flag",
"=",
"isInWater",
"(",
")",
";",
"boolean",
"flag1",
"=",
"handleLavaMovement",
"(",
")",
";",
"rotationPitch",
"=",
"0.0F",
";",
"if",
"(",
"pathToEntity",
"==",
"null",
"||",
"rand",
".",
"nextInt",
"(",
"100",
")",
"==",
"0",
")",
"{",
"super",
".",
"updateEntityActionState",
"(",
")",
";",
"pathToEntity",
"=",
"null",
";",
"return",
";",
"}",
"Profiler",
".",
"startSection",
"(",
"\"followpath\"",
")",
";",
"Vec3D",
"vec3d",
"=",
"pathToEntity",
".",
"getPosition",
"(",
"this",
")",
";",
"for",
"(",
"double",
"d",
"=",
"width",
"*",
"2.0F",
";",
"vec3d",
"!=",
"null",
"&&",
"vec3d",
".",
"squareDistanceTo",
"(",
"posX",
",",
"vec3d",
".",
"yCoord",
",",
"posZ",
")",
"<",
"d",
"*",
"d",
";",
")",
"{",
"pathToEntity",
".",
"incrementPathIndex",
"(",
")",
";",
"if",
"(",
"pathToEntity",
".",
"isFinished",
"(",
")",
")",
"{",
"vec3d",
"=",
"null",
";",
"pathToEntity",
"=",
"null",
";",
"}",
"else",
"{",
"vec3d",
"=",
"pathToEntity",
".",
"getPosition",
"(",
"this",
")",
";",
"}",
"}",
"isJumping",
"=",
"false",
";",
"if",
"(",
"vec3d",
"!=",
"null",
")",
"{",
"double",
"d1",
"=",
"vec3d",
".",
"xCoord",
"-",
"posX",
";",
"double",
"d2",
"=",
"vec3d",
".",
"zCoord",
"-",
"posZ",
";",
"double",
"d3",
"=",
"vec3d",
".",
"yCoord",
"-",
"(",
"double",
")",
"i",
";",
"float",
"f2",
"=",
"(",
"float",
")",
"(",
"(",
"Math",
".",
"atan2",
"(",
"d2",
",",
"d1",
")",
"*",
"180D",
")",
"/",
"Math",
".",
"PI",
")",
"-",
"90F",
";",
"float",
"f3",
"=",
"f2",
"-",
"rotationYaw",
";",
"moveForward",
"=",
"moveSpeed",
";",
"for",
"(",
";",
"f3",
"<",
"-",
"180F",
";",
"f3",
"+=",
"360F",
")",
"{",
"}",
"for",
"(",
";",
"f3",
">=",
"180F",
";",
"f3",
"-=",
"360F",
")",
"{",
"}",
"if",
"(",
"f3",
">",
"30F",
")",
"{",
"f3",
"=",
"30F",
";",
"}",
"if",
"(",
"f3",
"<",
"-",
"30F",
")",
"{",
"f3",
"=",
"-",
"30F",
";",
"}",
"rotationYaw",
"+=",
"f3",
";",
"if",
"(",
"hasAttacked",
"&&",
"entityToAttack",
"!=",
"null",
")",
"{",
"double",
"d4",
"=",
"entityToAttack",
".",
"posX",
"-",
"posX",
";",
"double",
"d5",
"=",
"entityToAttack",
".",
"posZ",
"-",
"posZ",
";",
"float",
"f5",
"=",
"rotationYaw",
";",
"rotationYaw",
"=",
"(",
"float",
")",
"(",
"(",
"Math",
".",
"atan2",
"(",
"d5",
",",
"d4",
")",
"*",
"180D",
")",
"/",
"Math",
".",
"PI",
")",
"-",
"90F",
";",
"float",
"f4",
"=",
"(",
"(",
"(",
"f5",
"-",
"rotationYaw",
")",
"+",
"90F",
")",
"*",
"(",
"float",
")",
"Math",
".",
"PI",
")",
"/",
"180F",
";",
"moveStrafing",
"=",
"-",
"MathHelper",
".",
"sin",
"(",
"f4",
")",
"*",
"moveForward",
"*",
"1.0F",
";",
"moveForward",
"=",
"MathHelper",
".",
"cos",
"(",
"f4",
")",
"*",
"moveForward",
"*",
"1.0F",
";",
"}",
"if",
"(",
"d3",
">",
"0.0D",
")",
"{",
"isJumping",
"=",
"true",
";",
"}",
"}",
"if",
"(",
"entityToAttack",
"!=",
"null",
")",
"{",
"faceEntity",
"(",
"entityToAttack",
",",
"30F",
",",
"30F",
")",
";",
"}",
"if",
"(",
"isCollidedHorizontally",
"&&",
"!",
"hasPath",
"(",
")",
")",
"{",
"isJumping",
"=",
"true",
";",
"}",
"if",
"(",
"rand",
".",
"nextFloat",
"(",
")",
"<",
"0.8F",
"&&",
"(",
"flag",
"||",
"flag1",
")",
")",
"{",
"isJumping",
"=",
"true",
";",
"}",
"Profiler",
".",
"endSection",
"(",
")",
";",
"}",
"protected",
"void",
"updateWanderPath",
"(",
")",
"{",
"Profiler",
".",
"startSection",
"(",
"\"stroll\"",
")",
";",
"boolean",
"flag",
"=",
"false",
";",
"int",
"i",
"=",
"-",
"1",
";",
"int",
"j",
"=",
"-",
"1",
";",
"int",
"k",
"=",
"-",
"1",
";",
"float",
"f",
"=",
"-",
"99999F",
";",
"for",
"(",
"int",
"l",
"=",
"0",
";",
"l",
"<",
"10",
";",
"l",
"++",
")",
"{",
"int",
"i1",
"=",
"MathHelper",
".",
"floor_double",
"(",
"(",
"posX",
"+",
"(",
"double",
")",
"rand",
".",
"nextInt",
"(",
"13",
")",
")",
"-",
"6D",
")",
";",
"int",
"j1",
"=",
"MathHelper",
".",
"floor_double",
"(",
"(",
"posY",
"+",
"(",
"double",
")",
"rand",
".",
"nextInt",
"(",
"7",
")",
")",
"-",
"3D",
")",
";",
"int",
"k1",
"=",
"MathHelper",
".",
"floor_double",
"(",
"(",
"posZ",
"+",
"(",
"double",
")",
"rand",
".",
"nextInt",
"(",
"13",
")",
")",
"-",
"6D",
")",
";",
"float",
"f1",
"=",
"getBlockPathWeight",
"(",
"i1",
",",
"j1",
",",
"k1",
")",
";",
"if",
"(",
"f1",
">",
"f",
")",
"{",
"f",
"=",
"f1",
";",
"i",
"=",
"i1",
";",
"j",
"=",
"j1",
";",
"k",
"=",
"k1",
";",
"flag",
"=",
"true",
";",
"}",
"}",
"if",
"(",
"flag",
")",
"{",
"pathToEntity",
"=",
"worldObj",
".",
"getEntityPathToXYZ",
"(",
"this",
",",
"i",
",",
"j",
",",
"k",
",",
"10F",
",",
"true",
",",
"false",
",",
"false",
",",
"true",
")",
";",
"}",
"Profiler",
".",
"endSection",
"(",
")",
";",
"}",
"protected",
"void",
"attackEntity",
"(",
"Entity",
"entity",
",",
"float",
"f",
")",
"{",
"}",
"protected",
"void",
"attackBlockedEntity",
"(",
"Entity",
"entity",
",",
"float",
"f",
")",
"{",
"}",
"public",
"float",
"getBlockPathWeight",
"(",
"int",
"par1",
",",
"int",
"par2",
",",
"int",
"par3",
")",
"{",
"return",
"0.0F",
";",
"}",
"protected",
"Entity",
"findPlayerToAttack",
"(",
")",
"{",
"return",
"null",
";",
"}",
"public",
"boolean",
"getCanSpawnHere",
"(",
")",
"{",
"int",
"i",
"=",
"MathHelper",
".",
"floor_double",
"(",
"posX",
")",
";",
"int",
"j",
"=",
"MathHelper",
".",
"floor_double",
"(",
"boundingBox",
".",
"minY",
")",
";",
"int",
"k",
"=",
"MathHelper",
".",
"floor_double",
"(",
"posZ",
")",
";",
"return",
"super",
".",
"getCanSpawnHere",
"(",
")",
"&&",
"getBlockPathWeight",
"(",
"i",
",",
"j",
",",
"k",
")",
">=",
"0.0F",
";",
"}",
"public",
"boolean",
"hasPath",
"(",
")",
"{",
"return",
"pathToEntity",
"!=",
"null",
";",
"}",
"public",
"void",
"setPathToEntity",
"(",
"PathEntity",
"par1PathEntity",
")",
"{",
"pathToEntity",
"=",
"par1PathEntity",
";",
"}",
"public",
"Entity",
"getEntityToAttack",
"(",
")",
"{",
"return",
"entityToAttack",
";",
"}",
"public",
"void",
"setTarget",
"(",
"Entity",
"par1Entity",
")",
"{",
"entityToAttack",
"=",
"par1Entity",
";",
"}",
"protected",
"float",
"getSpeedModifier",
"(",
")",
"{",
"if",
"(",
"isAIEnabled",
"(",
")",
")",
"{",
"return",
"1.0F",
";",
"}",
"float",
"f",
"=",
"super",
".",
"getSpeedModifier",
"(",
")",
";",
"if",
"(",
"fleeingTick",
">",
"0",
")",
"{",
"f",
"*=",
"2.0F",
";",
"}",
"return",
"f",
";",
"}",
"}",
"</s>"
] |
9,346 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"*",
";",
"public",
"class",
"VillageCollection",
"{",
"private",
"World",
"worldObj",
";",
"private",
"final",
"List",
"villagerPositionsList",
"=",
"new",
"ArrayList",
"(",
")",
";",
"private",
"final",
"List",
"newDoors",
"=",
"new",
"ArrayList",
"(",
")",
";",
"private",
"final",
"List",
"villageList",
"=",
"new",
"ArrayList",
"(",
")",
";",
"private",
"int",
"tickCounter",
";",
"public",
"VillageCollection",
"(",
"World",
"par1World",
")",
"{",
"tickCounter",
"=",
"0",
";",
"worldObj",
"=",
"par1World",
";",
"}",
"public",
"void",
"addVillagerPosition",
"(",
"int",
"par1",
",",
"int",
"par2",
",",
"int",
"par3",
")",
"{",
"if",
"(",
"villagerPositionsList",
".",
"size",
"(",
")",
">",
"64",
")",
"{",
"return",
";",
"}",
"if",
"(",
"!",
"isVillagerPositionPresent",
"(",
"par1",
",",
"par2",
",",
"par3",
")",
")",
"{",
"villagerPositionsList",
".",
"add",
"(",
"new",
"ChunkCoordinates",
"(",
"par1",
",",
"par2",
",",
"par3",
")",
")",
";",
"}",
"}",
"public",
"void",
"tick",
"(",
")",
"{",
"tickCounter",
"++",
";",
"Village",
"village",
";",
"for",
"(",
"Iterator",
"iterator",
"=",
"villageList",
".",
"iterator",
"(",
")",
";",
"iterator",
".",
"hasNext",
"(",
")",
";",
"village",
".",
"tick",
"(",
"tickCounter",
")",
")",
"{",
"village",
"=",
"(",
"Village",
")",
"iterator",
".",
"next",
"(",
")",
";",
"}",
"removeAnnihilatedVillages",
"(",
")",
";",
"dropOldestVillagerPosition",
"(",
")",
";",
"addNewDoorsToVillageOrCreateVillage",
"(",
")",
";",
"}",
"private",
"void",
"removeAnnihilatedVillages",
"(",
")",
"{",
"Iterator",
"iterator",
"=",
"villageList",
".",
"iterator",
"(",
")",
";",
"do",
"{",
"if",
"(",
"!",
"iterator",
".",
"hasNext",
"(",
")",
")",
"{",
"break",
";",
"}",
"Village",
"village",
"=",
"(",
"Village",
")",
"iterator",
".",
"next",
"(",
")",
";",
"if",
"(",
"village",
".",
"isAnnihilated",
"(",
")",
")",
"{",
"iterator",
".",
"remove",
"(",
")",
";",
"}",
"}",
"while",
"(",
"true",
")",
";",
"}",
"public",
"List",
"func_48628_b",
"(",
")",
"{",
"return",
"villageList",
";",
"}",
"public",
"Village",
"findNearestVillage",
"(",
"int",
"par1",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"Village",
"village",
"=",
"null",
";",
"float",
"f",
"=",
"3.402823E+038F",
";",
"Iterator",
"iterator",
"=",
"villageList",
".",
"iterator",
"(",
")",
";",
"do",
"{",
"if",
"(",
"!",
"iterator",
".",
"hasNext",
"(",
")",
")",
"{",
"break",
";",
"}",
"Village",
"village1",
"=",
"(",
"Village",
")",
"iterator",
".",
"next",
"(",
")",
";",
"float",
"f1",
"=",
"village1",
".",
"getCenter",
"(",
")",
".",
"getDistanceSquared",
"(",
"par1",
",",
"par2",
",",
"par3",
")",
";",
"if",
"(",
"f1",
"<",
"f",
")",
"{",
"int",
"i",
"=",
"par4",
"+",
"village1",
".",
"getVillageRadius",
"(",
")",
";",
"if",
"(",
"f1",
"<=",
"(",
"float",
")",
"(",
"i",
"*",
"i",
")",
")",
"{",
"village",
"=",
"village1",
";",
"f",
"=",
"f1",
";",
"}",
"}",
"}",
"while",
"(",
"true",
")",
";",
"return",
"village",
";",
"}",
"private",
"void",
"dropOldestVillagerPosition",
"(",
")",
"{",
"if",
"(",
"villagerPositionsList",
".",
"isEmpty",
"(",
")",
")",
"{",
"return",
";",
"}",
"else",
"{",
"addUnassignedWoodenDoorsAroundToNewDoorsList",
"(",
"(",
"ChunkCoordinates",
")",
"villagerPositionsList",
".",
"remove",
"(",
"0",
")",
")",
";",
"return",
";",
"}",
"}",
"private",
"void",
"addNewDoorsToVillageOrCreateVillage",
"(",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"newDoors",
".",
"size",
"(",
")",
";",
"i",
"++",
")",
"{",
"VillageDoorInfo",
"villagedoorinfo",
"=",
"(",
"VillageDoorInfo",
")",
"newDoors",
".",
"get",
"(",
"i",
")",
";",
"boolean",
"flag",
"=",
"false",
";",
"Iterator",
"iterator",
"=",
"villageList",
".",
"iterator",
"(",
")",
";",
"do",
"{",
"if",
"(",
"!",
"iterator",
".",
"hasNext",
"(",
")",
")",
"{",
"break",
";",
"}",
"Village",
"village1",
"=",
"(",
"Village",
")",
"iterator",
".",
"next",
"(",
")",
";",
"int",
"j",
"=",
"(",
"int",
")",
"village1",
".",
"getCenter",
"(",
")",
".",
"getEuclideanDistanceTo",
"(",
"villagedoorinfo",
".",
"posX",
",",
"villagedoorinfo",
".",
"posY",
",",
"villagedoorinfo",
".",
"posZ",
")",
";",
"if",
"(",
"j",
">",
"32",
"+",
"village1",
".",
"getVillageRadius",
"(",
")",
")",
"{",
"continue",
";",
"}",
"village1",
".",
"addVillageDoorInfo",
"(",
"villagedoorinfo",
")",
";",
"flag",
"=",
"true",
";",
"break",
";",
"}",
"while",
"(",
"true",
")",
";",
"if",
"(",
"!",
"flag",
")",
"{",
"Village",
"village",
"=",
"new",
"Village",
"(",
"worldObj",
")",
";",
"village",
".",
"addVillageDoorInfo",
"(",
"villagedoorinfo",
")",
";",
"villageList",
".",
"add",
"(",
"village",
")",
";",
"}",
"}",
"newDoors",
".",
"clear",
"(",
")",
";",
"}",
"private",
"void",
"addUnassignedWoodenDoorsAroundToNewDoorsList",
"(",
"ChunkCoordinates",
"par1ChunkCoordinates",
")",
"{",
"byte",
"byte0",
"=",
"16",
";",
"byte",
"byte1",
"=",
"4",
";",
"byte",
"byte2",
"=",
"16",
";",
"for",
"(",
"int",
"i",
"=",
"par1ChunkCoordinates",
".",
"posX",
"-",
"byte0",
";",
"i",
"<",
"par1ChunkCoordinates",
".",
"posX",
"+",
"byte0",
";",
"i",
"++",
")",
"{",
"for",
"(",
"int",
"j",
"=",
"par1ChunkCoordinates",
".",
"posY",
"-",
"byte1",
";",
"j",
"<",
"par1ChunkCoordinates",
".",
"posY",
"+",
"byte1",
";",
"j",
"++",
")",
"{",
"for",
"(",
"int",
"k",
"=",
"par1ChunkCoordinates",
".",
"posZ",
"-",
"byte2",
";",
"k",
"<",
"par1ChunkCoordinates",
".",
"posZ",
"+",
"byte2",
";",
"k",
"++",
")",
"{",
"if",
"(",
"!",
"isWoodenDoorAt",
"(",
"i",
",",
"j",
",",
"k",
")",
")",
"{",
"continue",
";",
"}",
"VillageDoorInfo",
"villagedoorinfo",
"=",
"getVillageDoorAt",
"(",
"i",
",",
"j",
",",
"k",
")",
";",
"if",
"(",
"villagedoorinfo",
"==",
"null",
")",
"{",
"addDoorToNewListIfAppropriate",
"(",
"i",
",",
"j",
",",
"k",
")",
";",
"}",
"else",
"{",
"villagedoorinfo",
".",
"lastActivityTimestamp",
"=",
"tickCounter",
";",
"}",
"}",
"}",
"}",
"}",
"private",
"VillageDoorInfo",
"getVillageDoorAt",
"(",
"int",
"par1",
",",
"int",
"par2",
",",
"int",
"par3",
")",
"{",
"for",
"(",
"Iterator",
"iterator",
"=",
"newDoors",
".",
"iterator",
"(",
")",
";",
"iterator",
".",
"hasNext",
"(",
")",
";",
")",
"{",
"VillageDoorInfo",
"villagedoorinfo",
"=",
"(",
"VillageDoorInfo",
")",
"iterator",
".",
"next",
"(",
")",
";",
"if",
"(",
"villagedoorinfo",
".",
"posX",
"==",
"par1",
"&&",
"villagedoorinfo",
".",
"posZ",
"==",
"par3",
"&&",
"Math",
".",
"abs",
"(",
"villagedoorinfo",
".",
"posY",
"-",
"par2",
")",
"<=",
"1",
")",
"{",
"return",
"villagedoorinfo",
";",
"}",
"}",
"for",
"(",
"Iterator",
"iterator1",
"=",
"villageList",
".",
"iterator",
"(",
")",
";",
"iterator1",
".",
"hasNext",
"(",
")",
";",
")",
"{",
"Village",
"village",
"=",
"(",
"Village",
")",
"iterator1",
".",
"next",
"(",
")",
";",
"VillageDoorInfo",
"villagedoorinfo1",
"=",
"village",
".",
"getVillageDoorAt",
"(",
"par1",
",",
"par2",
",",
"par3",
")",
";",
"if",
"(",
"villagedoorinfo1",
"!=",
"null",
")",
"{",
"return",
"villagedoorinfo1",
";",
"}",
"}",
"return",
"null",
";",
"}",
"private",
"void",
"addDoorToNewListIfAppropriate",
"(",
"int",
"par1",
",",
"int",
"par2",
",",
"int",
"par3",
")",
"{",
"int",
"i",
"=",
"(",
"(",
"BlockDoor",
")",
"Block",
".",
"doorWood",
")",
".",
"getDoorOrientation",
"(",
"worldObj",
",",
"par1",
",",
"par2",
",",
"par3",
")",
";",
"if",
"(",
"i",
"==",
"0",
"||",
"i",
"==",
"2",
")",
"{",
"int",
"j",
"=",
"0",
";",
"for",
"(",
"int",
"l",
"=",
"-",
"5",
";",
"l",
"<",
"0",
";",
"l",
"++",
")",
"{",
"if",
"(",
"worldObj",
".",
"canBlockSeeTheSky",
"(",
"par1",
"+",
"l",
",",
"par2",
",",
"par3",
")",
")",
"{",
"j",
"--",
";",
"}",
"}",
"for",
"(",
"int",
"i1",
"=",
"1",
";",
"i1",
"<=",
"5",
";",
"i1",
"++",
")",
"{",
"if",
"(",
"worldObj",
".",
"canBlockSeeTheSky",
"(",
"par1",
"+",
"i1",
",",
"par2",
",",
"par3",
")",
")",
"{",
"j",
"++",
";",
"}",
"}",
"if",
"(",
"j",
"!=",
"0",
")",
"{",
"newDoors",
".",
"add",
"(",
"new",
"VillageDoorInfo",
"(",
"par1",
",",
"par2",
",",
"par3",
",",
"j",
"<=",
"0",
"?",
"2",
":",
"-",
"2",
",",
"0",
",",
"tickCounter",
")",
")",
";",
"}",
"}",
"else",
"{",
"int",
"k",
"=",
"0",
";",
"for",
"(",
"int",
"j1",
"=",
"-",
"5",
";",
"j1",
"<",
"0",
";",
"j1",
"++",
")",
"{",
"if",
"(",
"worldObj",
".",
"canBlockSeeTheSky",
"(",
"par1",
",",
"par2",
",",
"par3",
"+",
"j1",
")",
")",
"{",
"k",
"--",
";",
"}",
"}",
"for",
"(",
"int",
"k1",
"=",
"1",
";",
"k1",
"<=",
"5",
";",
"k1",
"++",
")",
"{",
"if",
"(",
"worldObj",
".",
"canBlockSeeTheSky",
"(",
"par1",
",",
"par2",
",",
"par3",
"+",
"k1",
")",
")",
"{",
"k",
"++",
";",
"}",
"}",
"if",
"(",
"k",
"!=",
"0",
")",
"{",
"newDoors",
".",
"add",
"(",
"new",
"VillageDoorInfo",
"(",
"par1",
",",
"par2",
",",
"par3",
",",
"0",
",",
"k",
"<=",
"0",
"?",
"2",
":",
"-",
"2",
",",
"tickCounter",
")",
")",
";",
"}",
"}",
"}",
"private",
"boolean",
"isVillagerPositionPresent",
"(",
"int",
"par1",
",",
"int",
"par2",
",",
"int",
"par3",
")",
"{",
"for",
"(",
"Iterator",
"iterator",
"=",
"villagerPositionsList",
".",
"iterator",
"(",
")",
";",
"iterator",
".",
"hasNext",
"(",
")",
";",
")",
"{",
"ChunkCoordinates",
"chunkcoordinates",
"=",
"(",
"ChunkCoordinates",
")",
"iterator",
".",
"next",
"(",
")",
";",
"if",
"(",
"chunkcoordinates",
".",
"posX",
"==",
"par1",
"&&",
"chunkcoordinates",
".",
"posY",
"==",
"par2",
"&&",
"chunkcoordinates",
".",
"posZ",
"==",
"par3",
")",
"{",
"return",
"true",
";",
"}",
"}",
"return",
"false",
";",
"}",
"private",
"boolean",
"isWoodenDoorAt",
"(",
"int",
"par1",
",",
"int",
"par2",
",",
"int",
"par3",
")",
"{",
"int",
"i",
"=",
"worldObj",
".",
"getBlockId",
"(",
"par1",
",",
"par2",
",",
"par3",
")",
";",
"return",
"i",
"==",
"Block",
".",
"doorWood",
".",
"blockID",
";",
"}",
"}",
"</s>"
] |
9,347 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"EntityAILookAtVillager",
"extends",
"EntityAIBase",
"{",
"private",
"EntityIronGolem",
"theGolem",
";",
"private",
"EntityVillager",
"theVillager",
";",
"private",
"int",
"field_48225_c",
";",
"public",
"EntityAILookAtVillager",
"(",
"EntityIronGolem",
"par1EntityIronGolem",
")",
"{",
"theGolem",
"=",
"par1EntityIronGolem",
";",
"setMutexBits",
"(",
"3",
")",
";",
"}",
"public",
"boolean",
"shouldExecute",
"(",
")",
"{",
"if",
"(",
"!",
"theGolem",
".",
"worldObj",
".",
"isDaytime",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"theGolem",
".",
"getRNG",
"(",
")",
".",
"nextInt",
"(",
"8000",
")",
"!=",
"0",
")",
"{",
"return",
"false",
";",
"}",
"else",
"{",
"theVillager",
"=",
"(",
"EntityVillager",
")",
"theGolem",
".",
"worldObj",
".",
"findNearestEntityWithinAABB",
"(",
"net",
".",
"minecraft",
".",
"src",
".",
"EntityVillager",
".",
"class",
",",
"theGolem",
".",
"boundingBox",
".",
"expand",
"(",
"6D",
",",
"2D",
",",
"6D",
")",
",",
"theGolem",
")",
";",
"return",
"theVillager",
"!=",
"null",
";",
"}",
"}",
"public",
"boolean",
"continueExecuting",
"(",
")",
"{",
"return",
"field_48225_c",
">",
"0",
";",
"}",
"public",
"void",
"startExecuting",
"(",
")",
"{",
"field_48225_c",
"=",
"400",
";",
"theGolem",
".",
"func_48383_a",
"(",
"true",
")",
";",
"}",
"public",
"void",
"resetTask",
"(",
")",
"{",
"theGolem",
".",
"func_48383_a",
"(",
"false",
")",
";",
"theVillager",
"=",
"null",
";",
"}",
"public",
"void",
"updateTask",
"(",
")",
"{",
"theGolem",
".",
"getLookHelper",
"(",
")",
".",
"setLookPositionWithEntity",
"(",
"theVillager",
",",
"30F",
",",
"30F",
")",
";",
"field_48225_c",
"--",
";",
"}",
"}",
"</s>"
] |
9,348 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"class",
"EnchantmentWaterWorker",
"extends",
"Enchantment",
"{",
"public",
"EnchantmentWaterWorker",
"(",
"int",
"par1",
",",
"int",
"par2",
")",
"{",
"super",
"(",
"par1",
",",
"par2",
",",
"EnumEnchantmentType",
".",
"armor_head",
")",
";",
"setName",
"(",
"\"waterWorker\"",
")",
";",
"}",
"public",
"int",
"getMinEnchantability",
"(",
"int",
"par1",
")",
"{",
"return",
"1",
";",
"}",
"public",
"int",
"getMaxEnchantability",
"(",
"int",
"par1",
")",
"{",
"return",
"getMinEnchantability",
"(",
"par1",
")",
"+",
"40",
";",
"}",
"public",
"int",
"getMaxLevel",
"(",
")",
"{",
"return",
"1",
";",
"}",
"}",
"</s>"
] |
9,349 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"*",
";",
"public",
"class",
"BlockRedstoneWire",
"extends",
"Block",
"{",
"private",
"boolean",
"wiresProvidePower",
";",
"private",
"Set",
"blocksNeedingUpdate",
";",
"public",
"BlockRedstoneWire",
"(",
"int",
"par1",
",",
"int",
"par2",
")",
"{",
"super",
"(",
"par1",
",",
"par2",
",",
"Material",
".",
"circuits",
")",
";",
"wiresProvidePower",
"=",
"true",
";",
"blocksNeedingUpdate",
"=",
"new",
"HashSet",
"(",
")",
";",
"setBlockBounds",
"(",
"0.0F",
",",
"0.0F",
",",
"0.0F",
",",
"1.0F",
",",
"0.0625F",
",",
"1.0F",
")",
";",
"}",
"public",
"int",
"getBlockTextureFromSideAndMetadata",
"(",
"int",
"par1",
",",
"int",
"par2",
")",
"{",
"return",
"blockIndexInTexture",
";",
"}",
"public",
"AxisAlignedBB",
"getCollisionBoundingBoxFromPool",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"i",
")",
"{",
"return",
"null",
";",
"}",
"public",
"boolean",
"isOpaqueCube",
"(",
")",
"{",
"return",
"false",
";",
"}",
"public",
"boolean",
"renderAsNormalBlock",
"(",
")",
"{",
"return",
"false",
";",
"}",
"public",
"int",
"getRenderType",
"(",
")",
"{",
"return",
"5",
";",
"}",
"public",
"boolean",
"canPlaceBlockAt",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"return",
"par1World",
".",
"isBlockNormalCube",
"(",
"par2",
",",
"par3",
"-",
"1",
",",
"par4",
")",
"||",
"par1World",
".",
"getBlockId",
"(",
"par2",
",",
"par3",
"-",
"1",
",",
"par4",
")",
"==",
"Block",
".",
"glowStone",
".",
"blockID",
";",
"}",
"private",
"void",
"updateAndPropagateCurrentStrength",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"calculateCurrentChanges",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
",",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"ArrayList",
"arraylist",
"=",
"new",
"ArrayList",
"(",
"blocksNeedingUpdate",
")",
";",
"blocksNeedingUpdate",
".",
"clear",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"arraylist",
".",
"size",
"(",
")",
";",
"i",
"++",
")",
"{",
"ChunkPosition",
"chunkposition",
"=",
"(",
"ChunkPosition",
")",
"arraylist",
".",
"get",
"(",
"i",
")",
";",
"par1World",
".",
"notifyBlocksOfNeighborChange",
"(",
"chunkposition",
".",
"x",
",",
"chunkposition",
".",
"y",
",",
"chunkposition",
".",
"z",
",",
"blockID",
")",
";",
"}",
"}",
"private",
"void",
"calculateCurrentChanges",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
",",
"int",
"par6",
",",
"int",
"par7",
")",
"{",
"int",
"i",
"=",
"par1World",
".",
"getBlockMetadata",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"int",
"j",
"=",
"0",
";",
"wiresProvidePower",
"=",
"false",
";",
"boolean",
"flag",
"=",
"par1World",
".",
"isBlockIndirectlyGettingPowered",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"wiresProvidePower",
"=",
"true",
";",
"if",
"(",
"flag",
")",
"{",
"j",
"=",
"15",
";",
"}",
"else",
"{",
"for",
"(",
"int",
"k",
"=",
"0",
";",
"k",
"<",
"4",
";",
"k",
"++",
")",
"{",
"int",
"i1",
"=",
"par2",
";",
"int",
"k1",
"=",
"par4",
";",
"if",
"(",
"k",
"==",
"0",
")",
"{",
"i1",
"--",
";",
"}",
"if",
"(",
"k",
"==",
"1",
")",
"{",
"i1",
"++",
";",
"}",
"if",
"(",
"k",
"==",
"2",
")",
"{",
"k1",
"--",
";",
"}",
"if",
"(",
"k",
"==",
"3",
")",
"{",
"k1",
"++",
";",
"}",
"if",
"(",
"i1",
"!=",
"par5",
"||",
"par3",
"!=",
"par6",
"||",
"k1",
"!=",
"par7",
")",
"{",
"j",
"=",
"getMaxCurrentStrength",
"(",
"par1World",
",",
"i1",
",",
"par3",
",",
"k1",
",",
"j",
")",
";",
"}",
"if",
"(",
"par1World",
".",
"isBlockNormalCube",
"(",
"i1",
",",
"par3",
",",
"k1",
")",
"&&",
"!",
"par1World",
".",
"isBlockNormalCube",
"(",
"par2",
",",
"par3",
"+",
"1",
",",
"par4",
")",
")",
"{",
"if",
"(",
"i1",
"!=",
"par5",
"||",
"par3",
"+",
"1",
"!=",
"par6",
"||",
"k1",
"!=",
"par7",
")",
"{",
"j",
"=",
"getMaxCurrentStrength",
"(",
"par1World",
",",
"i1",
",",
"par3",
"+",
"1",
",",
"k1",
",",
"j",
")",
";",
"}",
"continue",
";",
"}",
"if",
"(",
"!",
"par1World",
".",
"isBlockNormalCube",
"(",
"i1",
",",
"par3",
",",
"k1",
")",
"&&",
"(",
"i1",
"!=",
"par5",
"||",
"par3",
"-",
"1",
"!=",
"par6",
"||",
"k1",
"!=",
"par7",
")",
")",
"{",
"j",
"=",
"getMaxCurrentStrength",
"(",
"par1World",
",",
"i1",
",",
"par3",
"-",
"1",
",",
"k1",
",",
"j",
")",
";",
"}",
"}",
"if",
"(",
"j",
">",
"0",
")",
"{",
"j",
"--",
";",
"}",
"else",
"{",
"j",
"=",
"0",
";",
"}",
"}",
"if",
"(",
"i",
"!=",
"j",
")",
"{",
"par1World",
".",
"editingBlocks",
"=",
"true",
";",
"par1World",
".",
"setBlockMetadataWithNotify",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"j",
")",
";",
"par1World",
".",
"markBlocksDirty",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"par1World",
".",
"editingBlocks",
"=",
"false",
";",
"for",
"(",
"int",
"l",
"=",
"0",
";",
"l",
"<",
"4",
";",
"l",
"++",
")",
"{",
"int",
"j1",
"=",
"par2",
";",
"int",
"l1",
"=",
"par4",
";",
"int",
"i2",
"=",
"par3",
"-",
"1",
";",
"if",
"(",
"l",
"==",
"0",
")",
"{",
"j1",
"--",
";",
"}",
"if",
"(",
"l",
"==",
"1",
")",
"{",
"j1",
"++",
";",
"}",
"if",
"(",
"l",
"==",
"2",
")",
"{",
"l1",
"--",
";",
"}",
"if",
"(",
"l",
"==",
"3",
")",
"{",
"l1",
"++",
";",
"}",
"if",
"(",
"par1World",
".",
"isBlockNormalCube",
"(",
"j1",
",",
"par3",
",",
"l1",
")",
")",
"{",
"i2",
"+=",
"2",
";",
"}",
"int",
"j2",
"=",
"0",
";",
"j2",
"=",
"getMaxCurrentStrength",
"(",
"par1World",
",",
"j1",
",",
"par3",
",",
"l1",
",",
"-",
"1",
")",
";",
"j",
"=",
"par1World",
".",
"getBlockMetadata",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"if",
"(",
"j",
">",
"0",
")",
"{",
"j",
"--",
";",
"}",
"if",
"(",
"j2",
">=",
"0",
"&&",
"j2",
"!=",
"j",
")",
"{",
"calculateCurrentChanges",
"(",
"par1World",
",",
"j1",
",",
"par3",
",",
"l1",
",",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"}",
"j2",
"=",
"getMaxCurrentStrength",
"(",
"par1World",
",",
"j1",
",",
"i2",
",",
"l1",
",",
"-",
"1",
")",
";",
"j",
"=",
"par1World",
".",
"getBlockMetadata",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"if",
"(",
"j",
">",
"0",
")",
"{",
"j",
"--",
";",
"}",
"if",
"(",
"j2",
">=",
"0",
"&&",
"j2",
"!=",
"j",
")",
"{",
"calculateCurrentChanges",
"(",
"par1World",
",",
"j1",
",",
"i2",
",",
"l1",
",",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"}",
"}",
"if",
"(",
"i",
"<",
"j",
"||",
"j",
"==",
"0",
")",
"{",
"blocksNeedingUpdate",
".",
"add",
"(",
"new",
"ChunkPosition",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
")",
";",
"blocksNeedingUpdate",
".",
"add",
"(",
"new",
"ChunkPosition",
"(",
"par2",
"-",
"1",
",",
"par3",
",",
"par4",
")",
")",
";",
"blocksNeedingUpdate",
".",
"add",
"(",
"new",
"ChunkPosition",
"(",
"par2",
"+",
"1",
",",
"par3",
",",
"par4",
")",
")",
";",
"blocksNeedingUpdate",
".",
"add",
"(",
"new",
"ChunkPosition",
"(",
"par2",
",",
"par3",
"-",
"1",
",",
"par4",
")",
")",
";",
"blocksNeedingUpdate",
".",
"add",
"(",
"new",
"ChunkPosition",
"(",
"par2",
",",
"par3",
"+",
"1",
",",
"par4",
")",
")",
";",
"blocksNeedingUpdate",
".",
"add",
"(",
"new",
"ChunkPosition",
"(",
"par2",
",",
"par3",
",",
"par4",
"-",
"1",
")",
")",
";",
"blocksNeedingUpdate",
".",
"add",
"(",
"new",
"ChunkPosition",
"(",
"par2",
",",
"par3",
",",
"par4",
"+",
"1",
")",
")",
";",
"}",
"}",
"}",
"private",
"void",
"notifyWireNeighborsOfNeighborChange",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"if",
"(",
"par1World",
".",
"getBlockId",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
"!=",
"blockID",
")",
"{",
"return",
";",
"}",
"else",
"{",
"par1World",
".",
"notifyBlocksOfNeighborChange",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"blockID",
")",
";",
"par1World",
".",
"notifyBlocksOfNeighborChange",
"(",
"par2",
"-",
"1",
",",
"par3",
",",
"par4",
",",
"blockID",
")",
";",
"par1World",
".",
"notifyBlocksOfNeighborChange",
"(",
"par2",
"+",
"1",
",",
"par3",
",",
"par4",
",",
"blockID",
")",
";",
"par1World",
".",
"notifyBlocksOfNeighborChange",
"(",
"par2",
",",
"par3",
",",
"par4",
"-",
"1",
",",
"blockID",
")",
";",
"par1World",
".",
"notifyBlocksOfNeighborChange",
"(",
"par2",
",",
"par3",
",",
"par4",
"+",
"1",
",",
"blockID",
")",
";",
"par1World",
".",
"notifyBlocksOfNeighborChange",
"(",
"par2",
",",
"par3",
"-",
"1",
",",
"par4",
",",
"blockID",
")",
";",
"par1World",
".",
"notifyBlocksOfNeighborChange",
"(",
"par2",
",",
"par3",
"+",
"1",
",",
"par4",
",",
"blockID",
")",
";",
"return",
";",
"}",
"}",
"public",
"void",
"onBlockAdded",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"super",
".",
"onBlockAdded",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"if",
"(",
"par1World",
".",
"isRemote",
")",
"{",
"return",
";",
"}",
"updateAndPropagateCurrentStrength",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"par1World",
".",
"notifyBlocksOfNeighborChange",
"(",
"par2",
",",
"par3",
"+",
"1",
",",
"par4",
",",
"blockID",
")",
";",
"par1World",
".",
"notifyBlocksOfNeighborChange",
"(",
"par2",
",",
"par3",
"-",
"1",
",",
"par4",
",",
"blockID",
")",
";",
"notifyWireNeighborsOfNeighborChange",
"(",
"par1World",
",",
"par2",
"-",
"1",
",",
"par3",
",",
"par4",
")",
";",
"notifyWireNeighborsOfNeighborChange",
"(",
"par1World",
",",
"par2",
"+",
"1",
",",
"par3",
",",
"par4",
")",
";",
"notifyWireNeighborsOfNeighborChange",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
"-",
"1",
")",
";",
"notifyWireNeighborsOfNeighborChange",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
"+",
"1",
")",
";",
"if",
"(",
"par1World",
".",
"isBlockNormalCube",
"(",
"par2",
"-",
"1",
",",
"par3",
",",
"par4",
")",
")",
"{",
"notifyWireNeighborsOfNeighborChange",
"(",
"par1World",
",",
"par2",
"-",
"1",
",",
"par3",
"+",
"1",
",",
"par4",
")",
";",
"}",
"else",
"{",
"notifyWireNeighborsOfNeighborChange",
"(",
"par1World",
",",
"par2",
"-",
"1",
",",
"par3",
"-",
"1",
",",
"par4",
")",
";",
"}",
"if",
"(",
"par1World",
".",
"isBlockNormalCube",
"(",
"par2",
"+",
"1",
",",
"par3",
",",
"par4",
")",
")",
"{",
"notifyWireNeighborsOfNeighborChange",
"(",
"par1World",
",",
"par2",
"+",
"1",
",",
"par3",
"+",
"1",
",",
"par4",
")",
";",
"}",
"else",
"{",
"notifyWireNeighborsOfNeighborChange",
"(",
"par1World",
",",
"par2",
"+",
"1",
",",
"par3",
"-",
"1",
",",
"par4",
")",
";",
"}",
"if",
"(",
"par1World",
".",
"isBlockNormalCube",
"(",
"par2",
",",
"par3",
",",
"par4",
"-",
"1",
")",
")",
"{",
"notifyWireNeighborsOfNeighborChange",
"(",
"par1World",
",",
"par2",
",",
"par3",
"+",
"1",
",",
"par4",
"-",
"1",
")",
";",
"}",
"else",
"{",
"notifyWireNeighborsOfNeighborChange",
"(",
"par1World",
",",
"par2",
",",
"par3",
"-",
"1",
",",
"par4",
"-",
"1",
")",
";",
"}",
"if",
"(",
"par1World",
".",
"isBlockNormalCube",
"(",
"par2",
",",
"par3",
",",
"par4",
"+",
"1",
")",
")",
"{",
"notifyWireNeighborsOfNeighborChange",
"(",
"par1World",
",",
"par2",
",",
"par3",
"+",
"1",
",",
"par4",
"+",
"1",
")",
";",
"}",
"else",
"{",
"notifyWireNeighborsOfNeighborChange",
"(",
"par1World",
",",
"par2",
",",
"par3",
"-",
"1",
",",
"par4",
"+",
"1",
")",
";",
"}",
"}",
"public",
"void",
"onBlockRemoval",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"super",
".",
"onBlockRemoval",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"if",
"(",
"par1World",
".",
"isRemote",
")",
"{",
"return",
";",
"}",
"par1World",
".",
"notifyBlocksOfNeighborChange",
"(",
"par2",
",",
"par3",
"+",
"1",
",",
"par4",
",",
"blockID",
")",
";",
"par1World",
".",
"notifyBlocksOfNeighborChange",
"(",
"par2",
",",
"par3",
"-",
"1",
",",
"par4",
",",
"blockID",
")",
";",
"par1World",
".",
"notifyBlocksOfNeighborChange",
"(",
"par2",
"+",
"1",
",",
"par3",
",",
"par4",
",",
"blockID",
")",
";",
"par1World",
".",
"notifyBlocksOfNeighborChange",
"(",
"par2",
"-",
"1",
",",
"par3",
",",
"par4",
",",
"blockID",
")",
";",
"par1World",
".",
"notifyBlocksOfNeighborChange",
"(",
"par2",
",",
"par3",
",",
"par4",
"+",
"1",
",",
"blockID",
")",
";",
"par1World",
".",
"notifyBlocksOfNeighborChange",
"(",
"par2",
",",
"par3",
",",
"par4",
"-",
"1",
",",
"blockID",
")",
";",
"updateAndPropagateCurrentStrength",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"notifyWireNeighborsOfNeighborChange",
"(",
"par1World",
",",
"par2",
"-",
"1",
",",
"par3",
",",
"par4",
")",
";",
"notifyWireNeighborsOfNeighborChange",
"(",
"par1World",
",",
"par2",
"+",
"1",
",",
"par3",
",",
"par4",
")",
";",
"notifyWireNeighborsOfNeighborChange",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
"-",
"1",
")",
";",
"notifyWireNeighborsOfNeighborChange",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
"+",
"1",
")",
";",
"if",
"(",
"par1World",
".",
"isBlockNormalCube",
"(",
"par2",
"-",
"1",
",",
"par3",
",",
"par4",
")",
")",
"{",
"notifyWireNeighborsOfNeighborChange",
"(",
"par1World",
",",
"par2",
"-",
"1",
",",
"par3",
"+",
"1",
",",
"par4",
")",
";",
"}",
"else",
"{",
"notifyWireNeighborsOfNeighborChange",
"(",
"par1World",
",",
"par2",
"-",
"1",
",",
"par3",
"-",
"1",
",",
"par4",
")",
";",
"}",
"if",
"(",
"par1World",
".",
"isBlockNormalCube",
"(",
"par2",
"+",
"1",
",",
"par3",
",",
"par4",
")",
")",
"{",
"notifyWireNeighborsOfNeighborChange",
"(",
"par1World",
",",
"par2",
"+",
"1",
",",
"par3",
"+",
"1",
",",
"par4",
")",
";",
"}",
"else",
"{",
"notifyWireNeighborsOfNeighborChange",
"(",
"par1World",
",",
"par2",
"+",
"1",
",",
"par3",
"-",
"1",
",",
"par4",
")",
";",
"}",
"if",
"(",
"par1World",
".",
"isBlockNormalCube",
"(",
"par2",
",",
"par3",
",",
"par4",
"-",
"1",
")",
")",
"{",
"notifyWireNeighborsOfNeighborChange",
"(",
"par1World",
",",
"par2",
",",
"par3",
"+",
"1",
",",
"par4",
"-",
"1",
")",
";",
"}",
"else",
"{",
"notifyWireNeighborsOfNeighborChange",
"(",
"par1World",
",",
"par2",
",",
"par3",
"-",
"1",
",",
"par4",
"-",
"1",
")",
";",
"}",
"if",
"(",
"par1World",
".",
"isBlockNormalCube",
"(",
"par2",
",",
"par3",
",",
"par4",
"+",
"1",
")",
")",
"{",
"notifyWireNeighborsOfNeighborChange",
"(",
"par1World",
",",
"par2",
",",
"par3",
"+",
"1",
",",
"par4",
"+",
"1",
")",
";",
"}",
"else",
"{",
"notifyWireNeighborsOfNeighborChange",
"(",
"par1World",
",",
"par2",
",",
"par3",
"-",
"1",
",",
"par4",
"+",
"1",
")",
";",
"}",
"}",
"private",
"int",
"getMaxCurrentStrength",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
")",
"{",
"if",
"(",
"par1World",
".",
"getBlockId",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
"!=",
"blockID",
")",
"{",
"return",
"par5",
";",
"}",
"int",
"i",
"=",
"par1World",
".",
"getBlockMetadata",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"if",
"(",
"i",
">",
"par5",
")",
"{",
"return",
"i",
";",
"}",
"else",
"{",
"return",
"par5",
";",
"}",
"}",
"public",
"void",
"onNeighborBlockChange",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
")",
"{",
"if",
"(",
"par1World",
".",
"isRemote",
")",
"{",
"return",
";",
"}",
"int",
"i",
"=",
"par1World",
".",
"getBlockMetadata",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"boolean",
"flag",
"=",
"canPlaceBlockAt",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"if",
"(",
"!",
"flag",
")",
"{",
"dropBlockAsItem",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
",",
"i",
",",
"0",
")",
";",
"par1World",
".",
"setBlockWithNotify",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"0",
")",
";",
"}",
"else",
"{",
"updateAndPropagateCurrentStrength",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"}",
"super",
".",
"onNeighborBlockChange",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
",",
"par5",
")",
";",
"}",
"public",
"int",
"idDropped",
"(",
"int",
"par1",
",",
"Random",
"par2Random",
",",
"int",
"par3",
")",
"{",
"return",
"Item",
".",
"redstone",
".",
"shiftedIndex",
";",
"}",
"public",
"boolean",
"isIndirectlyPoweringTo",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
")",
"{",
"if",
"(",
"!",
"wiresProvidePower",
")",
"{",
"return",
"false",
";",
"}",
"else",
"{",
"return",
"isPoweringTo",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
",",
"par5",
")",
";",
"}",
"}",
"public",
"boolean",
"isPoweringTo",
"(",
"IBlockAccess",
"par1IBlockAccess",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
")",
"{",
"if",
"(",
"!",
"wiresProvidePower",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"par1IBlockAccess",
".",
"getBlockMetadata",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
"==",
"0",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"par5",
"==",
"1",
")",
"{",
"return",
"true",
";",
"}",
"boolean",
"flag",
"=",
"isPoweredOrRepeater",
"(",
"par1IBlockAccess",
",",
"par2",
"-",
"1",
",",
"par3",
",",
"par4",
",",
"1",
")",
"||",
"!",
"par1IBlockAccess",
".",
"isBlockNormalCube",
"(",
"par2",
"-",
"1",
",",
"par3",
",",
"par4",
")",
"&&",
"isPoweredOrRepeater",
"(",
"par1IBlockAccess",
",",
"par2",
"-",
"1",
",",
"par3",
"-",
"1",
",",
"par4",
",",
"-",
"1",
")",
";",
"boolean",
"flag1",
"=",
"isPoweredOrRepeater",
"(",
"par1IBlockAccess",
",",
"par2",
"+",
"1",
",",
"par3",
",",
"par4",
",",
"3",
")",
"||",
"!",
"par1IBlockAccess",
".",
"isBlockNormalCube",
"(",
"par2",
"+",
"1",
",",
"par3",
",",
"par4",
")",
"&&",
"isPoweredOrRepeater",
"(",
"par1IBlockAccess",
",",
"par2",
"+",
"1",
",",
"par3",
"-",
"1",
",",
"par4",
",",
"-",
"1",
")",
";",
"boolean",
"flag2",
"=",
"isPoweredOrRepeater",
"(",
"par1IBlockAccess",
",",
"par2",
",",
"par3",
",",
"par4",
"-",
"1",
",",
"2",
")",
"||",
"!",
"par1IBlockAccess",
".",
"isBlockNormalCube",
"(",
"par2",
",",
"par3",
",",
"par4",
"-",
"1",
")",
"&&",
"isPoweredOrRepeater",
"(",
"par1IBlockAccess",
",",
"par2",
",",
"par3",
"-",
"1",
",",
"par4",
"-",
"1",
",",
"-",
"1",
")",
";",
"boolean",
"flag3",
"=",
"isPoweredOrRepeater",
"(",
"par1IBlockAccess",
",",
"par2",
",",
"par3",
",",
"par4",
"+",
"1",
",",
"0",
")",
"||",
"!",
"par1IBlockAccess",
".",
"isBlockNormalCube",
"(",
"par2",
",",
"par3",
",",
"par4",
"+",
"1",
")",
"&&",
"isPoweredOrRepeater",
"(",
"par1IBlockAccess",
",",
"par2",
",",
"par3",
"-",
"1",
",",
"par4",
"+",
"1",
",",
"-",
"1",
")",
";",
"if",
"(",
"!",
"par1IBlockAccess",
".",
"isBlockNormalCube",
"(",
"par2",
",",
"par3",
"+",
"1",
",",
"par4",
")",
")",
"{",
"if",
"(",
"par1IBlockAccess",
".",
"isBlockNormalCube",
"(",
"par2",
"-",
"1",
",",
"par3",
",",
"par4",
")",
"&&",
"isPoweredOrRepeater",
"(",
"par1IBlockAccess",
",",
"par2",
"-",
"1",
",",
"par3",
"+",
"1",
",",
"par4",
",",
"-",
"1",
")",
")",
"{",
"flag",
"=",
"true",
";",
"}",
"if",
"(",
"par1IBlockAccess",
".",
"isBlockNormalCube",
"(",
"par2",
"+",
"1",
",",
"par3",
",",
"par4",
")",
"&&",
"isPoweredOrRepeater",
"(",
"par1IBlockAccess",
",",
"par2",
"+",
"1",
",",
"par3",
"+",
"1",
",",
"par4",
",",
"-",
"1",
")",
")",
"{",
"flag1",
"=",
"true",
";",
"}",
"if",
"(",
"par1IBlockAccess",
".",
"isBlockNormalCube",
"(",
"par2",
",",
"par3",
",",
"par4",
"-",
"1",
")",
"&&",
"isPoweredOrRepeater",
"(",
"par1IBlockAccess",
",",
"par2",
",",
"par3",
"+",
"1",
",",
"par4",
"-",
"1",
",",
"-",
"1",
")",
")",
"{",
"flag2",
"=",
"true",
";",
"}",
"if",
"(",
"par1IBlockAccess",
".",
"isBlockNormalCube",
"(",
"par2",
",",
"par3",
",",
"par4",
"+",
"1",
")",
"&&",
"isPoweredOrRepeater",
"(",
"par1IBlockAccess",
",",
"par2",
",",
"par3",
"+",
"1",
",",
"par4",
"+",
"1",
",",
"-",
"1",
")",
")",
"{",
"flag3",
"=",
"true",
";",
"}",
"}",
"if",
"(",
"!",
"flag2",
"&&",
"!",
"flag1",
"&&",
"!",
"flag",
"&&",
"!",
"flag3",
"&&",
"par5",
">=",
"2",
"&&",
"par5",
"<=",
"5",
")",
"{",
"return",
"true",
";",
"}",
"if",
"(",
"par5",
"==",
"2",
"&&",
"flag2",
"&&",
"!",
"flag",
"&&",
"!",
"flag1",
")",
"{",
"return",
"true",
";",
"}",
"if",
"(",
"par5",
"==",
"3",
"&&",
"flag3",
"&&",
"!",
"flag",
"&&",
"!",
"flag1",
")",
"{",
"return",
"true",
";",
"}",
"if",
"(",
"par5",
"==",
"4",
"&&",
"flag",
"&&",
"!",
"flag2",
"&&",
"!",
"flag3",
")",
"{",
"return",
"true",
";",
"}",
"return",
"par5",
"==",
"5",
"&&",
"flag1",
"&&",
"!",
"flag2",
"&&",
"!",
"flag3",
";",
"}",
"public",
"boolean",
"canProvidePower",
"(",
")",
"{",
"return",
"wiresProvidePower",
";",
"}",
"public",
"static",
"boolean",
"isPowerProviderOrWire",
"(",
"IBlockAccess",
"par0IBlockAccess",
",",
"int",
"par1",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"int",
"i",
"=",
"par0IBlockAccess",
".",
"getBlockId",
"(",
"par1",
",",
"par2",
",",
"par3",
")",
";",
"if",
"(",
"i",
"==",
"Block",
".",
"redstoneWire",
".",
"blockID",
")",
"{",
"return",
"true",
";",
"}",
"if",
"(",
"i",
"==",
"0",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"i",
"==",
"Block",
".",
"redstoneRepeaterIdle",
".",
"blockID",
"||",
"i",
"==",
"Block",
".",
"redstoneRepeaterActive",
".",
"blockID",
")",
"{",
"int",
"j",
"=",
"par0IBlockAccess",
".",
"getBlockMetadata",
"(",
"par1",
",",
"par2",
",",
"par3",
")",
";",
"return",
"par4",
"==",
"(",
"j",
"&",
"3",
")",
"||",
"par4",
"==",
"Direction",
".",
"footInvisibleFaceRemap",
"[",
"j",
"&",
"3",
"]",
";",
"}",
"return",
"Block",
".",
"blocksList",
"[",
"i",
"]",
".",
"canProvidePower",
"(",
")",
"&&",
"par4",
"!=",
"-",
"1",
";",
"}",
"public",
"static",
"boolean",
"isPoweredOrRepeater",
"(",
"IBlockAccess",
"par0IBlockAccess",
",",
"int",
"par1",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"if",
"(",
"isPowerProviderOrWire",
"(",
"par0IBlockAccess",
",",
"par1",
",",
"par2",
",",
"par3",
",",
"par4",
")",
")",
"{",
"return",
"true",
";",
"}",
"int",
"i",
"=",
"par0IBlockAccess",
".",
"getBlockId",
"(",
"par1",
",",
"par2",
",",
"par3",
")",
";",
"if",
"(",
"i",
"==",
"Block",
".",
"redstoneRepeaterActive",
".",
"blockID",
")",
"{",
"int",
"j",
"=",
"par0IBlockAccess",
".",
"getBlockMetadata",
"(",
"par1",
",",
"par2",
",",
"par3",
")",
";",
"return",
"par4",
"==",
"(",
"j",
"&",
"3",
")",
";",
"}",
"else",
"{",
"return",
"false",
";",
"}",
"}",
"}",
"</s>"
] |
9,350 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"LinkedList",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"StructureMineshaftStart",
"extends",
"StructureStart",
"{",
"public",
"StructureMineshaftStart",
"(",
"World",
"par1World",
",",
"Random",
"par2Random",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"ComponentMineshaftRoom",
"componentmineshaftroom",
"=",
"new",
"ComponentMineshaftRoom",
"(",
"0",
",",
"par2Random",
",",
"(",
"par3",
"<<",
"4",
")",
"+",
"2",
",",
"(",
"par4",
"<<",
"4",
")",
"+",
"2",
")",
";",
"components",
".",
"add",
"(",
"componentmineshaftroom",
")",
";",
"componentmineshaftroom",
".",
"buildComponent",
"(",
"componentmineshaftroom",
",",
"components",
",",
"par2Random",
")",
";",
"updateBoundingBox",
"(",
")",
";",
"markAvailableHeight",
"(",
"par1World",
",",
"par2Random",
",",
"10",
")",
";",
"}",
"}",
"</s>"
] |
9,351 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"enum",
"EnumCreatureType",
"{",
"monster",
"(",
"net",
".",
"minecraft",
".",
"src",
".",
"IMob",
".",
"class",
",",
"70",
",",
"Material",
".",
"air",
",",
"false",
")",
",",
"creature",
"(",
"net",
".",
"minecraft",
".",
"src",
".",
"EntityAnimal",
".",
"class",
",",
"15",
",",
"Material",
".",
"air",
",",
"true",
")",
",",
"waterCreature",
"(",
"net",
".",
"minecraft",
".",
"src",
".",
"EntityWaterMob",
".",
"class",
",",
"5",
",",
"Material",
".",
"water",
",",
"true",
")",
";",
"private",
"final",
"Class",
"creatureClass",
";",
"private",
"final",
"int",
"maxNumberOfCreature",
";",
"private",
"final",
"Material",
"creatureMaterial",
";",
"private",
"final",
"boolean",
"isPeacefulCreature",
";",
"private",
"EnumCreatureType",
"(",
"Class",
"par3Class",
",",
"int",
"par4",
",",
"Material",
"par5Material",
",",
"boolean",
"par6",
")",
"{",
"creatureClass",
"=",
"par3Class",
";",
"maxNumberOfCreature",
"=",
"par4",
";",
"creatureMaterial",
"=",
"par5Material",
";",
"isPeacefulCreature",
"=",
"par6",
";",
"}",
"public",
"Class",
"getCreatureClass",
"(",
")",
"{",
"return",
"creatureClass",
";",
"}",
"public",
"int",
"getMaxNumberOfCreature",
"(",
")",
"{",
"return",
"maxNumberOfCreature",
";",
"}",
"public",
"Material",
"getCreatureMaterial",
"(",
")",
"{",
"return",
"creatureMaterial",
";",
"}",
"public",
"boolean",
"getPeacefulCreature",
"(",
")",
"{",
"return",
"isPeacefulCreature",
";",
"}",
"}",
"</s>"
] |
9,352 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"ComponentNetherBridgeEntrance",
"extends",
"ComponentNetherBridgePiece",
"{",
"public",
"ComponentNetherBridgeEntrance",
"(",
"int",
"par1",
",",
"Random",
"par2Random",
",",
"StructureBoundingBox",
"par3StructureBoundingBox",
",",
"int",
"par4",
")",
"{",
"super",
"(",
"par1",
")",
";",
"coordBaseMode",
"=",
"par4",
";",
"boundingBox",
"=",
"par3StructureBoundingBox",
";",
"}",
"public",
"void",
"buildComponent",
"(",
"StructureComponent",
"par1StructureComponent",
",",
"List",
"par2List",
",",
"Random",
"par3Random",
")",
"{",
"getNextComponentNormal",
"(",
"(",
"ComponentNetherBridgeStartPiece",
")",
"par1StructureComponent",
",",
"par2List",
",",
"par3Random",
",",
"5",
",",
"3",
",",
"true",
")",
";",
"}",
"public",
"static",
"ComponentNetherBridgeEntrance",
"createValidComponent",
"(",
"List",
"par0List",
",",
"Random",
"par1Random",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
",",
"int",
"par6",
")",
"{",
"StructureBoundingBox",
"structureboundingbox",
"=",
"StructureBoundingBox",
".",
"getComponentToAddBoundingBox",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"-",
"5",
",",
"-",
"3",
",",
"0",
",",
"13",
",",
"14",
",",
"13",
",",
"par5",
")",
";",
"if",
"(",
"!",
"isAboveGround",
"(",
"structureboundingbox",
")",
"||",
"StructureComponent",
".",
"findIntersecting",
"(",
"par0List",
",",
"structureboundingbox",
")",
"!=",
"null",
")",
"{",
"return",
"null",
";",
"}",
"else",
"{",
"return",
"new",
"ComponentNetherBridgeEntrance",
"(",
"par6",
",",
"par1Random",
",",
"structureboundingbox",
",",
"par5",
")",
";",
"}",
"}",
"public",
"boolean",
"addComponentParts",
"(",
"World",
"par1World",
",",
"Random",
"par2Random",
",",
"StructureBoundingBox",
"par3StructureBoundingBox",
")",
"{",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"0",
",",
"3",
",",
"0",
",",
"12",
",",
"4",
",",
"12",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"0",
",",
"5",
",",
"0",
",",
"12",
",",
"13",
",",
"12",
",",
"0",
",",
"0",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"0",
",",
"5",
",",
"0",
",",
"1",
",",
"12",
",",
"12",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"11",
",",
"5",
",",
"0",
",",
"12",
",",
"12",
",",
"12",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"2",
",",
"5",
",",
"11",
",",
"4",
",",
"12",
",",
"12",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"8",
",",
"5",
",",
"11",
",",
"10",
",",
"12",
",",
"12",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"5",
",",
"9",
",",
"11",
",",
"7",
",",
"12",
",",
"12",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"2",
",",
"5",
",",
"0",
",",
"4",
",",
"12",
",",
"1",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"8",
",",
"5",
",",
"0",
",",
"10",
",",
"12",
",",
"1",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"5",
",",
"9",
",",
"0",
",",
"7",
",",
"12",
",",
"1",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"2",
",",
"11",
",",
"2",
",",
"10",
",",
"12",
",",
"10",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"5",
",",
"8",
",",
"0",
",",
"7",
",",
"8",
",",
"0",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"false",
")",
";",
"for",
"(",
"int",
"i",
"=",
"1",
";",
"i",
"<=",
"11",
";",
"i",
"+=",
"2",
")",
"{",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"i",
",",
"10",
",",
"0",
",",
"i",
",",
"11",
",",
"0",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"i",
",",
"10",
",",
"12",
",",
"i",
",",
"11",
",",
"12",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"0",
",",
"10",
",",
"i",
",",
"0",
",",
"11",
",",
"i",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"12",
",",
"10",
",",
"i",
",",
"12",
",",
"11",
",",
"i",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"false",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"0",
",",
"i",
",",
"13",
",",
"0",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"0",
",",
"i",
",",
"13",
",",
"12",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"0",
",",
"0",
",",
"13",
",",
"i",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"0",
",",
"12",
",",
"13",
",",
"i",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"0",
",",
"i",
"+",
"1",
",",
"13",
",",
"0",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"0",
",",
"i",
"+",
"1",
",",
"13",
",",
"12",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"0",
",",
"0",
",",
"13",
",",
"i",
"+",
"1",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"0",
",",
"12",
",",
"13",
",",
"i",
"+",
"1",
",",
"par3StructureBoundingBox",
")",
";",
"}",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"0",
",",
"0",
",",
"13",
",",
"0",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"0",
",",
"0",
",",
"13",
",",
"12",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"0",
",",
"0",
",",
"13",
",",
"0",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"0",
",",
"12",
",",
"13",
",",
"0",
",",
"par3StructureBoundingBox",
")",
";",
"for",
"(",
"int",
"j",
"=",
"3",
";",
"j",
"<=",
"9",
";",
"j",
"+=",
"2",
")",
"{",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"1",
",",
"7",
",",
"j",
",",
"1",
",",
"8",
",",
"j",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"11",
",",
"7",
",",
"j",
",",
"11",
",",
"8",
",",
"j",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"false",
")",
";",
"}",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"4",
",",
"2",
",",
"0",
",",
"8",
",",
"2",
",",
"12",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"0",
",",
"2",
",",
"4",
",",
"12",
",",
"2",
",",
"8",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"4",
",",
"0",
",",
"0",
",",
"8",
",",
"1",
",",
"3",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"4",
",",
"0",
",",
"9",
",",
"8",
",",
"1",
",",
"12",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"0",
",",
"0",
",",
"4",
",",
"3",
",",
"1",
",",
"8",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"9",
",",
"0",
",",
"4",
",",
"12",
",",
"1",
",",
"8",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"for",
"(",
"int",
"k",
"=",
"4",
";",
"k",
"<=",
"8",
";",
"k",
"++",
")",
"{",
"for",
"(",
"int",
"j1",
"=",
"0",
";",
"j1",
"<=",
"2",
";",
"j1",
"++",
")",
"{",
"fillCurrentPositionBlocksDownwards",
"(",
"par1World",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"0",
",",
"k",
",",
"-",
"1",
",",
"j1",
",",
"par3StructureBoundingBox",
")",
";",
"fillCurrentPositionBlocksDownwards",
"(",
"par1World",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"0",
",",
"k",
",",
"-",
"1",
",",
"12",
"-",
"j1",
",",
"par3StructureBoundingBox",
")",
";",
"}",
"}",
"for",
"(",
"int",
"l",
"=",
"0",
";",
"l",
"<=",
"2",
";",
"l",
"++",
")",
"{",
"for",
"(",
"int",
"k1",
"=",
"4",
";",
"k1",
"<=",
"8",
";",
"k1",
"++",
")",
"{",
"fillCurrentPositionBlocksDownwards",
"(",
"par1World",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"0",
",",
"l",
",",
"-",
"1",
",",
"k1",
",",
"par3StructureBoundingBox",
")",
";",
"fillCurrentPositionBlocksDownwards",
"(",
"par1World",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"0",
",",
"12",
"-",
"l",
",",
"-",
"1",
",",
"k1",
",",
"par3StructureBoundingBox",
")",
";",
"}",
"}",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"5",
",",
"5",
",",
"5",
",",
"7",
",",
"5",
",",
"7",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"6",
",",
"1",
",",
"6",
",",
"6",
",",
"4",
",",
"6",
",",
"0",
",",
"0",
",",
"false",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"0",
",",
"6",
",",
"0",
",",
"6",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"lavaMoving",
".",
"blockID",
",",
"0",
",",
"6",
",",
"5",
",",
"6",
",",
"par3StructureBoundingBox",
")",
";",
"int",
"i1",
"=",
"getXWithOffset",
"(",
"6",
",",
"6",
")",
";",
"int",
"l1",
"=",
"getYWithOffset",
"(",
"5",
")",
";",
"int",
"i2",
"=",
"getZWithOffset",
"(",
"6",
",",
"6",
")",
";",
"if",
"(",
"par3StructureBoundingBox",
".",
"isVecInside",
"(",
"i1",
",",
"l1",
",",
"i2",
")",
")",
"{",
"par1World",
".",
"scheduledUpdatesAreImmediate",
"=",
"true",
";",
"Block",
".",
"blocksList",
"[",
"Block",
".",
"lavaMoving",
".",
"blockID",
"]",
".",
"updateTick",
"(",
"par1World",
",",
"i1",
",",
"l1",
",",
"i2",
",",
"par2Random",
")",
";",
"par1World",
".",
"scheduledUpdatesAreImmediate",
"=",
"false",
";",
"}",
"return",
"true",
";",
"}",
"}",
"</s>"
] |
9,353 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"class",
"TileEntitySign",
"extends",
"TileEntity",
"{",
"public",
"String",
"signText",
"[",
"]",
"=",
"{",
"\"\"",
",",
"\"\"",
",",
"\"\"",
",",
"\"\"",
"}",
";",
"public",
"int",
"lineBeingEdited",
";",
"private",
"boolean",
"isEditable",
";",
"public",
"TileEntitySign",
"(",
")",
"{",
"lineBeingEdited",
"=",
"-",
"1",
";",
"isEditable",
"=",
"true",
";",
"}",
"public",
"void",
"writeToNBT",
"(",
"NBTTagCompound",
"par1NBTTagCompound",
")",
"{",
"super",
".",
"writeToNBT",
"(",
"par1NBTTagCompound",
")",
";",
"par1NBTTagCompound",
".",
"setString",
"(",
"\"Text1\"",
",",
"signText",
"[",
"0",
"]",
")",
";",
"par1NBTTagCompound",
".",
"setString",
"(",
"\"Text2\"",
",",
"signText",
"[",
"1",
"]",
")",
";",
"par1NBTTagCompound",
".",
"setString",
"(",
"\"Text3\"",
",",
"signText",
"[",
"2",
"]",
")",
";",
"par1NBTTagCompound",
".",
"setString",
"(",
"\"Text4\"",
",",
"signText",
"[",
"3",
"]",
")",
";",
"}",
"public",
"void",
"readFromNBT",
"(",
"NBTTagCompound",
"par1NBTTagCompound",
")",
"{",
"isEditable",
"=",
"false",
";",
"super",
".",
"readFromNBT",
"(",
"par1NBTTagCompound",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"4",
";",
"i",
"++",
")",
"{",
"signText",
"[",
"i",
"]",
"=",
"par1NBTTagCompound",
".",
"getString",
"(",
"(",
"new",
"StringBuilder",
"(",
")",
")",
".",
"append",
"(",
"\"Text\"",
")",
".",
"append",
"(",
"i",
"+",
"1",
")",
".",
"toString",
"(",
")",
")",
";",
"if",
"(",
"signText",
"[",
"i",
"]",
".",
"length",
"(",
")",
">",
"15",
")",
"{",
"signText",
"[",
"i",
"]",
"=",
"signText",
"[",
"i",
"]",
".",
"substring",
"(",
"0",
",",
"15",
")",
";",
"}",
"}",
"}",
"public",
"Packet",
"getDescriptionPacket",
"(",
")",
"{",
"String",
"as",
"[",
"]",
"=",
"new",
"String",
"[",
"4",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"4",
";",
"i",
"++",
")",
"{",
"as",
"[",
"i",
"]",
"=",
"signText",
"[",
"i",
"]",
";",
"}",
"return",
"new",
"Packet130UpdateSign",
"(",
"xCoord",
",",
"yCoord",
",",
"zCoord",
",",
"as",
")",
";",
"}",
"public",
"boolean",
"isEditable",
"(",
")",
"{",
"return",
"isEditable",
";",
"}",
"}",
"</s>"
] |
9,354 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"io",
".",
"*",
";",
"public",
"class",
"Packet30Entity",
"extends",
"Packet",
"{",
"public",
"int",
"entityId",
";",
"public",
"byte",
"xPosition",
";",
"public",
"byte",
"yPosition",
";",
"public",
"byte",
"zPosition",
";",
"public",
"byte",
"yaw",
";",
"public",
"byte",
"pitch",
";",
"public",
"boolean",
"rotating",
";",
"public",
"Packet30Entity",
"(",
")",
"{",
"rotating",
"=",
"false",
";",
"}",
"public",
"Packet30Entity",
"(",
"int",
"par1",
")",
"{",
"rotating",
"=",
"false",
";",
"entityId",
"=",
"par1",
";",
"}",
"public",
"void",
"readPacketData",
"(",
"DataInputStream",
"par1DataInputStream",
")",
"throws",
"IOException",
"{",
"entityId",
"=",
"par1DataInputStream",
".",
"readInt",
"(",
")",
";",
"}",
"public",
"void",
"writePacketData",
"(",
"DataOutputStream",
"par1DataOutputStream",
")",
"throws",
"IOException",
"{",
"par1DataOutputStream",
".",
"writeInt",
"(",
"entityId",
")",
";",
"}",
"public",
"void",
"processPacket",
"(",
"NetHandler",
"par1NetHandler",
")",
"{",
"par1NetHandler",
".",
"handleEntity",
"(",
"this",
")",
";",
"}",
"public",
"int",
"getPacketSize",
"(",
")",
"{",
"return",
"4",
";",
"}",
"}",
"</s>"
] |
9,355 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"io",
".",
"*",
";",
"public",
"class",
"NBTTagFloat",
"extends",
"NBTBase",
"{",
"public",
"float",
"data",
";",
"public",
"NBTTagFloat",
"(",
"String",
"par1Str",
")",
"{",
"super",
"(",
"par1Str",
")",
";",
"}",
"public",
"NBTTagFloat",
"(",
"String",
"par1Str",
",",
"float",
"par2",
")",
"{",
"super",
"(",
"par1Str",
")",
";",
"data",
"=",
"par2",
";",
"}",
"void",
"write",
"(",
"DataOutput",
"par1DataOutput",
")",
"throws",
"IOException",
"{",
"par1DataOutput",
".",
"writeFloat",
"(",
"data",
")",
";",
"}",
"void",
"load",
"(",
"DataInput",
"par1DataInput",
")",
"throws",
"IOException",
"{",
"data",
"=",
"par1DataInput",
".",
"readFloat",
"(",
")",
";",
"}",
"public",
"byte",
"getId",
"(",
")",
"{",
"return",
"5",
";",
"}",
"public",
"String",
"toString",
"(",
")",
"{",
"return",
"(",
"new",
"StringBuilder",
"(",
")",
")",
".",
"append",
"(",
"\"\"",
")",
".",
"append",
"(",
"data",
")",
".",
"toString",
"(",
")",
";",
"}",
"public",
"NBTBase",
"copy",
"(",
")",
"{",
"return",
"new",
"NBTTagFloat",
"(",
"getName",
"(",
")",
",",
"data",
")",
";",
"}",
"public",
"boolean",
"equals",
"(",
"Object",
"par1Obj",
")",
"{",
"if",
"(",
"super",
".",
"equals",
"(",
"par1Obj",
")",
")",
"{",
"NBTTagFloat",
"nbttagfloat",
"=",
"(",
"NBTTagFloat",
")",
"par1Obj",
";",
"return",
"data",
"==",
"nbttagfloat",
".",
"data",
";",
"}",
"else",
"{",
"return",
"false",
";",
"}",
"}",
"public",
"int",
"hashCode",
"(",
")",
"{",
"return",
"super",
".",
"hashCode",
"(",
")",
"^",
"Float",
".",
"floatToIntBits",
"(",
"data",
")",
";",
"}",
"}",
"</s>"
] |
9,356 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"class",
"BlockBreakable",
"extends",
"Block",
"{",
"private",
"boolean",
"localFlag",
";",
"protected",
"BlockBreakable",
"(",
"int",
"par1",
",",
"int",
"par2",
",",
"Material",
"par3Material",
",",
"boolean",
"par4",
")",
"{",
"super",
"(",
"par1",
",",
"par2",
",",
"par3Material",
")",
";",
"localFlag",
"=",
"par4",
";",
"}",
"public",
"boolean",
"isOpaqueCube",
"(",
")",
"{",
"return",
"false",
";",
"}",
"}",
"</s>"
] |
9,357 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"BlockSnow",
"extends",
"Block",
"{",
"protected",
"BlockSnow",
"(",
"int",
"par1",
",",
"int",
"par2",
")",
"{",
"super",
"(",
"par1",
",",
"par2",
",",
"Material",
".",
"snow",
")",
";",
"setBlockBounds",
"(",
"0.0F",
",",
"0.0F",
",",
"0.0F",
",",
"1.0F",
",",
"0.125F",
",",
"1.0F",
")",
";",
"setTickRandomly",
"(",
"true",
")",
";",
"}",
"public",
"AxisAlignedBB",
"getCollisionBoundingBoxFromPool",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"int",
"i",
"=",
"par1World",
".",
"getBlockMetadata",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
"&",
"7",
";",
"if",
"(",
"i",
">=",
"3",
")",
"{",
"return",
"AxisAlignedBB",
".",
"getBoundingBoxFromPool",
"(",
"(",
"double",
")",
"par2",
"+",
"minX",
",",
"(",
"double",
")",
"par3",
"+",
"minY",
",",
"(",
"double",
")",
"par4",
"+",
"minZ",
",",
"(",
"double",
")",
"par2",
"+",
"maxX",
",",
"(",
"float",
")",
"par3",
"+",
"0.5F",
",",
"(",
"double",
")",
"par4",
"+",
"maxZ",
")",
";",
"}",
"else",
"{",
"return",
"null",
";",
"}",
"}",
"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",
")",
"&",
"7",
";",
"float",
"f",
"=",
"(",
"float",
")",
"(",
"2",
"*",
"(",
"1",
"+",
"i",
")",
")",
"/",
"16F",
";",
"setBlockBounds",
"(",
"0.0F",
",",
"0.0F",
",",
"0.0F",
",",
"1.0F",
",",
"f",
",",
"1.0F",
")",
";",
"}",
"public",
"boolean",
"canPlaceBlockAt",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"int",
"i",
"=",
"par1World",
".",
"getBlockId",
"(",
"par2",
",",
"par3",
"-",
"1",
",",
"par4",
")",
";",
"if",
"(",
"i",
"==",
"0",
"||",
"i",
"!=",
"Block",
".",
"leaves",
".",
"blockID",
"&&",
"!",
"Block",
".",
"blocksList",
"[",
"i",
"]",
".",
"isOpaqueCube",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",
"else",
"{",
"return",
"par1World",
".",
"getBlockMaterial",
"(",
"par2",
",",
"par3",
"-",
"1",
",",
"par4",
")",
".",
"blocksMovement",
"(",
")",
";",
"}",
"}",
"public",
"void",
"onNeighborBlockChange",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
")",
"{",
"canSnowStay",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"}",
"private",
"boolean",
"canSnowStay",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"if",
"(",
"!",
"canPlaceBlockAt",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
")",
")",
"{",
"dropBlockAsItem",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
",",
"par1World",
".",
"getBlockMetadata",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
",",
"0",
")",
";",
"par1World",
".",
"setBlockWithNotify",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"0",
")",
";",
"return",
"false",
";",
"}",
"else",
"{",
"return",
"true",
";",
"}",
"}",
"public",
"void",
"harvestBlock",
"(",
"World",
"par1World",
",",
"EntityPlayer",
"par2EntityPlayer",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
",",
"int",
"par6",
")",
"{",
"int",
"i",
"=",
"Item",
".",
"snowball",
".",
"shiftedIndex",
";",
"float",
"f",
"=",
"0.7F",
";",
"double",
"d",
"=",
"(",
"double",
")",
"(",
"par1World",
".",
"rand",
".",
"nextFloat",
"(",
")",
"*",
"f",
")",
"+",
"(",
"double",
")",
"(",
"1.0F",
"-",
"f",
")",
"*",
"0.5D",
";",
"double",
"d1",
"=",
"(",
"double",
")",
"(",
"par1World",
".",
"rand",
".",
"nextFloat",
"(",
")",
"*",
"f",
")",
"+",
"(",
"double",
")",
"(",
"1.0F",
"-",
"f",
")",
"*",
"0.5D",
";",
"double",
"d2",
"=",
"(",
"double",
")",
"(",
"par1World",
".",
"rand",
".",
"nextFloat",
"(",
")",
"*",
"f",
")",
"+",
"(",
"double",
")",
"(",
"1.0F",
"-",
"f",
")",
"*",
"0.5D",
";",
"EntityItem",
"entityitem",
"=",
"new",
"EntityItem",
"(",
"par1World",
",",
"(",
"double",
")",
"par3",
"+",
"d",
",",
"(",
"double",
")",
"par4",
"+",
"d1",
",",
"(",
"double",
")",
"par5",
"+",
"d2",
",",
"new",
"ItemStack",
"(",
"i",
",",
"1",
",",
"0",
")",
")",
";",
"entityitem",
".",
"delayBeforeCanPickup",
"=",
"10",
";",
"par1World",
".",
"spawnEntityInWorld",
"(",
"entityitem",
")",
";",
"par1World",
".",
"setBlockWithNotify",
"(",
"par3",
",",
"par4",
",",
"par5",
",",
"0",
")",
";",
"par2EntityPlayer",
".",
"addStat",
"(",
"StatList",
".",
"mineBlockStatArray",
"[",
"blockID",
"]",
",",
"1",
")",
";",
"}",
"public",
"int",
"idDropped",
"(",
"int",
"par1",
",",
"Random",
"par2Random",
",",
"int",
"par3",
")",
"{",
"return",
"Item",
".",
"snowball",
".",
"shiftedIndex",
";",
"}",
"public",
"int",
"quantityDropped",
"(",
"Random",
"par1Random",
")",
"{",
"return",
"0",
";",
"}",
"public",
"void",
"updateTick",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"Random",
"par5Random",
")",
"{",
"if",
"(",
"par1World",
".",
"getSavedLightValue",
"(",
"EnumSkyBlock",
".",
"Block",
",",
"par2",
",",
"par3",
",",
"par4",
")",
">",
"11",
")",
"{",
"dropBlockAsItem",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
",",
"par1World",
".",
"getBlockMetadata",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
",",
"0",
")",
";",
"par1World",
".",
"setBlockWithNotify",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"0",
")",
";",
"}",
"}",
"}",
"</s>"
] |
9,358 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"io",
".",
"*",
";",
"public",
"class",
"Packet8UpdateHealth",
"extends",
"Packet",
"{",
"public",
"int",
"healthMP",
";",
"public",
"int",
"food",
";",
"public",
"float",
"foodSaturation",
";",
"public",
"Packet8UpdateHealth",
"(",
")",
"{",
"}",
"public",
"Packet8UpdateHealth",
"(",
"int",
"par1",
",",
"int",
"par2",
",",
"float",
"par3",
")",
"{",
"healthMP",
"=",
"par1",
";",
"food",
"=",
"par2",
";",
"foodSaturation",
"=",
"par3",
";",
"}",
"public",
"void",
"readPacketData",
"(",
"DataInputStream",
"par1DataInputStream",
")",
"throws",
"IOException",
"{",
"healthMP",
"=",
"par1DataInputStream",
".",
"readShort",
"(",
")",
";",
"food",
"=",
"par1DataInputStream",
".",
"readShort",
"(",
")",
";",
"foodSaturation",
"=",
"par1DataInputStream",
".",
"readFloat",
"(",
")",
";",
"}",
"public",
"void",
"writePacketData",
"(",
"DataOutputStream",
"par1DataOutputStream",
")",
"throws",
"IOException",
"{",
"par1DataOutputStream",
".",
"writeShort",
"(",
"healthMP",
")",
";",
"par1DataOutputStream",
".",
"writeShort",
"(",
"food",
")",
";",
"par1DataOutputStream",
".",
"writeFloat",
"(",
"foodSaturation",
")",
";",
"}",
"public",
"void",
"processPacket",
"(",
"NetHandler",
"par1NetHandler",
")",
"{",
"par1NetHandler",
".",
"handleUpdateHealth",
"(",
"this",
")",
";",
"}",
"public",
"int",
"getPacketSize",
"(",
")",
"{",
"return",
"8",
";",
"}",
"}",
"</s>"
] |
9,359 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"io",
".",
"*",
";",
"public",
"class",
"NBTTagString",
"extends",
"NBTBase",
"{",
"public",
"String",
"data",
";",
"public",
"NBTTagString",
"(",
"String",
"par1Str",
")",
"{",
"super",
"(",
"par1Str",
")",
";",
"}",
"public",
"NBTTagString",
"(",
"String",
"par1Str",
",",
"String",
"par2Str",
")",
"{",
"super",
"(",
"par1Str",
")",
";",
"data",
"=",
"par2Str",
";",
"if",
"(",
"par2Str",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"\"",
")",
";",
"}",
"else",
"{",
"return",
";",
"}",
"}",
"void",
"write",
"(",
"DataOutput",
"par1DataOutput",
")",
"throws",
"IOException",
"{",
"par1DataOutput",
".",
"writeUTF",
"(",
"data",
")",
";",
"}",
"void",
"load",
"(",
"DataInput",
"par1DataInput",
")",
"throws",
"IOException",
"{",
"data",
"=",
"par1DataInput",
".",
"readUTF",
"(",
")",
";",
"}",
"public",
"byte",
"getId",
"(",
")",
"{",
"return",
"8",
";",
"}",
"public",
"String",
"toString",
"(",
")",
"{",
"return",
"(",
"new",
"StringBuilder",
"(",
")",
")",
".",
"append",
"(",
"\"\"",
")",
".",
"append",
"(",
"data",
")",
".",
"toString",
"(",
")",
";",
"}",
"public",
"NBTBase",
"copy",
"(",
")",
"{",
"return",
"new",
"NBTTagString",
"(",
"getName",
"(",
")",
",",
"data",
")",
";",
"}",
"public",
"boolean",
"equals",
"(",
"Object",
"par1Obj",
")",
"{",
"if",
"(",
"super",
".",
"equals",
"(",
"par1Obj",
")",
")",
"{",
"NBTTagString",
"nbttagstring",
"=",
"(",
"NBTTagString",
")",
"par1Obj",
";",
"return",
"data",
"==",
"null",
"&&",
"nbttagstring",
".",
"data",
"==",
"null",
"||",
"data",
"!=",
"null",
"&&",
"data",
".",
"equals",
"(",
"nbttagstring",
".",
"data",
")",
";",
"}",
"else",
"{",
"return",
"false",
";",
"}",
"}",
"public",
"int",
"hashCode",
"(",
")",
"{",
"return",
"super",
".",
"hashCode",
"(",
")",
"^",
"data",
".",
"hashCode",
"(",
")",
";",
"}",
"}",
"</s>"
] |
9,360 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"io",
".",
"*",
";",
"public",
"class",
"Packet108EnchantItem",
"extends",
"Packet",
"{",
"public",
"int",
"windowId",
";",
"public",
"int",
"enchantment",
";",
"public",
"Packet108EnchantItem",
"(",
")",
"{",
"}",
"public",
"void",
"processPacket",
"(",
"NetHandler",
"par1NetHandler",
")",
"{",
"par1NetHandler",
".",
"handleEnchantItem",
"(",
"this",
")",
";",
"}",
"public",
"void",
"readPacketData",
"(",
"DataInputStream",
"par1DataInputStream",
")",
"throws",
"IOException",
"{",
"windowId",
"=",
"par1DataInputStream",
".",
"readByte",
"(",
")",
";",
"enchantment",
"=",
"par1DataInputStream",
".",
"readByte",
"(",
")",
";",
"}",
"public",
"void",
"writePacketData",
"(",
"DataOutputStream",
"par1DataOutputStream",
")",
"throws",
"IOException",
"{",
"par1DataOutputStream",
".",
"writeByte",
"(",
"windowId",
")",
";",
"par1DataOutputStream",
".",
"writeByte",
"(",
"enchantment",
")",
";",
"}",
"public",
"int",
"getPacketSize",
"(",
")",
"{",
"return",
"2",
";",
"}",
"}",
"</s>"
] |
9,361 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"class",
"StructurePieceTreasure",
"extends",
"WeightedRandomChoice",
"{",
"public",
"int",
"itemID",
";",
"public",
"int",
"itemMetadata",
";",
"public",
"int",
"minItemStack",
";",
"public",
"int",
"maxItemStack",
";",
"public",
"StructurePieceTreasure",
"(",
"int",
"par1",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
")",
"{",
"super",
"(",
"par5",
")",
";",
"itemID",
"=",
"par1",
";",
"itemMetadata",
"=",
"par2",
";",
"minItemStack",
"=",
"par3",
";",
"maxItemStack",
"=",
"par4",
";",
"}",
"}",
"</s>"
] |
9,362 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"ComponentVillageHouse2",
"extends",
"ComponentVillage",
"{",
"private",
"static",
"final",
"StructurePieceTreasure",
"chestLoot",
"[",
"]",
";",
"private",
"int",
"averageGroundLevel",
";",
"private",
"boolean",
"hasMadeChest",
";",
"public",
"ComponentVillageHouse2",
"(",
"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",
"ComponentVillageHouse2",
"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",
",",
"10",
",",
"6",
",",
"7",
",",
"par5",
")",
";",
"if",
"(",
"!",
"canVillageGoDeeper",
"(",
"structureboundingbox",
")",
"||",
"StructureComponent",
".",
"findIntersecting",
"(",
"par0List",
",",
"structureboundingbox",
")",
"!=",
"null",
")",
"{",
"return",
"null",
";",
"}",
"else",
"{",
"return",
"new",
"ComponentVillageHouse2",
"(",
"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",
")",
"+",
"6",
")",
"-",
"1",
",",
"0",
")",
";",
"}",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"0",
",",
"1",
",",
"0",
",",
"9",
",",
"4",
",",
"6",
",",
"0",
",",
"0",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"0",
",",
"0",
",",
"0",
",",
"9",
",",
"0",
",",
"6",
",",
"Block",
".",
"cobblestone",
".",
"blockID",
",",
"Block",
".",
"cobblestone",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"0",
",",
"4",
",",
"0",
",",
"9",
",",
"4",
",",
"6",
",",
"Block",
".",
"cobblestone",
".",
"blockID",
",",
"Block",
".",
"cobblestone",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"0",
",",
"5",
",",
"0",
",",
"9",
",",
"5",
",",
"6",
",",
"Block",
".",
"stairSingle",
".",
"blockID",
",",
"Block",
".",
"stairSingle",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"1",
",",
"5",
",",
"1",
",",
"8",
",",
"5",
",",
"5",
",",
"0",
",",
"0",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"1",
",",
"1",
",",
"0",
",",
"2",
",",
"3",
",",
"0",
",",
"Block",
".",
"planks",
".",
"blockID",
",",
"Block",
".",
"planks",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"0",
",",
"1",
",",
"0",
",",
"0",
",",
"4",
",",
"0",
",",
"Block",
".",
"wood",
".",
"blockID",
",",
"Block",
".",
"wood",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"3",
",",
"1",
",",
"0",
",",
"3",
",",
"4",
",",
"0",
",",
"Block",
".",
"wood",
".",
"blockID",
",",
"Block",
".",
"wood",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"0",
",",
"1",
",",
"6",
",",
"0",
",",
"4",
",",
"6",
",",
"Block",
".",
"wood",
".",
"blockID",
",",
"Block",
".",
"wood",
".",
"blockID",
",",
"false",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"planks",
".",
"blockID",
",",
"0",
",",
"3",
",",
"3",
",",
"1",
",",
"par3StructureBoundingBox",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"3",
",",
"1",
",",
"2",
",",
"3",
",",
"3",
",",
"2",
",",
"Block",
".",
"planks",
".",
"blockID",
",",
"Block",
".",
"planks",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"4",
",",
"1",
",",
"3",
",",
"5",
",",
"3",
",",
"3",
",",
"Block",
".",
"planks",
".",
"blockID",
",",
"Block",
".",
"planks",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"0",
",",
"1",
",",
"1",
",",
"0",
",",
"3",
",",
"5",
",",
"Block",
".",
"planks",
".",
"blockID",
",",
"Block",
".",
"planks",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"1",
",",
"1",
",",
"6",
",",
"5",
",",
"3",
",",
"6",
",",
"Block",
".",
"planks",
".",
"blockID",
",",
"Block",
".",
"planks",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"5",
",",
"1",
",",
"0",
",",
"5",
",",
"3",
",",
"0",
",",
"Block",
".",
"fence",
".",
"blockID",
",",
"Block",
".",
"fence",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"9",
",",
"1",
",",
"0",
",",
"9",
",",
"3",
",",
"0",
",",
"Block",
".",
"fence",
".",
"blockID",
",",
"Block",
".",
"fence",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"6",
",",
"1",
",",
"4",
",",
"9",
",",
"4",
",",
"6",
",",
"Block",
".",
"cobblestone",
".",
"blockID",
",",
"Block",
".",
"cobblestone",
".",
"blockID",
",",
"false",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"lavaMoving",
".",
"blockID",
",",
"0",
",",
"7",
",",
"1",
",",
"5",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"lavaMoving",
".",
"blockID",
",",
"0",
",",
"8",
",",
"1",
",",
"5",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"fenceIron",
".",
"blockID",
",",
"0",
",",
"9",
",",
"2",
",",
"5",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"fenceIron",
".",
"blockID",
",",
"0",
",",
"9",
",",
"2",
",",
"4",
",",
"par3StructureBoundingBox",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"7",
",",
"2",
",",
"4",
",",
"8",
",",
"2",
",",
"5",
",",
"0",
",",
"0",
",",
"false",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"cobblestone",
".",
"blockID",
",",
"0",
",",
"6",
",",
"1",
",",
"3",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"stoneOvenIdle",
".",
"blockID",
",",
"0",
",",
"6",
",",
"2",
",",
"3",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"stoneOvenIdle",
".",
"blockID",
",",
"0",
",",
"6",
",",
"3",
",",
"3",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"stairDouble",
".",
"blockID",
",",
"0",
",",
"8",
",",
"1",
",",
"1",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"thinGlass",
".",
"blockID",
",",
"0",
",",
"0",
",",
"2",
",",
"2",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"thinGlass",
".",
"blockID",
",",
"0",
",",
"0",
",",
"2",
",",
"4",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"thinGlass",
".",
"blockID",
",",
"0",
",",
"2",
",",
"2",
",",
"6",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"thinGlass",
".",
"blockID",
",",
"0",
",",
"4",
",",
"2",
",",
"6",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"fence",
".",
"blockID",
",",
"0",
",",
"2",
",",
"1",
",",
"4",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"pressurePlatePlanks",
".",
"blockID",
",",
"0",
",",
"2",
",",
"2",
",",
"4",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"planks",
".",
"blockID",
",",
"0",
",",
"1",
",",
"1",
",",
"5",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"stairCompactPlanks",
".",
"blockID",
",",
"getMetadataWithOffset",
"(",
"Block",
".",
"stairCompactPlanks",
".",
"blockID",
",",
"3",
")",
",",
"2",
",",
"1",
",",
"5",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"stairCompactPlanks",
".",
"blockID",
",",
"getMetadataWithOffset",
"(",
"Block",
".",
"stairCompactPlanks",
".",
"blockID",
",",
"1",
")",
",",
"1",
",",
"1",
",",
"4",
",",
"par3StructureBoundingBox",
")",
";",
"if",
"(",
"!",
"hasMadeChest",
")",
"{",
"int",
"i",
"=",
"getYWithOffset",
"(",
"1",
")",
";",
"int",
"l",
"=",
"getXWithOffset",
"(",
"5",
",",
"5",
")",
";",
"int",
"j1",
"=",
"getZWithOffset",
"(",
"5",
",",
"5",
")",
";",
"if",
"(",
"par3StructureBoundingBox",
".",
"isVecInside",
"(",
"l",
",",
"i",
",",
"j1",
")",
")",
"{",
"hasMadeChest",
"=",
"true",
";",
"createTreasureChestAtCurrentPosition",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"par2Random",
",",
"5",
",",
"1",
",",
"5",
",",
"chestLoot",
",",
"3",
"+",
"par2Random",
".",
"nextInt",
"(",
"6",
")",
")",
";",
"}",
"}",
"for",
"(",
"int",
"j",
"=",
"6",
";",
"j",
"<=",
"8",
";",
"j",
"++",
")",
"{",
"if",
"(",
"getBlockIdAtCurrentPosition",
"(",
"par1World",
",",
"j",
",",
"0",
",",
"-",
"1",
",",
"par3StructureBoundingBox",
")",
"==",
"0",
"&&",
"getBlockIdAtCurrentPosition",
"(",
"par1World",
",",
"j",
",",
"-",
"1",
",",
"-",
"1",
",",
"par3StructureBoundingBox",
")",
"!=",
"0",
")",
"{",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"stairCompactCobblestone",
".",
"blockID",
",",
"getMetadataWithOffset",
"(",
"Block",
".",
"stairCompactCobblestone",
".",
"blockID",
",",
"3",
")",
",",
"j",
",",
"0",
",",
"-",
"1",
",",
"par3StructureBoundingBox",
")",
";",
"}",
"}",
"for",
"(",
"int",
"k",
"=",
"0",
";",
"k",
"<",
"7",
";",
"k",
"++",
")",
"{",
"for",
"(",
"int",
"i1",
"=",
"0",
";",
"i1",
"<",
"10",
";",
"i1",
"++",
")",
"{",
"clearCurrentPositionBlocksUpwards",
"(",
"par1World",
",",
"i1",
",",
"6",
",",
"k",
",",
"par3StructureBoundingBox",
")",
";",
"fillCurrentPositionBlocksDownwards",
"(",
"par1World",
",",
"Block",
".",
"cobblestone",
".",
"blockID",
",",
"0",
",",
"i1",
",",
"-",
"1",
",",
"k",
",",
"par3StructureBoundingBox",
")",
";",
"}",
"}",
"spawnVillagers",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"7",
",",
"1",
",",
"1",
",",
"1",
")",
";",
"return",
"true",
";",
"}",
"protected",
"int",
"getVillagerType",
"(",
"int",
"par1",
")",
"{",
"return",
"3",
";",
"}",
"static",
"{",
"chestLoot",
"=",
"(",
"new",
"StructurePieceTreasure",
"[",
"]",
"{",
"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",
".",
"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",
"(",
"Block",
".",
"obsidian",
".",
"blockID",
",",
"0",
",",
"3",
",",
"7",
",",
"5",
")",
",",
"new",
"StructurePieceTreasure",
"(",
"Block",
".",
"sapling",
".",
"blockID",
",",
"0",
",",
"3",
",",
"7",
",",
"5",
")",
"}",
")",
";",
"}",
"}",
"</s>"
] |
9,363 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"class",
"ChunkCoordinates",
"implements",
"Comparable",
"{",
"public",
"int",
"posX",
";",
"public",
"int",
"posY",
";",
"public",
"int",
"posZ",
";",
"public",
"ChunkCoordinates",
"(",
")",
"{",
"}",
"public",
"ChunkCoordinates",
"(",
"int",
"par1",
",",
"int",
"par2",
",",
"int",
"par3",
")",
"{",
"posX",
"=",
"par1",
";",
"posY",
"=",
"par2",
";",
"posZ",
"=",
"par3",
";",
"}",
"public",
"ChunkCoordinates",
"(",
"ChunkCoordinates",
"par1ChunkCoordinates",
")",
"{",
"posX",
"=",
"par1ChunkCoordinates",
".",
"posX",
";",
"posY",
"=",
"par1ChunkCoordinates",
".",
"posY",
";",
"posZ",
"=",
"par1ChunkCoordinates",
".",
"posZ",
";",
"}",
"public",
"boolean",
"equals",
"(",
"Object",
"par1Obj",
")",
"{",
"if",
"(",
"!",
"(",
"par1Obj",
"instanceof",
"ChunkCoordinates",
")",
")",
"{",
"return",
"false",
";",
"}",
"else",
"{",
"ChunkCoordinates",
"chunkcoordinates",
"=",
"(",
"ChunkCoordinates",
")",
"par1Obj",
";",
"return",
"posX",
"==",
"chunkcoordinates",
".",
"posX",
"&&",
"posY",
"==",
"chunkcoordinates",
".",
"posY",
"&&",
"posZ",
"==",
"chunkcoordinates",
".",
"posZ",
";",
"}",
"}",
"public",
"int",
"hashCode",
"(",
")",
"{",
"return",
"posX",
"+",
"posZ",
"<<",
"8",
"+",
"posY",
"<<",
"16",
";",
"}",
"public",
"int",
"compareChunkCoordinate",
"(",
"ChunkCoordinates",
"par1ChunkCoordinates",
")",
"{",
"if",
"(",
"posY",
"==",
"par1ChunkCoordinates",
".",
"posY",
")",
"{",
"if",
"(",
"posZ",
"==",
"par1ChunkCoordinates",
".",
"posZ",
")",
"{",
"return",
"posX",
"-",
"par1ChunkCoordinates",
".",
"posX",
";",
"}",
"else",
"{",
"return",
"posZ",
"-",
"par1ChunkCoordinates",
".",
"posZ",
";",
"}",
"}",
"else",
"{",
"return",
"posY",
"-",
"par1ChunkCoordinates",
".",
"posY",
";",
"}",
"}",
"public",
"void",
"set",
"(",
"int",
"par1",
",",
"int",
"par2",
",",
"int",
"par3",
")",
"{",
"posX",
"=",
"par1",
";",
"posY",
"=",
"par2",
";",
"posZ",
"=",
"par3",
";",
"}",
"public",
"double",
"getEuclideanDistanceTo",
"(",
"int",
"par1",
",",
"int",
"par2",
",",
"int",
"par3",
")",
"{",
"int",
"i",
"=",
"posX",
"-",
"par1",
";",
"int",
"j",
"=",
"posY",
"-",
"par2",
";",
"int",
"k",
"=",
"posZ",
"-",
"par3",
";",
"return",
"Math",
".",
"sqrt",
"(",
"i",
"*",
"i",
"+",
"j",
"*",
"j",
"+",
"k",
"*",
"k",
")",
";",
"}",
"public",
"float",
"getDistanceSquared",
"(",
"int",
"par1",
",",
"int",
"par2",
",",
"int",
"par3",
")",
"{",
"int",
"i",
"=",
"posX",
"-",
"par1",
";",
"int",
"j",
"=",
"posY",
"-",
"par2",
";",
"int",
"k",
"=",
"posZ",
"-",
"par3",
";",
"return",
"(",
"float",
")",
"(",
"i",
"*",
"i",
"+",
"j",
"*",
"j",
"+",
"k",
"*",
"k",
")",
";",
"}",
"public",
"int",
"compareTo",
"(",
"Object",
"par1Obj",
")",
"{",
"return",
"compareChunkCoordinate",
"(",
"(",
"ChunkCoordinates",
")",
"par1Obj",
")",
";",
"}",
"}",
"</s>"
] |
9,364 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"final",
"class",
"StepSoundStone",
"extends",
"StepSound",
"{",
"StepSoundStone",
"(",
"String",
"par1Str",
",",
"float",
"par2",
",",
"float",
"par3",
")",
"{",
"super",
"(",
"par1Str",
",",
"par2",
",",
"par3",
")",
";",
"}",
"}",
"</s>"
] |
9,365 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"io",
".",
"*",
";",
"public",
"class",
"Packet71Weather",
"extends",
"Packet",
"{",
"public",
"int",
"entityID",
";",
"public",
"int",
"posX",
";",
"public",
"int",
"posY",
";",
"public",
"int",
"posZ",
";",
"public",
"int",
"isLightningBolt",
";",
"public",
"Packet71Weather",
"(",
")",
"{",
"}",
"public",
"Packet71Weather",
"(",
"Entity",
"par1Entity",
")",
"{",
"entityID",
"=",
"par1Entity",
".",
"entityId",
";",
"posX",
"=",
"MathHelper",
".",
"floor_double",
"(",
"par1Entity",
".",
"posX",
"*",
"32D",
")",
";",
"posY",
"=",
"MathHelper",
".",
"floor_double",
"(",
"par1Entity",
".",
"posY",
"*",
"32D",
")",
";",
"posZ",
"=",
"MathHelper",
".",
"floor_double",
"(",
"par1Entity",
".",
"posZ",
"*",
"32D",
")",
";",
"if",
"(",
"par1Entity",
"instanceof",
"EntityLightningBolt",
")",
"{",
"isLightningBolt",
"=",
"1",
";",
"}",
"}",
"public",
"void",
"readPacketData",
"(",
"DataInputStream",
"par1DataInputStream",
")",
"throws",
"IOException",
"{",
"entityID",
"=",
"par1DataInputStream",
".",
"readInt",
"(",
")",
";",
"isLightningBolt",
"=",
"par1DataInputStream",
".",
"readByte",
"(",
")",
";",
"posX",
"=",
"par1DataInputStream",
".",
"readInt",
"(",
")",
";",
"posY",
"=",
"par1DataInputStream",
".",
"readInt",
"(",
")",
";",
"posZ",
"=",
"par1DataInputStream",
".",
"readInt",
"(",
")",
";",
"}",
"public",
"void",
"writePacketData",
"(",
"DataOutputStream",
"par1DataOutputStream",
")",
"throws",
"IOException",
"{",
"par1DataOutputStream",
".",
"writeInt",
"(",
"entityID",
")",
";",
"par1DataOutputStream",
".",
"writeByte",
"(",
"isLightningBolt",
")",
";",
"par1DataOutputStream",
".",
"writeInt",
"(",
"posX",
")",
";",
"par1DataOutputStream",
".",
"writeInt",
"(",
"posY",
")",
";",
"par1DataOutputStream",
".",
"writeInt",
"(",
"posZ",
")",
";",
"}",
"public",
"void",
"processPacket",
"(",
"NetHandler",
"par1NetHandler",
")",
"{",
"par1NetHandler",
".",
"handleWeather",
"(",
"this",
")",
";",
"}",
"public",
"int",
"getPacketSize",
"(",
")",
"{",
"return",
"17",
";",
"}",
"}",
"</s>"
] |
9,366 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"WorldGenLiquids",
"extends",
"WorldGenerator",
"{",
"private",
"int",
"liquidBlockId",
";",
"public",
"WorldGenLiquids",
"(",
"int",
"par1",
")",
"{",
"liquidBlockId",
"=",
"par1",
";",
"}",
"public",
"boolean",
"generate",
"(",
"World",
"par1World",
",",
"Random",
"par2Random",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
")",
"{",
"if",
"(",
"par1World",
".",
"getBlockId",
"(",
"par3",
",",
"par4",
"+",
"1",
",",
"par5",
")",
"!=",
"Block",
".",
"stone",
".",
"blockID",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"par1World",
".",
"getBlockId",
"(",
"par3",
",",
"par4",
"-",
"1",
",",
"par5",
")",
"!=",
"Block",
".",
"stone",
".",
"blockID",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"par1World",
".",
"getBlockId",
"(",
"par3",
",",
"par4",
",",
"par5",
")",
"!=",
"0",
"&&",
"par1World",
".",
"getBlockId",
"(",
"par3",
",",
"par4",
",",
"par5",
")",
"!=",
"Block",
".",
"stone",
".",
"blockID",
")",
"{",
"return",
"false",
";",
"}",
"int",
"i",
"=",
"0",
";",
"if",
"(",
"par1World",
".",
"getBlockId",
"(",
"par3",
"-",
"1",
",",
"par4",
",",
"par5",
")",
"==",
"Block",
".",
"stone",
".",
"blockID",
")",
"{",
"i",
"++",
";",
"}",
"if",
"(",
"par1World",
".",
"getBlockId",
"(",
"par3",
"+",
"1",
",",
"par4",
",",
"par5",
")",
"==",
"Block",
".",
"stone",
".",
"blockID",
")",
"{",
"i",
"++",
";",
"}",
"if",
"(",
"par1World",
".",
"getBlockId",
"(",
"par3",
",",
"par4",
",",
"par5",
"-",
"1",
")",
"==",
"Block",
".",
"stone",
".",
"blockID",
")",
"{",
"i",
"++",
";",
"}",
"if",
"(",
"par1World",
".",
"getBlockId",
"(",
"par3",
",",
"par4",
",",
"par5",
"+",
"1",
")",
"==",
"Block",
".",
"stone",
".",
"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",
"(",
"i",
"==",
"3",
"&&",
"j",
"==",
"1",
")",
"{",
"par1World",
".",
"setBlockWithNotify",
"(",
"par3",
",",
"par4",
",",
"par5",
",",
"liquidBlockId",
")",
";",
"par1World",
".",
"scheduledUpdatesAreImmediate",
"=",
"true",
";",
"Block",
".",
"blocksList",
"[",
"liquidBlockId",
"]",
".",
"updateTick",
"(",
"par1World",
",",
"par3",
",",
"par4",
",",
"par5",
",",
"par2Random",
")",
";",
"par1World",
".",
"scheduledUpdatesAreImmediate",
"=",
"false",
";",
"}",
"return",
"true",
";",
"}",
"}",
"</s>"
] |
9,367 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"WorldGenTallGrass",
"extends",
"WorldGenerator",
"{",
"private",
"int",
"tallGrassID",
";",
"private",
"int",
"tallGrassMetadata",
";",
"public",
"WorldGenTallGrass",
"(",
"int",
"par1",
",",
"int",
"par2",
")",
"{",
"tallGrassID",
"=",
"par1",
";",
"tallGrassMetadata",
"=",
"par2",
";",
"}",
"public",
"boolean",
"generate",
"(",
"World",
"par1World",
",",
"Random",
"par2Random",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"(",
"(",
"i",
"=",
"par1World",
".",
"getBlockId",
"(",
"par3",
",",
"par4",
",",
"par5",
")",
")",
"==",
"0",
"||",
"i",
"==",
"Block",
".",
"leaves",
".",
"blockID",
")",
"&&",
"par4",
">",
"0",
";",
"par4",
"--",
")",
"{",
"}",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
"128",
";",
"j",
"++",
")",
"{",
"int",
"k",
"=",
"(",
"par3",
"+",
"par2Random",
".",
"nextInt",
"(",
"8",
")",
")",
"-",
"par2Random",
".",
"nextInt",
"(",
"8",
")",
";",
"int",
"l",
"=",
"(",
"par4",
"+",
"par2Random",
".",
"nextInt",
"(",
"4",
")",
")",
"-",
"par2Random",
".",
"nextInt",
"(",
"4",
")",
";",
"int",
"i1",
"=",
"(",
"par5",
"+",
"par2Random",
".",
"nextInt",
"(",
"8",
")",
")",
"-",
"par2Random",
".",
"nextInt",
"(",
"8",
")",
";",
"if",
"(",
"par1World",
".",
"isAirBlock",
"(",
"k",
",",
"l",
",",
"i1",
")",
"&&",
"(",
"(",
"BlockFlower",
")",
"Block",
".",
"blocksList",
"[",
"tallGrassID",
"]",
")",
".",
"canBlockStay",
"(",
"par1World",
",",
"k",
",",
"l",
",",
"i1",
")",
")",
"{",
"par1World",
".",
"setBlockAndMetadata",
"(",
"k",
",",
"l",
",",
"i1",
",",
"tallGrassID",
",",
"tallGrassMetadata",
")",
";",
"}",
"}",
"return",
"true",
";",
"}",
"}",
"</s>"
] |
9,368 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"BlockTallGrass",
"extends",
"BlockFlower",
"{",
"protected",
"BlockTallGrass",
"(",
"int",
"par1",
",",
"int",
"par2",
")",
"{",
"super",
"(",
"par1",
",",
"par2",
",",
"Material",
".",
"vine",
")",
";",
"float",
"f",
"=",
"0.4F",
";",
"setBlockBounds",
"(",
"0.5F",
"-",
"f",
",",
"0.0F",
",",
"0.5F",
"-",
"f",
",",
"0.5F",
"+",
"f",
",",
"0.8F",
",",
"0.5F",
"+",
"f",
")",
";",
"}",
"public",
"int",
"getBlockTextureFromSideAndMetadata",
"(",
"int",
"par1",
",",
"int",
"par2",
")",
"{",
"if",
"(",
"par2",
"==",
"1",
")",
"{",
"return",
"blockIndexInTexture",
";",
"}",
"if",
"(",
"par2",
"==",
"2",
")",
"{",
"return",
"blockIndexInTexture",
"+",
"16",
"+",
"1",
";",
"}",
"if",
"(",
"par2",
"==",
"0",
")",
"{",
"return",
"blockIndexInTexture",
"+",
"16",
";",
"}",
"else",
"{",
"return",
"blockIndexInTexture",
";",
"}",
"}",
"public",
"int",
"idDropped",
"(",
"int",
"par1",
",",
"Random",
"par2Random",
",",
"int",
"par3",
")",
"{",
"if",
"(",
"par2Random",
".",
"nextInt",
"(",
"8",
")",
"==",
"0",
")",
"{",
"return",
"Item",
".",
"seeds",
".",
"shiftedIndex",
";",
"}",
"else",
"{",
"return",
"-",
"1",
";",
"}",
"}",
"public",
"int",
"quantityDroppedWithBonus",
"(",
"int",
"par1",
",",
"Random",
"par2Random",
")",
"{",
"return",
"1",
"+",
"par2Random",
".",
"nextInt",
"(",
"par1",
"*",
"2",
"+",
"1",
")",
";",
"}",
"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",
".",
"tallGrass",
",",
"1",
",",
"par6",
")",
")",
";",
"}",
"else",
"{",
"super",
".",
"harvestBlock",
"(",
"par1World",
",",
"par2EntityPlayer",
",",
"par3",
",",
"par4",
",",
"par5",
",",
"par6",
")",
";",
"}",
"}",
"}",
"</s>"
] |
9,369 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"class",
"StructureNetherBridgePieceWeight",
"{",
"public",
"Class",
"field_40655_a",
";",
"public",
"final",
"int",
"field_40653_b",
";",
"public",
"int",
"field_40654_c",
";",
"public",
"int",
"field_40651_d",
";",
"public",
"boolean",
"field_40652_e",
";",
"public",
"StructureNetherBridgePieceWeight",
"(",
"Class",
"par1Class",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"boolean",
"par4",
")",
"{",
"field_40655_a",
"=",
"par1Class",
";",
"field_40653_b",
"=",
"par2",
";",
"field_40651_d",
"=",
"par3",
";",
"field_40652_e",
"=",
"par4",
";",
"}",
"public",
"StructureNetherBridgePieceWeight",
"(",
"Class",
"par1Class",
",",
"int",
"par2",
",",
"int",
"par3",
")",
"{",
"this",
"(",
"par1Class",
",",
"par2",
",",
"par3",
",",
"false",
")",
";",
"}",
"public",
"boolean",
"func_40649_a",
"(",
"int",
"par1",
")",
"{",
"return",
"field_40651_d",
"==",
"0",
"||",
"field_40654_c",
"<",
"field_40651_d",
";",
"}",
"public",
"boolean",
"func_40650_a",
"(",
")",
"{",
"return",
"field_40651_d",
"==",
"0",
"||",
"field_40654_c",
"<",
"field_40651_d",
";",
"}",
"}",
"</s>"
] |
9,370 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"awt",
".",
"event",
".",
"FocusAdapter",
";",
"import",
"java",
".",
"awt",
".",
"event",
".",
"FocusEvent",
";",
"class",
"ServerGuiFocusAdapter",
"extends",
"FocusAdapter",
"{",
"final",
"ServerGUI",
"mcServerGui",
";",
"ServerGuiFocusAdapter",
"(",
"ServerGUI",
"par1ServerGUI",
")",
"{",
"mcServerGui",
"=",
"par1ServerGUI",
";",
"}",
"public",
"void",
"focusGained",
"(",
"FocusEvent",
"focusevent",
")",
"{",
"}",
"}",
"</s>"
] |
9,371 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"*",
";",
"public",
"class",
"VillageSiege",
"{",
"private",
"World",
"field_48510_a",
";",
"private",
"boolean",
"field_48508_b",
";",
"private",
"int",
"field_48509_c",
";",
"private",
"int",
"field_48506_d",
";",
"private",
"int",
"field_48507_e",
";",
"private",
"Village",
"field_48504_f",
";",
"private",
"int",
"field_48505_g",
";",
"private",
"int",
"field_48511_h",
";",
"private",
"int",
"field_48512_i",
";",
"public",
"VillageSiege",
"(",
"World",
"par1World",
")",
"{",
"field_48508_b",
"=",
"false",
";",
"field_48509_c",
"=",
"-",
"1",
";",
"field_48510_a",
"=",
"par1World",
";",
"}",
"public",
"void",
"tick",
"(",
")",
"{",
"boolean",
"flag",
"=",
"false",
";",
"if",
"(",
"flag",
")",
"{",
"if",
"(",
"field_48509_c",
"==",
"2",
")",
"{",
"field_48506_d",
"=",
"100",
";",
"return",
";",
"}",
"}",
"else",
"{",
"if",
"(",
"field_48510_a",
".",
"isDaytime",
"(",
")",
")",
"{",
"field_48509_c",
"=",
"0",
";",
"return",
";",
"}",
"if",
"(",
"field_48509_c",
"==",
"2",
")",
"{",
"return",
";",
"}",
"if",
"(",
"field_48509_c",
"==",
"0",
")",
"{",
"float",
"f",
"=",
"field_48510_a",
".",
"getCelestialAngle",
"(",
"0.0F",
")",
";",
"if",
"(",
"(",
"double",
")",
"f",
"<",
"0.5D",
"||",
"(",
"double",
")",
"f",
">",
"0.501D",
")",
"{",
"return",
";",
"}",
"field_48509_c",
"=",
"field_48510_a",
".",
"rand",
".",
"nextInt",
"(",
"10",
")",
"!=",
"0",
"?",
"2",
":",
"1",
";",
"field_48508_b",
"=",
"false",
";",
"if",
"(",
"field_48509_c",
"==",
"2",
")",
"{",
"return",
";",
"}",
"}",
"}",
"if",
"(",
"!",
"field_48508_b",
")",
"{",
"if",
"(",
"func_48502_b",
"(",
")",
")",
"{",
"field_48508_b",
"=",
"true",
";",
"}",
"else",
"{",
"return",
";",
"}",
"}",
"if",
"(",
"field_48507_e",
">",
"0",
")",
"{",
"field_48507_e",
"--",
";",
"return",
";",
"}",
"field_48507_e",
"=",
"2",
";",
"if",
"(",
"field_48506_d",
">",
"0",
")",
"{",
"func_48503_c",
"(",
")",
";",
"field_48506_d",
"--",
";",
"}",
"else",
"{",
"field_48509_c",
"=",
"2",
";",
"}",
"}",
"private",
"boolean",
"func_48502_b",
"(",
")",
"{",
"List",
"list",
"=",
"field_48510_a",
".",
"playerEntities",
";",
"for",
"(",
"Iterator",
"iterator",
"=",
"list",
".",
"iterator",
"(",
")",
";",
"iterator",
".",
"hasNext",
"(",
")",
";",
")",
"{",
"EntityPlayer",
"entityplayer",
"=",
"(",
"EntityPlayer",
")",
"iterator",
".",
"next",
"(",
")",
";",
"field_48504_f",
"=",
"field_48510_a",
".",
"villageCollectionObj",
".",
"findNearestVillage",
"(",
"(",
"int",
")",
"entityplayer",
".",
"posX",
",",
"(",
"int",
")",
"entityplayer",
".",
"posY",
",",
"(",
"int",
")",
"entityplayer",
".",
"posZ",
",",
"1",
")",
";",
"if",
"(",
"field_48504_f",
"!=",
"null",
"&&",
"field_48504_f",
".",
"getNumVillageDoors",
"(",
")",
">=",
"10",
"&&",
"field_48504_f",
".",
"getTicksSinceLastDoorAdding",
"(",
")",
">=",
"20",
"&&",
"field_48504_f",
".",
"getNumVillagers",
"(",
")",
">=",
"20",
")",
"{",
"ChunkCoordinates",
"chunkcoordinates",
"=",
"field_48504_f",
".",
"getCenter",
"(",
")",
";",
"float",
"f",
"=",
"field_48504_f",
".",
"getVillageRadius",
"(",
")",
";",
"boolean",
"flag",
"=",
"false",
";",
"int",
"i",
"=",
"0",
";",
"do",
"{",
"if",
"(",
"i",
">=",
"10",
")",
"{",
"break",
";",
"}",
"field_48505_g",
"=",
"chunkcoordinates",
".",
"posX",
"+",
"(",
"int",
")",
"(",
"(",
"double",
")",
"(",
"MathHelper",
".",
"cos",
"(",
"field_48510_a",
".",
"rand",
".",
"nextFloat",
"(",
")",
"*",
"(",
"float",
")",
"Math",
".",
"PI",
"*",
"2.0F",
")",
"*",
"f",
")",
"*",
"0.90000000000000002D",
")",
";",
"field_48511_h",
"=",
"chunkcoordinates",
".",
"posY",
";",
"field_48512_i",
"=",
"chunkcoordinates",
".",
"posZ",
"+",
"(",
"int",
")",
"(",
"(",
"double",
")",
"(",
"MathHelper",
".",
"sin",
"(",
"field_48510_a",
".",
"rand",
".",
"nextFloat",
"(",
")",
"*",
"(",
"float",
")",
"Math",
".",
"PI",
"*",
"2.0F",
")",
"*",
"f",
")",
"*",
"0.90000000000000002D",
")",
";",
"flag",
"=",
"false",
";",
"Iterator",
"iterator1",
"=",
"field_48510_a",
".",
"villageCollectionObj",
".",
"func_48628_b",
"(",
")",
".",
"iterator",
"(",
")",
";",
"do",
"{",
"if",
"(",
"!",
"iterator1",
".",
"hasNext",
"(",
")",
")",
"{",
"break",
";",
"}",
"Village",
"village",
"=",
"(",
"Village",
")",
"iterator1",
".",
"next",
"(",
")",
";",
"if",
"(",
"village",
"==",
"field_48504_f",
"||",
"!",
"village",
".",
"isInRange",
"(",
"field_48505_g",
",",
"field_48511_h",
",",
"field_48512_i",
")",
")",
"{",
"continue",
";",
"}",
"flag",
"=",
"true",
";",
"break",
";",
"}",
"while",
"(",
"true",
")",
";",
"if",
"(",
"!",
"flag",
")",
"{",
"break",
";",
"}",
"i",
"++",
";",
"}",
"while",
"(",
"true",
")",
";",
"if",
"(",
"flag",
")",
"{",
"return",
"false",
";",
"}",
"Vec3D",
"vec3d",
"=",
"func_48501_a",
"(",
"field_48505_g",
",",
"field_48511_h",
",",
"field_48512_i",
")",
";",
"if",
"(",
"vec3d",
"!=",
"null",
")",
"{",
"field_48507_e",
"=",
"0",
";",
"field_48506_d",
"=",
"20",
";",
"return",
"true",
";",
"}",
"}",
"}",
"return",
"false",
";",
"}",
"private",
"boolean",
"func_48503_c",
"(",
")",
"{",
"Vec3D",
"vec3d",
"=",
"func_48501_a",
"(",
"field_48505_g",
",",
"field_48511_h",
",",
"field_48512_i",
")",
";",
"if",
"(",
"vec3d",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"EntityZombie",
"entityzombie",
";",
"try",
"{",
"entityzombie",
"=",
"new",
"EntityZombie",
"(",
"field_48510_a",
")",
";",
"}",
"catch",
"(",
"Exception",
"exception",
")",
"{",
"exception",
".",
"printStackTrace",
"(",
")",
";",
"return",
"false",
";",
"}",
"entityzombie",
".",
"setLocationAndAngles",
"(",
"vec3d",
".",
"xCoord",
",",
"vec3d",
".",
"yCoord",
",",
"vec3d",
".",
"zCoord",
",",
"field_48510_a",
".",
"rand",
".",
"nextFloat",
"(",
")",
"*",
"360F",
",",
"0.0F",
")",
";",
"field_48510_a",
".",
"spawnEntityInWorld",
"(",
"entityzombie",
")",
";",
"ChunkCoordinates",
"chunkcoordinates",
"=",
"field_48504_f",
".",
"getCenter",
"(",
")",
";",
"entityzombie",
".",
"setHomeArea",
"(",
"chunkcoordinates",
".",
"posX",
",",
"chunkcoordinates",
".",
"posY",
",",
"chunkcoordinates",
".",
"posZ",
",",
"field_48504_f",
".",
"getVillageRadius",
"(",
")",
")",
";",
"return",
"true",
";",
"}",
"private",
"Vec3D",
"func_48501_a",
"(",
"int",
"par1",
",",
"int",
"par2",
",",
"int",
"par3",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"10",
";",
"i",
"++",
")",
"{",
"int",
"j",
"=",
"(",
"par1",
"+",
"field_48510_a",
".",
"rand",
".",
"nextInt",
"(",
"16",
")",
")",
"-",
"8",
";",
"int",
"k",
"=",
"(",
"par2",
"+",
"field_48510_a",
".",
"rand",
".",
"nextInt",
"(",
"6",
")",
")",
"-",
"3",
";",
"int",
"l",
"=",
"(",
"par3",
"+",
"field_48510_a",
".",
"rand",
".",
"nextInt",
"(",
"16",
")",
")",
"-",
"8",
";",
"if",
"(",
"field_48504_f",
".",
"isInRange",
"(",
"j",
",",
"k",
",",
"l",
")",
"&&",
"SpawnerAnimals",
".",
"canCreatureTypeSpawnAtLocation",
"(",
"EnumCreatureType",
".",
"monster",
",",
"field_48510_a",
",",
"j",
",",
"k",
",",
"l",
")",
")",
"{",
"return",
"Vec3D",
".",
"createVector",
"(",
"j",
",",
"k",
",",
"l",
")",
";",
"}",
"}",
"return",
"null",
";",
"}",
"}",
"</s>"
] |
9,372 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"BlockGravel",
"extends",
"BlockSand",
"{",
"public",
"BlockGravel",
"(",
"int",
"par1",
",",
"int",
"par2",
")",
"{",
"super",
"(",
"par1",
",",
"par2",
")",
";",
"}",
"public",
"int",
"idDropped",
"(",
"int",
"par1",
",",
"Random",
"par2Random",
",",
"int",
"par3",
")",
"{",
"if",
"(",
"par2Random",
".",
"nextInt",
"(",
"10",
"-",
"par3",
"*",
"3",
")",
"==",
"0",
")",
"{",
"return",
"Item",
".",
"flint",
".",
"shiftedIndex",
";",
"}",
"else",
"{",
"return",
"blockID",
";",
"}",
"}",
"}",
"</s>"
] |
9,373 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"*",
";",
"public",
"class",
"PotionHelper",
"{",
"public",
"static",
"final",
"String",
"field_40562_a",
"=",
"null",
";",
"public",
"static",
"final",
"String",
"sugarEffect",
"=",
"\"\"",
";",
"public",
"static",
"final",
"String",
"ghastTearEffect",
"=",
"\"\"",
";",
"public",
"static",
"final",
"String",
"spiderEyeEffect",
"=",
"\"\"",
";",
"public",
"static",
"final",
"String",
"fermentedSpiderEyeEffect",
"=",
"\"-0+3-4+13\"",
";",
"public",
"static",
"final",
"String",
"speckledMelonEffect",
"=",
"\"\"",
";",
"public",
"static",
"final",
"String",
"blazePowderEffect",
"=",
"\"\"",
";",
"public",
"static",
"final",
"String",
"magmaCreamEffect",
"=",
"\"\"",
";",
"public",
"static",
"final",
"String",
"redstoneEffect",
"=",
"\"-5+6-7\"",
";",
"public",
"static",
"final",
"String",
"glowstoneEffect",
"=",
"\"+5-6-7\"",
";",
"public",
"static",
"final",
"String",
"gunpowderEffect",
"=",
"\"+14&13-13\"",
";",
"private",
"static",
"final",
"HashMap",
"potionRequirements",
";",
"private",
"static",
"final",
"HashMap",
"field_40566_m",
";",
"private",
"static",
"final",
"HashMap",
"field_40563_n",
"=",
"new",
"HashMap",
"(",
")",
";",
"private",
"static",
"final",
"String",
"potionPrefixes",
"[",
"]",
"=",
"{",
"\"\"",
",",
"\"\"",
",",
"\"\"",
",",
"\"\"",
",",
"\"\"",
",",
"\"\"",
",",
"\"\"",
",",
"\"\"",
",",
"\"\"",
",",
"\"\"",
",",
"\"\"",
",",
"\"\"",
",",
"\"\"",
",",
"\"\"",
",",
"\"\"",
",",
"\"\"",
",",
"\"\"",
",",
"\"\"",
",",
"\"\"",
",",
"\"\"",
",",
"\"\"",
",",
"\"\"",
",",
"\"\"",
",",
"\"\"",
",",
"\"\"",
",",
"\"\"",
",",
"\"\"",
",",
"\"\"",
",",
"\"\"",
",",
"\"\"",
",",
"\"\"",
",",
"\"\"",
"}",
";",
"public",
"PotionHelper",
"(",
")",
"{",
"}",
"public",
"static",
"boolean",
"checkFlag",
"(",
"int",
"par0",
",",
"int",
"par1",
")",
"{",
"return",
"(",
"par0",
"&",
"1",
"<<",
"par1",
")",
"!=",
"0",
";",
"}",
"private",
"static",
"int",
"isFlagSet",
"(",
"int",
"par0",
",",
"int",
"par1",
")",
"{",
"return",
"checkFlag",
"(",
"par0",
",",
"par1",
")",
"?",
"1",
":",
"0",
";",
"}",
"private",
"static",
"int",
"isFlagUnset",
"(",
"int",
"par0",
",",
"int",
"par1",
")",
"{",
"return",
"checkFlag",
"(",
"par0",
",",
"par1",
")",
"?",
"0",
":",
"1",
";",
"}",
"public",
"static",
"int",
"func_40553_a",
"(",
"Collection",
"par0Collection",
")",
"{",
"int",
"i",
"=",
"0x385dc6",
";",
"if",
"(",
"par0Collection",
"==",
"null",
"||",
"par0Collection",
".",
"isEmpty",
"(",
")",
")",
"{",
"return",
"i",
";",
"}",
"float",
"f",
"=",
"0.0F",
";",
"float",
"f1",
"=",
"0.0F",
";",
"float",
"f2",
"=",
"0.0F",
";",
"float",
"f3",
"=",
"0.0F",
";",
"for",
"(",
"Iterator",
"iterator",
"=",
"par0Collection",
".",
"iterator",
"(",
")",
";",
"iterator",
".",
"hasNext",
"(",
")",
";",
")",
"{",
"PotionEffect",
"potioneffect",
"=",
"(",
"PotionEffect",
")",
"iterator",
".",
"next",
"(",
")",
";",
"int",
"j",
"=",
"Potion",
".",
"potionTypes",
"[",
"potioneffect",
".",
"getPotionID",
"(",
")",
"]",
".",
"getLiquidColor",
"(",
")",
";",
"int",
"k",
"=",
"0",
";",
"while",
"(",
"k",
"<=",
"potioneffect",
".",
"getAmplifier",
"(",
")",
")",
"{",
"f",
"+=",
"(",
"float",
")",
"(",
"j",
">>",
"16",
"&",
"0xff",
")",
"/",
"255F",
";",
"f1",
"+=",
"(",
"float",
")",
"(",
"j",
">>",
"8",
"&",
"0xff",
")",
"/",
"255F",
";",
"f2",
"+=",
"(",
"float",
")",
"(",
"j",
">>",
"0",
"&",
"0xff",
")",
"/",
"255F",
";",
"f3",
"++",
";",
"k",
"++",
";",
"}",
"}",
"f",
"=",
"(",
"f",
"/",
"f3",
")",
"*",
"255F",
";",
"f1",
"=",
"(",
"f1",
"/",
"f3",
")",
"*",
"255F",
";",
"f2",
"=",
"(",
"f2",
"/",
"f3",
")",
"*",
"255F",
";",
"return",
"(",
"int",
")",
"f",
"<<",
"16",
"|",
"(",
"int",
")",
"f1",
"<<",
"8",
"|",
"(",
"int",
")",
"f2",
";",
"}",
"private",
"static",
"int",
"func_40546_a",
"(",
"boolean",
"par0",
",",
"boolean",
"par1",
",",
"boolean",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
",",
"int",
"par6",
")",
"{",
"int",
"i",
"=",
"0",
";",
"if",
"(",
"par0",
")",
"{",
"i",
"=",
"isFlagUnset",
"(",
"par6",
",",
"par4",
")",
";",
"}",
"else",
"if",
"(",
"par3",
"!=",
"-",
"1",
")",
"{",
"if",
"(",
"par3",
"==",
"0",
"&&",
"countSetFlags",
"(",
"par6",
")",
"==",
"par4",
")",
"{",
"i",
"=",
"1",
";",
"}",
"else",
"if",
"(",
"par3",
"==",
"1",
"&&",
"countSetFlags",
"(",
"par6",
")",
">",
"par4",
")",
"{",
"i",
"=",
"1",
";",
"}",
"else",
"if",
"(",
"par3",
"==",
"2",
"&&",
"countSetFlags",
"(",
"par6",
")",
"<",
"par4",
")",
"{",
"i",
"=",
"1",
";",
"}",
"}",
"else",
"{",
"i",
"=",
"isFlagSet",
"(",
"par6",
",",
"par4",
")",
";",
"}",
"if",
"(",
"par1",
")",
"{",
"i",
"*=",
"par5",
";",
"}",
"if",
"(",
"par2",
")",
"{",
"i",
"*=",
"-",
"1",
";",
"}",
"return",
"i",
";",
"}",
"private",
"static",
"int",
"countSetFlags",
"(",
"int",
"par0",
")",
"{",
"int",
"i",
";",
"for",
"(",
"i",
"=",
"0",
";",
"par0",
">",
"0",
";",
"i",
"++",
")",
"{",
"par0",
"&=",
"par0",
"-",
"1",
";",
"}",
"return",
"i",
";",
"}",
"private",
"static",
"int",
"func_40554_a",
"(",
"String",
"par0Str",
",",
"int",
"par1",
",",
"int",
"par2",
",",
"int",
"par3",
")",
"{",
"if",
"(",
"par1",
">=",
"par0Str",
".",
"length",
"(",
")",
"||",
"par2",
"<",
"0",
"||",
"par1",
">=",
"par2",
")",
"{",
"return",
"0",
";",
"}",
"int",
"i",
"=",
"par0Str",
".",
"indexOf",
"(",
"'|'",
",",
"par1",
")",
";",
"if",
"(",
"i",
">=",
"0",
"&&",
"i",
"<",
"par2",
")",
"{",
"int",
"j",
"=",
"func_40554_a",
"(",
"par0Str",
",",
"par1",
",",
"i",
"-",
"1",
",",
"par3",
")",
";",
"if",
"(",
"j",
">",
"0",
")",
"{",
"return",
"j",
";",
"}",
"int",
"l",
"=",
"func_40554_a",
"(",
"par0Str",
",",
"i",
"+",
"1",
",",
"par2",
",",
"par3",
")",
";",
"if",
"(",
"l",
">",
"0",
")",
"{",
"return",
"l",
";",
"}",
"else",
"{",
"return",
"0",
";",
"}",
"}",
"int",
"k",
"=",
"par0Str",
".",
"indexOf",
"(",
"'&'",
",",
"par1",
")",
";",
"if",
"(",
"k",
">=",
"0",
"&&",
"k",
"<",
"par2",
")",
"{",
"int",
"i1",
"=",
"func_40554_a",
"(",
"par0Str",
",",
"par1",
",",
"k",
"-",
"1",
",",
"par3",
")",
";",
"if",
"(",
"i1",
"<=",
"0",
")",
"{",
"return",
"0",
";",
"}",
"int",
"j1",
"=",
"func_40554_a",
"(",
"par0Str",
",",
"k",
"+",
"1",
",",
"par2",
",",
"par3",
")",
";",
"if",
"(",
"j1",
"<=",
"0",
")",
"{",
"return",
"0",
";",
"}",
"if",
"(",
"i1",
">",
"j1",
")",
"{",
"return",
"i1",
";",
"}",
"else",
"{",
"return",
"j1",
";",
"}",
"}",
"boolean",
"flag",
"=",
"false",
";",
"boolean",
"flag1",
"=",
"false",
";",
"boolean",
"flag2",
"=",
"false",
";",
"boolean",
"flag3",
"=",
"false",
";",
"boolean",
"flag4",
"=",
"false",
";",
"byte",
"byte0",
"=",
"-",
"1",
";",
"int",
"k1",
"=",
"0",
";",
"int",
"l1",
"=",
"0",
";",
"int",
"i2",
"=",
"0",
";",
"for",
"(",
"int",
"j2",
"=",
"par1",
";",
"j2",
"<",
"par2",
";",
"j2",
"++",
")",
"{",
"char",
"c",
"=",
"par0Str",
".",
"charAt",
"(",
"j2",
")",
";",
"if",
"(",
"c",
">=",
"'0'",
"&&",
"c",
"<=",
"'9'",
")",
"{",
"if",
"(",
"flag",
")",
"{",
"l1",
"=",
"c",
"-",
"48",
";",
"flag1",
"=",
"true",
";",
"}",
"else",
"{",
"k1",
"*=",
"10",
";",
"k1",
"+=",
"c",
"-",
"48",
";",
"flag2",
"=",
"true",
";",
"}",
"continue",
";",
"}",
"if",
"(",
"c",
"==",
"'*'",
")",
"{",
"flag",
"=",
"true",
";",
"continue",
";",
"}",
"if",
"(",
"c",
"==",
"'!'",
")",
"{",
"if",
"(",
"flag2",
")",
"{",
"i2",
"+=",
"func_40546_a",
"(",
"flag3",
",",
"flag1",
",",
"flag4",
",",
"byte0",
",",
"k1",
",",
"l1",
",",
"par3",
")",
";",
"flag2",
"=",
"flag1",
"=",
"flag",
"=",
"flag4",
"=",
"flag3",
"=",
"false",
";",
"k1",
"=",
"l1",
"=",
"0",
";",
"byte0",
"=",
"-",
"1",
";",
"}",
"flag3",
"=",
"true",
";",
"continue",
";",
"}",
"if",
"(",
"c",
"==",
"'-'",
")",
"{",
"if",
"(",
"flag2",
")",
"{",
"i2",
"+=",
"func_40546_a",
"(",
"flag3",
",",
"flag1",
",",
"flag4",
",",
"byte0",
",",
"k1",
",",
"l1",
",",
"par3",
")",
";",
"flag2",
"=",
"flag1",
"=",
"flag",
"=",
"flag4",
"=",
"flag3",
"=",
"false",
";",
"k1",
"=",
"l1",
"=",
"0",
";",
"byte0",
"=",
"-",
"1",
";",
"}",
"flag4",
"=",
"true",
";",
"continue",
";",
"}",
"if",
"(",
"c",
"==",
"'='",
"||",
"c",
"==",
"'<'",
"||",
"c",
"==",
"'>'",
")",
"{",
"if",
"(",
"flag2",
")",
"{",
"i2",
"+=",
"func_40546_a",
"(",
"flag3",
",",
"flag1",
",",
"flag4",
",",
"byte0",
",",
"k1",
",",
"l1",
",",
"par3",
")",
";",
"flag2",
"=",
"flag1",
"=",
"flag",
"=",
"flag4",
"=",
"flag3",
"=",
"false",
";",
"k1",
"=",
"l1",
"=",
"0",
";",
"byte0",
"=",
"-",
"1",
";",
"}",
"if",
"(",
"c",
"==",
"'='",
")",
"{",
"byte0",
"=",
"0",
";",
"continue",
";",
"}",
"if",
"(",
"c",
"==",
"'<'",
")",
"{",
"byte0",
"=",
"2",
";",
"continue",
";",
"}",
"if",
"(",
"c",
"==",
"'>'",
")",
"{",
"byte0",
"=",
"1",
";",
"}",
"continue",
";",
"}",
"if",
"(",
"c",
"==",
"'+'",
"&&",
"flag2",
")",
"{",
"i2",
"+=",
"func_40546_a",
"(",
"flag3",
",",
"flag1",
",",
"flag4",
",",
"byte0",
",",
"k1",
",",
"l1",
",",
"par3",
")",
";",
"flag2",
"=",
"flag1",
"=",
"flag",
"=",
"flag4",
"=",
"flag3",
"=",
"false",
";",
"k1",
"=",
"l1",
"=",
"0",
";",
"byte0",
"=",
"-",
"1",
";",
"}",
"}",
"if",
"(",
"flag2",
")",
"{",
"i2",
"+=",
"func_40546_a",
"(",
"flag3",
",",
"flag1",
",",
"flag4",
",",
"byte0",
",",
"k1",
",",
"l1",
",",
"par3",
")",
";",
"}",
"return",
"i2",
";",
"}",
"public",
"static",
"List",
"getPotionEffects",
"(",
"int",
"par0",
",",
"boolean",
"par1",
")",
"{",
"ArrayList",
"arraylist",
"=",
"null",
";",
"Potion",
"apotion",
"[",
"]",
"=",
"Potion",
".",
"potionTypes",
";",
"int",
"i",
"=",
"apotion",
".",
"length",
";",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
"i",
";",
"j",
"++",
")",
"{",
"Potion",
"potion",
"=",
"apotion",
"[",
"j",
"]",
";",
"if",
"(",
"potion",
"==",
"null",
"||",
"potion",
".",
"isUsable",
"(",
")",
"&&",
"!",
"par1",
")",
"{",
"continue",
";",
"}",
"String",
"s",
"=",
"(",
"String",
")",
"potionRequirements",
".",
"get",
"(",
"Integer",
".",
"valueOf",
"(",
"potion",
".",
"getId",
"(",
")",
")",
")",
";",
"if",
"(",
"s",
"==",
"null",
")",
"{",
"continue",
";",
"}",
"int",
"k",
"=",
"func_40554_a",
"(",
"s",
",",
"0",
",",
"s",
".",
"length",
"(",
")",
",",
"par0",
")",
";",
"if",
"(",
"k",
"<=",
"0",
")",
"{",
"continue",
";",
"}",
"int",
"l",
"=",
"0",
";",
"String",
"s1",
"=",
"(",
"String",
")",
"field_40566_m",
".",
"get",
"(",
"Integer",
".",
"valueOf",
"(",
"potion",
".",
"getId",
"(",
")",
")",
")",
";",
"if",
"(",
"s1",
"!=",
"null",
")",
"{",
"l",
"=",
"func_40554_a",
"(",
"s1",
",",
"0",
",",
"s1",
".",
"length",
"(",
")",
",",
"par0",
")",
";",
"if",
"(",
"l",
"<",
"0",
")",
"{",
"l",
"=",
"0",
";",
"}",
"}",
"if",
"(",
"potion",
".",
"isInstant",
"(",
")",
")",
"{",
"k",
"=",
"1",
";",
"}",
"else",
"{",
"k",
"=",
"1200",
"*",
"(",
"k",
"*",
"3",
"+",
"(",
"k",
"-",
"1",
")",
"*",
"2",
")",
";",
"k",
">>=",
"l",
";",
"k",
"=",
"(",
"int",
")",
"Math",
".",
"round",
"(",
"(",
"double",
")",
"k",
"*",
"potion",
".",
"getEffectiveness",
"(",
")",
")",
";",
"if",
"(",
"(",
"par0",
"&",
"0x4000",
")",
"!=",
"0",
")",
"{",
"k",
"=",
"(",
"int",
")",
"Math",
".",
"round",
"(",
"(",
"double",
")",
"k",
"*",
"0.75D",
"+",
"0.5D",
")",
";",
"}",
"}",
"if",
"(",
"arraylist",
"==",
"null",
")",
"{",
"arraylist",
"=",
"new",
"ArrayList",
"(",
")",
";",
"}",
"arraylist",
".",
"add",
"(",
"new",
"PotionEffect",
"(",
"potion",
".",
"getId",
"(",
")",
",",
"k",
",",
"l",
")",
")",
";",
"}",
"return",
"arraylist",
";",
"}",
"private",
"static",
"int",
"brewBitOperations",
"(",
"int",
"par0",
",",
"int",
"par1",
",",
"boolean",
"par2",
",",
"boolean",
"par3",
",",
"boolean",
"par4",
")",
"{",
"if",
"(",
"par4",
")",
"{",
"if",
"(",
"!",
"checkFlag",
"(",
"par0",
",",
"par1",
")",
")",
"{",
"return",
"0",
";",
"}",
"}",
"else",
"if",
"(",
"par2",
")",
"{",
"par0",
"&=",
"~",
"(",
"1",
"<<",
"par1",
")",
";",
"}",
"else",
"if",
"(",
"par3",
")",
"{",
"if",
"(",
"(",
"par0",
"&",
"1",
"<<",
"par1",
")",
"!=",
"0",
")",
"{",
"par0",
"&=",
"~",
"(",
"1",
"<<",
"par1",
")",
";",
"}",
"else",
"{",
"par0",
"|=",
"1",
"<<",
"par1",
";",
"}",
"}",
"else",
"{",
"par0",
"|=",
"1",
"<<",
"par1",
";",
"}",
"return",
"par0",
";",
"}",
"public",
"static",
"int",
"applyIngredient",
"(",
"int",
"par0",
",",
"String",
"par1Str",
")",
"{",
"boolean",
"flag",
"=",
"false",
";",
"int",
"i",
"=",
"par1Str",
".",
"length",
"(",
")",
";",
"boolean",
"flag1",
"=",
"false",
";",
"boolean",
"flag2",
"=",
"false",
";",
"boolean",
"flag3",
"=",
"false",
";",
"boolean",
"flag4",
"=",
"false",
";",
"int",
"j",
"=",
"0",
";",
"for",
"(",
"int",
"k",
"=",
"(",
"(",
"flag",
")",
"?",
"1",
":",
"0",
")",
";",
"k",
"<",
"i",
";",
"k",
"++",
")",
"{",
"char",
"c",
"=",
"par1Str",
".",
"charAt",
"(",
"k",
")",
";",
"if",
"(",
"c",
">=",
"'0'",
"&&",
"c",
"<=",
"'9'",
")",
"{",
"j",
"*=",
"10",
";",
"j",
"+=",
"c",
"-",
"48",
";",
"flag1",
"=",
"true",
";",
"continue",
";",
"}",
"if",
"(",
"c",
"==",
"'!'",
")",
"{",
"if",
"(",
"flag1",
")",
"{",
"par0",
"=",
"brewBitOperations",
"(",
"par0",
",",
"j",
",",
"flag3",
",",
"flag2",
",",
"flag4",
")",
";",
"flag1",
"=",
"flag3",
"=",
"flag2",
"=",
"flag4",
"=",
"false",
";",
"j",
"=",
"0",
";",
"}",
"flag2",
"=",
"true",
";",
"continue",
";",
"}",
"if",
"(",
"c",
"==",
"'-'",
")",
"{",
"if",
"(",
"flag1",
")",
"{",
"par0",
"=",
"brewBitOperations",
"(",
"par0",
",",
"j",
",",
"flag3",
",",
"flag2",
",",
"flag4",
")",
";",
"flag1",
"=",
"flag3",
"=",
"flag2",
"=",
"flag4",
"=",
"false",
";",
"j",
"=",
"0",
";",
"}",
"flag3",
"=",
"true",
";",
"continue",
";",
"}",
"if",
"(",
"c",
"==",
"'+'",
")",
"{",
"if",
"(",
"flag1",
")",
"{",
"par0",
"=",
"brewBitOperations",
"(",
"par0",
",",
"j",
",",
"flag3",
",",
"flag2",
",",
"flag4",
")",
";",
"flag1",
"=",
"flag3",
"=",
"flag2",
"=",
"flag4",
"=",
"false",
";",
"j",
"=",
"0",
";",
"}",
"continue",
";",
"}",
"if",
"(",
"c",
"!=",
"'&'",
")",
"{",
"continue",
";",
"}",
"if",
"(",
"flag1",
")",
"{",
"par0",
"=",
"brewBitOperations",
"(",
"par0",
",",
"j",
",",
"flag3",
",",
"flag2",
",",
"flag4",
")",
";",
"flag1",
"=",
"flag3",
"=",
"flag2",
"=",
"flag4",
"=",
"false",
";",
"j",
"=",
"0",
";",
"}",
"flag4",
"=",
"true",
";",
"}",
"if",
"(",
"flag1",
")",
"{",
"par0",
"=",
"brewBitOperations",
"(",
"par0",
",",
"j",
",",
"flag3",
",",
"flag2",
",",
"flag4",
")",
";",
"}",
"return",
"par0",
"&",
"0x7fff",
";",
"}",
"static",
"{",
"potionRequirements",
"=",
"new",
"HashMap",
"(",
")",
";",
"field_40566_m",
"=",
"new",
"HashMap",
"(",
")",
";",
"potionRequirements",
".",
"put",
"(",
"Integer",
".",
"valueOf",
"(",
"Potion",
".",
"regeneration",
".",
"getId",
"(",
")",
")",
",",
"\"\"",
")",
";",
"potionRequirements",
".",
"put",
"(",
"Integer",
".",
"valueOf",
"(",
"Potion",
".",
"moveSpeed",
".",
"getId",
"(",
")",
")",
",",
"\"\"",
")",
";",
"potionRequirements",
".",
"put",
"(",
"Integer",
".",
"valueOf",
"(",
"Potion",
".",
"fireResistance",
".",
"getId",
"(",
")",
")",
",",
"\"\"",
")",
";",
"potionRequirements",
".",
"put",
"(",
"Integer",
".",
"valueOf",
"(",
"Potion",
".",
"heal",
".",
"getId",
"(",
")",
")",
",",
"\"\"",
")",
";",
"potionRequirements",
".",
"put",
"(",
"Integer",
".",
"valueOf",
"(",
"Potion",
".",
"poison",
".",
"getId",
"(",
")",
")",
",",
"\"\"",
")",
";",
"potionRequirements",
".",
"put",
"(",
"Integer",
".",
"valueOf",
"(",
"Potion",
".",
"weakness",
".",
"getId",
"(",
")",
")",
",",
"\"\"",
")",
";",
"potionRequirements",
".",
"put",
"(",
"Integer",
".",
"valueOf",
"(",
"Potion",
".",
"harm",
".",
"getId",
"(",
")",
")",
",",
"\"\"",
")",
";",
"potionRequirements",
".",
"put",
"(",
"Integer",
".",
"valueOf",
"(",
"Potion",
".",
"moveSlowdown",
".",
"getId",
"(",
")",
")",
",",
"\"\"",
")",
";",
"potionRequirements",
".",
"put",
"(",
"Integer",
".",
"valueOf",
"(",
"Potion",
".",
"damageBoost",
".",
"getId",
"(",
")",
")",
",",
"\"\"",
")",
";",
"field_40566_m",
".",
"put",
"(",
"Integer",
".",
"valueOf",
"(",
"Potion",
".",
"moveSpeed",
".",
"getId",
"(",
")",
")",
",",
"\"5\"",
")",
";",
"field_40566_m",
".",
"put",
"(",
"Integer",
".",
"valueOf",
"(",
"Potion",
".",
"digSpeed",
".",
"getId",
"(",
")",
")",
",",
"\"5\"",
")",
";",
"field_40566_m",
".",
"put",
"(",
"Integer",
".",
"valueOf",
"(",
"Potion",
".",
"damageBoost",
".",
"getId",
"(",
")",
")",
",",
"\"5\"",
")",
";",
"field_40566_m",
".",
"put",
"(",
"Integer",
".",
"valueOf",
"(",
"Potion",
".",
"regeneration",
".",
"getId",
"(",
")",
")",
",",
"\"5\"",
")",
";",
"field_40566_m",
".",
"put",
"(",
"Integer",
".",
"valueOf",
"(",
"Potion",
".",
"harm",
".",
"getId",
"(",
")",
")",
",",
"\"5\"",
")",
";",
"field_40566_m",
".",
"put",
"(",
"Integer",
".",
"valueOf",
"(",
"Potion",
".",
"heal",
".",
"getId",
"(",
")",
")",
",",
"\"5\"",
")",
";",
"field_40566_m",
".",
"put",
"(",
"Integer",
".",
"valueOf",
"(",
"Potion",
".",
"resistance",
".",
"getId",
"(",
")",
")",
",",
"\"5\"",
")",
";",
"field_40566_m",
".",
"put",
"(",
"Integer",
".",
"valueOf",
"(",
"Potion",
".",
"poison",
".",
"getId",
"(",
")",
")",
",",
"\"5\"",
")",
";",
"}",
"}",
"</s>"
] |
9,374 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"ChunkProviderEnd",
"implements",
"IChunkProvider",
"{",
"private",
"Random",
"endRNG",
";",
"private",
"NoiseGeneratorOctaves",
"noiseGen1",
";",
"private",
"NoiseGeneratorOctaves",
"noiseGen2",
";",
"private",
"NoiseGeneratorOctaves",
"noiseGen3",
";",
"public",
"NoiseGeneratorOctaves",
"noiseGen4",
";",
"public",
"NoiseGeneratorOctaves",
"noiseGen5",
";",
"private",
"World",
"endWorld",
";",
"private",
"double",
"densities",
"[",
"]",
";",
"private",
"BiomeGenBase",
"biomesForGeneration",
"[",
"]",
";",
"double",
"noiseData1",
"[",
"]",
";",
"double",
"noiseData2",
"[",
"]",
";",
"double",
"noiseData3",
"[",
"]",
";",
"double",
"noiseData4",
"[",
"]",
";",
"double",
"noiseData5",
"[",
"]",
";",
"int",
"field_40200_h",
"[",
"]",
"[",
"]",
";",
"public",
"ChunkProviderEnd",
"(",
"World",
"par1World",
",",
"long",
"par2",
")",
"{",
"field_40200_h",
"=",
"new",
"int",
"[",
"32",
"]",
"[",
"32",
"]",
";",
"endWorld",
"=",
"par1World",
";",
"endRNG",
"=",
"new",
"Random",
"(",
"par2",
")",
";",
"noiseGen1",
"=",
"new",
"NoiseGeneratorOctaves",
"(",
"endRNG",
",",
"16",
")",
";",
"noiseGen2",
"=",
"new",
"NoiseGeneratorOctaves",
"(",
"endRNG",
",",
"16",
")",
";",
"noiseGen3",
"=",
"new",
"NoiseGeneratorOctaves",
"(",
"endRNG",
",",
"8",
")",
";",
"noiseGen4",
"=",
"new",
"NoiseGeneratorOctaves",
"(",
"endRNG",
",",
"10",
")",
";",
"noiseGen5",
"=",
"new",
"NoiseGeneratorOctaves",
"(",
"endRNG",
",",
"16",
")",
";",
"}",
"public",
"void",
"func_40184_a",
"(",
"int",
"par1",
",",
"int",
"par2",
",",
"byte",
"par3ArrayOfByte",
"[",
"]",
",",
"BiomeGenBase",
"par4ArrayOfBiomeGenBase",
"[",
"]",
")",
"{",
"byte",
"byte0",
"=",
"2",
";",
"int",
"i",
"=",
"byte0",
"+",
"1",
";",
"byte",
"byte1",
"=",
"33",
";",
"int",
"j",
"=",
"byte0",
"+",
"1",
";",
"densities",
"=",
"func_40186_a",
"(",
"densities",
",",
"par1",
"*",
"byte0",
",",
"0",
",",
"par2",
"*",
"byte0",
",",
"i",
",",
"byte1",
",",
"j",
")",
";",
"for",
"(",
"int",
"k",
"=",
"0",
";",
"k",
"<",
"byte0",
";",
"k",
"++",
")",
"{",
"for",
"(",
"int",
"l",
"=",
"0",
";",
"l",
"<",
"byte0",
";",
"l",
"++",
")",
"{",
"for",
"(",
"int",
"i1",
"=",
"0",
";",
"i1",
"<",
"32",
";",
"i1",
"++",
")",
"{",
"double",
"d",
"=",
"0.25D",
";",
"double",
"d1",
"=",
"densities",
"[",
"(",
"(",
"k",
"+",
"0",
")",
"*",
"j",
"+",
"(",
"l",
"+",
"0",
")",
")",
"*",
"byte1",
"+",
"(",
"i1",
"+",
"0",
")",
"]",
";",
"double",
"d2",
"=",
"densities",
"[",
"(",
"(",
"k",
"+",
"0",
")",
"*",
"j",
"+",
"(",
"l",
"+",
"1",
")",
")",
"*",
"byte1",
"+",
"(",
"i1",
"+",
"0",
")",
"]",
";",
"double",
"d3",
"=",
"densities",
"[",
"(",
"(",
"k",
"+",
"1",
")",
"*",
"j",
"+",
"(",
"l",
"+",
"0",
")",
")",
"*",
"byte1",
"+",
"(",
"i1",
"+",
"0",
")",
"]",
";",
"double",
"d4",
"=",
"densities",
"[",
"(",
"(",
"k",
"+",
"1",
")",
"*",
"j",
"+",
"(",
"l",
"+",
"1",
")",
")",
"*",
"byte1",
"+",
"(",
"i1",
"+",
"0",
")",
"]",
";",
"double",
"d5",
"=",
"(",
"densities",
"[",
"(",
"(",
"k",
"+",
"0",
")",
"*",
"j",
"+",
"(",
"l",
"+",
"0",
")",
")",
"*",
"byte1",
"+",
"(",
"i1",
"+",
"1",
")",
"]",
"-",
"d1",
")",
"*",
"d",
";",
"double",
"d6",
"=",
"(",
"densities",
"[",
"(",
"(",
"k",
"+",
"0",
")",
"*",
"j",
"+",
"(",
"l",
"+",
"1",
")",
")",
"*",
"byte1",
"+",
"(",
"i1",
"+",
"1",
")",
"]",
"-",
"d2",
")",
"*",
"d",
";",
"double",
"d7",
"=",
"(",
"densities",
"[",
"(",
"(",
"k",
"+",
"1",
")",
"*",
"j",
"+",
"(",
"l",
"+",
"0",
")",
")",
"*",
"byte1",
"+",
"(",
"i1",
"+",
"1",
")",
"]",
"-",
"d3",
")",
"*",
"d",
";",
"double",
"d8",
"=",
"(",
"densities",
"[",
"(",
"(",
"k",
"+",
"1",
")",
"*",
"j",
"+",
"(",
"l",
"+",
"1",
")",
")",
"*",
"byte1",
"+",
"(",
"i1",
"+",
"1",
")",
"]",
"-",
"d4",
")",
"*",
"d",
";",
"for",
"(",
"int",
"j1",
"=",
"0",
";",
"j1",
"<",
"4",
";",
"j1",
"++",
")",
"{",
"double",
"d9",
"=",
"0.125D",
";",
"double",
"d10",
"=",
"d1",
";",
"double",
"d11",
"=",
"d2",
";",
"double",
"d12",
"=",
"(",
"d3",
"-",
"d1",
")",
"*",
"d9",
";",
"double",
"d13",
"=",
"(",
"d4",
"-",
"d2",
")",
"*",
"d9",
";",
"for",
"(",
"int",
"k1",
"=",
"0",
";",
"k1",
"<",
"8",
";",
"k1",
"++",
")",
"{",
"int",
"l1",
"=",
"k1",
"+",
"k",
"*",
"8",
"<<",
"11",
"|",
"0",
"+",
"l",
"*",
"8",
"<<",
"7",
"|",
"i1",
"*",
"4",
"+",
"j1",
";",
"char",
"c",
"=",
"'\\200'",
";",
"double",
"d14",
"=",
"0.125D",
";",
"double",
"d15",
"=",
"d10",
";",
"double",
"d16",
"=",
"(",
"d11",
"-",
"d10",
")",
"*",
"d14",
";",
"for",
"(",
"int",
"i2",
"=",
"0",
";",
"i2",
"<",
"8",
";",
"i2",
"++",
")",
"{",
"int",
"j2",
"=",
"0",
";",
"if",
"(",
"d15",
">",
"0.0D",
")",
"{",
"j2",
"=",
"Block",
".",
"whiteStone",
".",
"blockID",
";",
"}",
"par3ArrayOfByte",
"[",
"l1",
"]",
"=",
"(",
"byte",
")",
"j2",
";",
"l1",
"+=",
"c",
";",
"d15",
"+=",
"d16",
";",
"}",
"d10",
"+=",
"d12",
";",
"d11",
"+=",
"d13",
";",
"}",
"d1",
"+=",
"d5",
";",
"d2",
"+=",
"d6",
";",
"d3",
"+=",
"d7",
";",
"d4",
"+=",
"d8",
";",
"}",
"}",
"}",
"}",
"}",
"public",
"void",
"func_40185_b",
"(",
"int",
"par1",
",",
"int",
"par2",
",",
"byte",
"par3ArrayOfByte",
"[",
"]",
",",
"BiomeGenBase",
"par4ArrayOfBiomeGenBase",
"[",
"]",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"16",
";",
"i",
"++",
")",
"{",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
"16",
";",
"j",
"++",
")",
"{",
"int",
"k",
"=",
"1",
";",
"int",
"l",
"=",
"-",
"1",
";",
"byte",
"byte0",
"=",
"(",
"byte",
")",
"Block",
".",
"whiteStone",
".",
"blockID",
";",
"byte",
"byte1",
"=",
"(",
"byte",
")",
"Block",
".",
"whiteStone",
".",
"blockID",
";",
"for",
"(",
"int",
"i1",
"=",
"127",
";",
"i1",
">=",
"0",
";",
"i1",
"--",
")",
"{",
"int",
"j1",
"=",
"(",
"j",
"*",
"16",
"+",
"i",
")",
"*",
"128",
"+",
"i1",
";",
"byte",
"byte2",
"=",
"par3ArrayOfByte",
"[",
"j1",
"]",
";",
"if",
"(",
"byte2",
"==",
"0",
")",
"{",
"l",
"=",
"-",
"1",
";",
"continue",
";",
"}",
"if",
"(",
"byte2",
"!=",
"Block",
".",
"stone",
".",
"blockID",
")",
"{",
"continue",
";",
"}",
"if",
"(",
"l",
"==",
"-",
"1",
")",
"{",
"if",
"(",
"k",
"<=",
"0",
")",
"{",
"byte0",
"=",
"0",
";",
"byte1",
"=",
"(",
"byte",
")",
"Block",
".",
"whiteStone",
".",
"blockID",
";",
"}",
"l",
"=",
"k",
";",
"if",
"(",
"i1",
">=",
"0",
")",
"{",
"par3ArrayOfByte",
"[",
"j1",
"]",
"=",
"byte0",
";",
"}",
"else",
"{",
"par3ArrayOfByte",
"[",
"j1",
"]",
"=",
"byte1",
";",
"}",
"continue",
";",
"}",
"if",
"(",
"l",
">",
"0",
")",
"{",
"l",
"--",
";",
"par3ArrayOfByte",
"[",
"j1",
"]",
"=",
"byte1",
";",
"}",
"}",
"}",
"}",
"}",
"public",
"Chunk",
"loadChunk",
"(",
"int",
"par1",
",",
"int",
"par2",
")",
"{",
"return",
"provideChunk",
"(",
"par1",
",",
"par2",
")",
";",
"}",
"public",
"Chunk",
"provideChunk",
"(",
"int",
"par1",
",",
"int",
"par2",
")",
"{",
"endRNG",
".",
"setSeed",
"(",
"(",
"long",
")",
"par1",
"*",
"0x4f9939f508L",
"+",
"(",
"long",
")",
"par2",
"*",
"0x1ef1565bd5L",
")",
";",
"byte",
"abyte0",
"[",
"]",
"=",
"new",
"byte",
"[",
"32768",
"]",
";",
"biomesForGeneration",
"=",
"endWorld",
".",
"getWorldChunkManager",
"(",
")",
".",
"loadBlockGeneratorData",
"(",
"biomesForGeneration",
",",
"par1",
"*",
"16",
",",
"par2",
"*",
"16",
",",
"16",
",",
"16",
")",
";",
"func_40184_a",
"(",
"par1",
",",
"par2",
",",
"abyte0",
",",
"biomesForGeneration",
")",
";",
"func_40185_b",
"(",
"par1",
",",
"par2",
",",
"abyte0",
",",
"biomesForGeneration",
")",
";",
"Chunk",
"chunk",
"=",
"new",
"Chunk",
"(",
"endWorld",
",",
"abyte0",
",",
"par1",
",",
"par2",
")",
";",
"byte",
"abyte1",
"[",
"]",
"=",
"chunk",
".",
"getBiomeArray",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"abyte1",
".",
"length",
";",
"i",
"++",
")",
"{",
"abyte1",
"[",
"i",
"]",
"=",
"(",
"byte",
")",
"biomesForGeneration",
"[",
"i",
"]",
".",
"biomeID",
";",
"}",
"chunk",
".",
"generateSkylightMap",
"(",
")",
";",
"return",
"chunk",
";",
"}",
"private",
"double",
"[",
"]",
"func_40186_a",
"(",
"double",
"par1ArrayOfDouble",
"[",
"]",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
",",
"int",
"par6",
",",
"int",
"par7",
")",
"{",
"if",
"(",
"par1ArrayOfDouble",
"==",
"null",
")",
"{",
"par1ArrayOfDouble",
"=",
"new",
"double",
"[",
"par5",
"*",
"par6",
"*",
"par7",
"]",
";",
"}",
"double",
"d",
"=",
"684.41200000000003D",
";",
"double",
"d1",
"=",
"684.41200000000003D",
";",
"noiseData4",
"=",
"noiseGen4",
".",
"generateNoiseOctaves",
"(",
"noiseData4",
",",
"par2",
",",
"par4",
",",
"par5",
",",
"par7",
",",
"1.121D",
",",
"1.121D",
",",
"0.5D",
")",
";",
"noiseData5",
"=",
"noiseGen5",
".",
"generateNoiseOctaves",
"(",
"noiseData5",
",",
"par2",
",",
"par4",
",",
"par5",
",",
"par7",
",",
"200D",
",",
"200D",
",",
"0.5D",
")",
";",
"d",
"*=",
"2D",
";",
"noiseData1",
"=",
"noiseGen3",
".",
"generateNoiseOctaves",
"(",
"noiseData1",
",",
"par2",
",",
"par3",
",",
"par4",
",",
"par5",
",",
"par6",
",",
"par7",
",",
"d",
"/",
"80D",
",",
"d1",
"/",
"160D",
",",
"d",
"/",
"80D",
")",
";",
"noiseData2",
"=",
"noiseGen1",
".",
"generateNoiseOctaves",
"(",
"noiseData2",
",",
"par2",
",",
"par3",
",",
"par4",
",",
"par5",
",",
"par6",
",",
"par7",
",",
"d",
",",
"d1",
",",
"d",
")",
";",
"noiseData3",
"=",
"noiseGen2",
".",
"generateNoiseOctaves",
"(",
"noiseData3",
",",
"par2",
",",
"par3",
",",
"par4",
",",
"par5",
",",
"par6",
",",
"par7",
",",
"d",
",",
"d1",
",",
"d",
")",
";",
"int",
"i",
"=",
"0",
";",
"int",
"j",
"=",
"0",
";",
"for",
"(",
"int",
"k",
"=",
"0",
";",
"k",
"<",
"par5",
";",
"k",
"++",
")",
"{",
"for",
"(",
"int",
"l",
"=",
"0",
";",
"l",
"<",
"par7",
";",
"l",
"++",
")",
"{",
"double",
"d2",
"=",
"(",
"noiseData4",
"[",
"j",
"]",
"+",
"256D",
")",
"/",
"512D",
";",
"if",
"(",
"d2",
">",
"1.0D",
")",
"{",
"d2",
"=",
"1.0D",
";",
"}",
"double",
"d3",
"=",
"noiseData5",
"[",
"j",
"]",
"/",
"8000D",
";",
"if",
"(",
"d3",
"<",
"0.0D",
")",
"{",
"d3",
"=",
"-",
"d3",
"*",
"0.29999999999999999D",
";",
"}",
"d3",
"=",
"d3",
"*",
"3D",
"-",
"2D",
";",
"float",
"f",
"=",
"(",
"float",
")",
"(",
"(",
"k",
"+",
"par2",
")",
"-",
"0",
")",
"/",
"1.0F",
";",
"float",
"f1",
"=",
"(",
"float",
")",
"(",
"(",
"l",
"+",
"par4",
")",
"-",
"0",
")",
"/",
"1.0F",
";",
"float",
"f2",
"=",
"100F",
"-",
"MathHelper",
".",
"sqrt_float",
"(",
"f",
"*",
"f",
"+",
"f1",
"*",
"f1",
")",
"*",
"8F",
";",
"if",
"(",
"f2",
">",
"80F",
")",
"{",
"f2",
"=",
"80F",
";",
"}",
"if",
"(",
"f2",
"<",
"-",
"100F",
")",
"{",
"f2",
"=",
"-",
"100F",
";",
"}",
"if",
"(",
"d3",
">",
"1.0D",
")",
"{",
"d3",
"=",
"1.0D",
";",
"}",
"d3",
"/=",
"8D",
";",
"d3",
"=",
"0.0D",
";",
"if",
"(",
"d2",
"<",
"0.0D",
")",
"{",
"d2",
"=",
"0.0D",
";",
"}",
"d2",
"+=",
"0.5D",
";",
"d3",
"=",
"(",
"d3",
"*",
"(",
"double",
")",
"par6",
")",
"/",
"16D",
";",
"j",
"++",
";",
"double",
"d4",
"=",
"(",
"double",
")",
"par6",
"/",
"2D",
";",
"for",
"(",
"int",
"i1",
"=",
"0",
";",
"i1",
"<",
"par6",
";",
"i1",
"++",
")",
"{",
"double",
"d5",
"=",
"0.0D",
";",
"double",
"d6",
"=",
"(",
"(",
"(",
"double",
")",
"i1",
"-",
"d4",
")",
"*",
"8D",
")",
"/",
"d2",
";",
"if",
"(",
"d6",
"<",
"0.0D",
")",
"{",
"d6",
"*=",
"-",
"1D",
";",
"}",
"double",
"d7",
"=",
"noiseData2",
"[",
"i",
"]",
"/",
"512D",
";",
"double",
"d8",
"=",
"noiseData3",
"[",
"i",
"]",
"/",
"512D",
";",
"double",
"d9",
"=",
"(",
"noiseData1",
"[",
"i",
"]",
"/",
"10D",
"+",
"1.0D",
")",
"/",
"2D",
";",
"if",
"(",
"d9",
"<",
"0.0D",
")",
"{",
"d5",
"=",
"d7",
";",
"}",
"else",
"if",
"(",
"d9",
">",
"1.0D",
")",
"{",
"d5",
"=",
"d8",
";",
"}",
"else",
"{",
"d5",
"=",
"d7",
"+",
"(",
"d8",
"-",
"d7",
")",
"*",
"d9",
";",
"}",
"d5",
"-=",
"8D",
";",
"d5",
"+=",
"f2",
";",
"int",
"j1",
"=",
"2",
";",
"if",
"(",
"i1",
">",
"par6",
"/",
"2",
"-",
"j1",
")",
"{",
"double",
"d10",
"=",
"(",
"float",
")",
"(",
"i1",
"-",
"(",
"par6",
"/",
"2",
"-",
"j1",
")",
")",
"/",
"64F",
";",
"if",
"(",
"d10",
"<",
"0.0D",
")",
"{",
"d10",
"=",
"0.0D",
";",
"}",
"if",
"(",
"d10",
">",
"1.0D",
")",
"{",
"d10",
"=",
"1.0D",
";",
"}",
"d5",
"=",
"d5",
"*",
"(",
"1.0D",
"-",
"d10",
")",
"+",
"-",
"3000D",
"*",
"d10",
";",
"}",
"j1",
"=",
"8",
";",
"if",
"(",
"i1",
"<",
"j1",
")",
"{",
"double",
"d11",
"=",
"(",
"float",
")",
"(",
"j1",
"-",
"i1",
")",
"/",
"(",
"(",
"float",
")",
"j1",
"-",
"1.0F",
")",
";",
"d5",
"=",
"d5",
"*",
"(",
"1.0D",
"-",
"d11",
")",
"+",
"-",
"30D",
"*",
"d11",
";",
"}",
"par1ArrayOfDouble",
"[",
"i",
"]",
"=",
"d5",
";",
"i",
"++",
";",
"}",
"}",
"}",
"return",
"par1ArrayOfDouble",
";",
"}",
"public",
"boolean",
"chunkExists",
"(",
"int",
"par1",
",",
"int",
"par2",
")",
"{",
"return",
"true",
";",
"}",
"public",
"void",
"populate",
"(",
"IChunkProvider",
"par1IChunkProvider",
",",
"int",
"par2",
",",
"int",
"par3",
")",
"{",
"BlockSand",
".",
"fallInstantly",
"=",
"true",
";",
"int",
"i",
"=",
"par2",
"*",
"16",
";",
"int",
"j",
"=",
"par3",
"*",
"16",
";",
"BiomeGenBase",
"biomegenbase",
"=",
"endWorld",
".",
"getBiomeGenForCoords",
"(",
"i",
"+",
"16",
",",
"j",
"+",
"16",
")",
";",
"biomegenbase",
".",
"decorate",
"(",
"endWorld",
",",
"endWorld",
".",
"rand",
",",
"i",
",",
"j",
")",
";",
"BlockSand",
".",
"fallInstantly",
"=",
"false",
";",
"}",
"public",
"boolean",
"saveChunks",
"(",
"boolean",
"par1",
",",
"IProgressUpdate",
"par2IProgressUpdate",
")",
"{",
"return",
"true",
";",
"}",
"public",
"boolean",
"unload100OldestChunks",
"(",
")",
"{",
"return",
"false",
";",
"}",
"public",
"boolean",
"canSave",
"(",
")",
"{",
"return",
"true",
";",
"}",
"public",
"List",
"getPossibleCreatures",
"(",
"EnumCreatureType",
"par1EnumCreatureType",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"BiomeGenBase",
"biomegenbase",
"=",
"endWorld",
".",
"getBiomeGenForCoords",
"(",
"par2",
",",
"par4",
")",
";",
"if",
"(",
"biomegenbase",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"else",
"{",
"return",
"biomegenbase",
".",
"getSpawnableList",
"(",
"par1EnumCreatureType",
")",
";",
"}",
"}",
"public",
"ChunkPosition",
"findClosestStructure",
"(",
"World",
"par1World",
",",
"String",
"par2Str",
",",
"int",
"par3",
",",
"int",
"i",
",",
"int",
"j",
")",
"{",
"return",
"null",
";",
"}",
"}",
"</s>"
] |
9,375 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"class",
"EntitySnowball",
"extends",
"EntityThrowable",
"{",
"public",
"EntitySnowball",
"(",
"World",
"par1World",
")",
"{",
"super",
"(",
"par1World",
")",
";",
"}",
"public",
"EntitySnowball",
"(",
"World",
"par1World",
",",
"EntityLiving",
"par2EntityLiving",
")",
"{",
"super",
"(",
"par1World",
",",
"par2EntityLiving",
")",
";",
"}",
"public",
"EntitySnowball",
"(",
"World",
"par1World",
",",
"double",
"par2",
",",
"double",
"par4",
",",
"double",
"par6",
")",
"{",
"super",
"(",
"par1World",
",",
"par2",
",",
"par4",
",",
"par6",
")",
";",
"}",
"protected",
"void",
"onImpact",
"(",
"MovingObjectPosition",
"par1MovingObjectPosition",
")",
"{",
"if",
"(",
"par1MovingObjectPosition",
".",
"entityHit",
"!=",
"null",
")",
"{",
"byte",
"byte0",
"=",
"0",
";",
"if",
"(",
"par1MovingObjectPosition",
".",
"entityHit",
"instanceof",
"EntityBlaze",
")",
"{",
"byte0",
"=",
"3",
";",
"}",
"if",
"(",
"!",
"par1MovingObjectPosition",
".",
"entityHit",
".",
"attackEntityFrom",
"(",
"DamageSource",
".",
"causeThrownDamage",
"(",
"this",
",",
"thrower",
")",
",",
"byte0",
")",
")",
";",
"}",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"8",
";",
"i",
"++",
")",
"{",
"worldObj",
".",
"spawnParticle",
"(",
"\"snowballpoof\"",
",",
"posX",
",",
"posY",
",",
"posZ",
",",
"0.0D",
",",
"0.0D",
",",
"0.0D",
")",
";",
"}",
"if",
"(",
"!",
"worldObj",
".",
"isRemote",
")",
"{",
"setDead",
"(",
")",
";",
"}",
"}",
"}",
"</s>"
] |
9,376 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"BlockReed",
"extends",
"Block",
"{",
"protected",
"BlockReed",
"(",
"int",
"par1",
",",
"int",
"par2",
")",
"{",
"super",
"(",
"par1",
",",
"Material",
".",
"plants",
")",
";",
"blockIndexInTexture",
"=",
"par2",
";",
"float",
"f",
"=",
"0.375F",
";",
"setBlockBounds",
"(",
"0.5F",
"-",
"f",
",",
"0.0F",
",",
"0.5F",
"-",
"f",
",",
"0.5F",
"+",
"f",
",",
"1.0F",
",",
"0.5F",
"+",
"f",
")",
";",
"setTickRandomly",
"(",
"true",
")",
";",
"}",
"public",
"void",
"updateTick",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"Random",
"par5Random",
")",
"{",
"if",
"(",
"par1World",
".",
"isAirBlock",
"(",
"par2",
",",
"par3",
"+",
"1",
",",
"par4",
")",
")",
"{",
"int",
"i",
";",
"for",
"(",
"i",
"=",
"1",
";",
"par1World",
".",
"getBlockId",
"(",
"par2",
",",
"par3",
"-",
"i",
",",
"par4",
")",
"==",
"blockID",
";",
"i",
"++",
")",
"{",
"}",
"if",
"(",
"i",
"<",
"3",
")",
"{",
"int",
"j",
"=",
"par1World",
".",
"getBlockMetadata",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"if",
"(",
"j",
"==",
"15",
")",
"{",
"par1World",
".",
"setBlockWithNotify",
"(",
"par2",
",",
"par3",
"+",
"1",
",",
"par4",
",",
"blockID",
")",
";",
"par1World",
".",
"setBlockMetadataWithNotify",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"0",
")",
";",
"}",
"else",
"{",
"par1World",
".",
"setBlockMetadataWithNotify",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"j",
"+",
"1",
")",
";",
"}",
"}",
"}",
"}",
"public",
"boolean",
"canPlaceBlockAt",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"int",
"i",
"=",
"par1World",
".",
"getBlockId",
"(",
"par2",
",",
"par3",
"-",
"1",
",",
"par4",
")",
";",
"if",
"(",
"i",
"==",
"blockID",
")",
"{",
"return",
"true",
";",
"}",
"if",
"(",
"i",
"!=",
"Block",
".",
"grass",
".",
"blockID",
"&&",
"i",
"!=",
"Block",
".",
"dirt",
".",
"blockID",
"&&",
"i",
"!=",
"Block",
".",
"sand",
".",
"blockID",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"par1World",
".",
"getBlockMaterial",
"(",
"par2",
"-",
"1",
",",
"par3",
"-",
"1",
",",
"par4",
")",
"==",
"Material",
".",
"water",
")",
"{",
"return",
"true",
";",
"}",
"if",
"(",
"par1World",
".",
"getBlockMaterial",
"(",
"par2",
"+",
"1",
",",
"par3",
"-",
"1",
",",
"par4",
")",
"==",
"Material",
".",
"water",
")",
"{",
"return",
"true",
";",
"}",
"if",
"(",
"par1World",
".",
"getBlockMaterial",
"(",
"par2",
",",
"par3",
"-",
"1",
",",
"par4",
"-",
"1",
")",
"==",
"Material",
".",
"water",
")",
"{",
"return",
"true",
";",
"}",
"return",
"par1World",
".",
"getBlockMaterial",
"(",
"par2",
",",
"par3",
"-",
"1",
",",
"par4",
"+",
"1",
")",
"==",
"Material",
".",
"water",
";",
"}",
"public",
"void",
"onNeighborBlockChange",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
")",
"{",
"checkBlockCoordValid",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"}",
"protected",
"final",
"void",
"checkBlockCoordValid",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"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",
"canPlaceBlockAt",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"}",
"public",
"AxisAlignedBB",
"getCollisionBoundingBoxFromPool",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"i",
")",
"{",
"return",
"null",
";",
"}",
"public",
"int",
"idDropped",
"(",
"int",
"par1",
",",
"Random",
"par2Random",
",",
"int",
"par3",
")",
"{",
"return",
"Item",
".",
"reed",
".",
"shiftedIndex",
";",
"}",
"public",
"boolean",
"isOpaqueCube",
"(",
")",
"{",
"return",
"false",
";",
"}",
"public",
"boolean",
"renderAsNormalBlock",
"(",
")",
"{",
"return",
"false",
";",
"}",
"public",
"int",
"getRenderType",
"(",
")",
"{",
"return",
"1",
";",
"}",
"}",
"</s>"
] |
9,377 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"io",
".",
"BufferedReader",
";",
"import",
"java",
".",
"io",
".",
"InputStreamReader",
";",
"import",
"java",
".",
"net",
".",
"URL",
";",
"import",
"java",
".",
"net",
".",
"URLEncoder",
";",
"class",
"ThreadLoginVerifier",
"extends",
"Thread",
"{",
"final",
"Packet1Login",
"loginPacket",
";",
"final",
"NetLoginHandler",
"loginHandler",
";",
"ThreadLoginVerifier",
"(",
"NetLoginHandler",
"par1NetLoginHandler",
",",
"Packet1Login",
"par2Packet1Login",
")",
"{",
"loginHandler",
"=",
"par1NetLoginHandler",
";",
"loginPacket",
"=",
"par2Packet1Login",
";",
"}",
"public",
"void",
"run",
"(",
")",
"{",
"try",
"{",
"String",
"s",
"=",
"NetLoginHandler",
".",
"getServerId",
"(",
"loginHandler",
")",
";",
"URL",
"url",
"=",
"new",
"URL",
"(",
"(",
"new",
"StringBuilder",
"(",
")",
")",
".",
"append",
"(",
"\"\"",
")",
".",
"append",
"(",
"URLEncoder",
".",
"encode",
"(",
"loginPacket",
".",
"username",
",",
"\"UTF-8\"",
")",
")",
".",
"append",
"(",
"\"&serverId=\"",
")",
".",
"append",
"(",
"URLEncoder",
".",
"encode",
"(",
"s",
",",
"\"UTF-8\"",
")",
")",
".",
"toString",
"(",
")",
")",
";",
"BufferedReader",
"bufferedreader",
"=",
"new",
"BufferedReader",
"(",
"new",
"InputStreamReader",
"(",
"url",
".",
"openStream",
"(",
")",
")",
")",
";",
"String",
"s1",
"=",
"bufferedreader",
".",
"readLine",
"(",
")",
";",
"bufferedreader",
".",
"close",
"(",
")",
";",
"if",
"(",
"s1",
".",
"equals",
"(",
"\"YES\"",
")",
")",
"{",
"NetLoginHandler",
".",
"setLoginPacket",
"(",
"loginHandler",
",",
"loginPacket",
")",
";",
"}",
"else",
"{",
"loginHandler",
".",
"kickUser",
"(",
"\"\"",
")",
";",
"}",
"}",
"catch",
"(",
"Exception",
"exception",
")",
"{",
"loginHandler",
".",
"kickUser",
"(",
"(",
"new",
"StringBuilder",
"(",
")",
")",
".",
"append",
"(",
"\"\"",
")",
".",
"append",
"(",
"exception",
")",
".",
"append",
"(",
"\"]\"",
")",
".",
"toString",
"(",
")",
")",
";",
"exception",
".",
"printStackTrace",
"(",
")",
";",
"}",
"}",
"}",
"</s>"
] |
9,378 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"EntitySpider",
"extends",
"EntityMob",
"{",
"public",
"EntitySpider",
"(",
"World",
"par1World",
")",
"{",
"super",
"(",
"par1World",
")",
";",
"texture",
"=",
"\"\"",
";",
"setSize",
"(",
"1.4F",
",",
"0.9F",
")",
";",
"moveSpeed",
"=",
"0.8F",
";",
"}",
"protected",
"void",
"entityInit",
"(",
")",
"{",
"super",
".",
"entityInit",
"(",
")",
";",
"dataWatcher",
".",
"addObject",
"(",
"16",
",",
"new",
"Byte",
"(",
"(",
"byte",
")",
"0",
")",
")",
";",
"}",
"public",
"void",
"onLivingUpdate",
"(",
")",
"{",
"super",
".",
"onLivingUpdate",
"(",
")",
";",
"}",
"public",
"void",
"onUpdate",
"(",
")",
"{",
"super",
".",
"onUpdate",
"(",
")",
";",
"if",
"(",
"!",
"worldObj",
".",
"isRemote",
")",
"{",
"func_40125_a",
"(",
"isCollidedHorizontally",
")",
";",
"}",
"}",
"public",
"int",
"getMaxHealth",
"(",
")",
"{",
"return",
"16",
";",
"}",
"public",
"double",
"getMountedYOffset",
"(",
")",
"{",
"return",
"(",
"double",
")",
"height",
"*",
"0.75D",
"-",
"0.5D",
";",
"}",
"protected",
"boolean",
"canTriggerWalking",
"(",
")",
"{",
"return",
"false",
";",
"}",
"protected",
"Entity",
"findPlayerToAttack",
"(",
")",
"{",
"float",
"f",
"=",
"getBrightness",
"(",
"1.0F",
")",
";",
"if",
"(",
"f",
"<",
"0.5F",
")",
"{",
"double",
"d",
"=",
"16D",
";",
"return",
"worldObj",
".",
"getClosestVulnerablePlayerToEntity",
"(",
"this",
",",
"d",
")",
";",
"}",
"else",
"{",
"return",
"null",
";",
"}",
"}",
"protected",
"String",
"getLivingSound",
"(",
")",
"{",
"return",
"\"mob.spider\"",
";",
"}",
"protected",
"String",
"getHurtSound",
"(",
")",
"{",
"return",
"\"mob.spider\"",
";",
"}",
"protected",
"String",
"getDeathSound",
"(",
")",
"{",
"return",
"\"\"",
";",
"}",
"protected",
"void",
"attackEntity",
"(",
"Entity",
"par1Entity",
",",
"float",
"par2",
")",
"{",
"float",
"f",
"=",
"getBrightness",
"(",
"1.0F",
")",
";",
"if",
"(",
"f",
">",
"0.5F",
"&&",
"rand",
".",
"nextInt",
"(",
"100",
")",
"==",
"0",
")",
"{",
"entityToAttack",
"=",
"null",
";",
"return",
";",
"}",
"if",
"(",
"par2",
">",
"2.0F",
"&&",
"par2",
"<",
"6F",
"&&",
"rand",
".",
"nextInt",
"(",
"10",
")",
"==",
"0",
")",
"{",
"if",
"(",
"onGround",
")",
"{",
"double",
"d",
"=",
"par1Entity",
".",
"posX",
"-",
"posX",
";",
"double",
"d1",
"=",
"par1Entity",
".",
"posZ",
"-",
"posZ",
";",
"float",
"f1",
"=",
"MathHelper",
".",
"sqrt_double",
"(",
"d",
"*",
"d",
"+",
"d1",
"*",
"d1",
")",
";",
"motionX",
"=",
"(",
"d",
"/",
"(",
"double",
")",
"f1",
")",
"*",
"0.5D",
"*",
"0.80000001192092896D",
"+",
"motionX",
"*",
"0.20000000298023224D",
";",
"motionZ",
"=",
"(",
"d1",
"/",
"(",
"double",
")",
"f1",
")",
"*",
"0.5D",
"*",
"0.80000001192092896D",
"+",
"motionZ",
"*",
"0.20000000298023224D",
";",
"motionY",
"=",
"0.40000000596046448D",
";",
"}",
"}",
"else",
"{",
"super",
".",
"attackEntity",
"(",
"par1Entity",
",",
"par2",
")",
";",
"}",
"}",
"public",
"void",
"writeEntityToNBT",
"(",
"NBTTagCompound",
"par1NBTTagCompound",
")",
"{",
"super",
".",
"writeEntityToNBT",
"(",
"par1NBTTagCompound",
")",
";",
"}",
"public",
"void",
"readEntityFromNBT",
"(",
"NBTTagCompound",
"par1NBTTagCompound",
")",
"{",
"super",
".",
"readEntityFromNBT",
"(",
"par1NBTTagCompound",
")",
";",
"}",
"protected",
"int",
"getDropItemId",
"(",
")",
"{",
"return",
"Item",
".",
"silk",
".",
"shiftedIndex",
";",
"}",
"protected",
"void",
"dropFewItems",
"(",
"boolean",
"par1",
",",
"int",
"par2",
")",
"{",
"super",
".",
"dropFewItems",
"(",
"par1",
",",
"par2",
")",
";",
"if",
"(",
"par1",
"&&",
"(",
"rand",
".",
"nextInt",
"(",
"3",
")",
"==",
"0",
"||",
"rand",
".",
"nextInt",
"(",
"1",
"+",
"par2",
")",
">",
"0",
")",
")",
"{",
"dropItem",
"(",
"Item",
".",
"spiderEye",
".",
"shiftedIndex",
",",
"1",
")",
";",
"}",
"}",
"public",
"boolean",
"isOnLadder",
"(",
")",
"{",
"return",
"func_40124_p_",
"(",
")",
";",
"}",
"public",
"void",
"setInWeb",
"(",
")",
"{",
"}",
"public",
"EnumCreatureAttribute",
"getCreatureAttribute",
"(",
")",
"{",
"return",
"EnumCreatureAttribute",
".",
"ARTHROPOD",
";",
"}",
"public",
"boolean",
"isPotionApplicable",
"(",
"PotionEffect",
"par1PotionEffect",
")",
"{",
"if",
"(",
"par1PotionEffect",
".",
"getPotionID",
"(",
")",
"==",
"Potion",
".",
"poison",
".",
"id",
")",
"{",
"return",
"false",
";",
"}",
"else",
"{",
"return",
"super",
".",
"isPotionApplicable",
"(",
"par1PotionEffect",
")",
";",
"}",
"}",
"public",
"boolean",
"func_40124_p_",
"(",
")",
"{",
"return",
"(",
"dataWatcher",
".",
"getWatchableObjectByte",
"(",
"16",
")",
"&",
"1",
")",
"!=",
"0",
";",
"}",
"public",
"void",
"func_40125_a",
"(",
"boolean",
"par1",
")",
"{",
"byte",
"byte0",
"=",
"dataWatcher",
".",
"getWatchableObjectByte",
"(",
"16",
")",
";",
"if",
"(",
"par1",
")",
"{",
"byte0",
"|=",
"1",
";",
"}",
"else",
"{",
"byte0",
"&=",
"0xfe",
";",
"}",
"dataWatcher",
".",
"updateObject",
"(",
"16",
",",
"Byte",
".",
"valueOf",
"(",
"byte0",
")",
")",
";",
"}",
"}",
"</s>"
] |
9,379 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"BlockTorch",
"extends",
"Block",
"{",
"protected",
"BlockTorch",
"(",
"int",
"par1",
",",
"int",
"par2",
")",
"{",
"super",
"(",
"par1",
",",
"par2",
",",
"Material",
".",
"circuits",
")",
";",
"setTickRandomly",
"(",
"true",
")",
";",
"}",
"public",
"AxisAlignedBB",
"getCollisionBoundingBoxFromPool",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"i",
")",
"{",
"return",
"null",
";",
"}",
"public",
"boolean",
"isOpaqueCube",
"(",
")",
"{",
"return",
"false",
";",
"}",
"public",
"boolean",
"renderAsNormalBlock",
"(",
")",
"{",
"return",
"false",
";",
"}",
"public",
"int",
"getRenderType",
"(",
")",
"{",
"return",
"2",
";",
"}",
"private",
"boolean",
"canPlaceTorchOn",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"if",
"(",
"par1World",
".",
"isBlockNormalCubeDefault",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"true",
")",
")",
"{",
"return",
"true",
";",
"}",
"int",
"i",
"=",
"par1World",
".",
"getBlockId",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"if",
"(",
"i",
"==",
"Block",
".",
"fence",
".",
"blockID",
"||",
"i",
"==",
"Block",
".",
"netherFence",
".",
"blockID",
"||",
"i",
"==",
"Block",
".",
"glass",
".",
"blockID",
")",
"{",
"return",
"true",
";",
"}",
"if",
"(",
"Block",
".",
"blocksList",
"[",
"i",
"]",
"!=",
"null",
"&&",
"(",
"Block",
".",
"blocksList",
"[",
"i",
"]",
"instanceof",
"BlockStairs",
")",
")",
"{",
"int",
"j",
"=",
"par1World",
".",
"getBlockMetadata",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"if",
"(",
"(",
"4",
"&",
"j",
")",
"!=",
"0",
")",
"{",
"return",
"true",
";",
"}",
"}",
"return",
"false",
";",
"}",
"public",
"boolean",
"canPlaceBlockAt",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"if",
"(",
"par1World",
".",
"isBlockNormalCubeDefault",
"(",
"par2",
"-",
"1",
",",
"par3",
",",
"par4",
",",
"true",
")",
")",
"{",
"return",
"true",
";",
"}",
"if",
"(",
"par1World",
".",
"isBlockNormalCubeDefault",
"(",
"par2",
"+",
"1",
",",
"par3",
",",
"par4",
",",
"true",
")",
")",
"{",
"return",
"true",
";",
"}",
"if",
"(",
"par1World",
".",
"isBlockNormalCubeDefault",
"(",
"par2",
",",
"par3",
",",
"par4",
"-",
"1",
",",
"true",
")",
")",
"{",
"return",
"true",
";",
"}",
"if",
"(",
"par1World",
".",
"isBlockNormalCubeDefault",
"(",
"par2",
",",
"par3",
",",
"par4",
"+",
"1",
",",
"true",
")",
")",
"{",
"return",
"true",
";",
"}",
"return",
"canPlaceTorchOn",
"(",
"par1World",
",",
"par2",
",",
"par3",
"-",
"1",
",",
"par4",
")",
";",
"}",
"public",
"void",
"onBlockPlaced",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
")",
"{",
"int",
"i",
"=",
"par1World",
".",
"getBlockMetadata",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"if",
"(",
"par5",
"==",
"1",
"&&",
"canPlaceTorchOn",
"(",
"par1World",
",",
"par2",
",",
"par3",
"-",
"1",
",",
"par4",
")",
")",
"{",
"i",
"=",
"5",
";",
"}",
"if",
"(",
"par5",
"==",
"2",
"&&",
"par1World",
".",
"isBlockNormalCubeDefault",
"(",
"par2",
",",
"par3",
",",
"par4",
"+",
"1",
",",
"true",
")",
")",
"{",
"i",
"=",
"4",
";",
"}",
"if",
"(",
"par5",
"==",
"3",
"&&",
"par1World",
".",
"isBlockNormalCubeDefault",
"(",
"par2",
",",
"par3",
",",
"par4",
"-",
"1",
",",
"true",
")",
")",
"{",
"i",
"=",
"3",
";",
"}",
"if",
"(",
"par5",
"==",
"4",
"&&",
"par1World",
".",
"isBlockNormalCubeDefault",
"(",
"par2",
"+",
"1",
",",
"par3",
",",
"par4",
",",
"true",
")",
")",
"{",
"i",
"=",
"2",
";",
"}",
"if",
"(",
"par5",
"==",
"5",
"&&",
"par1World",
".",
"isBlockNormalCubeDefault",
"(",
"par2",
"-",
"1",
",",
"par3",
",",
"par4",
",",
"true",
")",
")",
"{",
"i",
"=",
"1",
";",
"}",
"par1World",
".",
"setBlockMetadataWithNotify",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"i",
")",
";",
"}",
"public",
"void",
"updateTick",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"Random",
"par5Random",
")",
"{",
"super",
".",
"updateTick",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
",",
"par5Random",
")",
";",
"if",
"(",
"par1World",
".",
"getBlockMetadata",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
"==",
"0",
")",
"{",
"onBlockAdded",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"}",
"}",
"public",
"void",
"onBlockAdded",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"if",
"(",
"par1World",
".",
"isBlockNormalCubeDefault",
"(",
"par2",
"-",
"1",
",",
"par3",
",",
"par4",
",",
"true",
")",
")",
"{",
"par1World",
".",
"setBlockMetadataWithNotify",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"1",
")",
";",
"}",
"else",
"if",
"(",
"par1World",
".",
"isBlockNormalCubeDefault",
"(",
"par2",
"+",
"1",
",",
"par3",
",",
"par4",
",",
"true",
")",
")",
"{",
"par1World",
".",
"setBlockMetadataWithNotify",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"2",
")",
";",
"}",
"else",
"if",
"(",
"par1World",
".",
"isBlockNormalCubeDefault",
"(",
"par2",
",",
"par3",
",",
"par4",
"-",
"1",
",",
"true",
")",
")",
"{",
"par1World",
".",
"setBlockMetadataWithNotify",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"3",
")",
";",
"}",
"else",
"if",
"(",
"par1World",
".",
"isBlockNormalCubeDefault",
"(",
"par2",
",",
"par3",
",",
"par4",
"+",
"1",
",",
"true",
")",
")",
"{",
"par1World",
".",
"setBlockMetadataWithNotify",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"4",
")",
";",
"}",
"else",
"if",
"(",
"canPlaceTorchOn",
"(",
"par1World",
",",
"par2",
",",
"par3",
"-",
"1",
",",
"par4",
")",
")",
"{",
"par1World",
".",
"setBlockMetadataWithNotify",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"5",
")",
";",
"}",
"dropTorchIfCantStay",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"}",
"public",
"void",
"onNeighborBlockChange",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
")",
"{",
"if",
"(",
"dropTorchIfCantStay",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
")",
")",
"{",
"int",
"i",
"=",
"par1World",
".",
"getBlockMetadata",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"boolean",
"flag",
"=",
"false",
";",
"if",
"(",
"!",
"par1World",
".",
"isBlockNormalCubeDefault",
"(",
"par2",
"-",
"1",
",",
"par3",
",",
"par4",
",",
"true",
")",
"&&",
"i",
"==",
"1",
")",
"{",
"flag",
"=",
"true",
";",
"}",
"if",
"(",
"!",
"par1World",
".",
"isBlockNormalCubeDefault",
"(",
"par2",
"+",
"1",
",",
"par3",
",",
"par4",
",",
"true",
")",
"&&",
"i",
"==",
"2",
")",
"{",
"flag",
"=",
"true",
";",
"}",
"if",
"(",
"!",
"par1World",
".",
"isBlockNormalCubeDefault",
"(",
"par2",
",",
"par3",
",",
"par4",
"-",
"1",
",",
"true",
")",
"&&",
"i",
"==",
"3",
")",
"{",
"flag",
"=",
"true",
";",
"}",
"if",
"(",
"!",
"par1World",
".",
"isBlockNormalCubeDefault",
"(",
"par2",
",",
"par3",
",",
"par4",
"+",
"1",
",",
"true",
")",
"&&",
"i",
"==",
"4",
")",
"{",
"flag",
"=",
"true",
";",
"}",
"if",
"(",
"!",
"canPlaceTorchOn",
"(",
"par1World",
",",
"par2",
",",
"par3",
"-",
"1",
",",
"par4",
")",
"&&",
"i",
"==",
"5",
")",
"{",
"flag",
"=",
"true",
";",
"}",
"if",
"(",
"flag",
")",
"{",
"dropBlockAsItem",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
",",
"par1World",
".",
"getBlockMetadata",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
",",
"0",
")",
";",
"par1World",
".",
"setBlockWithNotify",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"0",
")",
";",
"}",
"}",
"}",
"private",
"boolean",
"dropTorchIfCantStay",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"if",
"(",
"!",
"canPlaceBlockAt",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
")",
")",
"{",
"if",
"(",
"par1World",
".",
"getBlockId",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
"==",
"blockID",
")",
"{",
"dropBlockAsItem",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
",",
"par1World",
".",
"getBlockMetadata",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
",",
"0",
")",
";",
"par1World",
".",
"setBlockWithNotify",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"0",
")",
";",
"}",
"return",
"false",
";",
"}",
"else",
"{",
"return",
"true",
";",
"}",
"}",
"public",
"MovingObjectPosition",
"collisionRayTrace",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"Vec3D",
"par5Vec3D",
",",
"Vec3D",
"par6Vec3D",
")",
"{",
"int",
"i",
"=",
"par1World",
".",
"getBlockMetadata",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
"&",
"7",
";",
"float",
"f",
"=",
"0.15F",
";",
"if",
"(",
"i",
"==",
"1",
")",
"{",
"setBlockBounds",
"(",
"0.0F",
",",
"0.2F",
",",
"0.5F",
"-",
"f",
",",
"f",
"*",
"2.0F",
",",
"0.8F",
",",
"0.5F",
"+",
"f",
")",
";",
"}",
"else",
"if",
"(",
"i",
"==",
"2",
")",
"{",
"setBlockBounds",
"(",
"1.0F",
"-",
"f",
"*",
"2.0F",
",",
"0.2F",
",",
"0.5F",
"-",
"f",
",",
"1.0F",
",",
"0.8F",
",",
"0.5F",
"+",
"f",
")",
";",
"}",
"else",
"if",
"(",
"i",
"==",
"3",
")",
"{",
"setBlockBounds",
"(",
"0.5F",
"-",
"f",
",",
"0.2F",
",",
"0.0F",
",",
"0.5F",
"+",
"f",
",",
"0.8F",
",",
"f",
"*",
"2.0F",
")",
";",
"}",
"else",
"if",
"(",
"i",
"==",
"4",
")",
"{",
"setBlockBounds",
"(",
"0.5F",
"-",
"f",
",",
"0.2F",
",",
"1.0F",
"-",
"f",
"*",
"2.0F",
",",
"0.5F",
"+",
"f",
",",
"0.8F",
",",
"1.0F",
")",
";",
"}",
"else",
"{",
"float",
"f1",
"=",
"0.1F",
";",
"setBlockBounds",
"(",
"0.5F",
"-",
"f1",
",",
"0.0F",
",",
"0.5F",
"-",
"f1",
",",
"0.5F",
"+",
"f1",
",",
"0.6F",
",",
"0.5F",
"+",
"f1",
")",
";",
"}",
"return",
"super",
".",
"collisionRayTrace",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
",",
"par5Vec3D",
",",
"par6Vec3D",
")",
";",
"}",
"}",
"</s>"
] |
9,380 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"ArrayList",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"BlockPistonExtension",
"extends",
"Block",
"{",
"private",
"int",
"headTexture",
";",
"public",
"BlockPistonExtension",
"(",
"int",
"par1",
",",
"int",
"par2",
")",
"{",
"super",
"(",
"par1",
",",
"par2",
",",
"Material",
".",
"piston",
")",
";",
"headTexture",
"=",
"-",
"1",
";",
"setStepSound",
"(",
"soundStoneFootstep",
")",
";",
"setHardness",
"(",
"0.5F",
")",
";",
"}",
"public",
"void",
"onBlockRemoval",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"super",
".",
"onBlockRemoval",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"int",
"i",
"=",
"par1World",
".",
"getBlockMetadata",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"int",
"k",
"=",
"Facing",
".",
"faceToSide",
"[",
"getDirectionMeta",
"(",
"i",
")",
"]",
";",
"par2",
"+=",
"Facing",
".",
"offsetsXForSide",
"[",
"k",
"]",
";",
"par3",
"+=",
"Facing",
".",
"offsetsYForSide",
"[",
"k",
"]",
";",
"par4",
"+=",
"Facing",
".",
"offsetsZForSide",
"[",
"k",
"]",
";",
"int",
"l",
"=",
"par1World",
".",
"getBlockId",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"if",
"(",
"l",
"==",
"Block",
".",
"pistonBase",
".",
"blockID",
"||",
"l",
"==",
"Block",
".",
"pistonStickyBase",
".",
"blockID",
")",
"{",
"int",
"j",
"=",
"par1World",
".",
"getBlockMetadata",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"if",
"(",
"BlockPistonBase",
".",
"isExtended",
"(",
"j",
")",
")",
"{",
"Block",
".",
"blocksList",
"[",
"l",
"]",
".",
"dropBlockAsItem",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
",",
"j",
",",
"0",
")",
";",
"par1World",
".",
"setBlockWithNotify",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"0",
")",
";",
"}",
"}",
"}",
"public",
"int",
"getBlockTextureFromSideAndMetadata",
"(",
"int",
"par1",
",",
"int",
"par2",
")",
"{",
"int",
"i",
"=",
"getDirectionMeta",
"(",
"par2",
")",
";",
"if",
"(",
"par1",
"==",
"i",
")",
"{",
"if",
"(",
"headTexture",
">=",
"0",
")",
"{",
"return",
"headTexture",
";",
"}",
"if",
"(",
"(",
"par2",
"&",
"8",
")",
"!=",
"0",
")",
"{",
"return",
"blockIndexInTexture",
"-",
"1",
";",
"}",
"else",
"{",
"return",
"blockIndexInTexture",
";",
"}",
"}",
"return",
"par1",
"!=",
"Facing",
".",
"faceToSide",
"[",
"i",
"]",
"?",
"108",
":",
"107",
";",
"}",
"public",
"int",
"getRenderType",
"(",
")",
"{",
"return",
"17",
";",
"}",
"public",
"boolean",
"isOpaqueCube",
"(",
")",
"{",
"return",
"false",
";",
"}",
"public",
"boolean",
"renderAsNormalBlock",
"(",
")",
"{",
"return",
"false",
";",
"}",
"public",
"boolean",
"canPlaceBlockAt",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"i",
")",
"{",
"return",
"false",
";",
"}",
"public",
"boolean",
"canPlaceBlockOnSide",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"i",
",",
"int",
"j",
")",
"{",
"return",
"false",
";",
"}",
"public",
"int",
"quantityDropped",
"(",
"Random",
"par1Random",
")",
"{",
"return",
"0",
";",
"}",
"public",
"void",
"getCollidingBoundingBoxes",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"AxisAlignedBB",
"par5AxisAlignedBB",
",",
"ArrayList",
"par6ArrayList",
")",
"{",
"int",
"i",
"=",
"par1World",
".",
"getBlockMetadata",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"switch",
"(",
"getDirectionMeta",
"(",
"i",
")",
")",
"{",
"case",
"0",
":",
"setBlockBounds",
"(",
"0.0F",
",",
"0.0F",
",",
"0.0F",
",",
"1.0F",
",",
"0.25F",
",",
"1.0F",
")",
";",
"super",
".",
"getCollidingBoundingBoxes",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
",",
"par5AxisAlignedBB",
",",
"par6ArrayList",
")",
";",
"setBlockBounds",
"(",
"0.375F",
",",
"0.25F",
",",
"0.375F",
",",
"0.625F",
",",
"1.0F",
",",
"0.625F",
")",
";",
"super",
".",
"getCollidingBoundingBoxes",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
",",
"par5AxisAlignedBB",
",",
"par6ArrayList",
")",
";",
"break",
";",
"case",
"1",
":",
"setBlockBounds",
"(",
"0.0F",
",",
"0.75F",
",",
"0.0F",
",",
"1.0F",
",",
"1.0F",
",",
"1.0F",
")",
";",
"super",
".",
"getCollidingBoundingBoxes",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
",",
"par5AxisAlignedBB",
",",
"par6ArrayList",
")",
";",
"setBlockBounds",
"(",
"0.375F",
",",
"0.0F",
",",
"0.375F",
",",
"0.625F",
",",
"0.75F",
",",
"0.625F",
")",
";",
"super",
".",
"getCollidingBoundingBoxes",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
",",
"par5AxisAlignedBB",
",",
"par6ArrayList",
")",
";",
"break",
";",
"case",
"2",
":",
"setBlockBounds",
"(",
"0.0F",
",",
"0.0F",
",",
"0.0F",
",",
"1.0F",
",",
"1.0F",
",",
"0.25F",
")",
";",
"super",
".",
"getCollidingBoundingBoxes",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
",",
"par5AxisAlignedBB",
",",
"par6ArrayList",
")",
";",
"setBlockBounds",
"(",
"0.25F",
",",
"0.375F",
",",
"0.25F",
",",
"0.75F",
",",
"0.625F",
",",
"1.0F",
")",
";",
"super",
".",
"getCollidingBoundingBoxes",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
",",
"par5AxisAlignedBB",
",",
"par6ArrayList",
")",
";",
"break",
";",
"case",
"3",
":",
"setBlockBounds",
"(",
"0.0F",
",",
"0.0F",
",",
"0.75F",
",",
"1.0F",
",",
"1.0F",
",",
"1.0F",
")",
";",
"super",
".",
"getCollidingBoundingBoxes",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
",",
"par5AxisAlignedBB",
",",
"par6ArrayList",
")",
";",
"setBlockBounds",
"(",
"0.25F",
",",
"0.375F",
",",
"0.0F",
",",
"0.75F",
",",
"0.625F",
",",
"0.75F",
")",
";",
"super",
".",
"getCollidingBoundingBoxes",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
",",
"par5AxisAlignedBB",
",",
"par6ArrayList",
")",
";",
"break",
";",
"case",
"4",
":",
"setBlockBounds",
"(",
"0.0F",
",",
"0.0F",
",",
"0.0F",
",",
"0.25F",
",",
"1.0F",
",",
"1.0F",
")",
";",
"super",
".",
"getCollidingBoundingBoxes",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
",",
"par5AxisAlignedBB",
",",
"par6ArrayList",
")",
";",
"setBlockBounds",
"(",
"0.375F",
",",
"0.25F",
",",
"0.25F",
",",
"0.625F",
",",
"0.75F",
",",
"1.0F",
")",
";",
"super",
".",
"getCollidingBoundingBoxes",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
",",
"par5AxisAlignedBB",
",",
"par6ArrayList",
")",
";",
"break",
";",
"case",
"5",
":",
"setBlockBounds",
"(",
"0.75F",
",",
"0.0F",
",",
"0.0F",
",",
"1.0F",
",",
"1.0F",
",",
"1.0F",
")",
";",
"super",
".",
"getCollidingBoundingBoxes",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
",",
"par5AxisAlignedBB",
",",
"par6ArrayList",
")",
";",
"setBlockBounds",
"(",
"0.0F",
",",
"0.375F",
",",
"0.25F",
",",
"0.75F",
",",
"0.625F",
",",
"0.75F",
")",
";",
"super",
".",
"getCollidingBoundingBoxes",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
",",
"par5AxisAlignedBB",
",",
"par6ArrayList",
")",
";",
"break",
";",
"}",
"setBlockBounds",
"(",
"0.0F",
",",
"0.0F",
",",
"0.0F",
",",
"1.0F",
",",
"1.0F",
",",
"1.0F",
")",
";",
"}",
"public",
"void",
"setBlockBoundsBasedOnState",
"(",
"IBlockAccess",
"par1IBlockAccess",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"int",
"i",
"=",
"par1IBlockAccess",
".",
"getBlockMetadata",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"switch",
"(",
"getDirectionMeta",
"(",
"i",
")",
")",
"{",
"case",
"0",
":",
"setBlockBounds",
"(",
"0.0F",
",",
"0.0F",
",",
"0.0F",
",",
"1.0F",
",",
"0.25F",
",",
"1.0F",
")",
";",
"break",
";",
"case",
"1",
":",
"setBlockBounds",
"(",
"0.0F",
",",
"0.75F",
",",
"0.0F",
",",
"1.0F",
",",
"1.0F",
",",
"1.0F",
")",
";",
"break",
";",
"case",
"2",
":",
"setBlockBounds",
"(",
"0.0F",
",",
"0.0F",
",",
"0.0F",
",",
"1.0F",
",",
"1.0F",
",",
"0.25F",
")",
";",
"break",
";",
"case",
"3",
":",
"setBlockBounds",
"(",
"0.0F",
",",
"0.0F",
",",
"0.75F",
",",
"1.0F",
",",
"1.0F",
",",
"1.0F",
")",
";",
"break",
";",
"case",
"4",
":",
"setBlockBounds",
"(",
"0.0F",
",",
"0.0F",
",",
"0.0F",
",",
"0.25F",
",",
"1.0F",
",",
"1.0F",
")",
";",
"break",
";",
"case",
"5",
":",
"setBlockBounds",
"(",
"0.75F",
",",
"0.0F",
",",
"0.0F",
",",
"1.0F",
",",
"1.0F",
",",
"1.0F",
")",
";",
"break",
";",
"}",
"}",
"public",
"void",
"onNeighborBlockChange",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
")",
"{",
"int",
"i",
"=",
"getDirectionMeta",
"(",
"par1World",
".",
"getBlockMetadata",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
")",
";",
"int",
"j",
"=",
"par1World",
".",
"getBlockId",
"(",
"par2",
"-",
"Facing",
".",
"offsetsXForSide",
"[",
"i",
"]",
",",
"par3",
"-",
"Facing",
".",
"offsetsYForSide",
"[",
"i",
"]",
",",
"par4",
"-",
"Facing",
".",
"offsetsZForSide",
"[",
"i",
"]",
")",
";",
"if",
"(",
"j",
"!=",
"Block",
".",
"pistonBase",
".",
"blockID",
"&&",
"j",
"!=",
"Block",
".",
"pistonStickyBase",
".",
"blockID",
")",
"{",
"par1World",
".",
"setBlockWithNotify",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"0",
")",
";",
"}",
"else",
"{",
"Block",
".",
"blocksList",
"[",
"j",
"]",
".",
"onNeighborBlockChange",
"(",
"par1World",
",",
"par2",
"-",
"Facing",
".",
"offsetsXForSide",
"[",
"i",
"]",
",",
"par3",
"-",
"Facing",
".",
"offsetsYForSide",
"[",
"i",
"]",
",",
"par4",
"-",
"Facing",
".",
"offsetsZForSide",
"[",
"i",
"]",
",",
"par5",
")",
";",
"}",
"}",
"public",
"static",
"int",
"getDirectionMeta",
"(",
"int",
"par0",
")",
"{",
"return",
"par0",
"&",
"7",
";",
"}",
"}",
"</s>"
] |
9,381 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"BlockDragonEgg",
"extends",
"Block",
"{",
"public",
"BlockDragonEgg",
"(",
"int",
"par1",
",",
"int",
"par2",
")",
"{",
"super",
"(",
"par1",
",",
"par2",
",",
"Material",
".",
"dragonEgg",
")",
";",
"}",
"public",
"void",
"onBlockAdded",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"par1World",
".",
"scheduleBlockUpdate",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"blockID",
",",
"tickRate",
"(",
")",
")",
";",
"}",
"public",
"void",
"onNeighborBlockChange",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
")",
"{",
"par1World",
".",
"scheduleBlockUpdate",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"blockID",
",",
"tickRate",
"(",
")",
")",
";",
"}",
"public",
"void",
"updateTick",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"Random",
"par5Random",
")",
"{",
"fallIfPossible",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"}",
"private",
"void",
"fallIfPossible",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"int",
"i",
"=",
"par2",
";",
"int",
"j",
"=",
"par3",
";",
"int",
"k",
"=",
"par4",
";",
"if",
"(",
"BlockSand",
".",
"canFallBelow",
"(",
"par1World",
",",
"i",
",",
"j",
"-",
"1",
",",
"k",
")",
"&&",
"j",
">=",
"0",
")",
"{",
"byte",
"byte0",
"=",
"32",
";",
"if",
"(",
"BlockSand",
".",
"fallInstantly",
"||",
"!",
"par1World",
".",
"checkChunksExist",
"(",
"par2",
"-",
"byte0",
",",
"par3",
"-",
"byte0",
",",
"par4",
"-",
"byte0",
",",
"par2",
"+",
"byte0",
",",
"par3",
"+",
"byte0",
",",
"par4",
"+",
"byte0",
")",
")",
"{",
"par1World",
".",
"setBlockWithNotify",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"0",
")",
";",
"for",
"(",
";",
"BlockSand",
".",
"canFallBelow",
"(",
"par1World",
",",
"par2",
",",
"par3",
"-",
"1",
",",
"par4",
")",
"&&",
"par3",
">",
"0",
";",
"par3",
"--",
")",
"{",
"}",
"if",
"(",
"par3",
">",
"0",
")",
"{",
"par1World",
".",
"setBlockWithNotify",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"blockID",
")",
";",
"}",
"}",
"else",
"{",
"EntityFallingSand",
"entityfallingsand",
"=",
"new",
"EntityFallingSand",
"(",
"par1World",
",",
"(",
"float",
")",
"par2",
"+",
"0.5F",
",",
"(",
"float",
")",
"par3",
"+",
"0.5F",
",",
"(",
"float",
")",
"par4",
"+",
"0.5F",
",",
"blockID",
")",
";",
"par1World",
".",
"spawnEntityInWorld",
"(",
"entityfallingsand",
")",
";",
"}",
"}",
"}",
"public",
"boolean",
"blockActivated",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"EntityPlayer",
"par5EntityPlayer",
")",
"{",
"teleportNearby",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"return",
"true",
";",
"}",
"public",
"void",
"onBlockClicked",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"EntityPlayer",
"par5EntityPlayer",
")",
"{",
"teleportNearby",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"}",
"private",
"void",
"teleportNearby",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"if",
"(",
"par1World",
".",
"getBlockId",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
"!=",
"blockID",
")",
"{",
"return",
";",
"}",
"if",
"(",
"par1World",
".",
"isRemote",
")",
"{",
"return",
";",
"}",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"1000",
";",
"i",
"++",
")",
"{",
"int",
"j",
"=",
"(",
"par2",
"+",
"par1World",
".",
"rand",
".",
"nextInt",
"(",
"16",
")",
")",
"-",
"par1World",
".",
"rand",
".",
"nextInt",
"(",
"16",
")",
";",
"int",
"k",
"=",
"(",
"par3",
"+",
"par1World",
".",
"rand",
".",
"nextInt",
"(",
"8",
")",
")",
"-",
"par1World",
".",
"rand",
".",
"nextInt",
"(",
"8",
")",
";",
"int",
"l",
"=",
"(",
"par4",
"+",
"par1World",
".",
"rand",
".",
"nextInt",
"(",
"16",
")",
")",
"-",
"par1World",
".",
"rand",
".",
"nextInt",
"(",
"16",
")",
";",
"if",
"(",
"par1World",
".",
"getBlockId",
"(",
"j",
",",
"k",
",",
"l",
")",
"==",
"0",
")",
"{",
"par1World",
".",
"setBlockAndMetadataWithNotify",
"(",
"j",
",",
"k",
",",
"l",
",",
"blockID",
",",
"par1World",
".",
"getBlockMetadata",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
")",
";",
"par1World",
".",
"setBlockWithNotify",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"0",
")",
";",
"char",
"c",
"=",
"'\\200'",
";",
"for",
"(",
"int",
"i1",
"=",
"0",
";",
"i1",
"<",
"c",
";",
"i1",
"++",
")",
"{",
"double",
"d",
"=",
"par1World",
".",
"rand",
".",
"nextDouble",
"(",
")",
";",
"float",
"f",
"=",
"(",
"par1World",
".",
"rand",
".",
"nextFloat",
"(",
")",
"-",
"0.5F",
")",
"*",
"0.2F",
";",
"float",
"f1",
"=",
"(",
"par1World",
".",
"rand",
".",
"nextFloat",
"(",
")",
"-",
"0.5F",
")",
"*",
"0.2F",
";",
"float",
"f2",
"=",
"(",
"par1World",
".",
"rand",
".",
"nextFloat",
"(",
")",
"-",
"0.5F",
")",
"*",
"0.2F",
";",
"double",
"d1",
"=",
"(",
"double",
")",
"j",
"+",
"(",
"double",
")",
"(",
"par2",
"-",
"j",
")",
"*",
"d",
"+",
"(",
"par1World",
".",
"rand",
".",
"nextDouble",
"(",
")",
"-",
"0.5D",
")",
"*",
"1.0D",
"+",
"0.5D",
";",
"double",
"d2",
"=",
"(",
"(",
"double",
")",
"k",
"+",
"(",
"double",
")",
"(",
"par3",
"-",
"k",
")",
"*",
"d",
"+",
"par1World",
".",
"rand",
".",
"nextDouble",
"(",
")",
"*",
"1.0D",
")",
"-",
"0.5D",
";",
"double",
"d3",
"=",
"(",
"double",
")",
"l",
"+",
"(",
"double",
")",
"(",
"par4",
"-",
"l",
")",
"*",
"d",
"+",
"(",
"par1World",
".",
"rand",
".",
"nextDouble",
"(",
")",
"-",
"0.5D",
")",
"*",
"1.0D",
"+",
"0.5D",
";",
"par1World",
".",
"spawnParticle",
"(",
"\"portal\"",
",",
"d1",
",",
"d2",
",",
"d3",
",",
"f",
",",
"f1",
",",
"f2",
")",
";",
"}",
"return",
";",
"}",
"}",
"}",
"public",
"int",
"tickRate",
"(",
")",
"{",
"return",
"3",
";",
"}",
"public",
"boolean",
"canPlaceBlockAt",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"return",
"super",
".",
"canPlaceBlockAt",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"}",
"public",
"boolean",
"isOpaqueCube",
"(",
")",
"{",
"return",
"false",
";",
"}",
"public",
"boolean",
"renderAsNormalBlock",
"(",
")",
"{",
"return",
"false",
";",
"}",
"public",
"int",
"getRenderType",
"(",
")",
"{",
"return",
"27",
";",
"}",
"}",
"</s>"
] |
9,382 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"class",
"BlockStoneBrick",
"extends",
"Block",
"{",
"public",
"BlockStoneBrick",
"(",
"int",
"par1",
")",
"{",
"super",
"(",
"par1",
",",
"54",
",",
"Material",
".",
"rock",
")",
";",
"}",
"public",
"int",
"getBlockTextureFromSideAndMetadata",
"(",
"int",
"par1",
",",
"int",
"par2",
")",
"{",
"switch",
"(",
"par2",
")",
"{",
"default",
":",
"return",
"54",
";",
"case",
"1",
":",
"return",
"100",
";",
"case",
"2",
":",
"return",
"101",
";",
"case",
"3",
":",
"return",
"213",
";",
"}",
"}",
"protected",
"int",
"damageDropped",
"(",
"int",
"par1",
")",
"{",
"return",
"par1",
";",
"}",
"}",
"</s>"
] |
9,383 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"class",
"MaterialLiquid",
"extends",
"Material",
"{",
"public",
"MaterialLiquid",
"(",
"MapColor",
"par1MapColor",
")",
"{",
"super",
"(",
"par1MapColor",
")",
";",
"setGroundCover",
"(",
")",
";",
"setNoPushMobility",
"(",
")",
";",
"}",
"public",
"boolean",
"isLiquid",
"(",
")",
"{",
"return",
"true",
";",
"}",
"public",
"boolean",
"blocksMovement",
"(",
")",
"{",
"return",
"false",
";",
"}",
"public",
"boolean",
"isSolid",
"(",
")",
"{",
"return",
"false",
";",
"}",
"}",
"</s>"
] |
9,384 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"EntityPigZombie",
"extends",
"EntityZombie",
"{",
"private",
"int",
"angerLevel",
";",
"private",
"int",
"randomSoundDelay",
";",
"private",
"static",
"final",
"ItemStack",
"defaultHeldItem",
";",
"public",
"EntityPigZombie",
"(",
"World",
"par1World",
")",
"{",
"super",
"(",
"par1World",
")",
";",
"angerLevel",
"=",
"0",
";",
"randomSoundDelay",
"=",
"0",
";",
"texture",
"=",
"\"\"",
";",
"moveSpeed",
"=",
"0.5F",
";",
"attackStrength",
"=",
"5",
";",
"isImmuneToFire",
"=",
"true",
";",
"}",
"protected",
"boolean",
"isAIEnabled",
"(",
")",
"{",
"return",
"false",
";",
"}",
"public",
"void",
"onUpdate",
"(",
")",
"{",
"moveSpeed",
"=",
"entityToAttack",
"==",
"null",
"?",
"0.5F",
":",
"0.95F",
";",
"if",
"(",
"randomSoundDelay",
">",
"0",
"&&",
"--",
"randomSoundDelay",
"==",
"0",
")",
"{",
"worldObj",
".",
"playSoundAtEntity",
"(",
"this",
",",
"\"\"",
",",
"getSoundVolume",
"(",
")",
"*",
"2.0F",
",",
"(",
"(",
"rand",
".",
"nextFloat",
"(",
")",
"-",
"rand",
".",
"nextFloat",
"(",
")",
")",
"*",
"0.2F",
"+",
"1.0F",
")",
"*",
"1.8F",
")",
";",
"}",
"super",
".",
"onUpdate",
"(",
")",
";",
"}",
"public",
"boolean",
"getCanSpawnHere",
"(",
")",
"{",
"return",
"worldObj",
".",
"difficultySetting",
">",
"0",
"&&",
"worldObj",
".",
"checkIfAABBIsClear",
"(",
"boundingBox",
")",
"&&",
"worldObj",
".",
"getCollidingBoundingBoxes",
"(",
"this",
",",
"boundingBox",
")",
".",
"size",
"(",
")",
"==",
"0",
"&&",
"!",
"worldObj",
".",
"isAnyLiquid",
"(",
"boundingBox",
")",
";",
"}",
"public",
"void",
"writeEntityToNBT",
"(",
"NBTTagCompound",
"par1NBTTagCompound",
")",
"{",
"super",
".",
"writeEntityToNBT",
"(",
"par1NBTTagCompound",
")",
";",
"par1NBTTagCompound",
".",
"setShort",
"(",
"\"Anger\"",
",",
"(",
"short",
")",
"angerLevel",
")",
";",
"}",
"public",
"void",
"readEntityFromNBT",
"(",
"NBTTagCompound",
"par1NBTTagCompound",
")",
"{",
"super",
".",
"readEntityFromNBT",
"(",
"par1NBTTagCompound",
")",
";",
"angerLevel",
"=",
"par1NBTTagCompound",
".",
"getShort",
"(",
"\"Anger\"",
")",
";",
"}",
"protected",
"Entity",
"findPlayerToAttack",
"(",
")",
"{",
"if",
"(",
"angerLevel",
"==",
"0",
")",
"{",
"return",
"null",
";",
"}",
"else",
"{",
"return",
"super",
".",
"findPlayerToAttack",
"(",
")",
";",
"}",
"}",
"public",
"void",
"onLivingUpdate",
"(",
")",
"{",
"super",
".",
"onLivingUpdate",
"(",
")",
";",
"}",
"public",
"boolean",
"attackEntityFrom",
"(",
"DamageSource",
"par1DamageSource",
",",
"int",
"par2",
")",
"{",
"Entity",
"entity",
"=",
"par1DamageSource",
".",
"getEntity",
"(",
")",
";",
"if",
"(",
"entity",
"instanceof",
"EntityPlayer",
")",
"{",
"List",
"list",
"=",
"worldObj",
".",
"getEntitiesWithinAABBExcludingEntity",
"(",
"this",
",",
"boundingBox",
".",
"expand",
"(",
"32D",
",",
"32D",
",",
"32D",
")",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"list",
".",
"size",
"(",
")",
";",
"i",
"++",
")",
"{",
"Entity",
"entity1",
"=",
"(",
"Entity",
")",
"list",
".",
"get",
"(",
"i",
")",
";",
"if",
"(",
"entity1",
"instanceof",
"EntityPigZombie",
")",
"{",
"EntityPigZombie",
"entitypigzombie",
"=",
"(",
"EntityPigZombie",
")",
"entity1",
";",
"entitypigzombie",
".",
"becomeAngryAt",
"(",
"entity",
")",
";",
"}",
"}",
"becomeAngryAt",
"(",
"entity",
")",
";",
"}",
"return",
"super",
".",
"attackEntityFrom",
"(",
"par1DamageSource",
",",
"par2",
")",
";",
"}",
"private",
"void",
"becomeAngryAt",
"(",
"Entity",
"par1Entity",
")",
"{",
"entityToAttack",
"=",
"par1Entity",
";",
"angerLevel",
"=",
"400",
"+",
"rand",
".",
"nextInt",
"(",
"400",
")",
";",
"randomSoundDelay",
"=",
"rand",
".",
"nextInt",
"(",
"40",
")",
";",
"}",
"protected",
"String",
"getLivingSound",
"(",
")",
"{",
"return",
"\"\"",
";",
"}",
"protected",
"String",
"getHurtSound",
"(",
")",
"{",
"return",
"\"\"",
";",
"}",
"protected",
"String",
"getDeathSound",
"(",
")",
"{",
"return",
"\"\"",
";",
"}",
"protected",
"void",
"dropFewItems",
"(",
"boolean",
"par1",
",",
"int",
"par2",
")",
"{",
"int",
"i",
"=",
"rand",
".",
"nextInt",
"(",
"2",
"+",
"par2",
")",
";",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
"i",
";",
"j",
"++",
")",
"{",
"dropItem",
"(",
"Item",
".",
"rottenFlesh",
".",
"shiftedIndex",
",",
"1",
")",
";",
"}",
"i",
"=",
"rand",
".",
"nextInt",
"(",
"2",
"+",
"par2",
")",
";",
"for",
"(",
"int",
"k",
"=",
"0",
";",
"k",
"<",
"i",
";",
"k",
"++",
")",
"{",
"dropItem",
"(",
"Item",
".",
"goldNugget",
".",
"shiftedIndex",
",",
"1",
")",
";",
"}",
"}",
"protected",
"void",
"dropRareDrop",
"(",
"int",
"par1",
")",
"{",
"if",
"(",
"par1",
">",
"0",
")",
"{",
"ItemStack",
"itemstack",
"=",
"new",
"ItemStack",
"(",
"Item",
".",
"swordGold",
")",
";",
"EnchantmentHelper",
".",
"func_48622_a",
"(",
"rand",
",",
"itemstack",
",",
"5",
")",
";",
"entityDropItem",
"(",
"itemstack",
",",
"0.0F",
")",
";",
"}",
"else",
"{",
"int",
"i",
"=",
"rand",
".",
"nextInt",
"(",
"3",
")",
";",
"if",
"(",
"i",
"==",
"0",
")",
"{",
"dropItem",
"(",
"Item",
".",
"ingotGold",
".",
"shiftedIndex",
",",
"1",
")",
";",
"}",
"else",
"if",
"(",
"i",
"==",
"1",
")",
"{",
"dropItem",
"(",
"Item",
".",
"swordGold",
".",
"shiftedIndex",
",",
"1",
")",
";",
"}",
"else",
"if",
"(",
"i",
"==",
"2",
")",
"{",
"dropItem",
"(",
"Item",
".",
"helmetGold",
".",
"shiftedIndex",
",",
"1",
")",
";",
"}",
"}",
"}",
"protected",
"int",
"getDropItemId",
"(",
")",
"{",
"return",
"Item",
".",
"rottenFlesh",
".",
"shiftedIndex",
";",
"}",
"static",
"{",
"defaultHeldItem",
"=",
"new",
"ItemStack",
"(",
"Item",
".",
"swordGold",
",",
"1",
")",
";",
"}",
"}",
"</s>"
] |
9,385 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"abstract",
"class",
"WorldGenerator",
"{",
"private",
"final",
"boolean",
"doBlockNotify",
";",
"public",
"WorldGenerator",
"(",
")",
"{",
"doBlockNotify",
"=",
"false",
";",
"}",
"public",
"WorldGenerator",
"(",
"boolean",
"par1",
")",
"{",
"doBlockNotify",
"=",
"par1",
";",
"}",
"public",
"abstract",
"boolean",
"generate",
"(",
"World",
"world",
",",
"Random",
"random",
",",
"int",
"i",
",",
"int",
"j",
",",
"int",
"k",
")",
";",
"public",
"void",
"setScale",
"(",
"double",
"d",
",",
"double",
"d1",
",",
"double",
"d2",
")",
"{",
"}",
"protected",
"void",
"func_50023_a",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
")",
"{",
"setBlockAndMetadata",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
",",
"par5",
",",
"0",
")",
";",
"}",
"protected",
"void",
"setBlockAndMetadata",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
",",
"int",
"par6",
")",
"{",
"if",
"(",
"doBlockNotify",
")",
"{",
"par1World",
".",
"setBlockAndMetadataWithNotify",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"par5",
",",
"par6",
")",
";",
"}",
"else",
"if",
"(",
"par1World",
".",
"blockExists",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
"&&",
"par1World",
".",
"getChunkFromBlockCoords",
"(",
"par2",
",",
"par4",
")",
".",
"field_50025_o",
")",
"{",
"if",
"(",
"par1World",
".",
"setBlockAndMetadata",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"par5",
",",
"par6",
")",
")",
"{",
"par1World",
".",
"markBlockNeedsUpdate",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"}",
"}",
"else",
"{",
"par1World",
".",
"setBlockAndMetadata",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"par5",
",",
"par6",
")",
";",
"}",
"}",
"}",
"</s>"
] |
9,386 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"BlockFlower",
"extends",
"Block",
"{",
"protected",
"BlockFlower",
"(",
"int",
"par1",
",",
"int",
"par2",
",",
"Material",
"par3Material",
")",
"{",
"super",
"(",
"par1",
",",
"par3Material",
")",
";",
"blockIndexInTexture",
"=",
"par2",
";",
"setTickRandomly",
"(",
"true",
")",
";",
"float",
"f",
"=",
"0.2F",
";",
"setBlockBounds",
"(",
"0.5F",
"-",
"f",
",",
"0.0F",
",",
"0.5F",
"-",
"f",
",",
"0.5F",
"+",
"f",
",",
"f",
"*",
"3F",
",",
"0.5F",
"+",
"f",
")",
";",
"}",
"protected",
"BlockFlower",
"(",
"int",
"par1",
",",
"int",
"par2",
")",
"{",
"this",
"(",
"par1",
",",
"par2",
",",
"Material",
".",
"plants",
")",
";",
"}",
"public",
"boolean",
"canPlaceBlockAt",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"return",
"super",
".",
"canPlaceBlockAt",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
")",
"&&",
"canThisPlantGrowOnThisBlockID",
"(",
"par1World",
".",
"getBlockId",
"(",
"par2",
",",
"par3",
"-",
"1",
",",
"par4",
")",
")",
";",
"}",
"protected",
"boolean",
"canThisPlantGrowOnThisBlockID",
"(",
"int",
"par1",
")",
"{",
"return",
"par1",
"==",
"Block",
".",
"grass",
".",
"blockID",
"||",
"par1",
"==",
"Block",
".",
"dirt",
".",
"blockID",
"||",
"par1",
"==",
"Block",
".",
"tilledField",
".",
"blockID",
";",
"}",
"public",
"void",
"onNeighborBlockChange",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
")",
"{",
"super",
".",
"onNeighborBlockChange",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
",",
"par5",
")",
";",
"checkFlowerChange",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"}",
"public",
"void",
"updateTick",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"Random",
"par5Random",
")",
"{",
"checkFlowerChange",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"}",
"protected",
"final",
"void",
"checkFlowerChange",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"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",
".",
"getFullBlockLightValue",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
">=",
"8",
"||",
"par1World",
".",
"canBlockSeeTheSky",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
")",
"&&",
"canThisPlantGrowOnThisBlockID",
"(",
"par1World",
".",
"getBlockId",
"(",
"par2",
",",
"par3",
"-",
"1",
",",
"par4",
")",
")",
";",
"}",
"public",
"AxisAlignedBB",
"getCollisionBoundingBoxFromPool",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"i",
")",
"{",
"return",
"null",
";",
"}",
"public",
"boolean",
"isOpaqueCube",
"(",
")",
"{",
"return",
"false",
";",
"}",
"public",
"boolean",
"renderAsNormalBlock",
"(",
")",
"{",
"return",
"false",
";",
"}",
"public",
"int",
"getRenderType",
"(",
")",
"{",
"return",
"1",
";",
"}",
"}",
"</s>"
] |
9,387 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"io",
".",
"*",
";",
"public",
"class",
"Packet43Experience",
"extends",
"Packet",
"{",
"public",
"float",
"experience",
";",
"public",
"int",
"experienceTotal",
";",
"public",
"int",
"experienceLevel",
";",
"public",
"Packet43Experience",
"(",
")",
"{",
"}",
"public",
"Packet43Experience",
"(",
"float",
"par1",
",",
"int",
"par2",
",",
"int",
"par3",
")",
"{",
"experience",
"=",
"par1",
";",
"experienceTotal",
"=",
"par2",
";",
"experienceLevel",
"=",
"par3",
";",
"}",
"public",
"void",
"readPacketData",
"(",
"DataInputStream",
"par1DataInputStream",
")",
"throws",
"IOException",
"{",
"experience",
"=",
"par1DataInputStream",
".",
"readFloat",
"(",
")",
";",
"experienceLevel",
"=",
"par1DataInputStream",
".",
"readShort",
"(",
")",
";",
"experienceTotal",
"=",
"par1DataInputStream",
".",
"readShort",
"(",
")",
";",
"}",
"public",
"void",
"writePacketData",
"(",
"DataOutputStream",
"par1DataOutputStream",
")",
"throws",
"IOException",
"{",
"par1DataOutputStream",
".",
"writeFloat",
"(",
"experience",
")",
";",
"par1DataOutputStream",
".",
"writeShort",
"(",
"experienceLevel",
")",
";",
"par1DataOutputStream",
".",
"writeShort",
"(",
"experienceTotal",
")",
";",
"}",
"public",
"void",
"processPacket",
"(",
"NetHandler",
"par1NetHandler",
")",
"{",
"par1NetHandler",
".",
"handleExperience",
"(",
"this",
")",
";",
"}",
"public",
"int",
"getPacketSize",
"(",
")",
"{",
"return",
"4",
";",
"}",
"}",
"</s>"
] |
9,388 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"io",
".",
"*",
";",
"public",
"class",
"Packet17Sleep",
"extends",
"Packet",
"{",
"public",
"int",
"entityID",
";",
"public",
"int",
"bedX",
";",
"public",
"int",
"bedY",
";",
"public",
"int",
"bedZ",
";",
"public",
"int",
"field_22042_e",
";",
"public",
"Packet17Sleep",
"(",
")",
"{",
"}",
"public",
"Packet17Sleep",
"(",
"Entity",
"par1Entity",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
")",
"{",
"field_22042_e",
"=",
"par2",
";",
"bedX",
"=",
"par3",
";",
"bedY",
"=",
"par4",
";",
"bedZ",
"=",
"par5",
";",
"entityID",
"=",
"par1Entity",
".",
"entityId",
";",
"}",
"public",
"void",
"readPacketData",
"(",
"DataInputStream",
"par1DataInputStream",
")",
"throws",
"IOException",
"{",
"entityID",
"=",
"par1DataInputStream",
".",
"readInt",
"(",
")",
";",
"field_22042_e",
"=",
"par1DataInputStream",
".",
"readByte",
"(",
")",
";",
"bedX",
"=",
"par1DataInputStream",
".",
"readInt",
"(",
")",
";",
"bedY",
"=",
"par1DataInputStream",
".",
"readByte",
"(",
")",
";",
"bedZ",
"=",
"par1DataInputStream",
".",
"readInt",
"(",
")",
";",
"}",
"public",
"void",
"writePacketData",
"(",
"DataOutputStream",
"par1DataOutputStream",
")",
"throws",
"IOException",
"{",
"par1DataOutputStream",
".",
"writeInt",
"(",
"entityID",
")",
";",
"par1DataOutputStream",
".",
"writeByte",
"(",
"field_22042_e",
")",
";",
"par1DataOutputStream",
".",
"writeInt",
"(",
"bedX",
")",
";",
"par1DataOutputStream",
".",
"writeByte",
"(",
"bedY",
")",
";",
"par1DataOutputStream",
".",
"writeInt",
"(",
"bedZ",
")",
";",
"}",
"public",
"void",
"processPacket",
"(",
"NetHandler",
"par1NetHandler",
")",
"{",
"par1NetHandler",
".",
"handleSleep",
"(",
"this",
")",
";",
"}",
"public",
"int",
"getPacketSize",
"(",
")",
"{",
"return",
"14",
";",
"}",
"}",
"</s>"
] |
9,389 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"ItemEnderPearl",
"extends",
"Item",
"{",
"public",
"ItemEnderPearl",
"(",
"int",
"par1",
")",
"{",
"super",
"(",
"par1",
")",
";",
"maxStackSize",
"=",
"16",
";",
"}",
"public",
"ItemStack",
"onItemRightClick",
"(",
"ItemStack",
"par1ItemStack",
",",
"World",
"par2World",
",",
"EntityPlayer",
"par3EntityPlayer",
")",
"{",
"if",
"(",
"par3EntityPlayer",
".",
"capabilities",
".",
"isCreativeMode",
")",
"{",
"return",
"par1ItemStack",
";",
"}",
"if",
"(",
"par3EntityPlayer",
".",
"ridingEntity",
"!=",
"null",
")",
"{",
"return",
"par1ItemStack",
";",
"}",
"par1ItemStack",
".",
"stackSize",
"--",
";",
"par2World",
".",
"playSoundAtEntity",
"(",
"par3EntityPlayer",
",",
"\"random.bow\"",
",",
"0.5F",
",",
"0.4F",
"/",
"(",
"itemRand",
".",
"nextFloat",
"(",
")",
"*",
"0.4F",
"+",
"0.8F",
")",
")",
";",
"if",
"(",
"!",
"par2World",
".",
"isRemote",
")",
"{",
"par2World",
".",
"spawnEntityInWorld",
"(",
"new",
"EntityEnderPearl",
"(",
"par2World",
",",
"par3EntityPlayer",
")",
")",
";",
"}",
"return",
"par1ItemStack",
";",
"}",
"}",
"</s>"
] |
9,390 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"BlockStem",
"extends",
"BlockFlower",
"{",
"private",
"Block",
"fruitType",
";",
"protected",
"BlockStem",
"(",
"int",
"par1",
",",
"Block",
"par2Block",
")",
"{",
"super",
"(",
"par1",
",",
"111",
")",
";",
"fruitType",
"=",
"par2Block",
";",
"setTickRandomly",
"(",
"true",
")",
";",
"float",
"f",
"=",
"0.125F",
";",
"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",
".",
"tilledField",
".",
"blockID",
";",
"}",
"public",
"void",
"updateTick",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"Random",
"par5Random",
")",
"{",
"super",
".",
"updateTick",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
",",
"par5Random",
")",
";",
"if",
"(",
"par1World",
".",
"getBlockLightValue",
"(",
"par2",
",",
"par3",
"+",
"1",
",",
"par4",
")",
">=",
"9",
")",
"{",
"float",
"f",
"=",
"getGrowthModifier",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"if",
"(",
"par5Random",
".",
"nextInt",
"(",
"(",
"int",
")",
"(",
"25F",
"/",
"f",
")",
"+",
"1",
")",
"==",
"0",
")",
"{",
"int",
"i",
"=",
"par1World",
".",
"getBlockMetadata",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"if",
"(",
"i",
"<",
"7",
")",
"{",
"i",
"++",
";",
"par1World",
".",
"setBlockMetadataWithNotify",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"i",
")",
";",
"}",
"else",
"{",
"if",
"(",
"par1World",
".",
"getBlockId",
"(",
"par2",
"-",
"1",
",",
"par3",
",",
"par4",
")",
"==",
"fruitType",
".",
"blockID",
")",
"{",
"return",
";",
"}",
"if",
"(",
"par1World",
".",
"getBlockId",
"(",
"par2",
"+",
"1",
",",
"par3",
",",
"par4",
")",
"==",
"fruitType",
".",
"blockID",
")",
"{",
"return",
";",
"}",
"if",
"(",
"par1World",
".",
"getBlockId",
"(",
"par2",
",",
"par3",
",",
"par4",
"-",
"1",
")",
"==",
"fruitType",
".",
"blockID",
")",
"{",
"return",
";",
"}",
"if",
"(",
"par1World",
".",
"getBlockId",
"(",
"par2",
",",
"par3",
",",
"par4",
"+",
"1",
")",
"==",
"fruitType",
".",
"blockID",
")",
"{",
"return",
";",
"}",
"int",
"j",
"=",
"par5Random",
".",
"nextInt",
"(",
"4",
")",
";",
"int",
"k",
"=",
"par2",
";",
"int",
"l",
"=",
"par4",
";",
"if",
"(",
"j",
"==",
"0",
")",
"{",
"k",
"--",
";",
"}",
"if",
"(",
"j",
"==",
"1",
")",
"{",
"k",
"++",
";",
"}",
"if",
"(",
"j",
"==",
"2",
")",
"{",
"l",
"--",
";",
"}",
"if",
"(",
"j",
"==",
"3",
")",
"{",
"l",
"++",
";",
"}",
"int",
"i1",
"=",
"par1World",
".",
"getBlockId",
"(",
"k",
",",
"par3",
"-",
"1",
",",
"l",
")",
";",
"if",
"(",
"par1World",
".",
"getBlockId",
"(",
"k",
",",
"par3",
",",
"l",
")",
"==",
"0",
"&&",
"(",
"i1",
"==",
"Block",
".",
"tilledField",
".",
"blockID",
"||",
"i1",
"==",
"Block",
".",
"dirt",
".",
"blockID",
"||",
"i1",
"==",
"Block",
".",
"grass",
".",
"blockID",
")",
")",
"{",
"par1World",
".",
"setBlockWithNotify",
"(",
"k",
",",
"par3",
",",
"l",
",",
"fruitType",
".",
"blockID",
")",
";",
"}",
"}",
"}",
"}",
"}",
"public",
"void",
"fertilizeStem",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"par1World",
".",
"setBlockMetadataWithNotify",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"7",
")",
";",
"}",
"private",
"float",
"getGrowthModifier",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"float",
"f",
"=",
"1.0F",
";",
"int",
"i",
"=",
"par1World",
".",
"getBlockId",
"(",
"par2",
",",
"par3",
",",
"par4",
"-",
"1",
")",
";",
"int",
"j",
"=",
"par1World",
".",
"getBlockId",
"(",
"par2",
",",
"par3",
",",
"par4",
"+",
"1",
")",
";",
"int",
"k",
"=",
"par1World",
".",
"getBlockId",
"(",
"par2",
"-",
"1",
",",
"par3",
",",
"par4",
")",
";",
"int",
"l",
"=",
"par1World",
".",
"getBlockId",
"(",
"par2",
"+",
"1",
",",
"par3",
",",
"par4",
")",
";",
"int",
"i1",
"=",
"par1World",
".",
"getBlockId",
"(",
"par2",
"-",
"1",
",",
"par3",
",",
"par4",
"-",
"1",
")",
";",
"int",
"j1",
"=",
"par1World",
".",
"getBlockId",
"(",
"par2",
"+",
"1",
",",
"par3",
",",
"par4",
"-",
"1",
")",
";",
"int",
"k1",
"=",
"par1World",
".",
"getBlockId",
"(",
"par2",
"+",
"1",
",",
"par3",
",",
"par4",
"+",
"1",
")",
";",
"int",
"l1",
"=",
"par1World",
".",
"getBlockId",
"(",
"par2",
"-",
"1",
",",
"par3",
",",
"par4",
"+",
"1",
")",
";",
"boolean",
"flag",
"=",
"k",
"==",
"blockID",
"||",
"l",
"==",
"blockID",
";",
"boolean",
"flag1",
"=",
"i",
"==",
"blockID",
"||",
"j",
"==",
"blockID",
";",
"boolean",
"flag2",
"=",
"i1",
"==",
"blockID",
"||",
"j1",
"==",
"blockID",
"||",
"k1",
"==",
"blockID",
"||",
"l1",
"==",
"blockID",
";",
"for",
"(",
"int",
"i2",
"=",
"par2",
"-",
"1",
";",
"i2",
"<=",
"par2",
"+",
"1",
";",
"i2",
"++",
")",
"{",
"for",
"(",
"int",
"j2",
"=",
"par4",
"-",
"1",
";",
"j2",
"<=",
"par4",
"+",
"1",
";",
"j2",
"++",
")",
"{",
"int",
"k2",
"=",
"par1World",
".",
"getBlockId",
"(",
"i2",
",",
"par3",
"-",
"1",
",",
"j2",
")",
";",
"float",
"f1",
"=",
"0.0F",
";",
"if",
"(",
"k2",
"==",
"Block",
".",
"tilledField",
".",
"blockID",
")",
"{",
"f1",
"=",
"1.0F",
";",
"if",
"(",
"par1World",
".",
"getBlockMetadata",
"(",
"i2",
",",
"par3",
"-",
"1",
",",
"j2",
")",
">",
"0",
")",
"{",
"f1",
"=",
"3F",
";",
"}",
"}",
"if",
"(",
"i2",
"!=",
"par2",
"||",
"j2",
"!=",
"par4",
")",
"{",
"f1",
"/=",
"4F",
";",
"}",
"f",
"+=",
"f1",
";",
"}",
"}",
"if",
"(",
"flag2",
"||",
"flag",
"&&",
"flag1",
")",
"{",
"f",
"/=",
"2.0F",
";",
"}",
"return",
"f",
";",
"}",
"public",
"int",
"getBlockTextureFromSideAndMetadata",
"(",
"int",
"par1",
",",
"int",
"par2",
")",
"{",
"return",
"blockIndexInTexture",
";",
"}",
"public",
"void",
"setBlockBoundsForItemRender",
"(",
")",
"{",
"float",
"f",
"=",
"0.125F",
";",
"setBlockBounds",
"(",
"0.5F",
"-",
"f",
",",
"0.0F",
",",
"0.5F",
"-",
"f",
",",
"0.5F",
"+",
"f",
",",
"0.25F",
",",
"0.5F",
"+",
"f",
")",
";",
"}",
"public",
"void",
"setBlockBoundsBasedOnState",
"(",
"IBlockAccess",
"par1IBlockAccess",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"maxY",
"=",
"(",
"float",
")",
"(",
"par1IBlockAccess",
".",
"getBlockMetadata",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
"*",
"2",
"+",
"2",
")",
"/",
"16F",
";",
"float",
"f",
"=",
"0.125F",
";",
"setBlockBounds",
"(",
"0.5F",
"-",
"f",
",",
"0.0F",
",",
"0.5F",
"-",
"f",
",",
"0.5F",
"+",
"f",
",",
"(",
"float",
")",
"maxY",
",",
"0.5F",
"+",
"f",
")",
";",
"}",
"public",
"int",
"getRenderType",
"(",
")",
"{",
"return",
"19",
";",
"}",
"public",
"void",
"dropBlockAsItemWithChance",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
",",
"float",
"par6",
",",
"int",
"par7",
")",
"{",
"super",
".",
"dropBlockAsItemWithChance",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
",",
"par5",
",",
"par6",
",",
"par7",
")",
";",
"if",
"(",
"par1World",
".",
"isRemote",
")",
"{",
"return",
";",
"}",
"Item",
"item",
"=",
"null",
";",
"if",
"(",
"fruitType",
"==",
"Block",
".",
"pumpkin",
")",
"{",
"item",
"=",
"Item",
".",
"pumpkinSeeds",
";",
"}",
"if",
"(",
"fruitType",
"==",
"Block",
".",
"melon",
")",
"{",
"item",
"=",
"Item",
".",
"melonSeeds",
";",
"}",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"3",
";",
"i",
"++",
")",
"{",
"if",
"(",
"par1World",
".",
"rand",
".",
"nextInt",
"(",
"15",
")",
"<=",
"par5",
")",
"{",
"float",
"f",
"=",
"0.7F",
";",
"float",
"f1",
"=",
"par1World",
".",
"rand",
".",
"nextFloat",
"(",
")",
"*",
"f",
"+",
"(",
"1.0F",
"-",
"f",
")",
"*",
"0.5F",
";",
"float",
"f2",
"=",
"par1World",
".",
"rand",
".",
"nextFloat",
"(",
")",
"*",
"f",
"+",
"(",
"1.0F",
"-",
"f",
")",
"*",
"0.5F",
";",
"float",
"f3",
"=",
"par1World",
".",
"rand",
".",
"nextFloat",
"(",
")",
"*",
"f",
"+",
"(",
"1.0F",
"-",
"f",
")",
"*",
"0.5F",
";",
"EntityItem",
"entityitem",
"=",
"new",
"EntityItem",
"(",
"par1World",
",",
"(",
"float",
")",
"par2",
"+",
"f1",
",",
"(",
"float",
")",
"par3",
"+",
"f2",
",",
"(",
"float",
")",
"par4",
"+",
"f3",
",",
"new",
"ItemStack",
"(",
"item",
")",
")",
";",
"entityitem",
".",
"delayBeforeCanPickup",
"=",
"10",
";",
"par1World",
".",
"spawnEntityInWorld",
"(",
"entityitem",
")",
";",
"}",
"}",
"}",
"public",
"int",
"idDropped",
"(",
"int",
"par1",
",",
"Random",
"par2Random",
",",
"int",
"par3",
")",
"{",
"if",
"(",
"par1",
"!=",
"7",
")",
";",
"return",
"-",
"1",
";",
"}",
"public",
"int",
"quantityDropped",
"(",
"Random",
"par1Random",
")",
"{",
"return",
"1",
";",
"}",
"}",
"</s>"
] |
9,391 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"EntityAIBreakDoor",
"extends",
"EntityAIDoorInteract",
"{",
"private",
"int",
"field_48194_i",
";",
"public",
"EntityAIBreakDoor",
"(",
"EntityLiving",
"par1EntityLiving",
")",
"{",
"super",
"(",
"par1EntityLiving",
")",
";",
"}",
"public",
"boolean",
"shouldExecute",
"(",
")",
"{",
"if",
"(",
"!",
"super",
".",
"shouldExecute",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",
"else",
"{",
"return",
"!",
"targetDoor",
".",
"func_48135_d",
"(",
"theEntity",
".",
"worldObj",
",",
"entityPosX",
",",
"entityPosY",
",",
"entityPosZ",
")",
";",
"}",
"}",
"public",
"void",
"startExecuting",
"(",
")",
"{",
"super",
".",
"startExecuting",
"(",
")",
";",
"field_48194_i",
"=",
"240",
";",
"}",
"public",
"boolean",
"continueExecuting",
"(",
")",
"{",
"double",
"d",
"=",
"theEntity",
".",
"getDistanceSq",
"(",
"entityPosX",
",",
"entityPosY",
",",
"entityPosZ",
")",
";",
"return",
"field_48194_i",
">=",
"0",
"&&",
"!",
"targetDoor",
".",
"func_48135_d",
"(",
"theEntity",
".",
"worldObj",
",",
"entityPosX",
",",
"entityPosY",
",",
"entityPosZ",
")",
"&&",
"d",
"<",
"4D",
";",
"}",
"public",
"void",
"updateTask",
"(",
")",
"{",
"super",
".",
"updateTask",
"(",
")",
";",
"if",
"(",
"theEntity",
".",
"getRNG",
"(",
")",
".",
"nextInt",
"(",
"20",
")",
"==",
"0",
")",
"{",
"theEntity",
".",
"worldObj",
".",
"playAuxSFX",
"(",
"1010",
",",
"entityPosX",
",",
"entityPosY",
",",
"entityPosZ",
",",
"0",
")",
";",
"}",
"if",
"(",
"--",
"field_48194_i",
"==",
"0",
"&&",
"theEntity",
".",
"worldObj",
".",
"difficultySetting",
"==",
"3",
")",
"{",
"theEntity",
".",
"worldObj",
".",
"setBlockWithNotify",
"(",
"entityPosX",
",",
"entityPosY",
",",
"entityPosZ",
",",
"0",
")",
";",
"theEntity",
".",
"worldObj",
".",
"playAuxSFX",
"(",
"1012",
",",
"entityPosX",
",",
"entityPosY",
",",
"entityPosZ",
",",
"0",
")",
";",
"theEntity",
".",
"worldObj",
".",
"playAuxSFX",
"(",
"2001",
",",
"entityPosX",
",",
"entityPosY",
",",
"entityPosZ",
",",
"targetDoor",
".",
"blockID",
")",
";",
"}",
"}",
"}",
"</s>"
] |
9,392 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"class",
"AnvilChunkLoaderPending",
"{",
"public",
"final",
"ChunkCoordIntPair",
"field_48581_a",
";",
"public",
"final",
"NBTTagCompound",
"field_48580_b",
";",
"public",
"AnvilChunkLoaderPending",
"(",
"ChunkCoordIntPair",
"par1ChunkCoordIntPair",
",",
"NBTTagCompound",
"par2NBTTagCompound",
")",
"{",
"field_48581_a",
"=",
"par1ChunkCoordIntPair",
";",
"field_48580_b",
"=",
"par2NBTTagCompound",
";",
"}",
"}",
"</s>"
] |
9,393 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"interface",
"IPlayerFileData",
"{",
"public",
"abstract",
"void",
"writePlayerData",
"(",
"EntityPlayer",
"entityplayer",
")",
";",
"public",
"abstract",
"void",
"readPlayerData",
"(",
"EntityPlayer",
"entityplayer",
")",
";",
"public",
"abstract",
"String",
"[",
"]",
"func_52007_g",
"(",
")",
";",
"}",
"</s>"
] |
9,394 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"EmptyChunk",
"extends",
"Chunk",
"{",
"public",
"EmptyChunk",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
")",
"{",
"super",
"(",
"par1World",
",",
"par2",
",",
"par3",
")",
";",
"}",
"public",
"boolean",
"isAtLocation",
"(",
"int",
"par1",
",",
"int",
"par2",
")",
"{",
"return",
"par1",
"==",
"xPosition",
"&&",
"par2",
"==",
"zPosition",
";",
"}",
"public",
"int",
"getHeightValue",
"(",
"int",
"par1",
",",
"int",
"par2",
")",
"{",
"return",
"0",
";",
"}",
"public",
"void",
"generateSkylightMap",
"(",
")",
"{",
"}",
"public",
"void",
"func_4053_c",
"(",
")",
"{",
"}",
"public",
"int",
"getBlockID",
"(",
"int",
"par1",
",",
"int",
"par2",
",",
"int",
"par3",
")",
"{",
"return",
"0",
";",
"}",
"public",
"int",
"getBlockLightOpacity",
"(",
"int",
"par1",
",",
"int",
"par2",
",",
"int",
"par3",
")",
"{",
"return",
"255",
";",
"}",
"public",
"boolean",
"setBlockIDWithMetadata",
"(",
"int",
"par1",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"i",
",",
"int",
"j",
")",
"{",
"return",
"true",
";",
"}",
"public",
"boolean",
"setBlockID",
"(",
"int",
"par1",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"i",
")",
"{",
"return",
"true",
";",
"}",
"public",
"int",
"getBlockMetadata",
"(",
"int",
"par1",
",",
"int",
"par2",
",",
"int",
"par3",
")",
"{",
"return",
"0",
";",
"}",
"public",
"boolean",
"setBlockMetadata",
"(",
"int",
"par1",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"i",
")",
"{",
"return",
"false",
";",
"}",
"public",
"int",
"getSavedLightValue",
"(",
"EnumSkyBlock",
"par1EnumSkyBlock",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"i",
")",
"{",
"return",
"0",
";",
"}",
"public",
"void",
"setLightValue",
"(",
"EnumSkyBlock",
"enumskyblock",
",",
"int",
"i",
",",
"int",
"j",
",",
"int",
"k",
",",
"int",
"l",
")",
"{",
"}",
"public",
"int",
"getBlockLightValue",
"(",
"int",
"par1",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"i",
")",
"{",
"return",
"0",
";",
"}",
"public",
"void",
"addEntity",
"(",
"Entity",
"entity",
")",
"{",
"}",
"public",
"void",
"removeEntity",
"(",
"Entity",
"entity",
")",
"{",
"}",
"public",
"void",
"removeEntityAtIndex",
"(",
"Entity",
"entity",
",",
"int",
"i",
")",
"{",
"}",
"public",
"boolean",
"canBlockSeeTheSky",
"(",
"int",
"par1",
",",
"int",
"par2",
",",
"int",
"par3",
")",
"{",
"return",
"false",
";",
"}",
"public",
"TileEntity",
"getChunkBlockTileEntity",
"(",
"int",
"par1",
",",
"int",
"par2",
",",
"int",
"par3",
")",
"{",
"return",
"null",
";",
"}",
"public",
"void",
"addTileEntity",
"(",
"TileEntity",
"tileentity",
")",
"{",
"}",
"public",
"void",
"setChunkBlockTileEntity",
"(",
"int",
"i",
",",
"int",
"j",
",",
"int",
"k",
",",
"TileEntity",
"tileentity",
")",
"{",
"}",
"public",
"void",
"removeChunkBlockTileEntity",
"(",
"int",
"i",
",",
"int",
"j",
",",
"int",
"k",
")",
"{",
"}",
"public",
"void",
"onChunkLoad",
"(",
")",
"{",
"}",
"public",
"void",
"onChunkUnload",
"(",
")",
"{",
"}",
"public",
"void",
"setChunkModified",
"(",
")",
"{",
"}",
"public",
"void",
"getEntitiesWithinAABBForEntity",
"(",
"Entity",
"entity",
",",
"AxisAlignedBB",
"axisalignedbb",
",",
"List",
"list",
")",
"{",
"}",
"public",
"void",
"getEntitiesOfTypeWithinAAAB",
"(",
"Class",
"class1",
",",
"AxisAlignedBB",
"axisalignedbb",
",",
"List",
"list",
")",
"{",
"}",
"public",
"boolean",
"needsSaving",
"(",
"boolean",
"par1",
")",
"{",
"return",
"false",
";",
"}",
"public",
"Random",
"getRandomWithSeed",
"(",
"long",
"par1",
")",
"{",
"return",
"new",
"Random",
"(",
"worldObj",
".",
"getSeed",
"(",
")",
"+",
"(",
"long",
")",
"(",
"xPosition",
"*",
"xPosition",
"*",
"0x4c1906",
")",
"+",
"(",
"long",
")",
"(",
"xPosition",
"*",
"0x5ac0db",
")",
"+",
"(",
"long",
")",
"(",
"zPosition",
"*",
"zPosition",
")",
"*",
"0x4307a7L",
"+",
"(",
"long",
")",
"(",
"zPosition",
"*",
"0x5f24f",
")",
"^",
"par1",
")",
";",
"}",
"public",
"boolean",
"isEmpty",
"(",
")",
"{",
"return",
"true",
";",
"}",
"public",
"boolean",
"getAreLevelsEmpty",
"(",
"int",
"par1",
",",
"int",
"par2",
")",
"{",
"return",
"true",
";",
"}",
"}",
"</s>"
] |
9,395 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"BlockFurnace",
"extends",
"BlockContainer",
"{",
"private",
"Random",
"furnaceRand",
";",
"private",
"final",
"boolean",
"isActive",
";",
"private",
"static",
"boolean",
"keepFurnaceInventory",
"=",
"false",
";",
"protected",
"BlockFurnace",
"(",
"int",
"par1",
",",
"boolean",
"par2",
")",
"{",
"super",
"(",
"par1",
",",
"Material",
".",
"rock",
")",
";",
"furnaceRand",
"=",
"new",
"Random",
"(",
")",
";",
"isActive",
"=",
"par2",
";",
"blockIndexInTexture",
"=",
"45",
";",
"}",
"public",
"int",
"idDropped",
"(",
"int",
"par1",
",",
"Random",
"par2Random",
",",
"int",
"par3",
")",
"{",
"return",
"Block",
".",
"stoneOvenIdle",
".",
"blockID",
";",
"}",
"public",
"void",
"onBlockAdded",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"super",
".",
"onBlockAdded",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"setDefaultDirection",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"}",
"private",
"void",
"setDefaultDirection",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"if",
"(",
"par1World",
".",
"isRemote",
")",
"{",
"return",
";",
"}",
"int",
"i",
"=",
"par1World",
".",
"getBlockId",
"(",
"par2",
",",
"par3",
",",
"par4",
"-",
"1",
")",
";",
"int",
"j",
"=",
"par1World",
".",
"getBlockId",
"(",
"par2",
",",
"par3",
",",
"par4",
"+",
"1",
")",
";",
"int",
"k",
"=",
"par1World",
".",
"getBlockId",
"(",
"par2",
"-",
"1",
",",
"par3",
",",
"par4",
")",
";",
"int",
"l",
"=",
"par1World",
".",
"getBlockId",
"(",
"par2",
"+",
"1",
",",
"par3",
",",
"par4",
")",
";",
"byte",
"byte0",
"=",
"3",
";",
"if",
"(",
"Block",
".",
"opaqueCubeLookup",
"[",
"i",
"]",
"&&",
"!",
"Block",
".",
"opaqueCubeLookup",
"[",
"j",
"]",
")",
"{",
"byte0",
"=",
"3",
";",
"}",
"if",
"(",
"Block",
".",
"opaqueCubeLookup",
"[",
"j",
"]",
"&&",
"!",
"Block",
".",
"opaqueCubeLookup",
"[",
"i",
"]",
")",
"{",
"byte0",
"=",
"2",
";",
"}",
"if",
"(",
"Block",
".",
"opaqueCubeLookup",
"[",
"k",
"]",
"&&",
"!",
"Block",
".",
"opaqueCubeLookup",
"[",
"l",
"]",
")",
"{",
"byte0",
"=",
"5",
";",
"}",
"if",
"(",
"Block",
".",
"opaqueCubeLookup",
"[",
"l",
"]",
"&&",
"!",
"Block",
".",
"opaqueCubeLookup",
"[",
"k",
"]",
")",
"{",
"byte0",
"=",
"4",
";",
"}",
"par1World",
".",
"setBlockMetadataWithNotify",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"byte0",
")",
";",
"}",
"public",
"int",
"getBlockTextureFromSide",
"(",
"int",
"par1",
")",
"{",
"if",
"(",
"par1",
"==",
"1",
")",
"{",
"return",
"blockIndexInTexture",
"+",
"17",
";",
"}",
"if",
"(",
"par1",
"==",
"0",
")",
"{",
"return",
"blockIndexInTexture",
"+",
"17",
";",
"}",
"if",
"(",
"par1",
"==",
"3",
")",
"{",
"return",
"blockIndexInTexture",
"-",
"1",
";",
"}",
"else",
"{",
"return",
"blockIndexInTexture",
";",
"}",
"}",
"public",
"boolean",
"blockActivated",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"EntityPlayer",
"par5EntityPlayer",
")",
"{",
"if",
"(",
"par1World",
".",
"isRemote",
")",
"{",
"return",
"true",
";",
"}",
"TileEntityFurnace",
"tileentityfurnace",
"=",
"(",
"TileEntityFurnace",
")",
"par1World",
".",
"getBlockTileEntity",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"if",
"(",
"tileentityfurnace",
"!=",
"null",
")",
"{",
"par5EntityPlayer",
".",
"displayGUIFurnace",
"(",
"tileentityfurnace",
")",
";",
"}",
"return",
"true",
";",
"}",
"public",
"static",
"void",
"updateFurnaceBlockState",
"(",
"boolean",
"par0",
",",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"int",
"i",
"=",
"par1World",
".",
"getBlockMetadata",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"TileEntity",
"tileentity",
"=",
"par1World",
".",
"getBlockTileEntity",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"keepFurnaceInventory",
"=",
"true",
";",
"if",
"(",
"par0",
")",
"{",
"par1World",
".",
"setBlockWithNotify",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"Block",
".",
"stoneOvenActive",
".",
"blockID",
")",
";",
"}",
"else",
"{",
"par1World",
".",
"setBlockWithNotify",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"Block",
".",
"stoneOvenIdle",
".",
"blockID",
")",
";",
"}",
"keepFurnaceInventory",
"=",
"false",
";",
"par1World",
".",
"setBlockMetadataWithNotify",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"i",
")",
";",
"if",
"(",
"tileentity",
"!=",
"null",
")",
"{",
"tileentity",
".",
"validate",
"(",
")",
";",
"par1World",
".",
"setBlockTileEntity",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"tileentity",
")",
";",
"}",
"}",
"public",
"TileEntity",
"getBlockEntity",
"(",
")",
"{",
"return",
"new",
"TileEntityFurnace",
"(",
")",
";",
"}",
"public",
"void",
"onBlockPlacedBy",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"EntityLiving",
"par5EntityLiving",
")",
"{",
"int",
"i",
"=",
"MathHelper",
".",
"floor_double",
"(",
"(",
"double",
")",
"(",
"(",
"par5EntityLiving",
".",
"rotationYaw",
"*",
"4F",
")",
"/",
"360F",
")",
"+",
"0.5D",
")",
"&",
"3",
";",
"if",
"(",
"i",
"==",
"0",
")",
"{",
"par1World",
".",
"setBlockMetadataWithNotify",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"2",
")",
";",
"}",
"if",
"(",
"i",
"==",
"1",
")",
"{",
"par1World",
".",
"setBlockMetadataWithNotify",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"5",
")",
";",
"}",
"if",
"(",
"i",
"==",
"2",
")",
"{",
"par1World",
".",
"setBlockMetadataWithNotify",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"3",
")",
";",
"}",
"if",
"(",
"i",
"==",
"3",
")",
"{",
"par1World",
".",
"setBlockMetadataWithNotify",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"4",
")",
";",
"}",
"}",
"public",
"void",
"onBlockRemoval",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"if",
"(",
"!",
"keepFurnaceInventory",
")",
"{",
"TileEntityFurnace",
"tileentityfurnace",
"=",
"(",
"TileEntityFurnace",
")",
"par1World",
".",
"getBlockTileEntity",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"if",
"(",
"tileentityfurnace",
"!=",
"null",
")",
"{",
"label0",
":",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"tileentityfurnace",
".",
"getSizeInventory",
"(",
")",
";",
"i",
"++",
")",
"{",
"ItemStack",
"itemstack",
"=",
"tileentityfurnace",
".",
"getStackInSlot",
"(",
"i",
")",
";",
"if",
"(",
"itemstack",
"==",
"null",
")",
"{",
"continue",
";",
"}",
"float",
"f",
"=",
"furnaceRand",
".",
"nextFloat",
"(",
")",
"*",
"0.8F",
"+",
"0.1F",
";",
"float",
"f1",
"=",
"furnaceRand",
".",
"nextFloat",
"(",
")",
"*",
"0.8F",
"+",
"0.1F",
";",
"float",
"f2",
"=",
"furnaceRand",
".",
"nextFloat",
"(",
")",
"*",
"0.8F",
"+",
"0.1F",
";",
"do",
"{",
"if",
"(",
"itemstack",
".",
"stackSize",
"<=",
"0",
")",
"{",
"continue",
"label0",
";",
"}",
"int",
"j",
"=",
"furnaceRand",
".",
"nextInt",
"(",
"21",
")",
"+",
"10",
";",
"if",
"(",
"j",
">",
"itemstack",
".",
"stackSize",
")",
"{",
"j",
"=",
"itemstack",
".",
"stackSize",
";",
"}",
"itemstack",
".",
"stackSize",
"-=",
"j",
";",
"EntityItem",
"entityitem",
"=",
"new",
"EntityItem",
"(",
"par1World",
",",
"(",
"float",
")",
"par2",
"+",
"f",
",",
"(",
"float",
")",
"par3",
"+",
"f1",
",",
"(",
"float",
")",
"par4",
"+",
"f2",
",",
"new",
"ItemStack",
"(",
"itemstack",
".",
"itemID",
",",
"j",
",",
"itemstack",
".",
"getItemDamage",
"(",
")",
")",
")",
";",
"if",
"(",
"itemstack",
".",
"hasTagCompound",
"(",
")",
")",
"{",
"entityitem",
".",
"item",
".",
"setTagCompound",
"(",
"(",
"NBTTagCompound",
")",
"itemstack",
".",
"getTagCompound",
"(",
")",
".",
"copy",
"(",
")",
")",
";",
"}",
"float",
"f3",
"=",
"0.05F",
";",
"entityitem",
".",
"motionX",
"=",
"(",
"float",
")",
"furnaceRand",
".",
"nextGaussian",
"(",
")",
"*",
"f3",
";",
"entityitem",
".",
"motionY",
"=",
"(",
"float",
")",
"furnaceRand",
".",
"nextGaussian",
"(",
")",
"*",
"f3",
"+",
"0.2F",
";",
"entityitem",
".",
"motionZ",
"=",
"(",
"float",
")",
"furnaceRand",
".",
"nextGaussian",
"(",
")",
"*",
"f3",
";",
"par1World",
".",
"spawnEntityInWorld",
"(",
"entityitem",
")",
";",
"}",
"while",
"(",
"true",
")",
";",
"}",
"}",
"}",
"super",
".",
"onBlockRemoval",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"}",
"}",
"</s>"
] |
9,396 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"io",
".",
"*",
";",
"import",
"java",
".",
"util",
".",
"Arrays",
";",
"public",
"class",
"NBTTagIntArray",
"extends",
"NBTBase",
"{",
"public",
"int",
"field_48447_a",
"[",
"]",
";",
"public",
"NBTTagIntArray",
"(",
"String",
"par1Str",
")",
"{",
"super",
"(",
"par1Str",
")",
";",
"}",
"public",
"NBTTagIntArray",
"(",
"String",
"par1Str",
",",
"int",
"par2ArrayOfInteger",
"[",
"]",
")",
"{",
"super",
"(",
"par1Str",
")",
";",
"field_48447_a",
"=",
"par2ArrayOfInteger",
";",
"}",
"void",
"write",
"(",
"DataOutput",
"par1DataOutput",
")",
"throws",
"IOException",
"{",
"par1DataOutput",
".",
"writeInt",
"(",
"field_48447_a",
".",
"length",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"field_48447_a",
".",
"length",
";",
"i",
"++",
")",
"{",
"par1DataOutput",
".",
"writeInt",
"(",
"field_48447_a",
"[",
"i",
"]",
")",
";",
"}",
"}",
"void",
"load",
"(",
"DataInput",
"par1DataInput",
")",
"throws",
"IOException",
"{",
"int",
"i",
"=",
"par1DataInput",
".",
"readInt",
"(",
")",
";",
"field_48447_a",
"=",
"new",
"int",
"[",
"i",
"]",
";",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
"i",
";",
"j",
"++",
")",
"{",
"field_48447_a",
"[",
"j",
"]",
"=",
"par1DataInput",
".",
"readInt",
"(",
")",
";",
"}",
"}",
"public",
"byte",
"getId",
"(",
")",
"{",
"return",
"11",
";",
"}",
"public",
"String",
"toString",
"(",
")",
"{",
"return",
"(",
"new",
"StringBuilder",
"(",
")",
")",
".",
"append",
"(",
"\"[\"",
")",
".",
"append",
"(",
"field_48447_a",
".",
"length",
")",
".",
"append",
"(",
"\"",
"bytes]\"",
")",
".",
"toString",
"(",
")",
";",
"}",
"public",
"NBTBase",
"copy",
"(",
")",
"{",
"int",
"ai",
"[",
"]",
"=",
"new",
"int",
"[",
"field_48447_a",
".",
"length",
"]",
";",
"System",
".",
"arraycopy",
"(",
"field_48447_a",
",",
"0",
",",
"ai",
",",
"0",
",",
"field_48447_a",
".",
"length",
")",
";",
"return",
"new",
"NBTTagIntArray",
"(",
"getName",
"(",
")",
",",
"ai",
")",
";",
"}",
"public",
"boolean",
"equals",
"(",
"Object",
"par1Obj",
")",
"{",
"if",
"(",
"super",
".",
"equals",
"(",
"par1Obj",
")",
")",
"{",
"NBTTagIntArray",
"nbttagintarray",
"=",
"(",
"NBTTagIntArray",
")",
"par1Obj",
";",
"return",
"field_48447_a",
"==",
"null",
"&&",
"nbttagintarray",
".",
"field_48447_a",
"==",
"null",
"||",
"field_48447_a",
"!=",
"null",
"&&",
"field_48447_a",
".",
"equals",
"(",
"nbttagintarray",
".",
"field_48447_a",
")",
";",
"}",
"else",
"{",
"return",
"false",
";",
"}",
"}",
"public",
"int",
"hashCode",
"(",
")",
"{",
"return",
"super",
".",
"hashCode",
"(",
")",
"^",
"Arrays",
".",
"hashCode",
"(",
"field_48447_a",
")",
";",
"}",
"}",
"</s>"
] |
9,397 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"class",
"InventoryCraftResult",
"implements",
"IInventory",
"{",
"private",
"ItemStack",
"stackResult",
"[",
"]",
";",
"public",
"InventoryCraftResult",
"(",
")",
"{",
"stackResult",
"=",
"new",
"ItemStack",
"[",
"1",
"]",
";",
"}",
"public",
"int",
"getSizeInventory",
"(",
")",
"{",
"return",
"1",
";",
"}",
"public",
"ItemStack",
"getStackInSlot",
"(",
"int",
"par1",
")",
"{",
"return",
"stackResult",
"[",
"par1",
"]",
";",
"}",
"public",
"String",
"getInvName",
"(",
")",
"{",
"return",
"\"Result\"",
";",
"}",
"public",
"ItemStack",
"decrStackSize",
"(",
"int",
"par1",
",",
"int",
"par2",
")",
"{",
"if",
"(",
"stackResult",
"[",
"par1",
"]",
"!=",
"null",
")",
"{",
"ItemStack",
"itemstack",
"=",
"stackResult",
"[",
"par1",
"]",
";",
"stackResult",
"[",
"par1",
"]",
"=",
"null",
";",
"return",
"itemstack",
";",
"}",
"else",
"{",
"return",
"null",
";",
"}",
"}",
"public",
"ItemStack",
"getStackInSlotOnClosing",
"(",
"int",
"par1",
")",
"{",
"if",
"(",
"stackResult",
"[",
"par1",
"]",
"!=",
"null",
")",
"{",
"ItemStack",
"itemstack",
"=",
"stackResult",
"[",
"par1",
"]",
";",
"stackResult",
"[",
"par1",
"]",
"=",
"null",
";",
"return",
"itemstack",
";",
"}",
"else",
"{",
"return",
"null",
";",
"}",
"}",
"public",
"void",
"setInventorySlotContents",
"(",
"int",
"par1",
",",
"ItemStack",
"par2ItemStack",
")",
"{",
"stackResult",
"[",
"par1",
"]",
"=",
"par2ItemStack",
";",
"}",
"public",
"int",
"getInventoryStackLimit",
"(",
")",
"{",
"return",
"64",
";",
"}",
"public",
"void",
"onInventoryChanged",
"(",
")",
"{",
"}",
"public",
"boolean",
"isUseableByPlayer",
"(",
"EntityPlayer",
"par1EntityPlayer",
")",
"{",
"return",
"true",
";",
"}",
"public",
"void",
"openChest",
"(",
")",
"{",
"}",
"public",
"void",
"closeChest",
"(",
")",
"{",
"}",
"}",
"</s>"
] |
9,398 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"class",
"BlockFenceGate",
"extends",
"BlockDirectional",
"{",
"public",
"BlockFenceGate",
"(",
"int",
"par1",
",",
"int",
"par2",
")",
"{",
"super",
"(",
"par1",
",",
"par2",
",",
"Material",
".",
"wood",
")",
";",
"}",
"public",
"boolean",
"canPlaceBlockAt",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"if",
"(",
"!",
"par1World",
".",
"getBlockMaterial",
"(",
"par2",
",",
"par3",
"-",
"1",
",",
"par4",
")",
".",
"isSolid",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",
"else",
"{",
"return",
"super",
".",
"canPlaceBlockAt",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"}",
"}",
"public",
"AxisAlignedBB",
"getCollisionBoundingBoxFromPool",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"int",
"i",
"=",
"par1World",
".",
"getBlockMetadata",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"if",
"(",
"isFenceGateOpen",
"(",
"i",
")",
")",
"{",
"return",
"null",
";",
"}",
"if",
"(",
"i",
"==",
"2",
"||",
"i",
"==",
"0",
")",
"{",
"return",
"AxisAlignedBB",
".",
"getBoundingBoxFromPool",
"(",
"par2",
",",
"par3",
",",
"(",
"float",
")",
"par4",
"+",
"0.375F",
",",
"par2",
"+",
"1",
",",
"(",
"float",
")",
"par3",
"+",
"1.5F",
",",
"(",
"float",
")",
"par4",
"+",
"0.625F",
")",
";",
"}",
"else",
"{",
"return",
"AxisAlignedBB",
".",
"getBoundingBoxFromPool",
"(",
"(",
"float",
")",
"par2",
"+",
"0.375F",
",",
"par3",
",",
"par4",
",",
"(",
"float",
")",
"par2",
"+",
"0.625F",
",",
"(",
"float",
")",
"par3",
"+",
"1.5F",
",",
"par4",
"+",
"1",
")",
";",
"}",
"}",
"public",
"void",
"setBlockBoundsBasedOnState",
"(",
"IBlockAccess",
"par1IBlockAccess",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"int",
"i",
"=",
"getDirection",
"(",
"par1IBlockAccess",
".",
"getBlockMetadata",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
")",
";",
"if",
"(",
"i",
"==",
"2",
"||",
"i",
"==",
"0",
")",
"{",
"setBlockBounds",
"(",
"0.0F",
",",
"0.0F",
",",
"0.375F",
",",
"1.0F",
",",
"1.0F",
",",
"0.625F",
")",
";",
"}",
"else",
"{",
"setBlockBounds",
"(",
"0.375F",
",",
"0.0F",
",",
"0.0F",
",",
"0.625F",
",",
"1.0F",
",",
"1.0F",
")",
";",
"}",
"}",
"public",
"boolean",
"isOpaqueCube",
"(",
")",
"{",
"return",
"false",
";",
"}",
"public",
"boolean",
"renderAsNormalBlock",
"(",
")",
"{",
"return",
"false",
";",
"}",
"public",
"boolean",
"getBlocksMovement",
"(",
"IBlockAccess",
"par1IBlockAccess",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"return",
"isFenceGateOpen",
"(",
"par1IBlockAccess",
".",
"getBlockMetadata",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
")",
";",
"}",
"public",
"int",
"getRenderType",
"(",
")",
"{",
"return",
"21",
";",
"}",
"public",
"void",
"onBlockPlacedBy",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"EntityLiving",
"par5EntityLiving",
")",
"{",
"int",
"i",
"=",
"(",
"MathHelper",
".",
"floor_double",
"(",
"(",
"double",
")",
"(",
"(",
"par5EntityLiving",
".",
"rotationYaw",
"*",
"4F",
")",
"/",
"360F",
")",
"+",
"0.5D",
")",
"&",
"3",
")",
"%",
"4",
";",
"par1World",
".",
"setBlockMetadataWithNotify",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"i",
")",
";",
"}",
"public",
"boolean",
"blockActivated",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"EntityPlayer",
"par5EntityPlayer",
")",
"{",
"int",
"i",
"=",
"par1World",
".",
"getBlockMetadata",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"if",
"(",
"isFenceGateOpen",
"(",
"i",
")",
")",
"{",
"par1World",
".",
"setBlockMetadataWithNotify",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"i",
"&",
"-",
"5",
")",
";",
"}",
"else",
"{",
"int",
"j",
"=",
"(",
"MathHelper",
".",
"floor_double",
"(",
"(",
"double",
")",
"(",
"(",
"par5EntityPlayer",
".",
"rotationYaw",
"*",
"4F",
")",
"/",
"360F",
")",
"+",
"0.5D",
")",
"&",
"3",
")",
"%",
"4",
";",
"int",
"k",
"=",
"getDirection",
"(",
"i",
")",
";",
"if",
"(",
"k",
"==",
"(",
"j",
"+",
"2",
")",
"%",
"4",
")",
"{",
"i",
"=",
"j",
";",
"}",
"par1World",
".",
"setBlockMetadataWithNotify",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"i",
"|",
"4",
")",
";",
"}",
"par1World",
".",
"playAuxSFXAtEntity",
"(",
"par5EntityPlayer",
",",
"1003",
",",
"par2",
",",
"par3",
",",
"par4",
",",
"0",
")",
";",
"return",
"true",
";",
"}",
"public",
"void",
"onNeighborBlockChange",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
")",
"{",
"if",
"(",
"par1World",
".",
"isRemote",
")",
"{",
"return",
";",
"}",
"int",
"i",
"=",
"par1World",
".",
"getBlockMetadata",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"boolean",
"flag",
"=",
"par1World",
".",
"isBlockIndirectlyGettingPowered",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"if",
"(",
"flag",
"||",
"par5",
">",
"0",
"&&",
"Block",
".",
"blocksList",
"[",
"par5",
"]",
".",
"canProvidePower",
"(",
")",
"||",
"par5",
"==",
"0",
")",
"{",
"if",
"(",
"flag",
"&&",
"!",
"isFenceGateOpen",
"(",
"i",
")",
")",
"{",
"par1World",
".",
"setBlockMetadataWithNotify",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"i",
"|",
"4",
")",
";",
"par1World",
".",
"playAuxSFXAtEntity",
"(",
"null",
",",
"1003",
",",
"par2",
",",
"par3",
",",
"par4",
",",
"0",
")",
";",
"}",
"else",
"if",
"(",
"!",
"flag",
"&&",
"isFenceGateOpen",
"(",
"i",
")",
")",
"{",
"par1World",
".",
"setBlockMetadataWithNotify",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"i",
"&",
"-",
"5",
")",
";",
"par1World",
".",
"playAuxSFXAtEntity",
"(",
"null",
",",
"1003",
",",
"par2",
",",
"par3",
",",
"par4",
",",
"0",
")",
";",
"}",
"}",
"}",
"public",
"static",
"boolean",
"isFenceGateOpen",
"(",
"int",
"par0",
")",
"{",
"return",
"(",
"par0",
"&",
"4",
")",
"!=",
"0",
";",
"}",
"}",
"</s>"
] |
9,399 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"ArrayList",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"BlockCauldron",
"extends",
"Block",
"{",
"public",
"BlockCauldron",
"(",
"int",
"par1",
")",
"{",
"super",
"(",
"par1",
",",
"Material",
".",
"iron",
")",
";",
"blockIndexInTexture",
"=",
"154",
";",
"}",
"public",
"int",
"getBlockTextureFromSideAndMetadata",
"(",
"int",
"par1",
",",
"int",
"par2",
")",
"{",
"if",
"(",
"par1",
"==",
"1",
")",
"{",
"return",
"138",
";",
"}",
"return",
"par1",
"!=",
"0",
"?",
"154",
":",
"155",
";",
"}",
"public",
"void",
"getCollidingBoundingBoxes",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"AxisAlignedBB",
"par5AxisAlignedBB",
",",
"ArrayList",
"par6ArrayList",
")",
"{",
"setBlockBounds",
"(",
"0.0F",
",",
"0.0F",
",",
"0.0F",
",",
"1.0F",
",",
"0.3125F",
",",
"1.0F",
")",
";",
"super",
".",
"getCollidingBoundingBoxes",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
",",
"par5AxisAlignedBB",
",",
"par6ArrayList",
")",
";",
"float",
"f",
"=",
"0.125F",
";",
"setBlockBounds",
"(",
"0.0F",
",",
"0.0F",
",",
"0.0F",
",",
"f",
",",
"1.0F",
",",
"1.0F",
")",
";",
"super",
".",
"getCollidingBoundingBoxes",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
",",
"par5AxisAlignedBB",
",",
"par6ArrayList",
")",
";",
"setBlockBounds",
"(",
"0.0F",
",",
"0.0F",
",",
"0.0F",
",",
"1.0F",
",",
"1.0F",
",",
"f",
")",
";",
"super",
".",
"getCollidingBoundingBoxes",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
",",
"par5AxisAlignedBB",
",",
"par6ArrayList",
")",
";",
"setBlockBounds",
"(",
"1.0F",
"-",
"f",
",",
"0.0F",
",",
"0.0F",
",",
"1.0F",
",",
"1.0F",
",",
"1.0F",
")",
";",
"super",
".",
"getCollidingBoundingBoxes",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
",",
"par5AxisAlignedBB",
",",
"par6ArrayList",
")",
";",
"setBlockBounds",
"(",
"0.0F",
",",
"0.0F",
",",
"1.0F",
"-",
"f",
",",
"1.0F",
",",
"1.0F",
",",
"1.0F",
")",
";",
"super",
".",
"getCollidingBoundingBoxes",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
",",
"par5AxisAlignedBB",
",",
"par6ArrayList",
")",
";",
"setBlockBoundsForItemRender",
"(",
")",
";",
"}",
"public",
"void",
"setBlockBoundsForItemRender",
"(",
")",
"{",
"setBlockBounds",
"(",
"0.0F",
",",
"0.0F",
",",
"0.0F",
",",
"1.0F",
",",
"1.0F",
",",
"1.0F",
")",
";",
"}",
"public",
"boolean",
"isOpaqueCube",
"(",
")",
"{",
"return",
"false",
";",
"}",
"public",
"int",
"getRenderType",
"(",
")",
"{",
"return",
"24",
";",
"}",
"public",
"boolean",
"renderAsNormalBlock",
"(",
")",
"{",
"return",
"false",
";",
"}",
"public",
"boolean",
"blockActivated",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"EntityPlayer",
"par5EntityPlayer",
")",
"{",
"if",
"(",
"par1World",
".",
"isRemote",
")",
"{",
"return",
"true",
";",
"}",
"ItemStack",
"itemstack",
"=",
"par5EntityPlayer",
".",
"inventory",
".",
"getCurrentItem",
"(",
")",
";",
"if",
"(",
"itemstack",
"==",
"null",
")",
"{",
"return",
"true",
";",
"}",
"int",
"i",
"=",
"par1World",
".",
"getBlockMetadata",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"if",
"(",
"itemstack",
".",
"itemID",
"==",
"Item",
".",
"bucketWater",
".",
"shiftedIndex",
")",
"{",
"if",
"(",
"i",
"<",
"3",
")",
"{",
"if",
"(",
"!",
"par5EntityPlayer",
".",
"capabilities",
".",
"isCreativeMode",
")",
"{",
"par5EntityPlayer",
".",
"inventory",
".",
"setInventorySlotContents",
"(",
"par5EntityPlayer",
".",
"inventory",
".",
"currentItem",
",",
"new",
"ItemStack",
"(",
"Item",
".",
"bucketEmpty",
")",
")",
";",
"}",
"par1World",
".",
"setBlockMetadataWithNotify",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"3",
")",
";",
"}",
"return",
"true",
";",
"}",
"if",
"(",
"itemstack",
".",
"itemID",
"==",
"Item",
".",
"glassBottle",
".",
"shiftedIndex",
"&&",
"i",
">",
"0",
")",
"{",
"ItemStack",
"itemstack1",
"=",
"new",
"ItemStack",
"(",
"Item",
".",
"potion",
",",
"1",
",",
"0",
")",
";",
"if",
"(",
"!",
"par5EntityPlayer",
".",
"inventory",
".",
"addItemStackToInventory",
"(",
"itemstack1",
")",
")",
"{",
"par1World",
".",
"spawnEntityInWorld",
"(",
"new",
"EntityItem",
"(",
"par1World",
",",
"(",
"double",
")",
"par2",
"+",
"0.5D",
",",
"(",
"double",
")",
"par3",
"+",
"1.5D",
",",
"(",
"double",
")",
"par4",
"+",
"0.5D",
",",
"itemstack1",
")",
")",
";",
"}",
"itemstack",
".",
"stackSize",
"--",
";",
"if",
"(",
"itemstack",
".",
"stackSize",
"<=",
"0",
")",
"{",
"par5EntityPlayer",
".",
"inventory",
".",
"setInventorySlotContents",
"(",
"par5EntityPlayer",
".",
"inventory",
".",
"currentItem",
",",
"null",
")",
";",
"}",
"par1World",
".",
"setBlockMetadataWithNotify",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"i",
"-",
"1",
")",
";",
"}",
"return",
"true",
";",
"}",
"public",
"int",
"idDropped",
"(",
"int",
"par1",
",",
"Random",
"par2Random",
",",
"int",
"par3",
")",
"{",
"return",
"Item",
".",
"cauldron",
".",
"shiftedIndex",
";",
"}",
"}",
"</s>"
] |
Subsets and Splits