mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
this fucking sucks
This commit is contained in:
parent
9965ada88f
commit
ae24f4cbef
@ -11,4 +11,8 @@
|
||||
* Catalytic reformers now have a tooltip informing about the need for a catalytic converter
|
||||
* Several guns now have reload animations including most .357 revolvers and Samuel
|
||||
* Updated stealth missile texture
|
||||
* Some of the larger oil machines now render using display lists which should make them somewhat more performant
|
||||
* Some of the larger oil machines now render using display lists which should make them somewhat more performant
|
||||
* Glyphid diggers can no longer yeet multiblocks or blocks with tile entity
|
||||
|
||||
## Fixed
|
||||
* Fixed dupe caused by shift-clicking ashes out of the bricked furnace
|
||||
@ -6,6 +6,15 @@ import java.util.function.Function;
|
||||
import com.hbm.blocks.IBlockMulti;
|
||||
import com.hbm.config.MobConfig;
|
||||
import com.hbm.entity.mob.*;
|
||||
import com.hbm.entity.mob.glyphid.EntityGlyphid;
|
||||
import com.hbm.entity.mob.glyphid.EntityGlyphidBehemoth;
|
||||
import com.hbm.entity.mob.glyphid.EntityGlyphidBlaster;
|
||||
import com.hbm.entity.mob.glyphid.EntityGlyphidBombardier;
|
||||
import com.hbm.entity.mob.glyphid.EntityGlyphidBrawler;
|
||||
import com.hbm.entity.mob.glyphid.EntityGlyphidBrenda;
|
||||
import com.hbm.entity.mob.glyphid.EntityGlyphidDigger;
|
||||
import com.hbm.entity.mob.glyphid.EntityGlyphidNuclear;
|
||||
import com.hbm.entity.mob.glyphid.EntityGlyphidScout;
|
||||
import com.hbm.handler.pollution.PollutionHandler;
|
||||
import com.hbm.handler.pollution.PollutionHandler.PollutionType;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
@ -16,6 +16,15 @@ import com.hbm.entity.missile.EntityMissileTier3.*;
|
||||
import com.hbm.entity.missile.EntityMissileTier4.*;
|
||||
import com.hbm.entity.mob.*;
|
||||
import com.hbm.entity.mob.botprime.*;
|
||||
import com.hbm.entity.mob.glyphid.EntityGlyphid;
|
||||
import com.hbm.entity.mob.glyphid.EntityGlyphidBehemoth;
|
||||
import com.hbm.entity.mob.glyphid.EntityGlyphidBlaster;
|
||||
import com.hbm.entity.mob.glyphid.EntityGlyphidBombardier;
|
||||
import com.hbm.entity.mob.glyphid.EntityGlyphidBrawler;
|
||||
import com.hbm.entity.mob.glyphid.EntityGlyphidBrenda;
|
||||
import com.hbm.entity.mob.glyphid.EntityGlyphidDigger;
|
||||
import com.hbm.entity.mob.glyphid.EntityGlyphidNuclear;
|
||||
import com.hbm.entity.mob.glyphid.EntityGlyphidScout;
|
||||
import com.hbm.entity.mob.siege.*;
|
||||
import com.hbm.entity.particle.*;
|
||||
import com.hbm.entity.projectile.*;
|
||||
|
||||
@ -2,7 +2,7 @@ package com.hbm.entity.effect;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.entity.mob.EntityGlyphid;
|
||||
import com.hbm.entity.mob.glyphid.EntityGlyphid;
|
||||
import com.hbm.extprop.HbmLivingProps;
|
||||
import com.hbm.handler.radiation.ChunkRadiationManager;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
|
||||
@ -1,16 +1,17 @@
|
||||
package com.hbm.entity.logic;
|
||||
|
||||
import com.hbm.config.MobConfig;
|
||||
import com.hbm.entity.mob.EntityGlyphid;
|
||||
import static com.hbm.entity.mob.EntityGlyphid.*;
|
||||
import com.hbm.entity.mob.EntityGlyphidNuclear;
|
||||
import com.hbm.entity.mob.EntityGlyphidScout;
|
||||
import com.hbm.entity.mob.glyphid.EntityGlyphid;
|
||||
import com.hbm.entity.mob.glyphid.EntityGlyphidNuclear;
|
||||
import com.hbm.entity.mob.glyphid.EntityGlyphidScout;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import static com.hbm.entity.mob.glyphid.EntityGlyphid.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class EntityWaypoint extends Entity {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
package com.hbm.entity.mob;
|
||||
package com.hbm.entity.mob.glyphid;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
@ -7,6 +7,7 @@ import java.util.List;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.config.MobConfig;
|
||||
import com.hbm.entity.logic.EntityWaypoint;
|
||||
import com.hbm.entity.mob.EntityParasiteMaggot;
|
||||
import com.hbm.entity.pathfinder.PathFinderUtils;
|
||||
import com.hbm.explosion.vanillant.ExplosionVNT;
|
||||
import com.hbm.explosion.vanillant.standard.*;
|
||||
@ -114,9 +115,17 @@ public class EntityGlyphid extends EntityMob {
|
||||
@Override
|
||||
protected void applyEntityAttributes() {
|
||||
super.applyEntityAttributes();
|
||||
this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(30D);
|
||||
this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1D);
|
||||
this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setBaseValue(5D);
|
||||
this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(GlyphidStats.getStats().getGrunt().health);
|
||||
this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(GlyphidStats.getStats().getGrunt().speed);
|
||||
this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setBaseValue(GlyphidStats.getStats().getGrunt().damage);
|
||||
}
|
||||
|
||||
public int getDivisorPerArmorPoint() {
|
||||
return GlyphidStats.getStats().getGrunt().divisor;
|
||||
}
|
||||
|
||||
public float getDamageThreshold() {
|
||||
return GlyphidStats.getStats().getGrunt().damageThreshold;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -290,43 +299,9 @@ public class EntityGlyphid extends EntityMob {
|
||||
if(source.getEntity() instanceof EntityGlyphid) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!source.isDamageAbsolute() && !source.isUnblockable() && !worldObj.isRemote && !source.isFireDamage() && !source.getDamageType().equals(ModDamageSource.s_cryolator)) {
|
||||
byte armor = this.dataWatcher.getWatchableObjectByte(DW_ARMOR);
|
||||
|
||||
if(armor != 0) { //if at least one bit of armor is present
|
||||
|
||||
if(amount < getDamageThreshold()) return false;
|
||||
|
||||
//chances of armor being broken off
|
||||
if(amount > 1 && isArmorBroken(amount)) {
|
||||
breakOffArmor();
|
||||
amount *= 0.25F;
|
||||
}
|
||||
|
||||
amount -= getDamageThreshold();
|
||||
if(amount < 0) return true;
|
||||
}
|
||||
|
||||
amount = this.calculateDamage(amount);
|
||||
}
|
||||
|
||||
if(source.isFireDamage()) {
|
||||
amount *= 0.7F;
|
||||
} else if(source.getDamageType().equals("player")) {
|
||||
amount *= getScale() < 1.25 ? 1.5 : getScale() < 1.3 ? 0.8 : 0.5;
|
||||
} else if(source == ModDamageSource.acid || source.equals(new DamageSource(ModDamageSource.s_acid))){
|
||||
amount = 0;
|
||||
} else if(source == DamageSource.inWall) {
|
||||
amount *= 15F;
|
||||
}
|
||||
|
||||
if(this.isPotionActive(HbmPotion.phosphorus.getId())){
|
||||
amount *= 1.5F;
|
||||
}
|
||||
|
||||
boolean alive = this.getHealth() > 0;
|
||||
boolean wasAttacked = super.attackEntityFrom(source, amount);
|
||||
boolean wasAttacked = GlyphidStats.getStats().handleAttack(this, source, amount);
|
||||
|
||||
if(alive && this.getHealth() <= 0) {
|
||||
if(doesInfectedSpawnMaggots() && this.dataWatcher.getWatchableObjectByte(DW_SUBTYPE) == TYPE_INFECTED) {
|
||||
@ -348,6 +323,11 @@ public class EntityGlyphid extends EntityMob {
|
||||
|
||||
return wasAttacked;
|
||||
}
|
||||
|
||||
/** Provides a direct entrypoint from outside to access the superclass' implementation because otherwise we end up wwith infinite recursion */
|
||||
public boolean attackSuperclass(DamageSource source, float amount) {
|
||||
return super.attackEntityFrom(source, amount);
|
||||
}
|
||||
|
||||
public boolean doesInfectedSpawnMaggots() {
|
||||
return true;
|
||||
@ -364,7 +344,7 @@ public class EntityGlyphid extends EntityMob {
|
||||
|
||||
for(int i = 0; i < 5; i++) {
|
||||
if((armor & (1 << i)) > 0) {
|
||||
divisor++;
|
||||
divisor += getDivisorPerArmorPoint();
|
||||
}
|
||||
}
|
||||
|
||||
@ -373,10 +353,6 @@ public class EntityGlyphid extends EntityMob {
|
||||
return amount;
|
||||
}
|
||||
|
||||
public float getDamageThreshold() {
|
||||
return 0.5F;
|
||||
}
|
||||
|
||||
public void breakOffArmor() {
|
||||
byte armor = this.dataWatcher.getWatchableObjectByte(DW_ARMOR);
|
||||
List<Integer> indices = Arrays.asList(0, 1, 2, 3, 4);
|
||||
@ -1,4 +1,4 @@
|
||||
package com.hbm.entity.mob;
|
||||
package com.hbm.entity.mob.glyphid;
|
||||
|
||||
import com.hbm.entity.effect.EntityMist;
|
||||
import com.hbm.entity.projectile.EntityChemical;
|
||||
@ -36,10 +36,14 @@ public class EntityGlyphidBehemoth extends EntityGlyphid {
|
||||
@Override
|
||||
protected void applyEntityAttributes() {
|
||||
super.applyEntityAttributes();
|
||||
this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(130D);
|
||||
this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.8D);
|
||||
this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setBaseValue(25D);
|
||||
this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(GlyphidStats.getStats().getBehemoth().health);
|
||||
this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(GlyphidStats.getStats().getBehemoth().speed);
|
||||
this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setBaseValue(GlyphidStats.getStats().getBehemoth().damage);
|
||||
}
|
||||
|
||||
@Override public int getDivisorPerArmorPoint() { return GlyphidStats.getStats().getBehemoth().divisor; }
|
||||
@Override public float getDamageThreshold() { return GlyphidStats.getStats().getBehemoth().damageThreshold; }
|
||||
|
||||
public int timer = 120;
|
||||
int breathTime = 0;
|
||||
|
||||
@ -63,11 +67,6 @@ public class EntityGlyphidBehemoth extends EntityGlyphid {
|
||||
timer = 120;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@Override
|
||||
public boolean attackEntityAsMob(Entity victum) {
|
||||
return super.attackEntityAsMob(victum);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -108,25 +107,4 @@ public class EntityGlyphidBehemoth extends EntityGlyphid {
|
||||
public int swingDuration() {
|
||||
return 100;
|
||||
}
|
||||
@Override
|
||||
public float calculateDamage(float amount) {
|
||||
|
||||
byte armor = this.dataWatcher.getWatchableObjectByte(17);
|
||||
int divisor = 1;
|
||||
|
||||
for(int i = 0; i < 5; i++) {
|
||||
if((armor & (1 << i)) > 0) {
|
||||
divisor += 4;
|
||||
}
|
||||
}
|
||||
|
||||
amount /= divisor;
|
||||
|
||||
return amount;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getDamageThreshold() {
|
||||
return 2.5F;
|
||||
}
|
||||
}
|
||||
@ -1,4 +1,4 @@
|
||||
package com.hbm.entity.mob;
|
||||
package com.hbm.entity.mob.glyphid;
|
||||
|
||||
import com.hbm.main.ResourceManager;
|
||||
|
||||
@ -26,38 +26,19 @@ public class EntityGlyphidBlaster extends EntityGlyphidBombardier {
|
||||
@Override
|
||||
protected void applyEntityAttributes() {
|
||||
super.applyEntityAttributes();
|
||||
this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(50D);
|
||||
this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1D);
|
||||
this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setBaseValue(10D);
|
||||
this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(GlyphidStats.getStats().getBlaster().health);
|
||||
this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(GlyphidStats.getStats().getBlaster().speed);
|
||||
this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setBaseValue(GlyphidStats.getStats().getBlaster().damage);
|
||||
}
|
||||
|
||||
@Override public int getDivisorPerArmorPoint() { return GlyphidStats.getStats().getBlaster().divisor; }
|
||||
@Override public float getDamageThreshold() { return GlyphidStats.getStats().getBlaster().damageThreshold; }
|
||||
|
||||
@Override
|
||||
public boolean isArmorBroken(float amount) {
|
||||
return this.rand.nextInt(100) <= Math.min(Math.pow(amount * 0.25, 2), 100);
|
||||
}
|
||||
|
||||
@Override
|
||||
public float calculateDamage(float amount) {
|
||||
|
||||
byte armor = this.dataWatcher.getWatchableObjectByte(17);
|
||||
int divisor = 1;
|
||||
|
||||
for(int i = 0; i < 5; i++) {
|
||||
if((armor & (1 << i)) > 0) {
|
||||
divisor += 2;
|
||||
}
|
||||
}
|
||||
|
||||
amount /= divisor;
|
||||
|
||||
return amount;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getDamageThreshold() {
|
||||
return 1.0F;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getBombDamage() {
|
||||
return 15F;
|
||||
@ -1,4 +1,4 @@
|
||||
package com.hbm.entity.mob;
|
||||
package com.hbm.entity.mob.glyphid;
|
||||
|
||||
import com.hbm.entity.projectile.EntityAcidBomb;
|
||||
import com.hbm.main.ResourceManager;
|
||||
@ -28,9 +28,14 @@ public class EntityGlyphidBombardier extends EntityGlyphid {
|
||||
@Override
|
||||
protected void applyEntityAttributes() {
|
||||
super.applyEntityAttributes();
|
||||
this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(20D);
|
||||
|
||||
this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(GlyphidStats.getStats().getBombardier().health);
|
||||
this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(GlyphidStats.getStats().getBombardier().speed);
|
||||
this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setBaseValue(GlyphidStats.getStats().getBombardier().damage);
|
||||
}
|
||||
|
||||
@Override public int getDivisorPerArmorPoint() { return GlyphidStats.getStats().getBombardier().divisor; }
|
||||
@Override public float getDamageThreshold() { return GlyphidStats.getStats().getBombardier().damageThreshold; }
|
||||
|
||||
@Override
|
||||
public void onUpdate() {
|
||||
super.onUpdate();
|
||||
@ -1,4 +1,4 @@
|
||||
package com.hbm.entity.mob;
|
||||
package com.hbm.entity.mob.glyphid;
|
||||
|
||||
import com.hbm.main.ResourceManager;
|
||||
|
||||
@ -26,35 +26,16 @@ public class EntityGlyphidBrawler extends EntityGlyphid {
|
||||
@Override
|
||||
protected void applyEntityAttributes() {
|
||||
super.applyEntityAttributes();
|
||||
this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(50D);
|
||||
this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1D);
|
||||
this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setBaseValue(10D);
|
||||
this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(GlyphidStats.getStats().getBrawler().health);
|
||||
this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(GlyphidStats.getStats().getBrawler().speed);
|
||||
this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setBaseValue(GlyphidStats.getStats().getBrawler().damage);
|
||||
}
|
||||
|
||||
@Override public int getDivisorPerArmorPoint() { return GlyphidStats.getStats().getBrawler().divisor; }
|
||||
@Override public float getDamageThreshold() { return GlyphidStats.getStats().getBrawler().damageThreshold; }
|
||||
|
||||
@Override
|
||||
public boolean isArmorBroken(float amount) {
|
||||
return this.rand.nextInt(100) <= Math.min(Math.pow(amount * 0.25, 2), 100);
|
||||
}
|
||||
|
||||
@Override
|
||||
public float calculateDamage(float amount) {
|
||||
|
||||
byte armor = this.dataWatcher.getWatchableObjectByte(17);
|
||||
float divisor = 1;
|
||||
|
||||
for(int i = 0; i < 5; i++) {
|
||||
if((armor & (1 << i)) > 0) {
|
||||
divisor += 3;
|
||||
}
|
||||
}
|
||||
|
||||
amount /= divisor;
|
||||
|
||||
return amount;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getDamageThreshold() {
|
||||
return 1.0F;
|
||||
}
|
||||
}
|
||||
@ -1,4 +1,4 @@
|
||||
package com.hbm.entity.mob;
|
||||
package com.hbm.entity.mob.glyphid;
|
||||
|
||||
import com.hbm.entity.effect.EntityMist;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
@ -32,39 +32,20 @@ public class EntityGlyphidBrenda extends EntityGlyphid {
|
||||
@Override
|
||||
protected void applyEntityAttributes() {
|
||||
super.applyEntityAttributes();
|
||||
this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(250D);
|
||||
this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1.2D);
|
||||
this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setBaseValue(50D);
|
||||
this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(GlyphidStats.getStats().getBrenda().health);
|
||||
this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(GlyphidStats.getStats().getBrenda().speed);
|
||||
this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setBaseValue(GlyphidStats.getStats().getBrenda().damage);
|
||||
}
|
||||
|
||||
@Override public int getDivisorPerArmorPoint() { return GlyphidStats.getStats().getBrenda().divisor; }
|
||||
@Override public float getDamageThreshold() { return GlyphidStats.getStats().getBrenda().damageThreshold; }
|
||||
|
||||
@Override
|
||||
public boolean isArmorBroken(float amount) {
|
||||
// amount < 5 ? 5 : amount < 10 ? 3 : 2;
|
||||
return this.rand.nextInt(100) <= Math.min(Math.pow(amount * 0.12, 2), 100);
|
||||
}
|
||||
|
||||
@Override
|
||||
public float calculateDamage(float amount) {
|
||||
|
||||
byte armor = this.dataWatcher.getWatchableObjectByte(17);
|
||||
int divisor = 1;
|
||||
|
||||
for(int i = 0; i < 5; i++) {
|
||||
if((armor & (1 << i)) > 0) {
|
||||
divisor += 5;
|
||||
}
|
||||
}
|
||||
|
||||
amount /= divisor;
|
||||
|
||||
return amount;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getDamageThreshold() {
|
||||
return 10F;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDeath(DamageSource source) {
|
||||
super.onDeath(source);
|
||||
@ -1,5 +1,6 @@
|
||||
package com.hbm.entity.mob;
|
||||
package com.hbm.entity.mob.glyphid;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.entity.projectile.EntityRubble;
|
||||
import com.hbm.lib.Library;
|
||||
@ -38,17 +39,21 @@ public class EntityGlyphidDigger extends EntityGlyphid {
|
||||
@Override
|
||||
protected void applyEntityAttributes() {
|
||||
super.applyEntityAttributes();
|
||||
this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(50D);
|
||||
this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1D);
|
||||
this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setBaseValue(5D);
|
||||
this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(GlyphidStats.getStats().getDigger().health);
|
||||
this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(GlyphidStats.getStats().getDigger().speed);
|
||||
this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setBaseValue(GlyphidStats.getStats().getDigger().damage);
|
||||
}
|
||||
|
||||
@Override public int getDivisorPerArmorPoint() { return GlyphidStats.getStats().getDigger().divisor; }
|
||||
@Override public float getDamageThreshold() { return GlyphidStats.getStats().getDigger().damageThreshold; }
|
||||
|
||||
public int timer = 0;
|
||||
|
||||
@Override
|
||||
public void onUpdate(){
|
||||
super.onUpdate();
|
||||
Entity e = this.getEntityToAttack();
|
||||
if (e != null) {
|
||||
if (e != null && this.isEntityAlive()) {
|
||||
|
||||
this.lastX = e.posX;
|
||||
this.lastY = e.posY;
|
||||
@ -60,9 +65,8 @@ public class EntityGlyphidDigger extends EntityGlyphid {
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Mainly composed of crusty old power fist code, with some touch ups
|
||||
**/
|
||||
|
||||
/** Mainly composed of crusty old power fist code, with some touch ups **/
|
||||
public void groundSlam(){
|
||||
if (!worldObj.isRemote && entityToAttack instanceof EntityLivingBase && this.getDistanceToEntity(entityToAttack) < 30) {
|
||||
Entity e = this.getEntityToAttack();
|
||||
@ -128,7 +132,7 @@ public class EntityGlyphidDigger extends EntityGlyphid {
|
||||
Block b = worldObj.getBlock(x1, y1, z1);
|
||||
float k = b.getExplosionResistance(this, worldObj, x1, y1, z1, posX, posY, posZ);
|
||||
|
||||
if (k < ModBlocks.concrete.getExplosionResistance(this) && b.isNormalCube()) {
|
||||
if (k < ModBlocks.concrete.getExplosionResistance(this) && b.isNormalCube() && !(b instanceof BlockDummyable) && worldObj.getTileEntity(x1, y1, z1) == null) {
|
||||
|
||||
EntityRubble rubble = new EntityRubble(worldObj);
|
||||
rubble.posX = x1 + 0.5F;
|
||||
@ -1,7 +1,8 @@
|
||||
package com.hbm.entity.mob;
|
||||
package com.hbm.entity.mob.glyphid;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.entity.logic.EntityWaypoint;
|
||||
import com.hbm.entity.mob.EntityParasiteMaggot;
|
||||
import com.hbm.explosion.vanillant.ExplosionVNT;
|
||||
import com.hbm.explosion.vanillant.standard.BlockAllocatorStandard;
|
||||
import com.hbm.explosion.vanillant.standard.BlockMutatorDebris;
|
||||
@ -45,6 +46,17 @@ public class EntityGlyphidNuclear extends EntityGlyphid {
|
||||
return 2D;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void applyEntityAttributes() {
|
||||
super.applyEntityAttributes();
|
||||
this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(GlyphidStats.getStats().getNuclear().health);
|
||||
this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(GlyphidStats.getStats().getNuclear().speed);
|
||||
this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setBaseValue(GlyphidStats.getStats().getNuclear().damage);
|
||||
}
|
||||
|
||||
@Override public int getDivisorPerArmorPoint() { return GlyphidStats.getStats().getNuclear().divisor; }
|
||||
@Override public float getDamageThreshold() { return GlyphidStats.getStats().getNuclear().damageThreshold; }
|
||||
|
||||
@Override
|
||||
public void onUpdate() {
|
||||
super.onUpdate();
|
||||
@ -86,42 +98,11 @@ public class EntityGlyphidNuclear extends EntityGlyphid {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void applyEntityAttributes() {
|
||||
super.applyEntityAttributes();
|
||||
this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(100D);
|
||||
this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.8D);
|
||||
this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setBaseValue(50D);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isArmorBroken(float amount) {
|
||||
return this.rand.nextInt(100) <= Math.min(Math.pow(amount * 0.12, 2), 100);
|
||||
}
|
||||
|
||||
@Override
|
||||
public float calculateDamage(float amount) {
|
||||
|
||||
byte armor = this.dataWatcher.getWatchableObjectByte(17);
|
||||
int divisor = 1;
|
||||
|
||||
for(int i = 0; i < 5; i++) {
|
||||
if((armor & (1 << i)) > 0) {
|
||||
divisor += 5;
|
||||
}
|
||||
}
|
||||
|
||||
amount /= divisor;
|
||||
|
||||
return amount;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getDamageThreshold() {
|
||||
return 10F;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean doesInfectedSpawnMaggots() {
|
||||
return false;
|
||||
@ -1,4 +1,4 @@
|
||||
package com.hbm.entity.mob;
|
||||
package com.hbm.entity.mob.glyphid;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.config.MobConfig;
|
||||
@ -54,19 +54,22 @@ public class EntityGlyphidScout extends EntityGlyphid {
|
||||
return 0.75D;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void applyEntityAttributes() {
|
||||
super.applyEntityAttributes();
|
||||
this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(GlyphidStats.getStats().getScout().health);
|
||||
this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(GlyphidStats.getStats().getScout().speed);
|
||||
this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setBaseValue(GlyphidStats.getStats().getScout().damage);
|
||||
}
|
||||
|
||||
@Override public int getDivisorPerArmorPoint() { return GlyphidStats.getStats().getScout().divisor; }
|
||||
@Override public float getDamageThreshold() { return GlyphidStats.getStats().getScout().damageThreshold; }
|
||||
|
||||
@Override
|
||||
public boolean isArmorBroken(float amount) {
|
||||
return this.rand.nextInt(100) <= Math.min(Math.pow(amount, 2), 100);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void applyEntityAttributes() {
|
||||
super.applyEntityAttributes();
|
||||
this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(20D);
|
||||
this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1.5D);
|
||||
this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setBaseValue(2D);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdate() {
|
||||
super.onUpdate();
|
||||
129
src/main/java/com/hbm/entity/mob/glyphid/GlyphidStats.java
Normal file
129
src/main/java/com/hbm/entity/mob/glyphid/GlyphidStats.java
Normal file
@ -0,0 +1,129 @@
|
||||
package com.hbm.entity.mob.glyphid;
|
||||
|
||||
import com.hbm.lib.ModDamageSource;
|
||||
import com.hbm.potion.HbmPotion;
|
||||
|
||||
import net.minecraft.util.DamageSource;
|
||||
|
||||
public abstract class GlyphidStats {
|
||||
|
||||
public static GlyphidStats GLYPHID_STATS_70K = new GlyphidStats70K();
|
||||
public static GlyphidStats GLYPHID_STATS_NT = new GlyphidStatsNT();
|
||||
|
||||
public static GlyphidStats getStats() {
|
||||
return GLYPHID_STATS_70K;
|
||||
}
|
||||
|
||||
protected StatBundle statsGrunt;
|
||||
protected StatBundle statsBombardier;
|
||||
protected StatBundle statsBrawler;
|
||||
protected StatBundle statsDigger;
|
||||
protected StatBundle statsBlaster;
|
||||
protected StatBundle statsBehemoth;
|
||||
protected StatBundle statsBrenda;
|
||||
protected StatBundle statsNuclear;
|
||||
protected StatBundle statsScout;
|
||||
|
||||
public static class StatBundle {
|
||||
public final double health;
|
||||
public final double speed;
|
||||
public final double damage;
|
||||
public final int divisor;
|
||||
public final float damageThreshold;
|
||||
|
||||
public StatBundle(double health, double speed, double damage, int divisor, float damageThreshold) {
|
||||
this.health = health;
|
||||
this.speed = speed;
|
||||
this.damage = damage;
|
||||
this.divisor = divisor;
|
||||
this.damageThreshold = damageThreshold;
|
||||
}
|
||||
}
|
||||
|
||||
public abstract boolean handleAttack(EntityGlyphid glyphid, DamageSource source, float amount);
|
||||
|
||||
/** Tier 1 */ public StatBundle getGrunt() { return statsGrunt; }
|
||||
/** Tier 1 Ranged */ public StatBundle getBombardier() { return statsBombardier; }
|
||||
/** Tier 2 */ public StatBundle getBrawler() { return statsBrawler; }
|
||||
/** Tier 2 Specialist */ public StatBundle getDigger() { return statsDigger; }
|
||||
/** Tier 2 Ranged */ public StatBundle getBlaster() { return statsBlaster; }
|
||||
/** Tier 3 */ public StatBundle getBehemoth() { return statsBehemoth; }
|
||||
/** Tier 4 */ public StatBundle getBrenda() { return statsBrenda; }
|
||||
/** Tier 4 Specialist */ public StatBundle getNuclear() { return statsNuclear; }
|
||||
/** Tier 0 */ public StatBundle getScout() { return statsScout; }
|
||||
|
||||
public static class GlyphidStats70K extends GlyphidStats {
|
||||
|
||||
public GlyphidStats70K() {
|
||||
this.statsGrunt = new StatBundle(30D, 1D, 5D, 1, 0.5F);
|
||||
this.statsBombardier = new StatBundle(20D, 1D, 5D, 1, 0.5F);
|
||||
this.statsBrawler = new StatBundle(50D, 1D, 10D, 3, 1F);
|
||||
this.statsDigger = new StatBundle(50D, 1D, 5D, 1, 0.5F);
|
||||
this.statsBlaster = new StatBundle(50D, 1D, 10D, 2, 1F);
|
||||
this.statsBehemoth = new StatBundle(130D, 0.8D, 25D, 4, 2.5F);
|
||||
this.statsBrenda = new StatBundle(250D, 1.2D, 50D, 5, 10F);
|
||||
this.statsNuclear = new StatBundle(100D, 0.8D, 50D, 5, 10F);
|
||||
this.statsScout = new StatBundle(20D, 1.5D, 2D, 1, 0.5F);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handleAttack(EntityGlyphid glyphid, DamageSource source, float amount) {
|
||||
|
||||
if(!source.isDamageAbsolute() && !source.isUnblockable() && !glyphid.worldObj.isRemote && !source.isFireDamage() && !source.getDamageType().equals(ModDamageSource.s_cryolator)) {
|
||||
byte armor = glyphid.getDataWatcher().getWatchableObjectByte(glyphid.DW_ARMOR);
|
||||
|
||||
if(armor != 0) { //if at least one bit of armor is present
|
||||
|
||||
if(amount < glyphid.getDamageThreshold()) return false;
|
||||
|
||||
//chances of armor being broken off
|
||||
if(amount > 1 && glyphid.isArmorBroken(amount)) {
|
||||
glyphid.breakOffArmor();
|
||||
amount *= 0.25F;
|
||||
}
|
||||
|
||||
amount -= glyphid.getDamageThreshold();
|
||||
if(amount < 0) return true;
|
||||
}
|
||||
|
||||
amount = glyphid.calculateDamage(amount);
|
||||
}
|
||||
|
||||
if(source.isFireDamage()) {
|
||||
amount *= 0.7F;
|
||||
} else if(source.getDamageType().equals("player")) {
|
||||
amount *= glyphid.getScale() < 1.25 ? 1.5 : glyphid.getScale() < 1.3 ? 0.8 : 0.5;
|
||||
} else if(source == ModDamageSource.acid || ModDamageSource.s_acid.equals(source.getDamageType())){
|
||||
amount = 0;
|
||||
} else if(source == DamageSource.inWall) {
|
||||
amount *= 15F;
|
||||
}
|
||||
|
||||
if(glyphid.isPotionActive(HbmPotion.phosphorus.getId())){
|
||||
amount *= 1.5F;
|
||||
}
|
||||
|
||||
return glyphid.attackSuperclass(source, amount);
|
||||
}
|
||||
}
|
||||
|
||||
public static class GlyphidStatsNT extends GlyphidStats {
|
||||
|
||||
public GlyphidStatsNT() {
|
||||
this.statsGrunt = new StatBundle(30D, 1D, 5D, 1, 0.5F);
|
||||
this.statsBombardier = new StatBundle(20D, 1D, 5D, 1, 0.5F);
|
||||
this.statsBrawler = new StatBundle(50D, 1D, 10D, 3, 1F);
|
||||
this.statsDigger = new StatBundle(50D, 1D, 5D, 1, 0.5F);
|
||||
this.statsBlaster = new StatBundle(50D, 1D, 10D, 2, 1F);
|
||||
this.statsBehemoth = new StatBundle(130D, 0.8D, 25D, 4, 2.5F);
|
||||
this.statsBrenda = new StatBundle(250D, 1.2D, 50D, 5, 10F);
|
||||
this.statsNuclear = new StatBundle(100D, 0.8D, 50D, 5, 10F);
|
||||
this.statsScout = new StatBundle(20D, 1.5D, 2D, 1, 0.5F);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handleAttack(EntityGlyphid glyphid, DamageSource source, float amount) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,6 +1,6 @@
|
||||
package com.hbm.entity.projectile;
|
||||
|
||||
import com.hbm.entity.mob.EntityGlyphid;
|
||||
import com.hbm.entity.mob.glyphid.EntityGlyphid;
|
||||
import com.hbm.lib.ModDamageSource;
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
@ -4,7 +4,7 @@ import java.awt.Color;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.entity.mob.EntityGlyphid;
|
||||
import com.hbm.entity.mob.glyphid.EntityGlyphid;
|
||||
import com.hbm.extprop.HbmLivingProps;
|
||||
import com.hbm.handler.radiation.ChunkRadiationManager;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
|
||||
@ -10,9 +10,10 @@ import java.util.UUID;
|
||||
|
||||
import com.hbm.config.MobConfig;
|
||||
import com.hbm.config.RadiationConfig;
|
||||
import com.hbm.entity.mob.glyphid.EntityGlyphid;
|
||||
import com.hbm.entity.mob.glyphid.EntityGlyphidDigger;
|
||||
import com.hbm.entity.mob.glyphid.EntityGlyphidScout;
|
||||
|
||||
import com.hbm.entity.mob.EntityGlyphidDigger;
|
||||
import com.hbm.entity.mob.EntityGlyphidScout;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.common.gameevent.TickEvent;
|
||||
import cpw.mods.fml.common.gameevent.TickEvent.Phase;
|
||||
@ -332,7 +333,7 @@ public class PollutionHandler {
|
||||
PollutionData data = getPollutionData(world, (int) Math.floor(event.x), (int) Math.floor(event.y), (int) Math.floor(event.z));
|
||||
if(data == null) return;
|
||||
|
||||
if(living instanceof IMob) {
|
||||
if(living instanceof IMob && !(living instanceof EntityGlyphid)) {
|
||||
|
||||
if(data.pollution[PollutionType.SOOT.ordinal()] > RadiationConfig.buffMobThreshold) {
|
||||
if(living.getEntityAttribute(SharedMonsterAttributes.maxHealth) != null && living.getEntityAttribute(SharedMonsterAttributes.maxHealth).getModifier(maxHealth) == null) living.getEntityAttribute(SharedMonsterAttributes.maxHealth).applyModifier(new AttributeModifier(maxHealth, "Soot Anger Health Increase", 1D, 1));
|
||||
|
||||
@ -49,7 +49,7 @@ public class ContainerFurnaceBrick extends Container {
|
||||
var3 = var5.copy();
|
||||
|
||||
if(par2 <= 3) {
|
||||
if(!this.mergeItemStack(var5, 3, this.inventorySlots.size(), true)) {
|
||||
if(!this.mergeItemStack(var5, 4, this.inventorySlots.size(), true)) {
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
|
||||
@ -66,6 +66,14 @@ import com.hbm.entity.missile.EntityMissileTier3.*;
|
||||
import com.hbm.entity.missile.EntityMissileTier4.*;
|
||||
import com.hbm.entity.mob.*;
|
||||
import com.hbm.entity.mob.botprime.*;
|
||||
import com.hbm.entity.mob.glyphid.EntityGlyphid;
|
||||
import com.hbm.entity.mob.glyphid.EntityGlyphidBehemoth;
|
||||
import com.hbm.entity.mob.glyphid.EntityGlyphidBlaster;
|
||||
import com.hbm.entity.mob.glyphid.EntityGlyphidBombardier;
|
||||
import com.hbm.entity.mob.glyphid.EntityGlyphidBrawler;
|
||||
import com.hbm.entity.mob.glyphid.EntityGlyphidBrenda;
|
||||
import com.hbm.entity.mob.glyphid.EntityGlyphidNuclear;
|
||||
import com.hbm.entity.mob.glyphid.EntityGlyphidScout;
|
||||
import com.hbm.entity.mob.siege.*;
|
||||
import com.hbm.entity.particle.*;
|
||||
import com.hbm.entity.projectile.*;
|
||||
|
||||
@ -2,7 +2,7 @@ package com.hbm.render.entity.mob;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.entity.mob.EntityGlyphid;
|
||||
import com.hbm.entity.mob.glyphid.EntityGlyphid;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.main.ResourceManager;
|
||||
|
||||
|
||||
@ -2,8 +2,8 @@ package com.hbm.render.entity.mob;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.entity.mob.EntityGlyphid;
|
||||
import com.hbm.entity.mob.EntityGlyphidNuclear;
|
||||
import com.hbm.entity.mob.glyphid.EntityGlyphid;
|
||||
import com.hbm.entity.mob.glyphid.EntityGlyphidNuclear;
|
||||
import com.hbm.main.ResourceManager;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
|
||||
@ -2,7 +2,7 @@ package com.hbm.tileentity.deco;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.entity.mob.EntityGlyphid;
|
||||
import com.hbm.entity.mob.glyphid.EntityGlyphid;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user