text
stringlengths
30
1.67M
<s> package net . minecraft . src ; import java . io . * ; public class Packet25EntityPainting extends Packet { public int entityId ; public int xPosition ; public int yPosition ; public int zPosition ; public int direction ; public String title ; public Packet25EntityPainting ( ) { } public Packet25EntityPainting ( EntityPainting par1EntityPainting ) { entityId = par1EntityPainting . entityId ; xPosition = par1EntityPainting . xPosition ; yPosition = par1EntityPainting . yPosition ; zPosition = par1EntityPainting . zPosition ; direction = par1EntityPainting . direction ; title = par1EntityPainting . art . title ; } public void readPacketData ( DataInputStream par1DataInputStream ) throws IOException { entityId = par1DataInputStream . readInt ( ) ; title = readString ( par1DataInputStream , EnumArt . maxArtTitleLength ) ; xPosition = par1DataInputStream . readInt ( ) ; yPosition = par1DataInputStream . readInt ( ) ; zPosition = par1DataInputStream . readInt ( ) ; direction = par1DataInputStream . readInt ( ) ; } public void writePacketData ( DataOutputStream par1DataOutputStream ) throws IOException { par1DataOutputStream . writeInt ( entityId ) ; writeString ( title , par1DataOutputStream ) ; par1DataOutputStream . writeInt ( xPosition ) ; par1DataOutputStream . writeInt ( yPosition ) ; par1DataOutputStream . writeInt ( zPosition ) ; par1DataOutputStream . writeInt ( direction ) ; } public void processPacket ( NetHandler par1NetHandler ) { par1NetHandler . handleEntityPainting ( this ) ; } public int getPacketSize ( ) { return <NUM_LIT:24> ; } } </s>
<s> package net . minecraft . src ; import java . util . Random ; public class EntityAIWatchClosest extends EntityAIBase { private EntityLiving field_46110_a ; private Entity closestEntity ; private float field_46106_d ; private int field_46107_e ; private float field_48241_e ; private Class field_48240_f ; public EntityAIWatchClosest ( EntityLiving par1EntityLiving , Class par2Class , float par3 ) { field_46110_a = par1EntityLiving ; field_48240_f = par2Class ; field_46106_d = par3 ; field_48241_e = <NUM_LIT> ; setMutexBits ( <NUM_LIT:2> ) ; } public EntityAIWatchClosest ( EntityLiving par1EntityLiving , Class par2Class , float par3 , float par4 ) { field_46110_a = par1EntityLiving ; field_48240_f = par2Class ; field_46106_d = par3 ; field_48241_e = par4 ; setMutexBits ( <NUM_LIT:2> ) ; } public boolean shouldExecute ( ) { if ( field_46110_a . getRNG ( ) . nextFloat ( ) >= field_48241_e ) { return false ; } if ( field_48240_f == ( net . minecraft . src . EntityPlayer . class ) ) { closestEntity = field_46110_a . worldObj . getClosestPlayerToEntity ( field_46110_a , field_46106_d ) ; } else { closestEntity = field_46110_a . worldObj . findNearestEntityWithinAABB ( field_48240_f , field_46110_a . boundingBox . expand ( field_46106_d , <NUM_LIT> , field_46106_d ) , field_46110_a ) ; } return closestEntity != null ; } public boolean continueExecuting ( ) { if ( ! closestEntity . isEntityAlive ( ) ) { return false ; } if ( field_46110_a . getDistanceSqToEntity ( closestEntity ) > ( double ) ( field_46106_d * field_46106_d ) ) { return false ; } else { return field_46107_e > <NUM_LIT:0> ; } } public void startExecuting ( ) { field_46107_e = <NUM_LIT> + field_46110_a . getRNG ( ) . nextInt ( <NUM_LIT> ) ; } public void resetTask ( ) { closestEntity = null ; } public void updateTask ( ) { field_46110_a . getLookHelper ( ) . setLookPosition ( closestEntity . posX , closestEntity . posY + ( double ) closestEntity . getEyeHeight ( ) , closestEntity . posZ , <NUM_LIT> , field_46110_a . getVerticalFaceSpeed ( ) ) ; field_46107_e -- ; } } </s>
<s> package net . minecraft . src ; public class Material { public static final Material air ; public static final Material grass ; public static final Material ground ; public static final Material wood ; public static final Material rock ; public static final Material iron ; public static final Material water ; public static final Material lava ; public static final Material leaves ; public static final Material plants ; public static final Material vine ; public static final Material sponge ; public static final Material cloth ; public static final Material fire ; public static final Material sand ; public static final Material circuits ; public static final Material glass ; public static final Material redstoneLight ; public static final Material tnt ; public static final Material unused ; public static final Material ice ; public static final Material snow ; public static final Material craftedSnow ; public static final Material cactus ; public static final Material clay ; public static final Material pumpkin ; public static final Material dragonEgg ; public static final Material portal ; public static final Material cake ; public static final Material web ; public static final Material piston ; private boolean canBurn ; private boolean groundCover ; private boolean isTranslucent ; public final MapColor materialMapColor ; private boolean canHarvest ; private int mobilityFlag ; public Material ( MapColor par1MapColor ) { canHarvest = true ; materialMapColor = par1MapColor ; } public boolean isLiquid ( ) { return false ; } public boolean isSolid ( ) { return true ; } public boolean getCanBlockGrass ( ) { return true ; } public boolean blocksMovement ( ) { return true ; } private Material setTranslucent ( ) { isTranslucent = true ; return this ; } protected Material setNoHarvest ( ) { canHarvest = false ; return this ; } protected Material setBurning ( ) { canBurn = true ; return this ; } public boolean getCanBurn ( ) { return canBurn ; } public Material setGroundCover ( ) { groundCover = true ; return this ; } public boolean isGroundCover ( ) { return groundCover ; } public boolean isOpaque ( ) { if ( isTranslucent ) { return false ; } else { return blocksMovement ( ) ; } } public boolean isHarvestable ( ) { return canHarvest ; } public int getMaterialMobility ( ) { return mobilityFlag ; } protected Material setNoPushMobility ( ) { mobilityFlag = <NUM_LIT:1> ; return this ; } protected Material setImmovableMobility ( ) { mobilityFlag = <NUM_LIT:2> ; return this ; } static { air = new MaterialTransparent ( MapColor . airColor ) ; grass = new Material ( MapColor . grassColor ) ; ground = new Material ( MapColor . dirtColor ) ; wood = ( new Material ( MapColor . woodColor ) ) . setBurning ( ) ; rock = ( new Material ( MapColor . stoneColor ) ) . setNoHarvest ( ) ; iron = ( new Material ( MapColor . ironColor ) ) . setNoHarvest ( ) ; water = ( new MaterialLiquid ( MapColor . waterColor ) ) . setNoPushMobility ( ) ; lava = ( new MaterialLiquid ( MapColor . tntColor ) ) . setNoPushMobility ( ) ; leaves = ( new Material ( MapColor . foliageColor ) ) . setBurning ( ) . setTranslucent ( ) . setNoPushMobility ( ) ; plants = ( new MaterialLogic ( MapColor . foliageColor ) ) . setNoPushMobility ( ) ; vine = ( new MaterialLogic ( MapColor . foliageColor ) ) . setBurning ( ) . setNoPushMobility ( ) . setGroundCover ( ) ; sponge = new Material ( MapColor . clothColor ) ; cloth = ( new Material ( MapColor . clothColor ) ) . setBurning ( ) ; fire = ( new MaterialTransparent ( MapColor . airColor ) ) . setNoPushMobility ( ) ; sand = new Material ( MapColor . sandColor ) ; circuits = ( new MaterialLogic ( MapColor . airColor ) ) . setNoPushMobility ( ) ; glass = ( new Material ( MapColor . airColor ) ) . setTranslucent ( ) ; redstoneLight = new Material ( MapColor . airColor ) ; tnt = ( new Material ( MapColor . tntColor ) ) . setBurning ( ) . setTranslucent ( ) ; unused = ( new Material ( MapColor . foliageColor ) ) . setNoPushMobility ( ) ; ice = ( new Material ( MapColor . iceColor ) ) . setTranslucent ( ) ; snow = ( new MaterialLogic ( MapColor . snowColor ) ) . setGroundCover ( ) . setTranslucent ( ) . setNoHarvest ( ) . setNoPushMobility ( ) ; craftedSnow = ( new Material ( MapColor . snowColor ) ) . setNoHarvest ( ) ; cactus = ( new Material ( MapColor . foliageColor ) ) . setTranslucent ( ) . setNoPushMobility ( ) ; clay = new Material ( MapColor . clayColor ) ; pumpkin = ( new Material ( MapColor . foliageColor ) ) . setNoPushMobility ( ) ; dragonEgg = ( new Material ( MapColor . foliageColor ) ) . setNoPushMobility ( ) ; portal = ( new MaterialPortal ( MapColor . airColor ) ) . setImmovableMobility ( ) ; cake = ( new Material ( MapColor . airColor ) ) . setNoPushMobility ( ) ; web = ( new MaterialWeb ( MapColor . clothColor ) ) . setNoHarvest ( ) . setNoPushMobility ( ) ; piston = ( new Material ( MapColor . stoneColor ) ) . setImmovableMobility ( ) ; } } </s>
<s> package net . minecraft . src ; public class EnchantmentDigging extends Enchantment { protected EnchantmentDigging ( int par1 , int par2 ) { super ( par1 , par2 , EnumEnchantmentType . digger ) ; setName ( "<STR_LIT>" ) ; } public int getMinEnchantability ( int par1 ) { return <NUM_LIT:1> + <NUM_LIT:15> * ( par1 - <NUM_LIT:1> ) ; } public int getMaxEnchantability ( int par1 ) { return super . getMinEnchantability ( par1 ) + <NUM_LIT> ; } public int getMaxLevel ( ) { return <NUM_LIT:5> ; } } </s>
<s> package net . minecraft . src ; public class EntityAIDefendVillage extends EntityAITarget { EntityIronGolem irongolem ; EntityLiving villageAgressorTarget ; public EntityAIDefendVillage ( EntityIronGolem par1EntityIronGolem ) { super ( par1EntityIronGolem , <NUM_LIT> , false , true ) ; irongolem = par1EntityIronGolem ; setMutexBits ( <NUM_LIT:1> ) ; } public boolean shouldExecute ( ) { Village village = irongolem . getVillage ( ) ; if ( village == null ) { return false ; } else { villageAgressorTarget = village . findNearestVillageAggressor ( irongolem ) ; return func_48284_a ( villageAgressorTarget , false ) ; } } public void startExecuting ( ) { irongolem . setAttackTarget ( villageAgressorTarget ) ; super . startExecuting ( ) ; } } </s>
<s> package net . minecraft . src ; import java . util . List ; import java . util . Random ; public abstract class Entity { private static int nextEntityID = <NUM_LIT:0> ; public int entityId ; public double renderDistanceWeight ; public boolean preventEntitySpawning ; public Entity riddenByEntity ; public Entity ridingEntity ; public World worldObj ; public double prevPosX ; public double prevPosY ; public double prevPosZ ; public double posX ; public double posY ; public double posZ ; public double motionX ; public double motionY ; public double motionZ ; public float rotationYaw ; public float rotationPitch ; public float prevRotationYaw ; public float prevRotationPitch ; public final AxisAlignedBB boundingBox = AxisAlignedBB . getBoundingBox ( <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> ) ; public boolean onGround ; public boolean isCollidedHorizontally ; public boolean isCollidedVertically ; public boolean isCollided ; public boolean velocityChanged ; protected boolean isInWeb ; public boolean field_9077_F ; public boolean isDead ; public float yOffset ; public float width ; public float height ; public float prevDistanceWalkedModified ; public float distanceWalkedModified ; public float fallDistance ; private int nextStepDistance ; public double lastTickPosX ; public double lastTickPosY ; public double lastTickPosZ ; public float ySize ; public float stepHeight ; public boolean noClip ; public float entityCollisionReduction ; protected Random rand ; public int ticksExisted ; public int fireResistance ; private int fire ; protected boolean inWater ; public int heartsLife ; private boolean firstUpdate ; protected boolean isImmuneToFire ; protected DataWatcher dataWatcher ; private double entityRiderPitchDelta ; private double entityRiderYawDelta ; public boolean addedToChunk ; public int chunkCoordX ; public int chunkCoordY ; public int chunkCoordZ ; public boolean ignoreFrustumCheck ; public boolean isAirBorne ; public Entity ( World par1World ) { entityId = nextEntityID ++ ; renderDistanceWeight = <NUM_LIT> ; preventEntitySpawning = false ; onGround = false ; isCollided = false ; velocityChanged = false ; field_9077_F = true ; isDead = false ; yOffset = <NUM_LIT> ; width = <NUM_LIT> ; height = <NUM_LIT> ; prevDistanceWalkedModified = <NUM_LIT> ; distanceWalkedModified = <NUM_LIT> ; fallDistance = <NUM_LIT> ; nextStepDistance = <NUM_LIT:1> ; ySize = <NUM_LIT> ; stepHeight = <NUM_LIT> ; noClip = false ; entityCollisionReduction = <NUM_LIT> ; rand = new Random ( ) ; ticksExisted = <NUM_LIT:0> ; fireResistance = <NUM_LIT:1> ; fire = <NUM_LIT:0> ; inWater = false ; heartsLife = <NUM_LIT:0> ; firstUpdate = true ; isImmuneToFire = false ; dataWatcher = new DataWatcher ( ) ; addedToChunk = false ; worldObj = par1World ; setPosition ( <NUM_LIT> , <NUM_LIT> , <NUM_LIT> ) ; dataWatcher . addObject ( <NUM_LIT:0> , Byte . valueOf ( ( byte ) <NUM_LIT:0> ) ) ; dataWatcher . addObject ( <NUM_LIT:1> , Short . valueOf ( ( short ) <NUM_LIT> ) ) ; entityInit ( ) ; } protected abstract void entityInit ( ) ; public DataWatcher getDataWatcher ( ) { return dataWatcher ; } public boolean equals ( Object par1Obj ) { if ( par1Obj instanceof Entity ) { return ( ( Entity ) par1Obj ) . entityId == entityId ; } else { return false ; } } public int hashCode ( ) { return entityId ; } public void setDead ( ) { isDead = true ; } protected void setSize ( float par1 , float par2 ) { width = par1 ; height = par2 ; } protected void setRotation ( float par1 , float par2 ) { rotationYaw = par1 % <NUM_LIT> ; rotationPitch = par2 % <NUM_LIT> ; } public void setPosition ( double par1 , double par3 , double par5 ) { posX = par1 ; posY = par3 ; posZ = par5 ; float f = width / <NUM_LIT> ; float f1 = height ; boundingBox . setBounds ( par1 - ( double ) f , ( par3 - ( double ) yOffset ) + ( double ) ySize , par5 - ( double ) f , par1 + ( double ) f , ( par3 - ( double ) yOffset ) + ( double ) ySize + ( double ) f1 , par5 + ( double ) f ) ; } public void onUpdate ( ) { onEntityUpdate ( ) ; } public void onEntityUpdate ( ) { Profiler . startSection ( "<STR_LIT>" ) ; if ( ridingEntity != null && ridingEntity . isDead ) { ridingEntity = null ; } ticksExisted ++ ; prevDistanceWalkedModified = distanceWalkedModified ; prevPosX = posX ; prevPosY = posY ; prevPosZ = posZ ; prevRotationPitch = rotationPitch ; prevRotationYaw = rotationYaw ; if ( isSprinting ( ) && ! isInWater ( ) ) { int i = MathHelper . floor_double ( posX ) ; int j = MathHelper . floor_double ( posY - <NUM_LIT> - ( double ) yOffset ) ; int k = MathHelper . floor_double ( posZ ) ; int j1 = worldObj . getBlockId ( i , j , k ) ; if ( j1 > <NUM_LIT:0> ) { worldObj . spawnParticle ( ( new StringBuilder ( ) ) . append ( "<STR_LIT>" ) . append ( j1 ) . toString ( ) , posX + ( ( double ) rand . nextFloat ( ) - <NUM_LIT> ) * ( double ) width , boundingBox . minY + <NUM_LIT> , posZ + ( ( double ) rand . nextFloat ( ) - <NUM_LIT> ) * ( double ) width , - motionX * <NUM_LIT> , <NUM_LIT> , - motionZ * <NUM_LIT> ) ; } } if ( handleWaterMovement ( ) ) { if ( ! inWater && ! firstUpdate ) { float f = MathHelper . sqrt_double ( motionX * motionX * <NUM_LIT> + motionY * motionY + motionZ * motionZ * <NUM_LIT> ) * <NUM_LIT> ; if ( f > <NUM_LIT> ) { f = <NUM_LIT> ; } worldObj . playSoundAtEntity ( this , "<STR_LIT>" , f , <NUM_LIT> + ( rand . nextFloat ( ) - rand . nextFloat ( ) ) * <NUM_LIT> ) ; float f1 = MathHelper . floor_double ( boundingBox . minY ) ; for ( int l = <NUM_LIT:0> ; ( float ) l < <NUM_LIT> + width * <NUM_LIT> ; l ++ ) { float f2 = ( rand . nextFloat ( ) * <NUM_LIT> - <NUM_LIT> ) * width ; float f4 = ( rand . nextFloat ( ) * <NUM_LIT> - <NUM_LIT> ) * width ; worldObj . spawnParticle ( "<STR_LIT>" , posX + ( double ) f2 , f1 + <NUM_LIT> , posZ + ( double ) f4 , motionX , motionY - ( double ) ( rand . nextFloat ( ) * <NUM_LIT> ) , motionZ ) ; } for ( int i1 = <NUM_LIT:0> ; ( float ) i1 < <NUM_LIT> + width * <NUM_LIT> ; i1 ++ ) { float f3 = ( rand . nextFloat ( ) * <NUM_LIT> - <NUM_LIT> ) * width ; float f5 = ( rand . nextFloat ( ) * <NUM_LIT> - <NUM_LIT> ) * width ; worldObj . spawnParticle ( "<STR_LIT>" , posX + ( double ) f3 , f1 + <NUM_LIT> , posZ + ( double ) f5 , motionX , motionY , motionZ ) ; } } fallDistance = <NUM_LIT> ; inWater = true ; fire = <NUM_LIT:0> ; } else { inWater = false ; } if ( worldObj . isRemote ) { fire = <NUM_LIT:0> ; } else if ( fire > <NUM_LIT:0> ) { if ( isImmuneToFire ) { fire -= <NUM_LIT:4> ; if ( fire < <NUM_LIT:0> ) { fire = <NUM_LIT:0> ; } } else { if ( fire % <NUM_LIT:20> == <NUM_LIT:0> ) { attackEntityFrom ( DamageSource . onFire , <NUM_LIT:1> ) ; } fire -- ; } } if ( handleLavaMovement ( ) ) { setOnFireFromLava ( ) ; fallDistance *= <NUM_LIT> ; } if ( posY < - <NUM_LIT> ) { kill ( ) ; } if ( ! worldObj . isRemote ) { setFlag ( <NUM_LIT:0> , fire > <NUM_LIT:0> ) ; setFlag ( <NUM_LIT:2> , ridingEntity != null ) ; } firstUpdate = false ; Profiler . endSection ( ) ; } protected void setOnFireFromLava ( ) { if ( ! isImmuneToFire ) { attackEntityFrom ( DamageSource . lava , <NUM_LIT:4> ) ; setFire ( <NUM_LIT:15> ) ; } } public void setFire ( int par1 ) { int i = par1 * <NUM_LIT:20> ; if ( fire < i ) { fire = i ; } } public void extinguish ( ) { fire = <NUM_LIT:0> ; } protected void kill ( ) { setDead ( ) ; } public boolean isOffsetPositionInLiquid ( double par1 , double par3 , double par5 ) { AxisAlignedBB axisalignedbb = boundingBox . getOffsetBoundingBox ( par1 , par3 , par5 ) ; List list = worldObj . getCollidingBoundingBoxes ( this , axisalignedbb ) ; if ( list . size ( ) > <NUM_LIT:0> ) { return false ; } return ! worldObj . isAnyLiquid ( axisalignedbb ) ; } public void moveEntity ( double par1 , double par3 , double par5 ) { if ( noClip ) { boundingBox . offset ( par1 , par3 , par5 ) ; posX = ( boundingBox . minX + boundingBox . maxX ) / <NUM_LIT> ; posY = ( boundingBox . minY + ( double ) yOffset ) - ( double ) ySize ; posZ = ( boundingBox . minZ + boundingBox . maxZ ) / <NUM_LIT> ; return ; } Profiler . startSection ( "<STR_LIT>" ) ; ySize *= <NUM_LIT> ; double d = posX ; double d1 = posZ ; if ( isInWeb ) { isInWeb = false ; par1 *= <NUM_LIT> ; par3 *= <NUM_LIT> ; par5 *= <NUM_LIT> ; motionX = <NUM_LIT> ; motionY = <NUM_LIT> ; motionZ = <NUM_LIT> ; } double d2 = par1 ; double d3 = par3 ; double d4 = par5 ; AxisAlignedBB axisalignedbb = boundingBox . copy ( ) ; boolean flag = onGround && isSneaking ( ) && ( this instanceof EntityPlayer ) ; if ( flag ) { double d5 = <NUM_LIT> ; for ( ; par1 != <NUM_LIT> && worldObj . getCollidingBoundingBoxes ( this , boundingBox . getOffsetBoundingBox ( par1 , - <NUM_LIT> , <NUM_LIT> ) ) . size ( ) == <NUM_LIT:0> ; d2 = par1 ) { if ( par1 < d5 && par1 >= - d5 ) { par1 = <NUM_LIT> ; continue ; } if ( par1 > <NUM_LIT> ) { par1 -= d5 ; } else { par1 += d5 ; } } for ( ; par5 != <NUM_LIT> && worldObj . getCollidingBoundingBoxes ( this , boundingBox . getOffsetBoundingBox ( <NUM_LIT> , - <NUM_LIT> , par5 ) ) . size ( ) == <NUM_LIT:0> ; d4 = par5 ) { if ( par5 < d5 && par5 >= - d5 ) { par5 = <NUM_LIT> ; continue ; } if ( par5 > <NUM_LIT> ) { par5 -= d5 ; } else { par5 += d5 ; } } while ( par1 != <NUM_LIT> && par5 != <NUM_LIT> && worldObj . getCollidingBoundingBoxes ( this , boundingBox . getOffsetBoundingBox ( par1 , - <NUM_LIT> , par5 ) ) . size ( ) == <NUM_LIT:0> ) { if ( par1 < d5 && par1 >= - d5 ) { par1 = <NUM_LIT> ; } else if ( par1 > <NUM_LIT> ) { par1 -= d5 ; } else { par1 += d5 ; } if ( par5 < d5 && par5 >= - d5 ) { par5 = <NUM_LIT> ; } else if ( par5 > <NUM_LIT> ) { par5 -= d5 ; } else { par5 += d5 ; } d2 = par1 ; d4 = par5 ; } } List list = worldObj . getCollidingBoundingBoxes ( this , boundingBox . addCoord ( par1 , par3 , par5 ) ) ; for ( int i = <NUM_LIT:0> ; i < list . size ( ) ; i ++ ) { par3 = ( ( AxisAlignedBB ) list . get ( i ) ) . calculateYOffset ( boundingBox , par3 ) ; } boundingBox . offset ( <NUM_LIT> , par3 , <NUM_LIT> ) ; if ( ! field_9077_F && d3 != par3 ) { par1 = par3 = par5 = <NUM_LIT> ; } boolean flag1 = onGround || d3 != par3 && d3 < <NUM_LIT> ; for ( int j = <NUM_LIT:0> ; j < list . size ( ) ; j ++ ) { par1 = ( ( AxisAlignedBB ) list . get ( j ) ) . calculateXOffset ( boundingBox , par1 ) ; } boundingBox . offset ( par1 , <NUM_LIT> , <NUM_LIT> ) ; if ( ! field_9077_F && d2 != par1 ) { par1 = par3 = par5 = <NUM_LIT> ; } for ( int k = <NUM_LIT:0> ; k < list . size ( ) ; k ++ ) { par5 = ( ( AxisAlignedBB ) list . get ( k ) ) . calculateZOffset ( boundingBox , par5 ) ; } boundingBox . offset ( <NUM_LIT> , <NUM_LIT> , par5 ) ; if ( ! field_9077_F && d4 != par5 ) { par1 = par3 = par5 = <NUM_LIT> ; } if ( stepHeight > <NUM_LIT> && flag1 && ( flag || ySize < <NUM_LIT> ) && ( d2 != par1 || d4 != par5 ) ) { double d6 = par1 ; double d8 = par3 ; double d10 = par5 ; par1 = d2 ; par3 = stepHeight ; par5 = d4 ; AxisAlignedBB axisalignedbb1 = boundingBox . copy ( ) ; boundingBox . setBB ( axisalignedbb ) ; List list1 = worldObj . getCollidingBoundingBoxes ( this , boundingBox . addCoord ( par1 , par3 , par5 ) ) ; for ( int j2 = <NUM_LIT:0> ; j2 < list1 . size ( ) ; j2 ++ ) { par3 = ( ( AxisAlignedBB ) list1 . get ( j2 ) ) . calculateYOffset ( boundingBox , par3 ) ; } boundingBox . offset ( <NUM_LIT> , par3 , <NUM_LIT> ) ; if ( ! field_9077_F && d3 != par3 ) { par1 = par3 = par5 = <NUM_LIT> ; } for ( int k2 = <NUM_LIT:0> ; k2 < list1 . size ( ) ; k2 ++ ) { par1 = ( ( AxisAlignedBB ) list1 . get ( k2 ) ) . calculateXOffset ( boundingBox , par1 ) ; } boundingBox . offset ( par1 , <NUM_LIT> , <NUM_LIT> ) ; if ( ! field_9077_F && d2 != par1 ) { par1 = par3 = par5 = <NUM_LIT> ; } for ( int l2 = <NUM_LIT:0> ; l2 < list1 . size ( ) ; l2 ++ ) { par5 = ( ( AxisAlignedBB ) list1 . get ( l2 ) ) . calculateZOffset ( boundingBox , par5 ) ; } boundingBox . offset ( <NUM_LIT> , <NUM_LIT> , par5 ) ; if ( ! field_9077_F && d4 != par5 ) { par1 = par3 = par5 = <NUM_LIT> ; } if ( ! field_9077_F && d3 != par3 ) { par1 = par3 = par5 = <NUM_LIT> ; } else { par3 = - stepHeight ; for ( int i3 = <NUM_LIT:0> ; i3 < list1 . size ( ) ; i3 ++ ) { par3 = ( ( AxisAlignedBB ) list1 . get ( i3 ) ) . calculateYOffset ( boundingBox , par3 ) ; } boundingBox . offset ( <NUM_LIT> , par3 , <NUM_LIT> ) ; } if ( d6 * d6 + d10 * d10 >= par1 * par1 + par5 * par5 ) { par1 = d6 ; par3 = d8 ; par5 = d10 ; boundingBox . setBB ( axisalignedbb1 ) ; } else { double d11 = boundingBox . minY - ( double ) ( int ) boundingBox . minY ; if ( d11 > <NUM_LIT> ) { ySize += d11 + <NUM_LIT> ; } } } Profiler . endSection ( ) ; Profiler . startSection ( "<STR_LIT>" ) ; posX = ( boundingBox . minX + boundingBox . maxX ) / <NUM_LIT> ; posY = ( boundingBox . minY + ( double ) yOffset ) - ( double ) ySize ; posZ = ( boundingBox . minZ + boundingBox . maxZ ) / <NUM_LIT> ; isCollidedHorizontally = d2 != par1 || d4 != par5 ; isCollidedVertically = d3 != par3 ; onGround = d3 != par3 && d3 < <NUM_LIT> ; isCollided = isCollidedHorizontally || isCollidedVertically ; updateFallState ( par3 , onGround ) ; if ( d2 != par1 ) { motionX = <NUM_LIT> ; } if ( d3 != par3 ) { motionY = <NUM_LIT> ; } if ( d4 != par5 ) { motionZ = <NUM_LIT> ; } double d7 = posX - d ; double d9 = posZ - d1 ; if ( canTriggerWalking ( ) && ! flag && ridingEntity == null ) { distanceWalkedModified += ( double ) MathHelper . sqrt_double ( d7 * d7 + d9 * d9 ) * <NUM_LIT> ; int l = MathHelper . floor_double ( posX ) ; int j1 = MathHelper . floor_double ( posY - <NUM_LIT> - ( double ) yOffset ) ; int l1 = MathHelper . floor_double ( posZ ) ; int j3 = worldObj . getBlockId ( l , j1 , l1 ) ; if ( j3 == <NUM_LIT:0> && worldObj . getBlockId ( l , j1 - <NUM_LIT:1> , l1 ) == Block . fence . blockID ) { j3 = worldObj . getBlockId ( l , j1 - <NUM_LIT:1> , l1 ) ; } if ( distanceWalkedModified > ( float ) nextStepDistance && j3 > <NUM_LIT:0> ) { nextStepDistance = ( int ) distanceWalkedModified + <NUM_LIT:1> ; playStepSound ( l , j1 , l1 , j3 ) ; Block . blocksList [ j3 ] . onEntityWalking ( worldObj , l , j1 , l1 , this ) ; } } int i1 = MathHelper . floor_double ( boundingBox . minX + <NUM_LIT> ) ; int k1 = MathHelper . floor_double ( boundingBox . minY + <NUM_LIT> ) ; int i2 = MathHelper . floor_double ( boundingBox . minZ + <NUM_LIT> ) ; int k3 = MathHelper . floor_double ( boundingBox . maxX - <NUM_LIT> ) ; int l3 = MathHelper . floor_double ( boundingBox . maxY - <NUM_LIT> ) ; int i4 = MathHelper . floor_double ( boundingBox . maxZ - <NUM_LIT> ) ; if ( worldObj . checkChunksExist ( i1 , k1 , i2 , k3 , l3 , i4 ) ) { for ( int j4 = i1 ; j4 <= k3 ; j4 ++ ) { for ( int k4 = k1 ; k4 <= l3 ; k4 ++ ) { for ( int l4 = i2 ; l4 <= i4 ; l4 ++ ) { int i5 = worldObj . getBlockId ( j4 , k4 , l4 ) ; if ( i5 > <NUM_LIT:0> ) { Block . blocksList [ i5 ] . onEntityCollidedWithBlock ( worldObj , j4 , k4 , l4 , this ) ; } } } } } boolean flag2 = isWet ( ) ; if ( worldObj . isBoundingBoxBurning ( boundingBox . contract ( <NUM_LIT> , <NUM_LIT> , <NUM_LIT> ) ) ) { dealFireDamage ( <NUM_LIT:1> ) ; if ( ! flag2 ) { fire ++ ; if ( fire == <NUM_LIT:0> ) { setFire ( <NUM_LIT:8> ) ; } } } else if ( fire <= <NUM_LIT:0> ) { fire = - fireResistance ; } if ( flag2 && fire > <NUM_LIT:0> ) { worldObj . playSoundAtEntity ( this , "<STR_LIT>" , <NUM_LIT> , <NUM_LIT> + ( rand . nextFloat ( ) - rand . nextFloat ( ) ) * <NUM_LIT> ) ; fire = - fireResistance ; } Profiler . endSection ( ) ; } protected void playStepSound ( int par1 , int par2 , int par3 , int par4 ) { StepSound stepsound = Block . blocksList [ par4 ] . stepSound ; if ( worldObj . getBlockId ( par1 , par2 + <NUM_LIT:1> , par3 ) == Block . snow . blockID ) { stepsound = Block . snow . stepSound ; worldObj . playSoundAtEntity ( this , stepsound . getStepSound ( ) , stepsound . getVolume ( ) * <NUM_LIT> , stepsound . getPitch ( ) ) ; } else if ( ! Block . blocksList [ par4 ] . blockMaterial . isLiquid ( ) ) { worldObj . playSoundAtEntity ( this , stepsound . getStepSound ( ) , stepsound . getVolume ( ) * <NUM_LIT> , stepsound . getPitch ( ) ) ; } } protected boolean canTriggerWalking ( ) { return true ; } protected void updateFallState ( double par1 , boolean par3 ) { if ( par3 ) { if ( fallDistance > <NUM_LIT> ) { if ( this instanceof EntityLiving ) { int i = MathHelper . floor_double ( posX ) ; int j = MathHelper . floor_double ( posY - <NUM_LIT> - ( double ) yOffset ) ; int k = MathHelper . floor_double ( posZ ) ; int l = worldObj . getBlockId ( i , j , k ) ; if ( l == <NUM_LIT:0> && worldObj . getBlockId ( i , j - <NUM_LIT:1> , k ) == Block . fence . blockID ) { l = worldObj . getBlockId ( i , j - <NUM_LIT:1> , k ) ; } if ( l > <NUM_LIT:0> ) { Block . blocksList [ l ] . onFallenUpon ( worldObj , i , j , k , this , fallDistance ) ; } } fall ( fallDistance ) ; fallDistance = <NUM_LIT> ; } } else if ( par1 < <NUM_LIT> ) { fallDistance -= par1 ; } } public AxisAlignedBB getBoundingBox ( ) { return null ; } protected void dealFireDamage ( int par1 ) { if ( ! isImmuneToFire ) { attackEntityFrom ( DamageSource . inFire , par1 ) ; } } public final boolean isImmuneToFire ( ) { return isImmuneToFire ; } protected void fall ( float par1 ) { if ( riddenByEntity != null ) { riddenByEntity . fall ( par1 ) ; } } public boolean isWet ( ) { return inWater || worldObj . canLightningStrikeAt ( MathHelper . floor_double ( posX ) , MathHelper . floor_double ( posY ) , MathHelper . floor_double ( posZ ) ) ; } public boolean isInWater ( ) { return inWater ; } public boolean handleWaterMovement ( ) { return worldObj . handleMaterialAcceleration ( boundingBox . expand ( <NUM_LIT> , - <NUM_LIT> , <NUM_LIT> ) . contract ( <NUM_LIT> , <NUM_LIT> , <NUM_LIT> ) , Material . water , this ) ; } public boolean isInsideOfMaterial ( Material par1Material ) { double d = posY + ( double ) getEyeHeight ( ) ; int i = MathHelper . floor_double ( posX ) ; int j = MathHelper . floor_float ( MathHelper . floor_double ( d ) ) ; int k = MathHelper . floor_double ( posZ ) ; int l = worldObj . getBlockId ( i , j , k ) ; if ( l != <NUM_LIT:0> && Block . blocksList [ l ] . blockMaterial == par1Material ) { float f = BlockFluid . getFluidHeightPercent ( worldObj . getBlockMetadata ( i , j , k ) ) - <NUM_LIT> ; float f1 = ( float ) ( j + <NUM_LIT:1> ) - f ; return d < ( double ) f1 ; } else { return false ; } } public float getEyeHeight ( ) { return <NUM_LIT> ; } public boolean handleLavaMovement ( ) { return worldObj . isMaterialInBB ( boundingBox . expand ( - <NUM_LIT> , - <NUM_LIT> , - <NUM_LIT> ) , Material . lava ) ; } public void moveFlying ( float par1 , float par2 , float par3 ) { float f = MathHelper . sqrt_float ( par1 * par1 + par2 * par2 ) ; if ( f < <NUM_LIT> ) { return ; } if ( f < <NUM_LIT> ) { f = <NUM_LIT> ; } f = par3 / f ; par1 *= f ; par2 *= f ; float f1 = MathHelper . sin ( ( rotationYaw * ( float ) Math . PI ) / <NUM_LIT> ) ; float f2 = MathHelper . cos ( ( rotationYaw * ( float ) Math . PI ) / <NUM_LIT> ) ; motionX += par1 * f2 - par2 * f1 ; motionZ += par2 * f2 + par1 * f1 ; } public float getBrightness ( float par1 ) { int i = MathHelper . floor_double ( posX ) ; int j = MathHelper . floor_double ( posZ ) ; if ( worldObj . blockExists ( i , <NUM_LIT:0> , j ) ) { double d = ( boundingBox . maxY - boundingBox . minY ) * <NUM_LIT> ; int k = MathHelper . floor_double ( ( posY - ( double ) yOffset ) + d ) ; return worldObj . getLightBrightness ( i , k , j ) ; } else { return <NUM_LIT> ; } } public void setWorld ( World par1World ) { worldObj = par1World ; } public void setPositionAndRotation ( double par1 , double par3 , double par5 , float par7 , float par8 ) { prevPosX = posX = par1 ; prevPosY = posY = par3 ; prevPosZ = posZ = par5 ; prevRotationYaw = rotationYaw = par7 ; prevRotationPitch = rotationPitch = par8 ; ySize = <NUM_LIT> ; double d = prevRotationYaw - par7 ; if ( d < - <NUM_LIT> ) { prevRotationYaw += <NUM_LIT> ; } if ( d >= <NUM_LIT> ) { prevRotationYaw -= <NUM_LIT> ; } setPosition ( posX , posY , posZ ) ; setRotation ( par7 , par8 ) ; } public void setLocationAndAngles ( double par1 , double par3 , double par5 , float par7 , float par8 ) { lastTickPosX = prevPosX = posX = par1 ; lastTickPosY = prevPosY = posY = par3 + ( double ) yOffset ; lastTickPosZ = prevPosZ = posZ = par5 ; rotationYaw = par7 ; rotationPitch = par8 ; setPosition ( posX , posY , posZ ) ; } public float getDistanceToEntity ( Entity par1Entity ) { float f = ( float ) ( posX - par1Entity . posX ) ; float f1 = ( float ) ( posY - par1Entity . posY ) ; float f2 = ( float ) ( posZ - par1Entity . posZ ) ; return MathHelper . sqrt_float ( f * f + f1 * f1 + f2 * f2 ) ; } public double getDistanceSq ( double par1 , double par3 , double par5 ) { double d = posX - par1 ; double d1 = posY - par3 ; double d2 = posZ - par5 ; return d * d + d1 * d1 + d2 * d2 ; } public double getDistance ( double par1 , double par3 , double par5 ) { double d = posX - par1 ; double d1 = posY - par3 ; double d2 = posZ - par5 ; return ( double ) MathHelper . sqrt_double ( d * d + d1 * d1 + d2 * d2 ) ; } public double getDistanceSqToEntity ( Entity par1Entity ) { double d = posX - par1Entity . posX ; double d1 = posY - par1Entity . posY ; double d2 = posZ - par1Entity . posZ ; return d * d + d1 * d1 + d2 * d2 ; } public void onCollideWithPlayer ( EntityPlayer entityplayer ) { } public void applyEntityCollision ( Entity par1Entity ) { if ( par1Entity . riddenByEntity == this || par1Entity . ridingEntity == this ) { return ; } double d = par1Entity . posX - posX ; double d1 = par1Entity . posZ - posZ ; double d2 = MathHelper . abs_max ( d , d1 ) ; if ( d2 >= <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 ; addVelocity ( - d , <NUM_LIT> , - d1 ) ; par1Entity . addVelocity ( d , <NUM_LIT> , d1 ) ; } } public void addVelocity ( double par1 , double par3 , double par5 ) { motionX += par1 ; motionY += par3 ; motionZ += par5 ; isAirBorne = true ; } protected void setBeenAttacked ( ) { velocityChanged = true ; } public boolean attackEntityFrom ( DamageSource par1DamageSource , int par2 ) { setBeenAttacked ( ) ; return false ; } public boolean canBeCollidedWith ( ) { return false ; } public boolean canBePushed ( ) { return false ; } public void addToPlayerScore ( Entity entity , int i ) { } public boolean addEntityID ( NBTTagCompound par1NBTTagCompound ) { String s = getEntityString ( ) ; if ( isDead || s == null ) { return false ; } else { par1NBTTagCompound . setString ( "<STR_LIT:id>" , s ) ; writeToNBT ( par1NBTTagCompound ) ; return true ; } } public void writeToNBT ( NBTTagCompound par1NBTTagCompound ) { par1NBTTagCompound . setTag ( "<STR_LIT>" , newDoubleNBTList ( new double [ ] { posX , posY + ( double ) ySize , posZ } ) ) ; par1NBTTagCompound . setTag ( "<STR_LIT>" , newDoubleNBTList ( new double [ ] { motionX , motionY , motionZ } ) ) ; par1NBTTagCompound . setTag ( "<STR_LIT>" , newFloatNBTList ( new float [ ] { rotationYaw , rotationPitch } ) ) ; par1NBTTagCompound . setFloat ( "<STR_LIT>" , fallDistance ) ; par1NBTTagCompound . setShort ( "<STR_LIT>" , ( short ) fire ) ; par1NBTTagCompound . setShort ( "<STR_LIT>" , ( short ) getAir ( ) ) ; par1NBTTagCompound . setBoolean ( "<STR_LIT>" , onGround ) ; writeEntityToNBT ( par1NBTTagCompound ) ; } public void readFromNBT ( NBTTagCompound par1NBTTagCompound ) { NBTTagList nbttaglist = par1NBTTagCompound . getTagList ( "<STR_LIT>" ) ; NBTTagList nbttaglist1 = par1NBTTagCompound . getTagList ( "<STR_LIT>" ) ; NBTTagList nbttaglist2 = par1NBTTagCompound . getTagList ( "<STR_LIT>" ) ; motionX = ( ( NBTTagDouble ) nbttaglist1 . tagAt ( <NUM_LIT:0> ) ) . data ; motionY = ( ( NBTTagDouble ) nbttaglist1 . tagAt ( <NUM_LIT:1> ) ) . data ; motionZ = ( ( NBTTagDouble ) nbttaglist1 . tagAt ( <NUM_LIT:2> ) ) . data ; if ( Math . abs ( motionX ) > <NUM_LIT> ) { motionX = <NUM_LIT> ; } if ( Math . abs ( motionY ) > <NUM_LIT> ) { motionY = <NUM_LIT> ; } if ( Math . abs ( motionZ ) > <NUM_LIT> ) { motionZ = <NUM_LIT> ; } prevPosX = lastTickPosX = posX = ( ( NBTTagDouble ) nbttaglist . tagAt ( <NUM_LIT:0> ) ) . data ; prevPosY = lastTickPosY = posY = ( ( NBTTagDouble ) nbttaglist . tagAt ( <NUM_LIT:1> ) ) . data ; prevPosZ = lastTickPosZ = posZ = ( ( NBTTagDouble ) nbttaglist . tagAt ( <NUM_LIT:2> ) ) . data ; prevRotationYaw = rotationYaw = ( ( NBTTagFloat ) nbttaglist2 . tagAt ( <NUM_LIT:0> ) ) . data ; prevRotationPitch = rotationPitch = ( ( NBTTagFloat ) nbttaglist2 . tagAt ( <NUM_LIT:1> ) ) . data ; fallDistance = par1NBTTagCompound . getFloat ( "<STR_LIT>" ) ; fire = par1NBTTagCompound . getShort ( "<STR_LIT>" ) ; setAir ( par1NBTTagCompound . getShort ( "<STR_LIT>" ) ) ; onGround = par1NBTTagCompound . getBoolean ( "<STR_LIT>" ) ; setPosition ( posX , posY , posZ ) ; setRotation ( rotationYaw , rotationPitch ) ; readEntityFromNBT ( par1NBTTagCompound ) ; } protected final String getEntityString ( ) { return EntityList . getEntityString ( this ) ; } protected abstract void readEntityFromNBT ( NBTTagCompound nbttagcompound ) ; protected abstract void writeEntityToNBT ( NBTTagCompound nbttagcompound ) ; protected NBTTagList newDoubleNBTList ( double par1ArrayOfDouble [ ] ) { NBTTagList nbttaglist = new NBTTagList ( ) ; double ad [ ] = par1ArrayOfDouble ; int i = ad . length ; for ( int j = <NUM_LIT:0> ; j < i ; j ++ ) { double d = ad [ j ] ; nbttaglist . appendTag ( new NBTTagDouble ( null , d ) ) ; } return nbttaglist ; } protected NBTTagList newFloatNBTList ( float par1ArrayOfFloat [ ] ) { NBTTagList nbttaglist = new NBTTagList ( ) ; float af [ ] = par1ArrayOfFloat ; int i = af . length ; for ( int j = <NUM_LIT:0> ; j < i ; j ++ ) { float f = af [ j ] ; nbttaglist . appendTag ( new NBTTagFloat ( null , f ) ) ; } return nbttaglist ; } public EntityItem dropItem ( int par1 , int par2 ) { return dropItemWithOffset ( par1 , par2 , <NUM_LIT> ) ; } public EntityItem dropItemWithOffset ( int par1 , int par2 , float par3 ) { return entityDropItem ( new ItemStack ( par1 , par2 , <NUM_LIT:0> ) , par3 ) ; } public EntityItem entityDropItem ( ItemStack par1ItemStack , float par2 ) { EntityItem entityitem = new EntityItem ( worldObj , posX , posY + ( double ) par2 , posZ , par1ItemStack ) ; entityitem . delayBeforeCanPickup = <NUM_LIT:10> ; worldObj . spawnEntityInWorld ( entityitem ) ; return entityitem ; } public boolean isEntityAlive ( ) { return ! isDead ; } public boolean isEntityInsideOpaqueBlock ( ) { for ( int i = <NUM_LIT:0> ; i < <NUM_LIT:8> ; i ++ ) { float f = ( ( float ) ( ( i > > <NUM_LIT:0> ) % <NUM_LIT:2> ) - <NUM_LIT> ) * width * <NUM_LIT> ; float f1 = ( ( float ) ( ( i > > <NUM_LIT:1> ) % <NUM_LIT:2> ) - <NUM_LIT> ) * <NUM_LIT> ; float f2 = ( ( float ) ( ( i > > <NUM_LIT:2> ) % <NUM_LIT:2> ) - <NUM_LIT> ) * width * <NUM_LIT> ; int j = MathHelper . floor_double ( posX + ( double ) f ) ; int k = MathHelper . floor_double ( posY + ( double ) getEyeHeight ( ) + ( double ) f1 ) ; int l = MathHelper . floor_double ( posZ + ( double ) f2 ) ; if ( worldObj . isBlockNormalCube ( j , k , l ) ) { return true ; } } return false ; } public boolean interact ( EntityPlayer par1EntityPlayer ) { return false ; } public AxisAlignedBB getCollisionBox ( Entity par1Entity ) { return null ; } public void updateRidden ( ) { if ( ridingEntity . isDead ) { ridingEntity = null ; return ; } motionX = <NUM_LIT> ; motionY = <NUM_LIT> ; motionZ = <NUM_LIT> ; onUpdate ( ) ; if ( ridingEntity == null ) { return ; } ridingEntity . updateRiderPosition ( ) ; entityRiderYawDelta += ridingEntity . rotationYaw - ridingEntity . prevRotationYaw ; entityRiderPitchDelta += ridingEntity . rotationPitch - ridingEntity . prevRotationPitch ; for ( ; entityRiderYawDelta >= <NUM_LIT> ; entityRiderYawDelta -= <NUM_LIT> ) { } for ( ; entityRiderYawDelta < - <NUM_LIT> ; entityRiderYawDelta += <NUM_LIT> ) { } for ( ; entityRiderPitchDelta >= <NUM_LIT> ; entityRiderPitchDelta -= <NUM_LIT> ) { } for ( ; entityRiderPitchDelta < - <NUM_LIT> ; entityRiderPitchDelta += <NUM_LIT> ) { } double d = entityRiderYawDelta * <NUM_LIT> ; double d1 = entityRiderPitchDelta * <NUM_LIT> ; float f = <NUM_LIT> ; if ( d > ( double ) f ) { d = f ; } if ( d < ( double ) ( - f ) ) { d = - f ; } if ( d1 > ( double ) f ) { d1 = f ; } if ( d1 < ( double ) ( - f ) ) { d1 = - f ; } entityRiderYawDelta -= d ; entityRiderPitchDelta -= d1 ; rotationYaw += d ; rotationPitch += d1 ; } public void updateRiderPosition ( ) { riddenByEntity . setPosition ( posX , posY + getMountedYOffset ( ) + riddenByEntity . getYOffset ( ) , posZ ) ; } public double getYOffset ( ) { return ( double ) yOffset ; } public double getMountedYOffset ( ) { return ( double ) height * <NUM_LIT> ; } public void mountEntity ( Entity par1Entity ) { entityRiderPitchDelta = <NUM_LIT> ; entityRiderYawDelta = <NUM_LIT> ; if ( par1Entity == null ) { if ( ridingEntity != null ) { setLocationAndAngles ( ridingEntity . posX , ridingEntity . boundingBox . minY + ( double ) ridingEntity . height , ridingEntity . posZ , rotationYaw , rotationPitch ) ; ridingEntity . riddenByEntity = null ; } ridingEntity = null ; return ; } if ( ridingEntity == par1Entity ) { ridingEntity . riddenByEntity = null ; ridingEntity = null ; setLocationAndAngles ( par1Entity . posX , par1Entity . boundingBox . minY + ( double ) par1Entity . height , par1Entity . posZ , rotationYaw , rotationPitch ) ; return ; } if ( ridingEntity != null ) { ridingEntity . riddenByEntity = null ; } if ( par1Entity . riddenByEntity != null ) { par1Entity . riddenByEntity . ridingEntity = null ; } ridingEntity = par1Entity ; par1Entity . riddenByEntity = this ; } public float getCollisionBorderSize ( ) { return <NUM_LIT> ; } public Vec3D getLookVec ( ) { return null ; } public void setInPortal ( ) { } public ItemStack [ ] getInventory ( ) { return null ; } public boolean isBurning ( ) { return fire > <NUM_LIT:0> || getFlag ( <NUM_LIT:0> ) ; } public boolean isSneaking ( ) { return getFlag ( <NUM_LIT:1> ) ; } public void setSneaking ( boolean par1 ) { setFlag ( <NUM_LIT:1> , par1 ) ; } public boolean isSprinting ( ) { return getFlag ( <NUM_LIT:3> ) ; } public void setSprinting ( boolean par1 ) { setFlag ( <NUM_LIT:3> , par1 ) ; } public void setEating ( boolean par1 ) { setFlag ( <NUM_LIT:4> , par1 ) ; } protected boolean getFlag ( int par1 ) { return ( dataWatcher . getWatchableObjectByte ( <NUM_LIT:0> ) & <NUM_LIT:1> << par1 ) != <NUM_LIT:0> ; } protected void setFlag ( int par1 , boolean par2 ) { byte byte0 = dataWatcher . getWatchableObjectByte ( <NUM_LIT:0> ) ; if ( par2 ) { dataWatcher . updateObject ( <NUM_LIT:0> , Byte . valueOf ( ( byte ) ( byte0 | <NUM_LIT:1> << par1 ) ) ) ; } else { dataWatcher . updateObject ( <NUM_LIT:0> , Byte . valueOf ( ( byte ) ( byte0 & ~ ( <NUM_LIT:1> << par1 ) ) ) ) ; } } public int getAir ( ) { return dataWatcher . getWatchableObjectShort ( <NUM_LIT:1> ) ; } public void setAir ( int par1 ) { dataWatcher . updateObject ( <NUM_LIT:1> , Short . valueOf ( ( short ) par1 ) ) ; } public void onStruckByLightning ( EntityLightningBolt par1EntityLightningBolt ) { dealFireDamage ( <NUM_LIT:5> ) ; fire ++ ; if ( fire == <NUM_LIT:0> ) { setFire ( <NUM_LIT:8> ) ; } } public void onKillEntity ( EntityLiving entityliving ) { } protected boolean pushOutOfBlocks ( double par1 , double par3 , double par5 ) { int i = MathHelper . floor_double ( par1 ) ; int j = MathHelper . floor_double ( par3 ) ; int k = MathHelper . floor_double ( par5 ) ; double d = par1 - ( double ) i ; double d1 = par3 - ( double ) j ; double d2 = par5 - ( double ) k ; if ( worldObj . isBlockNormalCube ( i , j , k ) ) { boolean flag = ! worldObj . isBlockNormalCube ( i - <NUM_LIT:1> , j , k ) ; boolean flag1 = ! worldObj . isBlockNormalCube ( i + <NUM_LIT:1> , j , k ) ; boolean flag2 = ! worldObj . isBlockNormalCube ( i , j - <NUM_LIT:1> , k ) ; boolean flag3 = ! worldObj . isBlockNormalCube ( i , j + <NUM_LIT:1> , k ) ; boolean flag4 = ! worldObj . isBlockNormalCube ( i , j , k - <NUM_LIT:1> ) ; boolean flag5 = ! worldObj . isBlockNormalCube ( i , j , k + <NUM_LIT:1> ) ; byte byte0 = - <NUM_LIT:1> ; double d3 = <NUM_LIT> ; if ( flag && d < d3 ) { d3 = d ; byte0 = <NUM_LIT:0> ; } if ( flag1 && <NUM_LIT> - d < d3 ) { d3 = <NUM_LIT> - d ; byte0 = <NUM_LIT:1> ; } if ( flag2 && d1 < d3 ) { d3 = d1 ; byte0 = <NUM_LIT:2> ; } if ( flag3 && <NUM_LIT> - d1 < d3 ) { d3 = <NUM_LIT> - d1 ; byte0 = <NUM_LIT:3> ; } if ( flag4 && d2 < d3 ) { d3 = d2 ; byte0 = <NUM_LIT:4> ; } if ( flag5 && <NUM_LIT> - d2 < d3 ) { double d4 = <NUM_LIT> - d2 ; byte0 = <NUM_LIT:5> ; } float f = rand . nextFloat ( ) * <NUM_LIT> + <NUM_LIT> ; if ( byte0 == <NUM_LIT:0> ) { motionX = - f ; } if ( byte0 == <NUM_LIT:1> ) { motionX = f ; } if ( byte0 == <NUM_LIT:2> ) { motionY = - f ; } if ( byte0 == <NUM_LIT:3> ) { motionY = f ; } if ( byte0 == <NUM_LIT:4> ) { motionZ = - f ; } if ( byte0 == <NUM_LIT:5> ) { motionZ = f ; } return true ; } else { return false ; } } public void setInWeb ( ) { isInWeb = true ; fallDistance = <NUM_LIT> ; } public String getUsername ( ) { String s = EntityList . getEntityString ( this ) ; if ( s == null ) { s = "<STR_LIT>" ; } return StatCollector . translateToLocal ( ( new StringBuilder ( ) ) . append ( "<STR_LIT>" ) . append ( s ) . append ( "<STR_LIT>" ) . toString ( ) ) ; } public Entity [ ] getParts ( ) { return null ; } public boolean isEntityEqual ( Entity par1Entity ) { return this == par1Entity ; } public float func_48314_aq ( ) { return <NUM_LIT> ; } public boolean canAttackWithItem ( ) { return true ; } } </s>
<s> package net . minecraft . src ; public class ItemColored extends ItemBlock { private final Block blockRef ; private String blockNames [ ] ; public ItemColored ( int par1 , boolean par2 ) { super ( par1 ) ; blockRef = Block . blocksList [ getBlockID ( ) ] ; if ( par2 ) { setMaxDamage ( <NUM_LIT:0> ) ; setHasSubtypes ( true ) ; } } public int getMetadata ( int par1 ) { return par1 ; } public ItemColored setBlockNames ( String par1ArrayOfStr [ ] ) { blockNames = par1ArrayOfStr ; return this ; } public String getItemNameIS ( ItemStack par1ItemStack ) { if ( blockNames == null ) { return super . getItemNameIS ( par1ItemStack ) ; } int i = par1ItemStack . getItemDamage ( ) ; if ( i >= <NUM_LIT:0> && i < blockNames . length ) { return ( new StringBuilder ( ) ) . append ( super . getItemNameIS ( par1ItemStack ) ) . append ( "<STR_LIT:.>" ) . append ( blockNames [ i ] ) . toString ( ) ; } else { return super . getItemNameIS ( par1ItemStack ) ; } } } </s>
<s> package net . minecraft . src ; final class StructureStrongholdPieceWeight3 extends StructureStrongholdPieceWeight { StructureStrongholdPieceWeight3 ( Class par1Class , int par2 , int par3 ) { super ( par1Class , par2 , par3 ) ; } public boolean canSpawnMoreStructuresOfType ( int par1 ) { return super . canSpawnMoreStructuresOfType ( par1 ) && par1 > <NUM_LIT:5> ; } } </s>
<s> package net . minecraft . src ; public class TileEntityRecordPlayer extends TileEntity { public int record ; public TileEntityRecordPlayer ( ) { } public void readFromNBT ( NBTTagCompound par1NBTTagCompound ) { super . readFromNBT ( par1NBTTagCompound ) ; record = par1NBTTagCompound . getInteger ( "<STR_LIT>" ) ; } public void writeToNBT ( NBTTagCompound par1NBTTagCompound ) { super . writeToNBT ( par1NBTTagCompound ) ; if ( record > <NUM_LIT:0> ) { par1NBTTagCompound . setInteger ( "<STR_LIT>" , record ) ; } } } </s>
<s> package net . minecraft . src ; public class PathFinder { private IBlockAccess worldMap ; private Path path ; private IntHashMap pointMap ; private PathPoint pathOptions [ ] ; private boolean isWoddenDoorAllowed ; private boolean isMovementBlockAllowed ; private boolean isPathingInWater ; private boolean canEntityDrown ; public PathFinder ( IBlockAccess par1IBlockAccess , boolean par2 , boolean par3 , boolean par4 , boolean par5 ) { path = new Path ( ) ; pointMap = new IntHashMap ( ) ; pathOptions = new PathPoint [ <NUM_LIT:32> ] ; worldMap = par1IBlockAccess ; isWoddenDoorAllowed = par2 ; isMovementBlockAllowed = par3 ; isPathingInWater = par4 ; canEntityDrown = par5 ; } public PathEntity createEntityPathTo ( Entity par1Entity , Entity par2Entity , float par3 ) { return createEntityPathTo ( par1Entity , par2Entity . posX , par2Entity . boundingBox . minY , par2Entity . posZ , par3 ) ; } public PathEntity createEntityPathTo ( Entity par1Entity , int par2 , int par3 , int par4 , float par5 ) { return createEntityPathTo ( par1Entity , ( float ) par2 + <NUM_LIT> , ( float ) par3 + <NUM_LIT> , ( float ) par4 + <NUM_LIT> , par5 ) ; } private PathEntity createEntityPathTo ( Entity par1Entity , double par2 , double par4 , double par6 , float par8 ) { path . clearPath ( ) ; pointMap . clearMap ( ) ; boolean flag = isPathingInWater ; int i = MathHelper . floor_double ( par1Entity . boundingBox . minY + <NUM_LIT> ) ; if ( canEntityDrown && par1Entity . isInWater ( ) ) { i = ( int ) par1Entity . boundingBox . minY ; for ( int j = worldMap . getBlockId ( MathHelper . floor_double ( par1Entity . posX ) , i , MathHelper . floor_double ( par1Entity . posZ ) ) ; j == Block . waterMoving . blockID || j == Block . waterStill . blockID ; j = worldMap . getBlockId ( MathHelper . floor_double ( par1Entity . posX ) , i , MathHelper . floor_double ( par1Entity . posZ ) ) ) { i ++ ; } flag = isPathingInWater ; isPathingInWater = false ; } else { i = MathHelper . floor_double ( par1Entity . boundingBox . minY + <NUM_LIT> ) ; } PathPoint pathpoint = openPoint ( MathHelper . floor_double ( par1Entity . boundingBox . minX ) , i , MathHelper . floor_double ( par1Entity . boundingBox . minZ ) ) ; PathPoint pathpoint1 = openPoint ( MathHelper . floor_double ( par2 - ( double ) ( par1Entity . width / <NUM_LIT> ) ) , MathHelper . floor_double ( par4 ) , MathHelper . floor_double ( par6 - ( double ) ( par1Entity . width / <NUM_LIT> ) ) ) ; PathPoint pathpoint2 = new PathPoint ( MathHelper . floor_float ( par1Entity . width + <NUM_LIT> ) , MathHelper . floor_float ( par1Entity . height + <NUM_LIT> ) , MathHelper . floor_float ( par1Entity . width + <NUM_LIT> ) ) ; PathEntity pathentity = addToPath ( par1Entity , pathpoint , pathpoint1 , pathpoint2 , par8 ) ; isPathingInWater = flag ; return pathentity ; } private PathEntity addToPath ( Entity par1Entity , PathPoint par2PathPoint , PathPoint par3PathPoint , PathPoint par4PathPoint , float par5 ) { par2PathPoint . totalPathDistance = <NUM_LIT> ; par2PathPoint . distanceToNext = par2PathPoint . distanceTo ( par3PathPoint ) ; par2PathPoint . distanceToTarget = par2PathPoint . distanceToNext ; path . clearPath ( ) ; path . addPoint ( par2PathPoint ) ; PathPoint pathpoint = par2PathPoint ; while ( ! path . isPathEmpty ( ) ) { PathPoint pathpoint1 = path . dequeue ( ) ; if ( pathpoint1 . equals ( par3PathPoint ) ) { return createEntityPath ( par2PathPoint , par3PathPoint ) ; } if ( pathpoint1 . distanceTo ( par3PathPoint ) < pathpoint . distanceTo ( par3PathPoint ) ) { pathpoint = pathpoint1 ; } pathpoint1 . isFirst = true ; int i = findPathOptions ( par1Entity , pathpoint1 , par4PathPoint , par3PathPoint , par5 ) ; int j = <NUM_LIT:0> ; while ( j < i ) { PathPoint pathpoint2 = pathOptions [ j ] ; float f = pathpoint1 . totalPathDistance + pathpoint1 . distanceTo ( pathpoint2 ) ; if ( ! pathpoint2 . isAssigned ( ) || f < pathpoint2 . totalPathDistance ) { pathpoint2 . previous = pathpoint1 ; pathpoint2 . totalPathDistance = f ; pathpoint2 . distanceToNext = pathpoint2 . distanceTo ( par3PathPoint ) ; if ( pathpoint2 . isAssigned ( ) ) { path . changeDistance ( pathpoint2 , pathpoint2 . totalPathDistance + pathpoint2 . distanceToNext ) ; } else { pathpoint2 . distanceToTarget = pathpoint2 . totalPathDistance + pathpoint2 . distanceToNext ; path . addPoint ( pathpoint2 ) ; } } j ++ ; } } if ( pathpoint == par2PathPoint ) { return null ; } else { return createEntityPath ( par2PathPoint , pathpoint ) ; } } private int findPathOptions ( Entity par1Entity , PathPoint par2PathPoint , PathPoint par3PathPoint , PathPoint par4PathPoint , float par5 ) { int i = <NUM_LIT:0> ; int j = <NUM_LIT:0> ; if ( getVerticalOffset ( par1Entity , par2PathPoint . xCoord , par2PathPoint . yCoord + <NUM_LIT:1> , par2PathPoint . zCoord , par3PathPoint ) == <NUM_LIT:1> ) { j = <NUM_LIT:1> ; } PathPoint pathpoint = getSafePoint ( par1Entity , par2PathPoint . xCoord , par2PathPoint . yCoord , par2PathPoint . zCoord + <NUM_LIT:1> , par3PathPoint , j ) ; PathPoint pathpoint1 = getSafePoint ( par1Entity , par2PathPoint . xCoord - <NUM_LIT:1> , par2PathPoint . yCoord , par2PathPoint . zCoord , par3PathPoint , j ) ; PathPoint pathpoint2 = getSafePoint ( par1Entity , par2PathPoint . xCoord + <NUM_LIT:1> , par2PathPoint . yCoord , par2PathPoint . zCoord , par3PathPoint , j ) ; PathPoint pathpoint3 = getSafePoint ( par1Entity , par2PathPoint . xCoord , par2PathPoint . yCoord , par2PathPoint . zCoord - <NUM_LIT:1> , par3PathPoint , j ) ; if ( pathpoint != null && ! pathpoint . isFirst && pathpoint . distanceTo ( par4PathPoint ) < par5 ) { pathOptions [ i ++ ] = pathpoint ; } if ( pathpoint1 != null && ! pathpoint1 . isFirst && pathpoint1 . distanceTo ( par4PathPoint ) < par5 ) { pathOptions [ i ++ ] = pathpoint1 ; } if ( pathpoint2 != null && ! pathpoint2 . isFirst && pathpoint2 . distanceTo ( par4PathPoint ) < par5 ) { pathOptions [ i ++ ] = pathpoint2 ; } if ( pathpoint3 != null && ! pathpoint3 . isFirst && pathpoint3 . distanceTo ( par4PathPoint ) < par5 ) { pathOptions [ i ++ ] = pathpoint3 ; } return i ; } private PathPoint getSafePoint ( Entity par1Entity , int par2 , int par3 , int par4 , PathPoint par5PathPoint , int par6 ) { PathPoint pathpoint = null ; int i = getVerticalOffset ( par1Entity , par2 , par3 , par4 , par5PathPoint ) ; if ( i == <NUM_LIT:2> ) { return openPoint ( par2 , par3 , par4 ) ; } if ( i == <NUM_LIT:1> ) { pathpoint = openPoint ( par2 , par3 , par4 ) ; } if ( pathpoint == null && par6 > <NUM_LIT:0> && i != - <NUM_LIT:3> && i != - <NUM_LIT:4> && getVerticalOffset ( par1Entity , par2 , par3 + par6 , par4 , par5PathPoint ) == <NUM_LIT:1> ) { pathpoint = openPoint ( par2 , par3 + par6 , par4 ) ; par3 += par6 ; } if ( pathpoint != null ) { int j = <NUM_LIT:0> ; int k = <NUM_LIT:0> ; do { if ( par3 <= <NUM_LIT:0> ) { break ; } k = getVerticalOffset ( par1Entity , par2 , par3 - <NUM_LIT:1> , par4 , par5PathPoint ) ; if ( isPathingInWater && k == - <NUM_LIT:1> ) { return null ; } if ( k != <NUM_LIT:1> ) { break ; } if ( ++ j >= <NUM_LIT:4> ) { return null ; } if ( -- par3 > <NUM_LIT:0> ) { pathpoint = openPoint ( par2 , par3 , par4 ) ; } } while ( true ) ; if ( k == - <NUM_LIT:2> ) { return null ; } } return pathpoint ; } private final PathPoint openPoint ( int par1 , int par2 , int par3 ) { int i = PathPoint . makeHash ( par1 , par2 , par3 ) ; PathPoint pathpoint = ( PathPoint ) pointMap . lookup ( i ) ; if ( pathpoint == null ) { pathpoint = new PathPoint ( par1 , par2 , par3 ) ; pointMap . addKey ( i , pathpoint ) ; } return pathpoint ; } private int getVerticalOffset ( Entity par1Entity , int par2 , int par3 , int par4 , PathPoint par5PathPoint ) { boolean flag = false ; for ( int i = par2 ; i < par2 + par5PathPoint . xCoord ; i ++ ) { for ( int j = par3 ; j < par3 + par5PathPoint . yCoord ; j ++ ) { for ( int k = par4 ; k < par4 + par5PathPoint . zCoord ; k ++ ) { int l = worldMap . getBlockId ( i , j , k ) ; if ( l <= <NUM_LIT:0> ) { continue ; } if ( l == Block . trapdoor . blockID ) { flag = true ; } else if ( l == Block . waterMoving . blockID || l == Block . waterStill . blockID ) { if ( ! isPathingInWater ) { flag = true ; } else { return - <NUM_LIT:1> ; } } else if ( ! isWoddenDoorAllowed && l == Block . doorWood . blockID ) { return <NUM_LIT:0> ; } Block block = Block . blocksList [ l ] ; if ( block . getBlocksMovement ( worldMap , i , j , k ) || isMovementBlockAllowed && l == Block . doorWood . blockID ) { continue ; } if ( l == Block . fence . blockID || l == Block . fenceGate . blockID ) { return - <NUM_LIT:3> ; } if ( l == Block . trapdoor . blockID ) { return - <NUM_LIT:4> ; } Material material = block . blockMaterial ; if ( material == Material . lava ) { if ( ! par1Entity . handleLavaMovement ( ) ) { return - <NUM_LIT:2> ; } } else { return <NUM_LIT:0> ; } } } } return flag ? <NUM_LIT:2> : <NUM_LIT:1> ; } private PathEntity createEntityPath ( PathPoint par1PathPoint , PathPoint par2PathPoint ) { int i = <NUM_LIT:1> ; for ( PathPoint pathpoint = par2PathPoint ; pathpoint . previous != null ; pathpoint = pathpoint . previous ) { i ++ ; } PathPoint apathpoint [ ] = new PathPoint [ i ] ; PathPoint pathpoint1 = par2PathPoint ; for ( apathpoint [ -- i ] = pathpoint1 ; pathpoint1 . previous != null ; apathpoint [ -- i ] = pathpoint1 ) { pathpoint1 = pathpoint1 . previous ; } return new PathEntity ( apathpoint ) ; } } </s>
<s> package net . minecraft . src ; import java . io . * ; public class Packet102WindowClick extends Packet { public int window_Id ; public int inventorySlot ; public int mouseClick ; public short action ; public ItemStack itemStack ; public boolean holdingShift ; public Packet102WindowClick ( ) { } public void processPacket ( NetHandler par1NetHandler ) { par1NetHandler . handleWindowClick ( this ) ; } public void readPacketData ( DataInputStream par1DataInputStream ) throws IOException { window_Id = par1DataInputStream . readByte ( ) ; inventorySlot = par1DataInputStream . readShort ( ) ; mouseClick = par1DataInputStream . readByte ( ) ; action = par1DataInputStream . readShort ( ) ; holdingShift = par1DataInputStream . readBoolean ( ) ; itemStack = readItemStack ( par1DataInputStream ) ; } public void writePacketData ( DataOutputStream par1DataOutputStream ) throws IOException { par1DataOutputStream . writeByte ( window_Id ) ; par1DataOutputStream . writeShort ( inventorySlot ) ; par1DataOutputStream . writeByte ( mouseClick ) ; par1DataOutputStream . writeShort ( action ) ; par1DataOutputStream . writeBoolean ( holdingShift ) ; writeItemStack ( itemStack , par1DataOutputStream ) ; } public int getPacketSize ( ) { return <NUM_LIT:11> ; } } </s>
<s> package net . minecraft . src ; public class ItemPickaxe extends ItemTool { private static Block blocksEffectiveAgainst [ ] ; protected ItemPickaxe ( int par1 , EnumToolMaterial par2EnumToolMaterial ) { super ( par1 , <NUM_LIT:2> , par2EnumToolMaterial , blocksEffectiveAgainst ) ; } public boolean canHarvestBlock ( Block par1Block ) { if ( par1Block == Block . obsidian ) { return toolMaterial . getHarvestLevel ( ) == <NUM_LIT:3> ; } if ( par1Block == Block . blockDiamond || par1Block == Block . oreDiamond ) { return toolMaterial . getHarvestLevel ( ) >= <NUM_LIT:2> ; } if ( par1Block == Block . blockGold || par1Block == Block . oreGold ) { return toolMaterial . getHarvestLevel ( ) >= <NUM_LIT:2> ; } if ( par1Block == Block . blockSteel || par1Block == Block . oreIron ) { return toolMaterial . getHarvestLevel ( ) >= <NUM_LIT:1> ; } if ( par1Block == Block . blockLapis || par1Block == Block . oreLapis ) { return toolMaterial . getHarvestLevel ( ) >= <NUM_LIT:1> ; } if ( par1Block == Block . oreRedstone || par1Block == Block . oreRedstoneGlowing ) { return toolMaterial . getHarvestLevel ( ) >= <NUM_LIT:2> ; } if ( par1Block . blockMaterial == Material . rock ) { return true ; } return par1Block . blockMaterial == Material . iron ; } public float getStrVsBlock ( ItemStack par1ItemStack , Block par2Block ) { if ( par2Block != null && ( par2Block . blockMaterial == Material . iron || par2Block . blockMaterial == Material . rock ) ) { return efficiencyOnProperMaterial ; } else { return super . getStrVsBlock ( par1ItemStack , par2Block ) ; } } static { blocksEffectiveAgainst = ( new Block [ ] { Block . cobblestone , Block . stairDouble , Block . stairSingle , Block . stone , Block . sandStone , Block . cobblestoneMossy , Block . oreIron , Block . blockSteel , Block . oreCoal , Block . blockGold , Block . oreGold , Block . oreDiamond , Block . blockDiamond , Block . ice , Block . netherrack , Block . oreLapis , Block . blockLapis , Block . oreRedstone , Block . oreRedstoneGlowing , Block . rail , Block . railDetector , Block . railPowered } ) ; } } </s>
<s> package net . minecraft . src ; import java . util . List ; import java . util . Random ; public class EntityFireball extends Entity { private int xTile ; private int yTile ; private int zTile ; private int inTile ; private boolean inGround ; public EntityLiving shootingEntity ; private int ticksAlive ; private int ticksInAir ; public double accelerationX ; public double accelerationY ; public double accelerationZ ; public EntityFireball ( World par1World ) { super ( par1World ) ; xTile = - <NUM_LIT:1> ; yTile = - <NUM_LIT:1> ; zTile = - <NUM_LIT:1> ; inTile = <NUM_LIT:0> ; inGround = false ; ticksInAir = <NUM_LIT:0> ; setSize ( <NUM_LIT> , <NUM_LIT> ) ; } protected void entityInit ( ) { } public EntityFireball ( World par1World , double par2 , double par4 , double par6 , double par8 , double par10 , double par12 ) { super ( par1World ) ; xTile = - <NUM_LIT:1> ; yTile = - <NUM_LIT:1> ; zTile = - <NUM_LIT:1> ; inTile = <NUM_LIT:0> ; inGround = false ; ticksInAir = <NUM_LIT:0> ; setSize ( <NUM_LIT> , <NUM_LIT> ) ; setLocationAndAngles ( par2 , par4 , par6 , rotationYaw , rotationPitch ) ; setPosition ( par2 , par4 , par6 ) ; double d = MathHelper . sqrt_double ( par8 * par8 + par10 * par10 + par12 * par12 ) ; accelerationX = ( par8 / d ) * <NUM_LIT> ; accelerationY = ( par10 / d ) * <NUM_LIT> ; accelerationZ = ( par12 / d ) * <NUM_LIT> ; } public EntityFireball ( World par1World , EntityLiving par2EntityLiving , double par3 , double par5 , double par7 ) { super ( par1World ) ; xTile = - <NUM_LIT:1> ; yTile = - <NUM_LIT:1> ; zTile = - <NUM_LIT:1> ; inTile = <NUM_LIT:0> ; inGround = false ; ticksInAir = <NUM_LIT:0> ; shootingEntity = par2EntityLiving ; setSize ( <NUM_LIT> , <NUM_LIT> ) ; setLocationAndAngles ( par2EntityLiving . posX , par2EntityLiving . posY , par2EntityLiving . posZ , par2EntityLiving . rotationYaw , par2EntityLiving . rotationPitch ) ; setPosition ( posX , posY , posZ ) ; yOffset = <NUM_LIT> ; motionX = motionY = motionZ = <NUM_LIT> ; par3 += rand . nextGaussian ( ) * <NUM_LIT> ; par5 += rand . nextGaussian ( ) * <NUM_LIT> ; par7 += rand . nextGaussian ( ) * <NUM_LIT> ; double d = MathHelper . sqrt_double ( par3 * par3 + par5 * par5 + par7 * par7 ) ; accelerationX = ( par3 / d ) * <NUM_LIT> ; accelerationY = ( par5 / d ) * <NUM_LIT> ; accelerationZ = ( par7 / d ) * <NUM_LIT> ; } public void onUpdate ( ) { if ( ! worldObj . isRemote && ( shootingEntity != null && shootingEntity . isDead || ! worldObj . blockExists ( ( int ) posX , ( int ) posY , ( int ) posZ ) ) ) { setDead ( ) ; return ; } super . onUpdate ( ) ; setFire ( <NUM_LIT:1> ) ; if ( inGround ) { int i = worldObj . getBlockId ( xTile , yTile , zTile ) ; if ( i != inTile ) { inGround = false ; motionX *= rand . nextFloat ( ) * <NUM_LIT> ; motionY *= rand . nextFloat ( ) * <NUM_LIT> ; motionZ *= rand . nextFloat ( ) * <NUM_LIT> ; ticksAlive = <NUM_LIT:0> ; ticksInAir = <NUM_LIT:0> ; } else { ticksAlive ++ ; if ( ticksAlive == <NUM_LIT> ) { setDead ( ) ; } return ; } } else { ticksInAir ++ ; } Vec3D vec3d = Vec3D . createVector ( posX , posY , posZ ) ; Vec3D vec3d1 = Vec3D . createVector ( posX + motionX , posY + motionY , posZ + motionZ ) ; MovingObjectPosition movingobjectposition = worldObj . rayTraceBlocks ( vec3d , vec3d1 ) ; vec3d = Vec3D . createVector ( posX , posY , posZ ) ; vec3d1 = Vec3D . createVector ( posX + motionX , posY + motionY , posZ + motionZ ) ; if ( movingobjectposition != null ) { vec3d1 = Vec3D . createVector ( movingobjectposition . hitVec . xCoord , movingobjectposition . hitVec . yCoord , movingobjectposition . hitVec . zCoord ) ; } Entity entity = null ; List list = worldObj . getEntitiesWithinAABBExcludingEntity ( this , boundingBox . addCoord ( motionX , motionY , motionZ ) . expand ( <NUM_LIT> , <NUM_LIT> , <NUM_LIT> ) ) ; double d = <NUM_LIT> ; for ( int j = <NUM_LIT:0> ; j < list . size ( ) ; j ++ ) { Entity entity1 = ( Entity ) list . get ( j ) ; if ( ! entity1 . canBeCollidedWith ( ) || entity1 . isEntityEqual ( shootingEntity ) && ticksInAir < <NUM_LIT> ) { continue ; } float f2 = <NUM_LIT> ; AxisAlignedBB axisalignedbb = entity1 . boundingBox . expand ( f2 , f2 , f2 ) ; MovingObjectPosition movingobjectposition1 = axisalignedbb . calculateIntercept ( vec3d , vec3d1 ) ; if ( movingobjectposition1 == null ) { continue ; } double d1 = vec3d . distanceTo ( movingobjectposition1 . hitVec ) ; if ( d1 < d || d == <NUM_LIT> ) { entity = entity1 ; d = d1 ; } } if ( entity != null ) { movingobjectposition = new MovingObjectPosition ( entity ) ; } if ( movingobjectposition != null ) { func_40063_a ( movingobjectposition ) ; } posX += motionX ; posY += motionY ; posZ += motionZ ; float f = MathHelper . sqrt_double ( motionX * motionX + motionZ * motionZ ) ; rotationYaw = ( float ) ( ( Math . atan2 ( motionX , motionZ ) * <NUM_LIT> ) / Math . PI ) ; for ( rotationPitch = ( float ) ( ( Math . atan2 ( motionY , f ) * <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 f1 = <NUM_LIT> ; if ( isInWater ( ) ) { for ( int k = <NUM_LIT:0> ; k < <NUM_LIT:4> ; k ++ ) { float f3 = <NUM_LIT> ; worldObj . spawnParticle ( "<STR_LIT>" , posX - motionX * ( double ) f3 , posY - motionY * ( double ) f3 , posZ - motionZ * ( double ) f3 , motionX , motionY , motionZ ) ; } f1 = <NUM_LIT> ; } motionX += accelerationX ; motionY += accelerationY ; motionZ += accelerationZ ; motionX *= f1 ; motionY *= f1 ; motionZ *= f1 ; worldObj . spawnParticle ( "<STR_LIT>" , posX , posY + <NUM_LIT> , posZ , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> ) ; setPosition ( posX , posY , posZ ) ; } protected void func_40063_a ( MovingObjectPosition par1MovingObjectPosition ) { if ( ! worldObj . isRemote ) { if ( par1MovingObjectPosition . entityHit != null ) { if ( ! par1MovingObjectPosition . entityHit . attackEntityFrom ( DamageSource . causeFireballDamage ( this , shootingEntity ) , <NUM_LIT:4> ) ) ; } worldObj . newExplosion ( null , posX , posY , posZ , <NUM_LIT> , true ) ; setDead ( ) ; } } 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 ) ( inGround ? <NUM_LIT:1> : <NUM_LIT:0> ) ) ; } 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> ; inGround = par1NBTTagCompound . getByte ( "<STR_LIT>" ) == <NUM_LIT:1> ; } public boolean canBeCollidedWith ( ) { return true ; } public float getCollisionBorderSize ( ) { return <NUM_LIT> ; } public boolean attackEntityFrom ( DamageSource par1DamageSource , int par2 ) { setBeenAttacked ( ) ; if ( par1DamageSource . getEntity ( ) != null ) { Vec3D vec3d = par1DamageSource . getEntity ( ) . getLookVec ( ) ; if ( vec3d != null ) { motionX = vec3d . xCoord ; motionY = vec3d . yCoord ; motionZ = vec3d . zCoord ; accelerationX = motionX * <NUM_LIT> ; accelerationY = motionY * <NUM_LIT> ; accelerationZ = motionZ * <NUM_LIT> ; } if ( par1DamageSource . getEntity ( ) instanceof EntityLiving ) { shootingEntity = ( EntityLiving ) par1DamageSource . getEntity ( ) ; } return true ; } else { return false ; } } public float getBrightness ( float par1 ) { return <NUM_LIT> ; } } </s>
<s> package net . minecraft . src ; import java . util . List ; public class Achievement extends StatBase { public final int displayColumn ; public final int displayRow ; public final Achievement parentAchievement ; private final String achievementDescription ; public final ItemStack theItemStack ; private boolean isSpecial ; public Achievement ( int par1 , String par2Str , int par3 , int par4 , Item par5Item , Achievement par6Achievement ) { this ( par1 , par2Str , par3 , par4 , new ItemStack ( par5Item ) , par6Achievement ) ; } public Achievement ( int par1 , String par2Str , int par3 , int par4 , Block par5Block , Achievement par6Achievement ) { this ( par1 , par2Str , par3 , par4 , new ItemStack ( par5Block ) , par6Achievement ) ; } public Achievement ( int par1 , String par2Str , int par3 , int par4 , ItemStack par5ItemStack , Achievement par6Achievement ) { super ( <NUM_LIT> + par1 , ( new StringBuilder ( ) ) . append ( "<STR_LIT>" ) . append ( par2Str ) . toString ( ) ) ; theItemStack = par5ItemStack ; achievementDescription = ( new StringBuilder ( ) ) . append ( "<STR_LIT>" ) . append ( par2Str ) . append ( "<STR_LIT>" ) . toString ( ) ; displayColumn = par3 ; displayRow = par4 ; if ( par3 < AchievementList . minDisplayColumn ) { AchievementList . minDisplayColumn = par3 ; } if ( par4 < AchievementList . minDisplayRow ) { AchievementList . minDisplayRow = par4 ; } if ( par3 > AchievementList . maxDisplayColumn ) { AchievementList . maxDisplayColumn = par3 ; } if ( par4 > AchievementList . maxDisplayRow ) { AchievementList . maxDisplayRow = par4 ; } parentAchievement = par6Achievement ; } public Achievement setIndependent ( ) { isIndependent = true ; return this ; } public Achievement setSpecial ( ) { isSpecial = true ; return this ; } public Achievement registerAchievement ( ) { super . registerStat ( ) ; AchievementList . achievementList . add ( this ) ; return this ; } public StatBase registerStat ( ) { return registerAchievement ( ) ; } public StatBase initIndependentStat ( ) { return setIndependent ( ) ; } } </s>
<s> package net . minecraft . src ; public class EntityAIMoveTowardsTarget extends EntityAIBase { private EntityCreature theEntity ; private EntityLiving targetEntity ; private double movePosX ; private double movePosY ; private double movePosZ ; private float field_48217_f ; private float field_48218_g ; public EntityAIMoveTowardsTarget ( EntityCreature par1EntityCreature , float par2 , float par3 ) { theEntity = par1EntityCreature ; field_48217_f = par2 ; field_48218_g = par3 ; setMutexBits ( <NUM_LIT:1> ) ; } public boolean shouldExecute ( ) { targetEntity = theEntity . getAttackTarget ( ) ; if ( targetEntity == null ) { return false ; } if ( targetEntity . getDistanceSqToEntity ( theEntity ) > ( double ) ( field_48218_g * field_48218_g ) ) { return false ; } Vec3D vec3d = RandomPositionGenerator . func_48395_a ( theEntity , <NUM_LIT:16> , <NUM_LIT:7> , Vec3D . createVector ( targetEntity . posX , targetEntity . posY , targetEntity . posZ ) ) ; if ( vec3d == null ) { return false ; } else { movePosX = vec3d . xCoord ; movePosY = vec3d . yCoord ; movePosZ = vec3d . zCoord ; return true ; } } public boolean continueExecuting ( ) { return ! theEntity . getNavigator ( ) . noPath ( ) && targetEntity . isEntityAlive ( ) && targetEntity . getDistanceSqToEntity ( theEntity ) < ( double ) ( field_48218_g * field_48218_g ) ; } public void resetTask ( ) { targetEntity = null ; } public void startExecuting ( ) { theEntity . getNavigator ( ) . func_48658_a ( movePosX , movePosY , movePosZ , field_48217_f ) ; } } </s>
<s> package net . minecraft . src ; import java . util . List ; import java . util . Random ; public class StructureMineshaftPieces { private static final StructurePieceTreasure lootArray [ ] ; public StructureMineshaftPieces ( ) { } private static StructureComponent getRandomComponent ( List par0List , Random par1Random , int par2 , int par3 , int par4 , int par5 , int par6 ) { int i = par1Random . nextInt ( <NUM_LIT:100> ) ; if ( i >= <NUM_LIT> ) { StructureBoundingBox structureboundingbox = ComponentMineshaftCross . findValidPlacement ( par0List , par1Random , par2 , par3 , par4 , par5 ) ; if ( structureboundingbox != null ) { return new ComponentMineshaftCross ( par6 , par1Random , structureboundingbox , par5 ) ; } } else if ( i >= <NUM_LIT> ) { StructureBoundingBox structureboundingbox1 = ComponentMineshaftStairs . findValidPlacement ( par0List , par1Random , par2 , par3 , par4 , par5 ) ; if ( structureboundingbox1 != null ) { return new ComponentMineshaftStairs ( par6 , par1Random , structureboundingbox1 , par5 ) ; } } else { StructureBoundingBox structureboundingbox2 = ComponentMineshaftCorridor . findValidPlacement ( par0List , par1Random , par2 , par3 , par4 , par5 ) ; if ( structureboundingbox2 != null ) { return new ComponentMineshaftCorridor ( par6 , par1Random , structureboundingbox2 , par5 ) ; } } return null ; } private static StructureComponent getNextMineShaftComponent ( StructureComponent par0StructureComponent , List par1List , Random par2Random , int par3 , int par4 , int par5 , int par6 , int par7 ) { if ( par7 > <NUM_LIT:8> ) { return null ; } if ( Math . abs ( par3 - par0StructureComponent . getBoundingBox ( ) . minX ) > <NUM_LIT> || Math . abs ( par5 - par0StructureComponent . getBoundingBox ( ) . minZ ) > <NUM_LIT> ) { return null ; } StructureComponent structurecomponent = getRandomComponent ( par1List , par2Random , par3 , par4 , par5 , par6 , par7 + <NUM_LIT:1> ) ; if ( structurecomponent != null ) { par1List . add ( structurecomponent ) ; structurecomponent . buildComponent ( par0StructureComponent , par1List , par2Random ) ; } return structurecomponent ; } static StructureComponent getNextComponent ( StructureComponent par0StructureComponent , List par1List , Random par2Random , int par3 , int par4 , int par5 , int par6 , int par7 ) { return getNextMineShaftComponent ( par0StructureComponent , par1List , par2Random , par3 , par4 , par5 , par6 , par7 ) ; } static StructurePieceTreasure [ ] getTreasurePieces ( ) { return lootArray ; } static { lootArray = ( new StructurePieceTreasure [ ] { new StructurePieceTreasure ( Item . ingotIron . shiftedIndex , <NUM_LIT:0> , <NUM_LIT:1> , <NUM_LIT:5> , <NUM_LIT:10> ) , new StructurePieceTreasure ( Item . ingotGold . shiftedIndex , <NUM_LIT:0> , <NUM_LIT:1> , <NUM_LIT:3> , <NUM_LIT:5> ) , new StructurePieceTreasure ( Item . redstone . shiftedIndex , <NUM_LIT:0> , <NUM_LIT:4> , <NUM_LIT:9> , <NUM_LIT:5> ) , new StructurePieceTreasure ( Item . dyePowder . shiftedIndex , <NUM_LIT:4> , <NUM_LIT:4> , <NUM_LIT:9> , <NUM_LIT:5> ) , new StructurePieceTreasure ( Item . diamond . shiftedIndex , <NUM_LIT:0> , <NUM_LIT:1> , <NUM_LIT:2> , <NUM_LIT:3> ) , new StructurePieceTreasure ( Item . coal . shiftedIndex , <NUM_LIT:0> , <NUM_LIT:3> , <NUM_LIT:8> , <NUM_LIT:10> ) , new StructurePieceTreasure ( Item . bread . shiftedIndex , <NUM_LIT:0> , <NUM_LIT:1> , <NUM_LIT:3> , <NUM_LIT:15> ) , new StructurePieceTreasure ( Item . pickaxeSteel . shiftedIndex , <NUM_LIT:0> , <NUM_LIT:1> , <NUM_LIT:1> , <NUM_LIT:1> ) , new StructurePieceTreasure ( Block . rail . blockID , <NUM_LIT:0> , <NUM_LIT:4> , <NUM_LIT:8> , <NUM_LIT:1> ) , new StructurePieceTreasure ( Item . melonSeeds . shiftedIndex , <NUM_LIT:0> , <NUM_LIT:2> , <NUM_LIT:4> , <NUM_LIT:10> ) , new StructurePieceTreasure ( Item . pumpkinSeeds . shiftedIndex , <NUM_LIT:0> , <NUM_LIT:2> , <NUM_LIT:4> , <NUM_LIT:10> ) } ) ; } } </s>
<s> package net . minecraft . src ; import java . util . Random ; public class BlockTNT extends Block { public BlockTNT ( int par1 , int par2 ) { super ( par1 , par2 , Material . tnt ) ; } public int getBlockTextureFromSide ( int par1 ) { if ( par1 == <NUM_LIT:0> ) { return blockIndexInTexture + <NUM_LIT:2> ; } if ( par1 == <NUM_LIT:1> ) { return blockIndexInTexture + <NUM_LIT:1> ; } else { return blockIndexInTexture ; } } public void onBlockAdded ( World par1World , int par2 , int par3 , int par4 ) { super . onBlockAdded ( par1World , par2 , par3 , par4 ) ; if ( par1World . isBlockIndirectlyGettingPowered ( par2 , par3 , par4 ) ) { onBlockDestroyedByPlayer ( par1World , par2 , par3 , par4 , <NUM_LIT:1> ) ; par1World . setBlockWithNotify ( par2 , par3 , par4 , <NUM_LIT:0> ) ; } } public void onNeighborBlockChange ( World par1World , int par2 , int par3 , int par4 , int par5 ) { if ( par5 > <NUM_LIT:0> && Block . blocksList [ par5 ] . canProvidePower ( ) && par1World . isBlockIndirectlyGettingPowered ( par2 , par3 , par4 ) ) { onBlockDestroyedByPlayer ( par1World , par2 , par3 , par4 , <NUM_LIT:1> ) ; par1World . setBlockWithNotify ( par2 , par3 , par4 , <NUM_LIT:0> ) ; } } public int quantityDropped ( Random par1Random ) { return <NUM_LIT:0> ; } public void onBlockDestroyedByExplosion ( World par1World , int par2 , int par3 , int par4 ) { if ( par1World . isRemote ) { return ; } else { EntityTNTPrimed entitytntprimed = new EntityTNTPrimed ( par1World , ( float ) par2 + <NUM_LIT> , ( float ) par3 + <NUM_LIT> , ( float ) par4 + <NUM_LIT> ) ; entitytntprimed . fuse = par1World . rand . nextInt ( entitytntprimed . fuse / <NUM_LIT:4> ) + entitytntprimed . fuse / <NUM_LIT:8> ; par1World . spawnEntityInWorld ( entitytntprimed ) ; return ; } } public void onBlockDestroyedByPlayer ( World par1World , int par2 , int par3 , int par4 , int par5 ) { if ( par1World . isRemote ) { return ; } if ( ( par5 & <NUM_LIT:1> ) == <NUM_LIT:0> ) { dropBlockAsItem_do ( par1World , par2 , par3 , par4 , new ItemStack ( Block . tnt . blockID , <NUM_LIT:1> , <NUM_LIT:0> ) ) ; } else { EntityTNTPrimed entitytntprimed = new EntityTNTPrimed ( par1World , ( float ) par2 + <NUM_LIT> , ( float ) par3 + <NUM_LIT> , ( float ) par4 + <NUM_LIT> ) ; par1World . spawnEntityInWorld ( entitytntprimed ) ; par1World . playSoundAtEntity ( entitytntprimed , "<STR_LIT>" , <NUM_LIT> , <NUM_LIT> ) ; } } public void onBlockClicked ( World par1World , int par2 , int par3 , int par4 , EntityPlayer par5EntityPlayer ) { super . onBlockClicked ( par1World , par2 , par3 , par4 , par5EntityPlayer ) ; } public boolean blockActivated ( World par1World , int par2 , int par3 , int par4 , EntityPlayer par5EntityPlayer ) { if ( par5EntityPlayer . getCurrentEquippedItem ( ) != null && par5EntityPlayer . getCurrentEquippedItem ( ) . itemID == Item . flintAndSteel . shiftedIndex ) { onBlockDestroyedByPlayer ( par1World , par2 , par3 , par4 , <NUM_LIT:1> ) ; par1World . setBlockWithNotify ( par2 , par3 , par4 , <NUM_LIT:0> ) ; return true ; } else { return super . blockActivated ( par1World , par2 , par3 , par4 , par5EntityPlayer ) ; } } protected ItemStack createStackedBlock ( int par1 ) { return null ; } } </s>
<s> package net . minecraft . src ; import java . io . PrintStream ; import java . util . * ; public class EntityTrackerEntry { public Entity trackedEntity ; public int trackingDistanceThreshold ; public int field_9234_e ; public int encodedPosX ; public int encodedPosY ; public int encodedPosZ ; public int encodedRotationYaw ; public int encodedRotationPitch ; public int field_48617_i ; public double lastTrackedEntityMotionX ; public double lastTrackedEntityMotionY ; public double lastTrackedEntityMotionZ ; public int updateCounter ; private double lastTrackedEntityPosX ; private double lastTrackedEntityPosY ; private double lastTrackedEntityPosZ ; private boolean firstUpdateDone ; private boolean shouldSendMotionUpdates ; private int field_28165_t ; public boolean playerEntitiesUpdated ; public Set trackedPlayers ; public EntityTrackerEntry ( Entity par1Entity , int par2 , int par3 , boolean par4 ) { updateCounter = <NUM_LIT:0> ; firstUpdateDone = false ; field_28165_t = <NUM_LIT:0> ; playerEntitiesUpdated = false ; trackedPlayers = new HashSet ( ) ; trackedEntity = par1Entity ; trackingDistanceThreshold = par2 ; field_9234_e = par3 ; shouldSendMotionUpdates = par4 ; encodedPosX = MathHelper . floor_double ( par1Entity . posX * <NUM_LIT> ) ; encodedPosY = MathHelper . floor_double ( par1Entity . posY * <NUM_LIT> ) ; encodedPosZ = MathHelper . floor_double ( par1Entity . posZ * <NUM_LIT> ) ; encodedRotationYaw = MathHelper . floor_float ( ( par1Entity . rotationYaw * <NUM_LIT> ) / <NUM_LIT> ) ; encodedRotationPitch = MathHelper . floor_float ( ( par1Entity . rotationPitch * <NUM_LIT> ) / <NUM_LIT> ) ; field_48617_i = MathHelper . floor_float ( ( par1Entity . func_48314_aq ( ) * <NUM_LIT> ) / <NUM_LIT> ) ; } public boolean equals ( Object par1Obj ) { if ( par1Obj instanceof EntityTrackerEntry ) { return ( ( EntityTrackerEntry ) par1Obj ) . trackedEntity . entityId == trackedEntity . entityId ; } else { return false ; } } public int hashCode ( ) { return trackedEntity . entityId ; } public void updatePlayerList ( List par1List ) { playerEntitiesUpdated = false ; if ( ! firstUpdateDone || trackedEntity . getDistanceSq ( lastTrackedEntityPosX , lastTrackedEntityPosY , lastTrackedEntityPosZ ) > <NUM_LIT> ) { lastTrackedEntityPosX = trackedEntity . posX ; lastTrackedEntityPosY = trackedEntity . posY ; lastTrackedEntityPosZ = trackedEntity . posZ ; firstUpdateDone = true ; playerEntitiesUpdated = true ; updatePlayerEntities ( par1List ) ; } field_28165_t ++ ; if ( updateCounter ++ % field_9234_e == <NUM_LIT:0> || trackedEntity . isAirBorne ) { int i = MathHelper . floor_double ( trackedEntity . posX * <NUM_LIT> ) ; int j = MathHelper . floor_double ( trackedEntity . posY * <NUM_LIT> ) ; int k = MathHelper . floor_double ( trackedEntity . posZ * <NUM_LIT> ) ; int l = MathHelper . floor_float ( ( trackedEntity . rotationYaw * <NUM_LIT> ) / <NUM_LIT> ) ; int i1 = MathHelper . floor_float ( ( trackedEntity . rotationPitch * <NUM_LIT> ) / <NUM_LIT> ) ; int j1 = i - encodedPosX ; int k1 = j - encodedPosY ; int l1 = k - encodedPosZ ; Object obj = null ; boolean flag = Math . abs ( j1 ) >= <NUM_LIT:4> || Math . abs ( k1 ) >= <NUM_LIT:4> || Math . abs ( l1 ) >= <NUM_LIT:4> ; boolean flag1 = Math . abs ( l - encodedRotationYaw ) >= <NUM_LIT:4> || Math . abs ( i1 - encodedRotationPitch ) >= <NUM_LIT:4> ; if ( j1 < - <NUM_LIT> || j1 >= <NUM_LIT> || k1 < - <NUM_LIT> || k1 >= <NUM_LIT> || l1 < - <NUM_LIT> || l1 >= <NUM_LIT> || field_28165_t > <NUM_LIT> ) { field_28165_t = <NUM_LIT:0> ; trackedEntity . posX = ( double ) i / <NUM_LIT> ; trackedEntity . posY = ( double ) j / <NUM_LIT> ; trackedEntity . posZ = ( double ) k / <NUM_LIT> ; obj = new Packet34EntityTeleport ( trackedEntity . entityId , i , j , k , ( byte ) l , ( byte ) i1 ) ; } else if ( flag && flag1 ) { obj = new Packet33RelEntityMoveLook ( trackedEntity . entityId , ( byte ) j1 , ( byte ) k1 , ( byte ) l1 , ( byte ) l , ( byte ) i1 ) ; } else if ( flag ) { obj = new Packet31RelEntityMove ( trackedEntity . entityId , ( byte ) j1 , ( byte ) k1 , ( byte ) l1 ) ; } else if ( flag1 ) { obj = new Packet32EntityLook ( trackedEntity . entityId , ( byte ) l , ( byte ) i1 ) ; } if ( shouldSendMotionUpdates ) { double d = trackedEntity . motionX - lastTrackedEntityMotionX ; double d1 = trackedEntity . motionY - lastTrackedEntityMotionY ; double d2 = trackedEntity . motionZ - lastTrackedEntityMotionZ ; double d3 = <NUM_LIT> ; double d4 = d * d + d1 * d1 + d2 * d2 ; if ( d4 > d3 * d3 || d4 > <NUM_LIT> && trackedEntity . motionX == <NUM_LIT> && trackedEntity . motionY == <NUM_LIT> && trackedEntity . motionZ == <NUM_LIT> ) { lastTrackedEntityMotionX = trackedEntity . motionX ; lastTrackedEntityMotionY = trackedEntity . motionY ; lastTrackedEntityMotionZ = trackedEntity . motionZ ; sendPacketToTrackedPlayers ( new Packet28EntityVelocity ( trackedEntity . entityId , lastTrackedEntityMotionX , lastTrackedEntityMotionY , lastTrackedEntityMotionZ ) ) ; } } if ( obj != null ) { sendPacketToTrackedPlayers ( ( ( Packet ) ( obj ) ) ) ; } DataWatcher datawatcher = trackedEntity . getDataWatcher ( ) ; if ( datawatcher . hasObjectChanged ( ) ) { sendPacketToTrackedPlayersAndTrackedEntity ( new Packet40EntityMetadata ( trackedEntity . entityId , datawatcher ) ) ; } int i2 = MathHelper . floor_float ( ( trackedEntity . func_48314_aq ( ) * <NUM_LIT> ) / <NUM_LIT> ) ; if ( Math . abs ( i2 - field_48617_i ) >= <NUM_LIT:4> ) { sendPacketToTrackedPlayers ( new Packet35EntityHeadRotation ( trackedEntity . entityId , ( byte ) i2 ) ) ; field_48617_i = i2 ; } if ( flag ) { encodedPosX = i ; encodedPosY = j ; encodedPosZ = k ; } if ( flag1 ) { encodedRotationYaw = l ; encodedRotationPitch = i1 ; } } trackedEntity . isAirBorne = false ; if ( trackedEntity . velocityChanged ) { sendPacketToTrackedPlayersAndTrackedEntity ( new Packet28EntityVelocity ( trackedEntity ) ) ; trackedEntity . velocityChanged = false ; } } public void sendPacketToTrackedPlayers ( Packet par1Packet ) { EntityPlayerMP entityplayermp ; for ( Iterator iterator = trackedPlayers . iterator ( ) ; iterator . hasNext ( ) ; entityplayermp . playerNetServerHandler . sendPacket ( par1Packet ) ) { entityplayermp = ( EntityPlayerMP ) iterator . next ( ) ; } } public void sendPacketToTrackedPlayersAndTrackedEntity ( Packet par1Packet ) { sendPacketToTrackedPlayers ( par1Packet ) ; if ( trackedEntity instanceof EntityPlayerMP ) { ( ( EntityPlayerMP ) trackedEntity ) . playerNetServerHandler . sendPacket ( par1Packet ) ; } } public void sendDestroyEntityPacketToTrackedPlayers ( ) { sendPacketToTrackedPlayers ( new Packet29DestroyEntity ( trackedEntity . entityId ) ) ; } public void removeFromTrackedPlayers ( EntityPlayerMP par1EntityPlayerMP ) { if ( trackedPlayers . contains ( par1EntityPlayerMP ) ) { trackedPlayers . remove ( par1EntityPlayerMP ) ; } } public void updatePlayerEntity ( EntityPlayerMP par1EntityPlayerMP ) { if ( par1EntityPlayerMP == trackedEntity ) { return ; } double d = par1EntityPlayerMP . posX - ( double ) ( encodedPosX / <NUM_LIT:32> ) ; double d1 = par1EntityPlayerMP . posZ - ( double ) ( encodedPosZ / <NUM_LIT:32> ) ; if ( d >= ( double ) ( - trackingDistanceThreshold ) && d <= ( double ) trackingDistanceThreshold && d1 >= ( double ) ( - trackingDistanceThreshold ) && d1 <= ( double ) trackingDistanceThreshold ) { if ( ! trackedPlayers . contains ( par1EntityPlayerMP ) ) { trackedPlayers . add ( par1EntityPlayerMP ) ; par1EntityPlayerMP . playerNetServerHandler . sendPacket ( getSpawnPacket ( ) ) ; if ( shouldSendMotionUpdates ) { par1EntityPlayerMP . playerNetServerHandler . sendPacket ( new Packet28EntityVelocity ( trackedEntity . entityId , trackedEntity . motionX , trackedEntity . motionY , trackedEntity . motionZ ) ) ; } ItemStack aitemstack [ ] = trackedEntity . getInventory ( ) ; if ( aitemstack != null ) { for ( int i = <NUM_LIT:0> ; i < aitemstack . length ; i ++ ) { par1EntityPlayerMP . playerNetServerHandler . sendPacket ( new Packet5PlayerInventory ( trackedEntity . entityId , i , aitemstack [ i ] ) ) ; } } if ( trackedEntity instanceof EntityPlayer ) { EntityPlayer entityplayer = ( EntityPlayer ) trackedEntity ; if ( entityplayer . isPlayerSleeping ( ) ) { par1EntityPlayerMP . playerNetServerHandler . sendPacket ( new Packet17Sleep ( trackedEntity , <NUM_LIT:0> , MathHelper . floor_double ( trackedEntity . posX ) , MathHelper . floor_double ( trackedEntity . posY ) , MathHelper . floor_double ( trackedEntity . posZ ) ) ) ; } } if ( trackedEntity instanceof EntityLiving ) { EntityLiving entityliving = ( EntityLiving ) trackedEntity ; PotionEffect potioneffect ; for ( Iterator iterator = entityliving . getActivePotionEffects ( ) . iterator ( ) ; iterator . hasNext ( ) ; par1EntityPlayerMP . playerNetServerHandler . sendPacket ( new Packet41EntityEffect ( trackedEntity . entityId , potioneffect ) ) ) { potioneffect = ( PotionEffect ) iterator . next ( ) ; } } } } else if ( trackedPlayers . contains ( par1EntityPlayerMP ) ) { trackedPlayers . remove ( par1EntityPlayerMP ) ; par1EntityPlayerMP . playerNetServerHandler . sendPacket ( new Packet29DestroyEntity ( trackedEntity . entityId ) ) ; } } public void updatePlayerEntities ( List par1List ) { for ( int i = <NUM_LIT:0> ; i < par1List . size ( ) ; i ++ ) { updatePlayerEntity ( ( EntityPlayerMP ) par1List . get ( i ) ) ; } } private Packet getSpawnPacket ( ) { if ( trackedEntity . isDead ) { System . out . println ( "<STR_LIT>" ) ; } if ( trackedEntity instanceof EntityItem ) { EntityItem entityitem = ( EntityItem ) trackedEntity ; Packet21PickupSpawn packet21pickupspawn = new Packet21PickupSpawn ( entityitem ) ; entityitem . posX = ( double ) packet21pickupspawn . xPosition / <NUM_LIT> ; entityitem . posY = ( double ) packet21pickupspawn . yPosition / <NUM_LIT> ; entityitem . posZ = ( double ) packet21pickupspawn . zPosition / <NUM_LIT> ; return packet21pickupspawn ; } if ( trackedEntity instanceof EntityPlayerMP ) { return new Packet20NamedEntitySpawn ( ( EntityPlayer ) trackedEntity ) ; } if ( trackedEntity instanceof EntityMinecart ) { EntityMinecart entityminecart = ( EntityMinecart ) trackedEntity ; if ( entityminecart . minecartType == <NUM_LIT:0> ) { return new Packet23VehicleSpawn ( trackedEntity , <NUM_LIT:10> ) ; } if ( entityminecart . minecartType == <NUM_LIT:1> ) { return new Packet23VehicleSpawn ( trackedEntity , <NUM_LIT:11> ) ; } if ( entityminecart . minecartType == <NUM_LIT:2> ) { return new Packet23VehicleSpawn ( trackedEntity , <NUM_LIT:12> ) ; } } if ( trackedEntity instanceof EntityBoat ) { return new Packet23VehicleSpawn ( trackedEntity , <NUM_LIT:1> ) ; } if ( trackedEntity instanceof IAnimals ) { return new Packet24MobSpawn ( ( EntityLiving ) trackedEntity ) ; } if ( trackedEntity instanceof EntityDragon ) { return new Packet24MobSpawn ( ( EntityLiving ) trackedEntity ) ; } if ( trackedEntity instanceof EntityFishHook ) { return new Packet23VehicleSpawn ( trackedEntity , <NUM_LIT> ) ; } if ( trackedEntity instanceof EntityArrow ) { Entity entity = ( ( EntityArrow ) trackedEntity ) . shootingEntity ; return new Packet23VehicleSpawn ( trackedEntity , <NUM_LIT> , entity == null ? trackedEntity . entityId : entity . entityId ) ; } if ( trackedEntity instanceof EntitySnowball ) { return new Packet23VehicleSpawn ( trackedEntity , <NUM_LIT> ) ; } if ( trackedEntity instanceof EntityPotion ) { return new Packet23VehicleSpawn ( trackedEntity , <NUM_LIT> , ( ( EntityPotion ) trackedEntity ) . getPotionDamage ( ) ) ; } if ( trackedEntity instanceof EntityExpBottle ) { return new Packet23VehicleSpawn ( trackedEntity , <NUM_LIT> ) ; } if ( trackedEntity instanceof EntityEnderPearl ) { return new Packet23VehicleSpawn ( trackedEntity , <NUM_LIT> ) ; } if ( trackedEntity instanceof EntityEnderEye ) { return new Packet23VehicleSpawn ( trackedEntity , <NUM_LIT> ) ; } if ( trackedEntity instanceof EntitySmallFireball ) { EntitySmallFireball entitysmallfireball = ( EntitySmallFireball ) trackedEntity ; Packet23VehicleSpawn packet23vehiclespawn = null ; if ( entitysmallfireball . shootingEntity != null ) { packet23vehiclespawn = new Packet23VehicleSpawn ( trackedEntity , <NUM_LIT> , entitysmallfireball . shootingEntity . entityId ) ; } else { packet23vehiclespawn = new Packet23VehicleSpawn ( trackedEntity , <NUM_LIT> , <NUM_LIT:0> ) ; } packet23vehiclespawn . speedX = ( int ) ( entitysmallfireball . accelerationX * <NUM_LIT> ) ; packet23vehiclespawn . speedY = ( int ) ( entitysmallfireball . accelerationY * <NUM_LIT> ) ; packet23vehiclespawn . speedZ = ( int ) ( entitysmallfireball . accelerationZ * <NUM_LIT> ) ; return packet23vehiclespawn ; } if ( trackedEntity instanceof EntityFireball ) { EntityFireball entityfireball = ( EntityFireball ) trackedEntity ; Packet23VehicleSpawn packet23vehiclespawn1 = null ; if ( entityfireball . shootingEntity != null ) { packet23vehiclespawn1 = new Packet23VehicleSpawn ( trackedEntity , <NUM_LIT> , ( ( EntityFireball ) trackedEntity ) . shootingEntity . entityId ) ; } else { packet23vehiclespawn1 = new Packet23VehicleSpawn ( trackedEntity , <NUM_LIT> , <NUM_LIT:0> ) ; } packet23vehiclespawn1 . speedX = ( int ) ( entityfireball . accelerationX * <NUM_LIT> ) ; packet23vehiclespawn1 . speedY = ( int ) ( entityfireball . accelerationY * <NUM_LIT> ) ; packet23vehiclespawn1 . speedZ = ( int ) ( entityfireball . accelerationZ * <NUM_LIT> ) ; return packet23vehiclespawn1 ; } if ( trackedEntity instanceof EntityEgg ) { return new Packet23VehicleSpawn ( trackedEntity , <NUM_LIT> ) ; } if ( trackedEntity instanceof EntityTNTPrimed ) { return new Packet23VehicleSpawn ( trackedEntity , <NUM_LIT> ) ; } if ( trackedEntity instanceof EntityEnderCrystal ) { return new Packet23VehicleSpawn ( trackedEntity , <NUM_LIT> ) ; } if ( trackedEntity instanceof EntityFallingSand ) { EntityFallingSand entityfallingsand = ( EntityFallingSand ) trackedEntity ; if ( entityfallingsand . blockID == Block . sand . blockID ) { return new Packet23VehicleSpawn ( trackedEntity , <NUM_LIT> ) ; } if ( entityfallingsand . blockID == Block . gravel . blockID ) { return new Packet23VehicleSpawn ( trackedEntity , <NUM_LIT> ) ; } if ( entityfallingsand . blockID == Block . dragonEgg . blockID ) { return new Packet23VehicleSpawn ( trackedEntity , <NUM_LIT> ) ; } } if ( trackedEntity instanceof EntityPainting ) { return new Packet25EntityPainting ( ( EntityPainting ) trackedEntity ) ; } if ( trackedEntity instanceof EntityXPOrb ) { return new Packet26EntityExpOrb ( ( EntityXPOrb ) trackedEntity ) ; } else { throw new IllegalArgumentException ( ( new StringBuilder ( ) ) . append ( "<STR_LIT>" ) . append ( trackedEntity . getClass ( ) ) . append ( "<STR_LIT:!>" ) . toString ( ) ) ; } } public void removeTrackedPlayerSymmetric ( EntityPlayerMP par1EntityPlayerMP ) { if ( trackedPlayers . contains ( par1EntityPlayerMP ) ) { trackedPlayers . remove ( par1EntityPlayerMP ) ; par1EntityPlayerMP . playerNetServerHandler . sendPacket ( new Packet29DestroyEntity ( trackedEntity . entityId ) ) ; } } } </s>
<s> package net . minecraft . src ; import java . io . * ; public class Packet255KickDisconnect extends Packet { public String reason ; public Packet255KickDisconnect ( ) { } public Packet255KickDisconnect ( String par1Str ) { reason = par1Str ; } public void readPacketData ( DataInputStream par1DataInputStream ) throws IOException { reason = readString ( par1DataInputStream , <NUM_LIT> ) ; } public void writePacketData ( DataOutputStream par1DataOutputStream ) throws IOException { writeString ( reason , par1DataOutputStream ) ; } public void processPacket ( NetHandler par1NetHandler ) { par1NetHandler . handleKickDisconnect ( this ) ; } public int getPacketSize ( ) { return reason . length ( ) ; } } </s>
<s> package net . minecraft . src ; import java . util . Random ; public class BlockDispenser extends BlockContainer { private Random random ; protected BlockDispenser ( int par1 ) { super ( par1 , Material . rock ) ; random = new Random ( ) ; blockIndexInTexture = <NUM_LIT> ; } public int tickRate ( ) { return <NUM_LIT:4> ; } public int idDropped ( int par1 , Random par2Random , int par3 ) { return Block . dispenser . blockID ; } public void onBlockAdded ( World par1World , int par2 , int par3 , int par4 ) { super . onBlockAdded ( par1World , par2 , par3 , par4 ) ; setDispenserDefaultDirection ( par1World , par2 , par3 , par4 ) ; } private void setDispenserDefaultDirection ( World par1World , int par2 , int par3 , int par4 ) { if ( par1World . isRemote ) { return ; } int i = par1World . getBlockId ( par2 , par3 , par4 - <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 ) ; byte byte0 = <NUM_LIT:3> ; if ( Block . opaqueCubeLookup [ i ] && ! Block . opaqueCubeLookup [ j ] ) { byte0 = <NUM_LIT:3> ; } if ( Block . opaqueCubeLookup [ j ] && ! Block . opaqueCubeLookup [ i ] ) { byte0 = <NUM_LIT:2> ; } if ( Block . opaqueCubeLookup [ k ] && ! Block . opaqueCubeLookup [ l ] ) { byte0 = <NUM_LIT:5> ; } if ( Block . opaqueCubeLookup [ l ] && ! Block . opaqueCubeLookup [ k ] ) { byte0 = <NUM_LIT:4> ; } par1World . setBlockMetadataWithNotify ( par2 , par3 , par4 , byte0 ) ; } public int getBlockTextureFromSide ( int par1 ) { if ( par1 == <NUM_LIT:1> ) { return blockIndexInTexture + <NUM_LIT> ; } if ( par1 == <NUM_LIT:0> ) { return blockIndexInTexture + <NUM_LIT> ; } if ( par1 == <NUM_LIT:3> ) { return blockIndexInTexture + <NUM_LIT:1> ; } else { return blockIndexInTexture ; } } public boolean blockActivated ( World par1World , int par2 , int par3 , int par4 , EntityPlayer par5EntityPlayer ) { if ( par1World . isRemote ) { return true ; } TileEntityDispenser tileentitydispenser = ( TileEntityDispenser ) par1World . getBlockTileEntity ( par2 , par3 , par4 ) ; if ( tileentitydispenser != null ) { par5EntityPlayer . displayGUIDispenser ( tileentitydispenser ) ; } return true ; } private void dispenseItem ( World par1World , int par2 , int par3 , int par4 , Random par5Random ) { int i = par1World . getBlockMetadata ( par2 , par3 , par4 ) ; int j = <NUM_LIT:0> ; int k = <NUM_LIT:0> ; if ( i == <NUM_LIT:3> ) { k = <NUM_LIT:1> ; } else if ( i == <NUM_LIT:2> ) { k = - <NUM_LIT:1> ; } else if ( i == <NUM_LIT:5> ) { j = <NUM_LIT:1> ; } else { j = - <NUM_LIT:1> ; } TileEntityDispenser tileentitydispenser = ( TileEntityDispenser ) par1World . getBlockTileEntity ( par2 , par3 , par4 ) ; if ( tileentitydispenser != null ) { ItemStack itemstack = tileentitydispenser . getRandomStackFromInventory ( ) ; double d = ( double ) par2 + ( double ) j * <NUM_LIT> + <NUM_LIT> ; double d1 = ( double ) par3 + <NUM_LIT> ; double d2 = ( double ) par4 + ( double ) k * <NUM_LIT> + <NUM_LIT> ; if ( itemstack == null ) { par1World . playAuxSFX ( <NUM_LIT> , par2 , par3 , par4 , <NUM_LIT:0> ) ; } else { if ( itemstack . itemID == Item . arrow . shiftedIndex ) { EntityArrow entityarrow = new EntityArrow ( par1World , d , d1 , d2 ) ; entityarrow . setArrowHeading ( j , <NUM_LIT> , k , <NUM_LIT> , <NUM_LIT> ) ; entityarrow . doesArrowBelongToPlayer = true ; par1World . spawnEntityInWorld ( entityarrow ) ; par1World . playAuxSFX ( <NUM_LIT> , par2 , par3 , par4 , <NUM_LIT:0> ) ; } else if ( itemstack . itemID == Item . egg . shiftedIndex ) { EntityEgg entityegg = new EntityEgg ( par1World , d , d1 , d2 ) ; entityegg . setThrowableHeading ( j , <NUM_LIT> , k , <NUM_LIT> , <NUM_LIT> ) ; par1World . spawnEntityInWorld ( entityegg ) ; par1World . playAuxSFX ( <NUM_LIT> , par2 , par3 , par4 , <NUM_LIT:0> ) ; } else if ( itemstack . itemID == Item . snowball . shiftedIndex ) { EntitySnowball entitysnowball = new EntitySnowball ( par1World , d , d1 , d2 ) ; entitysnowball . setThrowableHeading ( j , <NUM_LIT> , k , <NUM_LIT> , <NUM_LIT> ) ; par1World . spawnEntityInWorld ( entitysnowball ) ; par1World . playAuxSFX ( <NUM_LIT> , par2 , par3 , par4 , <NUM_LIT:0> ) ; } else if ( itemstack . itemID == Item . potion . shiftedIndex && ItemPotion . isSplash ( itemstack . getItemDamage ( ) ) ) { EntityPotion entitypotion = new EntityPotion ( par1World , d , d1 , d2 , itemstack . getItemDamage ( ) ) ; entitypotion . setThrowableHeading ( j , <NUM_LIT> , k , <NUM_LIT> , <NUM_LIT> ) ; par1World . spawnEntityInWorld ( entitypotion ) ; par1World . playAuxSFX ( <NUM_LIT> , par2 , par3 , par4 , <NUM_LIT:0> ) ; } else if ( itemstack . itemID == Item . expBottle . shiftedIndex ) { EntityExpBottle entityexpbottle = new EntityExpBottle ( par1World , d , d1 , d2 ) ; entityexpbottle . setThrowableHeading ( j , <NUM_LIT> , k , <NUM_LIT> , <NUM_LIT> ) ; par1World . spawnEntityInWorld ( entityexpbottle ) ; par1World . playAuxSFX ( <NUM_LIT> , par2 , par3 , par4 , <NUM_LIT:0> ) ; } else if ( itemstack . itemID == Item . monsterPlacer . shiftedIndex ) { ItemMonsterPlacer . func_48390_a ( par1World , itemstack . getItemDamage ( ) , d + ( double ) j * <NUM_LIT> , d1 - <NUM_LIT> , d2 + ( double ) k * <NUM_LIT> ) ; par1World . playAuxSFX ( <NUM_LIT> , par2 , par3 , par4 , <NUM_LIT:0> ) ; } else if ( itemstack . itemID == Item . fireballCharge . shiftedIndex ) { EntitySmallFireball entitysmallfireball = new EntitySmallFireball ( par1World , d + ( double ) j * <NUM_LIT> , d1 , d2 + ( double ) k * <NUM_LIT> , ( double ) j + par5Random . nextGaussian ( ) * <NUM_LIT> , par5Random . nextGaussian ( ) * <NUM_LIT> , ( double ) k + par5Random . nextGaussian ( ) * <NUM_LIT> ) ; par1World . spawnEntityInWorld ( entitysmallfireball ) ; par1World . playAuxSFX ( <NUM_LIT> , par2 , par3 , par4 , <NUM_LIT:0> ) ; } else { EntityItem entityitem = new EntityItem ( par1World , d , d1 - <NUM_LIT> , d2 , itemstack ) ; double d3 = par5Random . nextDouble ( ) * <NUM_LIT> + <NUM_LIT> ; entityitem . motionX = ( double ) j * d3 ; entityitem . motionY = <NUM_LIT> ; entityitem . motionZ = ( double ) k * d3 ; entityitem . motionX += par5Random . nextGaussian ( ) * <NUM_LIT> * <NUM_LIT> ; entityitem . motionY += par5Random . nextGaussian ( ) * <NUM_LIT> * <NUM_LIT> ; entityitem . motionZ += par5Random . nextGaussian ( ) * <NUM_LIT> * <NUM_LIT> ; par1World . spawnEntityInWorld ( entityitem ) ; par1World . playAuxSFX ( <NUM_LIT:1000> , par2 , par3 , par4 , <NUM_LIT:0> ) ; } par1World . playAuxSFX ( <NUM_LIT> , par2 , par3 , par4 , j + <NUM_LIT:1> + ( k + <NUM_LIT:1> ) * <NUM_LIT:3> ) ; } } } public void onNeighborBlockChange ( World par1World , int par2 , int par3 , int par4 , int par5 ) { if ( par5 > <NUM_LIT:0> && Block . blocksList [ par5 ] . canProvidePower ( ) ) { boolean flag = par1World . isBlockIndirectlyGettingPowered ( par2 , par3 , par4 ) || par1World . isBlockIndirectlyGettingPowered ( par2 , par3 + <NUM_LIT:1> , par4 ) ; if ( flag ) { par1World . scheduleBlockUpdate ( par2 , par3 , par4 , blockID , tickRate ( ) ) ; } } } public void updateTick ( World par1World , int par2 , int par3 , int par4 , Random par5Random ) { if ( ! par1World . isRemote && ( par1World . isBlockIndirectlyGettingPowered ( par2 , par3 , par4 ) || par1World . isBlockIndirectlyGettingPowered ( par2 , par3 + <NUM_LIT:1> , par4 ) ) ) { dispenseItem ( par1World , par2 , par3 , par4 , par5Random ) ; } } public TileEntity getBlockEntity ( ) { return new TileEntityDispenser ( ) ; } public void onBlockPlacedBy ( World par1World , int par2 , int par3 , int par4 , EntityLiving par5EntityLiving ) { int i = MathHelper . floor_double ( ( double ) ( ( par5EntityLiving . rotationYaw * <NUM_LIT> ) / <NUM_LIT> ) + <NUM_LIT> ) & <NUM_LIT:3> ; if ( i == <NUM_LIT:0> ) { par1World . setBlockMetadataWithNotify ( par2 , par3 , par4 , <NUM_LIT:2> ) ; } if ( i == <NUM_LIT:1> ) { par1World . setBlockMetadataWithNotify ( par2 , par3 , par4 , <NUM_LIT:5> ) ; } if ( i == <NUM_LIT:2> ) { par1World . setBlockMetadataWithNotify ( par2 , par3 , par4 , <NUM_LIT:3> ) ; } if ( i == <NUM_LIT:3> ) { par1World . setBlockMetadataWithNotify ( par2 , par3 , par4 , <NUM_LIT:4> ) ; } } public void onBlockRemoval ( World par1World , int par2 , int par3 , int par4 ) { TileEntityDispenser tileentitydispenser = ( TileEntityDispenser ) par1World . getBlockTileEntity ( par2 , par3 , par4 ) ; if ( tileentitydispenser != null ) { label0 : for ( int i = <NUM_LIT:0> ; i < tileentitydispenser . getSizeInventory ( ) ; i ++ ) { ItemStack itemstack = tileentitydispenser . getStackInSlot ( i ) ; if ( itemstack == null ) { continue ; } float f = random . nextFloat ( ) * <NUM_LIT> + <NUM_LIT> ; float f1 = random . nextFloat ( ) * <NUM_LIT> + <NUM_LIT> ; float f2 = random . nextFloat ( ) * <NUM_LIT> + <NUM_LIT> ; do { if ( itemstack . stackSize <= <NUM_LIT:0> ) { continue label0 ; } int j = random . nextInt ( <NUM_LIT> ) + <NUM_LIT:10> ; if ( j > itemstack . stackSize ) { j = itemstack . stackSize ; } itemstack . stackSize -= j ; EntityItem entityitem = new EntityItem ( par1World , ( float ) par2 + f , ( float ) par3 + f1 , ( float ) par4 + f2 , new ItemStack ( itemstack . itemID , j , itemstack . getItemDamage ( ) ) ) ; if ( itemstack . hasTagCompound ( ) ) { entityitem . item . setTagCompound ( ( NBTTagCompound ) itemstack . getTagCompound ( ) . copy ( ) ) ; } float f3 = <NUM_LIT> ; entityitem . motionX = ( float ) random . nextGaussian ( ) * f3 ; entityitem . motionY = ( float ) random . nextGaussian ( ) * f3 + <NUM_LIT> ; entityitem . motionZ = ( float ) random . nextGaussian ( ) * f3 ; par1World . spawnEntityInWorld ( entityitem ) ; } while ( true ) ; } } super . onBlockRemoval ( par1World , par2 , par3 , par4 ) ; } } </s>
<s> package net . minecraft . src ; public class ItemRecord extends Item { public final String recordName ; protected ItemRecord ( int par1 , String par2Str ) { super ( par1 ) ; recordName = par2Str ; maxStackSize = <NUM_LIT:1> ; } public boolean onItemUse ( ItemStack par1ItemStack , EntityPlayer par2EntityPlayer , World par3World , int par4 , int par5 , int par6 , int par7 ) { if ( par3World . getBlockId ( par4 , par5 , par6 ) == Block . jukebox . blockID && par3World . getBlockMetadata ( par4 , par5 , par6 ) == <NUM_LIT:0> ) { if ( par3World . isRemote ) { return true ; } else { ( ( BlockJukeBox ) Block . jukebox ) . insertRecord ( par3World , par4 , par5 , par6 , shiftedIndex ) ; par3World . playAuxSFXAtEntity ( null , <NUM_LIT> , par4 , par5 , par6 , shiftedIndex ) ; par1ItemStack . stackSize -- ; return true ; } } else { return false ; } } } </s>
<s> package net . minecraft . src ; import java . io . IOException ; import java . net . * ; import java . util . HashMap ; import net . minecraft . server . MinecraftServer ; class NetworkAcceptThread extends Thread { final MinecraftServer mcServer ; final NetworkListenThread netWorkListener ; NetworkAcceptThread ( NetworkListenThread par1NetworkListenThread , String par2Str , MinecraftServer par3MinecraftServer ) { super ( par2Str ) ; netWorkListener = par1NetworkListenThread ; mcServer = par3MinecraftServer ; } public void run ( ) { do { if ( ! netWorkListener . isListening ) { break ; } try { Socket socket = NetworkListenThread . getServerSocket ( netWorkListener ) . accept ( ) ; if ( socket == null ) { continue ; } synchronized ( NetworkListenThread . func_35504_b ( netWorkListener ) ) { InetAddress inetaddress = socket . getInetAddress ( ) ; if ( NetworkListenThread . func_35504_b ( netWorkListener ) . containsKey ( inetaddress ) && ! "<STR_LIT:127.0.0.1>" . equals ( inetaddress . getHostAddress ( ) ) && System . currentTimeMillis ( ) - ( ( Long ) NetworkListenThread . func_35504_b ( netWorkListener ) . get ( inetaddress ) ) . longValue ( ) < <NUM_LIT> ) { NetworkListenThread . func_35504_b ( netWorkListener ) . put ( inetaddress , Long . valueOf ( System . currentTimeMillis ( ) ) ) ; socket . close ( ) ; continue ; } NetworkListenThread . func_35504_b ( netWorkListener ) . put ( inetaddress , Long . valueOf ( System . currentTimeMillis ( ) ) ) ; } NetLoginHandler netloginhandler = new NetLoginHandler ( mcServer , socket , ( new StringBuilder ( ) ) . append ( "<STR_LIT>" ) . append ( NetworkListenThread . func_712_b ( netWorkListener ) ) . toString ( ) ) ; NetworkListenThread . func_716_a ( netWorkListener , netloginhandler ) ; } catch ( IOException ioexception ) { ioexception . printStackTrace ( ) ; } } while ( true ) ; } } </s>
<s> package net . minecraft . src ; import java . util . List ; import java . util . Random ; public class ComponentMineshaftStairs extends StructureComponent { public ComponentMineshaftStairs ( int par1 , Random par2Random , StructureBoundingBox par3StructureBoundingBox , int par4 ) { super ( par1 ) ; coordBaseMode = par4 ; boundingBox = par3StructureBoundingBox ; } public static StructureBoundingBox findValidPlacement ( List par0List , Random par1Random , int par2 , int par3 , int par4 , int par5 ) { StructureBoundingBox structureboundingbox = new StructureBoundingBox ( par2 , par3 - <NUM_LIT:5> , par4 , par2 , par3 + <NUM_LIT:2> , par4 ) ; switch ( par5 ) { case <NUM_LIT:2> : structureboundingbox . maxX = par2 + <NUM_LIT:2> ; structureboundingbox . minZ = par4 - <NUM_LIT:8> ; break ; case <NUM_LIT:0> : structureboundingbox . maxX = par2 + <NUM_LIT:2> ; structureboundingbox . maxZ = par4 + <NUM_LIT:8> ; break ; case <NUM_LIT:1> : structureboundingbox . minX = par2 - <NUM_LIT:8> ; structureboundingbox . maxZ = par4 + <NUM_LIT:2> ; break ; case <NUM_LIT:3> : structureboundingbox . maxX = par2 + <NUM_LIT:8> ; structureboundingbox . maxZ = par4 + <NUM_LIT:2> ; break ; } if ( StructureComponent . findIntersecting ( par0List , structureboundingbox ) != null ) { return null ; } else { return structureboundingbox ; } } public void buildComponent ( StructureComponent par1StructureComponent , List par2List , Random par3Random ) { int i = getComponentType ( ) ; switch ( coordBaseMode ) { case <NUM_LIT:2> : StructureMineshaftPieces . getNextComponent ( par1StructureComponent , par2List , par3Random , boundingBox . minX , boundingBox . minY , boundingBox . minZ - <NUM_LIT:1> , <NUM_LIT:2> , i ) ; break ; case <NUM_LIT:0> : StructureMineshaftPieces . getNextComponent ( par1StructureComponent , par2List , par3Random , boundingBox . minX , boundingBox . minY , boundingBox . maxZ + <NUM_LIT:1> , <NUM_LIT:0> , i ) ; break ; case <NUM_LIT:1> : StructureMineshaftPieces . getNextComponent ( par1StructureComponent , par2List , par3Random , boundingBox . minX - <NUM_LIT:1> , boundingBox . minY , boundingBox . minZ , <NUM_LIT:1> , i ) ; break ; case <NUM_LIT:3> : StructureMineshaftPieces . getNextComponent ( par1StructureComponent , par2List , par3Random , boundingBox . maxX + <NUM_LIT:1> , boundingBox . minY , boundingBox . minZ , <NUM_LIT:3> , i ) ; break ; } } public boolean addComponentParts ( World par1World , Random par2Random , StructureBoundingBox par3StructureBoundingBox ) { if ( isLiquidInStructureBoundingBox ( par1World , par3StructureBoundingBox ) ) { return false ; } fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:0> , <NUM_LIT:5> , <NUM_LIT:0> , <NUM_LIT:2> , <NUM_LIT:7> , <NUM_LIT:1> , <NUM_LIT:0> , <NUM_LIT:0> , false ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:7> , <NUM_LIT:2> , <NUM_LIT:2> , <NUM_LIT:8> , <NUM_LIT:0> , <NUM_LIT:0> , false ) ; for ( int i = <NUM_LIT:0> ; i < <NUM_LIT:5> ; i ++ ) { fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:0> , <NUM_LIT:5> - i - ( i >= <NUM_LIT:4> ? <NUM_LIT:0> : <NUM_LIT:1> ) , <NUM_LIT:2> + i , <NUM_LIT:2> , <NUM_LIT:7> - i , <NUM_LIT:2> + i , <NUM_LIT:0> , <NUM_LIT:0> , false ) ; } return true ; } } </s>
<s> package net . minecraft . src ; import java . util . * ; public class MapGenNetherBridge extends MapGenStructure { private List spawnList ; public MapGenNetherBridge ( ) { spawnList = new ArrayList ( ) ; spawnList . add ( new SpawnListEntry ( net . minecraft . src . EntityBlaze . class , <NUM_LIT:10> , <NUM_LIT:2> , <NUM_LIT:3> ) ) ; spawnList . add ( new SpawnListEntry ( net . minecraft . src . EntityPigZombie . class , <NUM_LIT:10> , <NUM_LIT:4> , <NUM_LIT:4> ) ) ; spawnList . add ( new SpawnListEntry ( net . minecraft . src . EntityMagmaCube . class , <NUM_LIT:3> , <NUM_LIT:4> , <NUM_LIT:4> ) ) ; } public List getSpawnList ( ) { return spawnList ; } protected boolean canSpawnStructureAtCoords ( int par1 , int par2 ) { int i = par1 > > <NUM_LIT:4> ; int j = par2 > > <NUM_LIT:4> ; rand . setSeed ( ( long ) ( i ^ j << <NUM_LIT:4> ) ^ worldObj . getSeed ( ) ) ; rand . nextInt ( ) ; if ( rand . nextInt ( <NUM_LIT:3> ) != <NUM_LIT:0> ) { return false ; } if ( par1 != ( i << <NUM_LIT:4> ) + <NUM_LIT:4> + rand . nextInt ( <NUM_LIT:8> ) ) { return false ; } return par2 == ( j << <NUM_LIT:4> ) + <NUM_LIT:4> + rand . nextInt ( <NUM_LIT:8> ) ; } protected StructureStart getStructureStart ( int par1 , int par2 ) { return new StructureNetherBridgeStart ( worldObj , rand , par1 , par2 ) ; } } </s>
<s> package net . minecraft . src ; import java . util . List ; import java . util . Random ; public class ComponentStrongholdLibrary extends ComponentStronghold { private static final StructurePieceTreasure field_35335_b [ ] ; protected final EnumDoor doorType ; private final boolean isLargeRoom ; public ComponentStrongholdLibrary ( int par1 , Random par2Random , StructureBoundingBox par3StructureBoundingBox , int par4 ) { super ( par1 ) ; coordBaseMode = par4 ; doorType = getRandomDoor ( par2Random ) ; boundingBox = par3StructureBoundingBox ; isLargeRoom = par3StructureBoundingBox . getYSize ( ) > <NUM_LIT:6> ; } public void buildComponent ( StructureComponent structurecomponent , List list , Random random ) { } public static ComponentStrongholdLibrary findValidPlacement ( List par0List , Random par1Random , int par2 , int par3 , int par4 , int par5 , int par6 ) { StructureBoundingBox structureboundingbox = StructureBoundingBox . getComponentToAddBoundingBox ( par2 , par3 , par4 , - <NUM_LIT:4> , - <NUM_LIT:1> , <NUM_LIT:0> , <NUM_LIT> , <NUM_LIT:11> , <NUM_LIT:15> , par5 ) ; if ( ! canStrongholdGoDeeper ( structureboundingbox ) || StructureComponent . findIntersecting ( par0List , structureboundingbox ) != null ) { structureboundingbox = StructureBoundingBox . getComponentToAddBoundingBox ( par2 , par3 , par4 , - <NUM_LIT:4> , - <NUM_LIT:1> , <NUM_LIT:0> , <NUM_LIT> , <NUM_LIT:6> , <NUM_LIT:15> , par5 ) ; if ( ! canStrongholdGoDeeper ( structureboundingbox ) || StructureComponent . findIntersecting ( par0List , structureboundingbox ) != null ) { return null ; } } return new ComponentStrongholdLibrary ( par6 , par1Random , structureboundingbox , par5 ) ; } public boolean addComponentParts ( World par1World , Random par2Random , StructureBoundingBox par3StructureBoundingBox ) { if ( isLiquidInStructureBoundingBox ( par1World , par3StructureBoundingBox ) ) { return false ; } byte byte0 = <NUM_LIT:11> ; if ( ! isLargeRoom ) { byte0 = <NUM_LIT:6> ; } fillWithRandomizedBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT> , byte0 - <NUM_LIT:1> , <NUM_LIT> , true , par2Random , StructureStrongholdPieces . getStrongholdStones ( ) ) ; placeDoor ( par1World , par2Random , par3StructureBoundingBox , doorType , <NUM_LIT:4> , <NUM_LIT:1> , <NUM_LIT:0> ) ; randomlyFillWithBlocks ( par1World , par3StructureBoundingBox , par2Random , <NUM_LIT> , <NUM_LIT:2> , <NUM_LIT:1> , <NUM_LIT:1> , <NUM_LIT:11> , <NUM_LIT:4> , <NUM_LIT> , Block . web . blockID , Block . web . blockID , false ) ; for ( int i = <NUM_LIT:1> ; i <= <NUM_LIT> ; i ++ ) { if ( ( i - <NUM_LIT:1> ) % <NUM_LIT:4> == <NUM_LIT:0> ) { fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:1> , <NUM_LIT:1> , i , <NUM_LIT:1> , <NUM_LIT:4> , i , Block . planks . blockID , Block . planks . blockID , false ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:12> , <NUM_LIT:1> , i , <NUM_LIT:12> , <NUM_LIT:4> , i , Block . planks . blockID , Block . planks . blockID , false ) ; placeBlockAtCurrentPosition ( par1World , Block . torchWood . blockID , <NUM_LIT:0> , <NUM_LIT:2> , <NUM_LIT:3> , i , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . torchWood . blockID , <NUM_LIT:0> , <NUM_LIT:11> , <NUM_LIT:3> , i , par3StructureBoundingBox ) ; if ( isLargeRoom ) { fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:1> , <NUM_LIT:6> , i , <NUM_LIT:1> , <NUM_LIT:9> , i , Block . planks . blockID , Block . planks . blockID , false ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:12> , <NUM_LIT:6> , i , <NUM_LIT:12> , <NUM_LIT:9> , i , Block . planks . blockID , Block . planks . blockID , false ) ; } continue ; } fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:1> , <NUM_LIT:1> , i , <NUM_LIT:1> , <NUM_LIT:4> , i , Block . bookShelf . blockID , Block . bookShelf . blockID , false ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:12> , <NUM_LIT:1> , i , <NUM_LIT:12> , <NUM_LIT:4> , i , Block . bookShelf . blockID , Block . bookShelf . blockID , false ) ; if ( isLargeRoom ) { fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:1> , <NUM_LIT:6> , i , <NUM_LIT:1> , <NUM_LIT:9> , i , Block . bookShelf . blockID , Block . bookShelf . blockID , false ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:12> , <NUM_LIT:6> , i , <NUM_LIT:12> , <NUM_LIT:9> , i , Block . bookShelf . blockID , Block . bookShelf . blockID , false ) ; } } for ( int j = <NUM_LIT:3> ; j < <NUM_LIT:12> ; j += <NUM_LIT:2> ) { fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:3> , <NUM_LIT:1> , j , <NUM_LIT:4> , <NUM_LIT:3> , j , Block . bookShelf . blockID , Block . bookShelf . blockID , false ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:6> , <NUM_LIT:1> , j , <NUM_LIT:7> , <NUM_LIT:3> , j , Block . bookShelf . blockID , Block . bookShelf . blockID , false ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:9> , <NUM_LIT:1> , j , <NUM_LIT:10> , <NUM_LIT:3> , j , Block . bookShelf . blockID , Block . bookShelf . blockID , false ) ; } if ( isLargeRoom ) { fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:1> , <NUM_LIT:5> , <NUM_LIT:1> , <NUM_LIT:3> , <NUM_LIT:5> , <NUM_LIT> , Block . planks . blockID , Block . planks . blockID , false ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:10> , <NUM_LIT:5> , <NUM_LIT:1> , <NUM_LIT:12> , <NUM_LIT:5> , <NUM_LIT> , Block . planks . blockID , Block . planks . blockID , false ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:4> , <NUM_LIT:5> , <NUM_LIT:1> , <NUM_LIT:9> , <NUM_LIT:5> , <NUM_LIT:2> , Block . planks . blockID , Block . planks . blockID , false ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:4> , <NUM_LIT:5> , <NUM_LIT:12> , <NUM_LIT:9> , <NUM_LIT:5> , <NUM_LIT> , Block . planks . blockID , Block . planks . blockID , false ) ; placeBlockAtCurrentPosition ( par1World , Block . planks . blockID , <NUM_LIT:0> , <NUM_LIT:9> , <NUM_LIT:5> , <NUM_LIT:11> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . planks . blockID , <NUM_LIT:0> , <NUM_LIT:8> , <NUM_LIT:5> , <NUM_LIT:11> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . planks . blockID , <NUM_LIT:0> , <NUM_LIT:9> , <NUM_LIT:5> , <NUM_LIT:10> , par3StructureBoundingBox ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:3> , <NUM_LIT:6> , <NUM_LIT:2> , <NUM_LIT:3> , <NUM_LIT:6> , <NUM_LIT:12> , Block . fence . blockID , Block . fence . blockID , false ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:10> , <NUM_LIT:6> , <NUM_LIT:2> , <NUM_LIT:10> , <NUM_LIT:6> , <NUM_LIT:10> , Block . fence . blockID , Block . fence . blockID , false ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:4> , <NUM_LIT:6> , <NUM_LIT:2> , <NUM_LIT:9> , <NUM_LIT:6> , <NUM_LIT:2> , Block . fence . blockID , Block . fence . blockID , false ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:4> , <NUM_LIT:6> , <NUM_LIT:12> , <NUM_LIT:8> , <NUM_LIT:6> , <NUM_LIT:12> , Block . fence . blockID , Block . fence . blockID , false ) ; placeBlockAtCurrentPosition ( par1World , Block . fence . blockID , <NUM_LIT:0> , <NUM_LIT:9> , <NUM_LIT:6> , <NUM_LIT:11> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . fence . blockID , <NUM_LIT:0> , <NUM_LIT:8> , <NUM_LIT:6> , <NUM_LIT:11> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . fence . blockID , <NUM_LIT:0> , <NUM_LIT:9> , <NUM_LIT:6> , <NUM_LIT:10> , par3StructureBoundingBox ) ; int k = getMetadataWithOffset ( Block . ladder . blockID , <NUM_LIT:3> ) ; placeBlockAtCurrentPosition ( par1World , Block . ladder . blockID , k , <NUM_LIT:10> , <NUM_LIT:1> , <NUM_LIT> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . ladder . blockID , k , <NUM_LIT:10> , <NUM_LIT:2> , <NUM_LIT> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . ladder . blockID , k , <NUM_LIT:10> , <NUM_LIT:3> , <NUM_LIT> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . ladder . blockID , k , <NUM_LIT:10> , <NUM_LIT:4> , <NUM_LIT> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . ladder . blockID , k , <NUM_LIT:10> , <NUM_LIT:5> , <NUM_LIT> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . ladder . blockID , k , <NUM_LIT:10> , <NUM_LIT:6> , <NUM_LIT> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . ladder . blockID , k , <NUM_LIT:10> , <NUM_LIT:7> , <NUM_LIT> , par3StructureBoundingBox ) ; byte byte1 = <NUM_LIT:7> ; byte byte2 = <NUM_LIT:7> ; placeBlockAtCurrentPosition ( par1World , Block . fence . blockID , <NUM_LIT:0> , byte1 - <NUM_LIT:1> , <NUM_LIT:9> , byte2 , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . fence . blockID , <NUM_LIT:0> , byte1 , <NUM_LIT:9> , byte2 , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . fence . blockID , <NUM_LIT:0> , byte1 - <NUM_LIT:1> , <NUM_LIT:8> , byte2 , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . fence . blockID , <NUM_LIT:0> , byte1 , <NUM_LIT:8> , byte2 , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . fence . blockID , <NUM_LIT:0> , byte1 - <NUM_LIT:1> , <NUM_LIT:7> , byte2 , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . fence . blockID , <NUM_LIT:0> , byte1 , <NUM_LIT:7> , byte2 , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . fence . blockID , <NUM_LIT:0> , byte1 - <NUM_LIT:2> , <NUM_LIT:7> , byte2 , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . fence . blockID , <NUM_LIT:0> , byte1 + <NUM_LIT:1> , <NUM_LIT:7> , byte2 , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . fence . blockID , <NUM_LIT:0> , byte1 - <NUM_LIT:1> , <NUM_LIT:7> , byte2 - <NUM_LIT:1> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . fence . blockID , <NUM_LIT:0> , byte1 - <NUM_LIT:1> , <NUM_LIT:7> , byte2 + <NUM_LIT:1> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . fence . blockID , <NUM_LIT:0> , byte1 , <NUM_LIT:7> , byte2 - <NUM_LIT:1> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . fence . blockID , <NUM_LIT:0> , byte1 , <NUM_LIT:7> , byte2 + <NUM_LIT:1> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . torchWood . blockID , <NUM_LIT:0> , byte1 - <NUM_LIT:2> , <NUM_LIT:8> , byte2 , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . torchWood . blockID , <NUM_LIT:0> , byte1 + <NUM_LIT:1> , <NUM_LIT:8> , byte2 , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . torchWood . blockID , <NUM_LIT:0> , byte1 - <NUM_LIT:1> , <NUM_LIT:8> , byte2 - <NUM_LIT:1> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . torchWood . blockID , <NUM_LIT:0> , byte1 - <NUM_LIT:1> , <NUM_LIT:8> , byte2 + <NUM_LIT:1> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . torchWood . blockID , <NUM_LIT:0> , byte1 , <NUM_LIT:8> , byte2 - <NUM_LIT:1> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . torchWood . blockID , <NUM_LIT:0> , byte1 , <NUM_LIT:8> , byte2 + <NUM_LIT:1> , par3StructureBoundingBox ) ; } createTreasureChestAtCurrentPosition ( par1World , par3StructureBoundingBox , par2Random , <NUM_LIT:3> , <NUM_LIT:3> , <NUM_LIT:5> , field_35335_b , <NUM_LIT:1> + par2Random . nextInt ( <NUM_LIT:4> ) ) ; if ( isLargeRoom ) { placeBlockAtCurrentPosition ( par1World , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:12> , <NUM_LIT:9> , <NUM_LIT:1> , par3StructureBoundingBox ) ; createTreasureChestAtCurrentPosition ( par1World , par3StructureBoundingBox , par2Random , <NUM_LIT:12> , <NUM_LIT:8> , <NUM_LIT:1> , field_35335_b , <NUM_LIT:1> + par2Random . nextInt ( <NUM_LIT:4> ) ) ; } return true ; } static { field_35335_b = ( new StructurePieceTreasure [ ] { new StructurePieceTreasure ( Item . book . shiftedIndex , <NUM_LIT:0> , <NUM_LIT:1> , <NUM_LIT:3> , <NUM_LIT:20> ) , new StructurePieceTreasure ( Item . paper . shiftedIndex , <NUM_LIT:0> , <NUM_LIT:2> , <NUM_LIT:7> , <NUM_LIT:20> ) , new StructurePieceTreasure ( Item . map . shiftedIndex , <NUM_LIT:0> , <NUM_LIT:1> , <NUM_LIT:1> , <NUM_LIT:1> ) , new StructurePieceTreasure ( Item . compass . shiftedIndex , <NUM_LIT:0> , <NUM_LIT:1> , <NUM_LIT:1> , <NUM_LIT:1> ) } ) ; } } </s>
<s> package net . minecraft . src ; public class Slot { private final int slotIndex ; public final IInventory inventory ; public int slotNumber ; public int xDisplayPosition ; public int yDisplayPosition ; public Slot ( IInventory par1IInventory , int par2 , int par3 , int par4 ) { inventory = par1IInventory ; slotIndex = par2 ; xDisplayPosition = par3 ; yDisplayPosition = par4 ; } public void func_48417_a ( ItemStack par1ItemStack , ItemStack par2ItemStack ) { if ( par1ItemStack == null || par2ItemStack == null ) { return ; } if ( par1ItemStack . itemID != par2ItemStack . itemID ) { return ; } int i = par2ItemStack . stackSize - par1ItemStack . stackSize ; if ( i > <NUM_LIT:0> ) { func_48415_a ( par1ItemStack , i ) ; } } protected void func_48415_a ( ItemStack itemstack , int i ) { } protected void func_48416_b ( ItemStack itemstack ) { } public void onPickupFromSlot ( ItemStack par1ItemStack ) { onSlotChanged ( ) ; } public boolean isItemValid ( ItemStack par1ItemStack ) { return true ; } public ItemStack getStack ( ) { return inventory . getStackInSlot ( slotIndex ) ; } public boolean getHasStack ( ) { return getStack ( ) != null ; } public void putStack ( ItemStack par1ItemStack ) { inventory . setInventorySlotContents ( slotIndex , par1ItemStack ) ; onSlotChanged ( ) ; } public void onSlotChanged ( ) { inventory . onInventoryChanged ( ) ; } public int getSlotStackLimit ( ) { return inventory . getInventoryStackLimit ( ) ; } public ItemStack decrStackSize ( int par1 ) { return inventory . decrStackSize ( slotIndex , par1 ) ; } public boolean isHere ( IInventory par1IInventory , int par2 ) { return par1IInventory == inventory && par2 == slotIndex ; } } </s>
<s> package net . minecraft . src ; public class ItemRedstone extends Item { public ItemRedstone ( int par1 ) { super ( par1 ) ; } public boolean onItemUse ( ItemStack par1ItemStack , EntityPlayer par2EntityPlayer , World par3World , int par4 , int par5 , int par6 , int par7 ) { if ( par3World . getBlockId ( par4 , par5 , par6 ) != Block . snow . blockID ) { if ( par7 == <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 ( ! par3World . isAirBlock ( par4 , par5 , par6 ) ) { return false ; } } if ( ! par2EntityPlayer . canPlayerEdit ( par4 , par5 , par6 ) ) { return false ; } if ( Block . redstoneWire . canPlaceBlockAt ( par3World , par4 , par5 , par6 ) ) { par1ItemStack . stackSize -- ; par3World . setBlockWithNotify ( par4 , par5 , par6 , Block . redstoneWire . blockID ) ; } return true ; } } </s>
<s> package net . minecraft . src ; import java . util . * ; public class StatList { protected static Map oneShotStats = new HashMap ( ) ; public static List allStats = new ArrayList ( ) ; public static List generalStats = new ArrayList ( ) ; public static List itemStats = new ArrayList ( ) ; public static List objectMineStats = new ArrayList ( ) ; public static StatBase startGameStat = ( new StatBasic ( <NUM_LIT:1000> , "<STR_LIT>" ) ) . initIndependentStat ( ) . registerStat ( ) ; public static StatBase createWorldStat = ( new StatBasic ( <NUM_LIT> , "<STR_LIT>" ) ) . initIndependentStat ( ) . registerStat ( ) ; public static StatBase loadWorldStat = ( new StatBasic ( <NUM_LIT> , "<STR_LIT>" ) ) . initIndependentStat ( ) . registerStat ( ) ; public static StatBase joinMultiplayerStat = ( new StatBasic ( <NUM_LIT> , "<STR_LIT>" ) ) . initIndependentStat ( ) . registerStat ( ) ; public static StatBase leaveGameStat = ( new StatBasic ( <NUM_LIT> , "<STR_LIT>" ) ) . initIndependentStat ( ) . registerStat ( ) ; public static StatBase minutesPlayedStat ; public static StatBase distanceWalkedStat ; public static StatBase distanceSwumStat ; public static StatBase distanceFallenStat ; public static StatBase distanceClimbedStat ; public static StatBase distanceFlownStat ; public static StatBase distanceDoveStat ; public static StatBase distanceByMinecartStat ; public static StatBase distanceByBoatStat ; public static StatBase distanceByPigStat ; public static StatBase jumpStat = ( new StatBasic ( <NUM_LIT> , "<STR_LIT>" ) ) . initIndependentStat ( ) . registerStat ( ) ; public static StatBase dropStat = ( new StatBasic ( <NUM_LIT> , "<STR_LIT>" ) ) . initIndependentStat ( ) . registerStat ( ) ; public static StatBase damageDealtStat = ( new StatBasic ( <NUM_LIT> , "<STR_LIT>" ) ) . registerStat ( ) ; public static StatBase damageTakenStat = ( new StatBasic ( <NUM_LIT> , "<STR_LIT>" ) ) . registerStat ( ) ; public static StatBase deathsStat = ( new StatBasic ( <NUM_LIT> , "<STR_LIT>" ) ) . registerStat ( ) ; public static StatBase mobKillsStat = ( new StatBasic ( <NUM_LIT> , "<STR_LIT>" ) ) . registerStat ( ) ; public static StatBase playerKillsStat = ( new StatBasic ( <NUM_LIT> , "<STR_LIT>" ) ) . registerStat ( ) ; public static StatBase fishCaughtStat = ( new StatBasic ( <NUM_LIT> , "<STR_LIT>" ) ) . registerStat ( ) ; public static StatBase mineBlockStatArray [ ] = initMinableStats ( "<STR_LIT>" , <NUM_LIT> ) ; public static StatBase objectCraftStats [ ] ; public static StatBase objectUseStats [ ] ; public static StatBase objectBreakStats [ ] ; private static boolean blockStatsInitialized = false ; private static boolean itemStatsInitialized = false ; public StatList ( ) { } public static void func_27092_a ( ) { } public static void initBreakableStats ( ) { objectUseStats = initUsableStats ( objectUseStats , "<STR_LIT>" , <NUM_LIT> , <NUM_LIT:0> , <NUM_LIT> ) ; objectBreakStats = initBreakStats ( objectBreakStats , "<STR_LIT>" , <NUM_LIT> , <NUM_LIT:0> , <NUM_LIT> ) ; blockStatsInitialized = true ; initCraftableStats ( ) ; } public static void initStats ( ) { objectUseStats = initUsableStats ( objectUseStats , "<STR_LIT>" , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> ) ; objectBreakStats = initBreakStats ( objectBreakStats , "<STR_LIT>" , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> ) ; itemStatsInitialized = true ; initCraftableStats ( ) ; } public static void initCraftableStats ( ) { if ( ! blockStatsInitialized || ! itemStatsInitialized ) { return ; } HashSet hashset = new HashSet ( ) ; IRecipe irecipe ; for ( Iterator iterator = CraftingManager . getInstance ( ) . getRecipeList ( ) . iterator ( ) ; iterator . hasNext ( ) ; hashset . add ( Integer . valueOf ( irecipe . getRecipeOutput ( ) . itemID ) ) ) { irecipe = ( IRecipe ) iterator . next ( ) ; } ItemStack itemstack ; for ( Iterator iterator1 = FurnaceRecipes . smelting ( ) . getSmeltingList ( ) . values ( ) . iterator ( ) ; iterator1 . hasNext ( ) ; hashset . add ( Integer . valueOf ( itemstack . itemID ) ) ) { itemstack = ( ItemStack ) iterator1 . next ( ) ; } objectCraftStats = new StatBase [ <NUM_LIT> ] ; Iterator iterator2 = hashset . iterator ( ) ; do { if ( ! iterator2 . hasNext ( ) ) { break ; } Integer integer = ( Integer ) iterator2 . next ( ) ; if ( Item . itemsList [ integer . intValue ( ) ] != null ) { String s = StatCollector . translateToLocalFormatted ( "<STR_LIT>" , new Object [ ] { Item . itemsList [ integer . intValue ( ) ] . getStatName ( ) } ) ; objectCraftStats [ integer . intValue ( ) ] = ( new StatCrafting ( <NUM_LIT> + integer . intValue ( ) , s , integer . intValue ( ) ) ) . registerStat ( ) ; } } while ( true ) ; replaceAllSimilarBlocks ( objectCraftStats ) ; } private static StatBase [ ] initMinableStats ( String par0Str , int par1 ) { StatBase astatbase [ ] = new StatBase [ <NUM_LIT> ] ; for ( int i = <NUM_LIT:0> ; i < <NUM_LIT> ; i ++ ) { if ( Block . blocksList [ i ] != null && Block . blocksList [ i ] . getEnableStats ( ) ) { String s = StatCollector . translateToLocalFormatted ( par0Str , new Object [ ] { Block . blocksList [ i ] . translateBlockName ( ) } ) ; astatbase [ i ] = ( new StatCrafting ( par1 + i , s , i ) ) . registerStat ( ) ; objectMineStats . add ( ( StatCrafting ) astatbase [ i ] ) ; } } replaceAllSimilarBlocks ( astatbase ) ; return astatbase ; } private static StatBase [ ] initUsableStats ( StatBase par0ArrayOfStatBase [ ] , String par1Str , int par2 , int par3 , int par4 ) { if ( par0ArrayOfStatBase == null ) { par0ArrayOfStatBase = new StatBase [ <NUM_LIT> ] ; } for ( int i = par3 ; i < par4 ; i ++ ) { if ( Item . itemsList [ i ] == null ) { continue ; } String s = StatCollector . translateToLocalFormatted ( par1Str , new Object [ ] { Item . itemsList [ i ] . getStatName ( ) } ) ; par0ArrayOfStatBase [ i ] = ( new StatCrafting ( par2 + i , s , i ) ) . registerStat ( ) ; if ( i >= <NUM_LIT> ) { itemStats . add ( ( StatCrafting ) par0ArrayOfStatBase [ i ] ) ; } } replaceAllSimilarBlocks ( par0ArrayOfStatBase ) ; return par0ArrayOfStatBase ; } private static StatBase [ ] initBreakStats ( StatBase par0ArrayOfStatBase [ ] , String par1Str , int par2 , int par3 , int par4 ) { if ( par0ArrayOfStatBase == null ) { par0ArrayOfStatBase = new StatBase [ <NUM_LIT> ] ; } for ( int i = par3 ; i < par4 ; i ++ ) { if ( Item . itemsList [ i ] != null && Item . itemsList [ i ] . isDamageable ( ) ) { String s = StatCollector . translateToLocalFormatted ( par1Str , new Object [ ] { Item . itemsList [ i ] . getStatName ( ) } ) ; par0ArrayOfStatBase [ i ] = ( new StatCrafting ( par2 + i , s , i ) ) . registerStat ( ) ; } } replaceAllSimilarBlocks ( par0ArrayOfStatBase ) ; return par0ArrayOfStatBase ; } private static void replaceAllSimilarBlocks ( StatBase par0ArrayOfStatBase [ ] ) { replaceSimilarBlocks ( par0ArrayOfStatBase , Block . waterStill . blockID , Block . waterMoving . blockID ) ; replaceSimilarBlocks ( par0ArrayOfStatBase , Block . lavaStill . blockID , Block . lavaStill . blockID ) ; replaceSimilarBlocks ( par0ArrayOfStatBase , Block . pumpkinLantern . blockID , Block . pumpkin . blockID ) ; replaceSimilarBlocks ( par0ArrayOfStatBase , Block . stoneOvenActive . blockID , Block . stoneOvenIdle . blockID ) ; replaceSimilarBlocks ( par0ArrayOfStatBase , Block . oreRedstoneGlowing . blockID , Block . oreRedstone . blockID ) ; replaceSimilarBlocks ( par0ArrayOfStatBase , Block . redstoneRepeaterActive . blockID , Block . redstoneRepeaterIdle . blockID ) ; replaceSimilarBlocks ( par0ArrayOfStatBase , Block . torchRedstoneActive . blockID , Block . torchRedstoneIdle . blockID ) ; replaceSimilarBlocks ( par0ArrayOfStatBase , Block . mushroomRed . blockID , Block . mushroomBrown . blockID ) ; replaceSimilarBlocks ( par0ArrayOfStatBase , Block . stairDouble . blockID , Block . stairSingle . blockID ) ; replaceSimilarBlocks ( par0ArrayOfStatBase , Block . grass . blockID , Block . dirt . blockID ) ; replaceSimilarBlocks ( par0ArrayOfStatBase , Block . tilledField . blockID , Block . dirt . blockID ) ; } private static void replaceSimilarBlocks ( StatBase par0ArrayOfStatBase [ ] , int par1 , int par2 ) { if ( par0ArrayOfStatBase [ par1 ] != null && par0ArrayOfStatBase [ par2 ] == null ) { par0ArrayOfStatBase [ par2 ] = par0ArrayOfStatBase [ par1 ] ; return ; } else { allStats . remove ( par0ArrayOfStatBase [ par1 ] ) ; objectMineStats . remove ( par0ArrayOfStatBase [ par1 ] ) ; generalStats . remove ( par0ArrayOfStatBase [ par1 ] ) ; par0ArrayOfStatBase [ par1 ] = par0ArrayOfStatBase [ par2 ] ; return ; } } static { minutesPlayedStat = ( new StatBasic ( <NUM_LIT> , "<STR_LIT>" , StatBase . timeStatType ) ) . initIndependentStat ( ) . registerStat ( ) ; distanceWalkedStat = ( new StatBasic ( <NUM_LIT> , "<STR_LIT>" , StatBase . distanceStatType ) ) . initIndependentStat ( ) . registerStat ( ) ; distanceSwumStat = ( new StatBasic ( <NUM_LIT> , "<STR_LIT>" , StatBase . distanceStatType ) ) . initIndependentStat ( ) . registerStat ( ) ; distanceFallenStat = ( new StatBasic ( <NUM_LIT> , "<STR_LIT>" , StatBase . distanceStatType ) ) . initIndependentStat ( ) . registerStat ( ) ; distanceClimbedStat = ( new StatBasic ( <NUM_LIT> , "<STR_LIT>" , StatBase . distanceStatType ) ) . initIndependentStat ( ) . registerStat ( ) ; distanceFlownStat = ( new StatBasic ( <NUM_LIT> , "<STR_LIT>" , StatBase . distanceStatType ) ) . initIndependentStat ( ) . registerStat ( ) ; distanceDoveStat = ( new StatBasic ( <NUM_LIT> , "<STR_LIT>" , StatBase . distanceStatType ) ) . initIndependentStat ( ) . registerStat ( ) ; distanceByMinecartStat = ( new StatBasic ( <NUM_LIT> , "<STR_LIT>" , StatBase . distanceStatType ) ) . initIndependentStat ( ) . registerStat ( ) ; distanceByBoatStat = ( new StatBasic ( <NUM_LIT> , "<STR_LIT>" , StatBase . distanceStatType ) ) . initIndependentStat ( ) . registerStat ( ) ; distanceByPigStat = ( new StatBasic ( <NUM_LIT> , "<STR_LIT>" , StatBase . distanceStatType ) ) . initIndependentStat ( ) . registerStat ( ) ; AchievementList . init ( ) ; } } </s>
<s> package net . minecraft . src ; import java . io . * ; public class Packet39AttachEntity extends Packet { public int entityId ; public int vehicleEntityId ; public Packet39AttachEntity ( ) { } public Packet39AttachEntity ( Entity par1Entity , Entity par2Entity ) { entityId = par1Entity . entityId ; vehicleEntityId = par2Entity == null ? - <NUM_LIT:1> : par2Entity . entityId ; } public int getPacketSize ( ) { return <NUM_LIT:8> ; } public void readPacketData ( DataInputStream par1DataInputStream ) throws IOException { entityId = par1DataInputStream . readInt ( ) ; vehicleEntityId = par1DataInputStream . readInt ( ) ; } public void writePacketData ( DataOutputStream par1DataOutputStream ) throws IOException { par1DataOutputStream . writeInt ( entityId ) ; par1DataOutputStream . writeInt ( vehicleEntityId ) ; } public void processPacket ( NetHandler par1NetHandler ) { par1NetHandler . handleAttachEntity ( this ) ; } } </s>
<s> package net . minecraft . src ; import java . util . Random ; public class BlockMycelium extends Block { protected BlockMycelium ( int par1 ) { super ( par1 , Material . grass ) ; blockIndexInTexture = <NUM_LIT> ; setTickRandomly ( true ) ; } public int getBlockTextureFromSideAndMetadata ( int par1 , int par2 ) { if ( par1 == <NUM_LIT:1> ) { return <NUM_LIT> ; } return par1 != <NUM_LIT:0> ? <NUM_LIT> : <NUM_LIT:2> ; } public void updateTick ( World par1World , int par2 , int par3 , int par4 , Random par5Random ) { if ( par1World . isRemote ) { return ; } if ( par1World . getBlockLightValue ( par2 , par3 + <NUM_LIT:1> , par4 ) < <NUM_LIT:4> && Block . lightOpacity [ par1World . getBlockId ( par2 , par3 + <NUM_LIT:1> , par4 ) ] > <NUM_LIT:2> ) { par1World . setBlockWithNotify ( par2 , par3 , par4 , Block . dirt . blockID ) ; } else if ( par1World . getBlockLightValue ( par2 , par3 + <NUM_LIT:1> , par4 ) >= <NUM_LIT:9> ) { for ( int i = <NUM_LIT:0> ; i < <NUM_LIT:4> ; i ++ ) { int j = ( par2 + par5Random . nextInt ( <NUM_LIT:3> ) ) - <NUM_LIT:1> ; int k = ( par3 + par5Random . nextInt ( <NUM_LIT:5> ) ) - <NUM_LIT:3> ; int l = ( par4 + par5Random . nextInt ( <NUM_LIT:3> ) ) - <NUM_LIT:1> ; int i1 = par1World . getBlockId ( j , k + <NUM_LIT:1> , l ) ; if ( par1World . getBlockId ( j , k , l ) == Block . dirt . blockID && par1World . getBlockLightValue ( j , k + <NUM_LIT:1> , l ) >= <NUM_LIT:4> && Block . lightOpacity [ i1 ] <= <NUM_LIT:2> ) { par1World . setBlockWithNotify ( j , k , l , blockID ) ; } } } } public int idDropped ( int par1 , Random par2Random , int par3 ) { return Block . dirt . idDropped ( <NUM_LIT:0> , par2Random , par3 ) ; } } </s>
<s> package net . minecraft . src ; import java . util . ArrayList ; import java . util . Random ; public class BlockPane extends Block { private int sideTextureIndex ; private final boolean canDropItself ; protected BlockPane ( int par1 , int par2 , int par3 , Material par4Material , boolean par5 ) { super ( par1 , par2 , par4Material ) ; sideTextureIndex = par3 ; canDropItself = par5 ; } public int idDropped ( int par1 , Random par2Random , int par3 ) { if ( ! canDropItself ) { return <NUM_LIT:0> ; } else { return super . idDropped ( par1 , par2Random , par3 ) ; } } public boolean isOpaqueCube ( ) { return false ; } public boolean renderAsNormalBlock ( ) { return false ; } public int getRenderType ( ) { return <NUM_LIT> ; } public void getCollidingBoundingBoxes ( World par1World , int par2 , int par3 , int par4 , AxisAlignedBB par5AxisAlignedBB , ArrayList par6ArrayList ) { boolean flag = canThisPaneConnectToThisBlockID ( par1World . getBlockId ( par2 , par3 , par4 - <NUM_LIT:1> ) ) ; boolean flag1 = canThisPaneConnectToThisBlockID ( par1World . getBlockId ( par2 , par3 , par4 + <NUM_LIT:1> ) ) ; boolean flag2 = canThisPaneConnectToThisBlockID ( par1World . getBlockId ( par2 - <NUM_LIT:1> , par3 , par4 ) ) ; boolean flag3 = canThisPaneConnectToThisBlockID ( par1World . getBlockId ( par2 + <NUM_LIT:1> , par3 , par4 ) ) ; if ( flag2 && flag3 || ! flag2 && ! flag3 && ! flag && ! flag1 ) { setBlockBounds ( <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> ) ; super . getCollidingBoundingBoxes ( par1World , par2 , par3 , par4 , par5AxisAlignedBB , par6ArrayList ) ; } else if ( flag2 && ! flag3 ) { setBlockBounds ( <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> ) ; super . getCollidingBoundingBoxes ( par1World , par2 , par3 , par4 , par5AxisAlignedBB , par6ArrayList ) ; } else if ( ! flag2 && flag3 ) { setBlockBounds ( <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> ) ; super . getCollidingBoundingBoxes ( par1World , par2 , par3 , par4 , par5AxisAlignedBB , par6ArrayList ) ; } if ( flag && flag1 || ! flag2 && ! flag3 && ! flag && ! flag1 ) { setBlockBounds ( <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> ) ; super . getCollidingBoundingBoxes ( par1World , par2 , par3 , par4 , par5AxisAlignedBB , par6ArrayList ) ; } else if ( flag && ! flag1 ) { setBlockBounds ( <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> ) ; super . getCollidingBoundingBoxes ( par1World , par2 , par3 , par4 , par5AxisAlignedBB , par6ArrayList ) ; } else if ( ! flag && flag1 ) { setBlockBounds ( <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> ) ; super . getCollidingBoundingBoxes ( par1World , par2 , par3 , par4 , par5AxisAlignedBB , par6ArrayList ) ; } } public void setBlockBoundsForItemRender ( ) { setBlockBounds ( <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> ) ; } public void setBlockBoundsBasedOnState ( IBlockAccess par1IBlockAccess , int par2 , int par3 , int par4 ) { float f = <NUM_LIT> ; float f1 = <NUM_LIT> ; float f2 = <NUM_LIT> ; float f3 = <NUM_LIT> ; boolean flag = canThisPaneConnectToThisBlockID ( par1IBlockAccess . getBlockId ( par2 , par3 , par4 - <NUM_LIT:1> ) ) ; boolean flag1 = canThisPaneConnectToThisBlockID ( par1IBlockAccess . getBlockId ( par2 , par3 , par4 + <NUM_LIT:1> ) ) ; boolean flag2 = canThisPaneConnectToThisBlockID ( par1IBlockAccess . getBlockId ( par2 - <NUM_LIT:1> , par3 , par4 ) ) ; boolean flag3 = canThisPaneConnectToThisBlockID ( par1IBlockAccess . getBlockId ( par2 + <NUM_LIT:1> , par3 , par4 ) ) ; if ( flag2 && flag3 || ! flag2 && ! flag3 && ! flag && ! flag1 ) { f = <NUM_LIT> ; f1 = <NUM_LIT> ; } else if ( flag2 && ! flag3 ) { f = <NUM_LIT> ; } else if ( ! flag2 && flag3 ) { f1 = <NUM_LIT> ; } if ( flag && flag1 || ! flag2 && ! flag3 && ! flag && ! flag1 ) { f2 = <NUM_LIT> ; f3 = <NUM_LIT> ; } else if ( flag && ! flag1 ) { f2 = <NUM_LIT> ; } else if ( ! flag && flag1 ) { f3 = <NUM_LIT> ; } setBlockBounds ( f , <NUM_LIT> , f2 , f1 , <NUM_LIT> , f3 ) ; } public final boolean canThisPaneConnectToThisBlockID ( int par1 ) { return Block . opaqueCubeLookup [ par1 ] || par1 == blockID || par1 == Block . glass . blockID ; } } </s>
<s> package net . minecraft . src ; import java . util . List ; import java . util . Random ; public class EntityGhast extends EntityFlying implements IMob { public int courseChangeCooldown ; public double waypointX ; public double waypointY ; public double waypointZ ; private Entity targetedEntity ; private int aggroCooldown ; public int prevAttackCounter ; public int attackCounter ; public EntityGhast ( World par1World ) { super ( par1World ) ; courseChangeCooldown = <NUM_LIT:0> ; targetedEntity = null ; aggroCooldown = <NUM_LIT:0> ; prevAttackCounter = <NUM_LIT:0> ; attackCounter = <NUM_LIT:0> ; texture = "<STR_LIT>" ; setSize ( <NUM_LIT> , <NUM_LIT> ) ; isImmuneToFire = true ; experienceValue = <NUM_LIT:5> ; } public boolean attackEntityFrom ( DamageSource par1DamageSource , int par2 ) { if ( "<STR_LIT>" . equals ( par1DamageSource . getDamageType ( ) ) && ( par1DamageSource . getEntity ( ) instanceof EntityPlayer ) ) { super . attackEntityFrom ( par1DamageSource , <NUM_LIT:1000> ) ; ( ( EntityPlayer ) par1DamageSource . getEntity ( ) ) . triggerAchievement ( AchievementList . ghast ) ; return true ; } else { return super . attackEntityFrom ( par1DamageSource , par2 ) ; } } protected void entityInit ( ) { super . entityInit ( ) ; dataWatcher . addObject ( <NUM_LIT:16> , Byte . valueOf ( ( byte ) <NUM_LIT:0> ) ) ; } public int getMaxHealth ( ) { return <NUM_LIT:10> ; } public void onUpdate ( ) { super . onUpdate ( ) ; byte byte0 = dataWatcher . getWatchableObjectByte ( <NUM_LIT:16> ) ; texture = byte0 != <NUM_LIT:1> ? "<STR_LIT>" : "<STR_LIT>" ; } protected void updateEntityActionState ( ) { if ( ! worldObj . isRemote && worldObj . difficultySetting == <NUM_LIT:0> ) { setDead ( ) ; } despawnEntity ( ) ; prevAttackCounter = attackCounter ; double d = waypointX - posX ; double d1 = waypointY - posY ; double d2 = waypointZ - posZ ; double d3 = MathHelper . sqrt_double ( d * d + d1 * d1 + d2 * d2 ) ; if ( d3 < <NUM_LIT> || d3 > <NUM_LIT> ) { waypointX = posX + ( double ) ( ( rand . nextFloat ( ) * <NUM_LIT> - <NUM_LIT> ) * <NUM_LIT> ) ; waypointY = posY + ( double ) ( ( rand . nextFloat ( ) * <NUM_LIT> - <NUM_LIT> ) * <NUM_LIT> ) ; waypointZ = posZ + ( double ) ( ( rand . nextFloat ( ) * <NUM_LIT> - <NUM_LIT> ) * <NUM_LIT> ) ; } if ( courseChangeCooldown -- <= <NUM_LIT:0> ) { courseChangeCooldown += rand . nextInt ( <NUM_LIT:5> ) + <NUM_LIT:2> ; if ( isCourseTraversable ( waypointX , waypointY , waypointZ , d3 ) ) { motionX += ( d / d3 ) * <NUM_LIT> ; motionY += ( d1 / d3 ) * <NUM_LIT> ; motionZ += ( d2 / d3 ) * <NUM_LIT> ; } else { waypointX = posX ; waypointY = posY ; waypointZ = posZ ; } } if ( targetedEntity != null && targetedEntity . isDead ) { targetedEntity = null ; } if ( targetedEntity == null || aggroCooldown -- <= <NUM_LIT:0> ) { targetedEntity = worldObj . getClosestVulnerablePlayerToEntity ( this , <NUM_LIT> ) ; if ( targetedEntity != null ) { aggroCooldown = <NUM_LIT:20> ; } } double d4 = <NUM_LIT> ; if ( targetedEntity != null && targetedEntity . getDistanceSqToEntity ( this ) < d4 * d4 ) { double d5 = targetedEntity . posX - posX ; double d6 = ( targetedEntity . boundingBox . minY + ( double ) ( targetedEntity . height / <NUM_LIT> ) ) - ( posY + ( double ) ( height / <NUM_LIT> ) ) ; double d7 = targetedEntity . posZ - posZ ; renderYawOffset = rotationYaw = ( - ( float ) Math . atan2 ( d5 , d7 ) * <NUM_LIT> ) / ( float ) Math . PI ; if ( canEntityBeSeen ( targetedEntity ) ) { if ( attackCounter == <NUM_LIT:10> ) { worldObj . playAuxSFXAtEntity ( null , <NUM_LIT> , ( int ) posX , ( int ) posY , ( int ) posZ , <NUM_LIT:0> ) ; } attackCounter ++ ; if ( attackCounter == <NUM_LIT:20> ) { worldObj . playAuxSFXAtEntity ( null , <NUM_LIT> , ( int ) posX , ( int ) posY , ( int ) posZ , <NUM_LIT:0> ) ; EntityFireball entityfireball = new EntityFireball ( worldObj , this , d5 , d6 , d7 ) ; double d8 = <NUM_LIT> ; Vec3D vec3d = getLook ( <NUM_LIT> ) ; entityfireball . posX = posX + vec3d . xCoord * d8 ; entityfireball . posY = posY + ( double ) ( height / <NUM_LIT> ) + <NUM_LIT> ; entityfireball . posZ = posZ + vec3d . zCoord * d8 ; worldObj . spawnEntityInWorld ( entityfireball ) ; attackCounter = - <NUM_LIT> ; } } else if ( attackCounter > <NUM_LIT:0> ) { attackCounter -- ; } } else { renderYawOffset = rotationYaw = ( - ( float ) Math . atan2 ( motionX , motionZ ) * <NUM_LIT> ) / ( float ) Math . PI ; if ( attackCounter > <NUM_LIT:0> ) { attackCounter -- ; } } if ( ! worldObj . isRemote ) { byte byte0 = dataWatcher . getWatchableObjectByte ( <NUM_LIT:16> ) ; byte byte1 = ( byte ) ( attackCounter <= <NUM_LIT:10> ? <NUM_LIT:0> : <NUM_LIT:1> ) ; if ( byte0 != byte1 ) { dataWatcher . updateObject ( <NUM_LIT:16> , Byte . valueOf ( byte1 ) ) ; } } } private boolean isCourseTraversable ( double par1 , double par3 , double par5 , double par7 ) { double d = ( waypointX - posX ) / par7 ; double d1 = ( waypointY - posY ) / par7 ; double d2 = ( waypointZ - posZ ) / par7 ; AxisAlignedBB axisalignedbb = boundingBox . copy ( ) ; for ( int i = <NUM_LIT:1> ; ( double ) i < par7 ; i ++ ) { axisalignedbb . offset ( d , d1 , d2 ) ; if ( worldObj . getCollidingBoundingBoxes ( this , axisalignedbb ) . size ( ) > <NUM_LIT:0> ) { return false ; } } return true ; } protected String getLivingSound ( ) { return "<STR_LIT>" ; } protected String getHurtSound ( ) { return "<STR_LIT>" ; } protected String getDeathSound ( ) { return "<STR_LIT>" ; } protected int getDropItemId ( ) { return Item . gunpowder . shiftedIndex ; } protected void dropFewItems ( boolean par1 , int par2 ) { int i = rand . nextInt ( <NUM_LIT:2> ) + rand . nextInt ( <NUM_LIT:1> + par2 ) ; for ( int j = <NUM_LIT:0> ; j < i ; j ++ ) { dropItem ( Item . ghastTear . shiftedIndex , <NUM_LIT:1> ) ; } i = rand . nextInt ( <NUM_LIT:3> ) + rand . nextInt ( <NUM_LIT:1> + par2 ) ; for ( int k = <NUM_LIT:0> ; k < i ; k ++ ) { dropItem ( Item . gunpowder . shiftedIndex , <NUM_LIT:1> ) ; } } protected float getSoundVolume ( ) { return <NUM_LIT> ; } public boolean getCanSpawnHere ( ) { return rand . nextInt ( <NUM_LIT:20> ) == <NUM_LIT:0> && super . getCanSpawnHere ( ) && worldObj . difficultySetting > <NUM_LIT:0> ; } public int getMaxSpawnedInChunk ( ) { return <NUM_LIT:1> ; } } </s>
<s> package net . minecraft . src ; import java . util . Random ; public class BlockRedstoneLight extends Block { private final boolean powered ; public BlockRedstoneLight ( int par1 , boolean par2 ) { super ( par1 , <NUM_LIT> , Material . redstoneLight ) ; powered = par2 ; if ( par2 ) { setLightValue ( <NUM_LIT> ) ; blockIndexInTexture ++ ; } } public void onBlockAdded ( World par1World , int par2 , int par3 , int par4 ) { if ( ! par1World . isRemote ) { if ( powered && ! par1World . isBlockIndirectlyGettingPowered ( par2 , par3 , par4 ) ) { par1World . scheduleBlockUpdate ( par2 , par3 , par4 , blockID , <NUM_LIT:4> ) ; } else if ( ! powered && par1World . isBlockIndirectlyGettingPowered ( par2 , par3 , par4 ) ) { par1World . setBlockWithNotify ( par2 , par3 , par4 , Block . redstoneLampActive . blockID ) ; } } } public void onNeighborBlockChange ( World par1World , int par2 , int par3 , int par4 , int par5 ) { if ( ! par1World . isRemote ) { if ( powered && ! par1World . isBlockIndirectlyGettingPowered ( par2 , par3 , par4 ) ) { par1World . scheduleBlockUpdate ( par2 , par3 , par4 , blockID , <NUM_LIT:4> ) ; } else if ( ! powered && par1World . isBlockIndirectlyGettingPowered ( par2 , par3 , par4 ) ) { par1World . setBlockWithNotify ( par2 , par3 , par4 , Block . redstoneLampActive . blockID ) ; } } } public void updateTick ( World par1World , int par2 , int par3 , int par4 , Random par5Random ) { if ( ! par1World . isRemote && powered && ! par1World . isBlockIndirectlyGettingPowered ( par2 , par3 , par4 ) ) { par1World . setBlockWithNotify ( par2 , par3 , par4 , Block . redstoneLampIdle . blockID ) ; } } public int idDropped ( int par1 , Random par2Random , int par3 ) { return Block . redstoneLampIdle . blockID ; } } </s>
<s> package net . minecraft . src ; import java . util . Random ; public class WorldGenBigMushroom extends WorldGenerator { private int mushroomType ; public WorldGenBigMushroom ( int par1 ) { super ( true ) ; mushroomType = - <NUM_LIT:1> ; mushroomType = par1 ; } public WorldGenBigMushroom ( ) { super ( false ) ; mushroomType = - <NUM_LIT:1> ; } public boolean generate ( World par1World , Random par2Random , int par3 , int par4 , int par5 ) { int i = par2Random . nextInt ( <NUM_LIT:2> ) ; if ( mushroomType >= <NUM_LIT:0> ) { i = mushroomType ; } int j = par2Random . nextInt ( <NUM_LIT:3> ) + <NUM_LIT:4> ; boolean flag = true ; if ( par4 < <NUM_LIT:1> || par4 + j + <NUM_LIT:1> >= <NUM_LIT> ) { return false ; } for ( int k = par4 ; k <= par4 + <NUM_LIT:1> + j ; k ++ ) { byte byte0 = <NUM_LIT:3> ; if ( k == par4 ) { byte0 = <NUM_LIT:0> ; } for ( int j1 = par3 - byte0 ; j1 <= par3 + byte0 && flag ; j1 ++ ) { for ( int i2 = par5 - byte0 ; i2 <= par5 + byte0 && flag ; i2 ++ ) { if ( k >= <NUM_LIT:0> && k < <NUM_LIT> ) { int l2 = par1World . getBlockId ( j1 , k , i2 ) ; if ( l2 != <NUM_LIT:0> && l2 != Block . leaves . blockID ) { flag = false ; } } else { flag = false ; } } } } if ( ! flag ) { return false ; } int l = par1World . getBlockId ( par3 , par4 - <NUM_LIT:1> , par5 ) ; if ( l != Block . dirt . blockID && l != Block . grass . blockID && l != Block . mycelium . blockID ) { return false ; } if ( ! Block . mushroomBrown . canPlaceBlockAt ( par1World , par3 , par4 , par5 ) ) { return false ; } setBlockAndMetadata ( par1World , par3 , par4 - <NUM_LIT:1> , par5 , Block . dirt . blockID , <NUM_LIT:0> ) ; int i1 = par4 + j ; if ( i == <NUM_LIT:1> ) { i1 = ( par4 + j ) - <NUM_LIT:3> ; } for ( int k1 = i1 ; k1 <= par4 + j ; k1 ++ ) { int j2 = <NUM_LIT:1> ; if ( k1 < par4 + j ) { j2 ++ ; } if ( i == <NUM_LIT:0> ) { j2 = <NUM_LIT:3> ; } for ( int i3 = par3 - j2 ; i3 <= par3 + j2 ; i3 ++ ) { for ( int j3 = par5 - j2 ; j3 <= par5 + j2 ; j3 ++ ) { int k3 = <NUM_LIT:5> ; if ( i3 == par3 - j2 ) { k3 -- ; } if ( i3 == par3 + j2 ) { k3 ++ ; } if ( j3 == par5 - j2 ) { k3 -= <NUM_LIT:3> ; } if ( j3 == par5 + j2 ) { k3 += <NUM_LIT:3> ; } if ( i == <NUM_LIT:0> || k1 < par4 + j ) { if ( ( i3 == par3 - j2 || i3 == par3 + j2 ) && ( j3 == par5 - j2 || j3 == par5 + j2 ) ) { continue ; } if ( i3 == par3 - ( j2 - <NUM_LIT:1> ) && j3 == par5 - j2 ) { k3 = <NUM_LIT:1> ; } if ( i3 == par3 - j2 && j3 == par5 - ( j2 - <NUM_LIT:1> ) ) { k3 = <NUM_LIT:1> ; } if ( i3 == par3 + ( j2 - <NUM_LIT:1> ) && j3 == par5 - j2 ) { k3 = <NUM_LIT:3> ; } if ( i3 == par3 + j2 && j3 == par5 - ( j2 - <NUM_LIT:1> ) ) { k3 = <NUM_LIT:3> ; } if ( i3 == par3 - ( j2 - <NUM_LIT:1> ) && j3 == par5 + j2 ) { k3 = <NUM_LIT:7> ; } if ( i3 == par3 - j2 && j3 == par5 + ( j2 - <NUM_LIT:1> ) ) { k3 = <NUM_LIT:7> ; } if ( i3 == par3 + ( j2 - <NUM_LIT:1> ) && j3 == par5 + j2 ) { k3 = <NUM_LIT:9> ; } if ( i3 == par3 + j2 && j3 == par5 + ( j2 - <NUM_LIT:1> ) ) { k3 = <NUM_LIT:9> ; } } if ( k3 == <NUM_LIT:5> && k1 < par4 + j ) { k3 = <NUM_LIT:0> ; } if ( ( k3 != <NUM_LIT:0> || par4 >= ( par4 + j ) - <NUM_LIT:1> ) && ! Block . opaqueCubeLookup [ par1World . getBlockId ( i3 , k1 , j3 ) ] ) { setBlockAndMetadata ( par1World , i3 , k1 , j3 , Block . mushroomCapBrown . blockID + i , k3 ) ; } } } } for ( int l1 = <NUM_LIT:0> ; l1 < j ; l1 ++ ) { int k2 = par1World . getBlockId ( par3 , par4 + l1 , par5 ) ; if ( ! Block . opaqueCubeLookup [ k2 ] ) { setBlockAndMetadata ( par1World , par3 , par4 + l1 , par5 , Block . mushroomCapBrown . blockID + i , <NUM_LIT:10> ) ; } } return true ; } } </s>
<s> package net . minecraft . src ; import java . net . DatagramPacket ; import java . util . Date ; import java . util . Random ; class RConThreadQueryAuth { private long timestamp ; private int randomChallenge ; private byte requestID [ ] ; private byte challengeValue [ ] ; private String requestIDstring ; final RConThreadQuery queryThread ; public RConThreadQueryAuth ( RConThreadQuery par1RConThreadQuery , DatagramPacket par2DatagramPacket ) { queryThread = par1RConThreadQuery ; timestamp = ( new Date ( ) ) . getTime ( ) ; byte abyte0 [ ] = par2DatagramPacket . getData ( ) ; requestID = new byte [ <NUM_LIT:4> ] ; requestID [ <NUM_LIT:0> ] = abyte0 [ <NUM_LIT:3> ] ; requestID [ <NUM_LIT:1> ] = abyte0 [ <NUM_LIT:4> ] ; requestID [ <NUM_LIT:2> ] = abyte0 [ <NUM_LIT:5> ] ; requestID [ <NUM_LIT:3> ] = abyte0 [ <NUM_LIT:6> ] ; requestIDstring = new String ( requestID ) ; randomChallenge = ( new Random ( ) ) . nextInt ( <NUM_LIT> ) ; challengeValue = String . format ( "<STR_LIT>" , new Object [ ] { requestIDstring , Integer . valueOf ( randomChallenge ) } ) . getBytes ( ) ; } public Boolean hasExpired ( long par1 ) { return Boolean . valueOf ( timestamp < par1 ) ; } public int getRandomChallenge ( ) { return randomChallenge ; } public byte [ ] getChallengeValue ( ) { return challengeValue ; } public byte [ ] getRequestID ( ) { return requestID ; } } </s>
<s> package net . minecraft . src ; import java . io . * ; public class Packet54PlayNoteBlock extends Packet { public int xLocation ; public int yLocation ; public int zLocation ; public int instrumentType ; public int pitch ; public Packet54PlayNoteBlock ( ) { } public Packet54PlayNoteBlock ( int par1 , int par2 , int par3 , int par4 , int par5 ) { xLocation = par1 ; yLocation = par2 ; zLocation = par3 ; instrumentType = par4 ; pitch = par5 ; } public void readPacketData ( DataInputStream par1DataInputStream ) throws IOException { xLocation = par1DataInputStream . readInt ( ) ; yLocation = par1DataInputStream . readShort ( ) ; zLocation = par1DataInputStream . readInt ( ) ; instrumentType = par1DataInputStream . read ( ) ; pitch = par1DataInputStream . read ( ) ; } public void writePacketData ( DataOutputStream par1DataOutputStream ) throws IOException { par1DataOutputStream . writeInt ( xLocation ) ; par1DataOutputStream . writeShort ( yLocation ) ; par1DataOutputStream . writeInt ( zLocation ) ; par1DataOutputStream . write ( instrumentType ) ; par1DataOutputStream . write ( pitch ) ; } public void processPacket ( NetHandler par1NetHandler ) { par1NetHandler . handlePlayNoteBlock ( this ) ; } public int getPacketSize ( ) { return <NUM_LIT:12> ; } } </s>
<s> package net . minecraft . src ; import java . io . * ; import java . util . List ; public class Packet24MobSpawn extends Packet { public int entityId ; public int type ; public int xPosition ; public int yPosition ; public int zPosition ; public byte yaw ; public byte pitch ; public byte field_48113_h ; private DataWatcher metaData ; private List receivedMetadata ; public Packet24MobSpawn ( ) { } public Packet24MobSpawn ( EntityLiving par1EntityLiving ) { entityId = par1EntityLiving . entityId ; type = ( byte ) EntityList . getEntityID ( par1EntityLiving ) ; xPosition = MathHelper . floor_double ( par1EntityLiving . posX * <NUM_LIT> ) ; yPosition = MathHelper . floor_double ( par1EntityLiving . posY * <NUM_LIT> ) ; zPosition = MathHelper . floor_double ( par1EntityLiving . posZ * <NUM_LIT> ) ; yaw = ( byte ) ( int ) ( ( par1EntityLiving . rotationYaw * <NUM_LIT> ) / <NUM_LIT> ) ; pitch = ( byte ) ( int ) ( ( par1EntityLiving . rotationPitch * <NUM_LIT> ) / <NUM_LIT> ) ; field_48113_h = ( byte ) ( int ) ( ( par1EntityLiving . rotationYawHead * <NUM_LIT> ) / <NUM_LIT> ) ; metaData = par1EntityLiving . getDataWatcher ( ) ; } public void readPacketData ( DataInputStream par1DataInputStream ) throws IOException { entityId = par1DataInputStream . readInt ( ) ; type = par1DataInputStream . readByte ( ) & <NUM_LIT> ; xPosition = par1DataInputStream . readInt ( ) ; yPosition = par1DataInputStream . readInt ( ) ; zPosition = par1DataInputStream . readInt ( ) ; yaw = par1DataInputStream . readByte ( ) ; pitch = par1DataInputStream . readByte ( ) ; field_48113_h = par1DataInputStream . readByte ( ) ; receivedMetadata = DataWatcher . readWatchableObjects ( par1DataInputStream ) ; } public void writePacketData ( DataOutputStream par1DataOutputStream ) throws IOException { par1DataOutputStream . writeInt ( entityId ) ; par1DataOutputStream . writeByte ( type & <NUM_LIT> ) ; par1DataOutputStream . writeInt ( xPosition ) ; par1DataOutputStream . writeInt ( yPosition ) ; par1DataOutputStream . writeInt ( zPosition ) ; par1DataOutputStream . writeByte ( yaw ) ; par1DataOutputStream . writeByte ( pitch ) ; par1DataOutputStream . writeByte ( field_48113_h ) ; metaData . writeWatchableObjects ( par1DataOutputStream ) ; } public void processPacket ( NetHandler par1NetHandler ) { par1NetHandler . handleMobSpawn ( this ) ; } public int getPacketSize ( ) { return <NUM_LIT:20> ; } } </s>
<s> package net . minecraft . src ; public class BlockTrapDoor extends Block { protected BlockTrapDoor ( int par1 , Material par2Material ) { super ( par1 , par2Material ) ; blockIndexInTexture = <NUM_LIT> ; if ( par2Material == Material . iron ) { blockIndexInTexture ++ ; } float f = <NUM_LIT> ; float f1 = <NUM_LIT> ; setBlockBounds ( <NUM_LIT> - f , <NUM_LIT> , <NUM_LIT> - f , <NUM_LIT> + f , f1 , <NUM_LIT> + f ) ; } public boolean isOpaqueCube ( ) { return false ; } public boolean renderAsNormalBlock ( ) { return false ; } public boolean getBlocksMovement ( IBlockAccess par1IBlockAccess , int par2 , int par3 , int par4 ) { return ! isTrapdoorOpen ( par1IBlockAccess . getBlockMetadata ( par2 , par3 , par4 ) ) ; } public int getRenderType ( ) { return <NUM_LIT:0> ; } public AxisAlignedBB getCollisionBoundingBoxFromPool ( World par1World , int par2 , int par3 , int par4 ) { setBlockBoundsBasedOnState ( par1World , par2 , par3 , par4 ) ; return super . getCollisionBoundingBoxFromPool ( par1World , par2 , par3 , par4 ) ; } public void setBlockBoundsBasedOnState ( IBlockAccess par1IBlockAccess , int par2 , int par3 , int par4 ) { setBlockBoundsForBlockRender ( par1IBlockAccess . getBlockMetadata ( par2 , par3 , par4 ) ) ; } public void setBlockBoundsForItemRender ( ) { float f = <NUM_LIT> ; setBlockBounds ( <NUM_LIT> , <NUM_LIT> - f / <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> + f / <NUM_LIT> , <NUM_LIT> ) ; } public void setBlockBoundsForBlockRender ( int par1 ) { float f = <NUM_LIT> ; setBlockBounds ( <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , f , <NUM_LIT> ) ; if ( isTrapdoorOpen ( par1 ) ) { if ( ( par1 & <NUM_LIT:3> ) == <NUM_LIT:0> ) { setBlockBounds ( <NUM_LIT> , <NUM_LIT> , <NUM_LIT> - f , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> ) ; } if ( ( par1 & <NUM_LIT:3> ) == <NUM_LIT:1> ) { setBlockBounds ( <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , f ) ; } if ( ( par1 & <NUM_LIT:3> ) == <NUM_LIT:2> ) { setBlockBounds ( <NUM_LIT> - f , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> ) ; } if ( ( par1 & <NUM_LIT:3> ) == <NUM_LIT:3> ) { setBlockBounds ( <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , f , <NUM_LIT> , <NUM_LIT> ) ; } } } public void onBlockClicked ( World par1World , int par2 , int par3 , int par4 , EntityPlayer par5EntityPlayer ) { blockActivated ( par1World , par2 , par3 , par4 , par5EntityPlayer ) ; } public boolean blockActivated ( World par1World , int par2 , int par3 , int par4 , EntityPlayer par5EntityPlayer ) { if ( blockMaterial == Material . iron ) { return true ; } else { int i = par1World . getBlockMetadata ( par2 , par3 , par4 ) ; par1World . setBlockMetadataWithNotify ( par2 , par3 , par4 , i ^ <NUM_LIT:4> ) ; par1World . playAuxSFXAtEntity ( par5EntityPlayer , <NUM_LIT> , par2 , par3 , par4 , <NUM_LIT:0> ) ; return true ; } } public void onPoweredBlockChange ( World par1World , int par2 , int par3 , int par4 , boolean par5 ) { int i = par1World . getBlockMetadata ( par2 , par3 , par4 ) ; boolean flag = ( i & <NUM_LIT:4> ) > <NUM_LIT:0> ; if ( flag == par5 ) { return ; } else { par1World . setBlockMetadataWithNotify ( par2 , par3 , par4 , i ^ <NUM_LIT:4> ) ; par1World . playAuxSFXAtEntity ( null , <NUM_LIT> , par2 , par3 , par4 , <NUM_LIT:0> ) ; return ; } } public void onNeighborBlockChange ( World par1World , int par2 , int par3 , int par4 , int par5 ) { if ( par1World . isRemote ) { return ; } int i = par1World . getBlockMetadata ( par2 , par3 , par4 ) ; int j = par2 ; int k = par4 ; if ( ( i & <NUM_LIT:3> ) == <NUM_LIT:0> ) { k ++ ; } if ( ( i & <NUM_LIT:3> ) == <NUM_LIT:1> ) { k -- ; } if ( ( i & <NUM_LIT:3> ) == <NUM_LIT:2> ) { j ++ ; } if ( ( i & <NUM_LIT:3> ) == <NUM_LIT:3> ) { j -- ; } if ( ! isValidSupportBlock ( par1World . getBlockId ( j , par3 , k ) ) ) { par1World . setBlockWithNotify ( par2 , par3 , par4 , <NUM_LIT:0> ) ; dropBlockAsItem ( par1World , par2 , par3 , par4 , i , <NUM_LIT:0> ) ; } boolean flag = par1World . isBlockIndirectlyGettingPowered ( par2 , par3 , par4 ) ; if ( flag || par5 > <NUM_LIT:0> && Block . blocksList [ par5 ] . canProvidePower ( ) || par5 == <NUM_LIT:0> ) { onPoweredBlockChange ( par1World , par2 , par3 , par4 , flag ) ; } } public MovingObjectPosition collisionRayTrace ( World par1World , int par2 , int par3 , int par4 , Vec3D par5Vec3D , Vec3D par6Vec3D ) { setBlockBoundsBasedOnState ( par1World , par2 , par3 , par4 ) ; return super . collisionRayTrace ( par1World , par2 , par3 , par4 , par5Vec3D , par6Vec3D ) ; } public void onBlockPlaced ( World par1World , int par2 , int par3 , int par4 , int par5 ) { byte byte0 = <NUM_LIT:0> ; if ( par5 == <NUM_LIT:2> ) { byte0 = <NUM_LIT:0> ; } if ( par5 == <NUM_LIT:3> ) { byte0 = <NUM_LIT:1> ; } if ( par5 == <NUM_LIT:4> ) { byte0 = <NUM_LIT:2> ; } if ( par5 == <NUM_LIT:5> ) { byte0 = <NUM_LIT:3> ; } par1World . setBlockMetadataWithNotify ( par2 , par3 , par4 , byte0 ) ; } public boolean canPlaceBlockOnSide ( World par1World , int par2 , int par3 , int par4 , int par5 ) { if ( par5 == <NUM_LIT:0> ) { return false ; } if ( par5 == <NUM_LIT:1> ) { return false ; } if ( par5 == <NUM_LIT:2> ) { par4 ++ ; } if ( par5 == <NUM_LIT:3> ) { par4 -- ; } if ( par5 == <NUM_LIT:4> ) { par2 ++ ; } if ( par5 == <NUM_LIT:5> ) { par2 -- ; } return isValidSupportBlock ( par1World . getBlockId ( par2 , par3 , par4 ) ) ; } public static boolean isTrapdoorOpen ( int par0 ) { return ( par0 & <NUM_LIT:4> ) != <NUM_LIT:0> ; } private static boolean isValidSupportBlock ( int par0 ) { if ( par0 <= <NUM_LIT:0> ) { return false ; } else { Block block = Block . blocksList [ par0 ] ; return block != null && block . blockMaterial . isOpaque ( ) && block . renderAsNormalBlock ( ) || block == Block . glowStone ; } } } </s>
<s> package net . minecraft . src ; public class ItemAppleGold extends ItemFood { public ItemAppleGold ( int par1 , int par2 , float par3 , boolean par4 ) { super ( par1 , par2 , par3 , par4 ) ; } } </s>
<s> package net . minecraft . src ; public abstract class BlockContainer extends Block { protected BlockContainer ( int par1 , Material par2Material ) { super ( par1 , par2Material ) ; isBlockContainer = true ; } protected BlockContainer ( int par1 , int par2 , Material par3Material ) { super ( par1 , par2 , par3Material ) ; isBlockContainer = true ; } public void onBlockAdded ( World par1World , int par2 , int par3 , int par4 ) { super . onBlockAdded ( par1World , par2 , par3 , par4 ) ; par1World . setBlockTileEntity ( par2 , par3 , par4 , getBlockEntity ( ) ) ; } public void onBlockRemoval ( World par1World , int par2 , int par3 , int par4 ) { super . onBlockRemoval ( par1World , par2 , par3 , par4 ) ; par1World . removeBlockTileEntity ( par2 , par3 , par4 ) ; } public abstract TileEntity getBlockEntity ( ) ; public void powerBlock ( World par1World , int par2 , int par3 , int par4 , int par5 , int par6 ) { super . powerBlock ( par1World , par2 , par3 , par4 , par5 , par6 ) ; TileEntity tileentity = par1World . getBlockTileEntity ( par2 , par3 , par4 ) ; if ( tileentity != null ) { tileentity . onTileEntityPowered ( par5 , par6 ) ; } } } </s>
<s> package net . minecraft . src ; import java . util . List ; import java . util . Random ; public class ComponentNetherBridgeStairs extends ComponentNetherBridgePiece { public ComponentNetherBridgeStairs ( int par1 , Random par2Random , StructureBoundingBox par3StructureBoundingBox , int par4 ) { super ( par1 ) ; coordBaseMode = par4 ; boundingBox = par3StructureBoundingBox ; } public void buildComponent ( StructureComponent par1StructureComponent , List par2List , Random par3Random ) { getNextComponentZ ( ( ComponentNetherBridgeStartPiece ) par1StructureComponent , par2List , par3Random , <NUM_LIT:6> , <NUM_LIT:2> , false ) ; } public static ComponentNetherBridgeStairs createValidComponent ( List par0List , Random par1Random , int par2 , int par3 , int par4 , int par5 , int par6 ) { StructureBoundingBox structureboundingbox = StructureBoundingBox . getComponentToAddBoundingBox ( par2 , par3 , par4 , - <NUM_LIT:2> , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:7> , <NUM_LIT:11> , <NUM_LIT:7> , par5 ) ; if ( ! isAboveGround ( structureboundingbox ) || StructureComponent . findIntersecting ( par0List , structureboundingbox ) != null ) { return null ; } else { return new ComponentNetherBridgeStairs ( par6 , par1Random , structureboundingbox , par5 ) ; } } public boolean addComponentParts ( World par1World , Random par2Random , StructureBoundingBox par3StructureBoundingBox ) { fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:6> , <NUM_LIT:1> , <NUM_LIT:6> , Block . netherBrick . blockID , Block . netherBrick . blockID , false ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:0> , <NUM_LIT:2> , <NUM_LIT:0> , <NUM_LIT:6> , <NUM_LIT:10> , <NUM_LIT:6> , <NUM_LIT:0> , <NUM_LIT:0> , false ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:0> , <NUM_LIT:2> , <NUM_LIT:0> , <NUM_LIT:1> , <NUM_LIT:8> , <NUM_LIT:0> , Block . netherBrick . blockID , Block . netherBrick . blockID , false ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:5> , <NUM_LIT:2> , <NUM_LIT:0> , <NUM_LIT:6> , <NUM_LIT:8> , <NUM_LIT:0> , Block . netherBrick . blockID , Block . netherBrick . blockID , false ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:0> , <NUM_LIT:2> , <NUM_LIT:1> , <NUM_LIT:0> , <NUM_LIT:8> , <NUM_LIT:6> , Block . netherBrick . blockID , Block . netherBrick . blockID , false ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:6> , <NUM_LIT:2> , <NUM_LIT:1> , <NUM_LIT:6> , <NUM_LIT:8> , <NUM_LIT:6> , Block . netherBrick . blockID , Block . netherBrick . blockID , false ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:1> , <NUM_LIT:2> , <NUM_LIT:6> , <NUM_LIT:5> , <NUM_LIT:8> , <NUM_LIT:6> , Block . netherBrick . blockID , Block . netherBrick . blockID , false ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:0> , <NUM_LIT:3> , <NUM_LIT:2> , <NUM_LIT:0> , <NUM_LIT:5> , <NUM_LIT:4> , Block . netherFence . blockID , Block . netherFence . blockID , false ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:6> , <NUM_LIT:3> , <NUM_LIT:2> , <NUM_LIT:6> , <NUM_LIT:5> , <NUM_LIT:2> , Block . netherFence . blockID , Block . netherFence . blockID , false ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:6> , <NUM_LIT:3> , <NUM_LIT:4> , <NUM_LIT:6> , <NUM_LIT:5> , <NUM_LIT:4> , Block . netherFence . blockID , Block . netherFence . blockID , false ) ; placeBlockAtCurrentPosition ( par1World , Block . netherBrick . blockID , <NUM_LIT:0> , <NUM_LIT:5> , <NUM_LIT:2> , <NUM_LIT:5> , par3StructureBoundingBox ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:4> , <NUM_LIT:2> , <NUM_LIT:5> , <NUM_LIT:4> , <NUM_LIT:3> , <NUM_LIT:5> , Block . netherBrick . blockID , Block . netherBrick . blockID , false ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:3> , <NUM_LIT:2> , <NUM_LIT:5> , <NUM_LIT:3> , <NUM_LIT:4> , <NUM_LIT:5> , Block . netherBrick . blockID , Block . netherBrick . blockID , false ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:2> , <NUM_LIT:2> , <NUM_LIT:5> , <NUM_LIT:2> , <NUM_LIT:5> , <NUM_LIT:5> , Block . netherBrick . blockID , Block . netherBrick . blockID , false ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:1> , <NUM_LIT:2> , <NUM_LIT:5> , <NUM_LIT:1> , <NUM_LIT:6> , <NUM_LIT:5> , Block . netherBrick . blockID , Block . netherBrick . blockID , false ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:1> , <NUM_LIT:7> , <NUM_LIT:1> , <NUM_LIT:5> , <NUM_LIT:7> , <NUM_LIT:4> , Block . netherBrick . blockID , Block . netherBrick . blockID , false ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:6> , <NUM_LIT:8> , <NUM_LIT:2> , <NUM_LIT:6> , <NUM_LIT:8> , <NUM_LIT:4> , <NUM_LIT:0> , <NUM_LIT:0> , false ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:2> , <NUM_LIT:6> , <NUM_LIT:0> , <NUM_LIT:4> , <NUM_LIT:8> , <NUM_LIT:0> , Block . netherBrick . blockID , Block . netherBrick . blockID , false ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:2> , <NUM_LIT:5> , <NUM_LIT:0> , <NUM_LIT:4> , <NUM_LIT:5> , <NUM_LIT:0> , Block . netherFence . blockID , Block . netherFence . blockID , false ) ; for ( int i = <NUM_LIT:0> ; i <= <NUM_LIT:6> ; i ++ ) { for ( int j = <NUM_LIT:0> ; j <= <NUM_LIT:6> ; j ++ ) { fillCurrentPositionBlocksDownwards ( par1World , Block . netherBrick . blockID , <NUM_LIT:0> , i , - <NUM_LIT:1> , j , par3StructureBoundingBox ) ; } } return true ; } } </s>
<s> package net . minecraft . src ; public class EntityAIPanic extends EntityAIBase { private EntityCreature field_48208_a ; private float field_48206_b ; private double field_48207_c ; private double field_48204_d ; private double field_48205_e ; public EntityAIPanic ( EntityCreature par1EntityCreature , float par2 ) { field_48208_a = par1EntityCreature ; field_48206_b = par2 ; setMutexBits ( <NUM_LIT:1> ) ; } public boolean shouldExecute ( ) { if ( field_48208_a . getAITarget ( ) == null ) { return false ; } Vec3D vec3d = RandomPositionGenerator . func_48396_a ( field_48208_a , <NUM_LIT:5> , <NUM_LIT:4> ) ; if ( vec3d == null ) { return false ; } else { field_48207_c = vec3d . xCoord ; field_48204_d = vec3d . yCoord ; field_48205_e = vec3d . zCoord ; return true ; } } public void startExecuting ( ) { field_48208_a . getNavigator ( ) . func_48658_a ( field_48207_c , field_48204_d , field_48205_e , field_48206_b ) ; } public boolean continueExecuting ( ) { return ! field_48208_a . getNavigator ( ) . noPath ( ) ; } } </s>
<s> package net . minecraft . src ; import java . util . Random ; public class EntityCow extends EntityAnimal { public EntityCow ( World par1World ) { super ( par1World ) ; texture = "<STR_LIT>" ; setSize ( <NUM_LIT> , <NUM_LIT> ) ; getNavigator ( ) . func_48656_a ( true ) ; tasks . addTask ( <NUM_LIT:0> , new EntityAISwimming ( this ) ) ; tasks . addTask ( <NUM_LIT:1> , new EntityAIPanic ( this , <NUM_LIT> ) ) ; tasks . addTask ( <NUM_LIT:2> , new EntityAIMate ( this , <NUM_LIT> ) ) ; tasks . addTask ( <NUM_LIT:3> , new EntityAITempt ( this , <NUM_LIT> , Item . wheat . shiftedIndex , false ) ) ; tasks . addTask ( <NUM_LIT:4> , new EntityAIFollowParent ( this , <NUM_LIT> ) ) ; tasks . addTask ( <NUM_LIT:5> , new EntityAIWander ( this , <NUM_LIT> ) ) ; tasks . addTask ( <NUM_LIT:6> , new EntityAIWatchClosest ( this , net . minecraft . src . EntityPlayer . class , <NUM_LIT> ) ) ; tasks . addTask ( <NUM_LIT:7> , new EntityAILookIdle ( this ) ) ; } public boolean isAIEnabled ( ) { return true ; } 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 "<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 ; } protected void dropFewItems ( boolean par1 , int par2 ) { int i = rand . nextInt ( <NUM_LIT:3> ) + rand . nextInt ( <NUM_LIT:1> + par2 ) ; for ( int j = <NUM_LIT:0> ; j < i ; j ++ ) { dropItem ( Item . leather . shiftedIndex , <NUM_LIT:1> ) ; } i = rand . nextInt ( <NUM_LIT:3> ) + <NUM_LIT:1> + rand . nextInt ( <NUM_LIT:1> + par2 ) ; for ( int k = <NUM_LIT:0> ; k < i ; k ++ ) { if ( isBurning ( ) ) { dropItem ( Item . beefCooked . shiftedIndex , <NUM_LIT:1> ) ; } else { dropItem ( Item . beefRaw . shiftedIndex , <NUM_LIT:1> ) ; } } } public boolean interact ( EntityPlayer par1EntityPlayer ) { ItemStack itemstack = par1EntityPlayer . inventory . getCurrentItem ( ) ; if ( itemstack != null && itemstack . itemID == Item . bucketEmpty . shiftedIndex ) { par1EntityPlayer . inventory . setInventorySlotContents ( par1EntityPlayer . inventory . currentItem , new ItemStack ( Item . bucketMilk ) ) ; return true ; } else { return super . interact ( par1EntityPlayer ) ; } } public EntityAnimal spawnBabyAnimal ( EntityAnimal par1EntityAnimal ) { return new EntityCow ( worldObj ) ; } } </s>
<s> package net . minecraft . src ; import java . util . Random ; public class WorldGenDesertWells extends WorldGenerator { public WorldGenDesertWells ( ) { } public boolean generate ( World par1World , Random par2Random , int par3 , int par4 , int par5 ) { for ( ; par1World . isAirBlock ( par3 , par4 , par5 ) && par4 > <NUM_LIT:2> ; par4 -- ) { } int i = par1World . getBlockId ( par3 , par4 , par5 ) ; if ( i != Block . sand . blockID ) { return false ; } for ( int j = - <NUM_LIT:2> ; j <= <NUM_LIT:2> ; j ++ ) { for ( int k1 = - <NUM_LIT:2> ; k1 <= <NUM_LIT:2> ; k1 ++ ) { if ( par1World . isAirBlock ( par3 + j , par4 - <NUM_LIT:1> , par5 + k1 ) && par1World . isAirBlock ( par3 + j , par4 - <NUM_LIT:2> , par5 + k1 ) ) { return false ; } } } for ( int k = - <NUM_LIT:1> ; k <= <NUM_LIT:0> ; k ++ ) { for ( int l1 = - <NUM_LIT:2> ; l1 <= <NUM_LIT:2> ; l1 ++ ) { for ( int k2 = - <NUM_LIT:2> ; k2 <= <NUM_LIT:2> ; k2 ++ ) { par1World . setBlock ( par3 + l1 , par4 + k , par5 + k2 , Block . sandStone . blockID ) ; } } } par1World . setBlock ( par3 , par4 , par5 , Block . waterMoving . blockID ) ; par1World . setBlock ( par3 - <NUM_LIT:1> , par4 , par5 , Block . waterMoving . blockID ) ; par1World . setBlock ( par3 + <NUM_LIT:1> , par4 , par5 , Block . waterMoving . blockID ) ; par1World . setBlock ( par3 , par4 , par5 - <NUM_LIT:1> , Block . waterMoving . blockID ) ; par1World . setBlock ( par3 , par4 , par5 + <NUM_LIT:1> , Block . waterMoving . blockID ) ; for ( int l = - <NUM_LIT:2> ; l <= <NUM_LIT:2> ; l ++ ) { for ( int i2 = - <NUM_LIT:2> ; i2 <= <NUM_LIT:2> ; i2 ++ ) { if ( l == - <NUM_LIT:2> || l == <NUM_LIT:2> || i2 == - <NUM_LIT:2> || i2 == <NUM_LIT:2> ) { par1World . setBlock ( par3 + l , par4 + <NUM_LIT:1> , par5 + i2 , Block . sandStone . blockID ) ; } } } par1World . setBlockAndMetadata ( par3 + <NUM_LIT:2> , par4 + <NUM_LIT:1> , par5 , Block . stairSingle . blockID , <NUM_LIT:1> ) ; par1World . setBlockAndMetadata ( par3 - <NUM_LIT:2> , par4 + <NUM_LIT:1> , par5 , Block . stairSingle . blockID , <NUM_LIT:1> ) ; par1World . setBlockAndMetadata ( par3 , par4 + <NUM_LIT:1> , par5 + <NUM_LIT:2> , Block . stairSingle . blockID , <NUM_LIT:1> ) ; par1World . setBlockAndMetadata ( par3 , par4 + <NUM_LIT:1> , par5 - <NUM_LIT:2> , Block . stairSingle . blockID , <NUM_LIT:1> ) ; for ( int i1 = - <NUM_LIT:1> ; i1 <= <NUM_LIT:1> ; i1 ++ ) { for ( int j2 = - <NUM_LIT:1> ; j2 <= <NUM_LIT:1> ; j2 ++ ) { if ( i1 == <NUM_LIT:0> && j2 == <NUM_LIT:0> ) { par1World . setBlock ( par3 + i1 , par4 + <NUM_LIT:4> , par5 + j2 , Block . sandStone . blockID ) ; } else { par1World . setBlockAndMetadata ( par3 + i1 , par4 + <NUM_LIT:4> , par5 + j2 , Block . stairSingle . blockID , <NUM_LIT:1> ) ; } } } for ( int j1 = <NUM_LIT:1> ; j1 <= <NUM_LIT:3> ; j1 ++ ) { par1World . setBlock ( par3 - <NUM_LIT:1> , par4 + j1 , par5 - <NUM_LIT:1> , Block . sandStone . blockID ) ; par1World . setBlock ( par3 - <NUM_LIT:1> , par4 + j1 , par5 + <NUM_LIT:1> , Block . sandStone . blockID ) ; par1World . setBlock ( par3 + <NUM_LIT:1> , par4 + j1 , par5 - <NUM_LIT:1> , Block . sandStone . blockID ) ; par1World . setBlock ( par3 + <NUM_LIT:1> , par4 + j1 , par5 + <NUM_LIT:1> , Block . sandStone . blockID ) ; } return true ; } } </s>
<s> package net . minecraft . src ; public class ItemCloth extends ItemBlock { public ItemCloth ( int par1 ) { super ( par1 ) ; setMaxDamage ( <NUM_LIT:0> ) ; setHasSubtypes ( true ) ; } public int getMetadata ( int par1 ) { return par1 ; } public String getItemNameIS ( ItemStack par1ItemStack ) { return ( new StringBuilder ( ) ) . append ( super . getItemName ( ) ) . append ( "<STR_LIT:.>" ) . append ( ItemDye . dyeColorNames [ BlockCloth . getBlockFromDye ( par1ItemStack . getItemDamage ( ) ) ] ) . toString ( ) ; } } </s>
<s> package net . minecraft . src ; import java . util . ArrayList ; import java . util . Random ; public class ComponentStrongholdStairs2 extends ComponentStrongholdStairs { public StructureStrongholdPieceWeight field_35329_a ; public ComponentStrongholdPortalRoom portalRoom ; public ArrayList field_35328_b ; public ComponentStrongholdStairs2 ( int par1 , Random par2Random , int par3 , int par4 ) { super ( <NUM_LIT:0> , par2Random , par3 , par4 ) ; field_35328_b = new ArrayList ( ) ; } public ChunkPosition getCenter ( ) { if ( portalRoom != null ) { return portalRoom . getCenter ( ) ; } else { return super . getCenter ( ) ; } } } </s>
<s> package net . minecraft . src ; public class ServerCommand { public final String command ; public final ICommandListener commandListener ; public ServerCommand ( String par1Str , ICommandListener par2ICommandListener ) { command = par1Str ; commandListener = par2ICommandListener ; } } </s>
<s> package net . minecraft . src ; public class GenLayerSwampRivers extends GenLayer { public GenLayerSwampRivers ( long par1 , GenLayer par3GenLayer ) { super ( par1 ) ; parent = par3GenLayer ; } public int [ ] getInts ( int par1 , int par2 , int par3 , int par4 ) { int ai [ ] = parent . getInts ( par1 - <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 ( k == BiomeGenBase . swampland . biomeID && nextInt ( <NUM_LIT:6> ) == <NUM_LIT:0> ) { ai1 [ j + i * par3 ] = BiomeGenBase . river . biomeID ; continue ; } if ( ( k == BiomeGenBase . jungle . biomeID || k == BiomeGenBase . jungleHills . biomeID ) && nextInt ( <NUM_LIT:8> ) == <NUM_LIT:0> ) { ai1 [ j + i * par3 ] = BiomeGenBase . river . biomeID ; } else { ai1 [ j + i * par3 ] = k ; } } } return ai1 ; } } </s>
<s> package net . minecraft . src ; import java . util . ArrayList ; import java . util . Random ; public class BlockBrewingStand extends BlockContainer { private Random rand ; public BlockBrewingStand ( int par1 ) { super ( par1 , Material . iron ) ; rand = new Random ( ) ; blockIndexInTexture = <NUM_LIT> ; } public boolean isOpaqueCube ( ) { return false ; } public int getRenderType ( ) { return <NUM_LIT> ; } public TileEntity getBlockEntity ( ) { return new TileEntityBrewingStand ( ) ; } public boolean renderAsNormalBlock ( ) { return false ; } public void getCollidingBoundingBoxes ( World par1World , int par2 , int par3 , int par4 , AxisAlignedBB par5AxisAlignedBB , ArrayList par6ArrayList ) { setBlockBounds ( <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> ) ; super . getCollidingBoundingBoxes ( par1World , par2 , par3 , par4 , par5AxisAlignedBB , par6ArrayList ) ; setBlockBoundsForItemRender ( ) ; super . getCollidingBoundingBoxes ( par1World , par2 , par3 , par4 , par5AxisAlignedBB , par6ArrayList ) ; } public void setBlockBoundsForItemRender ( ) { setBlockBounds ( <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> ) ; } public boolean blockActivated ( World par1World , int par2 , int par3 , int par4 , EntityPlayer par5EntityPlayer ) { if ( par1World . isRemote ) { return true ; } TileEntityBrewingStand tileentitybrewingstand = ( TileEntityBrewingStand ) par1World . getBlockTileEntity ( par2 , par3 , par4 ) ; if ( tileentitybrewingstand != null ) { par5EntityPlayer . displayGUIBrewingStand ( tileentitybrewingstand ) ; } return true ; } public void onBlockRemoval ( World par1World , int par2 , int par3 , int par4 ) { TileEntity tileentity = par1World . getBlockTileEntity ( par2 , par3 , par4 ) ; if ( tileentity != null && ( tileentity instanceof TileEntityBrewingStand ) ) { TileEntityBrewingStand tileentitybrewingstand = ( TileEntityBrewingStand ) tileentity ; label0 : for ( int i = <NUM_LIT:0> ; i < tileentitybrewingstand . getSizeInventory ( ) ; i ++ ) { ItemStack itemstack = tileentitybrewingstand . 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 ( par1World , ( float ) par2 + f , ( float ) par3 + f1 , ( float ) par4 + 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 ; par1World . spawnEntityInWorld ( entityitem ) ; } while ( true ) ; } } super . onBlockRemoval ( par1World , par2 , par3 , par4 ) ; } public int idDropped ( int par1 , Random par2Random , int par3 ) { return Item . brewingStand . shiftedIndex ; } } </s>
<s> package net . minecraft . src ; import java . util . ArrayList ; import java . util . List ; public class Vec3D { private static List vectorList = new ArrayList ( ) ; private static int nextVector = <NUM_LIT:0> ; public double xCoord ; public double yCoord ; public double zCoord ; public static Vec3D createVectorHelper ( double par0 , double par2 , double par4 ) { return new Vec3D ( par0 , par2 , par4 ) ; } public static void initialize ( ) { nextVector = <NUM_LIT:0> ; } public static Vec3D createVector ( double par0 , double par2 , double par4 ) { if ( nextVector >= vectorList . size ( ) ) { vectorList . add ( createVectorHelper ( <NUM_LIT> , <NUM_LIT> , <NUM_LIT> ) ) ; } return ( ( Vec3D ) vectorList . get ( nextVector ++ ) ) . setComponents ( par0 , par2 , par4 ) ; } private Vec3D ( double par1 , double par3 , double par5 ) { if ( par1 == - <NUM_LIT> ) { par1 = <NUM_LIT> ; } if ( par3 == - <NUM_LIT> ) { par3 = <NUM_LIT> ; } if ( par5 == - <NUM_LIT> ) { par5 = <NUM_LIT> ; } xCoord = par1 ; yCoord = par3 ; zCoord = par5 ; } private Vec3D setComponents ( double par1 , double par3 , double par5 ) { xCoord = par1 ; yCoord = par3 ; zCoord = par5 ; return this ; } public Vec3D normalize ( ) { double d = MathHelper . sqrt_double ( xCoord * xCoord + yCoord * yCoord + zCoord * zCoord ) ; if ( d < <NUM_LIT> ) { return createVector ( <NUM_LIT> , <NUM_LIT> , <NUM_LIT> ) ; } else { return createVector ( xCoord / d , yCoord / d , zCoord / d ) ; } } public double dotProduct ( Vec3D par1Vec3D ) { return xCoord * par1Vec3D . xCoord + yCoord * par1Vec3D . yCoord + zCoord * par1Vec3D . zCoord ; } public Vec3D addVector ( double par1 , double par3 , double par5 ) { return createVector ( xCoord + par1 , yCoord + par3 , zCoord + par5 ) ; } public double distanceTo ( Vec3D par1Vec3D ) { double d = par1Vec3D . xCoord - xCoord ; double d1 = par1Vec3D . yCoord - yCoord ; double d2 = par1Vec3D . zCoord - zCoord ; return ( double ) MathHelper . sqrt_double ( d * d + d1 * d1 + d2 * d2 ) ; } public double squareDistanceTo ( Vec3D par1Vec3D ) { double d = par1Vec3D . xCoord - xCoord ; double d1 = par1Vec3D . yCoord - yCoord ; double d2 = par1Vec3D . zCoord - zCoord ; return d * d + d1 * d1 + d2 * d2 ; } public double squareDistanceTo ( double par1 , double par3 , double par5 ) { double d = par1 - xCoord ; double d1 = par3 - yCoord ; double d2 = par5 - zCoord ; return d * d + d1 * d1 + d2 * d2 ; } public double lengthVector ( ) { return ( double ) MathHelper . sqrt_double ( xCoord * xCoord + yCoord * yCoord + zCoord * zCoord ) ; } public Vec3D getIntermediateWithXValue ( Vec3D par1Vec3D , double par2 ) { double d = par1Vec3D . xCoord - xCoord ; double d1 = par1Vec3D . yCoord - yCoord ; double d2 = par1Vec3D . zCoord - zCoord ; if ( d * d < <NUM_LIT> ) { return null ; } double d3 = ( par2 - xCoord ) / d ; if ( d3 < <NUM_LIT> || d3 > <NUM_LIT> ) { return null ; } else { return createVector ( xCoord + d * d3 , yCoord + d1 * d3 , zCoord + d2 * d3 ) ; } } public Vec3D getIntermediateWithYValue ( Vec3D par1Vec3D , double par2 ) { double d = par1Vec3D . xCoord - xCoord ; double d1 = par1Vec3D . yCoord - yCoord ; double d2 = par1Vec3D . zCoord - zCoord ; if ( d1 * d1 < <NUM_LIT> ) { return null ; } double d3 = ( par2 - yCoord ) / d1 ; if ( d3 < <NUM_LIT> || d3 > <NUM_LIT> ) { return null ; } else { return createVector ( xCoord + d * d3 , yCoord + d1 * d3 , zCoord + d2 * d3 ) ; } } public Vec3D getIntermediateWithZValue ( Vec3D par1Vec3D , double par2 ) { double d = par1Vec3D . xCoord - xCoord ; double d1 = par1Vec3D . yCoord - yCoord ; double d2 = par1Vec3D . zCoord - zCoord ; if ( d2 * d2 < <NUM_LIT> ) { return null ; } double d3 = ( par2 - zCoord ) / d2 ; if ( d3 < <NUM_LIT> || d3 > <NUM_LIT> ) { return null ; } else { return createVector ( xCoord + d * d3 , yCoord + d1 * d3 , zCoord + d2 * d3 ) ; } } public String toString ( ) { return ( new StringBuilder ( ) ) . append ( "<STR_LIT:(>" ) . append ( xCoord ) . append ( "<STR_LIT:U+002CU+0020>" ) . append ( yCoord ) . append ( "<STR_LIT:U+002CU+0020>" ) . append ( zCoord ) . append ( "<STR_LIT:)>" ) . toString ( ) ; } public void rotateAroundX ( float par1 ) { float f = MathHelper . cos ( par1 ) ; float f1 = MathHelper . sin ( par1 ) ; double d = xCoord ; double d1 = yCoord * ( double ) f + zCoord * ( double ) f1 ; double d2 = zCoord * ( double ) f - yCoord * ( double ) f1 ; xCoord = d ; yCoord = d1 ; zCoord = d2 ; } public void rotateAroundY ( float par1 ) { float f = MathHelper . cos ( par1 ) ; float f1 = MathHelper . sin ( par1 ) ; double d = xCoord * ( double ) f + zCoord * ( double ) f1 ; double d1 = yCoord ; double d2 = zCoord * ( double ) f - xCoord * ( double ) f1 ; xCoord = d ; yCoord = d1 ; zCoord = d2 ; } } </s>
<s> package net . minecraft . src ; public interface IInventory { public abstract int getSizeInventory ( ) ; public abstract ItemStack getStackInSlot ( int i ) ; public abstract ItemStack decrStackSize ( int i , int j ) ; public abstract ItemStack getStackInSlotOnClosing ( int i ) ; public abstract void setInventorySlotContents ( int i , ItemStack itemstack ) ; public abstract String getInvName ( ) ; public abstract int getInventoryStackLimit ( ) ; public abstract void onInventoryChanged ( ) ; public abstract boolean isUseableByPlayer ( EntityPlayer entityplayer ) ; public abstract void openChest ( ) ; public abstract void closeChest ( ) ; } </s>
<s> package net . minecraft . src ; final class StructureStrongholdPieceWeight2 extends StructureStrongholdPieceWeight { StructureStrongholdPieceWeight2 ( Class par1Class , int par2 , int par3 ) { super ( par1Class , par2 , par3 ) ; } public boolean canSpawnMoreStructuresOfType ( int par1 ) { return super . canSpawnMoreStructuresOfType ( par1 ) && par1 > <NUM_LIT:4> ; } } </s>
<s> package net . minecraft . src ; import java . util . Random ; public class EntityBlaze extends EntityMob { private float heightOffset ; private int heightOffsetUpdateTime ; private int field_40128_g ; public EntityBlaze ( World par1World ) { super ( par1World ) ; heightOffset = <NUM_LIT> ; texture = "<STR_LIT>" ; isImmuneToFire = true ; attackStrength = <NUM_LIT:6> ; experienceValue = <NUM_LIT:10> ; } public int getMaxHealth ( ) { return <NUM_LIT:20> ; } protected void entityInit ( ) { super . entityInit ( ) ; dataWatcher . addObject ( <NUM_LIT:16> , new Byte ( ( byte ) <NUM_LIT:0> ) ) ; } protected String getLivingSound ( ) { return "<STR_LIT>" ; } protected String getHurtSound ( ) { return "<STR_LIT>" ; } protected String getDeathSound ( ) { return "<STR_LIT>" ; } public boolean attackEntityFrom ( DamageSource par1DamageSource , int par2 ) { return super . attackEntityFrom ( par1DamageSource , par2 ) ; } public void onDeath ( DamageSource par1DamageSource ) { super . onDeath ( par1DamageSource ) ; } public float getBrightness ( float par1 ) { return <NUM_LIT> ; } public void onLivingUpdate ( ) { if ( ! worldObj . isRemote ) { if ( isWet ( ) ) { attackEntityFrom ( DamageSource . drown , <NUM_LIT:1> ) ; } heightOffsetUpdateTime -- ; if ( heightOffsetUpdateTime <= <NUM_LIT:0> ) { heightOffsetUpdateTime = <NUM_LIT:100> ; heightOffset = <NUM_LIT> + ( float ) rand . nextGaussian ( ) * <NUM_LIT> ; } if ( getEntityToAttack ( ) != null && getEntityToAttack ( ) . posY + ( double ) getEntityToAttack ( ) . getEyeHeight ( ) > posY + ( double ) getEyeHeight ( ) + ( double ) heightOffset ) { motionY = motionY + ( <NUM_LIT> - motionY ) * <NUM_LIT> ; } } if ( rand . nextInt ( <NUM_LIT:24> ) == <NUM_LIT:0> ) { worldObj . playSoundEffect ( posX + <NUM_LIT> , posY + <NUM_LIT> , posZ + <NUM_LIT> , "<STR_LIT>" , <NUM_LIT> + rand . nextFloat ( ) , rand . nextFloat ( ) * <NUM_LIT> + <NUM_LIT> ) ; } if ( ! onGround && motionY < <NUM_LIT> ) { motionY *= <NUM_LIT> ; } for ( int i = <NUM_LIT:0> ; i < <NUM_LIT:2> ; i ++ ) { worldObj . spawnParticle ( "<STR_LIT>" , posX + ( rand . nextDouble ( ) - <NUM_LIT> ) * ( double ) width , posY + rand . nextDouble ( ) * ( double ) height , posZ + ( rand . nextDouble ( ) - <NUM_LIT> ) * ( double ) width , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> ) ; } super . onLivingUpdate ( ) ; } protected void attackEntity ( Entity par1Entity , float par2 ) { if ( attackTime <= <NUM_LIT:0> && par2 < <NUM_LIT> && par1Entity . boundingBox . maxY > boundingBox . minY && par1Entity . boundingBox . minY < boundingBox . maxY ) { attackTime = <NUM_LIT:20> ; attackEntityAsMob ( par1Entity ) ; } else if ( par2 < <NUM_LIT> ) { double d = par1Entity . posX - posX ; double d1 = ( par1Entity . boundingBox . minY + ( double ) ( par1Entity . height / <NUM_LIT> ) ) - ( posY + ( double ) ( height / <NUM_LIT> ) ) ; double d2 = par1Entity . posZ - posZ ; if ( attackTime == <NUM_LIT:0> ) { field_40128_g ++ ; if ( field_40128_g == <NUM_LIT:1> ) { attackTime = <NUM_LIT> ; func_40127_a ( true ) ; } else if ( field_40128_g <= <NUM_LIT:4> ) { attackTime = <NUM_LIT:6> ; } else { attackTime = <NUM_LIT:100> ; field_40128_g = <NUM_LIT:0> ; func_40127_a ( false ) ; } if ( field_40128_g > <NUM_LIT:1> ) { float f = MathHelper . sqrt_float ( par2 ) * <NUM_LIT> ; worldObj . playAuxSFXAtEntity ( null , <NUM_LIT> , ( int ) posX , ( int ) posY , ( int ) posZ , <NUM_LIT:0> ) ; for ( int i = <NUM_LIT:0> ; i < <NUM_LIT:1> ; i ++ ) { EntitySmallFireball entitysmallfireball = new EntitySmallFireball ( worldObj , this , d + rand . nextGaussian ( ) * ( double ) f , d1 , d2 + rand . nextGaussian ( ) * ( double ) f ) ; entitysmallfireball . posY = posY + ( double ) ( height / <NUM_LIT> ) + <NUM_LIT> ; worldObj . spawnEntityInWorld ( entitysmallfireball ) ; } } } rotationYaw = ( float ) ( ( Math . atan2 ( d2 , d ) * <NUM_LIT> ) / Math . PI ) - <NUM_LIT> ; hasAttacked = true ; } } protected void fall ( float f ) { } public void writeEntityToNBT ( NBTTagCompound par1NBTTagCompound ) { super . writeEntityToNBT ( par1NBTTagCompound ) ; } public void readEntityFromNBT ( NBTTagCompound par1NBTTagCompound ) { super . readEntityFromNBT ( par1NBTTagCompound ) ; } protected int getDropItemId ( ) { return Item . blazeRod . shiftedIndex ; } public boolean isBurning ( ) { return func_40126_A ( ) ; } protected void dropFewItems ( boolean par1 , int par2 ) { if ( par1 ) { int i = rand . nextInt ( <NUM_LIT:2> + par2 ) ; for ( int j = <NUM_LIT:0> ; j < i ; j ++ ) { dropItem ( Item . blazeRod . shiftedIndex , <NUM_LIT:1> ) ; } } } public boolean func_40126_A ( ) { return ( dataWatcher . getWatchableObjectByte ( <NUM_LIT:16> ) & <NUM_LIT:1> ) != <NUM_LIT:0> ; } public void func_40127_a ( boolean par1 ) { byte byte0 = dataWatcher . getWatchableObjectByte ( <NUM_LIT:16> ) ; if ( par1 ) { byte0 |= <NUM_LIT:1> ; } else { byte0 &= <NUM_LIT> ; } dataWatcher . updateObject ( <NUM_LIT:16> , Byte . valueOf ( byte0 ) ) ; } protected boolean isValidLightLevel ( ) { return true ; } } </s>
<s> package net . minecraft . src ; public class Potion { public static final Potion potionTypes [ ] = new Potion [ <NUM_LIT:32> ] ; public static final Potion field_35453_b = null ; public static final Potion moveSpeed = ( new Potion ( <NUM_LIT:1> , false , <NUM_LIT> ) ) . setPotionName ( "<STR_LIT>" ) . setIconIndex ( <NUM_LIT:0> , <NUM_LIT:0> ) ; public static final Potion moveSlowdown = ( new Potion ( <NUM_LIT:2> , true , <NUM_LIT> ) ) . setPotionName ( "<STR_LIT>" ) . setIconIndex ( <NUM_LIT:1> , <NUM_LIT:0> ) ; public static final Potion digSpeed = ( new Potion ( <NUM_LIT:3> , false , <NUM_LIT> ) ) . setPotionName ( "<STR_LIT>" ) . setIconIndex ( <NUM_LIT:2> , <NUM_LIT:0> ) . setEffectiveness ( <NUM_LIT> ) ; public static final Potion digSlowdown = ( new Potion ( <NUM_LIT:4> , true , <NUM_LIT> ) ) . setPotionName ( "<STR_LIT>" ) . setIconIndex ( <NUM_LIT:3> , <NUM_LIT:0> ) ; public static final Potion damageBoost = ( new Potion ( <NUM_LIT:5> , false , <NUM_LIT> ) ) . setPotionName ( "<STR_LIT>" ) . setIconIndex ( <NUM_LIT:4> , <NUM_LIT:0> ) ; public static final Potion heal = ( new PotionHealth ( <NUM_LIT:6> , false , <NUM_LIT> ) ) . setPotionName ( "<STR_LIT>" ) ; public static final Potion harm = ( new PotionHealth ( <NUM_LIT:7> , true , <NUM_LIT> ) ) . setPotionName ( "<STR_LIT>" ) ; public static final Potion jump = ( new Potion ( <NUM_LIT:8> , false , <NUM_LIT> ) ) . setPotionName ( "<STR_LIT>" ) . setIconIndex ( <NUM_LIT:2> , <NUM_LIT:1> ) ; public static final Potion confusion = ( new Potion ( <NUM_LIT:9> , true , <NUM_LIT> ) ) . setPotionName ( "<STR_LIT>" ) . setIconIndex ( <NUM_LIT:3> , <NUM_LIT:1> ) . setEffectiveness ( <NUM_LIT> ) ; public static final Potion regeneration = ( new Potion ( <NUM_LIT:10> , false , <NUM_LIT> ) ) . setPotionName ( "<STR_LIT>" ) . setIconIndex ( <NUM_LIT:7> , <NUM_LIT:0> ) . setEffectiveness ( <NUM_LIT> ) ; public static final Potion resistance = ( new Potion ( <NUM_LIT:11> , false , <NUM_LIT> ) ) . setPotionName ( "<STR_LIT>" ) . setIconIndex ( <NUM_LIT:6> , <NUM_LIT:1> ) ; public static final Potion fireResistance = ( new Potion ( <NUM_LIT:12> , false , <NUM_LIT> ) ) . setPotionName ( "<STR_LIT>" ) . setIconIndex ( <NUM_LIT:7> , <NUM_LIT:1> ) ; public static final Potion waterBreathing = ( new Potion ( <NUM_LIT> , false , <NUM_LIT> ) ) . setPotionName ( "<STR_LIT>" ) . setIconIndex ( <NUM_LIT:0> , <NUM_LIT:2> ) ; public static final Potion invisibility = ( new Potion ( <NUM_LIT> , false , <NUM_LIT> ) ) . setPotionName ( "<STR_LIT>" ) . setIconIndex ( <NUM_LIT:0> , <NUM_LIT:1> ) . setPotionUnusable ( ) ; public static final Potion blindness = ( new Potion ( <NUM_LIT:15> , true , <NUM_LIT> ) ) . setPotionName ( "<STR_LIT>" ) . setIconIndex ( <NUM_LIT:5> , <NUM_LIT:1> ) . setEffectiveness ( <NUM_LIT> ) ; public static final Potion nightVision = ( new Potion ( <NUM_LIT:16> , false , <NUM_LIT> ) ) . setPotionName ( "<STR_LIT>" ) . setIconIndex ( <NUM_LIT:4> , <NUM_LIT:1> ) . setPotionUnusable ( ) ; public static final Potion hunger = ( new Potion ( <NUM_LIT> , true , <NUM_LIT> ) ) . setPotionName ( "<STR_LIT>" ) . setIconIndex ( <NUM_LIT:1> , <NUM_LIT:1> ) ; public static final Potion weakness = ( new Potion ( <NUM_LIT> , true , <NUM_LIT> ) ) . setPotionName ( "<STR_LIT>" ) . setIconIndex ( <NUM_LIT:5> , <NUM_LIT:0> ) ; public static final Potion poison = ( new Potion ( <NUM_LIT> , true , <NUM_LIT> ) ) . setPotionName ( "<STR_LIT>" ) . setIconIndex ( <NUM_LIT:6> , <NUM_LIT:0> ) . setEffectiveness ( <NUM_LIT> ) ; public static final Potion field_35465_v = null ; public static final Potion field_35464_w = null ; public static final Potion field_35474_x = null ; public static final Potion field_35473_y = null ; public static final Potion field_35472_z = null ; public static final Potion field_35444_A = null ; public static final Potion field_35445_B = null ; public static final Potion field_35446_C = null ; public static final Potion field_35440_D = null ; public static final Potion field_35441_E = null ; public static final Potion field_35442_F = null ; public static final Potion field_35443_G = null ; public final int id ; private String name ; private int statusIconIndex ; private final boolean isBadEffect ; private double effectiveness ; private boolean usable ; private final int liquidColor ; protected Potion ( int par1 , boolean par2 , int par3 ) { name = "<STR_LIT>" ; statusIconIndex = - <NUM_LIT:1> ; id = par1 ; potionTypes [ par1 ] = this ; isBadEffect = par2 ; if ( par2 ) { effectiveness = <NUM_LIT> ; } else { effectiveness = <NUM_LIT> ; } liquidColor = par3 ; } protected Potion setIconIndex ( int par1 , int par2 ) { statusIconIndex = par1 + par2 * <NUM_LIT:8> ; return this ; } public int getId ( ) { return id ; } public void performEffect ( EntityLiving par1EntityLiving , int par2 ) { if ( id == regeneration . id ) { if ( par1EntityLiving . getHealth ( ) < par1EntityLiving . getMaxHealth ( ) ) { par1EntityLiving . heal ( <NUM_LIT:1> ) ; } } else if ( id == poison . id ) { if ( par1EntityLiving . getHealth ( ) > <NUM_LIT:1> ) { par1EntityLiving . attackEntityFrom ( DamageSource . magic , <NUM_LIT:1> ) ; } } else if ( id == hunger . id && ( par1EntityLiving instanceof EntityPlayer ) ) { ( ( EntityPlayer ) par1EntityLiving ) . addExhaustion ( <NUM_LIT> * ( float ) ( par2 + <NUM_LIT:1> ) ) ; } else if ( id == heal . id && ! par1EntityLiving . isEntityUndead ( ) || id == harm . id && par1EntityLiving . isEntityUndead ( ) ) { par1EntityLiving . heal ( <NUM_LIT:6> << par2 ) ; } else if ( id == harm . id && ! par1EntityLiving . isEntityUndead ( ) || id == heal . id && par1EntityLiving . isEntityUndead ( ) ) { par1EntityLiving . attackEntityFrom ( DamageSource . magic , <NUM_LIT:6> << par2 ) ; } } public void affectEntity ( EntityLiving par1EntityLiving , EntityLiving par2EntityLiving , int par3 , double par4 ) { if ( id == heal . id && ! par2EntityLiving . isEntityUndead ( ) || id == harm . id && par2EntityLiving . isEntityUndead ( ) ) { int i = ( int ) ( par4 * ( double ) ( <NUM_LIT:6> << par3 ) + <NUM_LIT> ) ; par2EntityLiving . heal ( i ) ; } else if ( id == harm . id && ! par2EntityLiving . isEntityUndead ( ) || id == heal . id && par2EntityLiving . isEntityUndead ( ) ) { int j = ( int ) ( par4 * ( double ) ( <NUM_LIT:6> << par3 ) + <NUM_LIT> ) ; if ( par1EntityLiving == null ) { par2EntityLiving . attackEntityFrom ( DamageSource . magic , j ) ; } else { par2EntityLiving . attackEntityFrom ( DamageSource . causeIndirectMagicDamage ( par2EntityLiving , par1EntityLiving ) , j ) ; } } } public boolean isInstant ( ) { return false ; } public boolean isReady ( int par1 , int par2 ) { if ( id == regeneration . id || id == poison . id ) { int i = <NUM_LIT> > > par2 ; if ( i > <NUM_LIT:0> ) { return par1 % i == <NUM_LIT:0> ; } else { return true ; } } return id == hunger . id ; } public Potion setPotionName ( String par1Str ) { name = par1Str ; return this ; } public String getName ( ) { return name ; } protected Potion setEffectiveness ( double par1 ) { effectiveness = par1 ; return this ; } public double getEffectiveness ( ) { return effectiveness ; } public Potion setPotionUnusable ( ) { usable = true ; return this ; } public boolean isUsable ( ) { return usable ; } public int getLiquidColor ( ) { return liquidColor ; } } </s>
<s> package net . minecraft . src ; import java . io . * ; import java . util . * ; import java . util . logging . Logger ; import net . minecraft . server . MinecraftServer ; public class ServerConfigurationManager { public static Logger logger = Logger . getLogger ( "<STR_LIT>" ) ; public List playerEntities ; private MinecraftServer mcServer ; private PlayerManager playerManagerObj [ ] ; private int maxPlayers ; private Set bannedPlayers ; private Set bannedIPs ; private Set ops ; private Set whiteListedIPs ; private File bannedPlayersFile ; private File ipBanFile ; private File opFile ; private File whitelistPlayersFile ; private IPlayerFileData playerNBTManagerObj ; private boolean whiteListEnforced ; private int field_35482_p ; public ServerConfigurationManager ( MinecraftServer par1MinecraftServer ) { playerEntities = new ArrayList ( ) ; bannedPlayers = new HashSet ( ) ; bannedIPs = new HashSet ( ) ; ops = new HashSet ( ) ; whiteListedIPs = new HashSet ( ) ; field_35482_p = <NUM_LIT:0> ; playerManagerObj = new PlayerManager [ <NUM_LIT:3> ] ; mcServer = par1MinecraftServer ; bannedPlayersFile = par1MinecraftServer . getFile ( "<STR_LIT>" ) ; ipBanFile = par1MinecraftServer . getFile ( "<STR_LIT>" ) ; opFile = par1MinecraftServer . getFile ( "<STR_LIT>" ) ; whitelistPlayersFile = par1MinecraftServer . getFile ( "<STR_LIT>" ) ; int i = par1MinecraftServer . propertyManagerObj . getIntProperty ( "<STR_LIT>" , <NUM_LIT:10> ) ; playerManagerObj [ <NUM_LIT:0> ] = new PlayerManager ( par1MinecraftServer , <NUM_LIT:0> , i ) ; playerManagerObj [ <NUM_LIT:1> ] = new PlayerManager ( par1MinecraftServer , - <NUM_LIT:1> , i ) ; playerManagerObj [ <NUM_LIT:2> ] = new PlayerManager ( par1MinecraftServer , <NUM_LIT:1> , i ) ; maxPlayers = par1MinecraftServer . propertyManagerObj . getIntProperty ( "<STR_LIT>" , <NUM_LIT:20> ) ; whiteListEnforced = par1MinecraftServer . propertyManagerObj . getBooleanProperty ( "<STR_LIT>" , false ) ; readBannedPlayers ( ) ; loadBannedList ( ) ; loadOps ( ) ; loadWhiteList ( ) ; writeBannedPlayers ( ) ; saveBannedList ( ) ; saveOps ( ) ; saveWhiteList ( ) ; } public void setPlayerManager ( WorldServer par1ArrayOfWorldServer [ ] ) { playerNBTManagerObj = par1ArrayOfWorldServer [ <NUM_LIT:0> ] . getSaveHandler ( ) . getPlayerNBTManager ( ) ; } public void joinNewPlayerManager ( EntityPlayerMP par1EntityPlayerMP ) { playerManagerObj [ <NUM_LIT:0> ] . removePlayer ( par1EntityPlayerMP ) ; playerManagerObj [ <NUM_LIT:1> ] . removePlayer ( par1EntityPlayerMP ) ; playerManagerObj [ <NUM_LIT:2> ] . removePlayer ( par1EntityPlayerMP ) ; getPlayerManager ( par1EntityPlayerMP . dimension ) . addPlayer ( par1EntityPlayerMP ) ; WorldServer worldserver = mcServer . getWorldManager ( par1EntityPlayerMP . dimension ) ; worldserver . chunkProviderServer . loadChunk ( ( int ) par1EntityPlayerMP . posX > > <NUM_LIT:4> , ( int ) par1EntityPlayerMP . posZ > > <NUM_LIT:4> ) ; } public int getMaxTrackingDistance ( ) { return playerManagerObj [ <NUM_LIT:0> ] . getMaxTrackingDistance ( ) ; } private PlayerManager getPlayerManager ( int par1 ) { if ( par1 == - <NUM_LIT:1> ) { return playerManagerObj [ <NUM_LIT:1> ] ; } if ( par1 == <NUM_LIT:0> ) { return playerManagerObj [ <NUM_LIT:0> ] ; } if ( par1 == <NUM_LIT:1> ) { return playerManagerObj [ <NUM_LIT:2> ] ; } else { return null ; } } public void readPlayerDataFromFile ( EntityPlayerMP par1EntityPlayerMP ) { playerNBTManagerObj . readPlayerData ( par1EntityPlayerMP ) ; } public void playerLoggedIn ( EntityPlayerMP par1EntityPlayerMP ) { sendPacketToAllPlayers ( new Packet201PlayerInfo ( par1EntityPlayerMP . username , true , <NUM_LIT:1000> ) ) ; playerEntities . add ( par1EntityPlayerMP ) ; WorldServer worldserver = mcServer . getWorldManager ( par1EntityPlayerMP . dimension ) ; worldserver . chunkProviderServer . loadChunk ( ( int ) par1EntityPlayerMP . posX > > <NUM_LIT:4> , ( int ) par1EntityPlayerMP . posZ > > <NUM_LIT:4> ) ; for ( ; worldserver . getCollidingBoundingBoxes ( par1EntityPlayerMP , par1EntityPlayerMP . boundingBox ) . size ( ) != <NUM_LIT:0> ; par1EntityPlayerMP . setPosition ( par1EntityPlayerMP . posX , par1EntityPlayerMP . posY + <NUM_LIT> , par1EntityPlayerMP . posZ ) ) { } worldserver . spawnEntityInWorld ( par1EntityPlayerMP ) ; getPlayerManager ( par1EntityPlayerMP . dimension ) . addPlayer ( par1EntityPlayerMP ) ; func_52018_u ( ) ; for ( int i = <NUM_LIT:0> ; i < playerEntities . size ( ) ; i ++ ) { EntityPlayerMP entityplayermp = ( EntityPlayerMP ) playerEntities . get ( i ) ; par1EntityPlayerMP . playerNetServerHandler . sendPacket ( new Packet201PlayerInfo ( entityplayermp . username , true , entityplayermp . ping ) ) ; } } public void serverUpdateMountedMovingPlayer ( EntityPlayerMP par1EntityPlayerMP ) { getPlayerManager ( par1EntityPlayerMP . dimension ) . updateMountedMovingPlayer ( par1EntityPlayerMP ) ; } public void playerLoggedOut ( EntityPlayerMP par1EntityPlayerMP ) { playerNBTManagerObj . writePlayerData ( par1EntityPlayerMP ) ; mcServer . getWorldManager ( par1EntityPlayerMP . dimension ) . setEntityDead ( par1EntityPlayerMP ) ; playerEntities . remove ( par1EntityPlayerMP ) ; getPlayerManager ( par1EntityPlayerMP . dimension ) . removePlayer ( par1EntityPlayerMP ) ; sendPacketToAllPlayers ( new Packet201PlayerInfo ( par1EntityPlayerMP . username , false , <NUM_LIT> ) ) ; } public EntityPlayerMP login ( NetLoginHandler par1NetLoginHandler , String par2Str ) { if ( bannedPlayers . contains ( par2Str . trim ( ) . toLowerCase ( ) ) ) { par1NetLoginHandler . kickUser ( "<STR_LIT>" ) ; return null ; } if ( ! isAllowedToLogin ( par2Str ) ) { par1NetLoginHandler . kickUser ( "<STR_LIT>" ) ; return null ; } String s = par1NetLoginHandler . netManager . getRemoteAddress ( ) . toString ( ) ; s = s . substring ( s . indexOf ( "<STR_LIT:/>" ) + <NUM_LIT:1> ) ; s = s . substring ( <NUM_LIT:0> , s . indexOf ( "<STR_LIT::>" ) ) ; if ( bannedIPs . contains ( s ) ) { par1NetLoginHandler . kickUser ( "<STR_LIT>" ) ; return null ; } if ( playerEntities . size ( ) >= maxPlayers ) { par1NetLoginHandler . kickUser ( "<STR_LIT>" ) ; return null ; } for ( int i = <NUM_LIT:0> ; i < playerEntities . size ( ) ; i ++ ) { EntityPlayerMP entityplayermp = ( EntityPlayerMP ) playerEntities . get ( i ) ; if ( entityplayermp . username . equalsIgnoreCase ( par2Str ) ) { entityplayermp . playerNetServerHandler . kickPlayer ( "<STR_LIT>" ) ; } } return new EntityPlayerMP ( mcServer , mcServer . getWorldManager ( <NUM_LIT:0> ) , par2Str , new ItemInWorldManager ( mcServer . getWorldManager ( <NUM_LIT:0> ) ) ) ; } public EntityPlayerMP recreatePlayerEntity ( EntityPlayerMP par1EntityPlayerMP , int par2 , boolean par3 ) { mcServer . getEntityTracker ( par1EntityPlayerMP . dimension ) . removeTrackedPlayerSymmetric ( par1EntityPlayerMP ) ; mcServer . getEntityTracker ( par1EntityPlayerMP . dimension ) . untrackEntity ( par1EntityPlayerMP ) ; getPlayerManager ( par1EntityPlayerMP . dimension ) . removePlayer ( par1EntityPlayerMP ) ; playerEntities . remove ( par1EntityPlayerMP ) ; mcServer . getWorldManager ( par1EntityPlayerMP . dimension ) . removePlayer ( par1EntityPlayerMP ) ; ChunkCoordinates chunkcoordinates = par1EntityPlayerMP . getSpawnChunk ( ) ; par1EntityPlayerMP . dimension = par2 ; EntityPlayerMP entityplayermp = new EntityPlayerMP ( mcServer , mcServer . getWorldManager ( par1EntityPlayerMP . dimension ) , par1EntityPlayerMP . username , new ItemInWorldManager ( mcServer . getWorldManager ( par1EntityPlayerMP . dimension ) ) ) ; if ( par3 ) { entityplayermp . copyPlayer ( par1EntityPlayerMP ) ; } entityplayermp . entityId = par1EntityPlayerMP . entityId ; entityplayermp . playerNetServerHandler = par1EntityPlayerMP . playerNetServerHandler ; WorldServer worldserver = mcServer . getWorldManager ( par1EntityPlayerMP . dimension ) ; entityplayermp . itemInWorldManager . toggleGameType ( par1EntityPlayerMP . itemInWorldManager . getGameType ( ) ) ; entityplayermp . itemInWorldManager . func_35695_b ( worldserver . getWorldInfo ( ) . getGameType ( ) ) ; if ( chunkcoordinates != null ) { ChunkCoordinates chunkcoordinates1 = EntityPlayer . verifyRespawnCoordinates ( mcServer . getWorldManager ( par1EntityPlayerMP . dimension ) , chunkcoordinates ) ; if ( chunkcoordinates1 != null ) { entityplayermp . setLocationAndAngles ( ( float ) chunkcoordinates1 . posX + <NUM_LIT> , ( float ) chunkcoordinates1 . posY + <NUM_LIT> , ( float ) chunkcoordinates1 . posZ + <NUM_LIT> , <NUM_LIT> , <NUM_LIT> ) ; entityplayermp . setSpawnChunk ( chunkcoordinates ) ; } else { entityplayermp . playerNetServerHandler . sendPacket ( new Packet70Bed ( <NUM_LIT:0> , <NUM_LIT:0> ) ) ; } } worldserver . chunkProviderServer . loadChunk ( ( int ) entityplayermp . posX > > <NUM_LIT:4> , ( int ) entityplayermp . posZ > > <NUM_LIT:4> ) ; for ( ; worldserver . getCollidingBoundingBoxes ( entityplayermp , entityplayermp . boundingBox ) . size ( ) != <NUM_LIT:0> ; entityplayermp . setPosition ( entityplayermp . posX , entityplayermp . posY + <NUM_LIT> , entityplayermp . posZ ) ) { } entityplayermp . playerNetServerHandler . sendPacket ( new Packet9Respawn ( entityplayermp . dimension , ( byte ) entityplayermp . worldObj . difficultySetting , entityplayermp . worldObj . getWorldInfo ( ) . getTerrainType ( ) , entityplayermp . worldObj . getHeight ( ) , entityplayermp . itemInWorldManager . getGameType ( ) ) ) ; entityplayermp . playerNetServerHandler . teleportTo ( entityplayermp . posX , entityplayermp . posY , entityplayermp . posZ , entityplayermp . rotationYaw , entityplayermp . rotationPitch ) ; func_28170_a ( entityplayermp , worldserver ) ; getPlayerManager ( entityplayermp . dimension ) . addPlayer ( entityplayermp ) ; worldserver . spawnEntityInWorld ( entityplayermp ) ; playerEntities . add ( entityplayermp ) ; entityplayermp . func_20057_k ( ) ; entityplayermp . func_22068_s ( ) ; return entityplayermp ; } public void sendPlayerToOtherDimension ( EntityPlayerMP par1EntityPlayerMP , int par2 ) { int i = par1EntityPlayerMP . dimension ; WorldServer worldserver = mcServer . getWorldManager ( par1EntityPlayerMP . dimension ) ; par1EntityPlayerMP . dimension = par2 ; WorldServer worldserver1 = mcServer . getWorldManager ( par1EntityPlayerMP . dimension ) ; par1EntityPlayerMP . playerNetServerHandler . sendPacket ( new Packet9Respawn ( par1EntityPlayerMP . dimension , ( byte ) par1EntityPlayerMP . worldObj . difficultySetting , worldserver1 . getWorldInfo ( ) . getTerrainType ( ) , worldserver1 . getHeight ( ) , par1EntityPlayerMP . itemInWorldManager . getGameType ( ) ) ) ; worldserver . removePlayer ( par1EntityPlayerMP ) ; par1EntityPlayerMP . isDead = false ; double d = par1EntityPlayerMP . posX ; double d1 = par1EntityPlayerMP . posZ ; double d2 = <NUM_LIT> ; if ( par1EntityPlayerMP . dimension == - <NUM_LIT:1> ) { d /= d2 ; d1 /= d2 ; par1EntityPlayerMP . setLocationAndAngles ( d , par1EntityPlayerMP . posY , d1 , par1EntityPlayerMP . rotationYaw , par1EntityPlayerMP . rotationPitch ) ; if ( par1EntityPlayerMP . isEntityAlive ( ) ) { worldserver . updateEntityWithOptionalForce ( par1EntityPlayerMP , false ) ; } } else if ( par1EntityPlayerMP . dimension == <NUM_LIT:0> ) { d *= d2 ; d1 *= d2 ; par1EntityPlayerMP . setLocationAndAngles ( d , par1EntityPlayerMP . posY , d1 , par1EntityPlayerMP . rotationYaw , par1EntityPlayerMP . rotationPitch ) ; if ( par1EntityPlayerMP . isEntityAlive ( ) ) { worldserver . updateEntityWithOptionalForce ( par1EntityPlayerMP , false ) ; } } else { ChunkCoordinates chunkcoordinates = worldserver1 . getEntrancePortalLocation ( ) ; d = chunkcoordinates . posX ; par1EntityPlayerMP . posY = chunkcoordinates . posY ; d1 = chunkcoordinates . posZ ; par1EntityPlayerMP . setLocationAndAngles ( d , par1EntityPlayerMP . posY , d1 , <NUM_LIT> , <NUM_LIT> ) ; if ( par1EntityPlayerMP . isEntityAlive ( ) ) { worldserver . updateEntityWithOptionalForce ( par1EntityPlayerMP , false ) ; } } if ( i != <NUM_LIT:1> && par1EntityPlayerMP . isEntityAlive ( ) ) { worldserver1 . spawnEntityInWorld ( par1EntityPlayerMP ) ; par1EntityPlayerMP . setLocationAndAngles ( d , par1EntityPlayerMP . posY , d1 , par1EntityPlayerMP . rotationYaw , par1EntityPlayerMP . rotationPitch ) ; worldserver1 . updateEntityWithOptionalForce ( par1EntityPlayerMP , false ) ; worldserver1 . chunkProviderServer . chunkLoadOverride = true ; ( new Teleporter ( ) ) . placeInPortal ( worldserver1 , par1EntityPlayerMP ) ; worldserver1 . chunkProviderServer . chunkLoadOverride = false ; } joinNewPlayerManager ( par1EntityPlayerMP ) ; par1EntityPlayerMP . playerNetServerHandler . teleportTo ( par1EntityPlayerMP . posX , par1EntityPlayerMP . posY , par1EntityPlayerMP . posZ , par1EntityPlayerMP . rotationYaw , par1EntityPlayerMP . rotationPitch ) ; par1EntityPlayerMP . setWorld ( worldserver1 ) ; par1EntityPlayerMP . itemInWorldManager . setWorld ( worldserver1 ) ; func_28170_a ( par1EntityPlayerMP , worldserver1 ) ; func_30008_g ( par1EntityPlayerMP ) ; } public void onTick ( ) { if ( ++ field_35482_p > <NUM_LIT> ) { field_35482_p = <NUM_LIT:0> ; } if ( field_35482_p < playerEntities . size ( ) ) { EntityPlayerMP entityplayermp = ( EntityPlayerMP ) playerEntities . get ( field_35482_p ) ; sendPacketToAllPlayers ( new Packet201PlayerInfo ( entityplayermp . username , true , entityplayermp . ping ) ) ; } for ( int i = <NUM_LIT:0> ; i < playerManagerObj . length ; i ++ ) { playerManagerObj [ i ] . updatePlayerInstances ( ) ; } } public void markBlockNeedsUpdate ( int par1 , int par2 , int par3 , int par4 ) { getPlayerManager ( par4 ) . markBlockNeedsUpdate ( par1 , par2 , par3 ) ; } public void sendPacketToAllPlayers ( Packet par1Packet ) { for ( int i = <NUM_LIT:0> ; i < playerEntities . size ( ) ; i ++ ) { EntityPlayerMP entityplayermp = ( EntityPlayerMP ) playerEntities . get ( i ) ; entityplayermp . playerNetServerHandler . sendPacket ( par1Packet ) ; } } public void sendPacketToAllPlayersInDimension ( Packet par1Packet , int par2 ) { for ( int i = <NUM_LIT:0> ; i < playerEntities . size ( ) ; i ++ ) { EntityPlayerMP entityplayermp = ( EntityPlayerMP ) playerEntities . get ( i ) ; if ( entityplayermp . dimension == par2 ) { entityplayermp . playerNetServerHandler . sendPacket ( par1Packet ) ; } } } public String getPlayerList ( ) { String s = "<STR_LIT>" ; for ( int i = <NUM_LIT:0> ; i < playerEntities . size ( ) ; i ++ ) { if ( i > <NUM_LIT:0> ) { s = ( new StringBuilder ( ) ) . append ( s ) . append ( "<STR_LIT:U+002CU+0020>" ) . toString ( ) ; } s = ( new StringBuilder ( ) ) . append ( s ) . append ( ( ( EntityPlayerMP ) playerEntities . get ( i ) ) . username ) . toString ( ) ; } return s ; } public String [ ] getPlayerNamesAsList ( ) { String as [ ] = new String [ playerEntities . size ( ) ] ; for ( int i = <NUM_LIT:0> ; i < playerEntities . size ( ) ; i ++ ) { as [ i ] = ( ( EntityPlayerMP ) playerEntities . get ( i ) ) . username ; } return as ; } public void banPlayer ( String par1Str ) { bannedPlayers . add ( par1Str . toLowerCase ( ) ) ; writeBannedPlayers ( ) ; } public void pardonPlayer ( String par1Str ) { bannedPlayers . remove ( par1Str . toLowerCase ( ) ) ; writeBannedPlayers ( ) ; } private void readBannedPlayers ( ) { try { bannedPlayers . clear ( ) ; BufferedReader bufferedreader = new BufferedReader ( new FileReader ( bannedPlayersFile ) ) ; for ( String s = "<STR_LIT>" ; ( s = bufferedreader . readLine ( ) ) != null ; ) { bannedPlayers . add ( s . trim ( ) . toLowerCase ( ) ) ; } bufferedreader . close ( ) ; } catch ( Exception exception ) { logger . warning ( ( new StringBuilder ( ) ) . append ( "<STR_LIT>" ) . append ( exception ) . toString ( ) ) ; } } private void writeBannedPlayers ( ) { try { PrintWriter printwriter = new PrintWriter ( new FileWriter ( bannedPlayersFile , false ) ) ; String s ; for ( Iterator iterator = bannedPlayers . iterator ( ) ; iterator . hasNext ( ) ; printwriter . println ( s ) ) { s = ( String ) iterator . next ( ) ; } printwriter . close ( ) ; } catch ( Exception exception ) { logger . warning ( ( new StringBuilder ( ) ) . append ( "<STR_LIT>" ) . append ( exception ) . toString ( ) ) ; } } public Set getBannedPlayersList ( ) { return bannedPlayers ; } public Set getBannedIPsList ( ) { return bannedIPs ; } public void banIP ( String par1Str ) { bannedIPs . add ( par1Str . toLowerCase ( ) ) ; saveBannedList ( ) ; } public void pardonIP ( String par1Str ) { bannedIPs . remove ( par1Str . toLowerCase ( ) ) ; saveBannedList ( ) ; } private void loadBannedList ( ) { try { bannedIPs . clear ( ) ; BufferedReader bufferedreader = new BufferedReader ( new FileReader ( ipBanFile ) ) ; for ( String s = "<STR_LIT>" ; ( s = bufferedreader . readLine ( ) ) != null ; ) { bannedIPs . add ( s . trim ( ) . toLowerCase ( ) ) ; } bufferedreader . close ( ) ; } catch ( Exception exception ) { logger . warning ( ( new StringBuilder ( ) ) . append ( "<STR_LIT>" ) . append ( exception ) . toString ( ) ) ; } } private void saveBannedList ( ) { try { PrintWriter printwriter = new PrintWriter ( new FileWriter ( ipBanFile , false ) ) ; String s ; for ( Iterator iterator = bannedIPs . iterator ( ) ; iterator . hasNext ( ) ; printwriter . println ( s ) ) { s = ( String ) iterator . next ( ) ; } printwriter . close ( ) ; } catch ( Exception exception ) { logger . warning ( ( new StringBuilder ( ) ) . append ( "<STR_LIT>" ) . append ( exception ) . toString ( ) ) ; } } public void addOp ( String par1Str ) { ops . add ( par1Str . toLowerCase ( ) ) ; saveOps ( ) ; } public void removeOp ( String par1Str ) { ops . remove ( par1Str . toLowerCase ( ) ) ; saveOps ( ) ; } private void loadOps ( ) { try { ops . clear ( ) ; BufferedReader bufferedreader = new BufferedReader ( new FileReader ( opFile ) ) ; for ( String s = "<STR_LIT>" ; ( s = bufferedreader . readLine ( ) ) != null ; ) { ops . add ( s . trim ( ) . toLowerCase ( ) ) ; } bufferedreader . close ( ) ; } catch ( Exception exception ) { logger . warning ( ( new StringBuilder ( ) ) . append ( "<STR_LIT>" ) . append ( exception ) . toString ( ) ) ; } } private void saveOps ( ) { try { PrintWriter printwriter = new PrintWriter ( new FileWriter ( opFile , false ) ) ; String s ; for ( Iterator iterator = ops . iterator ( ) ; iterator . hasNext ( ) ; printwriter . println ( s ) ) { s = ( String ) iterator . next ( ) ; } printwriter . close ( ) ; } catch ( Exception exception ) { logger . warning ( ( new StringBuilder ( ) ) . append ( "<STR_LIT>" ) . append ( exception ) . toString ( ) ) ; } } private void loadWhiteList ( ) { try { whiteListedIPs . clear ( ) ; BufferedReader bufferedreader = new BufferedReader ( new FileReader ( whitelistPlayersFile ) ) ; for ( String s = "<STR_LIT>" ; ( s = bufferedreader . readLine ( ) ) != null ; ) { whiteListedIPs . add ( s . trim ( ) . toLowerCase ( ) ) ; } bufferedreader . close ( ) ; } catch ( Exception exception ) { logger . warning ( ( new StringBuilder ( ) ) . append ( "<STR_LIT>" ) . append ( exception ) . toString ( ) ) ; } } private void saveWhiteList ( ) { try { PrintWriter printwriter = new PrintWriter ( new FileWriter ( whitelistPlayersFile , false ) ) ; String s ; for ( Iterator iterator = whiteListedIPs . iterator ( ) ; iterator . hasNext ( ) ; printwriter . println ( s ) ) { s = ( String ) iterator . next ( ) ; } printwriter . close ( ) ; } catch ( Exception exception ) { logger . warning ( ( new StringBuilder ( ) ) . append ( "<STR_LIT>" ) . append ( exception ) . toString ( ) ) ; } } public boolean isAllowedToLogin ( String par1Str ) { par1Str = par1Str . trim ( ) . toLowerCase ( ) ; return ! whiteListEnforced || ops . contains ( par1Str ) || whiteListedIPs . contains ( par1Str ) ; } public boolean isOp ( String par1Str ) { return ops . contains ( par1Str . trim ( ) . toLowerCase ( ) ) ; } public EntityPlayerMP getPlayerEntity ( String par1Str ) { for ( int i = <NUM_LIT:0> ; i < playerEntities . size ( ) ; i ++ ) { EntityPlayerMP entityplayermp = ( EntityPlayerMP ) playerEntities . get ( i ) ; if ( entityplayermp . username . equalsIgnoreCase ( par1Str ) ) { return entityplayermp ; } } return null ; } public void sendChatMessageToPlayer ( String par1Str , String par2Str ) { EntityPlayerMP entityplayermp = getPlayerEntity ( par1Str ) ; if ( entityplayermp != null ) { entityplayermp . playerNetServerHandler . sendPacket ( new Packet3Chat ( par2Str ) ) ; } } public void sendPacketToPlayersAroundPoint ( double par1 , double par3 , double par5 , double par7 , int par9 , Packet par10Packet ) { func_28171_a ( null , par1 , par3 , par5 , par7 , par9 , par10Packet ) ; } public void func_28171_a ( EntityPlayer par1EntityPlayer , double par2 , double par4 , double par6 , double par8 , int par10 , Packet par11Packet ) { for ( int i = <NUM_LIT:0> ; i < playerEntities . size ( ) ; i ++ ) { EntityPlayerMP entityplayermp = ( EntityPlayerMP ) playerEntities . get ( i ) ; if ( entityplayermp == par1EntityPlayer || entityplayermp . dimension != par10 ) { continue ; } double d = par2 - entityplayermp . posX ; double d1 = par4 - entityplayermp . posY ; double d2 = par6 - entityplayermp . posZ ; if ( d * d + d1 * d1 + d2 * d2 < par8 * par8 ) { entityplayermp . playerNetServerHandler . sendPacket ( par11Packet ) ; } } } public void sendChatMessageToAllOps ( String par1Str ) { Packet3Chat packet3chat = new Packet3Chat ( par1Str ) ; for ( int i = <NUM_LIT:0> ; i < playerEntities . size ( ) ; i ++ ) { EntityPlayerMP entityplayermp = ( EntityPlayerMP ) playerEntities . get ( i ) ; if ( isOp ( entityplayermp . username ) ) { entityplayermp . playerNetServerHandler . sendPacket ( packet3chat ) ; } } } public boolean sendPacketToPlayer ( String par1Str , Packet par2Packet ) { EntityPlayerMP entityplayermp = getPlayerEntity ( par1Str ) ; if ( entityplayermp != null ) { entityplayermp . playerNetServerHandler . sendPacket ( par2Packet ) ; return true ; } else { return false ; } } public void savePlayerStates ( ) { for ( int i = <NUM_LIT:0> ; i < playerEntities . size ( ) ; i ++ ) { playerNBTManagerObj . writePlayerData ( ( EntityPlayer ) playerEntities . get ( i ) ) ; } } public void sentTileEntityToPlayer ( int i , int j , int k , TileEntity tileentity ) { } public void addToWhiteList ( String par1Str ) { whiteListedIPs . add ( par1Str ) ; saveWhiteList ( ) ; } public void removeFromWhiteList ( String par1Str ) { whiteListedIPs . remove ( par1Str ) ; saveWhiteList ( ) ; } public Set getWhiteListedIPs ( ) { return whiteListedIPs ; } public void reloadWhiteList ( ) { loadWhiteList ( ) ; } public void func_28170_a ( EntityPlayerMP par1EntityPlayerMP , WorldServer par2WorldServer ) { par1EntityPlayerMP . playerNetServerHandler . sendPacket ( new Packet4UpdateTime ( par2WorldServer . getWorldTime ( ) ) ) ; if ( par2WorldServer . isRaining ( ) ) { par1EntityPlayerMP . playerNetServerHandler . sendPacket ( new Packet70Bed ( <NUM_LIT:1> , <NUM_LIT:0> ) ) ; } } public void func_30008_g ( EntityPlayerMP par1EntityPlayerMP ) { par1EntityPlayerMP . func_28017_a ( par1EntityPlayerMP . inventorySlots ) ; par1EntityPlayerMP . func_30001_B ( ) ; } public int playersOnline ( ) { return playerEntities . size ( ) ; } public int getMaxPlayers ( ) { return maxPlayers ; } public String [ ] func_52019_t ( ) { return mcServer . worldMngr [ <NUM_LIT:0> ] . getSaveHandler ( ) . getPlayerNBTManager ( ) . func_52007_g ( ) ; } private void func_52018_u ( ) { PlayerUsageSnooper playerusagesnooper = new PlayerUsageSnooper ( "<STR_LIT>" ) ; playerusagesnooper . func_52014_a ( "<STR_LIT:version>" , mcServer . getVersionString ( ) ) ; playerusagesnooper . func_52014_a ( "<STR_LIT>" , System . getProperty ( "<STR_LIT>" ) ) ; playerusagesnooper . func_52014_a ( "<STR_LIT>" , System . getProperty ( "<STR_LIT>" ) ) ; playerusagesnooper . func_52014_a ( "<STR_LIT>" , System . getProperty ( "<STR_LIT>" ) ) ; playerusagesnooper . func_52014_a ( "<STR_LIT>" , Long . valueOf ( Runtime . getRuntime ( ) . totalMemory ( ) ) ) ; playerusagesnooper . func_52014_a ( "<STR_LIT>" , Long . valueOf ( Runtime . getRuntime ( ) . maxMemory ( ) ) ) ; playerusagesnooper . func_52014_a ( "<STR_LIT>" , Long . valueOf ( Runtime . getRuntime ( ) . freeMemory ( ) ) ) ; playerusagesnooper . func_52014_a ( "<STR_LIT>" , System . getProperty ( "<STR_LIT>" ) ) ; playerusagesnooper . func_52014_a ( "<STR_LIT>" , Integer . valueOf ( Runtime . getRuntime ( ) . availableProcessors ( ) ) ) ; playerusagesnooper . func_52014_a ( "<STR_LIT>" , Integer . valueOf ( playersOnline ( ) ) ) ; playerusagesnooper . func_52014_a ( "<STR_LIT>" , Integer . valueOf ( getMaxPlayers ( ) ) ) ; playerusagesnooper . func_52014_a ( "<STR_LIT>" , Integer . valueOf ( func_52019_t ( ) . length ) ) ; playerusagesnooper . func_52014_a ( "<STR_LIT>" , Boolean . valueOf ( mcServer . onlineMode ) ) ; playerusagesnooper . func_52014_a ( "<STR_LIT>" , mcServer . func_52003_getServerModName ( ) ) ; playerusagesnooper . func_52012_a ( ) ; } } </s>
<s> package net . minecraft . src ; import java . util . List ; public class BiomeGenBeach extends BiomeGenBase { public BiomeGenBeach ( int par1 ) { super ( par1 ) ; spawnableCreatureList . clear ( ) ; topBlock = ( byte ) Block . sand . blockID ; fillerBlock = ( byte ) Block . sand . blockID ; biomeDecorator . treesPerChunk = - <NUM_LIT> ; biomeDecorator . deadBushPerChunk = <NUM_LIT:0> ; biomeDecorator . reedsPerChunk = <NUM_LIT:0> ; biomeDecorator . cactiPerChunk = <NUM_LIT:0> ; } } </s>
<s> package net . minecraft . src ; public class RecipesFood { public RecipesFood ( ) { } public void addRecipes ( CraftingManager par1CraftingManager ) { par1CraftingManager . addShapelessRecipe ( new ItemStack ( Item . bowlSoup ) , new Object [ ] { Block . mushroomBrown , Block . mushroomRed , Item . bowlEmpty } ) ; par1CraftingManager . addRecipe ( new ItemStack ( Item . cookie , <NUM_LIT:8> ) , new Object [ ] { "<STR_LIT>" , '<CHAR_LIT>' , new ItemStack ( Item . dyePowder , <NUM_LIT:1> , <NUM_LIT:3> ) , '<CHAR_LIT>' , Item . wheat } ) ; par1CraftingManager . addRecipe ( new ItemStack ( Block . melon ) , new Object [ ] { "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , '<CHAR_LIT>' , Item . melon } ) ; par1CraftingManager . addRecipe ( new ItemStack ( Item . melonSeeds ) , new Object [ ] { "<STR_LIT:M>" , '<CHAR_LIT>' , Item . melon } ) ; par1CraftingManager . addRecipe ( new ItemStack ( Item . pumpkinSeeds , <NUM_LIT:4> ) , new Object [ ] { "<STR_LIT:M>" , '<CHAR_LIT>' , Block . pumpkin } ) ; par1CraftingManager . addShapelessRecipe ( new ItemStack ( Item . fermentedSpiderEye ) , new Object [ ] { Item . spiderEye , Block . mushroomBrown , Item . sugar } ) ; par1CraftingManager . addShapelessRecipe ( new ItemStack ( Item . speckledMelon ) , new Object [ ] { Item . melon , Item . goldNugget } ) ; par1CraftingManager . addShapelessRecipe ( new ItemStack ( Item . blazePowder , <NUM_LIT:2> ) , new Object [ ] { Item . blazeRod } ) ; par1CraftingManager . addShapelessRecipe ( new ItemStack ( Item . magmaCream ) , new Object [ ] { Item . blazePowder , Item . slimeBall } ) ; } } </s>
<s> package net . minecraft . src ; public class ItemSaddle extends Item { public ItemSaddle ( int par1 ) { super ( par1 ) ; maxStackSize = <NUM_LIT:1> ; } public void useItemOnEntity ( ItemStack par1ItemStack , EntityLiving par2EntityLiving ) { if ( par2EntityLiving instanceof EntityPig ) { EntityPig entitypig = ( EntityPig ) par2EntityLiving ; if ( ! entitypig . getSaddled ( ) && ! entitypig . isChild ( ) ) { entitypig . setSaddled ( true ) ; par1ItemStack . stackSize -- ; } } } public boolean hitEntity ( ItemStack par1ItemStack , EntityLiving par2EntityLiving , EntityLiving par3EntityLiving ) { useItemOnEntity ( par1ItemStack , par2EntityLiving ) ; return true ; } } </s>
<s> package net . minecraft . src ; public class InventoryCrafting implements IInventory { private ItemStack stackList [ ] ; private int inventoryWidth ; private Container eventHandler ; public InventoryCrafting ( Container par1Container , int par2 , int par3 ) { int i = par2 * par3 ; stackList = new ItemStack [ i ] ; eventHandler = par1Container ; inventoryWidth = par2 ; } public int getSizeInventory ( ) { return stackList . length ; } public ItemStack getStackInSlot ( int par1 ) { if ( par1 >= getSizeInventory ( ) ) { return null ; } else { return stackList [ par1 ] ; } } public ItemStack getStackInRowAndColumn ( int par1 , int par2 ) { if ( par1 < <NUM_LIT:0> || par1 >= inventoryWidth ) { return null ; } else { int i = par1 + par2 * inventoryWidth ; return getStackInSlot ( i ) ; } } public String getInvName ( ) { return "<STR_LIT>" ; } public ItemStack getStackInSlotOnClosing ( int par1 ) { if ( stackList [ par1 ] != null ) { ItemStack itemstack = stackList [ par1 ] ; stackList [ par1 ] = null ; return itemstack ; } else { return null ; } } public ItemStack decrStackSize ( int par1 , int par2 ) { if ( stackList [ par1 ] != null ) { if ( stackList [ par1 ] . stackSize <= par2 ) { ItemStack itemstack = stackList [ par1 ] ; stackList [ par1 ] = null ; eventHandler . onCraftMatrixChanged ( this ) ; return itemstack ; } ItemStack itemstack1 = stackList [ par1 ] . splitStack ( par2 ) ; if ( stackList [ par1 ] . stackSize == <NUM_LIT:0> ) { stackList [ par1 ] = null ; } eventHandler . onCraftMatrixChanged ( this ) ; return itemstack1 ; } else { return null ; } } public void setInventorySlotContents ( int par1 , ItemStack par2ItemStack ) { stackList [ par1 ] = par2ItemStack ; eventHandler . onCraftMatrixChanged ( this ) ; } public int getInventoryStackLimit ( ) { return <NUM_LIT> ; } public void onInventoryChanged ( ) { } public boolean isUseableByPlayer ( EntityPlayer par1EntityPlayer ) { return true ; } public void openChest ( ) { } public void closeChest ( ) { } } </s>
<s> package net . minecraft . src ; import java . io . * ; public class Packet38EntityStatus extends Packet { public int entityId ; public byte entityStatus ; public Packet38EntityStatus ( ) { } public Packet38EntityStatus ( int par1 , byte par2 ) { entityId = par1 ; entityStatus = par2 ; } public void readPacketData ( DataInputStream par1DataInputStream ) throws IOException { entityId = par1DataInputStream . readInt ( ) ; entityStatus = par1DataInputStream . readByte ( ) ; } public void writePacketData ( DataOutputStream par1DataOutputStream ) throws IOException { par1DataOutputStream . writeInt ( entityId ) ; par1DataOutputStream . writeByte ( entityStatus ) ; } public void processPacket ( NetHandler par1NetHandler ) { par1NetHandler . handleEntityStatus ( this ) ; } public int getPacketSize ( ) { return <NUM_LIT:5> ; } } </s>
<s> package net . minecraft . src ; public class BlockLilyPad extends BlockFlower { protected BlockLilyPad ( int par1 , int par2 ) { super ( par1 , par2 ) ; float f = <NUM_LIT> ; float f1 = <NUM_LIT> ; setBlockBounds ( <NUM_LIT> - f , <NUM_LIT> , <NUM_LIT> - f , <NUM_LIT> + f , f1 , <NUM_LIT> + f ) ; } public int getRenderType ( ) { return <NUM_LIT> ; } public AxisAlignedBB getCollisionBoundingBoxFromPool ( World par1World , int par2 , int par3 , int par4 ) { return AxisAlignedBB . getBoundingBoxFromPool ( ( double ) par2 + minX , ( double ) par3 + minY , ( double ) par4 + minZ , ( double ) par2 + maxX , ( double ) par3 + maxY , ( double ) par4 + maxZ ) ; } public boolean canPlaceBlockAt ( World par1World , int par2 , int par3 , int par4 ) { return super . canPlaceBlockAt ( par1World , par2 , par3 , par4 ) ; } protected boolean canThisPlantGrowOnThisBlockID ( int par1 ) { return par1 == Block . waterStill . blockID ; } public boolean canBlockStay ( World par1World , int par2 , int par3 , int par4 ) { if ( par3 < <NUM_LIT:0> || par3 >= <NUM_LIT> ) { return false ; } else { return par1World . getBlockMaterial ( par2 , par3 - <NUM_LIT:1> , par4 ) == Material . water && par1World . getBlockMetadata ( par2 , par3 - <NUM_LIT:1> , par4 ) == <NUM_LIT:0> ; } } } </s>
<s> package net . minecraft . src ; import java . util . Random ; public class BlockLog extends Block { protected BlockLog ( int par1 ) { super ( par1 , Material . wood ) ; blockIndexInTexture = <NUM_LIT:20> ; } public int quantityDropped ( Random par1Random ) { return <NUM_LIT:1> ; } public int idDropped ( int par1 , Random par2Random , int par3 ) { return Block . wood . blockID ; } public void harvestBlock ( World par1World , EntityPlayer par2EntityPlayer , int par3 , int par4 , int par5 , int par6 ) { super . harvestBlock ( par1World , par2EntityPlayer , par3 , par4 , par5 , par6 ) ; } public void onBlockRemoval ( World par1World , int par2 , int par3 , int par4 ) { byte byte0 = <NUM_LIT:4> ; int i = byte0 + <NUM_LIT:1> ; if ( par1World . checkChunksExist ( par2 - i , par3 - i , par4 - i , par2 + i , par3 + i , par4 + i ) ) { for ( int j = - byte0 ; j <= byte0 ; j ++ ) { for ( int k = - byte0 ; k <= byte0 ; k ++ ) { for ( int l = - byte0 ; l <= byte0 ; l ++ ) { int i1 = par1World . getBlockId ( par2 + j , par3 + k , par4 + l ) ; if ( i1 != Block . leaves . blockID ) { continue ; } int j1 = par1World . getBlockMetadata ( par2 + j , par3 + k , par4 + l ) ; if ( ( j1 & <NUM_LIT:8> ) == <NUM_LIT:0> ) { par1World . setBlockMetadata ( par2 + j , par3 + k , par4 + l , j1 | <NUM_LIT:8> ) ; } } } } } } public int getBlockTextureFromSideAndMetadata ( int par1 , int par2 ) { if ( par1 == <NUM_LIT:1> ) { return <NUM_LIT> ; } if ( par1 == <NUM_LIT:0> ) { return <NUM_LIT> ; } if ( par2 == <NUM_LIT:1> ) { return <NUM_LIT> ; } if ( par2 == <NUM_LIT:2> ) { return <NUM_LIT> ; } return par2 != <NUM_LIT:3> ? <NUM_LIT:20> : <NUM_LIT> ; } protected int damageDropped ( int par1 ) { return par1 ; } } </s>
<s> package net . minecraft . src ; public class EntityAIWatchClosest2 extends EntityAIWatchClosest { public EntityAIWatchClosest2 ( EntityLiving par1EntityLiving , Class par2Class , float par3 ) { super ( par1EntityLiving , par2Class , par3 ) ; setMutexBits ( <NUM_LIT:3> ) ; } public EntityAIWatchClosest2 ( EntityLiving par1EntityLiving , Class par2Class , float par3 , float par4 ) { super ( par1EntityLiving , par2Class , par3 , par4 ) ; setMutexBits ( <NUM_LIT:3> ) ; } } </s>
<s> package net . minecraft . src ; import java . util . Random ; public class WorldGenVines extends WorldGenerator { public WorldGenVines ( ) { } public boolean generate ( World par1World , Random par2Random , int par3 , int par4 , int par5 ) { int i = par3 ; int j = par5 ; label0 : for ( ; par4 < <NUM_LIT> ; par4 ++ ) { if ( par1World . isAirBlock ( par3 , par4 , par5 ) ) { int k = <NUM_LIT:2> ; do { if ( k > <NUM_LIT:5> ) { continue label0 ; } if ( Block . vine . canPlaceBlockOnSide ( par1World , par3 , par4 , par5 , k ) ) { par1World . setBlockAndMetadata ( par3 , par4 , par5 , Block . vine . blockID , <NUM_LIT:1> << Direction . vineGrowth [ Facing . faceToSide [ k ] ] ) ; continue label0 ; } k ++ ; } while ( true ) ; } par3 = ( i + par2Random . nextInt ( <NUM_LIT:4> ) ) - par2Random . nextInt ( <NUM_LIT:4> ) ; par5 = ( j + par2Random . nextInt ( <NUM_LIT:4> ) ) - par2Random . nextInt ( <NUM_LIT:4> ) ; } return true ; } } </s>
<s> package net . minecraft . src ; public class EntityEggInfo { public int spawnedID ; public int primaryColor ; public int secondaryColor ; public EntityEggInfo ( int par1 , int par2 , int par3 ) { spawnedID = par1 ; primaryColor = par2 ; secondaryColor = par3 ; } } </s>
<s> package net . minecraft . src ; import java . util . * ; public abstract class StructureStart { protected LinkedList components ; protected StructureBoundingBox boundingBox ; protected StructureStart ( ) { components = new LinkedList ( ) ; } public StructureBoundingBox getBoundingBox ( ) { return boundingBox ; } public LinkedList getComponents ( ) { return components ; } public void generateStructure ( World par1World , Random par2Random , StructureBoundingBox par3StructureBoundingBox ) { Iterator iterator = components . iterator ( ) ; do { if ( ! iterator . hasNext ( ) ) { break ; } StructureComponent structurecomponent = ( StructureComponent ) iterator . next ( ) ; if ( structurecomponent . getBoundingBox ( ) . intersectsWith ( par3StructureBoundingBox ) && ! structurecomponent . addComponentParts ( par1World , par2Random , par3StructureBoundingBox ) ) { iterator . remove ( ) ; } } while ( true ) ; } protected void updateBoundingBox ( ) { boundingBox = StructureBoundingBox . getNewBoundingBox ( ) ; StructureComponent structurecomponent ; for ( Iterator iterator = components . iterator ( ) ; iterator . hasNext ( ) ; boundingBox . expandTo ( structurecomponent . getBoundingBox ( ) ) ) { structurecomponent = ( StructureComponent ) iterator . next ( ) ; } } protected void markAvailableHeight ( World par1World , Random par2Random , int par3 ) { int i = <NUM_LIT> - par3 ; int j = boundingBox . getYSize ( ) + <NUM_LIT:1> ; if ( j < i ) { j += par2Random . nextInt ( i - j ) ; } int k = j - boundingBox . maxY ; boundingBox . offset ( <NUM_LIT:0> , k , <NUM_LIT:0> ) ; StructureComponent structurecomponent ; for ( Iterator iterator = components . iterator ( ) ; iterator . hasNext ( ) ; structurecomponent . getBoundingBox ( ) . offset ( <NUM_LIT:0> , k , <NUM_LIT:0> ) ) { structurecomponent = ( StructureComponent ) iterator . next ( ) ; } } protected void setRandomHeight ( World par1World , Random par2Random , int par3 , int par4 ) { int i = ( ( par4 - par3 ) + <NUM_LIT:1> ) - boundingBox . getYSize ( ) ; int j = <NUM_LIT:1> ; if ( i > <NUM_LIT:1> ) { j = par3 + par2Random . nextInt ( i ) ; } else { j = par3 ; } int k = j - boundingBox . minY ; boundingBox . offset ( <NUM_LIT:0> , k , <NUM_LIT:0> ) ; StructureComponent structurecomponent ; for ( Iterator iterator = components . iterator ( ) ; iterator . hasNext ( ) ; structurecomponent . getBoundingBox ( ) . offset ( <NUM_LIT:0> , k , <NUM_LIT:0> ) ) { structurecomponent = ( StructureComponent ) iterator . next ( ) ; } } public boolean isSizeableStructure ( ) { return true ; } } </s>
<s> package net . minecraft . src ; import java . util . Random ; public class EntityAIMoveIndoors extends EntityAIBase { private EntityCreature entityObj ; private VillageDoorInfo doorInfo ; private int insidePosX ; private int insidePosZ ; public EntityAIMoveIndoors ( EntityCreature par1EntityCreature ) { insidePosX = - <NUM_LIT:1> ; insidePosZ = - <NUM_LIT:1> ; entityObj = par1EntityCreature ; setMutexBits ( <NUM_LIT:1> ) ; } public boolean shouldExecute ( ) { if ( entityObj . worldObj . isDaytime ( ) && ! entityObj . worldObj . isRaining ( ) || entityObj . worldObj . worldProvider . hasNoSky ) { return false ; } if ( entityObj . getRNG ( ) . nextInt ( <NUM_LIT> ) != <NUM_LIT:0> ) { return false ; } if ( insidePosX != - <NUM_LIT:1> && entityObj . getDistanceSq ( insidePosX , entityObj . posY , insidePosZ ) < <NUM_LIT> ) { 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> ) ; if ( village == null ) { return false ; } else { doorInfo = village . findNearestDoorUnrestricted ( MathHelper . floor_double ( entityObj . posX ) , MathHelper . floor_double ( entityObj . posY ) , MathHelper . floor_double ( entityObj . posZ ) ) ; return doorInfo != null ; } } public boolean continueExecuting ( ) { return ! entityObj . getNavigator ( ) . noPath ( ) ; } public void startExecuting ( ) { insidePosX = - <NUM_LIT:1> ; if ( entityObj . getDistanceSq ( doorInfo . getInsidePosX ( ) , doorInfo . posY , doorInfo . getInsidePosZ ( ) ) > <NUM_LIT> ) { Vec3D vec3d = RandomPositionGenerator . func_48395_a ( entityObj , <NUM_LIT> , <NUM_LIT:3> , Vec3D . createVector ( ( double ) doorInfo . getInsidePosX ( ) + <NUM_LIT> , doorInfo . getInsidePosY ( ) , ( double ) doorInfo . getInsidePosZ ( ) + <NUM_LIT> ) ) ; if ( vec3d != null ) { entityObj . getNavigator ( ) . func_48658_a ( vec3d . xCoord , vec3d . yCoord , vec3d . zCoord , <NUM_LIT> ) ; } } else { entityObj . getNavigator ( ) . func_48658_a ( ( double ) doorInfo . getInsidePosX ( ) + <NUM_LIT> , doorInfo . getInsidePosY ( ) , ( double ) doorInfo . getInsidePosZ ( ) + <NUM_LIT> , <NUM_LIT> ) ; } } public void resetTask ( ) { insidePosX = doorInfo . getInsidePosX ( ) ; insidePosZ = doorInfo . getInsidePosZ ( ) ; doorInfo = null ; } } </s>
<s> package net . minecraft . src ; import net . minecraft . server . MinecraftServer ; public final class ThreadServerApplication extends Thread { final MinecraftServer mcServer ; public ThreadServerApplication ( String par1Str , MinecraftServer par2MinecraftServer ) { super ( par1Str ) ; mcServer = par2MinecraftServer ; } public void run ( ) { mcServer . run ( ) ; } } </s>
<s> package net . minecraft . src ; public class EntityDragonBase extends EntityLiving { protected int maxHealth ; public EntityDragonBase ( World par1World ) { super ( par1World ) ; maxHealth = <NUM_LIT:100> ; } public int getMaxHealth ( ) { return maxHealth ; } public boolean attackEntityFromPart ( EntityDragonPart par1EntityDragonPart , DamageSource par2DamageSource , int par3 ) { return attackEntityFrom ( par2DamageSource , par3 ) ; } public boolean attackEntityFrom ( DamageSource par1DamageSource , int par2 ) { return false ; } protected boolean superAttackFrom ( DamageSource par1DamageSource , int par2 ) { return super . attackEntityFrom ( par1DamageSource , par2 ) ; } } </s>
<s> package net . minecraft . src ; import java . util . Random ; public class WorldGenSwamp extends WorldGenerator { public WorldGenSwamp ( ) { } public boolean generate ( World par1World , Random par2Random , int par3 , int par4 , int par5 ) { int i = par2Random . nextInt ( <NUM_LIT:4> ) + <NUM_LIT:5> ; for ( ; par1World . getBlockMaterial ( par3 , par4 - <NUM_LIT:1> , par5 ) == Material . water ; par4 -- ) { } 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:3> ; } for ( int k1 = par3 - byte0 ; k1 <= par3 + byte0 && flag ; k1 ++ ) { for ( int k2 = par5 - byte0 ; k2 <= par5 + byte0 && flag ; k2 ++ ) { if ( j >= <NUM_LIT:0> && j < <NUM_LIT> ) { int j3 = par1World . getBlockId ( k1 , j , k2 ) ; if ( j3 == <NUM_LIT:0> || j3 == Block . leaves . blockID ) { continue ; } if ( j3 == Block . waterStill . blockID || j3 == Block . waterMoving . blockID ) { if ( j > par4 ) { flag = false ; } } else { flag = false ; } } else { flag = false ; } } } } if ( ! flag ) { return false ; } int k = par1World . getBlockId ( par3 , par4 - <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 l1 = l - ( par4 + i ) ; int l2 = <NUM_LIT:2> - l1 / <NUM_LIT:2> ; for ( int k3 = par3 - l2 ; k3 <= par3 + l2 ; k3 ++ ) { int i4 = k3 - par3 ; for ( int k4 = par5 - l2 ; k4 <= par5 + l2 ; k4 ++ ) { int l4 = k4 - par5 ; if ( ( Math . abs ( i4 ) != l2 || Math . abs ( l4 ) != l2 || par2Random . nextInt ( <NUM_LIT:2> ) != <NUM_LIT:0> && l1 != <NUM_LIT:0> ) && ! Block . opaqueCubeLookup [ par1World . getBlockId ( k3 , l , k4 ) ] ) { func_50023_a ( par1World , k3 , l , k4 , Block . leaves . blockID ) ; } } } } for ( int i1 = <NUM_LIT:0> ; i1 < i ; i1 ++ ) { int i2 = par1World . getBlockId ( par3 , par4 + i1 , par5 ) ; if ( i2 == <NUM_LIT:0> || i2 == Block . leaves . blockID || i2 == Block . waterMoving . blockID || i2 == Block . waterStill . blockID ) { func_50023_a ( par1World , par3 , par4 + i1 , par5 , Block . wood . blockID ) ; } } for ( int j1 = ( par4 - <NUM_LIT:3> ) + i ; j1 <= par4 + i ; j1 ++ ) { int j2 = j1 - ( par4 + i ) ; int i3 = <NUM_LIT:2> - j2 / <NUM_LIT:2> ; for ( int l3 = par3 - i3 ; l3 <= par3 + i3 ; l3 ++ ) { for ( int j4 = par5 - i3 ; j4 <= par5 + i3 ; j4 ++ ) { if ( par1World . getBlockId ( l3 , j1 , j4 ) != Block . leaves . blockID ) { continue ; } if ( par2Random . nextInt ( <NUM_LIT:4> ) == <NUM_LIT:0> && par1World . getBlockId ( l3 - <NUM_LIT:1> , j1 , j4 ) == <NUM_LIT:0> ) { generateVines ( par1World , l3 - <NUM_LIT:1> , j1 , j4 , <NUM_LIT:8> ) ; } if ( par2Random . nextInt ( <NUM_LIT:4> ) == <NUM_LIT:0> && par1World . getBlockId ( l3 + <NUM_LIT:1> , j1 , j4 ) == <NUM_LIT:0> ) { generateVines ( par1World , l3 + <NUM_LIT:1> , j1 , j4 , <NUM_LIT:2> ) ; } if ( par2Random . nextInt ( <NUM_LIT:4> ) == <NUM_LIT:0> && par1World . getBlockId ( l3 , j1 , j4 - <NUM_LIT:1> ) == <NUM_LIT:0> ) { generateVines ( par1World , l3 , j1 , j4 - <NUM_LIT:1> , <NUM_LIT:1> ) ; } if ( par2Random . nextInt ( <NUM_LIT:4> ) == <NUM_LIT:0> && par1World . getBlockId ( l3 , j1 , j4 + <NUM_LIT:1> ) == <NUM_LIT:0> ) { generateVines ( par1World , l3 , j1 , j4 + <NUM_LIT:1> , <NUM_LIT:4> ) ; } } } } return true ; } private void generateVines ( World par1World , int par2 , int par3 , int par4 , int par5 ) { setBlockAndMetadata ( par1World , par2 , par3 , par4 , Block . vine . blockID , par5 ) ; for ( int i = <NUM_LIT:4> ; par1World . getBlockId ( par2 , -- par3 , par4 ) == <NUM_LIT:0> && i > <NUM_LIT:0> ; i -- ) { setBlockAndMetadata ( par1World , par2 , par3 , par4 , Block . vine . blockID , par5 ) ; } } } </s>
<s> package net . minecraft . src ; import java . io . * ; public class Packet0KeepAlive extends Packet { public int randomId ; public Packet0KeepAlive ( ) { } public Packet0KeepAlive ( int par1 ) { randomId = par1 ; } public void processPacket ( NetHandler par1NetHandler ) { par1NetHandler . handleKeepAlive ( this ) ; } public void readPacketData ( DataInputStream par1DataInputStream ) throws IOException { randomId = par1DataInputStream . readInt ( ) ; } public void writePacketData ( DataOutputStream par1DataOutputStream ) throws IOException { par1DataOutputStream . writeInt ( randomId ) ; } public int getPacketSize ( ) { return <NUM_LIT:4> ; } } </s>
<s> package net . minecraft . src ; import java . util . Random ; public abstract class EntityAITarget extends EntityAIBase { protected EntityLiving taskOwner ; protected float field_48288_d ; protected boolean field_48289_e ; private boolean field_48292_a ; private int field_48290_b ; private int field_48286_f ; private int field_48287_g ; public EntityAITarget ( EntityLiving par1EntityLiving , float par2 , boolean par3 ) { this ( par1EntityLiving , par2 , par3 , false ) ; } public EntityAITarget ( EntityLiving par1EntityLiving , float par2 , boolean par3 , boolean par4 ) { field_48290_b = <NUM_LIT:0> ; field_48286_f = <NUM_LIT:0> ; field_48287_g = <NUM_LIT:0> ; taskOwner = par1EntityLiving ; field_48288_d = par2 ; field_48289_e = par3 ; field_48292_a = par4 ; } public boolean continueExecuting ( ) { EntityLiving entityliving = taskOwner . getAttackTarget ( ) ; if ( entityliving == null ) { return false ; } if ( ! entityliving . isEntityAlive ( ) ) { return false ; } if ( taskOwner . getDistanceSqToEntity ( entityliving ) > ( double ) ( field_48288_d * field_48288_d ) ) { return false ; } if ( field_48289_e ) { if ( ! taskOwner . func_48318_al ( ) . canSee ( entityliving ) ) { if ( ++ field_48287_g > <NUM_LIT> ) { return false ; } } else { field_48287_g = <NUM_LIT:0> ; } } return true ; } public void startExecuting ( ) { field_48290_b = <NUM_LIT:0> ; field_48286_f = <NUM_LIT:0> ; field_48287_g = <NUM_LIT:0> ; } public void resetTask ( ) { taskOwner . setAttackTarget ( null ) ; } protected boolean func_48284_a ( EntityLiving par1EntityLiving , boolean par2 ) { if ( par1EntityLiving == null ) { return false ; } if ( par1EntityLiving == taskOwner ) { return false ; } if ( ! par1EntityLiving . isEntityAlive ( ) ) { return false ; } if ( par1EntityLiving . boundingBox . maxY <= taskOwner . boundingBox . minY || par1EntityLiving . boundingBox . minY >= taskOwner . boundingBox . maxY ) { return false ; } if ( ! taskOwner . func_48336_a ( par1EntityLiving . getClass ( ) ) ) { return false ; } if ( ( taskOwner instanceof EntityTameable ) && ( ( EntityTameable ) taskOwner ) . isTamed ( ) ) { if ( ( par1EntityLiving instanceof EntityTameable ) && ( ( EntityTameable ) par1EntityLiving ) . isTamed ( ) ) { return false ; } if ( par1EntityLiving == ( ( EntityTameable ) taskOwner ) . getOwner ( ) ) { return false ; } } else if ( ( par1EntityLiving instanceof EntityPlayer ) && ! par2 && ( ( EntityPlayer ) par1EntityLiving ) . capabilities . disableDamage ) { return false ; } if ( ! taskOwner . isWithinHomeDistance ( MathHelper . floor_double ( par1EntityLiving . posX ) , MathHelper . floor_double ( par1EntityLiving . posY ) , MathHelper . floor_double ( par1EntityLiving . posZ ) ) ) { return false ; } if ( field_48289_e && ! taskOwner . func_48318_al ( ) . canSee ( par1EntityLiving ) ) { return false ; } if ( field_48292_a ) { if ( -- field_48286_f <= <NUM_LIT:0> ) { field_48290_b = <NUM_LIT:0> ; } if ( field_48290_b == <NUM_LIT:0> ) { field_48290_b = func_48285_a ( par1EntityLiving ) ? <NUM_LIT:1> : <NUM_LIT:2> ; } if ( field_48290_b == <NUM_LIT:2> ) { return false ; } } return true ; } private boolean func_48285_a ( EntityLiving par1EntityLiving ) { field_48286_f = <NUM_LIT:10> + taskOwner . getRNG ( ) . nextInt ( <NUM_LIT:5> ) ; PathEntity pathentity = taskOwner . getNavigator ( ) . func_48661_a ( par1EntityLiving ) ; if ( pathentity == null ) { return false ; } PathPoint pathpoint = pathentity . getFinalPathPoint ( ) ; if ( pathpoint == null ) { return false ; } else { int i = pathpoint . xCoord - MathHelper . floor_double ( par1EntityLiving . posX ) ; int j = pathpoint . zCoord - MathHelper . floor_double ( par1EntityLiving . posZ ) ; return ( double ) ( i * i + j * j ) <= <NUM_LIT> ; } } } </s>
<s> package net . minecraft . src ; import java . util . * ; public class EntityAIPlay extends EntityAIBase { private EntityVillager villagerObj ; private EntityLiving targetVillager ; private float field_48166_c ; private int field_48164_d ; public EntityAIPlay ( EntityVillager par1EntityVillager , float par2 ) { villagerObj = par1EntityVillager ; field_48166_c = par2 ; setMutexBits ( <NUM_LIT:1> ) ; } public boolean shouldExecute ( ) { if ( villagerObj . getGrowingAge ( ) >= <NUM_LIT:0> ) { return false ; } if ( villagerObj . getRNG ( ) . nextInt ( <NUM_LIT> ) != <NUM_LIT:0> ) { return false ; } List list = villagerObj . worldObj . getEntitiesWithinAABB ( net . minecraft . src . EntityVillager . class , villagerObj . boundingBox . expand ( <NUM_LIT> , <NUM_LIT> , <NUM_LIT> ) ) ; double d = Double . MAX_VALUE ; Iterator iterator = list . iterator ( ) ; do { if ( ! iterator . hasNext ( ) ) { break ; } Entity entity = ( Entity ) iterator . next ( ) ; if ( entity != villagerObj ) { EntityVillager entityvillager = ( EntityVillager ) entity ; if ( ! entityvillager . getIsPlayingFlag ( ) && entityvillager . getGrowingAge ( ) < <NUM_LIT:0> ) { double d1 = entityvillager . getDistanceSqToEntity ( villagerObj ) ; if ( d1 <= d ) { d = d1 ; targetVillager = entityvillager ; } } } } while ( true ) ; if ( targetVillager == null ) { Vec3D vec3d = RandomPositionGenerator . func_48396_a ( villagerObj , <NUM_LIT:16> , <NUM_LIT:3> ) ; if ( vec3d == null ) { return false ; } } return true ; } public boolean continueExecuting ( ) { return field_48164_d > <NUM_LIT:0> ; } public void startExecuting ( ) { if ( targetVillager != null ) { villagerObj . setIsPlayingFlag ( true ) ; } field_48164_d = <NUM_LIT:1000> ; } public void resetTask ( ) { villagerObj . setIsPlayingFlag ( false ) ; targetVillager = null ; } public void updateTask ( ) { field_48164_d -- ; if ( targetVillager != null ) { if ( villagerObj . getDistanceSqToEntity ( targetVillager ) > <NUM_LIT> ) { villagerObj . getNavigator ( ) . func_48652_a ( targetVillager , field_48166_c ) ; } } else if ( villagerObj . getNavigator ( ) . noPath ( ) ) { Vec3D vec3d = RandomPositionGenerator . func_48396_a ( villagerObj , <NUM_LIT:16> , <NUM_LIT:3> ) ; if ( vec3d == null ) { return ; } villagerObj . getNavigator ( ) . func_48658_a ( vec3d . xCoord , vec3d . yCoord , vec3d . zCoord , field_48166_c ) ; } } } </s>
<s> package net . minecraft . src ; public class EnchantmentKnockback extends Enchantment { protected EnchantmentKnockback ( int par1 , int par2 ) { super ( par1 , par2 , EnumEnchantmentType . weapon ) ; setName ( "<STR_LIT>" ) ; } public int getMinEnchantability ( int par1 ) { return <NUM_LIT:5> + <NUM_LIT:20> * ( par1 - <NUM_LIT:1> ) ; } public int getMaxEnchantability ( int par1 ) { return super . getMinEnchantability ( par1 ) + <NUM_LIT> ; } public int getMaxLevel ( ) { return <NUM_LIT:2> ; } } </s>
<s> package net . minecraft . src ; import java . util . HashSet ; import java . util . Set ; public class IntHashMap { private transient IntHashMapEntry slots [ ] ; private transient int count ; private int threshold ; private final float growFactor = <NUM_LIT> ; private volatile transient int versionStamp ; private Set keySet ; public IntHashMap ( ) { keySet = new HashSet ( ) ; threshold = <NUM_LIT:12> ; slots = new IntHashMapEntry [ <NUM_LIT:16> ] ; } private static int computeHash ( int par0 ) { par0 ^= par0 > > > <NUM_LIT:20> ^ par0 > > > <NUM_LIT:12> ; return par0 ^ par0 > > > <NUM_LIT:7> ^ par0 > > > <NUM_LIT:4> ; } private static int getSlotIndex ( int par0 , int par1 ) { return par0 & par1 - <NUM_LIT:1> ; } public Object lookup ( int par1 ) { int i = computeHash ( par1 ) ; for ( IntHashMapEntry inthashmapentry = slots [ getSlotIndex ( i , slots . length ) ] ; inthashmapentry != null ; inthashmapentry = inthashmapentry . nextEntry ) { if ( inthashmapentry . hashEntry == par1 ) { return inthashmapentry . valueEntry ; } } return null ; } public boolean containsItem ( int par1 ) { return lookupEntry ( par1 ) != null ; } final IntHashMapEntry lookupEntry ( int par1 ) { int i = computeHash ( par1 ) ; for ( IntHashMapEntry inthashmapentry = slots [ getSlotIndex ( i , slots . length ) ] ; inthashmapentry != null ; inthashmapentry = inthashmapentry . nextEntry ) { if ( inthashmapentry . hashEntry == par1 ) { return inthashmapentry ; } } return null ; } public void addKey ( int par1 , Object par2Obj ) { keySet . add ( Integer . valueOf ( par1 ) ) ; int i = computeHash ( par1 ) ; int j = getSlotIndex ( i , slots . length ) ; for ( IntHashMapEntry inthashmapentry = slots [ j ] ; inthashmapentry != null ; inthashmapentry = inthashmapentry . nextEntry ) { if ( inthashmapentry . hashEntry == par1 ) { inthashmapentry . valueEntry = par2Obj ; } } versionStamp ++ ; insert ( i , par1 , par2Obj , j ) ; } private void grow ( int par1 ) { IntHashMapEntry ainthashmapentry [ ] = slots ; int i = ainthashmapentry . length ; if ( i == <NUM_LIT> ) { threshold = <NUM_LIT> ; return ; } else { IntHashMapEntry ainthashmapentry1 [ ] = new IntHashMapEntry [ par1 ] ; copyTo ( ainthashmapentry1 ) ; slots = ainthashmapentry1 ; threshold = ( int ) ( ( float ) par1 * growFactor ) ; return ; } } private void copyTo ( IntHashMapEntry par1ArrayOfIntHashMapEntry [ ] ) { IntHashMapEntry ainthashmapentry [ ] = slots ; int i = par1ArrayOfIntHashMapEntry . length ; for ( int j = <NUM_LIT:0> ; j < ainthashmapentry . length ; j ++ ) { IntHashMapEntry inthashmapentry = ainthashmapentry [ j ] ; if ( inthashmapentry == null ) { continue ; } ainthashmapentry [ j ] = null ; do { IntHashMapEntry inthashmapentry1 = inthashmapentry . nextEntry ; int k = getSlotIndex ( inthashmapentry . slotHash , i ) ; inthashmapentry . nextEntry = par1ArrayOfIntHashMapEntry [ k ] ; par1ArrayOfIntHashMapEntry [ k ] = inthashmapentry ; inthashmapentry = inthashmapentry1 ; } while ( inthashmapentry != null ) ; } } public Object removeObject ( int par1 ) { keySet . remove ( Integer . valueOf ( par1 ) ) ; IntHashMapEntry inthashmapentry = removeEntry ( par1 ) ; return inthashmapentry != null ? inthashmapentry . valueEntry : null ; } final IntHashMapEntry removeEntry ( int par1 ) { int i = computeHash ( par1 ) ; int j = getSlotIndex ( i , slots . length ) ; IntHashMapEntry inthashmapentry = slots [ j ] ; IntHashMapEntry inthashmapentry1 ; IntHashMapEntry inthashmapentry2 ; for ( inthashmapentry1 = inthashmapentry ; inthashmapentry1 != null ; inthashmapentry1 = inthashmapentry2 ) { inthashmapentry2 = inthashmapentry1 . nextEntry ; if ( inthashmapentry1 . hashEntry == par1 ) { versionStamp ++ ; count -- ; if ( inthashmapentry == inthashmapentry1 ) { slots [ j ] = inthashmapentry2 ; } else { inthashmapentry . nextEntry = inthashmapentry2 ; } return inthashmapentry1 ; } inthashmapentry = inthashmapentry1 ; } return inthashmapentry1 ; } public void clearMap ( ) { versionStamp ++ ; IntHashMapEntry ainthashmapentry [ ] = slots ; for ( int i = <NUM_LIT:0> ; i < ainthashmapentry . length ; i ++ ) { ainthashmapentry [ i ] = null ; } count = <NUM_LIT:0> ; } private void insert ( int par1 , int par2 , Object par3Obj , int par4 ) { IntHashMapEntry inthashmapentry = slots [ par4 ] ; slots [ par4 ] = new IntHashMapEntry ( par1 , par2 , par3Obj , inthashmapentry ) ; if ( count ++ >= threshold ) { grow ( <NUM_LIT:2> * slots . length ) ; } } static int getHash ( int par0 ) { return computeHash ( par0 ) ; } } </s>
<s> package net . minecraft . src ; import java . util . List ; import java . util . Random ; abstract class ComponentStronghold extends StructureComponent { protected ComponentStronghold ( int par1 ) { super ( par1 ) ; } protected void placeDoor ( World par1World , Random par2Random , StructureBoundingBox par3StructureBoundingBox , EnumDoor par4EnumDoor , int par5 , int par6 , int par7 ) { switch ( EnumDoorHelper . doorEnum [ par4EnumDoor . ordinal ( ) ] ) { case <NUM_LIT:1> : default : fillWithBlocks ( par1World , par3StructureBoundingBox , par5 , par6 , par7 , ( par5 + <NUM_LIT:3> ) - <NUM_LIT:1> , ( par6 + <NUM_LIT:3> ) - <NUM_LIT:1> , par7 , <NUM_LIT:0> , <NUM_LIT:0> , false ) ; break ; case <NUM_LIT:2> : placeBlockAtCurrentPosition ( par1World , Block . stoneBrick . blockID , <NUM_LIT:0> , par5 , par6 , par7 , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . stoneBrick . blockID , <NUM_LIT:0> , par5 , par6 + <NUM_LIT:1> , par7 , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . stoneBrick . blockID , <NUM_LIT:0> , par5 , par6 + <NUM_LIT:2> , par7 , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . stoneBrick . blockID , <NUM_LIT:0> , par5 + <NUM_LIT:1> , par6 + <NUM_LIT:2> , par7 , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . stoneBrick . blockID , <NUM_LIT:0> , par5 + <NUM_LIT:2> , par6 + <NUM_LIT:2> , par7 , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . stoneBrick . blockID , <NUM_LIT:0> , par5 + <NUM_LIT:2> , par6 + <NUM_LIT:1> , par7 , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . stoneBrick . blockID , <NUM_LIT:0> , par5 + <NUM_LIT:2> , par6 , par7 , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . doorWood . blockID , <NUM_LIT:0> , par5 + <NUM_LIT:1> , par6 , par7 , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . doorWood . blockID , <NUM_LIT:8> , par5 + <NUM_LIT:1> , par6 + <NUM_LIT:1> , par7 , par3StructureBoundingBox ) ; break ; case <NUM_LIT:3> : placeBlockAtCurrentPosition ( par1World , <NUM_LIT:0> , <NUM_LIT:0> , par5 + <NUM_LIT:1> , par6 , par7 , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , <NUM_LIT:0> , <NUM_LIT:0> , par5 + <NUM_LIT:1> , par6 + <NUM_LIT:1> , par7 , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . fenceIron . blockID , <NUM_LIT:0> , par5 , par6 , par7 , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . fenceIron . blockID , <NUM_LIT:0> , par5 , par6 + <NUM_LIT:1> , par7 , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . fenceIron . blockID , <NUM_LIT:0> , par5 , par6 + <NUM_LIT:2> , par7 , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . fenceIron . blockID , <NUM_LIT:0> , par5 + <NUM_LIT:1> , par6 + <NUM_LIT:2> , par7 , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . fenceIron . blockID , <NUM_LIT:0> , par5 + <NUM_LIT:2> , par6 + <NUM_LIT:2> , par7 , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . fenceIron . blockID , <NUM_LIT:0> , par5 + <NUM_LIT:2> , par6 + <NUM_LIT:1> , par7 , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . fenceIron . blockID , <NUM_LIT:0> , par5 + <NUM_LIT:2> , par6 , par7 , par3StructureBoundingBox ) ; break ; case <NUM_LIT:4> : placeBlockAtCurrentPosition ( par1World , Block . stoneBrick . blockID , <NUM_LIT:0> , par5 , par6 , par7 , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . stoneBrick . blockID , <NUM_LIT:0> , par5 , par6 + <NUM_LIT:1> , par7 , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . stoneBrick . blockID , <NUM_LIT:0> , par5 , par6 + <NUM_LIT:2> , par7 , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . stoneBrick . blockID , <NUM_LIT:0> , par5 + <NUM_LIT:1> , par6 + <NUM_LIT:2> , par7 , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . stoneBrick . blockID , <NUM_LIT:0> , par5 + <NUM_LIT:2> , par6 + <NUM_LIT:2> , par7 , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . stoneBrick . blockID , <NUM_LIT:0> , par5 + <NUM_LIT:2> , par6 + <NUM_LIT:1> , par7 , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . stoneBrick . blockID , <NUM_LIT:0> , par5 + <NUM_LIT:2> , par6 , par7 , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . doorSteel . blockID , <NUM_LIT:0> , par5 + <NUM_LIT:1> , par6 , par7 , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . doorSteel . blockID , <NUM_LIT:8> , par5 + <NUM_LIT:1> , par6 + <NUM_LIT:1> , par7 , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . button . blockID , getMetadataWithOffset ( Block . button . blockID , <NUM_LIT:4> ) , par5 + <NUM_LIT:2> , par6 + <NUM_LIT:1> , par7 + <NUM_LIT:1> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . button . blockID , getMetadataWithOffset ( Block . button . blockID , <NUM_LIT:3> ) , par5 + <NUM_LIT:2> , par6 + <NUM_LIT:1> , par7 - <NUM_LIT:1> , par3StructureBoundingBox ) ; break ; } } protected EnumDoor getRandomDoor ( Random par1Random ) { int i = par1Random . nextInt ( <NUM_LIT:5> ) ; switch ( i ) { case <NUM_LIT:0> : case <NUM_LIT:1> : default : return EnumDoor . OPENING ; case <NUM_LIT:2> : return EnumDoor . WOOD_DOOR ; case <NUM_LIT:3> : return EnumDoor . GRATES ; case <NUM_LIT:4> : return EnumDoor . IRON_DOOR ; } } protected StructureComponent getNextComponentNormal ( ComponentStrongholdStairs2 par1ComponentStrongholdStairs2 , List par2List , Random par3Random , int par4 , int par5 ) { switch ( coordBaseMode ) { case <NUM_LIT:2> : return StructureStrongholdPieces . getNextValidComponentAccess ( par1ComponentStrongholdStairs2 , par2List , par3Random , boundingBox . minX + par4 , boundingBox . minY + par5 , boundingBox . minZ - <NUM_LIT:1> , coordBaseMode , getComponentType ( ) ) ; case <NUM_LIT:0> : return StructureStrongholdPieces . getNextValidComponentAccess ( par1ComponentStrongholdStairs2 , par2List , par3Random , boundingBox . minX + par4 , boundingBox . minY + par5 , boundingBox . maxZ + <NUM_LIT:1> , coordBaseMode , getComponentType ( ) ) ; case <NUM_LIT:1> : return StructureStrongholdPieces . getNextValidComponentAccess ( par1ComponentStrongholdStairs2 , par2List , par3Random , boundingBox . minX - <NUM_LIT:1> , boundingBox . minY + par5 , boundingBox . minZ + par4 , coordBaseMode , getComponentType ( ) ) ; case <NUM_LIT:3> : return StructureStrongholdPieces . getNextValidComponentAccess ( par1ComponentStrongholdStairs2 , par2List , par3Random , boundingBox . maxX + <NUM_LIT:1> , boundingBox . minY + par5 , boundingBox . minZ + par4 , coordBaseMode , getComponentType ( ) ) ; } return null ; } protected StructureComponent getNextComponentX ( ComponentStrongholdStairs2 par1ComponentStrongholdStairs2 , List par2List , Random par3Random , int par4 , int par5 ) { switch ( coordBaseMode ) { case <NUM_LIT:2> : return StructureStrongholdPieces . getNextValidComponentAccess ( par1ComponentStrongholdStairs2 , par2List , par3Random , boundingBox . minX - <NUM_LIT:1> , boundingBox . minY + par4 , boundingBox . minZ + par5 , <NUM_LIT:1> , getComponentType ( ) ) ; case <NUM_LIT:0> : return StructureStrongholdPieces . getNextValidComponentAccess ( par1ComponentStrongholdStairs2 , par2List , par3Random , boundingBox . minX - <NUM_LIT:1> , boundingBox . minY + par4 , boundingBox . minZ + par5 , <NUM_LIT:1> , getComponentType ( ) ) ; case <NUM_LIT:1> : return StructureStrongholdPieces . getNextValidComponentAccess ( par1ComponentStrongholdStairs2 , par2List , par3Random , boundingBox . minX + par5 , boundingBox . minY + par4 , boundingBox . minZ - <NUM_LIT:1> , <NUM_LIT:2> , getComponentType ( ) ) ; case <NUM_LIT:3> : return StructureStrongholdPieces . getNextValidComponentAccess ( par1ComponentStrongholdStairs2 , par2List , par3Random , boundingBox . minX + par5 , boundingBox . minY + par4 , boundingBox . minZ - <NUM_LIT:1> , <NUM_LIT:2> , getComponentType ( ) ) ; } return null ; } protected StructureComponent getNextComponentZ ( ComponentStrongholdStairs2 par1ComponentStrongholdStairs2 , List par2List , Random par3Random , int par4 , int par5 ) { switch ( coordBaseMode ) { case <NUM_LIT:2> : return StructureStrongholdPieces . getNextValidComponentAccess ( par1ComponentStrongholdStairs2 , par2List , par3Random , boundingBox . maxX + <NUM_LIT:1> , boundingBox . minY + par4 , boundingBox . minZ + par5 , <NUM_LIT:3> , getComponentType ( ) ) ; case <NUM_LIT:0> : return StructureStrongholdPieces . getNextValidComponentAccess ( par1ComponentStrongholdStairs2 , par2List , par3Random , boundingBox . maxX + <NUM_LIT:1> , boundingBox . minY + par4 , boundingBox . minZ + par5 , <NUM_LIT:3> , getComponentType ( ) ) ; case <NUM_LIT:1> : return StructureStrongholdPieces . getNextValidComponentAccess ( par1ComponentStrongholdStairs2 , par2List , par3Random , boundingBox . minX + par5 , boundingBox . minY + par4 , boundingBox . maxZ + <NUM_LIT:1> , <NUM_LIT:0> , getComponentType ( ) ) ; case <NUM_LIT:3> : return StructureStrongholdPieces . getNextValidComponentAccess ( par1ComponentStrongholdStairs2 , par2List , par3Random , boundingBox . minX + par5 , boundingBox . minY + par4 , boundingBox . maxZ + <NUM_LIT:1> , <NUM_LIT:0> , getComponentType ( ) ) ; } return null ; } protected static boolean canStrongholdGoDeeper ( StructureBoundingBox par0StructureBoundingBox ) { return par0StructureBoundingBox != null && par0StructureBoundingBox . minY > <NUM_LIT:10> ; } } </s>
<s> package net . minecraft . src ; public class AnvilConverterData { public long lastUpdated ; public boolean terrainPopulated ; public byte heightmap [ ] ; public NibbleArrayReader blockLight ; public NibbleArrayReader skyLight ; public NibbleArrayReader data ; public byte blocks [ ] ; public NBTTagList entities ; public NBTTagList tileEntities ; public NBTTagList tileTicks ; public final int x ; public final int z ; public AnvilConverterData ( int par1 , int par2 ) { x = par1 ; z = par2 ; } } </s>
<s> package net . minecraft . src ; import java . util . * ; public abstract class EntityLiving extends Entity { public int heartsHalvesLife ; public float field_9098_aw ; public float field_9096_ay ; public float renderYawOffset ; public float prevRenderYawOffset ; public float rotationYawHead ; public float prevRotationYawHead ; protected float field_9124_aB ; protected float field_9123_aC ; protected float field_9122_aD ; protected float field_9121_aE ; protected boolean field_9120_aF ; protected String texture ; protected boolean field_9118_aH ; protected float field_9117_aI ; protected String entityType ; protected float field_9115_aK ; protected int scoreValue ; protected float field_9113_aM ; public float landMovementFactor ; public float jumpMovementFactor ; public float prevSwingProgress ; public float swingProgress ; protected int health ; public int prevHealth ; protected int carryoverDamage ; private int livingSoundTime ; public int hurtTime ; public int maxHurtTime ; public float attackedAtYaw ; public int deathTime ; public int attackTime ; public float prevCameraPitch ; public float cameraPitch ; protected boolean dead ; protected int experienceValue ; public int field_9144_ba ; public float field_9143_bb ; public float field_9142_bc ; public float field_9141_bd ; public float field_386_ba ; protected EntityPlayer attackingPlayer ; protected int recentlyHit ; private EntityLiving entityLivingToAttack ; private int revengeTimer ; private EntityLiving lastAttackingEntity ; public int arrowHitTempCounter ; public int arrowHitTimer ; protected HashMap activePotionsMap ; private boolean potionsNeedUpdate ; private int field_39003_c ; private EntityLookHelper lookHelper ; private EntityMoveHelper moveHelper ; private EntityJumpHelper jumpHelper ; private EntityBodyHelper bodyHelper ; private PathNavigate navigator ; protected EntityAITasks tasks ; protected EntityAITasks targetTasks ; private EntityLiving attackTarget ; private EntitySenses field_48343_m ; private float field_48340_n ; private ChunkCoordinates homePosition ; private float maximumHomeDistance ; protected int newPosRotationIncrements ; protected double newPosX ; protected double newPosY ; protected double newPosZ ; protected double newRotationYaw ; protected double newRotationPitch ; float field_9134_bl ; protected int naturalArmorRating ; protected int entityAge ; protected float moveStrafing ; protected float moveForward ; protected float randomYawVelocity ; protected boolean isJumping ; protected float defaultPitch ; protected float moveSpeed ; private int jumpTicks ; private Entity currentTarget ; protected int numTicksToChaseTarget ; public EntityLiving ( World par1World ) { super ( par1World ) ; heartsHalvesLife = <NUM_LIT:20> ; renderYawOffset = <NUM_LIT> ; prevRenderYawOffset = <NUM_LIT> ; rotationYawHead = <NUM_LIT> ; prevRotationYawHead = <NUM_LIT> ; field_9120_aF = true ; texture = "<STR_LIT>" ; field_9118_aH = true ; field_9117_aI = <NUM_LIT> ; entityType = null ; field_9115_aK = <NUM_LIT> ; scoreValue = <NUM_LIT:0> ; field_9113_aM = <NUM_LIT> ; landMovementFactor = <NUM_LIT> ; jumpMovementFactor = <NUM_LIT> ; attackedAtYaw = <NUM_LIT> ; deathTime = <NUM_LIT:0> ; attackTime = <NUM_LIT:0> ; dead = false ; field_9144_ba = - <NUM_LIT:1> ; field_9143_bb = ( float ) ( Math . random ( ) * <NUM_LIT> + <NUM_LIT> ) ; attackingPlayer = null ; recentlyHit = <NUM_LIT:0> ; entityLivingToAttack = null ; revengeTimer = <NUM_LIT:0> ; lastAttackingEntity = null ; arrowHitTempCounter = <NUM_LIT:0> ; arrowHitTimer = <NUM_LIT:0> ; activePotionsMap = new HashMap ( ) ; potionsNeedUpdate = true ; tasks = new EntityAITasks ( ) ; targetTasks = new EntityAITasks ( ) ; homePosition = new ChunkCoordinates ( <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> ) ; maximumHomeDistance = - <NUM_LIT> ; field_9134_bl = <NUM_LIT> ; naturalArmorRating = <NUM_LIT:0> ; entityAge = <NUM_LIT:0> ; isJumping = false ; defaultPitch = <NUM_LIT> ; moveSpeed = <NUM_LIT> ; jumpTicks = <NUM_LIT:0> ; numTicksToChaseTarget = <NUM_LIT:0> ; health = getMaxHealth ( ) ; preventEntitySpawning = true ; lookHelper = new EntityLookHelper ( this ) ; moveHelper = new EntityMoveHelper ( this ) ; jumpHelper = new EntityJumpHelper ( this ) ; bodyHelper = new EntityBodyHelper ( this ) ; navigator = new PathNavigate ( this , par1World , <NUM_LIT> ) ; field_48343_m = new EntitySenses ( this ) ; field_9096_ay = ( float ) ( Math . random ( ) + <NUM_LIT> ) * <NUM_LIT> ; setPosition ( posX , posY , posZ ) ; field_9098_aw = ( float ) Math . random ( ) * <NUM_LIT> ; rotationYaw = ( float ) ( Math . random ( ) * Math . PI * <NUM_LIT> ) ; rotationYawHead = rotationYaw ; stepHeight = <NUM_LIT> ; } public EntityLookHelper getLookHelper ( ) { return lookHelper ; } public EntityMoveHelper getMoveHelper ( ) { return moveHelper ; } public EntityJumpHelper getJumpHelper ( ) { return jumpHelper ; } public PathNavigate getNavigator ( ) { return navigator ; } public EntitySenses func_48318_al ( ) { return field_48343_m ; } public Random getRNG ( ) { return rand ; } public EntityLiving getAITarget ( ) { return entityLivingToAttack ; } public EntityLiving getLastAttackingEntity ( ) { return lastAttackingEntity ; } public void setLastAttackingEntity ( Entity par1Entity ) { if ( par1Entity instanceof EntityLiving ) { lastAttackingEntity = ( EntityLiving ) par1Entity ; } } public int getAge ( ) { return entityAge ; } public float func_48314_aq ( ) { return rotationYawHead ; } public float func_48332_ar ( ) { return field_48340_n ; } public void func_48320_d ( float par1 ) { field_48340_n = par1 ; setMoveForward ( par1 ) ; } public boolean attackEntityAsMob ( Entity par1Entity ) { setLastAttackingEntity ( par1Entity ) ; return false ; } public EntityLiving getAttackTarget ( ) { return attackTarget ; } public void setAttackTarget ( EntityLiving par1EntityLiving ) { attackTarget = par1EntityLiving ; } public boolean func_48336_a ( Class par1Class ) { return ( net . minecraft . src . EntityCreeper . class ) != par1Class && ( net . minecraft . src . EntityGhast . class ) != par1Class ; } public void eatGrassBonus ( ) { } public boolean isWithinHomeDistanceCurrentPosition ( ) { return isWithinHomeDistance ( MathHelper . floor_double ( posX ) , MathHelper . floor_double ( posY ) , MathHelper . floor_double ( posZ ) ) ; } public boolean isWithinHomeDistance ( int par1 , int par2 , int par3 ) { if ( maximumHomeDistance == - <NUM_LIT> ) { return true ; } else { return homePosition . getDistanceSquared ( par1 , par2 , par3 ) < maximumHomeDistance * maximumHomeDistance ; } } public void setHomeArea ( int par1 , int par2 , int par3 , int par4 ) { homePosition . set ( par1 , par2 , par3 ) ; maximumHomeDistance = par4 ; } public ChunkCoordinates getHomePosition ( ) { return homePosition ; } public float getMaximumHomeDistance ( ) { return maximumHomeDistance ; } public void detachHome ( ) { maximumHomeDistance = - <NUM_LIT> ; } public boolean hasHome ( ) { return maximumHomeDistance != - <NUM_LIT> ; } public void setRevengeTarget ( EntityLiving par1EntityLiving ) { entityLivingToAttack = par1EntityLiving ; revengeTimer = entityLivingToAttack == null ? <NUM_LIT:0> : <NUM_LIT> ; } protected void entityInit ( ) { dataWatcher . addObject ( <NUM_LIT:8> , Integer . valueOf ( field_39003_c ) ) ; } public boolean canEntityBeSeen ( Entity par1Entity ) { return worldObj . rayTraceBlocks ( Vec3D . createVector ( posX , posY + ( double ) getEyeHeight ( ) , posZ ) , Vec3D . createVector ( par1Entity . posX , par1Entity . posY + ( double ) par1Entity . getEyeHeight ( ) , par1Entity . posZ ) ) == null ; } public boolean canBeCollidedWith ( ) { return ! isDead ; } public boolean canBePushed ( ) { return ! isDead ; } public float getEyeHeight ( ) { return height * <NUM_LIT> ; } public int getTalkInterval ( ) { return <NUM_LIT> ; } public void playLivingSound ( ) { String s = getLivingSound ( ) ; if ( s != null ) { worldObj . playSoundAtEntity ( this , s , getSoundVolume ( ) , getSoundPitch ( ) ) ; } } public void onEntityUpdate ( ) { prevSwingProgress = swingProgress ; super . onEntityUpdate ( ) ; Profiler . startSection ( "<STR_LIT>" ) ; if ( isEntityAlive ( ) && rand . nextInt ( <NUM_LIT:1000> ) < livingSoundTime ++ ) { livingSoundTime = - getTalkInterval ( ) ; playLivingSound ( ) ; } if ( isEntityAlive ( ) && isEntityInsideOpaqueBlock ( ) ) { if ( ! attackEntityFrom ( DamageSource . inWall , <NUM_LIT:1> ) ) ; } if ( isImmuneToFire ( ) || worldObj . isRemote ) { extinguish ( ) ; } if ( isEntityAlive ( ) && isInsideOfMaterial ( Material . water ) && ! canBreatheUnderwater ( ) && ! activePotionsMap . containsKey ( Integer . valueOf ( Potion . waterBreathing . id ) ) ) { setAir ( decreaseAirSupply ( getAir ( ) ) ) ; if ( getAir ( ) == - <NUM_LIT:20> ) { setAir ( <NUM_LIT:0> ) ; for ( int i = <NUM_LIT:0> ; i < <NUM_LIT:8> ; i ++ ) { float f = rand . nextFloat ( ) - rand . nextFloat ( ) ; float f1 = rand . nextFloat ( ) - rand . nextFloat ( ) ; float f2 = rand . nextFloat ( ) - rand . nextFloat ( ) ; worldObj . spawnParticle ( "<STR_LIT>" , posX + ( double ) f , posY + ( double ) f1 , posZ + ( double ) f2 , motionX , motionY , motionZ ) ; } attackEntityFrom ( DamageSource . drown , <NUM_LIT:2> ) ; } extinguish ( ) ; } else { setAir ( <NUM_LIT> ) ; } prevCameraPitch = cameraPitch ; if ( attackTime > <NUM_LIT:0> ) { attackTime -- ; } if ( hurtTime > <NUM_LIT:0> ) { hurtTime -- ; } if ( heartsLife > <NUM_LIT:0> ) { heartsLife -- ; } if ( health <= <NUM_LIT:0> ) { onDeathUpdate ( ) ; } if ( recentlyHit > <NUM_LIT:0> ) { recentlyHit -- ; } else { attackingPlayer = null ; } if ( lastAttackingEntity != null && ! lastAttackingEntity . isEntityAlive ( ) ) { lastAttackingEntity = null ; } if ( entityLivingToAttack != null ) { if ( ! entityLivingToAttack . isEntityAlive ( ) ) { setRevengeTarget ( null ) ; } else if ( revengeTimer > <NUM_LIT:0> ) { revengeTimer -- ; } else { setRevengeTarget ( null ) ; } } updatePotionEffects ( ) ; field_9121_aE = field_9122_aD ; prevRenderYawOffset = renderYawOffset ; prevRotationYawHead = rotationYawHead ; prevRotationYaw = rotationYaw ; prevRotationPitch = rotationPitch ; Profiler . endSection ( ) ; } protected void onDeathUpdate ( ) { deathTime ++ ; if ( deathTime == <NUM_LIT:20> ) { if ( ! worldObj . isRemote && ( recentlyHit > <NUM_LIT:0> || isPlayer ( ) ) && ! isChild ( ) ) { for ( int i = getExperiencePoints ( attackingPlayer ) ; i > <NUM_LIT:0> ; ) { int k = EntityXPOrb . getXPSplit ( i ) ; i -= k ; worldObj . spawnEntityInWorld ( new EntityXPOrb ( worldObj , posX , posY , posZ , k ) ) ; } } onEntityDeath ( ) ; setDead ( ) ; for ( int j = <NUM_LIT:0> ; j < <NUM_LIT:20> ; j ++ ) { double d = rand . nextGaussian ( ) * <NUM_LIT> ; double d1 = rand . nextGaussian ( ) * <NUM_LIT> ; double d2 = rand . nextGaussian ( ) * <NUM_LIT> ; worldObj . spawnParticle ( "<STR_LIT>" , ( posX + ( double ) ( rand . nextFloat ( ) * width * <NUM_LIT> ) ) - ( double ) width , posY + ( double ) ( rand . nextFloat ( ) * height ) , ( posZ + ( double ) ( rand . nextFloat ( ) * width * <NUM_LIT> ) ) - ( double ) width , d , d1 , d2 ) ; } } } protected int decreaseAirSupply ( int par1 ) { return par1 - <NUM_LIT:1> ; } protected int getExperiencePoints ( EntityPlayer par1EntityPlayer ) { return experienceValue ; } protected boolean isPlayer ( ) { return false ; } public void spawnExplosionParticle ( ) { for ( int i = <NUM_LIT:0> ; i < <NUM_LIT:20> ; i ++ ) { double d = rand . nextGaussian ( ) * <NUM_LIT> ; double d1 = rand . nextGaussian ( ) * <NUM_LIT> ; double d2 = rand . nextGaussian ( ) * <NUM_LIT> ; double d3 = <NUM_LIT> ; worldObj . spawnParticle ( "<STR_LIT>" , ( posX + ( double ) ( rand . nextFloat ( ) * width * <NUM_LIT> ) ) - ( double ) width - d * d3 , ( posY + ( double ) ( rand . nextFloat ( ) * height ) ) - d1 * d3 , ( posZ + ( double ) ( rand . nextFloat ( ) * width * <NUM_LIT> ) ) - ( double ) width - d2 * d3 , d , d1 , d2 ) ; } } public void updateRidden ( ) { super . updateRidden ( ) ; field_9124_aB = field_9123_aC ; field_9123_aC = <NUM_LIT> ; fallDistance = <NUM_LIT> ; } public void onUpdate ( ) { super . onUpdate ( ) ; if ( arrowHitTempCounter > <NUM_LIT:0> ) { if ( arrowHitTimer <= <NUM_LIT:0> ) { arrowHitTimer = <NUM_LIT> ; } arrowHitTimer -- ; if ( arrowHitTimer <= <NUM_LIT:0> ) { arrowHitTempCounter -- ; } } onLivingUpdate ( ) ; double d = posX - prevPosX ; double d1 = posZ - prevPosZ ; float f = MathHelper . sqrt_double ( d * d + d1 * d1 ) ; float f1 = renderYawOffset ; float f2 = <NUM_LIT> ; field_9124_aB = field_9123_aC ; float f3 = <NUM_LIT> ; if ( f > <NUM_LIT> ) { f3 = <NUM_LIT> ; f2 = f * <NUM_LIT> ; f1 = ( ( float ) Math . atan2 ( d1 , d ) * <NUM_LIT> ) / ( float ) Math . PI - <NUM_LIT> ; } if ( swingProgress > <NUM_LIT> ) { f1 = rotationYaw ; } if ( ! onGround ) { f3 = <NUM_LIT> ; } field_9123_aC = field_9123_aC + ( f3 - field_9123_aC ) * <NUM_LIT> ; if ( isAIEnabled ( ) ) { bodyHelper . func_48431_a ( ) ; } else { float f4 ; for ( f4 = f1 - renderYawOffset ; f4 < - <NUM_LIT> ; f4 += <NUM_LIT> ) { } for ( ; f4 >= <NUM_LIT> ; f4 -= <NUM_LIT> ) { } renderYawOffset += f4 * <NUM_LIT> ; float f5 ; for ( f5 = rotationYaw - renderYawOffset ; f5 < - <NUM_LIT> ; f5 += <NUM_LIT> ) { } for ( ; f5 >= <NUM_LIT> ; f5 -= <NUM_LIT> ) { } boolean flag = f5 < - <NUM_LIT> || f5 >= <NUM_LIT> ; if ( f5 < - <NUM_LIT> ) { f5 = - <NUM_LIT> ; } if ( f5 >= <NUM_LIT> ) { f5 = <NUM_LIT> ; } renderYawOffset = rotationYaw - f5 ; if ( f5 * f5 > <NUM_LIT> ) { renderYawOffset += f5 * <NUM_LIT> ; } if ( flag ) { f2 *= - <NUM_LIT> ; } } for ( ; rotationYaw - prevRotationYaw < - <NUM_LIT> ; prevRotationYaw -= <NUM_LIT> ) { } for ( ; rotationYaw - prevRotationYaw >= <NUM_LIT> ; prevRotationYaw += <NUM_LIT> ) { } for ( ; renderYawOffset - prevRenderYawOffset < - <NUM_LIT> ; prevRenderYawOffset -= <NUM_LIT> ) { } for ( ; renderYawOffset - prevRenderYawOffset >= <NUM_LIT> ; prevRenderYawOffset += <NUM_LIT> ) { } for ( ; rotationPitch - prevRotationPitch < - <NUM_LIT> ; prevRotationPitch -= <NUM_LIT> ) { } for ( ; rotationPitch - prevRotationPitch >= <NUM_LIT> ; prevRotationPitch += <NUM_LIT> ) { } for ( ; rotationYawHead - prevRotationYawHead < - <NUM_LIT> ; prevRotationYawHead -= <NUM_LIT> ) { } for ( ; rotationYawHead - prevRotationYawHead >= <NUM_LIT> ; prevRotationYawHead += <NUM_LIT> ) { } field_9122_aD += f2 ; } protected void setSize ( float par1 , float par2 ) { super . setSize ( par1 , par2 ) ; } public void heal ( int par1 ) { if ( health <= <NUM_LIT:0> ) { return ; } health += par1 ; if ( health > getMaxHealth ( ) ) { health = getMaxHealth ( ) ; } heartsLife = heartsHalvesLife / <NUM_LIT:2> ; } public abstract int getMaxHealth ( ) ; public int getHealth ( ) { return health ; } public void setEntityHealth ( int par1 ) { health = par1 ; if ( par1 > getMaxHealth ( ) ) { par1 = getMaxHealth ( ) ; } } public boolean attackEntityFrom ( DamageSource par1DamageSource , int par2 ) { if ( worldObj . isRemote ) { return false ; } entityAge = <NUM_LIT:0> ; if ( health <= <NUM_LIT:0> ) { return false ; } if ( par1DamageSource . fireDamage ( ) && isPotionActive ( Potion . fireResistance ) ) { return false ; } field_9141_bd = <NUM_LIT> ; boolean flag = true ; if ( ( float ) heartsLife > ( float ) heartsHalvesLife / <NUM_LIT> ) { if ( par2 <= naturalArmorRating ) { return false ; } damageEntity ( par1DamageSource , par2 - naturalArmorRating ) ; naturalArmorRating = par2 ; flag = false ; } else { naturalArmorRating = par2 ; prevHealth = health ; heartsLife = heartsHalvesLife ; damageEntity ( par1DamageSource , par2 ) ; hurtTime = maxHurtTime = <NUM_LIT:10> ; } attackedAtYaw = <NUM_LIT> ; Entity entity = par1DamageSource . getEntity ( ) ; if ( entity != null ) { if ( entity instanceof EntityLiving ) { setRevengeTarget ( ( EntityLiving ) entity ) ; } if ( entity instanceof EntityPlayer ) { recentlyHit = <NUM_LIT> ; attackingPlayer = ( EntityPlayer ) entity ; } else if ( entity instanceof EntityWolf ) { EntityWolf entitywolf = ( EntityWolf ) entity ; if ( entitywolf . isTamed ( ) ) { recentlyHit = <NUM_LIT> ; attackingPlayer = null ; } } } if ( flag ) { worldObj . setEntityState ( this , ( byte ) <NUM_LIT:2> ) ; setBeenAttacked ( ) ; if ( entity != null ) { double d = entity . posX - posX ; double d1 ; for ( d1 = entity . posZ - posZ ; d * d + d1 * d1 < <NUM_LIT> ; d1 = ( Math . random ( ) - Math . random ( ) ) * <NUM_LIT> ) { d = ( Math . random ( ) - Math . random ( ) ) * <NUM_LIT> ; } attackedAtYaw = ( float ) ( ( Math . atan2 ( d1 , d ) * <NUM_LIT> ) / Math . PI ) - rotationYaw ; knockBack ( entity , par2 , d , d1 ) ; } else { attackedAtYaw = ( int ) ( Math . random ( ) * <NUM_LIT> ) * <NUM_LIT> ; } } if ( health <= <NUM_LIT:0> ) { if ( flag ) { worldObj . playSoundAtEntity ( this , getDeathSound ( ) , getSoundVolume ( ) , getSoundPitch ( ) ) ; } onDeath ( par1DamageSource ) ; } else if ( flag ) { worldObj . playSoundAtEntity ( this , getHurtSound ( ) , getSoundVolume ( ) , getSoundPitch ( ) ) ; } return true ; } private float getSoundPitch ( ) { if ( isChild ( ) ) { return ( rand . nextFloat ( ) - rand . nextFloat ( ) ) * <NUM_LIT> + <NUM_LIT> ; } else { return ( rand . nextFloat ( ) - rand . nextFloat ( ) ) * <NUM_LIT> + <NUM_LIT> ; } } public int getTotalArmorValue ( ) { return <NUM_LIT:0> ; } protected void damageArmor ( int i ) { } protected int applyArmorCalculations ( DamageSource par1DamageSource , int par2 ) { if ( ! par1DamageSource . isUnblockable ( ) ) { int i = <NUM_LIT> - getTotalArmorValue ( ) ; int j = par2 * i + carryoverDamage ; damageArmor ( par2 ) ; par2 = j / <NUM_LIT> ; carryoverDamage = j % <NUM_LIT> ; } return par2 ; } protected int applyPotionDamageCalculations ( DamageSource par1DamageSource , int par2 ) { if ( isPotionActive ( Potion . resistance ) ) { int i = ( getActivePotionEffect ( Potion . resistance ) . getAmplifier ( ) + <NUM_LIT:1> ) * <NUM_LIT:5> ; int j = <NUM_LIT> - i ; int k = par2 * j + carryoverDamage ; par2 = k / <NUM_LIT> ; carryoverDamage = k % <NUM_LIT> ; } return par2 ; } protected void damageEntity ( DamageSource par1DamageSource , int par2 ) { par2 = applyArmorCalculations ( par1DamageSource , par2 ) ; par2 = applyPotionDamageCalculations ( par1DamageSource , par2 ) ; health -= par2 ; } protected float getSoundVolume ( ) { return <NUM_LIT> ; } protected String getLivingSound ( ) { return null ; } protected String getHurtSound ( ) { return "<STR_LIT>" ; } protected String getDeathSound ( ) { return "<STR_LIT>" ; } public void knockBack ( Entity par1Entity , int par2 , double par3 , double par5 ) { isAirBorne = true ; float f = MathHelper . sqrt_double ( par3 * par3 + par5 * par5 ) ; float f1 = <NUM_LIT> ; motionX /= <NUM_LIT> ; motionY /= <NUM_LIT> ; motionZ /= <NUM_LIT> ; motionX -= ( par3 / ( double ) f ) * ( double ) f1 ; motionY += f1 ; motionZ -= ( par5 / ( double ) f ) * ( double ) f1 ; if ( motionY > <NUM_LIT> ) { motionY = <NUM_LIT> ; } } public void onDeath ( DamageSource par1DamageSource ) { Entity entity = par1DamageSource . getEntity ( ) ; if ( scoreValue >= <NUM_LIT:0> && entity != null ) { entity . addToPlayerScore ( this , scoreValue ) ; } if ( entity != null ) { entity . onKillEntity ( this ) ; } dead = true ; if ( ! worldObj . isRemote ) { int i = <NUM_LIT:0> ; if ( entity instanceof EntityPlayer ) { i = EnchantmentHelper . getLootingModifier ( ( ( EntityPlayer ) entity ) . inventory ) ; } if ( ! isChild ( ) ) { dropFewItems ( recentlyHit > <NUM_LIT:0> , i ) ; if ( recentlyHit > <NUM_LIT:0> ) { int j = rand . nextInt ( <NUM_LIT> ) - i ; if ( j < <NUM_LIT:5> ) { dropRareDrop ( j > <NUM_LIT:0> ? <NUM_LIT:0> : <NUM_LIT:1> ) ; } } } } worldObj . setEntityState ( this , ( byte ) <NUM_LIT:3> ) ; } protected void dropRareDrop ( int i ) { } protected void dropFewItems ( boolean par1 , int par2 ) { int i = getDropItemId ( ) ; if ( i > <NUM_LIT:0> ) { int j = rand . nextInt ( <NUM_LIT:3> ) ; if ( par2 > <NUM_LIT:0> ) { j += rand . nextInt ( par2 + <NUM_LIT:1> ) ; } for ( int k = <NUM_LIT:0> ; k < j ; k ++ ) { dropItem ( i , <NUM_LIT:1> ) ; } } } protected int getDropItemId ( ) { return <NUM_LIT:0> ; } protected void fall ( float par1 ) { super . fall ( par1 ) ; int i = ( int ) Math . ceil ( par1 - <NUM_LIT> ) ; if ( i > <NUM_LIT:0> ) { if ( i > <NUM_LIT:4> ) { worldObj . playSoundAtEntity ( this , "<STR_LIT>" , <NUM_LIT> , <NUM_LIT> ) ; } else { worldObj . playSoundAtEntity ( this , "<STR_LIT>" , <NUM_LIT> , <NUM_LIT> ) ; } attackEntityFrom ( DamageSource . fall , i ) ; int j = worldObj . getBlockId ( MathHelper . floor_double ( posX ) , MathHelper . floor_double ( posY - <NUM_LIT> - ( double ) yOffset ) , MathHelper . floor_double ( posZ ) ) ; if ( j > <NUM_LIT:0> ) { StepSound stepsound = Block . blocksList [ j ] . stepSound ; worldObj . playSoundAtEntity ( this , stepsound . getStepSound ( ) , stepsound . getVolume ( ) * <NUM_LIT> , stepsound . getPitch ( ) * <NUM_LIT> ) ; } } } public void moveEntityWithHeading ( float par1 , float par2 ) { if ( isInWater ( ) ) { double d = posY ; moveFlying ( par1 , par2 , isAIEnabled ( ) ? <NUM_LIT> : <NUM_LIT> ) ; moveEntity ( motionX , motionY , motionZ ) ; motionX *= <NUM_LIT> ; motionY *= <NUM_LIT> ; motionZ *= <NUM_LIT> ; motionY -= <NUM_LIT> ; if ( isCollidedHorizontally && isOffsetPositionInLiquid ( motionX , ( ( motionY + <NUM_LIT> ) - posY ) + d , motionZ ) ) { motionY = <NUM_LIT> ; } } else if ( handleLavaMovement ( ) ) { double d1 = posY ; moveFlying ( par1 , par2 , <NUM_LIT> ) ; moveEntity ( motionX , motionY , motionZ ) ; motionX *= <NUM_LIT> ; motionY *= <NUM_LIT> ; motionZ *= <NUM_LIT> ; motionY -= <NUM_LIT> ; if ( isCollidedHorizontally && isOffsetPositionInLiquid ( motionX , ( ( motionY + <NUM_LIT> ) - posY ) + d1 , motionZ ) ) { motionY = <NUM_LIT> ; } } else { 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> ; } } float f1 = <NUM_LIT> / ( f * f * f ) ; float f2 ; if ( onGround ) { if ( isAIEnabled ( ) ) { f2 = func_48332_ar ( ) ; } else { f2 = landMovementFactor ; } f2 *= f1 ; } else { f2 = jumpMovementFactor ; } moveFlying ( par1 , par2 , f2 ) ; f = <NUM_LIT> ; if ( onGround ) { f = <NUM_LIT> ; int j = worldObj . getBlockId ( MathHelper . floor_double ( posX ) , MathHelper . floor_double ( boundingBox . minY ) - <NUM_LIT:1> , MathHelper . floor_double ( posZ ) ) ; if ( j > <NUM_LIT:0> ) { f = Block . blocksList [ j ] . slipperiness * <NUM_LIT> ; } } if ( isOnLadder ( ) ) { float f3 = <NUM_LIT> ; if ( motionX < ( double ) ( - f3 ) ) { motionX = - f3 ; } if ( motionX > ( double ) f3 ) { motionX = f3 ; } if ( motionZ < ( double ) ( - f3 ) ) { motionZ = - f3 ; } if ( motionZ > ( double ) f3 ) { motionZ = f3 ; } fallDistance = <NUM_LIT> ; if ( motionY < - <NUM_LIT> ) { motionY = - <NUM_LIT> ; } boolean flag = isSneaking ( ) && ( this instanceof EntityPlayer ) ; if ( flag && motionY < <NUM_LIT> ) { motionY = <NUM_LIT> ; } } moveEntity ( motionX , motionY , motionZ ) ; if ( isCollidedHorizontally && isOnLadder ( ) ) { motionY = <NUM_LIT> ; } motionY -= <NUM_LIT> ; motionY *= <NUM_LIT> ; motionX *= f ; motionZ *= f ; } field_9142_bc = field_9141_bd ; double d2 = posX - prevPosX ; double d3 = posZ - prevPosZ ; float f4 = MathHelper . sqrt_double ( d2 * d2 + d3 * d3 ) * <NUM_LIT> ; if ( f4 > <NUM_LIT> ) { f4 = <NUM_LIT> ; } field_9141_bd += ( f4 - field_9141_bd ) * <NUM_LIT> ; field_386_ba += field_9141_bd ; } public boolean isOnLadder ( ) { int i = MathHelper . floor_double ( posX ) ; int j = MathHelper . floor_double ( boundingBox . minY ) ; int k = MathHelper . floor_double ( posZ ) ; int l = worldObj . getBlockId ( i , j , k ) ; return l == Block . ladder . blockID || l == Block . vine . blockID ; } public void writeEntityToNBT ( NBTTagCompound par1NBTTagCompound ) { par1NBTTagCompound . setShort ( "<STR_LIT>" , ( short ) health ) ; par1NBTTagCompound . setShort ( "<STR_LIT>" , ( short ) hurtTime ) ; par1NBTTagCompound . setShort ( "<STR_LIT>" , ( short ) deathTime ) ; par1NBTTagCompound . setShort ( "<STR_LIT>" , ( short ) attackTime ) ; if ( ! activePotionsMap . isEmpty ( ) ) { NBTTagList nbttaglist = new NBTTagList ( ) ; NBTTagCompound nbttagcompound ; for ( Iterator iterator = activePotionsMap . values ( ) . iterator ( ) ; iterator . hasNext ( ) ; nbttaglist . appendTag ( nbttagcompound ) ) { PotionEffect potioneffect = ( PotionEffect ) iterator . next ( ) ; nbttagcompound = new NBTTagCompound ( ) ; nbttagcompound . setByte ( "<STR_LIT>" , ( byte ) potioneffect . getPotionID ( ) ) ; nbttagcompound . setByte ( "<STR_LIT>" , ( byte ) potioneffect . getAmplifier ( ) ) ; nbttagcompound . setInteger ( "<STR_LIT>" , potioneffect . getDuration ( ) ) ; } par1NBTTagCompound . setTag ( "<STR_LIT>" , nbttaglist ) ; } } public void readEntityFromNBT ( NBTTagCompound par1NBTTagCompound ) { if ( health < - <NUM_LIT> ) { health = - <NUM_LIT> ; } health = par1NBTTagCompound . getShort ( "<STR_LIT>" ) ; if ( ! par1NBTTagCompound . hasKey ( "<STR_LIT>" ) ) { health = getMaxHealth ( ) ; } hurtTime = par1NBTTagCompound . getShort ( "<STR_LIT>" ) ; deathTime = par1NBTTagCompound . getShort ( "<STR_LIT>" ) ; attackTime = par1NBTTagCompound . getShort ( "<STR_LIT>" ) ; if ( par1NBTTagCompound . hasKey ( "<STR_LIT>" ) ) { NBTTagList nbttaglist = par1NBTTagCompound . getTagList ( "<STR_LIT>" ) ; for ( int i = <NUM_LIT:0> ; i < nbttaglist . tagCount ( ) ; i ++ ) { NBTTagCompound nbttagcompound = ( NBTTagCompound ) nbttaglist . tagAt ( i ) ; byte byte0 = nbttagcompound . getByte ( "<STR_LIT>" ) ; byte byte1 = nbttagcompound . getByte ( "<STR_LIT>" ) ; int j = nbttagcompound . getInteger ( "<STR_LIT>" ) ; activePotionsMap . put ( Integer . valueOf ( byte0 ) , new PotionEffect ( byte0 , j , byte1 ) ) ; } } } public boolean isEntityAlive ( ) { return ! isDead && health > <NUM_LIT:0> ; } public boolean canBreatheUnderwater ( ) { return false ; } public void setMoveForward ( float par1 ) { moveForward = par1 ; } public void setJumping ( boolean par1 ) { isJumping = par1 ; } public void onLivingUpdate ( ) { if ( jumpTicks > <NUM_LIT:0> ) { jumpTicks -- ; } if ( newPosRotationIncrements > <NUM_LIT:0> ) { double d = posX + ( newPosX - posX ) / ( double ) newPosRotationIncrements ; double d1 = posY + ( newPosY - posY ) / ( double ) newPosRotationIncrements ; double d2 = posZ + ( newPosZ - posZ ) / ( double ) newPosRotationIncrements ; double d3 ; for ( d3 = newRotationYaw - ( double ) rotationYaw ; d3 < - <NUM_LIT> ; d3 += <NUM_LIT> ) { } for ( ; d3 >= <NUM_LIT> ; d3 -= <NUM_LIT> ) { } rotationYaw += d3 / ( double ) newPosRotationIncrements ; rotationPitch += ( newRotationPitch - ( double ) rotationPitch ) / ( double ) newPosRotationIncrements ; newPosRotationIncrements -- ; setPosition ( d , d1 , d2 ) ; setRotation ( rotationYaw , rotationPitch ) ; List list1 = worldObj . getCollidingBoundingBoxes ( this , boundingBox . contract ( <NUM_LIT> , <NUM_LIT> , <NUM_LIT> ) ) ; if ( list1 . size ( ) > <NUM_LIT:0> ) { double d4 = <NUM_LIT> ; for ( int j = <NUM_LIT:0> ; j < list1 . size ( ) ; j ++ ) { AxisAlignedBB axisalignedbb = ( AxisAlignedBB ) list1 . get ( j ) ; if ( axisalignedbb . maxY > d4 ) { d4 = axisalignedbb . maxY ; } } d1 += d4 - boundingBox . minY ; setPosition ( d , d1 , d2 ) ; } } Profiler . startSection ( "<STR_LIT>" ) ; if ( isMovementBlocked ( ) ) { isJumping = false ; moveStrafing = <NUM_LIT> ; moveForward = <NUM_LIT> ; randomYawVelocity = <NUM_LIT> ; } else if ( isClientWorld ( ) ) { if ( isAIEnabled ( ) ) { Profiler . startSection ( "<STR_LIT>" ) ; updateAITasks ( ) ; Profiler . endSection ( ) ; } else { Profiler . startSection ( "<STR_LIT>" ) ; updateEntityActionState ( ) ; Profiler . endSection ( ) ; rotationYawHead = rotationYaw ; } } Profiler . endSection ( ) ; boolean flag = isInWater ( ) ; boolean flag1 = handleLavaMovement ( ) ; if ( isJumping ) { if ( flag ) { motionY += <NUM_LIT> ; } else if ( flag1 ) { motionY += <NUM_LIT> ; } else if ( onGround && jumpTicks == <NUM_LIT:0> ) { jump ( ) ; jumpTicks = <NUM_LIT:10> ; } } else { jumpTicks = <NUM_LIT:0> ; } moveStrafing *= <NUM_LIT> ; moveForward *= <NUM_LIT> ; randomYawVelocity *= <NUM_LIT> ; float f = landMovementFactor ; landMovementFactor *= getSpeedModifier ( ) ; moveEntityWithHeading ( moveStrafing , moveForward ) ; landMovementFactor = f ; Profiler . startSection ( "<STR_LIT>" ) ; List list = worldObj . getEntitiesWithinAABBExcludingEntity ( this , boundingBox . expand ( <NUM_LIT> , <NUM_LIT> , <NUM_LIT> ) ) ; if ( list != null && list . size ( ) > <NUM_LIT:0> ) { for ( int i = <NUM_LIT:0> ; i < list . size ( ) ; i ++ ) { Entity entity = ( Entity ) list . get ( i ) ; if ( entity . canBePushed ( ) ) { entity . applyEntityCollision ( this ) ; } } } Profiler . endSection ( ) ; } protected boolean isAIEnabled ( ) { return false ; } protected boolean isClientWorld ( ) { return ! worldObj . isRemote ; } protected boolean isMovementBlocked ( ) { return health <= <NUM_LIT:0> ; } public boolean isBlocking ( ) { return false ; } protected void jump ( ) { motionY = <NUM_LIT> ; if ( isPotionActive ( Potion . jump ) ) { motionY += ( float ) ( getActivePotionEffect ( Potion . jump ) . getAmplifier ( ) + <NUM_LIT:1> ) * <NUM_LIT> ; } if ( isSprinting ( ) ) { float f = rotationYaw * <NUM_LIT> ; motionX -= MathHelper . sin ( f ) * <NUM_LIT> ; motionZ += MathHelper . cos ( f ) * <NUM_LIT> ; } isAirBorne = true ; } protected boolean canDespawn ( ) { return true ; } protected void despawnEntity ( ) { EntityPlayer entityplayer = worldObj . getClosestPlayerToEntity ( this , - <NUM_LIT> ) ; if ( entityplayer != null ) { double d = ( ( Entity ) ( entityplayer ) ) . posX - posX ; double d1 = ( ( Entity ) ( entityplayer ) ) . posY - posY ; double d2 = ( ( Entity ) ( entityplayer ) ) . posZ - posZ ; double d3 = d * d + d1 * d1 + d2 * d2 ; if ( canDespawn ( ) && d3 > <NUM_LIT> ) { setDead ( ) ; } if ( entityAge > <NUM_LIT> && rand . nextInt ( <NUM_LIT> ) == <NUM_LIT:0> && d3 > <NUM_LIT> && canDespawn ( ) ) { setDead ( ) ; } else if ( d3 < <NUM_LIT> ) { entityAge = <NUM_LIT:0> ; } } } protected void updateAITasks ( ) { entityAge ++ ; Profiler . startSection ( "<STR_LIT>" ) ; despawnEntity ( ) ; Profiler . endSection ( ) ; Profiler . startSection ( "<STR_LIT>" ) ; field_48343_m . clearSensingCache ( ) ; Profiler . endSection ( ) ; Profiler . startSection ( "<STR_LIT>" ) ; targetTasks . onUpdateTasks ( ) ; Profiler . endSection ( ) ; Profiler . startSection ( "<STR_LIT>" ) ; tasks . onUpdateTasks ( ) ; Profiler . endSection ( ) ; Profiler . startSection ( "<STR_LIT>" ) ; navigator . onUpdateNavigation ( ) ; Profiler . endSection ( ) ; Profiler . startSection ( "<STR_LIT>" ) ; updateAITick ( ) ; Profiler . endSection ( ) ; Profiler . startSection ( "<STR_LIT>" ) ; moveHelper . onUpdateMoveHelper ( ) ; lookHelper . onUpdateLook ( ) ; jumpHelper . doJump ( ) ; Profiler . endSection ( ) ; } protected void updateAITick ( ) { } protected void updateEntityActionState ( ) { entityAge ++ ; despawnEntity ( ) ; moveStrafing = <NUM_LIT> ; moveForward = <NUM_LIT> ; float f = <NUM_LIT> ; if ( rand . nextFloat ( ) < <NUM_LIT> ) { EntityPlayer entityplayer = worldObj . getClosestPlayerToEntity ( this , f ) ; if ( entityplayer != null ) { currentTarget = entityplayer ; numTicksToChaseTarget = <NUM_LIT:10> + rand . nextInt ( <NUM_LIT:20> ) ; } else { randomYawVelocity = ( rand . nextFloat ( ) - <NUM_LIT> ) * <NUM_LIT> ; } } if ( currentTarget != null ) { faceEntity ( currentTarget , <NUM_LIT> , getVerticalFaceSpeed ( ) ) ; if ( numTicksToChaseTarget -- <= <NUM_LIT:0> || currentTarget . isDead || currentTarget . getDistanceSqToEntity ( this ) > ( double ) ( f * f ) ) { currentTarget = null ; } } else { if ( rand . nextFloat ( ) < <NUM_LIT> ) { randomYawVelocity = ( rand . nextFloat ( ) - <NUM_LIT> ) * <NUM_LIT> ; } rotationYaw += randomYawVelocity ; rotationPitch = defaultPitch ; } boolean flag = isInWater ( ) ; boolean flag1 = handleLavaMovement ( ) ; if ( flag || flag1 ) { isJumping = rand . nextFloat ( ) < <NUM_LIT> ; } } public int getVerticalFaceSpeed ( ) { return <NUM_LIT> ; } public void faceEntity ( Entity par1Entity , float par2 , float par3 ) { double d = par1Entity . posX - posX ; double d2 = par1Entity . posZ - posZ ; double d1 ; if ( par1Entity instanceof EntityLiving ) { EntityLiving entityliving = ( EntityLiving ) par1Entity ; d1 = ( posY + ( double ) getEyeHeight ( ) ) - ( entityliving . posY + ( double ) entityliving . getEyeHeight ( ) ) ; } else { d1 = ( par1Entity . boundingBox . minY + par1Entity . boundingBox . maxY ) / <NUM_LIT> - ( posY + ( double ) getEyeHeight ( ) ) ; } double d3 = MathHelper . sqrt_double ( d * d + d2 * d2 ) ; float f = ( float ) ( ( Math . atan2 ( d2 , d ) * <NUM_LIT> ) / Math . PI ) - <NUM_LIT> ; float f1 = ( float ) ( - ( ( Math . atan2 ( d1 , d3 ) * <NUM_LIT> ) / Math . PI ) ) ; rotationPitch = - updateRotation ( rotationPitch , f1 , par3 ) ; rotationYaw = updateRotation ( rotationYaw , f , par2 ) ; } private float updateRotation ( float par1 , float par2 , float par3 ) { float f ; for ( f = par2 - par1 ; f < - <NUM_LIT> ; f += <NUM_LIT> ) { } for ( ; f >= <NUM_LIT> ; f -= <NUM_LIT> ) { } if ( f > par3 ) { f = par3 ; } if ( f < - par3 ) { f = - par3 ; } return par1 + f ; } public void onEntityDeath ( ) { } public boolean getCanSpawnHere ( ) { return worldObj . checkIfAABBIsClear ( boundingBox ) && worldObj . getCollidingBoundingBoxes ( this , boundingBox ) . size ( ) == <NUM_LIT:0> && ! worldObj . isAnyLiquid ( boundingBox ) ; } protected void kill ( ) { attackEntityFrom ( DamageSource . outOfWorld , <NUM_LIT:4> ) ; } public Vec3D getLookVec ( ) { return getLook ( <NUM_LIT> ) ; } public Vec3D getLook ( float par1 ) { if ( par1 == <NUM_LIT> ) { float f = MathHelper . cos ( - rotationYaw * <NUM_LIT> - ( float ) Math . PI ) ; float f2 = MathHelper . sin ( - rotationYaw * <NUM_LIT> - ( float ) Math . PI ) ; float f4 = - MathHelper . cos ( - rotationPitch * <NUM_LIT> ) ; float f6 = MathHelper . sin ( - rotationPitch * <NUM_LIT> ) ; return Vec3D . createVector ( f2 * f4 , f6 , f * f4 ) ; } else { float f1 = prevRotationPitch + ( rotationPitch - prevRotationPitch ) * par1 ; float f3 = prevRotationYaw + ( rotationYaw - prevRotationYaw ) * par1 ; float f5 = MathHelper . cos ( - f3 * <NUM_LIT> - ( float ) Math . PI ) ; float f7 = MathHelper . sin ( - f3 * <NUM_LIT> - ( float ) Math . PI ) ; float f8 = - MathHelper . cos ( - f1 * <NUM_LIT> ) ; float f9 = MathHelper . sin ( - f1 * <NUM_LIT> ) ; return Vec3D . createVector ( f7 * f8 , f9 , f5 * f8 ) ; } } public int getMaxSpawnedInChunk ( ) { return <NUM_LIT:4> ; } public boolean isPlayerSleeping ( ) { return false ; } protected void updatePotionEffects ( ) { Iterator iterator = activePotionsMap . keySet ( ) . iterator ( ) ; do { if ( ! iterator . hasNext ( ) ) { break ; } Integer integer = ( Integer ) iterator . next ( ) ; PotionEffect potioneffect = ( PotionEffect ) activePotionsMap . get ( integer ) ; if ( ! potioneffect . onUpdate ( this ) && ! worldObj . isRemote ) { iterator . remove ( ) ; onFinishedPotionEffect ( potioneffect ) ; } } while ( true ) ; if ( potionsNeedUpdate ) { if ( ! worldObj . isRemote ) { if ( ! activePotionsMap . isEmpty ( ) ) { int i = PotionHelper . func_40553_a ( activePotionsMap . values ( ) ) ; dataWatcher . updateObject ( <NUM_LIT:8> , Integer . valueOf ( i ) ) ; } else { dataWatcher . updateObject ( <NUM_LIT:8> , Integer . valueOf ( <NUM_LIT:0> ) ) ; } } potionsNeedUpdate = false ; } if ( rand . nextBoolean ( ) ) { int j = dataWatcher . getWatchableObjectInt ( <NUM_LIT:8> ) ; if ( j > <NUM_LIT:0> ) { double d = ( double ) ( j > > <NUM_LIT:16> & <NUM_LIT> ) / <NUM_LIT> ; double d1 = ( double ) ( j > > <NUM_LIT:8> & <NUM_LIT> ) / <NUM_LIT> ; double d2 = ( double ) ( j > > <NUM_LIT:0> & <NUM_LIT> ) / <NUM_LIT> ; worldObj . spawnParticle ( "<STR_LIT>" , posX + ( rand . nextDouble ( ) - <NUM_LIT> ) * ( double ) width , ( posY + rand . nextDouble ( ) * ( double ) height ) - ( double ) yOffset , posZ + ( rand . nextDouble ( ) - <NUM_LIT> ) * ( double ) width , d , d1 , d2 ) ; } } } public void clearActivePotions ( ) { Iterator iterator = activePotionsMap . keySet ( ) . iterator ( ) ; do { if ( ! iterator . hasNext ( ) ) { break ; } Integer integer = ( Integer ) iterator . next ( ) ; PotionEffect potioneffect = ( PotionEffect ) activePotionsMap . get ( integer ) ; if ( ! worldObj . isRemote ) { iterator . remove ( ) ; onFinishedPotionEffect ( potioneffect ) ; } } while ( true ) ; } public Collection getActivePotionEffects ( ) { return activePotionsMap . values ( ) ; } public boolean isPotionActive ( Potion par1Potion ) { return activePotionsMap . containsKey ( Integer . valueOf ( par1Potion . id ) ) ; } public PotionEffect getActivePotionEffect ( Potion par1Potion ) { return ( PotionEffect ) activePotionsMap . get ( Integer . valueOf ( par1Potion . id ) ) ; } public void addPotionEffect ( PotionEffect par1PotionEffect ) { if ( ! isPotionApplicable ( par1PotionEffect ) ) { return ; } if ( activePotionsMap . containsKey ( Integer . valueOf ( par1PotionEffect . getPotionID ( ) ) ) ) { ( ( PotionEffect ) activePotionsMap . get ( Integer . valueOf ( par1PotionEffect . getPotionID ( ) ) ) ) . combine ( par1PotionEffect ) ; onChangedPotionEffect ( ( PotionEffect ) activePotionsMap . get ( Integer . valueOf ( par1PotionEffect . getPotionID ( ) ) ) ) ; } else { activePotionsMap . put ( Integer . valueOf ( par1PotionEffect . getPotionID ( ) ) , par1PotionEffect ) ; onNewPotionEffect ( par1PotionEffect ) ; } } public boolean isPotionApplicable ( PotionEffect par1PotionEffect ) { if ( getCreatureAttribute ( ) == EnumCreatureAttribute . UNDEAD ) { int i = par1PotionEffect . getPotionID ( ) ; if ( i == Potion . regeneration . id || i == Potion . poison . id ) { return false ; } } return true ; } public boolean isEntityUndead ( ) { return getCreatureAttribute ( ) == EnumCreatureAttribute . UNDEAD ; } protected void onNewPotionEffect ( PotionEffect par1PotionEffect ) { potionsNeedUpdate = true ; } protected void onChangedPotionEffect ( PotionEffect par1PotionEffect ) { potionsNeedUpdate = true ; } protected void onFinishedPotionEffect ( PotionEffect par1PotionEffect ) { potionsNeedUpdate = true ; } protected float getSpeedModifier ( ) { float f = <NUM_LIT> ; if ( isPotionActive ( Potion . moveSpeed ) ) { f *= <NUM_LIT> + <NUM_LIT> * ( float ) ( getActivePotionEffect ( Potion . moveSpeed ) . getAmplifier ( ) + <NUM_LIT:1> ) ; } if ( isPotionActive ( Potion . moveSlowdown ) ) { f *= <NUM_LIT> - <NUM_LIT> * ( float ) ( getActivePotionEffect ( Potion . moveSlowdown ) . getAmplifier ( ) + <NUM_LIT:1> ) ; } return f ; } public void setPositionAndUpdate ( double par1 , double par3 , double par5 ) { setLocationAndAngles ( par1 , par3 , par5 , rotationYaw , rotationPitch ) ; } public boolean isChild ( ) { return false ; } public EnumCreatureAttribute getCreatureAttribute ( ) { return EnumCreatureAttribute . UNDEFINED ; } public void renderBrokenItemStack ( ItemStack par1ItemStack ) { worldObj . playSoundAtEntity ( this , "<STR_LIT>" , <NUM_LIT> , <NUM_LIT> + worldObj . rand . nextFloat ( ) * <NUM_LIT> ) ; for ( int i = <NUM_LIT:0> ; i < <NUM_LIT:5> ; i ++ ) { Vec3D vec3d = Vec3D . createVector ( ( ( double ) rand . nextFloat ( ) - <NUM_LIT> ) * <NUM_LIT> , Math . random ( ) * <NUM_LIT> + <NUM_LIT> , <NUM_LIT> ) ; vec3d . rotateAroundX ( ( - rotationPitch * ( float ) Math . PI ) / <NUM_LIT> ) ; vec3d . rotateAroundY ( ( - rotationYaw * ( float ) Math . PI ) / <NUM_LIT> ) ; Vec3D vec3d1 = Vec3D . createVector ( ( ( double ) rand . nextFloat ( ) - <NUM_LIT> ) * <NUM_LIT> , ( double ) ( - rand . nextFloat ( ) ) * <NUM_LIT> - <NUM_LIT> , <NUM_LIT> ) ; vec3d1 . rotateAroundX ( ( - rotationPitch * ( float ) Math . PI ) / <NUM_LIT> ) ; vec3d1 . rotateAroundY ( ( - rotationYaw * ( float ) Math . PI ) / <NUM_LIT> ) ; vec3d1 = vec3d1 . addVector ( posX , posY + ( double ) getEyeHeight ( ) , posZ ) ; worldObj . spawnParticle ( ( new StringBuilder ( ) ) . append ( "<STR_LIT>" ) . append ( par1ItemStack . getItem ( ) . shiftedIndex ) . toString ( ) , vec3d1 . xCoord , vec3d1 . yCoord , vec3d1 . zCoord , vec3d . xCoord , vec3d . yCoord + <NUM_LIT> , vec3d . zCoord ) ; } } } </s>
<s> package net . minecraft . src ; import java . util . Random ; public class BlockSand extends Block { public static boolean fallInstantly = false ; public BlockSand ( int par1 , int par2 ) { super ( par1 , par2 , Material . sand ) ; } public void onBlockAdded ( World par1World , int par2 , int par3 , int par4 ) { par1World . scheduleBlockUpdate ( par2 , par3 , par4 , blockID , tickRate ( ) ) ; } public void onNeighborBlockChange ( World par1World , int par2 , int par3 , int par4 , int par5 ) { par1World . scheduleBlockUpdate ( par2 , par3 , par4 , blockID , tickRate ( ) ) ; } public void updateTick ( World par1World , int par2 , int par3 , int par4 , Random par5Random ) { tryToFall ( par1World , par2 , par3 , par4 ) ; } private void tryToFall ( World par1World , int par2 , int par3 , int par4 ) { int i = par2 ; int j = par3 ; int k = par4 ; if ( canFallBelow ( par1World , i , j - <NUM_LIT:1> , k ) && j >= <NUM_LIT:0> ) { byte byte0 = <NUM_LIT:32> ; if ( fallInstantly || ! par1World . checkChunksExist ( par2 - byte0 , par3 - byte0 , par4 - byte0 , par2 + byte0 , par3 + byte0 , par4 + byte0 ) ) { par1World . setBlockWithNotify ( par2 , par3 , par4 , <NUM_LIT:0> ) ; for ( ; canFallBelow ( par1World , par2 , par3 - <NUM_LIT:1> , par4 ) && par3 > <NUM_LIT:0> ; par3 -- ) { } if ( par3 > <NUM_LIT:0> ) { par1World . setBlockWithNotify ( par2 , par3 , par4 , blockID ) ; } } else if ( ! par1World . isRemote ) { EntityFallingSand entityfallingsand = new EntityFallingSand ( par1World , ( float ) par2 + <NUM_LIT> , ( float ) par3 + <NUM_LIT> , ( float ) par4 + <NUM_LIT> , blockID ) ; par1World . spawnEntityInWorld ( entityfallingsand ) ; } } } public int tickRate ( ) { return <NUM_LIT:3> ; } public static boolean canFallBelow ( World par0World , int par1 , int par2 , int par3 ) { int i = par0World . getBlockId ( par1 , par2 , par3 ) ; if ( i == <NUM_LIT:0> ) { return true ; } if ( i == Block . fire . blockID ) { return true ; } Material material = Block . blocksList [ i ] . blockMaterial ; if ( material == Material . water ) { return true ; } return material == Material . lava ; } } </s>
<s> package net . minecraft . src ; import java . io . * ; public class NBTTagInt extends NBTBase { public int data ; public NBTTagInt ( String par1Str ) { super ( par1Str ) ; } public NBTTagInt ( String par1Str , int par2 ) { super ( par1Str ) ; data = par2 ; } void write ( DataOutput par1DataOutput ) throws IOException { par1DataOutput . writeInt ( data ) ; } void load ( DataInput par1DataInput ) throws IOException { data = par1DataInput . readInt ( ) ; } public byte getId ( ) { return <NUM_LIT:3> ; } public String toString ( ) { return ( new StringBuilder ( ) ) . append ( "<STR_LIT>" ) . append ( data ) . toString ( ) ; } public NBTBase copy ( ) { return new NBTTagInt ( getName ( ) , data ) ; } public boolean equals ( Object par1Obj ) { if ( super . equals ( par1Obj ) ) { NBTTagInt nbttagint = ( NBTTagInt ) par1Obj ; return data == nbttagint . data ; } else { return false ; } } public int hashCode ( ) { return super . hashCode ( ) ^ data ; } } </s>
<s> package net . minecraft . src ; public class Direction { public static final int offsetX [ ] = { <NUM_LIT:0> , - <NUM_LIT:1> , <NUM_LIT:0> , <NUM_LIT:1> } ; public static final int offsetZ [ ] = { <NUM_LIT:1> , <NUM_LIT:0> , - <NUM_LIT:1> , <NUM_LIT:0> } ; public static final int headInvisibleFace [ ] = { <NUM_LIT:3> , <NUM_LIT:4> , <NUM_LIT:2> , <NUM_LIT:5> } ; public static final int vineGrowth [ ] = { - <NUM_LIT:1> , - <NUM_LIT:1> , <NUM_LIT:2> , <NUM_LIT:0> , <NUM_LIT:1> , <NUM_LIT:3> } ; public static final int footInvisibleFaceRemap [ ] = { <NUM_LIT:2> , <NUM_LIT:3> , <NUM_LIT:0> , <NUM_LIT:1> } ; public static final int enderEyeMetaToDirection [ ] = { <NUM_LIT:1> , <NUM_LIT:2> , <NUM_LIT:3> , <NUM_LIT:0> } ; public static final int field_35608_g [ ] = { <NUM_LIT:3> , <NUM_LIT:0> , <NUM_LIT:1> , <NUM_LIT:2> } ; public static final int bedDirection [ ] [ ] = { { <NUM_LIT:1> , <NUM_LIT:0> , <NUM_LIT:3> , <NUM_LIT:2> , <NUM_LIT:5> , <NUM_LIT:4> } , { <NUM_LIT:1> , <NUM_LIT:0> , <NUM_LIT:5> , <NUM_LIT:4> , <NUM_LIT:2> , <NUM_LIT:3> } , { <NUM_LIT:1> , <NUM_LIT:0> , <NUM_LIT:2> , <NUM_LIT:3> , <NUM_LIT:4> , <NUM_LIT:5> } , { <NUM_LIT:1> , <NUM_LIT:0> , <NUM_LIT:4> , <NUM_LIT:5> , <NUM_LIT:3> , <NUM_LIT:2> } } ; public Direction ( ) { } } </s>
<s> package net . minecraft . src ; import java . io . * ; public class Packet105UpdateProgressbar extends Packet { public int windowId ; public int progressBar ; public int progressBarValue ; public Packet105UpdateProgressbar ( ) { } public Packet105UpdateProgressbar ( int par1 , int par2 , int par3 ) { windowId = par1 ; progressBar = par2 ; progressBarValue = par3 ; } public void processPacket ( NetHandler par1NetHandler ) { par1NetHandler . handleUpdateProgressbar ( this ) ; } public void readPacketData ( DataInputStream par1DataInputStream ) throws IOException { windowId = par1DataInputStream . readByte ( ) ; progressBar = par1DataInputStream . readShort ( ) ; progressBarValue = par1DataInputStream . readShort ( ) ; } public void writePacketData ( DataOutputStream par1DataOutputStream ) throws IOException { par1DataOutputStream . writeByte ( windowId ) ; par1DataOutputStream . writeShort ( progressBar ) ; par1DataOutputStream . writeShort ( progressBarValue ) ; } public int getPacketSize ( ) { return <NUM_LIT:5> ; } } </s>
<s> package net . minecraft . src ; import java . io . IOException ; import java . util . * ; public class ChunkProvider implements IChunkProvider { private Set droppedChunksSet ; private Chunk emptyChunk ; private IChunkProvider chunkProvider ; private IChunkLoader chunkLoader ; private LongHashMap chunkMap ; private List chunkList ; private World worldObj ; private int field_35557_h ; public ChunkProvider ( World par1World , IChunkLoader par2IChunkLoader , IChunkProvider par3IChunkProvider ) { droppedChunksSet = new HashSet ( ) ; chunkMap = new LongHashMap ( ) ; chunkList = new ArrayList ( ) ; emptyChunk = new EmptyChunk ( par1World , <NUM_LIT:0> , <NUM_LIT:0> ) ; worldObj = par1World ; chunkLoader = par2IChunkLoader ; chunkProvider = par3IChunkProvider ; } public boolean chunkExists ( int par1 , int par2 ) { return chunkMap . containsItem ( ChunkCoordIntPair . chunkXZ2Int ( par1 , par2 ) ) ; } public void dropChunk ( int par1 , int par2 ) { ChunkCoordinates chunkcoordinates = worldObj . getSpawnPoint ( ) ; int i = ( par1 * <NUM_LIT:16> + <NUM_LIT:8> ) - chunkcoordinates . posX ; int j = ( par2 * <NUM_LIT:16> + <NUM_LIT:8> ) - chunkcoordinates . posZ ; char c = '<STR_LIT>' ; if ( i < - c || i > c || j < - c || j > c ) { droppedChunksSet . add ( Long . valueOf ( ChunkCoordIntPair . chunkXZ2Int ( par1 , par2 ) ) ) ; } } public Chunk loadChunk ( int par1 , int par2 ) { long l = ChunkCoordIntPair . chunkXZ2Int ( par1 , par2 ) ; droppedChunksSet . remove ( Long . valueOf ( l ) ) ; Chunk chunk = ( Chunk ) chunkMap . getValueByKey ( l ) ; if ( chunk == null ) { int i = <NUM_LIT> ; if ( par1 < - i || par2 < - i || par1 >= i || par2 >= i ) { return emptyChunk ; } chunk = loadChunkFromFile ( par1 , par2 ) ; if ( chunk == null ) { if ( chunkProvider == null ) { chunk = emptyChunk ; } else { chunk = chunkProvider . provideChunk ( par1 , par2 ) ; } } chunkMap . add ( l , chunk ) ; chunkList . add ( chunk ) ; if ( chunk != null ) { chunk . func_4053_c ( ) ; chunk . onChunkLoad ( ) ; } chunk . populateChunk ( this , this , par1 , par2 ) ; } return chunk ; } public Chunk provideChunk ( int par1 , int par2 ) { Chunk chunk = ( Chunk ) chunkMap . getValueByKey ( ChunkCoordIntPair . chunkXZ2Int ( par1 , par2 ) ) ; if ( chunk == null ) { return loadChunk ( par1 , par2 ) ; } else { return chunk ; } } private Chunk loadChunkFromFile ( int par1 , int par2 ) { if ( chunkLoader == null ) { return null ; } try { Chunk chunk = chunkLoader . loadChunk ( worldObj , par1 , par2 ) ; if ( chunk != null ) { chunk . lastSaveTime = worldObj . getWorldTime ( ) ; } return chunk ; } catch ( Exception exception ) { exception . printStackTrace ( ) ; } return null ; } private void saveChunkExtraData ( Chunk par1Chunk ) { if ( chunkLoader == null ) { return ; } try { chunkLoader . saveExtraChunkData ( worldObj , par1Chunk ) ; } catch ( Exception exception ) { exception . printStackTrace ( ) ; } } private void saveChunkData ( Chunk par1Chunk ) { if ( chunkLoader == null ) { return ; } try { par1Chunk . lastSaveTime = worldObj . getWorldTime ( ) ; chunkLoader . saveChunk ( worldObj , par1Chunk ) ; } catch ( IOException ioexception ) { ioexception . printStackTrace ( ) ; } } public void populate ( IChunkProvider par1IChunkProvider , int par2 , int par3 ) { Chunk chunk = provideChunk ( par2 , par3 ) ; if ( ! chunk . isTerrainPopulated ) { chunk . isTerrainPopulated = true ; if ( chunkProvider != null ) { chunkProvider . populate ( par1IChunkProvider , par2 , par3 ) ; chunk . setChunkModified ( ) ; } } } public boolean saveChunks ( boolean par1 , IProgressUpdate par2IProgressUpdate ) { int i = <NUM_LIT:0> ; for ( int j = <NUM_LIT:0> ; j < chunkList . size ( ) ; j ++ ) { Chunk chunk = ( Chunk ) chunkList . get ( j ) ; if ( par1 ) { saveChunkExtraData ( chunk ) ; } if ( ! chunk . needsSaving ( par1 ) ) { continue ; } saveChunkData ( chunk ) ; chunk . isModified = false ; if ( ++ i == <NUM_LIT:24> && ! par1 ) { return false ; } } if ( par1 ) { if ( chunkLoader == null ) { return true ; } chunkLoader . saveExtraData ( ) ; } return true ; } public boolean unload100OldestChunks ( ) { for ( int i = <NUM_LIT:0> ; i < <NUM_LIT:100> ; i ++ ) { if ( ! droppedChunksSet . isEmpty ( ) ) { Long long1 = ( Long ) droppedChunksSet . iterator ( ) . next ( ) ; Chunk chunk1 = ( Chunk ) chunkMap . getValueByKey ( long1 . longValue ( ) ) ; chunk1 . onChunkUnload ( ) ; saveChunkData ( chunk1 ) ; saveChunkExtraData ( chunk1 ) ; droppedChunksSet . remove ( long1 ) ; chunkMap . remove ( long1 . longValue ( ) ) ; chunkList . remove ( chunk1 ) ; } } for ( int j = <NUM_LIT:0> ; j < <NUM_LIT:10> ; j ++ ) { if ( field_35557_h >= chunkList . size ( ) ) { field_35557_h = <NUM_LIT:0> ; break ; } Chunk chunk = ( Chunk ) chunkList . get ( field_35557_h ++ ) ; EntityPlayer entityplayer = worldObj . func_48087_a ( ( double ) ( chunk . xPosition << <NUM_LIT:4> ) + <NUM_LIT> , ( double ) ( chunk . zPosition << <NUM_LIT:4> ) + <NUM_LIT> , <NUM_LIT> ) ; if ( entityplayer == null ) { dropChunk ( chunk . xPosition , chunk . zPosition ) ; } } if ( chunkLoader != null ) { chunkLoader . chunkTick ( ) ; } return chunkProvider . unload100OldestChunks ( ) ; } public boolean canSave ( ) { return true ; } public List getPossibleCreatures ( EnumCreatureType par1EnumCreatureType , int par2 , int par3 , int par4 ) { return chunkProvider . getPossibleCreatures ( par1EnumCreatureType , par2 , par3 , par4 ) ; } public ChunkPosition findClosestStructure ( World par1World , String par2Str , int par3 , int par4 , int par5 ) { return chunkProvider . findClosestStructure ( par1World , par2Str , par3 , par4 , par5 ) ; } } </s>
<s> package net . minecraft . src ; import java . io . File ; import java . io . FilenameFilter ; class AnvilSaveConverterFileFilter implements FilenameFilter { final AnvilSaveConverter parent ; AnvilSaveConverterFileFilter ( AnvilSaveConverter par1AnvilSaveConverter ) { parent = par1AnvilSaveConverter ; } public boolean accept ( File par1File , String par2Str ) { return par2Str . endsWith ( "<STR_LIT>" ) ; } } </s>
<s> package net . minecraft . src ; public abstract class EntityAgeable extends EntityCreature { public EntityAgeable ( World par1World ) { super ( par1World ) ; } protected void entityInit ( ) { super . entityInit ( ) ; dataWatcher . addObject ( <NUM_LIT:12> , new Integer ( <NUM_LIT:0> ) ) ; } public int getGrowingAge ( ) { return dataWatcher . getWatchableObjectInt ( <NUM_LIT:12> ) ; } public void setGrowingAge ( int par1 ) { dataWatcher . updateObject ( <NUM_LIT:12> , Integer . valueOf ( par1 ) ) ; } public void writeEntityToNBT ( NBTTagCompound par1NBTTagCompound ) { super . writeEntityToNBT ( par1NBTTagCompound ) ; par1NBTTagCompound . setInteger ( "<STR_LIT>" , getGrowingAge ( ) ) ; } public void readEntityFromNBT ( NBTTagCompound par1NBTTagCompound ) { super . readEntityFromNBT ( par1NBTTagCompound ) ; setGrowingAge ( par1NBTTagCompound . getInteger ( "<STR_LIT>" ) ) ; } public void onLivingUpdate ( ) { super . onLivingUpdate ( ) ; int i = getGrowingAge ( ) ; if ( i < <NUM_LIT:0> ) { i ++ ; setGrowingAge ( i ) ; } else if ( i > <NUM_LIT:0> ) { i -- ; setGrowingAge ( i ) ; } } public boolean isChild ( ) { return getGrowingAge ( ) < <NUM_LIT:0> ; } } </s>
<s> package net . minecraft . src ; import java . util . * ; public class BlockBed extends BlockDirectional { public static final int headBlockToFootBlockMap [ ] [ ] = { { <NUM_LIT:0> , <NUM_LIT:1> } , { - <NUM_LIT:1> , <NUM_LIT:0> } , { <NUM_LIT:0> , - <NUM_LIT:1> } , { <NUM_LIT:1> , <NUM_LIT:0> } } ; public BlockBed ( int par1 ) { super ( par1 , <NUM_LIT> , Material . cloth ) ; setBounds ( ) ; } public boolean blockActivated ( World par1World , int par2 , int par3 , int par4 , EntityPlayer par5EntityPlayer ) { if ( par1World . isRemote ) { return true ; } int i = par1World . getBlockMetadata ( par2 , par3 , par4 ) ; if ( ! isBlockFootOfBed ( i ) ) { int j = getDirection ( i ) ; par2 += headBlockToFootBlockMap [ j ] [ <NUM_LIT:0> ] ; par4 += headBlockToFootBlockMap [ j ] [ <NUM_LIT:1> ] ; if ( par1World . getBlockId ( par2 , par3 , par4 ) != blockID ) { return true ; } i = par1World . getBlockMetadata ( par2 , par3 , par4 ) ; } if ( ! par1World . worldProvider . canRespawnHere ( ) ) { double d = ( double ) par2 + <NUM_LIT> ; double d1 = ( double ) par3 + <NUM_LIT> ; double d2 = ( double ) par4 + <NUM_LIT> ; par1World . setBlockWithNotify ( par2 , par3 , par4 , <NUM_LIT:0> ) ; int k = getDirection ( i ) ; par2 += headBlockToFootBlockMap [ k ] [ <NUM_LIT:0> ] ; par4 += headBlockToFootBlockMap [ k ] [ <NUM_LIT:1> ] ; if ( par1World . getBlockId ( par2 , par3 , par4 ) == blockID ) { par1World . setBlockWithNotify ( par2 , par3 , par4 , <NUM_LIT:0> ) ; d = ( d + ( double ) par2 + <NUM_LIT> ) / <NUM_LIT> ; d1 = ( d1 + ( double ) par3 + <NUM_LIT> ) / <NUM_LIT> ; d2 = ( d2 + ( double ) par4 + <NUM_LIT> ) / <NUM_LIT> ; } par1World . newExplosion ( null , ( float ) par2 + <NUM_LIT> , ( float ) par3 + <NUM_LIT> , ( float ) par4 + <NUM_LIT> , <NUM_LIT> , true ) ; return true ; } if ( isBedOccupied ( i ) ) { EntityPlayer entityplayer = null ; Iterator iterator = par1World . playerEntities . iterator ( ) ; do { if ( ! iterator . hasNext ( ) ) { break ; } EntityPlayer entityplayer1 = ( EntityPlayer ) iterator . next ( ) ; if ( entityplayer1 . isPlayerSleeping ( ) ) { ChunkCoordinates chunkcoordinates = entityplayer1 . playerLocation ; if ( chunkcoordinates . posX == par2 && chunkcoordinates . posY == par3 && chunkcoordinates . posZ == par4 ) { entityplayer = entityplayer1 ; } } } while ( true ) ; if ( entityplayer == null ) { setBedOccupied ( par1World , par2 , par3 , par4 , false ) ; } else { par5EntityPlayer . addChatMessage ( "<STR_LIT>" ) ; return true ; } } EnumStatus enumstatus = par5EntityPlayer . sleepInBedAt ( par2 , par3 , par4 ) ; if ( enumstatus == EnumStatus . OK ) { setBedOccupied ( par1World , par2 , par3 , par4 , true ) ; return true ; } if ( enumstatus == EnumStatus . NOT_POSSIBLE_NOW ) { par5EntityPlayer . addChatMessage ( "<STR_LIT>" ) ; } else if ( enumstatus == EnumStatus . NOT_SAFE ) { par5EntityPlayer . addChatMessage ( "<STR_LIT>" ) ; } return true ; } public int getBlockTextureFromSideAndMetadata ( int par1 , int par2 ) { if ( par1 == <NUM_LIT:0> ) { return Block . planks . blockIndexInTexture ; } int i = getDirection ( par2 ) ; int j = Direction . bedDirection [ i ] [ par1 ] ; if ( isBlockFootOfBed ( par2 ) ) { if ( j == <NUM_LIT:2> ) { return blockIndexInTexture + <NUM_LIT:2> + <NUM_LIT:16> ; } if ( j == <NUM_LIT:5> || j == <NUM_LIT:4> ) { return blockIndexInTexture + <NUM_LIT:1> + <NUM_LIT:16> ; } else { return blockIndexInTexture + <NUM_LIT:1> ; } } if ( j == <NUM_LIT:3> ) { return ( blockIndexInTexture - <NUM_LIT:1> ) + <NUM_LIT:16> ; } if ( j == <NUM_LIT:5> || j == <NUM_LIT:4> ) { return blockIndexInTexture + <NUM_LIT:16> ; } else { return blockIndexInTexture ; } } public int getRenderType ( ) { return <NUM_LIT> ; } public boolean renderAsNormalBlock ( ) { return false ; } public boolean isOpaqueCube ( ) { return false ; } public void setBlockBoundsBasedOnState ( IBlockAccess par1IBlockAccess , int par2 , int par3 , int par4 ) { setBounds ( ) ; } public void onNeighborBlockChange ( World par1World , int par2 , int par3 , int par4 , int par5 ) { int i = par1World . getBlockMetadata ( par2 , par3 , par4 ) ; int j = getDirection ( i ) ; if ( isBlockFootOfBed ( i ) ) { if ( par1World . getBlockId ( par2 - headBlockToFootBlockMap [ j ] [ <NUM_LIT:0> ] , par3 , par4 - headBlockToFootBlockMap [ j ] [ <NUM_LIT:1> ] ) != blockID ) { par1World . setBlockWithNotify ( par2 , par3 , par4 , <NUM_LIT:0> ) ; } } else if ( par1World . getBlockId ( par2 + headBlockToFootBlockMap [ j ] [ <NUM_LIT:0> ] , par3 , par4 + headBlockToFootBlockMap [ j ] [ <NUM_LIT:1> ] ) != blockID ) { par1World . setBlockWithNotify ( par2 , par3 , par4 , <NUM_LIT:0> ) ; if ( ! par1World . isRemote ) { dropBlockAsItem ( par1World , par2 , par3 , par4 , i , <NUM_LIT:0> ) ; } } } public int idDropped ( int par1 , Random par2Random , int par3 ) { if ( isBlockFootOfBed ( par1 ) ) { return <NUM_LIT:0> ; } else { return Item . bed . shiftedIndex ; } } private void setBounds ( ) { setBlockBounds ( <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> ) ; } public static boolean isBlockFootOfBed ( int par0 ) { return ( par0 & <NUM_LIT:8> ) != <NUM_LIT:0> ; } public static boolean isBedOccupied ( int par0 ) { return ( par0 & <NUM_LIT:4> ) != <NUM_LIT:0> ; } public static void setBedOccupied ( World par0World , int par1 , int par2 , int par3 , boolean par4 ) { int i = par0World . getBlockMetadata ( par1 , par2 , par3 ) ; if ( par4 ) { i |= <NUM_LIT:4> ; } else { i &= - <NUM_LIT:5> ; } par0World . setBlockMetadataWithNotify ( par1 , par2 , par3 , i ) ; } public static ChunkCoordinates getNearestEmptyChunkCoordinates ( World par0World , int par1 , int par2 , int par3 , int par4 ) { int i = par0World . getBlockMetadata ( par1 , par2 , par3 ) ; int j = BlockDirectional . getDirection ( i ) ; for ( int k = <NUM_LIT:0> ; k <= <NUM_LIT:1> ; k ++ ) { int l = par1 - headBlockToFootBlockMap [ j ] [ <NUM_LIT:0> ] * k - <NUM_LIT:1> ; int i1 = par3 - headBlockToFootBlockMap [ j ] [ <NUM_LIT:1> ] * k - <NUM_LIT:1> ; int j1 = l + <NUM_LIT:2> ; int k1 = i1 + <NUM_LIT:2> ; for ( int l1 = l ; l1 <= j1 ; l1 ++ ) { for ( int i2 = i1 ; i2 <= k1 ; i2 ++ ) { if ( ! par0World . isBlockNormalCube ( l1 , par2 - <NUM_LIT:1> , i2 ) || ! par0World . isAirBlock ( l1 , par2 , i2 ) || ! par0World . isAirBlock ( l1 , par2 + <NUM_LIT:1> , i2 ) ) { continue ; } if ( par4 > <NUM_LIT:0> ) { par4 -- ; } else { return new ChunkCoordinates ( l1 , par2 , i2 ) ; } } } } return null ; } public void dropBlockAsItemWithChance ( World par1World , int par2 , int par3 , int par4 , int par5 , float par6 , int par7 ) { if ( ! isBlockFootOfBed ( par5 ) ) { super . dropBlockAsItemWithChance ( par1World , par2 , par3 , par4 , par5 , par6 , <NUM_LIT:0> ) ; } } public int getMobilityFlag ( ) { return <NUM_LIT:1> ; } } </s>
<s> package net . minecraft . src ; import java . util . * ; public class BlockRedstoneTorch extends BlockTorch { private boolean torchActive ; private static List torchUpdates = new ArrayList ( ) ; public int getBlockTextureFromSideAndMetadata ( int par1 , int par2 ) { if ( par1 == <NUM_LIT:1> ) { return Block . redstoneWire . getBlockTextureFromSideAndMetadata ( par1 , par2 ) ; } else { return super . getBlockTextureFromSideAndMetadata ( par1 , par2 ) ; } } private boolean checkForBurnout ( World par1World , int par2 , int par3 , int par4 , boolean par5 ) { if ( par5 ) { torchUpdates . add ( new RedstoneUpdateInfo ( par2 , par3 , par4 , par1World . getWorldTime ( ) ) ) ; } int i = <NUM_LIT:0> ; for ( int j = <NUM_LIT:0> ; j < torchUpdates . size ( ) ; j ++ ) { RedstoneUpdateInfo redstoneupdateinfo = ( RedstoneUpdateInfo ) torchUpdates . get ( j ) ; if ( redstoneupdateinfo . x == par2 && redstoneupdateinfo . y == par3 && redstoneupdateinfo . z == par4 && ++ i >= <NUM_LIT:8> ) { return true ; } } return false ; } protected BlockRedstoneTorch ( int par1 , int par2 , boolean par3 ) { super ( par1 , par2 ) ; torchActive = false ; torchActive = par3 ; setTickRandomly ( true ) ; } public int tickRate ( ) { return <NUM_LIT:2> ; } public void onBlockAdded ( World par1World , int par2 , int par3 , int par4 ) { if ( par1World . getBlockMetadata ( par2 , par3 , par4 ) == <NUM_LIT:0> ) { super . onBlockAdded ( par1World , par2 , par3 , par4 ) ; } if ( torchActive ) { par1World . notifyBlocksOfNeighborChange ( par2 , par3 - <NUM_LIT:1> , par4 , blockID ) ; par1World . notifyBlocksOfNeighborChange ( par2 , par3 + <NUM_LIT:1> , par4 , blockID ) ; par1World . notifyBlocksOfNeighborChange ( par2 - <NUM_LIT:1> , par3 , par4 , blockID ) ; par1World . notifyBlocksOfNeighborChange ( par2 + <NUM_LIT:1> , par3 , par4 , blockID ) ; par1World . notifyBlocksOfNeighborChange ( par2 , par3 , par4 - <NUM_LIT:1> , blockID ) ; par1World . notifyBlocksOfNeighborChange ( par2 , par3 , par4 + <NUM_LIT:1> , blockID ) ; } } public void onBlockRemoval ( World par1World , int par2 , int par3 , int par4 ) { if ( torchActive ) { par1World . notifyBlocksOfNeighborChange ( par2 , par3 - <NUM_LIT:1> , par4 , blockID ) ; par1World . notifyBlocksOfNeighborChange ( par2 , par3 + <NUM_LIT:1> , par4 , blockID ) ; par1World . notifyBlocksOfNeighborChange ( par2 - <NUM_LIT:1> , par3 , par4 , blockID ) ; par1World . notifyBlocksOfNeighborChange ( par2 + <NUM_LIT:1> , par3 , par4 , blockID ) ; par1World . notifyBlocksOfNeighborChange ( par2 , par3 , par4 - <NUM_LIT:1> , blockID ) ; par1World . notifyBlocksOfNeighborChange ( par2 , par3 , par4 + <NUM_LIT:1> , blockID ) ; } } public boolean isPoweringTo ( IBlockAccess par1IBlockAccess , int par2 , int par3 , int par4 , int par5 ) { if ( ! torchActive ) { return false ; } int i = par1IBlockAccess . getBlockMetadata ( par2 , par3 , par4 ) ; if ( i == <NUM_LIT:5> && par5 == <NUM_LIT:1> ) { return false ; } if ( i == <NUM_LIT:3> && par5 == <NUM_LIT:3> ) { return false ; } if ( i == <NUM_LIT:4> && par5 == <NUM_LIT:2> ) { return false ; } if ( i == <NUM_LIT:1> && par5 == <NUM_LIT:5> ) { return false ; } return i != <NUM_LIT:2> || par5 != <NUM_LIT:4> ; } private boolean isIndirectlyPowered ( World par1World , int par2 , int par3 , int par4 ) { int i = par1World . getBlockMetadata ( par2 , par3 , par4 ) ; if ( i == <NUM_LIT:5> && par1World . isBlockIndirectlyProvidingPowerTo ( par2 , par3 - <NUM_LIT:1> , par4 , <NUM_LIT:0> ) ) { return true ; } if ( i == <NUM_LIT:3> && par1World . isBlockIndirectlyProvidingPowerTo ( par2 , par3 , par4 - <NUM_LIT:1> , <NUM_LIT:2> ) ) { return true ; } if ( i == <NUM_LIT:4> && par1World . isBlockIndirectlyProvidingPowerTo ( par2 , par3 , par4 + <NUM_LIT:1> , <NUM_LIT:3> ) ) { return true ; } if ( i == <NUM_LIT:1> && par1World . isBlockIndirectlyProvidingPowerTo ( par2 - <NUM_LIT:1> , par3 , par4 , <NUM_LIT:4> ) ) { return true ; } return i == <NUM_LIT:2> && par1World . isBlockIndirectlyProvidingPowerTo ( par2 + <NUM_LIT:1> , par3 , par4 , <NUM_LIT:5> ) ; } public void updateTick ( World par1World , int par2 , int par3 , int par4 , Random par5Random ) { boolean flag = isIndirectlyPowered ( par1World , par2 , par3 , par4 ) ; for ( ; torchUpdates . size ( ) > <NUM_LIT:0> && par1World . getWorldTime ( ) - ( ( RedstoneUpdateInfo ) torchUpdates . get ( <NUM_LIT:0> ) ) . updateTime > <NUM_LIT> ; torchUpdates . remove ( <NUM_LIT:0> ) ) { } if ( torchActive ) { if ( flag ) { par1World . setBlockAndMetadataWithNotify ( par2 , par3 , par4 , Block . torchRedstoneIdle . blockID , par1World . getBlockMetadata ( par2 , par3 , par4 ) ) ; if ( checkForBurnout ( par1World , par2 , par3 , par4 , true ) ) { par1World . playSoundEffect ( ( float ) par2 + <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:5> ; i ++ ) { double d = ( double ) par2 + par5Random . nextDouble ( ) * <NUM_LIT> + <NUM_LIT> ; double d1 = ( double ) par3 + par5Random . nextDouble ( ) * <NUM_LIT> + <NUM_LIT> ; double d2 = ( double ) par4 + par5Random . nextDouble ( ) * <NUM_LIT> + <NUM_LIT> ; par1World . spawnParticle ( "<STR_LIT>" , d , d1 , d2 , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> ) ; } } } } else if ( ! flag && ! checkForBurnout ( par1World , par2 , par3 , par4 , false ) ) { par1World . setBlockAndMetadataWithNotify ( par2 , par3 , par4 , Block . torchRedstoneActive . blockID , par1World . getBlockMetadata ( par2 , par3 , par4 ) ) ; } } public void onNeighborBlockChange ( World par1World , int par2 , int par3 , int par4 , int par5 ) { super . onNeighborBlockChange ( par1World , par2 , par3 , par4 , par5 ) ; par1World . scheduleBlockUpdate ( par2 , par3 , par4 , blockID , tickRate ( ) ) ; } public boolean isIndirectlyPoweringTo ( World par1World , int par2 , int par3 , int par4 , int par5 ) { if ( par5 == <NUM_LIT:0> ) { return isPoweringTo ( par1World , par2 , par3 , par4 , par5 ) ; } else { return false ; } } public int idDropped ( int par1 , Random par2Random , int par3 ) { return Block . torchRedstoneActive . blockID ; } public boolean canProvidePower ( ) { return true ; } } </s>
<s> package net . minecraft . src ; public class WorldProviderEnd extends WorldProvider { public WorldProviderEnd ( ) { } public void registerWorldChunkManager ( ) { worldChunkMgr = new WorldChunkManagerHell ( BiomeGenBase . sky , <NUM_LIT> , <NUM_LIT> ) ; worldType = <NUM_LIT:1> ; hasNoSky = true ; } public IChunkProvider getChunkProvider ( ) { return new ChunkProviderEnd ( worldObj , worldObj . getSeed ( ) ) ; } public float calculateCelestialAngle ( long par1 , float par3 ) { return <NUM_LIT> ; } public boolean canRespawnHere ( ) { return false ; } public boolean func_48567_d ( ) { return false ; } public boolean canCoordinateBeSpawn ( int par1 , int par2 ) { int i = worldObj . getFirstUncoveredBlock ( par1 , par2 ) ; if ( i == <NUM_LIT:0> ) { return false ; } else { return Block . blocksList [ i ] . blockMaterial . blocksMovement ( ) ; } } public ChunkCoordinates getEntrancePortalLocation ( ) { return new ChunkCoordinates ( <NUM_LIT:100> , <NUM_LIT> , <NUM_LIT:0> ) ; } public int getAverageGroundLevel ( ) { return <NUM_LIT> ; } } </s>
<s> package net . minecraft . src ; import java . util . Random ; public class EntityAIEatGrass extends EntityAIBase { private EntityLiving theEntity ; private World theWorld ; int eatGrassTick ; public EntityAIEatGrass ( EntityLiving par1EntityLiving ) { eatGrassTick = <NUM_LIT:0> ; theEntity = par1EntityLiving ; theWorld = par1EntityLiving . worldObj ; setMutexBits ( <NUM_LIT:7> ) ; } public boolean shouldExecute ( ) { if ( theEntity . getRNG ( ) . nextInt ( theEntity . isChild ( ) ? <NUM_LIT> : <NUM_LIT:1000> ) != <NUM_LIT:0> ) { return false ; } int i = MathHelper . floor_double ( theEntity . posX ) ; int j = MathHelper . floor_double ( theEntity . posY ) ; int k = MathHelper . floor_double ( theEntity . posZ ) ; if ( theWorld . getBlockId ( i , j , k ) == Block . tallGrass . blockID && theWorld . getBlockMetadata ( i , j , k ) == <NUM_LIT:1> ) { return true ; } return theWorld . getBlockId ( i , j - <NUM_LIT:1> , k ) == Block . grass . blockID ; } public void startExecuting ( ) { eatGrassTick = <NUM_LIT> ; theWorld . setEntityState ( theEntity , ( byte ) <NUM_LIT:10> ) ; theEntity . getNavigator ( ) . clearPathEntity ( ) ; } public void resetTask ( ) { eatGrassTick = <NUM_LIT:0> ; } public boolean continueExecuting ( ) { return eatGrassTick > <NUM_LIT:0> ; } public int func_48227_f ( ) { return eatGrassTick ; } public void updateTask ( ) { eatGrassTick = Math . max ( <NUM_LIT:0> , eatGrassTick - <NUM_LIT:1> ) ; if ( eatGrassTick != <NUM_LIT:4> ) { return ; } int i = MathHelper . floor_double ( theEntity . posX ) ; int j = MathHelper . floor_double ( theEntity . posY ) ; int k = MathHelper . floor_double ( theEntity . posZ ) ; if ( theWorld . getBlockId ( i , j , k ) == Block . tallGrass . blockID ) { theWorld . playAuxSFX ( <NUM_LIT> , i , j , k , Block . tallGrass . blockID + <NUM_LIT> ) ; theWorld . setBlockWithNotify ( i , j , k , <NUM_LIT:0> ) ; theEntity . eatGrassBonus ( ) ; } else if ( theWorld . getBlockId ( i , j - <NUM_LIT:1> , k ) == Block . grass . blockID ) { theWorld . playAuxSFX ( <NUM_LIT> , i , j - <NUM_LIT:1> , k , Block . grass . blockID ) ; theWorld . setBlockWithNotify ( i , j - <NUM_LIT:1> , k , Block . dirt . blockID ) ; theEntity . eatGrassBonus ( ) ; } } } </s>
<s> package net . minecraft . src ; import java . io . * ; import java . util . zip . * ; public class Packet51MapChunk extends Packet { public int xCh ; public int zCh ; public int yChMin ; public int yChMax ; public byte chunkData [ ] ; public boolean includeInitialize ; private int tempLength ; private int field_48110_h ; private static byte temp [ ] = new byte [ <NUM_LIT:0> ] ; public Packet51MapChunk ( ) { isChunkDataPacket = true ; } public Packet51MapChunk ( Chunk par1Chunk , boolean par2 , int par3 ) { isChunkDataPacket = true ; xCh = par1Chunk . xPosition ; zCh = par1Chunk . zPosition ; includeInitialize = par2 ; if ( par2 ) { par3 = <NUM_LIT> ; par1Chunk . field_50025_o = true ; } ExtendedBlockStorage aextendedblockstorage [ ] = par1Chunk . getBlockStorageArray ( ) ; int i = <NUM_LIT:0> ; int j = <NUM_LIT:0> ; for ( int k = <NUM_LIT:0> ; k < aextendedblockstorage . length ; k ++ ) { if ( aextendedblockstorage [ k ] == null || par2 && aextendedblockstorage [ k ] . getIsEmpty ( ) || ( par3 & <NUM_LIT:1> << k ) == <NUM_LIT:0> ) { continue ; } yChMin |= <NUM_LIT:1> << k ; i ++ ; if ( aextendedblockstorage [ k ] . getBlockMSBArray ( ) != null ) { yChMax |= <NUM_LIT:1> << k ; j ++ ; } } int l = <NUM_LIT> * ( <NUM_LIT:5> * i + j ) ; if ( par2 ) { l += <NUM_LIT> ; } if ( temp . length < l ) { temp = new byte [ l ] ; } byte abyte0 [ ] = temp ; int i1 = <NUM_LIT:0> ; for ( int j1 = <NUM_LIT:0> ; j1 < aextendedblockstorage . length ; j1 ++ ) { if ( aextendedblockstorage [ j1 ] != null && ( ! par2 || ! aextendedblockstorage [ j1 ] . getIsEmpty ( ) ) && ( par3 & <NUM_LIT:1> << j1 ) != <NUM_LIT:0> ) { byte abyte2 [ ] = aextendedblockstorage [ j1 ] . func_48590_g ( ) ; System . arraycopy ( abyte2 , <NUM_LIT:0> , abyte0 , i1 , abyte2 . length ) ; i1 += abyte2 . length ; } } for ( int k1 = <NUM_LIT:0> ; k1 < aextendedblockstorage . length ; k1 ++ ) { if ( aextendedblockstorage [ k1 ] != null && ( ! par2 || ! aextendedblockstorage [ k1 ] . getIsEmpty ( ) ) && ( par3 & <NUM_LIT:1> << k1 ) != <NUM_LIT:0> ) { NibbleArray nibblearray = aextendedblockstorage [ k1 ] . func_48594_i ( ) ; System . arraycopy ( nibblearray . data , <NUM_LIT:0> , abyte0 , i1 , nibblearray . data . length ) ; i1 += nibblearray . data . length ; } } for ( int l1 = <NUM_LIT:0> ; l1 < aextendedblockstorage . length ; l1 ++ ) { if ( aextendedblockstorage [ l1 ] != null && ( ! par2 || ! aextendedblockstorage [ l1 ] . getIsEmpty ( ) ) && ( par3 & <NUM_LIT:1> << l1 ) != <NUM_LIT:0> ) { NibbleArray nibblearray1 = aextendedblockstorage [ l1 ] . getBlocklightArray ( ) ; System . arraycopy ( nibblearray1 . data , <NUM_LIT:0> , abyte0 , i1 , nibblearray1 . data . length ) ; i1 += nibblearray1 . data . length ; } } for ( int i2 = <NUM_LIT:0> ; i2 < aextendedblockstorage . length ; i2 ++ ) { if ( aextendedblockstorage [ i2 ] != null && ( ! par2 || ! aextendedblockstorage [ i2 ] . getIsEmpty ( ) ) && ( par3 & <NUM_LIT:1> << i2 ) != <NUM_LIT:0> ) { NibbleArray nibblearray2 = aextendedblockstorage [ i2 ] . getSkylightArray ( ) ; System . arraycopy ( nibblearray2 . data , <NUM_LIT:0> , abyte0 , i1 , nibblearray2 . data . length ) ; i1 += nibblearray2 . data . length ; } } if ( j > <NUM_LIT:0> ) { for ( int j2 = <NUM_LIT:0> ; j2 < aextendedblockstorage . length ; j2 ++ ) { if ( aextendedblockstorage [ j2 ] != null && ( ! par2 || ! aextendedblockstorage [ j2 ] . getIsEmpty ( ) ) && aextendedblockstorage [ j2 ] . getBlockMSBArray ( ) != null && ( par3 & <NUM_LIT:1> << j2 ) != <NUM_LIT:0> ) { NibbleArray nibblearray3 = aextendedblockstorage [ j2 ] . getBlockMSBArray ( ) ; System . arraycopy ( nibblearray3 . data , <NUM_LIT:0> , abyte0 , i1 , nibblearray3 . data . length ) ; i1 += nibblearray3 . data . length ; } } } if ( par2 ) { byte abyte1 [ ] = par1Chunk . getBiomeArray ( ) ; System . arraycopy ( abyte1 , <NUM_LIT:0> , abyte0 , i1 , abyte1 . length ) ; i1 += abyte1 . length ; } Deflater deflater = new Deflater ( - <NUM_LIT:1> ) ; try { deflater . setInput ( abyte0 , <NUM_LIT:0> , i1 ) ; deflater . finish ( ) ; chunkData = new byte [ i1 ] ; tempLength = deflater . deflate ( chunkData ) ; } finally { deflater . end ( ) ; } } public void readPacketData ( DataInputStream par1DataInputStream ) throws IOException { xCh = par1DataInputStream . readInt ( ) ; zCh = par1DataInputStream . readInt ( ) ; includeInitialize = par1DataInputStream . readBoolean ( ) ; yChMin = par1DataInputStream . readShort ( ) ; yChMax = par1DataInputStream . readShort ( ) ; tempLength = par1DataInputStream . readInt ( ) ; field_48110_h = par1DataInputStream . readInt ( ) ; if ( temp . length < tempLength ) { temp = new byte [ tempLength ] ; } par1DataInputStream . readFully ( temp , <NUM_LIT:0> , tempLength ) ; int i = <NUM_LIT:0> ; for ( int j = <NUM_LIT:0> ; j < <NUM_LIT:16> ; j ++ ) { i += yChMin > > j & <NUM_LIT:1> ; } int k = <NUM_LIT> * i ; if ( includeInitialize ) { k += <NUM_LIT> ; } chunkData = new byte [ k ] ; Inflater inflater = new Inflater ( ) ; inflater . setInput ( temp , <NUM_LIT:0> , tempLength ) ; try { inflater . inflate ( chunkData ) ; } catch ( DataFormatException dataformatexception ) { throw new IOException ( "<STR_LIT>" ) ; } finally { inflater . end ( ) ; } } public void writePacketData ( DataOutputStream par1DataOutputStream ) throws IOException { par1DataOutputStream . writeInt ( xCh ) ; par1DataOutputStream . writeInt ( zCh ) ; par1DataOutputStream . writeBoolean ( includeInitialize ) ; par1DataOutputStream . writeShort ( ( short ) ( yChMin & <NUM_LIT> ) ) ; par1DataOutputStream . writeShort ( ( short ) ( yChMax & <NUM_LIT> ) ) ; par1DataOutputStream . writeInt ( tempLength ) ; par1DataOutputStream . writeInt ( field_48110_h ) ; par1DataOutputStream . write ( chunkData , <NUM_LIT:0> , tempLength ) ; } public void processPacket ( NetHandler par1NetHandler ) { par1NetHandler . func_48070_a ( this ) ; } public int getPacketSize ( ) { return <NUM_LIT> + tempLength ; } } </s>
<s> package net . minecraft . src ; public abstract class EntityAIDoorInteract extends EntityAIBase { protected EntityLiving theEntity ; protected int entityPosX ; protected int entityPosY ; protected int entityPosZ ; protected BlockDoor targetDoor ; boolean field_48186_f ; float field_48187_g ; float field_48193_h ; public EntityAIDoorInteract ( EntityLiving par1EntityLiving ) { theEntity = par1EntityLiving ; } public boolean shouldExecute ( ) { if ( ! theEntity . isCollidedHorizontally ) { return false ; } PathNavigate pathnavigate = theEntity . getNavigator ( ) ; PathEntity pathentity = pathnavigate . getPath ( ) ; if ( pathentity == null || pathentity . isFinished ( ) || ! pathnavigate . func_48657_b ( ) ) { return false ; } for ( int i = <NUM_LIT:0> ; i < Math . min ( pathentity . getCurrentPathIndex ( ) + <NUM_LIT:2> , pathentity . getCurrentPathLength ( ) ) ; i ++ ) { PathPoint pathpoint = pathentity . getPathPointFromIndex ( i ) ; entityPosX = pathpoint . xCoord ; entityPosY = pathpoint . yCoord + <NUM_LIT:1> ; entityPosZ = pathpoint . zCoord ; if ( theEntity . getDistanceSq ( entityPosX , theEntity . posY , entityPosZ ) > <NUM_LIT> ) { continue ; } targetDoor = func_48185_a ( entityPosX , entityPosY , entityPosZ ) ; if ( targetDoor != null ) { return true ; } } entityPosX = MathHelper . floor_double ( theEntity . posX ) ; entityPosY = MathHelper . floor_double ( theEntity . posY + <NUM_LIT> ) ; entityPosZ = MathHelper . floor_double ( theEntity . posZ ) ; targetDoor = func_48185_a ( entityPosX , entityPosY , entityPosZ ) ; return targetDoor != null ; } public boolean continueExecuting ( ) { return ! field_48186_f ; } public void startExecuting ( ) { field_48186_f = false ; field_48187_g = ( float ) ( ( double ) ( ( float ) entityPosX + <NUM_LIT> ) - theEntity . posX ) ; field_48193_h = ( float ) ( ( double ) ( ( float ) entityPosZ + <NUM_LIT> ) - theEntity . posZ ) ; } public void updateTask ( ) { float f = ( float ) ( ( double ) ( ( float ) entityPosX + <NUM_LIT> ) - theEntity . posX ) ; float f1 = ( float ) ( ( double ) ( ( float ) entityPosZ + <NUM_LIT> ) - theEntity . posZ ) ; float f2 = field_48187_g * f + field_48193_h * f1 ; if ( f2 < <NUM_LIT> ) { field_48186_f = true ; } } private BlockDoor func_48185_a ( int par1 , int par2 , int par3 ) { int i = theEntity . worldObj . getBlockId ( par1 , par2 , par3 ) ; if ( i != Block . doorWood . blockID ) { return null ; } else { BlockDoor blockdoor = ( BlockDoor ) Block . blocksList [ i ] ; return blockdoor ; } } } </s>
<s> package net . minecraft . src ; import java . util . * ; public class EntityAINearestAttackableTarget extends EntityAITarget { EntityLiving targetEntity ; Class targetClass ; int field_48295_f ; private EntityAINearestAttackableTargetSorter field_48296_g ; public EntityAINearestAttackableTarget ( EntityLiving par1EntityLiving , Class par2Class , float par3 , int par4 , boolean par5 ) { this ( par1EntityLiving , par2Class , par3 , par4 , par5 , false ) ; } public EntityAINearestAttackableTarget ( EntityLiving par1EntityLiving , Class par2Class , float par3 , int par4 , boolean par5 , boolean par6 ) { super ( par1EntityLiving , par3 , par5 , par6 ) ; targetClass = par2Class ; field_48288_d = par3 ; field_48295_f = par4 ; field_48296_g = new EntityAINearestAttackableTargetSorter ( this , par1EntityLiving ) ; setMutexBits ( <NUM_LIT:1> ) ; } public boolean shouldExecute ( ) { label0 : { if ( field_48295_f > <NUM_LIT:0> && taskOwner . getRNG ( ) . nextInt ( field_48295_f ) != <NUM_LIT:0> ) { return false ; } if ( targetClass == ( net . minecraft . src . EntityPlayer . class ) ) { EntityPlayer entityplayer = taskOwner . worldObj . getClosestVulnerablePlayerToEntity ( taskOwner , field_48288_d ) ; if ( func_48284_a ( entityplayer , false ) ) { targetEntity = entityplayer ; return true ; } break label0 ; } List list = taskOwner . worldObj . getEntitiesWithinAABB ( targetClass , taskOwner . boundingBox . expand ( field_48288_d , <NUM_LIT> , field_48288_d ) ) ; Collections . sort ( list , field_48296_g ) ; Iterator iterator = list . iterator ( ) ; EntityLiving entityliving ; do { if ( ! iterator . hasNext ( ) ) { break label0 ; } Entity entity = ( Entity ) iterator . next ( ) ; entityliving = ( EntityLiving ) entity ; } while ( ! func_48284_a ( entityliving , false ) ) ; targetEntity = entityliving ; return true ; } return false ; } public void startExecuting ( ) { taskOwner . setAttackTarget ( targetEntity ) ; super . startExecuting ( ) ; } } </s>
<s> package net . minecraft . src ; import java . util . List ; public class ContainerBrewingStand extends Container { private TileEntityBrewingStand tileBrewingStand ; private int brewTime ; public ContainerBrewingStand ( InventoryPlayer par1InventoryPlayer , TileEntityBrewingStand par2TileEntityBrewingStand ) { brewTime = <NUM_LIT:0> ; tileBrewingStand = par2TileEntityBrewingStand ; addSlot ( new SlotBrewingStandPotion ( this , par1InventoryPlayer . player , par2TileEntityBrewingStand , <NUM_LIT:0> , <NUM_LIT> , <NUM_LIT> ) ) ; addSlot ( new SlotBrewingStandPotion ( this , par1InventoryPlayer . player , par2TileEntityBrewingStand , <NUM_LIT:1> , <NUM_LIT> , <NUM_LIT> ) ) ; addSlot ( new SlotBrewingStandPotion ( this , par1InventoryPlayer . player , par2TileEntityBrewingStand , <NUM_LIT:2> , <NUM_LIT> , <NUM_LIT> ) ) ; addSlot ( new SlotBrewingStandIngredient ( this , par2TileEntityBrewingStand , <NUM_LIT:3> , <NUM_LIT> , <NUM_LIT> ) ) ; for ( int i = <NUM_LIT:0> ; i < <NUM_LIT:3> ; i ++ ) { for ( int k = <NUM_LIT:0> ; k < <NUM_LIT:9> ; k ++ ) { addSlot ( new Slot ( par1InventoryPlayer , k + i * <NUM_LIT:9> + <NUM_LIT:9> , <NUM_LIT:8> + k * <NUM_LIT> , <NUM_LIT> + i * <NUM_LIT> ) ) ; } } for ( int j = <NUM_LIT:0> ; j < <NUM_LIT:9> ; j ++ ) { addSlot ( new Slot ( par1InventoryPlayer , j , <NUM_LIT:8> + j * <NUM_LIT> , <NUM_LIT> ) ) ; } } public void onCraftGuiOpened ( ICrafting par1ICrafting ) { super . onCraftGuiOpened ( par1ICrafting ) ; par1ICrafting . updateCraftingInventoryInfo ( this , <NUM_LIT:0> , tileBrewingStand . getBrewTime ( ) ) ; } public void updateCraftingResults ( ) { super . updateCraftingResults ( ) ; for ( int i = <NUM_LIT:0> ; i < crafters . size ( ) ; i ++ ) { ICrafting icrafting = ( ICrafting ) crafters . get ( i ) ; if ( brewTime != tileBrewingStand . getBrewTime ( ) ) { icrafting . updateCraftingInventoryInfo ( this , <NUM_LIT:0> , tileBrewingStand . getBrewTime ( ) ) ; } } brewTime = tileBrewingStand . getBrewTime ( ) ; } public boolean canInteractWith ( EntityPlayer par1EntityPlayer ) { return tileBrewingStand . isUseableByPlayer ( par1EntityPlayer ) ; } public ItemStack transferStackInSlot ( int par1 ) { ItemStack itemstack = null ; Slot slot = ( Slot ) inventorySlots . get ( par1 ) ; if ( slot != null && slot . getHasStack ( ) ) { ItemStack itemstack1 = slot . getStack ( ) ; itemstack = itemstack1 . copy ( ) ; if ( par1 >= <NUM_LIT:0> && par1 <= <NUM_LIT:2> || par1 == <NUM_LIT:3> ) { if ( ! mergeItemStack ( itemstack1 , <NUM_LIT:4> , <NUM_LIT> , true ) ) { return null ; } slot . func_48417_a ( itemstack1 , itemstack ) ; } else if ( par1 >= <NUM_LIT:4> && par1 < <NUM_LIT:31> ) { if ( ! mergeItemStack ( itemstack1 , <NUM_LIT:31> , <NUM_LIT> , false ) ) { return null ; } } else if ( par1 >= <NUM_LIT:31> && par1 < <NUM_LIT> ) { if ( ! mergeItemStack ( itemstack1 , <NUM_LIT:4> , <NUM_LIT:31> , false ) ) { return null ; } } else if ( ! mergeItemStack ( itemstack1 , <NUM_LIT:4> , <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 NoiseGeneratorOctaves extends NoiseGenerator { private NoiseGeneratorPerlin generatorCollection [ ] ; private int octaves ; public NoiseGeneratorOctaves ( Random par1Random , int par2 ) { octaves = par2 ; generatorCollection = new NoiseGeneratorPerlin [ par2 ] ; for ( int i = <NUM_LIT:0> ; i < par2 ; i ++ ) { generatorCollection [ i ] = new NoiseGeneratorPerlin ( par1Random ) ; } } public double [ ] generateNoiseOctaves ( double par1ArrayOfDouble [ ] , int par2 , int par3 , int par4 , int par5 , int par6 , int par7 , double par8 , double par10 , double par12 ) { if ( par1ArrayOfDouble == null ) { par1ArrayOfDouble = new double [ par5 * par6 * par7 ] ; } else { for ( int i = <NUM_LIT:0> ; i < par1ArrayOfDouble . length ; i ++ ) { par1ArrayOfDouble [ i ] = <NUM_LIT> ; } } double d = <NUM_LIT> ; for ( int j = <NUM_LIT:0> ; j < octaves ; j ++ ) { double d1 = ( double ) par2 * d * par8 ; double d2 = ( double ) par3 * d * par10 ; double d3 = ( double ) par4 * d * par12 ; long l = MathHelper . floor_double_long ( d1 ) ; long l1 = MathHelper . floor_double_long ( d3 ) ; d1 -= l ; d3 -= l1 ; l %= <NUM_LIT> ; l1 %= <NUM_LIT> ; d1 += l ; d3 += l1 ; generatorCollection [ j ] . func_646_a ( par1ArrayOfDouble , d1 , d2 , d3 , par5 , par6 , par7 , par8 * d , par10 * d , par12 * d , d ) ; d /= <NUM_LIT> ; } return par1ArrayOfDouble ; } public double [ ] generateNoiseOctaves ( double par1ArrayOfDouble [ ] , int par2 , int par3 , int par4 , int par5 , double par6 , double par8 , double par10 ) { return generateNoiseOctaves ( par1ArrayOfDouble , par2 , <NUM_LIT:10> , par3 , par4 , <NUM_LIT:1> , par5 , par6 , <NUM_LIT> , par8 ) ; } } </s>
<s> package net . minecraft . src ; import java . util . List ; import java . util . Random ; public class ComponentVillageHouse1 extends ComponentVillage { private int averageGroundLevel ; public ComponentVillageHouse1 ( int par1 , Random par2Random , StructureBoundingBox par3StructureBoundingBox , int par4 ) { super ( par1 ) ; averageGroundLevel = - <NUM_LIT:1> ; coordBaseMode = par4 ; boundingBox = par3StructureBoundingBox ; } public void buildComponent ( StructureComponent structurecomponent , List list , Random random ) { } public static ComponentVillageHouse1 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:9> , <NUM_LIT:9> , <NUM_LIT:6> , par5 ) ; if ( ! canVillageGoDeeper ( structureboundingbox ) || StructureComponent . findIntersecting ( par0List , structureboundingbox ) != null ) { return null ; } else { return new ComponentVillageHouse1 ( 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:9> ) - <NUM_LIT:1> , <NUM_LIT:0> ) ; } fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:1> , <NUM_LIT:1> , <NUM_LIT:1> , <NUM_LIT:7> , <NUM_LIT:5> , <NUM_LIT:4> , <NUM_LIT:0> , <NUM_LIT:0> , false ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:8> , <NUM_LIT:0> , <NUM_LIT:5> , Block . cobblestone . blockID , Block . cobblestone . blockID , false ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:0> , <NUM_LIT:5> , <NUM_LIT:0> , <NUM_LIT:8> , <NUM_LIT:5> , <NUM_LIT:5> , Block . cobblestone . blockID , Block . cobblestone . blockID , false ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:0> , <NUM_LIT:6> , <NUM_LIT:1> , <NUM_LIT:8> , <NUM_LIT:6> , <NUM_LIT:4> , Block . cobblestone . blockID , Block . cobblestone . blockID , false ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:0> , <NUM_LIT:7> , <NUM_LIT:2> , <NUM_LIT:8> , <NUM_LIT:7> , <NUM_LIT:3> , Block . cobblestone . blockID , Block . cobblestone . blockID , false ) ; int i = getMetadataWithOffset ( Block . stairCompactPlanks . blockID , <NUM_LIT:3> ) ; int j = getMetadataWithOffset ( Block . stairCompactPlanks . blockID , <NUM_LIT:2> ) ; for ( int k = - <NUM_LIT:1> ; k <= <NUM_LIT:2> ; k ++ ) { for ( int i1 = <NUM_LIT:0> ; i1 <= <NUM_LIT:8> ; i1 ++ ) { placeBlockAtCurrentPosition ( par1World , Block . stairCompactPlanks . blockID , i , i1 , <NUM_LIT:6> + k , k , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . stairCompactPlanks . blockID , j , i1 , <NUM_LIT:6> + k , <NUM_LIT:5> - k , par3StructureBoundingBox ) ; } } fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:0> , <NUM_LIT:1> , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:1> , <NUM_LIT:5> , Block . cobblestone . blockID , Block . cobblestone . blockID , false ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:1> , <NUM_LIT:1> , <NUM_LIT:5> , <NUM_LIT:8> , <NUM_LIT:1> , <NUM_LIT:5> , Block . cobblestone . blockID , Block . cobblestone . blockID , false ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:8> , <NUM_LIT:1> , <NUM_LIT:0> , <NUM_LIT:8> , <NUM_LIT:1> , <NUM_LIT:4> , Block . cobblestone . blockID , Block . cobblestone . blockID , false ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:2> , <NUM_LIT:1> , <NUM_LIT:0> , <NUM_LIT:7> , <NUM_LIT:1> , <NUM_LIT:0> , Block . cobblestone . blockID , Block . cobblestone . blockID , false ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:0> , <NUM_LIT:2> , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:4> , <NUM_LIT:0> , Block . cobblestone . blockID , Block . cobblestone . blockID , false ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:0> , <NUM_LIT:2> , <NUM_LIT:5> , <NUM_LIT:0> , <NUM_LIT:4> , <NUM_LIT:5> , Block . cobblestone . blockID , Block . cobblestone . blockID , false ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:8> , <NUM_LIT:2> , <NUM_LIT:5> , <NUM_LIT:8> , <NUM_LIT:4> , <NUM_LIT:5> , Block . cobblestone . blockID , Block . cobblestone . blockID , false ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:8> , <NUM_LIT:2> , <NUM_LIT:0> , <NUM_LIT:8> , <NUM_LIT:4> , <NUM_LIT:0> , Block . cobblestone . blockID , Block . cobblestone . blockID , false ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:0> , <NUM_LIT:2> , <NUM_LIT:1> , <NUM_LIT:0> , <NUM_LIT:4> , <NUM_LIT:4> , Block . planks . blockID , Block . planks . blockID , false ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:1> , <NUM_LIT:2> , <NUM_LIT:5> , <NUM_LIT:7> , <NUM_LIT:4> , <NUM_LIT:5> , Block . planks . blockID , Block . planks . blockID , false ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:8> , <NUM_LIT:2> , <NUM_LIT:1> , <NUM_LIT:8> , <NUM_LIT:4> , <NUM_LIT:4> , Block . planks . blockID , Block . planks . blockID , false ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:1> , <NUM_LIT:2> , <NUM_LIT:0> , <NUM_LIT:7> , <NUM_LIT:4> , <NUM_LIT:0> , Block . planks . blockID , Block . planks . blockID , false ) ; placeBlockAtCurrentPosition ( par1World , Block . thinGlass . blockID , <NUM_LIT:0> , <NUM_LIT:4> , <NUM_LIT:2> , <NUM_LIT:0> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . thinGlass . blockID , <NUM_LIT:0> , <NUM_LIT:5> , <NUM_LIT:2> , <NUM_LIT:0> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . thinGlass . blockID , <NUM_LIT:0> , <NUM_LIT:6> , <NUM_LIT:2> , <NUM_LIT:0> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . thinGlass . blockID , <NUM_LIT:0> , <NUM_LIT:4> , <NUM_LIT:3> , <NUM_LIT:0> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . thinGlass . blockID , <NUM_LIT:0> , <NUM_LIT:5> , <NUM_LIT:3> , <NUM_LIT:0> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . thinGlass . blockID , <NUM_LIT:0> , <NUM_LIT:6> , <NUM_LIT:3> , <NUM_LIT:0> , par3StructureBoundingBox ) ; 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:0> , <NUM_LIT:2> , <NUM_LIT:3> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . thinGlass . blockID , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:3> , <NUM_LIT:2> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . thinGlass . blockID , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:3> , <NUM_LIT:3> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . thinGlass . blockID , <NUM_LIT:0> , <NUM_LIT:8> , <NUM_LIT:2> , <NUM_LIT:2> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . thinGlass . blockID , <NUM_LIT:0> , <NUM_LIT:8> , <NUM_LIT:2> , <NUM_LIT:3> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . thinGlass . blockID , <NUM_LIT:0> , <NUM_LIT:8> , <NUM_LIT:3> , <NUM_LIT:2> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . thinGlass . blockID , <NUM_LIT:0> , <NUM_LIT:8> , <NUM_LIT:3> , <NUM_LIT:3> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . thinGlass . blockID , <NUM_LIT:0> , <NUM_LIT:2> , <NUM_LIT:2> , <NUM_LIT:5> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . thinGlass . blockID , <NUM_LIT:0> , <NUM_LIT:3> , <NUM_LIT:2> , <NUM_LIT:5> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . thinGlass . blockID , <NUM_LIT:0> , <NUM_LIT:5> , <NUM_LIT:2> , <NUM_LIT:5> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . thinGlass . blockID , <NUM_LIT:0> , <NUM_LIT:6> , <NUM_LIT:2> , <NUM_LIT:5> , par3StructureBoundingBox ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:1> , <NUM_LIT:4> , <NUM_LIT:1> , <NUM_LIT:7> , <NUM_LIT:4> , <NUM_LIT:1> , Block . planks . blockID , Block . planks . blockID , false ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:1> , <NUM_LIT:4> , <NUM_LIT:4> , <NUM_LIT:7> , <NUM_LIT:4> , <NUM_LIT:4> , Block . planks . blockID , Block . planks . blockID , false ) ; fillWithBlocks ( par1World , par3StructureBoundingBox , <NUM_LIT:1> , <NUM_LIT:3> , <NUM_LIT:4> , <NUM_LIT:7> , <NUM_LIT:3> , <NUM_LIT:4> , Block . bookShelf . blockID , Block . bookShelf . blockID , false ) ; placeBlockAtCurrentPosition ( par1World , Block . planks . blockID , <NUM_LIT:0> , <NUM_LIT:7> , <NUM_LIT:1> , <NUM_LIT:4> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . stairCompactPlanks . blockID , getMetadataWithOffset ( Block . stairCompactPlanks . blockID , <NUM_LIT:0> ) , <NUM_LIT:7> , <NUM_LIT:1> , <NUM_LIT:3> , par3StructureBoundingBox ) ; int l = getMetadataWithOffset ( Block . stairCompactPlanks . blockID , <NUM_LIT:3> ) ; placeBlockAtCurrentPosition ( par1World , Block . stairCompactPlanks . blockID , l , <NUM_LIT:6> , <NUM_LIT:1> , <NUM_LIT:4> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . stairCompactPlanks . blockID , l , <NUM_LIT:5> , <NUM_LIT:1> , <NUM_LIT:4> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . stairCompactPlanks . blockID , l , <NUM_LIT:4> , <NUM_LIT:1> , <NUM_LIT:4> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . stairCompactPlanks . blockID , l , <NUM_LIT:3> , <NUM_LIT:1> , <NUM_LIT:4> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . fence . blockID , <NUM_LIT:0> , <NUM_LIT:6> , <NUM_LIT:1> , <NUM_LIT:3> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . pressurePlatePlanks . blockID , <NUM_LIT:0> , <NUM_LIT:6> , <NUM_LIT:2> , <NUM_LIT:3> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . fence . blockID , <NUM_LIT:0> , <NUM_LIT:4> , <NUM_LIT:1> , <NUM_LIT:3> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . pressurePlatePlanks . blockID , <NUM_LIT:0> , <NUM_LIT:4> , <NUM_LIT:2> , <NUM_LIT:3> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , Block . workbench . blockID , <NUM_LIT:0> , <NUM_LIT:7> , <NUM_LIT:1> , <NUM_LIT:1> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:1> , <NUM_LIT:1> , <NUM_LIT:0> , par3StructureBoundingBox ) ; placeBlockAtCurrentPosition ( par1World , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:1> , <NUM_LIT:2> , <NUM_LIT:0> , par3StructureBoundingBox ) ; placeDoorAtCurrentPosition ( par1World , par3StructureBoundingBox , par2Random , <NUM_LIT:1> , <NUM_LIT:1> , <NUM_LIT:0> , getMetadataWithOffset ( Block . doorWood . blockID , <NUM_LIT:1> ) ) ; if ( getBlockIdAtCurrentPosition ( par1World , <NUM_LIT:1> , <NUM_LIT:0> , - <NUM_LIT:1> , par3StructureBoundingBox ) == <NUM_LIT:0> && getBlockIdAtCurrentPosition ( par1World , <NUM_LIT:1> , - <NUM_LIT:1> , - <NUM_LIT:1> , par3StructureBoundingBox ) != <NUM_LIT:0> ) { placeBlockAtCurrentPosition ( par1World , Block . stairCompactCobblestone . blockID , getMetadataWithOffset ( Block . stairCompactCobblestone . blockID , <NUM_LIT:3> ) , <NUM_LIT:1> , <NUM_LIT:0> , - <NUM_LIT:1> , par3StructureBoundingBox ) ; } for ( int j1 = <NUM_LIT:0> ; j1 < <NUM_LIT:6> ; j1 ++ ) { for ( int k1 = <NUM_LIT:0> ; k1 < <NUM_LIT:9> ; k1 ++ ) { clearCurrentPositionBlocksUpwards ( par1World , k1 , <NUM_LIT:9> , j1 , par3StructureBoundingBox ) ; fillCurrentPositionBlocksDownwards ( par1World , Block . cobblestone . blockID , <NUM_LIT:0> , k1 , - <NUM_LIT:1> , j1 , par3StructureBoundingBox ) ; } } spawnVillagers ( par1World , par3StructureBoundingBox , <NUM_LIT:2> , <NUM_LIT:1> , <NUM_LIT:2> , <NUM_LIT:1> ) ; return true ; } protected int getVillagerType ( int par1 ) { return <NUM_LIT:1> ; } } </s>
<s> package net . minecraft . src ; import java . util . Random ; public class NoiseGeneratorPerlin extends NoiseGenerator { private int permutations [ ] ; public double xCoord ; public double yCoord ; public double zCoord ; public NoiseGeneratorPerlin ( ) { this ( new Random ( ) ) ; } public NoiseGeneratorPerlin ( Random par1Random ) { permutations = new int [ <NUM_LIT> ] ; xCoord = par1Random . nextDouble ( ) * <NUM_LIT> ; yCoord = par1Random . nextDouble ( ) * <NUM_LIT> ; zCoord = par1Random . nextDouble ( ) * <NUM_LIT> ; for ( int i = <NUM_LIT:0> ; i < <NUM_LIT> ; i ++ ) { permutations [ i ] = i ; } for ( int j = <NUM_LIT:0> ; j < <NUM_LIT> ; j ++ ) { int k = par1Random . nextInt ( <NUM_LIT> - j ) + j ; int l = permutations [ j ] ; permutations [ j ] = permutations [ k ] ; permutations [ k ] = l ; permutations [ j + <NUM_LIT> ] = permutations [ j ] ; } } public final double lerp ( double par1 , double par3 , double par5 ) { return par3 + par1 * ( par5 - par3 ) ; } public final double func_4102_a ( int par1 , double par2 , double par4 ) { int i = par1 & <NUM_LIT> ; double d = ( double ) ( <NUM_LIT:1> - ( ( i & <NUM_LIT:8> ) > > <NUM_LIT:3> ) ) * par2 ; double d1 = i >= <NUM_LIT:4> ? i != <NUM_LIT:12> && i != <NUM_LIT> ? par4 : par2 : <NUM_LIT> ; return ( ( i & <NUM_LIT:1> ) != <NUM_LIT:0> ? - d : d ) + ( ( i & <NUM_LIT:2> ) != <NUM_LIT:0> ? - d1 : d1 ) ; } public final double grad ( int par1 , double par2 , double par4 , double par6 ) { int i = par1 & <NUM_LIT> ; double d = i >= <NUM_LIT:8> ? par4 : par2 ; double d1 = i >= <NUM_LIT:4> ? i != <NUM_LIT:12> && i != <NUM_LIT> ? par6 : par2 : par4 ; return ( ( i & <NUM_LIT:1> ) != <NUM_LIT:0> ? - d : d ) + ( ( i & <NUM_LIT:2> ) != <NUM_LIT:0> ? - d1 : d1 ) ; } public void func_646_a ( double par1ArrayOfDouble [ ] , double par2 , double par4 , double par6 , int par8 , int par9 , int par10 , double par11 , double par13 , double par15 , double par17 ) { if ( par9 == <NUM_LIT:1> ) { boolean flag = false ; boolean flag1 = false ; boolean flag2 = false ; boolean flag3 = false ; double d1 = <NUM_LIT> ; double d3 = <NUM_LIT> ; int k2 = <NUM_LIT:0> ; double d5 = <NUM_LIT> / par17 ; for ( int j3 = <NUM_LIT:0> ; j3 < par8 ; j3 ++ ) { double d7 = par2 + ( double ) j3 * par11 + xCoord ; int k3 = ( int ) d7 ; if ( d7 < ( double ) k3 ) { k3 -- ; } int l3 = k3 & <NUM_LIT> ; d7 -= k3 ; double d10 = d7 * d7 * d7 * ( d7 * ( d7 * <NUM_LIT> - <NUM_LIT> ) + <NUM_LIT> ) ; for ( int i4 = <NUM_LIT:0> ; i4 < par10 ; i4 ++ ) { double d12 = par6 + ( double ) i4 * par15 + zCoord ; int k4 = ( int ) d12 ; if ( d12 < ( double ) k4 ) { k4 -- ; } int i5 = k4 & <NUM_LIT> ; d12 -= k4 ; double d14 = d12 * d12 * d12 * ( d12 * ( d12 * <NUM_LIT> - <NUM_LIT> ) + <NUM_LIT> ) ; int i = permutations [ l3 ] + <NUM_LIT:0> ; int k = permutations [ i ] + i5 ; int l = permutations [ l3 + <NUM_LIT:1> ] + <NUM_LIT:0> ; int i1 = permutations [ l ] + i5 ; double d2 = lerp ( d10 , func_4102_a ( permutations [ k ] , d7 , d12 ) , grad ( permutations [ i1 ] , d7 - <NUM_LIT> , <NUM_LIT> , d12 ) ) ; double d4 = lerp ( d10 , grad ( permutations [ k + <NUM_LIT:1> ] , d7 , <NUM_LIT> , d12 - <NUM_LIT> ) , grad ( permutations [ i1 + <NUM_LIT:1> ] , d7 - <NUM_LIT> , <NUM_LIT> , d12 - <NUM_LIT> ) ) ; double d16 = lerp ( d14 , d2 , d4 ) ; par1ArrayOfDouble [ k2 ++ ] += d16 * d5 ; } } return ; } int j = <NUM_LIT:0> ; double d = <NUM_LIT> / par17 ; int j1 = - <NUM_LIT:1> ; boolean flag4 = false ; boolean flag5 = false ; boolean flag6 = false ; boolean flag7 = false ; boolean flag8 = false ; boolean flag9 = false ; double d6 = <NUM_LIT> ; double d8 = <NUM_LIT> ; double d9 = <NUM_LIT> ; double d11 = <NUM_LIT> ; for ( int j4 = <NUM_LIT:0> ; j4 < par8 ; j4 ++ ) { double d13 = par2 + ( double ) j4 * par11 + xCoord ; int l4 = ( int ) d13 ; if ( d13 < ( double ) l4 ) { l4 -- ; } int j5 = l4 & <NUM_LIT> ; d13 -= l4 ; double d15 = d13 * d13 * d13 * ( d13 * ( d13 * <NUM_LIT> - <NUM_LIT> ) + <NUM_LIT> ) ; for ( int k5 = <NUM_LIT:0> ; k5 < par10 ; k5 ++ ) { double d17 = par6 + ( double ) k5 * par15 + zCoord ; int l5 = ( int ) d17 ; if ( d17 < ( double ) l5 ) { l5 -- ; } int i6 = l5 & <NUM_LIT> ; d17 -= l5 ; double d18 = d17 * d17 * d17 * ( d17 * ( d17 * <NUM_LIT> - <NUM_LIT> ) + <NUM_LIT> ) ; for ( int j6 = <NUM_LIT:0> ; j6 < par9 ; j6 ++ ) { double d19 = par4 + ( double ) j6 * par13 + yCoord ; int k6 = ( int ) d19 ; if ( d19 < ( double ) k6 ) { k6 -- ; } int l6 = k6 & <NUM_LIT> ; d19 -= k6 ; double d20 = d19 * d19 * d19 * ( d19 * ( d19 * <NUM_LIT> - <NUM_LIT> ) + <NUM_LIT> ) ; if ( j6 == <NUM_LIT:0> || l6 != j1 ) { j1 = l6 ; int k1 = permutations [ j5 ] + l6 ; int l1 = permutations [ k1 ] + i6 ; int i2 = permutations [ k1 + <NUM_LIT:1> ] + i6 ; int j2 = permutations [ j5 + <NUM_LIT:1> ] + l6 ; int l2 = permutations [ j2 ] + i6 ; int i3 = permutations [ j2 + <NUM_LIT:1> ] + i6 ; d6 = lerp ( d15 , grad ( permutations [ l1 ] , d13 , d19 , d17 ) , grad ( permutations [ l2 ] , d13 - <NUM_LIT> , d19 , d17 ) ) ; d8 = lerp ( d15 , grad ( permutations [ i2 ] , d13 , d19 - <NUM_LIT> , d17 ) , grad ( permutations [ i3 ] , d13 - <NUM_LIT> , d19 - <NUM_LIT> , d17 ) ) ; d9 = lerp ( d15 , grad ( permutations [ l1 + <NUM_LIT:1> ] , d13 , d19 , d17 - <NUM_LIT> ) , grad ( permutations [ l2 + <NUM_LIT:1> ] , d13 - <NUM_LIT> , d19 , d17 - <NUM_LIT> ) ) ; d11 = lerp ( d15 , grad ( permutations [ i2 + <NUM_LIT:1> ] , d13 , d19 - <NUM_LIT> , d17 - <NUM_LIT> ) , grad ( permutations [ i3 + <NUM_LIT:1> ] , d13 - <NUM_LIT> , d19 - <NUM_LIT> , d17 - <NUM_LIT> ) ) ; } double d21 = lerp ( d20 , d6 , d8 ) ; double d22 = lerp ( d20 , d9 , d11 ) ; double d23 = lerp ( d18 , d21 , d22 ) ; par1ArrayOfDouble [ j ++ ] += d23 * d ; } } } } } </s>
<s> package net . minecraft . src ; public interface IStatType { } </s>
<s> package net . minecraft . src ; public abstract class EntityFlying extends EntityLiving { public EntityFlying ( World par1World ) { super ( par1World ) ; } protected void fall ( float f ) { } public void moveEntityWithHeading ( float par1 , float par2 ) { if ( isInWater ( ) ) { moveFlying ( par1 , par2 , <NUM_LIT> ) ; moveEntity ( motionX , motionY , motionZ ) ; motionX *= <NUM_LIT> ; motionY *= <NUM_LIT> ; motionZ *= <NUM_LIT> ; } else if ( handleLavaMovement ( ) ) { moveFlying ( par1 , par2 , <NUM_LIT> ) ; moveEntity ( motionX , motionY , motionZ ) ; motionX *= <NUM_LIT> ; motionY *= <NUM_LIT> ; motionZ *= <NUM_LIT> ; } else { 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> ; } } float f1 = <NUM_LIT> / ( f * f * f ) ; moveFlying ( par1 , par2 , onGround ? <NUM_LIT> * f1 : <NUM_LIT> ) ; f = <NUM_LIT> ; if ( onGround ) { f = <NUM_LIT> ; int j = worldObj . getBlockId ( MathHelper . floor_double ( posX ) , MathHelper . floor_double ( boundingBox . minY ) - <NUM_LIT:1> , MathHelper . floor_double ( posZ ) ) ; if ( j > <NUM_LIT:0> ) { f = Block . blocksList [ j ] . slipperiness * <NUM_LIT> ; } } moveEntity ( motionX , motionY , motionZ ) ; motionX *= f ; motionY *= f ; motionZ *= f ; } field_9142_bc = field_9141_bd ; double d = posX - prevPosX ; double d1 = posZ - prevPosZ ; float f2 = MathHelper . sqrt_double ( d * d + d1 * d1 ) * <NUM_LIT> ; if ( f2 > <NUM_LIT> ) { f2 = <NUM_LIT> ; } field_9141_bd += ( f2 - field_9141_bd ) * <NUM_LIT> ; field_386_ba += field_9141_bd ; } public boolean isOnLadder ( ) { return false ; } } </s>
<s> package net . minecraft . src ; import java . util . List ; public class EntityAIAvoidEntity extends EntityAIBase { private EntityCreature theEntity ; private float field_48235_b ; private float field_48236_c ; private Entity field_48233_d ; private float field_48234_e ; private PathEntity field_48231_f ; private PathNavigate entityPathNavigate ; private Class targetEntityClass ; public EntityAIAvoidEntity ( EntityCreature par1EntityCreature , Class par2Class , float par3 , float par4 , float par5 ) { theEntity = par1EntityCreature ; targetEntityClass = par2Class ; field_48234_e = par3 ; field_48235_b = par4 ; field_48236_c = par5 ; entityPathNavigate = par1EntityCreature . getNavigator ( ) ; setMutexBits ( <NUM_LIT:1> ) ; } public boolean shouldExecute ( ) { if ( targetEntityClass == ( net . minecraft . src . EntityPlayer . class ) ) { if ( ( theEntity instanceof EntityTameable ) && ( ( EntityTameable ) theEntity ) . isTamed ( ) ) { return false ; } field_48233_d = theEntity . worldObj . getClosestPlayerToEntity ( theEntity , field_48234_e ) ; if ( field_48233_d == null ) { return false ; } } else { List list = theEntity . worldObj . getEntitiesWithinAABB ( targetEntityClass , theEntity . boundingBox . expand ( field_48234_e , <NUM_LIT> , field_48234_e ) ) ; if ( list . size ( ) == <NUM_LIT:0> ) { return false ; } field_48233_d = ( Entity ) list . get ( <NUM_LIT:0> ) ; } if ( ! theEntity . func_48318_al ( ) . canSee ( field_48233_d ) ) { return false ; } Vec3D vec3d = RandomPositionGenerator . func_48394_b ( theEntity , <NUM_LIT:16> , <NUM_LIT:7> , Vec3D . createVector ( field_48233_d . posX , field_48233_d . posY , field_48233_d . posZ ) ) ; if ( vec3d == null ) { return false ; } if ( field_48233_d . getDistanceSq ( vec3d . xCoord , vec3d . yCoord , vec3d . zCoord ) < field_48233_d . getDistanceSqToEntity ( theEntity ) ) { return false ; } field_48231_f = entityPathNavigate . func_48650_a ( vec3d . xCoord , vec3d . yCoord , vec3d . zCoord ) ; if ( field_48231_f == null ) { return false ; } return field_48231_f . func_48426_a ( vec3d ) ; } public boolean continueExecuting ( ) { return ! entityPathNavigate . noPath ( ) ; } public void startExecuting ( ) { entityPathNavigate . setPath ( field_48231_f , field_48235_b ) ; } public void resetTask ( ) { field_48233_d = null ; } public void updateTask ( ) { if ( theEntity . getDistanceSqToEntity ( field_48233_d ) < <NUM_LIT> ) { theEntity . getNavigator ( ) . func_48654_a ( field_48236_c ) ; } else { theEntity . getNavigator ( ) . func_48654_a ( field_48235_b ) ; } } } </s>
<s> package net . minecraft . src ; import java . util . Random ; public class WorldGenClay extends WorldGenerator { private int clayBlockId ; private int numberOfBlocks ; public WorldGenClay ( int par1 ) { clayBlockId = Block . blockClay . blockID ; numberOfBlocks = par1 ; } public boolean generate ( World par1World , Random par2Random , int par3 , int par4 , int par5 ) { if ( par1World . getBlockMaterial ( par3 , par4 , par5 ) != Material . water ) { return false ; } int i = par2Random . nextInt ( numberOfBlocks - <NUM_LIT:2> ) + <NUM_LIT:2> ; int j = <NUM_LIT:1> ; for ( int k = par3 - i ; k <= par3 + i ; k ++ ) { for ( int l = par5 - i ; l <= par5 + i ; l ++ ) { int i1 = k - par3 ; int j1 = l - par5 ; if ( i1 * i1 + j1 * j1 > i * i ) { continue ; } for ( int k1 = par4 - j ; k1 <= par4 + j ; k1 ++ ) { int l1 = par1World . getBlockId ( k , k1 , l ) ; if ( l1 == Block . dirt . blockID || l1 == Block . blockClay . blockID ) { par1World . setBlock ( k , k1 , l , clayBlockId ) ; } } } } return true ; } } </s>