diff --git a/src/main/java/com/hbm/extprop/HbmLivingProps.java b/src/main/java/com/hbm/extprop/HbmLivingProps.java index 419f0f2e4..99add36c4 100644 --- a/src/main/java/com/hbm/extprop/HbmLivingProps.java +++ b/src/main/java/com/hbm/extprop/HbmLivingProps.java @@ -116,6 +116,9 @@ public class HbmLivingProps implements IExtendedEntityProperties { public static void setDigamma(EntityLivingBase entity, float digamma) { + if(entity.worldObj.isRemote) + return; + if(entity instanceof EntityDuck) digamma = 0.0F; diff --git a/src/main/java/com/hbm/handler/BulletConfigSyncingUtil.java b/src/main/java/com/hbm/handler/BulletConfigSyncingUtil.java index e139cffae..4eeb754f5 100644 --- a/src/main/java/com/hbm/handler/BulletConfigSyncingUtil.java +++ b/src/main/java/com/hbm/handler/BulletConfigSyncingUtil.java @@ -127,6 +127,7 @@ public class BulletConfigSyncingUtil { public static int G4_CLAW = i++; public static int G4_VAMPIRE = i++; public static int G4_VOID = i++; + public static int G4_TITAN = i++; public static int G4_SLEEK = i++; public static int SPECIAL_OSIPR = i++; @@ -361,6 +362,7 @@ public class BulletConfigSyncingUtil { configSet.put(G4_CLAW, Gun4GaugeFactory.get4GaugeClawConfig()); configSet.put(G4_VAMPIRE, Gun4GaugeFactory.get4GaugeVampireConfig()); configSet.put(G4_VOID, Gun4GaugeFactory.get4GaugeVoidConfig()); + configSet.put(G4_TITAN, Gun4GaugeFactory.get4GaugeQuackConfig()); configSet.put(G4_SLEEK, Gun4GaugeFactory.get4GaugeSleekConfig()); configSet.put(SPECIAL_OSIPR, GunOSIPRFactory.getPulseConfig()); diff --git a/src/main/java/com/hbm/handler/guncfg/Gun4GaugeFactory.java b/src/main/java/com/hbm/handler/guncfg/Gun4GaugeFactory.java index 687580995..c4a3d486c 100644 --- a/src/main/java/com/hbm/handler/guncfg/Gun4GaugeFactory.java +++ b/src/main/java/com/hbm/handler/guncfg/Gun4GaugeFactory.java @@ -1,11 +1,13 @@ package com.hbm.handler.guncfg; import java.util.ArrayList; +import java.util.List; import com.hbm.entity.projectile.EntityBulletBase; import com.hbm.explosion.ExplosionLarge; import com.hbm.explosion.ExplosionNT; import com.hbm.explosion.ExplosionNT.ExAttrib; +import com.hbm.explosion.ExplosionNukeSmall; import com.hbm.handler.BulletConfigSyncingUtil; import com.hbm.handler.BulletConfiguration; import com.hbm.handler.GunConfiguration; @@ -25,6 +27,7 @@ import com.hbm.render.util.RenderScreenOverlay.Crosshair; import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint; import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityCreature; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.nbt.NBTTagCompound; @@ -78,6 +81,7 @@ public class Gun4GaugeFactory { config.config.add(BulletConfigSyncingUtil.G4_CLAW); config.config.add(BulletConfigSyncingUtil.G4_VAMPIRE); config.config.add(BulletConfigSyncingUtil.G4_VOID); + config.config.add(BulletConfigSyncingUtil.G4_TITAN); config.config.add(BulletConfigSyncingUtil.G4_SLEEK); return config; @@ -136,6 +140,7 @@ public class Gun4GaugeFactory { config.config.add(BulletConfigSyncingUtil.G4_CLAW); config.config.add(BulletConfigSyncingUtil.G4_VAMPIRE); config.config.add(BulletConfigSyncingUtil.G4_VOID); + config.config.add(BulletConfigSyncingUtil.G4_TITAN); config.config.add(BulletConfigSyncingUtil.G4_SLEEK); return config; @@ -474,4 +479,45 @@ public class Gun4GaugeFactory { return bullet; } + + public static BulletConfiguration get4GaugeQuackConfig() { + + BulletConfiguration bullet = BulletConfigFactory.standardRocketConfig(); + + bullet.ammo = ModItems.ammo_4gauge_titan; + bullet.velocity *= 2D; + bullet.spread = 0.0F; + bullet.gravity = 0.0D; + bullet.wear = 10; + bullet.explosive = 1F; + bullet.style = BulletConfiguration.STYLE_BOLT; + bullet.trail = 4; + bullet.vPFX = "explode"; + + bullet.bUpdate = new IBulletUpdateBehavior() { + + @Override + public void behaveUpdate(EntityBulletBase bullet) { + + if(!bullet.worldObj.isRemote) { + + if(bullet.ticksExisted % 2 == 0) { + + List creatures = bullet.worldObj.getEntitiesWithinAABB(EntityCreature.class, bullet.boundingBox.expand(10, 10, 10)); + + for(EntityCreature creature : creatures) { + + if(creature.getClass().getCanonicalName().startsWith("net.minecraft.entity.titan")) { + ExplosionNukeSmall.explode(bullet.worldObj, creature.posX, creature.posY, creature.posZ, ExplosionNukeSmall.medium); + creature.isDead = true; + } + } + + } + } + } + }; + + return bullet; + } } diff --git a/src/main/java/com/hbm/items/ModItems.java b/src/main/java/com/hbm/items/ModItems.java index 1fdaa8686..e3ae3ec70 100644 --- a/src/main/java/com/hbm/items/ModItems.java +++ b/src/main/java/com/hbm/items/ModItems.java @@ -1423,6 +1423,7 @@ public class ModItems { public static Item ammo_4gauge_claw; public static Item ammo_4gauge_vampire; public static Item ammo_4gauge_void; + public static Item ammo_4gauge_titan; public static Item ammo_4gauge_sleek; public static Item ammo_357_desh; public static Item ammo_44; @@ -4031,6 +4032,7 @@ public class ModItems { ammo_4gauge_claw = new ItemAmmo().setUnlocalizedName("ammo_4gauge_claw"); ammo_4gauge_vampire = new ItemAmmo().setUnlocalizedName("ammo_4gauge_vampire"); ammo_4gauge_void = new ItemAmmo().setUnlocalizedName("ammo_4gauge_void"); + ammo_4gauge_titan = new ItemAmmo().setUnlocalizedName("ammo_4gauge_titan"); ammo_4gauge_sleek = new ItemAmmo().setUnlocalizedName("ammo_4gauge_sleek"); ammo_5mm = new ItemAmmo().setUnlocalizedName("ammo_5mm"); ammo_5mm_explosive = new ItemAmmo().setUnlocalizedName("ammo_5mm_explosive"); @@ -6987,6 +6989,7 @@ public class ModItems { GameRegistry.registerItem(ammo_4gauge_claw, ammo_4gauge_claw.getUnlocalizedName()); GameRegistry.registerItem(ammo_4gauge_vampire, ammo_4gauge_vampire.getUnlocalizedName()); GameRegistry.registerItem(ammo_4gauge_void, ammo_4gauge_void.getUnlocalizedName()); + GameRegistry.registerItem(ammo_4gauge_titan, ammo_4gauge_titan.getUnlocalizedName()); GameRegistry.registerItem(ammo_4gauge_sleek, ammo_4gauge_sleek.getUnlocalizedName()); GameRegistry.registerItem(ammo_44, ammo_44.getUnlocalizedName()); GameRegistry.registerItem(ammo_44_ap, ammo_44_ap.getUnlocalizedName()); diff --git a/src/main/resources/assets/hbm/textures/entity/siege_drill.png b/src/main/resources/assets/hbm/textures/entity/siege_drill.png new file mode 100644 index 000000000..46eb909a9 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/entity/siege_drill.png differ diff --git a/src/main/resources/assets/hbm/textures/items/ammo_4gauge_titan.png b/src/main/resources/assets/hbm/textures/items/ammo_4gauge_titan.png new file mode 100644 index 000000000..5547e1939 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/items/ammo_4gauge_titan.png differ