id
int32
0
12.9k
code
sequencelengths
2
264k
9,700
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "Random", ";", "public", "class", "BlockSnowBlock", "extends", "Block", "{", "protected", "BlockSnowBlock", "(", "int", "par1", ",", "int", "par2", ")", "{", "super", "(", "par1", ",", "par2", ",", "Material", ".", "craftedSnow", ")", ";", "setTickRandomly", "(", "true", ")", ";", "}", "public", "int", "idDropped", "(", "int", "par1", ",", "Random", "par2Random", ",", "int", "par3", ")", "{", "return", "Item", ".", "snowball", ".", "shiftedIndex", ";", "}", "public", "int", "quantityDropped", "(", "Random", "par1Random", ")", "{", "return", "4", ";", "}", "public", "void", "updateTick", "(", "World", "par1World", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "Random", "par5Random", ")", "{", "if", "(", "par1World", ".", "getSavedLightValue", "(", "EnumSkyBlock", ".", "Block", ",", "par2", ",", "par3", ",", "par4", ")", ">", "11", ")", "{", "dropBlockAsItem", "(", "par1World", ",", "par2", ",", "par3", ",", "par4", ",", "par1World", ".", "getBlockMetadata", "(", "par2", ",", "par3", ",", "par4", ")", ",", "0", ")", ";", "par1World", ".", "setBlockWithNotify", "(", "par2", ",", "par3", ",", "par4", ",", "0", ")", ";", "}", "}", "}", "</s>" ]
9,701
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "class", "IntHashMapEntry", "{", "final", "int", "hashEntry", ";", "Object", "valueEntry", ";", "IntHashMapEntry", "nextEntry", ";", "final", "int", "slotHash", ";", "IntHashMapEntry", "(", "int", "par1", ",", "int", "par2", ",", "Object", "par3Obj", ",", "IntHashMapEntry", "par4IntHashMapEntry", ")", "{", "valueEntry", "=", "par3Obj", ";", "nextEntry", "=", "par4IntHashMapEntry", ";", "hashEntry", "=", "par2", ";", "slotHash", "=", "par1", ";", "}", "public", "final", "int", "getHash", "(", ")", "{", "return", "hashEntry", ";", "}", "public", "final", "Object", "getValue", "(", ")", "{", "return", "valueEntry", ";", "}", "public", "final", "boolean", "equals", "(", "Object", "par1Obj", ")", "{", "if", "(", "!", "(", "par1Obj", "instanceof", "IntHashMapEntry", ")", ")", "{", "return", "false", ";", "}", "IntHashMapEntry", "inthashmapentry", "=", "(", "IntHashMapEntry", ")", "par1Obj", ";", "Integer", "integer", "=", "Integer", ".", "valueOf", "(", "getHash", "(", ")", ")", ";", "Integer", "integer1", "=", "Integer", ".", "valueOf", "(", "inthashmapentry", ".", "getHash", "(", ")", ")", ";", "if", "(", "integer", "==", "integer1", "||", "integer", "!=", "null", "&&", "integer", ".", "equals", "(", "integer1", ")", ")", "{", "Object", "obj", "=", "getValue", "(", ")", ";", "Object", "obj1", "=", "inthashmapentry", ".", "getValue", "(", ")", ";", "if", "(", "obj", "==", "obj1", "||", "obj", "!=", "null", "&&", "obj", ".", "equals", "(", "obj1", ")", ")", "{", "return", "true", ";", "}", "}", "return", "false", ";", "}", "public", "final", "int", "hashCode", "(", ")", "{", "return", "IntHashMap", ".", "getHash", "(", "hashEntry", ")", ";", "}", "public", "final", "String", "toString", "(", ")", "{", "return", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "getHash", "(", ")", ")", ".", "append", "(", "\"=\"", ")", ".", "append", "(", "getValue", "(", ")", ")", ".", "toString", "(", ")", ";", "}", "}", "</s>" ]
9,702
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "*", ";", "class", "StructureVillageStart", "extends", "StructureStart", "{", "private", "boolean", "hasMoreThanTwoComponents", ";", "public", "StructureVillageStart", "(", "World", "par1World", ",", "Random", "par2Random", ",", "int", "par3", ",", "int", "par4", ",", "int", "par5", ")", "{", "hasMoreThanTwoComponents", "=", "false", ";", "int", "i", "=", "par5", ";", "ArrayList", "arraylist", "=", "StructureVillagePieces", ".", "getStructureVillageWeightedPieceList", "(", "par2Random", ",", "i", ")", ";", "ComponentVillageStartPiece", "componentvillagestartpiece", "=", "new", "ComponentVillageStartPiece", "(", "par1World", ".", "getWorldChunkManager", "(", ")", ",", "0", ",", "par2Random", ",", "(", "par3", "<<", "4", ")", "+", "2", ",", "(", "par4", "<<", "4", ")", "+", "2", ",", "arraylist", ",", "i", ")", ";", "components", ".", "add", "(", "componentvillagestartpiece", ")", ";", "componentvillagestartpiece", ".", "buildComponent", "(", "componentvillagestartpiece", ",", "components", ",", "par2Random", ")", ";", "ArrayList", "arraylist1", "=", "componentvillagestartpiece", ".", "field_35387_f", ";", "for", "(", "ArrayList", "arraylist2", "=", "componentvillagestartpiece", ".", "field_35389_e", ";", "!", "arraylist1", ".", "isEmpty", "(", ")", "||", "!", "arraylist2", ".", "isEmpty", "(", ")", ";", ")", "{", "if", "(", "!", "arraylist1", ".", "isEmpty", "(", ")", ")", "{", "int", "j", "=", "par2Random", ".", "nextInt", "(", "arraylist1", ".", "size", "(", ")", ")", ";", "StructureComponent", "structurecomponent", "=", "(", "StructureComponent", ")", "arraylist1", ".", "remove", "(", "j", ")", ";", "structurecomponent", ".", "buildComponent", "(", "componentvillagestartpiece", ",", "components", ",", "par2Random", ")", ";", "}", "else", "{", "int", "k", "=", "par2Random", ".", "nextInt", "(", "arraylist2", ".", "size", "(", ")", ")", ";", "StructureComponent", "structurecomponent1", "=", "(", "StructureComponent", ")", "arraylist2", ".", "remove", "(", "k", ")", ";", "structurecomponent1", ".", "buildComponent", "(", "componentvillagestartpiece", ",", "components", ",", "par2Random", ")", ";", "}", "}", "updateBoundingBox", "(", ")", ";", "int", "l", "=", "0", ";", "Iterator", "iterator", "=", "components", ".", "iterator", "(", ")", ";", "do", "{", "if", "(", "!", "iterator", ".", "hasNext", "(", ")", ")", "{", "break", ";", "}", "StructureComponent", "structurecomponent2", "=", "(", "StructureComponent", ")", "iterator", ".", "next", "(", ")", ";", "if", "(", "!", "(", "structurecomponent2", "instanceof", "ComponentVillageRoadPiece", ")", ")", "{", "l", "++", ";", "}", "}", "while", "(", "true", ")", ";", "hasMoreThanTwoComponents", "=", "l", ">", "2", ";", "}", "public", "boolean", "isSizeableStructure", "(", ")", "{", "return", "hasMoreThanTwoComponents", ";", "}", "}", "</s>" ]
9,703
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "io", ".", "*", ";", "import", "java", ".", "util", ".", "*", ";", "public", "abstract", "class", "Packet", "{", "public", "static", "IntHashMap", "packetIdToClassMap", "=", "new", "IntHashMap", "(", ")", ";", "private", "static", "Map", "packetClassToIdMap", "=", "new", "HashMap", "(", ")", ";", "private", "static", "Set", "clientPacketIdList", "=", "new", "HashSet", "(", ")", ";", "private", "static", "Set", "serverPacketIdList", "=", "new", "HashSet", "(", ")", ";", "public", "final", "long", "creationTimeMillis", "=", "System", ".", "currentTimeMillis", "(", ")", ";", "public", "static", "long", "field_48101_l", ";", "public", "static", "long", "field_48102_m", ";", "public", "static", "long", "field_48099_n", ";", "public", "static", "long", "field_48100_o", ";", "public", "boolean", "isChunkDataPacket", ";", "public", "Packet", "(", ")", "{", "isChunkDataPacket", "=", "false", ";", "}", "static", "void", "addIdClassMapping", "(", "int", "par0", ",", "boolean", "par1", ",", "boolean", "par2", ",", "Class", "par3Class", ")", "{", "if", "(", "packetIdToClassMap", ".", "containsItem", "(", "par0", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "\"\"", ")", ".", "append", "(", "par0", ")", ".", "toString", "(", ")", ")", ";", "}", "if", "(", "packetClassToIdMap", ".", "containsKey", "(", "par3Class", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "\"\"", ")", ".", "append", "(", "par3Class", ")", ".", "toString", "(", ")", ")", ";", "}", "packetIdToClassMap", ".", "addKey", "(", "par0", ",", "par3Class", ")", ";", "packetClassToIdMap", ".", "put", "(", "par3Class", ",", "Integer", ".", "valueOf", "(", "par0", ")", ")", ";", "if", "(", "par1", ")", "{", "clientPacketIdList", ".", "add", "(", "Integer", ".", "valueOf", "(", "par0", ")", ")", ";", "}", "if", "(", "par2", ")", "{", "serverPacketIdList", ".", "add", "(", "Integer", ".", "valueOf", "(", "par0", ")", ")", ";", "}", "}", "public", "static", "Packet", "getNewPacket", "(", "int", "par0", ")", "{", "try", "{", "Class", "class1", "=", "(", "Class", ")", "packetIdToClassMap", ".", "lookup", "(", "par0", ")", ";", "if", "(", "class1", "==", "null", ")", "{", "return", "null", ";", "}", "else", "{", "return", "(", "Packet", ")", "class1", ".", "newInstance", "(", ")", ";", "}", "}", "catch", "(", "Exception", "exception", ")", "{", "exception", ".", "printStackTrace", "(", ")", ";", "}", "System", ".", "out", ".", "println", "(", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "\"\"", ")", ".", "append", "(", "par0", ")", ".", "toString", "(", ")", ")", ";", "return", "null", ";", "}", "public", "final", "int", "getPacketId", "(", ")", "{", "return", "(", "(", "Integer", ")", "packetClassToIdMap", ".", "get", "(", "getClass", "(", ")", ")", ")", ".", "intValue", "(", ")", ";", "}", "public", "static", "Packet", "readPacket", "(", "DataInputStream", "par0DataInputStream", ",", "boolean", "par1", ")", "throws", "IOException", "{", "int", "i", "=", "0", ";", "Packet", "packet", "=", "null", ";", "try", "{", "i", "=", "par0DataInputStream", ".", "read", "(", ")", ";", "if", "(", "i", "==", "-", "1", ")", "{", "return", "null", ";", "}", "if", "(", "par1", "&&", "!", "serverPacketIdList", ".", "contains", "(", "Integer", ".", "valueOf", "(", "i", ")", ")", "||", "!", "par1", "&&", "!", "clientPacketIdList", ".", "contains", "(", "Integer", ".", "valueOf", "(", "i", ")", ")", ")", "{", "throw", "new", "IOException", "(", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "\"\"", ")", ".", "append", "(", "i", ")", ".", "toString", "(", ")", ")", ";", "}", "packet", "=", "getNewPacket", "(", "i", ")", ";", "if", "(", "packet", "==", "null", ")", "{", "throw", "new", "IOException", "(", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "\"\"", ")", ".", "append", "(", "i", ")", ".", "toString", "(", ")", ")", ";", "}", "packet", ".", "readPacketData", "(", "par0DataInputStream", ")", ";", "field_48101_l", "++", ";", "field_48102_m", "+=", "packet", ".", "getPacketSize", "(", ")", ";", "}", "catch", "(", "EOFException", "eofexception", ")", "{", "System", ".", "out", ".", "println", "(", "\"\"", ")", ";", "return", "null", ";", "}", "PacketCount", ".", "countPacket", "(", "i", ",", "packet", ".", "getPacketSize", "(", ")", ")", ";", "field_48101_l", "++", ";", "field_48102_m", "+=", "packet", ".", "getPacketSize", "(", ")", ";", "return", "packet", ";", "}", "public", "static", "void", "writePacket", "(", "Packet", "par0Packet", ",", "DataOutputStream", "par1DataOutputStream", ")", "throws", "IOException", "{", "par1DataOutputStream", ".", "write", "(", "par0Packet", ".", "getPacketId", "(", ")", ")", ";", "par0Packet", ".", "writePacketData", "(", "par1DataOutputStream", ")", ";", "field_48099_n", "++", ";", "field_48100_o", "+=", "par0Packet", ".", "getPacketSize", "(", ")", ";", "}", "public", "static", "void", "writeString", "(", "String", "par0Str", ",", "DataOutputStream", "par1DataOutputStream", ")", "throws", "IOException", "{", "if", "(", "par0Str", ".", "length", "(", ")", ">", "32767", ")", "{", "throw", "new", "IOException", "(", "\"\"", ")", ";", "}", "else", "{", "par1DataOutputStream", ".", "writeShort", "(", "par0Str", ".", "length", "(", ")", ")", ";", "par1DataOutputStream", ".", "writeChars", "(", "par0Str", ")", ";", "return", ";", "}", "}", "public", "static", "String", "readString", "(", "DataInputStream", "par0DataInputStream", ",", "int", "par1", ")", "throws", "IOException", "{", "short", "word0", "=", "par0DataInputStream", ".", "readShort", "(", ")", ";", "if", "(", "word0", ">", "par1", ")", "{", "throw", "new", "IOException", "(", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "\"\"", ")", ".", "append", "(", "word0", ")", ".", "append", "(", "\"", ">", "\"", ")", ".", "append", "(", "par1", ")", ".", "append", "(", "\")\"", ")", ".", "toString", "(", ")", ")", ";", "}", "if", "(", "word0", "<", "0", ")", "{", "throw", "new", "IOException", "(", "\"\"", ")", ";", "}", "StringBuilder", "stringbuilder", "=", "new", "StringBuilder", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "word0", ";", "i", "++", ")", "{", "stringbuilder", ".", "append", "(", "par0DataInputStream", ".", "readChar", "(", ")", ")", ";", "}", "return", "stringbuilder", ".", "toString", "(", ")", ";", "}", "public", "abstract", "void", "readPacketData", "(", "DataInputStream", "datainputstream", ")", "throws", "IOException", ";", "public", "abstract", "void", "writePacketData", "(", "DataOutputStream", "dataoutputstream", ")", "throws", "IOException", ";", "public", "abstract", "void", "processPacket", "(", "NetHandler", "nethandler", ")", ";", "public", "abstract", "int", "getPacketSize", "(", ")", ";", "protected", "ItemStack", "readItemStack", "(", "DataInputStream", "par1DataInputStream", ")", "throws", "IOException", "{", "ItemStack", "itemstack", "=", "null", ";", "short", "word0", "=", "par1DataInputStream", ".", "readShort", "(", ")", ";", "if", "(", "word0", ">=", "0", ")", "{", "byte", "byte0", "=", "par1DataInputStream", ".", "readByte", "(", ")", ";", "short", "word1", "=", "par1DataInputStream", ".", "readShort", "(", ")", ";", "itemstack", "=", "new", "ItemStack", "(", "word0", ",", "byte0", ",", "word1", ")", ";", "if", "(", "Item", ".", "itemsList", "[", "word0", "]", ".", "isDamageable", "(", ")", "||", "Item", ".", "itemsList", "[", "word0", "]", ".", "func_46003_i", "(", ")", ")", "{", "itemstack", ".", "stackTagCompound", "=", "readNBTTagCompound", "(", "par1DataInputStream", ")", ";", "}", "}", "return", "itemstack", ";", "}", "protected", "void", "writeItemStack", "(", "ItemStack", "par1ItemStack", ",", "DataOutputStream", "par2DataOutputStream", ")", "throws", "IOException", "{", "if", "(", "par1ItemStack", "==", "null", ")", "{", "par2DataOutputStream", ".", "writeShort", "(", "-", "1", ")", ";", "}", "else", "{", "par2DataOutputStream", ".", "writeShort", "(", "par1ItemStack", ".", "itemID", ")", ";", "par2DataOutputStream", ".", "writeByte", "(", "par1ItemStack", ".", "stackSize", ")", ";", "par2DataOutputStream", ".", "writeShort", "(", "par1ItemStack", ".", "getItemDamage", "(", ")", ")", ";", "if", "(", "par1ItemStack", ".", "getItem", "(", ")", ".", "isDamageable", "(", ")", "||", "par1ItemStack", ".", "getItem", "(", ")", ".", "func_46003_i", "(", ")", ")", "{", "writeNBTTagCompound", "(", "par1ItemStack", ".", "stackTagCompound", ",", "par2DataOutputStream", ")", ";", "}", "}", "}", "protected", "NBTTagCompound", "readNBTTagCompound", "(", "DataInputStream", "par1DataInputStream", ")", "throws", "IOException", "{", "short", "word0", "=", "par1DataInputStream", ".", "readShort", "(", ")", ";", "if", "(", "word0", "<", "0", ")", "{", "return", "null", ";", "}", "else", "{", "byte", "abyte0", "[", "]", "=", "new", "byte", "[", "word0", "]", ";", "par1DataInputStream", ".", "readFully", "(", "abyte0", ")", ";", "return", "CompressedStreamTools", ".", "decompress", "(", "abyte0", ")", ";", "}", "}", "protected", "void", "writeNBTTagCompound", "(", "NBTTagCompound", "par1NBTTagCompound", ",", "DataOutputStream", "par2DataOutputStream", ")", "throws", "IOException", "{", "if", "(", "par1NBTTagCompound", "==", "null", ")", "{", "par2DataOutputStream", ".", "writeShort", "(", "-", "1", ")", ";", "}", "else", "{", "byte", "abyte0", "[", "]", "=", "CompressedStreamTools", ".", "compress", "(", "par1NBTTagCompound", ")", ";", "par2DataOutputStream", ".", "writeShort", "(", "(", "short", ")", "abyte0", ".", "length", ")", ";", "par2DataOutputStream", ".", "write", "(", "abyte0", ")", ";", "}", "}", "static", "{", "addIdClassMapping", "(", "0", ",", "true", ",", "true", ",", "net", ".", "minecraft", ".", "src", ".", "Packet0KeepAlive", ".", "class", ")", ";", "addIdClassMapping", "(", "1", ",", "true", ",", "true", ",", "net", ".", "minecraft", ".", "src", ".", "Packet1Login", ".", "class", ")", ";", "addIdClassMapping", "(", "2", ",", "true", ",", "true", ",", "net", ".", "minecraft", ".", "src", ".", "Packet2Handshake", ".", "class", ")", ";", "addIdClassMapping", "(", "3", ",", "true", ",", "true", ",", "net", ".", "minecraft", ".", "src", ".", "Packet3Chat", ".", "class", ")", ";", "addIdClassMapping", "(", "4", ",", "true", ",", "false", ",", "net", ".", "minecraft", ".", "src", ".", "Packet4UpdateTime", ".", "class", ")", ";", "addIdClassMapping", "(", "5", ",", "true", ",", "false", ",", "net", ".", "minecraft", ".", "src", ".", "Packet5PlayerInventory", ".", "class", ")", ";", "addIdClassMapping", "(", "6", ",", "true", ",", "false", ",", "net", ".", "minecraft", ".", "src", ".", "Packet6SpawnPosition", ".", "class", ")", ";", "addIdClassMapping", "(", "7", ",", "false", ",", "true", ",", "net", ".", "minecraft", ".", "src", ".", "Packet7UseEntity", ".", "class", ")", ";", "addIdClassMapping", "(", "8", ",", "true", ",", "false", ",", "net", ".", "minecraft", ".", "src", ".", "Packet8UpdateHealth", ".", "class", ")", ";", "addIdClassMapping", "(", "9", ",", "true", ",", "true", ",", "net", ".", "minecraft", ".", "src", ".", "Packet9Respawn", ".", "class", ")", ";", "addIdClassMapping", "(", "10", ",", "true", ",", "true", ",", "net", ".", "minecraft", ".", "src", ".", "Packet10Flying", ".", "class", ")", ";", "addIdClassMapping", "(", "11", ",", "true", ",", "true", ",", "net", ".", "minecraft", ".", "src", ".", "Packet11PlayerPosition", ".", "class", ")", ";", "addIdClassMapping", "(", "12", ",", "true", ",", "true", ",", "net", ".", "minecraft", ".", "src", ".", "Packet12PlayerLook", ".", "class", ")", ";", "addIdClassMapping", "(", "13", ",", "true", ",", "true", ",", "net", ".", "minecraft", ".", "src", ".", "Packet13PlayerLookMove", ".", "class", ")", ";", "addIdClassMapping", "(", "14", ",", "false", ",", "true", ",", "net", ".", "minecraft", ".", "src", ".", "Packet14BlockDig", ".", "class", ")", ";", "addIdClassMapping", "(", "15", ",", "false", ",", "true", ",", "net", ".", "minecraft", ".", "src", ".", "Packet15Place", ".", "class", ")", ";", "addIdClassMapping", "(", "16", ",", "false", ",", "true", ",", "net", ".", "minecraft", ".", "src", ".", "Packet16BlockItemSwitch", ".", "class", ")", ";", "addIdClassMapping", "(", "17", ",", "true", ",", "false", ",", "net", ".", "minecraft", ".", "src", ".", "Packet17Sleep", ".", "class", ")", ";", "addIdClassMapping", "(", "18", ",", "true", ",", "true", ",", "net", ".", "minecraft", ".", "src", ".", "Packet18Animation", ".", "class", ")", ";", "addIdClassMapping", "(", "19", ",", "false", ",", "true", ",", "net", ".", "minecraft", ".", "src", ".", "Packet19EntityAction", ".", "class", ")", ";", "addIdClassMapping", "(", "20", ",", "true", ",", "false", ",", "net", ".", "minecraft", ".", "src", ".", "Packet20NamedEntitySpawn", ".", "class", ")", ";", "addIdClassMapping", "(", "21", ",", "true", ",", "false", ",", "net", ".", "minecraft", ".", "src", ".", "Packet21PickupSpawn", ".", "class", ")", ";", "addIdClassMapping", "(", "22", ",", "true", ",", "false", ",", "net", ".", "minecraft", ".", "src", ".", "Packet22Collect", ".", "class", ")", ";", "addIdClassMapping", "(", "23", ",", "true", ",", "false", ",", "net", ".", "minecraft", ".", "src", ".", "Packet23VehicleSpawn", ".", "class", ")", ";", "addIdClassMapping", "(", "24", ",", "true", ",", "false", ",", "net", ".", "minecraft", ".", "src", ".", "Packet24MobSpawn", ".", "class", ")", ";", "addIdClassMapping", "(", "25", ",", "true", ",", "false", ",", "net", ".", "minecraft", ".", "src", ".", "Packet25EntityPainting", ".", "class", ")", ";", "addIdClassMapping", "(", "26", ",", "true", ",", "false", ",", "net", ".", "minecraft", ".", "src", ".", "Packet26EntityExpOrb", ".", "class", ")", ";", "addIdClassMapping", "(", "28", ",", "true", ",", "false", ",", "net", ".", "minecraft", ".", "src", ".", "Packet28EntityVelocity", ".", "class", ")", ";", "addIdClassMapping", "(", "29", ",", "true", ",", "false", ",", "net", ".", "minecraft", ".", "src", ".", "Packet29DestroyEntity", ".", "class", ")", ";", "addIdClassMapping", "(", "30", ",", "true", ",", "false", ",", "net", ".", "minecraft", ".", "src", ".", "Packet30Entity", ".", "class", ")", ";", "addIdClassMapping", "(", "31", ",", "true", ",", "false", ",", "net", ".", "minecraft", ".", "src", ".", "Packet31RelEntityMove", ".", "class", ")", ";", "addIdClassMapping", "(", "32", ",", "true", ",", "false", ",", "net", ".", "minecraft", ".", "src", ".", "Packet32EntityLook", ".", "class", ")", ";", "addIdClassMapping", "(", "33", ",", "true", ",", "false", ",", "net", ".", "minecraft", ".", "src", ".", "Packet33RelEntityMoveLook", ".", "class", ")", ";", "addIdClassMapping", "(", "34", ",", "true", ",", "false", ",", "net", ".", "minecraft", ".", "src", ".", "Packet34EntityTeleport", ".", "class", ")", ";", "addIdClassMapping", "(", "35", ",", "true", ",", "false", ",", "net", ".", "minecraft", ".", "src", ".", "Packet35EntityHeadRotation", ".", "class", ")", ";", "addIdClassMapping", "(", "38", ",", "true", ",", "false", ",", "net", ".", "minecraft", ".", "src", ".", "Packet38EntityStatus", ".", "class", ")", ";", "addIdClassMapping", "(", "39", ",", "true", ",", "false", ",", "net", ".", "minecraft", ".", "src", ".", "Packet39AttachEntity", ".", "class", ")", ";", "addIdClassMapping", "(", "40", ",", "true", ",", "false", ",", "net", ".", "minecraft", ".", "src", ".", "Packet40EntityMetadata", ".", "class", ")", ";", "addIdClassMapping", "(", "41", ",", "true", ",", "false", ",", "net", ".", "minecraft", ".", "src", ".", "Packet41EntityEffect", ".", "class", ")", ";", "addIdClassMapping", "(", "42", ",", "true", ",", "false", ",", "net", ".", "minecraft", ".", "src", ".", "Packet42RemoveEntityEffect", ".", "class", ")", ";", "addIdClassMapping", "(", "43", ",", "true", ",", "false", ",", "net", ".", "minecraft", ".", "src", ".", "Packet43Experience", ".", "class", ")", ";", "addIdClassMapping", "(", "50", ",", "true", ",", "false", ",", "net", ".", "minecraft", ".", "src", ".", "Packet50PreChunk", ".", "class", ")", ";", "addIdClassMapping", "(", "51", ",", "true", ",", "false", ",", "net", ".", "minecraft", ".", "src", ".", "Packet51MapChunk", ".", "class", ")", ";", "addIdClassMapping", "(", "52", ",", "true", ",", "false", ",", "net", ".", "minecraft", ".", "src", ".", "Packet52MultiBlockChange", ".", "class", ")", ";", "addIdClassMapping", "(", "53", ",", "true", ",", "false", ",", "net", ".", "minecraft", ".", "src", ".", "Packet53BlockChange", ".", "class", ")", ";", "addIdClassMapping", "(", "54", ",", "true", ",", "false", ",", "net", ".", "minecraft", ".", "src", ".", "Packet54PlayNoteBlock", ".", "class", ")", ";", "addIdClassMapping", "(", "60", ",", "true", ",", "false", ",", "net", ".", "minecraft", ".", "src", ".", "Packet60Explosion", ".", "class", ")", ";", "addIdClassMapping", "(", "61", ",", "true", ",", "false", ",", "net", ".", "minecraft", ".", "src", ".", "Packet61DoorChange", ".", "class", ")", ";", "addIdClassMapping", "(", "70", ",", "true", ",", "false", ",", "net", ".", "minecraft", ".", "src", ".", "Packet70Bed", ".", "class", ")", ";", "addIdClassMapping", "(", "71", ",", "true", ",", "false", ",", "net", ".", "minecraft", ".", "src", ".", "Packet71Weather", ".", "class", ")", ";", "addIdClassMapping", "(", "100", ",", "true", ",", "false", ",", "net", ".", "minecraft", ".", "src", ".", "Packet100OpenWindow", ".", "class", ")", ";", "addIdClassMapping", "(", "101", ",", "true", ",", "true", ",", "net", ".", "minecraft", ".", "src", ".", "Packet101CloseWindow", ".", "class", ")", ";", "addIdClassMapping", "(", "102", ",", "false", ",", "true", ",", "net", ".", "minecraft", ".", "src", ".", "Packet102WindowClick", ".", "class", ")", ";", "addIdClassMapping", "(", "103", ",", "true", ",", "false", ",", "net", ".", "minecraft", ".", "src", ".", "Packet103SetSlot", ".", "class", ")", ";", "addIdClassMapping", "(", "104", ",", "true", ",", "false", ",", "net", ".", "minecraft", ".", "src", ".", "Packet104WindowItems", ".", "class", ")", ";", "addIdClassMapping", "(", "105", ",", "true", ",", "false", ",", "net", ".", "minecraft", ".", "src", ".", "Packet105UpdateProgressbar", ".", "class", ")", ";", "addIdClassMapping", "(", "106", ",", "true", ",", "true", ",", "net", ".", "minecraft", ".", "src", ".", "Packet106Transaction", ".", "class", ")", ";", "addIdClassMapping", "(", "107", ",", "true", ",", "true", ",", "net", ".", "minecraft", ".", "src", ".", "Packet107CreativeSetSlot", ".", "class", ")", ";", "addIdClassMapping", "(", "108", ",", "false", ",", "true", ",", "net", ".", "minecraft", ".", "src", ".", "Packet108EnchantItem", ".", "class", ")", ";", "addIdClassMapping", "(", "130", ",", "true", ",", "true", ",", "net", ".", "minecraft", ".", "src", ".", "Packet130UpdateSign", ".", "class", ")", ";", "addIdClassMapping", "(", "131", ",", "true", ",", "false", ",", "net", ".", "minecraft", ".", "src", ".", "Packet131MapData", ".", "class", ")", ";", "addIdClassMapping", "(", "132", ",", "true", ",", "false", ",", "net", ".", "minecraft", ".", "src", ".", "Packet132TileEntityData", ".", "class", ")", ";", "addIdClassMapping", "(", "200", ",", "true", ",", "false", ",", "net", ".", "minecraft", ".", "src", ".", "Packet200Statistic", ".", "class", ")", ";", "addIdClassMapping", "(", "201", ",", "true", ",", "false", ",", "net", ".", "minecraft", ".", "src", ".", "Packet201PlayerInfo", ".", "class", ")", ";", "addIdClassMapping", "(", "202", ",", "true", ",", "true", ",", "net", ".", "minecraft", ".", "src", ".", "Packet202PlayerAbilities", ".", "class", ")", ";", "addIdClassMapping", "(", "250", ",", "true", ",", "true", ",", "net", ".", "minecraft", ".", "src", ".", "Packet250CustomPayload", ".", "class", ")", ";", "addIdClassMapping", "(", "254", ",", "false", ",", "true", ",", "net", ".", "minecraft", ".", "src", ".", "Packet254ServerPing", ".", "class", ")", ";", "addIdClassMapping", "(", "255", ",", "true", ",", "true", ",", "net", ".", "minecraft", ".", "src", ".", "Packet255KickDisconnect", ".", "class", ")", ";", "}", "}", "</s>" ]
9,704
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "public", "abstract", "class", "Enchantment", "{", "public", "static", "final", "Enchantment", "enchantmentsList", "[", "]", "=", "new", "Enchantment", "[", "256", "]", ";", "public", "static", "final", "Enchantment", "protection", "=", "new", "EnchantmentProtection", "(", "0", ",", "10", ",", "0", ")", ";", "public", "static", "final", "Enchantment", "fireProtection", "=", "new", "EnchantmentProtection", "(", "1", ",", "5", ",", "1", ")", ";", "public", "static", "final", "Enchantment", "featherFalling", "=", "new", "EnchantmentProtection", "(", "2", ",", "5", ",", "2", ")", ";", "public", "static", "final", "Enchantment", "blastProtection", "=", "new", "EnchantmentProtection", "(", "3", ",", "2", ",", "3", ")", ";", "public", "static", "final", "Enchantment", "projectileProtection", "=", "new", "EnchantmentProtection", "(", "4", ",", "5", ",", "4", ")", ";", "public", "static", "final", "Enchantment", "respiration", "=", "new", "EnchantmentOxygen", "(", "5", ",", "2", ")", ";", "public", "static", "final", "Enchantment", "aquaAffinity", "=", "new", "EnchantmentWaterWorker", "(", "6", ",", "2", ")", ";", "public", "static", "final", "Enchantment", "sharpness", "=", "new", "EnchantmentDamage", "(", "16", ",", "10", ",", "0", ")", ";", "public", "static", "final", "Enchantment", "smite", "=", "new", "EnchantmentDamage", "(", "17", ",", "5", ",", "1", ")", ";", "public", "static", "final", "Enchantment", "baneOfArthropods", "=", "new", "EnchantmentDamage", "(", "18", ",", "5", ",", "2", ")", ";", "public", "static", "final", "Enchantment", "knockback", "=", "new", "EnchantmentKnockback", "(", "19", ",", "5", ")", ";", "public", "static", "final", "Enchantment", "fireAspect", "=", "new", "EnchantmentFireAspect", "(", "20", ",", "2", ")", ";", "public", "static", "final", "Enchantment", "looting", ";", "public", "static", "final", "Enchantment", "efficiency", "=", "new", "EnchantmentDigging", "(", "32", ",", "10", ")", ";", "public", "static", "final", "Enchantment", "silkTouch", "=", "new", "EnchantmentUntouching", "(", "33", ",", "1", ")", ";", "public", "static", "final", "Enchantment", "unbreaking", "=", "new", "EnchantmentDurability", "(", "34", ",", "5", ")", ";", "public", "static", "final", "Enchantment", "fortune", ";", "public", "static", "final", "Enchantment", "power", "=", "new", "EnchantmentArrowDamage", "(", "48", ",", "10", ")", ";", "public", "static", "final", "Enchantment", "punch", "=", "new", "EnchantmentArrowKnockback", "(", "49", ",", "2", ")", ";", "public", "static", "final", "Enchantment", "flame", "=", "new", "EnchantmentArrowFire", "(", "50", ",", "2", ")", ";", "public", "static", "final", "Enchantment", "infinity", "=", "new", "EnchantmentArrowInfinite", "(", "51", ",", "1", ")", ";", "public", "final", "int", "effectId", ";", "private", "final", "int", "weight", ";", "public", "EnumEnchantmentType", "type", ";", "protected", "String", "name", ";", "protected", "Enchantment", "(", "int", "par1", ",", "int", "par2", ",", "EnumEnchantmentType", "par3EnumEnchantmentType", ")", "{", "effectId", "=", "par1", ";", "weight", "=", "par2", ";", "type", "=", "par3EnumEnchantmentType", ";", "if", "(", "enchantmentsList", "[", "par1", "]", "!=", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"\"", ")", ";", "}", "else", "{", "enchantmentsList", "[", "par1", "]", "=", "this", ";", "return", ";", "}", "}", "public", "int", "getWeight", "(", ")", "{", "return", "weight", ";", "}", "public", "int", "getMinLevel", "(", ")", "{", "return", "1", ";", "}", "public", "int", "getMaxLevel", "(", ")", "{", "return", "1", ";", "}", "public", "int", "getMinEnchantability", "(", "int", "par1", ")", "{", "return", "1", "+", "par1", "*", "10", ";", "}", "public", "int", "getMaxEnchantability", "(", "int", "par1", ")", "{", "return", "getMinEnchantability", "(", "par1", ")", "+", "5", ";", "}", "public", "int", "calcModifierDamage", "(", "int", "par1", ",", "DamageSource", "par2DamageSource", ")", "{", "return", "0", ";", "}", "public", "int", "calcModifierLiving", "(", "int", "par1", ",", "EntityLiving", "par2EntityLiving", ")", "{", "return", "0", ";", "}", "public", "boolean", "canApplyTogether", "(", "Enchantment", "par1Enchantment", ")", "{", "return", "this", "!=", "par1Enchantment", ";", "}", "public", "Enchantment", "setName", "(", "String", "par1Str", ")", "{", "name", "=", "par1Str", ";", "return", "this", ";", "}", "static", "{", "looting", "=", "new", "EnchantmentLootBonus", "(", "21", ",", "2", ",", "EnumEnchantmentType", ".", "weapon", ")", ";", "fortune", "=", "new", "EnchantmentLootBonus", "(", "35", ",", "2", ",", "EnumEnchantmentType", ".", "digger", ")", ";", "}", "}", "</s>" ]
9,705
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "text", ".", "DecimalFormat", ";", "import", "java", ".", "text", ".", "NumberFormat", ";", "import", "java", ".", "util", ".", "*", ";", "public", "class", "StatBase", "{", "public", "final", "int", "statId", ";", "private", "final", "String", "statName", ";", "public", "boolean", "isIndependent", ";", "public", "String", "statGuid", ";", "private", "final", "IStatType", "type", ";", "private", "static", "NumberFormat", "numberFormat", ";", "public", "static", "IStatType", "simpleStatType", "=", "new", "StatTypeSimple", "(", ")", ";", "private", "static", "DecimalFormat", "decimalFormat", "=", "new", "DecimalFormat", "(", "\"########0.00\"", ")", ";", "public", "static", "IStatType", "timeStatType", "=", "new", "StatTypeTime", "(", ")", ";", "public", "static", "IStatType", "distanceStatType", "=", "new", "StatTypeDistance", "(", ")", ";", "public", "StatBase", "(", "int", "par1", ",", "String", "par2Str", ",", "IStatType", "par3IStatType", ")", "{", "isIndependent", "=", "false", ";", "statId", "=", "par1", ";", "statName", "=", "par2Str", ";", "type", "=", "par3IStatType", ";", "}", "public", "StatBase", "(", "int", "par1", ",", "String", "par2Str", ")", "{", "this", "(", "par1", ",", "par2Str", ",", "simpleStatType", ")", ";", "}", "public", "StatBase", "initIndependentStat", "(", ")", "{", "isIndependent", "=", "true", ";", "return", "this", ";", "}", "public", "StatBase", "registerStat", "(", ")", "{", "if", "(", "StatList", ".", "oneShotStats", ".", "containsKey", "(", "Integer", ".", "valueOf", "(", "statId", ")", ")", ")", "{", "throw", "new", "RuntimeException", "(", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "\"\"", ")", ".", "append", "(", "(", "(", "StatBase", ")", "StatList", ".", "oneShotStats", ".", "get", "(", "Integer", ".", "valueOf", "(", "statId", ")", ")", ")", ".", "statName", ")", ".", "append", "(", "\"\\\"", "and", "\\\"\"", ")", ".", "append", "(", "statName", ")", ".", "append", "(", "\"\\\"", "at", "id", "\"", ")", ".", "append", "(", "statId", ")", ".", "toString", "(", ")", ")", ";", "}", "else", "{", "StatList", ".", "allStats", ".", "add", "(", "this", ")", ";", "StatList", ".", "oneShotStats", ".", "put", "(", "Integer", ".", "valueOf", "(", "statId", ")", ",", "this", ")", ";", "statGuid", "=", "AchievementMap", ".", "getGuid", "(", "statId", ")", ";", "return", "this", ";", "}", "}", "public", "String", "toString", "(", ")", "{", "return", "StatCollector", ".", "translateToLocal", "(", "statName", ")", ";", "}", "static", "{", "numberFormat", "=", "NumberFormat", ".", "getIntegerInstance", "(", "Locale", ".", "US", ")", ";", "}", "}", "</s>" ]
9,706
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "io", ".", "*", ";", "public", "class", "Packet25EntityPainting", "extends", "Packet", "{", "public", "int", "entityId", ";", "public", "int", "xPosition", ";", "public", "int", "yPosition", ";", "public", "int", "zPosition", ";", "public", "int", "direction", ";", "public", "String", "title", ";", "public", "Packet25EntityPainting", "(", ")", "{", "}", "public", "Packet25EntityPainting", "(", "EntityPainting", "par1EntityPainting", ")", "{", "entityId", "=", "par1EntityPainting", ".", "entityId", ";", "xPosition", "=", "par1EntityPainting", ".", "xPosition", ";", "yPosition", "=", "par1EntityPainting", ".", "yPosition", ";", "zPosition", "=", "par1EntityPainting", ".", "zPosition", ";", "direction", "=", "par1EntityPainting", ".", "direction", ";", "title", "=", "par1EntityPainting", ".", "art", ".", "title", ";", "}", "public", "void", "readPacketData", "(", "DataInputStream", "par1DataInputStream", ")", "throws", "IOException", "{", "entityId", "=", "par1DataInputStream", ".", "readInt", "(", ")", ";", "title", "=", "readString", "(", "par1DataInputStream", ",", "EnumArt", ".", "maxArtTitleLength", ")", ";", "xPosition", "=", "par1DataInputStream", ".", "readInt", "(", ")", ";", "yPosition", "=", "par1DataInputStream", ".", "readInt", "(", ")", ";", "zPosition", "=", "par1DataInputStream", ".", "readInt", "(", ")", ";", "direction", "=", "par1DataInputStream", ".", "readInt", "(", ")", ";", "}", "public", "void", "writePacketData", "(", "DataOutputStream", "par1DataOutputStream", ")", "throws", "IOException", "{", "par1DataOutputStream", ".", "writeInt", "(", "entityId", ")", ";", "writeString", "(", "title", ",", "par1DataOutputStream", ")", ";", "par1DataOutputStream", ".", "writeInt", "(", "xPosition", ")", ";", "par1DataOutputStream", ".", "writeInt", "(", "yPosition", ")", ";", "par1DataOutputStream", ".", "writeInt", "(", "zPosition", ")", ";", "par1DataOutputStream", ".", "writeInt", "(", "direction", ")", ";", "}", "public", "void", "processPacket", "(", "NetHandler", "par1NetHandler", ")", "{", "par1NetHandler", ".", "handleEntityPainting", "(", "this", ")", ";", "}", "public", "int", "getPacketSize", "(", ")", "{", "return", "24", ";", "}", "}", "</s>" ]
9,707
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "Random", ";", "public", "class", "EntityAIWatchClosest", "extends", "EntityAIBase", "{", "private", "EntityLiving", "field_46110_a", ";", "private", "Entity", "closestEntity", ";", "private", "float", "field_46106_d", ";", "private", "int", "field_46107_e", ";", "private", "float", "field_48241_e", ";", "private", "Class", "field_48240_f", ";", "public", "EntityAIWatchClosest", "(", "EntityLiving", "par1EntityLiving", ",", "Class", "par2Class", ",", "float", "par3", ")", "{", "field_46110_a", "=", "par1EntityLiving", ";", "field_48240_f", "=", "par2Class", ";", "field_46106_d", "=", "par3", ";", "field_48241_e", "=", "0.02F", ";", "setMutexBits", "(", "2", ")", ";", "}", "public", "EntityAIWatchClosest", "(", "EntityLiving", "par1EntityLiving", ",", "Class", "par2Class", ",", "float", "par3", ",", "float", "par4", ")", "{", "field_46110_a", "=", "par1EntityLiving", ";", "field_48240_f", "=", "par2Class", ";", "field_46106_d", "=", "par3", ";", "field_48241_e", "=", "par4", ";", "setMutexBits", "(", "2", ")", ";", "}", "public", "boolean", "shouldExecute", "(", ")", "{", "if", "(", "field_46110_a", ".", "getRNG", "(", ")", ".", "nextFloat", "(", ")", ">=", "field_48241_e", ")", "{", "return", "false", ";", "}", "if", "(", "field_48240_f", "==", "(", "net", ".", "minecraft", ".", "src", ".", "EntityPlayer", ".", "class", ")", ")", "{", "closestEntity", "=", "field_46110_a", ".", "worldObj", ".", "getClosestPlayerToEntity", "(", "field_46110_a", ",", "field_46106_d", ")", ";", "}", "else", "{", "closestEntity", "=", "field_46110_a", ".", "worldObj", ".", "findNearestEntityWithinAABB", "(", "field_48240_f", ",", "field_46110_a", ".", "boundingBox", ".", "expand", "(", "field_46106_d", ",", "3D", ",", "field_46106_d", ")", ",", "field_46110_a", ")", ";", "}", "return", "closestEntity", "!=", "null", ";", "}", "public", "boolean", "continueExecuting", "(", ")", "{", "if", "(", "!", "closestEntity", ".", "isEntityAlive", "(", ")", ")", "{", "return", "false", ";", "}", "if", "(", "field_46110_a", ".", "getDistanceSqToEntity", "(", "closestEntity", ")", ">", "(", "double", ")", "(", "field_46106_d", "*", "field_46106_d", ")", ")", "{", "return", "false", ";", "}", "else", "{", "return", "field_46107_e", ">", "0", ";", "}", "}", "public", "void", "startExecuting", "(", ")", "{", "field_46107_e", "=", "40", "+", "field_46110_a", ".", "getRNG", "(", ")", ".", "nextInt", "(", "40", ")", ";", "}", "public", "void", "resetTask", "(", ")", "{", "closestEntity", "=", "null", ";", "}", "public", "void", "updateTask", "(", ")", "{", "field_46110_a", ".", "getLookHelper", "(", ")", ".", "setLookPosition", "(", "closestEntity", ".", "posX", ",", "closestEntity", ".", "posY", "+", "(", "double", ")", "closestEntity", ".", "getEyeHeight", "(", ")", ",", "closestEntity", ".", "posZ", ",", "10F", ",", "field_46110_a", ".", "getVerticalFaceSpeed", "(", ")", ")", ";", "field_46107_e", "--", ";", "}", "}", "</s>" ]
9,708
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "public", "class", "Material", "{", "public", "static", "final", "Material", "air", ";", "public", "static", "final", "Material", "grass", ";", "public", "static", "final", "Material", "ground", ";", "public", "static", "final", "Material", "wood", ";", "public", "static", "final", "Material", "rock", ";", "public", "static", "final", "Material", "iron", ";", "public", "static", "final", "Material", "water", ";", "public", "static", "final", "Material", "lava", ";", "public", "static", "final", "Material", "leaves", ";", "public", "static", "final", "Material", "plants", ";", "public", "static", "final", "Material", "vine", ";", "public", "static", "final", "Material", "sponge", ";", "public", "static", "final", "Material", "cloth", ";", "public", "static", "final", "Material", "fire", ";", "public", "static", "final", "Material", "sand", ";", "public", "static", "final", "Material", "circuits", ";", "public", "static", "final", "Material", "glass", ";", "public", "static", "final", "Material", "redstoneLight", ";", "public", "static", "final", "Material", "tnt", ";", "public", "static", "final", "Material", "unused", ";", "public", "static", "final", "Material", "ice", ";", "public", "static", "final", "Material", "snow", ";", "public", "static", "final", "Material", "craftedSnow", ";", "public", "static", "final", "Material", "cactus", ";", "public", "static", "final", "Material", "clay", ";", "public", "static", "final", "Material", "pumpkin", ";", "public", "static", "final", "Material", "dragonEgg", ";", "public", "static", "final", "Material", "portal", ";", "public", "static", "final", "Material", "cake", ";", "public", "static", "final", "Material", "web", ";", "public", "static", "final", "Material", "piston", ";", "private", "boolean", "canBurn", ";", "private", "boolean", "groundCover", ";", "private", "boolean", "isTranslucent", ";", "public", "final", "MapColor", "materialMapColor", ";", "private", "boolean", "canHarvest", ";", "private", "int", "mobilityFlag", ";", "public", "Material", "(", "MapColor", "par1MapColor", ")", "{", "canHarvest", "=", "true", ";", "materialMapColor", "=", "par1MapColor", ";", "}", "public", "boolean", "isLiquid", "(", ")", "{", "return", "false", ";", "}", "public", "boolean", "isSolid", "(", ")", "{", "return", "true", ";", "}", "public", "boolean", "getCanBlockGrass", "(", ")", "{", "return", "true", ";", "}", "public", "boolean", "blocksMovement", "(", ")", "{", "return", "true", ";", "}", "private", "Material", "setTranslucent", "(", ")", "{", "isTranslucent", "=", "true", ";", "return", "this", ";", "}", "protected", "Material", "setNoHarvest", "(", ")", "{", "canHarvest", "=", "false", ";", "return", "this", ";", "}", "protected", "Material", "setBurning", "(", ")", "{", "canBurn", "=", "true", ";", "return", "this", ";", "}", "public", "boolean", "getCanBurn", "(", ")", "{", "return", "canBurn", ";", "}", "public", "Material", "setGroundCover", "(", ")", "{", "groundCover", "=", "true", ";", "return", "this", ";", "}", "public", "boolean", "isGroundCover", "(", ")", "{", "return", "groundCover", ";", "}", "public", "boolean", "isOpaque", "(", ")", "{", "if", "(", "isTranslucent", ")", "{", "return", "false", ";", "}", "else", "{", "return", "blocksMovement", "(", ")", ";", "}", "}", "public", "boolean", "isHarvestable", "(", ")", "{", "return", "canHarvest", ";", "}", "public", "int", "getMaterialMobility", "(", ")", "{", "return", "mobilityFlag", ";", "}", "protected", "Material", "setNoPushMobility", "(", ")", "{", "mobilityFlag", "=", "1", ";", "return", "this", ";", "}", "protected", "Material", "setImmovableMobility", "(", ")", "{", "mobilityFlag", "=", "2", ";", "return", "this", ";", "}", "static", "{", "air", "=", "new", "MaterialTransparent", "(", "MapColor", ".", "airColor", ")", ";", "grass", "=", "new", "Material", "(", "MapColor", ".", "grassColor", ")", ";", "ground", "=", "new", "Material", "(", "MapColor", ".", "dirtColor", ")", ";", "wood", "=", "(", "new", "Material", "(", "MapColor", ".", "woodColor", ")", ")", ".", "setBurning", "(", ")", ";", "rock", "=", "(", "new", "Material", "(", "MapColor", ".", "stoneColor", ")", ")", ".", "setNoHarvest", "(", ")", ";", "iron", "=", "(", "new", "Material", "(", "MapColor", ".", "ironColor", ")", ")", ".", "setNoHarvest", "(", ")", ";", "water", "=", "(", "new", "MaterialLiquid", "(", "MapColor", ".", "waterColor", ")", ")", ".", "setNoPushMobility", "(", ")", ";", "lava", "=", "(", "new", "MaterialLiquid", "(", "MapColor", ".", "tntColor", ")", ")", ".", "setNoPushMobility", "(", ")", ";", "leaves", "=", "(", "new", "Material", "(", "MapColor", ".", "foliageColor", ")", ")", ".", "setBurning", "(", ")", ".", "setTranslucent", "(", ")", ".", "setNoPushMobility", "(", ")", ";", "plants", "=", "(", "new", "MaterialLogic", "(", "MapColor", ".", "foliageColor", ")", ")", ".", "setNoPushMobility", "(", ")", ";", "vine", "=", "(", "new", "MaterialLogic", "(", "MapColor", ".", "foliageColor", ")", ")", ".", "setBurning", "(", ")", ".", "setNoPushMobility", "(", ")", ".", "setGroundCover", "(", ")", ";", "sponge", "=", "new", "Material", "(", "MapColor", ".", "clothColor", ")", ";", "cloth", "=", "(", "new", "Material", "(", "MapColor", ".", "clothColor", ")", ")", ".", "setBurning", "(", ")", ";", "fire", "=", "(", "new", "MaterialTransparent", "(", "MapColor", ".", "airColor", ")", ")", ".", "setNoPushMobility", "(", ")", ";", "sand", "=", "new", "Material", "(", "MapColor", ".", "sandColor", ")", ";", "circuits", "=", "(", "new", "MaterialLogic", "(", "MapColor", ".", "airColor", ")", ")", ".", "setNoPushMobility", "(", ")", ";", "glass", "=", "(", "new", "Material", "(", "MapColor", ".", "airColor", ")", ")", ".", "setTranslucent", "(", ")", ";", "redstoneLight", "=", "new", "Material", "(", "MapColor", ".", "airColor", ")", ";", "tnt", "=", "(", "new", "Material", "(", "MapColor", ".", "tntColor", ")", ")", ".", "setBurning", "(", ")", ".", "setTranslucent", "(", ")", ";", "unused", "=", "(", "new", "Material", "(", "MapColor", ".", "foliageColor", ")", ")", ".", "setNoPushMobility", "(", ")", ";", "ice", "=", "(", "new", "Material", "(", "MapColor", ".", "iceColor", ")", ")", ".", "setTranslucent", "(", ")", ";", "snow", "=", "(", "new", "MaterialLogic", "(", "MapColor", ".", "snowColor", ")", ")", ".", "setGroundCover", "(", ")", ".", "setTranslucent", "(", ")", ".", "setNoHarvest", "(", ")", ".", "setNoPushMobility", "(", ")", ";", "craftedSnow", "=", "(", "new", "Material", "(", "MapColor", ".", "snowColor", ")", ")", ".", "setNoHarvest", "(", ")", ";", "cactus", "=", "(", "new", "Material", "(", "MapColor", ".", "foliageColor", ")", ")", ".", "setTranslucent", "(", ")", ".", "setNoPushMobility", "(", ")", ";", "clay", "=", "new", "Material", "(", "MapColor", ".", "clayColor", ")", ";", "pumpkin", "=", "(", "new", "Material", "(", "MapColor", ".", "foliageColor", ")", ")", ".", "setNoPushMobility", "(", ")", ";", "dragonEgg", "=", "(", "new", "Material", "(", "MapColor", ".", "foliageColor", ")", ")", ".", "setNoPushMobility", "(", ")", ";", "portal", "=", "(", "new", "MaterialPortal", "(", "MapColor", ".", "airColor", ")", ")", ".", "setImmovableMobility", "(", ")", ";", "cake", "=", "(", "new", "Material", "(", "MapColor", ".", "airColor", ")", ")", ".", "setNoPushMobility", "(", ")", ";", "web", "=", "(", "new", "MaterialWeb", "(", "MapColor", ".", "clothColor", ")", ")", ".", "setNoHarvest", "(", ")", ".", "setNoPushMobility", "(", ")", ";", "piston", "=", "(", "new", "Material", "(", "MapColor", ".", "stoneColor", ")", ")", ".", "setImmovableMobility", "(", ")", ";", "}", "}", "</s>" ]
9,709
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "public", "class", "EnchantmentDigging", "extends", "Enchantment", "{", "protected", "EnchantmentDigging", "(", "int", "par1", ",", "int", "par2", ")", "{", "super", "(", "par1", ",", "par2", ",", "EnumEnchantmentType", ".", "digger", ")", ";", "setName", "(", "\"digging\"", ")", ";", "}", "public", "int", "getMinEnchantability", "(", "int", "par1", ")", "{", "return", "1", "+", "15", "*", "(", "par1", "-", "1", ")", ";", "}", "public", "int", "getMaxEnchantability", "(", "int", "par1", ")", "{", "return", "super", ".", "getMinEnchantability", "(", "par1", ")", "+", "50", ";", "}", "public", "int", "getMaxLevel", "(", ")", "{", "return", "5", ";", "}", "}", "</s>" ]
9,710
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "public", "class", "EntityAIDefendVillage", "extends", "EntityAITarget", "{", "EntityIronGolem", "irongolem", ";", "EntityLiving", "villageAgressorTarget", ";", "public", "EntityAIDefendVillage", "(", "EntityIronGolem", "par1EntityIronGolem", ")", "{", "super", "(", "par1EntityIronGolem", ",", "16F", ",", "false", ",", "true", ")", ";", "irongolem", "=", "par1EntityIronGolem", ";", "setMutexBits", "(", "1", ")", ";", "}", "public", "boolean", "shouldExecute", "(", ")", "{", "Village", "village", "=", "irongolem", ".", "getVillage", "(", ")", ";", "if", "(", "village", "==", "null", ")", "{", "return", "false", ";", "}", "else", "{", "villageAgressorTarget", "=", "village", ".", "findNearestVillageAggressor", "(", "irongolem", ")", ";", "return", "func_48284_a", "(", "villageAgressorTarget", ",", "false", ")", ";", "}", "}", "public", "void", "startExecuting", "(", ")", "{", "irongolem", ".", "setAttackTarget", "(", "villageAgressorTarget", ")", ";", "super", ".", "startExecuting", "(", ")", ";", "}", "}", "</s>" ]
9,711
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "List", ";", "import", "java", ".", "util", ".", "Random", ";", "public", "abstract", "class", "Entity", "{", "private", "static", "int", "nextEntityID", "=", "0", ";", "public", "int", "entityId", ";", "public", "double", "renderDistanceWeight", ";", "public", "boolean", "preventEntitySpawning", ";", "public", "Entity", "riddenByEntity", ";", "public", "Entity", "ridingEntity", ";", "public", "World", "worldObj", ";", "public", "double", "prevPosX", ";", "public", "double", "prevPosY", ";", "public", "double", "prevPosZ", ";", "public", "double", "posX", ";", "public", "double", "posY", ";", "public", "double", "posZ", ";", "public", "double", "motionX", ";", "public", "double", "motionY", ";", "public", "double", "motionZ", ";", "public", "float", "rotationYaw", ";", "public", "float", "rotationPitch", ";", "public", "float", "prevRotationYaw", ";", "public", "float", "prevRotationPitch", ";", "public", "final", "AxisAlignedBB", "boundingBox", "=", "AxisAlignedBB", ".", "getBoundingBox", "(", "0.0D", ",", "0.0D", ",", "0.0D", ",", "0.0D", ",", "0.0D", ",", "0.0D", ")", ";", "public", "boolean", "onGround", ";", "public", "boolean", "isCollidedHorizontally", ";", "public", "boolean", "isCollidedVertically", ";", "public", "boolean", "isCollided", ";", "public", "boolean", "velocityChanged", ";", "protected", "boolean", "isInWeb", ";", "public", "boolean", "field_9077_F", ";", "public", "boolean", "isDead", ";", "public", "float", "yOffset", ";", "public", "float", "width", ";", "public", "float", "height", ";", "public", "float", "prevDistanceWalkedModified", ";", "public", "float", "distanceWalkedModified", ";", "public", "float", "fallDistance", ";", "private", "int", "nextStepDistance", ";", "public", "double", "lastTickPosX", ";", "public", "double", "lastTickPosY", ";", "public", "double", "lastTickPosZ", ";", "public", "float", "ySize", ";", "public", "float", "stepHeight", ";", "public", "boolean", "noClip", ";", "public", "float", "entityCollisionReduction", ";", "protected", "Random", "rand", ";", "public", "int", "ticksExisted", ";", "public", "int", "fireResistance", ";", "private", "int", "fire", ";", "protected", "boolean", "inWater", ";", "public", "int", "heartsLife", ";", "private", "boolean", "firstUpdate", ";", "protected", "boolean", "isImmuneToFire", ";", "protected", "DataWatcher", "dataWatcher", ";", "private", "double", "entityRiderPitchDelta", ";", "private", "double", "entityRiderYawDelta", ";", "public", "boolean", "addedToChunk", ";", "public", "int", "chunkCoordX", ";", "public", "int", "chunkCoordY", ";", "public", "int", "chunkCoordZ", ";", "public", "boolean", "ignoreFrustumCheck", ";", "public", "boolean", "isAirBorne", ";", "public", "Entity", "(", "World", "par1World", ")", "{", "entityId", "=", "nextEntityID", "++", ";", "renderDistanceWeight", "=", "1.0D", ";", "preventEntitySpawning", "=", "false", ";", "onGround", "=", "false", ";", "isCollided", "=", "false", ";", "velocityChanged", "=", "false", ";", "field_9077_F", "=", "true", ";", "isDead", "=", "false", ";", "yOffset", "=", "0.0F", ";", "width", "=", "0.6F", ";", "height", "=", "1.8F", ";", "prevDistanceWalkedModified", "=", "0.0F", ";", "distanceWalkedModified", "=", "0.0F", ";", "fallDistance", "=", "0.0F", ";", "nextStepDistance", "=", "1", ";", "ySize", "=", "0.0F", ";", "stepHeight", "=", "0.0F", ";", "noClip", "=", "false", ";", "entityCollisionReduction", "=", "0.0F", ";", "rand", "=", "new", "Random", "(", ")", ";", "ticksExisted", "=", "0", ";", "fireResistance", "=", "1", ";", "fire", "=", "0", ";", "inWater", "=", "false", ";", "heartsLife", "=", "0", ";", "firstUpdate", "=", "true", ";", "isImmuneToFire", "=", "false", ";", "dataWatcher", "=", "new", "DataWatcher", "(", ")", ";", "addedToChunk", "=", "false", ";", "worldObj", "=", "par1World", ";", "setPosition", "(", "0.0D", ",", "0.0D", ",", "0.0D", ")", ";", "dataWatcher", ".", "addObject", "(", "0", ",", "Byte", ".", "valueOf", "(", "(", "byte", ")", "0", ")", ")", ";", "dataWatcher", ".", "addObject", "(", "1", ",", "Short", ".", "valueOf", "(", "(", "short", ")", "300", ")", ")", ";", "entityInit", "(", ")", ";", "}", "protected", "abstract", "void", "entityInit", "(", ")", ";", "public", "DataWatcher", "getDataWatcher", "(", ")", "{", "return", "dataWatcher", ";", "}", "public", "boolean", "equals", "(", "Object", "par1Obj", ")", "{", "if", "(", "par1Obj", "instanceof", "Entity", ")", "{", "return", "(", "(", "Entity", ")", "par1Obj", ")", ".", "entityId", "==", "entityId", ";", "}", "else", "{", "return", "false", ";", "}", "}", "public", "int", "hashCode", "(", ")", "{", "return", "entityId", ";", "}", "public", "void", "setDead", "(", ")", "{", "isDead", "=", "true", ";", "}", "protected", "void", "setSize", "(", "float", "par1", ",", "float", "par2", ")", "{", "width", "=", "par1", ";", "height", "=", "par2", ";", "}", "protected", "void", "setRotation", "(", "float", "par1", ",", "float", "par2", ")", "{", "rotationYaw", "=", "par1", "%", "360F", ";", "rotationPitch", "=", "par2", "%", "360F", ";", "}", "public", "void", "setPosition", "(", "double", "par1", ",", "double", "par3", ",", "double", "par5", ")", "{", "posX", "=", "par1", ";", "posY", "=", "par3", ";", "posZ", "=", "par5", ";", "float", "f", "=", "width", "/", "2.0F", ";", "float", "f1", "=", "height", ";", "boundingBox", ".", "setBounds", "(", "par1", "-", "(", "double", ")", "f", ",", "(", "par3", "-", "(", "double", ")", "yOffset", ")", "+", "(", "double", ")", "ySize", ",", "par5", "-", "(", "double", ")", "f", ",", "par1", "+", "(", "double", ")", "f", ",", "(", "par3", "-", "(", "double", ")", "yOffset", ")", "+", "(", "double", ")", "ySize", "+", "(", "double", ")", "f1", ",", "par5", "+", "(", "double", ")", "f", ")", ";", "}", "public", "void", "onUpdate", "(", ")", "{", "onEntityUpdate", "(", ")", ";", "}", "public", "void", "onEntityUpdate", "(", ")", "{", "Profiler", ".", "startSection", "(", "\"\"", ")", ";", "if", "(", "ridingEntity", "!=", "null", "&&", "ridingEntity", ".", "isDead", ")", "{", "ridingEntity", "=", "null", ";", "}", "ticksExisted", "++", ";", "prevDistanceWalkedModified", "=", "distanceWalkedModified", ";", "prevPosX", "=", "posX", ";", "prevPosY", "=", "posY", ";", "prevPosZ", "=", "posZ", ";", "prevRotationPitch", "=", "rotationPitch", ";", "prevRotationYaw", "=", "rotationYaw", ";", "if", "(", "isSprinting", "(", ")", "&&", "!", "isInWater", "(", ")", ")", "{", "int", "i", "=", "MathHelper", ".", "floor_double", "(", "posX", ")", ";", "int", "j", "=", "MathHelper", ".", "floor_double", "(", "posY", "-", "0.20000000298023224D", "-", "(", "double", ")", "yOffset", ")", ";", "int", "k", "=", "MathHelper", ".", "floor_double", "(", "posZ", ")", ";", "int", "j1", "=", "worldObj", ".", "getBlockId", "(", "i", ",", "j", ",", "k", ")", ";", "if", "(", "j1", ">", "0", ")", "{", "worldObj", ".", "spawnParticle", "(", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "\"tilecrack_\"", ")", ".", "append", "(", "j1", ")", ".", "toString", "(", ")", ",", "posX", "+", "(", "(", "double", ")", "rand", ".", "nextFloat", "(", ")", "-", "0.5D", ")", "*", "(", "double", ")", "width", ",", "boundingBox", ".", "minY", "+", "0.10000000000000001D", ",", "posZ", "+", "(", "(", "double", ")", "rand", ".", "nextFloat", "(", ")", "-", "0.5D", ")", "*", "(", "double", ")", "width", ",", "-", "motionX", "*", "4D", ",", "1.5D", ",", "-", "motionZ", "*", "4D", ")", ";", "}", "}", "if", "(", "handleWaterMovement", "(", ")", ")", "{", "if", "(", "!", "inWater", "&&", "!", "firstUpdate", ")", "{", "float", "f", "=", "MathHelper", ".", "sqrt_double", "(", "motionX", "*", "motionX", "*", "0.20000000298023224D", "+", "motionY", "*", "motionY", "+", "motionZ", "*", "motionZ", "*", "0.20000000298023224D", ")", "*", "0.2F", ";", "if", "(", "f", ">", "1.0F", ")", "{", "f", "=", "1.0F", ";", "}", "worldObj", ".", "playSoundAtEntity", "(", "this", ",", "\"\"", ",", "f", ",", "1.0F", "+", "(", "rand", ".", "nextFloat", "(", ")", "-", "rand", ".", "nextFloat", "(", ")", ")", "*", "0.4F", ")", ";", "float", "f1", "=", "MathHelper", ".", "floor_double", "(", "boundingBox", ".", "minY", ")", ";", "for", "(", "int", "l", "=", "0", ";", "(", "float", ")", "l", "<", "1.0F", "+", "width", "*", "20F", ";", "l", "++", ")", "{", "float", "f2", "=", "(", "rand", ".", "nextFloat", "(", ")", "*", "2.0F", "-", "1.0F", ")", "*", "width", ";", "float", "f4", "=", "(", "rand", ".", "nextFloat", "(", ")", "*", "2.0F", "-", "1.0F", ")", "*", "width", ";", "worldObj", ".", "spawnParticle", "(", "\"bubble\"", ",", "posX", "+", "(", "double", ")", "f2", ",", "f1", "+", "1.0F", ",", "posZ", "+", "(", "double", ")", "f4", ",", "motionX", ",", "motionY", "-", "(", "double", ")", "(", "rand", ".", "nextFloat", "(", ")", "*", "0.2F", ")", ",", "motionZ", ")", ";", "}", "for", "(", "int", "i1", "=", "0", ";", "(", "float", ")", "i1", "<", "1.0F", "+", "width", "*", "20F", ";", "i1", "++", ")", "{", "float", "f3", "=", "(", "rand", ".", "nextFloat", "(", ")", "*", "2.0F", "-", "1.0F", ")", "*", "width", ";", "float", "f5", "=", "(", "rand", ".", "nextFloat", "(", ")", "*", "2.0F", "-", "1.0F", ")", "*", "width", ";", "worldObj", ".", "spawnParticle", "(", "\"splash\"", ",", "posX", "+", "(", "double", ")", "f3", ",", "f1", "+", "1.0F", ",", "posZ", "+", "(", "double", ")", "f5", ",", "motionX", ",", "motionY", ",", "motionZ", ")", ";", "}", "}", "fallDistance", "=", "0.0F", ";", "inWater", "=", "true", ";", "fire", "=", "0", ";", "}", "else", "{", "inWater", "=", "false", ";", "}", "if", "(", "worldObj", ".", "isRemote", ")", "{", "fire", "=", "0", ";", "}", "else", "if", "(", "fire", ">", "0", ")", "{", "if", "(", "isImmuneToFire", ")", "{", "fire", "-=", "4", ";", "if", "(", "fire", "<", "0", ")", "{", "fire", "=", "0", ";", "}", "}", "else", "{", "if", "(", "fire", "%", "20", "==", "0", ")", "{", "attackEntityFrom", "(", "DamageSource", ".", "onFire", ",", "1", ")", ";", "}", "fire", "--", ";", "}", "}", "if", "(", "handleLavaMovement", "(", ")", ")", "{", "setOnFireFromLava", "(", ")", ";", "fallDistance", "*=", "0.5F", ";", "}", "if", "(", "posY", "<", "-", "64D", ")", "{", "kill", "(", ")", ";", "}", "if", "(", "!", "worldObj", ".", "isRemote", ")", "{", "setFlag", "(", "0", ",", "fire", ">", "0", ")", ";", "setFlag", "(", "2", ",", "ridingEntity", "!=", "null", ")", ";", "}", "firstUpdate", "=", "false", ";", "Profiler", ".", "endSection", "(", ")", ";", "}", "protected", "void", "setOnFireFromLava", "(", ")", "{", "if", "(", "!", "isImmuneToFire", ")", "{", "attackEntityFrom", "(", "DamageSource", ".", "lava", ",", "4", ")", ";", "setFire", "(", "15", ")", ";", "}", "}", "public", "void", "setFire", "(", "int", "par1", ")", "{", "int", "i", "=", "par1", "*", "20", ";", "if", "(", "fire", "<", "i", ")", "{", "fire", "=", "i", ";", "}", "}", "public", "void", "extinguish", "(", ")", "{", "fire", "=", "0", ";", "}", "protected", "void", "kill", "(", ")", "{", "setDead", "(", ")", ";", "}", "public", "boolean", "isOffsetPositionInLiquid", "(", "double", "par1", ",", "double", "par3", ",", "double", "par5", ")", "{", "AxisAlignedBB", "axisalignedbb", "=", "boundingBox", ".", "getOffsetBoundingBox", "(", "par1", ",", "par3", ",", "par5", ")", ";", "List", "list", "=", "worldObj", ".", "getCollidingBoundingBoxes", "(", "this", ",", "axisalignedbb", ")", ";", "if", "(", "list", ".", "size", "(", ")", ">", "0", ")", "{", "return", "false", ";", "}", "return", "!", "worldObj", ".", "isAnyLiquid", "(", "axisalignedbb", ")", ";", "}", "public", "void", "moveEntity", "(", "double", "par1", ",", "double", "par3", ",", "double", "par5", ")", "{", "if", "(", "noClip", ")", "{", "boundingBox", ".", "offset", "(", "par1", ",", "par3", ",", "par5", ")", ";", "posX", "=", "(", "boundingBox", ".", "minX", "+", "boundingBox", ".", "maxX", ")", "/", "2D", ";", "posY", "=", "(", "boundingBox", ".", "minY", "+", "(", "double", ")", "yOffset", ")", "-", "(", "double", ")", "ySize", ";", "posZ", "=", "(", "boundingBox", ".", "minZ", "+", "boundingBox", ".", "maxZ", ")", "/", "2D", ";", "return", ";", "}", "Profiler", ".", "startSection", "(", "\"move\"", ")", ";", "ySize", "*=", "0.4F", ";", "double", "d", "=", "posX", ";", "double", "d1", "=", "posZ", ";", "if", "(", "isInWeb", ")", "{", "isInWeb", "=", "false", ";", "par1", "*=", "0.25D", ";", "par3", "*=", "0.05000000074505806D", ";", "par5", "*=", "0.25D", ";", "motionX", "=", "0.0D", ";", "motionY", "=", "0.0D", ";", "motionZ", "=", "0.0D", ";", "}", "double", "d2", "=", "par1", ";", "double", "d3", "=", "par3", ";", "double", "d4", "=", "par5", ";", "AxisAlignedBB", "axisalignedbb", "=", "boundingBox", ".", "copy", "(", ")", ";", "boolean", "flag", "=", "onGround", "&&", "isSneaking", "(", ")", "&&", "(", "this", "instanceof", "EntityPlayer", ")", ";", "if", "(", "flag", ")", "{", "double", "d5", "=", "0.050000000000000003D", ";", "for", "(", ";", "par1", "!=", "0.0D", "&&", "worldObj", ".", "getCollidingBoundingBoxes", "(", "this", ",", "boundingBox", ".", "getOffsetBoundingBox", "(", "par1", ",", "-", "1D", ",", "0.0D", ")", ")", ".", "size", "(", ")", "==", "0", ";", "d2", "=", "par1", ")", "{", "if", "(", "par1", "<", "d5", "&&", "par1", ">=", "-", "d5", ")", "{", "par1", "=", "0.0D", ";", "continue", ";", "}", "if", "(", "par1", ">", "0.0D", ")", "{", "par1", "-=", "d5", ";", "}", "else", "{", "par1", "+=", "d5", ";", "}", "}", "for", "(", ";", "par5", "!=", "0.0D", "&&", "worldObj", ".", "getCollidingBoundingBoxes", "(", "this", ",", "boundingBox", ".", "getOffsetBoundingBox", "(", "0.0D", ",", "-", "1D", ",", "par5", ")", ")", ".", "size", "(", ")", "==", "0", ";", "d4", "=", "par5", ")", "{", "if", "(", "par5", "<", "d5", "&&", "par5", ">=", "-", "d5", ")", "{", "par5", "=", "0.0D", ";", "continue", ";", "}", "if", "(", "par5", ">", "0.0D", ")", "{", "par5", "-=", "d5", ";", "}", "else", "{", "par5", "+=", "d5", ";", "}", "}", "while", "(", "par1", "!=", "0.0D", "&&", "par5", "!=", "0.0D", "&&", "worldObj", ".", "getCollidingBoundingBoxes", "(", "this", ",", "boundingBox", ".", "getOffsetBoundingBox", "(", "par1", ",", "-", "1D", ",", "par5", ")", ")", ".", "size", "(", ")", "==", "0", ")", "{", "if", "(", "par1", "<", "d5", "&&", "par1", ">=", "-", "d5", ")", "{", "par1", "=", "0.0D", ";", "}", "else", "if", "(", "par1", ">", "0.0D", ")", "{", "par1", "-=", "d5", ";", "}", "else", "{", "par1", "+=", "d5", ";", "}", "if", "(", "par5", "<", "d5", "&&", "par5", ">=", "-", "d5", ")", "{", "par5", "=", "0.0D", ";", "}", "else", "if", "(", "par5", ">", "0.0D", ")", "{", "par5", "-=", "d5", ";", "}", "else", "{", "par5", "+=", "d5", ";", "}", "d2", "=", "par1", ";", "d4", "=", "par5", ";", "}", "}", "List", "list", "=", "worldObj", ".", "getCollidingBoundingBoxes", "(", "this", ",", "boundingBox", ".", "addCoord", "(", "par1", ",", "par3", ",", "par5", ")", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "list", ".", "size", "(", ")", ";", "i", "++", ")", "{", "par3", "=", "(", "(", "AxisAlignedBB", ")", "list", ".", "get", "(", "i", ")", ")", ".", "calculateYOffset", "(", "boundingBox", ",", "par3", ")", ";", "}", "boundingBox", ".", "offset", "(", "0.0D", ",", "par3", ",", "0.0D", ")", ";", "if", "(", "!", "field_9077_F", "&&", "d3", "!=", "par3", ")", "{", "par1", "=", "par3", "=", "par5", "=", "0.0D", ";", "}", "boolean", "flag1", "=", "onGround", "||", "d3", "!=", "par3", "&&", "d3", "<", "0.0D", ";", "for", "(", "int", "j", "=", "0", ";", "j", "<", "list", ".", "size", "(", ")", ";", "j", "++", ")", "{", "par1", "=", "(", "(", "AxisAlignedBB", ")", "list", ".", "get", "(", "j", ")", ")", ".", "calculateXOffset", "(", "boundingBox", ",", "par1", ")", ";", "}", "boundingBox", ".", "offset", "(", "par1", ",", "0.0D", ",", "0.0D", ")", ";", "if", "(", "!", "field_9077_F", "&&", "d2", "!=", "par1", ")", "{", "par1", "=", "par3", "=", "par5", "=", "0.0D", ";", "}", "for", "(", "int", "k", "=", "0", ";", "k", "<", "list", ".", "size", "(", ")", ";", "k", "++", ")", "{", "par5", "=", "(", "(", "AxisAlignedBB", ")", "list", ".", "get", "(", "k", ")", ")", ".", "calculateZOffset", "(", "boundingBox", ",", "par5", ")", ";", "}", "boundingBox", ".", "offset", "(", "0.0D", ",", "0.0D", ",", "par5", ")", ";", "if", "(", "!", "field_9077_F", "&&", "d4", "!=", "par5", ")", "{", "par1", "=", "par3", "=", "par5", "=", "0.0D", ";", "}", "if", "(", "stepHeight", ">", "0.0F", "&&", "flag1", "&&", "(", "flag", "||", "ySize", "<", "0.05F", ")", "&&", "(", "d2", "!=", "par1", "||", "d4", "!=", "par5", ")", ")", "{", "double", "d6", "=", "par1", ";", "double", "d8", "=", "par3", ";", "double", "d10", "=", "par5", ";", "par1", "=", "d2", ";", "par3", "=", "stepHeight", ";", "par5", "=", "d4", ";", "AxisAlignedBB", "axisalignedbb1", "=", "boundingBox", ".", "copy", "(", ")", ";", "boundingBox", ".", "setBB", "(", "axisalignedbb", ")", ";", "List", "list1", "=", "worldObj", ".", "getCollidingBoundingBoxes", "(", "this", ",", "boundingBox", ".", "addCoord", "(", "par1", ",", "par3", ",", "par5", ")", ")", ";", "for", "(", "int", "j2", "=", "0", ";", "j2", "<", "list1", ".", "size", "(", ")", ";", "j2", "++", ")", "{", "par3", "=", "(", "(", "AxisAlignedBB", ")", "list1", ".", "get", "(", "j2", ")", ")", ".", "calculateYOffset", "(", "boundingBox", ",", "par3", ")", ";", "}", "boundingBox", ".", "offset", "(", "0.0D", ",", "par3", ",", "0.0D", ")", ";", "if", "(", "!", "field_9077_F", "&&", "d3", "!=", "par3", ")", "{", "par1", "=", "par3", "=", "par5", "=", "0.0D", ";", "}", "for", "(", "int", "k2", "=", "0", ";", "k2", "<", "list1", ".", "size", "(", ")", ";", "k2", "++", ")", "{", "par1", "=", "(", "(", "AxisAlignedBB", ")", "list1", ".", "get", "(", "k2", ")", ")", ".", "calculateXOffset", "(", "boundingBox", ",", "par1", ")", ";", "}", "boundingBox", ".", "offset", "(", "par1", ",", "0.0D", ",", "0.0D", ")", ";", "if", "(", "!", "field_9077_F", "&&", "d2", "!=", "par1", ")", "{", "par1", "=", "par3", "=", "par5", "=", "0.0D", ";", "}", "for", "(", "int", "l2", "=", "0", ";", "l2", "<", "list1", ".", "size", "(", ")", ";", "l2", "++", ")", "{", "par5", "=", "(", "(", "AxisAlignedBB", ")", "list1", ".", "get", "(", "l2", ")", ")", ".", "calculateZOffset", "(", "boundingBox", ",", "par5", ")", ";", "}", "boundingBox", ".", "offset", "(", "0.0D", ",", "0.0D", ",", "par5", ")", ";", "if", "(", "!", "field_9077_F", "&&", "d4", "!=", "par5", ")", "{", "par1", "=", "par3", "=", "par5", "=", "0.0D", ";", "}", "if", "(", "!", "field_9077_F", "&&", "d3", "!=", "par3", ")", "{", "par1", "=", "par3", "=", "par5", "=", "0.0D", ";", "}", "else", "{", "par3", "=", "-", "stepHeight", ";", "for", "(", "int", "i3", "=", "0", ";", "i3", "<", "list1", ".", "size", "(", ")", ";", "i3", "++", ")", "{", "par3", "=", "(", "(", "AxisAlignedBB", ")", "list1", ".", "get", "(", "i3", ")", ")", ".", "calculateYOffset", "(", "boundingBox", ",", "par3", ")", ";", "}", "boundingBox", ".", "offset", "(", "0.0D", ",", "par3", ",", "0.0D", ")", ";", "}", "if", "(", "d6", "*", "d6", "+", "d10", "*", "d10", ">=", "par1", "*", "par1", "+", "par5", "*", "par5", ")", "{", "par1", "=", "d6", ";", "par3", "=", "d8", ";", "par5", "=", "d10", ";", "boundingBox", ".", "setBB", "(", "axisalignedbb1", ")", ";", "}", "else", "{", "double", "d11", "=", "boundingBox", ".", "minY", "-", "(", "double", ")", "(", "int", ")", "boundingBox", ".", "minY", ";", "if", "(", "d11", ">", "0.0D", ")", "{", "ySize", "+=", "d11", "+", "0.01D", ";", "}", "}", "}", "Profiler", ".", "endSection", "(", ")", ";", "Profiler", ".", "startSection", "(", "\"rest\"", ")", ";", "posX", "=", "(", "boundingBox", ".", "minX", "+", "boundingBox", ".", "maxX", ")", "/", "2D", ";", "posY", "=", "(", "boundingBox", ".", "minY", "+", "(", "double", ")", "yOffset", ")", "-", "(", "double", ")", "ySize", ";", "posZ", "=", "(", "boundingBox", ".", "minZ", "+", "boundingBox", ".", "maxZ", ")", "/", "2D", ";", "isCollidedHorizontally", "=", "d2", "!=", "par1", "||", "d4", "!=", "par5", ";", "isCollidedVertically", "=", "d3", "!=", "par3", ";", "onGround", "=", "d3", "!=", "par3", "&&", "d3", "<", "0.0D", ";", "isCollided", "=", "isCollidedHorizontally", "||", "isCollidedVertically", ";", "updateFallState", "(", "par3", ",", "onGround", ")", ";", "if", "(", "d2", "!=", "par1", ")", "{", "motionX", "=", "0.0D", ";", "}", "if", "(", "d3", "!=", "par3", ")", "{", "motionY", "=", "0.0D", ";", "}", "if", "(", "d4", "!=", "par5", ")", "{", "motionZ", "=", "0.0D", ";", "}", "double", "d7", "=", "posX", "-", "d", ";", "double", "d9", "=", "posZ", "-", "d1", ";", "if", "(", "canTriggerWalking", "(", ")", "&&", "!", "flag", "&&", "ridingEntity", "==", "null", ")", "{", "distanceWalkedModified", "+=", "(", "double", ")", "MathHelper", ".", "sqrt_double", "(", "d7", "*", "d7", "+", "d9", "*", "d9", ")", "*", "0.59999999999999998D", ";", "int", "l", "=", "MathHelper", ".", "floor_double", "(", "posX", ")", ";", "int", "j1", "=", "MathHelper", ".", "floor_double", "(", "posY", "-", "0.20000000298023224D", "-", "(", "double", ")", "yOffset", ")", ";", "int", "l1", "=", "MathHelper", ".", "floor_double", "(", "posZ", ")", ";", "int", "j3", "=", "worldObj", ".", "getBlockId", "(", "l", ",", "j1", ",", "l1", ")", ";", "if", "(", "j3", "==", "0", "&&", "worldObj", ".", "getBlockId", "(", "l", ",", "j1", "-", "1", ",", "l1", ")", "==", "Block", ".", "fence", ".", "blockID", ")", "{", "j3", "=", "worldObj", ".", "getBlockId", "(", "l", ",", "j1", "-", "1", ",", "l1", ")", ";", "}", "if", "(", "distanceWalkedModified", ">", "(", "float", ")", "nextStepDistance", "&&", "j3", ">", "0", ")", "{", "nextStepDistance", "=", "(", "int", ")", "distanceWalkedModified", "+", "1", ";", "playStepSound", "(", "l", ",", "j1", ",", "l1", ",", "j3", ")", ";", "Block", ".", "blocksList", "[", "j3", "]", ".", "onEntityWalking", "(", "worldObj", ",", "l", ",", "j1", ",", "l1", ",", "this", ")", ";", "}", "}", "int", "i1", "=", "MathHelper", ".", "floor_double", "(", "boundingBox", ".", "minX", "+", "0.001D", ")", ";", "int", "k1", "=", "MathHelper", ".", "floor_double", "(", "boundingBox", ".", "minY", "+", "0.001D", ")", ";", "int", "i2", "=", "MathHelper", ".", "floor_double", "(", "boundingBox", ".", "minZ", "+", "0.001D", ")", ";", "int", "k3", "=", "MathHelper", ".", "floor_double", "(", "boundingBox", ".", "maxX", "-", "0.001D", ")", ";", "int", "l3", "=", "MathHelper", ".", "floor_double", "(", "boundingBox", ".", "maxY", "-", "0.001D", ")", ";", "int", "i4", "=", "MathHelper", ".", "floor_double", "(", "boundingBox", ".", "maxZ", "-", "0.001D", ")", ";", "if", "(", "worldObj", ".", "checkChunksExist", "(", "i1", ",", "k1", ",", "i2", ",", "k3", ",", "l3", ",", "i4", ")", ")", "{", "for", "(", "int", "j4", "=", "i1", ";", "j4", "<=", "k3", ";", "j4", "++", ")", "{", "for", "(", "int", "k4", "=", "k1", ";", "k4", "<=", "l3", ";", "k4", "++", ")", "{", "for", "(", "int", "l4", "=", "i2", ";", "l4", "<=", "i4", ";", "l4", "++", ")", "{", "int", "i5", "=", "worldObj", ".", "getBlockId", "(", "j4", ",", "k4", ",", "l4", ")", ";", "if", "(", "i5", ">", "0", ")", "{", "Block", ".", "blocksList", "[", "i5", "]", ".", "onEntityCollidedWithBlock", "(", "worldObj", ",", "j4", ",", "k4", ",", "l4", ",", "this", ")", ";", "}", "}", "}", "}", "}", "boolean", "flag2", "=", "isWet", "(", ")", ";", "if", "(", "worldObj", ".", "isBoundingBoxBurning", "(", "boundingBox", ".", "contract", "(", "0.001D", ",", "0.001D", ",", "0.001D", ")", ")", ")", "{", "dealFireDamage", "(", "1", ")", ";", "if", "(", "!", "flag2", ")", "{", "fire", "++", ";", "if", "(", "fire", "==", "0", ")", "{", "setFire", "(", "8", ")", ";", "}", "}", "}", "else", "if", "(", "fire", "<=", "0", ")", "{", "fire", "=", "-", "fireResistance", ";", "}", "if", "(", "flag2", "&&", "fire", ">", "0", ")", "{", "worldObj", ".", "playSoundAtEntity", "(", "this", ",", "\"random.fizz\"", ",", "0.7F", ",", "1.6F", "+", "(", "rand", ".", "nextFloat", "(", ")", "-", "rand", ".", "nextFloat", "(", ")", ")", "*", "0.4F", ")", ";", "fire", "=", "-", "fireResistance", ";", "}", "Profiler", ".", "endSection", "(", ")", ";", "}", "protected", "void", "playStepSound", "(", "int", "par1", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ")", "{", "StepSound", "stepsound", "=", "Block", ".", "blocksList", "[", "par4", "]", ".", "stepSound", ";", "if", "(", "worldObj", ".", "getBlockId", "(", "par1", ",", "par2", "+", "1", ",", "par3", ")", "==", "Block", ".", "snow", ".", "blockID", ")", "{", "stepsound", "=", "Block", ".", "snow", ".", "stepSound", ";", "worldObj", ".", "playSoundAtEntity", "(", "this", ",", "stepsound", ".", "getStepSound", "(", ")", ",", "stepsound", ".", "getVolume", "(", ")", "*", "0.15F", ",", "stepsound", ".", "getPitch", "(", ")", ")", ";", "}", "else", "if", "(", "!", "Block", ".", "blocksList", "[", "par4", "]", ".", "blockMaterial", ".", "isLiquid", "(", ")", ")", "{", "worldObj", ".", "playSoundAtEntity", "(", "this", ",", "stepsound", ".", "getStepSound", "(", ")", ",", "stepsound", ".", "getVolume", "(", ")", "*", "0.15F", ",", "stepsound", ".", "getPitch", "(", ")", ")", ";", "}", "}", "protected", "boolean", "canTriggerWalking", "(", ")", "{", "return", "true", ";", "}", "protected", "void", "updateFallState", "(", "double", "par1", ",", "boolean", "par3", ")", "{", "if", "(", "par3", ")", "{", "if", "(", "fallDistance", ">", "0.0F", ")", "{", "if", "(", "this", "instanceof", "EntityLiving", ")", "{", "int", "i", "=", "MathHelper", ".", "floor_double", "(", "posX", ")", ";", "int", "j", "=", "MathHelper", ".", "floor_double", "(", "posY", "-", "0.20000000298023224D", "-", "(", "double", ")", "yOffset", ")", ";", "int", "k", "=", "MathHelper", ".", "floor_double", "(", "posZ", ")", ";", "int", "l", "=", "worldObj", ".", "getBlockId", "(", "i", ",", "j", ",", "k", ")", ";", "if", "(", "l", "==", "0", "&&", "worldObj", ".", "getBlockId", "(", "i", ",", "j", "-", "1", ",", "k", ")", "==", "Block", ".", "fence", ".", "blockID", ")", "{", "l", "=", "worldObj", ".", "getBlockId", "(", "i", ",", "j", "-", "1", ",", "k", ")", ";", "}", "if", "(", "l", ">", "0", ")", "{", "Block", ".", "blocksList", "[", "l", "]", ".", "onFallenUpon", "(", "worldObj", ",", "i", ",", "j", ",", "k", ",", "this", ",", "fallDistance", ")", ";", "}", "}", "fall", "(", "fallDistance", ")", ";", "fallDistance", "=", "0.0F", ";", "}", "}", "else", "if", "(", "par1", "<", "0.0D", ")", "{", "fallDistance", "-=", "par1", ";", "}", "}", "public", "AxisAlignedBB", "getBoundingBox", "(", ")", "{", "return", "null", ";", "}", "protected", "void", "dealFireDamage", "(", "int", "par1", ")", "{", "if", "(", "!", "isImmuneToFire", ")", "{", "attackEntityFrom", "(", "DamageSource", ".", "inFire", ",", "par1", ")", ";", "}", "}", "public", "final", "boolean", "isImmuneToFire", "(", ")", "{", "return", "isImmuneToFire", ";", "}", "protected", "void", "fall", "(", "float", "par1", ")", "{", "if", "(", "riddenByEntity", "!=", "null", ")", "{", "riddenByEntity", ".", "fall", "(", "par1", ")", ";", "}", "}", "public", "boolean", "isWet", "(", ")", "{", "return", "inWater", "||", "worldObj", ".", "canLightningStrikeAt", "(", "MathHelper", ".", "floor_double", "(", "posX", ")", ",", "MathHelper", ".", "floor_double", "(", "posY", ")", ",", "MathHelper", ".", "floor_double", "(", "posZ", ")", ")", ";", "}", "public", "boolean", "isInWater", "(", ")", "{", "return", "inWater", ";", "}", "public", "boolean", "handleWaterMovement", "(", ")", "{", "return", "worldObj", ".", "handleMaterialAcceleration", "(", "boundingBox", ".", "expand", "(", "0.0D", ",", "-", "0.40000000596046448D", ",", "0.0D", ")", ".", "contract", "(", "0.001D", ",", "0.001D", ",", "0.001D", ")", ",", "Material", ".", "water", ",", "this", ")", ";", "}", "public", "boolean", "isInsideOfMaterial", "(", "Material", "par1Material", ")", "{", "double", "d", "=", "posY", "+", "(", "double", ")", "getEyeHeight", "(", ")", ";", "int", "i", "=", "MathHelper", ".", "floor_double", "(", "posX", ")", ";", "int", "j", "=", "MathHelper", ".", "floor_float", "(", "MathHelper", ".", "floor_double", "(", "d", ")", ")", ";", "int", "k", "=", "MathHelper", ".", "floor_double", "(", "posZ", ")", ";", "int", "l", "=", "worldObj", ".", "getBlockId", "(", "i", ",", "j", ",", "k", ")", ";", "if", "(", "l", "!=", "0", "&&", "Block", ".", "blocksList", "[", "l", "]", ".", "blockMaterial", "==", "par1Material", ")", "{", "float", "f", "=", "BlockFluid", ".", "getFluidHeightPercent", "(", "worldObj", ".", "getBlockMetadata", "(", "i", ",", "j", ",", "k", ")", ")", "-", "0.1111111F", ";", "float", "f1", "=", "(", "float", ")", "(", "j", "+", "1", ")", "-", "f", ";", "return", "d", "<", "(", "double", ")", "f1", ";", "}", "else", "{", "return", "false", ";", "}", "}", "public", "float", "getEyeHeight", "(", ")", "{", "return", "0.0F", ";", "}", "public", "boolean", "handleLavaMovement", "(", ")", "{", "return", "worldObj", ".", "isMaterialInBB", "(", "boundingBox", ".", "expand", "(", "-", "0.10000000149011612D", ",", "-", "0.40000000596046448D", ",", "-", "0.10000000149011612D", ")", ",", "Material", ".", "lava", ")", ";", "}", "public", "void", "moveFlying", "(", "float", "par1", ",", "float", "par2", ",", "float", "par3", ")", "{", "float", "f", "=", "MathHelper", ".", "sqrt_float", "(", "par1", "*", "par1", "+", "par2", "*", "par2", ")", ";", "if", "(", "f", "<", "0.01F", ")", "{", "return", ";", "}", "if", "(", "f", "<", "1.0F", ")", "{", "f", "=", "1.0F", ";", "}", "f", "=", "par3", "/", "f", ";", "par1", "*=", "f", ";", "par2", "*=", "f", ";", "float", "f1", "=", "MathHelper", ".", "sin", "(", "(", "rotationYaw", "*", "(", "float", ")", "Math", ".", "PI", ")", "/", "180F", ")", ";", "float", "f2", "=", "MathHelper", ".", "cos", "(", "(", "rotationYaw", "*", "(", "float", ")", "Math", ".", "PI", ")", "/", "180F", ")", ";", "motionX", "+=", "par1", "*", "f2", "-", "par2", "*", "f1", ";", "motionZ", "+=", "par2", "*", "f2", "+", "par1", "*", "f1", ";", "}", "public", "float", "getBrightness", "(", "float", "par1", ")", "{", "int", "i", "=", "MathHelper", ".", "floor_double", "(", "posX", ")", ";", "int", "j", "=", "MathHelper", ".", "floor_double", "(", "posZ", ")", ";", "if", "(", "worldObj", ".", "blockExists", "(", "i", ",", "0", ",", "j", ")", ")", "{", "double", "d", "=", "(", "boundingBox", ".", "maxY", "-", "boundingBox", ".", "minY", ")", "*", "0.66000000000000003D", ";", "int", "k", "=", "MathHelper", ".", "floor_double", "(", "(", "posY", "-", "(", "double", ")", "yOffset", ")", "+", "d", ")", ";", "return", "worldObj", ".", "getLightBrightness", "(", "i", ",", "k", ",", "j", ")", ";", "}", "else", "{", "return", "0.0F", ";", "}", "}", "public", "void", "setWorld", "(", "World", "par1World", ")", "{", "worldObj", "=", "par1World", ";", "}", "public", "void", "setPositionAndRotation", "(", "double", "par1", ",", "double", "par3", ",", "double", "par5", ",", "float", "par7", ",", "float", "par8", ")", "{", "prevPosX", "=", "posX", "=", "par1", ";", "prevPosY", "=", "posY", "=", "par3", ";", "prevPosZ", "=", "posZ", "=", "par5", ";", "prevRotationYaw", "=", "rotationYaw", "=", "par7", ";", "prevRotationPitch", "=", "rotationPitch", "=", "par8", ";", "ySize", "=", "0.0F", ";", "double", "d", "=", "prevRotationYaw", "-", "par7", ";", "if", "(", "d", "<", "-", "180D", ")", "{", "prevRotationYaw", "+=", "360F", ";", "}", "if", "(", "d", ">=", "180D", ")", "{", "prevRotationYaw", "-=", "360F", ";", "}", "setPosition", "(", "posX", ",", "posY", ",", "posZ", ")", ";", "setRotation", "(", "par7", ",", "par8", ")", ";", "}", "public", "void", "setLocationAndAngles", "(", "double", "par1", ",", "double", "par3", ",", "double", "par5", ",", "float", "par7", ",", "float", "par8", ")", "{", "lastTickPosX", "=", "prevPosX", "=", "posX", "=", "par1", ";", "lastTickPosY", "=", "prevPosY", "=", "posY", "=", "par3", "+", "(", "double", ")", "yOffset", ";", "lastTickPosZ", "=", "prevPosZ", "=", "posZ", "=", "par5", ";", "rotationYaw", "=", "par7", ";", "rotationPitch", "=", "par8", ";", "setPosition", "(", "posX", ",", "posY", ",", "posZ", ")", ";", "}", "public", "float", "getDistanceToEntity", "(", "Entity", "par1Entity", ")", "{", "float", "f", "=", "(", "float", ")", "(", "posX", "-", "par1Entity", ".", "posX", ")", ";", "float", "f1", "=", "(", "float", ")", "(", "posY", "-", "par1Entity", ".", "posY", ")", ";", "float", "f2", "=", "(", "float", ")", "(", "posZ", "-", "par1Entity", ".", "posZ", ")", ";", "return", "MathHelper", ".", "sqrt_float", "(", "f", "*", "f", "+", "f1", "*", "f1", "+", "f2", "*", "f2", ")", ";", "}", "public", "double", "getDistanceSq", "(", "double", "par1", ",", "double", "par3", ",", "double", "par5", ")", "{", "double", "d", "=", "posX", "-", "par1", ";", "double", "d1", "=", "posY", "-", "par3", ";", "double", "d2", "=", "posZ", "-", "par5", ";", "return", "d", "*", "d", "+", "d1", "*", "d1", "+", "d2", "*", "d2", ";", "}", "public", "double", "getDistance", "(", "double", "par1", ",", "double", "par3", ",", "double", "par5", ")", "{", "double", "d", "=", "posX", "-", "par1", ";", "double", "d1", "=", "posY", "-", "par3", ";", "double", "d2", "=", "posZ", "-", "par5", ";", "return", "(", "double", ")", "MathHelper", ".", "sqrt_double", "(", "d", "*", "d", "+", "d1", "*", "d1", "+", "d2", "*", "d2", ")", ";", "}", "public", "double", "getDistanceSqToEntity", "(", "Entity", "par1Entity", ")", "{", "double", "d", "=", "posX", "-", "par1Entity", ".", "posX", ";", "double", "d1", "=", "posY", "-", "par1Entity", ".", "posY", ";", "double", "d2", "=", "posZ", "-", "par1Entity", ".", "posZ", ";", "return", "d", "*", "d", "+", "d1", "*", "d1", "+", "d2", "*", "d2", ";", "}", "public", "void", "onCollideWithPlayer", "(", "EntityPlayer", "entityplayer", ")", "{", "}", "public", "void", "applyEntityCollision", "(", "Entity", "par1Entity", ")", "{", "if", "(", "par1Entity", ".", "riddenByEntity", "==", "this", "||", "par1Entity", ".", "ridingEntity", "==", "this", ")", "{", "return", ";", "}", "double", "d", "=", "par1Entity", ".", "posX", "-", "posX", ";", "double", "d1", "=", "par1Entity", ".", "posZ", "-", "posZ", ";", "double", "d2", "=", "MathHelper", ".", "abs_max", "(", "d", ",", "d1", ")", ";", "if", "(", "d2", ">=", "0.0099999997764825821D", ")", "{", "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.05000000074505806D", ";", "d1", "*=", "0.05000000074505806D", ";", "d", "*=", "1.0F", "-", "entityCollisionReduction", ";", "d1", "*=", "1.0F", "-", "entityCollisionReduction", ";", "addVelocity", "(", "-", "d", ",", "0.0D", ",", "-", "d1", ")", ";", "par1Entity", ".", "addVelocity", "(", "d", ",", "0.0D", ",", "d1", ")", ";", "}", "}", "public", "void", "addVelocity", "(", "double", "par1", ",", "double", "par3", ",", "double", "par5", ")", "{", "motionX", "+=", "par1", ";", "motionY", "+=", "par3", ";", "motionZ", "+=", "par5", ";", "isAirBorne", "=", "true", ";", "}", "protected", "void", "setBeenAttacked", "(", ")", "{", "velocityChanged", "=", "true", ";", "}", "public", "boolean", "attackEntityFrom", "(", "DamageSource", "par1DamageSource", ",", "int", "par2", ")", "{", "setBeenAttacked", "(", ")", ";", "return", "false", ";", "}", "public", "boolean", "canBeCollidedWith", "(", ")", "{", "return", "false", ";", "}", "public", "boolean", "canBePushed", "(", ")", "{", "return", "false", ";", "}", "public", "void", "addToPlayerScore", "(", "Entity", "entity", ",", "int", "i", ")", "{", "}", "public", "boolean", "addEntityID", "(", "NBTTagCompound", "par1NBTTagCompound", ")", "{", "String", "s", "=", "getEntityString", "(", ")", ";", "if", "(", "isDead", "||", "s", "==", "null", ")", "{", "return", "false", ";", "}", "else", "{", "par1NBTTagCompound", ".", "setString", "(", "\"id\"", ",", "s", ")", ";", "writeToNBT", "(", "par1NBTTagCompound", ")", ";", "return", "true", ";", "}", "}", "public", "void", "writeToNBT", "(", "NBTTagCompound", "par1NBTTagCompound", ")", "{", "par1NBTTagCompound", ".", "setTag", "(", "\"Pos\"", ",", "newDoubleNBTList", "(", "new", "double", "[", "]", "{", "posX", ",", "posY", "+", "(", "double", ")", "ySize", ",", "posZ", "}", ")", ")", ";", "par1NBTTagCompound", ".", "setTag", "(", "\"Motion\"", ",", "newDoubleNBTList", "(", "new", "double", "[", "]", "{", "motionX", ",", "motionY", ",", "motionZ", "}", ")", ")", ";", "par1NBTTagCompound", ".", "setTag", "(", "\"Rotation\"", ",", "newFloatNBTList", "(", "new", "float", "[", "]", "{", "rotationYaw", ",", "rotationPitch", "}", ")", ")", ";", "par1NBTTagCompound", ".", "setFloat", "(", "\"FallDistance\"", ",", "fallDistance", ")", ";", "par1NBTTagCompound", ".", "setShort", "(", "\"Fire\"", ",", "(", "short", ")", "fire", ")", ";", "par1NBTTagCompound", ".", "setShort", "(", "\"Air\"", ",", "(", "short", ")", "getAir", "(", ")", ")", ";", "par1NBTTagCompound", ".", "setBoolean", "(", "\"OnGround\"", ",", "onGround", ")", ";", "writeEntityToNBT", "(", "par1NBTTagCompound", ")", ";", "}", "public", "void", "readFromNBT", "(", "NBTTagCompound", "par1NBTTagCompound", ")", "{", "NBTTagList", "nbttaglist", "=", "par1NBTTagCompound", ".", "getTagList", "(", "\"Pos\"", ")", ";", "NBTTagList", "nbttaglist1", "=", "par1NBTTagCompound", ".", "getTagList", "(", "\"Motion\"", ")", ";", "NBTTagList", "nbttaglist2", "=", "par1NBTTagCompound", ".", "getTagList", "(", "\"Rotation\"", ")", ";", "motionX", "=", "(", "(", "NBTTagDouble", ")", "nbttaglist1", ".", "tagAt", "(", "0", ")", ")", ".", "data", ";", "motionY", "=", "(", "(", "NBTTagDouble", ")", "nbttaglist1", ".", "tagAt", "(", "1", ")", ")", ".", "data", ";", "motionZ", "=", "(", "(", "NBTTagDouble", ")", "nbttaglist1", ".", "tagAt", "(", "2", ")", ")", ".", "data", ";", "if", "(", "Math", ".", "abs", "(", "motionX", ")", ">", "10D", ")", "{", "motionX", "=", "0.0D", ";", "}", "if", "(", "Math", ".", "abs", "(", "motionY", ")", ">", "10D", ")", "{", "motionY", "=", "0.0D", ";", "}", "if", "(", "Math", ".", "abs", "(", "motionZ", ")", ">", "10D", ")", "{", "motionZ", "=", "0.0D", ";", "}", "prevPosX", "=", "lastTickPosX", "=", "posX", "=", "(", "(", "NBTTagDouble", ")", "nbttaglist", ".", "tagAt", "(", "0", ")", ")", ".", "data", ";", "prevPosY", "=", "lastTickPosY", "=", "posY", "=", "(", "(", "NBTTagDouble", ")", "nbttaglist", ".", "tagAt", "(", "1", ")", ")", ".", "data", ";", "prevPosZ", "=", "lastTickPosZ", "=", "posZ", "=", "(", "(", "NBTTagDouble", ")", "nbttaglist", ".", "tagAt", "(", "2", ")", ")", ".", "data", ";", "prevRotationYaw", "=", "rotationYaw", "=", "(", "(", "NBTTagFloat", ")", "nbttaglist2", ".", "tagAt", "(", "0", ")", ")", ".", "data", ";", "prevRotationPitch", "=", "rotationPitch", "=", "(", "(", "NBTTagFloat", ")", "nbttaglist2", ".", "tagAt", "(", "1", ")", ")", ".", "data", ";", "fallDistance", "=", "par1NBTTagCompound", ".", "getFloat", "(", "\"FallDistance\"", ")", ";", "fire", "=", "par1NBTTagCompound", ".", "getShort", "(", "\"Fire\"", ")", ";", "setAir", "(", "par1NBTTagCompound", ".", "getShort", "(", "\"Air\"", ")", ")", ";", "onGround", "=", "par1NBTTagCompound", ".", "getBoolean", "(", "\"OnGround\"", ")", ";", "setPosition", "(", "posX", ",", "posY", ",", "posZ", ")", ";", "setRotation", "(", "rotationYaw", ",", "rotationPitch", ")", ";", "readEntityFromNBT", "(", "par1NBTTagCompound", ")", ";", "}", "protected", "final", "String", "getEntityString", "(", ")", "{", "return", "EntityList", ".", "getEntityString", "(", "this", ")", ";", "}", "protected", "abstract", "void", "readEntityFromNBT", "(", "NBTTagCompound", "nbttagcompound", ")", ";", "protected", "abstract", "void", "writeEntityToNBT", "(", "NBTTagCompound", "nbttagcompound", ")", ";", "protected", "NBTTagList", "newDoubleNBTList", "(", "double", "par1ArrayOfDouble", "[", "]", ")", "{", "NBTTagList", "nbttaglist", "=", "new", "NBTTagList", "(", ")", ";", "double", "ad", "[", "]", "=", "par1ArrayOfDouble", ";", "int", "i", "=", "ad", ".", "length", ";", "for", "(", "int", "j", "=", "0", ";", "j", "<", "i", ";", "j", "++", ")", "{", "double", "d", "=", "ad", "[", "j", "]", ";", "nbttaglist", ".", "appendTag", "(", "new", "NBTTagDouble", "(", "null", ",", "d", ")", ")", ";", "}", "return", "nbttaglist", ";", "}", "protected", "NBTTagList", "newFloatNBTList", "(", "float", "par1ArrayOfFloat", "[", "]", ")", "{", "NBTTagList", "nbttaglist", "=", "new", "NBTTagList", "(", ")", ";", "float", "af", "[", "]", "=", "par1ArrayOfFloat", ";", "int", "i", "=", "af", ".", "length", ";", "for", "(", "int", "j", "=", "0", ";", "j", "<", "i", ";", "j", "++", ")", "{", "float", "f", "=", "af", "[", "j", "]", ";", "nbttaglist", ".", "appendTag", "(", "new", "NBTTagFloat", "(", "null", ",", "f", ")", ")", ";", "}", "return", "nbttaglist", ";", "}", "public", "EntityItem", "dropItem", "(", "int", "par1", ",", "int", "par2", ")", "{", "return", "dropItemWithOffset", "(", "par1", ",", "par2", ",", "0.0F", ")", ";", "}", "public", "EntityItem", "dropItemWithOffset", "(", "int", "par1", ",", "int", "par2", ",", "float", "par3", ")", "{", "return", "entityDropItem", "(", "new", "ItemStack", "(", "par1", ",", "par2", ",", "0", ")", ",", "par3", ")", ";", "}", "public", "EntityItem", "entityDropItem", "(", "ItemStack", "par1ItemStack", ",", "float", "par2", ")", "{", "EntityItem", "entityitem", "=", "new", "EntityItem", "(", "worldObj", ",", "posX", ",", "posY", "+", "(", "double", ")", "par2", ",", "posZ", ",", "par1ItemStack", ")", ";", "entityitem", ".", "delayBeforeCanPickup", "=", "10", ";", "worldObj", ".", "spawnEntityInWorld", "(", "entityitem", ")", ";", "return", "entityitem", ";", "}", "public", "boolean", "isEntityAlive", "(", ")", "{", "return", "!", "isDead", ";", "}", "public", "boolean", "isEntityInsideOpaqueBlock", "(", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "8", ";", "i", "++", ")", "{", "float", "f", "=", "(", "(", "float", ")", "(", "(", "i", ">>", "0", ")", "%", "2", ")", "-", "0.5F", ")", "*", "width", "*", "0.8F", ";", "float", "f1", "=", "(", "(", "float", ")", "(", "(", "i", ">>", "1", ")", "%", "2", ")", "-", "0.5F", ")", "*", "0.1F", ";", "float", "f2", "=", "(", "(", "float", ")", "(", "(", "i", ">>", "2", ")", "%", "2", ")", "-", "0.5F", ")", "*", "width", "*", "0.8F", ";", "int", "j", "=", "MathHelper", ".", "floor_double", "(", "posX", "+", "(", "double", ")", "f", ")", ";", "int", "k", "=", "MathHelper", ".", "floor_double", "(", "posY", "+", "(", "double", ")", "getEyeHeight", "(", ")", "+", "(", "double", ")", "f1", ")", ";", "int", "l", "=", "MathHelper", ".", "floor_double", "(", "posZ", "+", "(", "double", ")", "f2", ")", ";", "if", "(", "worldObj", ".", "isBlockNormalCube", "(", "j", ",", "k", ",", "l", ")", ")", "{", "return", "true", ";", "}", "}", "return", "false", ";", "}", "public", "boolean", "interact", "(", "EntityPlayer", "par1EntityPlayer", ")", "{", "return", "false", ";", "}", "public", "AxisAlignedBB", "getCollisionBox", "(", "Entity", "par1Entity", ")", "{", "return", "null", ";", "}", "public", "void", "updateRidden", "(", ")", "{", "if", "(", "ridingEntity", ".", "isDead", ")", "{", "ridingEntity", "=", "null", ";", "return", ";", "}", "motionX", "=", "0.0D", ";", "motionY", "=", "0.0D", ";", "motionZ", "=", "0.0D", ";", "onUpdate", "(", ")", ";", "if", "(", "ridingEntity", "==", "null", ")", "{", "return", ";", "}", "ridingEntity", ".", "updateRiderPosition", "(", ")", ";", "entityRiderYawDelta", "+=", "ridingEntity", ".", "rotationYaw", "-", "ridingEntity", ".", "prevRotationYaw", ";", "entityRiderPitchDelta", "+=", "ridingEntity", ".", "rotationPitch", "-", "ridingEntity", ".", "prevRotationPitch", ";", "for", "(", ";", "entityRiderYawDelta", ">=", "180D", ";", "entityRiderYawDelta", "-=", "360D", ")", "{", "}", "for", "(", ";", "entityRiderYawDelta", "<", "-", "180D", ";", "entityRiderYawDelta", "+=", "360D", ")", "{", "}", "for", "(", ";", "entityRiderPitchDelta", ">=", "180D", ";", "entityRiderPitchDelta", "-=", "360D", ")", "{", "}", "for", "(", ";", "entityRiderPitchDelta", "<", "-", "180D", ";", "entityRiderPitchDelta", "+=", "360D", ")", "{", "}", "double", "d", "=", "entityRiderYawDelta", "*", "0.5D", ";", "double", "d1", "=", "entityRiderPitchDelta", "*", "0.5D", ";", "float", "f", "=", "10F", ";", "if", "(", "d", ">", "(", "double", ")", "f", ")", "{", "d", "=", "f", ";", "}", "if", "(", "d", "<", "(", "double", ")", "(", "-", "f", ")", ")", "{", "d", "=", "-", "f", ";", "}", "if", "(", "d1", ">", "(", "double", ")", "f", ")", "{", "d1", "=", "f", ";", "}", "if", "(", "d1", "<", "(", "double", ")", "(", "-", "f", ")", ")", "{", "d1", "=", "-", "f", ";", "}", "entityRiderYawDelta", "-=", "d", ";", "entityRiderPitchDelta", "-=", "d1", ";", "rotationYaw", "+=", "d", ";", "rotationPitch", "+=", "d1", ";", "}", "public", "void", "updateRiderPosition", "(", ")", "{", "riddenByEntity", ".", "setPosition", "(", "posX", ",", "posY", "+", "getMountedYOffset", "(", ")", "+", "riddenByEntity", ".", "getYOffset", "(", ")", ",", "posZ", ")", ";", "}", "public", "double", "getYOffset", "(", ")", "{", "return", "(", "double", ")", "yOffset", ";", "}", "public", "double", "getMountedYOffset", "(", ")", "{", "return", "(", "double", ")", "height", "*", "0.75D", ";", "}", "public", "void", "mountEntity", "(", "Entity", "par1Entity", ")", "{", "entityRiderPitchDelta", "=", "0.0D", ";", "entityRiderYawDelta", "=", "0.0D", ";", "if", "(", "par1Entity", "==", "null", ")", "{", "if", "(", "ridingEntity", "!=", "null", ")", "{", "setLocationAndAngles", "(", "ridingEntity", ".", "posX", ",", "ridingEntity", ".", "boundingBox", ".", "minY", "+", "(", "double", ")", "ridingEntity", ".", "height", ",", "ridingEntity", ".", "posZ", ",", "rotationYaw", ",", "rotationPitch", ")", ";", "ridingEntity", ".", "riddenByEntity", "=", "null", ";", "}", "ridingEntity", "=", "null", ";", "return", ";", "}", "if", "(", "ridingEntity", "==", "par1Entity", ")", "{", "ridingEntity", ".", "riddenByEntity", "=", "null", ";", "ridingEntity", "=", "null", ";", "setLocationAndAngles", "(", "par1Entity", ".", "posX", ",", "par1Entity", ".", "boundingBox", ".", "minY", "+", "(", "double", ")", "par1Entity", ".", "height", ",", "par1Entity", ".", "posZ", ",", "rotationYaw", ",", "rotationPitch", ")", ";", "return", ";", "}", "if", "(", "ridingEntity", "!=", "null", ")", "{", "ridingEntity", ".", "riddenByEntity", "=", "null", ";", "}", "if", "(", "par1Entity", ".", "riddenByEntity", "!=", "null", ")", "{", "par1Entity", ".", "riddenByEntity", ".", "ridingEntity", "=", "null", ";", "}", "ridingEntity", "=", "par1Entity", ";", "par1Entity", ".", "riddenByEntity", "=", "this", ";", "}", "public", "float", "getCollisionBorderSize", "(", ")", "{", "return", "0.1F", ";", "}", "public", "Vec3D", "getLookVec", "(", ")", "{", "return", "null", ";", "}", "public", "void", "setInPortal", "(", ")", "{", "}", "public", "ItemStack", "[", "]", "getInventory", "(", ")", "{", "return", "null", ";", "}", "public", "boolean", "isBurning", "(", ")", "{", "return", "fire", ">", "0", "||", "getFlag", "(", "0", ")", ";", "}", "public", "boolean", "isSneaking", "(", ")", "{", "return", "getFlag", "(", "1", ")", ";", "}", "public", "void", "setSneaking", "(", "boolean", "par1", ")", "{", "setFlag", "(", "1", ",", "par1", ")", ";", "}", "public", "boolean", "isSprinting", "(", ")", "{", "return", "getFlag", "(", "3", ")", ";", "}", "public", "void", "setSprinting", "(", "boolean", "par1", ")", "{", "setFlag", "(", "3", ",", "par1", ")", ";", "}", "public", "void", "setEating", "(", "boolean", "par1", ")", "{", "setFlag", "(", "4", ",", "par1", ")", ";", "}", "protected", "boolean", "getFlag", "(", "int", "par1", ")", "{", "return", "(", "dataWatcher", ".", "getWatchableObjectByte", "(", "0", ")", "&", "1", "<<", "par1", ")", "!=", "0", ";", "}", "protected", "void", "setFlag", "(", "int", "par1", ",", "boolean", "par2", ")", "{", "byte", "byte0", "=", "dataWatcher", ".", "getWatchableObjectByte", "(", "0", ")", ";", "if", "(", "par2", ")", "{", "dataWatcher", ".", "updateObject", "(", "0", ",", "Byte", ".", "valueOf", "(", "(", "byte", ")", "(", "byte0", "|", "1", "<<", "par1", ")", ")", ")", ";", "}", "else", "{", "dataWatcher", ".", "updateObject", "(", "0", ",", "Byte", ".", "valueOf", "(", "(", "byte", ")", "(", "byte0", "&", "~", "(", "1", "<<", "par1", ")", ")", ")", ")", ";", "}", "}", "public", "int", "getAir", "(", ")", "{", "return", "dataWatcher", ".", "getWatchableObjectShort", "(", "1", ")", ";", "}", "public", "void", "setAir", "(", "int", "par1", ")", "{", "dataWatcher", ".", "updateObject", "(", "1", ",", "Short", ".", "valueOf", "(", "(", "short", ")", "par1", ")", ")", ";", "}", "public", "void", "onStruckByLightning", "(", "EntityLightningBolt", "par1EntityLightningBolt", ")", "{", "dealFireDamage", "(", "5", ")", ";", "fire", "++", ";", "if", "(", "fire", "==", "0", ")", "{", "setFire", "(", "8", ")", ";", "}", "}", "public", "void", "onKillEntity", "(", "EntityLiving", "entityliving", ")", "{", "}", "protected", "boolean", "pushOutOfBlocks", "(", "double", "par1", ",", "double", "par3", ",", "double", "par5", ")", "{", "int", "i", "=", "MathHelper", ".", "floor_double", "(", "par1", ")", ";", "int", "j", "=", "MathHelper", ".", "floor_double", "(", "par3", ")", ";", "int", "k", "=", "MathHelper", ".", "floor_double", "(", "par5", ")", ";", "double", "d", "=", "par1", "-", "(", "double", ")", "i", ";", "double", "d1", "=", "par3", "-", "(", "double", ")", "j", ";", "double", "d2", "=", "par5", "-", "(", "double", ")", "k", ";", "if", "(", "worldObj", ".", "isBlockNormalCube", "(", "i", ",", "j", ",", "k", ")", ")", "{", "boolean", "flag", "=", "!", "worldObj", ".", "isBlockNormalCube", "(", "i", "-", "1", ",", "j", ",", "k", ")", ";", "boolean", "flag1", "=", "!", "worldObj", ".", "isBlockNormalCube", "(", "i", "+", "1", ",", "j", ",", "k", ")", ";", "boolean", "flag2", "=", "!", "worldObj", ".", "isBlockNormalCube", "(", "i", ",", "j", "-", "1", ",", "k", ")", ";", "boolean", "flag3", "=", "!", "worldObj", ".", "isBlockNormalCube", "(", "i", ",", "j", "+", "1", ",", "k", ")", ";", "boolean", "flag4", "=", "!", "worldObj", ".", "isBlockNormalCube", "(", "i", ",", "j", ",", "k", "-", "1", ")", ";", "boolean", "flag5", "=", "!", "worldObj", ".", "isBlockNormalCube", "(", "i", ",", "j", ",", "k", "+", "1", ")", ";", "byte", "byte0", "=", "-", "1", ";", "double", "d3", "=", "9999D", ";", "if", "(", "flag", "&&", "d", "<", "d3", ")", "{", "d3", "=", "d", ";", "byte0", "=", "0", ";", "}", "if", "(", "flag1", "&&", "1.0D", "-", "d", "<", "d3", ")", "{", "d3", "=", "1.0D", "-", "d", ";", "byte0", "=", "1", ";", "}", "if", "(", "flag2", "&&", "d1", "<", "d3", ")", "{", "d3", "=", "d1", ";", "byte0", "=", "2", ";", "}", "if", "(", "flag3", "&&", "1.0D", "-", "d1", "<", "d3", ")", "{", "d3", "=", "1.0D", "-", "d1", ";", "byte0", "=", "3", ";", "}", "if", "(", "flag4", "&&", "d2", "<", "d3", ")", "{", "d3", "=", "d2", ";", "byte0", "=", "4", ";", "}", "if", "(", "flag5", "&&", "1.0D", "-", "d2", "<", "d3", ")", "{", "double", "d4", "=", "1.0D", "-", "d2", ";", "byte0", "=", "5", ";", "}", "float", "f", "=", "rand", ".", "nextFloat", "(", ")", "*", "0.2F", "+", "0.1F", ";", "if", "(", "byte0", "==", "0", ")", "{", "motionX", "=", "-", "f", ";", "}", "if", "(", "byte0", "==", "1", ")", "{", "motionX", "=", "f", ";", "}", "if", "(", "byte0", "==", "2", ")", "{", "motionY", "=", "-", "f", ";", "}", "if", "(", "byte0", "==", "3", ")", "{", "motionY", "=", "f", ";", "}", "if", "(", "byte0", "==", "4", ")", "{", "motionZ", "=", "-", "f", ";", "}", "if", "(", "byte0", "==", "5", ")", "{", "motionZ", "=", "f", ";", "}", "return", "true", ";", "}", "else", "{", "return", "false", ";", "}", "}", "public", "void", "setInWeb", "(", ")", "{", "isInWeb", "=", "true", ";", "fallDistance", "=", "0.0F", ";", "}", "public", "String", "getUsername", "(", ")", "{", "String", "s", "=", "EntityList", ".", "getEntityString", "(", "this", ")", ";", "if", "(", "s", "==", "null", ")", "{", "s", "=", "\"generic\"", ";", "}", "return", "StatCollector", ".", "translateToLocal", "(", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "\"entity.\"", ")", ".", "append", "(", "s", ")", ".", "append", "(", "\".name\"", ")", ".", "toString", "(", ")", ")", ";", "}", "public", "Entity", "[", "]", "getParts", "(", ")", "{", "return", "null", ";", "}", "public", "boolean", "isEntityEqual", "(", "Entity", "par1Entity", ")", "{", "return", "this", "==", "par1Entity", ";", "}", "public", "float", "func_48314_aq", "(", ")", "{", "return", "0.0F", ";", "}", "public", "boolean", "canAttackWithItem", "(", ")", "{", "return", "true", ";", "}", "}", "</s>" ]
9,712
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "public", "class", "ItemColored", "extends", "ItemBlock", "{", "private", "final", "Block", "blockRef", ";", "private", "String", "blockNames", "[", "]", ";", "public", "ItemColored", "(", "int", "par1", ",", "boolean", "par2", ")", "{", "super", "(", "par1", ")", ";", "blockRef", "=", "Block", ".", "blocksList", "[", "getBlockID", "(", ")", "]", ";", "if", "(", "par2", ")", "{", "setMaxDamage", "(", "0", ")", ";", "setHasSubtypes", "(", "true", ")", ";", "}", "}", "public", "int", "getMetadata", "(", "int", "par1", ")", "{", "return", "par1", ";", "}", "public", "ItemColored", "setBlockNames", "(", "String", "par1ArrayOfStr", "[", "]", ")", "{", "blockNames", "=", "par1ArrayOfStr", ";", "return", "this", ";", "}", "public", "String", "getItemNameIS", "(", "ItemStack", "par1ItemStack", ")", "{", "if", "(", "blockNames", "==", "null", ")", "{", "return", "super", ".", "getItemNameIS", "(", "par1ItemStack", ")", ";", "}", "int", "i", "=", "par1ItemStack", ".", "getItemDamage", "(", ")", ";", "if", "(", "i", ">=", "0", "&&", "i", "<", "blockNames", ".", "length", ")", "{", "return", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "super", ".", "getItemNameIS", "(", "par1ItemStack", ")", ")", ".", "append", "(", "\".\"", ")", ".", "append", "(", "blockNames", "[", "i", "]", ")", ".", "toString", "(", ")", ";", "}", "else", "{", "return", "super", ".", "getItemNameIS", "(", "par1ItemStack", ")", ";", "}", "}", "}", "</s>" ]
9,713
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "final", "class", "StructureStrongholdPieceWeight3", "extends", "StructureStrongholdPieceWeight", "{", "StructureStrongholdPieceWeight3", "(", "Class", "par1Class", ",", "int", "par2", ",", "int", "par3", ")", "{", "super", "(", "par1Class", ",", "par2", ",", "par3", ")", ";", "}", "public", "boolean", "canSpawnMoreStructuresOfType", "(", "int", "par1", ")", "{", "return", "super", ".", "canSpawnMoreStructuresOfType", "(", "par1", ")", "&&", "par1", ">", "5", ";", "}", "}", "</s>" ]
9,714
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "public", "class", "TileEntityRecordPlayer", "extends", "TileEntity", "{", "public", "int", "record", ";", "public", "TileEntityRecordPlayer", "(", ")", "{", "}", "public", "void", "readFromNBT", "(", "NBTTagCompound", "par1NBTTagCompound", ")", "{", "super", ".", "readFromNBT", "(", "par1NBTTagCompound", ")", ";", "record", "=", "par1NBTTagCompound", ".", "getInteger", "(", "\"Record\"", ")", ";", "}", "public", "void", "writeToNBT", "(", "NBTTagCompound", "par1NBTTagCompound", ")", "{", "super", ".", "writeToNBT", "(", "par1NBTTagCompound", ")", ";", "if", "(", "record", ">", "0", ")", "{", "par1NBTTagCompound", ".", "setInteger", "(", "\"Record\"", ",", "record", ")", ";", "}", "}", "}", "</s>" ]
9,715
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "public", "class", "PathFinder", "{", "private", "IBlockAccess", "worldMap", ";", "private", "Path", "path", ";", "private", "IntHashMap", "pointMap", ";", "private", "PathPoint", "pathOptions", "[", "]", ";", "private", "boolean", "isWoddenDoorAllowed", ";", "private", "boolean", "isMovementBlockAllowed", ";", "private", "boolean", "isPathingInWater", ";", "private", "boolean", "canEntityDrown", ";", "public", "PathFinder", "(", "IBlockAccess", "par1IBlockAccess", ",", "boolean", "par2", ",", "boolean", "par3", ",", "boolean", "par4", ",", "boolean", "par5", ")", "{", "path", "=", "new", "Path", "(", ")", ";", "pointMap", "=", "new", "IntHashMap", "(", ")", ";", "pathOptions", "=", "new", "PathPoint", "[", "32", "]", ";", "worldMap", "=", "par1IBlockAccess", ";", "isWoddenDoorAllowed", "=", "par2", ";", "isMovementBlockAllowed", "=", "par3", ";", "isPathingInWater", "=", "par4", ";", "canEntityDrown", "=", "par5", ";", "}", "public", "PathEntity", "createEntityPathTo", "(", "Entity", "par1Entity", ",", "Entity", "par2Entity", ",", "float", "par3", ")", "{", "return", "createEntityPathTo", "(", "par1Entity", ",", "par2Entity", ".", "posX", ",", "par2Entity", ".", "boundingBox", ".", "minY", ",", "par2Entity", ".", "posZ", ",", "par3", ")", ";", "}", "public", "PathEntity", "createEntityPathTo", "(", "Entity", "par1Entity", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "float", "par5", ")", "{", "return", "createEntityPathTo", "(", "par1Entity", ",", "(", "float", ")", "par2", "+", "0.5F", ",", "(", "float", ")", "par3", "+", "0.5F", ",", "(", "float", ")", "par4", "+", "0.5F", ",", "par5", ")", ";", "}", "private", "PathEntity", "createEntityPathTo", "(", "Entity", "par1Entity", ",", "double", "par2", ",", "double", "par4", ",", "double", "par6", ",", "float", "par8", ")", "{", "path", ".", "clearPath", "(", ")", ";", "pointMap", ".", "clearMap", "(", ")", ";", "boolean", "flag", "=", "isPathingInWater", ";", "int", "i", "=", "MathHelper", ".", "floor_double", "(", "par1Entity", ".", "boundingBox", ".", "minY", "+", "0.5D", ")", ";", "if", "(", "canEntityDrown", "&&", "par1Entity", ".", "isInWater", "(", ")", ")", "{", "i", "=", "(", "int", ")", "par1Entity", ".", "boundingBox", ".", "minY", ";", "for", "(", "int", "j", "=", "worldMap", ".", "getBlockId", "(", "MathHelper", ".", "floor_double", "(", "par1Entity", ".", "posX", ")", ",", "i", ",", "MathHelper", ".", "floor_double", "(", "par1Entity", ".", "posZ", ")", ")", ";", "j", "==", "Block", ".", "waterMoving", ".", "blockID", "||", "j", "==", "Block", ".", "waterStill", ".", "blockID", ";", "j", "=", "worldMap", ".", "getBlockId", "(", "MathHelper", ".", "floor_double", "(", "par1Entity", ".", "posX", ")", ",", "i", ",", "MathHelper", ".", "floor_double", "(", "par1Entity", ".", "posZ", ")", ")", ")", "{", "i", "++", ";", "}", "flag", "=", "isPathingInWater", ";", "isPathingInWater", "=", "false", ";", "}", "else", "{", "i", "=", "MathHelper", ".", "floor_double", "(", "par1Entity", ".", "boundingBox", ".", "minY", "+", "0.5D", ")", ";", "}", "PathPoint", "pathpoint", "=", "openPoint", "(", "MathHelper", ".", "floor_double", "(", "par1Entity", ".", "boundingBox", ".", "minX", ")", ",", "i", ",", "MathHelper", ".", "floor_double", "(", "par1Entity", ".", "boundingBox", ".", "minZ", ")", ")", ";", "PathPoint", "pathpoint1", "=", "openPoint", "(", "MathHelper", ".", "floor_double", "(", "par2", "-", "(", "double", ")", "(", "par1Entity", ".", "width", "/", "2.0F", ")", ")", ",", "MathHelper", ".", "floor_double", "(", "par4", ")", ",", "MathHelper", ".", "floor_double", "(", "par6", "-", "(", "double", ")", "(", "par1Entity", ".", "width", "/", "2.0F", ")", ")", ")", ";", "PathPoint", "pathpoint2", "=", "new", "PathPoint", "(", "MathHelper", ".", "floor_float", "(", "par1Entity", ".", "width", "+", "1.0F", ")", ",", "MathHelper", ".", "floor_float", "(", "par1Entity", ".", "height", "+", "1.0F", ")", ",", "MathHelper", ".", "floor_float", "(", "par1Entity", ".", "width", "+", "1.0F", ")", ")", ";", "PathEntity", "pathentity", "=", "addToPath", "(", "par1Entity", ",", "pathpoint", ",", "pathpoint1", ",", "pathpoint2", ",", "par8", ")", ";", "isPathingInWater", "=", "flag", ";", "return", "pathentity", ";", "}", "private", "PathEntity", "addToPath", "(", "Entity", "par1Entity", ",", "PathPoint", "par2PathPoint", ",", "PathPoint", "par3PathPoint", ",", "PathPoint", "par4PathPoint", ",", "float", "par5", ")", "{", "par2PathPoint", ".", "totalPathDistance", "=", "0.0F", ";", "par2PathPoint", ".", "distanceToNext", "=", "par2PathPoint", ".", "distanceTo", "(", "par3PathPoint", ")", ";", "par2PathPoint", ".", "distanceToTarget", "=", "par2PathPoint", ".", "distanceToNext", ";", "path", ".", "clearPath", "(", ")", ";", "path", ".", "addPoint", "(", "par2PathPoint", ")", ";", "PathPoint", "pathpoint", "=", "par2PathPoint", ";", "while", "(", "!", "path", ".", "isPathEmpty", "(", ")", ")", "{", "PathPoint", "pathpoint1", "=", "path", ".", "dequeue", "(", ")", ";", "if", "(", "pathpoint1", ".", "equals", "(", "par3PathPoint", ")", ")", "{", "return", "createEntityPath", "(", "par2PathPoint", ",", "par3PathPoint", ")", ";", "}", "if", "(", "pathpoint1", ".", "distanceTo", "(", "par3PathPoint", ")", "<", "pathpoint", ".", "distanceTo", "(", "par3PathPoint", ")", ")", "{", "pathpoint", "=", "pathpoint1", ";", "}", "pathpoint1", ".", "isFirst", "=", "true", ";", "int", "i", "=", "findPathOptions", "(", "par1Entity", ",", "pathpoint1", ",", "par4PathPoint", ",", "par3PathPoint", ",", "par5", ")", ";", "int", "j", "=", "0", ";", "while", "(", "j", "<", "i", ")", "{", "PathPoint", "pathpoint2", "=", "pathOptions", "[", "j", "]", ";", "float", "f", "=", "pathpoint1", ".", "totalPathDistance", "+", "pathpoint1", ".", "distanceTo", "(", "pathpoint2", ")", ";", "if", "(", "!", "pathpoint2", ".", "isAssigned", "(", ")", "||", "f", "<", "pathpoint2", ".", "totalPathDistance", ")", "{", "pathpoint2", ".", "previous", "=", "pathpoint1", ";", "pathpoint2", ".", "totalPathDistance", "=", "f", ";", "pathpoint2", ".", "distanceToNext", "=", "pathpoint2", ".", "distanceTo", "(", "par3PathPoint", ")", ";", "if", "(", "pathpoint2", ".", "isAssigned", "(", ")", ")", "{", "path", ".", "changeDistance", "(", "pathpoint2", ",", "pathpoint2", ".", "totalPathDistance", "+", "pathpoint2", ".", "distanceToNext", ")", ";", "}", "else", "{", "pathpoint2", ".", "distanceToTarget", "=", "pathpoint2", ".", "totalPathDistance", "+", "pathpoint2", ".", "distanceToNext", ";", "path", ".", "addPoint", "(", "pathpoint2", ")", ";", "}", "}", "j", "++", ";", "}", "}", "if", "(", "pathpoint", "==", "par2PathPoint", ")", "{", "return", "null", ";", "}", "else", "{", "return", "createEntityPath", "(", "par2PathPoint", ",", "pathpoint", ")", ";", "}", "}", "private", "int", "findPathOptions", "(", "Entity", "par1Entity", ",", "PathPoint", "par2PathPoint", ",", "PathPoint", "par3PathPoint", ",", "PathPoint", "par4PathPoint", ",", "float", "par5", ")", "{", "int", "i", "=", "0", ";", "int", "j", "=", "0", ";", "if", "(", "getVerticalOffset", "(", "par1Entity", ",", "par2PathPoint", ".", "xCoord", ",", "par2PathPoint", ".", "yCoord", "+", "1", ",", "par2PathPoint", ".", "zCoord", ",", "par3PathPoint", ")", "==", "1", ")", "{", "j", "=", "1", ";", "}", "PathPoint", "pathpoint", "=", "getSafePoint", "(", "par1Entity", ",", "par2PathPoint", ".", "xCoord", ",", "par2PathPoint", ".", "yCoord", ",", "par2PathPoint", ".", "zCoord", "+", "1", ",", "par3PathPoint", ",", "j", ")", ";", "PathPoint", "pathpoint1", "=", "getSafePoint", "(", "par1Entity", ",", "par2PathPoint", ".", "xCoord", "-", "1", ",", "par2PathPoint", ".", "yCoord", ",", "par2PathPoint", ".", "zCoord", ",", "par3PathPoint", ",", "j", ")", ";", "PathPoint", "pathpoint2", "=", "getSafePoint", "(", "par1Entity", ",", "par2PathPoint", ".", "xCoord", "+", "1", ",", "par2PathPoint", ".", "yCoord", ",", "par2PathPoint", ".", "zCoord", ",", "par3PathPoint", ",", "j", ")", ";", "PathPoint", "pathpoint3", "=", "getSafePoint", "(", "par1Entity", ",", "par2PathPoint", ".", "xCoord", ",", "par2PathPoint", ".", "yCoord", ",", "par2PathPoint", ".", "zCoord", "-", "1", ",", "par3PathPoint", ",", "j", ")", ";", "if", "(", "pathpoint", "!=", "null", "&&", "!", "pathpoint", ".", "isFirst", "&&", "pathpoint", ".", "distanceTo", "(", "par4PathPoint", ")", "<", "par5", ")", "{", "pathOptions", "[", "i", "++", "]", "=", "pathpoint", ";", "}", "if", "(", "pathpoint1", "!=", "null", "&&", "!", "pathpoint1", ".", "isFirst", "&&", "pathpoint1", ".", "distanceTo", "(", "par4PathPoint", ")", "<", "par5", ")", "{", "pathOptions", "[", "i", "++", "]", "=", "pathpoint1", ";", "}", "if", "(", "pathpoint2", "!=", "null", "&&", "!", "pathpoint2", ".", "isFirst", "&&", "pathpoint2", ".", "distanceTo", "(", "par4PathPoint", ")", "<", "par5", ")", "{", "pathOptions", "[", "i", "++", "]", "=", "pathpoint2", ";", "}", "if", "(", "pathpoint3", "!=", "null", "&&", "!", "pathpoint3", ".", "isFirst", "&&", "pathpoint3", ".", "distanceTo", "(", "par4PathPoint", ")", "<", "par5", ")", "{", "pathOptions", "[", "i", "++", "]", "=", "pathpoint3", ";", "}", "return", "i", ";", "}", "private", "PathPoint", "getSafePoint", "(", "Entity", "par1Entity", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "PathPoint", "par5PathPoint", ",", "int", "par6", ")", "{", "PathPoint", "pathpoint", "=", "null", ";", "int", "i", "=", "getVerticalOffset", "(", "par1Entity", ",", "par2", ",", "par3", ",", "par4", ",", "par5PathPoint", ")", ";", "if", "(", "i", "==", "2", ")", "{", "return", "openPoint", "(", "par2", ",", "par3", ",", "par4", ")", ";", "}", "if", "(", "i", "==", "1", ")", "{", "pathpoint", "=", "openPoint", "(", "par2", ",", "par3", ",", "par4", ")", ";", "}", "if", "(", "pathpoint", "==", "null", "&&", "par6", ">", "0", "&&", "i", "!=", "-", "3", "&&", "i", "!=", "-", "4", "&&", "getVerticalOffset", "(", "par1Entity", ",", "par2", ",", "par3", "+", "par6", ",", "par4", ",", "par5PathPoint", ")", "==", "1", ")", "{", "pathpoint", "=", "openPoint", "(", "par2", ",", "par3", "+", "par6", ",", "par4", ")", ";", "par3", "+=", "par6", ";", "}", "if", "(", "pathpoint", "!=", "null", ")", "{", "int", "j", "=", "0", ";", "int", "k", "=", "0", ";", "do", "{", "if", "(", "par3", "<=", "0", ")", "{", "break", ";", "}", "k", "=", "getVerticalOffset", "(", "par1Entity", ",", "par2", ",", "par3", "-", "1", ",", "par4", ",", "par5PathPoint", ")", ";", "if", "(", "isPathingInWater", "&&", "k", "==", "-", "1", ")", "{", "return", "null", ";", "}", "if", "(", "k", "!=", "1", ")", "{", "break", ";", "}", "if", "(", "++", "j", ">=", "4", ")", "{", "return", "null", ";", "}", "if", "(", "--", "par3", ">", "0", ")", "{", "pathpoint", "=", "openPoint", "(", "par2", ",", "par3", ",", "par4", ")", ";", "}", "}", "while", "(", "true", ")", ";", "if", "(", "k", "==", "-", "2", ")", "{", "return", "null", ";", "}", "}", "return", "pathpoint", ";", "}", "private", "final", "PathPoint", "openPoint", "(", "int", "par1", ",", "int", "par2", ",", "int", "par3", ")", "{", "int", "i", "=", "PathPoint", ".", "makeHash", "(", "par1", ",", "par2", ",", "par3", ")", ";", "PathPoint", "pathpoint", "=", "(", "PathPoint", ")", "pointMap", ".", "lookup", "(", "i", ")", ";", "if", "(", "pathpoint", "==", "null", ")", "{", "pathpoint", "=", "new", "PathPoint", "(", "par1", ",", "par2", ",", "par3", ")", ";", "pointMap", ".", "addKey", "(", "i", ",", "pathpoint", ")", ";", "}", "return", "pathpoint", ";", "}", "private", "int", "getVerticalOffset", "(", "Entity", "par1Entity", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "PathPoint", "par5PathPoint", ")", "{", "boolean", "flag", "=", "false", ";", "for", "(", "int", "i", "=", "par2", ";", "i", "<", "par2", "+", "par5PathPoint", ".", "xCoord", ";", "i", "++", ")", "{", "for", "(", "int", "j", "=", "par3", ";", "j", "<", "par3", "+", "par5PathPoint", ".", "yCoord", ";", "j", "++", ")", "{", "for", "(", "int", "k", "=", "par4", ";", "k", "<", "par4", "+", "par5PathPoint", ".", "zCoord", ";", "k", "++", ")", "{", "int", "l", "=", "worldMap", ".", "getBlockId", "(", "i", ",", "j", ",", "k", ")", ";", "if", "(", "l", "<=", "0", ")", "{", "continue", ";", "}", "if", "(", "l", "==", "Block", ".", "trapdoor", ".", "blockID", ")", "{", "flag", "=", "true", ";", "}", "else", "if", "(", "l", "==", "Block", ".", "waterMoving", ".", "blockID", "||", "l", "==", "Block", ".", "waterStill", ".", "blockID", ")", "{", "if", "(", "!", "isPathingInWater", ")", "{", "flag", "=", "true", ";", "}", "else", "{", "return", "-", "1", ";", "}", "}", "else", "if", "(", "!", "isWoddenDoorAllowed", "&&", "l", "==", "Block", ".", "doorWood", ".", "blockID", ")", "{", "return", "0", ";", "}", "Block", "block", "=", "Block", ".", "blocksList", "[", "l", "]", ";", "if", "(", "block", ".", "getBlocksMovement", "(", "worldMap", ",", "i", ",", "j", ",", "k", ")", "||", "isMovementBlockAllowed", "&&", "l", "==", "Block", ".", "doorWood", ".", "blockID", ")", "{", "continue", ";", "}", "if", "(", "l", "==", "Block", ".", "fence", ".", "blockID", "||", "l", "==", "Block", ".", "fenceGate", ".", "blockID", ")", "{", "return", "-", "3", ";", "}", "if", "(", "l", "==", "Block", ".", "trapdoor", ".", "blockID", ")", "{", "return", "-", "4", ";", "}", "Material", "material", "=", "block", ".", "blockMaterial", ";", "if", "(", "material", "==", "Material", ".", "lava", ")", "{", "if", "(", "!", "par1Entity", ".", "handleLavaMovement", "(", ")", ")", "{", "return", "-", "2", ";", "}", "}", "else", "{", "return", "0", ";", "}", "}", "}", "}", "return", "flag", "?", "2", ":", "1", ";", "}", "private", "PathEntity", "createEntityPath", "(", "PathPoint", "par1PathPoint", ",", "PathPoint", "par2PathPoint", ")", "{", "int", "i", "=", "1", ";", "for", "(", "PathPoint", "pathpoint", "=", "par2PathPoint", ";", "pathpoint", ".", "previous", "!=", "null", ";", "pathpoint", "=", "pathpoint", ".", "previous", ")", "{", "i", "++", ";", "}", "PathPoint", "apathpoint", "[", "]", "=", "new", "PathPoint", "[", "i", "]", ";", "PathPoint", "pathpoint1", "=", "par2PathPoint", ";", "for", "(", "apathpoint", "[", "--", "i", "]", "=", "pathpoint1", ";", "pathpoint1", ".", "previous", "!=", "null", ";", "apathpoint", "[", "--", "i", "]", "=", "pathpoint1", ")", "{", "pathpoint1", "=", "pathpoint1", ".", "previous", ";", "}", "return", "new", "PathEntity", "(", "apathpoint", ")", ";", "}", "}", "</s>" ]
9,716
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "io", ".", "*", ";", "public", "class", "Packet102WindowClick", "extends", "Packet", "{", "public", "int", "window_Id", ";", "public", "int", "inventorySlot", ";", "public", "int", "mouseClick", ";", "public", "short", "action", ";", "public", "ItemStack", "itemStack", ";", "public", "boolean", "holdingShift", ";", "public", "Packet102WindowClick", "(", ")", "{", "}", "public", "void", "processPacket", "(", "NetHandler", "par1NetHandler", ")", "{", "par1NetHandler", ".", "handleWindowClick", "(", "this", ")", ";", "}", "public", "void", "readPacketData", "(", "DataInputStream", "par1DataInputStream", ")", "throws", "IOException", "{", "window_Id", "=", "par1DataInputStream", ".", "readByte", "(", ")", ";", "inventorySlot", "=", "par1DataInputStream", ".", "readShort", "(", ")", ";", "mouseClick", "=", "par1DataInputStream", ".", "readByte", "(", ")", ";", "action", "=", "par1DataInputStream", ".", "readShort", "(", ")", ";", "holdingShift", "=", "par1DataInputStream", ".", "readBoolean", "(", ")", ";", "itemStack", "=", "readItemStack", "(", "par1DataInputStream", ")", ";", "}", "public", "void", "writePacketData", "(", "DataOutputStream", "par1DataOutputStream", ")", "throws", "IOException", "{", "par1DataOutputStream", ".", "writeByte", "(", "window_Id", ")", ";", "par1DataOutputStream", ".", "writeShort", "(", "inventorySlot", ")", ";", "par1DataOutputStream", ".", "writeByte", "(", "mouseClick", ")", ";", "par1DataOutputStream", ".", "writeShort", "(", "action", ")", ";", "par1DataOutputStream", ".", "writeBoolean", "(", "holdingShift", ")", ";", "writeItemStack", "(", "itemStack", ",", "par1DataOutputStream", ")", ";", "}", "public", "int", "getPacketSize", "(", ")", "{", "return", "11", ";", "}", "}", "</s>" ]
9,717
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "public", "class", "ItemPickaxe", "extends", "ItemTool", "{", "private", "static", "Block", "blocksEffectiveAgainst", "[", "]", ";", "protected", "ItemPickaxe", "(", "int", "par1", ",", "EnumToolMaterial", "par2EnumToolMaterial", ")", "{", "super", "(", "par1", ",", "2", ",", "par2EnumToolMaterial", ",", "blocksEffectiveAgainst", ")", ";", "}", "public", "boolean", "canHarvestBlock", "(", "Block", "par1Block", ")", "{", "if", "(", "par1Block", "==", "Block", ".", "obsidian", ")", "{", "return", "toolMaterial", ".", "getHarvestLevel", "(", ")", "==", "3", ";", "}", "if", "(", "par1Block", "==", "Block", ".", "blockDiamond", "||", "par1Block", "==", "Block", ".", "oreDiamond", ")", "{", "return", "toolMaterial", ".", "getHarvestLevel", "(", ")", ">=", "2", ";", "}", "if", "(", "par1Block", "==", "Block", ".", "blockGold", "||", "par1Block", "==", "Block", ".", "oreGold", ")", "{", "return", "toolMaterial", ".", "getHarvestLevel", "(", ")", ">=", "2", ";", "}", "if", "(", "par1Block", "==", "Block", ".", "blockSteel", "||", "par1Block", "==", "Block", ".", "oreIron", ")", "{", "return", "toolMaterial", ".", "getHarvestLevel", "(", ")", ">=", "1", ";", "}", "if", "(", "par1Block", "==", "Block", ".", "blockLapis", "||", "par1Block", "==", "Block", ".", "oreLapis", ")", "{", "return", "toolMaterial", ".", "getHarvestLevel", "(", ")", ">=", "1", ";", "}", "if", "(", "par1Block", "==", "Block", ".", "oreRedstone", "||", "par1Block", "==", "Block", ".", "oreRedstoneGlowing", ")", "{", "return", "toolMaterial", ".", "getHarvestLevel", "(", ")", ">=", "2", ";", "}", "if", "(", "par1Block", ".", "blockMaterial", "==", "Material", ".", "rock", ")", "{", "return", "true", ";", "}", "return", "par1Block", ".", "blockMaterial", "==", "Material", ".", "iron", ";", "}", "public", "float", "getStrVsBlock", "(", "ItemStack", "par1ItemStack", ",", "Block", "par2Block", ")", "{", "if", "(", "par2Block", "!=", "null", "&&", "(", "par2Block", ".", "blockMaterial", "==", "Material", ".", "iron", "||", "par2Block", ".", "blockMaterial", "==", "Material", ".", "rock", ")", ")", "{", "return", "efficiencyOnProperMaterial", ";", "}", "else", "{", "return", "super", ".", "getStrVsBlock", "(", "par1ItemStack", ",", "par2Block", ")", ";", "}", "}", "static", "{", "blocksEffectiveAgainst", "=", "(", "new", "Block", "[", "]", "{", "Block", ".", "cobblestone", ",", "Block", ".", "stairDouble", ",", "Block", ".", "stairSingle", ",", "Block", ".", "stone", ",", "Block", ".", "sandStone", ",", "Block", ".", "cobblestoneMossy", ",", "Block", ".", "oreIron", ",", "Block", ".", "blockSteel", ",", "Block", ".", "oreCoal", ",", "Block", ".", "blockGold", ",", "Block", ".", "oreGold", ",", "Block", ".", "oreDiamond", ",", "Block", ".", "blockDiamond", ",", "Block", ".", "ice", ",", "Block", ".", "netherrack", ",", "Block", ".", "oreLapis", ",", "Block", ".", "blockLapis", ",", "Block", ".", "oreRedstone", ",", "Block", ".", "oreRedstoneGlowing", ",", "Block", ".", "rail", ",", "Block", ".", "railDetector", ",", "Block", ".", "railPowered", "}", ")", ";", "}", "}", "</s>" ]
9,718
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "List", ";", "import", "java", ".", "util", ".", "Random", ";", "public", "class", "EntityFireball", "extends", "Entity", "{", "private", "int", "xTile", ";", "private", "int", "yTile", ";", "private", "int", "zTile", ";", "private", "int", "inTile", ";", "private", "boolean", "inGround", ";", "public", "EntityLiving", "shootingEntity", ";", "private", "int", "ticksAlive", ";", "private", "int", "ticksInAir", ";", "public", "double", "accelerationX", ";", "public", "double", "accelerationY", ";", "public", "double", "accelerationZ", ";", "public", "EntityFireball", "(", "World", "par1World", ")", "{", "super", "(", "par1World", ")", ";", "xTile", "=", "-", "1", ";", "yTile", "=", "-", "1", ";", "zTile", "=", "-", "1", ";", "inTile", "=", "0", ";", "inGround", "=", "false", ";", "ticksInAir", "=", "0", ";", "setSize", "(", "1.0F", ",", "1.0F", ")", ";", "}", "protected", "void", "entityInit", "(", ")", "{", "}", "public", "EntityFireball", "(", "World", "par1World", ",", "double", "par2", ",", "double", "par4", ",", "double", "par6", ",", "double", "par8", ",", "double", "par10", ",", "double", "par12", ")", "{", "super", "(", "par1World", ")", ";", "xTile", "=", "-", "1", ";", "yTile", "=", "-", "1", ";", "zTile", "=", "-", "1", ";", "inTile", "=", "0", ";", "inGround", "=", "false", ";", "ticksInAir", "=", "0", ";", "setSize", "(", "1.0F", ",", "1.0F", ")", ";", "setLocationAndAngles", "(", "par2", ",", "par4", ",", "par6", ",", "rotationYaw", ",", "rotationPitch", ")", ";", "setPosition", "(", "par2", ",", "par4", ",", "par6", ")", ";", "double", "d", "=", "MathHelper", ".", "sqrt_double", "(", "par8", "*", "par8", "+", "par10", "*", "par10", "+", "par12", "*", "par12", ")", ";", "accelerationX", "=", "(", "par8", "/", "d", ")", "*", "0.10000000000000001D", ";", "accelerationY", "=", "(", "par10", "/", "d", ")", "*", "0.10000000000000001D", ";", "accelerationZ", "=", "(", "par12", "/", "d", ")", "*", "0.10000000000000001D", ";", "}", "public", "EntityFireball", "(", "World", "par1World", ",", "EntityLiving", "par2EntityLiving", ",", "double", "par3", ",", "double", "par5", ",", "double", "par7", ")", "{", "super", "(", "par1World", ")", ";", "xTile", "=", "-", "1", ";", "yTile", "=", "-", "1", ";", "zTile", "=", "-", "1", ";", "inTile", "=", "0", ";", "inGround", "=", "false", ";", "ticksInAir", "=", "0", ";", "shootingEntity", "=", "par2EntityLiving", ";", "setSize", "(", "1.0F", ",", "1.0F", ")", ";", "setLocationAndAngles", "(", "par2EntityLiving", ".", "posX", ",", "par2EntityLiving", ".", "posY", ",", "par2EntityLiving", ".", "posZ", ",", "par2EntityLiving", ".", "rotationYaw", ",", "par2EntityLiving", ".", "rotationPitch", ")", ";", "setPosition", "(", "posX", ",", "posY", ",", "posZ", ")", ";", "yOffset", "=", "0.0F", ";", "motionX", "=", "motionY", "=", "motionZ", "=", "0.0D", ";", "par3", "+=", "rand", ".", "nextGaussian", "(", ")", "*", "0.40000000000000002D", ";", "par5", "+=", "rand", ".", "nextGaussian", "(", ")", "*", "0.40000000000000002D", ";", "par7", "+=", "rand", ".", "nextGaussian", "(", ")", "*", "0.40000000000000002D", ";", "double", "d", "=", "MathHelper", ".", "sqrt_double", "(", "par3", "*", "par3", "+", "par5", "*", "par5", "+", "par7", "*", "par7", ")", ";", "accelerationX", "=", "(", "par3", "/", "d", ")", "*", "0.10000000000000001D", ";", "accelerationY", "=", "(", "par5", "/", "d", ")", "*", "0.10000000000000001D", ";", "accelerationZ", "=", "(", "par7", "/", "d", ")", "*", "0.10000000000000001D", ";", "}", "public", "void", "onUpdate", "(", ")", "{", "if", "(", "!", "worldObj", ".", "isRemote", "&&", "(", "shootingEntity", "!=", "null", "&&", "shootingEntity", ".", "isDead", "||", "!", "worldObj", ".", "blockExists", "(", "(", "int", ")", "posX", ",", "(", "int", ")", "posY", ",", "(", "int", ")", "posZ", ")", ")", ")", "{", "setDead", "(", ")", ";", "return", ";", "}", "super", ".", "onUpdate", "(", ")", ";", "setFire", "(", "1", ")", ";", "if", "(", "inGround", ")", "{", "int", "i", "=", "worldObj", ".", "getBlockId", "(", "xTile", ",", "yTile", ",", "zTile", ")", ";", "if", "(", "i", "!=", "inTile", ")", "{", "inGround", "=", "false", ";", "motionX", "*=", "rand", ".", "nextFloat", "(", ")", "*", "0.2F", ";", "motionY", "*=", "rand", ".", "nextFloat", "(", ")", "*", "0.2F", ";", "motionZ", "*=", "rand", ".", "nextFloat", "(", ")", "*", "0.2F", ";", "ticksAlive", "=", "0", ";", "ticksInAir", "=", "0", ";", "}", "else", "{", "ticksAlive", "++", ";", "if", "(", "ticksAlive", "==", "600", ")", "{", "setDead", "(", ")", ";", "}", "return", ";", "}", "}", "else", "{", "ticksInAir", "++", ";", "}", "Vec3D", "vec3d", "=", "Vec3D", ".", "createVector", "(", "posX", ",", "posY", ",", "posZ", ")", ";", "Vec3D", "vec3d1", "=", "Vec3D", ".", "createVector", "(", "posX", "+", "motionX", ",", "posY", "+", "motionY", ",", "posZ", "+", "motionZ", ")", ";", "MovingObjectPosition", "movingobjectposition", "=", "worldObj", ".", "rayTraceBlocks", "(", "vec3d", ",", "vec3d1", ")", ";", "vec3d", "=", "Vec3D", ".", "createVector", "(", "posX", ",", "posY", ",", "posZ", ")", ";", "vec3d1", "=", "Vec3D", ".", "createVector", "(", "posX", "+", "motionX", ",", "posY", "+", "motionY", ",", "posZ", "+", "motionZ", ")", ";", "if", "(", "movingobjectposition", "!=", "null", ")", "{", "vec3d1", "=", "Vec3D", ".", "createVector", "(", "movingobjectposition", ".", "hitVec", ".", "xCoord", ",", "movingobjectposition", ".", "hitVec", ".", "yCoord", ",", "movingobjectposition", ".", "hitVec", ".", "zCoord", ")", ";", "}", "Entity", "entity", "=", "null", ";", "List", "list", "=", "worldObj", ".", "getEntitiesWithinAABBExcludingEntity", "(", "this", ",", "boundingBox", ".", "addCoord", "(", "motionX", ",", "motionY", ",", "motionZ", ")", ".", "expand", "(", "1.0D", ",", "1.0D", ",", "1.0D", ")", ")", ";", "double", "d", "=", "0.0D", ";", "for", "(", "int", "j", "=", "0", ";", "j", "<", "list", ".", "size", "(", ")", ";", "j", "++", ")", "{", "Entity", "entity1", "=", "(", "Entity", ")", "list", ".", "get", "(", "j", ")", ";", "if", "(", "!", "entity1", ".", "canBeCollidedWith", "(", ")", "||", "entity1", ".", "isEntityEqual", "(", "shootingEntity", ")", "&&", "ticksInAir", "<", "25", ")", "{", "continue", ";", "}", "float", "f2", "=", "0.3F", ";", "AxisAlignedBB", "axisalignedbb", "=", "entity1", ".", "boundingBox", ".", "expand", "(", "f2", ",", "f2", ",", "f2", ")", ";", "MovingObjectPosition", "movingobjectposition1", "=", "axisalignedbb", ".", "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", ")", "{", "func_40063_a", "(", "movingobjectposition", ")", ";", "}", "posX", "+=", "motionX", ";", "posY", "+=", "motionY", ";", "posZ", "+=", "motionZ", ";", "float", "f", "=", "MathHelper", ".", "sqrt_double", "(", "motionX", "*", "motionX", "+", "motionZ", "*", "motionZ", ")", ";", "rotationYaw", "=", "(", "float", ")", "(", "(", "Math", ".", "atan2", "(", "motionX", ",", "motionZ", ")", "*", "180D", ")", "/", "Math", ".", "PI", ")", ";", "for", "(", "rotationPitch", "=", "(", "float", ")", "(", "(", "Math", ".", "atan2", "(", "motionY", ",", "f", ")", "*", "180D", ")", "/", "Math", ".", "PI", ")", ";", "rotationPitch", "-", "prevRotationPitch", "<", "-", "180F", ";", "prevRotationPitch", "-=", "360F", ")", "{", "}", "for", "(", ";", "rotationPitch", "-", "prevRotationPitch", ">=", "180F", ";", "prevRotationPitch", "+=", "360F", ")", "{", "}", "for", "(", ";", "rotationYaw", "-", "prevRotationYaw", "<", "-", "180F", ";", "prevRotationYaw", "-=", "360F", ")", "{", "}", "for", "(", ";", "rotationYaw", "-", "prevRotationYaw", ">=", "180F", ";", "prevRotationYaw", "+=", "360F", ")", "{", "}", "rotationPitch", "=", "prevRotationPitch", "+", "(", "rotationPitch", "-", "prevRotationPitch", ")", "*", "0.2F", ";", "rotationYaw", "=", "prevRotationYaw", "+", "(", "rotationYaw", "-", "prevRotationYaw", ")", "*", "0.2F", ";", "float", "f1", "=", "0.95F", ";", "if", "(", "isInWater", "(", ")", ")", "{", "for", "(", "int", "k", "=", "0", ";", "k", "<", "4", ";", "k", "++", ")", "{", "float", "f3", "=", "0.25F", ";", "worldObj", ".", "spawnParticle", "(", "\"bubble\"", ",", "posX", "-", "motionX", "*", "(", "double", ")", "f3", ",", "posY", "-", "motionY", "*", "(", "double", ")", "f3", ",", "posZ", "-", "motionZ", "*", "(", "double", ")", "f3", ",", "motionX", ",", "motionY", ",", "motionZ", ")", ";", "}", "f1", "=", "0.8F", ";", "}", "motionX", "+=", "accelerationX", ";", "motionY", "+=", "accelerationY", ";", "motionZ", "+=", "accelerationZ", ";", "motionX", "*=", "f1", ";", "motionY", "*=", "f1", ";", "motionZ", "*=", "f1", ";", "worldObj", ".", "spawnParticle", "(", "\"smoke\"", ",", "posX", ",", "posY", "+", "0.5D", ",", "posZ", ",", "0.0D", ",", "0.0D", ",", "0.0D", ")", ";", "setPosition", "(", "posX", ",", "posY", ",", "posZ", ")", ";", "}", "protected", "void", "func_40063_a", "(", "MovingObjectPosition", "par1MovingObjectPosition", ")", "{", "if", "(", "!", "worldObj", ".", "isRemote", ")", "{", "if", "(", "par1MovingObjectPosition", ".", "entityHit", "!=", "null", ")", "{", "if", "(", "!", "par1MovingObjectPosition", ".", "entityHit", ".", "attackEntityFrom", "(", "DamageSource", ".", "causeFireballDamage", "(", "this", ",", "shootingEntity", ")", ",", "4", ")", ")", ";", "}", "worldObj", ".", "newExplosion", "(", "null", ",", "posX", ",", "posY", ",", "posZ", ",", "1.0F", ",", "true", ")", ";", "setDead", "(", ")", ";", "}", "}", "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", "(", "\"inGround\"", ",", "(", "byte", ")", "(", "inGround", "?", "1", ":", "0", ")", ")", ";", "}", "public", "void", "readEntityFromNBT", "(", "NBTTagCompound", "par1NBTTagCompound", ")", "{", "xTile", "=", "par1NBTTagCompound", ".", "getShort", "(", "\"xTile\"", ")", ";", "yTile", "=", "par1NBTTagCompound", ".", "getShort", "(", "\"yTile\"", ")", ";", "zTile", "=", "par1NBTTagCompound", ".", "getShort", "(", "\"zTile\"", ")", ";", "inTile", "=", "par1NBTTagCompound", ".", "getByte", "(", "\"inTile\"", ")", "&", "0xff", ";", "inGround", "=", "par1NBTTagCompound", ".", "getByte", "(", "\"inGround\"", ")", "==", "1", ";", "}", "public", "boolean", "canBeCollidedWith", "(", ")", "{", "return", "true", ";", "}", "public", "float", "getCollisionBorderSize", "(", ")", "{", "return", "1.0F", ";", "}", "public", "boolean", "attackEntityFrom", "(", "DamageSource", "par1DamageSource", ",", "int", "par2", ")", "{", "setBeenAttacked", "(", ")", ";", "if", "(", "par1DamageSource", ".", "getEntity", "(", ")", "!=", "null", ")", "{", "Vec3D", "vec3d", "=", "par1DamageSource", ".", "getEntity", "(", ")", ".", "getLookVec", "(", ")", ";", "if", "(", "vec3d", "!=", "null", ")", "{", "motionX", "=", "vec3d", ".", "xCoord", ";", "motionY", "=", "vec3d", ".", "yCoord", ";", "motionZ", "=", "vec3d", ".", "zCoord", ";", "accelerationX", "=", "motionX", "*", "0.10000000000000001D", ";", "accelerationY", "=", "motionY", "*", "0.10000000000000001D", ";", "accelerationZ", "=", "motionZ", "*", "0.10000000000000001D", ";", "}", "if", "(", "par1DamageSource", ".", "getEntity", "(", ")", "instanceof", "EntityLiving", ")", "{", "shootingEntity", "=", "(", "EntityLiving", ")", "par1DamageSource", ".", "getEntity", "(", ")", ";", "}", "return", "true", ";", "}", "else", "{", "return", "false", ";", "}", "}", "public", "float", "getBrightness", "(", "float", "par1", ")", "{", "return", "1.0F", ";", "}", "}", "</s>" ]
9,719
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "List", ";", "public", "class", "Achievement", "extends", "StatBase", "{", "public", "final", "int", "displayColumn", ";", "public", "final", "int", "displayRow", ";", "public", "final", "Achievement", "parentAchievement", ";", "private", "final", "String", "achievementDescription", ";", "public", "final", "ItemStack", "theItemStack", ";", "private", "boolean", "isSpecial", ";", "public", "Achievement", "(", "int", "par1", ",", "String", "par2Str", ",", "int", "par3", ",", "int", "par4", ",", "Item", "par5Item", ",", "Achievement", "par6Achievement", ")", "{", "this", "(", "par1", ",", "par2Str", ",", "par3", ",", "par4", ",", "new", "ItemStack", "(", "par5Item", ")", ",", "par6Achievement", ")", ";", "}", "public", "Achievement", "(", "int", "par1", ",", "String", "par2Str", ",", "int", "par3", ",", "int", "par4", ",", "Block", "par5Block", ",", "Achievement", "par6Achievement", ")", "{", "this", "(", "par1", ",", "par2Str", ",", "par3", ",", "par4", ",", "new", "ItemStack", "(", "par5Block", ")", ",", "par6Achievement", ")", ";", "}", "public", "Achievement", "(", "int", "par1", ",", "String", "par2Str", ",", "int", "par3", ",", "int", "par4", ",", "ItemStack", "par5ItemStack", ",", "Achievement", "par6Achievement", ")", "{", "super", "(", "0x500000", "+", "par1", ",", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "\"achievement.\"", ")", ".", "append", "(", "par2Str", ")", ".", "toString", "(", ")", ")", ";", "theItemStack", "=", "par5ItemStack", ";", "achievementDescription", "=", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "\"achievement.\"", ")", ".", "append", "(", "par2Str", ")", ".", "append", "(", "\".desc\"", ")", ".", "toString", "(", ")", ";", "displayColumn", "=", "par3", ";", "displayRow", "=", "par4", ";", "if", "(", "par3", "<", "AchievementList", ".", "minDisplayColumn", ")", "{", "AchievementList", ".", "minDisplayColumn", "=", "par3", ";", "}", "if", "(", "par4", "<", "AchievementList", ".", "minDisplayRow", ")", "{", "AchievementList", ".", "minDisplayRow", "=", "par4", ";", "}", "if", "(", "par3", ">", "AchievementList", ".", "maxDisplayColumn", ")", "{", "AchievementList", ".", "maxDisplayColumn", "=", "par3", ";", "}", "if", "(", "par4", ">", "AchievementList", ".", "maxDisplayRow", ")", "{", "AchievementList", ".", "maxDisplayRow", "=", "par4", ";", "}", "parentAchievement", "=", "par6Achievement", ";", "}", "public", "Achievement", "setIndependent", "(", ")", "{", "isIndependent", "=", "true", ";", "return", "this", ";", "}", "public", "Achievement", "setSpecial", "(", ")", "{", "isSpecial", "=", "true", ";", "return", "this", ";", "}", "public", "Achievement", "registerAchievement", "(", ")", "{", "super", ".", "registerStat", "(", ")", ";", "AchievementList", ".", "achievementList", ".", "add", "(", "this", ")", ";", "return", "this", ";", "}", "public", "StatBase", "registerStat", "(", ")", "{", "return", "registerAchievement", "(", ")", ";", "}", "public", "StatBase", "initIndependentStat", "(", ")", "{", "return", "setIndependent", "(", ")", ";", "}", "}", "</s>" ]
9,720
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "public", "class", "EntityAIMoveTowardsTarget", "extends", "EntityAIBase", "{", "private", "EntityCreature", "theEntity", ";", "private", "EntityLiving", "targetEntity", ";", "private", "double", "movePosX", ";", "private", "double", "movePosY", ";", "private", "double", "movePosZ", ";", "private", "float", "field_48217_f", ";", "private", "float", "field_48218_g", ";", "public", "EntityAIMoveTowardsTarget", "(", "EntityCreature", "par1EntityCreature", ",", "float", "par2", ",", "float", "par3", ")", "{", "theEntity", "=", "par1EntityCreature", ";", "field_48217_f", "=", "par2", ";", "field_48218_g", "=", "par3", ";", "setMutexBits", "(", "1", ")", ";", "}", "public", "boolean", "shouldExecute", "(", ")", "{", "targetEntity", "=", "theEntity", ".", "getAttackTarget", "(", ")", ";", "if", "(", "targetEntity", "==", "null", ")", "{", "return", "false", ";", "}", "if", "(", "targetEntity", ".", "getDistanceSqToEntity", "(", "theEntity", ")", ">", "(", "double", ")", "(", "field_48218_g", "*", "field_48218_g", ")", ")", "{", "return", "false", ";", "}", "Vec3D", "vec3d", "=", "RandomPositionGenerator", ".", "func_48395_a", "(", "theEntity", ",", "16", ",", "7", ",", "Vec3D", ".", "createVector", "(", "targetEntity", ".", "posX", ",", "targetEntity", ".", "posY", ",", "targetEntity", ".", "posZ", ")", ")", ";", "if", "(", "vec3d", "==", "null", ")", "{", "return", "false", ";", "}", "else", "{", "movePosX", "=", "vec3d", ".", "xCoord", ";", "movePosY", "=", "vec3d", ".", "yCoord", ";", "movePosZ", "=", "vec3d", ".", "zCoord", ";", "return", "true", ";", "}", "}", "public", "boolean", "continueExecuting", "(", ")", "{", "return", "!", "theEntity", ".", "getNavigator", "(", ")", ".", "noPath", "(", ")", "&&", "targetEntity", ".", "isEntityAlive", "(", ")", "&&", "targetEntity", ".", "getDistanceSqToEntity", "(", "theEntity", ")", "<", "(", "double", ")", "(", "field_48218_g", "*", "field_48218_g", ")", ";", "}", "public", "void", "resetTask", "(", ")", "{", "targetEntity", "=", "null", ";", "}", "public", "void", "startExecuting", "(", ")", "{", "theEntity", ".", "getNavigator", "(", ")", ".", "func_48658_a", "(", "movePosX", ",", "movePosY", ",", "movePosZ", ",", "field_48217_f", ")", ";", "}", "}", "</s>" ]
9,721
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "List", ";", "import", "java", ".", "util", ".", "Random", ";", "public", "class", "StructureMineshaftPieces", "{", "private", "static", "final", "StructurePieceTreasure", "lootArray", "[", "]", ";", "public", "StructureMineshaftPieces", "(", ")", "{", "}", "private", "static", "StructureComponent", "getRandomComponent", "(", "List", "par0List", ",", "Random", "par1Random", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "int", "par5", ",", "int", "par6", ")", "{", "int", "i", "=", "par1Random", ".", "nextInt", "(", "100", ")", ";", "if", "(", "i", ">=", "80", ")", "{", "StructureBoundingBox", "structureboundingbox", "=", "ComponentMineshaftCross", ".", "findValidPlacement", "(", "par0List", ",", "par1Random", ",", "par2", ",", "par3", ",", "par4", ",", "par5", ")", ";", "if", "(", "structureboundingbox", "!=", "null", ")", "{", "return", "new", "ComponentMineshaftCross", "(", "par6", ",", "par1Random", ",", "structureboundingbox", ",", "par5", ")", ";", "}", "}", "else", "if", "(", "i", ">=", "70", ")", "{", "StructureBoundingBox", "structureboundingbox1", "=", "ComponentMineshaftStairs", ".", "findValidPlacement", "(", "par0List", ",", "par1Random", ",", "par2", ",", "par3", ",", "par4", ",", "par5", ")", ";", "if", "(", "structureboundingbox1", "!=", "null", ")", "{", "return", "new", "ComponentMineshaftStairs", "(", "par6", ",", "par1Random", ",", "structureboundingbox1", ",", "par5", ")", ";", "}", "}", "else", "{", "StructureBoundingBox", "structureboundingbox2", "=", "ComponentMineshaftCorridor", ".", "findValidPlacement", "(", "par0List", ",", "par1Random", ",", "par2", ",", "par3", ",", "par4", ",", "par5", ")", ";", "if", "(", "structureboundingbox2", "!=", "null", ")", "{", "return", "new", "ComponentMineshaftCorridor", "(", "par6", ",", "par1Random", ",", "structureboundingbox2", ",", "par5", ")", ";", "}", "}", "return", "null", ";", "}", "private", "static", "StructureComponent", "getNextMineShaftComponent", "(", "StructureComponent", "par0StructureComponent", ",", "List", "par1List", ",", "Random", "par2Random", ",", "int", "par3", ",", "int", "par4", ",", "int", "par5", ",", "int", "par6", ",", "int", "par7", ")", "{", "if", "(", "par7", ">", "8", ")", "{", "return", "null", ";", "}", "if", "(", "Math", ".", "abs", "(", "par3", "-", "par0StructureComponent", ".", "getBoundingBox", "(", ")", ".", "minX", ")", ">", "80", "||", "Math", ".", "abs", "(", "par5", "-", "par0StructureComponent", ".", "getBoundingBox", "(", ")", ".", "minZ", ")", ">", "80", ")", "{", "return", "null", ";", "}", "StructureComponent", "structurecomponent", "=", "getRandomComponent", "(", "par1List", ",", "par2Random", ",", "par3", ",", "par4", ",", "par5", ",", "par6", ",", "par7", "+", "1", ")", ";", "if", "(", "structurecomponent", "!=", "null", ")", "{", "par1List", ".", "add", "(", "structurecomponent", ")", ";", "structurecomponent", ".", "buildComponent", "(", "par0StructureComponent", ",", "par1List", ",", "par2Random", ")", ";", "}", "return", "structurecomponent", ";", "}", "static", "StructureComponent", "getNextComponent", "(", "StructureComponent", "par0StructureComponent", ",", "List", "par1List", ",", "Random", "par2Random", ",", "int", "par3", ",", "int", "par4", ",", "int", "par5", ",", "int", "par6", ",", "int", "par7", ")", "{", "return", "getNextMineShaftComponent", "(", "par0StructureComponent", ",", "par1List", ",", "par2Random", ",", "par3", ",", "par4", ",", "par5", ",", "par6", ",", "par7", ")", ";", "}", "static", "StructurePieceTreasure", "[", "]", "getTreasurePieces", "(", ")", "{", "return", "lootArray", ";", "}", "static", "{", "lootArray", "=", "(", "new", "StructurePieceTreasure", "[", "]", "{", "new", "StructurePieceTreasure", "(", "Item", ".", "ingotIron", ".", "shiftedIndex", ",", "0", ",", "1", ",", "5", ",", "10", ")", ",", "new", "StructurePieceTreasure", "(", "Item", ".", "ingotGold", ".", "shiftedIndex", ",", "0", ",", "1", ",", "3", ",", "5", ")", ",", "new", "StructurePieceTreasure", "(", "Item", ".", "redstone", ".", "shiftedIndex", ",", "0", ",", "4", ",", "9", ",", "5", ")", ",", "new", "StructurePieceTreasure", "(", "Item", ".", "dyePowder", ".", "shiftedIndex", ",", "4", ",", "4", ",", "9", ",", "5", ")", ",", "new", "StructurePieceTreasure", "(", "Item", ".", "diamond", ".", "shiftedIndex", ",", "0", ",", "1", ",", "2", ",", "3", ")", ",", "new", "StructurePieceTreasure", "(", "Item", ".", "coal", ".", "shiftedIndex", ",", "0", ",", "3", ",", "8", ",", "10", ")", ",", "new", "StructurePieceTreasure", "(", "Item", ".", "bread", ".", "shiftedIndex", ",", "0", ",", "1", ",", "3", ",", "15", ")", ",", "new", "StructurePieceTreasure", "(", "Item", ".", "pickaxeSteel", ".", "shiftedIndex", ",", "0", ",", "1", ",", "1", ",", "1", ")", ",", "new", "StructurePieceTreasure", "(", "Block", ".", "rail", ".", "blockID", ",", "0", ",", "4", ",", "8", ",", "1", ")", ",", "new", "StructurePieceTreasure", "(", "Item", ".", "melonSeeds", ".", "shiftedIndex", ",", "0", ",", "2", ",", "4", ",", "10", ")", ",", "new", "StructurePieceTreasure", "(", "Item", ".", "pumpkinSeeds", ".", "shiftedIndex", ",", "0", ",", "2", ",", "4", ",", "10", ")", "}", ")", ";", "}", "}", "</s>" ]
9,722
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "Random", ";", "public", "class", "BlockTNT", "extends", "Block", "{", "public", "BlockTNT", "(", "int", "par1", ",", "int", "par2", ")", "{", "super", "(", "par1", ",", "par2", ",", "Material", ".", "tnt", ")", ";", "}", "public", "int", "getBlockTextureFromSide", "(", "int", "par1", ")", "{", "if", "(", "par1", "==", "0", ")", "{", "return", "blockIndexInTexture", "+", "2", ";", "}", "if", "(", "par1", "==", "1", ")", "{", "return", "blockIndexInTexture", "+", "1", ";", "}", "else", "{", "return", "blockIndexInTexture", ";", "}", "}", "public", "void", "onBlockAdded", "(", "World", "par1World", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ")", "{", "super", ".", "onBlockAdded", "(", "par1World", ",", "par2", ",", "par3", ",", "par4", ")", ";", "if", "(", "par1World", ".", "isBlockIndirectlyGettingPowered", "(", "par2", ",", "par3", ",", "par4", ")", ")", "{", "onBlockDestroyedByPlayer", "(", "par1World", ",", "par2", ",", "par3", ",", "par4", ",", "1", ")", ";", "par1World", ".", "setBlockWithNotify", "(", "par2", ",", "par3", ",", "par4", ",", "0", ")", ";", "}", "}", "public", "void", "onNeighborBlockChange", "(", "World", "par1World", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "int", "par5", ")", "{", "if", "(", "par5", ">", "0", "&&", "Block", ".", "blocksList", "[", "par5", "]", ".", "canProvidePower", "(", ")", "&&", "par1World", ".", "isBlockIndirectlyGettingPowered", "(", "par2", ",", "par3", ",", "par4", ")", ")", "{", "onBlockDestroyedByPlayer", "(", "par1World", ",", "par2", ",", "par3", ",", "par4", ",", "1", ")", ";", "par1World", ".", "setBlockWithNotify", "(", "par2", ",", "par3", ",", "par4", ",", "0", ")", ";", "}", "}", "public", "int", "quantityDropped", "(", "Random", "par1Random", ")", "{", "return", "0", ";", "}", "public", "void", "onBlockDestroyedByExplosion", "(", "World", "par1World", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ")", "{", "if", "(", "par1World", ".", "isRemote", ")", "{", "return", ";", "}", "else", "{", "EntityTNTPrimed", "entitytntprimed", "=", "new", "EntityTNTPrimed", "(", "par1World", ",", "(", "float", ")", "par2", "+", "0.5F", ",", "(", "float", ")", "par3", "+", "0.5F", ",", "(", "float", ")", "par4", "+", "0.5F", ")", ";", "entitytntprimed", ".", "fuse", "=", "par1World", ".", "rand", ".", "nextInt", "(", "entitytntprimed", ".", "fuse", "/", "4", ")", "+", "entitytntprimed", ".", "fuse", "/", "8", ";", "par1World", ".", "spawnEntityInWorld", "(", "entitytntprimed", ")", ";", "return", ";", "}", "}", "public", "void", "onBlockDestroyedByPlayer", "(", "World", "par1World", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "int", "par5", ")", "{", "if", "(", "par1World", ".", "isRemote", ")", "{", "return", ";", "}", "if", "(", "(", "par5", "&", "1", ")", "==", "0", ")", "{", "dropBlockAsItem_do", "(", "par1World", ",", "par2", ",", "par3", ",", "par4", ",", "new", "ItemStack", "(", "Block", ".", "tnt", ".", "blockID", ",", "1", ",", "0", ")", ")", ";", "}", "else", "{", "EntityTNTPrimed", "entitytntprimed", "=", "new", "EntityTNTPrimed", "(", "par1World", ",", "(", "float", ")", "par2", "+", "0.5F", ",", "(", "float", ")", "par3", "+", "0.5F", ",", "(", "float", ")", "par4", "+", "0.5F", ")", ";", "par1World", ".", "spawnEntityInWorld", "(", "entitytntprimed", ")", ";", "par1World", ".", "playSoundAtEntity", "(", "entitytntprimed", ",", "\"random.fuse\"", ",", "1.0F", ",", "1.0F", ")", ";", "}", "}", "public", "void", "onBlockClicked", "(", "World", "par1World", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "EntityPlayer", "par5EntityPlayer", ")", "{", "super", ".", "onBlockClicked", "(", "par1World", ",", "par2", ",", "par3", ",", "par4", ",", "par5EntityPlayer", ")", ";", "}", "public", "boolean", "blockActivated", "(", "World", "par1World", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "EntityPlayer", "par5EntityPlayer", ")", "{", "if", "(", "par5EntityPlayer", ".", "getCurrentEquippedItem", "(", ")", "!=", "null", "&&", "par5EntityPlayer", ".", "getCurrentEquippedItem", "(", ")", ".", "itemID", "==", "Item", ".", "flintAndSteel", ".", "shiftedIndex", ")", "{", "onBlockDestroyedByPlayer", "(", "par1World", ",", "par2", ",", "par3", ",", "par4", ",", "1", ")", ";", "par1World", ".", "setBlockWithNotify", "(", "par2", ",", "par3", ",", "par4", ",", "0", ")", ";", "return", "true", ";", "}", "else", "{", "return", "super", ".", "blockActivated", "(", "par1World", ",", "par2", ",", "par3", ",", "par4", ",", "par5EntityPlayer", ")", ";", "}", "}", "protected", "ItemStack", "createStackedBlock", "(", "int", "par1", ")", "{", "return", "null", ";", "}", "}", "</s>" ]
9,723
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "io", ".", "PrintStream", ";", "import", "java", ".", "util", ".", "*", ";", "public", "class", "EntityTrackerEntry", "{", "public", "Entity", "trackedEntity", ";", "public", "int", "trackingDistanceThreshold", ";", "public", "int", "field_9234_e", ";", "public", "int", "encodedPosX", ";", "public", "int", "encodedPosY", ";", "public", "int", "encodedPosZ", ";", "public", "int", "encodedRotationYaw", ";", "public", "int", "encodedRotationPitch", ";", "public", "int", "field_48617_i", ";", "public", "double", "lastTrackedEntityMotionX", ";", "public", "double", "lastTrackedEntityMotionY", ";", "public", "double", "lastTrackedEntityMotionZ", ";", "public", "int", "updateCounter", ";", "private", "double", "lastTrackedEntityPosX", ";", "private", "double", "lastTrackedEntityPosY", ";", "private", "double", "lastTrackedEntityPosZ", ";", "private", "boolean", "firstUpdateDone", ";", "private", "boolean", "shouldSendMotionUpdates", ";", "private", "int", "field_28165_t", ";", "public", "boolean", "playerEntitiesUpdated", ";", "public", "Set", "trackedPlayers", ";", "public", "EntityTrackerEntry", "(", "Entity", "par1Entity", ",", "int", "par2", ",", "int", "par3", ",", "boolean", "par4", ")", "{", "updateCounter", "=", "0", ";", "firstUpdateDone", "=", "false", ";", "field_28165_t", "=", "0", ";", "playerEntitiesUpdated", "=", "false", ";", "trackedPlayers", "=", "new", "HashSet", "(", ")", ";", "trackedEntity", "=", "par1Entity", ";", "trackingDistanceThreshold", "=", "par2", ";", "field_9234_e", "=", "par3", ";", "shouldSendMotionUpdates", "=", "par4", ";", "encodedPosX", "=", "MathHelper", ".", "floor_double", "(", "par1Entity", ".", "posX", "*", "32D", ")", ";", "encodedPosY", "=", "MathHelper", ".", "floor_double", "(", "par1Entity", ".", "posY", "*", "32D", ")", ";", "encodedPosZ", "=", "MathHelper", ".", "floor_double", "(", "par1Entity", ".", "posZ", "*", "32D", ")", ";", "encodedRotationYaw", "=", "MathHelper", ".", "floor_float", "(", "(", "par1Entity", ".", "rotationYaw", "*", "256F", ")", "/", "360F", ")", ";", "encodedRotationPitch", "=", "MathHelper", ".", "floor_float", "(", "(", "par1Entity", ".", "rotationPitch", "*", "256F", ")", "/", "360F", ")", ";", "field_48617_i", "=", "MathHelper", ".", "floor_float", "(", "(", "par1Entity", ".", "func_48314_aq", "(", ")", "*", "256F", ")", "/", "360F", ")", ";", "}", "public", "boolean", "equals", "(", "Object", "par1Obj", ")", "{", "if", "(", "par1Obj", "instanceof", "EntityTrackerEntry", ")", "{", "return", "(", "(", "EntityTrackerEntry", ")", "par1Obj", ")", ".", "trackedEntity", ".", "entityId", "==", "trackedEntity", ".", "entityId", ";", "}", "else", "{", "return", "false", ";", "}", "}", "public", "int", "hashCode", "(", ")", "{", "return", "trackedEntity", ".", "entityId", ";", "}", "public", "void", "updatePlayerList", "(", "List", "par1List", ")", "{", "playerEntitiesUpdated", "=", "false", ";", "if", "(", "!", "firstUpdateDone", "||", "trackedEntity", ".", "getDistanceSq", "(", "lastTrackedEntityPosX", ",", "lastTrackedEntityPosY", ",", "lastTrackedEntityPosZ", ")", ">", "16D", ")", "{", "lastTrackedEntityPosX", "=", "trackedEntity", ".", "posX", ";", "lastTrackedEntityPosY", "=", "trackedEntity", ".", "posY", ";", "lastTrackedEntityPosZ", "=", "trackedEntity", ".", "posZ", ";", "firstUpdateDone", "=", "true", ";", "playerEntitiesUpdated", "=", "true", ";", "updatePlayerEntities", "(", "par1List", ")", ";", "}", "field_28165_t", "++", ";", "if", "(", "updateCounter", "++", "%", "field_9234_e", "==", "0", "||", "trackedEntity", ".", "isAirBorne", ")", "{", "int", "i", "=", "MathHelper", ".", "floor_double", "(", "trackedEntity", ".", "posX", "*", "32D", ")", ";", "int", "j", "=", "MathHelper", ".", "floor_double", "(", "trackedEntity", ".", "posY", "*", "32D", ")", ";", "int", "k", "=", "MathHelper", ".", "floor_double", "(", "trackedEntity", ".", "posZ", "*", "32D", ")", ";", "int", "l", "=", "MathHelper", ".", "floor_float", "(", "(", "trackedEntity", ".", "rotationYaw", "*", "256F", ")", "/", "360F", ")", ";", "int", "i1", "=", "MathHelper", ".", "floor_float", "(", "(", "trackedEntity", ".", "rotationPitch", "*", "256F", ")", "/", "360F", ")", ";", "int", "j1", "=", "i", "-", "encodedPosX", ";", "int", "k1", "=", "j", "-", "encodedPosY", ";", "int", "l1", "=", "k", "-", "encodedPosZ", ";", "Object", "obj", "=", "null", ";", "boolean", "flag", "=", "Math", ".", "abs", "(", "j1", ")", ">=", "4", "||", "Math", ".", "abs", "(", "k1", ")", ">=", "4", "||", "Math", ".", "abs", "(", "l1", ")", ">=", "4", ";", "boolean", "flag1", "=", "Math", ".", "abs", "(", "l", "-", "encodedRotationYaw", ")", ">=", "4", "||", "Math", ".", "abs", "(", "i1", "-", "encodedRotationPitch", ")", ">=", "4", ";", "if", "(", "j1", "<", "-", "128", "||", "j1", ">=", "128", "||", "k1", "<", "-", "128", "||", "k1", ">=", "128", "||", "l1", "<", "-", "128", "||", "l1", ">=", "128", "||", "field_28165_t", ">", "400", ")", "{", "field_28165_t", "=", "0", ";", "trackedEntity", ".", "posX", "=", "(", "double", ")", "i", "/", "32D", ";", "trackedEntity", ".", "posY", "=", "(", "double", ")", "j", "/", "32D", ";", "trackedEntity", ".", "posZ", "=", "(", "double", ")", "k", "/", "32D", ";", "obj", "=", "new", "Packet34EntityTeleport", "(", "trackedEntity", ".", "entityId", ",", "i", ",", "j", ",", "k", ",", "(", "byte", ")", "l", ",", "(", "byte", ")", "i1", ")", ";", "}", "else", "if", "(", "flag", "&&", "flag1", ")", "{", "obj", "=", "new", "Packet33RelEntityMoveLook", "(", "trackedEntity", ".", "entityId", ",", "(", "byte", ")", "j1", ",", "(", "byte", ")", "k1", ",", "(", "byte", ")", "l1", ",", "(", "byte", ")", "l", ",", "(", "byte", ")", "i1", ")", ";", "}", "else", "if", "(", "flag", ")", "{", "obj", "=", "new", "Packet31RelEntityMove", "(", "trackedEntity", ".", "entityId", ",", "(", "byte", ")", "j1", ",", "(", "byte", ")", "k1", ",", "(", "byte", ")", "l1", ")", ";", "}", "else", "if", "(", "flag1", ")", "{", "obj", "=", "new", "Packet32EntityLook", "(", "trackedEntity", ".", "entityId", ",", "(", "byte", ")", "l", ",", "(", "byte", ")", "i1", ")", ";", "}", "if", "(", "shouldSendMotionUpdates", ")", "{", "double", "d", "=", "trackedEntity", ".", "motionX", "-", "lastTrackedEntityMotionX", ";", "double", "d1", "=", "trackedEntity", ".", "motionY", "-", "lastTrackedEntityMotionY", ";", "double", "d2", "=", "trackedEntity", ".", "motionZ", "-", "lastTrackedEntityMotionZ", ";", "double", "d3", "=", "0.02D", ";", "double", "d4", "=", "d", "*", "d", "+", "d1", "*", "d1", "+", "d2", "*", "d2", ";", "if", "(", "d4", ">", "d3", "*", "d3", "||", "d4", ">", "0.0D", "&&", "trackedEntity", ".", "motionX", "==", "0.0D", "&&", "trackedEntity", ".", "motionY", "==", "0.0D", "&&", "trackedEntity", ".", "motionZ", "==", "0.0D", ")", "{", "lastTrackedEntityMotionX", "=", "trackedEntity", ".", "motionX", ";", "lastTrackedEntityMotionY", "=", "trackedEntity", ".", "motionY", ";", "lastTrackedEntityMotionZ", "=", "trackedEntity", ".", "motionZ", ";", "sendPacketToTrackedPlayers", "(", "new", "Packet28EntityVelocity", "(", "trackedEntity", ".", "entityId", ",", "lastTrackedEntityMotionX", ",", "lastTrackedEntityMotionY", ",", "lastTrackedEntityMotionZ", ")", ")", ";", "}", "}", "if", "(", "obj", "!=", "null", ")", "{", "sendPacketToTrackedPlayers", "(", "(", "(", "Packet", ")", "(", "obj", ")", ")", ")", ";", "}", "DataWatcher", "datawatcher", "=", "trackedEntity", ".", "getDataWatcher", "(", ")", ";", "if", "(", "datawatcher", ".", "hasObjectChanged", "(", ")", ")", "{", "sendPacketToTrackedPlayersAndTrackedEntity", "(", "new", "Packet40EntityMetadata", "(", "trackedEntity", ".", "entityId", ",", "datawatcher", ")", ")", ";", "}", "int", "i2", "=", "MathHelper", ".", "floor_float", "(", "(", "trackedEntity", ".", "func_48314_aq", "(", ")", "*", "256F", ")", "/", "360F", ")", ";", "if", "(", "Math", ".", "abs", "(", "i2", "-", "field_48617_i", ")", ">=", "4", ")", "{", "sendPacketToTrackedPlayers", "(", "new", "Packet35EntityHeadRotation", "(", "trackedEntity", ".", "entityId", ",", "(", "byte", ")", "i2", ")", ")", ";", "field_48617_i", "=", "i2", ";", "}", "if", "(", "flag", ")", "{", "encodedPosX", "=", "i", ";", "encodedPosY", "=", "j", ";", "encodedPosZ", "=", "k", ";", "}", "if", "(", "flag1", ")", "{", "encodedRotationYaw", "=", "l", ";", "encodedRotationPitch", "=", "i1", ";", "}", "}", "trackedEntity", ".", "isAirBorne", "=", "false", ";", "if", "(", "trackedEntity", ".", "velocityChanged", ")", "{", "sendPacketToTrackedPlayersAndTrackedEntity", "(", "new", "Packet28EntityVelocity", "(", "trackedEntity", ")", ")", ";", "trackedEntity", ".", "velocityChanged", "=", "false", ";", "}", "}", "public", "void", "sendPacketToTrackedPlayers", "(", "Packet", "par1Packet", ")", "{", "EntityPlayerMP", "entityplayermp", ";", "for", "(", "Iterator", "iterator", "=", "trackedPlayers", ".", "iterator", "(", ")", ";", "iterator", ".", "hasNext", "(", ")", ";", "entityplayermp", ".", "playerNetServerHandler", ".", "sendPacket", "(", "par1Packet", ")", ")", "{", "entityplayermp", "=", "(", "EntityPlayerMP", ")", "iterator", ".", "next", "(", ")", ";", "}", "}", "public", "void", "sendPacketToTrackedPlayersAndTrackedEntity", "(", "Packet", "par1Packet", ")", "{", "sendPacketToTrackedPlayers", "(", "par1Packet", ")", ";", "if", "(", "trackedEntity", "instanceof", "EntityPlayerMP", ")", "{", "(", "(", "EntityPlayerMP", ")", "trackedEntity", ")", ".", "playerNetServerHandler", ".", "sendPacket", "(", "par1Packet", ")", ";", "}", "}", "public", "void", "sendDestroyEntityPacketToTrackedPlayers", "(", ")", "{", "sendPacketToTrackedPlayers", "(", "new", "Packet29DestroyEntity", "(", "trackedEntity", ".", "entityId", ")", ")", ";", "}", "public", "void", "removeFromTrackedPlayers", "(", "EntityPlayerMP", "par1EntityPlayerMP", ")", "{", "if", "(", "trackedPlayers", ".", "contains", "(", "par1EntityPlayerMP", ")", ")", "{", "trackedPlayers", ".", "remove", "(", "par1EntityPlayerMP", ")", ";", "}", "}", "public", "void", "updatePlayerEntity", "(", "EntityPlayerMP", "par1EntityPlayerMP", ")", "{", "if", "(", "par1EntityPlayerMP", "==", "trackedEntity", ")", "{", "return", ";", "}", "double", "d", "=", "par1EntityPlayerMP", ".", "posX", "-", "(", "double", ")", "(", "encodedPosX", "/", "32", ")", ";", "double", "d1", "=", "par1EntityPlayerMP", ".", "posZ", "-", "(", "double", ")", "(", "encodedPosZ", "/", "32", ")", ";", "if", "(", "d", ">=", "(", "double", ")", "(", "-", "trackingDistanceThreshold", ")", "&&", "d", "<=", "(", "double", ")", "trackingDistanceThreshold", "&&", "d1", ">=", "(", "double", ")", "(", "-", "trackingDistanceThreshold", ")", "&&", "d1", "<=", "(", "double", ")", "trackingDistanceThreshold", ")", "{", "if", "(", "!", "trackedPlayers", ".", "contains", "(", "par1EntityPlayerMP", ")", ")", "{", "trackedPlayers", ".", "add", "(", "par1EntityPlayerMP", ")", ";", "par1EntityPlayerMP", ".", "playerNetServerHandler", ".", "sendPacket", "(", "getSpawnPacket", "(", ")", ")", ";", "if", "(", "shouldSendMotionUpdates", ")", "{", "par1EntityPlayerMP", ".", "playerNetServerHandler", ".", "sendPacket", "(", "new", "Packet28EntityVelocity", "(", "trackedEntity", ".", "entityId", ",", "trackedEntity", ".", "motionX", ",", "trackedEntity", ".", "motionY", ",", "trackedEntity", ".", "motionZ", ")", ")", ";", "}", "ItemStack", "aitemstack", "[", "]", "=", "trackedEntity", ".", "getInventory", "(", ")", ";", "if", "(", "aitemstack", "!=", "null", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "aitemstack", ".", "length", ";", "i", "++", ")", "{", "par1EntityPlayerMP", ".", "playerNetServerHandler", ".", "sendPacket", "(", "new", "Packet5PlayerInventory", "(", "trackedEntity", ".", "entityId", ",", "i", ",", "aitemstack", "[", "i", "]", ")", ")", ";", "}", "}", "if", "(", "trackedEntity", "instanceof", "EntityPlayer", ")", "{", "EntityPlayer", "entityplayer", "=", "(", "EntityPlayer", ")", "trackedEntity", ";", "if", "(", "entityplayer", ".", "isPlayerSleeping", "(", ")", ")", "{", "par1EntityPlayerMP", ".", "playerNetServerHandler", ".", "sendPacket", "(", "new", "Packet17Sleep", "(", "trackedEntity", ",", "0", ",", "MathHelper", ".", "floor_double", "(", "trackedEntity", ".", "posX", ")", ",", "MathHelper", ".", "floor_double", "(", "trackedEntity", ".", "posY", ")", ",", "MathHelper", ".", "floor_double", "(", "trackedEntity", ".", "posZ", ")", ")", ")", ";", "}", "}", "if", "(", "trackedEntity", "instanceof", "EntityLiving", ")", "{", "EntityLiving", "entityliving", "=", "(", "EntityLiving", ")", "trackedEntity", ";", "PotionEffect", "potioneffect", ";", "for", "(", "Iterator", "iterator", "=", "entityliving", ".", "getActivePotionEffects", "(", ")", ".", "iterator", "(", ")", ";", "iterator", ".", "hasNext", "(", ")", ";", "par1EntityPlayerMP", ".", "playerNetServerHandler", ".", "sendPacket", "(", "new", "Packet41EntityEffect", "(", "trackedEntity", ".", "entityId", ",", "potioneffect", ")", ")", ")", "{", "potioneffect", "=", "(", "PotionEffect", ")", "iterator", ".", "next", "(", ")", ";", "}", "}", "}", "}", "else", "if", "(", "trackedPlayers", ".", "contains", "(", "par1EntityPlayerMP", ")", ")", "{", "trackedPlayers", ".", "remove", "(", "par1EntityPlayerMP", ")", ";", "par1EntityPlayerMP", ".", "playerNetServerHandler", ".", "sendPacket", "(", "new", "Packet29DestroyEntity", "(", "trackedEntity", ".", "entityId", ")", ")", ";", "}", "}", "public", "void", "updatePlayerEntities", "(", "List", "par1List", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "par1List", ".", "size", "(", ")", ";", "i", "++", ")", "{", "updatePlayerEntity", "(", "(", "EntityPlayerMP", ")", "par1List", ".", "get", "(", "i", ")", ")", ";", "}", "}", "private", "Packet", "getSpawnPacket", "(", ")", "{", "if", "(", "trackedEntity", ".", "isDead", ")", "{", "System", ".", "out", ".", "println", "(", "\"\"", ")", ";", "}", "if", "(", "trackedEntity", "instanceof", "EntityItem", ")", "{", "EntityItem", "entityitem", "=", "(", "EntityItem", ")", "trackedEntity", ";", "Packet21PickupSpawn", "packet21pickupspawn", "=", "new", "Packet21PickupSpawn", "(", "entityitem", ")", ";", "entityitem", ".", "posX", "=", "(", "double", ")", "packet21pickupspawn", ".", "xPosition", "/", "32D", ";", "entityitem", ".", "posY", "=", "(", "double", ")", "packet21pickupspawn", ".", "yPosition", "/", "32D", ";", "entityitem", ".", "posZ", "=", "(", "double", ")", "packet21pickupspawn", ".", "zPosition", "/", "32D", ";", "return", "packet21pickupspawn", ";", "}", "if", "(", "trackedEntity", "instanceof", "EntityPlayerMP", ")", "{", "return", "new", "Packet20NamedEntitySpawn", "(", "(", "EntityPlayer", ")", "trackedEntity", ")", ";", "}", "if", "(", "trackedEntity", "instanceof", "EntityMinecart", ")", "{", "EntityMinecart", "entityminecart", "=", "(", "EntityMinecart", ")", "trackedEntity", ";", "if", "(", "entityminecart", ".", "minecartType", "==", "0", ")", "{", "return", "new", "Packet23VehicleSpawn", "(", "trackedEntity", ",", "10", ")", ";", "}", "if", "(", "entityminecart", ".", "minecartType", "==", "1", ")", "{", "return", "new", "Packet23VehicleSpawn", "(", "trackedEntity", ",", "11", ")", ";", "}", "if", "(", "entityminecart", ".", "minecartType", "==", "2", ")", "{", "return", "new", "Packet23VehicleSpawn", "(", "trackedEntity", ",", "12", ")", ";", "}", "}", "if", "(", "trackedEntity", "instanceof", "EntityBoat", ")", "{", "return", "new", "Packet23VehicleSpawn", "(", "trackedEntity", ",", "1", ")", ";", "}", "if", "(", "trackedEntity", "instanceof", "IAnimals", ")", "{", "return", "new", "Packet24MobSpawn", "(", "(", "EntityLiving", ")", "trackedEntity", ")", ";", "}", "if", "(", "trackedEntity", "instanceof", "EntityDragon", ")", "{", "return", "new", "Packet24MobSpawn", "(", "(", "EntityLiving", ")", "trackedEntity", ")", ";", "}", "if", "(", "trackedEntity", "instanceof", "EntityFishHook", ")", "{", "return", "new", "Packet23VehicleSpawn", "(", "trackedEntity", ",", "90", ")", ";", "}", "if", "(", "trackedEntity", "instanceof", "EntityArrow", ")", "{", "Entity", "entity", "=", "(", "(", "EntityArrow", ")", "trackedEntity", ")", ".", "shootingEntity", ";", "return", "new", "Packet23VehicleSpawn", "(", "trackedEntity", ",", "60", ",", "entity", "==", "null", "?", "trackedEntity", ".", "entityId", ":", "entity", ".", "entityId", ")", ";", "}", "if", "(", "trackedEntity", "instanceof", "EntitySnowball", ")", "{", "return", "new", "Packet23VehicleSpawn", "(", "trackedEntity", ",", "61", ")", ";", "}", "if", "(", "trackedEntity", "instanceof", "EntityPotion", ")", "{", "return", "new", "Packet23VehicleSpawn", "(", "trackedEntity", ",", "73", ",", "(", "(", "EntityPotion", ")", "trackedEntity", ")", ".", "getPotionDamage", "(", ")", ")", ";", "}", "if", "(", "trackedEntity", "instanceof", "EntityExpBottle", ")", "{", "return", "new", "Packet23VehicleSpawn", "(", "trackedEntity", ",", "75", ")", ";", "}", "if", "(", "trackedEntity", "instanceof", "EntityEnderPearl", ")", "{", "return", "new", "Packet23VehicleSpawn", "(", "trackedEntity", ",", "65", ")", ";", "}", "if", "(", "trackedEntity", "instanceof", "EntityEnderEye", ")", "{", "return", "new", "Packet23VehicleSpawn", "(", "trackedEntity", ",", "72", ")", ";", "}", "if", "(", "trackedEntity", "instanceof", "EntitySmallFireball", ")", "{", "EntitySmallFireball", "entitysmallfireball", "=", "(", "EntitySmallFireball", ")", "trackedEntity", ";", "Packet23VehicleSpawn", "packet23vehiclespawn", "=", "null", ";", "if", "(", "entitysmallfireball", ".", "shootingEntity", "!=", "null", ")", "{", "packet23vehiclespawn", "=", "new", "Packet23VehicleSpawn", "(", "trackedEntity", ",", "64", ",", "entitysmallfireball", ".", "shootingEntity", ".", "entityId", ")", ";", "}", "else", "{", "packet23vehiclespawn", "=", "new", "Packet23VehicleSpawn", "(", "trackedEntity", ",", "64", ",", "0", ")", ";", "}", "packet23vehiclespawn", ".", "speedX", "=", "(", "int", ")", "(", "entitysmallfireball", ".", "accelerationX", "*", "8000D", ")", ";", "packet23vehiclespawn", ".", "speedY", "=", "(", "int", ")", "(", "entitysmallfireball", ".", "accelerationY", "*", "8000D", ")", ";", "packet23vehiclespawn", ".", "speedZ", "=", "(", "int", ")", "(", "entitysmallfireball", ".", "accelerationZ", "*", "8000D", ")", ";", "return", "packet23vehiclespawn", ";", "}", "if", "(", "trackedEntity", "instanceof", "EntityFireball", ")", "{", "EntityFireball", "entityfireball", "=", "(", "EntityFireball", ")", "trackedEntity", ";", "Packet23VehicleSpawn", "packet23vehiclespawn1", "=", "null", ";", "if", "(", "entityfireball", ".", "shootingEntity", "!=", "null", ")", "{", "packet23vehiclespawn1", "=", "new", "Packet23VehicleSpawn", "(", "trackedEntity", ",", "63", ",", "(", "(", "EntityFireball", ")", "trackedEntity", ")", ".", "shootingEntity", ".", "entityId", ")", ";", "}", "else", "{", "packet23vehiclespawn1", "=", "new", "Packet23VehicleSpawn", "(", "trackedEntity", ",", "63", ",", "0", ")", ";", "}", "packet23vehiclespawn1", ".", "speedX", "=", "(", "int", ")", "(", "entityfireball", ".", "accelerationX", "*", "8000D", ")", ";", "packet23vehiclespawn1", ".", "speedY", "=", "(", "int", ")", "(", "entityfireball", ".", "accelerationY", "*", "8000D", ")", ";", "packet23vehiclespawn1", ".", "speedZ", "=", "(", "int", ")", "(", "entityfireball", ".", "accelerationZ", "*", "8000D", ")", ";", "return", "packet23vehiclespawn1", ";", "}", "if", "(", "trackedEntity", "instanceof", "EntityEgg", ")", "{", "return", "new", "Packet23VehicleSpawn", "(", "trackedEntity", ",", "62", ")", ";", "}", "if", "(", "trackedEntity", "instanceof", "EntityTNTPrimed", ")", "{", "return", "new", "Packet23VehicleSpawn", "(", "trackedEntity", ",", "50", ")", ";", "}", "if", "(", "trackedEntity", "instanceof", "EntityEnderCrystal", ")", "{", "return", "new", "Packet23VehicleSpawn", "(", "trackedEntity", ",", "51", ")", ";", "}", "if", "(", "trackedEntity", "instanceof", "EntityFallingSand", ")", "{", "EntityFallingSand", "entityfallingsand", "=", "(", "EntityFallingSand", ")", "trackedEntity", ";", "if", "(", "entityfallingsand", ".", "blockID", "==", "Block", ".", "sand", ".", "blockID", ")", "{", "return", "new", "Packet23VehicleSpawn", "(", "trackedEntity", ",", "70", ")", ";", "}", "if", "(", "entityfallingsand", ".", "blockID", "==", "Block", ".", "gravel", ".", "blockID", ")", "{", "return", "new", "Packet23VehicleSpawn", "(", "trackedEntity", ",", "71", ")", ";", "}", "if", "(", "entityfallingsand", ".", "blockID", "==", "Block", ".", "dragonEgg", ".", "blockID", ")", "{", "return", "new", "Packet23VehicleSpawn", "(", "trackedEntity", ",", "74", ")", ";", "}", "}", "if", "(", "trackedEntity", "instanceof", "EntityPainting", ")", "{", "return", "new", "Packet25EntityPainting", "(", "(", "EntityPainting", ")", "trackedEntity", ")", ";", "}", "if", "(", "trackedEntity", "instanceof", "EntityXPOrb", ")", "{", "return", "new", "Packet26EntityExpOrb", "(", "(", "EntityXPOrb", ")", "trackedEntity", ")", ";", "}", "else", "{", "throw", "new", "IllegalArgumentException", "(", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "\"\"", ")", ".", "append", "(", "trackedEntity", ".", "getClass", "(", ")", ")", ".", "append", "(", "\"!\"", ")", ".", "toString", "(", ")", ")", ";", "}", "}", "public", "void", "removeTrackedPlayerSymmetric", "(", "EntityPlayerMP", "par1EntityPlayerMP", ")", "{", "if", "(", "trackedPlayers", ".", "contains", "(", "par1EntityPlayerMP", ")", ")", "{", "trackedPlayers", ".", "remove", "(", "par1EntityPlayerMP", ")", ";", "par1EntityPlayerMP", ".", "playerNetServerHandler", ".", "sendPacket", "(", "new", "Packet29DestroyEntity", "(", "trackedEntity", ".", "entityId", ")", ")", ";", "}", "}", "}", "</s>" ]
9,724
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "io", ".", "*", ";", "public", "class", "Packet255KickDisconnect", "extends", "Packet", "{", "public", "String", "reason", ";", "public", "Packet255KickDisconnect", "(", ")", "{", "}", "public", "Packet255KickDisconnect", "(", "String", "par1Str", ")", "{", "reason", "=", "par1Str", ";", "}", "public", "void", "readPacketData", "(", "DataInputStream", "par1DataInputStream", ")", "throws", "IOException", "{", "reason", "=", "readString", "(", "par1DataInputStream", ",", "256", ")", ";", "}", "public", "void", "writePacketData", "(", "DataOutputStream", "par1DataOutputStream", ")", "throws", "IOException", "{", "writeString", "(", "reason", ",", "par1DataOutputStream", ")", ";", "}", "public", "void", "processPacket", "(", "NetHandler", "par1NetHandler", ")", "{", "par1NetHandler", ".", "handleKickDisconnect", "(", "this", ")", ";", "}", "public", "int", "getPacketSize", "(", ")", "{", "return", "reason", ".", "length", "(", ")", ";", "}", "}", "</s>" ]
9,725
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "Random", ";", "public", "class", "BlockDispenser", "extends", "BlockContainer", "{", "private", "Random", "random", ";", "protected", "BlockDispenser", "(", "int", "par1", ")", "{", "super", "(", "par1", ",", "Material", ".", "rock", ")", ";", "random", "=", "new", "Random", "(", ")", ";", "blockIndexInTexture", "=", "45", ";", "}", "public", "int", "tickRate", "(", ")", "{", "return", "4", ";", "}", "public", "int", "idDropped", "(", "int", "par1", ",", "Random", "par2Random", ",", "int", "par3", ")", "{", "return", "Block", ".", "dispenser", ".", "blockID", ";", "}", "public", "void", "onBlockAdded", "(", "World", "par1World", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ")", "{", "super", ".", "onBlockAdded", "(", "par1World", ",", "par2", ",", "par3", ",", "par4", ")", ";", "setDispenserDefaultDirection", "(", "par1World", ",", "par2", ",", "par3", ",", "par4", ")", ";", "}", "private", "void", "setDispenserDefaultDirection", "(", "World", "par1World", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ")", "{", "if", "(", "par1World", ".", "isRemote", ")", "{", "return", ";", "}", "int", "i", "=", "par1World", ".", "getBlockId", "(", "par2", ",", "par3", ",", "par4", "-", "1", ")", ";", "int", "j", "=", "par1World", ".", "getBlockId", "(", "par2", ",", "par3", ",", "par4", "+", "1", ")", ";", "int", "k", "=", "par1World", ".", "getBlockId", "(", "par2", "-", "1", ",", "par3", ",", "par4", ")", ";", "int", "l", "=", "par1World", ".", "getBlockId", "(", "par2", "+", "1", ",", "par3", ",", "par4", ")", ";", "byte", "byte0", "=", "3", ";", "if", "(", "Block", ".", "opaqueCubeLookup", "[", "i", "]", "&&", "!", "Block", ".", "opaqueCubeLookup", "[", "j", "]", ")", "{", "byte0", "=", "3", ";", "}", "if", "(", "Block", ".", "opaqueCubeLookup", "[", "j", "]", "&&", "!", "Block", ".", "opaqueCubeLookup", "[", "i", "]", ")", "{", "byte0", "=", "2", ";", "}", "if", "(", "Block", ".", "opaqueCubeLookup", "[", "k", "]", "&&", "!", "Block", ".", "opaqueCubeLookup", "[", "l", "]", ")", "{", "byte0", "=", "5", ";", "}", "if", "(", "Block", ".", "opaqueCubeLookup", "[", "l", "]", "&&", "!", "Block", ".", "opaqueCubeLookup", "[", "k", "]", ")", "{", "byte0", "=", "4", ";", "}", "par1World", ".", "setBlockMetadataWithNotify", "(", "par2", ",", "par3", ",", "par4", ",", "byte0", ")", ";", "}", "public", "int", "getBlockTextureFromSide", "(", "int", "par1", ")", "{", "if", "(", "par1", "==", "1", ")", "{", "return", "blockIndexInTexture", "+", "17", ";", "}", "if", "(", "par1", "==", "0", ")", "{", "return", "blockIndexInTexture", "+", "17", ";", "}", "if", "(", "par1", "==", "3", ")", "{", "return", "blockIndexInTexture", "+", "1", ";", "}", "else", "{", "return", "blockIndexInTexture", ";", "}", "}", "public", "boolean", "blockActivated", "(", "World", "par1World", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "EntityPlayer", "par5EntityPlayer", ")", "{", "if", "(", "par1World", ".", "isRemote", ")", "{", "return", "true", ";", "}", "TileEntityDispenser", "tileentitydispenser", "=", "(", "TileEntityDispenser", ")", "par1World", ".", "getBlockTileEntity", "(", "par2", ",", "par3", ",", "par4", ")", ";", "if", "(", "tileentitydispenser", "!=", "null", ")", "{", "par5EntityPlayer", ".", "displayGUIDispenser", "(", "tileentitydispenser", ")", ";", "}", "return", "true", ";", "}", "private", "void", "dispenseItem", "(", "World", "par1World", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "Random", "par5Random", ")", "{", "int", "i", "=", "par1World", ".", "getBlockMetadata", "(", "par2", ",", "par3", ",", "par4", ")", ";", "int", "j", "=", "0", ";", "int", "k", "=", "0", ";", "if", "(", "i", "==", "3", ")", "{", "k", "=", "1", ";", "}", "else", "if", "(", "i", "==", "2", ")", "{", "k", "=", "-", "1", ";", "}", "else", "if", "(", "i", "==", "5", ")", "{", "j", "=", "1", ";", "}", "else", "{", "j", "=", "-", "1", ";", "}", "TileEntityDispenser", "tileentitydispenser", "=", "(", "TileEntityDispenser", ")", "par1World", ".", "getBlockTileEntity", "(", "par2", ",", "par3", ",", "par4", ")", ";", "if", "(", "tileentitydispenser", "!=", "null", ")", "{", "ItemStack", "itemstack", "=", "tileentitydispenser", ".", "getRandomStackFromInventory", "(", ")", ";", "double", "d", "=", "(", "double", ")", "par2", "+", "(", "double", ")", "j", "*", "0.59999999999999998D", "+", "0.5D", ";", "double", "d1", "=", "(", "double", ")", "par3", "+", "0.5D", ";", "double", "d2", "=", "(", "double", ")", "par4", "+", "(", "double", ")", "k", "*", "0.59999999999999998D", "+", "0.5D", ";", "if", "(", "itemstack", "==", "null", ")", "{", "par1World", ".", "playAuxSFX", "(", "1001", ",", "par2", ",", "par3", ",", "par4", ",", "0", ")", ";", "}", "else", "{", "if", "(", "itemstack", ".", "itemID", "==", "Item", ".", "arrow", ".", "shiftedIndex", ")", "{", "EntityArrow", "entityarrow", "=", "new", "EntityArrow", "(", "par1World", ",", "d", ",", "d1", ",", "d2", ")", ";", "entityarrow", ".", "setArrowHeading", "(", "j", ",", "0.10000000149011612D", ",", "k", ",", "1.1F", ",", "6F", ")", ";", "entityarrow", ".", "doesArrowBelongToPlayer", "=", "true", ";", "par1World", ".", "spawnEntityInWorld", "(", "entityarrow", ")", ";", "par1World", ".", "playAuxSFX", "(", "1002", ",", "par2", ",", "par3", ",", "par4", ",", "0", ")", ";", "}", "else", "if", "(", "itemstack", ".", "itemID", "==", "Item", ".", "egg", ".", "shiftedIndex", ")", "{", "EntityEgg", "entityegg", "=", "new", "EntityEgg", "(", "par1World", ",", "d", ",", "d1", ",", "d2", ")", ";", "entityegg", ".", "setThrowableHeading", "(", "j", ",", "0.10000000149011612D", ",", "k", ",", "1.1F", ",", "6F", ")", ";", "par1World", ".", "spawnEntityInWorld", "(", "entityegg", ")", ";", "par1World", ".", "playAuxSFX", "(", "1002", ",", "par2", ",", "par3", ",", "par4", ",", "0", ")", ";", "}", "else", "if", "(", "itemstack", ".", "itemID", "==", "Item", ".", "snowball", ".", "shiftedIndex", ")", "{", "EntitySnowball", "entitysnowball", "=", "new", "EntitySnowball", "(", "par1World", ",", "d", ",", "d1", ",", "d2", ")", ";", "entitysnowball", ".", "setThrowableHeading", "(", "j", ",", "0.10000000149011612D", ",", "k", ",", "1.1F", ",", "6F", ")", ";", "par1World", ".", "spawnEntityInWorld", "(", "entitysnowball", ")", ";", "par1World", ".", "playAuxSFX", "(", "1002", ",", "par2", ",", "par3", ",", "par4", ",", "0", ")", ";", "}", "else", "if", "(", "itemstack", ".", "itemID", "==", "Item", ".", "potion", ".", "shiftedIndex", "&&", "ItemPotion", ".", "isSplash", "(", "itemstack", ".", "getItemDamage", "(", ")", ")", ")", "{", "EntityPotion", "entitypotion", "=", "new", "EntityPotion", "(", "par1World", ",", "d", ",", "d1", ",", "d2", ",", "itemstack", ".", "getItemDamage", "(", ")", ")", ";", "entitypotion", ".", "setThrowableHeading", "(", "j", ",", "0.10000000149011612D", ",", "k", ",", "1.375F", ",", "3F", ")", ";", "par1World", ".", "spawnEntityInWorld", "(", "entitypotion", ")", ";", "par1World", ".", "playAuxSFX", "(", "1002", ",", "par2", ",", "par3", ",", "par4", ",", "0", ")", ";", "}", "else", "if", "(", "itemstack", ".", "itemID", "==", "Item", ".", "expBottle", ".", "shiftedIndex", ")", "{", "EntityExpBottle", "entityexpbottle", "=", "new", "EntityExpBottle", "(", "par1World", ",", "d", ",", "d1", ",", "d2", ")", ";", "entityexpbottle", ".", "setThrowableHeading", "(", "j", ",", "0.10000000149011612D", ",", "k", ",", "1.375F", ",", "3F", ")", ";", "par1World", ".", "spawnEntityInWorld", "(", "entityexpbottle", ")", ";", "par1World", ".", "playAuxSFX", "(", "1002", ",", "par2", ",", "par3", ",", "par4", ",", "0", ")", ";", "}", "else", "if", "(", "itemstack", ".", "itemID", "==", "Item", ".", "monsterPlacer", ".", "shiftedIndex", ")", "{", "ItemMonsterPlacer", ".", "func_48390_a", "(", "par1World", ",", "itemstack", ".", "getItemDamage", "(", ")", ",", "d", "+", "(", "double", ")", "j", "*", "0.29999999999999999D", ",", "d1", "-", "0.29999999999999999D", ",", "d2", "+", "(", "double", ")", "k", "*", "0.29999999999999999D", ")", ";", "par1World", ".", "playAuxSFX", "(", "1002", ",", "par2", ",", "par3", ",", "par4", ",", "0", ")", ";", "}", "else", "if", "(", "itemstack", ".", "itemID", "==", "Item", ".", "fireballCharge", ".", "shiftedIndex", ")", "{", "EntitySmallFireball", "entitysmallfireball", "=", "new", "EntitySmallFireball", "(", "par1World", ",", "d", "+", "(", "double", ")", "j", "*", "0.29999999999999999D", ",", "d1", ",", "d2", "+", "(", "double", ")", "k", "*", "0.29999999999999999D", ",", "(", "double", ")", "j", "+", "par5Random", ".", "nextGaussian", "(", ")", "*", "0.050000000000000003D", ",", "par5Random", ".", "nextGaussian", "(", ")", "*", "0.050000000000000003D", ",", "(", "double", ")", "k", "+", "par5Random", ".", "nextGaussian", "(", ")", "*", "0.050000000000000003D", ")", ";", "par1World", ".", "spawnEntityInWorld", "(", "entitysmallfireball", ")", ";", "par1World", ".", "playAuxSFX", "(", "1009", ",", "par2", ",", "par3", ",", "par4", ",", "0", ")", ";", "}", "else", "{", "EntityItem", "entityitem", "=", "new", "EntityItem", "(", "par1World", ",", "d", ",", "d1", "-", "0.29999999999999999D", ",", "d2", ",", "itemstack", ")", ";", "double", "d3", "=", "par5Random", ".", "nextDouble", "(", ")", "*", "0.10000000000000001D", "+", "0.20000000000000001D", ";", "entityitem", ".", "motionX", "=", "(", "double", ")", "j", "*", "d3", ";", "entityitem", ".", "motionY", "=", "0.20000000298023224D", ";", "entityitem", ".", "motionZ", "=", "(", "double", ")", "k", "*", "d3", ";", "entityitem", ".", "motionX", "+=", "par5Random", ".", "nextGaussian", "(", ")", "*", "0.0074999998323619366D", "*", "6D", ";", "entityitem", ".", "motionY", "+=", "par5Random", ".", "nextGaussian", "(", ")", "*", "0.0074999998323619366D", "*", "6D", ";", "entityitem", ".", "motionZ", "+=", "par5Random", ".", "nextGaussian", "(", ")", "*", "0.0074999998323619366D", "*", "6D", ";", "par1World", ".", "spawnEntityInWorld", "(", "entityitem", ")", ";", "par1World", ".", "playAuxSFX", "(", "1000", ",", "par2", ",", "par3", ",", "par4", ",", "0", ")", ";", "}", "par1World", ".", "playAuxSFX", "(", "2000", ",", "par2", ",", "par3", ",", "par4", ",", "j", "+", "1", "+", "(", "k", "+", "1", ")", "*", "3", ")", ";", "}", "}", "}", "public", "void", "onNeighborBlockChange", "(", "World", "par1World", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "int", "par5", ")", "{", "if", "(", "par5", ">", "0", "&&", "Block", ".", "blocksList", "[", "par5", "]", ".", "canProvidePower", "(", ")", ")", "{", "boolean", "flag", "=", "par1World", ".", "isBlockIndirectlyGettingPowered", "(", "par2", ",", "par3", ",", "par4", ")", "||", "par1World", ".", "isBlockIndirectlyGettingPowered", "(", "par2", ",", "par3", "+", "1", ",", "par4", ")", ";", "if", "(", "flag", ")", "{", "par1World", ".", "scheduleBlockUpdate", "(", "par2", ",", "par3", ",", "par4", ",", "blockID", ",", "tickRate", "(", ")", ")", ";", "}", "}", "}", "public", "void", "updateTick", "(", "World", "par1World", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "Random", "par5Random", ")", "{", "if", "(", "!", "par1World", ".", "isRemote", "&&", "(", "par1World", ".", "isBlockIndirectlyGettingPowered", "(", "par2", ",", "par3", ",", "par4", ")", "||", "par1World", ".", "isBlockIndirectlyGettingPowered", "(", "par2", ",", "par3", "+", "1", ",", "par4", ")", ")", ")", "{", "dispenseItem", "(", "par1World", ",", "par2", ",", "par3", ",", "par4", ",", "par5Random", ")", ";", "}", "}", "public", "TileEntity", "getBlockEntity", "(", ")", "{", "return", "new", "TileEntityDispenser", "(", ")", ";", "}", "public", "void", "onBlockPlacedBy", "(", "World", "par1World", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "EntityLiving", "par5EntityLiving", ")", "{", "int", "i", "=", "MathHelper", ".", "floor_double", "(", "(", "double", ")", "(", "(", "par5EntityLiving", ".", "rotationYaw", "*", "4F", ")", "/", "360F", ")", "+", "0.5D", ")", "&", "3", ";", "if", "(", "i", "==", "0", ")", "{", "par1World", ".", "setBlockMetadataWithNotify", "(", "par2", ",", "par3", ",", "par4", ",", "2", ")", ";", "}", "if", "(", "i", "==", "1", ")", "{", "par1World", ".", "setBlockMetadataWithNotify", "(", "par2", ",", "par3", ",", "par4", ",", "5", ")", ";", "}", "if", "(", "i", "==", "2", ")", "{", "par1World", ".", "setBlockMetadataWithNotify", "(", "par2", ",", "par3", ",", "par4", ",", "3", ")", ";", "}", "if", "(", "i", "==", "3", ")", "{", "par1World", ".", "setBlockMetadataWithNotify", "(", "par2", ",", "par3", ",", "par4", ",", "4", ")", ";", "}", "}", "public", "void", "onBlockRemoval", "(", "World", "par1World", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ")", "{", "TileEntityDispenser", "tileentitydispenser", "=", "(", "TileEntityDispenser", ")", "par1World", ".", "getBlockTileEntity", "(", "par2", ",", "par3", ",", "par4", ")", ";", "if", "(", "tileentitydispenser", "!=", "null", ")", "{", "label0", ":", "for", "(", "int", "i", "=", "0", ";", "i", "<", "tileentitydispenser", ".", "getSizeInventory", "(", ")", ";", "i", "++", ")", "{", "ItemStack", "itemstack", "=", "tileentitydispenser", ".", "getStackInSlot", "(", "i", ")", ";", "if", "(", "itemstack", "==", "null", ")", "{", "continue", ";", "}", "float", "f", "=", "random", ".", "nextFloat", "(", ")", "*", "0.8F", "+", "0.1F", ";", "float", "f1", "=", "random", ".", "nextFloat", "(", ")", "*", "0.8F", "+", "0.1F", ";", "float", "f2", "=", "random", ".", "nextFloat", "(", ")", "*", "0.8F", "+", "0.1F", ";", "do", "{", "if", "(", "itemstack", ".", "stackSize", "<=", "0", ")", "{", "continue", "label0", ";", "}", "int", "j", "=", "random", ".", "nextInt", "(", "21", ")", "+", "10", ";", "if", "(", "j", ">", "itemstack", ".", "stackSize", ")", "{", "j", "=", "itemstack", ".", "stackSize", ";", "}", "itemstack", ".", "stackSize", "-=", "j", ";", "EntityItem", "entityitem", "=", "new", "EntityItem", "(", "par1World", ",", "(", "float", ")", "par2", "+", "f", ",", "(", "float", ")", "par3", "+", "f1", ",", "(", "float", ")", "par4", "+", "f2", ",", "new", "ItemStack", "(", "itemstack", ".", "itemID", ",", "j", ",", "itemstack", ".", "getItemDamage", "(", ")", ")", ")", ";", "if", "(", "itemstack", ".", "hasTagCompound", "(", ")", ")", "{", "entityitem", ".", "item", ".", "setTagCompound", "(", "(", "NBTTagCompound", ")", "itemstack", ".", "getTagCompound", "(", ")", ".", "copy", "(", ")", ")", ";", "}", "float", "f3", "=", "0.05F", ";", "entityitem", ".", "motionX", "=", "(", "float", ")", "random", ".", "nextGaussian", "(", ")", "*", "f3", ";", "entityitem", ".", "motionY", "=", "(", "float", ")", "random", ".", "nextGaussian", "(", ")", "*", "f3", "+", "0.2F", ";", "entityitem", ".", "motionZ", "=", "(", "float", ")", "random", ".", "nextGaussian", "(", ")", "*", "f3", ";", "par1World", ".", "spawnEntityInWorld", "(", "entityitem", ")", ";", "}", "while", "(", "true", ")", ";", "}", "}", "super", ".", "onBlockRemoval", "(", "par1World", ",", "par2", ",", "par3", ",", "par4", ")", ";", "}", "}", "</s>" ]
9,726
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "public", "class", "ItemRecord", "extends", "Item", "{", "public", "final", "String", "recordName", ";", "protected", "ItemRecord", "(", "int", "par1", ",", "String", "par2Str", ")", "{", "super", "(", "par1", ")", ";", "recordName", "=", "par2Str", ";", "maxStackSize", "=", "1", ";", "}", "public", "boolean", "onItemUse", "(", "ItemStack", "par1ItemStack", ",", "EntityPlayer", "par2EntityPlayer", ",", "World", "par3World", ",", "int", "par4", ",", "int", "par5", ",", "int", "par6", ",", "int", "par7", ")", "{", "if", "(", "par3World", ".", "getBlockId", "(", "par4", ",", "par5", ",", "par6", ")", "==", "Block", ".", "jukebox", ".", "blockID", "&&", "par3World", ".", "getBlockMetadata", "(", "par4", ",", "par5", ",", "par6", ")", "==", "0", ")", "{", "if", "(", "par3World", ".", "isRemote", ")", "{", "return", "true", ";", "}", "else", "{", "(", "(", "BlockJukeBox", ")", "Block", ".", "jukebox", ")", ".", "insertRecord", "(", "par3World", ",", "par4", ",", "par5", ",", "par6", ",", "shiftedIndex", ")", ";", "par3World", ".", "playAuxSFXAtEntity", "(", "null", ",", "1005", ",", "par4", ",", "par5", ",", "par6", ",", "shiftedIndex", ")", ";", "par1ItemStack", ".", "stackSize", "--", ";", "return", "true", ";", "}", "}", "else", "{", "return", "false", ";", "}", "}", "}", "</s>" ]
9,727
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "io", ".", "IOException", ";", "import", "java", ".", "net", ".", "*", ";", "import", "java", ".", "util", ".", "HashMap", ";", "import", "net", ".", "minecraft", ".", "server", ".", "MinecraftServer", ";", "class", "NetworkAcceptThread", "extends", "Thread", "{", "final", "MinecraftServer", "mcServer", ";", "final", "NetworkListenThread", "netWorkListener", ";", "NetworkAcceptThread", "(", "NetworkListenThread", "par1NetworkListenThread", ",", "String", "par2Str", ",", "MinecraftServer", "par3MinecraftServer", ")", "{", "super", "(", "par2Str", ")", ";", "netWorkListener", "=", "par1NetworkListenThread", ";", "mcServer", "=", "par3MinecraftServer", ";", "}", "public", "void", "run", "(", ")", "{", "do", "{", "if", "(", "!", "netWorkListener", ".", "isListening", ")", "{", "break", ";", "}", "try", "{", "Socket", "socket", "=", "NetworkListenThread", ".", "getServerSocket", "(", "netWorkListener", ")", ".", "accept", "(", ")", ";", "if", "(", "socket", "==", "null", ")", "{", "continue", ";", "}", "synchronized", "(", "NetworkListenThread", ".", "func_35504_b", "(", "netWorkListener", ")", ")", "{", "InetAddress", "inetaddress", "=", "socket", ".", "getInetAddress", "(", ")", ";", "if", "(", "NetworkListenThread", ".", "func_35504_b", "(", "netWorkListener", ")", ".", "containsKey", "(", "inetaddress", ")", "&&", "!", "\"127.0.0.1\"", ".", "equals", "(", "inetaddress", ".", "getHostAddress", "(", ")", ")", "&&", "System", ".", "currentTimeMillis", "(", ")", "-", "(", "(", "Long", ")", "NetworkListenThread", ".", "func_35504_b", "(", "netWorkListener", ")", ".", "get", "(", "inetaddress", ")", ")", ".", "longValue", "(", ")", "<", "4000L", ")", "{", "NetworkListenThread", ".", "func_35504_b", "(", "netWorkListener", ")", ".", "put", "(", "inetaddress", ",", "Long", ".", "valueOf", "(", "System", ".", "currentTimeMillis", "(", ")", ")", ")", ";", "socket", ".", "close", "(", ")", ";", "continue", ";", "}", "NetworkListenThread", ".", "func_35504_b", "(", "netWorkListener", ")", ".", "put", "(", "inetaddress", ",", "Long", ".", "valueOf", "(", "System", ".", "currentTimeMillis", "(", ")", ")", ")", ";", "}", "NetLoginHandler", "netloginhandler", "=", "new", "NetLoginHandler", "(", "mcServer", ",", "socket", ",", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "\"Connection", "#\"", ")", ".", "append", "(", "NetworkListenThread", ".", "func_712_b", "(", "netWorkListener", ")", ")", ".", "toString", "(", ")", ")", ";", "NetworkListenThread", ".", "func_716_a", "(", "netWorkListener", ",", "netloginhandler", ")", ";", "}", "catch", "(", "IOException", "ioexception", ")", "{", "ioexception", ".", "printStackTrace", "(", ")", ";", "}", "}", "while", "(", "true", ")", ";", "}", "}", "</s>" ]
9,728
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "List", ";", "import", "java", ".", "util", ".", "Random", ";", "public", "class", "ComponentMineshaftStairs", "extends", "StructureComponent", "{", "public", "ComponentMineshaftStairs", "(", "int", "par1", ",", "Random", "par2Random", ",", "StructureBoundingBox", "par3StructureBoundingBox", ",", "int", "par4", ")", "{", "super", "(", "par1", ")", ";", "coordBaseMode", "=", "par4", ";", "boundingBox", "=", "par3StructureBoundingBox", ";", "}", "public", "static", "StructureBoundingBox", "findValidPlacement", "(", "List", "par0List", ",", "Random", "par1Random", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "int", "par5", ")", "{", "StructureBoundingBox", "structureboundingbox", "=", "new", "StructureBoundingBox", "(", "par2", ",", "par3", "-", "5", ",", "par4", ",", "par2", ",", "par3", "+", "2", ",", "par4", ")", ";", "switch", "(", "par5", ")", "{", "case", "2", ":", "structureboundingbox", ".", "maxX", "=", "par2", "+", "2", ";", "structureboundingbox", ".", "minZ", "=", "par4", "-", "8", ";", "break", ";", "case", "0", ":", "structureboundingbox", ".", "maxX", "=", "par2", "+", "2", ";", "structureboundingbox", ".", "maxZ", "=", "par4", "+", "8", ";", "break", ";", "case", "1", ":", "structureboundingbox", ".", "minX", "=", "par2", "-", "8", ";", "structureboundingbox", ".", "maxZ", "=", "par4", "+", "2", ";", "break", ";", "case", "3", ":", "structureboundingbox", ".", "maxX", "=", "par2", "+", "8", ";", "structureboundingbox", ".", "maxZ", "=", "par4", "+", "2", ";", "break", ";", "}", "if", "(", "StructureComponent", ".", "findIntersecting", "(", "par0List", ",", "structureboundingbox", ")", "!=", "null", ")", "{", "return", "null", ";", "}", "else", "{", "return", "structureboundingbox", ";", "}", "}", "public", "void", "buildComponent", "(", "StructureComponent", "par1StructureComponent", ",", "List", "par2List", ",", "Random", "par3Random", ")", "{", "int", "i", "=", "getComponentType", "(", ")", ";", "switch", "(", "coordBaseMode", ")", "{", "case", "2", ":", "StructureMineshaftPieces", ".", "getNextComponent", "(", "par1StructureComponent", ",", "par2List", ",", "par3Random", ",", "boundingBox", ".", "minX", ",", "boundingBox", ".", "minY", ",", "boundingBox", ".", "minZ", "-", "1", ",", "2", ",", "i", ")", ";", "break", ";", "case", "0", ":", "StructureMineshaftPieces", ".", "getNextComponent", "(", "par1StructureComponent", ",", "par2List", ",", "par3Random", ",", "boundingBox", ".", "minX", ",", "boundingBox", ".", "minY", ",", "boundingBox", ".", "maxZ", "+", "1", ",", "0", ",", "i", ")", ";", "break", ";", "case", "1", ":", "StructureMineshaftPieces", ".", "getNextComponent", "(", "par1StructureComponent", ",", "par2List", ",", "par3Random", ",", "boundingBox", ".", "minX", "-", "1", ",", "boundingBox", ".", "minY", ",", "boundingBox", ".", "minZ", ",", "1", ",", "i", ")", ";", "break", ";", "case", "3", ":", "StructureMineshaftPieces", ".", "getNextComponent", "(", "par1StructureComponent", ",", "par2List", ",", "par3Random", ",", "boundingBox", ".", "maxX", "+", "1", ",", "boundingBox", ".", "minY", ",", "boundingBox", ".", "minZ", ",", "3", ",", "i", ")", ";", "break", ";", "}", "}", "public", "boolean", "addComponentParts", "(", "World", "par1World", ",", "Random", "par2Random", ",", "StructureBoundingBox", "par3StructureBoundingBox", ")", "{", "if", "(", "isLiquidInStructureBoundingBox", "(", "par1World", ",", "par3StructureBoundingBox", ")", ")", "{", "return", "false", ";", "}", "fillWithBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "0", ",", "5", ",", "0", ",", "2", ",", "7", ",", "1", ",", "0", ",", "0", ",", "false", ")", ";", "fillWithBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "0", ",", "0", ",", "7", ",", "2", ",", "2", ",", "8", ",", "0", ",", "0", ",", "false", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "5", ";", "i", "++", ")", "{", "fillWithBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "0", ",", "5", "-", "i", "-", "(", "i", ">=", "4", "?", "0", ":", "1", ")", ",", "2", "+", "i", ",", "2", ",", "7", "-", "i", ",", "2", "+", "i", ",", "0", ",", "0", ",", "false", ")", ";", "}", "return", "true", ";", "}", "}", "</s>" ]
9,729
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "*", ";", "public", "class", "MapGenNetherBridge", "extends", "MapGenStructure", "{", "private", "List", "spawnList", ";", "public", "MapGenNetherBridge", "(", ")", "{", "spawnList", "=", "new", "ArrayList", "(", ")", ";", "spawnList", ".", "add", "(", "new", "SpawnListEntry", "(", "net", ".", "minecraft", ".", "src", ".", "EntityBlaze", ".", "class", ",", "10", ",", "2", ",", "3", ")", ")", ";", "spawnList", ".", "add", "(", "new", "SpawnListEntry", "(", "net", ".", "minecraft", ".", "src", ".", "EntityPigZombie", ".", "class", ",", "10", ",", "4", ",", "4", ")", ")", ";", "spawnList", ".", "add", "(", "new", "SpawnListEntry", "(", "net", ".", "minecraft", ".", "src", ".", "EntityMagmaCube", ".", "class", ",", "3", ",", "4", ",", "4", ")", ")", ";", "}", "public", "List", "getSpawnList", "(", ")", "{", "return", "spawnList", ";", "}", "protected", "boolean", "canSpawnStructureAtCoords", "(", "int", "par1", ",", "int", "par2", ")", "{", "int", "i", "=", "par1", ">>", "4", ";", "int", "j", "=", "par2", ">>", "4", ";", "rand", ".", "setSeed", "(", "(", "long", ")", "(", "i", "^", "j", "<<", "4", ")", "^", "worldObj", ".", "getSeed", "(", ")", ")", ";", "rand", ".", "nextInt", "(", ")", ";", "if", "(", "rand", ".", "nextInt", "(", "3", ")", "!=", "0", ")", "{", "return", "false", ";", "}", "if", "(", "par1", "!=", "(", "i", "<<", "4", ")", "+", "4", "+", "rand", ".", "nextInt", "(", "8", ")", ")", "{", "return", "false", ";", "}", "return", "par2", "==", "(", "j", "<<", "4", ")", "+", "4", "+", "rand", ".", "nextInt", "(", "8", ")", ";", "}", "protected", "StructureStart", "getStructureStart", "(", "int", "par1", ",", "int", "par2", ")", "{", "return", "new", "StructureNetherBridgeStart", "(", "worldObj", ",", "rand", ",", "par1", ",", "par2", ")", ";", "}", "}", "</s>" ]
9,730
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "List", ";", "import", "java", ".", "util", ".", "Random", ";", "public", "class", "ComponentStrongholdLibrary", "extends", "ComponentStronghold", "{", "private", "static", "final", "StructurePieceTreasure", "field_35335_b", "[", "]", ";", "protected", "final", "EnumDoor", "doorType", ";", "private", "final", "boolean", "isLargeRoom", ";", "public", "ComponentStrongholdLibrary", "(", "int", "par1", ",", "Random", "par2Random", ",", "StructureBoundingBox", "par3StructureBoundingBox", ",", "int", "par4", ")", "{", "super", "(", "par1", ")", ";", "coordBaseMode", "=", "par4", ";", "doorType", "=", "getRandomDoor", "(", "par2Random", ")", ";", "boundingBox", "=", "par3StructureBoundingBox", ";", "isLargeRoom", "=", "par3StructureBoundingBox", ".", "getYSize", "(", ")", ">", "6", ";", "}", "public", "void", "buildComponent", "(", "StructureComponent", "structurecomponent", ",", "List", "list", ",", "Random", "random", ")", "{", "}", "public", "static", "ComponentStrongholdLibrary", "findValidPlacement", "(", "List", "par0List", ",", "Random", "par1Random", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "int", "par5", ",", "int", "par6", ")", "{", "StructureBoundingBox", "structureboundingbox", "=", "StructureBoundingBox", ".", "getComponentToAddBoundingBox", "(", "par2", ",", "par3", ",", "par4", ",", "-", "4", ",", "-", "1", ",", "0", ",", "14", ",", "11", ",", "15", ",", "par5", ")", ";", "if", "(", "!", "canStrongholdGoDeeper", "(", "structureboundingbox", ")", "||", "StructureComponent", ".", "findIntersecting", "(", "par0List", ",", "structureboundingbox", ")", "!=", "null", ")", "{", "structureboundingbox", "=", "StructureBoundingBox", ".", "getComponentToAddBoundingBox", "(", "par2", ",", "par3", ",", "par4", ",", "-", "4", ",", "-", "1", ",", "0", ",", "14", ",", "6", ",", "15", ",", "par5", ")", ";", "if", "(", "!", "canStrongholdGoDeeper", "(", "structureboundingbox", ")", "||", "StructureComponent", ".", "findIntersecting", "(", "par0List", ",", "structureboundingbox", ")", "!=", "null", ")", "{", "return", "null", ";", "}", "}", "return", "new", "ComponentStrongholdLibrary", "(", "par6", ",", "par1Random", ",", "structureboundingbox", ",", "par5", ")", ";", "}", "public", "boolean", "addComponentParts", "(", "World", "par1World", ",", "Random", "par2Random", ",", "StructureBoundingBox", "par3StructureBoundingBox", ")", "{", "if", "(", "isLiquidInStructureBoundingBox", "(", "par1World", ",", "par3StructureBoundingBox", ")", ")", "{", "return", "false", ";", "}", "byte", "byte0", "=", "11", ";", "if", "(", "!", "isLargeRoom", ")", "{", "byte0", "=", "6", ";", "}", "fillWithRandomizedBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "0", ",", "0", ",", "0", ",", "13", ",", "byte0", "-", "1", ",", "14", ",", "true", ",", "par2Random", ",", "StructureStrongholdPieces", ".", "getStrongholdStones", "(", ")", ")", ";", "placeDoor", "(", "par1World", ",", "par2Random", ",", "par3StructureBoundingBox", ",", "doorType", ",", "4", ",", "1", ",", "0", ")", ";", "randomlyFillWithBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "par2Random", ",", "0.07F", ",", "2", ",", "1", ",", "1", ",", "11", ",", "4", ",", "13", ",", "Block", ".", "web", ".", "blockID", ",", "Block", ".", "web", ".", "blockID", ",", "false", ")", ";", "for", "(", "int", "i", "=", "1", ";", "i", "<=", "13", ";", "i", "++", ")", "{", "if", "(", "(", "i", "-", "1", ")", "%", "4", "==", "0", ")", "{", "fillWithBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "1", ",", "1", ",", "i", ",", "1", ",", "4", ",", "i", ",", "Block", ".", "planks", ".", "blockID", ",", "Block", ".", "planks", ".", "blockID", ",", "false", ")", ";", "fillWithBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "12", ",", "1", ",", "i", ",", "12", ",", "4", ",", "i", ",", "Block", ".", "planks", ".", "blockID", ",", "Block", ".", "planks", ".", "blockID", ",", "false", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "torchWood", ".", "blockID", ",", "0", ",", "2", ",", "3", ",", "i", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "torchWood", ".", "blockID", ",", "0", ",", "11", ",", "3", ",", "i", ",", "par3StructureBoundingBox", ")", ";", "if", "(", "isLargeRoom", ")", "{", "fillWithBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "1", ",", "6", ",", "i", ",", "1", ",", "9", ",", "i", ",", "Block", ".", "planks", ".", "blockID", ",", "Block", ".", "planks", ".", "blockID", ",", "false", ")", ";", "fillWithBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "12", ",", "6", ",", "i", ",", "12", ",", "9", ",", "i", ",", "Block", ".", "planks", ".", "blockID", ",", "Block", ".", "planks", ".", "blockID", ",", "false", ")", ";", "}", "continue", ";", "}", "fillWithBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "1", ",", "1", ",", "i", ",", "1", ",", "4", ",", "i", ",", "Block", ".", "bookShelf", ".", "blockID", ",", "Block", ".", "bookShelf", ".", "blockID", ",", "false", ")", ";", "fillWithBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "12", ",", "1", ",", "i", ",", "12", ",", "4", ",", "i", ",", "Block", ".", "bookShelf", ".", "blockID", ",", "Block", ".", "bookShelf", ".", "blockID", ",", "false", ")", ";", "if", "(", "isLargeRoom", ")", "{", "fillWithBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "1", ",", "6", ",", "i", ",", "1", ",", "9", ",", "i", ",", "Block", ".", "bookShelf", ".", "blockID", ",", "Block", ".", "bookShelf", ".", "blockID", ",", "false", ")", ";", "fillWithBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "12", ",", "6", ",", "i", ",", "12", ",", "9", ",", "i", ",", "Block", ".", "bookShelf", ".", "blockID", ",", "Block", ".", "bookShelf", ".", "blockID", ",", "false", ")", ";", "}", "}", "for", "(", "int", "j", "=", "3", ";", "j", "<", "12", ";", "j", "+=", "2", ")", "{", "fillWithBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "3", ",", "1", ",", "j", ",", "4", ",", "3", ",", "j", ",", "Block", ".", "bookShelf", ".", "blockID", ",", "Block", ".", "bookShelf", ".", "blockID", ",", "false", ")", ";", "fillWithBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "6", ",", "1", ",", "j", ",", "7", ",", "3", ",", "j", ",", "Block", ".", "bookShelf", ".", "blockID", ",", "Block", ".", "bookShelf", ".", "blockID", ",", "false", ")", ";", "fillWithBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "9", ",", "1", ",", "j", ",", "10", ",", "3", ",", "j", ",", "Block", ".", "bookShelf", ".", "blockID", ",", "Block", ".", "bookShelf", ".", "blockID", ",", "false", ")", ";", "}", "if", "(", "isLargeRoom", ")", "{", "fillWithBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "1", ",", "5", ",", "1", ",", "3", ",", "5", ",", "13", ",", "Block", ".", "planks", ".", "blockID", ",", "Block", ".", "planks", ".", "blockID", ",", "false", ")", ";", "fillWithBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "10", ",", "5", ",", "1", ",", "12", ",", "5", ",", "13", ",", "Block", ".", "planks", ".", "blockID", ",", "Block", ".", "planks", ".", "blockID", ",", "false", ")", ";", "fillWithBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "4", ",", "5", ",", "1", ",", "9", ",", "5", ",", "2", ",", "Block", ".", "planks", ".", "blockID", ",", "Block", ".", "planks", ".", "blockID", ",", "false", ")", ";", "fillWithBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "4", ",", "5", ",", "12", ",", "9", ",", "5", ",", "13", ",", "Block", ".", "planks", ".", "blockID", ",", "Block", ".", "planks", ".", "blockID", ",", "false", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "planks", ".", "blockID", ",", "0", ",", "9", ",", "5", ",", "11", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "planks", ".", "blockID", ",", "0", ",", "8", ",", "5", ",", "11", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "planks", ".", "blockID", ",", "0", ",", "9", ",", "5", ",", "10", ",", "par3StructureBoundingBox", ")", ";", "fillWithBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "3", ",", "6", ",", "2", ",", "3", ",", "6", ",", "12", ",", "Block", ".", "fence", ".", "blockID", ",", "Block", ".", "fence", ".", "blockID", ",", "false", ")", ";", "fillWithBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "10", ",", "6", ",", "2", ",", "10", ",", "6", ",", "10", ",", "Block", ".", "fence", ".", "blockID", ",", "Block", ".", "fence", ".", "blockID", ",", "false", ")", ";", "fillWithBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "4", ",", "6", ",", "2", ",", "9", ",", "6", ",", "2", ",", "Block", ".", "fence", ".", "blockID", ",", "Block", ".", "fence", ".", "blockID", ",", "false", ")", ";", "fillWithBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "4", ",", "6", ",", "12", ",", "8", ",", "6", ",", "12", ",", "Block", ".", "fence", ".", "blockID", ",", "Block", ".", "fence", ".", "blockID", ",", "false", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "fence", ".", "blockID", ",", "0", ",", "9", ",", "6", ",", "11", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "fence", ".", "blockID", ",", "0", ",", "8", ",", "6", ",", "11", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "fence", ".", "blockID", ",", "0", ",", "9", ",", "6", ",", "10", ",", "par3StructureBoundingBox", ")", ";", "int", "k", "=", "getMetadataWithOffset", "(", "Block", ".", "ladder", ".", "blockID", ",", "3", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "ladder", ".", "blockID", ",", "k", ",", "10", ",", "1", ",", "13", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "ladder", ".", "blockID", ",", "k", ",", "10", ",", "2", ",", "13", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "ladder", ".", "blockID", ",", "k", ",", "10", ",", "3", ",", "13", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "ladder", ".", "blockID", ",", "k", ",", "10", ",", "4", ",", "13", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "ladder", ".", "blockID", ",", "k", ",", "10", ",", "5", ",", "13", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "ladder", ".", "blockID", ",", "k", ",", "10", ",", "6", ",", "13", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "ladder", ".", "blockID", ",", "k", ",", "10", ",", "7", ",", "13", ",", "par3StructureBoundingBox", ")", ";", "byte", "byte1", "=", "7", ";", "byte", "byte2", "=", "7", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "fence", ".", "blockID", ",", "0", ",", "byte1", "-", "1", ",", "9", ",", "byte2", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "fence", ".", "blockID", ",", "0", ",", "byte1", ",", "9", ",", "byte2", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "fence", ".", "blockID", ",", "0", ",", "byte1", "-", "1", ",", "8", ",", "byte2", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "fence", ".", "blockID", ",", "0", ",", "byte1", ",", "8", ",", "byte2", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "fence", ".", "blockID", ",", "0", ",", "byte1", "-", "1", ",", "7", ",", "byte2", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "fence", ".", "blockID", ",", "0", ",", "byte1", ",", "7", ",", "byte2", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "fence", ".", "blockID", ",", "0", ",", "byte1", "-", "2", ",", "7", ",", "byte2", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "fence", ".", "blockID", ",", "0", ",", "byte1", "+", "1", ",", "7", ",", "byte2", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "fence", ".", "blockID", ",", "0", ",", "byte1", "-", "1", ",", "7", ",", "byte2", "-", "1", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "fence", ".", "blockID", ",", "0", ",", "byte1", "-", "1", ",", "7", ",", "byte2", "+", "1", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "fence", ".", "blockID", ",", "0", ",", "byte1", ",", "7", ",", "byte2", "-", "1", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "fence", ".", "blockID", ",", "0", ",", "byte1", ",", "7", ",", "byte2", "+", "1", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "torchWood", ".", "blockID", ",", "0", ",", "byte1", "-", "2", ",", "8", ",", "byte2", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "torchWood", ".", "blockID", ",", "0", ",", "byte1", "+", "1", ",", "8", ",", "byte2", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "torchWood", ".", "blockID", ",", "0", ",", "byte1", "-", "1", ",", "8", ",", "byte2", "-", "1", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "torchWood", ".", "blockID", ",", "0", ",", "byte1", "-", "1", ",", "8", ",", "byte2", "+", "1", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "torchWood", ".", "blockID", ",", "0", ",", "byte1", ",", "8", ",", "byte2", "-", "1", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "torchWood", ".", "blockID", ",", "0", ",", "byte1", ",", "8", ",", "byte2", "+", "1", ",", "par3StructureBoundingBox", ")", ";", "}", "createTreasureChestAtCurrentPosition", "(", "par1World", ",", "par3StructureBoundingBox", ",", "par2Random", ",", "3", ",", "3", ",", "5", ",", "field_35335_b", ",", "1", "+", "par2Random", ".", "nextInt", "(", "4", ")", ")", ";", "if", "(", "isLargeRoom", ")", "{", "placeBlockAtCurrentPosition", "(", "par1World", ",", "0", ",", "0", ",", "12", ",", "9", ",", "1", ",", "par3StructureBoundingBox", ")", ";", "createTreasureChestAtCurrentPosition", "(", "par1World", ",", "par3StructureBoundingBox", ",", "par2Random", ",", "12", ",", "8", ",", "1", ",", "field_35335_b", ",", "1", "+", "par2Random", ".", "nextInt", "(", "4", ")", ")", ";", "}", "return", "true", ";", "}", "static", "{", "field_35335_b", "=", "(", "new", "StructurePieceTreasure", "[", "]", "{", "new", "StructurePieceTreasure", "(", "Item", ".", "book", ".", "shiftedIndex", ",", "0", ",", "1", ",", "3", ",", "20", ")", ",", "new", "StructurePieceTreasure", "(", "Item", ".", "paper", ".", "shiftedIndex", ",", "0", ",", "2", ",", "7", ",", "20", ")", ",", "new", "StructurePieceTreasure", "(", "Item", ".", "map", ".", "shiftedIndex", ",", "0", ",", "1", ",", "1", ",", "1", ")", ",", "new", "StructurePieceTreasure", "(", "Item", ".", "compass", ".", "shiftedIndex", ",", "0", ",", "1", ",", "1", ",", "1", ")", "}", ")", ";", "}", "}", "</s>" ]
9,731
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "public", "class", "Slot", "{", "private", "final", "int", "slotIndex", ";", "public", "final", "IInventory", "inventory", ";", "public", "int", "slotNumber", ";", "public", "int", "xDisplayPosition", ";", "public", "int", "yDisplayPosition", ";", "public", "Slot", "(", "IInventory", "par1IInventory", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ")", "{", "inventory", "=", "par1IInventory", ";", "slotIndex", "=", "par2", ";", "xDisplayPosition", "=", "par3", ";", "yDisplayPosition", "=", "par4", ";", "}", "public", "void", "func_48417_a", "(", "ItemStack", "par1ItemStack", ",", "ItemStack", "par2ItemStack", ")", "{", "if", "(", "par1ItemStack", "==", "null", "||", "par2ItemStack", "==", "null", ")", "{", "return", ";", "}", "if", "(", "par1ItemStack", ".", "itemID", "!=", "par2ItemStack", ".", "itemID", ")", "{", "return", ";", "}", "int", "i", "=", "par2ItemStack", ".", "stackSize", "-", "par1ItemStack", ".", "stackSize", ";", "if", "(", "i", ">", "0", ")", "{", "func_48415_a", "(", "par1ItemStack", ",", "i", ")", ";", "}", "}", "protected", "void", "func_48415_a", "(", "ItemStack", "itemstack", ",", "int", "i", ")", "{", "}", "protected", "void", "func_48416_b", "(", "ItemStack", "itemstack", ")", "{", "}", "public", "void", "onPickupFromSlot", "(", "ItemStack", "par1ItemStack", ")", "{", "onSlotChanged", "(", ")", ";", "}", "public", "boolean", "isItemValid", "(", "ItemStack", "par1ItemStack", ")", "{", "return", "true", ";", "}", "public", "ItemStack", "getStack", "(", ")", "{", "return", "inventory", ".", "getStackInSlot", "(", "slotIndex", ")", ";", "}", "public", "boolean", "getHasStack", "(", ")", "{", "return", "getStack", "(", ")", "!=", "null", ";", "}", "public", "void", "putStack", "(", "ItemStack", "par1ItemStack", ")", "{", "inventory", ".", "setInventorySlotContents", "(", "slotIndex", ",", "par1ItemStack", ")", ";", "onSlotChanged", "(", ")", ";", "}", "public", "void", "onSlotChanged", "(", ")", "{", "inventory", ".", "onInventoryChanged", "(", ")", ";", "}", "public", "int", "getSlotStackLimit", "(", ")", "{", "return", "inventory", ".", "getInventoryStackLimit", "(", ")", ";", "}", "public", "ItemStack", "decrStackSize", "(", "int", "par1", ")", "{", "return", "inventory", ".", "decrStackSize", "(", "slotIndex", ",", "par1", ")", ";", "}", "public", "boolean", "isHere", "(", "IInventory", "par1IInventory", ",", "int", "par2", ")", "{", "return", "par1IInventory", "==", "inventory", "&&", "par2", "==", "slotIndex", ";", "}", "}", "</s>" ]
9,732
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "public", "class", "ItemRedstone", "extends", "Item", "{", "public", "ItemRedstone", "(", "int", "par1", ")", "{", "super", "(", "par1", ")", ";", "}", "public", "boolean", "onItemUse", "(", "ItemStack", "par1ItemStack", ",", "EntityPlayer", "par2EntityPlayer", ",", "World", "par3World", ",", "int", "par4", ",", "int", "par5", ",", "int", "par6", ",", "int", "par7", ")", "{", "if", "(", "par3World", ".", "getBlockId", "(", "par4", ",", "par5", ",", "par6", ")", "!=", "Block", ".", "snow", ".", "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", "(", "!", "par3World", ".", "isAirBlock", "(", "par4", ",", "par5", ",", "par6", ")", ")", "{", "return", "false", ";", "}", "}", "if", "(", "!", "par2EntityPlayer", ".", "canPlayerEdit", "(", "par4", ",", "par5", ",", "par6", ")", ")", "{", "return", "false", ";", "}", "if", "(", "Block", ".", "redstoneWire", ".", "canPlaceBlockAt", "(", "par3World", ",", "par4", ",", "par5", ",", "par6", ")", ")", "{", "par1ItemStack", ".", "stackSize", "--", ";", "par3World", ".", "setBlockWithNotify", "(", "par4", ",", "par5", ",", "par6", ",", "Block", ".", "redstoneWire", ".", "blockID", ")", ";", "}", "return", "true", ";", "}", "}", "</s>" ]
9,733
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "*", ";", "public", "class", "StatList", "{", "protected", "static", "Map", "oneShotStats", "=", "new", "HashMap", "(", ")", ";", "public", "static", "List", "allStats", "=", "new", "ArrayList", "(", ")", ";", "public", "static", "List", "generalStats", "=", "new", "ArrayList", "(", ")", ";", "public", "static", "List", "itemStats", "=", "new", "ArrayList", "(", ")", ";", "public", "static", "List", "objectMineStats", "=", "new", "ArrayList", "(", ")", ";", "public", "static", "StatBase", "startGameStat", "=", "(", "new", "StatBasic", "(", "1000", ",", "\"\"", ")", ")", ".", "initIndependentStat", "(", ")", ".", "registerStat", "(", ")", ";", "public", "static", "StatBase", "createWorldStat", "=", "(", "new", "StatBasic", "(", "1001", ",", "\"\"", ")", ")", ".", "initIndependentStat", "(", ")", ".", "registerStat", "(", ")", ";", "public", "static", "StatBase", "loadWorldStat", "=", "(", "new", "StatBasic", "(", "1002", ",", "\"\"", ")", ")", ".", "initIndependentStat", "(", ")", ".", "registerStat", "(", ")", ";", "public", "static", "StatBase", "joinMultiplayerStat", "=", "(", "new", "StatBasic", "(", "1003", ",", "\"\"", ")", ")", ".", "initIndependentStat", "(", ")", ".", "registerStat", "(", ")", ";", "public", "static", "StatBase", "leaveGameStat", "=", "(", "new", "StatBasic", "(", "1004", ",", "\"\"", ")", ")", ".", "initIndependentStat", "(", ")", ".", "registerStat", "(", ")", ";", "public", "static", "StatBase", "minutesPlayedStat", ";", "public", "static", "StatBase", "distanceWalkedStat", ";", "public", "static", "StatBase", "distanceSwumStat", ";", "public", "static", "StatBase", "distanceFallenStat", ";", "public", "static", "StatBase", "distanceClimbedStat", ";", "public", "static", "StatBase", "distanceFlownStat", ";", "public", "static", "StatBase", "distanceDoveStat", ";", "public", "static", "StatBase", "distanceByMinecartStat", ";", "public", "static", "StatBase", "distanceByBoatStat", ";", "public", "static", "StatBase", "distanceByPigStat", ";", "public", "static", "StatBase", "jumpStat", "=", "(", "new", "StatBasic", "(", "2010", ",", "\"stat.jump\"", ")", ")", ".", "initIndependentStat", "(", ")", ".", "registerStat", "(", ")", ";", "public", "static", "StatBase", "dropStat", "=", "(", "new", "StatBasic", "(", "2011", ",", "\"stat.drop\"", ")", ")", ".", "initIndependentStat", "(", ")", ".", "registerStat", "(", ")", ";", "public", "static", "StatBase", "damageDealtStat", "=", "(", "new", "StatBasic", "(", "2020", ",", "\"\"", ")", ")", ".", "registerStat", "(", ")", ";", "public", "static", "StatBase", "damageTakenStat", "=", "(", "new", "StatBasic", "(", "2021", ",", "\"\"", ")", ")", ".", "registerStat", "(", ")", ";", "public", "static", "StatBase", "deathsStat", "=", "(", "new", "StatBasic", "(", "2022", ",", "\"stat.deaths\"", ")", ")", ".", "registerStat", "(", ")", ";", "public", "static", "StatBase", "mobKillsStat", "=", "(", "new", "StatBasic", "(", "2023", ",", "\"\"", ")", ")", ".", "registerStat", "(", ")", ";", "public", "static", "StatBase", "playerKillsStat", "=", "(", "new", "StatBasic", "(", "2024", ",", "\"\"", ")", ")", ".", "registerStat", "(", ")", ";", "public", "static", "StatBase", "fishCaughtStat", "=", "(", "new", "StatBasic", "(", "2025", ",", "\"\"", ")", ")", ".", "registerStat", "(", ")", ";", "public", "static", "StatBase", "mineBlockStatArray", "[", "]", "=", "initMinableStats", "(", "\"\"", ",", "0x1000000", ")", ";", "public", "static", "StatBase", "objectCraftStats", "[", "]", ";", "public", "static", "StatBase", "objectUseStats", "[", "]", ";", "public", "static", "StatBase", "objectBreakStats", "[", "]", ";", "private", "static", "boolean", "blockStatsInitialized", "=", "false", ";", "private", "static", "boolean", "itemStatsInitialized", "=", "false", ";", "public", "StatList", "(", ")", "{", "}", "public", "static", "void", "func_27092_a", "(", ")", "{", "}", "public", "static", "void", "initBreakableStats", "(", ")", "{", "objectUseStats", "=", "initUsableStats", "(", "objectUseStats", ",", "\"stat.useItem\"", ",", "0x1020000", ",", "0", ",", "256", ")", ";", "objectBreakStats", "=", "initBreakStats", "(", "objectBreakStats", ",", "\"\"", ",", "0x1030000", ",", "0", ",", "256", ")", ";", "blockStatsInitialized", "=", "true", ";", "initCraftableStats", "(", ")", ";", "}", "public", "static", "void", "initStats", "(", ")", "{", "objectUseStats", "=", "initUsableStats", "(", "objectUseStats", ",", "\"stat.useItem\"", ",", "0x1020000", ",", "256", ",", "32000", ")", ";", "objectBreakStats", "=", "initBreakStats", "(", "objectBreakStats", ",", "\"\"", ",", "0x1030000", ",", "256", ",", "32000", ")", ";", "itemStatsInitialized", "=", "true", ";", "initCraftableStats", "(", ")", ";", "}", "public", "static", "void", "initCraftableStats", "(", ")", "{", "if", "(", "!", "blockStatsInitialized", "||", "!", "itemStatsInitialized", ")", "{", "return", ";", "}", "HashSet", "hashset", "=", "new", "HashSet", "(", ")", ";", "IRecipe", "irecipe", ";", "for", "(", "Iterator", "iterator", "=", "CraftingManager", ".", "getInstance", "(", ")", ".", "getRecipeList", "(", ")", ".", "iterator", "(", ")", ";", "iterator", ".", "hasNext", "(", ")", ";", "hashset", ".", "add", "(", "Integer", ".", "valueOf", "(", "irecipe", ".", "getRecipeOutput", "(", ")", ".", "itemID", ")", ")", ")", "{", "irecipe", "=", "(", "IRecipe", ")", "iterator", ".", "next", "(", ")", ";", "}", "ItemStack", "itemstack", ";", "for", "(", "Iterator", "iterator1", "=", "FurnaceRecipes", ".", "smelting", "(", ")", ".", "getSmeltingList", "(", ")", ".", "values", "(", ")", ".", "iterator", "(", ")", ";", "iterator1", ".", "hasNext", "(", ")", ";", "hashset", ".", "add", "(", "Integer", ".", "valueOf", "(", "itemstack", ".", "itemID", ")", ")", ")", "{", "itemstack", "=", "(", "ItemStack", ")", "iterator1", ".", "next", "(", ")", ";", "}", "objectCraftStats", "=", "new", "StatBase", "[", "32000", "]", ";", "Iterator", "iterator2", "=", "hashset", ".", "iterator", "(", ")", ";", "do", "{", "if", "(", "!", "iterator2", ".", "hasNext", "(", ")", ")", "{", "break", ";", "}", "Integer", "integer", "=", "(", "Integer", ")", "iterator2", ".", "next", "(", ")", ";", "if", "(", "Item", ".", "itemsList", "[", "integer", ".", "intValue", "(", ")", "]", "!=", "null", ")", "{", "String", "s", "=", "StatCollector", ".", "translateToLocalFormatted", "(", "\"\"", ",", "new", "Object", "[", "]", "{", "Item", ".", "itemsList", "[", "integer", ".", "intValue", "(", ")", "]", ".", "getStatName", "(", ")", "}", ")", ";", "objectCraftStats", "[", "integer", ".", "intValue", "(", ")", "]", "=", "(", "new", "StatCrafting", "(", "0x1010000", "+", "integer", ".", "intValue", "(", ")", ",", "s", ",", "integer", ".", "intValue", "(", ")", ")", ")", ".", "registerStat", "(", ")", ";", "}", "}", "while", "(", "true", ")", ";", "replaceAllSimilarBlocks", "(", "objectCraftStats", ")", ";", "}", "private", "static", "StatBase", "[", "]", "initMinableStats", "(", "String", "par0Str", ",", "int", "par1", ")", "{", "StatBase", "astatbase", "[", "]", "=", "new", "StatBase", "[", "256", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "256", ";", "i", "++", ")", "{", "if", "(", "Block", ".", "blocksList", "[", "i", "]", "!=", "null", "&&", "Block", ".", "blocksList", "[", "i", "]", ".", "getEnableStats", "(", ")", ")", "{", "String", "s", "=", "StatCollector", ".", "translateToLocalFormatted", "(", "par0Str", ",", "new", "Object", "[", "]", "{", "Block", ".", "blocksList", "[", "i", "]", ".", "translateBlockName", "(", ")", "}", ")", ";", "astatbase", "[", "i", "]", "=", "(", "new", "StatCrafting", "(", "par1", "+", "i", ",", "s", ",", "i", ")", ")", ".", "registerStat", "(", ")", ";", "objectMineStats", ".", "add", "(", "(", "StatCrafting", ")", "astatbase", "[", "i", "]", ")", ";", "}", "}", "replaceAllSimilarBlocks", "(", "astatbase", ")", ";", "return", "astatbase", ";", "}", "private", "static", "StatBase", "[", "]", "initUsableStats", "(", "StatBase", "par0ArrayOfStatBase", "[", "]", ",", "String", "par1Str", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ")", "{", "if", "(", "par0ArrayOfStatBase", "==", "null", ")", "{", "par0ArrayOfStatBase", "=", "new", "StatBase", "[", "32000", "]", ";", "}", "for", "(", "int", "i", "=", "par3", ";", "i", "<", "par4", ";", "i", "++", ")", "{", "if", "(", "Item", ".", "itemsList", "[", "i", "]", "==", "null", ")", "{", "continue", ";", "}", "String", "s", "=", "StatCollector", ".", "translateToLocalFormatted", "(", "par1Str", ",", "new", "Object", "[", "]", "{", "Item", ".", "itemsList", "[", "i", "]", ".", "getStatName", "(", ")", "}", ")", ";", "par0ArrayOfStatBase", "[", "i", "]", "=", "(", "new", "StatCrafting", "(", "par2", "+", "i", ",", "s", ",", "i", ")", ")", ".", "registerStat", "(", ")", ";", "if", "(", "i", ">=", "256", ")", "{", "itemStats", ".", "add", "(", "(", "StatCrafting", ")", "par0ArrayOfStatBase", "[", "i", "]", ")", ";", "}", "}", "replaceAllSimilarBlocks", "(", "par0ArrayOfStatBase", ")", ";", "return", "par0ArrayOfStatBase", ";", "}", "private", "static", "StatBase", "[", "]", "initBreakStats", "(", "StatBase", "par0ArrayOfStatBase", "[", "]", ",", "String", "par1Str", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ")", "{", "if", "(", "par0ArrayOfStatBase", "==", "null", ")", "{", "par0ArrayOfStatBase", "=", "new", "StatBase", "[", "32000", "]", ";", "}", "for", "(", "int", "i", "=", "par3", ";", "i", "<", "par4", ";", "i", "++", ")", "{", "if", "(", "Item", ".", "itemsList", "[", "i", "]", "!=", "null", "&&", "Item", ".", "itemsList", "[", "i", "]", ".", "isDamageable", "(", ")", ")", "{", "String", "s", "=", "StatCollector", ".", "translateToLocalFormatted", "(", "par1Str", ",", "new", "Object", "[", "]", "{", "Item", ".", "itemsList", "[", "i", "]", ".", "getStatName", "(", ")", "}", ")", ";", "par0ArrayOfStatBase", "[", "i", "]", "=", "(", "new", "StatCrafting", "(", "par2", "+", "i", ",", "s", ",", "i", ")", ")", ".", "registerStat", "(", ")", ";", "}", "}", "replaceAllSimilarBlocks", "(", "par0ArrayOfStatBase", ")", ";", "return", "par0ArrayOfStatBase", ";", "}", "private", "static", "void", "replaceAllSimilarBlocks", "(", "StatBase", "par0ArrayOfStatBase", "[", "]", ")", "{", "replaceSimilarBlocks", "(", "par0ArrayOfStatBase", ",", "Block", ".", "waterStill", ".", "blockID", ",", "Block", ".", "waterMoving", ".", "blockID", ")", ";", "replaceSimilarBlocks", "(", "par0ArrayOfStatBase", ",", "Block", ".", "lavaStill", ".", "blockID", ",", "Block", ".", "lavaStill", ".", "blockID", ")", ";", "replaceSimilarBlocks", "(", "par0ArrayOfStatBase", ",", "Block", ".", "pumpkinLantern", ".", "blockID", ",", "Block", ".", "pumpkin", ".", "blockID", ")", ";", "replaceSimilarBlocks", "(", "par0ArrayOfStatBase", ",", "Block", ".", "stoneOvenActive", ".", "blockID", ",", "Block", ".", "stoneOvenIdle", ".", "blockID", ")", ";", "replaceSimilarBlocks", "(", "par0ArrayOfStatBase", ",", "Block", ".", "oreRedstoneGlowing", ".", "blockID", ",", "Block", ".", "oreRedstone", ".", "blockID", ")", ";", "replaceSimilarBlocks", "(", "par0ArrayOfStatBase", ",", "Block", ".", "redstoneRepeaterActive", ".", "blockID", ",", "Block", ".", "redstoneRepeaterIdle", ".", "blockID", ")", ";", "replaceSimilarBlocks", "(", "par0ArrayOfStatBase", ",", "Block", ".", "torchRedstoneActive", ".", "blockID", ",", "Block", ".", "torchRedstoneIdle", ".", "blockID", ")", ";", "replaceSimilarBlocks", "(", "par0ArrayOfStatBase", ",", "Block", ".", "mushroomRed", ".", "blockID", ",", "Block", ".", "mushroomBrown", ".", "blockID", ")", ";", "replaceSimilarBlocks", "(", "par0ArrayOfStatBase", ",", "Block", ".", "stairDouble", ".", "blockID", ",", "Block", ".", "stairSingle", ".", "blockID", ")", ";", "replaceSimilarBlocks", "(", "par0ArrayOfStatBase", ",", "Block", ".", "grass", ".", "blockID", ",", "Block", ".", "dirt", ".", "blockID", ")", ";", "replaceSimilarBlocks", "(", "par0ArrayOfStatBase", ",", "Block", ".", "tilledField", ".", "blockID", ",", "Block", ".", "dirt", ".", "blockID", ")", ";", "}", "private", "static", "void", "replaceSimilarBlocks", "(", "StatBase", "par0ArrayOfStatBase", "[", "]", ",", "int", "par1", ",", "int", "par2", ")", "{", "if", "(", "par0ArrayOfStatBase", "[", "par1", "]", "!=", "null", "&&", "par0ArrayOfStatBase", "[", "par2", "]", "==", "null", ")", "{", "par0ArrayOfStatBase", "[", "par2", "]", "=", "par0ArrayOfStatBase", "[", "par1", "]", ";", "return", ";", "}", "else", "{", "allStats", ".", "remove", "(", "par0ArrayOfStatBase", "[", "par1", "]", ")", ";", "objectMineStats", ".", "remove", "(", "par0ArrayOfStatBase", "[", "par1", "]", ")", ";", "generalStats", ".", "remove", "(", "par0ArrayOfStatBase", "[", "par1", "]", ")", ";", "par0ArrayOfStatBase", "[", "par1", "]", "=", "par0ArrayOfStatBase", "[", "par2", "]", ";", "return", ";", "}", "}", "static", "{", "minutesPlayedStat", "=", "(", "new", "StatBasic", "(", "1100", ",", "\"\"", ",", "StatBase", ".", "timeStatType", ")", ")", ".", "initIndependentStat", "(", ")", ".", "registerStat", "(", ")", ";", "distanceWalkedStat", "=", "(", "new", "StatBasic", "(", "2000", ",", "\"\"", ",", "StatBase", ".", "distanceStatType", ")", ")", ".", "initIndependentStat", "(", ")", ".", "registerStat", "(", ")", ";", "distanceSwumStat", "=", "(", "new", "StatBasic", "(", "2001", ",", "\"\"", ",", "StatBase", ".", "distanceStatType", ")", ")", ".", "initIndependentStat", "(", ")", ".", "registerStat", "(", ")", ";", "distanceFallenStat", "=", "(", "new", "StatBasic", "(", "2002", ",", "\"\"", ",", "StatBase", ".", "distanceStatType", ")", ")", ".", "initIndependentStat", "(", ")", ".", "registerStat", "(", ")", ";", "distanceClimbedStat", "=", "(", "new", "StatBasic", "(", "2003", ",", "\"\"", ",", "StatBase", ".", "distanceStatType", ")", ")", ".", "initIndependentStat", "(", ")", ".", "registerStat", "(", ")", ";", "distanceFlownStat", "=", "(", "new", "StatBasic", "(", "2004", ",", "\"\"", ",", "StatBase", ".", "distanceStatType", ")", ")", ".", "initIndependentStat", "(", ")", ".", "registerStat", "(", ")", ";", "distanceDoveStat", "=", "(", "new", "StatBasic", "(", "2005", ",", "\"\"", ",", "StatBase", ".", "distanceStatType", ")", ")", ".", "initIndependentStat", "(", ")", ".", "registerStat", "(", ")", ";", "distanceByMinecartStat", "=", "(", "new", "StatBasic", "(", "2006", ",", "\"\"", ",", "StatBase", ".", "distanceStatType", ")", ")", ".", "initIndependentStat", "(", ")", ".", "registerStat", "(", ")", ";", "distanceByBoatStat", "=", "(", "new", "StatBasic", "(", "2007", ",", "\"\"", ",", "StatBase", ".", "distanceStatType", ")", ")", ".", "initIndependentStat", "(", ")", ".", "registerStat", "(", ")", ";", "distanceByPigStat", "=", "(", "new", "StatBasic", "(", "2008", ",", "\"\"", ",", "StatBase", ".", "distanceStatType", ")", ")", ".", "initIndependentStat", "(", ")", ".", "registerStat", "(", ")", ";", "AchievementList", ".", "init", "(", ")", ";", "}", "}", "</s>" ]
9,734
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "io", ".", "*", ";", "public", "class", "Packet39AttachEntity", "extends", "Packet", "{", "public", "int", "entityId", ";", "public", "int", "vehicleEntityId", ";", "public", "Packet39AttachEntity", "(", ")", "{", "}", "public", "Packet39AttachEntity", "(", "Entity", "par1Entity", ",", "Entity", "par2Entity", ")", "{", "entityId", "=", "par1Entity", ".", "entityId", ";", "vehicleEntityId", "=", "par2Entity", "==", "null", "?", "-", "1", ":", "par2Entity", ".", "entityId", ";", "}", "public", "int", "getPacketSize", "(", ")", "{", "return", "8", ";", "}", "public", "void", "readPacketData", "(", "DataInputStream", "par1DataInputStream", ")", "throws", "IOException", "{", "entityId", "=", "par1DataInputStream", ".", "readInt", "(", ")", ";", "vehicleEntityId", "=", "par1DataInputStream", ".", "readInt", "(", ")", ";", "}", "public", "void", "writePacketData", "(", "DataOutputStream", "par1DataOutputStream", ")", "throws", "IOException", "{", "par1DataOutputStream", ".", "writeInt", "(", "entityId", ")", ";", "par1DataOutputStream", ".", "writeInt", "(", "vehicleEntityId", ")", ";", "}", "public", "void", "processPacket", "(", "NetHandler", "par1NetHandler", ")", "{", "par1NetHandler", ".", "handleAttachEntity", "(", "this", ")", ";", "}", "}", "</s>" ]
9,735
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "Random", ";", "public", "class", "BlockMycelium", "extends", "Block", "{", "protected", "BlockMycelium", "(", "int", "par1", ")", "{", "super", "(", "par1", ",", "Material", ".", "grass", ")", ";", "blockIndexInTexture", "=", "77", ";", "setTickRandomly", "(", "true", ")", ";", "}", "public", "int", "getBlockTextureFromSideAndMetadata", "(", "int", "par1", ",", "int", "par2", ")", "{", "if", "(", "par1", "==", "1", ")", "{", "return", "78", ";", "}", "return", "par1", "!=", "0", "?", "77", ":", "2", ";", "}", "public", "void", "updateTick", "(", "World", "par1World", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "Random", "par5Random", ")", "{", "if", "(", "par1World", ".", "isRemote", ")", "{", "return", ";", "}", "if", "(", "par1World", ".", "getBlockLightValue", "(", "par2", ",", "par3", "+", "1", ",", "par4", ")", "<", "4", "&&", "Block", ".", "lightOpacity", "[", "par1World", ".", "getBlockId", "(", "par2", ",", "par3", "+", "1", ",", "par4", ")", "]", ">", "2", ")", "{", "par1World", ".", "setBlockWithNotify", "(", "par2", ",", "par3", ",", "par4", ",", "Block", ".", "dirt", ".", "blockID", ")", ";", "}", "else", "if", "(", "par1World", ".", "getBlockLightValue", "(", "par2", ",", "par3", "+", "1", ",", "par4", ")", ">=", "9", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "4", ";", "i", "++", ")", "{", "int", "j", "=", "(", "par2", "+", "par5Random", ".", "nextInt", "(", "3", ")", ")", "-", "1", ";", "int", "k", "=", "(", "par3", "+", "par5Random", ".", "nextInt", "(", "5", ")", ")", "-", "3", ";", "int", "l", "=", "(", "par4", "+", "par5Random", ".", "nextInt", "(", "3", ")", ")", "-", "1", ";", "int", "i1", "=", "par1World", ".", "getBlockId", "(", "j", ",", "k", "+", "1", ",", "l", ")", ";", "if", "(", "par1World", ".", "getBlockId", "(", "j", ",", "k", ",", "l", ")", "==", "Block", ".", "dirt", ".", "blockID", "&&", "par1World", ".", "getBlockLightValue", "(", "j", ",", "k", "+", "1", ",", "l", ")", ">=", "4", "&&", "Block", ".", "lightOpacity", "[", "i1", "]", "<=", "2", ")", "{", "par1World", ".", "setBlockWithNotify", "(", "j", ",", "k", ",", "l", ",", "blockID", ")", ";", "}", "}", "}", "}", "public", "int", "idDropped", "(", "int", "par1", ",", "Random", "par2Random", ",", "int", "par3", ")", "{", "return", "Block", ".", "dirt", ".", "idDropped", "(", "0", ",", "par2Random", ",", "par3", ")", ";", "}", "}", "</s>" ]
9,736
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "ArrayList", ";", "import", "java", ".", "util", ".", "Random", ";", "public", "class", "BlockPane", "extends", "Block", "{", "private", "int", "sideTextureIndex", ";", "private", "final", "boolean", "canDropItself", ";", "protected", "BlockPane", "(", "int", "par1", ",", "int", "par2", ",", "int", "par3", ",", "Material", "par4Material", ",", "boolean", "par5", ")", "{", "super", "(", "par1", ",", "par2", ",", "par4Material", ")", ";", "sideTextureIndex", "=", "par3", ";", "canDropItself", "=", "par5", ";", "}", "public", "int", "idDropped", "(", "int", "par1", ",", "Random", "par2Random", ",", "int", "par3", ")", "{", "if", "(", "!", "canDropItself", ")", "{", "return", "0", ";", "}", "else", "{", "return", "super", ".", "idDropped", "(", "par1", ",", "par2Random", ",", "par3", ")", ";", "}", "}", "public", "boolean", "isOpaqueCube", "(", ")", "{", "return", "false", ";", "}", "public", "boolean", "renderAsNormalBlock", "(", ")", "{", "return", "false", ";", "}", "public", "int", "getRenderType", "(", ")", "{", "return", "18", ";", "}", "public", "void", "getCollidingBoundingBoxes", "(", "World", "par1World", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "AxisAlignedBB", "par5AxisAlignedBB", ",", "ArrayList", "par6ArrayList", ")", "{", "boolean", "flag", "=", "canThisPaneConnectToThisBlockID", "(", "par1World", ".", "getBlockId", "(", "par2", ",", "par3", ",", "par4", "-", "1", ")", ")", ";", "boolean", "flag1", "=", "canThisPaneConnectToThisBlockID", "(", "par1World", ".", "getBlockId", "(", "par2", ",", "par3", ",", "par4", "+", "1", ")", ")", ";", "boolean", "flag2", "=", "canThisPaneConnectToThisBlockID", "(", "par1World", ".", "getBlockId", "(", "par2", "-", "1", ",", "par3", ",", "par4", ")", ")", ";", "boolean", "flag3", "=", "canThisPaneConnectToThisBlockID", "(", "par1World", ".", "getBlockId", "(", "par2", "+", "1", ",", "par3", ",", "par4", ")", ")", ";", "if", "(", "flag2", "&&", "flag3", "||", "!", "flag2", "&&", "!", "flag3", "&&", "!", "flag", "&&", "!", "flag1", ")", "{", "setBlockBounds", "(", "0.0F", ",", "0.0F", ",", "0.4375F", ",", "1.0F", ",", "1.0F", ",", "0.5625F", ")", ";", "super", ".", "getCollidingBoundingBoxes", "(", "par1World", ",", "par2", ",", "par3", ",", "par4", ",", "par5AxisAlignedBB", ",", "par6ArrayList", ")", ";", "}", "else", "if", "(", "flag2", "&&", "!", "flag3", ")", "{", "setBlockBounds", "(", "0.0F", ",", "0.0F", ",", "0.4375F", ",", "0.5F", ",", "1.0F", ",", "0.5625F", ")", ";", "super", ".", "getCollidingBoundingBoxes", "(", "par1World", ",", "par2", ",", "par3", ",", "par4", ",", "par5AxisAlignedBB", ",", "par6ArrayList", ")", ";", "}", "else", "if", "(", "!", "flag2", "&&", "flag3", ")", "{", "setBlockBounds", "(", "0.5F", ",", "0.0F", ",", "0.4375F", ",", "1.0F", ",", "1.0F", ",", "0.5625F", ")", ";", "super", ".", "getCollidingBoundingBoxes", "(", "par1World", ",", "par2", ",", "par3", ",", "par4", ",", "par5AxisAlignedBB", ",", "par6ArrayList", ")", ";", "}", "if", "(", "flag", "&&", "flag1", "||", "!", "flag2", "&&", "!", "flag3", "&&", "!", "flag", "&&", "!", "flag1", ")", "{", "setBlockBounds", "(", "0.4375F", ",", "0.0F", ",", "0.0F", ",", "0.5625F", ",", "1.0F", ",", "1.0F", ")", ";", "super", ".", "getCollidingBoundingBoxes", "(", "par1World", ",", "par2", ",", "par3", ",", "par4", ",", "par5AxisAlignedBB", ",", "par6ArrayList", ")", ";", "}", "else", "if", "(", "flag", "&&", "!", "flag1", ")", "{", "setBlockBounds", "(", "0.4375F", ",", "0.0F", ",", "0.0F", ",", "0.5625F", ",", "1.0F", ",", "0.5F", ")", ";", "super", ".", "getCollidingBoundingBoxes", "(", "par1World", ",", "par2", ",", "par3", ",", "par4", ",", "par5AxisAlignedBB", ",", "par6ArrayList", ")", ";", "}", "else", "if", "(", "!", "flag", "&&", "flag1", ")", "{", "setBlockBounds", "(", "0.4375F", ",", "0.0F", ",", "0.5F", ",", "0.5625F", ",", "1.0F", ",", "1.0F", ")", ";", "super", ".", "getCollidingBoundingBoxes", "(", "par1World", ",", "par2", ",", "par3", ",", "par4", ",", "par5AxisAlignedBB", ",", "par6ArrayList", ")", ";", "}", "}", "public", "void", "setBlockBoundsForItemRender", "(", ")", "{", "setBlockBounds", "(", "0.0F", ",", "0.0F", ",", "0.0F", ",", "1.0F", ",", "1.0F", ",", "1.0F", ")", ";", "}", "public", "void", "setBlockBoundsBasedOnState", "(", "IBlockAccess", "par1IBlockAccess", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ")", "{", "float", "f", "=", "0.4375F", ";", "float", "f1", "=", "0.5625F", ";", "float", "f2", "=", "0.4375F", ";", "float", "f3", "=", "0.5625F", ";", "boolean", "flag", "=", "canThisPaneConnectToThisBlockID", "(", "par1IBlockAccess", ".", "getBlockId", "(", "par2", ",", "par3", ",", "par4", "-", "1", ")", ")", ";", "boolean", "flag1", "=", "canThisPaneConnectToThisBlockID", "(", "par1IBlockAccess", ".", "getBlockId", "(", "par2", ",", "par3", ",", "par4", "+", "1", ")", ")", ";", "boolean", "flag2", "=", "canThisPaneConnectToThisBlockID", "(", "par1IBlockAccess", ".", "getBlockId", "(", "par2", "-", "1", ",", "par3", ",", "par4", ")", ")", ";", "boolean", "flag3", "=", "canThisPaneConnectToThisBlockID", "(", "par1IBlockAccess", ".", "getBlockId", "(", "par2", "+", "1", ",", "par3", ",", "par4", ")", ")", ";", "if", "(", "flag2", "&&", "flag3", "||", "!", "flag2", "&&", "!", "flag3", "&&", "!", "flag", "&&", "!", "flag1", ")", "{", "f", "=", "0.0F", ";", "f1", "=", "1.0F", ";", "}", "else", "if", "(", "flag2", "&&", "!", "flag3", ")", "{", "f", "=", "0.0F", ";", "}", "else", "if", "(", "!", "flag2", "&&", "flag3", ")", "{", "f1", "=", "1.0F", ";", "}", "if", "(", "flag", "&&", "flag1", "||", "!", "flag2", "&&", "!", "flag3", "&&", "!", "flag", "&&", "!", "flag1", ")", "{", "f2", "=", "0.0F", ";", "f3", "=", "1.0F", ";", "}", "else", "if", "(", "flag", "&&", "!", "flag1", ")", "{", "f2", "=", "0.0F", ";", "}", "else", "if", "(", "!", "flag", "&&", "flag1", ")", "{", "f3", "=", "1.0F", ";", "}", "setBlockBounds", "(", "f", ",", "0.0F", ",", "f2", ",", "f1", ",", "1.0F", ",", "f3", ")", ";", "}", "public", "final", "boolean", "canThisPaneConnectToThisBlockID", "(", "int", "par1", ")", "{", "return", "Block", ".", "opaqueCubeLookup", "[", "par1", "]", "||", "par1", "==", "blockID", "||", "par1", "==", "Block", ".", "glass", ".", "blockID", ";", "}", "}", "</s>" ]
9,737
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "List", ";", "import", "java", ".", "util", ".", "Random", ";", "public", "class", "EntityGhast", "extends", "EntityFlying", "implements", "IMob", "{", "public", "int", "courseChangeCooldown", ";", "public", "double", "waypointX", ";", "public", "double", "waypointY", ";", "public", "double", "waypointZ", ";", "private", "Entity", "targetedEntity", ";", "private", "int", "aggroCooldown", ";", "public", "int", "prevAttackCounter", ";", "public", "int", "attackCounter", ";", "public", "EntityGhast", "(", "World", "par1World", ")", "{", "super", "(", "par1World", ")", ";", "courseChangeCooldown", "=", "0", ";", "targetedEntity", "=", "null", ";", "aggroCooldown", "=", "0", ";", "prevAttackCounter", "=", "0", ";", "attackCounter", "=", "0", ";", "texture", "=", "\"\"", ";", "setSize", "(", "4F", ",", "4F", ")", ";", "isImmuneToFire", "=", "true", ";", "experienceValue", "=", "5", ";", "}", "public", "boolean", "attackEntityFrom", "(", "DamageSource", "par1DamageSource", ",", "int", "par2", ")", "{", "if", "(", "\"fireball\"", ".", "equals", "(", "par1DamageSource", ".", "getDamageType", "(", ")", ")", "&&", "(", "par1DamageSource", ".", "getEntity", "(", ")", "instanceof", "EntityPlayer", ")", ")", "{", "super", ".", "attackEntityFrom", "(", "par1DamageSource", ",", "1000", ")", ";", "(", "(", "EntityPlayer", ")", "par1DamageSource", ".", "getEntity", "(", ")", ")", ".", "triggerAchievement", "(", "AchievementList", ".", "ghast", ")", ";", "return", "true", ";", "}", "else", "{", "return", "super", ".", "attackEntityFrom", "(", "par1DamageSource", ",", "par2", ")", ";", "}", "}", "protected", "void", "entityInit", "(", ")", "{", "super", ".", "entityInit", "(", ")", ";", "dataWatcher", ".", "addObject", "(", "16", ",", "Byte", ".", "valueOf", "(", "(", "byte", ")", "0", ")", ")", ";", "}", "public", "int", "getMaxHealth", "(", ")", "{", "return", "10", ";", "}", "public", "void", "onUpdate", "(", ")", "{", "super", ".", "onUpdate", "(", ")", ";", "byte", "byte0", "=", "dataWatcher", ".", "getWatchableObjectByte", "(", "16", ")", ";", "texture", "=", "byte0", "!=", "1", "?", "\"\"", ":", "\"\"", ";", "}", "protected", "void", "updateEntityActionState", "(", ")", "{", "if", "(", "!", "worldObj", ".", "isRemote", "&&", "worldObj", ".", "difficultySetting", "==", "0", ")", "{", "setDead", "(", ")", ";", "}", "despawnEntity", "(", ")", ";", "prevAttackCounter", "=", "attackCounter", ";", "double", "d", "=", "waypointX", "-", "posX", ";", "double", "d1", "=", "waypointY", "-", "posY", ";", "double", "d2", "=", "waypointZ", "-", "posZ", ";", "double", "d3", "=", "MathHelper", ".", "sqrt_double", "(", "d", "*", "d", "+", "d1", "*", "d1", "+", "d2", "*", "d2", ")", ";", "if", "(", "d3", "<", "1.0D", "||", "d3", ">", "60D", ")", "{", "waypointX", "=", "posX", "+", "(", "double", ")", "(", "(", "rand", ".", "nextFloat", "(", ")", "*", "2.0F", "-", "1.0F", ")", "*", "16F", ")", ";", "waypointY", "=", "posY", "+", "(", "double", ")", "(", "(", "rand", ".", "nextFloat", "(", ")", "*", "2.0F", "-", "1.0F", ")", "*", "16F", ")", ";", "waypointZ", "=", "posZ", "+", "(", "double", ")", "(", "(", "rand", ".", "nextFloat", "(", ")", "*", "2.0F", "-", "1.0F", ")", "*", "16F", ")", ";", "}", "if", "(", "courseChangeCooldown", "--", "<=", "0", ")", "{", "courseChangeCooldown", "+=", "rand", ".", "nextInt", "(", "5", ")", "+", "2", ";", "if", "(", "isCourseTraversable", "(", "waypointX", ",", "waypointY", ",", "waypointZ", ",", "d3", ")", ")", "{", "motionX", "+=", "(", "d", "/", "d3", ")", "*", "0.10000000000000001D", ";", "motionY", "+=", "(", "d1", "/", "d3", ")", "*", "0.10000000000000001D", ";", "motionZ", "+=", "(", "d2", "/", "d3", ")", "*", "0.10000000000000001D", ";", "}", "else", "{", "waypointX", "=", "posX", ";", "waypointY", "=", "posY", ";", "waypointZ", "=", "posZ", ";", "}", "}", "if", "(", "targetedEntity", "!=", "null", "&&", "targetedEntity", ".", "isDead", ")", "{", "targetedEntity", "=", "null", ";", "}", "if", "(", "targetedEntity", "==", "null", "||", "aggroCooldown", "--", "<=", "0", ")", "{", "targetedEntity", "=", "worldObj", ".", "getClosestVulnerablePlayerToEntity", "(", "this", ",", "100D", ")", ";", "if", "(", "targetedEntity", "!=", "null", ")", "{", "aggroCooldown", "=", "20", ";", "}", "}", "double", "d4", "=", "64D", ";", "if", "(", "targetedEntity", "!=", "null", "&&", "targetedEntity", ".", "getDistanceSqToEntity", "(", "this", ")", "<", "d4", "*", "d4", ")", "{", "double", "d5", "=", "targetedEntity", ".", "posX", "-", "posX", ";", "double", "d6", "=", "(", "targetedEntity", ".", "boundingBox", ".", "minY", "+", "(", "double", ")", "(", "targetedEntity", ".", "height", "/", "2.0F", ")", ")", "-", "(", "posY", "+", "(", "double", ")", "(", "height", "/", "2.0F", ")", ")", ";", "double", "d7", "=", "targetedEntity", ".", "posZ", "-", "posZ", ";", "renderYawOffset", "=", "rotationYaw", "=", "(", "-", "(", "float", ")", "Math", ".", "atan2", "(", "d5", ",", "d7", ")", "*", "180F", ")", "/", "(", "float", ")", "Math", ".", "PI", ";", "if", "(", "canEntityBeSeen", "(", "targetedEntity", ")", ")", "{", "if", "(", "attackCounter", "==", "10", ")", "{", "worldObj", ".", "playAuxSFXAtEntity", "(", "null", ",", "1007", ",", "(", "int", ")", "posX", ",", "(", "int", ")", "posY", ",", "(", "int", ")", "posZ", ",", "0", ")", ";", "}", "attackCounter", "++", ";", "if", "(", "attackCounter", "==", "20", ")", "{", "worldObj", ".", "playAuxSFXAtEntity", "(", "null", ",", "1008", ",", "(", "int", ")", "posX", ",", "(", "int", ")", "posY", ",", "(", "int", ")", "posZ", ",", "0", ")", ";", "EntityFireball", "entityfireball", "=", "new", "EntityFireball", "(", "worldObj", ",", "this", ",", "d5", ",", "d6", ",", "d7", ")", ";", "double", "d8", "=", "4D", ";", "Vec3D", "vec3d", "=", "getLook", "(", "1.0F", ")", ";", "entityfireball", ".", "posX", "=", "posX", "+", "vec3d", ".", "xCoord", "*", "d8", ";", "entityfireball", ".", "posY", "=", "posY", "+", "(", "double", ")", "(", "height", "/", "2.0F", ")", "+", "0.5D", ";", "entityfireball", ".", "posZ", "=", "posZ", "+", "vec3d", ".", "zCoord", "*", "d8", ";", "worldObj", ".", "spawnEntityInWorld", "(", "entityfireball", ")", ";", "attackCounter", "=", "-", "40", ";", "}", "}", "else", "if", "(", "attackCounter", ">", "0", ")", "{", "attackCounter", "--", ";", "}", "}", "else", "{", "renderYawOffset", "=", "rotationYaw", "=", "(", "-", "(", "float", ")", "Math", ".", "atan2", "(", "motionX", ",", "motionZ", ")", "*", "180F", ")", "/", "(", "float", ")", "Math", ".", "PI", ";", "if", "(", "attackCounter", ">", "0", ")", "{", "attackCounter", "--", ";", "}", "}", "if", "(", "!", "worldObj", ".", "isRemote", ")", "{", "byte", "byte0", "=", "dataWatcher", ".", "getWatchableObjectByte", "(", "16", ")", ";", "byte", "byte1", "=", "(", "byte", ")", "(", "attackCounter", "<=", "10", "?", "0", ":", "1", ")", ";", "if", "(", "byte0", "!=", "byte1", ")", "{", "dataWatcher", ".", "updateObject", "(", "16", ",", "Byte", ".", "valueOf", "(", "byte1", ")", ")", ";", "}", "}", "}", "private", "boolean", "isCourseTraversable", "(", "double", "par1", ",", "double", "par3", ",", "double", "par5", ",", "double", "par7", ")", "{", "double", "d", "=", "(", "waypointX", "-", "posX", ")", "/", "par7", ";", "double", "d1", "=", "(", "waypointY", "-", "posY", ")", "/", "par7", ";", "double", "d2", "=", "(", "waypointZ", "-", "posZ", ")", "/", "par7", ";", "AxisAlignedBB", "axisalignedbb", "=", "boundingBox", ".", "copy", "(", ")", ";", "for", "(", "int", "i", "=", "1", ";", "(", "double", ")", "i", "<", "par7", ";", "i", "++", ")", "{", "axisalignedbb", ".", "offset", "(", "d", ",", "d1", ",", "d2", ")", ";", "if", "(", "worldObj", ".", "getCollidingBoundingBoxes", "(", "this", ",", "axisalignedbb", ")", ".", "size", "(", ")", ">", "0", ")", "{", "return", "false", ";", "}", "}", "return", "true", ";", "}", "protected", "String", "getLivingSound", "(", ")", "{", "return", "\"\"", ";", "}", "protected", "String", "getHurtSound", "(", ")", "{", "return", "\"\"", ";", "}", "protected", "String", "getDeathSound", "(", ")", "{", "return", "\"\"", ";", "}", "protected", "int", "getDropItemId", "(", ")", "{", "return", "Item", ".", "gunpowder", ".", "shiftedIndex", ";", "}", "protected", "void", "dropFewItems", "(", "boolean", "par1", ",", "int", "par2", ")", "{", "int", "i", "=", "rand", ".", "nextInt", "(", "2", ")", "+", "rand", ".", "nextInt", "(", "1", "+", "par2", ")", ";", "for", "(", "int", "j", "=", "0", ";", "j", "<", "i", ";", "j", "++", ")", "{", "dropItem", "(", "Item", ".", "ghastTear", ".", "shiftedIndex", ",", "1", ")", ";", "}", "i", "=", "rand", ".", "nextInt", "(", "3", ")", "+", "rand", ".", "nextInt", "(", "1", "+", "par2", ")", ";", "for", "(", "int", "k", "=", "0", ";", "k", "<", "i", ";", "k", "++", ")", "{", "dropItem", "(", "Item", ".", "gunpowder", ".", "shiftedIndex", ",", "1", ")", ";", "}", "}", "protected", "float", "getSoundVolume", "(", ")", "{", "return", "10F", ";", "}", "public", "boolean", "getCanSpawnHere", "(", ")", "{", "return", "rand", ".", "nextInt", "(", "20", ")", "==", "0", "&&", "super", ".", "getCanSpawnHere", "(", ")", "&&", "worldObj", ".", "difficultySetting", ">", "0", ";", "}", "public", "int", "getMaxSpawnedInChunk", "(", ")", "{", "return", "1", ";", "}", "}", "</s>" ]
9,738
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "Random", ";", "public", "class", "BlockRedstoneLight", "extends", "Block", "{", "private", "final", "boolean", "powered", ";", "public", "BlockRedstoneLight", "(", "int", "par1", ",", "boolean", "par2", ")", "{", "super", "(", "par1", ",", "211", ",", "Material", ".", "redstoneLight", ")", ";", "powered", "=", "par2", ";", "if", "(", "par2", ")", "{", "setLightValue", "(", "1.0F", ")", ";", "blockIndexInTexture", "++", ";", "}", "}", "public", "void", "onBlockAdded", "(", "World", "par1World", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ")", "{", "if", "(", "!", "par1World", ".", "isRemote", ")", "{", "if", "(", "powered", "&&", "!", "par1World", ".", "isBlockIndirectlyGettingPowered", "(", "par2", ",", "par3", ",", "par4", ")", ")", "{", "par1World", ".", "scheduleBlockUpdate", "(", "par2", ",", "par3", ",", "par4", ",", "blockID", ",", "4", ")", ";", "}", "else", "if", "(", "!", "powered", "&&", "par1World", ".", "isBlockIndirectlyGettingPowered", "(", "par2", ",", "par3", ",", "par4", ")", ")", "{", "par1World", ".", "setBlockWithNotify", "(", "par2", ",", "par3", ",", "par4", ",", "Block", ".", "redstoneLampActive", ".", "blockID", ")", ";", "}", "}", "}", "public", "void", "onNeighborBlockChange", "(", "World", "par1World", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "int", "par5", ")", "{", "if", "(", "!", "par1World", ".", "isRemote", ")", "{", "if", "(", "powered", "&&", "!", "par1World", ".", "isBlockIndirectlyGettingPowered", "(", "par2", ",", "par3", ",", "par4", ")", ")", "{", "par1World", ".", "scheduleBlockUpdate", "(", "par2", ",", "par3", ",", "par4", ",", "blockID", ",", "4", ")", ";", "}", "else", "if", "(", "!", "powered", "&&", "par1World", ".", "isBlockIndirectlyGettingPowered", "(", "par2", ",", "par3", ",", "par4", ")", ")", "{", "par1World", ".", "setBlockWithNotify", "(", "par2", ",", "par3", ",", "par4", ",", "Block", ".", "redstoneLampActive", ".", "blockID", ")", ";", "}", "}", "}", "public", "void", "updateTick", "(", "World", "par1World", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "Random", "par5Random", ")", "{", "if", "(", "!", "par1World", ".", "isRemote", "&&", "powered", "&&", "!", "par1World", ".", "isBlockIndirectlyGettingPowered", "(", "par2", ",", "par3", ",", "par4", ")", ")", "{", "par1World", ".", "setBlockWithNotify", "(", "par2", ",", "par3", ",", "par4", ",", "Block", ".", "redstoneLampIdle", ".", "blockID", ")", ";", "}", "}", "public", "int", "idDropped", "(", "int", "par1", ",", "Random", "par2Random", ",", "int", "par3", ")", "{", "return", "Block", ".", "redstoneLampIdle", ".", "blockID", ";", "}", "}", "</s>" ]
9,739
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "Random", ";", "public", "class", "WorldGenBigMushroom", "extends", "WorldGenerator", "{", "private", "int", "mushroomType", ";", "public", "WorldGenBigMushroom", "(", "int", "par1", ")", "{", "super", "(", "true", ")", ";", "mushroomType", "=", "-", "1", ";", "mushroomType", "=", "par1", ";", "}", "public", "WorldGenBigMushroom", "(", ")", "{", "super", "(", "false", ")", ";", "mushroomType", "=", "-", "1", ";", "}", "public", "boolean", "generate", "(", "World", "par1World", ",", "Random", "par2Random", ",", "int", "par3", ",", "int", "par4", ",", "int", "par5", ")", "{", "int", "i", "=", "par2Random", ".", "nextInt", "(", "2", ")", ";", "if", "(", "mushroomType", ">=", "0", ")", "{", "i", "=", "mushroomType", ";", "}", "int", "j", "=", "par2Random", ".", "nextInt", "(", "3", ")", "+", "4", ";", "boolean", "flag", "=", "true", ";", "if", "(", "par4", "<", "1", "||", "par4", "+", "j", "+", "1", ">=", "256", ")", "{", "return", "false", ";", "}", "for", "(", "int", "k", "=", "par4", ";", "k", "<=", "par4", "+", "1", "+", "j", ";", "k", "++", ")", "{", "byte", "byte0", "=", "3", ";", "if", "(", "k", "==", "par4", ")", "{", "byte0", "=", "0", ";", "}", "for", "(", "int", "j1", "=", "par3", "-", "byte0", ";", "j1", "<=", "par3", "+", "byte0", "&&", "flag", ";", "j1", "++", ")", "{", "for", "(", "int", "i2", "=", "par5", "-", "byte0", ";", "i2", "<=", "par5", "+", "byte0", "&&", "flag", ";", "i2", "++", ")", "{", "if", "(", "k", ">=", "0", "&&", "k", "<", "256", ")", "{", "int", "l2", "=", "par1World", ".", "getBlockId", "(", "j1", ",", "k", ",", "i2", ")", ";", "if", "(", "l2", "!=", "0", "&&", "l2", "!=", "Block", ".", "leaves", ".", "blockID", ")", "{", "flag", "=", "false", ";", "}", "}", "else", "{", "flag", "=", "false", ";", "}", "}", "}", "}", "if", "(", "!", "flag", ")", "{", "return", "false", ";", "}", "int", "l", "=", "par1World", ".", "getBlockId", "(", "par3", ",", "par4", "-", "1", ",", "par5", ")", ";", "if", "(", "l", "!=", "Block", ".", "dirt", ".", "blockID", "&&", "l", "!=", "Block", ".", "grass", ".", "blockID", "&&", "l", "!=", "Block", ".", "mycelium", ".", "blockID", ")", "{", "return", "false", ";", "}", "if", "(", "!", "Block", ".", "mushroomBrown", ".", "canPlaceBlockAt", "(", "par1World", ",", "par3", ",", "par4", ",", "par5", ")", ")", "{", "return", "false", ";", "}", "setBlockAndMetadata", "(", "par1World", ",", "par3", ",", "par4", "-", "1", ",", "par5", ",", "Block", ".", "dirt", ".", "blockID", ",", "0", ")", ";", "int", "i1", "=", "par4", "+", "j", ";", "if", "(", "i", "==", "1", ")", "{", "i1", "=", "(", "par4", "+", "j", ")", "-", "3", ";", "}", "for", "(", "int", "k1", "=", "i1", ";", "k1", "<=", "par4", "+", "j", ";", "k1", "++", ")", "{", "int", "j2", "=", "1", ";", "if", "(", "k1", "<", "par4", "+", "j", ")", "{", "j2", "++", ";", "}", "if", "(", "i", "==", "0", ")", "{", "j2", "=", "3", ";", "}", "for", "(", "int", "i3", "=", "par3", "-", "j2", ";", "i3", "<=", "par3", "+", "j2", ";", "i3", "++", ")", "{", "for", "(", "int", "j3", "=", "par5", "-", "j2", ";", "j3", "<=", "par5", "+", "j2", ";", "j3", "++", ")", "{", "int", "k3", "=", "5", ";", "if", "(", "i3", "==", "par3", "-", "j2", ")", "{", "k3", "--", ";", "}", "if", "(", "i3", "==", "par3", "+", "j2", ")", "{", "k3", "++", ";", "}", "if", "(", "j3", "==", "par5", "-", "j2", ")", "{", "k3", "-=", "3", ";", "}", "if", "(", "j3", "==", "par5", "+", "j2", ")", "{", "k3", "+=", "3", ";", "}", "if", "(", "i", "==", "0", "||", "k1", "<", "par4", "+", "j", ")", "{", "if", "(", "(", "i3", "==", "par3", "-", "j2", "||", "i3", "==", "par3", "+", "j2", ")", "&&", "(", "j3", "==", "par5", "-", "j2", "||", "j3", "==", "par5", "+", "j2", ")", ")", "{", "continue", ";", "}", "if", "(", "i3", "==", "par3", "-", "(", "j2", "-", "1", ")", "&&", "j3", "==", "par5", "-", "j2", ")", "{", "k3", "=", "1", ";", "}", "if", "(", "i3", "==", "par3", "-", "j2", "&&", "j3", "==", "par5", "-", "(", "j2", "-", "1", ")", ")", "{", "k3", "=", "1", ";", "}", "if", "(", "i3", "==", "par3", "+", "(", "j2", "-", "1", ")", "&&", "j3", "==", "par5", "-", "j2", ")", "{", "k3", "=", "3", ";", "}", "if", "(", "i3", "==", "par3", "+", "j2", "&&", "j3", "==", "par5", "-", "(", "j2", "-", "1", ")", ")", "{", "k3", "=", "3", ";", "}", "if", "(", "i3", "==", "par3", "-", "(", "j2", "-", "1", ")", "&&", "j3", "==", "par5", "+", "j2", ")", "{", "k3", "=", "7", ";", "}", "if", "(", "i3", "==", "par3", "-", "j2", "&&", "j3", "==", "par5", "+", "(", "j2", "-", "1", ")", ")", "{", "k3", "=", "7", ";", "}", "if", "(", "i3", "==", "par3", "+", "(", "j2", "-", "1", ")", "&&", "j3", "==", "par5", "+", "j2", ")", "{", "k3", "=", "9", ";", "}", "if", "(", "i3", "==", "par3", "+", "j2", "&&", "j3", "==", "par5", "+", "(", "j2", "-", "1", ")", ")", "{", "k3", "=", "9", ";", "}", "}", "if", "(", "k3", "==", "5", "&&", "k1", "<", "par4", "+", "j", ")", "{", "k3", "=", "0", ";", "}", "if", "(", "(", "k3", "!=", "0", "||", "par4", ">=", "(", "par4", "+", "j", ")", "-", "1", ")", "&&", "!", "Block", ".", "opaqueCubeLookup", "[", "par1World", ".", "getBlockId", "(", "i3", ",", "k1", ",", "j3", ")", "]", ")", "{", "setBlockAndMetadata", "(", "par1World", ",", "i3", ",", "k1", ",", "j3", ",", "Block", ".", "mushroomCapBrown", ".", "blockID", "+", "i", ",", "k3", ")", ";", "}", "}", "}", "}", "for", "(", "int", "l1", "=", "0", ";", "l1", "<", "j", ";", "l1", "++", ")", "{", "int", "k2", "=", "par1World", ".", "getBlockId", "(", "par3", ",", "par4", "+", "l1", ",", "par5", ")", ";", "if", "(", "!", "Block", ".", "opaqueCubeLookup", "[", "k2", "]", ")", "{", "setBlockAndMetadata", "(", "par1World", ",", "par3", ",", "par4", "+", "l1", ",", "par5", ",", "Block", ".", "mushroomCapBrown", ".", "blockID", "+", "i", ",", "10", ")", ";", "}", "}", "return", "true", ";", "}", "}", "</s>" ]
9,740
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "net", ".", "DatagramPacket", ";", "import", "java", ".", "util", ".", "Date", ";", "import", "java", ".", "util", ".", "Random", ";", "class", "RConThreadQueryAuth", "{", "private", "long", "timestamp", ";", "private", "int", "randomChallenge", ";", "private", "byte", "requestID", "[", "]", ";", "private", "byte", "challengeValue", "[", "]", ";", "private", "String", "requestIDstring", ";", "final", "RConThreadQuery", "queryThread", ";", "public", "RConThreadQueryAuth", "(", "RConThreadQuery", "par1RConThreadQuery", ",", "DatagramPacket", "par2DatagramPacket", ")", "{", "queryThread", "=", "par1RConThreadQuery", ";", "timestamp", "=", "(", "new", "Date", "(", ")", ")", ".", "getTime", "(", ")", ";", "byte", "abyte0", "[", "]", "=", "par2DatagramPacket", ".", "getData", "(", ")", ";", "requestID", "=", "new", "byte", "[", "4", "]", ";", "requestID", "[", "0", "]", "=", "abyte0", "[", "3", "]", ";", "requestID", "[", "1", "]", "=", "abyte0", "[", "4", "]", ";", "requestID", "[", "2", "]", "=", "abyte0", "[", "5", "]", ";", "requestID", "[", "3", "]", "=", "abyte0", "[", "6", "]", ";", "requestIDstring", "=", "new", "String", "(", "requestID", ")", ";", "randomChallenge", "=", "(", "new", "Random", "(", ")", ")", ".", "nextInt", "(", "0x1000000", ")", ";", "challengeValue", "=", "String", ".", "format", "(", "\"t%s%d\u0000\"", ",", "new", "Object", "[", "]", "{", "requestIDstring", ",", "Integer", ".", "valueOf", "(", "randomChallenge", ")", "}", ")", ".", "getBytes", "(", ")", ";", "}", "public", "Boolean", "hasExpired", "(", "long", "par1", ")", "{", "return", "Boolean", ".", "valueOf", "(", "timestamp", "<", "par1", ")", ";", "}", "public", "int", "getRandomChallenge", "(", ")", "{", "return", "randomChallenge", ";", "}", "public", "byte", "[", "]", "getChallengeValue", "(", ")", "{", "return", "challengeValue", ";", "}", "public", "byte", "[", "]", "getRequestID", "(", ")", "{", "return", "requestID", ";", "}", "}", "</s>" ]
9,741
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "io", ".", "*", ";", "public", "class", "Packet54PlayNoteBlock", "extends", "Packet", "{", "public", "int", "xLocation", ";", "public", "int", "yLocation", ";", "public", "int", "zLocation", ";", "public", "int", "instrumentType", ";", "public", "int", "pitch", ";", "public", "Packet54PlayNoteBlock", "(", ")", "{", "}", "public", "Packet54PlayNoteBlock", "(", "int", "par1", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "int", "par5", ")", "{", "xLocation", "=", "par1", ";", "yLocation", "=", "par2", ";", "zLocation", "=", "par3", ";", "instrumentType", "=", "par4", ";", "pitch", "=", "par5", ";", "}", "public", "void", "readPacketData", "(", "DataInputStream", "par1DataInputStream", ")", "throws", "IOException", "{", "xLocation", "=", "par1DataInputStream", ".", "readInt", "(", ")", ";", "yLocation", "=", "par1DataInputStream", ".", "readShort", "(", ")", ";", "zLocation", "=", "par1DataInputStream", ".", "readInt", "(", ")", ";", "instrumentType", "=", "par1DataInputStream", ".", "read", "(", ")", ";", "pitch", "=", "par1DataInputStream", ".", "read", "(", ")", ";", "}", "public", "void", "writePacketData", "(", "DataOutputStream", "par1DataOutputStream", ")", "throws", "IOException", "{", "par1DataOutputStream", ".", "writeInt", "(", "xLocation", ")", ";", "par1DataOutputStream", ".", "writeShort", "(", "yLocation", ")", ";", "par1DataOutputStream", ".", "writeInt", "(", "zLocation", ")", ";", "par1DataOutputStream", ".", "write", "(", "instrumentType", ")", ";", "par1DataOutputStream", ".", "write", "(", "pitch", ")", ";", "}", "public", "void", "processPacket", "(", "NetHandler", "par1NetHandler", ")", "{", "par1NetHandler", ".", "handlePlayNoteBlock", "(", "this", ")", ";", "}", "public", "int", "getPacketSize", "(", ")", "{", "return", "12", ";", "}", "}", "</s>" ]
9,742
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "io", ".", "*", ";", "import", "java", ".", "util", ".", "List", ";", "public", "class", "Packet24MobSpawn", "extends", "Packet", "{", "public", "int", "entityId", ";", "public", "int", "type", ";", "public", "int", "xPosition", ";", "public", "int", "yPosition", ";", "public", "int", "zPosition", ";", "public", "byte", "yaw", ";", "public", "byte", "pitch", ";", "public", "byte", "field_48113_h", ";", "private", "DataWatcher", "metaData", ";", "private", "List", "receivedMetadata", ";", "public", "Packet24MobSpawn", "(", ")", "{", "}", "public", "Packet24MobSpawn", "(", "EntityLiving", "par1EntityLiving", ")", "{", "entityId", "=", "par1EntityLiving", ".", "entityId", ";", "type", "=", "(", "byte", ")", "EntityList", ".", "getEntityID", "(", "par1EntityLiving", ")", ";", "xPosition", "=", "MathHelper", ".", "floor_double", "(", "par1EntityLiving", ".", "posX", "*", "32D", ")", ";", "yPosition", "=", "MathHelper", ".", "floor_double", "(", "par1EntityLiving", ".", "posY", "*", "32D", ")", ";", "zPosition", "=", "MathHelper", ".", "floor_double", "(", "par1EntityLiving", ".", "posZ", "*", "32D", ")", ";", "yaw", "=", "(", "byte", ")", "(", "int", ")", "(", "(", "par1EntityLiving", ".", "rotationYaw", "*", "256F", ")", "/", "360F", ")", ";", "pitch", "=", "(", "byte", ")", "(", "int", ")", "(", "(", "par1EntityLiving", ".", "rotationPitch", "*", "256F", ")", "/", "360F", ")", ";", "field_48113_h", "=", "(", "byte", ")", "(", "int", ")", "(", "(", "par1EntityLiving", ".", "rotationYawHead", "*", "256F", ")", "/", "360F", ")", ";", "metaData", "=", "par1EntityLiving", ".", "getDataWatcher", "(", ")", ";", "}", "public", "void", "readPacketData", "(", "DataInputStream", "par1DataInputStream", ")", "throws", "IOException", "{", "entityId", "=", "par1DataInputStream", ".", "readInt", "(", ")", ";", "type", "=", "par1DataInputStream", ".", "readByte", "(", ")", "&", "0xff", ";", "xPosition", "=", "par1DataInputStream", ".", "readInt", "(", ")", ";", "yPosition", "=", "par1DataInputStream", ".", "readInt", "(", ")", ";", "zPosition", "=", "par1DataInputStream", ".", "readInt", "(", ")", ";", "yaw", "=", "par1DataInputStream", ".", "readByte", "(", ")", ";", "pitch", "=", "par1DataInputStream", ".", "readByte", "(", ")", ";", "field_48113_h", "=", "par1DataInputStream", ".", "readByte", "(", ")", ";", "receivedMetadata", "=", "DataWatcher", ".", "readWatchableObjects", "(", "par1DataInputStream", ")", ";", "}", "public", "void", "writePacketData", "(", "DataOutputStream", "par1DataOutputStream", ")", "throws", "IOException", "{", "par1DataOutputStream", ".", "writeInt", "(", "entityId", ")", ";", "par1DataOutputStream", ".", "writeByte", "(", "type", "&", "0xff", ")", ";", "par1DataOutputStream", ".", "writeInt", "(", "xPosition", ")", ";", "par1DataOutputStream", ".", "writeInt", "(", "yPosition", ")", ";", "par1DataOutputStream", ".", "writeInt", "(", "zPosition", ")", ";", "par1DataOutputStream", ".", "writeByte", "(", "yaw", ")", ";", "par1DataOutputStream", ".", "writeByte", "(", "pitch", ")", ";", "par1DataOutputStream", ".", "writeByte", "(", "field_48113_h", ")", ";", "metaData", ".", "writeWatchableObjects", "(", "par1DataOutputStream", ")", ";", "}", "public", "void", "processPacket", "(", "NetHandler", "par1NetHandler", ")", "{", "par1NetHandler", ".", "handleMobSpawn", "(", "this", ")", ";", "}", "public", "int", "getPacketSize", "(", ")", "{", "return", "20", ";", "}", "}", "</s>" ]
9,743
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "public", "class", "BlockTrapDoor", "extends", "Block", "{", "protected", "BlockTrapDoor", "(", "int", "par1", ",", "Material", "par2Material", ")", "{", "super", "(", "par1", ",", "par2Material", ")", ";", "blockIndexInTexture", "=", "84", ";", "if", "(", "par2Material", "==", "Material", ".", "iron", ")", "{", "blockIndexInTexture", "++", ";", "}", "float", "f", "=", "0.5F", ";", "float", "f1", "=", "1.0F", ";", "setBlockBounds", "(", "0.5F", "-", "f", ",", "0.0F", ",", "0.5F", "-", "f", ",", "0.5F", "+", "f", ",", "f1", ",", "0.5F", "+", "f", ")", ";", "}", "public", "boolean", "isOpaqueCube", "(", ")", "{", "return", "false", ";", "}", "public", "boolean", "renderAsNormalBlock", "(", ")", "{", "return", "false", ";", "}", "public", "boolean", "getBlocksMovement", "(", "IBlockAccess", "par1IBlockAccess", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ")", "{", "return", "!", "isTrapdoorOpen", "(", "par1IBlockAccess", ".", "getBlockMetadata", "(", "par2", ",", "par3", ",", "par4", ")", ")", ";", "}", "public", "int", "getRenderType", "(", ")", "{", "return", "0", ";", "}", "public", "AxisAlignedBB", "getCollisionBoundingBoxFromPool", "(", "World", "par1World", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ")", "{", "setBlockBoundsBasedOnState", "(", "par1World", ",", "par2", ",", "par3", ",", "par4", ")", ";", "return", "super", ".", "getCollisionBoundingBoxFromPool", "(", "par1World", ",", "par2", ",", "par3", ",", "par4", ")", ";", "}", "public", "void", "setBlockBoundsBasedOnState", "(", "IBlockAccess", "par1IBlockAccess", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ")", "{", "setBlockBoundsForBlockRender", "(", "par1IBlockAccess", ".", "getBlockMetadata", "(", "par2", ",", "par3", ",", "par4", ")", ")", ";", "}", "public", "void", "setBlockBoundsForItemRender", "(", ")", "{", "float", "f", "=", "0.1875F", ";", "setBlockBounds", "(", "0.0F", ",", "0.5F", "-", "f", "/", "2.0F", ",", "0.0F", ",", "1.0F", ",", "0.5F", "+", "f", "/", "2.0F", ",", "1.0F", ")", ";", "}", "public", "void", "setBlockBoundsForBlockRender", "(", "int", "par1", ")", "{", "float", "f", "=", "0.1875F", ";", "setBlockBounds", "(", "0.0F", ",", "0.0F", ",", "0.0F", ",", "1.0F", ",", "f", ",", "1.0F", ")", ";", "if", "(", "isTrapdoorOpen", "(", "par1", ")", ")", "{", "if", "(", "(", "par1", "&", "3", ")", "==", "0", ")", "{", "setBlockBounds", "(", "0.0F", ",", "0.0F", ",", "1.0F", "-", "f", ",", "1.0F", ",", "1.0F", ",", "1.0F", ")", ";", "}", "if", "(", "(", "par1", "&", "3", ")", "==", "1", ")", "{", "setBlockBounds", "(", "0.0F", ",", "0.0F", ",", "0.0F", ",", "1.0F", ",", "1.0F", ",", "f", ")", ";", "}", "if", "(", "(", "par1", "&", "3", ")", "==", "2", ")", "{", "setBlockBounds", "(", "1.0F", "-", "f", ",", "0.0F", ",", "0.0F", ",", "1.0F", ",", "1.0F", ",", "1.0F", ")", ";", "}", "if", "(", "(", "par1", "&", "3", ")", "==", "3", ")", "{", "setBlockBounds", "(", "0.0F", ",", "0.0F", ",", "0.0F", ",", "f", ",", "1.0F", ",", "1.0F", ")", ";", "}", "}", "}", "public", "void", "onBlockClicked", "(", "World", "par1World", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "EntityPlayer", "par5EntityPlayer", ")", "{", "blockActivated", "(", "par1World", ",", "par2", ",", "par3", ",", "par4", ",", "par5EntityPlayer", ")", ";", "}", "public", "boolean", "blockActivated", "(", "World", "par1World", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "EntityPlayer", "par5EntityPlayer", ")", "{", "if", "(", "blockMaterial", "==", "Material", ".", "iron", ")", "{", "return", "true", ";", "}", "else", "{", "int", "i", "=", "par1World", ".", "getBlockMetadata", "(", "par2", ",", "par3", ",", "par4", ")", ";", "par1World", ".", "setBlockMetadataWithNotify", "(", "par2", ",", "par3", ",", "par4", ",", "i", "^", "4", ")", ";", "par1World", ".", "playAuxSFXAtEntity", "(", "par5EntityPlayer", ",", "1003", ",", "par2", ",", "par3", ",", "par4", ",", "0", ")", ";", "return", "true", ";", "}", "}", "public", "void", "onPoweredBlockChange", "(", "World", "par1World", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "boolean", "par5", ")", "{", "int", "i", "=", "par1World", ".", "getBlockMetadata", "(", "par2", ",", "par3", ",", "par4", ")", ";", "boolean", "flag", "=", "(", "i", "&", "4", ")", ">", "0", ";", "if", "(", "flag", "==", "par5", ")", "{", "return", ";", "}", "else", "{", "par1World", ".", "setBlockMetadataWithNotify", "(", "par2", ",", "par3", ",", "par4", ",", "i", "^", "4", ")", ";", "par1World", ".", "playAuxSFXAtEntity", "(", "null", ",", "1003", ",", "par2", ",", "par3", ",", "par4", ",", "0", ")", ";", "return", ";", "}", "}", "public", "void", "onNeighborBlockChange", "(", "World", "par1World", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "int", "par5", ")", "{", "if", "(", "par1World", ".", "isRemote", ")", "{", "return", ";", "}", "int", "i", "=", "par1World", ".", "getBlockMetadata", "(", "par2", ",", "par3", ",", "par4", ")", ";", "int", "j", "=", "par2", ";", "int", "k", "=", "par4", ";", "if", "(", "(", "i", "&", "3", ")", "==", "0", ")", "{", "k", "++", ";", "}", "if", "(", "(", "i", "&", "3", ")", "==", "1", ")", "{", "k", "--", ";", "}", "if", "(", "(", "i", "&", "3", ")", "==", "2", ")", "{", "j", "++", ";", "}", "if", "(", "(", "i", "&", "3", ")", "==", "3", ")", "{", "j", "--", ";", "}", "if", "(", "!", "isValidSupportBlock", "(", "par1World", ".", "getBlockId", "(", "j", ",", "par3", ",", "k", ")", ")", ")", "{", "par1World", ".", "setBlockWithNotify", "(", "par2", ",", "par3", ",", "par4", ",", "0", ")", ";", "dropBlockAsItem", "(", "par1World", ",", "par2", ",", "par3", ",", "par4", ",", "i", ",", "0", ")", ";", "}", "boolean", "flag", "=", "par1World", ".", "isBlockIndirectlyGettingPowered", "(", "par2", ",", "par3", ",", "par4", ")", ";", "if", "(", "flag", "||", "par5", ">", "0", "&&", "Block", ".", "blocksList", "[", "par5", "]", ".", "canProvidePower", "(", ")", "||", "par5", "==", "0", ")", "{", "onPoweredBlockChange", "(", "par1World", ",", "par2", ",", "par3", ",", "par4", ",", "flag", ")", ";", "}", "}", "public", "MovingObjectPosition", "collisionRayTrace", "(", "World", "par1World", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "Vec3D", "par5Vec3D", ",", "Vec3D", "par6Vec3D", ")", "{", "setBlockBoundsBasedOnState", "(", "par1World", ",", "par2", ",", "par3", ",", "par4", ")", ";", "return", "super", ".", "collisionRayTrace", "(", "par1World", ",", "par2", ",", "par3", ",", "par4", ",", "par5Vec3D", ",", "par6Vec3D", ")", ";", "}", "public", "void", "onBlockPlaced", "(", "World", "par1World", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "int", "par5", ")", "{", "byte", "byte0", "=", "0", ";", "if", "(", "par5", "==", "2", ")", "{", "byte0", "=", "0", ";", "}", "if", "(", "par5", "==", "3", ")", "{", "byte0", "=", "1", ";", "}", "if", "(", "par5", "==", "4", ")", "{", "byte0", "=", "2", ";", "}", "if", "(", "par5", "==", "5", ")", "{", "byte0", "=", "3", ";", "}", "par1World", ".", "setBlockMetadataWithNotify", "(", "par2", ",", "par3", ",", "par4", ",", "byte0", ")", ";", "}", "public", "boolean", "canPlaceBlockOnSide", "(", "World", "par1World", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "int", "par5", ")", "{", "if", "(", "par5", "==", "0", ")", "{", "return", "false", ";", "}", "if", "(", "par5", "==", "1", ")", "{", "return", "false", ";", "}", "if", "(", "par5", "==", "2", ")", "{", "par4", "++", ";", "}", "if", "(", "par5", "==", "3", ")", "{", "par4", "--", ";", "}", "if", "(", "par5", "==", "4", ")", "{", "par2", "++", ";", "}", "if", "(", "par5", "==", "5", ")", "{", "par2", "--", ";", "}", "return", "isValidSupportBlock", "(", "par1World", ".", "getBlockId", "(", "par2", ",", "par3", ",", "par4", ")", ")", ";", "}", "public", "static", "boolean", "isTrapdoorOpen", "(", "int", "par0", ")", "{", "return", "(", "par0", "&", "4", ")", "!=", "0", ";", "}", "private", "static", "boolean", "isValidSupportBlock", "(", "int", "par0", ")", "{", "if", "(", "par0", "<=", "0", ")", "{", "return", "false", ";", "}", "else", "{", "Block", "block", "=", "Block", ".", "blocksList", "[", "par0", "]", ";", "return", "block", "!=", "null", "&&", "block", ".", "blockMaterial", ".", "isOpaque", "(", ")", "&&", "block", ".", "renderAsNormalBlock", "(", ")", "||", "block", "==", "Block", ".", "glowStone", ";", "}", "}", "}", "</s>" ]
9,744
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "public", "class", "ItemAppleGold", "extends", "ItemFood", "{", "public", "ItemAppleGold", "(", "int", "par1", ",", "int", "par2", ",", "float", "par3", ",", "boolean", "par4", ")", "{", "super", "(", "par1", ",", "par2", ",", "par3", ",", "par4", ")", ";", "}", "}", "</s>" ]
9,745
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "public", "abstract", "class", "BlockContainer", "extends", "Block", "{", "protected", "BlockContainer", "(", "int", "par1", ",", "Material", "par2Material", ")", "{", "super", "(", "par1", ",", "par2Material", ")", ";", "isBlockContainer", "=", "true", ";", "}", "protected", "BlockContainer", "(", "int", "par1", ",", "int", "par2", ",", "Material", "par3Material", ")", "{", "super", "(", "par1", ",", "par2", ",", "par3Material", ")", ";", "isBlockContainer", "=", "true", ";", "}", "public", "void", "onBlockAdded", "(", "World", "par1World", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ")", "{", "super", ".", "onBlockAdded", "(", "par1World", ",", "par2", ",", "par3", ",", "par4", ")", ";", "par1World", ".", "setBlockTileEntity", "(", "par2", ",", "par3", ",", "par4", ",", "getBlockEntity", "(", ")", ")", ";", "}", "public", "void", "onBlockRemoval", "(", "World", "par1World", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ")", "{", "super", ".", "onBlockRemoval", "(", "par1World", ",", "par2", ",", "par3", ",", "par4", ")", ";", "par1World", ".", "removeBlockTileEntity", "(", "par2", ",", "par3", ",", "par4", ")", ";", "}", "public", "abstract", "TileEntity", "getBlockEntity", "(", ")", ";", "public", "void", "powerBlock", "(", "World", "par1World", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "int", "par5", ",", "int", "par6", ")", "{", "super", ".", "powerBlock", "(", "par1World", ",", "par2", ",", "par3", ",", "par4", ",", "par5", ",", "par6", ")", ";", "TileEntity", "tileentity", "=", "par1World", ".", "getBlockTileEntity", "(", "par2", ",", "par3", ",", "par4", ")", ";", "if", "(", "tileentity", "!=", "null", ")", "{", "tileentity", ".", "onTileEntityPowered", "(", "par5", ",", "par6", ")", ";", "}", "}", "}", "</s>" ]
9,746
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "List", ";", "import", "java", ".", "util", ".", "Random", ";", "public", "class", "ComponentNetherBridgeStairs", "extends", "ComponentNetherBridgePiece", "{", "public", "ComponentNetherBridgeStairs", "(", "int", "par1", ",", "Random", "par2Random", ",", "StructureBoundingBox", "par3StructureBoundingBox", ",", "int", "par4", ")", "{", "super", "(", "par1", ")", ";", "coordBaseMode", "=", "par4", ";", "boundingBox", "=", "par3StructureBoundingBox", ";", "}", "public", "void", "buildComponent", "(", "StructureComponent", "par1StructureComponent", ",", "List", "par2List", ",", "Random", "par3Random", ")", "{", "getNextComponentZ", "(", "(", "ComponentNetherBridgeStartPiece", ")", "par1StructureComponent", ",", "par2List", ",", "par3Random", ",", "6", ",", "2", ",", "false", ")", ";", "}", "public", "static", "ComponentNetherBridgeStairs", "createValidComponent", "(", "List", "par0List", ",", "Random", "par1Random", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "int", "par5", ",", "int", "par6", ")", "{", "StructureBoundingBox", "structureboundingbox", "=", "StructureBoundingBox", ".", "getComponentToAddBoundingBox", "(", "par2", ",", "par3", ",", "par4", ",", "-", "2", ",", "0", ",", "0", ",", "7", ",", "11", ",", "7", ",", "par5", ")", ";", "if", "(", "!", "isAboveGround", "(", "structureboundingbox", ")", "||", "StructureComponent", ".", "findIntersecting", "(", "par0List", ",", "structureboundingbox", ")", "!=", "null", ")", "{", "return", "null", ";", "}", "else", "{", "return", "new", "ComponentNetherBridgeStairs", "(", "par6", ",", "par1Random", ",", "structureboundingbox", ",", "par5", ")", ";", "}", "}", "public", "boolean", "addComponentParts", "(", "World", "par1World", ",", "Random", "par2Random", ",", "StructureBoundingBox", "par3StructureBoundingBox", ")", "{", "fillWithBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "0", ",", "0", ",", "0", ",", "6", ",", "1", ",", "6", ",", "Block", ".", "netherBrick", ".", "blockID", ",", "Block", ".", "netherBrick", ".", "blockID", ",", "false", ")", ";", "fillWithBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "0", ",", "2", ",", "0", ",", "6", ",", "10", ",", "6", ",", "0", ",", "0", ",", "false", ")", ";", "fillWithBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "0", ",", "2", ",", "0", ",", "1", ",", "8", ",", "0", ",", "Block", ".", "netherBrick", ".", "blockID", ",", "Block", ".", "netherBrick", ".", "blockID", ",", "false", ")", ";", "fillWithBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "5", ",", "2", ",", "0", ",", "6", ",", "8", ",", "0", ",", "Block", ".", "netherBrick", ".", "blockID", ",", "Block", ".", "netherBrick", ".", "blockID", ",", "false", ")", ";", "fillWithBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "0", ",", "2", ",", "1", ",", "0", ",", "8", ",", "6", ",", "Block", ".", "netherBrick", ".", "blockID", ",", "Block", ".", "netherBrick", ".", "blockID", ",", "false", ")", ";", "fillWithBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "6", ",", "2", ",", "1", ",", "6", ",", "8", ",", "6", ",", "Block", ".", "netherBrick", ".", "blockID", ",", "Block", ".", "netherBrick", ".", "blockID", ",", "false", ")", ";", "fillWithBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "1", ",", "2", ",", "6", ",", "5", ",", "8", ",", "6", ",", "Block", ".", "netherBrick", ".", "blockID", ",", "Block", ".", "netherBrick", ".", "blockID", ",", "false", ")", ";", "fillWithBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "0", ",", "3", ",", "2", ",", "0", ",", "5", ",", "4", ",", "Block", ".", "netherFence", ".", "blockID", ",", "Block", ".", "netherFence", ".", "blockID", ",", "false", ")", ";", "fillWithBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "6", ",", "3", ",", "2", ",", "6", ",", "5", ",", "2", ",", "Block", ".", "netherFence", ".", "blockID", ",", "Block", ".", "netherFence", ".", "blockID", ",", "false", ")", ";", "fillWithBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "6", ",", "3", ",", "4", ",", "6", ",", "5", ",", "4", ",", "Block", ".", "netherFence", ".", "blockID", ",", "Block", ".", "netherFence", ".", "blockID", ",", "false", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "netherBrick", ".", "blockID", ",", "0", ",", "5", ",", "2", ",", "5", ",", "par3StructureBoundingBox", ")", ";", "fillWithBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "4", ",", "2", ",", "5", ",", "4", ",", "3", ",", "5", ",", "Block", ".", "netherBrick", ".", "blockID", ",", "Block", ".", "netherBrick", ".", "blockID", ",", "false", ")", ";", "fillWithBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "3", ",", "2", ",", "5", ",", "3", ",", "4", ",", "5", ",", "Block", ".", "netherBrick", ".", "blockID", ",", "Block", ".", "netherBrick", ".", "blockID", ",", "false", ")", ";", "fillWithBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "2", ",", "2", ",", "5", ",", "2", ",", "5", ",", "5", ",", "Block", ".", "netherBrick", ".", "blockID", ",", "Block", ".", "netherBrick", ".", "blockID", ",", "false", ")", ";", "fillWithBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "1", ",", "2", ",", "5", ",", "1", ",", "6", ",", "5", ",", "Block", ".", "netherBrick", ".", "blockID", ",", "Block", ".", "netherBrick", ".", "blockID", ",", "false", ")", ";", "fillWithBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "1", ",", "7", ",", "1", ",", "5", ",", "7", ",", "4", ",", "Block", ".", "netherBrick", ".", "blockID", ",", "Block", ".", "netherBrick", ".", "blockID", ",", "false", ")", ";", "fillWithBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "6", ",", "8", ",", "2", ",", "6", ",", "8", ",", "4", ",", "0", ",", "0", ",", "false", ")", ";", "fillWithBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "2", ",", "6", ",", "0", ",", "4", ",", "8", ",", "0", ",", "Block", ".", "netherBrick", ".", "blockID", ",", "Block", ".", "netherBrick", ".", "blockID", ",", "false", ")", ";", "fillWithBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "2", ",", "5", ",", "0", ",", "4", ",", "5", ",", "0", ",", "Block", ".", "netherFence", ".", "blockID", ",", "Block", ".", "netherFence", ".", "blockID", ",", "false", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<=", "6", ";", "i", "++", ")", "{", "for", "(", "int", "j", "=", "0", ";", "j", "<=", "6", ";", "j", "++", ")", "{", "fillCurrentPositionBlocksDownwards", "(", "par1World", ",", "Block", ".", "netherBrick", ".", "blockID", ",", "0", ",", "i", ",", "-", "1", ",", "j", ",", "par3StructureBoundingBox", ")", ";", "}", "}", "return", "true", ";", "}", "}", "</s>" ]
9,747
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "public", "class", "EntityAIPanic", "extends", "EntityAIBase", "{", "private", "EntityCreature", "field_48208_a", ";", "private", "float", "field_48206_b", ";", "private", "double", "field_48207_c", ";", "private", "double", "field_48204_d", ";", "private", "double", "field_48205_e", ";", "public", "EntityAIPanic", "(", "EntityCreature", "par1EntityCreature", ",", "float", "par2", ")", "{", "field_48208_a", "=", "par1EntityCreature", ";", "field_48206_b", "=", "par2", ";", "setMutexBits", "(", "1", ")", ";", "}", "public", "boolean", "shouldExecute", "(", ")", "{", "if", "(", "field_48208_a", ".", "getAITarget", "(", ")", "==", "null", ")", "{", "return", "false", ";", "}", "Vec3D", "vec3d", "=", "RandomPositionGenerator", ".", "func_48396_a", "(", "field_48208_a", ",", "5", ",", "4", ")", ";", "if", "(", "vec3d", "==", "null", ")", "{", "return", "false", ";", "}", "else", "{", "field_48207_c", "=", "vec3d", ".", "xCoord", ";", "field_48204_d", "=", "vec3d", ".", "yCoord", ";", "field_48205_e", "=", "vec3d", ".", "zCoord", ";", "return", "true", ";", "}", "}", "public", "void", "startExecuting", "(", ")", "{", "field_48208_a", ".", "getNavigator", "(", ")", ".", "func_48658_a", "(", "field_48207_c", ",", "field_48204_d", ",", "field_48205_e", ",", "field_48206_b", ")", ";", "}", "public", "boolean", "continueExecuting", "(", ")", "{", "return", "!", "field_48208_a", ".", "getNavigator", "(", ")", ".", "noPath", "(", ")", ";", "}", "}", "</s>" ]
9,748
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "Random", ";", "public", "class", "EntityCow", "extends", "EntityAnimal", "{", "public", "EntityCow", "(", "World", "par1World", ")", "{", "super", "(", "par1World", ")", ";", "texture", "=", "\"/mob/cow.png\"", ";", "setSize", "(", "0.9F", ",", "1.3F", ")", ";", "getNavigator", "(", ")", ".", "func_48656_a", "(", "true", ")", ";", "tasks", ".", "addTask", "(", "0", ",", "new", "EntityAISwimming", "(", "this", ")", ")", ";", "tasks", ".", "addTask", "(", "1", ",", "new", "EntityAIPanic", "(", "this", ",", "0.38F", ")", ")", ";", "tasks", ".", "addTask", "(", "2", ",", "new", "EntityAIMate", "(", "this", ",", "0.2F", ")", ")", ";", "tasks", ".", "addTask", "(", "3", ",", "new", "EntityAITempt", "(", "this", ",", "0.25F", ",", "Item", ".", "wheat", ".", "shiftedIndex", ",", "false", ")", ")", ";", "tasks", ".", "addTask", "(", "4", ",", "new", "EntityAIFollowParent", "(", "this", ",", "0.25F", ")", ")", ";", "tasks", ".", "addTask", "(", "5", ",", "new", "EntityAIWander", "(", "this", ",", "0.2F", ")", ")", ";", "tasks", ".", "addTask", "(", "6", ",", "new", "EntityAIWatchClosest", "(", "this", ",", "net", ".", "minecraft", ".", "src", ".", "EntityPlayer", ".", "class", ",", "6F", ")", ")", ";", "tasks", ".", "addTask", "(", "7", ",", "new", "EntityAILookIdle", "(", "this", ")", ")", ";", "}", "public", "boolean", "isAIEnabled", "(", ")", "{", "return", "true", ";", "}", "public", "int", "getMaxHealth", "(", ")", "{", "return", "10", ";", "}", "public", "void", "writeEntityToNBT", "(", "NBTTagCompound", "par1NBTTagCompound", ")", "{", "super", ".", "writeEntityToNBT", "(", "par1NBTTagCompound", ")", ";", "}", "public", "void", "readEntityFromNBT", "(", "NBTTagCompound", "par1NBTTagCompound", ")", "{", "super", ".", "readEntityFromNBT", "(", "par1NBTTagCompound", ")", ";", "}", "protected", "String", "getLivingSound", "(", ")", "{", "return", "\"mob.cow\"", ";", "}", "protected", "String", "getHurtSound", "(", ")", "{", "return", "\"mob.cowhurt\"", ";", "}", "protected", "String", "getDeathSound", "(", ")", "{", "return", "\"mob.cowhurt\"", ";", "}", "protected", "float", "getSoundVolume", "(", ")", "{", "return", "0.4F", ";", "}", "protected", "int", "getDropItemId", "(", ")", "{", "return", "Item", ".", "leather", ".", "shiftedIndex", ";", "}", "protected", "void", "dropFewItems", "(", "boolean", "par1", ",", "int", "par2", ")", "{", "int", "i", "=", "rand", ".", "nextInt", "(", "3", ")", "+", "rand", ".", "nextInt", "(", "1", "+", "par2", ")", ";", "for", "(", "int", "j", "=", "0", ";", "j", "<", "i", ";", "j", "++", ")", "{", "dropItem", "(", "Item", ".", "leather", ".", "shiftedIndex", ",", "1", ")", ";", "}", "i", "=", "rand", ".", "nextInt", "(", "3", ")", "+", "1", "+", "rand", ".", "nextInt", "(", "1", "+", "par2", ")", ";", "for", "(", "int", "k", "=", "0", ";", "k", "<", "i", ";", "k", "++", ")", "{", "if", "(", "isBurning", "(", ")", ")", "{", "dropItem", "(", "Item", ".", "beefCooked", ".", "shiftedIndex", ",", "1", ")", ";", "}", "else", "{", "dropItem", "(", "Item", ".", "beefRaw", ".", "shiftedIndex", ",", "1", ")", ";", "}", "}", "}", "public", "boolean", "interact", "(", "EntityPlayer", "par1EntityPlayer", ")", "{", "ItemStack", "itemstack", "=", "par1EntityPlayer", ".", "inventory", ".", "getCurrentItem", "(", ")", ";", "if", "(", "itemstack", "!=", "null", "&&", "itemstack", ".", "itemID", "==", "Item", ".", "bucketEmpty", ".", "shiftedIndex", ")", "{", "par1EntityPlayer", ".", "inventory", ".", "setInventorySlotContents", "(", "par1EntityPlayer", ".", "inventory", ".", "currentItem", ",", "new", "ItemStack", "(", "Item", ".", "bucketMilk", ")", ")", ";", "return", "true", ";", "}", "else", "{", "return", "super", ".", "interact", "(", "par1EntityPlayer", ")", ";", "}", "}", "public", "EntityAnimal", "spawnBabyAnimal", "(", "EntityAnimal", "par1EntityAnimal", ")", "{", "return", "new", "EntityCow", "(", "worldObj", ")", ";", "}", "}", "</s>" ]
9,749
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "Random", ";", "public", "class", "WorldGenDesertWells", "extends", "WorldGenerator", "{", "public", "WorldGenDesertWells", "(", ")", "{", "}", "public", "boolean", "generate", "(", "World", "par1World", ",", "Random", "par2Random", ",", "int", "par3", ",", "int", "par4", ",", "int", "par5", ")", "{", "for", "(", ";", "par1World", ".", "isAirBlock", "(", "par3", ",", "par4", ",", "par5", ")", "&&", "par4", ">", "2", ";", "par4", "--", ")", "{", "}", "int", "i", "=", "par1World", ".", "getBlockId", "(", "par3", ",", "par4", ",", "par5", ")", ";", "if", "(", "i", "!=", "Block", ".", "sand", ".", "blockID", ")", "{", "return", "false", ";", "}", "for", "(", "int", "j", "=", "-", "2", ";", "j", "<=", "2", ";", "j", "++", ")", "{", "for", "(", "int", "k1", "=", "-", "2", ";", "k1", "<=", "2", ";", "k1", "++", ")", "{", "if", "(", "par1World", ".", "isAirBlock", "(", "par3", "+", "j", ",", "par4", "-", "1", ",", "par5", "+", "k1", ")", "&&", "par1World", ".", "isAirBlock", "(", "par3", "+", "j", ",", "par4", "-", "2", ",", "par5", "+", "k1", ")", ")", "{", "return", "false", ";", "}", "}", "}", "for", "(", "int", "k", "=", "-", "1", ";", "k", "<=", "0", ";", "k", "++", ")", "{", "for", "(", "int", "l1", "=", "-", "2", ";", "l1", "<=", "2", ";", "l1", "++", ")", "{", "for", "(", "int", "k2", "=", "-", "2", ";", "k2", "<=", "2", ";", "k2", "++", ")", "{", "par1World", ".", "setBlock", "(", "par3", "+", "l1", ",", "par4", "+", "k", ",", "par5", "+", "k2", ",", "Block", ".", "sandStone", ".", "blockID", ")", ";", "}", "}", "}", "par1World", ".", "setBlock", "(", "par3", ",", "par4", ",", "par5", ",", "Block", ".", "waterMoving", ".", "blockID", ")", ";", "par1World", ".", "setBlock", "(", "par3", "-", "1", ",", "par4", ",", "par5", ",", "Block", ".", "waterMoving", ".", "blockID", ")", ";", "par1World", ".", "setBlock", "(", "par3", "+", "1", ",", "par4", ",", "par5", ",", "Block", ".", "waterMoving", ".", "blockID", ")", ";", "par1World", ".", "setBlock", "(", "par3", ",", "par4", ",", "par5", "-", "1", ",", "Block", ".", "waterMoving", ".", "blockID", ")", ";", "par1World", ".", "setBlock", "(", "par3", ",", "par4", ",", "par5", "+", "1", ",", "Block", ".", "waterMoving", ".", "blockID", ")", ";", "for", "(", "int", "l", "=", "-", "2", ";", "l", "<=", "2", ";", "l", "++", ")", "{", "for", "(", "int", "i2", "=", "-", "2", ";", "i2", "<=", "2", ";", "i2", "++", ")", "{", "if", "(", "l", "==", "-", "2", "||", "l", "==", "2", "||", "i2", "==", "-", "2", "||", "i2", "==", "2", ")", "{", "par1World", ".", "setBlock", "(", "par3", "+", "l", ",", "par4", "+", "1", ",", "par5", "+", "i2", ",", "Block", ".", "sandStone", ".", "blockID", ")", ";", "}", "}", "}", "par1World", ".", "setBlockAndMetadata", "(", "par3", "+", "2", ",", "par4", "+", "1", ",", "par5", ",", "Block", ".", "stairSingle", ".", "blockID", ",", "1", ")", ";", "par1World", ".", "setBlockAndMetadata", "(", "par3", "-", "2", ",", "par4", "+", "1", ",", "par5", ",", "Block", ".", "stairSingle", ".", "blockID", ",", "1", ")", ";", "par1World", ".", "setBlockAndMetadata", "(", "par3", ",", "par4", "+", "1", ",", "par5", "+", "2", ",", "Block", ".", "stairSingle", ".", "blockID", ",", "1", ")", ";", "par1World", ".", "setBlockAndMetadata", "(", "par3", ",", "par4", "+", "1", ",", "par5", "-", "2", ",", "Block", ".", "stairSingle", ".", "blockID", ",", "1", ")", ";", "for", "(", "int", "i1", "=", "-", "1", ";", "i1", "<=", "1", ";", "i1", "++", ")", "{", "for", "(", "int", "j2", "=", "-", "1", ";", "j2", "<=", "1", ";", "j2", "++", ")", "{", "if", "(", "i1", "==", "0", "&&", "j2", "==", "0", ")", "{", "par1World", ".", "setBlock", "(", "par3", "+", "i1", ",", "par4", "+", "4", ",", "par5", "+", "j2", ",", "Block", ".", "sandStone", ".", "blockID", ")", ";", "}", "else", "{", "par1World", ".", "setBlockAndMetadata", "(", "par3", "+", "i1", ",", "par4", "+", "4", ",", "par5", "+", "j2", ",", "Block", ".", "stairSingle", ".", "blockID", ",", "1", ")", ";", "}", "}", "}", "for", "(", "int", "j1", "=", "1", ";", "j1", "<=", "3", ";", "j1", "++", ")", "{", "par1World", ".", "setBlock", "(", "par3", "-", "1", ",", "par4", "+", "j1", ",", "par5", "-", "1", ",", "Block", ".", "sandStone", ".", "blockID", ")", ";", "par1World", ".", "setBlock", "(", "par3", "-", "1", ",", "par4", "+", "j1", ",", "par5", "+", "1", ",", "Block", ".", "sandStone", ".", "blockID", ")", ";", "par1World", ".", "setBlock", "(", "par3", "+", "1", ",", "par4", "+", "j1", ",", "par5", "-", "1", ",", "Block", ".", "sandStone", ".", "blockID", ")", ";", "par1World", ".", "setBlock", "(", "par3", "+", "1", ",", "par4", "+", "j1", ",", "par5", "+", "1", ",", "Block", ".", "sandStone", ".", "blockID", ")", ";", "}", "return", "true", ";", "}", "}", "</s>" ]
9,750
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "public", "class", "ItemCloth", "extends", "ItemBlock", "{", "public", "ItemCloth", "(", "int", "par1", ")", "{", "super", "(", "par1", ")", ";", "setMaxDamage", "(", "0", ")", ";", "setHasSubtypes", "(", "true", ")", ";", "}", "public", "int", "getMetadata", "(", "int", "par1", ")", "{", "return", "par1", ";", "}", "public", "String", "getItemNameIS", "(", "ItemStack", "par1ItemStack", ")", "{", "return", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "super", ".", "getItemName", "(", ")", ")", ".", "append", "(", "\".\"", ")", ".", "append", "(", "ItemDye", ".", "dyeColorNames", "[", "BlockCloth", ".", "getBlockFromDye", "(", "par1ItemStack", ".", "getItemDamage", "(", ")", ")", "]", ")", ".", "toString", "(", ")", ";", "}", "}", "</s>" ]
9,751
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "ArrayList", ";", "import", "java", ".", "util", ".", "Random", ";", "public", "class", "ComponentStrongholdStairs2", "extends", "ComponentStrongholdStairs", "{", "public", "StructureStrongholdPieceWeight", "field_35329_a", ";", "public", "ComponentStrongholdPortalRoom", "portalRoom", ";", "public", "ArrayList", "field_35328_b", ";", "public", "ComponentStrongholdStairs2", "(", "int", "par1", ",", "Random", "par2Random", ",", "int", "par3", ",", "int", "par4", ")", "{", "super", "(", "0", ",", "par2Random", ",", "par3", ",", "par4", ")", ";", "field_35328_b", "=", "new", "ArrayList", "(", ")", ";", "}", "public", "ChunkPosition", "getCenter", "(", ")", "{", "if", "(", "portalRoom", "!=", "null", ")", "{", "return", "portalRoom", ".", "getCenter", "(", ")", ";", "}", "else", "{", "return", "super", ".", "getCenter", "(", ")", ";", "}", "}", "}", "</s>" ]
9,752
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "public", "class", "ServerCommand", "{", "public", "final", "String", "command", ";", "public", "final", "ICommandListener", "commandListener", ";", "public", "ServerCommand", "(", "String", "par1Str", ",", "ICommandListener", "par2ICommandListener", ")", "{", "command", "=", "par1Str", ";", "commandListener", "=", "par2ICommandListener", ";", "}", "}", "</s>" ]
9,753
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "public", "class", "GenLayerSwampRivers", "extends", "GenLayer", "{", "public", "GenLayerSwampRivers", "(", "long", "par1", ",", "GenLayer", "par3GenLayer", ")", "{", "super", "(", "par1", ")", ";", "parent", "=", "par3GenLayer", ";", "}", "public", "int", "[", "]", "getInts", "(", "int", "par1", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ")", "{", "int", "ai", "[", "]", "=", "parent", ".", "getInts", "(", "par1", "-", "1", ",", "par2", "-", "1", ",", "par3", "+", "2", ",", "par4", "+", "2", ")", ";", "int", "ai1", "[", "]", "=", "IntCache", ".", "getIntCache", "(", "par3", "*", "par4", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "par4", ";", "i", "++", ")", "{", "for", "(", "int", "j", "=", "0", ";", "j", "<", "par3", ";", "j", "++", ")", "{", "initChunkSeed", "(", "j", "+", "par1", ",", "i", "+", "par2", ")", ";", "int", "k", "=", "ai", "[", "j", "+", "1", "+", "(", "i", "+", "1", ")", "*", "(", "par3", "+", "2", ")", "]", ";", "if", "(", "k", "==", "BiomeGenBase", ".", "swampland", ".", "biomeID", "&&", "nextInt", "(", "6", ")", "==", "0", ")", "{", "ai1", "[", "j", "+", "i", "*", "par3", "]", "=", "BiomeGenBase", ".", "river", ".", "biomeID", ";", "continue", ";", "}", "if", "(", "(", "k", "==", "BiomeGenBase", ".", "jungle", ".", "biomeID", "||", "k", "==", "BiomeGenBase", ".", "jungleHills", ".", "biomeID", ")", "&&", "nextInt", "(", "8", ")", "==", "0", ")", "{", "ai1", "[", "j", "+", "i", "*", "par3", "]", "=", "BiomeGenBase", ".", "river", ".", "biomeID", ";", "}", "else", "{", "ai1", "[", "j", "+", "i", "*", "par3", "]", "=", "k", ";", "}", "}", "}", "return", "ai1", ";", "}", "}", "</s>" ]
9,754
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "ArrayList", ";", "import", "java", ".", "util", ".", "Random", ";", "public", "class", "BlockBrewingStand", "extends", "BlockContainer", "{", "private", "Random", "rand", ";", "public", "BlockBrewingStand", "(", "int", "par1", ")", "{", "super", "(", "par1", ",", "Material", ".", "iron", ")", ";", "rand", "=", "new", "Random", "(", ")", ";", "blockIndexInTexture", "=", "157", ";", "}", "public", "boolean", "isOpaqueCube", "(", ")", "{", "return", "false", ";", "}", "public", "int", "getRenderType", "(", ")", "{", "return", "25", ";", "}", "public", "TileEntity", "getBlockEntity", "(", ")", "{", "return", "new", "TileEntityBrewingStand", "(", ")", ";", "}", "public", "boolean", "renderAsNormalBlock", "(", ")", "{", "return", "false", ";", "}", "public", "void", "getCollidingBoundingBoxes", "(", "World", "par1World", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "AxisAlignedBB", "par5AxisAlignedBB", ",", "ArrayList", "par6ArrayList", ")", "{", "setBlockBounds", "(", "0.4375F", ",", "0.0F", ",", "0.4375F", ",", "0.5625F", ",", "0.875F", ",", "0.5625F", ")", ";", "super", ".", "getCollidingBoundingBoxes", "(", "par1World", ",", "par2", ",", "par3", ",", "par4", ",", "par5AxisAlignedBB", ",", "par6ArrayList", ")", ";", "setBlockBoundsForItemRender", "(", ")", ";", "super", ".", "getCollidingBoundingBoxes", "(", "par1World", ",", "par2", ",", "par3", ",", "par4", ",", "par5AxisAlignedBB", ",", "par6ArrayList", ")", ";", "}", "public", "void", "setBlockBoundsForItemRender", "(", ")", "{", "setBlockBounds", "(", "0.0F", ",", "0.0F", ",", "0.0F", ",", "1.0F", ",", "0.125F", ",", "1.0F", ")", ";", "}", "public", "boolean", "blockActivated", "(", "World", "par1World", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "EntityPlayer", "par5EntityPlayer", ")", "{", "if", "(", "par1World", ".", "isRemote", ")", "{", "return", "true", ";", "}", "TileEntityBrewingStand", "tileentitybrewingstand", "=", "(", "TileEntityBrewingStand", ")", "par1World", ".", "getBlockTileEntity", "(", "par2", ",", "par3", ",", "par4", ")", ";", "if", "(", "tileentitybrewingstand", "!=", "null", ")", "{", "par5EntityPlayer", ".", "displayGUIBrewingStand", "(", "tileentitybrewingstand", ")", ";", "}", "return", "true", ";", "}", "public", "void", "onBlockRemoval", "(", "World", "par1World", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ")", "{", "TileEntity", "tileentity", "=", "par1World", ".", "getBlockTileEntity", "(", "par2", ",", "par3", ",", "par4", ")", ";", "if", "(", "tileentity", "!=", "null", "&&", "(", "tileentity", "instanceof", "TileEntityBrewingStand", ")", ")", "{", "TileEntityBrewingStand", "tileentitybrewingstand", "=", "(", "TileEntityBrewingStand", ")", "tileentity", ";", "label0", ":", "for", "(", "int", "i", "=", "0", ";", "i", "<", "tileentitybrewingstand", ".", "getSizeInventory", "(", ")", ";", "i", "++", ")", "{", "ItemStack", "itemstack", "=", "tileentitybrewingstand", ".", "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", "(", "par1World", ",", "(", "float", ")", "par2", "+", "f", ",", "(", "float", ")", "par3", "+", "f1", ",", "(", "float", ")", "par4", "+", "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", ";", "par1World", ".", "spawnEntityInWorld", "(", "entityitem", ")", ";", "}", "while", "(", "true", ")", ";", "}", "}", "super", ".", "onBlockRemoval", "(", "par1World", ",", "par2", ",", "par3", ",", "par4", ")", ";", "}", "public", "int", "idDropped", "(", "int", "par1", ",", "Random", "par2Random", ",", "int", "par3", ")", "{", "return", "Item", ".", "brewingStand", ".", "shiftedIndex", ";", "}", "}", "</s>" ]
9,755
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "ArrayList", ";", "import", "java", ".", "util", ".", "List", ";", "public", "class", "Vec3D", "{", "private", "static", "List", "vectorList", "=", "new", "ArrayList", "(", ")", ";", "private", "static", "int", "nextVector", "=", "0", ";", "public", "double", "xCoord", ";", "public", "double", "yCoord", ";", "public", "double", "zCoord", ";", "public", "static", "Vec3D", "createVectorHelper", "(", "double", "par0", ",", "double", "par2", ",", "double", "par4", ")", "{", "return", "new", "Vec3D", "(", "par0", ",", "par2", ",", "par4", ")", ";", "}", "public", "static", "void", "initialize", "(", ")", "{", "nextVector", "=", "0", ";", "}", "public", "static", "Vec3D", "createVector", "(", "double", "par0", ",", "double", "par2", ",", "double", "par4", ")", "{", "if", "(", "nextVector", ">=", "vectorList", ".", "size", "(", ")", ")", "{", "vectorList", ".", "add", "(", "createVectorHelper", "(", "0.0D", ",", "0.0D", ",", "0.0D", ")", ")", ";", "}", "return", "(", "(", "Vec3D", ")", "vectorList", ".", "get", "(", "nextVector", "++", ")", ")", ".", "setComponents", "(", "par0", ",", "par2", ",", "par4", ")", ";", "}", "private", "Vec3D", "(", "double", "par1", ",", "double", "par3", ",", "double", "par5", ")", "{", "if", "(", "par1", "==", "-", "0D", ")", "{", "par1", "=", "0.0D", ";", "}", "if", "(", "par3", "==", "-", "0D", ")", "{", "par3", "=", "0.0D", ";", "}", "if", "(", "par5", "==", "-", "0D", ")", "{", "par5", "=", "0.0D", ";", "}", "xCoord", "=", "par1", ";", "yCoord", "=", "par3", ";", "zCoord", "=", "par5", ";", "}", "private", "Vec3D", "setComponents", "(", "double", "par1", ",", "double", "par3", ",", "double", "par5", ")", "{", "xCoord", "=", "par1", ";", "yCoord", "=", "par3", ";", "zCoord", "=", "par5", ";", "return", "this", ";", "}", "public", "Vec3D", "normalize", "(", ")", "{", "double", "d", "=", "MathHelper", ".", "sqrt_double", "(", "xCoord", "*", "xCoord", "+", "yCoord", "*", "yCoord", "+", "zCoord", "*", "zCoord", ")", ";", "if", "(", "d", "<", "0.0001D", ")", "{", "return", "createVector", "(", "0.0D", ",", "0.0D", ",", "0.0D", ")", ";", "}", "else", "{", "return", "createVector", "(", "xCoord", "/", "d", ",", "yCoord", "/", "d", ",", "zCoord", "/", "d", ")", ";", "}", "}", "public", "double", "dotProduct", "(", "Vec3D", "par1Vec3D", ")", "{", "return", "xCoord", "*", "par1Vec3D", ".", "xCoord", "+", "yCoord", "*", "par1Vec3D", ".", "yCoord", "+", "zCoord", "*", "par1Vec3D", ".", "zCoord", ";", "}", "public", "Vec3D", "addVector", "(", "double", "par1", ",", "double", "par3", ",", "double", "par5", ")", "{", "return", "createVector", "(", "xCoord", "+", "par1", ",", "yCoord", "+", "par3", ",", "zCoord", "+", "par5", ")", ";", "}", "public", "double", "distanceTo", "(", "Vec3D", "par1Vec3D", ")", "{", "double", "d", "=", "par1Vec3D", ".", "xCoord", "-", "xCoord", ";", "double", "d1", "=", "par1Vec3D", ".", "yCoord", "-", "yCoord", ";", "double", "d2", "=", "par1Vec3D", ".", "zCoord", "-", "zCoord", ";", "return", "(", "double", ")", "MathHelper", ".", "sqrt_double", "(", "d", "*", "d", "+", "d1", "*", "d1", "+", "d2", "*", "d2", ")", ";", "}", "public", "double", "squareDistanceTo", "(", "Vec3D", "par1Vec3D", ")", "{", "double", "d", "=", "par1Vec3D", ".", "xCoord", "-", "xCoord", ";", "double", "d1", "=", "par1Vec3D", ".", "yCoord", "-", "yCoord", ";", "double", "d2", "=", "par1Vec3D", ".", "zCoord", "-", "zCoord", ";", "return", "d", "*", "d", "+", "d1", "*", "d1", "+", "d2", "*", "d2", ";", "}", "public", "double", "squareDistanceTo", "(", "double", "par1", ",", "double", "par3", ",", "double", "par5", ")", "{", "double", "d", "=", "par1", "-", "xCoord", ";", "double", "d1", "=", "par3", "-", "yCoord", ";", "double", "d2", "=", "par5", "-", "zCoord", ";", "return", "d", "*", "d", "+", "d1", "*", "d1", "+", "d2", "*", "d2", ";", "}", "public", "double", "lengthVector", "(", ")", "{", "return", "(", "double", ")", "MathHelper", ".", "sqrt_double", "(", "xCoord", "*", "xCoord", "+", "yCoord", "*", "yCoord", "+", "zCoord", "*", "zCoord", ")", ";", "}", "public", "Vec3D", "getIntermediateWithXValue", "(", "Vec3D", "par1Vec3D", ",", "double", "par2", ")", "{", "double", "d", "=", "par1Vec3D", ".", "xCoord", "-", "xCoord", ";", "double", "d1", "=", "par1Vec3D", ".", "yCoord", "-", "yCoord", ";", "double", "d2", "=", "par1Vec3D", ".", "zCoord", "-", "zCoord", ";", "if", "(", "d", "*", "d", "<", "1.0000000116860974E-007D", ")", "{", "return", "null", ";", "}", "double", "d3", "=", "(", "par2", "-", "xCoord", ")", "/", "d", ";", "if", "(", "d3", "<", "0.0D", "||", "d3", ">", "1.0D", ")", "{", "return", "null", ";", "}", "else", "{", "return", "createVector", "(", "xCoord", "+", "d", "*", "d3", ",", "yCoord", "+", "d1", "*", "d3", ",", "zCoord", "+", "d2", "*", "d3", ")", ";", "}", "}", "public", "Vec3D", "getIntermediateWithYValue", "(", "Vec3D", "par1Vec3D", ",", "double", "par2", ")", "{", "double", "d", "=", "par1Vec3D", ".", "xCoord", "-", "xCoord", ";", "double", "d1", "=", "par1Vec3D", ".", "yCoord", "-", "yCoord", ";", "double", "d2", "=", "par1Vec3D", ".", "zCoord", "-", "zCoord", ";", "if", "(", "d1", "*", "d1", "<", "1.0000000116860974E-007D", ")", "{", "return", "null", ";", "}", "double", "d3", "=", "(", "par2", "-", "yCoord", ")", "/", "d1", ";", "if", "(", "d3", "<", "0.0D", "||", "d3", ">", "1.0D", ")", "{", "return", "null", ";", "}", "else", "{", "return", "createVector", "(", "xCoord", "+", "d", "*", "d3", ",", "yCoord", "+", "d1", "*", "d3", ",", "zCoord", "+", "d2", "*", "d3", ")", ";", "}", "}", "public", "Vec3D", "getIntermediateWithZValue", "(", "Vec3D", "par1Vec3D", ",", "double", "par2", ")", "{", "double", "d", "=", "par1Vec3D", ".", "xCoord", "-", "xCoord", ";", "double", "d1", "=", "par1Vec3D", ".", "yCoord", "-", "yCoord", ";", "double", "d2", "=", "par1Vec3D", ".", "zCoord", "-", "zCoord", ";", "if", "(", "d2", "*", "d2", "<", "1.0000000116860974E-007D", ")", "{", "return", "null", ";", "}", "double", "d3", "=", "(", "par2", "-", "zCoord", ")", "/", "d2", ";", "if", "(", "d3", "<", "0.0D", "||", "d3", ">", "1.0D", ")", "{", "return", "null", ";", "}", "else", "{", "return", "createVector", "(", "xCoord", "+", "d", "*", "d3", ",", "yCoord", "+", "d1", "*", "d3", ",", "zCoord", "+", "d2", "*", "d3", ")", ";", "}", "}", "public", "String", "toString", "(", ")", "{", "return", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "\"(\"", ")", ".", "append", "(", "xCoord", ")", ".", "append", "(", "\",", "\"", ")", ".", "append", "(", "yCoord", ")", ".", "append", "(", "\",", "\"", ")", ".", "append", "(", "zCoord", ")", ".", "append", "(", "\")\"", ")", ".", "toString", "(", ")", ";", "}", "public", "void", "rotateAroundX", "(", "float", "par1", ")", "{", "float", "f", "=", "MathHelper", ".", "cos", "(", "par1", ")", ";", "float", "f1", "=", "MathHelper", ".", "sin", "(", "par1", ")", ";", "double", "d", "=", "xCoord", ";", "double", "d1", "=", "yCoord", "*", "(", "double", ")", "f", "+", "zCoord", "*", "(", "double", ")", "f1", ";", "double", "d2", "=", "zCoord", "*", "(", "double", ")", "f", "-", "yCoord", "*", "(", "double", ")", "f1", ";", "xCoord", "=", "d", ";", "yCoord", "=", "d1", ";", "zCoord", "=", "d2", ";", "}", "public", "void", "rotateAroundY", "(", "float", "par1", ")", "{", "float", "f", "=", "MathHelper", ".", "cos", "(", "par1", ")", ";", "float", "f1", "=", "MathHelper", ".", "sin", "(", "par1", ")", ";", "double", "d", "=", "xCoord", "*", "(", "double", ")", "f", "+", "zCoord", "*", "(", "double", ")", "f1", ";", "double", "d1", "=", "yCoord", ";", "double", "d2", "=", "zCoord", "*", "(", "double", ")", "f", "-", "xCoord", "*", "(", "double", ")", "f1", ";", "xCoord", "=", "d", ";", "yCoord", "=", "d1", ";", "zCoord", "=", "d2", ";", "}", "}", "</s>" ]
9,756
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "public", "interface", "IInventory", "{", "public", "abstract", "int", "getSizeInventory", "(", ")", ";", "public", "abstract", "ItemStack", "getStackInSlot", "(", "int", "i", ")", ";", "public", "abstract", "ItemStack", "decrStackSize", "(", "int", "i", ",", "int", "j", ")", ";", "public", "abstract", "ItemStack", "getStackInSlotOnClosing", "(", "int", "i", ")", ";", "public", "abstract", "void", "setInventorySlotContents", "(", "int", "i", ",", "ItemStack", "itemstack", ")", ";", "public", "abstract", "String", "getInvName", "(", ")", ";", "public", "abstract", "int", "getInventoryStackLimit", "(", ")", ";", "public", "abstract", "void", "onInventoryChanged", "(", ")", ";", "public", "abstract", "boolean", "isUseableByPlayer", "(", "EntityPlayer", "entityplayer", ")", ";", "public", "abstract", "void", "openChest", "(", ")", ";", "public", "abstract", "void", "closeChest", "(", ")", ";", "}", "</s>" ]
9,757
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "final", "class", "StructureStrongholdPieceWeight2", "extends", "StructureStrongholdPieceWeight", "{", "StructureStrongholdPieceWeight2", "(", "Class", "par1Class", ",", "int", "par2", ",", "int", "par3", ")", "{", "super", "(", "par1Class", ",", "par2", ",", "par3", ")", ";", "}", "public", "boolean", "canSpawnMoreStructuresOfType", "(", "int", "par1", ")", "{", "return", "super", ".", "canSpawnMoreStructuresOfType", "(", "par1", ")", "&&", "par1", ">", "4", ";", "}", "}", "</s>" ]
9,758
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "Random", ";", "public", "class", "EntityBlaze", "extends", "EntityMob", "{", "private", "float", "heightOffset", ";", "private", "int", "heightOffsetUpdateTime", ";", "private", "int", "field_40128_g", ";", "public", "EntityBlaze", "(", "World", "par1World", ")", "{", "super", "(", "par1World", ")", ";", "heightOffset", "=", "0.5F", ";", "texture", "=", "\"\"", ";", "isImmuneToFire", "=", "true", ";", "attackStrength", "=", "6", ";", "experienceValue", "=", "10", ";", "}", "public", "int", "getMaxHealth", "(", ")", "{", "return", "20", ";", "}", "protected", "void", "entityInit", "(", ")", "{", "super", ".", "entityInit", "(", ")", ";", "dataWatcher", ".", "addObject", "(", "16", ",", "new", "Byte", "(", "(", "byte", ")", "0", ")", ")", ";", "}", "protected", "String", "getLivingSound", "(", ")", "{", "return", "\"\"", ";", "}", "protected", "String", "getHurtSound", "(", ")", "{", "return", "\"\"", ";", "}", "protected", "String", "getDeathSound", "(", ")", "{", "return", "\"\"", ";", "}", "public", "boolean", "attackEntityFrom", "(", "DamageSource", "par1DamageSource", ",", "int", "par2", ")", "{", "return", "super", ".", "attackEntityFrom", "(", "par1DamageSource", ",", "par2", ")", ";", "}", "public", "void", "onDeath", "(", "DamageSource", "par1DamageSource", ")", "{", "super", ".", "onDeath", "(", "par1DamageSource", ")", ";", "}", "public", "float", "getBrightness", "(", "float", "par1", ")", "{", "return", "1.0F", ";", "}", "public", "void", "onLivingUpdate", "(", ")", "{", "if", "(", "!", "worldObj", ".", "isRemote", ")", "{", "if", "(", "isWet", "(", ")", ")", "{", "attackEntityFrom", "(", "DamageSource", ".", "drown", ",", "1", ")", ";", "}", "heightOffsetUpdateTime", "--", ";", "if", "(", "heightOffsetUpdateTime", "<=", "0", ")", "{", "heightOffsetUpdateTime", "=", "100", ";", "heightOffset", "=", "0.5F", "+", "(", "float", ")", "rand", ".", "nextGaussian", "(", ")", "*", "3F", ";", "}", "if", "(", "getEntityToAttack", "(", ")", "!=", "null", "&&", "getEntityToAttack", "(", ")", ".", "posY", "+", "(", "double", ")", "getEntityToAttack", "(", ")", ".", "getEyeHeight", "(", ")", ">", "posY", "+", "(", "double", ")", "getEyeHeight", "(", ")", "+", "(", "double", ")", "heightOffset", ")", "{", "motionY", "=", "motionY", "+", "(", "0.30000001192092896D", "-", "motionY", ")", "*", "0.30000001192092896D", ";", "}", "}", "if", "(", "rand", ".", "nextInt", "(", "24", ")", "==", "0", ")", "{", "worldObj", ".", "playSoundEffect", "(", "posX", "+", "0.5D", ",", "posY", "+", "0.5D", ",", "posZ", "+", "0.5D", ",", "\"fire.fire\"", ",", "1.0F", "+", "rand", ".", "nextFloat", "(", ")", ",", "rand", ".", "nextFloat", "(", ")", "*", "0.7F", "+", "0.3F", ")", ";", "}", "if", "(", "!", "onGround", "&&", "motionY", "<", "0.0D", ")", "{", "motionY", "*=", "0.59999999999999998D", ";", "}", "for", "(", "int", "i", "=", "0", ";", "i", "<", "2", ";", "i", "++", ")", "{", "worldObj", ".", "spawnParticle", "(", "\"largesmoke\"", ",", "posX", "+", "(", "rand", ".", "nextDouble", "(", ")", "-", "0.5D", ")", "*", "(", "double", ")", "width", ",", "posY", "+", "rand", ".", "nextDouble", "(", ")", "*", "(", "double", ")", "height", ",", "posZ", "+", "(", "rand", ".", "nextDouble", "(", ")", "-", "0.5D", ")", "*", "(", "double", ")", "width", ",", "0.0D", ",", "0.0D", ",", "0.0D", ")", ";", "}", "super", ".", "onLivingUpdate", "(", ")", ";", "}", "protected", "void", "attackEntity", "(", "Entity", "par1Entity", ",", "float", "par2", ")", "{", "if", "(", "attackTime", "<=", "0", "&&", "par2", "<", "2.0F", "&&", "par1Entity", ".", "boundingBox", ".", "maxY", ">", "boundingBox", ".", "minY", "&&", "par1Entity", ".", "boundingBox", ".", "minY", "<", "boundingBox", ".", "maxY", ")", "{", "attackTime", "=", "20", ";", "attackEntityAsMob", "(", "par1Entity", ")", ";", "}", "else", "if", "(", "par2", "<", "30F", ")", "{", "double", "d", "=", "par1Entity", ".", "posX", "-", "posX", ";", "double", "d1", "=", "(", "par1Entity", ".", "boundingBox", ".", "minY", "+", "(", "double", ")", "(", "par1Entity", ".", "height", "/", "2.0F", ")", ")", "-", "(", "posY", "+", "(", "double", ")", "(", "height", "/", "2.0F", ")", ")", ";", "double", "d2", "=", "par1Entity", ".", "posZ", "-", "posZ", ";", "if", "(", "attackTime", "==", "0", ")", "{", "field_40128_g", "++", ";", "if", "(", "field_40128_g", "==", "1", ")", "{", "attackTime", "=", "60", ";", "func_40127_a", "(", "true", ")", ";", "}", "else", "if", "(", "field_40128_g", "<=", "4", ")", "{", "attackTime", "=", "6", ";", "}", "else", "{", "attackTime", "=", "100", ";", "field_40128_g", "=", "0", ";", "func_40127_a", "(", "false", ")", ";", "}", "if", "(", "field_40128_g", ">", "1", ")", "{", "float", "f", "=", "MathHelper", ".", "sqrt_float", "(", "par2", ")", "*", "0.5F", ";", "worldObj", ".", "playAuxSFXAtEntity", "(", "null", ",", "1009", ",", "(", "int", ")", "posX", ",", "(", "int", ")", "posY", ",", "(", "int", ")", "posZ", ",", "0", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "1", ";", "i", "++", ")", "{", "EntitySmallFireball", "entitysmallfireball", "=", "new", "EntitySmallFireball", "(", "worldObj", ",", "this", ",", "d", "+", "rand", ".", "nextGaussian", "(", ")", "*", "(", "double", ")", "f", ",", "d1", ",", "d2", "+", "rand", ".", "nextGaussian", "(", ")", "*", "(", "double", ")", "f", ")", ";", "entitysmallfireball", ".", "posY", "=", "posY", "+", "(", "double", ")", "(", "height", "/", "2.0F", ")", "+", "0.5D", ";", "worldObj", ".", "spawnEntityInWorld", "(", "entitysmallfireball", ")", ";", "}", "}", "}", "rotationYaw", "=", "(", "float", ")", "(", "(", "Math", ".", "atan2", "(", "d2", ",", "d", ")", "*", "180D", ")", "/", "Math", ".", "PI", ")", "-", "90F", ";", "hasAttacked", "=", "true", ";", "}", "}", "protected", "void", "fall", "(", "float", "f", ")", "{", "}", "public", "void", "writeEntityToNBT", "(", "NBTTagCompound", "par1NBTTagCompound", ")", "{", "super", ".", "writeEntityToNBT", "(", "par1NBTTagCompound", ")", ";", "}", "public", "void", "readEntityFromNBT", "(", "NBTTagCompound", "par1NBTTagCompound", ")", "{", "super", ".", "readEntityFromNBT", "(", "par1NBTTagCompound", ")", ";", "}", "protected", "int", "getDropItemId", "(", ")", "{", "return", "Item", ".", "blazeRod", ".", "shiftedIndex", ";", "}", "public", "boolean", "isBurning", "(", ")", "{", "return", "func_40126_A", "(", ")", ";", "}", "protected", "void", "dropFewItems", "(", "boolean", "par1", ",", "int", "par2", ")", "{", "if", "(", "par1", ")", "{", "int", "i", "=", "rand", ".", "nextInt", "(", "2", "+", "par2", ")", ";", "for", "(", "int", "j", "=", "0", ";", "j", "<", "i", ";", "j", "++", ")", "{", "dropItem", "(", "Item", ".", "blazeRod", ".", "shiftedIndex", ",", "1", ")", ";", "}", "}", "}", "public", "boolean", "func_40126_A", "(", ")", "{", "return", "(", "dataWatcher", ".", "getWatchableObjectByte", "(", "16", ")", "&", "1", ")", "!=", "0", ";", "}", "public", "void", "func_40127_a", "(", "boolean", "par1", ")", "{", "byte", "byte0", "=", "dataWatcher", ".", "getWatchableObjectByte", "(", "16", ")", ";", "if", "(", "par1", ")", "{", "byte0", "|=", "1", ";", "}", "else", "{", "byte0", "&=", "0xfe", ";", "}", "dataWatcher", ".", "updateObject", "(", "16", ",", "Byte", ".", "valueOf", "(", "byte0", ")", ")", ";", "}", "protected", "boolean", "isValidLightLevel", "(", ")", "{", "return", "true", ";", "}", "}", "</s>" ]
9,759
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "public", "class", "Potion", "{", "public", "static", "final", "Potion", "potionTypes", "[", "]", "=", "new", "Potion", "[", "32", "]", ";", "public", "static", "final", "Potion", "field_35453_b", "=", "null", ";", "public", "static", "final", "Potion", "moveSpeed", "=", "(", "new", "Potion", "(", "1", ",", "false", ",", "0x7cafc6", ")", ")", ".", "setPotionName", "(", "\"\"", ")", ".", "setIconIndex", "(", "0", ",", "0", ")", ";", "public", "static", "final", "Potion", "moveSlowdown", "=", "(", "new", "Potion", "(", "2", ",", "true", ",", "0x5a6c81", ")", ")", ".", "setPotionName", "(", "\"\"", ")", ".", "setIconIndex", "(", "1", ",", "0", ")", ";", "public", "static", "final", "Potion", "digSpeed", "=", "(", "new", "Potion", "(", "3", ",", "false", ",", "0xd9c043", ")", ")", ".", "setPotionName", "(", "\"\"", ")", ".", "setIconIndex", "(", "2", ",", "0", ")", ".", "setEffectiveness", "(", "1.5D", ")", ";", "public", "static", "final", "Potion", "digSlowdown", "=", "(", "new", "Potion", "(", "4", ",", "true", ",", "0x4a4217", ")", ")", ".", "setPotionName", "(", "\"\"", ")", ".", "setIconIndex", "(", "3", ",", "0", ")", ";", "public", "static", "final", "Potion", "damageBoost", "=", "(", "new", "Potion", "(", "5", ",", "false", ",", "0x932423", ")", ")", ".", "setPotionName", "(", "\"\"", ")", ".", "setIconIndex", "(", "4", ",", "0", ")", ";", "public", "static", "final", "Potion", "heal", "=", "(", "new", "PotionHealth", "(", "6", ",", "false", ",", "0xf82423", ")", ")", ".", "setPotionName", "(", "\"potion.heal\"", ")", ";", "public", "static", "final", "Potion", "harm", "=", "(", "new", "PotionHealth", "(", "7", ",", "true", ",", "0x430a09", ")", ")", ".", "setPotionName", "(", "\"potion.harm\"", ")", ";", "public", "static", "final", "Potion", "jump", "=", "(", "new", "Potion", "(", "8", ",", "false", ",", "0x786297", ")", ")", ".", "setPotionName", "(", "\"potion.jump\"", ")", ".", "setIconIndex", "(", "2", ",", "1", ")", ";", "public", "static", "final", "Potion", "confusion", "=", "(", "new", "Potion", "(", "9", ",", "true", ",", "0x551d4a", ")", ")", ".", "setPotionName", "(", "\"\"", ")", ".", "setIconIndex", "(", "3", ",", "1", ")", ".", "setEffectiveness", "(", "0.25D", ")", ";", "public", "static", "final", "Potion", "regeneration", "=", "(", "new", "Potion", "(", "10", ",", "false", ",", "0xcd5cab", ")", ")", ".", "setPotionName", "(", "\"\"", ")", ".", "setIconIndex", "(", "7", ",", "0", ")", ".", "setEffectiveness", "(", "0.25D", ")", ";", "public", "static", "final", "Potion", "resistance", "=", "(", "new", "Potion", "(", "11", ",", "false", ",", "0x99453a", ")", ")", ".", "setPotionName", "(", "\"\"", ")", ".", "setIconIndex", "(", "6", ",", "1", ")", ";", "public", "static", "final", "Potion", "fireResistance", "=", "(", "new", "Potion", "(", "12", ",", "false", ",", "0xe49a3a", ")", ")", ".", "setPotionName", "(", "\"\"", ")", ".", "setIconIndex", "(", "7", ",", "1", ")", ";", "public", "static", "final", "Potion", "waterBreathing", "=", "(", "new", "Potion", "(", "13", ",", "false", ",", "0x2e5299", ")", ")", ".", "setPotionName", "(", "\"\"", ")", ".", "setIconIndex", "(", "0", ",", "2", ")", ";", "public", "static", "final", "Potion", "invisibility", "=", "(", "new", "Potion", "(", "14", ",", "false", ",", "0x7f8392", ")", ")", ".", "setPotionName", "(", "\"\"", ")", ".", "setIconIndex", "(", "0", ",", "1", ")", ".", "setPotionUnusable", "(", ")", ";", "public", "static", "final", "Potion", "blindness", "=", "(", "new", "Potion", "(", "15", ",", "true", ",", "0x1f1f23", ")", ")", ".", "setPotionName", "(", "\"\"", ")", ".", "setIconIndex", "(", "5", ",", "1", ")", ".", "setEffectiveness", "(", "0.25D", ")", ";", "public", "static", "final", "Potion", "nightVision", "=", "(", "new", "Potion", "(", "16", ",", "false", ",", "0x1f1fa1", ")", ")", ".", "setPotionName", "(", "\"\"", ")", ".", "setIconIndex", "(", "4", ",", "1", ")", ".", "setPotionUnusable", "(", ")", ";", "public", "static", "final", "Potion", "hunger", "=", "(", "new", "Potion", "(", "17", ",", "true", ",", "0x587653", ")", ")", ".", "setPotionName", "(", "\"\"", ")", ".", "setIconIndex", "(", "1", ",", "1", ")", ";", "public", "static", "final", "Potion", "weakness", "=", "(", "new", "Potion", "(", "18", ",", "true", ",", "0x484d48", ")", ")", ".", "setPotionName", "(", "\"\"", ")", ".", "setIconIndex", "(", "5", ",", "0", ")", ";", "public", "static", "final", "Potion", "poison", "=", "(", "new", "Potion", "(", "19", ",", "true", ",", "0x4e9331", ")", ")", ".", "setPotionName", "(", "\"\"", ")", ".", "setIconIndex", "(", "6", ",", "0", ")", ".", "setEffectiveness", "(", "0.25D", ")", ";", "public", "static", "final", "Potion", "field_35465_v", "=", "null", ";", "public", "static", "final", "Potion", "field_35464_w", "=", "null", ";", "public", "static", "final", "Potion", "field_35474_x", "=", "null", ";", "public", "static", "final", "Potion", "field_35473_y", "=", "null", ";", "public", "static", "final", "Potion", "field_35472_z", "=", "null", ";", "public", "static", "final", "Potion", "field_35444_A", "=", "null", ";", "public", "static", "final", "Potion", "field_35445_B", "=", "null", ";", "public", "static", "final", "Potion", "field_35446_C", "=", "null", ";", "public", "static", "final", "Potion", "field_35440_D", "=", "null", ";", "public", "static", "final", "Potion", "field_35441_E", "=", "null", ";", "public", "static", "final", "Potion", "field_35442_F", "=", "null", ";", "public", "static", "final", "Potion", "field_35443_G", "=", "null", ";", "public", "final", "int", "id", ";", "private", "String", "name", ";", "private", "int", "statusIconIndex", ";", "private", "final", "boolean", "isBadEffect", ";", "private", "double", "effectiveness", ";", "private", "boolean", "usable", ";", "private", "final", "int", "liquidColor", ";", "protected", "Potion", "(", "int", "par1", ",", "boolean", "par2", ",", "int", "par3", ")", "{", "name", "=", "\"\"", ";", "statusIconIndex", "=", "-", "1", ";", "id", "=", "par1", ";", "potionTypes", "[", "par1", "]", "=", "this", ";", "isBadEffect", "=", "par2", ";", "if", "(", "par2", ")", "{", "effectiveness", "=", "0.5D", ";", "}", "else", "{", "effectiveness", "=", "1.0D", ";", "}", "liquidColor", "=", "par3", ";", "}", "protected", "Potion", "setIconIndex", "(", "int", "par1", ",", "int", "par2", ")", "{", "statusIconIndex", "=", "par1", "+", "par2", "*", "8", ";", "return", "this", ";", "}", "public", "int", "getId", "(", ")", "{", "return", "id", ";", "}", "public", "void", "performEffect", "(", "EntityLiving", "par1EntityLiving", ",", "int", "par2", ")", "{", "if", "(", "id", "==", "regeneration", ".", "id", ")", "{", "if", "(", "par1EntityLiving", ".", "getHealth", "(", ")", "<", "par1EntityLiving", ".", "getMaxHealth", "(", ")", ")", "{", "par1EntityLiving", ".", "heal", "(", "1", ")", ";", "}", "}", "else", "if", "(", "id", "==", "poison", ".", "id", ")", "{", "if", "(", "par1EntityLiving", ".", "getHealth", "(", ")", ">", "1", ")", "{", "par1EntityLiving", ".", "attackEntityFrom", "(", "DamageSource", ".", "magic", ",", "1", ")", ";", "}", "}", "else", "if", "(", "id", "==", "hunger", ".", "id", "&&", "(", "par1EntityLiving", "instanceof", "EntityPlayer", ")", ")", "{", "(", "(", "EntityPlayer", ")", "par1EntityLiving", ")", ".", "addExhaustion", "(", "0.025F", "*", "(", "float", ")", "(", "par2", "+", "1", ")", ")", ";", "}", "else", "if", "(", "id", "==", "heal", ".", "id", "&&", "!", "par1EntityLiving", ".", "isEntityUndead", "(", ")", "||", "id", "==", "harm", ".", "id", "&&", "par1EntityLiving", ".", "isEntityUndead", "(", ")", ")", "{", "par1EntityLiving", ".", "heal", "(", "6", "<<", "par2", ")", ";", "}", "else", "if", "(", "id", "==", "harm", ".", "id", "&&", "!", "par1EntityLiving", ".", "isEntityUndead", "(", ")", "||", "id", "==", "heal", ".", "id", "&&", "par1EntityLiving", ".", "isEntityUndead", "(", ")", ")", "{", "par1EntityLiving", ".", "attackEntityFrom", "(", "DamageSource", ".", "magic", ",", "6", "<<", "par2", ")", ";", "}", "}", "public", "void", "affectEntity", "(", "EntityLiving", "par1EntityLiving", ",", "EntityLiving", "par2EntityLiving", ",", "int", "par3", ",", "double", "par4", ")", "{", "if", "(", "id", "==", "heal", ".", "id", "&&", "!", "par2EntityLiving", ".", "isEntityUndead", "(", ")", "||", "id", "==", "harm", ".", "id", "&&", "par2EntityLiving", ".", "isEntityUndead", "(", ")", ")", "{", "int", "i", "=", "(", "int", ")", "(", "par4", "*", "(", "double", ")", "(", "6", "<<", "par3", ")", "+", "0.5D", ")", ";", "par2EntityLiving", ".", "heal", "(", "i", ")", ";", "}", "else", "if", "(", "id", "==", "harm", ".", "id", "&&", "!", "par2EntityLiving", ".", "isEntityUndead", "(", ")", "||", "id", "==", "heal", ".", "id", "&&", "par2EntityLiving", ".", "isEntityUndead", "(", ")", ")", "{", "int", "j", "=", "(", "int", ")", "(", "par4", "*", "(", "double", ")", "(", "6", "<<", "par3", ")", "+", "0.5D", ")", ";", "if", "(", "par1EntityLiving", "==", "null", ")", "{", "par2EntityLiving", ".", "attackEntityFrom", "(", "DamageSource", ".", "magic", ",", "j", ")", ";", "}", "else", "{", "par2EntityLiving", ".", "attackEntityFrom", "(", "DamageSource", ".", "causeIndirectMagicDamage", "(", "par2EntityLiving", ",", "par1EntityLiving", ")", ",", "j", ")", ";", "}", "}", "}", "public", "boolean", "isInstant", "(", ")", "{", "return", "false", ";", "}", "public", "boolean", "isReady", "(", "int", "par1", ",", "int", "par2", ")", "{", "if", "(", "id", "==", "regeneration", ".", "id", "||", "id", "==", "poison", ".", "id", ")", "{", "int", "i", "=", "25", ">>", "par2", ";", "if", "(", "i", ">", "0", ")", "{", "return", "par1", "%", "i", "==", "0", ";", "}", "else", "{", "return", "true", ";", "}", "}", "return", "id", "==", "hunger", ".", "id", ";", "}", "public", "Potion", "setPotionName", "(", "String", "par1Str", ")", "{", "name", "=", "par1Str", ";", "return", "this", ";", "}", "public", "String", "getName", "(", ")", "{", "return", "name", ";", "}", "protected", "Potion", "setEffectiveness", "(", "double", "par1", ")", "{", "effectiveness", "=", "par1", ";", "return", "this", ";", "}", "public", "double", "getEffectiveness", "(", ")", "{", "return", "effectiveness", ";", "}", "public", "Potion", "setPotionUnusable", "(", ")", "{", "usable", "=", "true", ";", "return", "this", ";", "}", "public", "boolean", "isUsable", "(", ")", "{", "return", "usable", ";", "}", "public", "int", "getLiquidColor", "(", ")", "{", "return", "liquidColor", ";", "}", "}", "</s>" ]
9,760
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "io", ".", "*", ";", "import", "java", ".", "util", ".", "*", ";", "import", "java", ".", "util", ".", "logging", ".", "Logger", ";", "import", "net", ".", "minecraft", ".", "server", ".", "MinecraftServer", ";", "public", "class", "ServerConfigurationManager", "{", "public", "static", "Logger", "logger", "=", "Logger", ".", "getLogger", "(", "\"Minecraft\"", ")", ";", "public", "List", "playerEntities", ";", "private", "MinecraftServer", "mcServer", ";", "private", "PlayerManager", "playerManagerObj", "[", "]", ";", "private", "int", "maxPlayers", ";", "private", "Set", "bannedPlayers", ";", "private", "Set", "bannedIPs", ";", "private", "Set", "ops", ";", "private", "Set", "whiteListedIPs", ";", "private", "File", "bannedPlayersFile", ";", "private", "File", "ipBanFile", ";", "private", "File", "opFile", ";", "private", "File", "whitelistPlayersFile", ";", "private", "IPlayerFileData", "playerNBTManagerObj", ";", "private", "boolean", "whiteListEnforced", ";", "private", "int", "field_35482_p", ";", "public", "ServerConfigurationManager", "(", "MinecraftServer", "par1MinecraftServer", ")", "{", "playerEntities", "=", "new", "ArrayList", "(", ")", ";", "bannedPlayers", "=", "new", "HashSet", "(", ")", ";", "bannedIPs", "=", "new", "HashSet", "(", ")", ";", "ops", "=", "new", "HashSet", "(", ")", ";", "whiteListedIPs", "=", "new", "HashSet", "(", ")", ";", "field_35482_p", "=", "0", ";", "playerManagerObj", "=", "new", "PlayerManager", "[", "3", "]", ";", "mcServer", "=", "par1MinecraftServer", ";", "bannedPlayersFile", "=", "par1MinecraftServer", ".", "getFile", "(", "\"\"", ")", ";", "ipBanFile", "=", "par1MinecraftServer", ".", "getFile", "(", "\"\"", ")", ";", "opFile", "=", "par1MinecraftServer", ".", "getFile", "(", "\"ops.txt\"", ")", ";", "whitelistPlayersFile", "=", "par1MinecraftServer", ".", "getFile", "(", "\"\"", ")", ";", "int", "i", "=", "par1MinecraftServer", ".", "propertyManagerObj", ".", "getIntProperty", "(", "\"\"", ",", "10", ")", ";", "playerManagerObj", "[", "0", "]", "=", "new", "PlayerManager", "(", "par1MinecraftServer", ",", "0", ",", "i", ")", ";", "playerManagerObj", "[", "1", "]", "=", "new", "PlayerManager", "(", "par1MinecraftServer", ",", "-", "1", ",", "i", ")", ";", "playerManagerObj", "[", "2", "]", "=", "new", "PlayerManager", "(", "par1MinecraftServer", ",", "1", ",", "i", ")", ";", "maxPlayers", "=", "par1MinecraftServer", ".", "propertyManagerObj", ".", "getIntProperty", "(", "\"max-players\"", ",", "20", ")", ";", "whiteListEnforced", "=", "par1MinecraftServer", ".", "propertyManagerObj", ".", "getBooleanProperty", "(", "\"white-list\"", ",", "false", ")", ";", "readBannedPlayers", "(", ")", ";", "loadBannedList", "(", ")", ";", "loadOps", "(", ")", ";", "loadWhiteList", "(", ")", ";", "writeBannedPlayers", "(", ")", ";", "saveBannedList", "(", ")", ";", "saveOps", "(", ")", ";", "saveWhiteList", "(", ")", ";", "}", "public", "void", "setPlayerManager", "(", "WorldServer", "par1ArrayOfWorldServer", "[", "]", ")", "{", "playerNBTManagerObj", "=", "par1ArrayOfWorldServer", "[", "0", "]", ".", "getSaveHandler", "(", ")", ".", "getPlayerNBTManager", "(", ")", ";", "}", "public", "void", "joinNewPlayerManager", "(", "EntityPlayerMP", "par1EntityPlayerMP", ")", "{", "playerManagerObj", "[", "0", "]", ".", "removePlayer", "(", "par1EntityPlayerMP", ")", ";", "playerManagerObj", "[", "1", "]", ".", "removePlayer", "(", "par1EntityPlayerMP", ")", ";", "playerManagerObj", "[", "2", "]", ".", "removePlayer", "(", "par1EntityPlayerMP", ")", ";", "getPlayerManager", "(", "par1EntityPlayerMP", ".", "dimension", ")", ".", "addPlayer", "(", "par1EntityPlayerMP", ")", ";", "WorldServer", "worldserver", "=", "mcServer", ".", "getWorldManager", "(", "par1EntityPlayerMP", ".", "dimension", ")", ";", "worldserver", ".", "chunkProviderServer", ".", "loadChunk", "(", "(", "int", ")", "par1EntityPlayerMP", ".", "posX", ">>", "4", ",", "(", "int", ")", "par1EntityPlayerMP", ".", "posZ", ">>", "4", ")", ";", "}", "public", "int", "getMaxTrackingDistance", "(", ")", "{", "return", "playerManagerObj", "[", "0", "]", ".", "getMaxTrackingDistance", "(", ")", ";", "}", "private", "PlayerManager", "getPlayerManager", "(", "int", "par1", ")", "{", "if", "(", "par1", "==", "-", "1", ")", "{", "return", "playerManagerObj", "[", "1", "]", ";", "}", "if", "(", "par1", "==", "0", ")", "{", "return", "playerManagerObj", "[", "0", "]", ";", "}", "if", "(", "par1", "==", "1", ")", "{", "return", "playerManagerObj", "[", "2", "]", ";", "}", "else", "{", "return", "null", ";", "}", "}", "public", "void", "readPlayerDataFromFile", "(", "EntityPlayerMP", "par1EntityPlayerMP", ")", "{", "playerNBTManagerObj", ".", "readPlayerData", "(", "par1EntityPlayerMP", ")", ";", "}", "public", "void", "playerLoggedIn", "(", "EntityPlayerMP", "par1EntityPlayerMP", ")", "{", "sendPacketToAllPlayers", "(", "new", "Packet201PlayerInfo", "(", "par1EntityPlayerMP", ".", "username", ",", "true", ",", "1000", ")", ")", ";", "playerEntities", ".", "add", "(", "par1EntityPlayerMP", ")", ";", "WorldServer", "worldserver", "=", "mcServer", ".", "getWorldManager", "(", "par1EntityPlayerMP", ".", "dimension", ")", ";", "worldserver", ".", "chunkProviderServer", ".", "loadChunk", "(", "(", "int", ")", "par1EntityPlayerMP", ".", "posX", ">>", "4", ",", "(", "int", ")", "par1EntityPlayerMP", ".", "posZ", ">>", "4", ")", ";", "for", "(", ";", "worldserver", ".", "getCollidingBoundingBoxes", "(", "par1EntityPlayerMP", ",", "par1EntityPlayerMP", ".", "boundingBox", ")", ".", "size", "(", ")", "!=", "0", ";", "par1EntityPlayerMP", ".", "setPosition", "(", "par1EntityPlayerMP", ".", "posX", ",", "par1EntityPlayerMP", ".", "posY", "+", "1.0D", ",", "par1EntityPlayerMP", ".", "posZ", ")", ")", "{", "}", "worldserver", ".", "spawnEntityInWorld", "(", "par1EntityPlayerMP", ")", ";", "getPlayerManager", "(", "par1EntityPlayerMP", ".", "dimension", ")", ".", "addPlayer", "(", "par1EntityPlayerMP", ")", ";", "func_52018_u", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "playerEntities", ".", "size", "(", ")", ";", "i", "++", ")", "{", "EntityPlayerMP", "entityplayermp", "=", "(", "EntityPlayerMP", ")", "playerEntities", ".", "get", "(", "i", ")", ";", "par1EntityPlayerMP", ".", "playerNetServerHandler", ".", "sendPacket", "(", "new", "Packet201PlayerInfo", "(", "entityplayermp", ".", "username", ",", "true", ",", "entityplayermp", ".", "ping", ")", ")", ";", "}", "}", "public", "void", "serverUpdateMountedMovingPlayer", "(", "EntityPlayerMP", "par1EntityPlayerMP", ")", "{", "getPlayerManager", "(", "par1EntityPlayerMP", ".", "dimension", ")", ".", "updateMountedMovingPlayer", "(", "par1EntityPlayerMP", ")", ";", "}", "public", "void", "playerLoggedOut", "(", "EntityPlayerMP", "par1EntityPlayerMP", ")", "{", "playerNBTManagerObj", ".", "writePlayerData", "(", "par1EntityPlayerMP", ")", ";", "mcServer", ".", "getWorldManager", "(", "par1EntityPlayerMP", ".", "dimension", ")", ".", "setEntityDead", "(", "par1EntityPlayerMP", ")", ";", "playerEntities", ".", "remove", "(", "par1EntityPlayerMP", ")", ";", "getPlayerManager", "(", "par1EntityPlayerMP", ".", "dimension", ")", ".", "removePlayer", "(", "par1EntityPlayerMP", ")", ";", "sendPacketToAllPlayers", "(", "new", "Packet201PlayerInfo", "(", "par1EntityPlayerMP", ".", "username", ",", "false", ",", "9999", ")", ")", ";", "}", "public", "EntityPlayerMP", "login", "(", "NetLoginHandler", "par1NetLoginHandler", ",", "String", "par2Str", ")", "{", "if", "(", "bannedPlayers", ".", "contains", "(", "par2Str", ".", "trim", "(", ")", ".", "toLowerCase", "(", ")", ")", ")", "{", "par1NetLoginHandler", ".", "kickUser", "(", "\"\"", ")", ";", "return", "null", ";", "}", "if", "(", "!", "isAllowedToLogin", "(", "par2Str", ")", ")", "{", "par1NetLoginHandler", ".", "kickUser", "(", "\"\"", ")", ";", "return", "null", ";", "}", "String", "s", "=", "par1NetLoginHandler", ".", "netManager", ".", "getRemoteAddress", "(", ")", ".", "toString", "(", ")", ";", "s", "=", "s", ".", "substring", "(", "s", ".", "indexOf", "(", "\"/\"", ")", "+", "1", ")", ";", "s", "=", "s", ".", "substring", "(", "0", ",", "s", ".", "indexOf", "(", "\":\"", ")", ")", ";", "if", "(", "bannedIPs", ".", "contains", "(", "s", ")", ")", "{", "par1NetLoginHandler", ".", "kickUser", "(", "\"\"", ")", ";", "return", "null", ";", "}", "if", "(", "playerEntities", ".", "size", "(", ")", ">=", "maxPlayers", ")", "{", "par1NetLoginHandler", ".", "kickUser", "(", "\"\"", ")", ";", "return", "null", ";", "}", "for", "(", "int", "i", "=", "0", ";", "i", "<", "playerEntities", ".", "size", "(", ")", ";", "i", "++", ")", "{", "EntityPlayerMP", "entityplayermp", "=", "(", "EntityPlayerMP", ")", "playerEntities", ".", "get", "(", "i", ")", ";", "if", "(", "entityplayermp", ".", "username", ".", "equalsIgnoreCase", "(", "par2Str", ")", ")", "{", "entityplayermp", ".", "playerNetServerHandler", ".", "kickPlayer", "(", "\"\"", ")", ";", "}", "}", "return", "new", "EntityPlayerMP", "(", "mcServer", ",", "mcServer", ".", "getWorldManager", "(", "0", ")", ",", "par2Str", ",", "new", "ItemInWorldManager", "(", "mcServer", ".", "getWorldManager", "(", "0", ")", ")", ")", ";", "}", "public", "EntityPlayerMP", "recreatePlayerEntity", "(", "EntityPlayerMP", "par1EntityPlayerMP", ",", "int", "par2", ",", "boolean", "par3", ")", "{", "mcServer", ".", "getEntityTracker", "(", "par1EntityPlayerMP", ".", "dimension", ")", ".", "removeTrackedPlayerSymmetric", "(", "par1EntityPlayerMP", ")", ";", "mcServer", ".", "getEntityTracker", "(", "par1EntityPlayerMP", ".", "dimension", ")", ".", "untrackEntity", "(", "par1EntityPlayerMP", ")", ";", "getPlayerManager", "(", "par1EntityPlayerMP", ".", "dimension", ")", ".", "removePlayer", "(", "par1EntityPlayerMP", ")", ";", "playerEntities", ".", "remove", "(", "par1EntityPlayerMP", ")", ";", "mcServer", ".", "getWorldManager", "(", "par1EntityPlayerMP", ".", "dimension", ")", ".", "removePlayer", "(", "par1EntityPlayerMP", ")", ";", "ChunkCoordinates", "chunkcoordinates", "=", "par1EntityPlayerMP", ".", "getSpawnChunk", "(", ")", ";", "par1EntityPlayerMP", ".", "dimension", "=", "par2", ";", "EntityPlayerMP", "entityplayermp", "=", "new", "EntityPlayerMP", "(", "mcServer", ",", "mcServer", ".", "getWorldManager", "(", "par1EntityPlayerMP", ".", "dimension", ")", ",", "par1EntityPlayerMP", ".", "username", ",", "new", "ItemInWorldManager", "(", "mcServer", ".", "getWorldManager", "(", "par1EntityPlayerMP", ".", "dimension", ")", ")", ")", ";", "if", "(", "par3", ")", "{", "entityplayermp", ".", "copyPlayer", "(", "par1EntityPlayerMP", ")", ";", "}", "entityplayermp", ".", "entityId", "=", "par1EntityPlayerMP", ".", "entityId", ";", "entityplayermp", ".", "playerNetServerHandler", "=", "par1EntityPlayerMP", ".", "playerNetServerHandler", ";", "WorldServer", "worldserver", "=", "mcServer", ".", "getWorldManager", "(", "par1EntityPlayerMP", ".", "dimension", ")", ";", "entityplayermp", ".", "itemInWorldManager", ".", "toggleGameType", "(", "par1EntityPlayerMP", ".", "itemInWorldManager", ".", "getGameType", "(", ")", ")", ";", "entityplayermp", ".", "itemInWorldManager", ".", "func_35695_b", "(", "worldserver", ".", "getWorldInfo", "(", ")", ".", "getGameType", "(", ")", ")", ";", "if", "(", "chunkcoordinates", "!=", "null", ")", "{", "ChunkCoordinates", "chunkcoordinates1", "=", "EntityPlayer", ".", "verifyRespawnCoordinates", "(", "mcServer", ".", "getWorldManager", "(", "par1EntityPlayerMP", ".", "dimension", ")", ",", "chunkcoordinates", ")", ";", "if", "(", "chunkcoordinates1", "!=", "null", ")", "{", "entityplayermp", ".", "setLocationAndAngles", "(", "(", "float", ")", "chunkcoordinates1", ".", "posX", "+", "0.5F", ",", "(", "float", ")", "chunkcoordinates1", ".", "posY", "+", "0.1F", ",", "(", "float", ")", "chunkcoordinates1", ".", "posZ", "+", "0.5F", ",", "0.0F", ",", "0.0F", ")", ";", "entityplayermp", ".", "setSpawnChunk", "(", "chunkcoordinates", ")", ";", "}", "else", "{", "entityplayermp", ".", "playerNetServerHandler", ".", "sendPacket", "(", "new", "Packet70Bed", "(", "0", ",", "0", ")", ")", ";", "}", "}", "worldserver", ".", "chunkProviderServer", ".", "loadChunk", "(", "(", "int", ")", "entityplayermp", ".", "posX", ">>", "4", ",", "(", "int", ")", "entityplayermp", ".", "posZ", ">>", "4", ")", ";", "for", "(", ";", "worldserver", ".", "getCollidingBoundingBoxes", "(", "entityplayermp", ",", "entityplayermp", ".", "boundingBox", ")", ".", "size", "(", ")", "!=", "0", ";", "entityplayermp", ".", "setPosition", "(", "entityplayermp", ".", "posX", ",", "entityplayermp", ".", "posY", "+", "1.0D", ",", "entityplayermp", ".", "posZ", ")", ")", "{", "}", "entityplayermp", ".", "playerNetServerHandler", ".", "sendPacket", "(", "new", "Packet9Respawn", "(", "entityplayermp", ".", "dimension", ",", "(", "byte", ")", "entityplayermp", ".", "worldObj", ".", "difficultySetting", ",", "entityplayermp", ".", "worldObj", ".", "getWorldInfo", "(", ")", ".", "getTerrainType", "(", ")", ",", "entityplayermp", ".", "worldObj", ".", "getHeight", "(", ")", ",", "entityplayermp", ".", "itemInWorldManager", ".", "getGameType", "(", ")", ")", ")", ";", "entityplayermp", ".", "playerNetServerHandler", ".", "teleportTo", "(", "entityplayermp", ".", "posX", ",", "entityplayermp", ".", "posY", ",", "entityplayermp", ".", "posZ", ",", "entityplayermp", ".", "rotationYaw", ",", "entityplayermp", ".", "rotationPitch", ")", ";", "func_28170_a", "(", "entityplayermp", ",", "worldserver", ")", ";", "getPlayerManager", "(", "entityplayermp", ".", "dimension", ")", ".", "addPlayer", "(", "entityplayermp", ")", ";", "worldserver", ".", "spawnEntityInWorld", "(", "entityplayermp", ")", ";", "playerEntities", ".", "add", "(", "entityplayermp", ")", ";", "entityplayermp", ".", "func_20057_k", "(", ")", ";", "entityplayermp", ".", "func_22068_s", "(", ")", ";", "return", "entityplayermp", ";", "}", "public", "void", "sendPlayerToOtherDimension", "(", "EntityPlayerMP", "par1EntityPlayerMP", ",", "int", "par2", ")", "{", "int", "i", "=", "par1EntityPlayerMP", ".", "dimension", ";", "WorldServer", "worldserver", "=", "mcServer", ".", "getWorldManager", "(", "par1EntityPlayerMP", ".", "dimension", ")", ";", "par1EntityPlayerMP", ".", "dimension", "=", "par2", ";", "WorldServer", "worldserver1", "=", "mcServer", ".", "getWorldManager", "(", "par1EntityPlayerMP", ".", "dimension", ")", ";", "par1EntityPlayerMP", ".", "playerNetServerHandler", ".", "sendPacket", "(", "new", "Packet9Respawn", "(", "par1EntityPlayerMP", ".", "dimension", ",", "(", "byte", ")", "par1EntityPlayerMP", ".", "worldObj", ".", "difficultySetting", ",", "worldserver1", ".", "getWorldInfo", "(", ")", ".", "getTerrainType", "(", ")", ",", "worldserver1", ".", "getHeight", "(", ")", ",", "par1EntityPlayerMP", ".", "itemInWorldManager", ".", "getGameType", "(", ")", ")", ")", ";", "worldserver", ".", "removePlayer", "(", "par1EntityPlayerMP", ")", ";", "par1EntityPlayerMP", ".", "isDead", "=", "false", ";", "double", "d", "=", "par1EntityPlayerMP", ".", "posX", ";", "double", "d1", "=", "par1EntityPlayerMP", ".", "posZ", ";", "double", "d2", "=", "8D", ";", "if", "(", "par1EntityPlayerMP", ".", "dimension", "==", "-", "1", ")", "{", "d", "/=", "d2", ";", "d1", "/=", "d2", ";", "par1EntityPlayerMP", ".", "setLocationAndAngles", "(", "d", ",", "par1EntityPlayerMP", ".", "posY", ",", "d1", ",", "par1EntityPlayerMP", ".", "rotationYaw", ",", "par1EntityPlayerMP", ".", "rotationPitch", ")", ";", "if", "(", "par1EntityPlayerMP", ".", "isEntityAlive", "(", ")", ")", "{", "worldserver", ".", "updateEntityWithOptionalForce", "(", "par1EntityPlayerMP", ",", "false", ")", ";", "}", "}", "else", "if", "(", "par1EntityPlayerMP", ".", "dimension", "==", "0", ")", "{", "d", "*=", "d2", ";", "d1", "*=", "d2", ";", "par1EntityPlayerMP", ".", "setLocationAndAngles", "(", "d", ",", "par1EntityPlayerMP", ".", "posY", ",", "d1", ",", "par1EntityPlayerMP", ".", "rotationYaw", ",", "par1EntityPlayerMP", ".", "rotationPitch", ")", ";", "if", "(", "par1EntityPlayerMP", ".", "isEntityAlive", "(", ")", ")", "{", "worldserver", ".", "updateEntityWithOptionalForce", "(", "par1EntityPlayerMP", ",", "false", ")", ";", "}", "}", "else", "{", "ChunkCoordinates", "chunkcoordinates", "=", "worldserver1", ".", "getEntrancePortalLocation", "(", ")", ";", "d", "=", "chunkcoordinates", ".", "posX", ";", "par1EntityPlayerMP", ".", "posY", "=", "chunkcoordinates", ".", "posY", ";", "d1", "=", "chunkcoordinates", ".", "posZ", ";", "par1EntityPlayerMP", ".", "setLocationAndAngles", "(", "d", ",", "par1EntityPlayerMP", ".", "posY", ",", "d1", ",", "90F", ",", "0.0F", ")", ";", "if", "(", "par1EntityPlayerMP", ".", "isEntityAlive", "(", ")", ")", "{", "worldserver", ".", "updateEntityWithOptionalForce", "(", "par1EntityPlayerMP", ",", "false", ")", ";", "}", "}", "if", "(", "i", "!=", "1", "&&", "par1EntityPlayerMP", ".", "isEntityAlive", "(", ")", ")", "{", "worldserver1", ".", "spawnEntityInWorld", "(", "par1EntityPlayerMP", ")", ";", "par1EntityPlayerMP", ".", "setLocationAndAngles", "(", "d", ",", "par1EntityPlayerMP", ".", "posY", ",", "d1", ",", "par1EntityPlayerMP", ".", "rotationYaw", ",", "par1EntityPlayerMP", ".", "rotationPitch", ")", ";", "worldserver1", ".", "updateEntityWithOptionalForce", "(", "par1EntityPlayerMP", ",", "false", ")", ";", "worldserver1", ".", "chunkProviderServer", ".", "chunkLoadOverride", "=", "true", ";", "(", "new", "Teleporter", "(", ")", ")", ".", "placeInPortal", "(", "worldserver1", ",", "par1EntityPlayerMP", ")", ";", "worldserver1", ".", "chunkProviderServer", ".", "chunkLoadOverride", "=", "false", ";", "}", "joinNewPlayerManager", "(", "par1EntityPlayerMP", ")", ";", "par1EntityPlayerMP", ".", "playerNetServerHandler", ".", "teleportTo", "(", "par1EntityPlayerMP", ".", "posX", ",", "par1EntityPlayerMP", ".", "posY", ",", "par1EntityPlayerMP", ".", "posZ", ",", "par1EntityPlayerMP", ".", "rotationYaw", ",", "par1EntityPlayerMP", ".", "rotationPitch", ")", ";", "par1EntityPlayerMP", ".", "setWorld", "(", "worldserver1", ")", ";", "par1EntityPlayerMP", ".", "itemInWorldManager", ".", "setWorld", "(", "worldserver1", ")", ";", "func_28170_a", "(", "par1EntityPlayerMP", ",", "worldserver1", ")", ";", "func_30008_g", "(", "par1EntityPlayerMP", ")", ";", "}", "public", "void", "onTick", "(", ")", "{", "if", "(", "++", "field_35482_p", ">", "200", ")", "{", "field_35482_p", "=", "0", ";", "}", "if", "(", "field_35482_p", "<", "playerEntities", ".", "size", "(", ")", ")", "{", "EntityPlayerMP", "entityplayermp", "=", "(", "EntityPlayerMP", ")", "playerEntities", ".", "get", "(", "field_35482_p", ")", ";", "sendPacketToAllPlayers", "(", "new", "Packet201PlayerInfo", "(", "entityplayermp", ".", "username", ",", "true", ",", "entityplayermp", ".", "ping", ")", ")", ";", "}", "for", "(", "int", "i", "=", "0", ";", "i", "<", "playerManagerObj", ".", "length", ";", "i", "++", ")", "{", "playerManagerObj", "[", "i", "]", ".", "updatePlayerInstances", "(", ")", ";", "}", "}", "public", "void", "markBlockNeedsUpdate", "(", "int", "par1", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ")", "{", "getPlayerManager", "(", "par4", ")", ".", "markBlockNeedsUpdate", "(", "par1", ",", "par2", ",", "par3", ")", ";", "}", "public", "void", "sendPacketToAllPlayers", "(", "Packet", "par1Packet", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "playerEntities", ".", "size", "(", ")", ";", "i", "++", ")", "{", "EntityPlayerMP", "entityplayermp", "=", "(", "EntityPlayerMP", ")", "playerEntities", ".", "get", "(", "i", ")", ";", "entityplayermp", ".", "playerNetServerHandler", ".", "sendPacket", "(", "par1Packet", ")", ";", "}", "}", "public", "void", "sendPacketToAllPlayersInDimension", "(", "Packet", "par1Packet", ",", "int", "par2", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "playerEntities", ".", "size", "(", ")", ";", "i", "++", ")", "{", "EntityPlayerMP", "entityplayermp", "=", "(", "EntityPlayerMP", ")", "playerEntities", ".", "get", "(", "i", ")", ";", "if", "(", "entityplayermp", ".", "dimension", "==", "par2", ")", "{", "entityplayermp", ".", "playerNetServerHandler", ".", "sendPacket", "(", "par1Packet", ")", ";", "}", "}", "}", "public", "String", "getPlayerList", "(", ")", "{", "String", "s", "=", "\"\"", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "playerEntities", ".", "size", "(", ")", ";", "i", "++", ")", "{", "if", "(", "i", ">", "0", ")", "{", "s", "=", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "s", ")", ".", "append", "(", "\",", "\"", ")", ".", "toString", "(", ")", ";", "}", "s", "=", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "s", ")", ".", "append", "(", "(", "(", "EntityPlayerMP", ")", "playerEntities", ".", "get", "(", "i", ")", ")", ".", "username", ")", ".", "toString", "(", ")", ";", "}", "return", "s", ";", "}", "public", "String", "[", "]", "getPlayerNamesAsList", "(", ")", "{", "String", "as", "[", "]", "=", "new", "String", "[", "playerEntities", ".", "size", "(", ")", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "playerEntities", ".", "size", "(", ")", ";", "i", "++", ")", "{", "as", "[", "i", "]", "=", "(", "(", "EntityPlayerMP", ")", "playerEntities", ".", "get", "(", "i", ")", ")", ".", "username", ";", "}", "return", "as", ";", "}", "public", "void", "banPlayer", "(", "String", "par1Str", ")", "{", "bannedPlayers", ".", "add", "(", "par1Str", ".", "toLowerCase", "(", ")", ")", ";", "writeBannedPlayers", "(", ")", ";", "}", "public", "void", "pardonPlayer", "(", "String", "par1Str", ")", "{", "bannedPlayers", ".", "remove", "(", "par1Str", ".", "toLowerCase", "(", ")", ")", ";", "writeBannedPlayers", "(", ")", ";", "}", "private", "void", "readBannedPlayers", "(", ")", "{", "try", "{", "bannedPlayers", ".", "clear", "(", ")", ";", "BufferedReader", "bufferedreader", "=", "new", "BufferedReader", "(", "new", "FileReader", "(", "bannedPlayersFile", ")", ")", ";", "for", "(", "String", "s", "=", "\"\"", ";", "(", "s", "=", "bufferedreader", ".", "readLine", "(", ")", ")", "!=", "null", ";", ")", "{", "bannedPlayers", ".", "add", "(", "s", ".", "trim", "(", ")", ".", "toLowerCase", "(", ")", ")", ";", "}", "bufferedreader", ".", "close", "(", ")", ";", "}", "catch", "(", "Exception", "exception", ")", "{", "logger", ".", "warning", "(", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "\"\"", ")", ".", "append", "(", "exception", ")", ".", "toString", "(", ")", ")", ";", "}", "}", "private", "void", "writeBannedPlayers", "(", ")", "{", "try", "{", "PrintWriter", "printwriter", "=", "new", "PrintWriter", "(", "new", "FileWriter", "(", "bannedPlayersFile", ",", "false", ")", ")", ";", "String", "s", ";", "for", "(", "Iterator", "iterator", "=", "bannedPlayers", ".", "iterator", "(", ")", ";", "iterator", ".", "hasNext", "(", ")", ";", "printwriter", ".", "println", "(", "s", ")", ")", "{", "s", "=", "(", "String", ")", "iterator", ".", "next", "(", ")", ";", "}", "printwriter", ".", "close", "(", ")", ";", "}", "catch", "(", "Exception", "exception", ")", "{", "logger", ".", "warning", "(", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "\"\"", ")", ".", "append", "(", "exception", ")", ".", "toString", "(", ")", ")", ";", "}", "}", "public", "Set", "getBannedPlayersList", "(", ")", "{", "return", "bannedPlayers", ";", "}", "public", "Set", "getBannedIPsList", "(", ")", "{", "return", "bannedIPs", ";", "}", "public", "void", "banIP", "(", "String", "par1Str", ")", "{", "bannedIPs", ".", "add", "(", "par1Str", ".", "toLowerCase", "(", ")", ")", ";", "saveBannedList", "(", ")", ";", "}", "public", "void", "pardonIP", "(", "String", "par1Str", ")", "{", "bannedIPs", ".", "remove", "(", "par1Str", ".", "toLowerCase", "(", ")", ")", ";", "saveBannedList", "(", ")", ";", "}", "private", "void", "loadBannedList", "(", ")", "{", "try", "{", "bannedIPs", ".", "clear", "(", ")", ";", "BufferedReader", "bufferedreader", "=", "new", "BufferedReader", "(", "new", "FileReader", "(", "ipBanFile", ")", ")", ";", "for", "(", "String", "s", "=", "\"\"", ";", "(", "s", "=", "bufferedreader", ".", "readLine", "(", ")", ")", "!=", "null", ";", ")", "{", "bannedIPs", ".", "add", "(", "s", ".", "trim", "(", ")", ".", "toLowerCase", "(", ")", ")", ";", "}", "bufferedreader", ".", "close", "(", ")", ";", "}", "catch", "(", "Exception", "exception", ")", "{", "logger", ".", "warning", "(", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "\"\"", ")", ".", "append", "(", "exception", ")", ".", "toString", "(", ")", ")", ";", "}", "}", "private", "void", "saveBannedList", "(", ")", "{", "try", "{", "PrintWriter", "printwriter", "=", "new", "PrintWriter", "(", "new", "FileWriter", "(", "ipBanFile", ",", "false", ")", ")", ";", "String", "s", ";", "for", "(", "Iterator", "iterator", "=", "bannedIPs", ".", "iterator", "(", ")", ";", "iterator", ".", "hasNext", "(", ")", ";", "printwriter", ".", "println", "(", "s", ")", ")", "{", "s", "=", "(", "String", ")", "iterator", ".", "next", "(", ")", ";", "}", "printwriter", ".", "close", "(", ")", ";", "}", "catch", "(", "Exception", "exception", ")", "{", "logger", ".", "warning", "(", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "\"\"", ")", ".", "append", "(", "exception", ")", ".", "toString", "(", ")", ")", ";", "}", "}", "public", "void", "addOp", "(", "String", "par1Str", ")", "{", "ops", ".", "add", "(", "par1Str", ".", "toLowerCase", "(", ")", ")", ";", "saveOps", "(", ")", ";", "}", "public", "void", "removeOp", "(", "String", "par1Str", ")", "{", "ops", ".", "remove", "(", "par1Str", ".", "toLowerCase", "(", ")", ")", ";", "saveOps", "(", ")", ";", "}", "private", "void", "loadOps", "(", ")", "{", "try", "{", "ops", ".", "clear", "(", ")", ";", "BufferedReader", "bufferedreader", "=", "new", "BufferedReader", "(", "new", "FileReader", "(", "opFile", ")", ")", ";", "for", "(", "String", "s", "=", "\"\"", ";", "(", "s", "=", "bufferedreader", ".", "readLine", "(", ")", ")", "!=", "null", ";", ")", "{", "ops", ".", "add", "(", "s", ".", "trim", "(", ")", ".", "toLowerCase", "(", ")", ")", ";", "}", "bufferedreader", ".", "close", "(", ")", ";", "}", "catch", "(", "Exception", "exception", ")", "{", "logger", ".", "warning", "(", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "\"\"", ")", ".", "append", "(", "exception", ")", ".", "toString", "(", ")", ")", ";", "}", "}", "private", "void", "saveOps", "(", ")", "{", "try", "{", "PrintWriter", "printwriter", "=", "new", "PrintWriter", "(", "new", "FileWriter", "(", "opFile", ",", "false", ")", ")", ";", "String", "s", ";", "for", "(", "Iterator", "iterator", "=", "ops", ".", "iterator", "(", ")", ";", "iterator", ".", "hasNext", "(", ")", ";", "printwriter", ".", "println", "(", "s", ")", ")", "{", "s", "=", "(", "String", ")", "iterator", ".", "next", "(", ")", ";", "}", "printwriter", ".", "close", "(", ")", ";", "}", "catch", "(", "Exception", "exception", ")", "{", "logger", ".", "warning", "(", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "\"\"", ")", ".", "append", "(", "exception", ")", ".", "toString", "(", ")", ")", ";", "}", "}", "private", "void", "loadWhiteList", "(", ")", "{", "try", "{", "whiteListedIPs", ".", "clear", "(", ")", ";", "BufferedReader", "bufferedreader", "=", "new", "BufferedReader", "(", "new", "FileReader", "(", "whitelistPlayersFile", ")", ")", ";", "for", "(", "String", "s", "=", "\"\"", ";", "(", "s", "=", "bufferedreader", ".", "readLine", "(", ")", ")", "!=", "null", ";", ")", "{", "whiteListedIPs", ".", "add", "(", "s", ".", "trim", "(", ")", ".", "toLowerCase", "(", ")", ")", ";", "}", "bufferedreader", ".", "close", "(", ")", ";", "}", "catch", "(", "Exception", "exception", ")", "{", "logger", ".", "warning", "(", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "\"\"", ")", ".", "append", "(", "exception", ")", ".", "toString", "(", ")", ")", ";", "}", "}", "private", "void", "saveWhiteList", "(", ")", "{", "try", "{", "PrintWriter", "printwriter", "=", "new", "PrintWriter", "(", "new", "FileWriter", "(", "whitelistPlayersFile", ",", "false", ")", ")", ";", "String", "s", ";", "for", "(", "Iterator", "iterator", "=", "whiteListedIPs", ".", "iterator", "(", ")", ";", "iterator", ".", "hasNext", "(", ")", ";", "printwriter", ".", "println", "(", "s", ")", ")", "{", "s", "=", "(", "String", ")", "iterator", ".", "next", "(", ")", ";", "}", "printwriter", ".", "close", "(", ")", ";", "}", "catch", "(", "Exception", "exception", ")", "{", "logger", ".", "warning", "(", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "\"\"", ")", ".", "append", "(", "exception", ")", ".", "toString", "(", ")", ")", ";", "}", "}", "public", "boolean", "isAllowedToLogin", "(", "String", "par1Str", ")", "{", "par1Str", "=", "par1Str", ".", "trim", "(", ")", ".", "toLowerCase", "(", ")", ";", "return", "!", "whiteListEnforced", "||", "ops", ".", "contains", "(", "par1Str", ")", "||", "whiteListedIPs", ".", "contains", "(", "par1Str", ")", ";", "}", "public", "boolean", "isOp", "(", "String", "par1Str", ")", "{", "return", "ops", ".", "contains", "(", "par1Str", ".", "trim", "(", ")", ".", "toLowerCase", "(", ")", ")", ";", "}", "public", "EntityPlayerMP", "getPlayerEntity", "(", "String", "par1Str", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "playerEntities", ".", "size", "(", ")", ";", "i", "++", ")", "{", "EntityPlayerMP", "entityplayermp", "=", "(", "EntityPlayerMP", ")", "playerEntities", ".", "get", "(", "i", ")", ";", "if", "(", "entityplayermp", ".", "username", ".", "equalsIgnoreCase", "(", "par1Str", ")", ")", "{", "return", "entityplayermp", ";", "}", "}", "return", "null", ";", "}", "public", "void", "sendChatMessageToPlayer", "(", "String", "par1Str", ",", "String", "par2Str", ")", "{", "EntityPlayerMP", "entityplayermp", "=", "getPlayerEntity", "(", "par1Str", ")", ";", "if", "(", "entityplayermp", "!=", "null", ")", "{", "entityplayermp", ".", "playerNetServerHandler", ".", "sendPacket", "(", "new", "Packet3Chat", "(", "par2Str", ")", ")", ";", "}", "}", "public", "void", "sendPacketToPlayersAroundPoint", "(", "double", "par1", ",", "double", "par3", ",", "double", "par5", ",", "double", "par7", ",", "int", "par9", ",", "Packet", "par10Packet", ")", "{", "func_28171_a", "(", "null", ",", "par1", ",", "par3", ",", "par5", ",", "par7", ",", "par9", ",", "par10Packet", ")", ";", "}", "public", "void", "func_28171_a", "(", "EntityPlayer", "par1EntityPlayer", ",", "double", "par2", ",", "double", "par4", ",", "double", "par6", ",", "double", "par8", ",", "int", "par10", ",", "Packet", "par11Packet", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "playerEntities", ".", "size", "(", ")", ";", "i", "++", ")", "{", "EntityPlayerMP", "entityplayermp", "=", "(", "EntityPlayerMP", ")", "playerEntities", ".", "get", "(", "i", ")", ";", "if", "(", "entityplayermp", "==", "par1EntityPlayer", "||", "entityplayermp", ".", "dimension", "!=", "par10", ")", "{", "continue", ";", "}", "double", "d", "=", "par2", "-", "entityplayermp", ".", "posX", ";", "double", "d1", "=", "par4", "-", "entityplayermp", ".", "posY", ";", "double", "d2", "=", "par6", "-", "entityplayermp", ".", "posZ", ";", "if", "(", "d", "*", "d", "+", "d1", "*", "d1", "+", "d2", "*", "d2", "<", "par8", "*", "par8", ")", "{", "entityplayermp", ".", "playerNetServerHandler", ".", "sendPacket", "(", "par11Packet", ")", ";", "}", "}", "}", "public", "void", "sendChatMessageToAllOps", "(", "String", "par1Str", ")", "{", "Packet3Chat", "packet3chat", "=", "new", "Packet3Chat", "(", "par1Str", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "playerEntities", ".", "size", "(", ")", ";", "i", "++", ")", "{", "EntityPlayerMP", "entityplayermp", "=", "(", "EntityPlayerMP", ")", "playerEntities", ".", "get", "(", "i", ")", ";", "if", "(", "isOp", "(", "entityplayermp", ".", "username", ")", ")", "{", "entityplayermp", ".", "playerNetServerHandler", ".", "sendPacket", "(", "packet3chat", ")", ";", "}", "}", "}", "public", "boolean", "sendPacketToPlayer", "(", "String", "par1Str", ",", "Packet", "par2Packet", ")", "{", "EntityPlayerMP", "entityplayermp", "=", "getPlayerEntity", "(", "par1Str", ")", ";", "if", "(", "entityplayermp", "!=", "null", ")", "{", "entityplayermp", ".", "playerNetServerHandler", ".", "sendPacket", "(", "par2Packet", ")", ";", "return", "true", ";", "}", "else", "{", "return", "false", ";", "}", "}", "public", "void", "savePlayerStates", "(", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "playerEntities", ".", "size", "(", ")", ";", "i", "++", ")", "{", "playerNBTManagerObj", ".", "writePlayerData", "(", "(", "EntityPlayer", ")", "playerEntities", ".", "get", "(", "i", ")", ")", ";", "}", "}", "public", "void", "sentTileEntityToPlayer", "(", "int", "i", ",", "int", "j", ",", "int", "k", ",", "TileEntity", "tileentity", ")", "{", "}", "public", "void", "addToWhiteList", "(", "String", "par1Str", ")", "{", "whiteListedIPs", ".", "add", "(", "par1Str", ")", ";", "saveWhiteList", "(", ")", ";", "}", "public", "void", "removeFromWhiteList", "(", "String", "par1Str", ")", "{", "whiteListedIPs", ".", "remove", "(", "par1Str", ")", ";", "saveWhiteList", "(", ")", ";", "}", "public", "Set", "getWhiteListedIPs", "(", ")", "{", "return", "whiteListedIPs", ";", "}", "public", "void", "reloadWhiteList", "(", ")", "{", "loadWhiteList", "(", ")", ";", "}", "public", "void", "func_28170_a", "(", "EntityPlayerMP", "par1EntityPlayerMP", ",", "WorldServer", "par2WorldServer", ")", "{", "par1EntityPlayerMP", ".", "playerNetServerHandler", ".", "sendPacket", "(", "new", "Packet4UpdateTime", "(", "par2WorldServer", ".", "getWorldTime", "(", ")", ")", ")", ";", "if", "(", "par2WorldServer", ".", "isRaining", "(", ")", ")", "{", "par1EntityPlayerMP", ".", "playerNetServerHandler", ".", "sendPacket", "(", "new", "Packet70Bed", "(", "1", ",", "0", ")", ")", ";", "}", "}", "public", "void", "func_30008_g", "(", "EntityPlayerMP", "par1EntityPlayerMP", ")", "{", "par1EntityPlayerMP", ".", "func_28017_a", "(", "par1EntityPlayerMP", ".", "inventorySlots", ")", ";", "par1EntityPlayerMP", ".", "func_30001_B", "(", ")", ";", "}", "public", "int", "playersOnline", "(", ")", "{", "return", "playerEntities", ".", "size", "(", ")", ";", "}", "public", "int", "getMaxPlayers", "(", ")", "{", "return", "maxPlayers", ";", "}", "public", "String", "[", "]", "func_52019_t", "(", ")", "{", "return", "mcServer", ".", "worldMngr", "[", "0", "]", ".", "getSaveHandler", "(", ")", ".", "getPlayerNBTManager", "(", ")", ".", "func_52007_g", "(", ")", ";", "}", "private", "void", "func_52018_u", "(", ")", "{", "PlayerUsageSnooper", "playerusagesnooper", "=", "new", "PlayerUsageSnooper", "(", "\"server\"", ")", ";", "playerusagesnooper", ".", "func_52014_a", "(", "\"version\"", ",", "mcServer", ".", "getVersionString", "(", ")", ")", ";", "playerusagesnooper", ".", "func_52014_a", "(", "\"os_name\"", ",", "System", ".", "getProperty", "(", "\"os.name\"", ")", ")", ";", "playerusagesnooper", ".", "func_52014_a", "(", "\"os_version\"", ",", "System", ".", "getProperty", "(", "\"os.version\"", ")", ")", ";", "playerusagesnooper", ".", "func_52014_a", "(", "\"\"", ",", "System", ".", "getProperty", "(", "\"os.arch\"", ")", ")", ";", "playerusagesnooper", ".", "func_52014_a", "(", "\"memory_total\"", ",", "Long", ".", "valueOf", "(", "Runtime", ".", "getRuntime", "(", ")", ".", "totalMemory", "(", ")", ")", ")", ";", "playerusagesnooper", ".", "func_52014_a", "(", "\"memory_max\"", ",", "Long", ".", "valueOf", "(", "Runtime", ".", "getRuntime", "(", ")", ".", "maxMemory", "(", ")", ")", ")", ";", "playerusagesnooper", ".", "func_52014_a", "(", "\"memory_free\"", ",", "Long", ".", "valueOf", "(", "Runtime", ".", "getRuntime", "(", ")", ".", "freeMemory", "(", ")", ")", ")", ";", "playerusagesnooper", ".", "func_52014_a", "(", "\"java_version\"", ",", "System", ".", "getProperty", "(", "\"java.version\"", ")", ")", ";", "playerusagesnooper", ".", "func_52014_a", "(", "\"cpu_cores\"", ",", "Integer", ".", "valueOf", "(", "Runtime", ".", "getRuntime", "(", ")", ".", "availableProcessors", "(", ")", ")", ")", ";", "playerusagesnooper", ".", "func_52014_a", "(", "\"\"", ",", "Integer", ".", "valueOf", "(", "playersOnline", "(", ")", ")", ")", ";", "playerusagesnooper", ".", "func_52014_a", "(", "\"players_max\"", ",", "Integer", ".", "valueOf", "(", "getMaxPlayers", "(", ")", ")", ")", ";", "playerusagesnooper", ".", "func_52014_a", "(", "\"players_seen\"", ",", "Integer", ".", "valueOf", "(", "func_52019_t", "(", ")", ".", "length", ")", ")", ";", "playerusagesnooper", ".", "func_52014_a", "(", "\"uses_auth\"", ",", "Boolean", ".", "valueOf", "(", "mcServer", ".", "onlineMode", ")", ")", ";", "playerusagesnooper", ".", "func_52014_a", "(", "\"server_brand\"", ",", "mcServer", ".", "func_52003_getServerModName", "(", ")", ")", ";", "playerusagesnooper", ".", "func_52012_a", "(", ")", ";", "}", "}", "</s>" ]
9,761
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "List", ";", "public", "class", "BiomeGenBeach", "extends", "BiomeGenBase", "{", "public", "BiomeGenBeach", "(", "int", "par1", ")", "{", "super", "(", "par1", ")", ";", "spawnableCreatureList", ".", "clear", "(", ")", ";", "topBlock", "=", "(", "byte", ")", "Block", ".", "sand", ".", "blockID", ";", "fillerBlock", "=", "(", "byte", ")", "Block", ".", "sand", ".", "blockID", ";", "biomeDecorator", ".", "treesPerChunk", "=", "-", "999", ";", "biomeDecorator", ".", "deadBushPerChunk", "=", "0", ";", "biomeDecorator", ".", "reedsPerChunk", "=", "0", ";", "biomeDecorator", ".", "cactiPerChunk", "=", "0", ";", "}", "}", "</s>" ]
9,762
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "public", "class", "RecipesFood", "{", "public", "RecipesFood", "(", ")", "{", "}", "public", "void", "addRecipes", "(", "CraftingManager", "par1CraftingManager", ")", "{", "par1CraftingManager", ".", "addShapelessRecipe", "(", "new", "ItemStack", "(", "Item", ".", "bowlSoup", ")", ",", "new", "Object", "[", "]", "{", "Block", ".", "mushroomBrown", ",", "Block", ".", "mushroomRed", ",", "Item", ".", "bowlEmpty", "}", ")", ";", "par1CraftingManager", ".", "addRecipe", "(", "new", "ItemStack", "(", "Item", ".", "cookie", ",", "8", ")", ",", "new", "Object", "[", "]", "{", "\"#X#\"", ",", "'X'", ",", "new", "ItemStack", "(", "Item", ".", "dyePowder", ",", "1", ",", "3", ")", ",", "'#'", ",", "Item", ".", "wheat", "}", ")", ";", "par1CraftingManager", ".", "addRecipe", "(", "new", "ItemStack", "(", "Block", ".", "melon", ")", ",", "new", "Object", "[", "]", "{", "\"MMM\"", ",", "\"MMM\"", ",", "\"MMM\"", ",", "'M'", ",", "Item", ".", "melon", "}", ")", ";", "par1CraftingManager", ".", "addRecipe", "(", "new", "ItemStack", "(", "Item", ".", "melonSeeds", ")", ",", "new", "Object", "[", "]", "{", "\"M\"", ",", "'M'", ",", "Item", ".", "melon", "}", ")", ";", "par1CraftingManager", ".", "addRecipe", "(", "new", "ItemStack", "(", "Item", ".", "pumpkinSeeds", ",", "4", ")", ",", "new", "Object", "[", "]", "{", "\"M\"", ",", "'M'", ",", "Block", ".", "pumpkin", "}", ")", ";", "par1CraftingManager", ".", "addShapelessRecipe", "(", "new", "ItemStack", "(", "Item", ".", "fermentedSpiderEye", ")", ",", "new", "Object", "[", "]", "{", "Item", ".", "spiderEye", ",", "Block", ".", "mushroomBrown", ",", "Item", ".", "sugar", "}", ")", ";", "par1CraftingManager", ".", "addShapelessRecipe", "(", "new", "ItemStack", "(", "Item", ".", "speckledMelon", ")", ",", "new", "Object", "[", "]", "{", "Item", ".", "melon", ",", "Item", ".", "goldNugget", "}", ")", ";", "par1CraftingManager", ".", "addShapelessRecipe", "(", "new", "ItemStack", "(", "Item", ".", "blazePowder", ",", "2", ")", ",", "new", "Object", "[", "]", "{", "Item", ".", "blazeRod", "}", ")", ";", "par1CraftingManager", ".", "addShapelessRecipe", "(", "new", "ItemStack", "(", "Item", ".", "magmaCream", ")", ",", "new", "Object", "[", "]", "{", "Item", ".", "blazePowder", ",", "Item", ".", "slimeBall", "}", ")", ";", "}", "}", "</s>" ]
9,763
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "public", "class", "ItemSaddle", "extends", "Item", "{", "public", "ItemSaddle", "(", "int", "par1", ")", "{", "super", "(", "par1", ")", ";", "maxStackSize", "=", "1", ";", "}", "public", "void", "useItemOnEntity", "(", "ItemStack", "par1ItemStack", ",", "EntityLiving", "par2EntityLiving", ")", "{", "if", "(", "par2EntityLiving", "instanceof", "EntityPig", ")", "{", "EntityPig", "entitypig", "=", "(", "EntityPig", ")", "par2EntityLiving", ";", "if", "(", "!", "entitypig", ".", "getSaddled", "(", ")", "&&", "!", "entitypig", ".", "isChild", "(", ")", ")", "{", "entitypig", ".", "setSaddled", "(", "true", ")", ";", "par1ItemStack", ".", "stackSize", "--", ";", "}", "}", "}", "public", "boolean", "hitEntity", "(", "ItemStack", "par1ItemStack", ",", "EntityLiving", "par2EntityLiving", ",", "EntityLiving", "par3EntityLiving", ")", "{", "useItemOnEntity", "(", "par1ItemStack", ",", "par2EntityLiving", ")", ";", "return", "true", ";", "}", "}", "</s>" ]
9,764
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "public", "class", "InventoryCrafting", "implements", "IInventory", "{", "private", "ItemStack", "stackList", "[", "]", ";", "private", "int", "inventoryWidth", ";", "private", "Container", "eventHandler", ";", "public", "InventoryCrafting", "(", "Container", "par1Container", ",", "int", "par2", ",", "int", "par3", ")", "{", "int", "i", "=", "par2", "*", "par3", ";", "stackList", "=", "new", "ItemStack", "[", "i", "]", ";", "eventHandler", "=", "par1Container", ";", "inventoryWidth", "=", "par2", ";", "}", "public", "int", "getSizeInventory", "(", ")", "{", "return", "stackList", ".", "length", ";", "}", "public", "ItemStack", "getStackInSlot", "(", "int", "par1", ")", "{", "if", "(", "par1", ">=", "getSizeInventory", "(", ")", ")", "{", "return", "null", ";", "}", "else", "{", "return", "stackList", "[", "par1", "]", ";", "}", "}", "public", "ItemStack", "getStackInRowAndColumn", "(", "int", "par1", ",", "int", "par2", ")", "{", "if", "(", "par1", "<", "0", "||", "par1", ">=", "inventoryWidth", ")", "{", "return", "null", ";", "}", "else", "{", "int", "i", "=", "par1", "+", "par2", "*", "inventoryWidth", ";", "return", "getStackInSlot", "(", "i", ")", ";", "}", "}", "public", "String", "getInvName", "(", ")", "{", "return", "\"\"", ";", "}", "public", "ItemStack", "getStackInSlotOnClosing", "(", "int", "par1", ")", "{", "if", "(", "stackList", "[", "par1", "]", "!=", "null", ")", "{", "ItemStack", "itemstack", "=", "stackList", "[", "par1", "]", ";", "stackList", "[", "par1", "]", "=", "null", ";", "return", "itemstack", ";", "}", "else", "{", "return", "null", ";", "}", "}", "public", "ItemStack", "decrStackSize", "(", "int", "par1", ",", "int", "par2", ")", "{", "if", "(", "stackList", "[", "par1", "]", "!=", "null", ")", "{", "if", "(", "stackList", "[", "par1", "]", ".", "stackSize", "<=", "par2", ")", "{", "ItemStack", "itemstack", "=", "stackList", "[", "par1", "]", ";", "stackList", "[", "par1", "]", "=", "null", ";", "eventHandler", ".", "onCraftMatrixChanged", "(", "this", ")", ";", "return", "itemstack", ";", "}", "ItemStack", "itemstack1", "=", "stackList", "[", "par1", "]", ".", "splitStack", "(", "par2", ")", ";", "if", "(", "stackList", "[", "par1", "]", ".", "stackSize", "==", "0", ")", "{", "stackList", "[", "par1", "]", "=", "null", ";", "}", "eventHandler", ".", "onCraftMatrixChanged", "(", "this", ")", ";", "return", "itemstack1", ";", "}", "else", "{", "return", "null", ";", "}", "}", "public", "void", "setInventorySlotContents", "(", "int", "par1", ",", "ItemStack", "par2ItemStack", ")", "{", "stackList", "[", "par1", "]", "=", "par2ItemStack", ";", "eventHandler", ".", "onCraftMatrixChanged", "(", "this", ")", ";", "}", "public", "int", "getInventoryStackLimit", "(", ")", "{", "return", "64", ";", "}", "public", "void", "onInventoryChanged", "(", ")", "{", "}", "public", "boolean", "isUseableByPlayer", "(", "EntityPlayer", "par1EntityPlayer", ")", "{", "return", "true", ";", "}", "public", "void", "openChest", "(", ")", "{", "}", "public", "void", "closeChest", "(", ")", "{", "}", "}", "</s>" ]
9,765
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "io", ".", "*", ";", "public", "class", "Packet38EntityStatus", "extends", "Packet", "{", "public", "int", "entityId", ";", "public", "byte", "entityStatus", ";", "public", "Packet38EntityStatus", "(", ")", "{", "}", "public", "Packet38EntityStatus", "(", "int", "par1", ",", "byte", "par2", ")", "{", "entityId", "=", "par1", ";", "entityStatus", "=", "par2", ";", "}", "public", "void", "readPacketData", "(", "DataInputStream", "par1DataInputStream", ")", "throws", "IOException", "{", "entityId", "=", "par1DataInputStream", ".", "readInt", "(", ")", ";", "entityStatus", "=", "par1DataInputStream", ".", "readByte", "(", ")", ";", "}", "public", "void", "writePacketData", "(", "DataOutputStream", "par1DataOutputStream", ")", "throws", "IOException", "{", "par1DataOutputStream", ".", "writeInt", "(", "entityId", ")", ";", "par1DataOutputStream", ".", "writeByte", "(", "entityStatus", ")", ";", "}", "public", "void", "processPacket", "(", "NetHandler", "par1NetHandler", ")", "{", "par1NetHandler", ".", "handleEntityStatus", "(", "this", ")", ";", "}", "public", "int", "getPacketSize", "(", ")", "{", "return", "5", ";", "}", "}", "</s>" ]
9,766
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "public", "class", "BlockLilyPad", "extends", "BlockFlower", "{", "protected", "BlockLilyPad", "(", "int", "par1", ",", "int", "par2", ")", "{", "super", "(", "par1", ",", "par2", ")", ";", "float", "f", "=", "0.5F", ";", "float", "f1", "=", "0.015625F", ";", "setBlockBounds", "(", "0.5F", "-", "f", ",", "0.0F", ",", "0.5F", "-", "f", ",", "0.5F", "+", "f", ",", "f1", ",", "0.5F", "+", "f", ")", ";", "}", "public", "int", "getRenderType", "(", ")", "{", "return", "23", ";", "}", "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", "canPlaceBlockAt", "(", "World", "par1World", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ")", "{", "return", "super", ".", "canPlaceBlockAt", "(", "par1World", ",", "par2", ",", "par3", ",", "par4", ")", ";", "}", "protected", "boolean", "canThisPlantGrowOnThisBlockID", "(", "int", "par1", ")", "{", "return", "par1", "==", "Block", ".", "waterStill", ".", "blockID", ";", "}", "public", "boolean", "canBlockStay", "(", "World", "par1World", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ")", "{", "if", "(", "par3", "<", "0", "||", "par3", ">=", "256", ")", "{", "return", "false", ";", "}", "else", "{", "return", "par1World", ".", "getBlockMaterial", "(", "par2", ",", "par3", "-", "1", ",", "par4", ")", "==", "Material", ".", "water", "&&", "par1World", ".", "getBlockMetadata", "(", "par2", ",", "par3", "-", "1", ",", "par4", ")", "==", "0", ";", "}", "}", "}", "</s>" ]
9,767
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "Random", ";", "public", "class", "BlockLog", "extends", "Block", "{", "protected", "BlockLog", "(", "int", "par1", ")", "{", "super", "(", "par1", ",", "Material", ".", "wood", ")", ";", "blockIndexInTexture", "=", "20", ";", "}", "public", "int", "quantityDropped", "(", "Random", "par1Random", ")", "{", "return", "1", ";", "}", "public", "int", "idDropped", "(", "int", "par1", ",", "Random", "par2Random", ",", "int", "par3", ")", "{", "return", "Block", ".", "wood", ".", "blockID", ";", "}", "public", "void", "harvestBlock", "(", "World", "par1World", ",", "EntityPlayer", "par2EntityPlayer", ",", "int", "par3", ",", "int", "par4", ",", "int", "par5", ",", "int", "par6", ")", "{", "super", ".", "harvestBlock", "(", "par1World", ",", "par2EntityPlayer", ",", "par3", ",", "par4", ",", "par5", ",", "par6", ")", ";", "}", "public", "void", "onBlockRemoval", "(", "World", "par1World", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ")", "{", "byte", "byte0", "=", "4", ";", "int", "i", "=", "byte0", "+", "1", ";", "if", "(", "par1World", ".", "checkChunksExist", "(", "par2", "-", "i", ",", "par3", "-", "i", ",", "par4", "-", "i", ",", "par2", "+", "i", ",", "par3", "+", "i", ",", "par4", "+", "i", ")", ")", "{", "for", "(", "int", "j", "=", "-", "byte0", ";", "j", "<=", "byte0", ";", "j", "++", ")", "{", "for", "(", "int", "k", "=", "-", "byte0", ";", "k", "<=", "byte0", ";", "k", "++", ")", "{", "for", "(", "int", "l", "=", "-", "byte0", ";", "l", "<=", "byte0", ";", "l", "++", ")", "{", "int", "i1", "=", "par1World", ".", "getBlockId", "(", "par2", "+", "j", ",", "par3", "+", "k", ",", "par4", "+", "l", ")", ";", "if", "(", "i1", "!=", "Block", ".", "leaves", ".", "blockID", ")", "{", "continue", ";", "}", "int", "j1", "=", "par1World", ".", "getBlockMetadata", "(", "par2", "+", "j", ",", "par3", "+", "k", ",", "par4", "+", "l", ")", ";", "if", "(", "(", "j1", "&", "8", ")", "==", "0", ")", "{", "par1World", ".", "setBlockMetadata", "(", "par2", "+", "j", ",", "par3", "+", "k", ",", "par4", "+", "l", ",", "j1", "|", "8", ")", ";", "}", "}", "}", "}", "}", "}", "public", "int", "getBlockTextureFromSideAndMetadata", "(", "int", "par1", ",", "int", "par2", ")", "{", "if", "(", "par1", "==", "1", ")", "{", "return", "21", ";", "}", "if", "(", "par1", "==", "0", ")", "{", "return", "21", ";", "}", "if", "(", "par2", "==", "1", ")", "{", "return", "116", ";", "}", "if", "(", "par2", "==", "2", ")", "{", "return", "117", ";", "}", "return", "par2", "!=", "3", "?", "20", ":", "153", ";", "}", "protected", "int", "damageDropped", "(", "int", "par1", ")", "{", "return", "par1", ";", "}", "}", "</s>" ]
9,768
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "public", "class", "EntityAIWatchClosest2", "extends", "EntityAIWatchClosest", "{", "public", "EntityAIWatchClosest2", "(", "EntityLiving", "par1EntityLiving", ",", "Class", "par2Class", ",", "float", "par3", ")", "{", "super", "(", "par1EntityLiving", ",", "par2Class", ",", "par3", ")", ";", "setMutexBits", "(", "3", ")", ";", "}", "public", "EntityAIWatchClosest2", "(", "EntityLiving", "par1EntityLiving", ",", "Class", "par2Class", ",", "float", "par3", ",", "float", "par4", ")", "{", "super", "(", "par1EntityLiving", ",", "par2Class", ",", "par3", ",", "par4", ")", ";", "setMutexBits", "(", "3", ")", ";", "}", "}", "</s>" ]
9,769
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "Random", ";", "public", "class", "WorldGenVines", "extends", "WorldGenerator", "{", "public", "WorldGenVines", "(", ")", "{", "}", "public", "boolean", "generate", "(", "World", "par1World", ",", "Random", "par2Random", ",", "int", "par3", ",", "int", "par4", ",", "int", "par5", ")", "{", "int", "i", "=", "par3", ";", "int", "j", "=", "par5", ";", "label0", ":", "for", "(", ";", "par4", "<", "128", ";", "par4", "++", ")", "{", "if", "(", "par1World", ".", "isAirBlock", "(", "par3", ",", "par4", ",", "par5", ")", ")", "{", "int", "k", "=", "2", ";", "do", "{", "if", "(", "k", ">", "5", ")", "{", "continue", "label0", ";", "}", "if", "(", "Block", ".", "vine", ".", "canPlaceBlockOnSide", "(", "par1World", ",", "par3", ",", "par4", ",", "par5", ",", "k", ")", ")", "{", "par1World", ".", "setBlockAndMetadata", "(", "par3", ",", "par4", ",", "par5", ",", "Block", ".", "vine", ".", "blockID", ",", "1", "<<", "Direction", ".", "vineGrowth", "[", "Facing", ".", "faceToSide", "[", "k", "]", "]", ")", ";", "continue", "label0", ";", "}", "k", "++", ";", "}", "while", "(", "true", ")", ";", "}", "par3", "=", "(", "i", "+", "par2Random", ".", "nextInt", "(", "4", ")", ")", "-", "par2Random", ".", "nextInt", "(", "4", ")", ";", "par5", "=", "(", "j", "+", "par2Random", ".", "nextInt", "(", "4", ")", ")", "-", "par2Random", ".", "nextInt", "(", "4", ")", ";", "}", "return", "true", ";", "}", "}", "</s>" ]
9,770
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "public", "class", "EntityEggInfo", "{", "public", "int", "spawnedID", ";", "public", "int", "primaryColor", ";", "public", "int", "secondaryColor", ";", "public", "EntityEggInfo", "(", "int", "par1", ",", "int", "par2", ",", "int", "par3", ")", "{", "spawnedID", "=", "par1", ";", "primaryColor", "=", "par2", ";", "secondaryColor", "=", "par3", ";", "}", "}", "</s>" ]
9,771
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "*", ";", "public", "abstract", "class", "StructureStart", "{", "protected", "LinkedList", "components", ";", "protected", "StructureBoundingBox", "boundingBox", ";", "protected", "StructureStart", "(", ")", "{", "components", "=", "new", "LinkedList", "(", ")", ";", "}", "public", "StructureBoundingBox", "getBoundingBox", "(", ")", "{", "return", "boundingBox", ";", "}", "public", "LinkedList", "getComponents", "(", ")", "{", "return", "components", ";", "}", "public", "void", "generateStructure", "(", "World", "par1World", ",", "Random", "par2Random", ",", "StructureBoundingBox", "par3StructureBoundingBox", ")", "{", "Iterator", "iterator", "=", "components", ".", "iterator", "(", ")", ";", "do", "{", "if", "(", "!", "iterator", ".", "hasNext", "(", ")", ")", "{", "break", ";", "}", "StructureComponent", "structurecomponent", "=", "(", "StructureComponent", ")", "iterator", ".", "next", "(", ")", ";", "if", "(", "structurecomponent", ".", "getBoundingBox", "(", ")", ".", "intersectsWith", "(", "par3StructureBoundingBox", ")", "&&", "!", "structurecomponent", ".", "addComponentParts", "(", "par1World", ",", "par2Random", ",", "par3StructureBoundingBox", ")", ")", "{", "iterator", ".", "remove", "(", ")", ";", "}", "}", "while", "(", "true", ")", ";", "}", "protected", "void", "updateBoundingBox", "(", ")", "{", "boundingBox", "=", "StructureBoundingBox", ".", "getNewBoundingBox", "(", ")", ";", "StructureComponent", "structurecomponent", ";", "for", "(", "Iterator", "iterator", "=", "components", ".", "iterator", "(", ")", ";", "iterator", ".", "hasNext", "(", ")", ";", "boundingBox", ".", "expandTo", "(", "structurecomponent", ".", "getBoundingBox", "(", ")", ")", ")", "{", "structurecomponent", "=", "(", "StructureComponent", ")", "iterator", ".", "next", "(", ")", ";", "}", "}", "protected", "void", "markAvailableHeight", "(", "World", "par1World", ",", "Random", "par2Random", ",", "int", "par3", ")", "{", "int", "i", "=", "63", "-", "par3", ";", "int", "j", "=", "boundingBox", ".", "getYSize", "(", ")", "+", "1", ";", "if", "(", "j", "<", "i", ")", "{", "j", "+=", "par2Random", ".", "nextInt", "(", "i", "-", "j", ")", ";", "}", "int", "k", "=", "j", "-", "boundingBox", ".", "maxY", ";", "boundingBox", ".", "offset", "(", "0", ",", "k", ",", "0", ")", ";", "StructureComponent", "structurecomponent", ";", "for", "(", "Iterator", "iterator", "=", "components", ".", "iterator", "(", ")", ";", "iterator", ".", "hasNext", "(", ")", ";", "structurecomponent", ".", "getBoundingBox", "(", ")", ".", "offset", "(", "0", ",", "k", ",", "0", ")", ")", "{", "structurecomponent", "=", "(", "StructureComponent", ")", "iterator", ".", "next", "(", ")", ";", "}", "}", "protected", "void", "setRandomHeight", "(", "World", "par1World", ",", "Random", "par2Random", ",", "int", "par3", ",", "int", "par4", ")", "{", "int", "i", "=", "(", "(", "par4", "-", "par3", ")", "+", "1", ")", "-", "boundingBox", ".", "getYSize", "(", ")", ";", "int", "j", "=", "1", ";", "if", "(", "i", ">", "1", ")", "{", "j", "=", "par3", "+", "par2Random", ".", "nextInt", "(", "i", ")", ";", "}", "else", "{", "j", "=", "par3", ";", "}", "int", "k", "=", "j", "-", "boundingBox", ".", "minY", ";", "boundingBox", ".", "offset", "(", "0", ",", "k", ",", "0", ")", ";", "StructureComponent", "structurecomponent", ";", "for", "(", "Iterator", "iterator", "=", "components", ".", "iterator", "(", ")", ";", "iterator", ".", "hasNext", "(", ")", ";", "structurecomponent", ".", "getBoundingBox", "(", ")", ".", "offset", "(", "0", ",", "k", ",", "0", ")", ")", "{", "structurecomponent", "=", "(", "StructureComponent", ")", "iterator", ".", "next", "(", ")", ";", "}", "}", "public", "boolean", "isSizeableStructure", "(", ")", "{", "return", "true", ";", "}", "}", "</s>" ]
9,772
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "Random", ";", "public", "class", "EntityAIMoveIndoors", "extends", "EntityAIBase", "{", "private", "EntityCreature", "entityObj", ";", "private", "VillageDoorInfo", "doorInfo", ";", "private", "int", "insidePosX", ";", "private", "int", "insidePosZ", ";", "public", "EntityAIMoveIndoors", "(", "EntityCreature", "par1EntityCreature", ")", "{", "insidePosX", "=", "-", "1", ";", "insidePosZ", "=", "-", "1", ";", "entityObj", "=", "par1EntityCreature", ";", "setMutexBits", "(", "1", ")", ";", "}", "public", "boolean", "shouldExecute", "(", ")", "{", "if", "(", "entityObj", ".", "worldObj", ".", "isDaytime", "(", ")", "&&", "!", "entityObj", ".", "worldObj", ".", "isRaining", "(", ")", "||", "entityObj", ".", "worldObj", ".", "worldProvider", ".", "hasNoSky", ")", "{", "return", "false", ";", "}", "if", "(", "entityObj", ".", "getRNG", "(", ")", ".", "nextInt", "(", "50", ")", "!=", "0", ")", "{", "return", "false", ";", "}", "if", "(", "insidePosX", "!=", "-", "1", "&&", "entityObj", ".", "getDistanceSq", "(", "insidePosX", ",", "entityObj", ".", "posY", ",", "insidePosZ", ")", "<", "4D", ")", "{", "return", "false", ";", "}", "Village", "village", "=", "entityObj", ".", "worldObj", ".", "villageCollectionObj", ".", "findNearestVillage", "(", "MathHelper", ".", "floor_double", "(", "entityObj", ".", "posX", ")", ",", "MathHelper", ".", "floor_double", "(", "entityObj", ".", "posY", ")", ",", "MathHelper", ".", "floor_double", "(", "entityObj", ".", "posZ", ")", ",", "14", ")", ";", "if", "(", "village", "==", "null", ")", "{", "return", "false", ";", "}", "else", "{", "doorInfo", "=", "village", ".", "findNearestDoorUnrestricted", "(", "MathHelper", ".", "floor_double", "(", "entityObj", ".", "posX", ")", ",", "MathHelper", ".", "floor_double", "(", "entityObj", ".", "posY", ")", ",", "MathHelper", ".", "floor_double", "(", "entityObj", ".", "posZ", ")", ")", ";", "return", "doorInfo", "!=", "null", ";", "}", "}", "public", "boolean", "continueExecuting", "(", ")", "{", "return", "!", "entityObj", ".", "getNavigator", "(", ")", ".", "noPath", "(", ")", ";", "}", "public", "void", "startExecuting", "(", ")", "{", "insidePosX", "=", "-", "1", ";", "if", "(", "entityObj", ".", "getDistanceSq", "(", "doorInfo", ".", "getInsidePosX", "(", ")", ",", "doorInfo", ".", "posY", ",", "doorInfo", ".", "getInsidePosZ", "(", ")", ")", ">", "256D", ")", "{", "Vec3D", "vec3d", "=", "RandomPositionGenerator", ".", "func_48395_a", "(", "entityObj", ",", "14", ",", "3", ",", "Vec3D", ".", "createVector", "(", "(", "double", ")", "doorInfo", ".", "getInsidePosX", "(", ")", "+", "0.5D", ",", "doorInfo", ".", "getInsidePosY", "(", ")", ",", "(", "double", ")", "doorInfo", ".", "getInsidePosZ", "(", ")", "+", "0.5D", ")", ")", ";", "if", "(", "vec3d", "!=", "null", ")", "{", "entityObj", ".", "getNavigator", "(", ")", ".", "func_48658_a", "(", "vec3d", ".", "xCoord", ",", "vec3d", ".", "yCoord", ",", "vec3d", ".", "zCoord", ",", "0.3F", ")", ";", "}", "}", "else", "{", "entityObj", ".", "getNavigator", "(", ")", ".", "func_48658_a", "(", "(", "double", ")", "doorInfo", ".", "getInsidePosX", "(", ")", "+", "0.5D", ",", "doorInfo", ".", "getInsidePosY", "(", ")", ",", "(", "double", ")", "doorInfo", ".", "getInsidePosZ", "(", ")", "+", "0.5D", ",", "0.3F", ")", ";", "}", "}", "public", "void", "resetTask", "(", ")", "{", "insidePosX", "=", "doorInfo", ".", "getInsidePosX", "(", ")", ";", "insidePosZ", "=", "doorInfo", ".", "getInsidePosZ", "(", ")", ";", "doorInfo", "=", "null", ";", "}", "}", "</s>" ]
9,773
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "net", ".", "minecraft", ".", "server", ".", "MinecraftServer", ";", "public", "final", "class", "ThreadServerApplication", "extends", "Thread", "{", "final", "MinecraftServer", "mcServer", ";", "public", "ThreadServerApplication", "(", "String", "par1Str", ",", "MinecraftServer", "par2MinecraftServer", ")", "{", "super", "(", "par1Str", ")", ";", "mcServer", "=", "par2MinecraftServer", ";", "}", "public", "void", "run", "(", ")", "{", "mcServer", ".", "run", "(", ")", ";", "}", "}", "</s>" ]
9,774
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "public", "class", "EntityDragonBase", "extends", "EntityLiving", "{", "protected", "int", "maxHealth", ";", "public", "EntityDragonBase", "(", "World", "par1World", ")", "{", "super", "(", "par1World", ")", ";", "maxHealth", "=", "100", ";", "}", "public", "int", "getMaxHealth", "(", ")", "{", "return", "maxHealth", ";", "}", "public", "boolean", "attackEntityFromPart", "(", "EntityDragonPart", "par1EntityDragonPart", ",", "DamageSource", "par2DamageSource", ",", "int", "par3", ")", "{", "return", "attackEntityFrom", "(", "par2DamageSource", ",", "par3", ")", ";", "}", "public", "boolean", "attackEntityFrom", "(", "DamageSource", "par1DamageSource", ",", "int", "par2", ")", "{", "return", "false", ";", "}", "protected", "boolean", "superAttackFrom", "(", "DamageSource", "par1DamageSource", ",", "int", "par2", ")", "{", "return", "super", ".", "attackEntityFrom", "(", "par1DamageSource", ",", "par2", ")", ";", "}", "}", "</s>" ]
9,775
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "Random", ";", "public", "class", "WorldGenSwamp", "extends", "WorldGenerator", "{", "public", "WorldGenSwamp", "(", ")", "{", "}", "public", "boolean", "generate", "(", "World", "par1World", ",", "Random", "par2Random", ",", "int", "par3", ",", "int", "par4", ",", "int", "par5", ")", "{", "int", "i", "=", "par2Random", ".", "nextInt", "(", "4", ")", "+", "5", ";", "for", "(", ";", "par1World", ".", "getBlockMaterial", "(", "par3", ",", "par4", "-", "1", ",", "par5", ")", "==", "Material", ".", "water", ";", "par4", "--", ")", "{", "}", "boolean", "flag", "=", "true", ";", "if", "(", "par4", "<", "1", "||", "par4", "+", "i", "+", "1", ">", "128", ")", "{", "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", "=", "3", ";", "}", "for", "(", "int", "k1", "=", "par3", "-", "byte0", ";", "k1", "<=", "par3", "+", "byte0", "&&", "flag", ";", "k1", "++", ")", "{", "for", "(", "int", "k2", "=", "par5", "-", "byte0", ";", "k2", "<=", "par5", "+", "byte0", "&&", "flag", ";", "k2", "++", ")", "{", "if", "(", "j", ">=", "0", "&&", "j", "<", "128", ")", "{", "int", "j3", "=", "par1World", ".", "getBlockId", "(", "k1", ",", "j", ",", "k2", ")", ";", "if", "(", "j3", "==", "0", "||", "j3", "==", "Block", ".", "leaves", ".", "blockID", ")", "{", "continue", ";", "}", "if", "(", "j3", "==", "Block", ".", "waterStill", ".", "blockID", "||", "j3", "==", "Block", ".", "waterMoving", ".", "blockID", ")", "{", "if", "(", "j", ">", "par4", ")", "{", "flag", "=", "false", ";", "}", "}", "else", "{", "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", ">=", "128", "-", "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", "l1", "=", "l", "-", "(", "par4", "+", "i", ")", ";", "int", "l2", "=", "2", "-", "l1", "/", "2", ";", "for", "(", "int", "k3", "=", "par3", "-", "l2", ";", "k3", "<=", "par3", "+", "l2", ";", "k3", "++", ")", "{", "int", "i4", "=", "k3", "-", "par3", ";", "for", "(", "int", "k4", "=", "par5", "-", "l2", ";", "k4", "<=", "par5", "+", "l2", ";", "k4", "++", ")", "{", "int", "l4", "=", "k4", "-", "par5", ";", "if", "(", "(", "Math", ".", "abs", "(", "i4", ")", "!=", "l2", "||", "Math", ".", "abs", "(", "l4", ")", "!=", "l2", "||", "par2Random", ".", "nextInt", "(", "2", ")", "!=", "0", "&&", "l1", "!=", "0", ")", "&&", "!", "Block", ".", "opaqueCubeLookup", "[", "par1World", ".", "getBlockId", "(", "k3", ",", "l", ",", "k4", ")", "]", ")", "{", "func_50023_a", "(", "par1World", ",", "k3", ",", "l", ",", "k4", ",", "Block", ".", "leaves", ".", "blockID", ")", ";", "}", "}", "}", "}", "for", "(", "int", "i1", "=", "0", ";", "i1", "<", "i", ";", "i1", "++", ")", "{", "int", "i2", "=", "par1World", ".", "getBlockId", "(", "par3", ",", "par4", "+", "i1", ",", "par5", ")", ";", "if", "(", "i2", "==", "0", "||", "i2", "==", "Block", ".", "leaves", ".", "blockID", "||", "i2", "==", "Block", ".", "waterMoving", ".", "blockID", "||", "i2", "==", "Block", ".", "waterStill", ".", "blockID", ")", "{", "func_50023_a", "(", "par1World", ",", "par3", ",", "par4", "+", "i1", ",", "par5", ",", "Block", ".", "wood", ".", "blockID", ")", ";", "}", "}", "for", "(", "int", "j1", "=", "(", "par4", "-", "3", ")", "+", "i", ";", "j1", "<=", "par4", "+", "i", ";", "j1", "++", ")", "{", "int", "j2", "=", "j1", "-", "(", "par4", "+", "i", ")", ";", "int", "i3", "=", "2", "-", "j2", "/", "2", ";", "for", "(", "int", "l3", "=", "par3", "-", "i3", ";", "l3", "<=", "par3", "+", "i3", ";", "l3", "++", ")", "{", "for", "(", "int", "j4", "=", "par5", "-", "i3", ";", "j4", "<=", "par5", "+", "i3", ";", "j4", "++", ")", "{", "if", "(", "par1World", ".", "getBlockId", "(", "l3", ",", "j1", ",", "j4", ")", "!=", "Block", ".", "leaves", ".", "blockID", ")", "{", "continue", ";", "}", "if", "(", "par2Random", ".", "nextInt", "(", "4", ")", "==", "0", "&&", "par1World", ".", "getBlockId", "(", "l3", "-", "1", ",", "j1", ",", "j4", ")", "==", "0", ")", "{", "generateVines", "(", "par1World", ",", "l3", "-", "1", ",", "j1", ",", "j4", ",", "8", ")", ";", "}", "if", "(", "par2Random", ".", "nextInt", "(", "4", ")", "==", "0", "&&", "par1World", ".", "getBlockId", "(", "l3", "+", "1", ",", "j1", ",", "j4", ")", "==", "0", ")", "{", "generateVines", "(", "par1World", ",", "l3", "+", "1", ",", "j1", ",", "j4", ",", "2", ")", ";", "}", "if", "(", "par2Random", ".", "nextInt", "(", "4", ")", "==", "0", "&&", "par1World", ".", "getBlockId", "(", "l3", ",", "j1", ",", "j4", "-", "1", ")", "==", "0", ")", "{", "generateVines", "(", "par1World", ",", "l3", ",", "j1", ",", "j4", "-", "1", ",", "1", ")", ";", "}", "if", "(", "par2Random", ".", "nextInt", "(", "4", ")", "==", "0", "&&", "par1World", ".", "getBlockId", "(", "l3", ",", "j1", ",", "j4", "+", "1", ")", "==", "0", ")", "{", "generateVines", "(", "par1World", ",", "l3", ",", "j1", ",", "j4", "+", "1", ",", "4", ")", ";", "}", "}", "}", "}", "return", "true", ";", "}", "private", "void", "generateVines", "(", "World", "par1World", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "int", "par5", ")", "{", "setBlockAndMetadata", "(", "par1World", ",", "par2", ",", "par3", ",", "par4", ",", "Block", ".", "vine", ".", "blockID", ",", "par5", ")", ";", "for", "(", "int", "i", "=", "4", ";", "par1World", ".", "getBlockId", "(", "par2", ",", "--", "par3", ",", "par4", ")", "==", "0", "&&", "i", ">", "0", ";", "i", "--", ")", "{", "setBlockAndMetadata", "(", "par1World", ",", "par2", ",", "par3", ",", "par4", ",", "Block", ".", "vine", ".", "blockID", ",", "par5", ")", ";", "}", "}", "}", "</s>" ]
9,776
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "io", ".", "*", ";", "public", "class", "Packet0KeepAlive", "extends", "Packet", "{", "public", "int", "randomId", ";", "public", "Packet0KeepAlive", "(", ")", "{", "}", "public", "Packet0KeepAlive", "(", "int", "par1", ")", "{", "randomId", "=", "par1", ";", "}", "public", "void", "processPacket", "(", "NetHandler", "par1NetHandler", ")", "{", "par1NetHandler", ".", "handleKeepAlive", "(", "this", ")", ";", "}", "public", "void", "readPacketData", "(", "DataInputStream", "par1DataInputStream", ")", "throws", "IOException", "{", "randomId", "=", "par1DataInputStream", ".", "readInt", "(", ")", ";", "}", "public", "void", "writePacketData", "(", "DataOutputStream", "par1DataOutputStream", ")", "throws", "IOException", "{", "par1DataOutputStream", ".", "writeInt", "(", "randomId", ")", ";", "}", "public", "int", "getPacketSize", "(", ")", "{", "return", "4", ";", "}", "}", "</s>" ]
9,777
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "Random", ";", "public", "abstract", "class", "EntityAITarget", "extends", "EntityAIBase", "{", "protected", "EntityLiving", "taskOwner", ";", "protected", "float", "field_48288_d", ";", "protected", "boolean", "field_48289_e", ";", "private", "boolean", "field_48292_a", ";", "private", "int", "field_48290_b", ";", "private", "int", "field_48286_f", ";", "private", "int", "field_48287_g", ";", "public", "EntityAITarget", "(", "EntityLiving", "par1EntityLiving", ",", "float", "par2", ",", "boolean", "par3", ")", "{", "this", "(", "par1EntityLiving", ",", "par2", ",", "par3", ",", "false", ")", ";", "}", "public", "EntityAITarget", "(", "EntityLiving", "par1EntityLiving", ",", "float", "par2", ",", "boolean", "par3", ",", "boolean", "par4", ")", "{", "field_48290_b", "=", "0", ";", "field_48286_f", "=", "0", ";", "field_48287_g", "=", "0", ";", "taskOwner", "=", "par1EntityLiving", ";", "field_48288_d", "=", "par2", ";", "field_48289_e", "=", "par3", ";", "field_48292_a", "=", "par4", ";", "}", "public", "boolean", "continueExecuting", "(", ")", "{", "EntityLiving", "entityliving", "=", "taskOwner", ".", "getAttackTarget", "(", ")", ";", "if", "(", "entityliving", "==", "null", ")", "{", "return", "false", ";", "}", "if", "(", "!", "entityliving", ".", "isEntityAlive", "(", ")", ")", "{", "return", "false", ";", "}", "if", "(", "taskOwner", ".", "getDistanceSqToEntity", "(", "entityliving", ")", ">", "(", "double", ")", "(", "field_48288_d", "*", "field_48288_d", ")", ")", "{", "return", "false", ";", "}", "if", "(", "field_48289_e", ")", "{", "if", "(", "!", "taskOwner", ".", "func_48318_al", "(", ")", ".", "canSee", "(", "entityliving", ")", ")", "{", "if", "(", "++", "field_48287_g", ">", "60", ")", "{", "return", "false", ";", "}", "}", "else", "{", "field_48287_g", "=", "0", ";", "}", "}", "return", "true", ";", "}", "public", "void", "startExecuting", "(", ")", "{", "field_48290_b", "=", "0", ";", "field_48286_f", "=", "0", ";", "field_48287_g", "=", "0", ";", "}", "public", "void", "resetTask", "(", ")", "{", "taskOwner", ".", "setAttackTarget", "(", "null", ")", ";", "}", "protected", "boolean", "func_48284_a", "(", "EntityLiving", "par1EntityLiving", ",", "boolean", "par2", ")", "{", "if", "(", "par1EntityLiving", "==", "null", ")", "{", "return", "false", ";", "}", "if", "(", "par1EntityLiving", "==", "taskOwner", ")", "{", "return", "false", ";", "}", "if", "(", "!", "par1EntityLiving", ".", "isEntityAlive", "(", ")", ")", "{", "return", "false", ";", "}", "if", "(", "par1EntityLiving", ".", "boundingBox", ".", "maxY", "<=", "taskOwner", ".", "boundingBox", ".", "minY", "||", "par1EntityLiving", ".", "boundingBox", ".", "minY", ">=", "taskOwner", ".", "boundingBox", ".", "maxY", ")", "{", "return", "false", ";", "}", "if", "(", "!", "taskOwner", ".", "func_48336_a", "(", "par1EntityLiving", ".", "getClass", "(", ")", ")", ")", "{", "return", "false", ";", "}", "if", "(", "(", "taskOwner", "instanceof", "EntityTameable", ")", "&&", "(", "(", "EntityTameable", ")", "taskOwner", ")", ".", "isTamed", "(", ")", ")", "{", "if", "(", "(", "par1EntityLiving", "instanceof", "EntityTameable", ")", "&&", "(", "(", "EntityTameable", ")", "par1EntityLiving", ")", ".", "isTamed", "(", ")", ")", "{", "return", "false", ";", "}", "if", "(", "par1EntityLiving", "==", "(", "(", "EntityTameable", ")", "taskOwner", ")", ".", "getOwner", "(", ")", ")", "{", "return", "false", ";", "}", "}", "else", "if", "(", "(", "par1EntityLiving", "instanceof", "EntityPlayer", ")", "&&", "!", "par2", "&&", "(", "(", "EntityPlayer", ")", "par1EntityLiving", ")", ".", "capabilities", ".", "disableDamage", ")", "{", "return", "false", ";", "}", "if", "(", "!", "taskOwner", ".", "isWithinHomeDistance", "(", "MathHelper", ".", "floor_double", "(", "par1EntityLiving", ".", "posX", ")", ",", "MathHelper", ".", "floor_double", "(", "par1EntityLiving", ".", "posY", ")", ",", "MathHelper", ".", "floor_double", "(", "par1EntityLiving", ".", "posZ", ")", ")", ")", "{", "return", "false", ";", "}", "if", "(", "field_48289_e", "&&", "!", "taskOwner", ".", "func_48318_al", "(", ")", ".", "canSee", "(", "par1EntityLiving", ")", ")", "{", "return", "false", ";", "}", "if", "(", "field_48292_a", ")", "{", "if", "(", "--", "field_48286_f", "<=", "0", ")", "{", "field_48290_b", "=", "0", ";", "}", "if", "(", "field_48290_b", "==", "0", ")", "{", "field_48290_b", "=", "func_48285_a", "(", "par1EntityLiving", ")", "?", "1", ":", "2", ";", "}", "if", "(", "field_48290_b", "==", "2", ")", "{", "return", "false", ";", "}", "}", "return", "true", ";", "}", "private", "boolean", "func_48285_a", "(", "EntityLiving", "par1EntityLiving", ")", "{", "field_48286_f", "=", "10", "+", "taskOwner", ".", "getRNG", "(", ")", ".", "nextInt", "(", "5", ")", ";", "PathEntity", "pathentity", "=", "taskOwner", ".", "getNavigator", "(", ")", ".", "func_48661_a", "(", "par1EntityLiving", ")", ";", "if", "(", "pathentity", "==", "null", ")", "{", "return", "false", ";", "}", "PathPoint", "pathpoint", "=", "pathentity", ".", "getFinalPathPoint", "(", ")", ";", "if", "(", "pathpoint", "==", "null", ")", "{", "return", "false", ";", "}", "else", "{", "int", "i", "=", "pathpoint", ".", "xCoord", "-", "MathHelper", ".", "floor_double", "(", "par1EntityLiving", ".", "posX", ")", ";", "int", "j", "=", "pathpoint", ".", "zCoord", "-", "MathHelper", ".", "floor_double", "(", "par1EntityLiving", ".", "posZ", ")", ";", "return", "(", "double", ")", "(", "i", "*", "i", "+", "j", "*", "j", ")", "<=", "2.25D", ";", "}", "}", "}", "</s>" ]
9,778
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "*", ";", "public", "class", "EntityAIPlay", "extends", "EntityAIBase", "{", "private", "EntityVillager", "villagerObj", ";", "private", "EntityLiving", "targetVillager", ";", "private", "float", "field_48166_c", ";", "private", "int", "field_48164_d", ";", "public", "EntityAIPlay", "(", "EntityVillager", "par1EntityVillager", ",", "float", "par2", ")", "{", "villagerObj", "=", "par1EntityVillager", ";", "field_48166_c", "=", "par2", ";", "setMutexBits", "(", "1", ")", ";", "}", "public", "boolean", "shouldExecute", "(", ")", "{", "if", "(", "villagerObj", ".", "getGrowingAge", "(", ")", ">=", "0", ")", "{", "return", "false", ";", "}", "if", "(", "villagerObj", ".", "getRNG", "(", ")", ".", "nextInt", "(", "400", ")", "!=", "0", ")", "{", "return", "false", ";", "}", "List", "list", "=", "villagerObj", ".", "worldObj", ".", "getEntitiesWithinAABB", "(", "net", ".", "minecraft", ".", "src", ".", "EntityVillager", ".", "class", ",", "villagerObj", ".", "boundingBox", ".", "expand", "(", "6D", ",", "3D", ",", "6D", ")", ")", ";", "double", "d", "=", "Double", ".", "MAX_VALUE", ";", "Iterator", "iterator", "=", "list", ".", "iterator", "(", ")", ";", "do", "{", "if", "(", "!", "iterator", ".", "hasNext", "(", ")", ")", "{", "break", ";", "}", "Entity", "entity", "=", "(", "Entity", ")", "iterator", ".", "next", "(", ")", ";", "if", "(", "entity", "!=", "villagerObj", ")", "{", "EntityVillager", "entityvillager", "=", "(", "EntityVillager", ")", "entity", ";", "if", "(", "!", "entityvillager", ".", "getIsPlayingFlag", "(", ")", "&&", "entityvillager", ".", "getGrowingAge", "(", ")", "<", "0", ")", "{", "double", "d1", "=", "entityvillager", ".", "getDistanceSqToEntity", "(", "villagerObj", ")", ";", "if", "(", "d1", "<=", "d", ")", "{", "d", "=", "d1", ";", "targetVillager", "=", "entityvillager", ";", "}", "}", "}", "}", "while", "(", "true", ")", ";", "if", "(", "targetVillager", "==", "null", ")", "{", "Vec3D", "vec3d", "=", "RandomPositionGenerator", ".", "func_48396_a", "(", "villagerObj", ",", "16", ",", "3", ")", ";", "if", "(", "vec3d", "==", "null", ")", "{", "return", "false", ";", "}", "}", "return", "true", ";", "}", "public", "boolean", "continueExecuting", "(", ")", "{", "return", "field_48164_d", ">", "0", ";", "}", "public", "void", "startExecuting", "(", ")", "{", "if", "(", "targetVillager", "!=", "null", ")", "{", "villagerObj", ".", "setIsPlayingFlag", "(", "true", ")", ";", "}", "field_48164_d", "=", "1000", ";", "}", "public", "void", "resetTask", "(", ")", "{", "villagerObj", ".", "setIsPlayingFlag", "(", "false", ")", ";", "targetVillager", "=", "null", ";", "}", "public", "void", "updateTask", "(", ")", "{", "field_48164_d", "--", ";", "if", "(", "targetVillager", "!=", "null", ")", "{", "if", "(", "villagerObj", ".", "getDistanceSqToEntity", "(", "targetVillager", ")", ">", "4D", ")", "{", "villagerObj", ".", "getNavigator", "(", ")", ".", "func_48652_a", "(", "targetVillager", ",", "field_48166_c", ")", ";", "}", "}", "else", "if", "(", "villagerObj", ".", "getNavigator", "(", ")", ".", "noPath", "(", ")", ")", "{", "Vec3D", "vec3d", "=", "RandomPositionGenerator", ".", "func_48396_a", "(", "villagerObj", ",", "16", ",", "3", ")", ";", "if", "(", "vec3d", "==", "null", ")", "{", "return", ";", "}", "villagerObj", ".", "getNavigator", "(", ")", ".", "func_48658_a", "(", "vec3d", ".", "xCoord", ",", "vec3d", ".", "yCoord", ",", "vec3d", ".", "zCoord", ",", "field_48166_c", ")", ";", "}", "}", "}", "</s>" ]
9,779
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "public", "class", "EnchantmentKnockback", "extends", "Enchantment", "{", "protected", "EnchantmentKnockback", "(", "int", "par1", ",", "int", "par2", ")", "{", "super", "(", "par1", ",", "par2", ",", "EnumEnchantmentType", ".", "weapon", ")", ";", "setName", "(", "\"knockback\"", ")", ";", "}", "public", "int", "getMinEnchantability", "(", "int", "par1", ")", "{", "return", "5", "+", "20", "*", "(", "par1", "-", "1", ")", ";", "}", "public", "int", "getMaxEnchantability", "(", "int", "par1", ")", "{", "return", "super", ".", "getMinEnchantability", "(", "par1", ")", "+", "50", ";", "}", "public", "int", "getMaxLevel", "(", ")", "{", "return", "2", ";", "}", "}", "</s>" ]
9,780
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "HashSet", ";", "import", "java", ".", "util", ".", "Set", ";", "public", "class", "IntHashMap", "{", "private", "transient", "IntHashMapEntry", "slots", "[", "]", ";", "private", "transient", "int", "count", ";", "private", "int", "threshold", ";", "private", "final", "float", "growFactor", "=", "0.75F", ";", "private", "volatile", "transient", "int", "versionStamp", ";", "private", "Set", "keySet", ";", "public", "IntHashMap", "(", ")", "{", "keySet", "=", "new", "HashSet", "(", ")", ";", "threshold", "=", "12", ";", "slots", "=", "new", "IntHashMapEntry", "[", "16", "]", ";", "}", "private", "static", "int", "computeHash", "(", "int", "par0", ")", "{", "par0", "^=", "par0", ">>>", "20", "^", "par0", ">>>", "12", ";", "return", "par0", "^", "par0", ">>>", "7", "^", "par0", ">>>", "4", ";", "}", "private", "static", "int", "getSlotIndex", "(", "int", "par0", ",", "int", "par1", ")", "{", "return", "par0", "&", "par1", "-", "1", ";", "}", "public", "Object", "lookup", "(", "int", "par1", ")", "{", "int", "i", "=", "computeHash", "(", "par1", ")", ";", "for", "(", "IntHashMapEntry", "inthashmapentry", "=", "slots", "[", "getSlotIndex", "(", "i", ",", "slots", ".", "length", ")", "]", ";", "inthashmapentry", "!=", "null", ";", "inthashmapentry", "=", "inthashmapentry", ".", "nextEntry", ")", "{", "if", "(", "inthashmapentry", ".", "hashEntry", "==", "par1", ")", "{", "return", "inthashmapentry", ".", "valueEntry", ";", "}", "}", "return", "null", ";", "}", "public", "boolean", "containsItem", "(", "int", "par1", ")", "{", "return", "lookupEntry", "(", "par1", ")", "!=", "null", ";", "}", "final", "IntHashMapEntry", "lookupEntry", "(", "int", "par1", ")", "{", "int", "i", "=", "computeHash", "(", "par1", ")", ";", "for", "(", "IntHashMapEntry", "inthashmapentry", "=", "slots", "[", "getSlotIndex", "(", "i", ",", "slots", ".", "length", ")", "]", ";", "inthashmapentry", "!=", "null", ";", "inthashmapentry", "=", "inthashmapentry", ".", "nextEntry", ")", "{", "if", "(", "inthashmapentry", ".", "hashEntry", "==", "par1", ")", "{", "return", "inthashmapentry", ";", "}", "}", "return", "null", ";", "}", "public", "void", "addKey", "(", "int", "par1", ",", "Object", "par2Obj", ")", "{", "keySet", ".", "add", "(", "Integer", ".", "valueOf", "(", "par1", ")", ")", ";", "int", "i", "=", "computeHash", "(", "par1", ")", ";", "int", "j", "=", "getSlotIndex", "(", "i", ",", "slots", ".", "length", ")", ";", "for", "(", "IntHashMapEntry", "inthashmapentry", "=", "slots", "[", "j", "]", ";", "inthashmapentry", "!=", "null", ";", "inthashmapentry", "=", "inthashmapentry", ".", "nextEntry", ")", "{", "if", "(", "inthashmapentry", ".", "hashEntry", "==", "par1", ")", "{", "inthashmapentry", ".", "valueEntry", "=", "par2Obj", ";", "}", "}", "versionStamp", "++", ";", "insert", "(", "i", ",", "par1", ",", "par2Obj", ",", "j", ")", ";", "}", "private", "void", "grow", "(", "int", "par1", ")", "{", "IntHashMapEntry", "ainthashmapentry", "[", "]", "=", "slots", ";", "int", "i", "=", "ainthashmapentry", ".", "length", ";", "if", "(", "i", "==", "0x40000000", ")", "{", "threshold", "=", "0x7fffffff", ";", "return", ";", "}", "else", "{", "IntHashMapEntry", "ainthashmapentry1", "[", "]", "=", "new", "IntHashMapEntry", "[", "par1", "]", ";", "copyTo", "(", "ainthashmapentry1", ")", ";", "slots", "=", "ainthashmapentry1", ";", "threshold", "=", "(", "int", ")", "(", "(", "float", ")", "par1", "*", "growFactor", ")", ";", "return", ";", "}", "}", "private", "void", "copyTo", "(", "IntHashMapEntry", "par1ArrayOfIntHashMapEntry", "[", "]", ")", "{", "IntHashMapEntry", "ainthashmapentry", "[", "]", "=", "slots", ";", "int", "i", "=", "par1ArrayOfIntHashMapEntry", ".", "length", ";", "for", "(", "int", "j", "=", "0", ";", "j", "<", "ainthashmapentry", ".", "length", ";", "j", "++", ")", "{", "IntHashMapEntry", "inthashmapentry", "=", "ainthashmapentry", "[", "j", "]", ";", "if", "(", "inthashmapentry", "==", "null", ")", "{", "continue", ";", "}", "ainthashmapentry", "[", "j", "]", "=", "null", ";", "do", "{", "IntHashMapEntry", "inthashmapentry1", "=", "inthashmapentry", ".", "nextEntry", ";", "int", "k", "=", "getSlotIndex", "(", "inthashmapentry", ".", "slotHash", ",", "i", ")", ";", "inthashmapentry", ".", "nextEntry", "=", "par1ArrayOfIntHashMapEntry", "[", "k", "]", ";", "par1ArrayOfIntHashMapEntry", "[", "k", "]", "=", "inthashmapentry", ";", "inthashmapentry", "=", "inthashmapentry1", ";", "}", "while", "(", "inthashmapentry", "!=", "null", ")", ";", "}", "}", "public", "Object", "removeObject", "(", "int", "par1", ")", "{", "keySet", ".", "remove", "(", "Integer", ".", "valueOf", "(", "par1", ")", ")", ";", "IntHashMapEntry", "inthashmapentry", "=", "removeEntry", "(", "par1", ")", ";", "return", "inthashmapentry", "!=", "null", "?", "inthashmapentry", ".", "valueEntry", ":", "null", ";", "}", "final", "IntHashMapEntry", "removeEntry", "(", "int", "par1", ")", "{", "int", "i", "=", "computeHash", "(", "par1", ")", ";", "int", "j", "=", "getSlotIndex", "(", "i", ",", "slots", ".", "length", ")", ";", "IntHashMapEntry", "inthashmapentry", "=", "slots", "[", "j", "]", ";", "IntHashMapEntry", "inthashmapentry1", ";", "IntHashMapEntry", "inthashmapentry2", ";", "for", "(", "inthashmapentry1", "=", "inthashmapentry", ";", "inthashmapentry1", "!=", "null", ";", "inthashmapentry1", "=", "inthashmapentry2", ")", "{", "inthashmapentry2", "=", "inthashmapentry1", ".", "nextEntry", ";", "if", "(", "inthashmapentry1", ".", "hashEntry", "==", "par1", ")", "{", "versionStamp", "++", ";", "count", "--", ";", "if", "(", "inthashmapentry", "==", "inthashmapentry1", ")", "{", "slots", "[", "j", "]", "=", "inthashmapentry2", ";", "}", "else", "{", "inthashmapentry", ".", "nextEntry", "=", "inthashmapentry2", ";", "}", "return", "inthashmapentry1", ";", "}", "inthashmapentry", "=", "inthashmapentry1", ";", "}", "return", "inthashmapentry1", ";", "}", "public", "void", "clearMap", "(", ")", "{", "versionStamp", "++", ";", "IntHashMapEntry", "ainthashmapentry", "[", "]", "=", "slots", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "ainthashmapentry", ".", "length", ";", "i", "++", ")", "{", "ainthashmapentry", "[", "i", "]", "=", "null", ";", "}", "count", "=", "0", ";", "}", "private", "void", "insert", "(", "int", "par1", ",", "int", "par2", ",", "Object", "par3Obj", ",", "int", "par4", ")", "{", "IntHashMapEntry", "inthashmapentry", "=", "slots", "[", "par4", "]", ";", "slots", "[", "par4", "]", "=", "new", "IntHashMapEntry", "(", "par1", ",", "par2", ",", "par3Obj", ",", "inthashmapentry", ")", ";", "if", "(", "count", "++", ">=", "threshold", ")", "{", "grow", "(", "2", "*", "slots", ".", "length", ")", ";", "}", "}", "static", "int", "getHash", "(", "int", "par0", ")", "{", "return", "computeHash", "(", "par0", ")", ";", "}", "}", "</s>" ]
9,781
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "List", ";", "import", "java", ".", "util", ".", "Random", ";", "abstract", "class", "ComponentStronghold", "extends", "StructureComponent", "{", "protected", "ComponentStronghold", "(", "int", "par1", ")", "{", "super", "(", "par1", ")", ";", "}", "protected", "void", "placeDoor", "(", "World", "par1World", ",", "Random", "par2Random", ",", "StructureBoundingBox", "par3StructureBoundingBox", ",", "EnumDoor", "par4EnumDoor", ",", "int", "par5", ",", "int", "par6", ",", "int", "par7", ")", "{", "switch", "(", "EnumDoorHelper", ".", "doorEnum", "[", "par4EnumDoor", ".", "ordinal", "(", ")", "]", ")", "{", "case", "1", ":", "default", ":", "fillWithBlocks", "(", "par1World", ",", "par3StructureBoundingBox", ",", "par5", ",", "par6", ",", "par7", ",", "(", "par5", "+", "3", ")", "-", "1", ",", "(", "par6", "+", "3", ")", "-", "1", ",", "par7", ",", "0", ",", "0", ",", "false", ")", ";", "break", ";", "case", "2", ":", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "stoneBrick", ".", "blockID", ",", "0", ",", "par5", ",", "par6", ",", "par7", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "stoneBrick", ".", "blockID", ",", "0", ",", "par5", ",", "par6", "+", "1", ",", "par7", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "stoneBrick", ".", "blockID", ",", "0", ",", "par5", ",", "par6", "+", "2", ",", "par7", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "stoneBrick", ".", "blockID", ",", "0", ",", "par5", "+", "1", ",", "par6", "+", "2", ",", "par7", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "stoneBrick", ".", "blockID", ",", "0", ",", "par5", "+", "2", ",", "par6", "+", "2", ",", "par7", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "stoneBrick", ".", "blockID", ",", "0", ",", "par5", "+", "2", ",", "par6", "+", "1", ",", "par7", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "stoneBrick", ".", "blockID", ",", "0", ",", "par5", "+", "2", ",", "par6", ",", "par7", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "doorWood", ".", "blockID", ",", "0", ",", "par5", "+", "1", ",", "par6", ",", "par7", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "doorWood", ".", "blockID", ",", "8", ",", "par5", "+", "1", ",", "par6", "+", "1", ",", "par7", ",", "par3StructureBoundingBox", ")", ";", "break", ";", "case", "3", ":", "placeBlockAtCurrentPosition", "(", "par1World", ",", "0", ",", "0", ",", "par5", "+", "1", ",", "par6", ",", "par7", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "0", ",", "0", ",", "par5", "+", "1", ",", "par6", "+", "1", ",", "par7", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "fenceIron", ".", "blockID", ",", "0", ",", "par5", ",", "par6", ",", "par7", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "fenceIron", ".", "blockID", ",", "0", ",", "par5", ",", "par6", "+", "1", ",", "par7", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "fenceIron", ".", "blockID", ",", "0", ",", "par5", ",", "par6", "+", "2", ",", "par7", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "fenceIron", ".", "blockID", ",", "0", ",", "par5", "+", "1", ",", "par6", "+", "2", ",", "par7", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "fenceIron", ".", "blockID", ",", "0", ",", "par5", "+", "2", ",", "par6", "+", "2", ",", "par7", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "fenceIron", ".", "blockID", ",", "0", ",", "par5", "+", "2", ",", "par6", "+", "1", ",", "par7", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "fenceIron", ".", "blockID", ",", "0", ",", "par5", "+", "2", ",", "par6", ",", "par7", ",", "par3StructureBoundingBox", ")", ";", "break", ";", "case", "4", ":", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "stoneBrick", ".", "blockID", ",", "0", ",", "par5", ",", "par6", ",", "par7", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "stoneBrick", ".", "blockID", ",", "0", ",", "par5", ",", "par6", "+", "1", ",", "par7", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "stoneBrick", ".", "blockID", ",", "0", ",", "par5", ",", "par6", "+", "2", ",", "par7", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "stoneBrick", ".", "blockID", ",", "0", ",", "par5", "+", "1", ",", "par6", "+", "2", ",", "par7", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "stoneBrick", ".", "blockID", ",", "0", ",", "par5", "+", "2", ",", "par6", "+", "2", ",", "par7", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "stoneBrick", ".", "blockID", ",", "0", ",", "par5", "+", "2", ",", "par6", "+", "1", ",", "par7", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "stoneBrick", ".", "blockID", ",", "0", ",", "par5", "+", "2", ",", "par6", ",", "par7", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "doorSteel", ".", "blockID", ",", "0", ",", "par5", "+", "1", ",", "par6", ",", "par7", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "doorSteel", ".", "blockID", ",", "8", ",", "par5", "+", "1", ",", "par6", "+", "1", ",", "par7", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "button", ".", "blockID", ",", "getMetadataWithOffset", "(", "Block", ".", "button", ".", "blockID", ",", "4", ")", ",", "par5", "+", "2", ",", "par6", "+", "1", ",", "par7", "+", "1", ",", "par3StructureBoundingBox", ")", ";", "placeBlockAtCurrentPosition", "(", "par1World", ",", "Block", ".", "button", ".", "blockID", ",", "getMetadataWithOffset", "(", "Block", ".", "button", ".", "blockID", ",", "3", ")", ",", "par5", "+", "2", ",", "par6", "+", "1", ",", "par7", "-", "1", ",", "par3StructureBoundingBox", ")", ";", "break", ";", "}", "}", "protected", "EnumDoor", "getRandomDoor", "(", "Random", "par1Random", ")", "{", "int", "i", "=", "par1Random", ".", "nextInt", "(", "5", ")", ";", "switch", "(", "i", ")", "{", "case", "0", ":", "case", "1", ":", "default", ":", "return", "EnumDoor", ".", "OPENING", ";", "case", "2", ":", "return", "EnumDoor", ".", "WOOD_DOOR", ";", "case", "3", ":", "return", "EnumDoor", ".", "GRATES", ";", "case", "4", ":", "return", "EnumDoor", ".", "IRON_DOOR", ";", "}", "}", "protected", "StructureComponent", "getNextComponentNormal", "(", "ComponentStrongholdStairs2", "par1ComponentStrongholdStairs2", ",", "List", "par2List", ",", "Random", "par3Random", ",", "int", "par4", ",", "int", "par5", ")", "{", "switch", "(", "coordBaseMode", ")", "{", "case", "2", ":", "return", "StructureStrongholdPieces", ".", "getNextValidComponentAccess", "(", "par1ComponentStrongholdStairs2", ",", "par2List", ",", "par3Random", ",", "boundingBox", ".", "minX", "+", "par4", ",", "boundingBox", ".", "minY", "+", "par5", ",", "boundingBox", ".", "minZ", "-", "1", ",", "coordBaseMode", ",", "getComponentType", "(", ")", ")", ";", "case", "0", ":", "return", "StructureStrongholdPieces", ".", "getNextValidComponentAccess", "(", "par1ComponentStrongholdStairs2", ",", "par2List", ",", "par3Random", ",", "boundingBox", ".", "minX", "+", "par4", ",", "boundingBox", ".", "minY", "+", "par5", ",", "boundingBox", ".", "maxZ", "+", "1", ",", "coordBaseMode", ",", "getComponentType", "(", ")", ")", ";", "case", "1", ":", "return", "StructureStrongholdPieces", ".", "getNextValidComponentAccess", "(", "par1ComponentStrongholdStairs2", ",", "par2List", ",", "par3Random", ",", "boundingBox", ".", "minX", "-", "1", ",", "boundingBox", ".", "minY", "+", "par5", ",", "boundingBox", ".", "minZ", "+", "par4", ",", "coordBaseMode", ",", "getComponentType", "(", ")", ")", ";", "case", "3", ":", "return", "StructureStrongholdPieces", ".", "getNextValidComponentAccess", "(", "par1ComponentStrongholdStairs2", ",", "par2List", ",", "par3Random", ",", "boundingBox", ".", "maxX", "+", "1", ",", "boundingBox", ".", "minY", "+", "par5", ",", "boundingBox", ".", "minZ", "+", "par4", ",", "coordBaseMode", ",", "getComponentType", "(", ")", ")", ";", "}", "return", "null", ";", "}", "protected", "StructureComponent", "getNextComponentX", "(", "ComponentStrongholdStairs2", "par1ComponentStrongholdStairs2", ",", "List", "par2List", ",", "Random", "par3Random", ",", "int", "par4", ",", "int", "par5", ")", "{", "switch", "(", "coordBaseMode", ")", "{", "case", "2", ":", "return", "StructureStrongholdPieces", ".", "getNextValidComponentAccess", "(", "par1ComponentStrongholdStairs2", ",", "par2List", ",", "par3Random", ",", "boundingBox", ".", "minX", "-", "1", ",", "boundingBox", ".", "minY", "+", "par4", ",", "boundingBox", ".", "minZ", "+", "par5", ",", "1", ",", "getComponentType", "(", ")", ")", ";", "case", "0", ":", "return", "StructureStrongholdPieces", ".", "getNextValidComponentAccess", "(", "par1ComponentStrongholdStairs2", ",", "par2List", ",", "par3Random", ",", "boundingBox", ".", "minX", "-", "1", ",", "boundingBox", ".", "minY", "+", "par4", ",", "boundingBox", ".", "minZ", "+", "par5", ",", "1", ",", "getComponentType", "(", ")", ")", ";", "case", "1", ":", "return", "StructureStrongholdPieces", ".", "getNextValidComponentAccess", "(", "par1ComponentStrongholdStairs2", ",", "par2List", ",", "par3Random", ",", "boundingBox", ".", "minX", "+", "par5", ",", "boundingBox", ".", "minY", "+", "par4", ",", "boundingBox", ".", "minZ", "-", "1", ",", "2", ",", "getComponentType", "(", ")", ")", ";", "case", "3", ":", "return", "StructureStrongholdPieces", ".", "getNextValidComponentAccess", "(", "par1ComponentStrongholdStairs2", ",", "par2List", ",", "par3Random", ",", "boundingBox", ".", "minX", "+", "par5", ",", "boundingBox", ".", "minY", "+", "par4", ",", "boundingBox", ".", "minZ", "-", "1", ",", "2", ",", "getComponentType", "(", ")", ")", ";", "}", "return", "null", ";", "}", "protected", "StructureComponent", "getNextComponentZ", "(", "ComponentStrongholdStairs2", "par1ComponentStrongholdStairs2", ",", "List", "par2List", ",", "Random", "par3Random", ",", "int", "par4", ",", "int", "par5", ")", "{", "switch", "(", "coordBaseMode", ")", "{", "case", "2", ":", "return", "StructureStrongholdPieces", ".", "getNextValidComponentAccess", "(", "par1ComponentStrongholdStairs2", ",", "par2List", ",", "par3Random", ",", "boundingBox", ".", "maxX", "+", "1", ",", "boundingBox", ".", "minY", "+", "par4", ",", "boundingBox", ".", "minZ", "+", "par5", ",", "3", ",", "getComponentType", "(", ")", ")", ";", "case", "0", ":", "return", "StructureStrongholdPieces", ".", "getNextValidComponentAccess", "(", "par1ComponentStrongholdStairs2", ",", "par2List", ",", "par3Random", ",", "boundingBox", ".", "maxX", "+", "1", ",", "boundingBox", ".", "minY", "+", "par4", ",", "boundingBox", ".", "minZ", "+", "par5", ",", "3", ",", "getComponentType", "(", ")", ")", ";", "case", "1", ":", "return", "StructureStrongholdPieces", ".", "getNextValidComponentAccess", "(", "par1ComponentStrongholdStairs2", ",", "par2List", ",", "par3Random", ",", "boundingBox", ".", "minX", "+", "par5", ",", "boundingBox", ".", "minY", "+", "par4", ",", "boundingBox", ".", "maxZ", "+", "1", ",", "0", ",", "getComponentType", "(", ")", ")", ";", "case", "3", ":", "return", "StructureStrongholdPieces", ".", "getNextValidComponentAccess", "(", "par1ComponentStrongholdStairs2", ",", "par2List", ",", "par3Random", ",", "boundingBox", ".", "minX", "+", "par5", ",", "boundingBox", ".", "minY", "+", "par4", ",", "boundingBox", ".", "maxZ", "+", "1", ",", "0", ",", "getComponentType", "(", ")", ")", ";", "}", "return", "null", ";", "}", "protected", "static", "boolean", "canStrongholdGoDeeper", "(", "StructureBoundingBox", "par0StructureBoundingBox", ")", "{", "return", "par0StructureBoundingBox", "!=", "null", "&&", "par0StructureBoundingBox", ".", "minY", ">", "10", ";", "}", "}", "</s>" ]
9,782
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "public", "class", "AnvilConverterData", "{", "public", "long", "lastUpdated", ";", "public", "boolean", "terrainPopulated", ";", "public", "byte", "heightmap", "[", "]", ";", "public", "NibbleArrayReader", "blockLight", ";", "public", "NibbleArrayReader", "skyLight", ";", "public", "NibbleArrayReader", "data", ";", "public", "byte", "blocks", "[", "]", ";", "public", "NBTTagList", "entities", ";", "public", "NBTTagList", "tileEntities", ";", "public", "NBTTagList", "tileTicks", ";", "public", "final", "int", "x", ";", "public", "final", "int", "z", ";", "public", "AnvilConverterData", "(", "int", "par1", ",", "int", "par2", ")", "{", "x", "=", "par1", ";", "z", "=", "par2", ";", "}", "}", "</s>" ]
9,783
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "*", ";", "public", "abstract", "class", "EntityLiving", "extends", "Entity", "{", "public", "int", "heartsHalvesLife", ";", "public", "float", "field_9098_aw", ";", "public", "float", "field_9096_ay", ";", "public", "float", "renderYawOffset", ";", "public", "float", "prevRenderYawOffset", ";", "public", "float", "rotationYawHead", ";", "public", "float", "prevRotationYawHead", ";", "protected", "float", "field_9124_aB", ";", "protected", "float", "field_9123_aC", ";", "protected", "float", "field_9122_aD", ";", "protected", "float", "field_9121_aE", ";", "protected", "boolean", "field_9120_aF", ";", "protected", "String", "texture", ";", "protected", "boolean", "field_9118_aH", ";", "protected", "float", "field_9117_aI", ";", "protected", "String", "entityType", ";", "protected", "float", "field_9115_aK", ";", "protected", "int", "scoreValue", ";", "protected", "float", "field_9113_aM", ";", "public", "float", "landMovementFactor", ";", "public", "float", "jumpMovementFactor", ";", "public", "float", "prevSwingProgress", ";", "public", "float", "swingProgress", ";", "protected", "int", "health", ";", "public", "int", "prevHealth", ";", "protected", "int", "carryoverDamage", ";", "private", "int", "livingSoundTime", ";", "public", "int", "hurtTime", ";", "public", "int", "maxHurtTime", ";", "public", "float", "attackedAtYaw", ";", "public", "int", "deathTime", ";", "public", "int", "attackTime", ";", "public", "float", "prevCameraPitch", ";", "public", "float", "cameraPitch", ";", "protected", "boolean", "dead", ";", "protected", "int", "experienceValue", ";", "public", "int", "field_9144_ba", ";", "public", "float", "field_9143_bb", ";", "public", "float", "field_9142_bc", ";", "public", "float", "field_9141_bd", ";", "public", "float", "field_386_ba", ";", "protected", "EntityPlayer", "attackingPlayer", ";", "protected", "int", "recentlyHit", ";", "private", "EntityLiving", "entityLivingToAttack", ";", "private", "int", "revengeTimer", ";", "private", "EntityLiving", "lastAttackingEntity", ";", "public", "int", "arrowHitTempCounter", ";", "public", "int", "arrowHitTimer", ";", "protected", "HashMap", "activePotionsMap", ";", "private", "boolean", "potionsNeedUpdate", ";", "private", "int", "field_39003_c", ";", "private", "EntityLookHelper", "lookHelper", ";", "private", "EntityMoveHelper", "moveHelper", ";", "private", "EntityJumpHelper", "jumpHelper", ";", "private", "EntityBodyHelper", "bodyHelper", ";", "private", "PathNavigate", "navigator", ";", "protected", "EntityAITasks", "tasks", ";", "protected", "EntityAITasks", "targetTasks", ";", "private", "EntityLiving", "attackTarget", ";", "private", "EntitySenses", "field_48343_m", ";", "private", "float", "field_48340_n", ";", "private", "ChunkCoordinates", "homePosition", ";", "private", "float", "maximumHomeDistance", ";", "protected", "int", "newPosRotationIncrements", ";", "protected", "double", "newPosX", ";", "protected", "double", "newPosY", ";", "protected", "double", "newPosZ", ";", "protected", "double", "newRotationYaw", ";", "protected", "double", "newRotationPitch", ";", "float", "field_9134_bl", ";", "protected", "int", "naturalArmorRating", ";", "protected", "int", "entityAge", ";", "protected", "float", "moveStrafing", ";", "protected", "float", "moveForward", ";", "protected", "float", "randomYawVelocity", ";", "protected", "boolean", "isJumping", ";", "protected", "float", "defaultPitch", ";", "protected", "float", "moveSpeed", ";", "private", "int", "jumpTicks", ";", "private", "Entity", "currentTarget", ";", "protected", "int", "numTicksToChaseTarget", ";", "public", "EntityLiving", "(", "World", "par1World", ")", "{", "super", "(", "par1World", ")", ";", "heartsHalvesLife", "=", "20", ";", "renderYawOffset", "=", "0.0F", ";", "prevRenderYawOffset", "=", "0.0F", ";", "rotationYawHead", "=", "0.0F", ";", "prevRotationYawHead", "=", "0.0F", ";", "field_9120_aF", "=", "true", ";", "texture", "=", "\"\"", ";", "field_9118_aH", "=", "true", ";", "field_9117_aI", "=", "0.0F", ";", "entityType", "=", "null", ";", "field_9115_aK", "=", "1.0F", ";", "scoreValue", "=", "0", ";", "field_9113_aM", "=", "0.0F", ";", "landMovementFactor", "=", "0.1F", ";", "jumpMovementFactor", "=", "0.02F", ";", "attackedAtYaw", "=", "0.0F", ";", "deathTime", "=", "0", ";", "attackTime", "=", "0", ";", "dead", "=", "false", ";", "field_9144_ba", "=", "-", "1", ";", "field_9143_bb", "=", "(", "float", ")", "(", "Math", ".", "random", "(", ")", "*", "0.89999997615814209D", "+", "0.10000000149011612D", ")", ";", "attackingPlayer", "=", "null", ";", "recentlyHit", "=", "0", ";", "entityLivingToAttack", "=", "null", ";", "revengeTimer", "=", "0", ";", "lastAttackingEntity", "=", "null", ";", "arrowHitTempCounter", "=", "0", ";", "arrowHitTimer", "=", "0", ";", "activePotionsMap", "=", "new", "HashMap", "(", ")", ";", "potionsNeedUpdate", "=", "true", ";", "tasks", "=", "new", "EntityAITasks", "(", ")", ";", "targetTasks", "=", "new", "EntityAITasks", "(", ")", ";", "homePosition", "=", "new", "ChunkCoordinates", "(", "0", ",", "0", ",", "0", ")", ";", "maximumHomeDistance", "=", "-", "1F", ";", "field_9134_bl", "=", "0.0F", ";", "naturalArmorRating", "=", "0", ";", "entityAge", "=", "0", ";", "isJumping", "=", "false", ";", "defaultPitch", "=", "0.0F", ";", "moveSpeed", "=", "0.7F", ";", "jumpTicks", "=", "0", ";", "numTicksToChaseTarget", "=", "0", ";", "health", "=", "getMaxHealth", "(", ")", ";", "preventEntitySpawning", "=", "true", ";", "lookHelper", "=", "new", "EntityLookHelper", "(", "this", ")", ";", "moveHelper", "=", "new", "EntityMoveHelper", "(", "this", ")", ";", "jumpHelper", "=", "new", "EntityJumpHelper", "(", "this", ")", ";", "bodyHelper", "=", "new", "EntityBodyHelper", "(", "this", ")", ";", "navigator", "=", "new", "PathNavigate", "(", "this", ",", "par1World", ",", "16F", ")", ";", "field_48343_m", "=", "new", "EntitySenses", "(", "this", ")", ";", "field_9096_ay", "=", "(", "float", ")", "(", "Math", ".", "random", "(", ")", "+", "1.0D", ")", "*", "0.01F", ";", "setPosition", "(", "posX", ",", "posY", ",", "posZ", ")", ";", "field_9098_aw", "=", "(", "float", ")", "Math", ".", "random", "(", ")", "*", "12398F", ";", "rotationYaw", "=", "(", "float", ")", "(", "Math", ".", "random", "(", ")", "*", "Math", ".", "PI", "*", "2D", ")", ";", "rotationYawHead", "=", "rotationYaw", ";", "stepHeight", "=", "0.5F", ";", "}", "public", "EntityLookHelper", "getLookHelper", "(", ")", "{", "return", "lookHelper", ";", "}", "public", "EntityMoveHelper", "getMoveHelper", "(", ")", "{", "return", "moveHelper", ";", "}", "public", "EntityJumpHelper", "getJumpHelper", "(", ")", "{", "return", "jumpHelper", ";", "}", "public", "PathNavigate", "getNavigator", "(", ")", "{", "return", "navigator", ";", "}", "public", "EntitySenses", "func_48318_al", "(", ")", "{", "return", "field_48343_m", ";", "}", "public", "Random", "getRNG", "(", ")", "{", "return", "rand", ";", "}", "public", "EntityLiving", "getAITarget", "(", ")", "{", "return", "entityLivingToAttack", ";", "}", "public", "EntityLiving", "getLastAttackingEntity", "(", ")", "{", "return", "lastAttackingEntity", ";", "}", "public", "void", "setLastAttackingEntity", "(", "Entity", "par1Entity", ")", "{", "if", "(", "par1Entity", "instanceof", "EntityLiving", ")", "{", "lastAttackingEntity", "=", "(", "EntityLiving", ")", "par1Entity", ";", "}", "}", "public", "int", "getAge", "(", ")", "{", "return", "entityAge", ";", "}", "public", "float", "func_48314_aq", "(", ")", "{", "return", "rotationYawHead", ";", "}", "public", "float", "func_48332_ar", "(", ")", "{", "return", "field_48340_n", ";", "}", "public", "void", "func_48320_d", "(", "float", "par1", ")", "{", "field_48340_n", "=", "par1", ";", "setMoveForward", "(", "par1", ")", ";", "}", "public", "boolean", "attackEntityAsMob", "(", "Entity", "par1Entity", ")", "{", "setLastAttackingEntity", "(", "par1Entity", ")", ";", "return", "false", ";", "}", "public", "EntityLiving", "getAttackTarget", "(", ")", "{", "return", "attackTarget", ";", "}", "public", "void", "setAttackTarget", "(", "EntityLiving", "par1EntityLiving", ")", "{", "attackTarget", "=", "par1EntityLiving", ";", "}", "public", "boolean", "func_48336_a", "(", "Class", "par1Class", ")", "{", "return", "(", "net", ".", "minecraft", ".", "src", ".", "EntityCreeper", ".", "class", ")", "!=", "par1Class", "&&", "(", "net", ".", "minecraft", ".", "src", ".", "EntityGhast", ".", "class", ")", "!=", "par1Class", ";", "}", "public", "void", "eatGrassBonus", "(", ")", "{", "}", "public", "boolean", "isWithinHomeDistanceCurrentPosition", "(", ")", "{", "return", "isWithinHomeDistance", "(", "MathHelper", ".", "floor_double", "(", "posX", ")", ",", "MathHelper", ".", "floor_double", "(", "posY", ")", ",", "MathHelper", ".", "floor_double", "(", "posZ", ")", ")", ";", "}", "public", "boolean", "isWithinHomeDistance", "(", "int", "par1", ",", "int", "par2", ",", "int", "par3", ")", "{", "if", "(", "maximumHomeDistance", "==", "-", "1F", ")", "{", "return", "true", ";", "}", "else", "{", "return", "homePosition", ".", "getDistanceSquared", "(", "par1", ",", "par2", ",", "par3", ")", "<", "maximumHomeDistance", "*", "maximumHomeDistance", ";", "}", "}", "public", "void", "setHomeArea", "(", "int", "par1", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ")", "{", "homePosition", ".", "set", "(", "par1", ",", "par2", ",", "par3", ")", ";", "maximumHomeDistance", "=", "par4", ";", "}", "public", "ChunkCoordinates", "getHomePosition", "(", ")", "{", "return", "homePosition", ";", "}", "public", "float", "getMaximumHomeDistance", "(", ")", "{", "return", "maximumHomeDistance", ";", "}", "public", "void", "detachHome", "(", ")", "{", "maximumHomeDistance", "=", "-", "1F", ";", "}", "public", "boolean", "hasHome", "(", ")", "{", "return", "maximumHomeDistance", "!=", "-", "1F", ";", "}", "public", "void", "setRevengeTarget", "(", "EntityLiving", "par1EntityLiving", ")", "{", "entityLivingToAttack", "=", "par1EntityLiving", ";", "revengeTimer", "=", "entityLivingToAttack", "==", "null", "?", "0", ":", "60", ";", "}", "protected", "void", "entityInit", "(", ")", "{", "dataWatcher", ".", "addObject", "(", "8", ",", "Integer", ".", "valueOf", "(", "field_39003_c", ")", ")", ";", "}", "public", "boolean", "canEntityBeSeen", "(", "Entity", "par1Entity", ")", "{", "return", "worldObj", ".", "rayTraceBlocks", "(", "Vec3D", ".", "createVector", "(", "posX", ",", "posY", "+", "(", "double", ")", "getEyeHeight", "(", ")", ",", "posZ", ")", ",", "Vec3D", ".", "createVector", "(", "par1Entity", ".", "posX", ",", "par1Entity", ".", "posY", "+", "(", "double", ")", "par1Entity", ".", "getEyeHeight", "(", ")", ",", "par1Entity", ".", "posZ", ")", ")", "==", "null", ";", "}", "public", "boolean", "canBeCollidedWith", "(", ")", "{", "return", "!", "isDead", ";", "}", "public", "boolean", "canBePushed", "(", ")", "{", "return", "!", "isDead", ";", "}", "public", "float", "getEyeHeight", "(", ")", "{", "return", "height", "*", "0.85F", ";", "}", "public", "int", "getTalkInterval", "(", ")", "{", "return", "80", ";", "}", "public", "void", "playLivingSound", "(", ")", "{", "String", "s", "=", "getLivingSound", "(", ")", ";", "if", "(", "s", "!=", "null", ")", "{", "worldObj", ".", "playSoundAtEntity", "(", "this", ",", "s", ",", "getSoundVolume", "(", ")", ",", "getSoundPitch", "(", ")", ")", ";", "}", "}", "public", "void", "onEntityUpdate", "(", ")", "{", "prevSwingProgress", "=", "swingProgress", ";", "super", ".", "onEntityUpdate", "(", ")", ";", "Profiler", ".", "startSection", "(", "\"mobBaseTick\"", ")", ";", "if", "(", "isEntityAlive", "(", ")", "&&", "rand", ".", "nextInt", "(", "1000", ")", "<", "livingSoundTime", "++", ")", "{", "livingSoundTime", "=", "-", "getTalkInterval", "(", ")", ";", "playLivingSound", "(", ")", ";", "}", "if", "(", "isEntityAlive", "(", ")", "&&", "isEntityInsideOpaqueBlock", "(", ")", ")", "{", "if", "(", "!", "attackEntityFrom", "(", "DamageSource", ".", "inWall", ",", "1", ")", ")", ";", "}", "if", "(", "isImmuneToFire", "(", ")", "||", "worldObj", ".", "isRemote", ")", "{", "extinguish", "(", ")", ";", "}", "if", "(", "isEntityAlive", "(", ")", "&&", "isInsideOfMaterial", "(", "Material", ".", "water", ")", "&&", "!", "canBreatheUnderwater", "(", ")", "&&", "!", "activePotionsMap", ".", "containsKey", "(", "Integer", ".", "valueOf", "(", "Potion", ".", "waterBreathing", ".", "id", ")", ")", ")", "{", "setAir", "(", "decreaseAirSupply", "(", "getAir", "(", ")", ")", ")", ";", "if", "(", "getAir", "(", ")", "==", "-", "20", ")", "{", "setAir", "(", "0", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "8", ";", "i", "++", ")", "{", "float", "f", "=", "rand", ".", "nextFloat", "(", ")", "-", "rand", ".", "nextFloat", "(", ")", ";", "float", "f1", "=", "rand", ".", "nextFloat", "(", ")", "-", "rand", ".", "nextFloat", "(", ")", ";", "float", "f2", "=", "rand", ".", "nextFloat", "(", ")", "-", "rand", ".", "nextFloat", "(", ")", ";", "worldObj", ".", "spawnParticle", "(", "\"bubble\"", ",", "posX", "+", "(", "double", ")", "f", ",", "posY", "+", "(", "double", ")", "f1", ",", "posZ", "+", "(", "double", ")", "f2", ",", "motionX", ",", "motionY", ",", "motionZ", ")", ";", "}", "attackEntityFrom", "(", "DamageSource", ".", "drown", ",", "2", ")", ";", "}", "extinguish", "(", ")", ";", "}", "else", "{", "setAir", "(", "300", ")", ";", "}", "prevCameraPitch", "=", "cameraPitch", ";", "if", "(", "attackTime", ">", "0", ")", "{", "attackTime", "--", ";", "}", "if", "(", "hurtTime", ">", "0", ")", "{", "hurtTime", "--", ";", "}", "if", "(", "heartsLife", ">", "0", ")", "{", "heartsLife", "--", ";", "}", "if", "(", "health", "<=", "0", ")", "{", "onDeathUpdate", "(", ")", ";", "}", "if", "(", "recentlyHit", ">", "0", ")", "{", "recentlyHit", "--", ";", "}", "else", "{", "attackingPlayer", "=", "null", ";", "}", "if", "(", "lastAttackingEntity", "!=", "null", "&&", "!", "lastAttackingEntity", ".", "isEntityAlive", "(", ")", ")", "{", "lastAttackingEntity", "=", "null", ";", "}", "if", "(", "entityLivingToAttack", "!=", "null", ")", "{", "if", "(", "!", "entityLivingToAttack", ".", "isEntityAlive", "(", ")", ")", "{", "setRevengeTarget", "(", "null", ")", ";", "}", "else", "if", "(", "revengeTimer", ">", "0", ")", "{", "revengeTimer", "--", ";", "}", "else", "{", "setRevengeTarget", "(", "null", ")", ";", "}", "}", "updatePotionEffects", "(", ")", ";", "field_9121_aE", "=", "field_9122_aD", ";", "prevRenderYawOffset", "=", "renderYawOffset", ";", "prevRotationYawHead", "=", "rotationYawHead", ";", "prevRotationYaw", "=", "rotationYaw", ";", "prevRotationPitch", "=", "rotationPitch", ";", "Profiler", ".", "endSection", "(", ")", ";", "}", "protected", "void", "onDeathUpdate", "(", ")", "{", "deathTime", "++", ";", "if", "(", "deathTime", "==", "20", ")", "{", "if", "(", "!", "worldObj", ".", "isRemote", "&&", "(", "recentlyHit", ">", "0", "||", "isPlayer", "(", ")", ")", "&&", "!", "isChild", "(", ")", ")", "{", "for", "(", "int", "i", "=", "getExperiencePoints", "(", "attackingPlayer", ")", ";", "i", ">", "0", ";", ")", "{", "int", "k", "=", "EntityXPOrb", ".", "getXPSplit", "(", "i", ")", ";", "i", "-=", "k", ";", "worldObj", ".", "spawnEntityInWorld", "(", "new", "EntityXPOrb", "(", "worldObj", ",", "posX", ",", "posY", ",", "posZ", ",", "k", ")", ")", ";", "}", "}", "onEntityDeath", "(", ")", ";", "setDead", "(", ")", ";", "for", "(", "int", "j", "=", "0", ";", "j", "<", "20", ";", "j", "++", ")", "{", "double", "d", "=", "rand", ".", "nextGaussian", "(", ")", "*", "0.02D", ";", "double", "d1", "=", "rand", ".", "nextGaussian", "(", ")", "*", "0.02D", ";", "double", "d2", "=", "rand", ".", "nextGaussian", "(", ")", "*", "0.02D", ";", "worldObj", ".", "spawnParticle", "(", "\"explode\"", ",", "(", "posX", "+", "(", "double", ")", "(", "rand", ".", "nextFloat", "(", ")", "*", "width", "*", "2.0F", ")", ")", "-", "(", "double", ")", "width", ",", "posY", "+", "(", "double", ")", "(", "rand", ".", "nextFloat", "(", ")", "*", "height", ")", ",", "(", "posZ", "+", "(", "double", ")", "(", "rand", ".", "nextFloat", "(", ")", "*", "width", "*", "2.0F", ")", ")", "-", "(", "double", ")", "width", ",", "d", ",", "d1", ",", "d2", ")", ";", "}", "}", "}", "protected", "int", "decreaseAirSupply", "(", "int", "par1", ")", "{", "return", "par1", "-", "1", ";", "}", "protected", "int", "getExperiencePoints", "(", "EntityPlayer", "par1EntityPlayer", ")", "{", "return", "experienceValue", ";", "}", "protected", "boolean", "isPlayer", "(", ")", "{", "return", "false", ";", "}", "public", "void", "spawnExplosionParticle", "(", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "20", ";", "i", "++", ")", "{", "double", "d", "=", "rand", ".", "nextGaussian", "(", ")", "*", "0.02D", ";", "double", "d1", "=", "rand", ".", "nextGaussian", "(", ")", "*", "0.02D", ";", "double", "d2", "=", "rand", ".", "nextGaussian", "(", ")", "*", "0.02D", ";", "double", "d3", "=", "10D", ";", "worldObj", ".", "spawnParticle", "(", "\"explode\"", ",", "(", "posX", "+", "(", "double", ")", "(", "rand", ".", "nextFloat", "(", ")", "*", "width", "*", "2.0F", ")", ")", "-", "(", "double", ")", "width", "-", "d", "*", "d3", ",", "(", "posY", "+", "(", "double", ")", "(", "rand", ".", "nextFloat", "(", ")", "*", "height", ")", ")", "-", "d1", "*", "d3", ",", "(", "posZ", "+", "(", "double", ")", "(", "rand", ".", "nextFloat", "(", ")", "*", "width", "*", "2.0F", ")", ")", "-", "(", "double", ")", "width", "-", "d2", "*", "d3", ",", "d", ",", "d1", ",", "d2", ")", ";", "}", "}", "public", "void", "updateRidden", "(", ")", "{", "super", ".", "updateRidden", "(", ")", ";", "field_9124_aB", "=", "field_9123_aC", ";", "field_9123_aC", "=", "0.0F", ";", "fallDistance", "=", "0.0F", ";", "}", "public", "void", "onUpdate", "(", ")", "{", "super", ".", "onUpdate", "(", ")", ";", "if", "(", "arrowHitTempCounter", ">", "0", ")", "{", "if", "(", "arrowHitTimer", "<=", "0", ")", "{", "arrowHitTimer", "=", "60", ";", "}", "arrowHitTimer", "--", ";", "if", "(", "arrowHitTimer", "<=", "0", ")", "{", "arrowHitTempCounter", "--", ";", "}", "}", "onLivingUpdate", "(", ")", ";", "double", "d", "=", "posX", "-", "prevPosX", ";", "double", "d1", "=", "posZ", "-", "prevPosZ", ";", "float", "f", "=", "MathHelper", ".", "sqrt_double", "(", "d", "*", "d", "+", "d1", "*", "d1", ")", ";", "float", "f1", "=", "renderYawOffset", ";", "float", "f2", "=", "0.0F", ";", "field_9124_aB", "=", "field_9123_aC", ";", "float", "f3", "=", "0.0F", ";", "if", "(", "f", ">", "0.05F", ")", "{", "f3", "=", "1.0F", ";", "f2", "=", "f", "*", "3F", ";", "f1", "=", "(", "(", "float", ")", "Math", ".", "atan2", "(", "d1", ",", "d", ")", "*", "180F", ")", "/", "(", "float", ")", "Math", ".", "PI", "-", "90F", ";", "}", "if", "(", "swingProgress", ">", "0.0F", ")", "{", "f1", "=", "rotationYaw", ";", "}", "if", "(", "!", "onGround", ")", "{", "f3", "=", "0.0F", ";", "}", "field_9123_aC", "=", "field_9123_aC", "+", "(", "f3", "-", "field_9123_aC", ")", "*", "0.3F", ";", "if", "(", "isAIEnabled", "(", ")", ")", "{", "bodyHelper", ".", "func_48431_a", "(", ")", ";", "}", "else", "{", "float", "f4", ";", "for", "(", "f4", "=", "f1", "-", "renderYawOffset", ";", "f4", "<", "-", "180F", ";", "f4", "+=", "360F", ")", "{", "}", "for", "(", ";", "f4", ">=", "180F", ";", "f4", "-=", "360F", ")", "{", "}", "renderYawOffset", "+=", "f4", "*", "0.3F", ";", "float", "f5", ";", "for", "(", "f5", "=", "rotationYaw", "-", "renderYawOffset", ";", "f5", "<", "-", "180F", ";", "f5", "+=", "360F", ")", "{", "}", "for", "(", ";", "f5", ">=", "180F", ";", "f5", "-=", "360F", ")", "{", "}", "boolean", "flag", "=", "f5", "<", "-", "90F", "||", "f5", ">=", "90F", ";", "if", "(", "f5", "<", "-", "75F", ")", "{", "f5", "=", "-", "75F", ";", "}", "if", "(", "f5", ">=", "75F", ")", "{", "f5", "=", "75F", ";", "}", "renderYawOffset", "=", "rotationYaw", "-", "f5", ";", "if", "(", "f5", "*", "f5", ">", "2500F", ")", "{", "renderYawOffset", "+=", "f5", "*", "0.2F", ";", "}", "if", "(", "flag", ")", "{", "f2", "*=", "-", "1F", ";", "}", "}", "for", "(", ";", "rotationYaw", "-", "prevRotationYaw", "<", "-", "180F", ";", "prevRotationYaw", "-=", "360F", ")", "{", "}", "for", "(", ";", "rotationYaw", "-", "prevRotationYaw", ">=", "180F", ";", "prevRotationYaw", "+=", "360F", ")", "{", "}", "for", "(", ";", "renderYawOffset", "-", "prevRenderYawOffset", "<", "-", "180F", ";", "prevRenderYawOffset", "-=", "360F", ")", "{", "}", "for", "(", ";", "renderYawOffset", "-", "prevRenderYawOffset", ">=", "180F", ";", "prevRenderYawOffset", "+=", "360F", ")", "{", "}", "for", "(", ";", "rotationPitch", "-", "prevRotationPitch", "<", "-", "180F", ";", "prevRotationPitch", "-=", "360F", ")", "{", "}", "for", "(", ";", "rotationPitch", "-", "prevRotationPitch", ">=", "180F", ";", "prevRotationPitch", "+=", "360F", ")", "{", "}", "for", "(", ";", "rotationYawHead", "-", "prevRotationYawHead", "<", "-", "180F", ";", "prevRotationYawHead", "-=", "360F", ")", "{", "}", "for", "(", ";", "rotationYawHead", "-", "prevRotationYawHead", ">=", "180F", ";", "prevRotationYawHead", "+=", "360F", ")", "{", "}", "field_9122_aD", "+=", "f2", ";", "}", "protected", "void", "setSize", "(", "float", "par1", ",", "float", "par2", ")", "{", "super", ".", "setSize", "(", "par1", ",", "par2", ")", ";", "}", "public", "void", "heal", "(", "int", "par1", ")", "{", "if", "(", "health", "<=", "0", ")", "{", "return", ";", "}", "health", "+=", "par1", ";", "if", "(", "health", ">", "getMaxHealth", "(", ")", ")", "{", "health", "=", "getMaxHealth", "(", ")", ";", "}", "heartsLife", "=", "heartsHalvesLife", "/", "2", ";", "}", "public", "abstract", "int", "getMaxHealth", "(", ")", ";", "public", "int", "getHealth", "(", ")", "{", "return", "health", ";", "}", "public", "void", "setEntityHealth", "(", "int", "par1", ")", "{", "health", "=", "par1", ";", "if", "(", "par1", ">", "getMaxHealth", "(", ")", ")", "{", "par1", "=", "getMaxHealth", "(", ")", ";", "}", "}", "public", "boolean", "attackEntityFrom", "(", "DamageSource", "par1DamageSource", ",", "int", "par2", ")", "{", "if", "(", "worldObj", ".", "isRemote", ")", "{", "return", "false", ";", "}", "entityAge", "=", "0", ";", "if", "(", "health", "<=", "0", ")", "{", "return", "false", ";", "}", "if", "(", "par1DamageSource", ".", "fireDamage", "(", ")", "&&", "isPotionActive", "(", "Potion", ".", "fireResistance", ")", ")", "{", "return", "false", ";", "}", "field_9141_bd", "=", "1.5F", ";", "boolean", "flag", "=", "true", ";", "if", "(", "(", "float", ")", "heartsLife", ">", "(", "float", ")", "heartsHalvesLife", "/", "2.0F", ")", "{", "if", "(", "par2", "<=", "naturalArmorRating", ")", "{", "return", "false", ";", "}", "damageEntity", "(", "par1DamageSource", ",", "par2", "-", "naturalArmorRating", ")", ";", "naturalArmorRating", "=", "par2", ";", "flag", "=", "false", ";", "}", "else", "{", "naturalArmorRating", "=", "par2", ";", "prevHealth", "=", "health", ";", "heartsLife", "=", "heartsHalvesLife", ";", "damageEntity", "(", "par1DamageSource", ",", "par2", ")", ";", "hurtTime", "=", "maxHurtTime", "=", "10", ";", "}", "attackedAtYaw", "=", "0.0F", ";", "Entity", "entity", "=", "par1DamageSource", ".", "getEntity", "(", ")", ";", "if", "(", "entity", "!=", "null", ")", "{", "if", "(", "entity", "instanceof", "EntityLiving", ")", "{", "setRevengeTarget", "(", "(", "EntityLiving", ")", "entity", ")", ";", "}", "if", "(", "entity", "instanceof", "EntityPlayer", ")", "{", "recentlyHit", "=", "60", ";", "attackingPlayer", "=", "(", "EntityPlayer", ")", "entity", ";", "}", "else", "if", "(", "entity", "instanceof", "EntityWolf", ")", "{", "EntityWolf", "entitywolf", "=", "(", "EntityWolf", ")", "entity", ";", "if", "(", "entitywolf", ".", "isTamed", "(", ")", ")", "{", "recentlyHit", "=", "60", ";", "attackingPlayer", "=", "null", ";", "}", "}", "}", "if", "(", "flag", ")", "{", "worldObj", ".", "setEntityState", "(", "this", ",", "(", "byte", ")", "2", ")", ";", "setBeenAttacked", "(", ")", ";", "if", "(", "entity", "!=", "null", ")", "{", "double", "d", "=", "entity", ".", "posX", "-", "posX", ";", "double", "d1", ";", "for", "(", "d1", "=", "entity", ".", "posZ", "-", "posZ", ";", "d", "*", "d", "+", "d1", "*", "d1", "<", "0.0001D", ";", "d1", "=", "(", "Math", ".", "random", "(", ")", "-", "Math", ".", "random", "(", ")", ")", "*", "0.01D", ")", "{", "d", "=", "(", "Math", ".", "random", "(", ")", "-", "Math", ".", "random", "(", ")", ")", "*", "0.01D", ";", "}", "attackedAtYaw", "=", "(", "float", ")", "(", "(", "Math", ".", "atan2", "(", "d1", ",", "d", ")", "*", "180D", ")", "/", "Math", ".", "PI", ")", "-", "rotationYaw", ";", "knockBack", "(", "entity", ",", "par2", ",", "d", ",", "d1", ")", ";", "}", "else", "{", "attackedAtYaw", "=", "(", "int", ")", "(", "Math", ".", "random", "(", ")", "*", "2D", ")", "*", "180", ";", "}", "}", "if", "(", "health", "<=", "0", ")", "{", "if", "(", "flag", ")", "{", "worldObj", ".", "playSoundAtEntity", "(", "this", ",", "getDeathSound", "(", ")", ",", "getSoundVolume", "(", ")", ",", "getSoundPitch", "(", ")", ")", ";", "}", "onDeath", "(", "par1DamageSource", ")", ";", "}", "else", "if", "(", "flag", ")", "{", "worldObj", ".", "playSoundAtEntity", "(", "this", ",", "getHurtSound", "(", ")", ",", "getSoundVolume", "(", ")", ",", "getSoundPitch", "(", ")", ")", ";", "}", "return", "true", ";", "}", "private", "float", "getSoundPitch", "(", ")", "{", "if", "(", "isChild", "(", ")", ")", "{", "return", "(", "rand", ".", "nextFloat", "(", ")", "-", "rand", ".", "nextFloat", "(", ")", ")", "*", "0.2F", "+", "1.5F", ";", "}", "else", "{", "return", "(", "rand", ".", "nextFloat", "(", ")", "-", "rand", ".", "nextFloat", "(", ")", ")", "*", "0.2F", "+", "1.0F", ";", "}", "}", "public", "int", "getTotalArmorValue", "(", ")", "{", "return", "0", ";", "}", "protected", "void", "damageArmor", "(", "int", "i", ")", "{", "}", "protected", "int", "applyArmorCalculations", "(", "DamageSource", "par1DamageSource", ",", "int", "par2", ")", "{", "if", "(", "!", "par1DamageSource", ".", "isUnblockable", "(", ")", ")", "{", "int", "i", "=", "25", "-", "getTotalArmorValue", "(", ")", ";", "int", "j", "=", "par2", "*", "i", "+", "carryoverDamage", ";", "damageArmor", "(", "par2", ")", ";", "par2", "=", "j", "/", "25", ";", "carryoverDamage", "=", "j", "%", "25", ";", "}", "return", "par2", ";", "}", "protected", "int", "applyPotionDamageCalculations", "(", "DamageSource", "par1DamageSource", ",", "int", "par2", ")", "{", "if", "(", "isPotionActive", "(", "Potion", ".", "resistance", ")", ")", "{", "int", "i", "=", "(", "getActivePotionEffect", "(", "Potion", ".", "resistance", ")", ".", "getAmplifier", "(", ")", "+", "1", ")", "*", "5", ";", "int", "j", "=", "25", "-", "i", ";", "int", "k", "=", "par2", "*", "j", "+", "carryoverDamage", ";", "par2", "=", "k", "/", "25", ";", "carryoverDamage", "=", "k", "%", "25", ";", "}", "return", "par2", ";", "}", "protected", "void", "damageEntity", "(", "DamageSource", "par1DamageSource", ",", "int", "par2", ")", "{", "par2", "=", "applyArmorCalculations", "(", "par1DamageSource", ",", "par2", ")", ";", "par2", "=", "applyPotionDamageCalculations", "(", "par1DamageSource", ",", "par2", ")", ";", "health", "-=", "par2", ";", "}", "protected", "float", "getSoundVolume", "(", ")", "{", "return", "1.0F", ";", "}", "protected", "String", "getLivingSound", "(", ")", "{", "return", "null", ";", "}", "protected", "String", "getHurtSound", "(", ")", "{", "return", "\"\"", ";", "}", "protected", "String", "getDeathSound", "(", ")", "{", "return", "\"\"", ";", "}", "public", "void", "knockBack", "(", "Entity", "par1Entity", ",", "int", "par2", ",", "double", "par3", ",", "double", "par5", ")", "{", "isAirBorne", "=", "true", ";", "float", "f", "=", "MathHelper", ".", "sqrt_double", "(", "par3", "*", "par3", "+", "par5", "*", "par5", ")", ";", "float", "f1", "=", "0.4F", ";", "motionX", "/=", "2D", ";", "motionY", "/=", "2D", ";", "motionZ", "/=", "2D", ";", "motionX", "-=", "(", "par3", "/", "(", "double", ")", "f", ")", "*", "(", "double", ")", "f1", ";", "motionY", "+=", "f1", ";", "motionZ", "-=", "(", "par5", "/", "(", "double", ")", "f", ")", "*", "(", "double", ")", "f1", ";", "if", "(", "motionY", ">", "0.40000000596046448D", ")", "{", "motionY", "=", "0.40000000596046448D", ";", "}", "}", "public", "void", "onDeath", "(", "DamageSource", "par1DamageSource", ")", "{", "Entity", "entity", "=", "par1DamageSource", ".", "getEntity", "(", ")", ";", "if", "(", "scoreValue", ">=", "0", "&&", "entity", "!=", "null", ")", "{", "entity", ".", "addToPlayerScore", "(", "this", ",", "scoreValue", ")", ";", "}", "if", "(", "entity", "!=", "null", ")", "{", "entity", ".", "onKillEntity", "(", "this", ")", ";", "}", "dead", "=", "true", ";", "if", "(", "!", "worldObj", ".", "isRemote", ")", "{", "int", "i", "=", "0", ";", "if", "(", "entity", "instanceof", "EntityPlayer", ")", "{", "i", "=", "EnchantmentHelper", ".", "getLootingModifier", "(", "(", "(", "EntityPlayer", ")", "entity", ")", ".", "inventory", ")", ";", "}", "if", "(", "!", "isChild", "(", ")", ")", "{", "dropFewItems", "(", "recentlyHit", ">", "0", ",", "i", ")", ";", "if", "(", "recentlyHit", ">", "0", ")", "{", "int", "j", "=", "rand", ".", "nextInt", "(", "200", ")", "-", "i", ";", "if", "(", "j", "<", "5", ")", "{", "dropRareDrop", "(", "j", ">", "0", "?", "0", ":", "1", ")", ";", "}", "}", "}", "}", "worldObj", ".", "setEntityState", "(", "this", ",", "(", "byte", ")", "3", ")", ";", "}", "protected", "void", "dropRareDrop", "(", "int", "i", ")", "{", "}", "protected", "void", "dropFewItems", "(", "boolean", "par1", ",", "int", "par2", ")", "{", "int", "i", "=", "getDropItemId", "(", ")", ";", "if", "(", "i", ">", "0", ")", "{", "int", "j", "=", "rand", ".", "nextInt", "(", "3", ")", ";", "if", "(", "par2", ">", "0", ")", "{", "j", "+=", "rand", ".", "nextInt", "(", "par2", "+", "1", ")", ";", "}", "for", "(", "int", "k", "=", "0", ";", "k", "<", "j", ";", "k", "++", ")", "{", "dropItem", "(", "i", ",", "1", ")", ";", "}", "}", "}", "protected", "int", "getDropItemId", "(", ")", "{", "return", "0", ";", "}", "protected", "void", "fall", "(", "float", "par1", ")", "{", "super", ".", "fall", "(", "par1", ")", ";", "int", "i", "=", "(", "int", ")", "Math", ".", "ceil", "(", "par1", "-", "3F", ")", ";", "if", "(", "i", ">", "0", ")", "{", "if", "(", "i", ">", "4", ")", "{", "worldObj", ".", "playSoundAtEntity", "(", "this", ",", "\"\"", ",", "1.0F", ",", "1.0F", ")", ";", "}", "else", "{", "worldObj", ".", "playSoundAtEntity", "(", "this", ",", "\"\"", ",", "1.0F", ",", "1.0F", ")", ";", "}", "attackEntityFrom", "(", "DamageSource", ".", "fall", ",", "i", ")", ";", "int", "j", "=", "worldObj", ".", "getBlockId", "(", "MathHelper", ".", "floor_double", "(", "posX", ")", ",", "MathHelper", ".", "floor_double", "(", "posY", "-", "0.20000000298023224D", "-", "(", "double", ")", "yOffset", ")", ",", "MathHelper", ".", "floor_double", "(", "posZ", ")", ")", ";", "if", "(", "j", ">", "0", ")", "{", "StepSound", "stepsound", "=", "Block", ".", "blocksList", "[", "j", "]", ".", "stepSound", ";", "worldObj", ".", "playSoundAtEntity", "(", "this", ",", "stepsound", ".", "getStepSound", "(", ")", ",", "stepsound", ".", "getVolume", "(", ")", "*", "0.5F", ",", "stepsound", ".", "getPitch", "(", ")", "*", "0.75F", ")", ";", "}", "}", "}", "public", "void", "moveEntityWithHeading", "(", "float", "par1", ",", "float", "par2", ")", "{", "if", "(", "isInWater", "(", ")", ")", "{", "double", "d", "=", "posY", ";", "moveFlying", "(", "par1", ",", "par2", ",", "isAIEnabled", "(", ")", "?", "0.04F", ":", "0.02F", ")", ";", "moveEntity", "(", "motionX", ",", "motionY", ",", "motionZ", ")", ";", "motionX", "*=", "0.80000001192092896D", ";", "motionY", "*=", "0.80000001192092896D", ";", "motionZ", "*=", "0.80000001192092896D", ";", "motionY", "-=", "0.02D", ";", "if", "(", "isCollidedHorizontally", "&&", "isOffsetPositionInLiquid", "(", "motionX", ",", "(", "(", "motionY", "+", "0.60000002384185791D", ")", "-", "posY", ")", "+", "d", ",", "motionZ", ")", ")", "{", "motionY", "=", "0.30000001192092896D", ";", "}", "}", "else", "if", "(", "handleLavaMovement", "(", ")", ")", "{", "double", "d1", "=", "posY", ";", "moveFlying", "(", "par1", ",", "par2", ",", "0.02F", ")", ";", "moveEntity", "(", "motionX", ",", "motionY", ",", "motionZ", ")", ";", "motionX", "*=", "0.5D", ";", "motionY", "*=", "0.5D", ";", "motionZ", "*=", "0.5D", ";", "motionY", "-=", "0.02D", ";", "if", "(", "isCollidedHorizontally", "&&", "isOffsetPositionInLiquid", "(", "motionX", ",", "(", "(", "motionY", "+", "0.60000002384185791D", ")", "-", "posY", ")", "+", "d1", ",", "motionZ", ")", ")", "{", "motionY", "=", "0.30000001192092896D", ";", "}", "}", "else", "{", "float", "f", "=", "0.91F", ";", "if", "(", "onGround", ")", "{", "f", "=", "0.5460001F", ";", "int", "i", "=", "worldObj", ".", "getBlockId", "(", "MathHelper", ".", "floor_double", "(", "posX", ")", ",", "MathHelper", ".", "floor_double", "(", "boundingBox", ".", "minY", ")", "-", "1", ",", "MathHelper", ".", "floor_double", "(", "posZ", ")", ")", ";", "if", "(", "i", ">", "0", ")", "{", "f", "=", "Block", ".", "blocksList", "[", "i", "]", ".", "slipperiness", "*", "0.91F", ";", "}", "}", "float", "f1", "=", "0.1627714F", "/", "(", "f", "*", "f", "*", "f", ")", ";", "float", "f2", ";", "if", "(", "onGround", ")", "{", "if", "(", "isAIEnabled", "(", ")", ")", "{", "f2", "=", "func_48332_ar", "(", ")", ";", "}", "else", "{", "f2", "=", "landMovementFactor", ";", "}", "f2", "*=", "f1", ";", "}", "else", "{", "f2", "=", "jumpMovementFactor", ";", "}", "moveFlying", "(", "par1", ",", "par2", ",", "f2", ")", ";", "f", "=", "0.91F", ";", "if", "(", "onGround", ")", "{", "f", "=", "0.5460001F", ";", "int", "j", "=", "worldObj", ".", "getBlockId", "(", "MathHelper", ".", "floor_double", "(", "posX", ")", ",", "MathHelper", ".", "floor_double", "(", "boundingBox", ".", "minY", ")", "-", "1", ",", "MathHelper", ".", "floor_double", "(", "posZ", ")", ")", ";", "if", "(", "j", ">", "0", ")", "{", "f", "=", "Block", ".", "blocksList", "[", "j", "]", ".", "slipperiness", "*", "0.91F", ";", "}", "}", "if", "(", "isOnLadder", "(", ")", ")", "{", "float", "f3", "=", "0.15F", ";", "if", "(", "motionX", "<", "(", "double", ")", "(", "-", "f3", ")", ")", "{", "motionX", "=", "-", "f3", ";", "}", "if", "(", "motionX", ">", "(", "double", ")", "f3", ")", "{", "motionX", "=", "f3", ";", "}", "if", "(", "motionZ", "<", "(", "double", ")", "(", "-", "f3", ")", ")", "{", "motionZ", "=", "-", "f3", ";", "}", "if", "(", "motionZ", ">", "(", "double", ")", "f3", ")", "{", "motionZ", "=", "f3", ";", "}", "fallDistance", "=", "0.0F", ";", "if", "(", "motionY", "<", "-", "0.14999999999999999D", ")", "{", "motionY", "=", "-", "0.14999999999999999D", ";", "}", "boolean", "flag", "=", "isSneaking", "(", ")", "&&", "(", "this", "instanceof", "EntityPlayer", ")", ";", "if", "(", "flag", "&&", "motionY", "<", "0.0D", ")", "{", "motionY", "=", "0.0D", ";", "}", "}", "moveEntity", "(", "motionX", ",", "motionY", ",", "motionZ", ")", ";", "if", "(", "isCollidedHorizontally", "&&", "isOnLadder", "(", ")", ")", "{", "motionY", "=", "0.20000000000000001D", ";", "}", "motionY", "-=", "0.080000000000000002D", ";", "motionY", "*=", "0.98000001907348633D", ";", "motionX", "*=", "f", ";", "motionZ", "*=", "f", ";", "}", "field_9142_bc", "=", "field_9141_bd", ";", "double", "d2", "=", "posX", "-", "prevPosX", ";", "double", "d3", "=", "posZ", "-", "prevPosZ", ";", "float", "f4", "=", "MathHelper", ".", "sqrt_double", "(", "d2", "*", "d2", "+", "d3", "*", "d3", ")", "*", "4F", ";", "if", "(", "f4", ">", "1.0F", ")", "{", "f4", "=", "1.0F", ";", "}", "field_9141_bd", "+=", "(", "f4", "-", "field_9141_bd", ")", "*", "0.4F", ";", "field_386_ba", "+=", "field_9141_bd", ";", "}", "public", "boolean", "isOnLadder", "(", ")", "{", "int", "i", "=", "MathHelper", ".", "floor_double", "(", "posX", ")", ";", "int", "j", "=", "MathHelper", ".", "floor_double", "(", "boundingBox", ".", "minY", ")", ";", "int", "k", "=", "MathHelper", ".", "floor_double", "(", "posZ", ")", ";", "int", "l", "=", "worldObj", ".", "getBlockId", "(", "i", ",", "j", ",", "k", ")", ";", "return", "l", "==", "Block", ".", "ladder", ".", "blockID", "||", "l", "==", "Block", ".", "vine", ".", "blockID", ";", "}", "public", "void", "writeEntityToNBT", "(", "NBTTagCompound", "par1NBTTagCompound", ")", "{", "par1NBTTagCompound", ".", "setShort", "(", "\"Health\"", ",", "(", "short", ")", "health", ")", ";", "par1NBTTagCompound", ".", "setShort", "(", "\"HurtTime\"", ",", "(", "short", ")", "hurtTime", ")", ";", "par1NBTTagCompound", ".", "setShort", "(", "\"DeathTime\"", ",", "(", "short", ")", "deathTime", ")", ";", "par1NBTTagCompound", ".", "setShort", "(", "\"AttackTime\"", ",", "(", "short", ")", "attackTime", ")", ";", "if", "(", "!", "activePotionsMap", ".", "isEmpty", "(", ")", ")", "{", "NBTTagList", "nbttaglist", "=", "new", "NBTTagList", "(", ")", ";", "NBTTagCompound", "nbttagcompound", ";", "for", "(", "Iterator", "iterator", "=", "activePotionsMap", ".", "values", "(", ")", ".", "iterator", "(", ")", ";", "iterator", ".", "hasNext", "(", ")", ";", "nbttaglist", ".", "appendTag", "(", "nbttagcompound", ")", ")", "{", "PotionEffect", "potioneffect", "=", "(", "PotionEffect", ")", "iterator", ".", "next", "(", ")", ";", "nbttagcompound", "=", "new", "NBTTagCompound", "(", ")", ";", "nbttagcompound", ".", "setByte", "(", "\"Id\"", ",", "(", "byte", ")", "potioneffect", ".", "getPotionID", "(", ")", ")", ";", "nbttagcompound", ".", "setByte", "(", "\"Amplifier\"", ",", "(", "byte", ")", "potioneffect", ".", "getAmplifier", "(", ")", ")", ";", "nbttagcompound", ".", "setInteger", "(", "\"Duration\"", ",", "potioneffect", ".", "getDuration", "(", ")", ")", ";", "}", "par1NBTTagCompound", ".", "setTag", "(", "\"\"", ",", "nbttaglist", ")", ";", "}", "}", "public", "void", "readEntityFromNBT", "(", "NBTTagCompound", "par1NBTTagCompound", ")", "{", "if", "(", "health", "<", "-", "32768", ")", "{", "health", "=", "-", "32768", ";", "}", "health", "=", "par1NBTTagCompound", ".", "getShort", "(", "\"Health\"", ")", ";", "if", "(", "!", "par1NBTTagCompound", ".", "hasKey", "(", "\"Health\"", ")", ")", "{", "health", "=", "getMaxHealth", "(", ")", ";", "}", "hurtTime", "=", "par1NBTTagCompound", ".", "getShort", "(", "\"HurtTime\"", ")", ";", "deathTime", "=", "par1NBTTagCompound", ".", "getShort", "(", "\"DeathTime\"", ")", ";", "attackTime", "=", "par1NBTTagCompound", ".", "getShort", "(", "\"AttackTime\"", ")", ";", "if", "(", "par1NBTTagCompound", ".", "hasKey", "(", "\"\"", ")", ")", "{", "NBTTagList", "nbttaglist", "=", "par1NBTTagCompound", ".", "getTagList", "(", "\"\"", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "nbttaglist", ".", "tagCount", "(", ")", ";", "i", "++", ")", "{", "NBTTagCompound", "nbttagcompound", "=", "(", "NBTTagCompound", ")", "nbttaglist", ".", "tagAt", "(", "i", ")", ";", "byte", "byte0", "=", "nbttagcompound", ".", "getByte", "(", "\"Id\"", ")", ";", "byte", "byte1", "=", "nbttagcompound", ".", "getByte", "(", "\"Amplifier\"", ")", ";", "int", "j", "=", "nbttagcompound", ".", "getInteger", "(", "\"Duration\"", ")", ";", "activePotionsMap", ".", "put", "(", "Integer", ".", "valueOf", "(", "byte0", ")", ",", "new", "PotionEffect", "(", "byte0", ",", "j", ",", "byte1", ")", ")", ";", "}", "}", "}", "public", "boolean", "isEntityAlive", "(", ")", "{", "return", "!", "isDead", "&&", "health", ">", "0", ";", "}", "public", "boolean", "canBreatheUnderwater", "(", ")", "{", "return", "false", ";", "}", "public", "void", "setMoveForward", "(", "float", "par1", ")", "{", "moveForward", "=", "par1", ";", "}", "public", "void", "setJumping", "(", "boolean", "par1", ")", "{", "isJumping", "=", "par1", ";", "}", "public", "void", "onLivingUpdate", "(", ")", "{", "if", "(", "jumpTicks", ">", "0", ")", "{", "jumpTicks", "--", ";", "}", "if", "(", "newPosRotationIncrements", ">", "0", ")", "{", "double", "d", "=", "posX", "+", "(", "newPosX", "-", "posX", ")", "/", "(", "double", ")", "newPosRotationIncrements", ";", "double", "d1", "=", "posY", "+", "(", "newPosY", "-", "posY", ")", "/", "(", "double", ")", "newPosRotationIncrements", ";", "double", "d2", "=", "posZ", "+", "(", "newPosZ", "-", "posZ", ")", "/", "(", "double", ")", "newPosRotationIncrements", ";", "double", "d3", ";", "for", "(", "d3", "=", "newRotationYaw", "-", "(", "double", ")", "rotationYaw", ";", "d3", "<", "-", "180D", ";", "d3", "+=", "360D", ")", "{", "}", "for", "(", ";", "d3", ">=", "180D", ";", "d3", "-=", "360D", ")", "{", "}", "rotationYaw", "+=", "d3", "/", "(", "double", ")", "newPosRotationIncrements", ";", "rotationPitch", "+=", "(", "newRotationPitch", "-", "(", "double", ")", "rotationPitch", ")", "/", "(", "double", ")", "newPosRotationIncrements", ";", "newPosRotationIncrements", "--", ";", "setPosition", "(", "d", ",", "d1", ",", "d2", ")", ";", "setRotation", "(", "rotationYaw", ",", "rotationPitch", ")", ";", "List", "list1", "=", "worldObj", ".", "getCollidingBoundingBoxes", "(", "this", ",", "boundingBox", ".", "contract", "(", "0.03125D", ",", "0.0D", ",", "0.03125D", ")", ")", ";", "if", "(", "list1", ".", "size", "(", ")", ">", "0", ")", "{", "double", "d4", "=", "0.0D", ";", "for", "(", "int", "j", "=", "0", ";", "j", "<", "list1", ".", "size", "(", ")", ";", "j", "++", ")", "{", "AxisAlignedBB", "axisalignedbb", "=", "(", "AxisAlignedBB", ")", "list1", ".", "get", "(", "j", ")", ";", "if", "(", "axisalignedbb", ".", "maxY", ">", "d4", ")", "{", "d4", "=", "axisalignedbb", ".", "maxY", ";", "}", "}", "d1", "+=", "d4", "-", "boundingBox", ".", "minY", ";", "setPosition", "(", "d", ",", "d1", ",", "d2", ")", ";", "}", "}", "Profiler", ".", "startSection", "(", "\"ai\"", ")", ";", "if", "(", "isMovementBlocked", "(", ")", ")", "{", "isJumping", "=", "false", ";", "moveStrafing", "=", "0.0F", ";", "moveForward", "=", "0.0F", ";", "randomYawVelocity", "=", "0.0F", ";", "}", "else", "if", "(", "isClientWorld", "(", ")", ")", "{", "if", "(", "isAIEnabled", "(", ")", ")", "{", "Profiler", ".", "startSection", "(", "\"newAi\"", ")", ";", "updateAITasks", "(", ")", ";", "Profiler", ".", "endSection", "(", ")", ";", "}", "else", "{", "Profiler", ".", "startSection", "(", "\"oldAi\"", ")", ";", "updateEntityActionState", "(", ")", ";", "Profiler", ".", "endSection", "(", ")", ";", "rotationYawHead", "=", "rotationYaw", ";", "}", "}", "Profiler", ".", "endSection", "(", ")", ";", "boolean", "flag", "=", "isInWater", "(", ")", ";", "boolean", "flag1", "=", "handleLavaMovement", "(", ")", ";", "if", "(", "isJumping", ")", "{", "if", "(", "flag", ")", "{", "motionY", "+=", "0.039999999105930328D", ";", "}", "else", "if", "(", "flag1", ")", "{", "motionY", "+=", "0.039999999105930328D", ";", "}", "else", "if", "(", "onGround", "&&", "jumpTicks", "==", "0", ")", "{", "jump", "(", ")", ";", "jumpTicks", "=", "10", ";", "}", "}", "else", "{", "jumpTicks", "=", "0", ";", "}", "moveStrafing", "*=", "0.98F", ";", "moveForward", "*=", "0.98F", ";", "randomYawVelocity", "*=", "0.9F", ";", "float", "f", "=", "landMovementFactor", ";", "landMovementFactor", "*=", "getSpeedModifier", "(", ")", ";", "moveEntityWithHeading", "(", "moveStrafing", ",", "moveForward", ")", ";", "landMovementFactor", "=", "f", ";", "Profiler", ".", "startSection", "(", "\"push\"", ")", ";", "List", "list", "=", "worldObj", ".", "getEntitiesWithinAABBExcludingEntity", "(", "this", ",", "boundingBox", ".", "expand", "(", "0.20000000298023224D", ",", "0.0D", ",", "0.20000000298023224D", ")", ")", ";", "if", "(", "list", "!=", "null", "&&", "list", ".", "size", "(", ")", ">", "0", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "list", ".", "size", "(", ")", ";", "i", "++", ")", "{", "Entity", "entity", "=", "(", "Entity", ")", "list", ".", "get", "(", "i", ")", ";", "if", "(", "entity", ".", "canBePushed", "(", ")", ")", "{", "entity", ".", "applyEntityCollision", "(", "this", ")", ";", "}", "}", "}", "Profiler", ".", "endSection", "(", ")", ";", "}", "protected", "boolean", "isAIEnabled", "(", ")", "{", "return", "false", ";", "}", "protected", "boolean", "isClientWorld", "(", ")", "{", "return", "!", "worldObj", ".", "isRemote", ";", "}", "protected", "boolean", "isMovementBlocked", "(", ")", "{", "return", "health", "<=", "0", ";", "}", "public", "boolean", "isBlocking", "(", ")", "{", "return", "false", ";", "}", "protected", "void", "jump", "(", ")", "{", "motionY", "=", "0.41999998688697815D", ";", "if", "(", "isPotionActive", "(", "Potion", ".", "jump", ")", ")", "{", "motionY", "+=", "(", "float", ")", "(", "getActivePotionEffect", "(", "Potion", ".", "jump", ")", ".", "getAmplifier", "(", ")", "+", "1", ")", "*", "0.1F", ";", "}", "if", "(", "isSprinting", "(", ")", ")", "{", "float", "f", "=", "rotationYaw", "*", "0.01745329F", ";", "motionX", "-=", "MathHelper", ".", "sin", "(", "f", ")", "*", "0.2F", ";", "motionZ", "+=", "MathHelper", ".", "cos", "(", "f", ")", "*", "0.2F", ";", "}", "isAirBorne", "=", "true", ";", "}", "protected", "boolean", "canDespawn", "(", ")", "{", "return", "true", ";", "}", "protected", "void", "despawnEntity", "(", ")", "{", "EntityPlayer", "entityplayer", "=", "worldObj", ".", "getClosestPlayerToEntity", "(", "this", ",", "-", "1D", ")", ";", "if", "(", "entityplayer", "!=", "null", ")", "{", "double", "d", "=", "(", "(", "Entity", ")", "(", "entityplayer", ")", ")", ".", "posX", "-", "posX", ";", "double", "d1", "=", "(", "(", "Entity", ")", "(", "entityplayer", ")", ")", ".", "posY", "-", "posY", ";", "double", "d2", "=", "(", "(", "Entity", ")", "(", "entityplayer", ")", ")", ".", "posZ", "-", "posZ", ";", "double", "d3", "=", "d", "*", "d", "+", "d1", "*", "d1", "+", "d2", "*", "d2", ";", "if", "(", "canDespawn", "(", ")", "&&", "d3", ">", "16384D", ")", "{", "setDead", "(", ")", ";", "}", "if", "(", "entityAge", ">", "600", "&&", "rand", ".", "nextInt", "(", "800", ")", "==", "0", "&&", "d3", ">", "1024D", "&&", "canDespawn", "(", ")", ")", "{", "setDead", "(", ")", ";", "}", "else", "if", "(", "d3", "<", "1024D", ")", "{", "entityAge", "=", "0", ";", "}", "}", "}", "protected", "void", "updateAITasks", "(", ")", "{", "entityAge", "++", ";", "Profiler", ".", "startSection", "(", "\"checkDespawn\"", ")", ";", "despawnEntity", "(", ")", ";", "Profiler", ".", "endSection", "(", ")", ";", "Profiler", ".", "startSection", "(", "\"sensing\"", ")", ";", "field_48343_m", ".", "clearSensingCache", "(", ")", ";", "Profiler", ".", "endSection", "(", ")", ";", "Profiler", ".", "startSection", "(", "\"\"", ")", ";", "targetTasks", ".", "onUpdateTasks", "(", ")", ";", "Profiler", ".", "endSection", "(", ")", ";", "Profiler", ".", "startSection", "(", "\"goalSelector\"", ")", ";", "tasks", ".", "onUpdateTasks", "(", ")", ";", "Profiler", ".", "endSection", "(", ")", ";", "Profiler", ".", "startSection", "(", "\"navigation\"", ")", ";", "navigator", ".", "onUpdateNavigation", "(", ")", ";", "Profiler", ".", "endSection", "(", ")", ";", "Profiler", ".", "startSection", "(", "\"mob", "tick\"", ")", ";", "updateAITick", "(", ")", ";", "Profiler", ".", "endSection", "(", ")", ";", "Profiler", ".", "startSection", "(", "\"controls\"", ")", ";", "moveHelper", ".", "onUpdateMoveHelper", "(", ")", ";", "lookHelper", ".", "onUpdateLook", "(", ")", ";", "jumpHelper", ".", "doJump", "(", ")", ";", "Profiler", ".", "endSection", "(", ")", ";", "}", "protected", "void", "updateAITick", "(", ")", "{", "}", "protected", "void", "updateEntityActionState", "(", ")", "{", "entityAge", "++", ";", "despawnEntity", "(", ")", ";", "moveStrafing", "=", "0.0F", ";", "moveForward", "=", "0.0F", ";", "float", "f", "=", "8F", ";", "if", "(", "rand", ".", "nextFloat", "(", ")", "<", "0.02F", ")", "{", "EntityPlayer", "entityplayer", "=", "worldObj", ".", "getClosestPlayerToEntity", "(", "this", ",", "f", ")", ";", "if", "(", "entityplayer", "!=", "null", ")", "{", "currentTarget", "=", "entityplayer", ";", "numTicksToChaseTarget", "=", "10", "+", "rand", ".", "nextInt", "(", "20", ")", ";", "}", "else", "{", "randomYawVelocity", "=", "(", "rand", ".", "nextFloat", "(", ")", "-", "0.5F", ")", "*", "20F", ";", "}", "}", "if", "(", "currentTarget", "!=", "null", ")", "{", "faceEntity", "(", "currentTarget", ",", "10F", ",", "getVerticalFaceSpeed", "(", ")", ")", ";", "if", "(", "numTicksToChaseTarget", "--", "<=", "0", "||", "currentTarget", ".", "isDead", "||", "currentTarget", ".", "getDistanceSqToEntity", "(", "this", ")", ">", "(", "double", ")", "(", "f", "*", "f", ")", ")", "{", "currentTarget", "=", "null", ";", "}", "}", "else", "{", "if", "(", "rand", ".", "nextFloat", "(", ")", "<", "0.05F", ")", "{", "randomYawVelocity", "=", "(", "rand", ".", "nextFloat", "(", ")", "-", "0.5F", ")", "*", "20F", ";", "}", "rotationYaw", "+=", "randomYawVelocity", ";", "rotationPitch", "=", "defaultPitch", ";", "}", "boolean", "flag", "=", "isInWater", "(", ")", ";", "boolean", "flag1", "=", "handleLavaMovement", "(", ")", ";", "if", "(", "flag", "||", "flag1", ")", "{", "isJumping", "=", "rand", ".", "nextFloat", "(", ")", "<", "0.8F", ";", "}", "}", "public", "int", "getVerticalFaceSpeed", "(", ")", "{", "return", "40", ";", "}", "public", "void", "faceEntity", "(", "Entity", "par1Entity", ",", "float", "par2", ",", "float", "par3", ")", "{", "double", "d", "=", "par1Entity", ".", "posX", "-", "posX", ";", "double", "d2", "=", "par1Entity", ".", "posZ", "-", "posZ", ";", "double", "d1", ";", "if", "(", "par1Entity", "instanceof", "EntityLiving", ")", "{", "EntityLiving", "entityliving", "=", "(", "EntityLiving", ")", "par1Entity", ";", "d1", "=", "(", "posY", "+", "(", "double", ")", "getEyeHeight", "(", ")", ")", "-", "(", "entityliving", ".", "posY", "+", "(", "double", ")", "entityliving", ".", "getEyeHeight", "(", ")", ")", ";", "}", "else", "{", "d1", "=", "(", "par1Entity", ".", "boundingBox", ".", "minY", "+", "par1Entity", ".", "boundingBox", ".", "maxY", ")", "/", "2D", "-", "(", "posY", "+", "(", "double", ")", "getEyeHeight", "(", ")", ")", ";", "}", "double", "d3", "=", "MathHelper", ".", "sqrt_double", "(", "d", "*", "d", "+", "d2", "*", "d2", ")", ";", "float", "f", "=", "(", "float", ")", "(", "(", "Math", ".", "atan2", "(", "d2", ",", "d", ")", "*", "180D", ")", "/", "Math", ".", "PI", ")", "-", "90F", ";", "float", "f1", "=", "(", "float", ")", "(", "-", "(", "(", "Math", ".", "atan2", "(", "d1", ",", "d3", ")", "*", "180D", ")", "/", "Math", ".", "PI", ")", ")", ";", "rotationPitch", "=", "-", "updateRotation", "(", "rotationPitch", ",", "f1", ",", "par3", ")", ";", "rotationYaw", "=", "updateRotation", "(", "rotationYaw", ",", "f", ",", "par2", ")", ";", "}", "private", "float", "updateRotation", "(", "float", "par1", ",", "float", "par2", ",", "float", "par3", ")", "{", "float", "f", ";", "for", "(", "f", "=", "par2", "-", "par1", ";", "f", "<", "-", "180F", ";", "f", "+=", "360F", ")", "{", "}", "for", "(", ";", "f", ">=", "180F", ";", "f", "-=", "360F", ")", "{", "}", "if", "(", "f", ">", "par3", ")", "{", "f", "=", "par3", ";", "}", "if", "(", "f", "<", "-", "par3", ")", "{", "f", "=", "-", "par3", ";", "}", "return", "par1", "+", "f", ";", "}", "public", "void", "onEntityDeath", "(", ")", "{", "}", "public", "boolean", "getCanSpawnHere", "(", ")", "{", "return", "worldObj", ".", "checkIfAABBIsClear", "(", "boundingBox", ")", "&&", "worldObj", ".", "getCollidingBoundingBoxes", "(", "this", ",", "boundingBox", ")", ".", "size", "(", ")", "==", "0", "&&", "!", "worldObj", ".", "isAnyLiquid", "(", "boundingBox", ")", ";", "}", "protected", "void", "kill", "(", ")", "{", "attackEntityFrom", "(", "DamageSource", ".", "outOfWorld", ",", "4", ")", ";", "}", "public", "Vec3D", "getLookVec", "(", ")", "{", "return", "getLook", "(", "1.0F", ")", ";", "}", "public", "Vec3D", "getLook", "(", "float", "par1", ")", "{", "if", "(", "par1", "==", "1.0F", ")", "{", "float", "f", "=", "MathHelper", ".", "cos", "(", "-", "rotationYaw", "*", "0.01745329F", "-", "(", "float", ")", "Math", ".", "PI", ")", ";", "float", "f2", "=", "MathHelper", ".", "sin", "(", "-", "rotationYaw", "*", "0.01745329F", "-", "(", "float", ")", "Math", ".", "PI", ")", ";", "float", "f4", "=", "-", "MathHelper", ".", "cos", "(", "-", "rotationPitch", "*", "0.01745329F", ")", ";", "float", "f6", "=", "MathHelper", ".", "sin", "(", "-", "rotationPitch", "*", "0.01745329F", ")", ";", "return", "Vec3D", ".", "createVector", "(", "f2", "*", "f4", ",", "f6", ",", "f", "*", "f4", ")", ";", "}", "else", "{", "float", "f1", "=", "prevRotationPitch", "+", "(", "rotationPitch", "-", "prevRotationPitch", ")", "*", "par1", ";", "float", "f3", "=", "prevRotationYaw", "+", "(", "rotationYaw", "-", "prevRotationYaw", ")", "*", "par1", ";", "float", "f5", "=", "MathHelper", ".", "cos", "(", "-", "f3", "*", "0.01745329F", "-", "(", "float", ")", "Math", ".", "PI", ")", ";", "float", "f7", "=", "MathHelper", ".", "sin", "(", "-", "f3", "*", "0.01745329F", "-", "(", "float", ")", "Math", ".", "PI", ")", ";", "float", "f8", "=", "-", "MathHelper", ".", "cos", "(", "-", "f1", "*", "0.01745329F", ")", ";", "float", "f9", "=", "MathHelper", ".", "sin", "(", "-", "f1", "*", "0.01745329F", ")", ";", "return", "Vec3D", ".", "createVector", "(", "f7", "*", "f8", ",", "f9", ",", "f5", "*", "f8", ")", ";", "}", "}", "public", "int", "getMaxSpawnedInChunk", "(", ")", "{", "return", "4", ";", "}", "public", "boolean", "isPlayerSleeping", "(", ")", "{", "return", "false", ";", "}", "protected", "void", "updatePotionEffects", "(", ")", "{", "Iterator", "iterator", "=", "activePotionsMap", ".", "keySet", "(", ")", ".", "iterator", "(", ")", ";", "do", "{", "if", "(", "!", "iterator", ".", "hasNext", "(", ")", ")", "{", "break", ";", "}", "Integer", "integer", "=", "(", "Integer", ")", "iterator", ".", "next", "(", ")", ";", "PotionEffect", "potioneffect", "=", "(", "PotionEffect", ")", "activePotionsMap", ".", "get", "(", "integer", ")", ";", "if", "(", "!", "potioneffect", ".", "onUpdate", "(", "this", ")", "&&", "!", "worldObj", ".", "isRemote", ")", "{", "iterator", ".", "remove", "(", ")", ";", "onFinishedPotionEffect", "(", "potioneffect", ")", ";", "}", "}", "while", "(", "true", ")", ";", "if", "(", "potionsNeedUpdate", ")", "{", "if", "(", "!", "worldObj", ".", "isRemote", ")", "{", "if", "(", "!", "activePotionsMap", ".", "isEmpty", "(", ")", ")", "{", "int", "i", "=", "PotionHelper", ".", "func_40553_a", "(", "activePotionsMap", ".", "values", "(", ")", ")", ";", "dataWatcher", ".", "updateObject", "(", "8", ",", "Integer", ".", "valueOf", "(", "i", ")", ")", ";", "}", "else", "{", "dataWatcher", ".", "updateObject", "(", "8", ",", "Integer", ".", "valueOf", "(", "0", ")", ")", ";", "}", "}", "potionsNeedUpdate", "=", "false", ";", "}", "if", "(", "rand", ".", "nextBoolean", "(", ")", ")", "{", "int", "j", "=", "dataWatcher", ".", "getWatchableObjectInt", "(", "8", ")", ";", "if", "(", "j", ">", "0", ")", "{", "double", "d", "=", "(", "double", ")", "(", "j", ">>", "16", "&", "0xff", ")", "/", "255D", ";", "double", "d1", "=", "(", "double", ")", "(", "j", ">>", "8", "&", "0xff", ")", "/", "255D", ";", "double", "d2", "=", "(", "double", ")", "(", "j", ">>", "0", "&", "0xff", ")", "/", "255D", ";", "worldObj", ".", "spawnParticle", "(", "\"mobSpell\"", ",", "posX", "+", "(", "rand", ".", "nextDouble", "(", ")", "-", "0.5D", ")", "*", "(", "double", ")", "width", ",", "(", "posY", "+", "rand", ".", "nextDouble", "(", ")", "*", "(", "double", ")", "height", ")", "-", "(", "double", ")", "yOffset", ",", "posZ", "+", "(", "rand", ".", "nextDouble", "(", ")", "-", "0.5D", ")", "*", "(", "double", ")", "width", ",", "d", ",", "d1", ",", "d2", ")", ";", "}", "}", "}", "public", "void", "clearActivePotions", "(", ")", "{", "Iterator", "iterator", "=", "activePotionsMap", ".", "keySet", "(", ")", ".", "iterator", "(", ")", ";", "do", "{", "if", "(", "!", "iterator", ".", "hasNext", "(", ")", ")", "{", "break", ";", "}", "Integer", "integer", "=", "(", "Integer", ")", "iterator", ".", "next", "(", ")", ";", "PotionEffect", "potioneffect", "=", "(", "PotionEffect", ")", "activePotionsMap", ".", "get", "(", "integer", ")", ";", "if", "(", "!", "worldObj", ".", "isRemote", ")", "{", "iterator", ".", "remove", "(", ")", ";", "onFinishedPotionEffect", "(", "potioneffect", ")", ";", "}", "}", "while", "(", "true", ")", ";", "}", "public", "Collection", "getActivePotionEffects", "(", ")", "{", "return", "activePotionsMap", ".", "values", "(", ")", ";", "}", "public", "boolean", "isPotionActive", "(", "Potion", "par1Potion", ")", "{", "return", "activePotionsMap", ".", "containsKey", "(", "Integer", ".", "valueOf", "(", "par1Potion", ".", "id", ")", ")", ";", "}", "public", "PotionEffect", "getActivePotionEffect", "(", "Potion", "par1Potion", ")", "{", "return", "(", "PotionEffect", ")", "activePotionsMap", ".", "get", "(", "Integer", ".", "valueOf", "(", "par1Potion", ".", "id", ")", ")", ";", "}", "public", "void", "addPotionEffect", "(", "PotionEffect", "par1PotionEffect", ")", "{", "if", "(", "!", "isPotionApplicable", "(", "par1PotionEffect", ")", ")", "{", "return", ";", "}", "if", "(", "activePotionsMap", ".", "containsKey", "(", "Integer", ".", "valueOf", "(", "par1PotionEffect", ".", "getPotionID", "(", ")", ")", ")", ")", "{", "(", "(", "PotionEffect", ")", "activePotionsMap", ".", "get", "(", "Integer", ".", "valueOf", "(", "par1PotionEffect", ".", "getPotionID", "(", ")", ")", ")", ")", ".", "combine", "(", "par1PotionEffect", ")", ";", "onChangedPotionEffect", "(", "(", "PotionEffect", ")", "activePotionsMap", ".", "get", "(", "Integer", ".", "valueOf", "(", "par1PotionEffect", ".", "getPotionID", "(", ")", ")", ")", ")", ";", "}", "else", "{", "activePotionsMap", ".", "put", "(", "Integer", ".", "valueOf", "(", "par1PotionEffect", ".", "getPotionID", "(", ")", ")", ",", "par1PotionEffect", ")", ";", "onNewPotionEffect", "(", "par1PotionEffect", ")", ";", "}", "}", "public", "boolean", "isPotionApplicable", "(", "PotionEffect", "par1PotionEffect", ")", "{", "if", "(", "getCreatureAttribute", "(", ")", "==", "EnumCreatureAttribute", ".", "UNDEAD", ")", "{", "int", "i", "=", "par1PotionEffect", ".", "getPotionID", "(", ")", ";", "if", "(", "i", "==", "Potion", ".", "regeneration", ".", "id", "||", "i", "==", "Potion", ".", "poison", ".", "id", ")", "{", "return", "false", ";", "}", "}", "return", "true", ";", "}", "public", "boolean", "isEntityUndead", "(", ")", "{", "return", "getCreatureAttribute", "(", ")", "==", "EnumCreatureAttribute", ".", "UNDEAD", ";", "}", "protected", "void", "onNewPotionEffect", "(", "PotionEffect", "par1PotionEffect", ")", "{", "potionsNeedUpdate", "=", "true", ";", "}", "protected", "void", "onChangedPotionEffect", "(", "PotionEffect", "par1PotionEffect", ")", "{", "potionsNeedUpdate", "=", "true", ";", "}", "protected", "void", "onFinishedPotionEffect", "(", "PotionEffect", "par1PotionEffect", ")", "{", "potionsNeedUpdate", "=", "true", ";", "}", "protected", "float", "getSpeedModifier", "(", ")", "{", "float", "f", "=", "1.0F", ";", "if", "(", "isPotionActive", "(", "Potion", ".", "moveSpeed", ")", ")", "{", "f", "*=", "1.0F", "+", "0.2F", "*", "(", "float", ")", "(", "getActivePotionEffect", "(", "Potion", ".", "moveSpeed", ")", ".", "getAmplifier", "(", ")", "+", "1", ")", ";", "}", "if", "(", "isPotionActive", "(", "Potion", ".", "moveSlowdown", ")", ")", "{", "f", "*=", "1.0F", "-", "0.15F", "*", "(", "float", ")", "(", "getActivePotionEffect", "(", "Potion", ".", "moveSlowdown", ")", ".", "getAmplifier", "(", ")", "+", "1", ")", ";", "}", "return", "f", ";", "}", "public", "void", "setPositionAndUpdate", "(", "double", "par1", ",", "double", "par3", ",", "double", "par5", ")", "{", "setLocationAndAngles", "(", "par1", ",", "par3", ",", "par5", ",", "rotationYaw", ",", "rotationPitch", ")", ";", "}", "public", "boolean", "isChild", "(", ")", "{", "return", "false", ";", "}", "public", "EnumCreatureAttribute", "getCreatureAttribute", "(", ")", "{", "return", "EnumCreatureAttribute", ".", "UNDEFINED", ";", "}", "public", "void", "renderBrokenItemStack", "(", "ItemStack", "par1ItemStack", ")", "{", "worldObj", ".", "playSoundAtEntity", "(", "this", ",", "\"random.break\"", ",", "0.8F", ",", "0.8F", "+", "worldObj", ".", "rand", ".", "nextFloat", "(", ")", "*", "0.4F", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "5", ";", "i", "++", ")", "{", "Vec3D", "vec3d", "=", "Vec3D", ".", "createVector", "(", "(", "(", "double", ")", "rand", ".", "nextFloat", "(", ")", "-", "0.5D", ")", "*", "0.10000000000000001D", ",", "Math", ".", "random", "(", ")", "*", "0.10000000000000001D", "+", "0.10000000000000001D", ",", "0.0D", ")", ";", "vec3d", ".", "rotateAroundX", "(", "(", "-", "rotationPitch", "*", "(", "float", ")", "Math", ".", "PI", ")", "/", "180F", ")", ";", "vec3d", ".", "rotateAroundY", "(", "(", "-", "rotationYaw", "*", "(", "float", ")", "Math", ".", "PI", ")", "/", "180F", ")", ";", "Vec3D", "vec3d1", "=", "Vec3D", ".", "createVector", "(", "(", "(", "double", ")", "rand", ".", "nextFloat", "(", ")", "-", "0.5D", ")", "*", "0.29999999999999999D", ",", "(", "double", ")", "(", "-", "rand", ".", "nextFloat", "(", ")", ")", "*", "0.59999999999999998D", "-", "0.29999999999999999D", ",", "0.59999999999999998D", ")", ";", "vec3d1", ".", "rotateAroundX", "(", "(", "-", "rotationPitch", "*", "(", "float", ")", "Math", ".", "PI", ")", "/", "180F", ")", ";", "vec3d1", ".", "rotateAroundY", "(", "(", "-", "rotationYaw", "*", "(", "float", ")", "Math", ".", "PI", ")", "/", "180F", ")", ";", "vec3d1", "=", "vec3d1", ".", "addVector", "(", "posX", ",", "posY", "+", "(", "double", ")", "getEyeHeight", "(", ")", ",", "posZ", ")", ";", "worldObj", ".", "spawnParticle", "(", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "\"iconcrack_\"", ")", ".", "append", "(", "par1ItemStack", ".", "getItem", "(", ")", ".", "shiftedIndex", ")", ".", "toString", "(", ")", ",", "vec3d1", ".", "xCoord", ",", "vec3d1", ".", "yCoord", ",", "vec3d1", ".", "zCoord", ",", "vec3d", ".", "xCoord", ",", "vec3d", ".", "yCoord", "+", "0.050000000000000003D", ",", "vec3d", ".", "zCoord", ")", ";", "}", "}", "}", "</s>" ]
9,784
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "Random", ";", "public", "class", "BlockSand", "extends", "Block", "{", "public", "static", "boolean", "fallInstantly", "=", "false", ";", "public", "BlockSand", "(", "int", "par1", ",", "int", "par2", ")", "{", "super", "(", "par1", ",", "par2", ",", "Material", ".", "sand", ")", ";", "}", "public", "void", "onBlockAdded", "(", "World", "par1World", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ")", "{", "par1World", ".", "scheduleBlockUpdate", "(", "par2", ",", "par3", ",", "par4", ",", "blockID", ",", "tickRate", "(", ")", ")", ";", "}", "public", "void", "onNeighborBlockChange", "(", "World", "par1World", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "int", "par5", ")", "{", "par1World", ".", "scheduleBlockUpdate", "(", "par2", ",", "par3", ",", "par4", ",", "blockID", ",", "tickRate", "(", ")", ")", ";", "}", "public", "void", "updateTick", "(", "World", "par1World", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "Random", "par5Random", ")", "{", "tryToFall", "(", "par1World", ",", "par2", ",", "par3", ",", "par4", ")", ";", "}", "private", "void", "tryToFall", "(", "World", "par1World", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ")", "{", "int", "i", "=", "par2", ";", "int", "j", "=", "par3", ";", "int", "k", "=", "par4", ";", "if", "(", "canFallBelow", "(", "par1World", ",", "i", ",", "j", "-", "1", ",", "k", ")", "&&", "j", ">=", "0", ")", "{", "byte", "byte0", "=", "32", ";", "if", "(", "fallInstantly", "||", "!", "par1World", ".", "checkChunksExist", "(", "par2", "-", "byte0", ",", "par3", "-", "byte0", ",", "par4", "-", "byte0", ",", "par2", "+", "byte0", ",", "par3", "+", "byte0", ",", "par4", "+", "byte0", ")", ")", "{", "par1World", ".", "setBlockWithNotify", "(", "par2", ",", "par3", ",", "par4", ",", "0", ")", ";", "for", "(", ";", "canFallBelow", "(", "par1World", ",", "par2", ",", "par3", "-", "1", ",", "par4", ")", "&&", "par3", ">", "0", ";", "par3", "--", ")", "{", "}", "if", "(", "par3", ">", "0", ")", "{", "par1World", ".", "setBlockWithNotify", "(", "par2", ",", "par3", ",", "par4", ",", "blockID", ")", ";", "}", "}", "else", "if", "(", "!", "par1World", ".", "isRemote", ")", "{", "EntityFallingSand", "entityfallingsand", "=", "new", "EntityFallingSand", "(", "par1World", ",", "(", "float", ")", "par2", "+", "0.5F", ",", "(", "float", ")", "par3", "+", "0.5F", ",", "(", "float", ")", "par4", "+", "0.5F", ",", "blockID", ")", ";", "par1World", ".", "spawnEntityInWorld", "(", "entityfallingsand", ")", ";", "}", "}", "}", "public", "int", "tickRate", "(", ")", "{", "return", "3", ";", "}", "public", "static", "boolean", "canFallBelow", "(", "World", "par0World", ",", "int", "par1", ",", "int", "par2", ",", "int", "par3", ")", "{", "int", "i", "=", "par0World", ".", "getBlockId", "(", "par1", ",", "par2", ",", "par3", ")", ";", "if", "(", "i", "==", "0", ")", "{", "return", "true", ";", "}", "if", "(", "i", "==", "Block", ".", "fire", ".", "blockID", ")", "{", "return", "true", ";", "}", "Material", "material", "=", "Block", ".", "blocksList", "[", "i", "]", ".", "blockMaterial", ";", "if", "(", "material", "==", "Material", ".", "water", ")", "{", "return", "true", ";", "}", "return", "material", "==", "Material", ".", "lava", ";", "}", "}", "</s>" ]
9,785
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "io", ".", "*", ";", "public", "class", "NBTTagInt", "extends", "NBTBase", "{", "public", "int", "data", ";", "public", "NBTTagInt", "(", "String", "par1Str", ")", "{", "super", "(", "par1Str", ")", ";", "}", "public", "NBTTagInt", "(", "String", "par1Str", ",", "int", "par2", ")", "{", "super", "(", "par1Str", ")", ";", "data", "=", "par2", ";", "}", "void", "write", "(", "DataOutput", "par1DataOutput", ")", "throws", "IOException", "{", "par1DataOutput", ".", "writeInt", "(", "data", ")", ";", "}", "void", "load", "(", "DataInput", "par1DataInput", ")", "throws", "IOException", "{", "data", "=", "par1DataInput", ".", "readInt", "(", ")", ";", "}", "public", "byte", "getId", "(", ")", "{", "return", "3", ";", "}", "public", "String", "toString", "(", ")", "{", "return", "(", "new", "StringBuilder", "(", ")", ")", ".", "append", "(", "\"\"", ")", ".", "append", "(", "data", ")", ".", "toString", "(", ")", ";", "}", "public", "NBTBase", "copy", "(", ")", "{", "return", "new", "NBTTagInt", "(", "getName", "(", ")", ",", "data", ")", ";", "}", "public", "boolean", "equals", "(", "Object", "par1Obj", ")", "{", "if", "(", "super", ".", "equals", "(", "par1Obj", ")", ")", "{", "NBTTagInt", "nbttagint", "=", "(", "NBTTagInt", ")", "par1Obj", ";", "return", "data", "==", "nbttagint", ".", "data", ";", "}", "else", "{", "return", "false", ";", "}", "}", "public", "int", "hashCode", "(", ")", "{", "return", "super", ".", "hashCode", "(", ")", "^", "data", ";", "}", "}", "</s>" ]
9,786
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "public", "class", "Direction", "{", "public", "static", "final", "int", "offsetX", "[", "]", "=", "{", "0", ",", "-", "1", ",", "0", ",", "1", "}", ";", "public", "static", "final", "int", "offsetZ", "[", "]", "=", "{", "1", ",", "0", ",", "-", "1", ",", "0", "}", ";", "public", "static", "final", "int", "headInvisibleFace", "[", "]", "=", "{", "3", ",", "4", ",", "2", ",", "5", "}", ";", "public", "static", "final", "int", "vineGrowth", "[", "]", "=", "{", "-", "1", ",", "-", "1", ",", "2", ",", "0", ",", "1", ",", "3", "}", ";", "public", "static", "final", "int", "footInvisibleFaceRemap", "[", "]", "=", "{", "2", ",", "3", ",", "0", ",", "1", "}", ";", "public", "static", "final", "int", "enderEyeMetaToDirection", "[", "]", "=", "{", "1", ",", "2", ",", "3", ",", "0", "}", ";", "public", "static", "final", "int", "field_35608_g", "[", "]", "=", "{", "3", ",", "0", ",", "1", ",", "2", "}", ";", "public", "static", "final", "int", "bedDirection", "[", "]", "[", "]", "=", "{", "{", "1", ",", "0", ",", "3", ",", "2", ",", "5", ",", "4", "}", ",", "{", "1", ",", "0", ",", "5", ",", "4", ",", "2", ",", "3", "}", ",", "{", "1", ",", "0", ",", "2", ",", "3", ",", "4", ",", "5", "}", ",", "{", "1", ",", "0", ",", "4", ",", "5", ",", "3", ",", "2", "}", "}", ";", "public", "Direction", "(", ")", "{", "}", "}", "</s>" ]
9,787
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "io", ".", "*", ";", "public", "class", "Packet105UpdateProgressbar", "extends", "Packet", "{", "public", "int", "windowId", ";", "public", "int", "progressBar", ";", "public", "int", "progressBarValue", ";", "public", "Packet105UpdateProgressbar", "(", ")", "{", "}", "public", "Packet105UpdateProgressbar", "(", "int", "par1", ",", "int", "par2", ",", "int", "par3", ")", "{", "windowId", "=", "par1", ";", "progressBar", "=", "par2", ";", "progressBarValue", "=", "par3", ";", "}", "public", "void", "processPacket", "(", "NetHandler", "par1NetHandler", ")", "{", "par1NetHandler", ".", "handleUpdateProgressbar", "(", "this", ")", ";", "}", "public", "void", "readPacketData", "(", "DataInputStream", "par1DataInputStream", ")", "throws", "IOException", "{", "windowId", "=", "par1DataInputStream", ".", "readByte", "(", ")", ";", "progressBar", "=", "par1DataInputStream", ".", "readShort", "(", ")", ";", "progressBarValue", "=", "par1DataInputStream", ".", "readShort", "(", ")", ";", "}", "public", "void", "writePacketData", "(", "DataOutputStream", "par1DataOutputStream", ")", "throws", "IOException", "{", "par1DataOutputStream", ".", "writeByte", "(", "windowId", ")", ";", "par1DataOutputStream", ".", "writeShort", "(", "progressBar", ")", ";", "par1DataOutputStream", ".", "writeShort", "(", "progressBarValue", ")", ";", "}", "public", "int", "getPacketSize", "(", ")", "{", "return", "5", ";", "}", "}", "</s>" ]
9,788
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "io", ".", "IOException", ";", "import", "java", ".", "util", ".", "*", ";", "public", "class", "ChunkProvider", "implements", "IChunkProvider", "{", "private", "Set", "droppedChunksSet", ";", "private", "Chunk", "emptyChunk", ";", "private", "IChunkProvider", "chunkProvider", ";", "private", "IChunkLoader", "chunkLoader", ";", "private", "LongHashMap", "chunkMap", ";", "private", "List", "chunkList", ";", "private", "World", "worldObj", ";", "private", "int", "field_35557_h", ";", "public", "ChunkProvider", "(", "World", "par1World", ",", "IChunkLoader", "par2IChunkLoader", ",", "IChunkProvider", "par3IChunkProvider", ")", "{", "droppedChunksSet", "=", "new", "HashSet", "(", ")", ";", "chunkMap", "=", "new", "LongHashMap", "(", ")", ";", "chunkList", "=", "new", "ArrayList", "(", ")", ";", "emptyChunk", "=", "new", "EmptyChunk", "(", "par1World", ",", "0", ",", "0", ")", ";", "worldObj", "=", "par1World", ";", "chunkLoader", "=", "par2IChunkLoader", ";", "chunkProvider", "=", "par3IChunkProvider", ";", "}", "public", "boolean", "chunkExists", "(", "int", "par1", ",", "int", "par2", ")", "{", "return", "chunkMap", ".", "containsItem", "(", "ChunkCoordIntPair", ".", "chunkXZ2Int", "(", "par1", ",", "par2", ")", ")", ";", "}", "public", "void", "dropChunk", "(", "int", "par1", ",", "int", "par2", ")", "{", "ChunkCoordinates", "chunkcoordinates", "=", "worldObj", ".", "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", ")", ")", ")", ";", "}", "}", "public", "Chunk", "loadChunk", "(", "int", "par1", ",", "int", "par2", ")", "{", "long", "l", "=", "ChunkCoordIntPair", ".", "chunkXZ2Int", "(", "par1", ",", "par2", ")", ";", "droppedChunksSet", ".", "remove", "(", "Long", ".", "valueOf", "(", "l", ")", ")", ";", "Chunk", "chunk", "=", "(", "Chunk", ")", "chunkMap", ".", "getValueByKey", "(", "l", ")", ";", "if", "(", "chunk", "==", "null", ")", "{", "int", "i", "=", "0x1c9c3c", ";", "if", "(", "par1", "<", "-", "i", "||", "par2", "<", "-", "i", "||", "par1", ">=", "i", "||", "par2", ">=", "i", ")", "{", "return", "emptyChunk", ";", "}", "chunk", "=", "loadChunkFromFile", "(", "par1", ",", "par2", ")", ";", "if", "(", "chunk", "==", "null", ")", "{", "if", "(", "chunkProvider", "==", "null", ")", "{", "chunk", "=", "emptyChunk", ";", "}", "else", "{", "chunk", "=", "chunkProvider", ".", "provideChunk", "(", "par1", ",", "par2", ")", ";", "}", "}", "chunkMap", ".", "add", "(", "l", ",", "chunk", ")", ";", "chunkList", ".", "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", ")", "chunkMap", ".", "getValueByKey", "(", "ChunkCoordIntPair", ".", "chunkXZ2Int", "(", "par1", ",", "par2", ")", ")", ";", "if", "(", "chunk", "==", "null", ")", "{", "return", "loadChunk", "(", "par1", ",", "par2", ")", ";", "}", "else", "{", "return", "chunk", ";", "}", "}", "private", "Chunk", "loadChunkFromFile", "(", "int", "par1", ",", "int", "par2", ")", "{", "if", "(", "chunkLoader", "==", "null", ")", "{", "return", "null", ";", "}", "try", "{", "Chunk", "chunk", "=", "chunkLoader", ".", "loadChunk", "(", "worldObj", ",", "par1", ",", "par2", ")", ";", "if", "(", "chunk", "!=", "null", ")", "{", "chunk", ".", "lastSaveTime", "=", "worldObj", ".", "getWorldTime", "(", ")", ";", "}", "return", "chunk", ";", "}", "catch", "(", "Exception", "exception", ")", "{", "exception", ".", "printStackTrace", "(", ")", ";", "}", "return", "null", ";", "}", "private", "void", "saveChunkExtraData", "(", "Chunk", "par1Chunk", ")", "{", "if", "(", "chunkLoader", "==", "null", ")", "{", "return", ";", "}", "try", "{", "chunkLoader", ".", "saveExtraChunkData", "(", "worldObj", ",", "par1Chunk", ")", ";", "}", "catch", "(", "Exception", "exception", ")", "{", "exception", ".", "printStackTrace", "(", ")", ";", "}", "}", "private", "void", "saveChunkData", "(", "Chunk", "par1Chunk", ")", "{", "if", "(", "chunkLoader", "==", "null", ")", "{", "return", ";", "}", "try", "{", "par1Chunk", ".", "lastSaveTime", "=", "worldObj", ".", "getWorldTime", "(", ")", ";", "chunkLoader", ".", "saveChunk", "(", "worldObj", ",", "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", "(", "chunkProvider", "!=", "null", ")", "{", "chunkProvider", ".", "populate", "(", "par1IChunkProvider", ",", "par2", ",", "par3", ")", ";", "chunk", ".", "setChunkModified", "(", ")", ";", "}", "}", "}", "public", "boolean", "saveChunks", "(", "boolean", "par1", ",", "IProgressUpdate", "par2IProgressUpdate", ")", "{", "int", "i", "=", "0", ";", "for", "(", "int", "j", "=", "0", ";", "j", "<", "chunkList", ".", "size", "(", ")", ";", "j", "++", ")", "{", "Chunk", "chunk", "=", "(", "Chunk", ")", "chunkList", ".", "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", "(", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "100", ";", "i", "++", ")", "{", "if", "(", "!", "droppedChunksSet", ".", "isEmpty", "(", ")", ")", "{", "Long", "long1", "=", "(", "Long", ")", "droppedChunksSet", ".", "iterator", "(", ")", ".", "next", "(", ")", ";", "Chunk", "chunk1", "=", "(", "Chunk", ")", "chunkMap", ".", "getValueByKey", "(", "long1", ".", "longValue", "(", ")", ")", ";", "chunk1", ".", "onChunkUnload", "(", ")", ";", "saveChunkData", "(", "chunk1", ")", ";", "saveChunkExtraData", "(", "chunk1", ")", ";", "droppedChunksSet", ".", "remove", "(", "long1", ")", ";", "chunkMap", ".", "remove", "(", "long1", ".", "longValue", "(", ")", ")", ";", "chunkList", ".", "remove", "(", "chunk1", ")", ";", "}", "}", "for", "(", "int", "j", "=", "0", ";", "j", "<", "10", ";", "j", "++", ")", "{", "if", "(", "field_35557_h", ">=", "chunkList", ".", "size", "(", ")", ")", "{", "field_35557_h", "=", "0", ";", "break", ";", "}", "Chunk", "chunk", "=", "(", "Chunk", ")", "chunkList", ".", "get", "(", "field_35557_h", "++", ")", ";", "EntityPlayer", "entityplayer", "=", "worldObj", ".", "func_48087_a", "(", "(", "double", ")", "(", "chunk", ".", "xPosition", "<<", "4", ")", "+", "8D", ",", "(", "double", ")", "(", "chunk", ".", "zPosition", "<<", "4", ")", "+", "8D", ",", "288D", ")", ";", "if", "(", "entityplayer", "==", "null", ")", "{", "dropChunk", "(", "chunk", ".", "xPosition", ",", "chunk", ".", "zPosition", ")", ";", "}", "}", "if", "(", "chunkLoader", "!=", "null", ")", "{", "chunkLoader", ".", "chunkTick", "(", ")", ";", "}", "return", "chunkProvider", ".", "unload100OldestChunks", "(", ")", ";", "}", "public", "boolean", "canSave", "(", ")", "{", "return", "true", ";", "}", "public", "List", "getPossibleCreatures", "(", "EnumCreatureType", "par1EnumCreatureType", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ")", "{", "return", "chunkProvider", ".", "getPossibleCreatures", "(", "par1EnumCreatureType", ",", "par2", ",", "par3", ",", "par4", ")", ";", "}", "public", "ChunkPosition", "findClosestStructure", "(", "World", "par1World", ",", "String", "par2Str", ",", "int", "par3", ",", "int", "par4", ",", "int", "par5", ")", "{", "return", "chunkProvider", ".", "findClosestStructure", "(", "par1World", ",", "par2Str", ",", "par3", ",", "par4", ",", "par5", ")", ";", "}", "}", "</s>" ]
9,789
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "io", ".", "File", ";", "import", "java", ".", "io", ".", "FilenameFilter", ";", "class", "AnvilSaveConverterFileFilter", "implements", "FilenameFilter", "{", "final", "AnvilSaveConverter", "parent", ";", "AnvilSaveConverterFileFilter", "(", "AnvilSaveConverter", "par1AnvilSaveConverter", ")", "{", "parent", "=", "par1AnvilSaveConverter", ";", "}", "public", "boolean", "accept", "(", "File", "par1File", ",", "String", "par2Str", ")", "{", "return", "par2Str", ".", "endsWith", "(", "\".mcr\"", ")", ";", "}", "}", "</s>" ]
9,790
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "public", "abstract", "class", "EntityAgeable", "extends", "EntityCreature", "{", "public", "EntityAgeable", "(", "World", "par1World", ")", "{", "super", "(", "par1World", ")", ";", "}", "protected", "void", "entityInit", "(", ")", "{", "super", ".", "entityInit", "(", ")", ";", "dataWatcher", ".", "addObject", "(", "12", ",", "new", "Integer", "(", "0", ")", ")", ";", "}", "public", "int", "getGrowingAge", "(", ")", "{", "return", "dataWatcher", ".", "getWatchableObjectInt", "(", "12", ")", ";", "}", "public", "void", "setGrowingAge", "(", "int", "par1", ")", "{", "dataWatcher", ".", "updateObject", "(", "12", ",", "Integer", ".", "valueOf", "(", "par1", ")", ")", ";", "}", "public", "void", "writeEntityToNBT", "(", "NBTTagCompound", "par1NBTTagCompound", ")", "{", "super", ".", "writeEntityToNBT", "(", "par1NBTTagCompound", ")", ";", "par1NBTTagCompound", ".", "setInteger", "(", "\"Age\"", ",", "getGrowingAge", "(", ")", ")", ";", "}", "public", "void", "readEntityFromNBT", "(", "NBTTagCompound", "par1NBTTagCompound", ")", "{", "super", ".", "readEntityFromNBT", "(", "par1NBTTagCompound", ")", ";", "setGrowingAge", "(", "par1NBTTagCompound", ".", "getInteger", "(", "\"Age\"", ")", ")", ";", "}", "public", "void", "onLivingUpdate", "(", ")", "{", "super", ".", "onLivingUpdate", "(", ")", ";", "int", "i", "=", "getGrowingAge", "(", ")", ";", "if", "(", "i", "<", "0", ")", "{", "i", "++", ";", "setGrowingAge", "(", "i", ")", ";", "}", "else", "if", "(", "i", ">", "0", ")", "{", "i", "--", ";", "setGrowingAge", "(", "i", ")", ";", "}", "}", "public", "boolean", "isChild", "(", ")", "{", "return", "getGrowingAge", "(", ")", "<", "0", ";", "}", "}", "</s>" ]
9,791
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "*", ";", "public", "class", "BlockBed", "extends", "BlockDirectional", "{", "public", "static", "final", "int", "headBlockToFootBlockMap", "[", "]", "[", "]", "=", "{", "{", "0", ",", "1", "}", ",", "{", "-", "1", ",", "0", "}", ",", "{", "0", ",", "-", "1", "}", ",", "{", "1", ",", "0", "}", "}", ";", "public", "BlockBed", "(", "int", "par1", ")", "{", "super", "(", "par1", ",", "134", ",", "Material", ".", "cloth", ")", ";", "setBounds", "(", ")", ";", "}", "public", "boolean", "blockActivated", "(", "World", "par1World", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "EntityPlayer", "par5EntityPlayer", ")", "{", "if", "(", "par1World", ".", "isRemote", ")", "{", "return", "true", ";", "}", "int", "i", "=", "par1World", ".", "getBlockMetadata", "(", "par2", ",", "par3", ",", "par4", ")", ";", "if", "(", "!", "isBlockFootOfBed", "(", "i", ")", ")", "{", "int", "j", "=", "getDirection", "(", "i", ")", ";", "par2", "+=", "headBlockToFootBlockMap", "[", "j", "]", "[", "0", "]", ";", "par4", "+=", "headBlockToFootBlockMap", "[", "j", "]", "[", "1", "]", ";", "if", "(", "par1World", ".", "getBlockId", "(", "par2", ",", "par3", ",", "par4", ")", "!=", "blockID", ")", "{", "return", "true", ";", "}", "i", "=", "par1World", ".", "getBlockMetadata", "(", "par2", ",", "par3", ",", "par4", ")", ";", "}", "if", "(", "!", "par1World", ".", "worldProvider", ".", "canRespawnHere", "(", ")", ")", "{", "double", "d", "=", "(", "double", ")", "par2", "+", "0.5D", ";", "double", "d1", "=", "(", "double", ")", "par3", "+", "0.5D", ";", "double", "d2", "=", "(", "double", ")", "par4", "+", "0.5D", ";", "par1World", ".", "setBlockWithNotify", "(", "par2", ",", "par3", ",", "par4", ",", "0", ")", ";", "int", "k", "=", "getDirection", "(", "i", ")", ";", "par2", "+=", "headBlockToFootBlockMap", "[", "k", "]", "[", "0", "]", ";", "par4", "+=", "headBlockToFootBlockMap", "[", "k", "]", "[", "1", "]", ";", "if", "(", "par1World", ".", "getBlockId", "(", "par2", ",", "par3", ",", "par4", ")", "==", "blockID", ")", "{", "par1World", ".", "setBlockWithNotify", "(", "par2", ",", "par3", ",", "par4", ",", "0", ")", ";", "d", "=", "(", "d", "+", "(", "double", ")", "par2", "+", "0.5D", ")", "/", "2D", ";", "d1", "=", "(", "d1", "+", "(", "double", ")", "par3", "+", "0.5D", ")", "/", "2D", ";", "d2", "=", "(", "d2", "+", "(", "double", ")", "par4", "+", "0.5D", ")", "/", "2D", ";", "}", "par1World", ".", "newExplosion", "(", "null", ",", "(", "float", ")", "par2", "+", "0.5F", ",", "(", "float", ")", "par3", "+", "0.5F", ",", "(", "float", ")", "par4", "+", "0.5F", ",", "5F", ",", "true", ")", ";", "return", "true", ";", "}", "if", "(", "isBedOccupied", "(", "i", ")", ")", "{", "EntityPlayer", "entityplayer", "=", "null", ";", "Iterator", "iterator", "=", "par1World", ".", "playerEntities", ".", "iterator", "(", ")", ";", "do", "{", "if", "(", "!", "iterator", ".", "hasNext", "(", ")", ")", "{", "break", ";", "}", "EntityPlayer", "entityplayer1", "=", "(", "EntityPlayer", ")", "iterator", ".", "next", "(", ")", ";", "if", "(", "entityplayer1", ".", "isPlayerSleeping", "(", ")", ")", "{", "ChunkCoordinates", "chunkcoordinates", "=", "entityplayer1", ".", "playerLocation", ";", "if", "(", "chunkcoordinates", ".", "posX", "==", "par2", "&&", "chunkcoordinates", ".", "posY", "==", "par3", "&&", "chunkcoordinates", ".", "posZ", "==", "par4", ")", "{", "entityplayer", "=", "entityplayer1", ";", "}", "}", "}", "while", "(", "true", ")", ";", "if", "(", "entityplayer", "==", "null", ")", "{", "setBedOccupied", "(", "par1World", ",", "par2", ",", "par3", ",", "par4", ",", "false", ")", ";", "}", "else", "{", "par5EntityPlayer", ".", "addChatMessage", "(", "\"\"", ")", ";", "return", "true", ";", "}", "}", "EnumStatus", "enumstatus", "=", "par5EntityPlayer", ".", "sleepInBedAt", "(", "par2", ",", "par3", ",", "par4", ")", ";", "if", "(", "enumstatus", "==", "EnumStatus", ".", "OK", ")", "{", "setBedOccupied", "(", "par1World", ",", "par2", ",", "par3", ",", "par4", ",", "true", ")", ";", "return", "true", ";", "}", "if", "(", "enumstatus", "==", "EnumStatus", ".", "NOT_POSSIBLE_NOW", ")", "{", "par5EntityPlayer", ".", "addChatMessage", "(", "\"\"", ")", ";", "}", "else", "if", "(", "enumstatus", "==", "EnumStatus", ".", "NOT_SAFE", ")", "{", "par5EntityPlayer", ".", "addChatMessage", "(", "\"\"", ")", ";", "}", "return", "true", ";", "}", "public", "int", "getBlockTextureFromSideAndMetadata", "(", "int", "par1", ",", "int", "par2", ")", "{", "if", "(", "par1", "==", "0", ")", "{", "return", "Block", ".", "planks", ".", "blockIndexInTexture", ";", "}", "int", "i", "=", "getDirection", "(", "par2", ")", ";", "int", "j", "=", "Direction", ".", "bedDirection", "[", "i", "]", "[", "par1", "]", ";", "if", "(", "isBlockFootOfBed", "(", "par2", ")", ")", "{", "if", "(", "j", "==", "2", ")", "{", "return", "blockIndexInTexture", "+", "2", "+", "16", ";", "}", "if", "(", "j", "==", "5", "||", "j", "==", "4", ")", "{", "return", "blockIndexInTexture", "+", "1", "+", "16", ";", "}", "else", "{", "return", "blockIndexInTexture", "+", "1", ";", "}", "}", "if", "(", "j", "==", "3", ")", "{", "return", "(", "blockIndexInTexture", "-", "1", ")", "+", "16", ";", "}", "if", "(", "j", "==", "5", "||", "j", "==", "4", ")", "{", "return", "blockIndexInTexture", "+", "16", ";", "}", "else", "{", "return", "blockIndexInTexture", ";", "}", "}", "public", "int", "getRenderType", "(", ")", "{", "return", "14", ";", "}", "public", "boolean", "renderAsNormalBlock", "(", ")", "{", "return", "false", ";", "}", "public", "boolean", "isOpaqueCube", "(", ")", "{", "return", "false", ";", "}", "public", "void", "setBlockBoundsBasedOnState", "(", "IBlockAccess", "par1IBlockAccess", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ")", "{", "setBounds", "(", ")", ";", "}", "public", "void", "onNeighborBlockChange", "(", "World", "par1World", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "int", "par5", ")", "{", "int", "i", "=", "par1World", ".", "getBlockMetadata", "(", "par2", ",", "par3", ",", "par4", ")", ";", "int", "j", "=", "getDirection", "(", "i", ")", ";", "if", "(", "isBlockFootOfBed", "(", "i", ")", ")", "{", "if", "(", "par1World", ".", "getBlockId", "(", "par2", "-", "headBlockToFootBlockMap", "[", "j", "]", "[", "0", "]", ",", "par3", ",", "par4", "-", "headBlockToFootBlockMap", "[", "j", "]", "[", "1", "]", ")", "!=", "blockID", ")", "{", "par1World", ".", "setBlockWithNotify", "(", "par2", ",", "par3", ",", "par4", ",", "0", ")", ";", "}", "}", "else", "if", "(", "par1World", ".", "getBlockId", "(", "par2", "+", "headBlockToFootBlockMap", "[", "j", "]", "[", "0", "]", ",", "par3", ",", "par4", "+", "headBlockToFootBlockMap", "[", "j", "]", "[", "1", "]", ")", "!=", "blockID", ")", "{", "par1World", ".", "setBlockWithNotify", "(", "par2", ",", "par3", ",", "par4", ",", "0", ")", ";", "if", "(", "!", "par1World", ".", "isRemote", ")", "{", "dropBlockAsItem", "(", "par1World", ",", "par2", ",", "par3", ",", "par4", ",", "i", ",", "0", ")", ";", "}", "}", "}", "public", "int", "idDropped", "(", "int", "par1", ",", "Random", "par2Random", ",", "int", "par3", ")", "{", "if", "(", "isBlockFootOfBed", "(", "par1", ")", ")", "{", "return", "0", ";", "}", "else", "{", "return", "Item", ".", "bed", ".", "shiftedIndex", ";", "}", "}", "private", "void", "setBounds", "(", ")", "{", "setBlockBounds", "(", "0.0F", ",", "0.0F", ",", "0.0F", ",", "1.0F", ",", "0.5625F", ",", "1.0F", ")", ";", "}", "public", "static", "boolean", "isBlockFootOfBed", "(", "int", "par0", ")", "{", "return", "(", "par0", "&", "8", ")", "!=", "0", ";", "}", "public", "static", "boolean", "isBedOccupied", "(", "int", "par0", ")", "{", "return", "(", "par0", "&", "4", ")", "!=", "0", ";", "}", "public", "static", "void", "setBedOccupied", "(", "World", "par0World", ",", "int", "par1", ",", "int", "par2", ",", "int", "par3", ",", "boolean", "par4", ")", "{", "int", "i", "=", "par0World", ".", "getBlockMetadata", "(", "par1", ",", "par2", ",", "par3", ")", ";", "if", "(", "par4", ")", "{", "i", "|=", "4", ";", "}", "else", "{", "i", "&=", "-", "5", ";", "}", "par0World", ".", "setBlockMetadataWithNotify", "(", "par1", ",", "par2", ",", "par3", ",", "i", ")", ";", "}", "public", "static", "ChunkCoordinates", "getNearestEmptyChunkCoordinates", "(", "World", "par0World", ",", "int", "par1", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ")", "{", "int", "i", "=", "par0World", ".", "getBlockMetadata", "(", "par1", ",", "par2", ",", "par3", ")", ";", "int", "j", "=", "BlockDirectional", ".", "getDirection", "(", "i", ")", ";", "for", "(", "int", "k", "=", "0", ";", "k", "<=", "1", ";", "k", "++", ")", "{", "int", "l", "=", "par1", "-", "headBlockToFootBlockMap", "[", "j", "]", "[", "0", "]", "*", "k", "-", "1", ";", "int", "i1", "=", "par3", "-", "headBlockToFootBlockMap", "[", "j", "]", "[", "1", "]", "*", "k", "-", "1", ";", "int", "j1", "=", "l", "+", "2", ";", "int", "k1", "=", "i1", "+", "2", ";", "for", "(", "int", "l1", "=", "l", ";", "l1", "<=", "j1", ";", "l1", "++", ")", "{", "for", "(", "int", "i2", "=", "i1", ";", "i2", "<=", "k1", ";", "i2", "++", ")", "{", "if", "(", "!", "par0World", ".", "isBlockNormalCube", "(", "l1", ",", "par2", "-", "1", ",", "i2", ")", "||", "!", "par0World", ".", "isAirBlock", "(", "l1", ",", "par2", ",", "i2", ")", "||", "!", "par0World", ".", "isAirBlock", "(", "l1", ",", "par2", "+", "1", ",", "i2", ")", ")", "{", "continue", ";", "}", "if", "(", "par4", ">", "0", ")", "{", "par4", "--", ";", "}", "else", "{", "return", "new", "ChunkCoordinates", "(", "l1", ",", "par2", ",", "i2", ")", ";", "}", "}", "}", "}", "return", "null", ";", "}", "public", "void", "dropBlockAsItemWithChance", "(", "World", "par1World", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "int", "par5", ",", "float", "par6", ",", "int", "par7", ")", "{", "if", "(", "!", "isBlockFootOfBed", "(", "par5", ")", ")", "{", "super", ".", "dropBlockAsItemWithChance", "(", "par1World", ",", "par2", ",", "par3", ",", "par4", ",", "par5", ",", "par6", ",", "0", ")", ";", "}", "}", "public", "int", "getMobilityFlag", "(", ")", "{", "return", "1", ";", "}", "}", "</s>" ]
9,792
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "*", ";", "public", "class", "BlockRedstoneTorch", "extends", "BlockTorch", "{", "private", "boolean", "torchActive", ";", "private", "static", "List", "torchUpdates", "=", "new", "ArrayList", "(", ")", ";", "public", "int", "getBlockTextureFromSideAndMetadata", "(", "int", "par1", ",", "int", "par2", ")", "{", "if", "(", "par1", "==", "1", ")", "{", "return", "Block", ".", "redstoneWire", ".", "getBlockTextureFromSideAndMetadata", "(", "par1", ",", "par2", ")", ";", "}", "else", "{", "return", "super", ".", "getBlockTextureFromSideAndMetadata", "(", "par1", ",", "par2", ")", ";", "}", "}", "private", "boolean", "checkForBurnout", "(", "World", "par1World", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "boolean", "par5", ")", "{", "if", "(", "par5", ")", "{", "torchUpdates", ".", "add", "(", "new", "RedstoneUpdateInfo", "(", "par2", ",", "par3", ",", "par4", ",", "par1World", ".", "getWorldTime", "(", ")", ")", ")", ";", "}", "int", "i", "=", "0", ";", "for", "(", "int", "j", "=", "0", ";", "j", "<", "torchUpdates", ".", "size", "(", ")", ";", "j", "++", ")", "{", "RedstoneUpdateInfo", "redstoneupdateinfo", "=", "(", "RedstoneUpdateInfo", ")", "torchUpdates", ".", "get", "(", "j", ")", ";", "if", "(", "redstoneupdateinfo", ".", "x", "==", "par2", "&&", "redstoneupdateinfo", ".", "y", "==", "par3", "&&", "redstoneupdateinfo", ".", "z", "==", "par4", "&&", "++", "i", ">=", "8", ")", "{", "return", "true", ";", "}", "}", "return", "false", ";", "}", "protected", "BlockRedstoneTorch", "(", "int", "par1", ",", "int", "par2", ",", "boolean", "par3", ")", "{", "super", "(", "par1", ",", "par2", ")", ";", "torchActive", "=", "false", ";", "torchActive", "=", "par3", ";", "setTickRandomly", "(", "true", ")", ";", "}", "public", "int", "tickRate", "(", ")", "{", "return", "2", ";", "}", "public", "void", "onBlockAdded", "(", "World", "par1World", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ")", "{", "if", "(", "par1World", ".", "getBlockMetadata", "(", "par2", ",", "par3", ",", "par4", ")", "==", "0", ")", "{", "super", ".", "onBlockAdded", "(", "par1World", ",", "par2", ",", "par3", ",", "par4", ")", ";", "}", "if", "(", "torchActive", ")", "{", "par1World", ".", "notifyBlocksOfNeighborChange", "(", "par2", ",", "par3", "-", "1", ",", "par4", ",", "blockID", ")", ";", "par1World", ".", "notifyBlocksOfNeighborChange", "(", "par2", ",", "par3", "+", "1", ",", "par4", ",", "blockID", ")", ";", "par1World", ".", "notifyBlocksOfNeighborChange", "(", "par2", "-", "1", ",", "par3", ",", "par4", ",", "blockID", ")", ";", "par1World", ".", "notifyBlocksOfNeighborChange", "(", "par2", "+", "1", ",", "par3", ",", "par4", ",", "blockID", ")", ";", "par1World", ".", "notifyBlocksOfNeighborChange", "(", "par2", ",", "par3", ",", "par4", "-", "1", ",", "blockID", ")", ";", "par1World", ".", "notifyBlocksOfNeighborChange", "(", "par2", ",", "par3", ",", "par4", "+", "1", ",", "blockID", ")", ";", "}", "}", "public", "void", "onBlockRemoval", "(", "World", "par1World", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ")", "{", "if", "(", "torchActive", ")", "{", "par1World", ".", "notifyBlocksOfNeighborChange", "(", "par2", ",", "par3", "-", "1", ",", "par4", ",", "blockID", ")", ";", "par1World", ".", "notifyBlocksOfNeighborChange", "(", "par2", ",", "par3", "+", "1", ",", "par4", ",", "blockID", ")", ";", "par1World", ".", "notifyBlocksOfNeighborChange", "(", "par2", "-", "1", ",", "par3", ",", "par4", ",", "blockID", ")", ";", "par1World", ".", "notifyBlocksOfNeighborChange", "(", "par2", "+", "1", ",", "par3", ",", "par4", ",", "blockID", ")", ";", "par1World", ".", "notifyBlocksOfNeighborChange", "(", "par2", ",", "par3", ",", "par4", "-", "1", ",", "blockID", ")", ";", "par1World", ".", "notifyBlocksOfNeighborChange", "(", "par2", ",", "par3", ",", "par4", "+", "1", ",", "blockID", ")", ";", "}", "}", "public", "boolean", "isPoweringTo", "(", "IBlockAccess", "par1IBlockAccess", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "int", "par5", ")", "{", "if", "(", "!", "torchActive", ")", "{", "return", "false", ";", "}", "int", "i", "=", "par1IBlockAccess", ".", "getBlockMetadata", "(", "par2", ",", "par3", ",", "par4", ")", ";", "if", "(", "i", "==", "5", "&&", "par5", "==", "1", ")", "{", "return", "false", ";", "}", "if", "(", "i", "==", "3", "&&", "par5", "==", "3", ")", "{", "return", "false", ";", "}", "if", "(", "i", "==", "4", "&&", "par5", "==", "2", ")", "{", "return", "false", ";", "}", "if", "(", "i", "==", "1", "&&", "par5", "==", "5", ")", "{", "return", "false", ";", "}", "return", "i", "!=", "2", "||", "par5", "!=", "4", ";", "}", "private", "boolean", "isIndirectlyPowered", "(", "World", "par1World", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ")", "{", "int", "i", "=", "par1World", ".", "getBlockMetadata", "(", "par2", ",", "par3", ",", "par4", ")", ";", "if", "(", "i", "==", "5", "&&", "par1World", ".", "isBlockIndirectlyProvidingPowerTo", "(", "par2", ",", "par3", "-", "1", ",", "par4", ",", "0", ")", ")", "{", "return", "true", ";", "}", "if", "(", "i", "==", "3", "&&", "par1World", ".", "isBlockIndirectlyProvidingPowerTo", "(", "par2", ",", "par3", ",", "par4", "-", "1", ",", "2", ")", ")", "{", "return", "true", ";", "}", "if", "(", "i", "==", "4", "&&", "par1World", ".", "isBlockIndirectlyProvidingPowerTo", "(", "par2", ",", "par3", ",", "par4", "+", "1", ",", "3", ")", ")", "{", "return", "true", ";", "}", "if", "(", "i", "==", "1", "&&", "par1World", ".", "isBlockIndirectlyProvidingPowerTo", "(", "par2", "-", "1", ",", "par3", ",", "par4", ",", "4", ")", ")", "{", "return", "true", ";", "}", "return", "i", "==", "2", "&&", "par1World", ".", "isBlockIndirectlyProvidingPowerTo", "(", "par2", "+", "1", ",", "par3", ",", "par4", ",", "5", ")", ";", "}", "public", "void", "updateTick", "(", "World", "par1World", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "Random", "par5Random", ")", "{", "boolean", "flag", "=", "isIndirectlyPowered", "(", "par1World", ",", "par2", ",", "par3", ",", "par4", ")", ";", "for", "(", ";", "torchUpdates", ".", "size", "(", ")", ">", "0", "&&", "par1World", ".", "getWorldTime", "(", ")", "-", "(", "(", "RedstoneUpdateInfo", ")", "torchUpdates", ".", "get", "(", "0", ")", ")", ".", "updateTime", ">", "60L", ";", "torchUpdates", ".", "remove", "(", "0", ")", ")", "{", "}", "if", "(", "torchActive", ")", "{", "if", "(", "flag", ")", "{", "par1World", ".", "setBlockAndMetadataWithNotify", "(", "par2", ",", "par3", ",", "par4", ",", "Block", ".", "torchRedstoneIdle", ".", "blockID", ",", "par1World", ".", "getBlockMetadata", "(", "par2", ",", "par3", ",", "par4", ")", ")", ";", "if", "(", "checkForBurnout", "(", "par1World", ",", "par2", ",", "par3", ",", "par4", ",", "true", ")", ")", "{", "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", "<", "5", ";", "i", "++", ")", "{", "double", "d", "=", "(", "double", ")", "par2", "+", "par5Random", ".", "nextDouble", "(", ")", "*", "0.59999999999999998D", "+", "0.20000000000000001D", ";", "double", "d1", "=", "(", "double", ")", "par3", "+", "par5Random", ".", "nextDouble", "(", ")", "*", "0.59999999999999998D", "+", "0.20000000000000001D", ";", "double", "d2", "=", "(", "double", ")", "par4", "+", "par5Random", ".", "nextDouble", "(", ")", "*", "0.59999999999999998D", "+", "0.20000000000000001D", ";", "par1World", ".", "spawnParticle", "(", "\"smoke\"", ",", "d", ",", "d1", ",", "d2", ",", "0.0D", ",", "0.0D", ",", "0.0D", ")", ";", "}", "}", "}", "}", "else", "if", "(", "!", "flag", "&&", "!", "checkForBurnout", "(", "par1World", ",", "par2", ",", "par3", ",", "par4", ",", "false", ")", ")", "{", "par1World", ".", "setBlockAndMetadataWithNotify", "(", "par2", ",", "par3", ",", "par4", ",", "Block", ".", "torchRedstoneActive", ".", "blockID", ",", "par1World", ".", "getBlockMetadata", "(", "par2", ",", "par3", ",", "par4", ")", ")", ";", "}", "}", "public", "void", "onNeighborBlockChange", "(", "World", "par1World", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "int", "par5", ")", "{", "super", ".", "onNeighborBlockChange", "(", "par1World", ",", "par2", ",", "par3", ",", "par4", ",", "par5", ")", ";", "par1World", ".", "scheduleBlockUpdate", "(", "par2", ",", "par3", ",", "par4", ",", "blockID", ",", "tickRate", "(", ")", ")", ";", "}", "public", "boolean", "isIndirectlyPoweringTo", "(", "World", "par1World", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "int", "par5", ")", "{", "if", "(", "par5", "==", "0", ")", "{", "return", "isPoweringTo", "(", "par1World", ",", "par2", ",", "par3", ",", "par4", ",", "par5", ")", ";", "}", "else", "{", "return", "false", ";", "}", "}", "public", "int", "idDropped", "(", "int", "par1", ",", "Random", "par2Random", ",", "int", "par3", ")", "{", "return", "Block", ".", "torchRedstoneActive", ".", "blockID", ";", "}", "public", "boolean", "canProvidePower", "(", ")", "{", "return", "true", ";", "}", "}", "</s>" ]
9,793
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "public", "class", "WorldProviderEnd", "extends", "WorldProvider", "{", "public", "WorldProviderEnd", "(", ")", "{", "}", "public", "void", "registerWorldChunkManager", "(", ")", "{", "worldChunkMgr", "=", "new", "WorldChunkManagerHell", "(", "BiomeGenBase", ".", "sky", ",", "0.5F", ",", "0.0F", ")", ";", "worldType", "=", "1", ";", "hasNoSky", "=", "true", ";", "}", "public", "IChunkProvider", "getChunkProvider", "(", ")", "{", "return", "new", "ChunkProviderEnd", "(", "worldObj", ",", "worldObj", ".", "getSeed", "(", ")", ")", ";", "}", "public", "float", "calculateCelestialAngle", "(", "long", "par1", ",", "float", "par3", ")", "{", "return", "0.0F", ";", "}", "public", "boolean", "canRespawnHere", "(", ")", "{", "return", "false", ";", "}", "public", "boolean", "func_48567_d", "(", ")", "{", "return", "false", ";", "}", "public", "boolean", "canCoordinateBeSpawn", "(", "int", "par1", ",", "int", "par2", ")", "{", "int", "i", "=", "worldObj", ".", "getFirstUncoveredBlock", "(", "par1", ",", "par2", ")", ";", "if", "(", "i", "==", "0", ")", "{", "return", "false", ";", "}", "else", "{", "return", "Block", ".", "blocksList", "[", "i", "]", ".", "blockMaterial", ".", "blocksMovement", "(", ")", ";", "}", "}", "public", "ChunkCoordinates", "getEntrancePortalLocation", "(", ")", "{", "return", "new", "ChunkCoordinates", "(", "100", ",", "50", ",", "0", ")", ";", "}", "public", "int", "getAverageGroundLevel", "(", ")", "{", "return", "50", ";", "}", "}", "</s>" ]
9,794
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "Random", ";", "public", "class", "EntityAIEatGrass", "extends", "EntityAIBase", "{", "private", "EntityLiving", "theEntity", ";", "private", "World", "theWorld", ";", "int", "eatGrassTick", ";", "public", "EntityAIEatGrass", "(", "EntityLiving", "par1EntityLiving", ")", "{", "eatGrassTick", "=", "0", ";", "theEntity", "=", "par1EntityLiving", ";", "theWorld", "=", "par1EntityLiving", ".", "worldObj", ";", "setMutexBits", "(", "7", ")", ";", "}", "public", "boolean", "shouldExecute", "(", ")", "{", "if", "(", "theEntity", ".", "getRNG", "(", ")", ".", "nextInt", "(", "theEntity", ".", "isChild", "(", ")", "?", "50", ":", "1000", ")", "!=", "0", ")", "{", "return", "false", ";", "}", "int", "i", "=", "MathHelper", ".", "floor_double", "(", "theEntity", ".", "posX", ")", ";", "int", "j", "=", "MathHelper", ".", "floor_double", "(", "theEntity", ".", "posY", ")", ";", "int", "k", "=", "MathHelper", ".", "floor_double", "(", "theEntity", ".", "posZ", ")", ";", "if", "(", "theWorld", ".", "getBlockId", "(", "i", ",", "j", ",", "k", ")", "==", "Block", ".", "tallGrass", ".", "blockID", "&&", "theWorld", ".", "getBlockMetadata", "(", "i", ",", "j", ",", "k", ")", "==", "1", ")", "{", "return", "true", ";", "}", "return", "theWorld", ".", "getBlockId", "(", "i", ",", "j", "-", "1", ",", "k", ")", "==", "Block", ".", "grass", ".", "blockID", ";", "}", "public", "void", "startExecuting", "(", ")", "{", "eatGrassTick", "=", "40", ";", "theWorld", ".", "setEntityState", "(", "theEntity", ",", "(", "byte", ")", "10", ")", ";", "theEntity", ".", "getNavigator", "(", ")", ".", "clearPathEntity", "(", ")", ";", "}", "public", "void", "resetTask", "(", ")", "{", "eatGrassTick", "=", "0", ";", "}", "public", "boolean", "continueExecuting", "(", ")", "{", "return", "eatGrassTick", ">", "0", ";", "}", "public", "int", "func_48227_f", "(", ")", "{", "return", "eatGrassTick", ";", "}", "public", "void", "updateTask", "(", ")", "{", "eatGrassTick", "=", "Math", ".", "max", "(", "0", ",", "eatGrassTick", "-", "1", ")", ";", "if", "(", "eatGrassTick", "!=", "4", ")", "{", "return", ";", "}", "int", "i", "=", "MathHelper", ".", "floor_double", "(", "theEntity", ".", "posX", ")", ";", "int", "j", "=", "MathHelper", ".", "floor_double", "(", "theEntity", ".", "posY", ")", ";", "int", "k", "=", "MathHelper", ".", "floor_double", "(", "theEntity", ".", "posZ", ")", ";", "if", "(", "theWorld", ".", "getBlockId", "(", "i", ",", "j", ",", "k", ")", "==", "Block", ".", "tallGrass", ".", "blockID", ")", "{", "theWorld", ".", "playAuxSFX", "(", "2001", ",", "i", ",", "j", ",", "k", ",", "Block", ".", "tallGrass", ".", "blockID", "+", "4096", ")", ";", "theWorld", ".", "setBlockWithNotify", "(", "i", ",", "j", ",", "k", ",", "0", ")", ";", "theEntity", ".", "eatGrassBonus", "(", ")", ";", "}", "else", "if", "(", "theWorld", ".", "getBlockId", "(", "i", ",", "j", "-", "1", ",", "k", ")", "==", "Block", ".", "grass", ".", "blockID", ")", "{", "theWorld", ".", "playAuxSFX", "(", "2001", ",", "i", ",", "j", "-", "1", ",", "k", ",", "Block", ".", "grass", ".", "blockID", ")", ";", "theWorld", ".", "setBlockWithNotify", "(", "i", ",", "j", "-", "1", ",", "k", ",", "Block", ".", "dirt", ".", "blockID", ")", ";", "theEntity", ".", "eatGrassBonus", "(", ")", ";", "}", "}", "}", "</s>" ]
9,795
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "io", ".", "*", ";", "import", "java", ".", "util", ".", "zip", ".", "*", ";", "public", "class", "Packet51MapChunk", "extends", "Packet", "{", "public", "int", "xCh", ";", "public", "int", "zCh", ";", "public", "int", "yChMin", ";", "public", "int", "yChMax", ";", "public", "byte", "chunkData", "[", "]", ";", "public", "boolean", "includeInitialize", ";", "private", "int", "tempLength", ";", "private", "int", "field_48110_h", ";", "private", "static", "byte", "temp", "[", "]", "=", "new", "byte", "[", "0", "]", ";", "public", "Packet51MapChunk", "(", ")", "{", "isChunkDataPacket", "=", "true", ";", "}", "public", "Packet51MapChunk", "(", "Chunk", "par1Chunk", ",", "boolean", "par2", ",", "int", "par3", ")", "{", "isChunkDataPacket", "=", "true", ";", "xCh", "=", "par1Chunk", ".", "xPosition", ";", "zCh", "=", "par1Chunk", ".", "zPosition", ";", "includeInitialize", "=", "par2", ";", "if", "(", "par2", ")", "{", "par3", "=", "65535", ";", "par1Chunk", ".", "field_50025_o", "=", "true", ";", "}", "ExtendedBlockStorage", "aextendedblockstorage", "[", "]", "=", "par1Chunk", ".", "getBlockStorageArray", "(", ")", ";", "int", "i", "=", "0", ";", "int", "j", "=", "0", ";", "for", "(", "int", "k", "=", "0", ";", "k", "<", "aextendedblockstorage", ".", "length", ";", "k", "++", ")", "{", "if", "(", "aextendedblockstorage", "[", "k", "]", "==", "null", "||", "par2", "&&", "aextendedblockstorage", "[", "k", "]", ".", "getIsEmpty", "(", ")", "||", "(", "par3", "&", "1", "<<", "k", ")", "==", "0", ")", "{", "continue", ";", "}", "yChMin", "|=", "1", "<<", "k", ";", "i", "++", ";", "if", "(", "aextendedblockstorage", "[", "k", "]", ".", "getBlockMSBArray", "(", ")", "!=", "null", ")", "{", "yChMax", "|=", "1", "<<", "k", ";", "j", "++", ";", "}", "}", "int", "l", "=", "2048", "*", "(", "5", "*", "i", "+", "j", ")", ";", "if", "(", "par2", ")", "{", "l", "+=", "256", ";", "}", "if", "(", "temp", ".", "length", "<", "l", ")", "{", "temp", "=", "new", "byte", "[", "l", "]", ";", "}", "byte", "abyte0", "[", "]", "=", "temp", ";", "int", "i1", "=", "0", ";", "for", "(", "int", "j1", "=", "0", ";", "j1", "<", "aextendedblockstorage", ".", "length", ";", "j1", "++", ")", "{", "if", "(", "aextendedblockstorage", "[", "j1", "]", "!=", "null", "&&", "(", "!", "par2", "||", "!", "aextendedblockstorage", "[", "j1", "]", ".", "getIsEmpty", "(", ")", ")", "&&", "(", "par3", "&", "1", "<<", "j1", ")", "!=", "0", ")", "{", "byte", "abyte2", "[", "]", "=", "aextendedblockstorage", "[", "j1", "]", ".", "func_48590_g", "(", ")", ";", "System", ".", "arraycopy", "(", "abyte2", ",", "0", ",", "abyte0", ",", "i1", ",", "abyte2", ".", "length", ")", ";", "i1", "+=", "abyte2", ".", "length", ";", "}", "}", "for", "(", "int", "k1", "=", "0", ";", "k1", "<", "aextendedblockstorage", ".", "length", ";", "k1", "++", ")", "{", "if", "(", "aextendedblockstorage", "[", "k1", "]", "!=", "null", "&&", "(", "!", "par2", "||", "!", "aextendedblockstorage", "[", "k1", "]", ".", "getIsEmpty", "(", ")", ")", "&&", "(", "par3", "&", "1", "<<", "k1", ")", "!=", "0", ")", "{", "NibbleArray", "nibblearray", "=", "aextendedblockstorage", "[", "k1", "]", ".", "func_48594_i", "(", ")", ";", "System", ".", "arraycopy", "(", "nibblearray", ".", "data", ",", "0", ",", "abyte0", ",", "i1", ",", "nibblearray", ".", "data", ".", "length", ")", ";", "i1", "+=", "nibblearray", ".", "data", ".", "length", ";", "}", "}", "for", "(", "int", "l1", "=", "0", ";", "l1", "<", "aextendedblockstorage", ".", "length", ";", "l1", "++", ")", "{", "if", "(", "aextendedblockstorage", "[", "l1", "]", "!=", "null", "&&", "(", "!", "par2", "||", "!", "aextendedblockstorage", "[", "l1", "]", ".", "getIsEmpty", "(", ")", ")", "&&", "(", "par3", "&", "1", "<<", "l1", ")", "!=", "0", ")", "{", "NibbleArray", "nibblearray1", "=", "aextendedblockstorage", "[", "l1", "]", ".", "getBlocklightArray", "(", ")", ";", "System", ".", "arraycopy", "(", "nibblearray1", ".", "data", ",", "0", ",", "abyte0", ",", "i1", ",", "nibblearray1", ".", "data", ".", "length", ")", ";", "i1", "+=", "nibblearray1", ".", "data", ".", "length", ";", "}", "}", "for", "(", "int", "i2", "=", "0", ";", "i2", "<", "aextendedblockstorage", ".", "length", ";", "i2", "++", ")", "{", "if", "(", "aextendedblockstorage", "[", "i2", "]", "!=", "null", "&&", "(", "!", "par2", "||", "!", "aextendedblockstorage", "[", "i2", "]", ".", "getIsEmpty", "(", ")", ")", "&&", "(", "par3", "&", "1", "<<", "i2", ")", "!=", "0", ")", "{", "NibbleArray", "nibblearray2", "=", "aextendedblockstorage", "[", "i2", "]", ".", "getSkylightArray", "(", ")", ";", "System", ".", "arraycopy", "(", "nibblearray2", ".", "data", ",", "0", ",", "abyte0", ",", "i1", ",", "nibblearray2", ".", "data", ".", "length", ")", ";", "i1", "+=", "nibblearray2", ".", "data", ".", "length", ";", "}", "}", "if", "(", "j", ">", "0", ")", "{", "for", "(", "int", "j2", "=", "0", ";", "j2", "<", "aextendedblockstorage", ".", "length", ";", "j2", "++", ")", "{", "if", "(", "aextendedblockstorage", "[", "j2", "]", "!=", "null", "&&", "(", "!", "par2", "||", "!", "aextendedblockstorage", "[", "j2", "]", ".", "getIsEmpty", "(", ")", ")", "&&", "aextendedblockstorage", "[", "j2", "]", ".", "getBlockMSBArray", "(", ")", "!=", "null", "&&", "(", "par3", "&", "1", "<<", "j2", ")", "!=", "0", ")", "{", "NibbleArray", "nibblearray3", "=", "aextendedblockstorage", "[", "j2", "]", ".", "getBlockMSBArray", "(", ")", ";", "System", ".", "arraycopy", "(", "nibblearray3", ".", "data", ",", "0", ",", "abyte0", ",", "i1", ",", "nibblearray3", ".", "data", ".", "length", ")", ";", "i1", "+=", "nibblearray3", ".", "data", ".", "length", ";", "}", "}", "}", "if", "(", "par2", ")", "{", "byte", "abyte1", "[", "]", "=", "par1Chunk", ".", "getBiomeArray", "(", ")", ";", "System", ".", "arraycopy", "(", "abyte1", ",", "0", ",", "abyte0", ",", "i1", ",", "abyte1", ".", "length", ")", ";", "i1", "+=", "abyte1", ".", "length", ";", "}", "Deflater", "deflater", "=", "new", "Deflater", "(", "-", "1", ")", ";", "try", "{", "deflater", ".", "setInput", "(", "abyte0", ",", "0", ",", "i1", ")", ";", "deflater", ".", "finish", "(", ")", ";", "chunkData", "=", "new", "byte", "[", "i1", "]", ";", "tempLength", "=", "deflater", ".", "deflate", "(", "chunkData", ")", ";", "}", "finally", "{", "deflater", ".", "end", "(", ")", ";", "}", "}", "public", "void", "readPacketData", "(", "DataInputStream", "par1DataInputStream", ")", "throws", "IOException", "{", "xCh", "=", "par1DataInputStream", ".", "readInt", "(", ")", ";", "zCh", "=", "par1DataInputStream", ".", "readInt", "(", ")", ";", "includeInitialize", "=", "par1DataInputStream", ".", "readBoolean", "(", ")", ";", "yChMin", "=", "par1DataInputStream", ".", "readShort", "(", ")", ";", "yChMax", "=", "par1DataInputStream", ".", "readShort", "(", ")", ";", "tempLength", "=", "par1DataInputStream", ".", "readInt", "(", ")", ";", "field_48110_h", "=", "par1DataInputStream", ".", "readInt", "(", ")", ";", "if", "(", "temp", ".", "length", "<", "tempLength", ")", "{", "temp", "=", "new", "byte", "[", "tempLength", "]", ";", "}", "par1DataInputStream", ".", "readFully", "(", "temp", ",", "0", ",", "tempLength", ")", ";", "int", "i", "=", "0", ";", "for", "(", "int", "j", "=", "0", ";", "j", "<", "16", ";", "j", "++", ")", "{", "i", "+=", "yChMin", ">>", "j", "&", "1", ";", "}", "int", "k", "=", "12288", "*", "i", ";", "if", "(", "includeInitialize", ")", "{", "k", "+=", "256", ";", "}", "chunkData", "=", "new", "byte", "[", "k", "]", ";", "Inflater", "inflater", "=", "new", "Inflater", "(", ")", ";", "inflater", ".", "setInput", "(", "temp", ",", "0", ",", "tempLength", ")", ";", "try", "{", "inflater", ".", "inflate", "(", "chunkData", ")", ";", "}", "catch", "(", "DataFormatException", "dataformatexception", ")", "{", "throw", "new", "IOException", "(", "\"\"", ")", ";", "}", "finally", "{", "inflater", ".", "end", "(", ")", ";", "}", "}", "public", "void", "writePacketData", "(", "DataOutputStream", "par1DataOutputStream", ")", "throws", "IOException", "{", "par1DataOutputStream", ".", "writeInt", "(", "xCh", ")", ";", "par1DataOutputStream", ".", "writeInt", "(", "zCh", ")", ";", "par1DataOutputStream", ".", "writeBoolean", "(", "includeInitialize", ")", ";", "par1DataOutputStream", ".", "writeShort", "(", "(", "short", ")", "(", "yChMin", "&", "0xffff", ")", ")", ";", "par1DataOutputStream", ".", "writeShort", "(", "(", "short", ")", "(", "yChMax", "&", "0xffff", ")", ")", ";", "par1DataOutputStream", ".", "writeInt", "(", "tempLength", ")", ";", "par1DataOutputStream", ".", "writeInt", "(", "field_48110_h", ")", ";", "par1DataOutputStream", ".", "write", "(", "chunkData", ",", "0", ",", "tempLength", ")", ";", "}", "public", "void", "processPacket", "(", "NetHandler", "par1NetHandler", ")", "{", "par1NetHandler", ".", "func_48070_a", "(", "this", ")", ";", "}", "public", "int", "getPacketSize", "(", ")", "{", "return", "17", "+", "tempLength", ";", "}", "}", "</s>" ]
9,796
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "public", "abstract", "class", "EntityAIDoorInteract", "extends", "EntityAIBase", "{", "protected", "EntityLiving", "theEntity", ";", "protected", "int", "entityPosX", ";", "protected", "int", "entityPosY", ";", "protected", "int", "entityPosZ", ";", "protected", "BlockDoor", "targetDoor", ";", "boolean", "field_48186_f", ";", "float", "field_48187_g", ";", "float", "field_48193_h", ";", "public", "EntityAIDoorInteract", "(", "EntityLiving", "par1EntityLiving", ")", "{", "theEntity", "=", "par1EntityLiving", ";", "}", "public", "boolean", "shouldExecute", "(", ")", "{", "if", "(", "!", "theEntity", ".", "isCollidedHorizontally", ")", "{", "return", "false", ";", "}", "PathNavigate", "pathnavigate", "=", "theEntity", ".", "getNavigator", "(", ")", ";", "PathEntity", "pathentity", "=", "pathnavigate", ".", "getPath", "(", ")", ";", "if", "(", "pathentity", "==", "null", "||", "pathentity", ".", "isFinished", "(", ")", "||", "!", "pathnavigate", ".", "func_48657_b", "(", ")", ")", "{", "return", "false", ";", "}", "for", "(", "int", "i", "=", "0", ";", "i", "<", "Math", ".", "min", "(", "pathentity", ".", "getCurrentPathIndex", "(", ")", "+", "2", ",", "pathentity", ".", "getCurrentPathLength", "(", ")", ")", ";", "i", "++", ")", "{", "PathPoint", "pathpoint", "=", "pathentity", ".", "getPathPointFromIndex", "(", "i", ")", ";", "entityPosX", "=", "pathpoint", ".", "xCoord", ";", "entityPosY", "=", "pathpoint", ".", "yCoord", "+", "1", ";", "entityPosZ", "=", "pathpoint", ".", "zCoord", ";", "if", "(", "theEntity", ".", "getDistanceSq", "(", "entityPosX", ",", "theEntity", ".", "posY", ",", "entityPosZ", ")", ">", "2.25D", ")", "{", "continue", ";", "}", "targetDoor", "=", "func_48185_a", "(", "entityPosX", ",", "entityPosY", ",", "entityPosZ", ")", ";", "if", "(", "targetDoor", "!=", "null", ")", "{", "return", "true", ";", "}", "}", "entityPosX", "=", "MathHelper", ".", "floor_double", "(", "theEntity", ".", "posX", ")", ";", "entityPosY", "=", "MathHelper", ".", "floor_double", "(", "theEntity", ".", "posY", "+", "1.0D", ")", ";", "entityPosZ", "=", "MathHelper", ".", "floor_double", "(", "theEntity", ".", "posZ", ")", ";", "targetDoor", "=", "func_48185_a", "(", "entityPosX", ",", "entityPosY", ",", "entityPosZ", ")", ";", "return", "targetDoor", "!=", "null", ";", "}", "public", "boolean", "continueExecuting", "(", ")", "{", "return", "!", "field_48186_f", ";", "}", "public", "void", "startExecuting", "(", ")", "{", "field_48186_f", "=", "false", ";", "field_48187_g", "=", "(", "float", ")", "(", "(", "double", ")", "(", "(", "float", ")", "entityPosX", "+", "0.5F", ")", "-", "theEntity", ".", "posX", ")", ";", "field_48193_h", "=", "(", "float", ")", "(", "(", "double", ")", "(", "(", "float", ")", "entityPosZ", "+", "0.5F", ")", "-", "theEntity", ".", "posZ", ")", ";", "}", "public", "void", "updateTask", "(", ")", "{", "float", "f", "=", "(", "float", ")", "(", "(", "double", ")", "(", "(", "float", ")", "entityPosX", "+", "0.5F", ")", "-", "theEntity", ".", "posX", ")", ";", "float", "f1", "=", "(", "float", ")", "(", "(", "double", ")", "(", "(", "float", ")", "entityPosZ", "+", "0.5F", ")", "-", "theEntity", ".", "posZ", ")", ";", "float", "f2", "=", "field_48187_g", "*", "f", "+", "field_48193_h", "*", "f1", ";", "if", "(", "f2", "<", "0.0F", ")", "{", "field_48186_f", "=", "true", ";", "}", "}", "private", "BlockDoor", "func_48185_a", "(", "int", "par1", ",", "int", "par2", ",", "int", "par3", ")", "{", "int", "i", "=", "theEntity", ".", "worldObj", ".", "getBlockId", "(", "par1", ",", "par2", ",", "par3", ")", ";", "if", "(", "i", "!=", "Block", ".", "doorWood", ".", "blockID", ")", "{", "return", "null", ";", "}", "else", "{", "BlockDoor", "blockdoor", "=", "(", "BlockDoor", ")", "Block", ".", "blocksList", "[", "i", "]", ";", "return", "blockdoor", ";", "}", "}", "}", "</s>" ]
9,797
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "*", ";", "public", "class", "EntityAINearestAttackableTarget", "extends", "EntityAITarget", "{", "EntityLiving", "targetEntity", ";", "Class", "targetClass", ";", "int", "field_48295_f", ";", "private", "EntityAINearestAttackableTargetSorter", "field_48296_g", ";", "public", "EntityAINearestAttackableTarget", "(", "EntityLiving", "par1EntityLiving", ",", "Class", "par2Class", ",", "float", "par3", ",", "int", "par4", ",", "boolean", "par5", ")", "{", "this", "(", "par1EntityLiving", ",", "par2Class", ",", "par3", ",", "par4", ",", "par5", ",", "false", ")", ";", "}", "public", "EntityAINearestAttackableTarget", "(", "EntityLiving", "par1EntityLiving", ",", "Class", "par2Class", ",", "float", "par3", ",", "int", "par4", ",", "boolean", "par5", ",", "boolean", "par6", ")", "{", "super", "(", "par1EntityLiving", ",", "par3", ",", "par5", ",", "par6", ")", ";", "targetClass", "=", "par2Class", ";", "field_48288_d", "=", "par3", ";", "field_48295_f", "=", "par4", ";", "field_48296_g", "=", "new", "EntityAINearestAttackableTargetSorter", "(", "this", ",", "par1EntityLiving", ")", ";", "setMutexBits", "(", "1", ")", ";", "}", "public", "boolean", "shouldExecute", "(", ")", "{", "label0", ":", "{", "if", "(", "field_48295_f", ">", "0", "&&", "taskOwner", ".", "getRNG", "(", ")", ".", "nextInt", "(", "field_48295_f", ")", "!=", "0", ")", "{", "return", "false", ";", "}", "if", "(", "targetClass", "==", "(", "net", ".", "minecraft", ".", "src", ".", "EntityPlayer", ".", "class", ")", ")", "{", "EntityPlayer", "entityplayer", "=", "taskOwner", ".", "worldObj", ".", "getClosestVulnerablePlayerToEntity", "(", "taskOwner", ",", "field_48288_d", ")", ";", "if", "(", "func_48284_a", "(", "entityplayer", ",", "false", ")", ")", "{", "targetEntity", "=", "entityplayer", ";", "return", "true", ";", "}", "break", "label0", ";", "}", "List", "list", "=", "taskOwner", ".", "worldObj", ".", "getEntitiesWithinAABB", "(", "targetClass", ",", "taskOwner", ".", "boundingBox", ".", "expand", "(", "field_48288_d", ",", "4D", ",", "field_48288_d", ")", ")", ";", "Collections", ".", "sort", "(", "list", ",", "field_48296_g", ")", ";", "Iterator", "iterator", "=", "list", ".", "iterator", "(", ")", ";", "EntityLiving", "entityliving", ";", "do", "{", "if", "(", "!", "iterator", ".", "hasNext", "(", ")", ")", "{", "break", "label0", ";", "}", "Entity", "entity", "=", "(", "Entity", ")", "iterator", ".", "next", "(", ")", ";", "entityliving", "=", "(", "EntityLiving", ")", "entity", ";", "}", "while", "(", "!", "func_48284_a", "(", "entityliving", ",", "false", ")", ")", ";", "targetEntity", "=", "entityliving", ";", "return", "true", ";", "}", "return", "false", ";", "}", "public", "void", "startExecuting", "(", ")", "{", "taskOwner", ".", "setAttackTarget", "(", "targetEntity", ")", ";", "super", ".", "startExecuting", "(", ")", ";", "}", "}", "</s>" ]
9,798
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "List", ";", "public", "class", "ContainerBrewingStand", "extends", "Container", "{", "private", "TileEntityBrewingStand", "tileBrewingStand", ";", "private", "int", "brewTime", ";", "public", "ContainerBrewingStand", "(", "InventoryPlayer", "par1InventoryPlayer", ",", "TileEntityBrewingStand", "par2TileEntityBrewingStand", ")", "{", "brewTime", "=", "0", ";", "tileBrewingStand", "=", "par2TileEntityBrewingStand", ";", "addSlot", "(", "new", "SlotBrewingStandPotion", "(", "this", ",", "par1InventoryPlayer", ".", "player", ",", "par2TileEntityBrewingStand", ",", "0", ",", "56", ",", "46", ")", ")", ";", "addSlot", "(", "new", "SlotBrewingStandPotion", "(", "this", ",", "par1InventoryPlayer", ".", "player", ",", "par2TileEntityBrewingStand", ",", "1", ",", "79", ",", "53", ")", ")", ";", "addSlot", "(", "new", "SlotBrewingStandPotion", "(", "this", ",", "par1InventoryPlayer", ".", "player", ",", "par2TileEntityBrewingStand", ",", "2", ",", "102", ",", "46", ")", ")", ";", "addSlot", "(", "new", "SlotBrewingStandIngredient", "(", "this", ",", "par2TileEntityBrewingStand", ",", "3", ",", "79", ",", "17", ")", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "3", ";", "i", "++", ")", "{", "for", "(", "int", "k", "=", "0", ";", "k", "<", "9", ";", "k", "++", ")", "{", "addSlot", "(", "new", "Slot", "(", "par1InventoryPlayer", ",", "k", "+", "i", "*", "9", "+", "9", ",", "8", "+", "k", "*", "18", ",", "84", "+", "i", "*", "18", ")", ")", ";", "}", "}", "for", "(", "int", "j", "=", "0", ";", "j", "<", "9", ";", "j", "++", ")", "{", "addSlot", "(", "new", "Slot", "(", "par1InventoryPlayer", ",", "j", ",", "8", "+", "j", "*", "18", ",", "142", ")", ")", ";", "}", "}", "public", "void", "onCraftGuiOpened", "(", "ICrafting", "par1ICrafting", ")", "{", "super", ".", "onCraftGuiOpened", "(", "par1ICrafting", ")", ";", "par1ICrafting", ".", "updateCraftingInventoryInfo", "(", "this", ",", "0", ",", "tileBrewingStand", ".", "getBrewTime", "(", ")", ")", ";", "}", "public", "void", "updateCraftingResults", "(", ")", "{", "super", ".", "updateCraftingResults", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "crafters", ".", "size", "(", ")", ";", "i", "++", ")", "{", "ICrafting", "icrafting", "=", "(", "ICrafting", ")", "crafters", ".", "get", "(", "i", ")", ";", "if", "(", "brewTime", "!=", "tileBrewingStand", ".", "getBrewTime", "(", ")", ")", "{", "icrafting", ".", "updateCraftingInventoryInfo", "(", "this", ",", "0", ",", "tileBrewingStand", ".", "getBrewTime", "(", ")", ")", ";", "}", "}", "brewTime", "=", "tileBrewingStand", ".", "getBrewTime", "(", ")", ";", "}", "public", "boolean", "canInteractWith", "(", "EntityPlayer", "par1EntityPlayer", ")", "{", "return", "tileBrewingStand", ".", "isUseableByPlayer", "(", "par1EntityPlayer", ")", ";", "}", "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", "&&", "par1", "<=", "2", "||", "par1", "==", "3", ")", "{", "if", "(", "!", "mergeItemStack", "(", "itemstack1", ",", "4", ",", "40", ",", "true", ")", ")", "{", "return", "null", ";", "}", "slot", ".", "func_48417_a", "(", "itemstack1", ",", "itemstack", ")", ";", "}", "else", "if", "(", "par1", ">=", "4", "&&", "par1", "<", "31", ")", "{", "if", "(", "!", "mergeItemStack", "(", "itemstack1", ",", "31", ",", "40", ",", "false", ")", ")", "{", "return", "null", ";", "}", "}", "else", "if", "(", "par1", ">=", "31", "&&", "par1", "<", "40", ")", "{", "if", "(", "!", "mergeItemStack", "(", "itemstack1", ",", "4", ",", "31", ",", "false", ")", ")", "{", "return", "null", ";", "}", "}", "else", "if", "(", "!", "mergeItemStack", "(", "itemstack1", ",", "4", ",", "40", ",", "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,799
[ "<s>", "package", "net", ".", "minecraft", ".", "src", ";", "import", "java", ".", "util", ".", "Random", ";", "public", "class", "NoiseGeneratorOctaves", "extends", "NoiseGenerator", "{", "private", "NoiseGeneratorPerlin", "generatorCollection", "[", "]", ";", "private", "int", "octaves", ";", "public", "NoiseGeneratorOctaves", "(", "Random", "par1Random", ",", "int", "par2", ")", "{", "octaves", "=", "par2", ";", "generatorCollection", "=", "new", "NoiseGeneratorPerlin", "[", "par2", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "par2", ";", "i", "++", ")", "{", "generatorCollection", "[", "i", "]", "=", "new", "NoiseGeneratorPerlin", "(", "par1Random", ")", ";", "}", "}", "public", "double", "[", "]", "generateNoiseOctaves", "(", "double", "par1ArrayOfDouble", "[", "]", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "int", "par5", ",", "int", "par6", ",", "int", "par7", ",", "double", "par8", ",", "double", "par10", ",", "double", "par12", ")", "{", "if", "(", "par1ArrayOfDouble", "==", "null", ")", "{", "par1ArrayOfDouble", "=", "new", "double", "[", "par5", "*", "par6", "*", "par7", "]", ";", "}", "else", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "par1ArrayOfDouble", ".", "length", ";", "i", "++", ")", "{", "par1ArrayOfDouble", "[", "i", "]", "=", "0.0D", ";", "}", "}", "double", "d", "=", "1.0D", ";", "for", "(", "int", "j", "=", "0", ";", "j", "<", "octaves", ";", "j", "++", ")", "{", "double", "d1", "=", "(", "double", ")", "par2", "*", "d", "*", "par8", ";", "double", "d2", "=", "(", "double", ")", "par3", "*", "d", "*", "par10", ";", "double", "d3", "=", "(", "double", ")", "par4", "*", "d", "*", "par12", ";", "long", "l", "=", "MathHelper", ".", "floor_double_long", "(", "d1", ")", ";", "long", "l1", "=", "MathHelper", ".", "floor_double_long", "(", "d3", ")", ";", "d1", "-=", "l", ";", "d3", "-=", "l1", ";", "l", "%=", "0x1000000L", ";", "l1", "%=", "0x1000000L", ";", "d1", "+=", "l", ";", "d3", "+=", "l1", ";", "generatorCollection", "[", "j", "]", ".", "func_646_a", "(", "par1ArrayOfDouble", ",", "d1", ",", "d2", ",", "d3", ",", "par5", ",", "par6", ",", "par7", ",", "par8", "*", "d", ",", "par10", "*", "d", ",", "par12", "*", "d", ",", "d", ")", ";", "d", "/=", "2D", ";", "}", "return", "par1ArrayOfDouble", ";", "}", "public", "double", "[", "]", "generateNoiseOctaves", "(", "double", "par1ArrayOfDouble", "[", "]", ",", "int", "par2", ",", "int", "par3", ",", "int", "par4", ",", "int", "par5", ",", "double", "par6", ",", "double", "par8", ",", "double", "par10", ")", "{", "return", "generateNoiseOctaves", "(", "par1ArrayOfDouble", ",", "par2", ",", "10", ",", "par3", ",", "par4", ",", "1", ",", "par5", ",", "par6", ",", "1.0D", ",", "par8", ")", ";", "}", "}", "</s>" ]