id
int32 0
12.9k
| code
sequencelengths 2
264k
|
---|---|
9,500 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"class",
"EntityAIOcelotAttack",
"extends",
"EntityAIBase",
"{",
"World",
"theWorld",
";",
"EntityLiving",
"theEntity",
";",
"EntityLiving",
"field_48170_c",
";",
"int",
"field_48168_d",
";",
"public",
"EntityAIOcelotAttack",
"(",
"EntityLiving",
"par1EntityLiving",
")",
"{",
"field_48168_d",
"=",
"0",
";",
"theEntity",
"=",
"par1EntityLiving",
";",
"theWorld",
"=",
"par1EntityLiving",
".",
"worldObj",
";",
"setMutexBits",
"(",
"3",
")",
";",
"}",
"public",
"boolean",
"shouldExecute",
"(",
")",
"{",
"EntityLiving",
"entityliving",
"=",
"theEntity",
".",
"getAttackTarget",
"(",
")",
";",
"if",
"(",
"entityliving",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"else",
"{",
"field_48170_c",
"=",
"entityliving",
";",
"return",
"true",
";",
"}",
"}",
"public",
"boolean",
"continueExecuting",
"(",
")",
"{",
"if",
"(",
"!",
"field_48170_c",
".",
"isEntityAlive",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"theEntity",
".",
"getDistanceSqToEntity",
"(",
"field_48170_c",
")",
">",
"225D",
")",
"{",
"return",
"false",
";",
"}",
"else",
"{",
"return",
"!",
"theEntity",
".",
"getNavigator",
"(",
")",
".",
"noPath",
"(",
")",
"||",
"shouldExecute",
"(",
")",
";",
"}",
"}",
"public",
"void",
"resetTask",
"(",
")",
"{",
"field_48170_c",
"=",
"null",
";",
"theEntity",
".",
"getNavigator",
"(",
")",
".",
"clearPathEntity",
"(",
")",
";",
"}",
"public",
"void",
"updateTask",
"(",
")",
"{",
"theEntity",
".",
"getLookHelper",
"(",
")",
".",
"setLookPositionWithEntity",
"(",
"field_48170_c",
",",
"30F",
",",
"30F",
")",
";",
"double",
"d",
"=",
"theEntity",
".",
"width",
"*",
"2.0F",
"*",
"(",
"theEntity",
".",
"width",
"*",
"2.0F",
")",
";",
"double",
"d1",
"=",
"theEntity",
".",
"getDistanceSq",
"(",
"field_48170_c",
".",
"posX",
",",
"field_48170_c",
".",
"boundingBox",
".",
"minY",
",",
"field_48170_c",
".",
"posZ",
")",
";",
"float",
"f",
"=",
"0.23F",
";",
"if",
"(",
"d1",
">",
"d",
"&&",
"d1",
"<",
"16D",
")",
"{",
"f",
"=",
"0.4F",
";",
"}",
"else",
"if",
"(",
"d1",
"<",
"225D",
")",
"{",
"f",
"=",
"0.18F",
";",
"}",
"theEntity",
".",
"getNavigator",
"(",
")",
".",
"func_48652_a",
"(",
"field_48170_c",
",",
"f",
")",
";",
"field_48168_d",
"=",
"Math",
".",
"max",
"(",
"field_48168_d",
"-",
"1",
",",
"0",
")",
";",
"if",
"(",
"d1",
">",
"d",
")",
"{",
"return",
";",
"}",
"if",
"(",
"field_48168_d",
">",
"0",
")",
"{",
"return",
";",
"}",
"else",
"{",
"field_48168_d",
"=",
"20",
";",
"theEntity",
".",
"attackEntityAsMob",
"(",
"field_48170_c",
")",
";",
"return",
";",
"}",
"}",
"}",
"</s>"
] |
9,501 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"class",
"RecipesIngots",
"{",
"private",
"Object",
"recipeItems",
"[",
"]",
"[",
"]",
";",
"public",
"RecipesIngots",
"(",
")",
"{",
"recipeItems",
"=",
"(",
"new",
"Object",
"[",
"]",
"[",
"]",
"{",
"new",
"Object",
"[",
"]",
"{",
"Block",
".",
"blockGold",
",",
"new",
"ItemStack",
"(",
"Item",
".",
"ingotGold",
",",
"9",
")",
"}",
",",
"new",
"Object",
"[",
"]",
"{",
"Block",
".",
"blockSteel",
",",
"new",
"ItemStack",
"(",
"Item",
".",
"ingotIron",
",",
"9",
")",
"}",
",",
"new",
"Object",
"[",
"]",
"{",
"Block",
".",
"blockDiamond",
",",
"new",
"ItemStack",
"(",
"Item",
".",
"diamond",
",",
"9",
")",
"}",
",",
"new",
"Object",
"[",
"]",
"{",
"Block",
".",
"blockLapis",
",",
"new",
"ItemStack",
"(",
"Item",
".",
"dyePowder",
",",
"9",
",",
"4",
")",
"}",
"}",
")",
";",
"}",
"public",
"void",
"addRecipes",
"(",
"CraftingManager",
"par1CraftingManager",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"recipeItems",
".",
"length",
";",
"i",
"++",
")",
"{",
"Block",
"block",
"=",
"(",
"Block",
")",
"recipeItems",
"[",
"i",
"]",
"[",
"0",
"]",
";",
"ItemStack",
"itemstack",
"=",
"(",
"ItemStack",
")",
"recipeItems",
"[",
"i",
"]",
"[",
"1",
"]",
";",
"par1CraftingManager",
".",
"addRecipe",
"(",
"new",
"ItemStack",
"(",
"block",
")",
",",
"new",
"Object",
"[",
"]",
"{",
"\"###\"",
",",
"\"###\"",
",",
"\"###\"",
",",
"'#'",
",",
"itemstack",
"}",
")",
";",
"par1CraftingManager",
".",
"addRecipe",
"(",
"itemstack",
",",
"new",
"Object",
"[",
"]",
"{",
"\"#\"",
",",
"'#'",
",",
"block",
"}",
")",
";",
"}",
"par1CraftingManager",
".",
"addRecipe",
"(",
"new",
"ItemStack",
"(",
"Item",
".",
"ingotGold",
")",
",",
"new",
"Object",
"[",
"]",
"{",
"\"###\"",
",",
"\"###\"",
",",
"\"###\"",
",",
"'#'",
",",
"Item",
".",
"goldNugget",
"}",
")",
";",
"par1CraftingManager",
".",
"addRecipe",
"(",
"new",
"ItemStack",
"(",
"Item",
".",
"goldNugget",
",",
"9",
")",
",",
"new",
"Object",
"[",
"]",
"{",
"\"#\"",
",",
"'#'",
",",
"Item",
".",
"ingotGold",
"}",
")",
";",
"}",
"}",
"</s>"
] |
9,502 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"class",
"ItemPainting",
"extends",
"Item",
"{",
"public",
"ItemPainting",
"(",
"int",
"par1",
")",
"{",
"super",
"(",
"par1",
")",
";",
"}",
"public",
"boolean",
"onItemUse",
"(",
"ItemStack",
"par1ItemStack",
",",
"EntityPlayer",
"par2EntityPlayer",
",",
"World",
"par3World",
",",
"int",
"par4",
",",
"int",
"par5",
",",
"int",
"par6",
",",
"int",
"par7",
")",
"{",
"if",
"(",
"par7",
"==",
"0",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"par7",
"==",
"1",
")",
"{",
"return",
"false",
";",
"}",
"byte",
"byte0",
"=",
"0",
";",
"if",
"(",
"par7",
"==",
"4",
")",
"{",
"byte0",
"=",
"1",
";",
"}",
"if",
"(",
"par7",
"==",
"3",
")",
"{",
"byte0",
"=",
"2",
";",
"}",
"if",
"(",
"par7",
"==",
"5",
")",
"{",
"byte0",
"=",
"3",
";",
"}",
"if",
"(",
"!",
"par2EntityPlayer",
".",
"canPlayerEdit",
"(",
"par4",
",",
"par5",
",",
"par6",
")",
")",
"{",
"return",
"false",
";",
"}",
"EntityPainting",
"entitypainting",
"=",
"new",
"EntityPainting",
"(",
"par3World",
",",
"par4",
",",
"par5",
",",
"par6",
",",
"byte0",
")",
";",
"if",
"(",
"entitypainting",
".",
"onValidSurface",
"(",
")",
")",
"{",
"if",
"(",
"!",
"par3World",
".",
"isRemote",
")",
"{",
"par3World",
".",
"spawnEntityInWorld",
"(",
"entitypainting",
")",
";",
"}",
"par1ItemStack",
".",
"stackSize",
"--",
";",
"}",
"return",
"true",
";",
"}",
"}",
"</s>"
] |
9,503 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"class",
"GenLayerHills",
"extends",
"GenLayer",
"{",
"public",
"GenLayerHills",
"(",
"long",
"par1",
",",
"GenLayer",
"par3GenLayer",
")",
"{",
"super",
"(",
"par1",
")",
";",
"parent",
"=",
"par3GenLayer",
";",
"}",
"public",
"int",
"[",
"]",
"getInts",
"(",
"int",
"par1",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"int",
"ai",
"[",
"]",
"=",
"parent",
".",
"getInts",
"(",
"par1",
"-",
"1",
",",
"par2",
"-",
"1",
",",
"par3",
"+",
"2",
",",
"par4",
"+",
"2",
")",
";",
"int",
"ai1",
"[",
"]",
"=",
"IntCache",
".",
"getIntCache",
"(",
"par3",
"*",
"par4",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"par4",
";",
"i",
"++",
")",
"{",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
"par3",
";",
"j",
"++",
")",
"{",
"initChunkSeed",
"(",
"j",
"+",
"par1",
",",
"i",
"+",
"par2",
")",
";",
"int",
"k",
"=",
"ai",
"[",
"j",
"+",
"1",
"+",
"(",
"i",
"+",
"1",
")",
"*",
"(",
"par3",
"+",
"2",
")",
"]",
";",
"if",
"(",
"nextInt",
"(",
"3",
")",
"==",
"0",
")",
"{",
"int",
"l",
"=",
"k",
";",
"if",
"(",
"k",
"==",
"BiomeGenBase",
".",
"desert",
".",
"biomeID",
")",
"{",
"l",
"=",
"BiomeGenBase",
".",
"desertHills",
".",
"biomeID",
";",
"}",
"else",
"if",
"(",
"k",
"==",
"BiomeGenBase",
".",
"forest",
".",
"biomeID",
")",
"{",
"l",
"=",
"BiomeGenBase",
".",
"forestHills",
".",
"biomeID",
";",
"}",
"else",
"if",
"(",
"k",
"==",
"BiomeGenBase",
".",
"taiga",
".",
"biomeID",
")",
"{",
"l",
"=",
"BiomeGenBase",
".",
"taigaHills",
".",
"biomeID",
";",
"}",
"else",
"if",
"(",
"k",
"==",
"BiomeGenBase",
".",
"plains",
".",
"biomeID",
")",
"{",
"l",
"=",
"BiomeGenBase",
".",
"forest",
".",
"biomeID",
";",
"}",
"else",
"if",
"(",
"k",
"==",
"BiomeGenBase",
".",
"icePlains",
".",
"biomeID",
")",
"{",
"l",
"=",
"BiomeGenBase",
".",
"iceMountains",
".",
"biomeID",
";",
"}",
"else",
"if",
"(",
"k",
"==",
"BiomeGenBase",
".",
"jungle",
".",
"biomeID",
")",
"{",
"l",
"=",
"BiomeGenBase",
".",
"jungleHills",
".",
"biomeID",
";",
"}",
"if",
"(",
"l",
"!=",
"k",
")",
"{",
"int",
"i1",
"=",
"ai",
"[",
"j",
"+",
"1",
"+",
"(",
"(",
"i",
"+",
"1",
")",
"-",
"1",
")",
"*",
"(",
"par3",
"+",
"2",
")",
"]",
";",
"int",
"j1",
"=",
"ai",
"[",
"j",
"+",
"1",
"+",
"1",
"+",
"(",
"i",
"+",
"1",
")",
"*",
"(",
"par3",
"+",
"2",
")",
"]",
";",
"int",
"k1",
"=",
"ai",
"[",
"(",
"(",
"j",
"+",
"1",
")",
"-",
"1",
")",
"+",
"(",
"i",
"+",
"1",
")",
"*",
"(",
"par3",
"+",
"2",
")",
"]",
";",
"int",
"l1",
"=",
"ai",
"[",
"j",
"+",
"1",
"+",
"(",
"i",
"+",
"1",
"+",
"1",
")",
"*",
"(",
"par3",
"+",
"2",
")",
"]",
";",
"if",
"(",
"i1",
"==",
"k",
"&&",
"j1",
"==",
"k",
"&&",
"k1",
"==",
"k",
"&&",
"l1",
"==",
"k",
")",
"{",
"ai1",
"[",
"j",
"+",
"i",
"*",
"par3",
"]",
"=",
"l",
";",
"}",
"else",
"{",
"ai1",
"[",
"j",
"+",
"i",
"*",
"par3",
"]",
"=",
"k",
";",
"}",
"}",
"else",
"{",
"ai1",
"[",
"j",
"+",
"i",
"*",
"par3",
"]",
"=",
"k",
";",
"}",
"}",
"else",
"{",
"ai1",
"[",
"j",
"+",
"i",
"*",
"par3",
"]",
"=",
"k",
";",
"}",
"}",
"}",
"return",
"ai1",
";",
"}",
"}",
"</s>"
] |
9,504 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"io",
".",
"*",
";",
"public",
"class",
"Packet20NamedEntitySpawn",
"extends",
"Packet",
"{",
"public",
"int",
"entityId",
";",
"public",
"String",
"name",
";",
"public",
"int",
"xPosition",
";",
"public",
"int",
"yPosition",
";",
"public",
"int",
"zPosition",
";",
"public",
"byte",
"rotation",
";",
"public",
"byte",
"pitch",
";",
"public",
"int",
"currentItem",
";",
"public",
"Packet20NamedEntitySpawn",
"(",
")",
"{",
"}",
"public",
"Packet20NamedEntitySpawn",
"(",
"EntityPlayer",
"par1EntityPlayer",
")",
"{",
"entityId",
"=",
"par1EntityPlayer",
".",
"entityId",
";",
"name",
"=",
"par1EntityPlayer",
".",
"username",
";",
"xPosition",
"=",
"MathHelper",
".",
"floor_double",
"(",
"par1EntityPlayer",
".",
"posX",
"*",
"32D",
")",
";",
"yPosition",
"=",
"MathHelper",
".",
"floor_double",
"(",
"par1EntityPlayer",
".",
"posY",
"*",
"32D",
")",
";",
"zPosition",
"=",
"MathHelper",
".",
"floor_double",
"(",
"par1EntityPlayer",
".",
"posZ",
"*",
"32D",
")",
";",
"rotation",
"=",
"(",
"byte",
")",
"(",
"int",
")",
"(",
"(",
"par1EntityPlayer",
".",
"rotationYaw",
"*",
"256F",
")",
"/",
"360F",
")",
";",
"pitch",
"=",
"(",
"byte",
")",
"(",
"int",
")",
"(",
"(",
"par1EntityPlayer",
".",
"rotationPitch",
"*",
"256F",
")",
"/",
"360F",
")",
";",
"ItemStack",
"itemstack",
"=",
"par1EntityPlayer",
".",
"inventory",
".",
"getCurrentItem",
"(",
")",
";",
"currentItem",
"=",
"itemstack",
"!=",
"null",
"?",
"itemstack",
".",
"itemID",
":",
"0",
";",
"}",
"public",
"void",
"readPacketData",
"(",
"DataInputStream",
"par1DataInputStream",
")",
"throws",
"IOException",
"{",
"entityId",
"=",
"par1DataInputStream",
".",
"readInt",
"(",
")",
";",
"name",
"=",
"readString",
"(",
"par1DataInputStream",
",",
"16",
")",
";",
"xPosition",
"=",
"par1DataInputStream",
".",
"readInt",
"(",
")",
";",
"yPosition",
"=",
"par1DataInputStream",
".",
"readInt",
"(",
")",
";",
"zPosition",
"=",
"par1DataInputStream",
".",
"readInt",
"(",
")",
";",
"rotation",
"=",
"par1DataInputStream",
".",
"readByte",
"(",
")",
";",
"pitch",
"=",
"par1DataInputStream",
".",
"readByte",
"(",
")",
";",
"currentItem",
"=",
"par1DataInputStream",
".",
"readShort",
"(",
")",
";",
"}",
"public",
"void",
"writePacketData",
"(",
"DataOutputStream",
"par1DataOutputStream",
")",
"throws",
"IOException",
"{",
"par1DataOutputStream",
".",
"writeInt",
"(",
"entityId",
")",
";",
"writeString",
"(",
"name",
",",
"par1DataOutputStream",
")",
";",
"par1DataOutputStream",
".",
"writeInt",
"(",
"xPosition",
")",
";",
"par1DataOutputStream",
".",
"writeInt",
"(",
"yPosition",
")",
";",
"par1DataOutputStream",
".",
"writeInt",
"(",
"zPosition",
")",
";",
"par1DataOutputStream",
".",
"writeByte",
"(",
"rotation",
")",
";",
"par1DataOutputStream",
".",
"writeByte",
"(",
"pitch",
")",
";",
"par1DataOutputStream",
".",
"writeShort",
"(",
"currentItem",
")",
";",
"}",
"public",
"void",
"processPacket",
"(",
"NetHandler",
"par1NetHandler",
")",
"{",
"par1NetHandler",
".",
"handleNamedEntitySpawn",
"(",
"this",
")",
";",
"}",
"public",
"int",
"getPacketSize",
"(",
")",
"{",
"return",
"28",
";",
"}",
"}",
"</s>"
] |
9,505 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"io",
".",
"*",
";",
"public",
"class",
"Packet14BlockDig",
"extends",
"Packet",
"{",
"public",
"int",
"xPosition",
";",
"public",
"int",
"yPosition",
";",
"public",
"int",
"zPosition",
";",
"public",
"int",
"face",
";",
"public",
"int",
"status",
";",
"public",
"Packet14BlockDig",
"(",
")",
"{",
"}",
"public",
"void",
"readPacketData",
"(",
"DataInputStream",
"par1DataInputStream",
")",
"throws",
"IOException",
"{",
"status",
"=",
"par1DataInputStream",
".",
"read",
"(",
")",
";",
"xPosition",
"=",
"par1DataInputStream",
".",
"readInt",
"(",
")",
";",
"yPosition",
"=",
"par1DataInputStream",
".",
"read",
"(",
")",
";",
"zPosition",
"=",
"par1DataInputStream",
".",
"readInt",
"(",
")",
";",
"face",
"=",
"par1DataInputStream",
".",
"read",
"(",
")",
";",
"}",
"public",
"void",
"writePacketData",
"(",
"DataOutputStream",
"par1DataOutputStream",
")",
"throws",
"IOException",
"{",
"par1DataOutputStream",
".",
"write",
"(",
"status",
")",
";",
"par1DataOutputStream",
".",
"writeInt",
"(",
"xPosition",
")",
";",
"par1DataOutputStream",
".",
"write",
"(",
"yPosition",
")",
";",
"par1DataOutputStream",
".",
"writeInt",
"(",
"zPosition",
")",
";",
"par1DataOutputStream",
".",
"write",
"(",
"face",
")",
";",
"}",
"public",
"void",
"processPacket",
"(",
"NetHandler",
"par1NetHandler",
")",
"{",
"par1NetHandler",
".",
"handleBlockDig",
"(",
"this",
")",
";",
"}",
"public",
"int",
"getPacketSize",
"(",
")",
"{",
"return",
"11",
";",
"}",
"}",
"</s>"
] |
9,506 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"io",
".",
"*",
";",
"public",
"class",
"Packet6SpawnPosition",
"extends",
"Packet",
"{",
"public",
"int",
"xPosition",
";",
"public",
"int",
"yPosition",
";",
"public",
"int",
"zPosition",
";",
"public",
"Packet6SpawnPosition",
"(",
")",
"{",
"}",
"public",
"Packet6SpawnPosition",
"(",
"int",
"par1",
",",
"int",
"par2",
",",
"int",
"par3",
")",
"{",
"xPosition",
"=",
"par1",
";",
"yPosition",
"=",
"par2",
";",
"zPosition",
"=",
"par3",
";",
"}",
"public",
"void",
"readPacketData",
"(",
"DataInputStream",
"par1DataInputStream",
")",
"throws",
"IOException",
"{",
"xPosition",
"=",
"par1DataInputStream",
".",
"readInt",
"(",
")",
";",
"yPosition",
"=",
"par1DataInputStream",
".",
"readInt",
"(",
")",
";",
"zPosition",
"=",
"par1DataInputStream",
".",
"readInt",
"(",
")",
";",
"}",
"public",
"void",
"writePacketData",
"(",
"DataOutputStream",
"par1DataOutputStream",
")",
"throws",
"IOException",
"{",
"par1DataOutputStream",
".",
"writeInt",
"(",
"xPosition",
")",
";",
"par1DataOutputStream",
".",
"writeInt",
"(",
"yPosition",
")",
";",
"par1DataOutputStream",
".",
"writeInt",
"(",
"zPosition",
")",
";",
"}",
"public",
"void",
"processPacket",
"(",
"NetHandler",
"par1NetHandler",
")",
"{",
"par1NetHandler",
".",
"handleSpawnPosition",
"(",
"this",
")",
";",
"}",
"public",
"int",
"getPacketSize",
"(",
")",
"{",
"return",
"12",
";",
"}",
"}",
"</s>"
] |
9,507 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"io",
".",
"*",
";",
"import",
"java",
".",
"net",
".",
"*",
";",
"import",
"java",
".",
"util",
".",
"*",
";",
"import",
"java",
".",
"util",
".",
"logging",
".",
"Level",
";",
"import",
"java",
".",
"util",
".",
"logging",
".",
"Logger",
";",
"public",
"class",
"PostHttp",
"{",
"private",
"PostHttp",
"(",
")",
"{",
"}",
"public",
"static",
"String",
"func_52008_a",
"(",
"Map",
"par0Map",
")",
"{",
"StringBuilder",
"stringbuilder",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"Iterator",
"iterator",
"=",
"par0Map",
".",
"entrySet",
"(",
")",
".",
"iterator",
"(",
")",
";",
"do",
"{",
"if",
"(",
"!",
"iterator",
".",
"hasNext",
"(",
")",
")",
"{",
"break",
";",
"}",
"java",
".",
"util",
".",
"Map",
".",
"Entry",
"entry",
"=",
"(",
"java",
".",
"util",
".",
"Map",
".",
"Entry",
")",
"iterator",
".",
"next",
"(",
")",
";",
"if",
"(",
"stringbuilder",
".",
"length",
"(",
")",
">",
"0",
")",
"{",
"stringbuilder",
".",
"append",
"(",
"'&'",
")",
";",
"}",
"try",
"{",
"stringbuilder",
".",
"append",
"(",
"URLEncoder",
".",
"encode",
"(",
"(",
"String",
")",
"entry",
".",
"getKey",
"(",
")",
",",
"\"UTF-8\"",
")",
")",
";",
"}",
"catch",
"(",
"UnsupportedEncodingException",
"unsupportedencodingexception",
")",
"{",
"unsupportedencodingexception",
".",
"printStackTrace",
"(",
")",
";",
"}",
"if",
"(",
"entry",
".",
"getValue",
"(",
")",
"!=",
"null",
")",
"{",
"stringbuilder",
".",
"append",
"(",
"'='",
")",
";",
"try",
"{",
"stringbuilder",
".",
"append",
"(",
"URLEncoder",
".",
"encode",
"(",
"entry",
".",
"getValue",
"(",
")",
".",
"toString",
"(",
")",
",",
"\"UTF-8\"",
")",
")",
";",
"}",
"catch",
"(",
"UnsupportedEncodingException",
"unsupportedencodingexception1",
")",
"{",
"unsupportedencodingexception1",
".",
"printStackTrace",
"(",
")",
";",
"}",
"}",
"}",
"while",
"(",
"true",
")",
";",
"return",
"stringbuilder",
".",
"toString",
"(",
")",
";",
"}",
"public",
"static",
"String",
"func_52010_a",
"(",
"URL",
"par0URL",
",",
"Map",
"par1Map",
",",
"boolean",
"par2",
")",
"{",
"return",
"func_52009_a",
"(",
"par0URL",
",",
"func_52008_a",
"(",
"par1Map",
")",
",",
"par2",
")",
";",
"}",
"public",
"static",
"String",
"func_52009_a",
"(",
"URL",
"par0URL",
",",
"String",
"par1Str",
",",
"boolean",
"par2",
")",
"{",
"try",
"{",
"String",
"s",
"=",
"par1Str",
";",
"HttpURLConnection",
"httpurlconnection",
"=",
"(",
"HttpURLConnection",
")",
"par0URL",
".",
"openConnection",
"(",
")",
";",
"httpurlconnection",
".",
"setRequestMethod",
"(",
"\"POST\"",
")",
";",
"httpurlconnection",
".",
"setRequestProperty",
"(",
"\"Content-Type\"",
",",
"\"\"",
")",
";",
"httpurlconnection",
".",
"setRequestProperty",
"(",
"\"\"",
",",
"(",
"new",
"StringBuilder",
"(",
")",
")",
".",
"append",
"(",
"\"\"",
")",
".",
"append",
"(",
"s",
".",
"getBytes",
"(",
")",
".",
"length",
")",
".",
"toString",
"(",
")",
")",
";",
"httpurlconnection",
".",
"setRequestProperty",
"(",
"\"\"",
",",
"\"en-US\"",
")",
";",
"httpurlconnection",
".",
"setUseCaches",
"(",
"false",
")",
";",
"httpurlconnection",
".",
"setDoInput",
"(",
"true",
")",
";",
"httpurlconnection",
".",
"setDoOutput",
"(",
"true",
")",
";",
"DataOutputStream",
"dataoutputstream",
"=",
"new",
"DataOutputStream",
"(",
"httpurlconnection",
".",
"getOutputStream",
"(",
")",
")",
";",
"dataoutputstream",
".",
"writeBytes",
"(",
"s",
")",
";",
"dataoutputstream",
".",
"flush",
"(",
")",
";",
"dataoutputstream",
".",
"close",
"(",
")",
";",
"BufferedReader",
"bufferedreader",
"=",
"new",
"BufferedReader",
"(",
"new",
"InputStreamReader",
"(",
"httpurlconnection",
".",
"getInputStream",
"(",
")",
")",
")",
";",
"StringBuffer",
"stringbuffer",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"String",
"s1",
";",
"while",
"(",
"(",
"s1",
"=",
"bufferedreader",
".",
"readLine",
"(",
")",
")",
"!=",
"null",
")",
"{",
"stringbuffer",
".",
"append",
"(",
"s1",
")",
";",
"stringbuffer",
".",
"append",
"(",
"'\\r'",
")",
";",
"}",
"bufferedreader",
".",
"close",
"(",
")",
";",
"return",
"stringbuffer",
".",
"toString",
"(",
")",
";",
"}",
"catch",
"(",
"Exception",
"exception",
")",
"{",
"if",
"(",
"!",
"par2",
")",
"{",
"Logger",
".",
"getLogger",
"(",
"\"Minecraft\"",
")",
".",
"log",
"(",
"Level",
".",
"SEVERE",
",",
"(",
"new",
"StringBuilder",
"(",
")",
")",
".",
"append",
"(",
"\"\"",
")",
".",
"append",
"(",
"par0URL",
")",
".",
"toString",
"(",
")",
",",
"exception",
")",
";",
"}",
"}",
"return",
"\"\"",
";",
"}",
"}",
"</s>"
] |
9,508 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"final",
"class",
"StatTypeSimple",
"implements",
"IStatType",
"{",
"StatTypeSimple",
"(",
")",
"{",
"}",
"}",
"</s>"
] |
9,509 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"BlockClay",
"extends",
"Block",
"{",
"public",
"BlockClay",
"(",
"int",
"par1",
",",
"int",
"par2",
")",
"{",
"super",
"(",
"par1",
",",
"par2",
",",
"Material",
".",
"clay",
")",
";",
"}",
"public",
"int",
"idDropped",
"(",
"int",
"par1",
",",
"Random",
"par2Random",
",",
"int",
"par3",
")",
"{",
"return",
"Item",
".",
"clay",
".",
"shiftedIndex",
";",
"}",
"public",
"int",
"quantityDropped",
"(",
"Random",
"par1Random",
")",
"{",
"return",
"4",
";",
"}",
"}",
"</s>"
] |
9,510 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"EntityAIVillagerMate",
"extends",
"EntityAIBase",
"{",
"private",
"EntityVillager",
"villagerObj",
";",
"private",
"EntityVillager",
"mate",
";",
"private",
"World",
"worldObj",
";",
"private",
"int",
"matingTimeout",
";",
"Village",
"villageObj",
";",
"public",
"EntityAIVillagerMate",
"(",
"EntityVillager",
"par1EntityVillager",
")",
"{",
"matingTimeout",
"=",
"0",
";",
"villagerObj",
"=",
"par1EntityVillager",
";",
"worldObj",
"=",
"par1EntityVillager",
".",
"worldObj",
";",
"setMutexBits",
"(",
"3",
")",
";",
"}",
"public",
"boolean",
"shouldExecute",
"(",
")",
"{",
"if",
"(",
"villagerObj",
".",
"getGrowingAge",
"(",
")",
"!=",
"0",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"villagerObj",
".",
"getRNG",
"(",
")",
".",
"nextInt",
"(",
"500",
")",
"!=",
"0",
")",
"{",
"return",
"false",
";",
"}",
"villageObj",
"=",
"worldObj",
".",
"villageCollectionObj",
".",
"findNearestVillage",
"(",
"MathHelper",
".",
"floor_double",
"(",
"villagerObj",
".",
"posX",
")",
",",
"MathHelper",
".",
"floor_double",
"(",
"villagerObj",
".",
"posY",
")",
",",
"MathHelper",
".",
"floor_double",
"(",
"villagerObj",
".",
"posZ",
")",
",",
"0",
")",
";",
"if",
"(",
"villageObj",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"!",
"checkSufficientDoorsPresentForNewVillager",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",
"Entity",
"entity",
"=",
"worldObj",
".",
"findNearestEntityWithinAABB",
"(",
"net",
".",
"minecraft",
".",
"src",
".",
"EntityVillager",
".",
"class",
",",
"villagerObj",
".",
"boundingBox",
".",
"expand",
"(",
"8D",
",",
"3D",
",",
"8D",
")",
",",
"villagerObj",
")",
";",
"if",
"(",
"entity",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"mate",
"=",
"(",
"EntityVillager",
")",
"entity",
";",
"return",
"mate",
".",
"getGrowingAge",
"(",
")",
"==",
"0",
";",
"}",
"public",
"void",
"startExecuting",
"(",
")",
"{",
"matingTimeout",
"=",
"300",
";",
"villagerObj",
".",
"setIsMatingFlag",
"(",
"true",
")",
";",
"}",
"public",
"void",
"resetTask",
"(",
")",
"{",
"villageObj",
"=",
"null",
";",
"mate",
"=",
"null",
";",
"villagerObj",
".",
"setIsMatingFlag",
"(",
"false",
")",
";",
"}",
"public",
"boolean",
"continueExecuting",
"(",
")",
"{",
"return",
"matingTimeout",
">=",
"0",
"&&",
"checkSufficientDoorsPresentForNewVillager",
"(",
")",
"&&",
"villagerObj",
".",
"getGrowingAge",
"(",
")",
"==",
"0",
";",
"}",
"public",
"void",
"updateTask",
"(",
")",
"{",
"matingTimeout",
"--",
";",
"villagerObj",
".",
"getLookHelper",
"(",
")",
".",
"setLookPositionWithEntity",
"(",
"mate",
",",
"10F",
",",
"30F",
")",
";",
"if",
"(",
"villagerObj",
".",
"getDistanceSqToEntity",
"(",
"mate",
")",
">",
"2.25D",
")",
"{",
"villagerObj",
".",
"getNavigator",
"(",
")",
".",
"func_48652_a",
"(",
"mate",
",",
"0.25F",
")",
";",
"}",
"else",
"if",
"(",
"matingTimeout",
"==",
"0",
"&&",
"mate",
".",
"getIsMatingFlag",
"(",
")",
")",
"{",
"giveBirth",
"(",
")",
";",
"}",
"if",
"(",
"villagerObj",
".",
"getRNG",
"(",
")",
".",
"nextInt",
"(",
"35",
")",
"==",
"0",
")",
"{",
"spawnHeartParticles",
"(",
"villagerObj",
")",
";",
"}",
"}",
"private",
"boolean",
"checkSufficientDoorsPresentForNewVillager",
"(",
")",
"{",
"int",
"i",
"=",
"(",
"int",
")",
"(",
"(",
"double",
")",
"(",
"float",
")",
"villageObj",
".",
"getNumVillageDoors",
"(",
")",
"*",
"0.34999999999999998D",
")",
";",
"return",
"villageObj",
".",
"getNumVillagers",
"(",
")",
"<",
"i",
";",
"}",
"private",
"void",
"giveBirth",
"(",
")",
"{",
"EntityVillager",
"entityvillager",
"=",
"new",
"EntityVillager",
"(",
"worldObj",
")",
";",
"mate",
".",
"setGrowingAge",
"(",
"6000",
")",
";",
"villagerObj",
".",
"setGrowingAge",
"(",
"6000",
")",
";",
"entityvillager",
".",
"setGrowingAge",
"(",
"-",
"24000",
")",
";",
"entityvillager",
".",
"setProfession",
"(",
"villagerObj",
".",
"getRNG",
"(",
")",
".",
"nextInt",
"(",
"5",
")",
")",
";",
"entityvillager",
".",
"setLocationAndAngles",
"(",
"villagerObj",
".",
"posX",
",",
"villagerObj",
".",
"posY",
",",
"villagerObj",
".",
"posZ",
",",
"0.0F",
",",
"0.0F",
")",
";",
"worldObj",
".",
"spawnEntityInWorld",
"(",
"entityvillager",
")",
";",
"spawnHeartParticles",
"(",
"entityvillager",
")",
";",
"}",
"private",
"void",
"spawnHeartParticles",
"(",
"EntityLiving",
"par1EntityLiving",
")",
"{",
"Random",
"random",
"=",
"par1EntityLiving",
".",
"getRNG",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"5",
";",
"i",
"++",
")",
"{",
"double",
"d",
"=",
"random",
".",
"nextGaussian",
"(",
")",
"*",
"0.02D",
";",
"double",
"d1",
"=",
"random",
".",
"nextGaussian",
"(",
")",
"*",
"0.02D",
";",
"double",
"d2",
"=",
"random",
".",
"nextGaussian",
"(",
")",
"*",
"0.02D",
";",
"worldObj",
".",
"spawnParticle",
"(",
"\"heart\"",
",",
"(",
"par1EntityLiving",
".",
"posX",
"+",
"(",
"double",
")",
"(",
"random",
".",
"nextFloat",
"(",
")",
"*",
"par1EntityLiving",
".",
"width",
"*",
"2.0F",
")",
")",
"-",
"(",
"double",
")",
"par1EntityLiving",
".",
"width",
",",
"par1EntityLiving",
".",
"posY",
"+",
"1.0D",
"+",
"(",
"double",
")",
"(",
"random",
".",
"nextFloat",
"(",
")",
"*",
"par1EntityLiving",
".",
"height",
")",
",",
"(",
"par1EntityLiving",
".",
"posZ",
"+",
"(",
"double",
")",
"(",
"random",
".",
"nextFloat",
"(",
")",
"*",
"par1EntityLiving",
".",
"width",
"*",
"2.0F",
")",
")",
"-",
"(",
"double",
")",
"par1EntityLiving",
".",
"width",
",",
"d",
",",
"d1",
",",
"d2",
")",
";",
"}",
"}",
"}",
"</s>"
] |
9,511 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"*",
";",
"public",
"class",
"StructureVillagePieces",
"{",
"public",
"StructureVillagePieces",
"(",
")",
"{",
"}",
"public",
"static",
"ArrayList",
"getStructureVillageWeightedPieceList",
"(",
"Random",
"par0Random",
",",
"int",
"par1",
")",
"{",
"ArrayList",
"arraylist",
"=",
"new",
"ArrayList",
"(",
")",
";",
"arraylist",
".",
"add",
"(",
"new",
"StructureVillagePieceWeight",
"(",
"net",
".",
"minecraft",
".",
"src",
".",
"ComponentVillageHouse4_Garden",
".",
"class",
",",
"4",
",",
"MathHelper",
".",
"getRandomIntegerInRange",
"(",
"par0Random",
",",
"2",
"+",
"par1",
",",
"4",
"+",
"par1",
"*",
"2",
")",
")",
")",
";",
"arraylist",
".",
"add",
"(",
"new",
"StructureVillagePieceWeight",
"(",
"net",
".",
"minecraft",
".",
"src",
".",
"ComponentVillageChurch",
".",
"class",
",",
"20",
",",
"MathHelper",
".",
"getRandomIntegerInRange",
"(",
"par0Random",
",",
"0",
"+",
"par1",
",",
"1",
"+",
"par1",
")",
")",
")",
";",
"arraylist",
".",
"add",
"(",
"new",
"StructureVillagePieceWeight",
"(",
"net",
".",
"minecraft",
".",
"src",
".",
"ComponentVillageHouse1",
".",
"class",
",",
"20",
",",
"MathHelper",
".",
"getRandomIntegerInRange",
"(",
"par0Random",
",",
"0",
"+",
"par1",
",",
"2",
"+",
"par1",
")",
")",
")",
";",
"arraylist",
".",
"add",
"(",
"new",
"StructureVillagePieceWeight",
"(",
"net",
".",
"minecraft",
".",
"src",
".",
"ComponentVillageWoodHut",
".",
"class",
",",
"3",
",",
"MathHelper",
".",
"getRandomIntegerInRange",
"(",
"par0Random",
",",
"2",
"+",
"par1",
",",
"5",
"+",
"par1",
"*",
"3",
")",
")",
")",
";",
"arraylist",
".",
"add",
"(",
"new",
"StructureVillagePieceWeight",
"(",
"net",
".",
"minecraft",
".",
"src",
".",
"ComponentVillageHall",
".",
"class",
",",
"15",
",",
"MathHelper",
".",
"getRandomIntegerInRange",
"(",
"par0Random",
",",
"0",
"+",
"par1",
",",
"2",
"+",
"par1",
")",
")",
")",
";",
"arraylist",
".",
"add",
"(",
"new",
"StructureVillagePieceWeight",
"(",
"net",
".",
"minecraft",
".",
"src",
".",
"ComponentVillageField",
".",
"class",
",",
"3",
",",
"MathHelper",
".",
"getRandomIntegerInRange",
"(",
"par0Random",
",",
"1",
"+",
"par1",
",",
"4",
"+",
"par1",
")",
")",
")",
";",
"arraylist",
".",
"add",
"(",
"new",
"StructureVillagePieceWeight",
"(",
"net",
".",
"minecraft",
".",
"src",
".",
"ComponentVillageField2",
".",
"class",
",",
"3",
",",
"MathHelper",
".",
"getRandomIntegerInRange",
"(",
"par0Random",
",",
"2",
"+",
"par1",
",",
"4",
"+",
"par1",
"*",
"2",
")",
")",
")",
";",
"arraylist",
".",
"add",
"(",
"new",
"StructureVillagePieceWeight",
"(",
"net",
".",
"minecraft",
".",
"src",
".",
"ComponentVillageHouse2",
".",
"class",
",",
"15",
",",
"MathHelper",
".",
"getRandomIntegerInRange",
"(",
"par0Random",
",",
"0",
",",
"1",
"+",
"par1",
")",
")",
")",
";",
"arraylist",
".",
"add",
"(",
"new",
"StructureVillagePieceWeight",
"(",
"net",
".",
"minecraft",
".",
"src",
".",
"ComponentVillageHouse3",
".",
"class",
",",
"8",
",",
"MathHelper",
".",
"getRandomIntegerInRange",
"(",
"par0Random",
",",
"0",
"+",
"par1",
",",
"3",
"+",
"par1",
"*",
"2",
")",
")",
")",
";",
"Iterator",
"iterator",
"=",
"arraylist",
".",
"iterator",
"(",
")",
";",
"do",
"{",
"if",
"(",
"!",
"iterator",
".",
"hasNext",
"(",
")",
")",
"{",
"break",
";",
"}",
"if",
"(",
"(",
"(",
"StructureVillagePieceWeight",
")",
"iterator",
".",
"next",
"(",
")",
")",
".",
"villagePiecesLimit",
"==",
"0",
")",
"{",
"iterator",
".",
"remove",
"(",
")",
";",
"}",
"}",
"while",
"(",
"true",
")",
";",
"return",
"arraylist",
";",
"}",
"private",
"static",
"int",
"getAvailablePieceWeight",
"(",
"ArrayList",
"par0ArrayList",
")",
"{",
"boolean",
"flag",
"=",
"false",
";",
"int",
"i",
"=",
"0",
";",
"for",
"(",
"Iterator",
"iterator",
"=",
"par0ArrayList",
".",
"iterator",
"(",
")",
";",
"iterator",
".",
"hasNext",
"(",
")",
";",
")",
"{",
"StructureVillagePieceWeight",
"structurevillagepieceweight",
"=",
"(",
"StructureVillagePieceWeight",
")",
"iterator",
".",
"next",
"(",
")",
";",
"if",
"(",
"structurevillagepieceweight",
".",
"villagePiecesLimit",
">",
"0",
"&&",
"structurevillagepieceweight",
".",
"villagePiecesSpawned",
"<",
"structurevillagepieceweight",
".",
"villagePiecesLimit",
")",
"{",
"flag",
"=",
"true",
";",
"}",
"i",
"+=",
"structurevillagepieceweight",
".",
"villagePieceWeight",
";",
"}",
"return",
"flag",
"?",
"i",
":",
"-",
"1",
";",
"}",
"private",
"static",
"ComponentVillage",
"getVillageComponentFromWeightedPiece",
"(",
"StructureVillagePieceWeight",
"par0StructureVillagePieceWeight",
",",
"List",
"par1List",
",",
"Random",
"par2Random",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
",",
"int",
"par6",
",",
"int",
"par7",
")",
"{",
"Class",
"class1",
"=",
"par0StructureVillagePieceWeight",
".",
"villagePieceClass",
";",
"Object",
"obj",
"=",
"null",
";",
"if",
"(",
"class1",
"==",
"(",
"net",
".",
"minecraft",
".",
"src",
".",
"ComponentVillageHouse4_Garden",
".",
"class",
")",
")",
"{",
"obj",
"=",
"ComponentVillageHouse4_Garden",
".",
"findValidPlacement",
"(",
"par1List",
",",
"par2Random",
",",
"par3",
",",
"par4",
",",
"par5",
",",
"par6",
",",
"par7",
")",
";",
"}",
"else",
"if",
"(",
"class1",
"==",
"(",
"net",
".",
"minecraft",
".",
"src",
".",
"ComponentVillageChurch",
".",
"class",
")",
")",
"{",
"obj",
"=",
"ComponentVillageChurch",
".",
"findValidPlacement",
"(",
"par1List",
",",
"par2Random",
",",
"par3",
",",
"par4",
",",
"par5",
",",
"par6",
",",
"par7",
")",
";",
"}",
"else",
"if",
"(",
"class1",
"==",
"(",
"net",
".",
"minecraft",
".",
"src",
".",
"ComponentVillageHouse1",
".",
"class",
")",
")",
"{",
"obj",
"=",
"ComponentVillageHouse1",
".",
"findValidPlacement",
"(",
"par1List",
",",
"par2Random",
",",
"par3",
",",
"par4",
",",
"par5",
",",
"par6",
",",
"par7",
")",
";",
"}",
"else",
"if",
"(",
"class1",
"==",
"(",
"net",
".",
"minecraft",
".",
"src",
".",
"ComponentVillageWoodHut",
".",
"class",
")",
")",
"{",
"obj",
"=",
"ComponentVillageWoodHut",
".",
"findValidPlacement",
"(",
"par1List",
",",
"par2Random",
",",
"par3",
",",
"par4",
",",
"par5",
",",
"par6",
",",
"par7",
")",
";",
"}",
"else",
"if",
"(",
"class1",
"==",
"(",
"net",
".",
"minecraft",
".",
"src",
".",
"ComponentVillageHall",
".",
"class",
")",
")",
"{",
"obj",
"=",
"ComponentVillageHall",
".",
"findValidPlacement",
"(",
"par1List",
",",
"par2Random",
",",
"par3",
",",
"par4",
",",
"par5",
",",
"par6",
",",
"par7",
")",
";",
"}",
"else",
"if",
"(",
"class1",
"==",
"(",
"net",
".",
"minecraft",
".",
"src",
".",
"ComponentVillageField",
".",
"class",
")",
")",
"{",
"obj",
"=",
"ComponentVillageField",
".",
"findValidPlacement",
"(",
"par1List",
",",
"par2Random",
",",
"par3",
",",
"par4",
",",
"par5",
",",
"par6",
",",
"par7",
")",
";",
"}",
"else",
"if",
"(",
"class1",
"==",
"(",
"net",
".",
"minecraft",
".",
"src",
".",
"ComponentVillageField2",
".",
"class",
")",
")",
"{",
"obj",
"=",
"ComponentVillageField2",
".",
"findValidPlacement",
"(",
"par1List",
",",
"par2Random",
",",
"par3",
",",
"par4",
",",
"par5",
",",
"par6",
",",
"par7",
")",
";",
"}",
"else",
"if",
"(",
"class1",
"==",
"(",
"net",
".",
"minecraft",
".",
"src",
".",
"ComponentVillageHouse2",
".",
"class",
")",
")",
"{",
"obj",
"=",
"ComponentVillageHouse2",
".",
"findValidPlacement",
"(",
"par1List",
",",
"par2Random",
",",
"par3",
",",
"par4",
",",
"par5",
",",
"par6",
",",
"par7",
")",
";",
"}",
"else",
"if",
"(",
"class1",
"==",
"(",
"net",
".",
"minecraft",
".",
"src",
".",
"ComponentVillageHouse3",
".",
"class",
")",
")",
"{",
"obj",
"=",
"ComponentVillageHouse3",
".",
"findValidPlacement",
"(",
"par1List",
",",
"par2Random",
",",
"par3",
",",
"par4",
",",
"par5",
",",
"par6",
",",
"par7",
")",
";",
"}",
"return",
"(",
"(",
"ComponentVillage",
")",
"(",
"obj",
")",
")",
";",
"}",
"private",
"static",
"ComponentVillage",
"getNextVillageComponent",
"(",
"ComponentVillageStartPiece",
"par0ComponentVillageStartPiece",
",",
"List",
"par1List",
",",
"Random",
"par2Random",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
",",
"int",
"par6",
",",
"int",
"par7",
")",
"{",
"int",
"var8",
"=",
"getAvailablePieceWeight",
"(",
"par0ComponentVillageStartPiece",
".",
"structureVillageWeightedPieceList",
")",
";",
"if",
"(",
"var8",
"<=",
"0",
")",
"{",
"return",
"null",
";",
"}",
"else",
"{",
"int",
"var9",
"=",
"0",
";",
"while",
"(",
"var9",
"<",
"5",
")",
"{",
"++",
"var9",
";",
"int",
"var10",
"=",
"par2Random",
".",
"nextInt",
"(",
"var8",
")",
";",
"Iterator",
"var11",
"=",
"par0ComponentVillageStartPiece",
".",
"structureVillageWeightedPieceList",
".",
"iterator",
"(",
")",
";",
"while",
"(",
"var11",
".",
"hasNext",
"(",
")",
")",
"{",
"StructureVillagePieceWeight",
"var12",
"=",
"(",
"StructureVillagePieceWeight",
")",
"var11",
".",
"next",
"(",
")",
";",
"var10",
"-=",
"var12",
".",
"villagePieceWeight",
";",
"if",
"(",
"var10",
"<",
"0",
")",
"{",
"if",
"(",
"!",
"var12",
".",
"canSpawnMoreVillagePiecesOfType",
"(",
"par7",
")",
"||",
"var12",
"==",
"par0ComponentVillageStartPiece",
".",
"structVillagePieceWeight",
"&&",
"par0ComponentVillageStartPiece",
".",
"structureVillageWeightedPieceList",
".",
"size",
"(",
")",
">",
"1",
")",
"{",
"break",
";",
"}",
"ComponentVillage",
"var13",
"=",
"getVillageComponentFromWeightedPiece",
"(",
"var12",
",",
"par1List",
",",
"par2Random",
",",
"par3",
",",
"par4",
",",
"par5",
",",
"par6",
",",
"par7",
")",
";",
"if",
"(",
"var13",
"!=",
"null",
")",
"{",
"++",
"var12",
".",
"villagePiecesSpawned",
";",
"par0ComponentVillageStartPiece",
".",
"structVillagePieceWeight",
"=",
"var12",
";",
"if",
"(",
"!",
"var12",
".",
"canSpawnMoreVillagePieces",
"(",
")",
")",
"{",
"par0ComponentVillageStartPiece",
".",
"structureVillageWeightedPieceList",
".",
"remove",
"(",
"var12",
")",
";",
"}",
"return",
"var13",
";",
"}",
"}",
"}",
"}",
"StructureBoundingBox",
"var14",
"=",
"ComponentVillageTorch",
".",
"findValidPlacement",
"(",
"par1List",
",",
"par2Random",
",",
"par3",
",",
"par4",
",",
"par5",
",",
"par6",
")",
";",
"if",
"(",
"var14",
"!=",
"null",
")",
"{",
"return",
"new",
"ComponentVillageTorch",
"(",
"par7",
",",
"par2Random",
",",
"var14",
",",
"par6",
")",
";",
"}",
"else",
"{",
"return",
"null",
";",
"}",
"}",
"}",
"private",
"static",
"StructureComponent",
"getNextVillageStructureComponent",
"(",
"ComponentVillageStartPiece",
"par0ComponentVillageStartPiece",
",",
"List",
"par1List",
",",
"Random",
"par2Random",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
",",
"int",
"par6",
",",
"int",
"par7",
")",
"{",
"if",
"(",
"par7",
">",
"50",
")",
"{",
"return",
"null",
";",
"}",
"if",
"(",
"Math",
".",
"abs",
"(",
"par3",
"-",
"par0ComponentVillageStartPiece",
".",
"getBoundingBox",
"(",
")",
".",
"minX",
")",
">",
"112",
"||",
"Math",
".",
"abs",
"(",
"par5",
"-",
"par0ComponentVillageStartPiece",
".",
"getBoundingBox",
"(",
")",
".",
"minZ",
")",
">",
"112",
")",
"{",
"return",
"null",
";",
"}",
"ComponentVillage",
"componentvillage",
"=",
"getNextVillageComponent",
"(",
"par0ComponentVillageStartPiece",
",",
"par1List",
",",
"par2Random",
",",
"par3",
",",
"par4",
",",
"par5",
",",
"par6",
",",
"par7",
"+",
"1",
")",
";",
"if",
"(",
"componentvillage",
"!=",
"null",
")",
"{",
"int",
"i",
"=",
"(",
"(",
"(",
"StructureComponent",
")",
"(",
"componentvillage",
")",
")",
".",
"boundingBox",
".",
"minX",
"+",
"(",
"(",
"StructureComponent",
")",
"(",
"componentvillage",
")",
")",
".",
"boundingBox",
".",
"maxX",
")",
"/",
"2",
";",
"int",
"j",
"=",
"(",
"(",
"(",
"StructureComponent",
")",
"(",
"componentvillage",
")",
")",
".",
"boundingBox",
".",
"minZ",
"+",
"(",
"(",
"StructureComponent",
")",
"(",
"componentvillage",
")",
")",
".",
"boundingBox",
".",
"maxZ",
")",
"/",
"2",
";",
"int",
"k",
"=",
"(",
"(",
"StructureComponent",
")",
"(",
"componentvillage",
")",
")",
".",
"boundingBox",
".",
"maxX",
"-",
"(",
"(",
"StructureComponent",
")",
"(",
"componentvillage",
")",
")",
".",
"boundingBox",
".",
"minX",
";",
"int",
"l",
"=",
"(",
"(",
"StructureComponent",
")",
"(",
"componentvillage",
")",
")",
".",
"boundingBox",
".",
"maxZ",
"-",
"(",
"(",
"StructureComponent",
")",
"(",
"componentvillage",
")",
")",
".",
"boundingBox",
".",
"minZ",
";",
"int",
"i1",
"=",
"k",
"<=",
"l",
"?",
"l",
":",
"k",
";",
"if",
"(",
"par0ComponentVillageStartPiece",
".",
"getWorldChunkManager",
"(",
")",
".",
"areBiomesViable",
"(",
"i",
",",
"j",
",",
"i1",
"/",
"2",
"+",
"4",
",",
"MapGenVillage",
".",
"villageSpawnBiomes",
")",
")",
"{",
"par1List",
".",
"add",
"(",
"componentvillage",
")",
";",
"par0ComponentVillageStartPiece",
".",
"field_35389_e",
".",
"add",
"(",
"componentvillage",
")",
";",
"return",
"componentvillage",
";",
"}",
"}",
"return",
"null",
";",
"}",
"private",
"static",
"StructureComponent",
"getNextComponentVillagePath",
"(",
"ComponentVillageStartPiece",
"par0ComponentVillageStartPiece",
",",
"List",
"par1List",
",",
"Random",
"par2Random",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
",",
"int",
"par6",
",",
"int",
"par7",
")",
"{",
"if",
"(",
"par7",
">",
"3",
"+",
"par0ComponentVillageStartPiece",
".",
"terrainType",
")",
"{",
"return",
"null",
";",
"}",
"if",
"(",
"Math",
".",
"abs",
"(",
"par3",
"-",
"par0ComponentVillageStartPiece",
".",
"getBoundingBox",
"(",
")",
".",
"minX",
")",
">",
"112",
"||",
"Math",
".",
"abs",
"(",
"par5",
"-",
"par0ComponentVillageStartPiece",
".",
"getBoundingBox",
"(",
")",
".",
"minZ",
")",
">",
"112",
")",
"{",
"return",
"null",
";",
"}",
"StructureBoundingBox",
"structureboundingbox",
"=",
"ComponentVillagePathGen",
".",
"func_35378_a",
"(",
"par0ComponentVillageStartPiece",
",",
"par1List",
",",
"par2Random",
",",
"par3",
",",
"par4",
",",
"par5",
",",
"par6",
")",
";",
"if",
"(",
"structureboundingbox",
"!=",
"null",
"&&",
"structureboundingbox",
".",
"minY",
">",
"10",
")",
"{",
"ComponentVillagePathGen",
"componentvillagepathgen",
"=",
"new",
"ComponentVillagePathGen",
"(",
"par7",
",",
"par2Random",
",",
"structureboundingbox",
",",
"par6",
")",
";",
"int",
"i",
"=",
"(",
"(",
"(",
"StructureComponent",
")",
"(",
"componentvillagepathgen",
")",
")",
".",
"boundingBox",
".",
"minX",
"+",
"(",
"(",
"StructureComponent",
")",
"(",
"componentvillagepathgen",
")",
")",
".",
"boundingBox",
".",
"maxX",
")",
"/",
"2",
";",
"int",
"j",
"=",
"(",
"(",
"(",
"StructureComponent",
")",
"(",
"componentvillagepathgen",
")",
")",
".",
"boundingBox",
".",
"minZ",
"+",
"(",
"(",
"StructureComponent",
")",
"(",
"componentvillagepathgen",
")",
")",
".",
"boundingBox",
".",
"maxZ",
")",
"/",
"2",
";",
"int",
"k",
"=",
"(",
"(",
"StructureComponent",
")",
"(",
"componentvillagepathgen",
")",
")",
".",
"boundingBox",
".",
"maxX",
"-",
"(",
"(",
"StructureComponent",
")",
"(",
"componentvillagepathgen",
")",
")",
".",
"boundingBox",
".",
"minX",
";",
"int",
"l",
"=",
"(",
"(",
"StructureComponent",
")",
"(",
"componentvillagepathgen",
")",
")",
".",
"boundingBox",
".",
"maxZ",
"-",
"(",
"(",
"StructureComponent",
")",
"(",
"componentvillagepathgen",
")",
")",
".",
"boundingBox",
".",
"minZ",
";",
"int",
"i1",
"=",
"k",
"<=",
"l",
"?",
"l",
":",
"k",
";",
"if",
"(",
"par0ComponentVillageStartPiece",
".",
"getWorldChunkManager",
"(",
")",
".",
"areBiomesViable",
"(",
"i",
",",
"j",
",",
"i1",
"/",
"2",
"+",
"4",
",",
"MapGenVillage",
".",
"villageSpawnBiomes",
")",
")",
"{",
"par1List",
".",
"add",
"(",
"componentvillagepathgen",
")",
";",
"par0ComponentVillageStartPiece",
".",
"field_35387_f",
".",
"add",
"(",
"componentvillagepathgen",
")",
";",
"return",
"componentvillagepathgen",
";",
"}",
"}",
"return",
"null",
";",
"}",
"static",
"StructureComponent",
"getNextStructureComponent",
"(",
"ComponentVillageStartPiece",
"par0ComponentVillageStartPiece",
",",
"List",
"par1List",
",",
"Random",
"par2Random",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
",",
"int",
"par6",
",",
"int",
"par7",
")",
"{",
"return",
"getNextVillageStructureComponent",
"(",
"par0ComponentVillageStartPiece",
",",
"par1List",
",",
"par2Random",
",",
"par3",
",",
"par4",
",",
"par5",
",",
"par6",
",",
"par7",
")",
";",
"}",
"static",
"StructureComponent",
"getNextStructureComponentVillagePath",
"(",
"ComponentVillageStartPiece",
"par0ComponentVillageStartPiece",
",",
"List",
"par1List",
",",
"Random",
"par2Random",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
",",
"int",
"par6",
",",
"int",
"par7",
")",
"{",
"return",
"getNextComponentVillagePath",
"(",
"par0ComponentVillageStartPiece",
",",
"par1List",
",",
"par2Random",
",",
"par3",
",",
"par4",
",",
"par5",
",",
"par6",
",",
"par7",
")",
";",
"}",
"}",
"</s>"
] |
9,512 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"io",
".",
"*",
";",
"public",
"class",
"Packet10Flying",
"extends",
"Packet",
"{",
"public",
"double",
"xPosition",
";",
"public",
"double",
"yPosition",
";",
"public",
"double",
"zPosition",
";",
"public",
"double",
"stance",
";",
"public",
"float",
"yaw",
";",
"public",
"float",
"pitch",
";",
"public",
"boolean",
"onGround",
";",
"public",
"boolean",
"moving",
";",
"public",
"boolean",
"rotating",
";",
"public",
"Packet10Flying",
"(",
")",
"{",
"}",
"public",
"void",
"processPacket",
"(",
"NetHandler",
"par1NetHandler",
")",
"{",
"par1NetHandler",
".",
"handleFlying",
"(",
"this",
")",
";",
"}",
"public",
"void",
"readPacketData",
"(",
"DataInputStream",
"par1DataInputStream",
")",
"throws",
"IOException",
"{",
"onGround",
"=",
"par1DataInputStream",
".",
"read",
"(",
")",
"!=",
"0",
";",
"}",
"public",
"void",
"writePacketData",
"(",
"DataOutputStream",
"par1DataOutputStream",
")",
"throws",
"IOException",
"{",
"par1DataOutputStream",
".",
"write",
"(",
"onGround",
"?",
"1",
":",
"0",
")",
";",
"}",
"public",
"int",
"getPacketSize",
"(",
")",
"{",
"return",
"1",
";",
"}",
"}",
"</s>"
] |
9,513 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"Iterator",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"public",
"class",
"EntityPotion",
"extends",
"EntityThrowable",
"{",
"private",
"int",
"potionDamage",
";",
"public",
"EntityPotion",
"(",
"World",
"par1World",
")",
"{",
"super",
"(",
"par1World",
")",
";",
"}",
"public",
"EntityPotion",
"(",
"World",
"par1World",
",",
"EntityLiving",
"par2EntityLiving",
",",
"int",
"par3",
")",
"{",
"super",
"(",
"par1World",
",",
"par2EntityLiving",
")",
";",
"potionDamage",
"=",
"par3",
";",
"}",
"public",
"EntityPotion",
"(",
"World",
"par1World",
",",
"double",
"par2",
",",
"double",
"par4",
",",
"double",
"par6",
",",
"int",
"par8",
")",
"{",
"super",
"(",
"par1World",
",",
"par2",
",",
"par4",
",",
"par6",
")",
";",
"potionDamage",
"=",
"par8",
";",
"}",
"protected",
"float",
"func_40042_e",
"(",
")",
"{",
"return",
"0.05F",
";",
"}",
"protected",
"float",
"func_40044_c",
"(",
")",
"{",
"return",
"0.5F",
";",
"}",
"protected",
"float",
"func_40040_d",
"(",
")",
"{",
"return",
"-",
"20F",
";",
"}",
"public",
"int",
"getPotionDamage",
"(",
")",
"{",
"return",
"potionDamage",
";",
"}",
"protected",
"void",
"onImpact",
"(",
"MovingObjectPosition",
"par1MovingObjectPosition",
")",
"{",
"if",
"(",
"!",
"worldObj",
".",
"isRemote",
")",
"{",
"List",
"list",
"=",
"Item",
".",
"potion",
".",
"getEffects",
"(",
"potionDamage",
")",
";",
"if",
"(",
"list",
"!=",
"null",
"&&",
"!",
"list",
".",
"isEmpty",
"(",
")",
")",
"{",
"AxisAlignedBB",
"axisalignedbb",
"=",
"boundingBox",
".",
"expand",
"(",
"4D",
",",
"2D",
",",
"4D",
")",
";",
"List",
"list1",
"=",
"worldObj",
".",
"getEntitiesWithinAABB",
"(",
"net",
".",
"minecraft",
".",
"src",
".",
"EntityLiving",
".",
"class",
",",
"axisalignedbb",
")",
";",
"if",
"(",
"list1",
"!=",
"null",
"&&",
"!",
"list1",
".",
"isEmpty",
"(",
")",
")",
"{",
"for",
"(",
"Iterator",
"iterator",
"=",
"list1",
".",
"iterator",
"(",
")",
";",
"iterator",
".",
"hasNext",
"(",
")",
";",
")",
"{",
"Entity",
"entity",
"=",
"(",
"Entity",
")",
"iterator",
".",
"next",
"(",
")",
";",
"double",
"d",
"=",
"getDistanceSqToEntity",
"(",
"entity",
")",
";",
"if",
"(",
"d",
"<",
"16D",
")",
"{",
"double",
"d1",
"=",
"1.0D",
"-",
"Math",
".",
"sqrt",
"(",
"d",
")",
"/",
"4D",
";",
"if",
"(",
"entity",
"==",
"par1MovingObjectPosition",
".",
"entityHit",
")",
"{",
"d1",
"=",
"1.0D",
";",
"}",
"Iterator",
"iterator1",
"=",
"list",
".",
"iterator",
"(",
")",
";",
"while",
"(",
"iterator1",
".",
"hasNext",
"(",
")",
")",
"{",
"PotionEffect",
"potioneffect",
"=",
"(",
"PotionEffect",
")",
"iterator1",
".",
"next",
"(",
")",
";",
"int",
"i",
"=",
"potioneffect",
".",
"getPotionID",
"(",
")",
";",
"if",
"(",
"Potion",
".",
"potionTypes",
"[",
"i",
"]",
".",
"isInstant",
"(",
")",
")",
"{",
"Potion",
".",
"potionTypes",
"[",
"i",
"]",
".",
"affectEntity",
"(",
"thrower",
",",
"(",
"EntityLiving",
")",
"entity",
",",
"potioneffect",
".",
"getAmplifier",
"(",
")",
",",
"d1",
")",
";",
"}",
"else",
"{",
"int",
"j",
"=",
"(",
"int",
")",
"(",
"d1",
"*",
"(",
"double",
")",
"potioneffect",
".",
"getDuration",
"(",
")",
"+",
"0.5D",
")",
";",
"if",
"(",
"j",
">",
"20",
")",
"{",
"(",
"(",
"EntityLiving",
")",
"entity",
")",
".",
"addPotionEffect",
"(",
"new",
"PotionEffect",
"(",
"i",
",",
"j",
",",
"potioneffect",
".",
"getAmplifier",
"(",
")",
")",
")",
";",
"}",
"}",
"}",
"}",
"}",
"}",
"}",
"worldObj",
".",
"playAuxSFX",
"(",
"2002",
",",
"(",
"int",
")",
"Math",
".",
"round",
"(",
"posX",
")",
",",
"(",
"int",
")",
"Math",
".",
"round",
"(",
"posY",
")",
",",
"(",
"int",
")",
"Math",
".",
"round",
"(",
"posZ",
")",
",",
"potionDamage",
")",
";",
"setDead",
"(",
")",
";",
"}",
"}",
"}",
"</s>"
] |
9,514 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"interface",
"IServer",
"{",
"public",
"abstract",
"int",
"getIntProperty",
"(",
"String",
"s",
",",
"int",
"i",
")",
";",
"public",
"abstract",
"String",
"getStringProperty",
"(",
"String",
"s",
",",
"String",
"s1",
")",
";",
"public",
"abstract",
"void",
"setProperty",
"(",
"String",
"s",
",",
"Object",
"obj",
")",
";",
"public",
"abstract",
"void",
"saveProperties",
"(",
")",
";",
"public",
"abstract",
"String",
"getSettingsFilename",
"(",
")",
";",
"public",
"abstract",
"String",
"getHostname",
"(",
")",
";",
"public",
"abstract",
"int",
"getPort",
"(",
")",
";",
"public",
"abstract",
"String",
"getMotd",
"(",
")",
";",
"public",
"abstract",
"String",
"getVersionString",
"(",
")",
";",
"public",
"abstract",
"int",
"playersOnline",
"(",
")",
";",
"public",
"abstract",
"int",
"getMaxPlayers",
"(",
")",
";",
"public",
"abstract",
"String",
"[",
"]",
"getPlayerNamesAsList",
"(",
")",
";",
"public",
"abstract",
"String",
"getWorldName",
"(",
")",
";",
"public",
"abstract",
"String",
"getPlugin",
"(",
")",
";",
"public",
"abstract",
"void",
"func_40010_o",
"(",
")",
";",
"public",
"abstract",
"String",
"handleRConCommand",
"(",
"String",
"s",
")",
";",
"public",
"abstract",
"boolean",
"isDebuggingEnabled",
"(",
")",
";",
"public",
"abstract",
"void",
"log",
"(",
"String",
"s",
")",
";",
"public",
"abstract",
"void",
"logWarning",
"(",
"String",
"s",
")",
";",
"public",
"abstract",
"void",
"logSevere",
"(",
"String",
"s",
")",
";",
"public",
"abstract",
"void",
"logIn",
"(",
"String",
"s",
")",
";",
"}",
"</s>"
] |
9,515 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"ComponentNetherBridgeCorridor2",
"extends",
"ComponentNetherBridgePiece",
"{",
"public",
"ComponentNetherBridgeCorridor2",
"(",
"int",
"par1",
",",
"Random",
"par2Random",
",",
"StructureBoundingBox",
"par3StructureBoundingBox",
",",
"int",
"par4",
")",
"{",
"super",
"(",
"par1",
")",
";",
"coordBaseMode",
"=",
"par4",
";",
"boundingBox",
"=",
"par3StructureBoundingBox",
";",
"}",
"public",
"void",
"buildComponent",
"(",
"StructureComponent",
"par1StructureComponent",
",",
"List",
"par2List",
",",
"Random",
"par3Random",
")",
"{",
"getNextComponentZ",
"(",
"(",
"ComponentNetherBridgeStartPiece",
")",
"par1StructureComponent",
",",
"par2List",
",",
"par3Random",
",",
"0",
",",
"1",
",",
"true",
")",
";",
"}",
"public",
"static",
"ComponentNetherBridgeCorridor2",
"createValidComponent",
"(",
"List",
"par0List",
",",
"Random",
"par1Random",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
",",
"int",
"par6",
")",
"{",
"StructureBoundingBox",
"structureboundingbox",
"=",
"StructureBoundingBox",
".",
"getComponentToAddBoundingBox",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"-",
"1",
",",
"0",
",",
"0",
",",
"5",
",",
"7",
",",
"5",
",",
"par5",
")",
";",
"if",
"(",
"!",
"isAboveGround",
"(",
"structureboundingbox",
")",
"||",
"StructureComponent",
".",
"findIntersecting",
"(",
"par0List",
",",
"structureboundingbox",
")",
"!=",
"null",
")",
"{",
"return",
"null",
";",
"}",
"else",
"{",
"return",
"new",
"ComponentNetherBridgeCorridor2",
"(",
"par6",
",",
"par1Random",
",",
"structureboundingbox",
",",
"par5",
")",
";",
"}",
"}",
"public",
"boolean",
"addComponentParts",
"(",
"World",
"par1World",
",",
"Random",
"par2Random",
",",
"StructureBoundingBox",
"par3StructureBoundingBox",
")",
"{",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"0",
",",
"0",
",",
"0",
",",
"4",
",",
"1",
",",
"4",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"0",
",",
"2",
",",
"0",
",",
"4",
",",
"5",
",",
"4",
",",
"0",
",",
"0",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"0",
",",
"2",
",",
"0",
",",
"0",
",",
"5",
",",
"4",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"0",
",",
"3",
",",
"1",
",",
"0",
",",
"4",
",",
"1",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"0",
",",
"3",
",",
"3",
",",
"0",
",",
"4",
",",
"3",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"4",
",",
"2",
",",
"0",
",",
"4",
",",
"5",
",",
"0",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"1",
",",
"2",
",",
"4",
",",
"4",
",",
"5",
",",
"4",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"1",
",",
"3",
",",
"4",
",",
"1",
",",
"4",
",",
"4",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"3",
",",
"3",
",",
"4",
",",
"3",
",",
"4",
",",
"4",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"0",
",",
"6",
",",
"0",
",",
"4",
",",
"6",
",",
"4",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<=",
"4",
";",
"i",
"++",
")",
"{",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<=",
"4",
";",
"j",
"++",
")",
"{",
"fillCurrentPositionBlocksDownwards",
"(",
"par1World",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"0",
",",
"i",
",",
"-",
"1",
",",
"j",
",",
"par3StructureBoundingBox",
")",
";",
"}",
"}",
"return",
"true",
";",
"}",
"}",
"</s>"
] |
9,516 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"io",
".",
"*",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"public",
"class",
"Packet104WindowItems",
"extends",
"Packet",
"{",
"public",
"int",
"windowId",
";",
"public",
"ItemStack",
"itemStack",
"[",
"]",
";",
"public",
"Packet104WindowItems",
"(",
")",
"{",
"}",
"public",
"Packet104WindowItems",
"(",
"int",
"par1",
",",
"List",
"par2List",
")",
"{",
"windowId",
"=",
"par1",
";",
"itemStack",
"=",
"new",
"ItemStack",
"[",
"par2List",
".",
"size",
"(",
")",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"itemStack",
".",
"length",
";",
"i",
"++",
")",
"{",
"ItemStack",
"itemstack",
"=",
"(",
"ItemStack",
")",
"par2List",
".",
"get",
"(",
"i",
")",
";",
"itemStack",
"[",
"i",
"]",
"=",
"itemstack",
"!=",
"null",
"?",
"itemstack",
".",
"copy",
"(",
")",
":",
"null",
";",
"}",
"}",
"public",
"void",
"readPacketData",
"(",
"DataInputStream",
"par1DataInputStream",
")",
"throws",
"IOException",
"{",
"windowId",
"=",
"par1DataInputStream",
".",
"readByte",
"(",
")",
";",
"short",
"word0",
"=",
"par1DataInputStream",
".",
"readShort",
"(",
")",
";",
"itemStack",
"=",
"new",
"ItemStack",
"[",
"word0",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"word0",
";",
"i",
"++",
")",
"{",
"itemStack",
"[",
"i",
"]",
"=",
"readItemStack",
"(",
"par1DataInputStream",
")",
";",
"}",
"}",
"public",
"void",
"writePacketData",
"(",
"DataOutputStream",
"par1DataOutputStream",
")",
"throws",
"IOException",
"{",
"par1DataOutputStream",
".",
"writeByte",
"(",
"windowId",
")",
";",
"par1DataOutputStream",
".",
"writeShort",
"(",
"itemStack",
".",
"length",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"itemStack",
".",
"length",
";",
"i",
"++",
")",
"{",
"writeItemStack",
"(",
"itemStack",
"[",
"i",
"]",
",",
"par1DataOutputStream",
")",
";",
"}",
"}",
"public",
"void",
"processPacket",
"(",
"NetHandler",
"par1NetHandler",
")",
"{",
"par1NetHandler",
".",
"handleWindowItems",
"(",
"this",
")",
";",
"}",
"public",
"int",
"getPacketSize",
"(",
")",
"{",
"return",
"3",
"+",
"itemStack",
".",
"length",
"*",
"5",
";",
"}",
"}",
"</s>"
] |
9,517 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"io",
".",
"*",
";",
"public",
"class",
"Packet35EntityHeadRotation",
"extends",
"Packet",
"{",
"public",
"int",
"entityId",
";",
"public",
"byte",
"headRotationYaw",
";",
"public",
"Packet35EntityHeadRotation",
"(",
")",
"{",
"}",
"public",
"Packet35EntityHeadRotation",
"(",
"int",
"par1",
",",
"byte",
"par2",
")",
"{",
"entityId",
"=",
"par1",
";",
"headRotationYaw",
"=",
"par2",
";",
"}",
"public",
"void",
"readPacketData",
"(",
"DataInputStream",
"par1DataInputStream",
")",
"throws",
"IOException",
"{",
"entityId",
"=",
"par1DataInputStream",
".",
"readInt",
"(",
")",
";",
"headRotationYaw",
"=",
"par1DataInputStream",
".",
"readByte",
"(",
")",
";",
"}",
"public",
"void",
"writePacketData",
"(",
"DataOutputStream",
"par1DataOutputStream",
")",
"throws",
"IOException",
"{",
"par1DataOutputStream",
".",
"writeInt",
"(",
"entityId",
")",
";",
"par1DataOutputStream",
".",
"writeByte",
"(",
"headRotationYaw",
")",
";",
"}",
"public",
"void",
"processPacket",
"(",
"NetHandler",
"par1NetHandler",
")",
"{",
"par1NetHandler",
".",
"handleEntityHeadRotation",
"(",
"this",
")",
";",
"}",
"public",
"int",
"getPacketSize",
"(",
")",
"{",
"return",
"5",
";",
"}",
"}",
"</s>"
] |
9,518 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"BlockRedstoneRepeater",
"extends",
"BlockDirectional",
"{",
"public",
"static",
"final",
"double",
"repeaterTorchOffset",
"[",
"]",
"=",
"{",
"-",
"0.0625D",
",",
"0.0625D",
",",
"0.1875D",
",",
"0.3125D",
"}",
";",
"private",
"static",
"final",
"int",
"repeaterState",
"[",
"]",
"=",
"{",
"1",
",",
"2",
",",
"3",
",",
"4",
"}",
";",
"private",
"final",
"boolean",
"isRepeaterPowered",
";",
"protected",
"BlockRedstoneRepeater",
"(",
"int",
"par1",
",",
"boolean",
"par2",
")",
"{",
"super",
"(",
"par1",
",",
"6",
",",
"Material",
".",
"circuits",
")",
";",
"isRepeaterPowered",
"=",
"par2",
";",
"setBlockBounds",
"(",
"0.0F",
",",
"0.0F",
",",
"0.0F",
",",
"1.0F",
",",
"0.125F",
",",
"1.0F",
")",
";",
"}",
"public",
"boolean",
"renderAsNormalBlock",
"(",
")",
"{",
"return",
"false",
";",
"}",
"public",
"boolean",
"canPlaceBlockAt",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"if",
"(",
"!",
"par1World",
".",
"isBlockNormalCube",
"(",
"par2",
",",
"par3",
"-",
"1",
",",
"par4",
")",
")",
"{",
"return",
"false",
";",
"}",
"else",
"{",
"return",
"super",
".",
"canPlaceBlockAt",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"}",
"}",
"public",
"boolean",
"canBlockStay",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"if",
"(",
"!",
"par1World",
".",
"isBlockNormalCube",
"(",
"par2",
",",
"par3",
"-",
"1",
",",
"par4",
")",
")",
"{",
"return",
"false",
";",
"}",
"else",
"{",
"return",
"super",
".",
"canBlockStay",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"}",
"}",
"public",
"void",
"updateTick",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"Random",
"par5Random",
")",
"{",
"int",
"i",
"=",
"par1World",
".",
"getBlockMetadata",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"boolean",
"flag",
"=",
"ignoreTick",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
",",
"i",
")",
";",
"if",
"(",
"isRepeaterPowered",
"&&",
"!",
"flag",
")",
"{",
"par1World",
".",
"setBlockAndMetadataWithNotify",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"Block",
".",
"redstoneRepeaterIdle",
".",
"blockID",
",",
"i",
")",
";",
"}",
"else",
"if",
"(",
"!",
"isRepeaterPowered",
")",
"{",
"par1World",
".",
"setBlockAndMetadataWithNotify",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"Block",
".",
"redstoneRepeaterActive",
".",
"blockID",
",",
"i",
")",
";",
"if",
"(",
"!",
"flag",
")",
"{",
"int",
"j",
"=",
"(",
"i",
"&",
"0xc",
")",
">>",
"2",
";",
"par1World",
".",
"scheduleBlockUpdate",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"Block",
".",
"redstoneRepeaterActive",
".",
"blockID",
",",
"repeaterState",
"[",
"j",
"]",
"*",
"2",
")",
";",
"}",
"}",
"}",
"public",
"int",
"getBlockTextureFromSideAndMetadata",
"(",
"int",
"par1",
",",
"int",
"par2",
")",
"{",
"if",
"(",
"par1",
"==",
"0",
")",
"{",
"return",
"!",
"isRepeaterPowered",
"?",
"115",
":",
"99",
";",
"}",
"if",
"(",
"par1",
"==",
"1",
")",
"{",
"return",
"!",
"isRepeaterPowered",
"?",
"131",
":",
"147",
";",
"}",
"else",
"{",
"return",
"5",
";",
"}",
"}",
"public",
"int",
"getRenderType",
"(",
")",
"{",
"return",
"15",
";",
"}",
"public",
"int",
"getBlockTextureFromSide",
"(",
"int",
"par1",
")",
"{",
"return",
"getBlockTextureFromSideAndMetadata",
"(",
"par1",
",",
"0",
")",
";",
"}",
"public",
"boolean",
"isIndirectlyPoweringTo",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
")",
"{",
"return",
"isPoweringTo",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
",",
"par5",
")",
";",
"}",
"public",
"boolean",
"isPoweringTo",
"(",
"IBlockAccess",
"par1IBlockAccess",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
")",
"{",
"if",
"(",
"!",
"isRepeaterPowered",
")",
"{",
"return",
"false",
";",
"}",
"int",
"i",
"=",
"getDirection",
"(",
"par1IBlockAccess",
".",
"getBlockMetadata",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
")",
";",
"if",
"(",
"i",
"==",
"0",
"&&",
"par5",
"==",
"3",
")",
"{",
"return",
"true",
";",
"}",
"if",
"(",
"i",
"==",
"1",
"&&",
"par5",
"==",
"4",
")",
"{",
"return",
"true",
";",
"}",
"if",
"(",
"i",
"==",
"2",
"&&",
"par5",
"==",
"2",
")",
"{",
"return",
"true",
";",
"}",
"return",
"i",
"==",
"3",
"&&",
"par5",
"==",
"5",
";",
"}",
"public",
"void",
"onNeighborBlockChange",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
")",
"{",
"if",
"(",
"!",
"canBlockStay",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
")",
")",
"{",
"dropBlockAsItem",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
",",
"par1World",
".",
"getBlockMetadata",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
",",
"0",
")",
";",
"par1World",
".",
"setBlockWithNotify",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"0",
")",
";",
"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",
";",
"}",
"int",
"i",
"=",
"par1World",
".",
"getBlockMetadata",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"boolean",
"flag",
"=",
"ignoreTick",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
",",
"i",
")",
";",
"int",
"j",
"=",
"(",
"i",
"&",
"0xc",
")",
">>",
"2",
";",
"if",
"(",
"isRepeaterPowered",
"&&",
"!",
"flag",
")",
"{",
"par1World",
".",
"scheduleBlockUpdate",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"blockID",
",",
"repeaterState",
"[",
"j",
"]",
"*",
"2",
")",
";",
"}",
"else",
"if",
"(",
"!",
"isRepeaterPowered",
"&&",
"flag",
")",
"{",
"par1World",
".",
"scheduleBlockUpdate",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"blockID",
",",
"repeaterState",
"[",
"j",
"]",
"*",
"2",
")",
";",
"}",
"}",
"private",
"boolean",
"ignoreTick",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
")",
"{",
"int",
"i",
"=",
"getDirection",
"(",
"par5",
")",
";",
"switch",
"(",
"i",
")",
"{",
"case",
"0",
":",
"return",
"par1World",
".",
"isBlockIndirectlyProvidingPowerTo",
"(",
"par2",
",",
"par3",
",",
"par4",
"+",
"1",
",",
"3",
")",
"||",
"par1World",
".",
"getBlockId",
"(",
"par2",
",",
"par3",
",",
"par4",
"+",
"1",
")",
"==",
"Block",
".",
"redstoneWire",
".",
"blockID",
"&&",
"par1World",
".",
"getBlockMetadata",
"(",
"par2",
",",
"par3",
",",
"par4",
"+",
"1",
")",
">",
"0",
";",
"case",
"2",
":",
"return",
"par1World",
".",
"isBlockIndirectlyProvidingPowerTo",
"(",
"par2",
",",
"par3",
",",
"par4",
"-",
"1",
",",
"2",
")",
"||",
"par1World",
".",
"getBlockId",
"(",
"par2",
",",
"par3",
",",
"par4",
"-",
"1",
")",
"==",
"Block",
".",
"redstoneWire",
".",
"blockID",
"&&",
"par1World",
".",
"getBlockMetadata",
"(",
"par2",
",",
"par3",
",",
"par4",
"-",
"1",
")",
">",
"0",
";",
"case",
"3",
":",
"return",
"par1World",
".",
"isBlockIndirectlyProvidingPowerTo",
"(",
"par2",
"+",
"1",
",",
"par3",
",",
"par4",
",",
"5",
")",
"||",
"par1World",
".",
"getBlockId",
"(",
"par2",
"+",
"1",
",",
"par3",
",",
"par4",
")",
"==",
"Block",
".",
"redstoneWire",
".",
"blockID",
"&&",
"par1World",
".",
"getBlockMetadata",
"(",
"par2",
"+",
"1",
",",
"par3",
",",
"par4",
")",
">",
"0",
";",
"case",
"1",
":",
"return",
"par1World",
".",
"isBlockIndirectlyProvidingPowerTo",
"(",
"par2",
"-",
"1",
",",
"par3",
",",
"par4",
",",
"4",
")",
"||",
"par1World",
".",
"getBlockId",
"(",
"par2",
"-",
"1",
",",
"par3",
",",
"par4",
")",
"==",
"Block",
".",
"redstoneWire",
".",
"blockID",
"&&",
"par1World",
".",
"getBlockMetadata",
"(",
"par2",
"-",
"1",
",",
"par3",
",",
"par4",
")",
">",
"0",
";",
"}",
"return",
"false",
";",
"}",
"public",
"boolean",
"blockActivated",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"EntityPlayer",
"par5EntityPlayer",
")",
"{",
"int",
"i",
"=",
"par1World",
".",
"getBlockMetadata",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"int",
"j",
"=",
"(",
"i",
"&",
"0xc",
")",
">>",
"2",
";",
"j",
"=",
"j",
"+",
"1",
"<<",
"2",
"&",
"0xc",
";",
"par1World",
".",
"setBlockMetadataWithNotify",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"j",
"|",
"i",
"&",
"3",
")",
";",
"return",
"true",
";",
"}",
"public",
"boolean",
"canProvidePower",
"(",
")",
"{",
"return",
"true",
";",
"}",
"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",
")",
"+",
"2",
")",
"%",
"4",
";",
"par1World",
".",
"setBlockMetadataWithNotify",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"i",
")",
";",
"boolean",
"flag",
"=",
"ignoreTick",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
",",
"i",
")",
";",
"if",
"(",
"flag",
")",
"{",
"par1World",
".",
"scheduleBlockUpdate",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"blockID",
",",
"1",
")",
";",
"}",
"}",
"public",
"void",
"onBlockAdded",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"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",
")",
";",
"}",
"public",
"void",
"onBlockDestroyedByPlayer",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
")",
"{",
"if",
"(",
"isRepeaterPowered",
")",
"{",
"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",
")",
";",
"}",
"super",
".",
"onBlockDestroyedByPlayer",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
",",
"par5",
")",
";",
"}",
"public",
"boolean",
"isOpaqueCube",
"(",
")",
"{",
"return",
"false",
";",
"}",
"public",
"int",
"idDropped",
"(",
"int",
"par1",
",",
"Random",
"par2Random",
",",
"int",
"par3",
")",
"{",
"return",
"Item",
".",
"redstoneRepeater",
".",
"shiftedIndex",
";",
"}",
"}",
"</s>"
] |
9,519 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"BlockLockedChest",
"extends",
"Block",
"{",
"protected",
"BlockLockedChest",
"(",
"int",
"par1",
")",
"{",
"super",
"(",
"par1",
",",
"Material",
".",
"wood",
")",
";",
"blockIndexInTexture",
"=",
"26",
";",
"}",
"public",
"int",
"getBlockTextureFromSide",
"(",
"int",
"par1",
")",
"{",
"if",
"(",
"par1",
"==",
"1",
")",
"{",
"return",
"blockIndexInTexture",
"-",
"1",
";",
"}",
"if",
"(",
"par1",
"==",
"0",
")",
"{",
"return",
"blockIndexInTexture",
"-",
"1",
";",
"}",
"if",
"(",
"par1",
"==",
"3",
")",
"{",
"return",
"blockIndexInTexture",
"+",
"1",
";",
"}",
"else",
"{",
"return",
"blockIndexInTexture",
";",
"}",
"}",
"public",
"boolean",
"canPlaceBlockAt",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"i",
")",
"{",
"return",
"true",
";",
"}",
"public",
"void",
"updateTick",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"Random",
"par5Random",
")",
"{",
"par1World",
".",
"setBlockWithNotify",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"0",
")",
";",
"}",
"}",
"</s>"
] |
9,520 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"io",
".",
"*",
";",
"public",
"class",
"Packet11PlayerPosition",
"extends",
"Packet10Flying",
"{",
"public",
"Packet11PlayerPosition",
"(",
")",
"{",
"moving",
"=",
"true",
";",
"}",
"public",
"void",
"readPacketData",
"(",
"DataInputStream",
"par1DataInputStream",
")",
"throws",
"IOException",
"{",
"xPosition",
"=",
"par1DataInputStream",
".",
"readDouble",
"(",
")",
";",
"yPosition",
"=",
"par1DataInputStream",
".",
"readDouble",
"(",
")",
";",
"stance",
"=",
"par1DataInputStream",
".",
"readDouble",
"(",
")",
";",
"zPosition",
"=",
"par1DataInputStream",
".",
"readDouble",
"(",
")",
";",
"super",
".",
"readPacketData",
"(",
"par1DataInputStream",
")",
";",
"}",
"public",
"void",
"writePacketData",
"(",
"DataOutputStream",
"par1DataOutputStream",
")",
"throws",
"IOException",
"{",
"par1DataOutputStream",
".",
"writeDouble",
"(",
"xPosition",
")",
";",
"par1DataOutputStream",
".",
"writeDouble",
"(",
"yPosition",
")",
";",
"par1DataOutputStream",
".",
"writeDouble",
"(",
"stance",
")",
";",
"par1DataOutputStream",
".",
"writeDouble",
"(",
"zPosition",
")",
";",
"super",
".",
"writePacketData",
"(",
"par1DataOutputStream",
")",
";",
"}",
"public",
"int",
"getPacketSize",
"(",
")",
"{",
"return",
"33",
";",
"}",
"}",
"</s>"
] |
9,521 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"io",
".",
"PrintStream",
";",
"import",
"java",
".",
"util",
".",
"*",
";",
"public",
"class",
"Profiler",
"{",
"public",
"static",
"boolean",
"profilingEnabled",
"=",
"false",
";",
"private",
"static",
"List",
"sectionList",
"=",
"new",
"ArrayList",
"(",
")",
";",
"private",
"static",
"List",
"timestampList",
"=",
"new",
"ArrayList",
"(",
")",
";",
"private",
"static",
"String",
"profilingSection",
"=",
"\"\"",
";",
"private",
"static",
"Map",
"profilingMap",
"=",
"new",
"HashMap",
"(",
")",
";",
"public",
"Profiler",
"(",
")",
"{",
"}",
"public",
"static",
"void",
"startSection",
"(",
"String",
"par0Str",
")",
"{",
"if",
"(",
"!",
"profilingEnabled",
")",
"{",
"return",
";",
"}",
"if",
"(",
"profilingSection",
".",
"length",
"(",
")",
">",
"0",
")",
"{",
"profilingSection",
"=",
"(",
"new",
"StringBuilder",
"(",
")",
")",
".",
"append",
"(",
"profilingSection",
")",
".",
"append",
"(",
"\".\"",
")",
".",
"toString",
"(",
")",
";",
"}",
"profilingSection",
"=",
"(",
"new",
"StringBuilder",
"(",
")",
")",
".",
"append",
"(",
"profilingSection",
")",
".",
"append",
"(",
"par0Str",
")",
".",
"toString",
"(",
")",
";",
"sectionList",
".",
"add",
"(",
"profilingSection",
")",
";",
"timestampList",
".",
"add",
"(",
"Long",
".",
"valueOf",
"(",
"System",
".",
"nanoTime",
"(",
")",
")",
")",
";",
"}",
"public",
"static",
"void",
"endSection",
"(",
")",
"{",
"if",
"(",
"!",
"profilingEnabled",
")",
"{",
"return",
";",
"}",
"long",
"l",
"=",
"System",
".",
"nanoTime",
"(",
")",
";",
"long",
"l1",
"=",
"(",
"(",
"Long",
")",
"timestampList",
".",
"remove",
"(",
"timestampList",
".",
"size",
"(",
")",
"-",
"1",
")",
")",
".",
"longValue",
"(",
")",
";",
"sectionList",
".",
"remove",
"(",
"sectionList",
".",
"size",
"(",
")",
"-",
"1",
")",
";",
"long",
"l2",
"=",
"l",
"-",
"l1",
";",
"if",
"(",
"profilingMap",
".",
"containsKey",
"(",
"profilingSection",
")",
")",
"{",
"profilingMap",
".",
"put",
"(",
"profilingSection",
",",
"Long",
".",
"valueOf",
"(",
"(",
"(",
"Long",
")",
"profilingMap",
".",
"get",
"(",
"profilingSection",
")",
")",
".",
"longValue",
"(",
")",
"+",
"l2",
")",
")",
";",
"}",
"else",
"{",
"profilingMap",
".",
"put",
"(",
"profilingSection",
",",
"Long",
".",
"valueOf",
"(",
"l2",
")",
")",
";",
"}",
"profilingSection",
"=",
"sectionList",
".",
"size",
"(",
")",
"<=",
"0",
"?",
"\"\"",
":",
"(",
"String",
")",
"sectionList",
".",
"get",
"(",
"sectionList",
".",
"size",
"(",
")",
"-",
"1",
")",
";",
"if",
"(",
"l2",
">",
"0x5f5e100L",
")",
"{",
"System",
".",
"out",
".",
"println",
"(",
"(",
"new",
"StringBuilder",
"(",
")",
")",
".",
"append",
"(",
"profilingSection",
")",
".",
"append",
"(",
"\"",
"\"",
")",
".",
"append",
"(",
"l2",
")",
".",
"toString",
"(",
")",
")",
";",
"}",
"}",
"public",
"static",
"void",
"endStartSection",
"(",
"String",
"par0Str",
")",
"{",
"endSection",
"(",
")",
";",
"startSection",
"(",
"par0Str",
")",
";",
"}",
"}",
"</s>"
] |
9,522 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"io",
".",
"*",
";",
"import",
"java",
".",
"net",
".",
"Socket",
";",
"import",
"java",
".",
"net",
".",
"SocketTimeoutException",
";",
"public",
"class",
"RConThreadClient",
"extends",
"RConThreadBase",
"{",
"private",
"boolean",
"loggedIn",
";",
"private",
"Socket",
"clientSocket",
";",
"private",
"byte",
"buffer",
"[",
"]",
";",
"private",
"String",
"rconPassword",
";",
"RConThreadClient",
"(",
"IServer",
"par1IServer",
",",
"Socket",
"par2Socket",
")",
"{",
"super",
"(",
"par1IServer",
")",
";",
"loggedIn",
"=",
"false",
";",
"buffer",
"=",
"new",
"byte",
"[",
"1460",
"]",
";",
"clientSocket",
"=",
"par2Socket",
";",
"rconPassword",
"=",
"par1IServer",
".",
"getStringProperty",
"(",
"\"\"",
",",
"\"\"",
")",
";",
"log",
"(",
"(",
"new",
"StringBuilder",
"(",
")",
")",
".",
"append",
"(",
"\"\"",
")",
".",
"append",
"(",
"par2Socket",
".",
"getInetAddress",
"(",
")",
")",
".",
"toString",
"(",
")",
")",
";",
"}",
"public",
"void",
"run",
"(",
")",
"{",
"try",
"{",
"while",
"(",
"true",
")",
"{",
"if",
"(",
"!",
"running",
")",
"{",
"break",
";",
"}",
"try",
"{",
"BufferedInputStream",
"bufferedinputstream",
"=",
"new",
"BufferedInputStream",
"(",
"clientSocket",
".",
"getInputStream",
"(",
")",
")",
";",
"int",
"i",
"=",
"bufferedinputstream",
".",
"read",
"(",
"buffer",
",",
"0",
",",
"1460",
")",
";",
"if",
"(",
"10",
">",
"i",
")",
"{",
"return",
";",
"}",
"int",
"j",
"=",
"0",
";",
"int",
"k",
"=",
"RConUtils",
".",
"getBytesAsLEInt",
"(",
"buffer",
",",
"0",
",",
"i",
")",
";",
"if",
"(",
"k",
"!=",
"i",
"-",
"4",
")",
"{",
"return",
";",
"}",
"j",
"+=",
"4",
";",
"int",
"l",
"=",
"RConUtils",
".",
"getBytesAsLEInt",
"(",
"buffer",
",",
"j",
",",
"i",
")",
";",
"j",
"+=",
"4",
";",
"int",
"i1",
"=",
"RConUtils",
".",
"getRemainingBytesAsLEInt",
"(",
"buffer",
",",
"j",
")",
";",
"j",
"+=",
"4",
";",
"switch",
"(",
"i1",
")",
"{",
"case",
"3",
":",
"String",
"s",
"=",
"RConUtils",
".",
"getBytesAsString",
"(",
"buffer",
",",
"j",
",",
"i",
")",
";",
"j",
"+=",
"s",
".",
"length",
"(",
")",
";",
"if",
"(",
"0",
"!=",
"s",
".",
"length",
"(",
")",
"&&",
"s",
".",
"equals",
"(",
"rconPassword",
")",
")",
"{",
"loggedIn",
"=",
"true",
";",
"sendResponse",
"(",
"l",
",",
"2",
",",
"\"\"",
")",
";",
"}",
"else",
"{",
"loggedIn",
"=",
"false",
";",
"sendLoginFailedResponse",
"(",
")",
";",
"}",
"break",
";",
"case",
"2",
":",
"if",
"(",
"loggedIn",
")",
"{",
"String",
"s1",
"=",
"RConUtils",
".",
"getBytesAsString",
"(",
"buffer",
",",
"j",
",",
"i",
")",
";",
"try",
"{",
"sendMultipacketResponse",
"(",
"l",
",",
"server",
".",
"handleRConCommand",
"(",
"s1",
")",
")",
";",
"}",
"catch",
"(",
"Exception",
"exception1",
")",
"{",
"sendMultipacketResponse",
"(",
"l",
",",
"(",
"new",
"StringBuilder",
"(",
")",
")",
".",
"append",
"(",
"\"\"",
")",
".",
"append",
"(",
"s1",
")",
".",
"append",
"(",
"\"",
"(\"",
")",
".",
"append",
"(",
"exception1",
".",
"getMessage",
"(",
")",
")",
".",
"append",
"(",
"\")\"",
")",
".",
"toString",
"(",
")",
")",
";",
"}",
"}",
"else",
"{",
"sendLoginFailedResponse",
"(",
")",
";",
"}",
"break",
";",
"default",
":",
"sendMultipacketResponse",
"(",
"l",
",",
"String",
".",
"format",
"(",
"\"\"",
",",
"new",
"Object",
"[",
"]",
"{",
"Integer",
".",
"toHexString",
"(",
"i1",
")",
"}",
")",
")",
";",
"break",
";",
"}",
"}",
"catch",
"(",
"SocketTimeoutException",
"sockettimeoutexception",
")",
"{",
"}",
"catch",
"(",
"IOException",
"ioexception",
")",
"{",
"if",
"(",
"running",
")",
"{",
"log",
"(",
"(",
"new",
"StringBuilder",
"(",
")",
")",
".",
"append",
"(",
"\"IO:",
"\"",
")",
".",
"append",
"(",
"ioexception",
".",
"getMessage",
"(",
")",
")",
".",
"toString",
"(",
")",
")",
";",
"}",
"}",
"}",
"}",
"catch",
"(",
"Exception",
"exception",
")",
"{",
"System",
".",
"out",
".",
"println",
"(",
"exception",
")",
";",
"}",
"finally",
"{",
"closeSocket",
"(",
")",
";",
"}",
"}",
"private",
"void",
"sendResponse",
"(",
"int",
"par1",
",",
"int",
"par2",
",",
"String",
"par3Str",
")",
"throws",
"IOException",
"{",
"ByteArrayOutputStream",
"bytearrayoutputstream",
"=",
"new",
"ByteArrayOutputStream",
"(",
"1248",
")",
";",
"DataOutputStream",
"dataoutputstream",
"=",
"new",
"DataOutputStream",
"(",
"bytearrayoutputstream",
")",
";",
"dataoutputstream",
".",
"writeInt",
"(",
"Integer",
".",
"reverseBytes",
"(",
"par3Str",
".",
"length",
"(",
")",
"+",
"10",
")",
")",
";",
"dataoutputstream",
".",
"writeInt",
"(",
"Integer",
".",
"reverseBytes",
"(",
"par1",
")",
")",
";",
"dataoutputstream",
".",
"writeInt",
"(",
"Integer",
".",
"reverseBytes",
"(",
"par2",
")",
")",
";",
"dataoutputstream",
".",
"writeBytes",
"(",
"par3Str",
")",
";",
"dataoutputstream",
".",
"write",
"(",
"0",
")",
";",
"dataoutputstream",
".",
"write",
"(",
"0",
")",
";",
"clientSocket",
".",
"getOutputStream",
"(",
")",
".",
"write",
"(",
"bytearrayoutputstream",
".",
"toByteArray",
"(",
")",
")",
";",
"}",
"private",
"void",
"sendLoginFailedResponse",
"(",
")",
"throws",
"IOException",
"{",
"sendResponse",
"(",
"-",
"1",
",",
"2",
",",
"\"\"",
")",
";",
"}",
"private",
"void",
"sendMultipacketResponse",
"(",
"int",
"par1",
",",
"String",
"par2Str",
")",
"throws",
"IOException",
"{",
"int",
"i",
"=",
"par2Str",
".",
"length",
"(",
")",
";",
"do",
"{",
"int",
"j",
"=",
"4096",
">",
"i",
"?",
"i",
":",
"4096",
";",
"sendResponse",
"(",
"par1",
",",
"0",
",",
"par2Str",
".",
"substring",
"(",
"0",
",",
"j",
")",
")",
";",
"par2Str",
"=",
"par2Str",
".",
"substring",
"(",
"j",
")",
";",
"i",
"=",
"par2Str",
".",
"length",
"(",
")",
";",
"}",
"while",
"(",
"0",
"!=",
"i",
")",
";",
"}",
"private",
"void",
"closeSocket",
"(",
")",
"{",
"if",
"(",
"null",
"==",
"clientSocket",
")",
"{",
"return",
";",
"}",
"try",
"{",
"clientSocket",
".",
"close",
"(",
")",
";",
"}",
"catch",
"(",
"IOException",
"ioexception",
")",
"{",
"logWarning",
"(",
"(",
"new",
"StringBuilder",
"(",
")",
")",
".",
"append",
"(",
"\"IO:",
"\"",
")",
".",
"append",
"(",
"ioexception",
".",
"getMessage",
"(",
")",
")",
".",
"toString",
"(",
")",
")",
";",
"}",
"clientSocket",
"=",
"null",
";",
"}",
"}",
"</s>"
] |
9,523 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"class",
"ThreadMonitorConnection",
"extends",
"Thread",
"{",
"final",
"NetworkManager",
"netManager",
";",
"ThreadMonitorConnection",
"(",
"NetworkManager",
"par1NetworkManager",
")",
"{",
"netManager",
"=",
"par1NetworkManager",
";",
"}",
"public",
"void",
"run",
"(",
")",
"{",
"try",
"{",
"Thread",
".",
"sleep",
"(",
"2000L",
")",
";",
"if",
"(",
"NetworkManager",
".",
"isRunning",
"(",
"netManager",
")",
")",
"{",
"NetworkManager",
".",
"getWriteThread",
"(",
"netManager",
")",
".",
"interrupt",
"(",
")",
";",
"netManager",
".",
"networkShutdown",
"(",
"\"\"",
",",
"new",
"Object",
"[",
"0",
"]",
")",
";",
"}",
"}",
"catch",
"(",
"Exception",
"exception",
")",
"{",
"exception",
".",
"printStackTrace",
"(",
")",
";",
"}",
"}",
"}",
"</s>"
] |
9,524 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"ItemEnderEye",
"extends",
"Item",
"{",
"public",
"ItemEnderEye",
"(",
"int",
"par1",
")",
"{",
"super",
"(",
"par1",
")",
";",
"}",
"public",
"boolean",
"onItemUse",
"(",
"ItemStack",
"par1ItemStack",
",",
"EntityPlayer",
"par2EntityPlayer",
",",
"World",
"par3World",
",",
"int",
"par4",
",",
"int",
"par5",
",",
"int",
"par6",
",",
"int",
"par7",
")",
"{",
"int",
"i",
"=",
"par3World",
".",
"getBlockId",
"(",
"par4",
",",
"par5",
",",
"par6",
")",
";",
"int",
"j",
"=",
"par3World",
".",
"getBlockMetadata",
"(",
"par4",
",",
"par5",
",",
"par6",
")",
";",
"if",
"(",
"par2EntityPlayer",
".",
"canPlayerEdit",
"(",
"par4",
",",
"par5",
",",
"par6",
")",
"&&",
"i",
"==",
"Block",
".",
"endPortalFrame",
".",
"blockID",
"&&",
"!",
"BlockEndPortalFrame",
".",
"isEnderEyeInserted",
"(",
"j",
")",
")",
"{",
"if",
"(",
"par3World",
".",
"isRemote",
")",
"{",
"return",
"true",
";",
"}",
"par3World",
".",
"setBlockMetadataWithNotify",
"(",
"par4",
",",
"par5",
",",
"par6",
",",
"j",
"+",
"4",
")",
";",
"par1ItemStack",
".",
"stackSize",
"--",
";",
"for",
"(",
"int",
"k",
"=",
"0",
";",
"k",
"<",
"16",
";",
"k",
"++",
")",
"{",
"double",
"d",
"=",
"(",
"float",
")",
"par4",
"+",
"(",
"5F",
"+",
"itemRand",
".",
"nextFloat",
"(",
")",
"*",
"6F",
")",
"/",
"16F",
";",
"double",
"d1",
"=",
"(",
"float",
")",
"par5",
"+",
"0.8125F",
";",
"double",
"d2",
"=",
"(",
"float",
")",
"par6",
"+",
"(",
"5F",
"+",
"itemRand",
".",
"nextFloat",
"(",
")",
"*",
"6F",
")",
"/",
"16F",
";",
"double",
"d3",
"=",
"0.0D",
";",
"double",
"d4",
"=",
"0.0D",
";",
"double",
"d5",
"=",
"0.0D",
";",
"par3World",
".",
"spawnParticle",
"(",
"\"smoke\"",
",",
"d",
",",
"d1",
",",
"d2",
",",
"d3",
",",
"d4",
",",
"d5",
")",
";",
"}",
"int",
"l",
"=",
"j",
"&",
"3",
";",
"int",
"i1",
"=",
"0",
";",
"int",
"j1",
"=",
"0",
";",
"boolean",
"flag",
"=",
"false",
";",
"boolean",
"flag1",
"=",
"true",
";",
"int",
"k1",
"=",
"Direction",
".",
"enderEyeMetaToDirection",
"[",
"l",
"]",
";",
"for",
"(",
"int",
"l1",
"=",
"-",
"2",
";",
"l1",
"<=",
"2",
";",
"l1",
"++",
")",
"{",
"int",
"l2",
"=",
"par4",
"+",
"Direction",
".",
"offsetX",
"[",
"k1",
"]",
"*",
"l1",
";",
"int",
"l3",
"=",
"par6",
"+",
"Direction",
".",
"offsetZ",
"[",
"k1",
"]",
"*",
"l1",
";",
"int",
"l4",
"=",
"par3World",
".",
"getBlockId",
"(",
"l2",
",",
"par5",
",",
"l3",
")",
";",
"if",
"(",
"l4",
"!=",
"Block",
".",
"endPortalFrame",
".",
"blockID",
")",
"{",
"continue",
";",
"}",
"int",
"l5",
"=",
"par3World",
".",
"getBlockMetadata",
"(",
"l2",
",",
"par5",
",",
"l3",
")",
";",
"if",
"(",
"!",
"BlockEndPortalFrame",
".",
"isEnderEyeInserted",
"(",
"l5",
")",
")",
"{",
"flag1",
"=",
"false",
";",
"break",
";",
"}",
"if",
"(",
"!",
"flag",
")",
"{",
"i1",
"=",
"l1",
";",
"j1",
"=",
"l1",
";",
"flag",
"=",
"true",
";",
"}",
"else",
"{",
"j1",
"=",
"l1",
";",
"}",
"}",
"if",
"(",
"flag1",
"&&",
"j1",
"==",
"i1",
"+",
"2",
")",
"{",
"int",
"i2",
"=",
"i1",
";",
"do",
"{",
"if",
"(",
"i2",
">",
"j1",
")",
"{",
"break",
";",
"}",
"int",
"i3",
"=",
"par4",
"+",
"Direction",
".",
"offsetX",
"[",
"k1",
"]",
"*",
"i2",
";",
"int",
"i4",
"=",
"par6",
"+",
"Direction",
".",
"offsetZ",
"[",
"k1",
"]",
"*",
"i2",
";",
"i3",
"+=",
"Direction",
".",
"offsetX",
"[",
"l",
"]",
"*",
"4",
";",
"i4",
"+=",
"Direction",
".",
"offsetZ",
"[",
"l",
"]",
"*",
"4",
";",
"int",
"i5",
"=",
"par3World",
".",
"getBlockId",
"(",
"i3",
",",
"par5",
",",
"i4",
")",
";",
"int",
"i6",
"=",
"par3World",
".",
"getBlockMetadata",
"(",
"i3",
",",
"par5",
",",
"i4",
")",
";",
"if",
"(",
"i5",
"!=",
"Block",
".",
"endPortalFrame",
".",
"blockID",
"||",
"!",
"BlockEndPortalFrame",
".",
"isEnderEyeInserted",
"(",
"i6",
")",
")",
"{",
"flag1",
"=",
"false",
";",
"break",
";",
"}",
"i2",
"++",
";",
"}",
"while",
"(",
"true",
")",
";",
"label0",
":",
"for",
"(",
"int",
"j2",
"=",
"i1",
"-",
"1",
";",
"j2",
"<=",
"j1",
"+",
"1",
";",
"j2",
"+=",
"4",
")",
"{",
"int",
"j3",
"=",
"1",
";",
"do",
"{",
"if",
"(",
"j3",
">",
"3",
")",
"{",
"continue",
"label0",
";",
"}",
"int",
"j4",
"=",
"par4",
"+",
"Direction",
".",
"offsetX",
"[",
"k1",
"]",
"*",
"j2",
";",
"int",
"j5",
"=",
"par6",
"+",
"Direction",
".",
"offsetZ",
"[",
"k1",
"]",
"*",
"j2",
";",
"j4",
"+=",
"Direction",
".",
"offsetX",
"[",
"l",
"]",
"*",
"j3",
";",
"j5",
"+=",
"Direction",
".",
"offsetZ",
"[",
"l",
"]",
"*",
"j3",
";",
"int",
"j6",
"=",
"par3World",
".",
"getBlockId",
"(",
"j4",
",",
"par5",
",",
"j5",
")",
";",
"int",
"k6",
"=",
"par3World",
".",
"getBlockMetadata",
"(",
"j4",
",",
"par5",
",",
"j5",
")",
";",
"if",
"(",
"j6",
"!=",
"Block",
".",
"endPortalFrame",
".",
"blockID",
"||",
"!",
"BlockEndPortalFrame",
".",
"isEnderEyeInserted",
"(",
"k6",
")",
")",
"{",
"flag1",
"=",
"false",
";",
"continue",
"label0",
";",
"}",
"j3",
"++",
";",
"}",
"while",
"(",
"true",
")",
";",
"}",
"if",
"(",
"flag1",
")",
"{",
"for",
"(",
"int",
"k2",
"=",
"i1",
";",
"k2",
"<=",
"j1",
";",
"k2",
"++",
")",
"{",
"for",
"(",
"int",
"k3",
"=",
"1",
";",
"k3",
"<=",
"3",
";",
"k3",
"++",
")",
"{",
"int",
"k4",
"=",
"par4",
"+",
"Direction",
".",
"offsetX",
"[",
"k1",
"]",
"*",
"k2",
";",
"int",
"k5",
"=",
"par6",
"+",
"Direction",
".",
"offsetZ",
"[",
"k1",
"]",
"*",
"k2",
";",
"k4",
"+=",
"Direction",
".",
"offsetX",
"[",
"l",
"]",
"*",
"k3",
";",
"k5",
"+=",
"Direction",
".",
"offsetZ",
"[",
"l",
"]",
"*",
"k3",
";",
"par3World",
".",
"setBlockWithNotify",
"(",
"k4",
",",
"par5",
",",
"k5",
",",
"Block",
".",
"endPortal",
".",
"blockID",
")",
";",
"}",
"}",
"}",
"}",
"return",
"true",
";",
"}",
"else",
"{",
"return",
"false",
";",
"}",
"}",
"public",
"ItemStack",
"onItemRightClick",
"(",
"ItemStack",
"par1ItemStack",
",",
"World",
"par2World",
",",
"EntityPlayer",
"par3EntityPlayer",
")",
"{",
"MovingObjectPosition",
"movingobjectposition",
"=",
"getMovingObjectPositionFromPlayer",
"(",
"par2World",
",",
"par3EntityPlayer",
",",
"false",
")",
";",
"if",
"(",
"movingobjectposition",
"!=",
"null",
"&&",
"movingobjectposition",
".",
"typeOfHit",
"==",
"EnumMovingObjectType",
".",
"TILE",
")",
"{",
"int",
"i",
"=",
"par2World",
".",
"getBlockId",
"(",
"movingobjectposition",
".",
"blockX",
",",
"movingobjectposition",
".",
"blockY",
",",
"movingobjectposition",
".",
"blockZ",
")",
";",
"if",
"(",
"i",
"==",
"Block",
".",
"endPortalFrame",
".",
"blockID",
")",
"{",
"return",
"par1ItemStack",
";",
"}",
"}",
"if",
"(",
"!",
"par2World",
".",
"isRemote",
")",
"{",
"ChunkPosition",
"chunkposition",
"=",
"par2World",
".",
"findClosestStructure",
"(",
"\"Stronghold\"",
",",
"(",
"int",
")",
"par3EntityPlayer",
".",
"posX",
",",
"(",
"int",
")",
"par3EntityPlayer",
".",
"posY",
",",
"(",
"int",
")",
"par3EntityPlayer",
".",
"posZ",
")",
";",
"if",
"(",
"chunkposition",
"!=",
"null",
")",
"{",
"EntityEnderEye",
"entityendereye",
"=",
"new",
"EntityEnderEye",
"(",
"par2World",
",",
"par3EntityPlayer",
".",
"posX",
",",
"(",
"par3EntityPlayer",
".",
"posY",
"+",
"1.6200000000000001D",
")",
"-",
"(",
"double",
")",
"par3EntityPlayer",
".",
"yOffset",
",",
"par3EntityPlayer",
".",
"posZ",
")",
";",
"entityendereye",
".",
"func_40056_a",
"(",
"chunkposition",
".",
"x",
",",
"chunkposition",
".",
"y",
",",
"chunkposition",
".",
"z",
")",
";",
"par2World",
".",
"spawnEntityInWorld",
"(",
"entityendereye",
")",
";",
"par2World",
".",
"playSoundAtEntity",
"(",
"par3EntityPlayer",
",",
"\"random.bow\"",
",",
"0.5F",
",",
"0.4F",
"/",
"(",
"itemRand",
".",
"nextFloat",
"(",
")",
"*",
"0.4F",
"+",
"0.8F",
")",
")",
";",
"par2World",
".",
"playAuxSFXAtEntity",
"(",
"null",
",",
"1002",
",",
"(",
"int",
")",
"par3EntityPlayer",
".",
"posX",
",",
"(",
"int",
")",
"par3EntityPlayer",
".",
"posY",
",",
"(",
"int",
")",
"par3EntityPlayer",
".",
"posZ",
",",
"0",
")",
";",
"if",
"(",
"!",
"par3EntityPlayer",
".",
"capabilities",
".",
"isCreativeMode",
")",
"{",
"par1ItemStack",
".",
"stackSize",
"--",
";",
"}",
"}",
"}",
"return",
"par1ItemStack",
";",
"}",
"}",
"</s>"
] |
9,525 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"EntityCreeper",
"extends",
"EntityMob",
"{",
"int",
"timeSinceIgnited",
";",
"int",
"lastActiveTime",
";",
"public",
"EntityCreeper",
"(",
"World",
"par1World",
")",
"{",
"super",
"(",
"par1World",
")",
";",
"texture",
"=",
"\"\"",
";",
"tasks",
".",
"addTask",
"(",
"1",
",",
"new",
"EntityAISwimming",
"(",
"this",
")",
")",
";",
"tasks",
".",
"addTask",
"(",
"2",
",",
"new",
"EntityAICreeperSwell",
"(",
"this",
")",
")",
";",
"tasks",
".",
"addTask",
"(",
"3",
",",
"new",
"EntityAIAvoidEntity",
"(",
"this",
",",
"net",
".",
"minecraft",
".",
"src",
".",
"EntityOcelot",
".",
"class",
",",
"6F",
",",
"0.25F",
",",
"0.3F",
")",
")",
";",
"tasks",
".",
"addTask",
"(",
"4",
",",
"new",
"EntityAIAttackOnCollide",
"(",
"this",
",",
"0.25F",
",",
"false",
")",
")",
";",
"tasks",
".",
"addTask",
"(",
"5",
",",
"new",
"EntityAIWander",
"(",
"this",
",",
"0.2F",
")",
")",
";",
"tasks",
".",
"addTask",
"(",
"6",
",",
"new",
"EntityAIWatchClosest",
"(",
"this",
",",
"net",
".",
"minecraft",
".",
"src",
".",
"EntityPlayer",
".",
"class",
",",
"8F",
")",
")",
";",
"tasks",
".",
"addTask",
"(",
"6",
",",
"new",
"EntityAILookIdle",
"(",
"this",
")",
")",
";",
"targetTasks",
".",
"addTask",
"(",
"1",
",",
"new",
"EntityAINearestAttackableTarget",
"(",
"this",
",",
"net",
".",
"minecraft",
".",
"src",
".",
"EntityPlayer",
".",
"class",
",",
"16F",
",",
"0",
",",
"true",
")",
")",
";",
"targetTasks",
".",
"addTask",
"(",
"2",
",",
"new",
"EntityAIHurtByTarget",
"(",
"this",
",",
"false",
")",
")",
";",
"}",
"public",
"boolean",
"isAIEnabled",
"(",
")",
"{",
"return",
"true",
";",
"}",
"public",
"int",
"getMaxHealth",
"(",
")",
"{",
"return",
"20",
";",
"}",
"protected",
"void",
"entityInit",
"(",
")",
"{",
"super",
".",
"entityInit",
"(",
")",
";",
"dataWatcher",
".",
"addObject",
"(",
"16",
",",
"Byte",
".",
"valueOf",
"(",
"(",
"byte",
")",
"-",
"1",
")",
")",
";",
"dataWatcher",
".",
"addObject",
"(",
"17",
",",
"Byte",
".",
"valueOf",
"(",
"(",
"byte",
")",
"0",
")",
")",
";",
"}",
"public",
"void",
"writeEntityToNBT",
"(",
"NBTTagCompound",
"par1NBTTagCompound",
")",
"{",
"super",
".",
"writeEntityToNBT",
"(",
"par1NBTTagCompound",
")",
";",
"if",
"(",
"dataWatcher",
".",
"getWatchableObjectByte",
"(",
"17",
")",
"==",
"1",
")",
"{",
"par1NBTTagCompound",
".",
"setBoolean",
"(",
"\"powered\"",
",",
"true",
")",
";",
"}",
"}",
"public",
"void",
"readEntityFromNBT",
"(",
"NBTTagCompound",
"par1NBTTagCompound",
")",
"{",
"super",
".",
"readEntityFromNBT",
"(",
"par1NBTTagCompound",
")",
";",
"dataWatcher",
".",
"updateObject",
"(",
"17",
",",
"Byte",
".",
"valueOf",
"(",
"(",
"byte",
")",
"(",
"par1NBTTagCompound",
".",
"getBoolean",
"(",
"\"powered\"",
")",
"?",
"1",
":",
"0",
")",
")",
")",
";",
"}",
"public",
"void",
"onUpdate",
"(",
")",
"{",
"if",
"(",
"isEntityAlive",
"(",
")",
")",
"{",
"lastActiveTime",
"=",
"timeSinceIgnited",
";",
"int",
"i",
"=",
"getCreeperState",
"(",
")",
";",
"if",
"(",
"i",
">",
"0",
"&&",
"timeSinceIgnited",
"==",
"0",
")",
"{",
"worldObj",
".",
"playSoundAtEntity",
"(",
"this",
",",
"\"random.fuse\"",
",",
"1.0F",
",",
"0.5F",
")",
";",
"}",
"timeSinceIgnited",
"+=",
"i",
";",
"if",
"(",
"timeSinceIgnited",
"<",
"0",
")",
"{",
"timeSinceIgnited",
"=",
"0",
";",
"}",
"if",
"(",
"timeSinceIgnited",
">=",
"30",
")",
"{",
"timeSinceIgnited",
"=",
"30",
";",
"if",
"(",
"!",
"worldObj",
".",
"isRemote",
")",
"{",
"if",
"(",
"getPowered",
"(",
")",
")",
"{",
"worldObj",
".",
"createExplosion",
"(",
"this",
",",
"posX",
",",
"posY",
",",
"posZ",
",",
"6F",
")",
";",
"}",
"else",
"{",
"worldObj",
".",
"createExplosion",
"(",
"this",
",",
"posX",
",",
"posY",
",",
"posZ",
",",
"3F",
")",
";",
"}",
"setDead",
"(",
")",
";",
"}",
"}",
"}",
"super",
".",
"onUpdate",
"(",
")",
";",
"}",
"protected",
"String",
"getHurtSound",
"(",
")",
"{",
"return",
"\"mob.creeper\"",
";",
"}",
"protected",
"String",
"getDeathSound",
"(",
")",
"{",
"return",
"\"\"",
";",
"}",
"public",
"void",
"onDeath",
"(",
"DamageSource",
"par1DamageSource",
")",
"{",
"super",
".",
"onDeath",
"(",
"par1DamageSource",
")",
";",
"if",
"(",
"par1DamageSource",
".",
"getEntity",
"(",
")",
"instanceof",
"EntitySkeleton",
")",
"{",
"dropItem",
"(",
"Item",
".",
"record13",
".",
"shiftedIndex",
"+",
"rand",
".",
"nextInt",
"(",
"10",
")",
",",
"1",
")",
";",
"}",
"}",
"public",
"boolean",
"attackEntityAsMob",
"(",
"Entity",
"par1Entity",
")",
"{",
"return",
"true",
";",
"}",
"public",
"boolean",
"getPowered",
"(",
")",
"{",
"return",
"dataWatcher",
".",
"getWatchableObjectByte",
"(",
"17",
")",
"==",
"1",
";",
"}",
"protected",
"int",
"getDropItemId",
"(",
")",
"{",
"return",
"Item",
".",
"gunpowder",
".",
"shiftedIndex",
";",
"}",
"public",
"int",
"getCreeperState",
"(",
")",
"{",
"return",
"dataWatcher",
".",
"getWatchableObjectByte",
"(",
"16",
")",
";",
"}",
"public",
"void",
"setCreeperState",
"(",
"int",
"par1",
")",
"{",
"dataWatcher",
".",
"updateObject",
"(",
"16",
",",
"Byte",
".",
"valueOf",
"(",
"(",
"byte",
")",
"par1",
")",
")",
";",
"}",
"public",
"void",
"onStruckByLightning",
"(",
"EntityLightningBolt",
"par1EntityLightningBolt",
")",
"{",
"super",
".",
"onStruckByLightning",
"(",
"par1EntityLightningBolt",
")",
";",
"dataWatcher",
".",
"updateObject",
"(",
"17",
",",
"Byte",
".",
"valueOf",
"(",
"(",
"byte",
")",
"1",
")",
")",
";",
"}",
"}",
"</s>"
] |
9,526 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"BlockFire",
"extends",
"Block",
"{",
"private",
"int",
"chanceToEncourageFire",
"[",
"]",
";",
"private",
"int",
"abilityToCatchFire",
"[",
"]",
";",
"protected",
"BlockFire",
"(",
"int",
"par1",
",",
"int",
"par2",
")",
"{",
"super",
"(",
"par1",
",",
"par2",
",",
"Material",
".",
"fire",
")",
";",
"chanceToEncourageFire",
"=",
"new",
"int",
"[",
"256",
"]",
";",
"abilityToCatchFire",
"=",
"new",
"int",
"[",
"256",
"]",
";",
"setTickRandomly",
"(",
"true",
")",
";",
"}",
"public",
"void",
"initializeBlock",
"(",
")",
"{",
"setBurnRate",
"(",
"Block",
".",
"planks",
".",
"blockID",
",",
"5",
",",
"20",
")",
";",
"setBurnRate",
"(",
"Block",
".",
"fence",
".",
"blockID",
",",
"5",
",",
"20",
")",
";",
"setBurnRate",
"(",
"Block",
".",
"stairCompactPlanks",
".",
"blockID",
",",
"5",
",",
"20",
")",
";",
"setBurnRate",
"(",
"Block",
".",
"wood",
".",
"blockID",
",",
"5",
",",
"5",
")",
";",
"setBurnRate",
"(",
"Block",
".",
"leaves",
".",
"blockID",
",",
"30",
",",
"60",
")",
";",
"setBurnRate",
"(",
"Block",
".",
"bookShelf",
".",
"blockID",
",",
"30",
",",
"20",
")",
";",
"setBurnRate",
"(",
"Block",
".",
"tnt",
".",
"blockID",
",",
"15",
",",
"100",
")",
";",
"setBurnRate",
"(",
"Block",
".",
"tallGrass",
".",
"blockID",
",",
"60",
",",
"100",
")",
";",
"setBurnRate",
"(",
"Block",
".",
"cloth",
".",
"blockID",
",",
"30",
",",
"60",
")",
";",
"setBurnRate",
"(",
"Block",
".",
"vine",
".",
"blockID",
",",
"15",
",",
"100",
")",
";",
"}",
"private",
"void",
"setBurnRate",
"(",
"int",
"par1",
",",
"int",
"par2",
",",
"int",
"par3",
")",
"{",
"chanceToEncourageFire",
"[",
"par1",
"]",
"=",
"par2",
";",
"abilityToCatchFire",
"[",
"par1",
"]",
"=",
"par3",
";",
"}",
"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",
"3",
";",
"}",
"public",
"int",
"quantityDropped",
"(",
"Random",
"par1Random",
")",
"{",
"return",
"0",
";",
"}",
"public",
"int",
"tickRate",
"(",
")",
"{",
"return",
"30",
";",
"}",
"public",
"void",
"updateTick",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"Random",
"par5Random",
")",
"{",
"boolean",
"flag",
"=",
"par1World",
".",
"getBlockId",
"(",
"par2",
",",
"par3",
"-",
"1",
",",
"par4",
")",
"==",
"Block",
".",
"netherrack",
".",
"blockID",
";",
"if",
"(",
"(",
"par1World",
".",
"worldProvider",
"instanceof",
"WorldProviderEnd",
")",
"&&",
"par1World",
".",
"getBlockId",
"(",
"par2",
",",
"par3",
"-",
"1",
",",
"par4",
")",
"==",
"Block",
".",
"bedrock",
".",
"blockID",
")",
"{",
"flag",
"=",
"true",
";",
"}",
"if",
"(",
"!",
"canPlaceBlockAt",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
")",
")",
"{",
"par1World",
".",
"setBlockWithNotify",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"0",
")",
";",
"}",
"if",
"(",
"!",
"flag",
"&&",
"par1World",
".",
"isRaining",
"(",
")",
"&&",
"(",
"par1World",
".",
"canLightningStrikeAt",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
"||",
"par1World",
".",
"canLightningStrikeAt",
"(",
"par2",
"-",
"1",
",",
"par3",
",",
"par4",
")",
"||",
"par1World",
".",
"canLightningStrikeAt",
"(",
"par2",
"+",
"1",
",",
"par3",
",",
"par4",
")",
"||",
"par1World",
".",
"canLightningStrikeAt",
"(",
"par2",
",",
"par3",
",",
"par4",
"-",
"1",
")",
"||",
"par1World",
".",
"canLightningStrikeAt",
"(",
"par2",
",",
"par3",
",",
"par4",
"+",
"1",
")",
")",
")",
"{",
"par1World",
".",
"setBlockWithNotify",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"0",
")",
";",
"return",
";",
"}",
"int",
"i",
"=",
"par1World",
".",
"getBlockMetadata",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"if",
"(",
"i",
"<",
"15",
")",
"{",
"par1World",
".",
"setBlockMetadata",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"i",
"+",
"par5Random",
".",
"nextInt",
"(",
"3",
")",
"/",
"2",
")",
";",
"}",
"par1World",
".",
"scheduleBlockUpdate",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"blockID",
",",
"tickRate",
"(",
")",
"+",
"par5Random",
".",
"nextInt",
"(",
"10",
")",
")",
";",
"if",
"(",
"!",
"flag",
"&&",
"!",
"canNeighborBurn",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
")",
")",
"{",
"if",
"(",
"!",
"par1World",
".",
"isBlockNormalCube",
"(",
"par2",
",",
"par3",
"-",
"1",
",",
"par4",
")",
"||",
"i",
">",
"3",
")",
"{",
"par1World",
".",
"setBlockWithNotify",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"0",
")",
";",
"}",
"return",
";",
"}",
"if",
"(",
"!",
"flag",
"&&",
"!",
"canBlockCatchFire",
"(",
"par1World",
",",
"par2",
",",
"par3",
"-",
"1",
",",
"par4",
")",
"&&",
"i",
"==",
"15",
"&&",
"par5Random",
".",
"nextInt",
"(",
"4",
")",
"==",
"0",
")",
"{",
"par1World",
".",
"setBlockWithNotify",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"0",
")",
";",
"return",
";",
"}",
"boolean",
"flag1",
"=",
"par1World",
".",
"func_48089_z",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"byte",
"byte0",
"=",
"0",
";",
"if",
"(",
"flag1",
")",
"{",
"byte0",
"=",
"-",
"50",
";",
"}",
"tryToCatchBlockOnFire",
"(",
"par1World",
",",
"par2",
"+",
"1",
",",
"par3",
",",
"par4",
",",
"300",
"+",
"byte0",
",",
"par5Random",
",",
"i",
")",
";",
"tryToCatchBlockOnFire",
"(",
"par1World",
",",
"par2",
"-",
"1",
",",
"par3",
",",
"par4",
",",
"300",
"+",
"byte0",
",",
"par5Random",
",",
"i",
")",
";",
"tryToCatchBlockOnFire",
"(",
"par1World",
",",
"par2",
",",
"par3",
"-",
"1",
",",
"par4",
",",
"250",
"+",
"byte0",
",",
"par5Random",
",",
"i",
")",
";",
"tryToCatchBlockOnFire",
"(",
"par1World",
",",
"par2",
",",
"par3",
"+",
"1",
",",
"par4",
",",
"250",
"+",
"byte0",
",",
"par5Random",
",",
"i",
")",
";",
"tryToCatchBlockOnFire",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
"-",
"1",
",",
"300",
"+",
"byte0",
",",
"par5Random",
",",
"i",
")",
";",
"tryToCatchBlockOnFire",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
"+",
"1",
",",
"300",
"+",
"byte0",
",",
"par5Random",
",",
"i",
")",
";",
"for",
"(",
"int",
"j",
"=",
"par2",
"-",
"1",
";",
"j",
"<=",
"par2",
"+",
"1",
";",
"j",
"++",
")",
"{",
"for",
"(",
"int",
"k",
"=",
"par4",
"-",
"1",
";",
"k",
"<=",
"par4",
"+",
"1",
";",
"k",
"++",
")",
"{",
"for",
"(",
"int",
"l",
"=",
"par3",
"-",
"1",
";",
"l",
"<=",
"par3",
"+",
"4",
";",
"l",
"++",
")",
"{",
"if",
"(",
"j",
"==",
"par2",
"&&",
"l",
"==",
"par3",
"&&",
"k",
"==",
"par4",
")",
"{",
"continue",
";",
"}",
"int",
"i1",
"=",
"100",
";",
"if",
"(",
"l",
">",
"par3",
"+",
"1",
")",
"{",
"i1",
"+=",
"(",
"l",
"-",
"(",
"par3",
"+",
"1",
")",
")",
"*",
"100",
";",
"}",
"int",
"j1",
"=",
"getChanceOfNeighborsEncouragingFire",
"(",
"par1World",
",",
"j",
",",
"l",
",",
"k",
")",
";",
"if",
"(",
"j1",
"<=",
"0",
")",
"{",
"continue",
";",
"}",
"int",
"k1",
"=",
"(",
"j1",
"+",
"40",
")",
"/",
"(",
"i",
"+",
"30",
")",
";",
"if",
"(",
"flag1",
")",
"{",
"k1",
"/=",
"2",
";",
"}",
"if",
"(",
"k1",
"<=",
"0",
"||",
"par5Random",
".",
"nextInt",
"(",
"i1",
")",
">",
"k1",
"||",
"par1World",
".",
"isRaining",
"(",
")",
"&&",
"par1World",
".",
"canLightningStrikeAt",
"(",
"j",
",",
"l",
",",
"k",
")",
"||",
"par1World",
".",
"canLightningStrikeAt",
"(",
"j",
"-",
"1",
",",
"l",
",",
"par4",
")",
"||",
"par1World",
".",
"canLightningStrikeAt",
"(",
"j",
"+",
"1",
",",
"l",
",",
"k",
")",
"||",
"par1World",
".",
"canLightningStrikeAt",
"(",
"j",
",",
"l",
",",
"k",
"-",
"1",
")",
"||",
"par1World",
".",
"canLightningStrikeAt",
"(",
"j",
",",
"l",
",",
"k",
"+",
"1",
")",
")",
"{",
"continue",
";",
"}",
"int",
"l1",
"=",
"i",
"+",
"par5Random",
".",
"nextInt",
"(",
"5",
")",
"/",
"4",
";",
"if",
"(",
"l1",
">",
"15",
")",
"{",
"l1",
"=",
"15",
";",
"}",
"par1World",
".",
"setBlockAndMetadataWithNotify",
"(",
"j",
",",
"l",
",",
"k",
",",
"blockID",
",",
"l1",
")",
";",
"}",
"}",
"}",
"}",
"private",
"void",
"tryToCatchBlockOnFire",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
",",
"Random",
"par6Random",
",",
"int",
"par7",
")",
"{",
"int",
"i",
"=",
"abilityToCatchFire",
"[",
"par1World",
".",
"getBlockId",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
"]",
";",
"if",
"(",
"par6Random",
".",
"nextInt",
"(",
"par5",
")",
"<",
"i",
")",
"{",
"boolean",
"flag",
"=",
"par1World",
".",
"getBlockId",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
"==",
"Block",
".",
"tnt",
".",
"blockID",
";",
"if",
"(",
"par6Random",
".",
"nextInt",
"(",
"par7",
"+",
"10",
")",
"<",
"5",
"&&",
"!",
"par1World",
".",
"canLightningStrikeAt",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
")",
"{",
"int",
"j",
"=",
"par7",
"+",
"par6Random",
".",
"nextInt",
"(",
"5",
")",
"/",
"4",
";",
"if",
"(",
"j",
">",
"15",
")",
"{",
"j",
"=",
"15",
";",
"}",
"par1World",
".",
"setBlockAndMetadataWithNotify",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"blockID",
",",
"j",
")",
";",
"}",
"else",
"{",
"par1World",
".",
"setBlockWithNotify",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"0",
")",
";",
"}",
"if",
"(",
"flag",
")",
"{",
"Block",
".",
"tnt",
".",
"onBlockDestroyedByPlayer",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
",",
"1",
")",
";",
"}",
"}",
"}",
"private",
"boolean",
"canNeighborBurn",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"if",
"(",
"canBlockCatchFire",
"(",
"par1World",
",",
"par2",
"+",
"1",
",",
"par3",
",",
"par4",
")",
")",
"{",
"return",
"true",
";",
"}",
"if",
"(",
"canBlockCatchFire",
"(",
"par1World",
",",
"par2",
"-",
"1",
",",
"par3",
",",
"par4",
")",
")",
"{",
"return",
"true",
";",
"}",
"if",
"(",
"canBlockCatchFire",
"(",
"par1World",
",",
"par2",
",",
"par3",
"-",
"1",
",",
"par4",
")",
")",
"{",
"return",
"true",
";",
"}",
"if",
"(",
"canBlockCatchFire",
"(",
"par1World",
",",
"par2",
",",
"par3",
"+",
"1",
",",
"par4",
")",
")",
"{",
"return",
"true",
";",
"}",
"if",
"(",
"canBlockCatchFire",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
"-",
"1",
")",
")",
"{",
"return",
"true",
";",
"}",
"return",
"canBlockCatchFire",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
"+",
"1",
")",
";",
"}",
"private",
"int",
"getChanceOfNeighborsEncouragingFire",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"int",
"i",
"=",
"0",
";",
"if",
"(",
"!",
"par1World",
".",
"isAirBlock",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
")",
"{",
"return",
"0",
";",
"}",
"else",
"{",
"i",
"=",
"getChanceToEncourageFire",
"(",
"par1World",
",",
"par2",
"+",
"1",
",",
"par3",
",",
"par4",
",",
"i",
")",
";",
"i",
"=",
"getChanceToEncourageFire",
"(",
"par1World",
",",
"par2",
"-",
"1",
",",
"par3",
",",
"par4",
",",
"i",
")",
";",
"i",
"=",
"getChanceToEncourageFire",
"(",
"par1World",
",",
"par2",
",",
"par3",
"-",
"1",
",",
"par4",
",",
"i",
")",
";",
"i",
"=",
"getChanceToEncourageFire",
"(",
"par1World",
",",
"par2",
",",
"par3",
"+",
"1",
",",
"par4",
",",
"i",
")",
";",
"i",
"=",
"getChanceToEncourageFire",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
"-",
"1",
",",
"i",
")",
";",
"i",
"=",
"getChanceToEncourageFire",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
"+",
"1",
",",
"i",
")",
";",
"return",
"i",
";",
"}",
"}",
"public",
"boolean",
"isCollidable",
"(",
")",
"{",
"return",
"false",
";",
"}",
"public",
"boolean",
"canBlockCatchFire",
"(",
"IBlockAccess",
"par1IBlockAccess",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"return",
"chanceToEncourageFire",
"[",
"par1IBlockAccess",
".",
"getBlockId",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
"]",
">",
"0",
";",
"}",
"public",
"int",
"getChanceToEncourageFire",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
")",
"{",
"int",
"i",
"=",
"chanceToEncourageFire",
"[",
"par1World",
".",
"getBlockId",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
"]",
";",
"if",
"(",
"i",
">",
"par5",
")",
"{",
"return",
"i",
";",
"}",
"else",
"{",
"return",
"par5",
";",
"}",
"}",
"public",
"boolean",
"canPlaceBlockAt",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"return",
"par1World",
".",
"isBlockNormalCube",
"(",
"par2",
",",
"par3",
"-",
"1",
",",
"par4",
")",
"||",
"canNeighborBurn",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"}",
"public",
"void",
"onNeighborBlockChange",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
")",
"{",
"if",
"(",
"!",
"par1World",
".",
"isBlockNormalCube",
"(",
"par2",
",",
"par3",
"-",
"1",
",",
"par4",
")",
"&&",
"!",
"canNeighborBurn",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
")",
")",
"{",
"par1World",
".",
"setBlockWithNotify",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"0",
")",
";",
"return",
";",
"}",
"else",
"{",
"return",
";",
"}",
"}",
"public",
"void",
"onBlockAdded",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"if",
"(",
"par1World",
".",
"worldProvider",
".",
"worldType",
"<=",
"0",
"&&",
"par1World",
".",
"getBlockId",
"(",
"par2",
",",
"par3",
"-",
"1",
",",
"par4",
")",
"==",
"Block",
".",
"obsidian",
".",
"blockID",
"&&",
"Block",
".",
"portal",
".",
"tryToCreatePortal",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
")",
")",
"{",
"return",
";",
"}",
"if",
"(",
"!",
"par1World",
".",
"isBlockNormalCube",
"(",
"par2",
",",
"par3",
"-",
"1",
",",
"par4",
")",
"&&",
"!",
"canNeighborBurn",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
")",
")",
"{",
"par1World",
".",
"setBlockWithNotify",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"0",
")",
";",
"return",
";",
"}",
"else",
"{",
"par1World",
".",
"scheduleBlockUpdate",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"blockID",
",",
"tickRate",
"(",
")",
"+",
"par1World",
".",
"rand",
".",
"nextInt",
"(",
"10",
")",
")",
";",
"return",
";",
"}",
"}",
"}",
"</s>"
] |
9,527 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"*",
";",
"public",
"class",
"TileEntityPiston",
"extends",
"TileEntity",
"{",
"private",
"int",
"storedBlockID",
";",
"private",
"int",
"storedMetadata",
";",
"private",
"int",
"storedOrientation",
";",
"private",
"boolean",
"extending",
";",
"private",
"boolean",
"shouldHeadBeRendered",
";",
"private",
"float",
"progress",
";",
"private",
"float",
"lastProgress",
";",
"private",
"static",
"List",
"pushedObjects",
"=",
"new",
"ArrayList",
"(",
")",
";",
"public",
"TileEntityPiston",
"(",
")",
"{",
"}",
"public",
"TileEntityPiston",
"(",
"int",
"par1",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"boolean",
"par4",
",",
"boolean",
"par5",
")",
"{",
"storedBlockID",
"=",
"par1",
";",
"storedMetadata",
"=",
"par2",
";",
"storedOrientation",
"=",
"par3",
";",
"extending",
"=",
"par4",
";",
"shouldHeadBeRendered",
"=",
"par5",
";",
"}",
"public",
"int",
"getStoredBlockID",
"(",
")",
"{",
"return",
"storedBlockID",
";",
"}",
"public",
"int",
"getBlockMetadata",
"(",
")",
"{",
"return",
"storedMetadata",
";",
"}",
"public",
"boolean",
"isExtending",
"(",
")",
"{",
"return",
"extending",
";",
"}",
"public",
"int",
"getPistonOrientation",
"(",
")",
"{",
"return",
"storedOrientation",
";",
"}",
"public",
"float",
"getProgress",
"(",
"float",
"par1",
")",
"{",
"if",
"(",
"par1",
">",
"1.0F",
")",
"{",
"par1",
"=",
"1.0F",
";",
"}",
"return",
"lastProgress",
"+",
"(",
"progress",
"-",
"lastProgress",
")",
"*",
"par1",
";",
"}",
"private",
"void",
"updatePushedObjects",
"(",
"float",
"par1",
",",
"float",
"par2",
")",
"{",
"if",
"(",
"!",
"extending",
")",
"{",
"par1",
"--",
";",
"}",
"else",
"{",
"par1",
"=",
"1.0F",
"-",
"par1",
";",
"}",
"AxisAlignedBB",
"axisalignedbb",
"=",
"Block",
".",
"pistonMoving",
".",
"getAxisAlignedBB",
"(",
"worldObj",
",",
"xCoord",
",",
"yCoord",
",",
"zCoord",
",",
"storedBlockID",
",",
"par1",
",",
"storedOrientation",
")",
";",
"if",
"(",
"axisalignedbb",
"!=",
"null",
")",
"{",
"List",
"list",
"=",
"worldObj",
".",
"getEntitiesWithinAABBExcludingEntity",
"(",
"null",
",",
"axisalignedbb",
")",
";",
"if",
"(",
"!",
"list",
".",
"isEmpty",
"(",
")",
")",
"{",
"pushedObjects",
".",
"addAll",
"(",
"list",
")",
";",
"Entity",
"entity",
";",
"for",
"(",
"Iterator",
"iterator",
"=",
"pushedObjects",
".",
"iterator",
"(",
")",
";",
"iterator",
".",
"hasNext",
"(",
")",
";",
"entity",
".",
"moveEntity",
"(",
"par2",
"*",
"(",
"float",
")",
"Facing",
".",
"offsetsXForSide",
"[",
"storedOrientation",
"]",
",",
"par2",
"*",
"(",
"float",
")",
"Facing",
".",
"offsetsYForSide",
"[",
"storedOrientation",
"]",
",",
"par2",
"*",
"(",
"float",
")",
"Facing",
".",
"offsetsZForSide",
"[",
"storedOrientation",
"]",
")",
")",
"{",
"entity",
"=",
"(",
"Entity",
")",
"iterator",
".",
"next",
"(",
")",
";",
"}",
"pushedObjects",
".",
"clear",
"(",
")",
";",
"}",
"}",
"}",
"public",
"void",
"clearPistonTileEntity",
"(",
")",
"{",
"if",
"(",
"lastProgress",
"<",
"1.0F",
"&&",
"worldObj",
"!=",
"null",
")",
"{",
"lastProgress",
"=",
"progress",
"=",
"1.0F",
";",
"worldObj",
".",
"removeBlockTileEntity",
"(",
"xCoord",
",",
"yCoord",
",",
"zCoord",
")",
";",
"invalidate",
"(",
")",
";",
"if",
"(",
"worldObj",
".",
"getBlockId",
"(",
"xCoord",
",",
"yCoord",
",",
"zCoord",
")",
"==",
"Block",
".",
"pistonMoving",
".",
"blockID",
")",
"{",
"worldObj",
".",
"setBlockAndMetadataWithNotify",
"(",
"xCoord",
",",
"yCoord",
",",
"zCoord",
",",
"storedBlockID",
",",
"storedMetadata",
")",
";",
"}",
"}",
"}",
"public",
"void",
"updateEntity",
"(",
")",
"{",
"lastProgress",
"=",
"progress",
";",
"if",
"(",
"lastProgress",
">=",
"1.0F",
")",
"{",
"updatePushedObjects",
"(",
"1.0F",
",",
"0.25F",
")",
";",
"worldObj",
".",
"removeBlockTileEntity",
"(",
"xCoord",
",",
"yCoord",
",",
"zCoord",
")",
";",
"invalidate",
"(",
")",
";",
"if",
"(",
"worldObj",
".",
"getBlockId",
"(",
"xCoord",
",",
"yCoord",
",",
"zCoord",
")",
"==",
"Block",
".",
"pistonMoving",
".",
"blockID",
")",
"{",
"worldObj",
".",
"setBlockAndMetadataWithNotify",
"(",
"xCoord",
",",
"yCoord",
",",
"zCoord",
",",
"storedBlockID",
",",
"storedMetadata",
")",
";",
"}",
"return",
";",
"}",
"progress",
"+=",
"0.5F",
";",
"if",
"(",
"progress",
">=",
"1.0F",
")",
"{",
"progress",
"=",
"1.0F",
";",
"}",
"if",
"(",
"extending",
")",
"{",
"updatePushedObjects",
"(",
"progress",
",",
"(",
"progress",
"-",
"lastProgress",
")",
"+",
"0.0625F",
")",
";",
"}",
"}",
"public",
"void",
"readFromNBT",
"(",
"NBTTagCompound",
"par1NBTTagCompound",
")",
"{",
"super",
".",
"readFromNBT",
"(",
"par1NBTTagCompound",
")",
";",
"storedBlockID",
"=",
"par1NBTTagCompound",
".",
"getInteger",
"(",
"\"blockId\"",
")",
";",
"storedMetadata",
"=",
"par1NBTTagCompound",
".",
"getInteger",
"(",
"\"blockData\"",
")",
";",
"storedOrientation",
"=",
"par1NBTTagCompound",
".",
"getInteger",
"(",
"\"facing\"",
")",
";",
"lastProgress",
"=",
"progress",
"=",
"par1NBTTagCompound",
".",
"getFloat",
"(",
"\"progress\"",
")",
";",
"extending",
"=",
"par1NBTTagCompound",
".",
"getBoolean",
"(",
"\"extending\"",
")",
";",
"}",
"public",
"void",
"writeToNBT",
"(",
"NBTTagCompound",
"par1NBTTagCompound",
")",
"{",
"super",
".",
"writeToNBT",
"(",
"par1NBTTagCompound",
")",
";",
"par1NBTTagCompound",
".",
"setInteger",
"(",
"\"blockId\"",
",",
"storedBlockID",
")",
";",
"par1NBTTagCompound",
".",
"setInteger",
"(",
"\"blockData\"",
",",
"storedMetadata",
")",
";",
"par1NBTTagCompound",
".",
"setInteger",
"(",
"\"facing\"",
",",
"storedOrientation",
")",
";",
"par1NBTTagCompound",
".",
"setFloat",
"(",
"\"progress\"",
",",
"lastProgress",
")",
";",
"par1NBTTagCompound",
".",
"setBoolean",
"(",
"\"extending\"",
",",
"extending",
")",
";",
"}",
"}",
"</s>"
] |
9,528 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"class",
"GenLayerZoom",
"extends",
"GenLayer",
"{",
"public",
"GenLayerZoom",
"(",
"long",
"par1",
",",
"GenLayer",
"par3GenLayer",
")",
"{",
"super",
"(",
"par1",
")",
";",
"super",
".",
"parent",
"=",
"par3GenLayer",
";",
"}",
"public",
"int",
"[",
"]",
"getInts",
"(",
"int",
"par1",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"int",
"i",
"=",
"par1",
">>",
"1",
";",
"int",
"j",
"=",
"par2",
">>",
"1",
";",
"int",
"k",
"=",
"(",
"par3",
">>",
"1",
")",
"+",
"3",
";",
"int",
"l",
"=",
"(",
"par4",
">>",
"1",
")",
"+",
"3",
";",
"int",
"ai",
"[",
"]",
"=",
"parent",
".",
"getInts",
"(",
"i",
",",
"j",
",",
"k",
",",
"l",
")",
";",
"int",
"ai1",
"[",
"]",
"=",
"IntCache",
".",
"getIntCache",
"(",
"k",
"*",
"2",
"*",
"(",
"l",
"*",
"2",
")",
")",
";",
"int",
"i1",
"=",
"k",
"<<",
"1",
";",
"for",
"(",
"int",
"j1",
"=",
"0",
";",
"j1",
"<",
"l",
"-",
"1",
";",
"j1",
"++",
")",
"{",
"int",
"k1",
"=",
"j1",
"<<",
"1",
";",
"int",
"i2",
"=",
"k1",
"*",
"i1",
";",
"int",
"j2",
"=",
"ai",
"[",
"0",
"+",
"(",
"j1",
"+",
"0",
")",
"*",
"k",
"]",
";",
"int",
"k2",
"=",
"ai",
"[",
"0",
"+",
"(",
"j1",
"+",
"1",
")",
"*",
"k",
"]",
";",
"for",
"(",
"int",
"l2",
"=",
"0",
";",
"l2",
"<",
"k",
"-",
"1",
";",
"l2",
"++",
")",
"{",
"initChunkSeed",
"(",
"l2",
"+",
"i",
"<<",
"1",
",",
"j1",
"+",
"j",
"<<",
"1",
")",
";",
"int",
"i3",
"=",
"ai",
"[",
"l2",
"+",
"1",
"+",
"(",
"j1",
"+",
"0",
")",
"*",
"k",
"]",
";",
"int",
"j3",
"=",
"ai",
"[",
"l2",
"+",
"1",
"+",
"(",
"j1",
"+",
"1",
")",
"*",
"k",
"]",
";",
"ai1",
"[",
"i2",
"]",
"=",
"j2",
";",
"ai1",
"[",
"i2",
"++",
"+",
"i1",
"]",
"=",
"choose",
"(",
"j2",
",",
"k2",
")",
";",
"ai1",
"[",
"i2",
"]",
"=",
"choose",
"(",
"j2",
",",
"i3",
")",
";",
"ai1",
"[",
"i2",
"++",
"+",
"i1",
"]",
"=",
"func_35024_b",
"(",
"j2",
",",
"i3",
",",
"k2",
",",
"j3",
")",
";",
"j2",
"=",
"i3",
";",
"k2",
"=",
"j3",
";",
"}",
"}",
"int",
"ai2",
"[",
"]",
"=",
"IntCache",
".",
"getIntCache",
"(",
"par3",
"*",
"par4",
")",
";",
"for",
"(",
"int",
"l1",
"=",
"0",
";",
"l1",
"<",
"par4",
";",
"l1",
"++",
")",
"{",
"System",
".",
"arraycopy",
"(",
"ai1",
",",
"(",
"l1",
"+",
"(",
"par2",
"&",
"1",
")",
")",
"*",
"(",
"k",
"<<",
"1",
")",
"+",
"(",
"par1",
"&",
"1",
")",
",",
"ai2",
",",
"l1",
"*",
"par3",
",",
"par3",
")",
";",
"}",
"return",
"ai2",
";",
"}",
"protected",
"int",
"choose",
"(",
"int",
"par1",
",",
"int",
"par2",
")",
"{",
"return",
"nextInt",
"(",
"2",
")",
"!=",
"0",
"?",
"par2",
":",
"par1",
";",
"}",
"protected",
"int",
"func_35024_b",
"(",
"int",
"par1",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"if",
"(",
"par2",
"==",
"par3",
"&&",
"par3",
"==",
"par4",
")",
"{",
"return",
"par2",
";",
"}",
"if",
"(",
"par1",
"==",
"par2",
"&&",
"par1",
"==",
"par3",
")",
"{",
"return",
"par1",
";",
"}",
"if",
"(",
"par1",
"==",
"par2",
"&&",
"par1",
"==",
"par4",
")",
"{",
"return",
"par1",
";",
"}",
"if",
"(",
"par1",
"==",
"par3",
"&&",
"par1",
"==",
"par4",
")",
"{",
"return",
"par1",
";",
"}",
"if",
"(",
"par1",
"==",
"par2",
"&&",
"par3",
"!=",
"par4",
")",
"{",
"return",
"par1",
";",
"}",
"if",
"(",
"par1",
"==",
"par3",
"&&",
"par2",
"!=",
"par4",
")",
"{",
"return",
"par1",
";",
"}",
"if",
"(",
"par1",
"==",
"par4",
"&&",
"par2",
"!=",
"par3",
")",
"{",
"return",
"par1",
";",
"}",
"if",
"(",
"par2",
"==",
"par1",
"&&",
"par3",
"!=",
"par4",
")",
"{",
"return",
"par2",
";",
"}",
"if",
"(",
"par2",
"==",
"par3",
"&&",
"par1",
"!=",
"par4",
")",
"{",
"return",
"par2",
";",
"}",
"if",
"(",
"par2",
"==",
"par4",
"&&",
"par1",
"!=",
"par3",
")",
"{",
"return",
"par2",
";",
"}",
"if",
"(",
"par3",
"==",
"par1",
"&&",
"par2",
"!=",
"par4",
")",
"{",
"return",
"par3",
";",
"}",
"if",
"(",
"par3",
"==",
"par2",
"&&",
"par1",
"!=",
"par4",
")",
"{",
"return",
"par3",
";",
"}",
"if",
"(",
"par3",
"==",
"par4",
"&&",
"par1",
"!=",
"par2",
")",
"{",
"return",
"par3",
";",
"}",
"if",
"(",
"par4",
"==",
"par1",
"&&",
"par2",
"!=",
"par3",
")",
"{",
"return",
"par3",
";",
"}",
"if",
"(",
"par4",
"==",
"par2",
"&&",
"par1",
"!=",
"par3",
")",
"{",
"return",
"par3",
";",
"}",
"if",
"(",
"par4",
"==",
"par3",
"&&",
"par1",
"!=",
"par2",
")",
"{",
"return",
"par3",
";",
"}",
"int",
"i",
"=",
"nextInt",
"(",
"4",
")",
";",
"if",
"(",
"i",
"==",
"0",
")",
"{",
"return",
"par1",
";",
"}",
"if",
"(",
"i",
"==",
"1",
")",
"{",
"return",
"par2",
";",
"}",
"if",
"(",
"i",
"==",
"2",
")",
"{",
"return",
"par3",
";",
"}",
"else",
"{",
"return",
"par4",
";",
"}",
"}",
"public",
"static",
"GenLayer",
"func_35025_a",
"(",
"long",
"par0",
",",
"GenLayer",
"par2GenLayer",
",",
"int",
"par3",
")",
"{",
"Object",
"obj",
"=",
"par2GenLayer",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"par3",
";",
"i",
"++",
")",
"{",
"obj",
"=",
"new",
"GenLayerZoom",
"(",
"par0",
"+",
"(",
"long",
")",
"i",
",",
"(",
"(",
"GenLayer",
")",
"(",
"obj",
")",
")",
")",
";",
"}",
"return",
"(",
"(",
"GenLayer",
")",
"(",
"obj",
")",
")",
";",
"}",
"}",
"</s>"
] |
9,529 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"BlockOre",
"extends",
"Block",
"{",
"public",
"BlockOre",
"(",
"int",
"par1",
",",
"int",
"par2",
")",
"{",
"super",
"(",
"par1",
",",
"par2",
",",
"Material",
".",
"rock",
")",
";",
"}",
"public",
"int",
"idDropped",
"(",
"int",
"par1",
",",
"Random",
"par2Random",
",",
"int",
"par3",
")",
"{",
"if",
"(",
"blockID",
"==",
"Block",
".",
"oreCoal",
".",
"blockID",
")",
"{",
"return",
"Item",
".",
"coal",
".",
"shiftedIndex",
";",
"}",
"if",
"(",
"blockID",
"==",
"Block",
".",
"oreDiamond",
".",
"blockID",
")",
"{",
"return",
"Item",
".",
"diamond",
".",
"shiftedIndex",
";",
"}",
"if",
"(",
"blockID",
"==",
"Block",
".",
"oreLapis",
".",
"blockID",
")",
"{",
"return",
"Item",
".",
"dyePowder",
".",
"shiftedIndex",
";",
"}",
"else",
"{",
"return",
"blockID",
";",
"}",
"}",
"public",
"int",
"quantityDropped",
"(",
"Random",
"par1Random",
")",
"{",
"if",
"(",
"blockID",
"==",
"Block",
".",
"oreLapis",
".",
"blockID",
")",
"{",
"return",
"4",
"+",
"par1Random",
".",
"nextInt",
"(",
"5",
")",
";",
"}",
"else",
"{",
"return",
"1",
";",
"}",
"}",
"public",
"int",
"quantityDroppedWithBonus",
"(",
"int",
"par1",
",",
"Random",
"par2Random",
")",
"{",
"if",
"(",
"par1",
">",
"0",
"&&",
"blockID",
"!=",
"idDropped",
"(",
"0",
",",
"par2Random",
",",
"par1",
")",
")",
"{",
"int",
"i",
"=",
"par2Random",
".",
"nextInt",
"(",
"par1",
"+",
"2",
")",
"-",
"1",
";",
"if",
"(",
"i",
"<",
"0",
")",
"{",
"i",
"=",
"0",
";",
"}",
"return",
"quantityDropped",
"(",
"par2Random",
")",
"*",
"(",
"i",
"+",
"1",
")",
";",
"}",
"else",
"{",
"return",
"quantityDropped",
"(",
"par2Random",
")",
";",
"}",
"}",
"protected",
"int",
"damageDropped",
"(",
"int",
"par1",
")",
"{",
"return",
"blockID",
"!=",
"Block",
".",
"oreLapis",
".",
"blockID",
"?",
"0",
":",
"4",
";",
"}",
"}",
"</s>"
] |
9,530 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"class",
"ItemMetadata",
"extends",
"ItemBlock",
"{",
"private",
"Block",
"blockObj",
";",
"public",
"ItemMetadata",
"(",
"int",
"par1",
",",
"Block",
"par2Block",
")",
"{",
"super",
"(",
"par1",
")",
";",
"blockObj",
"=",
"par2Block",
";",
"setMaxDamage",
"(",
"0",
")",
";",
"setHasSubtypes",
"(",
"true",
")",
";",
"}",
"public",
"int",
"getMetadata",
"(",
"int",
"par1",
")",
"{",
"return",
"par1",
";",
"}",
"}",
"</s>"
] |
9,531 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"abstract",
"class",
"ComponentVillage",
"extends",
"StructureComponent",
"{",
"private",
"int",
"villagersSpawned",
";",
"protected",
"ComponentVillage",
"(",
"int",
"par1",
")",
"{",
"super",
"(",
"par1",
")",
";",
"}",
"protected",
"StructureComponent",
"getNextComponentNN",
"(",
"ComponentVillageStartPiece",
"par1ComponentVillageStartPiece",
",",
"List",
"par2List",
",",
"Random",
"par3Random",
",",
"int",
"par4",
",",
"int",
"par5",
")",
"{",
"switch",
"(",
"coordBaseMode",
")",
"{",
"case",
"2",
":",
"return",
"StructureVillagePieces",
".",
"getNextStructureComponent",
"(",
"par1ComponentVillageStartPiece",
",",
"par2List",
",",
"par3Random",
",",
"boundingBox",
".",
"minX",
"-",
"1",
",",
"boundingBox",
".",
"minY",
"+",
"par4",
",",
"boundingBox",
".",
"minZ",
"+",
"par5",
",",
"1",
",",
"getComponentType",
"(",
")",
")",
";",
"case",
"0",
":",
"return",
"StructureVillagePieces",
".",
"getNextStructureComponent",
"(",
"par1ComponentVillageStartPiece",
",",
"par2List",
",",
"par3Random",
",",
"boundingBox",
".",
"minX",
"-",
"1",
",",
"boundingBox",
".",
"minY",
"+",
"par4",
",",
"boundingBox",
".",
"minZ",
"+",
"par5",
",",
"1",
",",
"getComponentType",
"(",
")",
")",
";",
"case",
"1",
":",
"return",
"StructureVillagePieces",
".",
"getNextStructureComponent",
"(",
"par1ComponentVillageStartPiece",
",",
"par2List",
",",
"par3Random",
",",
"boundingBox",
".",
"minX",
"+",
"par5",
",",
"boundingBox",
".",
"minY",
"+",
"par4",
",",
"boundingBox",
".",
"minZ",
"-",
"1",
",",
"2",
",",
"getComponentType",
"(",
")",
")",
";",
"case",
"3",
":",
"return",
"StructureVillagePieces",
".",
"getNextStructureComponent",
"(",
"par1ComponentVillageStartPiece",
",",
"par2List",
",",
"par3Random",
",",
"boundingBox",
".",
"minX",
"+",
"par5",
",",
"boundingBox",
".",
"minY",
"+",
"par4",
",",
"boundingBox",
".",
"minZ",
"-",
"1",
",",
"2",
",",
"getComponentType",
"(",
")",
")",
";",
"}",
"return",
"null",
";",
"}",
"protected",
"StructureComponent",
"getNextComponentPP",
"(",
"ComponentVillageStartPiece",
"par1ComponentVillageStartPiece",
",",
"List",
"par2List",
",",
"Random",
"par3Random",
",",
"int",
"par4",
",",
"int",
"par5",
")",
"{",
"switch",
"(",
"coordBaseMode",
")",
"{",
"case",
"2",
":",
"return",
"StructureVillagePieces",
".",
"getNextStructureComponent",
"(",
"par1ComponentVillageStartPiece",
",",
"par2List",
",",
"par3Random",
",",
"boundingBox",
".",
"maxX",
"+",
"1",
",",
"boundingBox",
".",
"minY",
"+",
"par4",
",",
"boundingBox",
".",
"minZ",
"+",
"par5",
",",
"3",
",",
"getComponentType",
"(",
")",
")",
";",
"case",
"0",
":",
"return",
"StructureVillagePieces",
".",
"getNextStructureComponent",
"(",
"par1ComponentVillageStartPiece",
",",
"par2List",
",",
"par3Random",
",",
"boundingBox",
".",
"maxX",
"+",
"1",
",",
"boundingBox",
".",
"minY",
"+",
"par4",
",",
"boundingBox",
".",
"minZ",
"+",
"par5",
",",
"3",
",",
"getComponentType",
"(",
")",
")",
";",
"case",
"1",
":",
"return",
"StructureVillagePieces",
".",
"getNextStructureComponent",
"(",
"par1ComponentVillageStartPiece",
",",
"par2List",
",",
"par3Random",
",",
"boundingBox",
".",
"minX",
"+",
"par5",
",",
"boundingBox",
".",
"minY",
"+",
"par4",
",",
"boundingBox",
".",
"maxZ",
"+",
"1",
",",
"0",
",",
"getComponentType",
"(",
")",
")",
";",
"case",
"3",
":",
"return",
"StructureVillagePieces",
".",
"getNextStructureComponent",
"(",
"par1ComponentVillageStartPiece",
",",
"par2List",
",",
"par3Random",
",",
"boundingBox",
".",
"minX",
"+",
"par5",
",",
"boundingBox",
".",
"minY",
"+",
"par4",
",",
"boundingBox",
".",
"maxZ",
"+",
"1",
",",
"0",
",",
"getComponentType",
"(",
")",
")",
";",
"}",
"return",
"null",
";",
"}",
"protected",
"int",
"getAverageGroundLevel",
"(",
"World",
"par1World",
",",
"StructureBoundingBox",
"par2StructureBoundingBox",
")",
"{",
"int",
"i",
"=",
"0",
";",
"int",
"j",
"=",
"0",
";",
"for",
"(",
"int",
"k",
"=",
"boundingBox",
".",
"minZ",
";",
"k",
"<=",
"boundingBox",
".",
"maxZ",
";",
"k",
"++",
")",
"{",
"for",
"(",
"int",
"l",
"=",
"boundingBox",
".",
"minX",
";",
"l",
"<=",
"boundingBox",
".",
"maxX",
";",
"l",
"++",
")",
"{",
"if",
"(",
"par2StructureBoundingBox",
".",
"isVecInside",
"(",
"l",
",",
"64",
",",
"k",
")",
")",
"{",
"i",
"+=",
"Math",
".",
"max",
"(",
"par1World",
".",
"getTopSolidOrLiquidBlock",
"(",
"l",
",",
"k",
")",
",",
"par1World",
".",
"worldProvider",
".",
"getAverageGroundLevel",
"(",
")",
")",
";",
"j",
"++",
";",
"}",
"}",
"}",
"if",
"(",
"j",
"==",
"0",
")",
"{",
"return",
"-",
"1",
";",
"}",
"else",
"{",
"return",
"i",
"/",
"j",
";",
"}",
"}",
"protected",
"static",
"boolean",
"canVillageGoDeeper",
"(",
"StructureBoundingBox",
"par0StructureBoundingBox",
")",
"{",
"return",
"par0StructureBoundingBox",
"!=",
"null",
"&&",
"par0StructureBoundingBox",
".",
"minY",
">",
"10",
";",
"}",
"protected",
"void",
"spawnVillagers",
"(",
"World",
"par1World",
",",
"StructureBoundingBox",
"par2StructureBoundingBox",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
",",
"int",
"par6",
")",
"{",
"if",
"(",
"villagersSpawned",
">=",
"par6",
")",
"{",
"return",
";",
"}",
"int",
"i",
"=",
"villagersSpawned",
";",
"do",
"{",
"if",
"(",
"i",
">=",
"par6",
")",
"{",
"break",
";",
"}",
"int",
"j",
"=",
"getXWithOffset",
"(",
"par3",
"+",
"i",
",",
"par5",
")",
";",
"int",
"k",
"=",
"getYWithOffset",
"(",
"par4",
")",
";",
"int",
"l",
"=",
"getZWithOffset",
"(",
"par3",
"+",
"i",
",",
"par5",
")",
";",
"if",
"(",
"!",
"par2StructureBoundingBox",
".",
"isVecInside",
"(",
"j",
",",
"k",
",",
"l",
")",
")",
"{",
"break",
";",
"}",
"villagersSpawned",
"++",
";",
"EntityVillager",
"entityvillager",
"=",
"new",
"EntityVillager",
"(",
"par1World",
",",
"getVillagerType",
"(",
"i",
")",
")",
";",
"entityvillager",
".",
"setLocationAndAngles",
"(",
"(",
"double",
")",
"j",
"+",
"0.5D",
",",
"k",
",",
"(",
"double",
")",
"l",
"+",
"0.5D",
",",
"0.0F",
",",
"0.0F",
")",
";",
"par1World",
".",
"spawnEntityInWorld",
"(",
"entityvillager",
")",
";",
"i",
"++",
";",
"}",
"while",
"(",
"true",
")",
";",
"}",
"protected",
"int",
"getVillagerType",
"(",
"int",
"par1",
")",
"{",
"return",
"0",
";",
"}",
"}",
"</s>"
] |
9,532 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"final",
"class",
"MaterialWeb",
"extends",
"Material",
"{",
"MaterialWeb",
"(",
"MapColor",
"par1MapColor",
")",
"{",
"super",
"(",
"par1MapColor",
")",
";",
"}",
"public",
"boolean",
"blocksMovement",
"(",
")",
"{",
"return",
"false",
";",
"}",
"}",
"</s>"
] |
9,533 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"class",
"EntityPig",
"extends",
"EntityAnimal",
"{",
"public",
"EntityPig",
"(",
"World",
"par1World",
")",
"{",
"super",
"(",
"par1World",
")",
";",
"texture",
"=",
"\"/mob/pig.png\"",
";",
"setSize",
"(",
"0.9F",
",",
"0.9F",
")",
";",
"getNavigator",
"(",
")",
".",
"func_48656_a",
"(",
"true",
")",
";",
"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",
"10",
";",
"}",
"protected",
"void",
"entityInit",
"(",
")",
"{",
"super",
".",
"entityInit",
"(",
")",
";",
"dataWatcher",
".",
"addObject",
"(",
"16",
",",
"Byte",
".",
"valueOf",
"(",
"(",
"byte",
")",
"0",
")",
")",
";",
"}",
"public",
"void",
"writeEntityToNBT",
"(",
"NBTTagCompound",
"par1NBTTagCompound",
")",
"{",
"super",
".",
"writeEntityToNBT",
"(",
"par1NBTTagCompound",
")",
";",
"par1NBTTagCompound",
".",
"setBoolean",
"(",
"\"Saddle\"",
",",
"getSaddled",
"(",
")",
")",
";",
"}",
"public",
"void",
"readEntityFromNBT",
"(",
"NBTTagCompound",
"par1NBTTagCompound",
")",
"{",
"super",
".",
"readEntityFromNBT",
"(",
"par1NBTTagCompound",
")",
";",
"setSaddled",
"(",
"par1NBTTagCompound",
".",
"getBoolean",
"(",
"\"Saddle\"",
")",
")",
";",
"}",
"protected",
"String",
"getLivingSound",
"(",
")",
"{",
"return",
"\"mob.pig\"",
";",
"}",
"protected",
"String",
"getHurtSound",
"(",
")",
"{",
"return",
"\"mob.pig\"",
";",
"}",
"protected",
"String",
"getDeathSound",
"(",
")",
"{",
"return",
"\"mob.pigdeath\"",
";",
"}",
"public",
"boolean",
"interact",
"(",
"EntityPlayer",
"par1EntityPlayer",
")",
"{",
"if",
"(",
"!",
"super",
".",
"interact",
"(",
"par1EntityPlayer",
")",
")",
"{",
"if",
"(",
"getSaddled",
"(",
")",
"&&",
"!",
"worldObj",
".",
"isRemote",
"&&",
"(",
"riddenByEntity",
"==",
"null",
"||",
"riddenByEntity",
"==",
"par1EntityPlayer",
")",
")",
"{",
"par1EntityPlayer",
".",
"mountEntity",
"(",
"this",
")",
";",
"return",
"true",
";",
"}",
"else",
"{",
"return",
"false",
";",
"}",
"}",
"else",
"{",
"return",
"true",
";",
"}",
"}",
"protected",
"int",
"getDropItemId",
"(",
")",
"{",
"if",
"(",
"isBurning",
"(",
")",
")",
"{",
"return",
"Item",
".",
"porkCooked",
".",
"shiftedIndex",
";",
"}",
"else",
"{",
"return",
"Item",
".",
"porkRaw",
".",
"shiftedIndex",
";",
"}",
"}",
"public",
"boolean",
"getSaddled",
"(",
")",
"{",
"return",
"(",
"dataWatcher",
".",
"getWatchableObjectByte",
"(",
"16",
")",
"&",
"1",
")",
"!=",
"0",
";",
"}",
"public",
"void",
"setSaddled",
"(",
"boolean",
"par1",
")",
"{",
"if",
"(",
"par1",
")",
"{",
"dataWatcher",
".",
"updateObject",
"(",
"16",
",",
"Byte",
".",
"valueOf",
"(",
"(",
"byte",
")",
"1",
")",
")",
";",
"}",
"else",
"{",
"dataWatcher",
".",
"updateObject",
"(",
"16",
",",
"Byte",
".",
"valueOf",
"(",
"(",
"byte",
")",
"0",
")",
")",
";",
"}",
"}",
"public",
"void",
"onStruckByLightning",
"(",
"EntityLightningBolt",
"par1EntityLightningBolt",
")",
"{",
"if",
"(",
"worldObj",
".",
"isRemote",
")",
"{",
"return",
";",
"}",
"else",
"{",
"EntityPigZombie",
"entitypigzombie",
"=",
"new",
"EntityPigZombie",
"(",
"worldObj",
")",
";",
"entitypigzombie",
".",
"setLocationAndAngles",
"(",
"posX",
",",
"posY",
",",
"posZ",
",",
"rotationYaw",
",",
"rotationPitch",
")",
";",
"worldObj",
".",
"spawnEntityInWorld",
"(",
"entitypigzombie",
")",
";",
"setDead",
"(",
")",
";",
"return",
";",
"}",
"}",
"protected",
"void",
"fall",
"(",
"float",
"par1",
")",
"{",
"super",
".",
"fall",
"(",
"par1",
")",
";",
"if",
"(",
"par1",
">",
"5F",
"&&",
"(",
"riddenByEntity",
"instanceof",
"EntityPlayer",
")",
")",
"{",
"(",
"(",
"EntityPlayer",
")",
"riddenByEntity",
")",
".",
"triggerAchievement",
"(",
"AchievementList",
".",
"flyPig",
")",
";",
"}",
"}",
"public",
"EntityAnimal",
"spawnBabyAnimal",
"(",
"EntityAnimal",
"par1EntityAnimal",
")",
"{",
"return",
"new",
"EntityPig",
"(",
"worldObj",
")",
";",
"}",
"}",
"</s>"
] |
9,534 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"interface",
"IThreadedFileIO",
"{",
"public",
"abstract",
"boolean",
"writeNextIO",
"(",
")",
";",
"}",
"</s>"
] |
9,535 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"abstract",
"class",
"EntityTameable",
"extends",
"EntityAnimal",
"{",
"protected",
"EntityAISit",
"aiSit",
";",
"public",
"EntityTameable",
"(",
"World",
"par1World",
")",
"{",
"super",
"(",
"par1World",
")",
";",
"aiSit",
"=",
"new",
"EntityAISit",
"(",
"this",
")",
";",
"}",
"protected",
"void",
"entityInit",
"(",
")",
"{",
"super",
".",
"entityInit",
"(",
")",
";",
"dataWatcher",
".",
"addObject",
"(",
"16",
",",
"Byte",
".",
"valueOf",
"(",
"(",
"byte",
")",
"0",
")",
")",
";",
"dataWatcher",
".",
"addObject",
"(",
"17",
",",
"\"\"",
")",
";",
"}",
"public",
"void",
"writeEntityToNBT",
"(",
"NBTTagCompound",
"par1NBTTagCompound",
")",
"{",
"super",
".",
"writeEntityToNBT",
"(",
"par1NBTTagCompound",
")",
";",
"if",
"(",
"getOwnerName",
"(",
")",
"==",
"null",
")",
"{",
"par1NBTTagCompound",
".",
"setString",
"(",
"\"Owner\"",
",",
"\"\"",
")",
";",
"}",
"else",
"{",
"par1NBTTagCompound",
".",
"setString",
"(",
"\"Owner\"",
",",
"getOwnerName",
"(",
")",
")",
";",
"}",
"par1NBTTagCompound",
".",
"setBoolean",
"(",
"\"Sitting\"",
",",
"isSitting",
"(",
")",
")",
";",
"}",
"public",
"void",
"readEntityFromNBT",
"(",
"NBTTagCompound",
"par1NBTTagCompound",
")",
"{",
"super",
".",
"readEntityFromNBT",
"(",
"par1NBTTagCompound",
")",
";",
"String",
"s",
"=",
"par1NBTTagCompound",
".",
"getString",
"(",
"\"Owner\"",
")",
";",
"if",
"(",
"s",
".",
"length",
"(",
")",
">",
"0",
")",
"{",
"setOwner",
"(",
"s",
")",
";",
"setTamed",
"(",
"true",
")",
";",
"}",
"aiSit",
".",
"func_48210_a",
"(",
"par1NBTTagCompound",
".",
"getBoolean",
"(",
"\"Sitting\"",
")",
")",
";",
"}",
"protected",
"void",
"func_48370_a",
"(",
"boolean",
"par1",
")",
"{",
"String",
"s",
"=",
"\"heart\"",
";",
"if",
"(",
"!",
"par1",
")",
"{",
"s",
"=",
"\"smoke\"",
";",
"}",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"7",
";",
"i",
"++",
")",
"{",
"double",
"d",
"=",
"rand",
".",
"nextGaussian",
"(",
")",
"*",
"0.02D",
";",
"double",
"d1",
"=",
"rand",
".",
"nextGaussian",
"(",
")",
"*",
"0.02D",
";",
"double",
"d2",
"=",
"rand",
".",
"nextGaussian",
"(",
")",
"*",
"0.02D",
";",
"worldObj",
".",
"spawnParticle",
"(",
"s",
",",
"(",
"posX",
"+",
"(",
"double",
")",
"(",
"rand",
".",
"nextFloat",
"(",
")",
"*",
"width",
"*",
"2.0F",
")",
")",
"-",
"(",
"double",
")",
"width",
",",
"posY",
"+",
"0.5D",
"+",
"(",
"double",
")",
"(",
"rand",
".",
"nextFloat",
"(",
")",
"*",
"height",
")",
",",
"(",
"posZ",
"+",
"(",
"double",
")",
"(",
"rand",
".",
"nextFloat",
"(",
")",
"*",
"width",
"*",
"2.0F",
")",
")",
"-",
"(",
"double",
")",
"width",
",",
"d",
",",
"d1",
",",
"d2",
")",
";",
"}",
"}",
"public",
"boolean",
"isTamed",
"(",
")",
"{",
"return",
"(",
"dataWatcher",
".",
"getWatchableObjectByte",
"(",
"16",
")",
"&",
"4",
")",
"!=",
"0",
";",
"}",
"public",
"void",
"setTamed",
"(",
"boolean",
"par1",
")",
"{",
"byte",
"byte0",
"=",
"dataWatcher",
".",
"getWatchableObjectByte",
"(",
"16",
")",
";",
"if",
"(",
"par1",
")",
"{",
"dataWatcher",
".",
"updateObject",
"(",
"16",
",",
"Byte",
".",
"valueOf",
"(",
"(",
"byte",
")",
"(",
"byte0",
"|",
"4",
")",
")",
")",
";",
"}",
"else",
"{",
"dataWatcher",
".",
"updateObject",
"(",
"16",
",",
"Byte",
".",
"valueOf",
"(",
"(",
"byte",
")",
"(",
"byte0",
"&",
"-",
"5",
")",
")",
")",
";",
"}",
"}",
"public",
"boolean",
"isSitting",
"(",
")",
"{",
"return",
"(",
"dataWatcher",
".",
"getWatchableObjectByte",
"(",
"16",
")",
"&",
"1",
")",
"!=",
"0",
";",
"}",
"public",
"void",
"func_48369_c",
"(",
"boolean",
"par1",
")",
"{",
"byte",
"byte0",
"=",
"dataWatcher",
".",
"getWatchableObjectByte",
"(",
"16",
")",
";",
"if",
"(",
"par1",
")",
"{",
"dataWatcher",
".",
"updateObject",
"(",
"16",
",",
"Byte",
".",
"valueOf",
"(",
"(",
"byte",
")",
"(",
"byte0",
"|",
"1",
")",
")",
")",
";",
"}",
"else",
"{",
"dataWatcher",
".",
"updateObject",
"(",
"16",
",",
"Byte",
".",
"valueOf",
"(",
"(",
"byte",
")",
"(",
"byte0",
"&",
"-",
"2",
")",
")",
")",
";",
"}",
"}",
"public",
"String",
"getOwnerName",
"(",
")",
"{",
"return",
"dataWatcher",
".",
"getWatchableObjectString",
"(",
"17",
")",
";",
"}",
"public",
"void",
"setOwner",
"(",
"String",
"par1Str",
")",
"{",
"dataWatcher",
".",
"updateObject",
"(",
"17",
",",
"par1Str",
")",
";",
"}",
"public",
"EntityLiving",
"getOwner",
"(",
")",
"{",
"return",
"worldObj",
".",
"getPlayerEntityByName",
"(",
"getOwnerName",
"(",
")",
")",
";",
"}",
"public",
"EntityAISit",
"func_50021_C",
"(",
")",
"{",
"return",
"aiSit",
";",
"}",
"}",
"</s>"
] |
9,536 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"class",
"LongHashMap",
"{",
"private",
"transient",
"LongHashMapEntry",
"hashArray",
"[",
"]",
";",
"private",
"transient",
"int",
"numHashElements",
";",
"private",
"int",
"capacity",
";",
"private",
"final",
"float",
"percentUseable",
"=",
"0.75F",
";",
"private",
"volatile",
"transient",
"int",
"modCount",
";",
"public",
"LongHashMap",
"(",
")",
"{",
"capacity",
"=",
"12",
";",
"hashArray",
"=",
"new",
"LongHashMapEntry",
"[",
"16",
"]",
";",
"}",
"private",
"static",
"int",
"getHashedKey",
"(",
"long",
"par0",
")",
"{",
"return",
"hash",
"(",
"(",
"int",
")",
"(",
"par0",
"^",
"par0",
">>>",
"32",
")",
")",
";",
"}",
"private",
"static",
"int",
"hash",
"(",
"int",
"par0",
")",
"{",
"par0",
"^=",
"par0",
">>>",
"20",
"^",
"par0",
">>>",
"12",
";",
"return",
"par0",
"^",
"par0",
">>>",
"7",
"^",
"par0",
">>>",
"4",
";",
"}",
"private",
"static",
"int",
"getHashIndex",
"(",
"int",
"par0",
",",
"int",
"par1",
")",
"{",
"return",
"par0",
"&",
"par1",
"-",
"1",
";",
"}",
"public",
"int",
"getNumHashElements",
"(",
")",
"{",
"return",
"numHashElements",
";",
"}",
"public",
"Object",
"getValueByKey",
"(",
"long",
"par1",
")",
"{",
"int",
"i",
"=",
"getHashedKey",
"(",
"par1",
")",
";",
"for",
"(",
"LongHashMapEntry",
"longhashmapentry",
"=",
"hashArray",
"[",
"getHashIndex",
"(",
"i",
",",
"hashArray",
".",
"length",
")",
"]",
";",
"longhashmapentry",
"!=",
"null",
";",
"longhashmapentry",
"=",
"longhashmapentry",
".",
"nextEntry",
")",
"{",
"if",
"(",
"longhashmapentry",
".",
"key",
"==",
"par1",
")",
"{",
"return",
"longhashmapentry",
".",
"value",
";",
"}",
"}",
"return",
"null",
";",
"}",
"public",
"boolean",
"containsItem",
"(",
"long",
"par1",
")",
"{",
"return",
"getEntry",
"(",
"par1",
")",
"!=",
"null",
";",
"}",
"final",
"LongHashMapEntry",
"getEntry",
"(",
"long",
"par1",
")",
"{",
"int",
"i",
"=",
"getHashedKey",
"(",
"par1",
")",
";",
"for",
"(",
"LongHashMapEntry",
"longhashmapentry",
"=",
"hashArray",
"[",
"getHashIndex",
"(",
"i",
",",
"hashArray",
".",
"length",
")",
"]",
";",
"longhashmapentry",
"!=",
"null",
";",
"longhashmapentry",
"=",
"longhashmapentry",
".",
"nextEntry",
")",
"{",
"if",
"(",
"longhashmapentry",
".",
"key",
"==",
"par1",
")",
"{",
"return",
"longhashmapentry",
";",
"}",
"}",
"return",
"null",
";",
"}",
"public",
"void",
"add",
"(",
"long",
"par1",
",",
"Object",
"par3Obj",
")",
"{",
"int",
"i",
"=",
"getHashedKey",
"(",
"par1",
")",
";",
"int",
"j",
"=",
"getHashIndex",
"(",
"i",
",",
"hashArray",
".",
"length",
")",
";",
"for",
"(",
"LongHashMapEntry",
"longhashmapentry",
"=",
"hashArray",
"[",
"j",
"]",
";",
"longhashmapentry",
"!=",
"null",
";",
"longhashmapentry",
"=",
"longhashmapentry",
".",
"nextEntry",
")",
"{",
"if",
"(",
"longhashmapentry",
".",
"key",
"==",
"par1",
")",
"{",
"longhashmapentry",
".",
"value",
"=",
"par3Obj",
";",
"}",
"}",
"modCount",
"++",
";",
"createKey",
"(",
"i",
",",
"par1",
",",
"par3Obj",
",",
"j",
")",
";",
"}",
"private",
"void",
"resizeTable",
"(",
"int",
"par1",
")",
"{",
"LongHashMapEntry",
"alonghashmapentry",
"[",
"]",
"=",
"hashArray",
";",
"int",
"i",
"=",
"alonghashmapentry",
".",
"length",
";",
"if",
"(",
"i",
"==",
"0x40000000",
")",
"{",
"capacity",
"=",
"0x7fffffff",
";",
"return",
";",
"}",
"else",
"{",
"LongHashMapEntry",
"alonghashmapentry1",
"[",
"]",
"=",
"new",
"LongHashMapEntry",
"[",
"par1",
"]",
";",
"copyHashTableTo",
"(",
"alonghashmapentry1",
")",
";",
"hashArray",
"=",
"alonghashmapentry1",
";",
"capacity",
"=",
"(",
"int",
")",
"(",
"(",
"float",
")",
"par1",
"*",
"percentUseable",
")",
";",
"return",
";",
"}",
"}",
"private",
"void",
"copyHashTableTo",
"(",
"LongHashMapEntry",
"par1ArrayOfLongHashMapEntry",
"[",
"]",
")",
"{",
"LongHashMapEntry",
"alonghashmapentry",
"[",
"]",
"=",
"hashArray",
";",
"int",
"i",
"=",
"par1ArrayOfLongHashMapEntry",
".",
"length",
";",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
"alonghashmapentry",
".",
"length",
";",
"j",
"++",
")",
"{",
"LongHashMapEntry",
"longhashmapentry",
"=",
"alonghashmapentry",
"[",
"j",
"]",
";",
"if",
"(",
"longhashmapentry",
"==",
"null",
")",
"{",
"continue",
";",
"}",
"alonghashmapentry",
"[",
"j",
"]",
"=",
"null",
";",
"do",
"{",
"LongHashMapEntry",
"longhashmapentry1",
"=",
"longhashmapentry",
".",
"nextEntry",
";",
"int",
"k",
"=",
"getHashIndex",
"(",
"longhashmapentry",
".",
"hash",
",",
"i",
")",
";",
"longhashmapentry",
".",
"nextEntry",
"=",
"par1ArrayOfLongHashMapEntry",
"[",
"k",
"]",
";",
"par1ArrayOfLongHashMapEntry",
"[",
"k",
"]",
"=",
"longhashmapentry",
";",
"longhashmapentry",
"=",
"longhashmapentry1",
";",
"}",
"while",
"(",
"longhashmapentry",
"!=",
"null",
")",
";",
"}",
"}",
"public",
"Object",
"remove",
"(",
"long",
"par1",
")",
"{",
"LongHashMapEntry",
"longhashmapentry",
"=",
"removeKey",
"(",
"par1",
")",
";",
"return",
"longhashmapentry",
"!=",
"null",
"?",
"longhashmapentry",
".",
"value",
":",
"null",
";",
"}",
"final",
"LongHashMapEntry",
"removeKey",
"(",
"long",
"par1",
")",
"{",
"int",
"i",
"=",
"getHashedKey",
"(",
"par1",
")",
";",
"int",
"j",
"=",
"getHashIndex",
"(",
"i",
",",
"hashArray",
".",
"length",
")",
";",
"LongHashMapEntry",
"longhashmapentry",
"=",
"hashArray",
"[",
"j",
"]",
";",
"LongHashMapEntry",
"longhashmapentry1",
";",
"LongHashMapEntry",
"longhashmapentry2",
";",
"for",
"(",
"longhashmapentry1",
"=",
"longhashmapentry",
";",
"longhashmapentry1",
"!=",
"null",
";",
"longhashmapentry1",
"=",
"longhashmapentry2",
")",
"{",
"longhashmapentry2",
"=",
"longhashmapentry1",
".",
"nextEntry",
";",
"if",
"(",
"longhashmapentry1",
".",
"key",
"==",
"par1",
")",
"{",
"modCount",
"++",
";",
"numHashElements",
"--",
";",
"if",
"(",
"longhashmapentry",
"==",
"longhashmapentry1",
")",
"{",
"hashArray",
"[",
"j",
"]",
"=",
"longhashmapentry2",
";",
"}",
"else",
"{",
"longhashmapentry",
".",
"nextEntry",
"=",
"longhashmapentry2",
";",
"}",
"return",
"longhashmapentry1",
";",
"}",
"longhashmapentry",
"=",
"longhashmapentry1",
";",
"}",
"return",
"longhashmapentry1",
";",
"}",
"private",
"void",
"createKey",
"(",
"int",
"par1",
",",
"long",
"par2",
",",
"Object",
"par4Obj",
",",
"int",
"par5",
")",
"{",
"LongHashMapEntry",
"longhashmapentry",
"=",
"hashArray",
"[",
"par5",
"]",
";",
"hashArray",
"[",
"par5",
"]",
"=",
"new",
"LongHashMapEntry",
"(",
"par1",
",",
"par2",
",",
"par4Obj",
",",
"longhashmapentry",
")",
";",
"if",
"(",
"numHashElements",
"++",
">=",
"capacity",
")",
"{",
"resizeTable",
"(",
"2",
"*",
"hashArray",
".",
"length",
")",
";",
"}",
"}",
"static",
"int",
"getHashCode",
"(",
"long",
"par0",
")",
"{",
"return",
"getHashedKey",
"(",
"par0",
")",
";",
"}",
"}",
"</s>"
] |
9,537 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"io",
".",
"PrintWriter",
";",
"import",
"java",
".",
"io",
".",
"StringWriter",
";",
"import",
"java",
".",
"text",
".",
"SimpleDateFormat",
";",
"import",
"java",
".",
"util",
".",
"logging",
".",
"*",
";",
"final",
"class",
"ConsoleLogFormatter",
"extends",
"Formatter",
"{",
"private",
"SimpleDateFormat",
"dateFormat",
";",
"ConsoleLogFormatter",
"(",
")",
"{",
"dateFormat",
"=",
"new",
"SimpleDateFormat",
"(",
"\"\"",
")",
";",
"}",
"public",
"String",
"format",
"(",
"LogRecord",
"par1LogRecord",
")",
"{",
"StringBuilder",
"stringbuilder",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"stringbuilder",
".",
"append",
"(",
"dateFormat",
".",
"format",
"(",
"Long",
".",
"valueOf",
"(",
"par1LogRecord",
".",
"getMillis",
"(",
")",
")",
")",
")",
";",
"Level",
"level",
"=",
"par1LogRecord",
".",
"getLevel",
"(",
")",
";",
"if",
"(",
"level",
"==",
"Level",
".",
"FINEST",
")",
"{",
"stringbuilder",
".",
"append",
"(",
"\"",
"[FINEST]",
"\"",
")",
";",
"}",
"else",
"if",
"(",
"level",
"==",
"Level",
".",
"FINER",
")",
"{",
"stringbuilder",
".",
"append",
"(",
"\"",
"[FINER]",
"\"",
")",
";",
"}",
"else",
"if",
"(",
"level",
"==",
"Level",
".",
"FINE",
")",
"{",
"stringbuilder",
".",
"append",
"(",
"\"",
"[FINE]",
"\"",
")",
";",
"}",
"else",
"if",
"(",
"level",
"==",
"Level",
".",
"INFO",
")",
"{",
"stringbuilder",
".",
"append",
"(",
"\"",
"[INFO]",
"\"",
")",
";",
"}",
"else",
"if",
"(",
"level",
"==",
"Level",
".",
"WARNING",
")",
"{",
"stringbuilder",
".",
"append",
"(",
"\"",
"[WARNING]",
"\"",
")",
";",
"}",
"else",
"if",
"(",
"level",
"==",
"Level",
".",
"SEVERE",
")",
"{",
"stringbuilder",
".",
"append",
"(",
"\"",
"[SEVERE]",
"\"",
")",
";",
"}",
"else",
"if",
"(",
"level",
"==",
"Level",
".",
"SEVERE",
")",
"{",
"stringbuilder",
".",
"append",
"(",
"(",
"new",
"StringBuilder",
"(",
")",
")",
".",
"append",
"(",
"\"",
"[\"",
")",
".",
"append",
"(",
"level",
".",
"getLocalizedName",
"(",
")",
")",
".",
"append",
"(",
"\"]",
"\"",
")",
".",
"toString",
"(",
")",
")",
";",
"}",
"stringbuilder",
".",
"append",
"(",
"par1LogRecord",
".",
"getMessage",
"(",
")",
")",
";",
"stringbuilder",
".",
"append",
"(",
"'\\n'",
")",
";",
"Throwable",
"throwable",
"=",
"par1LogRecord",
".",
"getThrown",
"(",
")",
";",
"if",
"(",
"throwable",
"!=",
"null",
")",
"{",
"StringWriter",
"stringwriter",
"=",
"new",
"StringWriter",
"(",
")",
";",
"throwable",
".",
"printStackTrace",
"(",
"new",
"PrintWriter",
"(",
"stringwriter",
")",
")",
";",
"stringbuilder",
".",
"append",
"(",
"stringwriter",
".",
"toString",
"(",
")",
")",
";",
"}",
"return",
"stringbuilder",
".",
"toString",
"(",
")",
";",
"}",
"}",
"</s>"
] |
9,538 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"class",
"TileEntityBrewingStand",
"extends",
"TileEntity",
"implements",
"IInventory",
"{",
"private",
"ItemStack",
"brewingItemStacks",
"[",
"]",
";",
"private",
"int",
"brewTime",
";",
"private",
"int",
"filledSlots",
";",
"private",
"int",
"ingredientID",
";",
"public",
"TileEntityBrewingStand",
"(",
")",
"{",
"brewingItemStacks",
"=",
"new",
"ItemStack",
"[",
"4",
"]",
";",
"}",
"public",
"String",
"getInvName",
"(",
")",
"{",
"return",
"\"\"",
";",
"}",
"public",
"int",
"getSizeInventory",
"(",
")",
"{",
"return",
"brewingItemStacks",
".",
"length",
";",
"}",
"public",
"void",
"updateEntity",
"(",
")",
"{",
"if",
"(",
"brewTime",
">",
"0",
")",
"{",
"brewTime",
"--",
";",
"if",
"(",
"brewTime",
"==",
"0",
")",
"{",
"brewPotions",
"(",
")",
";",
"onInventoryChanged",
"(",
")",
";",
"}",
"else",
"if",
"(",
"!",
"canBrew",
"(",
")",
")",
"{",
"brewTime",
"=",
"0",
";",
"onInventoryChanged",
"(",
")",
";",
"}",
"else",
"if",
"(",
"ingredientID",
"!=",
"brewingItemStacks",
"[",
"3",
"]",
".",
"itemID",
")",
"{",
"brewTime",
"=",
"0",
";",
"onInventoryChanged",
"(",
")",
";",
"}",
"}",
"else",
"if",
"(",
"canBrew",
"(",
")",
")",
"{",
"brewTime",
"=",
"400",
";",
"ingredientID",
"=",
"brewingItemStacks",
"[",
"3",
"]",
".",
"itemID",
";",
"}",
"int",
"i",
"=",
"getFilledSlots",
"(",
")",
";",
"if",
"(",
"i",
"!=",
"filledSlots",
")",
"{",
"filledSlots",
"=",
"i",
";",
"worldObj",
".",
"setBlockMetadataWithNotify",
"(",
"xCoord",
",",
"yCoord",
",",
"zCoord",
",",
"i",
")",
";",
"}",
"super",
".",
"updateEntity",
"(",
")",
";",
"}",
"public",
"int",
"getBrewTime",
"(",
")",
"{",
"return",
"brewTime",
";",
"}",
"private",
"boolean",
"canBrew",
"(",
")",
"{",
"if",
"(",
"brewingItemStacks",
"[",
"3",
"]",
"==",
"null",
"||",
"brewingItemStacks",
"[",
"3",
"]",
".",
"stackSize",
"<=",
"0",
")",
"{",
"return",
"false",
";",
"}",
"ItemStack",
"itemstack",
"=",
"brewingItemStacks",
"[",
"3",
"]",
";",
"if",
"(",
"!",
"Item",
".",
"itemsList",
"[",
"itemstack",
".",
"itemID",
"]",
".",
"isPotionIngredient",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",
"boolean",
"flag",
"=",
"false",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"3",
";",
"i",
"++",
")",
"{",
"if",
"(",
"brewingItemStacks",
"[",
"i",
"]",
"==",
"null",
"||",
"brewingItemStacks",
"[",
"i",
"]",
".",
"itemID",
"!=",
"Item",
".",
"potion",
".",
"shiftedIndex",
")",
"{",
"continue",
";",
"}",
"int",
"j",
"=",
"brewingItemStacks",
"[",
"i",
"]",
".",
"getItemDamage",
"(",
")",
";",
"int",
"k",
"=",
"getPotionResult",
"(",
"j",
",",
"itemstack",
")",
";",
"if",
"(",
"!",
"ItemPotion",
".",
"isSplash",
"(",
"j",
")",
"&&",
"ItemPotion",
".",
"isSplash",
"(",
"k",
")",
")",
"{",
"flag",
"=",
"true",
";",
"break",
";",
"}",
"java",
".",
"util",
".",
"List",
"list",
"=",
"Item",
".",
"potion",
".",
"getEffects",
"(",
"j",
")",
";",
"java",
".",
"util",
".",
"List",
"list1",
"=",
"Item",
".",
"potion",
".",
"getEffects",
"(",
"k",
")",
";",
"if",
"(",
"j",
">",
"0",
"&&",
"list",
"==",
"list1",
"||",
"list",
"!=",
"null",
"&&",
"(",
"list",
".",
"equals",
"(",
"list1",
")",
"||",
"list1",
"==",
"null",
")",
"||",
"j",
"==",
"k",
")",
"{",
"continue",
";",
"}",
"flag",
"=",
"true",
";",
"break",
";",
"}",
"return",
"flag",
";",
"}",
"private",
"void",
"brewPotions",
"(",
")",
"{",
"if",
"(",
"!",
"canBrew",
"(",
")",
")",
"{",
"return",
";",
"}",
"ItemStack",
"itemstack",
"=",
"brewingItemStacks",
"[",
"3",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"3",
";",
"i",
"++",
")",
"{",
"if",
"(",
"brewingItemStacks",
"[",
"i",
"]",
"==",
"null",
"||",
"brewingItemStacks",
"[",
"i",
"]",
".",
"itemID",
"!=",
"Item",
".",
"potion",
".",
"shiftedIndex",
")",
"{",
"continue",
";",
"}",
"int",
"j",
"=",
"brewingItemStacks",
"[",
"i",
"]",
".",
"getItemDamage",
"(",
")",
";",
"int",
"k",
"=",
"getPotionResult",
"(",
"j",
",",
"itemstack",
")",
";",
"java",
".",
"util",
".",
"List",
"list",
"=",
"Item",
".",
"potion",
".",
"getEffects",
"(",
"j",
")",
";",
"java",
".",
"util",
".",
"List",
"list1",
"=",
"Item",
".",
"potion",
".",
"getEffects",
"(",
"k",
")",
";",
"if",
"(",
"j",
">",
"0",
"&&",
"list",
"==",
"list1",
"||",
"list",
"!=",
"null",
"&&",
"(",
"list",
".",
"equals",
"(",
"list1",
")",
"||",
"list1",
"==",
"null",
")",
")",
"{",
"if",
"(",
"!",
"ItemPotion",
".",
"isSplash",
"(",
"j",
")",
"&&",
"ItemPotion",
".",
"isSplash",
"(",
"k",
")",
")",
"{",
"brewingItemStacks",
"[",
"i",
"]",
".",
"setItemDamage",
"(",
"k",
")",
";",
"}",
"continue",
";",
"}",
"if",
"(",
"j",
"!=",
"k",
")",
"{",
"brewingItemStacks",
"[",
"i",
"]",
".",
"setItemDamage",
"(",
"k",
")",
";",
"}",
"}",
"if",
"(",
"Item",
".",
"itemsList",
"[",
"itemstack",
".",
"itemID",
"]",
".",
"hasContainerItem",
"(",
")",
")",
"{",
"brewingItemStacks",
"[",
"3",
"]",
"=",
"new",
"ItemStack",
"(",
"Item",
".",
"itemsList",
"[",
"itemstack",
".",
"itemID",
"]",
".",
"getContainerItem",
"(",
")",
")",
";",
"}",
"else",
"{",
"brewingItemStacks",
"[",
"3",
"]",
".",
"stackSize",
"--",
";",
"if",
"(",
"brewingItemStacks",
"[",
"3",
"]",
".",
"stackSize",
"<=",
"0",
")",
"{",
"brewingItemStacks",
"[",
"3",
"]",
"=",
"null",
";",
"}",
"}",
"}",
"private",
"int",
"getPotionResult",
"(",
"int",
"par1",
",",
"ItemStack",
"par2ItemStack",
")",
"{",
"if",
"(",
"par2ItemStack",
"==",
"null",
")",
"{",
"return",
"par1",
";",
"}",
"if",
"(",
"Item",
".",
"itemsList",
"[",
"par2ItemStack",
".",
"itemID",
"]",
".",
"isPotionIngredient",
"(",
")",
")",
"{",
"return",
"PotionHelper",
".",
"applyIngredient",
"(",
"par1",
",",
"Item",
".",
"itemsList",
"[",
"par2ItemStack",
".",
"itemID",
"]",
".",
"getPotionEffect",
"(",
")",
")",
";",
"}",
"else",
"{",
"return",
"par1",
";",
"}",
"}",
"public",
"void",
"readFromNBT",
"(",
"NBTTagCompound",
"par1NBTTagCompound",
")",
"{",
"super",
".",
"readFromNBT",
"(",
"par1NBTTagCompound",
")",
";",
"NBTTagList",
"nbttaglist",
"=",
"par1NBTTagCompound",
".",
"getTagList",
"(",
"\"Items\"",
")",
";",
"brewingItemStacks",
"=",
"new",
"ItemStack",
"[",
"getSizeInventory",
"(",
")",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"nbttaglist",
".",
"tagCount",
"(",
")",
";",
"i",
"++",
")",
"{",
"NBTTagCompound",
"nbttagcompound",
"=",
"(",
"NBTTagCompound",
")",
"nbttaglist",
".",
"tagAt",
"(",
"i",
")",
";",
"byte",
"byte0",
"=",
"nbttagcompound",
".",
"getByte",
"(",
"\"Slot\"",
")",
";",
"if",
"(",
"byte0",
">=",
"0",
"&&",
"byte0",
"<",
"brewingItemStacks",
".",
"length",
")",
"{",
"brewingItemStacks",
"[",
"byte0",
"]",
"=",
"ItemStack",
".",
"loadItemStackFromNBT",
"(",
"nbttagcompound",
")",
";",
"}",
"}",
"brewTime",
"=",
"par1NBTTagCompound",
".",
"getShort",
"(",
"\"BrewTime\"",
")",
";",
"}",
"public",
"void",
"writeToNBT",
"(",
"NBTTagCompound",
"par1NBTTagCompound",
")",
"{",
"super",
".",
"writeToNBT",
"(",
"par1NBTTagCompound",
")",
";",
"par1NBTTagCompound",
".",
"setShort",
"(",
"\"BrewTime\"",
",",
"(",
"short",
")",
"brewTime",
")",
";",
"NBTTagList",
"nbttaglist",
"=",
"new",
"NBTTagList",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"brewingItemStacks",
".",
"length",
";",
"i",
"++",
")",
"{",
"if",
"(",
"brewingItemStacks",
"[",
"i",
"]",
"!=",
"null",
")",
"{",
"NBTTagCompound",
"nbttagcompound",
"=",
"new",
"NBTTagCompound",
"(",
")",
";",
"nbttagcompound",
".",
"setByte",
"(",
"\"Slot\"",
",",
"(",
"byte",
")",
"i",
")",
";",
"brewingItemStacks",
"[",
"i",
"]",
".",
"writeToNBT",
"(",
"nbttagcompound",
")",
";",
"nbttaglist",
".",
"appendTag",
"(",
"nbttagcompound",
")",
";",
"}",
"}",
"par1NBTTagCompound",
".",
"setTag",
"(",
"\"Items\"",
",",
"nbttaglist",
")",
";",
"}",
"public",
"ItemStack",
"getStackInSlot",
"(",
"int",
"par1",
")",
"{",
"if",
"(",
"par1",
">=",
"0",
"&&",
"par1",
"<",
"brewingItemStacks",
".",
"length",
")",
"{",
"return",
"brewingItemStacks",
"[",
"par1",
"]",
";",
"}",
"else",
"{",
"return",
"null",
";",
"}",
"}",
"public",
"ItemStack",
"decrStackSize",
"(",
"int",
"par1",
",",
"int",
"par2",
")",
"{",
"if",
"(",
"par1",
">=",
"0",
"&&",
"par1",
"<",
"brewingItemStacks",
".",
"length",
")",
"{",
"ItemStack",
"itemstack",
"=",
"brewingItemStacks",
"[",
"par1",
"]",
";",
"brewingItemStacks",
"[",
"par1",
"]",
"=",
"null",
";",
"return",
"itemstack",
";",
"}",
"else",
"{",
"return",
"null",
";",
"}",
"}",
"public",
"ItemStack",
"getStackInSlotOnClosing",
"(",
"int",
"par1",
")",
"{",
"if",
"(",
"par1",
">=",
"0",
"&&",
"par1",
"<",
"brewingItemStacks",
".",
"length",
")",
"{",
"ItemStack",
"itemstack",
"=",
"brewingItemStacks",
"[",
"par1",
"]",
";",
"brewingItemStacks",
"[",
"par1",
"]",
"=",
"null",
";",
"return",
"itemstack",
";",
"}",
"else",
"{",
"return",
"null",
";",
"}",
"}",
"public",
"void",
"setInventorySlotContents",
"(",
"int",
"par1",
",",
"ItemStack",
"par2ItemStack",
")",
"{",
"if",
"(",
"par1",
">=",
"0",
"&&",
"par1",
"<",
"brewingItemStacks",
".",
"length",
")",
"{",
"brewingItemStacks",
"[",
"par1",
"]",
"=",
"par2ItemStack",
";",
"}",
"}",
"public",
"int",
"getInventoryStackLimit",
"(",
")",
"{",
"return",
"1",
";",
"}",
"public",
"boolean",
"isUseableByPlayer",
"(",
"EntityPlayer",
"par1EntityPlayer",
")",
"{",
"if",
"(",
"worldObj",
".",
"getBlockTileEntity",
"(",
"xCoord",
",",
"yCoord",
",",
"zCoord",
")",
"!=",
"this",
")",
"{",
"return",
"false",
";",
"}",
"return",
"par1EntityPlayer",
".",
"getDistanceSq",
"(",
"(",
"double",
")",
"xCoord",
"+",
"0.5D",
",",
"(",
"double",
")",
"yCoord",
"+",
"0.5D",
",",
"(",
"double",
")",
"zCoord",
"+",
"0.5D",
")",
"<=",
"64D",
";",
"}",
"public",
"void",
"openChest",
"(",
")",
"{",
"}",
"public",
"void",
"closeChest",
"(",
")",
"{",
"}",
"public",
"int",
"getFilledSlots",
"(",
")",
"{",
"int",
"i",
"=",
"0",
";",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
"3",
";",
"j",
"++",
")",
"{",
"if",
"(",
"brewingItemStacks",
"[",
"j",
"]",
"!=",
"null",
")",
"{",
"i",
"|=",
"1",
"<<",
"j",
";",
"}",
"}",
"return",
"i",
";",
"}",
"}",
"</s>"
] |
9,539 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"WorldGenFire",
"extends",
"WorldGenerator",
"{",
"public",
"WorldGenFire",
"(",
")",
"{",
"}",
"public",
"boolean",
"generate",
"(",
"World",
"par1World",
",",
"Random",
"par2Random",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"64",
";",
"i",
"++",
")",
"{",
"int",
"j",
"=",
"(",
"par3",
"+",
"par2Random",
".",
"nextInt",
"(",
"8",
")",
")",
"-",
"par2Random",
".",
"nextInt",
"(",
"8",
")",
";",
"int",
"k",
"=",
"(",
"par4",
"+",
"par2Random",
".",
"nextInt",
"(",
"4",
")",
")",
"-",
"par2Random",
".",
"nextInt",
"(",
"4",
")",
";",
"int",
"l",
"=",
"(",
"par5",
"+",
"par2Random",
".",
"nextInt",
"(",
"8",
")",
")",
"-",
"par2Random",
".",
"nextInt",
"(",
"8",
")",
";",
"if",
"(",
"par1World",
".",
"isAirBlock",
"(",
"j",
",",
"k",
",",
"l",
")",
"&&",
"par1World",
".",
"getBlockId",
"(",
"j",
",",
"k",
"-",
"1",
",",
"l",
")",
"==",
"Block",
".",
"netherrack",
".",
"blockID",
")",
"{",
"par1World",
".",
"setBlockWithNotify",
"(",
"j",
",",
"k",
",",
"l",
",",
"Block",
".",
"fire",
".",
"blockID",
")",
";",
"}",
"}",
"return",
"true",
";",
"}",
"}",
"</s>"
] |
9,540 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"*",
";",
"public",
"class",
"ComponentMineshaftRoom",
"extends",
"StructureComponent",
"{",
"private",
"LinkedList",
"chidStructures",
";",
"public",
"ComponentMineshaftRoom",
"(",
"int",
"par1",
",",
"Random",
"par2Random",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"super",
"(",
"par1",
")",
";",
"chidStructures",
"=",
"new",
"LinkedList",
"(",
")",
";",
"boundingBox",
"=",
"new",
"StructureBoundingBox",
"(",
"par3",
",",
"50",
",",
"par4",
",",
"par3",
"+",
"7",
"+",
"par2Random",
".",
"nextInt",
"(",
"6",
")",
",",
"54",
"+",
"par2Random",
".",
"nextInt",
"(",
"6",
")",
",",
"par4",
"+",
"7",
"+",
"par2Random",
".",
"nextInt",
"(",
"6",
")",
")",
";",
"}",
"public",
"void",
"buildComponent",
"(",
"StructureComponent",
"par1StructureComponent",
",",
"List",
"par2List",
",",
"Random",
"par3Random",
")",
"{",
"int",
"i",
"=",
"getComponentType",
"(",
")",
";",
"int",
"j1",
"=",
"boundingBox",
".",
"getYSize",
"(",
")",
"-",
"3",
"-",
"1",
";",
"if",
"(",
"j1",
"<=",
"0",
")",
"{",
"j1",
"=",
"1",
";",
"}",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
"boundingBox",
".",
"getXSize",
"(",
")",
";",
"j",
"+=",
"4",
")",
"{",
"j",
"+=",
"par3Random",
".",
"nextInt",
"(",
"boundingBox",
".",
"getXSize",
"(",
")",
")",
";",
"if",
"(",
"j",
"+",
"3",
">",
"boundingBox",
".",
"getXSize",
"(",
")",
")",
"{",
"break",
";",
"}",
"StructureComponent",
"structurecomponent",
"=",
"StructureMineshaftPieces",
".",
"getNextComponent",
"(",
"par1StructureComponent",
",",
"par2List",
",",
"par3Random",
",",
"boundingBox",
".",
"minX",
"+",
"j",
",",
"boundingBox",
".",
"minY",
"+",
"par3Random",
".",
"nextInt",
"(",
"j1",
")",
"+",
"1",
",",
"boundingBox",
".",
"minZ",
"-",
"1",
",",
"2",
",",
"i",
")",
";",
"if",
"(",
"structurecomponent",
"!=",
"null",
")",
"{",
"StructureBoundingBox",
"structureboundingbox",
"=",
"structurecomponent",
".",
"getBoundingBox",
"(",
")",
";",
"chidStructures",
".",
"add",
"(",
"new",
"StructureBoundingBox",
"(",
"structureboundingbox",
".",
"minX",
",",
"structureboundingbox",
".",
"minY",
",",
"boundingBox",
".",
"minZ",
",",
"structureboundingbox",
".",
"maxX",
",",
"structureboundingbox",
".",
"maxY",
",",
"boundingBox",
".",
"minZ",
"+",
"1",
")",
")",
";",
"}",
"}",
"for",
"(",
"int",
"k",
"=",
"0",
";",
"k",
"<",
"boundingBox",
".",
"getXSize",
"(",
")",
";",
"k",
"+=",
"4",
")",
"{",
"k",
"+=",
"par3Random",
".",
"nextInt",
"(",
"boundingBox",
".",
"getXSize",
"(",
")",
")",
";",
"if",
"(",
"k",
"+",
"3",
">",
"boundingBox",
".",
"getXSize",
"(",
")",
")",
"{",
"break",
";",
"}",
"StructureComponent",
"structurecomponent1",
"=",
"StructureMineshaftPieces",
".",
"getNextComponent",
"(",
"par1StructureComponent",
",",
"par2List",
",",
"par3Random",
",",
"boundingBox",
".",
"minX",
"+",
"k",
",",
"boundingBox",
".",
"minY",
"+",
"par3Random",
".",
"nextInt",
"(",
"j1",
")",
"+",
"1",
",",
"boundingBox",
".",
"maxZ",
"+",
"1",
",",
"0",
",",
"i",
")",
";",
"if",
"(",
"structurecomponent1",
"!=",
"null",
")",
"{",
"StructureBoundingBox",
"structureboundingbox1",
"=",
"structurecomponent1",
".",
"getBoundingBox",
"(",
")",
";",
"chidStructures",
".",
"add",
"(",
"new",
"StructureBoundingBox",
"(",
"structureboundingbox1",
".",
"minX",
",",
"structureboundingbox1",
".",
"minY",
",",
"boundingBox",
".",
"maxZ",
"-",
"1",
",",
"structureboundingbox1",
".",
"maxX",
",",
"structureboundingbox1",
".",
"maxY",
",",
"boundingBox",
".",
"maxZ",
")",
")",
";",
"}",
"}",
"for",
"(",
"int",
"l",
"=",
"0",
";",
"l",
"<",
"boundingBox",
".",
"getZSize",
"(",
")",
";",
"l",
"+=",
"4",
")",
"{",
"l",
"+=",
"par3Random",
".",
"nextInt",
"(",
"boundingBox",
".",
"getZSize",
"(",
")",
")",
";",
"if",
"(",
"l",
"+",
"3",
">",
"boundingBox",
".",
"getZSize",
"(",
")",
")",
"{",
"break",
";",
"}",
"StructureComponent",
"structurecomponent2",
"=",
"StructureMineshaftPieces",
".",
"getNextComponent",
"(",
"par1StructureComponent",
",",
"par2List",
",",
"par3Random",
",",
"boundingBox",
".",
"minX",
"-",
"1",
",",
"boundingBox",
".",
"minY",
"+",
"par3Random",
".",
"nextInt",
"(",
"j1",
")",
"+",
"1",
",",
"boundingBox",
".",
"minZ",
"+",
"l",
",",
"1",
",",
"i",
")",
";",
"if",
"(",
"structurecomponent2",
"!=",
"null",
")",
"{",
"StructureBoundingBox",
"structureboundingbox2",
"=",
"structurecomponent2",
".",
"getBoundingBox",
"(",
")",
";",
"chidStructures",
".",
"add",
"(",
"new",
"StructureBoundingBox",
"(",
"boundingBox",
".",
"minX",
",",
"structureboundingbox2",
".",
"minY",
",",
"structureboundingbox2",
".",
"minZ",
",",
"boundingBox",
".",
"minX",
"+",
"1",
",",
"structureboundingbox2",
".",
"maxY",
",",
"structureboundingbox2",
".",
"maxZ",
")",
")",
";",
"}",
"}",
"for",
"(",
"int",
"i1",
"=",
"0",
";",
"i1",
"<",
"boundingBox",
".",
"getZSize",
"(",
")",
";",
"i1",
"+=",
"4",
")",
"{",
"i1",
"+=",
"par3Random",
".",
"nextInt",
"(",
"boundingBox",
".",
"getZSize",
"(",
")",
")",
";",
"if",
"(",
"i1",
"+",
"3",
">",
"boundingBox",
".",
"getZSize",
"(",
")",
")",
"{",
"break",
";",
"}",
"StructureComponent",
"structurecomponent3",
"=",
"StructureMineshaftPieces",
".",
"getNextComponent",
"(",
"par1StructureComponent",
",",
"par2List",
",",
"par3Random",
",",
"boundingBox",
".",
"maxX",
"+",
"1",
",",
"boundingBox",
".",
"minY",
"+",
"par3Random",
".",
"nextInt",
"(",
"j1",
")",
"+",
"1",
",",
"boundingBox",
".",
"minZ",
"+",
"i1",
",",
"3",
",",
"i",
")",
";",
"if",
"(",
"structurecomponent3",
"!=",
"null",
")",
"{",
"StructureBoundingBox",
"structureboundingbox3",
"=",
"structurecomponent3",
".",
"getBoundingBox",
"(",
")",
";",
"chidStructures",
".",
"add",
"(",
"new",
"StructureBoundingBox",
"(",
"boundingBox",
".",
"maxX",
"-",
"1",
",",
"structureboundingbox3",
".",
"minY",
",",
"structureboundingbox3",
".",
"minZ",
",",
"boundingBox",
".",
"maxX",
",",
"structureboundingbox3",
".",
"maxY",
",",
"structureboundingbox3",
".",
"maxZ",
")",
")",
";",
"}",
"}",
"}",
"public",
"boolean",
"addComponentParts",
"(",
"World",
"par1World",
",",
"Random",
"par2Random",
",",
"StructureBoundingBox",
"par3StructureBoundingBox",
")",
"{",
"if",
"(",
"isLiquidInStructureBoundingBox",
"(",
"par1World",
",",
"par3StructureBoundingBox",
")",
")",
"{",
"return",
"false",
";",
"}",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"boundingBox",
".",
"minX",
",",
"boundingBox",
".",
"minY",
",",
"boundingBox",
".",
"minZ",
",",
"boundingBox",
".",
"maxX",
",",
"boundingBox",
".",
"minY",
",",
"boundingBox",
".",
"maxZ",
",",
"Block",
".",
"dirt",
".",
"blockID",
",",
"0",
",",
"true",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"boundingBox",
".",
"minX",
",",
"boundingBox",
".",
"minY",
"+",
"1",
",",
"boundingBox",
".",
"minZ",
",",
"boundingBox",
".",
"maxX",
",",
"Math",
".",
"min",
"(",
"boundingBox",
".",
"minY",
"+",
"3",
",",
"boundingBox",
".",
"maxY",
")",
",",
"boundingBox",
".",
"maxZ",
",",
"0",
",",
"0",
",",
"false",
")",
";",
"StructureBoundingBox",
"structureboundingbox",
";",
"for",
"(",
"Iterator",
"iterator",
"=",
"chidStructures",
".",
"iterator",
"(",
")",
";",
"iterator",
".",
"hasNext",
"(",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"structureboundingbox",
".",
"minX",
",",
"structureboundingbox",
".",
"maxY",
"-",
"2",
",",
"structureboundingbox",
".",
"minZ",
",",
"structureboundingbox",
".",
"maxX",
",",
"structureboundingbox",
".",
"maxY",
",",
"structureboundingbox",
".",
"maxZ",
",",
"0",
",",
"0",
",",
"false",
")",
")",
"{",
"structureboundingbox",
"=",
"(",
"StructureBoundingBox",
")",
"iterator",
".",
"next",
"(",
")",
";",
"}",
"randomlyRareFillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"boundingBox",
".",
"minX",
",",
"boundingBox",
".",
"minY",
"+",
"4",
",",
"boundingBox",
".",
"minZ",
",",
"boundingBox",
".",
"maxX",
",",
"boundingBox",
".",
"maxY",
",",
"boundingBox",
".",
"maxZ",
",",
"0",
",",
"false",
")",
";",
"return",
"true",
";",
"}",
"}",
"</s>"
] |
9,541 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"ComponentStrongholdLeftTurn",
"extends",
"ComponentStronghold",
"{",
"protected",
"final",
"EnumDoor",
"doorType",
";",
"public",
"ComponentStrongholdLeftTurn",
"(",
"int",
"par1",
",",
"Random",
"par2Random",
",",
"StructureBoundingBox",
"par3StructureBoundingBox",
",",
"int",
"par4",
")",
"{",
"super",
"(",
"par1",
")",
";",
"coordBaseMode",
"=",
"par4",
";",
"doorType",
"=",
"getRandomDoor",
"(",
"par2Random",
")",
";",
"boundingBox",
"=",
"par3StructureBoundingBox",
";",
"}",
"public",
"void",
"buildComponent",
"(",
"StructureComponent",
"par1StructureComponent",
",",
"List",
"par2List",
",",
"Random",
"par3Random",
")",
"{",
"if",
"(",
"coordBaseMode",
"==",
"2",
"||",
"coordBaseMode",
"==",
"3",
")",
"{",
"getNextComponentX",
"(",
"(",
"ComponentStrongholdStairs2",
")",
"par1StructureComponent",
",",
"par2List",
",",
"par3Random",
",",
"1",
",",
"1",
")",
";",
"}",
"else",
"{",
"getNextComponentZ",
"(",
"(",
"ComponentStrongholdStairs2",
")",
"par1StructureComponent",
",",
"par2List",
",",
"par3Random",
",",
"1",
",",
"1",
")",
";",
"}",
"}",
"public",
"static",
"ComponentStrongholdLeftTurn",
"findValidPlacement",
"(",
"List",
"par0List",
",",
"Random",
"par1Random",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
",",
"int",
"par6",
")",
"{",
"StructureBoundingBox",
"structureboundingbox",
"=",
"StructureBoundingBox",
".",
"getComponentToAddBoundingBox",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"-",
"1",
",",
"-",
"1",
",",
"0",
",",
"5",
",",
"5",
",",
"5",
",",
"par5",
")",
";",
"if",
"(",
"!",
"canStrongholdGoDeeper",
"(",
"structureboundingbox",
")",
"||",
"StructureComponent",
".",
"findIntersecting",
"(",
"par0List",
",",
"structureboundingbox",
")",
"!=",
"null",
")",
"{",
"return",
"null",
";",
"}",
"else",
"{",
"return",
"new",
"ComponentStrongholdLeftTurn",
"(",
"par6",
",",
"par1Random",
",",
"structureboundingbox",
",",
"par5",
")",
";",
"}",
"}",
"public",
"boolean",
"addComponentParts",
"(",
"World",
"par1World",
",",
"Random",
"par2Random",
",",
"StructureBoundingBox",
"par3StructureBoundingBox",
")",
"{",
"if",
"(",
"isLiquidInStructureBoundingBox",
"(",
"par1World",
",",
"par3StructureBoundingBox",
")",
")",
"{",
"return",
"false",
";",
"}",
"fillWithRandomizedBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"0",
",",
"0",
",",
"0",
",",
"4",
",",
"4",
",",
"4",
",",
"true",
",",
"par2Random",
",",
"StructureStrongholdPieces",
".",
"getStrongholdStones",
"(",
")",
")",
";",
"placeDoor",
"(",
"par1World",
",",
"par2Random",
",",
"par3StructureBoundingBox",
",",
"doorType",
",",
"1",
",",
"1",
",",
"0",
")",
";",
"if",
"(",
"coordBaseMode",
"==",
"2",
"||",
"coordBaseMode",
"==",
"3",
")",
"{",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"0",
",",
"1",
",",
"1",
",",
"0",
",",
"3",
",",
"3",
",",
"0",
",",
"0",
",",
"false",
")",
";",
"}",
"else",
"{",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"4",
",",
"1",
",",
"1",
",",
"4",
",",
"3",
",",
"3",
",",
"0",
",",
"0",
",",
"false",
")",
";",
"}",
"return",
"true",
";",
"}",
"}",
"</s>"
] |
9,542 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"BlockLeaves",
"extends",
"BlockLeavesBase",
"{",
"private",
"int",
"baseIndexInPNG",
";",
"int",
"adjacentTreeBlocks",
"[",
"]",
";",
"protected",
"BlockLeaves",
"(",
"int",
"par1",
",",
"int",
"par2",
")",
"{",
"super",
"(",
"par1",
",",
"par2",
",",
"Material",
".",
"leaves",
",",
"false",
")",
";",
"baseIndexInPNG",
"=",
"par2",
";",
"setTickRandomly",
"(",
"true",
")",
";",
"}",
"public",
"void",
"onBlockRemoval",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"int",
"i",
"=",
"1",
";",
"int",
"j",
"=",
"i",
"+",
"1",
";",
"if",
"(",
"par1World",
".",
"checkChunksExist",
"(",
"par2",
"-",
"j",
",",
"par3",
"-",
"j",
",",
"par4",
"-",
"j",
",",
"par2",
"+",
"j",
",",
"par3",
"+",
"j",
",",
"par4",
"+",
"j",
")",
")",
"{",
"for",
"(",
"int",
"k",
"=",
"-",
"i",
";",
"k",
"<=",
"i",
";",
"k",
"++",
")",
"{",
"for",
"(",
"int",
"l",
"=",
"-",
"i",
";",
"l",
"<=",
"i",
";",
"l",
"++",
")",
"{",
"for",
"(",
"int",
"i1",
"=",
"-",
"i",
";",
"i1",
"<=",
"i",
";",
"i1",
"++",
")",
"{",
"int",
"j1",
"=",
"par1World",
".",
"getBlockId",
"(",
"par2",
"+",
"k",
",",
"par3",
"+",
"l",
",",
"par4",
"+",
"i1",
")",
";",
"if",
"(",
"j1",
"==",
"Block",
".",
"leaves",
".",
"blockID",
")",
"{",
"int",
"k1",
"=",
"par1World",
".",
"getBlockMetadata",
"(",
"par2",
"+",
"k",
",",
"par3",
"+",
"l",
",",
"par4",
"+",
"i1",
")",
";",
"par1World",
".",
"setBlockMetadata",
"(",
"par2",
"+",
"k",
",",
"par3",
"+",
"l",
",",
"par4",
"+",
"i1",
",",
"k1",
"|",
"8",
")",
";",
"}",
"}",
"}",
"}",
"}",
"}",
"public",
"void",
"updateTick",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"Random",
"par5Random",
")",
"{",
"if",
"(",
"par1World",
".",
"isRemote",
")",
"{",
"return",
";",
"}",
"int",
"i",
"=",
"par1World",
".",
"getBlockMetadata",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"if",
"(",
"(",
"i",
"&",
"8",
")",
"!=",
"0",
"&&",
"(",
"i",
"&",
"4",
")",
"==",
"0",
")",
"{",
"byte",
"byte0",
"=",
"4",
";",
"int",
"j",
"=",
"byte0",
"+",
"1",
";",
"byte",
"byte1",
"=",
"32",
";",
"int",
"k",
"=",
"byte1",
"*",
"byte1",
";",
"int",
"l",
"=",
"byte1",
"/",
"2",
";",
"if",
"(",
"adjacentTreeBlocks",
"==",
"null",
")",
"{",
"adjacentTreeBlocks",
"=",
"new",
"int",
"[",
"byte1",
"*",
"byte1",
"*",
"byte1",
"]",
";",
"}",
"if",
"(",
"par1World",
".",
"checkChunksExist",
"(",
"par2",
"-",
"j",
",",
"par3",
"-",
"j",
",",
"par4",
"-",
"j",
",",
"par2",
"+",
"j",
",",
"par3",
"+",
"j",
",",
"par4",
"+",
"j",
")",
")",
"{",
"for",
"(",
"int",
"i1",
"=",
"-",
"byte0",
";",
"i1",
"<=",
"byte0",
";",
"i1",
"++",
")",
"{",
"for",
"(",
"int",
"l1",
"=",
"-",
"byte0",
";",
"l1",
"<=",
"byte0",
";",
"l1",
"++",
")",
"{",
"for",
"(",
"int",
"j2",
"=",
"-",
"byte0",
";",
"j2",
"<=",
"byte0",
";",
"j2",
"++",
")",
"{",
"int",
"l2",
"=",
"par1World",
".",
"getBlockId",
"(",
"par2",
"+",
"i1",
",",
"par3",
"+",
"l1",
",",
"par4",
"+",
"j2",
")",
";",
"if",
"(",
"l2",
"==",
"Block",
".",
"wood",
".",
"blockID",
")",
"{",
"adjacentTreeBlocks",
"[",
"(",
"i1",
"+",
"l",
")",
"*",
"k",
"+",
"(",
"l1",
"+",
"l",
")",
"*",
"byte1",
"+",
"(",
"j2",
"+",
"l",
")",
"]",
"=",
"0",
";",
"continue",
";",
"}",
"if",
"(",
"l2",
"==",
"Block",
".",
"leaves",
".",
"blockID",
")",
"{",
"adjacentTreeBlocks",
"[",
"(",
"i1",
"+",
"l",
")",
"*",
"k",
"+",
"(",
"l1",
"+",
"l",
")",
"*",
"byte1",
"+",
"(",
"j2",
"+",
"l",
")",
"]",
"=",
"-",
"2",
";",
"}",
"else",
"{",
"adjacentTreeBlocks",
"[",
"(",
"i1",
"+",
"l",
")",
"*",
"k",
"+",
"(",
"l1",
"+",
"l",
")",
"*",
"byte1",
"+",
"(",
"j2",
"+",
"l",
")",
"]",
"=",
"-",
"1",
";",
"}",
"}",
"}",
"}",
"for",
"(",
"int",
"j1",
"=",
"1",
";",
"j1",
"<=",
"4",
";",
"j1",
"++",
")",
"{",
"for",
"(",
"int",
"i2",
"=",
"-",
"byte0",
";",
"i2",
"<=",
"byte0",
";",
"i2",
"++",
")",
"{",
"for",
"(",
"int",
"k2",
"=",
"-",
"byte0",
";",
"k2",
"<=",
"byte0",
";",
"k2",
"++",
")",
"{",
"for",
"(",
"int",
"i3",
"=",
"-",
"byte0",
";",
"i3",
"<=",
"byte0",
";",
"i3",
"++",
")",
"{",
"if",
"(",
"adjacentTreeBlocks",
"[",
"(",
"i2",
"+",
"l",
")",
"*",
"k",
"+",
"(",
"k2",
"+",
"l",
")",
"*",
"byte1",
"+",
"(",
"i3",
"+",
"l",
")",
"]",
"!=",
"j1",
"-",
"1",
")",
"{",
"continue",
";",
"}",
"if",
"(",
"adjacentTreeBlocks",
"[",
"(",
"(",
"i2",
"+",
"l",
")",
"-",
"1",
")",
"*",
"k",
"+",
"(",
"k2",
"+",
"l",
")",
"*",
"byte1",
"+",
"(",
"i3",
"+",
"l",
")",
"]",
"==",
"-",
"2",
")",
"{",
"adjacentTreeBlocks",
"[",
"(",
"(",
"i2",
"+",
"l",
")",
"-",
"1",
")",
"*",
"k",
"+",
"(",
"k2",
"+",
"l",
")",
"*",
"byte1",
"+",
"(",
"i3",
"+",
"l",
")",
"]",
"=",
"j1",
";",
"}",
"if",
"(",
"adjacentTreeBlocks",
"[",
"(",
"i2",
"+",
"l",
"+",
"1",
")",
"*",
"k",
"+",
"(",
"k2",
"+",
"l",
")",
"*",
"byte1",
"+",
"(",
"i3",
"+",
"l",
")",
"]",
"==",
"-",
"2",
")",
"{",
"adjacentTreeBlocks",
"[",
"(",
"i2",
"+",
"l",
"+",
"1",
")",
"*",
"k",
"+",
"(",
"k2",
"+",
"l",
")",
"*",
"byte1",
"+",
"(",
"i3",
"+",
"l",
")",
"]",
"=",
"j1",
";",
"}",
"if",
"(",
"adjacentTreeBlocks",
"[",
"(",
"i2",
"+",
"l",
")",
"*",
"k",
"+",
"(",
"(",
"k2",
"+",
"l",
")",
"-",
"1",
")",
"*",
"byte1",
"+",
"(",
"i3",
"+",
"l",
")",
"]",
"==",
"-",
"2",
")",
"{",
"adjacentTreeBlocks",
"[",
"(",
"i2",
"+",
"l",
")",
"*",
"k",
"+",
"(",
"(",
"k2",
"+",
"l",
")",
"-",
"1",
")",
"*",
"byte1",
"+",
"(",
"i3",
"+",
"l",
")",
"]",
"=",
"j1",
";",
"}",
"if",
"(",
"adjacentTreeBlocks",
"[",
"(",
"i2",
"+",
"l",
")",
"*",
"k",
"+",
"(",
"k2",
"+",
"l",
"+",
"1",
")",
"*",
"byte1",
"+",
"(",
"i3",
"+",
"l",
")",
"]",
"==",
"-",
"2",
")",
"{",
"adjacentTreeBlocks",
"[",
"(",
"i2",
"+",
"l",
")",
"*",
"k",
"+",
"(",
"k2",
"+",
"l",
"+",
"1",
")",
"*",
"byte1",
"+",
"(",
"i3",
"+",
"l",
")",
"]",
"=",
"j1",
";",
"}",
"if",
"(",
"adjacentTreeBlocks",
"[",
"(",
"i2",
"+",
"l",
")",
"*",
"k",
"+",
"(",
"k2",
"+",
"l",
")",
"*",
"byte1",
"+",
"(",
"(",
"i3",
"+",
"l",
")",
"-",
"1",
")",
"]",
"==",
"-",
"2",
")",
"{",
"adjacentTreeBlocks",
"[",
"(",
"i2",
"+",
"l",
")",
"*",
"k",
"+",
"(",
"k2",
"+",
"l",
")",
"*",
"byte1",
"+",
"(",
"(",
"i3",
"+",
"l",
")",
"-",
"1",
")",
"]",
"=",
"j1",
";",
"}",
"if",
"(",
"adjacentTreeBlocks",
"[",
"(",
"i2",
"+",
"l",
")",
"*",
"k",
"+",
"(",
"k2",
"+",
"l",
")",
"*",
"byte1",
"+",
"(",
"i3",
"+",
"l",
"+",
"1",
")",
"]",
"==",
"-",
"2",
")",
"{",
"adjacentTreeBlocks",
"[",
"(",
"i2",
"+",
"l",
")",
"*",
"k",
"+",
"(",
"k2",
"+",
"l",
")",
"*",
"byte1",
"+",
"(",
"i3",
"+",
"l",
"+",
"1",
")",
"]",
"=",
"j1",
";",
"}",
"}",
"}",
"}",
"}",
"}",
"int",
"k1",
"=",
"adjacentTreeBlocks",
"[",
"l",
"*",
"k",
"+",
"l",
"*",
"byte1",
"+",
"l",
"]",
";",
"if",
"(",
"k1",
">=",
"0",
")",
"{",
"par1World",
".",
"setBlockMetadata",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"i",
"&",
"-",
"9",
")",
";",
"}",
"else",
"{",
"removeLeaves",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"}",
"}",
"}",
"private",
"void",
"removeLeaves",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"dropBlockAsItem",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
",",
"par1World",
".",
"getBlockMetadata",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
",",
"0",
")",
";",
"par1World",
".",
"setBlockWithNotify",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"0",
")",
";",
"}",
"public",
"int",
"quantityDropped",
"(",
"Random",
"par1Random",
")",
"{",
"return",
"par1Random",
".",
"nextInt",
"(",
"20",
")",
"!=",
"0",
"?",
"0",
":",
"1",
";",
"}",
"public",
"int",
"idDropped",
"(",
"int",
"par1",
",",
"Random",
"par2Random",
",",
"int",
"par3",
")",
"{",
"return",
"Block",
".",
"sapling",
".",
"blockID",
";",
"}",
"public",
"void",
"dropBlockAsItemWithChance",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
",",
"float",
"par6",
",",
"int",
"par7",
")",
"{",
"if",
"(",
"!",
"par1World",
".",
"isRemote",
")",
"{",
"byte",
"byte0",
"=",
"20",
";",
"if",
"(",
"(",
"par5",
"&",
"3",
")",
"==",
"3",
")",
"{",
"byte0",
"=",
"40",
";",
"}",
"if",
"(",
"par1World",
".",
"rand",
".",
"nextInt",
"(",
"byte0",
")",
"==",
"0",
")",
"{",
"int",
"i",
"=",
"idDropped",
"(",
"par5",
",",
"par1World",
".",
"rand",
",",
"par7",
")",
";",
"dropBlockAsItem_do",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
",",
"new",
"ItemStack",
"(",
"i",
",",
"1",
",",
"damageDropped",
"(",
"par5",
")",
")",
")",
";",
"}",
"if",
"(",
"(",
"par5",
"&",
"3",
")",
"==",
"0",
"&&",
"par1World",
".",
"rand",
".",
"nextInt",
"(",
"200",
")",
"==",
"0",
")",
"{",
"dropBlockAsItem_do",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
",",
"new",
"ItemStack",
"(",
"Item",
".",
"appleRed",
",",
"1",
",",
"0",
")",
")",
";",
"}",
"}",
"}",
"public",
"void",
"harvestBlock",
"(",
"World",
"par1World",
",",
"EntityPlayer",
"par2EntityPlayer",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
",",
"int",
"par6",
")",
"{",
"if",
"(",
"!",
"par1World",
".",
"isRemote",
"&&",
"par2EntityPlayer",
".",
"getCurrentEquippedItem",
"(",
")",
"!=",
"null",
"&&",
"par2EntityPlayer",
".",
"getCurrentEquippedItem",
"(",
")",
".",
"itemID",
"==",
"Item",
".",
"shears",
".",
"shiftedIndex",
")",
"{",
"par2EntityPlayer",
".",
"addStat",
"(",
"StatList",
".",
"mineBlockStatArray",
"[",
"blockID",
"]",
",",
"1",
")",
";",
"dropBlockAsItem_do",
"(",
"par1World",
",",
"par3",
",",
"par4",
",",
"par5",
",",
"new",
"ItemStack",
"(",
"Block",
".",
"leaves",
".",
"blockID",
",",
"1",
",",
"par6",
"&",
"3",
")",
")",
";",
"}",
"else",
"{",
"super",
".",
"harvestBlock",
"(",
"par1World",
",",
"par2EntityPlayer",
",",
"par3",
",",
"par4",
",",
"par5",
",",
"par6",
")",
";",
"}",
"}",
"protected",
"int",
"damageDropped",
"(",
"int",
"par1",
")",
"{",
"return",
"par1",
"&",
"3",
";",
"}",
"public",
"boolean",
"isOpaqueCube",
"(",
")",
"{",
"return",
"!",
"graphicsLevel",
";",
"}",
"public",
"int",
"getBlockTextureFromSideAndMetadata",
"(",
"int",
"par1",
",",
"int",
"par2",
")",
"{",
"if",
"(",
"(",
"par2",
"&",
"3",
")",
"==",
"1",
")",
"{",
"return",
"blockIndexInTexture",
"+",
"80",
";",
"}",
"if",
"(",
"(",
"par2",
"&",
"3",
")",
"==",
"3",
")",
"{",
"return",
"blockIndexInTexture",
"+",
"144",
";",
"}",
"else",
"{",
"return",
"blockIndexInTexture",
";",
"}",
"}",
"public",
"void",
"onEntityWalking",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"Entity",
"par5Entity",
")",
"{",
"super",
".",
"onEntityWalking",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
",",
"par5Entity",
")",
";",
"}",
"}",
"</s>"
] |
9,543 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"class",
"InventoryPlayer",
"implements",
"IInventory",
"{",
"public",
"ItemStack",
"mainInventory",
"[",
"]",
";",
"public",
"ItemStack",
"armorInventory",
"[",
"]",
";",
"public",
"int",
"currentItem",
";",
"public",
"EntityPlayer",
"player",
";",
"private",
"ItemStack",
"itemStack",
";",
"public",
"boolean",
"inventoryChanged",
";",
"public",
"InventoryPlayer",
"(",
"EntityPlayer",
"par1EntityPlayer",
")",
"{",
"mainInventory",
"=",
"new",
"ItemStack",
"[",
"36",
"]",
";",
"armorInventory",
"=",
"new",
"ItemStack",
"[",
"4",
"]",
";",
"currentItem",
"=",
"0",
";",
"inventoryChanged",
"=",
"false",
";",
"player",
"=",
"par1EntityPlayer",
";",
"}",
"public",
"ItemStack",
"getCurrentItem",
"(",
")",
"{",
"if",
"(",
"currentItem",
"<",
"9",
"&&",
"currentItem",
">=",
"0",
")",
"{",
"return",
"mainInventory",
"[",
"currentItem",
"]",
";",
"}",
"else",
"{",
"return",
"null",
";",
"}",
"}",
"public",
"static",
"int",
"func_25054_e",
"(",
")",
"{",
"return",
"9",
";",
"}",
"private",
"int",
"getInventorySlotContainItem",
"(",
"int",
"par1",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"mainInventory",
".",
"length",
";",
"i",
"++",
")",
"{",
"if",
"(",
"mainInventory",
"[",
"i",
"]",
"!=",
"null",
"&&",
"mainInventory",
"[",
"i",
"]",
".",
"itemID",
"==",
"par1",
")",
"{",
"return",
"i",
";",
"}",
"}",
"return",
"-",
"1",
";",
"}",
"private",
"int",
"storeItemStack",
"(",
"ItemStack",
"par1ItemStack",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"mainInventory",
".",
"length",
";",
"i",
"++",
")",
"{",
"if",
"(",
"mainInventory",
"[",
"i",
"]",
"!=",
"null",
"&&",
"mainInventory",
"[",
"i",
"]",
".",
"itemID",
"==",
"par1ItemStack",
".",
"itemID",
"&&",
"mainInventory",
"[",
"i",
"]",
".",
"isStackable",
"(",
")",
"&&",
"mainInventory",
"[",
"i",
"]",
".",
"stackSize",
"<",
"mainInventory",
"[",
"i",
"]",
".",
"getMaxStackSize",
"(",
")",
"&&",
"mainInventory",
"[",
"i",
"]",
".",
"stackSize",
"<",
"getInventoryStackLimit",
"(",
")",
"&&",
"(",
"!",
"mainInventory",
"[",
"i",
"]",
".",
"getHasSubtypes",
"(",
")",
"||",
"mainInventory",
"[",
"i",
"]",
".",
"getItemDamage",
"(",
")",
"==",
"par1ItemStack",
".",
"getItemDamage",
"(",
")",
")",
"&&",
"ItemStack",
".",
"func_46124_a",
"(",
"mainInventory",
"[",
"i",
"]",
",",
"par1ItemStack",
")",
")",
"{",
"return",
"i",
";",
"}",
"}",
"return",
"-",
"1",
";",
"}",
"private",
"int",
"getFirstEmptyStack",
"(",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"mainInventory",
".",
"length",
";",
"i",
"++",
")",
"{",
"if",
"(",
"mainInventory",
"[",
"i",
"]",
"==",
"null",
")",
"{",
"return",
"i",
";",
"}",
"}",
"return",
"-",
"1",
";",
"}",
"private",
"int",
"storePartialItemStack",
"(",
"ItemStack",
"par1ItemStack",
")",
"{",
"int",
"i",
"=",
"par1ItemStack",
".",
"itemID",
";",
"int",
"j",
"=",
"par1ItemStack",
".",
"stackSize",
";",
"if",
"(",
"par1ItemStack",
".",
"getMaxStackSize",
"(",
")",
"==",
"1",
")",
"{",
"int",
"k",
"=",
"getFirstEmptyStack",
"(",
")",
";",
"if",
"(",
"k",
"<",
"0",
")",
"{",
"return",
"j",
";",
"}",
"if",
"(",
"mainInventory",
"[",
"k",
"]",
"==",
"null",
")",
"{",
"mainInventory",
"[",
"k",
"]",
"=",
"ItemStack",
".",
"copyItemStack",
"(",
"par1ItemStack",
")",
";",
"}",
"return",
"0",
";",
"}",
"int",
"l",
"=",
"storeItemStack",
"(",
"par1ItemStack",
")",
";",
"if",
"(",
"l",
"<",
"0",
")",
"{",
"l",
"=",
"getFirstEmptyStack",
"(",
")",
";",
"}",
"if",
"(",
"l",
"<",
"0",
")",
"{",
"return",
"j",
";",
"}",
"if",
"(",
"mainInventory",
"[",
"l",
"]",
"==",
"null",
")",
"{",
"mainInventory",
"[",
"l",
"]",
"=",
"new",
"ItemStack",
"(",
"i",
",",
"0",
",",
"par1ItemStack",
".",
"getItemDamage",
"(",
")",
")",
";",
"if",
"(",
"par1ItemStack",
".",
"hasTagCompound",
"(",
")",
")",
"{",
"mainInventory",
"[",
"l",
"]",
".",
"setTagCompound",
"(",
"(",
"NBTTagCompound",
")",
"par1ItemStack",
".",
"getTagCompound",
"(",
")",
".",
"copy",
"(",
")",
")",
";",
"}",
"}",
"int",
"i1",
"=",
"j",
";",
"if",
"(",
"i1",
">",
"mainInventory",
"[",
"l",
"]",
".",
"getMaxStackSize",
"(",
")",
"-",
"mainInventory",
"[",
"l",
"]",
".",
"stackSize",
")",
"{",
"i1",
"=",
"mainInventory",
"[",
"l",
"]",
".",
"getMaxStackSize",
"(",
")",
"-",
"mainInventory",
"[",
"l",
"]",
".",
"stackSize",
";",
"}",
"if",
"(",
"i1",
">",
"getInventoryStackLimit",
"(",
")",
"-",
"mainInventory",
"[",
"l",
"]",
".",
"stackSize",
")",
"{",
"i1",
"=",
"getInventoryStackLimit",
"(",
")",
"-",
"mainInventory",
"[",
"l",
"]",
".",
"stackSize",
";",
"}",
"if",
"(",
"i1",
"==",
"0",
")",
"{",
"return",
"j",
";",
"}",
"else",
"{",
"j",
"-=",
"i1",
";",
"mainInventory",
"[",
"l",
"]",
".",
"stackSize",
"+=",
"i1",
";",
"mainInventory",
"[",
"l",
"]",
".",
"animationsToGo",
"=",
"5",
";",
"return",
"j",
";",
"}",
"}",
"public",
"void",
"decrementAnimations",
"(",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"mainInventory",
".",
"length",
";",
"i",
"++",
")",
"{",
"if",
"(",
"mainInventory",
"[",
"i",
"]",
"!=",
"null",
")",
"{",
"mainInventory",
"[",
"i",
"]",
".",
"updateAnimation",
"(",
"player",
".",
"worldObj",
",",
"player",
",",
"i",
",",
"currentItem",
"==",
"i",
")",
";",
"}",
"}",
"}",
"public",
"boolean",
"consumeInventoryItem",
"(",
"int",
"par1",
")",
"{",
"int",
"i",
"=",
"getInventorySlotContainItem",
"(",
"par1",
")",
";",
"if",
"(",
"i",
"<",
"0",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"--",
"mainInventory",
"[",
"i",
"]",
".",
"stackSize",
"<=",
"0",
")",
"{",
"mainInventory",
"[",
"i",
"]",
"=",
"null",
";",
"}",
"return",
"true",
";",
"}",
"public",
"boolean",
"hasItem",
"(",
"int",
"par1",
")",
"{",
"int",
"i",
"=",
"getInventorySlotContainItem",
"(",
"par1",
")",
";",
"return",
"i",
">=",
"0",
";",
"}",
"public",
"boolean",
"addItemStackToInventory",
"(",
"ItemStack",
"par1ItemStack",
")",
"{",
"if",
"(",
"!",
"par1ItemStack",
".",
"isItemDamaged",
"(",
")",
")",
"{",
"int",
"i",
";",
"do",
"{",
"i",
"=",
"par1ItemStack",
".",
"stackSize",
";",
"par1ItemStack",
".",
"stackSize",
"=",
"storePartialItemStack",
"(",
"par1ItemStack",
")",
";",
"}",
"while",
"(",
"par1ItemStack",
".",
"stackSize",
">",
"0",
"&&",
"par1ItemStack",
".",
"stackSize",
"<",
"i",
")",
";",
"if",
"(",
"par1ItemStack",
".",
"stackSize",
"==",
"i",
"&&",
"player",
".",
"capabilities",
".",
"isCreativeMode",
")",
"{",
"par1ItemStack",
".",
"stackSize",
"=",
"0",
";",
"return",
"true",
";",
"}",
"else",
"{",
"return",
"par1ItemStack",
".",
"stackSize",
"<",
"i",
";",
"}",
"}",
"int",
"j",
"=",
"getFirstEmptyStack",
"(",
")",
";",
"if",
"(",
"j",
">=",
"0",
")",
"{",
"mainInventory",
"[",
"j",
"]",
"=",
"ItemStack",
".",
"copyItemStack",
"(",
"par1ItemStack",
")",
";",
"mainInventory",
"[",
"j",
"]",
".",
"animationsToGo",
"=",
"5",
";",
"par1ItemStack",
".",
"stackSize",
"=",
"0",
";",
"return",
"true",
";",
"}",
"if",
"(",
"player",
".",
"capabilities",
".",
"isCreativeMode",
")",
"{",
"par1ItemStack",
".",
"stackSize",
"=",
"0",
";",
"return",
"true",
";",
"}",
"else",
"{",
"return",
"false",
";",
"}",
"}",
"public",
"ItemStack",
"decrStackSize",
"(",
"int",
"par1",
",",
"int",
"par2",
")",
"{",
"ItemStack",
"aitemstack",
"[",
"]",
"=",
"mainInventory",
";",
"if",
"(",
"par1",
">=",
"mainInventory",
".",
"length",
")",
"{",
"aitemstack",
"=",
"armorInventory",
";",
"par1",
"-=",
"mainInventory",
".",
"length",
";",
"}",
"if",
"(",
"aitemstack",
"[",
"par1",
"]",
"!=",
"null",
")",
"{",
"if",
"(",
"aitemstack",
"[",
"par1",
"]",
".",
"stackSize",
"<=",
"par2",
")",
"{",
"ItemStack",
"itemstack",
"=",
"aitemstack",
"[",
"par1",
"]",
";",
"aitemstack",
"[",
"par1",
"]",
"=",
"null",
";",
"return",
"itemstack",
";",
"}",
"ItemStack",
"itemstack1",
"=",
"aitemstack",
"[",
"par1",
"]",
".",
"splitStack",
"(",
"par2",
")",
";",
"if",
"(",
"aitemstack",
"[",
"par1",
"]",
".",
"stackSize",
"==",
"0",
")",
"{",
"aitemstack",
"[",
"par1",
"]",
"=",
"null",
";",
"}",
"return",
"itemstack1",
";",
"}",
"else",
"{",
"return",
"null",
";",
"}",
"}",
"public",
"ItemStack",
"getStackInSlotOnClosing",
"(",
"int",
"par1",
")",
"{",
"ItemStack",
"aitemstack",
"[",
"]",
"=",
"mainInventory",
";",
"if",
"(",
"par1",
">=",
"mainInventory",
".",
"length",
")",
"{",
"aitemstack",
"=",
"armorInventory",
";",
"par1",
"-=",
"mainInventory",
".",
"length",
";",
"}",
"if",
"(",
"aitemstack",
"[",
"par1",
"]",
"!=",
"null",
")",
"{",
"ItemStack",
"itemstack",
"=",
"aitemstack",
"[",
"par1",
"]",
";",
"aitemstack",
"[",
"par1",
"]",
"=",
"null",
";",
"return",
"itemstack",
";",
"}",
"else",
"{",
"return",
"null",
";",
"}",
"}",
"public",
"void",
"setInventorySlotContents",
"(",
"int",
"par1",
",",
"ItemStack",
"par2ItemStack",
")",
"{",
"ItemStack",
"aitemstack",
"[",
"]",
"=",
"mainInventory",
";",
"if",
"(",
"par1",
">=",
"aitemstack",
".",
"length",
")",
"{",
"par1",
"-=",
"aitemstack",
".",
"length",
";",
"aitemstack",
"=",
"armorInventory",
";",
"}",
"aitemstack",
"[",
"par1",
"]",
"=",
"par2ItemStack",
";",
"}",
"public",
"float",
"getStrVsBlock",
"(",
"Block",
"par1Block",
")",
"{",
"float",
"f",
"=",
"1.0F",
";",
"if",
"(",
"mainInventory",
"[",
"currentItem",
"]",
"!=",
"null",
")",
"{",
"f",
"*=",
"mainInventory",
"[",
"currentItem",
"]",
".",
"getStrVsBlock",
"(",
"par1Block",
")",
";",
"}",
"return",
"f",
";",
"}",
"public",
"NBTTagList",
"writeToNBT",
"(",
"NBTTagList",
"par1NBTTagList",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"mainInventory",
".",
"length",
";",
"i",
"++",
")",
"{",
"if",
"(",
"mainInventory",
"[",
"i",
"]",
"!=",
"null",
")",
"{",
"NBTTagCompound",
"nbttagcompound",
"=",
"new",
"NBTTagCompound",
"(",
")",
";",
"nbttagcompound",
".",
"setByte",
"(",
"\"Slot\"",
",",
"(",
"byte",
")",
"i",
")",
";",
"mainInventory",
"[",
"i",
"]",
".",
"writeToNBT",
"(",
"nbttagcompound",
")",
";",
"par1NBTTagList",
".",
"appendTag",
"(",
"nbttagcompound",
")",
";",
"}",
"}",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
"armorInventory",
".",
"length",
";",
"j",
"++",
")",
"{",
"if",
"(",
"armorInventory",
"[",
"j",
"]",
"!=",
"null",
")",
"{",
"NBTTagCompound",
"nbttagcompound1",
"=",
"new",
"NBTTagCompound",
"(",
")",
";",
"nbttagcompound1",
".",
"setByte",
"(",
"\"Slot\"",
",",
"(",
"byte",
")",
"(",
"j",
"+",
"100",
")",
")",
";",
"armorInventory",
"[",
"j",
"]",
".",
"writeToNBT",
"(",
"nbttagcompound1",
")",
";",
"par1NBTTagList",
".",
"appendTag",
"(",
"nbttagcompound1",
")",
";",
"}",
"}",
"return",
"par1NBTTagList",
";",
"}",
"public",
"void",
"readFromNBT",
"(",
"NBTTagList",
"par1NBTTagList",
")",
"{",
"mainInventory",
"=",
"new",
"ItemStack",
"[",
"36",
"]",
";",
"armorInventory",
"=",
"new",
"ItemStack",
"[",
"4",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"par1NBTTagList",
".",
"tagCount",
"(",
")",
";",
"i",
"++",
")",
"{",
"NBTTagCompound",
"nbttagcompound",
"=",
"(",
"NBTTagCompound",
")",
"par1NBTTagList",
".",
"tagAt",
"(",
"i",
")",
";",
"int",
"j",
"=",
"nbttagcompound",
".",
"getByte",
"(",
"\"Slot\"",
")",
"&",
"0xff",
";",
"ItemStack",
"itemstack",
"=",
"ItemStack",
".",
"loadItemStackFromNBT",
"(",
"nbttagcompound",
")",
";",
"if",
"(",
"itemstack",
"==",
"null",
")",
"{",
"continue",
";",
"}",
"if",
"(",
"j",
">=",
"0",
"&&",
"j",
"<",
"mainInventory",
".",
"length",
")",
"{",
"mainInventory",
"[",
"j",
"]",
"=",
"itemstack",
";",
"}",
"if",
"(",
"j",
">=",
"100",
"&&",
"j",
"<",
"armorInventory",
".",
"length",
"+",
"100",
")",
"{",
"armorInventory",
"[",
"j",
"-",
"100",
"]",
"=",
"itemstack",
";",
"}",
"}",
"}",
"public",
"int",
"getSizeInventory",
"(",
")",
"{",
"return",
"mainInventory",
".",
"length",
"+",
"4",
";",
"}",
"public",
"ItemStack",
"getStackInSlot",
"(",
"int",
"par1",
")",
"{",
"ItemStack",
"aitemstack",
"[",
"]",
"=",
"mainInventory",
";",
"if",
"(",
"par1",
">=",
"aitemstack",
".",
"length",
")",
"{",
"par1",
"-=",
"aitemstack",
".",
"length",
";",
"aitemstack",
"=",
"armorInventory",
";",
"}",
"return",
"aitemstack",
"[",
"par1",
"]",
";",
"}",
"public",
"String",
"getInvName",
"(",
")",
"{",
"return",
"\"\"",
";",
"}",
"public",
"int",
"getInventoryStackLimit",
"(",
")",
"{",
"return",
"64",
";",
"}",
"public",
"int",
"getDamageVsEntity",
"(",
"Entity",
"par1Entity",
")",
"{",
"ItemStack",
"itemstack",
"=",
"getStackInSlot",
"(",
"currentItem",
")",
";",
"if",
"(",
"itemstack",
"!=",
"null",
")",
"{",
"return",
"itemstack",
".",
"getDamageVsEntity",
"(",
"par1Entity",
")",
";",
"}",
"else",
"{",
"return",
"1",
";",
"}",
"}",
"public",
"boolean",
"canHarvestBlock",
"(",
"Block",
"par1Block",
")",
"{",
"if",
"(",
"par1Block",
".",
"blockMaterial",
".",
"isHarvestable",
"(",
")",
")",
"{",
"return",
"true",
";",
"}",
"ItemStack",
"itemstack",
"=",
"getStackInSlot",
"(",
"currentItem",
")",
";",
"if",
"(",
"itemstack",
"!=",
"null",
")",
"{",
"return",
"itemstack",
".",
"canHarvestBlock",
"(",
"par1Block",
")",
";",
"}",
"else",
"{",
"return",
"false",
";",
"}",
"}",
"public",
"int",
"getTotalArmorValue",
"(",
")",
"{",
"int",
"i",
"=",
"0",
";",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
"armorInventory",
".",
"length",
";",
"j",
"++",
")",
"{",
"if",
"(",
"armorInventory",
"[",
"j",
"]",
"!=",
"null",
"&&",
"(",
"armorInventory",
"[",
"j",
"]",
".",
"getItem",
"(",
")",
"instanceof",
"ItemArmor",
")",
")",
"{",
"int",
"k",
"=",
"(",
"(",
"ItemArmor",
")",
"armorInventory",
"[",
"j",
"]",
".",
"getItem",
"(",
")",
")",
".",
"damageReduceAmount",
";",
"i",
"+=",
"k",
";",
"}",
"}",
"return",
"i",
";",
"}",
"public",
"void",
"damageArmor",
"(",
"int",
"par1",
")",
"{",
"par1",
"/=",
"4",
";",
"if",
"(",
"par1",
"<",
"1",
")",
"{",
"par1",
"=",
"1",
";",
"}",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"armorInventory",
".",
"length",
";",
"i",
"++",
")",
"{",
"if",
"(",
"armorInventory",
"[",
"i",
"]",
"==",
"null",
"||",
"!",
"(",
"armorInventory",
"[",
"i",
"]",
".",
"getItem",
"(",
")",
"instanceof",
"ItemArmor",
")",
")",
"{",
"continue",
";",
"}",
"armorInventory",
"[",
"i",
"]",
".",
"damageItem",
"(",
"par1",
",",
"player",
")",
";",
"if",
"(",
"armorInventory",
"[",
"i",
"]",
".",
"stackSize",
"==",
"0",
")",
"{",
"armorInventory",
"[",
"i",
"]",
".",
"onItemDestroyedByUse",
"(",
"player",
")",
";",
"armorInventory",
"[",
"i",
"]",
"=",
"null",
";",
"}",
"}",
"}",
"public",
"void",
"dropAllItems",
"(",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"mainInventory",
".",
"length",
";",
"i",
"++",
")",
"{",
"if",
"(",
"mainInventory",
"[",
"i",
"]",
"!=",
"null",
")",
"{",
"player",
".",
"dropPlayerItemWithRandomChoice",
"(",
"mainInventory",
"[",
"i",
"]",
",",
"true",
")",
";",
"mainInventory",
"[",
"i",
"]",
"=",
"null",
";",
"}",
"}",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
"armorInventory",
".",
"length",
";",
"j",
"++",
")",
"{",
"if",
"(",
"armorInventory",
"[",
"j",
"]",
"!=",
"null",
")",
"{",
"player",
".",
"dropPlayerItemWithRandomChoice",
"(",
"armorInventory",
"[",
"j",
"]",
",",
"true",
")",
";",
"armorInventory",
"[",
"j",
"]",
"=",
"null",
";",
"}",
"}",
"}",
"public",
"void",
"onInventoryChanged",
"(",
")",
"{",
"inventoryChanged",
"=",
"true",
";",
"}",
"public",
"void",
"setItemStack",
"(",
"ItemStack",
"par1ItemStack",
")",
"{",
"itemStack",
"=",
"par1ItemStack",
";",
"player",
".",
"onItemStackChanged",
"(",
"par1ItemStack",
")",
";",
"}",
"public",
"ItemStack",
"getItemStack",
"(",
")",
"{",
"return",
"itemStack",
";",
"}",
"public",
"boolean",
"isUseableByPlayer",
"(",
"EntityPlayer",
"par1EntityPlayer",
")",
"{",
"if",
"(",
"player",
".",
"isDead",
")",
"{",
"return",
"false",
";",
"}",
"return",
"par1EntityPlayer",
".",
"getDistanceSqToEntity",
"(",
"player",
")",
"<=",
"64D",
";",
"}",
"public",
"boolean",
"hasItemStack",
"(",
"ItemStack",
"par1ItemStack",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"armorInventory",
".",
"length",
";",
"i",
"++",
")",
"{",
"if",
"(",
"armorInventory",
"[",
"i",
"]",
"!=",
"null",
"&&",
"armorInventory",
"[",
"i",
"]",
".",
"isStackEqual",
"(",
"par1ItemStack",
")",
")",
"{",
"return",
"true",
";",
"}",
"}",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
"mainInventory",
".",
"length",
";",
"j",
"++",
")",
"{",
"if",
"(",
"mainInventory",
"[",
"j",
"]",
"!=",
"null",
"&&",
"mainInventory",
"[",
"j",
"]",
".",
"isStackEqual",
"(",
"par1ItemStack",
")",
")",
"{",
"return",
"true",
";",
"}",
"}",
"return",
"false",
";",
"}",
"public",
"void",
"openChest",
"(",
")",
"{",
"}",
"public",
"void",
"closeChest",
"(",
")",
"{",
"}",
"public",
"void",
"copyInventory",
"(",
"InventoryPlayer",
"par1InventoryPlayer",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"mainInventory",
".",
"length",
";",
"i",
"++",
")",
"{",
"mainInventory",
"[",
"i",
"]",
"=",
"ItemStack",
".",
"copyItemStack",
"(",
"par1InventoryPlayer",
".",
"mainInventory",
"[",
"i",
"]",
")",
";",
"}",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
"armorInventory",
".",
"length",
";",
"j",
"++",
")",
"{",
"armorInventory",
"[",
"j",
"]",
"=",
"ItemStack",
".",
"copyItemStack",
"(",
"par1InventoryPlayer",
".",
"armorInventory",
"[",
"j",
"]",
")",
";",
"}",
"}",
"}",
"</s>"
] |
9,544 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"EntitySlime",
"extends",
"EntityLiving",
"implements",
"IMob",
"{",
"public",
"float",
"field_40122_a",
";",
"public",
"float",
"field_401_a",
";",
"public",
"float",
"field_400_b",
";",
"private",
"int",
"slimeJumpDelay",
";",
"public",
"EntitySlime",
"(",
"World",
"par1World",
")",
"{",
"super",
"(",
"par1World",
")",
";",
"slimeJumpDelay",
"=",
"0",
";",
"texture",
"=",
"\"\"",
";",
"int",
"i",
"=",
"1",
"<<",
"rand",
".",
"nextInt",
"(",
"3",
")",
";",
"yOffset",
"=",
"0.0F",
";",
"slimeJumpDelay",
"=",
"rand",
".",
"nextInt",
"(",
"20",
")",
"+",
"10",
";",
"setSlimeSize",
"(",
"i",
")",
";",
"}",
"protected",
"void",
"entityInit",
"(",
")",
"{",
"super",
".",
"entityInit",
"(",
")",
";",
"dataWatcher",
".",
"addObject",
"(",
"16",
",",
"new",
"Byte",
"(",
"(",
"byte",
")",
"1",
")",
")",
";",
"}",
"public",
"void",
"setSlimeSize",
"(",
"int",
"par1",
")",
"{",
"dataWatcher",
".",
"updateObject",
"(",
"16",
",",
"new",
"Byte",
"(",
"(",
"byte",
")",
"par1",
")",
")",
";",
"setSize",
"(",
"0.6F",
"*",
"(",
"float",
")",
"par1",
",",
"0.6F",
"*",
"(",
"float",
")",
"par1",
")",
";",
"setPosition",
"(",
"posX",
",",
"posY",
",",
"posZ",
")",
";",
"setEntityHealth",
"(",
"getMaxHealth",
"(",
")",
")",
";",
"experienceValue",
"=",
"par1",
";",
"}",
"public",
"int",
"getMaxHealth",
"(",
")",
"{",
"int",
"i",
"=",
"getSlimeSize",
"(",
")",
";",
"return",
"i",
"*",
"i",
";",
"}",
"public",
"int",
"getSlimeSize",
"(",
")",
"{",
"return",
"dataWatcher",
".",
"getWatchableObjectByte",
"(",
"16",
")",
";",
"}",
"public",
"void",
"writeEntityToNBT",
"(",
"NBTTagCompound",
"par1NBTTagCompound",
")",
"{",
"super",
".",
"writeEntityToNBT",
"(",
"par1NBTTagCompound",
")",
";",
"par1NBTTagCompound",
".",
"setInteger",
"(",
"\"Size\"",
",",
"getSlimeSize",
"(",
")",
"-",
"1",
")",
";",
"}",
"public",
"void",
"readEntityFromNBT",
"(",
"NBTTagCompound",
"par1NBTTagCompound",
")",
"{",
"super",
".",
"readEntityFromNBT",
"(",
"par1NBTTagCompound",
")",
";",
"setSlimeSize",
"(",
"par1NBTTagCompound",
".",
"getInteger",
"(",
"\"Size\"",
")",
"+",
"1",
")",
";",
"}",
"protected",
"String",
"getSlimeParticle",
"(",
")",
"{",
"return",
"\"slime\"",
";",
"}",
"protected",
"String",
"func_40118_E",
"(",
")",
"{",
"return",
"\"mob.slime\"",
";",
"}",
"public",
"void",
"onUpdate",
"(",
")",
"{",
"if",
"(",
"!",
"worldObj",
".",
"isRemote",
"&&",
"worldObj",
".",
"difficultySetting",
"==",
"0",
"&&",
"getSlimeSize",
"(",
")",
">",
"0",
")",
"{",
"isDead",
"=",
"true",
";",
"}",
"field_401_a",
"=",
"field_401_a",
"+",
"(",
"field_40122_a",
"-",
"field_401_a",
")",
"*",
"0.5F",
";",
"field_400_b",
"=",
"field_401_a",
";",
"boolean",
"flag",
"=",
"onGround",
";",
"super",
".",
"onUpdate",
"(",
")",
";",
"if",
"(",
"onGround",
"&&",
"!",
"flag",
")",
"{",
"int",
"i",
"=",
"getSlimeSize",
"(",
")",
";",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
"i",
"*",
"8",
";",
"j",
"++",
")",
"{",
"float",
"f",
"=",
"rand",
".",
"nextFloat",
"(",
")",
"*",
"(",
"float",
")",
"Math",
".",
"PI",
"*",
"2.0F",
";",
"float",
"f1",
"=",
"rand",
".",
"nextFloat",
"(",
")",
"*",
"0.5F",
"+",
"0.5F",
";",
"float",
"f2",
"=",
"MathHelper",
".",
"sin",
"(",
"f",
")",
"*",
"(",
"float",
")",
"i",
"*",
"0.5F",
"*",
"f1",
";",
"float",
"f3",
"=",
"MathHelper",
".",
"cos",
"(",
"f",
")",
"*",
"(",
"float",
")",
"i",
"*",
"0.5F",
"*",
"f1",
";",
"worldObj",
".",
"spawnParticle",
"(",
"getSlimeParticle",
"(",
")",
",",
"posX",
"+",
"(",
"double",
")",
"f2",
",",
"boundingBox",
".",
"minY",
",",
"posZ",
"+",
"(",
"double",
")",
"f3",
",",
"0.0D",
",",
"0.0D",
",",
"0.0D",
")",
";",
"}",
"if",
"(",
"func_40121_G",
"(",
")",
")",
"{",
"worldObj",
".",
"playSoundAtEntity",
"(",
"this",
",",
"func_40118_E",
"(",
")",
",",
"getSoundVolume",
"(",
")",
",",
"(",
"(",
"rand",
".",
"nextFloat",
"(",
")",
"-",
"rand",
".",
"nextFloat",
"(",
")",
")",
"*",
"0.2F",
"+",
"1.0F",
")",
"/",
"0.8F",
")",
";",
"}",
"field_40122_a",
"=",
"-",
"0.5F",
";",
"}",
"func_40116_B",
"(",
")",
";",
"}",
"protected",
"void",
"updateEntityActionState",
"(",
")",
"{",
"despawnEntity",
"(",
")",
";",
"EntityPlayer",
"entityplayer",
"=",
"worldObj",
".",
"getClosestVulnerablePlayerToEntity",
"(",
"this",
",",
"16D",
")",
";",
"if",
"(",
"entityplayer",
"!=",
"null",
")",
"{",
"faceEntity",
"(",
"entityplayer",
",",
"10F",
",",
"20F",
")",
";",
"}",
"if",
"(",
"onGround",
"&&",
"slimeJumpDelay",
"--",
"<=",
"0",
")",
"{",
"slimeJumpDelay",
"=",
"func_40115_A",
"(",
")",
";",
"if",
"(",
"entityplayer",
"!=",
"null",
")",
"{",
"slimeJumpDelay",
"/=",
"3",
";",
"}",
"isJumping",
"=",
"true",
";",
"if",
"(",
"func_40117_I",
"(",
")",
")",
"{",
"worldObj",
".",
"playSoundAtEntity",
"(",
"this",
",",
"func_40118_E",
"(",
")",
",",
"getSoundVolume",
"(",
")",
",",
"(",
"(",
"rand",
".",
"nextFloat",
"(",
")",
"-",
"rand",
".",
"nextFloat",
"(",
")",
")",
"*",
"0.2F",
"+",
"1.0F",
")",
"*",
"0.8F",
")",
";",
"}",
"field_40122_a",
"=",
"1.0F",
";",
"moveStrafing",
"=",
"1.0F",
"-",
"rand",
".",
"nextFloat",
"(",
")",
"*",
"2.0F",
";",
"moveForward",
"=",
"1",
"*",
"getSlimeSize",
"(",
")",
";",
"}",
"else",
"{",
"isJumping",
"=",
"false",
";",
"if",
"(",
"onGround",
")",
"{",
"moveStrafing",
"=",
"moveForward",
"=",
"0.0F",
";",
"}",
"}",
"}",
"protected",
"void",
"func_40116_B",
"(",
")",
"{",
"field_40122_a",
"=",
"field_40122_a",
"*",
"0.6F",
";",
"}",
"protected",
"int",
"func_40115_A",
"(",
")",
"{",
"return",
"rand",
".",
"nextInt",
"(",
"20",
")",
"+",
"10",
";",
"}",
"protected",
"EntitySlime",
"createInstance",
"(",
")",
"{",
"return",
"new",
"EntitySlime",
"(",
"worldObj",
")",
";",
"}",
"public",
"void",
"setDead",
"(",
")",
"{",
"int",
"i",
"=",
"getSlimeSize",
"(",
")",
";",
"if",
"(",
"!",
"worldObj",
".",
"isRemote",
"&&",
"i",
">",
"1",
"&&",
"getHealth",
"(",
")",
"<=",
"0",
")",
"{",
"int",
"j",
"=",
"2",
"+",
"rand",
".",
"nextInt",
"(",
"3",
")",
";",
"for",
"(",
"int",
"k",
"=",
"0",
";",
"k",
"<",
"j",
";",
"k",
"++",
")",
"{",
"float",
"f",
"=",
"(",
"(",
"(",
"float",
")",
"(",
"k",
"%",
"2",
")",
"-",
"0.5F",
")",
"*",
"(",
"float",
")",
"i",
")",
"/",
"4F",
";",
"float",
"f1",
"=",
"(",
"(",
"(",
"float",
")",
"(",
"k",
"/",
"2",
")",
"-",
"0.5F",
")",
"*",
"(",
"float",
")",
"i",
")",
"/",
"4F",
";",
"EntitySlime",
"entityslime",
"=",
"createInstance",
"(",
")",
";",
"entityslime",
".",
"setSlimeSize",
"(",
"i",
"/",
"2",
")",
";",
"entityslime",
".",
"setLocationAndAngles",
"(",
"posX",
"+",
"(",
"double",
")",
"f",
",",
"posY",
"+",
"0.5D",
",",
"posZ",
"+",
"(",
"double",
")",
"f1",
",",
"rand",
".",
"nextFloat",
"(",
")",
"*",
"360F",
",",
"0.0F",
")",
";",
"worldObj",
".",
"spawnEntityInWorld",
"(",
"entityslime",
")",
";",
"}",
"}",
"super",
".",
"setDead",
"(",
")",
";",
"}",
"public",
"void",
"onCollideWithPlayer",
"(",
"EntityPlayer",
"par1EntityPlayer",
")",
"{",
"if",
"(",
"func_40119_C",
"(",
")",
")",
"{",
"int",
"i",
"=",
"getSlimeSize",
"(",
")",
";",
"if",
"(",
"canEntityBeSeen",
"(",
"par1EntityPlayer",
")",
"&&",
"(",
"double",
")",
"getDistanceToEntity",
"(",
"par1EntityPlayer",
")",
"<",
"0.59999999999999998D",
"*",
"(",
"double",
")",
"i",
"&&",
"par1EntityPlayer",
".",
"attackEntityFrom",
"(",
"DamageSource",
".",
"causeMobDamage",
"(",
"this",
")",
",",
"func_40113_D",
"(",
")",
")",
")",
"{",
"worldObj",
".",
"playSoundAtEntity",
"(",
"this",
",",
"\"\"",
",",
"1.0F",
",",
"(",
"rand",
".",
"nextFloat",
"(",
")",
"-",
"rand",
".",
"nextFloat",
"(",
")",
")",
"*",
"0.2F",
"+",
"1.0F",
")",
";",
"}",
"}",
"}",
"protected",
"boolean",
"func_40119_C",
"(",
")",
"{",
"return",
"getSlimeSize",
"(",
")",
">",
"1",
";",
"}",
"protected",
"int",
"func_40113_D",
"(",
")",
"{",
"return",
"getSlimeSize",
"(",
")",
";",
"}",
"protected",
"String",
"getHurtSound",
"(",
")",
"{",
"return",
"\"mob.slime\"",
";",
"}",
"protected",
"String",
"getDeathSound",
"(",
")",
"{",
"return",
"\"mob.slime\"",
";",
"}",
"protected",
"int",
"getDropItemId",
"(",
")",
"{",
"if",
"(",
"getSlimeSize",
"(",
")",
"==",
"1",
")",
"{",
"return",
"Item",
".",
"slimeBall",
".",
"shiftedIndex",
";",
"}",
"else",
"{",
"return",
"0",
";",
"}",
"}",
"public",
"boolean",
"getCanSpawnHere",
"(",
")",
"{",
"Chunk",
"chunk",
"=",
"worldObj",
".",
"getChunkFromBlockCoords",
"(",
"MathHelper",
".",
"floor_double",
"(",
"posX",
")",
",",
"MathHelper",
".",
"floor_double",
"(",
"posZ",
")",
")",
";",
"if",
"(",
"(",
"getSlimeSize",
"(",
")",
"==",
"1",
"||",
"worldObj",
".",
"difficultySetting",
">",
"0",
")",
"&&",
"rand",
".",
"nextInt",
"(",
"10",
")",
"==",
"0",
"&&",
"chunk",
".",
"getRandomWithSeed",
"(",
"0x3ad8025fL",
")",
".",
"nextInt",
"(",
"10",
")",
"==",
"0",
"&&",
"posY",
"<",
"40D",
")",
"{",
"return",
"super",
".",
"getCanSpawnHere",
"(",
")",
";",
"}",
"else",
"{",
"return",
"false",
";",
"}",
"}",
"protected",
"float",
"getSoundVolume",
"(",
")",
"{",
"return",
"0.4F",
"*",
"(",
"float",
")",
"getSlimeSize",
"(",
")",
";",
"}",
"public",
"int",
"getVerticalFaceSpeed",
"(",
")",
"{",
"return",
"0",
";",
"}",
"protected",
"boolean",
"func_40117_I",
"(",
")",
"{",
"return",
"getSlimeSize",
"(",
")",
">",
"1",
";",
"}",
"protected",
"boolean",
"func_40121_G",
"(",
")",
"{",
"return",
"getSlimeSize",
"(",
")",
">",
"2",
";",
"}",
"}",
"</s>"
] |
9,545 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"WorldGenSand",
"extends",
"WorldGenerator",
"{",
"private",
"int",
"sandID",
";",
"private",
"int",
"radius",
";",
"public",
"WorldGenSand",
"(",
"int",
"par1",
",",
"int",
"par2",
")",
"{",
"sandID",
"=",
"par2",
";",
"radius",
"=",
"par1",
";",
"}",
"public",
"boolean",
"generate",
"(",
"World",
"par1World",
",",
"Random",
"par2Random",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
")",
"{",
"if",
"(",
"par1World",
".",
"getBlockMaterial",
"(",
"par3",
",",
"par4",
",",
"par5",
")",
"!=",
"Material",
".",
"water",
")",
"{",
"return",
"false",
";",
"}",
"int",
"i",
"=",
"par2Random",
".",
"nextInt",
"(",
"radius",
"-",
"2",
")",
"+",
"2",
";",
"byte",
"byte0",
"=",
"2",
";",
"for",
"(",
"int",
"j",
"=",
"par3",
"-",
"i",
";",
"j",
"<=",
"par3",
"+",
"i",
";",
"j",
"++",
")",
"{",
"for",
"(",
"int",
"k",
"=",
"par5",
"-",
"i",
";",
"k",
"<=",
"par5",
"+",
"i",
";",
"k",
"++",
")",
"{",
"int",
"l",
"=",
"j",
"-",
"par3",
";",
"int",
"i1",
"=",
"k",
"-",
"par5",
";",
"if",
"(",
"l",
"*",
"l",
"+",
"i1",
"*",
"i1",
">",
"i",
"*",
"i",
")",
"{",
"continue",
";",
"}",
"for",
"(",
"int",
"j1",
"=",
"par4",
"-",
"byte0",
";",
"j1",
"<=",
"par4",
"+",
"byte0",
";",
"j1",
"++",
")",
"{",
"int",
"k1",
"=",
"par1World",
".",
"getBlockId",
"(",
"j",
",",
"j1",
",",
"k",
")",
";",
"if",
"(",
"k1",
"==",
"Block",
".",
"dirt",
".",
"blockID",
"||",
"k1",
"==",
"Block",
".",
"grass",
".",
"blockID",
")",
"{",
"par1World",
".",
"setBlock",
"(",
"j",
",",
"j1",
",",
"k",
",",
"sandID",
")",
";",
"}",
"}",
"}",
"}",
"return",
"true",
";",
"}",
"}",
"</s>"
] |
9,546 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"ComponentStrongholdStraight",
"extends",
"ComponentStronghold",
"{",
"private",
"final",
"EnumDoor",
"doorType",
";",
"private",
"final",
"boolean",
"expandsX",
";",
"private",
"final",
"boolean",
"expandsZ",
";",
"public",
"ComponentStrongholdStraight",
"(",
"int",
"par1",
",",
"Random",
"par2Random",
",",
"StructureBoundingBox",
"par3StructureBoundingBox",
",",
"int",
"par4",
")",
"{",
"super",
"(",
"par1",
")",
";",
"coordBaseMode",
"=",
"par4",
";",
"doorType",
"=",
"getRandomDoor",
"(",
"par2Random",
")",
";",
"boundingBox",
"=",
"par3StructureBoundingBox",
";",
"expandsX",
"=",
"par2Random",
".",
"nextInt",
"(",
"2",
")",
"==",
"0",
";",
"expandsZ",
"=",
"par2Random",
".",
"nextInt",
"(",
"2",
")",
"==",
"0",
";",
"}",
"public",
"void",
"buildComponent",
"(",
"StructureComponent",
"par1StructureComponent",
",",
"List",
"par2List",
",",
"Random",
"par3Random",
")",
"{",
"getNextComponentNormal",
"(",
"(",
"ComponentStrongholdStairs2",
")",
"par1StructureComponent",
",",
"par2List",
",",
"par3Random",
",",
"1",
",",
"1",
")",
";",
"if",
"(",
"expandsX",
")",
"{",
"getNextComponentX",
"(",
"(",
"ComponentStrongholdStairs2",
")",
"par1StructureComponent",
",",
"par2List",
",",
"par3Random",
",",
"1",
",",
"2",
")",
";",
"}",
"if",
"(",
"expandsZ",
")",
"{",
"getNextComponentZ",
"(",
"(",
"ComponentStrongholdStairs2",
")",
"par1StructureComponent",
",",
"par2List",
",",
"par3Random",
",",
"1",
",",
"2",
")",
";",
"}",
"}",
"public",
"static",
"ComponentStrongholdStraight",
"findValidPlacement",
"(",
"List",
"par0List",
",",
"Random",
"par1Random",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
",",
"int",
"par6",
")",
"{",
"StructureBoundingBox",
"structureboundingbox",
"=",
"StructureBoundingBox",
".",
"getComponentToAddBoundingBox",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"-",
"1",
",",
"-",
"1",
",",
"0",
",",
"5",
",",
"5",
",",
"7",
",",
"par5",
")",
";",
"if",
"(",
"!",
"canStrongholdGoDeeper",
"(",
"structureboundingbox",
")",
"||",
"StructureComponent",
".",
"findIntersecting",
"(",
"par0List",
",",
"structureboundingbox",
")",
"!=",
"null",
")",
"{",
"return",
"null",
";",
"}",
"else",
"{",
"return",
"new",
"ComponentStrongholdStraight",
"(",
"par6",
",",
"par1Random",
",",
"structureboundingbox",
",",
"par5",
")",
";",
"}",
"}",
"public",
"boolean",
"addComponentParts",
"(",
"World",
"par1World",
",",
"Random",
"par2Random",
",",
"StructureBoundingBox",
"par3StructureBoundingBox",
")",
"{",
"if",
"(",
"isLiquidInStructureBoundingBox",
"(",
"par1World",
",",
"par3StructureBoundingBox",
")",
")",
"{",
"return",
"false",
";",
"}",
"fillWithRandomizedBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"0",
",",
"0",
",",
"0",
",",
"4",
",",
"4",
",",
"6",
",",
"true",
",",
"par2Random",
",",
"StructureStrongholdPieces",
".",
"getStrongholdStones",
"(",
")",
")",
";",
"placeDoor",
"(",
"par1World",
",",
"par2Random",
",",
"par3StructureBoundingBox",
",",
"doorType",
",",
"1",
",",
"1",
",",
"0",
")",
";",
"placeDoor",
"(",
"par1World",
",",
"par2Random",
",",
"par3StructureBoundingBox",
",",
"EnumDoor",
".",
"OPENING",
",",
"1",
",",
"1",
",",
"6",
")",
";",
"randomlyPlaceBlock",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"par2Random",
",",
"0.1F",
",",
"1",
",",
"2",
",",
"1",
",",
"Block",
".",
"torchWood",
".",
"blockID",
",",
"0",
")",
";",
"randomlyPlaceBlock",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"par2Random",
",",
"0.1F",
",",
"3",
",",
"2",
",",
"1",
",",
"Block",
".",
"torchWood",
".",
"blockID",
",",
"0",
")",
";",
"randomlyPlaceBlock",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"par2Random",
",",
"0.1F",
",",
"1",
",",
"2",
",",
"5",
",",
"Block",
".",
"torchWood",
".",
"blockID",
",",
"0",
")",
";",
"randomlyPlaceBlock",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"par2Random",
",",
"0.1F",
",",
"3",
",",
"2",
",",
"5",
",",
"Block",
".",
"torchWood",
".",
"blockID",
",",
"0",
")",
";",
"if",
"(",
"expandsX",
")",
"{",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"0",
",",
"1",
",",
"2",
",",
"0",
",",
"3",
",",
"4",
",",
"0",
",",
"0",
",",
"false",
")",
";",
"}",
"if",
"(",
"expandsZ",
")",
"{",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"4",
",",
"1",
",",
"2",
",",
"4",
",",
"3",
",",
"4",
",",
"0",
",",
"0",
",",
"false",
")",
";",
"}",
"return",
"true",
";",
"}",
"}",
"</s>"
] |
9,547 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"BlockFarmland",
"extends",
"Block",
"{",
"protected",
"BlockFarmland",
"(",
"int",
"par1",
")",
"{",
"super",
"(",
"par1",
",",
"Material",
".",
"ground",
")",
";",
"blockIndexInTexture",
"=",
"87",
";",
"setTickRandomly",
"(",
"true",
")",
";",
"setBlockBounds",
"(",
"0.0F",
",",
"0.0F",
",",
"0.0F",
",",
"1.0F",
",",
"0.9375F",
",",
"1.0F",
")",
";",
"setLightOpacity",
"(",
"255",
")",
";",
"}",
"public",
"AxisAlignedBB",
"getCollisionBoundingBoxFromPool",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"return",
"AxisAlignedBB",
".",
"getBoundingBoxFromPool",
"(",
"par2",
"+",
"0",
",",
"par3",
"+",
"0",
",",
"par4",
"+",
"0",
",",
"par2",
"+",
"1",
",",
"par3",
"+",
"1",
",",
"par4",
"+",
"1",
")",
";",
"}",
"public",
"boolean",
"isOpaqueCube",
"(",
")",
"{",
"return",
"false",
";",
"}",
"public",
"boolean",
"renderAsNormalBlock",
"(",
")",
"{",
"return",
"false",
";",
"}",
"public",
"int",
"getBlockTextureFromSideAndMetadata",
"(",
"int",
"par1",
",",
"int",
"par2",
")",
"{",
"if",
"(",
"par1",
"==",
"1",
"&&",
"par2",
">",
"0",
")",
"{",
"return",
"blockIndexInTexture",
"-",
"1",
";",
"}",
"if",
"(",
"par1",
"==",
"1",
")",
"{",
"return",
"blockIndexInTexture",
";",
"}",
"else",
"{",
"return",
"2",
";",
"}",
"}",
"public",
"void",
"updateTick",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"Random",
"par5Random",
")",
"{",
"if",
"(",
"isWaterNearby",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
")",
"||",
"par1World",
".",
"canLightningStrikeAt",
"(",
"par2",
",",
"par3",
"+",
"1",
",",
"par4",
")",
")",
"{",
"par1World",
".",
"setBlockMetadataWithNotify",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"7",
")",
";",
"}",
"else",
"{",
"int",
"i",
"=",
"par1World",
".",
"getBlockMetadata",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"if",
"(",
"i",
">",
"0",
")",
"{",
"par1World",
".",
"setBlockMetadataWithNotify",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"i",
"-",
"1",
")",
";",
"}",
"else",
"if",
"(",
"!",
"isCropsNearby",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
")",
")",
"{",
"par1World",
".",
"setBlockWithNotify",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"Block",
".",
"dirt",
".",
"blockID",
")",
";",
"}",
"}",
"}",
"public",
"void",
"onFallenUpon",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"Entity",
"par5Entity",
",",
"float",
"par6",
")",
"{",
"if",
"(",
"par1World",
".",
"rand",
".",
"nextFloat",
"(",
")",
"<",
"par6",
"-",
"0.5F",
")",
"{",
"par1World",
".",
"setBlockWithNotify",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"Block",
".",
"dirt",
".",
"blockID",
")",
";",
"}",
"}",
"private",
"boolean",
"isCropsNearby",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"int",
"i",
"=",
"0",
";",
"for",
"(",
"int",
"j",
"=",
"par2",
"-",
"i",
";",
"j",
"<=",
"par2",
"+",
"i",
";",
"j",
"++",
")",
"{",
"for",
"(",
"int",
"k",
"=",
"par4",
"-",
"i",
";",
"k",
"<=",
"par4",
"+",
"i",
";",
"k",
"++",
")",
"{",
"int",
"l",
"=",
"par1World",
".",
"getBlockId",
"(",
"j",
",",
"par3",
"+",
"1",
",",
"k",
")",
";",
"if",
"(",
"l",
"==",
"Block",
".",
"crops",
".",
"blockID",
"||",
"l",
"==",
"Block",
".",
"melonStem",
".",
"blockID",
"||",
"l",
"==",
"Block",
".",
"pumpkinStem",
".",
"blockID",
")",
"{",
"return",
"true",
";",
"}",
"}",
"}",
"return",
"false",
";",
"}",
"private",
"boolean",
"isWaterNearby",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"par2",
"-",
"4",
";",
"i",
"<=",
"par2",
"+",
"4",
";",
"i",
"++",
")",
"{",
"for",
"(",
"int",
"j",
"=",
"par3",
";",
"j",
"<=",
"par3",
"+",
"1",
";",
"j",
"++",
")",
"{",
"for",
"(",
"int",
"k",
"=",
"par4",
"-",
"4",
";",
"k",
"<=",
"par4",
"+",
"4",
";",
"k",
"++",
")",
"{",
"if",
"(",
"par1World",
".",
"getBlockMaterial",
"(",
"i",
",",
"j",
",",
"k",
")",
"==",
"Material",
".",
"water",
")",
"{",
"return",
"true",
";",
"}",
"}",
"}",
"}",
"return",
"false",
";",
"}",
"public",
"void",
"onNeighborBlockChange",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
")",
"{",
"super",
".",
"onNeighborBlockChange",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
",",
"par5",
")",
";",
"Material",
"material",
"=",
"par1World",
".",
"getBlockMaterial",
"(",
"par2",
",",
"par3",
"+",
"1",
",",
"par4",
")",
";",
"if",
"(",
"material",
".",
"isSolid",
"(",
")",
")",
"{",
"par1World",
".",
"setBlockWithNotify",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"Block",
".",
"dirt",
".",
"blockID",
")",
";",
"}",
"}",
"public",
"int",
"idDropped",
"(",
"int",
"par1",
",",
"Random",
"par2Random",
",",
"int",
"par3",
")",
"{",
"return",
"Block",
".",
"dirt",
".",
"idDropped",
"(",
"0",
",",
"par2Random",
",",
"par3",
")",
";",
"}",
"}",
"</s>"
] |
9,548 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"class",
"StructureVillagePieceWeight",
"{",
"public",
"Class",
"villagePieceClass",
";",
"public",
"final",
"int",
"villagePieceWeight",
";",
"public",
"int",
"villagePiecesSpawned",
";",
"public",
"int",
"villagePiecesLimit",
";",
"public",
"StructureVillagePieceWeight",
"(",
"Class",
"par1Class",
",",
"int",
"par2",
",",
"int",
"par3",
")",
"{",
"villagePieceClass",
"=",
"par1Class",
";",
"villagePieceWeight",
"=",
"par2",
";",
"villagePiecesLimit",
"=",
"par3",
";",
"}",
"public",
"boolean",
"canSpawnMoreVillagePiecesOfType",
"(",
"int",
"par1",
")",
"{",
"return",
"villagePiecesLimit",
"==",
"0",
"||",
"villagePiecesSpawned",
"<",
"villagePiecesLimit",
";",
"}",
"public",
"boolean",
"canSpawnMoreVillagePieces",
"(",
")",
"{",
"return",
"villagePiecesLimit",
"==",
"0",
"||",
"villagePiecesSpawned",
"<",
"villagePiecesLimit",
";",
"}",
"}",
"</s>"
] |
9,549 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"*",
";",
"class",
"StructureStrongholdStart",
"extends",
"StructureStart",
"{",
"public",
"StructureStrongholdStart",
"(",
"World",
"par1World",
",",
"Random",
"par2Random",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"StructureStrongholdPieces",
".",
"prepareStructurePieces",
"(",
")",
";",
"ComponentStrongholdStairs2",
"componentstrongholdstairs2",
"=",
"new",
"ComponentStrongholdStairs2",
"(",
"0",
",",
"par2Random",
",",
"(",
"par3",
"<<",
"4",
")",
"+",
"2",
",",
"(",
"par4",
"<<",
"4",
")",
"+",
"2",
")",
";",
"components",
".",
"add",
"(",
"componentstrongholdstairs2",
")",
";",
"componentstrongholdstairs2",
".",
"buildComponent",
"(",
"componentstrongholdstairs2",
",",
"components",
",",
"par2Random",
")",
";",
"StructureComponent",
"structurecomponent",
";",
"for",
"(",
"ArrayList",
"arraylist",
"=",
"componentstrongholdstairs2",
".",
"field_35328_b",
";",
"!",
"arraylist",
".",
"isEmpty",
"(",
")",
";",
"structurecomponent",
".",
"buildComponent",
"(",
"componentstrongholdstairs2",
",",
"components",
",",
"par2Random",
")",
")",
"{",
"int",
"i",
"=",
"par2Random",
".",
"nextInt",
"(",
"arraylist",
".",
"size",
"(",
")",
")",
";",
"structurecomponent",
"=",
"(",
"StructureComponent",
")",
"arraylist",
".",
"remove",
"(",
"i",
")",
";",
"}",
"updateBoundingBox",
"(",
")",
";",
"markAvailableHeight",
"(",
"par1World",
",",
"par2Random",
",",
"10",
")",
";",
"}",
"}",
"</s>"
] |
9,550 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"WorldGenGlowStone2",
"extends",
"WorldGenerator",
"{",
"public",
"WorldGenGlowStone2",
"(",
")",
"{",
"}",
"public",
"boolean",
"generate",
"(",
"World",
"par1World",
",",
"Random",
"par2Random",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
")",
"{",
"if",
"(",
"!",
"par1World",
".",
"isAirBlock",
"(",
"par3",
",",
"par4",
",",
"par5",
")",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"par1World",
".",
"getBlockId",
"(",
"par3",
",",
"par4",
"+",
"1",
",",
"par5",
")",
"!=",
"Block",
".",
"netherrack",
".",
"blockID",
")",
"{",
"return",
"false",
";",
"}",
"par1World",
".",
"setBlockWithNotify",
"(",
"par3",
",",
"par4",
",",
"par5",
",",
"Block",
".",
"glowStone",
".",
"blockID",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"1500",
";",
"i",
"++",
")",
"{",
"int",
"j",
"=",
"(",
"par3",
"+",
"par2Random",
".",
"nextInt",
"(",
"8",
")",
")",
"-",
"par2Random",
".",
"nextInt",
"(",
"8",
")",
";",
"int",
"k",
"=",
"par4",
"-",
"par2Random",
".",
"nextInt",
"(",
"12",
")",
";",
"int",
"l",
"=",
"(",
"par5",
"+",
"par2Random",
".",
"nextInt",
"(",
"8",
")",
")",
"-",
"par2Random",
".",
"nextInt",
"(",
"8",
")",
";",
"if",
"(",
"par1World",
".",
"getBlockId",
"(",
"j",
",",
"k",
",",
"l",
")",
"!=",
"0",
")",
"{",
"continue",
";",
"}",
"int",
"i1",
"=",
"0",
";",
"for",
"(",
"int",
"j1",
"=",
"0",
";",
"j1",
"<",
"6",
";",
"j1",
"++",
")",
"{",
"int",
"k1",
"=",
"0",
";",
"if",
"(",
"j1",
"==",
"0",
")",
"{",
"k1",
"=",
"par1World",
".",
"getBlockId",
"(",
"j",
"-",
"1",
",",
"k",
",",
"l",
")",
";",
"}",
"if",
"(",
"j1",
"==",
"1",
")",
"{",
"k1",
"=",
"par1World",
".",
"getBlockId",
"(",
"j",
"+",
"1",
",",
"k",
",",
"l",
")",
";",
"}",
"if",
"(",
"j1",
"==",
"2",
")",
"{",
"k1",
"=",
"par1World",
".",
"getBlockId",
"(",
"j",
",",
"k",
"-",
"1",
",",
"l",
")",
";",
"}",
"if",
"(",
"j1",
"==",
"3",
")",
"{",
"k1",
"=",
"par1World",
".",
"getBlockId",
"(",
"j",
",",
"k",
"+",
"1",
",",
"l",
")",
";",
"}",
"if",
"(",
"j1",
"==",
"4",
")",
"{",
"k1",
"=",
"par1World",
".",
"getBlockId",
"(",
"j",
",",
"k",
",",
"l",
"-",
"1",
")",
";",
"}",
"if",
"(",
"j1",
"==",
"5",
")",
"{",
"k1",
"=",
"par1World",
".",
"getBlockId",
"(",
"j",
",",
"k",
",",
"l",
"+",
"1",
")",
";",
"}",
"if",
"(",
"k1",
"==",
"Block",
".",
"glowStone",
".",
"blockID",
")",
"{",
"i1",
"++",
";",
"}",
"}",
"if",
"(",
"i1",
"==",
"1",
")",
"{",
"par1World",
".",
"setBlockWithNotify",
"(",
"j",
",",
"k",
",",
"l",
",",
"Block",
".",
"glowStone",
".",
"blockID",
")",
";",
"}",
"}",
"return",
"true",
";",
"}",
"}",
"</s>"
] |
9,551 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"BiomeGenTaiga",
"extends",
"BiomeGenBase",
"{",
"public",
"BiomeGenTaiga",
"(",
"int",
"par1",
")",
"{",
"super",
"(",
"par1",
")",
";",
"spawnableCreatureList",
".",
"add",
"(",
"new",
"SpawnListEntry",
"(",
"net",
".",
"minecraft",
".",
"src",
".",
"EntityWolf",
".",
"class",
",",
"8",
",",
"4",
",",
"4",
")",
")",
";",
"biomeDecorator",
".",
"treesPerChunk",
"=",
"10",
";",
"biomeDecorator",
".",
"grassPerChunk",
"=",
"1",
";",
"}",
"public",
"WorldGenerator",
"getRandomWorldGenForTrees",
"(",
"Random",
"par1Random",
")",
"{",
"if",
"(",
"par1Random",
".",
"nextInt",
"(",
"3",
")",
"==",
"0",
")",
"{",
"return",
"new",
"WorldGenTaiga1",
"(",
")",
";",
"}",
"else",
"{",
"return",
"new",
"WorldGenTaiga2",
"(",
"false",
")",
";",
"}",
"}",
"}",
"</s>"
] |
9,552 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"class",
"BlockWorkbench",
"extends",
"Block",
"{",
"protected",
"BlockWorkbench",
"(",
"int",
"par1",
")",
"{",
"super",
"(",
"par1",
",",
"Material",
".",
"wood",
")",
";",
"blockIndexInTexture",
"=",
"59",
";",
"}",
"public",
"int",
"getBlockTextureFromSide",
"(",
"int",
"par1",
")",
"{",
"if",
"(",
"par1",
"==",
"1",
")",
"{",
"return",
"blockIndexInTexture",
"-",
"16",
";",
"}",
"if",
"(",
"par1",
"==",
"0",
")",
"{",
"return",
"Block",
".",
"planks",
".",
"getBlockTextureFromSide",
"(",
"0",
")",
";",
"}",
"if",
"(",
"par1",
"==",
"2",
"||",
"par1",
"==",
"4",
")",
"{",
"return",
"blockIndexInTexture",
"+",
"1",
";",
"}",
"else",
"{",
"return",
"blockIndexInTexture",
";",
"}",
"}",
"public",
"boolean",
"blockActivated",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"EntityPlayer",
"par5EntityPlayer",
")",
"{",
"if",
"(",
"par1World",
".",
"isRemote",
")",
"{",
"return",
"true",
";",
"}",
"else",
"{",
"par5EntityPlayer",
".",
"displayWorkbenchGUI",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"return",
"true",
";",
"}",
"}",
"}",
"</s>"
] |
9,553 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"class",
"NetworkReaderThread",
"extends",
"Thread",
"{",
"final",
"NetworkManager",
"netManager",
";",
"NetworkReaderThread",
"(",
"NetworkManager",
"par1NetworkManager",
",",
"String",
"par2Str",
")",
"{",
"super",
"(",
"par2Str",
")",
";",
"netManager",
"=",
"par1NetworkManager",
";",
"}",
"public",
"void",
"run",
"(",
")",
"{",
"synchronized",
"(",
"NetworkManager",
".",
"threadSyncObject",
")",
"{",
"NetworkManager",
".",
"numReadThreads",
"++",
";",
"}",
"try",
"{",
"while",
"(",
"NetworkManager",
".",
"isRunning",
"(",
"netManager",
")",
"&&",
"!",
"NetworkManager",
".",
"isServerTerminating",
"(",
"netManager",
")",
")",
"{",
"while",
"(",
"NetworkManager",
".",
"readNetworkPacket",
"(",
"netManager",
")",
")",
";",
"try",
"{",
"sleep",
"(",
"2L",
")",
";",
"}",
"catch",
"(",
"InterruptedException",
"interruptedexception",
")",
"{",
"}",
"}",
"}",
"finally",
"{",
"synchronized",
"(",
"NetworkManager",
".",
"threadSyncObject",
")",
"{",
"NetworkManager",
".",
"numReadThreads",
"--",
";",
"}",
"}",
"}",
"}",
"</s>"
] |
9,554 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"BlockSapling",
"extends",
"BlockFlower",
"{",
"protected",
"BlockSapling",
"(",
"int",
"par1",
",",
"int",
"par2",
")",
"{",
"super",
"(",
"par1",
",",
"par2",
")",
";",
"float",
"f",
"=",
"0.4F",
";",
"setBlockBounds",
"(",
"0.5F",
"-",
"f",
",",
"0.0F",
",",
"0.5F",
"-",
"f",
",",
"0.5F",
"+",
"f",
",",
"f",
"*",
"2.0F",
",",
"0.5F",
"+",
"f",
")",
";",
"}",
"public",
"void",
"updateTick",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"Random",
"par5Random",
")",
"{",
"if",
"(",
"par1World",
".",
"isRemote",
")",
"{",
"return",
";",
"}",
"super",
".",
"updateTick",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
",",
"par5Random",
")",
";",
"if",
"(",
"par1World",
".",
"getBlockLightValue",
"(",
"par2",
",",
"par3",
"+",
"1",
",",
"par4",
")",
">=",
"9",
"&&",
"par5Random",
".",
"nextInt",
"(",
"7",
")",
"==",
"0",
")",
"{",
"int",
"i",
"=",
"par1World",
".",
"getBlockMetadata",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"if",
"(",
"(",
"i",
"&",
"8",
")",
"==",
"0",
")",
"{",
"par1World",
".",
"setBlockMetadataWithNotify",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"i",
"|",
"8",
")",
";",
"}",
"else",
"{",
"growTree",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
",",
"par5Random",
")",
";",
"}",
"}",
"}",
"public",
"int",
"getBlockTextureFromSideAndMetadata",
"(",
"int",
"par1",
",",
"int",
"par2",
")",
"{",
"par2",
"&=",
"3",
";",
"if",
"(",
"par2",
"==",
"1",
")",
"{",
"return",
"63",
";",
"}",
"if",
"(",
"par2",
"==",
"2",
")",
"{",
"return",
"79",
";",
"}",
"if",
"(",
"par2",
"==",
"3",
")",
"{",
"return",
"30",
";",
"}",
"else",
"{",
"return",
"super",
".",
"getBlockTextureFromSideAndMetadata",
"(",
"par1",
",",
"par2",
")",
";",
"}",
"}",
"public",
"void",
"growTree",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"Random",
"par5Random",
")",
"{",
"int",
"i",
"=",
"par1World",
".",
"getBlockMetadata",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
"&",
"3",
";",
"Object",
"obj",
"=",
"null",
";",
"int",
"j",
"=",
"0",
";",
"int",
"k",
"=",
"0",
";",
"boolean",
"flag",
"=",
"false",
";",
"if",
"(",
"i",
"==",
"1",
")",
"{",
"obj",
"=",
"new",
"WorldGenTaiga2",
"(",
"true",
")",
";",
"}",
"else",
"if",
"(",
"i",
"==",
"2",
")",
"{",
"obj",
"=",
"new",
"WorldGenForest",
"(",
"true",
")",
";",
"}",
"else",
"if",
"(",
"i",
"==",
"3",
")",
"{",
"j",
"=",
"0",
";",
"do",
"{",
"if",
"(",
"j",
"<",
"-",
"1",
")",
"{",
"break",
";",
"}",
"k",
"=",
"0",
";",
"do",
"{",
"if",
"(",
"k",
"<",
"-",
"1",
")",
"{",
"break",
";",
"}",
"if",
"(",
"func_50010_f",
"(",
"par1World",
",",
"par2",
"+",
"j",
",",
"par3",
",",
"par4",
"+",
"k",
",",
"3",
")",
"&&",
"func_50010_f",
"(",
"par1World",
",",
"par2",
"+",
"j",
"+",
"1",
",",
"par3",
",",
"par4",
"+",
"k",
",",
"3",
")",
"&&",
"func_50010_f",
"(",
"par1World",
",",
"par2",
"+",
"j",
",",
"par3",
",",
"par4",
"+",
"k",
"+",
"1",
",",
"3",
")",
"&&",
"func_50010_f",
"(",
"par1World",
",",
"par2",
"+",
"j",
"+",
"1",
",",
"par3",
",",
"par4",
"+",
"k",
"+",
"1",
",",
"3",
")",
")",
"{",
"obj",
"=",
"new",
"WorldGenHugeTrees",
"(",
"true",
",",
"10",
"+",
"par5Random",
".",
"nextInt",
"(",
"20",
")",
",",
"3",
",",
"3",
")",
";",
"flag",
"=",
"true",
";",
"break",
";",
"}",
"k",
"--",
";",
"}",
"while",
"(",
"true",
")",
";",
"if",
"(",
"obj",
"!=",
"null",
")",
"{",
"break",
";",
"}",
"j",
"--",
";",
"}",
"while",
"(",
"true",
")",
";",
"if",
"(",
"obj",
"==",
"null",
")",
"{",
"j",
"=",
"k",
"=",
"0",
";",
"obj",
"=",
"new",
"WorldGenTrees",
"(",
"true",
",",
"4",
"+",
"par5Random",
".",
"nextInt",
"(",
"7",
")",
",",
"3",
",",
"3",
",",
"false",
")",
";",
"}",
"}",
"else",
"{",
"obj",
"=",
"new",
"WorldGenTrees",
"(",
"true",
")",
";",
"if",
"(",
"par5Random",
".",
"nextInt",
"(",
"10",
")",
"==",
"0",
")",
"{",
"obj",
"=",
"new",
"WorldGenBigTree",
"(",
"true",
")",
";",
"}",
"}",
"if",
"(",
"flag",
")",
"{",
"par1World",
".",
"setBlock",
"(",
"par2",
"+",
"j",
",",
"par3",
",",
"par4",
"+",
"k",
",",
"0",
")",
";",
"par1World",
".",
"setBlock",
"(",
"par2",
"+",
"j",
"+",
"1",
",",
"par3",
",",
"par4",
"+",
"k",
",",
"0",
")",
";",
"par1World",
".",
"setBlock",
"(",
"par2",
"+",
"j",
",",
"par3",
",",
"par4",
"+",
"k",
"+",
"1",
",",
"0",
")",
";",
"par1World",
".",
"setBlock",
"(",
"par2",
"+",
"j",
"+",
"1",
",",
"par3",
",",
"par4",
"+",
"k",
"+",
"1",
",",
"0",
")",
";",
"}",
"else",
"{",
"par1World",
".",
"setBlock",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"0",
")",
";",
"}",
"if",
"(",
"!",
"(",
"(",
"WorldGenerator",
")",
"(",
"obj",
")",
")",
".",
"generate",
"(",
"par1World",
",",
"par5Random",
",",
"par2",
"+",
"j",
",",
"par3",
",",
"par4",
"+",
"k",
")",
")",
"{",
"if",
"(",
"flag",
")",
"{",
"par1World",
".",
"setBlockAndMetadata",
"(",
"par2",
"+",
"j",
",",
"par3",
",",
"par4",
"+",
"k",
",",
"blockID",
",",
"i",
")",
";",
"par1World",
".",
"setBlockAndMetadata",
"(",
"par2",
"+",
"j",
"+",
"1",
",",
"par3",
",",
"par4",
"+",
"k",
",",
"blockID",
",",
"i",
")",
";",
"par1World",
".",
"setBlockAndMetadata",
"(",
"par2",
"+",
"j",
",",
"par3",
",",
"par4",
"+",
"k",
"+",
"1",
",",
"blockID",
",",
"i",
")",
";",
"par1World",
".",
"setBlockAndMetadata",
"(",
"par2",
"+",
"j",
"+",
"1",
",",
"par3",
",",
"par4",
"+",
"k",
"+",
"1",
",",
"blockID",
",",
"i",
")",
";",
"}",
"else",
"{",
"par1World",
".",
"setBlockAndMetadata",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"blockID",
",",
"i",
")",
";",
"}",
"}",
"}",
"public",
"boolean",
"func_50010_f",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
")",
"{",
"return",
"par1World",
".",
"getBlockId",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
"==",
"blockID",
"&&",
"(",
"par1World",
".",
"getBlockMetadata",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
"&",
"3",
")",
"==",
"par5",
";",
"}",
"protected",
"int",
"damageDropped",
"(",
"int",
"par1",
")",
"{",
"return",
"par1",
"&",
"3",
";",
"}",
"}",
"</s>"
] |
9,555 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"net",
".",
"minecraft",
".",
"server",
".",
"MinecraftServer",
";",
"public",
"class",
"ThreadServerSleep",
"extends",
"Thread",
"{",
"final",
"MinecraftServer",
"mc",
";",
"public",
"ThreadServerSleep",
"(",
"MinecraftServer",
"par1MinecraftServer",
")",
"{",
"mc",
"=",
"par1MinecraftServer",
";",
"setDaemon",
"(",
"true",
")",
";",
"start",
"(",
")",
";",
"}",
"public",
"void",
"run",
"(",
")",
"{",
"do",
"{",
"try",
"{",
"Thread",
".",
"sleep",
"(",
"0x7fffffffL",
")",
";",
"}",
"catch",
"(",
"InterruptedException",
"interruptedexception",
")",
"{",
"}",
"}",
"while",
"(",
"true",
")",
";",
"}",
"}",
"</s>"
] |
9,556 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"BiomeGenForest",
"extends",
"BiomeGenBase",
"{",
"public",
"BiomeGenForest",
"(",
"int",
"par1",
")",
"{",
"super",
"(",
"par1",
")",
";",
"spawnableCreatureList",
".",
"add",
"(",
"new",
"SpawnListEntry",
"(",
"net",
".",
"minecraft",
".",
"src",
".",
"EntityWolf",
".",
"class",
",",
"5",
",",
"4",
",",
"4",
")",
")",
";",
"biomeDecorator",
".",
"treesPerChunk",
"=",
"10",
";",
"biomeDecorator",
".",
"grassPerChunk",
"=",
"2",
";",
"}",
"public",
"WorldGenerator",
"getRandomWorldGenForTrees",
"(",
"Random",
"par1Random",
")",
"{",
"if",
"(",
"par1Random",
".",
"nextInt",
"(",
"5",
")",
"==",
"0",
")",
"{",
"return",
"worldGenForest",
";",
"}",
"if",
"(",
"par1Random",
".",
"nextInt",
"(",
"10",
")",
"==",
"0",
")",
"{",
"return",
"worldGenBigTree",
";",
"}",
"else",
"{",
"return",
"worldGenTrees",
";",
"}",
"}",
"}",
"</s>"
] |
9,557 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"EntityAIBeg",
"extends",
"EntityAIBase",
"{",
"private",
"EntityWolf",
"theWolf",
";",
"private",
"EntityPlayer",
"field_48145_b",
";",
"private",
"World",
"field_48146_c",
";",
"private",
"float",
"field_48143_d",
";",
"private",
"int",
"field_48144_e",
";",
"public",
"EntityAIBeg",
"(",
"EntityWolf",
"par1EntityWolf",
",",
"float",
"par2",
")",
"{",
"theWolf",
"=",
"par1EntityWolf",
";",
"field_48146_c",
"=",
"par1EntityWolf",
".",
"worldObj",
";",
"field_48143_d",
"=",
"par2",
";",
"setMutexBits",
"(",
"2",
")",
";",
"}",
"public",
"boolean",
"shouldExecute",
"(",
")",
"{",
"field_48145_b",
"=",
"field_48146_c",
".",
"getClosestPlayerToEntity",
"(",
"theWolf",
",",
"field_48143_d",
")",
";",
"if",
"(",
"field_48145_b",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"else",
"{",
"return",
"func_48142_a",
"(",
"field_48145_b",
")",
";",
"}",
"}",
"public",
"boolean",
"continueExecuting",
"(",
")",
"{",
"if",
"(",
"!",
"field_48145_b",
".",
"isEntityAlive",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"theWolf",
".",
"getDistanceSqToEntity",
"(",
"field_48145_b",
")",
">",
"(",
"double",
")",
"(",
"field_48143_d",
"*",
"field_48143_d",
")",
")",
"{",
"return",
"false",
";",
"}",
"else",
"{",
"return",
"field_48144_e",
">",
"0",
"&&",
"func_48142_a",
"(",
"field_48145_b",
")",
";",
"}",
"}",
"public",
"void",
"startExecuting",
"(",
")",
"{",
"theWolf",
".",
"func_48378_e",
"(",
"true",
")",
";",
"field_48144_e",
"=",
"40",
"+",
"theWolf",
".",
"getRNG",
"(",
")",
".",
"nextInt",
"(",
"40",
")",
";",
"}",
"public",
"void",
"resetTask",
"(",
")",
"{",
"theWolf",
".",
"func_48378_e",
"(",
"false",
")",
";",
"field_48145_b",
"=",
"null",
";",
"}",
"public",
"void",
"updateTask",
"(",
")",
"{",
"theWolf",
".",
"getLookHelper",
"(",
")",
".",
"setLookPosition",
"(",
"field_48145_b",
".",
"posX",
",",
"field_48145_b",
".",
"posY",
"+",
"(",
"double",
")",
"field_48145_b",
".",
"getEyeHeight",
"(",
")",
",",
"field_48145_b",
".",
"posZ",
",",
"10F",
",",
"theWolf",
".",
"getVerticalFaceSpeed",
"(",
")",
")",
";",
"field_48144_e",
"--",
";",
"}",
"private",
"boolean",
"func_48142_a",
"(",
"EntityPlayer",
"par1EntityPlayer",
")",
"{",
"ItemStack",
"itemstack",
"=",
"par1EntityPlayer",
".",
"inventory",
".",
"getCurrentItem",
"(",
")",
";",
"if",
"(",
"itemstack",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"!",
"theWolf",
".",
"isTamed",
"(",
")",
"&&",
"itemstack",
".",
"itemID",
"==",
"Item",
".",
"bone",
".",
"shiftedIndex",
")",
"{",
"return",
"true",
";",
"}",
"else",
"{",
"return",
"theWolf",
".",
"isWheat",
"(",
"itemstack",
")",
";",
"}",
"}",
"}",
"</s>"
] |
9,558 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"io",
".",
"*",
";",
"public",
"class",
"Packet28EntityVelocity",
"extends",
"Packet",
"{",
"public",
"int",
"entityId",
";",
"public",
"int",
"motionX",
";",
"public",
"int",
"motionY",
";",
"public",
"int",
"motionZ",
";",
"public",
"Packet28EntityVelocity",
"(",
")",
"{",
"}",
"public",
"Packet28EntityVelocity",
"(",
"Entity",
"par1Entity",
")",
"{",
"this",
"(",
"par1Entity",
".",
"entityId",
",",
"par1Entity",
".",
"motionX",
",",
"par1Entity",
".",
"motionY",
",",
"par1Entity",
".",
"motionZ",
")",
";",
"}",
"public",
"Packet28EntityVelocity",
"(",
"int",
"par1",
",",
"double",
"par2",
",",
"double",
"par4",
",",
"double",
"par6",
")",
"{",
"entityId",
"=",
"par1",
";",
"double",
"d",
"=",
"3.8999999999999999D",
";",
"if",
"(",
"par2",
"<",
"-",
"d",
")",
"{",
"par2",
"=",
"-",
"d",
";",
"}",
"if",
"(",
"par4",
"<",
"-",
"d",
")",
"{",
"par4",
"=",
"-",
"d",
";",
"}",
"if",
"(",
"par6",
"<",
"-",
"d",
")",
"{",
"par6",
"=",
"-",
"d",
";",
"}",
"if",
"(",
"par2",
">",
"d",
")",
"{",
"par2",
"=",
"d",
";",
"}",
"if",
"(",
"par4",
">",
"d",
")",
"{",
"par4",
"=",
"d",
";",
"}",
"if",
"(",
"par6",
">",
"d",
")",
"{",
"par6",
"=",
"d",
";",
"}",
"motionX",
"=",
"(",
"int",
")",
"(",
"par2",
"*",
"8000D",
")",
";",
"motionY",
"=",
"(",
"int",
")",
"(",
"par4",
"*",
"8000D",
")",
";",
"motionZ",
"=",
"(",
"int",
")",
"(",
"par6",
"*",
"8000D",
")",
";",
"}",
"public",
"void",
"readPacketData",
"(",
"DataInputStream",
"par1DataInputStream",
")",
"throws",
"IOException",
"{",
"entityId",
"=",
"par1DataInputStream",
".",
"readInt",
"(",
")",
";",
"motionX",
"=",
"par1DataInputStream",
".",
"readShort",
"(",
")",
";",
"motionY",
"=",
"par1DataInputStream",
".",
"readShort",
"(",
")",
";",
"motionZ",
"=",
"par1DataInputStream",
".",
"readShort",
"(",
")",
";",
"}",
"public",
"void",
"writePacketData",
"(",
"DataOutputStream",
"par1DataOutputStream",
")",
"throws",
"IOException",
"{",
"par1DataOutputStream",
".",
"writeInt",
"(",
"entityId",
")",
";",
"par1DataOutputStream",
".",
"writeShort",
"(",
"motionX",
")",
";",
"par1DataOutputStream",
".",
"writeShort",
"(",
"motionY",
")",
";",
"par1DataOutputStream",
".",
"writeShort",
"(",
"motionZ",
")",
";",
"}",
"public",
"void",
"processPacket",
"(",
"NetHandler",
"par1NetHandler",
")",
"{",
"par1NetHandler",
".",
"handleEntityVelocity",
"(",
"this",
")",
";",
"}",
"public",
"int",
"getPacketSize",
"(",
")",
"{",
"return",
"10",
";",
"}",
"}",
"</s>"
] |
9,559 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"EntityFishHook",
"extends",
"Entity",
"{",
"private",
"int",
"xTile",
";",
"private",
"int",
"yTile",
";",
"private",
"int",
"zTile",
";",
"private",
"int",
"inTile",
";",
"private",
"boolean",
"inGround",
";",
"public",
"int",
"shake",
";",
"public",
"EntityPlayer",
"angler",
";",
"private",
"int",
"ticksInGround",
";",
"private",
"int",
"ticksInAir",
";",
"private",
"int",
"ticksCatchable",
";",
"public",
"Entity",
"bobber",
";",
"private",
"int",
"fishPosRotationIncrements",
";",
"private",
"double",
"fishX",
";",
"private",
"double",
"fishY",
";",
"private",
"double",
"fishZ",
";",
"private",
"double",
"fishYaw",
";",
"private",
"double",
"fishPitch",
";",
"public",
"EntityFishHook",
"(",
"World",
"par1World",
")",
"{",
"super",
"(",
"par1World",
")",
";",
"xTile",
"=",
"-",
"1",
";",
"yTile",
"=",
"-",
"1",
";",
"zTile",
"=",
"-",
"1",
";",
"inTile",
"=",
"0",
";",
"inGround",
"=",
"false",
";",
"shake",
"=",
"0",
";",
"ticksInAir",
"=",
"0",
";",
"ticksCatchable",
"=",
"0",
";",
"bobber",
"=",
"null",
";",
"setSize",
"(",
"0.25F",
",",
"0.25F",
")",
";",
"ignoreFrustumCheck",
"=",
"true",
";",
"}",
"public",
"EntityFishHook",
"(",
"World",
"par1World",
",",
"EntityPlayer",
"par2EntityPlayer",
")",
"{",
"super",
"(",
"par1World",
")",
";",
"xTile",
"=",
"-",
"1",
";",
"yTile",
"=",
"-",
"1",
";",
"zTile",
"=",
"-",
"1",
";",
"inTile",
"=",
"0",
";",
"inGround",
"=",
"false",
";",
"shake",
"=",
"0",
";",
"ticksInAir",
"=",
"0",
";",
"ticksCatchable",
"=",
"0",
";",
"bobber",
"=",
"null",
";",
"ignoreFrustumCheck",
"=",
"true",
";",
"angler",
"=",
"par2EntityPlayer",
";",
"angler",
".",
"fishEntity",
"=",
"this",
";",
"setSize",
"(",
"0.25F",
",",
"0.25F",
")",
";",
"setLocationAndAngles",
"(",
"par2EntityPlayer",
".",
"posX",
",",
"(",
"par2EntityPlayer",
".",
"posY",
"+",
"1.6200000000000001D",
")",
"-",
"(",
"double",
")",
"par2EntityPlayer",
".",
"yOffset",
",",
"par2EntityPlayer",
".",
"posZ",
",",
"par2EntityPlayer",
".",
"rotationYaw",
",",
"par2EntityPlayer",
".",
"rotationPitch",
")",
";",
"posX",
"-=",
"MathHelper",
".",
"cos",
"(",
"(",
"rotationYaw",
"/",
"180F",
")",
"*",
"(",
"float",
")",
"Math",
".",
"PI",
")",
"*",
"0.16F",
";",
"posY",
"-=",
"0.10000000149011612D",
";",
"posZ",
"-=",
"MathHelper",
".",
"sin",
"(",
"(",
"rotationYaw",
"/",
"180F",
")",
"*",
"(",
"float",
")",
"Math",
".",
"PI",
")",
"*",
"0.16F",
";",
"setPosition",
"(",
"posX",
",",
"posY",
",",
"posZ",
")",
";",
"yOffset",
"=",
"0.0F",
";",
"float",
"f",
"=",
"0.4F",
";",
"motionX",
"=",
"-",
"MathHelper",
".",
"sin",
"(",
"(",
"rotationYaw",
"/",
"180F",
")",
"*",
"(",
"float",
")",
"Math",
".",
"PI",
")",
"*",
"MathHelper",
".",
"cos",
"(",
"(",
"rotationPitch",
"/",
"180F",
")",
"*",
"(",
"float",
")",
"Math",
".",
"PI",
")",
"*",
"f",
";",
"motionZ",
"=",
"MathHelper",
".",
"cos",
"(",
"(",
"rotationYaw",
"/",
"180F",
")",
"*",
"(",
"float",
")",
"Math",
".",
"PI",
")",
"*",
"MathHelper",
".",
"cos",
"(",
"(",
"rotationPitch",
"/",
"180F",
")",
"*",
"(",
"float",
")",
"Math",
".",
"PI",
")",
"*",
"f",
";",
"motionY",
"=",
"-",
"MathHelper",
".",
"sin",
"(",
"(",
"rotationPitch",
"/",
"180F",
")",
"*",
"(",
"float",
")",
"Math",
".",
"PI",
")",
"*",
"f",
";",
"calculateVelocity",
"(",
"motionX",
",",
"motionY",
",",
"motionZ",
",",
"1.5F",
",",
"1.0F",
")",
";",
"}",
"protected",
"void",
"entityInit",
"(",
")",
"{",
"}",
"public",
"void",
"calculateVelocity",
"(",
"double",
"par1",
",",
"double",
"par3",
",",
"double",
"par5",
",",
"float",
"par7",
",",
"float",
"par8",
")",
"{",
"float",
"f",
"=",
"MathHelper",
".",
"sqrt_double",
"(",
"par1",
"*",
"par1",
"+",
"par3",
"*",
"par3",
"+",
"par5",
"*",
"par5",
")",
";",
"par1",
"/=",
"f",
";",
"par3",
"/=",
"f",
";",
"par5",
"/=",
"f",
";",
"par1",
"+=",
"rand",
".",
"nextGaussian",
"(",
")",
"*",
"0.0074999998323619366D",
"*",
"(",
"double",
")",
"par8",
";",
"par3",
"+=",
"rand",
".",
"nextGaussian",
"(",
")",
"*",
"0.0074999998323619366D",
"*",
"(",
"double",
")",
"par8",
";",
"par5",
"+=",
"rand",
".",
"nextGaussian",
"(",
")",
"*",
"0.0074999998323619366D",
"*",
"(",
"double",
")",
"par8",
";",
"par1",
"*=",
"par7",
";",
"par3",
"*=",
"par7",
";",
"par5",
"*=",
"par7",
";",
"motionX",
"=",
"par1",
";",
"motionY",
"=",
"par3",
";",
"motionZ",
"=",
"par5",
";",
"float",
"f1",
"=",
"MathHelper",
".",
"sqrt_double",
"(",
"par1",
"*",
"par1",
"+",
"par5",
"*",
"par5",
")",
";",
"prevRotationYaw",
"=",
"rotationYaw",
"=",
"(",
"float",
")",
"(",
"(",
"Math",
".",
"atan2",
"(",
"par1",
",",
"par5",
")",
"*",
"180D",
")",
"/",
"Math",
".",
"PI",
")",
";",
"prevRotationPitch",
"=",
"rotationPitch",
"=",
"(",
"float",
")",
"(",
"(",
"Math",
".",
"atan2",
"(",
"par3",
",",
"f1",
")",
"*",
"180D",
")",
"/",
"Math",
".",
"PI",
")",
";",
"ticksInGround",
"=",
"0",
";",
"}",
"public",
"void",
"onUpdate",
"(",
")",
"{",
"super",
".",
"onUpdate",
"(",
")",
";",
"if",
"(",
"fishPosRotationIncrements",
">",
"0",
")",
"{",
"double",
"d",
"=",
"posX",
"+",
"(",
"fishX",
"-",
"posX",
")",
"/",
"(",
"double",
")",
"fishPosRotationIncrements",
";",
"double",
"d1",
"=",
"posY",
"+",
"(",
"fishY",
"-",
"posY",
")",
"/",
"(",
"double",
")",
"fishPosRotationIncrements",
";",
"double",
"d2",
"=",
"posZ",
"+",
"(",
"fishZ",
"-",
"posZ",
")",
"/",
"(",
"double",
")",
"fishPosRotationIncrements",
";",
"double",
"d4",
";",
"for",
"(",
"d4",
"=",
"fishYaw",
"-",
"(",
"double",
")",
"rotationYaw",
";",
"d4",
"<",
"-",
"180D",
";",
"d4",
"+=",
"360D",
")",
"{",
"}",
"for",
"(",
";",
"d4",
">=",
"180D",
";",
"d4",
"-=",
"360D",
")",
"{",
"}",
"rotationYaw",
"+=",
"d4",
"/",
"(",
"double",
")",
"fishPosRotationIncrements",
";",
"rotationPitch",
"+=",
"(",
"fishPitch",
"-",
"(",
"double",
")",
"rotationPitch",
")",
"/",
"(",
"double",
")",
"fishPosRotationIncrements",
";",
"fishPosRotationIncrements",
"--",
";",
"setPosition",
"(",
"d",
",",
"d1",
",",
"d2",
")",
";",
"setRotation",
"(",
"rotationYaw",
",",
"rotationPitch",
")",
";",
"return",
";",
"}",
"if",
"(",
"!",
"worldObj",
".",
"isRemote",
")",
"{",
"ItemStack",
"itemstack",
"=",
"angler",
".",
"getCurrentEquippedItem",
"(",
")",
";",
"if",
"(",
"angler",
".",
"isDead",
"||",
"!",
"angler",
".",
"isEntityAlive",
"(",
")",
"||",
"itemstack",
"==",
"null",
"||",
"itemstack",
".",
"getItem",
"(",
")",
"!=",
"Item",
".",
"fishingRod",
"||",
"getDistanceSqToEntity",
"(",
"angler",
")",
">",
"1024D",
")",
"{",
"setDead",
"(",
")",
";",
"angler",
".",
"fishEntity",
"=",
"null",
";",
"return",
";",
"}",
"if",
"(",
"bobber",
"!=",
"null",
")",
"{",
"if",
"(",
"bobber",
".",
"isDead",
")",
"{",
"bobber",
"=",
"null",
";",
"}",
"else",
"{",
"posX",
"=",
"bobber",
".",
"posX",
";",
"posY",
"=",
"bobber",
".",
"boundingBox",
".",
"minY",
"+",
"(",
"double",
")",
"bobber",
".",
"height",
"*",
"0.80000000000000004D",
";",
"posZ",
"=",
"bobber",
".",
"posZ",
";",
"return",
";",
"}",
"}",
"}",
"if",
"(",
"shake",
">",
"0",
")",
"{",
"shake",
"--",
";",
"}",
"if",
"(",
"inGround",
")",
"{",
"int",
"i",
"=",
"worldObj",
".",
"getBlockId",
"(",
"xTile",
",",
"yTile",
",",
"zTile",
")",
";",
"if",
"(",
"i",
"!=",
"inTile",
")",
"{",
"inGround",
"=",
"false",
";",
"motionX",
"*=",
"rand",
".",
"nextFloat",
"(",
")",
"*",
"0.2F",
";",
"motionY",
"*=",
"rand",
".",
"nextFloat",
"(",
")",
"*",
"0.2F",
";",
"motionZ",
"*=",
"rand",
".",
"nextFloat",
"(",
")",
"*",
"0.2F",
";",
"ticksInGround",
"=",
"0",
";",
"ticksInAir",
"=",
"0",
";",
"}",
"else",
"{",
"ticksInGround",
"++",
";",
"if",
"(",
"ticksInGround",
"==",
"1200",
")",
"{",
"setDead",
"(",
")",
";",
"}",
"return",
";",
"}",
"}",
"else",
"{",
"ticksInAir",
"++",
";",
"}",
"Vec3D",
"vec3d",
"=",
"Vec3D",
".",
"createVector",
"(",
"posX",
",",
"posY",
",",
"posZ",
")",
";",
"Vec3D",
"vec3d1",
"=",
"Vec3D",
".",
"createVector",
"(",
"posX",
"+",
"motionX",
",",
"posY",
"+",
"motionY",
",",
"posZ",
"+",
"motionZ",
")",
";",
"MovingObjectPosition",
"movingobjectposition",
"=",
"worldObj",
".",
"rayTraceBlocks",
"(",
"vec3d",
",",
"vec3d1",
")",
";",
"vec3d",
"=",
"Vec3D",
".",
"createVector",
"(",
"posX",
",",
"posY",
",",
"posZ",
")",
";",
"vec3d1",
"=",
"Vec3D",
".",
"createVector",
"(",
"posX",
"+",
"motionX",
",",
"posY",
"+",
"motionY",
",",
"posZ",
"+",
"motionZ",
")",
";",
"if",
"(",
"movingobjectposition",
"!=",
"null",
")",
"{",
"vec3d1",
"=",
"Vec3D",
".",
"createVector",
"(",
"movingobjectposition",
".",
"hitVec",
".",
"xCoord",
",",
"movingobjectposition",
".",
"hitVec",
".",
"yCoord",
",",
"movingobjectposition",
".",
"hitVec",
".",
"zCoord",
")",
";",
"}",
"Entity",
"entity",
"=",
"null",
";",
"List",
"list",
"=",
"worldObj",
".",
"getEntitiesWithinAABBExcludingEntity",
"(",
"this",
",",
"boundingBox",
".",
"addCoord",
"(",
"motionX",
",",
"motionY",
",",
"motionZ",
")",
".",
"expand",
"(",
"1.0D",
",",
"1.0D",
",",
"1.0D",
")",
")",
";",
"double",
"d3",
"=",
"0.0D",
";",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
"list",
".",
"size",
"(",
")",
";",
"j",
"++",
")",
"{",
"Entity",
"entity1",
"=",
"(",
"Entity",
")",
"list",
".",
"get",
"(",
"j",
")",
";",
"if",
"(",
"!",
"entity1",
".",
"canBeCollidedWith",
"(",
")",
"||",
"entity1",
"==",
"angler",
"&&",
"ticksInAir",
"<",
"5",
")",
"{",
"continue",
";",
"}",
"float",
"f2",
"=",
"0.3F",
";",
"AxisAlignedBB",
"axisalignedbb",
"=",
"entity1",
".",
"boundingBox",
".",
"expand",
"(",
"f2",
",",
"f2",
",",
"f2",
")",
";",
"MovingObjectPosition",
"movingobjectposition1",
"=",
"axisalignedbb",
".",
"calculateIntercept",
"(",
"vec3d",
",",
"vec3d1",
")",
";",
"if",
"(",
"movingobjectposition1",
"==",
"null",
")",
"{",
"continue",
";",
"}",
"double",
"d6",
"=",
"vec3d",
".",
"distanceTo",
"(",
"movingobjectposition1",
".",
"hitVec",
")",
";",
"if",
"(",
"d6",
"<",
"d3",
"||",
"d3",
"==",
"0.0D",
")",
"{",
"entity",
"=",
"entity1",
";",
"d3",
"=",
"d6",
";",
"}",
"}",
"if",
"(",
"entity",
"!=",
"null",
")",
"{",
"movingobjectposition",
"=",
"new",
"MovingObjectPosition",
"(",
"entity",
")",
";",
"}",
"if",
"(",
"movingobjectposition",
"!=",
"null",
")",
"{",
"if",
"(",
"movingobjectposition",
".",
"entityHit",
"!=",
"null",
")",
"{",
"if",
"(",
"movingobjectposition",
".",
"entityHit",
".",
"attackEntityFrom",
"(",
"DamageSource",
".",
"causeThrownDamage",
"(",
"this",
",",
"angler",
")",
",",
"0",
")",
")",
"{",
"bobber",
"=",
"movingobjectposition",
".",
"entityHit",
";",
"}",
"}",
"else",
"{",
"inGround",
"=",
"true",
";",
"}",
"}",
"if",
"(",
"inGround",
")",
"{",
"return",
";",
"}",
"moveEntity",
"(",
"motionX",
",",
"motionY",
",",
"motionZ",
")",
";",
"float",
"f",
"=",
"MathHelper",
".",
"sqrt_double",
"(",
"motionX",
"*",
"motionX",
"+",
"motionZ",
"*",
"motionZ",
")",
";",
"rotationYaw",
"=",
"(",
"float",
")",
"(",
"(",
"Math",
".",
"atan2",
"(",
"motionX",
",",
"motionZ",
")",
"*",
"180D",
")",
"/",
"Math",
".",
"PI",
")",
";",
"for",
"(",
"rotationPitch",
"=",
"(",
"float",
")",
"(",
"(",
"Math",
".",
"atan2",
"(",
"motionY",
",",
"f",
")",
"*",
"180D",
")",
"/",
"Math",
".",
"PI",
")",
";",
"rotationPitch",
"-",
"prevRotationPitch",
"<",
"-",
"180F",
";",
"prevRotationPitch",
"-=",
"360F",
")",
"{",
"}",
"for",
"(",
";",
"rotationPitch",
"-",
"prevRotationPitch",
">=",
"180F",
";",
"prevRotationPitch",
"+=",
"360F",
")",
"{",
"}",
"for",
"(",
";",
"rotationYaw",
"-",
"prevRotationYaw",
"<",
"-",
"180F",
";",
"prevRotationYaw",
"-=",
"360F",
")",
"{",
"}",
"for",
"(",
";",
"rotationYaw",
"-",
"prevRotationYaw",
">=",
"180F",
";",
"prevRotationYaw",
"+=",
"360F",
")",
"{",
"}",
"rotationPitch",
"=",
"prevRotationPitch",
"+",
"(",
"rotationPitch",
"-",
"prevRotationPitch",
")",
"*",
"0.2F",
";",
"rotationYaw",
"=",
"prevRotationYaw",
"+",
"(",
"rotationYaw",
"-",
"prevRotationYaw",
")",
"*",
"0.2F",
";",
"float",
"f1",
"=",
"0.92F",
";",
"if",
"(",
"onGround",
"||",
"isCollidedHorizontally",
")",
"{",
"f1",
"=",
"0.5F",
";",
"}",
"int",
"k",
"=",
"5",
";",
"double",
"d5",
"=",
"0.0D",
";",
"for",
"(",
"int",
"l",
"=",
"0",
";",
"l",
"<",
"k",
";",
"l",
"++",
")",
"{",
"double",
"d8",
"=",
"(",
"(",
"boundingBox",
".",
"minY",
"+",
"(",
"(",
"boundingBox",
".",
"maxY",
"-",
"boundingBox",
".",
"minY",
")",
"*",
"(",
"double",
")",
"(",
"l",
"+",
"0",
")",
")",
"/",
"(",
"double",
")",
"k",
")",
"-",
"0.125D",
")",
"+",
"0.125D",
";",
"double",
"d9",
"=",
"(",
"(",
"boundingBox",
".",
"minY",
"+",
"(",
"(",
"boundingBox",
".",
"maxY",
"-",
"boundingBox",
".",
"minY",
")",
"*",
"(",
"double",
")",
"(",
"l",
"+",
"1",
")",
")",
"/",
"(",
"double",
")",
"k",
")",
"-",
"0.125D",
")",
"+",
"0.125D",
";",
"AxisAlignedBB",
"axisalignedbb1",
"=",
"AxisAlignedBB",
".",
"getBoundingBoxFromPool",
"(",
"boundingBox",
".",
"minX",
",",
"d8",
",",
"boundingBox",
".",
"minZ",
",",
"boundingBox",
".",
"maxX",
",",
"d9",
",",
"boundingBox",
".",
"maxZ",
")",
";",
"if",
"(",
"worldObj",
".",
"isAABBInMaterial",
"(",
"axisalignedbb1",
",",
"Material",
".",
"water",
")",
")",
"{",
"d5",
"+=",
"1.0D",
"/",
"(",
"double",
")",
"k",
";",
"}",
"}",
"if",
"(",
"d5",
">",
"0.0D",
")",
"{",
"if",
"(",
"ticksCatchable",
">",
"0",
")",
"{",
"ticksCatchable",
"--",
";",
"}",
"else",
"{",
"char",
"c",
"=",
"500",
";",
"if",
"(",
"worldObj",
".",
"canLightningStrikeAt",
"(",
"MathHelper",
".",
"floor_double",
"(",
"posX",
")",
",",
"MathHelper",
".",
"floor_double",
"(",
"posY",
")",
"+",
"1",
",",
"MathHelper",
".",
"floor_double",
"(",
"posZ",
")",
")",
")",
"{",
"c",
"=",
"300",
";",
"}",
"if",
"(",
"rand",
".",
"nextInt",
"(",
"c",
")",
"==",
"0",
")",
"{",
"ticksCatchable",
"=",
"rand",
".",
"nextInt",
"(",
"30",
")",
"+",
"10",
";",
"motionY",
"-=",
"0.20000000298023224D",
";",
"worldObj",
".",
"playSoundAtEntity",
"(",
"this",
",",
"\"\"",
",",
"0.25F",
",",
"1.0F",
"+",
"(",
"rand",
".",
"nextFloat",
"(",
")",
"-",
"rand",
".",
"nextFloat",
"(",
")",
")",
"*",
"0.4F",
")",
";",
"float",
"f3",
"=",
"MathHelper",
".",
"floor_double",
"(",
"boundingBox",
".",
"minY",
")",
";",
"for",
"(",
"int",
"i1",
"=",
"0",
";",
"(",
"float",
")",
"i1",
"<",
"1.0F",
"+",
"width",
"*",
"20F",
";",
"i1",
"++",
")",
"{",
"float",
"f4",
"=",
"(",
"rand",
".",
"nextFloat",
"(",
")",
"*",
"2.0F",
"-",
"1.0F",
")",
"*",
"width",
";",
"float",
"f6",
"=",
"(",
"rand",
".",
"nextFloat",
"(",
")",
"*",
"2.0F",
"-",
"1.0F",
")",
"*",
"width",
";",
"worldObj",
".",
"spawnParticle",
"(",
"\"bubble\"",
",",
"posX",
"+",
"(",
"double",
")",
"f4",
",",
"f3",
"+",
"1.0F",
",",
"posZ",
"+",
"(",
"double",
")",
"f6",
",",
"motionX",
",",
"motionY",
"-",
"(",
"double",
")",
"(",
"rand",
".",
"nextFloat",
"(",
")",
"*",
"0.2F",
")",
",",
"motionZ",
")",
";",
"}",
"for",
"(",
"int",
"j1",
"=",
"0",
";",
"(",
"float",
")",
"j1",
"<",
"1.0F",
"+",
"width",
"*",
"20F",
";",
"j1",
"++",
")",
"{",
"float",
"f5",
"=",
"(",
"rand",
".",
"nextFloat",
"(",
")",
"*",
"2.0F",
"-",
"1.0F",
")",
"*",
"width",
";",
"float",
"f7",
"=",
"(",
"rand",
".",
"nextFloat",
"(",
")",
"*",
"2.0F",
"-",
"1.0F",
")",
"*",
"width",
";",
"worldObj",
".",
"spawnParticle",
"(",
"\"splash\"",
",",
"posX",
"+",
"(",
"double",
")",
"f5",
",",
"f3",
"+",
"1.0F",
",",
"posZ",
"+",
"(",
"double",
")",
"f7",
",",
"motionX",
",",
"motionY",
",",
"motionZ",
")",
";",
"}",
"}",
"}",
"}",
"if",
"(",
"ticksCatchable",
">",
"0",
")",
"{",
"motionY",
"-=",
"(",
"double",
")",
"(",
"rand",
".",
"nextFloat",
"(",
")",
"*",
"rand",
".",
"nextFloat",
"(",
")",
"*",
"rand",
".",
"nextFloat",
"(",
")",
")",
"*",
"0.20000000000000001D",
";",
"}",
"double",
"d7",
"=",
"d5",
"*",
"2D",
"-",
"1.0D",
";",
"motionY",
"+=",
"0.039999999105930328D",
"*",
"d7",
";",
"if",
"(",
"d5",
">",
"0.0D",
")",
"{",
"f1",
"=",
"(",
"float",
")",
"(",
"(",
"double",
")",
"f1",
"*",
"0.90000000000000002D",
")",
";",
"motionY",
"*=",
"0.80000000000000004D",
";",
"}",
"motionX",
"*=",
"f1",
";",
"motionY",
"*=",
"f1",
";",
"motionZ",
"*=",
"f1",
";",
"setPosition",
"(",
"posX",
",",
"posY",
",",
"posZ",
")",
";",
"}",
"public",
"void",
"writeEntityToNBT",
"(",
"NBTTagCompound",
"par1NBTTagCompound",
")",
"{",
"par1NBTTagCompound",
".",
"setShort",
"(",
"\"xTile\"",
",",
"(",
"short",
")",
"xTile",
")",
";",
"par1NBTTagCompound",
".",
"setShort",
"(",
"\"yTile\"",
",",
"(",
"short",
")",
"yTile",
")",
";",
"par1NBTTagCompound",
".",
"setShort",
"(",
"\"zTile\"",
",",
"(",
"short",
")",
"zTile",
")",
";",
"par1NBTTagCompound",
".",
"setByte",
"(",
"\"inTile\"",
",",
"(",
"byte",
")",
"inTile",
")",
";",
"par1NBTTagCompound",
".",
"setByte",
"(",
"\"shake\"",
",",
"(",
"byte",
")",
"shake",
")",
";",
"par1NBTTagCompound",
".",
"setByte",
"(",
"\"inGround\"",
",",
"(",
"byte",
")",
"(",
"inGround",
"?",
"1",
":",
"0",
")",
")",
";",
"}",
"public",
"void",
"readEntityFromNBT",
"(",
"NBTTagCompound",
"par1NBTTagCompound",
")",
"{",
"xTile",
"=",
"par1NBTTagCompound",
".",
"getShort",
"(",
"\"xTile\"",
")",
";",
"yTile",
"=",
"par1NBTTagCompound",
".",
"getShort",
"(",
"\"yTile\"",
")",
";",
"zTile",
"=",
"par1NBTTagCompound",
".",
"getShort",
"(",
"\"zTile\"",
")",
";",
"inTile",
"=",
"par1NBTTagCompound",
".",
"getByte",
"(",
"\"inTile\"",
")",
"&",
"0xff",
";",
"shake",
"=",
"par1NBTTagCompound",
".",
"getByte",
"(",
"\"shake\"",
")",
"&",
"0xff",
";",
"inGround",
"=",
"par1NBTTagCompound",
".",
"getByte",
"(",
"\"inGround\"",
")",
"==",
"1",
";",
"}",
"public",
"int",
"catchFish",
"(",
")",
"{",
"byte",
"byte0",
"=",
"0",
";",
"if",
"(",
"bobber",
"!=",
"null",
")",
"{",
"double",
"d",
"=",
"angler",
".",
"posX",
"-",
"posX",
";",
"double",
"d2",
"=",
"angler",
".",
"posY",
"-",
"posY",
";",
"double",
"d4",
"=",
"angler",
".",
"posZ",
"-",
"posZ",
";",
"double",
"d6",
"=",
"MathHelper",
".",
"sqrt_double",
"(",
"d",
"*",
"d",
"+",
"d2",
"*",
"d2",
"+",
"d4",
"*",
"d4",
")",
";",
"double",
"d8",
"=",
"0.10000000000000001D",
";",
"bobber",
".",
"motionX",
"+=",
"d",
"*",
"d8",
";",
"bobber",
".",
"motionY",
"+=",
"d2",
"*",
"d8",
"+",
"(",
"double",
")",
"MathHelper",
".",
"sqrt_double",
"(",
"d6",
")",
"*",
"0.080000000000000002D",
";",
"bobber",
".",
"motionZ",
"+=",
"d4",
"*",
"d8",
";",
"byte0",
"=",
"3",
";",
"}",
"else",
"if",
"(",
"ticksCatchable",
">",
"0",
")",
"{",
"EntityItem",
"entityitem",
"=",
"new",
"EntityItem",
"(",
"worldObj",
",",
"posX",
",",
"posY",
",",
"posZ",
",",
"new",
"ItemStack",
"(",
"Item",
".",
"fishRaw",
")",
")",
";",
"double",
"d1",
"=",
"angler",
".",
"posX",
"-",
"posX",
";",
"double",
"d3",
"=",
"angler",
".",
"posY",
"-",
"posY",
";",
"double",
"d5",
"=",
"angler",
".",
"posZ",
"-",
"posZ",
";",
"double",
"d7",
"=",
"MathHelper",
".",
"sqrt_double",
"(",
"d1",
"*",
"d1",
"+",
"d3",
"*",
"d3",
"+",
"d5",
"*",
"d5",
")",
";",
"double",
"d9",
"=",
"0.10000000000000001D",
";",
"entityitem",
".",
"motionX",
"=",
"d1",
"*",
"d9",
";",
"entityitem",
".",
"motionY",
"=",
"d3",
"*",
"d9",
"+",
"(",
"double",
")",
"MathHelper",
".",
"sqrt_double",
"(",
"d7",
")",
"*",
"0.080000000000000002D",
";",
"entityitem",
".",
"motionZ",
"=",
"d5",
"*",
"d9",
";",
"worldObj",
".",
"spawnEntityInWorld",
"(",
"entityitem",
")",
";",
"angler",
".",
"addStat",
"(",
"StatList",
".",
"fishCaughtStat",
",",
"1",
")",
";",
"byte0",
"=",
"1",
";",
"}",
"if",
"(",
"inGround",
")",
"{",
"byte0",
"=",
"2",
";",
"}",
"setDead",
"(",
")",
";",
"angler",
".",
"fishEntity",
"=",
"null",
";",
"return",
"byte0",
";",
"}",
"}",
"</s>"
] |
9,560 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"WorldGenSpikes",
"extends",
"WorldGenerator",
"{",
"private",
"int",
"replaceID",
";",
"public",
"WorldGenSpikes",
"(",
"int",
"par1",
")",
"{",
"replaceID",
"=",
"par1",
";",
"}",
"public",
"boolean",
"generate",
"(",
"World",
"par1World",
",",
"Random",
"par2Random",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
")",
"{",
"if",
"(",
"!",
"par1World",
".",
"isAirBlock",
"(",
"par3",
",",
"par4",
",",
"par5",
")",
"||",
"par1World",
".",
"getBlockId",
"(",
"par3",
",",
"par4",
"-",
"1",
",",
"par5",
")",
"!=",
"replaceID",
")",
"{",
"return",
"false",
";",
"}",
"int",
"i",
"=",
"par2Random",
".",
"nextInt",
"(",
"32",
")",
"+",
"6",
";",
"int",
"j",
"=",
"par2Random",
".",
"nextInt",
"(",
"4",
")",
"+",
"1",
";",
"for",
"(",
"int",
"k",
"=",
"par3",
"-",
"j",
";",
"k",
"<=",
"par3",
"+",
"j",
";",
"k",
"++",
")",
"{",
"for",
"(",
"int",
"i1",
"=",
"par5",
"-",
"j",
";",
"i1",
"<=",
"par5",
"+",
"j",
";",
"i1",
"++",
")",
"{",
"int",
"k1",
"=",
"k",
"-",
"par3",
";",
"int",
"i2",
"=",
"i1",
"-",
"par5",
";",
"if",
"(",
"k1",
"*",
"k1",
"+",
"i2",
"*",
"i2",
"<=",
"j",
"*",
"j",
"+",
"1",
"&&",
"par1World",
".",
"getBlockId",
"(",
"k",
",",
"par4",
"-",
"1",
",",
"i1",
")",
"!=",
"replaceID",
")",
"{",
"return",
"false",
";",
"}",
"}",
"}",
"for",
"(",
"int",
"l",
"=",
"par4",
";",
"l",
"<",
"par4",
"+",
"i",
"&&",
"l",
"<",
"128",
";",
"l",
"++",
")",
"{",
"for",
"(",
"int",
"j1",
"=",
"par3",
"-",
"j",
";",
"j1",
"<=",
"par3",
"+",
"j",
";",
"j1",
"++",
")",
"{",
"for",
"(",
"int",
"l1",
"=",
"par5",
"-",
"j",
";",
"l1",
"<=",
"par5",
"+",
"j",
";",
"l1",
"++",
")",
"{",
"int",
"j2",
"=",
"j1",
"-",
"par3",
";",
"int",
"k2",
"=",
"l1",
"-",
"par5",
";",
"if",
"(",
"j2",
"*",
"j2",
"+",
"k2",
"*",
"k2",
"<=",
"j",
"*",
"j",
"+",
"1",
")",
"{",
"par1World",
".",
"setBlockWithNotify",
"(",
"j1",
",",
"l",
",",
"l1",
",",
"Block",
".",
"obsidian",
".",
"blockID",
")",
";",
"}",
"}",
"}",
"}",
"EntityEnderCrystal",
"entityendercrystal",
"=",
"new",
"EntityEnderCrystal",
"(",
"par1World",
")",
";",
"entityendercrystal",
".",
"setLocationAndAngles",
"(",
"(",
"float",
")",
"par3",
"+",
"0.5F",
",",
"par4",
"+",
"i",
",",
"(",
"float",
")",
"par5",
"+",
"0.5F",
",",
"par2Random",
".",
"nextFloat",
"(",
")",
"*",
"360F",
",",
"0.0F",
")",
";",
"par1World",
".",
"spawnEntityInWorld",
"(",
"entityendercrystal",
")",
";",
"par1World",
".",
"setBlockWithNotify",
"(",
"par3",
",",
"par4",
"+",
"i",
",",
"par5",
",",
"Block",
".",
"bedrock",
".",
"blockID",
")",
";",
"return",
"true",
";",
"}",
"}",
"</s>"
] |
9,561 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"EntityEnderEye",
"extends",
"Entity",
"{",
"public",
"int",
"field_40062_a",
";",
"private",
"double",
"field_40060_b",
";",
"private",
"double",
"field_40061_c",
";",
"private",
"double",
"field_40058_d",
";",
"private",
"int",
"despawnTimer",
";",
"private",
"boolean",
"shatterOrDrop",
";",
"public",
"EntityEnderEye",
"(",
"World",
"par1World",
")",
"{",
"super",
"(",
"par1World",
")",
";",
"field_40062_a",
"=",
"0",
";",
"setSize",
"(",
"0.25F",
",",
"0.25F",
")",
";",
"}",
"protected",
"void",
"entityInit",
"(",
")",
"{",
"}",
"public",
"EntityEnderEye",
"(",
"World",
"par1World",
",",
"double",
"par2",
",",
"double",
"par4",
",",
"double",
"par6",
")",
"{",
"super",
"(",
"par1World",
")",
";",
"field_40062_a",
"=",
"0",
";",
"despawnTimer",
"=",
"0",
";",
"setSize",
"(",
"0.25F",
",",
"0.25F",
")",
";",
"setPosition",
"(",
"par2",
",",
"par4",
",",
"par6",
")",
";",
"yOffset",
"=",
"0.0F",
";",
"}",
"public",
"void",
"func_40056_a",
"(",
"double",
"par1",
",",
"int",
"par3",
",",
"double",
"par4",
")",
"{",
"double",
"d",
"=",
"par1",
"-",
"posX",
";",
"double",
"d1",
"=",
"par4",
"-",
"posZ",
";",
"float",
"f",
"=",
"MathHelper",
".",
"sqrt_double",
"(",
"d",
"*",
"d",
"+",
"d1",
"*",
"d1",
")",
";",
"if",
"(",
"f",
">",
"12F",
")",
"{",
"field_40060_b",
"=",
"posX",
"+",
"(",
"d",
"/",
"(",
"double",
")",
"f",
")",
"*",
"12D",
";",
"field_40058_d",
"=",
"posZ",
"+",
"(",
"d1",
"/",
"(",
"double",
")",
"f",
")",
"*",
"12D",
";",
"field_40061_c",
"=",
"posY",
"+",
"8D",
";",
"}",
"else",
"{",
"field_40060_b",
"=",
"par1",
";",
"field_40061_c",
"=",
"par3",
";",
"field_40058_d",
"=",
"par4",
";",
"}",
"despawnTimer",
"=",
"0",
";",
"shatterOrDrop",
"=",
"rand",
".",
"nextInt",
"(",
"5",
")",
">",
"0",
";",
"}",
"public",
"void",
"onUpdate",
"(",
")",
"{",
"lastTickPosX",
"=",
"posX",
";",
"lastTickPosY",
"=",
"posY",
";",
"lastTickPosZ",
"=",
"posZ",
";",
"super",
".",
"onUpdate",
"(",
")",
";",
"posX",
"+=",
"motionX",
";",
"posY",
"+=",
"motionY",
";",
"posZ",
"+=",
"motionZ",
";",
"float",
"f",
"=",
"MathHelper",
".",
"sqrt_double",
"(",
"motionX",
"*",
"motionX",
"+",
"motionZ",
"*",
"motionZ",
")",
";",
"rotationYaw",
"=",
"(",
"float",
")",
"(",
"(",
"Math",
".",
"atan2",
"(",
"motionX",
",",
"motionZ",
")",
"*",
"180D",
")",
"/",
"Math",
".",
"PI",
")",
";",
"for",
"(",
"rotationPitch",
"=",
"(",
"float",
")",
"(",
"(",
"Math",
".",
"atan2",
"(",
"motionY",
",",
"f",
")",
"*",
"180D",
")",
"/",
"Math",
".",
"PI",
")",
";",
"rotationPitch",
"-",
"prevRotationPitch",
"<",
"-",
"180F",
";",
"prevRotationPitch",
"-=",
"360F",
")",
"{",
"}",
"for",
"(",
";",
"rotationPitch",
"-",
"prevRotationPitch",
">=",
"180F",
";",
"prevRotationPitch",
"+=",
"360F",
")",
"{",
"}",
"for",
"(",
";",
"rotationYaw",
"-",
"prevRotationYaw",
"<",
"-",
"180F",
";",
"prevRotationYaw",
"-=",
"360F",
")",
"{",
"}",
"for",
"(",
";",
"rotationYaw",
"-",
"prevRotationYaw",
">=",
"180F",
";",
"prevRotationYaw",
"+=",
"360F",
")",
"{",
"}",
"rotationPitch",
"=",
"prevRotationPitch",
"+",
"(",
"rotationPitch",
"-",
"prevRotationPitch",
")",
"*",
"0.2F",
";",
"rotationYaw",
"=",
"prevRotationYaw",
"+",
"(",
"rotationYaw",
"-",
"prevRotationYaw",
")",
"*",
"0.2F",
";",
"if",
"(",
"!",
"worldObj",
".",
"isRemote",
")",
"{",
"double",
"d",
"=",
"field_40060_b",
"-",
"posX",
";",
"double",
"d1",
"=",
"field_40058_d",
"-",
"posZ",
";",
"float",
"f2",
"=",
"(",
"float",
")",
"Math",
".",
"sqrt",
"(",
"d",
"*",
"d",
"+",
"d1",
"*",
"d1",
")",
";",
"float",
"f3",
"=",
"(",
"float",
")",
"Math",
".",
"atan2",
"(",
"d1",
",",
"d",
")",
";",
"double",
"d2",
"=",
"(",
"double",
")",
"f",
"+",
"(",
"double",
")",
"(",
"f2",
"-",
"f",
")",
"*",
"0.0025000000000000001D",
";",
"if",
"(",
"f2",
"<",
"1.0F",
")",
"{",
"d2",
"*=",
"0.80000000000000004D",
";",
"motionY",
"*=",
"0.80000000000000004D",
";",
"}",
"motionX",
"=",
"Math",
".",
"cos",
"(",
"f3",
")",
"*",
"d2",
";",
"motionZ",
"=",
"Math",
".",
"sin",
"(",
"f3",
")",
"*",
"d2",
";",
"if",
"(",
"posY",
"<",
"field_40061_c",
")",
"{",
"motionY",
"=",
"motionY",
"+",
"(",
"1.0D",
"-",
"motionY",
")",
"*",
"0.014999999664723873D",
";",
"}",
"else",
"{",
"motionY",
"=",
"motionY",
"+",
"(",
"-",
"1D",
"-",
"motionY",
")",
"*",
"0.014999999664723873D",
";",
"}",
"}",
"float",
"f1",
"=",
"0.25F",
";",
"if",
"(",
"isInWater",
"(",
")",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"4",
";",
"i",
"++",
")",
"{",
"worldObj",
".",
"spawnParticle",
"(",
"\"bubble\"",
",",
"posX",
"-",
"motionX",
"*",
"(",
"double",
")",
"f1",
",",
"posY",
"-",
"motionY",
"*",
"(",
"double",
")",
"f1",
",",
"posZ",
"-",
"motionZ",
"*",
"(",
"double",
")",
"f1",
",",
"motionX",
",",
"motionY",
",",
"motionZ",
")",
";",
"}",
"}",
"else",
"{",
"worldObj",
".",
"spawnParticle",
"(",
"\"portal\"",
",",
"(",
"(",
"posX",
"-",
"motionX",
"*",
"(",
"double",
")",
"f1",
")",
"+",
"rand",
".",
"nextDouble",
"(",
")",
"*",
"0.59999999999999998D",
")",
"-",
"0.29999999999999999D",
",",
"posY",
"-",
"motionY",
"*",
"(",
"double",
")",
"f1",
"-",
"0.5D",
",",
"(",
"(",
"posZ",
"-",
"motionZ",
"*",
"(",
"double",
")",
"f1",
")",
"+",
"rand",
".",
"nextDouble",
"(",
")",
"*",
"0.59999999999999998D",
")",
"-",
"0.29999999999999999D",
",",
"motionX",
",",
"motionY",
",",
"motionZ",
")",
";",
"}",
"if",
"(",
"!",
"worldObj",
".",
"isRemote",
")",
"{",
"setPosition",
"(",
"posX",
",",
"posY",
",",
"posZ",
")",
";",
"despawnTimer",
"++",
";",
"if",
"(",
"despawnTimer",
">",
"80",
"&&",
"!",
"worldObj",
".",
"isRemote",
")",
"{",
"setDead",
"(",
")",
";",
"if",
"(",
"shatterOrDrop",
")",
"{",
"worldObj",
".",
"spawnEntityInWorld",
"(",
"new",
"EntityItem",
"(",
"worldObj",
",",
"posX",
",",
"posY",
",",
"posZ",
",",
"new",
"ItemStack",
"(",
"Item",
".",
"eyeOfEnder",
")",
")",
")",
";",
"}",
"else",
"{",
"worldObj",
".",
"playAuxSFX",
"(",
"2003",
",",
"(",
"int",
")",
"Math",
".",
"round",
"(",
"posX",
")",
",",
"(",
"int",
")",
"Math",
".",
"round",
"(",
"posY",
")",
",",
"(",
"int",
")",
"Math",
".",
"round",
"(",
"posZ",
")",
",",
"0",
")",
";",
"}",
"}",
"}",
"}",
"public",
"void",
"writeEntityToNBT",
"(",
"NBTTagCompound",
"nbttagcompound",
")",
"{",
"}",
"public",
"void",
"readEntityFromNBT",
"(",
"NBTTagCompound",
"nbttagcompound",
")",
"{",
"}",
"public",
"void",
"onCollideWithPlayer",
"(",
"EntityPlayer",
"entityplayer",
")",
"{",
"}",
"public",
"float",
"getBrightness",
"(",
"float",
"par1",
")",
"{",
"return",
"1.0F",
";",
"}",
"public",
"boolean",
"canAttackWithItem",
"(",
")",
"{",
"return",
"false",
";",
"}",
"}",
"</s>"
] |
9,562 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"class",
"ChunkPosition",
"{",
"public",
"final",
"int",
"x",
";",
"public",
"final",
"int",
"y",
";",
"public",
"final",
"int",
"z",
";",
"public",
"ChunkPosition",
"(",
"int",
"par1",
",",
"int",
"par2",
",",
"int",
"par3",
")",
"{",
"x",
"=",
"par1",
";",
"y",
"=",
"par2",
";",
"z",
"=",
"par3",
";",
"}",
"public",
"ChunkPosition",
"(",
"Vec3D",
"par1Vec3D",
")",
"{",
"this",
"(",
"MathHelper",
".",
"floor_double",
"(",
"par1Vec3D",
".",
"xCoord",
")",
",",
"MathHelper",
".",
"floor_double",
"(",
"par1Vec3D",
".",
"yCoord",
")",
",",
"MathHelper",
".",
"floor_double",
"(",
"par1Vec3D",
".",
"zCoord",
")",
")",
";",
"}",
"public",
"boolean",
"equals",
"(",
"Object",
"par1Obj",
")",
"{",
"if",
"(",
"par1Obj",
"instanceof",
"ChunkPosition",
")",
"{",
"ChunkPosition",
"chunkposition",
"=",
"(",
"ChunkPosition",
")",
"par1Obj",
";",
"return",
"chunkposition",
".",
"x",
"==",
"x",
"&&",
"chunkposition",
".",
"y",
"==",
"y",
"&&",
"chunkposition",
".",
"z",
"==",
"z",
";",
"}",
"else",
"{",
"return",
"false",
";",
"}",
"}",
"public",
"int",
"hashCode",
"(",
")",
"{",
"return",
"x",
"*",
"0x88f9fa",
"+",
"y",
"*",
"0xef88b",
"+",
"z",
";",
"}",
"}",
"</s>"
] |
9,563 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"WorldGenTaiga1",
"extends",
"WorldGenerator",
"{",
"public",
"WorldGenTaiga1",
"(",
")",
"{",
"}",
"public",
"boolean",
"generate",
"(",
"World",
"par1World",
",",
"Random",
"par2Random",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
")",
"{",
"int",
"i",
"=",
"par2Random",
".",
"nextInt",
"(",
"5",
")",
"+",
"7",
";",
"int",
"j",
"=",
"i",
"-",
"par2Random",
".",
"nextInt",
"(",
"2",
")",
"-",
"3",
";",
"int",
"k",
"=",
"i",
"-",
"j",
";",
"int",
"l",
"=",
"1",
"+",
"par2Random",
".",
"nextInt",
"(",
"k",
"+",
"1",
")",
";",
"boolean",
"flag",
"=",
"true",
";",
"if",
"(",
"par4",
"<",
"1",
"||",
"par4",
"+",
"i",
"+",
"1",
">",
"128",
")",
"{",
"return",
"false",
";",
"}",
"for",
"(",
"int",
"i1",
"=",
"par4",
";",
"i1",
"<=",
"par4",
"+",
"1",
"+",
"i",
"&&",
"flag",
";",
"i1",
"++",
")",
"{",
"int",
"k1",
"=",
"1",
";",
"if",
"(",
"i1",
"-",
"par4",
"<",
"j",
")",
"{",
"k1",
"=",
"0",
";",
"}",
"else",
"{",
"k1",
"=",
"l",
";",
"}",
"for",
"(",
"int",
"i2",
"=",
"par3",
"-",
"k1",
";",
"i2",
"<=",
"par3",
"+",
"k1",
"&&",
"flag",
";",
"i2",
"++",
")",
"{",
"for",
"(",
"int",
"l2",
"=",
"par5",
"-",
"k1",
";",
"l2",
"<=",
"par5",
"+",
"k1",
"&&",
"flag",
";",
"l2",
"++",
")",
"{",
"if",
"(",
"i1",
">=",
"0",
"&&",
"i1",
"<",
"128",
")",
"{",
"int",
"k3",
"=",
"par1World",
".",
"getBlockId",
"(",
"i2",
",",
"i1",
",",
"l2",
")",
";",
"if",
"(",
"k3",
"!=",
"0",
"&&",
"k3",
"!=",
"Block",
".",
"leaves",
".",
"blockID",
")",
"{",
"flag",
"=",
"false",
";",
"}",
"}",
"else",
"{",
"flag",
"=",
"false",
";",
"}",
"}",
"}",
"}",
"if",
"(",
"!",
"flag",
")",
"{",
"return",
"false",
";",
"}",
"int",
"j1",
"=",
"par1World",
".",
"getBlockId",
"(",
"par3",
",",
"par4",
"-",
"1",
",",
"par5",
")",
";",
"if",
"(",
"j1",
"!=",
"Block",
".",
"grass",
".",
"blockID",
"&&",
"j1",
"!=",
"Block",
".",
"dirt",
".",
"blockID",
"||",
"par4",
">=",
"128",
"-",
"i",
"-",
"1",
")",
"{",
"return",
"false",
";",
"}",
"func_50023_a",
"(",
"par1World",
",",
"par3",
",",
"par4",
"-",
"1",
",",
"par5",
",",
"Block",
".",
"dirt",
".",
"blockID",
")",
";",
"int",
"l1",
"=",
"0",
";",
"for",
"(",
"int",
"j2",
"=",
"par4",
"+",
"i",
";",
"j2",
">=",
"par4",
"+",
"j",
";",
"j2",
"--",
")",
"{",
"for",
"(",
"int",
"i3",
"=",
"par3",
"-",
"l1",
";",
"i3",
"<=",
"par3",
"+",
"l1",
";",
"i3",
"++",
")",
"{",
"int",
"l3",
"=",
"i3",
"-",
"par3",
";",
"for",
"(",
"int",
"i4",
"=",
"par5",
"-",
"l1",
";",
"i4",
"<=",
"par5",
"+",
"l1",
";",
"i4",
"++",
")",
"{",
"int",
"j4",
"=",
"i4",
"-",
"par5",
";",
"if",
"(",
"(",
"Math",
".",
"abs",
"(",
"l3",
")",
"!=",
"l1",
"||",
"Math",
".",
"abs",
"(",
"j4",
")",
"!=",
"l1",
"||",
"l1",
"<=",
"0",
")",
"&&",
"!",
"Block",
".",
"opaqueCubeLookup",
"[",
"par1World",
".",
"getBlockId",
"(",
"i3",
",",
"j2",
",",
"i4",
")",
"]",
")",
"{",
"setBlockAndMetadata",
"(",
"par1World",
",",
"i3",
",",
"j2",
",",
"i4",
",",
"Block",
".",
"leaves",
".",
"blockID",
",",
"1",
")",
";",
"}",
"}",
"}",
"if",
"(",
"l1",
">=",
"1",
"&&",
"j2",
"==",
"par4",
"+",
"j",
"+",
"1",
")",
"{",
"l1",
"--",
";",
"continue",
";",
"}",
"if",
"(",
"l1",
"<",
"l",
")",
"{",
"l1",
"++",
";",
"}",
"}",
"for",
"(",
"int",
"k2",
"=",
"0",
";",
"k2",
"<",
"i",
"-",
"1",
";",
"k2",
"++",
")",
"{",
"int",
"j3",
"=",
"par1World",
".",
"getBlockId",
"(",
"par3",
",",
"par4",
"+",
"k2",
",",
"par5",
")",
";",
"if",
"(",
"j3",
"==",
"0",
"||",
"j3",
"==",
"Block",
".",
"leaves",
".",
"blockID",
")",
"{",
"setBlockAndMetadata",
"(",
"par1World",
",",
"par3",
",",
"par4",
"+",
"k2",
",",
"par5",
",",
"Block",
".",
"wood",
".",
"blockID",
",",
"1",
")",
";",
"}",
"}",
"return",
"true",
";",
"}",
"}",
"</s>"
] |
9,564 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"enum",
"EnumCreatureAttribute",
"{",
"UNDEFINED",
",",
"UNDEAD",
",",
"ARTHROPOD",
";",
"}",
"</s>"
] |
9,565 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"*",
";",
"public",
"class",
"EntityAIFollowGolem",
"extends",
"EntityAIBase",
"{",
"private",
"EntityVillager",
"theVillager",
";",
"private",
"EntityIronGolem",
"theGolem",
";",
"private",
"int",
"field_48215_c",
";",
"private",
"boolean",
"field_48213_d",
";",
"public",
"EntityAIFollowGolem",
"(",
"EntityVillager",
"par1EntityVillager",
")",
"{",
"field_48213_d",
"=",
"false",
";",
"theVillager",
"=",
"par1EntityVillager",
";",
"setMutexBits",
"(",
"3",
")",
";",
"}",
"public",
"boolean",
"shouldExecute",
"(",
")",
"{",
"if",
"(",
"theVillager",
".",
"getGrowingAge",
"(",
")",
">=",
"0",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"!",
"theVillager",
".",
"worldObj",
".",
"isDaytime",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",
"List",
"list",
"=",
"theVillager",
".",
"worldObj",
".",
"getEntitiesWithinAABB",
"(",
"net",
".",
"minecraft",
".",
"src",
".",
"EntityIronGolem",
".",
"class",
",",
"theVillager",
".",
"boundingBox",
".",
"expand",
"(",
"6D",
",",
"2D",
",",
"6D",
")",
")",
";",
"if",
"(",
"list",
".",
"size",
"(",
")",
"==",
"0",
")",
"{",
"return",
"false",
";",
"}",
"Iterator",
"iterator",
"=",
"list",
".",
"iterator",
"(",
")",
";",
"do",
"{",
"if",
"(",
"!",
"iterator",
".",
"hasNext",
"(",
")",
")",
"{",
"break",
";",
"}",
"Entity",
"entity",
"=",
"(",
"Entity",
")",
"iterator",
".",
"next",
"(",
")",
";",
"EntityIronGolem",
"entityirongolem",
"=",
"(",
"EntityIronGolem",
")",
"entity",
";",
"if",
"(",
"entityirongolem",
".",
"func_48382_m_",
"(",
")",
"<=",
"0",
")",
"{",
"continue",
";",
"}",
"theGolem",
"=",
"entityirongolem",
";",
"break",
";",
"}",
"while",
"(",
"true",
")",
";",
"return",
"theGolem",
"!=",
"null",
";",
"}",
"public",
"boolean",
"continueExecuting",
"(",
")",
"{",
"return",
"theGolem",
".",
"func_48382_m_",
"(",
")",
">",
"0",
";",
"}",
"public",
"void",
"startExecuting",
"(",
")",
"{",
"field_48215_c",
"=",
"theVillager",
".",
"getRNG",
"(",
")",
".",
"nextInt",
"(",
"320",
")",
";",
"field_48213_d",
"=",
"false",
";",
"theGolem",
".",
"getNavigator",
"(",
")",
".",
"clearPathEntity",
"(",
")",
";",
"}",
"public",
"void",
"resetTask",
"(",
")",
"{",
"theGolem",
"=",
"null",
";",
"theVillager",
".",
"getNavigator",
"(",
")",
".",
"clearPathEntity",
"(",
")",
";",
"}",
"public",
"void",
"updateTask",
"(",
")",
"{",
"theVillager",
".",
"getLookHelper",
"(",
")",
".",
"setLookPositionWithEntity",
"(",
"theGolem",
",",
"30F",
",",
"30F",
")",
";",
"if",
"(",
"theGolem",
".",
"func_48382_m_",
"(",
")",
"==",
"field_48215_c",
")",
"{",
"theVillager",
".",
"getNavigator",
"(",
")",
".",
"func_48652_a",
"(",
"theGolem",
",",
"0.15F",
")",
";",
"field_48213_d",
"=",
"true",
";",
"}",
"if",
"(",
"field_48213_d",
"&&",
"theVillager",
".",
"getDistanceSqToEntity",
"(",
"theGolem",
")",
"<",
"4D",
")",
"{",
"theGolem",
".",
"func_48383_a",
"(",
"false",
")",
";",
"theVillager",
".",
"getNavigator",
"(",
")",
".",
"clearPathEntity",
"(",
")",
";",
"}",
"}",
"}",
"</s>"
] |
9,566 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"class",
"ShapedRecipes",
"implements",
"IRecipe",
"{",
"private",
"int",
"recipeWidth",
";",
"private",
"int",
"recipeHeight",
";",
"private",
"ItemStack",
"recipeItems",
"[",
"]",
";",
"private",
"ItemStack",
"recipeOutput",
";",
"public",
"final",
"int",
"recipeOutputItemID",
";",
"public",
"ShapedRecipes",
"(",
"int",
"par1",
",",
"int",
"par2",
",",
"ItemStack",
"par3ArrayOfItemStack",
"[",
"]",
",",
"ItemStack",
"par4ItemStack",
")",
"{",
"recipeOutputItemID",
"=",
"par4ItemStack",
".",
"itemID",
";",
"recipeWidth",
"=",
"par1",
";",
"recipeHeight",
"=",
"par2",
";",
"recipeItems",
"=",
"par3ArrayOfItemStack",
";",
"recipeOutput",
"=",
"par4ItemStack",
";",
"}",
"public",
"ItemStack",
"getRecipeOutput",
"(",
")",
"{",
"return",
"recipeOutput",
";",
"}",
"public",
"boolean",
"matches",
"(",
"InventoryCrafting",
"par1InventoryCrafting",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<=",
"3",
"-",
"recipeWidth",
";",
"i",
"++",
")",
"{",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<=",
"3",
"-",
"recipeHeight",
";",
"j",
"++",
")",
"{",
"if",
"(",
"checkMatch",
"(",
"par1InventoryCrafting",
",",
"i",
",",
"j",
",",
"true",
")",
")",
"{",
"return",
"true",
";",
"}",
"if",
"(",
"checkMatch",
"(",
"par1InventoryCrafting",
",",
"i",
",",
"j",
",",
"false",
")",
")",
"{",
"return",
"true",
";",
"}",
"}",
"}",
"return",
"false",
";",
"}",
"private",
"boolean",
"checkMatch",
"(",
"InventoryCrafting",
"par1InventoryCrafting",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"boolean",
"par4",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"3",
";",
"i",
"++",
")",
"{",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
"3",
";",
"j",
"++",
")",
"{",
"int",
"k",
"=",
"i",
"-",
"par2",
";",
"int",
"l",
"=",
"j",
"-",
"par3",
";",
"ItemStack",
"itemstack",
"=",
"null",
";",
"if",
"(",
"k",
">=",
"0",
"&&",
"l",
">=",
"0",
"&&",
"k",
"<",
"recipeWidth",
"&&",
"l",
"<",
"recipeHeight",
")",
"{",
"if",
"(",
"par4",
")",
"{",
"itemstack",
"=",
"recipeItems",
"[",
"(",
"recipeWidth",
"-",
"k",
"-",
"1",
")",
"+",
"l",
"*",
"recipeWidth",
"]",
";",
"}",
"else",
"{",
"itemstack",
"=",
"recipeItems",
"[",
"k",
"+",
"l",
"*",
"recipeWidth",
"]",
";",
"}",
"}",
"ItemStack",
"itemstack1",
"=",
"par1InventoryCrafting",
".",
"getStackInRowAndColumn",
"(",
"i",
",",
"j",
")",
";",
"if",
"(",
"itemstack1",
"==",
"null",
"&&",
"itemstack",
"==",
"null",
")",
"{",
"continue",
";",
"}",
"if",
"(",
"itemstack1",
"==",
"null",
"&&",
"itemstack",
"!=",
"null",
"||",
"itemstack1",
"!=",
"null",
"&&",
"itemstack",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"itemstack",
".",
"itemID",
"!=",
"itemstack1",
".",
"itemID",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"itemstack",
".",
"getItemDamage",
"(",
")",
"!=",
"-",
"1",
"&&",
"itemstack",
".",
"getItemDamage",
"(",
")",
"!=",
"itemstack1",
".",
"getItemDamage",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",
"}",
"}",
"return",
"true",
";",
"}",
"public",
"ItemStack",
"getCraftingResult",
"(",
"InventoryCrafting",
"par1InventoryCrafting",
")",
"{",
"return",
"new",
"ItemStack",
"(",
"recipeOutput",
".",
"itemID",
",",
"recipeOutput",
".",
"stackSize",
",",
"recipeOutput",
".",
"getItemDamage",
"(",
")",
")",
";",
"}",
"public",
"int",
"getRecipeSize",
"(",
")",
"{",
"return",
"recipeWidth",
"*",
"recipeHeight",
";",
"}",
"}",
"</s>"
] |
9,567 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"io",
".",
"*",
";",
"public",
"class",
"Packet201PlayerInfo",
"extends",
"Packet",
"{",
"public",
"String",
"playerName",
";",
"public",
"boolean",
"isConnected",
";",
"public",
"int",
"ping",
";",
"public",
"Packet201PlayerInfo",
"(",
")",
"{",
"}",
"public",
"Packet201PlayerInfo",
"(",
"String",
"par1Str",
",",
"boolean",
"par2",
",",
"int",
"par3",
")",
"{",
"playerName",
"=",
"par1Str",
";",
"isConnected",
"=",
"par2",
";",
"ping",
"=",
"par3",
";",
"}",
"public",
"void",
"readPacketData",
"(",
"DataInputStream",
"par1DataInputStream",
")",
"throws",
"IOException",
"{",
"playerName",
"=",
"readString",
"(",
"par1DataInputStream",
",",
"16",
")",
";",
"isConnected",
"=",
"par1DataInputStream",
".",
"readByte",
"(",
")",
"!=",
"0",
";",
"ping",
"=",
"par1DataInputStream",
".",
"readShort",
"(",
")",
";",
"}",
"public",
"void",
"writePacketData",
"(",
"DataOutputStream",
"par1DataOutputStream",
")",
"throws",
"IOException",
"{",
"writeString",
"(",
"playerName",
",",
"par1DataOutputStream",
")",
";",
"par1DataOutputStream",
".",
"writeByte",
"(",
"isConnected",
"?",
"1",
":",
"0",
")",
";",
"par1DataOutputStream",
".",
"writeShort",
"(",
"ping",
")",
";",
"}",
"public",
"void",
"processPacket",
"(",
"NetHandler",
"par1NetHandler",
")",
"{",
"par1NetHandler",
".",
"handlePlayerInfo",
"(",
"this",
")",
";",
"}",
"public",
"int",
"getPacketSize",
"(",
")",
"{",
"return",
"playerName",
".",
"length",
"(",
")",
"+",
"2",
"+",
"1",
"+",
"2",
";",
"}",
"}",
"</s>"
] |
9,568 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"class",
"GenLayerSmooth",
"extends",
"GenLayer",
"{",
"public",
"GenLayerSmooth",
"(",
"long",
"par1",
",",
"GenLayer",
"par3GenLayer",
")",
"{",
"super",
"(",
"par1",
")",
";",
"super",
".",
"parent",
"=",
"par3GenLayer",
";",
"}",
"public",
"int",
"[",
"]",
"getInts",
"(",
"int",
"par1",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"int",
"i",
"=",
"par1",
"-",
"1",
";",
"int",
"j",
"=",
"par2",
"-",
"1",
";",
"int",
"k",
"=",
"par3",
"+",
"2",
";",
"int",
"l",
"=",
"par4",
"+",
"2",
";",
"int",
"ai",
"[",
"]",
"=",
"parent",
".",
"getInts",
"(",
"i",
",",
"j",
",",
"k",
",",
"l",
")",
";",
"int",
"ai1",
"[",
"]",
"=",
"IntCache",
".",
"getIntCache",
"(",
"par3",
"*",
"par4",
")",
";",
"for",
"(",
"int",
"i1",
"=",
"0",
";",
"i1",
"<",
"par4",
";",
"i1",
"++",
")",
"{",
"for",
"(",
"int",
"j1",
"=",
"0",
";",
"j1",
"<",
"par3",
";",
"j1",
"++",
")",
"{",
"int",
"k1",
"=",
"ai",
"[",
"j1",
"+",
"0",
"+",
"(",
"i1",
"+",
"1",
")",
"*",
"k",
"]",
";",
"int",
"l1",
"=",
"ai",
"[",
"j1",
"+",
"2",
"+",
"(",
"i1",
"+",
"1",
")",
"*",
"k",
"]",
";",
"int",
"i2",
"=",
"ai",
"[",
"j1",
"+",
"1",
"+",
"(",
"i1",
"+",
"0",
")",
"*",
"k",
"]",
";",
"int",
"j2",
"=",
"ai",
"[",
"j1",
"+",
"1",
"+",
"(",
"i1",
"+",
"2",
")",
"*",
"k",
"]",
";",
"int",
"k2",
"=",
"ai",
"[",
"j1",
"+",
"1",
"+",
"(",
"i1",
"+",
"1",
")",
"*",
"k",
"]",
";",
"if",
"(",
"k1",
"==",
"l1",
"&&",
"i2",
"==",
"j2",
")",
"{",
"initChunkSeed",
"(",
"j1",
"+",
"par1",
",",
"i1",
"+",
"par2",
")",
";",
"if",
"(",
"nextInt",
"(",
"2",
")",
"==",
"0",
")",
"{",
"k2",
"=",
"k1",
";",
"}",
"else",
"{",
"k2",
"=",
"i2",
";",
"}",
"}",
"else",
"{",
"if",
"(",
"k1",
"==",
"l1",
")",
"{",
"k2",
"=",
"k1",
";",
"}",
"if",
"(",
"i2",
"==",
"j2",
")",
"{",
"k2",
"=",
"i2",
";",
"}",
"}",
"ai1",
"[",
"j1",
"+",
"i1",
"*",
"par3",
"]",
"=",
"k2",
";",
"}",
"}",
"return",
"ai1",
";",
"}",
"}",
"</s>"
] |
9,569 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"abstract",
"class",
"EntityWaterMob",
"extends",
"EntityCreature",
"implements",
"IAnimals",
"{",
"public",
"EntityWaterMob",
"(",
"World",
"par1World",
")",
"{",
"super",
"(",
"par1World",
")",
";",
"}",
"public",
"boolean",
"canBreatheUnderwater",
"(",
")",
"{",
"return",
"true",
";",
"}",
"public",
"void",
"writeEntityToNBT",
"(",
"NBTTagCompound",
"par1NBTTagCompound",
")",
"{",
"super",
".",
"writeEntityToNBT",
"(",
"par1NBTTagCompound",
")",
";",
"}",
"public",
"void",
"readEntityFromNBT",
"(",
"NBTTagCompound",
"par1NBTTagCompound",
")",
"{",
"super",
".",
"readEntityFromNBT",
"(",
"par1NBTTagCompound",
")",
";",
"}",
"public",
"boolean",
"getCanSpawnHere",
"(",
")",
"{",
"return",
"worldObj",
".",
"checkIfAABBIsClear",
"(",
"boundingBox",
")",
";",
"}",
"public",
"int",
"getTalkInterval",
"(",
")",
"{",
"return",
"120",
";",
"}",
"protected",
"boolean",
"canDespawn",
"(",
")",
"{",
"return",
"true",
";",
"}",
"protected",
"int",
"getExperiencePoints",
"(",
"EntityPlayer",
"par1EntityPlayer",
")",
"{",
"return",
"1",
"+",
"worldObj",
".",
"rand",
".",
"nextInt",
"(",
"3",
")",
";",
"}",
"}",
"</s>"
] |
9,570 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"class",
"BiomeGenPlains",
"extends",
"BiomeGenBase",
"{",
"protected",
"BiomeGenPlains",
"(",
"int",
"par1",
")",
"{",
"super",
"(",
"par1",
")",
";",
"biomeDecorator",
".",
"treesPerChunk",
"=",
"-",
"999",
";",
"biomeDecorator",
".",
"flowersPerChunk",
"=",
"4",
";",
"biomeDecorator",
".",
"grassPerChunk",
"=",
"10",
";",
"}",
"}",
"</s>"
] |
9,571 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"public",
"interface",
"IChunkProvider",
"{",
"public",
"abstract",
"boolean",
"chunkExists",
"(",
"int",
"i",
",",
"int",
"j",
")",
";",
"public",
"abstract",
"Chunk",
"provideChunk",
"(",
"int",
"i",
",",
"int",
"j",
")",
";",
"public",
"abstract",
"Chunk",
"loadChunk",
"(",
"int",
"i",
",",
"int",
"j",
")",
";",
"public",
"abstract",
"void",
"populate",
"(",
"IChunkProvider",
"ichunkprovider",
",",
"int",
"i",
",",
"int",
"j",
")",
";",
"public",
"abstract",
"boolean",
"saveChunks",
"(",
"boolean",
"flag",
",",
"IProgressUpdate",
"iprogressupdate",
")",
";",
"public",
"abstract",
"boolean",
"unload100OldestChunks",
"(",
")",
";",
"public",
"abstract",
"boolean",
"canSave",
"(",
")",
";",
"public",
"abstract",
"List",
"getPossibleCreatures",
"(",
"EnumCreatureType",
"enumcreaturetype",
",",
"int",
"i",
",",
"int",
"j",
",",
"int",
"k",
")",
";",
"public",
"abstract",
"ChunkPosition",
"findClosestStructure",
"(",
"World",
"world",
",",
"String",
"s",
",",
"int",
"i",
",",
"int",
"j",
",",
"int",
"k",
")",
";",
"}",
"</s>"
] |
9,572 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"io",
".",
"*",
";",
"import",
"java",
".",
"util",
".",
"zip",
".",
"GZIPInputStream",
";",
"import",
"java",
".",
"util",
".",
"zip",
".",
"GZIPOutputStream",
";",
"public",
"class",
"CompressedStreamTools",
"{",
"public",
"CompressedStreamTools",
"(",
")",
"{",
"}",
"public",
"static",
"NBTTagCompound",
"readCompressed",
"(",
"InputStream",
"par0InputStream",
")",
"throws",
"IOException",
"{",
"DataInputStream",
"datainputstream",
"=",
"new",
"DataInputStream",
"(",
"new",
"BufferedInputStream",
"(",
"new",
"GZIPInputStream",
"(",
"par0InputStream",
")",
")",
")",
";",
"try",
"{",
"NBTTagCompound",
"nbttagcompound",
"=",
"read",
"(",
"datainputstream",
")",
";",
"return",
"nbttagcompound",
";",
"}",
"finally",
"{",
"datainputstream",
".",
"close",
"(",
")",
";",
"}",
"}",
"public",
"static",
"void",
"writeCompressed",
"(",
"NBTTagCompound",
"par0NBTTagCompound",
",",
"OutputStream",
"par1OutputStream",
")",
"throws",
"IOException",
"{",
"DataOutputStream",
"dataoutputstream",
"=",
"new",
"DataOutputStream",
"(",
"new",
"GZIPOutputStream",
"(",
"par1OutputStream",
")",
")",
";",
"try",
"{",
"write",
"(",
"par0NBTTagCompound",
",",
"dataoutputstream",
")",
";",
"}",
"finally",
"{",
"dataoutputstream",
".",
"close",
"(",
")",
";",
"}",
"}",
"public",
"static",
"NBTTagCompound",
"decompress",
"(",
"byte",
"par0ArrayOfByte",
"[",
"]",
")",
"throws",
"IOException",
"{",
"DataInputStream",
"datainputstream",
"=",
"new",
"DataInputStream",
"(",
"new",
"BufferedInputStream",
"(",
"new",
"GZIPInputStream",
"(",
"new",
"ByteArrayInputStream",
"(",
"par0ArrayOfByte",
")",
")",
")",
")",
";",
"try",
"{",
"NBTTagCompound",
"nbttagcompound",
"=",
"read",
"(",
"datainputstream",
")",
";",
"return",
"nbttagcompound",
";",
"}",
"finally",
"{",
"datainputstream",
".",
"close",
"(",
")",
";",
"}",
"}",
"public",
"static",
"byte",
"[",
"]",
"compress",
"(",
"NBTTagCompound",
"par0NBTTagCompound",
")",
"throws",
"IOException",
"{",
"ByteArrayOutputStream",
"bytearrayoutputstream",
"=",
"new",
"ByteArrayOutputStream",
"(",
")",
";",
"DataOutputStream",
"dataoutputstream",
"=",
"new",
"DataOutputStream",
"(",
"new",
"GZIPOutputStream",
"(",
"bytearrayoutputstream",
")",
")",
";",
"try",
"{",
"write",
"(",
"par0NBTTagCompound",
",",
"dataoutputstream",
")",
";",
"}",
"finally",
"{",
"dataoutputstream",
".",
"close",
"(",
")",
";",
"}",
"return",
"bytearrayoutputstream",
".",
"toByteArray",
"(",
")",
";",
"}",
"public",
"static",
"NBTTagCompound",
"read",
"(",
"DataInput",
"par0DataInput",
")",
"throws",
"IOException",
"{",
"NBTBase",
"nbtbase",
"=",
"NBTBase",
".",
"readNamedTag",
"(",
"par0DataInput",
")",
";",
"if",
"(",
"nbtbase",
"instanceof",
"NBTTagCompound",
")",
"{",
"return",
"(",
"NBTTagCompound",
")",
"nbtbase",
";",
"}",
"else",
"{",
"throw",
"new",
"IOException",
"(",
"\"\"",
")",
";",
"}",
"}",
"public",
"static",
"void",
"write",
"(",
"NBTTagCompound",
"par0NBTTagCompound",
",",
"DataOutput",
"par1DataOutput",
")",
"throws",
"IOException",
"{",
"NBTBase",
".",
"writeNamedTag",
"(",
"par0NBTTagCompound",
",",
"par1DataOutput",
")",
";",
"}",
"}",
"</s>"
] |
9,573 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"EntityAIArrowAttack",
"extends",
"EntityAIBase",
"{",
"World",
"worldObj",
";",
"EntityLiving",
"entityHost",
";",
"EntityLiving",
"attackTarget",
";",
"int",
"rangedAttackTime",
";",
"float",
"field_48180_e",
";",
"int",
"field_48177_f",
";",
"int",
"rangedAttackID",
";",
"int",
"maxRangedAttackTime",
";",
"public",
"EntityAIArrowAttack",
"(",
"EntityLiving",
"par1EntityLiving",
",",
"float",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"rangedAttackTime",
"=",
"0",
";",
"field_48177_f",
"=",
"0",
";",
"entityHost",
"=",
"par1EntityLiving",
";",
"worldObj",
"=",
"par1EntityLiving",
".",
"worldObj",
";",
"field_48180_e",
"=",
"par2",
";",
"rangedAttackID",
"=",
"par3",
";",
"maxRangedAttackTime",
"=",
"par4",
";",
"setMutexBits",
"(",
"3",
")",
";",
"}",
"public",
"boolean",
"shouldExecute",
"(",
")",
"{",
"EntityLiving",
"entityliving",
"=",
"entityHost",
".",
"getAttackTarget",
"(",
")",
";",
"if",
"(",
"entityliving",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"else",
"{",
"attackTarget",
"=",
"entityliving",
";",
"return",
"true",
";",
"}",
"}",
"public",
"boolean",
"continueExecuting",
"(",
")",
"{",
"return",
"shouldExecute",
"(",
")",
"||",
"!",
"entityHost",
".",
"getNavigator",
"(",
")",
".",
"noPath",
"(",
")",
";",
"}",
"public",
"void",
"resetTask",
"(",
")",
"{",
"attackTarget",
"=",
"null",
";",
"}",
"public",
"void",
"updateTask",
"(",
")",
"{",
"double",
"d",
"=",
"100D",
";",
"double",
"d1",
"=",
"entityHost",
".",
"getDistanceSq",
"(",
"attackTarget",
".",
"posX",
",",
"attackTarget",
".",
"boundingBox",
".",
"minY",
",",
"attackTarget",
".",
"posZ",
")",
";",
"boolean",
"flag",
"=",
"entityHost",
".",
"func_48318_al",
"(",
")",
".",
"canSee",
"(",
"attackTarget",
")",
";",
"if",
"(",
"flag",
")",
"{",
"field_48177_f",
"++",
";",
"}",
"else",
"{",
"field_48177_f",
"=",
"0",
";",
"}",
"if",
"(",
"d1",
">",
"d",
"||",
"field_48177_f",
"<",
"20",
")",
"{",
"entityHost",
".",
"getNavigator",
"(",
")",
".",
"func_48652_a",
"(",
"attackTarget",
",",
"field_48180_e",
")",
";",
"}",
"else",
"{",
"entityHost",
".",
"getNavigator",
"(",
")",
".",
"clearPathEntity",
"(",
")",
";",
"}",
"entityHost",
".",
"getLookHelper",
"(",
")",
".",
"setLookPositionWithEntity",
"(",
"attackTarget",
",",
"30F",
",",
"30F",
")",
";",
"rangedAttackTime",
"=",
"Math",
".",
"max",
"(",
"rangedAttackTime",
"-",
"1",
",",
"0",
")",
";",
"if",
"(",
"rangedAttackTime",
">",
"0",
")",
"{",
"return",
";",
"}",
"if",
"(",
"d1",
">",
"d",
"||",
"!",
"flag",
")",
"{",
"return",
";",
"}",
"else",
"{",
"doRangedAttack",
"(",
")",
";",
"rangedAttackTime",
"=",
"maxRangedAttackTime",
";",
"return",
";",
"}",
"}",
"private",
"void",
"doRangedAttack",
"(",
")",
"{",
"if",
"(",
"rangedAttackID",
"==",
"1",
")",
"{",
"EntityArrow",
"entityarrow",
"=",
"new",
"EntityArrow",
"(",
"worldObj",
",",
"entityHost",
",",
"attackTarget",
",",
"1.6F",
",",
"12F",
")",
";",
"worldObj",
".",
"playSoundAtEntity",
"(",
"entityHost",
",",
"\"random.bow\"",
",",
"1.0F",
",",
"1.0F",
"/",
"(",
"entityHost",
".",
"getRNG",
"(",
")",
".",
"nextFloat",
"(",
")",
"*",
"0.4F",
"+",
"0.8F",
")",
")",
";",
"worldObj",
".",
"spawnEntityInWorld",
"(",
"entityarrow",
")",
";",
"}",
"else",
"if",
"(",
"rangedAttackID",
"==",
"2",
")",
"{",
"EntitySnowball",
"entitysnowball",
"=",
"new",
"EntitySnowball",
"(",
"worldObj",
",",
"entityHost",
")",
";",
"double",
"d",
"=",
"attackTarget",
".",
"posX",
"-",
"entityHost",
".",
"posX",
";",
"double",
"d1",
"=",
"(",
"attackTarget",
".",
"posY",
"+",
"(",
"double",
")",
"attackTarget",
".",
"getEyeHeight",
"(",
")",
")",
"-",
"1.1000000238418579D",
"-",
"entitysnowball",
".",
"posY",
";",
"double",
"d2",
"=",
"attackTarget",
".",
"posZ",
"-",
"entityHost",
".",
"posZ",
";",
"float",
"f",
"=",
"MathHelper",
".",
"sqrt_double",
"(",
"d",
"*",
"d",
"+",
"d2",
"*",
"d2",
")",
"*",
"0.2F",
";",
"entitysnowball",
".",
"setThrowableHeading",
"(",
"d",
",",
"d1",
"+",
"(",
"double",
")",
"f",
",",
"d2",
",",
"1.6F",
",",
"12F",
")",
";",
"worldObj",
".",
"playSoundAtEntity",
"(",
"entityHost",
",",
"\"random.bow\"",
",",
"1.0F",
",",
"1.0F",
"/",
"(",
"entityHost",
".",
"getRNG",
"(",
")",
".",
"nextFloat",
"(",
")",
"*",
"0.4F",
"+",
"0.8F",
")",
")",
";",
"worldObj",
".",
"spawnEntityInWorld",
"(",
"entitysnowball",
")",
";",
"}",
"}",
"}",
"</s>"
] |
9,574 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"io",
".",
"*",
";",
"public",
"class",
"Packet132TileEntityData",
"extends",
"Packet",
"{",
"public",
"int",
"xPosition",
";",
"public",
"int",
"yPosition",
";",
"public",
"int",
"zPosition",
";",
"public",
"int",
"actionType",
";",
"public",
"int",
"customParam1",
";",
"public",
"int",
"customParam2",
";",
"public",
"int",
"customParam3",
";",
"public",
"Packet132TileEntityData",
"(",
")",
"{",
"isChunkDataPacket",
"=",
"true",
";",
"}",
"public",
"Packet132TileEntityData",
"(",
"int",
"par1",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
")",
"{",
"isChunkDataPacket",
"=",
"true",
";",
"xPosition",
"=",
"par1",
";",
"yPosition",
"=",
"par2",
";",
"zPosition",
"=",
"par3",
";",
"actionType",
"=",
"par4",
";",
"customParam1",
"=",
"par5",
";",
"}",
"public",
"void",
"readPacketData",
"(",
"DataInputStream",
"par1DataInputStream",
")",
"throws",
"IOException",
"{",
"xPosition",
"=",
"par1DataInputStream",
".",
"readInt",
"(",
")",
";",
"yPosition",
"=",
"par1DataInputStream",
".",
"readShort",
"(",
")",
";",
"zPosition",
"=",
"par1DataInputStream",
".",
"readInt",
"(",
")",
";",
"actionType",
"=",
"par1DataInputStream",
".",
"readByte",
"(",
")",
";",
"customParam1",
"=",
"par1DataInputStream",
".",
"readInt",
"(",
")",
";",
"customParam2",
"=",
"par1DataInputStream",
".",
"readInt",
"(",
")",
";",
"customParam3",
"=",
"par1DataInputStream",
".",
"readInt",
"(",
")",
";",
"}",
"public",
"void",
"writePacketData",
"(",
"DataOutputStream",
"par1DataOutputStream",
")",
"throws",
"IOException",
"{",
"par1DataOutputStream",
".",
"writeInt",
"(",
"xPosition",
")",
";",
"par1DataOutputStream",
".",
"writeShort",
"(",
"yPosition",
")",
";",
"par1DataOutputStream",
".",
"writeInt",
"(",
"zPosition",
")",
";",
"par1DataOutputStream",
".",
"writeByte",
"(",
"(",
"byte",
")",
"actionType",
")",
";",
"par1DataOutputStream",
".",
"writeInt",
"(",
"customParam1",
")",
";",
"par1DataOutputStream",
".",
"writeInt",
"(",
"customParam2",
")",
";",
"par1DataOutputStream",
".",
"writeInt",
"(",
"customParam3",
")",
";",
"}",
"public",
"void",
"processPacket",
"(",
"NetHandler",
"par1NetHandler",
")",
"{",
"par1NetHandler",
".",
"handleTileEntityData",
"(",
"this",
")",
";",
"}",
"public",
"int",
"getPacketSize",
"(",
")",
"{",
"return",
"25",
";",
"}",
"}",
"</s>"
] |
9,575 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"ArrayList",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"import",
"net",
".",
"minecraft",
".",
"server",
".",
"MinecraftServer",
";",
"public",
"class",
"PlayerManager",
"{",
"public",
"List",
"players",
";",
"private",
"LongHashMap",
"playerInstances",
";",
"private",
"List",
"playerInstancesToUpdate",
";",
"private",
"MinecraftServer",
"mcServer",
";",
"private",
"int",
"playerDimension",
";",
"private",
"int",
"playerViewRadius",
";",
"private",
"final",
"int",
"xzDirectionsConst",
"[",
"]",
"[",
"]",
"=",
"{",
"{",
"1",
",",
"0",
"}",
",",
"{",
"0",
",",
"1",
"}",
",",
"{",
"-",
"1",
",",
"0",
"}",
",",
"{",
"0",
",",
"-",
"1",
"}",
"}",
";",
"public",
"PlayerManager",
"(",
"MinecraftServer",
"par1MinecraftServer",
",",
"int",
"par2",
",",
"int",
"par3",
")",
"{",
"players",
"=",
"new",
"ArrayList",
"(",
")",
";",
"playerInstances",
"=",
"new",
"LongHashMap",
"(",
")",
";",
"playerInstancesToUpdate",
"=",
"new",
"ArrayList",
"(",
")",
";",
"if",
"(",
"par3",
">",
"15",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"\"",
")",
";",
"}",
"if",
"(",
"par3",
"<",
"3",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"\"",
")",
";",
"}",
"else",
"{",
"playerViewRadius",
"=",
"par3",
";",
"mcServer",
"=",
"par1MinecraftServer",
";",
"playerDimension",
"=",
"par2",
";",
"return",
";",
"}",
"}",
"public",
"WorldServer",
"getMinecraftServer",
"(",
")",
"{",
"return",
"mcServer",
".",
"getWorldManager",
"(",
"playerDimension",
")",
";",
"}",
"public",
"void",
"updatePlayerInstances",
"(",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"playerInstancesToUpdate",
".",
"size",
"(",
")",
";",
"i",
"++",
")",
"{",
"(",
"(",
"PlayerInstance",
")",
"playerInstancesToUpdate",
".",
"get",
"(",
"i",
")",
")",
".",
"onUpdate",
"(",
")",
";",
"}",
"playerInstancesToUpdate",
".",
"clear",
"(",
")",
";",
"if",
"(",
"players",
".",
"isEmpty",
"(",
")",
")",
"{",
"WorldServer",
"worldserver",
"=",
"mcServer",
".",
"getWorldManager",
"(",
"playerDimension",
")",
";",
"WorldProvider",
"worldprovider",
"=",
"worldserver",
".",
"worldProvider",
";",
"if",
"(",
"!",
"worldprovider",
".",
"canRespawnHere",
"(",
")",
")",
"{",
"worldserver",
".",
"chunkProviderServer",
".",
"unloadAllChunks",
"(",
")",
";",
"}",
"}",
"}",
"private",
"PlayerInstance",
"getPlayerInstance",
"(",
"int",
"par1",
",",
"int",
"par2",
",",
"boolean",
"par3",
")",
"{",
"long",
"l",
"=",
"(",
"long",
")",
"par1",
"+",
"0x7fffffffL",
"|",
"(",
"long",
")",
"par2",
"+",
"0x7fffffffL",
"<<",
"32",
";",
"PlayerInstance",
"playerinstance",
"=",
"(",
"PlayerInstance",
")",
"playerInstances",
".",
"getValueByKey",
"(",
"l",
")",
";",
"if",
"(",
"playerinstance",
"==",
"null",
"&&",
"par3",
")",
"{",
"playerinstance",
"=",
"new",
"PlayerInstance",
"(",
"this",
",",
"par1",
",",
"par2",
")",
";",
"playerInstances",
".",
"add",
"(",
"l",
",",
"playerinstance",
")",
";",
"}",
"return",
"playerinstance",
";",
"}",
"public",
"void",
"markBlockNeedsUpdate",
"(",
"int",
"par1",
",",
"int",
"par2",
",",
"int",
"par3",
")",
"{",
"int",
"i",
"=",
"par1",
">>",
"4",
";",
"int",
"j",
"=",
"par3",
">>",
"4",
";",
"PlayerInstance",
"playerinstance",
"=",
"getPlayerInstance",
"(",
"i",
",",
"j",
",",
"false",
")",
";",
"if",
"(",
"playerinstance",
"!=",
"null",
")",
"{",
"playerinstance",
".",
"markBlockNeedsUpdate",
"(",
"par1",
"&",
"0xf",
",",
"par2",
",",
"par3",
"&",
"0xf",
")",
";",
"}",
"}",
"public",
"void",
"addPlayer",
"(",
"EntityPlayerMP",
"par1EntityPlayerMP",
")",
"{",
"int",
"i",
"=",
"(",
"int",
")",
"par1EntityPlayerMP",
".",
"posX",
">>",
"4",
";",
"int",
"j",
"=",
"(",
"int",
")",
"par1EntityPlayerMP",
".",
"posZ",
">>",
"4",
";",
"par1EntityPlayerMP",
".",
"managedPosX",
"=",
"par1EntityPlayerMP",
".",
"posX",
";",
"par1EntityPlayerMP",
".",
"managedPosZ",
"=",
"par1EntityPlayerMP",
".",
"posZ",
";",
"int",
"k",
"=",
"0",
";",
"int",
"l",
"=",
"playerViewRadius",
";",
"int",
"i1",
"=",
"0",
";",
"int",
"j1",
"=",
"0",
";",
"getPlayerInstance",
"(",
"i",
",",
"j",
",",
"true",
")",
".",
"addPlayer",
"(",
"par1EntityPlayerMP",
")",
";",
"for",
"(",
"int",
"k1",
"=",
"1",
";",
"k1",
"<=",
"l",
"*",
"2",
";",
"k1",
"++",
")",
"{",
"for",
"(",
"int",
"i2",
"=",
"0",
";",
"i2",
"<",
"2",
";",
"i2",
"++",
")",
"{",
"int",
"ai",
"[",
"]",
"=",
"xzDirectionsConst",
"[",
"k",
"++",
"%",
"4",
"]",
";",
"for",
"(",
"int",
"j2",
"=",
"0",
";",
"j2",
"<",
"k1",
";",
"j2",
"++",
")",
"{",
"i1",
"+=",
"ai",
"[",
"0",
"]",
";",
"j1",
"+=",
"ai",
"[",
"1",
"]",
";",
"getPlayerInstance",
"(",
"i",
"+",
"i1",
",",
"j",
"+",
"j1",
",",
"true",
")",
".",
"addPlayer",
"(",
"par1EntityPlayerMP",
")",
";",
"}",
"}",
"}",
"k",
"%=",
"4",
";",
"for",
"(",
"int",
"l1",
"=",
"0",
";",
"l1",
"<",
"l",
"*",
"2",
";",
"l1",
"++",
")",
"{",
"i1",
"+=",
"xzDirectionsConst",
"[",
"k",
"]",
"[",
"0",
"]",
";",
"j1",
"+=",
"xzDirectionsConst",
"[",
"k",
"]",
"[",
"1",
"]",
";",
"getPlayerInstance",
"(",
"i",
"+",
"i1",
",",
"j",
"+",
"j1",
",",
"true",
")",
".",
"addPlayer",
"(",
"par1EntityPlayerMP",
")",
";",
"}",
"players",
".",
"add",
"(",
"par1EntityPlayerMP",
")",
";",
"}",
"public",
"void",
"removePlayer",
"(",
"EntityPlayerMP",
"par1EntityPlayerMP",
")",
"{",
"int",
"i",
"=",
"(",
"int",
")",
"par1EntityPlayerMP",
".",
"managedPosX",
">>",
"4",
";",
"int",
"j",
"=",
"(",
"int",
")",
"par1EntityPlayerMP",
".",
"managedPosZ",
">>",
"4",
";",
"for",
"(",
"int",
"k",
"=",
"i",
"-",
"playerViewRadius",
";",
"k",
"<=",
"i",
"+",
"playerViewRadius",
";",
"k",
"++",
")",
"{",
"for",
"(",
"int",
"l",
"=",
"j",
"-",
"playerViewRadius",
";",
"l",
"<=",
"j",
"+",
"playerViewRadius",
";",
"l",
"++",
")",
"{",
"PlayerInstance",
"playerinstance",
"=",
"getPlayerInstance",
"(",
"k",
",",
"l",
",",
"false",
")",
";",
"if",
"(",
"playerinstance",
"!=",
"null",
")",
"{",
"playerinstance",
".",
"removePlayer",
"(",
"par1EntityPlayerMP",
")",
";",
"}",
"}",
"}",
"players",
".",
"remove",
"(",
"par1EntityPlayerMP",
")",
";",
"}",
"private",
"boolean",
"isOutsidePlayerViewRadius",
"(",
"int",
"par1",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"int",
"i",
"=",
"par1",
"-",
"par3",
";",
"int",
"j",
"=",
"par2",
"-",
"par4",
";",
"if",
"(",
"i",
"<",
"-",
"playerViewRadius",
"||",
"i",
">",
"playerViewRadius",
")",
"{",
"return",
"false",
";",
"}",
"return",
"j",
">=",
"-",
"playerViewRadius",
"&&",
"j",
"<=",
"playerViewRadius",
";",
"}",
"public",
"void",
"updateMountedMovingPlayer",
"(",
"EntityPlayerMP",
"par1EntityPlayerMP",
")",
"{",
"int",
"i",
"=",
"(",
"int",
")",
"par1EntityPlayerMP",
".",
"posX",
">>",
"4",
";",
"int",
"j",
"=",
"(",
"int",
")",
"par1EntityPlayerMP",
".",
"posZ",
">>",
"4",
";",
"double",
"d",
"=",
"par1EntityPlayerMP",
".",
"managedPosX",
"-",
"par1EntityPlayerMP",
".",
"posX",
";",
"double",
"d1",
"=",
"par1EntityPlayerMP",
".",
"managedPosZ",
"-",
"par1EntityPlayerMP",
".",
"posZ",
";",
"double",
"d2",
"=",
"d",
"*",
"d",
"+",
"d1",
"*",
"d1",
";",
"if",
"(",
"d2",
"<",
"64D",
")",
"{",
"return",
";",
"}",
"int",
"k",
"=",
"(",
"int",
")",
"par1EntityPlayerMP",
".",
"managedPosX",
">>",
"4",
";",
"int",
"l",
"=",
"(",
"int",
")",
"par1EntityPlayerMP",
".",
"managedPosZ",
">>",
"4",
";",
"int",
"i1",
"=",
"i",
"-",
"k",
";",
"int",
"j1",
"=",
"j",
"-",
"l",
";",
"if",
"(",
"i1",
"==",
"0",
"&&",
"j1",
"==",
"0",
")",
"{",
"return",
";",
"}",
"for",
"(",
"int",
"k1",
"=",
"i",
"-",
"playerViewRadius",
";",
"k1",
"<=",
"i",
"+",
"playerViewRadius",
";",
"k1",
"++",
")",
"{",
"for",
"(",
"int",
"l1",
"=",
"j",
"-",
"playerViewRadius",
";",
"l1",
"<=",
"j",
"+",
"playerViewRadius",
";",
"l1",
"++",
")",
"{",
"if",
"(",
"!",
"isOutsidePlayerViewRadius",
"(",
"k1",
",",
"l1",
",",
"k",
",",
"l",
")",
")",
"{",
"getPlayerInstance",
"(",
"k1",
",",
"l1",
",",
"true",
")",
".",
"addPlayer",
"(",
"par1EntityPlayerMP",
")",
";",
"}",
"if",
"(",
"isOutsidePlayerViewRadius",
"(",
"k1",
"-",
"i1",
",",
"l1",
"-",
"j1",
",",
"i",
",",
"j",
")",
")",
"{",
"continue",
";",
"}",
"PlayerInstance",
"playerinstance",
"=",
"getPlayerInstance",
"(",
"k1",
"-",
"i1",
",",
"l1",
"-",
"j1",
",",
"false",
")",
";",
"if",
"(",
"playerinstance",
"!=",
"null",
")",
"{",
"playerinstance",
".",
"removePlayer",
"(",
"par1EntityPlayerMP",
")",
";",
"}",
"}",
"}",
"par1EntityPlayerMP",
".",
"managedPosX",
"=",
"par1EntityPlayerMP",
".",
"posX",
";",
"par1EntityPlayerMP",
".",
"managedPosZ",
"=",
"par1EntityPlayerMP",
".",
"posZ",
";",
"}",
"public",
"int",
"getMaxTrackingDistance",
"(",
")",
"{",
"return",
"playerViewRadius",
"*",
"16",
"-",
"16",
";",
"}",
"static",
"LongHashMap",
"getPlayerInstances",
"(",
"PlayerManager",
"par0PlayerManager",
")",
"{",
"return",
"par0PlayerManager",
".",
"playerInstances",
";",
"}",
"static",
"List",
"getPlayerInstancesToUpdate",
"(",
"PlayerManager",
"par0PlayerManager",
")",
"{",
"return",
"par0PlayerManager",
".",
"playerInstancesToUpdate",
";",
"}",
"}",
"</s>"
] |
9,576 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"class",
"FoodStats",
"{",
"private",
"int",
"foodLevel",
";",
"private",
"float",
"foodSaturationLevel",
";",
"private",
"float",
"foodExhaustionLevel",
";",
"private",
"int",
"foodTimer",
";",
"private",
"int",
"prevFoodLevel",
";",
"public",
"FoodStats",
"(",
")",
"{",
"foodTimer",
"=",
"0",
";",
"foodLevel",
"=",
"20",
";",
"prevFoodLevel",
"=",
"20",
";",
"foodSaturationLevel",
"=",
"5F",
";",
"}",
"public",
"void",
"addStats",
"(",
"int",
"par1",
",",
"float",
"par2",
")",
"{",
"foodLevel",
"=",
"Math",
".",
"min",
"(",
"par1",
"+",
"foodLevel",
",",
"20",
")",
";",
"foodSaturationLevel",
"=",
"Math",
".",
"min",
"(",
"foodSaturationLevel",
"+",
"(",
"float",
")",
"par1",
"*",
"par2",
"*",
"2.0F",
",",
"foodLevel",
")",
";",
"}",
"public",
"void",
"addStats",
"(",
"ItemFood",
"par1ItemFood",
")",
"{",
"addStats",
"(",
"par1ItemFood",
".",
"getHealAmount",
"(",
")",
",",
"par1ItemFood",
".",
"getSaturationModifier",
"(",
")",
")",
";",
"}",
"public",
"void",
"onUpdate",
"(",
"EntityPlayer",
"par1EntityPlayer",
")",
"{",
"int",
"i",
"=",
"par1EntityPlayer",
".",
"worldObj",
".",
"difficultySetting",
";",
"prevFoodLevel",
"=",
"foodLevel",
";",
"if",
"(",
"foodExhaustionLevel",
">",
"4F",
")",
"{",
"foodExhaustionLevel",
"-=",
"4F",
";",
"if",
"(",
"foodSaturationLevel",
">",
"0.0F",
")",
"{",
"foodSaturationLevel",
"=",
"Math",
".",
"max",
"(",
"foodSaturationLevel",
"-",
"1.0F",
",",
"0.0F",
")",
";",
"}",
"else",
"if",
"(",
"i",
">",
"0",
")",
"{",
"foodLevel",
"=",
"Math",
".",
"max",
"(",
"foodLevel",
"-",
"1",
",",
"0",
")",
";",
"}",
"}",
"if",
"(",
"foodLevel",
">=",
"18",
"&&",
"par1EntityPlayer",
".",
"shouldHeal",
"(",
")",
")",
"{",
"foodTimer",
"++",
";",
"if",
"(",
"foodTimer",
">=",
"80",
")",
"{",
"par1EntityPlayer",
".",
"heal",
"(",
"1",
")",
";",
"foodTimer",
"=",
"0",
";",
"}",
"}",
"else",
"if",
"(",
"foodLevel",
"<=",
"0",
")",
"{",
"foodTimer",
"++",
";",
"if",
"(",
"foodTimer",
">=",
"80",
")",
"{",
"if",
"(",
"par1EntityPlayer",
".",
"getHealth",
"(",
")",
">",
"10",
"||",
"i",
">=",
"3",
"||",
"par1EntityPlayer",
".",
"getHealth",
"(",
")",
">",
"1",
"&&",
"i",
">=",
"2",
")",
"{",
"par1EntityPlayer",
".",
"attackEntityFrom",
"(",
"DamageSource",
".",
"starve",
",",
"1",
")",
";",
"}",
"foodTimer",
"=",
"0",
";",
"}",
"}",
"else",
"{",
"foodTimer",
"=",
"0",
";",
"}",
"}",
"public",
"void",
"readNBT",
"(",
"NBTTagCompound",
"par1NBTTagCompound",
")",
"{",
"if",
"(",
"par1NBTTagCompound",
".",
"hasKey",
"(",
"\"foodLevel\"",
")",
")",
"{",
"foodLevel",
"=",
"par1NBTTagCompound",
".",
"getInteger",
"(",
"\"foodLevel\"",
")",
";",
"foodTimer",
"=",
"par1NBTTagCompound",
".",
"getInteger",
"(",
"\"\"",
")",
";",
"foodSaturationLevel",
"=",
"par1NBTTagCompound",
".",
"getFloat",
"(",
"\"\"",
")",
";",
"foodExhaustionLevel",
"=",
"par1NBTTagCompound",
".",
"getFloat",
"(",
"\"\"",
")",
";",
"}",
"}",
"public",
"void",
"writeNBT",
"(",
"NBTTagCompound",
"par1NBTTagCompound",
")",
"{",
"par1NBTTagCompound",
".",
"setInteger",
"(",
"\"foodLevel\"",
",",
"foodLevel",
")",
";",
"par1NBTTagCompound",
".",
"setInteger",
"(",
"\"\"",
",",
"foodTimer",
")",
";",
"par1NBTTagCompound",
".",
"setFloat",
"(",
"\"\"",
",",
"foodSaturationLevel",
")",
";",
"par1NBTTagCompound",
".",
"setFloat",
"(",
"\"\"",
",",
"foodExhaustionLevel",
")",
";",
"}",
"public",
"int",
"getFoodLevel",
"(",
")",
"{",
"return",
"foodLevel",
";",
"}",
"public",
"boolean",
"needFood",
"(",
")",
"{",
"return",
"foodLevel",
"<",
"20",
";",
"}",
"public",
"void",
"addExhaustion",
"(",
"float",
"par1",
")",
"{",
"foodExhaustionLevel",
"=",
"Math",
".",
"min",
"(",
"foodExhaustionLevel",
"+",
"par1",
",",
"40F",
")",
";",
"}",
"public",
"float",
"getSaturationLevel",
"(",
")",
"{",
"return",
"foodSaturationLevel",
";",
"}",
"}",
"</s>"
] |
9,577 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"ComponentNetherBridgeStraight",
"extends",
"ComponentNetherBridgePiece",
"{",
"public",
"ComponentNetherBridgeStraight",
"(",
"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",
",",
"1",
",",
"3",
",",
"false",
")",
";",
"}",
"public",
"static",
"ComponentNetherBridgeStraight",
"createValidComponent",
"(",
"List",
"par0List",
",",
"Random",
"par1Random",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
",",
"int",
"par6",
")",
"{",
"StructureBoundingBox",
"structureboundingbox",
"=",
"StructureBoundingBox",
".",
"getComponentToAddBoundingBox",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"-",
"1",
",",
"-",
"3",
",",
"0",
",",
"5",
",",
"10",
",",
"19",
",",
"par5",
")",
";",
"if",
"(",
"!",
"isAboveGround",
"(",
"structureboundingbox",
")",
"||",
"StructureComponent",
".",
"findIntersecting",
"(",
"par0List",
",",
"structureboundingbox",
")",
"!=",
"null",
")",
"{",
"return",
"null",
";",
"}",
"else",
"{",
"return",
"new",
"ComponentNetherBridgeStraight",
"(",
"par6",
",",
"par1Random",
",",
"structureboundingbox",
",",
"par5",
")",
";",
"}",
"}",
"public",
"boolean",
"addComponentParts",
"(",
"World",
"par1World",
",",
"Random",
"par2Random",
",",
"StructureBoundingBox",
"par3StructureBoundingBox",
")",
"{",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"0",
",",
"3",
",",
"0",
",",
"4",
",",
"4",
",",
"18",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"1",
",",
"5",
",",
"0",
",",
"3",
",",
"7",
",",
"18",
",",
"0",
",",
"0",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"0",
",",
"5",
",",
"0",
",",
"0",
",",
"5",
",",
"18",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"4",
",",
"5",
",",
"0",
",",
"4",
",",
"5",
",",
"18",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"0",
",",
"2",
",",
"0",
",",
"4",
",",
"2",
",",
"5",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"0",
",",
"2",
",",
"13",
",",
"4",
",",
"2",
",",
"18",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"0",
",",
"0",
",",
"0",
",",
"4",
",",
"1",
",",
"3",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"0",
",",
"0",
",",
"15",
",",
"4",
",",
"1",
",",
"18",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<=",
"4",
";",
"i",
"++",
")",
"{",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<=",
"2",
";",
"j",
"++",
")",
"{",
"fillCurrentPositionBlocksDownwards",
"(",
"par1World",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"0",
",",
"i",
",",
"-",
"1",
",",
"j",
",",
"par3StructureBoundingBox",
")",
";",
"fillCurrentPositionBlocksDownwards",
"(",
"par1World",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"0",
",",
"i",
",",
"-",
"1",
",",
"18",
"-",
"j",
",",
"par3StructureBoundingBox",
")",
";",
"}",
"}",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"0",
",",
"1",
",",
"1",
",",
"0",
",",
"4",
",",
"1",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"0",
",",
"3",
",",
"4",
",",
"0",
",",
"4",
",",
"4",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"0",
",",
"3",
",",
"14",
",",
"0",
",",
"4",
",",
"14",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"0",
",",
"1",
",",
"17",
",",
"0",
",",
"4",
",",
"17",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"4",
",",
"1",
",",
"1",
",",
"4",
",",
"4",
",",
"1",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"4",
",",
"3",
",",
"4",
",",
"4",
",",
"4",
",",
"4",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"4",
",",
"3",
",",
"14",
",",
"4",
",",
"4",
",",
"14",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"4",
",",
"1",
",",
"17",
",",
"4",
",",
"4",
",",
"17",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"false",
")",
";",
"return",
"true",
";",
"}",
"}",
"</s>"
] |
9,578 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"WorldGenBigTree",
"extends",
"WorldGenerator",
"{",
"static",
"final",
"byte",
"otherCoordPairs",
"[",
"]",
"=",
"{",
"2",
",",
"0",
",",
"0",
",",
"1",
",",
"2",
",",
"1",
"}",
";",
"Random",
"rand",
";",
"World",
"worldObj",
";",
"int",
"basePos",
"[",
"]",
"=",
"{",
"0",
",",
"0",
",",
"0",
"}",
";",
"int",
"heightLimit",
";",
"int",
"height",
";",
"double",
"heightAttenuation",
";",
"double",
"branchDensity",
";",
"double",
"branchSlope",
";",
"double",
"scaleWidth",
";",
"double",
"leafDensity",
";",
"int",
"trunkSize",
";",
"int",
"heightLimitLimit",
";",
"int",
"leafDistanceLimit",
";",
"int",
"leafNodes",
"[",
"]",
"[",
"]",
";",
"public",
"WorldGenBigTree",
"(",
"boolean",
"par1",
")",
"{",
"super",
"(",
"par1",
")",
";",
"rand",
"=",
"new",
"Random",
"(",
")",
";",
"heightLimit",
"=",
"0",
";",
"heightAttenuation",
"=",
"0.61799999999999999D",
";",
"branchDensity",
"=",
"1.0D",
";",
"branchSlope",
"=",
"0.38100000000000001D",
";",
"scaleWidth",
"=",
"1.0D",
";",
"leafDensity",
"=",
"1.0D",
";",
"trunkSize",
"=",
"1",
";",
"heightLimitLimit",
"=",
"12",
";",
"leafDistanceLimit",
"=",
"4",
";",
"}",
"void",
"generateLeafNodeList",
"(",
")",
"{",
"height",
"=",
"(",
"int",
")",
"(",
"(",
"double",
")",
"heightLimit",
"*",
"heightAttenuation",
")",
";",
"if",
"(",
"height",
">=",
"heightLimit",
")",
"{",
"height",
"=",
"heightLimit",
"-",
"1",
";",
"}",
"int",
"i",
"=",
"(",
"int",
")",
"(",
"1.3819999999999999D",
"+",
"Math",
".",
"pow",
"(",
"(",
"leafDensity",
"*",
"(",
"double",
")",
"heightLimit",
")",
"/",
"13D",
",",
"2D",
")",
")",
";",
"if",
"(",
"i",
"<",
"1",
")",
"{",
"i",
"=",
"1",
";",
"}",
"int",
"ai",
"[",
"]",
"[",
"]",
"=",
"new",
"int",
"[",
"i",
"*",
"heightLimit",
"]",
"[",
"4",
"]",
";",
"int",
"j",
"=",
"(",
"basePos",
"[",
"1",
"]",
"+",
"heightLimit",
")",
"-",
"leafDistanceLimit",
";",
"int",
"k",
"=",
"1",
";",
"int",
"l",
"=",
"basePos",
"[",
"1",
"]",
"+",
"height",
";",
"int",
"i1",
"=",
"j",
"-",
"basePos",
"[",
"1",
"]",
";",
"ai",
"[",
"0",
"]",
"[",
"0",
"]",
"=",
"basePos",
"[",
"0",
"]",
";",
"ai",
"[",
"0",
"]",
"[",
"1",
"]",
"=",
"j",
";",
"ai",
"[",
"0",
"]",
"[",
"2",
"]",
"=",
"basePos",
"[",
"2",
"]",
";",
"ai",
"[",
"0",
"]",
"[",
"3",
"]",
"=",
"l",
";",
"j",
"--",
";",
"while",
"(",
"i1",
">=",
"0",
")",
"{",
"int",
"j1",
"=",
"0",
";",
"float",
"f",
"=",
"layerSize",
"(",
"i1",
")",
";",
"if",
"(",
"f",
"<",
"0.0F",
")",
"{",
"j",
"--",
";",
"i1",
"--",
";",
"}",
"else",
"{",
"double",
"d",
"=",
"0.5D",
";",
"for",
"(",
";",
"j1",
"<",
"i",
";",
"j1",
"++",
")",
"{",
"double",
"d1",
"=",
"scaleWidth",
"*",
"(",
"(",
"double",
")",
"f",
"*",
"(",
"(",
"double",
")",
"rand",
".",
"nextFloat",
"(",
")",
"+",
"0.32800000000000001D",
")",
")",
";",
"double",
"d2",
"=",
"(",
"double",
")",
"rand",
".",
"nextFloat",
"(",
")",
"*",
"2D",
"*",
"Math",
".",
"PI",
";",
"int",
"k1",
"=",
"MathHelper",
".",
"floor_double",
"(",
"d1",
"*",
"Math",
".",
"sin",
"(",
"d2",
")",
"+",
"(",
"double",
")",
"basePos",
"[",
"0",
"]",
"+",
"d",
")",
";",
"int",
"l1",
"=",
"MathHelper",
".",
"floor_double",
"(",
"d1",
"*",
"Math",
".",
"cos",
"(",
"d2",
")",
"+",
"(",
"double",
")",
"basePos",
"[",
"2",
"]",
"+",
"d",
")",
";",
"int",
"ai1",
"[",
"]",
"=",
"{",
"k1",
",",
"j",
",",
"l1",
"}",
";",
"int",
"ai2",
"[",
"]",
"=",
"{",
"k1",
",",
"j",
"+",
"leafDistanceLimit",
",",
"l1",
"}",
";",
"if",
"(",
"checkBlockLine",
"(",
"ai1",
",",
"ai2",
")",
"!=",
"-",
"1",
")",
"{",
"continue",
";",
"}",
"int",
"ai3",
"[",
"]",
"=",
"{",
"basePos",
"[",
"0",
"]",
",",
"basePos",
"[",
"1",
"]",
",",
"basePos",
"[",
"2",
"]",
"}",
";",
"double",
"d3",
"=",
"Math",
".",
"sqrt",
"(",
"Math",
".",
"pow",
"(",
"Math",
".",
"abs",
"(",
"basePos",
"[",
"0",
"]",
"-",
"ai1",
"[",
"0",
"]",
")",
",",
"2D",
")",
"+",
"Math",
".",
"pow",
"(",
"Math",
".",
"abs",
"(",
"basePos",
"[",
"2",
"]",
"-",
"ai1",
"[",
"2",
"]",
")",
",",
"2D",
")",
")",
";",
"double",
"d4",
"=",
"d3",
"*",
"branchSlope",
";",
"if",
"(",
"(",
"double",
")",
"ai1",
"[",
"1",
"]",
"-",
"d4",
">",
"(",
"double",
")",
"l",
")",
"{",
"ai3",
"[",
"1",
"]",
"=",
"l",
";",
"}",
"else",
"{",
"ai3",
"[",
"1",
"]",
"=",
"(",
"int",
")",
"(",
"(",
"double",
")",
"ai1",
"[",
"1",
"]",
"-",
"d4",
")",
";",
"}",
"if",
"(",
"checkBlockLine",
"(",
"ai3",
",",
"ai1",
")",
"==",
"-",
"1",
")",
"{",
"ai",
"[",
"k",
"]",
"[",
"0",
"]",
"=",
"k1",
";",
"ai",
"[",
"k",
"]",
"[",
"1",
"]",
"=",
"j",
";",
"ai",
"[",
"k",
"]",
"[",
"2",
"]",
"=",
"l1",
";",
"ai",
"[",
"k",
"]",
"[",
"3",
"]",
"=",
"ai3",
"[",
"1",
"]",
";",
"k",
"++",
";",
"}",
"}",
"j",
"--",
";",
"i1",
"--",
";",
"}",
"}",
"leafNodes",
"=",
"new",
"int",
"[",
"k",
"]",
"[",
"4",
"]",
";",
"System",
".",
"arraycopy",
"(",
"ai",
",",
"0",
",",
"leafNodes",
",",
"0",
",",
"k",
")",
";",
"}",
"void",
"genTreeLayer",
"(",
"int",
"par1",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"float",
"par4",
",",
"byte",
"par5",
",",
"int",
"par6",
")",
"{",
"int",
"i",
"=",
"(",
"int",
")",
"(",
"(",
"double",
")",
"par4",
"+",
"0.61799999999999999D",
")",
";",
"byte",
"byte0",
"=",
"otherCoordPairs",
"[",
"par5",
"]",
";",
"byte",
"byte1",
"=",
"otherCoordPairs",
"[",
"par5",
"+",
"3",
"]",
";",
"int",
"ai",
"[",
"]",
"=",
"{",
"par1",
",",
"par2",
",",
"par3",
"}",
";",
"int",
"ai1",
"[",
"]",
"=",
"{",
"0",
",",
"0",
",",
"0",
"}",
";",
"int",
"j",
"=",
"-",
"i",
";",
"int",
"k",
"=",
"-",
"i",
";",
"ai1",
"[",
"par5",
"]",
"=",
"ai",
"[",
"par5",
"]",
";",
"for",
"(",
";",
"j",
"<=",
"i",
";",
"j",
"++",
")",
"{",
"ai1",
"[",
"byte0",
"]",
"=",
"ai",
"[",
"byte0",
"]",
"+",
"j",
";",
"for",
"(",
"int",
"l",
"=",
"-",
"i",
";",
"l",
"<=",
"i",
";",
")",
"{",
"double",
"d",
"=",
"Math",
".",
"sqrt",
"(",
"Math",
".",
"pow",
"(",
"(",
"double",
")",
"Math",
".",
"abs",
"(",
"j",
")",
"+",
"0.5D",
",",
"2D",
")",
"+",
"Math",
".",
"pow",
"(",
"(",
"double",
")",
"Math",
".",
"abs",
"(",
"l",
")",
"+",
"0.5D",
",",
"2D",
")",
")",
";",
"if",
"(",
"d",
">",
"(",
"double",
")",
"par4",
")",
"{",
"l",
"++",
";",
"}",
"else",
"{",
"ai1",
"[",
"byte1",
"]",
"=",
"ai",
"[",
"byte1",
"]",
"+",
"l",
";",
"int",
"i1",
"=",
"worldObj",
".",
"getBlockId",
"(",
"ai1",
"[",
"0",
"]",
",",
"ai1",
"[",
"1",
"]",
",",
"ai1",
"[",
"2",
"]",
")",
";",
"if",
"(",
"i1",
"!=",
"0",
"&&",
"i1",
"!=",
"18",
")",
"{",
"l",
"++",
";",
"}",
"else",
"{",
"setBlockAndMetadata",
"(",
"worldObj",
",",
"ai1",
"[",
"0",
"]",
",",
"ai1",
"[",
"1",
"]",
",",
"ai1",
"[",
"2",
"]",
",",
"par6",
",",
"0",
")",
";",
"l",
"++",
";",
"}",
"}",
"}",
"}",
"}",
"float",
"layerSize",
"(",
"int",
"par1",
")",
"{",
"if",
"(",
"(",
"double",
")",
"par1",
"<",
"(",
"double",
")",
"(",
"float",
")",
"heightLimit",
"*",
"0.29999999999999999D",
")",
"{",
"return",
"-",
"1.618F",
";",
"}",
"float",
"f",
"=",
"(",
"float",
")",
"heightLimit",
"/",
"2.0F",
";",
"float",
"f1",
"=",
"(",
"float",
")",
"heightLimit",
"/",
"2.0F",
"-",
"(",
"float",
")",
"par1",
";",
"float",
"f2",
";",
"if",
"(",
"f1",
"==",
"0.0F",
")",
"{",
"f2",
"=",
"f",
";",
"}",
"else",
"if",
"(",
"Math",
".",
"abs",
"(",
"f1",
")",
">=",
"f",
")",
"{",
"f2",
"=",
"0.0F",
";",
"}",
"else",
"{",
"f2",
"=",
"(",
"float",
")",
"Math",
".",
"sqrt",
"(",
"Math",
".",
"pow",
"(",
"Math",
".",
"abs",
"(",
"f",
")",
",",
"2D",
")",
"-",
"Math",
".",
"pow",
"(",
"Math",
".",
"abs",
"(",
"f1",
")",
",",
"2D",
")",
")",
";",
"}",
"f2",
"*=",
"0.5F",
";",
"return",
"f2",
";",
"}",
"float",
"leafSize",
"(",
"int",
"par1",
")",
"{",
"if",
"(",
"par1",
"<",
"0",
"||",
"par1",
">=",
"leafDistanceLimit",
")",
"{",
"return",
"-",
"1F",
";",
"}",
"return",
"par1",
"!=",
"0",
"&&",
"par1",
"!=",
"leafDistanceLimit",
"-",
"1",
"?",
"3F",
":",
"2.0F",
";",
"}",
"void",
"generateLeafNode",
"(",
"int",
"par1",
",",
"int",
"par2",
",",
"int",
"par3",
")",
"{",
"int",
"i",
"=",
"par2",
";",
"for",
"(",
"int",
"j",
"=",
"par2",
"+",
"leafDistanceLimit",
";",
"i",
"<",
"j",
";",
"i",
"++",
")",
"{",
"float",
"f",
"=",
"leafSize",
"(",
"i",
"-",
"par2",
")",
";",
"genTreeLayer",
"(",
"par1",
",",
"i",
",",
"par3",
",",
"f",
",",
"(",
"byte",
")",
"1",
",",
"18",
")",
";",
"}",
"}",
"void",
"placeBlockLine",
"(",
"int",
"par1ArrayOfInteger",
"[",
"]",
",",
"int",
"par2ArrayOfInteger",
"[",
"]",
",",
"int",
"par3",
")",
"{",
"int",
"ai",
"[",
"]",
"=",
"{",
"0",
",",
"0",
",",
"0",
"}",
";",
"byte",
"byte0",
"=",
"0",
";",
"int",
"i",
"=",
"0",
";",
"for",
"(",
";",
"byte0",
"<",
"3",
";",
"byte0",
"++",
")",
"{",
"ai",
"[",
"byte0",
"]",
"=",
"par2ArrayOfInteger",
"[",
"byte0",
"]",
"-",
"par1ArrayOfInteger",
"[",
"byte0",
"]",
";",
"if",
"(",
"Math",
".",
"abs",
"(",
"ai",
"[",
"byte0",
"]",
")",
">",
"Math",
".",
"abs",
"(",
"ai",
"[",
"i",
"]",
")",
")",
"{",
"i",
"=",
"byte0",
";",
"}",
"}",
"if",
"(",
"ai",
"[",
"i",
"]",
"==",
"0",
")",
"{",
"return",
";",
"}",
"byte",
"byte1",
"=",
"otherCoordPairs",
"[",
"i",
"]",
";",
"byte",
"byte2",
"=",
"otherCoordPairs",
"[",
"i",
"+",
"3",
"]",
";",
"byte",
"byte3",
";",
"if",
"(",
"ai",
"[",
"i",
"]",
">",
"0",
")",
"{",
"byte3",
"=",
"1",
";",
"}",
"else",
"{",
"byte3",
"=",
"-",
"1",
";",
"}",
"double",
"d",
"=",
"(",
"double",
")",
"ai",
"[",
"byte1",
"]",
"/",
"(",
"double",
")",
"ai",
"[",
"i",
"]",
";",
"double",
"d1",
"=",
"(",
"double",
")",
"ai",
"[",
"byte2",
"]",
"/",
"(",
"double",
")",
"ai",
"[",
"i",
"]",
";",
"int",
"ai1",
"[",
"]",
"=",
"{",
"0",
",",
"0",
",",
"0",
"}",
";",
"int",
"j",
"=",
"0",
";",
"for",
"(",
"int",
"k",
"=",
"ai",
"[",
"i",
"]",
"+",
"byte3",
";",
"j",
"!=",
"k",
";",
"j",
"+=",
"byte3",
")",
"{",
"ai1",
"[",
"i",
"]",
"=",
"MathHelper",
".",
"floor_double",
"(",
"(",
"double",
")",
"(",
"par1ArrayOfInteger",
"[",
"i",
"]",
"+",
"j",
")",
"+",
"0.5D",
")",
";",
"ai1",
"[",
"byte1",
"]",
"=",
"MathHelper",
".",
"floor_double",
"(",
"(",
"double",
")",
"par1ArrayOfInteger",
"[",
"byte1",
"]",
"+",
"(",
"double",
")",
"j",
"*",
"d",
"+",
"0.5D",
")",
";",
"ai1",
"[",
"byte2",
"]",
"=",
"MathHelper",
".",
"floor_double",
"(",
"(",
"double",
")",
"par1ArrayOfInteger",
"[",
"byte2",
"]",
"+",
"(",
"double",
")",
"j",
"*",
"d1",
"+",
"0.5D",
")",
";",
"setBlockAndMetadata",
"(",
"worldObj",
",",
"ai1",
"[",
"0",
"]",
",",
"ai1",
"[",
"1",
"]",
",",
"ai1",
"[",
"2",
"]",
",",
"par3",
",",
"0",
")",
";",
"}",
"}",
"void",
"generateLeaves",
"(",
")",
"{",
"int",
"i",
"=",
"0",
";",
"for",
"(",
"int",
"j",
"=",
"leafNodes",
".",
"length",
";",
"i",
"<",
"j",
";",
"i",
"++",
")",
"{",
"int",
"k",
"=",
"leafNodes",
"[",
"i",
"]",
"[",
"0",
"]",
";",
"int",
"l",
"=",
"leafNodes",
"[",
"i",
"]",
"[",
"1",
"]",
";",
"int",
"i1",
"=",
"leafNodes",
"[",
"i",
"]",
"[",
"2",
"]",
";",
"generateLeafNode",
"(",
"k",
",",
"l",
",",
"i1",
")",
";",
"}",
"}",
"boolean",
"leafNodeNeedsBase",
"(",
"int",
"par1",
")",
"{",
"return",
"(",
"double",
")",
"par1",
">=",
"(",
"double",
")",
"heightLimit",
"*",
"0.20000000000000001D",
";",
"}",
"void",
"generateTrunk",
"(",
")",
"{",
"int",
"i",
"=",
"basePos",
"[",
"0",
"]",
";",
"int",
"j",
"=",
"basePos",
"[",
"1",
"]",
";",
"int",
"k",
"=",
"basePos",
"[",
"1",
"]",
"+",
"height",
";",
"int",
"l",
"=",
"basePos",
"[",
"2",
"]",
";",
"int",
"ai",
"[",
"]",
"=",
"{",
"i",
",",
"j",
",",
"l",
"}",
";",
"int",
"ai1",
"[",
"]",
"=",
"{",
"i",
",",
"k",
",",
"l",
"}",
";",
"placeBlockLine",
"(",
"ai",
",",
"ai1",
",",
"17",
")",
";",
"if",
"(",
"trunkSize",
"==",
"2",
")",
"{",
"ai",
"[",
"0",
"]",
"++",
";",
"ai1",
"[",
"0",
"]",
"++",
";",
"placeBlockLine",
"(",
"ai",
",",
"ai1",
",",
"17",
")",
";",
"ai",
"[",
"2",
"]",
"++",
";",
"ai1",
"[",
"2",
"]",
"++",
";",
"placeBlockLine",
"(",
"ai",
",",
"ai1",
",",
"17",
")",
";",
"ai",
"[",
"0",
"]",
"--",
";",
"ai1",
"[",
"0",
"]",
"--",
";",
"placeBlockLine",
"(",
"ai",
",",
"ai1",
",",
"17",
")",
";",
"}",
"}",
"void",
"generateLeafNodeBases",
"(",
")",
"{",
"int",
"i",
"=",
"0",
";",
"int",
"j",
"=",
"leafNodes",
".",
"length",
";",
"int",
"ai",
"[",
"]",
"=",
"{",
"basePos",
"[",
"0",
"]",
",",
"basePos",
"[",
"1",
"]",
",",
"basePos",
"[",
"2",
"]",
"}",
";",
"for",
"(",
";",
"i",
"<",
"j",
";",
"i",
"++",
")",
"{",
"int",
"ai1",
"[",
"]",
"=",
"leafNodes",
"[",
"i",
"]",
";",
"int",
"ai2",
"[",
"]",
"=",
"{",
"ai1",
"[",
"0",
"]",
",",
"ai1",
"[",
"1",
"]",
",",
"ai1",
"[",
"2",
"]",
"}",
";",
"ai",
"[",
"1",
"]",
"=",
"ai1",
"[",
"3",
"]",
";",
"int",
"k",
"=",
"ai",
"[",
"1",
"]",
"-",
"basePos",
"[",
"1",
"]",
";",
"if",
"(",
"leafNodeNeedsBase",
"(",
"k",
")",
")",
"{",
"placeBlockLine",
"(",
"ai",
",",
"ai2",
",",
"17",
")",
";",
"}",
"}",
"}",
"int",
"checkBlockLine",
"(",
"int",
"par1ArrayOfInteger",
"[",
"]",
",",
"int",
"par2ArrayOfInteger",
"[",
"]",
")",
"{",
"int",
"ai",
"[",
"]",
"=",
"{",
"0",
",",
"0",
",",
"0",
"}",
";",
"byte",
"byte0",
"=",
"0",
";",
"int",
"i",
"=",
"0",
";",
"for",
"(",
";",
"byte0",
"<",
"3",
";",
"byte0",
"++",
")",
"{",
"ai",
"[",
"byte0",
"]",
"=",
"par2ArrayOfInteger",
"[",
"byte0",
"]",
"-",
"par1ArrayOfInteger",
"[",
"byte0",
"]",
";",
"if",
"(",
"Math",
".",
"abs",
"(",
"ai",
"[",
"byte0",
"]",
")",
">",
"Math",
".",
"abs",
"(",
"ai",
"[",
"i",
"]",
")",
")",
"{",
"i",
"=",
"byte0",
";",
"}",
"}",
"if",
"(",
"ai",
"[",
"i",
"]",
"==",
"0",
")",
"{",
"return",
"-",
"1",
";",
"}",
"byte",
"byte1",
"=",
"otherCoordPairs",
"[",
"i",
"]",
";",
"byte",
"byte2",
"=",
"otherCoordPairs",
"[",
"i",
"+",
"3",
"]",
";",
"byte",
"byte3",
";",
"if",
"(",
"ai",
"[",
"i",
"]",
">",
"0",
")",
"{",
"byte3",
"=",
"1",
";",
"}",
"else",
"{",
"byte3",
"=",
"-",
"1",
";",
"}",
"double",
"d",
"=",
"(",
"double",
")",
"ai",
"[",
"byte1",
"]",
"/",
"(",
"double",
")",
"ai",
"[",
"i",
"]",
";",
"double",
"d1",
"=",
"(",
"double",
")",
"ai",
"[",
"byte2",
"]",
"/",
"(",
"double",
")",
"ai",
"[",
"i",
"]",
";",
"int",
"ai1",
"[",
"]",
"=",
"{",
"0",
",",
"0",
",",
"0",
"}",
";",
"int",
"j",
"=",
"0",
";",
"int",
"k",
"=",
"ai",
"[",
"i",
"]",
"+",
"byte3",
";",
"do",
"{",
"if",
"(",
"j",
"==",
"k",
")",
"{",
"break",
";",
"}",
"ai1",
"[",
"i",
"]",
"=",
"par1ArrayOfInteger",
"[",
"i",
"]",
"+",
"j",
";",
"ai1",
"[",
"byte1",
"]",
"=",
"MathHelper",
".",
"floor_double",
"(",
"(",
"double",
")",
"par1ArrayOfInteger",
"[",
"byte1",
"]",
"+",
"(",
"double",
")",
"j",
"*",
"d",
")",
";",
"ai1",
"[",
"byte2",
"]",
"=",
"MathHelper",
".",
"floor_double",
"(",
"(",
"double",
")",
"par1ArrayOfInteger",
"[",
"byte2",
"]",
"+",
"(",
"double",
")",
"j",
"*",
"d1",
")",
";",
"int",
"l",
"=",
"worldObj",
".",
"getBlockId",
"(",
"ai1",
"[",
"0",
"]",
",",
"ai1",
"[",
"1",
"]",
",",
"ai1",
"[",
"2",
"]",
")",
";",
"if",
"(",
"l",
"!=",
"0",
"&&",
"l",
"!=",
"18",
")",
"{",
"break",
";",
"}",
"j",
"+=",
"byte3",
";",
"}",
"while",
"(",
"true",
")",
";",
"if",
"(",
"j",
"==",
"k",
")",
"{",
"return",
"-",
"1",
";",
"}",
"else",
"{",
"return",
"Math",
".",
"abs",
"(",
"j",
")",
";",
"}",
"}",
"boolean",
"validTreeLocation",
"(",
")",
"{",
"int",
"ai",
"[",
"]",
"=",
"{",
"basePos",
"[",
"0",
"]",
",",
"basePos",
"[",
"1",
"]",
",",
"basePos",
"[",
"2",
"]",
"}",
";",
"int",
"ai1",
"[",
"]",
"=",
"{",
"basePos",
"[",
"0",
"]",
",",
"(",
"basePos",
"[",
"1",
"]",
"+",
"heightLimit",
")",
"-",
"1",
",",
"basePos",
"[",
"2",
"]",
"}",
";",
"int",
"i",
"=",
"worldObj",
".",
"getBlockId",
"(",
"basePos",
"[",
"0",
"]",
",",
"basePos",
"[",
"1",
"]",
"-",
"1",
",",
"basePos",
"[",
"2",
"]",
")",
";",
"if",
"(",
"i",
"!=",
"2",
"&&",
"i",
"!=",
"3",
")",
"{",
"return",
"false",
";",
"}",
"int",
"j",
"=",
"checkBlockLine",
"(",
"ai",
",",
"ai1",
")",
";",
"if",
"(",
"j",
"==",
"-",
"1",
")",
"{",
"return",
"true",
";",
"}",
"if",
"(",
"j",
"<",
"6",
")",
"{",
"return",
"false",
";",
"}",
"else",
"{",
"heightLimit",
"=",
"j",
";",
"return",
"true",
";",
"}",
"}",
"public",
"void",
"setScale",
"(",
"double",
"par1",
",",
"double",
"par3",
",",
"double",
"par5",
")",
"{",
"heightLimitLimit",
"=",
"(",
"int",
")",
"(",
"par1",
"*",
"12D",
")",
";",
"if",
"(",
"par1",
">",
"0.5D",
")",
"{",
"leafDistanceLimit",
"=",
"5",
";",
"}",
"scaleWidth",
"=",
"par3",
";",
"leafDensity",
"=",
"par5",
";",
"}",
"public",
"boolean",
"generate",
"(",
"World",
"par1World",
",",
"Random",
"par2Random",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
")",
"{",
"worldObj",
"=",
"par1World",
";",
"long",
"l",
"=",
"par2Random",
".",
"nextLong",
"(",
")",
";",
"rand",
".",
"setSeed",
"(",
"l",
")",
";",
"basePos",
"[",
"0",
"]",
"=",
"par3",
";",
"basePos",
"[",
"1",
"]",
"=",
"par4",
";",
"basePos",
"[",
"2",
"]",
"=",
"par5",
";",
"if",
"(",
"heightLimit",
"==",
"0",
")",
"{",
"heightLimit",
"=",
"5",
"+",
"rand",
".",
"nextInt",
"(",
"heightLimitLimit",
")",
";",
"}",
"if",
"(",
"!",
"validTreeLocation",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",
"else",
"{",
"generateLeafNodeList",
"(",
")",
";",
"generateLeaves",
"(",
")",
";",
"generateTrunk",
"(",
")",
";",
"generateLeafNodeBases",
"(",
")",
";",
"return",
"true",
";",
"}",
"}",
"}",
"</s>"
] |
9,579 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"io",
".",
"PrintWriter",
";",
"import",
"java",
".",
"io",
".",
"StringWriter",
";",
"import",
"java",
".",
"util",
".",
"logging",
".",
"*",
";",
"class",
"GuiLogFormatter",
"extends",
"Formatter",
"{",
"final",
"GuiLogOutputHandler",
"outputHandler",
";",
"GuiLogFormatter",
"(",
"GuiLogOutputHandler",
"par1GuiLogOutputHandler",
")",
"{",
"outputHandler",
"=",
"par1GuiLogOutputHandler",
";",
"}",
"public",
"String",
"format",
"(",
"LogRecord",
"par1LogRecord",
")",
"{",
"StringBuilder",
"stringbuilder",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"Level",
"level",
"=",
"par1LogRecord",
".",
"getLevel",
"(",
")",
";",
"if",
"(",
"level",
"==",
"Level",
".",
"FINEST",
")",
"{",
"stringbuilder",
".",
"append",
"(",
"\"[FINEST]",
"\"",
")",
";",
"}",
"else",
"if",
"(",
"level",
"==",
"Level",
".",
"FINER",
")",
"{",
"stringbuilder",
".",
"append",
"(",
"\"[FINER]",
"\"",
")",
";",
"}",
"else",
"if",
"(",
"level",
"==",
"Level",
".",
"FINE",
")",
"{",
"stringbuilder",
".",
"append",
"(",
"\"[FINE]",
"\"",
")",
";",
"}",
"else",
"if",
"(",
"level",
"==",
"Level",
".",
"INFO",
")",
"{",
"stringbuilder",
".",
"append",
"(",
"\"[INFO]",
"\"",
")",
";",
"}",
"else",
"if",
"(",
"level",
"==",
"Level",
".",
"WARNING",
")",
"{",
"stringbuilder",
".",
"append",
"(",
"\"[WARNING]",
"\"",
")",
";",
"}",
"else",
"if",
"(",
"level",
"==",
"Level",
".",
"SEVERE",
")",
"{",
"stringbuilder",
".",
"append",
"(",
"\"[SEVERE]",
"\"",
")",
";",
"}",
"else",
"if",
"(",
"level",
"==",
"Level",
".",
"SEVERE",
")",
"{",
"stringbuilder",
".",
"append",
"(",
"(",
"new",
"StringBuilder",
"(",
")",
")",
".",
"append",
"(",
"\"[\"",
")",
".",
"append",
"(",
"level",
".",
"getLocalizedName",
"(",
")",
")",
".",
"append",
"(",
"\"]",
"\"",
")",
".",
"toString",
"(",
")",
")",
";",
"}",
"stringbuilder",
".",
"append",
"(",
"par1LogRecord",
".",
"getMessage",
"(",
")",
")",
";",
"stringbuilder",
".",
"append",
"(",
"'\\n'",
")",
";",
"Throwable",
"throwable",
"=",
"par1LogRecord",
".",
"getThrown",
"(",
")",
";",
"if",
"(",
"throwable",
"!=",
"null",
")",
"{",
"StringWriter",
"stringwriter",
"=",
"new",
"StringWriter",
"(",
")",
";",
"throwable",
".",
"printStackTrace",
"(",
"new",
"PrintWriter",
"(",
"stringwriter",
")",
")",
";",
"stringbuilder",
".",
"append",
"(",
"stringwriter",
".",
"toString",
"(",
")",
")",
";",
"}",
"return",
"stringbuilder",
".",
"toString",
"(",
")",
";",
"}",
"}",
"</s>"
] |
9,580 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"ComponentNetherBridgeCrossing",
"extends",
"ComponentNetherBridgePiece",
"{",
"public",
"ComponentNetherBridgeCrossing",
"(",
"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",
",",
"2",
",",
"0",
",",
"false",
")",
";",
"getNextComponentX",
"(",
"(",
"ComponentNetherBridgeStartPiece",
")",
"par1StructureComponent",
",",
"par2List",
",",
"par3Random",
",",
"0",
",",
"2",
",",
"false",
")",
";",
"getNextComponentZ",
"(",
"(",
"ComponentNetherBridgeStartPiece",
")",
"par1StructureComponent",
",",
"par2List",
",",
"par3Random",
",",
"0",
",",
"2",
",",
"false",
")",
";",
"}",
"public",
"static",
"ComponentNetherBridgeCrossing",
"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",
",",
"9",
",",
"7",
",",
"par5",
")",
";",
"if",
"(",
"!",
"isAboveGround",
"(",
"structureboundingbox",
")",
"||",
"StructureComponent",
".",
"findIntersecting",
"(",
"par0List",
",",
"structureboundingbox",
")",
"!=",
"null",
")",
"{",
"return",
"null",
";",
"}",
"else",
"{",
"return",
"new",
"ComponentNetherBridgeCrossing",
"(",
"par6",
",",
"par1Random",
",",
"structureboundingbox",
",",
"par5",
")",
";",
"}",
"}",
"public",
"boolean",
"addComponentParts",
"(",
"World",
"par1World",
",",
"Random",
"par2Random",
",",
"StructureBoundingBox",
"par3StructureBoundingBox",
")",
"{",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"0",
",",
"0",
",",
"0",
",",
"6",
",",
"1",
",",
"6",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"0",
",",
"2",
",",
"0",
",",
"6",
",",
"7",
",",
"6",
",",
"0",
",",
"0",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"0",
",",
"2",
",",
"0",
",",
"1",
",",
"6",
",",
"0",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"0",
",",
"2",
",",
"6",
",",
"1",
",",
"6",
",",
"6",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"5",
",",
"2",
",",
"0",
",",
"6",
",",
"6",
",",
"0",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"5",
",",
"2",
",",
"6",
",",
"6",
",",
"6",
",",
"6",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"0",
",",
"2",
",",
"0",
",",
"0",
",",
"6",
",",
"1",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"0",
",",
"2",
",",
"5",
",",
"0",
",",
"6",
",",
"6",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"6",
",",
"2",
",",
"0",
",",
"6",
",",
"6",
",",
"1",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"6",
",",
"2",
",",
"5",
",",
"6",
",",
"6",
",",
"6",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"2",
",",
"6",
",",
"0",
",",
"4",
",",
"6",
",",
"0",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"2",
",",
"5",
",",
"0",
",",
"4",
",",
"5",
",",
"0",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"2",
",",
"6",
",",
"6",
",",
"4",
",",
"6",
",",
"6",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"2",
",",
"5",
",",
"6",
",",
"4",
",",
"5",
",",
"6",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"0",
",",
"6",
",",
"2",
",",
"0",
",",
"6",
",",
"4",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"0",
",",
"5",
",",
"2",
",",
"0",
",",
"5",
",",
"4",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"6",
",",
"6",
",",
"2",
",",
"6",
",",
"6",
",",
"4",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"6",
",",
"5",
",",
"2",
",",
"6",
",",
"5",
",",
"4",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"false",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<=",
"6",
";",
"i",
"++",
")",
"{",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<=",
"6",
";",
"j",
"++",
")",
"{",
"fillCurrentPositionBlocksDownwards",
"(",
"par1World",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"0",
",",
"i",
",",
"-",
"1",
",",
"j",
",",
"par3StructureBoundingBox",
")",
";",
"}",
"}",
"return",
"true",
";",
"}",
"}",
"</s>"
] |
9,581 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"io",
".",
"File",
";",
"import",
"java",
".",
"io",
".",
"FileInputStream",
";",
"public",
"class",
"SaveFormatOld",
"implements",
"ISaveFormat",
"{",
"protected",
"final",
"File",
"savesDirectory",
";",
"public",
"SaveFormatOld",
"(",
"File",
"par1File",
")",
"{",
"if",
"(",
"!",
"par1File",
".",
"exists",
"(",
")",
")",
"{",
"par1File",
".",
"mkdirs",
"(",
")",
";",
"}",
"savesDirectory",
"=",
"par1File",
";",
"}",
"public",
"WorldInfo",
"getWorldInfo",
"(",
"String",
"par1Str",
")",
"{",
"File",
"file",
"=",
"new",
"File",
"(",
"savesDirectory",
",",
"par1Str",
")",
";",
"if",
"(",
"!",
"file",
".",
"exists",
"(",
")",
")",
"{",
"return",
"null",
";",
"}",
"File",
"file1",
"=",
"new",
"File",
"(",
"file",
",",
"\"level.dat\"",
")",
";",
"if",
"(",
"file1",
".",
"exists",
"(",
")",
")",
"{",
"try",
"{",
"NBTTagCompound",
"nbttagcompound",
"=",
"CompressedStreamTools",
".",
"readCompressed",
"(",
"new",
"FileInputStream",
"(",
"file1",
")",
")",
";",
"NBTTagCompound",
"nbttagcompound2",
"=",
"nbttagcompound",
".",
"getCompoundTag",
"(",
"\"Data\"",
")",
";",
"return",
"new",
"WorldInfo",
"(",
"nbttagcompound2",
")",
";",
"}",
"catch",
"(",
"Exception",
"exception",
")",
"{",
"exception",
".",
"printStackTrace",
"(",
")",
";",
"}",
"}",
"file1",
"=",
"new",
"File",
"(",
"file",
",",
"\"\"",
")",
";",
"if",
"(",
"file1",
".",
"exists",
"(",
")",
")",
"{",
"try",
"{",
"NBTTagCompound",
"nbttagcompound1",
"=",
"CompressedStreamTools",
".",
"readCompressed",
"(",
"new",
"FileInputStream",
"(",
"file1",
")",
")",
";",
"NBTTagCompound",
"nbttagcompound3",
"=",
"nbttagcompound1",
".",
"getCompoundTag",
"(",
"\"Data\"",
")",
";",
"return",
"new",
"WorldInfo",
"(",
"nbttagcompound3",
")",
";",
"}",
"catch",
"(",
"Exception",
"exception1",
")",
"{",
"exception1",
".",
"printStackTrace",
"(",
")",
";",
"}",
"}",
"return",
"null",
";",
"}",
"public",
"ISaveHandler",
"getSaveLoader",
"(",
"String",
"par1Str",
",",
"boolean",
"par2",
")",
"{",
"return",
"new",
"SaveHandler",
"(",
"savesDirectory",
",",
"par1Str",
",",
"par2",
")",
";",
"}",
"public",
"boolean",
"isOldMapFormat",
"(",
"String",
"par1Str",
")",
"{",
"return",
"false",
";",
"}",
"public",
"boolean",
"convertMapFormat",
"(",
"String",
"par1Str",
",",
"IProgressUpdate",
"par2IProgressUpdate",
")",
"{",
"return",
"false",
";",
"}",
"}",
"</s>"
] |
9,582 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"io",
".",
"*",
";",
"public",
"class",
"Packet107CreativeSetSlot",
"extends",
"Packet",
"{",
"public",
"int",
"slot",
";",
"public",
"ItemStack",
"itemStack",
";",
"public",
"Packet107CreativeSetSlot",
"(",
")",
"{",
"}",
"public",
"void",
"processPacket",
"(",
"NetHandler",
"par1NetHandler",
")",
"{",
"par1NetHandler",
".",
"handleCreativeSetSlot",
"(",
"this",
")",
";",
"}",
"public",
"void",
"readPacketData",
"(",
"DataInputStream",
"par1DataInputStream",
")",
"throws",
"IOException",
"{",
"slot",
"=",
"par1DataInputStream",
".",
"readShort",
"(",
")",
";",
"itemStack",
"=",
"readItemStack",
"(",
"par1DataInputStream",
")",
";",
"}",
"public",
"void",
"writePacketData",
"(",
"DataOutputStream",
"par1DataOutputStream",
")",
"throws",
"IOException",
"{",
"par1DataOutputStream",
".",
"writeShort",
"(",
"slot",
")",
";",
"writeItemStack",
"(",
"itemStack",
",",
"par1DataOutputStream",
")",
";",
"}",
"public",
"int",
"getPacketSize",
"(",
")",
"{",
"return",
"8",
";",
"}",
"}",
"</s>"
] |
9,583 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"io",
".",
"*",
";",
"public",
"class",
"Packet29DestroyEntity",
"extends",
"Packet",
"{",
"public",
"int",
"entityId",
";",
"public",
"Packet29DestroyEntity",
"(",
")",
"{",
"}",
"public",
"Packet29DestroyEntity",
"(",
"int",
"par1",
")",
"{",
"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",
".",
"handleDestroyEntity",
"(",
"this",
")",
";",
"}",
"public",
"int",
"getPacketSize",
"(",
")",
"{",
"return",
"4",
";",
"}",
"}",
"</s>"
] |
9,584 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"*",
";",
"class",
"PlayerInstance",
"{",
"private",
"List",
"players",
";",
"private",
"int",
"chunkX",
";",
"private",
"int",
"chunkZ",
";",
"private",
"ChunkCoordIntPair",
"currentChunk",
";",
"private",
"short",
"blocksToUpdate",
"[",
"]",
";",
"private",
"int",
"numBlocksToUpdate",
";",
"private",
"int",
"field_48475_h",
";",
"final",
"PlayerManager",
"playerManager",
";",
"public",
"PlayerInstance",
"(",
"PlayerManager",
"par1PlayerManager",
",",
"int",
"par2",
",",
"int",
"par3",
")",
"{",
"playerManager",
"=",
"par1PlayerManager",
";",
"players",
"=",
"new",
"ArrayList",
"(",
")",
";",
"blocksToUpdate",
"=",
"new",
"short",
"[",
"64",
"]",
";",
"numBlocksToUpdate",
"=",
"0",
";",
"chunkX",
"=",
"par2",
";",
"chunkZ",
"=",
"par3",
";",
"currentChunk",
"=",
"new",
"ChunkCoordIntPair",
"(",
"par2",
",",
"par3",
")",
";",
"par1PlayerManager",
".",
"getMinecraftServer",
"(",
")",
".",
"chunkProviderServer",
".",
"loadChunk",
"(",
"par2",
",",
"par3",
")",
";",
"}",
"public",
"void",
"addPlayer",
"(",
"EntityPlayerMP",
"par1EntityPlayerMP",
")",
"{",
"if",
"(",
"players",
".",
"contains",
"(",
"par1EntityPlayerMP",
")",
")",
"{",
"throw",
"new",
"IllegalStateException",
"(",
"(",
"new",
"StringBuilder",
"(",
")",
")",
".",
"append",
"(",
"\"\"",
")",
".",
"append",
"(",
"par1EntityPlayerMP",
")",
".",
"append",
"(",
"\"\"",
")",
".",
"append",
"(",
"chunkX",
")",
".",
"append",
"(",
"\",",
"\"",
")",
".",
"append",
"(",
"chunkZ",
")",
".",
"toString",
"(",
")",
")",
";",
"}",
"else",
"{",
"par1EntityPlayerMP",
".",
"listeningChunks",
".",
"add",
"(",
"currentChunk",
")",
";",
"par1EntityPlayerMP",
".",
"playerNetServerHandler",
".",
"sendPacket",
"(",
"new",
"Packet50PreChunk",
"(",
"currentChunk",
".",
"chunkXPos",
",",
"currentChunk",
".",
"chunkZPos",
",",
"true",
")",
")",
";",
"players",
".",
"add",
"(",
"par1EntityPlayerMP",
")",
";",
"par1EntityPlayerMP",
".",
"loadedChunks",
".",
"add",
"(",
"currentChunk",
")",
";",
"return",
";",
"}",
"}",
"public",
"void",
"removePlayer",
"(",
"EntityPlayerMP",
"par1EntityPlayerMP",
")",
"{",
"if",
"(",
"!",
"players",
".",
"contains",
"(",
"par1EntityPlayerMP",
")",
")",
"{",
"return",
";",
"}",
"players",
".",
"remove",
"(",
"par1EntityPlayerMP",
")",
";",
"if",
"(",
"players",
".",
"size",
"(",
")",
"==",
"0",
")",
"{",
"long",
"l",
"=",
"(",
"long",
")",
"chunkX",
"+",
"0x7fffffffL",
"|",
"(",
"long",
")",
"chunkZ",
"+",
"0x7fffffffL",
"<<",
"32",
";",
"PlayerManager",
".",
"getPlayerInstances",
"(",
"playerManager",
")",
".",
"remove",
"(",
"l",
")",
";",
"if",
"(",
"numBlocksToUpdate",
">",
"0",
")",
"{",
"PlayerManager",
".",
"getPlayerInstancesToUpdate",
"(",
"playerManager",
")",
".",
"remove",
"(",
"this",
")",
";",
"}",
"playerManager",
".",
"getMinecraftServer",
"(",
")",
".",
"chunkProviderServer",
".",
"dropChunk",
"(",
"chunkX",
",",
"chunkZ",
")",
";",
"}",
"par1EntityPlayerMP",
".",
"loadedChunks",
".",
"remove",
"(",
"currentChunk",
")",
";",
"if",
"(",
"par1EntityPlayerMP",
".",
"listeningChunks",
".",
"contains",
"(",
"currentChunk",
")",
")",
"{",
"par1EntityPlayerMP",
".",
"playerNetServerHandler",
".",
"sendPacket",
"(",
"new",
"Packet50PreChunk",
"(",
"chunkX",
",",
"chunkZ",
",",
"false",
")",
")",
";",
"}",
"}",
"public",
"void",
"markBlockNeedsUpdate",
"(",
"int",
"par1",
",",
"int",
"par2",
",",
"int",
"par3",
")",
"{",
"if",
"(",
"numBlocksToUpdate",
"==",
"0",
")",
"{",
"PlayerManager",
".",
"getPlayerInstancesToUpdate",
"(",
"playerManager",
")",
".",
"add",
"(",
"this",
")",
";",
"}",
"field_48475_h",
"|=",
"1",
"<<",
"(",
"par2",
">>",
"4",
")",
";",
"if",
"(",
"numBlocksToUpdate",
"<",
"64",
")",
"{",
"short",
"word0",
"=",
"(",
"short",
")",
"(",
"par1",
"<<",
"12",
"|",
"par3",
"<<",
"8",
"|",
"par2",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"numBlocksToUpdate",
";",
"i",
"++",
")",
"{",
"if",
"(",
"blocksToUpdate",
"[",
"i",
"]",
"==",
"word0",
")",
"{",
"return",
";",
"}",
"}",
"blocksToUpdate",
"[",
"numBlocksToUpdate",
"++",
"]",
"=",
"word0",
";",
"}",
"}",
"public",
"void",
"sendPacketToPlayersInInstance",
"(",
"Packet",
"par1Packet",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"players",
".",
"size",
"(",
")",
";",
"i",
"++",
")",
"{",
"EntityPlayerMP",
"entityplayermp",
"=",
"(",
"EntityPlayerMP",
")",
"players",
".",
"get",
"(",
"i",
")",
";",
"if",
"(",
"entityplayermp",
".",
"listeningChunks",
".",
"contains",
"(",
"currentChunk",
")",
"&&",
"!",
"entityplayermp",
".",
"loadedChunks",
".",
"contains",
"(",
"currentChunk",
")",
")",
"{",
"entityplayermp",
".",
"playerNetServerHandler",
".",
"sendPacket",
"(",
"par1Packet",
")",
";",
"}",
"}",
"}",
"public",
"void",
"onUpdate",
"(",
")",
"{",
"WorldServer",
"worldserver",
"=",
"playerManager",
".",
"getMinecraftServer",
"(",
")",
";",
"if",
"(",
"numBlocksToUpdate",
"==",
"0",
")",
"{",
"return",
";",
"}",
"if",
"(",
"numBlocksToUpdate",
"==",
"1",
")",
"{",
"int",
"i",
"=",
"chunkX",
"*",
"16",
"+",
"(",
"blocksToUpdate",
"[",
"0",
"]",
">>",
"12",
"&",
"0xf",
")",
";",
"int",
"l",
"=",
"blocksToUpdate",
"[",
"0",
"]",
"&",
"0xff",
";",
"int",
"k1",
"=",
"chunkZ",
"*",
"16",
"+",
"(",
"blocksToUpdate",
"[",
"0",
"]",
">>",
"8",
"&",
"0xf",
")",
";",
"sendPacketToPlayersInInstance",
"(",
"new",
"Packet53BlockChange",
"(",
"i",
",",
"l",
",",
"k1",
",",
"worldserver",
")",
")",
";",
"if",
"(",
"worldserver",
".",
"func_48084_h",
"(",
"i",
",",
"l",
",",
"k1",
")",
")",
"{",
"updateTileEntity",
"(",
"worldserver",
".",
"getBlockTileEntity",
"(",
"i",
",",
"l",
",",
"k1",
")",
")",
";",
"}",
"}",
"else",
"if",
"(",
"numBlocksToUpdate",
"==",
"64",
")",
"{",
"int",
"j",
"=",
"chunkX",
"*",
"16",
";",
"int",
"i1",
"=",
"chunkZ",
"*",
"16",
";",
"sendPacketToPlayersInInstance",
"(",
"new",
"Packet51MapChunk",
"(",
"worldserver",
".",
"getChunkFromChunkCoords",
"(",
"chunkX",
",",
"chunkZ",
")",
",",
"false",
",",
"field_48475_h",
")",
")",
";",
"for",
"(",
"int",
"l1",
"=",
"0",
";",
"l1",
"<",
"16",
";",
"l1",
"++",
")",
"{",
"if",
"(",
"(",
"field_48475_h",
"&",
"1",
"<<",
"l1",
")",
"!=",
"0",
")",
"{",
"int",
"j2",
"=",
"l1",
"<<",
"4",
";",
"List",
"list",
"=",
"worldserver",
".",
"getTileEntityList",
"(",
"j",
",",
"j2",
",",
"i1",
",",
"j",
"+",
"16",
",",
"j2",
"+",
"16",
",",
"i1",
"+",
"16",
")",
";",
"for",
"(",
"int",
"l2",
"=",
"0",
";",
"l2",
"<",
"list",
".",
"size",
"(",
")",
";",
"l2",
"++",
")",
"{",
"updateTileEntity",
"(",
"(",
"TileEntity",
")",
"list",
".",
"get",
"(",
"l2",
")",
")",
";",
"}",
"}",
"}",
"}",
"else",
"{",
"sendPacketToPlayersInInstance",
"(",
"new",
"Packet52MultiBlockChange",
"(",
"chunkX",
",",
"chunkZ",
",",
"blocksToUpdate",
",",
"numBlocksToUpdate",
",",
"worldserver",
")",
")",
";",
"for",
"(",
"int",
"k",
"=",
"0",
";",
"k",
"<",
"numBlocksToUpdate",
";",
"k",
"++",
")",
"{",
"int",
"j1",
"=",
"chunkX",
"*",
"16",
"+",
"(",
"blocksToUpdate",
"[",
"k",
"]",
">>",
"12",
"&",
"0xf",
")",
";",
"int",
"i2",
"=",
"blocksToUpdate",
"[",
"k",
"]",
"&",
"0xff",
";",
"int",
"k2",
"=",
"chunkZ",
"*",
"16",
"+",
"(",
"blocksToUpdate",
"[",
"k",
"]",
">>",
"8",
"&",
"0xf",
")",
";",
"if",
"(",
"worldserver",
".",
"func_48084_h",
"(",
"j1",
",",
"i2",
",",
"k2",
")",
")",
"{",
"updateTileEntity",
"(",
"worldserver",
".",
"getBlockTileEntity",
"(",
"j1",
",",
"i2",
",",
"k2",
")",
")",
";",
"}",
"}",
"}",
"numBlocksToUpdate",
"=",
"0",
";",
"field_48475_h",
"=",
"0",
";",
"}",
"private",
"void",
"updateTileEntity",
"(",
"TileEntity",
"par1TileEntity",
")",
"{",
"if",
"(",
"par1TileEntity",
"!=",
"null",
")",
"{",
"Packet",
"packet",
"=",
"par1TileEntity",
".",
"getDescriptionPacket",
"(",
")",
";",
"if",
"(",
"packet",
"!=",
"null",
")",
"{",
"sendPacketToPlayersInInstance",
"(",
"packet",
")",
";",
"}",
"}",
"}",
"}",
"</s>"
] |
9,585 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"class",
"SlotFurnace",
"extends",
"Slot",
"{",
"private",
"EntityPlayer",
"thePlayer",
";",
"private",
"int",
"field_48419_f",
";",
"public",
"SlotFurnace",
"(",
"EntityPlayer",
"par1EntityPlayer",
",",
"IInventory",
"par2IInventory",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
")",
"{",
"super",
"(",
"par2IInventory",
",",
"par3",
",",
"par4",
",",
"par5",
")",
";",
"thePlayer",
"=",
"par1EntityPlayer",
";",
"}",
"public",
"boolean",
"isItemValid",
"(",
"ItemStack",
"par1ItemStack",
")",
"{",
"return",
"false",
";",
"}",
"public",
"ItemStack",
"decrStackSize",
"(",
"int",
"par1",
")",
"{",
"if",
"(",
"getHasStack",
"(",
")",
")",
"{",
"field_48419_f",
"+=",
"Math",
".",
"min",
"(",
"par1",
",",
"getStack",
"(",
")",
".",
"stackSize",
")",
";",
"}",
"return",
"super",
".",
"decrStackSize",
"(",
"par1",
")",
";",
"}",
"public",
"void",
"onPickupFromSlot",
"(",
"ItemStack",
"par1ItemStack",
")",
"{",
"func_48416_b",
"(",
"par1ItemStack",
")",
";",
"super",
".",
"onPickupFromSlot",
"(",
"par1ItemStack",
")",
";",
"}",
"protected",
"void",
"func_48415_a",
"(",
"ItemStack",
"par1ItemStack",
",",
"int",
"par2",
")",
"{",
"field_48419_f",
"+=",
"par2",
";",
"func_48416_b",
"(",
"par1ItemStack",
")",
";",
"}",
"protected",
"void",
"func_48416_b",
"(",
"ItemStack",
"par1ItemStack",
")",
"{",
"par1ItemStack",
".",
"onCrafting",
"(",
"thePlayer",
".",
"worldObj",
",",
"thePlayer",
",",
"field_48419_f",
")",
";",
"field_48419_f",
"=",
"0",
";",
"if",
"(",
"par1ItemStack",
".",
"itemID",
"==",
"Item",
".",
"ingotIron",
".",
"shiftedIndex",
")",
"{",
"thePlayer",
".",
"addStat",
"(",
"AchievementList",
".",
"acquireIron",
",",
"1",
")",
";",
"}",
"if",
"(",
"par1ItemStack",
".",
"itemID",
"==",
"Item",
".",
"fishCooked",
".",
"shiftedIndex",
")",
"{",
"thePlayer",
".",
"addStat",
"(",
"AchievementList",
".",
"cookFish",
",",
"1",
")",
";",
"}",
"}",
"}",
"</s>"
] |
9,586 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"class",
"SlotBrewingStandIngredient",
"extends",
"Slot",
"{",
"final",
"ContainerBrewingStand",
"container",
";",
"public",
"SlotBrewingStandIngredient",
"(",
"ContainerBrewingStand",
"par1ContainerBrewingStand",
",",
"IInventory",
"par2IInventory",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
")",
"{",
"super",
"(",
"par2IInventory",
",",
"par3",
",",
"par4",
",",
"par5",
")",
";",
"container",
"=",
"par1ContainerBrewingStand",
";",
"}",
"public",
"boolean",
"isItemValid",
"(",
"ItemStack",
"par1ItemStack",
")",
"{",
"if",
"(",
"par1ItemStack",
"!=",
"null",
")",
"{",
"return",
"Item",
".",
"itemsList",
"[",
"par1ItemStack",
".",
"itemID",
"]",
".",
"isPotionIngredient",
"(",
")",
";",
"}",
"else",
"{",
"return",
"false",
";",
"}",
"}",
"public",
"int",
"getSlotStackLimit",
"(",
")",
"{",
"return",
"64",
";",
"}",
"}",
"</s>"
] |
9,587 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"class",
"RecipesTools",
"{",
"private",
"String",
"recipePatterns",
"[",
"]",
"[",
"]",
"=",
"{",
"{",
"\"XXX\"",
",",
"\"",
"#",
"\"",
",",
"\"",
"#",
"\"",
"}",
",",
"{",
"\"X\"",
",",
"\"#\"",
",",
"\"#\"",
"}",
",",
"{",
"\"XX\"",
",",
"\"X#\"",
",",
"\"",
"#\"",
"}",
",",
"{",
"\"XX\"",
",",
"\"",
"#\"",
",",
"\"",
"#\"",
"}",
"}",
";",
"private",
"Object",
"recipeItems",
"[",
"]",
"[",
"]",
";",
"public",
"RecipesTools",
"(",
")",
"{",
"recipeItems",
"=",
"(",
"new",
"Object",
"[",
"]",
"[",
"]",
"{",
"new",
"Object",
"[",
"]",
"{",
"Block",
".",
"planks",
",",
"Block",
".",
"cobblestone",
",",
"Item",
".",
"ingotIron",
",",
"Item",
".",
"diamond",
",",
"Item",
".",
"ingotGold",
"}",
",",
"new",
"Object",
"[",
"]",
"{",
"Item",
".",
"pickaxeWood",
",",
"Item",
".",
"pickaxeStone",
",",
"Item",
".",
"pickaxeSteel",
",",
"Item",
".",
"pickaxeDiamond",
",",
"Item",
".",
"pickaxeGold",
"}",
",",
"new",
"Object",
"[",
"]",
"{",
"Item",
".",
"shovelWood",
",",
"Item",
".",
"shovelStone",
",",
"Item",
".",
"shovelSteel",
",",
"Item",
".",
"shovelDiamond",
",",
"Item",
".",
"shovelGold",
"}",
",",
"new",
"Object",
"[",
"]",
"{",
"Item",
".",
"axeWood",
",",
"Item",
".",
"axeStone",
",",
"Item",
".",
"axeSteel",
",",
"Item",
".",
"axeDiamond",
",",
"Item",
".",
"axeGold",
"}",
",",
"new",
"Object",
"[",
"]",
"{",
"Item",
".",
"hoeWood",
",",
"Item",
".",
"hoeStone",
",",
"Item",
".",
"hoeSteel",
",",
"Item",
".",
"hoeDiamond",
",",
"Item",
".",
"hoeGold",
"}",
"}",
")",
";",
"}",
"public",
"void",
"addRecipes",
"(",
"CraftingManager",
"par1CraftingManager",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"recipeItems",
"[",
"0",
"]",
".",
"length",
";",
"i",
"++",
")",
"{",
"Object",
"obj",
"=",
"recipeItems",
"[",
"0",
"]",
"[",
"i",
"]",
";",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
"recipeItems",
".",
"length",
"-",
"1",
";",
"j",
"++",
")",
"{",
"Item",
"item",
"=",
"(",
"Item",
")",
"recipeItems",
"[",
"j",
"+",
"1",
"]",
"[",
"i",
"]",
";",
"par1CraftingManager",
".",
"addRecipe",
"(",
"new",
"ItemStack",
"(",
"item",
")",
",",
"new",
"Object",
"[",
"]",
"{",
"recipePatterns",
"[",
"j",
"]",
",",
"'#'",
",",
"Item",
".",
"stick",
",",
"'X'",
",",
"obj",
"}",
")",
";",
"}",
"}",
"par1CraftingManager",
".",
"addRecipe",
"(",
"new",
"ItemStack",
"(",
"Item",
".",
"shears",
")",
",",
"new",
"Object",
"[",
"]",
"{",
"\"",
"#\"",
",",
"\"#",
"\"",
",",
"'#'",
",",
"Item",
".",
"ingotIron",
"}",
")",
";",
"}",
"}",
"</s>"
] |
9,588 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"io",
".",
"*",
";",
"public",
"class",
"Packet4UpdateTime",
"extends",
"Packet",
"{",
"public",
"long",
"time",
";",
"public",
"Packet4UpdateTime",
"(",
")",
"{",
"}",
"public",
"Packet4UpdateTime",
"(",
"long",
"par1",
")",
"{",
"time",
"=",
"par1",
";",
"}",
"public",
"void",
"readPacketData",
"(",
"DataInputStream",
"par1DataInputStream",
")",
"throws",
"IOException",
"{",
"time",
"=",
"par1DataInputStream",
".",
"readLong",
"(",
")",
";",
"}",
"public",
"void",
"writePacketData",
"(",
"DataOutputStream",
"par1DataOutputStream",
")",
"throws",
"IOException",
"{",
"par1DataOutputStream",
".",
"writeLong",
"(",
"time",
")",
";",
"}",
"public",
"void",
"processPacket",
"(",
"NetHandler",
"par1NetHandler",
")",
"{",
"par1NetHandler",
".",
"handleUpdateTime",
"(",
"this",
")",
";",
"}",
"public",
"int",
"getPacketSize",
"(",
")",
"{",
"return",
"8",
";",
"}",
"}",
"</s>"
] |
9,589 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"class",
"EnchantmentData",
"extends",
"WeightedRandomChoice",
"{",
"public",
"final",
"Enchantment",
"enchantmentobj",
";",
"public",
"final",
"int",
"enchantmentLevel",
";",
"public",
"EnchantmentData",
"(",
"Enchantment",
"par1Enchantment",
",",
"int",
"par2",
")",
"{",
"super",
"(",
"par1Enchantment",
".",
"getWeight",
"(",
")",
")",
";",
"enchantmentobj",
"=",
"par1Enchantment",
";",
"enchantmentLevel",
"=",
"par2",
";",
"}",
"}",
"</s>"
] |
9,590 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"io",
".",
"*",
";",
"public",
"class",
"Packet41EntityEffect",
"extends",
"Packet",
"{",
"public",
"int",
"entityId",
";",
"public",
"byte",
"effectId",
";",
"public",
"byte",
"effectAmp",
";",
"public",
"short",
"duration",
";",
"public",
"Packet41EntityEffect",
"(",
")",
"{",
"}",
"public",
"Packet41EntityEffect",
"(",
"int",
"par1",
",",
"PotionEffect",
"par2PotionEffect",
")",
"{",
"entityId",
"=",
"par1",
";",
"effectId",
"=",
"(",
"byte",
")",
"(",
"par2PotionEffect",
".",
"getPotionID",
"(",
")",
"&",
"0xff",
")",
";",
"effectAmp",
"=",
"(",
"byte",
")",
"(",
"par2PotionEffect",
".",
"getAmplifier",
"(",
")",
"&",
"0xff",
")",
";",
"duration",
"=",
"(",
"short",
")",
"par2PotionEffect",
".",
"getDuration",
"(",
")",
";",
"}",
"public",
"void",
"readPacketData",
"(",
"DataInputStream",
"par1DataInputStream",
")",
"throws",
"IOException",
"{",
"entityId",
"=",
"par1DataInputStream",
".",
"readInt",
"(",
")",
";",
"effectId",
"=",
"par1DataInputStream",
".",
"readByte",
"(",
")",
";",
"effectAmp",
"=",
"par1DataInputStream",
".",
"readByte",
"(",
")",
";",
"duration",
"=",
"par1DataInputStream",
".",
"readShort",
"(",
")",
";",
"}",
"public",
"void",
"writePacketData",
"(",
"DataOutputStream",
"par1DataOutputStream",
")",
"throws",
"IOException",
"{",
"par1DataOutputStream",
".",
"writeInt",
"(",
"entityId",
")",
";",
"par1DataOutputStream",
".",
"writeByte",
"(",
"effectId",
")",
";",
"par1DataOutputStream",
".",
"writeByte",
"(",
"effectAmp",
")",
";",
"par1DataOutputStream",
".",
"writeShort",
"(",
"duration",
")",
";",
"}",
"public",
"void",
"processPacket",
"(",
"NetHandler",
"par1NetHandler",
")",
"{",
"par1NetHandler",
".",
"handleEntityEffect",
"(",
"this",
")",
";",
"}",
"public",
"int",
"getPacketSize",
"(",
")",
"{",
"return",
"8",
";",
"}",
"}",
"</s>"
] |
9,591 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"final",
"class",
"ItemStack",
"{",
"public",
"int",
"stackSize",
";",
"public",
"int",
"animationsToGo",
";",
"public",
"int",
"itemID",
";",
"public",
"NBTTagCompound",
"stackTagCompound",
";",
"private",
"int",
"itemDamage",
";",
"public",
"ItemStack",
"(",
"Block",
"par1Block",
")",
"{",
"this",
"(",
"par1Block",
",",
"1",
")",
";",
"}",
"public",
"ItemStack",
"(",
"Block",
"par1Block",
",",
"int",
"par2",
")",
"{",
"this",
"(",
"par1Block",
".",
"blockID",
",",
"par2",
",",
"0",
")",
";",
"}",
"public",
"ItemStack",
"(",
"Block",
"par1Block",
",",
"int",
"par2",
",",
"int",
"par3",
")",
"{",
"this",
"(",
"par1Block",
".",
"blockID",
",",
"par2",
",",
"par3",
")",
";",
"}",
"public",
"ItemStack",
"(",
"Item",
"par1Item",
")",
"{",
"this",
"(",
"par1Item",
".",
"shiftedIndex",
",",
"1",
",",
"0",
")",
";",
"}",
"public",
"ItemStack",
"(",
"Item",
"par1Item",
",",
"int",
"par2",
")",
"{",
"this",
"(",
"par1Item",
".",
"shiftedIndex",
",",
"par2",
",",
"0",
")",
";",
"}",
"public",
"ItemStack",
"(",
"Item",
"par1Item",
",",
"int",
"par2",
",",
"int",
"par3",
")",
"{",
"this",
"(",
"par1Item",
".",
"shiftedIndex",
",",
"par2",
",",
"par3",
")",
";",
"}",
"public",
"ItemStack",
"(",
"int",
"par1",
",",
"int",
"par2",
",",
"int",
"par3",
")",
"{",
"stackSize",
"=",
"0",
";",
"itemID",
"=",
"par1",
";",
"stackSize",
"=",
"par2",
";",
"itemDamage",
"=",
"par3",
";",
"}",
"public",
"static",
"ItemStack",
"loadItemStackFromNBT",
"(",
"NBTTagCompound",
"par0NBTTagCompound",
")",
"{",
"ItemStack",
"itemstack",
"=",
"new",
"ItemStack",
"(",
")",
";",
"itemstack",
".",
"readFromNBT",
"(",
"par0NBTTagCompound",
")",
";",
"return",
"itemstack",
".",
"getItem",
"(",
")",
"==",
"null",
"?",
"null",
":",
"itemstack",
";",
"}",
"private",
"ItemStack",
"(",
")",
"{",
"stackSize",
"=",
"0",
";",
"}",
"public",
"ItemStack",
"splitStack",
"(",
"int",
"par1",
")",
"{",
"ItemStack",
"itemstack",
"=",
"new",
"ItemStack",
"(",
"itemID",
",",
"par1",
",",
"itemDamage",
")",
";",
"if",
"(",
"stackTagCompound",
"!=",
"null",
")",
"{",
"itemstack",
".",
"stackTagCompound",
"=",
"(",
"NBTTagCompound",
")",
"stackTagCompound",
".",
"copy",
"(",
")",
";",
"}",
"stackSize",
"-=",
"par1",
";",
"return",
"itemstack",
";",
"}",
"public",
"Item",
"getItem",
"(",
")",
"{",
"return",
"Item",
".",
"itemsList",
"[",
"itemID",
"]",
";",
"}",
"public",
"boolean",
"useItem",
"(",
"EntityPlayer",
"par1EntityPlayer",
",",
"World",
"par2World",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
",",
"int",
"par6",
")",
"{",
"boolean",
"flag",
"=",
"getItem",
"(",
")",
".",
"onItemUse",
"(",
"this",
",",
"par1EntityPlayer",
",",
"par2World",
",",
"par3",
",",
"par4",
",",
"par5",
",",
"par6",
")",
";",
"if",
"(",
"flag",
")",
"{",
"par1EntityPlayer",
".",
"addStat",
"(",
"StatList",
".",
"objectUseStats",
"[",
"itemID",
"]",
",",
"1",
")",
";",
"}",
"return",
"flag",
";",
"}",
"public",
"float",
"getStrVsBlock",
"(",
"Block",
"par1Block",
")",
"{",
"return",
"getItem",
"(",
")",
".",
"getStrVsBlock",
"(",
"this",
",",
"par1Block",
")",
";",
"}",
"public",
"ItemStack",
"useItemRightClick",
"(",
"World",
"par1World",
",",
"EntityPlayer",
"par2EntityPlayer",
")",
"{",
"return",
"getItem",
"(",
")",
".",
"onItemRightClick",
"(",
"this",
",",
"par1World",
",",
"par2EntityPlayer",
")",
";",
"}",
"public",
"ItemStack",
"onFoodEaten",
"(",
"World",
"par1World",
",",
"EntityPlayer",
"par2EntityPlayer",
")",
"{",
"return",
"getItem",
"(",
")",
".",
"onFoodEaten",
"(",
"this",
",",
"par1World",
",",
"par2EntityPlayer",
")",
";",
"}",
"public",
"NBTTagCompound",
"writeToNBT",
"(",
"NBTTagCompound",
"par1NBTTagCompound",
")",
"{",
"par1NBTTagCompound",
".",
"setShort",
"(",
"\"id\"",
",",
"(",
"short",
")",
"itemID",
")",
";",
"par1NBTTagCompound",
".",
"setByte",
"(",
"\"Count\"",
",",
"(",
"byte",
")",
"stackSize",
")",
";",
"par1NBTTagCompound",
".",
"setShort",
"(",
"\"Damage\"",
",",
"(",
"short",
")",
"itemDamage",
")",
";",
"if",
"(",
"stackTagCompound",
"!=",
"null",
")",
"{",
"par1NBTTagCompound",
".",
"setTag",
"(",
"\"tag\"",
",",
"stackTagCompound",
")",
";",
"}",
"return",
"par1NBTTagCompound",
";",
"}",
"public",
"void",
"readFromNBT",
"(",
"NBTTagCompound",
"par1NBTTagCompound",
")",
"{",
"itemID",
"=",
"par1NBTTagCompound",
".",
"getShort",
"(",
"\"id\"",
")",
";",
"stackSize",
"=",
"par1NBTTagCompound",
".",
"getByte",
"(",
"\"Count\"",
")",
";",
"itemDamage",
"=",
"par1NBTTagCompound",
".",
"getShort",
"(",
"\"Damage\"",
")",
";",
"if",
"(",
"par1NBTTagCompound",
".",
"hasKey",
"(",
"\"tag\"",
")",
")",
"{",
"stackTagCompound",
"=",
"par1NBTTagCompound",
".",
"getCompoundTag",
"(",
"\"tag\"",
")",
";",
"}",
"}",
"public",
"int",
"getMaxStackSize",
"(",
")",
"{",
"return",
"getItem",
"(",
")",
".",
"getItemStackLimit",
"(",
")",
";",
"}",
"public",
"boolean",
"isStackable",
"(",
")",
"{",
"return",
"getMaxStackSize",
"(",
")",
">",
"1",
"&&",
"(",
"!",
"isItemStackDamageable",
"(",
")",
"||",
"!",
"isItemDamaged",
"(",
")",
")",
";",
"}",
"public",
"boolean",
"isItemStackDamageable",
"(",
")",
"{",
"return",
"Item",
".",
"itemsList",
"[",
"itemID",
"]",
".",
"getMaxDamage",
"(",
")",
">",
"0",
";",
"}",
"public",
"boolean",
"getHasSubtypes",
"(",
")",
"{",
"return",
"Item",
".",
"itemsList",
"[",
"itemID",
"]",
".",
"getHasSubtypes",
"(",
")",
";",
"}",
"public",
"boolean",
"isItemDamaged",
"(",
")",
"{",
"return",
"isItemStackDamageable",
"(",
")",
"&&",
"itemDamage",
">",
"0",
";",
"}",
"public",
"int",
"getItemDamageForDisplay",
"(",
")",
"{",
"return",
"itemDamage",
";",
"}",
"public",
"int",
"getItemDamage",
"(",
")",
"{",
"return",
"itemDamage",
";",
"}",
"public",
"void",
"setItemDamage",
"(",
"int",
"par1",
")",
"{",
"itemDamage",
"=",
"par1",
";",
"}",
"public",
"int",
"getMaxDamage",
"(",
")",
"{",
"return",
"Item",
".",
"itemsList",
"[",
"itemID",
"]",
".",
"getMaxDamage",
"(",
")",
";",
"}",
"public",
"void",
"damageItem",
"(",
"int",
"par1",
",",
"EntityLiving",
"par2EntityLiving",
")",
"{",
"if",
"(",
"!",
"isItemStackDamageable",
"(",
")",
")",
"{",
"return",
";",
"}",
"if",
"(",
"par1",
">",
"0",
"&&",
"(",
"par2EntityLiving",
"instanceof",
"EntityPlayer",
")",
")",
"{",
"int",
"i",
"=",
"EnchantmentHelper",
".",
"getUnbreakingModifier",
"(",
"(",
"(",
"EntityPlayer",
")",
"par2EntityLiving",
")",
".",
"inventory",
")",
";",
"if",
"(",
"i",
">",
"0",
"&&",
"par2EntityLiving",
".",
"worldObj",
".",
"rand",
".",
"nextInt",
"(",
"i",
"+",
"1",
")",
">",
"0",
")",
"{",
"return",
";",
"}",
"}",
"itemDamage",
"+=",
"par1",
";",
"if",
"(",
"itemDamage",
">",
"getMaxDamage",
"(",
")",
")",
"{",
"par2EntityLiving",
".",
"renderBrokenItemStack",
"(",
"this",
")",
";",
"if",
"(",
"par2EntityLiving",
"instanceof",
"EntityPlayer",
")",
"{",
"(",
"(",
"EntityPlayer",
")",
"par2EntityLiving",
")",
".",
"addStat",
"(",
"StatList",
".",
"objectBreakStats",
"[",
"itemID",
"]",
",",
"1",
")",
";",
"}",
"stackSize",
"--",
";",
"if",
"(",
"stackSize",
"<",
"0",
")",
"{",
"stackSize",
"=",
"0",
";",
"}",
"itemDamage",
"=",
"0",
";",
"}",
"}",
"public",
"void",
"hitEntity",
"(",
"EntityLiving",
"par1EntityLiving",
",",
"EntityPlayer",
"par2EntityPlayer",
")",
"{",
"boolean",
"flag",
"=",
"Item",
".",
"itemsList",
"[",
"itemID",
"]",
".",
"hitEntity",
"(",
"this",
",",
"par1EntityLiving",
",",
"par2EntityPlayer",
")",
";",
"if",
"(",
"flag",
")",
"{",
"par2EntityPlayer",
".",
"addStat",
"(",
"StatList",
".",
"objectUseStats",
"[",
"itemID",
"]",
",",
"1",
")",
";",
"}",
"}",
"public",
"void",
"onDestroyBlock",
"(",
"int",
"par1",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"EntityPlayer",
"par5EntityPlayer",
")",
"{",
"boolean",
"flag",
"=",
"Item",
".",
"itemsList",
"[",
"itemID",
"]",
".",
"onBlockDestroyed",
"(",
"this",
",",
"par1",
",",
"par2",
",",
"par3",
",",
"par4",
",",
"par5EntityPlayer",
")",
";",
"if",
"(",
"flag",
")",
"{",
"par5EntityPlayer",
".",
"addStat",
"(",
"StatList",
".",
"objectUseStats",
"[",
"itemID",
"]",
",",
"1",
")",
";",
"}",
"}",
"public",
"int",
"getDamageVsEntity",
"(",
"Entity",
"par1Entity",
")",
"{",
"return",
"Item",
".",
"itemsList",
"[",
"itemID",
"]",
".",
"getDamageVsEntity",
"(",
"par1Entity",
")",
";",
"}",
"public",
"boolean",
"canHarvestBlock",
"(",
"Block",
"par1Block",
")",
"{",
"return",
"Item",
".",
"itemsList",
"[",
"itemID",
"]",
".",
"canHarvestBlock",
"(",
"par1Block",
")",
";",
"}",
"public",
"void",
"onItemDestroyedByUse",
"(",
"EntityPlayer",
"entityplayer",
")",
"{",
"}",
"public",
"void",
"useItemOnEntity",
"(",
"EntityLiving",
"par1EntityLiving",
")",
"{",
"Item",
".",
"itemsList",
"[",
"itemID",
"]",
".",
"useItemOnEntity",
"(",
"this",
",",
"par1EntityLiving",
")",
";",
"}",
"public",
"ItemStack",
"copy",
"(",
")",
"{",
"ItemStack",
"itemstack",
"=",
"new",
"ItemStack",
"(",
"itemID",
",",
"stackSize",
",",
"itemDamage",
")",
";",
"if",
"(",
"stackTagCompound",
"!=",
"null",
")",
"{",
"itemstack",
".",
"stackTagCompound",
"=",
"(",
"NBTTagCompound",
")",
"stackTagCompound",
".",
"copy",
"(",
")",
";",
"if",
"(",
"!",
"itemstack",
".",
"stackTagCompound",
".",
"equals",
"(",
"stackTagCompound",
")",
")",
"{",
"return",
"itemstack",
";",
"}",
"}",
"return",
"itemstack",
";",
"}",
"public",
"static",
"boolean",
"func_46124_a",
"(",
"ItemStack",
"par0ItemStack",
",",
"ItemStack",
"par1ItemStack",
")",
"{",
"if",
"(",
"par0ItemStack",
"==",
"null",
"&&",
"par1ItemStack",
"==",
"null",
")",
"{",
"return",
"true",
";",
"}",
"if",
"(",
"par0ItemStack",
"==",
"null",
"||",
"par1ItemStack",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"par0ItemStack",
".",
"stackTagCompound",
"==",
"null",
"&&",
"par1ItemStack",
".",
"stackTagCompound",
"!=",
"null",
")",
"{",
"return",
"false",
";",
"}",
"return",
"par0ItemStack",
".",
"stackTagCompound",
"==",
"null",
"||",
"par0ItemStack",
".",
"stackTagCompound",
".",
"equals",
"(",
"par1ItemStack",
".",
"stackTagCompound",
")",
";",
"}",
"public",
"static",
"boolean",
"areItemStacksEqual",
"(",
"ItemStack",
"par0ItemStack",
",",
"ItemStack",
"par1ItemStack",
")",
"{",
"if",
"(",
"par0ItemStack",
"==",
"null",
"&&",
"par1ItemStack",
"==",
"null",
")",
"{",
"return",
"true",
";",
"}",
"if",
"(",
"par0ItemStack",
"==",
"null",
"||",
"par1ItemStack",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"else",
"{",
"return",
"par0ItemStack",
".",
"isItemStackEqual",
"(",
"par1ItemStack",
")",
";",
"}",
"}",
"private",
"boolean",
"isItemStackEqual",
"(",
"ItemStack",
"par1ItemStack",
")",
"{",
"if",
"(",
"stackSize",
"!=",
"par1ItemStack",
".",
"stackSize",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"itemID",
"!=",
"par1ItemStack",
".",
"itemID",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"itemDamage",
"!=",
"par1ItemStack",
".",
"itemDamage",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"stackTagCompound",
"==",
"null",
"&&",
"par1ItemStack",
".",
"stackTagCompound",
"!=",
"null",
")",
"{",
"return",
"false",
";",
"}",
"return",
"stackTagCompound",
"==",
"null",
"||",
"stackTagCompound",
".",
"equals",
"(",
"par1ItemStack",
".",
"stackTagCompound",
")",
";",
"}",
"public",
"boolean",
"isItemEqual",
"(",
"ItemStack",
"par1ItemStack",
")",
"{",
"return",
"itemID",
"==",
"par1ItemStack",
".",
"itemID",
"&&",
"itemDamage",
"==",
"par1ItemStack",
".",
"itemDamage",
";",
"}",
"public",
"String",
"getItemName",
"(",
")",
"{",
"return",
"Item",
".",
"itemsList",
"[",
"itemID",
"]",
".",
"getItemNameIS",
"(",
"this",
")",
";",
"}",
"public",
"static",
"ItemStack",
"copyItemStack",
"(",
"ItemStack",
"par0ItemStack",
")",
"{",
"return",
"par0ItemStack",
"!=",
"null",
"?",
"par0ItemStack",
".",
"copy",
"(",
")",
":",
"null",
";",
"}",
"public",
"String",
"toString",
"(",
")",
"{",
"return",
"(",
"new",
"StringBuilder",
"(",
")",
")",
".",
"append",
"(",
"stackSize",
")",
".",
"append",
"(",
"\"x\"",
")",
".",
"append",
"(",
"Item",
".",
"itemsList",
"[",
"itemID",
"]",
".",
"getItemName",
"(",
")",
")",
".",
"append",
"(",
"\"@\"",
")",
".",
"append",
"(",
"itemDamage",
")",
".",
"toString",
"(",
")",
";",
"}",
"public",
"void",
"updateAnimation",
"(",
"World",
"par1World",
",",
"Entity",
"par2Entity",
",",
"int",
"par3",
",",
"boolean",
"par4",
")",
"{",
"if",
"(",
"animationsToGo",
">",
"0",
")",
"{",
"animationsToGo",
"--",
";",
"}",
"Item",
".",
"itemsList",
"[",
"itemID",
"]",
".",
"onUpdate",
"(",
"this",
",",
"par1World",
",",
"par2Entity",
",",
"par3",
",",
"par4",
")",
";",
"}",
"public",
"void",
"onCrafting",
"(",
"World",
"par1World",
",",
"EntityPlayer",
"par2EntityPlayer",
",",
"int",
"par3",
")",
"{",
"par2EntityPlayer",
".",
"addStat",
"(",
"StatList",
".",
"objectCraftStats",
"[",
"itemID",
"]",
",",
"par3",
")",
";",
"Item",
".",
"itemsList",
"[",
"itemID",
"]",
".",
"onCreated",
"(",
"this",
",",
"par1World",
",",
"par2EntityPlayer",
")",
";",
"}",
"public",
"boolean",
"isStackEqual",
"(",
"ItemStack",
"par1ItemStack",
")",
"{",
"return",
"itemID",
"==",
"par1ItemStack",
".",
"itemID",
"&&",
"stackSize",
"==",
"par1ItemStack",
".",
"stackSize",
"&&",
"itemDamage",
"==",
"par1ItemStack",
".",
"itemDamage",
";",
"}",
"public",
"int",
"getMaxItemUseDuration",
"(",
")",
"{",
"return",
"getItem",
"(",
")",
".",
"getMaxItemUseDuration",
"(",
"this",
")",
";",
"}",
"public",
"EnumAction",
"getItemUseAction",
"(",
")",
"{",
"return",
"getItem",
"(",
")",
".",
"getItemUseAction",
"(",
"this",
")",
";",
"}",
"public",
"void",
"onPlayerStoppedUsing",
"(",
"World",
"par1World",
",",
"EntityPlayer",
"par2EntityPlayer",
",",
"int",
"par3",
")",
"{",
"getItem",
"(",
")",
".",
"onPlayerStoppedUsing",
"(",
"this",
",",
"par1World",
",",
"par2EntityPlayer",
",",
"par3",
")",
";",
"}",
"public",
"boolean",
"hasTagCompound",
"(",
")",
"{",
"return",
"stackTagCompound",
"!=",
"null",
";",
"}",
"public",
"NBTTagCompound",
"getTagCompound",
"(",
")",
"{",
"return",
"stackTagCompound",
";",
"}",
"public",
"NBTTagList",
"getEnchantmentTagList",
"(",
")",
"{",
"if",
"(",
"stackTagCompound",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"else",
"{",
"return",
"(",
"NBTTagList",
")",
"stackTagCompound",
".",
"getTag",
"(",
"\"ench\"",
")",
";",
"}",
"}",
"public",
"void",
"setTagCompound",
"(",
"NBTTagCompound",
"par1NBTTagCompound",
")",
"{",
"stackTagCompound",
"=",
"par1NBTTagCompound",
";",
"}",
"public",
"boolean",
"isItemEnchantable",
"(",
")",
"{",
"if",
"(",
"!",
"getItem",
"(",
")",
".",
"isItemTool",
"(",
"this",
")",
")",
"{",
"return",
"false",
";",
"}",
"return",
"!",
"isItemEnchanted",
"(",
")",
";",
"}",
"public",
"void",
"addEnchantment",
"(",
"Enchantment",
"par1Enchantment",
",",
"int",
"par2",
")",
"{",
"if",
"(",
"stackTagCompound",
"==",
"null",
")",
"{",
"setTagCompound",
"(",
"new",
"NBTTagCompound",
"(",
")",
")",
";",
"}",
"if",
"(",
"!",
"stackTagCompound",
".",
"hasKey",
"(",
"\"ench\"",
")",
")",
"{",
"stackTagCompound",
".",
"setTag",
"(",
"\"ench\"",
",",
"new",
"NBTTagList",
"(",
"\"ench\"",
")",
")",
";",
"}",
"NBTTagList",
"nbttaglist",
"=",
"(",
"NBTTagList",
")",
"stackTagCompound",
".",
"getTag",
"(",
"\"ench\"",
")",
";",
"NBTTagCompound",
"nbttagcompound",
"=",
"new",
"NBTTagCompound",
"(",
")",
";",
"nbttagcompound",
".",
"setShort",
"(",
"\"id\"",
",",
"(",
"short",
")",
"par1Enchantment",
".",
"effectId",
")",
";",
"nbttagcompound",
".",
"setShort",
"(",
"\"lvl\"",
",",
"(",
"byte",
")",
"par2",
")",
";",
"nbttaglist",
".",
"appendTag",
"(",
"nbttagcompound",
")",
";",
"}",
"public",
"boolean",
"isItemEnchanted",
"(",
")",
"{",
"return",
"stackTagCompound",
"!=",
"null",
"&&",
"stackTagCompound",
".",
"hasKey",
"(",
"\"ench\"",
")",
";",
"}",
"}",
"</s>"
] |
9,592 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"class",
"NetworkMasterThread",
"extends",
"Thread",
"{",
"final",
"NetworkManager",
"netManager",
";",
"NetworkMasterThread",
"(",
"NetworkManager",
"par1NetworkManager",
")",
"{",
"netManager",
"=",
"par1NetworkManager",
";",
"}",
"@",
"SuppressWarnings",
"(",
"\"deprecation\"",
")",
"public",
"void",
"run",
"(",
")",
"{",
"try",
"{",
"Thread",
".",
"sleep",
"(",
"5000L",
")",
";",
"if",
"(",
"NetworkManager",
".",
"getReadThread",
"(",
"netManager",
")",
".",
"isAlive",
"(",
")",
")",
"{",
"try",
"{",
"NetworkManager",
".",
"getReadThread",
"(",
"netManager",
")",
".",
"stop",
"(",
")",
";",
"}",
"catch",
"(",
"Throwable",
"throwable",
")",
"{",
"}",
"}",
"if",
"(",
"NetworkManager",
".",
"getWriteThread",
"(",
"netManager",
")",
".",
"isAlive",
"(",
")",
")",
"{",
"try",
"{",
"NetworkManager",
".",
"getWriteThread",
"(",
"netManager",
")",
".",
"stop",
"(",
")",
";",
"}",
"catch",
"(",
"Throwable",
"throwable1",
")",
"{",
"}",
"}",
"}",
"catch",
"(",
"InterruptedException",
"interruptedexception",
")",
"{",
"interruptedexception",
".",
"printStackTrace",
"(",
")",
";",
"}",
"}",
"}",
"</s>"
] |
9,593 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"ComponentVillageWoodHut",
"extends",
"ComponentVillage",
"{",
"private",
"int",
"averageGroundLevel",
";",
"private",
"final",
"boolean",
"isTallHouse",
";",
"private",
"final",
"int",
"tablePosition",
";",
"public",
"ComponentVillageWoodHut",
"(",
"int",
"par1",
",",
"Random",
"par2Random",
",",
"StructureBoundingBox",
"par3StructureBoundingBox",
",",
"int",
"par4",
")",
"{",
"super",
"(",
"par1",
")",
";",
"averageGroundLevel",
"=",
"-",
"1",
";",
"coordBaseMode",
"=",
"par4",
";",
"boundingBox",
"=",
"par3StructureBoundingBox",
";",
"isTallHouse",
"=",
"par2Random",
".",
"nextBoolean",
"(",
")",
";",
"tablePosition",
"=",
"par2Random",
".",
"nextInt",
"(",
"3",
")",
";",
"}",
"public",
"void",
"buildComponent",
"(",
"StructureComponent",
"structurecomponent",
",",
"List",
"list",
",",
"Random",
"random",
")",
"{",
"}",
"public",
"static",
"ComponentVillageWoodHut",
"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",
",",
"4",
",",
"6",
",",
"5",
",",
"par5",
")",
";",
"if",
"(",
"!",
"canVillageGoDeeper",
"(",
"structureboundingbox",
")",
"||",
"StructureComponent",
".",
"findIntersecting",
"(",
"par0List",
",",
"structureboundingbox",
")",
"!=",
"null",
")",
"{",
"return",
"null",
";",
"}",
"else",
"{",
"return",
"new",
"ComponentVillageWoodHut",
"(",
"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",
",",
"1",
",",
"1",
",",
"1",
",",
"3",
",",
"5",
",",
"4",
",",
"0",
",",
"0",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"0",
",",
"0",
",",
"0",
",",
"3",
",",
"0",
",",
"4",
",",
"Block",
".",
"cobblestone",
".",
"blockID",
",",
"Block",
".",
"cobblestone",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"1",
",",
"0",
",",
"1",
",",
"2",
",",
"0",
",",
"3",
",",
"Block",
".",
"dirt",
".",
"blockID",
",",
"Block",
".",
"dirt",
".",
"blockID",
",",
"false",
")",
";",
"if",
"(",
"isTallHouse",
")",
"{",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"1",
",",
"4",
",",
"1",
",",
"2",
",",
"4",
",",
"3",
",",
"Block",
".",
"wood",
".",
"blockID",
",",
"Block",
".",
"wood",
".",
"blockID",
",",
"false",
")",
";",
"}",
"else",
"{",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"1",
",",
"5",
",",
"1",
",",
"2",
",",
"5",
",",
"3",
",",
"Block",
".",
"wood",
".",
"blockID",
",",
"Block",
".",
"wood",
".",
"blockID",
",",
"false",
")",
";",
"}",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"wood",
".",
"blockID",
",",
"0",
",",
"1",
",",
"4",
",",
"0",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"wood",
".",
"blockID",
",",
"0",
",",
"2",
",",
"4",
",",
"0",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"wood",
".",
"blockID",
",",
"0",
",",
"1",
",",
"4",
",",
"4",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"wood",
".",
"blockID",
",",
"0",
",",
"2",
",",
"4",
",",
"4",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"wood",
".",
"blockID",
",",
"0",
",",
"0",
",",
"4",
",",
"1",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"wood",
".",
"blockID",
",",
"0",
",",
"0",
",",
"4",
",",
"2",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"wood",
".",
"blockID",
",",
"0",
",",
"0",
",",
"4",
",",
"3",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"wood",
".",
"blockID",
",",
"0",
",",
"3",
",",
"4",
",",
"1",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"wood",
".",
"blockID",
",",
"0",
",",
"3",
",",
"4",
",",
"2",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"wood",
".",
"blockID",
",",
"0",
",",
"3",
",",
"4",
",",
"3",
",",
"par3StructureBoundingBox",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"0",
",",
"1",
",",
"0",
",",
"0",
",",
"3",
",",
"0",
",",
"Block",
".",
"wood",
".",
"blockID",
",",
"Block",
".",
"wood",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"3",
",",
"1",
",",
"0",
",",
"3",
",",
"3",
",",
"0",
",",
"Block",
".",
"wood",
".",
"blockID",
",",
"Block",
".",
"wood",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"0",
",",
"1",
",",
"4",
",",
"0",
",",
"3",
",",
"4",
",",
"Block",
".",
"wood",
".",
"blockID",
",",
"Block",
".",
"wood",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"3",
",",
"1",
",",
"4",
",",
"3",
",",
"3",
",",
"4",
",",
"Block",
".",
"wood",
".",
"blockID",
",",
"Block",
".",
"wood",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"0",
",",
"1",
",",
"1",
",",
"0",
",",
"3",
",",
"3",
",",
"Block",
".",
"planks",
".",
"blockID",
",",
"Block",
".",
"planks",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"3",
",",
"1",
",",
"1",
",",
"3",
",",
"3",
",",
"3",
",",
"Block",
".",
"planks",
".",
"blockID",
",",
"Block",
".",
"planks",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"1",
",",
"1",
",",
"0",
",",
"2",
",",
"3",
",",
"0",
",",
"Block",
".",
"planks",
".",
"blockID",
",",
"Block",
".",
"planks",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"1",
",",
"1",
",",
"4",
",",
"2",
",",
"3",
",",
"4",
",",
"Block",
".",
"planks",
".",
"blockID",
",",
"Block",
".",
"planks",
".",
"blockID",
",",
"false",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"thinGlass",
".",
"blockID",
",",
"0",
",",
"0",
",",
"2",
",",
"2",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"thinGlass",
".",
"blockID",
",",
"0",
",",
"3",
",",
"2",
",",
"2",
",",
"par3StructureBoundingBox",
")",
";",
"if",
"(",
"tablePosition",
">",
"0",
")",
"{",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"fence",
".",
"blockID",
",",
"0",
",",
"tablePosition",
",",
"1",
",",
"3",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"pressurePlatePlanks",
".",
"blockID",
",",
"0",
",",
"tablePosition",
",",
"2",
",",
"3",
",",
"par3StructureBoundingBox",
")",
";",
"}",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"0",
",",
"0",
",",
"1",
",",
"1",
",",
"0",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"0",
",",
"0",
",",
"1",
",",
"2",
",",
"0",
",",
"par3StructureBoundingBox",
")",
";",
"placeDoorAtCurrentPosition",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"par2Random",
",",
"1",
",",
"1",
",",
"0",
",",
"getMetadataWithOffset",
"(",
"Block",
".",
"doorWood",
".",
"blockID",
",",
"1",
")",
")",
";",
"if",
"(",
"getBlockIdAtCurrentPosition",
"(",
"par1World",
",",
"1",
",",
"0",
",",
"-",
"1",
",",
"par3StructureBoundingBox",
")",
"==",
"0",
"&&",
"getBlockIdAtCurrentPosition",
"(",
"par1World",
",",
"1",
",",
"-",
"1",
",",
"-",
"1",
",",
"par3StructureBoundingBox",
")",
"!=",
"0",
")",
"{",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"stairCompactCobblestone",
".",
"blockID",
",",
"getMetadataWithOffset",
"(",
"Block",
".",
"stairCompactCobblestone",
".",
"blockID",
",",
"3",
")",
",",
"1",
",",
"0",
",",
"-",
"1",
",",
"par3StructureBoundingBox",
")",
";",
"}",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"5",
";",
"i",
"++",
")",
"{",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
"4",
";",
"j",
"++",
")",
"{",
"clearCurrentPositionBlocksUpwards",
"(",
"par1World",
",",
"j",
",",
"6",
",",
"i",
",",
"par3StructureBoundingBox",
")",
";",
"fillCurrentPositionBlocksDownwards",
"(",
"par1World",
",",
"Block",
".",
"cobblestone",
".",
"blockID",
",",
"0",
",",
"j",
",",
"-",
"1",
",",
"i",
",",
"par3StructureBoundingBox",
")",
";",
"}",
"}",
"spawnVillagers",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"1",
",",
"1",
",",
"2",
",",
"1",
")",
";",
"return",
"true",
";",
"}",
"}",
"</s>"
] |
9,594 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"abstract",
"class",
"NoiseGenerator",
"{",
"public",
"NoiseGenerator",
"(",
")",
"{",
"}",
"}",
"</s>"
] |
9,595 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"ComponentNetherBridgeCorridor",
"extends",
"ComponentNetherBridgePiece",
"{",
"public",
"ComponentNetherBridgeCorridor",
"(",
"int",
"par1",
",",
"Random",
"par2Random",
",",
"StructureBoundingBox",
"par3StructureBoundingBox",
",",
"int",
"par4",
")",
"{",
"super",
"(",
"par1",
")",
";",
"coordBaseMode",
"=",
"par4",
";",
"boundingBox",
"=",
"par3StructureBoundingBox",
";",
"}",
"public",
"void",
"buildComponent",
"(",
"StructureComponent",
"par1StructureComponent",
",",
"List",
"par2List",
",",
"Random",
"par3Random",
")",
"{",
"getNextComponentX",
"(",
"(",
"ComponentNetherBridgeStartPiece",
")",
"par1StructureComponent",
",",
"par2List",
",",
"par3Random",
",",
"0",
",",
"1",
",",
"true",
")",
";",
"}",
"public",
"static",
"ComponentNetherBridgeCorridor",
"createValidComponent",
"(",
"List",
"par0List",
",",
"Random",
"par1Random",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
",",
"int",
"par6",
")",
"{",
"StructureBoundingBox",
"structureboundingbox",
"=",
"StructureBoundingBox",
".",
"getComponentToAddBoundingBox",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"-",
"1",
",",
"0",
",",
"0",
",",
"5",
",",
"7",
",",
"5",
",",
"par5",
")",
";",
"if",
"(",
"!",
"isAboveGround",
"(",
"structureboundingbox",
")",
"||",
"StructureComponent",
".",
"findIntersecting",
"(",
"par0List",
",",
"structureboundingbox",
")",
"!=",
"null",
")",
"{",
"return",
"null",
";",
"}",
"else",
"{",
"return",
"new",
"ComponentNetherBridgeCorridor",
"(",
"par6",
",",
"par1Random",
",",
"structureboundingbox",
",",
"par5",
")",
";",
"}",
"}",
"public",
"boolean",
"addComponentParts",
"(",
"World",
"par1World",
",",
"Random",
"par2Random",
",",
"StructureBoundingBox",
"par3StructureBoundingBox",
")",
"{",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"0",
",",
"0",
",",
"0",
",",
"4",
",",
"1",
",",
"4",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"0",
",",
"2",
",",
"0",
",",
"4",
",",
"5",
",",
"4",
",",
"0",
",",
"0",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"4",
",",
"2",
",",
"0",
",",
"4",
",",
"5",
",",
"4",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"4",
",",
"3",
",",
"1",
",",
"4",
",",
"4",
",",
"1",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"4",
",",
"3",
",",
"3",
",",
"4",
",",
"4",
",",
"3",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"0",
",",
"2",
",",
"0",
",",
"0",
",",
"5",
",",
"0",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"0",
",",
"2",
",",
"4",
",",
"3",
",",
"5",
",",
"4",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"1",
",",
"3",
",",
"4",
",",
"1",
",",
"4",
",",
"4",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"3",
",",
"3",
",",
"4",
",",
"3",
",",
"4",
",",
"4",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"0",
",",
"6",
",",
"0",
",",
"4",
",",
"6",
",",
"4",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<=",
"4",
";",
"i",
"++",
")",
"{",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<=",
"4",
";",
"j",
"++",
")",
"{",
"fillCurrentPositionBlocksDownwards",
"(",
"par1World",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"0",
",",
"i",
",",
"-",
"1",
",",
"j",
",",
"par3StructureBoundingBox",
")",
";",
"}",
"}",
"return",
"true",
";",
"}",
"}",
"</s>"
] |
9,596 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"ArrayList",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"BlockPistonBase",
"extends",
"Block",
"{",
"private",
"boolean",
"isSticky",
";",
"private",
"static",
"boolean",
"ignoreUpdates",
";",
"public",
"BlockPistonBase",
"(",
"int",
"par1",
",",
"int",
"par2",
",",
"boolean",
"par3",
")",
"{",
"super",
"(",
"par1",
",",
"par2",
",",
"Material",
".",
"piston",
")",
";",
"isSticky",
"=",
"par3",
";",
"setStepSound",
"(",
"soundStoneFootstep",
")",
";",
"setHardness",
"(",
"0.5F",
")",
";",
"}",
"public",
"int",
"getBlockTextureFromSideAndMetadata",
"(",
"int",
"par1",
",",
"int",
"par2",
")",
"{",
"int",
"i",
"=",
"getOrientation",
"(",
"par2",
")",
";",
"if",
"(",
"i",
">",
"5",
")",
"{",
"return",
"blockIndexInTexture",
";",
"}",
"if",
"(",
"par1",
"==",
"i",
")",
"{",
"if",
"(",
"isExtended",
"(",
"par2",
")",
"||",
"minX",
">",
"0.0D",
"||",
"minY",
">",
"0.0D",
"||",
"minZ",
">",
"0.0D",
"||",
"maxX",
"<",
"1.0D",
"||",
"maxY",
"<",
"1.0D",
"||",
"maxZ",
"<",
"1.0D",
")",
"{",
"return",
"110",
";",
"}",
"else",
"{",
"return",
"blockIndexInTexture",
";",
"}",
"}",
"return",
"par1",
"!=",
"Facing",
".",
"faceToSide",
"[",
"i",
"]",
"?",
"108",
":",
"109",
";",
"}",
"public",
"int",
"getRenderType",
"(",
")",
"{",
"return",
"16",
";",
"}",
"public",
"boolean",
"isOpaqueCube",
"(",
")",
"{",
"return",
"false",
";",
"}",
"public",
"boolean",
"blockActivated",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"i",
",",
"EntityPlayer",
"entityplayer",
")",
"{",
"return",
"false",
";",
"}",
"public",
"void",
"onBlockPlacedBy",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"EntityLiving",
"par5EntityLiving",
")",
"{",
"int",
"i",
"=",
"determineOrientation",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
",",
"(",
"EntityPlayer",
")",
"par5EntityLiving",
")",
";",
"par1World",
".",
"setBlockMetadataWithNotify",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"i",
")",
";",
"if",
"(",
"!",
"par1World",
".",
"isRemote",
"&&",
"!",
"ignoreUpdates",
")",
"{",
"updatePistonState",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"}",
"}",
"public",
"void",
"onNeighborBlockChange",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
")",
"{",
"if",
"(",
"!",
"par1World",
".",
"isRemote",
"&&",
"!",
"ignoreUpdates",
")",
"{",
"updatePistonState",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"}",
"}",
"public",
"void",
"onBlockAdded",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"if",
"(",
"!",
"par1World",
".",
"isRemote",
"&&",
"par1World",
".",
"getBlockTileEntity",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
"==",
"null",
"&&",
"!",
"ignoreUpdates",
")",
"{",
"updatePistonState",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"}",
"}",
"private",
"void",
"updatePistonState",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"int",
"i",
"=",
"par1World",
".",
"getBlockMetadata",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"int",
"j",
"=",
"getOrientation",
"(",
"i",
")",
";",
"boolean",
"flag",
"=",
"isIndirectlyPowered",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
",",
"j",
")",
";",
"if",
"(",
"i",
"==",
"7",
")",
"{",
"return",
";",
"}",
"if",
"(",
"flag",
"&&",
"!",
"isExtended",
"(",
"i",
")",
")",
"{",
"if",
"(",
"canExtend",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
",",
"j",
")",
")",
"{",
"par1World",
".",
"setBlockMetadata",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"j",
"|",
"8",
")",
";",
"par1World",
".",
"playNoteAt",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"0",
",",
"j",
")",
";",
"}",
"}",
"else",
"if",
"(",
"!",
"flag",
"&&",
"isExtended",
"(",
"i",
")",
")",
"{",
"par1World",
".",
"setBlockMetadata",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"j",
")",
";",
"par1World",
".",
"playNoteAt",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"1",
",",
"j",
")",
";",
"}",
"}",
"private",
"boolean",
"isIndirectlyPowered",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
")",
"{",
"if",
"(",
"par5",
"!=",
"0",
"&&",
"par1World",
".",
"isBlockIndirectlyProvidingPowerTo",
"(",
"par2",
",",
"par3",
"-",
"1",
",",
"par4",
",",
"0",
")",
")",
"{",
"return",
"true",
";",
"}",
"if",
"(",
"par5",
"!=",
"1",
"&&",
"par1World",
".",
"isBlockIndirectlyProvidingPowerTo",
"(",
"par2",
",",
"par3",
"+",
"1",
",",
"par4",
",",
"1",
")",
")",
"{",
"return",
"true",
";",
"}",
"if",
"(",
"par5",
"!=",
"2",
"&&",
"par1World",
".",
"isBlockIndirectlyProvidingPowerTo",
"(",
"par2",
",",
"par3",
",",
"par4",
"-",
"1",
",",
"2",
")",
")",
"{",
"return",
"true",
";",
"}",
"if",
"(",
"par5",
"!=",
"3",
"&&",
"par1World",
".",
"isBlockIndirectlyProvidingPowerTo",
"(",
"par2",
",",
"par3",
",",
"par4",
"+",
"1",
",",
"3",
")",
")",
"{",
"return",
"true",
";",
"}",
"if",
"(",
"par5",
"!=",
"5",
"&&",
"par1World",
".",
"isBlockIndirectlyProvidingPowerTo",
"(",
"par2",
"+",
"1",
",",
"par3",
",",
"par4",
",",
"5",
")",
")",
"{",
"return",
"true",
";",
"}",
"if",
"(",
"par5",
"!=",
"4",
"&&",
"par1World",
".",
"isBlockIndirectlyProvidingPowerTo",
"(",
"par2",
"-",
"1",
",",
"par3",
",",
"par4",
",",
"4",
")",
")",
"{",
"return",
"true",
";",
"}",
"if",
"(",
"par1World",
".",
"isBlockIndirectlyProvidingPowerTo",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"0",
")",
")",
"{",
"return",
"true",
";",
"}",
"if",
"(",
"par1World",
".",
"isBlockIndirectlyProvidingPowerTo",
"(",
"par2",
",",
"par3",
"+",
"2",
",",
"par4",
",",
"1",
")",
")",
"{",
"return",
"true",
";",
"}",
"if",
"(",
"par1World",
".",
"isBlockIndirectlyProvidingPowerTo",
"(",
"par2",
",",
"par3",
"+",
"1",
",",
"par4",
"-",
"1",
",",
"2",
")",
")",
"{",
"return",
"true",
";",
"}",
"if",
"(",
"par1World",
".",
"isBlockIndirectlyProvidingPowerTo",
"(",
"par2",
",",
"par3",
"+",
"1",
",",
"par4",
"+",
"1",
",",
"3",
")",
")",
"{",
"return",
"true",
";",
"}",
"if",
"(",
"par1World",
".",
"isBlockIndirectlyProvidingPowerTo",
"(",
"par2",
"-",
"1",
",",
"par3",
"+",
"1",
",",
"par4",
",",
"4",
")",
")",
"{",
"return",
"true",
";",
"}",
"return",
"par1World",
".",
"isBlockIndirectlyProvidingPowerTo",
"(",
"par2",
"+",
"1",
",",
"par3",
"+",
"1",
",",
"par4",
",",
"5",
")",
";",
"}",
"public",
"void",
"powerBlock",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
",",
"int",
"par6",
")",
"{",
"ignoreUpdates",
"=",
"true",
";",
"int",
"i",
"=",
"par6",
";",
"if",
"(",
"par5",
"==",
"0",
")",
"{",
"if",
"(",
"tryExtend",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
",",
"i",
")",
")",
"{",
"par1World",
".",
"setBlockMetadataWithNotify",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"i",
"|",
"8",
")",
";",
"par1World",
".",
"playSoundEffect",
"(",
"(",
"double",
")",
"par2",
"+",
"0.5D",
",",
"(",
"double",
")",
"par3",
"+",
"0.5D",
",",
"(",
"double",
")",
"par4",
"+",
"0.5D",
",",
"\"\"",
",",
"0.5F",
",",
"par1World",
".",
"rand",
".",
"nextFloat",
"(",
")",
"*",
"0.25F",
"+",
"0.6F",
")",
";",
"}",
"else",
"{",
"par1World",
".",
"setBlockMetadata",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"i",
")",
";",
"}",
"}",
"else",
"if",
"(",
"par5",
"==",
"1",
")",
"{",
"TileEntity",
"tileentity",
"=",
"par1World",
".",
"getBlockTileEntity",
"(",
"par2",
"+",
"Facing",
".",
"offsetsXForSide",
"[",
"i",
"]",
",",
"par3",
"+",
"Facing",
".",
"offsetsYForSide",
"[",
"i",
"]",
",",
"par4",
"+",
"Facing",
".",
"offsetsZForSide",
"[",
"i",
"]",
")",
";",
"if",
"(",
"tileentity",
"!=",
"null",
"&&",
"(",
"tileentity",
"instanceof",
"TileEntityPiston",
")",
")",
"{",
"(",
"(",
"TileEntityPiston",
")",
"tileentity",
")",
".",
"clearPistonTileEntity",
"(",
")",
";",
"}",
"par1World",
".",
"setBlockAndMetadata",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"Block",
".",
"pistonMoving",
".",
"blockID",
",",
"i",
")",
";",
"par1World",
".",
"setBlockTileEntity",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"BlockPistonMoving",
".",
"getTileEntity",
"(",
"blockID",
",",
"i",
",",
"i",
",",
"false",
",",
"true",
")",
")",
";",
"if",
"(",
"isSticky",
")",
"{",
"int",
"j",
"=",
"par2",
"+",
"Facing",
".",
"offsetsXForSide",
"[",
"i",
"]",
"*",
"2",
";",
"int",
"k",
"=",
"par3",
"+",
"Facing",
".",
"offsetsYForSide",
"[",
"i",
"]",
"*",
"2",
";",
"int",
"l",
"=",
"par4",
"+",
"Facing",
".",
"offsetsZForSide",
"[",
"i",
"]",
"*",
"2",
";",
"int",
"i1",
"=",
"par1World",
".",
"getBlockId",
"(",
"j",
",",
"k",
",",
"l",
")",
";",
"int",
"j1",
"=",
"par1World",
".",
"getBlockMetadata",
"(",
"j",
",",
"k",
",",
"l",
")",
";",
"boolean",
"flag",
"=",
"false",
";",
"if",
"(",
"i1",
"==",
"Block",
".",
"pistonMoving",
".",
"blockID",
")",
"{",
"TileEntity",
"tileentity1",
"=",
"par1World",
".",
"getBlockTileEntity",
"(",
"j",
",",
"k",
",",
"l",
")",
";",
"if",
"(",
"tileentity1",
"!=",
"null",
"&&",
"(",
"tileentity1",
"instanceof",
"TileEntityPiston",
")",
")",
"{",
"TileEntityPiston",
"tileentitypiston",
"=",
"(",
"TileEntityPiston",
")",
"tileentity1",
";",
"if",
"(",
"tileentitypiston",
".",
"getPistonOrientation",
"(",
")",
"==",
"i",
"&&",
"tileentitypiston",
".",
"isExtending",
"(",
")",
")",
"{",
"tileentitypiston",
".",
"clearPistonTileEntity",
"(",
")",
";",
"i1",
"=",
"tileentitypiston",
".",
"getStoredBlockID",
"(",
")",
";",
"j1",
"=",
"tileentitypiston",
".",
"getBlockMetadata",
"(",
")",
";",
"flag",
"=",
"true",
";",
"}",
"}",
"}",
"if",
"(",
"!",
"flag",
"&&",
"i1",
">",
"0",
"&&",
"canPushBlock",
"(",
"i1",
",",
"par1World",
",",
"j",
",",
"k",
",",
"l",
",",
"false",
")",
"&&",
"(",
"Block",
".",
"blocksList",
"[",
"i1",
"]",
".",
"getMobilityFlag",
"(",
")",
"==",
"0",
"||",
"i1",
"==",
"Block",
".",
"pistonBase",
".",
"blockID",
"||",
"i1",
"==",
"Block",
".",
"pistonStickyBase",
".",
"blockID",
")",
")",
"{",
"par2",
"+=",
"Facing",
".",
"offsetsXForSide",
"[",
"i",
"]",
";",
"par3",
"+=",
"Facing",
".",
"offsetsYForSide",
"[",
"i",
"]",
";",
"par4",
"+=",
"Facing",
".",
"offsetsZForSide",
"[",
"i",
"]",
";",
"par1World",
".",
"setBlockAndMetadata",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"Block",
".",
"pistonMoving",
".",
"blockID",
",",
"j1",
")",
";",
"par1World",
".",
"setBlockTileEntity",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"BlockPistonMoving",
".",
"getTileEntity",
"(",
"i1",
",",
"j1",
",",
"i",
",",
"false",
",",
"false",
")",
")",
";",
"ignoreUpdates",
"=",
"false",
";",
"par1World",
".",
"setBlockWithNotify",
"(",
"j",
",",
"k",
",",
"l",
",",
"0",
")",
";",
"ignoreUpdates",
"=",
"true",
";",
"}",
"else",
"if",
"(",
"!",
"flag",
")",
"{",
"ignoreUpdates",
"=",
"false",
";",
"par1World",
".",
"setBlockWithNotify",
"(",
"par2",
"+",
"Facing",
".",
"offsetsXForSide",
"[",
"i",
"]",
",",
"par3",
"+",
"Facing",
".",
"offsetsYForSide",
"[",
"i",
"]",
",",
"par4",
"+",
"Facing",
".",
"offsetsZForSide",
"[",
"i",
"]",
",",
"0",
")",
";",
"ignoreUpdates",
"=",
"true",
";",
"}",
"}",
"else",
"{",
"ignoreUpdates",
"=",
"false",
";",
"par1World",
".",
"setBlockWithNotify",
"(",
"par2",
"+",
"Facing",
".",
"offsetsXForSide",
"[",
"i",
"]",
",",
"par3",
"+",
"Facing",
".",
"offsetsYForSide",
"[",
"i",
"]",
",",
"par4",
"+",
"Facing",
".",
"offsetsZForSide",
"[",
"i",
"]",
",",
"0",
")",
";",
"ignoreUpdates",
"=",
"true",
";",
"}",
"par1World",
".",
"playSoundEffect",
"(",
"(",
"double",
")",
"par2",
"+",
"0.5D",
",",
"(",
"double",
")",
"par3",
"+",
"0.5D",
",",
"(",
"double",
")",
"par4",
"+",
"0.5D",
",",
"\"\"",
",",
"0.5F",
",",
"par1World",
".",
"rand",
".",
"nextFloat",
"(",
")",
"*",
"0.15F",
"+",
"0.6F",
")",
";",
"}",
"ignoreUpdates",
"=",
"false",
";",
"}",
"public",
"void",
"setBlockBoundsBasedOnState",
"(",
"IBlockAccess",
"par1IBlockAccess",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"int",
"i",
"=",
"par1IBlockAccess",
".",
"getBlockMetadata",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"if",
"(",
"isExtended",
"(",
"i",
")",
")",
"{",
"switch",
"(",
"getOrientation",
"(",
"i",
")",
")",
"{",
"case",
"0",
":",
"setBlockBounds",
"(",
"0.0F",
",",
"0.25F",
",",
"0.0F",
",",
"1.0F",
",",
"1.0F",
",",
"1.0F",
")",
";",
"break",
";",
"case",
"1",
":",
"setBlockBounds",
"(",
"0.0F",
",",
"0.0F",
",",
"0.0F",
",",
"1.0F",
",",
"0.75F",
",",
"1.0F",
")",
";",
"break",
";",
"case",
"2",
":",
"setBlockBounds",
"(",
"0.0F",
",",
"0.0F",
",",
"0.25F",
",",
"1.0F",
",",
"1.0F",
",",
"1.0F",
")",
";",
"break",
";",
"case",
"3",
":",
"setBlockBounds",
"(",
"0.0F",
",",
"0.0F",
",",
"0.0F",
",",
"1.0F",
",",
"1.0F",
",",
"0.75F",
")",
";",
"break",
";",
"case",
"4",
":",
"setBlockBounds",
"(",
"0.25F",
",",
"0.0F",
",",
"0.0F",
",",
"1.0F",
",",
"1.0F",
",",
"1.0F",
")",
";",
"break",
";",
"case",
"5",
":",
"setBlockBounds",
"(",
"0.0F",
",",
"0.0F",
",",
"0.0F",
",",
"0.75F",
",",
"1.0F",
",",
"1.0F",
")",
";",
"break",
";",
"}",
"}",
"else",
"{",
"setBlockBounds",
"(",
"0.0F",
",",
"0.0F",
",",
"0.0F",
",",
"1.0F",
",",
"1.0F",
",",
"1.0F",
")",
";",
"}",
"}",
"public",
"void",
"setBlockBoundsForItemRender",
"(",
")",
"{",
"setBlockBounds",
"(",
"0.0F",
",",
"0.0F",
",",
"0.0F",
",",
"1.0F",
",",
"1.0F",
",",
"1.0F",
")",
";",
"}",
"public",
"void",
"getCollidingBoundingBoxes",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"AxisAlignedBB",
"par5AxisAlignedBB",
",",
"ArrayList",
"par6ArrayList",
")",
"{",
"setBlockBounds",
"(",
"0.0F",
",",
"0.0F",
",",
"0.0F",
",",
"1.0F",
",",
"1.0F",
",",
"1.0F",
")",
";",
"super",
".",
"getCollidingBoundingBoxes",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
",",
"par5AxisAlignedBB",
",",
"par6ArrayList",
")",
";",
"}",
"public",
"AxisAlignedBB",
"getCollisionBoundingBoxFromPool",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"setBlockBoundsBasedOnState",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"return",
"super",
".",
"getCollisionBoundingBoxFromPool",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"}",
"public",
"boolean",
"renderAsNormalBlock",
"(",
")",
"{",
"return",
"false",
";",
"}",
"public",
"static",
"int",
"getOrientation",
"(",
"int",
"par0",
")",
"{",
"return",
"par0",
"&",
"7",
";",
"}",
"public",
"static",
"boolean",
"isExtended",
"(",
"int",
"par0",
")",
"{",
"return",
"(",
"par0",
"&",
"8",
")",
"!=",
"0",
";",
"}",
"private",
"static",
"int",
"determineOrientation",
"(",
"World",
"par0World",
",",
"int",
"par1",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"EntityPlayer",
"par4EntityPlayer",
")",
"{",
"if",
"(",
"MathHelper",
".",
"abs",
"(",
"(",
"float",
")",
"par4EntityPlayer",
".",
"posX",
"-",
"(",
"float",
")",
"par1",
")",
"<",
"2.0F",
"&&",
"MathHelper",
".",
"abs",
"(",
"(",
"float",
")",
"par4EntityPlayer",
".",
"posZ",
"-",
"(",
"float",
")",
"par3",
")",
"<",
"2.0F",
")",
"{",
"double",
"d",
"=",
"(",
"par4EntityPlayer",
".",
"posY",
"+",
"1.8200000000000001D",
")",
"-",
"(",
"double",
")",
"par4EntityPlayer",
".",
"yOffset",
";",
"if",
"(",
"d",
"-",
"(",
"double",
")",
"par2",
">",
"2D",
")",
"{",
"return",
"1",
";",
"}",
"if",
"(",
"(",
"double",
")",
"par2",
"-",
"d",
">",
"0.0D",
")",
"{",
"return",
"0",
";",
"}",
"}",
"int",
"i",
"=",
"MathHelper",
".",
"floor_double",
"(",
"(",
"double",
")",
"(",
"(",
"par4EntityPlayer",
".",
"rotationYaw",
"*",
"4F",
")",
"/",
"360F",
")",
"+",
"0.5D",
")",
"&",
"3",
";",
"if",
"(",
"i",
"==",
"0",
")",
"{",
"return",
"2",
";",
"}",
"if",
"(",
"i",
"==",
"1",
")",
"{",
"return",
"5",
";",
"}",
"if",
"(",
"i",
"==",
"2",
")",
"{",
"return",
"3",
";",
"}",
"return",
"i",
"!=",
"3",
"?",
"0",
":",
"4",
";",
"}",
"private",
"static",
"boolean",
"canPushBlock",
"(",
"int",
"par0",
",",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"boolean",
"par5",
")",
"{",
"if",
"(",
"par0",
"==",
"Block",
".",
"obsidian",
".",
"blockID",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"par0",
"==",
"Block",
".",
"pistonBase",
".",
"blockID",
"||",
"par0",
"==",
"Block",
".",
"pistonStickyBase",
".",
"blockID",
")",
"{",
"if",
"(",
"isExtended",
"(",
"par1World",
".",
"getBlockMetadata",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
")",
")",
"{",
"return",
"false",
";",
"}",
"}",
"else",
"{",
"if",
"(",
"Block",
".",
"blocksList",
"[",
"par0",
"]",
".",
"getHardness",
"(",
")",
"==",
"-",
"1F",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"Block",
".",
"blocksList",
"[",
"par0",
"]",
".",
"getMobilityFlag",
"(",
")",
"==",
"2",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"!",
"par5",
"&&",
"Block",
".",
"blocksList",
"[",
"par0",
"]",
".",
"getMobilityFlag",
"(",
")",
"==",
"1",
")",
"{",
"return",
"false",
";",
"}",
"}",
"return",
"!",
"(",
"Block",
".",
"blocksList",
"[",
"par0",
"]",
"instanceof",
"BlockContainer",
")",
";",
"}",
"private",
"static",
"boolean",
"canExtend",
"(",
"World",
"par0World",
",",
"int",
"par1",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"int",
"i",
"=",
"par1",
"+",
"Facing",
".",
"offsetsXForSide",
"[",
"par4",
"]",
";",
"int",
"j",
"=",
"par2",
"+",
"Facing",
".",
"offsetsYForSide",
"[",
"par4",
"]",
";",
"int",
"k",
"=",
"par3",
"+",
"Facing",
".",
"offsetsZForSide",
"[",
"par4",
"]",
";",
"int",
"l",
"=",
"0",
";",
"do",
"{",
"if",
"(",
"l",
">=",
"13",
")",
"{",
"break",
";",
"}",
"if",
"(",
"j",
"<=",
"0",
"||",
"j",
">=",
"255",
")",
"{",
"return",
"false",
";",
"}",
"int",
"i1",
"=",
"par0World",
".",
"getBlockId",
"(",
"i",
",",
"j",
",",
"k",
")",
";",
"if",
"(",
"i1",
"==",
"0",
")",
"{",
"break",
";",
"}",
"if",
"(",
"!",
"canPushBlock",
"(",
"i1",
",",
"par0World",
",",
"i",
",",
"j",
",",
"k",
",",
"true",
")",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"Block",
".",
"blocksList",
"[",
"i1",
"]",
".",
"getMobilityFlag",
"(",
")",
"==",
"1",
")",
"{",
"break",
";",
"}",
"if",
"(",
"l",
"==",
"12",
")",
"{",
"return",
"false",
";",
"}",
"i",
"+=",
"Facing",
".",
"offsetsXForSide",
"[",
"par4",
"]",
";",
"j",
"+=",
"Facing",
".",
"offsetsYForSide",
"[",
"par4",
"]",
";",
"k",
"+=",
"Facing",
".",
"offsetsZForSide",
"[",
"par4",
"]",
";",
"l",
"++",
";",
"}",
"while",
"(",
"true",
")",
";",
"return",
"true",
";",
"}",
"private",
"boolean",
"tryExtend",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
")",
"{",
"int",
"i",
"=",
"par2",
"+",
"Facing",
".",
"offsetsXForSide",
"[",
"par5",
"]",
";",
"int",
"j",
"=",
"par3",
"+",
"Facing",
".",
"offsetsYForSide",
"[",
"par5",
"]",
";",
"int",
"k",
"=",
"par4",
"+",
"Facing",
".",
"offsetsZForSide",
"[",
"par5",
"]",
";",
"int",
"l",
"=",
"0",
";",
"do",
"{",
"if",
"(",
"l",
">=",
"13",
")",
"{",
"break",
";",
"}",
"if",
"(",
"j",
"<=",
"0",
"||",
"j",
">=",
"255",
")",
"{",
"return",
"false",
";",
"}",
"int",
"j1",
"=",
"par1World",
".",
"getBlockId",
"(",
"i",
",",
"j",
",",
"k",
")",
";",
"if",
"(",
"j1",
"==",
"0",
")",
"{",
"break",
";",
"}",
"if",
"(",
"!",
"canPushBlock",
"(",
"j1",
",",
"par1World",
",",
"i",
",",
"j",
",",
"k",
",",
"true",
")",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"Block",
".",
"blocksList",
"[",
"j1",
"]",
".",
"getMobilityFlag",
"(",
")",
"==",
"1",
")",
"{",
"Block",
".",
"blocksList",
"[",
"j1",
"]",
".",
"dropBlockAsItem",
"(",
"par1World",
",",
"i",
",",
"j",
",",
"k",
",",
"par1World",
".",
"getBlockMetadata",
"(",
"i",
",",
"j",
",",
"k",
")",
",",
"0",
")",
";",
"par1World",
".",
"setBlockWithNotify",
"(",
"i",
",",
"j",
",",
"k",
",",
"0",
")",
";",
"break",
";",
"}",
"if",
"(",
"l",
"==",
"12",
")",
"{",
"return",
"false",
";",
"}",
"i",
"+=",
"Facing",
".",
"offsetsXForSide",
"[",
"par5",
"]",
";",
"j",
"+=",
"Facing",
".",
"offsetsYForSide",
"[",
"par5",
"]",
";",
"k",
"+=",
"Facing",
".",
"offsetsZForSide",
"[",
"par5",
"]",
";",
"l",
"++",
";",
"}",
"while",
"(",
"true",
")",
";",
"int",
"l1",
";",
"for",
"(",
";",
"i",
"!=",
"par2",
"||",
"j",
"!=",
"par3",
"||",
"k",
"!=",
"par4",
";",
"k",
"=",
"l1",
")",
"{",
"int",
"i1",
"=",
"i",
"-",
"Facing",
".",
"offsetsXForSide",
"[",
"par5",
"]",
";",
"int",
"k1",
"=",
"j",
"-",
"Facing",
".",
"offsetsYForSide",
"[",
"par5",
"]",
";",
"l1",
"=",
"k",
"-",
"Facing",
".",
"offsetsZForSide",
"[",
"par5",
"]",
";",
"int",
"i2",
"=",
"par1World",
".",
"getBlockId",
"(",
"i1",
",",
"k1",
",",
"l1",
")",
";",
"int",
"j2",
"=",
"par1World",
".",
"getBlockMetadata",
"(",
"i1",
",",
"k1",
",",
"l1",
")",
";",
"if",
"(",
"i2",
"==",
"blockID",
"&&",
"i1",
"==",
"par2",
"&&",
"k1",
"==",
"par3",
"&&",
"l1",
"==",
"par4",
")",
"{",
"par1World",
".",
"setBlockAndMetadata",
"(",
"i",
",",
"j",
",",
"k",
",",
"Block",
".",
"pistonMoving",
".",
"blockID",
",",
"par5",
"|",
"(",
"isSticky",
"?",
"8",
":",
"0",
")",
")",
";",
"par1World",
".",
"setBlockTileEntity",
"(",
"i",
",",
"j",
",",
"k",
",",
"BlockPistonMoving",
".",
"getTileEntity",
"(",
"Block",
".",
"pistonExtension",
".",
"blockID",
",",
"par5",
"|",
"(",
"isSticky",
"?",
"8",
":",
"0",
")",
",",
"par5",
",",
"true",
",",
"false",
")",
")",
";",
"}",
"else",
"{",
"par1World",
".",
"setBlockAndMetadata",
"(",
"i",
",",
"j",
",",
"k",
",",
"Block",
".",
"pistonMoving",
".",
"blockID",
",",
"j2",
")",
";",
"par1World",
".",
"setBlockTileEntity",
"(",
"i",
",",
"j",
",",
"k",
",",
"BlockPistonMoving",
".",
"getTileEntity",
"(",
"i2",
",",
"j2",
",",
"par5",
",",
"true",
",",
"false",
")",
")",
";",
"}",
"i",
"=",
"i1",
";",
"j",
"=",
"k1",
";",
"}",
"return",
"true",
";",
"}",
"}",
"</s>"
] |
9,597 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"class",
"RecipesDyes",
"{",
"public",
"RecipesDyes",
"(",
")",
"{",
"}",
"public",
"void",
"addRecipes",
"(",
"CraftingManager",
"par1CraftingManager",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"16",
";",
"i",
"++",
")",
"{",
"par1CraftingManager",
".",
"addShapelessRecipe",
"(",
"new",
"ItemStack",
"(",
"Block",
".",
"cloth",
",",
"1",
",",
"BlockCloth",
".",
"getDyeFromBlock",
"(",
"i",
")",
")",
",",
"new",
"Object",
"[",
"]",
"{",
"new",
"ItemStack",
"(",
"Item",
".",
"dyePowder",
",",
"1",
",",
"i",
")",
",",
"new",
"ItemStack",
"(",
"Item",
".",
"itemsList",
"[",
"Block",
".",
"cloth",
".",
"blockID",
"]",
",",
"1",
",",
"0",
")",
"}",
")",
";",
"}",
"par1CraftingManager",
".",
"addShapelessRecipe",
"(",
"new",
"ItemStack",
"(",
"Item",
".",
"dyePowder",
",",
"2",
",",
"11",
")",
",",
"new",
"Object",
"[",
"]",
"{",
"Block",
".",
"plantYellow",
"}",
")",
";",
"par1CraftingManager",
".",
"addShapelessRecipe",
"(",
"new",
"ItemStack",
"(",
"Item",
".",
"dyePowder",
",",
"2",
",",
"1",
")",
",",
"new",
"Object",
"[",
"]",
"{",
"Block",
".",
"plantRed",
"}",
")",
";",
"par1CraftingManager",
".",
"addShapelessRecipe",
"(",
"new",
"ItemStack",
"(",
"Item",
".",
"dyePowder",
",",
"3",
",",
"15",
")",
",",
"new",
"Object",
"[",
"]",
"{",
"Item",
".",
"bone",
"}",
")",
";",
"par1CraftingManager",
".",
"addShapelessRecipe",
"(",
"new",
"ItemStack",
"(",
"Item",
".",
"dyePowder",
",",
"2",
",",
"9",
")",
",",
"new",
"Object",
"[",
"]",
"{",
"new",
"ItemStack",
"(",
"Item",
".",
"dyePowder",
",",
"1",
",",
"1",
")",
",",
"new",
"ItemStack",
"(",
"Item",
".",
"dyePowder",
",",
"1",
",",
"15",
")",
"}",
")",
";",
"par1CraftingManager",
".",
"addShapelessRecipe",
"(",
"new",
"ItemStack",
"(",
"Item",
".",
"dyePowder",
",",
"2",
",",
"14",
")",
",",
"new",
"Object",
"[",
"]",
"{",
"new",
"ItemStack",
"(",
"Item",
".",
"dyePowder",
",",
"1",
",",
"1",
")",
",",
"new",
"ItemStack",
"(",
"Item",
".",
"dyePowder",
",",
"1",
",",
"11",
")",
"}",
")",
";",
"par1CraftingManager",
".",
"addShapelessRecipe",
"(",
"new",
"ItemStack",
"(",
"Item",
".",
"dyePowder",
",",
"2",
",",
"10",
")",
",",
"new",
"Object",
"[",
"]",
"{",
"new",
"ItemStack",
"(",
"Item",
".",
"dyePowder",
",",
"1",
",",
"2",
")",
",",
"new",
"ItemStack",
"(",
"Item",
".",
"dyePowder",
",",
"1",
",",
"15",
")",
"}",
")",
";",
"par1CraftingManager",
".",
"addShapelessRecipe",
"(",
"new",
"ItemStack",
"(",
"Item",
".",
"dyePowder",
",",
"2",
",",
"8",
")",
",",
"new",
"Object",
"[",
"]",
"{",
"new",
"ItemStack",
"(",
"Item",
".",
"dyePowder",
",",
"1",
",",
"0",
")",
",",
"new",
"ItemStack",
"(",
"Item",
".",
"dyePowder",
",",
"1",
",",
"15",
")",
"}",
")",
";",
"par1CraftingManager",
".",
"addShapelessRecipe",
"(",
"new",
"ItemStack",
"(",
"Item",
".",
"dyePowder",
",",
"2",
",",
"7",
")",
",",
"new",
"Object",
"[",
"]",
"{",
"new",
"ItemStack",
"(",
"Item",
".",
"dyePowder",
",",
"1",
",",
"8",
")",
",",
"new",
"ItemStack",
"(",
"Item",
".",
"dyePowder",
",",
"1",
",",
"15",
")",
"}",
")",
";",
"par1CraftingManager",
".",
"addShapelessRecipe",
"(",
"new",
"ItemStack",
"(",
"Item",
".",
"dyePowder",
",",
"3",
",",
"7",
")",
",",
"new",
"Object",
"[",
"]",
"{",
"new",
"ItemStack",
"(",
"Item",
".",
"dyePowder",
",",
"1",
",",
"0",
")",
",",
"new",
"ItemStack",
"(",
"Item",
".",
"dyePowder",
",",
"1",
",",
"15",
")",
",",
"new",
"ItemStack",
"(",
"Item",
".",
"dyePowder",
",",
"1",
",",
"15",
")",
"}",
")",
";",
"par1CraftingManager",
".",
"addShapelessRecipe",
"(",
"new",
"ItemStack",
"(",
"Item",
".",
"dyePowder",
",",
"2",
",",
"12",
")",
",",
"new",
"Object",
"[",
"]",
"{",
"new",
"ItemStack",
"(",
"Item",
".",
"dyePowder",
",",
"1",
",",
"4",
")",
",",
"new",
"ItemStack",
"(",
"Item",
".",
"dyePowder",
",",
"1",
",",
"15",
")",
"}",
")",
";",
"par1CraftingManager",
".",
"addShapelessRecipe",
"(",
"new",
"ItemStack",
"(",
"Item",
".",
"dyePowder",
",",
"2",
",",
"6",
")",
",",
"new",
"Object",
"[",
"]",
"{",
"new",
"ItemStack",
"(",
"Item",
".",
"dyePowder",
",",
"1",
",",
"4",
")",
",",
"new",
"ItemStack",
"(",
"Item",
".",
"dyePowder",
",",
"1",
",",
"2",
")",
"}",
")",
";",
"par1CraftingManager",
".",
"addShapelessRecipe",
"(",
"new",
"ItemStack",
"(",
"Item",
".",
"dyePowder",
",",
"2",
",",
"5",
")",
",",
"new",
"Object",
"[",
"]",
"{",
"new",
"ItemStack",
"(",
"Item",
".",
"dyePowder",
",",
"1",
",",
"4",
")",
",",
"new",
"ItemStack",
"(",
"Item",
".",
"dyePowder",
",",
"1",
",",
"1",
")",
"}",
")",
";",
"par1CraftingManager",
".",
"addShapelessRecipe",
"(",
"new",
"ItemStack",
"(",
"Item",
".",
"dyePowder",
",",
"2",
",",
"13",
")",
",",
"new",
"Object",
"[",
"]",
"{",
"new",
"ItemStack",
"(",
"Item",
".",
"dyePowder",
",",
"1",
",",
"5",
")",
",",
"new",
"ItemStack",
"(",
"Item",
".",
"dyePowder",
",",
"1",
",",
"9",
")",
"}",
")",
";",
"par1CraftingManager",
".",
"addShapelessRecipe",
"(",
"new",
"ItemStack",
"(",
"Item",
".",
"dyePowder",
",",
"3",
",",
"13",
")",
",",
"new",
"Object",
"[",
"]",
"{",
"new",
"ItemStack",
"(",
"Item",
".",
"dyePowder",
",",
"1",
",",
"4",
")",
",",
"new",
"ItemStack",
"(",
"Item",
".",
"dyePowder",
",",
"1",
",",
"1",
")",
",",
"new",
"ItemStack",
"(",
"Item",
".",
"dyePowder",
",",
"1",
",",
"9",
")",
"}",
")",
";",
"par1CraftingManager",
".",
"addShapelessRecipe",
"(",
"new",
"ItemStack",
"(",
"Item",
".",
"dyePowder",
",",
"4",
",",
"13",
")",
",",
"new",
"Object",
"[",
"]",
"{",
"new",
"ItemStack",
"(",
"Item",
".",
"dyePowder",
",",
"1",
",",
"4",
")",
",",
"new",
"ItemStack",
"(",
"Item",
".",
"dyePowder",
",",
"1",
",",
"1",
")",
",",
"new",
"ItemStack",
"(",
"Item",
".",
"dyePowder",
",",
"1",
",",
"1",
")",
",",
"new",
"ItemStack",
"(",
"Item",
".",
"dyePowder",
",",
"1",
",",
"15",
")",
"}",
")",
";",
"}",
"}",
"</s>"
] |
9,598 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"class",
"SlotCrafting",
"extends",
"Slot",
"{",
"private",
"final",
"IInventory",
"craftMatrix",
";",
"private",
"EntityPlayer",
"thePlayer",
";",
"private",
"int",
"field_48418_g",
";",
"public",
"SlotCrafting",
"(",
"EntityPlayer",
"par1EntityPlayer",
",",
"IInventory",
"par2IInventory",
",",
"IInventory",
"par3IInventory",
",",
"int",
"par4",
",",
"int",
"par5",
",",
"int",
"par6",
")",
"{",
"super",
"(",
"par3IInventory",
",",
"par4",
",",
"par5",
",",
"par6",
")",
";",
"thePlayer",
"=",
"par1EntityPlayer",
";",
"craftMatrix",
"=",
"par2IInventory",
";",
"}",
"public",
"boolean",
"isItemValid",
"(",
"ItemStack",
"par1ItemStack",
")",
"{",
"return",
"false",
";",
"}",
"public",
"ItemStack",
"decrStackSize",
"(",
"int",
"par1",
")",
"{",
"if",
"(",
"getHasStack",
"(",
")",
")",
"{",
"field_48418_g",
"+=",
"Math",
".",
"min",
"(",
"par1",
",",
"getStack",
"(",
")",
".",
"stackSize",
")",
";",
"}",
"return",
"super",
".",
"decrStackSize",
"(",
"par1",
")",
";",
"}",
"protected",
"void",
"func_48415_a",
"(",
"ItemStack",
"par1ItemStack",
",",
"int",
"par2",
")",
"{",
"field_48418_g",
"+=",
"par2",
";",
"func_48416_b",
"(",
"par1ItemStack",
")",
";",
"}",
"protected",
"void",
"func_48416_b",
"(",
"ItemStack",
"par1ItemStack",
")",
"{",
"par1ItemStack",
".",
"onCrafting",
"(",
"thePlayer",
".",
"worldObj",
",",
"thePlayer",
",",
"field_48418_g",
")",
";",
"field_48418_g",
"=",
"0",
";",
"if",
"(",
"par1ItemStack",
".",
"itemID",
"==",
"Block",
".",
"workbench",
".",
"blockID",
")",
"{",
"thePlayer",
".",
"addStat",
"(",
"AchievementList",
".",
"buildWorkBench",
",",
"1",
")",
";",
"}",
"else",
"if",
"(",
"par1ItemStack",
".",
"itemID",
"==",
"Item",
".",
"pickaxeWood",
".",
"shiftedIndex",
")",
"{",
"thePlayer",
".",
"addStat",
"(",
"AchievementList",
".",
"buildPickaxe",
",",
"1",
")",
";",
"}",
"else",
"if",
"(",
"par1ItemStack",
".",
"itemID",
"==",
"Block",
".",
"stoneOvenIdle",
".",
"blockID",
")",
"{",
"thePlayer",
".",
"addStat",
"(",
"AchievementList",
".",
"buildFurnace",
",",
"1",
")",
";",
"}",
"else",
"if",
"(",
"par1ItemStack",
".",
"itemID",
"==",
"Item",
".",
"hoeWood",
".",
"shiftedIndex",
")",
"{",
"thePlayer",
".",
"addStat",
"(",
"AchievementList",
".",
"buildHoe",
",",
"1",
")",
";",
"}",
"else",
"if",
"(",
"par1ItemStack",
".",
"itemID",
"==",
"Item",
".",
"bread",
".",
"shiftedIndex",
")",
"{",
"thePlayer",
".",
"addStat",
"(",
"AchievementList",
".",
"makeBread",
",",
"1",
")",
";",
"}",
"else",
"if",
"(",
"par1ItemStack",
".",
"itemID",
"==",
"Item",
".",
"cake",
".",
"shiftedIndex",
")",
"{",
"thePlayer",
".",
"addStat",
"(",
"AchievementList",
".",
"bakeCake",
",",
"1",
")",
";",
"}",
"else",
"if",
"(",
"par1ItemStack",
".",
"itemID",
"==",
"Item",
".",
"pickaxeStone",
".",
"shiftedIndex",
")",
"{",
"thePlayer",
".",
"addStat",
"(",
"AchievementList",
".",
"buildBetterPickaxe",
",",
"1",
")",
";",
"}",
"else",
"if",
"(",
"par1ItemStack",
".",
"itemID",
"==",
"Item",
".",
"swordWood",
".",
"shiftedIndex",
")",
"{",
"thePlayer",
".",
"addStat",
"(",
"AchievementList",
".",
"buildSword",
",",
"1",
")",
";",
"}",
"else",
"if",
"(",
"par1ItemStack",
".",
"itemID",
"==",
"Block",
".",
"enchantmentTable",
".",
"blockID",
")",
"{",
"thePlayer",
".",
"addStat",
"(",
"AchievementList",
".",
"enchantments",
",",
"1",
")",
";",
"}",
"else",
"if",
"(",
"par1ItemStack",
".",
"itemID",
"==",
"Block",
".",
"bookShelf",
".",
"blockID",
")",
"{",
"thePlayer",
".",
"addStat",
"(",
"AchievementList",
".",
"bookcase",
",",
"1",
")",
";",
"}",
"}",
"public",
"void",
"onPickupFromSlot",
"(",
"ItemStack",
"par1ItemStack",
")",
"{",
"func_48416_b",
"(",
"par1ItemStack",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"craftMatrix",
".",
"getSizeInventory",
"(",
")",
";",
"i",
"++",
")",
"{",
"ItemStack",
"itemstack",
"=",
"craftMatrix",
".",
"getStackInSlot",
"(",
"i",
")",
";",
"if",
"(",
"itemstack",
"==",
"null",
")",
"{",
"continue",
";",
"}",
"craftMatrix",
".",
"decrStackSize",
"(",
"i",
",",
"1",
")",
";",
"if",
"(",
"!",
"itemstack",
".",
"getItem",
"(",
")",
".",
"hasContainerItem",
"(",
")",
")",
"{",
"continue",
";",
"}",
"ItemStack",
"itemstack1",
"=",
"new",
"ItemStack",
"(",
"itemstack",
".",
"getItem",
"(",
")",
".",
"getContainerItem",
"(",
")",
")",
";",
"if",
"(",
"itemstack",
".",
"getItem",
"(",
")",
".",
"doesContainerItemLeaveCraftingGrid",
"(",
"itemstack",
")",
"&&",
"thePlayer",
".",
"inventory",
".",
"addItemStackToInventory",
"(",
"itemstack1",
")",
")",
"{",
"continue",
";",
"}",
"if",
"(",
"craftMatrix",
".",
"getStackInSlot",
"(",
"i",
")",
"==",
"null",
")",
"{",
"craftMatrix",
".",
"setInventorySlotContents",
"(",
"i",
",",
"itemstack1",
")",
";",
"}",
"else",
"{",
"thePlayer",
".",
"dropPlayerItem",
"(",
"itemstack1",
")",
";",
"}",
"}",
"}",
"}",
"</s>"
] |
9,599 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"Teleporter",
"{",
"private",
"Random",
"random",
";",
"public",
"Teleporter",
"(",
")",
"{",
"random",
"=",
"new",
"Random",
"(",
")",
";",
"}",
"public",
"void",
"placeInPortal",
"(",
"World",
"par1World",
",",
"Entity",
"par2Entity",
")",
"{",
"if",
"(",
"par1World",
".",
"worldProvider",
".",
"worldType",
"==",
"1",
")",
"{",
"int",
"i",
"=",
"MathHelper",
".",
"floor_double",
"(",
"par2Entity",
".",
"posX",
")",
";",
"int",
"j",
"=",
"MathHelper",
".",
"floor_double",
"(",
"par2Entity",
".",
"posY",
")",
"-",
"1",
";",
"int",
"k",
"=",
"MathHelper",
".",
"floor_double",
"(",
"par2Entity",
".",
"posZ",
")",
";",
"int",
"l",
"=",
"1",
";",
"int",
"i1",
"=",
"0",
";",
"for",
"(",
"int",
"j1",
"=",
"-",
"2",
";",
"j1",
"<=",
"2",
";",
"j1",
"++",
")",
"{",
"for",
"(",
"int",
"k1",
"=",
"-",
"2",
";",
"k1",
"<=",
"2",
";",
"k1",
"++",
")",
"{",
"for",
"(",
"int",
"l1",
"=",
"-",
"1",
";",
"l1",
"<",
"3",
";",
"l1",
"++",
")",
"{",
"int",
"i2",
"=",
"i",
"+",
"k1",
"*",
"l",
"+",
"j1",
"*",
"i1",
";",
"int",
"j2",
"=",
"j",
"+",
"l1",
";",
"int",
"k2",
"=",
"(",
"k",
"+",
"k1",
"*",
"i1",
")",
"-",
"j1",
"*",
"l",
";",
"boolean",
"flag",
"=",
"l1",
"<",
"0",
";",
"par1World",
".",
"setBlockWithNotify",
"(",
"i2",
",",
"j2",
",",
"k2",
",",
"flag",
"?",
"Block",
".",
"obsidian",
".",
"blockID",
":",
"0",
")",
";",
"}",
"}",
"}",
"par2Entity",
".",
"setLocationAndAngles",
"(",
"i",
",",
"j",
",",
"k",
",",
"par2Entity",
".",
"rotationYaw",
",",
"0.0F",
")",
";",
"par2Entity",
".",
"motionX",
"=",
"par2Entity",
".",
"motionY",
"=",
"par2Entity",
".",
"motionZ",
"=",
"0.0D",
";",
"return",
";",
"}",
"if",
"(",
"placeInExistingPortal",
"(",
"par1World",
",",
"par2Entity",
")",
")",
"{",
"return",
";",
"}",
"else",
"{",
"createPortal",
"(",
"par1World",
",",
"par2Entity",
")",
";",
"placeInExistingPortal",
"(",
"par1World",
",",
"par2Entity",
")",
";",
"return",
";",
"}",
"}",
"public",
"boolean",
"placeInExistingPortal",
"(",
"World",
"par1World",
",",
"Entity",
"par2Entity",
")",
"{",
"char",
"c",
"=",
"'\\200'",
";",
"double",
"d",
"=",
"-",
"1D",
";",
"int",
"i",
"=",
"0",
";",
"int",
"j",
"=",
"0",
";",
"int",
"k",
"=",
"0",
";",
"int",
"l",
"=",
"MathHelper",
".",
"floor_double",
"(",
"par2Entity",
".",
"posX",
")",
";",
"int",
"i1",
"=",
"MathHelper",
".",
"floor_double",
"(",
"par2Entity",
".",
"posZ",
")",
";",
"for",
"(",
"int",
"j1",
"=",
"l",
"-",
"c",
";",
"j1",
"<=",
"l",
"+",
"c",
";",
"j1",
"++",
")",
"{",
"double",
"d1",
"=",
"(",
"(",
"double",
")",
"j1",
"+",
"0.5D",
")",
"-",
"par2Entity",
".",
"posX",
";",
"for",
"(",
"int",
"j2",
"=",
"i1",
"-",
"c",
";",
"j2",
"<=",
"i1",
"+",
"c",
";",
"j2",
"++",
")",
"{",
"double",
"d3",
"=",
"(",
"(",
"double",
")",
"j2",
"+",
"0.5D",
")",
"-",
"par2Entity",
".",
"posZ",
";",
"for",
"(",
"int",
"k2",
"=",
"127",
";",
"k2",
">=",
"0",
";",
"k2",
"--",
")",
"{",
"if",
"(",
"par1World",
".",
"getBlockId",
"(",
"j1",
",",
"k2",
",",
"j2",
")",
"!=",
"Block",
".",
"portal",
".",
"blockID",
")",
"{",
"continue",
";",
"}",
"for",
"(",
";",
"par1World",
".",
"getBlockId",
"(",
"j1",
",",
"k2",
"-",
"1",
",",
"j2",
")",
"==",
"Block",
".",
"portal",
".",
"blockID",
";",
"k2",
"--",
")",
"{",
"}",
"double",
"d5",
"=",
"(",
"(",
"double",
")",
"k2",
"+",
"0.5D",
")",
"-",
"par2Entity",
".",
"posY",
";",
"double",
"d7",
"=",
"d1",
"*",
"d1",
"+",
"d5",
"*",
"d5",
"+",
"d3",
"*",
"d3",
";",
"if",
"(",
"d",
"<",
"0.0D",
"||",
"d7",
"<",
"d",
")",
"{",
"d",
"=",
"d7",
";",
"i",
"=",
"j1",
";",
"j",
"=",
"k2",
";",
"k",
"=",
"j2",
";",
"}",
"}",
"}",
"}",
"if",
"(",
"d",
">=",
"0.0D",
")",
"{",
"int",
"k1",
"=",
"i",
";",
"int",
"l1",
"=",
"j",
";",
"int",
"i2",
"=",
"k",
";",
"double",
"d2",
"=",
"(",
"double",
")",
"k1",
"+",
"0.5D",
";",
"double",
"d4",
"=",
"(",
"double",
")",
"l1",
"+",
"0.5D",
";",
"double",
"d6",
"=",
"(",
"double",
")",
"i2",
"+",
"0.5D",
";",
"if",
"(",
"par1World",
".",
"getBlockId",
"(",
"k1",
"-",
"1",
",",
"l1",
",",
"i2",
")",
"==",
"Block",
".",
"portal",
".",
"blockID",
")",
"{",
"d2",
"-=",
"0.5D",
";",
"}",
"if",
"(",
"par1World",
".",
"getBlockId",
"(",
"k1",
"+",
"1",
",",
"l1",
",",
"i2",
")",
"==",
"Block",
".",
"portal",
".",
"blockID",
")",
"{",
"d2",
"+=",
"0.5D",
";",
"}",
"if",
"(",
"par1World",
".",
"getBlockId",
"(",
"k1",
",",
"l1",
",",
"i2",
"-",
"1",
")",
"==",
"Block",
".",
"portal",
".",
"blockID",
")",
"{",
"d6",
"-=",
"0.5D",
";",
"}",
"if",
"(",
"par1World",
".",
"getBlockId",
"(",
"k1",
",",
"l1",
",",
"i2",
"+",
"1",
")",
"==",
"Block",
".",
"portal",
".",
"blockID",
")",
"{",
"d6",
"+=",
"0.5D",
";",
"}",
"par2Entity",
".",
"setLocationAndAngles",
"(",
"d2",
",",
"d4",
",",
"d6",
",",
"par2Entity",
".",
"rotationYaw",
",",
"0.0F",
")",
";",
"par2Entity",
".",
"motionX",
"=",
"par2Entity",
".",
"motionY",
"=",
"par2Entity",
".",
"motionZ",
"=",
"0.0D",
";",
"return",
"true",
";",
"}",
"else",
"{",
"return",
"false",
";",
"}",
"}",
"public",
"boolean",
"createPortal",
"(",
"World",
"par1World",
",",
"Entity",
"par2Entity",
")",
"{",
"byte",
"byte0",
"=",
"16",
";",
"double",
"d",
"=",
"-",
"1D",
";",
"int",
"i",
"=",
"MathHelper",
".",
"floor_double",
"(",
"par2Entity",
".",
"posX",
")",
";",
"int",
"j",
"=",
"MathHelper",
".",
"floor_double",
"(",
"par2Entity",
".",
"posY",
")",
";",
"int",
"k",
"=",
"MathHelper",
".",
"floor_double",
"(",
"par2Entity",
".",
"posZ",
")",
";",
"int",
"l",
"=",
"i",
";",
"int",
"i1",
"=",
"j",
";",
"int",
"j1",
"=",
"k",
";",
"int",
"k1",
"=",
"0",
";",
"int",
"l1",
"=",
"random",
".",
"nextInt",
"(",
"4",
")",
";",
"for",
"(",
"int",
"i2",
"=",
"i",
"-",
"byte0",
";",
"i2",
"<=",
"i",
"+",
"byte0",
";",
"i2",
"++",
")",
"{",
"double",
"d1",
"=",
"(",
"(",
"double",
")",
"i2",
"+",
"0.5D",
")",
"-",
"par2Entity",
".",
"posX",
";",
"for",
"(",
"int",
"j3",
"=",
"k",
"-",
"byte0",
";",
"j3",
"<=",
"k",
"+",
"byte0",
";",
"j3",
"++",
")",
"{",
"double",
"d3",
"=",
"(",
"(",
"double",
")",
"j3",
"+",
"0.5D",
")",
"-",
"par2Entity",
".",
"posZ",
";",
"for",
"(",
"int",
"k4",
"=",
"127",
";",
"k4",
">=",
"0",
";",
"k4",
"--",
")",
"{",
"if",
"(",
"!",
"par1World",
".",
"isAirBlock",
"(",
"i2",
",",
"k4",
",",
"j3",
")",
")",
"{",
"continue",
";",
"}",
"for",
"(",
";",
"k4",
">",
"0",
"&&",
"par1World",
".",
"isAirBlock",
"(",
"i2",
",",
"k4",
"-",
"1",
",",
"j3",
")",
";",
"k4",
"--",
")",
"{",
"}",
"label0",
":",
"for",
"(",
"int",
"k5",
"=",
"l1",
";",
"k5",
"<",
"l1",
"+",
"4",
";",
"k5",
"++",
")",
"{",
"int",
"l6",
"=",
"k5",
"%",
"2",
";",
"int",
"i8",
"=",
"1",
"-",
"l6",
";",
"if",
"(",
"k5",
"%",
"4",
">=",
"2",
")",
"{",
"l6",
"=",
"-",
"l6",
";",
"i8",
"=",
"-",
"i8",
";",
"}",
"for",
"(",
"int",
"j9",
"=",
"0",
";",
"j9",
"<",
"3",
";",
"j9",
"++",
")",
"{",
"for",
"(",
"int",
"k10",
"=",
"0",
";",
"k10",
"<",
"4",
";",
"k10",
"++",
")",
"{",
"for",
"(",
"int",
"l11",
"=",
"-",
"1",
";",
"l11",
"<",
"4",
";",
"l11",
"++",
")",
"{",
"int",
"j12",
"=",
"i2",
"+",
"(",
"k10",
"-",
"1",
")",
"*",
"l6",
"+",
"j9",
"*",
"i8",
";",
"int",
"l12",
"=",
"k4",
"+",
"l11",
";",
"int",
"j13",
"=",
"(",
"j3",
"+",
"(",
"k10",
"-",
"1",
")",
"*",
"i8",
")",
"-",
"j9",
"*",
"l6",
";",
"if",
"(",
"l11",
"<",
"0",
"&&",
"!",
"par1World",
".",
"getBlockMaterial",
"(",
"j12",
",",
"l12",
",",
"j13",
")",
".",
"isSolid",
"(",
")",
"||",
"l11",
">=",
"0",
"&&",
"!",
"par1World",
".",
"isAirBlock",
"(",
"j12",
",",
"l12",
",",
"j13",
")",
")",
"{",
"break",
"label0",
";",
"}",
"}",
"}",
"}",
"double",
"d5",
"=",
"(",
"(",
"double",
")",
"k4",
"+",
"0.5D",
")",
"-",
"par2Entity",
".",
"posY",
";",
"double",
"d7",
"=",
"d1",
"*",
"d1",
"+",
"d5",
"*",
"d5",
"+",
"d3",
"*",
"d3",
";",
"if",
"(",
"d",
"<",
"0.0D",
"||",
"d7",
"<",
"d",
")",
"{",
"d",
"=",
"d7",
";",
"l",
"=",
"i2",
";",
"i1",
"=",
"k4",
";",
"j1",
"=",
"j3",
";",
"k1",
"=",
"k5",
"%",
"4",
";",
"}",
"}",
"}",
"}",
"}",
"if",
"(",
"d",
"<",
"0.0D",
")",
"{",
"for",
"(",
"int",
"j2",
"=",
"i",
"-",
"byte0",
";",
"j2",
"<=",
"i",
"+",
"byte0",
";",
"j2",
"++",
")",
"{",
"double",
"d2",
"=",
"(",
"(",
"double",
")",
"j2",
"+",
"0.5D",
")",
"-",
"par2Entity",
".",
"posX",
";",
"for",
"(",
"int",
"k3",
"=",
"k",
"-",
"byte0",
";",
"k3",
"<=",
"k",
"+",
"byte0",
";",
"k3",
"++",
")",
"{",
"double",
"d4",
"=",
"(",
"(",
"double",
")",
"k3",
"+",
"0.5D",
")",
"-",
"par2Entity",
".",
"posZ",
";",
"for",
"(",
"int",
"l4",
"=",
"127",
";",
"l4",
">=",
"0",
";",
"l4",
"--",
")",
"{",
"if",
"(",
"!",
"par1World",
".",
"isAirBlock",
"(",
"j2",
",",
"l4",
",",
"k3",
")",
")",
"{",
"continue",
";",
"}",
"for",
"(",
";",
"l4",
">",
"0",
"&&",
"par1World",
".",
"isAirBlock",
"(",
"j2",
",",
"l4",
"-",
"1",
",",
"k3",
")",
";",
"l4",
"--",
")",
"{",
"}",
"label1",
":",
"for",
"(",
"int",
"l5",
"=",
"l1",
";",
"l5",
"<",
"l1",
"+",
"2",
";",
"l5",
"++",
")",
"{",
"int",
"i7",
"=",
"l5",
"%",
"2",
";",
"int",
"j8",
"=",
"1",
"-",
"i7",
";",
"for",
"(",
"int",
"k9",
"=",
"0",
";",
"k9",
"<",
"4",
";",
"k9",
"++",
")",
"{",
"for",
"(",
"int",
"l10",
"=",
"-",
"1",
";",
"l10",
"<",
"4",
";",
"l10",
"++",
")",
"{",
"int",
"i12",
"=",
"j2",
"+",
"(",
"k9",
"-",
"1",
")",
"*",
"i7",
";",
"int",
"k12",
"=",
"l4",
"+",
"l10",
";",
"int",
"i13",
"=",
"k3",
"+",
"(",
"k9",
"-",
"1",
")",
"*",
"j8",
";",
"if",
"(",
"l10",
"<",
"0",
"&&",
"!",
"par1World",
".",
"getBlockMaterial",
"(",
"i12",
",",
"k12",
",",
"i13",
")",
".",
"isSolid",
"(",
")",
"||",
"l10",
">=",
"0",
"&&",
"!",
"par1World",
".",
"isAirBlock",
"(",
"i12",
",",
"k12",
",",
"i13",
")",
")",
"{",
"break",
"label1",
";",
"}",
"}",
"}",
"double",
"d6",
"=",
"(",
"(",
"double",
")",
"l4",
"+",
"0.5D",
")",
"-",
"par2Entity",
".",
"posY",
";",
"double",
"d8",
"=",
"d2",
"*",
"d2",
"+",
"d6",
"*",
"d6",
"+",
"d4",
"*",
"d4",
";",
"if",
"(",
"d",
"<",
"0.0D",
"||",
"d8",
"<",
"d",
")",
"{",
"d",
"=",
"d8",
";",
"l",
"=",
"j2",
";",
"i1",
"=",
"l4",
";",
"j1",
"=",
"k3",
";",
"k1",
"=",
"l5",
"%",
"2",
";",
"}",
"}",
"}",
"}",
"}",
"}",
"int",
"k2",
"=",
"k1",
";",
"int",
"l2",
"=",
"l",
";",
"int",
"i3",
"=",
"i1",
";",
"int",
"l3",
"=",
"j1",
";",
"int",
"i4",
"=",
"k2",
"%",
"2",
";",
"int",
"j4",
"=",
"1",
"-",
"i4",
";",
"if",
"(",
"k2",
"%",
"4",
">=",
"2",
")",
"{",
"i4",
"=",
"-",
"i4",
";",
"j4",
"=",
"-",
"j4",
";",
"}",
"if",
"(",
"d",
"<",
"0.0D",
")",
"{",
"if",
"(",
"i1",
"<",
"70",
")",
"{",
"i1",
"=",
"70",
";",
"}",
"if",
"(",
"i1",
">",
"118",
")",
"{",
"i1",
"=",
"118",
";",
"}",
"i3",
"=",
"i1",
";",
"for",
"(",
"int",
"i5",
"=",
"-",
"1",
";",
"i5",
"<=",
"1",
";",
"i5",
"++",
")",
"{",
"for",
"(",
"int",
"i6",
"=",
"1",
";",
"i6",
"<",
"3",
";",
"i6",
"++",
")",
"{",
"for",
"(",
"int",
"j7",
"=",
"-",
"1",
";",
"j7",
"<",
"3",
";",
"j7",
"++",
")",
"{",
"int",
"k8",
"=",
"l2",
"+",
"(",
"i6",
"-",
"1",
")",
"*",
"i4",
"+",
"i5",
"*",
"j4",
";",
"int",
"l9",
"=",
"i3",
"+",
"j7",
";",
"int",
"i11",
"=",
"(",
"l3",
"+",
"(",
"i6",
"-",
"1",
")",
"*",
"j4",
")",
"-",
"i5",
"*",
"i4",
";",
"boolean",
"flag",
"=",
"j7",
"<",
"0",
";",
"par1World",
".",
"setBlockWithNotify",
"(",
"k8",
",",
"l9",
",",
"i11",
",",
"flag",
"?",
"Block",
".",
"obsidian",
".",
"blockID",
":",
"0",
")",
";",
"}",
"}",
"}",
"}",
"for",
"(",
"int",
"j5",
"=",
"0",
";",
"j5",
"<",
"4",
";",
"j5",
"++",
")",
"{",
"par1World",
".",
"editingBlocks",
"=",
"true",
";",
"for",
"(",
"int",
"j6",
"=",
"0",
";",
"j6",
"<",
"4",
";",
"j6",
"++",
")",
"{",
"for",
"(",
"int",
"k7",
"=",
"-",
"1",
";",
"k7",
"<",
"4",
";",
"k7",
"++",
")",
"{",
"int",
"l8",
"=",
"l2",
"+",
"(",
"j6",
"-",
"1",
")",
"*",
"i4",
";",
"int",
"i10",
"=",
"i3",
"+",
"k7",
";",
"int",
"j11",
"=",
"l3",
"+",
"(",
"j6",
"-",
"1",
")",
"*",
"j4",
";",
"boolean",
"flag1",
"=",
"j6",
"==",
"0",
"||",
"j6",
"==",
"3",
"||",
"k7",
"==",
"-",
"1",
"||",
"k7",
"==",
"3",
";",
"par1World",
".",
"setBlockWithNotify",
"(",
"l8",
",",
"i10",
",",
"j11",
",",
"flag1",
"?",
"Block",
".",
"obsidian",
".",
"blockID",
":",
"Block",
".",
"portal",
".",
"blockID",
")",
";",
"}",
"}",
"par1World",
".",
"editingBlocks",
"=",
"false",
";",
"for",
"(",
"int",
"k6",
"=",
"0",
";",
"k6",
"<",
"4",
";",
"k6",
"++",
")",
"{",
"for",
"(",
"int",
"l7",
"=",
"-",
"1",
";",
"l7",
"<",
"4",
";",
"l7",
"++",
")",
"{",
"int",
"i9",
"=",
"l2",
"+",
"(",
"k6",
"-",
"1",
")",
"*",
"i4",
";",
"int",
"j10",
"=",
"i3",
"+",
"l7",
";",
"int",
"k11",
"=",
"l3",
"+",
"(",
"k6",
"-",
"1",
")",
"*",
"j4",
";",
"par1World",
".",
"notifyBlocksOfNeighborChange",
"(",
"i9",
",",
"j10",
",",
"k11",
",",
"par1World",
".",
"getBlockId",
"(",
"i9",
",",
"j10",
",",
"k11",
")",
")",
";",
"}",
"}",
"}",
"return",
"true",
";",
"}",
"}",
"</s>"
] |
Subsets and Splits