diff options
author | Draknyte1 <Draknyte1@hotmail.com> | 2017-12-20 23:39:49 +1000 |
---|---|---|
committer | Draknyte1 <Draknyte1@hotmail.com> | 2017-12-20 23:39:49 +1000 |
commit | 5715a32d2901922503fd850f3a68503fb77467c3 (patch) | |
tree | 7e12520fbc23844e99493d55af4410a785538e35 /src/Java/gtPlusPlus/core/entity | |
parent | 2a4795f65d98ff60a177d7d6a5552fd687d9f6e8 (diff) | |
download | GT5-Unofficial-5715a32d2901922503fd850f3a68503fb77467c3.tar.gz GT5-Unofficial-5715a32d2901922503fd850f3a68503fb77467c3.tar.bz2 GT5-Unofficial-5715a32d2901922503fd850f3a68503fb77467c3.zip |
- Disabled some logging.
% Minor Project Clean-up, added missing Override annotations to 100+ methods & removed pointless casts.
% Moved Logging to it's own class.
$ Fixed Multi-block handling of Pollution.
$ Fixed the GT 5.09 material enabler system. (From My Side, it's still borked on GTs).
+ Added a Dynamic Proxy invocation for IMaterialHandler.
+ Added an AutoMap data type, which is a Auto-incremental ID'd Hashmap wrapper.
Diffstat (limited to 'src/Java/gtPlusPlus/core/entity')
4 files changed, 14 insertions, 10 deletions
diff --git a/src/Java/gtPlusPlus/core/entity/InternalEntityRegistry.java b/src/Java/gtPlusPlus/core/entity/InternalEntityRegistry.java index 5eb6e91812..5233c876e9 100644 --- a/src/Java/gtPlusPlus/core/entity/InternalEntityRegistry.java +++ b/src/Java/gtPlusPlus/core/entity/InternalEntityRegistry.java @@ -2,19 +2,19 @@ package gtPlusPlus.core.entity; import cpw.mods.fml.common.registry.EntityRegistry; import gtPlusPlus.GTplusplus; +import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.entity.monster.EntitySickBlaze; import gtPlusPlus.core.entity.monster.EntityStaballoyConstruct; import gtPlusPlus.core.entity.projectile.EntityHydrofluoricAcidPotion; import gtPlusPlus.core.entity.projectile.EntitySulfuricAcidPotion; import gtPlusPlus.core.entity.projectile.EntityToxinballSmall; -import gtPlusPlus.core.util.Utils; public class InternalEntityRegistry { static int mEntityID = 0; public static void registerEntities(){ - Utils.LOG_INFO("Registering GT++ Entities."); + Logger.INFO("Registering GT++ Entities."); //EntityRegistry.registerModEntity(EntityMiningChargePrimed.class, "MiningCharge", 3, Main.modInstance, 64, 20, true); EntityRegistry.registerModEntity(EntityPrimedMiningExplosive.class, "MiningCharge", mEntityID++, GTplusplus.instance, 64, 20, true); EntityRegistry.registerModEntity(EntitySulfuricAcidPotion.class, "throwablePotionSulfuric", mEntityID++, GTplusplus.instance, 64, 20, true); diff --git a/src/Java/gtPlusPlus/core/entity/monster/EntityStaballoyConstruct.java b/src/Java/gtPlusPlus/core/entity/monster/EntityStaballoyConstruct.java index 2cbd00bf2c..e95ee5caf0 100644 --- a/src/Java/gtPlusPlus/core/entity/monster/EntityStaballoyConstruct.java +++ b/src/Java/gtPlusPlus/core/entity/monster/EntityStaballoyConstruct.java @@ -11,11 +11,9 @@ import net.minecraft.entity.ai.*; import net.minecraft.entity.monster.EntityIronGolem; import net.minecraft.entity.monster.IMob; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.item.Item; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.*; +import net.minecraft.util.DamageSource; +import net.minecraft.util.MathHelper; import net.minecraft.village.Village; import net.minecraft.world.World; @@ -188,15 +186,18 @@ public class EntityStaballoyConstruct extends EntityIronGolem { } } + @Override public Village getVillage() { return null; } + @Override @SideOnly(Side.CLIENT) public int getAttackTimer() { return this.attackTimer; } + @Override public void setHoldingRose(boolean p_70851_1_) { this.holdRoseTick = p_70851_1_ ? 400 : 0; this.worldObj.setEntityState(this, (byte) 11); @@ -248,14 +249,17 @@ public class EntityStaballoyConstruct extends EntityIronGolem { } } + @Override public int getHoldRoseTick() { return this.holdRoseTick; } + @Override public boolean isPlayerCreated() { return (this.dataWatcher.getWatchableObjectByte(16) & 1) != 0; } + @Override public void setPlayerCreated(boolean p_70849_1_) { byte b0 = this.dataWatcher.getWatchableObjectByte(16); diff --git a/src/Java/gtPlusPlus/core/entity/projectile/EntityHydrofluoricAcidPotion.java b/src/Java/gtPlusPlus/core/entity/projectile/EntityHydrofluoricAcidPotion.java index 8b86d456b7..c935409650 100644 --- a/src/Java/gtPlusPlus/core/entity/projectile/EntityHydrofluoricAcidPotion.java +++ b/src/Java/gtPlusPlus/core/entity/projectile/EntityHydrofluoricAcidPotion.java @@ -5,10 +5,8 @@ import gtPlusPlus.core.util.array.BlockPos; import gtPlusPlus.core.util.entity.EntityUtils; import gtPlusPlus.core.util.math.MathUtils; import net.minecraft.block.Block; -import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.entity.projectile.EntityThrowable; import net.minecraft.init.Blocks; import net.minecraft.potion.Potion; @@ -34,6 +32,7 @@ public class EntityHydrofluoricAcidPotion extends EntityThrowable { /** * Called when this EntityThrowable hits a block or entity. */ + @Override protected void onImpact(MovingObjectPosition object) { int xBlock = object.blockX; int yBlock = object.blockY; @@ -41,7 +40,7 @@ public class EntityHydrofluoricAcidPotion extends EntityThrowable { if (object.entityHit != null) { byte b0 = 6; if (!GT_Utility.isWearingFullRadioHazmat((EntityLivingBase) object.entityHit)){ - object.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), (float) b0); + object.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), b0); EntityUtils.setEntityOnFire(object.entityHit, 5); if (object.entityHit instanceof EntityPlayer){ diff --git a/src/Java/gtPlusPlus/core/entity/projectile/EntitySulfuricAcidPotion.java b/src/Java/gtPlusPlus/core/entity/projectile/EntitySulfuricAcidPotion.java index 38bcb42791..cd4bec52bf 100644 --- a/src/Java/gtPlusPlus/core/entity/projectile/EntitySulfuricAcidPotion.java +++ b/src/Java/gtPlusPlus/core/entity/projectile/EntitySulfuricAcidPotion.java @@ -29,6 +29,7 @@ public class EntitySulfuricAcidPotion extends EntityThrowable { /** * Called when this EntityThrowable hits a block or entity. */ + @Override protected void onImpact(MovingObjectPosition object) { int xBlock = object.blockX; int yBlock = object.blockY; @@ -36,7 +37,7 @@ public class EntitySulfuricAcidPotion extends EntityThrowable { if (object.entityHit != null) { byte b0 = 6; if (!GT_Utility.isWearingFullRadioHazmat((EntityLivingBase) object.entityHit)){ - object.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), (float) b0); + object.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), b0); EntityUtils.setEntityOnFire(object.entityHit, 10); object.entityHit.fireResistance = 0; ravage(EntityUtils.findBlockPosUnderEntity(object.entityHit)); |