diff options
Diffstat (limited to 'src/main/java/gtPlusPlus/core/entity')
4 files changed, 44 insertions, 0 deletions
diff --git a/src/main/java/gtPlusPlus/core/entity/EntityTeslaTowerLightning.java b/src/main/java/gtPlusPlus/core/entity/EntityTeslaTowerLightning.java index 15563ef508..82615309b0 100644 --- a/src/main/java/gtPlusPlus/core/entity/EntityTeslaTowerLightning.java +++ b/src/main/java/gtPlusPlus/core/entity/EntityTeslaTowerLightning.java @@ -81,6 +81,7 @@ public class EntityTeslaTowerLightning extends EntityWeatherEffect { /** * Called to update the entity's position/logic. */ + @Override public void onUpdate() { // Logger.INFO("Zap"); super.onUpdate(); @@ -162,15 +163,18 @@ public class EntityTeslaTowerLightning extends EntityWeatherEffect { } } + @Override protected void entityInit() {} /** * (abstract) Protected helper method to read subclass entity data from NBT. */ + @Override protected void readEntityFromNBT(NBTTagCompound p_70037_1_) {} /** * (abstract) Protected helper method to write subclass entity data to NBT. */ + @Override protected void writeEntityToNBT(NBTTagCompound p_70014_1_) {} } diff --git a/src/main/java/gtPlusPlus/core/entity/monster/EntityBatKing.java b/src/main/java/gtPlusPlus/core/entity/monster/EntityBatKing.java index 049d47cc21..1c786a20b8 100644 --- a/src/main/java/gtPlusPlus/core/entity/monster/EntityBatKing.java +++ b/src/main/java/gtPlusPlus/core/entity/monster/EntityBatKing.java @@ -76,6 +76,7 @@ public class EntityBatKing extends EntityMob implements IRangedAttackMob { this.targetTasks.addTask(3, new EntityAINearestAttackableTarget(this, EntityBat.class, 0, false)); } + @Override protected void entityInit() { super.entityInit(); } @@ -83,6 +84,7 @@ public class EntityBatKing extends EntityMob implements IRangedAttackMob { /** * Get this Entity's EnumCreatureAttribute */ + @Override public EnumCreatureAttribute getCreatureAttribute() { return EnumCreatureAttribute.UNDEAD; } @@ -90,6 +92,7 @@ public class EntityBatKing extends EntityMob implements IRangedAttackMob { /** * Gets the pitch of living sounds in living entities. */ + @Override protected float getSoundPitch() { return super.getSoundPitch() * 0.15F; } @@ -97,6 +100,7 @@ public class EntityBatKing extends EntityMob implements IRangedAttackMob { /** * Returns the sound this mob makes while it's alive. */ + @Override protected String getLivingSound() { int aRand = MathUtils.randInt(0, 10); if (aRand < 6) { @@ -111,6 +115,7 @@ public class EntityBatKing extends EntityMob implements IRangedAttackMob { /** * Returns the sound this mob makes when it is hurt. */ + @Override protected String getHurtSound() { return "mob.blaze.hit"; } @@ -118,6 +123,7 @@ public class EntityBatKing extends EntityMob implements IRangedAttackMob { /** * Returns the sound this mob makes on death. */ + @Override protected String getDeathSound() { return "mob.bat.death"; } @@ -125,10 +131,12 @@ public class EntityBatKing extends EntityMob implements IRangedAttackMob { /** * Returns true if this entity should push and be pushed by other entities when colliding. */ + @Override public boolean canBePushed() { return true; } + @Override protected void collideWithEntity(Entity aEntity) { if (aEntity != null) { if (aEntity instanceof EntityPlayer) { @@ -137,8 +145,10 @@ public class EntityBatKing extends EntityMob implements IRangedAttackMob { } } + @Override protected void collideWithNearbyEntities() {} + @Override protected void applyEntityAttributes() { this.getAttributeMap().registerAttribute(SharedMonsterAttributes.maxHealth); @@ -181,6 +191,7 @@ public class EntityBatKing extends EntityMob implements IRangedAttackMob { /** * Returns true if the newer Entity AI code should be run */ + @Override protected boolean isAIEnabled() { return true; } @@ -188,6 +199,7 @@ public class EntityBatKing extends EntityMob implements IRangedAttackMob { /** * Called to update the entity's position/logic. */ + @Override public void onUpdate() { super.onUpdate(); generateParticles(this); @@ -263,6 +275,7 @@ public class EntityBatKing extends EntityMob implements IRangedAttackMob { } } + @Override protected void updateAITasks() { super.updateAITasks(); } @@ -301,6 +314,7 @@ public class EntityBatKing extends EntityMob implements IRangedAttackMob { * returns if this entity triggers Block.onEntityWalking on the blocks they walk on. used for spiders and wolves to * prevent them from trampling crops */ + @Override protected boolean canTriggerWalking() { return false; } @@ -308,6 +322,7 @@ public class EntityBatKing extends EntityMob implements IRangedAttackMob { /** * Return whether this entity should NOT trigger a pressure plate or a tripwire. */ + @Override public boolean doesEntityNotTriggerPressurePlate() { return true; } @@ -315,6 +330,7 @@ public class EntityBatKing extends EntityMob implements IRangedAttackMob { /** * Called when the entity is attacked. */ + @Override public boolean attackEntityFrom(DamageSource p_70097_1_, float p_70097_2_) { if (this.isEntityInvulnerable()) { return false; @@ -330,6 +346,7 @@ public class EntityBatKing extends EntityMob implements IRangedAttackMob { /** * (abstract) Protected helper method to read subclass entity data from NBT. */ + @Override public void readEntityFromNBT(NBTTagCompound p_70037_1_) { super.readEntityFromNBT(p_70037_1_); if (p_70037_1_.hasKey("ExplosionPower", 99)) { @@ -340,6 +357,7 @@ public class EntityBatKing extends EntityMob implements IRangedAttackMob { /** * (abstract) Protected helper method to write subclass entity data to NBT. */ + @Override public void writeEntityToNBT(NBTTagCompound p_70014_1_) { super.writeEntityToNBT(p_70014_1_); p_70014_1_.setInteger("ExplosionPower", this.explosionStrength); @@ -488,6 +506,7 @@ public class EntityBatKing extends EntityMob implements IRangedAttackMob { /** * Returns the volume for the sounds this mob makes. */ + @Override protected float getSoundVolume() { return 10.0F; } @@ -495,6 +514,7 @@ public class EntityBatKing extends EntityMob implements IRangedAttackMob { /** * Checks if the entity's current position is a valid location to spawn this entity. */ + @Override public boolean getCanSpawnHere() { return super.getCanSpawnHere() && this.worldObj.difficultySetting != EnumDifficulty.PEACEFUL; } @@ -502,10 +522,12 @@ public class EntityBatKing extends EntityMob implements IRangedAttackMob { /** * Will return how many at most can spawn in a chunk at once. */ + @Override public int getMaxSpawnedInChunk() { return 1; } + @Override protected Item getDropItem() { return Items.gunpowder; } @@ -514,6 +536,7 @@ public class EntityBatKing extends EntityMob implements IRangedAttackMob { * Drop 0-2 items of this living's type. @param par1 - Whether this entity has recently been hit by a player. @param * par2 - Level of Looting used to kill this mob. */ + @Override protected void dropFewItems(boolean p_70628_1_, int p_70628_2_) { int j = this.rand.nextInt(2) + this.rand.nextInt(1 + p_70628_2_); int k; @@ -660,17 +683,20 @@ public class EntityBatKing extends EntityMob implements IRangedAttackMob { /** * Called when the mob is falling. Calculates and applies fall damage. */ + @Override protected void fall(float p_70069_1_) {} /** * Takes in the distance the entity has fallen this tick and whether its on the ground to update the fall distance * and deal fall damage if landing on the ground. Args: distanceFallenThisTick, onGround */ + @Override protected void updateFallState(double p_70064_1_, boolean p_70064_3_) {} /** * Moves the entity based on the specified heading. Args: strafe, forward */ + @Override public void moveEntityWithHeading(float p_70612_1_, float p_70612_2_) { if (this.isInWater()) { this.moveFlying(p_70612_1_, p_70612_2_, 0.02F); @@ -727,6 +753,7 @@ public class EntityBatKing extends EntityMob implements IRangedAttackMob { /** * returns true if this entity is by a ladder, false otherwise */ + @Override public boolean isOnLadder() { return false; } diff --git a/src/main/java/gtPlusPlus/core/entity/monster/EntityGiantChickenBase.java b/src/main/java/gtPlusPlus/core/entity/monster/EntityGiantChickenBase.java index cc9d47dcbc..45bbcab4c8 100644 --- a/src/main/java/gtPlusPlus/core/entity/monster/EntityGiantChickenBase.java +++ b/src/main/java/gtPlusPlus/core/entity/monster/EntityGiantChickenBase.java @@ -51,6 +51,7 @@ public class EntityGiantChickenBase extends EntityChicken { this.tasks.addTask(6, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F)); } + @Override protected void applyEntityAttributes() { super.applyEntityAttributes(); this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(40.0D); @@ -61,6 +62,7 @@ public class EntityGiantChickenBase extends EntityChicken { * Called frequently so the entity can update its state every tick as required. For example, zombies and skeletons * use this to react to sunlight and start to burn. */ + @Override public void onLivingUpdate() { super.onLivingUpdate(); this.field_70888_h = this.field_70886_e; @@ -106,6 +108,7 @@ public class EntityGiantChickenBase extends EntityChicken { /** * Called when the mob is falling. Calculates and applies fall damage. */ + @Override protected void fall(float p_70069_1_) { if (MathUtils.randInt(0, 10) <= 5) { @@ -113,6 +116,7 @@ public class EntityGiantChickenBase extends EntityChicken { } } + @Override protected Item getDropItem() { return ModItems.itemBigEgg; } @@ -121,6 +125,7 @@ public class EntityGiantChickenBase extends EntityChicken { * Drop 0-2 items of this living's type. @param par1 - Whether this entity has recently been hit by a player. @param * par2 - Level of Looting used to kill this mob. */ + @Override protected void dropFewItems(boolean recentHit, int lootLevel) { int j = this.rand.nextInt(3) + this.rand.nextInt(1 + lootLevel); @@ -146,6 +151,7 @@ public class EntityGiantChickenBase extends EntityChicken { } } + @Override public EntityGiantChickenBase createChild(EntityAgeable p_90011_1_) { return new EntityGiantChickenBase(this.worldObj); } @@ -154,6 +160,7 @@ public class EntityGiantChickenBase extends EntityChicken { * Checks if the parameter is an item which this animal can be fed to breed it (wheat, carrots or seeds depending on * the animal type) */ + @Override public boolean isBreedingItem(ItemStack aStack) { return aStack != null && aStack.getItem() instanceof ItemGemShards; } @@ -161,6 +168,7 @@ public class EntityGiantChickenBase extends EntityChicken { /** * (abstract) Protected helper method to read subclass entity data from NBT. */ + @Override public void readEntityFromNBT(NBTTagCompound aNBT) { super.readEntityFromNBT(aNBT); timeUntilNextBigEgg = aNBT.getInteger("timeUntilNextBigEgg"); @@ -169,6 +177,7 @@ public class EntityGiantChickenBase extends EntityChicken { /** * Get the experience points the entity currently has. */ + @Override protected int getExperiencePoints(EntityPlayer p_70693_1_) { return this.isChickenJockey() ? 20 : super.getExperiencePoints(p_70693_1_); } @@ -176,6 +185,7 @@ public class EntityGiantChickenBase extends EntityChicken { /** * (abstract) Protected helper method to write subclass entity data to NBT. */ + @Override public void writeEntityToNBT(NBTTagCompound aNBT) { super.writeEntityToNBT(aNBT); aNBT.setInteger("timeUntilNextBigEgg", timeUntilNextBigEgg); @@ -184,10 +194,12 @@ public class EntityGiantChickenBase extends EntityChicken { /** * Determines if an entity can be despawned, used on idle far away entities */ + @Override protected boolean canDespawn() { return this.isChickenJockey() && this.riddenByEntity == null; } + @Override public void updateRiderPosition() { super.updateRiderPosition(); float f = MathHelper.sin(this.renderYawOffset * (float) Math.PI / 180.0F); diff --git a/src/main/java/gtPlusPlus/core/entity/projectile/EntityLightningAttack.java b/src/main/java/gtPlusPlus/core/entity/projectile/EntityLightningAttack.java index 595eb53968..cea480fda8 100644 --- a/src/main/java/gtPlusPlus/core/entity/projectile/EntityLightningAttack.java +++ b/src/main/java/gtPlusPlus/core/entity/projectile/EntityLightningAttack.java @@ -35,6 +35,7 @@ public class EntityLightningAttack extends EntityWitherSkull { /** * Called when this EntityFireball hits a block or entity. */ + @Override protected void onImpact(MovingObjectPosition p_70227_1_) { if (!this.worldObj.isRemote) { |