From 21a942793381e80d15924cb5d7fa0d9d0db1829b Mon Sep 17 00:00:00 2001 From: Bob Date: Mon, 24 Jan 2022 23:11:26 +0100 Subject: [PATCH] quackos ammo, siege drill UV --- .../java/com/hbm/extprop/HbmLivingProps.java | 3 ++ .../hbm/handler/BulletConfigSyncingUtil.java | 2 + .../hbm/handler/guncfg/Gun4GaugeFactory.java | 46 ++++++++++++++++++ src/main/java/com/hbm/items/ModItems.java | 3 ++ .../hbm/textures/entity/siege_drill.png | Bin 0 -> 679 bytes .../hbm/textures/items/ammo_4gauge_titan.png | Bin 0 -> 376 bytes 6 files changed, 54 insertions(+) create mode 100644 src/main/resources/assets/hbm/textures/entity/siege_drill.png create mode 100644 src/main/resources/assets/hbm/textures/items/ammo_4gauge_titan.png 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 0000000000000000000000000000000000000000..46eb909a973c83fefe395ae36b131f1aa86e9565 GIT binary patch literal 679 zcmV;Y0$BZtP)VH4FLl&sILR57HV1=s64*jpPLpO-B zLua^tB(@Xc7{fU^8}p<{7&vqHI1a)YID-a=JUYr)Y-mspJii4AvyRMkO`1hKpKje zkzB3yWrc6eyY25vGzRbq02IFH_>Rh$>TpyAIA6OUX1@eV<5alME`04%Ls6gUBfyaz z3ko34kQ9su&SF4_L8%xIwCn=LBjC16_vcQ=?011ofV2YA$OK3$AdO6bv;xvdiU7R< z(H^8X{r}-6ML-OaA;6vWzFv?F0kKGefLpWO#|x4mfP={s;G1P%`{W7Wf}a`_hWT)w zKdLek`+ zDfLJ6SCI*lngH`0CTLy)`~Tke{pdLDbs@(90Kkgkz7jc{zW7+^IQc&-KE8?`yncyc ziDSW(XO6F;*{dLI0C)V^$AC5vhmKs#-UFID!O&>Tjs7D+_JFGz-^_CN zZ3grP)OHJOxA9+!O~wPd5*#7va2JyxppSvEB#fSb5W`|f7=31_ZOwPJcV&UvFt`U8 zW5^go04SzBv_3wJehJ(gvnSv>21M-huQ=W*e8Z~ca#`1N$`yQT-fa&B+XE`&-SSWf zIpo9~h#C(V@!8&Pp?q6h>}inwcX;*IjJq;T{o$<4ssB-pVfQ!+{{yOs=<~9N?6p7fQUNzx*0jCswQ&N*3YNhzu8I+F#EH0}T| z`ORfnQWOQ&TAHSr-Kuxs!+h=cnga6P)Av09m&=9CW-}tj7()q^z}x+M8g|afIVbPE zZnv8r<-M14Zt?!{SsB9ld}g&;0dP1R0O