id
int32 0
12.9k
| code
sequencelengths 2
264k
|
---|---|
9,400 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"io",
".",
"IOException",
";",
"import",
"java",
".",
"util",
".",
"*",
";",
"public",
"class",
"ChunkProviderServer",
"implements",
"IChunkProvider",
"{",
"private",
"Set",
"droppedChunksSet",
";",
"private",
"Chunk",
"dummyChunk",
";",
"private",
"IChunkProvider",
"serverChunkGenerator",
";",
"private",
"IChunkLoader",
"chunkLoader",
";",
"public",
"boolean",
"chunkLoadOverride",
";",
"private",
"LongHashMap",
"id2ChunkMap",
";",
"private",
"List",
"field_727_f",
";",
"private",
"WorldServer",
"world",
";",
"public",
"ChunkProviderServer",
"(",
"WorldServer",
"par1WorldServer",
",",
"IChunkLoader",
"par2IChunkLoader",
",",
"IChunkProvider",
"par3IChunkProvider",
")",
"{",
"droppedChunksSet",
"=",
"new",
"HashSet",
"(",
")",
";",
"chunkLoadOverride",
"=",
"false",
";",
"id2ChunkMap",
"=",
"new",
"LongHashMap",
"(",
")",
";",
"field_727_f",
"=",
"new",
"ArrayList",
"(",
")",
";",
"dummyChunk",
"=",
"new",
"EmptyChunk",
"(",
"par1WorldServer",
",",
"0",
",",
"0",
")",
";",
"world",
"=",
"par1WorldServer",
";",
"chunkLoader",
"=",
"par2IChunkLoader",
";",
"serverChunkGenerator",
"=",
"par3IChunkProvider",
";",
"}",
"public",
"boolean",
"chunkExists",
"(",
"int",
"par1",
",",
"int",
"par2",
")",
"{",
"return",
"id2ChunkMap",
".",
"containsItem",
"(",
"ChunkCoordIntPair",
".",
"chunkXZ2Int",
"(",
"par1",
",",
"par2",
")",
")",
";",
"}",
"public",
"void",
"dropChunk",
"(",
"int",
"par1",
",",
"int",
"par2",
")",
"{",
"if",
"(",
"world",
".",
"worldProvider",
".",
"canRespawnHere",
"(",
")",
")",
"{",
"ChunkCoordinates",
"chunkcoordinates",
"=",
"world",
".",
"getSpawnPoint",
"(",
")",
";",
"int",
"i",
"=",
"(",
"par1",
"*",
"16",
"+",
"8",
")",
"-",
"chunkcoordinates",
".",
"posX",
";",
"int",
"j",
"=",
"(",
"par2",
"*",
"16",
"+",
"8",
")",
"-",
"chunkcoordinates",
".",
"posZ",
";",
"char",
"c",
"=",
"'\\200'",
";",
"if",
"(",
"i",
"<",
"-",
"c",
"||",
"i",
">",
"c",
"||",
"j",
"<",
"-",
"c",
"||",
"j",
">",
"c",
")",
"{",
"droppedChunksSet",
".",
"add",
"(",
"Long",
".",
"valueOf",
"(",
"ChunkCoordIntPair",
".",
"chunkXZ2Int",
"(",
"par1",
",",
"par2",
")",
")",
")",
";",
"}",
"}",
"else",
"{",
"droppedChunksSet",
".",
"add",
"(",
"Long",
".",
"valueOf",
"(",
"ChunkCoordIntPair",
".",
"chunkXZ2Int",
"(",
"par1",
",",
"par2",
")",
")",
")",
";",
"}",
"}",
"public",
"void",
"unloadAllChunks",
"(",
")",
"{",
"Chunk",
"chunk",
";",
"for",
"(",
"Iterator",
"iterator",
"=",
"field_727_f",
".",
"iterator",
"(",
")",
";",
"iterator",
".",
"hasNext",
"(",
")",
";",
"dropChunk",
"(",
"chunk",
".",
"xPosition",
",",
"chunk",
".",
"zPosition",
")",
")",
"{",
"chunk",
"=",
"(",
"Chunk",
")",
"iterator",
".",
"next",
"(",
")",
";",
"}",
"}",
"public",
"Chunk",
"loadChunk",
"(",
"int",
"par1",
",",
"int",
"par2",
")",
"{",
"long",
"l",
"=",
"ChunkCoordIntPair",
".",
"chunkXZ2Int",
"(",
"par1",
",",
"par2",
")",
";",
"droppedChunksSet",
".",
"remove",
"(",
"Long",
".",
"valueOf",
"(",
"l",
")",
")",
";",
"Chunk",
"chunk",
"=",
"(",
"Chunk",
")",
"id2ChunkMap",
".",
"getValueByKey",
"(",
"l",
")",
";",
"if",
"(",
"chunk",
"==",
"null",
")",
"{",
"chunk",
"=",
"loadChunkFromFile",
"(",
"par1",
",",
"par2",
")",
";",
"if",
"(",
"chunk",
"==",
"null",
")",
"{",
"if",
"(",
"serverChunkGenerator",
"==",
"null",
")",
"{",
"chunk",
"=",
"dummyChunk",
";",
"}",
"else",
"{",
"chunk",
"=",
"serverChunkGenerator",
".",
"provideChunk",
"(",
"par1",
",",
"par2",
")",
";",
"}",
"}",
"id2ChunkMap",
".",
"add",
"(",
"l",
",",
"chunk",
")",
";",
"field_727_f",
".",
"add",
"(",
"chunk",
")",
";",
"if",
"(",
"chunk",
"!=",
"null",
")",
"{",
"chunk",
".",
"func_4053_c",
"(",
")",
";",
"chunk",
".",
"onChunkLoad",
"(",
")",
";",
"}",
"chunk",
".",
"populateChunk",
"(",
"this",
",",
"this",
",",
"par1",
",",
"par2",
")",
";",
"}",
"return",
"chunk",
";",
"}",
"public",
"Chunk",
"provideChunk",
"(",
"int",
"par1",
",",
"int",
"par2",
")",
"{",
"Chunk",
"chunk",
"=",
"(",
"Chunk",
")",
"id2ChunkMap",
".",
"getValueByKey",
"(",
"ChunkCoordIntPair",
".",
"chunkXZ2Int",
"(",
"par1",
",",
"par2",
")",
")",
";",
"if",
"(",
"chunk",
"==",
"null",
")",
"{",
"if",
"(",
"world",
".",
"findingSpawnPoint",
"||",
"chunkLoadOverride",
")",
"{",
"return",
"loadChunk",
"(",
"par1",
",",
"par2",
")",
";",
"}",
"else",
"{",
"return",
"dummyChunk",
";",
"}",
"}",
"else",
"{",
"return",
"chunk",
";",
"}",
"}",
"private",
"Chunk",
"loadChunkFromFile",
"(",
"int",
"par1",
",",
"int",
"par2",
")",
"{",
"if",
"(",
"chunkLoader",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"try",
"{",
"Chunk",
"chunk",
"=",
"chunkLoader",
".",
"loadChunk",
"(",
"world",
",",
"par1",
",",
"par2",
")",
";",
"if",
"(",
"chunk",
"!=",
"null",
")",
"{",
"chunk",
".",
"lastSaveTime",
"=",
"world",
".",
"getWorldTime",
"(",
")",
";",
"}",
"return",
"chunk",
";",
"}",
"catch",
"(",
"Exception",
"exception",
")",
"{",
"exception",
".",
"printStackTrace",
"(",
")",
";",
"}",
"return",
"null",
";",
"}",
"private",
"void",
"saveChunkExtraData",
"(",
"Chunk",
"par1Chunk",
")",
"{",
"if",
"(",
"chunkLoader",
"==",
"null",
")",
"{",
"return",
";",
"}",
"try",
"{",
"chunkLoader",
".",
"saveExtraChunkData",
"(",
"world",
",",
"par1Chunk",
")",
";",
"}",
"catch",
"(",
"Exception",
"exception",
")",
"{",
"exception",
".",
"printStackTrace",
"(",
")",
";",
"}",
"}",
"private",
"void",
"saveChunkData",
"(",
"Chunk",
"par1Chunk",
")",
"{",
"if",
"(",
"chunkLoader",
"==",
"null",
")",
"{",
"return",
";",
"}",
"try",
"{",
"par1Chunk",
".",
"lastSaveTime",
"=",
"world",
".",
"getWorldTime",
"(",
")",
";",
"chunkLoader",
".",
"saveChunk",
"(",
"world",
",",
"par1Chunk",
")",
";",
"}",
"catch",
"(",
"IOException",
"ioexception",
")",
"{",
"ioexception",
".",
"printStackTrace",
"(",
")",
";",
"}",
"}",
"public",
"void",
"populate",
"(",
"IChunkProvider",
"par1IChunkProvider",
",",
"int",
"par2",
",",
"int",
"par3",
")",
"{",
"Chunk",
"chunk",
"=",
"provideChunk",
"(",
"par2",
",",
"par3",
")",
";",
"if",
"(",
"!",
"chunk",
".",
"isTerrainPopulated",
")",
"{",
"chunk",
".",
"isTerrainPopulated",
"=",
"true",
";",
"if",
"(",
"serverChunkGenerator",
"!=",
"null",
")",
"{",
"serverChunkGenerator",
".",
"populate",
"(",
"par1IChunkProvider",
",",
"par2",
",",
"par3",
")",
";",
"chunk",
".",
"setChunkModified",
"(",
")",
";",
"}",
"}",
"}",
"public",
"boolean",
"saveChunks",
"(",
"boolean",
"par1",
",",
"IProgressUpdate",
"par2IProgressUpdate",
")",
"{",
"int",
"i",
"=",
"0",
";",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
"field_727_f",
".",
"size",
"(",
")",
";",
"j",
"++",
")",
"{",
"Chunk",
"chunk",
"=",
"(",
"Chunk",
")",
"field_727_f",
".",
"get",
"(",
"j",
")",
";",
"if",
"(",
"par1",
")",
"{",
"saveChunkExtraData",
"(",
"chunk",
")",
";",
"}",
"if",
"(",
"!",
"chunk",
".",
"needsSaving",
"(",
"par1",
")",
")",
"{",
"continue",
";",
"}",
"saveChunkData",
"(",
"chunk",
")",
";",
"chunk",
".",
"isModified",
"=",
"false",
";",
"if",
"(",
"++",
"i",
"==",
"24",
"&&",
"!",
"par1",
")",
"{",
"return",
"false",
";",
"}",
"}",
"if",
"(",
"par1",
")",
"{",
"if",
"(",
"chunkLoader",
"==",
"null",
")",
"{",
"return",
"true",
";",
"}",
"chunkLoader",
".",
"saveExtraData",
"(",
")",
";",
"}",
"return",
"true",
";",
"}",
"public",
"boolean",
"unload100OldestChunks",
"(",
")",
"{",
"if",
"(",
"!",
"world",
".",
"levelSaving",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"100",
";",
"i",
"++",
")",
"{",
"if",
"(",
"!",
"droppedChunksSet",
".",
"isEmpty",
"(",
")",
")",
"{",
"Long",
"long1",
"=",
"(",
"Long",
")",
"droppedChunksSet",
".",
"iterator",
"(",
")",
".",
"next",
"(",
")",
";",
"Chunk",
"chunk",
"=",
"(",
"Chunk",
")",
"id2ChunkMap",
".",
"getValueByKey",
"(",
"long1",
".",
"longValue",
"(",
")",
")",
";",
"chunk",
".",
"onChunkUnload",
"(",
")",
";",
"saveChunkData",
"(",
"chunk",
")",
";",
"saveChunkExtraData",
"(",
"chunk",
")",
";",
"droppedChunksSet",
".",
"remove",
"(",
"long1",
")",
";",
"id2ChunkMap",
".",
"remove",
"(",
"long1",
".",
"longValue",
"(",
")",
")",
";",
"field_727_f",
".",
"remove",
"(",
"chunk",
")",
";",
"}",
"}",
"if",
"(",
"chunkLoader",
"!=",
"null",
")",
"{",
"chunkLoader",
".",
"chunkTick",
"(",
")",
";",
"}",
"}",
"return",
"serverChunkGenerator",
".",
"unload100OldestChunks",
"(",
")",
";",
"}",
"public",
"boolean",
"canSave",
"(",
")",
"{",
"return",
"!",
"world",
".",
"levelSaving",
";",
"}",
"public",
"String",
"func_46040_d",
"(",
")",
"{",
"return",
"(",
"new",
"StringBuilder",
"(",
")",
")",
".",
"append",
"(",
"\"\"",
")",
".",
"append",
"(",
"id2ChunkMap",
".",
"getNumHashElements",
"(",
")",
")",
".",
"append",
"(",
"\"",
"Drop:",
"\"",
")",
".",
"append",
"(",
"droppedChunksSet",
".",
"size",
"(",
")",
")",
".",
"toString",
"(",
")",
";",
"}",
"public",
"List",
"getPossibleCreatures",
"(",
"EnumCreatureType",
"par1EnumCreatureType",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"return",
"serverChunkGenerator",
".",
"getPossibleCreatures",
"(",
"par1EnumCreatureType",
",",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"}",
"public",
"ChunkPosition",
"findClosestStructure",
"(",
"World",
"par1World",
",",
"String",
"par2Str",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
")",
"{",
"return",
"serverChunkGenerator",
".",
"findClosestStructure",
"(",
"par1World",
",",
"par2Str",
",",
"par3",
",",
"par4",
",",
"par5",
")",
";",
"}",
"}",
"</s>"
] |
9,401 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"class",
"ItemSpade",
"extends",
"ItemTool",
"{",
"private",
"static",
"Block",
"blocksEffectiveAgainst",
"[",
"]",
";",
"public",
"ItemSpade",
"(",
"int",
"par1",
",",
"EnumToolMaterial",
"par2EnumToolMaterial",
")",
"{",
"super",
"(",
"par1",
",",
"1",
",",
"par2EnumToolMaterial",
",",
"blocksEffectiveAgainst",
")",
";",
"}",
"public",
"boolean",
"canHarvestBlock",
"(",
"Block",
"par1Block",
")",
"{",
"if",
"(",
"par1Block",
"==",
"Block",
".",
"snow",
")",
"{",
"return",
"true",
";",
"}",
"return",
"par1Block",
"==",
"Block",
".",
"blockSnow",
";",
"}",
"static",
"{",
"blocksEffectiveAgainst",
"=",
"(",
"new",
"Block",
"[",
"]",
"{",
"Block",
".",
"grass",
",",
"Block",
".",
"dirt",
",",
"Block",
".",
"sand",
",",
"Block",
".",
"gravel",
",",
"Block",
".",
"snow",
",",
"Block",
".",
"blockSnow",
",",
"Block",
".",
"blockClay",
",",
"Block",
".",
"tilledField",
",",
"Block",
".",
"slowSand",
",",
"Block",
".",
"mycelium",
"}",
")",
";",
"}",
"}",
"</s>"
] |
9,402 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"io",
".",
"*",
";",
"public",
"class",
"Packet250CustomPayload",
"extends",
"Packet",
"{",
"public",
"String",
"channel",
";",
"public",
"int",
"length",
";",
"public",
"byte",
"data",
"[",
"]",
";",
"public",
"Packet250CustomPayload",
"(",
")",
"{",
"}",
"public",
"void",
"readPacketData",
"(",
"DataInputStream",
"par1DataInputStream",
")",
"throws",
"IOException",
"{",
"channel",
"=",
"readString",
"(",
"par1DataInputStream",
",",
"16",
")",
";",
"length",
"=",
"par1DataInputStream",
".",
"readShort",
"(",
")",
";",
"if",
"(",
"length",
">",
"0",
"&&",
"length",
"<",
"32767",
")",
"{",
"data",
"=",
"new",
"byte",
"[",
"length",
"]",
";",
"par1DataInputStream",
".",
"readFully",
"(",
"data",
")",
";",
"}",
"}",
"public",
"void",
"writePacketData",
"(",
"DataOutputStream",
"par1DataOutputStream",
")",
"throws",
"IOException",
"{",
"writeString",
"(",
"channel",
",",
"par1DataOutputStream",
")",
";",
"par1DataOutputStream",
".",
"writeShort",
"(",
"(",
"short",
")",
"length",
")",
";",
"if",
"(",
"data",
"!=",
"null",
")",
"{",
"par1DataOutputStream",
".",
"write",
"(",
"data",
")",
";",
"}",
"}",
"public",
"void",
"processPacket",
"(",
"NetHandler",
"par1NetHandler",
")",
"{",
"par1NetHandler",
".",
"handleCustomPayload",
"(",
"this",
")",
";",
"}",
"public",
"int",
"getPacketSize",
"(",
")",
"{",
"return",
"2",
"+",
"channel",
".",
"length",
"(",
")",
"*",
"2",
"+",
"2",
"+",
"length",
";",
"}",
"}",
"</s>"
] |
9,403 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"ItemExpBottle",
"extends",
"Item",
"{",
"public",
"ItemExpBottle",
"(",
"int",
"par1",
")",
"{",
"super",
"(",
"par1",
")",
";",
"}",
"public",
"ItemStack",
"onItemRightClick",
"(",
"ItemStack",
"par1ItemStack",
",",
"World",
"par2World",
",",
"EntityPlayer",
"par3EntityPlayer",
")",
"{",
"if",
"(",
"!",
"par3EntityPlayer",
".",
"capabilities",
".",
"isCreativeMode",
")",
"{",
"par1ItemStack",
".",
"stackSize",
"--",
";",
"}",
"par2World",
".",
"playSoundAtEntity",
"(",
"par3EntityPlayer",
",",
"\"random.bow\"",
",",
"0.5F",
",",
"0.4F",
"/",
"(",
"itemRand",
".",
"nextFloat",
"(",
")",
"*",
"0.4F",
"+",
"0.8F",
")",
")",
";",
"if",
"(",
"!",
"par2World",
".",
"isRemote",
")",
"{",
"par2World",
".",
"spawnEntityInWorld",
"(",
"new",
"EntityExpBottle",
"(",
"par2World",
",",
"par3EntityPlayer",
")",
")",
";",
"}",
"return",
"par1ItemStack",
";",
"}",
"}",
"</s>"
] |
9,404 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"class",
"SlotEnchantmentTable",
"extends",
"InventoryBasic",
"{",
"final",
"ContainerEnchantment",
"container",
";",
"SlotEnchantmentTable",
"(",
"ContainerEnchantment",
"par1ContainerEnchantment",
",",
"String",
"par2Str",
",",
"int",
"par3",
")",
"{",
"super",
"(",
"par2Str",
",",
"par3",
")",
";",
"container",
"=",
"par1ContainerEnchantment",
";",
"}",
"public",
"int",
"getInventoryStackLimit",
"(",
")",
"{",
"return",
"1",
";",
"}",
"public",
"void",
"onInventoryChanged",
"(",
")",
"{",
"super",
".",
"onInventoryChanged",
"(",
")",
";",
"container",
".",
"onCraftMatrixChanged",
"(",
"this",
")",
";",
"}",
"}",
"</s>"
] |
9,405 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"class",
"RedstoneUpdateInfo",
"{",
"int",
"x",
";",
"int",
"y",
";",
"int",
"z",
";",
"long",
"updateTime",
";",
"public",
"RedstoneUpdateInfo",
"(",
"int",
"par1",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"long",
"par4",
")",
"{",
"x",
"=",
"par1",
";",
"y",
"=",
"par2",
";",
"z",
"=",
"par3",
";",
"updateTime",
"=",
"par4",
";",
"}",
"}",
"</s>"
] |
9,406 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"io",
".",
"*",
";",
"public",
"class",
"Packet53BlockChange",
"extends",
"Packet",
"{",
"public",
"int",
"xPosition",
";",
"public",
"int",
"yPosition",
";",
"public",
"int",
"zPosition",
";",
"public",
"int",
"type",
";",
"public",
"int",
"metadata",
";",
"public",
"Packet53BlockChange",
"(",
")",
"{",
"isChunkDataPacket",
"=",
"true",
";",
"}",
"public",
"Packet53BlockChange",
"(",
"int",
"par1",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"World",
"par4World",
")",
"{",
"isChunkDataPacket",
"=",
"true",
";",
"xPosition",
"=",
"par1",
";",
"yPosition",
"=",
"par2",
";",
"zPosition",
"=",
"par3",
";",
"type",
"=",
"par4World",
".",
"getBlockId",
"(",
"par1",
",",
"par2",
",",
"par3",
")",
";",
"metadata",
"=",
"par4World",
".",
"getBlockMetadata",
"(",
"par1",
",",
"par2",
",",
"par3",
")",
";",
"}",
"public",
"void",
"readPacketData",
"(",
"DataInputStream",
"par1DataInputStream",
")",
"throws",
"IOException",
"{",
"xPosition",
"=",
"par1DataInputStream",
".",
"readInt",
"(",
")",
";",
"yPosition",
"=",
"par1DataInputStream",
".",
"read",
"(",
")",
";",
"zPosition",
"=",
"par1DataInputStream",
".",
"readInt",
"(",
")",
";",
"type",
"=",
"par1DataInputStream",
".",
"read",
"(",
")",
";",
"metadata",
"=",
"par1DataInputStream",
".",
"read",
"(",
")",
";",
"}",
"public",
"void",
"writePacketData",
"(",
"DataOutputStream",
"par1DataOutputStream",
")",
"throws",
"IOException",
"{",
"par1DataOutputStream",
".",
"writeInt",
"(",
"xPosition",
")",
";",
"par1DataOutputStream",
".",
"write",
"(",
"yPosition",
")",
";",
"par1DataOutputStream",
".",
"writeInt",
"(",
"zPosition",
")",
";",
"par1DataOutputStream",
".",
"write",
"(",
"type",
")",
";",
"par1DataOutputStream",
".",
"write",
"(",
"metadata",
")",
";",
"}",
"public",
"void",
"processPacket",
"(",
"NetHandler",
"par1NetHandler",
")",
"{",
"par1NetHandler",
".",
"handleBlockChange",
"(",
"this",
")",
";",
"}",
"public",
"int",
"getPacketSize",
"(",
")",
"{",
"return",
"11",
";",
"}",
"}",
"</s>"
] |
9,407 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"net",
".",
"MalformedURLException",
";",
"import",
"java",
".",
"net",
".",
"URL",
";",
"import",
"java",
".",
"util",
".",
"HashMap",
";",
"import",
"java",
".",
"util",
".",
"Map",
";",
"public",
"class",
"PlayerUsageSnooper",
"{",
"private",
"Map",
"field_52016_a",
";",
"private",
"final",
"URL",
"field_52015_b",
";",
"public",
"PlayerUsageSnooper",
"(",
"String",
"par1Str",
")",
"{",
"field_52016_a",
"=",
"new",
"HashMap",
"(",
")",
";",
"try",
"{",
"field_52015_b",
"=",
"new",
"URL",
"(",
"(",
"new",
"StringBuilder",
"(",
")",
")",
".",
"append",
"(",
"\"\"",
")",
".",
"append",
"(",
"par1Str",
")",
".",
"toString",
"(",
")",
")",
";",
"}",
"catch",
"(",
"MalformedURLException",
"malformedurlexception",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
")",
";",
"}",
"}",
"public",
"void",
"func_52014_a",
"(",
"String",
"par1Str",
",",
"Object",
"par2Obj",
")",
"{",
"field_52016_a",
".",
"put",
"(",
"par1Str",
",",
"par2Obj",
")",
";",
"}",
"public",
"void",
"func_52012_a",
"(",
")",
"{",
"PlayerUsageSnooperThread",
"playerusagesnooperthread",
"=",
"new",
"PlayerUsageSnooperThread",
"(",
"this",
",",
"\"reporter\"",
")",
";",
"playerusagesnooperthread",
".",
"setDaemon",
"(",
"true",
")",
";",
"playerusagesnooperthread",
".",
"start",
"(",
")",
";",
"}",
"static",
"URL",
"func_52013_a",
"(",
"PlayerUsageSnooper",
"par0PlayerUsageSnooper",
")",
"{",
"return",
"par0PlayerUsageSnooper",
".",
"field_52015_b",
";",
"}",
"static",
"Map",
"func_52011_b",
"(",
"PlayerUsageSnooper",
"par0PlayerUsageSnooper",
")",
"{",
"return",
"par0PlayerUsageSnooper",
".",
"field_52016_a",
";",
"}",
"}",
"</s>"
] |
9,408 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"*",
";",
"public",
"class",
"MapGenVillage",
"extends",
"MapGenStructure",
"{",
"public",
"static",
"List",
"villageSpawnBiomes",
";",
"private",
"final",
"int",
"terrainType",
";",
"public",
"MapGenVillage",
"(",
"int",
"par1",
")",
"{",
"terrainType",
"=",
"par1",
";",
"}",
"protected",
"boolean",
"canSpawnStructureAtCoords",
"(",
"int",
"par1",
",",
"int",
"par2",
")",
"{",
"byte",
"byte0",
"=",
"32",
";",
"byte",
"byte1",
"=",
"8",
";",
"int",
"i",
"=",
"par1",
";",
"int",
"j",
"=",
"par2",
";",
"if",
"(",
"par1",
"<",
"0",
")",
"{",
"par1",
"-=",
"byte0",
"-",
"1",
";",
"}",
"if",
"(",
"par2",
"<",
"0",
")",
"{",
"par2",
"-=",
"byte0",
"-",
"1",
";",
"}",
"int",
"k",
"=",
"par1",
"/",
"byte0",
";",
"int",
"l",
"=",
"par2",
"/",
"byte0",
";",
"Random",
"random",
"=",
"worldObj",
".",
"setRandomSeed",
"(",
"k",
",",
"l",
",",
"0x9e7f70",
")",
";",
"k",
"*=",
"byte0",
";",
"l",
"*=",
"byte0",
";",
"k",
"+=",
"random",
".",
"nextInt",
"(",
"byte0",
"-",
"byte1",
")",
";",
"l",
"+=",
"random",
".",
"nextInt",
"(",
"byte0",
"-",
"byte1",
")",
";",
"par1",
"=",
"i",
";",
"par2",
"=",
"j",
";",
"if",
"(",
"par1",
"==",
"k",
"&&",
"par2",
"==",
"l",
")",
"{",
"boolean",
"flag",
"=",
"worldObj",
".",
"getWorldChunkManager",
"(",
")",
".",
"areBiomesViable",
"(",
"par1",
"*",
"16",
"+",
"8",
",",
"par2",
"*",
"16",
"+",
"8",
",",
"0",
",",
"villageSpawnBiomes",
")",
";",
"if",
"(",
"flag",
")",
"{",
"return",
"true",
";",
"}",
"}",
"return",
"false",
";",
"}",
"protected",
"StructureStart",
"getStructureStart",
"(",
"int",
"par1",
",",
"int",
"par2",
")",
"{",
"return",
"new",
"StructureVillageStart",
"(",
"worldObj",
",",
"rand",
",",
"par1",
",",
"par2",
",",
"terrainType",
")",
";",
"}",
"static",
"{",
"villageSpawnBiomes",
"=",
"Arrays",
".",
"asList",
"(",
"new",
"BiomeGenBase",
"[",
"]",
"{",
"BiomeGenBase",
".",
"plains",
",",
"BiomeGenBase",
".",
"desert",
"}",
")",
";",
"}",
"}",
"</s>"
] |
9,409 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"BlockLadder",
"extends",
"Block",
"{",
"protected",
"BlockLadder",
"(",
"int",
"par1",
",",
"int",
"par2",
")",
"{",
"super",
"(",
"par1",
",",
"par2",
",",
"Material",
".",
"circuits",
")",
";",
"}",
"public",
"AxisAlignedBB",
"getCollisionBoundingBoxFromPool",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"int",
"i",
"=",
"par1World",
".",
"getBlockMetadata",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"float",
"f",
"=",
"0.125F",
";",
"if",
"(",
"i",
"==",
"2",
")",
"{",
"setBlockBounds",
"(",
"0.0F",
",",
"0.0F",
",",
"1.0F",
"-",
"f",
",",
"1.0F",
",",
"1.0F",
",",
"1.0F",
")",
";",
"}",
"if",
"(",
"i",
"==",
"3",
")",
"{",
"setBlockBounds",
"(",
"0.0F",
",",
"0.0F",
",",
"0.0F",
",",
"1.0F",
",",
"1.0F",
",",
"f",
")",
";",
"}",
"if",
"(",
"i",
"==",
"4",
")",
"{",
"setBlockBounds",
"(",
"1.0F",
"-",
"f",
",",
"0.0F",
",",
"0.0F",
",",
"1.0F",
",",
"1.0F",
",",
"1.0F",
")",
";",
"}",
"if",
"(",
"i",
"==",
"5",
")",
"{",
"setBlockBounds",
"(",
"0.0F",
",",
"0.0F",
",",
"0.0F",
",",
"f",
",",
"1.0F",
",",
"1.0F",
")",
";",
"}",
"return",
"super",
".",
"getCollisionBoundingBoxFromPool",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"}",
"public",
"boolean",
"isOpaqueCube",
"(",
")",
"{",
"return",
"false",
";",
"}",
"public",
"boolean",
"renderAsNormalBlock",
"(",
")",
"{",
"return",
"false",
";",
"}",
"public",
"int",
"getRenderType",
"(",
")",
"{",
"return",
"8",
";",
"}",
"public",
"boolean",
"canPlaceBlockAt",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"if",
"(",
"par1World",
".",
"isBlockNormalCube",
"(",
"par2",
"-",
"1",
",",
"par3",
",",
"par4",
")",
")",
"{",
"return",
"true",
";",
"}",
"if",
"(",
"par1World",
".",
"isBlockNormalCube",
"(",
"par2",
"+",
"1",
",",
"par3",
",",
"par4",
")",
")",
"{",
"return",
"true",
";",
"}",
"if",
"(",
"par1World",
".",
"isBlockNormalCube",
"(",
"par2",
",",
"par3",
",",
"par4",
"-",
"1",
")",
")",
"{",
"return",
"true",
";",
"}",
"return",
"par1World",
".",
"isBlockNormalCube",
"(",
"par2",
",",
"par3",
",",
"par4",
"+",
"1",
")",
";",
"}",
"public",
"void",
"onBlockPlaced",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
")",
"{",
"int",
"i",
"=",
"par1World",
".",
"getBlockMetadata",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"if",
"(",
"(",
"i",
"==",
"0",
"||",
"par5",
"==",
"2",
")",
"&&",
"par1World",
".",
"isBlockNormalCube",
"(",
"par2",
",",
"par3",
",",
"par4",
"+",
"1",
")",
")",
"{",
"i",
"=",
"2",
";",
"}",
"if",
"(",
"(",
"i",
"==",
"0",
"||",
"par5",
"==",
"3",
")",
"&&",
"par1World",
".",
"isBlockNormalCube",
"(",
"par2",
",",
"par3",
",",
"par4",
"-",
"1",
")",
")",
"{",
"i",
"=",
"3",
";",
"}",
"if",
"(",
"(",
"i",
"==",
"0",
"||",
"par5",
"==",
"4",
")",
"&&",
"par1World",
".",
"isBlockNormalCube",
"(",
"par2",
"+",
"1",
",",
"par3",
",",
"par4",
")",
")",
"{",
"i",
"=",
"4",
";",
"}",
"if",
"(",
"(",
"i",
"==",
"0",
"||",
"par5",
"==",
"5",
")",
"&&",
"par1World",
".",
"isBlockNormalCube",
"(",
"par2",
"-",
"1",
",",
"par3",
",",
"par4",
")",
")",
"{",
"i",
"=",
"5",
";",
"}",
"par1World",
".",
"setBlockMetadataWithNotify",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"i",
")",
";",
"}",
"public",
"void",
"onNeighborBlockChange",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
")",
"{",
"int",
"i",
"=",
"par1World",
".",
"getBlockMetadata",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"boolean",
"flag",
"=",
"false",
";",
"if",
"(",
"i",
"==",
"2",
"&&",
"par1World",
".",
"isBlockNormalCube",
"(",
"par2",
",",
"par3",
",",
"par4",
"+",
"1",
")",
")",
"{",
"flag",
"=",
"true",
";",
"}",
"if",
"(",
"i",
"==",
"3",
"&&",
"par1World",
".",
"isBlockNormalCube",
"(",
"par2",
",",
"par3",
",",
"par4",
"-",
"1",
")",
")",
"{",
"flag",
"=",
"true",
";",
"}",
"if",
"(",
"i",
"==",
"4",
"&&",
"par1World",
".",
"isBlockNormalCube",
"(",
"par2",
"+",
"1",
",",
"par3",
",",
"par4",
")",
")",
"{",
"flag",
"=",
"true",
";",
"}",
"if",
"(",
"i",
"==",
"5",
"&&",
"par1World",
".",
"isBlockNormalCube",
"(",
"par2",
"-",
"1",
",",
"par3",
",",
"par4",
")",
")",
"{",
"flag",
"=",
"true",
";",
"}",
"if",
"(",
"!",
"flag",
")",
"{",
"dropBlockAsItem",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
",",
"i",
",",
"0",
")",
";",
"par1World",
".",
"setBlockWithNotify",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"0",
")",
";",
"}",
"super",
".",
"onNeighborBlockChange",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
",",
"par5",
")",
";",
"}",
"public",
"int",
"quantityDropped",
"(",
"Random",
"par1Random",
")",
"{",
"return",
"1",
";",
"}",
"}",
"</s>"
] |
9,410 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"ArrayList",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"Block",
"{",
"public",
"static",
"final",
"StepSound",
"soundPowderFootstep",
";",
"public",
"static",
"final",
"StepSound",
"soundWoodFootstep",
";",
"public",
"static",
"final",
"StepSound",
"soundGravelFootstep",
";",
"public",
"static",
"final",
"StepSound",
"soundGrassFootstep",
";",
"public",
"static",
"final",
"StepSound",
"soundStoneFootstep",
";",
"public",
"static",
"final",
"StepSound",
"soundMetalFootstep",
";",
"public",
"static",
"final",
"StepSound",
"soundGlassFootstep",
";",
"public",
"static",
"final",
"StepSound",
"soundClothFootstep",
";",
"public",
"static",
"final",
"StepSound",
"soundSandFootstep",
";",
"public",
"static",
"final",
"Block",
"blocksList",
"[",
"]",
";",
"public",
"static",
"final",
"boolean",
"opaqueCubeLookup",
"[",
"]",
";",
"public",
"static",
"final",
"int",
"lightOpacity",
"[",
"]",
";",
"public",
"static",
"final",
"boolean",
"canBlockGrass",
"[",
"]",
";",
"public",
"static",
"final",
"int",
"lightValue",
"[",
"]",
";",
"public",
"static",
"final",
"boolean",
"requiresSelfNotify",
"[",
"]",
";",
"public",
"static",
"boolean",
"useNeighborBrightness",
"[",
"]",
";",
"public",
"static",
"final",
"Block",
"stone",
";",
"public",
"static",
"final",
"BlockGrass",
"grass",
";",
"public",
"static",
"final",
"Block",
"dirt",
";",
"public",
"static",
"final",
"Block",
"cobblestone",
";",
"public",
"static",
"final",
"Block",
"planks",
";",
"public",
"static",
"final",
"Block",
"sapling",
";",
"public",
"static",
"final",
"Block",
"bedrock",
";",
"public",
"static",
"final",
"Block",
"waterMoving",
";",
"public",
"static",
"final",
"Block",
"waterStill",
";",
"public",
"static",
"final",
"Block",
"lavaMoving",
";",
"public",
"static",
"final",
"Block",
"lavaStill",
";",
"public",
"static",
"final",
"Block",
"sand",
";",
"public",
"static",
"final",
"Block",
"gravel",
";",
"public",
"static",
"final",
"Block",
"oreGold",
";",
"public",
"static",
"final",
"Block",
"oreIron",
";",
"public",
"static",
"final",
"Block",
"oreCoal",
";",
"public",
"static",
"final",
"Block",
"wood",
";",
"public",
"static",
"final",
"BlockLeaves",
"leaves",
";",
"public",
"static",
"final",
"Block",
"sponge",
";",
"public",
"static",
"final",
"Block",
"glass",
";",
"public",
"static",
"final",
"Block",
"oreLapis",
";",
"public",
"static",
"final",
"Block",
"blockLapis",
";",
"public",
"static",
"final",
"Block",
"dispenser",
";",
"public",
"static",
"final",
"Block",
"sandStone",
";",
"public",
"static",
"final",
"Block",
"music",
";",
"public",
"static",
"final",
"Block",
"bed",
";",
"public",
"static",
"final",
"Block",
"railPowered",
";",
"public",
"static",
"final",
"Block",
"railDetector",
";",
"public",
"static",
"final",
"Block",
"pistonStickyBase",
";",
"public",
"static",
"final",
"Block",
"web",
";",
"public",
"static",
"final",
"BlockTallGrass",
"tallGrass",
";",
"public",
"static",
"final",
"BlockDeadBush",
"deadBush",
";",
"public",
"static",
"final",
"Block",
"pistonBase",
";",
"public",
"static",
"final",
"BlockPistonExtension",
"pistonExtension",
";",
"public",
"static",
"final",
"Block",
"cloth",
";",
"public",
"static",
"final",
"BlockPistonMoving",
"pistonMoving",
";",
"public",
"static",
"final",
"BlockFlower",
"plantYellow",
";",
"public",
"static",
"final",
"BlockFlower",
"plantRed",
";",
"public",
"static",
"final",
"BlockFlower",
"mushroomBrown",
";",
"public",
"static",
"final",
"BlockFlower",
"mushroomRed",
";",
"public",
"static",
"final",
"Block",
"blockGold",
";",
"public",
"static",
"final",
"Block",
"blockSteel",
";",
"public",
"static",
"final",
"Block",
"stairDouble",
";",
"public",
"static",
"final",
"Block",
"stairSingle",
";",
"public",
"static",
"final",
"Block",
"brick",
";",
"public",
"static",
"final",
"Block",
"tnt",
";",
"public",
"static",
"final",
"Block",
"bookShelf",
";",
"public",
"static",
"final",
"Block",
"cobblestoneMossy",
";",
"public",
"static",
"final",
"Block",
"obsidian",
";",
"public",
"static",
"final",
"Block",
"torchWood",
";",
"public",
"static",
"final",
"BlockFire",
"fire",
";",
"public",
"static",
"final",
"Block",
"mobSpawner",
";",
"public",
"static",
"final",
"Block",
"stairCompactPlanks",
";",
"public",
"static",
"final",
"Block",
"chest",
";",
"public",
"static",
"final",
"Block",
"redstoneWire",
";",
"public",
"static",
"final",
"Block",
"oreDiamond",
";",
"public",
"static",
"final",
"Block",
"blockDiamond",
";",
"public",
"static",
"final",
"Block",
"workbench",
";",
"public",
"static",
"final",
"Block",
"crops",
";",
"public",
"static",
"final",
"Block",
"tilledField",
";",
"public",
"static",
"final",
"Block",
"stoneOvenIdle",
";",
"public",
"static",
"final",
"Block",
"stoneOvenActive",
";",
"public",
"static",
"final",
"Block",
"signPost",
";",
"public",
"static",
"final",
"Block",
"doorWood",
";",
"public",
"static",
"final",
"Block",
"ladder",
";",
"public",
"static",
"final",
"Block",
"rail",
";",
"public",
"static",
"final",
"Block",
"stairCompactCobblestone",
";",
"public",
"static",
"final",
"Block",
"signWall",
";",
"public",
"static",
"final",
"Block",
"lever",
";",
"public",
"static",
"final",
"Block",
"pressurePlateStone",
";",
"public",
"static",
"final",
"Block",
"doorSteel",
";",
"public",
"static",
"final",
"Block",
"pressurePlatePlanks",
";",
"public",
"static",
"final",
"Block",
"oreRedstone",
";",
"public",
"static",
"final",
"Block",
"oreRedstoneGlowing",
";",
"public",
"static",
"final",
"Block",
"torchRedstoneIdle",
";",
"public",
"static",
"final",
"Block",
"torchRedstoneActive",
";",
"public",
"static",
"final",
"Block",
"button",
";",
"public",
"static",
"final",
"Block",
"snow",
";",
"public",
"static",
"final",
"Block",
"ice",
";",
"public",
"static",
"final",
"Block",
"blockSnow",
";",
"public",
"static",
"final",
"Block",
"cactus",
";",
"public",
"static",
"final",
"Block",
"blockClay",
";",
"public",
"static",
"final",
"Block",
"reed",
";",
"public",
"static",
"final",
"Block",
"jukebox",
";",
"public",
"static",
"final",
"Block",
"fence",
";",
"public",
"static",
"final",
"Block",
"pumpkin",
";",
"public",
"static",
"final",
"Block",
"netherrack",
";",
"public",
"static",
"final",
"Block",
"slowSand",
";",
"public",
"static",
"final",
"Block",
"glowStone",
";",
"public",
"static",
"final",
"BlockPortal",
"portal",
";",
"public",
"static",
"final",
"Block",
"pumpkinLantern",
";",
"public",
"static",
"final",
"Block",
"cake",
";",
"public",
"static",
"final",
"Block",
"redstoneRepeaterIdle",
";",
"public",
"static",
"final",
"Block",
"redstoneRepeaterActive",
";",
"public",
"static",
"final",
"Block",
"lockedChest",
";",
"public",
"static",
"final",
"Block",
"trapdoor",
";",
"public",
"static",
"final",
"Block",
"silverfish",
";",
"public",
"static",
"final",
"Block",
"stoneBrick",
";",
"public",
"static",
"final",
"Block",
"mushroomCapBrown",
";",
"public",
"static",
"final",
"Block",
"mushroomCapRed",
";",
"public",
"static",
"final",
"Block",
"fenceIron",
";",
"public",
"static",
"final",
"Block",
"thinGlass",
";",
"public",
"static",
"final",
"Block",
"melon",
";",
"public",
"static",
"final",
"Block",
"pumpkinStem",
";",
"public",
"static",
"final",
"Block",
"melonStem",
";",
"public",
"static",
"final",
"Block",
"vine",
";",
"public",
"static",
"final",
"Block",
"fenceGate",
";",
"public",
"static",
"final",
"Block",
"stairsBrick",
";",
"public",
"static",
"final",
"Block",
"stairsStoneBrickSmooth",
";",
"public",
"static",
"final",
"BlockMycelium",
"mycelium",
";",
"public",
"static",
"final",
"Block",
"waterlily",
";",
"public",
"static",
"final",
"Block",
"netherBrick",
";",
"public",
"static",
"final",
"Block",
"netherFence",
";",
"public",
"static",
"final",
"Block",
"stairsNetherBrick",
";",
"public",
"static",
"final",
"Block",
"netherStalk",
";",
"public",
"static",
"final",
"Block",
"enchantmentTable",
";",
"public",
"static",
"final",
"Block",
"brewingStand",
";",
"public",
"static",
"final",
"Block",
"cauldron",
";",
"public",
"static",
"final",
"Block",
"endPortal",
";",
"public",
"static",
"final",
"Block",
"endPortalFrame",
";",
"public",
"static",
"final",
"Block",
"whiteStone",
";",
"public",
"static",
"final",
"Block",
"dragonEgg",
";",
"public",
"static",
"final",
"Block",
"redstoneLampIdle",
";",
"public",
"static",
"final",
"Block",
"redstoneLampActive",
";",
"public",
"int",
"blockIndexInTexture",
";",
"public",
"final",
"int",
"blockID",
";",
"protected",
"float",
"blockHardness",
";",
"protected",
"float",
"blockResistance",
";",
"protected",
"boolean",
"blockConstructorCalled",
";",
"protected",
"boolean",
"enableStats",
";",
"protected",
"boolean",
"needsRandomTick",
";",
"protected",
"boolean",
"isBlockContainer",
";",
"public",
"double",
"minX",
";",
"public",
"double",
"minY",
";",
"public",
"double",
"minZ",
";",
"public",
"double",
"maxX",
";",
"public",
"double",
"maxY",
";",
"public",
"double",
"maxZ",
";",
"public",
"StepSound",
"stepSound",
";",
"public",
"float",
"blockParticleGravity",
";",
"public",
"final",
"Material",
"blockMaterial",
";",
"public",
"float",
"slipperiness",
";",
"private",
"String",
"blockName",
";",
"protected",
"Block",
"(",
"int",
"par1",
",",
"Material",
"par2Material",
")",
"{",
"blockConstructorCalled",
"=",
"true",
";",
"enableStats",
"=",
"true",
";",
"stepSound",
"=",
"soundPowderFootstep",
";",
"blockParticleGravity",
"=",
"1.0F",
";",
"slipperiness",
"=",
"0.6F",
";",
"if",
"(",
"blocksList",
"[",
"par1",
"]",
"!=",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"(",
"new",
"StringBuilder",
"(",
")",
")",
".",
"append",
"(",
"\"Slot",
"\"",
")",
".",
"append",
"(",
"par1",
")",
".",
"append",
"(",
"\"\"",
")",
".",
"append",
"(",
"blocksList",
"[",
"par1",
"]",
")",
".",
"append",
"(",
"\"\"",
")",
".",
"append",
"(",
"this",
")",
".",
"toString",
"(",
")",
")",
";",
"}",
"else",
"{",
"blockMaterial",
"=",
"par2Material",
";",
"blocksList",
"[",
"par1",
"]",
"=",
"this",
";",
"blockID",
"=",
"par1",
";",
"setBlockBounds",
"(",
"0.0F",
",",
"0.0F",
",",
"0.0F",
",",
"1.0F",
",",
"1.0F",
",",
"1.0F",
")",
";",
"opaqueCubeLookup",
"[",
"par1",
"]",
"=",
"isOpaqueCube",
"(",
")",
";",
"lightOpacity",
"[",
"par1",
"]",
"=",
"isOpaqueCube",
"(",
")",
"?",
"255",
":",
"0",
";",
"canBlockGrass",
"[",
"par1",
"]",
"=",
"!",
"par2Material",
".",
"getCanBlockGrass",
"(",
")",
";",
"return",
";",
"}",
"}",
"protected",
"Block",
"setRequiresSelfNotify",
"(",
")",
"{",
"requiresSelfNotify",
"[",
"blockID",
"]",
"=",
"true",
";",
"return",
"this",
";",
"}",
"protected",
"void",
"initializeBlock",
"(",
")",
"{",
"}",
"protected",
"Block",
"(",
"int",
"par1",
",",
"int",
"par2",
",",
"Material",
"par3Material",
")",
"{",
"this",
"(",
"par1",
",",
"par3Material",
")",
";",
"blockIndexInTexture",
"=",
"par2",
";",
"}",
"protected",
"Block",
"setStepSound",
"(",
"StepSound",
"par1StepSound",
")",
"{",
"stepSound",
"=",
"par1StepSound",
";",
"return",
"this",
";",
"}",
"protected",
"Block",
"setLightOpacity",
"(",
"int",
"par1",
")",
"{",
"lightOpacity",
"[",
"blockID",
"]",
"=",
"par1",
";",
"return",
"this",
";",
"}",
"protected",
"Block",
"setLightValue",
"(",
"float",
"par1",
")",
"{",
"lightValue",
"[",
"blockID",
"]",
"=",
"(",
"int",
")",
"(",
"15F",
"*",
"par1",
")",
";",
"return",
"this",
";",
"}",
"protected",
"Block",
"setResistance",
"(",
"float",
"par1",
")",
"{",
"blockResistance",
"=",
"par1",
"*",
"3F",
";",
"return",
"this",
";",
"}",
"public",
"static",
"boolean",
"isNormalCube",
"(",
"int",
"par0",
")",
"{",
"Block",
"block",
"=",
"blocksList",
"[",
"par0",
"]",
";",
"if",
"(",
"block",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"else",
"{",
"return",
"block",
".",
"blockMaterial",
".",
"isOpaque",
"(",
")",
"&&",
"block",
".",
"renderAsNormalBlock",
"(",
")",
";",
"}",
"}",
"public",
"boolean",
"renderAsNormalBlock",
"(",
")",
"{",
"return",
"true",
";",
"}",
"public",
"boolean",
"getBlocksMovement",
"(",
"IBlockAccess",
"par1IBlockAccess",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"return",
"!",
"blockMaterial",
".",
"blocksMovement",
"(",
")",
";",
"}",
"public",
"int",
"getRenderType",
"(",
")",
"{",
"return",
"0",
";",
"}",
"protected",
"Block",
"setHardness",
"(",
"float",
"par1",
")",
"{",
"blockHardness",
"=",
"par1",
";",
"if",
"(",
"blockResistance",
"<",
"par1",
"*",
"5F",
")",
"{",
"blockResistance",
"=",
"par1",
"*",
"5F",
";",
"}",
"return",
"this",
";",
"}",
"protected",
"Block",
"setBlockUnbreakable",
"(",
")",
"{",
"setHardness",
"(",
"-",
"1F",
")",
";",
"return",
"this",
";",
"}",
"public",
"float",
"getHardness",
"(",
")",
"{",
"return",
"blockHardness",
";",
"}",
"protected",
"Block",
"setTickRandomly",
"(",
"boolean",
"par1",
")",
"{",
"needsRandomTick",
"=",
"par1",
";",
"return",
"this",
";",
"}",
"public",
"boolean",
"getTickRandomly",
"(",
")",
"{",
"return",
"needsRandomTick",
";",
"}",
"public",
"boolean",
"hasTileEntity",
"(",
")",
"{",
"return",
"isBlockContainer",
";",
"}",
"public",
"void",
"setBlockBounds",
"(",
"float",
"par1",
",",
"float",
"par2",
",",
"float",
"par3",
",",
"float",
"par4",
",",
"float",
"par5",
",",
"float",
"par6",
")",
"{",
"minX",
"=",
"par1",
";",
"minY",
"=",
"par2",
";",
"minZ",
"=",
"par3",
";",
"maxX",
"=",
"par4",
";",
"maxY",
"=",
"par5",
";",
"maxZ",
"=",
"par6",
";",
"}",
"public",
"boolean",
"isBlockSolid",
"(",
"IBlockAccess",
"par1IBlockAccess",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
")",
"{",
"return",
"par1IBlockAccess",
".",
"getBlockMaterial",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
".",
"isSolid",
"(",
")",
";",
"}",
"public",
"int",
"getBlockTextureFromSideAndMetadata",
"(",
"int",
"par1",
",",
"int",
"par2",
")",
"{",
"return",
"getBlockTextureFromSide",
"(",
"par1",
")",
";",
"}",
"public",
"int",
"getBlockTextureFromSide",
"(",
"int",
"par1",
")",
"{",
"return",
"blockIndexInTexture",
";",
"}",
"public",
"void",
"getCollidingBoundingBoxes",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"AxisAlignedBB",
"par5AxisAlignedBB",
",",
"ArrayList",
"par6ArrayList",
")",
"{",
"AxisAlignedBB",
"axisalignedbb",
"=",
"getCollisionBoundingBoxFromPool",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"if",
"(",
"axisalignedbb",
"!=",
"null",
"&&",
"par5AxisAlignedBB",
".",
"intersectsWith",
"(",
"axisalignedbb",
")",
")",
"{",
"par6ArrayList",
".",
"add",
"(",
"axisalignedbb",
")",
";",
"}",
"}",
"public",
"AxisAlignedBB",
"getCollisionBoundingBoxFromPool",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"return",
"AxisAlignedBB",
".",
"getBoundingBoxFromPool",
"(",
"(",
"double",
")",
"par2",
"+",
"minX",
",",
"(",
"double",
")",
"par3",
"+",
"minY",
",",
"(",
"double",
")",
"par4",
"+",
"minZ",
",",
"(",
"double",
")",
"par2",
"+",
"maxX",
",",
"(",
"double",
")",
"par3",
"+",
"maxY",
",",
"(",
"double",
")",
"par4",
"+",
"maxZ",
")",
";",
"}",
"public",
"boolean",
"isOpaqueCube",
"(",
")",
"{",
"return",
"true",
";",
"}",
"public",
"boolean",
"canCollideCheck",
"(",
"int",
"par1",
",",
"boolean",
"par2",
")",
"{",
"return",
"isCollidable",
"(",
")",
";",
"}",
"public",
"boolean",
"isCollidable",
"(",
")",
"{",
"return",
"true",
";",
"}",
"public",
"void",
"updateTick",
"(",
"World",
"world",
",",
"int",
"i",
",",
"int",
"j",
",",
"int",
"k",
",",
"Random",
"random",
")",
"{",
"}",
"public",
"void",
"onBlockDestroyedByPlayer",
"(",
"World",
"world",
",",
"int",
"i",
",",
"int",
"j",
",",
"int",
"k",
",",
"int",
"l",
")",
"{",
"}",
"public",
"void",
"onNeighborBlockChange",
"(",
"World",
"world",
",",
"int",
"i",
",",
"int",
"j",
",",
"int",
"k",
",",
"int",
"l",
")",
"{",
"}",
"public",
"int",
"tickRate",
"(",
")",
"{",
"return",
"10",
";",
"}",
"public",
"void",
"onBlockAdded",
"(",
"World",
"world",
",",
"int",
"i",
",",
"int",
"j",
",",
"int",
"k",
")",
"{",
"}",
"public",
"void",
"onBlockRemoval",
"(",
"World",
"world",
",",
"int",
"i",
",",
"int",
"j",
",",
"int",
"k",
")",
"{",
"}",
"public",
"int",
"quantityDropped",
"(",
"Random",
"par1Random",
")",
"{",
"return",
"1",
";",
"}",
"public",
"int",
"idDropped",
"(",
"int",
"par1",
",",
"Random",
"par2Random",
",",
"int",
"par3",
")",
"{",
"return",
"blockID",
";",
"}",
"public",
"float",
"blockStrength",
"(",
"EntityPlayer",
"par1EntityPlayer",
")",
"{",
"if",
"(",
"blockHardness",
"<",
"0.0F",
")",
"{",
"return",
"0.0F",
";",
"}",
"if",
"(",
"!",
"par1EntityPlayer",
".",
"canHarvestBlock",
"(",
"this",
")",
")",
"{",
"return",
"1.0F",
"/",
"blockHardness",
"/",
"100F",
";",
"}",
"else",
"{",
"return",
"par1EntityPlayer",
".",
"getCurrentPlayerStrVsBlock",
"(",
"this",
")",
"/",
"blockHardness",
"/",
"30F",
";",
"}",
"}",
"public",
"final",
"void",
"dropBlockAsItem",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
",",
"int",
"par6",
")",
"{",
"dropBlockAsItemWithChance",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
",",
"par5",
",",
"1.0F",
",",
"par6",
")",
";",
"}",
"public",
"void",
"dropBlockAsItemWithChance",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
",",
"float",
"par6",
",",
"int",
"par7",
")",
"{",
"if",
"(",
"par1World",
".",
"isRemote",
")",
"{",
"return",
";",
"}",
"int",
"i",
"=",
"quantityDroppedWithBonus",
"(",
"par7",
",",
"par1World",
".",
"rand",
")",
";",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
"i",
";",
"j",
"++",
")",
"{",
"if",
"(",
"par1World",
".",
"rand",
".",
"nextFloat",
"(",
")",
">",
"par6",
")",
"{",
"continue",
";",
"}",
"int",
"k",
"=",
"idDropped",
"(",
"par5",
",",
"par1World",
".",
"rand",
",",
"par7",
")",
";",
"if",
"(",
"k",
">",
"0",
")",
"{",
"dropBlockAsItem_do",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
",",
"new",
"ItemStack",
"(",
"k",
",",
"1",
",",
"damageDropped",
"(",
"par5",
")",
")",
")",
";",
"}",
"}",
"}",
"protected",
"void",
"dropBlockAsItem_do",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"ItemStack",
"par5ItemStack",
")",
"{",
"if",
"(",
"par1World",
".",
"isRemote",
")",
"{",
"return",
";",
"}",
"else",
"{",
"float",
"f",
"=",
"0.7F",
";",
"double",
"d",
"=",
"(",
"double",
")",
"(",
"par1World",
".",
"rand",
".",
"nextFloat",
"(",
")",
"*",
"f",
")",
"+",
"(",
"double",
")",
"(",
"1.0F",
"-",
"f",
")",
"*",
"0.5D",
";",
"double",
"d1",
"=",
"(",
"double",
")",
"(",
"par1World",
".",
"rand",
".",
"nextFloat",
"(",
")",
"*",
"f",
")",
"+",
"(",
"double",
")",
"(",
"1.0F",
"-",
"f",
")",
"*",
"0.5D",
";",
"double",
"d2",
"=",
"(",
"double",
")",
"(",
"par1World",
".",
"rand",
".",
"nextFloat",
"(",
")",
"*",
"f",
")",
"+",
"(",
"double",
")",
"(",
"1.0F",
"-",
"f",
")",
"*",
"0.5D",
";",
"EntityItem",
"entityitem",
"=",
"new",
"EntityItem",
"(",
"par1World",
",",
"(",
"double",
")",
"par2",
"+",
"d",
",",
"(",
"double",
")",
"par3",
"+",
"d1",
",",
"(",
"double",
")",
"par4",
"+",
"d2",
",",
"par5ItemStack",
")",
";",
"entityitem",
".",
"delayBeforeCanPickup",
"=",
"10",
";",
"par1World",
".",
"spawnEntityInWorld",
"(",
"entityitem",
")",
";",
"return",
";",
"}",
"}",
"protected",
"int",
"damageDropped",
"(",
"int",
"par1",
")",
"{",
"return",
"0",
";",
"}",
"public",
"float",
"getExplosionResistance",
"(",
"Entity",
"par1Entity",
")",
"{",
"return",
"blockResistance",
"/",
"5F",
";",
"}",
"public",
"MovingObjectPosition",
"collisionRayTrace",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"Vec3D",
"par5Vec3D",
",",
"Vec3D",
"par6Vec3D",
")",
"{",
"setBlockBoundsBasedOnState",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"par5Vec3D",
"=",
"par5Vec3D",
".",
"addVector",
"(",
"-",
"par2",
",",
"-",
"par3",
",",
"-",
"par4",
")",
";",
"par6Vec3D",
"=",
"par6Vec3D",
".",
"addVector",
"(",
"-",
"par2",
",",
"-",
"par3",
",",
"-",
"par4",
")",
";",
"Vec3D",
"vec3d",
"=",
"par5Vec3D",
".",
"getIntermediateWithXValue",
"(",
"par6Vec3D",
",",
"minX",
")",
";",
"Vec3D",
"vec3d1",
"=",
"par5Vec3D",
".",
"getIntermediateWithXValue",
"(",
"par6Vec3D",
",",
"maxX",
")",
";",
"Vec3D",
"vec3d2",
"=",
"par5Vec3D",
".",
"getIntermediateWithYValue",
"(",
"par6Vec3D",
",",
"minY",
")",
";",
"Vec3D",
"vec3d3",
"=",
"par5Vec3D",
".",
"getIntermediateWithYValue",
"(",
"par6Vec3D",
",",
"maxY",
")",
";",
"Vec3D",
"vec3d4",
"=",
"par5Vec3D",
".",
"getIntermediateWithZValue",
"(",
"par6Vec3D",
",",
"minZ",
")",
";",
"Vec3D",
"vec3d5",
"=",
"par5Vec3D",
".",
"getIntermediateWithZValue",
"(",
"par6Vec3D",
",",
"maxZ",
")",
";",
"if",
"(",
"!",
"isVecInsideYZBounds",
"(",
"vec3d",
")",
")",
"{",
"vec3d",
"=",
"null",
";",
"}",
"if",
"(",
"!",
"isVecInsideYZBounds",
"(",
"vec3d1",
")",
")",
"{",
"vec3d1",
"=",
"null",
";",
"}",
"if",
"(",
"!",
"isVecInsideXZBounds",
"(",
"vec3d2",
")",
")",
"{",
"vec3d2",
"=",
"null",
";",
"}",
"if",
"(",
"!",
"isVecInsideXZBounds",
"(",
"vec3d3",
")",
")",
"{",
"vec3d3",
"=",
"null",
";",
"}",
"if",
"(",
"!",
"isVecInsideXYBounds",
"(",
"vec3d4",
")",
")",
"{",
"vec3d4",
"=",
"null",
";",
"}",
"if",
"(",
"!",
"isVecInsideXYBounds",
"(",
"vec3d5",
")",
")",
"{",
"vec3d5",
"=",
"null",
";",
"}",
"Vec3D",
"vec3d6",
"=",
"null",
";",
"if",
"(",
"vec3d",
"!=",
"null",
"&&",
"(",
"vec3d6",
"==",
"null",
"||",
"par5Vec3D",
".",
"distanceTo",
"(",
"vec3d",
")",
"<",
"par5Vec3D",
".",
"distanceTo",
"(",
"vec3d6",
")",
")",
")",
"{",
"vec3d6",
"=",
"vec3d",
";",
"}",
"if",
"(",
"vec3d1",
"!=",
"null",
"&&",
"(",
"vec3d6",
"==",
"null",
"||",
"par5Vec3D",
".",
"distanceTo",
"(",
"vec3d1",
")",
"<",
"par5Vec3D",
".",
"distanceTo",
"(",
"vec3d6",
")",
")",
")",
"{",
"vec3d6",
"=",
"vec3d1",
";",
"}",
"if",
"(",
"vec3d2",
"!=",
"null",
"&&",
"(",
"vec3d6",
"==",
"null",
"||",
"par5Vec3D",
".",
"distanceTo",
"(",
"vec3d2",
")",
"<",
"par5Vec3D",
".",
"distanceTo",
"(",
"vec3d6",
")",
")",
")",
"{",
"vec3d6",
"=",
"vec3d2",
";",
"}",
"if",
"(",
"vec3d3",
"!=",
"null",
"&&",
"(",
"vec3d6",
"==",
"null",
"||",
"par5Vec3D",
".",
"distanceTo",
"(",
"vec3d3",
")",
"<",
"par5Vec3D",
".",
"distanceTo",
"(",
"vec3d6",
")",
")",
")",
"{",
"vec3d6",
"=",
"vec3d3",
";",
"}",
"if",
"(",
"vec3d4",
"!=",
"null",
"&&",
"(",
"vec3d6",
"==",
"null",
"||",
"par5Vec3D",
".",
"distanceTo",
"(",
"vec3d4",
")",
"<",
"par5Vec3D",
".",
"distanceTo",
"(",
"vec3d6",
")",
")",
")",
"{",
"vec3d6",
"=",
"vec3d4",
";",
"}",
"if",
"(",
"vec3d5",
"!=",
"null",
"&&",
"(",
"vec3d6",
"==",
"null",
"||",
"par5Vec3D",
".",
"distanceTo",
"(",
"vec3d5",
")",
"<",
"par5Vec3D",
".",
"distanceTo",
"(",
"vec3d6",
")",
")",
")",
"{",
"vec3d6",
"=",
"vec3d5",
";",
"}",
"if",
"(",
"vec3d6",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"byte",
"byte0",
"=",
"-",
"1",
";",
"if",
"(",
"vec3d6",
"==",
"vec3d",
")",
"{",
"byte0",
"=",
"4",
";",
"}",
"if",
"(",
"vec3d6",
"==",
"vec3d1",
")",
"{",
"byte0",
"=",
"5",
";",
"}",
"if",
"(",
"vec3d6",
"==",
"vec3d2",
")",
"{",
"byte0",
"=",
"0",
";",
"}",
"if",
"(",
"vec3d6",
"==",
"vec3d3",
")",
"{",
"byte0",
"=",
"1",
";",
"}",
"if",
"(",
"vec3d6",
"==",
"vec3d4",
")",
"{",
"byte0",
"=",
"2",
";",
"}",
"if",
"(",
"vec3d6",
"==",
"vec3d5",
")",
"{",
"byte0",
"=",
"3",
";",
"}",
"return",
"new",
"MovingObjectPosition",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"byte0",
",",
"vec3d6",
".",
"addVector",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
")",
";",
"}",
"private",
"boolean",
"isVecInsideYZBounds",
"(",
"Vec3D",
"par1Vec3D",
")",
"{",
"if",
"(",
"par1Vec3D",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"else",
"{",
"return",
"par1Vec3D",
".",
"yCoord",
">=",
"minY",
"&&",
"par1Vec3D",
".",
"yCoord",
"<=",
"maxY",
"&&",
"par1Vec3D",
".",
"zCoord",
">=",
"minZ",
"&&",
"par1Vec3D",
".",
"zCoord",
"<=",
"maxZ",
";",
"}",
"}",
"private",
"boolean",
"isVecInsideXZBounds",
"(",
"Vec3D",
"par1Vec3D",
")",
"{",
"if",
"(",
"par1Vec3D",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"else",
"{",
"return",
"par1Vec3D",
".",
"xCoord",
">=",
"minX",
"&&",
"par1Vec3D",
".",
"xCoord",
"<=",
"maxX",
"&&",
"par1Vec3D",
".",
"zCoord",
">=",
"minZ",
"&&",
"par1Vec3D",
".",
"zCoord",
"<=",
"maxZ",
";",
"}",
"}",
"private",
"boolean",
"isVecInsideXYBounds",
"(",
"Vec3D",
"par1Vec3D",
")",
"{",
"if",
"(",
"par1Vec3D",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"else",
"{",
"return",
"par1Vec3D",
".",
"xCoord",
">=",
"minX",
"&&",
"par1Vec3D",
".",
"xCoord",
"<=",
"maxX",
"&&",
"par1Vec3D",
".",
"yCoord",
">=",
"minY",
"&&",
"par1Vec3D",
".",
"yCoord",
"<=",
"maxY",
";",
"}",
"}",
"public",
"void",
"onBlockDestroyedByExplosion",
"(",
"World",
"world",
",",
"int",
"i",
",",
"int",
"j",
",",
"int",
"k",
")",
"{",
"}",
"public",
"boolean",
"canPlaceBlockOnSide",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
")",
"{",
"return",
"canPlaceBlockAt",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"}",
"public",
"boolean",
"canPlaceBlockAt",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"int",
"i",
"=",
"par1World",
".",
"getBlockId",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"return",
"i",
"==",
"0",
"||",
"blocksList",
"[",
"i",
"]",
".",
"blockMaterial",
".",
"isGroundCover",
"(",
")",
";",
"}",
"public",
"boolean",
"blockActivated",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"i",
",",
"EntityPlayer",
"entityplayer",
")",
"{",
"return",
"false",
";",
"}",
"public",
"void",
"onEntityWalking",
"(",
"World",
"world",
",",
"int",
"i",
",",
"int",
"j",
",",
"int",
"k",
",",
"Entity",
"entity",
")",
"{",
"}",
"public",
"void",
"onBlockPlaced",
"(",
"World",
"world",
",",
"int",
"i",
",",
"int",
"j",
",",
"int",
"k",
",",
"int",
"l",
")",
"{",
"}",
"public",
"void",
"onBlockClicked",
"(",
"World",
"world",
",",
"int",
"i",
",",
"int",
"j",
",",
"int",
"k",
",",
"EntityPlayer",
"entityplayer",
")",
"{",
"}",
"public",
"void",
"velocityToAddToEntity",
"(",
"World",
"world",
",",
"int",
"i",
",",
"int",
"j",
",",
"int",
"k",
",",
"Entity",
"entity",
",",
"Vec3D",
"vec3d",
")",
"{",
"}",
"public",
"void",
"setBlockBoundsBasedOnState",
"(",
"IBlockAccess",
"iblockaccess",
",",
"int",
"i",
",",
"int",
"j",
",",
"int",
"k",
")",
"{",
"}",
"public",
"boolean",
"isPoweringTo",
"(",
"IBlockAccess",
"par1IBlockAccess",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"i",
",",
"int",
"j",
")",
"{",
"return",
"false",
";",
"}",
"public",
"boolean",
"canProvidePower",
"(",
")",
"{",
"return",
"false",
";",
"}",
"public",
"void",
"onEntityCollidedWithBlock",
"(",
"World",
"world",
",",
"int",
"i",
",",
"int",
"j",
",",
"int",
"k",
",",
"Entity",
"entity",
")",
"{",
"}",
"public",
"boolean",
"isIndirectlyPoweringTo",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"i",
",",
"int",
"j",
")",
"{",
"return",
"false",
";",
"}",
"public",
"void",
"setBlockBoundsForItemRender",
"(",
")",
"{",
"}",
"public",
"void",
"harvestBlock",
"(",
"World",
"par1World",
",",
"EntityPlayer",
"par2EntityPlayer",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
",",
"int",
"par6",
")",
"{",
"par2EntityPlayer",
".",
"addStat",
"(",
"StatList",
".",
"mineBlockStatArray",
"[",
"blockID",
"]",
",",
"1",
")",
";",
"par2EntityPlayer",
".",
"addExhaustion",
"(",
"0.025F",
")",
";",
"if",
"(",
"func_50008_h",
"(",
")",
"&&",
"EnchantmentHelper",
".",
"getSilkTouchModifier",
"(",
"par2EntityPlayer",
".",
"inventory",
")",
")",
"{",
"ItemStack",
"itemstack",
"=",
"createStackedBlock",
"(",
"par6",
")",
";",
"if",
"(",
"itemstack",
"!=",
"null",
")",
"{",
"dropBlockAsItem_do",
"(",
"par1World",
",",
"par3",
",",
"par4",
",",
"par5",
",",
"itemstack",
")",
";",
"}",
"}",
"else",
"{",
"int",
"i",
"=",
"EnchantmentHelper",
".",
"getFortuneModifier",
"(",
"par2EntityPlayer",
".",
"inventory",
")",
";",
"dropBlockAsItem",
"(",
"par1World",
",",
"par3",
",",
"par4",
",",
"par5",
",",
"par6",
",",
"i",
")",
";",
"}",
"}",
"protected",
"boolean",
"func_50008_h",
"(",
")",
"{",
"return",
"renderAsNormalBlock",
"(",
")",
"&&",
"!",
"isBlockContainer",
";",
"}",
"protected",
"ItemStack",
"createStackedBlock",
"(",
"int",
"par1",
")",
"{",
"int",
"i",
"=",
"0",
";",
"if",
"(",
"blockID",
">=",
"0",
"&&",
"blockID",
"<",
"Item",
".",
"itemsList",
".",
"length",
"&&",
"Item",
".",
"itemsList",
"[",
"blockID",
"]",
".",
"getHasSubtypes",
"(",
")",
")",
"{",
"i",
"=",
"par1",
";",
"}",
"return",
"new",
"ItemStack",
"(",
"blockID",
",",
"1",
",",
"i",
")",
";",
"}",
"public",
"int",
"quantityDroppedWithBonus",
"(",
"int",
"par1",
",",
"Random",
"par2Random",
")",
"{",
"return",
"quantityDropped",
"(",
"par2Random",
")",
";",
"}",
"public",
"boolean",
"canBlockStay",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"i",
")",
"{",
"return",
"true",
";",
"}",
"public",
"void",
"onBlockPlacedBy",
"(",
"World",
"world",
",",
"int",
"i",
",",
"int",
"j",
",",
"int",
"k",
",",
"EntityLiving",
"entityliving",
")",
"{",
"}",
"public",
"Block",
"setBlockName",
"(",
"String",
"par1Str",
")",
"{",
"blockName",
"=",
"(",
"new",
"StringBuilder",
"(",
")",
")",
".",
"append",
"(",
"\"tile.\"",
")",
".",
"append",
"(",
"par1Str",
")",
".",
"toString",
"(",
")",
";",
"return",
"this",
";",
"}",
"public",
"String",
"translateBlockName",
"(",
")",
"{",
"return",
"StatCollector",
".",
"translateToLocal",
"(",
"(",
"new",
"StringBuilder",
"(",
")",
")",
".",
"append",
"(",
"getBlockName",
"(",
")",
")",
".",
"append",
"(",
"\".name\"",
")",
".",
"toString",
"(",
")",
")",
";",
"}",
"public",
"String",
"getBlockName",
"(",
")",
"{",
"return",
"blockName",
";",
"}",
"public",
"void",
"powerBlock",
"(",
"World",
"world",
",",
"int",
"i",
",",
"int",
"j",
",",
"int",
"k",
",",
"int",
"l",
",",
"int",
"i1",
")",
"{",
"}",
"public",
"boolean",
"getEnableStats",
"(",
")",
"{",
"return",
"enableStats",
";",
"}",
"protected",
"Block",
"disableStats",
"(",
")",
"{",
"enableStats",
"=",
"false",
";",
"return",
"this",
";",
"}",
"public",
"int",
"getMobilityFlag",
"(",
")",
"{",
"return",
"blockMaterial",
".",
"getMaterialMobility",
"(",
")",
";",
"}",
"public",
"void",
"onFallenUpon",
"(",
"World",
"world",
",",
"int",
"i",
",",
"int",
"j",
",",
"int",
"k",
",",
"Entity",
"entity",
",",
"float",
"f",
")",
"{",
"}",
"static",
"{",
"soundPowderFootstep",
"=",
"new",
"StepSound",
"(",
"\"stone\"",
",",
"1.0F",
",",
"1.0F",
")",
";",
"soundWoodFootstep",
"=",
"new",
"StepSound",
"(",
"\"wood\"",
",",
"1.0F",
",",
"1.0F",
")",
";",
"soundGravelFootstep",
"=",
"new",
"StepSound",
"(",
"\"gravel\"",
",",
"1.0F",
",",
"1.0F",
")",
";",
"soundGrassFootstep",
"=",
"new",
"StepSound",
"(",
"\"grass\"",
",",
"1.0F",
",",
"1.0F",
")",
";",
"soundStoneFootstep",
"=",
"new",
"StepSound",
"(",
"\"stone\"",
",",
"1.0F",
",",
"1.0F",
")",
";",
"soundMetalFootstep",
"=",
"new",
"StepSound",
"(",
"\"stone\"",
",",
"1.0F",
",",
"1.5F",
")",
";",
"soundGlassFootstep",
"=",
"new",
"StepSoundStone",
"(",
"\"stone\"",
",",
"1.0F",
",",
"1.0F",
")",
";",
"soundClothFootstep",
"=",
"new",
"StepSound",
"(",
"\"cloth\"",
",",
"1.0F",
",",
"1.0F",
")",
";",
"soundSandFootstep",
"=",
"new",
"StepSoundSand",
"(",
"\"sand\"",
",",
"1.0F",
",",
"1.0F",
")",
";",
"blocksList",
"=",
"new",
"Block",
"[",
"4096",
"]",
";",
"opaqueCubeLookup",
"=",
"new",
"boolean",
"[",
"4096",
"]",
";",
"lightOpacity",
"=",
"new",
"int",
"[",
"4096",
"]",
";",
"canBlockGrass",
"=",
"new",
"boolean",
"[",
"4096",
"]",
";",
"lightValue",
"=",
"new",
"int",
"[",
"4096",
"]",
";",
"requiresSelfNotify",
"=",
"new",
"boolean",
"[",
"4096",
"]",
";",
"useNeighborBrightness",
"=",
"new",
"boolean",
"[",
"4096",
"]",
";",
"stone",
"=",
"(",
"new",
"BlockStone",
"(",
"1",
",",
"1",
")",
")",
".",
"setHardness",
"(",
"1.5F",
")",
".",
"setResistance",
"(",
"10F",
")",
".",
"setStepSound",
"(",
"soundStoneFootstep",
")",
".",
"setBlockName",
"(",
"\"stone\"",
")",
";",
"grass",
"=",
"(",
"BlockGrass",
")",
"(",
"new",
"BlockGrass",
"(",
"2",
")",
")",
".",
"setHardness",
"(",
"0.6F",
")",
".",
"setStepSound",
"(",
"soundGrassFootstep",
")",
".",
"setBlockName",
"(",
"\"grass\"",
")",
";",
"dirt",
"=",
"(",
"new",
"BlockDirt",
"(",
"3",
",",
"2",
")",
")",
".",
"setHardness",
"(",
"0.5F",
")",
".",
"setStepSound",
"(",
"soundGravelFootstep",
")",
".",
"setBlockName",
"(",
"\"dirt\"",
")",
";",
"cobblestone",
"=",
"(",
"new",
"Block",
"(",
"4",
",",
"16",
",",
"Material",
".",
"rock",
")",
")",
".",
"setHardness",
"(",
"2.0F",
")",
".",
"setResistance",
"(",
"10F",
")",
".",
"setStepSound",
"(",
"soundStoneFootstep",
")",
".",
"setBlockName",
"(",
"\"stonebrick\"",
")",
";",
"planks",
"=",
"(",
"new",
"BlockWood",
"(",
"5",
")",
")",
".",
"setHardness",
"(",
"2.0F",
")",
".",
"setResistance",
"(",
"5F",
")",
".",
"setStepSound",
"(",
"soundWoodFootstep",
")",
".",
"setBlockName",
"(",
"\"wood\"",
")",
".",
"setRequiresSelfNotify",
"(",
")",
";",
"sapling",
"=",
"(",
"new",
"BlockSapling",
"(",
"6",
",",
"15",
")",
")",
".",
"setHardness",
"(",
"0.0F",
")",
".",
"setStepSound",
"(",
"soundGrassFootstep",
")",
".",
"setBlockName",
"(",
"\"sapling\"",
")",
".",
"setRequiresSelfNotify",
"(",
")",
";",
"bedrock",
"=",
"(",
"new",
"Block",
"(",
"7",
",",
"17",
",",
"Material",
".",
"rock",
")",
")",
".",
"setBlockUnbreakable",
"(",
")",
".",
"setResistance",
"(",
"6000000F",
")",
".",
"setStepSound",
"(",
"soundStoneFootstep",
")",
".",
"setBlockName",
"(",
"\"bedrock\"",
")",
".",
"disableStats",
"(",
")",
";",
"waterMoving",
"=",
"(",
"new",
"BlockFlowing",
"(",
"8",
",",
"Material",
".",
"water",
")",
")",
".",
"setHardness",
"(",
"100F",
")",
".",
"setLightOpacity",
"(",
"3",
")",
".",
"setBlockName",
"(",
"\"water\"",
")",
".",
"disableStats",
"(",
")",
".",
"setRequiresSelfNotify",
"(",
")",
";",
"waterStill",
"=",
"(",
"new",
"BlockStationary",
"(",
"9",
",",
"Material",
".",
"water",
")",
")",
".",
"setHardness",
"(",
"100F",
")",
".",
"setLightOpacity",
"(",
"3",
")",
".",
"setBlockName",
"(",
"\"water\"",
")",
".",
"disableStats",
"(",
")",
".",
"setRequiresSelfNotify",
"(",
")",
";",
"lavaMoving",
"=",
"(",
"new",
"BlockFlowing",
"(",
"10",
",",
"Material",
".",
"lava",
")",
")",
".",
"setHardness",
"(",
"0.0F",
")",
".",
"setLightValue",
"(",
"1.0F",
")",
".",
"setLightOpacity",
"(",
"255",
")",
".",
"setBlockName",
"(",
"\"lava\"",
")",
".",
"disableStats",
"(",
")",
".",
"setRequiresSelfNotify",
"(",
")",
";",
"lavaStill",
"=",
"(",
"new",
"BlockStationary",
"(",
"11",
",",
"Material",
".",
"lava",
")",
")",
".",
"setHardness",
"(",
"100F",
")",
".",
"setLightValue",
"(",
"1.0F",
")",
".",
"setLightOpacity",
"(",
"255",
")",
".",
"setBlockName",
"(",
"\"lava\"",
")",
".",
"disableStats",
"(",
")",
".",
"setRequiresSelfNotify",
"(",
")",
";",
"sand",
"=",
"(",
"new",
"BlockSand",
"(",
"12",
",",
"18",
")",
")",
".",
"setHardness",
"(",
"0.5F",
")",
".",
"setStepSound",
"(",
"soundSandFootstep",
")",
".",
"setBlockName",
"(",
"\"sand\"",
")",
";",
"gravel",
"=",
"(",
"new",
"BlockGravel",
"(",
"13",
",",
"19",
")",
")",
".",
"setHardness",
"(",
"0.6F",
")",
".",
"setStepSound",
"(",
"soundGravelFootstep",
")",
".",
"setBlockName",
"(",
"\"gravel\"",
")",
";",
"oreGold",
"=",
"(",
"new",
"BlockOre",
"(",
"14",
",",
"32",
")",
")",
".",
"setHardness",
"(",
"3F",
")",
".",
"setResistance",
"(",
"5F",
")",
".",
"setStepSound",
"(",
"soundStoneFootstep",
")",
".",
"setBlockName",
"(",
"\"oreGold\"",
")",
";",
"oreIron",
"=",
"(",
"new",
"BlockOre",
"(",
"15",
",",
"33",
")",
")",
".",
"setHardness",
"(",
"3F",
")",
".",
"setResistance",
"(",
"5F",
")",
".",
"setStepSound",
"(",
"soundStoneFootstep",
")",
".",
"setBlockName",
"(",
"\"oreIron\"",
")",
";",
"oreCoal",
"=",
"(",
"new",
"BlockOre",
"(",
"16",
",",
"34",
")",
")",
".",
"setHardness",
"(",
"3F",
")",
".",
"setResistance",
"(",
"5F",
")",
".",
"setStepSound",
"(",
"soundStoneFootstep",
")",
".",
"setBlockName",
"(",
"\"oreCoal\"",
")",
";",
"wood",
"=",
"(",
"new",
"BlockLog",
"(",
"17",
")",
")",
".",
"setHardness",
"(",
"2.0F",
")",
".",
"setStepSound",
"(",
"soundWoodFootstep",
")",
".",
"setBlockName",
"(",
"\"log\"",
")",
".",
"setRequiresSelfNotify",
"(",
")",
";",
"leaves",
"=",
"(",
"BlockLeaves",
")",
"(",
"new",
"BlockLeaves",
"(",
"18",
",",
"52",
")",
")",
".",
"setHardness",
"(",
"0.2F",
")",
".",
"setLightOpacity",
"(",
"1",
")",
".",
"setStepSound",
"(",
"soundGrassFootstep",
")",
".",
"setBlockName",
"(",
"\"leaves\"",
")",
".",
"setRequiresSelfNotify",
"(",
")",
";",
"sponge",
"=",
"(",
"new",
"BlockSponge",
"(",
"19",
")",
")",
".",
"setHardness",
"(",
"0.6F",
")",
".",
"setStepSound",
"(",
"soundGrassFootstep",
")",
".",
"setBlockName",
"(",
"\"sponge\"",
")",
";",
"glass",
"=",
"(",
"new",
"BlockGlass",
"(",
"20",
",",
"49",
",",
"Material",
".",
"glass",
",",
"false",
")",
")",
".",
"setHardness",
"(",
"0.3F",
")",
".",
"setStepSound",
"(",
"soundGlassFootstep",
")",
".",
"setBlockName",
"(",
"\"glass\"",
")",
";",
"oreLapis",
"=",
"(",
"new",
"BlockOre",
"(",
"21",
",",
"160",
")",
")",
".",
"setHardness",
"(",
"3F",
")",
".",
"setResistance",
"(",
"5F",
")",
".",
"setStepSound",
"(",
"soundStoneFootstep",
")",
".",
"setBlockName",
"(",
"\"oreLapis\"",
")",
";",
"blockLapis",
"=",
"(",
"new",
"Block",
"(",
"22",
",",
"144",
",",
"Material",
".",
"rock",
")",
")",
".",
"setHardness",
"(",
"3F",
")",
".",
"setResistance",
"(",
"5F",
")",
".",
"setStepSound",
"(",
"soundStoneFootstep",
")",
".",
"setBlockName",
"(",
"\"blockLapis\"",
")",
";",
"dispenser",
"=",
"(",
"new",
"BlockDispenser",
"(",
"23",
")",
")",
".",
"setHardness",
"(",
"3.5F",
")",
".",
"setStepSound",
"(",
"soundStoneFootstep",
")",
".",
"setBlockName",
"(",
"\"dispenser\"",
")",
".",
"setRequiresSelfNotify",
"(",
")",
";",
"sandStone",
"=",
"(",
"new",
"BlockSandStone",
"(",
"24",
")",
")",
".",
"setStepSound",
"(",
"soundStoneFootstep",
")",
".",
"setHardness",
"(",
"0.8F",
")",
".",
"setBlockName",
"(",
"\"sandStone\"",
")",
".",
"setRequiresSelfNotify",
"(",
")",
";",
"music",
"=",
"(",
"new",
"BlockNote",
"(",
"25",
")",
")",
".",
"setHardness",
"(",
"0.8F",
")",
".",
"setBlockName",
"(",
"\"musicBlock\"",
")",
".",
"setRequiresSelfNotify",
"(",
")",
";",
"bed",
"=",
"(",
"new",
"BlockBed",
"(",
"26",
")",
")",
".",
"setHardness",
"(",
"0.2F",
")",
".",
"setBlockName",
"(",
"\"bed\"",
")",
".",
"disableStats",
"(",
")",
".",
"setRequiresSelfNotify",
"(",
")",
";",
"railPowered",
"=",
"(",
"new",
"BlockRail",
"(",
"27",
",",
"179",
",",
"true",
")",
")",
".",
"setHardness",
"(",
"0.7F",
")",
".",
"setStepSound",
"(",
"soundMetalFootstep",
")",
".",
"setBlockName",
"(",
"\"goldenRail\"",
")",
".",
"setRequiresSelfNotify",
"(",
")",
";",
"railDetector",
"=",
"(",
"new",
"BlockDetectorRail",
"(",
"28",
",",
"195",
")",
")",
".",
"setHardness",
"(",
"0.7F",
")",
".",
"setStepSound",
"(",
"soundMetalFootstep",
")",
".",
"setBlockName",
"(",
"\"detectorRail\"",
")",
".",
"setRequiresSelfNotify",
"(",
")",
";",
"pistonStickyBase",
"=",
"(",
"new",
"BlockPistonBase",
"(",
"29",
",",
"106",
",",
"true",
")",
")",
".",
"setBlockName",
"(",
"\"\"",
")",
".",
"setRequiresSelfNotify",
"(",
")",
";",
"web",
"=",
"(",
"new",
"BlockWeb",
"(",
"30",
",",
"11",
")",
")",
".",
"setLightOpacity",
"(",
"1",
")",
".",
"setHardness",
"(",
"4F",
")",
".",
"setBlockName",
"(",
"\"web\"",
")",
";",
"tallGrass",
"=",
"(",
"BlockTallGrass",
")",
"(",
"new",
"BlockTallGrass",
"(",
"31",
",",
"39",
")",
")",
".",
"setHardness",
"(",
"0.0F",
")",
".",
"setStepSound",
"(",
"soundGrassFootstep",
")",
".",
"setBlockName",
"(",
"\"tallgrass\"",
")",
";",
"deadBush",
"=",
"(",
"BlockDeadBush",
")",
"(",
"new",
"BlockDeadBush",
"(",
"32",
",",
"55",
")",
")",
".",
"setHardness",
"(",
"0.0F",
")",
".",
"setStepSound",
"(",
"soundGrassFootstep",
")",
".",
"setBlockName",
"(",
"\"deadbush\"",
")",
";",
"pistonBase",
"=",
"(",
"new",
"BlockPistonBase",
"(",
"33",
",",
"107",
",",
"false",
")",
")",
".",
"setBlockName",
"(",
"\"pistonBase\"",
")",
".",
"setRequiresSelfNotify",
"(",
")",
";",
"pistonExtension",
"=",
"(",
"BlockPistonExtension",
")",
"(",
"new",
"BlockPistonExtension",
"(",
"34",
",",
"107",
")",
")",
".",
"setRequiresSelfNotify",
"(",
")",
";",
"cloth",
"=",
"(",
"new",
"BlockCloth",
"(",
")",
")",
".",
"setHardness",
"(",
"0.8F",
")",
".",
"setStepSound",
"(",
"soundClothFootstep",
")",
".",
"setBlockName",
"(",
"\"cloth\"",
")",
".",
"setRequiresSelfNotify",
"(",
")",
";",
"pistonMoving",
"=",
"new",
"BlockPistonMoving",
"(",
"36",
")",
";",
"plantYellow",
"=",
"(",
"BlockFlower",
")",
"(",
"new",
"BlockFlower",
"(",
"37",
",",
"13",
")",
")",
".",
"setHardness",
"(",
"0.0F",
")",
".",
"setStepSound",
"(",
"soundGrassFootstep",
")",
".",
"setBlockName",
"(",
"\"flower\"",
")",
";",
"plantRed",
"=",
"(",
"BlockFlower",
")",
"(",
"new",
"BlockFlower",
"(",
"38",
",",
"12",
")",
")",
".",
"setHardness",
"(",
"0.0F",
")",
".",
"setStepSound",
"(",
"soundGrassFootstep",
")",
".",
"setBlockName",
"(",
"\"rose\"",
")",
";",
"mushroomBrown",
"=",
"(",
"BlockFlower",
")",
"(",
"new",
"BlockMushroom",
"(",
"39",
",",
"29",
")",
")",
".",
"setHardness",
"(",
"0.0F",
")",
".",
"setStepSound",
"(",
"soundGrassFootstep",
")",
".",
"setLightValue",
"(",
"0.125F",
")",
".",
"setBlockName",
"(",
"\"mushroom\"",
")",
";",
"mushroomRed",
"=",
"(",
"BlockFlower",
")",
"(",
"new",
"BlockMushroom",
"(",
"40",
",",
"28",
")",
")",
".",
"setHardness",
"(",
"0.0F",
")",
".",
"setStepSound",
"(",
"soundGrassFootstep",
")",
".",
"setBlockName",
"(",
"\"mushroom\"",
")",
";",
"blockGold",
"=",
"(",
"new",
"BlockOreStorage",
"(",
"41",
",",
"23",
")",
")",
".",
"setHardness",
"(",
"3F",
")",
".",
"setResistance",
"(",
"10F",
")",
".",
"setStepSound",
"(",
"soundMetalFootstep",
")",
".",
"setBlockName",
"(",
"\"blockGold\"",
")",
";",
"blockSteel",
"=",
"(",
"new",
"BlockOreStorage",
"(",
"42",
",",
"22",
")",
")",
".",
"setHardness",
"(",
"5F",
")",
".",
"setResistance",
"(",
"10F",
")",
".",
"setStepSound",
"(",
"soundMetalFootstep",
")",
".",
"setBlockName",
"(",
"\"blockIron\"",
")",
";",
"stairDouble",
"=",
"(",
"new",
"BlockStep",
"(",
"43",
",",
"true",
")",
")",
".",
"setHardness",
"(",
"2.0F",
")",
".",
"setResistance",
"(",
"10F",
")",
".",
"setStepSound",
"(",
"soundStoneFootstep",
")",
".",
"setBlockName",
"(",
"\"stoneSlab\"",
")",
";",
"stairSingle",
"=",
"(",
"new",
"BlockStep",
"(",
"44",
",",
"false",
")",
")",
".",
"setHardness",
"(",
"2.0F",
")",
".",
"setResistance",
"(",
"10F",
")",
".",
"setStepSound",
"(",
"soundStoneFootstep",
")",
".",
"setBlockName",
"(",
"\"stoneSlab\"",
")",
";",
"brick",
"=",
"(",
"new",
"Block",
"(",
"45",
",",
"7",
",",
"Material",
".",
"rock",
")",
")",
".",
"setHardness",
"(",
"2.0F",
")",
".",
"setResistance",
"(",
"10F",
")",
".",
"setStepSound",
"(",
"soundStoneFootstep",
")",
".",
"setBlockName",
"(",
"\"brick\"",
")",
";",
"tnt",
"=",
"(",
"new",
"BlockTNT",
"(",
"46",
",",
"8",
")",
")",
".",
"setHardness",
"(",
"0.0F",
")",
".",
"setStepSound",
"(",
"soundGrassFootstep",
")",
".",
"setBlockName",
"(",
"\"tnt\"",
")",
";",
"bookShelf",
"=",
"(",
"new",
"BlockBookshelf",
"(",
"47",
",",
"35",
")",
")",
".",
"setHardness",
"(",
"1.5F",
")",
".",
"setStepSound",
"(",
"soundWoodFootstep",
")",
".",
"setBlockName",
"(",
"\"bookshelf\"",
")",
";",
"cobblestoneMossy",
"=",
"(",
"new",
"Block",
"(",
"48",
",",
"36",
",",
"Material",
".",
"rock",
")",
")",
".",
"setHardness",
"(",
"2.0F",
")",
".",
"setResistance",
"(",
"10F",
")",
".",
"setStepSound",
"(",
"soundStoneFootstep",
")",
".",
"setBlockName",
"(",
"\"stoneMoss\"",
")",
";",
"obsidian",
"=",
"(",
"new",
"BlockObsidian",
"(",
"49",
",",
"37",
")",
")",
".",
"setHardness",
"(",
"50F",
")",
".",
"setResistance",
"(",
"2000F",
")",
".",
"setStepSound",
"(",
"soundStoneFootstep",
")",
".",
"setBlockName",
"(",
"\"obsidian\"",
")",
";",
"torchWood",
"=",
"(",
"new",
"BlockTorch",
"(",
"50",
",",
"80",
")",
")",
".",
"setHardness",
"(",
"0.0F",
")",
".",
"setLightValue",
"(",
"0.9375F",
")",
".",
"setStepSound",
"(",
"soundWoodFootstep",
")",
".",
"setBlockName",
"(",
"\"torch\"",
")",
".",
"setRequiresSelfNotify",
"(",
")",
";",
"fire",
"=",
"(",
"BlockFire",
")",
"(",
"new",
"BlockFire",
"(",
"51",
",",
"31",
")",
")",
".",
"setHardness",
"(",
"0.0F",
")",
".",
"setLightValue",
"(",
"1.0F",
")",
".",
"setStepSound",
"(",
"soundWoodFootstep",
")",
".",
"setBlockName",
"(",
"\"fire\"",
")",
".",
"disableStats",
"(",
")",
";",
"mobSpawner",
"=",
"(",
"new",
"BlockMobSpawner",
"(",
"52",
",",
"65",
")",
")",
".",
"setHardness",
"(",
"5F",
")",
".",
"setStepSound",
"(",
"soundMetalFootstep",
")",
".",
"setBlockName",
"(",
"\"mobSpawner\"",
")",
".",
"disableStats",
"(",
")",
";",
"stairCompactPlanks",
"=",
"(",
"new",
"BlockStairs",
"(",
"53",
",",
"planks",
")",
")",
".",
"setBlockName",
"(",
"\"stairsWood\"",
")",
".",
"setRequiresSelfNotify",
"(",
")",
";",
"chest",
"=",
"(",
"new",
"BlockChest",
"(",
"54",
")",
")",
".",
"setHardness",
"(",
"2.5F",
")",
".",
"setStepSound",
"(",
"soundWoodFootstep",
")",
".",
"setBlockName",
"(",
"\"chest\"",
")",
".",
"setRequiresSelfNotify",
"(",
")",
";",
"redstoneWire",
"=",
"(",
"new",
"BlockRedstoneWire",
"(",
"55",
",",
"164",
")",
")",
".",
"setHardness",
"(",
"0.0F",
")",
".",
"setStepSound",
"(",
"soundPowderFootstep",
")",
".",
"setBlockName",
"(",
"\"redstoneDust\"",
")",
".",
"disableStats",
"(",
")",
".",
"setRequiresSelfNotify",
"(",
")",
";",
"oreDiamond",
"=",
"(",
"new",
"BlockOre",
"(",
"56",
",",
"50",
")",
")",
".",
"setHardness",
"(",
"3F",
")",
".",
"setResistance",
"(",
"5F",
")",
".",
"setStepSound",
"(",
"soundStoneFootstep",
")",
".",
"setBlockName",
"(",
"\"oreDiamond\"",
")",
";",
"blockDiamond",
"=",
"(",
"new",
"BlockOreStorage",
"(",
"57",
",",
"24",
")",
")",
".",
"setHardness",
"(",
"5F",
")",
".",
"setResistance",
"(",
"10F",
")",
".",
"setStepSound",
"(",
"soundMetalFootstep",
")",
".",
"setBlockName",
"(",
"\"blockDiamond\"",
")",
";",
"workbench",
"=",
"(",
"new",
"BlockWorkbench",
"(",
"58",
")",
")",
".",
"setHardness",
"(",
"2.5F",
")",
".",
"setStepSound",
"(",
"soundWoodFootstep",
")",
".",
"setBlockName",
"(",
"\"workbench\"",
")",
";",
"crops",
"=",
"(",
"new",
"BlockCrops",
"(",
"59",
",",
"88",
")",
")",
".",
"setHardness",
"(",
"0.0F",
")",
".",
"setStepSound",
"(",
"soundGrassFootstep",
")",
".",
"setBlockName",
"(",
"\"crops\"",
")",
".",
"disableStats",
"(",
")",
".",
"setRequiresSelfNotify",
"(",
")",
";",
"tilledField",
"=",
"(",
"new",
"BlockFarmland",
"(",
"60",
")",
")",
".",
"setHardness",
"(",
"0.6F",
")",
".",
"setStepSound",
"(",
"soundGravelFootstep",
")",
".",
"setBlockName",
"(",
"\"farmland\"",
")",
".",
"setRequiresSelfNotify",
"(",
")",
";",
"stoneOvenIdle",
"=",
"(",
"new",
"BlockFurnace",
"(",
"61",
",",
"false",
")",
")",
".",
"setHardness",
"(",
"3.5F",
")",
".",
"setStepSound",
"(",
"soundStoneFootstep",
")",
".",
"setBlockName",
"(",
"\"furnace\"",
")",
".",
"setRequiresSelfNotify",
"(",
")",
";",
"stoneOvenActive",
"=",
"(",
"new",
"BlockFurnace",
"(",
"62",
",",
"true",
")",
")",
".",
"setHardness",
"(",
"3.5F",
")",
".",
"setStepSound",
"(",
"soundStoneFootstep",
")",
".",
"setLightValue",
"(",
"0.875F",
")",
".",
"setBlockName",
"(",
"\"furnace\"",
")",
".",
"setRequiresSelfNotify",
"(",
")",
";",
"signPost",
"=",
"(",
"new",
"BlockSign",
"(",
"63",
",",
"net",
".",
"minecraft",
".",
"src",
".",
"TileEntitySign",
".",
"class",
",",
"true",
")",
")",
".",
"setHardness",
"(",
"1.0F",
")",
".",
"setStepSound",
"(",
"soundWoodFootstep",
")",
".",
"setBlockName",
"(",
"\"sign\"",
")",
".",
"disableStats",
"(",
")",
".",
"setRequiresSelfNotify",
"(",
")",
";",
"doorWood",
"=",
"(",
"new",
"BlockDoor",
"(",
"64",
",",
"Material",
".",
"wood",
")",
")",
".",
"setHardness",
"(",
"3F",
")",
".",
"setStepSound",
"(",
"soundWoodFootstep",
")",
".",
"setBlockName",
"(",
"\"doorWood\"",
")",
".",
"disableStats",
"(",
")",
".",
"setRequiresSelfNotify",
"(",
")",
";",
"ladder",
"=",
"(",
"new",
"BlockLadder",
"(",
"65",
",",
"83",
")",
")",
".",
"setHardness",
"(",
"0.4F",
")",
".",
"setStepSound",
"(",
"soundWoodFootstep",
")",
".",
"setBlockName",
"(",
"\"ladder\"",
")",
".",
"setRequiresSelfNotify",
"(",
")",
";",
"rail",
"=",
"(",
"new",
"BlockRail",
"(",
"66",
",",
"128",
",",
"false",
")",
")",
".",
"setHardness",
"(",
"0.7F",
")",
".",
"setStepSound",
"(",
"soundMetalFootstep",
")",
".",
"setBlockName",
"(",
"\"rail\"",
")",
".",
"setRequiresSelfNotify",
"(",
")",
";",
"stairCompactCobblestone",
"=",
"(",
"new",
"BlockStairs",
"(",
"67",
",",
"cobblestone",
")",
")",
".",
"setBlockName",
"(",
"\"stairsStone\"",
")",
".",
"setRequiresSelfNotify",
"(",
")",
";",
"signWall",
"=",
"(",
"new",
"BlockSign",
"(",
"68",
",",
"net",
".",
"minecraft",
".",
"src",
".",
"TileEntitySign",
".",
"class",
",",
"false",
")",
")",
".",
"setHardness",
"(",
"1.0F",
")",
".",
"setStepSound",
"(",
"soundWoodFootstep",
")",
".",
"setBlockName",
"(",
"\"sign\"",
")",
".",
"disableStats",
"(",
")",
".",
"setRequiresSelfNotify",
"(",
")",
";",
"lever",
"=",
"(",
"new",
"BlockLever",
"(",
"69",
",",
"96",
")",
")",
".",
"setHardness",
"(",
"0.5F",
")",
".",
"setStepSound",
"(",
"soundWoodFootstep",
")",
".",
"setBlockName",
"(",
"\"lever\"",
")",
".",
"setRequiresSelfNotify",
"(",
")",
";",
"pressurePlateStone",
"=",
"(",
"new",
"BlockPressurePlate",
"(",
"70",
",",
"stone",
".",
"blockIndexInTexture",
",",
"EnumMobType",
".",
"mobs",
",",
"Material",
".",
"rock",
")",
")",
".",
"setHardness",
"(",
"0.5F",
")",
".",
"setStepSound",
"(",
"soundStoneFootstep",
")",
".",
"setBlockName",
"(",
"\"\"",
")",
".",
"setRequiresSelfNotify",
"(",
")",
";",
"doorSteel",
"=",
"(",
"new",
"BlockDoor",
"(",
"71",
",",
"Material",
".",
"iron",
")",
")",
".",
"setHardness",
"(",
"5F",
")",
".",
"setStepSound",
"(",
"soundMetalFootstep",
")",
".",
"setBlockName",
"(",
"\"doorIron\"",
")",
".",
"disableStats",
"(",
")",
".",
"setRequiresSelfNotify",
"(",
")",
";",
"pressurePlatePlanks",
"=",
"(",
"new",
"BlockPressurePlate",
"(",
"72",
",",
"planks",
".",
"blockIndexInTexture",
",",
"EnumMobType",
".",
"everything",
",",
"Material",
".",
"wood",
")",
")",
".",
"setHardness",
"(",
"0.5F",
")",
".",
"setStepSound",
"(",
"soundWoodFootstep",
")",
".",
"setBlockName",
"(",
"\"\"",
")",
".",
"setRequiresSelfNotify",
"(",
")",
";",
"oreRedstone",
"=",
"(",
"new",
"BlockRedstoneOre",
"(",
"73",
",",
"51",
",",
"false",
")",
")",
".",
"setHardness",
"(",
"3F",
")",
".",
"setResistance",
"(",
"5F",
")",
".",
"setStepSound",
"(",
"soundStoneFootstep",
")",
".",
"setBlockName",
"(",
"\"oreRedstone\"",
")",
".",
"setRequiresSelfNotify",
"(",
")",
";",
"oreRedstoneGlowing",
"=",
"(",
"new",
"BlockRedstoneOre",
"(",
"74",
",",
"51",
",",
"true",
")",
")",
".",
"setLightValue",
"(",
"0.625F",
")",
".",
"setHardness",
"(",
"3F",
")",
".",
"setResistance",
"(",
"5F",
")",
".",
"setStepSound",
"(",
"soundStoneFootstep",
")",
".",
"setBlockName",
"(",
"\"oreRedstone\"",
")",
".",
"setRequiresSelfNotify",
"(",
")",
";",
"torchRedstoneIdle",
"=",
"(",
"new",
"BlockRedstoneTorch",
"(",
"75",
",",
"115",
",",
"false",
")",
")",
".",
"setHardness",
"(",
"0.0F",
")",
".",
"setStepSound",
"(",
"soundWoodFootstep",
")",
".",
"setBlockName",
"(",
"\"notGate\"",
")",
".",
"setRequiresSelfNotify",
"(",
")",
";",
"torchRedstoneActive",
"=",
"(",
"new",
"BlockRedstoneTorch",
"(",
"76",
",",
"99",
",",
"true",
")",
")",
".",
"setHardness",
"(",
"0.0F",
")",
".",
"setLightValue",
"(",
"0.5F",
")",
".",
"setStepSound",
"(",
"soundWoodFootstep",
")",
".",
"setBlockName",
"(",
"\"notGate\"",
")",
".",
"setRequiresSelfNotify",
"(",
")",
";",
"button",
"=",
"(",
"new",
"BlockButton",
"(",
"77",
",",
"stone",
".",
"blockIndexInTexture",
")",
")",
".",
"setHardness",
"(",
"0.5F",
")",
".",
"setStepSound",
"(",
"soundStoneFootstep",
")",
".",
"setBlockName",
"(",
"\"button\"",
")",
".",
"setRequiresSelfNotify",
"(",
")",
";",
"snow",
"=",
"(",
"new",
"BlockSnow",
"(",
"78",
",",
"66",
")",
")",
".",
"setHardness",
"(",
"0.1F",
")",
".",
"setStepSound",
"(",
"soundClothFootstep",
")",
".",
"setBlockName",
"(",
"\"snow\"",
")",
".",
"setLightOpacity",
"(",
"0",
")",
";",
"ice",
"=",
"(",
"new",
"BlockIce",
"(",
"79",
",",
"67",
")",
")",
".",
"setHardness",
"(",
"0.5F",
")",
".",
"setLightOpacity",
"(",
"3",
")",
".",
"setStepSound",
"(",
"soundGlassFootstep",
")",
".",
"setBlockName",
"(",
"\"ice\"",
")",
";",
"blockSnow",
"=",
"(",
"new",
"BlockSnowBlock",
"(",
"80",
",",
"66",
")",
")",
".",
"setHardness",
"(",
"0.2F",
")",
".",
"setStepSound",
"(",
"soundClothFootstep",
")",
".",
"setBlockName",
"(",
"\"snow\"",
")",
";",
"cactus",
"=",
"(",
"new",
"BlockCactus",
"(",
"81",
",",
"70",
")",
")",
".",
"setHardness",
"(",
"0.4F",
")",
".",
"setStepSound",
"(",
"soundClothFootstep",
")",
".",
"setBlockName",
"(",
"\"cactus\"",
")",
";",
"blockClay",
"=",
"(",
"new",
"BlockClay",
"(",
"82",
",",
"72",
")",
")",
".",
"setHardness",
"(",
"0.6F",
")",
".",
"setStepSound",
"(",
"soundGravelFootstep",
")",
".",
"setBlockName",
"(",
"\"clay\"",
")",
";",
"reed",
"=",
"(",
"new",
"BlockReed",
"(",
"83",
",",
"73",
")",
")",
".",
"setHardness",
"(",
"0.0F",
")",
".",
"setStepSound",
"(",
"soundGrassFootstep",
")",
".",
"setBlockName",
"(",
"\"reeds\"",
")",
".",
"disableStats",
"(",
")",
";",
"jukebox",
"=",
"(",
"new",
"BlockJukeBox",
"(",
"84",
",",
"74",
")",
")",
".",
"setHardness",
"(",
"2.0F",
")",
".",
"setResistance",
"(",
"10F",
")",
".",
"setStepSound",
"(",
"soundStoneFootstep",
")",
".",
"setBlockName",
"(",
"\"jukebox\"",
")",
".",
"setRequiresSelfNotify",
"(",
")",
";",
"fence",
"=",
"(",
"new",
"BlockFence",
"(",
"85",
",",
"4",
")",
")",
".",
"setHardness",
"(",
"2.0F",
")",
".",
"setResistance",
"(",
"5F",
")",
".",
"setStepSound",
"(",
"soundWoodFootstep",
")",
".",
"setBlockName",
"(",
"\"fence\"",
")",
";",
"pumpkin",
"=",
"(",
"new",
"BlockPumpkin",
"(",
"86",
",",
"102",
",",
"false",
")",
")",
".",
"setHardness",
"(",
"1.0F",
")",
".",
"setStepSound",
"(",
"soundWoodFootstep",
")",
".",
"setBlockName",
"(",
"\"pumpkin\"",
")",
".",
"setRequiresSelfNotify",
"(",
")",
";",
"netherrack",
"=",
"(",
"new",
"BlockNetherrack",
"(",
"87",
",",
"103",
")",
")",
".",
"setHardness",
"(",
"0.4F",
")",
".",
"setStepSound",
"(",
"soundStoneFootstep",
")",
".",
"setBlockName",
"(",
"\"hellrock\"",
")",
";",
"slowSand",
"=",
"(",
"new",
"BlockSoulSand",
"(",
"88",
",",
"104",
")",
")",
".",
"setHardness",
"(",
"0.5F",
")",
".",
"setStepSound",
"(",
"soundSandFootstep",
")",
".",
"setBlockName",
"(",
"\"hellsand\"",
")",
";",
"glowStone",
"=",
"(",
"new",
"BlockGlowStone",
"(",
"89",
",",
"105",
",",
"Material",
".",
"glass",
")",
")",
".",
"setHardness",
"(",
"0.3F",
")",
".",
"setStepSound",
"(",
"soundGlassFootstep",
")",
".",
"setLightValue",
"(",
"1.0F",
")",
".",
"setBlockName",
"(",
"\"lightgem\"",
")",
";",
"portal",
"=",
"(",
"BlockPortal",
")",
"(",
"new",
"BlockPortal",
"(",
"90",
",",
"14",
")",
")",
".",
"setHardness",
"(",
"-",
"1F",
")",
".",
"setStepSound",
"(",
"soundGlassFootstep",
")",
".",
"setLightValue",
"(",
"0.75F",
")",
".",
"setBlockName",
"(",
"\"portal\"",
")",
";",
"pumpkinLantern",
"=",
"(",
"new",
"BlockPumpkin",
"(",
"91",
",",
"102",
",",
"true",
")",
")",
".",
"setHardness",
"(",
"1.0F",
")",
".",
"setStepSound",
"(",
"soundWoodFootstep",
")",
".",
"setLightValue",
"(",
"1.0F",
")",
".",
"setBlockName",
"(",
"\"litpumpkin\"",
")",
".",
"setRequiresSelfNotify",
"(",
")",
";",
"cake",
"=",
"(",
"new",
"BlockCake",
"(",
"92",
",",
"121",
")",
")",
".",
"setHardness",
"(",
"0.5F",
")",
".",
"setStepSound",
"(",
"soundClothFootstep",
")",
".",
"setBlockName",
"(",
"\"cake\"",
")",
".",
"disableStats",
"(",
")",
".",
"setRequiresSelfNotify",
"(",
")",
";",
"redstoneRepeaterIdle",
"=",
"(",
"new",
"BlockRedstoneRepeater",
"(",
"93",
",",
"false",
")",
")",
".",
"setHardness",
"(",
"0.0F",
")",
".",
"setStepSound",
"(",
"soundWoodFootstep",
")",
".",
"setBlockName",
"(",
"\"diode\"",
")",
".",
"disableStats",
"(",
")",
".",
"setRequiresSelfNotify",
"(",
")",
";",
"redstoneRepeaterActive",
"=",
"(",
"new",
"BlockRedstoneRepeater",
"(",
"94",
",",
"true",
")",
")",
".",
"setHardness",
"(",
"0.0F",
")",
".",
"setLightValue",
"(",
"0.625F",
")",
".",
"setStepSound",
"(",
"soundWoodFootstep",
")",
".",
"setBlockName",
"(",
"\"diode\"",
")",
".",
"disableStats",
"(",
")",
".",
"setRequiresSelfNotify",
"(",
")",
";",
"lockedChest",
"=",
"(",
"new",
"BlockLockedChest",
"(",
"95",
")",
")",
".",
"setHardness",
"(",
"0.0F",
")",
".",
"setLightValue",
"(",
"1.0F",
")",
".",
"setStepSound",
"(",
"soundWoodFootstep",
")",
".",
"setBlockName",
"(",
"\"lockedchest\"",
")",
".",
"setTickRandomly",
"(",
"true",
")",
".",
"setRequiresSelfNotify",
"(",
")",
";",
"trapdoor",
"=",
"(",
"new",
"BlockTrapDoor",
"(",
"96",
",",
"Material",
".",
"wood",
")",
")",
".",
"setHardness",
"(",
"3F",
")",
".",
"setStepSound",
"(",
"soundWoodFootstep",
")",
".",
"setBlockName",
"(",
"\"trapdoor\"",
")",
".",
"disableStats",
"(",
")",
".",
"setRequiresSelfNotify",
"(",
")",
";",
"silverfish",
"=",
"(",
"new",
"BlockSilverfish",
"(",
"97",
")",
")",
".",
"setHardness",
"(",
"0.75F",
")",
";",
"stoneBrick",
"=",
"(",
"new",
"BlockStoneBrick",
"(",
"98",
")",
")",
".",
"setHardness",
"(",
"1.5F",
")",
".",
"setResistance",
"(",
"10F",
")",
".",
"setStepSound",
"(",
"soundStoneFootstep",
")",
".",
"setBlockName",
"(",
"\"\"",
")",
";",
"mushroomCapBrown",
"=",
"(",
"new",
"BlockMushroomCap",
"(",
"99",
",",
"Material",
".",
"wood",
",",
"142",
",",
"0",
")",
")",
".",
"setHardness",
"(",
"0.2F",
")",
".",
"setStepSound",
"(",
"soundWoodFootstep",
")",
".",
"setBlockName",
"(",
"\"mushroom\"",
")",
".",
"setRequiresSelfNotify",
"(",
")",
";",
"mushroomCapRed",
"=",
"(",
"new",
"BlockMushroomCap",
"(",
"100",
",",
"Material",
".",
"wood",
",",
"142",
",",
"1",
")",
")",
".",
"setHardness",
"(",
"0.2F",
")",
".",
"setStepSound",
"(",
"soundWoodFootstep",
")",
".",
"setBlockName",
"(",
"\"mushroom\"",
")",
".",
"setRequiresSelfNotify",
"(",
")",
";",
"fenceIron",
"=",
"(",
"new",
"BlockPane",
"(",
"101",
",",
"85",
",",
"85",
",",
"Material",
".",
"iron",
",",
"true",
")",
")",
".",
"setHardness",
"(",
"5F",
")",
".",
"setResistance",
"(",
"10F",
")",
".",
"setStepSound",
"(",
"soundMetalFootstep",
")",
".",
"setBlockName",
"(",
"\"fenceIron\"",
")",
";",
"thinGlass",
"=",
"(",
"new",
"BlockPane",
"(",
"102",
",",
"49",
",",
"148",
",",
"Material",
".",
"glass",
",",
"false",
")",
")",
".",
"setHardness",
"(",
"0.3F",
")",
".",
"setStepSound",
"(",
"soundGlassFootstep",
")",
".",
"setBlockName",
"(",
"\"thinGlass\"",
")",
";",
"melon",
"=",
"(",
"new",
"BlockMelon",
"(",
"103",
")",
")",
".",
"setHardness",
"(",
"1.0F",
")",
".",
"setStepSound",
"(",
"soundWoodFootstep",
")",
".",
"setBlockName",
"(",
"\"melon\"",
")",
";",
"pumpkinStem",
"=",
"(",
"new",
"BlockStem",
"(",
"104",
",",
"pumpkin",
")",
")",
".",
"setHardness",
"(",
"0.0F",
")",
".",
"setStepSound",
"(",
"soundWoodFootstep",
")",
".",
"setBlockName",
"(",
"\"pumpkinStem\"",
")",
".",
"setRequiresSelfNotify",
"(",
")",
";",
"melonStem",
"=",
"(",
"new",
"BlockStem",
"(",
"105",
",",
"melon",
")",
")",
".",
"setHardness",
"(",
"0.0F",
")",
".",
"setStepSound",
"(",
"soundWoodFootstep",
")",
".",
"setBlockName",
"(",
"\"pumpkinStem\"",
")",
".",
"setRequiresSelfNotify",
"(",
")",
";",
"vine",
"=",
"(",
"new",
"BlockVine",
"(",
"106",
")",
")",
".",
"setHardness",
"(",
"0.2F",
")",
".",
"setStepSound",
"(",
"soundGrassFootstep",
")",
".",
"setBlockName",
"(",
"\"vine\"",
")",
".",
"setRequiresSelfNotify",
"(",
")",
";",
"fenceGate",
"=",
"(",
"new",
"BlockFenceGate",
"(",
"107",
",",
"4",
")",
")",
".",
"setHardness",
"(",
"2.0F",
")",
".",
"setResistance",
"(",
"5F",
")",
".",
"setStepSound",
"(",
"soundWoodFootstep",
")",
".",
"setBlockName",
"(",
"\"fenceGate\"",
")",
".",
"setRequiresSelfNotify",
"(",
")",
";",
"stairsBrick",
"=",
"(",
"new",
"BlockStairs",
"(",
"108",
",",
"brick",
")",
")",
".",
"setBlockName",
"(",
"\"stairsBrick\"",
")",
".",
"setRequiresSelfNotify",
"(",
")",
";",
"stairsStoneBrickSmooth",
"=",
"(",
"new",
"BlockStairs",
"(",
"109",
",",
"stoneBrick",
")",
")",
".",
"setBlockName",
"(",
"\"\"",
")",
".",
"setRequiresSelfNotify",
"(",
")",
";",
"mycelium",
"=",
"(",
"BlockMycelium",
")",
"(",
"new",
"BlockMycelium",
"(",
"110",
")",
")",
".",
"setHardness",
"(",
"0.6F",
")",
".",
"setStepSound",
"(",
"soundGrassFootstep",
")",
".",
"setBlockName",
"(",
"\"mycel\"",
")",
";",
"waterlily",
"=",
"(",
"new",
"BlockLilyPad",
"(",
"111",
",",
"76",
")",
")",
".",
"setHardness",
"(",
"0.0F",
")",
".",
"setStepSound",
"(",
"soundGrassFootstep",
")",
".",
"setBlockName",
"(",
"\"waterlily\"",
")",
";",
"netherBrick",
"=",
"(",
"new",
"Block",
"(",
"112",
",",
"224",
",",
"Material",
".",
"rock",
")",
")",
".",
"setHardness",
"(",
"2.0F",
")",
".",
"setResistance",
"(",
"10F",
")",
".",
"setStepSound",
"(",
"soundStoneFootstep",
")",
".",
"setBlockName",
"(",
"\"netherBrick\"",
")",
";",
"netherFence",
"=",
"(",
"new",
"BlockFence",
"(",
"113",
",",
"224",
",",
"Material",
".",
"rock",
")",
")",
".",
"setHardness",
"(",
"2.0F",
")",
".",
"setResistance",
"(",
"10F",
")",
".",
"setStepSound",
"(",
"soundStoneFootstep",
")",
".",
"setBlockName",
"(",
"\"netherFence\"",
")",
";",
"stairsNetherBrick",
"=",
"(",
"new",
"BlockStairs",
"(",
"114",
",",
"netherBrick",
")",
")",
".",
"setBlockName",
"(",
"\"\"",
")",
".",
"setRequiresSelfNotify",
"(",
")",
";",
"netherStalk",
"=",
"(",
"new",
"BlockNetherStalk",
"(",
"115",
")",
")",
".",
"setBlockName",
"(",
"\"netherStalk\"",
")",
".",
"setRequiresSelfNotify",
"(",
")",
";",
"enchantmentTable",
"=",
"(",
"new",
"BlockEnchantmentTable",
"(",
"116",
")",
")",
".",
"setHardness",
"(",
"5F",
")",
".",
"setResistance",
"(",
"2000F",
")",
".",
"setBlockName",
"(",
"\"\"",
")",
";",
"brewingStand",
"=",
"(",
"new",
"BlockBrewingStand",
"(",
"117",
")",
")",
".",
"setHardness",
"(",
"0.5F",
")",
".",
"setLightValue",
"(",
"0.125F",
")",
".",
"setBlockName",
"(",
"\"brewingStand\"",
")",
".",
"setRequiresSelfNotify",
"(",
")",
";",
"cauldron",
"=",
"(",
"new",
"BlockCauldron",
"(",
"118",
")",
")",
".",
"setHardness",
"(",
"2.0F",
")",
".",
"setBlockName",
"(",
"\"cauldron\"",
")",
".",
"setRequiresSelfNotify",
"(",
")",
";",
"endPortal",
"=",
"(",
"new",
"BlockEndPortal",
"(",
"119",
",",
"Material",
".",
"portal",
")",
")",
".",
"setHardness",
"(",
"-",
"1F",
")",
".",
"setResistance",
"(",
"6000000F",
")",
";",
"endPortalFrame",
"=",
"(",
"new",
"BlockEndPortalFrame",
"(",
"120",
")",
")",
".",
"setStepSound",
"(",
"soundGlassFootstep",
")",
".",
"setLightValue",
"(",
"0.125F",
")",
".",
"setHardness",
"(",
"-",
"1F",
")",
".",
"setBlockName",
"(",
"\"\"",
")",
".",
"setRequiresSelfNotify",
"(",
")",
".",
"setResistance",
"(",
"6000000F",
")",
";",
"whiteStone",
"=",
"(",
"new",
"Block",
"(",
"121",
",",
"175",
",",
"Material",
".",
"rock",
")",
")",
".",
"setHardness",
"(",
"3F",
")",
".",
"setResistance",
"(",
"15F",
")",
".",
"setStepSound",
"(",
"soundStoneFootstep",
")",
".",
"setBlockName",
"(",
"\"whiteStone\"",
")",
";",
"dragonEgg",
"=",
"(",
"new",
"BlockDragonEgg",
"(",
"122",
",",
"167",
")",
")",
".",
"setHardness",
"(",
"3F",
")",
".",
"setResistance",
"(",
"15F",
")",
".",
"setStepSound",
"(",
"soundStoneFootstep",
")",
".",
"setLightValue",
"(",
"0.125F",
")",
".",
"setBlockName",
"(",
"\"dragonEgg\"",
")",
";",
"redstoneLampIdle",
"=",
"(",
"new",
"BlockRedstoneLight",
"(",
"123",
",",
"false",
")",
")",
".",
"setHardness",
"(",
"0.3F",
")",
".",
"setStepSound",
"(",
"soundGlassFootstep",
")",
".",
"setBlockName",
"(",
"\"\"",
")",
";",
"redstoneLampActive",
"=",
"(",
"new",
"BlockRedstoneLight",
"(",
"124",
",",
"true",
")",
")",
".",
"setHardness",
"(",
"0.3F",
")",
".",
"setStepSound",
"(",
"soundGlassFootstep",
")",
".",
"setBlockName",
"(",
"\"\"",
")",
";",
"Item",
".",
"itemsList",
"[",
"cloth",
".",
"blockID",
"]",
"=",
"(",
"new",
"ItemCloth",
"(",
"cloth",
".",
"blockID",
"-",
"256",
")",
")",
".",
"setItemName",
"(",
"\"cloth\"",
")",
";",
"Item",
".",
"itemsList",
"[",
"wood",
".",
"blockID",
"]",
"=",
"(",
"new",
"ItemMetadata",
"(",
"wood",
".",
"blockID",
"-",
"256",
",",
"wood",
")",
")",
".",
"setItemName",
"(",
"\"log\"",
")",
";",
"Item",
".",
"itemsList",
"[",
"planks",
".",
"blockID",
"]",
"=",
"(",
"new",
"ItemMetadata",
"(",
"planks",
".",
"blockID",
"-",
"256",
",",
"planks",
")",
")",
".",
"setItemName",
"(",
"\"wood\"",
")",
";",
"Item",
".",
"itemsList",
"[",
"stoneBrick",
".",
"blockID",
"]",
"=",
"(",
"new",
"ItemMetadata",
"(",
"stoneBrick",
".",
"blockID",
"-",
"256",
",",
"stoneBrick",
")",
")",
".",
"setItemName",
"(",
"\"\"",
")",
";",
"Item",
".",
"itemsList",
"[",
"sandStone",
".",
"blockID",
"]",
"=",
"(",
"new",
"ItemMetadata",
"(",
"sandStone",
".",
"blockID",
"-",
"256",
",",
"sandStone",
")",
")",
".",
"setItemName",
"(",
"\"sandStone\"",
")",
";",
"Item",
".",
"itemsList",
"[",
"stairSingle",
".",
"blockID",
"]",
"=",
"(",
"new",
"ItemSlab",
"(",
"stairSingle",
".",
"blockID",
"-",
"256",
")",
")",
".",
"setItemName",
"(",
"\"stoneSlab\"",
")",
";",
"Item",
".",
"itemsList",
"[",
"sapling",
".",
"blockID",
"]",
"=",
"(",
"new",
"ItemSapling",
"(",
"sapling",
".",
"blockID",
"-",
"256",
")",
")",
".",
"setItemName",
"(",
"\"sapling\"",
")",
";",
"Item",
".",
"itemsList",
"[",
"leaves",
".",
"blockID",
"]",
"=",
"(",
"new",
"ItemLeaves",
"(",
"leaves",
".",
"blockID",
"-",
"256",
")",
")",
".",
"setItemName",
"(",
"\"leaves\"",
")",
";",
"Item",
".",
"itemsList",
"[",
"vine",
".",
"blockID",
"]",
"=",
"new",
"ItemColored",
"(",
"vine",
".",
"blockID",
"-",
"256",
",",
"false",
")",
";",
"Item",
".",
"itemsList",
"[",
"tallGrass",
".",
"blockID",
"]",
"=",
"(",
"new",
"ItemColored",
"(",
"tallGrass",
".",
"blockID",
"-",
"256",
",",
"true",
")",
")",
".",
"setBlockNames",
"(",
"new",
"String",
"[",
"]",
"{",
"\"shrub\"",
",",
"\"grass\"",
",",
"\"fern\"",
"}",
")",
";",
"Item",
".",
"itemsList",
"[",
"waterlily",
".",
"blockID",
"]",
"=",
"new",
"ItemLilyPad",
"(",
"waterlily",
".",
"blockID",
"-",
"256",
")",
";",
"Item",
".",
"itemsList",
"[",
"pistonBase",
".",
"blockID",
"]",
"=",
"new",
"ItemPiston",
"(",
"pistonBase",
".",
"blockID",
"-",
"256",
")",
";",
"Item",
".",
"itemsList",
"[",
"pistonStickyBase",
".",
"blockID",
"]",
"=",
"new",
"ItemPiston",
"(",
"pistonStickyBase",
".",
"blockID",
"-",
"256",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"256",
";",
"i",
"++",
")",
"{",
"if",
"(",
"blocksList",
"[",
"i",
"]",
"==",
"null",
")",
"{",
"continue",
";",
"}",
"if",
"(",
"Item",
".",
"itemsList",
"[",
"i",
"]",
"==",
"null",
")",
"{",
"Item",
".",
"itemsList",
"[",
"i",
"]",
"=",
"new",
"ItemBlock",
"(",
"i",
"-",
"256",
")",
";",
"blocksList",
"[",
"i",
"]",
".",
"initializeBlock",
"(",
")",
";",
"}",
"boolean",
"flag",
"=",
"false",
";",
"if",
"(",
"i",
">",
"0",
"&&",
"blocksList",
"[",
"i",
"]",
".",
"getRenderType",
"(",
")",
"==",
"10",
")",
"{",
"flag",
"=",
"true",
";",
"}",
"if",
"(",
"i",
">",
"0",
"&&",
"(",
"blocksList",
"[",
"i",
"]",
"instanceof",
"BlockStep",
")",
")",
"{",
"flag",
"=",
"true",
";",
"}",
"if",
"(",
"i",
"==",
"tilledField",
".",
"blockID",
")",
"{",
"flag",
"=",
"true",
";",
"}",
"if",
"(",
"canBlockGrass",
"[",
"i",
"]",
")",
"{",
"flag",
"=",
"true",
";",
"}",
"useNeighborBrightness",
"[",
"i",
"]",
"=",
"flag",
";",
"}",
"canBlockGrass",
"[",
"0",
"]",
"=",
"true",
";",
"StatList",
".",
"initBreakableStats",
"(",
")",
";",
"}",
"}",
"</s>"
] |
9,411 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"class",
"GenLayerVoronoiZoom",
"extends",
"GenLayer",
"{",
"public",
"GenLayerVoronoiZoom",
"(",
"long",
"par1",
",",
"GenLayer",
"par3GenLayer",
")",
"{",
"super",
"(",
"par1",
")",
";",
"super",
".",
"parent",
"=",
"par3GenLayer",
";",
"}",
"public",
"int",
"[",
"]",
"getInts",
"(",
"int",
"par1",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"par1",
"-=",
"2",
";",
"par2",
"-=",
"2",
";",
"byte",
"byte0",
"=",
"2",
";",
"int",
"i",
"=",
"1",
"<<",
"byte0",
";",
"int",
"j",
"=",
"par1",
">>",
"byte0",
";",
"int",
"k",
"=",
"par2",
">>",
"byte0",
";",
"int",
"l",
"=",
"(",
"par3",
">>",
"byte0",
")",
"+",
"3",
";",
"int",
"i1",
"=",
"(",
"par4",
">>",
"byte0",
")",
"+",
"3",
";",
"int",
"ai",
"[",
"]",
"=",
"parent",
".",
"getInts",
"(",
"j",
",",
"k",
",",
"l",
",",
"i1",
")",
";",
"int",
"j1",
"=",
"l",
"<<",
"byte0",
";",
"int",
"k1",
"=",
"i1",
"<<",
"byte0",
";",
"int",
"ai1",
"[",
"]",
"=",
"IntCache",
".",
"getIntCache",
"(",
"j1",
"*",
"k1",
")",
";",
"for",
"(",
"int",
"l1",
"=",
"0",
";",
"l1",
"<",
"i1",
"-",
"1",
";",
"l1",
"++",
")",
"{",
"int",
"i2",
"=",
"ai",
"[",
"0",
"+",
"(",
"l1",
"+",
"0",
")",
"*",
"l",
"]",
";",
"int",
"k2",
"=",
"ai",
"[",
"0",
"+",
"(",
"l1",
"+",
"1",
")",
"*",
"l",
"]",
";",
"for",
"(",
"int",
"l2",
"=",
"0",
";",
"l2",
"<",
"l",
"-",
"1",
";",
"l2",
"++",
")",
"{",
"double",
"d",
"=",
"(",
"double",
")",
"i",
"*",
"0.90000000000000002D",
";",
"initChunkSeed",
"(",
"l2",
"+",
"j",
"<<",
"byte0",
",",
"l1",
"+",
"k",
"<<",
"byte0",
")",
";",
"double",
"d1",
"=",
"(",
"(",
"double",
")",
"nextInt",
"(",
"1024",
")",
"/",
"1024D",
"-",
"0.5D",
")",
"*",
"d",
";",
"double",
"d2",
"=",
"(",
"(",
"double",
")",
"nextInt",
"(",
"1024",
")",
"/",
"1024D",
"-",
"0.5D",
")",
"*",
"d",
";",
"initChunkSeed",
"(",
"l2",
"+",
"j",
"+",
"1",
"<<",
"byte0",
",",
"l1",
"+",
"k",
"<<",
"byte0",
")",
";",
"double",
"d3",
"=",
"(",
"(",
"double",
")",
"nextInt",
"(",
"1024",
")",
"/",
"1024D",
"-",
"0.5D",
")",
"*",
"d",
"+",
"(",
"double",
")",
"i",
";",
"double",
"d4",
"=",
"(",
"(",
"double",
")",
"nextInt",
"(",
"1024",
")",
"/",
"1024D",
"-",
"0.5D",
")",
"*",
"d",
";",
"initChunkSeed",
"(",
"l2",
"+",
"j",
"<<",
"byte0",
",",
"l1",
"+",
"k",
"+",
"1",
"<<",
"byte0",
")",
";",
"double",
"d5",
"=",
"(",
"(",
"double",
")",
"nextInt",
"(",
"1024",
")",
"/",
"1024D",
"-",
"0.5D",
")",
"*",
"d",
";",
"double",
"d6",
"=",
"(",
"(",
"double",
")",
"nextInt",
"(",
"1024",
")",
"/",
"1024D",
"-",
"0.5D",
")",
"*",
"d",
"+",
"(",
"double",
")",
"i",
";",
"initChunkSeed",
"(",
"l2",
"+",
"j",
"+",
"1",
"<<",
"byte0",
",",
"l1",
"+",
"k",
"+",
"1",
"<<",
"byte0",
")",
";",
"double",
"d7",
"=",
"(",
"(",
"double",
")",
"nextInt",
"(",
"1024",
")",
"/",
"1024D",
"-",
"0.5D",
")",
"*",
"d",
"+",
"(",
"double",
")",
"i",
";",
"double",
"d8",
"=",
"(",
"(",
"double",
")",
"nextInt",
"(",
"1024",
")",
"/",
"1024D",
"-",
"0.5D",
")",
"*",
"d",
"+",
"(",
"double",
")",
"i",
";",
"int",
"i3",
"=",
"ai",
"[",
"l2",
"+",
"1",
"+",
"(",
"l1",
"+",
"0",
")",
"*",
"l",
"]",
";",
"int",
"j3",
"=",
"ai",
"[",
"l2",
"+",
"1",
"+",
"(",
"l1",
"+",
"1",
")",
"*",
"l",
"]",
";",
"for",
"(",
"int",
"k3",
"=",
"0",
";",
"k3",
"<",
"i",
";",
"k3",
"++",
")",
"{",
"int",
"l3",
"=",
"(",
"(",
"l1",
"<<",
"byte0",
")",
"+",
"k3",
")",
"*",
"j1",
"+",
"(",
"l2",
"<<",
"byte0",
")",
";",
"for",
"(",
"int",
"i4",
"=",
"0",
";",
"i4",
"<",
"i",
";",
"i4",
"++",
")",
"{",
"double",
"d9",
"=",
"(",
"(",
"double",
")",
"k3",
"-",
"d2",
")",
"*",
"(",
"(",
"double",
")",
"k3",
"-",
"d2",
")",
"+",
"(",
"(",
"double",
")",
"i4",
"-",
"d1",
")",
"*",
"(",
"(",
"double",
")",
"i4",
"-",
"d1",
")",
";",
"double",
"d10",
"=",
"(",
"(",
"double",
")",
"k3",
"-",
"d4",
")",
"*",
"(",
"(",
"double",
")",
"k3",
"-",
"d4",
")",
"+",
"(",
"(",
"double",
")",
"i4",
"-",
"d3",
")",
"*",
"(",
"(",
"double",
")",
"i4",
"-",
"d3",
")",
";",
"double",
"d11",
"=",
"(",
"(",
"double",
")",
"k3",
"-",
"d6",
")",
"*",
"(",
"(",
"double",
")",
"k3",
"-",
"d6",
")",
"+",
"(",
"(",
"double",
")",
"i4",
"-",
"d5",
")",
"*",
"(",
"(",
"double",
")",
"i4",
"-",
"d5",
")",
";",
"double",
"d12",
"=",
"(",
"(",
"double",
")",
"k3",
"-",
"d8",
")",
"*",
"(",
"(",
"double",
")",
"k3",
"-",
"d8",
")",
"+",
"(",
"(",
"double",
")",
"i4",
"-",
"d7",
")",
"*",
"(",
"(",
"double",
")",
"i4",
"-",
"d7",
")",
";",
"if",
"(",
"d9",
"<",
"d10",
"&&",
"d9",
"<",
"d11",
"&&",
"d9",
"<",
"d12",
")",
"{",
"ai1",
"[",
"l3",
"++",
"]",
"=",
"i2",
";",
"continue",
";",
"}",
"if",
"(",
"d10",
"<",
"d9",
"&&",
"d10",
"<",
"d11",
"&&",
"d10",
"<",
"d12",
")",
"{",
"ai1",
"[",
"l3",
"++",
"]",
"=",
"i3",
";",
"continue",
";",
"}",
"if",
"(",
"d11",
"<",
"d9",
"&&",
"d11",
"<",
"d10",
"&&",
"d11",
"<",
"d12",
")",
"{",
"ai1",
"[",
"l3",
"++",
"]",
"=",
"k2",
";",
"}",
"else",
"{",
"ai1",
"[",
"l3",
"++",
"]",
"=",
"j3",
";",
"}",
"}",
"}",
"i2",
"=",
"i3",
";",
"k2",
"=",
"j3",
";",
"}",
"}",
"int",
"ai2",
"[",
"]",
"=",
"IntCache",
".",
"getIntCache",
"(",
"par3",
"*",
"par4",
")",
";",
"for",
"(",
"int",
"j2",
"=",
"0",
";",
"j2",
"<",
"par4",
";",
"j2",
"++",
")",
"{",
"System",
".",
"arraycopy",
"(",
"ai1",
",",
"(",
"j2",
"+",
"(",
"par2",
"&",
"i",
"-",
"1",
")",
")",
"*",
"(",
"l",
"<<",
"byte0",
")",
"+",
"(",
"par1",
"&",
"i",
"-",
"1",
")",
",",
"ai2",
",",
"j2",
"*",
"par3",
",",
"par3",
")",
";",
"}",
"return",
"ai2",
";",
"}",
"}",
"</s>"
] |
9,412 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"io",
".",
"*",
";",
"public",
"class",
"Packet23VehicleSpawn",
"extends",
"Packet",
"{",
"public",
"int",
"entityId",
";",
"public",
"int",
"xPosition",
";",
"public",
"int",
"yPosition",
";",
"public",
"int",
"zPosition",
";",
"public",
"int",
"speedX",
";",
"public",
"int",
"speedY",
";",
"public",
"int",
"speedZ",
";",
"public",
"int",
"type",
";",
"public",
"int",
"throwerEntityId",
";",
"public",
"Packet23VehicleSpawn",
"(",
")",
"{",
"}",
"public",
"Packet23VehicleSpawn",
"(",
"Entity",
"par1Entity",
",",
"int",
"par2",
")",
"{",
"this",
"(",
"par1Entity",
",",
"par2",
",",
"0",
")",
";",
"}",
"public",
"Packet23VehicleSpawn",
"(",
"Entity",
"par1Entity",
",",
"int",
"par2",
",",
"int",
"par3",
")",
"{",
"entityId",
"=",
"par1Entity",
".",
"entityId",
";",
"xPosition",
"=",
"MathHelper",
".",
"floor_double",
"(",
"par1Entity",
".",
"posX",
"*",
"32D",
")",
";",
"yPosition",
"=",
"MathHelper",
".",
"floor_double",
"(",
"par1Entity",
".",
"posY",
"*",
"32D",
")",
";",
"zPosition",
"=",
"MathHelper",
".",
"floor_double",
"(",
"par1Entity",
".",
"posZ",
"*",
"32D",
")",
";",
"type",
"=",
"par2",
";",
"throwerEntityId",
"=",
"par3",
";",
"if",
"(",
"par3",
">",
"0",
")",
"{",
"double",
"d",
"=",
"par1Entity",
".",
"motionX",
";",
"double",
"d1",
"=",
"par1Entity",
".",
"motionY",
";",
"double",
"d2",
"=",
"par1Entity",
".",
"motionZ",
";",
"double",
"d3",
"=",
"3.8999999999999999D",
";",
"if",
"(",
"d",
"<",
"-",
"d3",
")",
"{",
"d",
"=",
"-",
"d3",
";",
"}",
"if",
"(",
"d1",
"<",
"-",
"d3",
")",
"{",
"d1",
"=",
"-",
"d3",
";",
"}",
"if",
"(",
"d2",
"<",
"-",
"d3",
")",
"{",
"d2",
"=",
"-",
"d3",
";",
"}",
"if",
"(",
"d",
">",
"d3",
")",
"{",
"d",
"=",
"d3",
";",
"}",
"if",
"(",
"d1",
">",
"d3",
")",
"{",
"d1",
"=",
"d3",
";",
"}",
"if",
"(",
"d2",
">",
"d3",
")",
"{",
"d2",
"=",
"d3",
";",
"}",
"speedX",
"=",
"(",
"int",
")",
"(",
"d",
"*",
"8000D",
")",
";",
"speedY",
"=",
"(",
"int",
")",
"(",
"d1",
"*",
"8000D",
")",
";",
"speedZ",
"=",
"(",
"int",
")",
"(",
"d2",
"*",
"8000D",
")",
";",
"}",
"}",
"public",
"void",
"readPacketData",
"(",
"DataInputStream",
"par1DataInputStream",
")",
"throws",
"IOException",
"{",
"entityId",
"=",
"par1DataInputStream",
".",
"readInt",
"(",
")",
";",
"type",
"=",
"par1DataInputStream",
".",
"readByte",
"(",
")",
";",
"xPosition",
"=",
"par1DataInputStream",
".",
"readInt",
"(",
")",
";",
"yPosition",
"=",
"par1DataInputStream",
".",
"readInt",
"(",
")",
";",
"zPosition",
"=",
"par1DataInputStream",
".",
"readInt",
"(",
")",
";",
"throwerEntityId",
"=",
"par1DataInputStream",
".",
"readInt",
"(",
")",
";",
"if",
"(",
"throwerEntityId",
">",
"0",
")",
"{",
"speedX",
"=",
"par1DataInputStream",
".",
"readShort",
"(",
")",
";",
"speedY",
"=",
"par1DataInputStream",
".",
"readShort",
"(",
")",
";",
"speedZ",
"=",
"par1DataInputStream",
".",
"readShort",
"(",
")",
";",
"}",
"}",
"public",
"void",
"writePacketData",
"(",
"DataOutputStream",
"par1DataOutputStream",
")",
"throws",
"IOException",
"{",
"par1DataOutputStream",
".",
"writeInt",
"(",
"entityId",
")",
";",
"par1DataOutputStream",
".",
"writeByte",
"(",
"type",
")",
";",
"par1DataOutputStream",
".",
"writeInt",
"(",
"xPosition",
")",
";",
"par1DataOutputStream",
".",
"writeInt",
"(",
"yPosition",
")",
";",
"par1DataOutputStream",
".",
"writeInt",
"(",
"zPosition",
")",
";",
"par1DataOutputStream",
".",
"writeInt",
"(",
"throwerEntityId",
")",
";",
"if",
"(",
"throwerEntityId",
">",
"0",
")",
"{",
"par1DataOutputStream",
".",
"writeShort",
"(",
"speedX",
")",
";",
"par1DataOutputStream",
".",
"writeShort",
"(",
"speedY",
")",
";",
"par1DataOutputStream",
".",
"writeShort",
"(",
"speedZ",
")",
";",
"}",
"}",
"public",
"void",
"processPacket",
"(",
"NetHandler",
"par1NetHandler",
")",
"{",
"par1NetHandler",
".",
"handleVehicleSpawn",
"(",
"this",
")",
";",
"}",
"public",
"int",
"getPacketSize",
"(",
")",
"{",
"return",
"21",
"+",
"throwerEntityId",
"<=",
"0",
"?",
"0",
":",
"6",
";",
"}",
"}",
"</s>"
] |
9,413 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"abstract",
"class",
"BlockFluid",
"extends",
"Block",
"{",
"protected",
"BlockFluid",
"(",
"int",
"par1",
",",
"Material",
"par2Material",
")",
"{",
"super",
"(",
"par1",
",",
"(",
"par2Material",
"!=",
"Material",
".",
"lava",
"?",
"12",
":",
"14",
")",
"*",
"16",
"+",
"13",
",",
"par2Material",
")",
";",
"float",
"f",
"=",
"0.0F",
";",
"float",
"f1",
"=",
"0.0F",
";",
"setBlockBounds",
"(",
"0.0F",
"+",
"f1",
",",
"0.0F",
"+",
"f",
",",
"0.0F",
"+",
"f1",
",",
"1.0F",
"+",
"f1",
",",
"1.0F",
"+",
"f",
",",
"1.0F",
"+",
"f1",
")",
";",
"setTickRandomly",
"(",
"true",
")",
";",
"}",
"public",
"boolean",
"getBlocksMovement",
"(",
"IBlockAccess",
"par1IBlockAccess",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"return",
"blockMaterial",
"!=",
"Material",
".",
"lava",
";",
"}",
"public",
"static",
"float",
"getFluidHeightPercent",
"(",
"int",
"par0",
")",
"{",
"if",
"(",
"par0",
">=",
"8",
")",
"{",
"par0",
"=",
"0",
";",
"}",
"float",
"f",
"=",
"(",
"float",
")",
"(",
"par0",
"+",
"1",
")",
"/",
"9F",
";",
"return",
"f",
";",
"}",
"public",
"int",
"getBlockTextureFromSide",
"(",
"int",
"par1",
")",
"{",
"if",
"(",
"par1",
"==",
"0",
"||",
"par1",
"==",
"1",
")",
"{",
"return",
"blockIndexInTexture",
";",
"}",
"else",
"{",
"return",
"blockIndexInTexture",
"+",
"1",
";",
"}",
"}",
"protected",
"int",
"getFlowDecay",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"if",
"(",
"par1World",
".",
"getBlockMaterial",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
"!=",
"blockMaterial",
")",
"{",
"return",
"-",
"1",
";",
"}",
"else",
"{",
"return",
"par1World",
".",
"getBlockMetadata",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"}",
"}",
"protected",
"int",
"getEffectiveFlowDecay",
"(",
"IBlockAccess",
"par1IBlockAccess",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"if",
"(",
"par1IBlockAccess",
".",
"getBlockMaterial",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
"!=",
"blockMaterial",
")",
"{",
"return",
"-",
"1",
";",
"}",
"int",
"i",
"=",
"par1IBlockAccess",
".",
"getBlockMetadata",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"if",
"(",
"i",
">=",
"8",
")",
"{",
"i",
"=",
"0",
";",
"}",
"return",
"i",
";",
"}",
"public",
"boolean",
"renderAsNormalBlock",
"(",
")",
"{",
"return",
"false",
";",
"}",
"public",
"boolean",
"isOpaqueCube",
"(",
")",
"{",
"return",
"false",
";",
"}",
"public",
"boolean",
"canCollideCheck",
"(",
"int",
"par1",
",",
"boolean",
"par2",
")",
"{",
"return",
"par2",
"&&",
"par1",
"==",
"0",
";",
"}",
"public",
"boolean",
"isBlockSolid",
"(",
"IBlockAccess",
"par1IBlockAccess",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
")",
"{",
"Material",
"material",
"=",
"par1IBlockAccess",
".",
"getBlockMaterial",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"if",
"(",
"material",
"==",
"blockMaterial",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"par5",
"==",
"1",
")",
"{",
"return",
"true",
";",
"}",
"if",
"(",
"material",
"==",
"Material",
".",
"ice",
")",
"{",
"return",
"false",
";",
"}",
"else",
"{",
"return",
"super",
".",
"isBlockSolid",
"(",
"par1IBlockAccess",
",",
"par2",
",",
"par3",
",",
"par4",
",",
"par5",
")",
";",
"}",
"}",
"public",
"AxisAlignedBB",
"getCollisionBoundingBoxFromPool",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"i",
")",
"{",
"return",
"null",
";",
"}",
"public",
"int",
"getRenderType",
"(",
")",
"{",
"return",
"4",
";",
"}",
"public",
"int",
"idDropped",
"(",
"int",
"par1",
",",
"Random",
"par2Random",
",",
"int",
"par3",
")",
"{",
"return",
"0",
";",
"}",
"public",
"int",
"quantityDropped",
"(",
"Random",
"par1Random",
")",
"{",
"return",
"0",
";",
"}",
"private",
"Vec3D",
"getFlowVector",
"(",
"IBlockAccess",
"par1IBlockAccess",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"Vec3D",
"vec3d",
"=",
"Vec3D",
".",
"createVector",
"(",
"0.0D",
",",
"0.0D",
",",
"0.0D",
")",
";",
"int",
"i",
"=",
"getEffectiveFlowDecay",
"(",
"par1IBlockAccess",
",",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
"4",
";",
"j",
"++",
")",
"{",
"int",
"k",
"=",
"par2",
";",
"int",
"l",
"=",
"par3",
";",
"int",
"i1",
"=",
"par4",
";",
"if",
"(",
"j",
"==",
"0",
")",
"{",
"k",
"--",
";",
"}",
"if",
"(",
"j",
"==",
"1",
")",
"{",
"i1",
"--",
";",
"}",
"if",
"(",
"j",
"==",
"2",
")",
"{",
"k",
"++",
";",
"}",
"if",
"(",
"j",
"==",
"3",
")",
"{",
"i1",
"++",
";",
"}",
"int",
"j1",
"=",
"getEffectiveFlowDecay",
"(",
"par1IBlockAccess",
",",
"k",
",",
"l",
",",
"i1",
")",
";",
"if",
"(",
"j1",
"<",
"0",
")",
"{",
"if",
"(",
"par1IBlockAccess",
".",
"getBlockMaterial",
"(",
"k",
",",
"l",
",",
"i1",
")",
".",
"blocksMovement",
"(",
")",
")",
"{",
"continue",
";",
"}",
"j1",
"=",
"getEffectiveFlowDecay",
"(",
"par1IBlockAccess",
",",
"k",
",",
"l",
"-",
"1",
",",
"i1",
")",
";",
"if",
"(",
"j1",
">=",
"0",
")",
"{",
"int",
"k1",
"=",
"j1",
"-",
"(",
"i",
"-",
"8",
")",
";",
"vec3d",
"=",
"vec3d",
".",
"addVector",
"(",
"(",
"k",
"-",
"par2",
")",
"*",
"k1",
",",
"(",
"l",
"-",
"par3",
")",
"*",
"k1",
",",
"(",
"i1",
"-",
"par4",
")",
"*",
"k1",
")",
";",
"}",
"continue",
";",
"}",
"if",
"(",
"j1",
">=",
"0",
")",
"{",
"int",
"l1",
"=",
"j1",
"-",
"i",
";",
"vec3d",
"=",
"vec3d",
".",
"addVector",
"(",
"(",
"k",
"-",
"par2",
")",
"*",
"l1",
",",
"(",
"l",
"-",
"par3",
")",
"*",
"l1",
",",
"(",
"i1",
"-",
"par4",
")",
"*",
"l1",
")",
";",
"}",
"}",
"if",
"(",
"par1IBlockAccess",
".",
"getBlockMetadata",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
">=",
"8",
")",
"{",
"boolean",
"flag",
"=",
"false",
";",
"if",
"(",
"flag",
"||",
"isBlockSolid",
"(",
"par1IBlockAccess",
",",
"par2",
",",
"par3",
",",
"par4",
"-",
"1",
",",
"2",
")",
")",
"{",
"flag",
"=",
"true",
";",
"}",
"if",
"(",
"flag",
"||",
"isBlockSolid",
"(",
"par1IBlockAccess",
",",
"par2",
",",
"par3",
",",
"par4",
"+",
"1",
",",
"3",
")",
")",
"{",
"flag",
"=",
"true",
";",
"}",
"if",
"(",
"flag",
"||",
"isBlockSolid",
"(",
"par1IBlockAccess",
",",
"par2",
"-",
"1",
",",
"par3",
",",
"par4",
",",
"4",
")",
")",
"{",
"flag",
"=",
"true",
";",
"}",
"if",
"(",
"flag",
"||",
"isBlockSolid",
"(",
"par1IBlockAccess",
",",
"par2",
"+",
"1",
",",
"par3",
",",
"par4",
",",
"5",
")",
")",
"{",
"flag",
"=",
"true",
";",
"}",
"if",
"(",
"flag",
"||",
"isBlockSolid",
"(",
"par1IBlockAccess",
",",
"par2",
",",
"par3",
"+",
"1",
",",
"par4",
"-",
"1",
",",
"2",
")",
")",
"{",
"flag",
"=",
"true",
";",
"}",
"if",
"(",
"flag",
"||",
"isBlockSolid",
"(",
"par1IBlockAccess",
",",
"par2",
",",
"par3",
"+",
"1",
",",
"par4",
"+",
"1",
",",
"3",
")",
")",
"{",
"flag",
"=",
"true",
";",
"}",
"if",
"(",
"flag",
"||",
"isBlockSolid",
"(",
"par1IBlockAccess",
",",
"par2",
"-",
"1",
",",
"par3",
"+",
"1",
",",
"par4",
",",
"4",
")",
")",
"{",
"flag",
"=",
"true",
";",
"}",
"if",
"(",
"flag",
"||",
"isBlockSolid",
"(",
"par1IBlockAccess",
",",
"par2",
"+",
"1",
",",
"par3",
"+",
"1",
",",
"par4",
",",
"5",
")",
")",
"{",
"flag",
"=",
"true",
";",
"}",
"if",
"(",
"flag",
")",
"{",
"vec3d",
"=",
"vec3d",
".",
"normalize",
"(",
")",
".",
"addVector",
"(",
"0.0D",
",",
"-",
"6D",
",",
"0.0D",
")",
";",
"}",
"}",
"vec3d",
"=",
"vec3d",
".",
"normalize",
"(",
")",
";",
"return",
"vec3d",
";",
"}",
"public",
"void",
"velocityToAddToEntity",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"Entity",
"par5Entity",
",",
"Vec3D",
"par6Vec3D",
")",
"{",
"Vec3D",
"vec3d",
"=",
"getFlowVector",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"par6Vec3D",
".",
"xCoord",
"+=",
"vec3d",
".",
"xCoord",
";",
"par6Vec3D",
".",
"yCoord",
"+=",
"vec3d",
".",
"yCoord",
";",
"par6Vec3D",
".",
"zCoord",
"+=",
"vec3d",
".",
"zCoord",
";",
"}",
"public",
"int",
"tickRate",
"(",
")",
"{",
"if",
"(",
"blockMaterial",
"==",
"Material",
".",
"water",
")",
"{",
"return",
"5",
";",
"}",
"return",
"blockMaterial",
"!=",
"Material",
".",
"lava",
"?",
"0",
":",
"30",
";",
"}",
"public",
"void",
"updateTick",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"Random",
"par5Random",
")",
"{",
"super",
".",
"updateTick",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
",",
"par5Random",
")",
";",
"}",
"public",
"void",
"onBlockAdded",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"checkForHarden",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"}",
"public",
"void",
"onNeighborBlockChange",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
")",
"{",
"checkForHarden",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"}",
"private",
"void",
"checkForHarden",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"if",
"(",
"par1World",
".",
"getBlockId",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
"!=",
"blockID",
")",
"{",
"return",
";",
"}",
"if",
"(",
"blockMaterial",
"==",
"Material",
".",
"lava",
")",
"{",
"boolean",
"flag",
"=",
"false",
";",
"if",
"(",
"flag",
"||",
"par1World",
".",
"getBlockMaterial",
"(",
"par2",
",",
"par3",
",",
"par4",
"-",
"1",
")",
"==",
"Material",
".",
"water",
")",
"{",
"flag",
"=",
"true",
";",
"}",
"if",
"(",
"flag",
"||",
"par1World",
".",
"getBlockMaterial",
"(",
"par2",
",",
"par3",
",",
"par4",
"+",
"1",
")",
"==",
"Material",
".",
"water",
")",
"{",
"flag",
"=",
"true",
";",
"}",
"if",
"(",
"flag",
"||",
"par1World",
".",
"getBlockMaterial",
"(",
"par2",
"-",
"1",
",",
"par3",
",",
"par4",
")",
"==",
"Material",
".",
"water",
")",
"{",
"flag",
"=",
"true",
";",
"}",
"if",
"(",
"flag",
"||",
"par1World",
".",
"getBlockMaterial",
"(",
"par2",
"+",
"1",
",",
"par3",
",",
"par4",
")",
"==",
"Material",
".",
"water",
")",
"{",
"flag",
"=",
"true",
";",
"}",
"if",
"(",
"flag",
"||",
"par1World",
".",
"getBlockMaterial",
"(",
"par2",
",",
"par3",
"+",
"1",
",",
"par4",
")",
"==",
"Material",
".",
"water",
")",
"{",
"flag",
"=",
"true",
";",
"}",
"if",
"(",
"flag",
")",
"{",
"int",
"i",
"=",
"par1World",
".",
"getBlockMetadata",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"if",
"(",
"i",
"==",
"0",
")",
"{",
"par1World",
".",
"setBlockWithNotify",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"Block",
".",
"obsidian",
".",
"blockID",
")",
";",
"}",
"else",
"if",
"(",
"i",
"<=",
"4",
")",
"{",
"par1World",
".",
"setBlockWithNotify",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"Block",
".",
"cobblestone",
".",
"blockID",
")",
";",
"}",
"triggerLavaMixEffects",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"}",
"}",
"}",
"protected",
"void",
"triggerLavaMixEffects",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"par1World",
".",
"playSoundEffect",
"(",
"(",
"float",
")",
"par2",
"+",
"0.5F",
",",
"(",
"float",
")",
"par3",
"+",
"0.5F",
",",
"(",
"float",
")",
"par4",
"+",
"0.5F",
",",
"\"random.fizz\"",
",",
"0.5F",
",",
"2.6F",
"+",
"(",
"par1World",
".",
"rand",
".",
"nextFloat",
"(",
")",
"-",
"par1World",
".",
"rand",
".",
"nextFloat",
"(",
")",
")",
"*",
"0.8F",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"8",
";",
"i",
"++",
")",
"{",
"par1World",
".",
"spawnParticle",
"(",
"\"largesmoke\"",
",",
"(",
"double",
")",
"par2",
"+",
"Math",
".",
"random",
"(",
")",
",",
"(",
"double",
")",
"par3",
"+",
"1.2D",
",",
"(",
"double",
")",
"par4",
"+",
"Math",
".",
"random",
"(",
")",
",",
"0.0D",
",",
"0.0D",
",",
"0.0D",
")",
";",
"}",
"}",
"}",
"</s>"
] |
9,414 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"io",
".",
"*",
";",
"public",
"class",
"Packet18Animation",
"extends",
"Packet",
"{",
"public",
"int",
"entityId",
";",
"public",
"int",
"animate",
";",
"public",
"Packet18Animation",
"(",
")",
"{",
"}",
"public",
"Packet18Animation",
"(",
"Entity",
"par1Entity",
",",
"int",
"par2",
")",
"{",
"entityId",
"=",
"par1Entity",
".",
"entityId",
";",
"animate",
"=",
"par2",
";",
"}",
"public",
"void",
"readPacketData",
"(",
"DataInputStream",
"par1DataInputStream",
")",
"throws",
"IOException",
"{",
"entityId",
"=",
"par1DataInputStream",
".",
"readInt",
"(",
")",
";",
"animate",
"=",
"par1DataInputStream",
".",
"readByte",
"(",
")",
";",
"}",
"public",
"void",
"writePacketData",
"(",
"DataOutputStream",
"par1DataOutputStream",
")",
"throws",
"IOException",
"{",
"par1DataOutputStream",
".",
"writeInt",
"(",
"entityId",
")",
";",
"par1DataOutputStream",
".",
"writeByte",
"(",
"animate",
")",
";",
"}",
"public",
"void",
"processPacket",
"(",
"NetHandler",
"par1NetHandler",
")",
"{",
"par1NetHandler",
".",
"handleAnimation",
"(",
"this",
")",
";",
"}",
"public",
"int",
"getPacketSize",
"(",
")",
"{",
"return",
"5",
";",
"}",
"}",
"</s>"
] |
9,415 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"HashMap",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"ItemMonsterPlacer",
"extends",
"Item",
"{",
"public",
"ItemMonsterPlacer",
"(",
"int",
"par1",
")",
"{",
"super",
"(",
"par1",
")",
";",
"setHasSubtypes",
"(",
"true",
")",
";",
"}",
"public",
"boolean",
"onItemUse",
"(",
"ItemStack",
"par1ItemStack",
",",
"EntityPlayer",
"par2EntityPlayer",
",",
"World",
"par3World",
",",
"int",
"par4",
",",
"int",
"par5",
",",
"int",
"par6",
",",
"int",
"par7",
")",
"{",
"if",
"(",
"par3World",
".",
"isRemote",
")",
"{",
"return",
"true",
";",
"}",
"int",
"i",
"=",
"par3World",
".",
"getBlockId",
"(",
"par4",
",",
"par5",
",",
"par6",
")",
";",
"par4",
"+=",
"Facing",
".",
"offsetsXForSide",
"[",
"par7",
"]",
";",
"par5",
"+=",
"Facing",
".",
"offsetsYForSide",
"[",
"par7",
"]",
";",
"par6",
"+=",
"Facing",
".",
"offsetsZForSide",
"[",
"par7",
"]",
";",
"double",
"d",
"=",
"0.0D",
";",
"if",
"(",
"par7",
"==",
"1",
"&&",
"i",
"==",
"Block",
".",
"fence",
".",
"blockID",
"||",
"i",
"==",
"Block",
".",
"netherFence",
".",
"blockID",
")",
"{",
"d",
"=",
"0.5D",
";",
"}",
"if",
"(",
"func_48390_a",
"(",
"par3World",
",",
"par1ItemStack",
".",
"getItemDamage",
"(",
")",
",",
"(",
"double",
")",
"par4",
"+",
"0.5D",
",",
"(",
"double",
")",
"par5",
"+",
"d",
",",
"(",
"double",
")",
"par6",
"+",
"0.5D",
")",
"&&",
"!",
"par2EntityPlayer",
".",
"capabilities",
".",
"isCreativeMode",
")",
"{",
"par1ItemStack",
".",
"stackSize",
"--",
";",
"}",
"return",
"true",
";",
"}",
"public",
"static",
"boolean",
"func_48390_a",
"(",
"World",
"par0World",
",",
"int",
"par1",
",",
"double",
"par2",
",",
"double",
"par4",
",",
"double",
"par6",
")",
"{",
"if",
"(",
"!",
"EntityList",
".",
"entityEggs",
".",
"containsKey",
"(",
"Integer",
".",
"valueOf",
"(",
"par1",
")",
")",
")",
"{",
"return",
"false",
";",
"}",
"Entity",
"entity",
"=",
"EntityList",
".",
"createEntityByID",
"(",
"par1",
",",
"par0World",
")",
";",
"if",
"(",
"entity",
"!=",
"null",
")",
"{",
"entity",
".",
"setLocationAndAngles",
"(",
"par2",
",",
"par4",
",",
"par6",
",",
"par0World",
".",
"rand",
".",
"nextFloat",
"(",
")",
"*",
"360F",
",",
"0.0F",
")",
";",
"par0World",
".",
"spawnEntityInWorld",
"(",
"entity",
")",
";",
"(",
"(",
"EntityLiving",
")",
"entity",
")",
".",
"playLivingSound",
"(",
")",
";",
"}",
"return",
"entity",
"!=",
"null",
";",
"}",
"}",
"</s>"
] |
9,416 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"*",
";",
"class",
"StructureNetherBridgeStart",
"extends",
"StructureStart",
"{",
"public",
"StructureNetherBridgeStart",
"(",
"World",
"par1World",
",",
"Random",
"par2Random",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"ComponentNetherBridgeStartPiece",
"componentnetherbridgestartpiece",
"=",
"new",
"ComponentNetherBridgeStartPiece",
"(",
"par2Random",
",",
"(",
"par3",
"<<",
"4",
")",
"+",
"2",
",",
"(",
"par4",
"<<",
"4",
")",
"+",
"2",
")",
";",
"components",
".",
"add",
"(",
"componentnetherbridgestartpiece",
")",
";",
"componentnetherbridgestartpiece",
".",
"buildComponent",
"(",
"componentnetherbridgestartpiece",
",",
"components",
",",
"par2Random",
")",
";",
"StructureComponent",
"structurecomponent",
";",
"for",
"(",
"ArrayList",
"arraylist",
"=",
"componentnetherbridgestartpiece",
".",
"field_40293_d",
";",
"!",
"arraylist",
".",
"isEmpty",
"(",
")",
";",
"structurecomponent",
".",
"buildComponent",
"(",
"componentnetherbridgestartpiece",
",",
"components",
",",
"par2Random",
")",
")",
"{",
"int",
"i",
"=",
"par2Random",
".",
"nextInt",
"(",
"arraylist",
".",
"size",
"(",
")",
")",
";",
"structurecomponent",
"=",
"(",
"StructureComponent",
")",
"arraylist",
".",
"remove",
"(",
"i",
")",
";",
"}",
"updateBoundingBox",
"(",
")",
";",
"setRandomHeight",
"(",
"par1World",
",",
"par2Random",
",",
"48",
",",
"70",
")",
";",
"}",
"}",
"</s>"
] |
9,417 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"lang",
".",
"reflect",
".",
"Constructor",
";",
"import",
"java",
".",
"util",
".",
"*",
";",
"public",
"final",
"class",
"SpawnerAnimals",
"{",
"private",
"static",
"HashMap",
"eligibleChunksForSpawning",
"=",
"new",
"HashMap",
"(",
")",
";",
"protected",
"static",
"final",
"Class",
"nightSpawnEntities",
"[",
"]",
";",
"public",
"SpawnerAnimals",
"(",
")",
"{",
"}",
"protected",
"static",
"ChunkPosition",
"getRandomSpawningPointInChunk",
"(",
"World",
"par0World",
",",
"int",
"par1",
",",
"int",
"par2",
")",
"{",
"Chunk",
"chunk",
"=",
"par0World",
".",
"getChunkFromChunkCoords",
"(",
"par1",
",",
"par2",
")",
";",
"int",
"i",
"=",
"par1",
"*",
"16",
"+",
"par0World",
".",
"rand",
".",
"nextInt",
"(",
"16",
")",
";",
"int",
"j",
"=",
"par0World",
".",
"rand",
".",
"nextInt",
"(",
"chunk",
"!=",
"null",
"?",
"Math",
".",
"max",
"(",
"128",
",",
"chunk",
".",
"getTopFilledSegment",
"(",
")",
")",
":",
"128",
")",
";",
"int",
"k",
"=",
"par2",
"*",
"16",
"+",
"par0World",
".",
"rand",
".",
"nextInt",
"(",
"16",
")",
";",
"return",
"new",
"ChunkPosition",
"(",
"i",
",",
"j",
",",
"k",
")",
";",
"}",
"public",
"static",
"final",
"int",
"performSpawning",
"(",
"World",
"par0World",
",",
"boolean",
"par1",
",",
"boolean",
"par2",
")",
"{",
"if",
"(",
"!",
"par1",
"&&",
"!",
"par2",
")",
"{",
"return",
"0",
";",
"}",
"else",
"{",
"eligibleChunksForSpawning",
".",
"clear",
"(",
")",
";",
"int",
"var3",
";",
"int",
"var6",
";",
"for",
"(",
"var3",
"=",
"0",
";",
"var3",
"<",
"par0World",
".",
"playerEntities",
".",
"size",
"(",
")",
";",
"++",
"var3",
")",
"{",
"EntityPlayer",
"var4",
"=",
"(",
"EntityPlayer",
")",
"par0World",
".",
"playerEntities",
".",
"get",
"(",
"var3",
")",
";",
"int",
"var5",
"=",
"MathHelper",
".",
"floor_double",
"(",
"var4",
".",
"posX",
"/",
"16.0D",
")",
";",
"var6",
"=",
"MathHelper",
".",
"floor_double",
"(",
"var4",
".",
"posZ",
"/",
"16.0D",
")",
";",
"byte",
"var7",
"=",
"8",
";",
"for",
"(",
"int",
"var8",
"=",
"-",
"var7",
";",
"var8",
"<=",
"var7",
";",
"++",
"var8",
")",
"{",
"for",
"(",
"int",
"var9",
"=",
"-",
"var7",
";",
"var9",
"<=",
"var7",
";",
"++",
"var9",
")",
"{",
"boolean",
"var10",
"=",
"var8",
"==",
"-",
"var7",
"||",
"var8",
"==",
"var7",
"||",
"var9",
"==",
"-",
"var7",
"||",
"var9",
"==",
"var7",
";",
"ChunkCoordIntPair",
"var11",
"=",
"new",
"ChunkCoordIntPair",
"(",
"var8",
"+",
"var5",
",",
"var9",
"+",
"var6",
")",
";",
"if",
"(",
"!",
"var10",
")",
"{",
"eligibleChunksForSpawning",
".",
"put",
"(",
"var11",
",",
"Boolean",
".",
"valueOf",
"(",
"false",
")",
")",
";",
"}",
"else",
"if",
"(",
"!",
"eligibleChunksForSpawning",
".",
"containsKey",
"(",
"var11",
")",
")",
"{",
"eligibleChunksForSpawning",
".",
"put",
"(",
"var11",
",",
"Boolean",
".",
"valueOf",
"(",
"true",
")",
")",
";",
"}",
"}",
"}",
"}",
"var3",
"=",
"0",
";",
"ChunkCoordinates",
"var31",
"=",
"par0World",
".",
"getSpawnPoint",
"(",
")",
";",
"EnumCreatureType",
"[",
"]",
"var32",
"=",
"EnumCreatureType",
".",
"values",
"(",
")",
";",
"var6",
"=",
"var32",
".",
"length",
";",
"for",
"(",
"int",
"var33",
"=",
"0",
";",
"var33",
"<",
"var6",
";",
"++",
"var33",
")",
"{",
"EnumCreatureType",
"var34",
"=",
"var32",
"[",
"var33",
"]",
";",
"if",
"(",
"(",
"!",
"var34",
".",
"getPeacefulCreature",
"(",
")",
"||",
"par2",
")",
"&&",
"(",
"var34",
".",
"getPeacefulCreature",
"(",
")",
"||",
"par1",
")",
"&&",
"par0World",
".",
"countEntities",
"(",
"var34",
".",
"getCreatureClass",
"(",
")",
")",
"<=",
"var34",
".",
"getMaxNumberOfCreature",
"(",
")",
"*",
"eligibleChunksForSpawning",
".",
"size",
"(",
")",
"/",
"256",
")",
"{",
"Iterator",
"var35",
"=",
"eligibleChunksForSpawning",
".",
"keySet",
"(",
")",
".",
"iterator",
"(",
")",
";",
"label108",
":",
"while",
"(",
"var35",
".",
"hasNext",
"(",
")",
")",
"{",
"ChunkCoordIntPair",
"var37",
"=",
"(",
"ChunkCoordIntPair",
")",
"var35",
".",
"next",
"(",
")",
";",
"if",
"(",
"!",
"(",
"(",
"Boolean",
")",
"eligibleChunksForSpawning",
".",
"get",
"(",
"var37",
")",
")",
".",
"booleanValue",
"(",
")",
")",
"{",
"ChunkPosition",
"var36",
"=",
"getRandomSpawningPointInChunk",
"(",
"par0World",
",",
"var37",
".",
"chunkXPos",
",",
"var37",
".",
"chunkZPos",
")",
";",
"int",
"var12",
"=",
"var36",
".",
"x",
";",
"int",
"var13",
"=",
"var36",
".",
"y",
";",
"int",
"var14",
"=",
"var36",
".",
"z",
";",
"if",
"(",
"!",
"par0World",
".",
"isBlockNormalCube",
"(",
"var12",
",",
"var13",
",",
"var14",
")",
"&&",
"par0World",
".",
"getBlockMaterial",
"(",
"var12",
",",
"var13",
",",
"var14",
")",
"==",
"var34",
".",
"getCreatureMaterial",
"(",
")",
")",
"{",
"int",
"var15",
"=",
"0",
";",
"int",
"var16",
"=",
"0",
";",
"while",
"(",
"var16",
"<",
"3",
")",
"{",
"int",
"var17",
"=",
"var12",
";",
"int",
"var18",
"=",
"var13",
";",
"int",
"var19",
"=",
"var14",
";",
"byte",
"var20",
"=",
"6",
";",
"SpawnListEntry",
"var21",
"=",
"null",
";",
"int",
"var22",
"=",
"0",
";",
"while",
"(",
"true",
")",
"{",
"if",
"(",
"var22",
"<",
"4",
")",
"{",
"label101",
":",
"{",
"var17",
"+=",
"par0World",
".",
"rand",
".",
"nextInt",
"(",
"var20",
")",
"-",
"par0World",
".",
"rand",
".",
"nextInt",
"(",
"var20",
")",
";",
"var18",
"+=",
"par0World",
".",
"rand",
".",
"nextInt",
"(",
"1",
")",
"-",
"par0World",
".",
"rand",
".",
"nextInt",
"(",
"1",
")",
";",
"var19",
"+=",
"par0World",
".",
"rand",
".",
"nextInt",
"(",
"var20",
")",
"-",
"par0World",
".",
"rand",
".",
"nextInt",
"(",
"var20",
")",
";",
"if",
"(",
"canCreatureTypeSpawnAtLocation",
"(",
"var34",
",",
"par0World",
",",
"var17",
",",
"var18",
",",
"var19",
")",
")",
"{",
"float",
"var23",
"=",
"(",
"float",
")",
"var17",
"+",
"0.5F",
";",
"float",
"var24",
"=",
"(",
"float",
")",
"var18",
";",
"float",
"var25",
"=",
"(",
"float",
")",
"var19",
"+",
"0.5F",
";",
"if",
"(",
"par0World",
".",
"getClosestPlayer",
"(",
"(",
"double",
")",
"var23",
",",
"(",
"double",
")",
"var24",
",",
"(",
"double",
")",
"var25",
",",
"24.0D",
")",
"==",
"null",
")",
"{",
"float",
"var26",
"=",
"var23",
"-",
"(",
"float",
")",
"var31",
".",
"posX",
";",
"float",
"var27",
"=",
"var24",
"-",
"(",
"float",
")",
"var31",
".",
"posY",
";",
"float",
"var28",
"=",
"var25",
"-",
"(",
"float",
")",
"var31",
".",
"posZ",
";",
"float",
"var29",
"=",
"var26",
"*",
"var26",
"+",
"var27",
"*",
"var27",
"+",
"var28",
"*",
"var28",
";",
"if",
"(",
"var29",
">=",
"576.0F",
")",
"{",
"if",
"(",
"var21",
"==",
"null",
")",
"{",
"var21",
"=",
"par0World",
".",
"getRandomMob",
"(",
"var34",
",",
"var17",
",",
"var18",
",",
"var19",
")",
";",
"if",
"(",
"var21",
"==",
"null",
")",
"{",
"break",
"label101",
";",
"}",
"}",
"EntityLiving",
"var38",
";",
"try",
"{",
"var38",
"=",
"(",
"EntityLiving",
")",
"var21",
".",
"entityClass",
".",
"getConstructor",
"(",
"new",
"Class",
"[",
"]",
"{",
"World",
".",
"class",
"}",
")",
".",
"newInstance",
"(",
"new",
"Object",
"[",
"]",
"{",
"par0World",
"}",
")",
";",
"}",
"catch",
"(",
"Exception",
"var30",
")",
"{",
"var30",
".",
"printStackTrace",
"(",
")",
";",
"return",
"var3",
";",
"}",
"var38",
".",
"setLocationAndAngles",
"(",
"(",
"double",
")",
"var23",
",",
"(",
"double",
")",
"var24",
",",
"(",
"double",
")",
"var25",
",",
"par0World",
".",
"rand",
".",
"nextFloat",
"(",
")",
"*",
"360.0F",
",",
"0.0F",
")",
";",
"if",
"(",
"var38",
".",
"getCanSpawnHere",
"(",
")",
")",
"{",
"++",
"var15",
";",
"par0World",
".",
"spawnEntityInWorld",
"(",
"var38",
")",
";",
"creatureSpecificInit",
"(",
"var38",
",",
"par0World",
",",
"var23",
",",
"var24",
",",
"var25",
")",
";",
"if",
"(",
"var15",
">=",
"var38",
".",
"getMaxSpawnedInChunk",
"(",
")",
")",
"{",
"continue",
"label108",
";",
"}",
"}",
"var3",
"+=",
"var15",
";",
"}",
"}",
"}",
"++",
"var22",
";",
"continue",
";",
"}",
"}",
"++",
"var16",
";",
"break",
";",
"}",
"}",
"}",
"}",
"}",
"}",
"}",
"return",
"var3",
";",
"}",
"}",
"public",
"static",
"boolean",
"canCreatureTypeSpawnAtLocation",
"(",
"EnumCreatureType",
"par0EnumCreatureType",
",",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"if",
"(",
"par0EnumCreatureType",
".",
"getCreatureMaterial",
"(",
")",
"==",
"Material",
".",
"water",
")",
"{",
"return",
"par1World",
".",
"getBlockMaterial",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
".",
"isLiquid",
"(",
")",
"&&",
"!",
"par1World",
".",
"isBlockNormalCube",
"(",
"par2",
",",
"par3",
"+",
"1",
",",
"par4",
")",
";",
"}",
"else",
"{",
"int",
"i",
"=",
"par1World",
".",
"getBlockId",
"(",
"par2",
",",
"par3",
"-",
"1",
",",
"par4",
")",
";",
"return",
"Block",
".",
"isNormalCube",
"(",
"i",
")",
"&&",
"i",
"!=",
"Block",
".",
"bedrock",
".",
"blockID",
"&&",
"!",
"par1World",
".",
"isBlockNormalCube",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
"&&",
"!",
"par1World",
".",
"getBlockMaterial",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
".",
"isLiquid",
"(",
")",
"&&",
"!",
"par1World",
".",
"isBlockNormalCube",
"(",
"par2",
",",
"par3",
"+",
"1",
",",
"par4",
")",
";",
"}",
"}",
"private",
"static",
"void",
"creatureSpecificInit",
"(",
"EntityLiving",
"par0EntityLiving",
",",
"World",
"par1World",
",",
"float",
"par2",
",",
"float",
"par3",
",",
"float",
"par4",
")",
"{",
"if",
"(",
"(",
"par0EntityLiving",
"instanceof",
"EntitySpider",
")",
"&&",
"par1World",
".",
"rand",
".",
"nextInt",
"(",
"100",
")",
"==",
"0",
")",
"{",
"EntitySkeleton",
"entityskeleton",
"=",
"new",
"EntitySkeleton",
"(",
"par1World",
")",
";",
"entityskeleton",
".",
"setLocationAndAngles",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"par0EntityLiving",
".",
"rotationYaw",
",",
"0.0F",
")",
";",
"par1World",
".",
"spawnEntityInWorld",
"(",
"entityskeleton",
")",
";",
"entityskeleton",
".",
"mountEntity",
"(",
"par0EntityLiving",
")",
";",
"}",
"else",
"if",
"(",
"par0EntityLiving",
"instanceof",
"EntitySheep",
")",
"{",
"(",
"(",
"EntitySheep",
")",
"par0EntityLiving",
")",
".",
"setFleeceColor",
"(",
"EntitySheep",
".",
"getRandomFleeceColor",
"(",
"par1World",
".",
"rand",
")",
")",
";",
"}",
"else",
"if",
"(",
"(",
"par0EntityLiving",
"instanceof",
"EntityOcelot",
")",
"&&",
"par1World",
".",
"rand",
".",
"nextInt",
"(",
"7",
")",
"==",
"0",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"2",
";",
"i",
"++",
")",
"{",
"EntityOcelot",
"entityocelot",
"=",
"new",
"EntityOcelot",
"(",
"par1World",
")",
";",
"entityocelot",
".",
"setLocationAndAngles",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"par0EntityLiving",
".",
"rotationYaw",
",",
"0.0F",
")",
";",
"entityocelot",
".",
"setGrowingAge",
"(",
"-",
"24000",
")",
";",
"par1World",
".",
"spawnEntityInWorld",
"(",
"entityocelot",
")",
";",
"}",
"}",
"}",
"public",
"static",
"void",
"performWorldGenSpawning",
"(",
"World",
"par0World",
",",
"BiomeGenBase",
"par1BiomeGenBase",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
",",
"Random",
"par6Random",
")",
"{",
"List",
"list",
"=",
"par1BiomeGenBase",
".",
"getSpawnableList",
"(",
"EnumCreatureType",
".",
"creature",
")",
";",
"if",
"(",
"list",
".",
"isEmpty",
"(",
")",
")",
"{",
"return",
";",
"}",
"while",
"(",
"par6Random",
".",
"nextFloat",
"(",
")",
"<",
"par1BiomeGenBase",
".",
"getSpawningChance",
"(",
")",
")",
"{",
"SpawnListEntry",
"spawnlistentry",
"=",
"(",
"SpawnListEntry",
")",
"WeightedRandom",
".",
"getRandomItem",
"(",
"par0World",
".",
"rand",
",",
"list",
")",
";",
"int",
"i",
"=",
"spawnlistentry",
".",
"minGroupCount",
"+",
"par6Random",
".",
"nextInt",
"(",
"(",
"1",
"+",
"spawnlistentry",
".",
"maxGroupCount",
")",
"-",
"spawnlistentry",
".",
"minGroupCount",
")",
";",
"int",
"j",
"=",
"par2",
"+",
"par6Random",
".",
"nextInt",
"(",
"par4",
")",
";",
"int",
"k",
"=",
"par3",
"+",
"par6Random",
".",
"nextInt",
"(",
"par5",
")",
";",
"int",
"l",
"=",
"j",
";",
"int",
"i1",
"=",
"k",
";",
"int",
"j1",
"=",
"0",
";",
"while",
"(",
"j1",
"<",
"i",
")",
"{",
"boolean",
"flag",
"=",
"false",
";",
"for",
"(",
"int",
"k1",
"=",
"0",
";",
"!",
"flag",
"&&",
"k1",
"<",
"4",
";",
"k1",
"++",
")",
"{",
"int",
"l1",
"=",
"par0World",
".",
"getTopSolidOrLiquidBlock",
"(",
"j",
",",
"k",
")",
";",
"if",
"(",
"canCreatureTypeSpawnAtLocation",
"(",
"EnumCreatureType",
".",
"creature",
",",
"par0World",
",",
"j",
",",
"l1",
",",
"k",
")",
")",
"{",
"float",
"f",
"=",
"(",
"float",
")",
"j",
"+",
"0.5F",
";",
"float",
"f1",
"=",
"l1",
";",
"float",
"f2",
"=",
"(",
"float",
")",
"k",
"+",
"0.5F",
";",
"EntityLiving",
"entityliving",
";",
"try",
"{",
"entityliving",
"=",
"(",
"EntityLiving",
")",
"spawnlistentry",
".",
"entityClass",
".",
"getConstructor",
"(",
"new",
"Class",
"[",
"]",
"{",
"net",
".",
"minecraft",
".",
"src",
".",
"World",
".",
"class",
"}",
")",
".",
"newInstance",
"(",
"new",
"Object",
"[",
"]",
"{",
"par0World",
"}",
")",
";",
"}",
"catch",
"(",
"Exception",
"exception",
")",
"{",
"exception",
".",
"printStackTrace",
"(",
")",
";",
"continue",
";",
"}",
"entityliving",
".",
"setLocationAndAngles",
"(",
"f",
",",
"f1",
",",
"f2",
",",
"par6Random",
".",
"nextFloat",
"(",
")",
"*",
"360F",
",",
"0.0F",
")",
";",
"par0World",
".",
"spawnEntityInWorld",
"(",
"entityliving",
")",
";",
"creatureSpecificInit",
"(",
"entityliving",
",",
"par0World",
",",
"f",
",",
"f1",
",",
"f2",
")",
";",
"flag",
"=",
"true",
";",
"}",
"j",
"+=",
"par6Random",
".",
"nextInt",
"(",
"5",
")",
"-",
"par6Random",
".",
"nextInt",
"(",
"5",
")",
";",
"for",
"(",
"k",
"+=",
"par6Random",
".",
"nextInt",
"(",
"5",
")",
"-",
"par6Random",
".",
"nextInt",
"(",
"5",
")",
";",
"j",
"<",
"par2",
"||",
"j",
">=",
"par2",
"+",
"par4",
"||",
"k",
"<",
"par3",
"||",
"k",
">=",
"par3",
"+",
"par4",
";",
"k",
"=",
"(",
"i1",
"+",
"par6Random",
".",
"nextInt",
"(",
"5",
")",
")",
"-",
"par6Random",
".",
"nextInt",
"(",
"5",
")",
")",
"{",
"j",
"=",
"(",
"l",
"+",
"par6Random",
".",
"nextInt",
"(",
"5",
")",
")",
"-",
"par6Random",
".",
"nextInt",
"(",
"5",
")",
";",
"}",
"}",
"j1",
"++",
";",
"}",
"}",
"}",
"static",
"{",
"nightSpawnEntities",
"=",
"(",
"new",
"Class",
"[",
"]",
"{",
"net",
".",
"minecraft",
".",
"src",
".",
"EntitySpider",
".",
"class",
",",
"net",
".",
"minecraft",
".",
"src",
".",
"EntityZombie",
".",
"class",
",",
"net",
".",
"minecraft",
".",
"src",
".",
"EntitySkeleton",
".",
"class",
"}",
")",
";",
"}",
"}",
"</s>"
] |
9,418 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"class",
"EntityAIRestrictOpenDoor",
"extends",
"EntityAIBase",
"{",
"private",
"EntityCreature",
"entityObj",
";",
"private",
"VillageDoorInfo",
"frontDoor",
";",
"public",
"EntityAIRestrictOpenDoor",
"(",
"EntityCreature",
"par1EntityCreature",
")",
"{",
"entityObj",
"=",
"par1EntityCreature",
";",
"}",
"public",
"boolean",
"shouldExecute",
"(",
")",
"{",
"if",
"(",
"entityObj",
".",
"worldObj",
".",
"isDaytime",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",
"Village",
"village",
"=",
"entityObj",
".",
"worldObj",
".",
"villageCollectionObj",
".",
"findNearestVillage",
"(",
"MathHelper",
".",
"floor_double",
"(",
"entityObj",
".",
"posX",
")",
",",
"MathHelper",
".",
"floor_double",
"(",
"entityObj",
".",
"posY",
")",
",",
"MathHelper",
".",
"floor_double",
"(",
"entityObj",
".",
"posZ",
")",
",",
"16",
")",
";",
"if",
"(",
"village",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"frontDoor",
"=",
"village",
".",
"findNearestDoor",
"(",
"MathHelper",
".",
"floor_double",
"(",
"entityObj",
".",
"posX",
")",
",",
"MathHelper",
".",
"floor_double",
"(",
"entityObj",
".",
"posY",
")",
",",
"MathHelper",
".",
"floor_double",
"(",
"entityObj",
".",
"posZ",
")",
")",
";",
"if",
"(",
"frontDoor",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"else",
"{",
"return",
"(",
"double",
")",
"frontDoor",
".",
"getInsideDistanceSquare",
"(",
"MathHelper",
".",
"floor_double",
"(",
"entityObj",
".",
"posX",
")",
",",
"MathHelper",
".",
"floor_double",
"(",
"entityObj",
".",
"posY",
")",
",",
"MathHelper",
".",
"floor_double",
"(",
"entityObj",
".",
"posZ",
")",
")",
"<",
"2.25D",
";",
"}",
"}",
"public",
"boolean",
"continueExecuting",
"(",
")",
"{",
"if",
"(",
"entityObj",
".",
"worldObj",
".",
"isDaytime",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",
"else",
"{",
"return",
"!",
"frontDoor",
".",
"isDetachedFromVillageFlag",
"&&",
"frontDoor",
".",
"isInside",
"(",
"MathHelper",
".",
"floor_double",
"(",
"entityObj",
".",
"posX",
")",
",",
"MathHelper",
".",
"floor_double",
"(",
"entityObj",
".",
"posZ",
")",
")",
";",
"}",
"}",
"public",
"void",
"startExecuting",
"(",
")",
"{",
"entityObj",
".",
"getNavigator",
"(",
")",
".",
"setBreakDoors",
"(",
"false",
")",
";",
"entityObj",
".",
"getNavigator",
"(",
")",
".",
"func_48655_c",
"(",
"false",
")",
";",
"}",
"public",
"void",
"resetTask",
"(",
")",
"{",
"entityObj",
".",
"getNavigator",
"(",
")",
".",
"setBreakDoors",
"(",
"true",
")",
";",
"entityObj",
".",
"getNavigator",
"(",
")",
".",
"func_48655_c",
"(",
"true",
")",
";",
"frontDoor",
"=",
"null",
";",
"}",
"public",
"void",
"updateTask",
"(",
")",
"{",
"frontDoor",
".",
"incrementDoorOpeningRestrictionCounter",
"(",
")",
";",
"}",
"}",
"</s>"
] |
9,419 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"BiomeGenSwamp",
"extends",
"BiomeGenBase",
"{",
"protected",
"BiomeGenSwamp",
"(",
"int",
"par1",
")",
"{",
"super",
"(",
"par1",
")",
";",
"biomeDecorator",
".",
"treesPerChunk",
"=",
"2",
";",
"biomeDecorator",
".",
"flowersPerChunk",
"=",
"-",
"999",
";",
"biomeDecorator",
".",
"deadBushPerChunk",
"=",
"1",
";",
"biomeDecorator",
".",
"mushroomsPerChunk",
"=",
"8",
";",
"biomeDecorator",
".",
"reedsPerChunk",
"=",
"10",
";",
"biomeDecorator",
".",
"clayPerChunk",
"=",
"1",
";",
"biomeDecorator",
".",
"waterlilyPerChunk",
"=",
"4",
";",
"waterColorMultiplier",
"=",
"0xe0ffae",
";",
"}",
"public",
"WorldGenerator",
"getRandomWorldGenForTrees",
"(",
"Random",
"par1Random",
")",
"{",
"return",
"worldGenSwamp",
";",
"}",
"}",
"</s>"
] |
9,420 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"class",
"StepSound",
"{",
"public",
"final",
"String",
"stepSoundName",
";",
"public",
"final",
"float",
"stepSoundVolume",
";",
"public",
"final",
"float",
"stepSoundPitch",
";",
"public",
"StepSound",
"(",
"String",
"par1Str",
",",
"float",
"par2",
",",
"float",
"par3",
")",
"{",
"stepSoundName",
"=",
"par1Str",
";",
"stepSoundVolume",
"=",
"par2",
";",
"stepSoundPitch",
"=",
"par3",
";",
"}",
"public",
"float",
"getVolume",
"(",
")",
"{",
"return",
"stepSoundVolume",
";",
"}",
"public",
"float",
"getPitch",
"(",
")",
"{",
"return",
"stepSoundPitch",
";",
"}",
"public",
"String",
"getStepSound",
"(",
")",
"{",
"return",
"(",
"new",
"StringBuilder",
"(",
")",
")",
".",
"append",
"(",
"\"step.\"",
")",
".",
"append",
"(",
"stepSoundName",
")",
".",
"toString",
"(",
")",
";",
"}",
"}",
"</s>"
] |
9,421 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"BlockCrops",
"extends",
"BlockFlower",
"{",
"protected",
"BlockCrops",
"(",
"int",
"par1",
",",
"int",
"par2",
")",
"{",
"super",
"(",
"par1",
",",
"par2",
")",
";",
"blockIndexInTexture",
"=",
"par2",
";",
"setTickRandomly",
"(",
"true",
")",
";",
"float",
"f",
"=",
"0.5F",
";",
"setBlockBounds",
"(",
"0.5F",
"-",
"f",
",",
"0.0F",
",",
"0.5F",
"-",
"f",
",",
"0.5F",
"+",
"f",
",",
"0.25F",
",",
"0.5F",
"+",
"f",
")",
";",
"}",
"protected",
"boolean",
"canThisPlantGrowOnThisBlockID",
"(",
"int",
"par1",
")",
"{",
"return",
"par1",
"==",
"Block",
".",
"tilledField",
".",
"blockID",
";",
"}",
"public",
"void",
"updateTick",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"Random",
"par5Random",
")",
"{",
"super",
".",
"updateTick",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
",",
"par5Random",
")",
";",
"if",
"(",
"par1World",
".",
"getBlockLightValue",
"(",
"par2",
",",
"par3",
"+",
"1",
",",
"par4",
")",
">=",
"9",
")",
"{",
"int",
"i",
"=",
"par1World",
".",
"getBlockMetadata",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"if",
"(",
"i",
"<",
"7",
")",
"{",
"float",
"f",
"=",
"getGrowthRate",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"if",
"(",
"par5Random",
".",
"nextInt",
"(",
"(",
"int",
")",
"(",
"25F",
"/",
"f",
")",
"+",
"1",
")",
"==",
"0",
")",
"{",
"i",
"++",
";",
"par1World",
".",
"setBlockMetadataWithNotify",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"i",
")",
";",
"}",
"}",
"}",
"}",
"public",
"void",
"fertilize",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"par1World",
".",
"setBlockMetadataWithNotify",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"7",
")",
";",
"}",
"private",
"float",
"getGrowthRate",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"float",
"f",
"=",
"1.0F",
";",
"int",
"i",
"=",
"par1World",
".",
"getBlockId",
"(",
"par2",
",",
"par3",
",",
"par4",
"-",
"1",
")",
";",
"int",
"j",
"=",
"par1World",
".",
"getBlockId",
"(",
"par2",
",",
"par3",
",",
"par4",
"+",
"1",
")",
";",
"int",
"k",
"=",
"par1World",
".",
"getBlockId",
"(",
"par2",
"-",
"1",
",",
"par3",
",",
"par4",
")",
";",
"int",
"l",
"=",
"par1World",
".",
"getBlockId",
"(",
"par2",
"+",
"1",
",",
"par3",
",",
"par4",
")",
";",
"int",
"i1",
"=",
"par1World",
".",
"getBlockId",
"(",
"par2",
"-",
"1",
",",
"par3",
",",
"par4",
"-",
"1",
")",
";",
"int",
"j1",
"=",
"par1World",
".",
"getBlockId",
"(",
"par2",
"+",
"1",
",",
"par3",
",",
"par4",
"-",
"1",
")",
";",
"int",
"k1",
"=",
"par1World",
".",
"getBlockId",
"(",
"par2",
"+",
"1",
",",
"par3",
",",
"par4",
"+",
"1",
")",
";",
"int",
"l1",
"=",
"par1World",
".",
"getBlockId",
"(",
"par2",
"-",
"1",
",",
"par3",
",",
"par4",
"+",
"1",
")",
";",
"boolean",
"flag",
"=",
"k",
"==",
"blockID",
"||",
"l",
"==",
"blockID",
";",
"boolean",
"flag1",
"=",
"i",
"==",
"blockID",
"||",
"j",
"==",
"blockID",
";",
"boolean",
"flag2",
"=",
"i1",
"==",
"blockID",
"||",
"j1",
"==",
"blockID",
"||",
"k1",
"==",
"blockID",
"||",
"l1",
"==",
"blockID",
";",
"for",
"(",
"int",
"i2",
"=",
"par2",
"-",
"1",
";",
"i2",
"<=",
"par2",
"+",
"1",
";",
"i2",
"++",
")",
"{",
"for",
"(",
"int",
"j2",
"=",
"par4",
"-",
"1",
";",
"j2",
"<=",
"par4",
"+",
"1",
";",
"j2",
"++",
")",
"{",
"int",
"k2",
"=",
"par1World",
".",
"getBlockId",
"(",
"i2",
",",
"par3",
"-",
"1",
",",
"j2",
")",
";",
"float",
"f1",
"=",
"0.0F",
";",
"if",
"(",
"k2",
"==",
"Block",
".",
"tilledField",
".",
"blockID",
")",
"{",
"f1",
"=",
"1.0F",
";",
"if",
"(",
"par1World",
".",
"getBlockMetadata",
"(",
"i2",
",",
"par3",
"-",
"1",
",",
"j2",
")",
">",
"0",
")",
"{",
"f1",
"=",
"3F",
";",
"}",
"}",
"if",
"(",
"i2",
"!=",
"par2",
"||",
"j2",
"!=",
"par4",
")",
"{",
"f1",
"/=",
"4F",
";",
"}",
"f",
"+=",
"f1",
";",
"}",
"}",
"if",
"(",
"flag2",
"||",
"flag",
"&&",
"flag1",
")",
"{",
"f",
"/=",
"2.0F",
";",
"}",
"return",
"f",
";",
"}",
"public",
"int",
"getBlockTextureFromSideAndMetadata",
"(",
"int",
"par1",
",",
"int",
"par2",
")",
"{",
"if",
"(",
"par2",
"<",
"0",
")",
"{",
"par2",
"=",
"7",
";",
"}",
"return",
"blockIndexInTexture",
"+",
"par2",
";",
"}",
"public",
"int",
"getRenderType",
"(",
")",
"{",
"return",
"6",
";",
"}",
"public",
"void",
"dropBlockAsItemWithChance",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
",",
"float",
"par6",
",",
"int",
"par7",
")",
"{",
"super",
".",
"dropBlockAsItemWithChance",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
",",
"par5",
",",
"par6",
",",
"0",
")",
";",
"if",
"(",
"par1World",
".",
"isRemote",
")",
"{",
"return",
";",
"}",
"int",
"i",
"=",
"3",
"+",
"par7",
";",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
"i",
";",
"j",
"++",
")",
"{",
"if",
"(",
"par1World",
".",
"rand",
".",
"nextInt",
"(",
"15",
")",
"<=",
"par5",
")",
"{",
"float",
"f",
"=",
"0.7F",
";",
"float",
"f1",
"=",
"par1World",
".",
"rand",
".",
"nextFloat",
"(",
")",
"*",
"f",
"+",
"(",
"1.0F",
"-",
"f",
")",
"*",
"0.5F",
";",
"float",
"f2",
"=",
"par1World",
".",
"rand",
".",
"nextFloat",
"(",
")",
"*",
"f",
"+",
"(",
"1.0F",
"-",
"f",
")",
"*",
"0.5F",
";",
"float",
"f3",
"=",
"par1World",
".",
"rand",
".",
"nextFloat",
"(",
")",
"*",
"f",
"+",
"(",
"1.0F",
"-",
"f",
")",
"*",
"0.5F",
";",
"EntityItem",
"entityitem",
"=",
"new",
"EntityItem",
"(",
"par1World",
",",
"(",
"float",
")",
"par2",
"+",
"f1",
",",
"(",
"float",
")",
"par3",
"+",
"f2",
",",
"(",
"float",
")",
"par4",
"+",
"f3",
",",
"new",
"ItemStack",
"(",
"Item",
".",
"seeds",
")",
")",
";",
"entityitem",
".",
"delayBeforeCanPickup",
"=",
"10",
";",
"par1World",
".",
"spawnEntityInWorld",
"(",
"entityitem",
")",
";",
"}",
"}",
"}",
"public",
"int",
"idDropped",
"(",
"int",
"par1",
",",
"Random",
"par2Random",
",",
"int",
"par3",
")",
"{",
"if",
"(",
"par1",
"==",
"7",
")",
"{",
"return",
"Item",
".",
"wheat",
".",
"shiftedIndex",
";",
"}",
"else",
"{",
"return",
"-",
"1",
";",
"}",
"}",
"public",
"int",
"quantityDropped",
"(",
"Random",
"par1Random",
")",
"{",
"return",
"1",
";",
"}",
"}",
"</s>"
] |
9,422 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"class",
"EnchantmentDamage",
"extends",
"Enchantment",
"{",
"private",
"static",
"final",
"String",
"protectionName",
"[",
"]",
"=",
"{",
"\"all\"",
",",
"\"undead\"",
",",
"\"arthropods\"",
"}",
";",
"private",
"static",
"final",
"int",
"baseEnchantability",
"[",
"]",
"=",
"{",
"1",
",",
"5",
",",
"5",
"}",
";",
"private",
"static",
"final",
"int",
"levelEnchantability",
"[",
"]",
"=",
"{",
"16",
",",
"8",
",",
"8",
"}",
";",
"private",
"static",
"final",
"int",
"thresholdEnchantability",
"[",
"]",
"=",
"{",
"20",
",",
"20",
",",
"20",
"}",
";",
"public",
"final",
"int",
"damageType",
";",
"public",
"EnchantmentDamage",
"(",
"int",
"par1",
",",
"int",
"par2",
",",
"int",
"par3",
")",
"{",
"super",
"(",
"par1",
",",
"par2",
",",
"EnumEnchantmentType",
".",
"weapon",
")",
";",
"damageType",
"=",
"par3",
";",
"}",
"public",
"int",
"getMinEnchantability",
"(",
"int",
"par1",
")",
"{",
"return",
"baseEnchantability",
"[",
"damageType",
"]",
"+",
"(",
"par1",
"-",
"1",
")",
"*",
"levelEnchantability",
"[",
"damageType",
"]",
";",
"}",
"public",
"int",
"getMaxEnchantability",
"(",
"int",
"par1",
")",
"{",
"return",
"getMinEnchantability",
"(",
"par1",
")",
"+",
"thresholdEnchantability",
"[",
"damageType",
"]",
";",
"}",
"public",
"int",
"getMaxLevel",
"(",
")",
"{",
"return",
"5",
";",
"}",
"public",
"int",
"calcModifierLiving",
"(",
"int",
"par1",
",",
"EntityLiving",
"par2EntityLiving",
")",
"{",
"if",
"(",
"damageType",
"==",
"0",
")",
"{",
"return",
"par1",
"*",
"3",
";",
"}",
"if",
"(",
"damageType",
"==",
"1",
"&&",
"par2EntityLiving",
".",
"getCreatureAttribute",
"(",
")",
"==",
"EnumCreatureAttribute",
".",
"UNDEAD",
")",
"{",
"return",
"par1",
"*",
"4",
";",
"}",
"if",
"(",
"damageType",
"==",
"2",
"&&",
"par2EntityLiving",
".",
"getCreatureAttribute",
"(",
")",
"==",
"EnumCreatureAttribute",
".",
"ARTHROPOD",
")",
"{",
"return",
"par1",
"*",
"4",
";",
"}",
"else",
"{",
"return",
"0",
";",
"}",
"}",
"public",
"boolean",
"canApplyTogether",
"(",
"Enchantment",
"par1Enchantment",
")",
"{",
"return",
"!",
"(",
"par1Enchantment",
"instanceof",
"EnchantmentDamage",
")",
";",
"}",
"}",
"</s>"
] |
9,423 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"class",
"MaterialPortal",
"extends",
"Material",
"{",
"public",
"MaterialPortal",
"(",
"MapColor",
"par1MapColor",
")",
"{",
"super",
"(",
"par1MapColor",
")",
";",
"}",
"public",
"boolean",
"isSolid",
"(",
")",
"{",
"return",
"false",
";",
"}",
"public",
"boolean",
"getCanBlockGrass",
"(",
")",
"{",
"return",
"false",
";",
"}",
"public",
"boolean",
"blocksMovement",
"(",
")",
"{",
"return",
"false",
";",
"}",
"}",
"</s>"
] |
9,424 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"ComponentVillagePathGen",
"extends",
"ComponentVillageRoadPiece",
"{",
"private",
"int",
"averageGroundLevel",
";",
"public",
"ComponentVillagePathGen",
"(",
"int",
"par1",
",",
"Random",
"par2Random",
",",
"StructureBoundingBox",
"par3StructureBoundingBox",
",",
"int",
"par4",
")",
"{",
"super",
"(",
"par1",
")",
";",
"coordBaseMode",
"=",
"par4",
";",
"boundingBox",
"=",
"par3StructureBoundingBox",
";",
"averageGroundLevel",
"=",
"Math",
".",
"max",
"(",
"par3StructureBoundingBox",
".",
"getXSize",
"(",
")",
",",
"par3StructureBoundingBox",
".",
"getZSize",
"(",
")",
")",
";",
"}",
"public",
"void",
"buildComponent",
"(",
"StructureComponent",
"par1StructureComponent",
",",
"List",
"par2List",
",",
"Random",
"par3Random",
")",
"{",
"boolean",
"flag",
"=",
"false",
";",
"for",
"(",
"int",
"i",
"=",
"par3Random",
".",
"nextInt",
"(",
"5",
")",
";",
"i",
"<",
"averageGroundLevel",
"-",
"8",
";",
"i",
"+=",
"2",
"+",
"par3Random",
".",
"nextInt",
"(",
"5",
")",
")",
"{",
"StructureComponent",
"structurecomponent",
"=",
"getNextComponentNN",
"(",
"(",
"ComponentVillageStartPiece",
")",
"par1StructureComponent",
",",
"par2List",
",",
"par3Random",
",",
"0",
",",
"i",
")",
";",
"if",
"(",
"structurecomponent",
"!=",
"null",
")",
"{",
"i",
"+=",
"Math",
".",
"max",
"(",
"structurecomponent",
".",
"boundingBox",
".",
"getXSize",
"(",
")",
",",
"structurecomponent",
".",
"boundingBox",
".",
"getZSize",
"(",
")",
")",
";",
"flag",
"=",
"true",
";",
"}",
"}",
"for",
"(",
"int",
"j",
"=",
"par3Random",
".",
"nextInt",
"(",
"5",
")",
";",
"j",
"<",
"averageGroundLevel",
"-",
"8",
";",
"j",
"+=",
"2",
"+",
"par3Random",
".",
"nextInt",
"(",
"5",
")",
")",
"{",
"StructureComponent",
"structurecomponent1",
"=",
"getNextComponentPP",
"(",
"(",
"ComponentVillageStartPiece",
")",
"par1StructureComponent",
",",
"par2List",
",",
"par3Random",
",",
"0",
",",
"j",
")",
";",
"if",
"(",
"structurecomponent1",
"!=",
"null",
")",
"{",
"j",
"+=",
"Math",
".",
"max",
"(",
"structurecomponent1",
".",
"boundingBox",
".",
"getXSize",
"(",
")",
",",
"structurecomponent1",
".",
"boundingBox",
".",
"getZSize",
"(",
")",
")",
";",
"flag",
"=",
"true",
";",
"}",
"}",
"if",
"(",
"flag",
"&&",
"par3Random",
".",
"nextInt",
"(",
"3",
")",
">",
"0",
")",
"{",
"switch",
"(",
"coordBaseMode",
")",
"{",
"case",
"2",
":",
"StructureVillagePieces",
".",
"getNextStructureComponentVillagePath",
"(",
"(",
"ComponentVillageStartPiece",
")",
"par1StructureComponent",
",",
"par2List",
",",
"par3Random",
",",
"boundingBox",
".",
"minX",
"-",
"1",
",",
"boundingBox",
".",
"minY",
",",
"boundingBox",
".",
"minZ",
",",
"1",
",",
"getComponentType",
"(",
")",
")",
";",
"break",
";",
"case",
"0",
":",
"StructureVillagePieces",
".",
"getNextStructureComponentVillagePath",
"(",
"(",
"ComponentVillageStartPiece",
")",
"par1StructureComponent",
",",
"par2List",
",",
"par3Random",
",",
"boundingBox",
".",
"minX",
"-",
"1",
",",
"boundingBox",
".",
"minY",
",",
"boundingBox",
".",
"maxZ",
"-",
"2",
",",
"1",
",",
"getComponentType",
"(",
")",
")",
";",
"break",
";",
"case",
"3",
":",
"StructureVillagePieces",
".",
"getNextStructureComponentVillagePath",
"(",
"(",
"ComponentVillageStartPiece",
")",
"par1StructureComponent",
",",
"par2List",
",",
"par3Random",
",",
"boundingBox",
".",
"maxX",
"-",
"2",
",",
"boundingBox",
".",
"minY",
",",
"boundingBox",
".",
"minZ",
"-",
"1",
",",
"2",
",",
"getComponentType",
"(",
")",
")",
";",
"break",
";",
"case",
"1",
":",
"StructureVillagePieces",
".",
"getNextStructureComponentVillagePath",
"(",
"(",
"ComponentVillageStartPiece",
")",
"par1StructureComponent",
",",
"par2List",
",",
"par3Random",
",",
"boundingBox",
".",
"minX",
",",
"boundingBox",
".",
"minY",
",",
"boundingBox",
".",
"minZ",
"-",
"1",
",",
"2",
",",
"getComponentType",
"(",
")",
")",
";",
"break",
";",
"}",
"}",
"if",
"(",
"flag",
"&&",
"par3Random",
".",
"nextInt",
"(",
"3",
")",
">",
"0",
")",
"{",
"switch",
"(",
"coordBaseMode",
")",
"{",
"case",
"2",
":",
"StructureVillagePieces",
".",
"getNextStructureComponentVillagePath",
"(",
"(",
"ComponentVillageStartPiece",
")",
"par1StructureComponent",
",",
"par2List",
",",
"par3Random",
",",
"boundingBox",
".",
"maxX",
"+",
"1",
",",
"boundingBox",
".",
"minY",
",",
"boundingBox",
".",
"minZ",
",",
"3",
",",
"getComponentType",
"(",
")",
")",
";",
"break",
";",
"case",
"0",
":",
"StructureVillagePieces",
".",
"getNextStructureComponentVillagePath",
"(",
"(",
"ComponentVillageStartPiece",
")",
"par1StructureComponent",
",",
"par2List",
",",
"par3Random",
",",
"boundingBox",
".",
"maxX",
"+",
"1",
",",
"boundingBox",
".",
"minY",
",",
"boundingBox",
".",
"maxZ",
"-",
"2",
",",
"3",
",",
"getComponentType",
"(",
")",
")",
";",
"break",
";",
"case",
"3",
":",
"StructureVillagePieces",
".",
"getNextStructureComponentVillagePath",
"(",
"(",
"ComponentVillageStartPiece",
")",
"par1StructureComponent",
",",
"par2List",
",",
"par3Random",
",",
"boundingBox",
".",
"maxX",
"-",
"2",
",",
"boundingBox",
".",
"minY",
",",
"boundingBox",
".",
"maxZ",
"+",
"1",
",",
"0",
",",
"getComponentType",
"(",
")",
")",
";",
"break",
";",
"case",
"1",
":",
"StructureVillagePieces",
".",
"getNextStructureComponentVillagePath",
"(",
"(",
"ComponentVillageStartPiece",
")",
"par1StructureComponent",
",",
"par2List",
",",
"par3Random",
",",
"boundingBox",
".",
"minX",
",",
"boundingBox",
".",
"minY",
",",
"boundingBox",
".",
"maxZ",
"+",
"1",
",",
"0",
",",
"getComponentType",
"(",
")",
")",
";",
"break",
";",
"}",
"}",
"}",
"public",
"static",
"StructureBoundingBox",
"func_35378_a",
"(",
"ComponentVillageStartPiece",
"par0ComponentVillageStartPiece",
",",
"List",
"par1List",
",",
"Random",
"par2Random",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
",",
"int",
"par6",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"7",
"*",
"MathHelper",
".",
"getRandomIntegerInRange",
"(",
"par2Random",
",",
"3",
",",
"5",
")",
";",
"i",
">=",
"7",
";",
"i",
"-=",
"7",
")",
"{",
"StructureBoundingBox",
"structureboundingbox",
"=",
"StructureBoundingBox",
".",
"getComponentToAddBoundingBox",
"(",
"par3",
",",
"par4",
",",
"par5",
",",
"0",
",",
"0",
",",
"0",
",",
"3",
",",
"3",
",",
"i",
",",
"par6",
")",
";",
"if",
"(",
"StructureComponent",
".",
"findIntersecting",
"(",
"par1List",
",",
"structureboundingbox",
")",
"==",
"null",
")",
"{",
"return",
"structureboundingbox",
";",
"}",
"}",
"return",
"null",
";",
"}",
"public",
"boolean",
"addComponentParts",
"(",
"World",
"par1World",
",",
"Random",
"par2Random",
",",
"StructureBoundingBox",
"par3StructureBoundingBox",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"boundingBox",
".",
"minX",
";",
"i",
"<=",
"boundingBox",
".",
"maxX",
";",
"i",
"++",
")",
"{",
"for",
"(",
"int",
"j",
"=",
"boundingBox",
".",
"minZ",
";",
"j",
"<=",
"boundingBox",
".",
"maxZ",
";",
"j",
"++",
")",
"{",
"if",
"(",
"par3StructureBoundingBox",
".",
"isVecInside",
"(",
"i",
",",
"64",
",",
"j",
")",
")",
"{",
"int",
"k",
"=",
"par1World",
".",
"getTopSolidOrLiquidBlock",
"(",
"i",
",",
"j",
")",
"-",
"1",
";",
"par1World",
".",
"setBlock",
"(",
"i",
",",
"k",
",",
"j",
",",
"Block",
".",
"gravel",
".",
"blockID",
")",
";",
"}",
"}",
"}",
"return",
"true",
";",
"}",
"}",
"</s>"
] |
9,425 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"ComponentNetherBridgeNetherStalkRoom",
"extends",
"ComponentNetherBridgePiece",
"{",
"public",
"ComponentNetherBridgeNetherStalkRoom",
"(",
"int",
"par1",
",",
"Random",
"par2Random",
",",
"StructureBoundingBox",
"par3StructureBoundingBox",
",",
"int",
"par4",
")",
"{",
"super",
"(",
"par1",
")",
";",
"coordBaseMode",
"=",
"par4",
";",
"boundingBox",
"=",
"par3StructureBoundingBox",
";",
"}",
"public",
"void",
"buildComponent",
"(",
"StructureComponent",
"par1StructureComponent",
",",
"List",
"par2List",
",",
"Random",
"par3Random",
")",
"{",
"getNextComponentNormal",
"(",
"(",
"ComponentNetherBridgeStartPiece",
")",
"par1StructureComponent",
",",
"par2List",
",",
"par3Random",
",",
"5",
",",
"3",
",",
"true",
")",
";",
"getNextComponentNormal",
"(",
"(",
"ComponentNetherBridgeStartPiece",
")",
"par1StructureComponent",
",",
"par2List",
",",
"par3Random",
",",
"5",
",",
"11",
",",
"true",
")",
";",
"}",
"public",
"static",
"ComponentNetherBridgeNetherStalkRoom",
"createValidComponent",
"(",
"List",
"par0List",
",",
"Random",
"par1Random",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
",",
"int",
"par6",
")",
"{",
"StructureBoundingBox",
"structureboundingbox",
"=",
"StructureBoundingBox",
".",
"getComponentToAddBoundingBox",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"-",
"5",
",",
"-",
"3",
",",
"0",
",",
"13",
",",
"14",
",",
"13",
",",
"par5",
")",
";",
"if",
"(",
"!",
"isAboveGround",
"(",
"structureboundingbox",
")",
"||",
"StructureComponent",
".",
"findIntersecting",
"(",
"par0List",
",",
"structureboundingbox",
")",
"!=",
"null",
")",
"{",
"return",
"null",
";",
"}",
"else",
"{",
"return",
"new",
"ComponentNetherBridgeNetherStalkRoom",
"(",
"par6",
",",
"par1Random",
",",
"structureboundingbox",
",",
"par5",
")",
";",
"}",
"}",
"public",
"boolean",
"addComponentParts",
"(",
"World",
"par1World",
",",
"Random",
"par2Random",
",",
"StructureBoundingBox",
"par3StructureBoundingBox",
")",
"{",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"0",
",",
"3",
",",
"0",
",",
"12",
",",
"4",
",",
"12",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"0",
",",
"5",
",",
"0",
",",
"12",
",",
"13",
",",
"12",
",",
"0",
",",
"0",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"0",
",",
"5",
",",
"0",
",",
"1",
",",
"12",
",",
"12",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"11",
",",
"5",
",",
"0",
",",
"12",
",",
"12",
",",
"12",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"2",
",",
"5",
",",
"11",
",",
"4",
",",
"12",
",",
"12",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"8",
",",
"5",
",",
"11",
",",
"10",
",",
"12",
",",
"12",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"5",
",",
"9",
",",
"11",
",",
"7",
",",
"12",
",",
"12",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"2",
",",
"5",
",",
"0",
",",
"4",
",",
"12",
",",
"1",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"8",
",",
"5",
",",
"0",
",",
"10",
",",
"12",
",",
"1",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"5",
",",
"9",
",",
"0",
",",
"7",
",",
"12",
",",
"1",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"2",
",",
"11",
",",
"2",
",",
"10",
",",
"12",
",",
"10",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"for",
"(",
"int",
"i",
"=",
"1",
";",
"i",
"<=",
"11",
";",
"i",
"+=",
"2",
")",
"{",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"i",
",",
"10",
",",
"0",
",",
"i",
",",
"11",
",",
"0",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"i",
",",
"10",
",",
"12",
",",
"i",
",",
"11",
",",
"12",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"0",
",",
"10",
",",
"i",
",",
"0",
",",
"11",
",",
"i",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"12",
",",
"10",
",",
"i",
",",
"12",
",",
"11",
",",
"i",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"false",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"0",
",",
"i",
",",
"13",
",",
"0",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"0",
",",
"i",
",",
"13",
",",
"12",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"0",
",",
"0",
",",
"13",
",",
"i",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"0",
",",
"12",
",",
"13",
",",
"i",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"0",
",",
"i",
"+",
"1",
",",
"13",
",",
"0",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"0",
",",
"i",
"+",
"1",
",",
"13",
",",
"12",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"0",
",",
"0",
",",
"13",
",",
"i",
"+",
"1",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"0",
",",
"12",
",",
"13",
",",
"i",
"+",
"1",
",",
"par3StructureBoundingBox",
")",
";",
"}",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"0",
",",
"0",
",",
"13",
",",
"0",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"0",
",",
"0",
",",
"13",
",",
"12",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"0",
",",
"0",
",",
"13",
",",
"0",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"0",
",",
"12",
",",
"13",
",",
"0",
",",
"par3StructureBoundingBox",
")",
";",
"for",
"(",
"int",
"j",
"=",
"3",
";",
"j",
"<=",
"9",
";",
"j",
"+=",
"2",
")",
"{",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"1",
",",
"7",
",",
"j",
",",
"1",
",",
"8",
",",
"j",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"11",
",",
"7",
",",
"j",
",",
"11",
",",
"8",
",",
"j",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"false",
")",
";",
"}",
"int",
"k",
"=",
"getMetadataWithOffset",
"(",
"Block",
".",
"stairsNetherBrick",
".",
"blockID",
",",
"3",
")",
";",
"for",
"(",
"int",
"l",
"=",
"0",
";",
"l",
"<=",
"6",
";",
"l",
"++",
")",
"{",
"int",
"k1",
"=",
"l",
"+",
"4",
";",
"for",
"(",
"int",
"i2",
"=",
"5",
";",
"i2",
"<=",
"7",
";",
"i2",
"++",
")",
"{",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"stairsNetherBrick",
".",
"blockID",
",",
"k",
",",
"i2",
",",
"5",
"+",
"l",
",",
"k1",
",",
"par3StructureBoundingBox",
")",
";",
"}",
"if",
"(",
"k1",
">=",
"5",
"&&",
"k1",
"<=",
"8",
")",
"{",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"5",
",",
"5",
",",
"k1",
",",
"7",
",",
"l",
"+",
"4",
",",
"k1",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"}",
"else",
"if",
"(",
"k1",
">=",
"9",
"&&",
"k1",
"<=",
"10",
")",
"{",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"5",
",",
"8",
",",
"k1",
",",
"7",
",",
"l",
"+",
"4",
",",
"k1",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"}",
"if",
"(",
"l",
">=",
"1",
")",
"{",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"5",
",",
"6",
"+",
"l",
",",
"k1",
",",
"7",
",",
"9",
"+",
"l",
",",
"k1",
",",
"0",
",",
"0",
",",
"false",
")",
";",
"}",
"}",
"for",
"(",
"int",
"i1",
"=",
"5",
";",
"i1",
"<=",
"7",
";",
"i1",
"++",
")",
"{",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"stairsNetherBrick",
".",
"blockID",
",",
"k",
",",
"i1",
",",
"12",
",",
"11",
",",
"par3StructureBoundingBox",
")",
";",
"}",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"5",
",",
"6",
",",
"7",
",",
"5",
",",
"7",
",",
"7",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"7",
",",
"6",
",",
"7",
",",
"7",
",",
"7",
",",
"7",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"Block",
".",
"netherFence",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"5",
",",
"13",
",",
"12",
",",
"7",
",",
"13",
",",
"12",
",",
"0",
",",
"0",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"2",
",",
"5",
",",
"2",
",",
"3",
",",
"5",
",",
"3",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"2",
",",
"5",
",",
"9",
",",
"3",
",",
"5",
",",
"10",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"2",
",",
"5",
",",
"4",
",",
"2",
",",
"5",
",",
"8",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"9",
",",
"5",
",",
"2",
",",
"10",
",",
"5",
",",
"3",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"9",
",",
"5",
",",
"9",
",",
"10",
",",
"5",
",",
"10",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"10",
",",
"5",
",",
"4",
",",
"10",
",",
"5",
",",
"8",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"int",
"j1",
"=",
"getMetadataWithOffset",
"(",
"Block",
".",
"stairsNetherBrick",
".",
"blockID",
",",
"0",
")",
";",
"int",
"l1",
"=",
"getMetadataWithOffset",
"(",
"Block",
".",
"stairsNetherBrick",
".",
"blockID",
",",
"1",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"stairsNetherBrick",
".",
"blockID",
",",
"l1",
",",
"4",
",",
"5",
",",
"2",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"stairsNetherBrick",
".",
"blockID",
",",
"l1",
",",
"4",
",",
"5",
",",
"3",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"stairsNetherBrick",
".",
"blockID",
",",
"l1",
",",
"4",
",",
"5",
",",
"9",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"stairsNetherBrick",
".",
"blockID",
",",
"l1",
",",
"4",
",",
"5",
",",
"10",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"stairsNetherBrick",
".",
"blockID",
",",
"j1",
",",
"8",
",",
"5",
",",
"2",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"stairsNetherBrick",
".",
"blockID",
",",
"j1",
",",
"8",
",",
"5",
",",
"3",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"stairsNetherBrick",
".",
"blockID",
",",
"j1",
",",
"8",
",",
"5",
",",
"9",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"stairsNetherBrick",
".",
"blockID",
",",
"j1",
",",
"8",
",",
"5",
",",
"10",
",",
"par3StructureBoundingBox",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"3",
",",
"4",
",",
"4",
",",
"4",
",",
"4",
",",
"8",
",",
"Block",
".",
"slowSand",
".",
"blockID",
",",
"Block",
".",
"slowSand",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"8",
",",
"4",
",",
"4",
",",
"9",
",",
"4",
",",
"8",
",",
"Block",
".",
"slowSand",
".",
"blockID",
",",
"Block",
".",
"slowSand",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"3",
",",
"5",
",",
"4",
",",
"4",
",",
"5",
",",
"8",
",",
"Block",
".",
"netherStalk",
".",
"blockID",
",",
"Block",
".",
"netherStalk",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"8",
",",
"5",
",",
"4",
",",
"9",
",",
"5",
",",
"8",
",",
"Block",
".",
"netherStalk",
".",
"blockID",
",",
"Block",
".",
"netherStalk",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"4",
",",
"2",
",",
"0",
",",
"8",
",",
"2",
",",
"12",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"0",
",",
"2",
",",
"4",
",",
"12",
",",
"2",
",",
"8",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"4",
",",
"0",
",",
"0",
",",
"8",
",",
"1",
",",
"3",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"4",
",",
"0",
",",
"9",
",",
"8",
",",
"1",
",",
"12",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"0",
",",
"0",
",",
"4",
",",
"3",
",",
"1",
",",
"8",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"9",
",",
"0",
",",
"4",
",",
"12",
",",
"1",
",",
"8",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"for",
"(",
"int",
"j2",
"=",
"4",
";",
"j2",
"<=",
"8",
";",
"j2",
"++",
")",
"{",
"for",
"(",
"int",
"l2",
"=",
"0",
";",
"l2",
"<=",
"2",
";",
"l2",
"++",
")",
"{",
"fillCurrentPositionBlocksDownwards",
"(",
"par1World",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"0",
",",
"j2",
",",
"-",
"1",
",",
"l2",
",",
"par3StructureBoundingBox",
")",
";",
"fillCurrentPositionBlocksDownwards",
"(",
"par1World",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"0",
",",
"j2",
",",
"-",
"1",
",",
"12",
"-",
"l2",
",",
"par3StructureBoundingBox",
")",
";",
"}",
"}",
"for",
"(",
"int",
"k2",
"=",
"0",
";",
"k2",
"<=",
"2",
";",
"k2",
"++",
")",
"{",
"for",
"(",
"int",
"i3",
"=",
"4",
";",
"i3",
"<=",
"8",
";",
"i3",
"++",
")",
"{",
"fillCurrentPositionBlocksDownwards",
"(",
"par1World",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"0",
",",
"k2",
",",
"-",
"1",
",",
"i3",
",",
"par3StructureBoundingBox",
")",
";",
"fillCurrentPositionBlocksDownwards",
"(",
"par1World",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"0",
",",
"12",
"-",
"k2",
",",
"-",
"1",
",",
"i3",
",",
"par3StructureBoundingBox",
")",
";",
"}",
"}",
"return",
"true",
";",
"}",
"}",
"</s>"
] |
9,426 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"EntityMinecart",
"extends",
"Entity",
"implements",
"IInventory",
"{",
"private",
"ItemStack",
"cargoItems",
"[",
"]",
";",
"private",
"int",
"fuel",
";",
"private",
"boolean",
"field_469_aj",
";",
"public",
"int",
"minecartType",
";",
"public",
"double",
"pushX",
";",
"public",
"double",
"pushZ",
";",
"private",
"static",
"final",
"int",
"field_468_ak",
"[",
"]",
"[",
"]",
"[",
"]",
"=",
"{",
"{",
"{",
"0",
",",
"0",
",",
"-",
"1",
"}",
",",
"{",
"0",
",",
"0",
",",
"1",
"}",
"}",
",",
"{",
"{",
"-",
"1",
",",
"0",
",",
"0",
"}",
",",
"{",
"1",
",",
"0",
",",
"0",
"}",
"}",
",",
"{",
"{",
"-",
"1",
",",
"-",
"1",
",",
"0",
"}",
",",
"{",
"1",
",",
"0",
",",
"0",
"}",
"}",
",",
"{",
"{",
"-",
"1",
",",
"0",
",",
"0",
"}",
",",
"{",
"1",
",",
"-",
"1",
",",
"0",
"}",
"}",
",",
"{",
"{",
"0",
",",
"0",
",",
"-",
"1",
"}",
",",
"{",
"0",
",",
"-",
"1",
",",
"1",
"}",
"}",
",",
"{",
"{",
"0",
",",
"-",
"1",
",",
"-",
"1",
"}",
",",
"{",
"0",
",",
"0",
",",
"1",
"}",
"}",
",",
"{",
"{",
"0",
",",
"0",
",",
"1",
"}",
",",
"{",
"1",
",",
"0",
",",
"0",
"}",
"}",
",",
"{",
"{",
"0",
",",
"0",
",",
"1",
"}",
",",
"{",
"-",
"1",
",",
"0",
",",
"0",
"}",
"}",
",",
"{",
"{",
"0",
",",
"0",
",",
"-",
"1",
"}",
",",
"{",
"-",
"1",
",",
"0",
",",
"0",
"}",
"}",
",",
"{",
"{",
"0",
",",
"0",
",",
"-",
"1",
"}",
",",
"{",
"1",
",",
"0",
",",
"0",
"}",
"}",
"}",
";",
"private",
"int",
"turnProgress",
";",
"private",
"double",
"minecartX",
";",
"private",
"double",
"minecartY",
";",
"private",
"double",
"minecartZ",
";",
"private",
"double",
"minecartYaw",
";",
"private",
"double",
"minecartPitch",
";",
"public",
"EntityMinecart",
"(",
"World",
"par1World",
")",
"{",
"super",
"(",
"par1World",
")",
";",
"cargoItems",
"=",
"new",
"ItemStack",
"[",
"36",
"]",
";",
"fuel",
"=",
"0",
";",
"field_469_aj",
"=",
"false",
";",
"preventEntitySpawning",
"=",
"true",
";",
"setSize",
"(",
"0.98F",
",",
"0.7F",
")",
";",
"yOffset",
"=",
"height",
"/",
"2.0F",
";",
"}",
"protected",
"boolean",
"canTriggerWalking",
"(",
")",
"{",
"return",
"false",
";",
"}",
"protected",
"void",
"entityInit",
"(",
")",
"{",
"dataWatcher",
".",
"addObject",
"(",
"16",
",",
"new",
"Byte",
"(",
"(",
"byte",
")",
"0",
")",
")",
";",
"dataWatcher",
".",
"addObject",
"(",
"17",
",",
"new",
"Integer",
"(",
"0",
")",
")",
";",
"dataWatcher",
".",
"addObject",
"(",
"18",
",",
"new",
"Integer",
"(",
"1",
")",
")",
";",
"dataWatcher",
".",
"addObject",
"(",
"19",
",",
"new",
"Integer",
"(",
"0",
")",
")",
";",
"}",
"public",
"AxisAlignedBB",
"getCollisionBox",
"(",
"Entity",
"par1Entity",
")",
"{",
"return",
"par1Entity",
".",
"boundingBox",
";",
"}",
"public",
"AxisAlignedBB",
"getBoundingBox",
"(",
")",
"{",
"return",
"null",
";",
"}",
"public",
"boolean",
"canBePushed",
"(",
")",
"{",
"return",
"true",
";",
"}",
"public",
"EntityMinecart",
"(",
"World",
"par1World",
",",
"double",
"par2",
",",
"double",
"par4",
",",
"double",
"par6",
",",
"int",
"par8",
")",
"{",
"this",
"(",
"par1World",
")",
";",
"setPosition",
"(",
"par2",
",",
"par4",
"+",
"(",
"double",
")",
"yOffset",
",",
"par6",
")",
";",
"motionX",
"=",
"0.0D",
";",
"motionY",
"=",
"0.0D",
";",
"motionZ",
"=",
"0.0D",
";",
"prevPosX",
"=",
"par2",
";",
"prevPosY",
"=",
"par4",
";",
"prevPosZ",
"=",
"par6",
";",
"minecartType",
"=",
"par8",
";",
"}",
"public",
"double",
"getMountedYOffset",
"(",
")",
"{",
"return",
"(",
"double",
")",
"height",
"*",
"0.0D",
"-",
"0.30000001192092896D",
";",
"}",
"public",
"boolean",
"attackEntityFrom",
"(",
"DamageSource",
"par1DamageSource",
",",
"int",
"par2",
")",
"{",
"if",
"(",
"worldObj",
".",
"isRemote",
"||",
"isDead",
")",
"{",
"return",
"true",
";",
"}",
"func_41016_d",
"(",
"-",
"func_41021_q",
"(",
")",
")",
";",
"func_41014_b",
"(",
"10",
")",
";",
"setBeenAttacked",
"(",
")",
";",
"func_41018_e_",
"(",
"func_41020_o",
"(",
")",
"+",
"par2",
"*",
"10",
")",
";",
"if",
"(",
"func_41020_o",
"(",
")",
">",
"40",
")",
"{",
"if",
"(",
"riddenByEntity",
"!=",
"null",
")",
"{",
"riddenByEntity",
".",
"mountEntity",
"(",
"this",
")",
";",
"}",
"setDead",
"(",
")",
";",
"dropItemWithOffset",
"(",
"Item",
".",
"minecartEmpty",
".",
"shiftedIndex",
",",
"1",
",",
"0.0F",
")",
";",
"if",
"(",
"minecartType",
"==",
"1",
")",
"{",
"EntityMinecart",
"entityminecart",
"=",
"this",
";",
"label0",
":",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"entityminecart",
".",
"getSizeInventory",
"(",
")",
";",
"i",
"++",
")",
"{",
"ItemStack",
"itemstack",
"=",
"entityminecart",
".",
"getStackInSlot",
"(",
"i",
")",
";",
"if",
"(",
"itemstack",
"==",
"null",
")",
"{",
"continue",
";",
"}",
"float",
"f",
"=",
"rand",
".",
"nextFloat",
"(",
")",
"*",
"0.8F",
"+",
"0.1F",
";",
"float",
"f1",
"=",
"rand",
".",
"nextFloat",
"(",
")",
"*",
"0.8F",
"+",
"0.1F",
";",
"float",
"f2",
"=",
"rand",
".",
"nextFloat",
"(",
")",
"*",
"0.8F",
"+",
"0.1F",
";",
"do",
"{",
"if",
"(",
"itemstack",
".",
"stackSize",
"<=",
"0",
")",
"{",
"continue",
"label0",
";",
"}",
"int",
"j",
"=",
"rand",
".",
"nextInt",
"(",
"21",
")",
"+",
"10",
";",
"if",
"(",
"j",
">",
"itemstack",
".",
"stackSize",
")",
"{",
"j",
"=",
"itemstack",
".",
"stackSize",
";",
"}",
"itemstack",
".",
"stackSize",
"-=",
"j",
";",
"EntityItem",
"entityitem",
"=",
"new",
"EntityItem",
"(",
"worldObj",
",",
"posX",
"+",
"(",
"double",
")",
"f",
",",
"posY",
"+",
"(",
"double",
")",
"f1",
",",
"posZ",
"+",
"(",
"double",
")",
"f2",
",",
"new",
"ItemStack",
"(",
"itemstack",
".",
"itemID",
",",
"j",
",",
"itemstack",
".",
"getItemDamage",
"(",
")",
")",
")",
";",
"float",
"f3",
"=",
"0.05F",
";",
"entityitem",
".",
"motionX",
"=",
"(",
"float",
")",
"rand",
".",
"nextGaussian",
"(",
")",
"*",
"f3",
";",
"entityitem",
".",
"motionY",
"=",
"(",
"float",
")",
"rand",
".",
"nextGaussian",
"(",
")",
"*",
"f3",
"+",
"0.2F",
";",
"entityitem",
".",
"motionZ",
"=",
"(",
"float",
")",
"rand",
".",
"nextGaussian",
"(",
")",
"*",
"f3",
";",
"worldObj",
".",
"spawnEntityInWorld",
"(",
"entityitem",
")",
";",
"}",
"while",
"(",
"true",
")",
";",
"}",
"dropItemWithOffset",
"(",
"Block",
".",
"chest",
".",
"blockID",
",",
"1",
",",
"0.0F",
")",
";",
"}",
"else",
"if",
"(",
"minecartType",
"==",
"2",
")",
"{",
"dropItemWithOffset",
"(",
"Block",
".",
"stoneOvenIdle",
".",
"blockID",
",",
"1",
",",
"0.0F",
")",
";",
"}",
"}",
"return",
"true",
";",
"}",
"public",
"boolean",
"canBeCollidedWith",
"(",
")",
"{",
"return",
"!",
"isDead",
";",
"}",
"public",
"void",
"setDead",
"(",
")",
"{",
"label0",
":",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"getSizeInventory",
"(",
")",
";",
"i",
"++",
")",
"{",
"ItemStack",
"itemstack",
"=",
"getStackInSlot",
"(",
"i",
")",
";",
"if",
"(",
"itemstack",
"==",
"null",
")",
"{",
"continue",
";",
"}",
"float",
"f",
"=",
"rand",
".",
"nextFloat",
"(",
")",
"*",
"0.8F",
"+",
"0.1F",
";",
"float",
"f1",
"=",
"rand",
".",
"nextFloat",
"(",
")",
"*",
"0.8F",
"+",
"0.1F",
";",
"float",
"f2",
"=",
"rand",
".",
"nextFloat",
"(",
")",
"*",
"0.8F",
"+",
"0.1F",
";",
"do",
"{",
"if",
"(",
"itemstack",
".",
"stackSize",
"<=",
"0",
")",
"{",
"continue",
"label0",
";",
"}",
"int",
"j",
"=",
"rand",
".",
"nextInt",
"(",
"21",
")",
"+",
"10",
";",
"if",
"(",
"j",
">",
"itemstack",
".",
"stackSize",
")",
"{",
"j",
"=",
"itemstack",
".",
"stackSize",
";",
"}",
"itemstack",
".",
"stackSize",
"-=",
"j",
";",
"EntityItem",
"entityitem",
"=",
"new",
"EntityItem",
"(",
"worldObj",
",",
"posX",
"+",
"(",
"double",
")",
"f",
",",
"posY",
"+",
"(",
"double",
")",
"f1",
",",
"posZ",
"+",
"(",
"double",
")",
"f2",
",",
"new",
"ItemStack",
"(",
"itemstack",
".",
"itemID",
",",
"j",
",",
"itemstack",
".",
"getItemDamage",
"(",
")",
")",
")",
";",
"if",
"(",
"itemstack",
".",
"hasTagCompound",
"(",
")",
")",
"{",
"entityitem",
".",
"item",
".",
"setTagCompound",
"(",
"(",
"NBTTagCompound",
")",
"itemstack",
".",
"getTagCompound",
"(",
")",
".",
"copy",
"(",
")",
")",
";",
"}",
"float",
"f3",
"=",
"0.05F",
";",
"entityitem",
".",
"motionX",
"=",
"(",
"float",
")",
"rand",
".",
"nextGaussian",
"(",
")",
"*",
"f3",
";",
"entityitem",
".",
"motionY",
"=",
"(",
"float",
")",
"rand",
".",
"nextGaussian",
"(",
")",
"*",
"f3",
"+",
"0.2F",
";",
"entityitem",
".",
"motionZ",
"=",
"(",
"float",
")",
"rand",
".",
"nextGaussian",
"(",
")",
"*",
"f3",
";",
"worldObj",
".",
"spawnEntityInWorld",
"(",
"entityitem",
")",
";",
"}",
"while",
"(",
"true",
")",
";",
"}",
"super",
".",
"setDead",
"(",
")",
";",
"}",
"public",
"void",
"onUpdate",
"(",
")",
"{",
"if",
"(",
"func_41019_p",
"(",
")",
">",
"0",
")",
"{",
"func_41014_b",
"(",
"func_41019_p",
"(",
")",
"-",
"1",
")",
";",
"}",
"if",
"(",
"func_41020_o",
"(",
")",
">",
"0",
")",
"{",
"func_41018_e_",
"(",
"func_41020_o",
"(",
")",
"-",
"1",
")",
";",
"}",
"if",
"(",
"posY",
"<",
"-",
"64D",
")",
"{",
"kill",
"(",
")",
";",
"}",
"if",
"(",
"isMinecartPowered",
"(",
")",
"&&",
"rand",
".",
"nextInt",
"(",
"4",
")",
"==",
"0",
")",
"{",
"worldObj",
".",
"spawnParticle",
"(",
"\"largesmoke\"",
",",
"posX",
",",
"posY",
"+",
"0.80000000000000004D",
",",
"posZ",
",",
"0.0D",
",",
"0.0D",
",",
"0.0D",
")",
";",
"}",
"if",
"(",
"worldObj",
".",
"isRemote",
")",
"{",
"if",
"(",
"turnProgress",
">",
"0",
")",
"{",
"double",
"d",
"=",
"posX",
"+",
"(",
"minecartX",
"-",
"posX",
")",
"/",
"(",
"double",
")",
"turnProgress",
";",
"double",
"d1",
"=",
"posY",
"+",
"(",
"minecartY",
"-",
"posY",
")",
"/",
"(",
"double",
")",
"turnProgress",
";",
"double",
"d3",
"=",
"posZ",
"+",
"(",
"minecartZ",
"-",
"posZ",
")",
"/",
"(",
"double",
")",
"turnProgress",
";",
"double",
"d5",
";",
"for",
"(",
"d5",
"=",
"minecartYaw",
"-",
"(",
"double",
")",
"rotationYaw",
";",
"d5",
"<",
"-",
"180D",
";",
"d5",
"+=",
"360D",
")",
"{",
"}",
"for",
"(",
";",
"d5",
">=",
"180D",
";",
"d5",
"-=",
"360D",
")",
"{",
"}",
"rotationYaw",
"+=",
"d5",
"/",
"(",
"double",
")",
"turnProgress",
";",
"rotationPitch",
"+=",
"(",
"minecartPitch",
"-",
"(",
"double",
")",
"rotationPitch",
")",
"/",
"(",
"double",
")",
"turnProgress",
";",
"turnProgress",
"--",
";",
"setPosition",
"(",
"d",
",",
"d1",
",",
"d3",
")",
";",
"setRotation",
"(",
"rotationYaw",
",",
"rotationPitch",
")",
";",
"}",
"else",
"{",
"setPosition",
"(",
"posX",
",",
"posY",
",",
"posZ",
")",
";",
"setRotation",
"(",
"rotationYaw",
",",
"rotationPitch",
")",
";",
"}",
"return",
";",
"}",
"prevPosX",
"=",
"posX",
";",
"prevPosY",
"=",
"posY",
";",
"prevPosZ",
"=",
"posZ",
";",
"motionY",
"-=",
"0.039999999105930328D",
";",
"int",
"i",
"=",
"MathHelper",
".",
"floor_double",
"(",
"posX",
")",
";",
"int",
"j",
"=",
"MathHelper",
".",
"floor_double",
"(",
"posY",
")",
";",
"int",
"k",
"=",
"MathHelper",
".",
"floor_double",
"(",
"posZ",
")",
";",
"if",
"(",
"BlockRail",
".",
"isRailBlockAt",
"(",
"worldObj",
",",
"i",
",",
"j",
"-",
"1",
",",
"k",
")",
")",
"{",
"j",
"--",
";",
"}",
"double",
"d2",
"=",
"0.40000000000000002D",
";",
"double",
"d4",
"=",
"0.0078125D",
";",
"int",
"l",
"=",
"worldObj",
".",
"getBlockId",
"(",
"i",
",",
"j",
",",
"k",
")",
";",
"if",
"(",
"BlockRail",
".",
"isRailBlock",
"(",
"l",
")",
")",
"{",
"Vec3D",
"vec3d",
"=",
"func_182_g",
"(",
"posX",
",",
"posY",
",",
"posZ",
")",
";",
"int",
"i1",
"=",
"worldObj",
".",
"getBlockMetadata",
"(",
"i",
",",
"j",
",",
"k",
")",
";",
"posY",
"=",
"j",
";",
"boolean",
"flag",
"=",
"false",
";",
"boolean",
"flag1",
"=",
"false",
";",
"if",
"(",
"l",
"==",
"Block",
".",
"railPowered",
".",
"blockID",
")",
"{",
"flag",
"=",
"(",
"i1",
"&",
"8",
")",
"!=",
"0",
";",
"flag1",
"=",
"!",
"flag",
";",
"}",
"if",
"(",
"(",
"(",
"BlockRail",
")",
"Block",
".",
"blocksList",
"[",
"l",
"]",
")",
".",
"isPowered",
"(",
")",
")",
"{",
"i1",
"&=",
"7",
";",
"}",
"if",
"(",
"i1",
">=",
"2",
"&&",
"i1",
"<=",
"5",
")",
"{",
"posY",
"=",
"j",
"+",
"1",
";",
"}",
"if",
"(",
"i1",
"==",
"2",
")",
"{",
"motionX",
"-=",
"d4",
";",
"}",
"if",
"(",
"i1",
"==",
"3",
")",
"{",
"motionX",
"+=",
"d4",
";",
"}",
"if",
"(",
"i1",
"==",
"4",
")",
"{",
"motionZ",
"+=",
"d4",
";",
"}",
"if",
"(",
"i1",
"==",
"5",
")",
"{",
"motionZ",
"-=",
"d4",
";",
"}",
"int",
"ai",
"[",
"]",
"[",
"]",
"=",
"field_468_ak",
"[",
"i1",
"]",
";",
"double",
"d9",
"=",
"ai",
"[",
"1",
"]",
"[",
"0",
"]",
"-",
"ai",
"[",
"0",
"]",
"[",
"0",
"]",
";",
"double",
"d10",
"=",
"ai",
"[",
"1",
"]",
"[",
"2",
"]",
"-",
"ai",
"[",
"0",
"]",
"[",
"2",
"]",
";",
"double",
"d11",
"=",
"Math",
".",
"sqrt",
"(",
"d9",
"*",
"d9",
"+",
"d10",
"*",
"d10",
")",
";",
"double",
"d12",
"=",
"motionX",
"*",
"d9",
"+",
"motionZ",
"*",
"d10",
";",
"if",
"(",
"d12",
"<",
"0.0D",
")",
"{",
"d9",
"=",
"-",
"d9",
";",
"d10",
"=",
"-",
"d10",
";",
"}",
"double",
"d13",
"=",
"Math",
".",
"sqrt",
"(",
"motionX",
"*",
"motionX",
"+",
"motionZ",
"*",
"motionZ",
")",
";",
"motionX",
"=",
"(",
"d13",
"*",
"d9",
")",
"/",
"d11",
";",
"motionZ",
"=",
"(",
"d13",
"*",
"d10",
")",
"/",
"d11",
";",
"if",
"(",
"flag1",
")",
"{",
"double",
"d16",
"=",
"Math",
".",
"sqrt",
"(",
"motionX",
"*",
"motionX",
"+",
"motionZ",
"*",
"motionZ",
")",
";",
"if",
"(",
"d16",
"<",
"0.029999999999999999D",
")",
"{",
"motionX",
"*=",
"0.0D",
";",
"motionY",
"*=",
"0.0D",
";",
"motionZ",
"*=",
"0.0D",
";",
"}",
"else",
"{",
"motionX",
"*=",
"0.5D",
";",
"motionY",
"*=",
"0.0D",
";",
"motionZ",
"*=",
"0.5D",
";",
"}",
"}",
"double",
"d17",
"=",
"0.0D",
";",
"double",
"d18",
"=",
"(",
"double",
")",
"i",
"+",
"0.5D",
"+",
"(",
"double",
")",
"ai",
"[",
"0",
"]",
"[",
"0",
"]",
"*",
"0.5D",
";",
"double",
"d19",
"=",
"(",
"double",
")",
"k",
"+",
"0.5D",
"+",
"(",
"double",
")",
"ai",
"[",
"0",
"]",
"[",
"2",
"]",
"*",
"0.5D",
";",
"double",
"d20",
"=",
"(",
"double",
")",
"i",
"+",
"0.5D",
"+",
"(",
"double",
")",
"ai",
"[",
"1",
"]",
"[",
"0",
"]",
"*",
"0.5D",
";",
"double",
"d21",
"=",
"(",
"double",
")",
"k",
"+",
"0.5D",
"+",
"(",
"double",
")",
"ai",
"[",
"1",
"]",
"[",
"2",
"]",
"*",
"0.5D",
";",
"d9",
"=",
"d20",
"-",
"d18",
";",
"d10",
"=",
"d21",
"-",
"d19",
";",
"if",
"(",
"d9",
"==",
"0.0D",
")",
"{",
"posX",
"=",
"(",
"double",
")",
"i",
"+",
"0.5D",
";",
"d17",
"=",
"posZ",
"-",
"(",
"double",
")",
"k",
";",
"}",
"else",
"if",
"(",
"d10",
"==",
"0.0D",
")",
"{",
"posZ",
"=",
"(",
"double",
")",
"k",
"+",
"0.5D",
";",
"d17",
"=",
"posX",
"-",
"(",
"double",
")",
"i",
";",
"}",
"else",
"{",
"double",
"d22",
"=",
"posX",
"-",
"d18",
";",
"double",
"d24",
"=",
"posZ",
"-",
"d19",
";",
"double",
"d26",
"=",
"(",
"d22",
"*",
"d9",
"+",
"d24",
"*",
"d10",
")",
"*",
"2D",
";",
"d17",
"=",
"d26",
";",
"}",
"posX",
"=",
"d18",
"+",
"d9",
"*",
"d17",
";",
"posZ",
"=",
"d19",
"+",
"d10",
"*",
"d17",
";",
"setPosition",
"(",
"posX",
",",
"posY",
"+",
"(",
"double",
")",
"yOffset",
",",
"posZ",
")",
";",
"double",
"d23",
"=",
"motionX",
";",
"double",
"d25",
"=",
"motionZ",
";",
"if",
"(",
"riddenByEntity",
"!=",
"null",
")",
"{",
"d23",
"*=",
"0.75D",
";",
"d25",
"*=",
"0.75D",
";",
"}",
"if",
"(",
"d23",
"<",
"-",
"d2",
")",
"{",
"d23",
"=",
"-",
"d2",
";",
"}",
"if",
"(",
"d23",
">",
"d2",
")",
"{",
"d23",
"=",
"d2",
";",
"}",
"if",
"(",
"d25",
"<",
"-",
"d2",
")",
"{",
"d25",
"=",
"-",
"d2",
";",
"}",
"if",
"(",
"d25",
">",
"d2",
")",
"{",
"d25",
"=",
"d2",
";",
"}",
"moveEntity",
"(",
"d23",
",",
"0.0D",
",",
"d25",
")",
";",
"if",
"(",
"ai",
"[",
"0",
"]",
"[",
"1",
"]",
"!=",
"0",
"&&",
"MathHelper",
".",
"floor_double",
"(",
"posX",
")",
"-",
"i",
"==",
"ai",
"[",
"0",
"]",
"[",
"0",
"]",
"&&",
"MathHelper",
".",
"floor_double",
"(",
"posZ",
")",
"-",
"k",
"==",
"ai",
"[",
"0",
"]",
"[",
"2",
"]",
")",
"{",
"setPosition",
"(",
"posX",
",",
"posY",
"+",
"(",
"double",
")",
"ai",
"[",
"0",
"]",
"[",
"1",
"]",
",",
"posZ",
")",
";",
"}",
"else",
"if",
"(",
"ai",
"[",
"1",
"]",
"[",
"1",
"]",
"!=",
"0",
"&&",
"MathHelper",
".",
"floor_double",
"(",
"posX",
")",
"-",
"i",
"==",
"ai",
"[",
"1",
"]",
"[",
"0",
"]",
"&&",
"MathHelper",
".",
"floor_double",
"(",
"posZ",
")",
"-",
"k",
"==",
"ai",
"[",
"1",
"]",
"[",
"2",
"]",
")",
"{",
"setPosition",
"(",
"posX",
",",
"posY",
"+",
"(",
"double",
")",
"ai",
"[",
"1",
"]",
"[",
"1",
"]",
",",
"posZ",
")",
";",
"}",
"if",
"(",
"riddenByEntity",
"!=",
"null",
")",
"{",
"motionX",
"*=",
"0.99699997901916504D",
";",
"motionY",
"*=",
"0.0D",
";",
"motionZ",
"*=",
"0.99699997901916504D",
";",
"}",
"else",
"{",
"if",
"(",
"minecartType",
"==",
"2",
")",
"{",
"double",
"d27",
"=",
"MathHelper",
".",
"sqrt_double",
"(",
"pushX",
"*",
"pushX",
"+",
"pushZ",
"*",
"pushZ",
")",
";",
"if",
"(",
"d27",
">",
"0.01D",
")",
"{",
"pushX",
"/=",
"d27",
";",
"pushZ",
"/=",
"d27",
";",
"double",
"d29",
"=",
"0.040000000000000001D",
";",
"motionX",
"*=",
"0.80000001192092896D",
";",
"motionY",
"*=",
"0.0D",
";",
"motionZ",
"*=",
"0.80000001192092896D",
";",
"motionX",
"+=",
"pushX",
"*",
"d29",
";",
"motionZ",
"+=",
"pushZ",
"*",
"d29",
";",
"}",
"else",
"{",
"motionX",
"*=",
"0.89999997615814209D",
";",
"motionY",
"*=",
"0.0D",
";",
"motionZ",
"*=",
"0.89999997615814209D",
";",
"}",
"}",
"motionX",
"*=",
"0.95999997854232788D",
";",
"motionY",
"*=",
"0.0D",
";",
"motionZ",
"*=",
"0.95999997854232788D",
";",
"}",
"Vec3D",
"vec3d1",
"=",
"func_182_g",
"(",
"posX",
",",
"posY",
",",
"posZ",
")",
";",
"if",
"(",
"vec3d1",
"!=",
"null",
"&&",
"vec3d",
"!=",
"null",
")",
"{",
"double",
"d28",
"=",
"(",
"vec3d",
".",
"yCoord",
"-",
"vec3d1",
".",
"yCoord",
")",
"*",
"0.050000000000000003D",
";",
"double",
"d14",
"=",
"Math",
".",
"sqrt",
"(",
"motionX",
"*",
"motionX",
"+",
"motionZ",
"*",
"motionZ",
")",
";",
"if",
"(",
"d14",
">",
"0.0D",
")",
"{",
"motionX",
"=",
"(",
"motionX",
"/",
"d14",
")",
"*",
"(",
"d14",
"+",
"d28",
")",
";",
"motionZ",
"=",
"(",
"motionZ",
"/",
"d14",
")",
"*",
"(",
"d14",
"+",
"d28",
")",
";",
"}",
"setPosition",
"(",
"posX",
",",
"vec3d1",
".",
"yCoord",
",",
"posZ",
")",
";",
"}",
"int",
"k1",
"=",
"MathHelper",
".",
"floor_double",
"(",
"posX",
")",
";",
"int",
"l1",
"=",
"MathHelper",
".",
"floor_double",
"(",
"posZ",
")",
";",
"if",
"(",
"k1",
"!=",
"i",
"||",
"l1",
"!=",
"k",
")",
"{",
"double",
"d15",
"=",
"Math",
".",
"sqrt",
"(",
"motionX",
"*",
"motionX",
"+",
"motionZ",
"*",
"motionZ",
")",
";",
"motionX",
"=",
"d15",
"*",
"(",
"double",
")",
"(",
"k1",
"-",
"i",
")",
";",
"motionZ",
"=",
"d15",
"*",
"(",
"double",
")",
"(",
"l1",
"-",
"k",
")",
";",
"}",
"if",
"(",
"minecartType",
"==",
"2",
")",
"{",
"double",
"d30",
"=",
"MathHelper",
".",
"sqrt_double",
"(",
"pushX",
"*",
"pushX",
"+",
"pushZ",
"*",
"pushZ",
")",
";",
"if",
"(",
"d30",
">",
"0.01D",
"&&",
"motionX",
"*",
"motionX",
"+",
"motionZ",
"*",
"motionZ",
">",
"0.001D",
")",
"{",
"pushX",
"/=",
"d30",
";",
"pushZ",
"/=",
"d30",
";",
"if",
"(",
"pushX",
"*",
"motionX",
"+",
"pushZ",
"*",
"motionZ",
"<",
"0.0D",
")",
"{",
"pushX",
"=",
"0.0D",
";",
"pushZ",
"=",
"0.0D",
";",
"}",
"else",
"{",
"pushX",
"=",
"motionX",
";",
"pushZ",
"=",
"motionZ",
";",
"}",
"}",
"}",
"if",
"(",
"flag",
")",
"{",
"double",
"d31",
"=",
"Math",
".",
"sqrt",
"(",
"motionX",
"*",
"motionX",
"+",
"motionZ",
"*",
"motionZ",
")",
";",
"if",
"(",
"d31",
">",
"0.01D",
")",
"{",
"double",
"d32",
"=",
"0.059999999999999998D",
";",
"motionX",
"+=",
"(",
"motionX",
"/",
"d31",
")",
"*",
"d32",
";",
"motionZ",
"+=",
"(",
"motionZ",
"/",
"d31",
")",
"*",
"d32",
";",
"}",
"else",
"if",
"(",
"i1",
"==",
"1",
")",
"{",
"if",
"(",
"worldObj",
".",
"isBlockNormalCube",
"(",
"i",
"-",
"1",
",",
"j",
",",
"k",
")",
")",
"{",
"motionX",
"=",
"0.02D",
";",
"}",
"else",
"if",
"(",
"worldObj",
".",
"isBlockNormalCube",
"(",
"i",
"+",
"1",
",",
"j",
",",
"k",
")",
")",
"{",
"motionX",
"=",
"-",
"0.02D",
";",
"}",
"}",
"else",
"if",
"(",
"i1",
"==",
"0",
")",
"{",
"if",
"(",
"worldObj",
".",
"isBlockNormalCube",
"(",
"i",
",",
"j",
",",
"k",
"-",
"1",
")",
")",
"{",
"motionZ",
"=",
"0.02D",
";",
"}",
"else",
"if",
"(",
"worldObj",
".",
"isBlockNormalCube",
"(",
"i",
",",
"j",
",",
"k",
"+",
"1",
")",
")",
"{",
"motionZ",
"=",
"-",
"0.02D",
";",
"}",
"}",
"}",
"}",
"else",
"{",
"if",
"(",
"motionX",
"<",
"-",
"d2",
")",
"{",
"motionX",
"=",
"-",
"d2",
";",
"}",
"if",
"(",
"motionX",
">",
"d2",
")",
"{",
"motionX",
"=",
"d2",
";",
"}",
"if",
"(",
"motionZ",
"<",
"-",
"d2",
")",
"{",
"motionZ",
"=",
"-",
"d2",
";",
"}",
"if",
"(",
"motionZ",
">",
"d2",
")",
"{",
"motionZ",
"=",
"d2",
";",
"}",
"if",
"(",
"onGround",
")",
"{",
"motionX",
"*=",
"0.5D",
";",
"motionY",
"*=",
"0.5D",
";",
"motionZ",
"*=",
"0.5D",
";",
"}",
"moveEntity",
"(",
"motionX",
",",
"motionY",
",",
"motionZ",
")",
";",
"if",
"(",
"!",
"onGround",
")",
"{",
"motionX",
"*=",
"0.94999998807907104D",
";",
"motionY",
"*=",
"0.94999998807907104D",
";",
"motionZ",
"*=",
"0.94999998807907104D",
";",
"}",
"}",
"rotationPitch",
"=",
"0.0F",
";",
"double",
"d6",
"=",
"prevPosX",
"-",
"posX",
";",
"double",
"d7",
"=",
"prevPosZ",
"-",
"posZ",
";",
"if",
"(",
"d6",
"*",
"d6",
"+",
"d7",
"*",
"d7",
">",
"0.001D",
")",
"{",
"rotationYaw",
"=",
"(",
"float",
")",
"(",
"(",
"Math",
".",
"atan2",
"(",
"d7",
",",
"d6",
")",
"*",
"180D",
")",
"/",
"Math",
".",
"PI",
")",
";",
"if",
"(",
"field_469_aj",
")",
"{",
"rotationYaw",
"+=",
"180F",
";",
"}",
"}",
"double",
"d8",
";",
"for",
"(",
"d8",
"=",
"rotationYaw",
"-",
"prevRotationYaw",
";",
"d8",
">=",
"180D",
";",
"d8",
"-=",
"360D",
")",
"{",
"}",
"for",
"(",
";",
"d8",
"<",
"-",
"180D",
";",
"d8",
"+=",
"360D",
")",
"{",
"}",
"if",
"(",
"d8",
"<",
"-",
"170D",
"||",
"d8",
">=",
"170D",
")",
"{",
"rotationYaw",
"+=",
"180F",
";",
"field_469_aj",
"=",
"!",
"field_469_aj",
";",
"}",
"setRotation",
"(",
"rotationYaw",
",",
"rotationPitch",
")",
";",
"List",
"list",
"=",
"worldObj",
".",
"getEntitiesWithinAABBExcludingEntity",
"(",
"this",
",",
"boundingBox",
".",
"expand",
"(",
"0.20000000298023224D",
",",
"0.0D",
",",
"0.20000000298023224D",
")",
")",
";",
"if",
"(",
"list",
"!=",
"null",
"&&",
"list",
".",
"size",
"(",
")",
">",
"0",
")",
"{",
"for",
"(",
"int",
"j1",
"=",
"0",
";",
"j1",
"<",
"list",
".",
"size",
"(",
")",
";",
"j1",
"++",
")",
"{",
"Entity",
"entity",
"=",
"(",
"Entity",
")",
"list",
".",
"get",
"(",
"j1",
")",
";",
"if",
"(",
"entity",
"!=",
"riddenByEntity",
"&&",
"entity",
".",
"canBePushed",
"(",
")",
"&&",
"(",
"entity",
"instanceof",
"EntityMinecart",
")",
")",
"{",
"entity",
".",
"applyEntityCollision",
"(",
"this",
")",
";",
"}",
"}",
"}",
"if",
"(",
"riddenByEntity",
"!=",
"null",
"&&",
"riddenByEntity",
".",
"isDead",
")",
"{",
"if",
"(",
"riddenByEntity",
".",
"ridingEntity",
"==",
"this",
")",
"{",
"riddenByEntity",
".",
"ridingEntity",
"=",
"null",
";",
"}",
"riddenByEntity",
"=",
"null",
";",
"}",
"if",
"(",
"fuel",
">",
"0",
")",
"{",
"fuel",
"--",
";",
"}",
"if",
"(",
"fuel",
"<=",
"0",
")",
"{",
"pushX",
"=",
"pushZ",
"=",
"0.0D",
";",
"}",
"setMinecartPowered",
"(",
"fuel",
">",
"0",
")",
";",
"}",
"public",
"Vec3D",
"func_182_g",
"(",
"double",
"par1",
",",
"double",
"par3",
",",
"double",
"par5",
")",
"{",
"int",
"i",
"=",
"MathHelper",
".",
"floor_double",
"(",
"par1",
")",
";",
"int",
"j",
"=",
"MathHelper",
".",
"floor_double",
"(",
"par3",
")",
";",
"int",
"k",
"=",
"MathHelper",
".",
"floor_double",
"(",
"par5",
")",
";",
"if",
"(",
"BlockRail",
".",
"isRailBlockAt",
"(",
"worldObj",
",",
"i",
",",
"j",
"-",
"1",
",",
"k",
")",
")",
"{",
"j",
"--",
";",
"}",
"int",
"l",
"=",
"worldObj",
".",
"getBlockId",
"(",
"i",
",",
"j",
",",
"k",
")",
";",
"if",
"(",
"BlockRail",
".",
"isRailBlock",
"(",
"l",
")",
")",
"{",
"int",
"i1",
"=",
"worldObj",
".",
"getBlockMetadata",
"(",
"i",
",",
"j",
",",
"k",
")",
";",
"par3",
"=",
"j",
";",
"if",
"(",
"(",
"(",
"BlockRail",
")",
"Block",
".",
"blocksList",
"[",
"l",
"]",
")",
".",
"isPowered",
"(",
")",
")",
"{",
"i1",
"&=",
"7",
";",
"}",
"if",
"(",
"i1",
">=",
"2",
"&&",
"i1",
"<=",
"5",
")",
"{",
"par3",
"=",
"j",
"+",
"1",
";",
"}",
"int",
"ai",
"[",
"]",
"[",
"]",
"=",
"field_468_ak",
"[",
"i1",
"]",
";",
"double",
"d",
"=",
"0.0D",
";",
"double",
"d1",
"=",
"(",
"double",
")",
"i",
"+",
"0.5D",
"+",
"(",
"double",
")",
"ai",
"[",
"0",
"]",
"[",
"0",
"]",
"*",
"0.5D",
";",
"double",
"d2",
"=",
"(",
"double",
")",
"j",
"+",
"0.5D",
"+",
"(",
"double",
")",
"ai",
"[",
"0",
"]",
"[",
"1",
"]",
"*",
"0.5D",
";",
"double",
"d3",
"=",
"(",
"double",
")",
"k",
"+",
"0.5D",
"+",
"(",
"double",
")",
"ai",
"[",
"0",
"]",
"[",
"2",
"]",
"*",
"0.5D",
";",
"double",
"d4",
"=",
"(",
"double",
")",
"i",
"+",
"0.5D",
"+",
"(",
"double",
")",
"ai",
"[",
"1",
"]",
"[",
"0",
"]",
"*",
"0.5D",
";",
"double",
"d5",
"=",
"(",
"double",
")",
"j",
"+",
"0.5D",
"+",
"(",
"double",
")",
"ai",
"[",
"1",
"]",
"[",
"1",
"]",
"*",
"0.5D",
";",
"double",
"d6",
"=",
"(",
"double",
")",
"k",
"+",
"0.5D",
"+",
"(",
"double",
")",
"ai",
"[",
"1",
"]",
"[",
"2",
"]",
"*",
"0.5D",
";",
"double",
"d7",
"=",
"d4",
"-",
"d1",
";",
"double",
"d8",
"=",
"(",
"d5",
"-",
"d2",
")",
"*",
"2D",
";",
"double",
"d9",
"=",
"d6",
"-",
"d3",
";",
"if",
"(",
"d7",
"==",
"0.0D",
")",
"{",
"par1",
"=",
"(",
"double",
")",
"i",
"+",
"0.5D",
";",
"d",
"=",
"par5",
"-",
"(",
"double",
")",
"k",
";",
"}",
"else",
"if",
"(",
"d9",
"==",
"0.0D",
")",
"{",
"par5",
"=",
"(",
"double",
")",
"k",
"+",
"0.5D",
";",
"d",
"=",
"par1",
"-",
"(",
"double",
")",
"i",
";",
"}",
"else",
"{",
"double",
"d10",
"=",
"par1",
"-",
"d1",
";",
"double",
"d11",
"=",
"par5",
"-",
"d3",
";",
"double",
"d12",
"=",
"(",
"d10",
"*",
"d7",
"+",
"d11",
"*",
"d9",
")",
"*",
"2D",
";",
"d",
"=",
"d12",
";",
"}",
"par1",
"=",
"d1",
"+",
"d7",
"*",
"d",
";",
"par3",
"=",
"d2",
"+",
"d8",
"*",
"d",
";",
"par5",
"=",
"d3",
"+",
"d9",
"*",
"d",
";",
"if",
"(",
"d8",
"<",
"0.0D",
")",
"{",
"par3",
"++",
";",
"}",
"if",
"(",
"d8",
">",
"0.0D",
")",
"{",
"par3",
"+=",
"0.5D",
";",
"}",
"return",
"Vec3D",
".",
"createVector",
"(",
"par1",
",",
"par3",
",",
"par5",
")",
";",
"}",
"else",
"{",
"return",
"null",
";",
"}",
"}",
"protected",
"void",
"writeEntityToNBT",
"(",
"NBTTagCompound",
"par1NBTTagCompound",
")",
"{",
"par1NBTTagCompound",
".",
"setInteger",
"(",
"\"Type\"",
",",
"minecartType",
")",
";",
"if",
"(",
"minecartType",
"==",
"2",
")",
"{",
"par1NBTTagCompound",
".",
"setDouble",
"(",
"\"PushX\"",
",",
"pushX",
")",
";",
"par1NBTTagCompound",
".",
"setDouble",
"(",
"\"PushZ\"",
",",
"pushZ",
")",
";",
"par1NBTTagCompound",
".",
"setShort",
"(",
"\"Fuel\"",
",",
"(",
"short",
")",
"fuel",
")",
";",
"}",
"else",
"if",
"(",
"minecartType",
"==",
"1",
")",
"{",
"NBTTagList",
"nbttaglist",
"=",
"new",
"NBTTagList",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"cargoItems",
".",
"length",
";",
"i",
"++",
")",
"{",
"if",
"(",
"cargoItems",
"[",
"i",
"]",
"!=",
"null",
")",
"{",
"NBTTagCompound",
"nbttagcompound",
"=",
"new",
"NBTTagCompound",
"(",
")",
";",
"nbttagcompound",
".",
"setByte",
"(",
"\"Slot\"",
",",
"(",
"byte",
")",
"i",
")",
";",
"cargoItems",
"[",
"i",
"]",
".",
"writeToNBT",
"(",
"nbttagcompound",
")",
";",
"nbttaglist",
".",
"appendTag",
"(",
"nbttagcompound",
")",
";",
"}",
"}",
"par1NBTTagCompound",
".",
"setTag",
"(",
"\"Items\"",
",",
"nbttaglist",
")",
";",
"}",
"}",
"protected",
"void",
"readEntityFromNBT",
"(",
"NBTTagCompound",
"par1NBTTagCompound",
")",
"{",
"minecartType",
"=",
"par1NBTTagCompound",
".",
"getInteger",
"(",
"\"Type\"",
")",
";",
"if",
"(",
"minecartType",
"==",
"2",
")",
"{",
"pushX",
"=",
"par1NBTTagCompound",
".",
"getDouble",
"(",
"\"PushX\"",
")",
";",
"pushZ",
"=",
"par1NBTTagCompound",
".",
"getDouble",
"(",
"\"PushZ\"",
")",
";",
"fuel",
"=",
"par1NBTTagCompound",
".",
"getShort",
"(",
"\"Fuel\"",
")",
";",
"}",
"else",
"if",
"(",
"minecartType",
"==",
"1",
")",
"{",
"NBTTagList",
"nbttaglist",
"=",
"par1NBTTagCompound",
".",
"getTagList",
"(",
"\"Items\"",
")",
";",
"cargoItems",
"=",
"new",
"ItemStack",
"[",
"getSizeInventory",
"(",
")",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"nbttaglist",
".",
"tagCount",
"(",
")",
";",
"i",
"++",
")",
"{",
"NBTTagCompound",
"nbttagcompound",
"=",
"(",
"NBTTagCompound",
")",
"nbttaglist",
".",
"tagAt",
"(",
"i",
")",
";",
"int",
"j",
"=",
"nbttagcompound",
".",
"getByte",
"(",
"\"Slot\"",
")",
"&",
"0xff",
";",
"if",
"(",
"j",
">=",
"0",
"&&",
"j",
"<",
"cargoItems",
".",
"length",
")",
"{",
"cargoItems",
"[",
"j",
"]",
"=",
"ItemStack",
".",
"loadItemStackFromNBT",
"(",
"nbttagcompound",
")",
";",
"}",
"}",
"}",
"}",
"public",
"void",
"applyEntityCollision",
"(",
"Entity",
"par1Entity",
")",
"{",
"if",
"(",
"worldObj",
".",
"isRemote",
")",
"{",
"return",
";",
"}",
"if",
"(",
"par1Entity",
"==",
"riddenByEntity",
")",
"{",
"return",
";",
"}",
"if",
"(",
"(",
"par1Entity",
"instanceof",
"EntityLiving",
")",
"&&",
"!",
"(",
"par1Entity",
"instanceof",
"EntityPlayer",
")",
"&&",
"!",
"(",
"par1Entity",
"instanceof",
"EntityIronGolem",
")",
"&&",
"minecartType",
"==",
"0",
"&&",
"motionX",
"*",
"motionX",
"+",
"motionZ",
"*",
"motionZ",
">",
"0.01D",
"&&",
"riddenByEntity",
"==",
"null",
"&&",
"par1Entity",
".",
"ridingEntity",
"==",
"null",
")",
"{",
"par1Entity",
".",
"mountEntity",
"(",
"this",
")",
";",
"}",
"double",
"d",
"=",
"par1Entity",
".",
"posX",
"-",
"posX",
";",
"double",
"d1",
"=",
"par1Entity",
".",
"posZ",
"-",
"posZ",
";",
"double",
"d2",
"=",
"d",
"*",
"d",
"+",
"d1",
"*",
"d1",
";",
"if",
"(",
"d2",
">=",
"9.9999997473787516E-005D",
")",
"{",
"d2",
"=",
"MathHelper",
".",
"sqrt_double",
"(",
"d2",
")",
";",
"d",
"/=",
"d2",
";",
"d1",
"/=",
"d2",
";",
"double",
"d3",
"=",
"1.0D",
"/",
"d2",
";",
"if",
"(",
"d3",
">",
"1.0D",
")",
"{",
"d3",
"=",
"1.0D",
";",
"}",
"d",
"*=",
"d3",
";",
"d1",
"*=",
"d3",
";",
"d",
"*=",
"0.10000000149011612D",
";",
"d1",
"*=",
"0.10000000149011612D",
";",
"d",
"*=",
"1.0F",
"-",
"entityCollisionReduction",
";",
"d1",
"*=",
"1.0F",
"-",
"entityCollisionReduction",
";",
"d",
"*=",
"0.5D",
";",
"d1",
"*=",
"0.5D",
";",
"if",
"(",
"par1Entity",
"instanceof",
"EntityMinecart",
")",
"{",
"double",
"d4",
"=",
"par1Entity",
".",
"posX",
"-",
"posX",
";",
"double",
"d5",
"=",
"par1Entity",
".",
"posZ",
"-",
"posZ",
";",
"Vec3D",
"vec3d",
"=",
"Vec3D",
".",
"createVector",
"(",
"d4",
",",
"0.0D",
",",
"d5",
")",
".",
"normalize",
"(",
")",
";",
"Vec3D",
"vec3d1",
"=",
"Vec3D",
".",
"createVector",
"(",
"MathHelper",
".",
"cos",
"(",
"(",
"rotationYaw",
"*",
"(",
"float",
")",
"Math",
".",
"PI",
")",
"/",
"180F",
")",
",",
"0.0D",
",",
"MathHelper",
".",
"sin",
"(",
"(",
"rotationYaw",
"*",
"(",
"float",
")",
"Math",
".",
"PI",
")",
"/",
"180F",
")",
")",
".",
"normalize",
"(",
")",
";",
"double",
"d6",
"=",
"Math",
".",
"abs",
"(",
"vec3d",
".",
"dotProduct",
"(",
"vec3d1",
")",
")",
";",
"if",
"(",
"d6",
"<",
"0.80000001192092896D",
")",
"{",
"return",
";",
"}",
"double",
"d7",
"=",
"par1Entity",
".",
"motionX",
"+",
"motionX",
";",
"double",
"d8",
"=",
"par1Entity",
".",
"motionZ",
"+",
"motionZ",
";",
"if",
"(",
"(",
"(",
"EntityMinecart",
")",
"par1Entity",
")",
".",
"minecartType",
"==",
"2",
"&&",
"minecartType",
"!=",
"2",
")",
"{",
"motionX",
"*=",
"0.20000000298023224D",
";",
"motionZ",
"*=",
"0.20000000298023224D",
";",
"addVelocity",
"(",
"par1Entity",
".",
"motionX",
"-",
"d",
",",
"0.0D",
",",
"par1Entity",
".",
"motionZ",
"-",
"d1",
")",
";",
"par1Entity",
".",
"motionX",
"*=",
"0.94999998807907104D",
";",
"par1Entity",
".",
"motionZ",
"*=",
"0.94999998807907104D",
";",
"}",
"else",
"if",
"(",
"(",
"(",
"EntityMinecart",
")",
"par1Entity",
")",
".",
"minecartType",
"!=",
"2",
"&&",
"minecartType",
"==",
"2",
")",
"{",
"par1Entity",
".",
"motionX",
"*=",
"0.20000000298023224D",
";",
"par1Entity",
".",
"motionZ",
"*=",
"0.20000000298023224D",
";",
"par1Entity",
".",
"addVelocity",
"(",
"motionX",
"+",
"d",
",",
"0.0D",
",",
"motionZ",
"+",
"d1",
")",
";",
"motionX",
"*=",
"0.94999998807907104D",
";",
"motionZ",
"*=",
"0.94999998807907104D",
";",
"}",
"else",
"{",
"d7",
"/=",
"2D",
";",
"d8",
"/=",
"2D",
";",
"motionX",
"*=",
"0.20000000298023224D",
";",
"motionZ",
"*=",
"0.20000000298023224D",
";",
"addVelocity",
"(",
"d7",
"-",
"d",
",",
"0.0D",
",",
"d8",
"-",
"d1",
")",
";",
"par1Entity",
".",
"motionX",
"*=",
"0.20000000298023224D",
";",
"par1Entity",
".",
"motionZ",
"*=",
"0.20000000298023224D",
";",
"par1Entity",
".",
"addVelocity",
"(",
"d7",
"+",
"d",
",",
"0.0D",
",",
"d8",
"+",
"d1",
")",
";",
"}",
"}",
"else",
"{",
"addVelocity",
"(",
"-",
"d",
",",
"0.0D",
",",
"-",
"d1",
")",
";",
"par1Entity",
".",
"addVelocity",
"(",
"d",
"/",
"4D",
",",
"0.0D",
",",
"d1",
"/",
"4D",
")",
";",
"}",
"}",
"}",
"public",
"int",
"getSizeInventory",
"(",
")",
"{",
"return",
"27",
";",
"}",
"public",
"ItemStack",
"getStackInSlot",
"(",
"int",
"par1",
")",
"{",
"return",
"cargoItems",
"[",
"par1",
"]",
";",
"}",
"public",
"ItemStack",
"decrStackSize",
"(",
"int",
"par1",
",",
"int",
"par2",
")",
"{",
"if",
"(",
"cargoItems",
"[",
"par1",
"]",
"!=",
"null",
")",
"{",
"if",
"(",
"cargoItems",
"[",
"par1",
"]",
".",
"stackSize",
"<=",
"par2",
")",
"{",
"ItemStack",
"itemstack",
"=",
"cargoItems",
"[",
"par1",
"]",
";",
"cargoItems",
"[",
"par1",
"]",
"=",
"null",
";",
"return",
"itemstack",
";",
"}",
"ItemStack",
"itemstack1",
"=",
"cargoItems",
"[",
"par1",
"]",
".",
"splitStack",
"(",
"par2",
")",
";",
"if",
"(",
"cargoItems",
"[",
"par1",
"]",
".",
"stackSize",
"==",
"0",
")",
"{",
"cargoItems",
"[",
"par1",
"]",
"=",
"null",
";",
"}",
"return",
"itemstack1",
";",
"}",
"else",
"{",
"return",
"null",
";",
"}",
"}",
"public",
"ItemStack",
"getStackInSlotOnClosing",
"(",
"int",
"par1",
")",
"{",
"if",
"(",
"cargoItems",
"[",
"par1",
"]",
"!=",
"null",
")",
"{",
"ItemStack",
"itemstack",
"=",
"cargoItems",
"[",
"par1",
"]",
";",
"cargoItems",
"[",
"par1",
"]",
"=",
"null",
";",
"return",
"itemstack",
";",
"}",
"else",
"{",
"return",
"null",
";",
"}",
"}",
"public",
"void",
"setInventorySlotContents",
"(",
"int",
"par1",
",",
"ItemStack",
"par2ItemStack",
")",
"{",
"cargoItems",
"[",
"par1",
"]",
"=",
"par2ItemStack",
";",
"if",
"(",
"par2ItemStack",
"!=",
"null",
"&&",
"par2ItemStack",
".",
"stackSize",
">",
"getInventoryStackLimit",
"(",
")",
")",
"{",
"par2ItemStack",
".",
"stackSize",
"=",
"getInventoryStackLimit",
"(",
")",
";",
"}",
"}",
"public",
"String",
"getInvName",
"(",
")",
"{",
"return",
"\"\"",
";",
"}",
"public",
"int",
"getInventoryStackLimit",
"(",
")",
"{",
"return",
"64",
";",
"}",
"public",
"void",
"onInventoryChanged",
"(",
")",
"{",
"}",
"public",
"boolean",
"interact",
"(",
"EntityPlayer",
"par1EntityPlayer",
")",
"{",
"if",
"(",
"minecartType",
"==",
"0",
")",
"{",
"if",
"(",
"riddenByEntity",
"!=",
"null",
"&&",
"(",
"riddenByEntity",
"instanceof",
"EntityPlayer",
")",
"&&",
"riddenByEntity",
"!=",
"par1EntityPlayer",
")",
"{",
"return",
"true",
";",
"}",
"if",
"(",
"!",
"worldObj",
".",
"isRemote",
")",
"{",
"par1EntityPlayer",
".",
"mountEntity",
"(",
"this",
")",
";",
"}",
"}",
"else",
"if",
"(",
"minecartType",
"==",
"1",
")",
"{",
"if",
"(",
"!",
"worldObj",
".",
"isRemote",
")",
"{",
"par1EntityPlayer",
".",
"displayGUIChest",
"(",
"this",
")",
";",
"}",
"}",
"else",
"if",
"(",
"minecartType",
"==",
"2",
")",
"{",
"ItemStack",
"itemstack",
"=",
"par1EntityPlayer",
".",
"inventory",
".",
"getCurrentItem",
"(",
")",
";",
"if",
"(",
"itemstack",
"!=",
"null",
"&&",
"itemstack",
".",
"itemID",
"==",
"Item",
".",
"coal",
".",
"shiftedIndex",
")",
"{",
"if",
"(",
"--",
"itemstack",
".",
"stackSize",
"==",
"0",
")",
"{",
"par1EntityPlayer",
".",
"inventory",
".",
"setInventorySlotContents",
"(",
"par1EntityPlayer",
".",
"inventory",
".",
"currentItem",
",",
"null",
")",
";",
"}",
"fuel",
"+=",
"3600",
";",
"}",
"pushX",
"=",
"posX",
"-",
"par1EntityPlayer",
".",
"posX",
";",
"pushZ",
"=",
"posZ",
"-",
"par1EntityPlayer",
".",
"posZ",
";",
"}",
"return",
"true",
";",
"}",
"public",
"boolean",
"isUseableByPlayer",
"(",
"EntityPlayer",
"par1EntityPlayer",
")",
"{",
"if",
"(",
"isDead",
")",
"{",
"return",
"false",
";",
"}",
"return",
"par1EntityPlayer",
".",
"getDistanceSqToEntity",
"(",
"this",
")",
"<=",
"64D",
";",
"}",
"protected",
"boolean",
"isMinecartPowered",
"(",
")",
"{",
"return",
"(",
"dataWatcher",
".",
"getWatchableObjectByte",
"(",
"16",
")",
"&",
"1",
")",
"!=",
"0",
";",
"}",
"protected",
"void",
"setMinecartPowered",
"(",
"boolean",
"par1",
")",
"{",
"if",
"(",
"par1",
")",
"{",
"dataWatcher",
".",
"updateObject",
"(",
"16",
",",
"Byte",
".",
"valueOf",
"(",
"(",
"byte",
")",
"(",
"dataWatcher",
".",
"getWatchableObjectByte",
"(",
"16",
")",
"|",
"1",
")",
")",
")",
";",
"}",
"else",
"{",
"dataWatcher",
".",
"updateObject",
"(",
"16",
",",
"Byte",
".",
"valueOf",
"(",
"(",
"byte",
")",
"(",
"dataWatcher",
".",
"getWatchableObjectByte",
"(",
"16",
")",
"&",
"-",
"2",
")",
")",
")",
";",
"}",
"}",
"public",
"void",
"openChest",
"(",
")",
"{",
"}",
"public",
"void",
"closeChest",
"(",
")",
"{",
"}",
"public",
"void",
"func_41018_e_",
"(",
"int",
"par1",
")",
"{",
"dataWatcher",
".",
"updateObject",
"(",
"19",
",",
"Integer",
".",
"valueOf",
"(",
"par1",
")",
")",
";",
"}",
"public",
"int",
"func_41020_o",
"(",
")",
"{",
"return",
"dataWatcher",
".",
"getWatchableObjectInt",
"(",
"19",
")",
";",
"}",
"public",
"void",
"func_41014_b",
"(",
"int",
"par1",
")",
"{",
"dataWatcher",
".",
"updateObject",
"(",
"17",
",",
"Integer",
".",
"valueOf",
"(",
"par1",
")",
")",
";",
"}",
"public",
"int",
"func_41019_p",
"(",
")",
"{",
"return",
"dataWatcher",
".",
"getWatchableObjectInt",
"(",
"17",
")",
";",
"}",
"public",
"void",
"func_41016_d",
"(",
"int",
"par1",
")",
"{",
"dataWatcher",
".",
"updateObject",
"(",
"18",
",",
"Integer",
".",
"valueOf",
"(",
"par1",
")",
")",
";",
"}",
"public",
"int",
"func_41021_q",
"(",
")",
"{",
"return",
"dataWatcher",
".",
"getWatchableObjectInt",
"(",
"18",
")",
";",
"}",
"}",
"</s>"
] |
9,427 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"enum",
"EnumArmorMaterial",
"{",
"CLOTH",
"(",
"5",
",",
"new",
"int",
"[",
"]",
"{",
"1",
",",
"3",
",",
"2",
",",
"1",
"}",
",",
"15",
")",
",",
"CHAIN",
"(",
"15",
",",
"new",
"int",
"[",
"]",
"{",
"2",
",",
"5",
",",
"4",
",",
"1",
"}",
",",
"12",
")",
",",
"IRON",
"(",
"15",
",",
"new",
"int",
"[",
"]",
"{",
"2",
",",
"6",
",",
"5",
",",
"2",
"}",
",",
"9",
")",
",",
"GOLD",
"(",
"7",
",",
"new",
"int",
"[",
"]",
"{",
"2",
",",
"5",
",",
"3",
",",
"1",
"}",
",",
"25",
")",
",",
"DIAMOND",
"(",
"33",
",",
"new",
"int",
"[",
"]",
"{",
"3",
",",
"8",
",",
"6",
",",
"3",
"}",
",",
"10",
")",
";",
"private",
"int",
"maxDamageFactor",
";",
"private",
"int",
"damageReductionAmountArray",
"[",
"]",
";",
"private",
"int",
"enchantability",
";",
"private",
"EnumArmorMaterial",
"(",
"int",
"par3",
",",
"int",
"par4ArrayOfInteger",
"[",
"]",
",",
"int",
"par5",
")",
"{",
"maxDamageFactor",
"=",
"par3",
";",
"damageReductionAmountArray",
"=",
"par4ArrayOfInteger",
";",
"enchantability",
"=",
"par5",
";",
"}",
"public",
"int",
"getDurability",
"(",
"int",
"par1",
")",
"{",
"return",
"ItemArmor",
".",
"getMaxDamageArray",
"(",
")",
"[",
"par1",
"]",
"*",
"maxDamageFactor",
";",
"}",
"public",
"int",
"getDamageReductionAmount",
"(",
"int",
"par1",
")",
"{",
"return",
"damageReductionAmountArray",
"[",
"par1",
"]",
";",
"}",
"public",
"int",
"getEnchantability",
"(",
")",
"{",
"return",
"enchantability",
";",
"}",
"}",
"</s>"
] |
9,428 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"class",
"PotionHealth",
"extends",
"Potion",
"{",
"public",
"PotionHealth",
"(",
"int",
"par1",
",",
"boolean",
"par2",
",",
"int",
"par3",
")",
"{",
"super",
"(",
"par1",
",",
"par2",
",",
"par3",
")",
";",
"}",
"public",
"boolean",
"isInstant",
"(",
")",
"{",
"return",
"true",
";",
"}",
"public",
"boolean",
"isReady",
"(",
"int",
"par1",
",",
"int",
"par2",
")",
"{",
"return",
"par1",
">=",
"1",
";",
"}",
"}",
"</s>"
] |
9,429 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"class",
"ItemCoal",
"extends",
"Item",
"{",
"public",
"ItemCoal",
"(",
"int",
"par1",
")",
"{",
"super",
"(",
"par1",
")",
";",
"setHasSubtypes",
"(",
"true",
")",
";",
"setMaxDamage",
"(",
"0",
")",
";",
"}",
"public",
"String",
"getItemNameIS",
"(",
"ItemStack",
"par1ItemStack",
")",
"{",
"if",
"(",
"par1ItemStack",
".",
"getItemDamage",
"(",
")",
"==",
"1",
")",
"{",
"return",
"\"\"",
";",
"}",
"else",
"{",
"return",
"\"item.coal\"",
";",
"}",
"}",
"}",
"</s>"
] |
9,430 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"ItemFishingRod",
"extends",
"Item",
"{",
"public",
"ItemFishingRod",
"(",
"int",
"par1",
")",
"{",
"super",
"(",
"par1",
")",
";",
"setMaxDamage",
"(",
"64",
")",
";",
"setMaxStackSize",
"(",
"1",
")",
";",
"}",
"public",
"ItemStack",
"onItemRightClick",
"(",
"ItemStack",
"par1ItemStack",
",",
"World",
"par2World",
",",
"EntityPlayer",
"par3EntityPlayer",
")",
"{",
"if",
"(",
"par3EntityPlayer",
".",
"fishEntity",
"!=",
"null",
")",
"{",
"int",
"i",
"=",
"par3EntityPlayer",
".",
"fishEntity",
".",
"catchFish",
"(",
")",
";",
"par1ItemStack",
".",
"damageItem",
"(",
"i",
",",
"par3EntityPlayer",
")",
";",
"par3EntityPlayer",
".",
"swingItem",
"(",
")",
";",
"}",
"else",
"{",
"par2World",
".",
"playSoundAtEntity",
"(",
"par3EntityPlayer",
",",
"\"random.bow\"",
",",
"0.5F",
",",
"0.4F",
"/",
"(",
"itemRand",
".",
"nextFloat",
"(",
")",
"*",
"0.4F",
"+",
"0.8F",
")",
")",
";",
"if",
"(",
"!",
"par2World",
".",
"isRemote",
")",
"{",
"par2World",
".",
"spawnEntityInWorld",
"(",
"new",
"EntityFishHook",
"(",
"par2World",
",",
"par3EntityPlayer",
")",
")",
";",
"}",
"par3EntityPlayer",
".",
"swingItem",
"(",
")",
";",
"}",
"return",
"par1ItemStack",
";",
"}",
"}",
"</s>"
] |
9,431 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"EntitySquid",
"extends",
"EntityWaterMob",
"{",
"public",
"float",
"field_21063_a",
";",
"public",
"float",
"field_21062_b",
";",
"public",
"float",
"field_21061_c",
";",
"public",
"float",
"field_21059_f",
";",
"public",
"float",
"field_21060_ak",
";",
"public",
"float",
"field_21058_al",
";",
"public",
"float",
"tentacleAngle",
";",
"public",
"float",
"lastTentacleAngle",
";",
"private",
"float",
"randomMotionSpeed",
";",
"private",
"float",
"field_21054_ap",
";",
"private",
"float",
"field_21053_aq",
";",
"private",
"float",
"randomMotionVecX",
";",
"private",
"float",
"randomMotionVecY",
";",
"private",
"float",
"randomMotionVecZ",
";",
"public",
"EntitySquid",
"(",
"World",
"par1World",
")",
"{",
"super",
"(",
"par1World",
")",
";",
"field_21063_a",
"=",
"0.0F",
";",
"field_21062_b",
"=",
"0.0F",
";",
"field_21061_c",
"=",
"0.0F",
";",
"field_21059_f",
"=",
"0.0F",
";",
"field_21060_ak",
"=",
"0.0F",
";",
"field_21058_al",
"=",
"0.0F",
";",
"tentacleAngle",
"=",
"0.0F",
";",
"lastTentacleAngle",
"=",
"0.0F",
";",
"randomMotionSpeed",
"=",
"0.0F",
";",
"field_21054_ap",
"=",
"0.0F",
";",
"field_21053_aq",
"=",
"0.0F",
";",
"randomMotionVecX",
"=",
"0.0F",
";",
"randomMotionVecY",
"=",
"0.0F",
";",
"randomMotionVecZ",
"=",
"0.0F",
";",
"texture",
"=",
"\"\"",
";",
"setSize",
"(",
"0.95F",
",",
"0.95F",
")",
";",
"field_21054_ap",
"=",
"(",
"1.0F",
"/",
"(",
"rand",
".",
"nextFloat",
"(",
")",
"+",
"1.0F",
")",
")",
"*",
"0.2F",
";",
"}",
"public",
"int",
"getMaxHealth",
"(",
")",
"{",
"return",
"10",
";",
"}",
"public",
"void",
"writeEntityToNBT",
"(",
"NBTTagCompound",
"par1NBTTagCompound",
")",
"{",
"super",
".",
"writeEntityToNBT",
"(",
"par1NBTTagCompound",
")",
";",
"}",
"public",
"void",
"readEntityFromNBT",
"(",
"NBTTagCompound",
"par1NBTTagCompound",
")",
"{",
"super",
".",
"readEntityFromNBT",
"(",
"par1NBTTagCompound",
")",
";",
"}",
"protected",
"String",
"getLivingSound",
"(",
")",
"{",
"return",
"null",
";",
"}",
"protected",
"String",
"getHurtSound",
"(",
")",
"{",
"return",
"null",
";",
"}",
"protected",
"String",
"getDeathSound",
"(",
")",
"{",
"return",
"null",
";",
"}",
"protected",
"float",
"getSoundVolume",
"(",
")",
"{",
"return",
"0.4F",
";",
"}",
"protected",
"int",
"getDropItemId",
"(",
")",
"{",
"return",
"0",
";",
"}",
"protected",
"void",
"dropFewItems",
"(",
"boolean",
"par1",
",",
"int",
"par2",
")",
"{",
"int",
"i",
"=",
"rand",
".",
"nextInt",
"(",
"3",
"+",
"par2",
")",
"+",
"1",
";",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
"i",
";",
"j",
"++",
")",
"{",
"entityDropItem",
"(",
"new",
"ItemStack",
"(",
"Item",
".",
"dyePowder",
",",
"1",
",",
"0",
")",
",",
"0.0F",
")",
";",
"}",
"}",
"public",
"boolean",
"interact",
"(",
"EntityPlayer",
"par1EntityPlayer",
")",
"{",
"return",
"super",
".",
"interact",
"(",
"par1EntityPlayer",
")",
";",
"}",
"public",
"boolean",
"isInWater",
"(",
")",
"{",
"return",
"worldObj",
".",
"handleMaterialAcceleration",
"(",
"boundingBox",
".",
"expand",
"(",
"0.0D",
",",
"-",
"0.60000002384185791D",
",",
"0.0D",
")",
",",
"Material",
".",
"water",
",",
"this",
")",
";",
"}",
"public",
"void",
"onLivingUpdate",
"(",
")",
"{",
"super",
".",
"onLivingUpdate",
"(",
")",
";",
"field_21062_b",
"=",
"field_21063_a",
";",
"field_21059_f",
"=",
"field_21061_c",
";",
"field_21058_al",
"=",
"field_21060_ak",
";",
"lastTentacleAngle",
"=",
"tentacleAngle",
";",
"field_21060_ak",
"+=",
"field_21054_ap",
";",
"if",
"(",
"field_21060_ak",
">",
"(",
"(",
"float",
")",
"Math",
".",
"PI",
"*",
"2F",
")",
")",
"{",
"field_21060_ak",
"-=",
"(",
"(",
"float",
")",
"Math",
".",
"PI",
"*",
"2F",
")",
";",
"if",
"(",
"rand",
".",
"nextInt",
"(",
"10",
")",
"==",
"0",
")",
"{",
"field_21054_ap",
"=",
"(",
"1.0F",
"/",
"(",
"rand",
".",
"nextFloat",
"(",
")",
"+",
"1.0F",
")",
")",
"*",
"0.2F",
";",
"}",
"}",
"if",
"(",
"isInWater",
"(",
")",
")",
"{",
"if",
"(",
"field_21060_ak",
"<",
"(",
"float",
")",
"Math",
".",
"PI",
")",
"{",
"float",
"f",
"=",
"field_21060_ak",
"/",
"(",
"float",
")",
"Math",
".",
"PI",
";",
"tentacleAngle",
"=",
"MathHelper",
".",
"sin",
"(",
"f",
"*",
"f",
"*",
"(",
"float",
")",
"Math",
".",
"PI",
")",
"*",
"(",
"float",
")",
"Math",
".",
"PI",
"*",
"0.25F",
";",
"if",
"(",
"(",
"double",
")",
"f",
">",
"0.75D",
")",
"{",
"randomMotionSpeed",
"=",
"1.0F",
";",
"field_21053_aq",
"=",
"1.0F",
";",
"}",
"else",
"{",
"field_21053_aq",
"=",
"field_21053_aq",
"*",
"0.8F",
";",
"}",
"}",
"else",
"{",
"tentacleAngle",
"=",
"0.0F",
";",
"randomMotionSpeed",
"=",
"randomMotionSpeed",
"*",
"0.9F",
";",
"field_21053_aq",
"=",
"field_21053_aq",
"*",
"0.99F",
";",
"}",
"if",
"(",
"!",
"worldObj",
".",
"isRemote",
")",
"{",
"motionX",
"=",
"randomMotionVecX",
"*",
"randomMotionSpeed",
";",
"motionY",
"=",
"randomMotionVecY",
"*",
"randomMotionSpeed",
";",
"motionZ",
"=",
"randomMotionVecZ",
"*",
"randomMotionSpeed",
";",
"}",
"float",
"f1",
"=",
"MathHelper",
".",
"sqrt_double",
"(",
"motionX",
"*",
"motionX",
"+",
"motionZ",
"*",
"motionZ",
")",
";",
"renderYawOffset",
"+=",
"(",
"(",
"-",
"(",
"float",
")",
"Math",
".",
"atan2",
"(",
"motionX",
",",
"motionZ",
")",
"*",
"180F",
")",
"/",
"(",
"float",
")",
"Math",
".",
"PI",
"-",
"renderYawOffset",
")",
"*",
"0.1F",
";",
"rotationYaw",
"=",
"renderYawOffset",
";",
"field_21061_c",
"=",
"field_21061_c",
"+",
"(",
"float",
")",
"Math",
".",
"PI",
"*",
"field_21053_aq",
"*",
"1.5F",
";",
"field_21063_a",
"+=",
"(",
"(",
"-",
"(",
"float",
")",
"Math",
".",
"atan2",
"(",
"f1",
",",
"motionY",
")",
"*",
"180F",
")",
"/",
"(",
"float",
")",
"Math",
".",
"PI",
"-",
"field_21063_a",
")",
"*",
"0.1F",
";",
"}",
"else",
"{",
"tentacleAngle",
"=",
"MathHelper",
".",
"abs",
"(",
"MathHelper",
".",
"sin",
"(",
"field_21060_ak",
")",
")",
"*",
"(",
"float",
")",
"Math",
".",
"PI",
"*",
"0.25F",
";",
"if",
"(",
"!",
"worldObj",
".",
"isRemote",
")",
"{",
"motionX",
"=",
"0.0D",
";",
"motionY",
"-=",
"0.080000000000000002D",
";",
"motionY",
"*=",
"0.98000001907348633D",
";",
"motionZ",
"=",
"0.0D",
";",
"}",
"field_21063_a",
"+=",
"(",
"double",
")",
"(",
"-",
"90F",
"-",
"field_21063_a",
")",
"*",
"0.02D",
";",
"}",
"}",
"public",
"void",
"moveEntityWithHeading",
"(",
"float",
"par1",
",",
"float",
"par2",
")",
"{",
"moveEntity",
"(",
"motionX",
",",
"motionY",
",",
"motionZ",
")",
";",
"}",
"protected",
"void",
"updateEntityActionState",
"(",
")",
"{",
"entityAge",
"++",
";",
"if",
"(",
"entityAge",
">",
"100",
")",
"{",
"randomMotionVecX",
"=",
"randomMotionVecY",
"=",
"randomMotionVecZ",
"=",
"0.0F",
";",
"}",
"else",
"if",
"(",
"rand",
".",
"nextInt",
"(",
"50",
")",
"==",
"0",
"||",
"!",
"inWater",
"||",
"randomMotionVecX",
"==",
"0.0F",
"&&",
"randomMotionVecY",
"==",
"0.0F",
"&&",
"randomMotionVecZ",
"==",
"0.0F",
")",
"{",
"float",
"f",
"=",
"rand",
".",
"nextFloat",
"(",
")",
"*",
"(",
"float",
")",
"Math",
".",
"PI",
"*",
"2.0F",
";",
"randomMotionVecX",
"=",
"MathHelper",
".",
"cos",
"(",
"f",
")",
"*",
"0.2F",
";",
"randomMotionVecY",
"=",
"-",
"0.1F",
"+",
"rand",
".",
"nextFloat",
"(",
")",
"*",
"0.2F",
";",
"randomMotionVecZ",
"=",
"MathHelper",
".",
"sin",
"(",
"f",
")",
"*",
"0.2F",
";",
"}",
"despawnEntity",
"(",
")",
";",
"}",
"public",
"boolean",
"getCanSpawnHere",
"(",
")",
"{",
"return",
"posY",
">",
"45D",
"&&",
"posY",
"<",
"63D",
"&&",
"super",
".",
"getCanSpawnHere",
"(",
")",
";",
"}",
"}",
"</s>"
] |
9,432 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"class",
"EntityAIFollowOwner",
"extends",
"EntityAIBase",
"{",
"private",
"EntityTameable",
"thePet",
";",
"private",
"EntityLiving",
"theOwner",
";",
"World",
"theWorld",
";",
"private",
"float",
"field_48245_f",
";",
"private",
"PathNavigate",
"petPathfinder",
";",
"private",
"int",
"field_48252_h",
";",
"float",
"maxDist",
";",
"float",
"minDist",
";",
"private",
"boolean",
"field_48253_i",
";",
"public",
"EntityAIFollowOwner",
"(",
"EntityTameable",
"par1EntityTameable",
",",
"float",
"par2",
",",
"float",
"par3",
",",
"float",
"par4",
")",
"{",
"thePet",
"=",
"par1EntityTameable",
";",
"theWorld",
"=",
"par1EntityTameable",
".",
"worldObj",
";",
"field_48245_f",
"=",
"par2",
";",
"petPathfinder",
"=",
"par1EntityTameable",
".",
"getNavigator",
"(",
")",
";",
"minDist",
"=",
"par3",
";",
"maxDist",
"=",
"par4",
";",
"setMutexBits",
"(",
"3",
")",
";",
"}",
"public",
"boolean",
"shouldExecute",
"(",
")",
"{",
"EntityLiving",
"entityliving",
"=",
"thePet",
".",
"getOwner",
"(",
")",
";",
"if",
"(",
"entityliving",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"thePet",
".",
"isSitting",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"thePet",
".",
"getDistanceSqToEntity",
"(",
"entityliving",
")",
"<",
"(",
"double",
")",
"(",
"minDist",
"*",
"minDist",
")",
")",
"{",
"return",
"false",
";",
"}",
"else",
"{",
"theOwner",
"=",
"entityliving",
";",
"return",
"true",
";",
"}",
"}",
"public",
"boolean",
"continueExecuting",
"(",
")",
"{",
"return",
"!",
"petPathfinder",
".",
"noPath",
"(",
")",
"&&",
"thePet",
".",
"getDistanceSqToEntity",
"(",
"theOwner",
")",
">",
"(",
"double",
")",
"(",
"maxDist",
"*",
"maxDist",
")",
"&&",
"!",
"thePet",
".",
"isSitting",
"(",
")",
";",
"}",
"public",
"void",
"startExecuting",
"(",
")",
"{",
"field_48252_h",
"=",
"0",
";",
"field_48253_i",
"=",
"thePet",
".",
"getNavigator",
"(",
")",
".",
"func_48649_a",
"(",
")",
";",
"thePet",
".",
"getNavigator",
"(",
")",
".",
"func_48656_a",
"(",
"false",
")",
";",
"}",
"public",
"void",
"resetTask",
"(",
")",
"{",
"theOwner",
"=",
"null",
";",
"petPathfinder",
".",
"clearPathEntity",
"(",
")",
";",
"thePet",
".",
"getNavigator",
"(",
")",
".",
"func_48656_a",
"(",
"field_48253_i",
")",
";",
"}",
"public",
"void",
"updateTask",
"(",
")",
"{",
"thePet",
".",
"getLookHelper",
"(",
")",
".",
"setLookPositionWithEntity",
"(",
"theOwner",
",",
"10F",
",",
"thePet",
".",
"getVerticalFaceSpeed",
"(",
")",
")",
";",
"if",
"(",
"thePet",
".",
"isSitting",
"(",
")",
")",
"{",
"return",
";",
"}",
"if",
"(",
"--",
"field_48252_h",
">",
"0",
")",
"{",
"return",
";",
"}",
"field_48252_h",
"=",
"10",
";",
"if",
"(",
"petPathfinder",
".",
"func_48652_a",
"(",
"theOwner",
",",
"field_48245_f",
")",
")",
"{",
"return",
";",
"}",
"if",
"(",
"thePet",
".",
"getDistanceSqToEntity",
"(",
"theOwner",
")",
"<",
"144D",
")",
"{",
"return",
";",
"}",
"int",
"i",
"=",
"MathHelper",
".",
"floor_double",
"(",
"theOwner",
".",
"posX",
")",
"-",
"2",
";",
"int",
"j",
"=",
"MathHelper",
".",
"floor_double",
"(",
"theOwner",
".",
"posZ",
")",
"-",
"2",
";",
"int",
"k",
"=",
"MathHelper",
".",
"floor_double",
"(",
"theOwner",
".",
"boundingBox",
".",
"minY",
")",
";",
"for",
"(",
"int",
"l",
"=",
"0",
";",
"l",
"<=",
"4",
";",
"l",
"++",
")",
"{",
"for",
"(",
"int",
"i1",
"=",
"0",
";",
"i1",
"<=",
"4",
";",
"i1",
"++",
")",
"{",
"if",
"(",
"(",
"l",
"<",
"1",
"||",
"i1",
"<",
"1",
"||",
"l",
">",
"3",
"||",
"i1",
">",
"3",
")",
"&&",
"theWorld",
".",
"isBlockNormalCube",
"(",
"i",
"+",
"l",
",",
"k",
"-",
"1",
",",
"j",
"+",
"i1",
")",
"&&",
"!",
"theWorld",
".",
"isBlockNormalCube",
"(",
"i",
"+",
"l",
",",
"k",
",",
"j",
"+",
"i1",
")",
"&&",
"!",
"theWorld",
".",
"isBlockNormalCube",
"(",
"i",
"+",
"l",
",",
"k",
"+",
"1",
",",
"j",
"+",
"i1",
")",
")",
"{",
"thePet",
".",
"setLocationAndAngles",
"(",
"(",
"float",
")",
"(",
"i",
"+",
"l",
")",
"+",
"0.5F",
",",
"k",
",",
"(",
"float",
")",
"(",
"j",
"+",
"i1",
")",
"+",
"0.5F",
",",
"thePet",
".",
"rotationYaw",
",",
"thePet",
".",
"rotationPitch",
")",
";",
"petPathfinder",
".",
"clearPathEntity",
"(",
")",
";",
"return",
";",
"}",
"}",
"}",
"}",
"}",
"</s>"
] |
9,433 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"EntityArrow",
"extends",
"Entity",
"{",
"private",
"int",
"xTile",
";",
"private",
"int",
"yTile",
";",
"private",
"int",
"zTile",
";",
"private",
"int",
"inTile",
";",
"private",
"int",
"inData",
";",
"private",
"boolean",
"inGround",
";",
"public",
"boolean",
"doesArrowBelongToPlayer",
";",
"public",
"int",
"arrowShake",
";",
"public",
"Entity",
"shootingEntity",
";",
"private",
"int",
"ticksInGround",
";",
"private",
"int",
"ticksInAir",
";",
"private",
"double",
"damage",
";",
"private",
"int",
"field_46010_n",
";",
"public",
"boolean",
"arrowCritical",
";",
"public",
"EntityArrow",
"(",
"World",
"par1World",
")",
"{",
"super",
"(",
"par1World",
")",
";",
"xTile",
"=",
"-",
"1",
";",
"yTile",
"=",
"-",
"1",
";",
"zTile",
"=",
"-",
"1",
";",
"inTile",
"=",
"0",
";",
"inData",
"=",
"0",
";",
"inGround",
"=",
"false",
";",
"doesArrowBelongToPlayer",
"=",
"false",
";",
"arrowShake",
"=",
"0",
";",
"ticksInAir",
"=",
"0",
";",
"damage",
"=",
"2D",
";",
"arrowCritical",
"=",
"false",
";",
"setSize",
"(",
"0.5F",
",",
"0.5F",
")",
";",
"}",
"public",
"EntityArrow",
"(",
"World",
"par1World",
",",
"double",
"par2",
",",
"double",
"par4",
",",
"double",
"par6",
")",
"{",
"super",
"(",
"par1World",
")",
";",
"xTile",
"=",
"-",
"1",
";",
"yTile",
"=",
"-",
"1",
";",
"zTile",
"=",
"-",
"1",
";",
"inTile",
"=",
"0",
";",
"inData",
"=",
"0",
";",
"inGround",
"=",
"false",
";",
"doesArrowBelongToPlayer",
"=",
"false",
";",
"arrowShake",
"=",
"0",
";",
"ticksInAir",
"=",
"0",
";",
"damage",
"=",
"2D",
";",
"arrowCritical",
"=",
"false",
";",
"setSize",
"(",
"0.5F",
",",
"0.5F",
")",
";",
"setPosition",
"(",
"par2",
",",
"par4",
",",
"par6",
")",
";",
"yOffset",
"=",
"0.0F",
";",
"}",
"public",
"EntityArrow",
"(",
"World",
"par1World",
",",
"EntityLiving",
"par2EntityLiving",
",",
"EntityLiving",
"par3EntityLiving",
",",
"float",
"par4",
",",
"float",
"par5",
")",
"{",
"super",
"(",
"par1World",
")",
";",
"xTile",
"=",
"-",
"1",
";",
"yTile",
"=",
"-",
"1",
";",
"zTile",
"=",
"-",
"1",
";",
"inTile",
"=",
"0",
";",
"inData",
"=",
"0",
";",
"inGround",
"=",
"false",
";",
"doesArrowBelongToPlayer",
"=",
"false",
";",
"arrowShake",
"=",
"0",
";",
"ticksInAir",
"=",
"0",
";",
"damage",
"=",
"2D",
";",
"arrowCritical",
"=",
"false",
";",
"shootingEntity",
"=",
"par2EntityLiving",
";",
"doesArrowBelongToPlayer",
"=",
"par2EntityLiving",
"instanceof",
"EntityPlayer",
";",
"posY",
"=",
"(",
"par2EntityLiving",
".",
"posY",
"+",
"(",
"double",
")",
"par2EntityLiving",
".",
"getEyeHeight",
"(",
")",
")",
"-",
"0.10000000149011612D",
";",
"double",
"d",
"=",
"par3EntityLiving",
".",
"posX",
"-",
"par2EntityLiving",
".",
"posX",
";",
"double",
"d1",
"=",
"(",
"par3EntityLiving",
".",
"posY",
"+",
"(",
"double",
")",
"par3EntityLiving",
".",
"getEyeHeight",
"(",
")",
")",
"-",
"0.69999998807907104D",
"-",
"posY",
";",
"double",
"d2",
"=",
"par3EntityLiving",
".",
"posZ",
"-",
"par2EntityLiving",
".",
"posZ",
";",
"double",
"d3",
"=",
"MathHelper",
".",
"sqrt_double",
"(",
"d",
"*",
"d",
"+",
"d2",
"*",
"d2",
")",
";",
"if",
"(",
"d3",
"<",
"9.9999999999999995E-008D",
")",
"{",
"return",
";",
"}",
"else",
"{",
"float",
"f",
"=",
"(",
"float",
")",
"(",
"(",
"Math",
".",
"atan2",
"(",
"d2",
",",
"d",
")",
"*",
"180D",
")",
"/",
"Math",
".",
"PI",
")",
"-",
"90F",
";",
"float",
"f1",
"=",
"(",
"float",
")",
"(",
"-",
"(",
"(",
"Math",
".",
"atan2",
"(",
"d1",
",",
"d3",
")",
"*",
"180D",
")",
"/",
"Math",
".",
"PI",
")",
")",
";",
"double",
"d4",
"=",
"d",
"/",
"d3",
";",
"double",
"d5",
"=",
"d2",
"/",
"d3",
";",
"setLocationAndAngles",
"(",
"par2EntityLiving",
".",
"posX",
"+",
"d4",
",",
"posY",
",",
"par2EntityLiving",
".",
"posZ",
"+",
"d5",
",",
"f",
",",
"f1",
")",
";",
"yOffset",
"=",
"0.0F",
";",
"float",
"f2",
"=",
"(",
"float",
")",
"d3",
"*",
"0.2F",
";",
"setArrowHeading",
"(",
"d",
",",
"d1",
"+",
"(",
"double",
")",
"f2",
",",
"d2",
",",
"par4",
",",
"par5",
")",
";",
"return",
";",
"}",
"}",
"public",
"EntityArrow",
"(",
"World",
"par1World",
",",
"EntityLiving",
"par2EntityLiving",
",",
"float",
"par3",
")",
"{",
"super",
"(",
"par1World",
")",
";",
"xTile",
"=",
"-",
"1",
";",
"yTile",
"=",
"-",
"1",
";",
"zTile",
"=",
"-",
"1",
";",
"inTile",
"=",
"0",
";",
"inData",
"=",
"0",
";",
"inGround",
"=",
"false",
";",
"doesArrowBelongToPlayer",
"=",
"false",
";",
"arrowShake",
"=",
"0",
";",
"ticksInAir",
"=",
"0",
";",
"damage",
"=",
"2D",
";",
"arrowCritical",
"=",
"false",
";",
"shootingEntity",
"=",
"par2EntityLiving",
";",
"doesArrowBelongToPlayer",
"=",
"par2EntityLiving",
"instanceof",
"EntityPlayer",
";",
"setSize",
"(",
"0.5F",
",",
"0.5F",
")",
";",
"setLocationAndAngles",
"(",
"par2EntityLiving",
".",
"posX",
",",
"par2EntityLiving",
".",
"posY",
"+",
"(",
"double",
")",
"par2EntityLiving",
".",
"getEyeHeight",
"(",
")",
",",
"par2EntityLiving",
".",
"posZ",
",",
"par2EntityLiving",
".",
"rotationYaw",
",",
"par2EntityLiving",
".",
"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",
";",
"motionX",
"=",
"-",
"MathHelper",
".",
"sin",
"(",
"(",
"rotationYaw",
"/",
"180F",
")",
"*",
"(",
"float",
")",
"Math",
".",
"PI",
")",
"*",
"MathHelper",
".",
"cos",
"(",
"(",
"rotationPitch",
"/",
"180F",
")",
"*",
"(",
"float",
")",
"Math",
".",
"PI",
")",
";",
"motionZ",
"=",
"MathHelper",
".",
"cos",
"(",
"(",
"rotationYaw",
"/",
"180F",
")",
"*",
"(",
"float",
")",
"Math",
".",
"PI",
")",
"*",
"MathHelper",
".",
"cos",
"(",
"(",
"rotationPitch",
"/",
"180F",
")",
"*",
"(",
"float",
")",
"Math",
".",
"PI",
")",
";",
"motionY",
"=",
"-",
"MathHelper",
".",
"sin",
"(",
"(",
"rotationPitch",
"/",
"180F",
")",
"*",
"(",
"float",
")",
"Math",
".",
"PI",
")",
";",
"setArrowHeading",
"(",
"motionX",
",",
"motionY",
",",
"motionZ",
",",
"par3",
"*",
"1.5F",
",",
"1.0F",
")",
";",
"}",
"protected",
"void",
"entityInit",
"(",
")",
"{",
"}",
"public",
"void",
"setArrowHeading",
"(",
"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",
"(",
"prevRotationPitch",
"==",
"0.0F",
"&&",
"prevRotationYaw",
"==",
"0.0F",
")",
"{",
"float",
"f",
"=",
"MathHelper",
".",
"sqrt_double",
"(",
"motionX",
"*",
"motionX",
"+",
"motionZ",
"*",
"motionZ",
")",
";",
"prevRotationYaw",
"=",
"rotationYaw",
"=",
"(",
"float",
")",
"(",
"(",
"Math",
".",
"atan2",
"(",
"motionX",
",",
"motionZ",
")",
"*",
"180D",
")",
"/",
"Math",
".",
"PI",
")",
";",
"prevRotationPitch",
"=",
"rotationPitch",
"=",
"(",
"float",
")",
"(",
"(",
"Math",
".",
"atan2",
"(",
"motionY",
",",
"f",
")",
"*",
"180D",
")",
"/",
"Math",
".",
"PI",
")",
";",
"}",
"int",
"i",
"=",
"worldObj",
".",
"getBlockId",
"(",
"xTile",
",",
"yTile",
",",
"zTile",
")",
";",
"if",
"(",
"i",
">",
"0",
")",
"{",
"Block",
".",
"blocksList",
"[",
"i",
"]",
".",
"setBlockBoundsBasedOnState",
"(",
"worldObj",
",",
"xTile",
",",
"yTile",
",",
"zTile",
")",
";",
"AxisAlignedBB",
"axisalignedbb",
"=",
"Block",
".",
"blocksList",
"[",
"i",
"]",
".",
"getCollisionBoundingBoxFromPool",
"(",
"worldObj",
",",
"xTile",
",",
"yTile",
",",
"zTile",
")",
";",
"if",
"(",
"axisalignedbb",
"!=",
"null",
"&&",
"axisalignedbb",
".",
"isVecInside",
"(",
"Vec3D",
".",
"createVector",
"(",
"posX",
",",
"posY",
",",
"posZ",
")",
")",
")",
"{",
"inGround",
"=",
"true",
";",
"}",
"}",
"if",
"(",
"arrowShake",
">",
"0",
")",
"{",
"arrowShake",
"--",
";",
"}",
"if",
"(",
"inGround",
")",
"{",
"int",
"j",
"=",
"worldObj",
".",
"getBlockId",
"(",
"xTile",
",",
"yTile",
",",
"zTile",
")",
";",
"int",
"k",
"=",
"worldObj",
".",
"getBlockMetadata",
"(",
"xTile",
",",
"yTile",
",",
"zTile",
")",
";",
"if",
"(",
"j",
"!=",
"inTile",
"||",
"k",
"!=",
"inData",
")",
"{",
"inGround",
"=",
"false",
";",
"motionX",
"*=",
"rand",
".",
"nextFloat",
"(",
")",
"*",
"0.2F",
";",
"motionY",
"*=",
"rand",
".",
"nextFloat",
"(",
")",
"*",
"0.2F",
";",
"motionZ",
"*=",
"rand",
".",
"nextFloat",
"(",
")",
"*",
"0.2F",
";",
"ticksInGround",
"=",
"0",
";",
"ticksInAir",
"=",
"0",
";",
"return",
";",
"}",
"ticksInGround",
"++",
";",
"if",
"(",
"ticksInGround",
"==",
"1200",
")",
"{",
"setDead",
"(",
")",
";",
"}",
"return",
";",
"}",
"ticksInAir",
"++",
";",
"Vec3D",
"vec3d",
"=",
"Vec3D",
".",
"createVector",
"(",
"posX",
",",
"posY",
",",
"posZ",
")",
";",
"Vec3D",
"vec3d1",
"=",
"Vec3D",
".",
"createVector",
"(",
"posX",
"+",
"motionX",
",",
"posY",
"+",
"motionY",
",",
"posZ",
"+",
"motionZ",
")",
";",
"MovingObjectPosition",
"movingobjectposition",
"=",
"worldObj",
".",
"rayTraceBlocks_do_do",
"(",
"vec3d",
",",
"vec3d1",
",",
"false",
",",
"true",
")",
";",
"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",
"d",
"=",
"0.0D",
";",
"for",
"(",
"int",
"l",
"=",
"0",
";",
"l",
"<",
"list",
".",
"size",
"(",
")",
";",
"l",
"++",
")",
"{",
"Entity",
"entity1",
"=",
"(",
"Entity",
")",
"list",
".",
"get",
"(",
"l",
")",
";",
"if",
"(",
"!",
"entity1",
".",
"canBeCollidedWith",
"(",
")",
"||",
"entity1",
"==",
"shootingEntity",
"&&",
"ticksInAir",
"<",
"5",
")",
"{",
"continue",
";",
"}",
"float",
"f5",
"=",
"0.3F",
";",
"AxisAlignedBB",
"axisalignedbb1",
"=",
"entity1",
".",
"boundingBox",
".",
"expand",
"(",
"f5",
",",
"f5",
",",
"f5",
")",
";",
"MovingObjectPosition",
"movingobjectposition1",
"=",
"axisalignedbb1",
".",
"calculateIntercept",
"(",
"vec3d",
",",
"vec3d1",
")",
";",
"if",
"(",
"movingobjectposition1",
"==",
"null",
")",
"{",
"continue",
";",
"}",
"double",
"d1",
"=",
"vec3d",
".",
"distanceTo",
"(",
"movingobjectposition1",
".",
"hitVec",
")",
";",
"if",
"(",
"d1",
"<",
"d",
"||",
"d",
"==",
"0.0D",
")",
"{",
"entity",
"=",
"entity1",
";",
"d",
"=",
"d1",
";",
"}",
"}",
"if",
"(",
"entity",
"!=",
"null",
")",
"{",
"movingobjectposition",
"=",
"new",
"MovingObjectPosition",
"(",
"entity",
")",
";",
"}",
"if",
"(",
"movingobjectposition",
"!=",
"null",
")",
"{",
"if",
"(",
"movingobjectposition",
".",
"entityHit",
"!=",
"null",
")",
"{",
"float",
"f1",
"=",
"MathHelper",
".",
"sqrt_double",
"(",
"motionX",
"*",
"motionX",
"+",
"motionY",
"*",
"motionY",
"+",
"motionZ",
"*",
"motionZ",
")",
";",
"int",
"j1",
"=",
"(",
"int",
")",
"Math",
".",
"ceil",
"(",
"(",
"double",
")",
"f1",
"*",
"damage",
")",
";",
"if",
"(",
"arrowCritical",
")",
"{",
"j1",
"+=",
"rand",
".",
"nextInt",
"(",
"j1",
"/",
"2",
"+",
"2",
")",
";",
"}",
"DamageSource",
"damagesource",
"=",
"null",
";",
"if",
"(",
"shootingEntity",
"==",
"null",
")",
"{",
"damagesource",
"=",
"DamageSource",
".",
"causeArrowDamage",
"(",
"this",
",",
"this",
")",
";",
"}",
"else",
"{",
"damagesource",
"=",
"DamageSource",
".",
"causeArrowDamage",
"(",
"this",
",",
"shootingEntity",
")",
";",
"}",
"if",
"(",
"isBurning",
"(",
")",
")",
"{",
"movingobjectposition",
".",
"entityHit",
".",
"setFire",
"(",
"5",
")",
";",
"}",
"if",
"(",
"movingobjectposition",
".",
"entityHit",
".",
"attackEntityFrom",
"(",
"damagesource",
",",
"j1",
")",
")",
"{",
"if",
"(",
"movingobjectposition",
".",
"entityHit",
"instanceof",
"EntityLiving",
")",
"{",
"(",
"(",
"EntityLiving",
")",
"movingobjectposition",
".",
"entityHit",
")",
".",
"arrowHitTempCounter",
"++",
";",
"if",
"(",
"field_46010_n",
">",
"0",
")",
"{",
"float",
"f7",
"=",
"MathHelper",
".",
"sqrt_double",
"(",
"motionX",
"*",
"motionX",
"+",
"motionZ",
"*",
"motionZ",
")",
";",
"if",
"(",
"f7",
">",
"0.0F",
")",
"{",
"movingobjectposition",
".",
"entityHit",
".",
"addVelocity",
"(",
"(",
"motionX",
"*",
"(",
"double",
")",
"field_46010_n",
"*",
"0.60000002384185791D",
")",
"/",
"(",
"double",
")",
"f7",
",",
"0.10000000000000001D",
",",
"(",
"motionZ",
"*",
"(",
"double",
")",
"field_46010_n",
"*",
"0.60000002384185791D",
")",
"/",
"(",
"double",
")",
"f7",
")",
";",
"}",
"}",
"}",
"worldObj",
".",
"playSoundAtEntity",
"(",
"this",
",",
"\"\"",
",",
"1.0F",
",",
"1.2F",
"/",
"(",
"rand",
".",
"nextFloat",
"(",
")",
"*",
"0.2F",
"+",
"0.9F",
")",
")",
";",
"setDead",
"(",
")",
";",
"}",
"else",
"{",
"motionX",
"*=",
"-",
"0.10000000149011612D",
";",
"motionY",
"*=",
"-",
"0.10000000149011612D",
";",
"motionZ",
"*=",
"-",
"0.10000000149011612D",
";",
"rotationYaw",
"+=",
"180F",
";",
"prevRotationYaw",
"+=",
"180F",
";",
"ticksInAir",
"=",
"0",
";",
"}",
"}",
"else",
"{",
"xTile",
"=",
"movingobjectposition",
".",
"blockX",
";",
"yTile",
"=",
"movingobjectposition",
".",
"blockY",
";",
"zTile",
"=",
"movingobjectposition",
".",
"blockZ",
";",
"inTile",
"=",
"worldObj",
".",
"getBlockId",
"(",
"xTile",
",",
"yTile",
",",
"zTile",
")",
";",
"inData",
"=",
"worldObj",
".",
"getBlockMetadata",
"(",
"xTile",
",",
"yTile",
",",
"zTile",
")",
";",
"motionX",
"=",
"(",
"float",
")",
"(",
"movingobjectposition",
".",
"hitVec",
".",
"xCoord",
"-",
"posX",
")",
";",
"motionY",
"=",
"(",
"float",
")",
"(",
"movingobjectposition",
".",
"hitVec",
".",
"yCoord",
"-",
"posY",
")",
";",
"motionZ",
"=",
"(",
"float",
")",
"(",
"movingobjectposition",
".",
"hitVec",
".",
"zCoord",
"-",
"posZ",
")",
";",
"float",
"f2",
"=",
"MathHelper",
".",
"sqrt_double",
"(",
"motionX",
"*",
"motionX",
"+",
"motionY",
"*",
"motionY",
"+",
"motionZ",
"*",
"motionZ",
")",
";",
"posX",
"-=",
"(",
"motionX",
"/",
"(",
"double",
")",
"f2",
")",
"*",
"0.05000000074505806D",
";",
"posY",
"-=",
"(",
"motionY",
"/",
"(",
"double",
")",
"f2",
")",
"*",
"0.05000000074505806D",
";",
"posZ",
"-=",
"(",
"motionZ",
"/",
"(",
"double",
")",
"f2",
")",
"*",
"0.05000000074505806D",
";",
"worldObj",
".",
"playSoundAtEntity",
"(",
"this",
",",
"\"\"",
",",
"1.0F",
",",
"1.2F",
"/",
"(",
"rand",
".",
"nextFloat",
"(",
")",
"*",
"0.2F",
"+",
"0.9F",
")",
")",
";",
"inGround",
"=",
"true",
";",
"arrowShake",
"=",
"7",
";",
"arrowCritical",
"=",
"false",
";",
"}",
"}",
"if",
"(",
"arrowCritical",
")",
"{",
"for",
"(",
"int",
"i1",
"=",
"0",
";",
"i1",
"<",
"4",
";",
"i1",
"++",
")",
"{",
"worldObj",
".",
"spawnParticle",
"(",
"\"crit\"",
",",
"posX",
"+",
"(",
"motionX",
"*",
"(",
"double",
")",
"i1",
")",
"/",
"4D",
",",
"posY",
"+",
"(",
"motionY",
"*",
"(",
"double",
")",
"i1",
")",
"/",
"4D",
",",
"posZ",
"+",
"(",
"motionZ",
"*",
"(",
"double",
")",
"i1",
")",
"/",
"4D",
",",
"-",
"motionX",
",",
"-",
"motionY",
"+",
"0.20000000000000001D",
",",
"-",
"motionZ",
")",
";",
"}",
"}",
"posX",
"+=",
"motionX",
";",
"posY",
"+=",
"motionY",
";",
"posZ",
"+=",
"motionZ",
";",
"float",
"f3",
"=",
"MathHelper",
".",
"sqrt_double",
"(",
"motionX",
"*",
"motionX",
"+",
"motionZ",
"*",
"motionZ",
")",
";",
"rotationYaw",
"=",
"(",
"float",
")",
"(",
"(",
"Math",
".",
"atan2",
"(",
"motionX",
",",
"motionZ",
")",
"*",
"180D",
")",
"/",
"Math",
".",
"PI",
")",
";",
"for",
"(",
"rotationPitch",
"=",
"(",
"float",
")",
"(",
"(",
"Math",
".",
"atan2",
"(",
"motionY",
",",
"f3",
")",
"*",
"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",
"f4",
"=",
"0.99F",
";",
"float",
"f6",
"=",
"0.05F",
";",
"if",
"(",
"isInWater",
"(",
")",
")",
"{",
"for",
"(",
"int",
"k1",
"=",
"0",
";",
"k1",
"<",
"4",
";",
"k1",
"++",
")",
"{",
"float",
"f8",
"=",
"0.25F",
";",
"worldObj",
".",
"spawnParticle",
"(",
"\"bubble\"",
",",
"posX",
"-",
"motionX",
"*",
"(",
"double",
")",
"f8",
",",
"posY",
"-",
"motionY",
"*",
"(",
"double",
")",
"f8",
",",
"posZ",
"-",
"motionZ",
"*",
"(",
"double",
")",
"f8",
",",
"motionX",
",",
"motionY",
",",
"motionZ",
")",
";",
"}",
"f4",
"=",
"0.8F",
";",
"}",
"motionX",
"*=",
"f4",
";",
"motionY",
"*=",
"f4",
";",
"motionZ",
"*=",
"f4",
";",
"motionY",
"-=",
"f6",
";",
"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",
"(",
"\"inData\"",
",",
"(",
"byte",
")",
"inData",
")",
";",
"par1NBTTagCompound",
".",
"setByte",
"(",
"\"shake\"",
",",
"(",
"byte",
")",
"arrowShake",
")",
";",
"par1NBTTagCompound",
".",
"setByte",
"(",
"\"inGround\"",
",",
"(",
"byte",
")",
"(",
"inGround",
"?",
"1",
":",
"0",
")",
")",
";",
"par1NBTTagCompound",
".",
"setBoolean",
"(",
"\"player\"",
",",
"doesArrowBelongToPlayer",
")",
";",
"par1NBTTagCompound",
".",
"setDouble",
"(",
"\"damage\"",
",",
"damage",
")",
";",
"}",
"public",
"void",
"readEntityFromNBT",
"(",
"NBTTagCompound",
"par1NBTTagCompound",
")",
"{",
"xTile",
"=",
"par1NBTTagCompound",
".",
"getShort",
"(",
"\"xTile\"",
")",
";",
"yTile",
"=",
"par1NBTTagCompound",
".",
"getShort",
"(",
"\"yTile\"",
")",
";",
"zTile",
"=",
"par1NBTTagCompound",
".",
"getShort",
"(",
"\"zTile\"",
")",
";",
"inTile",
"=",
"par1NBTTagCompound",
".",
"getByte",
"(",
"\"inTile\"",
")",
"&",
"0xff",
";",
"inData",
"=",
"par1NBTTagCompound",
".",
"getByte",
"(",
"\"inData\"",
")",
"&",
"0xff",
";",
"arrowShake",
"=",
"par1NBTTagCompound",
".",
"getByte",
"(",
"\"shake\"",
")",
"&",
"0xff",
";",
"inGround",
"=",
"par1NBTTagCompound",
".",
"getByte",
"(",
"\"inGround\"",
")",
"==",
"1",
";",
"doesArrowBelongToPlayer",
"=",
"par1NBTTagCompound",
".",
"getBoolean",
"(",
"\"player\"",
")",
";",
"if",
"(",
"par1NBTTagCompound",
".",
"hasKey",
"(",
"\"damage\"",
")",
")",
"{",
"damage",
"=",
"par1NBTTagCompound",
".",
"getDouble",
"(",
"\"damage\"",
")",
";",
"}",
"}",
"public",
"void",
"onCollideWithPlayer",
"(",
"EntityPlayer",
"par1EntityPlayer",
")",
"{",
"if",
"(",
"worldObj",
".",
"isRemote",
")",
"{",
"return",
";",
"}",
"if",
"(",
"inGround",
"&&",
"doesArrowBelongToPlayer",
"&&",
"arrowShake",
"<=",
"0",
"&&",
"par1EntityPlayer",
".",
"inventory",
".",
"addItemStackToInventory",
"(",
"new",
"ItemStack",
"(",
"Item",
".",
"arrow",
",",
"1",
")",
")",
")",
"{",
"worldObj",
".",
"playSoundAtEntity",
"(",
"this",
",",
"\"random.pop\"",
",",
"0.2F",
",",
"(",
"(",
"rand",
".",
"nextFloat",
"(",
")",
"-",
"rand",
".",
"nextFloat",
"(",
")",
")",
"*",
"0.7F",
"+",
"1.0F",
")",
"*",
"2.0F",
")",
";",
"par1EntityPlayer",
".",
"onItemPickup",
"(",
"this",
",",
"1",
")",
";",
"setDead",
"(",
")",
";",
"}",
"}",
"public",
"void",
"setDamage",
"(",
"double",
"par1",
")",
"{",
"damage",
"=",
"par1",
";",
"}",
"public",
"double",
"getDamage",
"(",
")",
"{",
"return",
"damage",
";",
"}",
"public",
"void",
"func_46007_b",
"(",
"int",
"par1",
")",
"{",
"field_46010_n",
"=",
"par1",
";",
"}",
"public",
"boolean",
"canAttackWithItem",
"(",
")",
"{",
"return",
"false",
";",
"}",
"}",
"</s>"
] |
9,434 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"*",
";",
"abstract",
"class",
"ComponentNetherBridgePiece",
"extends",
"StructureComponent",
"{",
"protected",
"ComponentNetherBridgePiece",
"(",
"int",
"par1",
")",
"{",
"super",
"(",
"par1",
")",
";",
"}",
"private",
"int",
"getTotalWeight",
"(",
"List",
"par1List",
")",
"{",
"boolean",
"flag",
"=",
"false",
";",
"int",
"i",
"=",
"0",
";",
"for",
"(",
"Iterator",
"iterator",
"=",
"par1List",
".",
"iterator",
"(",
")",
";",
"iterator",
".",
"hasNext",
"(",
")",
";",
")",
"{",
"StructureNetherBridgePieceWeight",
"structurenetherbridgepieceweight",
"=",
"(",
"StructureNetherBridgePieceWeight",
")",
"iterator",
".",
"next",
"(",
")",
";",
"if",
"(",
"structurenetherbridgepieceweight",
".",
"field_40651_d",
">",
"0",
"&&",
"structurenetherbridgepieceweight",
".",
"field_40654_c",
"<",
"structurenetherbridgepieceweight",
".",
"field_40651_d",
")",
"{",
"flag",
"=",
"true",
";",
"}",
"i",
"+=",
"structurenetherbridgepieceweight",
".",
"field_40653_b",
";",
"}",
"return",
"flag",
"?",
"i",
":",
"-",
"1",
";",
"}",
"private",
"ComponentNetherBridgePiece",
"getNextComponent",
"(",
"ComponentNetherBridgeStartPiece",
"par1ComponentNetherBridgeStartPiece",
",",
"List",
"par2List",
",",
"List",
"par3List",
",",
"Random",
"par4Random",
",",
"int",
"par5",
",",
"int",
"par6",
",",
"int",
"par7",
",",
"int",
"par8",
",",
"int",
"par9",
")",
"{",
"int",
"var10",
"=",
"this",
".",
"getTotalWeight",
"(",
"par2List",
")",
";",
"boolean",
"var11",
"=",
"var10",
">",
"0",
"&&",
"par9",
"<=",
"30",
";",
"int",
"var12",
"=",
"0",
";",
"while",
"(",
"var12",
"<",
"5",
"&&",
"var11",
")",
"{",
"++",
"var12",
";",
"int",
"var13",
"=",
"par4Random",
".",
"nextInt",
"(",
"var10",
")",
";",
"Iterator",
"var14",
"=",
"par2List",
".",
"iterator",
"(",
")",
";",
"while",
"(",
"var14",
".",
"hasNext",
"(",
")",
")",
"{",
"StructureNetherBridgePieceWeight",
"var15",
"=",
"(",
"StructureNetherBridgePieceWeight",
")",
"var14",
".",
"next",
"(",
")",
";",
"var13",
"-=",
"var15",
".",
"field_40653_b",
";",
"if",
"(",
"var13",
"<",
"0",
")",
"{",
"if",
"(",
"!",
"var15",
".",
"func_40649_a",
"(",
"par9",
")",
"||",
"var15",
"==",
"par1ComponentNetherBridgeStartPiece",
".",
"field_40296_a",
"&&",
"!",
"var15",
".",
"field_40652_e",
")",
"{",
"break",
";",
"}",
"ComponentNetherBridgePiece",
"var16",
"=",
"StructureNetherBridgePieces",
".",
"createNextComponent",
"(",
"var15",
",",
"par3List",
",",
"par4Random",
",",
"par5",
",",
"par6",
",",
"par7",
",",
"par8",
",",
"par9",
")",
";",
"if",
"(",
"var16",
"!=",
"null",
")",
"{",
"++",
"var15",
".",
"field_40654_c",
";",
"par1ComponentNetherBridgeStartPiece",
".",
"field_40296_a",
"=",
"var15",
";",
"if",
"(",
"!",
"var15",
".",
"func_40650_a",
"(",
")",
")",
"{",
"par2List",
".",
"remove",
"(",
"var15",
")",
";",
"}",
"return",
"var16",
";",
"}",
"}",
"}",
"}",
"ComponentNetherBridgeEnd",
"var17",
"=",
"ComponentNetherBridgeEnd",
".",
"func_40301_a",
"(",
"par3List",
",",
"par4Random",
",",
"par5",
",",
"par6",
",",
"par7",
",",
"par8",
",",
"par9",
")",
";",
"return",
"var17",
";",
"}",
"private",
"StructureComponent",
"getNextComponent",
"(",
"ComponentNetherBridgeStartPiece",
"par1ComponentNetherBridgeStartPiece",
",",
"List",
"par2List",
",",
"Random",
"par3Random",
",",
"int",
"par4",
",",
"int",
"par5",
",",
"int",
"par6",
",",
"int",
"par7",
",",
"int",
"par8",
",",
"boolean",
"par9",
")",
"{",
"if",
"(",
"Math",
".",
"abs",
"(",
"par4",
"-",
"par1ComponentNetherBridgeStartPiece",
".",
"getBoundingBox",
"(",
")",
".",
"minX",
")",
">",
"112",
"||",
"Math",
".",
"abs",
"(",
"par6",
"-",
"par1ComponentNetherBridgeStartPiece",
".",
"getBoundingBox",
"(",
")",
".",
"minZ",
")",
">",
"112",
")",
"{",
"ComponentNetherBridgeEnd",
"componentnetherbridgeend",
"=",
"ComponentNetherBridgeEnd",
".",
"func_40301_a",
"(",
"par2List",
",",
"par3Random",
",",
"par4",
",",
"par5",
",",
"par6",
",",
"par7",
",",
"par8",
")",
";",
"return",
"componentnetherbridgeend",
";",
"}",
"List",
"list",
"=",
"par1ComponentNetherBridgeStartPiece",
".",
"field_40294_b",
";",
"if",
"(",
"par9",
")",
"{",
"list",
"=",
"par1ComponentNetherBridgeStartPiece",
".",
"field_40295_c",
";",
"}",
"ComponentNetherBridgePiece",
"componentnetherbridgepiece",
"=",
"getNextComponent",
"(",
"par1ComponentNetherBridgeStartPiece",
",",
"list",
",",
"par2List",
",",
"par3Random",
",",
"par4",
",",
"par5",
",",
"par6",
",",
"par7",
",",
"par8",
"+",
"1",
")",
";",
"if",
"(",
"componentnetherbridgepiece",
"!=",
"null",
")",
"{",
"par2List",
".",
"add",
"(",
"componentnetherbridgepiece",
")",
";",
"par1ComponentNetherBridgeStartPiece",
".",
"field_40293_d",
".",
"add",
"(",
"componentnetherbridgepiece",
")",
";",
"}",
"return",
"componentnetherbridgepiece",
";",
"}",
"protected",
"StructureComponent",
"getNextComponentNormal",
"(",
"ComponentNetherBridgeStartPiece",
"par1ComponentNetherBridgeStartPiece",
",",
"List",
"par2List",
",",
"Random",
"par3Random",
",",
"int",
"par4",
",",
"int",
"par5",
",",
"boolean",
"par6",
")",
"{",
"switch",
"(",
"coordBaseMode",
")",
"{",
"case",
"2",
":",
"return",
"getNextComponent",
"(",
"par1ComponentNetherBridgeStartPiece",
",",
"par2List",
",",
"par3Random",
",",
"boundingBox",
".",
"minX",
"+",
"par4",
",",
"boundingBox",
".",
"minY",
"+",
"par5",
",",
"boundingBox",
".",
"minZ",
"-",
"1",
",",
"coordBaseMode",
",",
"getComponentType",
"(",
")",
",",
"par6",
")",
";",
"case",
"0",
":",
"return",
"getNextComponent",
"(",
"par1ComponentNetherBridgeStartPiece",
",",
"par2List",
",",
"par3Random",
",",
"boundingBox",
".",
"minX",
"+",
"par4",
",",
"boundingBox",
".",
"minY",
"+",
"par5",
",",
"boundingBox",
".",
"maxZ",
"+",
"1",
",",
"coordBaseMode",
",",
"getComponentType",
"(",
")",
",",
"par6",
")",
";",
"case",
"1",
":",
"return",
"getNextComponent",
"(",
"par1ComponentNetherBridgeStartPiece",
",",
"par2List",
",",
"par3Random",
",",
"boundingBox",
".",
"minX",
"-",
"1",
",",
"boundingBox",
".",
"minY",
"+",
"par5",
",",
"boundingBox",
".",
"minZ",
"+",
"par4",
",",
"coordBaseMode",
",",
"getComponentType",
"(",
")",
",",
"par6",
")",
";",
"case",
"3",
":",
"return",
"getNextComponent",
"(",
"par1ComponentNetherBridgeStartPiece",
",",
"par2List",
",",
"par3Random",
",",
"boundingBox",
".",
"maxX",
"+",
"1",
",",
"boundingBox",
".",
"minY",
"+",
"par5",
",",
"boundingBox",
".",
"minZ",
"+",
"par4",
",",
"coordBaseMode",
",",
"getComponentType",
"(",
")",
",",
"par6",
")",
";",
"}",
"return",
"null",
";",
"}",
"protected",
"StructureComponent",
"getNextComponentX",
"(",
"ComponentNetherBridgeStartPiece",
"par1ComponentNetherBridgeStartPiece",
",",
"List",
"par2List",
",",
"Random",
"par3Random",
",",
"int",
"par4",
",",
"int",
"par5",
",",
"boolean",
"par6",
")",
"{",
"switch",
"(",
"coordBaseMode",
")",
"{",
"case",
"2",
":",
"return",
"getNextComponent",
"(",
"par1ComponentNetherBridgeStartPiece",
",",
"par2List",
",",
"par3Random",
",",
"boundingBox",
".",
"minX",
"-",
"1",
",",
"boundingBox",
".",
"minY",
"+",
"par4",
",",
"boundingBox",
".",
"minZ",
"+",
"par5",
",",
"1",
",",
"getComponentType",
"(",
")",
",",
"par6",
")",
";",
"case",
"0",
":",
"return",
"getNextComponent",
"(",
"par1ComponentNetherBridgeStartPiece",
",",
"par2List",
",",
"par3Random",
",",
"boundingBox",
".",
"minX",
"-",
"1",
",",
"boundingBox",
".",
"minY",
"+",
"par4",
",",
"boundingBox",
".",
"minZ",
"+",
"par5",
",",
"1",
",",
"getComponentType",
"(",
")",
",",
"par6",
")",
";",
"case",
"1",
":",
"return",
"getNextComponent",
"(",
"par1ComponentNetherBridgeStartPiece",
",",
"par2List",
",",
"par3Random",
",",
"boundingBox",
".",
"minX",
"+",
"par5",
",",
"boundingBox",
".",
"minY",
"+",
"par4",
",",
"boundingBox",
".",
"minZ",
"-",
"1",
",",
"2",
",",
"getComponentType",
"(",
")",
",",
"par6",
")",
";",
"case",
"3",
":",
"return",
"getNextComponent",
"(",
"par1ComponentNetherBridgeStartPiece",
",",
"par2List",
",",
"par3Random",
",",
"boundingBox",
".",
"minX",
"+",
"par5",
",",
"boundingBox",
".",
"minY",
"+",
"par4",
",",
"boundingBox",
".",
"minZ",
"-",
"1",
",",
"2",
",",
"getComponentType",
"(",
")",
",",
"par6",
")",
";",
"}",
"return",
"null",
";",
"}",
"protected",
"StructureComponent",
"getNextComponentZ",
"(",
"ComponentNetherBridgeStartPiece",
"par1ComponentNetherBridgeStartPiece",
",",
"List",
"par2List",
",",
"Random",
"par3Random",
",",
"int",
"par4",
",",
"int",
"par5",
",",
"boolean",
"par6",
")",
"{",
"switch",
"(",
"coordBaseMode",
")",
"{",
"case",
"2",
":",
"return",
"getNextComponent",
"(",
"par1ComponentNetherBridgeStartPiece",
",",
"par2List",
",",
"par3Random",
",",
"boundingBox",
".",
"maxX",
"+",
"1",
",",
"boundingBox",
".",
"minY",
"+",
"par4",
",",
"boundingBox",
".",
"minZ",
"+",
"par5",
",",
"3",
",",
"getComponentType",
"(",
")",
",",
"par6",
")",
";",
"case",
"0",
":",
"return",
"getNextComponent",
"(",
"par1ComponentNetherBridgeStartPiece",
",",
"par2List",
",",
"par3Random",
",",
"boundingBox",
".",
"maxX",
"+",
"1",
",",
"boundingBox",
".",
"minY",
"+",
"par4",
",",
"boundingBox",
".",
"minZ",
"+",
"par5",
",",
"3",
",",
"getComponentType",
"(",
")",
",",
"par6",
")",
";",
"case",
"1",
":",
"return",
"getNextComponent",
"(",
"par1ComponentNetherBridgeStartPiece",
",",
"par2List",
",",
"par3Random",
",",
"boundingBox",
".",
"minX",
"+",
"par5",
",",
"boundingBox",
".",
"minY",
"+",
"par4",
",",
"boundingBox",
".",
"maxZ",
"+",
"1",
",",
"0",
",",
"getComponentType",
"(",
")",
",",
"par6",
")",
";",
"case",
"3",
":",
"return",
"getNextComponent",
"(",
"par1ComponentNetherBridgeStartPiece",
",",
"par2List",
",",
"par3Random",
",",
"boundingBox",
".",
"minX",
"+",
"par5",
",",
"boundingBox",
".",
"minY",
"+",
"par4",
",",
"boundingBox",
".",
"maxZ",
"+",
"1",
",",
"0",
",",
"getComponentType",
"(",
")",
",",
"par6",
")",
";",
"}",
"return",
"null",
";",
"}",
"protected",
"static",
"boolean",
"isAboveGround",
"(",
"StructureBoundingBox",
"par0StructureBoundingBox",
")",
"{",
"return",
"par0StructureBoundingBox",
"!=",
"null",
"&&",
"par0StructureBoundingBox",
".",
"minY",
">",
"10",
";",
"}",
"}",
"</s>"
] |
9,435 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"interface",
"IInvBasic",
"{",
"public",
"abstract",
"void",
"onInventoryChanged",
"(",
"InventoryBasic",
"inventorybasic",
")",
";",
"}",
"</s>"
] |
9,436 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"io",
".",
"IOException",
";",
"import",
"java",
".",
"net",
".",
"*",
";",
"import",
"java",
".",
"util",
".",
"*",
";",
"public",
"class",
"RConThreadQuery",
"extends",
"RConThreadBase",
"{",
"private",
"long",
"lastAuthCheckTime",
";",
"private",
"int",
"queryPort",
";",
"private",
"int",
"serverPort",
";",
"private",
"int",
"maxPlayers",
";",
"private",
"String",
"serverMotd",
";",
"private",
"String",
"worldName",
";",
"private",
"DatagramSocket",
"querySocket",
";",
"private",
"byte",
"buffer",
"[",
"]",
";",
"private",
"DatagramPacket",
"incomingPacket",
";",
"private",
"HashMap",
"field_40452_p",
";",
"private",
"String",
"queryHostname",
";",
"private",
"String",
"serverHostname",
";",
"private",
"HashMap",
"queryClients",
";",
"private",
"long",
"field_40448_t",
";",
"private",
"RConOutputStream",
"output",
";",
"private",
"long",
"lastQueryResponseTime",
";",
"public",
"RConThreadQuery",
"(",
"IServer",
"par1IServer",
")",
"{",
"super",
"(",
"par1IServer",
")",
";",
"querySocket",
"=",
"null",
";",
"buffer",
"=",
"new",
"byte",
"[",
"1460",
"]",
";",
"incomingPacket",
"=",
"null",
";",
"queryPort",
"=",
"par1IServer",
".",
"getIntProperty",
"(",
"\"query.port\"",
",",
"0",
")",
";",
"serverHostname",
"=",
"par1IServer",
".",
"getHostname",
"(",
")",
";",
"serverPort",
"=",
"par1IServer",
".",
"getPort",
"(",
")",
";",
"serverMotd",
"=",
"par1IServer",
".",
"getMotd",
"(",
")",
";",
"maxPlayers",
"=",
"par1IServer",
".",
"getMaxPlayers",
"(",
")",
";",
"worldName",
"=",
"par1IServer",
".",
"getWorldName",
"(",
")",
";",
"lastQueryResponseTime",
"=",
"0L",
";",
"queryHostname",
"=",
"\"0.0.0.0\"",
";",
"if",
"(",
"0",
"==",
"serverHostname",
".",
"length",
"(",
")",
"||",
"queryHostname",
".",
"equals",
"(",
"serverHostname",
")",
")",
"{",
"serverHostname",
"=",
"\"0.0.0.0\"",
";",
"try",
"{",
"InetAddress",
"inetaddress",
"=",
"InetAddress",
".",
"getLocalHost",
"(",
")",
";",
"queryHostname",
"=",
"inetaddress",
".",
"getHostAddress",
"(",
")",
";",
"}",
"catch",
"(",
"UnknownHostException",
"unknownhostexception",
")",
"{",
"logWarning",
"(",
"(",
"new",
"StringBuilder",
"(",
")",
")",
".",
"append",
"(",
"\"\"",
")",
".",
"append",
"(",
"par1IServer",
".",
"getSettingsFilename",
"(",
")",
")",
".",
"append",
"(",
"\"'",
":",
"\"",
")",
".",
"append",
"(",
"unknownhostexception",
".",
"getMessage",
"(",
")",
")",
".",
"toString",
"(",
")",
")",
";",
"}",
"}",
"else",
"{",
"queryHostname",
"=",
"serverHostname",
";",
"}",
"if",
"(",
"0",
"==",
"queryPort",
")",
"{",
"queryPort",
"=",
"serverPort",
";",
"log",
"(",
"(",
"new",
"StringBuilder",
"(",
")",
")",
".",
"append",
"(",
"\"\"",
")",
".",
"append",
"(",
"queryPort",
")",
".",
"toString",
"(",
")",
")",
";",
"par1IServer",
".",
"setProperty",
"(",
"\"query.port\"",
",",
"Integer",
".",
"valueOf",
"(",
"queryPort",
")",
")",
";",
"par1IServer",
".",
"setProperty",
"(",
"\"debug\"",
",",
"Boolean",
".",
"valueOf",
"(",
"false",
")",
")",
";",
"par1IServer",
".",
"saveProperties",
"(",
")",
";",
"}",
"field_40452_p",
"=",
"new",
"HashMap",
"(",
")",
";",
"output",
"=",
"new",
"RConOutputStream",
"(",
"1460",
")",
";",
"queryClients",
"=",
"new",
"HashMap",
"(",
")",
";",
"field_40448_t",
"=",
"(",
"new",
"Date",
"(",
")",
")",
".",
"getTime",
"(",
")",
";",
"}",
"private",
"void",
"sendResponsePacket",
"(",
"byte",
"par1ArrayOfByte",
"[",
"]",
",",
"DatagramPacket",
"par2DatagramPacket",
")",
"throws",
"SocketException",
",",
"IOException",
"{",
"querySocket",
".",
"send",
"(",
"new",
"DatagramPacket",
"(",
"par1ArrayOfByte",
",",
"par1ArrayOfByte",
".",
"length",
",",
"par2DatagramPacket",
".",
"getSocketAddress",
"(",
")",
")",
")",
";",
"}",
"private",
"boolean",
"parseIncomingPacket",
"(",
"DatagramPacket",
"par1DatagramPacket",
")",
"throws",
"IOException",
"{",
"byte",
"abyte0",
"[",
"]",
"=",
"par1DatagramPacket",
".",
"getData",
"(",
")",
";",
"int",
"i",
"=",
"par1DatagramPacket",
".",
"getLength",
"(",
")",
";",
"SocketAddress",
"socketaddress",
"=",
"par1DatagramPacket",
".",
"getSocketAddress",
"(",
")",
";",
"logInfo",
"(",
"(",
"new",
"StringBuilder",
"(",
")",
")",
".",
"append",
"(",
"\"Packet",
"len",
"\"",
")",
".",
"append",
"(",
"i",
")",
".",
"append",
"(",
"\"",
"[\"",
")",
".",
"append",
"(",
"socketaddress",
")",
".",
"append",
"(",
"\"]\"",
")",
".",
"toString",
"(",
")",
")",
";",
"if",
"(",
"3",
">",
"i",
"||",
"-",
"2",
"!=",
"abyte0",
"[",
"0",
"]",
"||",
"-",
"3",
"!=",
"abyte0",
"[",
"1",
"]",
")",
"{",
"logInfo",
"(",
"(",
"new",
"StringBuilder",
"(",
")",
")",
".",
"append",
"(",
"\"\"",
")",
".",
"append",
"(",
"socketaddress",
")",
".",
"append",
"(",
"\"]\"",
")",
".",
"toString",
"(",
")",
")",
";",
"return",
"false",
";",
"}",
"logInfo",
"(",
"(",
"new",
"StringBuilder",
"(",
")",
")",
".",
"append",
"(",
"\"Packet",
"'\"",
")",
".",
"append",
"(",
"RConUtils",
".",
"getByteAsHexString",
"(",
"abyte0",
"[",
"2",
"]",
")",
")",
".",
"append",
"(",
"\"'",
"[\"",
")",
".",
"append",
"(",
"socketaddress",
")",
".",
"append",
"(",
"\"]\"",
")",
".",
"toString",
"(",
")",
")",
";",
"switch",
"(",
"abyte0",
"[",
"2",
"]",
")",
"{",
"case",
"9",
":",
"sendAuthChallenge",
"(",
"par1DatagramPacket",
")",
";",
"logInfo",
"(",
"(",
"new",
"StringBuilder",
"(",
")",
")",
".",
"append",
"(",
"\"Challenge",
"[\"",
")",
".",
"append",
"(",
"socketaddress",
")",
".",
"append",
"(",
"\"]\"",
")",
".",
"toString",
"(",
")",
")",
";",
"return",
"true",
";",
"case",
"0",
":",
"if",
"(",
"!",
"verifyClientAuth",
"(",
"par1DatagramPacket",
")",
".",
"booleanValue",
"(",
")",
")",
"{",
"logInfo",
"(",
"(",
"new",
"StringBuilder",
"(",
")",
")",
".",
"append",
"(",
"\"\"",
")",
".",
"append",
"(",
"socketaddress",
")",
".",
"append",
"(",
"\"]\"",
")",
".",
"toString",
"(",
")",
")",
";",
"return",
"false",
";",
"}",
"if",
"(",
"15",
"!=",
"i",
")",
"{",
"RConOutputStream",
"rconoutputstream",
"=",
"new",
"RConOutputStream",
"(",
"1460",
")",
";",
"rconoutputstream",
".",
"writeInt",
"(",
"0",
")",
";",
"rconoutputstream",
".",
"writeByteArray",
"(",
"getRequestID",
"(",
"par1DatagramPacket",
".",
"getSocketAddress",
"(",
")",
")",
")",
";",
"rconoutputstream",
".",
"writeString",
"(",
"serverMotd",
")",
";",
"rconoutputstream",
".",
"writeString",
"(",
"\"SMP\"",
")",
";",
"rconoutputstream",
".",
"writeString",
"(",
"worldName",
")",
";",
"rconoutputstream",
".",
"writeString",
"(",
"Integer",
".",
"toString",
"(",
"getNumberOfPlayers",
"(",
")",
")",
")",
";",
"rconoutputstream",
".",
"writeString",
"(",
"Integer",
".",
"toString",
"(",
"maxPlayers",
")",
")",
";",
"rconoutputstream",
".",
"writeShort",
"(",
"(",
"short",
")",
"serverPort",
")",
";",
"rconoutputstream",
".",
"writeString",
"(",
"queryHostname",
")",
";",
"sendResponsePacket",
"(",
"rconoutputstream",
".",
"toByteArray",
"(",
")",
",",
"par1DatagramPacket",
")",
";",
"logInfo",
"(",
"(",
"new",
"StringBuilder",
"(",
")",
")",
".",
"append",
"(",
"\"Status",
"[\"",
")",
".",
"append",
"(",
"socketaddress",
")",
".",
"append",
"(",
"\"]\"",
")",
".",
"toString",
"(",
")",
")",
";",
"}",
"else",
"{",
"sendResponsePacket",
"(",
"createQueryResponse",
"(",
"par1DatagramPacket",
")",
",",
"par1DatagramPacket",
")",
";",
"logInfo",
"(",
"(",
"new",
"StringBuilder",
"(",
")",
")",
".",
"append",
"(",
"\"Rules",
"[\"",
")",
".",
"append",
"(",
"socketaddress",
")",
".",
"append",
"(",
"\"]\"",
")",
".",
"toString",
"(",
")",
")",
";",
"}",
"break",
";",
"}",
"return",
"true",
";",
"}",
"private",
"byte",
"[",
"]",
"createQueryResponse",
"(",
"DatagramPacket",
"par1DatagramPacket",
")",
"throws",
"IOException",
"{",
"long",
"l",
"=",
"System",
".",
"currentTimeMillis",
"(",
")",
";",
"if",
"(",
"l",
"<",
"lastQueryResponseTime",
"+",
"5000L",
")",
"{",
"byte",
"abyte0",
"[",
"]",
"=",
"output",
".",
"toByteArray",
"(",
")",
";",
"byte",
"abyte1",
"[",
"]",
"=",
"getRequestID",
"(",
"par1DatagramPacket",
".",
"getSocketAddress",
"(",
")",
")",
";",
"abyte0",
"[",
"1",
"]",
"=",
"abyte1",
"[",
"0",
"]",
";",
"abyte0",
"[",
"2",
"]",
"=",
"abyte1",
"[",
"1",
"]",
";",
"abyte0",
"[",
"3",
"]",
"=",
"abyte1",
"[",
"2",
"]",
";",
"abyte0",
"[",
"4",
"]",
"=",
"abyte1",
"[",
"3",
"]",
";",
"return",
"abyte0",
";",
"}",
"lastQueryResponseTime",
"=",
"l",
";",
"output",
".",
"reset",
"(",
")",
";",
"output",
".",
"writeInt",
"(",
"0",
")",
";",
"output",
".",
"writeByteArray",
"(",
"getRequestID",
"(",
"par1DatagramPacket",
".",
"getSocketAddress",
"(",
")",
")",
")",
";",
"output",
".",
"writeString",
"(",
"\"splitnum\"",
")",
";",
"output",
".",
"writeInt",
"(",
"128",
")",
";",
"output",
".",
"writeInt",
"(",
"0",
")",
";",
"output",
".",
"writeString",
"(",
"\"hostname\"",
")",
";",
"output",
".",
"writeString",
"(",
"serverMotd",
")",
";",
"output",
".",
"writeString",
"(",
"\"gametype\"",
")",
";",
"output",
".",
"writeString",
"(",
"\"SMP\"",
")",
";",
"output",
".",
"writeString",
"(",
"\"game_id\"",
")",
";",
"output",
".",
"writeString",
"(",
"\"MINECRAFT\"",
")",
";",
"output",
".",
"writeString",
"(",
"\"version\"",
")",
";",
"output",
".",
"writeString",
"(",
"server",
".",
"getVersionString",
"(",
")",
")",
";",
"output",
".",
"writeString",
"(",
"\"plugins\"",
")",
";",
"output",
".",
"writeString",
"(",
"server",
".",
"getPlugin",
"(",
")",
")",
";",
"output",
".",
"writeString",
"(",
"\"map\"",
")",
";",
"output",
".",
"writeString",
"(",
"worldName",
")",
";",
"output",
".",
"writeString",
"(",
"\"numplayers\"",
")",
";",
"output",
".",
"writeString",
"(",
"(",
"new",
"StringBuilder",
"(",
")",
")",
".",
"append",
"(",
"\"\"",
")",
".",
"append",
"(",
"getNumberOfPlayers",
"(",
")",
")",
".",
"toString",
"(",
")",
")",
";",
"output",
".",
"writeString",
"(",
"\"maxplayers\"",
")",
";",
"output",
".",
"writeString",
"(",
"(",
"new",
"StringBuilder",
"(",
")",
")",
".",
"append",
"(",
"\"\"",
")",
".",
"append",
"(",
"maxPlayers",
")",
".",
"toString",
"(",
")",
")",
";",
"output",
".",
"writeString",
"(",
"\"hostport\"",
")",
";",
"output",
".",
"writeString",
"(",
"(",
"new",
"StringBuilder",
"(",
")",
")",
".",
"append",
"(",
"\"\"",
")",
".",
"append",
"(",
"serverPort",
")",
".",
"toString",
"(",
")",
")",
";",
"output",
".",
"writeString",
"(",
"\"hostip\"",
")",
";",
"output",
".",
"writeString",
"(",
"queryHostname",
")",
";",
"output",
".",
"writeInt",
"(",
"0",
")",
";",
"output",
".",
"writeInt",
"(",
"1",
")",
";",
"output",
".",
"writeString",
"(",
"\"player_\"",
")",
";",
"output",
".",
"writeInt",
"(",
"0",
")",
";",
"String",
"as",
"[",
"]",
"=",
"server",
".",
"getPlayerNamesAsList",
"(",
")",
";",
"byte",
"byte0",
"=",
"(",
"byte",
")",
"as",
".",
"length",
";",
"for",
"(",
"byte",
"byte1",
"=",
"(",
"byte",
")",
"(",
"byte0",
"-",
"1",
")",
";",
"byte1",
">=",
"0",
";",
"byte1",
"--",
")",
"{",
"output",
".",
"writeString",
"(",
"as",
"[",
"byte1",
"]",
")",
";",
"}",
"output",
".",
"writeInt",
"(",
"0",
")",
";",
"return",
"output",
".",
"toByteArray",
"(",
")",
";",
"}",
"private",
"byte",
"[",
"]",
"getRequestID",
"(",
"SocketAddress",
"par1SocketAddress",
")",
"{",
"return",
"(",
"(",
"RConThreadQueryAuth",
")",
"queryClients",
".",
"get",
"(",
"par1SocketAddress",
")",
")",
".",
"getRequestID",
"(",
")",
";",
"}",
"private",
"Boolean",
"verifyClientAuth",
"(",
"DatagramPacket",
"par1DatagramPacket",
")",
"{",
"SocketAddress",
"socketaddress",
"=",
"par1DatagramPacket",
".",
"getSocketAddress",
"(",
")",
";",
"if",
"(",
"!",
"queryClients",
".",
"containsKey",
"(",
"socketaddress",
")",
")",
"{",
"return",
"Boolean",
".",
"valueOf",
"(",
"false",
")",
";",
"}",
"byte",
"abyte0",
"[",
"]",
"=",
"par1DatagramPacket",
".",
"getData",
"(",
")",
";",
"if",
"(",
"(",
"(",
"RConThreadQueryAuth",
")",
"queryClients",
".",
"get",
"(",
"socketaddress",
")",
")",
".",
"getRandomChallenge",
"(",
")",
"!=",
"RConUtils",
".",
"getBytesAsBEint",
"(",
"abyte0",
",",
"7",
",",
"par1DatagramPacket",
".",
"getLength",
"(",
")",
")",
")",
"{",
"return",
"Boolean",
".",
"valueOf",
"(",
"false",
")",
";",
"}",
"else",
"{",
"return",
"Boolean",
".",
"valueOf",
"(",
"true",
")",
";",
"}",
"}",
"private",
"void",
"sendAuthChallenge",
"(",
"DatagramPacket",
"par1DatagramPacket",
")",
"throws",
"SocketException",
",",
"IOException",
"{",
"RConThreadQueryAuth",
"rconthreadqueryauth",
"=",
"new",
"RConThreadQueryAuth",
"(",
"this",
",",
"par1DatagramPacket",
")",
";",
"queryClients",
".",
"put",
"(",
"par1DatagramPacket",
".",
"getSocketAddress",
"(",
")",
",",
"rconthreadqueryauth",
")",
";",
"sendResponsePacket",
"(",
"rconthreadqueryauth",
".",
"getChallengeValue",
"(",
")",
",",
"par1DatagramPacket",
")",
";",
"}",
"private",
"void",
"cleanQueryClientsMap",
"(",
")",
"{",
"if",
"(",
"!",
"running",
")",
"{",
"return",
";",
"}",
"long",
"l",
"=",
"System",
".",
"currentTimeMillis",
"(",
")",
";",
"if",
"(",
"l",
"<",
"lastAuthCheckTime",
"+",
"30000L",
")",
"{",
"return",
";",
"}",
"lastAuthCheckTime",
"=",
"l",
";",
"Iterator",
"iterator",
"=",
"queryClients",
".",
"entrySet",
"(",
")",
".",
"iterator",
"(",
")",
";",
"do",
"{",
"if",
"(",
"!",
"iterator",
".",
"hasNext",
"(",
")",
")",
"{",
"break",
";",
"}",
"java",
".",
"util",
".",
"Map",
".",
"Entry",
"entry",
"=",
"(",
"java",
".",
"util",
".",
"Map",
".",
"Entry",
")",
"iterator",
".",
"next",
"(",
")",
";",
"if",
"(",
"(",
"(",
"RConThreadQueryAuth",
")",
"entry",
".",
"getValue",
"(",
")",
")",
".",
"hasExpired",
"(",
"l",
")",
".",
"booleanValue",
"(",
")",
")",
"{",
"iterator",
".",
"remove",
"(",
")",
";",
"}",
"}",
"while",
"(",
"true",
")",
";",
"}",
"public",
"void",
"run",
"(",
")",
"{",
"log",
"(",
"(",
"new",
"StringBuilder",
"(",
")",
")",
".",
"append",
"(",
"\"\"",
")",
".",
"append",
"(",
"serverHostname",
")",
".",
"append",
"(",
"\":\"",
")",
".",
"append",
"(",
"queryPort",
")",
".",
"toString",
"(",
")",
")",
";",
"lastAuthCheckTime",
"=",
"System",
".",
"currentTimeMillis",
"(",
")",
";",
"incomingPacket",
"=",
"new",
"DatagramPacket",
"(",
"buffer",
",",
"buffer",
".",
"length",
")",
";",
"try",
"{",
"while",
"(",
"running",
")",
"{",
"try",
"{",
"querySocket",
".",
"receive",
"(",
"incomingPacket",
")",
";",
"cleanQueryClientsMap",
"(",
")",
";",
"parseIncomingPacket",
"(",
"incomingPacket",
")",
";",
"}",
"catch",
"(",
"SocketTimeoutException",
"sockettimeoutexception",
")",
"{",
"cleanQueryClientsMap",
"(",
")",
";",
"}",
"catch",
"(",
"PortUnreachableException",
"portunreachableexception",
")",
"{",
"}",
"catch",
"(",
"IOException",
"ioexception",
")",
"{",
"stopWithException",
"(",
"ioexception",
")",
";",
"}",
"}",
"}",
"finally",
"{",
"closeAllSockets",
"(",
")",
";",
"}",
"}",
"public",
"void",
"startThread",
"(",
")",
"{",
"if",
"(",
"running",
")",
"{",
"return",
";",
"}",
"if",
"(",
"0",
">=",
"queryPort",
"||",
"65535",
"<",
"queryPort",
")",
"{",
"logWarning",
"(",
"(",
"new",
"StringBuilder",
"(",
")",
")",
".",
"append",
"(",
"\"\"",
")",
".",
"append",
"(",
"queryPort",
")",
".",
"append",
"(",
"\"",
"found",
"in",
"'\"",
")",
".",
"append",
"(",
"server",
".",
"getSettingsFilename",
"(",
")",
")",
".",
"append",
"(",
"\"\"",
")",
".",
"toString",
"(",
")",
")",
";",
"return",
";",
"}",
"if",
"(",
"initQuerySystem",
"(",
")",
")",
"{",
"super",
".",
"startThread",
"(",
")",
";",
"}",
"}",
"private",
"void",
"stopWithException",
"(",
"Exception",
"par1Exception",
")",
"{",
"if",
"(",
"!",
"running",
")",
"{",
"return",
";",
"}",
"logWarning",
"(",
"(",
"new",
"StringBuilder",
"(",
")",
")",
".",
"append",
"(",
"\"\"",
")",
".",
"append",
"(",
"par1Exception",
".",
"toString",
"(",
")",
")",
".",
"append",
"(",
"\")\"",
")",
".",
"toString",
"(",
")",
")",
";",
"if",
"(",
"!",
"initQuerySystem",
"(",
")",
")",
"{",
"logSevere",
"(",
"\"\"",
")",
";",
"running",
"=",
"false",
";",
"server",
".",
"func_40010_o",
"(",
")",
";",
"}",
"}",
"private",
"boolean",
"initQuerySystem",
"(",
")",
"{",
"try",
"{",
"querySocket",
"=",
"new",
"DatagramSocket",
"(",
"queryPort",
",",
"InetAddress",
".",
"getByName",
"(",
"serverHostname",
")",
")",
";",
"registerSocket",
"(",
"querySocket",
")",
";",
"querySocket",
".",
"setSoTimeout",
"(",
"500",
")",
";",
"return",
"true",
";",
"}",
"catch",
"(",
"SocketException",
"socketexception",
")",
"{",
"logWarning",
"(",
"(",
"new",
"StringBuilder",
"(",
")",
")",
".",
"append",
"(",
"\"\"",
")",
".",
"append",
"(",
"serverHostname",
")",
".",
"append",
"(",
"\":\"",
")",
".",
"append",
"(",
"queryPort",
")",
".",
"append",
"(",
"\"",
"(Socket):",
"\"",
")",
".",
"append",
"(",
"socketexception",
".",
"getMessage",
"(",
")",
")",
".",
"toString",
"(",
")",
")",
";",
"}",
"catch",
"(",
"UnknownHostException",
"unknownhostexception",
")",
"{",
"logWarning",
"(",
"(",
"new",
"StringBuilder",
"(",
")",
")",
".",
"append",
"(",
"\"\"",
")",
".",
"append",
"(",
"serverHostname",
")",
".",
"append",
"(",
"\":\"",
")",
".",
"append",
"(",
"queryPort",
")",
".",
"append",
"(",
"\"\"",
")",
".",
"append",
"(",
"unknownhostexception",
".",
"getMessage",
"(",
")",
")",
".",
"toString",
"(",
")",
")",
";",
"}",
"catch",
"(",
"Exception",
"exception",
")",
"{",
"logWarning",
"(",
"(",
"new",
"StringBuilder",
"(",
")",
")",
".",
"append",
"(",
"\"\"",
")",
".",
"append",
"(",
"serverHostname",
")",
".",
"append",
"(",
"\":\"",
")",
".",
"append",
"(",
"queryPort",
")",
".",
"append",
"(",
"\"",
"(E):",
"\"",
")",
".",
"append",
"(",
"exception",
".",
"getMessage",
"(",
")",
")",
".",
"toString",
"(",
")",
")",
";",
"}",
"return",
"false",
";",
"}",
"}",
"</s>"
] |
9,437 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"BiomeDecorator",
"{",
"protected",
"World",
"currentWorld",
";",
"protected",
"Random",
"randomGenerator",
";",
"protected",
"int",
"chunk_X",
";",
"protected",
"int",
"chunk_Z",
";",
"protected",
"BiomeGenBase",
"biome",
";",
"protected",
"WorldGenerator",
"clayGen",
";",
"protected",
"WorldGenerator",
"sandGen",
";",
"protected",
"WorldGenerator",
"gravelAsSandGen",
";",
"protected",
"WorldGenerator",
"dirtGen",
";",
"protected",
"WorldGenerator",
"gravelGen",
";",
"protected",
"WorldGenerator",
"coalGen",
";",
"protected",
"WorldGenerator",
"ironGen",
";",
"protected",
"WorldGenerator",
"goldGen",
";",
"protected",
"WorldGenerator",
"redstoneGen",
";",
"protected",
"WorldGenerator",
"diamondGen",
";",
"protected",
"WorldGenerator",
"lapisGen",
";",
"protected",
"WorldGenerator",
"plantYellowGen",
";",
"protected",
"WorldGenerator",
"plantRedGen",
";",
"protected",
"WorldGenerator",
"mushroomBrownGen",
";",
"protected",
"WorldGenerator",
"mushroomRedGen",
";",
"protected",
"WorldGenerator",
"bigMushroomGen",
";",
"protected",
"WorldGenerator",
"reedGen",
";",
"protected",
"WorldGenerator",
"cactusGen",
";",
"protected",
"WorldGenerator",
"waterlilyGen",
";",
"protected",
"int",
"waterlilyPerChunk",
";",
"protected",
"int",
"treesPerChunk",
";",
"protected",
"int",
"flowersPerChunk",
";",
"protected",
"int",
"grassPerChunk",
";",
"protected",
"int",
"deadBushPerChunk",
";",
"protected",
"int",
"mushroomsPerChunk",
";",
"protected",
"int",
"reedsPerChunk",
";",
"protected",
"int",
"cactiPerChunk",
";",
"protected",
"int",
"sandPerChunk",
";",
"protected",
"int",
"sandPerChunk2",
";",
"protected",
"int",
"clayPerChunk",
";",
"protected",
"int",
"bigMushroomsPerChunk",
";",
"public",
"boolean",
"generateLakes",
";",
"public",
"BiomeDecorator",
"(",
"BiomeGenBase",
"par1BiomeGenBase",
")",
"{",
"clayGen",
"=",
"new",
"WorldGenClay",
"(",
"4",
")",
";",
"sandGen",
"=",
"new",
"WorldGenSand",
"(",
"7",
",",
"Block",
".",
"sand",
".",
"blockID",
")",
";",
"gravelAsSandGen",
"=",
"new",
"WorldGenSand",
"(",
"6",
",",
"Block",
".",
"gravel",
".",
"blockID",
")",
";",
"dirtGen",
"=",
"new",
"WorldGenMinable",
"(",
"Block",
".",
"dirt",
".",
"blockID",
",",
"32",
")",
";",
"gravelGen",
"=",
"new",
"WorldGenMinable",
"(",
"Block",
".",
"gravel",
".",
"blockID",
",",
"32",
")",
";",
"coalGen",
"=",
"new",
"WorldGenMinable",
"(",
"Block",
".",
"oreCoal",
".",
"blockID",
",",
"16",
")",
";",
"ironGen",
"=",
"new",
"WorldGenMinable",
"(",
"Block",
".",
"oreIron",
".",
"blockID",
",",
"8",
")",
";",
"goldGen",
"=",
"new",
"WorldGenMinable",
"(",
"Block",
".",
"oreGold",
".",
"blockID",
",",
"8",
")",
";",
"redstoneGen",
"=",
"new",
"WorldGenMinable",
"(",
"Block",
".",
"oreRedstone",
".",
"blockID",
",",
"7",
")",
";",
"diamondGen",
"=",
"new",
"WorldGenMinable",
"(",
"Block",
".",
"oreDiamond",
".",
"blockID",
",",
"7",
")",
";",
"lapisGen",
"=",
"new",
"WorldGenMinable",
"(",
"Block",
".",
"oreLapis",
".",
"blockID",
",",
"6",
")",
";",
"plantYellowGen",
"=",
"new",
"WorldGenFlowers",
"(",
"Block",
".",
"plantYellow",
".",
"blockID",
")",
";",
"plantRedGen",
"=",
"new",
"WorldGenFlowers",
"(",
"Block",
".",
"plantRed",
".",
"blockID",
")",
";",
"mushroomBrownGen",
"=",
"new",
"WorldGenFlowers",
"(",
"Block",
".",
"mushroomBrown",
".",
"blockID",
")",
";",
"mushroomRedGen",
"=",
"new",
"WorldGenFlowers",
"(",
"Block",
".",
"mushroomRed",
".",
"blockID",
")",
";",
"bigMushroomGen",
"=",
"new",
"WorldGenBigMushroom",
"(",
")",
";",
"reedGen",
"=",
"new",
"WorldGenReed",
"(",
")",
";",
"cactusGen",
"=",
"new",
"WorldGenCactus",
"(",
")",
";",
"waterlilyGen",
"=",
"new",
"WorldGenWaterlily",
"(",
")",
";",
"waterlilyPerChunk",
"=",
"0",
";",
"treesPerChunk",
"=",
"0",
";",
"flowersPerChunk",
"=",
"2",
";",
"grassPerChunk",
"=",
"1",
";",
"deadBushPerChunk",
"=",
"0",
";",
"mushroomsPerChunk",
"=",
"0",
";",
"reedsPerChunk",
"=",
"0",
";",
"cactiPerChunk",
"=",
"0",
";",
"sandPerChunk",
"=",
"1",
";",
"sandPerChunk2",
"=",
"3",
";",
"clayPerChunk",
"=",
"1",
";",
"bigMushroomsPerChunk",
"=",
"0",
";",
"generateLakes",
"=",
"true",
";",
"biome",
"=",
"par1BiomeGenBase",
";",
"}",
"public",
"void",
"decorate",
"(",
"World",
"par1World",
",",
"Random",
"par2Random",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"if",
"(",
"currentWorld",
"!=",
"null",
")",
"{",
"throw",
"new",
"RuntimeException",
"(",
"\"\"",
")",
";",
"}",
"else",
"{",
"currentWorld",
"=",
"par1World",
";",
"randomGenerator",
"=",
"par2Random",
";",
"chunk_X",
"=",
"par3",
";",
"chunk_Z",
"=",
"par4",
";",
"decorate",
"(",
")",
";",
"currentWorld",
"=",
"null",
";",
"randomGenerator",
"=",
"null",
";",
"return",
";",
"}",
"}",
"protected",
"void",
"decorate",
"(",
")",
"{",
"generateOres",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"sandPerChunk2",
";",
"i",
"++",
")",
"{",
"int",
"i1",
"=",
"chunk_X",
"+",
"randomGenerator",
".",
"nextInt",
"(",
"16",
")",
"+",
"8",
";",
"int",
"k5",
"=",
"chunk_Z",
"+",
"randomGenerator",
".",
"nextInt",
"(",
"16",
")",
"+",
"8",
";",
"sandGen",
".",
"generate",
"(",
"currentWorld",
",",
"randomGenerator",
",",
"i1",
",",
"currentWorld",
".",
"getTopSolidOrLiquidBlock",
"(",
"i1",
",",
"k5",
")",
",",
"k5",
")",
";",
"}",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
"clayPerChunk",
";",
"j",
"++",
")",
"{",
"int",
"j1",
"=",
"chunk_X",
"+",
"randomGenerator",
".",
"nextInt",
"(",
"16",
")",
"+",
"8",
";",
"int",
"l5",
"=",
"chunk_Z",
"+",
"randomGenerator",
".",
"nextInt",
"(",
"16",
")",
"+",
"8",
";",
"clayGen",
".",
"generate",
"(",
"currentWorld",
",",
"randomGenerator",
",",
"j1",
",",
"currentWorld",
".",
"getTopSolidOrLiquidBlock",
"(",
"j1",
",",
"l5",
")",
",",
"l5",
")",
";",
"}",
"for",
"(",
"int",
"k",
"=",
"0",
";",
"k",
"<",
"sandPerChunk",
";",
"k",
"++",
")",
"{",
"int",
"k1",
"=",
"chunk_X",
"+",
"randomGenerator",
".",
"nextInt",
"(",
"16",
")",
"+",
"8",
";",
"int",
"i6",
"=",
"chunk_Z",
"+",
"randomGenerator",
".",
"nextInt",
"(",
"16",
")",
"+",
"8",
";",
"sandGen",
".",
"generate",
"(",
"currentWorld",
",",
"randomGenerator",
",",
"k1",
",",
"currentWorld",
".",
"getTopSolidOrLiquidBlock",
"(",
"k1",
",",
"i6",
")",
",",
"i6",
")",
";",
"}",
"int",
"l",
"=",
"treesPerChunk",
";",
"if",
"(",
"randomGenerator",
".",
"nextInt",
"(",
"10",
")",
"==",
"0",
")",
"{",
"l",
"++",
";",
"}",
"for",
"(",
"int",
"l1",
"=",
"0",
";",
"l1",
"<",
"l",
";",
"l1",
"++",
")",
"{",
"int",
"j6",
"=",
"chunk_X",
"+",
"randomGenerator",
".",
"nextInt",
"(",
"16",
")",
"+",
"8",
";",
"int",
"k10",
"=",
"chunk_Z",
"+",
"randomGenerator",
".",
"nextInt",
"(",
"16",
")",
"+",
"8",
";",
"WorldGenerator",
"worldgenerator",
"=",
"biome",
".",
"getRandomWorldGenForTrees",
"(",
"randomGenerator",
")",
";",
"worldgenerator",
".",
"setScale",
"(",
"1.0D",
",",
"1.0D",
",",
"1.0D",
")",
";",
"worldgenerator",
".",
"generate",
"(",
"currentWorld",
",",
"randomGenerator",
",",
"j6",
",",
"currentWorld",
".",
"getHeightValue",
"(",
"j6",
",",
"k10",
")",
",",
"k10",
")",
";",
"}",
"for",
"(",
"int",
"i2",
"=",
"0",
";",
"i2",
"<",
"bigMushroomsPerChunk",
";",
"i2",
"++",
")",
"{",
"int",
"k6",
"=",
"chunk_X",
"+",
"randomGenerator",
".",
"nextInt",
"(",
"16",
")",
"+",
"8",
";",
"int",
"l10",
"=",
"chunk_Z",
"+",
"randomGenerator",
".",
"nextInt",
"(",
"16",
")",
"+",
"8",
";",
"bigMushroomGen",
".",
"generate",
"(",
"currentWorld",
",",
"randomGenerator",
",",
"k6",
",",
"currentWorld",
".",
"getHeightValue",
"(",
"k6",
",",
"l10",
")",
",",
"l10",
")",
";",
"}",
"for",
"(",
"int",
"j2",
"=",
"0",
";",
"j2",
"<",
"flowersPerChunk",
";",
"j2",
"++",
")",
"{",
"int",
"l6",
"=",
"chunk_X",
"+",
"randomGenerator",
".",
"nextInt",
"(",
"16",
")",
"+",
"8",
";",
"int",
"i11",
"=",
"randomGenerator",
".",
"nextInt",
"(",
"128",
")",
";",
"int",
"l14",
"=",
"chunk_Z",
"+",
"randomGenerator",
".",
"nextInt",
"(",
"16",
")",
"+",
"8",
";",
"plantYellowGen",
".",
"generate",
"(",
"currentWorld",
",",
"randomGenerator",
",",
"l6",
",",
"i11",
",",
"l14",
")",
";",
"if",
"(",
"randomGenerator",
".",
"nextInt",
"(",
"4",
")",
"==",
"0",
")",
"{",
"int",
"i7",
"=",
"chunk_X",
"+",
"randomGenerator",
".",
"nextInt",
"(",
"16",
")",
"+",
"8",
";",
"int",
"j11",
"=",
"randomGenerator",
".",
"nextInt",
"(",
"128",
")",
";",
"int",
"i15",
"=",
"chunk_Z",
"+",
"randomGenerator",
".",
"nextInt",
"(",
"16",
")",
"+",
"8",
";",
"plantRedGen",
".",
"generate",
"(",
"currentWorld",
",",
"randomGenerator",
",",
"i7",
",",
"j11",
",",
"i15",
")",
";",
"}",
"}",
"for",
"(",
"int",
"k2",
"=",
"0",
";",
"k2",
"<",
"grassPerChunk",
";",
"k2",
"++",
")",
"{",
"int",
"j7",
"=",
"chunk_X",
"+",
"randomGenerator",
".",
"nextInt",
"(",
"16",
")",
"+",
"8",
";",
"int",
"k11",
"=",
"randomGenerator",
".",
"nextInt",
"(",
"128",
")",
";",
"int",
"j15",
"=",
"chunk_Z",
"+",
"randomGenerator",
".",
"nextInt",
"(",
"16",
")",
"+",
"8",
";",
"WorldGenerator",
"worldgenerator1",
"=",
"biome",
".",
"func_48440_b",
"(",
"randomGenerator",
")",
";",
"worldgenerator1",
".",
"generate",
"(",
"currentWorld",
",",
"randomGenerator",
",",
"j7",
",",
"k11",
",",
"j15",
")",
";",
"}",
"for",
"(",
"int",
"l2",
"=",
"0",
";",
"l2",
"<",
"deadBushPerChunk",
";",
"l2",
"++",
")",
"{",
"int",
"k7",
"=",
"chunk_X",
"+",
"randomGenerator",
".",
"nextInt",
"(",
"16",
")",
"+",
"8",
";",
"int",
"l11",
"=",
"randomGenerator",
".",
"nextInt",
"(",
"128",
")",
";",
"int",
"k15",
"=",
"chunk_Z",
"+",
"randomGenerator",
".",
"nextInt",
"(",
"16",
")",
"+",
"8",
";",
"(",
"new",
"WorldGenDeadBush",
"(",
"Block",
".",
"deadBush",
".",
"blockID",
")",
")",
".",
"generate",
"(",
"currentWorld",
",",
"randomGenerator",
",",
"k7",
",",
"l11",
",",
"k15",
")",
";",
"}",
"for",
"(",
"int",
"i3",
"=",
"0",
";",
"i3",
"<",
"waterlilyPerChunk",
";",
"i3",
"++",
")",
"{",
"int",
"l7",
"=",
"chunk_X",
"+",
"randomGenerator",
".",
"nextInt",
"(",
"16",
")",
"+",
"8",
";",
"int",
"i12",
"=",
"chunk_Z",
"+",
"randomGenerator",
".",
"nextInt",
"(",
"16",
")",
"+",
"8",
";",
"int",
"l15",
";",
"for",
"(",
"l15",
"=",
"randomGenerator",
".",
"nextInt",
"(",
"128",
")",
";",
"l15",
">",
"0",
"&&",
"currentWorld",
".",
"getBlockId",
"(",
"l7",
",",
"l15",
"-",
"1",
",",
"i12",
")",
"==",
"0",
";",
"l15",
"--",
")",
"{",
"}",
"waterlilyGen",
".",
"generate",
"(",
"currentWorld",
",",
"randomGenerator",
",",
"l7",
",",
"l15",
",",
"i12",
")",
";",
"}",
"for",
"(",
"int",
"j3",
"=",
"0",
";",
"j3",
"<",
"mushroomsPerChunk",
";",
"j3",
"++",
")",
"{",
"if",
"(",
"randomGenerator",
".",
"nextInt",
"(",
"4",
")",
"==",
"0",
")",
"{",
"int",
"i8",
"=",
"chunk_X",
"+",
"randomGenerator",
".",
"nextInt",
"(",
"16",
")",
"+",
"8",
";",
"int",
"j12",
"=",
"chunk_Z",
"+",
"randomGenerator",
".",
"nextInt",
"(",
"16",
")",
"+",
"8",
";",
"int",
"i16",
"=",
"currentWorld",
".",
"getHeightValue",
"(",
"i8",
",",
"j12",
")",
";",
"mushroomBrownGen",
".",
"generate",
"(",
"currentWorld",
",",
"randomGenerator",
",",
"i8",
",",
"i16",
",",
"j12",
")",
";",
"}",
"if",
"(",
"randomGenerator",
".",
"nextInt",
"(",
"8",
")",
"==",
"0",
")",
"{",
"int",
"j8",
"=",
"chunk_X",
"+",
"randomGenerator",
".",
"nextInt",
"(",
"16",
")",
"+",
"8",
";",
"int",
"k12",
"=",
"chunk_Z",
"+",
"randomGenerator",
".",
"nextInt",
"(",
"16",
")",
"+",
"8",
";",
"int",
"j16",
"=",
"randomGenerator",
".",
"nextInt",
"(",
"128",
")",
";",
"mushroomRedGen",
".",
"generate",
"(",
"currentWorld",
",",
"randomGenerator",
",",
"j8",
",",
"j16",
",",
"k12",
")",
";",
"}",
"}",
"if",
"(",
"randomGenerator",
".",
"nextInt",
"(",
"4",
")",
"==",
"0",
")",
"{",
"int",
"k3",
"=",
"chunk_X",
"+",
"randomGenerator",
".",
"nextInt",
"(",
"16",
")",
"+",
"8",
";",
"int",
"k8",
"=",
"randomGenerator",
".",
"nextInt",
"(",
"128",
")",
";",
"int",
"l12",
"=",
"chunk_Z",
"+",
"randomGenerator",
".",
"nextInt",
"(",
"16",
")",
"+",
"8",
";",
"mushroomBrownGen",
".",
"generate",
"(",
"currentWorld",
",",
"randomGenerator",
",",
"k3",
",",
"k8",
",",
"l12",
")",
";",
"}",
"if",
"(",
"randomGenerator",
".",
"nextInt",
"(",
"8",
")",
"==",
"0",
")",
"{",
"int",
"l3",
"=",
"chunk_X",
"+",
"randomGenerator",
".",
"nextInt",
"(",
"16",
")",
"+",
"8",
";",
"int",
"l8",
"=",
"randomGenerator",
".",
"nextInt",
"(",
"128",
")",
";",
"int",
"i13",
"=",
"chunk_Z",
"+",
"randomGenerator",
".",
"nextInt",
"(",
"16",
")",
"+",
"8",
";",
"mushroomRedGen",
".",
"generate",
"(",
"currentWorld",
",",
"randomGenerator",
",",
"l3",
",",
"l8",
",",
"i13",
")",
";",
"}",
"for",
"(",
"int",
"i4",
"=",
"0",
";",
"i4",
"<",
"reedsPerChunk",
";",
"i4",
"++",
")",
"{",
"int",
"i9",
"=",
"chunk_X",
"+",
"randomGenerator",
".",
"nextInt",
"(",
"16",
")",
"+",
"8",
";",
"int",
"j13",
"=",
"chunk_Z",
"+",
"randomGenerator",
".",
"nextInt",
"(",
"16",
")",
"+",
"8",
";",
"int",
"k16",
"=",
"randomGenerator",
".",
"nextInt",
"(",
"128",
")",
";",
"reedGen",
".",
"generate",
"(",
"currentWorld",
",",
"randomGenerator",
",",
"i9",
",",
"k16",
",",
"j13",
")",
";",
"}",
"for",
"(",
"int",
"j4",
"=",
"0",
";",
"j4",
"<",
"10",
";",
"j4",
"++",
")",
"{",
"int",
"j9",
"=",
"chunk_X",
"+",
"randomGenerator",
".",
"nextInt",
"(",
"16",
")",
"+",
"8",
";",
"int",
"k13",
"=",
"randomGenerator",
".",
"nextInt",
"(",
"128",
")",
";",
"int",
"l16",
"=",
"chunk_Z",
"+",
"randomGenerator",
".",
"nextInt",
"(",
"16",
")",
"+",
"8",
";",
"reedGen",
".",
"generate",
"(",
"currentWorld",
",",
"randomGenerator",
",",
"j9",
",",
"k13",
",",
"l16",
")",
";",
"}",
"if",
"(",
"randomGenerator",
".",
"nextInt",
"(",
"32",
")",
"==",
"0",
")",
"{",
"int",
"k4",
"=",
"chunk_X",
"+",
"randomGenerator",
".",
"nextInt",
"(",
"16",
")",
"+",
"8",
";",
"int",
"k9",
"=",
"randomGenerator",
".",
"nextInt",
"(",
"128",
")",
";",
"int",
"l13",
"=",
"chunk_Z",
"+",
"randomGenerator",
".",
"nextInt",
"(",
"16",
")",
"+",
"8",
";",
"(",
"new",
"WorldGenPumpkin",
"(",
")",
")",
".",
"generate",
"(",
"currentWorld",
",",
"randomGenerator",
",",
"k4",
",",
"k9",
",",
"l13",
")",
";",
"}",
"for",
"(",
"int",
"l4",
"=",
"0",
";",
"l4",
"<",
"cactiPerChunk",
";",
"l4",
"++",
")",
"{",
"int",
"l9",
"=",
"chunk_X",
"+",
"randomGenerator",
".",
"nextInt",
"(",
"16",
")",
"+",
"8",
";",
"int",
"i14",
"=",
"randomGenerator",
".",
"nextInt",
"(",
"128",
")",
";",
"int",
"i17",
"=",
"chunk_Z",
"+",
"randomGenerator",
".",
"nextInt",
"(",
"16",
")",
"+",
"8",
";",
"cactusGen",
".",
"generate",
"(",
"currentWorld",
",",
"randomGenerator",
",",
"l9",
",",
"i14",
",",
"i17",
")",
";",
"}",
"if",
"(",
"generateLakes",
")",
"{",
"for",
"(",
"int",
"i5",
"=",
"0",
";",
"i5",
"<",
"50",
";",
"i5",
"++",
")",
"{",
"int",
"i10",
"=",
"chunk_X",
"+",
"randomGenerator",
".",
"nextInt",
"(",
"16",
")",
"+",
"8",
";",
"int",
"j14",
"=",
"randomGenerator",
".",
"nextInt",
"(",
"randomGenerator",
".",
"nextInt",
"(",
"120",
")",
"+",
"8",
")",
";",
"int",
"j17",
"=",
"chunk_Z",
"+",
"randomGenerator",
".",
"nextInt",
"(",
"16",
")",
"+",
"8",
";",
"(",
"new",
"WorldGenLiquids",
"(",
"Block",
".",
"waterMoving",
".",
"blockID",
")",
")",
".",
"generate",
"(",
"currentWorld",
",",
"randomGenerator",
",",
"i10",
",",
"j14",
",",
"j17",
")",
";",
"}",
"for",
"(",
"int",
"j5",
"=",
"0",
";",
"j5",
"<",
"20",
";",
"j5",
"++",
")",
"{",
"int",
"j10",
"=",
"chunk_X",
"+",
"randomGenerator",
".",
"nextInt",
"(",
"16",
")",
"+",
"8",
";",
"int",
"k14",
"=",
"randomGenerator",
".",
"nextInt",
"(",
"randomGenerator",
".",
"nextInt",
"(",
"randomGenerator",
".",
"nextInt",
"(",
"112",
")",
"+",
"8",
")",
"+",
"8",
")",
";",
"int",
"k17",
"=",
"chunk_Z",
"+",
"randomGenerator",
".",
"nextInt",
"(",
"16",
")",
"+",
"8",
";",
"(",
"new",
"WorldGenLiquids",
"(",
"Block",
".",
"lavaMoving",
".",
"blockID",
")",
")",
".",
"generate",
"(",
"currentWorld",
",",
"randomGenerator",
",",
"j10",
",",
"k14",
",",
"k17",
")",
";",
"}",
"}",
"}",
"protected",
"void",
"genStandardOre1",
"(",
"int",
"par1",
",",
"WorldGenerator",
"par2WorldGenerator",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"par1",
";",
"i",
"++",
")",
"{",
"int",
"j",
"=",
"chunk_X",
"+",
"randomGenerator",
".",
"nextInt",
"(",
"16",
")",
";",
"int",
"k",
"=",
"randomGenerator",
".",
"nextInt",
"(",
"par4",
"-",
"par3",
")",
"+",
"par3",
";",
"int",
"l",
"=",
"chunk_Z",
"+",
"randomGenerator",
".",
"nextInt",
"(",
"16",
")",
";",
"par2WorldGenerator",
".",
"generate",
"(",
"currentWorld",
",",
"randomGenerator",
",",
"j",
",",
"k",
",",
"l",
")",
";",
"}",
"}",
"protected",
"void",
"genStandardOre2",
"(",
"int",
"par1",
",",
"WorldGenerator",
"par2WorldGenerator",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"par1",
";",
"i",
"++",
")",
"{",
"int",
"j",
"=",
"chunk_X",
"+",
"randomGenerator",
".",
"nextInt",
"(",
"16",
")",
";",
"int",
"k",
"=",
"randomGenerator",
".",
"nextInt",
"(",
"par4",
")",
"+",
"randomGenerator",
".",
"nextInt",
"(",
"par4",
")",
"+",
"(",
"par3",
"-",
"par4",
")",
";",
"int",
"l",
"=",
"chunk_Z",
"+",
"randomGenerator",
".",
"nextInt",
"(",
"16",
")",
";",
"par2WorldGenerator",
".",
"generate",
"(",
"currentWorld",
",",
"randomGenerator",
",",
"j",
",",
"k",
",",
"l",
")",
";",
"}",
"}",
"protected",
"void",
"generateOres",
"(",
")",
"{",
"genStandardOre1",
"(",
"20",
",",
"dirtGen",
",",
"0",
",",
"128",
")",
";",
"genStandardOre1",
"(",
"10",
",",
"gravelGen",
",",
"0",
",",
"128",
")",
";",
"genStandardOre1",
"(",
"20",
",",
"coalGen",
",",
"0",
",",
"128",
")",
";",
"genStandardOre1",
"(",
"20",
",",
"ironGen",
",",
"0",
",",
"64",
")",
";",
"genStandardOre1",
"(",
"2",
",",
"goldGen",
",",
"0",
",",
"32",
")",
";",
"genStandardOre1",
"(",
"8",
",",
"redstoneGen",
",",
"0",
",",
"16",
")",
";",
"genStandardOre1",
"(",
"1",
",",
"diamondGen",
",",
"0",
",",
"16",
")",
";",
"genStandardOre2",
"(",
"1",
",",
"lapisGen",
",",
"16",
",",
"16",
")",
";",
"}",
"}",
"</s>"
] |
9,438 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"class",
"RecipesCrafting",
"{",
"public",
"RecipesCrafting",
"(",
")",
"{",
"}",
"public",
"void",
"addRecipes",
"(",
"CraftingManager",
"par1CraftingManager",
")",
"{",
"par1CraftingManager",
".",
"addRecipe",
"(",
"new",
"ItemStack",
"(",
"Block",
".",
"chest",
")",
",",
"new",
"Object",
"[",
"]",
"{",
"\"###\"",
",",
"\"#",
"#\"",
",",
"\"###\"",
",",
"'#'",
",",
"Block",
".",
"planks",
"}",
")",
";",
"par1CraftingManager",
".",
"addRecipe",
"(",
"new",
"ItemStack",
"(",
"Block",
".",
"stoneOvenIdle",
")",
",",
"new",
"Object",
"[",
"]",
"{",
"\"###\"",
",",
"\"#",
"#\"",
",",
"\"###\"",
",",
"'#'",
",",
"Block",
".",
"cobblestone",
"}",
")",
";",
"par1CraftingManager",
".",
"addRecipe",
"(",
"new",
"ItemStack",
"(",
"Block",
".",
"workbench",
")",
",",
"new",
"Object",
"[",
"]",
"{",
"\"##\"",
",",
"\"##\"",
",",
"'#'",
",",
"Block",
".",
"planks",
"}",
")",
";",
"par1CraftingManager",
".",
"addRecipe",
"(",
"new",
"ItemStack",
"(",
"Block",
".",
"sandStone",
")",
",",
"new",
"Object",
"[",
"]",
"{",
"\"##\"",
",",
"\"##\"",
",",
"'#'",
",",
"Block",
".",
"sand",
"}",
")",
";",
"par1CraftingManager",
".",
"addRecipe",
"(",
"new",
"ItemStack",
"(",
"Block",
".",
"sandStone",
",",
"4",
",",
"2",
")",
",",
"new",
"Object",
"[",
"]",
"{",
"\"##\"",
",",
"\"##\"",
",",
"'#'",
",",
"Block",
".",
"sandStone",
"}",
")",
";",
"par1CraftingManager",
".",
"addRecipe",
"(",
"new",
"ItemStack",
"(",
"Block",
".",
"sandStone",
",",
"1",
",",
"1",
")",
",",
"new",
"Object",
"[",
"]",
"{",
"\"#\"",
",",
"\"#\"",
",",
"'#'",
",",
"new",
"ItemStack",
"(",
"Block",
".",
"stairSingle",
",",
"1",
",",
"1",
")",
"}",
")",
";",
"par1CraftingManager",
".",
"addRecipe",
"(",
"new",
"ItemStack",
"(",
"Block",
".",
"stoneBrick",
",",
"4",
")",
",",
"new",
"Object",
"[",
"]",
"{",
"\"##\"",
",",
"\"##\"",
",",
"'#'",
",",
"Block",
".",
"stone",
"}",
")",
";",
"par1CraftingManager",
".",
"addRecipe",
"(",
"new",
"ItemStack",
"(",
"Block",
".",
"fenceIron",
",",
"16",
")",
",",
"new",
"Object",
"[",
"]",
"{",
"\"###\"",
",",
"\"###\"",
",",
"'#'",
",",
"Item",
".",
"ingotIron",
"}",
")",
";",
"par1CraftingManager",
".",
"addRecipe",
"(",
"new",
"ItemStack",
"(",
"Block",
".",
"thinGlass",
",",
"16",
")",
",",
"new",
"Object",
"[",
"]",
"{",
"\"###\"",
",",
"\"###\"",
",",
"'#'",
",",
"Block",
".",
"glass",
"}",
")",
";",
"par1CraftingManager",
".",
"addRecipe",
"(",
"new",
"ItemStack",
"(",
"Block",
".",
"redstoneLampIdle",
",",
"1",
")",
",",
"new",
"Object",
"[",
"]",
"{",
"\"",
"R",
"\"",
",",
"\"RGR\"",
",",
"\"",
"R",
"\"",
",",
"'R'",
",",
"Item",
".",
"redstone",
",",
"'G'",
",",
"Block",
".",
"glowStone",
"}",
")",
";",
"}",
"}",
"</s>"
] |
9,439 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"BiomeEndDecorator",
"extends",
"BiomeDecorator",
"{",
"protected",
"WorldGenerator",
"spikeGen",
";",
"public",
"BiomeEndDecorator",
"(",
"BiomeGenBase",
"par1BiomeGenBase",
")",
"{",
"super",
"(",
"par1BiomeGenBase",
")",
";",
"spikeGen",
"=",
"new",
"WorldGenSpikes",
"(",
"Block",
".",
"whiteStone",
".",
"blockID",
")",
";",
"}",
"protected",
"void",
"decorate",
"(",
")",
"{",
"generateOres",
"(",
")",
";",
"if",
"(",
"randomGenerator",
".",
"nextInt",
"(",
"5",
")",
"==",
"0",
")",
"{",
"int",
"i",
"=",
"chunk_X",
"+",
"randomGenerator",
".",
"nextInt",
"(",
"16",
")",
"+",
"8",
";",
"int",
"j",
"=",
"chunk_Z",
"+",
"randomGenerator",
".",
"nextInt",
"(",
"16",
")",
"+",
"8",
";",
"int",
"k",
"=",
"currentWorld",
".",
"getTopSolidOrLiquidBlock",
"(",
"i",
",",
"j",
")",
";",
"if",
"(",
"k",
"<=",
"0",
")",
";",
"spikeGen",
".",
"generate",
"(",
"currentWorld",
",",
"randomGenerator",
",",
"i",
",",
"k",
",",
"j",
")",
";",
"}",
"if",
"(",
"chunk_X",
"==",
"0",
"&&",
"chunk_Z",
"==",
"0",
")",
"{",
"EntityDragon",
"entitydragon",
"=",
"new",
"EntityDragon",
"(",
"currentWorld",
")",
";",
"entitydragon",
".",
"setLocationAndAngles",
"(",
"0.0D",
",",
"128D",
",",
"0.0D",
",",
"randomGenerator",
".",
"nextFloat",
"(",
")",
"*",
"360F",
",",
"0.0F",
")",
";",
"currentWorld",
".",
"spawnEntityInWorld",
"(",
"entitydragon",
")",
";",
"}",
"}",
"}",
"</s>"
] |
9,440 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"class",
"StructureBoundingBox",
"{",
"public",
"int",
"minX",
";",
"public",
"int",
"minY",
";",
"public",
"int",
"minZ",
";",
"public",
"int",
"maxX",
";",
"public",
"int",
"maxY",
";",
"public",
"int",
"maxZ",
";",
"public",
"StructureBoundingBox",
"(",
")",
"{",
"}",
"public",
"static",
"StructureBoundingBox",
"getNewBoundingBox",
"(",
")",
"{",
"return",
"new",
"StructureBoundingBox",
"(",
"0x7fffffff",
",",
"0x7fffffff",
",",
"0x7fffffff",
",",
"0x80000000",
",",
"0x80000000",
",",
"0x80000000",
")",
";",
"}",
"public",
"static",
"StructureBoundingBox",
"getComponentToAddBoundingBox",
"(",
"int",
"par0",
",",
"int",
"par1",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
",",
"int",
"par6",
",",
"int",
"par7",
",",
"int",
"par8",
",",
"int",
"par9",
")",
"{",
"switch",
"(",
"par9",
")",
"{",
"default",
":",
"return",
"new",
"StructureBoundingBox",
"(",
"par0",
"+",
"par3",
",",
"par1",
"+",
"par4",
",",
"par2",
"+",
"par5",
",",
"(",
"(",
"par0",
"+",
"par6",
")",
"-",
"1",
")",
"+",
"par3",
",",
"(",
"(",
"par1",
"+",
"par7",
")",
"-",
"1",
")",
"+",
"par4",
",",
"(",
"(",
"par2",
"+",
"par8",
")",
"-",
"1",
")",
"+",
"par5",
")",
";",
"case",
"2",
":",
"return",
"new",
"StructureBoundingBox",
"(",
"par0",
"+",
"par3",
",",
"par1",
"+",
"par4",
",",
"(",
"par2",
"-",
"par8",
")",
"+",
"1",
"+",
"par5",
",",
"(",
"(",
"par0",
"+",
"par6",
")",
"-",
"1",
")",
"+",
"par3",
",",
"(",
"(",
"par1",
"+",
"par7",
")",
"-",
"1",
")",
"+",
"par4",
",",
"par2",
"+",
"par5",
")",
";",
"case",
"0",
":",
"return",
"new",
"StructureBoundingBox",
"(",
"par0",
"+",
"par3",
",",
"par1",
"+",
"par4",
",",
"par2",
"+",
"par5",
",",
"(",
"(",
"par0",
"+",
"par6",
")",
"-",
"1",
")",
"+",
"par3",
",",
"(",
"(",
"par1",
"+",
"par7",
")",
"-",
"1",
")",
"+",
"par4",
",",
"(",
"(",
"par2",
"+",
"par8",
")",
"-",
"1",
")",
"+",
"par5",
")",
";",
"case",
"1",
":",
"return",
"new",
"StructureBoundingBox",
"(",
"(",
"par0",
"-",
"par8",
")",
"+",
"1",
"+",
"par5",
",",
"par1",
"+",
"par4",
",",
"par2",
"+",
"par3",
",",
"par0",
"+",
"par5",
",",
"(",
"(",
"par1",
"+",
"par7",
")",
"-",
"1",
")",
"+",
"par4",
",",
"(",
"(",
"par2",
"+",
"par6",
")",
"-",
"1",
")",
"+",
"par3",
")",
";",
"case",
"3",
":",
"return",
"new",
"StructureBoundingBox",
"(",
"par0",
"+",
"par5",
",",
"par1",
"+",
"par4",
",",
"par2",
"+",
"par3",
",",
"(",
"(",
"par0",
"+",
"par8",
")",
"-",
"1",
")",
"+",
"par5",
",",
"(",
"(",
"par1",
"+",
"par7",
")",
"-",
"1",
")",
"+",
"par4",
",",
"(",
"(",
"par2",
"+",
"par6",
")",
"-",
"1",
")",
"+",
"par3",
")",
";",
"}",
"}",
"public",
"StructureBoundingBox",
"(",
"StructureBoundingBox",
"par1StructureBoundingBox",
")",
"{",
"minX",
"=",
"par1StructureBoundingBox",
".",
"minX",
";",
"minY",
"=",
"par1StructureBoundingBox",
".",
"minY",
";",
"minZ",
"=",
"par1StructureBoundingBox",
".",
"minZ",
";",
"maxX",
"=",
"par1StructureBoundingBox",
".",
"maxX",
";",
"maxY",
"=",
"par1StructureBoundingBox",
".",
"maxY",
";",
"maxZ",
"=",
"par1StructureBoundingBox",
".",
"maxZ",
";",
"}",
"public",
"StructureBoundingBox",
"(",
"int",
"par1",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
",",
"int",
"par6",
")",
"{",
"minX",
"=",
"par1",
";",
"minY",
"=",
"par2",
";",
"minZ",
"=",
"par3",
";",
"maxX",
"=",
"par4",
";",
"maxY",
"=",
"par5",
";",
"maxZ",
"=",
"par6",
";",
"}",
"public",
"StructureBoundingBox",
"(",
"int",
"par1",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"minX",
"=",
"par1",
";",
"minZ",
"=",
"par2",
";",
"maxX",
"=",
"par3",
";",
"maxZ",
"=",
"par4",
";",
"minY",
"=",
"1",
";",
"maxY",
"=",
"512",
";",
"}",
"public",
"boolean",
"intersectsWith",
"(",
"StructureBoundingBox",
"par1StructureBoundingBox",
")",
"{",
"return",
"maxX",
">=",
"par1StructureBoundingBox",
".",
"minX",
"&&",
"minX",
"<=",
"par1StructureBoundingBox",
".",
"maxX",
"&&",
"maxZ",
">=",
"par1StructureBoundingBox",
".",
"minZ",
"&&",
"minZ",
"<=",
"par1StructureBoundingBox",
".",
"maxZ",
"&&",
"maxY",
">=",
"par1StructureBoundingBox",
".",
"minY",
"&&",
"minY",
"<=",
"par1StructureBoundingBox",
".",
"maxY",
";",
"}",
"public",
"boolean",
"intersectsWith",
"(",
"int",
"par1",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"return",
"maxX",
">=",
"par1",
"&&",
"minX",
"<=",
"par3",
"&&",
"maxZ",
">=",
"par2",
"&&",
"minZ",
"<=",
"par4",
";",
"}",
"public",
"void",
"expandTo",
"(",
"StructureBoundingBox",
"par1StructureBoundingBox",
")",
"{",
"minX",
"=",
"Math",
".",
"min",
"(",
"minX",
",",
"par1StructureBoundingBox",
".",
"minX",
")",
";",
"minY",
"=",
"Math",
".",
"min",
"(",
"minY",
",",
"par1StructureBoundingBox",
".",
"minY",
")",
";",
"minZ",
"=",
"Math",
".",
"min",
"(",
"minZ",
",",
"par1StructureBoundingBox",
".",
"minZ",
")",
";",
"maxX",
"=",
"Math",
".",
"max",
"(",
"maxX",
",",
"par1StructureBoundingBox",
".",
"maxX",
")",
";",
"maxY",
"=",
"Math",
".",
"max",
"(",
"maxY",
",",
"par1StructureBoundingBox",
".",
"maxY",
")",
";",
"maxZ",
"=",
"Math",
".",
"max",
"(",
"maxZ",
",",
"par1StructureBoundingBox",
".",
"maxZ",
")",
";",
"}",
"public",
"void",
"offset",
"(",
"int",
"par1",
",",
"int",
"par2",
",",
"int",
"par3",
")",
"{",
"minX",
"+=",
"par1",
";",
"minY",
"+=",
"par2",
";",
"minZ",
"+=",
"par3",
";",
"maxX",
"+=",
"par1",
";",
"maxY",
"+=",
"par2",
";",
"maxZ",
"+=",
"par3",
";",
"}",
"public",
"boolean",
"isVecInside",
"(",
"int",
"par1",
",",
"int",
"par2",
",",
"int",
"par3",
")",
"{",
"return",
"par1",
">=",
"minX",
"&&",
"par1",
"<=",
"maxX",
"&&",
"par3",
">=",
"minZ",
"&&",
"par3",
"<=",
"maxZ",
"&&",
"par2",
">=",
"minY",
"&&",
"par2",
"<=",
"maxY",
";",
"}",
"public",
"int",
"getXSize",
"(",
")",
"{",
"return",
"(",
"maxX",
"-",
"minX",
")",
"+",
"1",
";",
"}",
"public",
"int",
"getYSize",
"(",
")",
"{",
"return",
"(",
"maxY",
"-",
"minY",
")",
"+",
"1",
";",
"}",
"public",
"int",
"getZSize",
"(",
")",
"{",
"return",
"(",
"maxZ",
"-",
"minZ",
")",
"+",
"1",
";",
"}",
"public",
"int",
"getCenterX",
"(",
")",
"{",
"return",
"minX",
"+",
"(",
"(",
"maxX",
"-",
"minX",
")",
"+",
"1",
")",
"/",
"2",
";",
"}",
"public",
"int",
"getCenterY",
"(",
")",
"{",
"return",
"minY",
"+",
"(",
"(",
"maxY",
"-",
"minY",
")",
"+",
"1",
")",
"/",
"2",
";",
"}",
"public",
"int",
"getCenterZ",
"(",
")",
"{",
"return",
"minZ",
"+",
"(",
"(",
"maxZ",
"-",
"minZ",
")",
"+",
"1",
")",
"/",
"2",
";",
"}",
"public",
"String",
"toString",
"(",
")",
"{",
"return",
"(",
"new",
"StringBuilder",
"(",
")",
")",
".",
"append",
"(",
"\"(\"",
")",
".",
"append",
"(",
"minX",
")",
".",
"append",
"(",
"\",",
"\"",
")",
".",
"append",
"(",
"minY",
")",
".",
"append",
"(",
"\",",
"\"",
")",
".",
"append",
"(",
"minZ",
")",
".",
"append",
"(",
"\";",
"\"",
")",
".",
"append",
"(",
"maxX",
")",
".",
"append",
"(",
"\",",
"\"",
")",
".",
"append",
"(",
"maxY",
")",
".",
"append",
"(",
"\",",
"\"",
")",
".",
"append",
"(",
"maxZ",
")",
".",
"append",
"(",
"\")\"",
")",
".",
"toString",
"(",
")",
";",
"}",
"}",
"</s>"
] |
9,441 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"class",
"EntityAITempt",
"extends",
"EntityAIBase",
"{",
"private",
"EntityCreature",
"temptedEntity",
";",
"private",
"float",
"field_48266_b",
";",
"private",
"double",
"field_48267_c",
";",
"private",
"double",
"field_48264_d",
";",
"private",
"double",
"field_48265_e",
";",
"private",
"double",
"field_48262_f",
";",
"private",
"double",
"field_48263_g",
";",
"private",
"EntityPlayer",
"temptingPlayer",
";",
"private",
"int",
"delayTemptCounter",
";",
"private",
"boolean",
"field_48271_j",
";",
"private",
"int",
"breedingFood",
";",
"private",
"boolean",
"scaredByPlayerMovement",
";",
"private",
"boolean",
"field_48270_m",
";",
"public",
"EntityAITempt",
"(",
"EntityCreature",
"par1EntityCreature",
",",
"float",
"par2",
",",
"int",
"par3",
",",
"boolean",
"par4",
")",
"{",
"delayTemptCounter",
"=",
"0",
";",
"temptedEntity",
"=",
"par1EntityCreature",
";",
"field_48266_b",
"=",
"par2",
";",
"breedingFood",
"=",
"par3",
";",
"scaredByPlayerMovement",
"=",
"par4",
";",
"setMutexBits",
"(",
"3",
")",
";",
"}",
"public",
"boolean",
"shouldExecute",
"(",
")",
"{",
"if",
"(",
"delayTemptCounter",
">",
"0",
")",
"{",
"delayTemptCounter",
"--",
";",
"return",
"false",
";",
"}",
"temptingPlayer",
"=",
"temptedEntity",
".",
"worldObj",
".",
"getClosestPlayerToEntity",
"(",
"temptedEntity",
",",
"10D",
")",
";",
"if",
"(",
"temptingPlayer",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"ItemStack",
"itemstack",
"=",
"temptingPlayer",
".",
"getCurrentEquippedItem",
"(",
")",
";",
"if",
"(",
"itemstack",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"return",
"itemstack",
".",
"itemID",
"==",
"breedingFood",
";",
"}",
"public",
"boolean",
"continueExecuting",
"(",
")",
"{",
"if",
"(",
"scaredByPlayerMovement",
")",
"{",
"if",
"(",
"temptedEntity",
".",
"getDistanceSqToEntity",
"(",
"temptingPlayer",
")",
"<",
"36D",
")",
"{",
"if",
"(",
"temptingPlayer",
".",
"getDistanceSq",
"(",
"field_48267_c",
",",
"field_48264_d",
",",
"field_48265_e",
")",
">",
"0.010000000000000002D",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"Math",
".",
"abs",
"(",
"(",
"double",
")",
"temptingPlayer",
".",
"rotationPitch",
"-",
"field_48262_f",
")",
">",
"5D",
"||",
"Math",
".",
"abs",
"(",
"(",
"double",
")",
"temptingPlayer",
".",
"rotationYaw",
"-",
"field_48263_g",
")",
">",
"5D",
")",
"{",
"return",
"false",
";",
"}",
"}",
"else",
"{",
"field_48267_c",
"=",
"temptingPlayer",
".",
"posX",
";",
"field_48264_d",
"=",
"temptingPlayer",
".",
"posY",
";",
"field_48265_e",
"=",
"temptingPlayer",
".",
"posZ",
";",
"}",
"field_48262_f",
"=",
"temptingPlayer",
".",
"rotationPitch",
";",
"field_48263_g",
"=",
"temptingPlayer",
".",
"rotationYaw",
";",
"}",
"return",
"shouldExecute",
"(",
")",
";",
"}",
"public",
"void",
"startExecuting",
"(",
")",
"{",
"field_48267_c",
"=",
"temptingPlayer",
".",
"posX",
";",
"field_48264_d",
"=",
"temptingPlayer",
".",
"posY",
";",
"field_48265_e",
"=",
"temptingPlayer",
".",
"posZ",
";",
"field_48271_j",
"=",
"true",
";",
"field_48270_m",
"=",
"temptedEntity",
".",
"getNavigator",
"(",
")",
".",
"func_48649_a",
"(",
")",
";",
"temptedEntity",
".",
"getNavigator",
"(",
")",
".",
"func_48656_a",
"(",
"false",
")",
";",
"}",
"public",
"void",
"resetTask",
"(",
")",
"{",
"temptingPlayer",
"=",
"null",
";",
"temptedEntity",
".",
"getNavigator",
"(",
")",
".",
"clearPathEntity",
"(",
")",
";",
"delayTemptCounter",
"=",
"100",
";",
"field_48271_j",
"=",
"false",
";",
"temptedEntity",
".",
"getNavigator",
"(",
")",
".",
"func_48656_a",
"(",
"field_48270_m",
")",
";",
"}",
"public",
"void",
"updateTask",
"(",
")",
"{",
"temptedEntity",
".",
"getLookHelper",
"(",
")",
".",
"setLookPositionWithEntity",
"(",
"temptingPlayer",
",",
"30F",
",",
"temptedEntity",
".",
"getVerticalFaceSpeed",
"(",
")",
")",
";",
"if",
"(",
"temptedEntity",
".",
"getDistanceSqToEntity",
"(",
"temptingPlayer",
")",
"<",
"6.25D",
")",
"{",
"temptedEntity",
".",
"getNavigator",
"(",
")",
".",
"clearPathEntity",
"(",
")",
";",
"}",
"else",
"{",
"temptedEntity",
".",
"getNavigator",
"(",
")",
".",
"func_48652_a",
"(",
"temptingPlayer",
",",
"field_48266_b",
")",
";",
"}",
"}",
"public",
"boolean",
"func_48261_f",
"(",
")",
"{",
"return",
"field_48271_j",
";",
"}",
"}",
"</s>"
] |
9,442 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"class",
"ItemBlock",
"extends",
"Item",
"{",
"private",
"int",
"blockID",
";",
"public",
"ItemBlock",
"(",
"int",
"par1",
")",
"{",
"super",
"(",
"par1",
")",
";",
"blockID",
"=",
"par1",
"+",
"256",
";",
"setIconIndex",
"(",
"Block",
".",
"blocksList",
"[",
"par1",
"+",
"256",
"]",
".",
"getBlockTextureFromSide",
"(",
"2",
")",
")",
";",
"}",
"public",
"int",
"getBlockID",
"(",
")",
"{",
"return",
"blockID",
";",
"}",
"public",
"boolean",
"onItemUse",
"(",
"ItemStack",
"par1ItemStack",
",",
"EntityPlayer",
"par2EntityPlayer",
",",
"World",
"par3World",
",",
"int",
"par4",
",",
"int",
"par5",
",",
"int",
"par6",
",",
"int",
"par7",
")",
"{",
"int",
"i",
"=",
"par3World",
".",
"getBlockId",
"(",
"par4",
",",
"par5",
",",
"par6",
")",
";",
"if",
"(",
"i",
"==",
"Block",
".",
"snow",
".",
"blockID",
")",
"{",
"par7",
"=",
"1",
";",
"}",
"else",
"if",
"(",
"i",
"!=",
"Block",
".",
"vine",
".",
"blockID",
"&&",
"i",
"!=",
"Block",
".",
"tallGrass",
".",
"blockID",
"&&",
"i",
"!=",
"Block",
".",
"deadBush",
".",
"blockID",
")",
"{",
"if",
"(",
"par7",
"==",
"0",
")",
"{",
"par5",
"--",
";",
"}",
"if",
"(",
"par7",
"==",
"1",
")",
"{",
"par5",
"++",
";",
"}",
"if",
"(",
"par7",
"==",
"2",
")",
"{",
"par6",
"--",
";",
"}",
"if",
"(",
"par7",
"==",
"3",
")",
"{",
"par6",
"++",
";",
"}",
"if",
"(",
"par7",
"==",
"4",
")",
"{",
"par4",
"--",
";",
"}",
"if",
"(",
"par7",
"==",
"5",
")",
"{",
"par4",
"++",
";",
"}",
"}",
"if",
"(",
"par1ItemStack",
".",
"stackSize",
"==",
"0",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"!",
"par2EntityPlayer",
".",
"canPlayerEdit",
"(",
"par4",
",",
"par5",
",",
"par6",
")",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"par5",
"==",
"255",
"&&",
"Block",
".",
"blocksList",
"[",
"blockID",
"]",
".",
"blockMaterial",
".",
"isSolid",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"par3World",
".",
"canBlockBePlacedAt",
"(",
"blockID",
",",
"par4",
",",
"par5",
",",
"par6",
",",
"false",
",",
"par7",
")",
")",
"{",
"Block",
"block",
"=",
"Block",
".",
"blocksList",
"[",
"blockID",
"]",
";",
"if",
"(",
"par3World",
".",
"setBlockAndMetadataWithNotify",
"(",
"par4",
",",
"par5",
",",
"par6",
",",
"blockID",
",",
"getMetadata",
"(",
"par1ItemStack",
".",
"getItemDamage",
"(",
")",
")",
")",
")",
"{",
"if",
"(",
"par3World",
".",
"getBlockId",
"(",
"par4",
",",
"par5",
",",
"par6",
")",
"==",
"blockID",
")",
"{",
"Block",
".",
"blocksList",
"[",
"blockID",
"]",
".",
"onBlockPlaced",
"(",
"par3World",
",",
"par4",
",",
"par5",
",",
"par6",
",",
"par7",
")",
";",
"Block",
".",
"blocksList",
"[",
"blockID",
"]",
".",
"onBlockPlacedBy",
"(",
"par3World",
",",
"par4",
",",
"par5",
",",
"par6",
",",
"par2EntityPlayer",
")",
";",
"}",
"par3World",
".",
"playSoundEffect",
"(",
"(",
"float",
")",
"par4",
"+",
"0.5F",
",",
"(",
"float",
")",
"par5",
"+",
"0.5F",
",",
"(",
"float",
")",
"par6",
"+",
"0.5F",
",",
"block",
".",
"stepSound",
".",
"getStepSound",
"(",
")",
",",
"(",
"block",
".",
"stepSound",
".",
"getVolume",
"(",
")",
"+",
"1.0F",
")",
"/",
"2.0F",
",",
"block",
".",
"stepSound",
".",
"getPitch",
"(",
")",
"*",
"0.8F",
")",
";",
"par1ItemStack",
".",
"stackSize",
"--",
";",
"}",
"return",
"true",
";",
"}",
"else",
"{",
"return",
"false",
";",
"}",
"}",
"public",
"String",
"getItemNameIS",
"(",
"ItemStack",
"par1ItemStack",
")",
"{",
"return",
"Block",
".",
"blocksList",
"[",
"blockID",
"]",
".",
"getBlockName",
"(",
")",
";",
"}",
"public",
"String",
"getItemName",
"(",
")",
"{",
"return",
"Block",
".",
"blocksList",
"[",
"blockID",
"]",
".",
"getBlockName",
"(",
")",
";",
"}",
"}",
"</s>"
] |
9,443 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"io",
".",
"*",
";",
"public",
"class",
"Packet131MapData",
"extends",
"Packet",
"{",
"public",
"short",
"itemID",
";",
"public",
"short",
"uniqueID",
";",
"public",
"byte",
"itemData",
"[",
"]",
";",
"public",
"Packet131MapData",
"(",
")",
"{",
"isChunkDataPacket",
"=",
"true",
";",
"}",
"public",
"Packet131MapData",
"(",
"short",
"par1",
",",
"short",
"par2",
",",
"byte",
"par3ArrayOfByte",
"[",
"]",
")",
"{",
"isChunkDataPacket",
"=",
"true",
";",
"itemID",
"=",
"par1",
";",
"uniqueID",
"=",
"par2",
";",
"itemData",
"=",
"par3ArrayOfByte",
";",
"}",
"public",
"void",
"readPacketData",
"(",
"DataInputStream",
"par1DataInputStream",
")",
"throws",
"IOException",
"{",
"itemID",
"=",
"par1DataInputStream",
".",
"readShort",
"(",
")",
";",
"uniqueID",
"=",
"par1DataInputStream",
".",
"readShort",
"(",
")",
";",
"itemData",
"=",
"new",
"byte",
"[",
"par1DataInputStream",
".",
"readByte",
"(",
")",
"&",
"0xff",
"]",
";",
"par1DataInputStream",
".",
"readFully",
"(",
"itemData",
")",
";",
"}",
"public",
"void",
"writePacketData",
"(",
"DataOutputStream",
"par1DataOutputStream",
")",
"throws",
"IOException",
"{",
"par1DataOutputStream",
".",
"writeShort",
"(",
"itemID",
")",
";",
"par1DataOutputStream",
".",
"writeShort",
"(",
"uniqueID",
")",
";",
"par1DataOutputStream",
".",
"writeByte",
"(",
"itemData",
".",
"length",
")",
";",
"par1DataOutputStream",
".",
"write",
"(",
"itemData",
")",
";",
"}",
"public",
"void",
"processPacket",
"(",
"NetHandler",
"par1NetHandler",
")",
"{",
"par1NetHandler",
".",
"handleMapData",
"(",
"this",
")",
";",
"}",
"public",
"int",
"getPacketSize",
"(",
")",
"{",
"return",
"4",
"+",
"itemData",
".",
"length",
";",
"}",
"}",
"</s>"
] |
9,444 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"class",
"SlotArmor",
"extends",
"Slot",
"{",
"final",
"int",
"armorType",
";",
"final",
"ContainerPlayer",
"parent",
";",
"SlotArmor",
"(",
"ContainerPlayer",
"par1ContainerPlayer",
",",
"IInventory",
"par2IInventory",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
",",
"int",
"par6",
")",
"{",
"super",
"(",
"par2IInventory",
",",
"par3",
",",
"par4",
",",
"par5",
")",
";",
"parent",
"=",
"par1ContainerPlayer",
";",
"armorType",
"=",
"par6",
";",
"}",
"public",
"int",
"getSlotStackLimit",
"(",
")",
"{",
"return",
"1",
";",
"}",
"public",
"boolean",
"isItemValid",
"(",
"ItemStack",
"par1ItemStack",
")",
"{",
"if",
"(",
"par1ItemStack",
".",
"getItem",
"(",
")",
"instanceof",
"ItemArmor",
")",
"{",
"return",
"(",
"(",
"ItemArmor",
")",
"par1ItemStack",
".",
"getItem",
"(",
")",
")",
".",
"armorType",
"==",
"armorType",
";",
"}",
"if",
"(",
"par1ItemStack",
".",
"getItem",
"(",
")",
".",
"shiftedIndex",
"==",
"Block",
".",
"pumpkin",
".",
"blockID",
")",
"{",
"return",
"armorType",
"==",
"0",
";",
"}",
"else",
"{",
"return",
"false",
";",
"}",
"}",
"}",
"</s>"
] |
9,445 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"interface",
"IAnimals",
"{",
"}",
"</s>"
] |
9,446 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"io",
".",
"*",
";",
"public",
"class",
"NBTTagEnd",
"extends",
"NBTBase",
"{",
"public",
"NBTTagEnd",
"(",
")",
"{",
"super",
"(",
"null",
")",
";",
"}",
"void",
"load",
"(",
"DataInput",
"datainput",
")",
"throws",
"IOException",
"{",
"}",
"void",
"write",
"(",
"DataOutput",
"dataoutput",
")",
"throws",
"IOException",
"{",
"}",
"public",
"byte",
"getId",
"(",
")",
"{",
"return",
"0",
";",
"}",
"public",
"String",
"toString",
"(",
")",
"{",
"return",
"\"END\"",
";",
"}",
"public",
"NBTBase",
"copy",
"(",
")",
"{",
"return",
"new",
"NBTTagEnd",
"(",
")",
";",
"}",
"public",
"boolean",
"equals",
"(",
"Object",
"par1Obj",
")",
"{",
"return",
"super",
".",
"equals",
"(",
"par1Obj",
")",
";",
"}",
"}",
"</s>"
] |
9,447 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"EntityBoat",
"extends",
"Entity",
"{",
"private",
"int",
"boatPosRotationIncrements",
";",
"private",
"double",
"boatX",
";",
"private",
"double",
"boatY",
";",
"private",
"double",
"boatZ",
";",
"private",
"double",
"boatYaw",
";",
"private",
"double",
"boatPitch",
";",
"public",
"EntityBoat",
"(",
"World",
"par1World",
")",
"{",
"super",
"(",
"par1World",
")",
";",
"preventEntitySpawning",
"=",
"true",
";",
"setSize",
"(",
"1.5F",
",",
"0.6F",
")",
";",
"yOffset",
"=",
"height",
"/",
"2.0F",
";",
"}",
"protected",
"boolean",
"canTriggerWalking",
"(",
")",
"{",
"return",
"false",
";",
"}",
"protected",
"void",
"entityInit",
"(",
")",
"{",
"dataWatcher",
".",
"addObject",
"(",
"17",
",",
"new",
"Integer",
"(",
"0",
")",
")",
";",
"dataWatcher",
".",
"addObject",
"(",
"18",
",",
"new",
"Integer",
"(",
"1",
")",
")",
";",
"dataWatcher",
".",
"addObject",
"(",
"19",
",",
"new",
"Integer",
"(",
"0",
")",
")",
";",
"}",
"public",
"AxisAlignedBB",
"getCollisionBox",
"(",
"Entity",
"par1Entity",
")",
"{",
"return",
"par1Entity",
".",
"boundingBox",
";",
"}",
"public",
"AxisAlignedBB",
"getBoundingBox",
"(",
")",
"{",
"return",
"boundingBox",
";",
"}",
"public",
"boolean",
"canBePushed",
"(",
")",
"{",
"return",
"true",
";",
"}",
"public",
"EntityBoat",
"(",
"World",
"par1World",
",",
"double",
"par2",
",",
"double",
"par4",
",",
"double",
"par6",
")",
"{",
"this",
"(",
"par1World",
")",
";",
"setPosition",
"(",
"par2",
",",
"par4",
"+",
"(",
"double",
")",
"yOffset",
",",
"par6",
")",
";",
"motionX",
"=",
"0.0D",
";",
"motionY",
"=",
"0.0D",
";",
"motionZ",
"=",
"0.0D",
";",
"prevPosX",
"=",
"par2",
";",
"prevPosY",
"=",
"par4",
";",
"prevPosZ",
"=",
"par6",
";",
"}",
"public",
"double",
"getMountedYOffset",
"(",
")",
"{",
"return",
"(",
"double",
")",
"height",
"*",
"0.0D",
"-",
"0.30000001192092896D",
";",
"}",
"public",
"boolean",
"attackEntityFrom",
"(",
"DamageSource",
"par1DamageSource",
",",
"int",
"par2",
")",
"{",
"if",
"(",
"worldObj",
".",
"isRemote",
"||",
"isDead",
")",
"{",
"return",
"true",
";",
"}",
"setForwardDirection",
"(",
"-",
"getForwardDirection",
"(",
")",
")",
";",
"setTimeSinceHit",
"(",
"10",
")",
";",
"setDamageTaken",
"(",
"getDamageTaken",
"(",
")",
"+",
"par2",
"*",
"10",
")",
";",
"setBeenAttacked",
"(",
")",
";",
"if",
"(",
"getDamageTaken",
"(",
")",
">",
"40",
")",
"{",
"if",
"(",
"riddenByEntity",
"!=",
"null",
")",
"{",
"riddenByEntity",
".",
"mountEntity",
"(",
"this",
")",
";",
"}",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"3",
";",
"i",
"++",
")",
"{",
"dropItemWithOffset",
"(",
"Block",
".",
"planks",
".",
"blockID",
",",
"1",
",",
"0.0F",
")",
";",
"}",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
"2",
";",
"j",
"++",
")",
"{",
"dropItemWithOffset",
"(",
"Item",
".",
"stick",
".",
"shiftedIndex",
",",
"1",
",",
"0.0F",
")",
";",
"}",
"setDead",
"(",
")",
";",
"}",
"return",
"true",
";",
"}",
"public",
"boolean",
"canBeCollidedWith",
"(",
")",
"{",
"return",
"!",
"isDead",
";",
"}",
"public",
"void",
"onUpdate",
"(",
")",
"{",
"super",
".",
"onUpdate",
"(",
")",
";",
"if",
"(",
"getTimeSinceHit",
"(",
")",
">",
"0",
")",
"{",
"setTimeSinceHit",
"(",
"getTimeSinceHit",
"(",
")",
"-",
"1",
")",
";",
"}",
"if",
"(",
"getDamageTaken",
"(",
")",
">",
"0",
")",
"{",
"setDamageTaken",
"(",
"getDamageTaken",
"(",
")",
"-",
"1",
")",
";",
"}",
"prevPosX",
"=",
"posX",
";",
"prevPosY",
"=",
"posY",
";",
"prevPosZ",
"=",
"posZ",
";",
"int",
"i",
"=",
"5",
";",
"double",
"d",
"=",
"0.0D",
";",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
"i",
";",
"j",
"++",
")",
"{",
"double",
"d2",
"=",
"(",
"boundingBox",
".",
"minY",
"+",
"(",
"(",
"boundingBox",
".",
"maxY",
"-",
"boundingBox",
".",
"minY",
")",
"*",
"(",
"double",
")",
"(",
"j",
"+",
"0",
")",
")",
"/",
"(",
"double",
")",
"i",
")",
"-",
"0.125D",
";",
"double",
"d8",
"=",
"(",
"boundingBox",
".",
"minY",
"+",
"(",
"(",
"boundingBox",
".",
"maxY",
"-",
"boundingBox",
".",
"minY",
")",
"*",
"(",
"double",
")",
"(",
"j",
"+",
"1",
")",
")",
"/",
"(",
"double",
")",
"i",
")",
"-",
"0.125D",
";",
"AxisAlignedBB",
"axisalignedbb",
"=",
"AxisAlignedBB",
".",
"getBoundingBoxFromPool",
"(",
"boundingBox",
".",
"minX",
",",
"d2",
",",
"boundingBox",
".",
"minZ",
",",
"boundingBox",
".",
"maxX",
",",
"d8",
",",
"boundingBox",
".",
"maxZ",
")",
";",
"if",
"(",
"worldObj",
".",
"isAABBInMaterial",
"(",
"axisalignedbb",
",",
"Material",
".",
"water",
")",
")",
"{",
"d",
"+=",
"1.0D",
"/",
"(",
"double",
")",
"i",
";",
"}",
"}",
"double",
"d1",
"=",
"Math",
".",
"sqrt",
"(",
"motionX",
"*",
"motionX",
"+",
"motionZ",
"*",
"motionZ",
")",
";",
"if",
"(",
"d1",
">",
"0.14999999999999999D",
")",
"{",
"double",
"d3",
"=",
"Math",
".",
"cos",
"(",
"(",
"(",
"double",
")",
"rotationYaw",
"*",
"Math",
".",
"PI",
")",
"/",
"180D",
")",
";",
"double",
"d9",
"=",
"Math",
".",
"sin",
"(",
"(",
"(",
"double",
")",
"rotationYaw",
"*",
"Math",
".",
"PI",
")",
"/",
"180D",
")",
";",
"for",
"(",
"int",
"i1",
"=",
"0",
";",
"(",
"double",
")",
"i1",
"<",
"1.0D",
"+",
"d1",
"*",
"60D",
";",
"i1",
"++",
")",
"{",
"double",
"d16",
"=",
"rand",
".",
"nextFloat",
"(",
")",
"*",
"2.0F",
"-",
"1.0F",
";",
"double",
"d19",
"=",
"(",
"double",
")",
"(",
"rand",
".",
"nextInt",
"(",
"2",
")",
"*",
"2",
"-",
"1",
")",
"*",
"0.69999999999999996D",
";",
"if",
"(",
"rand",
".",
"nextBoolean",
"(",
")",
")",
"{",
"double",
"d21",
"=",
"(",
"posX",
"-",
"d3",
"*",
"d16",
"*",
"0.80000000000000004D",
")",
"+",
"d9",
"*",
"d19",
";",
"double",
"d23",
"=",
"posZ",
"-",
"d9",
"*",
"d16",
"*",
"0.80000000000000004D",
"-",
"d3",
"*",
"d19",
";",
"worldObj",
".",
"spawnParticle",
"(",
"\"splash\"",
",",
"d21",
",",
"posY",
"-",
"0.125D",
",",
"d23",
",",
"motionX",
",",
"motionY",
",",
"motionZ",
")",
";",
"}",
"else",
"{",
"double",
"d22",
"=",
"posX",
"+",
"d3",
"+",
"d9",
"*",
"d16",
"*",
"0.69999999999999996D",
";",
"double",
"d24",
"=",
"(",
"posZ",
"+",
"d9",
")",
"-",
"d3",
"*",
"d16",
"*",
"0.69999999999999996D",
";",
"worldObj",
".",
"spawnParticle",
"(",
"\"splash\"",
",",
"d22",
",",
"posY",
"-",
"0.125D",
",",
"d24",
",",
"motionX",
",",
"motionY",
",",
"motionZ",
")",
";",
"}",
"}",
"}",
"if",
"(",
"worldObj",
".",
"isRemote",
")",
"{",
"if",
"(",
"boatPosRotationIncrements",
">",
"0",
")",
"{",
"double",
"d4",
"=",
"posX",
"+",
"(",
"boatX",
"-",
"posX",
")",
"/",
"(",
"double",
")",
"boatPosRotationIncrements",
";",
"double",
"d10",
"=",
"posY",
"+",
"(",
"boatY",
"-",
"posY",
")",
"/",
"(",
"double",
")",
"boatPosRotationIncrements",
";",
"double",
"d13",
"=",
"posZ",
"+",
"(",
"boatZ",
"-",
"posZ",
")",
"/",
"(",
"double",
")",
"boatPosRotationIncrements",
";",
"double",
"d17",
";",
"for",
"(",
"d17",
"=",
"boatYaw",
"-",
"(",
"double",
")",
"rotationYaw",
";",
"d17",
"<",
"-",
"180D",
";",
"d17",
"+=",
"360D",
")",
"{",
"}",
"for",
"(",
";",
"d17",
">=",
"180D",
";",
"d17",
"-=",
"360D",
")",
"{",
"}",
"rotationYaw",
"+=",
"d17",
"/",
"(",
"double",
")",
"boatPosRotationIncrements",
";",
"rotationPitch",
"+=",
"(",
"boatPitch",
"-",
"(",
"double",
")",
"rotationPitch",
")",
"/",
"(",
"double",
")",
"boatPosRotationIncrements",
";",
"boatPosRotationIncrements",
"--",
";",
"setPosition",
"(",
"d4",
",",
"d10",
",",
"d13",
")",
";",
"setRotation",
"(",
"rotationYaw",
",",
"rotationPitch",
")",
";",
"}",
"else",
"{",
"double",
"d5",
"=",
"posX",
"+",
"motionX",
";",
"double",
"d11",
"=",
"posY",
"+",
"motionY",
";",
"double",
"d14",
"=",
"posZ",
"+",
"motionZ",
";",
"setPosition",
"(",
"d5",
",",
"d11",
",",
"d14",
")",
";",
"if",
"(",
"onGround",
")",
"{",
"motionX",
"*=",
"0.5D",
";",
"motionY",
"*=",
"0.5D",
";",
"motionZ",
"*=",
"0.5D",
";",
"}",
"motionX",
"*=",
"0.99000000953674316D",
";",
"motionY",
"*=",
"0.94999998807907104D",
";",
"motionZ",
"*=",
"0.99000000953674316D",
";",
"}",
"return",
";",
"}",
"if",
"(",
"d",
"<",
"1.0D",
")",
"{",
"double",
"d6",
"=",
"d",
"*",
"2D",
"-",
"1.0D",
";",
"motionY",
"+=",
"0.039999999105930328D",
"*",
"d6",
";",
"}",
"else",
"{",
"if",
"(",
"motionY",
"<",
"0.0D",
")",
"{",
"motionY",
"/=",
"2D",
";",
"}",
"motionY",
"+=",
"0.0070000002160668373D",
";",
"}",
"if",
"(",
"riddenByEntity",
"!=",
"null",
")",
"{",
"motionX",
"+=",
"riddenByEntity",
".",
"motionX",
"*",
"0.20000000000000001D",
";",
"motionZ",
"+=",
"riddenByEntity",
".",
"motionZ",
"*",
"0.20000000000000001D",
";",
"}",
"double",
"d7",
"=",
"0.40000000000000002D",
";",
"if",
"(",
"motionX",
"<",
"-",
"d7",
")",
"{",
"motionX",
"=",
"-",
"d7",
";",
"}",
"if",
"(",
"motionX",
">",
"d7",
")",
"{",
"motionX",
"=",
"d7",
";",
"}",
"if",
"(",
"motionZ",
"<",
"-",
"d7",
")",
"{",
"motionZ",
"=",
"-",
"d7",
";",
"}",
"if",
"(",
"motionZ",
">",
"d7",
")",
"{",
"motionZ",
"=",
"d7",
";",
"}",
"if",
"(",
"onGround",
")",
"{",
"motionX",
"*=",
"0.5D",
";",
"motionY",
"*=",
"0.5D",
";",
"motionZ",
"*=",
"0.5D",
";",
"}",
"moveEntity",
"(",
"motionX",
",",
"motionY",
",",
"motionZ",
")",
";",
"if",
"(",
"isCollidedHorizontally",
"&&",
"d1",
">",
"0.20000000000000001D",
")",
"{",
"if",
"(",
"!",
"worldObj",
".",
"isRemote",
")",
"{",
"setDead",
"(",
")",
";",
"for",
"(",
"int",
"k",
"=",
"0",
";",
"k",
"<",
"3",
";",
"k",
"++",
")",
"{",
"dropItemWithOffset",
"(",
"Block",
".",
"planks",
".",
"blockID",
",",
"1",
",",
"0.0F",
")",
";",
"}",
"for",
"(",
"int",
"l",
"=",
"0",
";",
"l",
"<",
"2",
";",
"l",
"++",
")",
"{",
"dropItemWithOffset",
"(",
"Item",
".",
"stick",
".",
"shiftedIndex",
",",
"1",
",",
"0.0F",
")",
";",
"}",
"}",
"}",
"else",
"{",
"motionX",
"*=",
"0.99000000953674316D",
";",
"motionY",
"*=",
"0.94999998807907104D",
";",
"motionZ",
"*=",
"0.99000000953674316D",
";",
"}",
"rotationPitch",
"=",
"0.0F",
";",
"double",
"d12",
"=",
"rotationYaw",
";",
"double",
"d15",
"=",
"prevPosX",
"-",
"posX",
";",
"double",
"d18",
"=",
"prevPosZ",
"-",
"posZ",
";",
"if",
"(",
"d15",
"*",
"d15",
"+",
"d18",
"*",
"d18",
">",
"0.001D",
")",
"{",
"d12",
"=",
"(",
"float",
")",
"(",
"(",
"Math",
".",
"atan2",
"(",
"d18",
",",
"d15",
")",
"*",
"180D",
")",
"/",
"Math",
".",
"PI",
")",
";",
"}",
"double",
"d20",
";",
"for",
"(",
"d20",
"=",
"d12",
"-",
"(",
"double",
")",
"rotationYaw",
";",
"d20",
">=",
"180D",
";",
"d20",
"-=",
"360D",
")",
"{",
"}",
"for",
"(",
";",
"d20",
"<",
"-",
"180D",
";",
"d20",
"+=",
"360D",
")",
"{",
"}",
"if",
"(",
"d20",
">",
"20D",
")",
"{",
"d20",
"=",
"20D",
";",
"}",
"if",
"(",
"d20",
"<",
"-",
"20D",
")",
"{",
"d20",
"=",
"-",
"20D",
";",
"}",
"rotationYaw",
"+=",
"d20",
";",
"setRotation",
"(",
"rotationYaw",
",",
"rotationPitch",
")",
";",
"List",
"list",
"=",
"worldObj",
".",
"getEntitiesWithinAABBExcludingEntity",
"(",
"this",
",",
"boundingBox",
".",
"expand",
"(",
"0.20000000298023224D",
",",
"0.0D",
",",
"0.20000000298023224D",
")",
")",
";",
"if",
"(",
"list",
"!=",
"null",
"&&",
"list",
".",
"size",
"(",
")",
">",
"0",
")",
"{",
"for",
"(",
"int",
"j1",
"=",
"0",
";",
"j1",
"<",
"list",
".",
"size",
"(",
")",
";",
"j1",
"++",
")",
"{",
"Entity",
"entity",
"=",
"(",
"Entity",
")",
"list",
".",
"get",
"(",
"j1",
")",
";",
"if",
"(",
"entity",
"!=",
"riddenByEntity",
"&&",
"entity",
".",
"canBePushed",
"(",
")",
"&&",
"(",
"entity",
"instanceof",
"EntityBoat",
")",
")",
"{",
"entity",
".",
"applyEntityCollision",
"(",
"this",
")",
";",
"}",
"}",
"}",
"for",
"(",
"int",
"k1",
"=",
"0",
";",
"k1",
"<",
"4",
";",
"k1",
"++",
")",
"{",
"int",
"l1",
"=",
"MathHelper",
".",
"floor_double",
"(",
"posX",
"+",
"(",
"(",
"double",
")",
"(",
"k1",
"%",
"2",
")",
"-",
"0.5D",
")",
"*",
"0.80000000000000004D",
")",
";",
"int",
"i2",
"=",
"MathHelper",
".",
"floor_double",
"(",
"posY",
")",
";",
"int",
"j2",
"=",
"MathHelper",
".",
"floor_double",
"(",
"posZ",
"+",
"(",
"(",
"double",
")",
"(",
"k1",
"/",
"2",
")",
"-",
"0.5D",
")",
"*",
"0.80000000000000004D",
")",
";",
"if",
"(",
"worldObj",
".",
"getBlockId",
"(",
"l1",
",",
"i2",
",",
"j2",
")",
"==",
"Block",
".",
"snow",
".",
"blockID",
")",
"{",
"worldObj",
".",
"setBlockWithNotify",
"(",
"l1",
",",
"i2",
",",
"j2",
",",
"0",
")",
";",
"}",
"}",
"if",
"(",
"riddenByEntity",
"!=",
"null",
"&&",
"riddenByEntity",
".",
"isDead",
")",
"{",
"riddenByEntity",
"=",
"null",
";",
"}",
"}",
"public",
"void",
"updateRiderPosition",
"(",
")",
"{",
"if",
"(",
"riddenByEntity",
"==",
"null",
")",
"{",
"return",
";",
"}",
"else",
"{",
"double",
"d",
"=",
"Math",
".",
"cos",
"(",
"(",
"(",
"double",
")",
"rotationYaw",
"*",
"Math",
".",
"PI",
")",
"/",
"180D",
")",
"*",
"0.40000000000000002D",
";",
"double",
"d1",
"=",
"Math",
".",
"sin",
"(",
"(",
"(",
"double",
")",
"rotationYaw",
"*",
"Math",
".",
"PI",
")",
"/",
"180D",
")",
"*",
"0.40000000000000002D",
";",
"riddenByEntity",
".",
"setPosition",
"(",
"posX",
"+",
"d",
",",
"posY",
"+",
"getMountedYOffset",
"(",
")",
"+",
"riddenByEntity",
".",
"getYOffset",
"(",
")",
",",
"posZ",
"+",
"d1",
")",
";",
"return",
";",
"}",
"}",
"protected",
"void",
"writeEntityToNBT",
"(",
"NBTTagCompound",
"nbttagcompound",
")",
"{",
"}",
"protected",
"void",
"readEntityFromNBT",
"(",
"NBTTagCompound",
"nbttagcompound",
")",
"{",
"}",
"public",
"boolean",
"interact",
"(",
"EntityPlayer",
"par1EntityPlayer",
")",
"{",
"if",
"(",
"riddenByEntity",
"!=",
"null",
"&&",
"(",
"riddenByEntity",
"instanceof",
"EntityPlayer",
")",
"&&",
"riddenByEntity",
"!=",
"par1EntityPlayer",
")",
"{",
"return",
"true",
";",
"}",
"if",
"(",
"!",
"worldObj",
".",
"isRemote",
")",
"{",
"par1EntityPlayer",
".",
"mountEntity",
"(",
"this",
")",
";",
"}",
"return",
"true",
";",
"}",
"public",
"void",
"setDamageTaken",
"(",
"int",
"par1",
")",
"{",
"dataWatcher",
".",
"updateObject",
"(",
"19",
",",
"Integer",
".",
"valueOf",
"(",
"par1",
")",
")",
";",
"}",
"public",
"int",
"getDamageTaken",
"(",
")",
"{",
"return",
"dataWatcher",
".",
"getWatchableObjectInt",
"(",
"19",
")",
";",
"}",
"public",
"void",
"setTimeSinceHit",
"(",
"int",
"par1",
")",
"{",
"dataWatcher",
".",
"updateObject",
"(",
"17",
",",
"Integer",
".",
"valueOf",
"(",
"par1",
")",
")",
";",
"}",
"public",
"int",
"getTimeSinceHit",
"(",
")",
"{",
"return",
"dataWatcher",
".",
"getWatchableObjectInt",
"(",
"17",
")",
";",
"}",
"public",
"void",
"setForwardDirection",
"(",
"int",
"par1",
")",
"{",
"dataWatcher",
".",
"updateObject",
"(",
"18",
",",
"Integer",
".",
"valueOf",
"(",
"par1",
")",
")",
";",
"}",
"public",
"int",
"getForwardDirection",
"(",
")",
"{",
"return",
"dataWatcher",
".",
"getWatchableObjectInt",
"(",
"18",
")",
";",
"}",
"}",
"</s>"
] |
9,448 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"class",
"EntityMooshroom",
"extends",
"EntityCow",
"{",
"public",
"EntityMooshroom",
"(",
"World",
"par1World",
")",
"{",
"super",
"(",
"par1World",
")",
";",
"texture",
"=",
"\"\"",
";",
"setSize",
"(",
"0.9F",
",",
"1.3F",
")",
";",
"}",
"public",
"boolean",
"interact",
"(",
"EntityPlayer",
"par1EntityPlayer",
")",
"{",
"ItemStack",
"itemstack",
"=",
"par1EntityPlayer",
".",
"inventory",
".",
"getCurrentItem",
"(",
")",
";",
"if",
"(",
"itemstack",
"!=",
"null",
"&&",
"itemstack",
".",
"itemID",
"==",
"Item",
".",
"bowlEmpty",
".",
"shiftedIndex",
"&&",
"getGrowingAge",
"(",
")",
">=",
"0",
")",
"{",
"if",
"(",
"itemstack",
".",
"stackSize",
"==",
"1",
")",
"{",
"par1EntityPlayer",
".",
"inventory",
".",
"setInventorySlotContents",
"(",
"par1EntityPlayer",
".",
"inventory",
".",
"currentItem",
",",
"new",
"ItemStack",
"(",
"Item",
".",
"bowlSoup",
")",
")",
";",
"return",
"true",
";",
"}",
"if",
"(",
"par1EntityPlayer",
".",
"inventory",
".",
"addItemStackToInventory",
"(",
"new",
"ItemStack",
"(",
"Item",
".",
"bowlSoup",
")",
")",
"&&",
"!",
"par1EntityPlayer",
".",
"capabilities",
".",
"isCreativeMode",
")",
"{",
"par1EntityPlayer",
".",
"inventory",
".",
"decrStackSize",
"(",
"par1EntityPlayer",
".",
"inventory",
".",
"currentItem",
",",
"1",
")",
";",
"return",
"true",
";",
"}",
"}",
"if",
"(",
"itemstack",
"!=",
"null",
"&&",
"itemstack",
".",
"itemID",
"==",
"Item",
".",
"shears",
".",
"shiftedIndex",
"&&",
"getGrowingAge",
"(",
")",
">=",
"0",
")",
"{",
"setDead",
"(",
")",
";",
"worldObj",
".",
"spawnParticle",
"(",
"\"largeexplode\"",
",",
"posX",
",",
"posY",
"+",
"(",
"double",
")",
"(",
"height",
"/",
"2.0F",
")",
",",
"posZ",
",",
"0.0D",
",",
"0.0D",
",",
"0.0D",
")",
";",
"if",
"(",
"!",
"worldObj",
".",
"isRemote",
")",
"{",
"EntityCow",
"entitycow",
"=",
"new",
"EntityCow",
"(",
"worldObj",
")",
";",
"entitycow",
".",
"setLocationAndAngles",
"(",
"posX",
",",
"posY",
",",
"posZ",
",",
"rotationYaw",
",",
"rotationPitch",
")",
";",
"entitycow",
".",
"setEntityHealth",
"(",
"getHealth",
"(",
")",
")",
";",
"entitycow",
".",
"renderYawOffset",
"=",
"renderYawOffset",
";",
"worldObj",
".",
"spawnEntityInWorld",
"(",
"entitycow",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"5",
";",
"i",
"++",
")",
"{",
"worldObj",
".",
"spawnEntityInWorld",
"(",
"new",
"EntityItem",
"(",
"worldObj",
",",
"posX",
",",
"posY",
"+",
"(",
"double",
")",
"height",
",",
"posZ",
",",
"new",
"ItemStack",
"(",
"Block",
".",
"mushroomRed",
")",
")",
")",
";",
"}",
"}",
"return",
"true",
";",
"}",
"else",
"{",
"return",
"super",
".",
"interact",
"(",
"par1EntityPlayer",
")",
";",
"}",
"}",
"public",
"EntityAnimal",
"spawnBabyAnimal",
"(",
"EntityAnimal",
"par1EntityAnimal",
")",
"{",
"return",
"new",
"EntityMooshroom",
"(",
"worldObj",
")",
";",
"}",
"}",
"</s>"
] |
9,449 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"WorldGenShrub",
"extends",
"WorldGenerator",
"{",
"private",
"int",
"field_48408_a",
";",
"private",
"int",
"field_48407_b",
";",
"public",
"WorldGenShrub",
"(",
"int",
"par1",
",",
"int",
"par2",
")",
"{",
"field_48407_b",
"=",
"par1",
";",
"field_48408_a",
"=",
"par2",
";",
"}",
"public",
"boolean",
"generate",
"(",
"World",
"par1World",
",",
"Random",
"par2Random",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"(",
"(",
"i",
"=",
"par1World",
".",
"getBlockId",
"(",
"par3",
",",
"par4",
",",
"par5",
")",
")",
"==",
"0",
"||",
"i",
"==",
"Block",
".",
"leaves",
".",
"blockID",
")",
"&&",
"par4",
">",
"0",
";",
"par4",
"--",
")",
"{",
"}",
"int",
"j",
"=",
"par1World",
".",
"getBlockId",
"(",
"par3",
",",
"par4",
",",
"par5",
")",
";",
"if",
"(",
"j",
"==",
"Block",
".",
"dirt",
".",
"blockID",
"||",
"j",
"==",
"Block",
".",
"grass",
".",
"blockID",
")",
"{",
"par4",
"++",
";",
"setBlockAndMetadata",
"(",
"par1World",
",",
"par3",
",",
"par4",
",",
"par5",
",",
"Block",
".",
"wood",
".",
"blockID",
",",
"field_48407_b",
")",
";",
"for",
"(",
"int",
"k",
"=",
"par4",
";",
"k",
"<=",
"par4",
"+",
"2",
";",
"k",
"++",
")",
"{",
"int",
"l",
"=",
"k",
"-",
"par4",
";",
"int",
"i1",
"=",
"2",
"-",
"l",
";",
"for",
"(",
"int",
"j1",
"=",
"par3",
"-",
"i1",
";",
"j1",
"<=",
"par3",
"+",
"i1",
";",
"j1",
"++",
")",
"{",
"int",
"k1",
"=",
"j1",
"-",
"par3",
";",
"for",
"(",
"int",
"l1",
"=",
"par5",
"-",
"i1",
";",
"l1",
"<=",
"par5",
"+",
"i1",
";",
"l1",
"++",
")",
"{",
"int",
"i2",
"=",
"l1",
"-",
"par5",
";",
"if",
"(",
"(",
"Math",
".",
"abs",
"(",
"k1",
")",
"!=",
"i1",
"||",
"Math",
".",
"abs",
"(",
"i2",
")",
"!=",
"i1",
"||",
"par2Random",
".",
"nextInt",
"(",
"2",
")",
"!=",
"0",
")",
"&&",
"!",
"Block",
".",
"opaqueCubeLookup",
"[",
"par1World",
".",
"getBlockId",
"(",
"j1",
",",
"k",
",",
"l1",
")",
"]",
")",
"{",
"setBlockAndMetadata",
"(",
"par1World",
",",
"j1",
",",
"k",
",",
"l1",
",",
"Block",
".",
"leaves",
".",
"blockID",
",",
"field_48408_a",
")",
";",
"}",
"}",
"}",
"}",
"}",
"return",
"true",
";",
"}",
"}",
"</s>"
] |
9,450 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"class",
"BlockNetherrack",
"extends",
"Block",
"{",
"public",
"BlockNetherrack",
"(",
"int",
"par1",
",",
"int",
"par2",
")",
"{",
"super",
"(",
"par1",
",",
"par2",
",",
"Material",
".",
"rock",
")",
";",
"}",
"}",
"</s>"
] |
9,451 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"ComponentNetherBridgeEnd",
"extends",
"ComponentNetherBridgePiece",
"{",
"private",
"int",
"fillSeed",
";",
"public",
"ComponentNetherBridgeEnd",
"(",
"int",
"par1",
",",
"Random",
"par2Random",
",",
"StructureBoundingBox",
"par3StructureBoundingBox",
",",
"int",
"par4",
")",
"{",
"super",
"(",
"par1",
")",
";",
"coordBaseMode",
"=",
"par4",
";",
"boundingBox",
"=",
"par3StructureBoundingBox",
";",
"fillSeed",
"=",
"par2Random",
".",
"nextInt",
"(",
")",
";",
"}",
"public",
"void",
"buildComponent",
"(",
"StructureComponent",
"structurecomponent",
",",
"List",
"list",
",",
"Random",
"random",
")",
"{",
"}",
"public",
"static",
"ComponentNetherBridgeEnd",
"func_40301_a",
"(",
"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",
",",
"8",
",",
"par5",
")",
";",
"if",
"(",
"!",
"isAboveGround",
"(",
"structureboundingbox",
")",
"||",
"StructureComponent",
".",
"findIntersecting",
"(",
"par0List",
",",
"structureboundingbox",
")",
"!=",
"null",
")",
"{",
"return",
"null",
";",
"}",
"else",
"{",
"return",
"new",
"ComponentNetherBridgeEnd",
"(",
"par6",
",",
"par1Random",
",",
"structureboundingbox",
",",
"par5",
")",
";",
"}",
"}",
"public",
"boolean",
"addComponentParts",
"(",
"World",
"par1World",
",",
"Random",
"par2Random",
",",
"StructureBoundingBox",
"par3StructureBoundingBox",
")",
"{",
"Random",
"random",
"=",
"new",
"Random",
"(",
"fillSeed",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<=",
"4",
";",
"i",
"++",
")",
"{",
"for",
"(",
"int",
"i1",
"=",
"3",
";",
"i1",
"<=",
"4",
";",
"i1",
"++",
")",
"{",
"int",
"l1",
"=",
"random",
".",
"nextInt",
"(",
"8",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"i",
",",
"i1",
",",
"0",
",",
"i",
",",
"i1",
",",
"l1",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"}",
"}",
"int",
"j",
"=",
"random",
".",
"nextInt",
"(",
"8",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"0",
",",
"5",
",",
"0",
",",
"0",
",",
"5",
",",
"j",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"j",
"=",
"random",
".",
"nextInt",
"(",
"8",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"4",
",",
"5",
",",
"0",
",",
"4",
",",
"5",
",",
"j",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"for",
"(",
"int",
"k",
"=",
"0",
";",
"k",
"<=",
"4",
";",
"k",
"++",
")",
"{",
"int",
"j1",
"=",
"random",
".",
"nextInt",
"(",
"5",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"k",
",",
"2",
",",
"0",
",",
"k",
",",
"2",
",",
"j1",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"}",
"for",
"(",
"int",
"l",
"=",
"0",
";",
"l",
"<=",
"4",
";",
"l",
"++",
")",
"{",
"for",
"(",
"int",
"k1",
"=",
"0",
";",
"k1",
"<=",
"1",
";",
"k1",
"++",
")",
"{",
"int",
"i2",
"=",
"random",
".",
"nextInt",
"(",
"3",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"l",
",",
"k1",
",",
"0",
",",
"l",
",",
"k1",
",",
"i2",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"Block",
".",
"netherBrick",
".",
"blockID",
",",
"false",
")",
";",
"}",
"}",
"return",
"true",
";",
"}",
"}",
"</s>"
] |
9,452 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"class",
"EntityAIOpenDoor",
"extends",
"EntityAIDoorInteract",
"{",
"boolean",
"field_48196_i",
";",
"int",
"field_48195_j",
";",
"public",
"EntityAIOpenDoor",
"(",
"EntityLiving",
"par1EntityLiving",
",",
"boolean",
"par2",
")",
"{",
"super",
"(",
"par1EntityLiving",
")",
";",
"theEntity",
"=",
"par1EntityLiving",
";",
"field_48196_i",
"=",
"par2",
";",
"}",
"public",
"boolean",
"continueExecuting",
"(",
")",
"{",
"return",
"field_48196_i",
"&&",
"field_48195_j",
">",
"0",
"&&",
"super",
".",
"continueExecuting",
"(",
")",
";",
"}",
"public",
"void",
"startExecuting",
"(",
")",
"{",
"field_48195_j",
"=",
"20",
";",
"targetDoor",
".",
"onPoweredBlockChange",
"(",
"theEntity",
".",
"worldObj",
",",
"entityPosX",
",",
"entityPosY",
",",
"entityPosZ",
",",
"true",
")",
";",
"}",
"public",
"void",
"resetTask",
"(",
")",
"{",
"if",
"(",
"field_48196_i",
")",
"{",
"targetDoor",
".",
"onPoweredBlockChange",
"(",
"theEntity",
".",
"worldObj",
",",
"entityPosX",
",",
"entityPosY",
",",
"entityPosZ",
",",
"false",
")",
";",
"}",
"}",
"public",
"void",
"updateTask",
"(",
")",
"{",
"field_48195_j",
"--",
";",
"super",
".",
"updateTask",
"(",
")",
";",
"}",
"}",
"</s>"
] |
9,453 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"MapGenMineshaft",
"extends",
"MapGenStructure",
"{",
"public",
"MapGenMineshaft",
"(",
")",
"{",
"}",
"protected",
"boolean",
"canSpawnStructureAtCoords",
"(",
"int",
"par1",
",",
"int",
"par2",
")",
"{",
"return",
"rand",
".",
"nextInt",
"(",
"100",
")",
"==",
"0",
"&&",
"rand",
".",
"nextInt",
"(",
"80",
")",
"<",
"Math",
".",
"max",
"(",
"Math",
".",
"abs",
"(",
"par1",
")",
",",
"Math",
".",
"abs",
"(",
"par2",
")",
")",
";",
"}",
"protected",
"StructureStart",
"getStructureStart",
"(",
"int",
"par1",
",",
"int",
"par2",
")",
"{",
"return",
"new",
"StructureMineshaftStart",
"(",
"worldObj",
",",
"rand",
",",
"par1",
",",
"par2",
")",
";",
"}",
"}",
"</s>"
] |
9,454 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"class",
"BlockLeavesBase",
"extends",
"Block",
"{",
"protected",
"boolean",
"graphicsLevel",
";",
"protected",
"BlockLeavesBase",
"(",
"int",
"par1",
",",
"int",
"par2",
",",
"Material",
"par3Material",
",",
"boolean",
"par4",
")",
"{",
"super",
"(",
"par1",
",",
"par2",
",",
"par3Material",
")",
";",
"graphicsLevel",
"=",
"par4",
";",
"}",
"public",
"boolean",
"isOpaqueCube",
"(",
")",
"{",
"return",
"false",
";",
"}",
"}",
"</s>"
] |
9,455 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"class",
"BlockSandStone",
"extends",
"Block",
"{",
"public",
"BlockSandStone",
"(",
"int",
"par1",
")",
"{",
"super",
"(",
"par1",
",",
"192",
",",
"Material",
".",
"rock",
")",
";",
"}",
"public",
"int",
"getBlockTextureFromSideAndMetadata",
"(",
"int",
"par1",
",",
"int",
"par2",
")",
"{",
"if",
"(",
"par1",
"==",
"1",
"||",
"par1",
"==",
"0",
"&&",
"(",
"par2",
"==",
"1",
"||",
"par2",
"==",
"2",
")",
")",
"{",
"return",
"176",
";",
"}",
"if",
"(",
"par1",
"==",
"0",
")",
"{",
"return",
"208",
";",
"}",
"if",
"(",
"par2",
"==",
"1",
")",
"{",
"return",
"229",
";",
"}",
"return",
"par2",
"!=",
"2",
"?",
"192",
":",
"230",
";",
"}",
"public",
"int",
"getBlockTextureFromSide",
"(",
"int",
"par1",
")",
"{",
"if",
"(",
"par1",
"==",
"1",
")",
"{",
"return",
"blockIndexInTexture",
"-",
"16",
";",
"}",
"if",
"(",
"par1",
"==",
"0",
")",
"{",
"return",
"blockIndexInTexture",
"+",
"16",
";",
"}",
"else",
"{",
"return",
"blockIndexInTexture",
";",
"}",
"}",
"protected",
"int",
"damageDropped",
"(",
"int",
"par1",
")",
"{",
"return",
"par1",
";",
"}",
"}",
"</s>"
] |
9,456 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"ComponentVillageHouse4_Garden",
"extends",
"ComponentVillage",
"{",
"private",
"int",
"averageGroundLevel",
";",
"private",
"final",
"boolean",
"isRoofAccessible",
";",
"public",
"ComponentVillageHouse4_Garden",
"(",
"int",
"par1",
",",
"Random",
"par2Random",
",",
"StructureBoundingBox",
"par3StructureBoundingBox",
",",
"int",
"par4",
")",
"{",
"super",
"(",
"par1",
")",
";",
"averageGroundLevel",
"=",
"-",
"1",
";",
"coordBaseMode",
"=",
"par4",
";",
"boundingBox",
"=",
"par3StructureBoundingBox",
";",
"isRoofAccessible",
"=",
"par2Random",
".",
"nextBoolean",
"(",
")",
";",
"}",
"public",
"void",
"buildComponent",
"(",
"StructureComponent",
"structurecomponent",
",",
"List",
"list",
",",
"Random",
"random",
")",
"{",
"}",
"public",
"static",
"ComponentVillageHouse4_Garden",
"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",
",",
"5",
",",
"6",
",",
"5",
",",
"par5",
")",
";",
"if",
"(",
"StructureComponent",
".",
"findIntersecting",
"(",
"par0List",
",",
"structureboundingbox",
")",
"!=",
"null",
")",
"{",
"return",
"null",
";",
"}",
"else",
"{",
"return",
"new",
"ComponentVillageHouse4_Garden",
"(",
"par6",
",",
"par1Random",
",",
"structureboundingbox",
",",
"par5",
")",
";",
"}",
"}",
"public",
"boolean",
"addComponentParts",
"(",
"World",
"par1World",
",",
"Random",
"par2Random",
",",
"StructureBoundingBox",
"par3StructureBoundingBox",
")",
"{",
"if",
"(",
"averageGroundLevel",
"<",
"0",
")",
"{",
"averageGroundLevel",
"=",
"getAverageGroundLevel",
"(",
"par1World",
",",
"par3StructureBoundingBox",
")",
";",
"if",
"(",
"averageGroundLevel",
"<",
"0",
")",
"{",
"return",
"true",
";",
"}",
"boundingBox",
".",
"offset",
"(",
"0",
",",
"(",
"(",
"averageGroundLevel",
"-",
"boundingBox",
".",
"maxY",
")",
"+",
"6",
")",
"-",
"1",
",",
"0",
")",
";",
"}",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"0",
",",
"0",
",",
"0",
",",
"4",
",",
"0",
",",
"4",
",",
"Block",
".",
"cobblestone",
".",
"blockID",
",",
"Block",
".",
"cobblestone",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"0",
",",
"4",
",",
"0",
",",
"4",
",",
"4",
",",
"4",
",",
"Block",
".",
"wood",
".",
"blockID",
",",
"Block",
".",
"wood",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"1",
",",
"4",
",",
"1",
",",
"3",
",",
"4",
",",
"3",
",",
"Block",
".",
"planks",
".",
"blockID",
",",
"Block",
".",
"planks",
".",
"blockID",
",",
"false",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"cobblestone",
".",
"blockID",
",",
"0",
",",
"0",
",",
"1",
",",
"0",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"cobblestone",
".",
"blockID",
",",
"0",
",",
"0",
",",
"2",
",",
"0",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"cobblestone",
".",
"blockID",
",",
"0",
",",
"0",
",",
"3",
",",
"0",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"cobblestone",
".",
"blockID",
",",
"0",
",",
"4",
",",
"1",
",",
"0",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"cobblestone",
".",
"blockID",
",",
"0",
",",
"4",
",",
"2",
",",
"0",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"cobblestone",
".",
"blockID",
",",
"0",
",",
"4",
",",
"3",
",",
"0",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"cobblestone",
".",
"blockID",
",",
"0",
",",
"0",
",",
"1",
",",
"4",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"cobblestone",
".",
"blockID",
",",
"0",
",",
"0",
",",
"2",
",",
"4",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"cobblestone",
".",
"blockID",
",",
"0",
",",
"0",
",",
"3",
",",
"4",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"cobblestone",
".",
"blockID",
",",
"0",
",",
"4",
",",
"1",
",",
"4",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"cobblestone",
".",
"blockID",
",",
"0",
",",
"4",
",",
"2",
",",
"4",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"cobblestone",
".",
"blockID",
",",
"0",
",",
"4",
",",
"3",
",",
"4",
",",
"par3StructureBoundingBox",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"0",
",",
"1",
",",
"1",
",",
"0",
",",
"3",
",",
"3",
",",
"Block",
".",
"planks",
".",
"blockID",
",",
"Block",
".",
"planks",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"4",
",",
"1",
",",
"1",
",",
"4",
",",
"3",
",",
"3",
",",
"Block",
".",
"planks",
".",
"blockID",
",",
"Block",
".",
"planks",
".",
"blockID",
",",
"false",
")",
";",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"1",
",",
"1",
",",
"4",
",",
"3",
",",
"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",
",",
"2",
",",
"2",
",",
"4",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"thinGlass",
".",
"blockID",
",",
"0",
",",
"4",
",",
"2",
",",
"2",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"planks",
".",
"blockID",
",",
"0",
",",
"1",
",",
"1",
",",
"0",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"planks",
".",
"blockID",
",",
"0",
",",
"1",
",",
"2",
",",
"0",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"planks",
".",
"blockID",
",",
"0",
",",
"1",
",",
"3",
",",
"0",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"planks",
".",
"blockID",
",",
"0",
",",
"2",
",",
"3",
",",
"0",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"planks",
".",
"blockID",
",",
"0",
",",
"3",
",",
"3",
",",
"0",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"planks",
".",
"blockID",
",",
"0",
",",
"3",
",",
"2",
",",
"0",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"planks",
".",
"blockID",
",",
"0",
",",
"3",
",",
"1",
",",
"0",
",",
"par3StructureBoundingBox",
")",
";",
"if",
"(",
"getBlockIdAtCurrentPosition",
"(",
"par1World",
",",
"2",
",",
"0",
",",
"-",
"1",
",",
"par3StructureBoundingBox",
")",
"==",
"0",
"&&",
"getBlockIdAtCurrentPosition",
"(",
"par1World",
",",
"2",
",",
"-",
"1",
",",
"-",
"1",
",",
"par3StructureBoundingBox",
")",
"!=",
"0",
")",
"{",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"stairCompactCobblestone",
".",
"blockID",
",",
"getMetadataWithOffset",
"(",
"Block",
".",
"stairCompactCobblestone",
".",
"blockID",
",",
"3",
")",
",",
"2",
",",
"0",
",",
"-",
"1",
",",
"par3StructureBoundingBox",
")",
";",
"}",
"fillWithBlocks",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"1",
",",
"1",
",",
"1",
",",
"3",
",",
"3",
",",
"3",
",",
"0",
",",
"0",
",",
"false",
")",
";",
"if",
"(",
"isRoofAccessible",
")",
"{",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"fence",
".",
"blockID",
",",
"0",
",",
"0",
",",
"5",
",",
"0",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"fence",
".",
"blockID",
",",
"0",
",",
"1",
",",
"5",
",",
"0",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"fence",
".",
"blockID",
",",
"0",
",",
"2",
",",
"5",
",",
"0",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"fence",
".",
"blockID",
",",
"0",
",",
"3",
",",
"5",
",",
"0",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"fence",
".",
"blockID",
",",
"0",
",",
"4",
",",
"5",
",",
"0",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"fence",
".",
"blockID",
",",
"0",
",",
"0",
",",
"5",
",",
"4",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"fence",
".",
"blockID",
",",
"0",
",",
"1",
",",
"5",
",",
"4",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"fence",
".",
"blockID",
",",
"0",
",",
"2",
",",
"5",
",",
"4",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"fence",
".",
"blockID",
",",
"0",
",",
"3",
",",
"5",
",",
"4",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"fence",
".",
"blockID",
",",
"0",
",",
"4",
",",
"5",
",",
"4",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"fence",
".",
"blockID",
",",
"0",
",",
"4",
",",
"5",
",",
"1",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"fence",
".",
"blockID",
",",
"0",
",",
"4",
",",
"5",
",",
"2",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"fence",
".",
"blockID",
",",
"0",
",",
"4",
",",
"5",
",",
"3",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"fence",
".",
"blockID",
",",
"0",
",",
"0",
",",
"5",
",",
"1",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"fence",
".",
"blockID",
",",
"0",
",",
"0",
",",
"5",
",",
"2",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"fence",
".",
"blockID",
",",
"0",
",",
"0",
",",
"5",
",",
"3",
",",
"par3StructureBoundingBox",
")",
";",
"}",
"if",
"(",
"isRoofAccessible",
")",
"{",
"int",
"i",
"=",
"getMetadataWithOffset",
"(",
"Block",
".",
"ladder",
".",
"blockID",
",",
"3",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"ladder",
".",
"blockID",
",",
"i",
",",
"3",
",",
"1",
",",
"3",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"ladder",
".",
"blockID",
",",
"i",
",",
"3",
",",
"2",
",",
"3",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"ladder",
".",
"blockID",
",",
"i",
",",
"3",
",",
"3",
",",
"3",
",",
"par3StructureBoundingBox",
")",
";",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"ladder",
".",
"blockID",
",",
"i",
",",
"3",
",",
"4",
",",
"3",
",",
"par3StructureBoundingBox",
")",
";",
"}",
"placeBlockAtCurrentPosition",
"(",
"par1World",
",",
"Block",
".",
"torchWood",
".",
"blockID",
",",
"0",
",",
"2",
",",
"3",
",",
"1",
",",
"par3StructureBoundingBox",
")",
";",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
"5",
";",
"j",
"++",
")",
"{",
"for",
"(",
"int",
"k",
"=",
"0",
";",
"k",
"<",
"5",
";",
"k",
"++",
")",
"{",
"clearCurrentPositionBlocksUpwards",
"(",
"par1World",
",",
"k",
",",
"6",
",",
"j",
",",
"par3StructureBoundingBox",
")",
";",
"fillCurrentPositionBlocksDownwards",
"(",
"par1World",
",",
"Block",
".",
"cobblestone",
".",
"blockID",
",",
"0",
",",
"k",
",",
"-",
"1",
",",
"j",
",",
"par3StructureBoundingBox",
")",
";",
"}",
"}",
"spawnVillagers",
"(",
"par1World",
",",
"par3StructureBoundingBox",
",",
"1",
",",
"1",
",",
"2",
",",
"1",
")",
";",
"return",
"true",
";",
"}",
"}",
"</s>"
] |
9,457 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"io",
".",
"DataOutputStream",
";",
"import",
"java",
".",
"io",
".",
"IOException",
";",
"class",
"NetworkWriterThread",
"extends",
"Thread",
"{",
"final",
"NetworkManager",
"netManager",
";",
"NetworkWriterThread",
"(",
"NetworkManager",
"par1NetworkManager",
",",
"String",
"par2Str",
")",
"{",
"super",
"(",
"par2Str",
")",
";",
"netManager",
"=",
"par1NetworkManager",
";",
"}",
"public",
"void",
"run",
"(",
")",
"{",
"synchronized",
"(",
"NetworkManager",
".",
"threadSyncObject",
")",
"{",
"NetworkManager",
".",
"numWriteThreads",
"++",
";",
"}",
"try",
"{",
"while",
"(",
"NetworkManager",
".",
"isRunning",
"(",
"netManager",
")",
")",
"{",
"while",
"(",
"NetworkManager",
".",
"sendNetworkPacket",
"(",
"netManager",
")",
")",
";",
"try",
"{",
"if",
"(",
"NetworkManager",
".",
"getOutputStream",
"(",
"netManager",
")",
"!=",
"null",
")",
"{",
"NetworkManager",
".",
"getOutputStream",
"(",
"netManager",
")",
".",
"flush",
"(",
")",
";",
"}",
"}",
"catch",
"(",
"IOException",
"ioexception",
")",
"{",
"if",
"(",
"!",
"NetworkManager",
".",
"isTerminating",
"(",
"netManager",
")",
")",
"{",
"NetworkManager",
".",
"sendError",
"(",
"netManager",
",",
"ioexception",
")",
";",
"}",
"ioexception",
".",
"printStackTrace",
"(",
")",
";",
"}",
"try",
"{",
"sleep",
"(",
"2L",
")",
";",
"}",
"catch",
"(",
"InterruptedException",
"interruptedexception",
")",
"{",
"}",
"}",
"}",
"finally",
"{",
"synchronized",
"(",
"NetworkManager",
".",
"threadSyncObject",
")",
"{",
"NetworkManager",
".",
"numWriteThreads",
"--",
";",
"}",
"}",
"}",
"}",
"</s>"
] |
9,458 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"class",
"ItemMinecart",
"extends",
"Item",
"{",
"public",
"int",
"minecartType",
";",
"public",
"ItemMinecart",
"(",
"int",
"par1",
",",
"int",
"par2",
")",
"{",
"super",
"(",
"par1",
")",
";",
"maxStackSize",
"=",
"1",
";",
"minecartType",
"=",
"par2",
";",
"}",
"public",
"boolean",
"onItemUse",
"(",
"ItemStack",
"par1ItemStack",
",",
"EntityPlayer",
"par2EntityPlayer",
",",
"World",
"par3World",
",",
"int",
"par4",
",",
"int",
"par5",
",",
"int",
"par6",
",",
"int",
"par7",
")",
"{",
"int",
"i",
"=",
"par3World",
".",
"getBlockId",
"(",
"par4",
",",
"par5",
",",
"par6",
")",
";",
"if",
"(",
"BlockRail",
".",
"isRailBlock",
"(",
"i",
")",
")",
"{",
"if",
"(",
"!",
"par3World",
".",
"isRemote",
")",
"{",
"par3World",
".",
"spawnEntityInWorld",
"(",
"new",
"EntityMinecart",
"(",
"par3World",
",",
"(",
"float",
")",
"par4",
"+",
"0.5F",
",",
"(",
"float",
")",
"par5",
"+",
"0.5F",
",",
"(",
"float",
")",
"par6",
"+",
"0.5F",
",",
"minecartType",
")",
")",
";",
"}",
"par1ItemStack",
".",
"stackSize",
"--",
";",
"return",
"true",
";",
"}",
"else",
"{",
"return",
"false",
";",
"}",
"}",
"}",
"</s>"
] |
9,459 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"EntityOcelot",
"extends",
"EntityTameable",
"{",
"private",
"EntityAITempt",
"aiTempt",
";",
"public",
"EntityOcelot",
"(",
"World",
"par1World",
")",
"{",
"super",
"(",
"par1World",
")",
";",
"texture",
"=",
"\"\"",
";",
"setSize",
"(",
"0.6F",
",",
"0.8F",
")",
";",
"getNavigator",
"(",
")",
".",
"func_48656_a",
"(",
"true",
")",
";",
"tasks",
".",
"addTask",
"(",
"1",
",",
"new",
"EntityAISwimming",
"(",
"this",
")",
")",
";",
"tasks",
".",
"addTask",
"(",
"2",
",",
"aiSit",
")",
";",
"tasks",
".",
"addTask",
"(",
"3",
",",
"aiTempt",
"=",
"new",
"EntityAITempt",
"(",
"this",
",",
"0.18F",
",",
"Item",
".",
"fishRaw",
".",
"shiftedIndex",
",",
"true",
")",
")",
";",
"tasks",
".",
"addTask",
"(",
"4",
",",
"new",
"EntityAIAvoidEntity",
"(",
"this",
",",
"net",
".",
"minecraft",
".",
"src",
".",
"EntityPlayer",
".",
"class",
",",
"16F",
",",
"0.23F",
",",
"0.4F",
")",
")",
";",
"tasks",
".",
"addTask",
"(",
"5",
",",
"new",
"EntityAIFollowOwner",
"(",
"this",
",",
"0.3F",
",",
"10F",
",",
"5F",
")",
")",
";",
"tasks",
".",
"addTask",
"(",
"6",
",",
"new",
"EntityAIOcelotSit",
"(",
"this",
",",
"0.4F",
")",
")",
";",
"tasks",
".",
"addTask",
"(",
"7",
",",
"new",
"EntityAILeapAtTarget",
"(",
"this",
",",
"0.3F",
")",
")",
";",
"tasks",
".",
"addTask",
"(",
"8",
",",
"new",
"EntityAIOcelotAttack",
"(",
"this",
")",
")",
";",
"tasks",
".",
"addTask",
"(",
"9",
",",
"new",
"EntityAIMate",
"(",
"this",
",",
"0.23F",
")",
")",
";",
"tasks",
".",
"addTask",
"(",
"10",
",",
"new",
"EntityAIWander",
"(",
"this",
",",
"0.23F",
")",
")",
";",
"tasks",
".",
"addTask",
"(",
"11",
",",
"new",
"EntityAIWatchClosest",
"(",
"this",
",",
"net",
".",
"minecraft",
".",
"src",
".",
"EntityPlayer",
".",
"class",
",",
"10F",
")",
")",
";",
"targetTasks",
".",
"addTask",
"(",
"1",
",",
"new",
"EntityAITargetNonTamed",
"(",
"this",
",",
"net",
".",
"minecraft",
".",
"src",
".",
"EntityChicken",
".",
"class",
",",
"14F",
",",
"750",
",",
"false",
")",
")",
";",
"}",
"protected",
"void",
"entityInit",
"(",
")",
"{",
"super",
".",
"entityInit",
"(",
")",
";",
"dataWatcher",
".",
"addObject",
"(",
"18",
",",
"Byte",
".",
"valueOf",
"(",
"(",
"byte",
")",
"0",
")",
")",
";",
"}",
"public",
"void",
"updateAITick",
"(",
")",
"{",
"if",
"(",
"!",
"getMoveHelper",
"(",
")",
".",
"func_48438_a",
"(",
")",
")",
"{",
"setSneaking",
"(",
"false",
")",
";",
"setSprinting",
"(",
"false",
")",
";",
"}",
"else",
"{",
"float",
"f",
"=",
"getMoveHelper",
"(",
")",
".",
"getSpeed",
"(",
")",
";",
"if",
"(",
"f",
"==",
"0.18F",
")",
"{",
"setSneaking",
"(",
"true",
")",
";",
"setSprinting",
"(",
"false",
")",
";",
"}",
"else",
"if",
"(",
"f",
"==",
"0.4F",
")",
"{",
"setSneaking",
"(",
"false",
")",
";",
"setSprinting",
"(",
"true",
")",
";",
"}",
"else",
"{",
"setSneaking",
"(",
"false",
")",
";",
"setSprinting",
"(",
"false",
")",
";",
"}",
"}",
"}",
"protected",
"boolean",
"canDespawn",
"(",
")",
"{",
"return",
"!",
"isTamed",
"(",
")",
";",
"}",
"public",
"boolean",
"isAIEnabled",
"(",
")",
"{",
"return",
"true",
";",
"}",
"public",
"int",
"getMaxHealth",
"(",
")",
"{",
"return",
"10",
";",
"}",
"protected",
"void",
"fall",
"(",
"float",
"f",
")",
"{",
"}",
"public",
"void",
"writeEntityToNBT",
"(",
"NBTTagCompound",
"par1NBTTagCompound",
")",
"{",
"super",
".",
"writeEntityToNBT",
"(",
"par1NBTTagCompound",
")",
";",
"par1NBTTagCompound",
".",
"setInteger",
"(",
"\"CatType\"",
",",
"func_48375_r",
"(",
")",
")",
";",
"}",
"public",
"void",
"readEntityFromNBT",
"(",
"NBTTagCompound",
"par1NBTTagCompound",
")",
"{",
"super",
".",
"readEntityFromNBT",
"(",
"par1NBTTagCompound",
")",
";",
"func_48376_c_",
"(",
"par1NBTTagCompound",
".",
"getInteger",
"(",
"\"CatType\"",
")",
")",
";",
"}",
"protected",
"String",
"getLivingSound",
"(",
")",
"{",
"if",
"(",
"isTamed",
"(",
")",
")",
"{",
"if",
"(",
"isInLove",
"(",
")",
")",
"{",
"return",
"\"mob.cat.purr\"",
";",
"}",
"if",
"(",
"rand",
".",
"nextInt",
"(",
"4",
")",
"==",
"0",
")",
"{",
"return",
"\"\"",
";",
"}",
"else",
"{",
"return",
"\"mob.cat.meow\"",
";",
"}",
"}",
"else",
"{",
"return",
"\"\"",
";",
"}",
"}",
"protected",
"String",
"getHurtSound",
"(",
")",
"{",
"return",
"\"mob.cat.hitt\"",
";",
"}",
"protected",
"String",
"getDeathSound",
"(",
")",
"{",
"return",
"\"mob.cat.hitt\"",
";",
"}",
"protected",
"float",
"getSoundVolume",
"(",
")",
"{",
"return",
"0.4F",
";",
"}",
"protected",
"int",
"getDropItemId",
"(",
")",
"{",
"return",
"Item",
".",
"leather",
".",
"shiftedIndex",
";",
"}",
"public",
"boolean",
"attackEntityAsMob",
"(",
"Entity",
"par1Entity",
")",
"{",
"return",
"par1Entity",
".",
"attackEntityFrom",
"(",
"DamageSource",
".",
"causeMobDamage",
"(",
"this",
")",
",",
"3",
")",
";",
"}",
"public",
"boolean",
"attackEntityFrom",
"(",
"DamageSource",
"par1DamageSource",
",",
"int",
"par2",
")",
"{",
"aiSit",
".",
"func_48210_a",
"(",
"false",
")",
";",
"return",
"super",
".",
"attackEntityFrom",
"(",
"par1DamageSource",
",",
"par2",
")",
";",
"}",
"protected",
"void",
"dropFewItems",
"(",
"boolean",
"flag",
",",
"int",
"i",
")",
"{",
"}",
"public",
"boolean",
"interact",
"(",
"EntityPlayer",
"par1EntityPlayer",
")",
"{",
"ItemStack",
"itemstack",
"=",
"par1EntityPlayer",
".",
"inventory",
".",
"getCurrentItem",
"(",
")",
";",
"if",
"(",
"!",
"isTamed",
"(",
")",
")",
"{",
"if",
"(",
"aiTempt",
".",
"func_48261_f",
"(",
")",
"&&",
"itemstack",
"!=",
"null",
"&&",
"itemstack",
".",
"itemID",
"==",
"Item",
".",
"fishRaw",
".",
"shiftedIndex",
"&&",
"par1EntityPlayer",
".",
"getDistanceSqToEntity",
"(",
"this",
")",
"<",
"9D",
")",
"{",
"itemstack",
".",
"stackSize",
"--",
";",
"if",
"(",
"itemstack",
".",
"stackSize",
"<=",
"0",
")",
"{",
"par1EntityPlayer",
".",
"inventory",
".",
"setInventorySlotContents",
"(",
"par1EntityPlayer",
".",
"inventory",
".",
"currentItem",
",",
"null",
")",
";",
"}",
"if",
"(",
"!",
"worldObj",
".",
"isRemote",
")",
"{",
"if",
"(",
"rand",
".",
"nextInt",
"(",
"3",
")",
"==",
"0",
")",
"{",
"setTamed",
"(",
"true",
")",
";",
"func_48376_c_",
"(",
"1",
"+",
"worldObj",
".",
"rand",
".",
"nextInt",
"(",
"3",
")",
")",
";",
"setOwner",
"(",
"par1EntityPlayer",
".",
"username",
")",
";",
"func_48370_a",
"(",
"true",
")",
";",
"aiSit",
".",
"func_48210_a",
"(",
"true",
")",
";",
"worldObj",
".",
"setEntityState",
"(",
"this",
",",
"(",
"byte",
")",
"7",
")",
";",
"}",
"else",
"{",
"func_48370_a",
"(",
"false",
")",
";",
"worldObj",
".",
"setEntityState",
"(",
"this",
",",
"(",
"byte",
")",
"6",
")",
";",
"}",
"}",
"}",
"return",
"true",
";",
"}",
"if",
"(",
"par1EntityPlayer",
".",
"username",
".",
"equalsIgnoreCase",
"(",
"getOwnerName",
"(",
")",
")",
"&&",
"!",
"worldObj",
".",
"isRemote",
"&&",
"!",
"isWheat",
"(",
"itemstack",
")",
")",
"{",
"aiSit",
".",
"func_48210_a",
"(",
"!",
"isSitting",
"(",
")",
")",
";",
"}",
"return",
"super",
".",
"interact",
"(",
"par1EntityPlayer",
")",
";",
"}",
"public",
"EntityAnimal",
"spawnBabyAnimal",
"(",
"EntityAnimal",
"par1EntityAnimal",
")",
"{",
"EntityOcelot",
"entityocelot",
"=",
"new",
"EntityOcelot",
"(",
"worldObj",
")",
";",
"if",
"(",
"isTamed",
"(",
")",
")",
"{",
"entityocelot",
".",
"setOwner",
"(",
"getOwnerName",
"(",
")",
")",
";",
"entityocelot",
".",
"setTamed",
"(",
"true",
")",
";",
"entityocelot",
".",
"func_48376_c_",
"(",
"func_48375_r",
"(",
")",
")",
";",
"}",
"return",
"entityocelot",
";",
"}",
"public",
"boolean",
"isWheat",
"(",
"ItemStack",
"par1ItemStack",
")",
"{",
"return",
"par1ItemStack",
"!=",
"null",
"&&",
"par1ItemStack",
".",
"itemID",
"==",
"Item",
".",
"fishRaw",
".",
"shiftedIndex",
";",
"}",
"public",
"boolean",
"func_48362_b",
"(",
"EntityAnimal",
"par1EntityAnimal",
")",
"{",
"if",
"(",
"par1EntityAnimal",
"==",
"this",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"!",
"isTamed",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"!",
"(",
"par1EntityAnimal",
"instanceof",
"EntityOcelot",
")",
")",
"{",
"return",
"false",
";",
"}",
"EntityOcelot",
"entityocelot",
"=",
"(",
"EntityOcelot",
")",
"par1EntityAnimal",
";",
"if",
"(",
"!",
"entityocelot",
".",
"isTamed",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",
"else",
"{",
"return",
"isInLove",
"(",
")",
"&&",
"entityocelot",
".",
"isInLove",
"(",
")",
";",
"}",
"}",
"public",
"int",
"func_48375_r",
"(",
")",
"{",
"return",
"dataWatcher",
".",
"getWatchableObjectByte",
"(",
"18",
")",
";",
"}",
"public",
"void",
"func_48376_c_",
"(",
"int",
"par1",
")",
"{",
"dataWatcher",
".",
"updateObject",
"(",
"18",
",",
"Byte",
".",
"valueOf",
"(",
"(",
"byte",
")",
"par1",
")",
")",
";",
"}",
"public",
"boolean",
"getCanSpawnHere",
"(",
")",
"{",
"if",
"(",
"worldObj",
".",
"rand",
".",
"nextInt",
"(",
"3",
")",
"==",
"0",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"worldObj",
".",
"checkIfAABBIsClear",
"(",
"boundingBox",
")",
"&&",
"worldObj",
".",
"getCollidingBoundingBoxes",
"(",
"this",
",",
"boundingBox",
")",
".",
"size",
"(",
")",
"==",
"0",
"&&",
"!",
"worldObj",
".",
"isAnyLiquid",
"(",
"boundingBox",
")",
")",
"{",
"int",
"i",
"=",
"MathHelper",
".",
"floor_double",
"(",
"posX",
")",
";",
"int",
"j",
"=",
"MathHelper",
".",
"floor_double",
"(",
"boundingBox",
".",
"minY",
")",
";",
"int",
"k",
"=",
"MathHelper",
".",
"floor_double",
"(",
"posZ",
")",
";",
"if",
"(",
"j",
"<",
"63",
")",
"{",
"return",
"false",
";",
"}",
"int",
"l",
"=",
"worldObj",
".",
"getBlockId",
"(",
"i",
",",
"j",
"-",
"1",
",",
"k",
")",
";",
"if",
"(",
"l",
"==",
"Block",
".",
"grass",
".",
"blockID",
"||",
"l",
"==",
"Block",
".",
"leaves",
".",
"blockID",
")",
"{",
"return",
"true",
";",
"}",
"}",
"return",
"false",
";",
"}",
"public",
"String",
"getUsername",
"(",
")",
"{",
"if",
"(",
"isTamed",
"(",
")",
")",
"{",
"return",
"\"\"",
";",
"}",
"else",
"{",
"return",
"super",
".",
"getUsername",
"(",
")",
";",
"}",
"}",
"}",
"</s>"
] |
9,460 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"io",
".",
"IOException",
";",
"import",
"java",
".",
"net",
".",
"*",
";",
"import",
"java",
".",
"util",
".",
"*",
";",
"public",
"class",
"RConThreadMain",
"extends",
"RConThreadBase",
"{",
"private",
"int",
"rconPort",
";",
"private",
"int",
"serverPort",
";",
"private",
"String",
"hostname",
";",
"private",
"ServerSocket",
"serverSocket",
";",
"private",
"String",
"rconPassword",
";",
"private",
"HashMap",
"clientThreads",
";",
"public",
"RConThreadMain",
"(",
"IServer",
"par1IServer",
")",
"{",
"super",
"(",
"par1IServer",
")",
";",
"serverSocket",
"=",
"null",
";",
"rconPort",
"=",
"par1IServer",
".",
"getIntProperty",
"(",
"\"rcon.port\"",
",",
"0",
")",
";",
"rconPassword",
"=",
"par1IServer",
".",
"getStringProperty",
"(",
"\"\"",
",",
"\"\"",
")",
";",
"hostname",
"=",
"par1IServer",
".",
"getHostname",
"(",
")",
";",
"serverPort",
"=",
"par1IServer",
".",
"getPort",
"(",
")",
";",
"if",
"(",
"0",
"==",
"rconPort",
")",
"{",
"rconPort",
"=",
"serverPort",
"+",
"10",
";",
"log",
"(",
"(",
"new",
"StringBuilder",
"(",
")",
")",
".",
"append",
"(",
"\"\"",
")",
".",
"append",
"(",
"rconPort",
")",
".",
"toString",
"(",
")",
")",
";",
"par1IServer",
".",
"setProperty",
"(",
"\"rcon.port\"",
",",
"Integer",
".",
"valueOf",
"(",
"rconPort",
")",
")",
";",
"if",
"(",
"0",
"==",
"rconPassword",
".",
"length",
"(",
")",
")",
"{",
"par1IServer",
".",
"setProperty",
"(",
"\"\"",
",",
"\"\"",
")",
";",
"}",
"par1IServer",
".",
"saveProperties",
"(",
")",
";",
"}",
"if",
"(",
"0",
"==",
"hostname",
".",
"length",
"(",
")",
")",
"{",
"hostname",
"=",
"\"0.0.0.0\"",
";",
"}",
"initClientTh",
"(",
")",
";",
"serverSocket",
"=",
"null",
";",
"}",
"private",
"void",
"initClientTh",
"(",
")",
"{",
"clientThreads",
"=",
"new",
"HashMap",
"(",
")",
";",
"}",
"private",
"void",
"cleanClientThreadsMap",
"(",
")",
"{",
"Iterator",
"iterator",
"=",
"clientThreads",
".",
"entrySet",
"(",
")",
".",
"iterator",
"(",
")",
";",
"do",
"{",
"if",
"(",
"!",
"iterator",
".",
"hasNext",
"(",
")",
")",
"{",
"break",
";",
"}",
"java",
".",
"util",
".",
"Map",
".",
"Entry",
"entry",
"=",
"(",
"java",
".",
"util",
".",
"Map",
".",
"Entry",
")",
"iterator",
".",
"next",
"(",
")",
";",
"if",
"(",
"!",
"(",
"(",
"RConThreadClient",
")",
"entry",
".",
"getValue",
"(",
")",
")",
".",
"isRunning",
"(",
")",
")",
"{",
"iterator",
".",
"remove",
"(",
")",
";",
"}",
"}",
"while",
"(",
"true",
")",
";",
"}",
"public",
"void",
"run",
"(",
")",
"{",
"log",
"(",
"(",
"new",
"StringBuilder",
"(",
")",
")",
".",
"append",
"(",
"\"\"",
")",
".",
"append",
"(",
"hostname",
")",
".",
"append",
"(",
"\":\"",
")",
".",
"append",
"(",
"rconPort",
")",
".",
"toString",
"(",
")",
")",
";",
"try",
"{",
"do",
"{",
"if",
"(",
"!",
"running",
")",
"{",
"break",
";",
"}",
"try",
"{",
"Socket",
"socket",
"=",
"serverSocket",
".",
"accept",
"(",
")",
";",
"socket",
".",
"setSoTimeout",
"(",
"500",
")",
";",
"RConThreadClient",
"rconthreadclient",
"=",
"new",
"RConThreadClient",
"(",
"server",
",",
"socket",
")",
";",
"rconthreadclient",
".",
"startThread",
"(",
")",
";",
"clientThreads",
".",
"put",
"(",
"socket",
".",
"getRemoteSocketAddress",
"(",
")",
",",
"rconthreadclient",
")",
";",
"cleanClientThreadsMap",
"(",
")",
";",
"}",
"catch",
"(",
"SocketTimeoutException",
"sockettimeoutexception",
")",
"{",
"cleanClientThreadsMap",
"(",
")",
";",
"}",
"catch",
"(",
"IOException",
"ioexception",
")",
"{",
"if",
"(",
"running",
")",
"{",
"log",
"(",
"(",
"new",
"StringBuilder",
"(",
")",
")",
".",
"append",
"(",
"\"IO:",
"\"",
")",
".",
"append",
"(",
"ioexception",
".",
"getMessage",
"(",
")",
")",
".",
"toString",
"(",
")",
")",
";",
"}",
"}",
"}",
"while",
"(",
"true",
")",
";",
"}",
"finally",
"{",
"closeServerSocket",
"(",
"serverSocket",
")",
";",
"}",
"}",
"public",
"void",
"startThread",
"(",
")",
"{",
"if",
"(",
"0",
"==",
"rconPassword",
".",
"length",
"(",
")",
")",
"{",
"logWarning",
"(",
"(",
"new",
"StringBuilder",
"(",
")",
")",
".",
"append",
"(",
"\"\"",
")",
".",
"append",
"(",
"server",
".",
"getSettingsFilename",
"(",
")",
")",
".",
"append",
"(",
"\"\"",
")",
".",
"toString",
"(",
")",
")",
";",
"return",
";",
"}",
"if",
"(",
"0",
">=",
"rconPort",
"||",
"65535",
"<",
"rconPort",
")",
"{",
"logWarning",
"(",
"(",
"new",
"StringBuilder",
"(",
")",
")",
".",
"append",
"(",
"\"\"",
")",
".",
"append",
"(",
"rconPort",
")",
".",
"append",
"(",
"\"",
"found",
"in",
"'\"",
")",
".",
"append",
"(",
"server",
".",
"getSettingsFilename",
"(",
")",
")",
".",
"append",
"(",
"\"\"",
")",
".",
"toString",
"(",
")",
")",
";",
"return",
";",
"}",
"if",
"(",
"running",
")",
"{",
"return",
";",
"}",
"try",
"{",
"serverSocket",
"=",
"new",
"ServerSocket",
"(",
"rconPort",
",",
"0",
",",
"InetAddress",
".",
"getByName",
"(",
"hostname",
")",
")",
";",
"serverSocket",
".",
"setSoTimeout",
"(",
"500",
")",
";",
"super",
".",
"startThread",
"(",
")",
";",
"}",
"catch",
"(",
"IOException",
"ioexception",
")",
"{",
"logWarning",
"(",
"(",
"new",
"StringBuilder",
"(",
")",
")",
".",
"append",
"(",
"\"\"",
")",
".",
"append",
"(",
"hostname",
")",
".",
"append",
"(",
"\":\"",
")",
".",
"append",
"(",
"rconPort",
")",
".",
"append",
"(",
"\"",
":",
"\"",
")",
".",
"append",
"(",
"ioexception",
".",
"getMessage",
"(",
")",
")",
".",
"toString",
"(",
")",
")",
";",
"}",
"}",
"}",
"</s>"
] |
9,461 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"EntityAIAttackOnCollide",
"extends",
"EntityAIBase",
"{",
"World",
"worldObj",
";",
"EntityLiving",
"field_48156_b",
";",
"EntityLiving",
"entityTarget",
";",
"int",
"field_46095_d",
";",
"float",
"field_48155_e",
";",
"boolean",
"field_48153_f",
";",
"PathEntity",
"field_48154_g",
";",
"Class",
"field_48157_h",
";",
"private",
"int",
"field_48158_i",
";",
"public",
"EntityAIAttackOnCollide",
"(",
"EntityLiving",
"par1EntityLiving",
",",
"Class",
"par2Class",
",",
"float",
"par3",
",",
"boolean",
"par4",
")",
"{",
"this",
"(",
"par1EntityLiving",
",",
"par3",
",",
"par4",
")",
";",
"field_48157_h",
"=",
"par2Class",
";",
"}",
"public",
"EntityAIAttackOnCollide",
"(",
"EntityLiving",
"par1EntityLiving",
",",
"float",
"par2",
",",
"boolean",
"par3",
")",
"{",
"field_46095_d",
"=",
"0",
";",
"field_48156_b",
"=",
"par1EntityLiving",
";",
"worldObj",
"=",
"par1EntityLiving",
".",
"worldObj",
";",
"field_48155_e",
"=",
"par2",
";",
"field_48153_f",
"=",
"par3",
";",
"setMutexBits",
"(",
"3",
")",
";",
"}",
"public",
"boolean",
"shouldExecute",
"(",
")",
"{",
"EntityLiving",
"entityliving",
"=",
"field_48156_b",
".",
"getAttackTarget",
"(",
")",
";",
"if",
"(",
"entityliving",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"field_48157_h",
"!=",
"null",
"&&",
"!",
"field_48157_h",
".",
"isAssignableFrom",
"(",
"entityliving",
".",
"getClass",
"(",
")",
")",
")",
"{",
"return",
"false",
";",
"}",
"else",
"{",
"entityTarget",
"=",
"entityliving",
";",
"field_48154_g",
"=",
"field_48156_b",
".",
"getNavigator",
"(",
")",
".",
"func_48661_a",
"(",
"entityTarget",
")",
";",
"return",
"field_48154_g",
"!=",
"null",
";",
"}",
"}",
"public",
"boolean",
"continueExecuting",
"(",
")",
"{",
"EntityLiving",
"entityliving",
"=",
"field_48156_b",
".",
"getAttackTarget",
"(",
")",
";",
"if",
"(",
"entityliving",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"!",
"entityTarget",
".",
"isEntityAlive",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"!",
"field_48153_f",
")",
"{",
"return",
"!",
"field_48156_b",
".",
"getNavigator",
"(",
")",
".",
"noPath",
"(",
")",
";",
"}",
"return",
"field_48156_b",
".",
"isWithinHomeDistance",
"(",
"MathHelper",
".",
"floor_double",
"(",
"entityTarget",
".",
"posX",
")",
",",
"MathHelper",
".",
"floor_double",
"(",
"entityTarget",
".",
"posY",
")",
",",
"MathHelper",
".",
"floor_double",
"(",
"entityTarget",
".",
"posZ",
")",
")",
";",
"}",
"public",
"void",
"startExecuting",
"(",
")",
"{",
"field_48156_b",
".",
"getNavigator",
"(",
")",
".",
"setPath",
"(",
"field_48154_g",
",",
"field_48155_e",
")",
";",
"field_48158_i",
"=",
"0",
";",
"}",
"public",
"void",
"resetTask",
"(",
")",
"{",
"entityTarget",
"=",
"null",
";",
"field_48156_b",
".",
"getNavigator",
"(",
")",
".",
"clearPathEntity",
"(",
")",
";",
"}",
"public",
"void",
"updateTask",
"(",
")",
"{",
"field_48156_b",
".",
"getLookHelper",
"(",
")",
".",
"setLookPositionWithEntity",
"(",
"entityTarget",
",",
"30F",
",",
"30F",
")",
";",
"if",
"(",
"(",
"field_48153_f",
"||",
"field_48156_b",
".",
"func_48318_al",
"(",
")",
".",
"canSee",
"(",
"entityTarget",
")",
")",
"&&",
"--",
"field_48158_i",
"<=",
"0",
")",
"{",
"field_48158_i",
"=",
"4",
"+",
"field_48156_b",
".",
"getRNG",
"(",
")",
".",
"nextInt",
"(",
"7",
")",
";",
"field_48156_b",
".",
"getNavigator",
"(",
")",
".",
"func_48652_a",
"(",
"entityTarget",
",",
"field_48155_e",
")",
";",
"}",
"field_46095_d",
"=",
"Math",
".",
"max",
"(",
"field_46095_d",
"-",
"1",
",",
"0",
")",
";",
"double",
"d",
"=",
"field_48156_b",
".",
"width",
"*",
"2.0F",
"*",
"(",
"field_48156_b",
".",
"width",
"*",
"2.0F",
")",
";",
"if",
"(",
"field_48156_b",
".",
"getDistanceSq",
"(",
"entityTarget",
".",
"posX",
",",
"entityTarget",
".",
"boundingBox",
".",
"minY",
",",
"entityTarget",
".",
"posZ",
")",
">",
"d",
")",
"{",
"return",
";",
"}",
"if",
"(",
"field_46095_d",
">",
"0",
")",
"{",
"return",
";",
"}",
"else",
"{",
"field_46095_d",
"=",
"20",
";",
"field_48156_b",
".",
"attackEntityAsMob",
"(",
"entityTarget",
")",
";",
"return",
";",
"}",
"}",
"}",
"</s>"
] |
9,462 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"io",
".",
"*",
";",
"public",
"abstract",
"class",
"NBTBase",
"{",
"private",
"String",
"name",
";",
"abstract",
"void",
"write",
"(",
"DataOutput",
"dataoutput",
")",
"throws",
"IOException",
";",
"abstract",
"void",
"load",
"(",
"DataInput",
"datainput",
")",
"throws",
"IOException",
";",
"public",
"abstract",
"byte",
"getId",
"(",
")",
";",
"protected",
"NBTBase",
"(",
"String",
"par1Str",
")",
"{",
"if",
"(",
"par1Str",
"==",
"null",
")",
"{",
"name",
"=",
"\"\"",
";",
"}",
"else",
"{",
"name",
"=",
"par1Str",
";",
"}",
"}",
"public",
"NBTBase",
"setName",
"(",
"String",
"par1Str",
")",
"{",
"if",
"(",
"par1Str",
"==",
"null",
")",
"{",
"name",
"=",
"\"\"",
";",
"}",
"else",
"{",
"name",
"=",
"par1Str",
";",
"}",
"return",
"this",
";",
"}",
"public",
"String",
"getName",
"(",
")",
"{",
"if",
"(",
"name",
"==",
"null",
")",
"{",
"return",
"\"\"",
";",
"}",
"else",
"{",
"return",
"name",
";",
"}",
"}",
"public",
"static",
"NBTBase",
"readNamedTag",
"(",
"DataInput",
"par0DataInput",
")",
"throws",
"IOException",
"{",
"byte",
"byte0",
"=",
"par0DataInput",
".",
"readByte",
"(",
")",
";",
"if",
"(",
"byte0",
"==",
"0",
")",
"{",
"return",
"new",
"NBTTagEnd",
"(",
")",
";",
"}",
"else",
"{",
"String",
"s",
"=",
"par0DataInput",
".",
"readUTF",
"(",
")",
";",
"NBTBase",
"nbtbase",
"=",
"newTag",
"(",
"byte0",
",",
"s",
")",
";",
"nbtbase",
".",
"load",
"(",
"par0DataInput",
")",
";",
"return",
"nbtbase",
";",
"}",
"}",
"public",
"static",
"void",
"writeNamedTag",
"(",
"NBTBase",
"par0NBTBase",
",",
"DataOutput",
"par1DataOutput",
")",
"throws",
"IOException",
"{",
"par1DataOutput",
".",
"writeByte",
"(",
"par0NBTBase",
".",
"getId",
"(",
")",
")",
";",
"if",
"(",
"par0NBTBase",
".",
"getId",
"(",
")",
"==",
"0",
")",
"{",
"return",
";",
"}",
"else",
"{",
"par1DataOutput",
".",
"writeUTF",
"(",
"par0NBTBase",
".",
"getName",
"(",
")",
")",
";",
"par0NBTBase",
".",
"write",
"(",
"par1DataOutput",
")",
";",
"return",
";",
"}",
"}",
"public",
"static",
"NBTBase",
"newTag",
"(",
"byte",
"par0",
",",
"String",
"par1Str",
")",
"{",
"switch",
"(",
"par0",
")",
"{",
"case",
"0",
":",
"return",
"new",
"NBTTagEnd",
"(",
")",
";",
"case",
"1",
":",
"return",
"new",
"NBTTagByte",
"(",
"par1Str",
")",
";",
"case",
"2",
":",
"return",
"new",
"NBTTagShort",
"(",
"par1Str",
")",
";",
"case",
"3",
":",
"return",
"new",
"NBTTagInt",
"(",
"par1Str",
")",
";",
"case",
"4",
":",
"return",
"new",
"NBTTagLong",
"(",
"par1Str",
")",
";",
"case",
"5",
":",
"return",
"new",
"NBTTagFloat",
"(",
"par1Str",
")",
";",
"case",
"6",
":",
"return",
"new",
"NBTTagDouble",
"(",
"par1Str",
")",
";",
"case",
"7",
":",
"return",
"new",
"NBTTagByteArray",
"(",
"par1Str",
")",
";",
"case",
"11",
":",
"return",
"new",
"NBTTagIntArray",
"(",
"par1Str",
")",
";",
"case",
"8",
":",
"return",
"new",
"NBTTagString",
"(",
"par1Str",
")",
";",
"case",
"9",
":",
"return",
"new",
"NBTTagList",
"(",
"par1Str",
")",
";",
"case",
"10",
":",
"return",
"new",
"NBTTagCompound",
"(",
"par1Str",
")",
";",
"}",
"return",
"null",
";",
"}",
"public",
"static",
"String",
"getTagName",
"(",
"byte",
"par0",
")",
"{",
"switch",
"(",
"par0",
")",
"{",
"case",
"0",
":",
"return",
"\"TAG_End\"",
";",
"case",
"1",
":",
"return",
"\"TAG_Byte\"",
";",
"case",
"2",
":",
"return",
"\"TAG_Short\"",
";",
"case",
"3",
":",
"return",
"\"TAG_Int\"",
";",
"case",
"4",
":",
"return",
"\"TAG_Long\"",
";",
"case",
"5",
":",
"return",
"\"TAG_Float\"",
";",
"case",
"6",
":",
"return",
"\"TAG_Double\"",
";",
"case",
"7",
":",
"return",
"\"\"",
";",
"case",
"11",
":",
"return",
"\"\"",
";",
"case",
"8",
":",
"return",
"\"TAG_String\"",
";",
"case",
"9",
":",
"return",
"\"TAG_List\"",
";",
"case",
"10",
":",
"return",
"\"TAG_Compound\"",
";",
"}",
"return",
"\"UNKNOWN\"",
";",
"}",
"public",
"abstract",
"NBTBase",
"copy",
"(",
")",
";",
"public",
"boolean",
"equals",
"(",
"Object",
"par1Obj",
")",
"{",
"if",
"(",
"par1Obj",
"==",
"null",
"||",
"!",
"(",
"par1Obj",
"instanceof",
"NBTBase",
")",
")",
"{",
"return",
"false",
";",
"}",
"NBTBase",
"nbtbase",
"=",
"(",
"NBTBase",
")",
"par1Obj",
";",
"if",
"(",
"getId",
"(",
")",
"!=",
"nbtbase",
".",
"getId",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"name",
"==",
"null",
"&&",
"nbtbase",
".",
"name",
"!=",
"null",
"||",
"name",
"!=",
"null",
"&&",
"nbtbase",
".",
"name",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"return",
"name",
"==",
"null",
"||",
"name",
".",
"equals",
"(",
"nbtbase",
".",
"name",
")",
";",
"}",
"public",
"int",
"hashCode",
"(",
")",
"{",
"return",
"name",
".",
"hashCode",
"(",
")",
"^",
"getId",
"(",
")",
";",
"}",
"}",
"</s>"
] |
9,463 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"io",
".",
"*",
";",
"public",
"class",
"NBTTagLong",
"extends",
"NBTBase",
"{",
"public",
"long",
"data",
";",
"public",
"NBTTagLong",
"(",
"String",
"par1Str",
")",
"{",
"super",
"(",
"par1Str",
")",
";",
"}",
"public",
"NBTTagLong",
"(",
"String",
"par1Str",
",",
"long",
"par2",
")",
"{",
"super",
"(",
"par1Str",
")",
";",
"data",
"=",
"par2",
";",
"}",
"void",
"write",
"(",
"DataOutput",
"par1DataOutput",
")",
"throws",
"IOException",
"{",
"par1DataOutput",
".",
"writeLong",
"(",
"data",
")",
";",
"}",
"void",
"load",
"(",
"DataInput",
"par1DataInput",
")",
"throws",
"IOException",
"{",
"data",
"=",
"par1DataInput",
".",
"readLong",
"(",
")",
";",
"}",
"public",
"byte",
"getId",
"(",
")",
"{",
"return",
"4",
";",
"}",
"public",
"String",
"toString",
"(",
")",
"{",
"return",
"(",
"new",
"StringBuilder",
"(",
")",
")",
".",
"append",
"(",
"\"\"",
")",
".",
"append",
"(",
"data",
")",
".",
"toString",
"(",
")",
";",
"}",
"public",
"NBTBase",
"copy",
"(",
")",
"{",
"return",
"new",
"NBTTagLong",
"(",
"getName",
"(",
")",
",",
"data",
")",
";",
"}",
"public",
"boolean",
"equals",
"(",
"Object",
"par1Obj",
")",
"{",
"if",
"(",
"super",
".",
"equals",
"(",
"par1Obj",
")",
")",
"{",
"NBTTagLong",
"nbttaglong",
"=",
"(",
"NBTTagLong",
")",
"par1Obj",
";",
"return",
"data",
"==",
"nbttaglong",
".",
"data",
";",
"}",
"else",
"{",
"return",
"false",
";",
"}",
"}",
"public",
"int",
"hashCode",
"(",
")",
"{",
"return",
"super",
".",
"hashCode",
"(",
")",
"^",
"(",
"int",
")",
"(",
"data",
"^",
"data",
">>>",
"32",
")",
";",
"}",
"}",
"</s>"
] |
9,464 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"final",
"class",
"StatTypeTime",
"implements",
"IStatType",
"{",
"StatTypeTime",
"(",
")",
"{",
"}",
"}",
"</s>"
] |
9,465 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"io",
".",
"*",
";",
"public",
"class",
"Packet50PreChunk",
"extends",
"Packet",
"{",
"public",
"int",
"xPosition",
";",
"public",
"int",
"yPosition",
";",
"public",
"boolean",
"mode",
";",
"public",
"Packet50PreChunk",
"(",
")",
"{",
"isChunkDataPacket",
"=",
"false",
";",
"}",
"public",
"Packet50PreChunk",
"(",
"int",
"par1",
",",
"int",
"par2",
",",
"boolean",
"par3",
")",
"{",
"isChunkDataPacket",
"=",
"false",
";",
"xPosition",
"=",
"par1",
";",
"yPosition",
"=",
"par2",
";",
"mode",
"=",
"par3",
";",
"}",
"public",
"void",
"readPacketData",
"(",
"DataInputStream",
"par1DataInputStream",
")",
"throws",
"IOException",
"{",
"xPosition",
"=",
"par1DataInputStream",
".",
"readInt",
"(",
")",
";",
"yPosition",
"=",
"par1DataInputStream",
".",
"readInt",
"(",
")",
";",
"mode",
"=",
"par1DataInputStream",
".",
"read",
"(",
")",
"!=",
"0",
";",
"}",
"public",
"void",
"writePacketData",
"(",
"DataOutputStream",
"par1DataOutputStream",
")",
"throws",
"IOException",
"{",
"par1DataOutputStream",
".",
"writeInt",
"(",
"xPosition",
")",
";",
"par1DataOutputStream",
".",
"writeInt",
"(",
"yPosition",
")",
";",
"par1DataOutputStream",
".",
"write",
"(",
"mode",
"?",
"1",
":",
"0",
")",
";",
"}",
"public",
"void",
"processPacket",
"(",
"NetHandler",
"par1NetHandler",
")",
"{",
"par1NetHandler",
".",
"handlePreChunk",
"(",
"this",
")",
";",
"}",
"public",
"int",
"getPacketSize",
"(",
")",
"{",
"return",
"9",
";",
"}",
"}",
"</s>"
] |
9,466 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"class",
"EntityAIOwnerHurtTarget",
"extends",
"EntityAITarget",
"{",
"EntityTameable",
"field_48304_a",
";",
"EntityLiving",
"field_48303_b",
";",
"public",
"EntityAIOwnerHurtTarget",
"(",
"EntityTameable",
"par1EntityTameable",
")",
"{",
"super",
"(",
"par1EntityTameable",
",",
"32F",
",",
"false",
")",
";",
"field_48304_a",
"=",
"par1EntityTameable",
";",
"setMutexBits",
"(",
"1",
")",
";",
"}",
"public",
"boolean",
"shouldExecute",
"(",
")",
"{",
"if",
"(",
"!",
"field_48304_a",
".",
"isTamed",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",
"EntityLiving",
"entityliving",
"=",
"field_48304_a",
".",
"getOwner",
"(",
")",
";",
"if",
"(",
"entityliving",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"else",
"{",
"field_48303_b",
"=",
"entityliving",
".",
"getLastAttackingEntity",
"(",
")",
";",
"return",
"func_48284_a",
"(",
"field_48303_b",
",",
"false",
")",
";",
"}",
"}",
"public",
"void",
"startExecuting",
"(",
")",
"{",
"taskOwner",
".",
"setAttackTarget",
"(",
"field_48303_b",
")",
";",
"super",
".",
"startExecuting",
"(",
")",
";",
"}",
"}",
"</s>"
] |
9,467 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"public",
"class",
"InventoryBasic",
"implements",
"IInventory",
"{",
"private",
"String",
"inventoryTitle",
";",
"private",
"int",
"slotsCount",
";",
"private",
"ItemStack",
"inventoryContents",
"[",
"]",
";",
"private",
"List",
"field_40084_d",
";",
"public",
"InventoryBasic",
"(",
"String",
"par1Str",
",",
"int",
"par2",
")",
"{",
"inventoryTitle",
"=",
"par1Str",
";",
"slotsCount",
"=",
"par2",
";",
"inventoryContents",
"=",
"new",
"ItemStack",
"[",
"par2",
"]",
";",
"}",
"public",
"ItemStack",
"getStackInSlot",
"(",
"int",
"par1",
")",
"{",
"return",
"inventoryContents",
"[",
"par1",
"]",
";",
"}",
"public",
"ItemStack",
"decrStackSize",
"(",
"int",
"par1",
",",
"int",
"par2",
")",
"{",
"if",
"(",
"inventoryContents",
"[",
"par1",
"]",
"!=",
"null",
")",
"{",
"if",
"(",
"inventoryContents",
"[",
"par1",
"]",
".",
"stackSize",
"<=",
"par2",
")",
"{",
"ItemStack",
"itemstack",
"=",
"inventoryContents",
"[",
"par1",
"]",
";",
"inventoryContents",
"[",
"par1",
"]",
"=",
"null",
";",
"onInventoryChanged",
"(",
")",
";",
"return",
"itemstack",
";",
"}",
"ItemStack",
"itemstack1",
"=",
"inventoryContents",
"[",
"par1",
"]",
".",
"splitStack",
"(",
"par2",
")",
";",
"if",
"(",
"inventoryContents",
"[",
"par1",
"]",
".",
"stackSize",
"==",
"0",
")",
"{",
"inventoryContents",
"[",
"par1",
"]",
"=",
"null",
";",
"}",
"onInventoryChanged",
"(",
")",
";",
"return",
"itemstack1",
";",
"}",
"else",
"{",
"return",
"null",
";",
"}",
"}",
"public",
"ItemStack",
"getStackInSlotOnClosing",
"(",
"int",
"par1",
")",
"{",
"if",
"(",
"inventoryContents",
"[",
"par1",
"]",
"!=",
"null",
")",
"{",
"ItemStack",
"itemstack",
"=",
"inventoryContents",
"[",
"par1",
"]",
";",
"inventoryContents",
"[",
"par1",
"]",
"=",
"null",
";",
"return",
"itemstack",
";",
"}",
"else",
"{",
"return",
"null",
";",
"}",
"}",
"public",
"void",
"setInventorySlotContents",
"(",
"int",
"par1",
",",
"ItemStack",
"par2ItemStack",
")",
"{",
"inventoryContents",
"[",
"par1",
"]",
"=",
"par2ItemStack",
";",
"if",
"(",
"par2ItemStack",
"!=",
"null",
"&&",
"par2ItemStack",
".",
"stackSize",
">",
"getInventoryStackLimit",
"(",
")",
")",
"{",
"par2ItemStack",
".",
"stackSize",
"=",
"getInventoryStackLimit",
"(",
")",
";",
"}",
"onInventoryChanged",
"(",
")",
";",
"}",
"public",
"int",
"getSizeInventory",
"(",
")",
"{",
"return",
"slotsCount",
";",
"}",
"public",
"String",
"getInvName",
"(",
")",
"{",
"return",
"inventoryTitle",
";",
"}",
"public",
"int",
"getInventoryStackLimit",
"(",
")",
"{",
"return",
"64",
";",
"}",
"public",
"void",
"onInventoryChanged",
"(",
")",
"{",
"if",
"(",
"field_40084_d",
"!=",
"null",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"field_40084_d",
".",
"size",
"(",
")",
";",
"i",
"++",
")",
"{",
"(",
"(",
"IInvBasic",
")",
"field_40084_d",
".",
"get",
"(",
"i",
")",
")",
".",
"onInventoryChanged",
"(",
"this",
")",
";",
"}",
"}",
"}",
"public",
"boolean",
"isUseableByPlayer",
"(",
"EntityPlayer",
"par1EntityPlayer",
")",
"{",
"return",
"true",
";",
"}",
"public",
"void",
"openChest",
"(",
")",
"{",
"}",
"public",
"void",
"closeChest",
"(",
")",
"{",
"}",
"}",
"</s>"
] |
9,468 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"class",
"MovingObjectPosition",
"{",
"public",
"EnumMovingObjectType",
"typeOfHit",
";",
"public",
"int",
"blockX",
";",
"public",
"int",
"blockY",
";",
"public",
"int",
"blockZ",
";",
"public",
"int",
"sideHit",
";",
"public",
"Vec3D",
"hitVec",
";",
"public",
"Entity",
"entityHit",
";",
"public",
"MovingObjectPosition",
"(",
"int",
"par1",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"Vec3D",
"par5Vec3D",
")",
"{",
"typeOfHit",
"=",
"EnumMovingObjectType",
".",
"TILE",
";",
"blockX",
"=",
"par1",
";",
"blockY",
"=",
"par2",
";",
"blockZ",
"=",
"par3",
";",
"sideHit",
"=",
"par4",
";",
"hitVec",
"=",
"Vec3D",
".",
"createVector",
"(",
"par5Vec3D",
".",
"xCoord",
",",
"par5Vec3D",
".",
"yCoord",
",",
"par5Vec3D",
".",
"zCoord",
")",
";",
"}",
"public",
"MovingObjectPosition",
"(",
"Entity",
"par1Entity",
")",
"{",
"typeOfHit",
"=",
"EnumMovingObjectType",
".",
"ENTITY",
";",
"entityHit",
"=",
"par1Entity",
";",
"hitVec",
"=",
"Vec3D",
".",
"createVector",
"(",
"par1Entity",
".",
"posX",
",",
"par1Entity",
".",
"posY",
",",
"par1Entity",
".",
"posZ",
")",
";",
"}",
"}",
"</s>"
] |
9,469 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"public",
"class",
"ContainerPlayer",
"extends",
"Container",
"{",
"public",
"InventoryCrafting",
"craftMatrix",
";",
"public",
"IInventory",
"craftResult",
";",
"public",
"boolean",
"isLocalWorld",
";",
"public",
"ContainerPlayer",
"(",
"InventoryPlayer",
"par1InventoryPlayer",
")",
"{",
"this",
"(",
"par1InventoryPlayer",
",",
"true",
")",
";",
"}",
"public",
"ContainerPlayer",
"(",
"InventoryPlayer",
"par1InventoryPlayer",
",",
"boolean",
"par2",
")",
"{",
"craftMatrix",
"=",
"new",
"InventoryCrafting",
"(",
"this",
",",
"2",
",",
"2",
")",
";",
"craftResult",
"=",
"new",
"InventoryCraftResult",
"(",
")",
";",
"isLocalWorld",
"=",
"false",
";",
"isLocalWorld",
"=",
"par2",
";",
"addSlot",
"(",
"new",
"SlotCrafting",
"(",
"par1InventoryPlayer",
".",
"player",
",",
"craftMatrix",
",",
"craftResult",
",",
"0",
",",
"144",
",",
"36",
")",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"2",
";",
"i",
"++",
")",
"{",
"for",
"(",
"int",
"i1",
"=",
"0",
";",
"i1",
"<",
"2",
";",
"i1",
"++",
")",
"{",
"addSlot",
"(",
"new",
"Slot",
"(",
"craftMatrix",
",",
"i1",
"+",
"i",
"*",
"2",
",",
"88",
"+",
"i1",
"*",
"18",
",",
"26",
"+",
"i",
"*",
"18",
")",
")",
";",
"}",
"}",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
"4",
";",
"j",
"++",
")",
"{",
"int",
"j1",
"=",
"j",
";",
"addSlot",
"(",
"new",
"SlotArmor",
"(",
"this",
",",
"par1InventoryPlayer",
",",
"par1InventoryPlayer",
".",
"getSizeInventory",
"(",
")",
"-",
"1",
"-",
"j",
",",
"8",
",",
"8",
"+",
"j",
"*",
"18",
",",
"j1",
")",
")",
";",
"}",
"for",
"(",
"int",
"k",
"=",
"0",
";",
"k",
"<",
"3",
";",
"k",
"++",
")",
"{",
"for",
"(",
"int",
"k1",
"=",
"0",
";",
"k1",
"<",
"9",
";",
"k1",
"++",
")",
"{",
"addSlot",
"(",
"new",
"Slot",
"(",
"par1InventoryPlayer",
",",
"k1",
"+",
"(",
"k",
"+",
"1",
")",
"*",
"9",
",",
"8",
"+",
"k1",
"*",
"18",
",",
"84",
"+",
"k",
"*",
"18",
")",
")",
";",
"}",
"}",
"for",
"(",
"int",
"l",
"=",
"0",
";",
"l",
"<",
"9",
";",
"l",
"++",
")",
"{",
"addSlot",
"(",
"new",
"Slot",
"(",
"par1InventoryPlayer",
",",
"l",
",",
"8",
"+",
"l",
"*",
"18",
",",
"142",
")",
")",
";",
"}",
"onCraftMatrixChanged",
"(",
"craftMatrix",
")",
";",
"}",
"public",
"void",
"onCraftMatrixChanged",
"(",
"IInventory",
"par1IInventory",
")",
"{",
"craftResult",
".",
"setInventorySlotContents",
"(",
"0",
",",
"CraftingManager",
".",
"getInstance",
"(",
")",
".",
"findMatchingRecipe",
"(",
"craftMatrix",
")",
")",
";",
"}",
"public",
"void",
"onCraftGuiClosed",
"(",
"EntityPlayer",
"par1EntityPlayer",
")",
"{",
"super",
".",
"onCraftGuiClosed",
"(",
"par1EntityPlayer",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"4",
";",
"i",
"++",
")",
"{",
"ItemStack",
"itemstack",
"=",
"craftMatrix",
".",
"getStackInSlotOnClosing",
"(",
"i",
")",
";",
"if",
"(",
"itemstack",
"!=",
"null",
")",
"{",
"par1EntityPlayer",
".",
"dropPlayerItem",
"(",
"itemstack",
")",
";",
"}",
"}",
"craftResult",
".",
"setInventorySlotContents",
"(",
"0",
",",
"null",
")",
";",
"}",
"public",
"boolean",
"canInteractWith",
"(",
"EntityPlayer",
"par1EntityPlayer",
")",
"{",
"return",
"true",
";",
"}",
"public",
"ItemStack",
"transferStackInSlot",
"(",
"int",
"par1",
")",
"{",
"ItemStack",
"itemstack",
"=",
"null",
";",
"Slot",
"slot",
"=",
"(",
"Slot",
")",
"inventorySlots",
".",
"get",
"(",
"par1",
")",
";",
"if",
"(",
"slot",
"!=",
"null",
"&&",
"slot",
".",
"getHasStack",
"(",
")",
")",
"{",
"ItemStack",
"itemstack1",
"=",
"slot",
".",
"getStack",
"(",
")",
";",
"itemstack",
"=",
"itemstack1",
".",
"copy",
"(",
")",
";",
"if",
"(",
"par1",
"==",
"0",
")",
"{",
"if",
"(",
"!",
"mergeItemStack",
"(",
"itemstack1",
",",
"9",
",",
"45",
",",
"true",
")",
")",
"{",
"return",
"null",
";",
"}",
"slot",
".",
"func_48417_a",
"(",
"itemstack1",
",",
"itemstack",
")",
";",
"}",
"else",
"if",
"(",
"par1",
">=",
"9",
"&&",
"par1",
"<",
"36",
")",
"{",
"if",
"(",
"!",
"mergeItemStack",
"(",
"itemstack1",
",",
"36",
",",
"45",
",",
"false",
")",
")",
"{",
"return",
"null",
";",
"}",
"}",
"else",
"if",
"(",
"par1",
">=",
"36",
"&&",
"par1",
"<",
"45",
")",
"{",
"if",
"(",
"!",
"mergeItemStack",
"(",
"itemstack1",
",",
"9",
",",
"36",
",",
"false",
")",
")",
"{",
"return",
"null",
";",
"}",
"}",
"else",
"if",
"(",
"!",
"mergeItemStack",
"(",
"itemstack1",
",",
"9",
",",
"45",
",",
"false",
")",
")",
"{",
"return",
"null",
";",
"}",
"if",
"(",
"itemstack1",
".",
"stackSize",
"==",
"0",
")",
"{",
"slot",
".",
"putStack",
"(",
"null",
")",
";",
"}",
"else",
"{",
"slot",
".",
"onSlotChanged",
"(",
")",
";",
"}",
"if",
"(",
"itemstack1",
".",
"stackSize",
"!=",
"itemstack",
".",
"stackSize",
")",
"{",
"slot",
".",
"onPickupFromSlot",
"(",
"itemstack1",
")",
";",
"}",
"else",
"{",
"return",
"null",
";",
"}",
"}",
"return",
"itemstack",
";",
"}",
"}",
"</s>"
] |
9,470 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"MapGenRavine",
"extends",
"MapGenBase",
"{",
"private",
"float",
"field_35540_a",
"[",
"]",
";",
"public",
"MapGenRavine",
"(",
")",
"{",
"field_35540_a",
"=",
"new",
"float",
"[",
"1024",
"]",
";",
"}",
"protected",
"void",
"generateRavine",
"(",
"long",
"par1",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"byte",
"par5ArrayOfByte",
"[",
"]",
",",
"double",
"par6",
",",
"double",
"par8",
",",
"double",
"par10",
",",
"float",
"par12",
",",
"float",
"par13",
",",
"float",
"par14",
",",
"int",
"par15",
",",
"int",
"par16",
",",
"double",
"par17",
")",
"{",
"Random",
"random",
"=",
"new",
"Random",
"(",
"par1",
")",
";",
"double",
"d",
"=",
"par3",
"*",
"16",
"+",
"8",
";",
"double",
"d1",
"=",
"par4",
"*",
"16",
"+",
"8",
";",
"float",
"f",
"=",
"0.0F",
";",
"float",
"f1",
"=",
"0.0F",
";",
"if",
"(",
"par16",
"<=",
"0",
")",
"{",
"int",
"i",
"=",
"range",
"*",
"16",
"-",
"16",
";",
"par16",
"=",
"i",
"-",
"random",
".",
"nextInt",
"(",
"i",
"/",
"4",
")",
";",
"}",
"boolean",
"flag",
"=",
"false",
";",
"if",
"(",
"par15",
"==",
"-",
"1",
")",
"{",
"par15",
"=",
"par16",
"/",
"2",
";",
"flag",
"=",
"true",
";",
"}",
"float",
"f2",
"=",
"1.0F",
";",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
"128",
";",
"j",
"++",
")",
"{",
"if",
"(",
"j",
"==",
"0",
"||",
"random",
".",
"nextInt",
"(",
"3",
")",
"==",
"0",
")",
"{",
"f2",
"=",
"1.0F",
"+",
"random",
".",
"nextFloat",
"(",
")",
"*",
"random",
".",
"nextFloat",
"(",
")",
"*",
"1.0F",
";",
"}",
"field_35540_a",
"[",
"j",
"]",
"=",
"f2",
"*",
"f2",
";",
"}",
"for",
"(",
";",
"par15",
"<",
"par16",
";",
"par15",
"++",
")",
"{",
"double",
"d2",
"=",
"1.5D",
"+",
"(",
"double",
")",
"(",
"MathHelper",
".",
"sin",
"(",
"(",
"(",
"float",
")",
"par15",
"*",
"(",
"float",
")",
"Math",
".",
"PI",
")",
"/",
"(",
"float",
")",
"par16",
")",
"*",
"par12",
"*",
"1.0F",
")",
";",
"double",
"d3",
"=",
"d2",
"*",
"par17",
";",
"d2",
"*=",
"(",
"double",
")",
"random",
".",
"nextFloat",
"(",
")",
"*",
"0.25D",
"+",
"0.75D",
";",
"d3",
"*=",
"(",
"double",
")",
"random",
".",
"nextFloat",
"(",
")",
"*",
"0.25D",
"+",
"0.75D",
";",
"float",
"f3",
"=",
"MathHelper",
".",
"cos",
"(",
"par14",
")",
";",
"float",
"f4",
"=",
"MathHelper",
".",
"sin",
"(",
"par14",
")",
";",
"par6",
"+=",
"MathHelper",
".",
"cos",
"(",
"par13",
")",
"*",
"f3",
";",
"par8",
"+=",
"f4",
";",
"par10",
"+=",
"MathHelper",
".",
"sin",
"(",
"par13",
")",
"*",
"f3",
";",
"par14",
"*=",
"0.7F",
";",
"par14",
"+=",
"f1",
"*",
"0.05F",
";",
"par13",
"+=",
"f",
"*",
"0.05F",
";",
"f1",
"*=",
"0.8F",
";",
"f",
"*=",
"0.5F",
";",
"f1",
"+=",
"(",
"random",
".",
"nextFloat",
"(",
")",
"-",
"random",
".",
"nextFloat",
"(",
")",
")",
"*",
"random",
".",
"nextFloat",
"(",
")",
"*",
"2.0F",
";",
"f",
"+=",
"(",
"random",
".",
"nextFloat",
"(",
")",
"-",
"random",
".",
"nextFloat",
"(",
")",
")",
"*",
"random",
".",
"nextFloat",
"(",
")",
"*",
"4F",
";",
"if",
"(",
"!",
"flag",
"&&",
"random",
".",
"nextInt",
"(",
"4",
")",
"==",
"0",
")",
"{",
"continue",
";",
"}",
"double",
"d4",
"=",
"par6",
"-",
"d",
";",
"double",
"d5",
"=",
"par10",
"-",
"d1",
";",
"double",
"d6",
"=",
"par16",
"-",
"par15",
";",
"double",
"d7",
"=",
"par12",
"+",
"2.0F",
"+",
"16F",
";",
"if",
"(",
"(",
"d4",
"*",
"d4",
"+",
"d5",
"*",
"d5",
")",
"-",
"d6",
"*",
"d6",
">",
"d7",
"*",
"d7",
")",
"{",
"return",
";",
"}",
"if",
"(",
"par6",
"<",
"d",
"-",
"16D",
"-",
"d2",
"*",
"2D",
"||",
"par10",
"<",
"d1",
"-",
"16D",
"-",
"d2",
"*",
"2D",
"||",
"par6",
">",
"d",
"+",
"16D",
"+",
"d2",
"*",
"2D",
"||",
"par10",
">",
"d1",
"+",
"16D",
"+",
"d2",
"*",
"2D",
")",
"{",
"continue",
";",
"}",
"d4",
"=",
"MathHelper",
".",
"floor_double",
"(",
"par6",
"-",
"d2",
")",
"-",
"par3",
"*",
"16",
"-",
"1",
";",
"int",
"k",
"=",
"(",
"MathHelper",
".",
"floor_double",
"(",
"par6",
"+",
"d2",
")",
"-",
"par3",
"*",
"16",
")",
"+",
"1",
";",
"d5",
"=",
"MathHelper",
".",
"floor_double",
"(",
"par8",
"-",
"d3",
")",
"-",
"1",
";",
"int",
"l",
"=",
"MathHelper",
".",
"floor_double",
"(",
"par8",
"+",
"d3",
")",
"+",
"1",
";",
"d6",
"=",
"MathHelper",
".",
"floor_double",
"(",
"par10",
"-",
"d2",
")",
"-",
"par4",
"*",
"16",
"-",
"1",
";",
"int",
"i1",
"=",
"(",
"MathHelper",
".",
"floor_double",
"(",
"par10",
"+",
"d2",
")",
"-",
"par4",
"*",
"16",
")",
"+",
"1",
";",
"if",
"(",
"d4",
"<",
"0",
")",
"{",
"d4",
"=",
"0",
";",
"}",
"if",
"(",
"k",
">",
"16",
")",
"{",
"k",
"=",
"16",
";",
"}",
"if",
"(",
"d5",
"<",
"1",
")",
"{",
"d5",
"=",
"1",
";",
"}",
"if",
"(",
"l",
">",
"120",
")",
"{",
"l",
"=",
"120",
";",
"}",
"if",
"(",
"d6",
"<",
"0",
")",
"{",
"d6",
"=",
"0",
";",
"}",
"if",
"(",
"i1",
">",
"16",
")",
"{",
"i1",
"=",
"16",
";",
"}",
"boolean",
"flag1",
"=",
"false",
";",
"for",
"(",
"int",
"j1",
"=",
"(",
"int",
")",
"d4",
";",
"!",
"flag1",
"&&",
"j1",
"<",
"k",
";",
"j1",
"++",
")",
"{",
"for",
"(",
"int",
"l1",
"=",
"(",
"int",
")",
"d6",
";",
"!",
"flag1",
"&&",
"l1",
"<",
"i1",
";",
"l1",
"++",
")",
"{",
"for",
"(",
"int",
"i2",
"=",
"l",
"+",
"1",
";",
"!",
"flag1",
"&&",
"i2",
">=",
"d5",
"-",
"1",
";",
"i2",
"--",
")",
"{",
"int",
"j2",
"=",
"(",
"j1",
"*",
"16",
"+",
"l1",
")",
"*",
"128",
"+",
"i2",
";",
"if",
"(",
"i2",
"<",
"0",
"||",
"i2",
">=",
"128",
")",
"{",
"continue",
";",
"}",
"if",
"(",
"par5ArrayOfByte",
"[",
"j2",
"]",
"==",
"Block",
".",
"waterMoving",
".",
"blockID",
"||",
"par5ArrayOfByte",
"[",
"j2",
"]",
"==",
"Block",
".",
"waterStill",
".",
"blockID",
")",
"{",
"flag1",
"=",
"true",
";",
"}",
"if",
"(",
"i2",
"!=",
"d5",
"-",
"1",
"&&",
"j1",
"!=",
"d4",
"&&",
"j1",
"!=",
"k",
"-",
"1",
"&&",
"l1",
"!=",
"d6",
"&&",
"l1",
"!=",
"i1",
"-",
"1",
")",
"{",
"i2",
"=",
"(",
"int",
")",
"d5",
";",
"}",
"}",
"}",
"}",
"if",
"(",
"flag1",
")",
"{",
"continue",
";",
"}",
"for",
"(",
"int",
"k1",
"=",
"(",
"int",
")",
"d4",
";",
"k1",
"<",
"k",
";",
"k1",
"++",
")",
"{",
"double",
"d8",
"=",
"(",
"(",
"(",
"double",
")",
"(",
"k1",
"+",
"par3",
"*",
"16",
")",
"+",
"0.5D",
")",
"-",
"par6",
")",
"/",
"d2",
";",
"label0",
":",
"for",
"(",
"int",
"k2",
"=",
"(",
"int",
")",
"d6",
";",
"k2",
"<",
"i1",
";",
"k2",
"++",
")",
"{",
"double",
"d9",
"=",
"(",
"(",
"(",
"double",
")",
"(",
"k2",
"+",
"par4",
"*",
"16",
")",
"+",
"0.5D",
")",
"-",
"par10",
")",
"/",
"d2",
";",
"int",
"l2",
"=",
"(",
"k1",
"*",
"16",
"+",
"k2",
")",
"*",
"128",
"+",
"l",
";",
"boolean",
"flag2",
"=",
"false",
";",
"if",
"(",
"d8",
"*",
"d8",
"+",
"d9",
"*",
"d9",
">=",
"1.0D",
")",
"{",
"continue",
";",
"}",
"int",
"i3",
"=",
"l",
"-",
"1",
";",
"do",
"{",
"if",
"(",
"i3",
"<",
"d5",
")",
"{",
"continue",
"label0",
";",
"}",
"double",
"d10",
"=",
"(",
"(",
"(",
"double",
")",
"i3",
"+",
"0.5D",
")",
"-",
"par8",
")",
"/",
"d3",
";",
"if",
"(",
"(",
"d8",
"*",
"d8",
"+",
"d9",
"*",
"d9",
")",
"*",
"(",
"double",
")",
"field_35540_a",
"[",
"i3",
"]",
"+",
"(",
"d10",
"*",
"d10",
")",
"/",
"6D",
"<",
"1.0D",
")",
"{",
"byte",
"byte0",
"=",
"par5ArrayOfByte",
"[",
"l2",
"]",
";",
"if",
"(",
"byte0",
"==",
"Block",
".",
"grass",
".",
"blockID",
")",
"{",
"flag2",
"=",
"true",
";",
"}",
"if",
"(",
"byte0",
"==",
"Block",
".",
"stone",
".",
"blockID",
"||",
"byte0",
"==",
"Block",
".",
"dirt",
".",
"blockID",
"||",
"byte0",
"==",
"Block",
".",
"grass",
".",
"blockID",
")",
"{",
"if",
"(",
"i3",
"<",
"10",
")",
"{",
"par5ArrayOfByte",
"[",
"l2",
"]",
"=",
"(",
"byte",
")",
"Block",
".",
"lavaMoving",
".",
"blockID",
";",
"}",
"else",
"{",
"par5ArrayOfByte",
"[",
"l2",
"]",
"=",
"0",
";",
"if",
"(",
"flag2",
"&&",
"par5ArrayOfByte",
"[",
"l2",
"-",
"1",
"]",
"==",
"Block",
".",
"dirt",
".",
"blockID",
")",
"{",
"par5ArrayOfByte",
"[",
"l2",
"-",
"1",
"]",
"=",
"worldObj",
".",
"getBiomeGenForCoords",
"(",
"k1",
"+",
"par3",
"*",
"16",
",",
"k2",
"+",
"par4",
"*",
"16",
")",
".",
"topBlock",
";",
"}",
"}",
"}",
"}",
"l2",
"--",
";",
"i3",
"--",
";",
"}",
"while",
"(",
"true",
")",
";",
"}",
"}",
"if",
"(",
"flag",
")",
"{",
"break",
";",
"}",
"}",
"}",
"protected",
"void",
"recursiveGenerate",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
",",
"byte",
"par6ArrayOfByte",
"[",
"]",
")",
"{",
"if",
"(",
"rand",
".",
"nextInt",
"(",
"50",
")",
"!=",
"0",
")",
"{",
"return",
";",
"}",
"double",
"d",
"=",
"par2",
"*",
"16",
"+",
"rand",
".",
"nextInt",
"(",
"16",
")",
";",
"double",
"d1",
"=",
"rand",
".",
"nextInt",
"(",
"rand",
".",
"nextInt",
"(",
"40",
")",
"+",
"8",
")",
"+",
"20",
";",
"double",
"d2",
"=",
"par3",
"*",
"16",
"+",
"rand",
".",
"nextInt",
"(",
"16",
")",
";",
"int",
"i",
"=",
"1",
";",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
"i",
";",
"j",
"++",
")",
"{",
"float",
"f",
"=",
"rand",
".",
"nextFloat",
"(",
")",
"*",
"(",
"float",
")",
"Math",
".",
"PI",
"*",
"2.0F",
";",
"float",
"f1",
"=",
"(",
"(",
"rand",
".",
"nextFloat",
"(",
")",
"-",
"0.5F",
")",
"*",
"2.0F",
")",
"/",
"8F",
";",
"float",
"f2",
"=",
"(",
"rand",
".",
"nextFloat",
"(",
")",
"*",
"2.0F",
"+",
"rand",
".",
"nextFloat",
"(",
")",
")",
"*",
"2.0F",
";",
"generateRavine",
"(",
"rand",
".",
"nextLong",
"(",
")",
",",
"par4",
",",
"par5",
",",
"par6ArrayOfByte",
",",
"d",
",",
"d1",
",",
"d2",
",",
"f2",
",",
"f",
",",
"f1",
",",
"0",
",",
"0",
",",
"3D",
")",
";",
"}",
"}",
"}",
"</s>"
] |
9,471 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"class",
"RecipesArmor",
"{",
"private",
"String",
"recipePatterns",
"[",
"]",
"[",
"]",
"=",
"{",
"{",
"\"XXX\"",
",",
"\"X",
"X\"",
"}",
",",
"{",
"\"X",
"X\"",
",",
"\"XXX\"",
",",
"\"XXX\"",
"}",
",",
"{",
"\"XXX\"",
",",
"\"X",
"X\"",
",",
"\"X",
"X\"",
"}",
",",
"{",
"\"X",
"X\"",
",",
"\"X",
"X\"",
"}",
"}",
";",
"private",
"Object",
"recipeItems",
"[",
"]",
"[",
"]",
";",
"public",
"RecipesArmor",
"(",
")",
"{",
"recipeItems",
"=",
"(",
"new",
"Object",
"[",
"]",
"[",
"]",
"{",
"new",
"Object",
"[",
"]",
"{",
"Item",
".",
"leather",
",",
"Block",
".",
"fire",
",",
"Item",
".",
"ingotIron",
",",
"Item",
".",
"diamond",
",",
"Item",
".",
"ingotGold",
"}",
",",
"new",
"Object",
"[",
"]",
"{",
"Item",
".",
"helmetLeather",
",",
"Item",
".",
"helmetChain",
",",
"Item",
".",
"helmetSteel",
",",
"Item",
".",
"helmetDiamond",
",",
"Item",
".",
"helmetGold",
"}",
",",
"new",
"Object",
"[",
"]",
"{",
"Item",
".",
"plateLeather",
",",
"Item",
".",
"plateChain",
",",
"Item",
".",
"plateSteel",
",",
"Item",
".",
"plateDiamond",
",",
"Item",
".",
"plateGold",
"}",
",",
"new",
"Object",
"[",
"]",
"{",
"Item",
".",
"legsLeather",
",",
"Item",
".",
"legsChain",
",",
"Item",
".",
"legsSteel",
",",
"Item",
".",
"legsDiamond",
",",
"Item",
".",
"legsGold",
"}",
",",
"new",
"Object",
"[",
"]",
"{",
"Item",
".",
"bootsLeather",
",",
"Item",
".",
"bootsChain",
",",
"Item",
".",
"bootsSteel",
",",
"Item",
".",
"bootsDiamond",
",",
"Item",
".",
"bootsGold",
"}",
"}",
")",
";",
"}",
"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",
"]",
",",
"'X'",
",",
"obj",
"}",
")",
";",
"}",
"}",
"}",
"}",
"</s>"
] |
9,472 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"class",
"ItemAxe",
"extends",
"ItemTool",
"{",
"private",
"static",
"Block",
"blocksEffectiveAgainst",
"[",
"]",
";",
"protected",
"ItemAxe",
"(",
"int",
"par1",
",",
"EnumToolMaterial",
"par2EnumToolMaterial",
")",
"{",
"super",
"(",
"par1",
",",
"3",
",",
"par2EnumToolMaterial",
",",
"blocksEffectiveAgainst",
")",
";",
"}",
"public",
"float",
"getStrVsBlock",
"(",
"ItemStack",
"par1ItemStack",
",",
"Block",
"par2Block",
")",
"{",
"if",
"(",
"par2Block",
"!=",
"null",
"&&",
"par2Block",
".",
"blockMaterial",
"==",
"Material",
".",
"wood",
")",
"{",
"return",
"efficiencyOnProperMaterial",
";",
"}",
"else",
"{",
"return",
"super",
".",
"getStrVsBlock",
"(",
"par1ItemStack",
",",
"par2Block",
")",
";",
"}",
"}",
"static",
"{",
"blocksEffectiveAgainst",
"=",
"(",
"new",
"Block",
"[",
"]",
"{",
"Block",
".",
"planks",
",",
"Block",
".",
"bookShelf",
",",
"Block",
".",
"wood",
",",
"Block",
".",
"chest",
",",
"Block",
".",
"stairDouble",
",",
"Block",
".",
"stairSingle",
",",
"Block",
".",
"pumpkin",
",",
"Block",
".",
"pumpkinLantern",
"}",
")",
";",
"}",
"}",
"</s>"
] |
9,473 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"*",
";",
"import",
"net",
".",
"minecraft",
".",
"server",
".",
"MinecraftServer",
";",
"public",
"class",
"EntityPlayerMP",
"extends",
"EntityPlayer",
"implements",
"ICrafting",
"{",
"public",
"NetServerHandler",
"playerNetServerHandler",
";",
"public",
"MinecraftServer",
"mcServer",
";",
"public",
"ItemInWorldManager",
"itemInWorldManager",
";",
"public",
"double",
"managedPosX",
";",
"public",
"double",
"managedPosZ",
";",
"public",
"List",
"loadedChunks",
";",
"public",
"Set",
"listeningChunks",
";",
"private",
"int",
"lastHealth",
";",
"private",
"int",
"field_35221_cc",
";",
"private",
"boolean",
"field_35222_cd",
";",
"private",
"int",
"lastExperience",
";",
"private",
"int",
"ticksOfInvuln",
";",
"private",
"ItemStack",
"playerInventory",
"[",
"]",
"=",
"{",
"null",
",",
"null",
",",
"null",
",",
"null",
",",
"null",
"}",
";",
"private",
"int",
"currentWindowId",
";",
"public",
"boolean",
"isChangingQuantityOnly",
";",
"public",
"int",
"ping",
";",
"public",
"boolean",
"gameOver",
";",
"public",
"EntityPlayerMP",
"(",
"MinecraftServer",
"par1MinecraftServer",
",",
"World",
"par2World",
",",
"String",
"par3Str",
",",
"ItemInWorldManager",
"par4ItemInWorldManager",
")",
"{",
"super",
"(",
"par2World",
")",
";",
"loadedChunks",
"=",
"new",
"LinkedList",
"(",
")",
";",
"listeningChunks",
"=",
"new",
"HashSet",
"(",
")",
";",
"lastHealth",
"=",
"0xfa0a1f01",
";",
"field_35221_cc",
"=",
"0xfa0a1f01",
";",
"field_35222_cd",
"=",
"true",
";",
"lastExperience",
"=",
"0xfa0a1f01",
";",
"ticksOfInvuln",
"=",
"60",
";",
"currentWindowId",
"=",
"0",
";",
"gameOver",
"=",
"false",
";",
"par4ItemInWorldManager",
".",
"thisPlayer",
"=",
"this",
";",
"itemInWorldManager",
"=",
"par4ItemInWorldManager",
";",
"ChunkCoordinates",
"chunkcoordinates",
"=",
"par2World",
".",
"getSpawnPoint",
"(",
")",
";",
"int",
"i",
"=",
"chunkcoordinates",
".",
"posX",
";",
"int",
"j",
"=",
"chunkcoordinates",
".",
"posZ",
";",
"int",
"k",
"=",
"chunkcoordinates",
".",
"posY",
";",
"if",
"(",
"!",
"par2World",
".",
"worldProvider",
".",
"hasNoSky",
")",
"{",
"i",
"+=",
"rand",
".",
"nextInt",
"(",
"20",
")",
"-",
"10",
";",
"k",
"=",
"par2World",
".",
"getTopSolidOrLiquidBlock",
"(",
"i",
",",
"j",
")",
";",
"j",
"+=",
"rand",
".",
"nextInt",
"(",
"20",
")",
"-",
"10",
";",
"}",
"setLocationAndAngles",
"(",
"(",
"double",
")",
"i",
"+",
"0.5D",
",",
"k",
",",
"(",
"double",
")",
"j",
"+",
"0.5D",
",",
"0.0F",
",",
"0.0F",
")",
";",
"mcServer",
"=",
"par1MinecraftServer",
";",
"stepHeight",
"=",
"0.0F",
";",
"username",
"=",
"par3Str",
";",
"yOffset",
"=",
"0.0F",
";",
"}",
"public",
"void",
"readEntityFromNBT",
"(",
"NBTTagCompound",
"par1NBTTagCompound",
")",
"{",
"super",
".",
"readEntityFromNBT",
"(",
"par1NBTTagCompound",
")",
";",
"if",
"(",
"par1NBTTagCompound",
".",
"hasKey",
"(",
"\"\"",
")",
")",
"{",
"itemInWorldManager",
".",
"toggleGameType",
"(",
"par1NBTTagCompound",
".",
"getInteger",
"(",
"\"\"",
")",
")",
";",
"}",
"}",
"public",
"void",
"writeEntityToNBT",
"(",
"NBTTagCompound",
"par1NBTTagCompound",
")",
"{",
"super",
".",
"writeEntityToNBT",
"(",
"par1NBTTagCompound",
")",
";",
"par1NBTTagCompound",
".",
"setInteger",
"(",
"\"\"",
",",
"itemInWorldManager",
".",
"getGameType",
"(",
")",
")",
";",
"}",
"public",
"void",
"setWorld",
"(",
"World",
"par1World",
")",
"{",
"super",
".",
"setWorld",
"(",
"par1World",
")",
";",
"}",
"public",
"void",
"removeExperience",
"(",
"int",
"par1",
")",
"{",
"super",
".",
"removeExperience",
"(",
"par1",
")",
";",
"lastExperience",
"=",
"-",
"1",
";",
"}",
"public",
"void",
"func_20057_k",
"(",
")",
"{",
"craftingInventory",
".",
"onCraftGuiOpened",
"(",
"this",
")",
";",
"}",
"public",
"ItemStack",
"[",
"]",
"getInventory",
"(",
")",
"{",
"return",
"playerInventory",
";",
"}",
"protected",
"void",
"resetHeight",
"(",
")",
"{",
"yOffset",
"=",
"0.0F",
";",
"}",
"public",
"float",
"getEyeHeight",
"(",
")",
"{",
"return",
"1.62F",
";",
"}",
"public",
"void",
"onUpdate",
"(",
")",
"{",
"itemInWorldManager",
".",
"updateBlockRemoving",
"(",
")",
";",
"ticksOfInvuln",
"--",
";",
"craftingInventory",
".",
"updateCraftingResults",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"5",
";",
"i",
"++",
")",
"{",
"ItemStack",
"itemstack",
"=",
"getEquipmentInSlot",
"(",
"i",
")",
";",
"if",
"(",
"itemstack",
"!=",
"playerInventory",
"[",
"i",
"]",
")",
"{",
"mcServer",
".",
"getEntityTracker",
"(",
"dimension",
")",
".",
"sendPacketToTrackedPlayers",
"(",
"this",
",",
"new",
"Packet5PlayerInventory",
"(",
"entityId",
",",
"i",
",",
"itemstack",
")",
")",
";",
"playerInventory",
"[",
"i",
"]",
"=",
"itemstack",
";",
"}",
"}",
"}",
"public",
"ItemStack",
"getEquipmentInSlot",
"(",
"int",
"par1",
")",
"{",
"if",
"(",
"par1",
"==",
"0",
")",
"{",
"return",
"inventory",
".",
"getCurrentItem",
"(",
")",
";",
"}",
"else",
"{",
"return",
"inventory",
".",
"armorInventory",
"[",
"par1",
"-",
"1",
"]",
";",
"}",
"}",
"public",
"void",
"onDeath",
"(",
"DamageSource",
"par1DamageSource",
")",
"{",
"mcServer",
".",
"configManager",
".",
"sendPacketToAllPlayers",
"(",
"new",
"Packet3Chat",
"(",
"par1DamageSource",
".",
"getDeathMessage",
"(",
"this",
")",
")",
")",
";",
"inventory",
".",
"dropAllItems",
"(",
")",
";",
"}",
"public",
"boolean",
"attackEntityFrom",
"(",
"DamageSource",
"par1DamageSource",
",",
"int",
"par2",
")",
"{",
"if",
"(",
"ticksOfInvuln",
">",
"0",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"!",
"mcServer",
".",
"pvpOn",
"&&",
"(",
"par1DamageSource",
"instanceof",
"EntityDamageSource",
")",
")",
"{",
"Entity",
"entity",
"=",
"par1DamageSource",
".",
"getEntity",
"(",
")",
";",
"if",
"(",
"entity",
"instanceof",
"EntityPlayer",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"entity",
"instanceof",
"EntityArrow",
")",
"{",
"EntityArrow",
"entityarrow",
"=",
"(",
"EntityArrow",
")",
"entity",
";",
"if",
"(",
"entityarrow",
".",
"shootingEntity",
"instanceof",
"EntityPlayer",
")",
"{",
"return",
"false",
";",
"}",
"}",
"}",
"return",
"super",
".",
"attackEntityFrom",
"(",
"par1DamageSource",
",",
"par2",
")",
";",
"}",
"protected",
"boolean",
"isPVPEnabled",
"(",
")",
"{",
"return",
"mcServer",
".",
"pvpOn",
";",
"}",
"public",
"void",
"heal",
"(",
"int",
"par1",
")",
"{",
"super",
".",
"heal",
"(",
"par1",
")",
";",
"}",
"public",
"void",
"onUpdateEntity",
"(",
"boolean",
"par1",
")",
"{",
"super",
".",
"onUpdate",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"inventory",
".",
"getSizeInventory",
"(",
")",
";",
"i",
"++",
")",
"{",
"ItemStack",
"itemstack",
"=",
"inventory",
".",
"getStackInSlot",
"(",
"i",
")",
";",
"if",
"(",
"itemstack",
"==",
"null",
"||",
"!",
"Item",
".",
"itemsList",
"[",
"itemstack",
".",
"itemID",
"]",
".",
"func_28019_b",
"(",
")",
"||",
"playerNetServerHandler",
".",
"getNumChunkDataPackets",
"(",
")",
">",
"2",
")",
"{",
"continue",
";",
"}",
"Packet",
"packet",
"=",
"(",
"(",
"ItemMapBase",
")",
"Item",
".",
"itemsList",
"[",
"itemstack",
".",
"itemID",
"]",
")",
".",
"getUpdatePacket",
"(",
"itemstack",
",",
"worldObj",
",",
"this",
")",
";",
"if",
"(",
"packet",
"!=",
"null",
")",
"{",
"playerNetServerHandler",
".",
"sendPacket",
"(",
"packet",
")",
";",
"}",
"}",
"if",
"(",
"par1",
"&&",
"!",
"loadedChunks",
".",
"isEmpty",
"(",
")",
")",
"{",
"ChunkCoordIntPair",
"chunkcoordintpair",
"=",
"(",
"ChunkCoordIntPair",
")",
"loadedChunks",
".",
"get",
"(",
"0",
")",
";",
"double",
"d",
"=",
"chunkcoordintpair",
".",
"func_48477_a",
"(",
"this",
")",
";",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
"loadedChunks",
".",
"size",
"(",
")",
";",
"j",
"++",
")",
"{",
"ChunkCoordIntPair",
"chunkcoordintpair1",
"=",
"(",
"ChunkCoordIntPair",
")",
"loadedChunks",
".",
"get",
"(",
"j",
")",
";",
"double",
"d1",
"=",
"chunkcoordintpair1",
".",
"func_48477_a",
"(",
"this",
")",
";",
"if",
"(",
"d1",
"<",
"d",
")",
"{",
"chunkcoordintpair",
"=",
"chunkcoordintpair1",
";",
"d",
"=",
"d1",
";",
"}",
"}",
"if",
"(",
"chunkcoordintpair",
"!=",
"null",
")",
"{",
"boolean",
"flag",
"=",
"false",
";",
"if",
"(",
"playerNetServerHandler",
".",
"getNumChunkDataPackets",
"(",
")",
"<",
"4",
")",
"{",
"flag",
"=",
"true",
";",
"}",
"if",
"(",
"flag",
")",
"{",
"WorldServer",
"worldserver",
"=",
"mcServer",
".",
"getWorldManager",
"(",
"dimension",
")",
";",
"if",
"(",
"worldserver",
".",
"blockExists",
"(",
"chunkcoordintpair",
".",
"chunkXPos",
"<<",
"4",
",",
"0",
",",
"chunkcoordintpair",
".",
"chunkZPos",
"<<",
"4",
")",
")",
"{",
"Chunk",
"chunk",
"=",
"worldserver",
".",
"getChunkFromChunkCoords",
"(",
"chunkcoordintpair",
".",
"chunkXPos",
",",
"chunkcoordintpair",
".",
"chunkZPos",
")",
";",
"if",
"(",
"chunk",
".",
"isTerrainPopulated",
")",
"{",
"loadedChunks",
".",
"remove",
"(",
"chunkcoordintpair",
")",
";",
"playerNetServerHandler",
".",
"sendPacket",
"(",
"new",
"Packet51MapChunk",
"(",
"worldserver",
".",
"getChunkFromChunkCoords",
"(",
"chunkcoordintpair",
".",
"chunkXPos",
",",
"chunkcoordintpair",
".",
"chunkZPos",
")",
",",
"true",
",",
"0",
")",
")",
";",
"List",
"list",
"=",
"worldserver",
".",
"getTileEntityList",
"(",
"chunkcoordintpair",
".",
"chunkXPos",
"*",
"16",
",",
"0",
",",
"chunkcoordintpair",
".",
"chunkZPos",
"*",
"16",
",",
"chunkcoordintpair",
".",
"chunkXPos",
"*",
"16",
"+",
"16",
",",
"256",
",",
"chunkcoordintpair",
".",
"chunkZPos",
"*",
"16",
"+",
"16",
")",
";",
"for",
"(",
"int",
"k",
"=",
"0",
";",
"k",
"<",
"list",
".",
"size",
"(",
")",
";",
"k",
"++",
")",
"{",
"getTileEntityInfo",
"(",
"(",
"TileEntity",
")",
"list",
".",
"get",
"(",
"k",
")",
")",
";",
"}",
"}",
"}",
"}",
"}",
"}",
"if",
"(",
"inPortal",
")",
"{",
"if",
"(",
"mcServer",
".",
"propertyManagerObj",
".",
"getBooleanProperty",
"(",
"\"allow-nether\"",
",",
"true",
")",
")",
"{",
"if",
"(",
"craftingInventory",
"!=",
"inventorySlots",
")",
"{",
"closeScreen",
"(",
")",
";",
"}",
"if",
"(",
"ridingEntity",
"!=",
"null",
")",
"{",
"mountEntity",
"(",
"ridingEntity",
")",
";",
"}",
"else",
"{",
"timeInPortal",
"+=",
"0.0125F",
";",
"if",
"(",
"timeInPortal",
">=",
"1.0F",
")",
"{",
"timeInPortal",
"=",
"1.0F",
";",
"timeUntilPortal",
"=",
"10",
";",
"byte",
"byte0",
"=",
"0",
";",
"if",
"(",
"dimension",
"==",
"-",
"1",
")",
"{",
"byte0",
"=",
"0",
";",
"}",
"else",
"{",
"byte0",
"=",
"-",
"1",
";",
"}",
"mcServer",
".",
"configManager",
".",
"sendPlayerToOtherDimension",
"(",
"this",
",",
"byte0",
")",
";",
"lastExperience",
"=",
"-",
"1",
";",
"lastHealth",
"=",
"-",
"1",
";",
"field_35221_cc",
"=",
"-",
"1",
";",
"triggerAchievement",
"(",
"AchievementList",
".",
"portal",
")",
";",
"}",
"}",
"inPortal",
"=",
"false",
";",
"}",
"}",
"else",
"{",
"if",
"(",
"timeInPortal",
">",
"0.0F",
")",
"{",
"timeInPortal",
"-=",
"0.05F",
";",
"}",
"if",
"(",
"timeInPortal",
"<",
"0.0F",
")",
"{",
"timeInPortal",
"=",
"0.0F",
";",
"}",
"}",
"if",
"(",
"timeUntilPortal",
">",
"0",
")",
"{",
"timeUntilPortal",
"--",
";",
"}",
"if",
"(",
"getHealth",
"(",
")",
"!=",
"lastHealth",
"||",
"field_35221_cc",
"!=",
"foodStats",
".",
"getFoodLevel",
"(",
")",
"||",
"(",
"foodStats",
".",
"getSaturationLevel",
"(",
")",
"==",
"0.0F",
")",
"!=",
"field_35222_cd",
")",
"{",
"playerNetServerHandler",
".",
"sendPacket",
"(",
"new",
"Packet8UpdateHealth",
"(",
"getHealth",
"(",
")",
",",
"foodStats",
".",
"getFoodLevel",
"(",
")",
",",
"foodStats",
".",
"getSaturationLevel",
"(",
")",
")",
")",
";",
"lastHealth",
"=",
"getHealth",
"(",
")",
";",
"field_35221_cc",
"=",
"foodStats",
".",
"getFoodLevel",
"(",
")",
";",
"field_35222_cd",
"=",
"foodStats",
".",
"getSaturationLevel",
"(",
")",
"==",
"0.0F",
";",
"}",
"if",
"(",
"experienceTotal",
"!=",
"lastExperience",
")",
"{",
"lastExperience",
"=",
"experienceTotal",
";",
"playerNetServerHandler",
".",
"sendPacket",
"(",
"new",
"Packet43Experience",
"(",
"experience",
",",
"experienceTotal",
",",
"experienceLevel",
")",
")",
";",
"}",
"}",
"public",
"void",
"travelToTheEnd",
"(",
"int",
"par1",
")",
"{",
"if",
"(",
"dimension",
"==",
"1",
"&&",
"par1",
"==",
"1",
")",
"{",
"triggerAchievement",
"(",
"AchievementList",
".",
"theEnd2",
")",
";",
"worldObj",
".",
"setEntityDead",
"(",
"this",
")",
";",
"gameOver",
"=",
"true",
";",
"playerNetServerHandler",
".",
"sendPacket",
"(",
"new",
"Packet70Bed",
"(",
"4",
",",
"0",
")",
")",
";",
"}",
"else",
"{",
"triggerAchievement",
"(",
"AchievementList",
".",
"theEnd",
")",
";",
"ChunkCoordinates",
"chunkcoordinates",
"=",
"mcServer",
".",
"getWorldManager",
"(",
"par1",
")",
".",
"getEntrancePortalLocation",
"(",
")",
";",
"if",
"(",
"chunkcoordinates",
"!=",
"null",
")",
"{",
"playerNetServerHandler",
".",
"teleportTo",
"(",
"chunkcoordinates",
".",
"posX",
",",
"chunkcoordinates",
".",
"posY",
",",
"chunkcoordinates",
".",
"posZ",
",",
"0.0F",
",",
"0.0F",
")",
";",
"}",
"mcServer",
".",
"configManager",
".",
"sendPlayerToOtherDimension",
"(",
"this",
",",
"1",
")",
";",
"lastExperience",
"=",
"-",
"1",
";",
"lastHealth",
"=",
"-",
"1",
";",
"field_35221_cc",
"=",
"-",
"1",
";",
"}",
"}",
"private",
"void",
"getTileEntityInfo",
"(",
"TileEntity",
"par1TileEntity",
")",
"{",
"if",
"(",
"par1TileEntity",
"!=",
"null",
")",
"{",
"Packet",
"packet",
"=",
"par1TileEntity",
".",
"getDescriptionPacket",
"(",
")",
";",
"if",
"(",
"packet",
"!=",
"null",
")",
"{",
"playerNetServerHandler",
".",
"sendPacket",
"(",
"packet",
")",
";",
"}",
"}",
"}",
"public",
"void",
"onItemPickup",
"(",
"Entity",
"par1Entity",
",",
"int",
"par2",
")",
"{",
"if",
"(",
"!",
"par1Entity",
".",
"isDead",
")",
"{",
"EntityTracker",
"entitytracker",
"=",
"mcServer",
".",
"getEntityTracker",
"(",
"dimension",
")",
";",
"if",
"(",
"par1Entity",
"instanceof",
"EntityItem",
")",
"{",
"entitytracker",
".",
"sendPacketToTrackedPlayers",
"(",
"par1Entity",
",",
"new",
"Packet22Collect",
"(",
"par1Entity",
".",
"entityId",
",",
"entityId",
")",
")",
";",
"}",
"if",
"(",
"par1Entity",
"instanceof",
"EntityArrow",
")",
"{",
"entitytracker",
".",
"sendPacketToTrackedPlayers",
"(",
"par1Entity",
",",
"new",
"Packet22Collect",
"(",
"par1Entity",
".",
"entityId",
",",
"entityId",
")",
")",
";",
"}",
"if",
"(",
"par1Entity",
"instanceof",
"EntityXPOrb",
")",
"{",
"entitytracker",
".",
"sendPacketToTrackedPlayers",
"(",
"par1Entity",
",",
"new",
"Packet22Collect",
"(",
"par1Entity",
".",
"entityId",
",",
"entityId",
")",
")",
";",
"}",
"}",
"super",
".",
"onItemPickup",
"(",
"par1Entity",
",",
"par2",
")",
";",
"craftingInventory",
".",
"updateCraftingResults",
"(",
")",
";",
"}",
"public",
"void",
"swingItem",
"(",
")",
"{",
"if",
"(",
"!",
"isSwinging",
")",
"{",
"swingProgressInt",
"=",
"-",
"1",
";",
"isSwinging",
"=",
"true",
";",
"EntityTracker",
"entitytracker",
"=",
"mcServer",
".",
"getEntityTracker",
"(",
"dimension",
")",
";",
"entitytracker",
".",
"sendPacketToTrackedPlayers",
"(",
"this",
",",
"new",
"Packet18Animation",
"(",
"this",
",",
"1",
")",
")",
";",
"}",
"}",
"public",
"void",
"func_22068_s",
"(",
")",
"{",
"}",
"public",
"EnumStatus",
"sleepInBedAt",
"(",
"int",
"par1",
",",
"int",
"par2",
",",
"int",
"par3",
")",
"{",
"EnumStatus",
"enumstatus",
"=",
"super",
".",
"sleepInBedAt",
"(",
"par1",
",",
"par2",
",",
"par3",
")",
";",
"if",
"(",
"enumstatus",
"==",
"EnumStatus",
".",
"OK",
")",
"{",
"EntityTracker",
"entitytracker",
"=",
"mcServer",
".",
"getEntityTracker",
"(",
"dimension",
")",
";",
"Packet17Sleep",
"packet17sleep",
"=",
"new",
"Packet17Sleep",
"(",
"this",
",",
"0",
",",
"par1",
",",
"par2",
",",
"par3",
")",
";",
"entitytracker",
".",
"sendPacketToTrackedPlayers",
"(",
"this",
",",
"packet17sleep",
")",
";",
"playerNetServerHandler",
".",
"teleportTo",
"(",
"posX",
",",
"posY",
",",
"posZ",
",",
"rotationYaw",
",",
"rotationPitch",
")",
";",
"playerNetServerHandler",
".",
"sendPacket",
"(",
"packet17sleep",
")",
";",
"}",
"return",
"enumstatus",
";",
"}",
"public",
"void",
"wakeUpPlayer",
"(",
"boolean",
"par1",
",",
"boolean",
"par2",
",",
"boolean",
"par3",
")",
"{",
"if",
"(",
"isPlayerSleeping",
"(",
")",
")",
"{",
"EntityTracker",
"entitytracker",
"=",
"mcServer",
".",
"getEntityTracker",
"(",
"dimension",
")",
";",
"entitytracker",
".",
"sendPacketToTrackedPlayersAndTrackedEntity",
"(",
"this",
",",
"new",
"Packet18Animation",
"(",
"this",
",",
"3",
")",
")",
";",
"}",
"super",
".",
"wakeUpPlayer",
"(",
"par1",
",",
"par2",
",",
"par3",
")",
";",
"if",
"(",
"playerNetServerHandler",
"!=",
"null",
")",
"{",
"playerNetServerHandler",
".",
"teleportTo",
"(",
"posX",
",",
"posY",
",",
"posZ",
",",
"rotationYaw",
",",
"rotationPitch",
")",
";",
"}",
"}",
"public",
"void",
"mountEntity",
"(",
"Entity",
"par1Entity",
")",
"{",
"super",
".",
"mountEntity",
"(",
"par1Entity",
")",
";",
"playerNetServerHandler",
".",
"sendPacket",
"(",
"new",
"Packet39AttachEntity",
"(",
"this",
",",
"ridingEntity",
")",
")",
";",
"playerNetServerHandler",
".",
"teleportTo",
"(",
"posX",
",",
"posY",
",",
"posZ",
",",
"rotationYaw",
",",
"rotationPitch",
")",
";",
"}",
"protected",
"void",
"updateFallState",
"(",
"double",
"d",
",",
"boolean",
"flag",
")",
"{",
"}",
"public",
"void",
"handleFalling",
"(",
"double",
"par1",
",",
"boolean",
"par3",
")",
"{",
"super",
".",
"updateFallState",
"(",
"par1",
",",
"par3",
")",
";",
"}",
"private",
"void",
"getNextWidowId",
"(",
")",
"{",
"currentWindowId",
"=",
"currentWindowId",
"%",
"100",
"+",
"1",
";",
"}",
"public",
"void",
"displayWorkbenchGUI",
"(",
"int",
"par1",
",",
"int",
"par2",
",",
"int",
"par3",
")",
"{",
"getNextWidowId",
"(",
")",
";",
"playerNetServerHandler",
".",
"sendPacket",
"(",
"new",
"Packet100OpenWindow",
"(",
"currentWindowId",
",",
"1",
",",
"\"Crafting\"",
",",
"9",
")",
")",
";",
"craftingInventory",
"=",
"new",
"ContainerWorkbench",
"(",
"inventory",
",",
"worldObj",
",",
"par1",
",",
"par2",
",",
"par3",
")",
";",
"craftingInventory",
".",
"windowId",
"=",
"currentWindowId",
";",
"craftingInventory",
".",
"onCraftGuiOpened",
"(",
"this",
")",
";",
"}",
"public",
"void",
"displayGUIEnchantment",
"(",
"int",
"par1",
",",
"int",
"par2",
",",
"int",
"par3",
")",
"{",
"getNextWidowId",
"(",
")",
";",
"playerNetServerHandler",
".",
"sendPacket",
"(",
"new",
"Packet100OpenWindow",
"(",
"currentWindowId",
",",
"4",
",",
"\"Enchanting\"",
",",
"9",
")",
")",
";",
"craftingInventory",
"=",
"new",
"ContainerEnchantment",
"(",
"inventory",
",",
"worldObj",
",",
"par1",
",",
"par2",
",",
"par3",
")",
";",
"craftingInventory",
".",
"windowId",
"=",
"currentWindowId",
";",
"craftingInventory",
".",
"onCraftGuiOpened",
"(",
"this",
")",
";",
"}",
"public",
"void",
"displayGUIChest",
"(",
"IInventory",
"par1IInventory",
")",
"{",
"getNextWidowId",
"(",
")",
";",
"playerNetServerHandler",
".",
"sendPacket",
"(",
"new",
"Packet100OpenWindow",
"(",
"currentWindowId",
",",
"0",
",",
"par1IInventory",
".",
"getInvName",
"(",
")",
",",
"par1IInventory",
".",
"getSizeInventory",
"(",
")",
")",
")",
";",
"craftingInventory",
"=",
"new",
"ContainerChest",
"(",
"inventory",
",",
"par1IInventory",
")",
";",
"craftingInventory",
".",
"windowId",
"=",
"currentWindowId",
";",
"craftingInventory",
".",
"onCraftGuiOpened",
"(",
"this",
")",
";",
"}",
"public",
"void",
"displayGUIFurnace",
"(",
"TileEntityFurnace",
"par1TileEntityFurnace",
")",
"{",
"getNextWidowId",
"(",
")",
";",
"playerNetServerHandler",
".",
"sendPacket",
"(",
"new",
"Packet100OpenWindow",
"(",
"currentWindowId",
",",
"2",
",",
"par1TileEntityFurnace",
".",
"getInvName",
"(",
")",
",",
"par1TileEntityFurnace",
".",
"getSizeInventory",
"(",
")",
")",
")",
";",
"craftingInventory",
"=",
"new",
"ContainerFurnace",
"(",
"inventory",
",",
"par1TileEntityFurnace",
")",
";",
"craftingInventory",
".",
"windowId",
"=",
"currentWindowId",
";",
"craftingInventory",
".",
"onCraftGuiOpened",
"(",
"this",
")",
";",
"}",
"public",
"void",
"displayGUIDispenser",
"(",
"TileEntityDispenser",
"par1TileEntityDispenser",
")",
"{",
"getNextWidowId",
"(",
")",
";",
"playerNetServerHandler",
".",
"sendPacket",
"(",
"new",
"Packet100OpenWindow",
"(",
"currentWindowId",
",",
"3",
",",
"par1TileEntityDispenser",
".",
"getInvName",
"(",
")",
",",
"par1TileEntityDispenser",
".",
"getSizeInventory",
"(",
")",
")",
")",
";",
"craftingInventory",
"=",
"new",
"ContainerDispenser",
"(",
"inventory",
",",
"par1TileEntityDispenser",
")",
";",
"craftingInventory",
".",
"windowId",
"=",
"currentWindowId",
";",
"craftingInventory",
".",
"onCraftGuiOpened",
"(",
"this",
")",
";",
"}",
"public",
"void",
"displayGUIBrewingStand",
"(",
"TileEntityBrewingStand",
"par1TileEntityBrewingStand",
")",
"{",
"getNextWidowId",
"(",
")",
";",
"playerNetServerHandler",
".",
"sendPacket",
"(",
"new",
"Packet100OpenWindow",
"(",
"currentWindowId",
",",
"5",
",",
"par1TileEntityBrewingStand",
".",
"getInvName",
"(",
")",
",",
"par1TileEntityBrewingStand",
".",
"getSizeInventory",
"(",
")",
")",
")",
";",
"craftingInventory",
"=",
"new",
"ContainerBrewingStand",
"(",
"inventory",
",",
"par1TileEntityBrewingStand",
")",
";",
"craftingInventory",
".",
"windowId",
"=",
"currentWindowId",
";",
"craftingInventory",
".",
"onCraftGuiOpened",
"(",
"this",
")",
";",
"}",
"public",
"void",
"updateCraftingInventorySlot",
"(",
"Container",
"par1Container",
",",
"int",
"par2",
",",
"ItemStack",
"par3ItemStack",
")",
"{",
"if",
"(",
"par1Container",
".",
"getSlot",
"(",
"par2",
")",
"instanceof",
"SlotCrafting",
")",
"{",
"return",
";",
"}",
"if",
"(",
"isChangingQuantityOnly",
")",
"{",
"return",
";",
"}",
"else",
"{",
"playerNetServerHandler",
".",
"sendPacket",
"(",
"new",
"Packet103SetSlot",
"(",
"par1Container",
".",
"windowId",
",",
"par2",
",",
"par3ItemStack",
")",
")",
";",
"return",
";",
"}",
"}",
"public",
"void",
"func_28017_a",
"(",
"Container",
"par1Container",
")",
"{",
"updateCraftingInventory",
"(",
"par1Container",
",",
"par1Container",
".",
"func_28127_b",
"(",
")",
")",
";",
"}",
"public",
"void",
"updateCraftingInventory",
"(",
"Container",
"par1Container",
",",
"List",
"par2List",
")",
"{",
"playerNetServerHandler",
".",
"sendPacket",
"(",
"new",
"Packet104WindowItems",
"(",
"par1Container",
".",
"windowId",
",",
"par2List",
")",
")",
";",
"playerNetServerHandler",
".",
"sendPacket",
"(",
"new",
"Packet103SetSlot",
"(",
"-",
"1",
",",
"-",
"1",
",",
"inventory",
".",
"getItemStack",
"(",
")",
")",
")",
";",
"}",
"public",
"void",
"updateCraftingInventoryInfo",
"(",
"Container",
"par1Container",
",",
"int",
"par2",
",",
"int",
"par3",
")",
"{",
"playerNetServerHandler",
".",
"sendPacket",
"(",
"new",
"Packet105UpdateProgressbar",
"(",
"par1Container",
".",
"windowId",
",",
"par2",
",",
"par3",
")",
")",
";",
"}",
"public",
"void",
"onItemStackChanged",
"(",
"ItemStack",
"itemstack",
")",
"{",
"}",
"public",
"void",
"closeScreen",
"(",
")",
"{",
"playerNetServerHandler",
".",
"sendPacket",
"(",
"new",
"Packet101CloseWindow",
"(",
"craftingInventory",
".",
"windowId",
")",
")",
";",
"closeCraftingGui",
"(",
")",
";",
"}",
"public",
"void",
"updateHeldItem",
"(",
")",
"{",
"if",
"(",
"isChangingQuantityOnly",
")",
"{",
"return",
";",
"}",
"else",
"{",
"playerNetServerHandler",
".",
"sendPacket",
"(",
"new",
"Packet103SetSlot",
"(",
"-",
"1",
",",
"-",
"1",
",",
"inventory",
".",
"getItemStack",
"(",
")",
")",
")",
";",
"return",
";",
"}",
"}",
"public",
"void",
"closeCraftingGui",
"(",
")",
"{",
"craftingInventory",
".",
"onCraftGuiClosed",
"(",
"this",
")",
";",
"craftingInventory",
"=",
"inventorySlots",
";",
"}",
"public",
"void",
"addStat",
"(",
"StatBase",
"par1StatBase",
",",
"int",
"par2",
")",
"{",
"if",
"(",
"par1StatBase",
"==",
"null",
")",
"{",
"return",
";",
"}",
"if",
"(",
"!",
"par1StatBase",
".",
"isIndependent",
")",
"{",
"for",
"(",
";",
"par2",
">",
"100",
";",
"par2",
"-=",
"100",
")",
"{",
"playerNetServerHandler",
".",
"sendPacket",
"(",
"new",
"Packet200Statistic",
"(",
"par1StatBase",
".",
"statId",
",",
"100",
")",
")",
";",
"}",
"playerNetServerHandler",
".",
"sendPacket",
"(",
"new",
"Packet200Statistic",
"(",
"par1StatBase",
".",
"statId",
",",
"par2",
")",
")",
";",
"}",
"}",
"public",
"void",
"func_30002_A",
"(",
")",
"{",
"if",
"(",
"ridingEntity",
"!=",
"null",
")",
"{",
"mountEntity",
"(",
"ridingEntity",
")",
";",
"}",
"if",
"(",
"riddenByEntity",
"!=",
"null",
")",
"{",
"riddenByEntity",
".",
"mountEntity",
"(",
"this",
")",
";",
"}",
"if",
"(",
"sleeping",
")",
"{",
"wakeUpPlayer",
"(",
"true",
",",
"false",
",",
"false",
")",
";",
"}",
"}",
"public",
"void",
"func_30001_B",
"(",
")",
"{",
"lastHealth",
"=",
"0xfa0a1f01",
";",
"}",
"public",
"void",
"addChatMessage",
"(",
"String",
"par1Str",
")",
"{",
"StringTranslate",
"stringtranslate",
"=",
"StringTranslate",
".",
"getInstance",
"(",
")",
";",
"String",
"s",
"=",
"stringtranslate",
".",
"translateKey",
"(",
"par1Str",
")",
";",
"playerNetServerHandler",
".",
"sendPacket",
"(",
"new",
"Packet3Chat",
"(",
"s",
")",
")",
";",
"}",
"protected",
"void",
"onItemUseFinish",
"(",
")",
"{",
"playerNetServerHandler",
".",
"sendPacket",
"(",
"new",
"Packet38EntityStatus",
"(",
"entityId",
",",
"(",
"byte",
")",
"9",
")",
")",
";",
"super",
".",
"onItemUseFinish",
"(",
")",
";",
"}",
"public",
"void",
"setItemInUse",
"(",
"ItemStack",
"par1ItemStack",
",",
"int",
"par2",
")",
"{",
"super",
".",
"setItemInUse",
"(",
"par1ItemStack",
",",
"par2",
")",
";",
"if",
"(",
"par1ItemStack",
"!=",
"null",
"&&",
"par1ItemStack",
".",
"getItem",
"(",
")",
"!=",
"null",
"&&",
"par1ItemStack",
".",
"getItem",
"(",
")",
".",
"getItemUseAction",
"(",
"par1ItemStack",
")",
"==",
"EnumAction",
".",
"eat",
")",
"{",
"EntityTracker",
"entitytracker",
"=",
"mcServer",
".",
"getEntityTracker",
"(",
"dimension",
")",
";",
"entitytracker",
".",
"sendPacketToTrackedPlayersAndTrackedEntity",
"(",
"this",
",",
"new",
"Packet18Animation",
"(",
"this",
",",
"5",
")",
")",
";",
"}",
"}",
"protected",
"void",
"onNewPotionEffect",
"(",
"PotionEffect",
"par1PotionEffect",
")",
"{",
"super",
".",
"onNewPotionEffect",
"(",
"par1PotionEffect",
")",
";",
"playerNetServerHandler",
".",
"sendPacket",
"(",
"new",
"Packet41EntityEffect",
"(",
"entityId",
",",
"par1PotionEffect",
")",
")",
";",
"}",
"protected",
"void",
"onChangedPotionEffect",
"(",
"PotionEffect",
"par1PotionEffect",
")",
"{",
"super",
".",
"onChangedPotionEffect",
"(",
"par1PotionEffect",
")",
";",
"playerNetServerHandler",
".",
"sendPacket",
"(",
"new",
"Packet41EntityEffect",
"(",
"entityId",
",",
"par1PotionEffect",
")",
")",
";",
"}",
"protected",
"void",
"onFinishedPotionEffect",
"(",
"PotionEffect",
"par1PotionEffect",
")",
"{",
"super",
".",
"onFinishedPotionEffect",
"(",
"par1PotionEffect",
")",
";",
"playerNetServerHandler",
".",
"sendPacket",
"(",
"new",
"Packet42RemoveEntityEffect",
"(",
"entityId",
",",
"par1PotionEffect",
")",
")",
";",
"}",
"public",
"void",
"setPositionAndUpdate",
"(",
"double",
"par1",
",",
"double",
"par3",
",",
"double",
"par5",
")",
"{",
"playerNetServerHandler",
".",
"teleportTo",
"(",
"par1",
",",
"par3",
",",
"par5",
",",
"rotationYaw",
",",
"rotationPitch",
")",
";",
"}",
"public",
"void",
"onCriticalHit",
"(",
"Entity",
"par1Entity",
")",
"{",
"EntityTracker",
"entitytracker",
"=",
"mcServer",
".",
"getEntityTracker",
"(",
"dimension",
")",
";",
"entitytracker",
".",
"sendPacketToTrackedPlayersAndTrackedEntity",
"(",
"this",
",",
"new",
"Packet18Animation",
"(",
"par1Entity",
",",
"6",
")",
")",
";",
"}",
"public",
"void",
"onEnchantmentCritical",
"(",
"Entity",
"par1Entity",
")",
"{",
"EntityTracker",
"entitytracker",
"=",
"mcServer",
".",
"getEntityTracker",
"(",
"dimension",
")",
";",
"entitytracker",
".",
"sendPacketToTrackedPlayersAndTrackedEntity",
"(",
"this",
",",
"new",
"Packet18Animation",
"(",
"par1Entity",
",",
"7",
")",
")",
";",
"}",
"public",
"void",
"func_50022_L",
"(",
")",
"{",
"if",
"(",
"playerNetServerHandler",
"==",
"null",
")",
"{",
"return",
";",
"}",
"else",
"{",
"playerNetServerHandler",
".",
"sendPacket",
"(",
"new",
"Packet202PlayerAbilities",
"(",
"capabilities",
")",
")",
";",
"return",
";",
"}",
"}",
"}",
"</s>"
] |
9,474 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"BlockCactus",
"extends",
"Block",
"{",
"protected",
"BlockCactus",
"(",
"int",
"par1",
",",
"int",
"par2",
")",
"{",
"super",
"(",
"par1",
",",
"par2",
",",
"Material",
".",
"cactus",
")",
";",
"setTickRandomly",
"(",
"true",
")",
";",
"}",
"public",
"void",
"updateTick",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"Random",
"par5Random",
")",
"{",
"if",
"(",
"par1World",
".",
"isAirBlock",
"(",
"par2",
",",
"par3",
"+",
"1",
",",
"par4",
")",
")",
"{",
"int",
"i",
";",
"for",
"(",
"i",
"=",
"1",
";",
"par1World",
".",
"getBlockId",
"(",
"par2",
",",
"par3",
"-",
"i",
",",
"par4",
")",
"==",
"blockID",
";",
"i",
"++",
")",
"{",
"}",
"if",
"(",
"i",
"<",
"3",
")",
"{",
"int",
"j",
"=",
"par1World",
".",
"getBlockMetadata",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"if",
"(",
"j",
"==",
"15",
")",
"{",
"par1World",
".",
"setBlockWithNotify",
"(",
"par2",
",",
"par3",
"+",
"1",
",",
"par4",
",",
"blockID",
")",
";",
"par1World",
".",
"setBlockMetadataWithNotify",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"0",
")",
";",
"}",
"else",
"{",
"par1World",
".",
"setBlockMetadataWithNotify",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"j",
"+",
"1",
")",
";",
"}",
"}",
"}",
"}",
"public",
"AxisAlignedBB",
"getCollisionBoundingBoxFromPool",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"float",
"f",
"=",
"0.0625F",
";",
"return",
"AxisAlignedBB",
".",
"getBoundingBoxFromPool",
"(",
"(",
"float",
")",
"par2",
"+",
"f",
",",
"par3",
",",
"(",
"float",
")",
"par4",
"+",
"f",
",",
"(",
"float",
")",
"(",
"par2",
"+",
"1",
")",
"-",
"f",
",",
"(",
"float",
")",
"(",
"par3",
"+",
"1",
")",
"-",
"f",
",",
"(",
"float",
")",
"(",
"par4",
"+",
"1",
")",
"-",
"f",
")",
";",
"}",
"public",
"int",
"getBlockTextureFromSide",
"(",
"int",
"par1",
")",
"{",
"if",
"(",
"par1",
"==",
"1",
")",
"{",
"return",
"blockIndexInTexture",
"-",
"1",
";",
"}",
"if",
"(",
"par1",
"==",
"0",
")",
"{",
"return",
"blockIndexInTexture",
"+",
"1",
";",
"}",
"else",
"{",
"return",
"blockIndexInTexture",
";",
"}",
"}",
"public",
"boolean",
"renderAsNormalBlock",
"(",
")",
"{",
"return",
"false",
";",
"}",
"public",
"boolean",
"isOpaqueCube",
"(",
")",
"{",
"return",
"false",
";",
"}",
"public",
"int",
"getRenderType",
"(",
")",
"{",
"return",
"13",
";",
"}",
"public",
"boolean",
"canPlaceBlockAt",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"if",
"(",
"!",
"super",
".",
"canPlaceBlockAt",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
")",
")",
"{",
"return",
"false",
";",
"}",
"else",
"{",
"return",
"canBlockStay",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"}",
"}",
"public",
"void",
"onNeighborBlockChange",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
")",
"{",
"if",
"(",
"!",
"canBlockStay",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
")",
")",
"{",
"dropBlockAsItem",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
",",
"par1World",
".",
"getBlockMetadata",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
",",
"0",
")",
";",
"par1World",
".",
"setBlockWithNotify",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"0",
")",
";",
"}",
"}",
"public",
"boolean",
"canBlockStay",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"if",
"(",
"par1World",
".",
"getBlockMaterial",
"(",
"par2",
"-",
"1",
",",
"par3",
",",
"par4",
")",
".",
"isSolid",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"par1World",
".",
"getBlockMaterial",
"(",
"par2",
"+",
"1",
",",
"par3",
",",
"par4",
")",
".",
"isSolid",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"par1World",
".",
"getBlockMaterial",
"(",
"par2",
",",
"par3",
",",
"par4",
"-",
"1",
")",
".",
"isSolid",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"par1World",
".",
"getBlockMaterial",
"(",
"par2",
",",
"par3",
",",
"par4",
"+",
"1",
")",
".",
"isSolid",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",
"else",
"{",
"int",
"i",
"=",
"par1World",
".",
"getBlockId",
"(",
"par2",
",",
"par3",
"-",
"1",
",",
"par4",
")",
";",
"return",
"i",
"==",
"Block",
".",
"cactus",
".",
"blockID",
"||",
"i",
"==",
"Block",
".",
"sand",
".",
"blockID",
";",
"}",
"}",
"public",
"void",
"onEntityCollidedWithBlock",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"Entity",
"par5Entity",
")",
"{",
"par5Entity",
".",
"attackEntityFrom",
"(",
"DamageSource",
".",
"cactus",
",",
"1",
")",
";",
"}",
"}",
"</s>"
] |
9,475 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"class",
"MaterialLogic",
"extends",
"Material",
"{",
"public",
"MaterialLogic",
"(",
"MapColor",
"par1MapColor",
")",
"{",
"super",
"(",
"par1MapColor",
")",
";",
"}",
"public",
"boolean",
"isSolid",
"(",
")",
"{",
"return",
"false",
";",
"}",
"public",
"boolean",
"getCanBlockGrass",
"(",
")",
"{",
"return",
"false",
";",
"}",
"public",
"boolean",
"blocksMovement",
"(",
")",
"{",
"return",
"false",
";",
"}",
"}",
"</s>"
] |
9,476 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"io",
".",
"*",
";",
"public",
"class",
"Packet42RemoveEntityEffect",
"extends",
"Packet",
"{",
"public",
"int",
"entityId",
";",
"public",
"byte",
"effectId",
";",
"public",
"Packet42RemoveEntityEffect",
"(",
")",
"{",
"}",
"public",
"Packet42RemoveEntityEffect",
"(",
"int",
"par1",
",",
"PotionEffect",
"par2PotionEffect",
")",
"{",
"entityId",
"=",
"par1",
";",
"effectId",
"=",
"(",
"byte",
")",
"(",
"par2PotionEffect",
".",
"getPotionID",
"(",
")",
"&",
"0xff",
")",
";",
"}",
"public",
"void",
"readPacketData",
"(",
"DataInputStream",
"par1DataInputStream",
")",
"throws",
"IOException",
"{",
"entityId",
"=",
"par1DataInputStream",
".",
"readInt",
"(",
")",
";",
"effectId",
"=",
"par1DataInputStream",
".",
"readByte",
"(",
")",
";",
"}",
"public",
"void",
"writePacketData",
"(",
"DataOutputStream",
"par1DataOutputStream",
")",
"throws",
"IOException",
"{",
"par1DataOutputStream",
".",
"writeInt",
"(",
"entityId",
")",
";",
"par1DataOutputStream",
".",
"writeByte",
"(",
"effectId",
")",
";",
"}",
"public",
"void",
"processPacket",
"(",
"NetHandler",
"par1NetHandler",
")",
"{",
"par1NetHandler",
".",
"handleRemoveEntityEffect",
"(",
"this",
")",
";",
"}",
"public",
"int",
"getPacketSize",
"(",
")",
"{",
"return",
"5",
";",
"}",
"}",
"</s>"
] |
9,477 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"class",
"Facing",
"{",
"public",
"static",
"final",
"int",
"faceToSide",
"[",
"]",
"=",
"{",
"1",
",",
"0",
",",
"3",
",",
"2",
",",
"5",
",",
"4",
"}",
";",
"public",
"static",
"final",
"int",
"offsetsXForSide",
"[",
"]",
"=",
"{",
"0",
",",
"0",
",",
"0",
",",
"0",
",",
"-",
"1",
",",
"1",
"}",
";",
"public",
"static",
"final",
"int",
"offsetsYForSide",
"[",
"]",
"=",
"{",
"-",
"1",
",",
"1",
",",
"0",
",",
"0",
",",
"0",
",",
"0",
"}",
";",
"public",
"static",
"final",
"int",
"offsetsZForSide",
"[",
"]",
"=",
"{",
"0",
",",
"0",
",",
"-",
"1",
",",
"1",
",",
"0",
",",
"0",
"}",
";",
"public",
"Facing",
"(",
")",
"{",
"}",
"}",
"</s>"
] |
9,478 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"EntityAIFleeSun",
"extends",
"EntityAIBase",
"{",
"private",
"EntityCreature",
"theCreature",
";",
"private",
"double",
"shelterX",
";",
"private",
"double",
"shelterY",
";",
"private",
"double",
"shelterZ",
";",
"private",
"float",
"field_48257_e",
";",
"private",
"World",
"theWorld",
";",
"public",
"EntityAIFleeSun",
"(",
"EntityCreature",
"par1EntityCreature",
",",
"float",
"par2",
")",
"{",
"theCreature",
"=",
"par1EntityCreature",
";",
"field_48257_e",
"=",
"par2",
";",
"theWorld",
"=",
"par1EntityCreature",
".",
"worldObj",
";",
"setMutexBits",
"(",
"1",
")",
";",
"}",
"public",
"boolean",
"shouldExecute",
"(",
")",
"{",
"if",
"(",
"!",
"theWorld",
".",
"isDaytime",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"!",
"theCreature",
".",
"isBurning",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"!",
"theWorld",
".",
"canBlockSeeTheSky",
"(",
"MathHelper",
".",
"floor_double",
"(",
"theCreature",
".",
"posX",
")",
",",
"(",
"int",
")",
"theCreature",
".",
"boundingBox",
".",
"minY",
",",
"MathHelper",
".",
"floor_double",
"(",
"theCreature",
".",
"posZ",
")",
")",
")",
"{",
"return",
"false",
";",
"}",
"Vec3D",
"vec3d",
"=",
"findPossibleShelter",
"(",
")",
";",
"if",
"(",
"vec3d",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"else",
"{",
"shelterX",
"=",
"vec3d",
".",
"xCoord",
";",
"shelterY",
"=",
"vec3d",
".",
"yCoord",
";",
"shelterZ",
"=",
"vec3d",
".",
"zCoord",
";",
"return",
"true",
";",
"}",
"}",
"public",
"boolean",
"continueExecuting",
"(",
")",
"{",
"return",
"!",
"theCreature",
".",
"getNavigator",
"(",
")",
".",
"noPath",
"(",
")",
";",
"}",
"public",
"void",
"startExecuting",
"(",
")",
"{",
"theCreature",
".",
"getNavigator",
"(",
")",
".",
"func_48658_a",
"(",
"shelterX",
",",
"shelterY",
",",
"shelterZ",
",",
"field_48257_e",
")",
";",
"}",
"private",
"Vec3D",
"findPossibleShelter",
"(",
")",
"{",
"Random",
"random",
"=",
"theCreature",
".",
"getRNG",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"10",
";",
"i",
"++",
")",
"{",
"int",
"j",
"=",
"MathHelper",
".",
"floor_double",
"(",
"(",
"theCreature",
".",
"posX",
"+",
"(",
"double",
")",
"random",
".",
"nextInt",
"(",
"20",
")",
")",
"-",
"10D",
")",
";",
"int",
"k",
"=",
"MathHelper",
".",
"floor_double",
"(",
"(",
"theCreature",
".",
"boundingBox",
".",
"minY",
"+",
"(",
"double",
")",
"random",
".",
"nextInt",
"(",
"6",
")",
")",
"-",
"3D",
")",
";",
"int",
"l",
"=",
"MathHelper",
".",
"floor_double",
"(",
"(",
"theCreature",
".",
"posZ",
"+",
"(",
"double",
")",
"random",
".",
"nextInt",
"(",
"20",
")",
")",
"-",
"10D",
")",
";",
"if",
"(",
"!",
"theWorld",
".",
"canBlockSeeTheSky",
"(",
"j",
",",
"k",
",",
"l",
")",
"&&",
"theCreature",
".",
"getBlockPathWeight",
"(",
"j",
",",
"k",
",",
"l",
")",
"<",
"0.0F",
")",
"{",
"return",
"Vec3D",
".",
"createVector",
"(",
"j",
",",
"k",
",",
"l",
")",
";",
"}",
"}",
"return",
"null",
";",
"}",
"}",
"</s>"
] |
9,479 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"class",
"BlockSoulSand",
"extends",
"Block",
"{",
"public",
"BlockSoulSand",
"(",
"int",
"par1",
",",
"int",
"par2",
")",
"{",
"super",
"(",
"par1",
",",
"par2",
",",
"Material",
".",
"sand",
")",
";",
"}",
"public",
"AxisAlignedBB",
"getCollisionBoundingBoxFromPool",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"float",
"f",
"=",
"0.125F",
";",
"return",
"AxisAlignedBB",
".",
"getBoundingBoxFromPool",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"par2",
"+",
"1",
",",
"(",
"float",
")",
"(",
"par3",
"+",
"1",
")",
"-",
"f",
",",
"par4",
"+",
"1",
")",
";",
"}",
"public",
"void",
"onEntityCollidedWithBlock",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"Entity",
"par5Entity",
")",
"{",
"par5Entity",
".",
"motionX",
"*=",
"0.40000000000000002D",
";",
"par5Entity",
".",
"motionZ",
"*=",
"0.40000000000000002D",
";",
"}",
"}",
"</s>"
] |
9,480 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"class",
"EntityAISit",
"extends",
"EntityAIBase",
"{",
"private",
"EntityTameable",
"theEntity",
";",
"private",
"boolean",
"field_48211_b",
";",
"public",
"EntityAISit",
"(",
"EntityTameable",
"par1EntityTameable",
")",
"{",
"field_48211_b",
"=",
"false",
";",
"theEntity",
"=",
"par1EntityTameable",
";",
"setMutexBits",
"(",
"5",
")",
";",
"}",
"public",
"boolean",
"shouldExecute",
"(",
")",
"{",
"if",
"(",
"!",
"theEntity",
".",
"isTamed",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"theEntity",
".",
"isInWater",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"!",
"theEntity",
".",
"onGround",
")",
"{",
"return",
"false",
";",
"}",
"EntityLiving",
"entityliving",
"=",
"theEntity",
".",
"getOwner",
"(",
")",
";",
"if",
"(",
"entityliving",
"==",
"null",
")",
"{",
"return",
"true",
";",
"}",
"if",
"(",
"theEntity",
".",
"getDistanceSqToEntity",
"(",
"entityliving",
")",
"<",
"144D",
"&&",
"entityliving",
".",
"getAITarget",
"(",
")",
"!=",
"null",
")",
"{",
"return",
"false",
";",
"}",
"else",
"{",
"return",
"field_48211_b",
";",
"}",
"}",
"public",
"void",
"startExecuting",
"(",
")",
"{",
"theEntity",
".",
"getNavigator",
"(",
")",
".",
"clearPathEntity",
"(",
")",
";",
"theEntity",
".",
"func_48369_c",
"(",
"true",
")",
";",
"}",
"public",
"void",
"resetTask",
"(",
")",
"{",
"theEntity",
".",
"func_48369_c",
"(",
"false",
")",
";",
"}",
"public",
"void",
"func_48210_a",
"(",
"boolean",
"par1",
")",
"{",
"field_48211_b",
"=",
"par1",
";",
"}",
"}",
"</s>"
] |
9,481 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"class",
"BiomeCacheBlock",
"{",
"public",
"float",
"temperatureValues",
"[",
"]",
";",
"public",
"float",
"rainfallValues",
"[",
"]",
";",
"public",
"BiomeGenBase",
"biomes",
"[",
"]",
";",
"public",
"int",
"xPosition",
";",
"public",
"int",
"zPosition",
";",
"public",
"long",
"lastAccessTime",
";",
"final",
"BiomeCache",
"biomeCache",
";",
"public",
"BiomeCacheBlock",
"(",
"BiomeCache",
"par1BiomeCache",
",",
"int",
"par2",
",",
"int",
"par3",
")",
"{",
"biomeCache",
"=",
"par1BiomeCache",
";",
"temperatureValues",
"=",
"new",
"float",
"[",
"256",
"]",
";",
"rainfallValues",
"=",
"new",
"float",
"[",
"256",
"]",
";",
"biomes",
"=",
"new",
"BiomeGenBase",
"[",
"256",
"]",
";",
"xPosition",
"=",
"par2",
";",
"zPosition",
"=",
"par3",
";",
"BiomeCache",
".",
"getChunkManager",
"(",
"par1BiomeCache",
")",
".",
"getTemperatures",
"(",
"temperatureValues",
",",
"par2",
"<<",
"4",
",",
"par3",
"<<",
"4",
",",
"16",
",",
"16",
")",
";",
"BiomeCache",
".",
"getChunkManager",
"(",
"par1BiomeCache",
")",
".",
"getRainfall",
"(",
"rainfallValues",
",",
"par2",
"<<",
"4",
",",
"par3",
"<<",
"4",
",",
"16",
",",
"16",
")",
";",
"BiomeCache",
".",
"getChunkManager",
"(",
"par1BiomeCache",
")",
".",
"getBiomeGenAt",
"(",
"biomes",
",",
"par2",
"<<",
"4",
",",
"par3",
"<<",
"4",
",",
"16",
",",
"16",
",",
"false",
")",
";",
"}",
"public",
"BiomeGenBase",
"getBiomeGenAt",
"(",
"int",
"par1",
",",
"int",
"par2",
")",
"{",
"return",
"biomes",
"[",
"par1",
"&",
"0xf",
"|",
"(",
"par2",
"&",
"0xf",
")",
"<<",
"4",
"]",
";",
"}",
"}",
"</s>"
] |
9,482 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"BlockPistonMoving",
"extends",
"BlockContainer",
"{",
"public",
"BlockPistonMoving",
"(",
"int",
"par1",
")",
"{",
"super",
"(",
"par1",
",",
"Material",
".",
"piston",
")",
";",
"setHardness",
"(",
"-",
"1F",
")",
";",
"}",
"public",
"TileEntity",
"getBlockEntity",
"(",
")",
"{",
"return",
"null",
";",
"}",
"public",
"void",
"onBlockAdded",
"(",
"World",
"world",
",",
"int",
"i",
",",
"int",
"j",
",",
"int",
"k",
")",
"{",
"}",
"public",
"void",
"onBlockRemoval",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"TileEntity",
"tileentity",
"=",
"par1World",
".",
"getBlockTileEntity",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"if",
"(",
"tileentity",
"!=",
"null",
"&&",
"(",
"tileentity",
"instanceof",
"TileEntityPiston",
")",
")",
"{",
"(",
"(",
"TileEntityPiston",
")",
"tileentity",
")",
".",
"clearPistonTileEntity",
"(",
")",
";",
"}",
"else",
"{",
"super",
".",
"onBlockRemoval",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"}",
"}",
"public",
"boolean",
"canPlaceBlockAt",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"i",
")",
"{",
"return",
"false",
";",
"}",
"public",
"boolean",
"canPlaceBlockOnSide",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"i",
",",
"int",
"j",
")",
"{",
"return",
"false",
";",
"}",
"public",
"int",
"getRenderType",
"(",
")",
"{",
"return",
"-",
"1",
";",
"}",
"public",
"boolean",
"isOpaqueCube",
"(",
")",
"{",
"return",
"false",
";",
"}",
"public",
"boolean",
"renderAsNormalBlock",
"(",
")",
"{",
"return",
"false",
";",
"}",
"public",
"boolean",
"blockActivated",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"EntityPlayer",
"par5EntityPlayer",
")",
"{",
"if",
"(",
"!",
"par1World",
".",
"isRemote",
"&&",
"par1World",
".",
"getBlockTileEntity",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
"==",
"null",
")",
"{",
"par1World",
".",
"setBlockWithNotify",
"(",
"par2",
",",
"par3",
",",
"par4",
",",
"0",
")",
";",
"return",
"true",
";",
"}",
"else",
"{",
"return",
"false",
";",
"}",
"}",
"public",
"int",
"idDropped",
"(",
"int",
"par1",
",",
"Random",
"par2Random",
",",
"int",
"par3",
")",
"{",
"return",
"0",
";",
"}",
"public",
"void",
"dropBlockAsItemWithChance",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
",",
"float",
"par6",
",",
"int",
"par7",
")",
"{",
"if",
"(",
"par1World",
".",
"isRemote",
")",
"{",
"return",
";",
"}",
"TileEntityPiston",
"tileentitypiston",
"=",
"getTileEntityAtLocation",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"if",
"(",
"tileentitypiston",
"==",
"null",
")",
"{",
"return",
";",
"}",
"else",
"{",
"Block",
".",
"blocksList",
"[",
"tileentitypiston",
".",
"getStoredBlockID",
"(",
")",
"]",
".",
"dropBlockAsItem",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
",",
"tileentitypiston",
".",
"getBlockMetadata",
"(",
")",
",",
"0",
")",
";",
"return",
";",
"}",
"}",
"public",
"void",
"onNeighborBlockChange",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
")",
"{",
"if",
"(",
"!",
"par1World",
".",
"isRemote",
")",
"{",
"if",
"(",
"par1World",
".",
"getBlockTileEntity",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
"!=",
"null",
")",
";",
"}",
"}",
"public",
"static",
"TileEntity",
"getTileEntity",
"(",
"int",
"par0",
",",
"int",
"par1",
",",
"int",
"par2",
",",
"boolean",
"par3",
",",
"boolean",
"par4",
")",
"{",
"return",
"new",
"TileEntityPiston",
"(",
"par0",
",",
"par1",
",",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"}",
"public",
"AxisAlignedBB",
"getCollisionBoundingBoxFromPool",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"TileEntityPiston",
"tileentitypiston",
"=",
"getTileEntityAtLocation",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"if",
"(",
"tileentitypiston",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"float",
"f",
"=",
"tileentitypiston",
".",
"getProgress",
"(",
"0.0F",
")",
";",
"if",
"(",
"tileentitypiston",
".",
"isExtending",
"(",
")",
")",
"{",
"f",
"=",
"1.0F",
"-",
"f",
";",
"}",
"return",
"getAxisAlignedBB",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
",",
"tileentitypiston",
".",
"getStoredBlockID",
"(",
")",
",",
"f",
",",
"tileentitypiston",
".",
"getPistonOrientation",
"(",
")",
")",
";",
"}",
"public",
"void",
"setBlockBoundsBasedOnState",
"(",
"IBlockAccess",
"par1IBlockAccess",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"TileEntityPiston",
"tileentitypiston",
"=",
"getTileEntityAtLocation",
"(",
"par1IBlockAccess",
",",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"if",
"(",
"tileentitypiston",
"!=",
"null",
")",
"{",
"Block",
"block",
"=",
"Block",
".",
"blocksList",
"[",
"tileentitypiston",
".",
"getStoredBlockID",
"(",
")",
"]",
";",
"if",
"(",
"block",
"==",
"null",
"||",
"block",
"==",
"this",
")",
"{",
"return",
";",
"}",
"block",
".",
"setBlockBoundsBasedOnState",
"(",
"par1IBlockAccess",
",",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"float",
"f",
"=",
"tileentitypiston",
".",
"getProgress",
"(",
"0.0F",
")",
";",
"if",
"(",
"tileentitypiston",
".",
"isExtending",
"(",
")",
")",
"{",
"f",
"=",
"1.0F",
"-",
"f",
";",
"}",
"int",
"i",
"=",
"tileentitypiston",
".",
"getPistonOrientation",
"(",
")",
";",
"minX",
"=",
"block",
".",
"minX",
"-",
"(",
"double",
")",
"(",
"(",
"float",
")",
"Facing",
".",
"offsetsXForSide",
"[",
"i",
"]",
"*",
"f",
")",
";",
"minY",
"=",
"block",
".",
"minY",
"-",
"(",
"double",
")",
"(",
"(",
"float",
")",
"Facing",
".",
"offsetsYForSide",
"[",
"i",
"]",
"*",
"f",
")",
";",
"minZ",
"=",
"block",
".",
"minZ",
"-",
"(",
"double",
")",
"(",
"(",
"float",
")",
"Facing",
".",
"offsetsZForSide",
"[",
"i",
"]",
"*",
"f",
")",
";",
"maxX",
"=",
"block",
".",
"maxX",
"-",
"(",
"double",
")",
"(",
"(",
"float",
")",
"Facing",
".",
"offsetsXForSide",
"[",
"i",
"]",
"*",
"f",
")",
";",
"maxY",
"=",
"block",
".",
"maxY",
"-",
"(",
"double",
")",
"(",
"(",
"float",
")",
"Facing",
".",
"offsetsYForSide",
"[",
"i",
"]",
"*",
"f",
")",
";",
"maxZ",
"=",
"block",
".",
"maxZ",
"-",
"(",
"double",
")",
"(",
"(",
"float",
")",
"Facing",
".",
"offsetsZForSide",
"[",
"i",
"]",
"*",
"f",
")",
";",
"}",
"}",
"public",
"AxisAlignedBB",
"getAxisAlignedBB",
"(",
"World",
"par1World",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
",",
"float",
"par6",
",",
"int",
"par7",
")",
"{",
"if",
"(",
"par5",
"==",
"0",
"||",
"par5",
"==",
"blockID",
")",
"{",
"return",
"null",
";",
"}",
"AxisAlignedBB",
"axisalignedbb",
"=",
"Block",
".",
"blocksList",
"[",
"par5",
"]",
".",
"getCollisionBoundingBoxFromPool",
"(",
"par1World",
",",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"if",
"(",
"axisalignedbb",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"if",
"(",
"Facing",
".",
"offsetsXForSide",
"[",
"par7",
"]",
"<",
"0",
")",
"{",
"axisalignedbb",
".",
"minX",
"-=",
"(",
"float",
")",
"Facing",
".",
"offsetsXForSide",
"[",
"par7",
"]",
"*",
"par6",
";",
"}",
"else",
"{",
"axisalignedbb",
".",
"maxX",
"-=",
"(",
"float",
")",
"Facing",
".",
"offsetsXForSide",
"[",
"par7",
"]",
"*",
"par6",
";",
"}",
"if",
"(",
"Facing",
".",
"offsetsYForSide",
"[",
"par7",
"]",
"<",
"0",
")",
"{",
"axisalignedbb",
".",
"minY",
"-=",
"(",
"float",
")",
"Facing",
".",
"offsetsYForSide",
"[",
"par7",
"]",
"*",
"par6",
";",
"}",
"else",
"{",
"axisalignedbb",
".",
"maxY",
"-=",
"(",
"float",
")",
"Facing",
".",
"offsetsYForSide",
"[",
"par7",
"]",
"*",
"par6",
";",
"}",
"if",
"(",
"Facing",
".",
"offsetsZForSide",
"[",
"par7",
"]",
"<",
"0",
")",
"{",
"axisalignedbb",
".",
"minZ",
"-=",
"(",
"float",
")",
"Facing",
".",
"offsetsZForSide",
"[",
"par7",
"]",
"*",
"par6",
";",
"}",
"else",
"{",
"axisalignedbb",
".",
"maxZ",
"-=",
"(",
"float",
")",
"Facing",
".",
"offsetsZForSide",
"[",
"par7",
"]",
"*",
"par6",
";",
"}",
"return",
"axisalignedbb",
";",
"}",
"private",
"TileEntityPiston",
"getTileEntityAtLocation",
"(",
"IBlockAccess",
"par1IBlockAccess",
",",
"int",
"par2",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"TileEntity",
"tileentity",
"=",
"par1IBlockAccess",
".",
"getBlockTileEntity",
"(",
"par2",
",",
"par3",
",",
"par4",
")",
";",
"if",
"(",
"tileentity",
"!=",
"null",
"&&",
"(",
"tileentity",
"instanceof",
"TileEntityPiston",
")",
")",
"{",
"return",
"(",
"TileEntityPiston",
")",
"tileentity",
";",
"}",
"else",
"{",
"return",
"null",
";",
"}",
"}",
"}",
"</s>"
] |
9,483 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"BiomeGenDesert",
"extends",
"BiomeGenBase",
"{",
"public",
"BiomeGenDesert",
"(",
"int",
"par1",
")",
"{",
"super",
"(",
"par1",
")",
";",
"spawnableCreatureList",
".",
"clear",
"(",
")",
";",
"topBlock",
"=",
"(",
"byte",
")",
"Block",
".",
"sand",
".",
"blockID",
";",
"fillerBlock",
"=",
"(",
"byte",
")",
"Block",
".",
"sand",
".",
"blockID",
";",
"biomeDecorator",
".",
"treesPerChunk",
"=",
"-",
"999",
";",
"biomeDecorator",
".",
"deadBushPerChunk",
"=",
"2",
";",
"biomeDecorator",
".",
"reedsPerChunk",
"=",
"50",
";",
"biomeDecorator",
".",
"cactiPerChunk",
"=",
"10",
";",
"}",
"public",
"void",
"decorate",
"(",
"World",
"par1World",
",",
"Random",
"par2Random",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"super",
".",
"decorate",
"(",
"par1World",
",",
"par2Random",
",",
"par3",
",",
"par4",
")",
";",
"if",
"(",
"par2Random",
".",
"nextInt",
"(",
"1000",
")",
"==",
"0",
")",
"{",
"int",
"i",
"=",
"par3",
"+",
"par2Random",
".",
"nextInt",
"(",
"16",
")",
"+",
"8",
";",
"int",
"j",
"=",
"par4",
"+",
"par2Random",
".",
"nextInt",
"(",
"16",
")",
"+",
"8",
";",
"WorldGenDesertWells",
"worldgendesertwells",
"=",
"new",
"WorldGenDesertWells",
"(",
")",
";",
"worldgendesertwells",
".",
"generate",
"(",
"par1World",
",",
"par2Random",
",",
"i",
",",
"par1World",
".",
"getHeightValue",
"(",
"i",
",",
"j",
")",
"+",
"1",
",",
"j",
")",
";",
"}",
"}",
"}",
"</s>"
] |
9,484 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"class",
"ItemGlassBottle",
"extends",
"Item",
"{",
"public",
"ItemGlassBottle",
"(",
"int",
"par1",
")",
"{",
"super",
"(",
"par1",
")",
";",
"}",
"public",
"ItemStack",
"onItemRightClick",
"(",
"ItemStack",
"par1ItemStack",
",",
"World",
"par2World",
",",
"EntityPlayer",
"par3EntityPlayer",
")",
"{",
"MovingObjectPosition",
"movingobjectposition",
"=",
"getMovingObjectPositionFromPlayer",
"(",
"par2World",
",",
"par3EntityPlayer",
",",
"true",
")",
";",
"if",
"(",
"movingobjectposition",
"==",
"null",
")",
"{",
"return",
"par1ItemStack",
";",
"}",
"if",
"(",
"movingobjectposition",
".",
"typeOfHit",
"==",
"EnumMovingObjectType",
".",
"TILE",
")",
"{",
"int",
"i",
"=",
"movingobjectposition",
".",
"blockX",
";",
"int",
"j",
"=",
"movingobjectposition",
".",
"blockY",
";",
"int",
"k",
"=",
"movingobjectposition",
".",
"blockZ",
";",
"if",
"(",
"!",
"par2World",
".",
"canMineBlock",
"(",
"par3EntityPlayer",
",",
"i",
",",
"j",
",",
"k",
")",
")",
"{",
"return",
"par1ItemStack",
";",
"}",
"if",
"(",
"!",
"par3EntityPlayer",
".",
"canPlayerEdit",
"(",
"i",
",",
"j",
",",
"k",
")",
")",
"{",
"return",
"par1ItemStack",
";",
"}",
"if",
"(",
"par2World",
".",
"getBlockMaterial",
"(",
"i",
",",
"j",
",",
"k",
")",
"==",
"Material",
".",
"water",
")",
"{",
"par1ItemStack",
".",
"stackSize",
"--",
";",
"if",
"(",
"par1ItemStack",
".",
"stackSize",
"<=",
"0",
")",
"{",
"return",
"new",
"ItemStack",
"(",
"Item",
".",
"potion",
")",
";",
"}",
"if",
"(",
"!",
"par3EntityPlayer",
".",
"inventory",
".",
"addItemStackToInventory",
"(",
"new",
"ItemStack",
"(",
"Item",
".",
"potion",
")",
")",
")",
"{",
"par3EntityPlayer",
".",
"dropPlayerItem",
"(",
"new",
"ItemStack",
"(",
"Item",
".",
"potion",
".",
"shiftedIndex",
",",
"1",
",",
"0",
")",
")",
";",
"}",
"}",
"}",
"return",
"par1ItemStack",
";",
"}",
"}",
"</s>"
] |
9,485 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"io",
".",
"*",
";",
"public",
"class",
"Packet254ServerPing",
"extends",
"Packet",
"{",
"public",
"Packet254ServerPing",
"(",
")",
"{",
"}",
"public",
"void",
"readPacketData",
"(",
"DataInputStream",
"datainputstream",
")",
"throws",
"IOException",
"{",
"}",
"public",
"void",
"writePacketData",
"(",
"DataOutputStream",
"dataoutputstream",
")",
"throws",
"IOException",
"{",
"}",
"public",
"void",
"processPacket",
"(",
"NetHandler",
"par1NetHandler",
")",
"{",
"par1NetHandler",
".",
"handleServerPing",
"(",
"this",
")",
";",
"}",
"public",
"int",
"getPacketSize",
"(",
")",
"{",
"return",
"0",
";",
"}",
"}",
"</s>"
] |
9,486 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"io",
".",
"*",
";",
"public",
"class",
"Packet200Statistic",
"extends",
"Packet",
"{",
"public",
"int",
"statisticId",
";",
"public",
"int",
"amount",
";",
"public",
"Packet200Statistic",
"(",
")",
"{",
"}",
"public",
"Packet200Statistic",
"(",
"int",
"par1",
",",
"int",
"par2",
")",
"{",
"statisticId",
"=",
"par1",
";",
"amount",
"=",
"par2",
";",
"}",
"public",
"void",
"processPacket",
"(",
"NetHandler",
"par1NetHandler",
")",
"{",
"par1NetHandler",
".",
"handleStatistic",
"(",
"this",
")",
";",
"}",
"public",
"void",
"readPacketData",
"(",
"DataInputStream",
"par1DataInputStream",
")",
"throws",
"IOException",
"{",
"statisticId",
"=",
"par1DataInputStream",
".",
"readInt",
"(",
")",
";",
"amount",
"=",
"par1DataInputStream",
".",
"readByte",
"(",
")",
";",
"}",
"public",
"void",
"writePacketData",
"(",
"DataOutputStream",
"par1DataOutputStream",
")",
"throws",
"IOException",
"{",
"par1DataOutputStream",
".",
"writeInt",
"(",
"statisticId",
")",
";",
"par1DataOutputStream",
".",
"writeByte",
"(",
"amount",
")",
";",
"}",
"public",
"int",
"getPacketSize",
"(",
")",
"{",
"return",
"6",
";",
"}",
"}",
"</s>"
] |
9,487 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"class",
"StatCrafting",
"extends",
"StatBase",
"{",
"private",
"final",
"int",
"itemID",
";",
"public",
"StatCrafting",
"(",
"int",
"par1",
",",
"String",
"par2Str",
",",
"int",
"par3",
")",
"{",
"super",
"(",
"par1",
",",
"par2Str",
")",
";",
"itemID",
"=",
"par3",
";",
"}",
"}",
"</s>"
] |
9,488 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"EntityXPOrb",
"extends",
"Entity",
"{",
"public",
"int",
"xpColor",
";",
"public",
"int",
"xpOrbAge",
";",
"public",
"int",
"field_35158_c",
";",
"private",
"int",
"xpOrbHealth",
";",
"private",
"int",
"xpValue",
";",
"public",
"EntityXPOrb",
"(",
"World",
"par1World",
",",
"double",
"par2",
",",
"double",
"par4",
",",
"double",
"par6",
",",
"int",
"par8",
")",
"{",
"super",
"(",
"par1World",
")",
";",
"xpOrbAge",
"=",
"0",
";",
"xpOrbHealth",
"=",
"5",
";",
"setSize",
"(",
"0.5F",
",",
"0.5F",
")",
";",
"yOffset",
"=",
"height",
"/",
"2.0F",
";",
"setPosition",
"(",
"par2",
",",
"par4",
",",
"par6",
")",
";",
"rotationYaw",
"=",
"(",
"float",
")",
"(",
"Math",
".",
"random",
"(",
")",
"*",
"360D",
")",
";",
"motionX",
"=",
"(",
"float",
")",
"(",
"Math",
".",
"random",
"(",
")",
"*",
"0.20000000298023224D",
"-",
"0.10000000149011612D",
")",
"*",
"2.0F",
";",
"motionY",
"=",
"(",
"float",
")",
"(",
"Math",
".",
"random",
"(",
")",
"*",
"0.20000000000000001D",
")",
"*",
"2.0F",
";",
"motionZ",
"=",
"(",
"float",
")",
"(",
"Math",
".",
"random",
"(",
")",
"*",
"0.20000000298023224D",
"-",
"0.10000000149011612D",
")",
"*",
"2.0F",
";",
"xpValue",
"=",
"par8",
";",
"}",
"protected",
"boolean",
"canTriggerWalking",
"(",
")",
"{",
"return",
"false",
";",
"}",
"public",
"EntityXPOrb",
"(",
"World",
"par1World",
")",
"{",
"super",
"(",
"par1World",
")",
";",
"xpOrbAge",
"=",
"0",
";",
"xpOrbHealth",
"=",
"5",
";",
"setSize",
"(",
"0.25F",
",",
"0.25F",
")",
";",
"yOffset",
"=",
"height",
"/",
"2.0F",
";",
"}",
"protected",
"void",
"entityInit",
"(",
")",
"{",
"}",
"public",
"void",
"onUpdate",
"(",
")",
"{",
"super",
".",
"onUpdate",
"(",
")",
";",
"if",
"(",
"field_35158_c",
">",
"0",
")",
"{",
"field_35158_c",
"--",
";",
"}",
"prevPosX",
"=",
"posX",
";",
"prevPosY",
"=",
"posY",
";",
"prevPosZ",
"=",
"posZ",
";",
"motionY",
"-=",
"0.029999999329447746D",
";",
"if",
"(",
"worldObj",
".",
"getBlockMaterial",
"(",
"MathHelper",
".",
"floor_double",
"(",
"posX",
")",
",",
"MathHelper",
".",
"floor_double",
"(",
"posY",
")",
",",
"MathHelper",
".",
"floor_double",
"(",
"posZ",
")",
")",
"==",
"Material",
".",
"lava",
")",
"{",
"motionY",
"=",
"0.20000000298023224D",
";",
"motionX",
"=",
"(",
"rand",
".",
"nextFloat",
"(",
")",
"-",
"rand",
".",
"nextFloat",
"(",
")",
")",
"*",
"0.2F",
";",
"motionZ",
"=",
"(",
"rand",
".",
"nextFloat",
"(",
")",
"-",
"rand",
".",
"nextFloat",
"(",
")",
")",
"*",
"0.2F",
";",
"worldObj",
".",
"playSoundAtEntity",
"(",
"this",
",",
"\"random.fizz\"",
",",
"0.4F",
",",
"2.0F",
"+",
"rand",
".",
"nextFloat",
"(",
")",
"*",
"0.4F",
")",
";",
"}",
"pushOutOfBlocks",
"(",
"posX",
",",
"(",
"boundingBox",
".",
"minY",
"+",
"boundingBox",
".",
"maxY",
")",
"/",
"2D",
",",
"posZ",
")",
";",
"double",
"d",
"=",
"8D",
";",
"EntityPlayer",
"entityplayer",
"=",
"worldObj",
".",
"getClosestPlayerToEntity",
"(",
"this",
",",
"d",
")",
";",
"if",
"(",
"entityplayer",
"!=",
"null",
")",
"{",
"double",
"d1",
"=",
"(",
"entityplayer",
".",
"posX",
"-",
"posX",
")",
"/",
"d",
";",
"double",
"d2",
"=",
"(",
"(",
"entityplayer",
".",
"posY",
"+",
"(",
"double",
")",
"entityplayer",
".",
"getEyeHeight",
"(",
")",
")",
"-",
"posY",
")",
"/",
"d",
";",
"double",
"d3",
"=",
"(",
"entityplayer",
".",
"posZ",
"-",
"posZ",
")",
"/",
"d",
";",
"double",
"d4",
"=",
"Math",
".",
"sqrt",
"(",
"d1",
"*",
"d1",
"+",
"d2",
"*",
"d2",
"+",
"d3",
"*",
"d3",
")",
";",
"double",
"d5",
"=",
"1.0D",
"-",
"d4",
";",
"if",
"(",
"d5",
">",
"0.0D",
")",
"{",
"d5",
"*=",
"d5",
";",
"motionX",
"+=",
"(",
"d1",
"/",
"d4",
")",
"*",
"d5",
"*",
"0.10000000000000001D",
";",
"motionY",
"+=",
"(",
"d2",
"/",
"d4",
")",
"*",
"d5",
"*",
"0.10000000000000001D",
";",
"motionZ",
"+=",
"(",
"d3",
"/",
"d4",
")",
"*",
"d5",
"*",
"0.10000000000000001D",
";",
"}",
"}",
"moveEntity",
"(",
"motionX",
",",
"motionY",
",",
"motionZ",
")",
";",
"float",
"f",
"=",
"0.98F",
";",
"if",
"(",
"onGround",
")",
"{",
"f",
"=",
"0.5880001F",
";",
"int",
"i",
"=",
"worldObj",
".",
"getBlockId",
"(",
"MathHelper",
".",
"floor_double",
"(",
"posX",
")",
",",
"MathHelper",
".",
"floor_double",
"(",
"boundingBox",
".",
"minY",
")",
"-",
"1",
",",
"MathHelper",
".",
"floor_double",
"(",
"posZ",
")",
")",
";",
"if",
"(",
"i",
">",
"0",
")",
"{",
"f",
"=",
"Block",
".",
"blocksList",
"[",
"i",
"]",
".",
"slipperiness",
"*",
"0.98F",
";",
"}",
"}",
"motionX",
"*=",
"f",
";",
"motionY",
"*=",
"0.98000001907348633D",
";",
"motionZ",
"*=",
"f",
";",
"if",
"(",
"onGround",
")",
"{",
"motionY",
"*=",
"-",
"0.89999997615814209D",
";",
"}",
"xpColor",
"++",
";",
"xpOrbAge",
"++",
";",
"if",
"(",
"xpOrbAge",
">=",
"6000",
")",
"{",
"setDead",
"(",
")",
";",
"}",
"}",
"public",
"boolean",
"handleWaterMovement",
"(",
")",
"{",
"return",
"worldObj",
".",
"handleMaterialAcceleration",
"(",
"boundingBox",
",",
"Material",
".",
"water",
",",
"this",
")",
";",
"}",
"protected",
"void",
"dealFireDamage",
"(",
"int",
"par1",
")",
"{",
"attackEntityFrom",
"(",
"DamageSource",
".",
"inFire",
",",
"par1",
")",
";",
"}",
"public",
"boolean",
"attackEntityFrom",
"(",
"DamageSource",
"par1DamageSource",
",",
"int",
"par2",
")",
"{",
"setBeenAttacked",
"(",
")",
";",
"xpOrbHealth",
"-=",
"par2",
";",
"if",
"(",
"xpOrbHealth",
"<=",
"0",
")",
"{",
"setDead",
"(",
")",
";",
"}",
"return",
"false",
";",
"}",
"public",
"void",
"writeEntityToNBT",
"(",
"NBTTagCompound",
"par1NBTTagCompound",
")",
"{",
"par1NBTTagCompound",
".",
"setShort",
"(",
"\"Health\"",
",",
"(",
"byte",
")",
"xpOrbHealth",
")",
";",
"par1NBTTagCompound",
".",
"setShort",
"(",
"\"Age\"",
",",
"(",
"short",
")",
"xpOrbAge",
")",
";",
"par1NBTTagCompound",
".",
"setShort",
"(",
"\"Value\"",
",",
"(",
"short",
")",
"xpValue",
")",
";",
"}",
"public",
"void",
"readEntityFromNBT",
"(",
"NBTTagCompound",
"par1NBTTagCompound",
")",
"{",
"xpOrbHealth",
"=",
"par1NBTTagCompound",
".",
"getShort",
"(",
"\"Health\"",
")",
"&",
"0xff",
";",
"xpOrbAge",
"=",
"par1NBTTagCompound",
".",
"getShort",
"(",
"\"Age\"",
")",
";",
"xpValue",
"=",
"par1NBTTagCompound",
".",
"getShort",
"(",
"\"Value\"",
")",
";",
"}",
"public",
"void",
"onCollideWithPlayer",
"(",
"EntityPlayer",
"par1EntityPlayer",
")",
"{",
"if",
"(",
"worldObj",
".",
"isRemote",
")",
"{",
"return",
";",
"}",
"if",
"(",
"field_35158_c",
"==",
"0",
"&&",
"par1EntityPlayer",
".",
"xpCooldown",
"==",
"0",
")",
"{",
"par1EntityPlayer",
".",
"xpCooldown",
"=",
"2",
";",
"worldObj",
".",
"playSoundAtEntity",
"(",
"this",
",",
"\"random.orb\"",
",",
"0.1F",
",",
"0.5F",
"*",
"(",
"(",
"rand",
".",
"nextFloat",
"(",
")",
"-",
"rand",
".",
"nextFloat",
"(",
")",
")",
"*",
"0.7F",
"+",
"1.8F",
")",
")",
";",
"par1EntityPlayer",
".",
"onItemPickup",
"(",
"this",
",",
"1",
")",
";",
"par1EntityPlayer",
".",
"addExperience",
"(",
"xpValue",
")",
";",
"setDead",
"(",
")",
";",
"}",
"}",
"public",
"int",
"getXpValue",
"(",
")",
"{",
"return",
"xpValue",
";",
"}",
"public",
"static",
"int",
"getXPSplit",
"(",
"int",
"par0",
")",
"{",
"if",
"(",
"par0",
">=",
"2477",
")",
"{",
"return",
"2477",
";",
"}",
"if",
"(",
"par0",
">=",
"1237",
")",
"{",
"return",
"1237",
";",
"}",
"if",
"(",
"par0",
">=",
"617",
")",
"{",
"return",
"617",
";",
"}",
"if",
"(",
"par0",
">=",
"307",
")",
"{",
"return",
"307",
";",
"}",
"if",
"(",
"par0",
">=",
"149",
")",
"{",
"return",
"149",
";",
"}",
"if",
"(",
"par0",
">=",
"73",
")",
"{",
"return",
"73",
";",
"}",
"if",
"(",
"par0",
">=",
"37",
")",
"{",
"return",
"37",
";",
"}",
"if",
"(",
"par0",
">=",
"17",
")",
"{",
"return",
"17",
";",
"}",
"if",
"(",
"par0",
">=",
"7",
")",
"{",
"return",
"7",
";",
"}",
"return",
"par0",
"<",
"3",
"?",
"1",
":",
"3",
";",
"}",
"public",
"boolean",
"canAttackWithItem",
"(",
")",
"{",
"return",
"false",
";",
"}",
"}",
"</s>"
] |
9,489 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"enum",
"EnumSkyBlock",
"{",
"Sky",
"(",
"15",
")",
",",
"Block",
"(",
"0",
")",
";",
"public",
"final",
"int",
"defaultLightValue",
";",
"private",
"EnumSkyBlock",
"(",
"int",
"par3",
")",
"{",
"defaultLightValue",
"=",
"par3",
";",
"}",
"}",
"</s>"
] |
9,490 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"io",
".",
"*",
";",
"import",
"java",
".",
"lang",
".",
"ref",
".",
"Reference",
";",
"import",
"java",
".",
"lang",
".",
"ref",
".",
"SoftReference",
";",
"import",
"java",
".",
"util",
".",
"*",
";",
"public",
"class",
"RegionFileCache",
"{",
"private",
"static",
"final",
"Map",
"regionsByFilename",
"=",
"new",
"HashMap",
"(",
")",
";",
"private",
"RegionFileCache",
"(",
")",
"{",
"}",
"public",
"static",
"synchronized",
"RegionFile",
"createOrLoadRegionFile",
"(",
"File",
"par0File",
",",
"int",
"par1",
",",
"int",
"par2",
")",
"{",
"File",
"file",
"=",
"new",
"File",
"(",
"par0File",
",",
"\"region\"",
")",
";",
"File",
"file1",
"=",
"new",
"File",
"(",
"file",
",",
"(",
"new",
"StringBuilder",
"(",
")",
")",
".",
"append",
"(",
"\"r.\"",
")",
".",
"append",
"(",
"par1",
">>",
"5",
")",
".",
"append",
"(",
"\".\"",
")",
".",
"append",
"(",
"par2",
">>",
"5",
")",
".",
"append",
"(",
"\".mca\"",
")",
".",
"toString",
"(",
")",
")",
";",
"Reference",
"reference",
"=",
"(",
"Reference",
")",
"regionsByFilename",
".",
"get",
"(",
"file1",
")",
";",
"if",
"(",
"reference",
"!=",
"null",
")",
"{",
"RegionFile",
"regionfile",
"=",
"(",
"RegionFile",
")",
"reference",
".",
"get",
"(",
")",
";",
"if",
"(",
"regionfile",
"!=",
"null",
")",
"{",
"return",
"regionfile",
";",
"}",
"}",
"if",
"(",
"!",
"file",
".",
"exists",
"(",
")",
")",
"{",
"file",
".",
"mkdirs",
"(",
")",
";",
"}",
"if",
"(",
"regionsByFilename",
".",
"size",
"(",
")",
">=",
"256",
")",
"{",
"clearRegionFileReferences",
"(",
")",
";",
"}",
"RegionFile",
"regionfile1",
"=",
"new",
"RegionFile",
"(",
"file1",
")",
";",
"regionsByFilename",
".",
"put",
"(",
"file1",
",",
"new",
"SoftReference",
"(",
"regionfile1",
")",
")",
";",
"return",
"regionfile1",
";",
"}",
"public",
"static",
"synchronized",
"void",
"clearRegionFileReferences",
"(",
")",
"{",
"Iterator",
"iterator",
"=",
"regionsByFilename",
".",
"values",
"(",
")",
".",
"iterator",
"(",
")",
";",
"do",
"{",
"if",
"(",
"!",
"iterator",
".",
"hasNext",
"(",
")",
")",
"{",
"break",
";",
"}",
"Reference",
"reference",
"=",
"(",
"Reference",
")",
"iterator",
".",
"next",
"(",
")",
";",
"try",
"{",
"RegionFile",
"regionfile",
"=",
"(",
"RegionFile",
")",
"reference",
".",
"get",
"(",
")",
";",
"if",
"(",
"regionfile",
"!=",
"null",
")",
"{",
"regionfile",
".",
"close",
"(",
")",
";",
"}",
"}",
"catch",
"(",
"IOException",
"ioexception",
")",
"{",
"ioexception",
".",
"printStackTrace",
"(",
")",
";",
"}",
"}",
"while",
"(",
"true",
")",
";",
"regionsByFilename",
".",
"clear",
"(",
")",
";",
"}",
"public",
"static",
"DataInputStream",
"getChunkInputStream",
"(",
"File",
"par0File",
",",
"int",
"par1",
",",
"int",
"par2",
")",
"{",
"RegionFile",
"regionfile",
"=",
"createOrLoadRegionFile",
"(",
"par0File",
",",
"par1",
",",
"par2",
")",
";",
"return",
"regionfile",
".",
"getChunkDataInputStream",
"(",
"par1",
"&",
"0x1f",
",",
"par2",
"&",
"0x1f",
")",
";",
"}",
"public",
"static",
"DataOutputStream",
"getChunkOutputStream",
"(",
"File",
"par0File",
",",
"int",
"par1",
",",
"int",
"par2",
")",
"{",
"RegionFile",
"regionfile",
"=",
"createOrLoadRegionFile",
"(",
"par0File",
",",
"par1",
",",
"par2",
")",
";",
"return",
"regionfile",
".",
"getChunkDataOutputStream",
"(",
"par1",
"&",
"0x1f",
",",
"par2",
"&",
"0x1f",
")",
";",
"}",
"}",
"</s>"
] |
9,491 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"WorldGenFlowers",
"extends",
"WorldGenerator",
"{",
"private",
"int",
"plantBlockId",
";",
"public",
"WorldGenFlowers",
"(",
"int",
"par1",
")",
"{",
"plantBlockId",
"=",
"par1",
";",
"}",
"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",
")",
"&&",
"(",
"(",
"BlockFlower",
")",
"Block",
".",
"blocksList",
"[",
"plantBlockId",
"]",
")",
".",
"canBlockStay",
"(",
"par1World",
",",
"j",
",",
"k",
",",
"l",
")",
")",
"{",
"par1World",
".",
"setBlock",
"(",
"j",
",",
"k",
",",
"l",
",",
"plantBlockId",
")",
";",
"}",
"}",
"return",
"true",
";",
"}",
"}",
"</s>"
] |
9,492 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"*",
";",
"public",
"abstract",
"class",
"BiomeGenBase",
"{",
"public",
"static",
"final",
"BiomeGenBase",
"biomeList",
"[",
"]",
"=",
"new",
"BiomeGenBase",
"[",
"256",
"]",
";",
"public",
"static",
"final",
"BiomeGenBase",
"ocean",
"=",
"(",
"new",
"BiomeGenOcean",
"(",
"0",
")",
")",
".",
"setColor",
"(",
"112",
")",
".",
"setBiomeName",
"(",
"\"Ocean\"",
")",
".",
"setMinMaxHeight",
"(",
"-",
"1F",
",",
"0.4F",
")",
";",
"public",
"static",
"final",
"BiomeGenBase",
"plains",
"=",
"(",
"new",
"BiomeGenPlains",
"(",
"1",
")",
")",
".",
"setColor",
"(",
"0x8db360",
")",
".",
"setBiomeName",
"(",
"\"Plains\"",
")",
".",
"setTemperatureRainfall",
"(",
"0.8F",
",",
"0.4F",
")",
";",
"public",
"static",
"final",
"BiomeGenBase",
"desert",
"=",
"(",
"new",
"BiomeGenDesert",
"(",
"2",
")",
")",
".",
"setColor",
"(",
"0xfa9418",
")",
".",
"setBiomeName",
"(",
"\"Desert\"",
")",
".",
"setDisableRain",
"(",
")",
".",
"setTemperatureRainfall",
"(",
"2.0F",
",",
"0.0F",
")",
".",
"setMinMaxHeight",
"(",
"0.1F",
",",
"0.2F",
")",
";",
"public",
"static",
"final",
"BiomeGenBase",
"extremeHills",
"=",
"(",
"new",
"BiomeGenHills",
"(",
"3",
")",
")",
".",
"setColor",
"(",
"0x606060",
")",
".",
"setBiomeName",
"(",
"\"\"",
")",
".",
"setMinMaxHeight",
"(",
"0.2F",
",",
"1.3F",
")",
".",
"setTemperatureRainfall",
"(",
"0.2F",
",",
"0.3F",
")",
";",
"public",
"static",
"final",
"BiomeGenBase",
"forest",
"=",
"(",
"new",
"BiomeGenForest",
"(",
"4",
")",
")",
".",
"setColor",
"(",
"0x56621",
")",
".",
"setBiomeName",
"(",
"\"Forest\"",
")",
".",
"func_4080_a",
"(",
"0x4eba31",
")",
".",
"setTemperatureRainfall",
"(",
"0.7F",
",",
"0.8F",
")",
";",
"public",
"static",
"final",
"BiomeGenBase",
"taiga",
"=",
"(",
"new",
"BiomeGenTaiga",
"(",
"5",
")",
")",
".",
"setColor",
"(",
"0xb6659",
")",
".",
"setBiomeName",
"(",
"\"Taiga\"",
")",
".",
"func_4080_a",
"(",
"0x4eba31",
")",
".",
"func_50024_b",
"(",
")",
".",
"setTemperatureRainfall",
"(",
"0.05F",
",",
"0.8F",
")",
".",
"setMinMaxHeight",
"(",
"0.1F",
",",
"0.4F",
")",
";",
"public",
"static",
"final",
"BiomeGenBase",
"swampland",
"=",
"(",
"new",
"BiomeGenSwamp",
"(",
"6",
")",
")",
".",
"setColor",
"(",
"0x7f9b2",
")",
".",
"setBiomeName",
"(",
"\"Swampland\"",
")",
".",
"func_4080_a",
"(",
"0x8baf48",
")",
".",
"setMinMaxHeight",
"(",
"-",
"0.2F",
",",
"0.1F",
")",
".",
"setTemperatureRainfall",
"(",
"0.8F",
",",
"0.9F",
")",
";",
"public",
"static",
"final",
"BiomeGenBase",
"river",
"=",
"(",
"new",
"BiomeGenRiver",
"(",
"7",
")",
")",
".",
"setColor",
"(",
"255",
")",
".",
"setBiomeName",
"(",
"\"River\"",
")",
".",
"setMinMaxHeight",
"(",
"-",
"0.5F",
",",
"0.0F",
")",
";",
"public",
"static",
"final",
"BiomeGenBase",
"hell",
"=",
"(",
"new",
"BiomeGenHell",
"(",
"8",
")",
")",
".",
"setColor",
"(",
"0xff0000",
")",
".",
"setBiomeName",
"(",
"\"Hell\"",
")",
".",
"setDisableRain",
"(",
")",
".",
"setTemperatureRainfall",
"(",
"2.0F",
",",
"0.0F",
")",
";",
"public",
"static",
"final",
"BiomeGenBase",
"sky",
"=",
"(",
"new",
"BiomeGenEnd",
"(",
"9",
")",
")",
".",
"setColor",
"(",
"0x8080ff",
")",
".",
"setBiomeName",
"(",
"\"Sky\"",
")",
".",
"setDisableRain",
"(",
")",
";",
"public",
"static",
"final",
"BiomeGenBase",
"frozenOcean",
"=",
"(",
"new",
"BiomeGenOcean",
"(",
"10",
")",
")",
".",
"setColor",
"(",
"0x9090a0",
")",
".",
"setBiomeName",
"(",
"\"FrozenOcean\"",
")",
".",
"func_50024_b",
"(",
")",
".",
"setMinMaxHeight",
"(",
"-",
"1F",
",",
"0.5F",
")",
".",
"setTemperatureRainfall",
"(",
"0.0F",
",",
"0.5F",
")",
";",
"public",
"static",
"final",
"BiomeGenBase",
"frozenRiver",
"=",
"(",
"new",
"BiomeGenRiver",
"(",
"11",
")",
")",
".",
"setColor",
"(",
"0xa0a0ff",
")",
".",
"setBiomeName",
"(",
"\"FrozenRiver\"",
")",
".",
"func_50024_b",
"(",
")",
".",
"setMinMaxHeight",
"(",
"-",
"0.5F",
",",
"0.0F",
")",
".",
"setTemperatureRainfall",
"(",
"0.0F",
",",
"0.5F",
")",
";",
"public",
"static",
"final",
"BiomeGenBase",
"icePlains",
"=",
"(",
"new",
"BiomeGenSnow",
"(",
"12",
")",
")",
".",
"setColor",
"(",
"0xffffff",
")",
".",
"setBiomeName",
"(",
"\"Ice",
"Plains\"",
")",
".",
"func_50024_b",
"(",
")",
".",
"setTemperatureRainfall",
"(",
"0.0F",
",",
"0.5F",
")",
";",
"public",
"static",
"final",
"BiomeGenBase",
"iceMountains",
"=",
"(",
"new",
"BiomeGenSnow",
"(",
"13",
")",
")",
".",
"setColor",
"(",
"0xa0a0a0",
")",
".",
"setBiomeName",
"(",
"\"\"",
")",
".",
"func_50024_b",
"(",
")",
".",
"setMinMaxHeight",
"(",
"0.2F",
",",
"1.2F",
")",
".",
"setTemperatureRainfall",
"(",
"0.0F",
",",
"0.5F",
")",
";",
"public",
"static",
"final",
"BiomeGenBase",
"mushroomIsland",
"=",
"(",
"new",
"BiomeGenMushroomIsland",
"(",
"14",
")",
")",
".",
"setColor",
"(",
"0xff00ff",
")",
".",
"setBiomeName",
"(",
"\"\"",
")",
".",
"setTemperatureRainfall",
"(",
"0.9F",
",",
"1.0F",
")",
".",
"setMinMaxHeight",
"(",
"0.2F",
",",
"1.0F",
")",
";",
"public",
"static",
"final",
"BiomeGenBase",
"mushroomIslandShore",
"=",
"(",
"new",
"BiomeGenMushroomIsland",
"(",
"15",
")",
")",
".",
"setColor",
"(",
"0xa000ff",
")",
".",
"setBiomeName",
"(",
"\"\"",
")",
".",
"setTemperatureRainfall",
"(",
"0.9F",
",",
"1.0F",
")",
".",
"setMinMaxHeight",
"(",
"-",
"1F",
",",
"0.1F",
")",
";",
"public",
"static",
"final",
"BiomeGenBase",
"beach",
"=",
"(",
"new",
"BiomeGenBeach",
"(",
"16",
")",
")",
".",
"setColor",
"(",
"0xfade55",
")",
".",
"setBiomeName",
"(",
"\"Beach\"",
")",
".",
"setTemperatureRainfall",
"(",
"0.8F",
",",
"0.4F",
")",
".",
"setMinMaxHeight",
"(",
"0.0F",
",",
"0.1F",
")",
";",
"public",
"static",
"final",
"BiomeGenBase",
"desertHills",
"=",
"(",
"new",
"BiomeGenDesert",
"(",
"17",
")",
")",
".",
"setColor",
"(",
"0xd25f12",
")",
".",
"setBiomeName",
"(",
"\"DesertHills\"",
")",
".",
"setDisableRain",
"(",
")",
".",
"setTemperatureRainfall",
"(",
"2.0F",
",",
"0.0F",
")",
".",
"setMinMaxHeight",
"(",
"0.2F",
",",
"0.7F",
")",
";",
"public",
"static",
"final",
"BiomeGenBase",
"forestHills",
"=",
"(",
"new",
"BiomeGenForest",
"(",
"18",
")",
")",
".",
"setColor",
"(",
"0x22551c",
")",
".",
"setBiomeName",
"(",
"\"ForestHills\"",
")",
".",
"func_4080_a",
"(",
"0x4eba31",
")",
".",
"setTemperatureRainfall",
"(",
"0.7F",
",",
"0.8F",
")",
".",
"setMinMaxHeight",
"(",
"0.2F",
",",
"0.6F",
")",
";",
"public",
"static",
"final",
"BiomeGenBase",
"taigaHills",
"=",
"(",
"new",
"BiomeGenTaiga",
"(",
"19",
")",
")",
".",
"setColor",
"(",
"0x163933",
")",
".",
"setBiomeName",
"(",
"\"TaigaHills\"",
")",
".",
"func_50024_b",
"(",
")",
".",
"func_4080_a",
"(",
"0x4eba31",
")",
".",
"setTemperatureRainfall",
"(",
"0.05F",
",",
"0.8F",
")",
".",
"setMinMaxHeight",
"(",
"0.2F",
",",
"0.7F",
")",
";",
"public",
"static",
"final",
"BiomeGenBase",
"extremeHillsEdge",
"=",
"(",
"new",
"BiomeGenHills",
"(",
"20",
")",
")",
".",
"setColor",
"(",
"0x72789a",
")",
".",
"setBiomeName",
"(",
"\"\"",
")",
".",
"setMinMaxHeight",
"(",
"0.2F",
",",
"0.8F",
")",
".",
"setTemperatureRainfall",
"(",
"0.2F",
",",
"0.3F",
")",
";",
"public",
"static",
"final",
"BiomeGenBase",
"jungle",
"=",
"(",
"new",
"BiomeGenJungle",
"(",
"21",
")",
")",
".",
"setColor",
"(",
"0x537b09",
")",
".",
"setBiomeName",
"(",
"\"Jungle\"",
")",
".",
"func_4080_a",
"(",
"0x537b09",
")",
".",
"setTemperatureRainfall",
"(",
"1.2F",
",",
"0.9F",
")",
".",
"setMinMaxHeight",
"(",
"0.2F",
",",
"0.4F",
")",
";",
"public",
"static",
"final",
"BiomeGenBase",
"jungleHills",
"=",
"(",
"new",
"BiomeGenJungle",
"(",
"22",
")",
")",
".",
"setColor",
"(",
"0x2c4205",
")",
".",
"setBiomeName",
"(",
"\"JungleHills\"",
")",
".",
"func_4080_a",
"(",
"0x537b09",
")",
".",
"setTemperatureRainfall",
"(",
"1.2F",
",",
"0.9F",
")",
".",
"setMinMaxHeight",
"(",
"1.8F",
",",
"0.2F",
")",
";",
"public",
"String",
"biomeName",
";",
"public",
"int",
"color",
";",
"public",
"byte",
"topBlock",
";",
"public",
"byte",
"fillerBlock",
";",
"public",
"int",
"field_6161_q",
";",
"public",
"float",
"minHeight",
";",
"public",
"float",
"maxHeight",
";",
"public",
"float",
"temperature",
";",
"public",
"float",
"rainfall",
";",
"public",
"int",
"waterColorMultiplier",
";",
"public",
"BiomeDecorator",
"biomeDecorator",
";",
"protected",
"List",
"spawnableMonsterList",
";",
"protected",
"List",
"spawnableCreatureList",
";",
"protected",
"List",
"spawnableWaterCreatureList",
";",
"private",
"boolean",
"enableSnow",
";",
"private",
"boolean",
"enableRain",
";",
"public",
"final",
"int",
"biomeID",
";",
"protected",
"WorldGenTrees",
"worldGenTrees",
";",
"protected",
"WorldGenBigTree",
"worldGenBigTree",
";",
"protected",
"WorldGenForest",
"worldGenForest",
";",
"protected",
"WorldGenSwamp",
"worldGenSwamp",
";",
"protected",
"BiomeGenBase",
"(",
"int",
"par1",
")",
"{",
"topBlock",
"=",
"(",
"byte",
")",
"Block",
".",
"grass",
".",
"blockID",
";",
"fillerBlock",
"=",
"(",
"byte",
")",
"Block",
".",
"dirt",
".",
"blockID",
";",
"field_6161_q",
"=",
"0x4ee031",
";",
"minHeight",
"=",
"0.1F",
";",
"maxHeight",
"=",
"0.3F",
";",
"temperature",
"=",
"0.5F",
";",
"rainfall",
"=",
"0.5F",
";",
"waterColorMultiplier",
"=",
"0xffffff",
";",
"spawnableMonsterList",
"=",
"new",
"ArrayList",
"(",
")",
";",
"spawnableCreatureList",
"=",
"new",
"ArrayList",
"(",
")",
";",
"spawnableWaterCreatureList",
"=",
"new",
"ArrayList",
"(",
")",
";",
"enableRain",
"=",
"true",
";",
"worldGenTrees",
"=",
"new",
"WorldGenTrees",
"(",
"false",
")",
";",
"worldGenBigTree",
"=",
"new",
"WorldGenBigTree",
"(",
"false",
")",
";",
"worldGenForest",
"=",
"new",
"WorldGenForest",
"(",
"false",
")",
";",
"worldGenSwamp",
"=",
"new",
"WorldGenSwamp",
"(",
")",
";",
"biomeID",
"=",
"par1",
";",
"biomeList",
"[",
"par1",
"]",
"=",
"this",
";",
"biomeDecorator",
"=",
"createBiomeDecorator",
"(",
")",
";",
"spawnableCreatureList",
".",
"add",
"(",
"new",
"SpawnListEntry",
"(",
"net",
".",
"minecraft",
".",
"src",
".",
"EntitySheep",
".",
"class",
",",
"12",
",",
"4",
",",
"4",
")",
")",
";",
"spawnableCreatureList",
".",
"add",
"(",
"new",
"SpawnListEntry",
"(",
"net",
".",
"minecraft",
".",
"src",
".",
"EntityPig",
".",
"class",
",",
"10",
",",
"4",
",",
"4",
")",
")",
";",
"spawnableCreatureList",
".",
"add",
"(",
"new",
"SpawnListEntry",
"(",
"net",
".",
"minecraft",
".",
"src",
".",
"EntityChicken",
".",
"class",
",",
"10",
",",
"4",
",",
"4",
")",
")",
";",
"spawnableCreatureList",
".",
"add",
"(",
"new",
"SpawnListEntry",
"(",
"net",
".",
"minecraft",
".",
"src",
".",
"EntityCow",
".",
"class",
",",
"8",
",",
"4",
",",
"4",
")",
")",
";",
"spawnableMonsterList",
".",
"add",
"(",
"new",
"SpawnListEntry",
"(",
"net",
".",
"minecraft",
".",
"src",
".",
"EntitySpider",
".",
"class",
",",
"10",
",",
"4",
",",
"4",
")",
")",
";",
"spawnableMonsterList",
".",
"add",
"(",
"new",
"SpawnListEntry",
"(",
"net",
".",
"minecraft",
".",
"src",
".",
"EntityZombie",
".",
"class",
",",
"10",
",",
"4",
",",
"4",
")",
")",
";",
"spawnableMonsterList",
".",
"add",
"(",
"new",
"SpawnListEntry",
"(",
"net",
".",
"minecraft",
".",
"src",
".",
"EntitySkeleton",
".",
"class",
",",
"10",
",",
"4",
",",
"4",
")",
")",
";",
"spawnableMonsterList",
".",
"add",
"(",
"new",
"SpawnListEntry",
"(",
"net",
".",
"minecraft",
".",
"src",
".",
"EntityCreeper",
".",
"class",
",",
"10",
",",
"4",
",",
"4",
")",
")",
";",
"spawnableMonsterList",
".",
"add",
"(",
"new",
"SpawnListEntry",
"(",
"net",
".",
"minecraft",
".",
"src",
".",
"EntitySlime",
".",
"class",
",",
"10",
",",
"4",
",",
"4",
")",
")",
";",
"spawnableMonsterList",
".",
"add",
"(",
"new",
"SpawnListEntry",
"(",
"net",
".",
"minecraft",
".",
"src",
".",
"EntityEnderman",
".",
"class",
",",
"1",
",",
"1",
",",
"4",
")",
")",
";",
"spawnableWaterCreatureList",
".",
"add",
"(",
"new",
"SpawnListEntry",
"(",
"net",
".",
"minecraft",
".",
"src",
".",
"EntitySquid",
".",
"class",
",",
"10",
",",
"4",
",",
"4",
")",
")",
";",
"}",
"protected",
"BiomeDecorator",
"createBiomeDecorator",
"(",
")",
"{",
"return",
"new",
"BiomeDecorator",
"(",
"this",
")",
";",
"}",
"private",
"BiomeGenBase",
"setTemperatureRainfall",
"(",
"float",
"par1",
",",
"float",
"par2",
")",
"{",
"if",
"(",
"par1",
">",
"0.1F",
"&&",
"par1",
"<",
"0.2F",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"\"",
")",
";",
"}",
"else",
"{",
"temperature",
"=",
"par1",
";",
"rainfall",
"=",
"par2",
";",
"return",
"this",
";",
"}",
"}",
"private",
"BiomeGenBase",
"setMinMaxHeight",
"(",
"float",
"par1",
",",
"float",
"par2",
")",
"{",
"minHeight",
"=",
"par1",
";",
"maxHeight",
"=",
"par2",
";",
"return",
"this",
";",
"}",
"private",
"BiomeGenBase",
"setDisableRain",
"(",
")",
"{",
"enableRain",
"=",
"false",
";",
"return",
"this",
";",
"}",
"public",
"WorldGenerator",
"getRandomWorldGenForTrees",
"(",
"Random",
"par1Random",
")",
"{",
"if",
"(",
"par1Random",
".",
"nextInt",
"(",
"10",
")",
"==",
"0",
")",
"{",
"return",
"worldGenBigTree",
";",
"}",
"else",
"{",
"return",
"worldGenTrees",
";",
"}",
"}",
"public",
"WorldGenerator",
"func_48440_b",
"(",
"Random",
"par1Random",
")",
"{",
"return",
"new",
"WorldGenTallGrass",
"(",
"Block",
".",
"tallGrass",
".",
"blockID",
",",
"1",
")",
";",
"}",
"protected",
"BiomeGenBase",
"func_50024_b",
"(",
")",
"{",
"enableSnow",
"=",
"true",
";",
"return",
"this",
";",
"}",
"protected",
"BiomeGenBase",
"setBiomeName",
"(",
"String",
"par1Str",
")",
"{",
"biomeName",
"=",
"par1Str",
";",
"return",
"this",
";",
"}",
"protected",
"BiomeGenBase",
"func_4080_a",
"(",
"int",
"par1",
")",
"{",
"field_6161_q",
"=",
"par1",
";",
"return",
"this",
";",
"}",
"protected",
"BiomeGenBase",
"setColor",
"(",
"int",
"par1",
")",
"{",
"color",
"=",
"par1",
";",
"return",
"this",
";",
"}",
"public",
"List",
"getSpawnableList",
"(",
"EnumCreatureType",
"par1EnumCreatureType",
")",
"{",
"if",
"(",
"par1EnumCreatureType",
"==",
"EnumCreatureType",
".",
"monster",
")",
"{",
"return",
"spawnableMonsterList",
";",
"}",
"if",
"(",
"par1EnumCreatureType",
"==",
"EnumCreatureType",
".",
"creature",
")",
"{",
"return",
"spawnableCreatureList",
";",
"}",
"if",
"(",
"par1EnumCreatureType",
"==",
"EnumCreatureType",
".",
"waterCreature",
")",
"{",
"return",
"spawnableWaterCreatureList",
";",
"}",
"else",
"{",
"return",
"null",
";",
"}",
"}",
"public",
"boolean",
"getEnableSnow",
"(",
")",
"{",
"return",
"enableSnow",
";",
"}",
"public",
"boolean",
"canSpawnLightningBolt",
"(",
")",
"{",
"if",
"(",
"enableSnow",
")",
"{",
"return",
"false",
";",
"}",
"else",
"{",
"return",
"enableRain",
";",
"}",
"}",
"public",
"boolean",
"func_48441_d",
"(",
")",
"{",
"return",
"rainfall",
">",
"0.85F",
";",
"}",
"public",
"float",
"getSpawningChance",
"(",
")",
"{",
"return",
"0.1F",
";",
"}",
"public",
"final",
"int",
"getIntRainfall",
"(",
")",
"{",
"return",
"(",
"int",
")",
"(",
"rainfall",
"*",
"65536F",
")",
";",
"}",
"public",
"final",
"int",
"getIntTemperature",
"(",
")",
"{",
"return",
"(",
"int",
")",
"(",
"temperature",
"*",
"65536F",
")",
";",
"}",
"public",
"final",
"float",
"getFloatTemperature",
"(",
")",
"{",
"return",
"temperature",
";",
"}",
"public",
"void",
"decorate",
"(",
"World",
"par1World",
",",
"Random",
"par2Random",
",",
"int",
"par3",
",",
"int",
"par4",
")",
"{",
"biomeDecorator",
".",
"decorate",
"(",
"par1World",
",",
"par2Random",
",",
"par3",
",",
"par4",
")",
";",
"}",
"}",
"</s>"
] |
9,493 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"class",
"EnchantmentUntouching",
"extends",
"Enchantment",
"{",
"protected",
"EnchantmentUntouching",
"(",
"int",
"par1",
",",
"int",
"par2",
")",
"{",
"super",
"(",
"par1",
",",
"par2",
",",
"EnumEnchantmentType",
".",
"digger",
")",
";",
"setName",
"(",
"\"untouching\"",
")",
";",
"}",
"public",
"int",
"getMinEnchantability",
"(",
"int",
"par1",
")",
"{",
"return",
"25",
";",
"}",
"public",
"int",
"getMaxEnchantability",
"(",
"int",
"par1",
")",
"{",
"return",
"super",
".",
"getMinEnchantability",
"(",
"par1",
")",
"+",
"50",
";",
"}",
"public",
"int",
"getMaxLevel",
"(",
")",
"{",
"return",
"1",
";",
"}",
"public",
"boolean",
"canApplyTogether",
"(",
"Enchantment",
"par1Enchantment",
")",
"{",
"return",
"super",
".",
"canApplyTogether",
"(",
"par1Enchantment",
")",
"&&",
"par1Enchantment",
".",
"effectId",
"!=",
"fortune",
".",
"effectId",
";",
"}",
"}",
"</s>"
] |
9,494 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"abstract",
"class",
"WorldProvider",
"{",
"public",
"World",
"worldObj",
";",
"public",
"WorldType",
"terrainType",
";",
"public",
"WorldChunkManager",
"worldChunkMgr",
";",
"public",
"boolean",
"isHellWorld",
";",
"public",
"boolean",
"hasNoSky",
";",
"public",
"float",
"lightBrightnessTable",
"[",
"]",
";",
"public",
"int",
"worldType",
";",
"private",
"float",
"colorsSunriseSunset",
"[",
"]",
";",
"public",
"WorldProvider",
"(",
")",
"{",
"isHellWorld",
"=",
"false",
";",
"hasNoSky",
"=",
"false",
";",
"lightBrightnessTable",
"=",
"new",
"float",
"[",
"16",
"]",
";",
"worldType",
"=",
"0",
";",
"colorsSunriseSunset",
"=",
"new",
"float",
"[",
"4",
"]",
";",
"}",
"public",
"final",
"void",
"registerWorld",
"(",
"World",
"par1World",
")",
"{",
"worldObj",
"=",
"par1World",
";",
"terrainType",
"=",
"par1World",
".",
"getWorldInfo",
"(",
")",
".",
"getTerrainType",
"(",
")",
";",
"registerWorldChunkManager",
"(",
")",
";",
"generateLightBrightnessTable",
"(",
")",
";",
"}",
"protected",
"void",
"generateLightBrightnessTable",
"(",
")",
"{",
"float",
"f",
"=",
"0.0F",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<=",
"15",
";",
"i",
"++",
")",
"{",
"float",
"f1",
"=",
"1.0F",
"-",
"(",
"float",
")",
"i",
"/",
"15F",
";",
"lightBrightnessTable",
"[",
"i",
"]",
"=",
"(",
"(",
"1.0F",
"-",
"f1",
")",
"/",
"(",
"f1",
"*",
"3F",
"+",
"1.0F",
")",
")",
"*",
"(",
"1.0F",
"-",
"f",
")",
"+",
"f",
";",
"}",
"}",
"protected",
"void",
"registerWorldChunkManager",
"(",
")",
"{",
"if",
"(",
"worldObj",
".",
"getWorldInfo",
"(",
")",
".",
"getTerrainType",
"(",
")",
"==",
"WorldType",
".",
"FLAT",
")",
"{",
"worldChunkMgr",
"=",
"new",
"WorldChunkManagerHell",
"(",
"BiomeGenBase",
".",
"plains",
",",
"0.5F",
",",
"0.5F",
")",
";",
"}",
"else",
"{",
"worldChunkMgr",
"=",
"new",
"WorldChunkManager",
"(",
"worldObj",
")",
";",
"}",
"}",
"public",
"IChunkProvider",
"getChunkProvider",
"(",
")",
"{",
"if",
"(",
"terrainType",
"==",
"WorldType",
".",
"FLAT",
")",
"{",
"return",
"new",
"ChunkProviderFlat",
"(",
"worldObj",
",",
"worldObj",
".",
"getSeed",
"(",
")",
",",
"worldObj",
".",
"getWorldInfo",
"(",
")",
".",
"isMapFeaturesEnabled",
"(",
")",
")",
";",
"}",
"else",
"{",
"return",
"new",
"ChunkProviderGenerate",
"(",
"worldObj",
",",
"worldObj",
".",
"getSeed",
"(",
")",
",",
"worldObj",
".",
"getWorldInfo",
"(",
")",
".",
"isMapFeaturesEnabled",
"(",
")",
")",
";",
"}",
"}",
"public",
"boolean",
"canCoordinateBeSpawn",
"(",
"int",
"par1",
",",
"int",
"par2",
")",
"{",
"int",
"i",
"=",
"worldObj",
".",
"getFirstUncoveredBlock",
"(",
"par1",
",",
"par2",
")",
";",
"return",
"i",
"==",
"Block",
".",
"grass",
".",
"blockID",
";",
"}",
"public",
"float",
"calculateCelestialAngle",
"(",
"long",
"par1",
",",
"float",
"par3",
")",
"{",
"int",
"i",
"=",
"(",
"int",
")",
"(",
"par1",
"%",
"24000L",
")",
";",
"float",
"f",
"=",
"(",
"(",
"float",
")",
"i",
"+",
"par3",
")",
"/",
"24000F",
"-",
"0.25F",
";",
"if",
"(",
"f",
"<",
"0.0F",
")",
"{",
"f",
"++",
";",
"}",
"if",
"(",
"f",
">",
"1.0F",
")",
"{",
"f",
"--",
";",
"}",
"float",
"f1",
"=",
"f",
";",
"f",
"=",
"1.0F",
"-",
"(",
"float",
")",
"(",
"(",
"Math",
".",
"cos",
"(",
"(",
"double",
")",
"f",
"*",
"Math",
".",
"PI",
")",
"+",
"1.0D",
")",
"/",
"2D",
")",
";",
"f",
"=",
"f1",
"+",
"(",
"f",
"-",
"f1",
")",
"/",
"3F",
";",
"return",
"f",
";",
"}",
"public",
"boolean",
"func_48567_d",
"(",
")",
"{",
"return",
"true",
";",
"}",
"public",
"boolean",
"canRespawnHere",
"(",
")",
"{",
"return",
"true",
";",
"}",
"public",
"static",
"WorldProvider",
"getProviderForDimension",
"(",
"int",
"par0",
")",
"{",
"if",
"(",
"par0",
"==",
"-",
"1",
")",
"{",
"return",
"new",
"WorldProviderHell",
"(",
")",
";",
"}",
"if",
"(",
"par0",
"==",
"0",
")",
"{",
"return",
"new",
"WorldProviderSurface",
"(",
")",
";",
"}",
"if",
"(",
"par0",
"==",
"1",
")",
"{",
"return",
"new",
"WorldProviderEnd",
"(",
")",
";",
"}",
"else",
"{",
"return",
"null",
";",
"}",
"}",
"public",
"ChunkCoordinates",
"getEntrancePortalLocation",
"(",
")",
"{",
"return",
"null",
";",
"}",
"public",
"int",
"getAverageGroundLevel",
"(",
")",
"{",
"return",
"terrainType",
"!=",
"WorldType",
".",
"FLAT",
"?",
"64",
":",
"4",
";",
"}",
"}",
"</s>"
] |
9,495 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"public",
"class",
"RecipesWeapons",
"{",
"private",
"String",
"recipePatterns",
"[",
"]",
"[",
"]",
"=",
"{",
"{",
"\"X\"",
",",
"\"X\"",
",",
"\"#\"",
"}",
"}",
";",
"private",
"Object",
"recipeItems",
"[",
"]",
"[",
"]",
";",
"public",
"RecipesWeapons",
"(",
")",
"{",
"recipeItems",
"=",
"(",
"new",
"Object",
"[",
"]",
"[",
"]",
"{",
"new",
"Object",
"[",
"]",
"{",
"Block",
".",
"planks",
",",
"Block",
".",
"cobblestone",
",",
"Item",
".",
"ingotIron",
",",
"Item",
".",
"diamond",
",",
"Item",
".",
"ingotGold",
"}",
",",
"new",
"Object",
"[",
"]",
"{",
"Item",
".",
"swordWood",
",",
"Item",
".",
"swordStone",
",",
"Item",
".",
"swordSteel",
",",
"Item",
".",
"swordDiamond",
",",
"Item",
".",
"swordGold",
"}",
"}",
")",
";",
"}",
"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",
".",
"bow",
",",
"1",
")",
",",
"new",
"Object",
"[",
"]",
"{",
"\"",
"#X\"",
",",
"\"#",
"X\"",
",",
"\"",
"#X\"",
",",
"'X'",
",",
"Item",
".",
"silk",
",",
"'#'",
",",
"Item",
".",
"stick",
"}",
")",
";",
"par1CraftingManager",
".",
"addRecipe",
"(",
"new",
"ItemStack",
"(",
"Item",
".",
"arrow",
",",
"4",
")",
",",
"new",
"Object",
"[",
"]",
"{",
"\"X\"",
",",
"\"#\"",
",",
"\"Y\"",
",",
"'Y'",
",",
"Item",
".",
"feather",
",",
"'X'",
",",
"Item",
".",
"flint",
",",
"'#'",
",",
"Item",
".",
"stick",
"}",
")",
";",
"}",
"}",
"</s>"
] |
9,496 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"WorldGenForest",
"extends",
"WorldGenerator",
"{",
"public",
"WorldGenForest",
"(",
"boolean",
"par1",
")",
"{",
"super",
"(",
"par1",
")",
";",
"}",
"public",
"boolean",
"generate",
"(",
"World",
"par1World",
",",
"Random",
"par2Random",
",",
"int",
"par3",
",",
"int",
"par4",
",",
"int",
"par5",
")",
"{",
"int",
"i",
"=",
"par2Random",
".",
"nextInt",
"(",
"3",
")",
"+",
"5",
";",
"boolean",
"flag",
"=",
"true",
";",
"if",
"(",
"par4",
"<",
"1",
"||",
"par4",
"+",
"i",
"+",
"1",
">",
"256",
")",
"{",
"return",
"false",
";",
"}",
"for",
"(",
"int",
"j",
"=",
"par4",
";",
"j",
"<=",
"par4",
"+",
"1",
"+",
"i",
";",
"j",
"++",
")",
"{",
"byte",
"byte0",
"=",
"1",
";",
"if",
"(",
"j",
"==",
"par4",
")",
"{",
"byte0",
"=",
"0",
";",
"}",
"if",
"(",
"j",
">=",
"(",
"par4",
"+",
"1",
"+",
"i",
")",
"-",
"2",
")",
"{",
"byte0",
"=",
"2",
";",
"}",
"for",
"(",
"int",
"j1",
"=",
"par3",
"-",
"byte0",
";",
"j1",
"<=",
"par3",
"+",
"byte0",
"&&",
"flag",
";",
"j1",
"++",
")",
"{",
"for",
"(",
"int",
"i2",
"=",
"par5",
"-",
"byte0",
";",
"i2",
"<=",
"par5",
"+",
"byte0",
"&&",
"flag",
";",
"i2",
"++",
")",
"{",
"if",
"(",
"j",
">=",
"0",
"&&",
"j",
"<",
"256",
")",
"{",
"int",
"k2",
"=",
"par1World",
".",
"getBlockId",
"(",
"j1",
",",
"j",
",",
"i2",
")",
";",
"if",
"(",
"k2",
"!=",
"0",
"&&",
"k2",
"!=",
"Block",
".",
"leaves",
".",
"blockID",
")",
"{",
"flag",
"=",
"false",
";",
"}",
"}",
"else",
"{",
"flag",
"=",
"false",
";",
"}",
"}",
"}",
"}",
"if",
"(",
"!",
"flag",
")",
"{",
"return",
"false",
";",
"}",
"int",
"k",
"=",
"par1World",
".",
"getBlockId",
"(",
"par3",
",",
"par4",
"-",
"1",
",",
"par5",
")",
";",
"if",
"(",
"k",
"!=",
"Block",
".",
"grass",
".",
"blockID",
"&&",
"k",
"!=",
"Block",
".",
"dirt",
".",
"blockID",
"||",
"par4",
">=",
"256",
"-",
"i",
"-",
"1",
")",
"{",
"return",
"false",
";",
"}",
"func_50023_a",
"(",
"par1World",
",",
"par3",
",",
"par4",
"-",
"1",
",",
"par5",
",",
"Block",
".",
"dirt",
".",
"blockID",
")",
";",
"for",
"(",
"int",
"l",
"=",
"(",
"par4",
"-",
"3",
")",
"+",
"i",
";",
"l",
"<=",
"par4",
"+",
"i",
";",
"l",
"++",
")",
"{",
"int",
"k1",
"=",
"l",
"-",
"(",
"par4",
"+",
"i",
")",
";",
"int",
"j2",
"=",
"1",
"-",
"k1",
"/",
"2",
";",
"for",
"(",
"int",
"l2",
"=",
"par3",
"-",
"j2",
";",
"l2",
"<=",
"par3",
"+",
"j2",
";",
"l2",
"++",
")",
"{",
"int",
"i3",
"=",
"l2",
"-",
"par3",
";",
"for",
"(",
"int",
"j3",
"=",
"par5",
"-",
"j2",
";",
"j3",
"<=",
"par5",
"+",
"j2",
";",
"j3",
"++",
")",
"{",
"int",
"k3",
"=",
"j3",
"-",
"par5",
";",
"if",
"(",
"(",
"Math",
".",
"abs",
"(",
"i3",
")",
"!=",
"j2",
"||",
"Math",
".",
"abs",
"(",
"k3",
")",
"!=",
"j2",
"||",
"par2Random",
".",
"nextInt",
"(",
"2",
")",
"!=",
"0",
"&&",
"k1",
"!=",
"0",
")",
"&&",
"!",
"Block",
".",
"opaqueCubeLookup",
"[",
"par1World",
".",
"getBlockId",
"(",
"l2",
",",
"l",
",",
"j3",
")",
"]",
")",
"{",
"setBlockAndMetadata",
"(",
"par1World",
",",
"l2",
",",
"l",
",",
"j3",
",",
"Block",
".",
"leaves",
".",
"blockID",
",",
"2",
")",
";",
"}",
"}",
"}",
"}",
"for",
"(",
"int",
"i1",
"=",
"0",
";",
"i1",
"<",
"i",
";",
"i1",
"++",
")",
"{",
"int",
"l1",
"=",
"par1World",
".",
"getBlockId",
"(",
"par3",
",",
"par4",
"+",
"i1",
",",
"par5",
")",
";",
"if",
"(",
"l1",
"==",
"0",
"||",
"l1",
"==",
"Block",
".",
"leaves",
".",
"blockID",
")",
"{",
"setBlockAndMetadata",
"(",
"par1World",
",",
"par3",
",",
"par4",
"+",
"i1",
",",
"par5",
",",
"Block",
".",
"wood",
".",
"blockID",
",",
"2",
")",
";",
"}",
"}",
"return",
"true",
";",
"}",
"}",
"</s>"
] |
9,497 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"io",
".",
"*",
";",
"import",
"java",
".",
"util",
".",
"*",
";",
"public",
"class",
"NBTTagCompound",
"extends",
"NBTBase",
"{",
"private",
"Map",
"tagMap",
";",
"public",
"NBTTagCompound",
"(",
")",
"{",
"super",
"(",
"\"\"",
")",
";",
"tagMap",
"=",
"new",
"HashMap",
"(",
")",
";",
"}",
"public",
"NBTTagCompound",
"(",
"String",
"par1Str",
")",
"{",
"super",
"(",
"par1Str",
")",
";",
"tagMap",
"=",
"new",
"HashMap",
"(",
")",
";",
"}",
"void",
"write",
"(",
"DataOutput",
"par1DataOutput",
")",
"throws",
"IOException",
"{",
"NBTBase",
"nbtbase",
";",
"for",
"(",
"Iterator",
"iterator",
"=",
"tagMap",
".",
"values",
"(",
")",
".",
"iterator",
"(",
")",
";",
"iterator",
".",
"hasNext",
"(",
")",
";",
"NBTBase",
".",
"writeNamedTag",
"(",
"nbtbase",
",",
"par1DataOutput",
")",
")",
"{",
"nbtbase",
"=",
"(",
"NBTBase",
")",
"iterator",
".",
"next",
"(",
")",
";",
"}",
"par1DataOutput",
".",
"writeByte",
"(",
"0",
")",
";",
"}",
"void",
"load",
"(",
"DataInput",
"par1DataInput",
")",
"throws",
"IOException",
"{",
"tagMap",
".",
"clear",
"(",
")",
";",
"NBTBase",
"nbtbase",
";",
"for",
"(",
";",
"(",
"nbtbase",
"=",
"NBTBase",
".",
"readNamedTag",
"(",
"par1DataInput",
")",
")",
".",
"getId",
"(",
")",
"!=",
"0",
";",
"tagMap",
".",
"put",
"(",
"nbtbase",
".",
"getName",
"(",
")",
",",
"nbtbase",
")",
")",
"{",
"}",
"}",
"public",
"Collection",
"getTags",
"(",
")",
"{",
"return",
"tagMap",
".",
"values",
"(",
")",
";",
"}",
"public",
"byte",
"getId",
"(",
")",
"{",
"return",
"10",
";",
"}",
"public",
"void",
"setTag",
"(",
"String",
"par1Str",
",",
"NBTBase",
"par2NBTBase",
")",
"{",
"tagMap",
".",
"put",
"(",
"par1Str",
",",
"par2NBTBase",
".",
"setName",
"(",
"par1Str",
")",
")",
";",
"}",
"public",
"void",
"setByte",
"(",
"String",
"par1Str",
",",
"byte",
"par2",
")",
"{",
"tagMap",
".",
"put",
"(",
"par1Str",
",",
"new",
"NBTTagByte",
"(",
"par1Str",
",",
"par2",
")",
")",
";",
"}",
"public",
"void",
"setShort",
"(",
"String",
"par1Str",
",",
"short",
"par2",
")",
"{",
"tagMap",
".",
"put",
"(",
"par1Str",
",",
"new",
"NBTTagShort",
"(",
"par1Str",
",",
"par2",
")",
")",
";",
"}",
"public",
"void",
"setInteger",
"(",
"String",
"par1Str",
",",
"int",
"par2",
")",
"{",
"tagMap",
".",
"put",
"(",
"par1Str",
",",
"new",
"NBTTagInt",
"(",
"par1Str",
",",
"par2",
")",
")",
";",
"}",
"public",
"void",
"setLong",
"(",
"String",
"par1Str",
",",
"long",
"par2",
")",
"{",
"tagMap",
".",
"put",
"(",
"par1Str",
",",
"new",
"NBTTagLong",
"(",
"par1Str",
",",
"par2",
")",
")",
";",
"}",
"public",
"void",
"setFloat",
"(",
"String",
"par1Str",
",",
"float",
"par2",
")",
"{",
"tagMap",
".",
"put",
"(",
"par1Str",
",",
"new",
"NBTTagFloat",
"(",
"par1Str",
",",
"par2",
")",
")",
";",
"}",
"public",
"void",
"setDouble",
"(",
"String",
"par1Str",
",",
"double",
"par2",
")",
"{",
"tagMap",
".",
"put",
"(",
"par1Str",
",",
"new",
"NBTTagDouble",
"(",
"par1Str",
",",
"par2",
")",
")",
";",
"}",
"public",
"void",
"setString",
"(",
"String",
"par1Str",
",",
"String",
"par2Str",
")",
"{",
"tagMap",
".",
"put",
"(",
"par1Str",
",",
"new",
"NBTTagString",
"(",
"par1Str",
",",
"par2Str",
")",
")",
";",
"}",
"public",
"void",
"setByteArray",
"(",
"String",
"par1Str",
",",
"byte",
"par2ArrayOfByte",
"[",
"]",
")",
"{",
"tagMap",
".",
"put",
"(",
"par1Str",
",",
"new",
"NBTTagByteArray",
"(",
"par1Str",
",",
"par2ArrayOfByte",
")",
")",
";",
"}",
"public",
"void",
"func_48446_a",
"(",
"String",
"par1Str",
",",
"int",
"par2ArrayOfInteger",
"[",
"]",
")",
"{",
"tagMap",
".",
"put",
"(",
"par1Str",
",",
"new",
"NBTTagIntArray",
"(",
"par1Str",
",",
"par2ArrayOfInteger",
")",
")",
";",
"}",
"public",
"void",
"setCompoundTag",
"(",
"String",
"par1Str",
",",
"NBTTagCompound",
"par2NBTTagCompound",
")",
"{",
"tagMap",
".",
"put",
"(",
"par1Str",
",",
"par2NBTTagCompound",
".",
"setName",
"(",
"par1Str",
")",
")",
";",
"}",
"public",
"void",
"setBoolean",
"(",
"String",
"par1Str",
",",
"boolean",
"par2",
")",
"{",
"setByte",
"(",
"par1Str",
",",
"(",
"(",
"byte",
")",
"(",
"par2",
"?",
"1",
":",
"0",
")",
")",
")",
";",
"}",
"public",
"NBTBase",
"getTag",
"(",
"String",
"par1Str",
")",
"{",
"return",
"(",
"NBTBase",
")",
"tagMap",
".",
"get",
"(",
"par1Str",
")",
";",
"}",
"public",
"boolean",
"hasKey",
"(",
"String",
"par1Str",
")",
"{",
"return",
"tagMap",
".",
"containsKey",
"(",
"par1Str",
")",
";",
"}",
"public",
"byte",
"getByte",
"(",
"String",
"par1Str",
")",
"{",
"if",
"(",
"!",
"tagMap",
".",
"containsKey",
"(",
"par1Str",
")",
")",
"{",
"return",
"0",
";",
"}",
"else",
"{",
"return",
"(",
"(",
"NBTTagByte",
")",
"tagMap",
".",
"get",
"(",
"par1Str",
")",
")",
".",
"data",
";",
"}",
"}",
"public",
"short",
"getShort",
"(",
"String",
"par1Str",
")",
"{",
"if",
"(",
"!",
"tagMap",
".",
"containsKey",
"(",
"par1Str",
")",
")",
"{",
"return",
"0",
";",
"}",
"else",
"{",
"return",
"(",
"(",
"NBTTagShort",
")",
"tagMap",
".",
"get",
"(",
"par1Str",
")",
")",
".",
"data",
";",
"}",
"}",
"public",
"int",
"getInteger",
"(",
"String",
"par1Str",
")",
"{",
"if",
"(",
"!",
"tagMap",
".",
"containsKey",
"(",
"par1Str",
")",
")",
"{",
"return",
"0",
";",
"}",
"else",
"{",
"return",
"(",
"(",
"NBTTagInt",
")",
"tagMap",
".",
"get",
"(",
"par1Str",
")",
")",
".",
"data",
";",
"}",
"}",
"public",
"long",
"getLong",
"(",
"String",
"par1Str",
")",
"{",
"if",
"(",
"!",
"tagMap",
".",
"containsKey",
"(",
"par1Str",
")",
")",
"{",
"return",
"0L",
";",
"}",
"else",
"{",
"return",
"(",
"(",
"NBTTagLong",
")",
"tagMap",
".",
"get",
"(",
"par1Str",
")",
")",
".",
"data",
";",
"}",
"}",
"public",
"float",
"getFloat",
"(",
"String",
"par1Str",
")",
"{",
"if",
"(",
"!",
"tagMap",
".",
"containsKey",
"(",
"par1Str",
")",
")",
"{",
"return",
"0.0F",
";",
"}",
"else",
"{",
"return",
"(",
"(",
"NBTTagFloat",
")",
"tagMap",
".",
"get",
"(",
"par1Str",
")",
")",
".",
"data",
";",
"}",
"}",
"public",
"double",
"getDouble",
"(",
"String",
"par1Str",
")",
"{",
"if",
"(",
"!",
"tagMap",
".",
"containsKey",
"(",
"par1Str",
")",
")",
"{",
"return",
"0.0D",
";",
"}",
"else",
"{",
"return",
"(",
"(",
"NBTTagDouble",
")",
"tagMap",
".",
"get",
"(",
"par1Str",
")",
")",
".",
"data",
";",
"}",
"}",
"public",
"String",
"getString",
"(",
"String",
"par1Str",
")",
"{",
"if",
"(",
"!",
"tagMap",
".",
"containsKey",
"(",
"par1Str",
")",
")",
"{",
"return",
"\"\"",
";",
"}",
"else",
"{",
"return",
"(",
"(",
"NBTTagString",
")",
"tagMap",
".",
"get",
"(",
"par1Str",
")",
")",
".",
"data",
";",
"}",
"}",
"public",
"byte",
"[",
"]",
"getByteArray",
"(",
"String",
"par1Str",
")",
"{",
"if",
"(",
"!",
"tagMap",
".",
"containsKey",
"(",
"par1Str",
")",
")",
"{",
"return",
"new",
"byte",
"[",
"0",
"]",
";",
"}",
"else",
"{",
"return",
"(",
"(",
"NBTTagByteArray",
")",
"tagMap",
".",
"get",
"(",
"par1Str",
")",
")",
".",
"byteArray",
";",
"}",
"}",
"public",
"int",
"[",
"]",
"func_48445_l",
"(",
"String",
"par1Str",
")",
"{",
"if",
"(",
"!",
"tagMap",
".",
"containsKey",
"(",
"par1Str",
")",
")",
"{",
"return",
"new",
"int",
"[",
"0",
"]",
";",
"}",
"else",
"{",
"return",
"(",
"(",
"NBTTagIntArray",
")",
"tagMap",
".",
"get",
"(",
"par1Str",
")",
")",
".",
"field_48447_a",
";",
"}",
"}",
"public",
"NBTTagCompound",
"getCompoundTag",
"(",
"String",
"par1Str",
")",
"{",
"if",
"(",
"!",
"tagMap",
".",
"containsKey",
"(",
"par1Str",
")",
")",
"{",
"return",
"new",
"NBTTagCompound",
"(",
"par1Str",
")",
";",
"}",
"else",
"{",
"return",
"(",
"NBTTagCompound",
")",
"tagMap",
".",
"get",
"(",
"par1Str",
")",
";",
"}",
"}",
"public",
"NBTTagList",
"getTagList",
"(",
"String",
"par1Str",
")",
"{",
"if",
"(",
"!",
"tagMap",
".",
"containsKey",
"(",
"par1Str",
")",
")",
"{",
"return",
"new",
"NBTTagList",
"(",
"par1Str",
")",
";",
"}",
"else",
"{",
"return",
"(",
"NBTTagList",
")",
"tagMap",
".",
"get",
"(",
"par1Str",
")",
";",
"}",
"}",
"public",
"boolean",
"getBoolean",
"(",
"String",
"par1Str",
")",
"{",
"return",
"getByte",
"(",
"par1Str",
")",
"!=",
"0",
";",
"}",
"public",
"String",
"toString",
"(",
")",
"{",
"return",
"(",
"new",
"StringBuilder",
"(",
")",
")",
".",
"append",
"(",
"\"\"",
")",
".",
"append",
"(",
"tagMap",
".",
"size",
"(",
")",
")",
".",
"append",
"(",
"\"",
"entries\"",
")",
".",
"toString",
"(",
")",
";",
"}",
"public",
"NBTBase",
"copy",
"(",
")",
"{",
"NBTTagCompound",
"nbttagcompound",
"=",
"new",
"NBTTagCompound",
"(",
"getName",
"(",
")",
")",
";",
"String",
"s",
";",
"for",
"(",
"Iterator",
"iterator",
"=",
"tagMap",
".",
"keySet",
"(",
")",
".",
"iterator",
"(",
")",
";",
"iterator",
".",
"hasNext",
"(",
")",
";",
"nbttagcompound",
".",
"setTag",
"(",
"s",
",",
"(",
"(",
"NBTBase",
")",
"tagMap",
".",
"get",
"(",
"s",
")",
")",
".",
"copy",
"(",
")",
")",
")",
"{",
"s",
"=",
"(",
"String",
")",
"iterator",
".",
"next",
"(",
")",
";",
"}",
"return",
"nbttagcompound",
";",
"}",
"public",
"boolean",
"equals",
"(",
"Object",
"par1Obj",
")",
"{",
"if",
"(",
"super",
".",
"equals",
"(",
"par1Obj",
")",
")",
"{",
"NBTTagCompound",
"nbttagcompound",
"=",
"(",
"NBTTagCompound",
")",
"par1Obj",
";",
"return",
"tagMap",
".",
"entrySet",
"(",
")",
".",
"equals",
"(",
"nbttagcompound",
".",
"tagMap",
".",
"entrySet",
"(",
")",
")",
";",
"}",
"else",
"{",
"return",
"false",
";",
"}",
"}",
"public",
"int",
"hashCode",
"(",
")",
"{",
"return",
"super",
".",
"hashCode",
"(",
")",
"^",
"tagMap",
".",
"hashCode",
"(",
")",
";",
"}",
"}",
"</s>"
] |
9,498 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"Random",
";",
"public",
"class",
"TileEntityEnchantmentTable",
"extends",
"TileEntity",
"{",
"public",
"int",
"tickCount",
";",
"public",
"float",
"pageFlip",
";",
"public",
"float",
"pageFlipPrev",
";",
"public",
"float",
"field_40066_d",
";",
"public",
"float",
"field_40067_e",
";",
"public",
"float",
"bookSpread",
";",
"public",
"float",
"bookSpreadPrev",
";",
"public",
"float",
"bookRotation2",
";",
"public",
"float",
"bookRotationPrev",
";",
"public",
"float",
"bookRotation",
";",
"private",
"static",
"Random",
"rand",
"=",
"new",
"Random",
"(",
")",
";",
"public",
"TileEntityEnchantmentTable",
"(",
")",
"{",
"}",
"public",
"void",
"updateEntity",
"(",
")",
"{",
"super",
".",
"updateEntity",
"(",
")",
";",
"bookSpreadPrev",
"=",
"bookSpread",
";",
"bookRotationPrev",
"=",
"bookRotation2",
";",
"EntityPlayer",
"entityplayer",
"=",
"worldObj",
".",
"getClosestPlayer",
"(",
"(",
"float",
")",
"xCoord",
"+",
"0.5F",
",",
"(",
"float",
")",
"yCoord",
"+",
"0.5F",
",",
"(",
"float",
")",
"zCoord",
"+",
"0.5F",
",",
"3D",
")",
";",
"if",
"(",
"entityplayer",
"!=",
"null",
")",
"{",
"double",
"d",
"=",
"entityplayer",
".",
"posX",
"-",
"(",
"double",
")",
"(",
"(",
"float",
")",
"xCoord",
"+",
"0.5F",
")",
";",
"double",
"d1",
"=",
"entityplayer",
".",
"posZ",
"-",
"(",
"double",
")",
"(",
"(",
"float",
")",
"zCoord",
"+",
"0.5F",
")",
";",
"bookRotation",
"=",
"(",
"float",
")",
"Math",
".",
"atan2",
"(",
"d1",
",",
"d",
")",
";",
"bookSpread",
"+=",
"0.1F",
";",
"if",
"(",
"bookSpread",
"<",
"0.5F",
"||",
"rand",
".",
"nextInt",
"(",
"40",
")",
"==",
"0",
")",
"{",
"float",
"f3",
"=",
"field_40066_d",
";",
"do",
"{",
"field_40066_d",
"+=",
"rand",
".",
"nextInt",
"(",
"4",
")",
"-",
"rand",
".",
"nextInt",
"(",
"4",
")",
";",
"}",
"while",
"(",
"f3",
"==",
"field_40066_d",
")",
";",
"}",
"}",
"else",
"{",
"bookRotation",
"+=",
"0.02F",
";",
"bookSpread",
"-=",
"0.1F",
";",
"}",
"for",
"(",
";",
"bookRotation2",
">=",
"(",
"float",
")",
"Math",
".",
"PI",
";",
"bookRotation2",
"-=",
"(",
"(",
"float",
")",
"Math",
".",
"PI",
"*",
"2F",
")",
")",
"{",
"}",
"for",
"(",
";",
"bookRotation2",
"<",
"-",
"(",
"float",
")",
"Math",
".",
"PI",
";",
"bookRotation2",
"+=",
"(",
"(",
"float",
")",
"Math",
".",
"PI",
"*",
"2F",
")",
")",
"{",
"}",
"for",
"(",
";",
"bookRotation",
">=",
"(",
"float",
")",
"Math",
".",
"PI",
";",
"bookRotation",
"-=",
"(",
"(",
"float",
")",
"Math",
".",
"PI",
"*",
"2F",
")",
")",
"{",
"}",
"for",
"(",
";",
"bookRotation",
"<",
"-",
"(",
"float",
")",
"Math",
".",
"PI",
";",
"bookRotation",
"+=",
"(",
"(",
"float",
")",
"Math",
".",
"PI",
"*",
"2F",
")",
")",
"{",
"}",
"float",
"f",
";",
"for",
"(",
"f",
"=",
"bookRotation",
"-",
"bookRotation2",
";",
"f",
">=",
"(",
"float",
")",
"Math",
".",
"PI",
";",
"f",
"-=",
"(",
"(",
"float",
")",
"Math",
".",
"PI",
"*",
"2F",
")",
")",
"{",
"}",
"for",
"(",
";",
"f",
"<",
"-",
"(",
"float",
")",
"Math",
".",
"PI",
";",
"f",
"+=",
"(",
"(",
"float",
")",
"Math",
".",
"PI",
"*",
"2F",
")",
")",
"{",
"}",
"bookRotation2",
"+=",
"f",
"*",
"0.4F",
";",
"if",
"(",
"bookSpread",
"<",
"0.0F",
")",
"{",
"bookSpread",
"=",
"0.0F",
";",
"}",
"if",
"(",
"bookSpread",
">",
"1.0F",
")",
"{",
"bookSpread",
"=",
"1.0F",
";",
"}",
"tickCount",
"++",
";",
"pageFlipPrev",
"=",
"pageFlip",
";",
"float",
"f1",
"=",
"(",
"field_40066_d",
"-",
"pageFlip",
")",
"*",
"0.4F",
";",
"float",
"f2",
"=",
"0.2F",
";",
"if",
"(",
"f1",
"<",
"-",
"f2",
")",
"{",
"f1",
"=",
"-",
"f2",
";",
"}",
"if",
"(",
"f1",
">",
"f2",
")",
"{",
"f1",
"=",
"f2",
";",
"}",
"field_40067_e",
"+=",
"(",
"f1",
"-",
"field_40067_e",
")",
"*",
"0.9F",
";",
"pageFlip",
"=",
"pageFlip",
"+",
"field_40067_e",
";",
"}",
"}",
"</s>"
] |
9,499 | [
"<s>",
"package",
"net",
".",
"minecraft",
".",
"src",
";",
"import",
"java",
".",
"io",
".",
"*",
";",
"public",
"class",
"Packet13PlayerLookMove",
"extends",
"Packet10Flying",
"{",
"public",
"Packet13PlayerLookMove",
"(",
")",
"{",
"rotating",
"=",
"true",
";",
"moving",
"=",
"true",
";",
"}",
"public",
"Packet13PlayerLookMove",
"(",
"double",
"par1",
",",
"double",
"par3",
",",
"double",
"par5",
",",
"double",
"par7",
",",
"float",
"par9",
",",
"float",
"par10",
",",
"boolean",
"par11",
")",
"{",
"xPosition",
"=",
"par1",
";",
"yPosition",
"=",
"par3",
";",
"stance",
"=",
"par5",
";",
"zPosition",
"=",
"par7",
";",
"yaw",
"=",
"par9",
";",
"pitch",
"=",
"par10",
";",
"onGround",
"=",
"par11",
";",
"rotating",
"=",
"true",
";",
"moving",
"=",
"true",
";",
"}",
"public",
"void",
"readPacketData",
"(",
"DataInputStream",
"par1DataInputStream",
")",
"throws",
"IOException",
"{",
"xPosition",
"=",
"par1DataInputStream",
".",
"readDouble",
"(",
")",
";",
"yPosition",
"=",
"par1DataInputStream",
".",
"readDouble",
"(",
")",
";",
"stance",
"=",
"par1DataInputStream",
".",
"readDouble",
"(",
")",
";",
"zPosition",
"=",
"par1DataInputStream",
".",
"readDouble",
"(",
")",
";",
"yaw",
"=",
"par1DataInputStream",
".",
"readFloat",
"(",
")",
";",
"pitch",
"=",
"par1DataInputStream",
".",
"readFloat",
"(",
")",
";",
"super",
".",
"readPacketData",
"(",
"par1DataInputStream",
")",
";",
"}",
"public",
"void",
"writePacketData",
"(",
"DataOutputStream",
"par1DataOutputStream",
")",
"throws",
"IOException",
"{",
"par1DataOutputStream",
".",
"writeDouble",
"(",
"xPosition",
")",
";",
"par1DataOutputStream",
".",
"writeDouble",
"(",
"yPosition",
")",
";",
"par1DataOutputStream",
".",
"writeDouble",
"(",
"stance",
")",
";",
"par1DataOutputStream",
".",
"writeDouble",
"(",
"zPosition",
")",
";",
"par1DataOutputStream",
".",
"writeFloat",
"(",
"yaw",
")",
";",
"par1DataOutputStream",
".",
"writeFloat",
"(",
"pitch",
")",
";",
"super",
".",
"writePacketData",
"(",
"par1DataOutputStream",
")",
";",
"}",
"public",
"int",
"getPacketSize",
"(",
")",
"{",
"return",
"41",
";",
"}",
"}",
"</s>"
] |
Subsets and Splits