diff --git a/src/main/java/com/hbm/handler/BulletConfigSyncingUtil.java b/src/main/java/com/hbm/handler/BulletConfigSyncingUtil.java index a4e6294a1..64d4a98eb 100644 --- a/src/main/java/com/hbm/handler/BulletConfigSyncingUtil.java +++ b/src/main/java/com/hbm/handler/BulletConfigSyncingUtil.java @@ -210,6 +210,7 @@ public class BulletConfigSyncingUtil { public static int NUKE_TOTS = i++; public static int NUKE_SAFE = i++; public static int NUKE_PUMPKIN = i++; + public static int NUKE_BARREL = i++; public static int NUKE_PROTO_NORMAL = i++; public static int NUKE_PROTO_LOW = i++; public static int NUKE_PROTO_HIGH = i++; @@ -451,6 +452,7 @@ public class BulletConfigSyncingUtil { configSet.put(NUKE_TOTS, GunFatmanFactory.getNukeTotsConfig()); configSet.put(NUKE_SAFE, GunFatmanFactory.getNukeSafeConfig()); configSet.put(NUKE_PUMPKIN, GunFatmanFactory.getNukePumpkinConfig()); + configSet.put(NUKE_BARREL, GunFatmanFactory.getNukeBarrelConfig()); configSet.put(NUKE_PROTO_NORMAL, GunFatmanFactory.getNukeConfig().accuracyMod(20F)); configSet.put(NUKE_PROTO_LOW, GunFatmanFactory.getNukeLowConfig().accuracyMod(20F)); configSet.put(NUKE_PROTO_HIGH, GunFatmanFactory.getNukeHighConfig().accuracyMod(20F)); diff --git a/src/main/java/com/hbm/handler/BulletConfiguration.java b/src/main/java/com/hbm/handler/BulletConfiguration.java index 656119fa4..4aa8c75ee 100644 --- a/src/main/java/com/hbm/handler/BulletConfiguration.java +++ b/src/main/java/com/hbm/handler/BulletConfiguration.java @@ -120,6 +120,7 @@ public class BulletConfiguration { public static final int STYLE_METEOR = 13; public static final int STYLE_APDS = 14; public static final int STYLE_BLADE = 15; + public static final int STYLE_BARREL = 16; public static final int PLINK_NONE = 0; public static final int PLINK_BULLET = 1; diff --git a/src/main/java/com/hbm/handler/guncfg/GunFatmanFactory.java b/src/main/java/com/hbm/handler/guncfg/GunFatmanFactory.java index 8348012fc..3b69fecce 100644 --- a/src/main/java/com/hbm/handler/guncfg/GunFatmanFactory.java +++ b/src/main/java/com/hbm/handler/guncfg/GunFatmanFactory.java @@ -213,7 +213,39 @@ public class GunFatmanFactory { @Override public void behaveBlockHit(EntityBulletBase bullet, int x, int y, int z) { - if(bullet.worldObj.isRemote) { + if(!bullet.worldObj.isRemote) { + + double posX = bullet.posX; + double posY = bullet.posY + 0.5; + double posZ = bullet.posZ; + + if(y >= 0) { + posX = x + 0.5; + posY = y + 1.5; + posZ = z + 0.5; + } + + ExplosionLarge.spawnParticles(bullet.worldObj, posX, posY, posZ, 45); + } + } + }; + + return bullet; + } + + public static BulletConfiguration getNukeBarrelConfig() { + + BulletConfiguration bullet = BulletConfigFactory.standardNukeConfig(); + bullet.ammo = ModItems.ammo_nuke_pumpkin; + bullet.explosive = 3F; + bullet.style = bullet.STYLE_BARREL; + + bullet.bImpact = new IBulletImpactBehavior() { + + @Override + public void behaveBlockHit(EntityBulletBase bullet, int x, int y, int z) { + + if(!bullet.worldObj.isRemote) { double posX = bullet.posX; double posY = bullet.posY + 0.5; diff --git a/src/main/java/com/hbm/items/ModItems.java b/src/main/java/com/hbm/items/ModItems.java index 4e7fe4e28..1ebf0c8ff 100644 --- a/src/main/java/com/hbm/items/ModItems.java +++ b/src/main/java/com/hbm/items/ModItems.java @@ -1551,6 +1551,7 @@ public class ModItems { public static Item ammo_nuke_tots; public static Item ammo_nuke_safe; public static Item ammo_nuke_pumpkin; + public static Item ammo_nuke_barrel; public static Item ammo_mirv; public static Item ammo_mirv_low; public static Item ammo_mirv_high; @@ -4216,6 +4217,7 @@ public class ModItems { ammo_nuke_tots = new ItemAmmo().setUnlocalizedName("ammo_nuke_tots"); ammo_nuke_safe = new ItemAmmo().setUnlocalizedName("ammo_nuke_safe"); ammo_nuke_pumpkin = new ItemAmmo().setUnlocalizedName("ammo_nuke_pumpkin"); + ammo_nuke_barrel = new ItemAmmo().setUnlocalizedName("ammo_nuke_barrel"); ammo_mirv = new ItemAmmo().setUnlocalizedName("ammo_mirv"); ammo_mirv_low = new ItemAmmo().setUnlocalizedName("ammo_mirv_low"); ammo_mirv_high = new ItemAmmo().setUnlocalizedName("ammo_mirv_high"); @@ -7251,6 +7253,7 @@ public class ModItems { GameRegistry.registerItem(ammo_nuke_tots, ammo_nuke_tots.getUnlocalizedName()); GameRegistry.registerItem(ammo_nuke_safe, ammo_nuke_safe.getUnlocalizedName()); GameRegistry.registerItem(ammo_nuke_pumpkin, ammo_nuke_pumpkin.getUnlocalizedName()); + GameRegistry.registerItem(ammo_nuke_barrel, ammo_nuke_barrel.getUnlocalizedName()); GameRegistry.registerItem(ammo_mirv, ammo_mirv.getUnlocalizedName()); GameRegistry.registerItem(ammo_mirv_low, ammo_mirv_low.getUnlocalizedName()); GameRegistry.registerItem(ammo_mirv_high, ammo_mirv_high.getUnlocalizedName()); diff --git a/src/main/java/com/hbm/render/entity/projectile/RenderBullet.java b/src/main/java/com/hbm/render/entity/projectile/RenderBullet.java index b19c898bb..deffd0ab3 100644 --- a/src/main/java/com/hbm/render/entity/projectile/RenderBullet.java +++ b/src/main/java/com/hbm/render/entity/projectile/RenderBullet.java @@ -68,6 +68,7 @@ public class RenderBullet extends Render { case BulletConfiguration.STYLE_METEOR: renderMeteor(trail); break; case BulletConfiguration.STYLE_APDS: renderAPDS(); break; case BulletConfiguration.STYLE_BLADE: renderBlade(); break; + case BulletConfiguration.STYLE_BARREL: renderNuke(3); break; default: renderBullet(trail); break; } @@ -217,6 +218,13 @@ public class RenderBullet extends Render { case 2: bindTexture(new ResourceLocation(RefStrings.MODID + ":textures/models/BaleFlare.png")); bf.renderAll(0.0625F); break; + case 3: + GL11.glScaled(0.5, 0.5, 0.5); + GL11.glRotated(90, 0, 0, 1); + GL11.glRotated(90, 0, 1, 0); + bindTexture(ResourceManager.waste_drum_tex); + ResourceManager.waste_drum.renderAll(); + break; } } diff --git a/src/main/resources/assets/hbm/textures/gui/processing/gui_chemfac.png b/src/main/resources/assets/hbm/textures/gui/processing/gui_chemfac.png index 3ec12aba3..9f8823a19 100755 Binary files a/src/main/resources/assets/hbm/textures/gui/processing/gui_chemfac.png and b/src/main/resources/assets/hbm/textures/gui/processing/gui_chemfac.png differ diff --git a/src/main/resources/assets/hbm/textures/items/ammo_nuke_barrel.png b/src/main/resources/assets/hbm/textures/items/ammo_nuke_barrel.png new file mode 100644 index 000000000..68e1e79fa Binary files /dev/null and b/src/main/resources/assets/hbm/textures/items/ammo_nuke_barrel.png differ diff --git a/src/main/resources/assets/hbm/textures/items/ammo_nuke_hive.png b/src/main/resources/assets/hbm/textures/items/ammo_nuke_hive.png new file mode 100644 index 000000000..788454adb Binary files /dev/null and b/src/main/resources/assets/hbm/textures/items/ammo_nuke_hive.png differ