1
0
Fork 0
This commit is contained in:
HoosierTransfer 2024-05-01 08:14:15 -04:00
parent 9966f32dba
commit c9eae197b2
1 changed files with 162 additions and 84 deletions

View File

@ -54,22 +54,31 @@ import net.minecraft.world.World;
import net.minecraft.world.WorldServer; import net.minecraft.world.WorldServer;
import net.minecraft.client.entity.EntityPlayerSP; import net.minecraft.client.entity.EntityPlayerSP;
/**+ /**
* +
* This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code. * This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code.
* *
* Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!" * Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!"
* Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team * Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team
* *
* EaglercraftX 1.8 patch files (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved. * EaglercraftX 1.8 patch files (c) 2022-2024 lax1dude, ayunami2000. All Rights
* Reserved.
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * DISCLAIMED.
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * DIRECT,
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
* *
@ -82,7 +91,8 @@ public abstract class EntityLivingBase extends Entity {
private BaseAttributeMap attributeMap; private BaseAttributeMap attributeMap;
private final CombatTracker _combatTracker = new CombatTracker(this); private final CombatTracker _combatTracker = new CombatTracker(this);
private final Map<Integer, PotionEffect> activePotionsMap = Maps.newHashMap(); private final Map<Integer, PotionEffect> activePotionsMap = Maps.newHashMap();
/**+ /**
* +
* The equipment this mob was previously wearing, used for * The equipment this mob was previously wearing, used for
* syncing. * syncing.
*/ */
@ -108,7 +118,8 @@ public abstract class EntityLivingBase extends Entity {
public float prevRenderYawOffset; public float prevRenderYawOffset;
public float rotationYawHead; public float rotationYawHead;
public float prevRotationYawHead; public float prevRotationYawHead;
/**+ /**
* +
* A factor used to determine how far this entity will move each * A factor used to determine how far this entity will move each
* tick if it is jumping or falling. * tick if it is jumping or falling.
*/ */
@ -134,7 +145,8 @@ public abstract class EntityLivingBase extends Entity {
protected double newPosZ; protected double newPosZ;
protected double newRotationYaw; protected double newRotationYaw;
protected double newRotationPitch; protected double newRotationPitch;
/**+ /**
* +
* Whether the DataWatcher needs to be updated with the active * Whether the DataWatcher needs to be updated with the active
* potions * potions
*/ */
@ -147,7 +159,8 @@ public abstract class EntityLivingBase extends Entity {
private int jumpTicks; private int jumpTicks;
private float absorptionAmount; private float absorptionAmount;
/**+ /**
* +
* Called by the /kill command. * Called by the /kill command.
*/ */
public void onKillCommand() { public void onKillCommand() {
@ -209,7 +222,8 @@ public abstract class EntityLivingBase extends Entity {
return false; return false;
} }
/**+ /**
* +
* Gets called every tick from main Entity class * Gets called every tick from main Entity class
*/ */
public void onEntityUpdate() { public void onEntityUpdate() {
@ -307,14 +321,16 @@ public abstract class EntityLivingBase extends Entity {
this.worldObj.theProfiler.endSection(); this.worldObj.theProfiler.endSection();
} }
/**+ /**
* +
* If Animal, checks if the age timer is negative * If Animal, checks if the age timer is negative
*/ */
public boolean isChild() { public boolean isChild() {
return false; return false;
} }
/**+ /**
* +
* handles entity death timer, experience orb and particle * handles entity death timer, experience orb and particle
* creation * creation
*/ */
@ -349,7 +365,8 @@ public abstract class EntityLivingBase extends Entity {
} }
/**+ /**
* +
* Entity won't drop items or experience points if this returns * Entity won't drop items or experience points if this returns
* false * false
*/ */
@ -357,7 +374,8 @@ public abstract class EntityLivingBase extends Entity {
return !this.isChild(); return !this.isChild();
} }
/**+ /**
* +
* Decrements the entity's air supply when underwater * Decrements the entity's air supply when underwater
*/ */
protected int decreaseAirSupply(int parInt1) { protected int decreaseAirSupply(int parInt1) {
@ -365,14 +383,16 @@ public abstract class EntityLivingBase extends Entity {
return i > 0 && this.rand.nextInt(i + 1) > 0 ? parInt1 : parInt1 - 1; return i > 0 && this.rand.nextInt(i + 1) > 0 ? parInt1 : parInt1 - 1;
} }
/**+ /**
* +
* Get the experience points the entity currently has. * Get the experience points the entity currently has.
*/ */
protected int getExperiencePoints(EntityPlayer player) { protected int getExperiencePoints(EntityPlayer player) {
return 0; return 0;
} }
/**+ /**
* +
* Only use is to identify if class is an instance of player for * Only use is to identify if class is an instance of player for
* experience dropping * experience dropping
*/ */
@ -419,7 +439,8 @@ public abstract class EntityLivingBase extends Entity {
return this.entityAge; return this.entityAge;
} }
/**+ /**
* +
* (abstract) Protected helper method to write subclass entity * (abstract) Protected helper method to write subclass entity
* data to NBT. * data to NBT.
*/ */
@ -460,7 +481,8 @@ public abstract class EntityLivingBase extends Entity {
} }
/**+ /**
* +
* (abstract) Protected helper method to read subclass entity * (abstract) Protected helper method to read subclass entity
* data from NBT. * data from NBT.
*/ */
@ -551,7 +573,8 @@ public abstract class EntityLivingBase extends Entity {
} }
/**+ /**
* +
* Clears potion metadata values if the entity has no potion * Clears potion metadata values if the entity has no potion
* effects. Otherwise, updates potion effect color, ambience, * effects. Otherwise, updates potion effect color, ambience,
* and invisibility metadata values * and invisibility metadata values
@ -570,7 +593,8 @@ public abstract class EntityLivingBase extends Entity {
} }
/**+ /**
* +
* Resets the potion effect color and ambience metadata values * Resets the potion effect color and ambience metadata values
*/ */
protected void resetPotionEffectMetadata() { protected void resetPotionEffectMetadata() {
@ -604,7 +628,8 @@ public abstract class EntityLivingBase extends Entity {
return this.activePotionsMap.containsKey(Integer.valueOf(potionIn.id)); return this.activePotionsMap.containsKey(Integer.valueOf(potionIn.id));
} }
/**+ /**
* +
* returns the PotionEffect for the supplied Potion if it is * returns the PotionEffect for the supplied Potion if it is
* active, null otherwise. * active, null otherwise.
*/ */
@ -612,7 +637,8 @@ public abstract class EntityLivingBase extends Entity {
return (PotionEffect) this.activePotionsMap.get(Integer.valueOf(potionIn.id)); return (PotionEffect) this.activePotionsMap.get(Integer.valueOf(potionIn.id));
} }
/**+ /**
* +
* adds a PotionEffect to the entity * adds a PotionEffect to the entity
*/ */
public void addPotionEffect(PotionEffect potioneffectIn) { public void addPotionEffect(PotionEffect potioneffectIn) {
@ -641,21 +667,24 @@ public abstract class EntityLivingBase extends Entity {
return true; return true;
} }
/**+ /**
* +
* Returns true if this entity is undead. * Returns true if this entity is undead.
*/ */
public boolean isEntityUndead() { public boolean isEntityUndead() {
return this.getCreatureAttribute() == EnumCreatureAttribute.UNDEAD; return this.getCreatureAttribute() == EnumCreatureAttribute.UNDEAD;
} }
/**+ /**
* +
* Remove the speified potion effect from this entity. * Remove the speified potion effect from this entity.
*/ */
public void removePotionEffectClient(int potionId) { public void removePotionEffectClient(int potionId) {
this.activePotionsMap.remove(Integer.valueOf(potionId)); this.activePotionsMap.remove(Integer.valueOf(potionId));
} }
/**+ /**
* +
* Remove the specified potion effect from this entity. * Remove the specified potion effect from this entity.
*/ */
public void removePotionEffect(int potionId) { public void removePotionEffect(int potionId) {
@ -695,7 +724,8 @@ public abstract class EntityLivingBase extends Entity {
} }
/**+ /**
* +
* Heal living entity (param: amount of half-hearts) * Heal living entity (param: amount of half-hearts)
*/ */
public void heal(float f) { public void heal(float f) {
@ -714,7 +744,8 @@ public abstract class EntityLivingBase extends Entity {
this.dataWatcher.updateObject(6, Float.valueOf(MathHelper.clamp_float(health, 0.0F, this.getMaxHealth()))); this.dataWatcher.updateObject(6, Float.valueOf(MathHelper.clamp_float(health, 0.0F, this.getMaxHealth())));
} }
/**+ /**
* +
* Called when the entity is attacked. * Called when the entity is attacked.
*/ */
public boolean attackEntityFrom(DamageSource damagesource, float f) { public boolean attackEntityFrom(DamageSource damagesource, float f) {
@ -813,7 +844,8 @@ public abstract class EntityLivingBase extends Entity {
} }
} }
/**+ /**
* +
* Renders broken item particles using the given ItemStack * Renders broken item particles using the given ItemStack
*/ */
public void renderBrokenItemStack(ItemStack stack) { public void renderBrokenItemStack(ItemStack stack) {
@ -834,7 +866,8 @@ public abstract class EntityLivingBase extends Entity {
} }
/**+ /**
* +
* Called when the mob's health reaches 0. * Called when the mob's health reaches 0.
*/ */
public void onDeath(DamageSource damagesource) { public void onDeath(DamageSource damagesource) {
@ -868,13 +901,15 @@ public abstract class EntityLivingBase extends Entity {
this.worldObj.setEntityState(this, (byte) 3); this.worldObj.setEntityState(this, (byte) 3);
} }
/**+ /**
* +
* Drop the equipment for this entity. * Drop the equipment for this entity.
*/ */
protected void dropEquipment(boolean parFlag, int parInt1) { protected void dropEquipment(boolean parFlag, int parInt1) {
} }
/**+ /**
* +
* knocks back this entity * knocks back this entity
*/ */
public void knockBack(Entity entityIn, float parFloat1, double parDouble1, double parDouble2) { public void knockBack(Entity entityIn, float parFloat1, double parDouble1, double parDouble2) {
@ -896,33 +931,38 @@ public abstract class EntityLivingBase extends Entity {
} }
} }
/**+ /**
* +
* Returns the sound this mob makes when it is hurt. * Returns the sound this mob makes when it is hurt.
*/ */
protected String getHurtSound() { protected String getHurtSound() {
return "game.neutral.hurt"; return "game.neutral.hurt";
} }
/**+ /**
* +
* Returns the sound this mob makes on death. * Returns the sound this mob makes on death.
*/ */
protected String getDeathSound() { protected String getDeathSound() {
return "game.neutral.die"; return "game.neutral.die";
} }
/**+ /**
* +
* Causes this Entity to drop a random item. * Causes this Entity to drop a random item.
*/ */
protected void addRandomDrop() { protected void addRandomDrop() {
} }
/**+ /**
* +
* Drop 0-2 items of this living's type * Drop 0-2 items of this living's type
*/ */
protected void dropFewItems(boolean parFlag, int parInt1) { protected void dropFewItems(boolean parFlag, int parInt1) {
} }
/**+ /**
* +
* returns true if this entity is by a ladder, false otherwise * returns true if this entity is by a ladder, false otherwise
*/ */
public boolean isOnLadder() { public boolean isOnLadder() {
@ -934,7 +974,8 @@ public abstract class EntityLivingBase extends Entity {
&& (!(this instanceof EntityPlayer) || !((EntityPlayer) this).isSpectator()); && (!(this instanceof EntityPlayer) || !((EntityPlayer) this).isSpectator());
} }
/**+ /**
* +
* Checks whether target entity is alive. * Checks whether target entity is alive.
*/ */
public boolean isEntityAlive() { public boolean isEntityAlive() {
@ -966,7 +1007,8 @@ public abstract class EntityLivingBase extends Entity {
return damageValue > 4 ? "game.neutral.hurt.fall.big" : "game.neutral.hurt.fall.small"; return damageValue > 4 ? "game.neutral.hurt.fall.big" : "game.neutral.hurt.fall.small";
} }
/**+ /**
* +
* Setups the entity to do the hurt animation. Only used by * Setups the entity to do the hurt animation. Only used by
* packets in multiplayer. * packets in multiplayer.
*/ */
@ -975,7 +1017,8 @@ public abstract class EntityLivingBase extends Entity {
this.attackedAtYaw = 0.0F; this.attackedAtYaw = 0.0F;
} }
/**+ /**
* +
* Returns the current armor value as determined by a call to * Returns the current armor value as determined by a call to
* InventoryPlayer.getTotalArmorValue * InventoryPlayer.getTotalArmorValue
*/ */
@ -995,7 +1038,8 @@ public abstract class EntityLivingBase extends Entity {
protected void damageArmor(float parFloat1) { protected void damageArmor(float parFloat1) {
} }
/**+ /**
* +
* Reduces damage, depending on armor * Reduces damage, depending on armor
*/ */
protected float applyArmorCalculations(DamageSource source, float damage) { protected float applyArmorCalculations(DamageSource source, float damage) {
@ -1009,7 +1053,8 @@ public abstract class EntityLivingBase extends Entity {
return damage; return damage;
} }
/**+ /**
* +
* Reduces damage, depending on potions * Reduces damage, depending on potions
*/ */
protected float applyPotionDamageCalculations(DamageSource source, float damage) { protected float applyPotionDamageCalculations(DamageSource source, float damage) {
@ -1042,7 +1087,8 @@ public abstract class EntityLivingBase extends Entity {
} }
} }
/**+ /**
* +
* Deals damage to the entity. If its a EntityPlayer then will * Deals damage to the entity. If its a EntityPlayer then will
* take damage from the armor first and then health second with * take damage from the armor first and then health second with
* the reduced value. Args: damageAmount * the reduced value. Args: damageAmount
@ -1077,7 +1123,8 @@ public abstract class EntityLivingBase extends Entity {
return (float) this.getEntityAttribute(SharedMonsterAttributes.maxHealth).getAttributeValue(); return (float) this.getEntityAttribute(SharedMonsterAttributes.maxHealth).getAttributeValue();
} }
/**+ /**
* +
* counts the amount of arrows stuck in the entity. getting hit * counts the amount of arrows stuck in the entity. getting hit
* by arrows increases this, used in rendering * by arrows increases this, used in rendering
*/ */
@ -1085,7 +1132,8 @@ public abstract class EntityLivingBase extends Entity {
return this.dataWatcher.getWatchableObjectByte(9); return this.dataWatcher.getWatchableObjectByte(9);
} }
/**+ /**
* +
* sets the amount of arrows stuck in the entity. used for * sets the amount of arrows stuck in the entity. used for
* rendering those * rendering those
*/ */
@ -1093,7 +1141,8 @@ public abstract class EntityLivingBase extends Entity {
this.dataWatcher.updateObject(9, Byte.valueOf((byte) count)); this.dataWatcher.updateObject(9, Byte.valueOf((byte) count));
} }
/**+ /**
* +
* Returns an integer indicating the end point of the swing * Returns an integer indicating the end point of the swing
* animation, used by {@link #swingProgress} to provide a * animation, used by {@link #swingProgress} to provide a
* progress indicator. Takes dig speed enchantments into * progress indicator. Takes dig speed enchantments into
@ -1107,7 +1156,8 @@ public abstract class EntityLivingBase extends Entity {
: 6); : 6);
} }
/**+ /**
* +
* Swings the item the player is holding. * Swings the item the player is holding.
*/ */
public void swingItem() { public void swingItem() {
@ -1151,7 +1201,8 @@ public abstract class EntityLivingBase extends Entity {
} }
/**+ /**
* +
* sets the dead flag. Used when you fall off the bottom of the * sets the dead flag. Used when you fall off the bottom of the
* world. * world.
*/ */
@ -1159,7 +1210,8 @@ public abstract class EntityLivingBase extends Entity {
this.attackEntityFrom(DamageSource.outOfWorld, 4.0F); this.attackEntityFrom(DamageSource.outOfWorld, 4.0F);
} }
/**+ /**
* +
* Updates the arm swing progress counters and animation * Updates the arm swing progress counters and animation
* progress * progress
*/ */
@ -1190,7 +1242,8 @@ public abstract class EntityLivingBase extends Entity {
return this.attributeMap; return this.attributeMap;
} }
/**+ /**
* +
* Get this Entity's EnumCreatureAttribute * Get this Entity's EnumCreatureAttribute
*/ */
public EnumCreatureAttribute getCreatureAttribute() { public EnumCreatureAttribute getCreatureAttribute() {
@ -1205,7 +1258,8 @@ public abstract class EntityLivingBase extends Entity {
public abstract void setCurrentItemOrArmor(int var1, ItemStack var2); public abstract void setCurrentItemOrArmor(int var1, ItemStack var2);
/**+ /**
* +
* Set sprinting switch for Entity. * Set sprinting switch for Entity.
*/ */
public void setSprinting(boolean flag) { public void setSprinting(boolean flag) {
@ -1223,14 +1277,16 @@ public abstract class EntityLivingBase extends Entity {
public abstract ItemStack[] getInventory(); public abstract ItemStack[] getInventory();
/**+ /**
* +
* Returns the volume for the sounds this mob makes. * Returns the volume for the sounds this mob makes.
*/ */
protected float getSoundVolume() { protected float getSoundVolume() {
return 1.0F; return 1.0F;
} }
/**+ /**
* +
* Gets the pitch of living sounds in living entities. * Gets the pitch of living sounds in living entities.
*/ */
protected float getSoundPitch() { protected float getSoundPitch() {
@ -1238,14 +1294,16 @@ public abstract class EntityLivingBase extends Entity {
: (this.rand.nextFloat() - this.rand.nextFloat()) * 0.2F + 1.0F; : (this.rand.nextFloat() - this.rand.nextFloat()) * 0.2F + 1.0F;
} }
/**+ /**
* +
* Dead and sleeping entities cannot move * Dead and sleeping entities cannot move
*/ */
protected boolean isMovementBlocked() { protected boolean isMovementBlocked() {
return this.getHealth() <= 0.0F; return this.getHealth() <= 0.0F;
} }
/**+ /**
* +
* Moves the entity to a position out of the way of its mount. * Moves the entity to a position out of the way of its mount.
*/ */
public void dismountEntity(Entity parEntity) { public void dismountEntity(Entity parEntity) {
@ -1289,7 +1347,8 @@ public abstract class EntityLivingBase extends Entity {
return 0.42F; return 0.42F;
} }
/**+ /**
* +
* Causes this entity to do an upwards motion (jumping). * Causes this entity to do an upwards motion (jumping).
*/ */
protected void jump() { protected void jump() {
@ -1307,7 +1366,8 @@ public abstract class EntityLivingBase extends Entity {
this.isAirBorne = true; this.isAirBorne = true;
} }
/**+ /**
* +
* main AI tick function, replaces updateEntityActionState * main AI tick function, replaces updateEntityActionState
*/ */
protected void updateAITick() { protected void updateAITick() {
@ -1318,7 +1378,8 @@ public abstract class EntityLivingBase extends Entity {
this.motionY += 0.03999999910593033D; this.motionY += 0.03999999910593033D;
} }
/**+ /**
* +
* Moves the entity based on the specified heading. Args: * Moves the entity based on the specified heading. Args:
* strafe, forward * strafe, forward
*/ */
@ -1442,14 +1503,16 @@ public abstract class EntityLivingBase extends Entity {
this.limbSwing += this.limbSwingAmount; this.limbSwing += this.limbSwingAmount;
} }
/**+ /**
* +
* the movespeed used for the new AI system * the movespeed used for the new AI system
*/ */
public float getAIMoveSpeed() { public float getAIMoveSpeed() {
return this.landMovementFactor; return this.landMovementFactor;
} }
/**+ /**
* +
* set the movespeed used for the new AI system * set the movespeed used for the new AI system
*/ */
public void setAIMoveSpeed(float speedIn) { public void setAIMoveSpeed(float speedIn) {
@ -1461,14 +1524,16 @@ public abstract class EntityLivingBase extends Entity {
return false; return false;
} }
/**+ /**
* +
* Returns whether player is sleeping or not * Returns whether player is sleeping or not
*/ */
public boolean isPlayerSleeping() { public boolean isPlayerSleeping() {
return false; return false;
} }
/**+ /**
* +
* Called to update the entity's position/logic. * Called to update the entity's position/logic.
*/ */
public void onUpdate() { public void onUpdate() {
@ -1598,7 +1663,8 @@ public abstract class EntityLivingBase extends Entity {
return parFloat2; return parFloat2;
} }
/**+ /**
* +
* Called frequently so the entity can update its state every * Called frequently so the entity can update its state every
* tick as required. For example, zombies and skeletons use this * tick as required. For example, zombies and skeletons use this
* to react to sunlight and start to burn. * to react to sunlight and start to burn.
@ -1703,7 +1769,8 @@ public abstract class EntityLivingBase extends Entity {
parEntity.applyEntityCollision(this); parEntity.applyEntityCollision(this);
} }
/**+ /**
* +
* Called when a player mounts an entity. e.g. mounts a pig, * Called when a player mounts an entity. e.g. mounts a pig,
* mounts a boat. * mounts a boat.
*/ */
@ -1723,7 +1790,8 @@ public abstract class EntityLivingBase extends Entity {
} }
} }
/**+ /**
* +
* Handles updating while being ridden by an entity * Handles updating while being ridden by an entity
*/ */
public void updateRidden() { public void updateRidden() {
@ -1746,7 +1814,8 @@ public abstract class EntityLivingBase extends Entity {
this.isJumping = parFlag; this.isJumping = parFlag;
} }
/**+ /**
* +
* Called whenever an item is picked up from walking over it. * Called whenever an item is picked up from walking over it.
* Args: pickedUpEntity, stackSize * Args: pickedUpEntity, stackSize
*/ */
@ -1771,7 +1840,8 @@ public abstract class EntityLivingBase extends Entity {
} }
/**+ /**
* +
* returns true if the entity provided in the argument can be * returns true if the entity provided in the argument can be
* seen. (Raytrace) * seen. (Raytrace)
*/ */
@ -1780,20 +1850,19 @@ public abstract class EntityLivingBase extends Entity {
new Vec3(entityIn.posX, entityIn.posY + (double) entityIn.getEyeHeight(), entityIn.posZ)) == null; new Vec3(entityIn.posX, entityIn.posY + (double) entityIn.getEyeHeight(), entityIn.posZ)) == null;
} }
/**+ /**
* +
* returns a (normalized) vector of where this entity is looking * returns a (normalized) vector of where this entity is looking
*/ */
public Vec3 getLookVec() { public Vec3 getLookVec() {
return this.getLook(1.0F); return this.getLook(1.0F);
} }
/**+ /**
* +
* interpolated look vector * interpolated look vector
*/ */
public Vec3 getLook(float f) { public Vec3 getLook(float f) {
if (this instanceof EntityPlayerSP) {
return super.getLook(f);
}
if (f == 1.0F) { if (f == 1.0F) {
return this.getVectorForRotation(this.rotationPitch, this.rotationYawHead); return this.getVectorForRotation(this.rotationPitch, this.rotationYawHead);
} else { } else {
@ -1803,7 +1872,8 @@ public abstract class EntityLivingBase extends Entity {
} }
} }
/**+ /**
* +
* Returns where in the swing animation the living entity is * Returns where in the swing animation the living entity is
* (from 0 to 1). Args: partialTickTime * (from 0 to 1). Args: partialTickTime
*/ */
@ -1816,14 +1886,16 @@ public abstract class EntityLivingBase extends Entity {
return this.prevSwingProgress + f * partialTickTime; return this.prevSwingProgress + f * partialTickTime;
} }
/**+ /**
* +
* Returns whether the entity is in a server world * Returns whether the entity is in a server world
*/ */
public boolean isServerWorld() { public boolean isServerWorld() {
return !this.worldObj.isRemote; return !this.worldObj.isRemote;
} }
/**+ /**
* +
* Returns true if other Entities should be prevented from * Returns true if other Entities should be prevented from
* moving through this Entity. * moving through this Entity.
*/ */
@ -1831,7 +1903,8 @@ public abstract class EntityLivingBase extends Entity {
return !this.isDead; return !this.isDead;
} }
/**+ /**
* +
* Returns true if this entity should push and be pushed by * Returns true if this entity should push and be pushed by
* other entities when colliding. * other entities when colliding.
*/ */
@ -1839,7 +1912,8 @@ public abstract class EntityLivingBase extends Entity {
return !this.isDead; return !this.isDead;
} }
/**+ /**
* +
* Sets that this entity has been attacked. * Sets that this entity has been attacked.
*/ */
protected void setBeenAttacked() { protected void setBeenAttacked() {
@ -1851,7 +1925,8 @@ public abstract class EntityLivingBase extends Entity {
return this.rotationYawHead; return this.rotationYawHead;
} }
/**+ /**
* +
* Sets the head's yaw rotation of the entity. * Sets the head's yaw rotation of the entity.
*/ */
public void setRotationYawHead(float f) { public void setRotationYawHead(float f) {
@ -1882,20 +1957,23 @@ public abstract class EntityLivingBase extends Entity {
return this.isOnTeam(otherEntity.getTeam()); return this.isOnTeam(otherEntity.getTeam());
} }
/**+ /**
* +
* Returns true if the entity is on a specific team. * Returns true if the entity is on a specific team.
*/ */
public boolean isOnTeam(Team parTeam) { public boolean isOnTeam(Team parTeam) {
return this.getTeam() != null ? this.getTeam().isSameTeam(parTeam) : false; return this.getTeam() != null ? this.getTeam().isSameTeam(parTeam) : false;
} }
/**+ /**
* +
* Sends an ENTER_COMBAT packet to the client * Sends an ENTER_COMBAT packet to the client
*/ */
public void sendEnterCombat() { public void sendEnterCombat() {
} }
/**+ /**
* +
* Sends an END_COMBAT packet to the client * Sends an END_COMBAT packet to the client
*/ */
public void sendEndCombat() { public void sendEndCombat() {