text
stringlengths
30
1.67M
<s> package net . minecraft . src ; import java . io . * ; public class Packet53BlockChange extends Packet { public int xPosition ; public int yPosition ; public int zPosition ; public int type ; public int metadata ; public Packet53BlockChange ( ) { isChunkDataPacket = true ; } public Packet53BlockChange ( int par1 , int par2 , int par3 , World par4World ) { isChunkDataPacket = true ; xPosition = par1 ; yPosition = par2 ; zPosition = par3 ; type = par4World . getBlockId ( par1 , par2 , par3 ) ; metadata = par4World . getBlockMetadata ( par1 , par2 , par3 ) ; } public void readPacketData ( DataInputStream par1DataInputStream ) throws IOException { xPosition = par1DataInputStream . readInt ( ) ; yPosition = par1DataInputStream . read ( ) ; zPosition = par1DataInputStream . readInt ( ) ; type = par1DataInputStream . read ( ) ; metadata = par1DataInputStream . read ( ) ; } public void writePacketData ( DataOutputStream par1DataOutputStream ) throws IOException { par1DataOutputStream . writeInt ( xPosition ) ; par1DataOutputStream . write ( yPosition ) ; par1DataOutputStream . writeInt ( zPosition ) ; par1DataOutputStream . write ( type ) ; par1DataOutputStream . write ( metadata ) ; } public void processPacket ( NetHandler par1NetHandler ) { par1NetHandler . handleBlockChange ( this ) ; } public int getPacketSize ( ) { return <NUM_LIT:11> ; } } </s>
<s> package net . minecraft . src ; import java . net . MalformedURLException ; import java . net . URL ; import java . util . HashMap ; import java . util . Map ; public class PlayerUsageSnooper { private Map field_52016_a ; private final URL field_52015_b ; public PlayerUsageSnooper ( String par1Str ) { field_52016_a = new HashMap ( ) ; try { field_52015_b = new URL ( ( new StringBuilder ( ) ) . append ( "<STR_LIT>" ) . append ( par1Str ) . toString ( ) ) ; } catch ( MalformedURLException malformedurlexception ) { throw new IllegalArgumentException ( ) ; } } public void func_52014_a ( String par1Str , Object par2Obj ) { field_52016_a . put ( par1Str , par2Obj ) ; } public void func_52012_a ( ) { PlayerUsageSnooperThread playerusagesnooperthread = new PlayerUsageSnooperThread ( this , "<STR_LIT>" ) ; playerusagesnooperthread . setDaemon ( true ) ; playerusagesnooperthread . start ( ) ; } static URL func_52013_a ( PlayerUsageSnooper par0PlayerUsageSnooper ) { return par0PlayerUsageSnooper . field_52015_b ; } static Map func_52011_b ( PlayerUsageSnooper par0PlayerUsageSnooper ) { return par0PlayerUsageSnooper . field_52016_a ; } } </s>
<s> package net . minecraft . src ; import java . util . * ; public class MapGenVillage extends MapGenStructure { public static List villageSpawnBiomes ; private final int terrainType ; public MapGenVillage ( int par1 ) { terrainType = par1 ; } protected boolean canSpawnStructureAtCoords ( int par1 , int par2 ) { byte byte0 = <NUM_LIT:32> ; byte byte1 = <NUM_LIT:8> ; int i = par1 ; int j = par2 ; if ( par1 < <NUM_LIT:0> ) { par1 -= byte0 - <NUM_LIT:1> ; } if ( par2 < <NUM_LIT:0> ) { par2 -= byte0 - <NUM_LIT:1> ; } int k = par1 / byte0 ; int l = par2 / byte0 ; Random random = worldObj . setRandomSeed ( k , l , <NUM_LIT> ) ; k *= byte0 ; l *= byte0 ; k += random . nextInt ( byte0 - byte1 ) ; l += random . nextInt ( byte0 - byte1 ) ; par1 = i ; par2 = j ; if ( par1 == k && par2 == l ) { boolean flag = worldObj . getWorldChunkManager ( ) . areBiomesViable ( par1 * <NUM_LIT:16> + <NUM_LIT:8> , par2 * <NUM_LIT:16> + <NUM_LIT:8> , <NUM_LIT:0> , villageSpawnBiomes ) ; if ( flag ) { return true ; } } return false ; } protected StructureStart getStructureStart ( int par1 , int par2 ) { return new StructureVillageStart ( worldObj , rand , par1 , par2 , terrainType ) ; } static { villageSpawnBiomes = Arrays . asList ( new BiomeGenBase [ ] { BiomeGenBase . plains , BiomeGenBase . desert } ) ; } } </s>
<s> package net . minecraft . src ; import java . util . Random ; public class BlockLadder extends Block { protected BlockLadder ( int par1 , int par2 ) { super ( par1 , par2 , Material . circuits ) ; } public AxisAlignedBB getCollisionBoundingBoxFromPool ( World par1World , int par2 , int par3 , int par4 ) { int i = par1World . getBlockMetadata ( par2 , par3 , par4 ) ; float f = <NUM_LIT> ; if ( i == <NUM_LIT:2> ) { setBlockBounds ( <NUM_LIT> , <NUM_LIT> , <NUM_LIT> - f , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> ) ; } if ( i == <NUM_LIT:3> ) { setBlockBounds ( <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , f ) ; } if ( i == <NUM_LIT:4> ) { setBlockBounds ( <NUM_LIT> - f , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> ) ; } if ( i == <NUM_LIT:5> ) { setBlockBounds ( <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , f , <NUM_LIT> , <NUM_LIT> ) ; } return super . getCollisionBoundingBoxFromPool ( par1World , par2 , par3 , par4 ) ; } public boolean isOpaqueCube ( ) { return false ; } public boolean renderAsNormalBlock ( ) { return false ; } public int getRenderType ( ) { return <NUM_LIT:8> ; } public boolean canPlaceBlockAt ( World par1World , int par2 , int par3 , int par4 ) { if ( par1World . isBlockNormalCube ( par2 - <NUM_LIT:1> , par3 , par4 ) ) { return true ; } if ( par1World . isBlockNormalCube ( par2 + <NUM_LIT:1> , par3 , par4 ) ) { return true ; } if ( par1World . isBlockNormalCube ( par2 , par3 , par4 - <NUM_LIT:1> ) ) { return true ; } return par1World . isBlockNormalCube ( par2 , par3 , par4 + <NUM_LIT:1> ) ; } public void onBlockPlaced ( World par1World , int par2 , int par3 , int par4 , int par5 ) { int i = par1World . getBlockMetadata ( par2 , par3 , par4 ) ; if ( ( i == <NUM_LIT:0> || par5 == <NUM_LIT:2> ) && par1World . isBlockNormalCube ( par2 , par3 , par4 + <NUM_LIT:1> ) ) { i = <NUM_LIT:2> ; } if ( ( i == <NUM_LIT:0> || par5 == <NUM_LIT:3> ) && par1World . isBlockNormalCube ( par2 , par3 , par4 - <NUM_LIT:1> ) ) { i = <NUM_LIT:3> ; } if ( ( i == <NUM_LIT:0> || par5 == <NUM_LIT:4> ) && par1World . isBlockNormalCube ( par2 + <NUM_LIT:1> , par3 , par4 ) ) { i = <NUM_LIT:4> ; } if ( ( i == <NUM_LIT:0> || par5 == <NUM_LIT:5> ) && par1World . isBlockNormalCube ( par2 - <NUM_LIT:1> , par3 , par4 ) ) { i = <NUM_LIT:5> ; } par1World . setBlockMetadataWithNotify ( par2 , par3 , par4 , i ) ; } public void onNeighborBlockChange ( World par1World , int par2 , int par3 , int par4 , int par5 ) { int i = par1World . getBlockMetadata ( par2 , par3 , par4 ) ; boolean flag = false ; if ( i == <NUM_LIT:2> && par1World . isBlockNormalCube ( par2 , par3 , par4 + <NUM_LIT:1> ) ) { flag = true ; } if ( i == <NUM_LIT:3> && par1World . isBlockNormalCube ( par2 , par3 , par4 - <NUM_LIT:1> ) ) { flag = true ; } if ( i == <NUM_LIT:4> && par1World . isBlockNormalCube ( par2 + <NUM_LIT:1> , par3 , par4 ) ) { flag = true ; } if ( i == <NUM_LIT:5> && par1World . isBlockNormalCube ( par2 - <NUM_LIT:1> , par3 , par4 ) ) { flag = true ; } if ( ! flag ) { dropBlockAsItem ( par1World , par2 , par3 , par4 , i , <NUM_LIT:0> ) ; par1World . setBlockWithNotify ( par2 , par3 , par4 , <NUM_LIT:0> ) ; } super . onNeighborBlockChange ( par1World , par2 , par3 , par4 , par5 ) ; } public int quantityDropped ( Random par1Random ) { return <NUM_LIT:1> ; } } </s>
<s> package net . minecraft . src ; import java . util . ArrayList ; import java . util . Random ; public class Block { public static final StepSound soundPowderFootstep ; public static final StepSound soundWoodFootstep ; public static final StepSound soundGravelFootstep ; public static final StepSound soundGrassFootstep ; public static final StepSound soundStoneFootstep ; public static final StepSound soundMetalFootstep ; public static final StepSound soundGlassFootstep ; public static final StepSound soundClothFootstep ; public static final StepSound soundSandFootstep ; public static final Block blocksList [ ] ; public static final boolean opaqueCubeLookup [ ] ; public static final int lightOpacity [ ] ; public static final boolean canBlockGrass [ ] ; public static final int lightValue [ ] ; public static final boolean requiresSelfNotify [ ] ; public static boolean useNeighborBrightness [ ] ; public static final Block stone ; public static final BlockGrass grass ; public static final Block dirt ; public static final Block cobblestone ; public static final Block planks ; public static final Block sapling ; public static final Block bedrock ; public static final Block waterMoving ; public static final Block waterStill ; public static final Block lavaMoving ; public static final Block lavaStill ; public static final Block sand ; public static final Block gravel ; public static final Block oreGold ; public static final Block oreIron ; public static final Block oreCoal ; public static final Block wood ; public static final BlockLeaves leaves ; public static final Block sponge ; public static final Block glass ; public static final Block oreLapis ; public static final Block blockLapis ; public static final Block dispenser ; public static final Block sandStone ; public static final Block music ; public static final Block bed ; public static final Block railPowered ; public static final Block railDetector ; public static final Block pistonStickyBase ; public static final Block web ; public static final BlockTallGrass tallGrass ; public static final BlockDeadBush deadBush ; public static final Block pistonBase ; public static final BlockPistonExtension pistonExtension ; public static final Block cloth ; public static final BlockPistonMoving pistonMoving ; public static final BlockFlower plantYellow ; public static final BlockFlower plantRed ; public static final BlockFlower mushroomBrown ; public static final BlockFlower mushroomRed ; public static final Block blockGold ; public static final Block blockSteel ; public static final Block stairDouble ; public static final Block stairSingle ; public static final Block brick ; public static final Block tnt ; public static final Block bookShelf ; public static final Block cobblestoneMossy ; public static final Block obsidian ; public static final Block torchWood ; public static final BlockFire fire ; public static final Block mobSpawner ; public static final Block stairCompactPlanks ; public static final Block chest ; public static final Block redstoneWire ; public static final Block oreDiamond ; public static final Block blockDiamond ; public static final Block workbench ; public static final Block crops ; public static final Block tilledField ; public static final Block stoneOvenIdle ; public static final Block stoneOvenActive ; public static final Block signPost ; public static final Block doorWood ; public static final Block ladder ; public static final Block rail ; public static final Block stairCompactCobblestone ; public static final Block signWall ; public static final Block lever ; public static final Block pressurePlateStone ; public static final Block doorSteel ; public static final Block pressurePlatePlanks ; public static final Block oreRedstone ; public static final Block oreRedstoneGlowing ; public static final Block torchRedstoneIdle ; public static final Block torchRedstoneActive ; public static final Block button ; public static final Block snow ; public static final Block ice ; public static final Block blockSnow ; public static final Block cactus ; public static final Block blockClay ; public static final Block reed ; public static final Block jukebox ; public static final Block fence ; public static final Block pumpkin ; public static final Block netherrack ; public static final Block slowSand ; public static final Block glowStone ; public static final BlockPortal portal ; public static final Block pumpkinLantern ; public static final Block cake ; public static final Block redstoneRepeaterIdle ; public static final Block redstoneRepeaterActive ; public static final Block lockedChest ; public static final Block trapdoor ; public static final Block silverfish ; public static final Block stoneBrick ; public static final Block mushroomCapBrown ; public static final Block mushroomCapRed ; public static final Block fenceIron ; public static final Block thinGlass ; public static final Block melon ; public static final Block pumpkinStem ; public static final Block melonStem ; public static final Block vine ; public static final Block fenceGate ; public static final Block stairsBrick ; public static final Block stairsStoneBrickSmooth ; public static final BlockMycelium mycelium ; public static final Block waterlily ; public static final Block netherBrick ; public static final Block netherFence ; public static final Block stairsNetherBrick ; public static final Block netherStalk ; public static final Block enchantmentTable ; public static final Block brewingStand ; public static final Block cauldron ; public static final Block endPortal ; public static final Block endPortalFrame ; public static final Block whiteStone ; public static final Block dragonEgg ; public static final Block redstoneLampIdle ; public static final Block redstoneLampActive ; public int blockIndexInTexture ; public final int blockID ; protected float blockHardness ; protected float blockResistance ; protected boolean blockConstructorCalled ; protected boolean enableStats ; protected boolean needsRandomTick ; protected boolean isBlockContainer ; public double minX ; public double minY ; public double minZ ; public double maxX ; public double maxY ; public double maxZ ; public StepSound stepSound ; public float blockParticleGravity ; public final Material blockMaterial ; public float slipperiness ; private String blockName ; protected Block ( int par1 , Material par2Material ) { blockConstructorCalled = true ; enableStats = true ; stepSound = soundPowderFootstep ; blockParticleGravity = <NUM_LIT> ; slipperiness = <NUM_LIT> ; if ( blocksList [ par1 ] != null ) { throw new IllegalArgumentException ( ( new StringBuilder ( ) ) . append ( "<STR_LIT>" ) . append ( par1 ) . append ( "<STR_LIT>" ) . append ( blocksList [ par1 ] ) . append ( "<STR_LIT>" ) . append ( this ) . toString ( ) ) ; } else { blockMaterial = par2Material ; blocksList [ par1 ] = this ; blockID = par1 ; setBlockBounds ( <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> ) ; opaqueCubeLookup [ par1 ] = isOpaqueCube ( ) ; lightOpacity [ par1 ] = isOpaqueCube ( ) ? <NUM_LIT:255> : <NUM_LIT:0> ; canBlockGrass [ par1 ] = ! par2Material . getCanBlockGrass ( ) ; return ; } } protected Block setRequiresSelfNotify ( ) { requiresSelfNotify [ blockID ] = true ; return this ; } protected void initializeBlock ( ) { } protected Block ( int par1 , int par2 , Material par3Material ) { this ( par1 , par3Material ) ; blockIndexInTexture = par2 ; } protected Block setStepSound ( StepSound par1StepSound ) { stepSound = par1StepSound ; return this ; } protected Block setLightOpacity ( int par1 ) { lightOpacity [ blockID ] = par1 ; return this ; } protected Block setLightValue ( float par1 ) { lightValue [ blockID ] = ( int ) ( <NUM_LIT> * par1 ) ; return this ; } protected Block setResistance ( float par1 ) { blockResistance = par1 * <NUM_LIT> ; return this ; } public static boolean isNormalCube ( int par0 ) { Block block = blocksList [ par0 ] ; if ( block == null ) { return false ; } else { return block . blockMaterial . isOpaque ( ) && block . renderAsNormalBlock ( ) ; } } public boolean renderAsNormalBlock ( ) { return true ; } public boolean getBlocksMovement ( IBlockAccess par1IBlockAccess , int par2 , int par3 , int par4 ) { return ! blockMaterial . blocksMovement ( ) ; } public int getRenderType ( ) { return <NUM_LIT:0> ; } protected Block setHardness ( float par1 ) { blockHardness = par1 ; if ( blockResistance < par1 * <NUM_LIT> ) { blockResistance = par1 * <NUM_LIT> ; } return this ; } protected Block setBlockUnbreakable ( ) { setHardness ( - <NUM_LIT> ) ; return this ; } public float getHardness ( ) { return blockHardness ; } protected Block setTickRandomly ( boolean par1 ) { needsRandomTick = par1 ; return this ; } public boolean getTickRandomly ( ) { return needsRandomTick ; } public boolean hasTileEntity ( ) { return isBlockContainer ; } public void setBlockBounds ( float par1 , float par2 , float par3 , float par4 , float par5 , float par6 ) { minX = par1 ; minY = par2 ; minZ = par3 ; maxX = par4 ; maxY = par5 ; maxZ = par6 ; } public boolean isBlockSolid ( IBlockAccess par1IBlockAccess , int par2 , int par3 , int par4 , int par5 ) { return par1IBlockAccess . getBlockMaterial ( par2 , par3 , par4 ) . isSolid ( ) ; } public int getBlockTextureFromSideAndMetadata ( int par1 , int par2 ) { return getBlockTextureFromSide ( par1 ) ; } public int getBlockTextureFromSide ( int par1 ) { return blockIndexInTexture ; } public void getCollidingBoundingBoxes ( World par1World , int par2 , int par3 , int par4 , AxisAlignedBB par5AxisAlignedBB , ArrayList par6ArrayList ) { AxisAlignedBB axisalignedbb = getCollisionBoundingBoxFromPool ( par1World , par2 , par3 , par4 ) ; if ( axisalignedbb != null && par5AxisAlignedBB . intersectsWith ( axisalignedbb ) ) { par6ArrayList . add ( axisalignedbb ) ; } } public AxisAlignedBB getCollisionBoundingBoxFromPool ( World par1World , int par2 , int par3 , int par4 ) { return AxisAlignedBB . getBoundingBoxFromPool ( ( double ) par2 + minX , ( double ) par3 + minY , ( double ) par4 + minZ , ( double ) par2 + maxX , ( double ) par3 + maxY , ( double ) par4 + maxZ ) ; } public boolean isOpaqueCube ( ) { return true ; } public boolean canCollideCheck ( int par1 , boolean par2 ) { return isCollidable ( ) ; } public boolean isCollidable ( ) { return true ; } public void updateTick ( World world , int i , int j , int k , Random random ) { } public void onBlockDestroyedByPlayer ( World world , int i , int j , int k , int l ) { } public void onNeighborBlockChange ( World world , int i , int j , int k , int l ) { } public int tickRate ( ) { return <NUM_LIT:10> ; } public void onBlockAdded ( World world , int i , int j , int k ) { } public void onBlockRemoval ( World world , int i , int j , int k ) { } public int quantityDropped ( Random par1Random ) { return <NUM_LIT:1> ; } public int idDropped ( int par1 , Random par2Random , int par3 ) { return blockID ; } public float blockStrength ( EntityPlayer par1EntityPlayer ) { if ( blockHardness < <NUM_LIT> ) { return <NUM_LIT> ; } if ( ! par1EntityPlayer . canHarvestBlock ( this ) ) { return <NUM_LIT> / blockHardness / <NUM_LIT> ; } else { return par1EntityPlayer . getCurrentPlayerStrVsBlock ( this ) / blockHardness / <NUM_LIT> ; } } public final void dropBlockAsItem ( World par1World , int par2 , int par3 , int par4 , int par5 , int par6 ) { dropBlockAsItemWithChance ( par1World , par2 , par3 , par4 , par5 , <NUM_LIT> , par6 ) ; } public void dropBlockAsItemWithChance ( World par1World , int par2 , int par3 , int par4 , int par5 , float par6 , int par7 ) { if ( par1World . isRemote ) { return ; } int i = quantityDroppedWithBonus ( par7 , par1World . rand ) ; for ( int j = <NUM_LIT:0> ; j < i ; j ++ ) { if ( par1World . rand . nextFloat ( ) > par6 ) { continue ; } int k = idDropped ( par5 , par1World . rand , par7 ) ; if ( k > <NUM_LIT:0> ) { dropBlockAsItem_do ( par1World , par2 , par3 , par4 , new ItemStack ( k , <NUM_LIT:1> , damageDropped ( par5 ) ) ) ; } } } protected void dropBlockAsItem_do ( World par1World , int par2 , int par3 , int par4 , ItemStack par5ItemStack ) { if ( par1World . isRemote ) { return ; } else { float f = <NUM_LIT> ; double d = ( double ) ( par1World . rand . nextFloat ( ) * f ) + ( double ) ( <NUM_LIT> - f ) * <NUM_LIT> ; double d1 = ( double ) ( par1World . rand . nextFloat ( ) * f ) + ( double ) ( <NUM_LIT> - f ) * <NUM_LIT> ; double d2 = ( double ) ( par1World . rand . nextFloat ( ) * f ) + ( double ) ( <NUM_LIT> - f ) * <NUM_LIT> ; EntityItem entityitem = new EntityItem ( par1World , ( double ) par2 + d , ( double ) par3 + d1 , ( double ) par4 + d2 , par5ItemStack ) ; entityitem . delayBeforeCanPickup = <NUM_LIT:10> ; par1World . spawnEntityInWorld ( entityitem ) ; return ; } } protected int damageDropped ( int par1 ) { return <NUM_LIT:0> ; } public float getExplosionResistance ( Entity par1Entity ) { return blockResistance / <NUM_LIT> ; } public MovingObjectPosition collisionRayTrace ( World par1World , int par2 , int par3 , int par4 , Vec3D par5Vec3D , Vec3D par6Vec3D ) { setBlockBoundsBasedOnState ( par1World , par2 , par3 , par4 ) ; par5Vec3D = par5Vec3D . addVector ( - par2 , - par3 , - par4 ) ; par6Vec3D = par6Vec3D . addVector ( - par2 , - par3 , - par4 ) ; Vec3D vec3d = par5Vec3D . getIntermediateWithXValue ( par6Vec3D , minX ) ; Vec3D vec3d1 = par5Vec3D . getIntermediateWithXValue ( par6Vec3D , maxX ) ; Vec3D vec3d2 = par5Vec3D . getIntermediateWithYValue ( par6Vec3D , minY ) ; Vec3D vec3d3 = par5Vec3D . getIntermediateWithYValue ( par6Vec3D , maxY ) ; Vec3D vec3d4 = par5Vec3D . getIntermediateWithZValue ( par6Vec3D , minZ ) ; Vec3D vec3d5 = par5Vec3D . getIntermediateWithZValue ( par6Vec3D , maxZ ) ; if ( ! isVecInsideYZBounds ( vec3d ) ) { vec3d = null ; } if ( ! isVecInsideYZBounds ( vec3d1 ) ) { vec3d1 = null ; } if ( ! isVecInsideXZBounds ( vec3d2 ) ) { vec3d2 = null ; } if ( ! isVecInsideXZBounds ( vec3d3 ) ) { vec3d3 = null ; } if ( ! isVecInsideXYBounds ( vec3d4 ) ) { vec3d4 = null ; } if ( ! isVecInsideXYBounds ( vec3d5 ) ) { vec3d5 = null ; } Vec3D vec3d6 = null ; if ( vec3d != null && ( vec3d6 == null || par5Vec3D . distanceTo ( vec3d ) < par5Vec3D . distanceTo ( vec3d6 ) ) ) { vec3d6 = vec3d ; } if ( vec3d1 != null && ( vec3d6 == null || par5Vec3D . distanceTo ( vec3d1 ) < par5Vec3D . distanceTo ( vec3d6 ) ) ) { vec3d6 = vec3d1 ; } if ( vec3d2 != null && ( vec3d6 == null || par5Vec3D . distanceTo ( vec3d2 ) < par5Vec3D . distanceTo ( vec3d6 ) ) ) { vec3d6 = vec3d2 ; } if ( vec3d3 != null && ( vec3d6 == null || par5Vec3D . distanceTo ( vec3d3 ) < par5Vec3D . distanceTo ( vec3d6 ) ) ) { vec3d6 = vec3d3 ; } if ( vec3d4 != null && ( vec3d6 == null || par5Vec3D . distanceTo ( vec3d4 ) < par5Vec3D . distanceTo ( vec3d6 ) ) ) { vec3d6 = vec3d4 ; } if ( vec3d5 != null && ( vec3d6 == null || par5Vec3D . distanceTo ( vec3d5 ) < par5Vec3D . distanceTo ( vec3d6 ) ) ) { vec3d6 = vec3d5 ; } if ( vec3d6 == null ) { return null ; } byte byte0 = - <NUM_LIT:1> ; if ( vec3d6 == vec3d ) { byte0 = <NUM_LIT:4> ; } if ( vec3d6 == vec3d1 ) { byte0 = <NUM_LIT:5> ; } if ( vec3d6 == vec3d2 ) { byte0 = <NUM_LIT:0> ; } if ( vec3d6 == vec3d3 ) { byte0 = <NUM_LIT:1> ; } if ( vec3d6 == vec3d4 ) { byte0 = <NUM_LIT:2> ; } if ( vec3d6 == vec3d5 ) { byte0 = <NUM_LIT:3> ; } return new MovingObjectPosition ( par2 , par3 , par4 , byte0 , vec3d6 . addVector ( par2 , par3 , par4 ) ) ; } private boolean isVecInsideYZBounds ( Vec3D par1Vec3D ) { if ( par1Vec3D == null ) { return false ; } else { return par1Vec3D . yCoord >= minY && par1Vec3D . yCoord <= maxY && par1Vec3D . zCoord >= minZ && par1Vec3D . zCoord <= maxZ ; } } private boolean isVecInsideXZBounds ( Vec3D par1Vec3D ) { if ( par1Vec3D == null ) { return false ; } else { return par1Vec3D . xCoord >= minX && par1Vec3D . xCoord <= maxX && par1Vec3D . zCoord >= minZ && par1Vec3D . zCoord <= maxZ ; } } private boolean isVecInsideXYBounds ( Vec3D par1Vec3D ) { if ( par1Vec3D == null ) { return false ; } else { return par1Vec3D . xCoord >= minX && par1Vec3D . xCoord <= maxX && par1Vec3D . yCoord >= minY && par1Vec3D . yCoord <= maxY ; } } public void onBlockDestroyedByExplosion ( World world , int i , int j , int k ) { } public boolean canPlaceBlockOnSide ( World par1World , int par2 , int par3 , int par4 , int par5 ) { return canPlaceBlockAt ( par1World , par2 , par3 , par4 ) ; } public boolean canPlaceBlockAt ( World par1World , int par2 , int par3 , int par4 ) { int i = par1World . getBlockId ( par2 , par3 , par4 ) ; return i == <NUM_LIT:0> || blocksList [ i ] . blockMaterial . isGroundCover ( ) ; } public boolean blockActivated ( World par1World , int par2 , int par3 , int i , EntityPlayer entityplayer ) { return false ; } public void onEntityWalking ( World world , int i , int j , int k , Entity entity ) { } public void onBlockPlaced ( World world , int i , int j , int k , int l ) { } public void onBlockClicked ( World world , int i , int j , int k , EntityPlayer entityplayer ) { } public void velocityToAddToEntity ( World world , int i , int j , int k , Entity entity , Vec3D vec3d ) { } public void setBlockBoundsBasedOnState ( IBlockAccess iblockaccess , int i , int j , int k ) { } public boolean isPoweringTo ( IBlockAccess par1IBlockAccess , int par2 , int par3 , int i , int j ) { return false ; } public boolean canProvidePower ( ) { return false ; } public void onEntityCollidedWithBlock ( World world , int i , int j , int k , Entity entity ) { } public boolean isIndirectlyPoweringTo ( World par1World , int par2 , int par3 , int i , int j ) { return false ; } public void setBlockBoundsForItemRender ( ) { } public void harvestBlock ( World par1World , EntityPlayer par2EntityPlayer , int par3 , int par4 , int par5 , int par6 ) { par2EntityPlayer . addStat ( StatList . mineBlockStatArray [ blockID ] , <NUM_LIT:1> ) ; par2EntityPlayer . addExhaustion ( <NUM_LIT> ) ; if ( func_50008_h ( ) && EnchantmentHelper . getSilkTouchModifier ( par2EntityPlayer . inventory ) ) { ItemStack itemstack = createStackedBlock ( par6 ) ; if ( itemstack != null ) { dropBlockAsItem_do ( par1World , par3 , par4 , par5 , itemstack ) ; } } else { int i = EnchantmentHelper . getFortuneModifier ( par2EntityPlayer . inventory ) ; dropBlockAsItem ( par1World , par3 , par4 , par5 , par6 , i ) ; } } protected boolean func_50008_h ( ) { return renderAsNormalBlock ( ) && ! isBlockContainer ; } protected ItemStack createStackedBlock ( int par1 ) { int i = <NUM_LIT:0> ; if ( blockID >= <NUM_LIT:0> && blockID < Item . itemsList . length && Item . itemsList [ blockID ] . getHasSubtypes ( ) ) { i = par1 ; } return new ItemStack ( blockID , <NUM_LIT:1> , i ) ; } public int quantityDroppedWithBonus ( int par1 , Random par2Random ) { return quantityDropped ( par2Random ) ; } public boolean canBlockStay ( World par1World , int par2 , int par3 , int i ) { return true ; } public void onBlockPlacedBy ( World world , int i , int j , int k , EntityLiving entityliving ) { } public Block setBlockName ( String par1Str ) { blockName = ( new StringBuilder ( ) ) . append ( "<STR_LIT>" ) . append ( par1Str ) . toString ( ) ; return this ; } public String translateBlockName ( ) { return StatCollector . translateToLocal ( ( new StringBuilder ( ) ) . append ( getBlockName ( ) ) . append ( "<STR_LIT>" ) . toString ( ) ) ; } public String getBlockName ( ) { return blockName ; } public void powerBlock ( World world , int i , int j , int k , int l , int i1 ) { } public boolean getEnableStats ( ) { return enableStats ; } protected Block disableStats ( ) { enableStats = false ; return this ; } public int getMobilityFlag ( ) { return blockMaterial . getMaterialMobility ( ) ; } public void onFallenUpon ( World world , int i , int j , int k , Entity entity , float f ) { } static { soundPowderFootstep = new StepSound ( "<STR_LIT>" , <NUM_LIT> , <NUM_LIT> ) ; soundWoodFootstep = new StepSound ( "<STR_LIT>" , <NUM_LIT> , <NUM_LIT> ) ; soundGravelFootstep = new StepSound ( "<STR_LIT>" , <NUM_LIT> , <NUM_LIT> ) ; soundGrassFootstep = new StepSound ( "<STR_LIT>" , <NUM_LIT> , <NUM_LIT> ) ; soundStoneFootstep = new StepSound ( "<STR_LIT>" , <NUM_LIT> , <NUM_LIT> ) ; soundMetalFootstep = new StepSound ( "<STR_LIT>" , <NUM_LIT> , <NUM_LIT> ) ; soundGlassFootstep = new StepSoundStone ( "<STR_LIT>" , <NUM_LIT> , <NUM_LIT> ) ; soundClothFootstep = new StepSound ( "<STR_LIT>" , <NUM_LIT> , <NUM_LIT> ) ; soundSandFootstep = new StepSoundSand ( "<STR_LIT>" , <NUM_LIT> , <NUM_LIT> ) ; blocksList = new Block [ <NUM_LIT> ] ; opaqueCubeLookup = new boolean [ <NUM_LIT> ] ; lightOpacity = new int [ <NUM_LIT> ] ; canBlockGrass = new boolean [ <NUM_LIT> ] ; lightValue = new int [ <NUM_LIT> ] ; requiresSelfNotify = new boolean [ <NUM_LIT> ] ; useNeighborBrightness = new boolean [ <NUM_LIT> ] ; stone = ( new BlockStone ( <NUM_LIT:1> , <NUM_LIT:1> ) ) . setHardness ( <NUM_LIT> ) . setResistance ( <NUM_LIT> ) . setStepSound ( soundStoneFootstep ) . setBlockName ( "<STR_LIT>" ) ; grass = ( BlockGrass ) ( new BlockGrass ( <NUM_LIT:2> ) ) . setHardness ( <NUM_LIT> ) . setStepSound ( soundGrassFootstep ) . setBlockName ( "<STR_LIT>" ) ; dirt = ( new BlockDirt ( <NUM_LIT:3> , <NUM_LIT:2> ) ) . setHardness ( <NUM_LIT> ) . setStepSound ( soundGravelFootstep ) . setBlockName ( "<STR_LIT>" ) ; cobblestone = ( new Block ( <NUM_LIT:4> , <NUM_LIT:16> , Material . rock ) ) . setHardness ( <NUM_LIT> ) . setResistance ( <NUM_LIT> ) . setStepSound ( soundStoneFootstep ) . setBlockName ( "<STR_LIT>" ) ; planks = ( new BlockWood ( <NUM_LIT:5> ) ) . setHardness ( <NUM_LIT> ) . setResistance ( <NUM_LIT> ) . setStepSound ( soundWoodFootstep ) . setBlockName ( "<STR_LIT>" ) . setRequiresSelfNotify ( ) ; sapling = ( new BlockSapling ( <NUM_LIT:6> , <NUM_LIT:15> ) ) . setHardness ( <NUM_LIT> ) . setStepSound ( soundGrassFootstep ) . setBlockName ( "<STR_LIT>" ) . setRequiresSelfNotify ( ) ; bedrock = ( new Block ( <NUM_LIT:7> , <NUM_LIT> , Material . rock ) ) . setBlockUnbreakable ( ) . setResistance ( <NUM_LIT> ) . setStepSound ( soundStoneFootstep ) . setBlockName ( "<STR_LIT>" ) . disableStats ( ) ; waterMoving = ( new BlockFlowing ( <NUM_LIT:8> , Material . water ) ) . setHardness ( <NUM_LIT> ) . setLightOpacity ( <NUM_LIT:3> ) . setBlockName ( "<STR_LIT>" ) . disableStats ( ) . setRequiresSelfNotify ( ) ; waterStill = ( new BlockStationary ( <NUM_LIT:9> , Material . water ) ) . setHardness ( <NUM_LIT> ) . setLightOpacity ( <NUM_LIT:3> ) . setBlockName ( "<STR_LIT>" ) . disableStats ( ) . setRequiresSelfNotify ( ) ; lavaMoving = ( new BlockFlowing ( <NUM_LIT:10> , Material . lava ) ) . setHardness ( <NUM_LIT> ) . setLightValue ( <NUM_LIT> ) . setLightOpacity ( <NUM_LIT:255> ) . setBlockName ( "<STR_LIT>" ) . disableStats ( ) . setRequiresSelfNotify ( ) ; lavaStill = ( new BlockStationary ( <NUM_LIT:11> , Material . lava ) ) . setHardness ( <NUM_LIT> ) . setLightValue ( <NUM_LIT> ) . setLightOpacity ( <NUM_LIT:255> ) . setBlockName ( "<STR_LIT>" ) . disableStats ( ) . setRequiresSelfNotify ( ) ; sand = ( new BlockSand ( <NUM_LIT:12> , <NUM_LIT> ) ) . setHardness ( <NUM_LIT> ) . setStepSound ( soundSandFootstep ) . setBlockName ( "<STR_LIT>" ) ; gravel = ( new BlockGravel ( <NUM_LIT> , <NUM_LIT> ) ) . setHardness ( <NUM_LIT> ) . setStepSound ( soundGravelFootstep ) . setBlockName ( "<STR_LIT>" ) ; oreGold = ( new BlockOre ( <NUM_LIT> , <NUM_LIT:32> ) ) . setHardness ( <NUM_LIT> ) . setResistance ( <NUM_LIT> ) . setStepSound ( soundStoneFootstep ) . setBlockName ( "<STR_LIT>" ) ; oreIron = ( new BlockOre ( <NUM_LIT:15> , <NUM_LIT> ) ) . setHardness ( <NUM_LIT> ) . setResistance ( <NUM_LIT> ) . setStepSound ( soundStoneFootstep ) . setBlockName ( "<STR_LIT>" ) ; oreCoal = ( new BlockOre ( <NUM_LIT:16> , <NUM_LIT> ) ) . setHardness ( <NUM_LIT> ) . setResistance ( <NUM_LIT> ) . setStepSound ( soundStoneFootstep ) . setBlockName ( "<STR_LIT>" ) ; wood = ( new BlockLog ( <NUM_LIT> ) ) . setHardness ( <NUM_LIT> ) . setStepSound ( soundWoodFootstep ) . setBlockName ( "<STR_LIT>" ) . setRequiresSelfNotify ( ) ; leaves = ( BlockLeaves ) ( new BlockLeaves ( <NUM_LIT> , <NUM_LIT> ) ) . setHardness ( <NUM_LIT> ) . setLightOpacity ( <NUM_LIT:1> ) . setStepSound ( soundGrassFootstep ) . setBlockName ( "<STR_LIT>" ) . setRequiresSelfNotify ( ) ; sponge = ( new BlockSponge ( <NUM_LIT> ) ) . setHardness ( <NUM_LIT> ) . setStepSound ( soundGrassFootstep ) . setBlockName ( "<STR_LIT>" ) ; glass = ( new BlockGlass ( <NUM_LIT:20> , <NUM_LIT> , Material . glass , false ) ) . setHardness ( <NUM_LIT> ) . setStepSound ( soundGlassFootstep ) . setBlockName ( "<STR_LIT>" ) ; oreLapis = ( new BlockOre ( <NUM_LIT> , <NUM_LIT> ) ) . setHardness ( <NUM_LIT> ) . setResistance ( <NUM_LIT> ) . setStepSound ( soundStoneFootstep ) . setBlockName ( "<STR_LIT>" ) ; blockLapis = ( new Block ( <NUM_LIT> , <NUM_LIT> , Material . rock ) ) . setHardness ( <NUM_LIT> ) . setResistance ( <NUM_LIT> ) . setStepSound ( soundStoneFootstep ) . setBlockName ( "<STR_LIT>" ) ; dispenser = ( new BlockDispenser ( <NUM_LIT> ) ) . setHardness ( <NUM_LIT> ) . setStepSound ( soundStoneFootstep ) . setBlockName ( "<STR_LIT>" ) . setRequiresSelfNotify ( ) ; sandStone = ( new BlockSandStone ( <NUM_LIT:24> ) ) . setStepSound ( soundStoneFootstep ) . setHardness ( <NUM_LIT> ) . setBlockName ( "<STR_LIT>" ) . setRequiresSelfNotify ( ) ; music = ( new BlockNote ( <NUM_LIT> ) ) . setHardness ( <NUM_LIT> ) . setBlockName ( "<STR_LIT>" ) . setRequiresSelfNotify ( ) ; bed = ( new BlockBed ( <NUM_LIT> ) ) . setHardness ( <NUM_LIT> ) . setBlockName ( "<STR_LIT>" ) . disableStats ( ) . setRequiresSelfNotify ( ) ; railPowered = ( new BlockRail ( <NUM_LIT> , <NUM_LIT> , true ) ) . setHardness ( <NUM_LIT> ) . setStepSound ( soundMetalFootstep ) . setBlockName ( "<STR_LIT>" ) . setRequiresSelfNotify ( ) ; railDetector = ( new BlockDetectorRail ( <NUM_LIT> , <NUM_LIT> ) ) . setHardness ( <NUM_LIT> ) . setStepSound ( soundMetalFootstep ) . setBlockName ( "<STR_LIT>" ) . setRequiresSelfNotify ( ) ; pistonStickyBase = ( new BlockPistonBase ( <NUM_LIT> , <NUM_LIT> , true ) ) . setBlockName ( "<STR_LIT>" ) . setRequiresSelfNotify ( ) ; web = ( new BlockWeb ( <NUM_LIT:30> , <NUM_LIT:11> ) ) . setLightOpacity ( <NUM_LIT:1> ) . setHardness ( <NUM_LIT> ) . setBlockName ( "<STR_LIT>" ) ; tallGrass = ( BlockTallGrass ) ( new BlockTallGrass ( <NUM_LIT:31> , <NUM_LIT> ) ) . setHardness ( <NUM_LIT> ) . setStepSound ( soundGrassFootstep ) . setBlockName ( "<STR_LIT>" ) ; deadBush = ( BlockDeadBush ) ( new BlockDeadBush ( <NUM_LIT:32> , <NUM_LIT> ) ) . setHardness ( <NUM_LIT> ) . setStepSound ( soundGrassFootstep ) . setBlockName ( "<STR_LIT>" ) ; pistonBase = ( new BlockPistonBase ( <NUM_LIT> , <NUM_LIT> , false ) ) . setBlockName ( "<STR_LIT>" ) . setRequiresSelfNotify ( ) ; pistonExtension = ( BlockPistonExtension ) ( new BlockPistonExtension ( <NUM_LIT> , <NUM_LIT> ) ) . setRequiresSelfNotify ( ) ; cloth = ( new BlockCloth ( ) ) . setHardness ( <NUM_LIT> ) . setStepSound ( soundClothFootstep ) . setBlockName ( "<STR_LIT>" ) . setRequiresSelfNotify ( ) ; pistonMoving = new BlockPistonMoving ( <NUM_LIT> ) ; plantYellow = ( BlockFlower ) ( new BlockFlower ( <NUM_LIT> , <NUM_LIT> ) ) . setHardness ( <NUM_LIT> ) . setStepSound ( soundGrassFootstep ) . setBlockName ( "<STR_LIT>" ) ; plantRed = ( BlockFlower ) ( new BlockFlower ( <NUM_LIT> , <NUM_LIT:12> ) ) . setHardness ( <NUM_LIT> ) . setStepSound ( soundGrassFootstep ) . setBlockName ( "<STR_LIT>" ) ; mushroomBrown = ( BlockFlower ) ( new BlockMushroom ( <NUM_LIT> , <NUM_LIT> ) ) . setHardness ( <NUM_LIT> ) . setStepSound ( soundGrassFootstep ) . setLightValue ( <NUM_LIT> ) . setBlockName ( "<STR_LIT>" ) ; mushroomRed = ( BlockFlower ) ( new BlockMushroom ( <NUM_LIT> , <NUM_LIT> ) ) . setHardness ( <NUM_LIT> ) . setStepSound ( soundGrassFootstep ) . setBlockName ( "<STR_LIT>" ) ; blockGold = ( new BlockOreStorage ( <NUM_LIT> , <NUM_LIT> ) ) . setHardness ( <NUM_LIT> ) . setResistance ( <NUM_LIT> ) . setStepSound ( soundMetalFootstep ) . setBlockName ( "<STR_LIT>" ) ; blockSteel = ( new BlockOreStorage ( <NUM_LIT> , <NUM_LIT> ) ) . setHardness ( <NUM_LIT> ) . setResistance ( <NUM_LIT> ) . setStepSound ( soundMetalFootstep ) . setBlockName ( "<STR_LIT>" ) ; stairDouble = ( new BlockStep ( <NUM_LIT> , true ) ) . setHardness ( <NUM_LIT> ) . setResistance ( <NUM_LIT> ) . setStepSound ( soundStoneFootstep ) . setBlockName ( "<STR_LIT>" ) ; stairSingle = ( new BlockStep ( <NUM_LIT> , false ) ) . setHardness ( <NUM_LIT> ) . setResistance ( <NUM_LIT> ) . setStepSound ( soundStoneFootstep ) . setBlockName ( "<STR_LIT>" ) ; brick = ( new Block ( <NUM_LIT> , <NUM_LIT:7> , Material . rock ) ) . setHardness ( <NUM_LIT> ) . setResistance ( <NUM_LIT> ) . setStepSound ( soundStoneFootstep ) . setBlockName ( "<STR_LIT>" ) ; tnt = ( new BlockTNT ( <NUM_LIT> , <NUM_LIT:8> ) ) . setHardness ( <NUM_LIT> ) . setStepSound ( soundGrassFootstep ) . setBlockName ( "<STR_LIT>" ) ; bookShelf = ( new BlockBookshelf ( <NUM_LIT> , <NUM_LIT> ) ) . setHardness ( <NUM_LIT> ) . setStepSound ( soundWoodFootstep ) . setBlockName ( "<STR_LIT>" ) ; cobblestoneMossy = ( new Block ( <NUM_LIT> , <NUM_LIT> , Material . rock ) ) . setHardness ( <NUM_LIT> ) . setResistance ( <NUM_LIT> ) . setStepSound ( soundStoneFootstep ) . setBlockName ( "<STR_LIT>" ) ; obsidian = ( new BlockObsidian ( <NUM_LIT> , <NUM_LIT> ) ) . setHardness ( <NUM_LIT> ) . setResistance ( <NUM_LIT> ) . setStepSound ( soundStoneFootstep ) . setBlockName ( "<STR_LIT>" ) ; torchWood = ( new BlockTorch ( <NUM_LIT> , <NUM_LIT> ) ) . setHardness ( <NUM_LIT> ) . setLightValue ( <NUM_LIT> ) . setStepSound ( soundWoodFootstep ) . setBlockName ( "<STR_LIT>" ) . setRequiresSelfNotify ( ) ; fire = ( BlockFire ) ( new BlockFire ( <NUM_LIT> , <NUM_LIT:31> ) ) . setHardness ( <NUM_LIT> ) . setLightValue ( <NUM_LIT> ) . setStepSound ( soundWoodFootstep ) . setBlockName ( "<STR_LIT>" ) . disableStats ( ) ; mobSpawner = ( new BlockMobSpawner ( <NUM_LIT> , <NUM_LIT> ) ) . setHardness ( <NUM_LIT> ) . setStepSound ( soundMetalFootstep ) . setBlockName ( "<STR_LIT>" ) . disableStats ( ) ; stairCompactPlanks = ( new BlockStairs ( <NUM_LIT> , planks ) ) . setBlockName ( "<STR_LIT>" ) . setRequiresSelfNotify ( ) ; chest = ( new BlockChest ( <NUM_LIT> ) ) . setHardness ( <NUM_LIT> ) . setStepSound ( soundWoodFootstep ) . setBlockName ( "<STR_LIT>" ) . setRequiresSelfNotify ( ) ; redstoneWire = ( new BlockRedstoneWire ( <NUM_LIT> , <NUM_LIT> ) ) . setHardness ( <NUM_LIT> ) . setStepSound ( soundPowderFootstep ) . setBlockName ( "<STR_LIT>" ) . disableStats ( ) . setRequiresSelfNotify ( ) ; oreDiamond = ( new BlockOre ( <NUM_LIT> , <NUM_LIT> ) ) . setHardness ( <NUM_LIT> ) . setResistance ( <NUM_LIT> ) . setStepSound ( soundStoneFootstep ) . setBlockName ( "<STR_LIT>" ) ; blockDiamond = ( new BlockOreStorage ( <NUM_LIT> , <NUM_LIT:24> ) ) . setHardness ( <NUM_LIT> ) . setResistance ( <NUM_LIT> ) . setStepSound ( soundMetalFootstep ) . setBlockName ( "<STR_LIT>" ) ; workbench = ( new BlockWorkbench ( <NUM_LIT> ) ) . setHardness ( <NUM_LIT> ) . setStepSound ( soundWoodFootstep ) . setBlockName ( "<STR_LIT>" ) ; crops = ( new BlockCrops ( <NUM_LIT> , <NUM_LIT> ) ) . setHardness ( <NUM_LIT> ) . setStepSound ( soundGrassFootstep ) . setBlockName ( "<STR_LIT>" ) . disableStats ( ) . setRequiresSelfNotify ( ) ; tilledField = ( new BlockFarmland ( <NUM_LIT> ) ) . setHardness ( <NUM_LIT> ) . setStepSound ( soundGravelFootstep ) . setBlockName ( "<STR_LIT>" ) . setRequiresSelfNotify ( ) ; stoneOvenIdle = ( new BlockFurnace ( <NUM_LIT> , false ) ) . setHardness ( <NUM_LIT> ) . setStepSound ( soundStoneFootstep ) . setBlockName ( "<STR_LIT>" ) . setRequiresSelfNotify ( ) ; stoneOvenActive = ( new BlockFurnace ( <NUM_LIT> , true ) ) . setHardness ( <NUM_LIT> ) . setStepSound ( soundStoneFootstep ) . setLightValue ( <NUM_LIT> ) . setBlockName ( "<STR_LIT>" ) . setRequiresSelfNotify ( ) ; signPost = ( new BlockSign ( <NUM_LIT> , net . minecraft . src . TileEntitySign . class , true ) ) . setHardness ( <NUM_LIT> ) . setStepSound ( soundWoodFootstep ) . setBlockName ( "<STR_LIT>" ) . disableStats ( ) . setRequiresSelfNotify ( ) ; doorWood = ( new BlockDoor ( <NUM_LIT> , Material . wood ) ) . setHardness ( <NUM_LIT> ) . setStepSound ( soundWoodFootstep ) . setBlockName ( "<STR_LIT>" ) . disableStats ( ) . setRequiresSelfNotify ( ) ; ladder = ( new BlockLadder ( <NUM_LIT> , <NUM_LIT> ) ) . setHardness ( <NUM_LIT> ) . setStepSound ( soundWoodFootstep ) . setBlockName ( "<STR_LIT>" ) . setRequiresSelfNotify ( ) ; rail = ( new BlockRail ( <NUM_LIT> , <NUM_LIT> , false ) ) . setHardness ( <NUM_LIT> ) . setStepSound ( soundMetalFootstep ) . setBlockName ( "<STR_LIT>" ) . setRequiresSelfNotify ( ) ; stairCompactCobblestone = ( new BlockStairs ( <NUM_LIT> , cobblestone ) ) . setBlockName ( "<STR_LIT>" ) . setRequiresSelfNotify ( ) ; signWall = ( new BlockSign ( <NUM_LIT> , net . minecraft . src . TileEntitySign . class , false ) ) . setHardness ( <NUM_LIT> ) . setStepSound ( soundWoodFootstep ) . setBlockName ( "<STR_LIT>" ) . disableStats ( ) . setRequiresSelfNotify ( ) ; lever = ( new BlockLever ( <NUM_LIT> , <NUM_LIT> ) ) . setHardness ( <NUM_LIT> ) . setStepSound ( soundWoodFootstep ) . setBlockName ( "<STR_LIT>" ) . setRequiresSelfNotify ( ) ; pressurePlateStone = ( new BlockPressurePlate ( <NUM_LIT> , stone . blockIndexInTexture , EnumMobType . mobs , Material . rock ) ) . setHardness ( <NUM_LIT> ) . setStepSound ( soundStoneFootstep ) . setBlockName ( "<STR_LIT>" ) . setRequiresSelfNotify ( ) ; doorSteel = ( new BlockDoor ( <NUM_LIT> , Material . iron ) ) . setHardness ( <NUM_LIT> ) . setStepSound ( soundMetalFootstep ) . setBlockName ( "<STR_LIT>" ) . disableStats ( ) . setRequiresSelfNotify ( ) ; pressurePlatePlanks = ( new BlockPressurePlate ( <NUM_LIT> , planks . blockIndexInTexture , EnumMobType . everything , Material . wood ) ) . setHardness ( <NUM_LIT> ) . setStepSound ( soundWoodFootstep ) . setBlockName ( "<STR_LIT>" ) . setRequiresSelfNotify ( ) ; oreRedstone = ( new BlockRedstoneOre ( <NUM_LIT> , <NUM_LIT> , false ) ) . setHardness ( <NUM_LIT> ) . setResistance ( <NUM_LIT> ) . setStepSound ( soundStoneFootstep ) . setBlockName ( "<STR_LIT>" ) . setRequiresSelfNotify ( ) ; oreRedstoneGlowing = ( new BlockRedstoneOre ( <NUM_LIT> , <NUM_LIT> , true ) ) . setLightValue ( <NUM_LIT> ) . setHardness ( <NUM_LIT> ) . setResistance ( <NUM_LIT> ) . setStepSound ( soundStoneFootstep ) . setBlockName ( "<STR_LIT>" ) . setRequiresSelfNotify ( ) ; torchRedstoneIdle = ( new BlockRedstoneTorch ( <NUM_LIT> , <NUM_LIT> , false ) ) . setHardness ( <NUM_LIT> ) . setStepSound ( soundWoodFootstep ) . setBlockName ( "<STR_LIT>" ) . setRequiresSelfNotify ( ) ; torchRedstoneActive = ( new BlockRedstoneTorch ( <NUM_LIT> , <NUM_LIT> , true ) ) . setHardness ( <NUM_LIT> ) . setLightValue ( <NUM_LIT> ) . setStepSound ( soundWoodFootstep ) . setBlockName ( "<STR_LIT>" ) . setRequiresSelfNotify ( ) ; button = ( new BlockButton ( <NUM_LIT> , stone . blockIndexInTexture ) ) . setHardness ( <NUM_LIT> ) . setStepSound ( soundStoneFootstep ) . setBlockName ( "<STR_LIT>" ) . setRequiresSelfNotify ( ) ; snow = ( new BlockSnow ( <NUM_LIT> , <NUM_LIT> ) ) . setHardness ( <NUM_LIT> ) . setStepSound ( soundClothFootstep ) . setBlockName ( "<STR_LIT>" ) . setLightOpacity ( <NUM_LIT:0> ) ; ice = ( new BlockIce ( <NUM_LIT> , <NUM_LIT> ) ) . setHardness ( <NUM_LIT> ) . setLightOpacity ( <NUM_LIT:3> ) . setStepSound ( soundGlassFootstep ) . setBlockName ( "<STR_LIT>" ) ; blockSnow = ( new BlockSnowBlock ( <NUM_LIT> , <NUM_LIT> ) ) . setHardness ( <NUM_LIT> ) . setStepSound ( soundClothFootstep ) . setBlockName ( "<STR_LIT>" ) ; cactus = ( new BlockCactus ( <NUM_LIT> , <NUM_LIT> ) ) . setHardness ( <NUM_LIT> ) . setStepSound ( soundClothFootstep ) . setBlockName ( "<STR_LIT>" ) ; blockClay = ( new BlockClay ( <NUM_LIT> , <NUM_LIT> ) ) . setHardness ( <NUM_LIT> ) . setStepSound ( soundGravelFootstep ) . setBlockName ( "<STR_LIT>" ) ; reed = ( new BlockReed ( <NUM_LIT> , <NUM_LIT> ) ) . setHardness ( <NUM_LIT> ) . setStepSound ( soundGrassFootstep ) . setBlockName ( "<STR_LIT>" ) . disableStats ( ) ; jukebox = ( new BlockJukeBox ( <NUM_LIT> , <NUM_LIT> ) ) . setHardness ( <NUM_LIT> ) . setResistance ( <NUM_LIT> ) . setStepSound ( soundStoneFootstep ) . setBlockName ( "<STR_LIT>" ) . setRequiresSelfNotify ( ) ; fence = ( new BlockFence ( <NUM_LIT> , <NUM_LIT:4> ) ) . setHardness ( <NUM_LIT> ) . setResistance ( <NUM_LIT> ) . setStepSound ( soundWoodFootstep ) . setBlockName ( "<STR_LIT>" ) ; pumpkin = ( new BlockPumpkin ( <NUM_LIT> , <NUM_LIT> , false ) ) . setHardness ( <NUM_LIT> ) . setStepSound ( soundWoodFootstep ) . setBlockName ( "<STR_LIT>" ) . setRequiresSelfNotify ( ) ; netherrack = ( new BlockNetherrack ( <NUM_LIT> , <NUM_LIT> ) ) . setHardness ( <NUM_LIT> ) . setStepSound ( soundStoneFootstep ) . setBlockName ( "<STR_LIT>" ) ; slowSand = ( new BlockSoulSand ( <NUM_LIT> , <NUM_LIT> ) ) . setHardness ( <NUM_LIT> ) . setStepSound ( soundSandFootstep ) . setBlockName ( "<STR_LIT>" ) ; glowStone = ( new BlockGlowStone ( <NUM_LIT> , <NUM_LIT> , Material . glass ) ) . setHardness ( <NUM_LIT> ) . setStepSound ( soundGlassFootstep ) . setLightValue ( <NUM_LIT> ) . setBlockName ( "<STR_LIT>" ) ; portal = ( BlockPortal ) ( new BlockPortal ( <NUM_LIT> , <NUM_LIT> ) ) . setHardness ( - <NUM_LIT> ) . setStepSound ( soundGlassFootstep ) . setLightValue ( <NUM_LIT> ) . setBlockName ( "<STR_LIT>" ) ; pumpkinLantern = ( new BlockPumpkin ( <NUM_LIT> , <NUM_LIT> , true ) ) . setHardness ( <NUM_LIT> ) . setStepSound ( soundWoodFootstep ) . setLightValue ( <NUM_LIT> ) . setBlockName ( "<STR_LIT>" ) . setRequiresSelfNotify ( ) ; cake = ( new BlockCake ( <NUM_LIT> , <NUM_LIT> ) ) . setHardness ( <NUM_LIT> ) . setStepSound ( soundClothFootstep ) . setBlockName ( "<STR_LIT>" ) . disableStats ( ) . setRequiresSelfNotify ( ) ; redstoneRepeaterIdle = ( new BlockRedstoneRepeater ( <NUM_LIT> , false ) ) . setHardness ( <NUM_LIT> ) . setStepSound ( soundWoodFootstep ) . setBlockName ( "<STR_LIT>" ) . disableStats ( ) . setRequiresSelfNotify ( ) ; redstoneRepeaterActive = ( new BlockRedstoneRepeater ( <NUM_LIT> , true ) ) . setHardness ( <NUM_LIT> ) . setLightValue ( <NUM_LIT> ) . setStepSound ( soundWoodFootstep ) . setBlockName ( "<STR_LIT>" ) . disableStats ( ) . setRequiresSelfNotify ( ) ; lockedChest = ( new BlockLockedChest ( <NUM_LIT> ) ) . setHardness ( <NUM_LIT> ) . setLightValue ( <NUM_LIT> ) . setStepSound ( soundWoodFootstep ) . setBlockName ( "<STR_LIT>" ) . setTickRandomly ( true ) . setRequiresSelfNotify ( ) ; trapdoor = ( new BlockTrapDoor ( <NUM_LIT> , Material . wood ) ) . setHardness ( <NUM_LIT> ) . setStepSound ( soundWoodFootstep ) . setBlockName ( "<STR_LIT>" ) . disableStats ( ) . setRequiresSelfNotify ( ) ; silverfish = ( new BlockSilverfish ( <NUM_LIT> ) ) . setHardness ( <NUM_LIT> ) ; stoneBrick = ( new BlockStoneBrick ( <NUM_LIT> ) ) . setHardness ( <NUM_LIT> ) . setResistance ( <NUM_LIT> ) . setStepSound ( soundStoneFootstep ) . setBlockName ( "<STR_LIT>" ) ; mushroomCapBrown = ( new BlockMushroomCap ( <NUM_LIT> , Material . wood , <NUM_LIT> , <NUM_LIT:0> ) ) . setHardness ( <NUM_LIT> ) . setStepSound ( soundWoodFootstep ) . setBlockName ( "<STR_LIT>" ) . setRequiresSelfNotify ( ) ; mushroomCapRed = ( new BlockMushroomCap ( <NUM_LIT:100> , Material . wood , <NUM_LIT> , <NUM_LIT:1> ) ) . setHardness ( <NUM_LIT> ) . setStepSound ( soundWoodFootstep ) . setBlockName ( "<STR_LIT>" ) . setRequiresSelfNotify ( ) ; fenceIron = ( new BlockPane ( <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , Material . iron , true ) ) . setHardness ( <NUM_LIT> ) . setResistance ( <NUM_LIT> ) . setStepSound ( soundMetalFootstep ) . setBlockName ( "<STR_LIT>" ) ; thinGlass = ( new BlockPane ( <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , Material . glass , false ) ) . setHardness ( <NUM_LIT> ) . setStepSound ( soundGlassFootstep ) . setBlockName ( "<STR_LIT>" ) ; melon = ( new BlockMelon ( <NUM_LIT> ) ) . setHardness ( <NUM_LIT> ) . setStepSound ( soundWoodFootstep ) . setBlockName ( "<STR_LIT>" ) ; pumpkinStem = ( new BlockStem ( <NUM_LIT> , pumpkin ) ) . setHardness ( <NUM_LIT> ) . setStepSound ( soundWoodFootstep ) . setBlockName ( "<STR_LIT>" ) . setRequiresSelfNotify ( ) ; melonStem = ( new BlockStem ( <NUM_LIT> , melon ) ) . setHardness ( <NUM_LIT> ) . setStepSound ( soundWoodFootstep ) . setBlockName ( "<STR_LIT>" ) . setRequiresSelfNotify ( ) ; vine = ( new BlockVine ( <NUM_LIT> ) ) . setHardness ( <NUM_LIT> ) . setStepSound ( soundGrassFootstep ) . setBlockName ( "<STR_LIT>" ) . setRequiresSelfNotify ( ) ; fenceGate = ( new BlockFenceGate ( <NUM_LIT> , <NUM_LIT:4> ) ) . setHardness ( <NUM_LIT> ) . setResistance ( <NUM_LIT> ) . setStepSound ( soundWoodFootstep ) . setBlockName ( "<STR_LIT>" ) . setRequiresSelfNotify ( ) ; stairsBrick = ( new BlockStairs ( <NUM_LIT> , brick ) ) . setBlockName ( "<STR_LIT>" ) . setRequiresSelfNotify ( ) ; stairsStoneBrickSmooth = ( new BlockStairs ( <NUM_LIT> , stoneBrick ) ) . setBlockName ( "<STR_LIT>" ) . setRequiresSelfNotify ( ) ; mycelium = ( BlockMycelium ) ( new BlockMycelium ( <NUM_LIT> ) ) . setHardness ( <NUM_LIT> ) . setStepSound ( soundGrassFootstep ) . setBlockName ( "<STR_LIT>" ) ; waterlily = ( new BlockLilyPad ( <NUM_LIT> , <NUM_LIT> ) ) . setHardness ( <NUM_LIT> ) . setStepSound ( soundGrassFootstep ) . setBlockName ( "<STR_LIT>" ) ; netherBrick = ( new Block ( <NUM_LIT> , <NUM_LIT> , Material . rock ) ) . setHardness ( <NUM_LIT> ) . setResistance ( <NUM_LIT> ) . setStepSound ( soundStoneFootstep ) . setBlockName ( "<STR_LIT>" ) ; netherFence = ( new BlockFence ( <NUM_LIT> , <NUM_LIT> , Material . rock ) ) . setHardness ( <NUM_LIT> ) . setResistance ( <NUM_LIT> ) . setStepSound ( soundStoneFootstep ) . setBlockName ( "<STR_LIT>" ) ; stairsNetherBrick = ( new BlockStairs ( <NUM_LIT> , netherBrick ) ) . setBlockName ( "<STR_LIT>" ) . setRequiresSelfNotify ( ) ; netherStalk = ( new BlockNetherStalk ( <NUM_LIT> ) ) . setBlockName ( "<STR_LIT>" ) . setRequiresSelfNotify ( ) ; enchantmentTable = ( new BlockEnchantmentTable ( <NUM_LIT> ) ) . setHardness ( <NUM_LIT> ) . setResistance ( <NUM_LIT> ) . setBlockName ( "<STR_LIT>" ) ; brewingStand = ( new BlockBrewingStand ( <NUM_LIT> ) ) . setHardness ( <NUM_LIT> ) . setLightValue ( <NUM_LIT> ) . setBlockName ( "<STR_LIT>" ) . setRequiresSelfNotify ( ) ; cauldron = ( new BlockCauldron ( <NUM_LIT> ) ) . setHardness ( <NUM_LIT> ) . setBlockName ( "<STR_LIT>" ) . setRequiresSelfNotify ( ) ; endPortal = ( new BlockEndPortal ( <NUM_LIT> , Material . portal ) ) . setHardness ( - <NUM_LIT> ) . setResistance ( <NUM_LIT> ) ; endPortalFrame = ( new BlockEndPortalFrame ( <NUM_LIT> ) ) . setStepSound ( soundGlassFootstep ) . setLightValue ( <NUM_LIT> ) . setHardness ( - <NUM_LIT> ) . setBlockName ( "<STR_LIT>" ) . setRequiresSelfNotify ( ) . setResistance ( <NUM_LIT> ) ; whiteStone = ( new Block ( <NUM_LIT> , <NUM_LIT> , Material . rock ) ) . setHardness ( <NUM_LIT> ) . setResistance ( <NUM_LIT> ) . setStepSound ( soundStoneFootstep ) . setBlockName ( "<STR_LIT>" ) ; dragonEgg = ( new BlockDragonEgg ( <NUM_LIT> , <NUM_LIT> ) ) . setHardness ( <NUM_LIT> ) . setResistance ( <NUM_LIT> ) . setStepSound ( soundStoneFootstep ) . setLightValue ( <NUM_LIT> ) . setBlockName ( "<STR_LIT>" ) ; redstoneLampIdle = ( new BlockRedstoneLight ( <NUM_LIT> , false ) ) . setHardness ( <NUM_LIT> ) . setStepSound ( soundGlassFootstep ) . setBlockName ( "<STR_LIT>" ) ; redstoneLampActive = ( new BlockRedstoneLight ( <NUM_LIT> , true ) ) . setHardness ( <NUM_LIT> ) . setStepSound ( soundGlassFootstep ) . setBlockName ( "<STR_LIT>" ) ; Item . itemsList [ cloth . blockID ] = ( new ItemCloth ( cloth . blockID - <NUM_LIT> ) ) . setItemName ( "<STR_LIT>" ) ; Item . itemsList [ wood . blockID ] = ( new ItemMetadata ( wood . blockID - <NUM_LIT> , wood ) ) . setItemName ( "<STR_LIT>" ) ; Item . itemsList [ planks . blockID ] = ( new ItemMetadata ( planks . blockID - <NUM_LIT> , planks ) ) . setItemName ( "<STR_LIT>" ) ; Item . itemsList [ stoneBrick . blockID ] = ( new ItemMetadata ( stoneBrick . blockID - <NUM_LIT> , stoneBrick ) ) . setItemName ( "<STR_LIT>" ) ; Item . itemsList [ sandStone . blockID ] = ( new ItemMetadata ( sandStone . blockID - <NUM_LIT> , sandStone ) ) . setItemName ( "<STR_LIT>" ) ; Item . itemsList [ stairSingle . blockID ] = ( new ItemSlab ( stairSingle . blockID - <NUM_LIT> ) ) . setItemName ( "<STR_LIT>" ) ; Item . itemsList [ sapling . blockID ] = ( new ItemSapling ( sapling . blockID - <NUM_LIT> ) ) . setItemName ( "<STR_LIT>" ) ; Item . itemsList [ leaves . blockID ] = ( new ItemLeaves ( leaves . blockID - <NUM_LIT> ) ) . setItemName ( "<STR_LIT>" ) ; Item . itemsList [ vine . blockID ] = new ItemColored ( vine . blockID - <NUM_LIT> , false ) ; Item . itemsList [ tallGrass . blockID ] = ( new ItemColored ( tallGrass . blockID - <NUM_LIT> , true ) ) . setBlockNames ( new String [ ] { "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" } ) ; Item . itemsList [ waterlily . blockID ] = new ItemLilyPad ( waterlily . blockID - <NUM_LIT> ) ; Item . itemsList [ pistonBase . blockID ] = new ItemPiston ( pistonBase . blockID - <NUM_LIT> ) ; Item . itemsList [ pistonStickyBase . blockID ] = new ItemPiston ( pistonStickyBase . blockID - <NUM_LIT> ) ; for ( int i = <NUM_LIT:0> ; i < <NUM_LIT> ; i ++ ) { if ( blocksList [ i ] == null ) { continue ; } if ( Item . itemsList [ i ] == null ) { Item . itemsList [ i ] = new ItemBlock ( i - <NUM_LIT> ) ; blocksList [ i ] . initializeBlock ( ) ; } boolean flag = false ; if ( i > <NUM_LIT:0> && blocksList [ i ] . getRenderType ( ) == <NUM_LIT:10> ) { flag = true ; } if ( i > <NUM_LIT:0> && ( blocksList [ i ] instanceof BlockStep ) ) { flag = true ; } if ( i == tilledField . blockID ) { flag = true ; } if ( canBlockGrass [ i ] ) { flag = true ; } useNeighborBrightness [ i ] = flag ; } canBlockGrass [ <NUM_LIT:0> ] = true ; StatList . initBreakableStats ( ) ; } } </s>
<s> package net . minecraft . src ; public class GenLayerVoronoiZoom extends GenLayer { public GenLayerVoronoiZoom ( long par1 , GenLayer par3GenLayer ) { super ( par1 ) ; super . parent = par3GenLayer ; } public int [ ] getInts ( int par1 , int par2 , int par3 , int par4 ) { par1 -= <NUM_LIT:2> ; par2 -= <NUM_LIT:2> ; byte byte0 = <NUM_LIT:2> ; int i = <NUM_LIT:1> << byte0 ; int j = par1 > > byte0 ; int k = par2 > > byte0 ; int l = ( par3 > > byte0 ) + <NUM_LIT:3> ; int i1 = ( par4 > > byte0 ) + <NUM_LIT:3> ; int ai [ ] = parent . getInts ( j , k , l , i1 ) ; int j1 = l << byte0 ; int k1 = i1 << byte0 ; int ai1 [ ] = IntCache . getIntCache ( j1 * k1 ) ; for ( int l1 = <NUM_LIT:0> ; l1 < i1 - <NUM_LIT:1> ; l1 ++ ) { int i2 = ai [ <NUM_LIT:0> + ( l1 + <NUM_LIT:0> ) * l ] ; int k2 = ai [ <NUM_LIT:0> + ( l1 + <NUM_LIT:1> ) * l ] ; for ( int l2 = <NUM_LIT:0> ; l2 < l - <NUM_LIT:1> ; l2 ++ ) { double d = ( double ) i * <NUM_LIT> ; initChunkSeed ( l2 + j << byte0 , l1 + k << byte0 ) ; double d1 = ( ( double ) nextInt ( <NUM_LIT> ) / <NUM_LIT> - <NUM_LIT> ) * d ; double d2 = ( ( double ) nextInt ( <NUM_LIT> ) / <NUM_LIT> - <NUM_LIT> ) * d ; initChunkSeed ( l2 + j + <NUM_LIT:1> << byte0 , l1 + k << byte0 ) ; double d3 = ( ( double ) nextInt ( <NUM_LIT> ) / <NUM_LIT> - <NUM_LIT> ) * d + ( double ) i ; double d4 = ( ( double ) nextInt ( <NUM_LIT> ) / <NUM_LIT> - <NUM_LIT> ) * d ; initChunkSeed ( l2 + j << byte0 , l1 + k + <NUM_LIT:1> << byte0 ) ; double d5 = ( ( double ) nextInt ( <NUM_LIT> ) / <NUM_LIT> - <NUM_LIT> ) * d ; double d6 = ( ( double ) nextInt ( <NUM_LIT> ) / <NUM_LIT> - <NUM_LIT> ) * d + ( double ) i ; initChunkSeed ( l2 + j + <NUM_LIT:1> << byte0 , l1 + k + <NUM_LIT:1> << byte0 ) ; double d7 = ( ( double ) nextInt ( <NUM_LIT> ) / <NUM_LIT> - <NUM_LIT> ) * d + ( double ) i ; double d8 = ( ( double ) nextInt ( <NUM_LIT> ) / <NUM_LIT> - <NUM_LIT> ) * d + ( double ) i ; int i3 = ai [ l2 + <NUM_LIT:1> + ( l1 + <NUM_LIT:0> ) * l ] ; int j3 = ai [ l2 + <NUM_LIT:1> + ( l1 + <NUM_LIT:1> ) * l ] ; for ( int k3 = <NUM_LIT:0> ; k3 < i ; k3 ++ ) { int l3 = ( ( l1 << byte0 ) + k3 ) * j1 + ( l2 << byte0 ) ; for ( int i4 = <NUM_LIT:0> ; i4 < i ; i4 ++ ) { double d9 = ( ( double ) k3 - d2 ) * ( ( double ) k3 - d2 ) + ( ( double ) i4 - d1 ) * ( ( double ) i4 - d1 ) ; double d10 = ( ( double ) k3 - d4 ) * ( ( double ) k3 - d4 ) + ( ( double ) i4 - d3 ) * ( ( double ) i4 - d3 ) ; double d11 = ( ( double ) k3 - d6 ) * ( ( double ) k3 - d6 ) + ( ( double ) i4 - d5 ) * ( ( double ) i4 - d5 ) ; double d12 = ( ( double ) k3 - d8 ) * ( ( double ) k3 - d8 ) + ( ( double ) i4 - d7 ) * ( ( double ) i4 - d7 ) ; if ( d9 < d10 && d9 < d11 && d9 < d12 ) { ai1 [ l3 ++ ] = i2 ; continue ; } if ( d10 < d9 && d10 < d11 && d10 < d12 ) { ai1 [ l3 ++ ] = i3 ; continue ; } if ( d11 < d9 && d11 < d10 && d11 < d12 ) { ai1 [ l3 ++ ] = k2 ; } else { ai1 [ l3 ++ ] = j3 ; } } } i2 = i3 ; k2 = j3 ; } } int ai2 [ ] = IntCache . getIntCache ( par3 * par4 ) ; for ( int j2 = <NUM_LIT:0> ; j2 < par4 ; j2 ++ ) { System . arraycopy ( ai1 , ( j2 + ( par2 & i - <NUM_LIT:1> ) ) * ( l << byte0 ) + ( par1 & i - <NUM_LIT:1> ) , ai2 , j2 * par3 , par3 ) ; } return ai2 ; } } </s>
<s> package net . minecraft . src ; import java . io . * ; public class Packet23VehicleSpawn extends Packet { public int entityId ; public int xPosition ; public int yPosition ; public int zPosition ; public int speedX ; public int speedY ; public int speedZ ; public int type ; public int throwerEntityId ; public Packet23VehicleSpawn ( ) { } public Packet23VehicleSpawn ( Entity par1Entity , int par2 ) { this ( par1Entity , par2 , <NUM_LIT:0> ) ; } public Packet23VehicleSpawn ( Entity par1Entity , int par2 , int par3 ) { entityId = par1Entity . entityId ; xPosition = MathHelper . floor_double ( par1Entity . posX * <NUM_LIT> ) ; yPosition = MathHelper . floor_double ( par1Entity . posY * <NUM_LIT> ) ; zPosition = MathHelper . floor_double ( par1Entity . posZ * <NUM_LIT> ) ; type = par2 ; throwerEntityId = par3 ; if ( par3 > <NUM_LIT:0> ) { double d = par1Entity . motionX ; double d1 = par1Entity . motionY ; double d2 = par1Entity . motionZ ; double d3 = <NUM_LIT> ; if ( d < - d3 ) { d = - d3 ; } if ( d1 < - d3 ) { d1 = - d3 ; } if ( d2 < - d3 ) { d2 = - d3 ; } if ( d > d3 ) { d = d3 ; } if ( d1 > d3 ) { d1 = d3 ; } if ( d2 > d3 ) { d2 = d3 ; } speedX = ( int ) ( d * <NUM_LIT> ) ; speedY = ( int ) ( d1 * <NUM_LIT> ) ; speedZ = ( int ) ( d2 * <NUM_LIT> ) ; } } public void readPacketData ( DataInputStream par1DataInputStream ) throws IOException { entityId = par1DataInputStream . readInt ( ) ; type = par1DataInputStream . readByte ( ) ; xPosition = par1DataInputStream . readInt ( ) ; yPosition = par1DataInputStream . readInt ( ) ; zPosition = par1DataInputStream . readInt ( ) ; throwerEntityId = par1DataInputStream . readInt ( ) ; if ( throwerEntityId > <NUM_LIT:0> ) { speedX = par1DataInputStream . readShort ( ) ; speedY = par1DataInputStream . readShort ( ) ; speedZ = par1DataInputStream . readShort ( ) ; } } public void writePacketData ( DataOutputStream par1DataOutputStream ) throws IOException { par1DataOutputStream . writeInt ( entityId ) ; par1DataOutputStream . writeByte ( type ) ; par1DataOutputStream . writeInt ( xPosition ) ; par1DataOutputStream . writeInt ( yPosition ) ; par1DataOutputStream . writeInt ( zPosition ) ; par1DataOutputStream . writeInt ( throwerEntityId ) ; if ( throwerEntityId > <NUM_LIT:0> ) { par1DataOutputStream . writeShort ( speedX ) ; par1DataOutputStream . writeShort ( speedY ) ; par1DataOutputStream . writeShort ( speedZ ) ; } } public void processPacket ( NetHandler par1NetHandler ) { par1NetHandler . handleVehicleSpawn ( this ) ; } public int getPacketSize ( ) { return <NUM_LIT> + throwerEntityId <= <NUM_LIT:0> ? <NUM_LIT:0> : <NUM_LIT:6> ; } } </s>
<s> package net . minecraft . src ; import java . util . Random ; public abstract class BlockFluid extends Block { protected BlockFluid ( int par1 , Material par2Material ) { super ( par1 , ( par2Material != Material . lava ? <NUM_LIT:12> : <NUM_LIT> ) * <NUM_LIT:16> + <NUM_LIT> , par2Material ) ; float f = <NUM_LIT> ; float f1 = <NUM_LIT> ; setBlockBounds ( <NUM_LIT> + f1 , <NUM_LIT> + f , <NUM_LIT> + f1 , <NUM_LIT> + f1 , <NUM_LIT> + f , <NUM_LIT> + f1 ) ; setTickRandomly ( true ) ; } public boolean getBlocksMovement ( IBlockAccess par1IBlockAccess , int par2 , int par3 , int par4 ) { return blockMaterial != Material . lava ; } public static float getFluidHeightPercent ( int par0 ) { if ( par0 >= <NUM_LIT:8> ) { par0 = <NUM_LIT:0> ; } float f = ( float ) ( par0 + <NUM_LIT:1> ) / <NUM_LIT> ; return f ; } public int getBlockTextureFromSide ( int par1 ) { if ( par1 == <NUM_LIT:0> || par1 == <NUM_LIT:1> ) { return blockIndexInTexture ; } else { return blockIndexInTexture + <NUM_LIT:1> ; } } protected int getFlowDecay ( World par1World , int par2 , int par3 , int par4 ) { if ( par1World . getBlockMaterial ( par2 , par3 , par4 ) != blockMaterial ) { return - <NUM_LIT:1> ; } else { return par1World . getBlockMetadata ( par2 , par3 , par4 ) ; } } protected int getEffectiveFlowDecay ( IBlockAccess par1IBlockAccess , int par2 , int par3 , int par4 ) { if ( par1IBlockAccess . getBlockMaterial ( par2 , par3 , par4 ) != blockMaterial ) { return - <NUM_LIT:1> ; } int i = par1IBlockAccess . getBlockMetadata ( par2 , par3 , par4 ) ; if ( i >= <NUM_LIT:8> ) { i = <NUM_LIT:0> ; } return i ; } public boolean renderAsNormalBlock ( ) { return false ; } public boolean isOpaqueCube ( ) { return false ; } public boolean canCollideCheck ( int par1 , boolean par2 ) { return par2 && par1 == <NUM_LIT:0> ; } public boolean isBlockSolid ( IBlockAccess par1IBlockAccess , int par2 , int par3 , int par4 , int par5 ) { Material material = par1IBlockAccess . getBlockMaterial ( par2 , par3 , par4 ) ; if ( material == blockMaterial ) { return false ; } if ( par5 == <NUM_LIT:1> ) { return true ; } if ( material == Material . ice ) { return false ; } else { return super . isBlockSolid ( par1IBlockAccess , par2 , par3 , par4 , par5 ) ; } } public AxisAlignedBB getCollisionBoundingBoxFromPool ( World par1World , int par2 , int par3 , int i ) { return null ; } public int getRenderType ( ) { return <NUM_LIT:4> ; } public int idDropped ( int par1 , Random par2Random , int par3 ) { return <NUM_LIT:0> ; } public int quantityDropped ( Random par1Random ) { return <NUM_LIT:0> ; } private Vec3D getFlowVector ( IBlockAccess par1IBlockAccess , int par2 , int par3 , int par4 ) { Vec3D vec3d = Vec3D . createVector ( <NUM_LIT> , <NUM_LIT> , <NUM_LIT> ) ; int i = getEffectiveFlowDecay ( par1IBlockAccess , par2 , par3 , par4 ) ; for ( int j = <NUM_LIT:0> ; j < <NUM_LIT:4> ; j ++ ) { int k = par2 ; int l = par3 ; int i1 = par4 ; if ( j == <NUM_LIT:0> ) { k -- ; } if ( j == <NUM_LIT:1> ) { i1 -- ; } if ( j == <NUM_LIT:2> ) { k ++ ; } if ( j == <NUM_LIT:3> ) { i1 ++ ; } int j1 = getEffectiveFlowDecay ( par1IBlockAccess , k , l , i1 ) ; if ( j1 < <NUM_LIT:0> ) { if ( par1IBlockAccess . getBlockMaterial ( k , l , i1 ) . blocksMovement ( ) ) { continue ; } j1 = getEffectiveFlowDecay ( par1IBlockAccess , k , l - <NUM_LIT:1> , i1 ) ; if ( j1 >= <NUM_LIT:0> ) { int k1 = j1 - ( i - <NUM_LIT:8> ) ; vec3d = vec3d . addVector ( ( k - par2 ) * k1 , ( l - par3 ) * k1 , ( i1 - par4 ) * k1 ) ; } continue ; } if ( j1 >= <NUM_LIT:0> ) { int l1 = j1 - i ; vec3d = vec3d . addVector ( ( k - par2 ) * l1 , ( l - par3 ) * l1 , ( i1 - par4 ) * l1 ) ; } } if ( par1IBlockAccess . getBlockMetadata ( par2 , par3 , par4 ) >= <NUM_LIT:8> ) { boolean flag = false ; if ( flag || isBlockSolid ( par1IBlockAccess , par2 , par3 , par4 - <NUM_LIT:1> , <NUM_LIT:2> ) ) { flag = true ; } if ( flag || isBlockSolid ( par1IBlockAccess , par2 , par3 , par4 + <NUM_LIT:1> , <NUM_LIT:3> ) ) { flag = true ; } if ( flag || isBlockSolid ( par1IBlockAccess , par2 - <NUM_LIT:1> , par3 , par4 , <NUM_LIT:4> ) ) { flag = true ; } if ( flag || isBlockSolid ( par1IBlockAccess , par2 + <NUM_LIT:1> , par3 , par4 , <NUM_LIT:5> ) ) { flag = true ; } if ( flag || isBlockSolid ( par1IBlockAccess , par2 , par3 + <NUM_LIT:1> , par4 - <NUM_LIT:1> , <NUM_LIT:2> ) ) { flag = true ; } if ( flag || isBlockSolid ( par1IBlockAccess , par2 , par3 + <NUM_LIT:1> , par4 + <NUM_LIT:1> , <NUM_LIT:3> ) ) { flag = true ; } if ( flag || isBlockSolid ( par1IBlockAccess , par2 - <NUM_LIT:1> , par3 + <NUM_LIT:1> , par4 , <NUM_LIT:4> ) ) { flag = true ; } if ( flag || isBlockSolid ( par1IBlockAccess , par2 + <NUM_LIT:1> , par3 + <NUM_LIT:1> , par4 , <NUM_LIT:5> ) ) { flag = true ; } if ( flag ) { vec3d = vec3d . normalize ( ) . addVector ( <NUM_LIT> , - <NUM_LIT> , <NUM_LIT> ) ; } } vec3d = vec3d . normalize ( ) ; return vec3d ; } public void velocityToAddToEntity ( World par1World , int par2 , int par3 , int par4 , Entity par5Entity , Vec3D par6Vec3D ) { Vec3D vec3d = getFlowVector ( par1World , par2 , par3 , par4 ) ; par6Vec3D . xCoord += vec3d . xCoord ; par6Vec3D . yCoord += vec3d . yCoord ; par6Vec3D . zCoord += vec3d . zCoord ; } public int tickRate ( ) { if ( blockMaterial == Material . water ) { return <NUM_LIT:5> ; } return blockMaterial != Material . lava ? <NUM_LIT:0> : <NUM_LIT:30> ; } public void updateTick ( World par1World , int par2 , int par3 , int par4 , Random par5Random ) { super . updateTick ( par1World , par2 , par3 , par4 , par5Random ) ; } public void onBlockAdded ( World par1World , int par2 , int par3 , int par4 ) { checkForHarden ( par1World , par2 , par3 , par4 ) ; } public void onNeighborBlockChange ( World par1World , int par2 , int par3 , int par4 , int par5 ) { checkForHarden ( par1World , par2 , par3 , par4 ) ; } private void checkForHarden ( World par1World , int par2 , int par3 , int par4 ) { if ( par1World . getBlockId ( par2 , par3 , par4 ) != blockID ) { return ; } if ( blockMaterial == Material . lava ) { boolean flag = false ; if ( flag || par1World . getBlockMaterial ( par2 , par3 , par4 - <NUM_LIT:1> ) == Material . water ) { flag = true ; } if ( flag || par1World . getBlockMaterial ( par2 , par3 , par4 + <NUM_LIT:1> ) == Material . water ) { flag = true ; } if ( flag || par1World . getBlockMaterial ( par2 - <NUM_LIT:1> , par3 , par4 ) == Material . water ) { flag = true ; } if ( flag || par1World . getBlockMaterial ( par2 + <NUM_LIT:1> , par3 , par4 ) == Material . water ) { flag = true ; } if ( flag || par1World . getBlockMaterial ( par2 , par3 + <NUM_LIT:1> , par4 ) == Material . water ) { flag = true ; } if ( flag ) { int i = par1World . getBlockMetadata ( par2 , par3 , par4 ) ; if ( i == <NUM_LIT:0> ) { par1World . setBlockWithNotify ( par2 , par3 , par4 , Block . obsidian . blockID ) ; } else if ( i <= <NUM_LIT:4> ) { par1World . setBlockWithNotify ( par2 , par3 , par4 , Block . cobblestone . blockID ) ; } triggerLavaMixEffects ( par1World , par2 , par3 , par4 ) ; } } } protected void triggerLavaMixEffects ( World par1World , int par2 , int par3 , int par4 ) { par1World . playSoundEffect ( ( float ) par2 + <NUM_LIT> , ( float ) par3 + <NUM_LIT> , ( float ) par4 + <NUM_LIT> , "<STR_LIT>" , <NUM_LIT> , <NUM_LIT> + ( par1World . rand . nextFloat ( ) - par1World . rand . nextFloat ( ) ) * <NUM_LIT> ) ; for ( int i = <NUM_LIT:0> ; i < <NUM_LIT:8> ; i ++ ) { par1World . spawnParticle ( "<STR_LIT>" , ( double ) par2 + Math . random ( ) , ( double ) par3 + <NUM_LIT> , ( double ) par4 + Math . random ( ) , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> ) ; } } } </s>
<s> package net . minecraft . src ; import java . io . * ; public class Packet18Animation extends Packet { public int entityId ; public int animate ; public Packet18Animation ( ) { } public Packet18Animation ( Entity par1Entity , int par2 ) { entityId = par1Entity . entityId ; animate = par2 ; } public void readPacketData ( DataInputStream par1DataInputStream ) throws IOException { entityId = par1DataInputStream . readInt ( ) ; animate = par1DataInputStream . readByte ( ) ; } public void writePacketData ( DataOutputStream par1DataOutputStream ) throws IOException { par1DataOutputStream . writeInt ( entityId ) ; par1DataOutputStream . writeByte ( animate ) ; } public void processPacket ( NetHandler par1NetHandler ) { par1NetHandler . handleAnimation ( this ) ; } public int getPacketSize ( ) { return <NUM_LIT:5> ; } } </s>
<s> package net . minecraft . src ; import java . util . HashMap ; import java . util . Random ; public class ItemMonsterPlacer extends Item { public ItemMonsterPlacer ( int par1 ) { super ( par1 ) ; setHasSubtypes ( true ) ; } public boolean onItemUse ( ItemStack par1ItemStack , EntityPlayer par2EntityPlayer , World par3World , int par4 , int par5 , int par6 , int par7 ) { if ( par3World . isRemote ) { return true ; } int i = par3World . getBlockId ( par4 , par5 , par6 ) ; par4 += Facing . offsetsXForSide [ par7 ] ; par5 += Facing . offsetsYForSide [ par7 ] ; par6 += Facing . offsetsZForSide [ par7 ] ; double d = <NUM_LIT> ; if ( par7 == <NUM_LIT:1> && i == Block . fence . blockID || i == Block . netherFence . blockID ) { d = <NUM_LIT> ; } if ( func_48390_a ( par3World , par1ItemStack . getItemDamage ( ) , ( double ) par4 + <NUM_LIT> , ( double ) par5 + d , ( double ) par6 + <NUM_LIT> ) && ! par2EntityPlayer . capabilities . isCreativeMode ) { par1ItemStack . stackSize -- ; } return true ; } public static boolean func_48390_a ( World par0World , int par1 , double par2 , double par4 , double par6 ) { if ( ! EntityList . entityEggs . containsKey ( Integer . valueOf ( par1 ) ) ) { return false ; } Entity entity = EntityList . createEntityByID ( par1 , par0World ) ; if ( entity != null ) { entity . setLocationAndAngles ( par2 , par4 , par6 , par0World . rand . nextFloat ( ) * <NUM_LIT> , <NUM_LIT> ) ; par0World . spawnEntityInWorld ( entity ) ; ( ( EntityLiving ) entity ) . playLivingSound ( ) ; } return entity != null ; } } </s>
<s> package net . minecraft . src ; import java . util . * ; class StructureNetherBridgeStart extends StructureStart { public StructureNetherBridgeStart ( World par1World , Random par2Random , int par3 , int par4 ) { ComponentNetherBridgeStartPiece componentnetherbridgestartpiece = new ComponentNetherBridgeStartPiece ( par2Random , ( par3 << <NUM_LIT:4> ) + <NUM_LIT:2> , ( par4 << <NUM_LIT:4> ) + <NUM_LIT:2> ) ; components . add ( componentnetherbridgestartpiece ) ; componentnetherbridgestartpiece . buildComponent ( componentnetherbridgestartpiece , components , par2Random ) ; StructureComponent structurecomponent ; for ( ArrayList arraylist = componentnetherbridgestartpiece . field_40293_d ; ! arraylist . isEmpty ( ) ; structurecomponent . buildComponent ( componentnetherbridgestartpiece , components , par2Random ) ) { int i = par2Random . nextInt ( arraylist . size ( ) ) ; structurecomponent = ( StructureComponent ) arraylist . remove ( i ) ; } updateBoundingBox ( ) ; setRandomHeight ( par1World , par2Random , <NUM_LIT> , <NUM_LIT> ) ; } } </s>
<s> package net . minecraft . src ; import java . lang . reflect . Constructor ; import java . util . * ; public final class SpawnerAnimals { private static HashMap eligibleChunksForSpawning = new HashMap ( ) ; protected static final Class nightSpawnEntities [ ] ; public SpawnerAnimals ( ) { } protected static ChunkPosition getRandomSpawningPointInChunk ( World par0World , int par1 , int par2 ) { Chunk chunk = par0World . getChunkFromChunkCoords ( par1 , par2 ) ; int i = par1 * <NUM_LIT:16> + par0World . rand . nextInt ( <NUM_LIT:16> ) ; int j = par0World . rand . nextInt ( chunk != null ? Math . max ( <NUM_LIT> , chunk . getTopFilledSegment ( ) ) : <NUM_LIT> ) ; int k = par2 * <NUM_LIT:16> + par0World . rand . nextInt ( <NUM_LIT:16> ) ; return new ChunkPosition ( i , j , k ) ; } public static final int performSpawning ( World par0World , boolean par1 , boolean par2 ) { if ( ! par1 && ! par2 ) { return <NUM_LIT:0> ; } else { eligibleChunksForSpawning . clear ( ) ; int var3 ; int var6 ; for ( var3 = <NUM_LIT:0> ; var3 < par0World . playerEntities . size ( ) ; ++ var3 ) { EntityPlayer var4 = ( EntityPlayer ) par0World . playerEntities . get ( var3 ) ; int var5 = MathHelper . floor_double ( var4 . posX / <NUM_LIT> ) ; var6 = MathHelper . floor_double ( var4 . posZ / <NUM_LIT> ) ; byte var7 = <NUM_LIT:8> ; for ( int var8 = - var7 ; var8 <= var7 ; ++ var8 ) { for ( int var9 = - var7 ; var9 <= var7 ; ++ var9 ) { boolean var10 = var8 == - var7 || var8 == var7 || var9 == - var7 || var9 == var7 ; ChunkCoordIntPair var11 = new ChunkCoordIntPair ( var8 + var5 , var9 + var6 ) ; if ( ! var10 ) { eligibleChunksForSpawning . put ( var11 , Boolean . valueOf ( false ) ) ; } else if ( ! eligibleChunksForSpawning . containsKey ( var11 ) ) { eligibleChunksForSpawning . put ( var11 , Boolean . valueOf ( true ) ) ; } } } } var3 = <NUM_LIT:0> ; ChunkCoordinates var31 = par0World . getSpawnPoint ( ) ; EnumCreatureType [ ] var32 = EnumCreatureType . values ( ) ; var6 = var32 . length ; for ( int var33 = <NUM_LIT:0> ; var33 < var6 ; ++ var33 ) { EnumCreatureType var34 = var32 [ var33 ] ; if ( ( ! var34 . getPeacefulCreature ( ) || par2 ) && ( var34 . getPeacefulCreature ( ) || par1 ) && par0World . countEntities ( var34 . getCreatureClass ( ) ) <= var34 . getMaxNumberOfCreature ( ) * eligibleChunksForSpawning . size ( ) / <NUM_LIT> ) { Iterator var35 = eligibleChunksForSpawning . keySet ( ) . iterator ( ) ; label108 : while ( var35 . hasNext ( ) ) { ChunkCoordIntPair var37 = ( ChunkCoordIntPair ) var35 . next ( ) ; if ( ! ( ( Boolean ) eligibleChunksForSpawning . get ( var37 ) ) . booleanValue ( ) ) { ChunkPosition var36 = getRandomSpawningPointInChunk ( par0World , var37 . chunkXPos , var37 . chunkZPos ) ; int var12 = var36 . x ; int var13 = var36 . y ; int var14 = var36 . z ; if ( ! par0World . isBlockNormalCube ( var12 , var13 , var14 ) && par0World . getBlockMaterial ( var12 , var13 , var14 ) == var34 . getCreatureMaterial ( ) ) { int var15 = <NUM_LIT:0> ; int var16 = <NUM_LIT:0> ; while ( var16 < <NUM_LIT:3> ) { int var17 = var12 ; int var18 = var13 ; int var19 = var14 ; byte var20 = <NUM_LIT:6> ; SpawnListEntry var21 = null ; int var22 = <NUM_LIT:0> ; while ( true ) { if ( var22 < <NUM_LIT:4> ) { label101 : { var17 += par0World . rand . nextInt ( var20 ) - par0World . rand . nextInt ( var20 ) ; var18 += par0World . rand . nextInt ( <NUM_LIT:1> ) - par0World . rand . nextInt ( <NUM_LIT:1> ) ; var19 += par0World . rand . nextInt ( var20 ) - par0World . rand . nextInt ( var20 ) ; if ( canCreatureTypeSpawnAtLocation ( var34 , par0World , var17 , var18 , var19 ) ) { float var23 = ( float ) var17 + <NUM_LIT> ; float var24 = ( float ) var18 ; float var25 = ( float ) var19 + <NUM_LIT> ; if ( par0World . getClosestPlayer ( ( double ) var23 , ( double ) var24 , ( double ) var25 , <NUM_LIT> ) == null ) { float var26 = var23 - ( float ) var31 . posX ; float var27 = var24 - ( float ) var31 . posY ; float var28 = var25 - ( float ) var31 . posZ ; float var29 = var26 * var26 + var27 * var27 + var28 * var28 ; if ( var29 >= <NUM_LIT> ) { if ( var21 == null ) { var21 = par0World . getRandomMob ( var34 , var17 , var18 , var19 ) ; if ( var21 == null ) { break label101 ; } } EntityLiving var38 ; try { var38 = ( EntityLiving ) var21 . entityClass . getConstructor ( new Class [ ] { World . class } ) . newInstance ( new Object [ ] { par0World } ) ; } catch ( Exception var30 ) { var30 . printStackTrace ( ) ; return var3 ; } var38 . setLocationAndAngles ( ( double ) var23 , ( double ) var24 , ( double ) var25 , par0World . rand . nextFloat ( ) * <NUM_LIT> , <NUM_LIT> ) ; if ( var38 . getCanSpawnHere ( ) ) { ++ var15 ; par0World . spawnEntityInWorld ( var38 ) ; creatureSpecificInit ( var38 , par0World , var23 , var24 , var25 ) ; if ( var15 >= var38 . getMaxSpawnedInChunk ( ) ) { continue label108 ; } } var3 += var15 ; } } } ++ var22 ; continue ; } } ++ var16 ; break ; } } } } } } } return var3 ; } } public static boolean canCreatureTypeSpawnAtLocation ( EnumCreatureType par0EnumCreatureType , World par1World , int par2 , int par3 , int par4 ) { if ( par0EnumCreatureType . getCreatureMaterial ( ) == Material . water ) { return par1World . getBlockMaterial ( par2 , par3 , par4 ) . isLiquid ( ) && ! par1World . isBlockNormalCube ( par2 , par3 + <NUM_LIT:1> , par4 ) ; } else { int i = par1World . getBlockId ( par2 , par3 - <NUM_LIT:1> , par4 ) ; return Block . isNormalCube ( i ) && i != Block . bedrock . blockID && ! par1World . isBlockNormalCube ( par2 , par3 , par4 ) && ! par1World . getBlockMaterial ( par2 , par3 , par4 ) . isLiquid ( ) && ! par1World . isBlockNormalCube ( par2 , par3 + <NUM_LIT:1> , par4 ) ; } } private static void creatureSpecificInit ( EntityLiving par0EntityLiving , World par1World , float par2 , float par3 , float par4 ) { if ( ( par0EntityLiving instanceof EntitySpider ) && par1World . rand . nextInt ( <NUM_LIT:100> ) == <NUM_LIT:0> ) { EntitySkeleton entityskeleton = new EntitySkeleton ( par1World ) ; entityskeleton . setLocationAndAngles ( par2 , par3 , par4 , par0EntityLiving . rotationYaw , <NUM_LIT> ) ; par1World . spawnEntityInWorld ( entityskeleton ) ; entityskeleton . mountEntity ( par0EntityLiving ) ; } else if ( par0EntityLiving instanceof EntitySheep ) { ( ( EntitySheep ) par0EntityLiving ) . setFleeceColor ( EntitySheep . getRandomFleeceColor ( par1World . rand ) ) ; } else if ( ( par0EntityLiving instanceof EntityOcelot ) && par1World . rand . nextInt ( <NUM_LIT:7> ) == <NUM_LIT:0> ) { for ( int i = <NUM_LIT:0> ; i < <NUM_LIT:2> ; i ++ ) { EntityOcelot entityocelot = new EntityOcelot ( par1World ) ; entityocelot . setLocationAndAngles ( par2 , par3 , par4 , par0EntityLiving . rotationYaw , <NUM_LIT> ) ; entityocelot . setGrowingAge ( - <NUM_LIT> ) ; par1World . spawnEntityInWorld ( entityocelot ) ; } } } public static void performWorldGenSpawning ( World par0World , BiomeGenBase par1BiomeGenBase , int par2 , int par3 , int par4 , int par5 , Random par6Random ) { List list = par1BiomeGenBase . getSpawnableList ( EnumCreatureType . creature ) ; if ( list . isEmpty ( ) ) { return ; } while ( par6Random . nextFloat ( ) < par1BiomeGenBase . getSpawningChance ( ) ) { SpawnListEntry spawnlistentry = ( SpawnListEntry ) WeightedRandom . getRandomItem ( par0World . rand , list ) ; int i = spawnlistentry . minGroupCount + par6Random . nextInt ( ( <NUM_LIT:1> + spawnlistentry . maxGroupCount ) - spawnlistentry . minGroupCount ) ; int j = par2 + par6Random . nextInt ( par4 ) ; int k = par3 + par6Random . nextInt ( par5 ) ; int l = j ; int i1 = k ; int j1 = <NUM_LIT:0> ; while ( j1 < i ) { boolean flag = false ; for ( int k1 = <NUM_LIT:0> ; ! flag && k1 < <NUM_LIT:4> ; k1 ++ ) { int l1 = par0World . getTopSolidOrLiquidBlock ( j , k ) ; if ( canCreatureTypeSpawnAtLocation ( EnumCreatureType . creature , par0World , j , l1 , k ) ) { float f = ( float ) j + <NUM_LIT> ; float f1 = l1 ; float f2 = ( float ) k + <NUM_LIT> ; EntityLiving entityliving ; try { entityliving = ( EntityLiving ) spawnlistentry . entityClass . getConstructor ( new Class [ ] { net . minecraft . src . World . class } ) . newInstance ( new Object [ ] { par0World } ) ; } catch ( Exception exception ) { exception . printStackTrace ( ) ; continue ; } entityliving . setLocationAndAngles ( f , f1 , f2 , par6Random . nextFloat ( ) * <NUM_LIT> , <NUM_LIT> ) ; par0World . spawnEntityInWorld ( entityliving ) ; creatureSpecificInit ( entityliving , par0World , f , f1 , f2 ) ; flag = true ; } j += par6Random . nextInt ( <NUM_LIT:5> ) - par6Random . nextInt ( <NUM_LIT:5> ) ; for ( k += par6Random . nextInt ( <NUM_LIT:5> ) - par6Random . nextInt ( <NUM_LIT:5> ) ; j < par2 || j >= par2 + par4 || k < par3 || k >= par3 + par4 ; k = ( i1 + par6Random . nextInt ( <NUM_LIT:5> ) ) - par6Random . nextInt ( <NUM_LIT:5> ) ) { j = ( l + par6Random . nextInt ( <NUM_LIT:5> ) ) - par6Random . nextInt ( <NUM_LIT:5> ) ; } } j1 ++ ; } } } static { nightSpawnEntities = ( new Class [ ] { net . minecraft . src . EntitySpider . class , net . minecraft . src . EntityZombie . class , net . minecraft . src . EntitySkeleton . class } ) ; } } </s>
<s> package net . minecraft . src ; public class EntityAIRestrictOpenDoor extends EntityAIBase { private EntityCreature entityObj ; private VillageDoorInfo frontDoor ; public EntityAIRestrictOpenDoor ( EntityCreature par1EntityCreature ) { entityObj = par1EntityCreature ; } public boolean shouldExecute ( ) { if ( entityObj . worldObj . isDaytime ( ) ) { return false ; } Village village = entityObj . worldObj . villageCollectionObj . findNearestVillage ( MathHelper . floor_double ( entityObj . posX ) , MathHelper . floor_double ( entityObj . posY ) , MathHelper . floor_double ( entityObj . posZ ) , <NUM_LIT:16> ) ; if ( village == null ) { return false ; } frontDoor = village . findNearestDoor ( MathHelper . floor_double ( entityObj . posX ) , MathHelper . floor_double ( entityObj . posY ) , MathHelper . floor_double ( entityObj . posZ ) ) ; if ( frontDoor == null ) { return false ; } else { return ( double ) frontDoor . getInsideDistanceSquare ( MathHelper . floor_double ( entityObj . posX ) , MathHelper . floor_double ( entityObj . posY ) , MathHelper . floor_double ( entityObj . posZ ) ) < <NUM_LIT> ; } } public boolean continueExecuting ( ) { if ( entityObj . worldObj . isDaytime ( ) ) { return false ; } else { return ! frontDoor . isDetachedFromVillageFlag && frontDoor . isInside ( MathHelper . floor_double ( entityObj . posX ) , MathHelper . floor_double ( entityObj . posZ ) ) ; } } public void startExecuting ( ) { entityObj . getNavigator ( ) . setBreakDoors ( false ) ; entityObj . getNavigator ( ) . func_48655_c ( false ) ; } public void resetTask ( ) { entityObj . getNavigator ( ) . setBreakDoors ( true ) ; entityObj . getNavigator ( ) . func_48655_c ( true ) ; frontDoor = null ; } public void updateTask ( ) { frontDoor . incrementDoorOpeningRestrictionCounter ( ) ; } } </s>
<s> package net . minecraft . src ; import java . util . Random ; public class BiomeGenSwamp extends BiomeGenBase { protected BiomeGenSwamp ( int par1 ) { super ( par1 ) ; biomeDecorator . treesPerChunk = <NUM_LIT:2> ; biomeDecorator . flowersPerChunk = - <NUM_LIT> ; biomeDecorator . deadBushPerChunk = <NUM_LIT:1> ; biomeDecorator . mushroomsPerChunk = <NUM_LIT:8> ; biomeDecorator . reedsPerChunk = <NUM_LIT:10> ; biomeDecorator . clayPerChunk = <NUM_LIT:1> ; biomeDecorator . waterlilyPerChunk = <NUM_LIT:4> ; waterColorMultiplier = <NUM_LIT> ; } public WorldGenerator getRandomWorldGenForTrees ( Random par1Random ) { return worldGenSwamp ; } } </s>
<s> package net . minecraft . src ; public class StepSound { public final String stepSoundName ; public final float stepSoundVolume ; public final float stepSoundPitch ; public StepSound ( String par1Str , float par2 , float par3 ) { stepSoundName = par1Str ; stepSoundVolume = par2 ; stepSoundPitch = par3 ; } public float getVolume ( ) { return stepSoundVolume ; } public float getPitch ( ) { return stepSoundPitch ; } public String getStepSound ( ) { return ( new StringBuilder ( ) ) . append ( "<STR_LIT>" ) . append ( stepSoundName ) . toString ( ) ; } } </s>
<s> package net . minecraft . src ; import java . util . Random ; public class BlockCrops extends BlockFlower { protected BlockCrops ( int par1 , int par2 ) { super ( par1 , par2 ) ; blockIndexInTexture = par2 ; setTickRandomly ( true ) ; float f = <NUM_LIT> ; setBlockBounds ( <NUM_LIT> - f , <NUM_LIT> , <NUM_LIT> - f , <NUM_LIT> + f , <NUM_LIT> , <NUM_LIT> + f ) ; } protected boolean canThisPlantGrowOnThisBlockID ( int par1 ) { return par1 == Block . tilledField . blockID ; } public void updateTick ( World par1World , int par2 , int par3 , int par4 , Random par5Random ) { super . updateTick ( par1World , par2 , par3 , par4 , par5Random ) ; if ( par1World . getBlockLightValue ( par2 , par3 + <NUM_LIT:1> , par4 ) >= <NUM_LIT:9> ) { int i = par1World . getBlockMetadata ( par2 , par3 , par4 ) ; if ( i < <NUM_LIT:7> ) { float f = getGrowthRate ( par1World , par2 , par3 , par4 ) ; if ( par5Random . nextInt ( ( int ) ( <NUM_LIT> / f ) + <NUM_LIT:1> ) == <NUM_LIT:0> ) { i ++ ; par1World . setBlockMetadataWithNotify ( par2 , par3 , par4 , i ) ; } } } } public void fertilize ( World par1World , int par2 , int par3 , int par4 ) { par1World . setBlockMetadataWithNotify ( par2 , par3 , par4 , <NUM_LIT:7> ) ; } private float getGrowthRate ( World par1World , int par2 , int par3 , int par4 ) { float f = <NUM_LIT> ; int i = par1World . getBlockId ( par2 , par3 , par4 - <NUM_LIT:1> ) ; int j = par1World . getBlockId ( par2 , par3 , par4 + <NUM_LIT:1> ) ; int k = par1World . getBlockId ( par2 - <NUM_LIT:1> , par3 , par4 ) ; int l = par1World . getBlockId ( par2 + <NUM_LIT:1> , par3 , par4 ) ; int i1 = par1World . getBlockId ( par2 - <NUM_LIT:1> , par3 , par4 - <NUM_LIT:1> ) ; int j1 = par1World . getBlockId ( par2 + <NUM_LIT:1> , par3 , par4 - <NUM_LIT:1> ) ; int k1 = par1World . getBlockId ( par2 + <NUM_LIT:1> , par3 , par4 + <NUM_LIT:1> ) ; int l1 = par1World . getBlockId ( par2 - <NUM_LIT:1> , par3 , par4 + <NUM_LIT:1> ) ; boolean flag = k == blockID || l == blockID ; boolean flag1 = i == blockID || j == blockID ; boolean flag2 = i1 == blockID || j1 == blockID || k1 == blockID || l1 == blockID ; for ( int i2 = par2 - <NUM_LIT:1> ; i2 <= par2 + <NUM_LIT:1> ; i2 ++ ) { for ( int j2 = par4 - <NUM_LIT:1> ; j2 <= par4 + <NUM_LIT:1> ; j2 ++ ) { int k2 = par1World . getBlockId ( i2 , par3 - <NUM_LIT:1> , j2 ) ; float f1 = <NUM_LIT> ; if ( k2 == Block . tilledField . blockID ) { f1 = <NUM_LIT> ; if ( par1World . getBlockMetadata ( i2 , par3 - <NUM_LIT:1> , j2 ) > <NUM_LIT:0> ) { f1 = <NUM_LIT> ; } } if ( i2 != par2 || j2 != par4 ) { f1 /= <NUM_LIT> ; } f += f1 ; } } if ( flag2 || flag && flag1 ) { f /= <NUM_LIT> ; } return f ; } public int getBlockTextureFromSideAndMetadata ( int par1 , int par2 ) { if ( par2 < <NUM_LIT:0> ) { par2 = <NUM_LIT:7> ; } return blockIndexInTexture + par2 ; } public int getRenderType ( ) { return <NUM_LIT:6> ; } public void dropBlockAsItemWithChance ( World par1World , int par2 , int par3 , int par4 , int par5 , float par6 , int par7 ) { super . dropBlockAsItemWithChance ( par1World , par2 , par3 , par4 , par5 , par6 , <NUM_LIT:0> ) ; if ( par1World . isRemote ) { return ; } int i = <NUM_LIT:3> + par7 ; for ( int j = <NUM_LIT:0> ; j < i ; j ++ ) { if ( par1World . rand . nextInt ( <NUM_LIT:15> ) <= par5 ) { float f = <NUM_LIT> ; float f1 = par1World . rand . nextFloat ( ) * f + ( <NUM_LIT> - f ) * <NUM_LIT> ; float f2 = par1World . rand . nextFloat ( ) * f + ( <NUM_LIT> - f ) * <NUM_LIT> ; float f3 = par1World . rand . nextFloat ( ) * f + ( <NUM_LIT> - f ) * <NUM_LIT> ; EntityItem entityitem = new EntityItem ( par1World , ( float ) par2 + f1 , ( float ) par3 + f2 , ( float ) par4 + f3 , new ItemStack ( Item . seeds ) ) ; entityitem . delayBeforeCanPickup = <NUM_LIT:10> ; par1World . spawnEntityInWorld ( entityitem ) ; } } } public int idDropped ( int par1 , Random par2Random , int par3 ) { if ( par1 == <NUM_LIT:7> ) { return Item . wheat . shiftedIndex ; } else { return - <NUM_LIT:1> ; } } public int quantityDropped ( Random par1Random ) { return <NUM_LIT:1> ; } } </s>
<s> package net . minecraft . src ; public class EnchantmentDamage extends Enchantment { private static final String protectionName [ ] = { "<STR_LIT:all>" , "<STR_LIT>" , "<STR_LIT>" } ; private static final int baseEnchantability [ ] = { <NUM_LIT:1> , <NUM_LIT:5> , <NUM_LIT:5> } ; private static final int levelEnchantability [ ] = { <NUM_LIT:16> , <NUM_LIT:8> , <NUM_LIT:8> } ; private static final int thresholdEnchantability [ ] = { <NUM_LIT:20> , <NUM_LIT:20> , <NUM_LIT:20> } ; public final int damageType ; public EnchantmentDamage ( int par1 , int par2 , int par3 ) { super ( par1 , par2 , EnumEnchantmentType . weapon ) ; damageType = par3 ; } public int getMinEnchantability ( int par1 ) { return baseEnchantability [ damageType ] + ( par1 - <NUM_LIT:1> ) * levelEnchantability [ damageType ] ; } public int getMaxEnchantability ( int par1 ) { return getMinEnchantability ( par1 ) + thresholdEnchantability [ damageType ] ; } public int getMaxLevel ( ) { return <NUM_LIT:5> ; } public int calcModifierLiving ( int par1 , EntityLiving par2EntityLiving ) { if ( damageType == <NUM_LIT:0> ) { return par1 * <NUM_LIT:3> ; } if ( damageType == <NUM_LIT:1> && par2EntityLiving . getCreatureAttribute ( ) == EnumCreatureAttribute . UNDEAD ) { return par1 * <NUM_LIT:4> ; } if ( damageType == <NUM_LIT:2> && par2EntityLiving . getCreatureAttribute ( ) == EnumCreatureAttribute . ARTHROPOD ) { return par1 * <NUM_LIT:4> ; } else { return <NUM_LIT:0> ; } } public boolean canApplyTogether ( Enchantment par1Enchantment ) { return ! ( par1Enchantment instanceof EnchantmentDamage ) ; } } </s>
<s> package net . minecraft . src ; public class MaterialPortal extends Material { public MaterialPortal ( MapColor par1MapColor ) { super ( par1MapColor ) ; } public boolean isSolid ( ) { return false ; } public boolean getCanBlockGrass ( ) { return false ; } public boolean blocksMovement ( ) { return false ; } } </s>
<s> package net . minecraft . src ; import java . util . List ; import java . util . Random ; public class ComponentVillagePathGen extends ComponentVillageRoadPiece { private int averageGroundLevel ; public ComponentVillagePathGen ( int par1 , Random par2Random , StructureBoundingBox par3StructureBoundingBox , int par4 ) { super ( par1 ) ; coordBaseMode = par4 ; boundingBox = par3StructureBoundingBox ; averageGroundLevel = Math . max ( par3StructureBoundingBox . getXSize ( ) , par3StructureBoundingBox . getZSize ( ) ) ; } public void buildComponent ( StructureComponent par1StructureComponent , List par2List , Random par3Random ) { boolean flag = false ; for ( int i = par3Random . nextInt ( <NUM_LIT:5> ) ; i < averageGroundLevel - <NUM_LIT:8> ; i += <NUM_LIT:2> + par3Random . nextInt ( <NUM_LIT:5> ) ) { StructureComponent structurecomponent = getNextComponentNN ( ( ComponentVillageStartPiece ) par1StructureComponent , par2List , par3Random , <NUM_LIT:0> , i ) ; if ( structurecomponent != null ) { i += Math . max ( structurecomponent . boundingBox . getXSize ( ) , structurecomponent . boundingBox . getZSize ( ) ) ; flag = true ; } } for ( int j = par3Random . nextInt ( <NUM_LIT:5> ) ; j < averageGroundLevel - <NUM_LIT:8> ; j += <NUM_LIT:2> + par3Random . nextInt ( <NUM_LIT:5> ) ) { StructureComponent structurecomponent1 = getNextComponentPP ( ( ComponentVillageStartPiece ) par1StructureComponent , par2List , par3Random , <NUM_LIT:0> , j ) ; if ( structurecomponent1 != null ) { j += Math . max ( structurecomponent1 . boundingBox . getXSize ( ) , structurecomponent1 . boundingBox . getZSize ( ) ) ; flag = true ; } } if ( flag && par3Random . nextInt ( <NUM_LIT:3> ) > <NUM_LIT:0> ) { switch ( coordBaseMode ) { case <NUM_LIT:2> : StructureVillagePieces . getNextStructureComponentVillagePath ( ( ComponentVillageStartPiece ) par1StructureComponent , par2List , par3Random , boundingBox . minX - <NUM_LIT:1> , boundingBox . minY , boundingBox . minZ , <NUM_LIT:1> , getComponentType ( ) ) ; break ; case <NUM_LIT:0> : StructureVillagePieces . getNextStructureComponentVillagePath ( ( ComponentVillageStartPiece ) par1StructureComponent , par2List , par3Random , boundingBox . minX - <NUM_LIT:1> , boundingBox . minY , boundingBox . maxZ - <NUM_LIT:2> , <NUM_LIT:1> , getComponentType ( ) ) ; break ; case <NUM_LIT:3> : StructureVillagePieces . getNextStructureComponentVillagePath ( ( ComponentVillageStartPiece ) par1StructureComponent , par2List , par3Random , boundingBox . maxX - <NUM_LIT:2> , boundingBox . minY , boundingBox . minZ - <NUM_LIT:1> , <NUM_LIT:2> , getComponentType ( ) ) ; break ; case <NUM_LIT:1> : StructureVillagePieces . getNextStructureComponentVillagePath ( ( ComponentVillageStartPiece ) par1StructureComponent , par2List , par3Random , boundingBox . minX , boundingBox . minY , boundingBox . minZ - <NUM_LIT:1> , <NUM_LIT:2> , getComponentType ( ) ) ; break ; } } if ( flag && par3Random . nextInt ( <NUM_LIT:3> ) > <NUM_LIT:0> ) { switch ( coordBaseMode ) { case <NUM_LIT:2> : StructureVillagePieces . getNextStructureComponentVillagePath ( ( ComponentVillageStartPiece ) par1StructureComponent , par2List , par3Random , boundingBox . maxX + <NUM_LIT:1> , boundingBox . minY , boundingBox . minZ , <NUM_LIT:3> , getComponentType ( ) ) ; break ; case <NUM_LIT:0> : StructureVillagePieces . getNextStructureComponentVillagePath ( ( ComponentVillageStartPiece ) par1StructureComponent , par2List , par3Random , boundingBox . maxX + <NUM_LIT:1> , boundingBox . minY , boundingBox . maxZ - <NUM_LIT:2> , <NUM_LIT:3> , getComponentType ( ) ) ; break ; case <NUM_LIT:3> : StructureVillagePieces . getNextStructureComponentVillagePath ( ( ComponentVillageStartPiece ) par1StructureComponent , par2List , par3Random , boundingBox . maxX - <NUM_LIT:2> , boundingBox . minY , boundingBox . maxZ + <NUM_LIT:1> , <NUM_LIT:0> , getComponentType ( ) ) ; break ; case <NUM_LIT:1> : StructureVillagePieces . getNextStructureComponentVillagePath ( ( ComponentVillageStartPiece ) par1StructureComponent , par2List , par3Random , boundingBox . minX , boundingBox . minY , boundingBox . maxZ + <NUM_LIT:1> , <NUM_LIT:0> , getComponentType ( ) ) ; break ; } } } public static StructureBoundingBox func_35378_a ( ComponentVillageStartPiece par0ComponentVillageStartPiece , List par1List , Random par2Random , int par3 , int par4 , int par5 , int par6 ) { for ( int i = <NUM_LIT:7> * MathHelper . getRandomIntegerInRange ( par2Random , <NUM_LIT:3> , <NUM_LIT:5> ) ; i >= <NUM_LIT:7> ; i -= <NUM_LIT:7> ) { StructureBoundingBox structureboundingbox = StructureBoundingBox . getComponentToAddBoundingBox ( par3 , par4 , par5 , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:3> , <NUM_LIT:3> , i , par6 ) ; if ( StructureComponent . findIntersecting ( par1List , structureboundingbox ) == null ) { return structureboundingbox ; } } return null ; } public boolean addComponentParts ( World par1World , Random par2Random , StructureBoundingBox par3StructureBoundingBox ) { for ( int i = boundingBox . minX ; i <= boundingBox . maxX ; i ++ ) { for ( int j = boundingBox . minZ ; j <= boundingBox . maxZ ; j ++ ) { if ( par3StructureBoundingBox . isVecInside ( i , <NUM_LIT> , j ) ) { int k = par1World . getTopSolidOrLiquidBlock ( i , j ) - <NUM_LIT:1> ; par1World . setBlock ( i , k , j , Block . gravel . blockID ) ; } } } return true ; } } </s>
<s> package net . minecraft . src ; import java . util . List ; import java . util . Random ; public class ComponentNetherBridgeNetherStalkRoom extends ComponentNetherBridgePiece { public ComponentNetherBridgeNetherStalkRoom ( int par1 , Random par2Random , StructureBoundingBox par3StructureBoundingBox , int par4 ) { super ( par1 ) ; coordBaseMode = par4 ; boundingBox = par3StructureBoundingBox ; } public void buildComponent ( StructureComponent par1StructureComponent , List par2List , Random par3Random ) { getNextComponentNormal ( ( ComponentNetherBridgeStartPiece ) par1StructureComponent , par2List , par3Random , <NUM_LIT:5> , <NUM_LIT:3> , true ) ; getNextComponentNormal ( ( ComponentNetherBridgeStartPiece ) par1StructureComponent , par2List , par3Random , <NUM_LIT:5> , <NUM_LIT:11> , true ) ; } public static ComponentNetherBridgeNetherStalkRoom createValidComponent ( List par0List , Random par1Random , int par2 , int par3 , int par4 , int par5 , int par6 ) { StructureBoundingBox structureboundingbox = StructureBoundingBox . getComponentToAddBoundingBox ( par2 , par3 , par4 , - <NUM_LIT:5> , - <NUM_LIT:3> , <NUM_LIT:0> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , par5 ) ; if ( ! isAboveGround ( structureboundingbox ) || StructureComponent . findIntersecting ( par0List , structureboundingbox ) != null ) { return null ; } else { return new ComponentNetherBridgeNetherStalkRoom ( par6 , par1Random , structureboundingbox , par5 ) ; } } public boolean addComponentParts ( World par1World , Random par2Random , StructureBoundingBox par3StructureBoundingBox ) { fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:0> , <NUM_LIT:3> , <NUM_LIT:0> , <NUM_LIT:12> , <NUM_LIT:4> , <NUM_LIT:12> , Block . netherBrick . blockID , Block . netherBrick . blockID , false ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:0> , <NUM_LIT:5> , <NUM_LIT:0> , <NUM_LIT:12> , <NUM_LIT> , <NUM_LIT:12> , <NUM_LIT:0> , <NUM_LIT:0> , false ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:0> , <NUM_LIT:5> , <NUM_LIT:0> , <NUM_LIT:1> , <NUM_LIT:12> , <NUM_LIT:12> , Block . netherBrick . blockID , Block . netherBrick . blockID , false ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:11> , <NUM_LIT:5> , <NUM_LIT:0> , <NUM_LIT:12> , <NUM_LIT:12> , <NUM_LIT:12> , Block . netherBrick . blockID , Block . netherBrick . blockID , false ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:2> , <NUM_LIT:5> , <NUM_LIT:11> , <NUM_LIT:4> , <NUM_LIT:12> , <NUM_LIT:12> , Block . netherBrick . blockID , Block . netherBrick . blockID , false ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:8> , <NUM_LIT:5> , <NUM_LIT:11> , <NUM_LIT:10> , <NUM_LIT:12> , <NUM_LIT:12> , Block . netherBrick . blockID , Block . netherBrick . blockID , false ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:5> , <NUM_LIT:9> , <NUM_LIT:11> , <NUM_LIT:7> , <NUM_LIT:12> , <NUM_LIT:12> , Block . netherBrick . blockID , Block . netherBrick . blockID , false ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:2> , <NUM_LIT:5> , <NUM_LIT:0> , <NUM_LIT:4> , <NUM_LIT:12> , <NUM_LIT:1> , Block . netherBrick . blockID , Block . netherBrick . blockID , false ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:8> , <NUM_LIT:5> , <NUM_LIT:0> , <NUM_LIT:10> , <NUM_LIT:12> , <NUM_LIT:1> , Block . netherBrick . blockID , Block . netherBrick . blockID , false ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:5> , <NUM_LIT:9> , <NUM_LIT:0> , <NUM_LIT:7> , <NUM_LIT:12> , <NUM_LIT:1> , Block . netherBrick . blockID , Block . netherBrick . blockID , false ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:2> , <NUM_LIT:11> , <NUM_LIT:2> , <NUM_LIT:10> , <NUM_LIT:12> , <NUM_LIT:10> , Block . netherBrick . blockID , Block . netherBrick . blockID , false ) ; for ( int i = <NUM_LIT:1> ; i <= <NUM_LIT:11> ; i += <NUM_LIT:2> ) { fillWithBlocks ( par1World , par3StructureBoundingBox , i , <NUM_LIT:10> , <NUM_LIT:0> , i , <NUM_LIT:11> , <NUM_LIT:0> , Block . netherFence . blockID , Block . netherFence . blockID , false ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , i , <NUM_LIT:10> , <NUM_LIT:12> , i , <NUM_LIT:11> , <NUM_LIT:12> , Block . netherFence . blockID , Block . netherFence . blockID , false ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:0> , <NUM_LIT:10> , i , <NUM_LIT:0> , <NUM_LIT:11> , i , Block . netherFence . blockID , Block . netherFence . blockID , false ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:12> , <NUM_LIT:10> , i , <NUM_LIT:12> , <NUM_LIT:11> , i , Block . netherFence . blockID , Block . netherFence . blockID , false ) ; placeBlockAtCurrentPosition ( par1World , Block . netherBrick . blockID , <NUM_LIT:0> , i , <NUM_LIT> , <NUM_LIT:0> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . netherBrick . blockID , <NUM_LIT:0> , i , <NUM_LIT> , <NUM_LIT:12> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . netherBrick . blockID , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT> , i , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . netherBrick . blockID , <NUM_LIT:0> , <NUM_LIT:12> , <NUM_LIT> , i , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . netherFence . blockID , <NUM_LIT:0> , i + <NUM_LIT:1> , <NUM_LIT> , <NUM_LIT:0> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . netherFence . blockID , <NUM_LIT:0> , i + <NUM_LIT:1> , <NUM_LIT> , <NUM_LIT:12> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . netherFence . blockID , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT> , i + <NUM_LIT:1> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . netherFence . blockID , <NUM_LIT:0> , <NUM_LIT:12> , <NUM_LIT> , i + <NUM_LIT:1> , par3StructureBoundingBox ) ; } placeBlockAtCurrentPosition ( par1World , Block . netherFence . blockID , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT> , <NUM_LIT:0> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . netherFence . blockID , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT> , <NUM_LIT:12> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . netherFence . blockID , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT> , <NUM_LIT:0> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . netherFence . blockID , <NUM_LIT:0> , <NUM_LIT:12> , <NUM_LIT> , <NUM_LIT:0> , par3StructureBoundingBox ) ; for ( int j = <NUM_LIT:3> ; j <= <NUM_LIT:9> ; j += <NUM_LIT:2> ) { fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:1> , <NUM_LIT:7> , j , <NUM_LIT:1> , <NUM_LIT:8> , j , Block . netherFence . blockID , Block . netherFence . blockID , false ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:11> , <NUM_LIT:7> , j , <NUM_LIT:11> , <NUM_LIT:8> , j , Block . netherFence . blockID , Block . netherFence . blockID , false ) ; } int k = getMetadataWithOffset ( Block . stairsNetherBrick . blockID , <NUM_LIT:3> ) ; for ( int l = <NUM_LIT:0> ; l <= <NUM_LIT:6> ; l ++ ) { int k1 = l + <NUM_LIT:4> ; for ( int i2 = <NUM_LIT:5> ; i2 <= <NUM_LIT:7> ; i2 ++ ) { placeBlockAtCurrentPosition ( par1World , Block . stairsNetherBrick . blockID , k , i2 , <NUM_LIT:5> + l , k1 , par3StructureBoundingBox ) ; } if ( k1 >= <NUM_LIT:5> && k1 <= <NUM_LIT:8> ) { fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:5> , <NUM_LIT:5> , k1 , <NUM_LIT:7> , l + <NUM_LIT:4> , k1 , Block . netherBrick . blockID , Block . netherBrick . blockID , false ) ; } else if ( k1 >= <NUM_LIT:9> && k1 <= <NUM_LIT:10> ) { fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:5> , <NUM_LIT:8> , k1 , <NUM_LIT:7> , l + <NUM_LIT:4> , k1 , Block . netherBrick . blockID , Block . netherBrick . blockID , false ) ; } if ( l >= <NUM_LIT:1> ) { fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:5> , <NUM_LIT:6> + l , k1 , <NUM_LIT:7> , <NUM_LIT:9> + l , k1 , <NUM_LIT:0> , <NUM_LIT:0> , false ) ; } } for ( int i1 = <NUM_LIT:5> ; i1 <= <NUM_LIT:7> ; i1 ++ ) { placeBlockAtCurrentPosition ( par1World , Block . stairsNetherBrick . blockID , k , i1 , <NUM_LIT:12> , <NUM_LIT:11> , par3StructureBoundingBox ) ; } fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:5> , <NUM_LIT:6> , <NUM_LIT:7> , <NUM_LIT:5> , <NUM_LIT:7> , <NUM_LIT:7> , Block . netherFence . blockID , Block . netherFence . blockID , false ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:7> , <NUM_LIT:6> , <NUM_LIT:7> , <NUM_LIT:7> , <NUM_LIT:7> , <NUM_LIT:7> , Block . netherFence . blockID , Block . netherFence . blockID , false ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:5> , <NUM_LIT> , <NUM_LIT:12> , <NUM_LIT:7> , <NUM_LIT> , <NUM_LIT:12> , <NUM_LIT:0> , <NUM_LIT:0> , false ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:2> , <NUM_LIT:5> , <NUM_LIT:2> , <NUM_LIT:3> , <NUM_LIT:5> , <NUM_LIT:3> , Block . netherBrick . blockID , Block . netherBrick . blockID , false ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:2> , <NUM_LIT:5> , <NUM_LIT:9> , <NUM_LIT:3> , <NUM_LIT:5> , <NUM_LIT:10> , Block . netherBrick . blockID , Block . netherBrick . blockID , false ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:2> , <NUM_LIT:5> , <NUM_LIT:4> , <NUM_LIT:2> , <NUM_LIT:5> , <NUM_LIT:8> , Block . netherBrick . blockID , Block . netherBrick . blockID , false ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:9> , <NUM_LIT:5> , <NUM_LIT:2> , <NUM_LIT:10> , <NUM_LIT:5> , <NUM_LIT:3> , Block . netherBrick . blockID , Block . netherBrick . blockID , false ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:9> , <NUM_LIT:5> , <NUM_LIT:9> , <NUM_LIT:10> , <NUM_LIT:5> , <NUM_LIT:10> , Block . netherBrick . blockID , Block . netherBrick . blockID , false ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:10> , <NUM_LIT:5> , <NUM_LIT:4> , <NUM_LIT:10> , <NUM_LIT:5> , <NUM_LIT:8> , Block . netherBrick . blockID , Block . netherBrick . blockID , false ) ; int j1 = getMetadataWithOffset ( Block . stairsNetherBrick . blockID , <NUM_LIT:0> ) ; int l1 = getMetadataWithOffset ( Block . stairsNetherBrick . blockID , <NUM_LIT:1> ) ; placeBlockAtCurrentPosition ( par1World , Block . stairsNetherBrick . blockID , l1 , <NUM_LIT:4> , <NUM_LIT:5> , <NUM_LIT:2> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . stairsNetherBrick . blockID , l1 , <NUM_LIT:4> , <NUM_LIT:5> , <NUM_LIT:3> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . stairsNetherBrick . blockID , l1 , <NUM_LIT:4> , <NUM_LIT:5> , <NUM_LIT:9> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . stairsNetherBrick . blockID , l1 , <NUM_LIT:4> , <NUM_LIT:5> , <NUM_LIT:10> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . stairsNetherBrick . blockID , j1 , <NUM_LIT:8> , <NUM_LIT:5> , <NUM_LIT:2> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . stairsNetherBrick . blockID , j1 , <NUM_LIT:8> , <NUM_LIT:5> , <NUM_LIT:3> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . stairsNetherBrick . blockID , j1 , <NUM_LIT:8> , <NUM_LIT:5> , <NUM_LIT:9> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . stairsNetherBrick . blockID , j1 , <NUM_LIT:8> , <NUM_LIT:5> , <NUM_LIT:10> , par3StructureBoundingBox ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:3> , <NUM_LIT:4> , <NUM_LIT:4> , <NUM_LIT:4> , <NUM_LIT:4> , <NUM_LIT:8> , Block . slowSand . blockID , Block . slowSand . blockID , false ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:8> , <NUM_LIT:4> , <NUM_LIT:4> , <NUM_LIT:9> , <NUM_LIT:4> , <NUM_LIT:8> , Block . slowSand . blockID , Block . slowSand . blockID , false ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:3> , <NUM_LIT:5> , <NUM_LIT:4> , <NUM_LIT:4> , <NUM_LIT:5> , <NUM_LIT:8> , Block . netherStalk . blockID , Block . netherStalk . blockID , false ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:8> , <NUM_LIT:5> , <NUM_LIT:4> , <NUM_LIT:9> , <NUM_LIT:5> , <NUM_LIT:8> , Block . netherStalk . blockID , Block . netherStalk . blockID , false ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:4> , <NUM_LIT:2> , <NUM_LIT:0> , <NUM_LIT:8> , <NUM_LIT:2> , <NUM_LIT:12> , Block . netherBrick . blockID , Block . netherBrick . blockID , false ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:0> , <NUM_LIT:2> , <NUM_LIT:4> , <NUM_LIT:12> , <NUM_LIT:2> , <NUM_LIT:8> , Block . netherBrick . blockID , Block . netherBrick . blockID , false ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:4> , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:8> , <NUM_LIT:1> , <NUM_LIT:3> , Block . netherBrick . blockID , Block . netherBrick . blockID , false ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:4> , <NUM_LIT:0> , <NUM_LIT:9> , <NUM_LIT:8> , <NUM_LIT:1> , <NUM_LIT:12> , Block . netherBrick . blockID , Block . netherBrick . blockID , false ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:4> , <NUM_LIT:3> , <NUM_LIT:1> , <NUM_LIT:8> , Block . netherBrick . blockID , Block . netherBrick . blockID , false ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:9> , <NUM_LIT:0> , <NUM_LIT:4> , <NUM_LIT:12> , <NUM_LIT:1> , <NUM_LIT:8> , Block . netherBrick . blockID , Block . netherBrick . blockID , false ) ; for ( int j2 = <NUM_LIT:4> ; j2 <= <NUM_LIT:8> ; j2 ++ ) { for ( int l2 = <NUM_LIT:0> ; l2 <= <NUM_LIT:2> ; l2 ++ ) { fillCurrentPositionBlocksDownwards ( par1World , Block . netherBrick . blockID , <NUM_LIT:0> , j2 , - <NUM_LIT:1> , l2 , par3StructureBoundingBox ) ; fillCurrentPositionBlocksDownwards ( par1World , Block . netherBrick . blockID , <NUM_LIT:0> , j2 , - <NUM_LIT:1> , <NUM_LIT:12> - l2 , par3StructureBoundingBox ) ; } } for ( int k2 = <NUM_LIT:0> ; k2 <= <NUM_LIT:2> ; k2 ++ ) { for ( int i3 = <NUM_LIT:4> ; i3 <= <NUM_LIT:8> ; i3 ++ ) { fillCurrentPositionBlocksDownwards ( par1World , Block . netherBrick . blockID , <NUM_LIT:0> , k2 , - <NUM_LIT:1> , i3 , par3StructureBoundingBox ) ; fillCurrentPositionBlocksDownwards ( par1World , Block . netherBrick . blockID , <NUM_LIT:0> , <NUM_LIT:12> - k2 , - <NUM_LIT:1> , i3 , par3StructureBoundingBox ) ; } } return true ; } } </s>
<s> package net . minecraft . src ; import java . util . List ; import java . util . Random ; public class EntityMinecart extends Entity implements IInventory { private ItemStack cargoItems [ ] ; private int fuel ; private boolean field_469_aj ; public int minecartType ; public double pushX ; public double pushZ ; private static final int field_468_ak [ ] [ ] [ ] = { { { <NUM_LIT:0> , <NUM_LIT:0> , - <NUM_LIT:1> } , { <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:1> } } , { { - <NUM_LIT:1> , <NUM_LIT:0> , <NUM_LIT:0> } , { <NUM_LIT:1> , <NUM_LIT:0> , <NUM_LIT:0> } } , { { - <NUM_LIT:1> , - <NUM_LIT:1> , <NUM_LIT:0> } , { <NUM_LIT:1> , <NUM_LIT:0> , <NUM_LIT:0> } } , { { - <NUM_LIT:1> , <NUM_LIT:0> , <NUM_LIT:0> } , { <NUM_LIT:1> , - <NUM_LIT:1> , <NUM_LIT:0> } } , { { <NUM_LIT:0> , <NUM_LIT:0> , - <NUM_LIT:1> } , { <NUM_LIT:0> , - <NUM_LIT:1> , <NUM_LIT:1> } } , { { <NUM_LIT:0> , - <NUM_LIT:1> , - <NUM_LIT:1> } , { <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:1> } } , { { <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:1> } , { <NUM_LIT:1> , <NUM_LIT:0> , <NUM_LIT:0> } } , { { <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:1> } , { - <NUM_LIT:1> , <NUM_LIT:0> , <NUM_LIT:0> } } , { { <NUM_LIT:0> , <NUM_LIT:0> , - <NUM_LIT:1> } , { - <NUM_LIT:1> , <NUM_LIT:0> , <NUM_LIT:0> } } , { { <NUM_LIT:0> , <NUM_LIT:0> , - <NUM_LIT:1> } , { <NUM_LIT:1> , <NUM_LIT:0> , <NUM_LIT:0> } } } ; private int turnProgress ; private double minecartX ; private double minecartY ; private double minecartZ ; private double minecartYaw ; private double minecartPitch ; public EntityMinecart ( World par1World ) { super ( par1World ) ; cargoItems = new ItemStack [ <NUM_LIT> ] ; fuel = <NUM_LIT:0> ; field_469_aj = false ; preventEntitySpawning = true ; setSize ( <NUM_LIT> , <NUM_LIT> ) ; yOffset = height / <NUM_LIT> ; } protected boolean canTriggerWalking ( ) { return false ; } protected void entityInit ( ) { dataWatcher . addObject ( <NUM_LIT:16> , new Byte ( ( byte ) <NUM_LIT:0> ) ) ; dataWatcher . addObject ( <NUM_LIT> , new Integer ( <NUM_LIT:0> ) ) ; dataWatcher . addObject ( <NUM_LIT> , new Integer ( <NUM_LIT:1> ) ) ; dataWatcher . addObject ( <NUM_LIT> , new Integer ( <NUM_LIT:0> ) ) ; } public AxisAlignedBB getCollisionBox ( Entity par1Entity ) { return par1Entity . boundingBox ; } public AxisAlignedBB getBoundingBox ( ) { return null ; } public boolean canBePushed ( ) { return true ; } public EntityMinecart ( World par1World , double par2 , double par4 , double par6 , int par8 ) { this ( par1World ) ; setPosition ( par2 , par4 + ( double ) yOffset , par6 ) ; motionX = <NUM_LIT> ; motionY = <NUM_LIT> ; motionZ = <NUM_LIT> ; prevPosX = par2 ; prevPosY = par4 ; prevPosZ = par6 ; minecartType = par8 ; } public double getMountedYOffset ( ) { return ( double ) height * <NUM_LIT> - <NUM_LIT> ; } public boolean attackEntityFrom ( DamageSource par1DamageSource , int par2 ) { if ( worldObj . isRemote || isDead ) { return true ; } func_41016_d ( - func_41021_q ( ) ) ; func_41014_b ( <NUM_LIT:10> ) ; setBeenAttacked ( ) ; func_41018_e_ ( func_41020_o ( ) + par2 * <NUM_LIT:10> ) ; if ( func_41020_o ( ) > <NUM_LIT> ) { if ( riddenByEntity != null ) { riddenByEntity . mountEntity ( this ) ; } setDead ( ) ; dropItemWithOffset ( Item . minecartEmpty . shiftedIndex , <NUM_LIT:1> , <NUM_LIT> ) ; if ( minecartType == <NUM_LIT:1> ) { EntityMinecart entityminecart = this ; label0 : for ( int i = <NUM_LIT:0> ; i < entityminecart . getSizeInventory ( ) ; i ++ ) { ItemStack itemstack = entityminecart . getStackInSlot ( i ) ; if ( itemstack == null ) { continue ; } float f = rand . nextFloat ( ) * <NUM_LIT> + <NUM_LIT> ; float f1 = rand . nextFloat ( ) * <NUM_LIT> + <NUM_LIT> ; float f2 = rand . nextFloat ( ) * <NUM_LIT> + <NUM_LIT> ; do { if ( itemstack . stackSize <= <NUM_LIT:0> ) { continue label0 ; } int j = rand . nextInt ( <NUM_LIT> ) + <NUM_LIT:10> ; if ( j > itemstack . stackSize ) { j = itemstack . stackSize ; } itemstack . stackSize -= j ; EntityItem entityitem = new EntityItem ( worldObj , posX + ( double ) f , posY + ( double ) f1 , posZ + ( double ) f2 , new ItemStack ( itemstack . itemID , j , itemstack . getItemDamage ( ) ) ) ; float f3 = <NUM_LIT> ; entityitem . motionX = ( float ) rand . nextGaussian ( ) * f3 ; entityitem . motionY = ( float ) rand . nextGaussian ( ) * f3 + <NUM_LIT> ; entityitem . motionZ = ( float ) rand . nextGaussian ( ) * f3 ; worldObj . spawnEntityInWorld ( entityitem ) ; } while ( true ) ; } dropItemWithOffset ( Block . chest . blockID , <NUM_LIT:1> , <NUM_LIT> ) ; } else if ( minecartType == <NUM_LIT:2> ) { dropItemWithOffset ( Block . stoneOvenIdle . blockID , <NUM_LIT:1> , <NUM_LIT> ) ; } } return true ; } public boolean canBeCollidedWith ( ) { return ! isDead ; } public void setDead ( ) { label0 : for ( int i = <NUM_LIT:0> ; i < getSizeInventory ( ) ; i ++ ) { ItemStack itemstack = getStackInSlot ( i ) ; if ( itemstack == null ) { continue ; } float f = rand . nextFloat ( ) * <NUM_LIT> + <NUM_LIT> ; float f1 = rand . nextFloat ( ) * <NUM_LIT> + <NUM_LIT> ; float f2 = rand . nextFloat ( ) * <NUM_LIT> + <NUM_LIT> ; do { if ( itemstack . stackSize <= <NUM_LIT:0> ) { continue label0 ; } int j = rand . nextInt ( <NUM_LIT> ) + <NUM_LIT:10> ; if ( j > itemstack . stackSize ) { j = itemstack . stackSize ; } itemstack . stackSize -= j ; EntityItem entityitem = new EntityItem ( worldObj , posX + ( double ) f , posY + ( double ) f1 , posZ + ( double ) f2 , new ItemStack ( itemstack . itemID , j , itemstack . getItemDamage ( ) ) ) ; if ( itemstack . hasTagCompound ( ) ) { entityitem . item . setTagCompound ( ( NBTTagCompound ) itemstack . getTagCompound ( ) . copy ( ) ) ; } float f3 = <NUM_LIT> ; entityitem . motionX = ( float ) rand . nextGaussian ( ) * f3 ; entityitem . motionY = ( float ) rand . nextGaussian ( ) * f3 + <NUM_LIT> ; entityitem . motionZ = ( float ) rand . nextGaussian ( ) * f3 ; worldObj . spawnEntityInWorld ( entityitem ) ; } while ( true ) ; } super . setDead ( ) ; } public void onUpdate ( ) { if ( func_41019_p ( ) > <NUM_LIT:0> ) { func_41014_b ( func_41019_p ( ) - <NUM_LIT:1> ) ; } if ( func_41020_o ( ) > <NUM_LIT:0> ) { func_41018_e_ ( func_41020_o ( ) - <NUM_LIT:1> ) ; } if ( posY < - <NUM_LIT> ) { kill ( ) ; } if ( isMinecartPowered ( ) && rand . nextInt ( <NUM_LIT:4> ) == <NUM_LIT:0> ) { worldObj . spawnParticle ( "<STR_LIT>" , posX , posY + <NUM_LIT> , posZ , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> ) ; } if ( worldObj . isRemote ) { if ( turnProgress > <NUM_LIT:0> ) { double d = posX + ( minecartX - posX ) / ( double ) turnProgress ; double d1 = posY + ( minecartY - posY ) / ( double ) turnProgress ; double d3 = posZ + ( minecartZ - posZ ) / ( double ) turnProgress ; double d5 ; for ( d5 = minecartYaw - ( double ) rotationYaw ; d5 < - <NUM_LIT> ; d5 += <NUM_LIT> ) { } for ( ; d5 >= <NUM_LIT> ; d5 -= <NUM_LIT> ) { } rotationYaw += d5 / ( double ) turnProgress ; rotationPitch += ( minecartPitch - ( double ) rotationPitch ) / ( double ) turnProgress ; turnProgress -- ; setPosition ( d , d1 , d3 ) ; setRotation ( rotationYaw , rotationPitch ) ; } else { setPosition ( posX , posY , posZ ) ; setRotation ( rotationYaw , rotationPitch ) ; } return ; } prevPosX = posX ; prevPosY = posY ; prevPosZ = posZ ; motionY -= <NUM_LIT> ; int i = MathHelper . floor_double ( posX ) ; int j = MathHelper . floor_double ( posY ) ; int k = MathHelper . floor_double ( posZ ) ; if ( BlockRail . isRailBlockAt ( worldObj , i , j - <NUM_LIT:1> , k ) ) { j -- ; } double d2 = <NUM_LIT> ; double d4 = <NUM_LIT> ; int l = worldObj . getBlockId ( i , j , k ) ; if ( BlockRail . isRailBlock ( l ) ) { Vec3D vec3d = func_182_g ( posX , posY , posZ ) ; int i1 = worldObj . getBlockMetadata ( i , j , k ) ; posY = j ; boolean flag = false ; boolean flag1 = false ; if ( l == Block . railPowered . blockID ) { flag = ( i1 & <NUM_LIT:8> ) != <NUM_LIT:0> ; flag1 = ! flag ; } if ( ( ( BlockRail ) Block . blocksList [ l ] ) . isPowered ( ) ) { i1 &= <NUM_LIT:7> ; } if ( i1 >= <NUM_LIT:2> && i1 <= <NUM_LIT:5> ) { posY = j + <NUM_LIT:1> ; } if ( i1 == <NUM_LIT:2> ) { motionX -= d4 ; } if ( i1 == <NUM_LIT:3> ) { motionX += d4 ; } if ( i1 == <NUM_LIT:4> ) { motionZ += d4 ; } if ( i1 == <NUM_LIT:5> ) { motionZ -= d4 ; } int ai [ ] [ ] = field_468_ak [ i1 ] ; double d9 = ai [ <NUM_LIT:1> ] [ <NUM_LIT:0> ] - ai [ <NUM_LIT:0> ] [ <NUM_LIT:0> ] ; double d10 = ai [ <NUM_LIT:1> ] [ <NUM_LIT:2> ] - ai [ <NUM_LIT:0> ] [ <NUM_LIT:2> ] ; double d11 = Math . sqrt ( d9 * d9 + d10 * d10 ) ; double d12 = motionX * d9 + motionZ * d10 ; if ( d12 < <NUM_LIT> ) { d9 = - d9 ; d10 = - d10 ; } double d13 = Math . sqrt ( motionX * motionX + motionZ * motionZ ) ; motionX = ( d13 * d9 ) / d11 ; motionZ = ( d13 * d10 ) / d11 ; if ( flag1 ) { double d16 = Math . sqrt ( motionX * motionX + motionZ * motionZ ) ; if ( d16 < <NUM_LIT> ) { motionX *= <NUM_LIT> ; motionY *= <NUM_LIT> ; motionZ *= <NUM_LIT> ; } else { motionX *= <NUM_LIT> ; motionY *= <NUM_LIT> ; motionZ *= <NUM_LIT> ; } } double d17 = <NUM_LIT> ; double d18 = ( double ) i + <NUM_LIT> + ( double ) ai [ <NUM_LIT:0> ] [ <NUM_LIT:0> ] * <NUM_LIT> ; double d19 = ( double ) k + <NUM_LIT> + ( double ) ai [ <NUM_LIT:0> ] [ <NUM_LIT:2> ] * <NUM_LIT> ; double d20 = ( double ) i + <NUM_LIT> + ( double ) ai [ <NUM_LIT:1> ] [ <NUM_LIT:0> ] * <NUM_LIT> ; double d21 = ( double ) k + <NUM_LIT> + ( double ) ai [ <NUM_LIT:1> ] [ <NUM_LIT:2> ] * <NUM_LIT> ; d9 = d20 - d18 ; d10 = d21 - d19 ; if ( d9 == <NUM_LIT> ) { posX = ( double ) i + <NUM_LIT> ; d17 = posZ - ( double ) k ; } else if ( d10 == <NUM_LIT> ) { posZ = ( double ) k + <NUM_LIT> ; d17 = posX - ( double ) i ; } else { double d22 = posX - d18 ; double d24 = posZ - d19 ; double d26 = ( d22 * d9 + d24 * d10 ) * <NUM_LIT> ; d17 = d26 ; } posX = d18 + d9 * d17 ; posZ = d19 + d10 * d17 ; setPosition ( posX , posY + ( double ) yOffset , posZ ) ; double d23 = motionX ; double d25 = motionZ ; if ( riddenByEntity != null ) { d23 *= <NUM_LIT> ; d25 *= <NUM_LIT> ; } if ( d23 < - d2 ) { d23 = - d2 ; } if ( d23 > d2 ) { d23 = d2 ; } if ( d25 < - d2 ) { d25 = - d2 ; } if ( d25 > d2 ) { d25 = d2 ; } moveEntity ( d23 , <NUM_LIT> , d25 ) ; if ( ai [ <NUM_LIT:0> ] [ <NUM_LIT:1> ] != <NUM_LIT:0> && MathHelper . floor_double ( posX ) - i == ai [ <NUM_LIT:0> ] [ <NUM_LIT:0> ] && MathHelper . floor_double ( posZ ) - k == ai [ <NUM_LIT:0> ] [ <NUM_LIT:2> ] ) { setPosition ( posX , posY + ( double ) ai [ <NUM_LIT:0> ] [ <NUM_LIT:1> ] , posZ ) ; } else if ( ai [ <NUM_LIT:1> ] [ <NUM_LIT:1> ] != <NUM_LIT:0> && MathHelper . floor_double ( posX ) - i == ai [ <NUM_LIT:1> ] [ <NUM_LIT:0> ] && MathHelper . floor_double ( posZ ) - k == ai [ <NUM_LIT:1> ] [ <NUM_LIT:2> ] ) { setPosition ( posX , posY + ( double ) ai [ <NUM_LIT:1> ] [ <NUM_LIT:1> ] , posZ ) ; } if ( riddenByEntity != null ) { motionX *= <NUM_LIT> ; motionY *= <NUM_LIT> ; motionZ *= <NUM_LIT> ; } else { if ( minecartType == <NUM_LIT:2> ) { double d27 = MathHelper . sqrt_double ( pushX * pushX + pushZ * pushZ ) ; if ( d27 > <NUM_LIT> ) { pushX /= d27 ; pushZ /= d27 ; double d29 = <NUM_LIT> ; motionX *= <NUM_LIT> ; motionY *= <NUM_LIT> ; motionZ *= <NUM_LIT> ; motionX += pushX * d29 ; motionZ += pushZ * d29 ; } else { motionX *= <NUM_LIT> ; motionY *= <NUM_LIT> ; motionZ *= <NUM_LIT> ; } } motionX *= <NUM_LIT> ; motionY *= <NUM_LIT> ; motionZ *= <NUM_LIT> ; } Vec3D vec3d1 = func_182_g ( posX , posY , posZ ) ; if ( vec3d1 != null && vec3d != null ) { double d28 = ( vec3d . yCoord - vec3d1 . yCoord ) * <NUM_LIT> ; double d14 = Math . sqrt ( motionX * motionX + motionZ * motionZ ) ; if ( d14 > <NUM_LIT> ) { motionX = ( motionX / d14 ) * ( d14 + d28 ) ; motionZ = ( motionZ / d14 ) * ( d14 + d28 ) ; } setPosition ( posX , vec3d1 . yCoord , posZ ) ; } int k1 = MathHelper . floor_double ( posX ) ; int l1 = MathHelper . floor_double ( posZ ) ; if ( k1 != i || l1 != k ) { double d15 = Math . sqrt ( motionX * motionX + motionZ * motionZ ) ; motionX = d15 * ( double ) ( k1 - i ) ; motionZ = d15 * ( double ) ( l1 - k ) ; } if ( minecartType == <NUM_LIT:2> ) { double d30 = MathHelper . sqrt_double ( pushX * pushX + pushZ * pushZ ) ; if ( d30 > <NUM_LIT> && motionX * motionX + motionZ * motionZ > <NUM_LIT> ) { pushX /= d30 ; pushZ /= d30 ; if ( pushX * motionX + pushZ * motionZ < <NUM_LIT> ) { pushX = <NUM_LIT> ; pushZ = <NUM_LIT> ; } else { pushX = motionX ; pushZ = motionZ ; } } } if ( flag ) { double d31 = Math . sqrt ( motionX * motionX + motionZ * motionZ ) ; if ( d31 > <NUM_LIT> ) { double d32 = <NUM_LIT> ; motionX += ( motionX / d31 ) * d32 ; motionZ += ( motionZ / d31 ) * d32 ; } else if ( i1 == <NUM_LIT:1> ) { if ( worldObj . isBlockNormalCube ( i - <NUM_LIT:1> , j , k ) ) { motionX = <NUM_LIT> ; } else if ( worldObj . isBlockNormalCube ( i + <NUM_LIT:1> , j , k ) ) { motionX = - <NUM_LIT> ; } } else if ( i1 == <NUM_LIT:0> ) { if ( worldObj . isBlockNormalCube ( i , j , k - <NUM_LIT:1> ) ) { motionZ = <NUM_LIT> ; } else if ( worldObj . isBlockNormalCube ( i , j , k + <NUM_LIT:1> ) ) { motionZ = - <NUM_LIT> ; } } } } else { if ( motionX < - d2 ) { motionX = - d2 ; } if ( motionX > d2 ) { motionX = d2 ; } if ( motionZ < - d2 ) { motionZ = - d2 ; } if ( motionZ > d2 ) { motionZ = d2 ; } if ( onGround ) { motionX *= <NUM_LIT> ; motionY *= <NUM_LIT> ; motionZ *= <NUM_LIT> ; } moveEntity ( motionX , motionY , motionZ ) ; if ( ! onGround ) { motionX *= <NUM_LIT> ; motionY *= <NUM_LIT> ; motionZ *= <NUM_LIT> ; } } rotationPitch = <NUM_LIT> ; double d6 = prevPosX - posX ; double d7 = prevPosZ - posZ ; if ( d6 * d6 + d7 * d7 > <NUM_LIT> ) { rotationYaw = ( float ) ( ( Math . atan2 ( d7 , d6 ) * <NUM_LIT> ) / Math . PI ) ; if ( field_469_aj ) { rotationYaw += <NUM_LIT> ; } } double d8 ; for ( d8 = rotationYaw - prevRotationYaw ; d8 >= <NUM_LIT> ; d8 -= <NUM_LIT> ) { } for ( ; d8 < - <NUM_LIT> ; d8 += <NUM_LIT> ) { } if ( d8 < - <NUM_LIT> || d8 >= <NUM_LIT> ) { rotationYaw += <NUM_LIT> ; field_469_aj = ! field_469_aj ; } setRotation ( rotationYaw , rotationPitch ) ; List list = worldObj . getEntitiesWithinAABBExcludingEntity ( this , boundingBox . expand ( <NUM_LIT> , <NUM_LIT> , <NUM_LIT> ) ) ; if ( list != null && list . size ( ) > <NUM_LIT:0> ) { for ( int j1 = <NUM_LIT:0> ; j1 < list . size ( ) ; j1 ++ ) { Entity entity = ( Entity ) list . get ( j1 ) ; if ( entity != riddenByEntity && entity . canBePushed ( ) && ( entity instanceof EntityMinecart ) ) { entity . applyEntityCollision ( this ) ; } } } if ( riddenByEntity != null && riddenByEntity . isDead ) { if ( riddenByEntity . ridingEntity == this ) { riddenByEntity . ridingEntity = null ; } riddenByEntity = null ; } if ( fuel > <NUM_LIT:0> ) { fuel -- ; } if ( fuel <= <NUM_LIT:0> ) { pushX = pushZ = <NUM_LIT> ; } setMinecartPowered ( fuel > <NUM_LIT:0> ) ; } public Vec3D func_182_g ( double par1 , double par3 , double par5 ) { int i = MathHelper . floor_double ( par1 ) ; int j = MathHelper . floor_double ( par3 ) ; int k = MathHelper . floor_double ( par5 ) ; if ( BlockRail . isRailBlockAt ( worldObj , i , j - <NUM_LIT:1> , k ) ) { j -- ; } int l = worldObj . getBlockId ( i , j , k ) ; if ( BlockRail . isRailBlock ( l ) ) { int i1 = worldObj . getBlockMetadata ( i , j , k ) ; par3 = j ; if ( ( ( BlockRail ) Block . blocksList [ l ] ) . isPowered ( ) ) { i1 &= <NUM_LIT:7> ; } if ( i1 >= <NUM_LIT:2> && i1 <= <NUM_LIT:5> ) { par3 = j + <NUM_LIT:1> ; } int ai [ ] [ ] = field_468_ak [ i1 ] ; double d = <NUM_LIT> ; double d1 = ( double ) i + <NUM_LIT> + ( double ) ai [ <NUM_LIT:0> ] [ <NUM_LIT:0> ] * <NUM_LIT> ; double d2 = ( double ) j + <NUM_LIT> + ( double ) ai [ <NUM_LIT:0> ] [ <NUM_LIT:1> ] * <NUM_LIT> ; double d3 = ( double ) k + <NUM_LIT> + ( double ) ai [ <NUM_LIT:0> ] [ <NUM_LIT:2> ] * <NUM_LIT> ; double d4 = ( double ) i + <NUM_LIT> + ( double ) ai [ <NUM_LIT:1> ] [ <NUM_LIT:0> ] * <NUM_LIT> ; double d5 = ( double ) j + <NUM_LIT> + ( double ) ai [ <NUM_LIT:1> ] [ <NUM_LIT:1> ] * <NUM_LIT> ; double d6 = ( double ) k + <NUM_LIT> + ( double ) ai [ <NUM_LIT:1> ] [ <NUM_LIT:2> ] * <NUM_LIT> ; double d7 = d4 - d1 ; double d8 = ( d5 - d2 ) * <NUM_LIT> ; double d9 = d6 - d3 ; if ( d7 == <NUM_LIT> ) { par1 = ( double ) i + <NUM_LIT> ; d = par5 - ( double ) k ; } else if ( d9 == <NUM_LIT> ) { par5 = ( double ) k + <NUM_LIT> ; d = par1 - ( double ) i ; } else { double d10 = par1 - d1 ; double d11 = par5 - d3 ; double d12 = ( d10 * d7 + d11 * d9 ) * <NUM_LIT> ; d = d12 ; } par1 = d1 + d7 * d ; par3 = d2 + d8 * d ; par5 = d3 + d9 * d ; if ( d8 < <NUM_LIT> ) { par3 ++ ; } if ( d8 > <NUM_LIT> ) { par3 += <NUM_LIT> ; } return Vec3D . createVector ( par1 , par3 , par5 ) ; } else { return null ; } } protected void writeEntityToNBT ( NBTTagCompound par1NBTTagCompound ) { par1NBTTagCompound . setInteger ( "<STR_LIT>" , minecartType ) ; if ( minecartType == <NUM_LIT:2> ) { par1NBTTagCompound . setDouble ( "<STR_LIT>" , pushX ) ; par1NBTTagCompound . setDouble ( "<STR_LIT>" , pushZ ) ; par1NBTTagCompound . setShort ( "<STR_LIT>" , ( short ) fuel ) ; } else if ( minecartType == <NUM_LIT:1> ) { NBTTagList nbttaglist = new NBTTagList ( ) ; for ( int i = <NUM_LIT:0> ; i < cargoItems . length ; i ++ ) { if ( cargoItems [ i ] != null ) { NBTTagCompound nbttagcompound = new NBTTagCompound ( ) ; nbttagcompound . setByte ( "<STR_LIT>" , ( byte ) i ) ; cargoItems [ i ] . writeToNBT ( nbttagcompound ) ; nbttaglist . appendTag ( nbttagcompound ) ; } } par1NBTTagCompound . setTag ( "<STR_LIT>" , nbttaglist ) ; } } protected void readEntityFromNBT ( NBTTagCompound par1NBTTagCompound ) { minecartType = par1NBTTagCompound . getInteger ( "<STR_LIT>" ) ; if ( minecartType == <NUM_LIT:2> ) { pushX = par1NBTTagCompound . getDouble ( "<STR_LIT>" ) ; pushZ = par1NBTTagCompound . getDouble ( "<STR_LIT>" ) ; fuel = par1NBTTagCompound . getShort ( "<STR_LIT>" ) ; } else if ( minecartType == <NUM_LIT:1> ) { NBTTagList nbttaglist = par1NBTTagCompound . getTagList ( "<STR_LIT>" ) ; cargoItems = new ItemStack [ getSizeInventory ( ) ] ; for ( int i = <NUM_LIT:0> ; i < nbttaglist . tagCount ( ) ; i ++ ) { NBTTagCompound nbttagcompound = ( NBTTagCompound ) nbttaglist . tagAt ( i ) ; int j = nbttagcompound . getByte ( "<STR_LIT>" ) & <NUM_LIT> ; if ( j >= <NUM_LIT:0> && j < cargoItems . length ) { cargoItems [ j ] = ItemStack . loadItemStackFromNBT ( nbttagcompound ) ; } } } } public void applyEntityCollision ( Entity par1Entity ) { if ( worldObj . isRemote ) { return ; } if ( par1Entity == riddenByEntity ) { return ; } if ( ( par1Entity instanceof EntityLiving ) && ! ( par1Entity instanceof EntityPlayer ) && ! ( par1Entity instanceof EntityIronGolem ) && minecartType == <NUM_LIT:0> && motionX * motionX + motionZ * motionZ > <NUM_LIT> && riddenByEntity == null && par1Entity . ridingEntity == null ) { par1Entity . mountEntity ( this ) ; } double d = par1Entity . posX - posX ; double d1 = par1Entity . posZ - posZ ; double d2 = d * d + d1 * d1 ; if ( d2 >= <NUM_LIT> ) { d2 = MathHelper . sqrt_double ( d2 ) ; d /= d2 ; d1 /= d2 ; double d3 = <NUM_LIT> / d2 ; if ( d3 > <NUM_LIT> ) { d3 = <NUM_LIT> ; } d *= d3 ; d1 *= d3 ; d *= <NUM_LIT> ; d1 *= <NUM_LIT> ; d *= <NUM_LIT> - entityCollisionReduction ; d1 *= <NUM_LIT> - entityCollisionReduction ; d *= <NUM_LIT> ; d1 *= <NUM_LIT> ; if ( par1Entity instanceof EntityMinecart ) { double d4 = par1Entity . posX - posX ; double d5 = par1Entity . posZ - posZ ; Vec3D vec3d = Vec3D . createVector ( d4 , <NUM_LIT> , d5 ) . normalize ( ) ; Vec3D vec3d1 = Vec3D . createVector ( MathHelper . cos ( ( rotationYaw * ( float ) Math . PI ) / <NUM_LIT> ) , <NUM_LIT> , MathHelper . sin ( ( rotationYaw * ( float ) Math . PI ) / <NUM_LIT> ) ) . normalize ( ) ; double d6 = Math . abs ( vec3d . dotProduct ( vec3d1 ) ) ; if ( d6 < <NUM_LIT> ) { return ; } double d7 = par1Entity . motionX + motionX ; double d8 = par1Entity . motionZ + motionZ ; if ( ( ( EntityMinecart ) par1Entity ) . minecartType == <NUM_LIT:2> && minecartType != <NUM_LIT:2> ) { motionX *= <NUM_LIT> ; motionZ *= <NUM_LIT> ; addVelocity ( par1Entity . motionX - d , <NUM_LIT> , par1Entity . motionZ - d1 ) ; par1Entity . motionX *= <NUM_LIT> ; par1Entity . motionZ *= <NUM_LIT> ; } else if ( ( ( EntityMinecart ) par1Entity ) . minecartType != <NUM_LIT:2> && minecartType == <NUM_LIT:2> ) { par1Entity . motionX *= <NUM_LIT> ; par1Entity . motionZ *= <NUM_LIT> ; par1Entity . addVelocity ( motionX + d , <NUM_LIT> , motionZ + d1 ) ; motionX *= <NUM_LIT> ; motionZ *= <NUM_LIT> ; } else { d7 /= <NUM_LIT> ; d8 /= <NUM_LIT> ; motionX *= <NUM_LIT> ; motionZ *= <NUM_LIT> ; addVelocity ( d7 - d , <NUM_LIT> , d8 - d1 ) ; par1Entity . motionX *= <NUM_LIT> ; par1Entity . motionZ *= <NUM_LIT> ; par1Entity . addVelocity ( d7 + d , <NUM_LIT> , d8 + d1 ) ; } } else { addVelocity ( - d , <NUM_LIT> , - d1 ) ; par1Entity . addVelocity ( d / <NUM_LIT> , <NUM_LIT> , d1 / <NUM_LIT> ) ; } } } public int getSizeInventory ( ) { return <NUM_LIT> ; } public ItemStack getStackInSlot ( int par1 ) { return cargoItems [ par1 ] ; } public ItemStack decrStackSize ( int par1 , int par2 ) { if ( cargoItems [ par1 ] != null ) { if ( cargoItems [ par1 ] . stackSize <= par2 ) { ItemStack itemstack = cargoItems [ par1 ] ; cargoItems [ par1 ] = null ; return itemstack ; } ItemStack itemstack1 = cargoItems [ par1 ] . splitStack ( par2 ) ; if ( cargoItems [ par1 ] . stackSize == <NUM_LIT:0> ) { cargoItems [ par1 ] = null ; } return itemstack1 ; } else { return null ; } } public ItemStack getStackInSlotOnClosing ( int par1 ) { if ( cargoItems [ par1 ] != null ) { ItemStack itemstack = cargoItems [ par1 ] ; cargoItems [ par1 ] = null ; return itemstack ; } else { return null ; } } public void setInventorySlotContents ( int par1 , ItemStack par2ItemStack ) { cargoItems [ par1 ] = par2ItemStack ; if ( par2ItemStack != null && par2ItemStack . stackSize > getInventoryStackLimit ( ) ) { par2ItemStack . stackSize = getInventoryStackLimit ( ) ; } } public String getInvName ( ) { return "<STR_LIT>" ; } public int getInventoryStackLimit ( ) { return <NUM_LIT> ; } public void onInventoryChanged ( ) { } public boolean interact ( EntityPlayer par1EntityPlayer ) { if ( minecartType == <NUM_LIT:0> ) { if ( riddenByEntity != null && ( riddenByEntity instanceof EntityPlayer ) && riddenByEntity != par1EntityPlayer ) { return true ; } if ( ! worldObj . isRemote ) { par1EntityPlayer . mountEntity ( this ) ; } } else if ( minecartType == <NUM_LIT:1> ) { if ( ! worldObj . isRemote ) { par1EntityPlayer . displayGUIChest ( this ) ; } } else if ( minecartType == <NUM_LIT:2> ) { ItemStack itemstack = par1EntityPlayer . inventory . getCurrentItem ( ) ; if ( itemstack != null && itemstack . itemID == Item . coal . shiftedIndex ) { if ( -- itemstack . stackSize == <NUM_LIT:0> ) { par1EntityPlayer . inventory . setInventorySlotContents ( par1EntityPlayer . inventory . currentItem , null ) ; } fuel += <NUM_LIT> ; } pushX = posX - par1EntityPlayer . posX ; pushZ = posZ - par1EntityPlayer . posZ ; } return true ; } public boolean isUseableByPlayer ( EntityPlayer par1EntityPlayer ) { if ( isDead ) { return false ; } return par1EntityPlayer . getDistanceSqToEntity ( this ) <= <NUM_LIT> ; } protected boolean isMinecartPowered ( ) { return ( dataWatcher . getWatchableObjectByte ( <NUM_LIT:16> ) & <NUM_LIT:1> ) != <NUM_LIT:0> ; } protected void setMinecartPowered ( boolean par1 ) { if ( par1 ) { dataWatcher . updateObject ( <NUM_LIT:16> , Byte . valueOf ( ( byte ) ( dataWatcher . getWatchableObjectByte ( <NUM_LIT:16> ) | <NUM_LIT:1> ) ) ) ; } else { dataWatcher . updateObject ( <NUM_LIT:16> , Byte . valueOf ( ( byte ) ( dataWatcher . getWatchableObjectByte ( <NUM_LIT:16> ) & - <NUM_LIT:2> ) ) ) ; } } public void openChest ( ) { } public void closeChest ( ) { } public void func_41018_e_ ( int par1 ) { dataWatcher . updateObject ( <NUM_LIT> , Integer . valueOf ( par1 ) ) ; } public int func_41020_o ( ) { return dataWatcher . getWatchableObjectInt ( <NUM_LIT> ) ; } public void func_41014_b ( int par1 ) { dataWatcher . updateObject ( <NUM_LIT> , Integer . valueOf ( par1 ) ) ; } public int func_41019_p ( ) { return dataWatcher . getWatchableObjectInt ( <NUM_LIT> ) ; } public void func_41016_d ( int par1 ) { dataWatcher . updateObject ( <NUM_LIT> , Integer . valueOf ( par1 ) ) ; } public int func_41021_q ( ) { return dataWatcher . getWatchableObjectInt ( <NUM_LIT> ) ; } } </s>
<s> package net . minecraft . src ; public enum EnumArmorMaterial { CLOTH ( <NUM_LIT:5> , new int [ ] { <NUM_LIT:1> , <NUM_LIT:3> , <NUM_LIT:2> , <NUM_LIT:1> } , <NUM_LIT:15> ) , CHAIN ( <NUM_LIT:15> , new int [ ] { <NUM_LIT:2> , <NUM_LIT:5> , <NUM_LIT:4> , <NUM_LIT:1> } , <NUM_LIT:12> ) , IRON ( <NUM_LIT:15> , new int [ ] { <NUM_LIT:2> , <NUM_LIT:6> , <NUM_LIT:5> , <NUM_LIT:2> } , <NUM_LIT:9> ) , GOLD ( <NUM_LIT:7> , new int [ ] { <NUM_LIT:2> , <NUM_LIT:5> , <NUM_LIT:3> , <NUM_LIT:1> } , <NUM_LIT> ) , DIAMOND ( <NUM_LIT> , new int [ ] { <NUM_LIT:3> , <NUM_LIT:8> , <NUM_LIT:6> , <NUM_LIT:3> } , <NUM_LIT:10> ) ; private int maxDamageFactor ; private int damageReductionAmountArray [ ] ; private int enchantability ; private EnumArmorMaterial ( int par3 , int par4ArrayOfInteger [ ] , int par5 ) { maxDamageFactor = par3 ; damageReductionAmountArray = par4ArrayOfInteger ; enchantability = par5 ; } public int getDurability ( int par1 ) { return ItemArmor . getMaxDamageArray ( ) [ par1 ] * maxDamageFactor ; } public int getDamageReductionAmount ( int par1 ) { return damageReductionAmountArray [ par1 ] ; } public int getEnchantability ( ) { return enchantability ; } } </s>
<s> package net . minecraft . src ; public class PotionHealth extends Potion { public PotionHealth ( int par1 , boolean par2 , int par3 ) { super ( par1 , par2 , par3 ) ; } public boolean isInstant ( ) { return true ; } public boolean isReady ( int par1 , int par2 ) { return par1 >= <NUM_LIT:1> ; } } </s>
<s> package net . minecraft . src ; public class ItemCoal extends Item { public ItemCoal ( int par1 ) { super ( par1 ) ; setHasSubtypes ( true ) ; setMaxDamage ( <NUM_LIT:0> ) ; } public String getItemNameIS ( ItemStack par1ItemStack ) { if ( par1ItemStack . getItemDamage ( ) == <NUM_LIT:1> ) { return "<STR_LIT>" ; } else { return "<STR_LIT>" ; } } } </s>
<s> package net . minecraft . src ; import java . util . Random ; public class ItemFishingRod extends Item { public ItemFishingRod ( int par1 ) { super ( par1 ) ; setMaxDamage ( <NUM_LIT> ) ; setMaxStackSize ( <NUM_LIT:1> ) ; } public ItemStack onItemRightClick ( ItemStack par1ItemStack , World par2World , EntityPlayer par3EntityPlayer ) { if ( par3EntityPlayer . fishEntity != null ) { int i = par3EntityPlayer . fishEntity . catchFish ( ) ; par1ItemStack . damageItem ( i , par3EntityPlayer ) ; par3EntityPlayer . swingItem ( ) ; } else { par2World . playSoundAtEntity ( par3EntityPlayer , "<STR_LIT>" , <NUM_LIT> , <NUM_LIT> / ( itemRand . nextFloat ( ) * <NUM_LIT> + <NUM_LIT> ) ) ; if ( ! par2World . isRemote ) { par2World . spawnEntityInWorld ( new EntityFishHook ( par2World , par3EntityPlayer ) ) ; } par3EntityPlayer . swingItem ( ) ; } return par1ItemStack ; } } </s>
<s> package net . minecraft . src ; import java . util . Random ; public class EntitySquid extends EntityWaterMob { public float field_21063_a ; public float field_21062_b ; public float field_21061_c ; public float field_21059_f ; public float field_21060_ak ; public float field_21058_al ; public float tentacleAngle ; public float lastTentacleAngle ; private float randomMotionSpeed ; private float field_21054_ap ; private float field_21053_aq ; private float randomMotionVecX ; private float randomMotionVecY ; private float randomMotionVecZ ; public EntitySquid ( World par1World ) { super ( par1World ) ; field_21063_a = <NUM_LIT> ; field_21062_b = <NUM_LIT> ; field_21061_c = <NUM_LIT> ; field_21059_f = <NUM_LIT> ; field_21060_ak = <NUM_LIT> ; field_21058_al = <NUM_LIT> ; tentacleAngle = <NUM_LIT> ; lastTentacleAngle = <NUM_LIT> ; randomMotionSpeed = <NUM_LIT> ; field_21054_ap = <NUM_LIT> ; field_21053_aq = <NUM_LIT> ; randomMotionVecX = <NUM_LIT> ; randomMotionVecY = <NUM_LIT> ; randomMotionVecZ = <NUM_LIT> ; texture = "<STR_LIT>" ; setSize ( <NUM_LIT> , <NUM_LIT> ) ; field_21054_ap = ( <NUM_LIT> / ( rand . nextFloat ( ) + <NUM_LIT> ) ) * <NUM_LIT> ; } public int getMaxHealth ( ) { return <NUM_LIT:10> ; } public void writeEntityToNBT ( NBTTagCompound par1NBTTagCompound ) { super . writeEntityToNBT ( par1NBTTagCompound ) ; } public void readEntityFromNBT ( NBTTagCompound par1NBTTagCompound ) { super . readEntityFromNBT ( par1NBTTagCompound ) ; } protected String getLivingSound ( ) { return null ; } protected String getHurtSound ( ) { return null ; } protected String getDeathSound ( ) { return null ; } protected float getSoundVolume ( ) { return <NUM_LIT> ; } protected int getDropItemId ( ) { return <NUM_LIT:0> ; } protected void dropFewItems ( boolean par1 , int par2 ) { int i = rand . nextInt ( <NUM_LIT:3> + par2 ) + <NUM_LIT:1> ; for ( int j = <NUM_LIT:0> ; j < i ; j ++ ) { entityDropItem ( new ItemStack ( Item . dyePowder , <NUM_LIT:1> , <NUM_LIT:0> ) , <NUM_LIT> ) ; } } public boolean interact ( EntityPlayer par1EntityPlayer ) { return super . interact ( par1EntityPlayer ) ; } public boolean isInWater ( ) { return worldObj . handleMaterialAcceleration ( boundingBox . expand ( <NUM_LIT> , - <NUM_LIT> , <NUM_LIT> ) , Material . water , this ) ; } public void onLivingUpdate ( ) { super . onLivingUpdate ( ) ; field_21062_b = field_21063_a ; field_21059_f = field_21061_c ; field_21058_al = field_21060_ak ; lastTentacleAngle = tentacleAngle ; field_21060_ak += field_21054_ap ; if ( field_21060_ak > ( ( float ) Math . PI * <NUM_LIT> ) ) { field_21060_ak -= ( ( float ) Math . PI * <NUM_LIT> ) ; if ( rand . nextInt ( <NUM_LIT:10> ) == <NUM_LIT:0> ) { field_21054_ap = ( <NUM_LIT> / ( rand . nextFloat ( ) + <NUM_LIT> ) ) * <NUM_LIT> ; } } if ( isInWater ( ) ) { if ( field_21060_ak < ( float ) Math . PI ) { float f = field_21060_ak / ( float ) Math . PI ; tentacleAngle = MathHelper . sin ( f * f * ( float ) Math . PI ) * ( float ) Math . PI * <NUM_LIT> ; if ( ( double ) f > <NUM_LIT> ) { randomMotionSpeed = <NUM_LIT> ; field_21053_aq = <NUM_LIT> ; } else { field_21053_aq = field_21053_aq * <NUM_LIT> ; } } else { tentacleAngle = <NUM_LIT> ; randomMotionSpeed = randomMotionSpeed * <NUM_LIT> ; field_21053_aq = field_21053_aq * <NUM_LIT> ; } if ( ! worldObj . isRemote ) { motionX = randomMotionVecX * randomMotionSpeed ; motionY = randomMotionVecY * randomMotionSpeed ; motionZ = randomMotionVecZ * randomMotionSpeed ; } float f1 = MathHelper . sqrt_double ( motionX * motionX + motionZ * motionZ ) ; renderYawOffset += ( ( - ( float ) Math . atan2 ( motionX , motionZ ) * <NUM_LIT> ) / ( float ) Math . PI - renderYawOffset ) * <NUM_LIT> ; rotationYaw = renderYawOffset ; field_21061_c = field_21061_c + ( float ) Math . PI * field_21053_aq * <NUM_LIT> ; field_21063_a += ( ( - ( float ) Math . atan2 ( f1 , motionY ) * <NUM_LIT> ) / ( float ) Math . PI - field_21063_a ) * <NUM_LIT> ; } else { tentacleAngle = MathHelper . abs ( MathHelper . sin ( field_21060_ak ) ) * ( float ) Math . PI * <NUM_LIT> ; if ( ! worldObj . isRemote ) { motionX = <NUM_LIT> ; motionY -= <NUM_LIT> ; motionY *= <NUM_LIT> ; motionZ = <NUM_LIT> ; } field_21063_a += ( double ) ( - <NUM_LIT> - field_21063_a ) * <NUM_LIT> ; } } public void moveEntityWithHeading ( float par1 , float par2 ) { moveEntity ( motionX , motionY , motionZ ) ; } protected void updateEntityActionState ( ) { entityAge ++ ; if ( entityAge > <NUM_LIT:100> ) { randomMotionVecX = randomMotionVecY = randomMotionVecZ = <NUM_LIT> ; } else if ( rand . nextInt ( <NUM_LIT> ) == <NUM_LIT:0> || ! inWater || randomMotionVecX == <NUM_LIT> && randomMotionVecY == <NUM_LIT> && randomMotionVecZ == <NUM_LIT> ) { float f = rand . nextFloat ( ) * ( float ) Math . PI * <NUM_LIT> ; randomMotionVecX = MathHelper . cos ( f ) * <NUM_LIT> ; randomMotionVecY = - <NUM_LIT> + rand . nextFloat ( ) * <NUM_LIT> ; randomMotionVecZ = MathHelper . sin ( f ) * <NUM_LIT> ; } despawnEntity ( ) ; } public boolean getCanSpawnHere ( ) { return posY > <NUM_LIT> && posY < <NUM_LIT> && super . getCanSpawnHere ( ) ; } } </s>
<s> package net . minecraft . src ; public class EntityAIFollowOwner extends EntityAIBase { private EntityTameable thePet ; private EntityLiving theOwner ; World theWorld ; private float field_48245_f ; private PathNavigate petPathfinder ; private int field_48252_h ; float maxDist ; float minDist ; private boolean field_48253_i ; public EntityAIFollowOwner ( EntityTameable par1EntityTameable , float par2 , float par3 , float par4 ) { thePet = par1EntityTameable ; theWorld = par1EntityTameable . worldObj ; field_48245_f = par2 ; petPathfinder = par1EntityTameable . getNavigator ( ) ; minDist = par3 ; maxDist = par4 ; setMutexBits ( <NUM_LIT:3> ) ; } public boolean shouldExecute ( ) { EntityLiving entityliving = thePet . getOwner ( ) ; if ( entityliving == null ) { return false ; } if ( thePet . isSitting ( ) ) { return false ; } if ( thePet . getDistanceSqToEntity ( entityliving ) < ( double ) ( minDist * minDist ) ) { return false ; } else { theOwner = entityliving ; return true ; } } public boolean continueExecuting ( ) { return ! petPathfinder . noPath ( ) && thePet . getDistanceSqToEntity ( theOwner ) > ( double ) ( maxDist * maxDist ) && ! thePet . isSitting ( ) ; } public void startExecuting ( ) { field_48252_h = <NUM_LIT:0> ; field_48253_i = thePet . getNavigator ( ) . func_48649_a ( ) ; thePet . getNavigator ( ) . func_48656_a ( false ) ; } public void resetTask ( ) { theOwner = null ; petPathfinder . clearPathEntity ( ) ; thePet . getNavigator ( ) . func_48656_a ( field_48253_i ) ; } public void updateTask ( ) { thePet . getLookHelper ( ) . setLookPositionWithEntity ( theOwner , <NUM_LIT> , thePet . getVerticalFaceSpeed ( ) ) ; if ( thePet . isSitting ( ) ) { return ; } if ( -- field_48252_h > <NUM_LIT:0> ) { return ; } field_48252_h = <NUM_LIT:10> ; if ( petPathfinder . func_48652_a ( theOwner , field_48245_f ) ) { return ; } if ( thePet . getDistanceSqToEntity ( theOwner ) < <NUM_LIT> ) { return ; } int i = MathHelper . floor_double ( theOwner . posX ) - <NUM_LIT:2> ; int j = MathHelper . floor_double ( theOwner . posZ ) - <NUM_LIT:2> ; int k = MathHelper . floor_double ( theOwner . boundingBox . minY ) ; for ( int l = <NUM_LIT:0> ; l <= <NUM_LIT:4> ; l ++ ) { for ( int i1 = <NUM_LIT:0> ; i1 <= <NUM_LIT:4> ; i1 ++ ) { if ( ( l < <NUM_LIT:1> || i1 < <NUM_LIT:1> || l > <NUM_LIT:3> || i1 > <NUM_LIT:3> ) && theWorld . isBlockNormalCube ( i + l , k - <NUM_LIT:1> , j + i1 ) && ! theWorld . isBlockNormalCube ( i + l , k , j + i1 ) && ! theWorld . isBlockNormalCube ( i + l , k + <NUM_LIT:1> , j + i1 ) ) { thePet . setLocationAndAngles ( ( float ) ( i + l ) + <NUM_LIT> , k , ( float ) ( j + i1 ) + <NUM_LIT> , thePet . rotationYaw , thePet . rotationPitch ) ; petPathfinder . clearPathEntity ( ) ; return ; } } } } } </s>
<s> package net . minecraft . src ; import java . util . List ; import java . util . Random ; public class EntityArrow extends Entity { private int xTile ; private int yTile ; private int zTile ; private int inTile ; private int inData ; private boolean inGround ; public boolean doesArrowBelongToPlayer ; public int arrowShake ; public Entity shootingEntity ; private int ticksInGround ; private int ticksInAir ; private double damage ; private int field_46010_n ; public boolean arrowCritical ; public EntityArrow ( World par1World ) { super ( par1World ) ; xTile = - <NUM_LIT:1> ; yTile = - <NUM_LIT:1> ; zTile = - <NUM_LIT:1> ; inTile = <NUM_LIT:0> ; inData = <NUM_LIT:0> ; inGround = false ; doesArrowBelongToPlayer = false ; arrowShake = <NUM_LIT:0> ; ticksInAir = <NUM_LIT:0> ; damage = <NUM_LIT> ; arrowCritical = false ; setSize ( <NUM_LIT> , <NUM_LIT> ) ; } public EntityArrow ( World par1World , double par2 , double par4 , double par6 ) { super ( par1World ) ; xTile = - <NUM_LIT:1> ; yTile = - <NUM_LIT:1> ; zTile = - <NUM_LIT:1> ; inTile = <NUM_LIT:0> ; inData = <NUM_LIT:0> ; inGround = false ; doesArrowBelongToPlayer = false ; arrowShake = <NUM_LIT:0> ; ticksInAir = <NUM_LIT:0> ; damage = <NUM_LIT> ; arrowCritical = false ; setSize ( <NUM_LIT> , <NUM_LIT> ) ; setPosition ( par2 , par4 , par6 ) ; yOffset = <NUM_LIT> ; } public EntityArrow ( World par1World , EntityLiving par2EntityLiving , EntityLiving par3EntityLiving , float par4 , float par5 ) { super ( par1World ) ; xTile = - <NUM_LIT:1> ; yTile = - <NUM_LIT:1> ; zTile = - <NUM_LIT:1> ; inTile = <NUM_LIT:0> ; inData = <NUM_LIT:0> ; inGround = false ; doesArrowBelongToPlayer = false ; arrowShake = <NUM_LIT:0> ; ticksInAir = <NUM_LIT:0> ; damage = <NUM_LIT> ; arrowCritical = false ; shootingEntity = par2EntityLiving ; doesArrowBelongToPlayer = par2EntityLiving instanceof EntityPlayer ; posY = ( par2EntityLiving . posY + ( double ) par2EntityLiving . getEyeHeight ( ) ) - <NUM_LIT> ; double d = par3EntityLiving . posX - par2EntityLiving . posX ; double d1 = ( par3EntityLiving . posY + ( double ) par3EntityLiving . getEyeHeight ( ) ) - <NUM_LIT> - posY ; double d2 = par3EntityLiving . posZ - par2EntityLiving . posZ ; double d3 = MathHelper . sqrt_double ( d * d + d2 * d2 ) ; if ( d3 < <NUM_LIT> ) { return ; } else { float f = ( float ) ( ( Math . atan2 ( d2 , d ) * <NUM_LIT> ) / Math . PI ) - <NUM_LIT> ; float f1 = ( float ) ( - ( ( Math . atan2 ( d1 , d3 ) * <NUM_LIT> ) / Math . PI ) ) ; double d4 = d / d3 ; double d5 = d2 / d3 ; setLocationAndAngles ( par2EntityLiving . posX + d4 , posY , par2EntityLiving . posZ + d5 , f , f1 ) ; yOffset = <NUM_LIT> ; float f2 = ( float ) d3 * <NUM_LIT> ; setArrowHeading ( d , d1 + ( double ) f2 , d2 , par4 , par5 ) ; return ; } } public EntityArrow ( World par1World , EntityLiving par2EntityLiving , float par3 ) { super ( par1World ) ; xTile = - <NUM_LIT:1> ; yTile = - <NUM_LIT:1> ; zTile = - <NUM_LIT:1> ; inTile = <NUM_LIT:0> ; inData = <NUM_LIT:0> ; inGround = false ; doesArrowBelongToPlayer = false ; arrowShake = <NUM_LIT:0> ; ticksInAir = <NUM_LIT:0> ; damage = <NUM_LIT> ; arrowCritical = false ; shootingEntity = par2EntityLiving ; doesArrowBelongToPlayer = par2EntityLiving instanceof EntityPlayer ; setSize ( <NUM_LIT> , <NUM_LIT> ) ; setLocationAndAngles ( par2EntityLiving . posX , par2EntityLiving . posY + ( double ) par2EntityLiving . getEyeHeight ( ) , par2EntityLiving . posZ , par2EntityLiving . rotationYaw , par2EntityLiving . rotationPitch ) ; posX -= MathHelper . cos ( ( rotationYaw / <NUM_LIT> ) * ( float ) Math . PI ) * <NUM_LIT> ; posY -= <NUM_LIT> ; posZ -= MathHelper . sin ( ( rotationYaw / <NUM_LIT> ) * ( float ) Math . PI ) * <NUM_LIT> ; setPosition ( posX , posY , posZ ) ; yOffset = <NUM_LIT> ; motionX = - MathHelper . sin ( ( rotationYaw / <NUM_LIT> ) * ( float ) Math . PI ) * MathHelper . cos ( ( rotationPitch / <NUM_LIT> ) * ( float ) Math . PI ) ; motionZ = MathHelper . cos ( ( rotationYaw / <NUM_LIT> ) * ( float ) Math . PI ) * MathHelper . cos ( ( rotationPitch / <NUM_LIT> ) * ( float ) Math . PI ) ; motionY = - MathHelper . sin ( ( rotationPitch / <NUM_LIT> ) * ( float ) Math . PI ) ; setArrowHeading ( motionX , motionY , motionZ , par3 * <NUM_LIT> , <NUM_LIT> ) ; } protected void entityInit ( ) { } public void setArrowHeading ( double par1 , double par3 , double par5 , float par7 , float par8 ) { float f = MathHelper . sqrt_double ( par1 * par1 + par3 * par3 + par5 * par5 ) ; par1 /= f ; par3 /= f ; par5 /= f ; par1 += rand . nextGaussian ( ) * <NUM_LIT> * ( double ) par8 ; par3 += rand . nextGaussian ( ) * <NUM_LIT> * ( double ) par8 ; par5 += rand . nextGaussian ( ) * <NUM_LIT> * ( double ) par8 ; par1 *= par7 ; par3 *= par7 ; par5 *= par7 ; motionX = par1 ; motionY = par3 ; motionZ = par5 ; float f1 = MathHelper . sqrt_double ( par1 * par1 + par5 * par5 ) ; prevRotationYaw = rotationYaw = ( float ) ( ( Math . atan2 ( par1 , par5 ) * <NUM_LIT> ) / Math . PI ) ; prevRotationPitch = rotationPitch = ( float ) ( ( Math . atan2 ( par3 , f1 ) * <NUM_LIT> ) / Math . PI ) ; ticksInGround = <NUM_LIT:0> ; } public void onUpdate ( ) { super . onUpdate ( ) ; if ( prevRotationPitch == <NUM_LIT> && prevRotationYaw == <NUM_LIT> ) { float f = MathHelper . sqrt_double ( motionX * motionX + motionZ * motionZ ) ; prevRotationYaw = rotationYaw = ( float ) ( ( Math . atan2 ( motionX , motionZ ) * <NUM_LIT> ) / Math . PI ) ; prevRotationPitch = rotationPitch = ( float ) ( ( Math . atan2 ( motionY , f ) * <NUM_LIT> ) / Math . PI ) ; } int i = worldObj . getBlockId ( xTile , yTile , zTile ) ; if ( i > <NUM_LIT:0> ) { Block . blocksList [ i ] . setBlockBoundsBasedOnState ( worldObj , xTile , yTile , zTile ) ; AxisAlignedBB axisalignedbb = Block . blocksList [ i ] . getCollisionBoundingBoxFromPool ( worldObj , xTile , yTile , zTile ) ; if ( axisalignedbb != null && axisalignedbb . isVecInside ( Vec3D . createVector ( posX , posY , posZ ) ) ) { inGround = true ; } } if ( arrowShake > <NUM_LIT:0> ) { arrowShake -- ; } if ( inGround ) { int j = worldObj . getBlockId ( xTile , yTile , zTile ) ; int k = worldObj . getBlockMetadata ( xTile , yTile , zTile ) ; if ( j != inTile || k != inData ) { inGround = false ; motionX *= rand . nextFloat ( ) * <NUM_LIT> ; motionY *= rand . nextFloat ( ) * <NUM_LIT> ; motionZ *= rand . nextFloat ( ) * <NUM_LIT> ; ticksInGround = <NUM_LIT:0> ; ticksInAir = <NUM_LIT:0> ; return ; } ticksInGround ++ ; if ( ticksInGround == <NUM_LIT> ) { setDead ( ) ; } return ; } ticksInAir ++ ; Vec3D vec3d = Vec3D . createVector ( posX , posY , posZ ) ; Vec3D vec3d1 = Vec3D . createVector ( posX + motionX , posY + motionY , posZ + motionZ ) ; MovingObjectPosition movingobjectposition = worldObj . rayTraceBlocks_do_do ( vec3d , vec3d1 , false , true ) ; vec3d = Vec3D . createVector ( posX , posY , posZ ) ; vec3d1 = Vec3D . createVector ( posX + motionX , posY + motionY , posZ + motionZ ) ; if ( movingobjectposition != null ) { vec3d1 = Vec3D . createVector ( movingobjectposition . hitVec . xCoord , movingobjectposition . hitVec . yCoord , movingobjectposition . hitVec . zCoord ) ; } Entity entity = null ; List list = worldObj . getEntitiesWithinAABBExcludingEntity ( this , boundingBox . addCoord ( motionX , motionY , motionZ ) . expand ( <NUM_LIT> , <NUM_LIT> , <NUM_LIT> ) ) ; double d = <NUM_LIT> ; for ( int l = <NUM_LIT:0> ; l < list . size ( ) ; l ++ ) { Entity entity1 = ( Entity ) list . get ( l ) ; if ( ! entity1 . canBeCollidedWith ( ) || entity1 == shootingEntity && ticksInAir < <NUM_LIT:5> ) { continue ; } float f5 = <NUM_LIT> ; AxisAlignedBB axisalignedbb1 = entity1 . boundingBox . expand ( f5 , f5 , f5 ) ; MovingObjectPosition movingobjectposition1 = axisalignedbb1 . calculateIntercept ( vec3d , vec3d1 ) ; if ( movingobjectposition1 == null ) { continue ; } double d1 = vec3d . distanceTo ( movingobjectposition1 . hitVec ) ; if ( d1 < d || d == <NUM_LIT> ) { entity = entity1 ; d = d1 ; } } if ( entity != null ) { movingobjectposition = new MovingObjectPosition ( entity ) ; } if ( movingobjectposition != null ) { if ( movingobjectposition . entityHit != null ) { float f1 = MathHelper . sqrt_double ( motionX * motionX + motionY * motionY + motionZ * motionZ ) ; int j1 = ( int ) Math . ceil ( ( double ) f1 * damage ) ; if ( arrowCritical ) { j1 += rand . nextInt ( j1 / <NUM_LIT:2> + <NUM_LIT:2> ) ; } DamageSource damagesource = null ; if ( shootingEntity == null ) { damagesource = DamageSource . causeArrowDamage ( this , this ) ; } else { damagesource = DamageSource . causeArrowDamage ( this , shootingEntity ) ; } if ( isBurning ( ) ) { movingobjectposition . entityHit . setFire ( <NUM_LIT:5> ) ; } if ( movingobjectposition . entityHit . attackEntityFrom ( damagesource , j1 ) ) { if ( movingobjectposition . entityHit instanceof EntityLiving ) { ( ( EntityLiving ) movingobjectposition . entityHit ) . arrowHitTempCounter ++ ; if ( field_46010_n > <NUM_LIT:0> ) { float f7 = MathHelper . sqrt_double ( motionX * motionX + motionZ * motionZ ) ; if ( f7 > <NUM_LIT> ) { movingobjectposition . entityHit . addVelocity ( ( motionX * ( double ) field_46010_n * <NUM_LIT> ) / ( double ) f7 , <NUM_LIT> , ( motionZ * ( double ) field_46010_n * <NUM_LIT> ) / ( double ) f7 ) ; } } } worldObj . playSoundAtEntity ( this , "<STR_LIT>" , <NUM_LIT> , <NUM_LIT> / ( rand . nextFloat ( ) * <NUM_LIT> + <NUM_LIT> ) ) ; setDead ( ) ; } else { motionX *= - <NUM_LIT> ; motionY *= - <NUM_LIT> ; motionZ *= - <NUM_LIT> ; rotationYaw += <NUM_LIT> ; prevRotationYaw += <NUM_LIT> ; ticksInAir = <NUM_LIT:0> ; } } else { xTile = movingobjectposition . blockX ; yTile = movingobjectposition . blockY ; zTile = movingobjectposition . blockZ ; inTile = worldObj . getBlockId ( xTile , yTile , zTile ) ; inData = worldObj . getBlockMetadata ( xTile , yTile , zTile ) ; motionX = ( float ) ( movingobjectposition . hitVec . xCoord - posX ) ; motionY = ( float ) ( movingobjectposition . hitVec . yCoord - posY ) ; motionZ = ( float ) ( movingobjectposition . hitVec . zCoord - posZ ) ; float f2 = MathHelper . sqrt_double ( motionX * motionX + motionY * motionY + motionZ * motionZ ) ; posX -= ( motionX / ( double ) f2 ) * <NUM_LIT> ; posY -= ( motionY / ( double ) f2 ) * <NUM_LIT> ; posZ -= ( motionZ / ( double ) f2 ) * <NUM_LIT> ; worldObj . playSoundAtEntity ( this , "<STR_LIT>" , <NUM_LIT> , <NUM_LIT> / ( rand . nextFloat ( ) * <NUM_LIT> + <NUM_LIT> ) ) ; inGround = true ; arrowShake = <NUM_LIT:7> ; arrowCritical = false ; } } if ( arrowCritical ) { for ( int i1 = <NUM_LIT:0> ; i1 < <NUM_LIT:4> ; i1 ++ ) { worldObj . spawnParticle ( "<STR_LIT>" , posX + ( motionX * ( double ) i1 ) / <NUM_LIT> , posY + ( motionY * ( double ) i1 ) / <NUM_LIT> , posZ + ( motionZ * ( double ) i1 ) / <NUM_LIT> , - motionX , - motionY + <NUM_LIT> , - motionZ ) ; } } posX += motionX ; posY += motionY ; posZ += motionZ ; float f3 = MathHelper . sqrt_double ( motionX * motionX + motionZ * motionZ ) ; rotationYaw = ( float ) ( ( Math . atan2 ( motionX , motionZ ) * <NUM_LIT> ) / Math . PI ) ; for ( rotationPitch = ( float ) ( ( Math . atan2 ( motionY , f3 ) * <NUM_LIT> ) / Math . PI ) ; rotationPitch - prevRotationPitch < - <NUM_LIT> ; prevRotationPitch -= <NUM_LIT> ) { } for ( ; rotationPitch - prevRotationPitch >= <NUM_LIT> ; prevRotationPitch += <NUM_LIT> ) { } for ( ; rotationYaw - prevRotationYaw < - <NUM_LIT> ; prevRotationYaw -= <NUM_LIT> ) { } for ( ; rotationYaw - prevRotationYaw >= <NUM_LIT> ; prevRotationYaw += <NUM_LIT> ) { } rotationPitch = prevRotationPitch + ( rotationPitch - prevRotationPitch ) * <NUM_LIT> ; rotationYaw = prevRotationYaw + ( rotationYaw - prevRotationYaw ) * <NUM_LIT> ; float f4 = <NUM_LIT> ; float f6 = <NUM_LIT> ; if ( isInWater ( ) ) { for ( int k1 = <NUM_LIT:0> ; k1 < <NUM_LIT:4> ; k1 ++ ) { float f8 = <NUM_LIT> ; worldObj . spawnParticle ( "<STR_LIT>" , posX - motionX * ( double ) f8 , posY - motionY * ( double ) f8 , posZ - motionZ * ( double ) f8 , motionX , motionY , motionZ ) ; } f4 = <NUM_LIT> ; } motionX *= f4 ; motionY *= f4 ; motionZ *= f4 ; motionY -= f6 ; setPosition ( posX , posY , posZ ) ; } public void writeEntityToNBT ( NBTTagCompound par1NBTTagCompound ) { par1NBTTagCompound . setShort ( "<STR_LIT>" , ( short ) xTile ) ; par1NBTTagCompound . setShort ( "<STR_LIT>" , ( short ) yTile ) ; par1NBTTagCompound . setShort ( "<STR_LIT>" , ( short ) zTile ) ; par1NBTTagCompound . setByte ( "<STR_LIT>" , ( byte ) inTile ) ; par1NBTTagCompound . setByte ( "<STR_LIT>" , ( byte ) inData ) ; par1NBTTagCompound . setByte ( "<STR_LIT>" , ( byte ) arrowShake ) ; par1NBTTagCompound . setByte ( "<STR_LIT>" , ( byte ) ( inGround ? <NUM_LIT:1> : <NUM_LIT:0> ) ) ; par1NBTTagCompound . setBoolean ( "<STR_LIT>" , doesArrowBelongToPlayer ) ; par1NBTTagCompound . setDouble ( "<STR_LIT>" , damage ) ; } public void readEntityFromNBT ( NBTTagCompound par1NBTTagCompound ) { xTile = par1NBTTagCompound . getShort ( "<STR_LIT>" ) ; yTile = par1NBTTagCompound . getShort ( "<STR_LIT>" ) ; zTile = par1NBTTagCompound . getShort ( "<STR_LIT>" ) ; inTile = par1NBTTagCompound . getByte ( "<STR_LIT>" ) & <NUM_LIT> ; inData = par1NBTTagCompound . getByte ( "<STR_LIT>" ) & <NUM_LIT> ; arrowShake = par1NBTTagCompound . getByte ( "<STR_LIT>" ) & <NUM_LIT> ; inGround = par1NBTTagCompound . getByte ( "<STR_LIT>" ) == <NUM_LIT:1> ; doesArrowBelongToPlayer = par1NBTTagCompound . getBoolean ( "<STR_LIT>" ) ; if ( par1NBTTagCompound . hasKey ( "<STR_LIT>" ) ) { damage = par1NBTTagCompound . getDouble ( "<STR_LIT>" ) ; } } public void onCollideWithPlayer ( EntityPlayer par1EntityPlayer ) { if ( worldObj . isRemote ) { return ; } if ( inGround && doesArrowBelongToPlayer && arrowShake <= <NUM_LIT:0> && par1EntityPlayer . inventory . addItemStackToInventory ( new ItemStack ( Item . arrow , <NUM_LIT:1> ) ) ) { worldObj . playSoundAtEntity ( this , "<STR_LIT>" , <NUM_LIT> , ( ( rand . nextFloat ( ) - rand . nextFloat ( ) ) * <NUM_LIT> + <NUM_LIT> ) * <NUM_LIT> ) ; par1EntityPlayer . onItemPickup ( this , <NUM_LIT:1> ) ; setDead ( ) ; } } public void setDamage ( double par1 ) { damage = par1 ; } public double getDamage ( ) { return damage ; } public void func_46007_b ( int par1 ) { field_46010_n = par1 ; } public boolean canAttackWithItem ( ) { return false ; } } </s>
<s> package net . minecraft . src ; import java . util . * ; abstract class ComponentNetherBridgePiece extends StructureComponent { protected ComponentNetherBridgePiece ( int par1 ) { super ( par1 ) ; } private int getTotalWeight ( List par1List ) { boolean flag = false ; int i = <NUM_LIT:0> ; for ( Iterator iterator = par1List . iterator ( ) ; iterator . hasNext ( ) ; ) { StructureNetherBridgePieceWeight structurenetherbridgepieceweight = ( StructureNetherBridgePieceWeight ) iterator . next ( ) ; if ( structurenetherbridgepieceweight . field_40651_d > <NUM_LIT:0> && structurenetherbridgepieceweight . field_40654_c < structurenetherbridgepieceweight . field_40651_d ) { flag = true ; } i += structurenetherbridgepieceweight . field_40653_b ; } return flag ? i : - <NUM_LIT:1> ; } private ComponentNetherBridgePiece getNextComponent ( ComponentNetherBridgeStartPiece par1ComponentNetherBridgeStartPiece , List par2List , List par3List , Random par4Random , int par5 , int par6 , int par7 , int par8 , int par9 ) { int var10 = this . getTotalWeight ( par2List ) ; boolean var11 = var10 > <NUM_LIT:0> && par9 <= <NUM_LIT:30> ; int var12 = <NUM_LIT:0> ; while ( var12 < <NUM_LIT:5> && var11 ) { ++ var12 ; int var13 = par4Random . nextInt ( var10 ) ; Iterator var14 = par2List . iterator ( ) ; while ( var14 . hasNext ( ) ) { StructureNetherBridgePieceWeight var15 = ( StructureNetherBridgePieceWeight ) var14 . next ( ) ; var13 -= var15 . field_40653_b ; if ( var13 < <NUM_LIT:0> ) { if ( ! var15 . func_40649_a ( par9 ) || var15 == par1ComponentNetherBridgeStartPiece . field_40296_a && ! var15 . field_40652_e ) { break ; } ComponentNetherBridgePiece var16 = StructureNetherBridgePieces . createNextComponent ( var15 , par3List , par4Random , par5 , par6 , par7 , par8 , par9 ) ; if ( var16 != null ) { ++ var15 . field_40654_c ; par1ComponentNetherBridgeStartPiece . field_40296_a = var15 ; if ( ! var15 . func_40650_a ( ) ) { par2List . remove ( var15 ) ; } return var16 ; } } } } ComponentNetherBridgeEnd var17 = ComponentNetherBridgeEnd . func_40301_a ( par3List , par4Random , par5 , par6 , par7 , par8 , par9 ) ; return var17 ; } private StructureComponent getNextComponent ( ComponentNetherBridgeStartPiece par1ComponentNetherBridgeStartPiece , List par2List , Random par3Random , int par4 , int par5 , int par6 , int par7 , int par8 , boolean par9 ) { if ( Math . abs ( par4 - par1ComponentNetherBridgeStartPiece . getBoundingBox ( ) . minX ) > <NUM_LIT> || Math . abs ( par6 - par1ComponentNetherBridgeStartPiece . getBoundingBox ( ) . minZ ) > <NUM_LIT> ) { ComponentNetherBridgeEnd componentnetherbridgeend = ComponentNetherBridgeEnd . func_40301_a ( par2List , par3Random , par4 , par5 , par6 , par7 , par8 ) ; return componentnetherbridgeend ; } List list = par1ComponentNetherBridgeStartPiece . field_40294_b ; if ( par9 ) { list = par1ComponentNetherBridgeStartPiece . field_40295_c ; } ComponentNetherBridgePiece componentnetherbridgepiece = getNextComponent ( par1ComponentNetherBridgeStartPiece , list , par2List , par3Random , par4 , par5 , par6 , par7 , par8 + <NUM_LIT:1> ) ; if ( componentnetherbridgepiece != null ) { par2List . add ( componentnetherbridgepiece ) ; par1ComponentNetherBridgeStartPiece . field_40293_d . add ( componentnetherbridgepiece ) ; } return componentnetherbridgepiece ; } protected StructureComponent getNextComponentNormal ( ComponentNetherBridgeStartPiece par1ComponentNetherBridgeStartPiece , List par2List , Random par3Random , int par4 , int par5 , boolean par6 ) { switch ( coordBaseMode ) { case <NUM_LIT:2> : return getNextComponent ( par1ComponentNetherBridgeStartPiece , par2List , par3Random , boundingBox . minX + par4 , boundingBox . minY + par5 , boundingBox . minZ - <NUM_LIT:1> , coordBaseMode , getComponentType ( ) , par6 ) ; case <NUM_LIT:0> : return getNextComponent ( par1ComponentNetherBridgeStartPiece , par2List , par3Random , boundingBox . minX + par4 , boundingBox . minY + par5 , boundingBox . maxZ + <NUM_LIT:1> , coordBaseMode , getComponentType ( ) , par6 ) ; case <NUM_LIT:1> : return getNextComponent ( par1ComponentNetherBridgeStartPiece , par2List , par3Random , boundingBox . minX - <NUM_LIT:1> , boundingBox . minY + par5 , boundingBox . minZ + par4 , coordBaseMode , getComponentType ( ) , par6 ) ; case <NUM_LIT:3> : return getNextComponent ( par1ComponentNetherBridgeStartPiece , par2List , par3Random , boundingBox . maxX + <NUM_LIT:1> , boundingBox . minY + par5 , boundingBox . minZ + par4 , coordBaseMode , getComponentType ( ) , par6 ) ; } return null ; } protected StructureComponent getNextComponentX ( ComponentNetherBridgeStartPiece par1ComponentNetherBridgeStartPiece , List par2List , Random par3Random , int par4 , int par5 , boolean par6 ) { switch ( coordBaseMode ) { case <NUM_LIT:2> : return getNextComponent ( par1ComponentNetherBridgeStartPiece , par2List , par3Random , boundingBox . minX - <NUM_LIT:1> , boundingBox . minY + par4 , boundingBox . minZ + par5 , <NUM_LIT:1> , getComponentType ( ) , par6 ) ; case <NUM_LIT:0> : return getNextComponent ( par1ComponentNetherBridgeStartPiece , par2List , par3Random , boundingBox . minX - <NUM_LIT:1> , boundingBox . minY + par4 , boundingBox . minZ + par5 , <NUM_LIT:1> , getComponentType ( ) , par6 ) ; case <NUM_LIT:1> : return getNextComponent ( par1ComponentNetherBridgeStartPiece , par2List , par3Random , boundingBox . minX + par5 , boundingBox . minY + par4 , boundingBox . minZ - <NUM_LIT:1> , <NUM_LIT:2> , getComponentType ( ) , par6 ) ; case <NUM_LIT:3> : return getNextComponent ( par1ComponentNetherBridgeStartPiece , par2List , par3Random , boundingBox . minX + par5 , boundingBox . minY + par4 , boundingBox . minZ - <NUM_LIT:1> , <NUM_LIT:2> , getComponentType ( ) , par6 ) ; } return null ; } protected StructureComponent getNextComponentZ ( ComponentNetherBridgeStartPiece par1ComponentNetherBridgeStartPiece , List par2List , Random par3Random , int par4 , int par5 , boolean par6 ) { switch ( coordBaseMode ) { case <NUM_LIT:2> : return getNextComponent ( par1ComponentNetherBridgeStartPiece , par2List , par3Random , boundingBox . maxX + <NUM_LIT:1> , boundingBox . minY + par4 , boundingBox . minZ + par5 , <NUM_LIT:3> , getComponentType ( ) , par6 ) ; case <NUM_LIT:0> : return getNextComponent ( par1ComponentNetherBridgeStartPiece , par2List , par3Random , boundingBox . maxX + <NUM_LIT:1> , boundingBox . minY + par4 , boundingBox . minZ + par5 , <NUM_LIT:3> , getComponentType ( ) , par6 ) ; case <NUM_LIT:1> : return getNextComponent ( par1ComponentNetherBridgeStartPiece , par2List , par3Random , boundingBox . minX + par5 , boundingBox . minY + par4 , boundingBox . maxZ + <NUM_LIT:1> , <NUM_LIT:0> , getComponentType ( ) , par6 ) ; case <NUM_LIT:3> : return getNextComponent ( par1ComponentNetherBridgeStartPiece , par2List , par3Random , boundingBox . minX + par5 , boundingBox . minY + par4 , boundingBox . maxZ + <NUM_LIT:1> , <NUM_LIT:0> , getComponentType ( ) , par6 ) ; } return null ; } protected static boolean isAboveGround ( StructureBoundingBox par0StructureBoundingBox ) { return par0StructureBoundingBox != null && par0StructureBoundingBox . minY > <NUM_LIT:10> ; } } </s>
<s> package net . minecraft . src ; public interface IInvBasic { public abstract void onInventoryChanged ( InventoryBasic inventorybasic ) ; } </s>
<s> package net . minecraft . src ; import java . io . IOException ; import java . net . * ; import java . util . * ; public class RConThreadQuery extends RConThreadBase { private long lastAuthCheckTime ; private int queryPort ; private int serverPort ; private int maxPlayers ; private String serverMotd ; private String worldName ; private DatagramSocket querySocket ; private byte buffer [ ] ; private DatagramPacket incomingPacket ; private HashMap field_40452_p ; private String queryHostname ; private String serverHostname ; private HashMap queryClients ; private long field_40448_t ; private RConOutputStream output ; private long lastQueryResponseTime ; public RConThreadQuery ( IServer par1IServer ) { super ( par1IServer ) ; querySocket = null ; buffer = new byte [ <NUM_LIT> ] ; incomingPacket = null ; queryPort = par1IServer . getIntProperty ( "<STR_LIT>" , <NUM_LIT:0> ) ; serverHostname = par1IServer . getHostname ( ) ; serverPort = par1IServer . getPort ( ) ; serverMotd = par1IServer . getMotd ( ) ; maxPlayers = par1IServer . getMaxPlayers ( ) ; worldName = par1IServer . getWorldName ( ) ; lastQueryResponseTime = <NUM_LIT> ; queryHostname = "<STR_LIT>" ; if ( <NUM_LIT:0> == serverHostname . length ( ) || queryHostname . equals ( serverHostname ) ) { serverHostname = "<STR_LIT>" ; try { InetAddress inetaddress = InetAddress . getLocalHost ( ) ; queryHostname = inetaddress . getHostAddress ( ) ; } catch ( UnknownHostException unknownhostexception ) { logWarning ( ( new StringBuilder ( ) ) . append ( "<STR_LIT>" ) . append ( par1IServer . getSettingsFilename ( ) ) . append ( "<STR_LIT>" ) . append ( unknownhostexception . getMessage ( ) ) . toString ( ) ) ; } } else { queryHostname = serverHostname ; } if ( <NUM_LIT:0> == queryPort ) { queryPort = serverPort ; log ( ( new StringBuilder ( ) ) . append ( "<STR_LIT>" ) . append ( queryPort ) . toString ( ) ) ; par1IServer . setProperty ( "<STR_LIT>" , Integer . valueOf ( queryPort ) ) ; par1IServer . setProperty ( "<STR_LIT>" , Boolean . valueOf ( false ) ) ; par1IServer . saveProperties ( ) ; } field_40452_p = new HashMap ( ) ; output = new RConOutputStream ( <NUM_LIT> ) ; queryClients = new HashMap ( ) ; field_40448_t = ( new Date ( ) ) . getTime ( ) ; } private void sendResponsePacket ( byte par1ArrayOfByte [ ] , DatagramPacket par2DatagramPacket ) throws SocketException , IOException { querySocket . send ( new DatagramPacket ( par1ArrayOfByte , par1ArrayOfByte . length , par2DatagramPacket . getSocketAddress ( ) ) ) ; } private boolean parseIncomingPacket ( DatagramPacket par1DatagramPacket ) throws IOException { byte abyte0 [ ] = par1DatagramPacket . getData ( ) ; int i = par1DatagramPacket . getLength ( ) ; SocketAddress socketaddress = par1DatagramPacket . getSocketAddress ( ) ; logInfo ( ( new StringBuilder ( ) ) . append ( "<STR_LIT>" ) . append ( i ) . append ( "<STR_LIT>" ) . append ( socketaddress ) . append ( "<STR_LIT:]>" ) . toString ( ) ) ; if ( <NUM_LIT:3> > i || - <NUM_LIT:2> != abyte0 [ <NUM_LIT:0> ] || - <NUM_LIT:3> != abyte0 [ <NUM_LIT:1> ] ) { logInfo ( ( new StringBuilder ( ) ) . append ( "<STR_LIT>" ) . append ( socketaddress ) . append ( "<STR_LIT:]>" ) . toString ( ) ) ; return false ; } logInfo ( ( new StringBuilder ( ) ) . append ( "<STR_LIT>" ) . append ( RConUtils . getByteAsHexString ( abyte0 [ <NUM_LIT:2> ] ) ) . append ( "<STR_LIT>" ) . append ( socketaddress ) . append ( "<STR_LIT:]>" ) . toString ( ) ) ; switch ( abyte0 [ <NUM_LIT:2> ] ) { case <NUM_LIT:9> : sendAuthChallenge ( par1DatagramPacket ) ; logInfo ( ( new StringBuilder ( ) ) . append ( "<STR_LIT>" ) . append ( socketaddress ) . append ( "<STR_LIT:]>" ) . toString ( ) ) ; return true ; case <NUM_LIT:0> : if ( ! verifyClientAuth ( par1DatagramPacket ) . booleanValue ( ) ) { logInfo ( ( new StringBuilder ( ) ) . append ( "<STR_LIT>" ) . append ( socketaddress ) . append ( "<STR_LIT:]>" ) . toString ( ) ) ; return false ; } if ( <NUM_LIT:15> != i ) { RConOutputStream rconoutputstream = new RConOutputStream ( <NUM_LIT> ) ; rconoutputstream . writeInt ( <NUM_LIT:0> ) ; rconoutputstream . writeByteArray ( getRequestID ( par1DatagramPacket . getSocketAddress ( ) ) ) ; rconoutputstream . writeString ( serverMotd ) ; rconoutputstream . writeString ( "<STR_LIT>" ) ; rconoutputstream . writeString ( worldName ) ; rconoutputstream . writeString ( Integer . toString ( getNumberOfPlayers ( ) ) ) ; rconoutputstream . writeString ( Integer . toString ( maxPlayers ) ) ; rconoutputstream . writeShort ( ( short ) serverPort ) ; rconoutputstream . writeString ( queryHostname ) ; sendResponsePacket ( rconoutputstream . toByteArray ( ) , par1DatagramPacket ) ; logInfo ( ( new StringBuilder ( ) ) . append ( "<STR_LIT>" ) . append ( socketaddress ) . append ( "<STR_LIT:]>" ) . toString ( ) ) ; } else { sendResponsePacket ( createQueryResponse ( par1DatagramPacket ) , par1DatagramPacket ) ; logInfo ( ( new StringBuilder ( ) ) . append ( "<STR_LIT>" ) . append ( socketaddress ) . append ( "<STR_LIT:]>" ) . toString ( ) ) ; } break ; } return true ; } private byte [ ] createQueryResponse ( DatagramPacket par1DatagramPacket ) throws IOException { long l = System . currentTimeMillis ( ) ; if ( l < lastQueryResponseTime + <NUM_LIT> ) { byte abyte0 [ ] = output . toByteArray ( ) ; byte abyte1 [ ] = getRequestID ( par1DatagramPacket . getSocketAddress ( ) ) ; abyte0 [ <NUM_LIT:1> ] = abyte1 [ <NUM_LIT:0> ] ; abyte0 [ <NUM_LIT:2> ] = abyte1 [ <NUM_LIT:1> ] ; abyte0 [ <NUM_LIT:3> ] = abyte1 [ <NUM_LIT:2> ] ; abyte0 [ <NUM_LIT:4> ] = abyte1 [ <NUM_LIT:3> ] ; return abyte0 ; } lastQueryResponseTime = l ; output . reset ( ) ; output . writeInt ( <NUM_LIT:0> ) ; output . writeByteArray ( getRequestID ( par1DatagramPacket . getSocketAddress ( ) ) ) ; output . writeString ( "<STR_LIT>" ) ; output . writeInt ( <NUM_LIT> ) ; output . writeInt ( <NUM_LIT:0> ) ; output . writeString ( "<STR_LIT>" ) ; output . writeString ( serverMotd ) ; output . writeString ( "<STR_LIT>" ) ; output . writeString ( "<STR_LIT>" ) ; output . writeString ( "<STR_LIT>" ) ; output . writeString ( "<STR_LIT>" ) ; output . writeString ( "<STR_LIT:version>" ) ; output . writeString ( server . getVersionString ( ) ) ; output . writeString ( "<STR_LIT>" ) ; output . writeString ( server . getPlugin ( ) ) ; output . writeString ( "<STR_LIT>" ) ; output . writeString ( worldName ) ; output . writeString ( "<STR_LIT>" ) ; output . writeString ( ( new StringBuilder ( ) ) . append ( "<STR_LIT>" ) . append ( getNumberOfPlayers ( ) ) . toString ( ) ) ; output . writeString ( "<STR_LIT>" ) ; output . writeString ( ( new StringBuilder ( ) ) . append ( "<STR_LIT>" ) . append ( maxPlayers ) . toString ( ) ) ; output . writeString ( "<STR_LIT>" ) ; output . writeString ( ( new StringBuilder ( ) ) . append ( "<STR_LIT>" ) . append ( serverPort ) . toString ( ) ) ; output . writeString ( "<STR_LIT>" ) ; output . writeString ( queryHostname ) ; output . writeInt ( <NUM_LIT:0> ) ; output . writeInt ( <NUM_LIT:1> ) ; output . writeString ( "<STR_LIT>" ) ; output . writeInt ( <NUM_LIT:0> ) ; String as [ ] = server . getPlayerNamesAsList ( ) ; byte byte0 = ( byte ) as . length ; for ( byte byte1 = ( byte ) ( byte0 - <NUM_LIT:1> ) ; byte1 >= <NUM_LIT:0> ; byte1 -- ) { output . writeString ( as [ byte1 ] ) ; } output . writeInt ( <NUM_LIT:0> ) ; return output . toByteArray ( ) ; } private byte [ ] getRequestID ( SocketAddress par1SocketAddress ) { return ( ( RConThreadQueryAuth ) queryClients . get ( par1SocketAddress ) ) . getRequestID ( ) ; } private Boolean verifyClientAuth ( DatagramPacket par1DatagramPacket ) { SocketAddress socketaddress = par1DatagramPacket . getSocketAddress ( ) ; if ( ! queryClients . containsKey ( socketaddress ) ) { return Boolean . valueOf ( false ) ; } byte abyte0 [ ] = par1DatagramPacket . getData ( ) ; if ( ( ( RConThreadQueryAuth ) queryClients . get ( socketaddress ) ) . getRandomChallenge ( ) != RConUtils . getBytesAsBEint ( abyte0 , <NUM_LIT:7> , par1DatagramPacket . getLength ( ) ) ) { return Boolean . valueOf ( false ) ; } else { return Boolean . valueOf ( true ) ; } } private void sendAuthChallenge ( DatagramPacket par1DatagramPacket ) throws SocketException , IOException { RConThreadQueryAuth rconthreadqueryauth = new RConThreadQueryAuth ( this , par1DatagramPacket ) ; queryClients . put ( par1DatagramPacket . getSocketAddress ( ) , rconthreadqueryauth ) ; sendResponsePacket ( rconthreadqueryauth . getChallengeValue ( ) , par1DatagramPacket ) ; } private void cleanQueryClientsMap ( ) { if ( ! running ) { return ; } long l = System . currentTimeMillis ( ) ; if ( l < lastAuthCheckTime + <NUM_LIT> ) { return ; } lastAuthCheckTime = l ; Iterator iterator = queryClients . entrySet ( ) . iterator ( ) ; do { if ( ! iterator . hasNext ( ) ) { break ; } java . util . Map . Entry entry = ( java . util . Map . Entry ) iterator . next ( ) ; if ( ( ( RConThreadQueryAuth ) entry . getValue ( ) ) . hasExpired ( l ) . booleanValue ( ) ) { iterator . remove ( ) ; } } while ( true ) ; } public void run ( ) { log ( ( new StringBuilder ( ) ) . append ( "<STR_LIT>" ) . append ( serverHostname ) . append ( "<STR_LIT::>" ) . append ( queryPort ) . toString ( ) ) ; lastAuthCheckTime = System . currentTimeMillis ( ) ; incomingPacket = new DatagramPacket ( buffer , buffer . length ) ; try { while ( running ) { try { querySocket . receive ( incomingPacket ) ; cleanQueryClientsMap ( ) ; parseIncomingPacket ( incomingPacket ) ; } catch ( SocketTimeoutException sockettimeoutexception ) { cleanQueryClientsMap ( ) ; } catch ( PortUnreachableException portunreachableexception ) { } catch ( IOException ioexception ) { stopWithException ( ioexception ) ; } } } finally { closeAllSockets ( ) ; } } public void startThread ( ) { if ( running ) { return ; } if ( <NUM_LIT:0> >= queryPort || <NUM_LIT> < queryPort ) { logWarning ( ( new StringBuilder ( ) ) . append ( "<STR_LIT>" ) . append ( queryPort ) . append ( "<STR_LIT>" ) . append ( server . getSettingsFilename ( ) ) . append ( "<STR_LIT>" ) . toString ( ) ) ; return ; } if ( initQuerySystem ( ) ) { super . startThread ( ) ; } } private void stopWithException ( Exception par1Exception ) { if ( ! running ) { return ; } logWarning ( ( new StringBuilder ( ) ) . append ( "<STR_LIT>" ) . append ( par1Exception . toString ( ) ) . append ( "<STR_LIT:)>" ) . toString ( ) ) ; if ( ! initQuerySystem ( ) ) { logSevere ( "<STR_LIT>" ) ; running = false ; server . func_40010_o ( ) ; } } private boolean initQuerySystem ( ) { try { querySocket = new DatagramSocket ( queryPort , InetAddress . getByName ( serverHostname ) ) ; registerSocket ( querySocket ) ; querySocket . setSoTimeout ( <NUM_LIT> ) ; return true ; } catch ( SocketException socketexception ) { logWarning ( ( new StringBuilder ( ) ) . append ( "<STR_LIT>" ) . append ( serverHostname ) . append ( "<STR_LIT::>" ) . append ( queryPort ) . append ( "<STR_LIT>" ) . append ( socketexception . getMessage ( ) ) . toString ( ) ) ; } catch ( UnknownHostException unknownhostexception ) { logWarning ( ( new StringBuilder ( ) ) . append ( "<STR_LIT>" ) . append ( serverHostname ) . append ( "<STR_LIT::>" ) . append ( queryPort ) . append ( "<STR_LIT>" ) . append ( unknownhostexception . getMessage ( ) ) . toString ( ) ) ; } catch ( Exception exception ) { logWarning ( ( new StringBuilder ( ) ) . append ( "<STR_LIT>" ) . append ( serverHostname ) . append ( "<STR_LIT::>" ) . append ( queryPort ) . append ( "<STR_LIT>" ) . append ( exception . getMessage ( ) ) . toString ( ) ) ; } return false ; } } </s>
<s> package net . minecraft . src ; import java . util . Random ; public class BiomeDecorator { protected World currentWorld ; protected Random randomGenerator ; protected int chunk_X ; protected int chunk_Z ; protected BiomeGenBase biome ; protected WorldGenerator clayGen ; protected WorldGenerator sandGen ; protected WorldGenerator gravelAsSandGen ; protected WorldGenerator dirtGen ; protected WorldGenerator gravelGen ; protected WorldGenerator coalGen ; protected WorldGenerator ironGen ; protected WorldGenerator goldGen ; protected WorldGenerator redstoneGen ; protected WorldGenerator diamondGen ; protected WorldGenerator lapisGen ; protected WorldGenerator plantYellowGen ; protected WorldGenerator plantRedGen ; protected WorldGenerator mushroomBrownGen ; protected WorldGenerator mushroomRedGen ; protected WorldGenerator bigMushroomGen ; protected WorldGenerator reedGen ; protected WorldGenerator cactusGen ; protected WorldGenerator waterlilyGen ; protected int waterlilyPerChunk ; protected int treesPerChunk ; protected int flowersPerChunk ; protected int grassPerChunk ; protected int deadBushPerChunk ; protected int mushroomsPerChunk ; protected int reedsPerChunk ; protected int cactiPerChunk ; protected int sandPerChunk ; protected int sandPerChunk2 ; protected int clayPerChunk ; protected int bigMushroomsPerChunk ; public boolean generateLakes ; public BiomeDecorator ( BiomeGenBase par1BiomeGenBase ) { clayGen = new WorldGenClay ( <NUM_LIT:4> ) ; sandGen = new WorldGenSand ( <NUM_LIT:7> , Block . sand . blockID ) ; gravelAsSandGen = new WorldGenSand ( <NUM_LIT:6> , Block . gravel . blockID ) ; dirtGen = new WorldGenMinable ( Block . dirt . blockID , <NUM_LIT:32> ) ; gravelGen = new WorldGenMinable ( Block . gravel . blockID , <NUM_LIT:32> ) ; coalGen = new WorldGenMinable ( Block . oreCoal . blockID , <NUM_LIT:16> ) ; ironGen = new WorldGenMinable ( Block . oreIron . blockID , <NUM_LIT:8> ) ; goldGen = new WorldGenMinable ( Block . oreGold . blockID , <NUM_LIT:8> ) ; redstoneGen = new WorldGenMinable ( Block . oreRedstone . blockID , <NUM_LIT:7> ) ; diamondGen = new WorldGenMinable ( Block . oreDiamond . blockID , <NUM_LIT:7> ) ; lapisGen = new WorldGenMinable ( Block . oreLapis . blockID , <NUM_LIT:6> ) ; plantYellowGen = new WorldGenFlowers ( Block . plantYellow . blockID ) ; plantRedGen = new WorldGenFlowers ( Block . plantRed . blockID ) ; mushroomBrownGen = new WorldGenFlowers ( Block . mushroomBrown . blockID ) ; mushroomRedGen = new WorldGenFlowers ( Block . mushroomRed . blockID ) ; bigMushroomGen = new WorldGenBigMushroom ( ) ; reedGen = new WorldGenReed ( ) ; cactusGen = new WorldGenCactus ( ) ; waterlilyGen = new WorldGenWaterlily ( ) ; waterlilyPerChunk = <NUM_LIT:0> ; treesPerChunk = <NUM_LIT:0> ; flowersPerChunk = <NUM_LIT:2> ; grassPerChunk = <NUM_LIT:1> ; deadBushPerChunk = <NUM_LIT:0> ; mushroomsPerChunk = <NUM_LIT:0> ; reedsPerChunk = <NUM_LIT:0> ; cactiPerChunk = <NUM_LIT:0> ; sandPerChunk = <NUM_LIT:1> ; sandPerChunk2 = <NUM_LIT:3> ; clayPerChunk = <NUM_LIT:1> ; bigMushroomsPerChunk = <NUM_LIT:0> ; generateLakes = true ; biome = par1BiomeGenBase ; } public void decorate ( World par1World , Random par2Random , int par3 , int par4 ) { if ( currentWorld != null ) { throw new RuntimeException ( "<STR_LIT>" ) ; } else { currentWorld = par1World ; randomGenerator = par2Random ; chunk_X = par3 ; chunk_Z = par4 ; decorate ( ) ; currentWorld = null ; randomGenerator = null ; return ; } } protected void decorate ( ) { generateOres ( ) ; for ( int i = <NUM_LIT:0> ; i < sandPerChunk2 ; i ++ ) { int i1 = chunk_X + randomGenerator . nextInt ( <NUM_LIT:16> ) + <NUM_LIT:8> ; int k5 = chunk_Z + randomGenerator . nextInt ( <NUM_LIT:16> ) + <NUM_LIT:8> ; sandGen . generate ( currentWorld , randomGenerator , i1 , currentWorld . getTopSolidOrLiquidBlock ( i1 , k5 ) , k5 ) ; } for ( int j = <NUM_LIT:0> ; j < clayPerChunk ; j ++ ) { int j1 = chunk_X + randomGenerator . nextInt ( <NUM_LIT:16> ) + <NUM_LIT:8> ; int l5 = chunk_Z + randomGenerator . nextInt ( <NUM_LIT:16> ) + <NUM_LIT:8> ; clayGen . generate ( currentWorld , randomGenerator , j1 , currentWorld . getTopSolidOrLiquidBlock ( j1 , l5 ) , l5 ) ; } for ( int k = <NUM_LIT:0> ; k < sandPerChunk ; k ++ ) { int k1 = chunk_X + randomGenerator . nextInt ( <NUM_LIT:16> ) + <NUM_LIT:8> ; int i6 = chunk_Z + randomGenerator . nextInt ( <NUM_LIT:16> ) + <NUM_LIT:8> ; sandGen . generate ( currentWorld , randomGenerator , k1 , currentWorld . getTopSolidOrLiquidBlock ( k1 , i6 ) , i6 ) ; } int l = treesPerChunk ; if ( randomGenerator . nextInt ( <NUM_LIT:10> ) == <NUM_LIT:0> ) { l ++ ; } for ( int l1 = <NUM_LIT:0> ; l1 < l ; l1 ++ ) { int j6 = chunk_X + randomGenerator . nextInt ( <NUM_LIT:16> ) + <NUM_LIT:8> ; int k10 = chunk_Z + randomGenerator . nextInt ( <NUM_LIT:16> ) + <NUM_LIT:8> ; WorldGenerator worldgenerator = biome . getRandomWorldGenForTrees ( randomGenerator ) ; worldgenerator . setScale ( <NUM_LIT> , <NUM_LIT> , <NUM_LIT> ) ; worldgenerator . generate ( currentWorld , randomGenerator , j6 , currentWorld . getHeightValue ( j6 , k10 ) , k10 ) ; } for ( int i2 = <NUM_LIT:0> ; i2 < bigMushroomsPerChunk ; i2 ++ ) { int k6 = chunk_X + randomGenerator . nextInt ( <NUM_LIT:16> ) + <NUM_LIT:8> ; int l10 = chunk_Z + randomGenerator . nextInt ( <NUM_LIT:16> ) + <NUM_LIT:8> ; bigMushroomGen . generate ( currentWorld , randomGenerator , k6 , currentWorld . getHeightValue ( k6 , l10 ) , l10 ) ; } for ( int j2 = <NUM_LIT:0> ; j2 < flowersPerChunk ; j2 ++ ) { int l6 = chunk_X + randomGenerator . nextInt ( <NUM_LIT:16> ) + <NUM_LIT:8> ; int i11 = randomGenerator . nextInt ( <NUM_LIT> ) ; int l14 = chunk_Z + randomGenerator . nextInt ( <NUM_LIT:16> ) + <NUM_LIT:8> ; plantYellowGen . generate ( currentWorld , randomGenerator , l6 , i11 , l14 ) ; if ( randomGenerator . nextInt ( <NUM_LIT:4> ) == <NUM_LIT:0> ) { int i7 = chunk_X + randomGenerator . nextInt ( <NUM_LIT:16> ) + <NUM_LIT:8> ; int j11 = randomGenerator . nextInt ( <NUM_LIT> ) ; int i15 = chunk_Z + randomGenerator . nextInt ( <NUM_LIT:16> ) + <NUM_LIT:8> ; plantRedGen . generate ( currentWorld , randomGenerator , i7 , j11 , i15 ) ; } } for ( int k2 = <NUM_LIT:0> ; k2 < grassPerChunk ; k2 ++ ) { int j7 = chunk_X + randomGenerator . nextInt ( <NUM_LIT:16> ) + <NUM_LIT:8> ; int k11 = randomGenerator . nextInt ( <NUM_LIT> ) ; int j15 = chunk_Z + randomGenerator . nextInt ( <NUM_LIT:16> ) + <NUM_LIT:8> ; WorldGenerator worldgenerator1 = biome . func_48440_b ( randomGenerator ) ; worldgenerator1 . generate ( currentWorld , randomGenerator , j7 , k11 , j15 ) ; } for ( int l2 = <NUM_LIT:0> ; l2 < deadBushPerChunk ; l2 ++ ) { int k7 = chunk_X + randomGenerator . nextInt ( <NUM_LIT:16> ) + <NUM_LIT:8> ; int l11 = randomGenerator . nextInt ( <NUM_LIT> ) ; int k15 = chunk_Z + randomGenerator . nextInt ( <NUM_LIT:16> ) + <NUM_LIT:8> ; ( new WorldGenDeadBush ( Block . deadBush . blockID ) ) . generate ( currentWorld , randomGenerator , k7 , l11 , k15 ) ; } for ( int i3 = <NUM_LIT:0> ; i3 < waterlilyPerChunk ; i3 ++ ) { int l7 = chunk_X + randomGenerator . nextInt ( <NUM_LIT:16> ) + <NUM_LIT:8> ; int i12 = chunk_Z + randomGenerator . nextInt ( <NUM_LIT:16> ) + <NUM_LIT:8> ; int l15 ; for ( l15 = randomGenerator . nextInt ( <NUM_LIT> ) ; l15 > <NUM_LIT:0> && currentWorld . getBlockId ( l7 , l15 - <NUM_LIT:1> , i12 ) == <NUM_LIT:0> ; l15 -- ) { } waterlilyGen . generate ( currentWorld , randomGenerator , l7 , l15 , i12 ) ; } for ( int j3 = <NUM_LIT:0> ; j3 < mushroomsPerChunk ; j3 ++ ) { if ( randomGenerator . nextInt ( <NUM_LIT:4> ) == <NUM_LIT:0> ) { int i8 = chunk_X + randomGenerator . nextInt ( <NUM_LIT:16> ) + <NUM_LIT:8> ; int j12 = chunk_Z + randomGenerator . nextInt ( <NUM_LIT:16> ) + <NUM_LIT:8> ; int i16 = currentWorld . getHeightValue ( i8 , j12 ) ; mushroomBrownGen . generate ( currentWorld , randomGenerator , i8 , i16 , j12 ) ; } if ( randomGenerator . nextInt ( <NUM_LIT:8> ) == <NUM_LIT:0> ) { int j8 = chunk_X + randomGenerator . nextInt ( <NUM_LIT:16> ) + <NUM_LIT:8> ; int k12 = chunk_Z + randomGenerator . nextInt ( <NUM_LIT:16> ) + <NUM_LIT:8> ; int j16 = randomGenerator . nextInt ( <NUM_LIT> ) ; mushroomRedGen . generate ( currentWorld , randomGenerator , j8 , j16 , k12 ) ; } } if ( randomGenerator . nextInt ( <NUM_LIT:4> ) == <NUM_LIT:0> ) { int k3 = chunk_X + randomGenerator . nextInt ( <NUM_LIT:16> ) + <NUM_LIT:8> ; int k8 = randomGenerator . nextInt ( <NUM_LIT> ) ; int l12 = chunk_Z + randomGenerator . nextInt ( <NUM_LIT:16> ) + <NUM_LIT:8> ; mushroomBrownGen . generate ( currentWorld , randomGenerator , k3 , k8 , l12 ) ; } if ( randomGenerator . nextInt ( <NUM_LIT:8> ) == <NUM_LIT:0> ) { int l3 = chunk_X + randomGenerator . nextInt ( <NUM_LIT:16> ) + <NUM_LIT:8> ; int l8 = randomGenerator . nextInt ( <NUM_LIT> ) ; int i13 = chunk_Z + randomGenerator . nextInt ( <NUM_LIT:16> ) + <NUM_LIT:8> ; mushroomRedGen . generate ( currentWorld , randomGenerator , l3 , l8 , i13 ) ; } for ( int i4 = <NUM_LIT:0> ; i4 < reedsPerChunk ; i4 ++ ) { int i9 = chunk_X + randomGenerator . nextInt ( <NUM_LIT:16> ) + <NUM_LIT:8> ; int j13 = chunk_Z + randomGenerator . nextInt ( <NUM_LIT:16> ) + <NUM_LIT:8> ; int k16 = randomGenerator . nextInt ( <NUM_LIT> ) ; reedGen . generate ( currentWorld , randomGenerator , i9 , k16 , j13 ) ; } for ( int j4 = <NUM_LIT:0> ; j4 < <NUM_LIT:10> ; j4 ++ ) { int j9 = chunk_X + randomGenerator . nextInt ( <NUM_LIT:16> ) + <NUM_LIT:8> ; int k13 = randomGenerator . nextInt ( <NUM_LIT> ) ; int l16 = chunk_Z + randomGenerator . nextInt ( <NUM_LIT:16> ) + <NUM_LIT:8> ; reedGen . generate ( currentWorld , randomGenerator , j9 , k13 , l16 ) ; } if ( randomGenerator . nextInt ( <NUM_LIT:32> ) == <NUM_LIT:0> ) { int k4 = chunk_X + randomGenerator . nextInt ( <NUM_LIT:16> ) + <NUM_LIT:8> ; int k9 = randomGenerator . nextInt ( <NUM_LIT> ) ; int l13 = chunk_Z + randomGenerator . nextInt ( <NUM_LIT:16> ) + <NUM_LIT:8> ; ( new WorldGenPumpkin ( ) ) . generate ( currentWorld , randomGenerator , k4 , k9 , l13 ) ; } for ( int l4 = <NUM_LIT:0> ; l4 < cactiPerChunk ; l4 ++ ) { int l9 = chunk_X + randomGenerator . nextInt ( <NUM_LIT:16> ) + <NUM_LIT:8> ; int i14 = randomGenerator . nextInt ( <NUM_LIT> ) ; int i17 = chunk_Z + randomGenerator . nextInt ( <NUM_LIT:16> ) + <NUM_LIT:8> ; cactusGen . generate ( currentWorld , randomGenerator , l9 , i14 , i17 ) ; } if ( generateLakes ) { for ( int i5 = <NUM_LIT:0> ; i5 < <NUM_LIT> ; i5 ++ ) { int i10 = chunk_X + randomGenerator . nextInt ( <NUM_LIT:16> ) + <NUM_LIT:8> ; int j14 = randomGenerator . nextInt ( randomGenerator . nextInt ( <NUM_LIT> ) + <NUM_LIT:8> ) ; int j17 = chunk_Z + randomGenerator . nextInt ( <NUM_LIT:16> ) + <NUM_LIT:8> ; ( new WorldGenLiquids ( Block . waterMoving . blockID ) ) . generate ( currentWorld , randomGenerator , i10 , j14 , j17 ) ; } for ( int j5 = <NUM_LIT:0> ; j5 < <NUM_LIT:20> ; j5 ++ ) { int j10 = chunk_X + randomGenerator . nextInt ( <NUM_LIT:16> ) + <NUM_LIT:8> ; int k14 = randomGenerator . nextInt ( randomGenerator . nextInt ( randomGenerator . nextInt ( <NUM_LIT> ) + <NUM_LIT:8> ) + <NUM_LIT:8> ) ; int k17 = chunk_Z + randomGenerator . nextInt ( <NUM_LIT:16> ) + <NUM_LIT:8> ; ( new WorldGenLiquids ( Block . lavaMoving . blockID ) ) . generate ( currentWorld , randomGenerator , j10 , k14 , k17 ) ; } } } protected void genStandardOre1 ( int par1 , WorldGenerator par2WorldGenerator , int par3 , int par4 ) { for ( int i = <NUM_LIT:0> ; i < par1 ; i ++ ) { int j = chunk_X + randomGenerator . nextInt ( <NUM_LIT:16> ) ; int k = randomGenerator . nextInt ( par4 - par3 ) + par3 ; int l = chunk_Z + randomGenerator . nextInt ( <NUM_LIT:16> ) ; par2WorldGenerator . generate ( currentWorld , randomGenerator , j , k , l ) ; } } protected void genStandardOre2 ( int par1 , WorldGenerator par2WorldGenerator , int par3 , int par4 ) { for ( int i = <NUM_LIT:0> ; i < par1 ; i ++ ) { int j = chunk_X + randomGenerator . nextInt ( <NUM_LIT:16> ) ; int k = randomGenerator . nextInt ( par4 ) + randomGenerator . nextInt ( par4 ) + ( par3 - par4 ) ; int l = chunk_Z + randomGenerator . nextInt ( <NUM_LIT:16> ) ; par2WorldGenerator . generate ( currentWorld , randomGenerator , j , k , l ) ; } } protected void generateOres ( ) { genStandardOre1 ( <NUM_LIT:20> , dirtGen , <NUM_LIT:0> , <NUM_LIT> ) ; genStandardOre1 ( <NUM_LIT:10> , gravelGen , <NUM_LIT:0> , <NUM_LIT> ) ; genStandardOre1 ( <NUM_LIT:20> , coalGen , <NUM_LIT:0> , <NUM_LIT> ) ; genStandardOre1 ( <NUM_LIT:20> , ironGen , <NUM_LIT:0> , <NUM_LIT> ) ; genStandardOre1 ( <NUM_LIT:2> , goldGen , <NUM_LIT:0> , <NUM_LIT:32> ) ; genStandardOre1 ( <NUM_LIT:8> , redstoneGen , <NUM_LIT:0> , <NUM_LIT:16> ) ; genStandardOre1 ( <NUM_LIT:1> , diamondGen , <NUM_LIT:0> , <NUM_LIT:16> ) ; genStandardOre2 ( <NUM_LIT:1> , lapisGen , <NUM_LIT:16> , <NUM_LIT:16> ) ; } } </s>
<s> package net . minecraft . src ; public class RecipesCrafting { public RecipesCrafting ( ) { } public void addRecipes ( CraftingManager par1CraftingManager ) { par1CraftingManager . addRecipe ( new ItemStack ( Block . chest ) , new Object [ ] { "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , '<CHAR_LIT>' , Block . planks } ) ; par1CraftingManager . addRecipe ( new ItemStack ( Block . stoneOvenIdle ) , new Object [ ] { "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , '<CHAR_LIT>' , Block . cobblestone } ) ; par1CraftingManager . addRecipe ( new ItemStack ( Block . workbench ) , new Object [ ] { "<STR_LIT>" , "<STR_LIT>" , '<CHAR_LIT>' , Block . planks } ) ; par1CraftingManager . addRecipe ( new ItemStack ( Block . sandStone ) , new Object [ ] { "<STR_LIT>" , "<STR_LIT>" , '<CHAR_LIT>' , Block . sand } ) ; par1CraftingManager . addRecipe ( new ItemStack ( Block . sandStone , <NUM_LIT:4> , <NUM_LIT:2> ) , new Object [ ] { "<STR_LIT>" , "<STR_LIT>" , '<CHAR_LIT>' , Block . sandStone } ) ; par1CraftingManager . addRecipe ( new ItemStack ( Block . sandStone , <NUM_LIT:1> , <NUM_LIT:1> ) , new Object [ ] { "<STR_LIT:#>" , "<STR_LIT:#>" , '<CHAR_LIT>' , new ItemStack ( Block . stairSingle , <NUM_LIT:1> , <NUM_LIT:1> ) } ) ; par1CraftingManager . addRecipe ( new ItemStack ( Block . stoneBrick , <NUM_LIT:4> ) , new Object [ ] { "<STR_LIT>" , "<STR_LIT>" , '<CHAR_LIT>' , Block . stone } ) ; par1CraftingManager . addRecipe ( new ItemStack ( Block . fenceIron , <NUM_LIT:16> ) , new Object [ ] { "<STR_LIT>" , "<STR_LIT>" , '<CHAR_LIT>' , Item . ingotIron } ) ; par1CraftingManager . addRecipe ( new ItemStack ( Block . thinGlass , <NUM_LIT:16> ) , new Object [ ] { "<STR_LIT>" , "<STR_LIT>" , '<CHAR_LIT>' , Block . glass } ) ; par1CraftingManager . addRecipe ( new ItemStack ( Block . redstoneLampIdle , <NUM_LIT:1> ) , new Object [ ] { "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , '<CHAR_LIT>' , Item . redstone , '<CHAR_LIT>' , Block . glowStone } ) ; } } </s>
<s> package net . minecraft . src ; import java . util . Random ; public class BiomeEndDecorator extends BiomeDecorator { protected WorldGenerator spikeGen ; public BiomeEndDecorator ( BiomeGenBase par1BiomeGenBase ) { super ( par1BiomeGenBase ) ; spikeGen = new WorldGenSpikes ( Block . whiteStone . blockID ) ; } protected void decorate ( ) { generateOres ( ) ; if ( randomGenerator . nextInt ( <NUM_LIT:5> ) == <NUM_LIT:0> ) { int i = chunk_X + randomGenerator . nextInt ( <NUM_LIT:16> ) + <NUM_LIT:8> ; int j = chunk_Z + randomGenerator . nextInt ( <NUM_LIT:16> ) + <NUM_LIT:8> ; int k = currentWorld . getTopSolidOrLiquidBlock ( i , j ) ; if ( k <= <NUM_LIT:0> ) ; spikeGen . generate ( currentWorld , randomGenerator , i , k , j ) ; } if ( chunk_X == <NUM_LIT:0> && chunk_Z == <NUM_LIT:0> ) { EntityDragon entitydragon = new EntityDragon ( currentWorld ) ; entitydragon . setLocationAndAngles ( <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , randomGenerator . nextFloat ( ) * <NUM_LIT> , <NUM_LIT> ) ; currentWorld . spawnEntityInWorld ( entitydragon ) ; } } } </s>
<s> package net . minecraft . src ; public class StructureBoundingBox { public int minX ; public int minY ; public int minZ ; public int maxX ; public int maxY ; public int maxZ ; public StructureBoundingBox ( ) { } public static StructureBoundingBox getNewBoundingBox ( ) { return new StructureBoundingBox ( <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> ) ; } public static StructureBoundingBox getComponentToAddBoundingBox ( int par0 , int par1 , int par2 , int par3 , int par4 , int par5 , int par6 , int par7 , int par8 , int par9 ) { switch ( par9 ) { default : return new StructureBoundingBox ( par0 + par3 , par1 + par4 , par2 + par5 , ( ( par0 + par6 ) - <NUM_LIT:1> ) + par3 , ( ( par1 + par7 ) - <NUM_LIT:1> ) + par4 , ( ( par2 + par8 ) - <NUM_LIT:1> ) + par5 ) ; case <NUM_LIT:2> : return new StructureBoundingBox ( par0 + par3 , par1 + par4 , ( par2 - par8 ) + <NUM_LIT:1> + par5 , ( ( par0 + par6 ) - <NUM_LIT:1> ) + par3 , ( ( par1 + par7 ) - <NUM_LIT:1> ) + par4 , par2 + par5 ) ; case <NUM_LIT:0> : return new StructureBoundingBox ( par0 + par3 , par1 + par4 , par2 + par5 , ( ( par0 + par6 ) - <NUM_LIT:1> ) + par3 , ( ( par1 + par7 ) - <NUM_LIT:1> ) + par4 , ( ( par2 + par8 ) - <NUM_LIT:1> ) + par5 ) ; case <NUM_LIT:1> : return new StructureBoundingBox ( ( par0 - par8 ) + <NUM_LIT:1> + par5 , par1 + par4 , par2 + par3 , par0 + par5 , ( ( par1 + par7 ) - <NUM_LIT:1> ) + par4 , ( ( par2 + par6 ) - <NUM_LIT:1> ) + par3 ) ; case <NUM_LIT:3> : return new StructureBoundingBox ( par0 + par5 , par1 + par4 , par2 + par3 , ( ( par0 + par8 ) - <NUM_LIT:1> ) + par5 , ( ( par1 + par7 ) - <NUM_LIT:1> ) + par4 , ( ( par2 + par6 ) - <NUM_LIT:1> ) + par3 ) ; } } public StructureBoundingBox ( StructureBoundingBox par1StructureBoundingBox ) { minX = par1StructureBoundingBox . minX ; minY = par1StructureBoundingBox . minY ; minZ = par1StructureBoundingBox . minZ ; maxX = par1StructureBoundingBox . maxX ; maxY = par1StructureBoundingBox . maxY ; maxZ = par1StructureBoundingBox . maxZ ; } public StructureBoundingBox ( int par1 , int par2 , int par3 , int par4 , int par5 , int par6 ) { minX = par1 ; minY = par2 ; minZ = par3 ; maxX = par4 ; maxY = par5 ; maxZ = par6 ; } public StructureBoundingBox ( int par1 , int par2 , int par3 , int par4 ) { minX = par1 ; minZ = par2 ; maxX = par3 ; maxZ = par4 ; minY = <NUM_LIT:1> ; maxY = <NUM_LIT> ; } public boolean intersectsWith ( StructureBoundingBox par1StructureBoundingBox ) { return maxX >= par1StructureBoundingBox . minX && minX <= par1StructureBoundingBox . maxX && maxZ >= par1StructureBoundingBox . minZ && minZ <= par1StructureBoundingBox . maxZ && maxY >= par1StructureBoundingBox . minY && minY <= par1StructureBoundingBox . maxY ; } public boolean intersectsWith ( int par1 , int par2 , int par3 , int par4 ) { return maxX >= par1 && minX <= par3 && maxZ >= par2 && minZ <= par4 ; } public void expandTo ( StructureBoundingBox par1StructureBoundingBox ) { minX = Math . min ( minX , par1StructureBoundingBox . minX ) ; minY = Math . min ( minY , par1StructureBoundingBox . minY ) ; minZ = Math . min ( minZ , par1StructureBoundingBox . minZ ) ; maxX = Math . max ( maxX , par1StructureBoundingBox . maxX ) ; maxY = Math . max ( maxY , par1StructureBoundingBox . maxY ) ; maxZ = Math . max ( maxZ , par1StructureBoundingBox . maxZ ) ; } public void offset ( int par1 , int par2 , int par3 ) { minX += par1 ; minY += par2 ; minZ += par3 ; maxX += par1 ; maxY += par2 ; maxZ += par3 ; } public boolean isVecInside ( int par1 , int par2 , int par3 ) { return par1 >= minX && par1 <= maxX && par3 >= minZ && par3 <= maxZ && par2 >= minY && par2 <= maxY ; } public int getXSize ( ) { return ( maxX - minX ) + <NUM_LIT:1> ; } public int getYSize ( ) { return ( maxY - minY ) + <NUM_LIT:1> ; } public int getZSize ( ) { return ( maxZ - minZ ) + <NUM_LIT:1> ; } public int getCenterX ( ) { return minX + ( ( maxX - minX ) + <NUM_LIT:1> ) / <NUM_LIT:2> ; } public int getCenterY ( ) { return minY + ( ( maxY - minY ) + <NUM_LIT:1> ) / <NUM_LIT:2> ; } public int getCenterZ ( ) { return minZ + ( ( maxZ - minZ ) + <NUM_LIT:1> ) / <NUM_LIT:2> ; } public String toString ( ) { return ( new StringBuilder ( ) ) . append ( "<STR_LIT:(>" ) . append ( minX ) . append ( "<STR_LIT:U+002CU+0020>" ) . append ( minY ) . append ( "<STR_LIT:U+002CU+0020>" ) . append ( minZ ) . append ( "<STR_LIT:;U+0020>" ) . append ( maxX ) . append ( "<STR_LIT:U+002CU+0020>" ) . append ( maxY ) . append ( "<STR_LIT:U+002CU+0020>" ) . append ( maxZ ) . append ( "<STR_LIT:)>" ) . toString ( ) ; } } </s>
<s> package net . minecraft . src ; public class EntityAITempt extends EntityAIBase { private EntityCreature temptedEntity ; private float field_48266_b ; private double field_48267_c ; private double field_48264_d ; private double field_48265_e ; private double field_48262_f ; private double field_48263_g ; private EntityPlayer temptingPlayer ; private int delayTemptCounter ; private boolean field_48271_j ; private int breedingFood ; private boolean scaredByPlayerMovement ; private boolean field_48270_m ; public EntityAITempt ( EntityCreature par1EntityCreature , float par2 , int par3 , boolean par4 ) { delayTemptCounter = <NUM_LIT:0> ; temptedEntity = par1EntityCreature ; field_48266_b = par2 ; breedingFood = par3 ; scaredByPlayerMovement = par4 ; setMutexBits ( <NUM_LIT:3> ) ; } public boolean shouldExecute ( ) { if ( delayTemptCounter > <NUM_LIT:0> ) { delayTemptCounter -- ; return false ; } temptingPlayer = temptedEntity . worldObj . getClosestPlayerToEntity ( temptedEntity , <NUM_LIT> ) ; if ( temptingPlayer == null ) { return false ; } ItemStack itemstack = temptingPlayer . getCurrentEquippedItem ( ) ; if ( itemstack == null ) { return false ; } return itemstack . itemID == breedingFood ; } public boolean continueExecuting ( ) { if ( scaredByPlayerMovement ) { if ( temptedEntity . getDistanceSqToEntity ( temptingPlayer ) < <NUM_LIT> ) { if ( temptingPlayer . getDistanceSq ( field_48267_c , field_48264_d , field_48265_e ) > <NUM_LIT> ) { return false ; } if ( Math . abs ( ( double ) temptingPlayer . rotationPitch - field_48262_f ) > <NUM_LIT> || Math . abs ( ( double ) temptingPlayer . rotationYaw - field_48263_g ) > <NUM_LIT> ) { return false ; } } else { field_48267_c = temptingPlayer . posX ; field_48264_d = temptingPlayer . posY ; field_48265_e = temptingPlayer . posZ ; } field_48262_f = temptingPlayer . rotationPitch ; field_48263_g = temptingPlayer . rotationYaw ; } return shouldExecute ( ) ; } public void startExecuting ( ) { field_48267_c = temptingPlayer . posX ; field_48264_d = temptingPlayer . posY ; field_48265_e = temptingPlayer . posZ ; field_48271_j = true ; field_48270_m = temptedEntity . getNavigator ( ) . func_48649_a ( ) ; temptedEntity . getNavigator ( ) . func_48656_a ( false ) ; } public void resetTask ( ) { temptingPlayer = null ; temptedEntity . getNavigator ( ) . clearPathEntity ( ) ; delayTemptCounter = <NUM_LIT:100> ; field_48271_j = false ; temptedEntity . getNavigator ( ) . func_48656_a ( field_48270_m ) ; } public void updateTask ( ) { temptedEntity . getLookHelper ( ) . setLookPositionWithEntity ( temptingPlayer , <NUM_LIT> , temptedEntity . getVerticalFaceSpeed ( ) ) ; if ( temptedEntity . getDistanceSqToEntity ( temptingPlayer ) < <NUM_LIT> ) { temptedEntity . getNavigator ( ) . clearPathEntity ( ) ; } else { temptedEntity . getNavigator ( ) . func_48652_a ( temptingPlayer , field_48266_b ) ; } } public boolean func_48261_f ( ) { return field_48271_j ; } } </s>
<s> package net . minecraft . src ; public class ItemBlock extends Item { private int blockID ; public ItemBlock ( int par1 ) { super ( par1 ) ; blockID = par1 + <NUM_LIT> ; setIconIndex ( Block . blocksList [ par1 + <NUM_LIT> ] . getBlockTextureFromSide ( <NUM_LIT:2> ) ) ; } public int getBlockID ( ) { return blockID ; } public boolean onItemUse ( ItemStack par1ItemStack , EntityPlayer par2EntityPlayer , World par3World , int par4 , int par5 , int par6 , int par7 ) { int i = par3World . getBlockId ( par4 , par5 , par6 ) ; if ( i == Block . snow . blockID ) { par7 = <NUM_LIT:1> ; } else if ( i != Block . vine . blockID && i != Block . tallGrass . blockID && i != Block . deadBush . blockID ) { if ( par7 == <NUM_LIT:0> ) { par5 -- ; } if ( par7 == <NUM_LIT:1> ) { par5 ++ ; } if ( par7 == <NUM_LIT:2> ) { par6 -- ; } if ( par7 == <NUM_LIT:3> ) { par6 ++ ; } if ( par7 == <NUM_LIT:4> ) { par4 -- ; } if ( par7 == <NUM_LIT:5> ) { par4 ++ ; } } if ( par1ItemStack . stackSize == <NUM_LIT:0> ) { return false ; } if ( ! par2EntityPlayer . canPlayerEdit ( par4 , par5 , par6 ) ) { return false ; } if ( par5 == <NUM_LIT:255> && Block . blocksList [ blockID ] . blockMaterial . isSolid ( ) ) { return false ; } if ( par3World . canBlockBePlacedAt ( blockID , par4 , par5 , par6 , false , par7 ) ) { Block block = Block . blocksList [ blockID ] ; if ( par3World . setBlockAndMetadataWithNotify ( par4 , par5 , par6 , blockID , getMetadata ( par1ItemStack . getItemDamage ( ) ) ) ) { if ( par3World . getBlockId ( par4 , par5 , par6 ) == blockID ) { Block . blocksList [ blockID ] . onBlockPlaced ( par3World , par4 , par5 , par6 , par7 ) ; Block . blocksList [ blockID ] . onBlockPlacedBy ( par3World , par4 , par5 , par6 , par2EntityPlayer ) ; } par3World . playSoundEffect ( ( float ) par4 + <NUM_LIT> , ( float ) par5 + <NUM_LIT> , ( float ) par6 + <NUM_LIT> , block . stepSound . getStepSound ( ) , ( block . stepSound . getVolume ( ) + <NUM_LIT> ) / <NUM_LIT> , block . stepSound . getPitch ( ) * <NUM_LIT> ) ; par1ItemStack . stackSize -- ; } return true ; } else { return false ; } } public String getItemNameIS ( ItemStack par1ItemStack ) { return Block . blocksList [ blockID ] . getBlockName ( ) ; } public String getItemName ( ) { return Block . blocksList [ blockID ] . getBlockName ( ) ; } } </s>
<s> package net . minecraft . src ; import java . io . * ; public class Packet131MapData extends Packet { public short itemID ; public short uniqueID ; public byte itemData [ ] ; public Packet131MapData ( ) { isChunkDataPacket = true ; } public Packet131MapData ( short par1 , short par2 , byte par3ArrayOfByte [ ] ) { isChunkDataPacket = true ; itemID = par1 ; uniqueID = par2 ; itemData = par3ArrayOfByte ; } public void readPacketData ( DataInputStream par1DataInputStream ) throws IOException { itemID = par1DataInputStream . readShort ( ) ; uniqueID = par1DataInputStream . readShort ( ) ; itemData = new byte [ par1DataInputStream . readByte ( ) & <NUM_LIT> ] ; par1DataInputStream . readFully ( itemData ) ; } public void writePacketData ( DataOutputStream par1DataOutputStream ) throws IOException { par1DataOutputStream . writeShort ( itemID ) ; par1DataOutputStream . writeShort ( uniqueID ) ; par1DataOutputStream . writeByte ( itemData . length ) ; par1DataOutputStream . write ( itemData ) ; } public void processPacket ( NetHandler par1NetHandler ) { par1NetHandler . handleMapData ( this ) ; } public int getPacketSize ( ) { return <NUM_LIT:4> + itemData . length ; } } </s>
<s> package net . minecraft . src ; class SlotArmor extends Slot { final int armorType ; final ContainerPlayer parent ; SlotArmor ( ContainerPlayer par1ContainerPlayer , IInventory par2IInventory , int par3 , int par4 , int par5 , int par6 ) { super ( par2IInventory , par3 , par4 , par5 ) ; parent = par1ContainerPlayer ; armorType = par6 ; } public int getSlotStackLimit ( ) { return <NUM_LIT:1> ; } public boolean isItemValid ( ItemStack par1ItemStack ) { if ( par1ItemStack . getItem ( ) instanceof ItemArmor ) { return ( ( ItemArmor ) par1ItemStack . getItem ( ) ) . armorType == armorType ; } if ( par1ItemStack . getItem ( ) . shiftedIndex == Block . pumpkin . blockID ) { return armorType == <NUM_LIT:0> ; } else { return false ; } } } </s>
<s> package net . minecraft . src ; public interface IAnimals { } </s>
<s> package net . minecraft . src ; import java . io . * ; public class NBTTagEnd extends NBTBase { public NBTTagEnd ( ) { super ( null ) ; } void load ( DataInput datainput ) throws IOException { } void write ( DataOutput dataoutput ) throws IOException { } public byte getId ( ) { return <NUM_LIT:0> ; } public String toString ( ) { return "<STR_LIT>" ; } public NBTBase copy ( ) { return new NBTTagEnd ( ) ; } public boolean equals ( Object par1Obj ) { return super . equals ( par1Obj ) ; } } </s>
<s> package net . minecraft . src ; import java . util . List ; import java . util . Random ; public class EntityBoat extends Entity { private int boatPosRotationIncrements ; private double boatX ; private double boatY ; private double boatZ ; private double boatYaw ; private double boatPitch ; public EntityBoat ( World par1World ) { super ( par1World ) ; preventEntitySpawning = true ; setSize ( <NUM_LIT> , <NUM_LIT> ) ; yOffset = height / <NUM_LIT> ; } protected boolean canTriggerWalking ( ) { return false ; } protected void entityInit ( ) { dataWatcher . addObject ( <NUM_LIT> , new Integer ( <NUM_LIT:0> ) ) ; dataWatcher . addObject ( <NUM_LIT> , new Integer ( <NUM_LIT:1> ) ) ; dataWatcher . addObject ( <NUM_LIT> , new Integer ( <NUM_LIT:0> ) ) ; } public AxisAlignedBB getCollisionBox ( Entity par1Entity ) { return par1Entity . boundingBox ; } public AxisAlignedBB getBoundingBox ( ) { return boundingBox ; } public boolean canBePushed ( ) { return true ; } public EntityBoat ( World par1World , double par2 , double par4 , double par6 ) { this ( par1World ) ; setPosition ( par2 , par4 + ( double ) yOffset , par6 ) ; motionX = <NUM_LIT> ; motionY = <NUM_LIT> ; motionZ = <NUM_LIT> ; prevPosX = par2 ; prevPosY = par4 ; prevPosZ = par6 ; } public double getMountedYOffset ( ) { return ( double ) height * <NUM_LIT> - <NUM_LIT> ; } public boolean attackEntityFrom ( DamageSource par1DamageSource , int par2 ) { if ( worldObj . isRemote || isDead ) { return true ; } setForwardDirection ( - getForwardDirection ( ) ) ; setTimeSinceHit ( <NUM_LIT:10> ) ; setDamageTaken ( getDamageTaken ( ) + par2 * <NUM_LIT:10> ) ; setBeenAttacked ( ) ; if ( getDamageTaken ( ) > <NUM_LIT> ) { if ( riddenByEntity != null ) { riddenByEntity . mountEntity ( this ) ; } for ( int i = <NUM_LIT:0> ; i < <NUM_LIT:3> ; i ++ ) { dropItemWithOffset ( Block . planks . blockID , <NUM_LIT:1> , <NUM_LIT> ) ; } for ( int j = <NUM_LIT:0> ; j < <NUM_LIT:2> ; j ++ ) { dropItemWithOffset ( Item . stick . shiftedIndex , <NUM_LIT:1> , <NUM_LIT> ) ; } setDead ( ) ; } return true ; } public boolean canBeCollidedWith ( ) { return ! isDead ; } public void onUpdate ( ) { super . onUpdate ( ) ; if ( getTimeSinceHit ( ) > <NUM_LIT:0> ) { setTimeSinceHit ( getTimeSinceHit ( ) - <NUM_LIT:1> ) ; } if ( getDamageTaken ( ) > <NUM_LIT:0> ) { setDamageTaken ( getDamageTaken ( ) - <NUM_LIT:1> ) ; } prevPosX = posX ; prevPosY = posY ; prevPosZ = posZ ; int i = <NUM_LIT:5> ; double d = <NUM_LIT> ; for ( int j = <NUM_LIT:0> ; j < i ; j ++ ) { double d2 = ( boundingBox . minY + ( ( boundingBox . maxY - boundingBox . minY ) * ( double ) ( j + <NUM_LIT:0> ) ) / ( double ) i ) - <NUM_LIT> ; double d8 = ( boundingBox . minY + ( ( boundingBox . maxY - boundingBox . minY ) * ( double ) ( j + <NUM_LIT:1> ) ) / ( double ) i ) - <NUM_LIT> ; AxisAlignedBB axisalignedbb = AxisAlignedBB . getBoundingBoxFromPool ( boundingBox . minX , d2 , boundingBox . minZ , boundingBox . maxX , d8 , boundingBox . maxZ ) ; if ( worldObj . isAABBInMaterial ( axisalignedbb , Material . water ) ) { d += <NUM_LIT> / ( double ) i ; } } double d1 = Math . sqrt ( motionX * motionX + motionZ * motionZ ) ; if ( d1 > <NUM_LIT> ) { double d3 = Math . cos ( ( ( double ) rotationYaw * Math . PI ) / <NUM_LIT> ) ; double d9 = Math . sin ( ( ( double ) rotationYaw * Math . PI ) / <NUM_LIT> ) ; for ( int i1 = <NUM_LIT:0> ; ( double ) i1 < <NUM_LIT> + d1 * <NUM_LIT> ; i1 ++ ) { double d16 = rand . nextFloat ( ) * <NUM_LIT> - <NUM_LIT> ; double d19 = ( double ) ( rand . nextInt ( <NUM_LIT:2> ) * <NUM_LIT:2> - <NUM_LIT:1> ) * <NUM_LIT> ; if ( rand . nextBoolean ( ) ) { double d21 = ( posX - d3 * d16 * <NUM_LIT> ) + d9 * d19 ; double d23 = posZ - d9 * d16 * <NUM_LIT> - d3 * d19 ; worldObj . spawnParticle ( "<STR_LIT>" , d21 , posY - <NUM_LIT> , d23 , motionX , motionY , motionZ ) ; } else { double d22 = posX + d3 + d9 * d16 * <NUM_LIT> ; double d24 = ( posZ + d9 ) - d3 * d16 * <NUM_LIT> ; worldObj . spawnParticle ( "<STR_LIT>" , d22 , posY - <NUM_LIT> , d24 , motionX , motionY , motionZ ) ; } } } if ( worldObj . isRemote ) { if ( boatPosRotationIncrements > <NUM_LIT:0> ) { double d4 = posX + ( boatX - posX ) / ( double ) boatPosRotationIncrements ; double d10 = posY + ( boatY - posY ) / ( double ) boatPosRotationIncrements ; double d13 = posZ + ( boatZ - posZ ) / ( double ) boatPosRotationIncrements ; double d17 ; for ( d17 = boatYaw - ( double ) rotationYaw ; d17 < - <NUM_LIT> ; d17 += <NUM_LIT> ) { } for ( ; d17 >= <NUM_LIT> ; d17 -= <NUM_LIT> ) { } rotationYaw += d17 / ( double ) boatPosRotationIncrements ; rotationPitch += ( boatPitch - ( double ) rotationPitch ) / ( double ) boatPosRotationIncrements ; boatPosRotationIncrements -- ; setPosition ( d4 , d10 , d13 ) ; setRotation ( rotationYaw , rotationPitch ) ; } else { double d5 = posX + motionX ; double d11 = posY + motionY ; double d14 = posZ + motionZ ; setPosition ( d5 , d11 , d14 ) ; if ( onGround ) { motionX *= <NUM_LIT> ; motionY *= <NUM_LIT> ; motionZ *= <NUM_LIT> ; } motionX *= <NUM_LIT> ; motionY *= <NUM_LIT> ; motionZ *= <NUM_LIT> ; } return ; } if ( d < <NUM_LIT> ) { double d6 = d * <NUM_LIT> - <NUM_LIT> ; motionY += <NUM_LIT> * d6 ; } else { if ( motionY < <NUM_LIT> ) { motionY /= <NUM_LIT> ; } motionY += <NUM_LIT> ; } if ( riddenByEntity != null ) { motionX += riddenByEntity . motionX * <NUM_LIT> ; motionZ += riddenByEntity . motionZ * <NUM_LIT> ; } double d7 = <NUM_LIT> ; if ( motionX < - d7 ) { motionX = - d7 ; } if ( motionX > d7 ) { motionX = d7 ; } if ( motionZ < - d7 ) { motionZ = - d7 ; } if ( motionZ > d7 ) { motionZ = d7 ; } if ( onGround ) { motionX *= <NUM_LIT> ; motionY *= <NUM_LIT> ; motionZ *= <NUM_LIT> ; } moveEntity ( motionX , motionY , motionZ ) ; if ( isCollidedHorizontally && d1 > <NUM_LIT> ) { if ( ! worldObj . isRemote ) { setDead ( ) ; for ( int k = <NUM_LIT:0> ; k < <NUM_LIT:3> ; k ++ ) { dropItemWithOffset ( Block . planks . blockID , <NUM_LIT:1> , <NUM_LIT> ) ; } for ( int l = <NUM_LIT:0> ; l < <NUM_LIT:2> ; l ++ ) { dropItemWithOffset ( Item . stick . shiftedIndex , <NUM_LIT:1> , <NUM_LIT> ) ; } } } else { motionX *= <NUM_LIT> ; motionY *= <NUM_LIT> ; motionZ *= <NUM_LIT> ; } rotationPitch = <NUM_LIT> ; double d12 = rotationYaw ; double d15 = prevPosX - posX ; double d18 = prevPosZ - posZ ; if ( d15 * d15 + d18 * d18 > <NUM_LIT> ) { d12 = ( float ) ( ( Math . atan2 ( d18 , d15 ) * <NUM_LIT> ) / Math . PI ) ; } double d20 ; for ( d20 = d12 - ( double ) rotationYaw ; d20 >= <NUM_LIT> ; d20 -= <NUM_LIT> ) { } for ( ; d20 < - <NUM_LIT> ; d20 += <NUM_LIT> ) { } if ( d20 > <NUM_LIT> ) { d20 = <NUM_LIT> ; } if ( d20 < - <NUM_LIT> ) { d20 = - <NUM_LIT> ; } rotationYaw += d20 ; setRotation ( rotationYaw , rotationPitch ) ; List list = worldObj . getEntitiesWithinAABBExcludingEntity ( this , boundingBox . expand ( <NUM_LIT> , <NUM_LIT> , <NUM_LIT> ) ) ; if ( list != null && list . size ( ) > <NUM_LIT:0> ) { for ( int j1 = <NUM_LIT:0> ; j1 < list . size ( ) ; j1 ++ ) { Entity entity = ( Entity ) list . get ( j1 ) ; if ( entity != riddenByEntity && entity . canBePushed ( ) && ( entity instanceof EntityBoat ) ) { entity . applyEntityCollision ( this ) ; } } } for ( int k1 = <NUM_LIT:0> ; k1 < <NUM_LIT:4> ; k1 ++ ) { int l1 = MathHelper . floor_double ( posX + ( ( double ) ( k1 % <NUM_LIT:2> ) - <NUM_LIT> ) * <NUM_LIT> ) ; int i2 = MathHelper . floor_double ( posY ) ; int j2 = MathHelper . floor_double ( posZ + ( ( double ) ( k1 / <NUM_LIT:2> ) - <NUM_LIT> ) * <NUM_LIT> ) ; if ( worldObj . getBlockId ( l1 , i2 , j2 ) == Block . snow . blockID ) { worldObj . setBlockWithNotify ( l1 , i2 , j2 , <NUM_LIT:0> ) ; } } if ( riddenByEntity != null && riddenByEntity . isDead ) { riddenByEntity = null ; } } public void updateRiderPosition ( ) { if ( riddenByEntity == null ) { return ; } else { double d = Math . cos ( ( ( double ) rotationYaw * Math . PI ) / <NUM_LIT> ) * <NUM_LIT> ; double d1 = Math . sin ( ( ( double ) rotationYaw * Math . PI ) / <NUM_LIT> ) * <NUM_LIT> ; riddenByEntity . setPosition ( posX + d , posY + getMountedYOffset ( ) + riddenByEntity . getYOffset ( ) , posZ + d1 ) ; return ; } } protected void writeEntityToNBT ( NBTTagCompound nbttagcompound ) { } protected void readEntityFromNBT ( NBTTagCompound nbttagcompound ) { } public boolean interact ( EntityPlayer par1EntityPlayer ) { if ( riddenByEntity != null && ( riddenByEntity instanceof EntityPlayer ) && riddenByEntity != par1EntityPlayer ) { return true ; } if ( ! worldObj . isRemote ) { par1EntityPlayer . mountEntity ( this ) ; } return true ; } public void setDamageTaken ( int par1 ) { dataWatcher . updateObject ( <NUM_LIT> , Integer . valueOf ( par1 ) ) ; } public int getDamageTaken ( ) { return dataWatcher . getWatchableObjectInt ( <NUM_LIT> ) ; } public void setTimeSinceHit ( int par1 ) { dataWatcher . updateObject ( <NUM_LIT> , Integer . valueOf ( par1 ) ) ; } public int getTimeSinceHit ( ) { return dataWatcher . getWatchableObjectInt ( <NUM_LIT> ) ; } public void setForwardDirection ( int par1 ) { dataWatcher . updateObject ( <NUM_LIT> , Integer . valueOf ( par1 ) ) ; } public int getForwardDirection ( ) { return dataWatcher . getWatchableObjectInt ( <NUM_LIT> ) ; } } </s>
<s> package net . minecraft . src ; public class EntityMooshroom extends EntityCow { public EntityMooshroom ( World par1World ) { super ( par1World ) ; texture = "<STR_LIT>" ; setSize ( <NUM_LIT> , <NUM_LIT> ) ; } public boolean interact ( EntityPlayer par1EntityPlayer ) { ItemStack itemstack = par1EntityPlayer . inventory . getCurrentItem ( ) ; if ( itemstack != null && itemstack . itemID == Item . bowlEmpty . shiftedIndex && getGrowingAge ( ) >= <NUM_LIT:0> ) { if ( itemstack . stackSize == <NUM_LIT:1> ) { par1EntityPlayer . inventory . setInventorySlotContents ( par1EntityPlayer . inventory . currentItem , new ItemStack ( Item . bowlSoup ) ) ; return true ; } if ( par1EntityPlayer . inventory . addItemStackToInventory ( new ItemStack ( Item . bowlSoup ) ) && ! par1EntityPlayer . capabilities . isCreativeMode ) { par1EntityPlayer . inventory . decrStackSize ( par1EntityPlayer . inventory . currentItem , <NUM_LIT:1> ) ; return true ; } } if ( itemstack != null && itemstack . itemID == Item . shears . shiftedIndex && getGrowingAge ( ) >= <NUM_LIT:0> ) { setDead ( ) ; worldObj . spawnParticle ( "<STR_LIT>" , posX , posY + ( double ) ( height / <NUM_LIT> ) , posZ , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> ) ; if ( ! worldObj . isRemote ) { EntityCow entitycow = new EntityCow ( worldObj ) ; entitycow . setLocationAndAngles ( posX , posY , posZ , rotationYaw , rotationPitch ) ; entitycow . setEntityHealth ( getHealth ( ) ) ; entitycow . renderYawOffset = renderYawOffset ; worldObj . spawnEntityInWorld ( entitycow ) ; for ( int i = <NUM_LIT:0> ; i < <NUM_LIT:5> ; i ++ ) { worldObj . spawnEntityInWorld ( new EntityItem ( worldObj , posX , posY + ( double ) height , posZ , new ItemStack ( Block . mushroomRed ) ) ) ; } } return true ; } else { return super . interact ( par1EntityPlayer ) ; } } public EntityAnimal spawnBabyAnimal ( EntityAnimal par1EntityAnimal ) { return new EntityMooshroom ( worldObj ) ; } } </s>
<s> package net . minecraft . src ; import java . util . Random ; public class WorldGenShrub extends WorldGenerator { private int field_48408_a ; private int field_48407_b ; public WorldGenShrub ( int par1 , int par2 ) { field_48407_b = par1 ; field_48408_a = par2 ; } public boolean generate ( World par1World , Random par2Random , int par3 , int par4 , int par5 ) { for ( int i = <NUM_LIT:0> ; ( ( i = par1World . getBlockId ( par3 , par4 , par5 ) ) == <NUM_LIT:0> || i == Block . leaves . blockID ) && par4 > <NUM_LIT:0> ; par4 -- ) { } int j = par1World . getBlockId ( par3 , par4 , par5 ) ; if ( j == Block . dirt . blockID || j == Block . grass . blockID ) { par4 ++ ; setBlockAndMetadata ( par1World , par3 , par4 , par5 , Block . wood . blockID , field_48407_b ) ; for ( int k = par4 ; k <= par4 + <NUM_LIT:2> ; k ++ ) { int l = k - par4 ; int i1 = <NUM_LIT:2> - l ; for ( int j1 = par3 - i1 ; j1 <= par3 + i1 ; j1 ++ ) { int k1 = j1 - par3 ; for ( int l1 = par5 - i1 ; l1 <= par5 + i1 ; l1 ++ ) { int i2 = l1 - par5 ; if ( ( Math . abs ( k1 ) != i1 || Math . abs ( i2 ) != i1 || par2Random . nextInt ( <NUM_LIT:2> ) != <NUM_LIT:0> ) && ! Block . opaqueCubeLookup [ par1World . getBlockId ( j1 , k , l1 ) ] ) { setBlockAndMetadata ( par1World , j1 , k , l1 , Block . leaves . blockID , field_48408_a ) ; } } } } } return true ; } } </s>
<s> package net . minecraft . src ; public class BlockNetherrack extends Block { public BlockNetherrack ( int par1 , int par2 ) { super ( par1 , par2 , Material . rock ) ; } } </s>
<s> package net . minecraft . src ; import java . util . List ; import java . util . Random ; public class ComponentNetherBridgeEnd extends ComponentNetherBridgePiece { private int fillSeed ; public ComponentNetherBridgeEnd ( int par1 , Random par2Random , StructureBoundingBox par3StructureBoundingBox , int par4 ) { super ( par1 ) ; coordBaseMode = par4 ; boundingBox = par3StructureBoundingBox ; fillSeed = par2Random . nextInt ( ) ; } public void buildComponent ( StructureComponent structurecomponent , List list , Random random ) { } public static ComponentNetherBridgeEnd func_40301_a ( List par0List , Random par1Random , int par2 , int par3 , int par4 , int par5 , int par6 ) { StructureBoundingBox structureboundingbox = StructureBoundingBox . getComponentToAddBoundingBox ( par2 , par3 , par4 , - <NUM_LIT:1> , - <NUM_LIT:3> , <NUM_LIT:0> , <NUM_LIT:5> , <NUM_LIT:10> , <NUM_LIT:8> , par5 ) ; if ( ! isAboveGround ( structureboundingbox ) || StructureComponent . findIntersecting ( par0List , structureboundingbox ) != null ) { return null ; } else { return new ComponentNetherBridgeEnd ( par6 , par1Random , structureboundingbox , par5 ) ; } } public boolean addComponentParts ( World par1World , Random par2Random , StructureBoundingBox par3StructureBoundingBox ) { Random random = new Random ( fillSeed ) ; for ( int i = <NUM_LIT:0> ; i <= <NUM_LIT:4> ; i ++ ) { for ( int i1 = <NUM_LIT:3> ; i1 <= <NUM_LIT:4> ; i1 ++ ) { int l1 = random . nextInt ( <NUM_LIT:8> ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , i , i1 , <NUM_LIT:0> , i , i1 , l1 , Block . netherBrick . blockID , Block . netherBrick . blockID , false ) ; } } int j = random . nextInt ( <NUM_LIT:8> ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:0> , <NUM_LIT:5> , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:5> , j , Block . netherBrick . blockID , Block . netherBrick . blockID , false ) ; j = random . nextInt ( <NUM_LIT:8> ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:4> , <NUM_LIT:5> , <NUM_LIT:0> , <NUM_LIT:4> , <NUM_LIT:5> , j , Block . netherBrick . blockID , Block . netherBrick . blockID , false ) ; for ( int k = <NUM_LIT:0> ; k <= <NUM_LIT:4> ; k ++ ) { int j1 = random . nextInt ( <NUM_LIT:5> ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , k , <NUM_LIT:2> , <NUM_LIT:0> , k , <NUM_LIT:2> , j1 , Block . netherBrick . blockID , Block . netherBrick . blockID , false ) ; } for ( int l = <NUM_LIT:0> ; l <= <NUM_LIT:4> ; l ++ ) { for ( int k1 = <NUM_LIT:0> ; k1 <= <NUM_LIT:1> ; k1 ++ ) { int i2 = random . nextInt ( <NUM_LIT:3> ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , l , k1 , <NUM_LIT:0> , l , k1 , i2 , Block . netherBrick . blockID , Block . netherBrick . blockID , false ) ; } } return true ; } } </s>
<s> package net . minecraft . src ; public class EntityAIOpenDoor extends EntityAIDoorInteract { boolean field_48196_i ; int field_48195_j ; public EntityAIOpenDoor ( EntityLiving par1EntityLiving , boolean par2 ) { super ( par1EntityLiving ) ; theEntity = par1EntityLiving ; field_48196_i = par2 ; } public boolean continueExecuting ( ) { return field_48196_i && field_48195_j > <NUM_LIT:0> && super . continueExecuting ( ) ; } public void startExecuting ( ) { field_48195_j = <NUM_LIT:20> ; targetDoor . onPoweredBlockChange ( theEntity . worldObj , entityPosX , entityPosY , entityPosZ , true ) ; } public void resetTask ( ) { if ( field_48196_i ) { targetDoor . onPoweredBlockChange ( theEntity . worldObj , entityPosX , entityPosY , entityPosZ , false ) ; } } public void updateTask ( ) { field_48195_j -- ; super . updateTask ( ) ; } } </s>
<s> package net . minecraft . src ; import java . util . Random ; public class MapGenMineshaft extends MapGenStructure { public MapGenMineshaft ( ) { } protected boolean canSpawnStructureAtCoords ( int par1 , int par2 ) { return rand . nextInt ( <NUM_LIT:100> ) == <NUM_LIT:0> && rand . nextInt ( <NUM_LIT> ) < Math . max ( Math . abs ( par1 ) , Math . abs ( par2 ) ) ; } protected StructureStart getStructureStart ( int par1 , int par2 ) { return new StructureMineshaftStart ( worldObj , rand , par1 , par2 ) ; } } </s>
<s> package net . minecraft . src ; public class BlockLeavesBase extends Block { protected boolean graphicsLevel ; protected BlockLeavesBase ( int par1 , int par2 , Material par3Material , boolean par4 ) { super ( par1 , par2 , par3Material ) ; graphicsLevel = par4 ; } public boolean isOpaqueCube ( ) { return false ; } } </s>
<s> package net . minecraft . src ; public class BlockSandStone extends Block { public BlockSandStone ( int par1 ) { super ( par1 , <NUM_LIT> , Material . rock ) ; } public int getBlockTextureFromSideAndMetadata ( int par1 , int par2 ) { if ( par1 == <NUM_LIT:1> || par1 == <NUM_LIT:0> && ( par2 == <NUM_LIT:1> || par2 == <NUM_LIT:2> ) ) { return <NUM_LIT> ; } if ( par1 == <NUM_LIT:0> ) { return <NUM_LIT> ; } if ( par2 == <NUM_LIT:1> ) { return <NUM_LIT> ; } return par2 != <NUM_LIT:2> ? <NUM_LIT> : <NUM_LIT> ; } public int getBlockTextureFromSide ( int par1 ) { if ( par1 == <NUM_LIT:1> ) { return blockIndexInTexture - <NUM_LIT:16> ; } if ( par1 == <NUM_LIT:0> ) { return blockIndexInTexture + <NUM_LIT:16> ; } else { return blockIndexInTexture ; } } protected int damageDropped ( int par1 ) { return par1 ; } } </s>
<s> package net . minecraft . src ; import java . util . List ; import java . util . Random ; public class ComponentVillageHouse4_Garden extends ComponentVillage { private int averageGroundLevel ; private final boolean isRoofAccessible ; public ComponentVillageHouse4_Garden ( int par1 , Random par2Random , StructureBoundingBox par3StructureBoundingBox , int par4 ) { super ( par1 ) ; averageGroundLevel = - <NUM_LIT:1> ; coordBaseMode = par4 ; boundingBox = par3StructureBoundingBox ; isRoofAccessible = par2Random . nextBoolean ( ) ; } public void buildComponent ( StructureComponent structurecomponent , List list , Random random ) { } public static ComponentVillageHouse4_Garden findValidPlacement ( List par0List , Random par1Random , int par2 , int par3 , int par4 , int par5 , int par6 ) { StructureBoundingBox structureboundingbox = StructureBoundingBox . getComponentToAddBoundingBox ( par2 , par3 , par4 , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:5> , <NUM_LIT:6> , <NUM_LIT:5> , par5 ) ; if ( StructureComponent . findIntersecting ( par0List , structureboundingbox ) != null ) { return null ; } else { return new ComponentVillageHouse4_Garden ( par6 , par1Random , structureboundingbox , par5 ) ; } } public boolean addComponentParts ( World par1World , Random par2Random , StructureBoundingBox par3StructureBoundingBox ) { if ( averageGroundLevel < <NUM_LIT:0> ) { averageGroundLevel = getAverageGroundLevel ( par1World , par3StructureBoundingBox ) ; if ( averageGroundLevel < <NUM_LIT:0> ) { return true ; } boundingBox . offset ( <NUM_LIT:0> , ( ( averageGroundLevel - boundingBox . maxY ) + <NUM_LIT:6> ) - <NUM_LIT:1> , <NUM_LIT:0> ) ; } fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:4> , <NUM_LIT:0> , <NUM_LIT:4> , Block . cobblestone . blockID , Block . cobblestone . blockID , false ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:0> , <NUM_LIT:4> , <NUM_LIT:0> , <NUM_LIT:4> , <NUM_LIT:4> , <NUM_LIT:4> , Block . wood . blockID , Block . wood . blockID , false ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:1> , <NUM_LIT:4> , <NUM_LIT:1> , <NUM_LIT:3> , <NUM_LIT:4> , <NUM_LIT:3> , Block . planks . blockID , Block . planks . blockID , false ) ; placeBlockAtCurrentPosition ( par1World , Block . cobblestone . blockID , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:1> , <NUM_LIT:0> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . cobblestone . blockID , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:2> , <NUM_LIT:0> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . cobblestone . blockID , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:3> , <NUM_LIT:0> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . cobblestone . blockID , <NUM_LIT:0> , <NUM_LIT:4> , <NUM_LIT:1> , <NUM_LIT:0> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . cobblestone . blockID , <NUM_LIT:0> , <NUM_LIT:4> , <NUM_LIT:2> , <NUM_LIT:0> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . cobblestone . blockID , <NUM_LIT:0> , <NUM_LIT:4> , <NUM_LIT:3> , <NUM_LIT:0> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . cobblestone . blockID , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:1> , <NUM_LIT:4> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . cobblestone . blockID , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:2> , <NUM_LIT:4> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . cobblestone . blockID , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:3> , <NUM_LIT:4> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . cobblestone . blockID , <NUM_LIT:0> , <NUM_LIT:4> , <NUM_LIT:1> , <NUM_LIT:4> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . cobblestone . blockID , <NUM_LIT:0> , <NUM_LIT:4> , <NUM_LIT:2> , <NUM_LIT:4> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . cobblestone . blockID , <NUM_LIT:0> , <NUM_LIT:4> , <NUM_LIT:3> , <NUM_LIT:4> , par3StructureBoundingBox ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:0> , <NUM_LIT:1> , <NUM_LIT:1> , <NUM_LIT:0> , <NUM_LIT:3> , <NUM_LIT:3> , Block . planks . blockID , Block . planks . blockID , false ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:4> , <NUM_LIT:1> , <NUM_LIT:1> , <NUM_LIT:4> , <NUM_LIT:3> , <NUM_LIT:3> , Block . planks . blockID , Block . planks . blockID , false ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:1> , <NUM_LIT:1> , <NUM_LIT:4> , <NUM_LIT:3> , <NUM_LIT:3> , <NUM_LIT:4> , Block . planks . blockID , Block . planks . blockID , false ) ; placeBlockAtCurrentPosition ( par1World , Block . thinGlass . blockID , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:2> , <NUM_LIT:2> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . thinGlass . blockID , <NUM_LIT:0> , <NUM_LIT:2> , <NUM_LIT:2> , <NUM_LIT:4> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . thinGlass . blockID , <NUM_LIT:0> , <NUM_LIT:4> , <NUM_LIT:2> , <NUM_LIT:2> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . planks . blockID , <NUM_LIT:0> , <NUM_LIT:1> , <NUM_LIT:1> , <NUM_LIT:0> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . planks . blockID , <NUM_LIT:0> , <NUM_LIT:1> , <NUM_LIT:2> , <NUM_LIT:0> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . planks . blockID , <NUM_LIT:0> , <NUM_LIT:1> , <NUM_LIT:3> , <NUM_LIT:0> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . planks . blockID , <NUM_LIT:0> , <NUM_LIT:2> , <NUM_LIT:3> , <NUM_LIT:0> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . planks . blockID , <NUM_LIT:0> , <NUM_LIT:3> , <NUM_LIT:3> , <NUM_LIT:0> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . planks . blockID , <NUM_LIT:0> , <NUM_LIT:3> , <NUM_LIT:2> , <NUM_LIT:0> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . planks . blockID , <NUM_LIT:0> , <NUM_LIT:3> , <NUM_LIT:1> , <NUM_LIT:0> , par3StructureBoundingBox ) ; if ( getBlockIdAtCurrentPosition ( par1World , <NUM_LIT:2> , <NUM_LIT:0> , - <NUM_LIT:1> , par3StructureBoundingBox ) == <NUM_LIT:0> && getBlockIdAtCurrentPosition ( par1World , <NUM_LIT:2> , - <NUM_LIT:1> , - <NUM_LIT:1> , par3StructureBoundingBox ) != <NUM_LIT:0> ) { placeBlockAtCurrentPosition ( par1World , Block . stairCompactCobblestone . blockID , getMetadataWithOffset ( Block . stairCompactCobblestone . blockID , <NUM_LIT:3> ) , <NUM_LIT:2> , <NUM_LIT:0> , - <NUM_LIT:1> , par3StructureBoundingBox ) ; } fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:1> , <NUM_LIT:1> , <NUM_LIT:1> , <NUM_LIT:3> , <NUM_LIT:3> , <NUM_LIT:3> , <NUM_LIT:0> , <NUM_LIT:0> , false ) ; if ( isRoofAccessible ) { placeBlockAtCurrentPosition ( par1World , Block . fence . blockID , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:5> , <NUM_LIT:0> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . fence . blockID , <NUM_LIT:0> , <NUM_LIT:1> , <NUM_LIT:5> , <NUM_LIT:0> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . fence . blockID , <NUM_LIT:0> , <NUM_LIT:2> , <NUM_LIT:5> , <NUM_LIT:0> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . fence . blockID , <NUM_LIT:0> , <NUM_LIT:3> , <NUM_LIT:5> , <NUM_LIT:0> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . fence . blockID , <NUM_LIT:0> , <NUM_LIT:4> , <NUM_LIT:5> , <NUM_LIT:0> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . fence . blockID , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:5> , <NUM_LIT:4> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . fence . blockID , <NUM_LIT:0> , <NUM_LIT:1> , <NUM_LIT:5> , <NUM_LIT:4> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . fence . blockID , <NUM_LIT:0> , <NUM_LIT:2> , <NUM_LIT:5> , <NUM_LIT:4> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . fence . blockID , <NUM_LIT:0> , <NUM_LIT:3> , <NUM_LIT:5> , <NUM_LIT:4> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . fence . blockID , <NUM_LIT:0> , <NUM_LIT:4> , <NUM_LIT:5> , <NUM_LIT:4> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . fence . blockID , <NUM_LIT:0> , <NUM_LIT:4> , <NUM_LIT:5> , <NUM_LIT:1> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . fence . blockID , <NUM_LIT:0> , <NUM_LIT:4> , <NUM_LIT:5> , <NUM_LIT:2> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . fence . blockID , <NUM_LIT:0> , <NUM_LIT:4> , <NUM_LIT:5> , <NUM_LIT:3> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . fence . blockID , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:5> , <NUM_LIT:1> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . fence . blockID , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:5> , <NUM_LIT:2> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . fence . blockID , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:5> , <NUM_LIT:3> , par3StructureBoundingBox ) ; } if ( isRoofAccessible ) { int i = getMetadataWithOffset ( Block . ladder . blockID , <NUM_LIT:3> ) ; placeBlockAtCurrentPosition ( par1World , Block . ladder . blockID , i , <NUM_LIT:3> , <NUM_LIT:1> , <NUM_LIT:3> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . ladder . blockID , i , <NUM_LIT:3> , <NUM_LIT:2> , <NUM_LIT:3> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . ladder . blockID , i , <NUM_LIT:3> , <NUM_LIT:3> , <NUM_LIT:3> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . ladder . blockID , i , <NUM_LIT:3> , <NUM_LIT:4> , <NUM_LIT:3> , par3StructureBoundingBox ) ; } placeBlockAtCurrentPosition ( par1World , Block . torchWood . blockID , <NUM_LIT:0> , <NUM_LIT:2> , <NUM_LIT:3> , <NUM_LIT:1> , par3StructureBoundingBox ) ; for ( int j = <NUM_LIT:0> ; j < <NUM_LIT:5> ; j ++ ) { for ( int k = <NUM_LIT:0> ; k < <NUM_LIT:5> ; k ++ ) { clearCurrentPositionBlocksUpwards ( par1World , k , <NUM_LIT:6> , j , par3StructureBoundingBox ) ; fillCurrentPositionBlocksDownwards ( par1World , Block . cobblestone . blockID , <NUM_LIT:0> , k , - <NUM_LIT:1> , j , par3StructureBoundingBox ) ; } } spawnVillagers ( par1World , par3StructureBoundingBox , <NUM_LIT:1> , <NUM_LIT:1> , <NUM_LIT:2> , <NUM_LIT:1> ) ; return true ; } } </s>
<s> package net . minecraft . src ; import java . io . DataOutputStream ; import java . io . IOException ; class NetworkWriterThread extends Thread { final NetworkManager netManager ; NetworkWriterThread ( NetworkManager par1NetworkManager , String par2Str ) { super ( par2Str ) ; netManager = par1NetworkManager ; } public void run ( ) { synchronized ( NetworkManager . threadSyncObject ) { NetworkManager . numWriteThreads ++ ; } try { while ( NetworkManager . isRunning ( netManager ) ) { while ( NetworkManager . sendNetworkPacket ( netManager ) ) ; try { if ( NetworkManager . getOutputStream ( netManager ) != null ) { NetworkManager . getOutputStream ( netManager ) . flush ( ) ; } } catch ( IOException ioexception ) { if ( ! NetworkManager . isTerminating ( netManager ) ) { NetworkManager . sendError ( netManager , ioexception ) ; } ioexception . printStackTrace ( ) ; } try { sleep ( <NUM_LIT> ) ; } catch ( InterruptedException interruptedexception ) { } } } finally { synchronized ( NetworkManager . threadSyncObject ) { NetworkManager . numWriteThreads -- ; } } } } </s>
<s> package net . minecraft . src ; public class ItemMinecart extends Item { public int minecartType ; public ItemMinecart ( int par1 , int par2 ) { super ( par1 ) ; maxStackSize = <NUM_LIT:1> ; minecartType = par2 ; } public boolean onItemUse ( ItemStack par1ItemStack , EntityPlayer par2EntityPlayer , World par3World , int par4 , int par5 , int par6 , int par7 ) { int i = par3World . getBlockId ( par4 , par5 , par6 ) ; if ( BlockRail . isRailBlock ( i ) ) { if ( ! par3World . isRemote ) { par3World . spawnEntityInWorld ( new EntityMinecart ( par3World , ( float ) par4 + <NUM_LIT> , ( float ) par5 + <NUM_LIT> , ( float ) par6 + <NUM_LIT> , minecartType ) ) ; } par1ItemStack . stackSize -- ; return true ; } else { return false ; } } } </s>
<s> package net . minecraft . src ; import java . util . List ; import java . util . Random ; public class EntityOcelot extends EntityTameable { private EntityAITempt aiTempt ; public EntityOcelot ( World par1World ) { super ( par1World ) ; texture = "<STR_LIT>" ; setSize ( <NUM_LIT> , <NUM_LIT> ) ; getNavigator ( ) . func_48656_a ( true ) ; tasks . addTask ( <NUM_LIT:1> , new EntityAISwimming ( this ) ) ; tasks . addTask ( <NUM_LIT:2> , aiSit ) ; tasks . addTask ( <NUM_LIT:3> , aiTempt = new EntityAITempt ( this , <NUM_LIT> , Item . fishRaw . shiftedIndex , true ) ) ; tasks . addTask ( <NUM_LIT:4> , new EntityAIAvoidEntity ( this , net . minecraft . src . EntityPlayer . class , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> ) ) ; tasks . addTask ( <NUM_LIT:5> , new EntityAIFollowOwner ( this , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> ) ) ; tasks . addTask ( <NUM_LIT:6> , new EntityAIOcelotSit ( this , <NUM_LIT> ) ) ; tasks . addTask ( <NUM_LIT:7> , new EntityAILeapAtTarget ( this , <NUM_LIT> ) ) ; tasks . addTask ( <NUM_LIT:8> , new EntityAIOcelotAttack ( this ) ) ; tasks . addTask ( <NUM_LIT:9> , new EntityAIMate ( this , <NUM_LIT> ) ) ; tasks . addTask ( <NUM_LIT:10> , new EntityAIWander ( this , <NUM_LIT> ) ) ; tasks . addTask ( <NUM_LIT:11> , new EntityAIWatchClosest ( this , net . minecraft . src . EntityPlayer . class , <NUM_LIT> ) ) ; targetTasks . addTask ( <NUM_LIT:1> , new EntityAITargetNonTamed ( this , net . minecraft . src . EntityChicken . class , <NUM_LIT> , <NUM_LIT> , false ) ) ; } protected void entityInit ( ) { super . entityInit ( ) ; dataWatcher . addObject ( <NUM_LIT> , Byte . valueOf ( ( byte ) <NUM_LIT:0> ) ) ; } public void updateAITick ( ) { if ( ! getMoveHelper ( ) . func_48438_a ( ) ) { setSneaking ( false ) ; setSprinting ( false ) ; } else { float f = getMoveHelper ( ) . getSpeed ( ) ; if ( f == <NUM_LIT> ) { setSneaking ( true ) ; setSprinting ( false ) ; } else if ( f == <NUM_LIT> ) { setSneaking ( false ) ; setSprinting ( true ) ; } else { setSneaking ( false ) ; setSprinting ( false ) ; } } } protected boolean canDespawn ( ) { return ! isTamed ( ) ; } public boolean isAIEnabled ( ) { return true ; } public int getMaxHealth ( ) { return <NUM_LIT:10> ; } protected void fall ( float f ) { } public void writeEntityToNBT ( NBTTagCompound par1NBTTagCompound ) { super . writeEntityToNBT ( par1NBTTagCompound ) ; par1NBTTagCompound . setInteger ( "<STR_LIT>" , func_48375_r ( ) ) ; } public void readEntityFromNBT ( NBTTagCompound par1NBTTagCompound ) { super . readEntityFromNBT ( par1NBTTagCompound ) ; func_48376_c_ ( par1NBTTagCompound . getInteger ( "<STR_LIT>" ) ) ; } protected String getLivingSound ( ) { if ( isTamed ( ) ) { if ( isInLove ( ) ) { return "<STR_LIT>" ; } if ( rand . nextInt ( <NUM_LIT:4> ) == <NUM_LIT:0> ) { return "<STR_LIT>" ; } else { return "<STR_LIT>" ; } } else { return "<STR_LIT>" ; } } protected String getHurtSound ( ) { return "<STR_LIT>" ; } protected String getDeathSound ( ) { return "<STR_LIT>" ; } protected float getSoundVolume ( ) { return <NUM_LIT> ; } protected int getDropItemId ( ) { return Item . leather . shiftedIndex ; } public boolean attackEntityAsMob ( Entity par1Entity ) { return par1Entity . attackEntityFrom ( DamageSource . causeMobDamage ( this ) , <NUM_LIT:3> ) ; } public boolean attackEntityFrom ( DamageSource par1DamageSource , int par2 ) { aiSit . func_48210_a ( false ) ; return super . attackEntityFrom ( par1DamageSource , par2 ) ; } protected void dropFewItems ( boolean flag , int i ) { } public boolean interact ( EntityPlayer par1EntityPlayer ) { ItemStack itemstack = par1EntityPlayer . inventory . getCurrentItem ( ) ; if ( ! isTamed ( ) ) { if ( aiTempt . func_48261_f ( ) && itemstack != null && itemstack . itemID == Item . fishRaw . shiftedIndex && par1EntityPlayer . getDistanceSqToEntity ( this ) < <NUM_LIT> ) { itemstack . stackSize -- ; if ( itemstack . stackSize <= <NUM_LIT:0> ) { par1EntityPlayer . inventory . setInventorySlotContents ( par1EntityPlayer . inventory . currentItem , null ) ; } if ( ! worldObj . isRemote ) { if ( rand . nextInt ( <NUM_LIT:3> ) == <NUM_LIT:0> ) { setTamed ( true ) ; func_48376_c_ ( <NUM_LIT:1> + worldObj . rand . nextInt ( <NUM_LIT:3> ) ) ; setOwner ( par1EntityPlayer . username ) ; func_48370_a ( true ) ; aiSit . func_48210_a ( true ) ; worldObj . setEntityState ( this , ( byte ) <NUM_LIT:7> ) ; } else { func_48370_a ( false ) ; worldObj . setEntityState ( this , ( byte ) <NUM_LIT:6> ) ; } } } return true ; } if ( par1EntityPlayer . username . equalsIgnoreCase ( getOwnerName ( ) ) && ! worldObj . isRemote && ! isWheat ( itemstack ) ) { aiSit . func_48210_a ( ! isSitting ( ) ) ; } return super . interact ( par1EntityPlayer ) ; } public EntityAnimal spawnBabyAnimal ( EntityAnimal par1EntityAnimal ) { EntityOcelot entityocelot = new EntityOcelot ( worldObj ) ; if ( isTamed ( ) ) { entityocelot . setOwner ( getOwnerName ( ) ) ; entityocelot . setTamed ( true ) ; entityocelot . func_48376_c_ ( func_48375_r ( ) ) ; } return entityocelot ; } public boolean isWheat ( ItemStack par1ItemStack ) { return par1ItemStack != null && par1ItemStack . itemID == Item . fishRaw . shiftedIndex ; } public boolean func_48362_b ( EntityAnimal par1EntityAnimal ) { if ( par1EntityAnimal == this ) { return false ; } if ( ! isTamed ( ) ) { return false ; } if ( ! ( par1EntityAnimal instanceof EntityOcelot ) ) { return false ; } EntityOcelot entityocelot = ( EntityOcelot ) par1EntityAnimal ; if ( ! entityocelot . isTamed ( ) ) { return false ; } else { return isInLove ( ) && entityocelot . isInLove ( ) ; } } public int func_48375_r ( ) { return dataWatcher . getWatchableObjectByte ( <NUM_LIT> ) ; } public void func_48376_c_ ( int par1 ) { dataWatcher . updateObject ( <NUM_LIT> , Byte . valueOf ( ( byte ) par1 ) ) ; } public boolean getCanSpawnHere ( ) { if ( worldObj . rand . nextInt ( <NUM_LIT:3> ) == <NUM_LIT:0> ) { return false ; } if ( worldObj . checkIfAABBIsClear ( boundingBox ) && worldObj . getCollidingBoundingBoxes ( this , boundingBox ) . size ( ) == <NUM_LIT:0> && ! worldObj . isAnyLiquid ( boundingBox ) ) { int i = MathHelper . floor_double ( posX ) ; int j = MathHelper . floor_double ( boundingBox . minY ) ; int k = MathHelper . floor_double ( posZ ) ; if ( j < <NUM_LIT> ) { return false ; } int l = worldObj . getBlockId ( i , j - <NUM_LIT:1> , k ) ; if ( l == Block . grass . blockID || l == Block . leaves . blockID ) { return true ; } } return false ; } public String getUsername ( ) { if ( isTamed ( ) ) { return "<STR_LIT>" ; } else { return super . getUsername ( ) ; } } } </s>
<s> package net . minecraft . src ; import java . io . IOException ; import java . net . * ; import java . util . * ; public class RConThreadMain extends RConThreadBase { private int rconPort ; private int serverPort ; private String hostname ; private ServerSocket serverSocket ; private String rconPassword ; private HashMap clientThreads ; public RConThreadMain ( IServer par1IServer ) { super ( par1IServer ) ; serverSocket = null ; rconPort = par1IServer . getIntProperty ( "<STR_LIT>" , <NUM_LIT:0> ) ; rconPassword = par1IServer . getStringProperty ( "<STR_LIT>" , "<STR_LIT>" ) ; hostname = par1IServer . getHostname ( ) ; serverPort = par1IServer . getPort ( ) ; if ( <NUM_LIT:0> == rconPort ) { rconPort = serverPort + <NUM_LIT:10> ; log ( ( new StringBuilder ( ) ) . append ( "<STR_LIT>" ) . append ( rconPort ) . toString ( ) ) ; par1IServer . setProperty ( "<STR_LIT>" , Integer . valueOf ( rconPort ) ) ; if ( <NUM_LIT:0> == rconPassword . length ( ) ) { par1IServer . setProperty ( "<STR_LIT>" , "<STR_LIT>" ) ; } par1IServer . saveProperties ( ) ; } if ( <NUM_LIT:0> == hostname . length ( ) ) { hostname = "<STR_LIT>" ; } initClientTh ( ) ; serverSocket = null ; } private void initClientTh ( ) { clientThreads = new HashMap ( ) ; } private void cleanClientThreadsMap ( ) { Iterator iterator = clientThreads . entrySet ( ) . iterator ( ) ; do { if ( ! iterator . hasNext ( ) ) { break ; } java . util . Map . Entry entry = ( java . util . Map . Entry ) iterator . next ( ) ; if ( ! ( ( RConThreadClient ) entry . getValue ( ) ) . isRunning ( ) ) { iterator . remove ( ) ; } } while ( true ) ; } public void run ( ) { log ( ( new StringBuilder ( ) ) . append ( "<STR_LIT>" ) . append ( hostname ) . append ( "<STR_LIT::>" ) . append ( rconPort ) . toString ( ) ) ; try { do { if ( ! running ) { break ; } try { Socket socket = serverSocket . accept ( ) ; socket . setSoTimeout ( <NUM_LIT> ) ; RConThreadClient rconthreadclient = new RConThreadClient ( server , socket ) ; rconthreadclient . startThread ( ) ; clientThreads . put ( socket . getRemoteSocketAddress ( ) , rconthreadclient ) ; cleanClientThreadsMap ( ) ; } catch ( SocketTimeoutException sockettimeoutexception ) { cleanClientThreadsMap ( ) ; } catch ( IOException ioexception ) { if ( running ) { log ( ( new StringBuilder ( ) ) . append ( "<STR_LIT>" ) . append ( ioexception . getMessage ( ) ) . toString ( ) ) ; } } } while ( true ) ; } finally { closeServerSocket ( serverSocket ) ; } } public void startThread ( ) { if ( <NUM_LIT:0> == rconPassword . length ( ) ) { logWarning ( ( new StringBuilder ( ) ) . append ( "<STR_LIT>" ) . append ( server . getSettingsFilename ( ) ) . append ( "<STR_LIT>" ) . toString ( ) ) ; return ; } if ( <NUM_LIT:0> >= rconPort || <NUM_LIT> < rconPort ) { logWarning ( ( new StringBuilder ( ) ) . append ( "<STR_LIT>" ) . append ( rconPort ) . append ( "<STR_LIT>" ) . append ( server . getSettingsFilename ( ) ) . append ( "<STR_LIT>" ) . toString ( ) ) ; return ; } if ( running ) { return ; } try { serverSocket = new ServerSocket ( rconPort , <NUM_LIT:0> , InetAddress . getByName ( hostname ) ) ; serverSocket . setSoTimeout ( <NUM_LIT> ) ; super . startThread ( ) ; } catch ( IOException ioexception ) { logWarning ( ( new StringBuilder ( ) ) . append ( "<STR_LIT>" ) . append ( hostname ) . append ( "<STR_LIT::>" ) . append ( rconPort ) . append ( "<STR_LIT:U+0020:U+0020>" ) . append ( ioexception . getMessage ( ) ) . toString ( ) ) ; } } } </s>
<s> package net . minecraft . src ; import java . util . Random ; public class EntityAIAttackOnCollide extends EntityAIBase { World worldObj ; EntityLiving field_48156_b ; EntityLiving entityTarget ; int field_46095_d ; float field_48155_e ; boolean field_48153_f ; PathEntity field_48154_g ; Class field_48157_h ; private int field_48158_i ; public EntityAIAttackOnCollide ( EntityLiving par1EntityLiving , Class par2Class , float par3 , boolean par4 ) { this ( par1EntityLiving , par3 , par4 ) ; field_48157_h = par2Class ; } public EntityAIAttackOnCollide ( EntityLiving par1EntityLiving , float par2 , boolean par3 ) { field_46095_d = <NUM_LIT:0> ; field_48156_b = par1EntityLiving ; worldObj = par1EntityLiving . worldObj ; field_48155_e = par2 ; field_48153_f = par3 ; setMutexBits ( <NUM_LIT:3> ) ; } public boolean shouldExecute ( ) { EntityLiving entityliving = field_48156_b . getAttackTarget ( ) ; if ( entityliving == null ) { return false ; } if ( field_48157_h != null && ! field_48157_h . isAssignableFrom ( entityliving . getClass ( ) ) ) { return false ; } else { entityTarget = entityliving ; field_48154_g = field_48156_b . getNavigator ( ) . func_48661_a ( entityTarget ) ; return field_48154_g != null ; } } public boolean continueExecuting ( ) { EntityLiving entityliving = field_48156_b . getAttackTarget ( ) ; if ( entityliving == null ) { return false ; } if ( ! entityTarget . isEntityAlive ( ) ) { return false ; } if ( ! field_48153_f ) { return ! field_48156_b . getNavigator ( ) . noPath ( ) ; } return field_48156_b . isWithinHomeDistance ( MathHelper . floor_double ( entityTarget . posX ) , MathHelper . floor_double ( entityTarget . posY ) , MathHelper . floor_double ( entityTarget . posZ ) ) ; } public void startExecuting ( ) { field_48156_b . getNavigator ( ) . setPath ( field_48154_g , field_48155_e ) ; field_48158_i = <NUM_LIT:0> ; } public void resetTask ( ) { entityTarget = null ; field_48156_b . getNavigator ( ) . clearPathEntity ( ) ; } public void updateTask ( ) { field_48156_b . getLookHelper ( ) . setLookPositionWithEntity ( entityTarget , <NUM_LIT> , <NUM_LIT> ) ; if ( ( field_48153_f || field_48156_b . func_48318_al ( ) . canSee ( entityTarget ) ) && -- field_48158_i <= <NUM_LIT:0> ) { field_48158_i = <NUM_LIT:4> + field_48156_b . getRNG ( ) . nextInt ( <NUM_LIT:7> ) ; field_48156_b . getNavigator ( ) . func_48652_a ( entityTarget , field_48155_e ) ; } field_46095_d = Math . max ( field_46095_d - <NUM_LIT:1> , <NUM_LIT:0> ) ; double d = field_48156_b . width * <NUM_LIT> * ( field_48156_b . width * <NUM_LIT> ) ; if ( field_48156_b . getDistanceSq ( entityTarget . posX , entityTarget . boundingBox . minY , entityTarget . posZ ) > d ) { return ; } if ( field_46095_d > <NUM_LIT:0> ) { return ; } else { field_46095_d = <NUM_LIT:20> ; field_48156_b . attackEntityAsMob ( entityTarget ) ; return ; } } } </s>
<s> package net . minecraft . src ; import java . io . * ; public abstract class NBTBase { private String name ; abstract void write ( DataOutput dataoutput ) throws IOException ; abstract void load ( DataInput datainput ) throws IOException ; public abstract byte getId ( ) ; protected NBTBase ( String par1Str ) { if ( par1Str == null ) { name = "<STR_LIT>" ; } else { name = par1Str ; } } public NBTBase setName ( String par1Str ) { if ( par1Str == null ) { name = "<STR_LIT>" ; } else { name = par1Str ; } return this ; } public String getName ( ) { if ( name == null ) { return "<STR_LIT>" ; } else { return name ; } } public static NBTBase readNamedTag ( DataInput par0DataInput ) throws IOException { byte byte0 = par0DataInput . readByte ( ) ; if ( byte0 == <NUM_LIT:0> ) { return new NBTTagEnd ( ) ; } else { String s = par0DataInput . readUTF ( ) ; NBTBase nbtbase = newTag ( byte0 , s ) ; nbtbase . load ( par0DataInput ) ; return nbtbase ; } } public static void writeNamedTag ( NBTBase par0NBTBase , DataOutput par1DataOutput ) throws IOException { par1DataOutput . writeByte ( par0NBTBase . getId ( ) ) ; if ( par0NBTBase . getId ( ) == <NUM_LIT:0> ) { return ; } else { par1DataOutput . writeUTF ( par0NBTBase . getName ( ) ) ; par0NBTBase . write ( par1DataOutput ) ; return ; } } public static NBTBase newTag ( byte par0 , String par1Str ) { switch ( par0 ) { case <NUM_LIT:0> : return new NBTTagEnd ( ) ; case <NUM_LIT:1> : return new NBTTagByte ( par1Str ) ; case <NUM_LIT:2> : return new NBTTagShort ( par1Str ) ; case <NUM_LIT:3> : return new NBTTagInt ( par1Str ) ; case <NUM_LIT:4> : return new NBTTagLong ( par1Str ) ; case <NUM_LIT:5> : return new NBTTagFloat ( par1Str ) ; case <NUM_LIT:6> : return new NBTTagDouble ( par1Str ) ; case <NUM_LIT:7> : return new NBTTagByteArray ( par1Str ) ; case <NUM_LIT:11> : return new NBTTagIntArray ( par1Str ) ; case <NUM_LIT:8> : return new NBTTagString ( par1Str ) ; case <NUM_LIT:9> : return new NBTTagList ( par1Str ) ; case <NUM_LIT:10> : return new NBTTagCompound ( par1Str ) ; } return null ; } public static String getTagName ( byte par0 ) { switch ( par0 ) { case <NUM_LIT:0> : return "<STR_LIT>" ; case <NUM_LIT:1> : return "<STR_LIT>" ; case <NUM_LIT:2> : return "<STR_LIT>" ; case <NUM_LIT:3> : return "<STR_LIT>" ; case <NUM_LIT:4> : return "<STR_LIT>" ; case <NUM_LIT:5> : return "<STR_LIT>" ; case <NUM_LIT:6> : return "<STR_LIT>" ; case <NUM_LIT:7> : return "<STR_LIT>" ; case <NUM_LIT:11> : return "<STR_LIT>" ; case <NUM_LIT:8> : return "<STR_LIT>" ; case <NUM_LIT:9> : return "<STR_LIT>" ; case <NUM_LIT:10> : return "<STR_LIT>" ; } return "<STR_LIT>" ; } public abstract NBTBase copy ( ) ; public boolean equals ( Object par1Obj ) { if ( par1Obj == null || ! ( par1Obj instanceof NBTBase ) ) { return false ; } NBTBase nbtbase = ( NBTBase ) par1Obj ; if ( getId ( ) != nbtbase . getId ( ) ) { return false ; } if ( name == null && nbtbase . name != null || name != null && nbtbase . name == null ) { return false ; } return name == null || name . equals ( nbtbase . name ) ; } public int hashCode ( ) { return name . hashCode ( ) ^ getId ( ) ; } } </s>
<s> package net . minecraft . src ; import java . io . * ; public class NBTTagLong extends NBTBase { public long data ; public NBTTagLong ( String par1Str ) { super ( par1Str ) ; } public NBTTagLong ( String par1Str , long par2 ) { super ( par1Str ) ; data = par2 ; } void write ( DataOutput par1DataOutput ) throws IOException { par1DataOutput . writeLong ( data ) ; } void load ( DataInput par1DataInput ) throws IOException { data = par1DataInput . readLong ( ) ; } public byte getId ( ) { return <NUM_LIT:4> ; } public String toString ( ) { return ( new StringBuilder ( ) ) . append ( "<STR_LIT>" ) . append ( data ) . toString ( ) ; } public NBTBase copy ( ) { return new NBTTagLong ( getName ( ) , data ) ; } public boolean equals ( Object par1Obj ) { if ( super . equals ( par1Obj ) ) { NBTTagLong nbttaglong = ( NBTTagLong ) par1Obj ; return data == nbttaglong . data ; } else { return false ; } } public int hashCode ( ) { return super . hashCode ( ) ^ ( int ) ( data ^ data > > > <NUM_LIT:32> ) ; } } </s>
<s> package net . minecraft . src ; final class StatTypeTime implements IStatType { StatTypeTime ( ) { } } </s>
<s> package net . minecraft . src ; import java . io . * ; public class Packet50PreChunk extends Packet { public int xPosition ; public int yPosition ; public boolean mode ; public Packet50PreChunk ( ) { isChunkDataPacket = false ; } public Packet50PreChunk ( int par1 , int par2 , boolean par3 ) { isChunkDataPacket = false ; xPosition = par1 ; yPosition = par2 ; mode = par3 ; } public void readPacketData ( DataInputStream par1DataInputStream ) throws IOException { xPosition = par1DataInputStream . readInt ( ) ; yPosition = par1DataInputStream . readInt ( ) ; mode = par1DataInputStream . read ( ) != <NUM_LIT:0> ; } public void writePacketData ( DataOutputStream par1DataOutputStream ) throws IOException { par1DataOutputStream . writeInt ( xPosition ) ; par1DataOutputStream . writeInt ( yPosition ) ; par1DataOutputStream . write ( mode ? <NUM_LIT:1> : <NUM_LIT:0> ) ; } public void processPacket ( NetHandler par1NetHandler ) { par1NetHandler . handlePreChunk ( this ) ; } public int getPacketSize ( ) { return <NUM_LIT:9> ; } } </s>
<s> package net . minecraft . src ; public class EntityAIOwnerHurtTarget extends EntityAITarget { EntityTameable field_48304_a ; EntityLiving field_48303_b ; public EntityAIOwnerHurtTarget ( EntityTameable par1EntityTameable ) { super ( par1EntityTameable , <NUM_LIT> , false ) ; field_48304_a = par1EntityTameable ; setMutexBits ( <NUM_LIT:1> ) ; } public boolean shouldExecute ( ) { if ( ! field_48304_a . isTamed ( ) ) { return false ; } EntityLiving entityliving = field_48304_a . getOwner ( ) ; if ( entityliving == null ) { return false ; } else { field_48303_b = entityliving . getLastAttackingEntity ( ) ; return func_48284_a ( field_48303_b , false ) ; } } public void startExecuting ( ) { taskOwner . setAttackTarget ( field_48303_b ) ; super . startExecuting ( ) ; } } </s>
<s> package net . minecraft . src ; import java . util . List ; public class InventoryBasic implements IInventory { private String inventoryTitle ; private int slotsCount ; private ItemStack inventoryContents [ ] ; private List field_40084_d ; public InventoryBasic ( String par1Str , int par2 ) { inventoryTitle = par1Str ; slotsCount = par2 ; inventoryContents = new ItemStack [ par2 ] ; } public ItemStack getStackInSlot ( int par1 ) { return inventoryContents [ par1 ] ; } public ItemStack decrStackSize ( int par1 , int par2 ) { if ( inventoryContents [ par1 ] != null ) { if ( inventoryContents [ par1 ] . stackSize <= par2 ) { ItemStack itemstack = inventoryContents [ par1 ] ; inventoryContents [ par1 ] = null ; onInventoryChanged ( ) ; return itemstack ; } ItemStack itemstack1 = inventoryContents [ par1 ] . splitStack ( par2 ) ; if ( inventoryContents [ par1 ] . stackSize == <NUM_LIT:0> ) { inventoryContents [ par1 ] = null ; } onInventoryChanged ( ) ; return itemstack1 ; } else { return null ; } } public ItemStack getStackInSlotOnClosing ( int par1 ) { if ( inventoryContents [ par1 ] != null ) { ItemStack itemstack = inventoryContents [ par1 ] ; inventoryContents [ par1 ] = null ; return itemstack ; } else { return null ; } } public void setInventorySlotContents ( int par1 , ItemStack par2ItemStack ) { inventoryContents [ par1 ] = par2ItemStack ; if ( par2ItemStack != null && par2ItemStack . stackSize > getInventoryStackLimit ( ) ) { par2ItemStack . stackSize = getInventoryStackLimit ( ) ; } onInventoryChanged ( ) ; } public int getSizeInventory ( ) { return slotsCount ; } public String getInvName ( ) { return inventoryTitle ; } public int getInventoryStackLimit ( ) { return <NUM_LIT> ; } public void onInventoryChanged ( ) { if ( field_40084_d != null ) { for ( int i = <NUM_LIT:0> ; i < field_40084_d . size ( ) ; i ++ ) { ( ( IInvBasic ) field_40084_d . get ( i ) ) . onInventoryChanged ( this ) ; } } } public boolean isUseableByPlayer ( EntityPlayer par1EntityPlayer ) { return true ; } public void openChest ( ) { } public void closeChest ( ) { } } </s>
<s> package net . minecraft . src ; public class MovingObjectPosition { public EnumMovingObjectType typeOfHit ; public int blockX ; public int blockY ; public int blockZ ; public int sideHit ; public Vec3D hitVec ; public Entity entityHit ; public MovingObjectPosition ( int par1 , int par2 , int par3 , int par4 , Vec3D par5Vec3D ) { typeOfHit = EnumMovingObjectType . TILE ; blockX = par1 ; blockY = par2 ; blockZ = par3 ; sideHit = par4 ; hitVec = Vec3D . createVector ( par5Vec3D . xCoord , par5Vec3D . yCoord , par5Vec3D . zCoord ) ; } public MovingObjectPosition ( Entity par1Entity ) { typeOfHit = EnumMovingObjectType . ENTITY ; entityHit = par1Entity ; hitVec = Vec3D . createVector ( par1Entity . posX , par1Entity . posY , par1Entity . posZ ) ; } } </s>
<s> package net . minecraft . src ; import java . util . List ; public class ContainerPlayer extends Container { public InventoryCrafting craftMatrix ; public IInventory craftResult ; public boolean isLocalWorld ; public ContainerPlayer ( InventoryPlayer par1InventoryPlayer ) { this ( par1InventoryPlayer , true ) ; } public ContainerPlayer ( InventoryPlayer par1InventoryPlayer , boolean par2 ) { craftMatrix = new InventoryCrafting ( this , <NUM_LIT:2> , <NUM_LIT:2> ) ; craftResult = new InventoryCraftResult ( ) ; isLocalWorld = false ; isLocalWorld = par2 ; addSlot ( new SlotCrafting ( par1InventoryPlayer . player , craftMatrix , craftResult , <NUM_LIT:0> , <NUM_LIT> , <NUM_LIT> ) ) ; for ( int i = <NUM_LIT:0> ; i < <NUM_LIT:2> ; i ++ ) { for ( int i1 = <NUM_LIT:0> ; i1 < <NUM_LIT:2> ; i1 ++ ) { addSlot ( new Slot ( craftMatrix , i1 + i * <NUM_LIT:2> , <NUM_LIT> + i1 * <NUM_LIT> , <NUM_LIT> + i * <NUM_LIT> ) ) ; } } for ( int j = <NUM_LIT:0> ; j < <NUM_LIT:4> ; j ++ ) { int j1 = j ; addSlot ( new SlotArmor ( this , par1InventoryPlayer , par1InventoryPlayer . getSizeInventory ( ) - <NUM_LIT:1> - j , <NUM_LIT:8> , <NUM_LIT:8> + j * <NUM_LIT> , j1 ) ) ; } for ( int k = <NUM_LIT:0> ; k < <NUM_LIT:3> ; k ++ ) { for ( int k1 = <NUM_LIT:0> ; k1 < <NUM_LIT:9> ; k1 ++ ) { addSlot ( new Slot ( par1InventoryPlayer , k1 + ( k + <NUM_LIT:1> ) * <NUM_LIT:9> , <NUM_LIT:8> + k1 * <NUM_LIT> , <NUM_LIT> + k * <NUM_LIT> ) ) ; } } for ( int l = <NUM_LIT:0> ; l < <NUM_LIT:9> ; l ++ ) { addSlot ( new Slot ( par1InventoryPlayer , l , <NUM_LIT:8> + l * <NUM_LIT> , <NUM_LIT> ) ) ; } onCraftMatrixChanged ( craftMatrix ) ; } public void onCraftMatrixChanged ( IInventory par1IInventory ) { craftResult . setInventorySlotContents ( <NUM_LIT:0> , CraftingManager . getInstance ( ) . findMatchingRecipe ( craftMatrix ) ) ; } public void onCraftGuiClosed ( EntityPlayer par1EntityPlayer ) { super . onCraftGuiClosed ( par1EntityPlayer ) ; for ( int i = <NUM_LIT:0> ; i < <NUM_LIT:4> ; i ++ ) { ItemStack itemstack = craftMatrix . getStackInSlotOnClosing ( i ) ; if ( itemstack != null ) { par1EntityPlayer . dropPlayerItem ( itemstack ) ; } } craftResult . setInventorySlotContents ( <NUM_LIT:0> , null ) ; } public boolean canInteractWith ( EntityPlayer par1EntityPlayer ) { return true ; } public ItemStack transferStackInSlot ( int par1 ) { ItemStack itemstack = null ; Slot slot = ( Slot ) inventorySlots . get ( par1 ) ; if ( slot != null && slot . getHasStack ( ) ) { ItemStack itemstack1 = slot . getStack ( ) ; itemstack = itemstack1 . copy ( ) ; if ( par1 == <NUM_LIT:0> ) { if ( ! mergeItemStack ( itemstack1 , <NUM_LIT:9> , <NUM_LIT> , true ) ) { return null ; } slot . func_48417_a ( itemstack1 , itemstack ) ; } else if ( par1 >= <NUM_LIT:9> && par1 < <NUM_LIT> ) { if ( ! mergeItemStack ( itemstack1 , <NUM_LIT> , <NUM_LIT> , false ) ) { return null ; } } else if ( par1 >= <NUM_LIT> && par1 < <NUM_LIT> ) { if ( ! mergeItemStack ( itemstack1 , <NUM_LIT:9> , <NUM_LIT> , false ) ) { return null ; } } else if ( ! mergeItemStack ( itemstack1 , <NUM_LIT:9> , <NUM_LIT> , false ) ) { return null ; } if ( itemstack1 . stackSize == <NUM_LIT:0> ) { slot . putStack ( null ) ; } else { slot . onSlotChanged ( ) ; } if ( itemstack1 . stackSize != itemstack . stackSize ) { slot . onPickupFromSlot ( itemstack1 ) ; } else { return null ; } } return itemstack ; } } </s>
<s> package net . minecraft . src ; import java . util . Random ; public class MapGenRavine extends MapGenBase { private float field_35540_a [ ] ; public MapGenRavine ( ) { field_35540_a = new float [ <NUM_LIT> ] ; } protected void generateRavine ( long par1 , int par3 , int par4 , byte par5ArrayOfByte [ ] , double par6 , double par8 , double par10 , float par12 , float par13 , float par14 , int par15 , int par16 , double par17 ) { Random random = new Random ( par1 ) ; double d = par3 * <NUM_LIT:16> + <NUM_LIT:8> ; double d1 = par4 * <NUM_LIT:16> + <NUM_LIT:8> ; float f = <NUM_LIT> ; float f1 = <NUM_LIT> ; if ( par16 <= <NUM_LIT:0> ) { int i = range * <NUM_LIT:16> - <NUM_LIT:16> ; par16 = i - random . nextInt ( i / <NUM_LIT:4> ) ; } boolean flag = false ; if ( par15 == - <NUM_LIT:1> ) { par15 = par16 / <NUM_LIT:2> ; flag = true ; } float f2 = <NUM_LIT> ; for ( int j = <NUM_LIT:0> ; j < <NUM_LIT> ; j ++ ) { if ( j == <NUM_LIT:0> || random . nextInt ( <NUM_LIT:3> ) == <NUM_LIT:0> ) { f2 = <NUM_LIT> + random . nextFloat ( ) * random . nextFloat ( ) * <NUM_LIT> ; } field_35540_a [ j ] = f2 * f2 ; } for ( ; par15 < par16 ; par15 ++ ) { double d2 = <NUM_LIT> + ( double ) ( MathHelper . sin ( ( ( float ) par15 * ( float ) Math . PI ) / ( float ) par16 ) * par12 * <NUM_LIT> ) ; double d3 = d2 * par17 ; d2 *= ( double ) random . nextFloat ( ) * <NUM_LIT> + <NUM_LIT> ; d3 *= ( double ) random . nextFloat ( ) * <NUM_LIT> + <NUM_LIT> ; float f3 = MathHelper . cos ( par14 ) ; float f4 = MathHelper . sin ( par14 ) ; par6 += MathHelper . cos ( par13 ) * f3 ; par8 += f4 ; par10 += MathHelper . sin ( par13 ) * f3 ; par14 *= <NUM_LIT> ; par14 += f1 * <NUM_LIT> ; par13 += f * <NUM_LIT> ; f1 *= <NUM_LIT> ; f *= <NUM_LIT> ; f1 += ( random . nextFloat ( ) - random . nextFloat ( ) ) * random . nextFloat ( ) * <NUM_LIT> ; f += ( random . nextFloat ( ) - random . nextFloat ( ) ) * random . nextFloat ( ) * <NUM_LIT> ; if ( ! flag && random . nextInt ( <NUM_LIT:4> ) == <NUM_LIT:0> ) { continue ; } double d4 = par6 - d ; double d5 = par10 - d1 ; double d6 = par16 - par15 ; double d7 = par12 + <NUM_LIT> + <NUM_LIT> ; if ( ( d4 * d4 + d5 * d5 ) - d6 * d6 > d7 * d7 ) { return ; } if ( par6 < d - <NUM_LIT> - d2 * <NUM_LIT> || par10 < d1 - <NUM_LIT> - d2 * <NUM_LIT> || par6 > d + <NUM_LIT> + d2 * <NUM_LIT> || par10 > d1 + <NUM_LIT> + d2 * <NUM_LIT> ) { continue ; } d4 = MathHelper . floor_double ( par6 - d2 ) - par3 * <NUM_LIT:16> - <NUM_LIT:1> ; int k = ( MathHelper . floor_double ( par6 + d2 ) - par3 * <NUM_LIT:16> ) + <NUM_LIT:1> ; d5 = MathHelper . floor_double ( par8 - d3 ) - <NUM_LIT:1> ; int l = MathHelper . floor_double ( par8 + d3 ) + <NUM_LIT:1> ; d6 = MathHelper . floor_double ( par10 - d2 ) - par4 * <NUM_LIT:16> - <NUM_LIT:1> ; int i1 = ( MathHelper . floor_double ( par10 + d2 ) - par4 * <NUM_LIT:16> ) + <NUM_LIT:1> ; if ( d4 < <NUM_LIT:0> ) { d4 = <NUM_LIT:0> ; } if ( k > <NUM_LIT:16> ) { k = <NUM_LIT:16> ; } if ( d5 < <NUM_LIT:1> ) { d5 = <NUM_LIT:1> ; } if ( l > <NUM_LIT> ) { l = <NUM_LIT> ; } if ( d6 < <NUM_LIT:0> ) { d6 = <NUM_LIT:0> ; } if ( i1 > <NUM_LIT:16> ) { i1 = <NUM_LIT:16> ; } boolean flag1 = false ; for ( int j1 = ( int ) d4 ; ! flag1 && j1 < k ; j1 ++ ) { for ( int l1 = ( int ) d6 ; ! flag1 && l1 < i1 ; l1 ++ ) { for ( int i2 = l + <NUM_LIT:1> ; ! flag1 && i2 >= d5 - <NUM_LIT:1> ; i2 -- ) { int j2 = ( j1 * <NUM_LIT:16> + l1 ) * <NUM_LIT> + i2 ; if ( i2 < <NUM_LIT:0> || i2 >= <NUM_LIT> ) { continue ; } if ( par5ArrayOfByte [ j2 ] == Block . waterMoving . blockID || par5ArrayOfByte [ j2 ] == Block . waterStill . blockID ) { flag1 = true ; } if ( i2 != d5 - <NUM_LIT:1> && j1 != d4 && j1 != k - <NUM_LIT:1> && l1 != d6 && l1 != i1 - <NUM_LIT:1> ) { i2 = ( int ) d5 ; } } } } if ( flag1 ) { continue ; } for ( int k1 = ( int ) d4 ; k1 < k ; k1 ++ ) { double d8 = ( ( ( double ) ( k1 + par3 * <NUM_LIT:16> ) + <NUM_LIT> ) - par6 ) / d2 ; label0 : for ( int k2 = ( int ) d6 ; k2 < i1 ; k2 ++ ) { double d9 = ( ( ( double ) ( k2 + par4 * <NUM_LIT:16> ) + <NUM_LIT> ) - par10 ) / d2 ; int l2 = ( k1 * <NUM_LIT:16> + k2 ) * <NUM_LIT> + l ; boolean flag2 = false ; if ( d8 * d8 + d9 * d9 >= <NUM_LIT> ) { continue ; } int i3 = l - <NUM_LIT:1> ; do { if ( i3 < d5 ) { continue label0 ; } double d10 = ( ( ( double ) i3 + <NUM_LIT> ) - par8 ) / d3 ; if ( ( d8 * d8 + d9 * d9 ) * ( double ) field_35540_a [ i3 ] + ( d10 * d10 ) / <NUM_LIT> < <NUM_LIT> ) { byte byte0 = par5ArrayOfByte [ l2 ] ; if ( byte0 == Block . grass . blockID ) { flag2 = true ; } if ( byte0 == Block . stone . blockID || byte0 == Block . dirt . blockID || byte0 == Block . grass . blockID ) { if ( i3 < <NUM_LIT:10> ) { par5ArrayOfByte [ l2 ] = ( byte ) Block . lavaMoving . blockID ; } else { par5ArrayOfByte [ l2 ] = <NUM_LIT:0> ; if ( flag2 && par5ArrayOfByte [ l2 - <NUM_LIT:1> ] == Block . dirt . blockID ) { par5ArrayOfByte [ l2 - <NUM_LIT:1> ] = worldObj . getBiomeGenForCoords ( k1 + par3 * <NUM_LIT:16> , k2 + par4 * <NUM_LIT:16> ) . topBlock ; } } } } l2 -- ; i3 -- ; } while ( true ) ; } } if ( flag ) { break ; } } } protected void recursiveGenerate ( World par1World , int par2 , int par3 , int par4 , int par5 , byte par6ArrayOfByte [ ] ) { if ( rand . nextInt ( <NUM_LIT> ) != <NUM_LIT:0> ) { return ; } double d = par2 * <NUM_LIT:16> + rand . nextInt ( <NUM_LIT:16> ) ; double d1 = rand . nextInt ( rand . nextInt ( <NUM_LIT> ) + <NUM_LIT:8> ) + <NUM_LIT:20> ; double d2 = par3 * <NUM_LIT:16> + rand . nextInt ( <NUM_LIT:16> ) ; int i = <NUM_LIT:1> ; for ( int j = <NUM_LIT:0> ; j < i ; j ++ ) { float f = rand . nextFloat ( ) * ( float ) Math . PI * <NUM_LIT> ; float f1 = ( ( rand . nextFloat ( ) - <NUM_LIT> ) * <NUM_LIT> ) / <NUM_LIT> ; float f2 = ( rand . nextFloat ( ) * <NUM_LIT> + rand . nextFloat ( ) ) * <NUM_LIT> ; generateRavine ( rand . nextLong ( ) , par4 , par5 , par6ArrayOfByte , d , d1 , d2 , f2 , f , f1 , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT> ) ; } } } </s>
<s> package net . minecraft . src ; public class RecipesArmor { private String recipePatterns [ ] [ ] = { { "<STR_LIT>" , "<STR_LIT>" } , { "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" } , { "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" } , { "<STR_LIT>" , "<STR_LIT>" } } ; private Object recipeItems [ ] [ ] ; public RecipesArmor ( ) { recipeItems = ( new Object [ ] [ ] { new Object [ ] { Item . leather , Block . fire , Item . ingotIron , Item . diamond , Item . ingotGold } , new Object [ ] { Item . helmetLeather , Item . helmetChain , Item . helmetSteel , Item . helmetDiamond , Item . helmetGold } , new Object [ ] { Item . plateLeather , Item . plateChain , Item . plateSteel , Item . plateDiamond , Item . plateGold } , new Object [ ] { Item . legsLeather , Item . legsChain , Item . legsSteel , Item . legsDiamond , Item . legsGold } , new Object [ ] { Item . bootsLeather , Item . bootsChain , Item . bootsSteel , Item . bootsDiamond , Item . bootsGold } } ) ; } public void addRecipes ( CraftingManager par1CraftingManager ) { for ( int i = <NUM_LIT:0> ; i < recipeItems [ <NUM_LIT:0> ] . length ; i ++ ) { Object obj = recipeItems [ <NUM_LIT:0> ] [ i ] ; for ( int j = <NUM_LIT:0> ; j < recipeItems . length - <NUM_LIT:1> ; j ++ ) { Item item = ( Item ) recipeItems [ j + <NUM_LIT:1> ] [ i ] ; par1CraftingManager . addRecipe ( new ItemStack ( item ) , new Object [ ] { recipePatterns [ j ] , '<CHAR_LIT>' , obj } ) ; } } } } </s>
<s> package net . minecraft . src ; public class ItemAxe extends ItemTool { private static Block blocksEffectiveAgainst [ ] ; protected ItemAxe ( int par1 , EnumToolMaterial par2EnumToolMaterial ) { super ( par1 , <NUM_LIT:3> , par2EnumToolMaterial , blocksEffectiveAgainst ) ; } public float getStrVsBlock ( ItemStack par1ItemStack , Block par2Block ) { if ( par2Block != null && par2Block . blockMaterial == Material . wood ) { return efficiencyOnProperMaterial ; } else { return super . getStrVsBlock ( par1ItemStack , par2Block ) ; } } static { blocksEffectiveAgainst = ( new Block [ ] { Block . planks , Block . bookShelf , Block . wood , Block . chest , Block . stairDouble , Block . stairSingle , Block . pumpkin , Block . pumpkinLantern } ) ; } } </s>
<s> package net . minecraft . src ; import java . util . * ; import net . minecraft . server . MinecraftServer ; public class EntityPlayerMP extends EntityPlayer implements ICrafting { public NetServerHandler playerNetServerHandler ; public MinecraftServer mcServer ; public ItemInWorldManager itemInWorldManager ; public double managedPosX ; public double managedPosZ ; public List loadedChunks ; public Set listeningChunks ; private int lastHealth ; private int field_35221_cc ; private boolean field_35222_cd ; private int lastExperience ; private int ticksOfInvuln ; private ItemStack playerInventory [ ] = { null , null , null , null , null } ; private int currentWindowId ; public boolean isChangingQuantityOnly ; public int ping ; public boolean gameOver ; public EntityPlayerMP ( MinecraftServer par1MinecraftServer , World par2World , String par3Str , ItemInWorldManager par4ItemInWorldManager ) { super ( par2World ) ; loadedChunks = new LinkedList ( ) ; listeningChunks = new HashSet ( ) ; lastHealth = <NUM_LIT> ; field_35221_cc = <NUM_LIT> ; field_35222_cd = true ; lastExperience = <NUM_LIT> ; ticksOfInvuln = <NUM_LIT> ; currentWindowId = <NUM_LIT:0> ; gameOver = false ; par4ItemInWorldManager . thisPlayer = this ; itemInWorldManager = par4ItemInWorldManager ; ChunkCoordinates chunkcoordinates = par2World . getSpawnPoint ( ) ; int i = chunkcoordinates . posX ; int j = chunkcoordinates . posZ ; int k = chunkcoordinates . posY ; if ( ! par2World . worldProvider . hasNoSky ) { i += rand . nextInt ( <NUM_LIT:20> ) - <NUM_LIT:10> ; k = par2World . getTopSolidOrLiquidBlock ( i , j ) ; j += rand . nextInt ( <NUM_LIT:20> ) - <NUM_LIT:10> ; } setLocationAndAngles ( ( double ) i + <NUM_LIT> , k , ( double ) j + <NUM_LIT> , <NUM_LIT> , <NUM_LIT> ) ; mcServer = par1MinecraftServer ; stepHeight = <NUM_LIT> ; username = par3Str ; yOffset = <NUM_LIT> ; } public void readEntityFromNBT ( NBTTagCompound par1NBTTagCompound ) { super . readEntityFromNBT ( par1NBTTagCompound ) ; if ( par1NBTTagCompound . hasKey ( "<STR_LIT>" ) ) { itemInWorldManager . toggleGameType ( par1NBTTagCompound . getInteger ( "<STR_LIT>" ) ) ; } } public void writeEntityToNBT ( NBTTagCompound par1NBTTagCompound ) { super . writeEntityToNBT ( par1NBTTagCompound ) ; par1NBTTagCompound . setInteger ( "<STR_LIT>" , itemInWorldManager . getGameType ( ) ) ; } public void setWorld ( World par1World ) { super . setWorld ( par1World ) ; } public void removeExperience ( int par1 ) { super . removeExperience ( par1 ) ; lastExperience = - <NUM_LIT:1> ; } public void func_20057_k ( ) { craftingInventory . onCraftGuiOpened ( this ) ; } public ItemStack [ ] getInventory ( ) { return playerInventory ; } protected void resetHeight ( ) { yOffset = <NUM_LIT> ; } public float getEyeHeight ( ) { return <NUM_LIT> ; } public void onUpdate ( ) { itemInWorldManager . updateBlockRemoving ( ) ; ticksOfInvuln -- ; craftingInventory . updateCraftingResults ( ) ; for ( int i = <NUM_LIT:0> ; i < <NUM_LIT:5> ; i ++ ) { ItemStack itemstack = getEquipmentInSlot ( i ) ; if ( itemstack != playerInventory [ i ] ) { mcServer . getEntityTracker ( dimension ) . sendPacketToTrackedPlayers ( this , new Packet5PlayerInventory ( entityId , i , itemstack ) ) ; playerInventory [ i ] = itemstack ; } } } public ItemStack getEquipmentInSlot ( int par1 ) { if ( par1 == <NUM_LIT:0> ) { return inventory . getCurrentItem ( ) ; } else { return inventory . armorInventory [ par1 - <NUM_LIT:1> ] ; } } public void onDeath ( DamageSource par1DamageSource ) { mcServer . configManager . sendPacketToAllPlayers ( new Packet3Chat ( par1DamageSource . getDeathMessage ( this ) ) ) ; inventory . dropAllItems ( ) ; } public boolean attackEntityFrom ( DamageSource par1DamageSource , int par2 ) { if ( ticksOfInvuln > <NUM_LIT:0> ) { return false ; } if ( ! mcServer . pvpOn && ( par1DamageSource instanceof EntityDamageSource ) ) { Entity entity = par1DamageSource . getEntity ( ) ; if ( entity instanceof EntityPlayer ) { return false ; } if ( entity instanceof EntityArrow ) { EntityArrow entityarrow = ( EntityArrow ) entity ; if ( entityarrow . shootingEntity instanceof EntityPlayer ) { return false ; } } } return super . attackEntityFrom ( par1DamageSource , par2 ) ; } protected boolean isPVPEnabled ( ) { return mcServer . pvpOn ; } public void heal ( int par1 ) { super . heal ( par1 ) ; } public void onUpdateEntity ( boolean par1 ) { super . onUpdate ( ) ; for ( int i = <NUM_LIT:0> ; i < inventory . getSizeInventory ( ) ; i ++ ) { ItemStack itemstack = inventory . getStackInSlot ( i ) ; if ( itemstack == null || ! Item . itemsList [ itemstack . itemID ] . func_28019_b ( ) || playerNetServerHandler . getNumChunkDataPackets ( ) > <NUM_LIT:2> ) { continue ; } Packet packet = ( ( ItemMapBase ) Item . itemsList [ itemstack . itemID ] ) . getUpdatePacket ( itemstack , worldObj , this ) ; if ( packet != null ) { playerNetServerHandler . sendPacket ( packet ) ; } } if ( par1 && ! loadedChunks . isEmpty ( ) ) { ChunkCoordIntPair chunkcoordintpair = ( ChunkCoordIntPair ) loadedChunks . get ( <NUM_LIT:0> ) ; double d = chunkcoordintpair . func_48477_a ( this ) ; for ( int j = <NUM_LIT:0> ; j < loadedChunks . size ( ) ; j ++ ) { ChunkCoordIntPair chunkcoordintpair1 = ( ChunkCoordIntPair ) loadedChunks . get ( j ) ; double d1 = chunkcoordintpair1 . func_48477_a ( this ) ; if ( d1 < d ) { chunkcoordintpair = chunkcoordintpair1 ; d = d1 ; } } if ( chunkcoordintpair != null ) { boolean flag = false ; if ( playerNetServerHandler . getNumChunkDataPackets ( ) < <NUM_LIT:4> ) { flag = true ; } if ( flag ) { WorldServer worldserver = mcServer . getWorldManager ( dimension ) ; if ( worldserver . blockExists ( chunkcoordintpair . chunkXPos << <NUM_LIT:4> , <NUM_LIT:0> , chunkcoordintpair . chunkZPos << <NUM_LIT:4> ) ) { Chunk chunk = worldserver . getChunkFromChunkCoords ( chunkcoordintpair . chunkXPos , chunkcoordintpair . chunkZPos ) ; if ( chunk . isTerrainPopulated ) { loadedChunks . remove ( chunkcoordintpair ) ; playerNetServerHandler . sendPacket ( new Packet51MapChunk ( worldserver . getChunkFromChunkCoords ( chunkcoordintpair . chunkXPos , chunkcoordintpair . chunkZPos ) , true , <NUM_LIT:0> ) ) ; List list = worldserver . getTileEntityList ( chunkcoordintpair . chunkXPos * <NUM_LIT:16> , <NUM_LIT:0> , chunkcoordintpair . chunkZPos * <NUM_LIT:16> , chunkcoordintpair . chunkXPos * <NUM_LIT:16> + <NUM_LIT:16> , <NUM_LIT> , chunkcoordintpair . chunkZPos * <NUM_LIT:16> + <NUM_LIT:16> ) ; for ( int k = <NUM_LIT:0> ; k < list . size ( ) ; k ++ ) { getTileEntityInfo ( ( TileEntity ) list . get ( k ) ) ; } } } } } } if ( inPortal ) { if ( mcServer . propertyManagerObj . getBooleanProperty ( "<STR_LIT>" , true ) ) { if ( craftingInventory != inventorySlots ) { closeScreen ( ) ; } if ( ridingEntity != null ) { mountEntity ( ridingEntity ) ; } else { timeInPortal += <NUM_LIT> ; if ( timeInPortal >= <NUM_LIT> ) { timeInPortal = <NUM_LIT> ; timeUntilPortal = <NUM_LIT:10> ; byte byte0 = <NUM_LIT:0> ; if ( dimension == - <NUM_LIT:1> ) { byte0 = <NUM_LIT:0> ; } else { byte0 = - <NUM_LIT:1> ; } mcServer . configManager . sendPlayerToOtherDimension ( this , byte0 ) ; lastExperience = - <NUM_LIT:1> ; lastHealth = - <NUM_LIT:1> ; field_35221_cc = - <NUM_LIT:1> ; triggerAchievement ( AchievementList . portal ) ; } } inPortal = false ; } } else { if ( timeInPortal > <NUM_LIT> ) { timeInPortal -= <NUM_LIT> ; } if ( timeInPortal < <NUM_LIT> ) { timeInPortal = <NUM_LIT> ; } } if ( timeUntilPortal > <NUM_LIT:0> ) { timeUntilPortal -- ; } if ( getHealth ( ) != lastHealth || field_35221_cc != foodStats . getFoodLevel ( ) || ( foodStats . getSaturationLevel ( ) == <NUM_LIT> ) != field_35222_cd ) { playerNetServerHandler . sendPacket ( new Packet8UpdateHealth ( getHealth ( ) , foodStats . getFoodLevel ( ) , foodStats . getSaturationLevel ( ) ) ) ; lastHealth = getHealth ( ) ; field_35221_cc = foodStats . getFoodLevel ( ) ; field_35222_cd = foodStats . getSaturationLevel ( ) == <NUM_LIT> ; } if ( experienceTotal != lastExperience ) { lastExperience = experienceTotal ; playerNetServerHandler . sendPacket ( new Packet43Experience ( experience , experienceTotal , experienceLevel ) ) ; } } public void travelToTheEnd ( int par1 ) { if ( dimension == <NUM_LIT:1> && par1 == <NUM_LIT:1> ) { triggerAchievement ( AchievementList . theEnd2 ) ; worldObj . setEntityDead ( this ) ; gameOver = true ; playerNetServerHandler . sendPacket ( new Packet70Bed ( <NUM_LIT:4> , <NUM_LIT:0> ) ) ; } else { triggerAchievement ( AchievementList . theEnd ) ; ChunkCoordinates chunkcoordinates = mcServer . getWorldManager ( par1 ) . getEntrancePortalLocation ( ) ; if ( chunkcoordinates != null ) { playerNetServerHandler . teleportTo ( chunkcoordinates . posX , chunkcoordinates . posY , chunkcoordinates . posZ , <NUM_LIT> , <NUM_LIT> ) ; } mcServer . configManager . sendPlayerToOtherDimension ( this , <NUM_LIT:1> ) ; lastExperience = - <NUM_LIT:1> ; lastHealth = - <NUM_LIT:1> ; field_35221_cc = - <NUM_LIT:1> ; } } private void getTileEntityInfo ( TileEntity par1TileEntity ) { if ( par1TileEntity != null ) { Packet packet = par1TileEntity . getDescriptionPacket ( ) ; if ( packet != null ) { playerNetServerHandler . sendPacket ( packet ) ; } } } public void onItemPickup ( Entity par1Entity , int par2 ) { if ( ! par1Entity . isDead ) { EntityTracker entitytracker = mcServer . getEntityTracker ( dimension ) ; if ( par1Entity instanceof EntityItem ) { entitytracker . sendPacketToTrackedPlayers ( par1Entity , new Packet22Collect ( par1Entity . entityId , entityId ) ) ; } if ( par1Entity instanceof EntityArrow ) { entitytracker . sendPacketToTrackedPlayers ( par1Entity , new Packet22Collect ( par1Entity . entityId , entityId ) ) ; } if ( par1Entity instanceof EntityXPOrb ) { entitytracker . sendPacketToTrackedPlayers ( par1Entity , new Packet22Collect ( par1Entity . entityId , entityId ) ) ; } } super . onItemPickup ( par1Entity , par2 ) ; craftingInventory . updateCraftingResults ( ) ; } public void swingItem ( ) { if ( ! isSwinging ) { swingProgressInt = - <NUM_LIT:1> ; isSwinging = true ; EntityTracker entitytracker = mcServer . getEntityTracker ( dimension ) ; entitytracker . sendPacketToTrackedPlayers ( this , new Packet18Animation ( this , <NUM_LIT:1> ) ) ; } } public void func_22068_s ( ) { } public EnumStatus sleepInBedAt ( int par1 , int par2 , int par3 ) { EnumStatus enumstatus = super . sleepInBedAt ( par1 , par2 , par3 ) ; if ( enumstatus == EnumStatus . OK ) { EntityTracker entitytracker = mcServer . getEntityTracker ( dimension ) ; Packet17Sleep packet17sleep = new Packet17Sleep ( this , <NUM_LIT:0> , par1 , par2 , par3 ) ; entitytracker . sendPacketToTrackedPlayers ( this , packet17sleep ) ; playerNetServerHandler . teleportTo ( posX , posY , posZ , rotationYaw , rotationPitch ) ; playerNetServerHandler . sendPacket ( packet17sleep ) ; } return enumstatus ; } public void wakeUpPlayer ( boolean par1 , boolean par2 , boolean par3 ) { if ( isPlayerSleeping ( ) ) { EntityTracker entitytracker = mcServer . getEntityTracker ( dimension ) ; entitytracker . sendPacketToTrackedPlayersAndTrackedEntity ( this , new Packet18Animation ( this , <NUM_LIT:3> ) ) ; } super . wakeUpPlayer ( par1 , par2 , par3 ) ; if ( playerNetServerHandler != null ) { playerNetServerHandler . teleportTo ( posX , posY , posZ , rotationYaw , rotationPitch ) ; } } public void mountEntity ( Entity par1Entity ) { super . mountEntity ( par1Entity ) ; playerNetServerHandler . sendPacket ( new Packet39AttachEntity ( this , ridingEntity ) ) ; playerNetServerHandler . teleportTo ( posX , posY , posZ , rotationYaw , rotationPitch ) ; } protected void updateFallState ( double d , boolean flag ) { } public void handleFalling ( double par1 , boolean par3 ) { super . updateFallState ( par1 , par3 ) ; } private void getNextWidowId ( ) { currentWindowId = currentWindowId % <NUM_LIT:100> + <NUM_LIT:1> ; } public void displayWorkbenchGUI ( int par1 , int par2 , int par3 ) { getNextWidowId ( ) ; playerNetServerHandler . sendPacket ( new Packet100OpenWindow ( currentWindowId , <NUM_LIT:1> , "<STR_LIT>" , <NUM_LIT:9> ) ) ; craftingInventory = new ContainerWorkbench ( inventory , worldObj , par1 , par2 , par3 ) ; craftingInventory . windowId = currentWindowId ; craftingInventory . onCraftGuiOpened ( this ) ; } public void displayGUIEnchantment ( int par1 , int par2 , int par3 ) { getNextWidowId ( ) ; playerNetServerHandler . sendPacket ( new Packet100OpenWindow ( currentWindowId , <NUM_LIT:4> , "<STR_LIT>" , <NUM_LIT:9> ) ) ; craftingInventory = new ContainerEnchantment ( inventory , worldObj , par1 , par2 , par3 ) ; craftingInventory . windowId = currentWindowId ; craftingInventory . onCraftGuiOpened ( this ) ; } public void displayGUIChest ( IInventory par1IInventory ) { getNextWidowId ( ) ; playerNetServerHandler . sendPacket ( new Packet100OpenWindow ( currentWindowId , <NUM_LIT:0> , par1IInventory . getInvName ( ) , par1IInventory . getSizeInventory ( ) ) ) ; craftingInventory = new ContainerChest ( inventory , par1IInventory ) ; craftingInventory . windowId = currentWindowId ; craftingInventory . onCraftGuiOpened ( this ) ; } public void displayGUIFurnace ( TileEntityFurnace par1TileEntityFurnace ) { getNextWidowId ( ) ; playerNetServerHandler . sendPacket ( new Packet100OpenWindow ( currentWindowId , <NUM_LIT:2> , par1TileEntityFurnace . getInvName ( ) , par1TileEntityFurnace . getSizeInventory ( ) ) ) ; craftingInventory = new ContainerFurnace ( inventory , par1TileEntityFurnace ) ; craftingInventory . windowId = currentWindowId ; craftingInventory . onCraftGuiOpened ( this ) ; } public void displayGUIDispenser ( TileEntityDispenser par1TileEntityDispenser ) { getNextWidowId ( ) ; playerNetServerHandler . sendPacket ( new Packet100OpenWindow ( currentWindowId , <NUM_LIT:3> , par1TileEntityDispenser . getInvName ( ) , par1TileEntityDispenser . getSizeInventory ( ) ) ) ; craftingInventory = new ContainerDispenser ( inventory , par1TileEntityDispenser ) ; craftingInventory . windowId = currentWindowId ; craftingInventory . onCraftGuiOpened ( this ) ; } public void displayGUIBrewingStand ( TileEntityBrewingStand par1TileEntityBrewingStand ) { getNextWidowId ( ) ; playerNetServerHandler . sendPacket ( new Packet100OpenWindow ( currentWindowId , <NUM_LIT:5> , par1TileEntityBrewingStand . getInvName ( ) , par1TileEntityBrewingStand . getSizeInventory ( ) ) ) ; craftingInventory = new ContainerBrewingStand ( inventory , par1TileEntityBrewingStand ) ; craftingInventory . windowId = currentWindowId ; craftingInventory . onCraftGuiOpened ( this ) ; } public void updateCraftingInventorySlot ( Container par1Container , int par2 , ItemStack par3ItemStack ) { if ( par1Container . getSlot ( par2 ) instanceof SlotCrafting ) { return ; } if ( isChangingQuantityOnly ) { return ; } else { playerNetServerHandler . sendPacket ( new Packet103SetSlot ( par1Container . windowId , par2 , par3ItemStack ) ) ; return ; } } public void func_28017_a ( Container par1Container ) { updateCraftingInventory ( par1Container , par1Container . func_28127_b ( ) ) ; } public void updateCraftingInventory ( Container par1Container , List par2List ) { playerNetServerHandler . sendPacket ( new Packet104WindowItems ( par1Container . windowId , par2List ) ) ; playerNetServerHandler . sendPacket ( new Packet103SetSlot ( - <NUM_LIT:1> , - <NUM_LIT:1> , inventory . getItemStack ( ) ) ) ; } public void updateCraftingInventoryInfo ( Container par1Container , int par2 , int par3 ) { playerNetServerHandler . sendPacket ( new Packet105UpdateProgressbar ( par1Container . windowId , par2 , par3 ) ) ; } public void onItemStackChanged ( ItemStack itemstack ) { } public void closeScreen ( ) { playerNetServerHandler . sendPacket ( new Packet101CloseWindow ( craftingInventory . windowId ) ) ; closeCraftingGui ( ) ; } public void updateHeldItem ( ) { if ( isChangingQuantityOnly ) { return ; } else { playerNetServerHandler . sendPacket ( new Packet103SetSlot ( - <NUM_LIT:1> , - <NUM_LIT:1> , inventory . getItemStack ( ) ) ) ; return ; } } public void closeCraftingGui ( ) { craftingInventory . onCraftGuiClosed ( this ) ; craftingInventory = inventorySlots ; } public void addStat ( StatBase par1StatBase , int par2 ) { if ( par1StatBase == null ) { return ; } if ( ! par1StatBase . isIndependent ) { for ( ; par2 > <NUM_LIT:100> ; par2 -= <NUM_LIT:100> ) { playerNetServerHandler . sendPacket ( new Packet200Statistic ( par1StatBase . statId , <NUM_LIT:100> ) ) ; } playerNetServerHandler . sendPacket ( new Packet200Statistic ( par1StatBase . statId , par2 ) ) ; } } public void func_30002_A ( ) { if ( ridingEntity != null ) { mountEntity ( ridingEntity ) ; } if ( riddenByEntity != null ) { riddenByEntity . mountEntity ( this ) ; } if ( sleeping ) { wakeUpPlayer ( true , false , false ) ; } } public void func_30001_B ( ) { lastHealth = <NUM_LIT> ; } public void addChatMessage ( String par1Str ) { StringTranslate stringtranslate = StringTranslate . getInstance ( ) ; String s = stringtranslate . translateKey ( par1Str ) ; playerNetServerHandler . sendPacket ( new Packet3Chat ( s ) ) ; } protected void onItemUseFinish ( ) { playerNetServerHandler . sendPacket ( new Packet38EntityStatus ( entityId , ( byte ) <NUM_LIT:9> ) ) ; super . onItemUseFinish ( ) ; } public void setItemInUse ( ItemStack par1ItemStack , int par2 ) { super . setItemInUse ( par1ItemStack , par2 ) ; if ( par1ItemStack != null && par1ItemStack . getItem ( ) != null && par1ItemStack . getItem ( ) . getItemUseAction ( par1ItemStack ) == EnumAction . eat ) { EntityTracker entitytracker = mcServer . getEntityTracker ( dimension ) ; entitytracker . sendPacketToTrackedPlayersAndTrackedEntity ( this , new Packet18Animation ( this , <NUM_LIT:5> ) ) ; } } protected void onNewPotionEffect ( PotionEffect par1PotionEffect ) { super . onNewPotionEffect ( par1PotionEffect ) ; playerNetServerHandler . sendPacket ( new Packet41EntityEffect ( entityId , par1PotionEffect ) ) ; } protected void onChangedPotionEffect ( PotionEffect par1PotionEffect ) { super . onChangedPotionEffect ( par1PotionEffect ) ; playerNetServerHandler . sendPacket ( new Packet41EntityEffect ( entityId , par1PotionEffect ) ) ; } protected void onFinishedPotionEffect ( PotionEffect par1PotionEffect ) { super . onFinishedPotionEffect ( par1PotionEffect ) ; playerNetServerHandler . sendPacket ( new Packet42RemoveEntityEffect ( entityId , par1PotionEffect ) ) ; } public void setPositionAndUpdate ( double par1 , double par3 , double par5 ) { playerNetServerHandler . teleportTo ( par1 , par3 , par5 , rotationYaw , rotationPitch ) ; } public void onCriticalHit ( Entity par1Entity ) { EntityTracker entitytracker = mcServer . getEntityTracker ( dimension ) ; entitytracker . sendPacketToTrackedPlayersAndTrackedEntity ( this , new Packet18Animation ( par1Entity , <NUM_LIT:6> ) ) ; } public void onEnchantmentCritical ( Entity par1Entity ) { EntityTracker entitytracker = mcServer . getEntityTracker ( dimension ) ; entitytracker . sendPacketToTrackedPlayersAndTrackedEntity ( this , new Packet18Animation ( par1Entity , <NUM_LIT:7> ) ) ; } public void func_50022_L ( ) { if ( playerNetServerHandler == null ) { return ; } else { playerNetServerHandler . sendPacket ( new Packet202PlayerAbilities ( capabilities ) ) ; return ; } } } </s>
<s> package net . minecraft . src ; import java . util . Random ; public class BlockCactus extends Block { protected BlockCactus ( int par1 , int par2 ) { super ( par1 , par2 , Material . cactus ) ; setTickRandomly ( true ) ; } public void updateTick ( World par1World , int par2 , int par3 , int par4 , Random par5Random ) { if ( par1World . isAirBlock ( par2 , par3 + <NUM_LIT:1> , par4 ) ) { int i ; for ( i = <NUM_LIT:1> ; par1World . getBlockId ( par2 , par3 - i , par4 ) == blockID ; i ++ ) { } if ( i < <NUM_LIT:3> ) { int j = par1World . getBlockMetadata ( par2 , par3 , par4 ) ; if ( j == <NUM_LIT:15> ) { par1World . setBlockWithNotify ( par2 , par3 + <NUM_LIT:1> , par4 , blockID ) ; par1World . setBlockMetadataWithNotify ( par2 , par3 , par4 , <NUM_LIT:0> ) ; } else { par1World . setBlockMetadataWithNotify ( par2 , par3 , par4 , j + <NUM_LIT:1> ) ; } } } } public AxisAlignedBB getCollisionBoundingBoxFromPool ( World par1World , int par2 , int par3 , int par4 ) { float f = <NUM_LIT> ; return AxisAlignedBB . getBoundingBoxFromPool ( ( float ) par2 + f , par3 , ( float ) par4 + f , ( float ) ( par2 + <NUM_LIT:1> ) - f , ( float ) ( par3 + <NUM_LIT:1> ) - f , ( float ) ( par4 + <NUM_LIT:1> ) - f ) ; } public int getBlockTextureFromSide ( int par1 ) { if ( par1 == <NUM_LIT:1> ) { return blockIndexInTexture - <NUM_LIT:1> ; } if ( par1 == <NUM_LIT:0> ) { return blockIndexInTexture + <NUM_LIT:1> ; } else { return blockIndexInTexture ; } } public boolean renderAsNormalBlock ( ) { return false ; } public boolean isOpaqueCube ( ) { return false ; } public int getRenderType ( ) { return <NUM_LIT> ; } public boolean canPlaceBlockAt ( World par1World , int par2 , int par3 , int par4 ) { if ( ! super . canPlaceBlockAt ( par1World , par2 , par3 , par4 ) ) { return false ; } else { return canBlockStay ( par1World , par2 , par3 , par4 ) ; } } public void onNeighborBlockChange ( World par1World , int par2 , int par3 , int par4 , int par5 ) { if ( ! canBlockStay ( par1World , par2 , par3 , par4 ) ) { dropBlockAsItem ( par1World , par2 , par3 , par4 , par1World . getBlockMetadata ( par2 , par3 , par4 ) , <NUM_LIT:0> ) ; par1World . setBlockWithNotify ( par2 , par3 , par4 , <NUM_LIT:0> ) ; } } public boolean canBlockStay ( World par1World , int par2 , int par3 , int par4 ) { if ( par1World . getBlockMaterial ( par2 - <NUM_LIT:1> , par3 , par4 ) . isSolid ( ) ) { return false ; } if ( par1World . getBlockMaterial ( par2 + <NUM_LIT:1> , par3 , par4 ) . isSolid ( ) ) { return false ; } if ( par1World . getBlockMaterial ( par2 , par3 , par4 - <NUM_LIT:1> ) . isSolid ( ) ) { return false ; } if ( par1World . getBlockMaterial ( par2 , par3 , par4 + <NUM_LIT:1> ) . isSolid ( ) ) { return false ; } else { int i = par1World . getBlockId ( par2 , par3 - <NUM_LIT:1> , par4 ) ; return i == Block . cactus . blockID || i == Block . sand . blockID ; } } public void onEntityCollidedWithBlock ( World par1World , int par2 , int par3 , int par4 , Entity par5Entity ) { par5Entity . attackEntityFrom ( DamageSource . cactus , <NUM_LIT:1> ) ; } } </s>
<s> package net . minecraft . src ; public class MaterialLogic extends Material { public MaterialLogic ( MapColor par1MapColor ) { super ( par1MapColor ) ; } public boolean isSolid ( ) { return false ; } public boolean getCanBlockGrass ( ) { return false ; } public boolean blocksMovement ( ) { return false ; } } </s>
<s> package net . minecraft . src ; import java . io . * ; public class Packet42RemoveEntityEffect extends Packet { public int entityId ; public byte effectId ; public Packet42RemoveEntityEffect ( ) { } public Packet42RemoveEntityEffect ( int par1 , PotionEffect par2PotionEffect ) { entityId = par1 ; effectId = ( byte ) ( par2PotionEffect . getPotionID ( ) & <NUM_LIT> ) ; } public void readPacketData ( DataInputStream par1DataInputStream ) throws IOException { entityId = par1DataInputStream . readInt ( ) ; effectId = par1DataInputStream . readByte ( ) ; } public void writePacketData ( DataOutputStream par1DataOutputStream ) throws IOException { par1DataOutputStream . writeInt ( entityId ) ; par1DataOutputStream . writeByte ( effectId ) ; } public void processPacket ( NetHandler par1NetHandler ) { par1NetHandler . handleRemoveEntityEffect ( this ) ; } public int getPacketSize ( ) { return <NUM_LIT:5> ; } } </s>
<s> package net . minecraft . src ; public class Facing { public static final int faceToSide [ ] = { <NUM_LIT:1> , <NUM_LIT:0> , <NUM_LIT:3> , <NUM_LIT:2> , <NUM_LIT:5> , <NUM_LIT:4> } ; public static final int offsetsXForSide [ ] = { <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> , - <NUM_LIT:1> , <NUM_LIT:1> } ; public static final int offsetsYForSide [ ] = { - <NUM_LIT:1> , <NUM_LIT:1> , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> } ; public static final int offsetsZForSide [ ] = { <NUM_LIT:0> , <NUM_LIT:0> , - <NUM_LIT:1> , <NUM_LIT:1> , <NUM_LIT:0> , <NUM_LIT:0> } ; public Facing ( ) { } } </s>
<s> package net . minecraft . src ; import java . util . Random ; public class EntityAIFleeSun extends EntityAIBase { private EntityCreature theCreature ; private double shelterX ; private double shelterY ; private double shelterZ ; private float field_48257_e ; private World theWorld ; public EntityAIFleeSun ( EntityCreature par1EntityCreature , float par2 ) { theCreature = par1EntityCreature ; field_48257_e = par2 ; theWorld = par1EntityCreature . worldObj ; setMutexBits ( <NUM_LIT:1> ) ; } public boolean shouldExecute ( ) { if ( ! theWorld . isDaytime ( ) ) { return false ; } if ( ! theCreature . isBurning ( ) ) { return false ; } if ( ! theWorld . canBlockSeeTheSky ( MathHelper . floor_double ( theCreature . posX ) , ( int ) theCreature . boundingBox . minY , MathHelper . floor_double ( theCreature . posZ ) ) ) { return false ; } Vec3D vec3d = findPossibleShelter ( ) ; if ( vec3d == null ) { return false ; } else { shelterX = vec3d . xCoord ; shelterY = vec3d . yCoord ; shelterZ = vec3d . zCoord ; return true ; } } public boolean continueExecuting ( ) { return ! theCreature . getNavigator ( ) . noPath ( ) ; } public void startExecuting ( ) { theCreature . getNavigator ( ) . func_48658_a ( shelterX , shelterY , shelterZ , field_48257_e ) ; } private Vec3D findPossibleShelter ( ) { Random random = theCreature . getRNG ( ) ; for ( int i = <NUM_LIT:0> ; i < <NUM_LIT:10> ; i ++ ) { int j = MathHelper . floor_double ( ( theCreature . posX + ( double ) random . nextInt ( <NUM_LIT:20> ) ) - <NUM_LIT> ) ; int k = MathHelper . floor_double ( ( theCreature . boundingBox . minY + ( double ) random . nextInt ( <NUM_LIT:6> ) ) - <NUM_LIT> ) ; int l = MathHelper . floor_double ( ( theCreature . posZ + ( double ) random . nextInt ( <NUM_LIT:20> ) ) - <NUM_LIT> ) ; if ( ! theWorld . canBlockSeeTheSky ( j , k , l ) && theCreature . getBlockPathWeight ( j , k , l ) < <NUM_LIT> ) { return Vec3D . createVector ( j , k , l ) ; } } return null ; } } </s>
<s> package net . minecraft . src ; public class BlockSoulSand extends Block { public BlockSoulSand ( int par1 , int par2 ) { super ( par1 , par2 , Material . sand ) ; } public AxisAlignedBB getCollisionBoundingBoxFromPool ( World par1World , int par2 , int par3 , int par4 ) { float f = <NUM_LIT> ; return AxisAlignedBB . getBoundingBoxFromPool ( par2 , par3 , par4 , par2 + <NUM_LIT:1> , ( float ) ( par3 + <NUM_LIT:1> ) - f , par4 + <NUM_LIT:1> ) ; } public void onEntityCollidedWithBlock ( World par1World , int par2 , int par3 , int par4 , Entity par5Entity ) { par5Entity . motionX *= <NUM_LIT> ; par5Entity . motionZ *= <NUM_LIT> ; } } </s>
<s> package net . minecraft . src ; public class EntityAISit extends EntityAIBase { private EntityTameable theEntity ; private boolean field_48211_b ; public EntityAISit ( EntityTameable par1EntityTameable ) { field_48211_b = false ; theEntity = par1EntityTameable ; setMutexBits ( <NUM_LIT:5> ) ; } public boolean shouldExecute ( ) { if ( ! theEntity . isTamed ( ) ) { return false ; } if ( theEntity . isInWater ( ) ) { return false ; } if ( ! theEntity . onGround ) { return false ; } EntityLiving entityliving = theEntity . getOwner ( ) ; if ( entityliving == null ) { return true ; } if ( theEntity . getDistanceSqToEntity ( entityliving ) < <NUM_LIT> && entityliving . getAITarget ( ) != null ) { return false ; } else { return field_48211_b ; } } public void startExecuting ( ) { theEntity . getNavigator ( ) . clearPathEntity ( ) ; theEntity . func_48369_c ( true ) ; } public void resetTask ( ) { theEntity . func_48369_c ( false ) ; } public void func_48210_a ( boolean par1 ) { field_48211_b = par1 ; } } </s>
<s> package net . minecraft . src ; public class BiomeCacheBlock { public float temperatureValues [ ] ; public float rainfallValues [ ] ; public BiomeGenBase biomes [ ] ; public int xPosition ; public int zPosition ; public long lastAccessTime ; final BiomeCache biomeCache ; public BiomeCacheBlock ( BiomeCache par1BiomeCache , int par2 , int par3 ) { biomeCache = par1BiomeCache ; temperatureValues = new float [ <NUM_LIT> ] ; rainfallValues = new float [ <NUM_LIT> ] ; biomes = new BiomeGenBase [ <NUM_LIT> ] ; xPosition = par2 ; zPosition = par3 ; BiomeCache . getChunkManager ( par1BiomeCache ) . getTemperatures ( temperatureValues , par2 << <NUM_LIT:4> , par3 << <NUM_LIT:4> , <NUM_LIT:16> , <NUM_LIT:16> ) ; BiomeCache . getChunkManager ( par1BiomeCache ) . getRainfall ( rainfallValues , par2 << <NUM_LIT:4> , par3 << <NUM_LIT:4> , <NUM_LIT:16> , <NUM_LIT:16> ) ; BiomeCache . getChunkManager ( par1BiomeCache ) . getBiomeGenAt ( biomes , par2 << <NUM_LIT:4> , par3 << <NUM_LIT:4> , <NUM_LIT:16> , <NUM_LIT:16> , false ) ; } public BiomeGenBase getBiomeGenAt ( int par1 , int par2 ) { return biomes [ par1 & <NUM_LIT> | ( par2 & <NUM_LIT> ) << <NUM_LIT:4> ] ; } } </s>
<s> package net . minecraft . src ; import java . util . Random ; public class BlockPistonMoving extends BlockContainer { public BlockPistonMoving ( int par1 ) { super ( par1 , Material . piston ) ; setHardness ( - <NUM_LIT> ) ; } public TileEntity getBlockEntity ( ) { return null ; } public void onBlockAdded ( World world , int i , int j , int k ) { } public void onBlockRemoval ( World par1World , int par2 , int par3 , int par4 ) { TileEntity tileentity = par1World . getBlockTileEntity ( par2 , par3 , par4 ) ; if ( tileentity != null && ( tileentity instanceof TileEntityPiston ) ) { ( ( TileEntityPiston ) tileentity ) . clearPistonTileEntity ( ) ; } else { super . onBlockRemoval ( par1World , par2 , par3 , par4 ) ; } } public boolean canPlaceBlockAt ( World par1World , int par2 , int par3 , int i ) { return false ; } public boolean canPlaceBlockOnSide ( World par1World , int par2 , int par3 , int i , int j ) { return false ; } public int getRenderType ( ) { return - <NUM_LIT:1> ; } public boolean isOpaqueCube ( ) { return false ; } public boolean renderAsNormalBlock ( ) { return false ; } public boolean blockActivated ( World par1World , int par2 , int par3 , int par4 , EntityPlayer par5EntityPlayer ) { if ( ! par1World . isRemote && par1World . getBlockTileEntity ( par2 , par3 , par4 ) == null ) { par1World . setBlockWithNotify ( par2 , par3 , par4 , <NUM_LIT:0> ) ; return true ; } else { return false ; } } public int idDropped ( int par1 , Random par2Random , int par3 ) { return <NUM_LIT:0> ; } public void dropBlockAsItemWithChance ( World par1World , int par2 , int par3 , int par4 , int par5 , float par6 , int par7 ) { if ( par1World . isRemote ) { return ; } TileEntityPiston tileentitypiston = getTileEntityAtLocation ( par1World , par2 , par3 , par4 ) ; if ( tileentitypiston == null ) { return ; } else { Block . blocksList [ tileentitypiston . getStoredBlockID ( ) ] . dropBlockAsItem ( par1World , par2 , par3 , par4 , tileentitypiston . getBlockMetadata ( ) , <NUM_LIT:0> ) ; return ; } } public void onNeighborBlockChange ( World par1World , int par2 , int par3 , int par4 , int par5 ) { if ( ! par1World . isRemote ) { if ( par1World . getBlockTileEntity ( par2 , par3 , par4 ) != null ) ; } } public static TileEntity getTileEntity ( int par0 , int par1 , int par2 , boolean par3 , boolean par4 ) { return new TileEntityPiston ( par0 , par1 , par2 , par3 , par4 ) ; } public AxisAlignedBB getCollisionBoundingBoxFromPool ( World par1World , int par2 , int par3 , int par4 ) { TileEntityPiston tileentitypiston = getTileEntityAtLocation ( par1World , par2 , par3 , par4 ) ; if ( tileentitypiston == null ) { return null ; } float f = tileentitypiston . getProgress ( <NUM_LIT> ) ; if ( tileentitypiston . isExtending ( ) ) { f = <NUM_LIT> - f ; } return getAxisAlignedBB ( par1World , par2 , par3 , par4 , tileentitypiston . getStoredBlockID ( ) , f , tileentitypiston . getPistonOrientation ( ) ) ; } public void setBlockBoundsBasedOnState ( IBlockAccess par1IBlockAccess , int par2 , int par3 , int par4 ) { TileEntityPiston tileentitypiston = getTileEntityAtLocation ( par1IBlockAccess , par2 , par3 , par4 ) ; if ( tileentitypiston != null ) { Block block = Block . blocksList [ tileentitypiston . getStoredBlockID ( ) ] ; if ( block == null || block == this ) { return ; } block . setBlockBoundsBasedOnState ( par1IBlockAccess , par2 , par3 , par4 ) ; float f = tileentitypiston . getProgress ( <NUM_LIT> ) ; if ( tileentitypiston . isExtending ( ) ) { f = <NUM_LIT> - f ; } int i = tileentitypiston . getPistonOrientation ( ) ; minX = block . minX - ( double ) ( ( float ) Facing . offsetsXForSide [ i ] * f ) ; minY = block . minY - ( double ) ( ( float ) Facing . offsetsYForSide [ i ] * f ) ; minZ = block . minZ - ( double ) ( ( float ) Facing . offsetsZForSide [ i ] * f ) ; maxX = block . maxX - ( double ) ( ( float ) Facing . offsetsXForSide [ i ] * f ) ; maxY = block . maxY - ( double ) ( ( float ) Facing . offsetsYForSide [ i ] * f ) ; maxZ = block . maxZ - ( double ) ( ( float ) Facing . offsetsZForSide [ i ] * f ) ; } } public AxisAlignedBB getAxisAlignedBB ( World par1World , int par2 , int par3 , int par4 , int par5 , float par6 , int par7 ) { if ( par5 == <NUM_LIT:0> || par5 == blockID ) { return null ; } AxisAlignedBB axisalignedbb = Block . blocksList [ par5 ] . getCollisionBoundingBoxFromPool ( par1World , par2 , par3 , par4 ) ; if ( axisalignedbb == null ) { return null ; } if ( Facing . offsetsXForSide [ par7 ] < <NUM_LIT:0> ) { axisalignedbb . minX -= ( float ) Facing . offsetsXForSide [ par7 ] * par6 ; } else { axisalignedbb . maxX -= ( float ) Facing . offsetsXForSide [ par7 ] * par6 ; } if ( Facing . offsetsYForSide [ par7 ] < <NUM_LIT:0> ) { axisalignedbb . minY -= ( float ) Facing . offsetsYForSide [ par7 ] * par6 ; } else { axisalignedbb . maxY -= ( float ) Facing . offsetsYForSide [ par7 ] * par6 ; } if ( Facing . offsetsZForSide [ par7 ] < <NUM_LIT:0> ) { axisalignedbb . minZ -= ( float ) Facing . offsetsZForSide [ par7 ] * par6 ; } else { axisalignedbb . maxZ -= ( float ) Facing . offsetsZForSide [ par7 ] * par6 ; } return axisalignedbb ; } private TileEntityPiston getTileEntityAtLocation ( IBlockAccess par1IBlockAccess , int par2 , int par3 , int par4 ) { TileEntity tileentity = par1IBlockAccess . getBlockTileEntity ( par2 , par3 , par4 ) ; if ( tileentity != null && ( tileentity instanceof TileEntityPiston ) ) { return ( TileEntityPiston ) tileentity ; } else { return null ; } } } </s>
<s> package net . minecraft . src ; import java . util . List ; import java . util . Random ; public class BiomeGenDesert extends BiomeGenBase { public BiomeGenDesert ( int par1 ) { super ( par1 ) ; spawnableCreatureList . clear ( ) ; topBlock = ( byte ) Block . sand . blockID ; fillerBlock = ( byte ) Block . sand . blockID ; biomeDecorator . treesPerChunk = - <NUM_LIT> ; biomeDecorator . deadBushPerChunk = <NUM_LIT:2> ; biomeDecorator . reedsPerChunk = <NUM_LIT> ; biomeDecorator . cactiPerChunk = <NUM_LIT:10> ; } public void decorate ( World par1World , Random par2Random , int par3 , int par4 ) { super . decorate ( par1World , par2Random , par3 , par4 ) ; if ( par2Random . nextInt ( <NUM_LIT:1000> ) == <NUM_LIT:0> ) { int i = par3 + par2Random . nextInt ( <NUM_LIT:16> ) + <NUM_LIT:8> ; int j = par4 + par2Random . nextInt ( <NUM_LIT:16> ) + <NUM_LIT:8> ; WorldGenDesertWells worldgendesertwells = new WorldGenDesertWells ( ) ; worldgendesertwells . generate ( par1World , par2Random , i , par1World . getHeightValue ( i , j ) + <NUM_LIT:1> , j ) ; } } } </s>
<s> package net . minecraft . src ; public class ItemGlassBottle extends Item { public ItemGlassBottle ( int par1 ) { super ( par1 ) ; } public ItemStack onItemRightClick ( ItemStack par1ItemStack , World par2World , EntityPlayer par3EntityPlayer ) { MovingObjectPosition movingobjectposition = getMovingObjectPositionFromPlayer ( par2World , par3EntityPlayer , true ) ; if ( movingobjectposition == null ) { return par1ItemStack ; } if ( movingobjectposition . typeOfHit == EnumMovingObjectType . TILE ) { int i = movingobjectposition . blockX ; int j = movingobjectposition . blockY ; int k = movingobjectposition . blockZ ; if ( ! par2World . canMineBlock ( par3EntityPlayer , i , j , k ) ) { return par1ItemStack ; } if ( ! par3EntityPlayer . canPlayerEdit ( i , j , k ) ) { return par1ItemStack ; } if ( par2World . getBlockMaterial ( i , j , k ) == Material . water ) { par1ItemStack . stackSize -- ; if ( par1ItemStack . stackSize <= <NUM_LIT:0> ) { return new ItemStack ( Item . potion ) ; } if ( ! par3EntityPlayer . inventory . addItemStackToInventory ( new ItemStack ( Item . potion ) ) ) { par3EntityPlayer . dropPlayerItem ( new ItemStack ( Item . potion . shiftedIndex , <NUM_LIT:1> , <NUM_LIT:0> ) ) ; } } } return par1ItemStack ; } } </s>
<s> package net . minecraft . src ; import java . io . * ; public class Packet254ServerPing extends Packet { public Packet254ServerPing ( ) { } public void readPacketData ( DataInputStream datainputstream ) throws IOException { } public void writePacketData ( DataOutputStream dataoutputstream ) throws IOException { } public void processPacket ( NetHandler par1NetHandler ) { par1NetHandler . handleServerPing ( this ) ; } public int getPacketSize ( ) { return <NUM_LIT:0> ; } } </s>
<s> package net . minecraft . src ; import java . io . * ; public class Packet200Statistic extends Packet { public int statisticId ; public int amount ; public Packet200Statistic ( ) { } public Packet200Statistic ( int par1 , int par2 ) { statisticId = par1 ; amount = par2 ; } public void processPacket ( NetHandler par1NetHandler ) { par1NetHandler . handleStatistic ( this ) ; } public void readPacketData ( DataInputStream par1DataInputStream ) throws IOException { statisticId = par1DataInputStream . readInt ( ) ; amount = par1DataInputStream . readByte ( ) ; } public void writePacketData ( DataOutputStream par1DataOutputStream ) throws IOException { par1DataOutputStream . writeInt ( statisticId ) ; par1DataOutputStream . writeByte ( amount ) ; } public int getPacketSize ( ) { return <NUM_LIT:6> ; } } </s>
<s> package net . minecraft . src ; public class StatCrafting extends StatBase { private final int itemID ; public StatCrafting ( int par1 , String par2Str , int par3 ) { super ( par1 , par2Str ) ; itemID = par3 ; } } </s>
<s> package net . minecraft . src ; import java . util . Random ; public class EntityXPOrb extends Entity { public int xpColor ; public int xpOrbAge ; public int field_35158_c ; private int xpOrbHealth ; private int xpValue ; public EntityXPOrb ( World par1World , double par2 , double par4 , double par6 , int par8 ) { super ( par1World ) ; xpOrbAge = <NUM_LIT:0> ; xpOrbHealth = <NUM_LIT:5> ; setSize ( <NUM_LIT> , <NUM_LIT> ) ; yOffset = height / <NUM_LIT> ; setPosition ( par2 , par4 , par6 ) ; rotationYaw = ( float ) ( Math . random ( ) * <NUM_LIT> ) ; motionX = ( float ) ( Math . random ( ) * <NUM_LIT> - <NUM_LIT> ) * <NUM_LIT> ; motionY = ( float ) ( Math . random ( ) * <NUM_LIT> ) * <NUM_LIT> ; motionZ = ( float ) ( Math . random ( ) * <NUM_LIT> - <NUM_LIT> ) * <NUM_LIT> ; xpValue = par8 ; } protected boolean canTriggerWalking ( ) { return false ; } public EntityXPOrb ( World par1World ) { super ( par1World ) ; xpOrbAge = <NUM_LIT:0> ; xpOrbHealth = <NUM_LIT:5> ; setSize ( <NUM_LIT> , <NUM_LIT> ) ; yOffset = height / <NUM_LIT> ; } protected void entityInit ( ) { } public void onUpdate ( ) { super . onUpdate ( ) ; if ( field_35158_c > <NUM_LIT:0> ) { field_35158_c -- ; } prevPosX = posX ; prevPosY = posY ; prevPosZ = posZ ; motionY -= <NUM_LIT> ; if ( worldObj . getBlockMaterial ( MathHelper . floor_double ( posX ) , MathHelper . floor_double ( posY ) , MathHelper . floor_double ( posZ ) ) == Material . lava ) { motionY = <NUM_LIT> ; motionX = ( rand . nextFloat ( ) - rand . nextFloat ( ) ) * <NUM_LIT> ; motionZ = ( rand . nextFloat ( ) - rand . nextFloat ( ) ) * <NUM_LIT> ; worldObj . playSoundAtEntity ( this , "<STR_LIT>" , <NUM_LIT> , <NUM_LIT> + rand . nextFloat ( ) * <NUM_LIT> ) ; } pushOutOfBlocks ( posX , ( boundingBox . minY + boundingBox . maxY ) / <NUM_LIT> , posZ ) ; double d = <NUM_LIT> ; EntityPlayer entityplayer = worldObj . getClosestPlayerToEntity ( this , d ) ; if ( entityplayer != null ) { double d1 = ( entityplayer . posX - posX ) / d ; double d2 = ( ( entityplayer . posY + ( double ) entityplayer . getEyeHeight ( ) ) - posY ) / d ; double d3 = ( entityplayer . posZ - posZ ) / d ; double d4 = Math . sqrt ( d1 * d1 + d2 * d2 + d3 * d3 ) ; double d5 = <NUM_LIT> - d4 ; if ( d5 > <NUM_LIT> ) { d5 *= d5 ; motionX += ( d1 / d4 ) * d5 * <NUM_LIT> ; motionY += ( d2 / d4 ) * d5 * <NUM_LIT> ; motionZ += ( d3 / d4 ) * d5 * <NUM_LIT> ; } } moveEntity ( motionX , motionY , motionZ ) ; float f = <NUM_LIT> ; if ( onGround ) { f = <NUM_LIT> ; int i = worldObj . getBlockId ( MathHelper . floor_double ( posX ) , MathHelper . floor_double ( boundingBox . minY ) - <NUM_LIT:1> , MathHelper . floor_double ( posZ ) ) ; if ( i > <NUM_LIT:0> ) { f = Block . blocksList [ i ] . slipperiness * <NUM_LIT> ; } } motionX *= f ; motionY *= <NUM_LIT> ; motionZ *= f ; if ( onGround ) { motionY *= - <NUM_LIT> ; } xpColor ++ ; xpOrbAge ++ ; if ( xpOrbAge >= <NUM_LIT> ) { setDead ( ) ; } } public boolean handleWaterMovement ( ) { return worldObj . handleMaterialAcceleration ( boundingBox , Material . water , this ) ; } protected void dealFireDamage ( int par1 ) { attackEntityFrom ( DamageSource . inFire , par1 ) ; } public boolean attackEntityFrom ( DamageSource par1DamageSource , int par2 ) { setBeenAttacked ( ) ; xpOrbHealth -= par2 ; if ( xpOrbHealth <= <NUM_LIT:0> ) { setDead ( ) ; } return false ; } public void writeEntityToNBT ( NBTTagCompound par1NBTTagCompound ) { par1NBTTagCompound . setShort ( "<STR_LIT>" , ( byte ) xpOrbHealth ) ; par1NBTTagCompound . setShort ( "<STR_LIT>" , ( short ) xpOrbAge ) ; par1NBTTagCompound . setShort ( "<STR_LIT>" , ( short ) xpValue ) ; } public void readEntityFromNBT ( NBTTagCompound par1NBTTagCompound ) { xpOrbHealth = par1NBTTagCompound . getShort ( "<STR_LIT>" ) & <NUM_LIT> ; xpOrbAge = par1NBTTagCompound . getShort ( "<STR_LIT>" ) ; xpValue = par1NBTTagCompound . getShort ( "<STR_LIT>" ) ; } public void onCollideWithPlayer ( EntityPlayer par1EntityPlayer ) { if ( worldObj . isRemote ) { return ; } if ( field_35158_c == <NUM_LIT:0> && par1EntityPlayer . xpCooldown == <NUM_LIT:0> ) { par1EntityPlayer . xpCooldown = <NUM_LIT:2> ; worldObj . playSoundAtEntity ( this , "<STR_LIT>" , <NUM_LIT> , <NUM_LIT> * ( ( rand . nextFloat ( ) - rand . nextFloat ( ) ) * <NUM_LIT> + <NUM_LIT> ) ) ; par1EntityPlayer . onItemPickup ( this , <NUM_LIT:1> ) ; par1EntityPlayer . addExperience ( xpValue ) ; setDead ( ) ; } } public int getXpValue ( ) { return xpValue ; } public static int getXPSplit ( int par0 ) { if ( par0 >= <NUM_LIT> ) { return <NUM_LIT> ; } if ( par0 >= <NUM_LIT> ) { return <NUM_LIT> ; } if ( par0 >= <NUM_LIT> ) { return <NUM_LIT> ; } if ( par0 >= <NUM_LIT> ) { return <NUM_LIT> ; } if ( par0 >= <NUM_LIT> ) { return <NUM_LIT> ; } if ( par0 >= <NUM_LIT> ) { return <NUM_LIT> ; } if ( par0 >= <NUM_LIT> ) { return <NUM_LIT> ; } if ( par0 >= <NUM_LIT> ) { return <NUM_LIT> ; } if ( par0 >= <NUM_LIT:7> ) { return <NUM_LIT:7> ; } return par0 < <NUM_LIT:3> ? <NUM_LIT:1> : <NUM_LIT:3> ; } public boolean canAttackWithItem ( ) { return false ; } } </s>
<s> package net . minecraft . src ; public enum EnumSkyBlock { Sky ( <NUM_LIT:15> ) , Block ( <NUM_LIT:0> ) ; public final int defaultLightValue ; private EnumSkyBlock ( int par3 ) { defaultLightValue = par3 ; } } </s>
<s> package net . minecraft . src ; import java . io . * ; import java . lang . ref . Reference ; import java . lang . ref . SoftReference ; import java . util . * ; public class RegionFileCache { private static final Map regionsByFilename = new HashMap ( ) ; private RegionFileCache ( ) { } public static synchronized RegionFile createOrLoadRegionFile ( File par0File , int par1 , int par2 ) { File file = new File ( par0File , "<STR_LIT>" ) ; File file1 = new File ( file , ( new StringBuilder ( ) ) . append ( "<STR_LIT>" ) . append ( par1 > > <NUM_LIT:5> ) . append ( "<STR_LIT:.>" ) . append ( par2 > > <NUM_LIT:5> ) . append ( "<STR_LIT>" ) . toString ( ) ) ; Reference reference = ( Reference ) regionsByFilename . get ( file1 ) ; if ( reference != null ) { RegionFile regionfile = ( RegionFile ) reference . get ( ) ; if ( regionfile != null ) { return regionfile ; } } if ( ! file . exists ( ) ) { file . mkdirs ( ) ; } if ( regionsByFilename . size ( ) >= <NUM_LIT> ) { clearRegionFileReferences ( ) ; } RegionFile regionfile1 = new RegionFile ( file1 ) ; regionsByFilename . put ( file1 , new SoftReference ( regionfile1 ) ) ; return regionfile1 ; } public static synchronized void clearRegionFileReferences ( ) { Iterator iterator = regionsByFilename . values ( ) . iterator ( ) ; do { if ( ! iterator . hasNext ( ) ) { break ; } Reference reference = ( Reference ) iterator . next ( ) ; try { RegionFile regionfile = ( RegionFile ) reference . get ( ) ; if ( regionfile != null ) { regionfile . close ( ) ; } } catch ( IOException ioexception ) { ioexception . printStackTrace ( ) ; } } while ( true ) ; regionsByFilename . clear ( ) ; } public static DataInputStream getChunkInputStream ( File par0File , int par1 , int par2 ) { RegionFile regionfile = createOrLoadRegionFile ( par0File , par1 , par2 ) ; return regionfile . getChunkDataInputStream ( par1 & <NUM_LIT> , par2 & <NUM_LIT> ) ; } public static DataOutputStream getChunkOutputStream ( File par0File , int par1 , int par2 ) { RegionFile regionfile = createOrLoadRegionFile ( par0File , par1 , par2 ) ; return regionfile . getChunkDataOutputStream ( par1 & <NUM_LIT> , par2 & <NUM_LIT> ) ; } } </s>
<s> package net . minecraft . src ; import java . util . Random ; public class WorldGenFlowers extends WorldGenerator { private int plantBlockId ; public WorldGenFlowers ( int par1 ) { plantBlockId = par1 ; } public boolean generate ( World par1World , Random par2Random , int par3 , int par4 , int par5 ) { for ( int i = <NUM_LIT:0> ; i < <NUM_LIT> ; i ++ ) { int j = ( par3 + par2Random . nextInt ( <NUM_LIT:8> ) ) - par2Random . nextInt ( <NUM_LIT:8> ) ; int k = ( par4 + par2Random . nextInt ( <NUM_LIT:4> ) ) - par2Random . nextInt ( <NUM_LIT:4> ) ; int l = ( par5 + par2Random . nextInt ( <NUM_LIT:8> ) ) - par2Random . nextInt ( <NUM_LIT:8> ) ; if ( par1World . isAirBlock ( j , k , l ) && ( ( BlockFlower ) Block . blocksList [ plantBlockId ] ) . canBlockStay ( par1World , j , k , l ) ) { par1World . setBlock ( j , k , l , plantBlockId ) ; } } return true ; } } </s>
<s> package net . minecraft . src ; import java . util . * ; public abstract class BiomeGenBase { public static final BiomeGenBase biomeList [ ] = new BiomeGenBase [ <NUM_LIT> ] ; public static final BiomeGenBase ocean = ( new BiomeGenOcean ( <NUM_LIT:0> ) ) . setColor ( <NUM_LIT> ) . setBiomeName ( "<STR_LIT>" ) . setMinMaxHeight ( - <NUM_LIT> , <NUM_LIT> ) ; public static final BiomeGenBase plains = ( new BiomeGenPlains ( <NUM_LIT:1> ) ) . setColor ( <NUM_LIT> ) . setBiomeName ( "<STR_LIT>" ) . setTemperatureRainfall ( <NUM_LIT> , <NUM_LIT> ) ; public static final BiomeGenBase desert = ( new BiomeGenDesert ( <NUM_LIT:2> ) ) . setColor ( <NUM_LIT> ) . setBiomeName ( "<STR_LIT>" ) . setDisableRain ( ) . setTemperatureRainfall ( <NUM_LIT> , <NUM_LIT> ) . setMinMaxHeight ( <NUM_LIT> , <NUM_LIT> ) ; public static final BiomeGenBase extremeHills = ( new BiomeGenHills ( <NUM_LIT:3> ) ) . setColor ( <NUM_LIT> ) . setBiomeName ( "<STR_LIT>" ) . setMinMaxHeight ( <NUM_LIT> , <NUM_LIT> ) . setTemperatureRainfall ( <NUM_LIT> , <NUM_LIT> ) ; public static final BiomeGenBase forest = ( new BiomeGenForest ( <NUM_LIT:4> ) ) . setColor ( <NUM_LIT> ) . setBiomeName ( "<STR_LIT>" ) . func_4080_a ( <NUM_LIT> ) . setTemperatureRainfall ( <NUM_LIT> , <NUM_LIT> ) ; public static final BiomeGenBase taiga = ( new BiomeGenTaiga ( <NUM_LIT:5> ) ) . setColor ( <NUM_LIT> ) . setBiomeName ( "<STR_LIT>" ) . func_4080_a ( <NUM_LIT> ) . func_50024_b ( ) . setTemperatureRainfall ( <NUM_LIT> , <NUM_LIT> ) . setMinMaxHeight ( <NUM_LIT> , <NUM_LIT> ) ; public static final BiomeGenBase swampland = ( new BiomeGenSwamp ( <NUM_LIT:6> ) ) . setColor ( <NUM_LIT> ) . setBiomeName ( "<STR_LIT>" ) . func_4080_a ( <NUM_LIT> ) . setMinMaxHeight ( - <NUM_LIT> , <NUM_LIT> ) . setTemperatureRainfall ( <NUM_LIT> , <NUM_LIT> ) ; public static final BiomeGenBase river = ( new BiomeGenRiver ( <NUM_LIT:7> ) ) . setColor ( <NUM_LIT:255> ) . setBiomeName ( "<STR_LIT>" ) . setMinMaxHeight ( - <NUM_LIT> , <NUM_LIT> ) ; public static final BiomeGenBase hell = ( new BiomeGenHell ( <NUM_LIT:8> ) ) . setColor ( <NUM_LIT> ) . setBiomeName ( "<STR_LIT>" ) . setDisableRain ( ) . setTemperatureRainfall ( <NUM_LIT> , <NUM_LIT> ) ; public static final BiomeGenBase sky = ( new BiomeGenEnd ( <NUM_LIT:9> ) ) . setColor ( <NUM_LIT> ) . setBiomeName ( "<STR_LIT>" ) . setDisableRain ( ) ; public static final BiomeGenBase frozenOcean = ( new BiomeGenOcean ( <NUM_LIT:10> ) ) . setColor ( <NUM_LIT> ) . setBiomeName ( "<STR_LIT>" ) . func_50024_b ( ) . setMinMaxHeight ( - <NUM_LIT> , <NUM_LIT> ) . setTemperatureRainfall ( <NUM_LIT> , <NUM_LIT> ) ; public static final BiomeGenBase frozenRiver = ( new BiomeGenRiver ( <NUM_LIT:11> ) ) . setColor ( <NUM_LIT> ) . setBiomeName ( "<STR_LIT>" ) . func_50024_b ( ) . setMinMaxHeight ( - <NUM_LIT> , <NUM_LIT> ) . setTemperatureRainfall ( <NUM_LIT> , <NUM_LIT> ) ; public static final BiomeGenBase icePlains = ( new BiomeGenSnow ( <NUM_LIT:12> ) ) . setColor ( <NUM_LIT> ) . setBiomeName ( "<STR_LIT>" ) . func_50024_b ( ) . setTemperatureRainfall ( <NUM_LIT> , <NUM_LIT> ) ; public static final BiomeGenBase iceMountains = ( new BiomeGenSnow ( <NUM_LIT> ) ) . setColor ( <NUM_LIT> ) . setBiomeName ( "<STR_LIT>" ) . func_50024_b ( ) . setMinMaxHeight ( <NUM_LIT> , <NUM_LIT> ) . setTemperatureRainfall ( <NUM_LIT> , <NUM_LIT> ) ; public static final BiomeGenBase mushroomIsland = ( new BiomeGenMushroomIsland ( <NUM_LIT> ) ) . setColor ( <NUM_LIT> ) . setBiomeName ( "<STR_LIT>" ) . setTemperatureRainfall ( <NUM_LIT> , <NUM_LIT> ) . setMinMaxHeight ( <NUM_LIT> , <NUM_LIT> ) ; public static final BiomeGenBase mushroomIslandShore = ( new BiomeGenMushroomIsland ( <NUM_LIT:15> ) ) . setColor ( <NUM_LIT> ) . setBiomeName ( "<STR_LIT>" ) . setTemperatureRainfall ( <NUM_LIT> , <NUM_LIT> ) . setMinMaxHeight ( - <NUM_LIT> , <NUM_LIT> ) ; public static final BiomeGenBase beach = ( new BiomeGenBeach ( <NUM_LIT:16> ) ) . setColor ( <NUM_LIT> ) . setBiomeName ( "<STR_LIT>" ) . setTemperatureRainfall ( <NUM_LIT> , <NUM_LIT> ) . setMinMaxHeight ( <NUM_LIT> , <NUM_LIT> ) ; public static final BiomeGenBase desertHills = ( new BiomeGenDesert ( <NUM_LIT> ) ) . setColor ( <NUM_LIT> ) . setBiomeName ( "<STR_LIT>" ) . setDisableRain ( ) . setTemperatureRainfall ( <NUM_LIT> , <NUM_LIT> ) . setMinMaxHeight ( <NUM_LIT> , <NUM_LIT> ) ; public static final BiomeGenBase forestHills = ( new BiomeGenForest ( <NUM_LIT> ) ) . setColor ( <NUM_LIT> ) . setBiomeName ( "<STR_LIT>" ) . func_4080_a ( <NUM_LIT> ) . setTemperatureRainfall ( <NUM_LIT> , <NUM_LIT> ) . setMinMaxHeight ( <NUM_LIT> , <NUM_LIT> ) ; public static final BiomeGenBase taigaHills = ( new BiomeGenTaiga ( <NUM_LIT> ) ) . setColor ( <NUM_LIT> ) . setBiomeName ( "<STR_LIT>" ) . func_50024_b ( ) . func_4080_a ( <NUM_LIT> ) . setTemperatureRainfall ( <NUM_LIT> , <NUM_LIT> ) . setMinMaxHeight ( <NUM_LIT> , <NUM_LIT> ) ; public static final BiomeGenBase extremeHillsEdge = ( new BiomeGenHills ( <NUM_LIT:20> ) ) . setColor ( <NUM_LIT> ) . setBiomeName ( "<STR_LIT>" ) . setMinMaxHeight ( <NUM_LIT> , <NUM_LIT> ) . setTemperatureRainfall ( <NUM_LIT> , <NUM_LIT> ) ; public static final BiomeGenBase jungle = ( new BiomeGenJungle ( <NUM_LIT> ) ) . setColor ( <NUM_LIT> ) . setBiomeName ( "<STR_LIT>" ) . func_4080_a ( <NUM_LIT> ) . setTemperatureRainfall ( <NUM_LIT> , <NUM_LIT> ) . setMinMaxHeight ( <NUM_LIT> , <NUM_LIT> ) ; public static final BiomeGenBase jungleHills = ( new BiomeGenJungle ( <NUM_LIT> ) ) . setColor ( <NUM_LIT> ) . setBiomeName ( "<STR_LIT>" ) . func_4080_a ( <NUM_LIT> ) . setTemperatureRainfall ( <NUM_LIT> , <NUM_LIT> ) . setMinMaxHeight ( <NUM_LIT> , <NUM_LIT> ) ; public String biomeName ; public int color ; public byte topBlock ; public byte fillerBlock ; public int field_6161_q ; public float minHeight ; public float maxHeight ; public float temperature ; public float rainfall ; public int waterColorMultiplier ; public BiomeDecorator biomeDecorator ; protected List spawnableMonsterList ; protected List spawnableCreatureList ; protected List spawnableWaterCreatureList ; private boolean enableSnow ; private boolean enableRain ; public final int biomeID ; protected WorldGenTrees worldGenTrees ; protected WorldGenBigTree worldGenBigTree ; protected WorldGenForest worldGenForest ; protected WorldGenSwamp worldGenSwamp ; protected BiomeGenBase ( int par1 ) { topBlock = ( byte ) Block . grass . blockID ; fillerBlock = ( byte ) Block . dirt . blockID ; field_6161_q = <NUM_LIT> ; minHeight = <NUM_LIT> ; maxHeight = <NUM_LIT> ; temperature = <NUM_LIT> ; rainfall = <NUM_LIT> ; waterColorMultiplier = <NUM_LIT> ; spawnableMonsterList = new ArrayList ( ) ; spawnableCreatureList = new ArrayList ( ) ; spawnableWaterCreatureList = new ArrayList ( ) ; enableRain = true ; worldGenTrees = new WorldGenTrees ( false ) ; worldGenBigTree = new WorldGenBigTree ( false ) ; worldGenForest = new WorldGenForest ( false ) ; worldGenSwamp = new WorldGenSwamp ( ) ; biomeID = par1 ; biomeList [ par1 ] = this ; biomeDecorator = createBiomeDecorator ( ) ; spawnableCreatureList . add ( new SpawnListEntry ( net . minecraft . src . EntitySheep . class , <NUM_LIT:12> , <NUM_LIT:4> , <NUM_LIT:4> ) ) ; spawnableCreatureList . add ( new SpawnListEntry ( net . minecraft . src . EntityPig . class , <NUM_LIT:10> , <NUM_LIT:4> , <NUM_LIT:4> ) ) ; spawnableCreatureList . add ( new SpawnListEntry ( net . minecraft . src . EntityChicken . class , <NUM_LIT:10> , <NUM_LIT:4> , <NUM_LIT:4> ) ) ; spawnableCreatureList . add ( new SpawnListEntry ( net . minecraft . src . EntityCow . class , <NUM_LIT:8> , <NUM_LIT:4> , <NUM_LIT:4> ) ) ; spawnableMonsterList . add ( new SpawnListEntry ( net . minecraft . src . EntitySpider . class , <NUM_LIT:10> , <NUM_LIT:4> , <NUM_LIT:4> ) ) ; spawnableMonsterList . add ( new SpawnListEntry ( net . minecraft . src . EntityZombie . class , <NUM_LIT:10> , <NUM_LIT:4> , <NUM_LIT:4> ) ) ; spawnableMonsterList . add ( new SpawnListEntry ( net . minecraft . src . EntitySkeleton . class , <NUM_LIT:10> , <NUM_LIT:4> , <NUM_LIT:4> ) ) ; spawnableMonsterList . add ( new SpawnListEntry ( net . minecraft . src . EntityCreeper . class , <NUM_LIT:10> , <NUM_LIT:4> , <NUM_LIT:4> ) ) ; spawnableMonsterList . add ( new SpawnListEntry ( net . minecraft . src . EntitySlime . class , <NUM_LIT:10> , <NUM_LIT:4> , <NUM_LIT:4> ) ) ; spawnableMonsterList . add ( new SpawnListEntry ( net . minecraft . src . EntityEnderman . class , <NUM_LIT:1> , <NUM_LIT:1> , <NUM_LIT:4> ) ) ; spawnableWaterCreatureList . add ( new SpawnListEntry ( net . minecraft . src . EntitySquid . class , <NUM_LIT:10> , <NUM_LIT:4> , <NUM_LIT:4> ) ) ; } protected BiomeDecorator createBiomeDecorator ( ) { return new BiomeDecorator ( this ) ; } private BiomeGenBase setTemperatureRainfall ( float par1 , float par2 ) { if ( par1 > <NUM_LIT> && par1 < <NUM_LIT> ) { throw new IllegalArgumentException ( "<STR_LIT>" ) ; } else { temperature = par1 ; rainfall = par2 ; return this ; } } private BiomeGenBase setMinMaxHeight ( float par1 , float par2 ) { minHeight = par1 ; maxHeight = par2 ; return this ; } private BiomeGenBase setDisableRain ( ) { enableRain = false ; return this ; } public WorldGenerator getRandomWorldGenForTrees ( Random par1Random ) { if ( par1Random . nextInt ( <NUM_LIT:10> ) == <NUM_LIT:0> ) { return worldGenBigTree ; } else { return worldGenTrees ; } } public WorldGenerator func_48440_b ( Random par1Random ) { return new WorldGenTallGrass ( Block . tallGrass . blockID , <NUM_LIT:1> ) ; } protected BiomeGenBase func_50024_b ( ) { enableSnow = true ; return this ; } protected BiomeGenBase setBiomeName ( String par1Str ) { biomeName = par1Str ; return this ; } protected BiomeGenBase func_4080_a ( int par1 ) { field_6161_q = par1 ; return this ; } protected BiomeGenBase setColor ( int par1 ) { color = par1 ; return this ; } public List getSpawnableList ( EnumCreatureType par1EnumCreatureType ) { if ( par1EnumCreatureType == EnumCreatureType . monster ) { return spawnableMonsterList ; } if ( par1EnumCreatureType == EnumCreatureType . creature ) { return spawnableCreatureList ; } if ( par1EnumCreatureType == EnumCreatureType . waterCreature ) { return spawnableWaterCreatureList ; } else { return null ; } } public boolean getEnableSnow ( ) { return enableSnow ; } public boolean canSpawnLightningBolt ( ) { if ( enableSnow ) { return false ; } else { return enableRain ; } } public boolean func_48441_d ( ) { return rainfall > <NUM_LIT> ; } public float getSpawningChance ( ) { return <NUM_LIT> ; } public final int getIntRainfall ( ) { return ( int ) ( rainfall * <NUM_LIT> ) ; } public final int getIntTemperature ( ) { return ( int ) ( temperature * <NUM_LIT> ) ; } public final float getFloatTemperature ( ) { return temperature ; } public void decorate ( World par1World , Random par2Random , int par3 , int par4 ) { biomeDecorator . decorate ( par1World , par2Random , par3 , par4 ) ; } } </s>
<s> package net . minecraft . src ; public class EnchantmentUntouching extends Enchantment { protected EnchantmentUntouching ( int par1 , int par2 ) { super ( par1 , par2 , EnumEnchantmentType . digger ) ; setName ( "<STR_LIT>" ) ; } public int getMinEnchantability ( int par1 ) { return <NUM_LIT> ; } public int getMaxEnchantability ( int par1 ) { return super . getMinEnchantability ( par1 ) + <NUM_LIT> ; } public int getMaxLevel ( ) { return <NUM_LIT:1> ; } public boolean canApplyTogether ( Enchantment par1Enchantment ) { return super . canApplyTogether ( par1Enchantment ) && par1Enchantment . effectId != fortune . effectId ; } } </s>
<s> package net . minecraft . src ; public abstract class WorldProvider { public World worldObj ; public WorldType terrainType ; public WorldChunkManager worldChunkMgr ; public boolean isHellWorld ; public boolean hasNoSky ; public float lightBrightnessTable [ ] ; public int worldType ; private float colorsSunriseSunset [ ] ; public WorldProvider ( ) { isHellWorld = false ; hasNoSky = false ; lightBrightnessTable = new float [ <NUM_LIT:16> ] ; worldType = <NUM_LIT:0> ; colorsSunriseSunset = new float [ <NUM_LIT:4> ] ; } public final void registerWorld ( World par1World ) { worldObj = par1World ; terrainType = par1World . getWorldInfo ( ) . getTerrainType ( ) ; registerWorldChunkManager ( ) ; generateLightBrightnessTable ( ) ; } protected void generateLightBrightnessTable ( ) { float f = <NUM_LIT> ; for ( int i = <NUM_LIT:0> ; i <= <NUM_LIT:15> ; i ++ ) { float f1 = <NUM_LIT> - ( float ) i / <NUM_LIT> ; lightBrightnessTable [ i ] = ( ( <NUM_LIT> - f1 ) / ( f1 * <NUM_LIT> + <NUM_LIT> ) ) * ( <NUM_LIT> - f ) + f ; } } protected void registerWorldChunkManager ( ) { if ( worldObj . getWorldInfo ( ) . getTerrainType ( ) == WorldType . FLAT ) { worldChunkMgr = new WorldChunkManagerHell ( BiomeGenBase . plains , <NUM_LIT> , <NUM_LIT> ) ; } else { worldChunkMgr = new WorldChunkManager ( worldObj ) ; } } public IChunkProvider getChunkProvider ( ) { if ( terrainType == WorldType . FLAT ) { return new ChunkProviderFlat ( worldObj , worldObj . getSeed ( ) , worldObj . getWorldInfo ( ) . isMapFeaturesEnabled ( ) ) ; } else { return new ChunkProviderGenerate ( worldObj , worldObj . getSeed ( ) , worldObj . getWorldInfo ( ) . isMapFeaturesEnabled ( ) ) ; } } public boolean canCoordinateBeSpawn ( int par1 , int par2 ) { int i = worldObj . getFirstUncoveredBlock ( par1 , par2 ) ; return i == Block . grass . blockID ; } public float calculateCelestialAngle ( long par1 , float par3 ) { int i = ( int ) ( par1 % <NUM_LIT> ) ; float f = ( ( float ) i + par3 ) / <NUM_LIT> - <NUM_LIT> ; if ( f < <NUM_LIT> ) { f ++ ; } if ( f > <NUM_LIT> ) { f -- ; } float f1 = f ; f = <NUM_LIT> - ( float ) ( ( Math . cos ( ( double ) f * Math . PI ) + <NUM_LIT> ) / <NUM_LIT> ) ; f = f1 + ( f - f1 ) / <NUM_LIT> ; return f ; } public boolean func_48567_d ( ) { return true ; } public boolean canRespawnHere ( ) { return true ; } public static WorldProvider getProviderForDimension ( int par0 ) { if ( par0 == - <NUM_LIT:1> ) { return new WorldProviderHell ( ) ; } if ( par0 == <NUM_LIT:0> ) { return new WorldProviderSurface ( ) ; } if ( par0 == <NUM_LIT:1> ) { return new WorldProviderEnd ( ) ; } else { return null ; } } public ChunkCoordinates getEntrancePortalLocation ( ) { return null ; } public int getAverageGroundLevel ( ) { return terrainType != WorldType . FLAT ? <NUM_LIT> : <NUM_LIT:4> ; } } </s>
<s> package net . minecraft . src ; public class RecipesWeapons { private String recipePatterns [ ] [ ] = { { "<STR_LIT:X>" , "<STR_LIT:X>" , "<STR_LIT:#>" } } ; private Object recipeItems [ ] [ ] ; public RecipesWeapons ( ) { recipeItems = ( new Object [ ] [ ] { new Object [ ] { Block . planks , Block . cobblestone , Item . ingotIron , Item . diamond , Item . ingotGold } , new Object [ ] { Item . swordWood , Item . swordStone , Item . swordSteel , Item . swordDiamond , Item . swordGold } } ) ; } public void addRecipes ( CraftingManager par1CraftingManager ) { for ( int i = <NUM_LIT:0> ; i < recipeItems [ <NUM_LIT:0> ] . length ; i ++ ) { Object obj = recipeItems [ <NUM_LIT:0> ] [ i ] ; for ( int j = <NUM_LIT:0> ; j < recipeItems . length - <NUM_LIT:1> ; j ++ ) { Item item = ( Item ) recipeItems [ j + <NUM_LIT:1> ] [ i ] ; par1CraftingManager . addRecipe ( new ItemStack ( item ) , new Object [ ] { recipePatterns [ j ] , '<CHAR_LIT>' , Item . stick , '<CHAR_LIT>' , obj } ) ; } } par1CraftingManager . addRecipe ( new ItemStack ( Item . bow , <NUM_LIT:1> ) , new Object [ ] { "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , '<CHAR_LIT>' , Item . silk , '<CHAR_LIT>' , Item . stick } ) ; par1CraftingManager . addRecipe ( new ItemStack ( Item . arrow , <NUM_LIT:4> ) , new Object [ ] { "<STR_LIT:X>" , "<STR_LIT:#>" , "<STR_LIT:Y>" , '<CHAR_LIT>' , Item . feather , '<CHAR_LIT>' , Item . flint , '<CHAR_LIT>' , Item . stick } ) ; } } </s>
<s> package net . minecraft . src ; import java . util . Random ; public class WorldGenForest extends WorldGenerator { public WorldGenForest ( boolean par1 ) { super ( par1 ) ; } public boolean generate ( World par1World , Random par2Random , int par3 , int par4 , int par5 ) { int i = par2Random . nextInt ( <NUM_LIT:3> ) + <NUM_LIT:5> ; boolean flag = true ; if ( par4 < <NUM_LIT:1> || par4 + i + <NUM_LIT:1> > <NUM_LIT> ) { return false ; } for ( int j = par4 ; j <= par4 + <NUM_LIT:1> + i ; j ++ ) { byte byte0 = <NUM_LIT:1> ; if ( j == par4 ) { byte0 = <NUM_LIT:0> ; } if ( j >= ( par4 + <NUM_LIT:1> + i ) - <NUM_LIT:2> ) { byte0 = <NUM_LIT:2> ; } for ( int j1 = par3 - byte0 ; j1 <= par3 + byte0 && flag ; j1 ++ ) { for ( int i2 = par5 - byte0 ; i2 <= par5 + byte0 && flag ; i2 ++ ) { if ( j >= <NUM_LIT:0> && j < <NUM_LIT> ) { int k2 = par1World . getBlockId ( j1 , j , i2 ) ; if ( k2 != <NUM_LIT:0> && k2 != Block . leaves . blockID ) { flag = false ; } } else { flag = false ; } } } } if ( ! flag ) { return false ; } int k = par1World . getBlockId ( par3 , par4 - <NUM_LIT:1> , par5 ) ; if ( k != Block . grass . blockID && k != Block . dirt . blockID || par4 >= <NUM_LIT> - i - <NUM_LIT:1> ) { return false ; } func_50023_a ( par1World , par3 , par4 - <NUM_LIT:1> , par5 , Block . dirt . blockID ) ; for ( int l = ( par4 - <NUM_LIT:3> ) + i ; l <= par4 + i ; l ++ ) { int k1 = l - ( par4 + i ) ; int j2 = <NUM_LIT:1> - k1 / <NUM_LIT:2> ; for ( int l2 = par3 - j2 ; l2 <= par3 + j2 ; l2 ++ ) { int i3 = l2 - par3 ; for ( int j3 = par5 - j2 ; j3 <= par5 + j2 ; j3 ++ ) { int k3 = j3 - par5 ; if ( ( Math . abs ( i3 ) != j2 || Math . abs ( k3 ) != j2 || par2Random . nextInt ( <NUM_LIT:2> ) != <NUM_LIT:0> && k1 != <NUM_LIT:0> ) && ! Block . opaqueCubeLookup [ par1World . getBlockId ( l2 , l , j3 ) ] ) { setBlockAndMetadata ( par1World , l2 , l , j3 , Block . leaves . blockID , <NUM_LIT:2> ) ; } } } } for ( int i1 = <NUM_LIT:0> ; i1 < i ; i1 ++ ) { int l1 = par1World . getBlockId ( par3 , par4 + i1 , par5 ) ; if ( l1 == <NUM_LIT:0> || l1 == Block . leaves . blockID ) { setBlockAndMetadata ( par1World , par3 , par4 + i1 , par5 , Block . wood . blockID , <NUM_LIT:2> ) ; } } return true ; } } </s>
<s> package net . minecraft . src ; import java . io . * ; import java . util . * ; public class NBTTagCompound extends NBTBase { private Map tagMap ; public NBTTagCompound ( ) { super ( "<STR_LIT>" ) ; tagMap = new HashMap ( ) ; } public NBTTagCompound ( String par1Str ) { super ( par1Str ) ; tagMap = new HashMap ( ) ; } void write ( DataOutput par1DataOutput ) throws IOException { NBTBase nbtbase ; for ( Iterator iterator = tagMap . values ( ) . iterator ( ) ; iterator . hasNext ( ) ; NBTBase . writeNamedTag ( nbtbase , par1DataOutput ) ) { nbtbase = ( NBTBase ) iterator . next ( ) ; } par1DataOutput . writeByte ( <NUM_LIT:0> ) ; } void load ( DataInput par1DataInput ) throws IOException { tagMap . clear ( ) ; NBTBase nbtbase ; for ( ; ( nbtbase = NBTBase . readNamedTag ( par1DataInput ) ) . getId ( ) != <NUM_LIT:0> ; tagMap . put ( nbtbase . getName ( ) , nbtbase ) ) { } } public Collection getTags ( ) { return tagMap . values ( ) ; } public byte getId ( ) { return <NUM_LIT:10> ; } public void setTag ( String par1Str , NBTBase par2NBTBase ) { tagMap . put ( par1Str , par2NBTBase . setName ( par1Str ) ) ; } public void setByte ( String par1Str , byte par2 ) { tagMap . put ( par1Str , new NBTTagByte ( par1Str , par2 ) ) ; } public void setShort ( String par1Str , short par2 ) { tagMap . put ( par1Str , new NBTTagShort ( par1Str , par2 ) ) ; } public void setInteger ( String par1Str , int par2 ) { tagMap . put ( par1Str , new NBTTagInt ( par1Str , par2 ) ) ; } public void setLong ( String par1Str , long par2 ) { tagMap . put ( par1Str , new NBTTagLong ( par1Str , par2 ) ) ; } public void setFloat ( String par1Str , float par2 ) { tagMap . put ( par1Str , new NBTTagFloat ( par1Str , par2 ) ) ; } public void setDouble ( String par1Str , double par2 ) { tagMap . put ( par1Str , new NBTTagDouble ( par1Str , par2 ) ) ; } public void setString ( String par1Str , String par2Str ) { tagMap . put ( par1Str , new NBTTagString ( par1Str , par2Str ) ) ; } public void setByteArray ( String par1Str , byte par2ArrayOfByte [ ] ) { tagMap . put ( par1Str , new NBTTagByteArray ( par1Str , par2ArrayOfByte ) ) ; } public void func_48446_a ( String par1Str , int par2ArrayOfInteger [ ] ) { tagMap . put ( par1Str , new NBTTagIntArray ( par1Str , par2ArrayOfInteger ) ) ; } public void setCompoundTag ( String par1Str , NBTTagCompound par2NBTTagCompound ) { tagMap . put ( par1Str , par2NBTTagCompound . setName ( par1Str ) ) ; } public void setBoolean ( String par1Str , boolean par2 ) { setByte ( par1Str , ( ( byte ) ( par2 ? <NUM_LIT:1> : <NUM_LIT:0> ) ) ) ; } public NBTBase getTag ( String par1Str ) { return ( NBTBase ) tagMap . get ( par1Str ) ; } public boolean hasKey ( String par1Str ) { return tagMap . containsKey ( par1Str ) ; } public byte getByte ( String par1Str ) { if ( ! tagMap . containsKey ( par1Str ) ) { return <NUM_LIT:0> ; } else { return ( ( NBTTagByte ) tagMap . get ( par1Str ) ) . data ; } } public short getShort ( String par1Str ) { if ( ! tagMap . containsKey ( par1Str ) ) { return <NUM_LIT:0> ; } else { return ( ( NBTTagShort ) tagMap . get ( par1Str ) ) . data ; } } public int getInteger ( String par1Str ) { if ( ! tagMap . containsKey ( par1Str ) ) { return <NUM_LIT:0> ; } else { return ( ( NBTTagInt ) tagMap . get ( par1Str ) ) . data ; } } public long getLong ( String par1Str ) { if ( ! tagMap . containsKey ( par1Str ) ) { return <NUM_LIT> ; } else { return ( ( NBTTagLong ) tagMap . get ( par1Str ) ) . data ; } } public float getFloat ( String par1Str ) { if ( ! tagMap . containsKey ( par1Str ) ) { return <NUM_LIT> ; } else { return ( ( NBTTagFloat ) tagMap . get ( par1Str ) ) . data ; } } public double getDouble ( String par1Str ) { if ( ! tagMap . containsKey ( par1Str ) ) { return <NUM_LIT> ; } else { return ( ( NBTTagDouble ) tagMap . get ( par1Str ) ) . data ; } } public String getString ( String par1Str ) { if ( ! tagMap . containsKey ( par1Str ) ) { return "<STR_LIT>" ; } else { return ( ( NBTTagString ) tagMap . get ( par1Str ) ) . data ; } } public byte [ ] getByteArray ( String par1Str ) { if ( ! tagMap . containsKey ( par1Str ) ) { return new byte [ <NUM_LIT:0> ] ; } else { return ( ( NBTTagByteArray ) tagMap . get ( par1Str ) ) . byteArray ; } } public int [ ] func_48445_l ( String par1Str ) { if ( ! tagMap . containsKey ( par1Str ) ) { return new int [ <NUM_LIT:0> ] ; } else { return ( ( NBTTagIntArray ) tagMap . get ( par1Str ) ) . field_48447_a ; } } public NBTTagCompound getCompoundTag ( String par1Str ) { if ( ! tagMap . containsKey ( par1Str ) ) { return new NBTTagCompound ( par1Str ) ; } else { return ( NBTTagCompound ) tagMap . get ( par1Str ) ; } } public NBTTagList getTagList ( String par1Str ) { if ( ! tagMap . containsKey ( par1Str ) ) { return new NBTTagList ( par1Str ) ; } else { return ( NBTTagList ) tagMap . get ( par1Str ) ; } } public boolean getBoolean ( String par1Str ) { return getByte ( par1Str ) != <NUM_LIT:0> ; } public String toString ( ) { return ( new StringBuilder ( ) ) . append ( "<STR_LIT>" ) . append ( tagMap . size ( ) ) . append ( "<STR_LIT>" ) . toString ( ) ; } public NBTBase copy ( ) { NBTTagCompound nbttagcompound = new NBTTagCompound ( getName ( ) ) ; String s ; for ( Iterator iterator = tagMap . keySet ( ) . iterator ( ) ; iterator . hasNext ( ) ; nbttagcompound . setTag ( s , ( ( NBTBase ) tagMap . get ( s ) ) . copy ( ) ) ) { s = ( String ) iterator . next ( ) ; } return nbttagcompound ; } public boolean equals ( Object par1Obj ) { if ( super . equals ( par1Obj ) ) { NBTTagCompound nbttagcompound = ( NBTTagCompound ) par1Obj ; return tagMap . entrySet ( ) . equals ( nbttagcompound . tagMap . entrySet ( ) ) ; } else { return false ; } } public int hashCode ( ) { return super . hashCode ( ) ^ tagMap . hashCode ( ) ; } } </s>
<s> package net . minecraft . src ; import java . util . Random ; public class TileEntityEnchantmentTable extends TileEntity { public int tickCount ; public float pageFlip ; public float pageFlipPrev ; public float field_40066_d ; public float field_40067_e ; public float bookSpread ; public float bookSpreadPrev ; public float bookRotation2 ; public float bookRotationPrev ; public float bookRotation ; private static Random rand = new Random ( ) ; public TileEntityEnchantmentTable ( ) { } public void updateEntity ( ) { super . updateEntity ( ) ; bookSpreadPrev = bookSpread ; bookRotationPrev = bookRotation2 ; EntityPlayer entityplayer = worldObj . getClosestPlayer ( ( float ) xCoord + <NUM_LIT> , ( float ) yCoord + <NUM_LIT> , ( float ) zCoord + <NUM_LIT> , <NUM_LIT> ) ; if ( entityplayer != null ) { double d = entityplayer . posX - ( double ) ( ( float ) xCoord + <NUM_LIT> ) ; double d1 = entityplayer . posZ - ( double ) ( ( float ) zCoord + <NUM_LIT> ) ; bookRotation = ( float ) Math . atan2 ( d1 , d ) ; bookSpread += <NUM_LIT> ; if ( bookSpread < <NUM_LIT> || rand . nextInt ( <NUM_LIT> ) == <NUM_LIT:0> ) { float f3 = field_40066_d ; do { field_40066_d += rand . nextInt ( <NUM_LIT:4> ) - rand . nextInt ( <NUM_LIT:4> ) ; } while ( f3 == field_40066_d ) ; } } else { bookRotation += <NUM_LIT> ; bookSpread -= <NUM_LIT> ; } for ( ; bookRotation2 >= ( float ) Math . PI ; bookRotation2 -= ( ( float ) Math . PI * <NUM_LIT> ) ) { } for ( ; bookRotation2 < - ( float ) Math . PI ; bookRotation2 += ( ( float ) Math . PI * <NUM_LIT> ) ) { } for ( ; bookRotation >= ( float ) Math . PI ; bookRotation -= ( ( float ) Math . PI * <NUM_LIT> ) ) { } for ( ; bookRotation < - ( float ) Math . PI ; bookRotation += ( ( float ) Math . PI * <NUM_LIT> ) ) { } float f ; for ( f = bookRotation - bookRotation2 ; f >= ( float ) Math . PI ; f -= ( ( float ) Math . PI * <NUM_LIT> ) ) { } for ( ; f < - ( float ) Math . PI ; f += ( ( float ) Math . PI * <NUM_LIT> ) ) { } bookRotation2 += f * <NUM_LIT> ; if ( bookSpread < <NUM_LIT> ) { bookSpread = <NUM_LIT> ; } if ( bookSpread > <NUM_LIT> ) { bookSpread = <NUM_LIT> ; } tickCount ++ ; pageFlipPrev = pageFlip ; float f1 = ( field_40066_d - pageFlip ) * <NUM_LIT> ; float f2 = <NUM_LIT> ; if ( f1 < - f2 ) { f1 = - f2 ; } if ( f1 > f2 ) { f1 = f2 ; } field_40067_e += ( f1 - field_40067_e ) * <NUM_LIT> ; pageFlip = pageFlip + field_40067_e ; } } </s>
<s> package net . minecraft . src ; import java . io . * ; public class Packet13PlayerLookMove extends Packet10Flying { public Packet13PlayerLookMove ( ) { rotating = true ; moving = true ; } public Packet13PlayerLookMove ( double par1 , double par3 , double par5 , double par7 , float par9 , float par10 , boolean par11 ) { xPosition = par1 ; yPosition = par3 ; stance = par5 ; zPosition = par7 ; yaw = par9 ; pitch = par10 ; onGround = par11 ; rotating = true ; moving = true ; } public void readPacketData ( DataInputStream par1DataInputStream ) throws IOException { xPosition = par1DataInputStream . readDouble ( ) ; yPosition = par1DataInputStream . readDouble ( ) ; stance = par1DataInputStream . readDouble ( ) ; zPosition = par1DataInputStream . readDouble ( ) ; yaw = par1DataInputStream . readFloat ( ) ; pitch = par1DataInputStream . readFloat ( ) ; super . readPacketData ( par1DataInputStream ) ; } public void writePacketData ( DataOutputStream par1DataOutputStream ) throws IOException { par1DataOutputStream . writeDouble ( xPosition ) ; par1DataOutputStream . writeDouble ( yPosition ) ; par1DataOutputStream . writeDouble ( stance ) ; par1DataOutputStream . writeDouble ( zPosition ) ; par1DataOutputStream . writeFloat ( yaw ) ; par1DataOutputStream . writeFloat ( pitch ) ; super . writePacketData ( par1DataOutputStream ) ; } public int getPacketSize ( ) { return <NUM_LIT> ; } } </s>
<s> package net . minecraft . src ; public class EntityAIOcelotAttack extends EntityAIBase { World theWorld ; EntityLiving theEntity ; EntityLiving field_48170_c ; int field_48168_d ; public EntityAIOcelotAttack ( EntityLiving par1EntityLiving ) { field_48168_d = <NUM_LIT:0> ; theEntity = par1EntityLiving ; theWorld = par1EntityLiving . worldObj ; setMutexBits ( <NUM_LIT:3> ) ; } public boolean shouldExecute ( ) { EntityLiving entityliving = theEntity . getAttackTarget ( ) ; if ( entityliving == null ) { return false ; } else { field_48170_c = entityliving ; return true ; } } public boolean continueExecuting ( ) { if ( ! field_48170_c . isEntityAlive ( ) ) { return false ; } if ( theEntity . getDistanceSqToEntity ( field_48170_c ) > <NUM_LIT> ) { return false ; } else { return ! theEntity . getNavigator ( ) . noPath ( ) || shouldExecute ( ) ; } } public void resetTask ( ) { field_48170_c = null ; theEntity . getNavigator ( ) . clearPathEntity ( ) ; } public void updateTask ( ) { theEntity . getLookHelper ( ) . setLookPositionWithEntity ( field_48170_c , <NUM_LIT> , <NUM_LIT> ) ; double d = theEntity . width * <NUM_LIT> * ( theEntity . width * <NUM_LIT> ) ; double d1 = theEntity . getDistanceSq ( field_48170_c . posX , field_48170_c . boundingBox . minY , field_48170_c . posZ ) ; float f = <NUM_LIT> ; if ( d1 > d && d1 < <NUM_LIT> ) { f = <NUM_LIT> ; } else if ( d1 < <NUM_LIT> ) { f = <NUM_LIT> ; } theEntity . getNavigator ( ) . func_48652_a ( field_48170_c , f ) ; field_48168_d = Math . max ( field_48168_d - <NUM_LIT:1> , <NUM_LIT:0> ) ; if ( d1 > d ) { return ; } if ( field_48168_d > <NUM_LIT:0> ) { return ; } else { field_48168_d = <NUM_LIT:20> ; theEntity . attackEntityAsMob ( field_48170_c ) ; return ; } } } </s>
<s> package net . minecraft . src ; public class RecipesIngots { private Object recipeItems [ ] [ ] ; public RecipesIngots ( ) { recipeItems = ( new Object [ ] [ ] { new Object [ ] { Block . blockGold , new ItemStack ( Item . ingotGold , <NUM_LIT:9> ) } , new Object [ ] { Block . blockSteel , new ItemStack ( Item . ingotIron , <NUM_LIT:9> ) } , new Object [ ] { Block . blockDiamond , new ItemStack ( Item . diamond , <NUM_LIT:9> ) } , new Object [ ] { Block . blockLapis , new ItemStack ( Item . dyePowder , <NUM_LIT:9> , <NUM_LIT:4> ) } } ) ; } public void addRecipes ( CraftingManager par1CraftingManager ) { for ( int i = <NUM_LIT:0> ; i < recipeItems . length ; i ++ ) { Block block = ( Block ) recipeItems [ i ] [ <NUM_LIT:0> ] ; ItemStack itemstack = ( ItemStack ) recipeItems [ i ] [ <NUM_LIT:1> ] ; par1CraftingManager . addRecipe ( new ItemStack ( block ) , new Object [ ] { "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , '<CHAR_LIT>' , itemstack } ) ; par1CraftingManager . addRecipe ( itemstack , new Object [ ] { "<STR_LIT:#>" , '<CHAR_LIT>' , block } ) ; } par1CraftingManager . addRecipe ( new ItemStack ( Item . ingotGold ) , new Object [ ] { "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , '<CHAR_LIT>' , Item . goldNugget } ) ; par1CraftingManager . addRecipe ( new ItemStack ( Item . goldNugget , <NUM_LIT:9> ) , new Object [ ] { "<STR_LIT:#>" , '<CHAR_LIT>' , Item . ingotGold } ) ; } } </s>
<s> package net . minecraft . src ; public class ItemPainting extends Item { public ItemPainting ( int par1 ) { super ( par1 ) ; } public boolean onItemUse ( ItemStack par1ItemStack , EntityPlayer par2EntityPlayer , World par3World , int par4 , int par5 , int par6 , int par7 ) { if ( par7 == <NUM_LIT:0> ) { return false ; } if ( par7 == <NUM_LIT:1> ) { return false ; } byte byte0 = <NUM_LIT:0> ; if ( par7 == <NUM_LIT:4> ) { byte0 = <NUM_LIT:1> ; } if ( par7 == <NUM_LIT:3> ) { byte0 = <NUM_LIT:2> ; } if ( par7 == <NUM_LIT:5> ) { byte0 = <NUM_LIT:3> ; } if ( ! par2EntityPlayer . canPlayerEdit ( par4 , par5 , par6 ) ) { return false ; } EntityPainting entitypainting = new EntityPainting ( par3World , par4 , par5 , par6 , byte0 ) ; if ( entitypainting . onValidSurface ( ) ) { if ( ! par3World . isRemote ) { par3World . spawnEntityInWorld ( entitypainting ) ; } par1ItemStack . stackSize -- ; } return true ; } } </s>
<s> package net . minecraft . src ; public class GenLayerHills extends GenLayer { public GenLayerHills ( long par1 , GenLayer par3GenLayer ) { super ( par1 ) ; parent = par3GenLayer ; } public int [ ] getInts ( int par1 , int par2 , int par3 , int par4 ) { int ai [ ] = parent . getInts ( par1 - <NUM_LIT:1> , par2 - <NUM_LIT:1> , par3 + <NUM_LIT:2> , par4 + <NUM_LIT:2> ) ; int ai1 [ ] = IntCache . getIntCache ( par3 * par4 ) ; for ( int i = <NUM_LIT:0> ; i < par4 ; i ++ ) { for ( int j = <NUM_LIT:0> ; j < par3 ; j ++ ) { initChunkSeed ( j + par1 , i + par2 ) ; int k = ai [ j + <NUM_LIT:1> + ( i + <NUM_LIT:1> ) * ( par3 + <NUM_LIT:2> ) ] ; if ( nextInt ( <NUM_LIT:3> ) == <NUM_LIT:0> ) { int l = k ; if ( k == BiomeGenBase . desert . biomeID ) { l = BiomeGenBase . desertHills . biomeID ; } else if ( k == BiomeGenBase . forest . biomeID ) { l = BiomeGenBase . forestHills . biomeID ; } else if ( k == BiomeGenBase . taiga . biomeID ) { l = BiomeGenBase . taigaHills . biomeID ; } else if ( k == BiomeGenBase . plains . biomeID ) { l = BiomeGenBase . forest . biomeID ; } else if ( k == BiomeGenBase . icePlains . biomeID ) { l = BiomeGenBase . iceMountains . biomeID ; } else if ( k == BiomeGenBase . jungle . biomeID ) { l = BiomeGenBase . jungleHills . biomeID ; } if ( l != k ) { int i1 = ai [ j + <NUM_LIT:1> + ( ( i + <NUM_LIT:1> ) - <NUM_LIT:1> ) * ( par3 + <NUM_LIT:2> ) ] ; int j1 = ai [ j + <NUM_LIT:1> + <NUM_LIT:1> + ( i + <NUM_LIT:1> ) * ( par3 + <NUM_LIT:2> ) ] ; int k1 = ai [ ( ( j + <NUM_LIT:1> ) - <NUM_LIT:1> ) + ( i + <NUM_LIT:1> ) * ( par3 + <NUM_LIT:2> ) ] ; int l1 = ai [ j + <NUM_LIT:1> + ( i + <NUM_LIT:1> + <NUM_LIT:1> ) * ( par3 + <NUM_LIT:2> ) ] ; if ( i1 == k && j1 == k && k1 == k && l1 == k ) { ai1 [ j + i * par3 ] = l ; } else { ai1 [ j + i * par3 ] = k ; } } else { ai1 [ j + i * par3 ] = k ; } } else { ai1 [ j + i * par3 ] = k ; } } } return ai1 ; } } </s>
<s> package net . minecraft . src ; import java . io . * ; public class Packet20NamedEntitySpawn extends Packet { public int entityId ; public String name ; public int xPosition ; public int yPosition ; public int zPosition ; public byte rotation ; public byte pitch ; public int currentItem ; public Packet20NamedEntitySpawn ( ) { } public Packet20NamedEntitySpawn ( EntityPlayer par1EntityPlayer ) { entityId = par1EntityPlayer . entityId ; name = par1EntityPlayer . username ; xPosition = MathHelper . floor_double ( par1EntityPlayer . posX * <NUM_LIT> ) ; yPosition = MathHelper . floor_double ( par1EntityPlayer . posY * <NUM_LIT> ) ; zPosition = MathHelper . floor_double ( par1EntityPlayer . posZ * <NUM_LIT> ) ; rotation = ( byte ) ( int ) ( ( par1EntityPlayer . rotationYaw * <NUM_LIT> ) / <NUM_LIT> ) ; pitch = ( byte ) ( int ) ( ( par1EntityPlayer . rotationPitch * <NUM_LIT> ) / <NUM_LIT> ) ; ItemStack itemstack = par1EntityPlayer . inventory . getCurrentItem ( ) ; currentItem = itemstack != null ? itemstack . itemID : <NUM_LIT:0> ; } public void readPacketData ( DataInputStream par1DataInputStream ) throws IOException { entityId = par1DataInputStream . readInt ( ) ; name = readString ( par1DataInputStream , <NUM_LIT:16> ) ; xPosition = par1DataInputStream . readInt ( ) ; yPosition = par1DataInputStream . readInt ( ) ; zPosition = par1DataInputStream . readInt ( ) ; rotation = par1DataInputStream . readByte ( ) ; pitch = par1DataInputStream . readByte ( ) ; currentItem = par1DataInputStream . readShort ( ) ; } public void writePacketData ( DataOutputStream par1DataOutputStream ) throws IOException { par1DataOutputStream . writeInt ( entityId ) ; writeString ( name , par1DataOutputStream ) ; par1DataOutputStream . writeInt ( xPosition ) ; par1DataOutputStream . writeInt ( yPosition ) ; par1DataOutputStream . writeInt ( zPosition ) ; par1DataOutputStream . writeByte ( rotation ) ; par1DataOutputStream . writeByte ( pitch ) ; par1DataOutputStream . writeShort ( currentItem ) ; } public void processPacket ( NetHandler par1NetHandler ) { par1NetHandler . handleNamedEntitySpawn ( this ) ; } public int getPacketSize ( ) { return <NUM_LIT> ; } } </s>
<s> package net . minecraft . src ; import java . io . * ; public class Packet14BlockDig extends Packet { public int xPosition ; public int yPosition ; public int zPosition ; public int face ; public int status ; public Packet14BlockDig ( ) { } public void readPacketData ( DataInputStream par1DataInputStream ) throws IOException { status = par1DataInputStream . read ( ) ; xPosition = par1DataInputStream . readInt ( ) ; yPosition = par1DataInputStream . read ( ) ; zPosition = par1DataInputStream . readInt ( ) ; face = par1DataInputStream . read ( ) ; } public void writePacketData ( DataOutputStream par1DataOutputStream ) throws IOException { par1DataOutputStream . write ( status ) ; par1DataOutputStream . writeInt ( xPosition ) ; par1DataOutputStream . write ( yPosition ) ; par1DataOutputStream . writeInt ( zPosition ) ; par1DataOutputStream . write ( face ) ; } public void processPacket ( NetHandler par1NetHandler ) { par1NetHandler . handleBlockDig ( this ) ; } public int getPacketSize ( ) { return <NUM_LIT:11> ; } } </s>