From d7776b52d5227ca985836e61cf18ae77b74d5624 Mon Sep 17 00:00:00 2001 From: Bob Date: Mon, 23 Dec 2024 23:56:43 +0100 Subject: [PATCH] roblox death sound --- changelog | 6 + gradle.properties | 2 +- .../api/hbm/entity/IResistanceProvider.java | 1 + .../com/hbm/crafting/ConsumableRecipes.java | 4 +- .../java/com/hbm/crafting/WeaponRecipes.java | 7 +- .../java/com/hbm/entity/EntityMappings.java | 2 - .../entity/missile/EntityMissileTier0.java | 5 +- .../hbm/entity/mob/EntityCreeperNuclear.java | 5 +- .../java/com/hbm/entity/mob/EntityFBI.java | 8 +- .../com/hbm/entity/mob/EntityQuackos.java | 16 +- .../com/hbm/entity/mob/EntityTaintCrab.java | 68 +- .../hbm/entity/mob/glyphid/EntityGlyphid.java | 5 + .../hbm/entity/particle/EntityBSmokeFX.java | 76 -- .../hbm/entity/projectile/EntityBullet.java | 21 - .../com/hbm/entity/projectile/EntityLN2.java | 569 --------------- .../hbm/handler/BulletConfigSyncingUtil.java | 528 -------------- .../handler/guncfg/BulletConfigFactory.java | 92 --- .../hbm/handler/guncfg/Gun12GaugeFactory.java | 403 ---------- .../hbm/handler/guncfg/Gun20GaugeFactory.java | 273 ------- .../hbm/handler/guncfg/Gun22LRFactory.java | 100 --- .../handler/guncfg/Gun357MagnumFactory.java | 353 --------- .../handler/guncfg/Gun44MagnumFactory.java | 375 ---------- .../hbm/handler/guncfg/Gun45ACPFactory.java | 173 ----- .../hbm/handler/guncfg/Gun4GaugeFactory.java | 522 ------------- .../hbm/handler/guncfg/Gun50AEFactory.java | 129 ---- .../hbm/handler/guncfg/Gun50BMGFactory.java | 488 ------------- .../hbm/handler/guncfg/Gun556mmFactory.java | 429 ----------- .../com/hbm/handler/guncfg/Gun5mmFactory.java | 146 ---- .../hbm/handler/guncfg/Gun75BoltFactory.java | 164 ----- .../hbm/handler/guncfg/Gun762mmFactory.java | 365 ---------- .../com/hbm/handler/guncfg/Gun9mmFactory.java | 155 ---- .../hbm/handler/guncfg/GunDartFactory.java | 150 ---- .../handler/guncfg/GunDetonatorFactory.java | 113 --- .../hbm/handler/guncfg/GunEnergyFactory.java | 496 ------------- .../hbm/handler/guncfg/GunFatmanFactory.java | 544 -------------- .../hbm/handler/guncfg/GunGaussFactory.java | 94 --- .../hbm/handler/guncfg/GunGrenadeFactory.java | 392 ---------- .../hbm/handler/guncfg/GunOSIPRFactory.java | 138 ---- .../hbm/handler/guncfg/GunPoweredFactory.java | 248 ------- .../hbm/handler/guncfg/GunRocketFactory.java | 392 +--------- .../java/com/hbm/inventory/material/Mats.java | 3 +- .../inventory/recipes/AssemblerRecipes.java | 24 - .../java/com/hbm/itempool/ItemPoolsPile.java | 2 +- .../java/com/hbm/items/ItemAmmoEnums.java | 688 +----------------- src/main/java/com/hbm/items/ModItems.java | 355 +-------- .../com/hbm/items/tool/ItemAmmoContainer.java | 42 +- .../java/com/hbm/items/weapon/ItemAmmo.java | 6 - .../hbm/items/weapon/sedna/BulletConfig.java | 15 +- .../weapon/sedna/factory/GunFactory.java | 4 +- .../sedna/factory/GunFactoryClient.java | 1 - .../weapon/sedna/factory/XFactory12ga.java | 2 +- .../weapon/sedna/factory/XFactory22lr.java | 2 +- .../weapon/sedna/factory/XFactory357.java | 2 +- .../weapon/sedna/factory/XFactory44.java | 2 +- .../weapon/sedna/factory/XFactory50.java | 2 +- .../weapon/sedna/factory/XFactory556mm.java | 2 +- .../weapon/sedna/factory/XFactory762mm.java | 2 +- .../weapon/sedna/factory/XFactory9mm.java | 2 +- .../weapon/sedna/factory/XFactoryFlamer.java | 4 + src/main/java/com/hbm/lib/HbmCollection.java | 72 -- .../java/com/hbm/lib/ModDamageSource.java | 4 - src/main/java/com/hbm/lib/RefStrings.java | 2 +- src/main/java/com/hbm/main/ClientProxy.java | 2 - src/main/java/com/hbm/main/MainRegistry.java | 120 +++ .../render/entity/effect/BSmokeRenderer.java | 117 --- .../render/entity/projectile/RenderLN2.java | 141 ---- .../com/hbm/render/tileentity/RenderLoot.java | 3 +- .../deco/TileEntityTrappedBrick.java | 8 +- .../machine/TileEntityMachineKeyForge.java | 7 - .../turret/TileEntityTurretFritz.java | 13 +- .../com/hbm/util/DamageResistanceHandler.java | 4 + src/main/java/com/hbm/util/LootGenerator.java | 7 +- 72 files changed, 238 insertions(+), 9479 deletions(-) delete mode 100644 src/main/java/com/hbm/entity/particle/EntityBSmokeFX.java delete mode 100644 src/main/java/com/hbm/entity/projectile/EntityLN2.java delete mode 100644 src/main/java/com/hbm/handler/guncfg/Gun12GaugeFactory.java delete mode 100644 src/main/java/com/hbm/handler/guncfg/Gun20GaugeFactory.java delete mode 100644 src/main/java/com/hbm/handler/guncfg/Gun22LRFactory.java delete mode 100644 src/main/java/com/hbm/handler/guncfg/Gun357MagnumFactory.java delete mode 100644 src/main/java/com/hbm/handler/guncfg/Gun44MagnumFactory.java delete mode 100644 src/main/java/com/hbm/handler/guncfg/Gun45ACPFactory.java delete mode 100644 src/main/java/com/hbm/handler/guncfg/Gun4GaugeFactory.java delete mode 100644 src/main/java/com/hbm/handler/guncfg/Gun50AEFactory.java delete mode 100644 src/main/java/com/hbm/handler/guncfg/Gun50BMGFactory.java delete mode 100644 src/main/java/com/hbm/handler/guncfg/Gun556mmFactory.java delete mode 100644 src/main/java/com/hbm/handler/guncfg/Gun5mmFactory.java delete mode 100644 src/main/java/com/hbm/handler/guncfg/Gun75BoltFactory.java delete mode 100644 src/main/java/com/hbm/handler/guncfg/Gun762mmFactory.java delete mode 100644 src/main/java/com/hbm/handler/guncfg/Gun9mmFactory.java delete mode 100644 src/main/java/com/hbm/handler/guncfg/GunDartFactory.java delete mode 100644 src/main/java/com/hbm/handler/guncfg/GunDetonatorFactory.java delete mode 100644 src/main/java/com/hbm/handler/guncfg/GunFatmanFactory.java delete mode 100644 src/main/java/com/hbm/handler/guncfg/GunGaussFactory.java delete mode 100644 src/main/java/com/hbm/handler/guncfg/GunGrenadeFactory.java delete mode 100644 src/main/java/com/hbm/handler/guncfg/GunOSIPRFactory.java delete mode 100644 src/main/java/com/hbm/handler/guncfg/GunPoweredFactory.java delete mode 100644 src/main/java/com/hbm/render/entity/effect/BSmokeRenderer.java delete mode 100644 src/main/java/com/hbm/render/entity/projectile/RenderLN2.java diff --git a/changelog b/changelog index ae800e0467..8478d4f019 100644 --- a/changelog +++ b/changelog @@ -4,6 +4,7 @@ * AJR armor plating now uses niobium instead of saturnite, and yields twice as many items per recipe * Due to the gating change, the saturnite anvil now has a tier equivalent to a bronze anvil * Doubled the liberator's base damage to be on-par with the lever action shotgun in order to offset its poor performance due to the reload speed +* Decreased the explosive 12 gauge's damage from x5 to x2.5 * All non black powder shotgun shells now have some amount of damage threshold negation in order to not immediately become useless when used against early power armor * Obviously shot will always fare worse against higher tier armor, in those cases either use flechettes, slugs, any of the high tier rounds or a different caliber entirely * Bombers and cargo planes now use interpolation, making their movement smoother and fixing potential desyncs due to TPS @@ -11,12 +12,17 @@ * Legendaries are no longer found in red rooms, rather they have a whole new system of being discovered and crafted * "Recipes" are still subject to change, but the base system is final * There will some day be a completely new dungeon for those, but for now I used what I had + * Mayhaps a new legendary has appeared? * Glyphids now make use of the same resistance system as armors, their armor is no longer completely ignored by the new guns * Different damage types have different resistances * Damage resistance remains the same, while damage threshold is determined by the glyphid's armor - breaking the armor off will decrease the damage threshold * Balancing might still be off, however glyhids shouldn't be too tanky * I still haven't bothered to fix the bolter. It's like the son I don't love * Changed some of the sounds of the guns that still used the default black powder noise +* The flamethrower turret now uses the new flamethrower projectiles +* The now unused old gun items have been completely obliterated +* Headhot mulitpliers now apply for most conventional projectiles, by default the bonus for headshots is +25% damage + * JHP adds +50% ## Fixed * Fixed 9mm soft points being called ".9mm" diff --git a/gradle.properties b/gradle.properties index c9c8d0ddc4..c5ad7f4fd5 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,6 @@ mod_version=1.0.27 # Empty build number makes a release type -mod_build_number=5180 +mod_build_number=5188 credits=HbMinecraft,\ \ rodolphito (explosion algorithms),\ diff --git a/src/main/java/api/hbm/entity/IResistanceProvider.java b/src/main/java/api/hbm/entity/IResistanceProvider.java index 4f5935d12f..73bc9f5079 100644 --- a/src/main/java/api/hbm/entity/IResistanceProvider.java +++ b/src/main/java/api/hbm/entity/IResistanceProvider.java @@ -12,4 +12,5 @@ public interface IResistanceProvider { public float[] getCurrentDTDR(DamageSource damage, float amount, float pierceDT, float pierce); + public void onDamageDealt(DamageSource damage, float amount); } diff --git a/src/main/java/com/hbm/crafting/ConsumableRecipes.java b/src/main/java/com/hbm/crafting/ConsumableRecipes.java index 789a20333a..6cd44bb5bb 100644 --- a/src/main/java/com/hbm/crafting/ConsumableRecipes.java +++ b/src/main/java/com/hbm/crafting/ConsumableRecipes.java @@ -4,8 +4,8 @@ import com.hbm.config.GeneralConfig; import com.hbm.inventory.OreDictManager.DictFrame; import com.hbm.inventory.fluid.Fluids; -import com.hbm.items.ItemAmmoEnums.AmmoFatman; import com.hbm.items.machine.ItemCircuit.EnumCircuitType; +import com.hbm.items.weapon.sedna.factory.GunFactory.EnumAmmo; import com.hbm.items.ItemEnums; import com.hbm.items.ModItems; import com.hbm.main.CraftingManager; @@ -31,7 +31,7 @@ public static void register() { CraftingManager.addRecipeAuto(new ItemStack(ModItems.bomb_caller, 1, 1), new Object[] { "TTT", "TRT", "TTT", 'T', ModItems.grenade_gascan, 'R', ModItems.detonator_laser }); CraftingManager.addRecipeAuto(new ItemStack(ModItems.bomb_caller, 1, 2), new Object[] { "TTT", "TRT", "TTT", 'T', ModItems.pellet_gas, 'R', ModItems.detonator_laser }); CraftingManager.addRecipeAuto(new ItemStack(ModItems.bomb_caller, 1, 3), new Object[] { "TRT", 'T', ModItems.grenade_cloud, 'R', ModItems.detonator_laser }); - CraftingManager.addRecipeAuto(new ItemStack(ModItems.bomb_caller, 1, 4), new Object[] { "TR", 'T', ModItems.ammo_nuke.stackFromEnum(AmmoFatman.HIGH), 'R', ModItems.detonator_laser }); + CraftingManager.addRecipeAuto(new ItemStack(ModItems.bomb_caller, 1, 4), new Object[] { "TR", 'T', DictFrame.fromOne(ModItems.ammo_standard, EnumAmmo.NUKE_HIGH), 'R', ModItems.detonator_laser }); //Food CraftingManager.addRecipeAuto(new ItemStack(ModItems.bomb_waffle, 1), new Object[] { "WEW", "MPM", "WEW", 'W', Items.wheat, 'E', Items.egg, 'M', Items.milk_bucket, 'P', ModItems.man_core }); diff --git a/src/main/java/com/hbm/crafting/WeaponRecipes.java b/src/main/java/com/hbm/crafting/WeaponRecipes.java index 0bad1c9af5..f4939f6dd3 100644 --- a/src/main/java/com/hbm/crafting/WeaponRecipes.java +++ b/src/main/java/com/hbm/crafting/WeaponRecipes.java @@ -2,7 +2,7 @@ import com.hbm.blocks.ModBlocks; import com.hbm.inventory.OreDictManager; -import com.hbm.inventory.fluid.FluidType; +import com.hbm.inventory.OreDictManager.DictFrame; import com.hbm.inventory.fluid.Fluids; import com.hbm.inventory.material.Mats; @@ -101,7 +101,7 @@ public static void register() { //Missiles CraftingManager.addShapelessAuto(new ItemStack(ModItems.missile_taint, 1), new Object[] { ModItems.missile_assembly, ModItems.bucket_mud, ModItems.powder_spark_mix, ModItems.powder_magic }); - CraftingManager.addShapelessAuto(new ItemStack(ModItems.missile_micro, 1), new Object[] { ModItems.missile_assembly, ModItems.ducttape, ModItems.ammo_nuke.stackFromEnum(AmmoFatman.HIGH) }); + CraftingManager.addShapelessAuto(new ItemStack(ModItems.missile_micro, 1), new Object[] { ModItems.missile_assembly, ModItems.ducttape, DictFrame.fromOne(ModItems.ammo_standard, EnumAmmo.NUKE_HIGH) }); CraftingManager.addShapelessAuto(new ItemStack(ModItems.missile_bhole, 1), new Object[] { ModItems.missile_assembly, ModItems.ducttape, ModItems.grenade_black_hole }); CraftingManager.addShapelessAuto(new ItemStack(ModItems.missile_schrabidium, 1), new Object[] { ModItems.missile_assembly, ModItems.ducttape, ModItems.cell_anti_schrabidium, ANY_HARDPLASTIC.ingot() }); CraftingManager.addShapelessAuto(new ItemStack(ModItems.missile_emp, 1), new Object[] { ModItems.missile_assembly, ModItems.ducttape, ModBlocks.emp_bomb }); @@ -153,9 +153,6 @@ public static void register() { CraftingManager.addRecipeAuto(new ItemStack(ModItems.pellet_claws, 1), new Object[] { " X ", "X X", " XX", 'X', STEEL.plate() }); CraftingManager.addRecipeAuto(new ItemStack(ModItems.assembly_nuke, 1), new Object[] { " WP", "SEP", " WP", 'W', GOLD.wireFine(), 'P', STEEL.plate(), 'S', STEEL.shell(), 'E', ModItems.ball_tatb }); - FluidType[] chainsawTypes = new FluidType[] {Fluids.DIESEL, Fluids.DIESEL_CRACK, Fluids.PETROIL, Fluids.PETROIL_LEADED, Fluids.GASOLINE, Fluids.GASOLINE_LEADED, Fluids.BIOFUEL}; - for(FluidType type : chainsawTypes) CraftingManager.addRecipeAuto(ModItems.ammo_rocket.stackFromEnum(2, AmmoRocket.RPC), new Object[] { "BP ", "CBH", " DR", 'B', ModItems.blades_steel, 'P', STEEL.plate(), 'C', type.getDict(1000), 'H', STEEL.shell(), 'D', ModItems.piston_selenium, 'R', ModItems.ammo_rocket }); - //240mm Shells CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_shell, 4), new Object[] { " T ", "GHG", "CCC", 'T', ModBlocks.tnt, 'G', Items.gunpowder, 'H', STEEL.shell(), 'C', CU.ingot() }); CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_shell, 4), new Object[] { " T ", "GHG", "CCC", 'T', ModBlocks.tnt, 'G', ModItems.ballistite, 'H', STEEL.shell(), 'C', CU.ingot() }); diff --git a/src/main/java/com/hbm/entity/EntityMappings.java b/src/main/java/com/hbm/entity/EntityMappings.java index 2acf95a34b..9d0437c727 100644 --- a/src/main/java/com/hbm/entity/EntityMappings.java +++ b/src/main/java/com/hbm/entity/EntityMappings.java @@ -74,7 +74,6 @@ public static void writeMappings() { addEntity(EntityMissileMirv.class, "entity_missile_mirv", 1000); addEntity(EntityMIRV.class, "entity_mirvlet", 1000); addEntity(EntityGrenadeNuclear.class, "entity_grenade_nuclear", 1000); - addEntity(EntityBSmokeFX.class, "entity_b_smoke_fx", 1000); addEntity(EntityGrenadePlasma.class, "entity_grenade_plasma", 500); addEntity(EntityGrenadeTau.class, "entity_grenade_tau", 500); addEntity(EntityChopperMine.class, "entity_chopper_mine", 1000); @@ -86,7 +85,6 @@ public static void writeMappings() { addEntity(EntityGrenadeASchrab.class, "entity_grenade_aschrab", 500); addEntity(EntityFalloutRain.class, "entity_fallout", 1000); addEntity(EntityEMPBlast.class, "entity_emp_blast", 1000); - addEntity(EntityLN2.class, "entity_LN2", 1000); addEntity(EntityGrenadePulse.class, "entity_grenade_pulse", 1000); addEntity(EntityLaserBeam.class, "entity_laser_beam", 1000); addEntity(EntityMinerBeam.class, "entity_miner_beam", 1000); diff --git a/src/main/java/com/hbm/entity/missile/EntityMissileTier0.java b/src/main/java/com/hbm/entity/missile/EntityMissileTier0.java index 811d7944f4..ed2a473090 100644 --- a/src/main/java/com/hbm/entity/missile/EntityMissileTier0.java +++ b/src/main/java/com/hbm/entity/missile/EntityMissileTier0.java @@ -12,10 +12,11 @@ import com.hbm.entity.logic.EntityNukeExplosionMK3; import com.hbm.explosion.ExplosionNukeGeneric; import com.hbm.explosion.ExplosionNukeSmall; +import com.hbm.inventory.OreDictManager.DictFrame; import com.hbm.inventory.material.Mats; import com.hbm.items.ModItems; -import com.hbm.items.ItemAmmoEnums.AmmoFatman; +import com.hbm.items.weapon.sedna.factory.GunFactory.EnumAmmo; import net.minecraft.block.Block; import net.minecraft.init.Blocks; @@ -81,7 +82,7 @@ public static class EntityMissileMicro extends EntityMissileTier0 { public EntityMissileMicro(World world) { super(world); } public EntityMissileMicro(World world, float x, float y, float z, int a, int b) { super(world, x, y, z, a, b); } @Override public void onImpact() { ExplosionNukeSmall.explode(worldObj, posX, posY + 0.5, posZ, ExplosionNukeSmall.PARAMS_HIGH); } - @Override public ItemStack getDebrisRareDrop() { return ModItems.ammo_nuke.stackFromEnum(AmmoFatman.HIGH); } + @Override public ItemStack getDebrisRareDrop() { return DictFrame.fromOne(ModItems.ammo_standard, EnumAmmo.NUKE_HIGH); } @Override public ItemStack getMissileItemForInfo() { return new ItemStack(ModItems.missile_micro); } } diff --git a/src/main/java/com/hbm/entity/mob/EntityCreeperNuclear.java b/src/main/java/com/hbm/entity/mob/EntityCreeperNuclear.java index 8322f29b67..e81b192dd3 100644 --- a/src/main/java/com/hbm/entity/mob/EntityCreeperNuclear.java +++ b/src/main/java/com/hbm/entity/mob/EntityCreeperNuclear.java @@ -5,8 +5,9 @@ import com.hbm.entity.logic.EntityNukeExplosionMK5; import com.hbm.explosion.ExplosionNukeGeneric; import com.hbm.explosion.ExplosionNukeSmall; +import com.hbm.inventory.OreDictManager.DictFrame; import com.hbm.items.ModItems; -import com.hbm.items.ItemAmmoEnums.AmmoFatman; +import com.hbm.items.weapon.sedna.factory.GunFactory.EnumAmmo; import com.hbm.lib.ModDamageSource; import com.hbm.main.MainRegistry; import com.hbm.packet.PacketDispatcher; @@ -81,7 +82,7 @@ public void onDeath(DamageSource p_70645_1_) { } if(p_70645_1_.getEntity() instanceof EntitySkeleton || (p_70645_1_.isProjectile() && p_70645_1_.getEntity() instanceof EntityArrow && ((EntityArrow) (p_70645_1_.getEntity())).shootingEntity == null)) { - this.entityDropItem(ModItems.ammo_nuke.stackFromEnum(AmmoFatman.STOCK), 1); + this.entityDropItem(DictFrame.fromOne(ModItems.ammo_standard, EnumAmmo.NUKE_STANDARD), 1); } } diff --git a/src/main/java/com/hbm/entity/mob/EntityFBI.java b/src/main/java/com/hbm/entity/mob/EntityFBI.java index ae95a2df2c..3463392263 100644 --- a/src/main/java/com/hbm/entity/mob/EntityFBI.java +++ b/src/main/java/com/hbm/entity/mob/EntityFBI.java @@ -97,8 +97,8 @@ protected void addRandomArmor() { int equip = rand.nextInt(2); switch(equip) { - case 0: this.setCurrentItemOrArmor(0, new ItemStack(ModItems.gun_revolver_nopip)); break; - case 1: this.setCurrentItemOrArmor(0, new ItemStack(ModItems.gun_ks23)); break; + case 0: this.setCurrentItemOrArmor(0, new ItemStack(ModItems.gun_heavy_revolver)); break; + case 1: this.setCurrentItemOrArmor(0, new ItemStack(ModItems.gun_spas12)); break; } if(rand.nextInt(5) == 0) { @@ -143,14 +143,14 @@ public int getTotalArmorValue() { public void attackEntityWithRangedAttack(EntityLivingBase entity, float f) { if(this.getEquipmentInSlot(0) != null) { - if(this.getEquipmentInSlot(0).getItem() == ModItems.gun_revolver_nopip) { + if(this.getEquipmentInSlot(0).getItem() == ModItems.gun_heavy_revolver) { EntityBullet bullet = new EntityBullet(worldObj, this, entity, 3F, 2); bullet.damage = 10; this.worldObj.spawnEntityInWorld(bullet); this.playSound("hbm:weapon.revolverShootAlt", 1.0F, 1.0F); } - if(this.getEquipmentInSlot(0).getItem() == ModItems.gun_ks23) { + if(this.getEquipmentInSlot(0).getItem() == ModItems.gun_spas12) { for(int i = 0; i < 7; i++) { EntityBullet bullet = new EntityBullet(worldObj, this, entity, 3F, 5); bullet.damage = 3; diff --git a/src/main/java/com/hbm/entity/mob/EntityQuackos.java b/src/main/java/com/hbm/entity/mob/EntityQuackos.java index e310ac8a53..31169e9948 100644 --- a/src/main/java/com/hbm/entity/mob/EntityQuackos.java +++ b/src/main/java/com/hbm/entity/mob/EntityQuackos.java @@ -1,14 +1,17 @@ package com.hbm.entity.mob; -import com.hbm.entity.particle.EntityBSmokeFX; import com.hbm.items.ModItems; +import com.hbm.packet.PacketDispatcher; +import com.hbm.packet.toclient.AuxParticlePacketNT; +import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.entity.EntityAgeable; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.boss.IBossDisplayData; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.DamageSource; import net.minecraft.util.MathHelper; import net.minecraft.world.World; @@ -102,10 +105,13 @@ public void despawn() { if(!worldObj.isRemote) { for(int i = 0; i < 150; i++) { - - EntityBSmokeFX fx = new EntityBSmokeFX(worldObj); - fx.setPositionAndRotation(posX + rand.nextDouble() * 20 - 10, posY + rand.nextDouble() * 25, posZ + rand.nextDouble() * 20 - 10, 0, 0); - worldObj.spawnEntityInWorld(fx); + NBTTagCompound data = new NBTTagCompound(); + data.setString("type", "bf"); + PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data, + posX + rand.nextDouble() * 20 - 10, + posY + rand.nextDouble() * 25, + posZ + rand.nextDouble() * 20 - 10), + new TargetPoint(dimension, posX, posY, posZ, 150)); } dropItem(ModItems.spawn_duck, 3); diff --git a/src/main/java/com/hbm/entity/mob/EntityTaintCrab.java b/src/main/java/com/hbm/entity/mob/EntityTaintCrab.java index e6db43891a..b7f33cdd6f 100644 --- a/src/main/java/com/hbm/entity/mob/EntityTaintCrab.java +++ b/src/main/java/com/hbm/entity/mob/EntityTaintCrab.java @@ -3,9 +3,9 @@ import java.util.ArrayList; import java.util.List; -import com.hbm.entity.projectile.EntityBulletBaseNT; -import com.hbm.handler.BulletConfigSyncingUtil; +import com.hbm.entity.projectile.EntityBulletBaseMK4; import com.hbm.items.ModItems; +import com.hbm.items.weapon.sedna.factory.XFactory762mm; import com.hbm.packet.PacketDispatcher; import com.hbm.packet.toclient.AuxParticlePacketNT; import com.hbm.potion.HbmPotion; @@ -28,51 +28,47 @@ public class EntityTaintCrab extends EntityCyberCrab { public EntityTaintCrab(World p_i1733_1_) { super(p_i1733_1_); - this.setSize(1.25F, 1.25F); - this.ignoreFrustumCheck = true; + this.setSize(1.25F, 1.25F); + this.ignoreFrustumCheck = true; } - - protected EntityAIArrowAttack arrowAI() { - return new EntityAIArrowAttack(this, 0.5D, 5, 5, 50.0F); - } - @Override - protected void applyEntityAttributes() - { - super.applyEntityAttributes(); - this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(25.0D); - this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.5F); - } - - public void onLivingUpdate() { - - targets = TileEntityTesla.zap(worldObj, posX, posY + 1.25, posZ, 10, this); + protected EntityAIArrowAttack arrowAI() { + return new EntityAIArrowAttack(this, 0.5D, 5, 5, 50.0F); + } + + @Override + protected void applyEntityAttributes() { + super.applyEntityAttributes(); + this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(25.0D); + this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.5F); + } + + public void onLivingUpdate() { + + targets = TileEntityTesla.zap(worldObj, posX, posY + 1.25, posZ, 10, this); List targets = worldObj.getEntitiesWithinAABB(EntityLivingBase.class, AxisAlignedBB.getBoundingBox(posX - 5, posY - 5, posZ - 5, posX + 5, posY + 5, posZ + 5)); for(EntityLivingBase e : targets) { - - if(!(e instanceof EntityCyberCrab)) - e.addPotionEffect(new PotionEffect(HbmPotion.radiation.id, 10, 15)); + if(!(e instanceof EntityCyberCrab)) e.addPotionEffect(new PotionEffect(HbmPotion.radiation.id, 10, 15)); } - - super.onLivingUpdate(); - } - @Override - protected Item getDropItem() - { - return ModItems.coil_advanced_alloy; - } + super.onLivingUpdate(); + } - protected void dropRareDrop(int p_70600_1_) { - this.dropItem(ModItems.coil_magnetized_tungsten, 1); - } + @Override + protected Item getDropItem() { + return ModItems.coil_advanced_alloy; + } + + protected void dropRareDrop(int p_70600_1_) { + this.dropItem(ModItems.coil_magnetized_tungsten, 1); + } @Override public void attackEntityWithRangedAttack(EntityLivingBase entity, float f) { - EntityBulletBaseNT bullet = new EntityBulletBaseNT(worldObj, BulletConfigSyncingUtil.BMG50_STAR, this); + EntityBulletBaseMK4 bullet = new EntityBulletBaseMK4(this, XFactory762mm.r762_fmj, 10F, 0F, 0F, 0F, 0F); Vec3 motion = Vec3.createVectorHelper(posX - entity.posX, posY - entity.posZ - entity.height / 2, posZ - entity.posZ); motion = motion.normalize(); NBTTagCompound data = new NBTTagCompound(); @@ -82,7 +78,7 @@ public void attackEntityWithRangedAttack(EntityLivingBase entity, float f) { data.setDouble("mY", bullet.motionY * 0.3); data.setDouble("mZ", bullet.motionZ * 0.3); PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data, bullet.posX, bullet.posY, bullet.posZ), new TargetPoint(this.dimension, posX, posY, posZ, 50)); - this.worldObj.spawnEntityInWorld(bullet); - this.playSound("hbm:weapon.sawShoot", 1.0F, 0.5F); + this.worldObj.spawnEntityInWorld(bullet); + this.playSound("hbm:weapon.sawShoot", 1.0F, 0.5F); } } diff --git a/src/main/java/com/hbm/entity/mob/glyphid/EntityGlyphid.java b/src/main/java/com/hbm/entity/mob/glyphid/EntityGlyphid.java index 48e6eab5e6..e335f0614b 100644 --- a/src/main/java/com/hbm/entity/mob/glyphid/EntityGlyphid.java +++ b/src/main/java/com/hbm/entity/mob/glyphid/EntityGlyphid.java @@ -149,6 +149,11 @@ public float[] getCurrentDTDR(DamageSource damage, float amount, float pierceDT, return new float[] {threshold, stats.resistanceMult}; } + @Override + public void onDamageDealt(DamageSource damage, float amount) { + if(this.isArmorBroken(amount)) this.breakOffArmor(); + } + @Override public void onUpdate() { super.onUpdate(); diff --git a/src/main/java/com/hbm/entity/particle/EntityBSmokeFX.java b/src/main/java/com/hbm/entity/particle/EntityBSmokeFX.java deleted file mode 100644 index ebbed1d98c..0000000000 --- a/src/main/java/com/hbm/entity/particle/EntityBSmokeFX.java +++ /dev/null @@ -1,76 +0,0 @@ -package com.hbm.entity.particle; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.world.World; - -public class EntityBSmokeFX extends EntityModFX -{ - public EntityBSmokeFX(World world) { - super(world, 0, 0, 0); - } - - public EntityBSmokeFX(World p_i1225_1_, double p_i1225_2_, double p_i1225_4_, double p_i1225_6_, double p_i1225_8_, double p_i1225_10_, double p_i1225_12_) - { - this(p_i1225_1_, p_i1225_2_, p_i1225_4_, p_i1225_6_, p_i1225_8_, p_i1225_10_, p_i1225_12_, 1.0F); - } - - public EntityBSmokeFX(World p_i1226_1_, double p_i1226_2_, double p_i1226_4_, double p_i1226_6_, double p_i1226_8_, double p_i1226_10_, double p_i1226_12_, float p_i1226_14_) - { - super(p_i1226_1_, p_i1226_2_, p_i1226_4_, p_i1226_6_, 0.0D, 0.0D, 0.0D); - this.motionX *= 0.10000000149011612D; - this.motionY *= 0.10000000149011612D; - this.motionZ *= 0.10000000149011612D; - this.motionX += p_i1226_8_; - this.motionY += p_i1226_10_; - this.motionZ += p_i1226_12_; - this.particleRed = this.particleGreen = this.particleBlue = (float)(Math.random() * 0.30000001192092896D); - this.particleScale *= 0.75F; - this.particleScale *= p_i1226_14_; - this.smokeParticleScale = this.particleScale; - //this.particleMaxAge = (int)(8.0D / (Math.random() * 0.8D + 0.2D)); - //this.particleMaxAge = (int)((float)this.particleMaxAge * p_i1226_14_); - this.noClip = false; - } - - /** - * Called to update the entity's position/logic. - */ - - @Override - public void onUpdate() - { - this.prevPosX = this.posX; - this.prevPosY = this.posY; - this.prevPosZ = this.posZ; - - if(maxAge < 100) - { - maxAge = rand.nextInt(21) + 65; - } - - this.particleAge++; - - if (this.particleAge >= maxAge) - { - this.setDead(); - } - - this.motionX *= 0.9599999785423279D; - this.motionY *= 0.9599999785423279D; - this.motionZ *= 0.9599999785423279D; - - if (this.onGround) - { - this.motionX *= 0.699999988079071D; - this.motionZ *= 0.699999988079071D; - } - } - - @Override - @SideOnly(Side.CLIENT) - public int getBrightnessForRender(float p_70070_1_) - { - return 15728880; - } -} diff --git a/src/main/java/com/hbm/entity/projectile/EntityBullet.java b/src/main/java/com/hbm/entity/projectile/EntityBullet.java index 51b68c5e98..b26a94e608 100644 --- a/src/main/java/com/hbm/entity/projectile/EntityBullet.java +++ b/src/main/java/com/hbm/entity/projectile/EntityBullet.java @@ -32,7 +32,6 @@ import com.hbm.blocks.bomb.BlockDetonatable; import com.hbm.entity.grenade.EntityGrenadeTau; import com.hbm.entity.mob.EntityCreeperNuclear; -import com.hbm.entity.particle.EntityBSmokeFX; import com.hbm.items.ModItems; import com.hbm.lib.ModDamageSource; import com.hbm.util.ArmorUtil; @@ -542,26 +541,6 @@ public void onUpdate() { ((EntityPlayerMP) this.shootingEntity).playerNetServerHandler .sendPacket(new S2BPacketChangeGameState(6, 0.0F)); } - - if(this.pip) { - if(!worldObj.isRemote) { - EntityBoxcar pippo = new EntityBoxcar(worldObj); - pippo.posX = movingobjectposition.entityHit.posX; - pippo.posY = movingobjectposition.entityHit.posY + 50; - pippo.posZ = movingobjectposition.entityHit.posZ; - - for(int j = 0; j < 50; j++) { - EntityBSmokeFX fx = new EntityBSmokeFX(worldObj, pippo.posX + (rand.nextDouble() - 0.5) * 4, pippo.posY + (rand.nextDouble() - 0.5) * 12, pippo.posZ + (rand.nextDouble() - 0.5) * 4, 0, 0, 0); - worldObj.spawnEntityInWorld(fx); - } - - worldObj.spawnEntityInWorld(pippo); - } - - worldObj.playSoundEffect(movingobjectposition.entityHit.posX, - movingobjectposition.entityHit.posY + 50, - movingobjectposition.entityHit.posZ, "hbm:alarm.trainHorn", 100F, 1F); - } } if (!(movingobjectposition.entityHit instanceof EntityEnderman)) { diff --git a/src/main/java/com/hbm/entity/projectile/EntityLN2.java b/src/main/java/com/hbm/entity/projectile/EntityLN2.java deleted file mode 100644 index a1e64cccc6..0000000000 --- a/src/main/java/com/hbm/entity/projectile/EntityLN2.java +++ /dev/null @@ -1,569 +0,0 @@ -package com.hbm.entity.projectile; - -import java.util.List; - -import com.hbm.explosion.ExplosionThermo; -import com.hbm.lib.ModDamageSource; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.enchantment.EnchantmentHelper; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.IProjectile; -import net.minecraft.entity.monster.EntityEnderman; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.network.play.server.S2BPacketChangeGameState; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.DamageSource; -import net.minecraft.util.MathHelper; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.util.Vec3; -import net.minecraft.world.World; - -public class EntityLN2 extends Entity implements IProjectile -{ - private int field_145791_d = -1; - private int field_145792_e = -1; - private int field_145789_f = -1; - public double gravity = 0.0D; - private Block field_145790_g; - private int inData; - private boolean inGround; - /** 1 if the player can pick up the arrow */ - public int canBePickedUp; - /** Seems to be some sort of timer for animating an arrow. */ - public int arrowShake; - /** The owner of this arrow. */ - public Entity shootingEntity; - private int ticksInGround; - private int ticksInAir; - public int maxAge = 20; - private double damage = 2.0D; - /** The amount of knockback an arrow applies when it hits a mob. */ - private int knockbackStrength; - public EntityLN2(World p_i1753_1_) - { - super(p_i1753_1_); - this.renderDistanceWeight = 10.0D; - this.setSize(0.5F, 0.5F); - } - - public EntityLN2(World p_i1754_1_, double p_i1754_2_, double p_i1754_4_, double p_i1754_6_) - { - super(p_i1754_1_); - this.renderDistanceWeight = 10.0D; - this.setSize(0.5F, 0.5F); - this.setPosition(p_i1754_2_, p_i1754_4_, p_i1754_6_); - this.yOffset = 0.0F; - } - - public EntityLN2(World p_i1755_1_, EntityLivingBase p_i1755_2_, EntityLivingBase p_i1755_3_, float p_i1755_4_, float p_i1755_5_) - { - super(p_i1755_1_); - this.renderDistanceWeight = 10.0D; - this.shootingEntity = p_i1755_2_; - - if (p_i1755_2_ instanceof EntityPlayer) - { - this.canBePickedUp = 1; - } - - this.posY = p_i1755_2_.posY + p_i1755_2_.getEyeHeight() - 0.10000000149011612D; - double d0 = p_i1755_3_.posX - p_i1755_2_.posX; - double d1 = p_i1755_3_.boundingBox.minY + p_i1755_3_.height / 3.0F - this.posY; - double d2 = p_i1755_3_.posZ - p_i1755_2_.posZ; - double d3 = MathHelper.sqrt_double(d0 * d0 + d2 * d2); - - if (d3 >= 1.0E-7D) - { - float f2 = (float)(Math.atan2(d2, d0) * 180.0D / Math.PI) - 90.0F; - float f3 = (float)(-(Math.atan2(d1, d3) * 180.0D / Math.PI)); - double d4 = d0 / d3; - double d5 = d2 / d3; - this.setLocationAndAngles(p_i1755_2_.posX + d4, this.posY, p_i1755_2_.posZ + d5, f2, f3); - this.yOffset = 0.0F; - float f4 = (float)d3 * 0.2F; - this.setThrowableHeading(d0, d1 + f4, d2, p_i1755_4_, p_i1755_5_); - } - } - - public EntityLN2(World p_i1756_1_, EntityLivingBase p_i1756_2_, float p_i1756_3_) - { - super(p_i1756_1_); - this.renderDistanceWeight = 10.0D; - this.shootingEntity = p_i1756_2_; - - if (p_i1756_2_ instanceof EntityPlayer) - { - this.canBePickedUp = 1; - } - - this.setSize(0.5F, 0.5F); - this.setLocationAndAngles(p_i1756_2_.posX, p_i1756_2_.posY + p_i1756_2_.getEyeHeight(), p_i1756_2_.posZ, p_i1756_2_.rotationYaw, p_i1756_2_.rotationPitch); - this.posX -= MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * 0.16F; - this.posY -= 0.10000000149011612D; - this.posZ -= MathHelper.sin(this.rotationYaw / 180.0F * (float)Math.PI) * 0.16F; - this.setPosition(this.posX, this.posY, this.posZ); - this.yOffset = 0.0F; - this.motionX = -MathHelper.sin(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI); - this.motionZ = MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI); - this.motionY = (-MathHelper.sin(this.rotationPitch / 180.0F * (float)Math.PI)); - this.setThrowableHeading(this.motionX, this.motionY, this.motionZ, p_i1756_3_ * 1.5F, 1.0F); - } - - public EntityLN2(World world, int x, int y, int z, double mx, double my, double mz, double grav) { - super(world); - this.posX = x + 0.5F; - this.posY = y + 0.5F; - this.posZ = z + 0.5F; - - this.motionX = mx; - this.motionY = my; - this.motionZ = mz; - - this.gravity = grav; - } - - @Override - protected void entityInit() - { - this.dataWatcher.addObject(16, Byte.valueOf((byte)0)); - } - - /** - * Similar to setArrowHeading, it's point the throwable entity to a x, y, z direction. - */ - @Override - public void setThrowableHeading(double p_70186_1_, double p_70186_3_, double p_70186_5_, float p_70186_7_, float p_70186_8_) - { - float f2 = MathHelper.sqrt_double(p_70186_1_ * p_70186_1_ + p_70186_3_ * p_70186_3_ + p_70186_5_ * p_70186_5_); - p_70186_1_ /= f2; - p_70186_3_ /= f2; - p_70186_5_ /= f2; - p_70186_1_ += this.rand.nextGaussian() * (this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D * p_70186_8_; - p_70186_3_ += this.rand.nextGaussian() * (this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D * p_70186_8_; - p_70186_5_ += this.rand.nextGaussian() * (this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D * p_70186_8_; - p_70186_1_ *= p_70186_7_; - p_70186_3_ *= p_70186_7_; - p_70186_5_ *= p_70186_7_; - this.motionX = p_70186_1_; - this.motionY = p_70186_3_; - this.motionZ = p_70186_5_; - float f3 = MathHelper.sqrt_double(p_70186_1_ * p_70186_1_ + p_70186_5_ * p_70186_5_); - this.prevRotationYaw = this.rotationYaw = (float)(Math.atan2(p_70186_1_, p_70186_5_) * 180.0D / Math.PI); - this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(p_70186_3_, f3) * 180.0D / Math.PI); - this.ticksInGround = 0; - } - - /** - * Sets the position and rotation. Only difference from the other one is no bounding on the rotation. Args: posX, - * posY, posZ, yaw, pitch - */ - @Override - @SideOnly(Side.CLIENT) - public void setPositionAndRotation2(double p_70056_1_, double p_70056_3_, double p_70056_5_, float p_70056_7_, float p_70056_8_, int p_70056_9_) - { - this.setPosition(p_70056_1_, p_70056_3_, p_70056_5_); - this.setRotation(p_70056_7_, p_70056_8_); - } - - /** - * Sets the velocity to the args. Args: x, y, z - */ - @Override - @SideOnly(Side.CLIENT) - public void setVelocity(double p_70016_1_, double p_70016_3_, double p_70016_5_) - { - this.motionX = p_70016_1_; - this.motionY = p_70016_3_; - this.motionZ = p_70016_5_; - - if (this.prevRotationPitch == 0.0F && this.prevRotationYaw == 0.0F) - { - float f = MathHelper.sqrt_double(p_70016_1_ * p_70016_1_ + p_70016_5_ * p_70016_5_); - this.prevRotationYaw = this.rotationYaw = (float)(Math.atan2(p_70016_1_, p_70016_5_) * 180.0D / Math.PI); - this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(p_70016_3_, f) * 180.0D / Math.PI); - this.prevRotationPitch = this.rotationPitch; - this.prevRotationYaw = this.rotationYaw; - this.setLocationAndAngles(this.posX, this.posY, this.posZ, this.rotationYaw, this.rotationPitch); - this.ticksInGround = 0; - } - } - - /** - * Called to update the entity's position/logic. - */ - //@Override - @Override - public void onUpdate() - { - super.onUpdate(); - - if (this.prevRotationPitch == 0.0F && this.prevRotationYaw == 0.0F) - { - MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ); - this.prevRotationYaw = this.rotationYaw = (float)(Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI); - //this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(this.motionY, (double)f) * 180.0D / Math.PI); - } - - Block block = this.worldObj.getBlock(this.field_145791_d, this.field_145792_e, this.field_145789_f); - - if (block.getMaterial() != Material.air) - { - block.setBlockBoundsBasedOnState(this.worldObj, this.field_145791_d, this.field_145792_e, this.field_145789_f); - AxisAlignedBB axisalignedbb = block.getCollisionBoundingBoxFromPool(this.worldObj, this.field_145791_d, this.field_145792_e, this.field_145789_f); - - if (axisalignedbb != null && axisalignedbb.isVecInside(Vec3.createVectorHelper(this.posX, this.posY, this.posZ))) - { - this.inGround = true; - } - } - - if (this.arrowShake > 0) - { - --this.arrowShake; - } - - if (this.inGround) - { - this.setDead(); - int i = 3; - if(!worldObj.isRemote) { - ExplosionThermo.freeze(this.worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, i); - ExplosionThermo.snow(this.worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, i); - } - } - else - { - ++this.ticksInAir; - Vec3 vec31 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ); - Vec3 vec3 = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ); - MovingObjectPosition movingobjectposition = this.worldObj.func_147447_a(vec31, vec3, false, true, false); - vec31 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ); - vec3 = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ); - - if (movingobjectposition != null) - { - vec3 = Vec3.createVectorHelper(movingobjectposition.hitVec.xCoord, movingobjectposition.hitVec.yCoord, movingobjectposition.hitVec.zCoord); - } - - Entity entity = null; - List list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.addCoord(this.motionX, this.motionY, this.motionZ).expand(1.0D, 1.0D, 1.0D)); - double d0 = 0.0D; - int i; - float f1; - - for (i = 0; i < list.size(); ++i) - { - Entity entity1 = (Entity)list.get(i); - - if (entity1.canBeCollidedWith() && (entity1 != this.shootingEntity || this.ticksInAir >= 5)) - { - f1 = 0.3F; - AxisAlignedBB axisalignedbb1 = entity1.boundingBox.expand(f1, f1, f1); - MovingObjectPosition movingobjectposition1 = axisalignedbb1.calculateIntercept(vec31, vec3); - - if (movingobjectposition1 != null) - { - double d1 = vec31.distanceTo(movingobjectposition1.hitVec); - - if (d1 < d0 || d0 == 0.0D) - { - entity = entity1; - d0 = d1; - } - } - } - } - - if (entity != null) - { - movingobjectposition = new MovingObjectPosition(entity); - } - - if (movingobjectposition != null && movingobjectposition.entityHit != null && movingobjectposition.entityHit instanceof EntityPlayer) - { - EntityPlayer entityplayer = (EntityPlayer)movingobjectposition.entityHit; - - if (entityplayer.capabilities.disableDamage || this.shootingEntity instanceof EntityPlayer && !((EntityPlayer)this.shootingEntity).canAttackPlayer(entityplayer)) - { - movingobjectposition = null; - } - } - - float f2; - float f4; - - if (movingobjectposition != null) - { - if (movingobjectposition.entityHit != null) - { - f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ); - int k = MathHelper.ceiling_double_int(f2 * this.damage); - - if (this.getIsCritical()) - { - k += this.rand.nextInt(k / 2 + 2); - } - - DamageSource damagesource = null; - - if (this.shootingEntity == null) - { - damagesource = DamageSource.generic; - } - else - { - damagesource = ModDamageSource.causeIceDamage(this, this.shootingEntity); - } - - if (movingobjectposition.entityHit.attackEntityFrom(damagesource, k)) - { - if (movingobjectposition.entityHit instanceof EntityLivingBase) - { - EntityLivingBase entitylivingbase = (EntityLivingBase)movingobjectposition.entityHit; - - if (this.knockbackStrength > 0) - { - f4 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ); - - if (f4 > 0.0F) - { - movingobjectposition.entityHit.addVelocity(this.motionX * this.knockbackStrength * 0.6000000238418579D / f4, 0.1D, this.motionZ * this.knockbackStrength * 0.6000000238418579D / f4); - } - } - - if (this.shootingEntity != null && this.shootingEntity instanceof EntityLivingBase) - { - EnchantmentHelper.func_151384_a(entitylivingbase, this.shootingEntity); - EnchantmentHelper.func_151385_b((EntityLivingBase)this.shootingEntity, entitylivingbase); - } - - if (this.shootingEntity != null && movingobjectposition.entityHit != this.shootingEntity && movingobjectposition.entityHit instanceof EntityPlayer && this.shootingEntity instanceof EntityPlayerMP) - { - ((EntityPlayerMP)this.shootingEntity).playerNetServerHandler.sendPacket(new S2BPacketChangeGameState(6, 0.0F)); - } - } - - if (!(movingobjectposition.entityHit instanceof EntityEnderman)) - { - if (!this.worldObj.isRemote && movingobjectposition.entityHit instanceof EntityLivingBase) - { - movingobjectposition.entityHit.attackEntityFrom(damagesource, 5F); - } - } - } - } - else - { - this.field_145791_d = movingobjectposition.blockX; - this.field_145792_e = movingobjectposition.blockY; - this.field_145789_f = movingobjectposition.blockZ; - this.field_145790_g = this.worldObj.getBlock(this.field_145791_d, this.field_145792_e, this.field_145789_f); - this.inData = this.worldObj.getBlockMetadata(this.field_145791_d, this.field_145792_e, this.field_145789_f); - this.motionX = ((float)(movingobjectposition.hitVec.xCoord - this.posX)); - this.motionY = ((float)(movingobjectposition.hitVec.yCoord - this.posY)); - this.motionZ = ((float)(movingobjectposition.hitVec.zCoord - this.posZ)); - f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ); - this.posX -= this.motionX / f2 * 0.05000000074505806D; - this.posY -= this.motionY / f2 * 0.05000000074505806D; - this.posZ -= this.motionZ / f2 * 0.05000000074505806D; - this.inGround = true; - this.arrowShake = 7; - this.setIsCritical(false); - - if (this.field_145790_g.getMaterial() != Material.air) - { - this.field_145790_g.onEntityCollidedWithBlock(this.worldObj, this.field_145791_d, this.field_145792_e, this.field_145789_f, this); - } - } - } - - this.posX += this.motionX; - this.posY += this.motionY; - this.posZ += this.motionZ; - f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ); - this.rotationYaw = (float)(Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI); - - f1 = 0.05F; - - if (this.isInWater()) - { - int j = 3; - ExplosionThermo.freeze(this.worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, j); - ExplosionThermo.snow(this.worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, j); - this.setDead(); - } - - if (this.isWet()) - { - this.damage *= 0.8F; - } - - float f3 = 0.8F; - this.motionX *= f3; - this.motionY *= f3; - this.motionZ *= f3; - this.motionY -= gravity; - this.setPosition(this.posX, this.posY, this.posZ); - this.func_145775_I(); - } - - if (this.ticksExisted > this.maxAge) - this.setDead(); - } - - /** - * (abstract) Protected helper method to write subclass entity data to NBT. - */ - @Override - public void writeEntityToNBT(NBTTagCompound p_70014_1_) - { - p_70014_1_.setShort("xTile", (short)this.field_145791_d); - p_70014_1_.setShort("yTile", (short)this.field_145792_e); - p_70014_1_.setShort("zTile", (short)this.field_145789_f); - p_70014_1_.setShort("life", (short)this.ticksInGround); - p_70014_1_.setByte("inTile", (byte)Block.getIdFromBlock(this.field_145790_g)); - p_70014_1_.setByte("inData", (byte)this.inData); - p_70014_1_.setByte("shake", (byte)this.arrowShake); - p_70014_1_.setByte("inGround", (byte)(this.inGround ? 1 : 0)); - p_70014_1_.setByte("pickup", (byte)this.canBePickedUp); - p_70014_1_.setDouble("damage", this.damage); - } - - /** - * (abstract) Protected helper method to read subclass entity data from NBT. - */ - @Override - public void readEntityFromNBT(NBTTagCompound p_70037_1_) - { - this.field_145791_d = p_70037_1_.getShort("xTile"); - this.field_145792_e = p_70037_1_.getShort("yTile"); - this.field_145789_f = p_70037_1_.getShort("zTile"); - this.ticksInGround = p_70037_1_.getShort("life"); - this.field_145790_g = Block.getBlockById(p_70037_1_.getByte("inTile") & 255); - this.inData = p_70037_1_.getByte("inData") & 255; - this.arrowShake = p_70037_1_.getByte("shake") & 255; - this.inGround = p_70037_1_.getByte("inGround") == 1; - - if (p_70037_1_.hasKey("damage", 99)) - { - this.damage = p_70037_1_.getDouble("damage"); - } - - if (p_70037_1_.hasKey("pickup", 99)) - { - this.canBePickedUp = p_70037_1_.getByte("pickup"); - } - else if (p_70037_1_.hasKey("player", 99)) - { - this.canBePickedUp = p_70037_1_.getBoolean("player") ? 1 : 0; - } - } - - /** - * Called by a player entity when they collide with an entity - */ - @Override - public void onCollideWithPlayer(EntityPlayer p_70100_1_) - { - if (!this.worldObj.isRemote && this.inGround && this.arrowShake <= 0) - { - boolean flag = this.canBePickedUp == 1 || this.canBePickedUp == 2 && p_70100_1_.capabilities.isCreativeMode; - - if (flag) - { - p_70100_1_.onItemPickup(this, 1); - this.setDead(); - } - } - } - - /** - * returns if this entity triggers Block.onEntityWalking on the blocks they walk on. used for spiders and wolves to - * prevent them from trampling crops - */ - @Override - protected boolean canTriggerWalking() - { - return false; - } - - @Override - @SideOnly(Side.CLIENT) - public float getShadowSize() - { - return 0.0F; - } - - public void setDamage(double p_70239_1_) - { - this.damage = p_70239_1_; - } - - public double getDamage() - { - return this.damage; - } - - /** - * Sets the amount of knockback the arrow applies when it hits a mob. - */ - public void setKnockbackStrength(int p_70240_1_) - { - this.knockbackStrength = p_70240_1_; - } - - /** - * If returns false, the item will not inflict any damage against entities. - */ - @Override - public boolean canAttackWithItem() - { - return false; - } - - /** - * Whether the arrow has a stream of critical hit particles flying behind it. - */ - public void setIsCritical(boolean p_70243_1_) - { - byte b0 = this.dataWatcher.getWatchableObjectByte(16); - - if (p_70243_1_) - { - this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 | 1))); - } - else - { - this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 & -2))); - } - } - - /** - * Whether the arrow has a stream of critical hit particles flying behind it. - */ - public boolean getIsCritical() - { - byte b0 = this.dataWatcher.getWatchableObjectByte(16); - return (b0 & 1) != 0; - } - - @Override - @SideOnly(Side.CLIENT) - public int getBrightnessForRender(float p_70070_1_) - { - return 15728880; - } - - @Override - public float getBrightness(float p_70013_1_) - { - return 1.0F; - } -} diff --git a/src/main/java/com/hbm/handler/BulletConfigSyncingUtil.java b/src/main/java/com/hbm/handler/BulletConfigSyncingUtil.java index d5e3a24d8c..f3401ff0b0 100644 --- a/src/main/java/com/hbm/handler/BulletConfigSyncingUtil.java +++ b/src/main/java/com/hbm/handler/BulletConfigSyncingUtil.java @@ -4,8 +4,6 @@ import java.util.Map.Entry; import com.hbm.handler.guncfg.*; -import com.hbm.items.ItemAmmoEnums.*; -import com.hbm.items.ModItems; public class BulletConfigSyncingUtil { @@ -13,163 +11,7 @@ public class BulletConfigSyncingUtil { static int i = 0; - /// duplicate ids will cause wrong configs to be loaded /// public static int TEST_CONFIG = i++; - public static int IRON_REVOLVER = i++; - public static int STEEL_REVOLVER = i++; - public static int LEAD_REVOLVER = i++; - public static int GOLD_REVOLVER = i++; - public static int CURSED_REVOLVER = i++; - public static int SCHRABIDIUM_REVOLVER = i++; - public static int NIGHT_REVOLVER = i++; - public static int NIGHT2_REVOLVER = i++; - public static int SATURNITE_REVOLVER = i++; - public static int DESH_REVOLVER = i++; - - public static int IRON_HS = i++; - public static int STEEL_HS = i++; - public static int GOLD_HS = i++; - public static int LEAD_HS = i++; - public static int DESH_HS = i++; - - public static int G20_NORMAL = i++; - public static int G20_SLUG = i++; - public static int G20_FLECHETTE = i++; - public static int G20_FIRE = i++; - public static int G20_SHRAPNEL = i++; - public static int G20_EXPLOSIVE = i++; - public static int G20_CAUSTIC = i++; - public static int G20_SHOCK = i++; - public static int G20_WITHER = i++; - public static int G20_SLEEK = i++; - - public static int ROCKET_NORMAL = i++; - public static int ROCKET_HE = i++; - public static int ROCKET_INCENDIARY = i++; - public static int ROCKET_SHRAPNEL = i++; - public static int ROCKET_EMP = i++; - public static int ROCKET_GLARE = i++; - public static int ROCKET_SLEEK = i++; - public static int ROCKET_NUKE = i++; - public static int ROCKET_CHAINSAW = i++; - public static int ROCKET_TOXIC = i++; - public static int ROCKET_PHOSPHORUS = i++; - public static int ROCKET_CANISTER = i++; - public static int ROCKET_ERROR = i++; - - public static int GRENADE_NORMAL = i++; - public static int GRENADE_HE = i++; - public static int GRENADE_INCENDIARY = i++; - public static int GRENADE_CHEMICAL = i++; - public static int GRENADE_SLEEK = i++; - public static int GRENADE_CONCUSSION = i++; - public static int GRENADE_FINNED = i++; - public static int GRENADE_NUCLEAR = i++; - public static int GRENADE_PHOSPHORUS = i++; - public static int GRENADE_TRACER = i++; - public static int GRENADE_KAMPF = i++; - public static int GRENADE_LEADBURSTER = i++; - - public static int G12_NORMAL = i++; - public static int G12_INCENDIARY = i++; - public static int G12_SHRAPNEL = i++; - public static int G12_DU = i++; - public static int G12_AM = i++; - public static int G12_SLEEK = i++; - public static int G12_PERCUSSION = i++; - - public static int G12HS_NORMAL = i++; - public static int G12HS_INCENDIARY = i++; - public static int G12HS_SHRAPNEL = i++; - public static int G12HS_DU = i++; - public static int G12HS_AM = i++; - public static int G12HS_SLEEK = i++; - public static int G12HS_PERCUSSION = i++; - - public static int LR22_NORMAL = i++; - public static int LR22_AP = i++; - public static int LR22_NORMAL_FIRE = i++; - public static int LR22_AP_FIRE = i++; - - public static int M44_NORMAL = i++; - public static int M44_AP = i++; - public static int M44_DU = i++; - public static int M44_STAR = i++; - public static int M44_PIP = i++; - public static int M44_BJ = i++; - public static int M44_SILVER = i++; - public static int M44_ROCKET = i++; - public static int M44_PHOSPHORUS = i++; - - public static int P9_NORMAL = i++; - public static int P9_AP = i++; - public static int P9_DU = i++; - public static int P9_ROCKET = i++; - - public static int ACP_45 = i++; - public static int ACP_45_AP = i++; - public static int ACP_45_DU = i++; - - public static int BMG50_NORMAL = i++; - public static int BMG50_INCENDIARY = i++; - public static int BMG50_EXPLOSIVE = i++; - public static int BMG50_AP = i++; - public static int BMG50_DU = i++; - public static int BMG50_STAR = i++; - public static int BMG50_PHOSPHORUS = i++; - public static int BMG50_SLEEK = i++; - public static int BMG50_FLECHETTE_NORMAL = i++; - public static int BMG50_FLECHETTE_AM = i++; - public static int BMG50_FLECHETTE_PO = i++; - - public static int ROUND_LUNA_SNIPER_SABOT = i++; - public static int ROUND_LUNA_SNIPER_INCENDIARY = i++; - public static int ROUND_LUNA_SNIPER_EXPLOSIVE = i++; - - public static int R5_NORMAL = i++; - public static int R5_EXPLOSIVE = i++; - public static int R5_DU = i++; - public static int R5_STAR = i++; - public static int R5_NORMAL_BOLT = i++; - public static int R5_EXPLOSIVE_BOLT = i++; - public static int R5_DU_BOLT = i++; - public static int R5_STAR_BOLT = i++; - - public static int AE50_NORMAL = i++; - public static int AE50_AP = i++; - public static int AE50_DU = i++; - public static int AE50_STAR = i++; - - public static int G4_NORMAL = i++; - public static int G4_SLUG = i++; - public static int G4_FLECHETTE = i++; - public static int G4_FLECHETTE_PHOSPHORUS = i++; - public static int G4_EXPLOSIVE = i++; - public static int G4_SEMTEX = i++; - public static int G4_BALEFIRE = i++; - public static int G4_KAMPF = i++; - public static int G4_CANISTER = i++; - 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++; - public static int SPECIAL_OSIPR_CHARGED = i++; - public static int SPECIAL_GAUSS = i++; - public static int SPECIAL_GAUSS_CHARGED = i++; - public static int SPECIAL_EMP = i++; - - public static int COIL_NORMAL = i++; - public static int COIL_DU = i++; - public static int COIL_RUBBER = i++; - - public static int FLAMER_NORMAL = i++; - public static int FLAMER_NAPALM = i++; - public static int FLAMER_WP = i++; - public static int FLAMER_VAPORIZER = i++; - public static int FLAMER_GAS = i++; public static int CRYO_NORMAL = i++; @@ -177,113 +19,7 @@ public class BulletConfigSyncingUtil { public static int FEXT_FOAM = i++; public static int FEXT_SAND = i++; - public static int R556_NORMAL = i++; - public static int R556_GOLD = i++; - public static int R556_PHOSPHORUS = i++; - public static int R556_AP = i++; - public static int R556_DU = i++; - public static int R556_STAR = i++; - public static int R556_SLEEK = i++; - public static int R556_TRACER = i++; - public static int R556_FLECHETTE = i++; - public static int R556_FLECHETTE_INCENDIARY = i++; - public static int R556_FLECHETTE_PHOSPHORUS = i++; - public static int R556_FLECHETTE_DU = i++; - public static int R556_FLECHETTE_SLEEK = i++; - public static int R556_K = i++; - - public static int R762_NORMAL = i++; - public static int R762_PHOSPHORUS = i++; - public static int R762_AP = i++; - public static int R762_DU = i++; - public static int R762_TRACER = i++; - public static int R762_K = i++; - - public static int B75_NORMAL = i++; - public static int B75_INCENDIARY = i++; - public static int B75_HE = i++; - - public static int NEEDLE_GPS = i++; - public static int NEEDLE_NUKE = i++; - public static int DART_NORMAL = i++; - - public static int G20_NORMAL_FIRE = i++; - public static int G20_SHRAPNEL_FIRE = i++; - public static int G20_SLUG_FIRE = i++; - public static int G20_FLECHETTE_FIRE = i++; - public static int G20_EXPLOSIVE_FIRE = i++; - public static int G20_CAUSTIC_FIRE = i++; - public static int G20_SHOCK_FIRE = i++; - public static int G20_WITHER_FIRE = i++; - - public static int ROCKET_NORMAL_LASER = i++; - public static int ROCKET_HE_LASER = i++; - public static int ROCKET_INCENDIARY_LASER = i++; - public static int ROCKET_SHRAPNEL_LASER = i++; - public static int ROCKET_EMP_LASER = i++; - public static int ROCKET_GLARE_LASER = i++; - public static int ROCKET_SLEEK_LASER = i++; - public static int ROCKET_NUKE_LASER = i++; - public static int ROCKET_CHAINSAW_LASER = i++; - public static int ROCKET_TOXIC_LASER = i++; - public static int ROCKET_PHOSPHORUS_LASER = i++; - - public static int SHELL_NORMAL = i++; - public static int SHELL_EXPLOSIVE = i++; - public static int SHELL_AP = i++; - public static int SHELL_DU = i++; - public static int SHELL_W9 = i++; - public static int DGK_NORMAL = i++; - public static int FLA_NORMAL = i++; - - public static int NUKE_NORMAL = i++; - public static int NUKE_LOW = i++; - public static int NUKE_HIGH = i++; - 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++; - public static int NUKE_PROTO_TOTS = i++; - public static int NUKE_PROTO_SAFE = i++; - public static int NUKE_PROTO_PUMPKIN = i++; - public static int NUKE_MIRV_NORMAL = i++; - public static int NUKE_MIRV_LOW = i++; - public static int NUKE_MIRV_HIGH = i++; - public static int NUKE_MIRV_SAFE = i++; - public static int NUKE_MIRV_SPECIAL = i++; - - public static int NUKE_AMAT = i++; - - public static int TWR_RAY = i++; - public static int HLR_NORMAL = i++; - public static int HLR_ALT = i++; - - public static int ZOMG_BOLT = i++; - public static int DET_BOLT = i++; - public static int TURBINE = i++; - - public static int GLASS_EMRADIO = i++; - public static int GLASS_EMMICRO = i++; - public static int GLASS_EMIR = i++; - public static int GLASS_EMVISIBLE = i++; - public static int GLASS_EMUV = i++; - public static int GLASS_EMXRAY = i++; - public static int GLASS_EMGAMMA = i++; - - public static int CHL_LR22 = i++; - public static int CHL_LR22_FIRE = i++; - public static int CHL_M44 = i++; - public static int CHL_P9 = i++; - public static int CHL_BMG50 = i++; - public static int CHL_R5 = i++; - public static int CHL_R5_BOLT = i++; - public static int CHL_AE50 = i++; - public static int CHL_R556 = i++; - public static int CHL_R556_FLECHETTE = i++; public static int MASKMAN_BULLET = i++; public static int MASKMAN_ORB = i++; @@ -299,277 +35,13 @@ public class BulletConfigSyncingUtil { public static void loadConfigsForSync() { - configSet.put(TEST_CONFIG, BulletConfigFactory.getTestConfig()); - - configSet.put(IRON_REVOLVER, Gun357MagnumFactory.getRevIronConfig()); - configSet.put(STEEL_REVOLVER, Gun357MagnumFactory.getRevLeadConfig()); - configSet.put(LEAD_REVOLVER, Gun357MagnumFactory.getRevNuclearConfig()); - configSet.put(GOLD_REVOLVER, Gun357MagnumFactory.getRevGoldConfig()); - configSet.put(CURSED_REVOLVER, Gun357MagnumFactory.getRevCursedConfig()); - configSet.put(SCHRABIDIUM_REVOLVER, Gun357MagnumFactory.getRevSchrabidiumConfig()); - configSet.put(NIGHT_REVOLVER, Gun357MagnumFactory.getRevNightmare1Config()); - configSet.put(NIGHT2_REVOLVER, Gun357MagnumFactory.getRevNightmare2Config()); - configSet.put(SATURNITE_REVOLVER, Gun357MagnumFactory.getRevLeadConfig().setToFire(3)); - configSet.put(DESH_REVOLVER, Gun357MagnumFactory.getRevDeshConfig()); - - configSet.put(IRON_HS, Gun357MagnumFactory.getRevIronConfig().setHeadshot(3F)); - configSet.put(STEEL_HS, Gun357MagnumFactory.getRevCursedConfig().setHeadshot(3F)); - configSet.put(GOLD_HS, Gun357MagnumFactory.getRevGoldConfig().setHeadshot(3F)); - configSet.put(LEAD_HS, Gun357MagnumFactory.getRevLeadConfig().setHeadshot(3F)); - configSet.put(DESH_HS, Gun357MagnumFactory.getRevDeshConfig().setHeadshot(3F)); - - configSet.put(G20_NORMAL, Gun20GaugeFactory.get20GaugeConfig()); - configSet.put(G20_SLUG, Gun20GaugeFactory.get20GaugeSlugConfig()); - configSet.put(G20_FLECHETTE, Gun20GaugeFactory.get20GaugeFlechetteConfig()); - configSet.put(G20_FIRE, Gun20GaugeFactory.get20GaugeFireConfig()); - configSet.put(G20_SHRAPNEL, Gun20GaugeFactory.get20GaugeShrapnelConfig()); - configSet.put(G20_EXPLOSIVE, Gun20GaugeFactory.get20GaugeExplosiveConfig()); - configSet.put(G20_CAUSTIC, Gun20GaugeFactory.get20GaugeCausticConfig()); - configSet.put(G20_SHOCK, Gun20GaugeFactory.get20GaugeShockConfig()); - configSet.put(G20_WITHER, Gun20GaugeFactory.get20GaugeWitherConfig()); - configSet.put(G20_SLEEK, Gun20GaugeFactory.get20GaugeSleekConfig()); - - configSet.put(ROCKET_NORMAL, GunRocketFactory.getRocketConfig()); - configSet.put(ROCKET_HE, GunRocketFactory.getRocketHEConfig()); - configSet.put(ROCKET_INCENDIARY, GunRocketFactory.getRocketIncendiaryConfig()); - configSet.put(ROCKET_PHOSPHORUS, GunRocketFactory.getRocketPhosphorusConfig()); - configSet.put(ROCKET_SHRAPNEL, GunRocketFactory.getRocketShrapnelConfig()); - configSet.put(ROCKET_EMP, GunRocketFactory.getRocketEMPConfig()); - configSet.put(ROCKET_GLARE, GunRocketFactory.getRocketGlareConfig()); - configSet.put(ROCKET_SLEEK, GunRocketFactory.getRocketSleekConfig()); - configSet.put(ROCKET_NUKE, GunRocketFactory.getRocketNukeConfig()); - configSet.put(ROCKET_CHAINSAW, GunRocketFactory.getRocketRPCConfig()); - configSet.put(ROCKET_TOXIC, GunRocketFactory.getRocketChlorineConfig()); - configSet.put(ROCKET_CANISTER, GunRocketFactory.getRocketCanisterConfig()); - configSet.put(ROCKET_ERROR, GunRocketFactory.getRocketErrorConfig()); - - configSet.put(GRENADE_NORMAL, GunGrenadeFactory.getGrenadeConfig()); - configSet.put(GRENADE_HE, GunGrenadeFactory.getGrenadeHEConfig()); - configSet.put(GRENADE_INCENDIARY, GunGrenadeFactory.getGrenadeIncendirayConfig()); - configSet.put(GRENADE_PHOSPHORUS, GunGrenadeFactory.getGrenadePhosphorusConfig()); - configSet.put(GRENADE_CHEMICAL, GunGrenadeFactory.getGrenadeChlorineConfig()); - configSet.put(GRENADE_SLEEK, GunGrenadeFactory.getGrenadeSleekConfig()); - configSet.put(GRENADE_CONCUSSION, GunGrenadeFactory.getGrenadeConcussionConfig()); - configSet.put(GRENADE_FINNED, GunGrenadeFactory.getGrenadeFinnedConfig()); - configSet.put(GRENADE_NUCLEAR, GunGrenadeFactory.getGrenadeNuclearConfig()); - configSet.put(GRENADE_TRACER, GunGrenadeFactory.getGrenadeTracerConfig()); - configSet.put(GRENADE_KAMPF, GunGrenadeFactory.getGrenadeKampfConfig()); - configSet.put(GRENADE_LEADBURSTER, GunGrenadeFactory.getGrenadeLeadbursterConfig()); - - configSet.put(G12_NORMAL, Gun12GaugeFactory.get12GaugeConfig()); - configSet.put(G12_INCENDIARY, Gun12GaugeFactory.get12GaugeFireConfig()); - configSet.put(G12_SHRAPNEL, Gun12GaugeFactory.get12GaugeShrapnelConfig()); - configSet.put(G12_DU, Gun12GaugeFactory.get12GaugeDUConfig()); - configSet.put(G12_AM, Gun12GaugeFactory.get12GaugeAMConfig()); - configSet.put(G12_SLEEK, Gun12GaugeFactory.get12GaugeSleekConfig()); - configSet.put(G12_PERCUSSION, Gun12GaugeFactory.get12GaugePercussionConfig()); - configSet.put(G12HS_NORMAL, Gun12GaugeFactory.get12GaugeConfig().setHeadshot(2F)); - configSet.put(G12HS_INCENDIARY, Gun12GaugeFactory.get12GaugeFireConfig().setHeadshot(2F)); - configSet.put(G12HS_SHRAPNEL, Gun12GaugeFactory.get12GaugeShrapnelConfig().setHeadshot(2F)); - configSet.put(G12HS_DU, Gun12GaugeFactory.get12GaugeDUConfig().setHeadshot(2F)); - configSet.put(G12HS_AM, Gun12GaugeFactory.get12GaugeAMConfig().setHeadshot(2F)); - configSet.put(G12HS_SLEEK, Gun12GaugeFactory.get12GaugeSleekConfig().setHeadshot(2F)); - configSet.put(G12HS_PERCUSSION, Gun12GaugeFactory.get12GaugePercussionConfig().setHeadshot(2F)); - - configSet.put(LR22_NORMAL, Gun22LRFactory.get22LRConfig()); - configSet.put(LR22_AP, Gun22LRFactory.get22LRAPConfig()); - configSet.put(LR22_NORMAL_FIRE, Gun22LRFactory.get22LRConfig().setToFire(3)); - configSet.put(LR22_AP_FIRE, Gun22LRFactory.get22LRAPConfig().setToFire(3)); - - configSet.put(M44_NORMAL, Gun44MagnumFactory.getNoPipConfig()); - configSet.put(M44_AP, Gun44MagnumFactory.getNoPipAPConfig()); - configSet.put(M44_DU, Gun44MagnumFactory.getNoPipDUConfig()); - configSet.put(M44_PHOSPHORUS, Gun44MagnumFactory.getPhosphorusConfig()); - configSet.put(M44_STAR, Gun44MagnumFactory.getNoPipStarConfig()); - configSet.put(M44_PIP, Gun44MagnumFactory.getPipConfig()); - configSet.put(M44_BJ, Gun44MagnumFactory.getBJConfig()); - configSet.put(M44_SILVER, Gun44MagnumFactory.getSilverStormConfig()); - configSet.put(M44_ROCKET, Gun44MagnumFactory.getRocketConfig()); - - configSet.put(P9_NORMAL, Gun9mmFactory.get9mmConfig()); - configSet.put(P9_AP, Gun9mmFactory.get9mmAPConfig()); - configSet.put(P9_DU, Gun9mmFactory.get9mmDUConfig()); - configSet.put(P9_ROCKET, Gun9mmFactory.get9mmRocketConfig()); - - configSet.put(ACP_45, Gun45ACPFactory.get45AutoConfig()); - configSet.put(ACP_45_AP, Gun45ACPFactory.get45AutoAPConfig()); - configSet.put(ACP_45_DU, Gun45ACPFactory.get45AutoDUConfig()); - - configSet.put(BMG50_NORMAL, Gun50BMGFactory.get50BMGConfig()); - configSet.put(BMG50_INCENDIARY, Gun50BMGFactory.get50BMGFireConfig()); - configSet.put(BMG50_PHOSPHORUS, Gun50BMGFactory.get50BMGPhosphorusConfig()); - configSet.put(BMG50_EXPLOSIVE, Gun50BMGFactory.get50BMGExplosiveConfig()); - configSet.put(BMG50_AP, Gun50BMGFactory.get50BMGAPConfig()); - configSet.put(BMG50_DU, Gun50BMGFactory.get50BMGDUConfig()); - configSet.put(BMG50_STAR, Gun50BMGFactory.get50BMGStarConfig()); - configSet.put(BMG50_SLEEK, Gun50BMGFactory.get50BMGSleekConfig()); - configSet.put(BMG50_FLECHETTE_NORMAL, Gun50BMGFactory.get50BMGFlechetteConfig()); - configSet.put(BMG50_FLECHETTE_AM, Gun50BMGFactory.get50BMGFlechetteAMConfig()); - configSet.put(BMG50_FLECHETTE_PO, Gun50BMGFactory.get50BMGFlechettePOConfig()); - - configSet.put(ROUND_LUNA_SNIPER_SABOT, Gun50BMGFactory.getLunaticSabotRound()); - configSet.put(ROUND_LUNA_SNIPER_INCENDIARY, Gun50BMGFactory.getLunaticIncendiaryRound()); - configSet.put(ROUND_LUNA_SNIPER_EXPLOSIVE, Gun50BMGFactory.getLunaticExplosiveRound()); - - configSet.put(R5_NORMAL, Gun5mmFactory.get5mmConfig()); - configSet.put(R5_EXPLOSIVE, Gun5mmFactory.get5mmExplosiveConfig()); - configSet.put(R5_DU, Gun5mmFactory.get5mmDUConfig()); - configSet.put(R5_STAR, Gun5mmFactory.get5mmStarConfig()); - configSet.put(R5_NORMAL_BOLT, Gun5mmFactory.get5mmConfig().setToBolt(BulletConfiguration.BOLT_LACUNAE)); - configSet.put(R5_EXPLOSIVE_BOLT, Gun5mmFactory.get5mmExplosiveConfig().setToBolt(BulletConfiguration.BOLT_LACUNAE)); - configSet.put(R5_DU_BOLT, Gun5mmFactory.get5mmDUConfig().setToBolt(BulletConfiguration.BOLT_LACUNAE)); - configSet.put(R5_STAR_BOLT, Gun5mmFactory.get5mmStarConfig().setToBolt(BulletConfiguration.BOLT_LACUNAE)); - - configSet.put(AE50_NORMAL, Gun50AEFactory.get50AEConfig()); - configSet.put(AE50_AP, Gun50AEFactory.get50APConfig()); - configSet.put(AE50_DU, Gun50AEFactory.get50DUConfig()); - configSet.put(AE50_STAR, Gun50AEFactory.get50StarConfig()); - - configSet.put(G4_NORMAL, Gun4GaugeFactory.get4GaugeConfig()); - configSet.put(G4_SLUG, Gun4GaugeFactory.get4GaugeSlugConfig()); - configSet.put(G4_FLECHETTE, Gun4GaugeFactory.get4GaugeFlechetteConfig()); - configSet.put(G4_FLECHETTE_PHOSPHORUS, Gun4GaugeFactory.get4GaugeFlechettePhosphorusConfig()); - configSet.put(G4_EXPLOSIVE, Gun4GaugeFactory.get4GaugeExplosiveConfig()); - configSet.put(G4_SEMTEX, Gun4GaugeFactory.get4GaugeMiningConfig()); - configSet.put(G4_BALEFIRE, Gun4GaugeFactory.get4GaugeBalefireConfig()); - configSet.put(G4_KAMPF, Gun4GaugeFactory.getGrenadeKampfConfig()); - configSet.put(G4_CANISTER, Gun4GaugeFactory.getGrenadeCanisterConfig()); - 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()); - configSet.put(SPECIAL_OSIPR_CHARGED, GunOSIPRFactory.getPulseChargedConfig()); - configSet.put(SPECIAL_GAUSS, GunGaussFactory.getGaussConfig()); - configSet.put(SPECIAL_GAUSS_CHARGED, GunGaussFactory.getAltConfig()); - configSet.put(SPECIAL_EMP, GunEnergyFactory.getOrbusConfig()); - - configSet.put(COIL_NORMAL, GunEnergyFactory.getCoilConfig()); - configSet.put(COIL_DU, GunEnergyFactory.getCoilDUConfig()); - configSet.put(COIL_RUBBER, GunEnergyFactory.getCoilRubberConfig()); - - configSet.put(FLAMER_NORMAL, GunEnergyFactory.getFlameConfig()); - configSet.put(FLAMER_NAPALM, GunEnergyFactory.getNapalmConfig()); - configSet.put(FLAMER_WP, GunEnergyFactory.getPhosphorusConfig()); - configSet.put(FLAMER_VAPORIZER, GunEnergyFactory.getVaporizerConfig()); - configSet.put(FLAMER_GAS, GunEnergyFactory.getGasConfig()); - configSet.put(CRYO_NORMAL, GunEnergyFactory.getCryoConfig()); configSet.put(FEXT_NORMAL, GunEnergyFactory.getFextConfig()); configSet.put(FEXT_FOAM, GunEnergyFactory.getFextFoamConfig()); configSet.put(FEXT_SAND, GunEnergyFactory.getFextSandConfig()); - configSet.put(R556_NORMAL, Gun556mmFactory.get556Config()); - configSet.put(R556_GOLD, Gun556mmFactory.get556GoldConfig()); - configSet.put(R556_PHOSPHORUS, Gun556mmFactory.get556PhosphorusConfig()); - configSet.put(R556_AP, Gun556mmFactory.get556APConfig()); - configSet.put(R556_DU, Gun556mmFactory.get556DUConfig()); - configSet.put(R556_STAR, Gun556mmFactory.get556StarConfig()); - configSet.put(R556_SLEEK, Gun556mmFactory.get556SleekConfig()); - configSet.put(R556_TRACER, Gun556mmFactory.get556TracerConfig()); - configSet.put(R556_FLECHETTE, Gun556mmFactory.get556FlechetteConfig()); - configSet.put(R556_FLECHETTE_INCENDIARY, Gun556mmFactory.get556FlechetteIncendiaryConfig()); - configSet.put(R556_FLECHETTE_PHOSPHORUS, Gun556mmFactory.get556FlechettePhosphorusConfig()); - configSet.put(R556_FLECHETTE_DU, Gun556mmFactory.get556FlechetteDUConfig()); - configSet.put(R556_FLECHETTE_SLEEK, Gun556mmFactory.get556FlechetteSleekConfig()); - configSet.put(R556_K, Gun556mmFactory.get556KConfig()); - - configSet.put(R762_NORMAL, Gun762mmFactory.get762NATOConfig()); - configSet.put(R762_PHOSPHORUS, Gun762mmFactory.get762WPConfig()); - configSet.put(R762_AP, Gun762mmFactory.get762APConfig()); - configSet.put(R762_DU, Gun762mmFactory.get762DUConfig()); - configSet.put(R762_TRACER, Gun762mmFactory.get762TracerConfig()); - configSet.put(R762_K, Gun762mmFactory.get762BlankConfig()); - - configSet.put(B75_NORMAL, Gun75BoltFactory.get75BoltConfig()); - configSet.put(B75_INCENDIARY, Gun75BoltFactory.get75BoltIncConfig()); - configSet.put(B75_HE, Gun75BoltFactory.get75BoltHEConfig()); - - configSet.put(NEEDLE_GPS, GunDartFactory.getGPSConfig()); - configSet.put(NEEDLE_NUKE, GunDartFactory.getNukeConfig()); - configSet.put(DART_NORMAL, GunDartFactory.getNERFConfig()); - - configSet.put(G20_NORMAL_FIRE, Gun20GaugeFactory.get20GaugeConfig().setToFire(3)); - configSet.put(G20_SHRAPNEL_FIRE, Gun20GaugeFactory.get20GaugeShrapnelConfig().setToFire(3)); - configSet.put(G20_SLUG_FIRE, Gun20GaugeFactory.get20GaugeSlugConfig().setToFire(3)); - configSet.put(G20_FLECHETTE_FIRE, Gun20GaugeFactory.get20GaugeFlechetteConfig().setToFire(3)); - configSet.put(G20_EXPLOSIVE_FIRE, Gun20GaugeFactory.get20GaugeExplosiveConfig().setToFire(3)); - configSet.put(G20_CAUSTIC_FIRE, Gun20GaugeFactory.get20GaugeCausticConfig().setToFire(3)); - configSet.put(G20_SHOCK_FIRE, Gun20GaugeFactory.get20GaugeShockConfig().setToFire(3)); - configSet.put(G20_WITHER_FIRE, Gun20GaugeFactory.get20GaugeWitherConfig().setToFire(3)); - - configSet.put(ROCKET_NORMAL_LASER, GunRocketFactory.getRocketConfig().setToGuided()); - configSet.put(ROCKET_HE_LASER, GunRocketFactory.getRocketHEConfig().setToGuided()); - configSet.put(ROCKET_INCENDIARY_LASER, GunRocketFactory.getRocketIncendiaryConfig().setToGuided()); - configSet.put(ROCKET_PHOSPHORUS_LASER, GunRocketFactory.getRocketPhosphorusConfig().setToGuided()); - configSet.put(ROCKET_SHRAPNEL_LASER, GunRocketFactory.getRocketShrapnelConfig().setToGuided()); - configSet.put(ROCKET_EMP_LASER, GunRocketFactory.getRocketEMPConfig().setToGuided()); - configSet.put(ROCKET_GLARE_LASER, GunRocketFactory.getRocketGlareConfig().setToGuided()); - configSet.put(ROCKET_SLEEK_LASER, GunRocketFactory.getRocketSleekConfig().setToGuided()); - configSet.put(ROCKET_NUKE_LASER, GunRocketFactory.getRocketNukeConfig().setToGuided()); - configSet.put(ROCKET_CHAINSAW_LASER, GunRocketFactory.getRocketRPCConfig().setToGuided()); - configSet.put(ROCKET_TOXIC_LASER, GunRocketFactory.getRocketChlorineConfig().setToGuided()); - - configSet.put(SHELL_NORMAL, GunCannonFactory.getShellConfig()); - configSet.put(SHELL_EXPLOSIVE, GunCannonFactory.getShellExplosiveConfig()); - configSet.put(SHELL_AP, GunCannonFactory.getShellAPConfig()); - configSet.put(SHELL_DU, GunCannonFactory.getShellDUConfig()); - configSet.put(SHELL_W9, GunCannonFactory.getShellW9Config()); - configSet.put(DGK_NORMAL, GunDGKFactory.getDGKConfig()); - configSet.put(FLA_NORMAL, GunEnergyFactory.getTurretConfig()); - - configSet.put(NUKE_NORMAL, GunFatmanFactory.getNukeConfig()); - configSet.put(NUKE_LOW, GunFatmanFactory.getNukeLowConfig()); - configSet.put(NUKE_HIGH, GunFatmanFactory.getNukeHighConfig()); - 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)); - configSet.put(NUKE_PROTO_TOTS, GunFatmanFactory.getNukeTotsConfig().accuracyMod(20F)); - configSet.put(NUKE_PROTO_SAFE, GunFatmanFactory.getNukeSafeConfig().accuracyMod(20F)); - configSet.put(NUKE_PROTO_PUMPKIN, GunFatmanFactory.getNukePumpkinConfig().accuracyMod(20F)); - configSet.put(NUKE_MIRV_NORMAL, GunFatmanFactory.getMirvConfig()); - configSet.put(NUKE_MIRV_LOW, GunFatmanFactory.getMirvLowConfig()); - configSet.put(NUKE_MIRV_HIGH, GunFatmanFactory.getMirvHighConfig()); - configSet.put(NUKE_MIRV_SAFE, GunFatmanFactory.getMirvSafeConfig()); - configSet.put(NUKE_MIRV_SPECIAL, GunFatmanFactory.getMirvSpecialConfig()); - - configSet.put(NUKE_AMAT, GunFatmanFactory.getBalefireConfig()); - - //configSet.put(TWR_RAY, GunEnergyFactory.getSingConfig()); - //configSet.put(HLR_NORMAL, GunEnergyFactory.getHLRPrecisionConfig()); - //configSet.put(HLR_ALT, GunEnergyFactory.getHLRScatterConfig()); - - configSet.put(ZOMG_BOLT, GunEnergyFactory.getZOMGBoltConfig()); - configSet.put(DET_BOLT, GunDetonatorFactory.getLaserConfig()); - configSet.put(TURBINE, GunEnergyFactory.getTurbineConfig()); - - configSet.put(GLASS_EMRADIO, GunPoweredFactory.getEMRadioConfig()); - configSet.put(GLASS_EMMICRO, GunPoweredFactory.getEMMicroConfig()); - configSet.put(GLASS_EMIR, GunPoweredFactory.getEMInfraredConfig()); - configSet.put(GLASS_EMVISIBLE, GunPoweredFactory.getEMVisibleConfig()); - configSet.put(GLASS_EMUV, GunPoweredFactory.getEMUVConfig()); - configSet.put(GLASS_EMXRAY, GunPoweredFactory.getEMXrayConfig()); - configSet.put(GLASS_EMGAMMA, GunPoweredFactory.getEMGammaConfig()); - - - configSet.put(CHL_LR22, Gun22LRFactory.get22LRConfig().setToHoming(ModItems.ammo_22lr.stackFromEnum(Ammo22LR.CHLOROPHYTE))); - configSet.put(CHL_LR22_FIRE, Gun22LRFactory.get22LRConfig().setToFire(3).setToHoming(ModItems.ammo_22lr.stackFromEnum(Ammo22LR.CHLOROPHYTE))); - configSet.put(CHL_M44, Gun44MagnumFactory.getNoPipConfig().setToHoming(ModItems.ammo_44.stackFromEnum(Ammo44Magnum.CHLOROPHYTE))); - configSet.put(CHL_P9, Gun9mmFactory.get9mmConfig().setToHoming(ModItems.ammo_9mm.stackFromEnum(Ammo9mm.CHLOROPHYTE))); - configSet.put(CHL_BMG50, Gun50BMGFactory.get50BMGConfig().setToHoming(ModItems.ammo_50bmg.stackFromEnum(Ammo50BMG.CHLOROPHYTE))); - configSet.put(CHL_R5, Gun5mmFactory.get5mmConfig().setToHoming(ModItems.ammo_5mm.stackFromEnum(Ammo5mm.CHLOROPHYTE))); - configSet.put(CHL_R5_BOLT, Gun5mmFactory.get5mmConfig().setToBolt(BulletConfiguration.BOLT_LACUNAE).setToHoming(ModItems.ammo_5mm.stackFromEnum(Ammo5mm.CHLOROPHYTE))); - configSet.put(CHL_AE50, Gun50AEFactory.get50AEConfig().setToHoming(ModItems.ammo_50ae.stackFromEnum(Ammo50AE.CHLOROPHYTE))); - configSet.put(CHL_R556, Gun556mmFactory.get556Config().setToHoming(ModItems.ammo_556.stackFromEnum(Ammo556mm.CHLOROPHYTE))); - configSet.put(CHL_R556_FLECHETTE, Gun556mmFactory.get556FlechetteConfig().setToHoming(ModItems.ammo_556.stackFromEnum(Ammo556mm.FLECHETTE_CHLOROPHYTE))); configSet.put(MASKMAN_BULLET, GunNPCFactory.getMaskmanBullet()); configSet.put(MASKMAN_ORB, GunNPCFactory.getMaskmanOrb()); diff --git a/src/main/java/com/hbm/handler/guncfg/BulletConfigFactory.java b/src/main/java/com/hbm/handler/guncfg/BulletConfigFactory.java index b355567bf0..b20f474901 100644 --- a/src/main/java/com/hbm/handler/guncfg/BulletConfigFactory.java +++ b/src/main/java/com/hbm/handler/guncfg/BulletConfigFactory.java @@ -1,18 +1,12 @@ package com.hbm.handler.guncfg; import java.util.List; -import java.util.Random; -import com.hbm.entity.particle.EntityBSmokeFX; import com.hbm.entity.projectile.EntityBulletBaseNT; import com.hbm.entity.projectile.EntityBulletBaseNT.*; import com.hbm.explosion.ExplosionNukeSmall; import com.hbm.explosion.ExplosionNukeSmall.MukeParams; -import com.hbm.handler.BulletConfigSyncingUtil; import com.hbm.handler.BulletConfiguration; -import com.hbm.inventory.RecipesCommon.ComparableStack; -import com.hbm.items.ItemAmmoEnums.*; -import com.hbm.items.ModItems; import com.hbm.lib.Library; import com.hbm.packet.PacketDispatcher; import com.hbm.packet.toclient.AuxParticlePacketNT; @@ -34,36 +28,6 @@ public class BulletConfigFactory { - /// configs should never be loaded manually due to syncing issues: use the syncing util and pass the UID in the DW of the bullet to make the client load the config correctly //// - - public static BulletConfiguration getTestConfig() { - - BulletConfiguration bullet = new BulletConfiguration(); - - bullet.ammo = new ComparableStack(ModItems.ammo_357.stackFromEnum(Ammo357Magnum.LEAD)); - bullet.velocity = 5.0F; - bullet.spread = 0.05F; - bullet.wear = 10; - bullet.dmgMin = 15; - bullet.dmgMax = 17; - bullet.bulletsMin = 1; - bullet.bulletsMax = 1; - bullet.gravity = 0D; - bullet.maxAge = 100; - bullet.doesRicochet = true; - bullet.ricochetAngle = 10; - bullet.HBRC = 2; - bullet.LBRC = 90; - bullet.bounceMod = 0.8; - bullet.doesPenetrate = true; - bullet.doesBreakGlass = true; - bullet.style = 0; - bullet.plink = 1; - - return bullet; - - } - public static final float defaultSpread = 0.005F; /// STANDARD CONFIGS /// @@ -125,62 +89,6 @@ public static BulletConfiguration standardBuckshotConfig() { return bullet; } - public static BulletConfiguration standardAirstrikeConfig() { - - BulletConfiguration bullet = new BulletConfiguration(); - - bullet.velocity = 5.0F; - bullet.spread = 0.0F; - bullet.wear = 50; - bullet.bulletsMin = 1; - bullet.bulletsMax = 1; - bullet.gravity = 0D; - bullet.maxAge = 100; - bullet.doesRicochet = false; - bullet.doesPenetrate = false; - bullet.doesBreakGlass = false; - bullet.style = BulletConfiguration.STYLE_BOLT; - bullet.leadChance = 0; - bullet.vPFX = "reddust"; - - bullet.bntImpact = new IBulletImpactBehaviorNT() { - - @Override - public void behaveBlockHit(EntityBulletBaseNT bullet, int x, int y, int z, int sideHit) { - - if(bullet.worldObj.isRemote) - return; - - Random rand = bullet.worldObj.rand; - int count = rand.nextInt(11) + 95; - - for(int i = 0; i < count; i++) { - - double dx = bullet.posX + rand.nextGaussian() * 4; - double dy = bullet.posY + 25 + rand.nextGaussian() * 5; - double dz = bullet.posZ + rand.nextGaussian() * 4; - - Vec3 motion = Vec3.createVectorHelper(bullet.posX - dx, bullet.posY - dy, bullet.posZ - dz); - motion = motion.normalize(); - - EntityBulletBaseNT bolt = new EntityBulletBaseNT(bullet.worldObj, BulletConfigSyncingUtil.R556_FLECHETTE_DU); - bolt.setPosition(dx, dy, dz); - bolt.setThrowableHeading(motion.xCoord, motion.yCoord, motion.zCoord, 0.5F, 0.1F); - bolt.setThrower(bullet.getThrower()); - bullet.worldObj.spawnEntityInWorld(bolt); - - if(i < 30) { - EntityBSmokeFX bsmoke = new EntityBSmokeFX(bullet.worldObj); - bsmoke.setPosition(dx, dy, dz); - bullet.worldObj.spawnEntityInWorld(bsmoke); - } - } - } - }; - - return bullet; - } - public static BulletConfiguration standardRocketConfig() { BulletConfiguration bullet = new BulletConfiguration(); diff --git a/src/main/java/com/hbm/handler/guncfg/Gun12GaugeFactory.java b/src/main/java/com/hbm/handler/guncfg/Gun12GaugeFactory.java deleted file mode 100644 index 9ee46a1941..0000000000 --- a/src/main/java/com/hbm/handler/guncfg/Gun12GaugeFactory.java +++ /dev/null @@ -1,403 +0,0 @@ -package com.hbm.handler.guncfg; - -import java.util.List; - -import com.hbm.handler.BulletConfiguration; -import com.hbm.handler.CasingEjector; -import com.hbm.handler.GunConfiguration; -import com.hbm.inventory.RecipesCommon.ComparableStack; -import com.hbm.items.ItemAmmoEnums.Ammo12Gauge; -import com.hbm.items.ModItems; -import com.hbm.items.weapon.sedna.Crosshair; -import com.hbm.lib.HbmCollection; -import com.hbm.lib.HbmCollection.EnumGunManufacturer; -import com.hbm.main.ResourceManager; -import com.hbm.packet.PacketDispatcher; -import com.hbm.packet.toclient.AuxParticlePacketNT; -import com.hbm.particle.SpentCasing; -import com.hbm.particle.SpentCasing.CasingType; -import com.hbm.potion.HbmPotion; -import com.hbm.render.anim.BusAnimation; -import com.hbm.render.anim.BusAnimationSequence; -import com.hbm.render.anim.HbmAnimations.AnimType; - -import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.potion.PotionEffect; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.DamageSource; -import net.minecraft.util.Vec3; - -public class Gun12GaugeFactory { - - private static final CasingEjector EJECTOR_SPAS, EJECTOR_SPAS_ALT, EJECTOR_BENELLI, EJECTOR_UBOINIK, EJECTOR_SSG; - private static final SpentCasing CASING12GAUGE; - - static { - EJECTOR_SPAS = new CasingEjector().setMotion(-0.4, 0.1, 0).setOffset(-0.35, 0, 0.5).setAngleRange(0.01F, 0.03F).setDelay(12); - EJECTOR_SPAS_ALT = new CasingEjector().setMotion(-0.4, 0.1, 0).setOffset(-0.35, 0, 0.5).setAngleRange(0.01F, 0.03F).setDelay(12).setAmount(2); - EJECTOR_BENELLI = new CasingEjector().setMotion(-0.4, 0.3, 0).setOffset(-0.3, 0, 0.5).setAngleRange(0.01F, 0.03F); - EJECTOR_UBOINIK = new CasingEjector().setMotion(-0.4, 0.1, 0).setOffset(-0.35, -0.3, 0.5).setAngleRange(0.01F, 0.03F); - EJECTOR_SSG = new CasingEjector().setMotion(0.2, 0, -0.2).setOffset(0.8, 0, 0).setAngleRange(0.05F, 0.02F).setDelay(20).setAmount(2); - - CASING12GAUGE = new SpentCasing(CasingType.SHOTGUN).setScale(1.5F).setBounceMotion(0.05F, 0.02F).setupSmoke(0.5F, 0.5D, 60, 20); - } - - public static GunConfiguration getRemington870Config() { - GunConfiguration config = new GunConfiguration(); - - config.rateOfFire = 25; - config.roundsPerCycle = 1; - config.gunMode = GunConfiguration.MODE_NORMAL; - config.firingMode = GunConfiguration.FIRE_MANUAL; - config.reloadDuration = 10; - config.firingDuration = 5; - config.ammoCap = 5; - config.durability = 1000; - config.reloadType = GunConfiguration.RELOAD_SINGLE; - config.allowsInfinity = true; - config.crosshair = Crosshair.CIRCLE; - config.reloadSound = GunConfiguration.RSOUND_SHOTGUN; - config.firingSound = "hbm:weapon.shotgunPump"; - - config.name = "remington870"; - config.manufacturer = EnumGunManufacturer.REMINGTON; - - config.config = HbmCollection.g12hs; - - config.animations.put(AnimType.CYCLE, new BusAnimation() - .addBus("RECOIL_TRANSLATE", new BusAnimationSequence() - .addPos(0, 0, -2, 100) - .addPos(0, 0, 0, 200) - ) - .addBus("PUMP", new BusAnimationSequence() - .addPos(0, 0, 0, 450) - .addPos(0, 0, -1.8, 200) - .addPos(0, 0, 0, 200) - ) - ); - - config.ejector = EJECTOR_SPAS; - return config; - } - - public static GunConfiguration getSpas12Config() { - - GunConfiguration config = new GunConfiguration(); - - config.rateOfFire = 20; - config.roundsPerCycle = 1; - config.gunMode = GunConfiguration.MODE_NORMAL; - config.firingMode = GunConfiguration.FIRE_MANUAL; - config.reloadDuration = 10; - config.emptyReloadAdditionalDuration = 5; - config.firingDuration = 5; - config.ammoCap = 8; - config.durability = 2500; - config.reloadType = GunConfiguration.RELOAD_SINGLE; - config.allowsInfinity = true; - config.crosshair = Crosshair.CIRCLE; - config.reloadSound = GunConfiguration.RSOUND_SHOTGUN; - config.reloadSoundEnd = false; - config.firingSound = "hbm:weapon.shotgunPump"; - - config.name = "spas12"; - config.manufacturer = EnumGunManufacturer.BLACK_MESA; - config.comment.add("\"Here, I have a more suitable gun for you. You'll need it - Catch!\""); - config.comment.add("Alt-fire with Mouse 2 (Right-click) to fire 2 shells at once"); - - config.config = HbmCollection.g12hs; - - config.reloadAnimationsSequential = true; - - config.loadAnimations = i -> { - config.animations.put(AnimType.CYCLE, ResourceManager.spas_12_anim.get("Fire")); - config.animations.put(AnimType.ALT_CYCLE, ResourceManager.spas_12_anim.get("FireAlt")); - config.animations.put(AnimType.RELOAD, ResourceManager.spas_12_anim.get("ReloadStart")); - config.animations.put(AnimType.RELOAD_EMPTY, ResourceManager.spas_12_anim.get("ReloadEmptyStart")); - config.animations.put(AnimType.RELOAD_CYCLE, ResourceManager.spas_12_anim.get("Reload")); - config.animations.put(AnimType.RELOAD_END, ResourceManager.spas_12_anim.get("ReloadEnd")); - }; - - config.ejector = EJECTOR_SPAS; - - return config; - } - - public static GunConfiguration getSpas12AltConfig() { - - GunConfiguration config = new GunConfiguration(); - - config.rateOfFire = 35; - config.roundsPerCycle = 2; - config.gunMode = GunConfiguration.MODE_NORMAL; - config.firingMode = GunConfiguration.FIRE_MANUAL; - config.firingDuration = 10; - config.ammoCap = 8; - config.reloadSound = GunConfiguration.RSOUND_SHOTGUN; - config.firingSound = "hbm:weapon.shotgunPumpAlt"; - config.reloadType = GunConfiguration.RELOAD_SINGLE; - - config.config = HbmCollection.g12hs; - - config.ejector = EJECTOR_SPAS_ALT; - - return config; - } - - public static GunConfiguration getUboinikConfig() { - - GunConfiguration config = new GunConfiguration(); - - config.rateOfFire = 8; - config.roundsPerCycle = 1; - config.gunMode = GunConfiguration.MODE_NORMAL; - config.firingMode = GunConfiguration.FIRE_MANUAL; - config.reloadDuration = 10; - config.firingDuration = 0; - config.ammoCap = 6; - config.durability = 1500; - config.reloadType = GunConfiguration.RELOAD_SINGLE; - config.allowsInfinity = true; - config.crosshair = Crosshair.L_CIRCLE; - config.reloadSound = GunConfiguration.RSOUND_REVOLVER; - config.firingSound = "hbm:weapon.shotgunShoot"; - - config.name = "uboinik"; - config.manufacturer = EnumGunManufacturer.METRO; - - config.config = HbmCollection.g12hs; - - config.ejector = EJECTOR_UBOINIK; - - return config; - } - - public static GunConfiguration getShottyConfig() { - - GunConfiguration config = new GunConfiguration(); - - config.rateOfFire = 30; - config.roundsPerCycle = 2; - config.gunMode = GunConfiguration.MODE_NORMAL; - config.firingMode = GunConfiguration.FIRE_MANUAL; - config.reloadDuration = 10; - config.firingDuration = 0; - config.ammoCap = 0; - config.durability = 3000; - config.reloadType = GunConfiguration.RELOAD_NONE; - config.allowsInfinity = true; - config.isCentered = true; - config.crosshair = Crosshair.L_CIRCLE; - config.reloadSound = GunConfiguration.RSOUND_REVOLVER; - config.firingSound = "hbm:weapon.shottyShoot"; - - config.loadAnimations = i -> { - config.animations.put(AnimType.CYCLE, ResourceManager.supershotty_anim.get("Fire")); - }; - - config.name = "supershotty"; - config.manufacturer = EnumGunManufacturer.UAC; - config.comment.add("God-damned ARCH-VILES!"); - - config.config = HbmCollection.g12hs; - - config.ejector = EJECTOR_SSG; - - return config; - } - - public static GunConfiguration getBenelliConfig() { - - GunConfiguration config = getUboinikConfig(); - - config.gunMode = 0; - config.firingMode = 1; - config.rateOfFire = 5; - config.ammoCap = 8; - config.reloadDuration = 8; - config.crosshair = Crosshair.CIRCLE; - config.hasSights = true; - config.durability = 250000; - config.allowsInfinity = true; - config.firingSound = "hbm:weapon.deagleShoot"; - config.firingPitch = 0.75F; - config.reloadType = 2; - - config.name = "benelli"; - config.manufacturer = EnumGunManufacturer.BENELLI; - config.comment.add("Eat your heart out SPAS-12"); - config.config = HbmCollection.g12; - - config.ejector = EJECTOR_BENELLI; - - return config; - } - - public static GunConfiguration getBenelliModConfig() { - - GunConfiguration config = getBenelliConfig(); - - config.reloadType = 1; - config.ammoCap = 24; - config.reloadDuration = 21; - config.emptyReloadAdditionalDuration = 15; - config.reloadSound = GunConfiguration.RSOUND_MAG; - config.reloadSoundEmpty = GunConfiguration.RSOUND_MAG_BOLT; - config.reloadSoundEnd = false; - config.name += "Drum"; - - config.loadAnimations = i -> { - config.animations.put(AnimType.CYCLE, ResourceManager.benelli_anim.get("Fire")); - config.animations.put(AnimType.RELOAD, ResourceManager.benelli_anim.get("Reload")); - config.animations.put(AnimType.RELOAD_EMPTY, ResourceManager.benelli_anim.get("ReloadEmpty")); - }; - - return config; - } - - public static BulletConfiguration get12GaugeConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardBuckshotConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_12gauge.stackFromEnum(Ammo12Gauge.STOCK)); - bullet.dmgMin = 5; - bullet.dmgMax = 7; - - bullet.spentCasing = CASING12GAUGE.clone().register("12GaStock").setColor(0x2847FF, SpentCasing.COLOR_CASE_12GA); - - return bullet; - } - - public static BulletConfiguration get12GaugeFireConfig() { - - BulletConfiguration bullet = get12GaugeConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_12gauge.stackFromEnum(Ammo12Gauge.INCENDIARY)); - bullet.wear = 15; - bullet.dmgMin = 5; - bullet.dmgMax = 7; - bullet.incendiary = 5; - - bullet.spentCasing = CASING12GAUGE.clone().register("12GaInc").setColor(0xFF6329, SpentCasing.COLOR_CASE_12GA).setupSmoke(1F, 0.5D, 60, 40); - - return bullet; - } - - public static BulletConfiguration get12GaugeShrapnelConfig() { - - BulletConfiguration bullet = get12GaugeConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_12gauge.stackFromEnum(Ammo12Gauge.SHRAPNEL)); - bullet.wear = 15; - bullet.dmgMin = 10; - bullet.dmgMax = 17; - bullet.ricochetAngle = 15; - bullet.HBRC = 80; - bullet.LBRC = 95; - - bullet.spentCasing = CASING12GAUGE.clone().register("12GaShrap").setColor(0xF0E800, SpentCasing.COLOR_CASE_12GA); - - return bullet; - } - - public static BulletConfiguration get12GaugeDUConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardBuckshotConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_12gauge.stackFromEnum(Ammo12Gauge.DU)); - bullet.wear = 20; - bullet.dmgMin = 18; - bullet.dmgMax = 22; - bullet.doesPenetrate = true; - bullet.leadChance = 50; - - bullet.spentCasing = CASING12GAUGE.clone().register("12GaDU").setColor(0x62A362, SpentCasing.COLOR_CASE_12GA); - - return bullet; - } - - public static BulletConfiguration get12GaugeAMConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardBuckshotConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_12gauge.stackFromEnum(Ammo12Gauge.MARAUDER)); - bullet.wear = 20; - bullet.dmgMin = 100; - bullet.dmgMax = 500; - bullet.leadChance = 50; - - bullet.bntHurt = (bulletnt, hit) -> { - - if(hit instanceof EntityLivingBase) - ((EntityLivingBase)hit).addPotionEffect(new PotionEffect(HbmPotion.bang.id, 20, 0)); - - }; - - bullet.spentCasing = CASING12GAUGE.clone().register("12GaAM").setColor(0x416645, SpentCasing.COLOR_CASE_12GA); - - return bullet; - } - - public static BulletConfiguration get12GaugeSleekConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardAirstrikeConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_12gauge.stackFromEnum(Ammo12Gauge.SLEEK)); - - bullet.spentCasing = CASING12GAUGE.clone().register("12GaIF").setColor(0x2A2A2A, SpentCasing.COLOR_CASE_12GA); - - return bullet; - } - - public static BulletConfiguration get12GaugePercussionConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_12gauge.stackFromEnum(Ammo12Gauge.PERCUSSION)); - bullet.velocity = 2F; - bullet.spread = 0F; - bullet.wear = 10; - bullet.dmgMin = 30F; - bullet.dmgMax = 30F; - bullet.maxAge = 0; - - bullet.spentCasing = CASING12GAUGE.clone().register("12GaPerc").setColor(0x9E1616, SpentCasing.COLOR_CASE_12GA).setupSmoke(1F, 0.5D, 60, 40); - - bullet.bntUpdate = (bulletnt) -> { - - if(!bulletnt.worldObj.isRemote) { - - Vec3 vec = Vec3.createVectorHelper(bulletnt.motionX, bulletnt.motionY, bulletnt.motionZ); - double radius = 4; - double x = bulletnt.posX + vec.xCoord; - double y = bulletnt.posY + vec.yCoord; - double z = bulletnt.posZ + vec.zCoord; - AxisAlignedBB aabb = AxisAlignedBB.getBoundingBox(x, y, z, x, y, z).expand(radius, radius, radius); - List list = bulletnt.worldObj.getEntitiesWithinAABBExcludingEntity(bulletnt.getThrower(), aabb); - - for(Entity e : list) { - DamageSource source = bulletnt.getThrower() instanceof EntityPlayer ? DamageSource.causePlayerDamage((EntityPlayer) bulletnt.getThrower()) : DamageSource.magic; - e.attackEntityFrom(source, 30F); - } - - NBTTagCompound data = new NBTTagCompound(); - data.setString("type", "plasmablast"); - data.setFloat("r", 0.75F); - data.setFloat("g", 0.75F); - data.setFloat("b", 0.75F); - data.setFloat("pitch", (float) -bulletnt.rotationPitch + 90); - data.setFloat("yaw", (float) bulletnt.rotationYaw); - data.setFloat("scale", 2F); - PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data, x, y, z), new TargetPoint(bulletnt.dimension, x, y, z, 100)); - - bulletnt.setDead(); - } - }; - - return bullet; - } -} diff --git a/src/main/java/com/hbm/handler/guncfg/Gun20GaugeFactory.java b/src/main/java/com/hbm/handler/guncfg/Gun20GaugeFactory.java deleted file mode 100644 index 3aa45c9abb..0000000000 --- a/src/main/java/com/hbm/handler/guncfg/Gun20GaugeFactory.java +++ /dev/null @@ -1,273 +0,0 @@ -package com.hbm.handler.guncfg; - -import java.util.ArrayList; - -import com.hbm.handler.BulletConfiguration; -import com.hbm.handler.CasingEjector; -import com.hbm.handler.GunConfiguration; -import com.hbm.inventory.RecipesCommon.ComparableStack; -import com.hbm.items.ModItems; -import com.hbm.items.weapon.sedna.Crosshair; -import com.hbm.items.ItemAmmoEnums.Ammo20Gauge; -import com.hbm.lib.HbmCollection; -import com.hbm.lib.HbmCollection.EnumGunManufacturer; -import com.hbm.particle.SpentCasing; -import com.hbm.particle.SpentCasing.CasingType; -import com.hbm.render.anim.BusAnimation; -import com.hbm.render.anim.BusAnimationSequence; -import com.hbm.render.anim.HbmAnimations.AnimType; - -import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionEffect; -import net.minecraft.util.Vec3; - -public class Gun20GaugeFactory { - - private static final CasingEjector EJECTOR_SHOTGUN; - private static final SpentCasing CASING20GAUGE; - - static { - EJECTOR_SHOTGUN = new CasingEjector().setMotion(Vec3.createVectorHelper(-0.4, 0.95, 0)).setOffset(Vec3.createVectorHelper(-0.55, 0, 0.5)).setAngleRange(0.01F, 0.05F); - CASING20GAUGE = new SpentCasing(CasingType.SHOTGUN).setScale(1.25F).setBounceMotion(0.01F, 0.05F).setupSmoke(0.25F, 0.5D, 60, 20); - } - - public static GunConfiguration getShotgunConfig() { - - GunConfiguration config = new GunConfiguration(); - - config.rateOfFire = 25; - config.roundsPerCycle = 1; - config.gunMode = GunConfiguration.MODE_NORMAL; - config.firingMode = GunConfiguration.FIRE_MANUAL; - config.reloadDuration = 10; - config.firingDuration = 0; - config.ammoCap = 6; - config.reloadType = GunConfiguration.RELOAD_SINGLE; - config.allowsInfinity = true; - config.crosshair = Crosshair.L_CIRCLE; - config.reloadSound = GunConfiguration.RSOUND_SHOTGUN; - - config.animations.put(AnimType.CYCLE, new BusAnimation() - .addBus("LEVER_ROTATE", new BusAnimationSequence() - .addPos(0, 0, 0, 250) - .addPos(0, 0, 45, 500) - .addPos(0, 0, 0, 500) - ) - .addBus("LEVER_RECOIL", new BusAnimationSequence() - .addPos(0.5, 0, 0, 50) - .addPos(0, 0, 0, 50) - .addPos(0, 0, 0, 150) - .addPos(0, -0.5, 0, 500) - .addPos(0, 0, 0, 500) - ) - ); - - config.config = HbmCollection.g20; - - config.ejector = EJECTOR_SHOTGUN; - - return config; - } - - public static GunConfiguration getMareConfig() { - - GunConfiguration config = getShotgunConfig(); - - config.durability = 2000; - config.reloadSound = GunConfiguration.RSOUND_SHOTGUN; - config.firingSound = "hbm:weapon.revolverShootAlt"; - config.firingPitch = 0.75F; - config.hasSights = true; - config.zoomFOV = 0.75F; - - config.name = "win1887"; - config.manufacturer = EnumGunManufacturer.WINCHESTER; - - config.config = HbmCollection.g20; - - return config; - } - - public static GunConfiguration getMareDarkConfig() { - - GunConfiguration config = getShotgunConfig(); - - config.durability = 2500; - config.reloadSound = GunConfiguration.RSOUND_SHOTGUN; - config.firingSound = "hbm:weapon.revolverShootAlt"; - config.firingPitch = 0.75F; - config.hasSights = true; - config.zoomFOV = 0.75F; - - config.name = "win1887Inox"; - config.manufacturer = EnumGunManufacturer.WINCHESTER; - - config.config = HbmCollection.g20; - - return config; - } - - public static BulletConfiguration get20GaugeConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardBuckshotConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_20gauge.stackFromEnum(Ammo20Gauge.STOCK)); - bullet.dmgMin = 3; - bullet.dmgMax = 5; - - bullet.spentCasing = CASING20GAUGE.clone().register("20GaStock").setColor(0xB52B2B, SpentCasing.COLOR_CASE_BRASS); - - return bullet; - } - - public static BulletConfiguration get20GaugeSlugConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_20gauge.stackFromEnum(Ammo20Gauge.SLUG)); - bullet.dmgMin = 18; - bullet.dmgMax = 22; - bullet.wear = 7; - bullet.style = BulletConfiguration.STYLE_NORMAL; - - bullet.spentCasing = CASING20GAUGE.clone().register("20GaSlug").setColor(0x2A2A2A, SpentCasing.COLOR_CASE_BRASS); - - return bullet; - } - - public static BulletConfiguration get20GaugeFlechetteConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardBuckshotConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_20gauge.stackFromEnum(Ammo20Gauge.FLECHETTE)); - bullet.dmgMin = 8; - bullet.dmgMax = 15; - bullet.wear = 15; - bullet.style = BulletConfiguration.STYLE_FLECHETTE; - bullet.HBRC = 2; - bullet.LBRC = 95; - BulletConfigFactory.makeFlechette(bullet); - - bullet.spentCasing = CASING20GAUGE.clone().register("20GaFlech").setColor(0x2847FF, SpentCasing.COLOR_CASE_BRASS); - - return bullet; - } - - public static BulletConfiguration get20GaugeFireConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardBuckshotConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_20gauge.stackFromEnum(Ammo20Gauge.INCENDIARY)); - bullet.dmgMin = 3; - bullet.dmgMax = 6; - bullet.wear = 15; - bullet.incendiary = 5; - - bullet.spentCasing = CASING20GAUGE.clone().register("20GaInc").setColor(0xFF6329, SpentCasing.COLOR_CASE_BRASS).setupSmoke(1F, 0.5D, 60, 40); - - return bullet; - } - - public static BulletConfiguration get20GaugeShrapnelConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardBuckshotConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_20gauge.stackFromEnum(Ammo20Gauge.SHRAPNEL)); - bullet.wear = 15; - bullet.dmgMin = 7; - bullet.dmgMax = 12; - bullet.ricochetAngle = 15; - bullet.HBRC = 80; - bullet.LBRC = 95; - - bullet.spentCasing = CASING20GAUGE.clone().register("20GaShrap").setColor(0xF0E800, SpentCasing.COLOR_CASE_BRASS); - - return bullet; - } - - public static BulletConfiguration get20GaugeExplosiveConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardBuckshotConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_20gauge.stackFromEnum(Ammo20Gauge.EXPLOSIVE)); - bullet.dmgMin = 7; - bullet.dmgMax = 12; - bullet.wear = 25; - bullet.explosive = 0.5F; - - bullet.spentCasing = CASING20GAUGE.clone().register("20GaExp").setColor(0xF0E800, SpentCasing.COLOR_CASE_BRASS); - - return bullet; - } - - public static BulletConfiguration get20GaugeCausticConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardBuckshotConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_20gauge.stackFromEnum(Ammo20Gauge.CAUSTIC)); - bullet.dmgMin = 3; - bullet.dmgMax = 7; - bullet.wear = 25; - bullet.caustic = 5; - bullet.doesRicochet = false; - bullet.HBRC = 0; - bullet.LBRC = 0; - - bullet.effects = new ArrayList(); - bullet.effects.add(new PotionEffect(Potion.poison.id, 10 * 20, 1)); - - bullet.spentCasing = CASING20GAUGE.clone().register("20GaCaus").setColor(0x64E800, SpentCasing.COLOR_CASE_BRASS); - - return bullet; - } - - public static BulletConfiguration get20GaugeShockConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardBuckshotConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_20gauge.stackFromEnum(Ammo20Gauge.SHOCK)); - bullet.dmgMin = 4; - bullet.dmgMax = 8; - bullet.wear = 25; - bullet.emp = 2; - bullet.doesRicochet = false; - bullet.HBRC = 0; - bullet.LBRC = 0; - - bullet.effects = new ArrayList(); - bullet.effects.add(new PotionEffect(Potion.moveSlowdown.id, 10 * 20, 1)); - bullet.effects.add(new PotionEffect(Potion.weakness.id, 10 * 20, 4)); - - bullet.spentCasing = CASING20GAUGE.clone().register("20GaShock").setColor(0x00EFEF, SpentCasing.COLOR_CASE_BRASS); - - return bullet; - } - - public static BulletConfiguration get20GaugeWitherConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardBuckshotConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_20gauge.stackFromEnum(Ammo20Gauge.WITHER)); - bullet.dmgMin = 4; - bullet.dmgMax = 8; - - bullet.effects = new ArrayList(); - bullet.effects.add(new PotionEffect(Potion.wither.id, 10 * 20, 2)); - - bullet.spentCasing = CASING20GAUGE.clone().register("20GaWith").setColor(0x391717, SpentCasing.COLOR_CASE_BRASS); - - return bullet; - } - - public static BulletConfiguration get20GaugeSleekConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardAirstrikeConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_20gauge.stackFromEnum(Ammo20Gauge.SLEEK)); - - bullet.spentCasing = CASING20GAUGE.clone().register("20GaIF").setColor(0x2A2A2A, SpentCasing.COLOR_CASE_BRASS); - - return bullet; - } - -} diff --git a/src/main/java/com/hbm/handler/guncfg/Gun22LRFactory.java b/src/main/java/com/hbm/handler/guncfg/Gun22LRFactory.java deleted file mode 100644 index 629989b096..0000000000 --- a/src/main/java/com/hbm/handler/guncfg/Gun22LRFactory.java +++ /dev/null @@ -1,100 +0,0 @@ -package com.hbm.handler.guncfg; - -import com.hbm.handler.BulletConfiguration; -import com.hbm.handler.CasingEjector; -import com.hbm.handler.GunConfiguration; -import com.hbm.inventory.RecipesCommon.ComparableStack; -import com.hbm.items.ModItems; -import com.hbm.items.weapon.sedna.Crosshair; -import com.hbm.items.ItemAmmoEnums.Ammo22LR; -import com.hbm.lib.HbmCollection; -import com.hbm.lib.HbmCollection.EnumGunManufacturer; -import com.hbm.particle.SpentCasing; -import com.hbm.particle.SpentCasing.CasingType; - -public class Gun22LRFactory { - - private static final CasingEjector EJECTOR_22LR; - private static final SpentCasing CASING22LR; - - static { - EJECTOR_22LR = new CasingEjector().setMotion(-0.4, 0.1, 0).setOffset(-0.35, -0.2, 0.35).setAngleRange(0.01F, 0.03F); - CASING22LR = new SpentCasing(CasingType.STRAIGHT).setScale(0.8F).setBounceMotion(0.05F, 0.02F).setColor(SpentCasing.COLOR_CASE_BRASS); - } - - public static GunConfiguration getUziConfig() { - - GunConfiguration config = new GunConfiguration(); - - config.rateOfFire = 1; - config.roundsPerCycle = 1; - config.gunMode = GunConfiguration.MODE_NORMAL; - config.firingMode = GunConfiguration.FIRE_AUTO; - config.reloadDuration = 20; - config.firingDuration = 0; - config.ammoCap = 32; - config.reloadType = GunConfiguration.RELOAD_FULL; - config.allowsInfinity = true; - config.crosshair = Crosshair.L_CROSS; - config.durability = 3000; - config.reloadSound = GunConfiguration.RSOUND_MAG; - config.firingSound = "hbm:weapon.uziShoot"; - config.reloadSoundEnd = false; - - config.name = "uzi"; - config.manufacturer = EnumGunManufacturer.IMI; - config.comment.add("Mom, where are my mittens?"); - - config.config = HbmCollection.lr22; - - config.ejector = EJECTOR_22LR; - - return config; - } - - public static GunConfiguration getSaturniteConfig() { - - GunConfiguration config = getUziConfig(); - - config.durability = 4500; - - config.name = "uziSatur"; - config.manufacturer = EnumGunManufacturer.IMI_BIGMT; - - config.config = HbmCollection.lr22Inc; - - return config; - } - - static float inaccuracy = 5; - public static BulletConfiguration get22LRConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_22lr.stackFromEnum(Ammo22LR.STOCK)); - bullet.spread *= inaccuracy; - bullet.dmgMin = 6; - bullet.dmgMax = 8; - - bullet.spentCasing = CASING22LR.clone().register("22LRStock"); - - return bullet; - } - - public static BulletConfiguration get22LRAPConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_22lr.stackFromEnum(Ammo22LR.AP)); - bullet.spread *= inaccuracy; - bullet.dmgMin = 12; - bullet.dmgMax = 16; - bullet.leadChance = 10; - bullet.wear = 15; - - bullet.spentCasing = CASING22LR.clone().register("22LRAP"); - - return bullet; - } - -} diff --git a/src/main/java/com/hbm/handler/guncfg/Gun357MagnumFactory.java b/src/main/java/com/hbm/handler/guncfg/Gun357MagnumFactory.java deleted file mode 100644 index 0614dca1d4..0000000000 --- a/src/main/java/com/hbm/handler/guncfg/Gun357MagnumFactory.java +++ /dev/null @@ -1,353 +0,0 @@ -package com.hbm.handler.guncfg; - -import java.util.ArrayList; - -import com.hbm.handler.BulletConfigSyncingUtil; -import com.hbm.handler.BulletConfiguration; -import com.hbm.handler.CasingEjector; -import com.hbm.handler.GunConfiguration; -import com.hbm.inventory.RecipesCommon.ComparableStack; -import com.hbm.items.ModItems; -import com.hbm.items.weapon.sedna.Crosshair; -import com.hbm.items.ItemAmmoEnums.Ammo357Magnum; -import com.hbm.lib.HbmCollection.EnumGunManufacturer; -import com.hbm.main.ResourceManager; -import com.hbm.particle.SpentCasing; -import com.hbm.particle.SpentCasing.CasingType; -import com.hbm.lib.ModDamageSource; -import com.hbm.potion.HbmPotion; -import com.hbm.render.anim.HbmAnimations.AnimType; - -import net.minecraft.potion.PotionEffect; -import net.minecraft.util.Vec3; - -public class Gun357MagnumFactory { - - private static final CasingEjector EJECTOR_REVOLVER; - private static final SpentCasing CASING357; - private static final SpentCasing CASINGNM; - - static { - EJECTOR_REVOLVER = new CasingEjector().setMotion(Vec3.createVectorHelper(0, 0, -0.03)).setOffset(Vec3.createVectorHelper(0, -0.15, 0)).setAngleRange(0.01F, 0.05F).setAfterReload().setAmount(6); - CASING357 = new SpentCasing(CasingType.STRAIGHT).setBounceMotion(0.01F, 0.05F); - CASINGNM = new SpentCasing(CasingType.SHOTGUN).setScale(1.25F).setBounceMotion(0.01F, 0.05F).setColor(0xC7AB1C, 0x6D63A6).register("357N2"); - } - - public static GunConfiguration getBaseConfig() { - - GunConfiguration config = new GunConfiguration(); - - config.rateOfFire = 10; - config.roundsPerCycle = 1; - config.gunMode = GunConfiguration.MODE_NORMAL; - config.firingMode = GunConfiguration.FIRE_MANUAL; - config.reloadDuration = 30; - config.firingDuration = 0; - config.ammoCap = 6; - config.reloadType = GunConfiguration.RELOAD_FULL; - config.allowsInfinity = true; - config.crosshair = Crosshair.L_CLASSIC; - config.reloadSound = GunConfiguration.RSOUND_REVOLVER; - config.firingSound = "hbm:weapon.revolverShoot"; - config.reloadSoundEnd = false; - - config.ejector = EJECTOR_REVOLVER; - - config.loadAnimations = i -> { - config.animations.put(AnimType.CYCLE, ResourceManager.python_anim.get("Fire")); - config.animations.put(AnimType.RELOAD, ResourceManager.python_anim.get("Reload")); - }; - - return config; - } - - public static GunConfiguration getRevolverConfig() { - - GunConfiguration config = getBaseConfig(); - - config.durability = 3500; - - config.name = "ffiVInox"; - config.manufacturer = EnumGunManufacturer.FLIMFLAM; - - config.config = new ArrayList(); - config.config.add(BulletConfigSyncingUtil.STEEL_REVOLVER); - config.config.add(BulletConfigSyncingUtil.IRON_REVOLVER); - config.config.add(BulletConfigSyncingUtil.LEAD_REVOLVER); - config.config.add(BulletConfigSyncingUtil.DESH_REVOLVER); - - return config; - } - - public static GunConfiguration getRevolverSaturniteConfig() { - - GunConfiguration config = getBaseConfig(); - - config.durability = 3500; - - config.name = "ffivSatur"; - config.manufacturer = EnumGunManufacturer.FLIMFLAM; - - config.config = new ArrayList(); - config.config.add(BulletConfigSyncingUtil.SATURNITE_REVOLVER); - config.config.add(BulletConfigSyncingUtil.DESH_REVOLVER); - - return config; - } - - public static GunConfiguration getRevolverGoldConfig() { - - GunConfiguration config = getBaseConfig(); - - config.durability = 2500; - - config.name = "ffivBling"; - config.manufacturer = EnumGunManufacturer.FLIMFLAM; - - config.config = new ArrayList(); - config.config.add(BulletConfigSyncingUtil.GOLD_REVOLVER); - config.config.add(BulletConfigSyncingUtil.STEEL_REVOLVER); - config.config.add(BulletConfigSyncingUtil.IRON_REVOLVER); - config.config.add(BulletConfigSyncingUtil.LEAD_REVOLVER); - config.config.add(BulletConfigSyncingUtil.DESH_REVOLVER); - - return config; - } - - public static GunConfiguration getRevolverCursedConfig() { - - GunConfiguration config = getBaseConfig(); - - config.rateOfFire = 7; - config.ammoCap = 17; - config.durability = 5000; - config.firingSound = "hbm:weapon.heavyShoot"; - - config.name = "revolverCursed"; - config.manufacturer = EnumGunManufacturer.BAE; - - config.config = new ArrayList(); - config.config.add(BulletConfigSyncingUtil.CURSED_REVOLVER); - config.config.add(BulletConfigSyncingUtil.DESH_REVOLVER); - - config.loadAnimations = i -> { - config.animations.put(AnimType.CYCLE, ResourceManager.cursed_anim.get("Fire")); - config.animations.put(AnimType.RELOAD, ResourceManager.cursed_anim.get("Reload")); - }; - - return config; - } - - public static GunConfiguration getRevolverSchrabidiumConfig() { - - GunConfiguration config = getBaseConfig(); - - config.durability = 7500; - config.firingSound = "hbm:weapon.schrabidiumShoot"; - - config.name = "ffiVUltra"; - config.manufacturer = EnumGunManufacturer.FLIMFLAM; - - config.config = new ArrayList(); - config.config.add(BulletConfigSyncingUtil.SCHRABIDIUM_REVOLVER); - config.config.add(BulletConfigSyncingUtil.GOLD_REVOLVER); - config.config.add(BulletConfigSyncingUtil.STEEL_REVOLVER); - config.config.add(BulletConfigSyncingUtil.IRON_REVOLVER); - config.config.add(BulletConfigSyncingUtil.LEAD_REVOLVER); - config.config.add(BulletConfigSyncingUtil.DESH_REVOLVER); - - return config; - } - - public static GunConfiguration getRevolverNightmareConfig() { - - GunConfiguration config = getBaseConfig(); - - config.durability = 4000; - config.firingSound = "hbm:weapon.schrabidiumShoot"; - - config.name = "ffiVN1"; - config.manufacturer = EnumGunManufacturer.FLIMFLAM; - - config.config = new ArrayList(); - config.config.add(BulletConfigSyncingUtil.NIGHT_REVOLVER); - config.config.add(BulletConfigSyncingUtil.DESH_REVOLVER); - - return config; - } - - public static GunConfiguration getRevolverNightmare2Config() { - - GunConfiguration config = getBaseConfig(); - - config.durability = 4000; - config.firingSound = "hbm:weapon.schrabidiumShoot"; - config.crosshair = Crosshair.NONE; - - config.name = "ffiVN2"; - config.manufacturer = EnumGunManufacturer.FLIMFLAM; - - config.config = new ArrayList(); - config.config.add(BulletConfigSyncingUtil.NIGHT2_REVOLVER); - - return config; - } - - public static GunConfiguration getRevolverBioConfig() { - - GunConfiguration config = getBaseConfig(); - - config.durability = 100000; - config.firingSound = "hbm:weapon.deagleShoot"; - config.reloadDuration = 53; - config.crosshair = Crosshair.CIRCLE; - - config.name = "bio"; - config.manufacturer = EnumGunManufacturer.RYAN; - - config.config.add(BulletConfigSyncingUtil.STEEL_HS); - config.config.add(BulletConfigSyncingUtil.GOLD_HS); - config.config.add(BulletConfigSyncingUtil.IRON_HS); - config.config.add(BulletConfigSyncingUtil.LEAD_HS); - config.config.add(BulletConfigSyncingUtil.DESH_HS); - - return config; - } - - //// // // // // ////// ////// ////// - // // // // // // // // // - //// // // // // //// // ////// - // // // // // // // // // - //// ////// ////// ////// ////// // ////// - - public static BulletConfiguration getRevIronConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_357.stackFromEnum(Ammo357Magnum.IRON)); - bullet.dmgMin = 8; - bullet.dmgMax = 10; - - bullet.spentCasing = CASING357.clone().register("357Iron").setColor(0xA8A8A8); - - return bullet; - } - - public static BulletConfiguration getRevLeadConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_357.stackFromEnum(Ammo357Magnum.LEAD)); - bullet.dmgMin = 18; - bullet.dmgMax = 22; - - bullet.spentCasing = CASING357.clone().register("357Lead").setColor(0x646470); - - return bullet; - } - - public static BulletConfiguration getRevNuclearConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_357.stackFromEnum(Ammo357Magnum.NUCLEAR)); - bullet.dmgMin = 10; - bullet.dmgMax = 15; - - bullet.effects = new ArrayList(); - bullet.effects.add(new PotionEffect(HbmPotion.radiation.id, 10 * 20, 4)); - - bullet.spentCasing = CASING357.clone().register("357Nuc").setColor(0xFEFEFE); - - return bullet; - } - - public static BulletConfiguration getRevGoldConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_357.stackFromEnum(Ammo357Magnum.GOLD)); - bullet.dmgMin = 25; - bullet.dmgMax = 28; - - bullet.spentCasing = CASING357.clone().register("357Gold").setColor(0xF9FF3E); - - return bullet; - } - - public static BulletConfiguration getRevDeshConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_357.stackFromEnum(Ammo357Magnum.DESH)); - bullet.dmgMin = 30; - bullet.dmgMax = 33; - - bullet.spentCasing = CASING357.clone().register("357Desh").setColor(0xF22929); - - return bullet; - } - - public static BulletConfiguration getRevSchrabidiumConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_357.stackFromEnum(Ammo357Magnum.SCHRABIDIUM)); - bullet.dmgMin = 10000; - bullet.dmgMax = 100000; - bullet.instakill = true; - - bullet.spentCasing = CASING357.clone().register("357Schrab").setColor(0x32FFFF); - - return bullet; - } - - public static BulletConfiguration getRevCursedConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_357.stackFromEnum(Ammo357Magnum.STEEL)); - bullet.dmgMin = 18; - bullet.dmgMax = 25; - - bullet.spentCasing = CASING357.clone().register("357Cursed").setColor(0x565656); - - return bullet; - } - - public static BulletConfiguration getRevNightmare1Config() { - - BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_357.stackFromEnum(Ammo357Magnum.NIGHTMARE1)); - bullet.dmgMin = 1; - bullet.dmgMax = 100; - - bullet.spentCasing = CASING357.clone().register("357N1").setColor(0x3A3A3A); - - return bullet; - } - - public static BulletConfiguration getRevNightmare2Config() { - - BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_357.stackFromEnum(Ammo357Magnum.NIGHTMARE2)); - bullet.spread *= 10; - bullet.bulletsMin = 4; - bullet.bulletsMax = 6; - bullet.dmgMin = 25; - bullet.dmgMax = 100; - bullet.doesRicochet = false; - bullet.destroysBlocks = true; - bullet.style = BulletConfiguration.STYLE_BOLT; - bullet.trail = BulletConfiguration.BOLT_NIGHTMARE; - - bullet.damageType = ModDamageSource.s_laser; - - bullet.spentCasing = CASINGNM; - - return bullet; - } - -} diff --git a/src/main/java/com/hbm/handler/guncfg/Gun44MagnumFactory.java b/src/main/java/com/hbm/handler/guncfg/Gun44MagnumFactory.java deleted file mode 100644 index 4a65f6f026..0000000000 --- a/src/main/java/com/hbm/handler/guncfg/Gun44MagnumFactory.java +++ /dev/null @@ -1,375 +0,0 @@ -package com.hbm.handler.guncfg; - -import java.util.ArrayList; - -import com.hbm.entity.particle.EntityBSmokeFX; -import com.hbm.entity.projectile.EntityBoxcar; -import com.hbm.entity.projectile.EntityBuilding; -import com.hbm.entity.projectile.EntityDuchessGambit; -import com.hbm.handler.BulletConfigSyncingUtil; -import com.hbm.handler.BulletConfiguration; -import com.hbm.handler.CasingEjector; -import com.hbm.handler.GunConfiguration; -import com.hbm.inventory.RecipesCommon.ComparableStack; -import com.hbm.items.ModItems; -import com.hbm.items.weapon.sedna.Crosshair; -import com.hbm.items.ItemAmmoEnums.Ammo44Magnum; -import com.hbm.lib.HbmCollection; -import com.hbm.lib.RefStrings; -import com.hbm.main.ResourceManager; -import com.hbm.lib.HbmCollection.EnumGunManufacturer; -import com.hbm.packet.PacketDispatcher; -import com.hbm.packet.toclient.AuxParticlePacketNT; -import com.hbm.particle.SpentCasing; -import com.hbm.particle.SpentCasing.CasingType; -import com.hbm.potion.HbmPotion; -import com.hbm.render.anim.HbmAnimations.AnimType; -import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.potion.PotionEffect; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.Vec3; - -public class Gun44MagnumFactory { - - private static final CasingEjector EJECTOR_PIP; - private static final SpentCasing CASING44; - - static { - EJECTOR_PIP = new CasingEjector().setMotion(Vec3.createVectorHelper(0, 0, -0.05)).setOffset(Vec3.createVectorHelper(0, -0.15, 0)).setAngleRange(0.01F, 0.05F).setAfterReload().setAmount(6); - CASING44 = new SpentCasing(CasingType.STRAIGHT).setScale(1.5F, 1.0F, 1.5F).setBounceMotion(0.01F, 0.05F).setColor(SpentCasing.COLOR_CASE_44); - } - - public static GunConfiguration getBaseConfig() { - - GunConfiguration config = new GunConfiguration(); - - config.rateOfFire = 10; - config.roundsPerCycle = 1; - config.gunMode = GunConfiguration.MODE_NORMAL; - config.firingMode = GunConfiguration.FIRE_MANUAL; - config.reloadDuration = 50; - config.firingDuration = 0; - config.ammoCap = 6; - config.reloadType = GunConfiguration.RELOAD_FULL; - config.allowsInfinity = true; - config.crosshair = Crosshair.L_CLASSIC; - config.reloadSound = GunConfiguration.RSOUND_REVOLVER; - config.firingSound = "hbm:weapon.44Shoot"; - config.reloadSoundEnd = false; - - config.config.addAll(HbmCollection.m44Normal); - - config.ejector = EJECTOR_PIP; - - config.loadAnimations = i -> { - config.animations.put(AnimType.CYCLE, ResourceManager.novac_anim.get("Fire")); - }; - - return config; - } - - public static GunConfiguration getNovacConfig() { - - GunConfiguration config = getBaseConfig(); - - config.durability = 2500; - - config.name = "ifHorseshoe"; - config.manufacturer = EnumGunManufacturer.IF; - config.comment.add("Fallout New Vegas wasn't THAT good."); - - return config; - } - - public static final ResourceLocation scope_lilmac = new ResourceLocation(RefStrings.MODID, "textures/misc/scope_44.png"); - - public static GunConfiguration getMacintoshConfig() { - - GunConfiguration config = getBaseConfig(); - - config.durability = 31_000; - - config.name = "ifScope"; - config.manufacturer = EnumGunManufacturer.IF; - config.comment.add("Poppin' mentats like tic tacs"); - - config.allowsInfinity = false; - config.hasSights = true; - config.absoluteFOV = true; - config.zoomFOV = 0.25F; - config.scopeTexture = scope_lilmac; - - config.config = new ArrayList(); - config.config.add(BulletConfigSyncingUtil.M44_PIP); - config.config.addAll(HbmCollection.m44Normal); - - return config; - } - - public static GunConfiguration getBlackjackConfig() { - - GunConfiguration config = getBaseConfig(); - - config.durability = 4000; - config.ammoCap = 5; - - config.allowsInfinity = false; - config.name = "ifVanity"; - config.manufacturer = EnumGunManufacturer.IF; - config.comment.add("Alcoholism is cool!"); - - config.config = new ArrayList(); - config.config.add(BulletConfigSyncingUtil.M44_BJ); - config.config.addAll(HbmCollection.m44Normal); - - config.ejector = EJECTOR_PIP.clone().setAmount(5); - - return config; - } - - public static GunConfiguration getSilverConfig() { - - GunConfiguration config = getBaseConfig(); - - config.durability = 4000; - config.ammoCap = 6; - - config.allowsInfinity = false; - config.name = "ifStorm"; - config.manufacturer = EnumGunManufacturer.IF; - config.comment.add("Our friendship is based on abusive behaviour"); - config.comment.add("and mutual hate. It's not that complicated."); - - config.config = new ArrayList(); - config.config.add(BulletConfigSyncingUtil.M44_SILVER); - config.config.addAll(HbmCollection.m44Normal); - - return config; - } - - public static GunConfiguration getRedConfig() { - - GunConfiguration config = getBaseConfig(); - - config.durability = 4000; - config.ammoCap = 8; - - config.allowsInfinity = false; - config.name = "ifPit"; - config.manufacturer = EnumGunManufacturer.IF; - config.comment.add("Explore the other side"); - config.comment.add("...from afar!"); - - config.config = new ArrayList(); - config.config.addAll(HbmCollection.m44All); - - config.ejector = EJECTOR_PIP.clone().setAmount(64); - - return config; - } - - public static BulletConfiguration getNoPipConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_44.stackFromEnum(Ammo44Magnum.STOCK)); - bullet.dmgMin = 18; - bullet.dmgMax = 26; - - bullet.spentCasing = CASING44.clone().register("44NoPip"); - - return bullet; - } - - public static BulletConfiguration getNoPipAPConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_44.stackFromEnum(Ammo44Magnum.AP)); - bullet.dmgMin = 25; - bullet.dmgMax = 32; - bullet.wear = 15; - bullet.leadChance = 10; - - bullet.spentCasing = CASING44.clone().register("44AP"); - - return bullet; - } - - public static BulletConfiguration getNoPipDUConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_44.stackFromEnum(Ammo44Magnum.DU)); - bullet.dmgMin = 28; - bullet.dmgMax = 40; - bullet.wear = 25; - bullet.leadChance = 50; - - bullet.spentCasing = CASING44.clone().register("44DU"); - - return bullet; - } - - public static BulletConfiguration getPhosphorusConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_44.stackFromEnum(Ammo44Magnum.PHOSPHORUS)); - bullet.dmgMin = 18; - bullet.dmgMax = 26; - bullet.wear = 15; - bullet.incendiary = 5; - bullet.doesPenetrate = false; - - PotionEffect eff = new PotionEffect(HbmPotion.phosphorus.id, 20 * 20, 0, true); - eff.getCurativeItems().clear(); - bullet.effects = new ArrayList(); - bullet.effects.add(new PotionEffect(eff)); - - bullet.bntImpact = (bulletnt, x, y, z, sideHit) -> { - - NBTTagCompound data = new NBTTagCompound(); - data.setString("type", "vanillaburst"); - data.setString("mode", "flame"); - data.setInteger("count", 15); - data.setDouble("motion", 0.05D); - - PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data, bulletnt.posX, bulletnt.posY, bulletnt.posZ), new TargetPoint(bulletnt.dimension, bulletnt.posX, bulletnt.posY, bulletnt.posZ, 50)); - }; - - bullet.spentCasing = CASING44.clone().register("44Phos"); - - return bullet; - } - - public static BulletConfiguration getNoPipStarConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_44.stackFromEnum(Ammo44Magnum.STAR)); - bullet.dmgMin = 42; - bullet.dmgMax = 50; - bullet.wear = 25; - bullet.leadChance = 100; - - bullet.spentCasing = CASING44.clone().register("44Star"); - - return bullet; - } - - public static BulletConfiguration getPipConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_44.stackFromEnum(Ammo44Magnum.PIP)); - bullet.dmgMin = 30; - bullet.dmgMax = 36; - bullet.wear = 25; - bullet.doesPenetrate = false; - - bullet.bntHit = (bulletnt, hit) -> { - - if(!bulletnt.worldObj.isRemote) { - EntityBoxcar pippo = new EntityBoxcar(bulletnt.worldObj); - pippo.posX = hit.posX; - pippo.posY = hit.posY + 50; - pippo.posZ = hit.posZ; - - for(int j = 0; j < 50; j++) { - EntityBSmokeFX fx = new EntityBSmokeFX(bulletnt.worldObj, pippo.posX + (bulletnt.worldObj.rand.nextDouble() - 0.5) * 4, pippo.posY + (bulletnt.worldObj.rand.nextDouble() - 0.5) * 12, pippo.posZ + (bulletnt.worldObj.rand.nextDouble() - 0.5) * 4, 0, 0, 0); - bulletnt.worldObj.spawnEntityInWorld(fx); - } - bulletnt.worldObj.spawnEntityInWorld(pippo); - - bulletnt.worldObj.playSoundEffect(pippo.posX, pippo.posY + 50, pippo.posZ, "hbm:alarm.trainHorn", 100F, 1F); - } - }; - - bullet.spentCasing = CASING44.clone().register("44Pip").setColor(0x532C64); - - return bullet; - } - - public static BulletConfiguration getBJConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_44.stackFromEnum(Ammo44Magnum.BJ)); - bullet.dmgMin = 30; - bullet.dmgMax = 36; - bullet.wear = 25; - bullet.doesPenetrate = false; - - bullet.bntHit = (bulletnt, hit) -> { - - if(!bulletnt.worldObj.isRemote) { - EntityDuchessGambit pippo = new EntityDuchessGambit(bulletnt.worldObj); - pippo.posX = hit.posX; - pippo.posY = hit.posY + 50; - pippo.posZ = hit.posZ; - - for(int j = 0; j < 150; j++) { - EntityBSmokeFX fx = new EntityBSmokeFX(bulletnt.worldObj, pippo.posX + (bulletnt.worldObj.rand.nextDouble() - 0.5) * 7, pippo.posY + (bulletnt.worldObj.rand.nextDouble() - 0.5) * 8, pippo.posZ + (bulletnt.worldObj.rand.nextDouble() - 0.5) * 18, 0, 0, 0); - bulletnt.worldObj.spawnEntityInWorld(fx); - } - bulletnt.worldObj.spawnEntityInWorld(pippo); - - bulletnt.worldObj.playSoundEffect(pippo.posX, pippo.posY + 50, pippo.posZ, "hbm:weapon.boat", 100F, 1F); - } - }; - - bullet.spentCasing = CASING44.clone().register("44BJ").setColor(0x632B2C); - - return bullet; - } - - public static BulletConfiguration getSilverStormConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_44.stackFromEnum(Ammo44Magnum.SILVER)); - bullet.dmgMin = 30; - bullet.dmgMax = 36; - bullet.wear = 25; - bullet.doesPenetrate = false; - - bullet.bntHit = (bulletnt, hit) -> { - - if(!bulletnt.worldObj.isRemote) { - EntityBuilding pippo = new EntityBuilding(bulletnt.worldObj); - pippo.posX = hit.posX; - pippo.posY = hit.posY + 50; - pippo.posZ = hit.posZ; - - for(int j = 0; j < 150; j++) { - EntityBSmokeFX fx = new EntityBSmokeFX(bulletnt.worldObj, pippo.posX + (bulletnt.worldObj.rand.nextDouble() - 0.5) * 15, pippo.posY + (bulletnt.worldObj.rand.nextDouble() - 0.5) * 15, pippo.posZ + (bulletnt.worldObj.rand.nextDouble() - 0.5) * 15, 0, 0, 0); - bulletnt.worldObj.spawnEntityInWorld(fx); - } - bulletnt.worldObj.spawnEntityInWorld(pippo); - - bulletnt.worldObj.playSoundEffect(pippo.posX, pippo.posY + 50, pippo.posZ, "hbm:block.debris", 100F, 1F); - } - }; - - bullet.spentCasing = CASING44.clone().register("44Silver").setColor(0x2B5963); - - return bullet; - } - - public static BulletConfiguration getRocketConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardRocketConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_44.stackFromEnum(Ammo44Magnum.ROCKET)); - bullet.velocity = 5; - bullet.explosive = 15F; - bullet.trail = 1; - - bullet.spentCasing = CASING44.clone().register("44Rocket"); - - return bullet; - } - -} diff --git a/src/main/java/com/hbm/handler/guncfg/Gun45ACPFactory.java b/src/main/java/com/hbm/handler/guncfg/Gun45ACPFactory.java deleted file mode 100644 index c09794ca68..0000000000 --- a/src/main/java/com/hbm/handler/guncfg/Gun45ACPFactory.java +++ /dev/null @@ -1,173 +0,0 @@ -package com.hbm.handler.guncfg; - -import java.util.ArrayList; - -import com.hbm.handler.BulletConfiguration; -import com.hbm.handler.GunConfiguration; -import com.hbm.inventory.RecipesCommon.ComparableStack; -import com.hbm.items.ModItems; -import com.hbm.items.weapon.sedna.Crosshair; -import com.hbm.items.ItemAmmoEnums.Ammo45ACP; -import com.hbm.lib.HbmCollection; -import com.hbm.lib.HbmCollection.EnumGunManufacturer; -import com.hbm.particle.SpentCasing; -import com.hbm.particle.SpentCasing.CasingType; -import com.hbm.render.anim.BusAnimation; -import com.hbm.render.anim.BusAnimationSequence; -import com.hbm.render.anim.HbmAnimations.AnimType; - -public class Gun45ACPFactory { - - private static final SpentCasing CASING45; - - static { - CASING45 = new SpentCasing(CasingType.STRAIGHT).setBounceMotion(0.01F, 0.05F).setScale(1.25F, 1.25F, 1F).setColor(SpentCasing.COLOR_CASE_BRASS).register("45ACP"); - } - - public static GunConfiguration getThompsonConfig() { - - GunConfiguration config = new GunConfiguration(); - - config.rateOfFire = 2; - config.roundsPerCycle = 1; - config.gunMode = GunConfiguration.MODE_NORMAL; - config.firingMode = GunConfiguration.FIRE_AUTO; - config.reloadDuration = 20; - config.firingDuration = 0; - config.ammoCap = 30; - config.reloadType = GunConfiguration.RELOAD_FULL; - config.allowsInfinity = true; - config.crosshair = Crosshair.L_SPLIT; - config.durability = 5000; - config.reloadSound = GunConfiguration.RSOUND_MAG; - config.firingSound = "hbm:weapon.rifleShoot"; - config.reloadSoundEnd = false; - - config.name = "tommy"; - config.manufacturer = EnumGunManufacturer.AUTO_ORDINANCE; - - config.config = new ArrayList(); - config.config.addAll(HbmCollection.acp45); - - return config; - } - - public static GunConfiguration getUACPistolConfig() { - GunConfiguration config = new GunConfiguration(); - - config.rateOfFire = 4; - config.roundsPerCycle = 1; - config.gunMode = GunConfiguration.MODE_NORMAL; - config.firingMode = GunConfiguration.FIRE_MANUAL; - config.reloadDuration = 10; - config.firingDuration = 8; - config.ammoCap = 21; - config.durability = 10000; - config.reloadType = 1; - config.allowsInfinity = true; - config.hasSights = true; - config.absoluteFOV = true; - config.zoomFOV = 0.5F; - config.crosshair = Crosshair.CROSS; - config.reloadSound = GunConfiguration.RSOUND_MAG; - config.firingSound = "hbm:weapon.deagleShoot"; - config.reloadSoundEnd = true; - - config.name = "uacPistol"; - config.manufacturer = EnumGunManufacturer.UAC; - - config.config.addAll(HbmCollection.acp45); - - config.animations.put(AnimType.CYCLE, new BusAnimation() - .addBus("SLIDE", new BusAnimationSequence() - .addPos(0, 0, 0, 10)// Wait for hammer - .addPos(0, 0, -3.5, 40)// Slide back - .addPos(0, 0, 0, 40))// Return - .addBus("HAMMER", new BusAnimationSequence() - .addPos(15, 0, 0, 10) - .addPos(0, 0, 0, 40))); - - return config; - } - - public static GunConfiguration getUACPistolBurstConfig() { - GunConfiguration config = getUACPistolConfig(); - config.rateOfFire = 5; - config.roundsPerBurst = 3; - config.firingDuration = 2; - config.gunMode = GunConfiguration.MODE_NORMAL; - config.firingMode = GunConfiguration.FIRE_BURST; - - return config; - } - - public static GunConfiguration getUACSMGConfig() { - GunConfiguration config = new GunConfiguration(); - - config.rateOfFire = 1; - config.roundsPerCycle = 1; - config.gunMode = GunConfiguration.MODE_NORMAL; - config.firingMode = GunConfiguration.FIRE_AUTO; - config.reloadDuration = 10; - config.firingDuration = 4; - config.ammoCap = 40; - config.durability = 40000; - config.reloadType = 1; - config.allowsInfinity = true; - config.hasSights = true; - config.crosshair = Crosshair.CROSS; - config.reloadSound = "hbm:weapon.SMGMagInPB3"; - config.firingSound = "hbm:weapon.SMGFirePB3"; - config.firingPitch = 1.15F; - config.reloadSoundEnd = true; - - config.name = "uacSMG"; - config.manufacturer = EnumGunManufacturer.UAC; - - config.config.addAll(HbmCollection.acp45); - - return config; - } - - static float inaccuracy = 5; - public static BulletConfiguration get45AutoConfig() { - BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_45.stackFromEnum(Ammo45ACP.STOCK)); - bullet.spread *= inaccuracy; - bullet.dmgMax = 12; - bullet.dmgMin = 16; - - bullet.spentCasing = CASING45; - - return bullet; - } - - public static BulletConfiguration get45AutoAPConfig() { - BulletConfiguration bullet = get45AutoConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_45.stackFromEnum(Ammo45ACP.AP)); - bullet.dmgMax = 18; - bullet.dmgMin = 26; - bullet.wear = 15; - bullet.leadChance = 10; - - bullet.spentCasing = CASING45; - - return bullet; - } - - public static BulletConfiguration get45AutoDUConfig() { - BulletConfiguration bullet = get45AutoConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_45.stackFromEnum(Ammo45ACP.DU)); - bullet.dmgMax = 30; - bullet.dmgMin = 44; - bullet.wear = 25; - bullet.leadChance = 50; - - bullet.spentCasing = CASING45; - - return bullet; - } -} diff --git a/src/main/java/com/hbm/handler/guncfg/Gun4GaugeFactory.java b/src/main/java/com/hbm/handler/guncfg/Gun4GaugeFactory.java deleted file mode 100644 index 8869e7259c..0000000000 --- a/src/main/java/com/hbm/handler/guncfg/Gun4GaugeFactory.java +++ /dev/null @@ -1,522 +0,0 @@ -package com.hbm.handler.guncfg; - -import java.util.ArrayList; -import java.util.List; - -import com.hbm.entity.projectile.EntityBulletBaseNT; -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.CasingEjector; -import com.hbm.handler.GunConfiguration; -import com.hbm.inventory.RecipesCommon.ComparableStack; -import com.hbm.items.ModItems; -import com.hbm.items.weapon.sedna.Crosshair; -import com.hbm.items.ItemAmmoEnums.Ammo4Gauge; -import com.hbm.lib.HbmCollection; -import com.hbm.lib.HbmCollection.EnumGunManufacturer; -import com.hbm.main.ResourceManager; -import com.hbm.lib.ModDamageSource; -import com.hbm.packet.PacketDispatcher; -import com.hbm.packet.toclient.AuxParticlePacketNT; -import com.hbm.particle.SpentCasing; -import com.hbm.particle.SpentCasing.CasingType; -import com.hbm.potion.HbmPotion; -import com.hbm.render.anim.BusAnimation; -import com.hbm.render.anim.BusAnimationSequence; -import com.hbm.render.anim.HbmAnimations.AnimType; -import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint; -import net.minecraft.entity.EntityCreature; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.potion.PotionEffect; -import net.minecraft.util.Vec3; -import net.minecraftforge.common.IExtendedEntityProperties; - -public class Gun4GaugeFactory { - - private static final CasingEjector EJECTOR_SHOTGUN; - private static final SpentCasing CASING4GAUGE; - - static { - EJECTOR_SHOTGUN = new CasingEjector().setMotion(Vec3.createVectorHelper(-0.4, 0.4, 0)).setOffset(Vec3.createVectorHelper(-0.5, 0, 0.5)).setAngleRange(0.01F, 0.03F); - CASING4GAUGE = new SpentCasing(CasingType.SHOTGUN).setScale(2.5F).setBounceMotion(0.01F, 0.03F); - } - - private static GunConfiguration getShotgunConfig() { - - GunConfiguration config = new GunConfiguration(); - - config.rateOfFire = 15; - config.roundsPerCycle = 1; - config.gunMode = GunConfiguration.MODE_NORMAL; - config.firingMode = GunConfiguration.FIRE_MANUAL; - config.reloadDuration = 10; - config.firingDuration = 0; - config.ammoCap = 4; - config.reloadType = GunConfiguration.RELOAD_SINGLE; - config.allowsInfinity = true; - config.hasSights = true; - config.absoluteFOV = true; - config.zoomFOV = 0.5F; - config.crosshair = Crosshair.L_CIRCLE; - config.reloadSound = GunConfiguration.RSOUND_SHOTGUN; - - config.ejector = EJECTOR_SHOTGUN; - - return config; - } - - public static GunConfiguration getKS23Config() { - - GunConfiguration config = getShotgunConfig(); - - config.durability = 3000; - config.reloadSound = GunConfiguration.RSOUND_SHOTGUN; - config.reloadSoundEnd = false; - config.firingSound = "hbm:weapon.revolverShootAlt"; - config.firingPitch = 0.65F; - - config.ejector = EJECTOR_SHOTGUN.clone().setDelay(10); - - config.name = "ks23"; - config.manufacturer = EnumGunManufacturer.TULSKY; - - config.emptyReloadAdditionalDuration = 5; - - config.reloadAnimationsSequential = true; - - config.loadAnimations = i -> { - config.animations.put(AnimType.CYCLE, ResourceManager.ks23_anim.get("Fire")); - config.animations.put(AnimType.RELOAD, ResourceManager.ks23_anim.get("ReloadStart")); - config.animations.put(AnimType.RELOAD_EMPTY, ResourceManager.ks23_anim.get("ReloadEmptyStart")); - config.animations.put(AnimType.RELOAD_CYCLE, ResourceManager.ks23_anim.get("Reload")); - config.animations.put(AnimType.RELOAD_END, ResourceManager.ks23_anim.get("ReloadEnd")); - }; - - config.config = HbmCollection.g4; - - return config; - } - - public static GunConfiguration getSauerConfig() { - - GunConfiguration config = getShotgunConfig(); - - config.rateOfFire = 20; - config.ammoCap = 0; - config.reloadType = GunConfiguration.RELOAD_NONE; - config.firingMode = GunConfiguration.FIRE_AUTO; - config.durability = 3000; - config.reloadSound = GunConfiguration.RSOUND_SHOTGUN; - config.firingSound = "hbm:weapon.sauergun"; - config.firingPitch = 1.0F; - - config.ejector = EJECTOR_SHOTGUN.clone().setDelay(12); - - config.name = "sauer"; - config.manufacturer = EnumGunManufacturer.CUBE; - - config.animations.put(AnimType.CYCLE, new BusAnimation() - .addBus("SAUER_RECOIL", new BusAnimationSequence() - .addPos(0.5, 0, 0, 50) - .addPos(0, 0, 0, 50) - ) - .addBus("SAUER_TILT", new BusAnimationSequence() - .addPos(0.0, 0, 0, 200) // do nothing for 200ms - .addPos(0, 0, 30, 150) //tilt forward - .addPos(45, 0, 30, 150) //tilt sideways - .addPos(45, 0, 30, 200) //do nothing for 200ms (eject) - .addPos(0, 0, 30, 150) //restore sideways - .addPos(0, 0, 0, 150) //restore forward - ) - .addBus("SAUER_COCK", new BusAnimationSequence() - .addPos(0, 0, 0, 500) //do nothing for 500ms - .addPos(1, 0, 0, 100) //pull back lever for 100ms - .addPos(0, 0, 0, 100) //release lever for 100ms - ) - .addBus("SAUER_SHELL_EJECT", new BusAnimationSequence() - .addPos(0, 0, 0, 500) //do nothing for 500ms - .addPos(0, 0, 1, 500) //FLING! - ) - ); - - config.config = HbmCollection.g4; - - return config; - } - - public static BulletConfiguration get4GaugeConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardBuckshotConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_4gauge.stackFromEnum(Ammo4Gauge.STOCK)); - bullet.dmgMin = 5; - bullet.dmgMax = 8; - bullet.bulletsMin *= 2; - bullet.bulletsMax *= 2; - - bullet.spentCasing = CASING4GAUGE.clone().register("4GaStock").setColor(0xFFD800, SpentCasing.COLOR_CASE_4GA); - - return bullet; - } - - public static BulletConfiguration get4GaugeSlugConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_4gauge.stackFromEnum(Ammo4Gauge.SLUG)); - bullet.dmgMin = 25; - bullet.dmgMax = 32; - bullet.wear = 7; - bullet.style = BulletConfiguration.STYLE_NORMAL; - - bullet.spentCasing = CASING4GAUGE.clone().register("4GaSlug").setColor(0xE01A1A, SpentCasing.COLOR_CASE_4GA); - - return bullet; - } - - public static BulletConfiguration get4GaugeFlechetteConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardBuckshotConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_4gauge.stackFromEnum(Ammo4Gauge.FLECHETTE)); - bullet.dmgMin = 8; - bullet.dmgMax = 15; - bullet.bulletsMin *= 2; - bullet.bulletsMax *= 2; - bullet.wear = 15; - bullet.style = BulletConfiguration.STYLE_FLECHETTE; - bullet.HBRC = 2; - bullet.LBRC = 95; - BulletConfigFactory.makeFlechette(bullet); - - bullet.spentCasing = CASING4GAUGE.clone().register("4GaFlech").setColor(0x1537FF, SpentCasing.COLOR_CASE_4GA); - - return bullet; - } - - public static BulletConfiguration get4GaugeFlechettePhosphorusConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardBuckshotConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_4gauge.stackFromEnum(Ammo4Gauge.FLECHETTE_PHOSPHORUS)); - bullet.dmgMin = 8; - bullet.dmgMax = 15; - bullet.bulletsMin *= 2; - bullet.bulletsMax *= 2; - bullet.wear = 15; - bullet.style = BulletConfiguration.STYLE_FLECHETTE; - bullet.HBRC = 2; - bullet.LBRC = 95; - bullet.incendiary = 5; - - PotionEffect eff = new PotionEffect(HbmPotion.phosphorus.id, 20 * 20, 0, true); - eff.getCurativeItems().clear(); - bullet.effects = new ArrayList(); - bullet.effects.add(new PotionEffect(eff)); - - bullet.bntImpact = (bulletnt, x, y, z, sideHit) -> { - - NBTTagCompound data = new NBTTagCompound(); - data.setString("type", "vanillaburst"); - data.setString("mode", "flame"); - data.setInteger("count", 15); - data.setDouble("motion", 0.05D); - - PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data, bulletnt.posX, bulletnt.posY, bulletnt.posZ), new TargetPoint(bulletnt.dimension, bulletnt.posX, bulletnt.posY, bulletnt.posZ, 50)); - }; - - bullet.spentCasing = CASING4GAUGE.clone().register("4GaPhos").setColor(0xF6871A, SpentCasing.COLOR_CASE_4GA); - - return bullet; - } - - public static BulletConfiguration get4GaugeExplosiveConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardGrenadeConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_4gauge.stackFromEnum(Ammo4Gauge.EXPLOSIVE)); - bullet.velocity *= 2; - bullet.gravity *= 2; - bullet.dmgMin = 20; - bullet.dmgMax = 25; - bullet.wear = 25; - bullet.trail = 1; - - bullet.spentCasing = CASING4GAUGE.clone().register("4GaExp").setColor(0x3F8243, SpentCasing.COLOR_CASE_4GA); - - return bullet; - } - - public static BulletConfiguration get4GaugeMiningConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardGrenadeConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_4gauge.stackFromEnum(Ammo4Gauge.MINING)); - bullet.velocity *= 2; - bullet.gravity *= 2; - bullet.dmgMin = 10; - bullet.dmgMax = 15; - bullet.wear = 25; - bullet.trail = 1; - bullet.explosive = 0.0F; - - bullet.bntImpact = (bulletnt, x, y, z, sideHit) -> { - - if(bulletnt.worldObj.isRemote) - return; - - ExplosionNT explosion = new ExplosionNT(bulletnt.worldObj, null, bulletnt.posX, bulletnt.posY, bulletnt.posZ, 4); - explosion.atttributes.add(ExAttrib.ALLDROP); - explosion.atttributes.add(ExAttrib.NOHURT); - explosion.doExplosionA(); - explosion.doExplosionB(false); - - ExplosionLarge.spawnParticles(bulletnt.worldObj, bulletnt.posX, bulletnt.posY, bulletnt.posZ, 15); - }; - - bullet.spentCasing = CASING4GAUGE.clone().register("4GaSem").setColor(0x5C5C5C, SpentCasing.COLOR_CASE_4GA); - - return bullet; - } - - public static BulletConfiguration get4GaugeBalefireConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardGrenadeConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_4gauge.stackFromEnum(Ammo4Gauge.BALEFIRE)); - bullet.velocity *= 2; - bullet.gravity *= 2; - bullet.dmgMin = 50; - bullet.dmgMax = 65; - bullet.wear = 25; - bullet.trail = 1; - bullet.explosive = 0.0F; - - bullet.bntImpact = (bulletnt, x, y, z, sideHit) -> { - - if(bulletnt.worldObj.isRemote) - return; - - ExplosionNT explosion = new ExplosionNT(bulletnt.worldObj, null, bulletnt.posX, bulletnt.posY, bulletnt.posZ, 6); - explosion.atttributes.add(ExAttrib.BALEFIRE); - explosion.doExplosionA(); - explosion.doExplosionB(false); - - ExplosionLarge.spawnParticles(bulletnt.worldObj, bulletnt.posX, bulletnt.posY, bulletnt.posZ, 30); - }; - - bullet.spentCasing = CASING4GAUGE.clone().register("4GaBale").setColor(0x7BFF44, SpentCasing.COLOR_CASE_4GA); - - return bullet; - } - - public static BulletConfiguration getGrenadeKampfConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardRocketConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_4gauge.stackFromEnum(Ammo4Gauge.KAMPF)); - bullet.spread = 0.0F; - bullet.gravity = 0.0D; - bullet.wear = 15; - bullet.explosive = 3.5F; - bullet.style = BulletConfiguration.STYLE_GRENADE; - bullet.trail = 4; - bullet.vPFX = "smoke"; - - bullet.spentCasing = CASING4GAUGE.clone().register("4GaKampf").setColor(0xE7BA48, SpentCasing.COLOR_CASE_4GA); - - return bullet; - } - - public static BulletConfiguration getGrenadeCanisterConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardRocketConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_4gauge.stackFromEnum(Ammo4Gauge.CANISTER)); - bullet.spread = 0.0F; - bullet.gravity = 0.0D; - bullet.wear = 15; - bullet.explosive = 1F; - bullet.style = BulletConfiguration.STYLE_GRENADE; - bullet.trail = 4; - bullet.vPFX = "smoke"; - - bullet.bntUpdate = (bulletnt) -> { - - if(!bulletnt.worldObj.isRemote) { - - if(bulletnt.ticksExisted > 10) { - bulletnt.setDead(); - - for(int i = 0; i < 50; i++) { - - EntityBulletBaseNT bolt = new EntityBulletBaseNT(bulletnt.worldObj, BulletConfigSyncingUtil.M44_AP); - bolt.setPosition(bulletnt.posX, bulletnt.posY, bulletnt.posZ); - bolt.setThrowableHeading(bulletnt.motionX, bulletnt.motionY, bulletnt.motionZ, 0.25F, 0.1F); - bolt.setThrower(bulletnt.getThrower()); - bulletnt.worldObj.spawnEntityInWorld(bolt); - } - } - } - }; - - bullet.spentCasing = CASING4GAUGE.clone().register("4GaCan").setColor(0xCACACA, SpentCasing.COLOR_CASE_4GA); - - return bullet; - } - - public static BulletConfiguration get4GaugeSleekConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardAirstrikeConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_4gauge.stackFromEnum(Ammo4Gauge.SLEEK)); - - bullet.spentCasing = CASING4GAUGE.clone().register("4GaIF").setColor(0x1D1D1D, SpentCasing.COLOR_CASE_4GA); - - return bullet; - } - - public static BulletConfiguration get4GaugeClawConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardBuckshotConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_4gauge.stackFromEnum(Ammo4Gauge.CLAW)); - bullet.dmgMin = 6; - bullet.dmgMax = 9; - bullet.bulletsMin *= 2; - bullet.bulletsMax *= 2; - bullet.leadChance = 100; - - bullet.bntHurt = (bulletnt, hit) -> { - - if(bulletnt.worldObj.isRemote) - return; - - if(hit instanceof EntityLivingBase) { - EntityLivingBase living = (EntityLivingBase) hit; - float f = living.getHealth(); - - if(f > 0) { - f = Math.max(0, f - 2); - living.setHealth(f); - - if(f == 0) - living.onDeath(ModDamageSource.causeBulletDamage(bulletnt, hit)); - } - } - }; - - bullet.spentCasing = CASING4GAUGE.clone().register("4GaClaw").setColor(0x5E38CC, SpentCasing.COLOR_CASE_4GA); - - return bullet; - } - - public static BulletConfiguration get4GaugeVampireConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardBuckshotConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_4gauge.stackFromEnum(Ammo4Gauge.VAMPIRE)); - bullet.dmgMin = 6; - bullet.dmgMax = 9; - bullet.bulletsMin *= 2; - bullet.bulletsMax *= 2; - bullet.leadChance = 100; - bullet.style = BulletConfiguration.STYLE_FLECHETTE; - - bullet.bntHurt = (bulletnt, hit) -> { - - if(bulletnt.worldObj.isRemote) - return; - - if(hit instanceof EntityPlayer) { - EntityPlayer player = (EntityPlayer) hit; - - IExtendedEntityProperties prop = player.getExtendedProperties("WitcheryExtendedPlayer"); - - NBTTagCompound blank = new NBTTagCompound(); - blank.setTag("WitcheryExtendedPlayer", new NBTTagCompound()); - - if(prop != null) { - prop.loadNBTData(blank); - } - } - }; - - bullet.spentCasing = CASING4GAUGE.clone().register("4GaVamp").setColor(0x278400, SpentCasing.COLOR_CASE_4GA); - - return bullet; - } - - public static BulletConfiguration get4GaugeVoidConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardBuckshotConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_4gauge.stackFromEnum(Ammo4Gauge.VOID)); - bullet.dmgMin = 6; - bullet.dmgMax = 9; - bullet.bulletsMin *= 2; - bullet.bulletsMax *= 2; - bullet.leadChance = 0; - - bullet.bntHurt = (bulletnt, hit) -> { - - if(bulletnt.worldObj.isRemote) - return; - - if(hit instanceof EntityPlayer) { - EntityPlayer player = (EntityPlayer) hit; - - player.inventory.dropAllItems(); - player.worldObj.newExplosion(bulletnt.getThrower(), player.posX, player.posY, player.posZ, 5.0F, true, true); - } - }; - - bullet.spentCasing = CASING4GAUGE.clone().register("4GaVoid").setColor(0x3F3F3F, SpentCasing.COLOR_CASE_4GA); - - return bullet; - } - - public static BulletConfiguration get4GaugeQuackConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardRocketConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_4gauge.stackFromEnum(Ammo4Gauge.QUACK)); - 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.bntUpdate = (bulletnt) -> { - - if(!bulletnt.worldObj.isRemote) { - if(bulletnt.ticksExisted % 2 == 0) { - - List creatures = bulletnt.worldObj.getEntitiesWithinAABB(EntityCreature.class, bulletnt.boundingBox.expand(10, 10, 10)); - for(EntityCreature creature : creatures) { - - if(creature.getClass().getCanonicalName().startsWith("net.minecraft.entity.titan")) { - BulletConfigFactory.nuclearExplosion(creature, 0, 0, 0, ExplosionNukeSmall.PARAMS_TOTS); - - bulletnt.worldObj.removeEntity(creature); - bulletnt.worldObj.unloadEntities(new ArrayList() {{ add(creature); }}); - } - } - } - } - }; - - bullet.spentCasing = CASING4GAUGE.clone().register("4GaDucc").setColor(0x1E1E1E, SpentCasing.COLOR_CASE_4GA); - - return bullet; - } -} diff --git a/src/main/java/com/hbm/handler/guncfg/Gun50AEFactory.java b/src/main/java/com/hbm/handler/guncfg/Gun50AEFactory.java deleted file mode 100644 index b4fa21a95d..0000000000 --- a/src/main/java/com/hbm/handler/guncfg/Gun50AEFactory.java +++ /dev/null @@ -1,129 +0,0 @@ -package com.hbm.handler.guncfg; - -import com.hbm.handler.BulletConfiguration; -import com.hbm.handler.CasingEjector; -import com.hbm.handler.GunConfiguration; -import com.hbm.inventory.RecipesCommon.ComparableStack; -import com.hbm.items.ModItems; -import com.hbm.items.weapon.sedna.Crosshair; -import com.hbm.items.ItemAmmoEnums.Ammo50AE; -import com.hbm.lib.HbmCollection; -import com.hbm.lib.HbmCollection.EnumGunManufacturer; -import com.hbm.particle.SpentCasing; -import com.hbm.particle.SpentCasing.CasingType; - -public class Gun50AEFactory { - - private static final CasingEjector EJECTOR_PISTOL; - private static final SpentCasing CASING50AE; - - static { - EJECTOR_PISTOL = new CasingEjector().setMotion(-0.3, 0.7, 0).setOffset(-0.5, 0, 0.5).setAngleRange(0.01F, 0.03F); - CASING50AE = new SpentCasing(CasingType.STRAIGHT).setScale(1.5F).setBounceMotion(0.01F, 0.03F).setColor(SpentCasing.COLOR_CASE_BRASS).setupSmoke(0.25F, 0.5D, 60, 20); - } - - public static GunConfiguration getBaseConfig() { - - GunConfiguration config = new GunConfiguration(); - - config.rateOfFire = 10; - config.roundsPerCycle = 1; - config.gunMode = GunConfiguration.MODE_NORMAL; - config.firingMode = GunConfiguration.FIRE_MANUAL; - config.reloadDuration = 10; - config.firingDuration = 0; - config.ammoCap = 7; - config.reloadType = GunConfiguration.RELOAD_FULL; - config.allowsInfinity = true; - config.crosshair = Crosshair.L_CLASSIC; - config.reloadSound = GunConfiguration.RSOUND_REVOLVER; - config.firingSound = "hbm:weapon.deagleShoot"; - config.reloadSoundEnd = false; - - return config; - } - - public static GunConfiguration getDeagleConfig() { - - GunConfiguration config = getBaseConfig(); - - config.durability = 2500; - - config.name = "deagle"; - config.manufacturer = EnumGunManufacturer.MAGNUM_R_IMI; - - config.absoluteFOV = true; - config.zoomFOV = 0.5F; - - config.hasSights = true; - config.config = HbmCollection.ae50; - - config.ejector = EJECTOR_PISTOL; - - return config; - } - - private static float inaccuracy = 0.0005F; - public static BulletConfiguration get50AEConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_50ae.stackFromEnum(Ammo50AE.STOCK)); - bullet.spread *= inaccuracy; - bullet.dmgMin = 28; - bullet.dmgMax = 32; - - bullet.spentCasing = CASING50AE.clone().register("50AEStock"); - - return bullet; - } - - public static BulletConfiguration get50APConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_50ae.stackFromEnum(Ammo50AE.AP)); - bullet.spread *= inaccuracy; - bullet.dmgMin = 30; - bullet.dmgMax = 36; - bullet.leadChance = 10; - bullet.wear = 15; - - bullet.spentCasing = CASING50AE.clone().register("50AEAP"); - - return bullet; - } - - public static BulletConfiguration get50DUConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_50ae.stackFromEnum(Ammo50AE.DU)); - bullet.spread *= inaccuracy; - bullet.dmgMin = 38; - bullet.dmgMax = 46; - bullet.leadChance = 50; - bullet.wear = 25; - - bullet.spentCasing = CASING50AE.clone().register("50AEDU"); - - return bullet; - } - - public static BulletConfiguration get50StarConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_50ae.stackFromEnum(Ammo50AE.STAR)); - bullet.spread *= inaccuracy; - bullet.dmgMin = 52; - bullet.dmgMax = 60; - bullet.leadChance = 100; - bullet.wear = 25; - - bullet.spentCasing = CASING50AE.clone().register("50AEStar"); - - return bullet; - } - -} diff --git a/src/main/java/com/hbm/handler/guncfg/Gun50BMGFactory.java b/src/main/java/com/hbm/handler/guncfg/Gun50BMGFactory.java deleted file mode 100644 index 846d931b96..0000000000 --- a/src/main/java/com/hbm/handler/guncfg/Gun50BMGFactory.java +++ /dev/null @@ -1,488 +0,0 @@ -package com.hbm.handler.guncfg; - -import java.util.ArrayList; - -import com.hbm.entity.projectile.EntityBulletBaseNT; -import com.hbm.handler.BulletConfigSyncingUtil; -import com.hbm.handler.BulletConfiguration; -import com.hbm.handler.CasingEjector; -import com.hbm.handler.GunConfiguration; -import com.hbm.inventory.RecipesCommon.ComparableStack; -import com.hbm.items.ModItems; -import com.hbm.items.weapon.sedna.Crosshair; -import com.hbm.items.ItemAmmoEnums.Ammo50BMG; -import com.hbm.items.ItemAmmoEnums.AmmoLunaticSniper; -import com.hbm.lib.HbmCollection; -import com.hbm.lib.RefStrings; -import com.hbm.lib.HbmCollection.EnumGunManufacturer; -import com.hbm.packet.PacketDispatcher; -import com.hbm.packet.toclient.AuxParticlePacketNT; -import com.hbm.particle.SpentCasing; -import com.hbm.particle.SpentCasing.CasingType; -import com.hbm.potion.HbmPotion; -import com.hbm.render.anim.BusAnimation; -import com.hbm.render.anim.BusAnimationSequence; -import com.hbm.render.anim.HbmAnimations.AnimType; -import com.hbm.util.ContaminationUtil; -import com.hbm.util.ContaminationUtil.ContaminationType; -import com.hbm.util.ContaminationUtil.HazardType; - -import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.potion.PotionEffect; -import net.minecraft.util.ResourceLocation; - -public class Gun50BMGFactory { - - private static final CasingEjector EJECTOR_BMG; - private static final CasingEjector EJECTOR_SNIPER; - private static final SpentCasing CASING50BMG; - private static final SpentCasing CASINGLUNA; - - static { - EJECTOR_BMG = new CasingEjector().setMotion(-0.35, 0.9, 0).setOffset(-0.45, -0.2, 0.35).setAngleRange(0.01F, 0.05F); - EJECTOR_SNIPER = new CasingEjector().setMotion(-2, 0.15, 0).setOffset(-0.45, -0.2, 0.35).setAngleRange(0.02F, 0.05F); - CASING50BMG = new SpentCasing(CasingType.BOTTLENECK).setScale(3F).setBounceMotion(0.01F, 0.05F).setColor(SpentCasing.COLOR_CASE_BRASS).setupSmoke(0.125F, 0.5D, 60, 20); - CASINGLUNA = new SpentCasing(CasingType.BOTTLENECK).setScale(4F).setBounceMotion(0.02F, 0.05F).setColor(SpentCasing.COLOR_CASE_BRASS).setupSmoke(0.125F, 0.5D, 60, 30); - } - - public static BulletConfiguration getLunaticSabotRound() { - BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_luna_sniper.stackFromEnum(AmmoLunaticSniper.SABOT)); - bullet.spread = 0.0F; - bullet.dmgMax = 500F; - bullet.dmgMin = 450F; - bullet.headshotMult = 2.5F; - bullet.wear = 2000; - bullet.velocity = 10F; - bullet.doesPenetrate = true; - bullet.leadChance = 20; - - bullet.blockDamage = false; - bullet.bntImpact = (projectile, x, y, z, sideHit) -> projectile.worldObj.newExplosion(projectile, x, y, z, 2.0F, false, false); - - bullet.spentCasing = CASINGLUNA.clone().register("LunaStock"); - - return bullet; - } - - public static BulletConfiguration getLunaticIncendiaryRound() { - BulletConfiguration bullet = getLunaticSabotRound().clone(); - - bullet.ammo = new ComparableStack(ModItems.ammo_luna_sniper.stackFromEnum(AmmoLunaticSniper.INCENDIARY)); - - bullet.ammo.meta = 1; - bullet.incendiary = 10; - bullet.bntImpact = (projectile, x, y, z, sideHit) -> projectile.worldObj.newExplosion(projectile, x, y, z, 5.0F, true, false); - - bullet.spentCasing = CASINGLUNA.clone().register("LunaInc"); - - return bullet; - } - - public static BulletConfiguration getLunaticExplosiveRound() { - BulletConfiguration bullet = getLunaticSabotRound().clone(); - - bullet.ammo = new ComparableStack(ModItems.ammo_luna_sniper.stackFromEnum(AmmoLunaticSniper.EXPLOSIVE)); - - bullet.ammo.meta = 2; - bullet.explosive = 25; - bullet.destroysBlocks = true; - bullet.bntImpact = (projectile, x, y, z, sideHit) -> projectile.worldObj.newExplosion(projectile, x, y, z, 25.0F, true, false); - - bullet.spentCasing = CASINGLUNA.clone().register("LunaExp"); - - return bullet; - } - - public static GunConfiguration getAR15Config() { - - GunConfiguration config = new GunConfiguration(); - - config.rateOfFire = 1; - config.roundsPerCycle = 1; - config.gunMode = GunConfiguration.MODE_NORMAL; - config.firingMode = GunConfiguration.FIRE_AUTO; - config.reloadDuration = 20; - config.firingDuration = 0; - config.reloadSoundEnd = false; - config.ammoCap = 50; - config.reloadType = GunConfiguration.RELOAD_FULL; - config.allowsInfinity = true; - config.crosshair = Crosshair.NONE; - config.durability = 100_000; - config.reloadSound = GunConfiguration.RSOUND_MAG; - config.firingSound = "hbm:turret.howard_fire"; - - config.name = "ar15_50"; - config.manufacturer = EnumGunManufacturer.ARMALITE; - - config.config = new ArrayList(); - config.config.add(BulletConfigSyncingUtil.BMG50_FLECHETTE_AM); - config.config.add(BulletConfigSyncingUtil.BMG50_FLECHETTE_PO); - config.config.add(BulletConfigSyncingUtil.BMG50_FLECHETTE_NORMAL); - config.config.add(BulletConfigSyncingUtil.BMG50_NORMAL); - config.config.add(BulletConfigSyncingUtil.BMG50_INCENDIARY); - config.config.add(BulletConfigSyncingUtil.BMG50_PHOSPHORUS); - config.config.add(BulletConfigSyncingUtil.BMG50_EXPLOSIVE); - config.config.add(BulletConfigSyncingUtil.BMG50_AP); - config.config.add(BulletConfigSyncingUtil.BMG50_DU); - config.config.add(BulletConfigSyncingUtil.BMG50_STAR); - config.config.add(BulletConfigSyncingUtil.CHL_BMG50); - config.config.add(BulletConfigSyncingUtil.BMG50_SLEEK); - - config.ejector = EJECTOR_BMG; - - config.animations.put(AnimType.CYCLE, new BusAnimation() - .addBus("RECOIL", new BusAnimationSequence() - .addPos(1, 0, 0, 25) - .addPos(0, 0, 0, 75) - ) - ); - config.animations.put(AnimType.RELOAD, new BusAnimation() - .addBus("TILT", new BusAnimationSequence() - .addPos(1, 0, 0, 125) - .addPos(1, 0, 0, 750) - .addPos(0, 0, 0, 125) - ) - .addBus("MAG", new BusAnimationSequence() - .addPos(0, 0, 1, 200) - .addPos(1, 0, 1, 200) - .addPos(0, 0, 0, 200) - ) - ); - - return config; - } - - public static GunConfiguration getAR15BurstConfig(){ - GunConfiguration config = getAR15Config(); - config.rateOfFire = 4; - config.roundsPerBurst = 3; - config.firingDuration = 2; - config.gunMode = GunConfiguration.MODE_NORMAL; - config.firingMode = GunConfiguration.FIRE_BURST; - - return config; - } - - public static GunConfiguration getM2Config() { - GunConfiguration config = getAR15Config(); - - config.rateOfFire = 2; - config.durability *= 10; - config.ammoCap = 0; - config.crosshair = Crosshair.L_BOX; - config.reloadType = GunConfiguration.RELOAD_NONE; - config.hasSights = true; - config.zoomFOV = 0.66F; - config.allowsInfinity = true; - config.durability = 10_000; - config.firingSound = "hbm:turret.chekhov_fire"; - config.equipSound = "hbm:turret.howard_reload"; - - config.name = "m2"; - config.manufacturer = EnumGunManufacturer.COLT; - config.comment.add("\"A single man can do unbelievable things..."); - config.comment.add("A single man with a .50 cal machine gun can do even more.\""); - - config.animations.put(AnimType.CYCLE, new BusAnimation() - .addBus("RECOIL", new BusAnimationSequence() - .addPos(1, 0, 0, 25) - .addPos(0, 0, 0, 75) - ) - ); - - config.ejector = EJECTOR_BMG; - - config.config.clear(); - config.config.addAll(HbmCollection.bmg50); - - return config; - } - - public static final ResourceLocation scope_luna = new ResourceLocation(RefStrings.MODID, "textures/misc/scope_luna.png"); - - public static GunConfiguration getLunaticMarksman() { - GunConfiguration config = new GunConfiguration(); - - config.rateOfFire = 15; - config.reloadDuration = 15; - config.firingMode = GunConfiguration.FIRE_MANUAL; - config.roundsPerCycle = 1; - config.firingSound = "hbm:weapon.hicalShot"; - config.firingPitch = 0.75F; - config.ammoCap = 4; - config.reloadType = GunConfiguration.RELOAD_SINGLE; - config.hasSights = true; - config.zoomFOV = 0.2F; //x5 magnification - config.scopeTexture = scope_luna; - config.allowsInfinity = true; - config.crosshair = Crosshair.L_CLASSIC; - config.reloadSound = GunConfiguration.RSOUND_SHOTGUN; - config.reloadSoundEnd = true; - config.durability = 500_000; - - config.name = "lunaSniper"; - config.manufacturer = EnumGunManufacturer.LUNA; - config.comment.add("\"You do not spark joy\""); - - config.config = new ArrayList(); - config.config.add(BulletConfigSyncingUtil.ROUND_LUNA_SNIPER_SABOT); - config.config.add(BulletConfigSyncingUtil.ROUND_LUNA_SNIPER_INCENDIARY); - config.config.add(BulletConfigSyncingUtil.ROUND_LUNA_SNIPER_EXPLOSIVE); - - config.animations.put(AnimType.CYCLE, - new BusAnimation() - .addBus("RECOIL", new BusAnimationSequence() - .addPos(-0.45, 0.15, 0, 40) // Moves back and raise slightly - .addPos(0, 0, 0, 75)) // Then forward again - .addBus("EJECT", new BusAnimationSequence().addPos(0, 0, 0, 30) // Wait - .addPos(50, 0, 0, 120))); // Fly // out - - config.ejector = EJECTOR_SNIPER; - return config; - } - - static float inaccuracy = 2.5F; - public static BulletConfiguration get50BMGConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_50bmg.stackFromEnum(Ammo50BMG.STOCK)); - bullet.spread *= inaccuracy; - bullet.dmgMin = 30; - bullet.dmgMax = 36; - - bullet.spentCasing = CASING50BMG.clone().register("50BMGStock"); - - return bullet; - } - - public static BulletConfiguration get50BMGFireConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_50bmg.stackFromEnum(Ammo50BMG.INCENDIARY)); - bullet.spread *= inaccuracy; - bullet.dmgMin = 30; - bullet.dmgMax = 36; - bullet.wear = 15; - bullet.incendiary = 5; - - bullet.spentCasing = CASING50BMG.clone().register("50BMGInc"); - - return bullet; - } - - public static BulletConfiguration get50BMGPhosphorusConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_50bmg.stackFromEnum(Ammo50BMG.PHOSPHORUS)); - bullet.spread *= inaccuracy; - bullet.dmgMin = 30; - bullet.dmgMax = 36; - bullet.wear = 15; - bullet.incendiary = 5; - bullet.doesPenetrate = false; - - PotionEffect eff = new PotionEffect(HbmPotion.phosphorus.id, 20 * 20, 0, true); - eff.getCurativeItems().clear(); - bullet.effects = new ArrayList(); - bullet.effects.add(new PotionEffect(eff)); - - bullet.bntImpact = (bulletnt, x, y, z, sideHit) -> { - - NBTTagCompound data = new NBTTagCompound(); - data.setString("type", "vanillaburst"); - data.setString("mode", "flame"); - data.setInteger("count", 15); - data.setDouble("motion", 0.05D); - - PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data, bulletnt.posX, bulletnt.posY, bulletnt.posZ), new TargetPoint(bulletnt.dimension, bulletnt.posX, bulletnt.posY, bulletnt.posZ, 50)); - }; - - bullet.spentCasing = CASING50BMG.clone().register("50BMGPhos"); - - return bullet; - } - - public static BulletConfiguration get50BMGExplosiveConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_50bmg.stackFromEnum(Ammo50BMG.EXPLOSIVE)); - bullet.spread *= inaccuracy; - bullet.dmgMin = 60; - bullet.dmgMax = 64; - bullet.wear = 25; - bullet.explosive = 1; - - bullet.spentCasing = CASING50BMG.clone().register("50BMGExp"); - - return bullet; - } - - public static BulletConfiguration get50BMGAPConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_50bmg.stackFromEnum(Ammo50BMG.AP)); - bullet.spread *= inaccuracy; - bullet.dmgMin = 62; - bullet.dmgMax = 68; - bullet.wear = 15; - bullet.leadChance = 10; - - bullet.spentCasing = CASING50BMG.clone().register("50BMGAP"); - - return bullet; - } - - public static BulletConfiguration get50BMGDUConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_50bmg.stackFromEnum(Ammo50BMG.DU)); - bullet.spread *= inaccuracy; - bullet.dmgMin = 80; - bullet.dmgMax = 86; - bullet.wear = 25; - bullet.leadChance = 50; - - bullet.spentCasing = CASING50BMG.clone().register("50BMGDU"); - - return bullet; - } - - public static BulletConfiguration get50BMGStarConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_50bmg.stackFromEnum(Ammo50BMG.STAR)); - bullet.spread *= inaccuracy; - bullet.dmgMin = 98; - bullet.dmgMax = 102; - bullet.wear = 25; - bullet.leadChance = 100; - - bullet.spentCasing = CASING50BMG.clone().register("50BMGStar"); - - return bullet; - } - - public static BulletConfiguration get50BMGSleekConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_50bmg.stackFromEnum(Ammo50BMG.SLEEK)); - bullet.spread *= inaccuracy; - bullet.dmgMin = 50; - bullet.dmgMax = 70; - bullet.wear = 10; - bullet.leadChance = 100; - bullet.doesPenetrate = false; - - bullet.bntHit = (bulletnt, hit) -> { - - if(bulletnt.worldObj.isRemote) - return; - - EntityBulletBaseNT meteor = new EntityBulletBaseNT(bulletnt.worldObj, BulletConfigSyncingUtil.MASKMAN_METEOR); - meteor.setPosition(hit.posX, hit.posY + 30 + meteor.worldObj.rand.nextInt(10), hit.posZ); - meteor.motionY = -1D; - meteor.setThrower(bulletnt.getThrower()); - bulletnt.worldObj.spawnEntityInWorld(meteor); - }; - - bullet.bntImpact = (bulletnt, x, y, z, sideHit) -> { - - if(bulletnt.worldObj.isRemote) - return; - - if(y == -1) - return; - - EntityBulletBaseNT meteor = new EntityBulletBaseNT(bulletnt.worldObj, BulletConfigSyncingUtil.MASKMAN_METEOR); - meteor.setPosition(bulletnt.posX, bulletnt.posY + 30 + meteor.worldObj.rand.nextInt(10), bulletnt.posZ); - meteor.motionY = -1D; - meteor.setThrower(bulletnt.getThrower()); - bulletnt.worldObj.spawnEntityInWorld(meteor); - }; - - bullet.spentCasing = CASING50BMG.clone().register("50BMGIF"); - - return bullet; - } - - public static BulletConfiguration get50BMGFlechetteConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_50bmg.stackFromEnum(Ammo50BMG.FLECHETTE)); - bullet.spread *= inaccuracy; - bullet.dmgMin = 50; - bullet.dmgMax = 54; - bullet.style = bullet.STYLE_FLECHETTE; - BulletConfigFactory.makeFlechette(bullet); - - bullet.spentCasing = CASING50BMG.clone().register("50BMGFlech"); - - return bullet; - } - - public static BulletConfiguration get50BMGFlechetteAMConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_50bmg.stackFromEnum(Ammo50BMG.FLECHETTE_AM)); - bullet.spread *= inaccuracy; - bullet.dmgMin = 60; - bullet.dmgMax = 64; - bullet.style = bullet.STYLE_FLECHETTE; - BulletConfigFactory.makeFlechette(bullet); - - bullet.bntHit = (bulletnt, hit) -> { - - if(bulletnt.worldObj.isRemote) - return; - - if(hit instanceof EntityLivingBase) { - ContaminationUtil.contaminate((EntityLivingBase) hit, HazardType.RADIATION, ContaminationType.RAD_BYPASS, 100F); - } - }; - - bullet.spentCasing = CASING50BMG.clone().register("50BMGAM"); - - return bullet; - } - - public static BulletConfiguration get50BMGFlechettePOConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_50bmg.stackFromEnum(Ammo50BMG.FLECHETTE_PO)); - bullet.spread *= inaccuracy; - bullet.dmgMin = 60; - bullet.dmgMax = 64; - bullet.style = bullet.STYLE_FLECHETTE; - BulletConfigFactory.makeFlechette(bullet); - - bullet.bntHit = (bulletnt, hit) -> { - - if(bulletnt.worldObj.isRemote) - return; - - if(hit instanceof EntityLivingBase) { - ContaminationUtil.contaminate((EntityLivingBase) hit, HazardType.RADIATION, ContaminationType.RAD_BYPASS, 50F); - } - }; - - bullet.spentCasing = CASING50BMG.clone().register("50BMGPO"); - - return bullet; - } -} diff --git a/src/main/java/com/hbm/handler/guncfg/Gun556mmFactory.java b/src/main/java/com/hbm/handler/guncfg/Gun556mmFactory.java deleted file mode 100644 index 25f683b8a6..0000000000 --- a/src/main/java/com/hbm/handler/guncfg/Gun556mmFactory.java +++ /dev/null @@ -1,429 +0,0 @@ -package com.hbm.handler.guncfg; - -import java.util.ArrayList; - -import com.hbm.entity.projectile.EntityBulletBaseNT; -import com.hbm.handler.BulletConfigSyncingUtil; -import com.hbm.handler.BulletConfiguration; -import com.hbm.handler.CasingEjector; -import com.hbm.handler.GunConfiguration; -import com.hbm.inventory.RecipesCommon.ComparableStack; -import com.hbm.items.ItemAmmoEnums.Ammo556mm; -import com.hbm.items.ModItems; -import com.hbm.items.weapon.sedna.Crosshair; -import com.hbm.lib.HbmCollection; -import com.hbm.lib.HbmCollection.EnumGunManufacturer; -import com.hbm.packet.PacketDispatcher; -import com.hbm.packet.toclient.AuxParticlePacketNT; -import com.hbm.particle.SpentCasing; -import com.hbm.particle.SpentCasing.CasingType; -import com.hbm.potion.HbmPotion; -import com.hbm.render.anim.BusAnimation; -import com.hbm.render.anim.BusAnimationSequence; -import com.hbm.render.anim.HbmAnimations.AnimType; -import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.potion.PotionEffect; - -public class Gun556mmFactory { - - private static final CasingEjector EJECTOR_RIFLE; - private static final CasingEjector EJECTOR_GRENADE; - private static final SpentCasing CASING556; - - static { - EJECTOR_RIFLE = new CasingEjector().setMotion(-0.35, 0.6, 0).setOffset(-0.35, 0, 0.35).setAngleRange(0.01F, 0.03F); - EJECTOR_GRENADE = new CasingEjector().setAngleRange(0.02F, 0.03F).setDelay(30); - CASING556 = new SpentCasing(CasingType.BOTTLENECK).setScale(1.25F).setBounceMotion(0.01F, 0.03F).setColor(SpentCasing.COLOR_CASE_BRASS); - } - - public static GunConfiguration getEuphieConfig() { - - GunConfiguration config = new GunConfiguration(); - - config.rateOfFire = 2; - config.roundsPerCycle = 1; - config.gunMode = GunConfiguration.MODE_NORMAL; - config.firingMode = GunConfiguration.FIRE_AUTO; - config.hasSights = false; - config.reloadDuration = 20; - config.firingDuration = 0; - config.ammoCap = 40; - config.reloadType = GunConfiguration.RELOAD_FULL; - config.allowsInfinity = true; - config.crosshair = Crosshair.L_CROSS; - config.durability = 10000; - config.reloadSound = GunConfiguration.RSOUND_MAG; - config.firingSound = "hbm:weapon.hksShoot"; - config.reloadSoundEnd = false; - - config.name = "baeAR"; - config.manufacturer = EnumGunManufacturer.BAE; - - config.comment.add("Why is this gun so sticky?"); - - //config.config = new ArrayList(); - //config.config.add(BulletConfigSyncingUtil.R556_GOLD); - - config.config = HbmCollection.r556; - - return config; - } - - public static GunConfiguration getSPIWConfig() { - - GunConfiguration config = new GunConfiguration(); - - config.rateOfFire = 3; - config.roundsPerCycle = 1; - config.gunMode = GunConfiguration.MODE_NORMAL; - config.firingMode = GunConfiguration.FIRE_AUTO; - config.hasSights = true; - config.reloadDuration = 25; - config.firingDuration = 0; - config.ammoCap = 20; - config.reloadType = GunConfiguration.RELOAD_FULL; - config.allowsInfinity = true; - config.crosshair = Crosshair.L_BOX; - config.durability = 7000; - config.reloadSound = GunConfiguration.RSOUND_MAG; - config.firingSound = "hbm:weapon.hksShoot"; - config.reloadSoundEnd = false; - - config.animations.put(AnimType.CYCLE, new BusAnimation() - .addBus("RECOIL", new BusAnimationSequence() - .addPos(0.5, 0, 0, 25) - .addPos(0, 0, 0, 75) - ) - ); - - config.name = "spiw"; - config.manufacturer = EnumGunManufacturer.H_AND_R; - - config.comment.add("Launch some flechettes in the breeze"); - config.comment.add("Find his arms nailed to the trees"); - config.comment.add("Napalm sticks to kids"); - - config.config = HbmCollection.r556Flechette; - - config.ejector = EJECTOR_RIFLE; - - return config; - } - - public static GunConfiguration getGLauncherConfig() { - - GunConfiguration config = new GunConfiguration(); - - config.rateOfFire = 60; - config.roundsPerCycle = 1; - config.gunMode = GunConfiguration.MODE_NORMAL; - config.firingMode = GunConfiguration.FIRE_MANUAL; - config.hasSights = true; - config.reloadDuration = 40; - config.firingDuration = 0; - config.ammoCap = 0; - config.reloadType = GunConfiguration.RELOAD_NONE; - config.allowsInfinity = true; - config.crosshair = Crosshair.L_CIRCUMFLEX; - config.firingSound = "hbm:weapon.glauncher"; - config.reloadSound = GunConfiguration.RSOUND_GRENADE; - config.reloadSoundEnd = false; - - config.config = HbmCollection.grenade; - - config.ejector = EJECTOR_GRENADE; - - return config; - } - - private static float inaccuracy = 2.5F; - public static BulletConfiguration get556Config() { - - BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_556.stackFromEnum(Ammo556mm.STOCK)); - bullet.spread *= inaccuracy; - bullet.dmgMin = 16; - bullet.dmgMax = 20; - - bullet.spentCasing = CASING556.clone().register("556Stock"); - - return bullet; - } - - public static BulletConfiguration get556GoldConfig() { - - BulletConfiguration bullet = get556Config(); - - bullet.ammo = new ComparableStack(ModItems.ammo_556.stackFromEnum(Ammo556mm.GOLD)); - bullet.dmgMin = 250; - bullet.dmgMax = 320; - bullet.spread = 0.0F; - - bullet.spentCasing = null; - - return bullet; - } - - public static BulletConfiguration get556PhosphorusConfig() { - - BulletConfiguration bullet = get556Config(); - - bullet.ammo = new ComparableStack(ModItems.ammo_556.stackFromEnum(Ammo556mm.PHOSPHORUS)); - bullet.wear = 15; - bullet.incendiary = 5; - bullet.doesPenetrate = false; - - PotionEffect eff = new PotionEffect(HbmPotion.phosphorus.id, 20 * 20, 0, true); - eff.getCurativeItems().clear(); - bullet.effects = new ArrayList(); - bullet.effects.add(new PotionEffect(eff)); - - bullet.bntImpact = (bulletnt, x, y, z, sideHit) -> { - - NBTTagCompound data = new NBTTagCompound(); - data.setString("type", "vanillaburst"); - data.setString("mode", "flame"); - data.setInteger("count", 15); - data.setDouble("motion", 0.05D); - - PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data, bulletnt.posX, bulletnt.posY, bulletnt.posZ), new TargetPoint(bulletnt.dimension, bulletnt.posX, bulletnt.posY, bulletnt.posZ, 50)); - }; - - bullet.spentCasing = CASING556.clone().register("556Phos"); - - return bullet; - } - - public static BulletConfiguration get556APConfig() { - - BulletConfiguration bullet = get556Config(); - - bullet.ammo = new ComparableStack(ModItems.ammo_556.stackFromEnum(Ammo556mm.AP)); - bullet.dmgMin = 20; - bullet.dmgMax = 26; - bullet.wear = 15; - bullet.leadChance = 10; - - bullet.spentCasing = CASING556.clone().register("556AP"); - - return bullet; - } - - public static BulletConfiguration get556DUConfig() { - - BulletConfiguration bullet = get556Config(); - - bullet.ammo = new ComparableStack(ModItems.ammo_556.stackFromEnum(Ammo556mm.DU)); - bullet.dmgMin = 24; - bullet.dmgMax = 32; - bullet.wear = 25; - bullet.leadChance = 50; - - bullet.spentCasing = CASING556.clone().register("556DU"); - - return bullet; - } - - public static BulletConfiguration get556StarConfig() { - - BulletConfiguration bullet = get556Config(); - - bullet.ammo = new ComparableStack(ModItems.ammo_556.stackFromEnum(Ammo556mm.STAR)); - bullet.dmgMin = 30; - bullet.dmgMax = 36; - bullet.wear = 25; - bullet.leadChance = 100; - - bullet.spentCasing = CASING556.clone().register("556Star"); - - return bullet; - } - - public static BulletConfiguration get556SleekConfig() { - - BulletConfiguration bullet = get556Config(); - - bullet.ammo = new ComparableStack(ModItems.ammo_556.stackFromEnum(Ammo556mm.SLEEK)); - bullet.dmgMin = 45; - bullet.dmgMax = 50; - bullet.wear = 10; - bullet.leadChance = 100; - bullet.doesPenetrate = false; - - bullet.bntHit = (bulletnt, hit) -> { - - if(bulletnt.worldObj.isRemote) - return; - - EntityBulletBaseNT meteor = new EntityBulletBaseNT(bulletnt.worldObj, BulletConfigSyncingUtil.MASKMAN_METEOR); - meteor.setPosition(hit.posX, hit.posY + 30 + meteor.worldObj.rand.nextInt(10), hit.posZ); - meteor.motionY = -1D; - meteor.setThrower(bulletnt.getThrower()); - bulletnt.worldObj.spawnEntityInWorld(meteor); - }; - - bullet.bntImpact = (bulletnt, x, y, z, sideHit) -> { - - if(bulletnt.worldObj.isRemote) - return; - - if(y == -1) - return; - - EntityBulletBaseNT meteor = new EntityBulletBaseNT(bulletnt.worldObj, BulletConfigSyncingUtil.MASKMAN_METEOR); - meteor.setPosition(bulletnt.posX, bulletnt.posY + 30 + meteor.worldObj.rand.nextInt(10), bulletnt.posZ); - meteor.motionY = -1D; - meteor.setThrower(bulletnt.getThrower()); - bulletnt.worldObj.spawnEntityInWorld(meteor); - }; - - bullet.spentCasing = CASING556.clone().register("556IF"); - - return bullet; - } - - public static BulletConfiguration get556TracerConfig() { - - BulletConfiguration bullet = get556Config(); - - bullet.ammo = new ComparableStack(ModItems.ammo_556.stackFromEnum(Ammo556mm.TRACER)); - bullet.vPFX = "reddust"; - - bullet.spentCasing = CASING556.clone().register("556Trac"); - - return bullet; - } - - public static BulletConfiguration get556FlechetteConfig() { - - BulletConfiguration bullet = get556Config(); - - bullet.ammo = new ComparableStack(ModItems.ammo_556.stackFromEnum(Ammo556mm.FLECHETTE)); - bullet.dmgMin = 26; - bullet.dmgMax = 32; - bullet.HBRC = 2; - bullet.LBRC = 95; - bullet.wear = 15; - bullet.style = BulletConfiguration.STYLE_FLECHETTE; - bullet.doesPenetrate = false; - BulletConfigFactory.makeFlechette(bullet); - - bullet.spentCasing = CASING556.clone().register("556Flec"); - - return bullet; - } - - public static BulletConfiguration get556FlechetteIncendiaryConfig() { - - BulletConfiguration bullet = get556FlechetteConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_556.stackFromEnum(Ammo556mm.FLECHETTE_INCENDIARY)); - bullet.incendiary = 5; - BulletConfigFactory.makeFlechette(bullet); - - bullet.spentCasing = CASING556.clone().register("556FlecInc"); - - return bullet; - } - - public static BulletConfiguration get556FlechettePhosphorusConfig() { - - BulletConfiguration bullet = get556FlechetteConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_556.stackFromEnum(Ammo556mm.FLECHETTE_PHOSPHORUS)); - bullet.incendiary = 5; - - PotionEffect eff = new PotionEffect(HbmPotion.phosphorus.id, 20 * 20, 0, true); - eff.getCurativeItems().clear(); - bullet.effects = new ArrayList(); - bullet.effects.add(new PotionEffect(eff)); - - bullet.bntImpact = (bulletnt, x, y, z, sideHit) -> { - - NBTTagCompound data = new NBTTagCompound(); - data.setString("type", "vanillaburst"); - data.setString("mode", "flame"); - data.setInteger("count", 15); - data.setDouble("motion", 0.05D); - - PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data, bulletnt.posX, bulletnt.posY, bulletnt.posZ), new TargetPoint(bulletnt.dimension, bulletnt.posX, bulletnt.posY, bulletnt.posZ, 50)); - }; - - bullet.spentCasing = CASING556.clone().register("556FlecPhos"); - - return bullet; - } - - public static BulletConfiguration get556FlechetteDUConfig() { - - BulletConfiguration bullet = get556FlechetteConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_556.stackFromEnum(Ammo556mm.FLECHETTE_DU)); - bullet.dmgMin = 46; - bullet.dmgMax = 52; - bullet.wear = 25; - bullet.leadChance = 50; - bullet.doesPenetrate = true; - - bullet.spentCasing = CASING556.clone().register("556FlecDU"); - - return bullet; - } - - public static BulletConfiguration get556FlechetteSleekConfig() { - - BulletConfiguration bullet = get556FlechetteConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_556.stackFromEnum(Ammo556mm.FLECHETTE_SLEEK)); - bullet.dmgMin = 45; - bullet.dmgMax = 50; - bullet.wear = 10; - bullet.leadChance = 50; - bullet.doesPenetrate = false; - - bullet.bntHit = (bulletnt, hit) -> { - - if(bulletnt.worldObj.isRemote) - return; - - EntityBulletBaseNT meteor = new EntityBulletBaseNT(bulletnt.worldObj, BulletConfigSyncingUtil.MASKMAN_METEOR); - meteor.setPosition(hit.posX, hit.posY + 30 + meteor.worldObj.rand.nextInt(10), hit.posZ); - meteor.motionY = -1D; - meteor.setThrower(bulletnt.getThrower()); - bulletnt.worldObj.spawnEntityInWorld(meteor); - }; - - bullet.bntImpact = (bulletnt, x, y, z, sideHit) -> { - - if(bulletnt.worldObj.isRemote) - return; - - if(y == -1) - return; - - EntityBulletBaseNT meteor = new EntityBulletBaseNT(bulletnt.worldObj, BulletConfigSyncingUtil.MASKMAN_METEOR); - meteor.setPosition(bulletnt.posX, bulletnt.posY + 30 + meteor.worldObj.rand.nextInt(10), bulletnt.posZ); - meteor.motionY = -1D; - meteor.setThrower(bulletnt.getThrower()); - bulletnt.worldObj.spawnEntityInWorld(meteor); - }; - - bullet.spentCasing = CASING556.clone().register("556FlecIF"); - - return bullet; - } - - public static BulletConfiguration get556KConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_556.stackFromEnum(Ammo556mm.K)); - bullet.dmgMin = 0; - bullet.dmgMax = 0; - bullet.maxAge = 0; - - return bullet; - } -} diff --git a/src/main/java/com/hbm/handler/guncfg/Gun5mmFactory.java b/src/main/java/com/hbm/handler/guncfg/Gun5mmFactory.java deleted file mode 100644 index d552e5ccae..0000000000 --- a/src/main/java/com/hbm/handler/guncfg/Gun5mmFactory.java +++ /dev/null @@ -1,146 +0,0 @@ -package com.hbm.handler.guncfg; - -import com.hbm.handler.BulletConfiguration; -import com.hbm.handler.CasingEjector; -import com.hbm.handler.GunConfiguration; -import com.hbm.inventory.RecipesCommon.ComparableStack; -import com.hbm.items.ItemAmmoEnums.Ammo5mm; -import com.hbm.items.ModItems; -import com.hbm.items.weapon.sedna.Crosshair; -import com.hbm.lib.HbmCollection; -import com.hbm.lib.HbmCollection.EnumGunManufacturer; -import com.hbm.particle.SpentCasing; -import com.hbm.particle.SpentCasing.CasingType; - -public class Gun5mmFactory { - - private static final CasingEjector EJECTOR_MINIGUN; - private static final SpentCasing CASING5MM; - - static { - EJECTOR_MINIGUN = new CasingEjector().setMotion(-0.4, 0.1, 0).setOffset(-0.35, -0.2, 0.35).setAngleRange(0.01F, 0.03F).setAmount(5); - CASING5MM = new SpentCasing(CasingType.STRAIGHT).setScale(1.25F).setBounceMotion(0.05F, 0.02F).setColor(SpentCasing.COLOR_CASE_BRASS).setMaxAge(100); - } - - public static GunConfiguration getMinigunConfig() { - - GunConfiguration config = new GunConfiguration(); - - config.rateOfFire = 1; - config.roundsPerCycle = 5; - config.gunMode = GunConfiguration.MODE_NORMAL; - config.firingMode = GunConfiguration.FIRE_AUTO; - config.reloadDuration = 20; - config.firingDuration = 0; - config.ammoCap = 0; - config.reloadType = GunConfiguration.RELOAD_NONE; - config.allowsInfinity = true; - config.crosshair = Crosshair.L_CIRCLE; - config.durability = 10000; - config.firingSound = "hbm:weapon.lacunaeShoot"; - - config.config = HbmCollection.r5; - - config.ejector = EJECTOR_MINIGUN; - - return config; - } - - public static GunConfiguration get53Config() { - - GunConfiguration config = getMinigunConfig(); - - config.name = "cz53"; - config.manufacturer = EnumGunManufacturer.ROCKWELL; - - return config; - } - - public static GunConfiguration get57Config() { - - GunConfiguration config = getMinigunConfig(); - - config.durability = 15000; - config.name = "cz57"; - config.manufacturer = EnumGunManufacturer.ROCKWELL; - - return config; - } - - public static GunConfiguration getLacunaeConfig() { - - GunConfiguration config = getMinigunConfig(); - - config.durability = 25000; - config.name = "lacunae"; - config.manufacturer = EnumGunManufacturer.ROCKWELL_U; - - config.config = HbmCollection.r5Bolt; - - return config; - } - - private static float inaccuracy = 10; - public static BulletConfiguration get5mmConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_5mm.stackFromEnum(Ammo5mm.STOCK)); - bullet.spread *= inaccuracy; - bullet.dmgMin = 12; - bullet.dmgMax = 14; - - bullet.spentCasing = CASING5MM.clone().register("5mmStock"); - - return bullet; - } - - public static BulletConfiguration get5mmExplosiveConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_5mm.stackFromEnum(Ammo5mm.EXPLOSIVE)); - bullet.spread *= inaccuracy; - bullet.dmgMin = 30; - bullet.dmgMax = 32; - bullet.explosive = 1F; - bullet.wear = 25; - - bullet.spentCasing = CASING5MM.clone().register("5mmExp"); - - return bullet; - } - - public static BulletConfiguration get5mmDUConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_5mm.stackFromEnum(Ammo5mm.DU)); - bullet.spread *= inaccuracy; - bullet.dmgMin = 36; - bullet.dmgMax = 40; - bullet.wear = 25; - bullet.leadChance = 50; - - bullet.spentCasing = CASING5MM.clone().register("5mmDU"); - - return bullet; - } - - public static BulletConfiguration get5mmStarConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_5mm.stackFromEnum(Ammo5mm.STAR)); - bullet.spread *= inaccuracy; - bullet.dmgMin = 46; - bullet.dmgMax = 50; - bullet.wear = 25; - bullet.leadChance = 100; - - bullet.spentCasing = CASING5MM.clone().register("5mmStar"); - - return bullet; - } - -} diff --git a/src/main/java/com/hbm/handler/guncfg/Gun75BoltFactory.java b/src/main/java/com/hbm/handler/guncfg/Gun75BoltFactory.java deleted file mode 100644 index e8e667fab8..0000000000 --- a/src/main/java/com/hbm/handler/guncfg/Gun75BoltFactory.java +++ /dev/null @@ -1,164 +0,0 @@ -package com.hbm.handler.guncfg; - -import java.util.ArrayList; - -import com.hbm.handler.BulletConfiguration; -import com.hbm.handler.GunConfiguration; -import com.hbm.inventory.RecipesCommon.ComparableStack; -import com.hbm.items.ItemAmmoEnums.Ammo75Bolt; -import com.hbm.items.ModItems; -import com.hbm.items.weapon.sedna.Crosshair; -import com.hbm.lib.HbmCollection; -import com.hbm.lib.HbmCollection.EnumGunManufacturer; -import com.hbm.lib.ModDamageSource; -import com.hbm.packet.PacketDispatcher; -import com.hbm.packet.toclient.AuxParticlePacketNT; -import com.hbm.potion.HbmPotion; -import com.hbm.render.anim.BusAnimation; -import com.hbm.render.anim.BusAnimationSequence; -import com.hbm.render.anim.HbmAnimations.AnimType; -import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.potion.PotionEffect; - -public class Gun75BoltFactory { - - public static GunConfiguration getBolterConfig() { - - GunConfiguration config = new GunConfiguration(); - - config.rateOfFire = 2; - config.roundsPerCycle = 1; - config.gunMode = GunConfiguration.MODE_NORMAL; - config.firingMode = GunConfiguration.FIRE_AUTO; - config.hasSights = false; - config.reloadDuration = 40; - config.firingDuration = 0; - config.ammoCap = 30; - config.reloadType = GunConfiguration.RELOAD_FULL; - config.allowsInfinity = true; - config.crosshair = Crosshair.NONE; - config.durability = 10000; - config.reloadSound = GunConfiguration.RSOUND_MAG; - config.firingSound = "hbm:weapon.hksShoot"; - config.reloadSoundEnd = false; - config.showAmmo = false; - - config.animations.put(AnimType.CYCLE, new BusAnimation() - .addBus("RECOIL", new BusAnimationSequence() - .addPos(1, 0, 0, 25) - .addPos(0, 0, 0, 75) - ) - .addBus("EJECT", new BusAnimationSequence() - .addPos(0, 0, 0, 25) - .addPos(0, 0, 1, 75) - ) - ); - - config.animations.put(AnimType.RELOAD, new BusAnimation() - .addBus("TILT", new BusAnimationSequence() - .addPos(1, 0, 0, 250) - .addPos(1, 0, 0, 1500) - .addPos(0, 0, 0, 250) - ) - .addBus("MAG", new BusAnimationSequence() - .addPos(0, 0, 1, 500) - .addPos(1, 0, 1, 500) - .addPos(0, 0, 0, 500) - ) - ); - - config.name = "bolter"; - config.manufacturer = EnumGunManufacturer.CERIX; - - config.config = HbmCollection.b75; - - return config; - } - - private static float inaccuracy = 0.5F; - public static BulletConfiguration get75BoltConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_75bolt.stackFromEnum(Ammo75Bolt.STOCK)); - bullet.ammoCount = 30; - bullet.spread *= inaccuracy; - bullet.dmgMin = 74; - bullet.dmgMax = 82; - bullet.doesRicochet = false; - bullet.explosive = 0.25F; - - bullet.bntHurt = (bulletnt, hit) -> { - - if(bulletnt.worldObj.isRemote) - return; - - if(hit instanceof EntityLivingBase) { - EntityLivingBase living = (EntityLivingBase) hit; - float f = living.getHealth(); - - if(f > 0) { - f = Math.max(0, f - 2); - living.setHealth(f); - - if(f == 0) - living.onDeath(ModDamageSource.lead); - } - } - }; - - return bullet; - } - - public static BulletConfiguration get75BoltIncConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_75bolt.stackFromEnum(Ammo75Bolt.INCENDIARY)); - bullet.ammoCount = 30; - bullet.spread *= inaccuracy; - bullet.dmgMin = 72; - bullet.dmgMax = 76; - bullet.doesRicochet = false; - bullet.explosive = 0.25F; - - bullet.incendiary = 5; - bullet.doesPenetrate = false; - - PotionEffect eff = new PotionEffect(HbmPotion.phosphorus.id, 20 * 20, 0, true); - eff.getCurativeItems().clear(); - bullet.effects = new ArrayList(); - bullet.effects.add(new PotionEffect(eff)); - - bullet.bntImpact = (bulletnt, x, y, z, sideHit) -> { - - NBTTagCompound data = new NBTTagCompound(); - data.setString("type", "vanillaburst"); - data.setString("mode", "flame"); - data.setInteger("count", 15); - data.setDouble("motion", 0.05D); - - PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data, bulletnt.posX, bulletnt.posY, bulletnt.posZ), new TargetPoint(bulletnt.dimension, bulletnt.posX, bulletnt.posY, bulletnt.posZ, 50)); - }; - - return bullet; - } - - public static BulletConfiguration get75BoltHEConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_75bolt.stackFromEnum(Ammo75Bolt.HE)); - bullet.ammoCount = 30; - bullet.spread *= inaccuracy; - bullet.dmgMin = 94; - bullet.dmgMax = 100; - bullet.doesRicochet = false; - bullet.explosive = 2.5F; - bullet.blockDamage = false; - - return bullet; - } -} diff --git a/src/main/java/com/hbm/handler/guncfg/Gun762mmFactory.java b/src/main/java/com/hbm/handler/guncfg/Gun762mmFactory.java deleted file mode 100644 index 619a3fe969..0000000000 --- a/src/main/java/com/hbm/handler/guncfg/Gun762mmFactory.java +++ /dev/null @@ -1,365 +0,0 @@ -package com.hbm.handler.guncfg; - -import java.util.ArrayList; - -import com.hbm.handler.BulletConfiguration; -import com.hbm.handler.CasingEjector; -import com.hbm.handler.GunConfiguration; -import com.hbm.inventory.RecipesCommon.ComparableStack; -import com.hbm.items.ModItems; -import com.hbm.items.weapon.sedna.Crosshair; -import com.hbm.items.ItemAmmoEnums.Ammo762NATO; -import com.hbm.lib.HbmCollection; -import com.hbm.lib.RefStrings; -import com.hbm.lib.HbmCollection.EnumGunManufacturer; -import com.hbm.particle.SpentCasing; -import com.hbm.particle.SpentCasing.CasingType; -import com.hbm.potion.HbmPotion; -import com.hbm.render.anim.BusAnimation; -import com.hbm.render.anim.BusAnimationSequence; -import com.hbm.render.anim.HbmAnimations.AnimType; - -import net.minecraft.potion.PotionEffect; -import net.minecraft.util.ResourceLocation; - -public class Gun762mmFactory { - - public static final ResourceLocation scope_bolt = new ResourceLocation(RefStrings.MODID, "textures/misc/scope_bolt.png"); - - private static final CasingEjector EJECTOR_RIFLE; - private static final CasingEjector EJECTOR_BOLT; - private static final SpentCasing CASING762NATO; - - static { - EJECTOR_RIFLE = new CasingEjector().setMotion(-0.35, 0.6, 0).setOffset(-0.35, 0, 0.35).setAngleRange(0.01F, 0.03F); - EJECTOR_BOLT = new CasingEjector().setMotion(-0.35, 0.6, 0).setOffset(-0.35, 0, 0.35).setAngleRange(0.01F, 0.03F).setDelay(15); - CASING762NATO = new SpentCasing(CasingType.BOTTLENECK).setScale(1.7F).setBounceMotion(0.01F, 0.05F).setColor(SpentCasing.COLOR_CASE_BRASS); - } - - public static GunConfiguration getCalamityConfig() { - - GunConfiguration config = new GunConfiguration(); - - config.rateOfFire = 1; - config.roundsPerCycle = 1; - config.gunMode = GunConfiguration.MODE_NORMAL; - config.firingMode = GunConfiguration.FIRE_AUTO; - config.reloadDuration = 20; - config.firingDuration = 0; - config.ammoCap = 50; - config.reloadType = GunConfiguration.RELOAD_FULL; - config.allowsInfinity = true; - config.crosshair = Crosshair.NONE; - config.durability = 15 * 50 * 10; //15 * capacity * default wear - config.reloadSound = GunConfiguration.RSOUND_MAG; - config.firingSound = "hbm:weapon.calShoot"; - config.reloadSoundEnd = false; - - config.animations.put(AnimType.CYCLE, new BusAnimation() - .addBus("RECOIL", new BusAnimationSequence() - .addPos(1, 0, 0, 25) - .addPos(0, 0, 0, 75) - ) - ); - - config.animations.put(AnimType.RELOAD, new BusAnimation() - .addBus("MAG", new BusAnimationSequence() - .addPos(0, -1, 0, 500) - .addPos(0, 0, 0, 500) - ) - ); - - config.name = "mg3"; - config.manufacturer = EnumGunManufacturer.WGW; - - config.config = HbmCollection.r762; - - config.ejector = EJECTOR_RIFLE; - - return config; - } - - public static GunConfiguration getUACDMRConfig() { - final GunConfiguration config = new GunConfiguration(); - - config.rateOfFire = 4; - config.roundsPerCycle = 1; - config.gunMode = GunConfiguration.MODE_NORMAL; - config.firingMode = GunConfiguration.FIRE_AUTO; - config.reloadDuration = 30; - config.firingDuration = 8; - config.ammoCap = 30; - config.durability = 30000; - config.reloadType = 1; - config.allowsInfinity = true; - config.hasSights = true; - config.crosshair = Crosshair.CROSS; - config.reloadSound = "hbm:weapon.DMRMagInPB3"; - config.firingSound = "hbm:weapon.DMRShootPB3Alt"; - config.reloadSoundEnd = true; - - config.name = "uacDMR"; - config.manufacturer = EnumGunManufacturer.UAC; - - config.config.addAll(HbmCollection.r762); - - config.ejector = EJECTOR_RIFLE; - - return config; - } - - public static GunConfiguration getUACCarbineConfig() { - final GunConfiguration config = getUACDMRConfig(); - - config.rateOfFire = 2; - config.reloadDuration = 20; - config.ammoCap = 40; - config.durability = 40000; - config.crosshair = Crosshair.SPLIT; - config.reloadSound = "hbm:weapon.carbineMagInPB3"; - config.firingSound = "hbm:weapon.carbineShootPB3"; - - config.name = "uacCarbine"; - - return config; - } - - public static GunConfiguration getUACLMGConfig() { - final GunConfiguration config = getUACCarbineConfig(); - - config.ammoCap = 60; - config.durability = 50000; - config.crosshair = Crosshair.BOX; - config.reloadSound = "hbm:weapon.LMGMagInPB3"; - config.firingSound = "hbm:weapon.LMGShootPB3Alt"; - - config.name = "uacLMG"; - - return config; - } - - public static GunConfiguration getM60Config() { - final GunConfiguration config = new GunConfiguration(); - - config.rateOfFire = 2; - config.durability = 10000; - config.roundsPerCycle = 1; - config.firingMode = GunConfiguration.FIRE_AUTO; - config.reloadType = GunConfiguration.RELOAD_NONE; - config.ammoCap = 0; - config.allowsInfinity = true; - config.hasSights = true; - config.crosshair = Crosshair.L_BOX; - config.firingSound = "hbm:weapon.LMGShootPB3"; - - config.name = "m60"; - config.manufacturer = EnumGunManufacturer.SACO; - config.comment.add("\"Get some!\""); - config.comment.add(" ~ Stuart Brown (aka Ahoy)"); - config.config.addAll(HbmCollection.r762); - - config.ejector = EJECTOR_RIFLE; - - return config; - } - - public static GunConfiguration getBoltConfig() { - - GunConfiguration config = Gun20GaugeFactory.getShotgunConfig(); - - config.ammoCap = 5; - config.durability = 3000; - config.reloadSound = GunConfiguration.RSOUND_SHOTGUN; - config.firingSound = "hbm:weapon.revolverShoot"; - config.firingPitch = 0.75F; - config.crosshair = Crosshair.CIRCLE; - - config.animations.put(AnimType.CYCLE, new BusAnimation() - .addBus("RECOIL", new BusAnimationSequence() - .addPos(1, 0, 0, 25) - .addPos(0, 0, 0, 75) - ) - .addBus("LEVER_PULL", new BusAnimationSequence() - .addPos(0, 0, 0, 375) //wait out recoil and lever flick - .addPos(-1, 0, 0, 375) //pull back bolt - .addPos(0, 0, 0, 375) //release bolt - ) - .addBus("LEVER_ROTATE", new BusAnimationSequence() - .addPos(0, 0, 0, 250) //wait out recoil - .addPos(1, 0, 0, 125) //flick up lever in 125ms - .addPos(1, 0, 0, 750) //pull action - .addPos(0, 0, 0, 125) //flick down lever again - ) - ); - - config.name = "win20Inox"; - config.manufacturer = EnumGunManufacturer.WINCHESTER; - - config.ejector = EJECTOR_BOLT; - - config.config = HbmCollection.r762; - - return config; - } - - public static GunConfiguration getBoltGreenConfig() { - - GunConfiguration config = Gun20GaugeFactory.getShotgunConfig(); - - config.ammoCap = 5; - config.durability = 2500; - config.reloadSound = GunConfiguration.RSOUND_SHOTGUN; - config.firingSound = "hbm:weapon.revolverShoot"; - config.firingPitch = 0.75F; - config.crosshair = Crosshair.CIRCLE; - - config.animations.put(AnimType.CYCLE, new BusAnimation() - .addBus("RECOIL", new BusAnimationSequence() - .addPos(1, 0, 0, 25) - .addPos(0, 0, 0, 75) - ) - .addBus("LEVER_PULL", new BusAnimationSequence() - .addPos(0, 0, 0, 375) //wait out recoil and lever flick - .addPos(-1, 0, 0, 375) //pull back bolt - .addPos(0, 0, 0, 375) //release bolt - ) - .addBus("LEVER_ROTATE", new BusAnimationSequence() - .addPos(0, 0, 0, 250) //wait out recoil - .addPos(1, 0, 0, 125) //flick up lever in 125ms - .addPos(1, 0, 0, 750) //pull action - .addPos(0, 0, 0, 125) //flick down lever again - ) - ); - - config.name = "win20Poly"; - config.manufacturer = EnumGunManufacturer.WINCHESTER; - - config.ejector = EJECTOR_BOLT; - - config.config = HbmCollection.r762; - - return config; - } - - public static GunConfiguration getBoltSaturniteConfig() { - - GunConfiguration config = Gun20GaugeFactory.getShotgunConfig(); - - config.ammoCap = 5; - config.durability = 4000; - config.reloadSound = GunConfiguration.RSOUND_SHOTGUN; - config.firingSound = "hbm:weapon.revolverShoot"; - config.firingPitch = 0.75F; - config.hasSights = true; - config.absoluteFOV = true; - config.zoomFOV = 0.25F; - config.scopeTexture = scope_bolt; - config.crosshair = Crosshair.CIRCLE; - - config.animations.put(AnimType.CYCLE, new BusAnimation() - .addBus("RECOIL", new BusAnimationSequence() - .addPos(1, 0, 0, 25) - .addPos(0, 0, 0, 75) - ) - .addBus("LEVER_PULL", new BusAnimationSequence() - .addPos(0, 0, 0, 375) //wait out recoil and lever flick - .addPos(-1, 0, 0, 375) //pull back bolt - .addPos(0, 0, 0, 375) //release bolt - ) - .addBus("LEVER_ROTATE", new BusAnimationSequence() - .addPos(0, 0, 0, 250) //wait out recoil - .addPos(1, 0, 0, 125) //flick up lever in 125ms - .addPos(1, 0, 0, 750) //pull action - .addPos(0, 0, 0, 125) //flick down lever again - ) - ); - - config.name = "win20Satur"; - config.manufacturer = EnumGunManufacturer.WINCHESTER_BIGMT; - - config.ejector = EJECTOR_BOLT; - - config.config = HbmCollection.r762; - - return config; - } - - public static BulletConfiguration get762NATOConfig() { - final BulletConfiguration bullet = Gun556mmFactory.get556Config().clone(); - - bullet.ammo = new ComparableStack(ModItems.ammo_762.stackFromEnum(Ammo762NATO.STOCK)); - bullet.dmgMax = 20; - bullet.dmgMin = 24; - bullet.velocity *= 2.5; - bullet.maxAge *= 2; - bullet.spread /= 2; - - bullet.spentCasing = CASING762NATO.clone().register("762NATOStock"); - - return bullet; - } - - public static BulletConfiguration get762APConfig() { - final BulletConfiguration bullet = get762NATOConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_762.stackFromEnum(Ammo762NATO.AP)); - bullet.dmgMax = 24; - bullet.dmgMin = 28; - - bullet.spentCasing = CASING762NATO.clone().register("762NATOAP"); - - return bullet; - } - - public static BulletConfiguration get762DUConfig() { - final BulletConfiguration bullet = get762NATOConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_762.stackFromEnum(Ammo762NATO.DU)); - bullet.dmgMax = 36; - bullet.dmgMin = 40; - - bullet.spentCasing = CASING762NATO.clone().register("762NATODU"); - - return bullet; - } - - public static BulletConfiguration get762TracerConfig() { - final BulletConfiguration bullet = get762NATOConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_762.stackFromEnum(Ammo762NATO.TRACER)); - bullet.vPFX = "reddust"; - - bullet.spentCasing = CASING762NATO.clone().register("762NATOTrac"); - - return bullet; - } - - public static BulletConfiguration get762WPConfig() { - final BulletConfiguration bullet = get762NATOConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_762.stackFromEnum(Ammo762NATO.PHOSPHORUS)); - bullet.setToFire(20 * 5); - bullet.vPFX = "reddust"; - final PotionEffect eff = new PotionEffect(HbmPotion.phosphorus.id, 20 * 20, 0, true); - eff.getCurativeItems().clear(); - bullet.effects = new ArrayList(); - bullet.effects.add(new PotionEffect(eff)); - - bullet.spentCasing = CASING762NATO.clone().register("762NATOPhos"); - - return bullet; - } - - public static BulletConfiguration get762BlankConfig() { - final BulletConfiguration bullet = get762NATOConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_762.stackFromEnum(Ammo762NATO.BLANK)); - bullet.dmgMax = 0; - bullet.dmgMin = 0; - bullet.maxAge = 0; - - bullet.spentCasing = CASING762NATO.clone().register("762NATOK"); - - return bullet; - } -} \ No newline at end of file diff --git a/src/main/java/com/hbm/handler/guncfg/Gun9mmFactory.java b/src/main/java/com/hbm/handler/guncfg/Gun9mmFactory.java deleted file mode 100644 index 8d0e801125..0000000000 --- a/src/main/java/com/hbm/handler/guncfg/Gun9mmFactory.java +++ /dev/null @@ -1,155 +0,0 @@ -package com.hbm.handler.guncfg; - -import java.util.ArrayList; - -import com.hbm.handler.BulletConfigSyncingUtil; -import com.hbm.handler.BulletConfiguration; -import com.hbm.handler.CasingEjector; -import com.hbm.handler.GunConfiguration; -import com.hbm.inventory.RecipesCommon.ComparableStack; -import com.hbm.items.ModItems; -import com.hbm.items.weapon.sedna.Crosshair; -import com.hbm.items.ItemAmmoEnums.Ammo9mm; -import com.hbm.lib.HbmCollection.EnumGunManufacturer; -import com.hbm.particle.SpentCasing; -import com.hbm.particle.SpentCasing.CasingType; - -public class Gun9mmFactory { - - private static final CasingEjector EJECTOR_SMG; - private static final SpentCasing CASING9MM; - - static { - EJECTOR_SMG = new CasingEjector().setMotion(-0.3, 0.6, 0).setOffset(-0.35, -0.2, 0.55).setAngleRange(0.01F, 0.03F); - CASING9MM = new SpentCasing(CasingType.STRAIGHT).setScale(1F, 1F, 0.6F).setBounceMotion(0.01F, 0.03F).setColor(SpentCasing.COLOR_CASE_BRASS); - } - - public static GunConfiguration getMP40Config() { - - GunConfiguration config = new GunConfiguration(); - - config.rateOfFire = 2; - config.roundsPerCycle = 1; - config.gunMode = GunConfiguration.MODE_NORMAL; - config.firingMode = GunConfiguration.FIRE_AUTO; - config.reloadDuration = 20; - config.firingDuration = 0; - config.ammoCap = 32; - config.reloadType = GunConfiguration.RELOAD_FULL; - config.allowsInfinity = true; - config.crosshair = Crosshair.L_SPLIT; - config.durability = 2500; - config.reloadSound = GunConfiguration.RSOUND_MAG; - config.firingSound = "hbm:weapon.rifleShoot"; - config.reloadSoundEnd = false; - - config.name = "mp40"; - config.manufacturer = EnumGunManufacturer.ERFURT; - - config.config = new ArrayList(); - config.config.add(BulletConfigSyncingUtil.P9_NORMAL); - config.config.add(BulletConfigSyncingUtil.P9_AP); - config.config.add(BulletConfigSyncingUtil.P9_DU); - config.config.add(BulletConfigSyncingUtil.CHL_P9); - config.config.add(BulletConfigSyncingUtil.P9_ROCKET); - - config.ejector = EJECTOR_SMG; - - return config; - } - - //rechambered to .45 - /*public static GunConfiguration getThompsonConfig() { - - GunConfiguration config = new GunConfiguration(); - - config.rateOfFire = 2; - config.roundsPerCycle = 1; - config.gunMode = GunConfiguration.MODE_NORMAL; - config.firingMode = GunConfiguration.FIRE_AUTO; - config.reloadDuration = 20; - config.firingDuration = 0; - config.ammoCap = 30; - config.reloadType = GunConfiguration.RELOAD_FULL; - config.allowsInfinity = true; - config.crosshair = Crosshair.L_SPLIT; - config.durability = 2500; - config.reloadSound = GunConfiguration.RSOUND_MAG; - config.firingSound = "hbm:weapon.rifleShoot"; - config.reloadSoundEnd = false; - - config.name = "tommy9"; - config.manufacturer = EnumGunManufacturer.AUTO_ORDINANCE; - - config.config = new ArrayList(); - config.config.add(BulletConfigSyncingUtil.P9_NORMAL); - config.config.add(BulletConfigSyncingUtil.P9_AP); - config.config.add(BulletConfigSyncingUtil.P9_DU); - config.config.add(BulletConfigSyncingUtil.CHL_P9); - config.config.add(BulletConfigSyncingUtil.P9_ROCKET); - - return config; - }*/ - - static float inaccuracy = 5; - public static BulletConfiguration get9mmConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_9mm.stackFromEnum(Ammo9mm.STOCK)); - bullet.spread *= inaccuracy; - bullet.dmgMin = 10; - bullet.dmgMax = 14; - - bullet.spentCasing = CASING9MM.clone().register("9MMStock"); - - return bullet; - } - - public static BulletConfiguration get9mmAPConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_9mm.stackFromEnum(Ammo9mm.AP)); - bullet.spread *= inaccuracy; - bullet.dmgMin = 18; - bullet.dmgMax = 20; - bullet.leadChance = 10; - bullet.wear = 15; - - bullet.spentCasing = CASING9MM.clone().register("9MMAP"); - - return bullet; - } - - public static BulletConfiguration get9mmDUConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_9mm.stackFromEnum(Ammo9mm.DU)); - bullet.spread *= inaccuracy; - bullet.dmgMin = 22; - bullet.dmgMax = 26; - bullet.leadChance = 50; - bullet.wear = 25; - - bullet.spentCasing = CASING9MM.clone().register("9MMDU"); - - return bullet; - } - - public static BulletConfiguration get9mmRocketConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardRocketConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_9mm.stackFromEnum(Ammo9mm.ROCKET)); - bullet.velocity = 5; - bullet.explosive = 7.5F; - bullet.trail = 5; - - bullet.spentCasing = CASING9MM.clone().register("9MMRocket"); - - return bullet; - } - -} diff --git a/src/main/java/com/hbm/handler/guncfg/GunDartFactory.java b/src/main/java/com/hbm/handler/guncfg/GunDartFactory.java deleted file mode 100644 index 62c48b7d9b..0000000000 --- a/src/main/java/com/hbm/handler/guncfg/GunDartFactory.java +++ /dev/null @@ -1,150 +0,0 @@ -package com.hbm.handler.guncfg; - -import java.util.ArrayList; - -import com.hbm.extprop.HbmLivingProps; -import com.hbm.handler.BulletConfigSyncingUtil; -import com.hbm.handler.BulletConfiguration; -import com.hbm.handler.GunConfiguration; -import com.hbm.inventory.RecipesCommon.ComparableStack; -import com.hbm.items.ItemAmmoEnums.AmmoDart; -import com.hbm.items.ModItems; -import com.hbm.items.weapon.sedna.Crosshair; -import com.hbm.lib.HbmCollection.EnumGunManufacturer; -import com.hbm.main.MainRegistry; - -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionEffect; - -public class GunDartFactory { - - public static GunConfiguration getDarterConfig() { - - GunConfiguration config = new GunConfiguration(); - - config.rateOfFire = 1; - config.roundsPerCycle = 1; - config.gunMode = GunConfiguration.MODE_NORMAL; - config.firingMode = GunConfiguration.FIRE_MANUAL; - config.hasSights = false; - config.reloadDuration = 20; - config.firingDuration = 0; - config.ammoCap = 1; - config.reloadType = GunConfiguration.RELOAD_FULL; - config.allowsInfinity = true; - config.crosshair = Crosshair.L_CROSS; - config.durability = 1000; - config.reloadSound = GunConfiguration.RSOUND_GRENADE; - config.firingSound = "hbm:weapon.dartShoot"; - config.reloadSoundEnd = false; - config.showAmmo = true; - - config.name = "dart"; - config.manufacturer = EnumGunManufacturer.NONE; - - config.config = new ArrayList(); - config.config.add(BulletConfigSyncingUtil.NEEDLE_GPS); - config.config.add(BulletConfigSyncingUtil.NEEDLE_NUKE); - - return config; - } - - public static GunConfiguration getMymyConfig() { - - GunConfiguration config = new GunConfiguration(); - - config.rateOfFire = 1; - config.roundsPerCycle = 1; - config.gunMode = GunConfiguration.MODE_NORMAL; - config.firingMode = GunConfiguration.FIRE_MANUAL; - config.hasSights = false; - config.reloadDuration = 10; - config.firingDuration = 0; - config.ammoCap = 1; - config.reloadType = GunConfiguration.RELOAD_FULL; - config.allowsInfinity = true; - config.crosshair = Crosshair.NONE; - config.durability = 1000; - config.reloadSound = GunConfiguration.RSOUND_GRENADE; - config.firingSound = "hbm:weapon.dartShoot"; - config.reloadSoundEnd = false; - config.showAmmo = true; - - config.name = "nerf"; - config.manufacturer = EnumGunManufacturer.HASBRO; - - config.config = new ArrayList(); - config.config.add(BulletConfigSyncingUtil.DART_NORMAL); - config.config.add(BulletConfigSyncingUtil.NEEDLE_NUKE); - - return config; - } - - public static BulletConfiguration getGPSConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_dart.stackFromEnum(AmmoDart.GPS)); - bullet.velocity = 5.0F; - bullet.spread = 0; - bullet.dmgMin = 1; - bullet.dmgMax = 2; - bullet.doesRicochet = true; - bullet.doesPenetrate = false; - bullet.style = bullet.STYLE_FLECHETTE; - bullet.leadChance = 0; - - bullet.effects = new ArrayList(); - bullet.effects.add(new PotionEffect(Potion.wither.id, 60 * 20, 2)); - - return bullet; - } - - public static BulletConfiguration getNukeConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_dart.stackFromEnum(AmmoDart.NUCLEAR)); - bullet.velocity = 5.0F; - bullet.spread = 0; - bullet.dmgMin = 1; - bullet.dmgMax = 2; - bullet.doesRicochet = true; - bullet.doesPenetrate = false; - bullet.style = bullet.STYLE_FLECHETTE; - bullet.leadChance = 0; - - bullet.bntHurt = (bulletnt, hit) -> { - - if(bulletnt.worldObj.isRemote) - return; - - if(hit instanceof EntityLivingBase) { - - EntityLivingBase e = (EntityLivingBase) hit; - - if(HbmLivingProps.getRadiation(e) < 250) - HbmLivingProps.setRadiation(e, 250); - if(HbmLivingProps.getTimer(e) <= 0) - HbmLivingProps.setTimer(e, MainRegistry.polaroidID * 60 * 20); - } - }; - - return bullet; - } - - public static BulletConfiguration getNERFConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_dart.stackFromEnum(AmmoDart.NERF)); - bullet.velocity = 1.0F; - bullet.gravity = 0.04D; - bullet.dmgMin = 0; - bullet.dmgMax = 0; - bullet.leadChance = 0; - - return bullet; - } -} diff --git a/src/main/java/com/hbm/handler/guncfg/GunDetonatorFactory.java b/src/main/java/com/hbm/handler/guncfg/GunDetonatorFactory.java deleted file mode 100644 index e24e26f674..0000000000 --- a/src/main/java/com/hbm/handler/guncfg/GunDetonatorFactory.java +++ /dev/null @@ -1,113 +0,0 @@ -package com.hbm.handler.guncfg; - -import java.util.ArrayList; - -import com.hbm.handler.BulletConfigSyncingUtil; -import com.hbm.handler.BulletConfiguration; -import com.hbm.handler.GunConfiguration; -import com.hbm.interfaces.IBomb; -import com.hbm.interfaces.IBomb.BombReturnCode; -import com.hbm.main.MainRegistry; -import com.hbm.inventory.RecipesCommon.ComparableStack; -import com.hbm.items.weapon.sedna.Crosshair; -import com.hbm.lib.HbmCollection.EnumGunManufacturer; -import com.hbm.packet.PacketDispatcher; -import com.hbm.packet.toclient.PlayerInformPacket; -import com.hbm.util.ChatBuilder; - -import net.minecraft.block.Block; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.init.Items; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.world.World; - -public class GunDetonatorFactory { - - public static GunConfiguration getDetonatorConfig() { - - GunConfiguration config = new GunConfiguration(); - - config.rateOfFire = 1; - config.roundsPerCycle = 1; - config.gunMode = GunConfiguration.MODE_NORMAL; - config.firingMode = GunConfiguration.FIRE_AUTO; - config.hasSights = false; - config.reloadDuration = 20; - config.firingDuration = 0; - config.ammoCap = 1; - config.reloadType = GunConfiguration.RELOAD_FULL; - config.allowsInfinity = true; - config.crosshair = Crosshair.DUAL; - config.durability = 1_000_000_000; - config.reloadSound = GunConfiguration.RSOUND_LAUNCHER; - config.firingSound = "hbm:weapon.dartShoot"; - config.reloadSoundEnd = false; - config.showAmmo = true; - - config.name = "laserDet"; - config.manufacturer = EnumGunManufacturer.WESTTEK; - - config.config = new ArrayList(); - config.config.add(BulletConfigSyncingUtil.DET_BOLT); - config.config.add(BulletConfigSyncingUtil.R5_NORMAL_BOLT); - config.config.add(BulletConfigSyncingUtil.R5_EXPLOSIVE_BOLT); - config.config.add(BulletConfigSyncingUtil.R5_DU_BOLT); - config.config.add(BulletConfigSyncingUtil.R5_STAR_BOLT); - config.config.add(BulletConfigSyncingUtil.CHL_R5_BOLT); - config.config.add(BulletConfigSyncingUtil.G12_NORMAL); - config.config.add(BulletConfigSyncingUtil.G12_INCENDIARY); - config.config.add(BulletConfigSyncingUtil.G12_SHRAPNEL); - config.config.add(BulletConfigSyncingUtil.G12_DU); - config.config.add(BulletConfigSyncingUtil.G12_SLEEK); - config.config.add(BulletConfigSyncingUtil.G12_AM); - config.config.add(BulletConfigSyncingUtil.G12_PERCUSSION); - config.config.add(BulletConfigSyncingUtil.NUKE_NORMAL); - config.config.add(BulletConfigSyncingUtil.NUKE_LOW); - config.config.add(BulletConfigSyncingUtil.NUKE_SAFE); - config.config.add(BulletConfigSyncingUtil.NUKE_HIGH); - config.config.add(BulletConfigSyncingUtil.NUKE_TOTS); - config.config.add(BulletConfigSyncingUtil.NUKE_PUMPKIN); - config.config.add(BulletConfigSyncingUtil.NUKE_BARREL); - config.config.add(BulletConfigSyncingUtil.NUKE_MIRV_NORMAL); - config.config.add(BulletConfigSyncingUtil.NUKE_MIRV_LOW); - config.config.add(BulletConfigSyncingUtil.NUKE_MIRV_SAFE); - config.config.add(BulletConfigSyncingUtil.NUKE_MIRV_HIGH); - - return config; - } - - public static BulletConfiguration getLaserConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig(); - - bullet.ammo = new ComparableStack(Items.redstone); - bullet.spread = 0.0F; - bullet.maxAge = 100; - bullet.dmgMin = 0; - bullet.dmgMax = 0; - bullet.leadChance = 0; - bullet.doesRicochet = false; - bullet.setToBolt(BulletConfiguration.BOLT_LASER); - - bullet.bntImpact = (bulletnt, x, y, z, sideHit) -> { - - World world = bulletnt.worldObj; - if(!world.isRemote && y > 0) { - Block b = world.getBlock(x, y, z); - if(b instanceof IBomb) { - BombReturnCode ret = ((IBomb) b).explode(world, x, y, z); - - if(ret.wasSuccessful() && bulletnt.getThrower() instanceof EntityPlayerMP) { - EntityPlayerMP player = (EntityPlayerMP) bulletnt.getThrower(); - world.playSoundAtEntity(player, "hbm:item.techBleep", 1.0F, 1.0F); - PacketDispatcher.wrapper.sendTo( - new PlayerInformPacket(ChatBuilder.start("").nextTranslation(ret.getUnlocalizedMessage()).color(EnumChatFormatting.YELLOW).flush(), MainRegistry.proxy.ID_DETONATOR), - (EntityPlayerMP) player); - } - } - } - }; - - return bullet; - } -} diff --git a/src/main/java/com/hbm/handler/guncfg/GunEnergyFactory.java b/src/main/java/com/hbm/handler/guncfg/GunEnergyFactory.java index adaf77aee4..f6f6a79338 100644 --- a/src/main/java/com/hbm/handler/guncfg/GunEnergyFactory.java +++ b/src/main/java/com/hbm/handler/guncfg/GunEnergyFactory.java @@ -6,153 +6,26 @@ import com.hbm.entity.projectile.EntityBulletBaseNT; import com.hbm.entity.projectile.EntityBulletBaseNT.IBulletImpactBehaviorNT; import com.hbm.entity.projectile.EntityBulletBaseNT.IBulletUpdateBehaviorNT; -import com.hbm.explosion.ExplosionChaos; -import com.hbm.explosion.ExplosionLarge; import com.hbm.handler.BulletConfigSyncingUtil; import com.hbm.handler.BulletConfiguration; import com.hbm.handler.GunConfiguration; import com.hbm.inventory.RecipesCommon.ComparableStack; -import com.hbm.items.ItemAmmoEnums.AmmoCoilgun; import com.hbm.items.ItemAmmoEnums.AmmoFireExt; -import com.hbm.items.ItemAmmoEnums.AmmoFlamethrower; import com.hbm.items.ModItems; import com.hbm.items.weapon.sedna.Crosshair; import com.hbm.lib.HbmCollection.EnumGunManufacturer; -import com.hbm.lib.ModDamageSource; import com.hbm.main.MainRegistry; -import com.hbm.packet.PacketDispatcher; -import com.hbm.packet.toclient.AuxParticlePacketNT; -import com.hbm.packet.toclient.ExplosionKnockbackPacket; -import com.hbm.potion.HbmPotion; import com.hbm.tileentity.IRepairable; import com.hbm.tileentity.IRepairable.EnumExtinguishType; import com.hbm.util.CompatExternal; -import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint; import net.minecraft.block.Block; import net.minecraft.block.material.Material; -import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.init.Blocks; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionEffect; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.Vec3; public class GunEnergyFactory { - - public static GunConfiguration getChemConfig() { - - GunConfiguration config = new GunConfiguration(); - config.rateOfFire = 1; - config.gunMode = GunConfiguration.MODE_NORMAL; - config.firingMode = GunConfiguration.FIRE_AUTO; - config.allowsInfinity = false; - config.ammoCap = 3_000; - config.durability = 90_000; - config.reloadType = GunConfiguration.RELOAD_FULL; - config.crosshair = Crosshair.CIRCLE; - - config.name = "Chemical Thrower"; - config.manufacturer = EnumGunManufacturer.LANGFORD; - - config.config = new ArrayList(); - - return config; - } - - public static GunConfiguration getEMPConfig() { - - GunConfiguration config = new GunConfiguration(); - - config.rateOfFire = 30; - config.roundsPerCycle = 1; - config.gunMode = GunConfiguration.MODE_NORMAL; - config.firingMode = GunConfiguration.FIRE_MANUAL; - config.reloadDuration = 10; - config.firingDuration = 0; - config.ammoCap = 0; - config.durability = 1500; - config.reloadType = GunConfiguration.RELOAD_NONE; - config.allowsInfinity = true; - config.crosshair = Crosshair.L_SPLIT; - config.firingSound = "hbm:weapon.teslaShoot"; - - config.name = "EMP Orb Projector"; - config.manufacturer = EnumGunManufacturer.MWT; - - config.config = new ArrayList(); - config.config.add(BulletConfigSyncingUtil.SPECIAL_EMP); - - return config; - } - - public static GunConfiguration getFlamerConfig() { - - GunConfiguration config = new GunConfiguration(); - - config.rateOfFire = 1; - config.roundsPerCycle = 1; - config.gunMode = GunConfiguration.MODE_NORMAL; - config.firingMode = GunConfiguration.FIRE_AUTO; - config.reloadDuration = 20; - config.reloadSoundEnd = false; - config.firingDuration = 0; - config.ammoCap = 100; - config.durability = 1000; - config.reloadType = GunConfiguration.RELOAD_FULL; - config.allowsInfinity = true; - config.crosshair = Crosshair.L_CIRCLE; - config.firingSound = "hbm:weapon.flamethrowerShoot"; - config.reloadSound = "hbm:weapon.flamerReload"; - - config.name = "Heavy Duty Flamer"; - config.manufacturer = EnumGunManufacturer.MWT; - - config.comment.add("Dragon-slaying: Advanced techniques, part 1:"); - config.comment.add("Try not to get eaten by the dragon."); - config.comment.add(""); - config.comment.add("Hope that helps."); - - config.config = new ArrayList(); - config.config.add(BulletConfigSyncingUtil.FLAMER_NORMAL); - config.config.add(BulletConfigSyncingUtil.FLAMER_NAPALM); - config.config.add(BulletConfigSyncingUtil.FLAMER_WP); - config.config.add(BulletConfigSyncingUtil.FLAMER_VAPORIZER); - config.config.add(BulletConfigSyncingUtil.FLAMER_GAS); - - return config; - } - - public static GunConfiguration getZOMGConfig() { - - GunConfiguration config = new GunConfiguration(); - - config.rateOfFire = 1; - config.roundsPerCycle = 1; - config.gunMode = GunConfiguration.MODE_NORMAL; - config.firingMode = GunConfiguration.FIRE_AUTO; - config.reloadDuration = 10; - config.reloadSoundEnd = false; - config.firingDuration = 0; - config.durability = 100000; - config.reloadType = GunConfiguration.RELOAD_FULL; - config.ammoCap = 1000; - config.allowsInfinity = true; - config.crosshair = Crosshair.L_ARROWS; - config.firingSound = "hbm:weapon.zomgShoot"; - config.reloadSound = "hbm:weapon.b92Reload"; - - config.name = "EMC101 Prismatic Negative Energy Cannon"; - config.manufacturer = EnumGunManufacturer.MWT; - - config.comment.add("Taste the rainbow!"); - - config.config = new ArrayList(); - config.config.add(BulletConfigSyncingUtil.ZOMG_BOLT); - - return config; - } public static GunConfiguration getExtConfig() { @@ -183,36 +56,6 @@ public static GunConfiguration getExtConfig() { return config; } - - public static GunConfiguration getCoilgunConfig() { - - GunConfiguration config = new GunConfiguration(); - - config.rateOfFire = 5; - config.roundsPerCycle = 1; - config.gunMode = GunConfiguration.MODE_NORMAL; - config.firingMode = GunConfiguration.FIRE_MANUAL; - config.reloadDuration = 20; - config.firingDuration = 0; - config.ammoCap = 1; - config.durability = 2_500; - config.reloadType = GunConfiguration.RELOAD_FULL; - config.allowsInfinity = true; - config.crosshair = Crosshair.CIRCLE; - config.firingSound = "hbm:weapon.coilgunShoot"; - config.reloadSoundEnd = false; - config.reloadSound = "hbm:weapon.coilgunReload"; - - config.name = "ArmsKore Coilgun"; - config.manufacturer = EnumGunManufacturer.DRG; - - config.config = new ArrayList(); - config.config.add(BulletConfigSyncingUtil.COIL_NORMAL); - config.config.add(BulletConfigSyncingUtil.COIL_DU); - config.config.add(BulletConfigSyncingUtil.COIL_RUBBER); - - return config; - } public static GunConfiguration getCryoCannonConfig() { @@ -238,295 +81,6 @@ public static GunConfiguration getCryoCannonConfig() { return config; } - public static GunConfiguration getVortexConfig() { - - GunConfiguration config = new GunConfiguration(); - - return config; - - } - - public static BulletConfiguration getOrbusConfig() { - - BulletConfiguration bullet = new BulletConfiguration(); - - bullet.ammo = new ComparableStack(ModItems.gun_emp_ammo); - - bullet.velocity = 1F; - bullet.spread = 0.0F; - bullet.wear = 10; - bullet.bulletsMin = 1; - bullet.bulletsMax = 1; - bullet.dmgMin = 10; - bullet.dmgMax = 12; - bullet.gravity = 0D; - bullet.maxAge = 100; - bullet.doesRicochet = false; - bullet.doesPenetrate = true; - bullet.doesBreakGlass = false; - bullet.style = BulletConfiguration.STYLE_ORB; - bullet.plink = BulletConfiguration.PLINK_NONE; - bullet.emp = 10; - - bullet.damageType = ModDamageSource.s_emp; - bullet.dmgProj = false; - bullet.dmgBypass = true; - - bullet.effects = new ArrayList(); - bullet.effects.add(new PotionEffect(Potion.moveSlowdown.id, 10 * 20, 1)); - bullet.effects.add(new PotionEffect(Potion.weakness.id, 10 * 20, 4)); - - return bullet; - } - - public static BulletConfiguration getCoilConfig() { - - BulletConfiguration bullet = new BulletConfiguration(); - - bullet.ammo = new ComparableStack(ModItems.ammo_coilgun, 1, AmmoCoilgun.STOCK.ordinal()); - - bullet.velocity = 7.5F; - bullet.spread = 0.0F; - bullet.wear = 10; - bullet.bulletsMin = 1; - bullet.bulletsMax = 1; - bullet.dmgMin = 35; - bullet.dmgMax = 45; - bullet.gravity = 0D; - bullet.maxAge = 50; - bullet.doesPenetrate = true; - bullet.isSpectral = true; - - bullet.style = bullet.STYLE_BOLT; - bullet.trail = bullet.BOLT_NIGHTMARE; - bullet.vPFX = "fireworks"; - - bullet.bntUpdate = (entity) -> breakInPath(entity, 1.25F); - - return bullet; - } - - public static BulletConfiguration getCoilDUConfig() { - - BulletConfiguration bullet = new BulletConfiguration(); - - bullet.ammo = new ComparableStack(ModItems.ammo_coilgun, 1, AmmoCoilgun.DU.ordinal()); - - bullet.velocity = 7.5F; - bullet.spread = 0.0F; - bullet.wear = 25; - bullet.bulletsMin = 1; - bullet.bulletsMax = 1; - bullet.dmgMin = 65; - bullet.dmgMax = 80; - bullet.gravity = 0D; - bullet.maxAge = 50; - bullet.doesPenetrate = true; - bullet.isSpectral = true; - - bullet.style = bullet.STYLE_BOLT; - bullet.trail = bullet.BOLT_NIGHTMARE; - bullet.vPFX = "fireworks"; - - bullet.bntUpdate = (entity) -> breakInPath(entity, 2.5F); - - return bullet; - } - - public static BulletConfiguration getCoilRubberConfig() { - - BulletConfiguration bullet = new BulletConfiguration(); - - bullet.ammo = new ComparableStack(ModItems.ammo_coilgun, 1, AmmoCoilgun.RUBBER.ordinal()); - - bullet.velocity = 5F; - bullet.spread = 0.0F; - bullet.wear = 10; - bullet.bulletsMin = 1; - bullet.bulletsMax = 1; - bullet.dmgMin = 10; - bullet.dmgMax = 20; - bullet.gravity = 0D; - bullet.maxAge = 50; - bullet.doesPenetrate = false; - bullet.isSpectral = false; - bullet.doesRicochet = true; - bullet.ricochetAngle = 30; - bullet.HBRC = 90; - bullet.LBRC = 100; - bullet.bounceMod = 1; - bullet.selfDamageDelay = 2; - - bullet.style = bullet.STYLE_PELLET; - - bullet.bntHurt = (entity, hit) -> { - Vec3 vec = Vec3.createVectorHelper(entity.motionX, entity.motionY, entity.motionZ); - vec = vec.normalize(); - vec.xCoord *= 10; - vec.yCoord *= 10; - vec.zCoord *= 10; - hit.motionX += vec.xCoord; - hit.motionY += vec.yCoord; - hit.motionZ += vec.zCoord; - - if(hit instanceof EntityPlayerMP) { - PacketDispatcher.wrapper.sendTo(new ExplosionKnockbackPacket(vec), (EntityPlayerMP) hit); - } - }; - - return bullet; - } - - public static void breakInPath(EntityBulletBaseNT entity, float threshold) { - - if(entity.worldObj.isRemote) return; - - Vec3 vec = Vec3.createVectorHelper(entity.posX - entity.prevPosX, entity.posY - entity.prevPosY, entity.posZ - entity.prevPosZ); - double motion = Math.max(vec.lengthVector(), 0.1); - vec = vec.normalize(); - - for(double d = 0; d < motion; d += 0.5) { - - int x = (int) Math.floor(entity.posX - vec.xCoord * d); - int y = (int) Math.floor(entity.posY - vec.yCoord * d); - int z = (int) Math.floor(entity.posZ - vec.zCoord * d); - - Block b = entity.worldObj.getBlock(x, y, z); - float hardness = b.getBlockHardness(entity.worldObj, x, y, z); - - if(b.getMaterial() != Material.air && hardness >= 0 && hardness < threshold) { - entity.worldObj.func_147480_a(x, y, z, false); - } - } - } - - public static BulletConfiguration getFlameConfig() { - - BulletConfiguration bullet = new BulletConfiguration(); - - bullet.ammo = new ComparableStack(ModItems.ammo_fuel.stackFromEnum(AmmoFlamethrower.DIESEL)); - bullet.ammoCount = 100; - - bullet.velocity = 0.75F; - bullet.spread = 0.025F; - bullet.wear = 1; - bullet.bulletsMin = 3; - bullet.bulletsMax = 5; - bullet.dmgMin = 2; - bullet.dmgMax = 4; - bullet.gravity = 0.01D; - bullet.maxAge = 60; - bullet.doesRicochet = false; - bullet.doesPenetrate = true; - bullet.doesBreakGlass = false; - bullet.style = BulletConfiguration.STYLE_NONE; - bullet.plink = BulletConfiguration.PLINK_NONE; - bullet.vPFX = "flame"; - bullet.incendiary = 10; - - bullet.damageType = ModDamageSource.s_flamethrower; - bullet.dmgProj = false; - bullet.dmgFire = true; - - bullet.bntImpact = new IBulletImpactBehaviorNT() { - - @Override - public void behaveBlockHit(EntityBulletBaseNT bullet, int x, int y, int z, int sideHit) { - - if(!bullet.worldObj.isRemote) { - NBTTagCompound data = new NBTTagCompound(); - data.setString("type", "vanillaburst"); - data.setString("mode", "flame"); - data.setInteger("count", 15); - data.setDouble("motion", 0.1D); - - PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data, bullet.posX, bullet.posY, bullet.posZ), new TargetPoint(bullet.dimension, bullet.posX, bullet.posY, bullet.posZ, 50)); - } - } - }; - - return bullet; - } - - public static BulletConfiguration getNapalmConfig() { - - BulletConfiguration bullet = getFlameConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_fuel.stackFromEnum(AmmoFlamethrower.NAPALM)); - bullet.wear = 2; - bullet.dmgMin = 4; - bullet.dmgMax = 6; - bullet.maxAge = 200; - - return bullet; - } - - public static BulletConfiguration getPhosphorusConfig() { - - BulletConfiguration bullet = getFlameConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_fuel.stackFromEnum(AmmoFlamethrower.PHOSPHORUS)); - bullet.wear = 2; - bullet.spread = 0.0F; - bullet.bulletsMin = 1; - bullet.bulletsMax = 1; - bullet.dmgMin = 4; - bullet.dmgMax = 6; - bullet.maxAge = 200; - bullet.vPFX = "smoke"; - - bullet.bntImpact = BulletConfigFactory.getPhosphorousEffect(5, 60 * 20, 25, 0.25, 0.1F); - - return bullet; - } - - public static BulletConfiguration getVaporizerConfig() { - - BulletConfiguration bullet = getFlameConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_fuel.stackFromEnum(AmmoFlamethrower.VAPORIZER)); - bullet.wear = 4; - bullet.spread = 0.25F; - bullet.bulletsMin = 8; - bullet.bulletsMax = 10; - bullet.dmgMin = 6; - bullet.dmgMax = 10; - bullet.maxAge = 15; - bullet.vPFX = "flame"; - bullet.incendiary = 0; - - bullet.dmgBypass = true; - - PotionEffect eff = new PotionEffect(HbmPotion.phosphorus.id, 20 * 20, 0, true); - eff.getCurativeItems().clear(); - bullet.effects = new ArrayList(); - bullet.effects.add(new PotionEffect(eff)); - - return bullet; - } - - public static BulletConfiguration getGasConfig() { - - BulletConfiguration bullet = getFlameConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_fuel.stackFromEnum(AmmoFlamethrower.CHLORINE)); - bullet.wear = 1; - bullet.spread = 0.05F; - bullet.gravity = 0D; - bullet.bulletsMin = 5; - bullet.bulletsMax = 7; - bullet.dmgMin = 0; - bullet.dmgMax = 0; - bullet.vPFX = "cloud"; - bullet.incendiary = 0; - - bullet.dmgFire = false; - - bullet.bntImpact = BulletConfigFactory.getGasEffect(5, 60 * 20); - - return bullet; - } - public static BulletConfiguration getFextConfig() { BulletConfiguration bullet = new BulletConfiguration(); @@ -782,49 +336,6 @@ public void behaveUpdate(EntityBulletBaseNT bullet) { return bullet; } - public static BulletConfiguration getZOMGBoltConfig() { - - BulletConfiguration bullet = new BulletConfiguration(); - - bullet.ammo = new ComparableStack(ModItems.nugget_euphemium); - bullet.ammoCount = 1000; - bullet.wear = 1; - bullet.velocity = 1F; - bullet.spread = 0.125F; - bullet.maxAge = 100; - bullet.gravity = 0D; - bullet.bulletsMin = 5; - bullet.bulletsMax = 5; - bullet.dmgMin = 10000; - bullet.dmgMax = 25000; - bullet.liveAfterImpact = true; - - bullet.damageType = ModDamageSource.s_zomg_prefix; - bullet.dmgProj = false; - bullet.dmgBypass = true; - - bullet.style = bullet.STYLE_BOLT; - bullet.trail = bullet.BOLT_ZOMG; - - bullet.effects = new ArrayList(); - bullet.effects.add(new PotionEffect(HbmPotion.bang.id, 10 * 20, 0)); - - bullet.bntImpact = new IBulletImpactBehaviorNT() { - - @Override - public void behaveBlockHit(EntityBulletBaseNT bullet, int x, int y, int z, int sideHit) { - - if(!bullet.worldObj.isRemote) { - ExplosionChaos.explodeZOMG(bullet.worldObj, (int)Math.floor(bullet.posX), (int)Math.floor(bullet.posY), (int)Math.floor(bullet.posZ), 5); - bullet.worldObj.playSoundEffect(bullet.posX, bullet.posY, bullet.posZ, "hbm:entity.bombDet", 5.0F, 1.0F); - ExplosionLarge.spawnParticles(bullet.worldObj, bullet.posX, bullet.posY, bullet.posZ, 5); - } - } - }; - - return bullet; - } - public static BulletConfiguration getCryoConfig() { BulletConfiguration bullet = new BulletConfiguration(); bullet.ammo = new ComparableStack(ModItems.gun_cryolator_ammo); @@ -850,11 +361,4 @@ public static BulletConfiguration getTurbineConfig() { return bullet; } - - public static BulletConfiguration getTurretConfig() { - BulletConfiguration bullet = getFlameConfig(); - bullet.spread *= 2F; - bullet.gravity = 0.0025D; - return bullet; - } } diff --git a/src/main/java/com/hbm/handler/guncfg/GunFatmanFactory.java b/src/main/java/com/hbm/handler/guncfg/GunFatmanFactory.java deleted file mode 100644 index 5f139750e8..0000000000 --- a/src/main/java/com/hbm/handler/guncfg/GunFatmanFactory.java +++ /dev/null @@ -1,544 +0,0 @@ -package com.hbm.handler.guncfg; - -import java.util.ArrayList; - -import com.hbm.blocks.ModBlocks; -import com.hbm.entity.projectile.EntityBulletBaseNT; -import com.hbm.entity.projectile.EntityBulletBaseNT.*; -import com.hbm.explosion.ExplosionLarge; -import com.hbm.explosion.ExplosionNT; -import com.hbm.explosion.ExplosionNukeSmall; -import com.hbm.explosion.ExplosionNT.ExAttrib; -import com.hbm.handler.BulletConfigSyncingUtil; -import com.hbm.handler.BulletConfiguration; -import com.hbm.handler.GunConfiguration; -import com.hbm.handler.radiation.ChunkRadiationManager; -import com.hbm.inventory.RecipesCommon.ComparableStack; -import com.hbm.items.ModItems; -import com.hbm.items.weapon.sedna.Crosshair; -import com.hbm.items.ItemAmmoEnums.AmmoFatman; -import com.hbm.lib.HbmCollection.EnumGunManufacturer; -import com.hbm.packet.PacketDispatcher; -import com.hbm.packet.toclient.AuxParticlePacketNT; - -import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint; -import net.minecraft.init.Blocks; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.world.World; - -public class GunFatmanFactory { - - public static GunConfiguration getFatmanConfig() { - - GunConfiguration config = new GunConfiguration(); - - config.rateOfFire = 20; - config.roundsPerCycle = 1; - config.gunMode = GunConfiguration.MODE_NORMAL; - config.firingMode = GunConfiguration.FIRE_MANUAL; - config.reloadDuration = 120; - config.firingDuration = 0; - config.ammoCap = 1; - config.reloadType = GunConfiguration.RELOAD_FULL; - config.allowsInfinity = true; - config.crosshair = Crosshair.L_CIRCUMFLEX; - config.firingSound = "hbm:weapon.fatmanShoot"; - config.reloadSound = GunConfiguration.RSOUND_FATMAN; - config.reloadSoundEnd = false; - - config.name = "m42"; - config.manufacturer = EnumGunManufacturer.F_STRONG; - - config.config = new ArrayList(); - config.config.add(BulletConfigSyncingUtil.NUKE_NORMAL); - config.config.add(BulletConfigSyncingUtil.NUKE_LOW); - config.config.add(BulletConfigSyncingUtil.NUKE_HIGH); - config.config.add(BulletConfigSyncingUtil.NUKE_TOTS); - config.config.add(BulletConfigSyncingUtil.NUKE_SAFE); - config.config.add(BulletConfigSyncingUtil.NUKE_PUMPKIN); - config.config.add(BulletConfigSyncingUtil.NUKE_BARREL); - config.durability = 1000; - - return config; - } - - public static GunConfiguration getMIRVConfig() { - - GunConfiguration config = getFatmanConfig(); - - config.name = "m42MIRV"; - config.manufacturer = EnumGunManufacturer.F_STRONG; - - config.config = new ArrayList(); - config.config.add(BulletConfigSyncingUtil.NUKE_MIRV_NORMAL); - config.config.add(BulletConfigSyncingUtil.NUKE_MIRV_LOW); - config.config.add(BulletConfigSyncingUtil.NUKE_MIRV_HIGH); - config.config.add(BulletConfigSyncingUtil.NUKE_MIRV_SAFE); - config.config.add(BulletConfigSyncingUtil.NUKE_MIRV_SPECIAL); - config.durability = 1000; - - return config; - } - - public static GunConfiguration getBELConfig() { - - GunConfiguration config = getFatmanConfig(); - - config.name = "bel"; - config.manufacturer = EnumGunManufacturer.F_STRONG; - - config.config = new ArrayList(); - config.config.add(BulletConfigSyncingUtil.NUKE_AMAT); - - return config; - } - - public static GunConfiguration getProtoConfig() { - - GunConfiguration config = new GunConfiguration(); - - config.rateOfFire = 20; - config.roundsPerCycle = 8; - config.gunMode = GunConfiguration.MODE_NORMAL; - config.firingMode = GunConfiguration.FIRE_MANUAL; - config.reloadDuration = 120; - config.firingDuration = 0; - config.ammoCap = 8; - config.reloadType = GunConfiguration.RELOAD_FULL; - config.allowsInfinity = true; - config.crosshair = Crosshair.L_CIRCUMFLEX; - config.firingSound = "hbm:weapon.fatmanShoot"; - config.reloadSound = GunConfiguration.RSOUND_FATMAN; - config.reloadSoundEnd = false; - - config.name = "m42"; - config.manufacturer = EnumGunManufacturer.F_STRONG; - - config.config = new ArrayList(); - config.config.add(BulletConfigSyncingUtil.NUKE_PROTO_NORMAL); - config.config.add(BulletConfigSyncingUtil.NUKE_PROTO_LOW); - config.config.add(BulletConfigSyncingUtil.NUKE_PROTO_HIGH); - config.config.add(BulletConfigSyncingUtil.NUKE_PROTO_TOTS); - config.config.add(BulletConfigSyncingUtil.NUKE_PROTO_SAFE); - config.config.add(BulletConfigSyncingUtil.NUKE_PROTO_PUMPKIN); - config.config.add(BulletConfigSyncingUtil.NUKE_BARREL); - config.durability = 1000; - - return config; - } - - public static BulletConfiguration getNukeConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardNukeConfig(); - bullet.ammo = new ComparableStack(ModItems.ammo_nuke.stackFromEnum(AmmoFatman.STOCK)); - - bullet.bntImpact = new IBulletImpactBehaviorNT() { - - @Override - public void behaveBlockHit(EntityBulletBaseNT bullet, int x, int y, int z, int sideHit) { - BulletConfigFactory.nuclearExplosion(bullet, x, y, z, ExplosionNukeSmall.PARAMS_MEDIUM); - } - }; - - return bullet; - } - - public static BulletConfiguration getNukeLowConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardNukeConfig(); - bullet.ammo = new ComparableStack(ModItems.ammo_nuke.stackFromEnum(AmmoFatman.LOW)); - - bullet.bntImpact = new IBulletImpactBehaviorNT() { - - @Override - public void behaveBlockHit(EntityBulletBaseNT bullet, int x, int y, int z, int sideHit) { - BulletConfigFactory.nuclearExplosion(bullet, x, y, z, ExplosionNukeSmall.PARAMS_LOW); - } - }; - - return bullet; - } - - public static BulletConfiguration getNukeHighConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardNukeConfig(); - bullet.ammo = new ComparableStack(ModItems.ammo_nuke.stackFromEnum(AmmoFatman.HIGH)); - - bullet.bntImpact = new IBulletImpactBehaviorNT() { - - @Override - public void behaveBlockHit(EntityBulletBaseNT bullet, int x, int y, int z, int sideHit) { - BulletConfigFactory.nuclearExplosion(bullet, x, y, z, ExplosionNukeSmall.PARAMS_HIGH); - } - }; - - return bullet; - } - - public static BulletConfiguration getNukeTotsConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardNukeConfig(); - bullet.ammo = new ComparableStack(ModItems.ammo_nuke.stackFromEnum(AmmoFatman.TOTS)); - bullet.bulletsMin = 8; - bullet.bulletsMax = 8; - bullet.spread = 0.1F; - bullet.style = bullet.STYLE_GRENADE; - - bullet.bntImpact = new IBulletImpactBehaviorNT() { - - @Override - public void behaveBlockHit(EntityBulletBaseNT bullet, int x, int y, int z, int sideHit) { - BulletConfigFactory.nuclearExplosion(bullet, x, y, z, ExplosionNukeSmall.PARAMS_TOTS); - } - }; - - return bullet; - } - - public static BulletConfiguration getNukeSafeConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardNukeConfig(); - bullet.ammo = new ComparableStack(ModItems.ammo_nuke.stackFromEnum(AmmoFatman.SAFE)); - - bullet.bntImpact = new IBulletImpactBehaviorNT() { - - @Override - public void behaveBlockHit(EntityBulletBaseNT bullet, int x, int y, int z, int sideHit) { - BulletConfigFactory.nuclearExplosion(bullet, x, y, z, ExplosionNukeSmall.PARAMS_SAFE); - } - }; - - return bullet; - } - - public static BulletConfiguration getNukePumpkinConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardNukeConfig(); - bullet.ammo = new ComparableStack(ModItems.ammo_nuke.stackFromEnum(AmmoFatman.PUMPKIN)); - bullet.explosive = 10F; - - bullet.bntImpact = new IBulletImpactBehaviorNT() { - - @Override - public void behaveBlockHit(EntityBulletBaseNT bullet, int x, int y, int z, int sideHit) { - - 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 = new ComparableStack(ModItems.ammo_nuke.stackFromEnum(AmmoFatman.BARREL)); - bullet.explosive = 3F; - bullet.style = bullet.STYLE_BARREL; - - bullet.bntImpact = new IBulletImpactBehaviorNT() { - - @Override - public void behaveBlockHit(EntityBulletBaseNT bullet, int x, int y, int z, int sideHit) { - - 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; - } - - x = (int)Math.floor(posX); - y = (int)Math.floor(posY); - z = (int)Math.floor(posZ); - - World worldObj = bullet.worldObj; - - for(int ix = x - 3; ix <= x + 3; ix++) { - for(int iy = y - 3; iy <= y + 3; iy++) { - for(int iz = z - 3; iz <= z + 3; iz++) { - - if(worldObj.rand.nextInt(3) == 0 && worldObj.getBlock(ix, iy, iz).isReplaceable(worldObj, ix, iy, iz) && ModBlocks.fallout.canPlaceBlockAt(worldObj, ix, iy, iz)) { - worldObj.setBlock(ix, iy, iz, ModBlocks.fallout); - } else if(worldObj.getBlock(ix, iy, iz) == Blocks.air) { - - if(worldObj.rand.nextBoolean()) - worldObj.setBlock(ix, iy, iz, ModBlocks.gas_radon); - else - worldObj.setBlock(ix, iy, iz, ModBlocks.gas_radon_dense); - } - } - } - } - - ChunkRadiationManager.proxy.incrementRad(worldObj, x, y, z, 100F); - - ExplosionLarge.spawnParticles(bullet.worldObj, posX, posY, posZ, 45); - } - } - }; - - return bullet; - } - - public static BulletConfiguration getMirvConfig() { - - BulletConfiguration bullet = getNukeConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_nuke.stackFromEnum(AmmoFatman.MIRV)); - bullet.style = BulletConfiguration.STYLE_MIRV; - bullet.velocity *= 3; - - bullet.bntUpdate = new IBulletUpdateBehaviorNT() { - - @Override - public void behaveUpdate(EntityBulletBaseNT bullet) { - - if(bullet.worldObj.isRemote) - return; - - if(bullet.ticksExisted == 15) { - bullet.setDead(); - - for(int i = 0; i < 6; i++) { - - EntityBulletBaseNT nuke = new EntityBulletBaseNT(bullet.worldObj, BulletConfigSyncingUtil.NUKE_NORMAL); - nuke.setPosition(bullet.posX, bullet.posY, bullet.posZ); - double mod = 0.1D; - nuke.motionX = bullet.worldObj.rand.nextGaussian() * mod; - nuke.motionY = -0.1D; - nuke.motionZ = bullet.worldObj.rand.nextGaussian() * mod; - bullet.worldObj.spawnEntityInWorld(nuke); - } - } - } - - }; - - return bullet; - } - - public static BulletConfiguration getMirvLowConfig() { - - BulletConfiguration bullet = getNukeLowConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_nuke.stackFromEnum(AmmoFatman.MIRV_LOW)); - bullet.style = BulletConfiguration.STYLE_MIRV; - bullet.velocity *= 3; - - bullet.bntUpdate = new IBulletUpdateBehaviorNT() { - - @Override - public void behaveUpdate(EntityBulletBaseNT bullet) { - - if(bullet.worldObj.isRemote) - return; - - if(bullet.ticksExisted == 15) { - bullet.setDead(); - - for(int i = 0; i < 6; i++) { - - EntityBulletBaseNT nuke = new EntityBulletBaseNT(bullet.worldObj, BulletConfigSyncingUtil.NUKE_LOW); - nuke.setPosition(bullet.posX, bullet.posY, bullet.posZ); - double mod = 0.1D; - nuke.motionX = bullet.worldObj.rand.nextGaussian() * mod; - nuke.motionY = -0.1D; - nuke.motionZ = bullet.worldObj.rand.nextGaussian() * mod; - bullet.worldObj.spawnEntityInWorld(nuke); - } - } - } - - }; - - return bullet; - } - - public static BulletConfiguration getMirvHighConfig() { - - BulletConfiguration bullet = getNukeHighConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_nuke.stackFromEnum(AmmoFatman.MIRV_HIGH)); - bullet.style = BulletConfiguration.STYLE_MIRV; - bullet.velocity *= 3; - - bullet.bntUpdate = new IBulletUpdateBehaviorNT() { - - @Override - public void behaveUpdate(EntityBulletBaseNT bullet) { - - if(bullet.worldObj.isRemote) - return; - - if(bullet.ticksExisted == 15) { - bullet.setDead(); - - for(int i = 0; i < 6; i++) { - - EntityBulletBaseNT nuke = new EntityBulletBaseNT(bullet.worldObj, BulletConfigSyncingUtil.NUKE_HIGH); - nuke.setPosition(bullet.posX, bullet.posY, bullet.posZ); - double mod = 0.1D; - nuke.motionX = bullet.worldObj.rand.nextGaussian() * mod; - nuke.motionY = -0.1D; - nuke.motionZ = bullet.worldObj.rand.nextGaussian() * mod; - bullet.worldObj.spawnEntityInWorld(nuke); - } - } - } - - }; - - return bullet; - } - - public static BulletConfiguration getMirvSafeConfig() { - - BulletConfiguration bullet = getNukeSafeConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_nuke.stackFromEnum(AmmoFatman.MIRV_SAFE)); - bullet.style = BulletConfiguration.STYLE_MIRV; - bullet.velocity *= 3; - - bullet.bntUpdate = new IBulletUpdateBehaviorNT() { - - @Override - public void behaveUpdate(EntityBulletBaseNT bullet) { - - if(bullet.worldObj.isRemote) - return; - - if(bullet.ticksExisted == 15) { - bullet.setDead(); - - for(int i = 0; i < 6; i++) { - - EntityBulletBaseNT nuke = new EntityBulletBaseNT(bullet.worldObj, BulletConfigSyncingUtil.NUKE_SAFE); - nuke.setPosition(bullet.posX, bullet.posY, bullet.posZ); - double mod = 0.1D; - nuke.motionX = bullet.worldObj.rand.nextGaussian() * mod; - nuke.motionY = -0.1D; - nuke.motionZ = bullet.worldObj.rand.nextGaussian() * mod; - bullet.worldObj.spawnEntityInWorld(nuke); - } - } - } - - }; - - return bullet; - } - - public static BulletConfiguration getMirvSpecialConfig() { - - BulletConfiguration bullet = getNukeConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_nuke.stackFromEnum(AmmoFatman.MIRV_SPECIAL)); - bullet.style = BulletConfiguration.STYLE_MIRV; - bullet.velocity *= 3; - - bullet.bntUpdate = new IBulletUpdateBehaviorNT() { - - @Override - public void behaveUpdate(EntityBulletBaseNT bullet) { - - if(bullet.worldObj.isRemote) - return; - - if(bullet.ticksExisted == 15) { - bullet.setDead(); - - for(int i = 0; i < 24; i++) { - - EntityBulletBaseNT nuke = null; - - if(i < 6) - nuke = new EntityBulletBaseNT(bullet.worldObj, BulletConfigSyncingUtil.NUKE_LOW); - else if(i < 12) - nuke = new EntityBulletBaseNT(bullet.worldObj, BulletConfigSyncingUtil.NUKE_TOTS); - else if(i < 18) - nuke = new EntityBulletBaseNT(bullet.worldObj, BulletConfigSyncingUtil.NUKE_NORMAL); - else - nuke = new EntityBulletBaseNT(bullet.worldObj, BulletConfigSyncingUtil.NUKE_AMAT); - - nuke.setPosition(bullet.posX, bullet.posY, bullet.posZ); - - double mod = 0.25D; - nuke.motionX = bullet.worldObj.rand.nextGaussian() * mod; - nuke.motionY = -0.1D; - nuke.motionZ = bullet.worldObj.rand.nextGaussian() * mod; - bullet.worldObj.spawnEntityInWorld(nuke); - } - } - } - - }; - - return bullet; - } - - public static BulletConfiguration getBalefireConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardNukeConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_nuke.stackFromEnum(AmmoFatman.BALEFIRE)); - bullet.style = BulletConfiguration.STYLE_BF; - - bullet.bntImpact = new IBulletImpactBehaviorNT() { - @Override public void behaveBlockHit(EntityBulletBaseNT bullet, int x, int y, int z, int sideHit) { - - 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; - } - - bullet.worldObj.playSoundEffect(x, y, z, "hbm:weapon.mukeExplosion", 15.0F, 1.0F); - - ExplosionLarge.spawnShrapnels(bullet.worldObj, posX, posY, posZ, 25); - - ExplosionNT exp = new ExplosionNT(bullet.worldObj, null, posX, posY, posZ, 15F) - .addAttrib(ExAttrib.BALEFIRE) - .addAttrib(ExAttrib.NOPARTICLE) - .addAttrib(ExAttrib.NOSOUND) - .addAttrib(ExAttrib.NODROP) - .overrideResolution(64); - exp.doExplosionA(); - exp.doExplosionB(false); - - NBTTagCompound data = new NBTTagCompound(); - data.setString("type", "muke"); - data.setBoolean("balefire", true); - PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data, x, y + 0.5, z), new TargetPoint(bullet.dimension, bullet.posX, bullet.posY, bullet.posZ, 250)); - } - } - }; - - return bullet; - } - -} diff --git a/src/main/java/com/hbm/handler/guncfg/GunGaussFactory.java b/src/main/java/com/hbm/handler/guncfg/GunGaussFactory.java deleted file mode 100644 index 000e74d4e2..0000000000 --- a/src/main/java/com/hbm/handler/guncfg/GunGaussFactory.java +++ /dev/null @@ -1,94 +0,0 @@ -package com.hbm.handler.guncfg; - -import java.util.ArrayList; - -import com.hbm.handler.BulletConfigSyncingUtil; -import com.hbm.handler.BulletConfiguration; -import com.hbm.handler.GunConfiguration; -import com.hbm.inventory.RecipesCommon.ComparableStack; -import com.hbm.items.ModItems; -import com.hbm.items.weapon.sedna.Crosshair; -import com.hbm.lib.HbmCollection.EnumGunManufacturer; -import com.hbm.render.anim.BusAnimation; -import com.hbm.render.anim.BusAnimationSequence; -import com.hbm.render.anim.HbmAnimations.AnimType; - -public class GunGaussFactory { - - public static GunConfiguration getXVLConfig() { - - GunConfiguration config = new GunConfiguration(); - - config.rateOfFire = 4; - config.roundsPerCycle = 1; - config.gunMode = GunConfiguration.MODE_NORMAL; - config.firingMode = GunConfiguration.FIRE_AUTO; - config.reloadDuration = 20; - config.firingDuration = 0; - config.ammoCap = 0; - config.reloadType = GunConfiguration.RELOAD_NONE; - config.allowsInfinity = true; - config.crosshair = Crosshair.CIRCLE; - config.durability = 15000; - config.firingSound = "hbm:weapon.tauShoot"; - config.firingVolume = 0.5F; - - config.name = "tau"; - config.manufacturer = EnumGunManufacturer.BLACK_MESA; - - config.config = new ArrayList(); - config.config.add(BulletConfigSyncingUtil.SPECIAL_GAUSS); - - config.animations.put(AnimType.CYCLE, new BusAnimation() - .addBus("RECOIL", new BusAnimationSequence() - .addPos(1, 0, 0, 25) - .addPos(0, 0, 0, 75) - ) - ); - - return config; - } - - public static GunConfiguration getChargedConfig() { - - GunConfiguration config = new GunConfiguration(); - - config.rateOfFire = 10; - config.roundsPerCycle = 1; - config.gunMode = GunConfiguration.MODE_NORMAL; - config.reloadDuration = 1; - config.firingDuration = 0; - config.ammoCap = 0; - config.reloadType = GunConfiguration.RELOAD_NONE; - config.allowsInfinity = true; - config.crosshair = Crosshair.L_ARROWS; - - config.config = new ArrayList(); - config.config.add(BulletConfigSyncingUtil.SPECIAL_GAUSS_CHARGED); - - return config; - } - - public static BulletConfiguration getGaussConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig(); - - bullet.ammo = new ComparableStack(ModItems.gun_xvl1456_ammo); - bullet.dmgMin = 18; - bullet.dmgMax = 27; - bullet.style = bullet.STYLE_TAU; - bullet.LBRC = 80; - bullet.HBRC = 5; - - return bullet; - } - - public static BulletConfiguration getAltConfig() { - - BulletConfiguration bullet = getGaussConfig(); - - bullet.trail = 1; - - return bullet; - } -} diff --git a/src/main/java/com/hbm/handler/guncfg/GunGrenadeFactory.java b/src/main/java/com/hbm/handler/guncfg/GunGrenadeFactory.java deleted file mode 100644 index 3cac918144..0000000000 --- a/src/main/java/com/hbm/handler/guncfg/GunGrenadeFactory.java +++ /dev/null @@ -1,392 +0,0 @@ -package com.hbm.handler.guncfg; - -import com.hbm.entity.projectile.EntityBulletBaseNT; -import com.hbm.explosion.ExplosionNukeSmall; -import com.hbm.handler.BulletConfigSyncingUtil; -import com.hbm.handler.BulletConfiguration; -import com.hbm.handler.CasingEjector; -import com.hbm.handler.GunConfiguration; -import com.hbm.inventory.RecipesCommon.ComparableStack; -import com.hbm.items.ModItems; -import com.hbm.items.weapon.sedna.Crosshair; -import com.hbm.items.ItemAmmoEnums.AmmoGrenade; -import com.hbm.lib.HbmCollection; -import com.hbm.lib.HbmCollection.EnumGunManufacturer; -import com.hbm.main.ResourceManager; -import com.hbm.packet.PacketDispatcher; -import com.hbm.packet.toclient.AuxParticlePacketNT; -import com.hbm.particle.SpentCasing; -import com.hbm.particle.SpentCasing.CasingType; -import com.hbm.render.anim.HbmAnimations.AnimType; -import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.MathHelper; -import net.minecraft.util.Vec3; - -public class GunGrenadeFactory { - - private static final CasingEjector EJECTOR_LAUNCHER; - private static final CasingEjector EJECTOR_CONGOLAKE; - private static final SpentCasing CASING40MM; - - static { - EJECTOR_LAUNCHER = new CasingEjector().setAngleRange(0.02F, 0.03F).setAfterReload(); - EJECTOR_CONGOLAKE = new CasingEjector().setMotion(0.3, 0.1, 0).setAngleRange(0.02F, 0.03F).setDelay(15); - CASING40MM = new SpentCasing(CasingType.STRAIGHT).setScale(4F, 4F, 3F).setBounceMotion(0.02F, 0.03F).setColor(SpentCasing.COLOR_CASE_40MM, 0x4B5443).setupSmoke(1F, 0.5D, 60, 40); - } - - public static GunConfiguration getHK69Config() { - - GunConfiguration config = new GunConfiguration(); - - config.rateOfFire = 30; - config.roundsPerCycle = 1; - config.gunMode = GunConfiguration.MODE_NORMAL; - config.firingMode = GunConfiguration.FIRE_MANUAL; - config.hasSights = true; - config.zoomFOV = 0.66F; - config.reloadDuration = 40; - config.firingDuration = 0; - config.ammoCap = 1; - config.reloadType = GunConfiguration.RELOAD_SINGLE; - config.allowsInfinity = true; - config.crosshair = Crosshair.L_CIRCUMFLEX; - config.firingSound = "hbm:weapon.hkShoot"; - config.reloadSound = GunConfiguration.RSOUND_GRENADE; - config.reloadSoundEnd = false; - - config.name = "gPistol"; - config.manufacturer = EnumGunManufacturer.H_AND_K; - - config.config = HbmCollection.grenade; - config.durability = 300; - - config.ejector = EJECTOR_LAUNCHER; - - return config; - } - - public static GunConfiguration getCongoConfig() { - - GunConfiguration config = new GunConfiguration(); - - config.rateOfFire = 24; - config.roundsPerCycle = 1; - config.gunMode = GunConfiguration.MODE_NORMAL; - config.firingMode = GunConfiguration.FIRE_MANUAL; - config.reloadDuration = 16; - config.firingDuration = 0; - config.ammoCap = 4; - config.reloadType = GunConfiguration.RELOAD_SINGLE; - config.allowsInfinity = true; - config.crosshair = Crosshair.L_CIRCUMFLEX; - config.firingSound = "hbm:weapon.glShoot"; - config.reloadSound = GunConfiguration.RSOUND_GRENADE_NEW; - config.reloadSoundEnd = false; - - config.name = "congoLake"; - config.manufacturer = EnumGunManufacturer.NAWS; - - config.config = HbmCollection.grenade; - config.durability = 2500; - - config.ejector = EJECTOR_CONGOLAKE; - - config.reloadAnimationsSequential = true; - - config.loadAnimations = i -> { - config.animations.put(AnimType.CYCLE, ResourceManager.congolake_anim.get("Fire")); - config.animations.put(AnimType.CYCLE_EMPTY, ResourceManager.congolake_anim.get("FireEmpty")); - config.animations.put(AnimType.RELOAD, ResourceManager.congolake_anim.get("ReloadStart")); - config.animations.put(AnimType.RELOAD_EMPTY, ResourceManager.congolake_anim.get("ReloadEmpty")); - config.animations.put(AnimType.RELOAD_CYCLE, ResourceManager.congolake_anim.get("Reload")); - config.animations.put(AnimType.RELOAD_END, ResourceManager.congolake_anim.get("ReloadEnd")); - }; - - return config; - } - - public static BulletConfiguration getGrenadeConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardGrenadeConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_grenade.stackFromEnum(AmmoGrenade.STOCK)); - bullet.velocity = 2.0F; - bullet.dmgMin = 10; - bullet.dmgMax = 15; - bullet.wear = 10; - bullet.trail = 0; - - bullet.spentCasing = CASING40MM.clone().register("40MMStock"); - - return bullet; - } - - public static BulletConfiguration getGrenadeHEConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardGrenadeConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_grenade.stackFromEnum(AmmoGrenade.HE)); - bullet.velocity = 2.0F; - bullet.dmgMin = 20; - bullet.dmgMax = 15; - bullet.wear = 15; - bullet.explosive = 5.0F; - bullet.trail = 1; - - bullet.spentCasing = CASING40MM.clone().register("40MMHE"); - - return bullet; - } - - public static BulletConfiguration getGrenadeIncendirayConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardGrenadeConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_grenade.stackFromEnum(AmmoGrenade.INCENDIARY)); - bullet.velocity = 2.0F; - bullet.dmgMin = 15; - bullet.dmgMax = 15; - bullet.wear = 15; - bullet.trail = 0; - bullet.incendiary = 2; - - bullet.spentCasing = CASING40MM.clone().register("40MMInc"); - - return bullet; - } - - public static BulletConfiguration getGrenadePhosphorusConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardGrenadeConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_grenade.stackFromEnum(AmmoGrenade.PHOSPHORUS)); - bullet.velocity = 2.0F; - bullet.dmgMin = 15; - bullet.dmgMax = 15; - bullet.wear = 15; - bullet.trail = 0; - bullet.incendiary = 2; - - bullet.bntImpact = BulletConfigFactory.getPhosphorousEffect(10, 60 * 20, 100, 0.5D, 1F); - - bullet.spentCasing = CASING40MM.clone().register("40MMPhos"); - - return bullet; - } - - public static BulletConfiguration getGrenadeChlorineConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardGrenadeConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_grenade.stackFromEnum(AmmoGrenade.CHLORINE)); - bullet.velocity = 2.0F; - bullet.dmgMin = 10; - bullet.dmgMax = 15; - bullet.wear = 10; - bullet.trail = 3; - bullet.explosive = 0; - bullet.chlorine = 50; - - bullet.spentCasing = CASING40MM.clone().register("40MMTox"); - - return bullet; - } - - public static BulletConfiguration getGrenadeSleekConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardGrenadeConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_grenade.stackFromEnum(AmmoGrenade.SLEEK)); - bullet.velocity = 2.0F; - bullet.dmgMin = 10; - bullet.dmgMax = 15; - bullet.wear = 10; - bullet.trail = 4; - bullet.explosive = 7.5F; - bullet.jolt = 6.5D; - - bullet.spentCasing = CASING40MM.clone().register("40MMIF").setColor(SpentCasing.COLOR_CASE_40MM, 0x1C1C1C); - - return bullet; - } - - public static BulletConfiguration getGrenadeConcussionConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardGrenadeConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_grenade.stackFromEnum(AmmoGrenade.CONCUSSION)); - bullet.velocity = 2.0F; - bullet.dmgMin = 15; - bullet.dmgMax = 20; - bullet.blockDamage = false; - bullet.explosive = 10.0F; - bullet.trail = 3; - - bullet.spentCasing = CASING40MM.clone().register("40MMCon").setColor(SpentCasing.COLOR_CASE_40MM, 0x3D5E1D); - - return bullet; - } - - public static BulletConfiguration getGrenadeFinnedConfig() { - - BulletConfiguration bullet = getGrenadeConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_grenade.stackFromEnum(AmmoGrenade.FINNED)); - bullet.gravity = 0.02; - bullet.explosive = 1.5F; - bullet.trail = 5; - - bullet.spentCasing = CASING40MM.clone().register("40MMFin").setColor(SpentCasing.COLOR_CASE_40MM, 0x007FDB); - - return bullet; - } - - public static BulletConfiguration getGrenadeNuclearConfig() { - - BulletConfiguration bullet = getGrenadeConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_grenade.stackFromEnum(AmmoGrenade.NUCLEAR)); - bullet.velocity = 4; - bullet.explosive = 0.0F; - - bullet.bntImpact = (bulletnt, x, y, z, sideHit) -> { - BulletConfigFactory.nuclearExplosion(bulletnt, x, y, z, ExplosionNukeSmall.PARAMS_TOTS); - }; - - bullet.spentCasing = CASING40MM.clone().register("40MMNuke").setColor(SpentCasing.COLOR_CASE_40MM, 0xE2C000); - - return bullet; - } - - public static BulletConfiguration getGrenadeTracerConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardGrenadeConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_grenade.stackFromEnum(AmmoGrenade.TRACER)); - bullet.velocity = 2.0F; - bullet.wear = 10; - bullet.explosive = 0F; - bullet.trail = 5; - bullet.vPFX = "bluedust"; - - bullet.spentCasing = CASING40MM.clone().register("40MMTrac").setColor(0xEEEEEE, 0x0075CA); - - return bullet; - } - - public static BulletConfiguration getGrenadeKampfConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardRocketConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_grenade.stackFromEnum(AmmoGrenade.KAMPF)); - bullet.spread = 0.0F; - bullet.gravity = 0.0D; - bullet.wear = 15; - bullet.explosive = 3.5F; - bullet.style = BulletConfiguration.STYLE_GRENADE; - bullet.trail = 4; - bullet.vPFX = "smoke"; - - //bullet.spentCasing = CASING40MM.clone().register("40MMKampf").setColor(0xEBC35E); //does not eject, whole cartridge leaves the gun - - return bullet; - } - - public static BulletConfiguration getGrenadeLeadbursterConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardGrenadeConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_grenade.stackFromEnum(AmmoGrenade.LEADBURSTER)); - bullet.spread = 0.0F; - bullet.gravity = 0.01D; - bullet.explosive = 0F; - bullet.style = BulletConfiguration.STYLE_LEADBURSTER; - bullet.doesRicochet = false; - bullet.doesPenetrate = true; - bullet.vPFX = ""; - - bullet.bntImpact = (bulletnt, x, y, z, sideHit) -> { - - switch(sideHit) { - case 0: bulletnt.rotationPitch = (float) (90); break; - case 1: bulletnt.rotationPitch = (float) (-90); break; - case 2: bulletnt.rotationPitch = 0; bulletnt.rotationYaw = 0; break; - case 3: bulletnt.rotationPitch = 0; bulletnt.rotationYaw = (float) 180; break; - case 4: bulletnt.rotationPitch = 0; bulletnt.rotationYaw = 90; break; - case 5: bulletnt.rotationPitch = 0; bulletnt.rotationYaw = (float) -90; break; - } - - Vec3 vec = Vec3.createVectorHelper(0, 0, 1); - vec.rotateAroundX((float) (bulletnt.rotationPitch * Math.PI / 180D)); - vec.rotateAroundY((float) (bulletnt.rotationYaw * Math.PI / 180)); - - double offset = 0.1; - bulletnt.posX -= vec.xCoord * offset; - bulletnt.posY -= vec.yCoord * offset; - bulletnt.posZ -= vec.zCoord * offset; - - bulletnt.ticksExisted = 0; - bulletnt.getStuck(x, y, z, sideHit); - }; - - bullet.bntUpdate = (bulletnt) -> { - if(bulletnt.worldObj.isRemote) return; - - switch(bulletnt.getStuckIn()) { - case 0: bulletnt.rotationPitch = (float) (90); break; - case 1: bulletnt.rotationPitch = (float) (-90); break; - case 2: bulletnt.rotationPitch = 0; bulletnt.rotationYaw = 0; break; - case 3: bulletnt.rotationPitch = 0; bulletnt.rotationYaw = (float) 180; break; - case 4: bulletnt.rotationPitch = 0; bulletnt.rotationYaw = 90; break; - case 5: bulletnt.rotationPitch = 0; bulletnt.rotationYaw = (float) -90; break; - } - - if(bulletnt.ticksInGround < 20) return; - int timer = bulletnt.ticksInGround - 20; - - Vec3 offset = Vec3.createVectorHelper(0, 0, -0.5); - offset.rotateAroundX((float) (bulletnt.rotationPitch * Math.PI / 180D)); - offset.rotateAroundY((float) (bulletnt.rotationYaw * Math.PI / 180)); - - if(bulletnt.ticksExisted >= 100) { - bulletnt.setDead(); - NBTTagCompound data = new NBTTagCompound(); - data.setString("type", "vanillaExt"); - data.setString("mode", "largeexplode"); - data.setFloat("size", 1F); - data.setByte("count", (byte)1); - PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data, bulletnt.posX + offset.xCoord, bulletnt.posY + offset.yCoord, bulletnt.posZ + offset.zCoord), new TargetPoint(bulletnt.dimension, bulletnt.posX, bulletnt.posY, bulletnt.posZ, 50)); - } - - if(timer > 60) return; - - bulletnt.worldObj.playSoundEffect(bulletnt.posX, bulletnt.posY, bulletnt.posZ, "hbm:weapon.silencerShoot", 2F, 1F); - - for(int i = 0; i < 5; i++) { - Vec3 vec = Vec3.createVectorHelper(0, 1, 0); - vec.rotateAroundX((float) Math.toRadians(11.25 * i)); - vec.rotateAroundZ((float) -Math.toRadians(13 * timer)); - vec.rotateAroundX((float) (bulletnt.rotationPitch * Math.PI / 180D)); - vec.rotateAroundY((float) (bulletnt.rotationYaw * Math.PI / 180)); - - EntityBulletBaseNT pellet = new EntityBulletBaseNT(bulletnt.worldObj, BulletConfigSyncingUtil.R556_NORMAL); - double dist = 0.5; - double off = 0.5; - pellet.setPosition(bulletnt.posX + vec.xCoord * dist + offset.xCoord * off, bulletnt.posY + vec.yCoord * dist + offset.yCoord * off, bulletnt.posZ + vec.zCoord * dist + offset.zCoord * off); - double vel = 0.5; - pellet.motionX = vec.xCoord * vel; - pellet.motionY = vec.yCoord * vel; - pellet.motionZ = vec.zCoord * vel; - - float hyp = MathHelper.sqrt_double(pellet.motionX * pellet.motionX + pellet.motionZ * pellet.motionZ); - pellet.prevRotationYaw = pellet.rotationYaw = (float) (Math.atan2(pellet.motionX, pellet.motionZ) * 180.0D / Math.PI); - pellet.prevRotationPitch = pellet.rotationPitch = (float) (Math.atan2(pellet.motionY, (double) hyp) * 180.0D / Math.PI); - - bulletnt.worldObj.spawnEntityInWorld(pellet); - } - }; - - return bullet; - } -} diff --git a/src/main/java/com/hbm/handler/guncfg/GunOSIPRFactory.java b/src/main/java/com/hbm/handler/guncfg/GunOSIPRFactory.java deleted file mode 100644 index c3f2d9d75b..0000000000 --- a/src/main/java/com/hbm/handler/guncfg/GunOSIPRFactory.java +++ /dev/null @@ -1,138 +0,0 @@ -package com.hbm.handler.guncfg; - -import java.util.ArrayList; - -import com.hbm.blocks.bomb.BlockDetonatable; -import com.hbm.handler.BulletConfigSyncingUtil; -import com.hbm.handler.BulletConfiguration; -import com.hbm.handler.GunConfiguration; -import com.hbm.inventory.RecipesCommon.ComparableStack; -import com.hbm.items.ModItems; -import com.hbm.items.weapon.sedna.Crosshair; -import com.hbm.lib.HbmCollection.EnumGunManufacturer; -import com.hbm.lib.ModDamageSource; -import com.hbm.potion.HbmPotion; -import net.minecraft.block.Block; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.potion.PotionEffect; - -public class GunOSIPRFactory { - - public static GunConfiguration getOSIPRConfig() { - - GunConfiguration config = new GunConfiguration(); - - config.rateOfFire = 2; - config.roundsPerCycle = 1; - config.gunMode = GunConfiguration.MODE_NORMAL; - config.firingMode = GunConfiguration.FIRE_AUTO; - config.reloadDuration = 20; - config.firingDuration = 0; - config.ammoCap = 30; - config.reloadType = GunConfiguration.RELOAD_FULL; - config.allowsInfinity = true; - config.crosshair = Crosshair.L_ARROWS; - config.durability = 50_000; - config.reloadSound = "hbm:weapon.osiprReload"; - config.firingSound = "hbm:weapon.osiprShoot"; - config.reloadSoundEnd = false; - - config.name = "osipr"; - config.manufacturer = EnumGunManufacturer.COMBINE; - - config.config = new ArrayList(); - config.config.add(BulletConfigSyncingUtil.SPECIAL_OSIPR); - - return config; - } - - public static GunConfiguration getAltConfig() { - - GunConfiguration config = new GunConfiguration(); - - config.rateOfFire = 15; - config.roundsPerCycle = 1; - config.gunMode = GunConfiguration.MODE_NORMAL; - config.firingMode = GunConfiguration.FIRE_MANUAL; - config.reloadDuration = 20; - config.firingDuration = 0; - config.ammoCap = 0; - config.reloadType = GunConfiguration.RELOAD_NONE; - config.allowsInfinity = true; - config.firingSound = "hbm:weapon.singFlyby"; - - config.config = new ArrayList(); - config.config.add(BulletConfigSyncingUtil.SPECIAL_OSIPR_CHARGED); - - return config; - } - - static float inaccuracy = 1.25F; - public static BulletConfiguration getPulseConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig(); - - bullet.ammo = new ComparableStack(ModItems.gun_osipr_ammo); - bullet.ammoCount = 30; - bullet.doesRicochet = false; - bullet.spread *= inaccuracy; - bullet.dmgMin = 15; - bullet.dmgMax = 21; - bullet.trail = 2; - - return bullet; - } - - public static BulletConfiguration getPulseChargedConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig(); - - bullet.ammo = new ComparableStack(ModItems.gun_osipr_ammo2); - bullet.ricochetAngle = 360; - bullet.LBRC = 100; - bullet.HBRC = 100; - bullet.bounceMod = 1; - bullet.style = BulletConfiguration.STYLE_ORB; - bullet.damageType = ModDamageSource.s_combineball; - bullet.liveAfterImpact = true; - bullet.spread = 0; - bullet.gravity = 0; - bullet.maxAge = 150; - bullet.velocity = 2; - - bullet.bntHurt = (ball, entity) -> { - if(entity instanceof EntityLivingBase) { - EntityLivingBase entityLiving = (EntityLivingBase) entity; - entity.addVelocity(ball.motionX / 2, ball.motionY / 2, ball.motionZ / 2); - - if(entity == ball.getThrower()) - return; - - if(entityLiving.getHealth() <= 1000) { - entityLiving.addPotionEffect(new PotionEffect(HbmPotion.bang.id, 1, 0)); - entityLiving.setLastAttacker(ball.getThrower()); - } else if(entityLiving.getHealth() > 1000) { - ball.setDead(); - return; - } - - } - }; - - bullet.bntRicochet = (ball, x, y, z) -> { - Block block = ball.worldObj.getBlock(x, y, z); - if(block instanceof BlockDetonatable) { - ((BlockDetonatable) block).onShot(ball.worldObj, x, y, z); - } - }; - - bullet.bntImpact = (ball, x, y, z, sideHit) -> { - Block block = ball.worldObj.getBlock(x, y, z); - if(block instanceof BlockDetonatable) { - ((BlockDetonatable) block).onShot(ball.worldObj, x, y, z); - } - }; - - return bullet; - } -} diff --git a/src/main/java/com/hbm/handler/guncfg/GunPoweredFactory.java b/src/main/java/com/hbm/handler/guncfg/GunPoweredFactory.java deleted file mode 100644 index 3703750aae..0000000000 --- a/src/main/java/com/hbm/handler/guncfg/GunPoweredFactory.java +++ /dev/null @@ -1,248 +0,0 @@ -package com.hbm.handler.guncfg; - -import java.util.ArrayList; - -import com.hbm.handler.BulletConfigSyncingUtil; -import com.hbm.handler.BulletConfiguration; -import com.hbm.handler.GunConfiguration; -import com.hbm.items.weapon.sedna.Crosshair; -import com.hbm.lib.HbmCollection.EnumGunManufacturer; -import net.minecraft.util.EnumChatFormatting; - -public class GunPoweredFactory { - - public static GunConfiguration getGlassCannonConfig() { - - GunConfiguration config = new GunConfiguration(); - - config.roundsPerCycle = 1; - config.gunMode = GunConfiguration.MODE_NORMAL; - config.firingMode = GunConfiguration.FIRE_AUTO; - config.firingDuration = 0; - config.durability = 2500; - config.allowsInfinity = false; - config.crosshair = Crosshair.BOX; - config.firingSound = "hbm:weapon.zomgShoot"; - config.maxCharge = 1_000_000; - config.chargeRate = 2500; - - config.name = "LIY2001 Anti-Material Electromagnetic Rifle Prototype"; - config.manufacturer = EnumGunManufacturer.OXFORD; - - config.config = new ArrayList(); - config.config.add(BulletConfigSyncingUtil.GLASS_EMRADIO); - config.config.add(BulletConfigSyncingUtil.GLASS_EMMICRO); - config.config.add(BulletConfigSyncingUtil.GLASS_EMIR); - config.config.add(BulletConfigSyncingUtil.GLASS_EMVISIBLE); - config.config.add(BulletConfigSyncingUtil.GLASS_EMUV); - config.config.add(BulletConfigSyncingUtil.GLASS_EMXRAY); - config.config.add(BulletConfigSyncingUtil.GLASS_EMGAMMA); - - return config; - } - - public static BulletConfiguration getEMRadioConfig() { - - BulletConfiguration bullet = new BulletConfiguration(); - - bullet.velocity = 4.0F; - bullet.spread = 0F; - bullet.dmgMin = 35; - bullet.dmgMax = 45; - bullet.bulletsMin = 1; - bullet.bulletsMax = 1; - bullet.gravity = 0D; - bullet.maxAge = 100; - bullet.doesRicochet = true; - bullet.ricochetAngle = 90; - bullet.HBRC = 2; - bullet.LBRC = 90; - bullet.bounceMod = 1; - bullet.doesPenetrate = true; - bullet.style = BulletConfiguration.STYLE_BOLT; - bullet.trail = BulletConfiguration.BOLT_LASER; - bullet.plink = BulletConfiguration.PLINK_ENERGY; - bullet.dischargePerShot = 25_000; - bullet.firingRate = 20; - bullet.modeName = "weapon.elecGun.glass_cannon.radio"; - bullet.chatColour = EnumChatFormatting.DARK_RED; - bullet.setToFire(200); - - return bullet; - } - - public static BulletConfiguration getEMMicroConfig() { - - BulletConfiguration bullet = new BulletConfiguration(); - - bullet.velocity = 3.0F; - bullet.spread = 0F; - bullet.dmgMin = 18; - bullet.dmgMax = 22; - bullet.bulletsMin = 1; - bullet.bulletsMax = 1; - bullet.gravity = 0D; - bullet.maxAge = 100; - bullet.doesRicochet = true; - bullet.ricochetAngle = 90; - bullet.HBRC = 2; - bullet.LBRC = 90; - bullet.bounceMod = 1; - bullet.doesPenetrate = true; - bullet.style = BulletConfiguration.STYLE_BOLT; - bullet.trail = BulletConfiguration.BOLT_LASER; - bullet.dischargePerShot = 12_500; - bullet.firingRate = 15; - bullet.modeName = "weapon.elecGun.glass_cannon.micro"; - bullet.chatColour = EnumChatFormatting.RED; - bullet.setToFire(200); - - return bullet; - } - - public static BulletConfiguration getEMInfraredConfig() { - - BulletConfiguration bullet = new BulletConfiguration(); - - bullet.velocity = 2.0F; - bullet.spread = 0F; - bullet.dmgMin = 9; - bullet.dmgMax = 11; - bullet.bulletsMin = 1; - bullet.bulletsMax = 1; - bullet.gravity = 0D; - bullet.maxAge = 100; - bullet.doesRicochet = true; - bullet.ricochetAngle = 90; - bullet.HBRC = 2; - bullet.LBRC = 90; - bullet.bounceMod = 1; - bullet.doesPenetrate = true; - bullet.style = BulletConfiguration.STYLE_BOLT; - bullet.trail = BulletConfiguration.BOLT_LASER; - bullet.dischargePerShot = 6_000; - bullet.firingRate = 10; - bullet.modeName = "weapon.elecGun.glass_cannon.ir"; - bullet.chatColour = EnumChatFormatting.RED; - bullet.setToFire(100); - - return bullet; - } - - public static BulletConfiguration getEMVisibleConfig() { - - BulletConfiguration bullet = new BulletConfiguration(); - - bullet.velocity = 2.0F; - bullet.spread = 0F; - bullet.dmgMin = 4; - bullet.dmgMax = 6; - bullet.bulletsMin = 1; - bullet.bulletsMax = 1; - bullet.gravity = 0D; - bullet.maxAge = 100; - bullet.doesRicochet = true; - bullet.ricochetAngle = 90; - bullet.HBRC = 2; - bullet.LBRC = 90; - bullet.bounceMod = 1; - bullet.doesPenetrate = true; - bullet.style = BulletConfiguration.STYLE_BOLT; - bullet.trail = BulletConfiguration.BOLT_WORM; - bullet.dischargePerShot = 2_500; - bullet.firingRate = 5; - bullet.modeName = "weapon.elecGun.glass_cannon.visible"; - bullet.chatColour = EnumChatFormatting.GREEN; - bullet.setToFire(100); - - return bullet; - } - - public static BulletConfiguration getEMUVConfig() { - - BulletConfiguration bullet = new BulletConfiguration(); - - bullet.velocity = 2.0F; - bullet.spread = 0F; - bullet.dmgMin = 3; - bullet.dmgMax = 3; - bullet.bulletsMin = 1; - bullet.bulletsMax = 1; - bullet.gravity = 0D; - bullet.maxAge = 100; - bullet.doesRicochet = true; - bullet.ricochetAngle = 90; - bullet.HBRC = 2; - bullet.LBRC = 90; - bullet.bounceMod = 1; - bullet.doesPenetrate = true; - bullet.style = BulletConfiguration.STYLE_BOLT; - bullet.trail = BulletConfiguration.BOLT_GLASS_CYAN; - bullet.dischargePerShot = 1_200; - bullet.firingRate = 3; - bullet.modeName = "weapon.elecGun.glass_cannon.uv"; - bullet.chatColour = EnumChatFormatting.AQUA; - bullet.setToFire(100); - - return bullet; - } - - public static BulletConfiguration getEMXrayConfig() { - - BulletConfiguration bullet = new BulletConfiguration(); - - bullet.velocity = 2.0F; - bullet.spread = 0F; - bullet.dmgMin = 2; - bullet.dmgMax = 2; - bullet.bulletsMin = 1; - bullet.bulletsMax = 1; - bullet.gravity = 0D; - bullet.maxAge = 100; - bullet.doesRicochet = true; - bullet.ricochetAngle = 90; - bullet.HBRC = 2; - bullet.LBRC = 90; - bullet.bounceMod = 1; - bullet.doesPenetrate = true; - bullet.style = BulletConfiguration.STYLE_BOLT; - bullet.trail = BulletConfiguration.BOLT_GLASS_BLUE; - bullet.dischargePerShot = 800; - bullet.firingRate = 2; - bullet.modeName = "weapon.elecGun.glass_cannon.xray"; - bullet.chatColour = EnumChatFormatting.BLUE; - bullet.setToFire(40); - - return bullet; - } - - public static BulletConfiguration getEMGammaConfig() { - - BulletConfiguration bullet = new BulletConfiguration(); - - bullet.velocity = 2.0F; - bullet.spread = 0F; - bullet.dmgMin = 1; - bullet.dmgMax = 1; - bullet.bulletsMin = 1; - bullet.bulletsMax = 1; - bullet.gravity = 0D; - bullet.maxAge = 100; - bullet.doesRicochet = true; - bullet.ricochetAngle = 90; - bullet.HBRC = 2; - bullet.LBRC = 90; - bullet.bounceMod = 1; - bullet.doesPenetrate = true; - bullet.style = BulletConfiguration.STYLE_BOLT; - bullet.trail = BulletConfiguration.BOLT_LACUNAE; - bullet.dischargePerShot = 400; - bullet.firingRate = 1; - bullet.modeName = "weapon.elecGun.glass_cannon.gamma"; - bullet.chatColour = EnumChatFormatting.LIGHT_PURPLE; - bullet.setToFire(40); - - return bullet; - } - -} diff --git a/src/main/java/com/hbm/handler/guncfg/GunRocketFactory.java b/src/main/java/com/hbm/handler/guncfg/GunRocketFactory.java index 08a7bdc35e..214aca5596 100644 --- a/src/main/java/com/hbm/handler/guncfg/GunRocketFactory.java +++ b/src/main/java/com/hbm/handler/guncfg/GunRocketFactory.java @@ -1,178 +1,16 @@ package com.hbm.handler.guncfg; -import java.util.ArrayList; - -import com.hbm.entity.effect.EntitySpear; -import com.hbm.entity.projectile.EntityBulletBaseNT; -import com.hbm.explosion.ExplosionNukeSmall; -import com.hbm.handler.BulletConfigSyncingUtil; import com.hbm.handler.BulletConfiguration; -import com.hbm.handler.GunConfiguration; import com.hbm.inventory.RecipesCommon.ComparableStack; import com.hbm.items.ModItems; -import com.hbm.items.weapon.sedna.Crosshair; -import com.hbm.items.ItemAmmoEnums.AmmoRocket; -import com.hbm.lib.HbmCollection.EnumGunManufacturer; -import com.hbm.render.anim.BusAnimation; -import com.hbm.render.anim.BusAnimationSequence; -import com.hbm.render.anim.HbmAnimations.AnimType; -import net.minecraft.block.material.Material; -import net.minecraft.world.World; public class GunRocketFactory { - public static GunConfiguration getGustavConfig() { - - GunConfiguration config = new GunConfiguration(); - - config.rateOfFire = 30; - config.roundsPerCycle = 1; - config.gunMode = GunConfiguration.MODE_NORMAL; - config.firingMode = GunConfiguration.FIRE_MANUAL; - config.reloadDuration = 30; - config.firingDuration = 0; - config.ammoCap = 1; - config.reloadType = GunConfiguration.RELOAD_SINGLE; - config.allowsInfinity = true; - config.crosshair = Crosshair.L_CIRCUMFLEX; - config.firingSound = "hbm:weapon.rpgShoot"; - config.reloadSound = GunConfiguration.RSOUND_LAUNCHER; - config.reloadSoundEnd = false; - - config.name = "gustav"; - config.manufacturer = EnumGunManufacturer.SAAB; - config.comment.add("Fun fact of the day: Recoilless"); - config.comment.add("rifles don't actually fire rockets."); - - config.config = new ArrayList(); - config.config.add(BulletConfigSyncingUtil.ROCKET_NORMAL); - config.config.add(BulletConfigSyncingUtil.ROCKET_HE); - config.config.add(BulletConfigSyncingUtil.ROCKET_INCENDIARY); - config.config.add(BulletConfigSyncingUtil.ROCKET_PHOSPHORUS); - config.config.add(BulletConfigSyncingUtil.ROCKET_SHRAPNEL); - config.config.add(BulletConfigSyncingUtil.ROCKET_EMP); - config.config.add(BulletConfigSyncingUtil.ROCKET_GLARE); - config.config.add(BulletConfigSyncingUtil.ROCKET_TOXIC); - config.config.add(BulletConfigSyncingUtil.ROCKET_CANISTER); - config.config.add(BulletConfigSyncingUtil.ROCKET_SLEEK); - config.config.add(BulletConfigSyncingUtil.ROCKET_NUKE); - config.config.add(BulletConfigSyncingUtil.ROCKET_CHAINSAW); - config.durability = 140; - - return config; - } - - public static GunConfiguration getQuadroConfig() { - - GunConfiguration config = new GunConfiguration(); - - config.rateOfFire = 5; - config.roundsPerCycle = 1; - config.gunMode = GunConfiguration.MODE_NORMAL; - config.firingMode = GunConfiguration.FIRE_MANUAL; - config.reloadDuration = 100; - config.firingDuration = 0; - config.ammoCap = 4; - config.reloadType = GunConfiguration.RELOAD_FULL; - config.allowsInfinity = true; - config.crosshair = Crosshair.L_CIRCUMFLEX; - config.firingSound = "hbm:weapon.rpgShoot"; - config.reloadSound = "hbm:weapon.quadroReload"; - config.reloadSoundEnd = false; - - config.animations.put(AnimType.CYCLE, new BusAnimation() - .addBus("QUADRO_RECOIL", new BusAnimationSequence() - .addPos(0, 0, -0.5, 50) - .addPos(0, 0, 0, 50) - ) - ); - - config.animations.put(AnimType.RELOAD, new BusAnimation() - .addBus("QUADRO_RELOAD_ROTATE", new BusAnimationSequence() - .addPos(0, 0, 60, 750) - .addPos(0, 0, 60, 3500) - .addPos(0, 0, 0, 750) - ) - .addBus("QUADRO_RELOAD_PUSH", new BusAnimationSequence() - .addPos(-1, -1, 0, 0) - .addPos(-1, -1, 0, 750) - .addPos(-1, 0, 0, 500) - .addPos(0, 0, 0, 3000) - .addPos(0, 0, 0, 750) - ) - ); - - config.name = "quadro"; - config.manufacturer = EnumGunManufacturer.MANN; - config.comment.add("For the next three hundred years, people who needed to get to the second"); - config.comment.add("floor used the only method available to them, which was rocket jumping."); - config.comment.add("This persisted until 1857, when the young bearded inventor named"); - config.comment.add("President Abraham Lincoln invented stairs."); - - config.config = new ArrayList(); - config.config.add(BulletConfigSyncingUtil.ROCKET_NORMAL_LASER); - config.config.add(BulletConfigSyncingUtil.ROCKET_HE_LASER); - config.config.add(BulletConfigSyncingUtil.ROCKET_INCENDIARY_LASER); - config.config.add(BulletConfigSyncingUtil.ROCKET_PHOSPHORUS_LASER); - config.config.add(BulletConfigSyncingUtil.ROCKET_SHRAPNEL_LASER); - config.config.add(BulletConfigSyncingUtil.ROCKET_EMP_LASER); - config.config.add(BulletConfigSyncingUtil.ROCKET_GLARE_LASER); - config.config.add(BulletConfigSyncingUtil.ROCKET_TOXIC_LASER); - config.config.add(BulletConfigSyncingUtil.ROCKET_CANISTER); - config.config.add(BulletConfigSyncingUtil.ROCKET_SLEEK_LASER); - config.config.add(BulletConfigSyncingUtil.ROCKET_NUKE_LASER); - config.config.add(BulletConfigSyncingUtil.ROCKET_CHAINSAW_LASER); - config.durability = 500; - - return config; - } - - public static GunConfiguration getKarlConfig() { - - GunConfiguration config = getGustavConfig(); - - config.reloadDuration = 20; - - config.name = "karl"; - config.manufacturer = EnumGunManufacturer.UNKNOWN; - config.comment.clear(); - - config.config = new ArrayList(); - config.config.add(BulletConfigSyncingUtil.ROCKET_HE); - config.config.add(BulletConfigSyncingUtil.ROCKET_EMP); - config.config.add(BulletConfigSyncingUtil.ROCKET_SLEEK); - config.config.add(BulletConfigSyncingUtil.ROCKET_TOXIC); - config.config.add(BulletConfigSyncingUtil.ROCKET_CANISTER); - config.config.add(BulletConfigSyncingUtil.ROCKET_NUKE); - config.config.add(BulletConfigSyncingUtil.ROCKET_CHAINSAW); - config.config.add(BulletConfigSyncingUtil.ROCKET_ERROR); - config.durability = 500; - - return config; - } - - public static GunConfiguration getPanzConfig() { - - GunConfiguration config = getGustavConfig(); - - config.reloadDuration = 25; - config.hasSights = true; - - config.name = "panz"; - config.manufacturer = EnumGunManufacturer.ENZINGER; - config.comment.clear(); - config.comment.add("Panzer-Shrek"); - - config.durability = 260; - - return config; - } - public static BulletConfiguration getRocketConfig() { BulletConfiguration bullet = BulletConfigFactory.standardRocketConfig(); - bullet.ammo = new ComparableStack(ModItems.ammo_rocket.stackFromEnum(AmmoRocket.STOCK)); + bullet.ammo = new ComparableStack(ModItems.nothing); bullet.dmgMin = 10; bullet.dmgMax = 15; bullet.explosive = 4F; @@ -180,232 +18,4 @@ public static BulletConfiguration getRocketConfig() { return bullet; } - - public static BulletConfiguration getRocketHEConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardRocketConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_rocket.stackFromEnum(AmmoRocket.HE)); - bullet.dmgMin = 10; - bullet.dmgMax = 15; - bullet.wear = 15; - bullet.explosive = 6.5F; - bullet.trail = 1; - - return bullet; - } - - public static BulletConfiguration getRocketIncendiaryConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardRocketConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_rocket.stackFromEnum(AmmoRocket.INCENDIARY)); - bullet.dmgMin = 10; - bullet.dmgMax = 15; - bullet.wear = 15; - bullet.explosive = 4F; - bullet.incendiary = 5; - bullet.trail = 2; - - return bullet; - } - - public static BulletConfiguration getRocketEMPConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardRocketConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_rocket.stackFromEnum(AmmoRocket.EMP)); - bullet.dmgMin = 10; - bullet.dmgMax = 15; - bullet.explosive = 2.5F; - bullet.emp = 10; - bullet.trail = 4; - - return bullet; - } - - public static BulletConfiguration getRocketSleekConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardRocketConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_rocket.stackFromEnum(AmmoRocket.SLEEK)); - bullet.dmgMin = 10; - bullet.dmgMax = 15; - bullet.explosive = 10F; - bullet.trail = 6; - bullet.gravity = 0; - bullet.jolt = 6.5D; - - return bullet; - } - - public static BulletConfiguration getRocketShrapnelConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardRocketConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_rocket.stackFromEnum(AmmoRocket.SHRAPNEL)); - bullet.dmgMin = 10; - bullet.dmgMax = 15; - bullet.explosive = 4F; - bullet.shrapnel = 25; - bullet.trail = 3; - - return bullet; - } - - public static BulletConfiguration getRocketGlareConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardRocketConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_rocket.stackFromEnum(AmmoRocket.GLARE)); - bullet.velocity = 5.0F; - bullet.dmgMin = 10; - bullet.dmgMax = 15; - bullet.wear = 20; - bullet.explosive = 4F; - bullet.incendiary = 5; - bullet.trail = 5; - - return bullet; - } - - public static BulletConfiguration getRocketNukeConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardRocketConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_rocket.stackFromEnum(AmmoRocket.NUCLEAR)); - bullet.velocity = 1.5F; - bullet.dmgMin = 10; - bullet.dmgMax = 15; - bullet.wear = 35; - bullet.explosive = 0; - bullet.incendiary = 0; - bullet.trail = 7; - - bullet.bntImpact = (bulletnt, x, y, z, sideHit) -> { - BulletConfigFactory.nuclearExplosion(bulletnt, x, y, z, ExplosionNukeSmall.PARAMS_MEDIUM); - }; - - return bullet; - } - - public static BulletConfiguration getRocketChlorineConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardRocketConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_rocket.stackFromEnum(AmmoRocket.CHLORINE)); - bullet.velocity = 1.5F; - bullet.dmgMin = 10; - bullet.dmgMax = 15; - bullet.wear = 10; - bullet.explosive = 0; - bullet.chlorine = 50; - bullet.trail = 7; - - return bullet; - } - - public static BulletConfiguration getRocketRPCConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardRocketConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_rocket.stackFromEnum(AmmoRocket.RPC)); - bullet.velocity = 3.0F; - bullet.dmgMin = 20; - bullet.dmgMax = 25; - bullet.wear = 15; - bullet.explosive = 0; - bullet.incendiary = 0; - bullet.trail = 8; - bullet.gravity = 0.000D; - bullet.ricochetAngle = 90; - bullet.LBRC = 100; - bullet.doesPenetrate = true; - - bullet.bntRicochet = (bulletnt, bX, bY, bZ) -> { - World worldObj = bulletnt.worldObj; - if(!worldObj.isRemote && (worldObj.getBlock(bX, bY, bZ).getMaterial() == Material.wood || - worldObj.getBlock(bX, bY, bZ).getMaterial() == Material.plants || - worldObj.getBlock(bX, bY, bZ).getMaterial() == Material.glass || - worldObj.getBlock(bX, bY, bZ).getMaterial() == Material.leaves)) - worldObj.func_147480_a(bX, bY, bZ, false); - - }; - - return bullet; - } - - public static BulletConfiguration getRocketPhosphorusConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardRocketConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_rocket.stackFromEnum(AmmoRocket.PHOSPHORUS)); - bullet.dmgMin = 10; - bullet.dmgMax = 15; - bullet.wear = 15; - bullet.explosive = 4F; - bullet.incendiary = 5; - bullet.trail = 9; - - bullet.bntImpact = BulletConfigFactory.getPhosphorousEffect(10, 60 * 20, 100, 0.5D, 1F); - - return bullet; - } - - public static BulletConfiguration getRocketCanisterConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardRocketConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_rocket.stackFromEnum(AmmoRocket.CANISTER)); - bullet.dmgMin = 10; - bullet.dmgMax = 15; - bullet.explosive = 2F; - bullet.trail = 0; - - bullet.bntUpdate = (bulletnt) -> { - if(!bulletnt.worldObj.isRemote) { - if(bulletnt.ticksExisted > 10) { - bulletnt.setDead(); - for(int i = 0; i < 50; i++) { - EntityBulletBaseNT bolt = new EntityBulletBaseNT(bulletnt.worldObj, BulletConfigSyncingUtil.M44_AP); - bolt.setPosition(bulletnt.posX, bulletnt.posY, bulletnt.posZ); - bolt.setThrowableHeading(bulletnt.motionX, bulletnt.motionY, bulletnt.motionZ, 0.25F, 0.1F); - bolt.setThrower(bulletnt.getThrower()); - bulletnt.worldObj.spawnEntityInWorld(bolt); - } - } - } - }; - - return bullet; - } - - public static BulletConfiguration getRocketErrorConfig() { - - BulletConfiguration bullet = BulletConfigFactory.standardRocketConfig(); - - bullet.ammo = new ComparableStack(ModItems.ammo_rocket.stackFromEnum(AmmoRocket.DIGAMMA)); - bullet.velocity = 0.5F; - bullet.dmgMin = 10; - bullet.dmgMax = 15; - bullet.wear = 35; - bullet.explosive = 0; - bullet.incendiary = 0; - bullet.trail = 7; - - bullet.bntImpact = (bulletnt, x, y, z, sideHit) -> { - - if(bulletnt.worldObj.isRemote) - return; - - EntitySpear spear = new EntitySpear(bulletnt.worldObj); - spear.posX = bulletnt.posX; - spear.posZ = bulletnt.posZ; - spear.posY = bulletnt.posY + 100; - - bulletnt.worldObj.spawnEntityInWorld(spear); - }; - - return bullet; - } } diff --git a/src/main/java/com/hbm/inventory/material/Mats.java b/src/main/java/com/hbm/inventory/material/Mats.java index dea1696ba7..abe51a7613 100644 --- a/src/main/java/com/hbm/inventory/material/Mats.java +++ b/src/main/java/com/hbm/inventory/material/Mats.java @@ -207,8 +207,9 @@ public static List getMaterialsFromItem(ItemStack stack) { if(name.startsWith(prefix)) { String materialName = name.substring(prefix.length()); NTMMaterial material = matByName.get(materialName); + NTMMaterial convert = material.smeltsInto; //hack - if(material != null && (material.smeltable == SmeltingBehavior.SMELTABLE || material.smeltable == SmeltingBehavior.ADDITIVE)) { + if(material != null && (convert.smeltable == SmeltingBehavior.SMELTABLE || convert.smeltable == SmeltingBehavior.ADDITIVE)) { list.add(new MaterialStack(material, prefixEntry.getValue().q(1))); break outer; } diff --git a/src/main/java/com/hbm/inventory/recipes/AssemblerRecipes.java b/src/main/java/com/hbm/inventory/recipes/AssemblerRecipes.java index 13f1b5727d..daa0599e4f 100644 --- a/src/main/java/com/hbm/inventory/recipes/AssemblerRecipes.java +++ b/src/main/java/com/hbm/inventory/recipes/AssemblerRecipes.java @@ -27,7 +27,6 @@ import com.hbm.inventory.material.Mats; import com.hbm.inventory.material.NTMMaterial; import com.hbm.inventory.recipes.loader.SerializableRecipe; -import com.hbm.items.ItemAmmoEnums; import com.hbm.items.ModItems; import com.hbm.items.ItemGenericPart.EnumPartType; import com.hbm.items.machine.ItemAssemblyTemplate; @@ -583,29 +582,6 @@ public void registerDefaults() { new ComparableStack(ModItems.circuit, 4, EnumCircuitType.BASIC) }, 600); - makeRecipe(new ComparableStack(ModItems.ammo_75bolt, 2, ItemAmmoEnums.Ammo75Bolt.STOCK.ordinal()), new AStack[] { - new OreDictStack(STEEL.plate(), 4), - new OreDictStack(ANY_PLASTICEXPLOSIVE.ingot(), 2), - new OreDictStack(ANY_HARDPLASTIC.ingot(), 2), - new ComparableStack(ModItems.cordite, 3), - new OreDictStack(U238.ingot(), 1) - }, 60); - - makeRecipe(new ComparableStack(ModItems.ammo_75bolt, 2, ItemAmmoEnums.Ammo75Bolt.INCENDIARY.ordinal()), new AStack[] { - new OreDictStack(STEEL.plate(), 4), - new OreDictStack(ANY_PLASTICEXPLOSIVE.ingot(), 2), - new OreDictStack(ANY_HARDPLASTIC.ingot(), 2), - new ComparableStack(ModItems.cordite, 3), - new OreDictStack(P_WHITE.ingot(), 3) - }, 60); - - makeRecipe(new ComparableStack(ModItems.ammo_75bolt, 2, ItemAmmoEnums.Ammo75Bolt.HE.ordinal()), new AStack[] { - new OreDictStack(STEEL.plate(), 4), - new OreDictStack(ANY_PLASTICEXPLOSIVE.ingot(), 2), - new OreDictStack(ANY_HARDPLASTIC.ingot(), 5), - new ComparableStack(ModItems.cordite, 5) - }, 60); - makeRecipe(new ComparableStack(ModItems.spawn_worm, 1), new AStack[] { new OreDictStack(TI.block(), 75), new ComparableStack(ModItems.motor, 75), diff --git a/src/main/java/com/hbm/itempool/ItemPoolsPile.java b/src/main/java/com/hbm/itempool/ItemPoolsPile.java index b75f609ee6..ad2a7f3ae9 100644 --- a/src/main/java/com/hbm/itempool/ItemPoolsPile.java +++ b/src/main/java/com/hbm/itempool/ItemPoolsPile.java @@ -45,7 +45,7 @@ public static void init() { weighted(ModItems.grenade_if_generic, 0, 1, 2, 5), weighted(ModItems.ammo_standard, EnumAmmo.G12.ordinal(), 4, 4, 10), weighted(ModItems.ammo_standard, EnumAmmo.M357_SP.ordinal(), 6, 12, 10), - weighted(ModItems.ammo_grenade, 0, 1, 1, 2), + weighted(ModItems.ammo_standard, EnumAmmo.G40_HE.ordinal(), 1, 1, 2), //Consumables weighted(ModItems.bottle_nuka, 0, 1, 2, 20), weighted(ModItems.bottle_quantum, 0, 1, 2, 1), diff --git a/src/main/java/com/hbm/items/ItemAmmoEnums.java b/src/main/java/com/hbm/items/ItemAmmoEnums.java index 54ad9f1c69..03b5219e89 100644 --- a/src/main/java/com/hbm/items/ItemAmmoEnums.java +++ b/src/main/java/com/hbm/items/ItemAmmoEnums.java @@ -4,34 +4,9 @@ import com.google.common.collect.ImmutableSet; import com.hbm.items.weapon.ItemAmmo.AmmoItemTrait; -import com.hbm.lib.HbmCollection; public class ItemAmmoEnums { - public enum AmmoLunaticSniper implements IAmmoItemEnum { - SABOT("ammo_luna"), - INCENDIARY("ammo_luna_incendiary"), - EXPLOSIVE("ammo_luna_explosive"); - - private final Set traits; - private final String unloc; - - private AmmoLunaticSniper(String unloc, AmmoItemTrait... traits) { - this.traits = safeAssign(traits); - this.unloc = unloc; - } - - @Override - public Set getTraits() { - return traits; - } - - @Override - public String getInternalName() { - return unloc; - } - } - public enum AmmoFireExt implements IAmmoItemEnum { WATER("ammo_fireext"), FOAM("ammo_fireext_foam"), @@ -55,33 +30,7 @@ public String getInternalName() { return unloc; } } - - public enum AmmoFlamethrower implements IAmmoItemEnum { - DIESEL("ammo_fuel"), - NAPALM("ammo_fuel_napalm", AmmoItemTrait.PRO_DAMAGE, AmmoItemTrait.PRO_RANGE, AmmoItemTrait.CON_HEAVY_WEAR), - PHOSPHORUS("ammo_fuel_phosphorus", AmmoItemTrait.PRO_PHOSPHORUS_SPLASH, AmmoItemTrait.PRO_DAMAGE, AmmoItemTrait.PRO_RANGE, AmmoItemTrait.PRO_RANGE, AmmoItemTrait.PRO_ACCURATE1, AmmoItemTrait.NEU_WARCRIME1, AmmoItemTrait.CON_SING_PROJECTILE, AmmoItemTrait.CON_HEAVY_WEAR), - VAPORIZER("ammo_fuel_vaporizer", AmmoItemTrait.PRO_PHOSPHORUS, AmmoItemTrait.PRO_FLAMES, AmmoItemTrait.PRO_DAMAGE, AmmoItemTrait.NEU_ERASER, AmmoItemTrait.CON_ACCURACY2, AmmoItemTrait.CON_RANGE2, AmmoItemTrait.CON_HEAVY_WEAR, AmmoItemTrait.CON_LING_FIRE), - CHLORINE("ammo_fuel_gas", AmmoItemTrait.PRO_NO_GRAVITY, AmmoItemTrait.PRO_POISON_GAS, AmmoItemTrait.CON_NO_DAMAGE, AmmoItemTrait.CON_NO_FIRE); - - private final Set traits; - private final String unloc; - - private AmmoFlamethrower(String unloc, AmmoItemTrait... traits) { - this.traits = safeAssign(traits); - this.unloc = unloc; - } - - @Override - public Set getTraits() { - return traits; - } - - @Override - public String getInternalName() { - return unloc; - } - } - + public enum AmmoMisc implements IAmmoItemEnum { //LUNA_SNIPER("ammo_lunar", Gun50BMGFactory.getLunaticSabotRound(), AmmoItemTrait.PRO_HEAVY_DAMAGE, AmmoItemTrait.PRO_ACCURATE2, AmmoItemTrait.NEU_HEAVY_METAL), DGK("ammo_dkg"); @@ -105,167 +54,6 @@ public String getInternalName() { } } - public enum AmmoStinger implements IAmmoItemEnum { - STOCK("ammo_stinger_rocket"), - HE("ammo_stinger_rocket_he", AmmoItemTrait.PRO_RADIUS, AmmoItemTrait.CON_WEAR), - INCENDIARY("ammo_stinger_rocket_incendiary", HbmCollection.IncendiaryType), - NUCLEAR("ammo_stinger_rocket_nuclear", AmmoItemTrait.PRO_NUCLEAR, AmmoItemTrait.CON_SUPER_WEAR), - BONES("ammo_stinger_rocket_bones"); - - private final Set traits; - private final String unloc; - - private AmmoStinger(String unloc, AmmoItemTrait... traits) { - this.traits = safeAssign(traits); - this.unloc = unloc; - } - - private AmmoStinger(String unloc, Set traits) { - this.traits = traits; - this.unloc = unloc; - } - - @Override - public Set getTraits() { - return traits; - } - - @Override - public String getInternalName() { - return unloc; - } - } - - public enum AmmoRocket implements IAmmoItemEnum { - STOCK("ammo_rocket"), - HE("ammo_rocket_he", AmmoItemTrait.PRO_RADIUS, AmmoItemTrait.CON_WEAR), - INCENDIARY("ammo_rocket_incendiary", HbmCollection.IncendiaryType), - EMP("ammo_rocket_emp", AmmoItemTrait.PRO_EMP, AmmoItemTrait.CON_RADIUS), - SLEEK("ammo_rocket_sleek", AmmoItemTrait.PRO_RADIUS_HIGH, AmmoItemTrait.PRO_NO_GRAVITY, AmmoItemTrait.CON_SPEED), - SHRAPNEL("ammo_rocket_shrapnel", AmmoItemTrait.PRO_SHRAPNEL), - GLARE("ammo_rocket_glare", AmmoItemTrait.PRO_SPEED, AmmoItemTrait.PRO_INCENDIARY, AmmoItemTrait.CON_WEAR), - NUCLEAR("ammo_rocket_nuclear", AmmoItemTrait.PRO_NUCLEAR, AmmoItemTrait.CON_SUPER_WEAR, AmmoItemTrait.CON_SPEED), - CHLORINE("ammo_rocket_toxic", AmmoItemTrait.PRO_CHLORINE, AmmoItemTrait.CON_NO_EXPLODE1, AmmoItemTrait.CON_SPEED), - RPC("ammo_rocket_rpc", AmmoItemTrait.PRO_CHAINSAW, AmmoItemTrait.PRO_PENETRATION, AmmoItemTrait.PRO_NO_GRAVITY, AmmoItemTrait.CON_WEAR, AmmoItemTrait.CON_NO_EXPLODE1, AmmoItemTrait.NEU_UHH ), - PHOSPHORUS("ammo_rocket_phosphorus", HbmCollection.PhosphorusTypeSpecial), - CANISTER("ammo_rocket_canister"), - DIGAMMA("ammo_rocket_digamma"); - - private final Set traits; - private final String unloc; - - private AmmoRocket(String unloc, AmmoItemTrait... traits) { - this.traits = safeAssign(traits); - this.unloc = unloc; - } - - private AmmoRocket(String unloc, Set traits) { - this.traits = traits; - this.unloc = unloc; - } - - @Override - public Set getTraits() { - return traits; - } - - @Override - public String getInternalName() { - return unloc; - } - } - - public enum AmmoGrenade implements IAmmoItemEnum { - STOCK("ammo_grenade"), - HE("ammo_grenade_he", AmmoItemTrait.PRO_RADIUS, AmmoItemTrait.CON_WEAR), - INCENDIARY("ammo_grenade_incendiary", AmmoItemTrait.PRO_INCENDIARY, AmmoItemTrait.CON_WEAR), - PHOSPHORUS("ammo_grenade_phosphorus", AmmoItemTrait.PRO_PHOSPHORUS_SPLASH, AmmoItemTrait.NEU_WARCRIME1, AmmoItemTrait.CON_WEAR), - CHLORINE("ammo_grenade_toxic", AmmoItemTrait.PRO_CHLORINE, AmmoItemTrait.CON_NO_EXPLODE1), - SLEEK("ammo_grenade_sleek", AmmoItemTrait.PRO_RADIUS, AmmoItemTrait.NEU_JOLT), - CONCUSSION("ammo_grenade_concussion", AmmoItemTrait.PRO_RADIUS, AmmoItemTrait.CON_NO_EXPLODE2), - FINNED("ammo_grenade_finned", AmmoItemTrait.PRO_GRAVITY, AmmoItemTrait.CON_RADIUS), - NUCLEAR("ammo_grenade_nuclear", AmmoItemTrait.PRO_NUCLEAR, AmmoItemTrait.PRO_RANGE, AmmoItemTrait.CON_HEAVY_WEAR), - TRACER("ammo_grenade_tracer", AmmoItemTrait.NEU_BLANK), - KAMPF("ammo_grenade_kampf", AmmoItemTrait.PRO_ROCKET_PROPELLED, AmmoItemTrait.PRO_RADIUS, AmmoItemTrait.PRO_ACCURATE1, AmmoItemTrait.CON_WEAR), - LEADBURSTER("ammo_grenade_leadburster", AmmoItemTrait.NEU_LEADBURSTER, AmmoItemTrait.CON_NO_EXPLODE1); - - private final Set traits; - private final String unloc; - - private AmmoGrenade(String unloc, AmmoItemTrait... traits) { - this.traits = safeAssign(traits); - this.unloc = unloc; - } - - @Override - public Set getTraits() { - return traits; - } - - @Override - public String getInternalName() { - return unloc; - } - } - - public enum AmmoFatman implements IAmmoItemEnum { - STOCK("ammo_nuke"), - LOW("ammo_nuke_low", AmmoItemTrait.CON_RADIUS), - HIGH("ammo_nuke_high", AmmoItemTrait.PRO_RADIUS, AmmoItemTrait.PRO_FALLOUT), - TOTS("ammo_nuke_tots", AmmoItemTrait.PRO_BOMB_COUNT, AmmoItemTrait.NEU_FUN, AmmoItemTrait.CON_ACCURACY2, AmmoItemTrait.CON_RADIUS, AmmoItemTrait.CON_NO_MIRV), - SAFE("ammo_nuke_safe", AmmoItemTrait.CON_RADIUS, AmmoItemTrait.CON_NO_EXPLODE2), - PUMPKIN("ammo_nuke_pumpkin", AmmoItemTrait.CON_NN), - MIRV("ammo_mirv"), - MIRV_LOW("ammo_mirv_low", AmmoItemTrait.CON_RADIUS), - MIRV_HIGH("ammo_mirv_high", AmmoItemTrait.PRO_RADIUS, AmmoItemTrait.PRO_FALLOUT), - MIRV_SAFE("ammo_mirv_safe", AmmoItemTrait.CON_RADIUS, AmmoItemTrait.CON_NO_EXPLODE2), - MIRV_SPECIAL("ammo_mirv_special"), - BALEFIRE("gun_bf_ammo"), - BARREL("ammo_nuke_barrel"); - - private final Set traits; - private final String unloc; - - private AmmoFatman(String unloc, AmmoItemTrait... traits) { - this.traits = safeAssign(traits); - this.unloc = unloc; - } - - @Override - public Set getTraits() { - return traits; - } - - @Override - public String getInternalName() { - return unloc; - } - } - - public enum AmmoDart implements IAmmoItemEnum { - GPS("ammo_dart"), - NUCLEAR("ammo_dart_nuclear"), - NERF("ammo_dart_nerf"); - - private final Set traits; - private final String unloc; - - private AmmoDart(String unloc, AmmoItemTrait... traits) { - this.traits = safeAssign(traits); - this.unloc = unloc; - } - - @Override - public Set getTraits() { - return traits; - } - - @Override - public String getInternalName() { - return unloc; - } - } - public enum Ammo240Shell implements IAmmoItemEnum { STOCK("ammo_shell"), EXPLOSIVE("ammo_shell_explosive"), @@ -292,480 +80,6 @@ public String getInternalName() { } } - public enum Ammo9mm implements IAmmoItemEnum { - STOCK("ammo_9mm"), - AP("ammo_9mm_ap", HbmCollection.APType), - DU("ammo_9mm_du", HbmCollection.DUType), - CHLOROPHYTE("ammo_9mm_chlorophyte", HbmCollection.ChlorophyteType), - ROCKET("ammo_9mm_rocket", AmmoItemTrait.PRO_ROCKET, AmmoItemTrait.NEU_UHH); - - private final Set traits; - private final String unloc; - - private Ammo9mm(String unloc, AmmoItemTrait... traits) { - this.traits = safeAssign(traits); - this.unloc = unloc; - } - - private Ammo9mm(String unloc, Set traits) { - this.traits = traits; - this.unloc = unloc; - } - - @Override - public Set getTraits() { - return traits; - } - - @Override - public String getInternalName() { - return unloc; - } - } - - public enum Ammo762NATO implements IAmmoItemEnum { - STOCK("ammo_762"), - AP("ammo_762_ap", HbmCollection.APType), - DU("ammo_762_du", HbmCollection.DUType), - TRACER("ammo_762_tracer", AmmoItemTrait.NEU_TRACER), - PHOSPHORUS("ammo_762_phosphorus", HbmCollection.PhosphorusType), - BLANK("ammo_762_k", AmmoItemTrait.NEU_BLANK); - - private final Set traits; - private final String unloc; - - private Ammo762NATO(String unloc, AmmoItemTrait... traits) { - this.traits = safeAssign(traits); - this.unloc = unloc; - } - - private Ammo762NATO(String unloc, Set traits) { - this.traits = traits; - this.unloc = unloc; - } - - @Override - public Set getTraits() { - return traits; - } - - @Override - public String getInternalName() { - return unloc; - } - } - - public enum Ammo75Bolt implements IAmmoItemEnum { - STOCK("ammo_75bolt"), - INCENDIARY("ammo_75bolt_incendiary"), - HE("ammo_75bolt_he"); - - private final Set traits; - private final String unloc; - - private Ammo75Bolt(String unloc, AmmoItemTrait... traits) { - this.traits = safeAssign(traits); - this.unloc = unloc; - } - - @Override - public Set getTraits() { - return traits; - } - - @Override - public String getInternalName() { - return unloc; - } - } - - public enum Ammo5mm implements IAmmoItemEnum { - STOCK("ammo_5mm"), - EXPLOSIVE("ammo_5mm_explosive", HbmCollection.ExplosiveType), - DU("ammo_5mm_du", HbmCollection.DUType), - STAR("ammo_5mm_star", HbmCollection.StarmetalType), - CHLOROPHYTE("ammo_5mm_chlorophyte", HbmCollection.ChlorophyteType); - - private final Set traits; - private final String unloc; - - private Ammo5mm(String unloc, AmmoItemTrait... traits) { - this.traits = safeAssign(traits); - this.unloc = unloc; - } - - private Ammo5mm(String unloc, Set traits) { - this.traits = traits; - this.unloc = unloc; - } - - @Override - public Set getTraits() { - return traits; - } - - @Override - public String getInternalName() { - return unloc; - } - } - - public enum Ammo556mm implements IAmmoItemEnum { - STOCK("ammo_556"), - GOLD("gun_pm_ammo"), - PHOSPHORUS("ammo_556_phosphorus", HbmCollection.PhosphorusType), - AP("ammo_556_ap", HbmCollection.APType), - DU("ammo_556_du", HbmCollection.DUType), - STAR("ammo_556_star", HbmCollection.StarmetalType), - CHLOROPHYTE("ammo_556_chlorophyte", HbmCollection.ChlorophyteType), - SLEEK("ammo_556_sleek", AmmoItemTrait.NEU_MASKMAN_METEORITE), - TRACER("ammo_556_tracer", AmmoItemTrait.NEU_TRACER), - FLECHETTE("ammo_556_flechette", HbmCollection.FlechetteType), - FLECHETTE_INCENDIARY("ammo_556_flechette_incendiary", AmmoItemTrait.PRO_DAMAGE, AmmoItemTrait.PRO_INCENDIARY, AmmoItemTrait.NEU_LESS_BOUNCY, AmmoItemTrait.CON_WEAR, AmmoItemTrait.CON_PENETRATION), - FLECHETTE_PHOSPHORUS("ammo_556_flechette_phosphorus", AmmoItemTrait.PRO_DAMAGE, AmmoItemTrait.PRO_PHOSPHORUS, AmmoItemTrait.NEU_WARCRIME2, AmmoItemTrait.NEU_LESS_BOUNCY, AmmoItemTrait.CON_WEAR, AmmoItemTrait.CON_PENETRATION), - FLECHETTE_DU("ammo_556_flechette_du", AmmoItemTrait.PRO_HEAVY_DAMAGE, AmmoItemTrait.PRO_PENETRATION, AmmoItemTrait.NEU_HEAVY_METAL, AmmoItemTrait.NEU_LESS_BOUNCY, AmmoItemTrait.CON_HEAVY_WEAR), - FLECHETTE_CHLOROPHYTE("ammo_556_flechette_chlorophyte", HbmCollection.ChlorophyteType), - FLECHETTE_SLEEK("ammo_556_flechette_sleek", AmmoItemTrait.NEU_MASKMAN_METEORITE), - K("ammo_556_k", AmmoItemTrait.NEU_BLANK); - - private final Set traits; - private final String unloc; - - private Ammo556mm(String unloc, AmmoItemTrait... traits) { - this.traits = safeAssign(traits); - this.unloc = unloc; - } - - private Ammo556mm(String unloc, Set traits) { - this.traits = traits; - this.unloc = unloc; - } - - @Override - public Set getTraits() { - return traits; - } - - @Override - public String getInternalName() { - return unloc; - } - } - - public enum Ammo50BMG implements IAmmoItemEnum { - STOCK("ammo_50bmg"), - INCENDIARY("ammo_50bmg_incendiary", HbmCollection.IncendiaryType), - PHOSPHORUS("ammo_50bmg_phosphorus", HbmCollection.PhosphorusType), - EXPLOSIVE("ammo_50bmg_explosive", HbmCollection.ExplosiveType), - AP("ammo_50bmg_ap", HbmCollection.APType), - DU("ammo_50bmg_du", HbmCollection.DUType), - STAR("ammo_50bmg_star", HbmCollection.StarmetalType), - CHLOROPHYTE("ammo_50bmg_chlorophyte", HbmCollection.ChlorophyteType), - SLEEK("ammo_50bmg_sleek", AmmoItemTrait.NEU_MASKMAN_METEORITE), - FLECHETTE("ammo_50bmg_flechette", AmmoItemTrait.PRO_DAMAGE), - FLECHETTE_AM("ammo_50bmg_flechette_am", AmmoItemTrait.PRO_DAMAGE, AmmoItemTrait.NEU_UHH), - FLECHETTE_PO("ammo_50bmg_flechette_po", AmmoItemTrait.PRO_DAMAGE, AmmoItemTrait.NEU_UHH); - - private final Set traits; - private final String unloc; - - private Ammo50BMG(String unloc, AmmoItemTrait... traits) { - this.traits = safeAssign(traits); - this.unloc = unloc; - } - - private Ammo50BMG(String unloc, Set traits) { - this.traits = traits; - this.unloc = unloc; - } - - @Override - public Set getTraits() { - return traits; - } - - @Override - public String getInternalName() { - return unloc; - } - } - - public enum Ammo50AE implements IAmmoItemEnum { - STOCK("ammo_50ae"), - AP("ammo_50ae_ap", HbmCollection.APType), - DU("ammo_50ae_du", HbmCollection.DUType), - STAR("ammo_50ae_star", HbmCollection.StarmetalType), - CHLOROPHYTE("ammo_50ae_chlorophyte", HbmCollection.ChlorophyteType); - - private final Set traits; - private final String unloc; - - private Ammo50AE(String unloc, AmmoItemTrait... traits) { - this.traits = safeAssign(traits); - this.unloc = unloc; - } - - private Ammo50AE(String unloc, Set traits) { - this.traits = traits; - this.unloc = unloc; - } - - @Override - public Set getTraits() { - return traits; - } - - @Override - public String getInternalName() { - return unloc; - } - } - - public enum Ammo4Gauge implements IAmmoItemEnum { - STOCK("ammo_4gauge"), - SLUG("ammo_4gauge_slug", AmmoItemTrait.PRO_ACCURATE2, AmmoItemTrait.PRO_DAMAGE, AmmoItemTrait.PRO_WEAR, AmmoItemTrait.CON_SING_PROJECTILE), - FLECHETTE("ammo_4gauge_flechette", HbmCollection.FlechetteType), - FLECHETTE_PHOSPHORUS("ammo_4gauge_flechette_phosphorus", AmmoItemTrait.PRO_DAMAGE, AmmoItemTrait.PRO_PHOSPHORUS, AmmoItemTrait.NEU_WARCRIME2, AmmoItemTrait.NEU_LESS_BOUNCY, AmmoItemTrait.CON_WEAR), - EXPLOSIVE("ammo_4gauge_explosive", AmmoItemTrait.PRO_EXPLOSIVE, AmmoItemTrait.PRO_DAMAGE, AmmoItemTrait.NEU_40MM, AmmoItemTrait.CON_HEAVY_WEAR, AmmoItemTrait.CON_SING_PROJECTILE), - MINING("ammo_4gauge_semtex", AmmoItemTrait.PRO_EXPLOSIVE, AmmoItemTrait.PRO_MINING, AmmoItemTrait.CON_NO_EXPLODE3, AmmoItemTrait.CON_HEAVY_WEAR, AmmoItemTrait.CON_SING_PROJECTILE), - BALEFIRE("ammo_4gauge_balefire", AmmoItemTrait.PRO_EXPLOSIVE, AmmoItemTrait.PRO_BALEFIRE, AmmoItemTrait.PRO_DAMAGE, AmmoItemTrait.CON_HEAVY_WEAR, AmmoItemTrait.CON_SING_PROJECTILE), - KAMPF("ammo_4gauge_kampf", AmmoItemTrait.PRO_EXPLOSIVE, AmmoItemTrait.PRO_ROCKET_PROPELLED, AmmoItemTrait.PRO_ACCURATE1, AmmoItemTrait.PRO_DAMAGE, AmmoItemTrait.CON_WEAR, AmmoItemTrait.CON_SING_PROJECTILE), - CANISTER("ammo_4gauge_canister"), - SLEEK("ammo_4gauge_sleek", AmmoItemTrait.NEU_MASKMAN_FLECHETTE), - CLAW("ammo_4gauge_claw"), - VAMPIRE("ammo_4gauge_vampire"), - VOID("ammo_4gauge_void"), - QUACK("ammo_4gauge_titan", AmmoItemTrait.PRO_MARAUDER, AmmoItemTrait.NEU_NO_CON); - - private final Set traits; - private final String unloc; - - private Ammo4Gauge(String unloc, AmmoItemTrait... traits) { - this.traits = safeAssign(traits); - this.unloc = unloc; - } - - private Ammo4Gauge(String unloc, Set traits) { - this.traits = traits; - this.unloc = unloc; - } - - @Override - public Set getTraits() { - return traits; - } - - @Override - public String getInternalName() { - return unloc; - } - } - - public enum Ammo45ACP implements IAmmoItemEnum { - STOCK("ammo_45"), - AP("ammo_45_ap", HbmCollection.APType), - DU("ammo_45_du", HbmCollection.DUType); - - private final Set traits; - private final String unloc; - - private Ammo45ACP(String unloc, AmmoItemTrait... traits) { - this.traits = safeAssign(traits); - this.unloc = unloc; - } - - private Ammo45ACP(String unloc, Set traits) { - this.traits = traits; - this.unloc = unloc; - } - - @Override - public Set getTraits() { - return traits; - } - - @Override - public String getInternalName() { - return unloc; - } - } - - public enum Ammo44Magnum implements IAmmoItemEnum { - STOCK("ammo_44"), - AP("ammo_44_ap", HbmCollection.APType), - DU("ammo_44_du", HbmCollection.DUType), - PHOSPHORUS("ammo_44_phosphorus", HbmCollection.PhosphorusType), - STAR("ammo_44_star", HbmCollection.StarmetalType), - CHLOROPHYTE("ammo_44_chlorophyte", HbmCollection.ChlorophyteType), - PIP("ammo_44_pip", AmmoItemTrait.NEU_BOXCAR, AmmoItemTrait.CON_DAMAGE), - BJ("ammo_44_bj", AmmoItemTrait.NEU_BOAT, AmmoItemTrait.CON_DAMAGE), - SILVER("ammo_44_silver", AmmoItemTrait.NEU_BUILDING, AmmoItemTrait.CON_DAMAGE), - ROCKET("ammo_44_rocket", AmmoItemTrait.PRO_ROCKET, AmmoItemTrait.NEU_UHH); - - private final Set traits; - private final String unloc; - - private Ammo44Magnum(String unloc, AmmoItemTrait... traits) { - this.traits = safeAssign(traits); - this.unloc = unloc; - } - - private Ammo44Magnum(String unloc, Set traits) { - this.traits = traits; - this.unloc = unloc; - } - - @Override - public Set getTraits() { - return traits; - } - - @Override - public String getInternalName() { - return unloc; - } - } - - public enum Ammo357Magnum implements IAmmoItemEnum { - IRON("gun_revolver_iron_ammo"), - LEAD("gun_revolver_ammo"), - NUCLEAR("gun_revolver_lead_ammo"), - GOLD("gun_revolver_gold_ammo"), - DESH("ammo_357_desh", AmmoItemTrait.PRO_FIT_357, AmmoItemTrait.PRO_DAMAGE_SLIGHT), - SCHRABIDIUM("gun_revolver_schrabidium_ammo"), - STEEL("gun_revolver_cursed_ammo"), - NIGHTMARE1("gun_revolver_nightmare_ammo"), - NIGHTMARE2("gun_revolver_nightmare2_ammo"); - - private final Set traits; - private final String unloc; - - private Ammo357Magnum(String unloc, AmmoItemTrait... traits) { - this.traits = safeAssign(traits); - this.unloc = unloc; - } - - @Override - public Set getTraits() { - return traits; - } - - @Override - public String getInternalName() { - return unloc; - } - } - - public enum Ammo22LR implements IAmmoItemEnum { - STOCK("ammo_22lr"), - AP("ammo_22lr_ap", HbmCollection.APType), - CHLOROPHYTE("ammo_22lr_chlorophyte", HbmCollection.ChlorophyteType); - - private final Set traits; - private final String unloc; - - private Ammo22LR(String unloc, AmmoItemTrait... traits) { - this.traits = safeAssign(traits); - this.unloc = unloc; - } - - private Ammo22LR(String unloc, Set traits) { - this.traits = traits; - this.unloc = unloc; - } - - @Override - public Set getTraits() { - return traits; - } - - @Override - public String getInternalName() { - return unloc; - } - } - - public enum Ammo20Gauge implements IAmmoItemEnum { - STOCK("ammo_20gauge"), - SLUG("ammo_20gauge_slug", AmmoItemTrait.PRO_ACCURATE2, AmmoItemTrait.PRO_DAMAGE, AmmoItemTrait.PRO_WEAR, AmmoItemTrait.CON_SING_PROJECTILE), - FLECHETTE("ammo_20gauge_flechette", HbmCollection.FlechetteType), - INCENDIARY("ammo_20gauge_incendiary", AmmoItemTrait.PRO_INCENDIARY, AmmoItemTrait.CON_WEAR), - SHRAPNEL("ammo_20gauge_shrapnel", AmmoItemTrait.PRO_DAMAGE, AmmoItemTrait.NEU_MORE_BOUNCY, AmmoItemTrait.CON_WEAR), - EXPLOSIVE("ammo_20gauge_explosive", HbmCollection.ExplosiveType), - CAUSTIC("ammo_20gauge_caustic", AmmoItemTrait.PRO_TOXIC, AmmoItemTrait.PRO_CAUSTIC, AmmoItemTrait.NEU_NO_BOUNCE, AmmoItemTrait.CON_HEAVY_WEAR), - SHOCK("ammo_20gauge_shock", AmmoItemTrait.PRO_DAMAGE, AmmoItemTrait.PRO_STUNNING, AmmoItemTrait.PRO_EMP, AmmoItemTrait.NEU_NO_BOUNCE, AmmoItemTrait.CON_HEAVY_WEAR), - WITHER("ammo_20gauge_wither", AmmoItemTrait.PRO_DAMAGE, AmmoItemTrait.PRO_WITHERING), - SLEEK("ammo_20gauge_sleek", AmmoItemTrait.NEU_MASKMAN_FLECHETTE); - - private final Set traits; - private final String unloc; - - private Ammo20Gauge(String unloc, AmmoItemTrait... traits) { - this.traits = safeAssign(traits); - this.unloc = unloc; - } - - private Ammo20Gauge(String unloc, Set traits) { - this.traits = traits; - this.unloc = unloc; - } - - @Override - public Set getTraits() { - return traits; - } - - @Override - public String getInternalName() { - return unloc; - } - } - - public enum Ammo12Gauge implements IAmmoItemEnum { - STOCK("ammo_12gauge"), - INCENDIARY("ammo_12gauge_incendiary", AmmoItemTrait.PRO_INCENDIARY, AmmoItemTrait.CON_WEAR), - SHRAPNEL("ammo_12gauge_shrapnel", AmmoItemTrait.PRO_DAMAGE, AmmoItemTrait.NEU_MORE_BOUNCY, AmmoItemTrait.CON_WEAR), - DU("ammo_12gauge_du", AmmoItemTrait.PRO_DAMAGE, AmmoItemTrait.PRO_PENETRATION, AmmoItemTrait.NEU_HEAVY_METAL, AmmoItemTrait.CON_HEAVY_WEAR), - MARAUDER("ammo_12gauge_marauder", AmmoItemTrait.PRO_MARAUDER, AmmoItemTrait.NEU_NO_CON), - SLEEK("ammo_12gauge_sleek", AmmoItemTrait.NEU_MASKMAN_FLECHETTE), - PERCUSSION("ammo_12gauge_percussion", AmmoItemTrait.PRO_PERCUSSION, AmmoItemTrait.CON_NO_PROJECTILE); - - private final Set traits; - private final String unloc; - - private Ammo12Gauge(String unloc, AmmoItemTrait... traits) { - this.traits = safeAssign(traits); - this.unloc = unloc; - } - - @Override - public Set getTraits() { - return traits; - } - - @Override - public String getInternalName() { - return unloc; - } - } - - public enum AmmoCoilgun implements IAmmoItemEnum { - STOCK("ammo_coilgun"), - DU("ammo_coilgun_du", AmmoItemTrait.PRO_HEAVY_DAMAGE, AmmoItemTrait.CON_HEAVY_WEAR), - RUBBER("ammo_coilgun_rubber", AmmoItemTrait.NEU_MORE_BOUNCY, AmmoItemTrait.CON_DAMAGE); - - private final Set traits; - private final String unloc; - - private AmmoCoilgun(String unloc, AmmoItemTrait... traits) { - this.traits = safeAssign(traits); - this.unloc = unloc; - } - - @Override public Set getTraits() { return traits; } - @Override public String getInternalName() { return unloc; } - } - public interface IAmmoItemEnum { public Set getTraits(); public String getInternalName(); diff --git a/src/main/java/com/hbm/items/ModItems.java b/src/main/java/com/hbm/items/ModItems.java index 1229141258..94b2463a4b 100644 --- a/src/main/java/com/hbm/items/ModItems.java +++ b/src/main/java/com/hbm/items/ModItems.java @@ -1461,114 +1461,13 @@ public static void mainRegistry() public static Item sat_relay; public static ItemEnumMulti ammo_misc; - public static ItemEnumMulti ammo_12gauge; - public static ItemEnumMulti ammo_20gauge; - public static ItemEnumMulti ammo_4gauge; - public static ItemEnumMulti ammo_357; - public static ItemEnumMulti ammo_44; - public static ItemEnumMulti ammo_5mm; - public static ItemEnumMulti ammo_9mm; - public static ItemEnumMulti ammo_45; - public static ItemEnumMulti ammo_556; - public static ItemEnumMulti ammo_762; - public static ItemEnumMulti ammo_22lr; - public static ItemEnumMulti ammo_50ae; - public static ItemEnumMulti ammo_50bmg; - public static ItemEnumMulti ammo_75bolt; - public static ItemEnumMulti ammo_rocket; - public static ItemEnumMulti ammo_grenade; public static ItemEnumMulti ammo_shell; - public static ItemEnumMulti ammo_nuke; - public static ItemEnumMulti ammo_fuel; public static ItemEnumMulti ammo_fireext; - public static ItemEnumMulti ammo_dart; - public static ItemEnumMulti ammo_stinger_rocket; - public static ItemEnumMulti ammo_luna_sniper; - public static ItemEnumMulti ammo_coilgun; - - public static Item ammo_cell; public static Item ammo_dgk; public static Item ammo_arty; public static Item ammo_himars; - public static Item gun_rpg; - public static Item gun_karl; - public static Item gun_hk69; - public static Item gun_skystinger; - public static Item gun_revolver; - public static Item gun_revolver_saturnite; - public static Item gun_revolver_gold; - public static Item gun_revolver_schrabidium; - public static Item gun_revolver_cursed; - public static Item gun_revolver_nightmare; - public static Item gun_revolver_nightmare2; - public static Item gun_revolver_pip; - public static Item gun_revolver_nopip; - public static Item gun_revolver_blackjack; - public static Item gun_revolver_silver; - public static Item gun_revolver_red; - public static Item gun_bio_revolver; - public static Item gun_deagle; - public static Item gun_flechette; - public static Item gun_ar15; - public static Item gun_calamity; - public static Item gun_lacunae; - public static Item gun_proto; - public static Item gun_mirv; - public static Item gun_bf; - public static Item gun_mp40; - public static Item gun_thompson; - public static Item gun_uzi_silencer; - public static Item gun_uzi_saturnite; - public static Item gun_uzi_saturnite_silencer; - public static Item gun_uboinik; - public static Item gun_remington; - public static Item gun_supershotgun; - public static Item gun_benelli; - public static Item gun_ks23; - public static Item gun_sauer; - public static Item gun_lever_action; - public static Item gun_lever_action_dark; - public static Item gun_lever_action_sonata; - public static Item gun_bolt_action; - public static Item gun_bolt_action_green; - public static Item gun_bolt_action_saturnite; - public static Item gun_mymy; - public static Item gun_b93; - public static Item gun_xvl1456; - public static Item gun_xvl1456_ammo; - public static Item gun_osipr; - public static Item gun_osipr_ammo; - public static Item gun_osipr_ammo2; - public static Item gun_immolator; - public static Item gun_immolator_ammo; - public static Item gun_cryolator; - public static Item gun_mp; - public static Item gun_bolter_digamma; - public static Item gun_zomg; - public static Item gun_super_shotgun; - public static Item gun_moist_nugget; - public static Item gun_revolver_inverted; - public static Item gun_emp; - public static Item gun_emp_ammo; - public static Item gun_jack; - public static Item gun_jack_ammo; - public static Item gun_spark; - public static Item gun_spark_ammo; - public static Item gun_hp; - public static Item gun_hp_ammo; - public static Item gun_euthanasia; - public static Item gun_euthanasia_ammo; - public static Item gun_defabricator; - public static Item gun_defabricator_ammo; - public static Item gun_vortex; - public static Item gun_waluigi; - public static Item gun_darter; - public static Item gun_glass_cannon; - public static Item gun_lunatic_marksman; - public static Item gun_uac_pistol; - public static Item gun_b92; public static Item gun_b92_ammo; public static Item gun_cryocannon; @@ -2325,14 +2224,6 @@ public static void mainRegistry() public static Item book_lemegeton; public static Item burnt_bark; - public static Item b_smoke1; - public static Item b_smoke2; - public static Item b_smoke3; - public static Item b_smoke4; - public static Item b_smoke5; - public static Item b_smoke6; - public static Item b_smoke7; - public static Item b_smoke8; public static Item chlorine1; public static Item chlorine2; public static Item chlorine3; @@ -2365,16 +2256,6 @@ public static void mainRegistry() public static Item orange6; public static Item orange7; public static Item orange8; - public static Item ln2_1; - public static Item ln2_2; - public static Item ln2_3; - public static Item ln2_4; - public static Item ln2_5; - public static Item ln2_6; - public static Item ln2_7; - public static Item ln2_8; - public static Item ln2_9; - public static Item ln2_10; public static Item nothing; public static Item achievement_icon; @@ -3969,116 +3850,18 @@ public static void initializeItem() missile_skin_soviet_stank = new ItemCustomLore().setUnlocalizedName("missile_skin_soviet_stank").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":missile_skin_soviet_stank"); missile_skin_metal = new ItemCustomLore().setUnlocalizedName("missile_skin_metal").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":missile_skin_metal"); - ammo_12gauge = new ItemAmmo(Ammo12Gauge.class).setUnlocalizedName("ammo_12gauge"); - ammo_20gauge = new ItemAmmo(Ammo20Gauge.class).setUnlocalizedName("ammo_20gauge"); - ammo_4gauge = new ItemAmmo(Ammo4Gauge.class).setUnlocalizedName("ammo_4gauge"); - ammo_5mm = new ItemAmmo(Ammo5mm.class).setUnlocalizedName("ammo_5mm"); - ammo_9mm = new ItemAmmo(Ammo9mm.class).setUnlocalizedName("ammo_9mm"); - ammo_45 = new ItemAmmo(Ammo45ACP.class).setUnlocalizedName("ammo_45"); - ammo_556 = new ItemAmmo(Ammo556mm.class).setUnlocalizedName("ammo_556"); - ammo_762 = new ItemAmmo(Ammo762NATO.class).setUnlocalizedName("ammo_762"); - ammo_50ae = new ItemAmmo(Ammo50AE.class).setUnlocalizedName("ammo_50ae"); - ammo_50bmg = new ItemAmmo(Ammo50BMG.class).setUnlocalizedName("ammo_50bmg"); - ammo_75bolt = new ItemAmmo(Ammo75Bolt.class).setUnlocalizedName("ammo_75bolt"); - ammo_357 = new ItemAmmo(Ammo357Magnum.class).setUnlocalizedName("ammo_357"); - ammo_44 = new ItemAmmo(Ammo44Magnum.class).setUnlocalizedName("ammo_44"); - ammo_22lr = new ItemAmmo(Ammo22LR.class).setUnlocalizedName("ammo_22lr"); - ammo_rocket = new ItemAmmo(AmmoRocket.class).setUnlocalizedName("ammo_rocket"); - ammo_grenade = new ItemAmmo(AmmoGrenade.class).setUnlocalizedName("ammo_grenade"); ammo_shell = (ItemEnumMulti) new ItemAmmo(Ammo240Shell.class).setCreativeTab(MainRegistry.weaponTab).setUnlocalizedName("ammo_shell"); ammo_dgk = new ItemCustomLore().setUnlocalizedName("ammo_dgk").setCreativeTab(MainRegistry.weaponTab); - ammo_nuke = new ItemAmmo(AmmoFatman.class).setUnlocalizedName("ammo_nuke"); - ammo_fuel = new ItemAmmo(AmmoFlamethrower.class).setUnlocalizedName("ammo_fuel"); ammo_fireext = (ItemEnumMulti) new ItemAmmo(AmmoFireExt.class).setCreativeTab(MainRegistry.weaponTab).setUnlocalizedName("ammo_fireext"); - ammo_cell = new ItemCustomLore().setCreativeTab(MainRegistry.weaponTab).setUnlocalizedName("ammo_cell").setMaxStackSize(16); - ammo_coilgun = new ItemAmmo(AmmoCoilgun.class).setUnlocalizedName("ammo_coilgun"); - ammo_dart = (ItemEnumMulti) new ItemAmmo(AmmoDart.class).setUnlocalizedName("ammo_dart").setMaxStackSize(16); - ammo_stinger_rocket = new ItemAmmo(AmmoStinger.class).setUnlocalizedName("ammo_stinger_rocket"); - ammo_luna_sniper = new ItemAmmo(AmmoLunaticSniper.class).setUnlocalizedName("ammo_luna_sniper"); ammo_misc = new ItemAmmo(AmmoMisc.class).setUnlocalizedName("ammo_misc"); ammo_arty = new ItemAmmoArty().setUnlocalizedName("ammo_arty"); ammo_himars = new ItemAmmoHIMARS().setUnlocalizedName("ammo_himars"); - gun_rpg = new Item().setUnlocalizedName("gun_rpg").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_rpg"); - gun_karl = new Item().setUnlocalizedName("gun_karl").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_karl"); - gun_hk69 = new Item().setUnlocalizedName("gun_hk69").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_hk69"); - gun_skystinger = new Item().setUnlocalizedName("gun_skystinger").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_skystinger"); - gun_revolver = new Item().setUnlocalizedName("gun_revolver").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_revolver"); - gun_revolver_saturnite = new Item().setUnlocalizedName("gun_revolver_saturnite").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_revolver_saturnite"); - gun_revolver_gold = new Item().setUnlocalizedName("gun_revolver_gold").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_revolver_gold"); - gun_revolver_schrabidium = new Item().setUnlocalizedName("gun_revolver_schrabidium").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_revolver_schrabidium"); - gun_revolver_cursed = new Item().setUnlocalizedName("gun_revolver_cursed").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_revolver_cursed"); - gun_revolver_nightmare = new Item().setUnlocalizedName("gun_revolver_nightmare").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_revolver_nightmare"); - gun_revolver_nightmare2 = new Item().setUnlocalizedName("gun_revolver_nightmare2").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_revolver_nightmare2"); - gun_revolver_pip = new Item().setUnlocalizedName("gun_revolver_pip").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_revolver_pip"); - gun_revolver_nopip = new Item().setUnlocalizedName("gun_revolver_nopip").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_revolver_nopip"); - gun_revolver_blackjack = new Item().setUnlocalizedName("gun_revolver_blackjack").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_revolver_blackjack"); - gun_revolver_silver = new Item().setUnlocalizedName("gun_revolver_silver").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_revolver_silver"); - gun_revolver_red = new Item().setUnlocalizedName("gun_revolver_red").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_revolver_red"); - gun_deagle = new Item().setUnlocalizedName("gun_deagle").setFull3D().setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_deagle"); - gun_bio_revolver = new Item().setUnlocalizedName("gun_bio_revolver").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_bio_revolver"); - gun_flechette = new Item().setUnlocalizedName("gun_flechette").setFull3D().setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_flechette"); - gun_ar15 = new Item().setUnlocalizedName("gun_ar15").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_ar15"); - gun_calamity = new Item().setUnlocalizedName("gun_calamity").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_calamity"); - gun_lacunae = new Item().setUnlocalizedName("gun_lacunae").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_lacunae"); - gun_proto = new Item().setUnlocalizedName("gun_proto").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_fatman"); - gun_mirv = new Item().setUnlocalizedName("gun_mirv").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_mirv"); - gun_bf = new Item().setUnlocalizedName("gun_bf").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_bf"); - gun_mp40 = new Item().setUnlocalizedName("gun_mp40").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_mp40"); - gun_thompson = new Item().setUnlocalizedName("gun_thompson").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_thompson"); - gun_uzi_silencer = new Item().setUnlocalizedName("gun_uzi_silencer").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_uzi_silencer"); - gun_uzi_saturnite = new Item().setUnlocalizedName("gun_uzi_saturnite").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_uzi_saturnite"); - gun_uzi_saturnite_silencer = new Item().setUnlocalizedName("gun_uzi_saturnite_silencer").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_uzi_saturnite_silencer"); - gun_uboinik = new Item().setUnlocalizedName("gun_uboinik").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_uboinik"); - gun_remington = new Item().setUnlocalizedName("gun_remington").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_spas12"); - gun_benelli = new Item().setUnlocalizedName("gun_benelli").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_spas12"); - gun_supershotgun = new Item().setUnlocalizedName("gun_supershotgun").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_uboinik"); - gun_ks23 = new Item().setUnlocalizedName("gun_ks23").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_uboinik"); - gun_sauer = new Item().setUnlocalizedName("gun_sauer").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_uboinik"); - gun_lever_action = new Item().setUnlocalizedName("gun_lever_action").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_lever_action"); - gun_lever_action_dark = new Item().setUnlocalizedName("gun_lever_action_dark").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_lever_action_dark"); - gun_lever_action_sonata = new Item().setUnlocalizedName("gun_lever_action_sonata").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_lever_action_sonata"); - gun_bolt_action = new Item().setUnlocalizedName("gun_bolt_action").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_bolt_action"); - gun_bolt_action_green = new Item().setUnlocalizedName("gun_bolt_action_green").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_bolt_action_green"); - gun_bolt_action_saturnite = new Item().setUnlocalizedName("gun_bolt_action_saturnite").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_bolt_action_saturnite"); - gun_mymy = new Item().setUnlocalizedName("gun_mymy").setFull3D().setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_mymy"); gun_b92_ammo = new GunB92Cell().setUnlocalizedName("gun_b92_ammo").setMaxStackSize(1).setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_b92_ammo_alt"); gun_b92 = new GunB92().setUnlocalizedName("gun_b92").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_b92"); - gun_b93 = new Item().setUnlocalizedName("gun_b93").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_b93"); - gun_xvl1456_ammo = new Item().setUnlocalizedName("gun_xvl1456_ammo").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_xvl1456_ammo"); - gun_xvl1456 = new Item().setUnlocalizedName("gun_xvl1456").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_xvl1456"); - gun_osipr_ammo = new Item().setUnlocalizedName("gun_osipr_ammo").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_osipr_ammo"); - gun_osipr_ammo2 = new Item().setUnlocalizedName("gun_osipr_ammo2").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_osipr_ammo2"); - gun_osipr = new Item().setUnlocalizedName("gun_osipr").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_osipr"); - gun_immolator_ammo = new Item().setUnlocalizedName("gun_immolator_ammo").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_immolator_ammo"); - gun_immolator = new Item().setUnlocalizedName("gun_immolator").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_immolator"); gun_cryolator_ammo = new Item().setUnlocalizedName("gun_cryolator_ammo").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_cryolator_ammo"); - gun_cryolator = new Item().setUnlocalizedName("gun_cryolator").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_cryolator"); gun_cryocannon = new ItemCryoCannon(GunEnergyFactory.getCryoCannonConfig()).setUnlocalizedName("gun_cryocannon").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_cryocannon"); gun_fireext = new ItemGunBase(GunEnergyFactory.getExtConfig()).setUnlocalizedName("gun_fireext").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_fireext"); - gun_mp = new Item().setUnlocalizedName("gun_mp").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_pm"); - gun_bolter_digamma = new Item().setUnlocalizedName("gun_bolter_digamma").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_bolter_digamma"); - gun_zomg = new Item().setUnlocalizedName("gun_zomg").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_zomg"); - gun_revolver_inverted = new Item().setUnlocalizedName("gun_revolver_inverted").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_revolver_inverted"); - gun_emp_ammo = new Item().setUnlocalizedName("gun_emp_ammo").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_emp_ammo"); - gun_emp = new Item().setUnlocalizedName("gun_emp").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_emp"); - gun_jack_ammo = new Item().setUnlocalizedName("gun_jack_ammo").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_jack_ammo"); - gun_jack = new Item().setUnlocalizedName("gun_jack").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_jack"); - gun_spark_ammo = new Item().setUnlocalizedName("gun_spark_ammo").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_spark_ammo"); - gun_spark = new Item().setUnlocalizedName("gun_spark").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_spark"); - gun_hp_ammo = new Item().setUnlocalizedName("gun_hp_ammo").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_hp_ammo"); - gun_hp = new Item().setUnlocalizedName("gun_hp").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_hp"); - gun_euthanasia_ammo = new Item().setUnlocalizedName("gun_euthanasia_ammo").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_euthanasia_ammo"); - gun_euthanasia = new Item().setUnlocalizedName("gun_euthanasia").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_euthanasia"); - gun_defabricator_ammo = new Item().setUnlocalizedName("gun_defabricator_ammo").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_defabricator_ammo"); - gun_defabricator = new Item().setUnlocalizedName("gun_defabricator").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_defabricator"); - gun_vortex = new Item().setUnlocalizedName("gun_vortex").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_vortex"); - gun_super_shotgun = new Item().setUnlocalizedName("gun_super_shotgun").setMaxStackSize(1).setFull3D().setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_super_shotgun"); - gun_moist_nugget = new Item().setUnlocalizedName("gun_moist_nugget").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_moist_nugget"); - gun_darter = new Item().setFull3D().setUnlocalizedName("gun_darter").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_darter"); - gun_glass_cannon = new Item().setFull3D().setUnlocalizedName("gun_glass_cannon").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_darter"); - gun_lunatic_marksman = new Item().setFull3D().setUnlocalizedName("gun_lunatic_marksman").setCreativeTab(null); - gun_uac_pistol = new Item().setFull3D().setUnlocalizedName("gun_uac_pistol").setCreativeTab(null); ToolMaterial matCrucible = EnumHelper.addToolMaterial("CRUCIBLE", 10, 3, 50.0F, 100.0F, 0); crucible = new ItemCrucible(5000, 1F, matCrucible).setUnlocalizedName("crucible").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":crucible"); @@ -5230,14 +5013,6 @@ public static void initializeItem2() { book_lemegeton = new ItemBookLemegeton().setUnlocalizedName("book_lemegeton").setMaxStackSize(1).setCreativeTab(null).setTextureName(RefStrings.MODID + ":book_lemegeton"); burnt_bark = new ItemCustomLore().setUnlocalizedName("burnt_bark").setCreativeTab(null).setTextureName(RefStrings.MODID + ":burnt_bark"); - b_smoke1 = new Item().setUnlocalizedName("b_smoke1").setTextureName(RefStrings.MODID + ":b_smoke1"); - b_smoke2 = new Item().setUnlocalizedName("b_smoke2").setTextureName(RefStrings.MODID + ":b_smoke2"); - b_smoke3 = new Item().setUnlocalizedName("b_smoke3").setTextureName(RefStrings.MODID + ":b_smoke3"); - b_smoke4 = new Item().setUnlocalizedName("b_smoke4").setTextureName(RefStrings.MODID + ":b_smoke4"); - b_smoke5 = new Item().setUnlocalizedName("b_smoke5").setTextureName(RefStrings.MODID + ":b_smoke5"); - b_smoke6 = new Item().setUnlocalizedName("b_smoke6").setTextureName(RefStrings.MODID + ":b_smoke6"); - b_smoke7 = new Item().setUnlocalizedName("b_smoke7").setTextureName(RefStrings.MODID + ":b_smoke7"); - b_smoke8 = new Item().setUnlocalizedName("b_smoke8").setTextureName(RefStrings.MODID + ":b_smoke8"); chlorine1 = new Item().setUnlocalizedName("chlorine1").setTextureName(RefStrings.MODID + ":chlorine1"); chlorine2 = new Item().setUnlocalizedName("chlorine2").setTextureName(RefStrings.MODID + ":chlorine2"); chlorine3 = new Item().setUnlocalizedName("chlorine3").setTextureName(RefStrings.MODID + ":chlorine3"); @@ -5270,16 +5045,6 @@ public static void initializeItem2() { orange6 = new Item().setUnlocalizedName("orange6").setTextureName(RefStrings.MODID + ":orange6"); orange7 = new Item().setUnlocalizedName("orange7").setTextureName(RefStrings.MODID + ":orange7"); orange8 = new Item().setUnlocalizedName("orange8").setTextureName(RefStrings.MODID + ":orange8"); - ln2_1 = new Item().setUnlocalizedName("ln2_1").setTextureName(RefStrings.MODID + ":ln2_1"); - ln2_2 = new Item().setUnlocalizedName("ln2_2").setTextureName(RefStrings.MODID + ":ln2_2"); - ln2_3 = new Item().setUnlocalizedName("ln2_3").setTextureName(RefStrings.MODID + ":ln2_3"); - ln2_4 = new Item().setUnlocalizedName("ln2_4").setTextureName(RefStrings.MODID + ":ln2_4"); - ln2_5 = new Item().setUnlocalizedName("ln2_5").setTextureName(RefStrings.MODID + ":ln2_5"); - ln2_6 = new Item().setUnlocalizedName("ln2_6").setTextureName(RefStrings.MODID + ":ln2_6"); - ln2_7 = new Item().setUnlocalizedName("ln2_7").setTextureName(RefStrings.MODID + ":ln2_7"); - ln2_8 = new Item().setUnlocalizedName("ln2_8").setTextureName(RefStrings.MODID + ":ln2_8"); - ln2_9 = new Item().setUnlocalizedName("ln2_9").setTextureName(RefStrings.MODID + ":ln2_9"); - ln2_10 = new Item().setUnlocalizedName("ln2_10").setTextureName(RefStrings.MODID + ":ln2_10"); nothing = new Item().setUnlocalizedName("nothing").setTextureName(RefStrings.MODID + ":nothing"); @@ -6725,77 +6490,10 @@ private static void registerItem() { GameRegistry.registerItem(sat_relay, sat_relay.getUnlocalizedName()); //Guns - GameRegistry.registerItem(gun_revolver, gun_revolver.getUnlocalizedName()); - GameRegistry.registerItem(gun_revolver_saturnite, gun_revolver_saturnite.getUnlocalizedName()); - GameRegistry.registerItem(gun_revolver_gold, gun_revolver_gold.getUnlocalizedName()); - GameRegistry.registerItem(gun_revolver_schrabidium, gun_revolver_schrabidium.getUnlocalizedName()); - GameRegistry.registerItem(gun_revolver_cursed, gun_revolver_cursed.getUnlocalizedName()); - GameRegistry.registerItem(gun_revolver_nightmare, gun_revolver_nightmare.getUnlocalizedName()); - GameRegistry.registerItem(gun_revolver_nightmare2, gun_revolver_nightmare2.getUnlocalizedName()); - GameRegistry.registerItem(gun_revolver_pip, gun_revolver_pip.getUnlocalizedName()); - GameRegistry.registerItem(gun_revolver_nopip, gun_revolver_nopip.getUnlocalizedName()); - GameRegistry.registerItem(gun_revolver_blackjack, gun_revolver_blackjack.getUnlocalizedName()); - GameRegistry.registerItem(gun_revolver_silver, gun_revolver_silver.getUnlocalizedName()); - GameRegistry.registerItem(gun_revolver_red, gun_revolver_red.getUnlocalizedName()); - GameRegistry.registerItem(gun_bio_revolver, gun_bio_revolver.getUnlocalizedName()); - GameRegistry.registerItem(gun_deagle, gun_deagle.getUnlocalizedName()); - GameRegistry.registerItem(gun_uac_pistol, gun_uac_pistol.getUnlocalizedName()); - GameRegistry.registerItem(gun_flechette, gun_flechette.getUnlocalizedName()); - GameRegistry.registerItem(gun_ar15, gun_ar15.getUnlocalizedName()); - GameRegistry.registerItem(gun_calamity, gun_calamity.getUnlocalizedName()); - GameRegistry.registerItem(gun_lacunae, gun_lacunae.getUnlocalizedName()); GameRegistry.registerItem(gun_b92, gun_b92.getUnlocalizedName()); - GameRegistry.registerItem(gun_b93, gun_b93.getUnlocalizedName()); - GameRegistry.registerItem(gun_rpg, gun_rpg.getUnlocalizedName()); - GameRegistry.registerItem(gun_karl, gun_karl.getUnlocalizedName()); - GameRegistry.registerItem(gun_hk69, gun_hk69.getUnlocalizedName()); - GameRegistry.registerItem(gun_proto, gun_proto.getUnlocalizedName()); - GameRegistry.registerItem(gun_mirv, gun_mirv.getUnlocalizedName()); - GameRegistry.registerItem(gun_bf, gun_bf.getUnlocalizedName()); - GameRegistry.registerItem(gun_mp40, gun_mp40.getUnlocalizedName()); - GameRegistry.registerItem(gun_thompson, gun_thompson.getUnlocalizedName()); - GameRegistry.registerItem(gun_uzi_silencer,gun_uzi_silencer.getUnlocalizedName()); - GameRegistry.registerItem(gun_uzi_saturnite, gun_uzi_saturnite.getUnlocalizedName()); - GameRegistry.registerItem(gun_uzi_saturnite_silencer,gun_uzi_saturnite_silencer.getUnlocalizedName()); - GameRegistry.registerItem(gun_uboinik, gun_uboinik.getUnlocalizedName()); - GameRegistry.registerItem(gun_remington, gun_remington.getUnlocalizedName()); - GameRegistry.registerItem(gun_benelli, gun_benelli.getUnlocalizedName()); - GameRegistry.registerItem(gun_supershotgun, gun_supershotgun.getUnlocalizedName()); - GameRegistry.registerItem(gun_ks23, gun_ks23.getUnlocalizedName()); - GameRegistry.registerItem(gun_sauer, gun_sauer.getUnlocalizedName()); - GameRegistry.registerItem(gun_lever_action, gun_lever_action.getUnlocalizedName()); - GameRegistry.registerItem(gun_lever_action_dark, gun_lever_action_dark.getUnlocalizedName()); - GameRegistry.registerItem(gun_lever_action_sonata, gun_lever_action_sonata.getUnlocalizedName()); - GameRegistry.registerItem(gun_bolt_action, gun_bolt_action.getUnlocalizedName()); - GameRegistry.registerItem(gun_bolt_action_green, gun_bolt_action_green.getUnlocalizedName()); - GameRegistry.registerItem(gun_bolt_action_saturnite, gun_bolt_action_saturnite.getUnlocalizedName()); - GameRegistry.registerItem(gun_mymy, gun_mymy.getUnlocalizedName()); - GameRegistry.registerItem(gun_xvl1456, gun_xvl1456.getUnlocalizedName()); - GameRegistry.registerItem(gun_osipr, gun_osipr.getUnlocalizedName()); - GameRegistry.registerItem(gun_immolator, gun_immolator.getUnlocalizedName()); - GameRegistry.registerItem(gun_cryolator, gun_cryolator.getUnlocalizedName()); GameRegistry.registerItem(gun_cryocannon, gun_cryocannon.getUnlocalizedName()); GameRegistry.registerItem(gun_fireext, gun_fireext.getUnlocalizedName()); - GameRegistry.registerItem(gun_mp, gun_mp.getUnlocalizedName()); - GameRegistry.registerItem(gun_bolter_digamma, gun_bolter_digamma.getUnlocalizedName()); - GameRegistry.registerItem(gun_zomg, gun_zomg.getUnlocalizedName()); - GameRegistry.registerItem(gun_emp, gun_emp.getUnlocalizedName()); - GameRegistry.registerItem(gun_revolver_inverted, gun_revolver_inverted.getUnlocalizedName()); - GameRegistry.registerItem(gun_jack, gun_jack.getUnlocalizedName()); - GameRegistry.registerItem(gun_spark, gun_spark.getUnlocalizedName()); - GameRegistry.registerItem(gun_hp, gun_hp.getUnlocalizedName()); - GameRegistry.registerItem(gun_euthanasia, gun_euthanasia.getUnlocalizedName()); - GameRegistry.registerItem(gun_skystinger, gun_skystinger.getUnlocalizedName()); - //GameRegistry.registerItem(gun_dash, gun_dash.getUnlocalizedName()); - //GameRegistry.registerItem(gun_twigun, gun_twigun.getUnlocalizedName()); - GameRegistry.registerItem(gun_defabricator, gun_defabricator.getUnlocalizedName()); - GameRegistry.registerItem(gun_vortex, gun_vortex.getUnlocalizedName()); - GameRegistry.registerItem(gun_super_shotgun, gun_super_shotgun.getUnlocalizedName()); - GameRegistry.registerItem(gun_moist_nugget, gun_moist_nugget.getUnlocalizedName()); - GameRegistry.registerItem(gun_darter, gun_darter.getUnlocalizedName()); GameRegistry.registerItem(crucible, crucible.getUnlocalizedName()); - GameRegistry.registerItem(gun_glass_cannon, gun_glass_cannon.getUnlocalizedName()); - GameRegistry.registerItem(gun_lunatic_marksman, gun_lunatic_marksman.getUnlocalizedName()); GameRegistry.registerItem(gun_debug, gun_debug.getUnlocalizedName()); GameRegistry.registerItem(ammo_debug, ammo_debug.getUnlocalizedName()); @@ -6850,42 +6548,9 @@ private static void registerItem() { //Ammo GameRegistry.registerItem(gun_b92_ammo, gun_b92_ammo.getUnlocalizedName()); - GameRegistry.registerItem(gun_xvl1456_ammo, gun_xvl1456_ammo.getUnlocalizedName()); - GameRegistry.registerItem(gun_osipr_ammo, gun_osipr_ammo.getUnlocalizedName()); - GameRegistry.registerItem(gun_osipr_ammo2, gun_osipr_ammo2.getUnlocalizedName()); - GameRegistry.registerItem(gun_immolator_ammo, gun_immolator_ammo.getUnlocalizedName()); GameRegistry.registerItem(gun_cryolator_ammo, gun_cryolator_ammo.getUnlocalizedName()); - GameRegistry.registerItem(gun_emp_ammo, gun_emp_ammo.getUnlocalizedName()); - GameRegistry.registerItem(gun_jack_ammo, gun_jack_ammo.getUnlocalizedName()); - GameRegistry.registerItem(gun_spark_ammo, gun_spark_ammo.getUnlocalizedName()); - GameRegistry.registerItem(gun_hp_ammo, gun_hp_ammo.getUnlocalizedName()); - GameRegistry.registerItem(gun_defabricator_ammo, gun_defabricator_ammo.getUnlocalizedName()); - GameRegistry.registerItem(gun_euthanasia_ammo, gun_euthanasia_ammo.getUnlocalizedName()); - - GameRegistry.registerItem(ammo_12gauge, ammo_12gauge.getUnlocalizedName()); - GameRegistry.registerItem(ammo_20gauge, ammo_20gauge.getUnlocalizedName()); - GameRegistry.registerItem(ammo_4gauge, ammo_4gauge.getUnlocalizedName()); - GameRegistry.registerItem(ammo_357, ammo_357.getUnlocalizedName()); - GameRegistry.registerItem(ammo_44, ammo_44.getUnlocalizedName()); - GameRegistry.registerItem(ammo_45, ammo_45.getUnlocalizedName()); - GameRegistry.registerItem(ammo_5mm, ammo_5mm.getUnlocalizedName()); - GameRegistry.registerItem(ammo_9mm, ammo_9mm.getUnlocalizedName()); - GameRegistry.registerItem(ammo_556, ammo_556.getUnlocalizedName()); - GameRegistry.registerItem(ammo_762, ammo_762.getUnlocalizedName()); - GameRegistry.registerItem(ammo_22lr, ammo_22lr.getUnlocalizedName()); - GameRegistry.registerItem(ammo_50ae, ammo_50ae.getUnlocalizedName()); - GameRegistry.registerItem(ammo_50bmg, ammo_50bmg.getUnlocalizedName()); - GameRegistry.registerItem(ammo_75bolt, ammo_75bolt.getUnlocalizedName()); - GameRegistry.registerItem(ammo_nuke, ammo_nuke.getUnlocalizedName()); - GameRegistry.registerItem(ammo_fuel, ammo_fuel.getUnlocalizedName()); + GameRegistry.registerItem(ammo_fireext, ammo_fireext.getUnlocalizedName()); - GameRegistry.registerItem(ammo_cell, ammo_cell.getUnlocalizedName()); - GameRegistry.registerItem(ammo_dart, ammo_dart.getUnlocalizedName()); - GameRegistry.registerItem(ammo_rocket, ammo_rocket.getUnlocalizedName()); - GameRegistry.registerItem(ammo_stinger_rocket, ammo_stinger_rocket.getUnlocalizedName()); - GameRegistry.registerItem(ammo_luna_sniper, ammo_luna_sniper.getUnlocalizedName()); - GameRegistry.registerItem(ammo_coilgun, ammo_coilgun.getUnlocalizedName()); - GameRegistry.registerItem(ammo_grenade, ammo_grenade.getUnlocalizedName()); GameRegistry.registerItem(ammo_shell, ammo_shell.getUnlocalizedName()); GameRegistry.registerItem(ammo_dgk, ammo_dgk.getUnlocalizedName()); GameRegistry.registerItem(ammo_arty, ammo_arty.getUnlocalizedName()); @@ -7589,14 +7254,6 @@ private static void registerItem() { GameRegistry.registerItem(clay_tablet, clay_tablet.getUnlocalizedName()); //Technical Items - GameRegistry.registerItem(b_smoke1, b_smoke1.getUnlocalizedName()); - GameRegistry.registerItem(b_smoke2, b_smoke2.getUnlocalizedName()); - GameRegistry.registerItem(b_smoke3, b_smoke3.getUnlocalizedName()); - GameRegistry.registerItem(b_smoke4, b_smoke4.getUnlocalizedName()); - GameRegistry.registerItem(b_smoke5, b_smoke5.getUnlocalizedName()); - GameRegistry.registerItem(b_smoke6, b_smoke6.getUnlocalizedName()); - GameRegistry.registerItem(b_smoke7, b_smoke7.getUnlocalizedName()); - GameRegistry.registerItem(b_smoke8, b_smoke8.getUnlocalizedName()); GameRegistry.registerItem(chlorine1, chlorine1.getUnlocalizedName()); GameRegistry.registerItem(chlorine2, chlorine2.getUnlocalizedName()); GameRegistry.registerItem(chlorine3, chlorine3.getUnlocalizedName()); @@ -7629,16 +7286,6 @@ private static void registerItem() { GameRegistry.registerItem(orange6, orange6.getUnlocalizedName()); GameRegistry.registerItem(orange7, orange7.getUnlocalizedName()); GameRegistry.registerItem(orange8, orange8.getUnlocalizedName()); - GameRegistry.registerItem(ln2_1, ln2_1.getUnlocalizedName()); - GameRegistry.registerItem(ln2_2, ln2_2.getUnlocalizedName()); - GameRegistry.registerItem(ln2_3, ln2_3.getUnlocalizedName()); - GameRegistry.registerItem(ln2_4, ln2_4.getUnlocalizedName()); - GameRegistry.registerItem(ln2_5, ln2_5.getUnlocalizedName()); - GameRegistry.registerItem(ln2_6, ln2_6.getUnlocalizedName()); - GameRegistry.registerItem(ln2_7, ln2_7.getUnlocalizedName()); - GameRegistry.registerItem(ln2_8, ln2_8.getUnlocalizedName()); - GameRegistry.registerItem(ln2_9, ln2_9.getUnlocalizedName()); - GameRegistry.registerItem(ln2_10, ln2_10.getUnlocalizedName()); GameRegistry.registerItem(nothing, nothing.getUnlocalizedName()); GameRegistry.registerItem(achievement_icon, achievement_icon.getUnlocalizedName()); GameRegistry.registerItem(bob_metalworks, bob_metalworks.getUnlocalizedName()); diff --git a/src/main/java/com/hbm/items/tool/ItemAmmoContainer.java b/src/main/java/com/hbm/items/tool/ItemAmmoContainer.java index 2657bb7fe6..53ef515955 100644 --- a/src/main/java/com/hbm/items/tool/ItemAmmoContainer.java +++ b/src/main/java/com/hbm/items/tool/ItemAmmoContainer.java @@ -1,13 +1,8 @@ package com.hbm.items.tool; -import java.util.ArrayList; import java.util.List; -import com.hbm.handler.BulletConfigSyncingUtil; -import com.hbm.handler.BulletConfiguration; -import com.hbm.handler.GunConfiguration; import com.hbm.items.ModItems; -import com.hbm.items.weapon.ItemGunBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; @@ -16,52 +11,19 @@ public class ItemAmmoContainer extends Item { - public static final List configBlacklist = new ArrayList(); - public ItemAmmoContainer() { - this.setMaxDamage(1); - - configBlacklist.add(BulletConfigSyncingUtil.SCHRABIDIUM_REVOLVER); + this.setMaxStackSize(1); } @Override public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) { - - for(ItemStack slot : player.inventory.mainInventory) { - - if(slot == null || !(slot.getItem() instanceof ItemGunBase)) continue; - List cfgs = new ArrayList(); - ItemGunBase gun = (ItemGunBase) slot.getItem(); - if(gun.mainConfig != null) cfgs.add(gun.mainConfig); - if(gun.altConfig != null) cfgs.add(gun.altConfig); - - for(GunConfiguration cfg : cfgs) { - if(cfg.config.isEmpty()) continue; - Integer first = cfg.config.get(0); - if(configBlacklist.contains(first)) continue; - BulletConfiguration bullet = BulletConfigSyncingUtil.pullConfig(first); - if(bullet == null) continue; - if(bullet.ammo == null) continue; - - ItemStack ammo = bullet.ammo.toStack(); - //for belt-fed guns: 64 is main config, 1 if alt config - //for reloaded guns: mag capacity divided by reload amount (equals one stack) - ammo.stackSize = cfg.reloadType == cfg.RELOAD_NONE ? cfg == gun.mainConfig ? 64 : 1 : (int) Math.ceil((double) cfg.ammoCap / (double) bullet.ammoCount); - player.inventory.addItemStackToInventory(ammo); - } - } - - stack.stackSize--; - if(stack.stackSize <= 0) - stack.damageItem(5, player); - return stack; } @Override public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) { if(this == ModItems.ammo_container) { - list.add("Gives ammo for most held weapons."); + list.add("to be implemented :P"); } } } diff --git a/src/main/java/com/hbm/items/weapon/ItemAmmo.java b/src/main/java/com/hbm/items/weapon/ItemAmmo.java index 4c4000f78e..a887e20b8b 100644 --- a/src/main/java/com/hbm/items/weapon/ItemAmmo.java +++ b/src/main/java/com/hbm/items/weapon/ItemAmmo.java @@ -6,10 +6,8 @@ import java.util.Locale; import java.util.Set; -import com.hbm.items.ItemAmmoEnums.AmmoRocket; import com.hbm.items.ItemAmmoEnums.IAmmoItemEnum; import com.hbm.items.ItemEnumMulti; -import com.hbm.items.ModItems; import com.hbm.lib.RefStrings; import com.hbm.util.EnumUtil; import com.hbm.util.I18nUtil; @@ -130,10 +128,6 @@ public void addInformation(ItemStack stack, EntityPlayer player, List list, bool super.addInformation(stack, player, list, ext); if(!altName.isEmpty()) list.add(EnumChatFormatting.ITALIC + I18nUtil.resolveKey(altName)); - - if(stack.getItem() == ModItems.ammo_rocket && stack.getItemDamage() == AmmoRocket.DIGAMMA.ordinal()) { - list.add(player.worldObj.rand.nextInt(3) < 2 ? EnumChatFormatting.RED + "COVER YOURSELF IN OIL" : EnumChatFormatting.RED + "" + EnumChatFormatting.OBFUSCATED + "COVER YOURSELF IN OIL"); - } IAmmoItemEnum item = (IAmmoItemEnum) EnumUtil.grabEnumSafely(theEnum, stack.getItemDamage()); Set ammoTraits = item.getTraits(); diff --git a/src/main/java/com/hbm/items/weapon/sedna/BulletConfig.java b/src/main/java/com/hbm/items/weapon/sedna/BulletConfig.java index 5336620ed6..865b4e598c 100644 --- a/src/main/java/com/hbm/items/weapon/sedna/BulletConfig.java +++ b/src/main/java/com/hbm/items/weapon/sedna/BulletConfig.java @@ -19,8 +19,6 @@ import com.hbm.util.EntityDamageUtil; import com.hbm.util.TrackerUtil; -import api.hbm.block.IFuckingExplode; - import com.hbm.util.DamageResistanceHandler.DamageClass; import net.minecraft.block.Block; @@ -56,7 +54,7 @@ public class BulletConfig implements Cloneable { public float armorThresholdNegation = 0.0F; public float armorPiercingPercent = 0.0F; public float knockbackMult = 0.1F; - public float headshotMult = 1.0F; + public float headshotMult = 1.25F; public DamageClass dmgClass = DamageClass.PHYSICAL; @@ -218,16 +216,25 @@ public static DamageSource getDamage(Entity projectile, EntityLivingBase shooter if(entity instanceof EntityLivingBase && ((EntityLivingBase) entity).getHealth() <= 0) return; DamageSource source = bullet.config.getDamage(bullet, bullet.getThrower(), bullet.config.dmgClass); + float intendedDamage = bullet.damage; if(!(entity instanceof EntityLivingBase)) { EntityDamageUtil.attackEntityFromIgnoreIFrame(entity, source, bullet.damage); return; + } else if(bullet.config.headshotMult > 1F) { + + EntityLivingBase living = (EntityLivingBase) entity; + double head = living.height - living.getEyeHeight(); + + if(!!living.isEntityAlive() && mop.hitVec != null && mop.hitVec.yCoord > (living.posY + living.height - head * 2)) { + intendedDamage *= bullet.config.headshotMult; + } } EntityLivingBase living = (EntityLivingBase) entity; float prevHealth = living.getHealth(); - EntityDamageUtil.attackEntityFromNT(living, source, bullet.damage, true, true, bullet.config.knockbackMult, bullet.config.armorThresholdNegation, bullet.config.armorPiercingPercent); + EntityDamageUtil.attackEntityFromNT(living, source, intendedDamage, true, true, bullet.config.knockbackMult, bullet.config.armorThresholdNegation, bullet.config.armorPiercingPercent); float newHealth = living.getHealth(); diff --git a/src/main/java/com/hbm/items/weapon/sedna/factory/GunFactory.java b/src/main/java/com/hbm/items/weapon/sedna/factory/GunFactory.java index 757a1e9381..60843d172b 100644 --- a/src/main/java/com/hbm/items/weapon/sedna/factory/GunFactory.java +++ b/src/main/java/com/hbm/items/weapon/sedna/factory/GunFactory.java @@ -19,7 +19,6 @@ public class GunFactory { public static BulletConfig ammo_debug; - public static BulletConfig ammo_debug_buckshot; public static SpentCasing CASING44 = new SpentCasing(CasingType.STRAIGHT).setScale(1.5F, 1.0F, 1.5F).setBounceMotion(0.01F, 0.05F).setColor(SpentCasing.COLOR_CASE_44); @@ -32,14 +31,13 @@ public static void init() { /// BULLLET CFGS /// ammo_debug = new BulletConfig().setItem(ModItems.ammo_debug).setSpread(0.01F).setRicochetAngle(45).setCasing(CASING44.clone().register("DEBUG0")); - ammo_debug_buckshot = new BulletConfig().setItem(ModItems.ammo_12gauge).setSpread(0.1F).setRicochetAngle(45).setProjectiles(6, 6).setCasing(CASING44.clone().register("DEBUG1")); /// GUNS /// ModItems.gun_debug = new ItemGunBaseNT(WeaponQuality.DEBUG, new GunConfig() .dura(600F).draw(15).inspect(23).crosshair(Crosshair.L_CLASSIC).smoke(Lego.LAMBDA_STANDARD_SMOKE).orchestra(Orchestras.DEBUG_ORCHESTRA) .rec(new Receiver(0) .dmg(10F).delay(14).reload(46).jam(23).sound("hbm:weapon.44Shoot", 1.0F, 1.0F) - .mag(new MagazineFullReload(0, 12).addConfigs(ammo_debug, ammo_debug_buckshot)) + .mag(new MagazineFullReload(0, 12).addConfigs(ammo_debug)) .offset(0.75, -0.0625, -0.3125D) .canFire(Lego.LAMBDA_STANDARD_CAN_FIRE).fire(Lego.LAMBDA_STANDARD_FIRE)) .pp(Lego.LAMBDA_STANDARD_CLICK_PRIMARY).pr(Lego.LAMBDA_STANDARD_RELOAD).pt(Lego.LAMBDA_TOGGLE_AIM) diff --git a/src/main/java/com/hbm/items/weapon/sedna/factory/GunFactoryClient.java b/src/main/java/com/hbm/items/weapon/sedna/factory/GunFactoryClient.java index d2377a9dda..0dd1fa3342 100644 --- a/src/main/java/com/hbm/items/weapon/sedna/factory/GunFactoryClient.java +++ b/src/main/java/com/hbm/items/weapon/sedna/factory/GunFactoryClient.java @@ -82,7 +82,6 @@ public static void init() { MinecraftForgeClient.registerItemRenderer(ModItems.gun_folly, new ItemRenderFolly()); //PROJECTILES ammo_debug.setRenderer(LegoClient.RENDER_STANDARD_BULLET); - ammo_debug_buckshot.setRenderer(LegoClient.RENDER_STANDARD_BULLET); stone.setRenderer(LegoClient.RENDER_STANDARD_BULLET); flint.setRenderer(LegoClient.RENDER_STANDARD_BULLET); diff --git a/src/main/java/com/hbm/items/weapon/sedna/factory/XFactory12ga.java b/src/main/java/com/hbm/items/weapon/sedna/factory/XFactory12ga.java index b1aa0cf248..9072cc46d8 100644 --- a/src/main/java/com/hbm/items/weapon/sedna/factory/XFactory12ga.java +++ b/src/main/java/com/hbm/items/weapon/sedna/factory/XFactory12ga.java @@ -68,7 +68,7 @@ public static void init() { g12_bp_magnum = new BulletConfig().setItem(EnumAmmo.G12_BP_MAGNUM).setBlackPowder(true).setProjectiles(4).setDamage(0.5F/4F).setSpread(0.05F).setRicochetAngle(25).setCasing(new SpentCasing(CasingType.SHOTGUN).setColor(SpentCasing.COLOR_CASE_BRASS, SpentCasing.COLOR_CASE_BRASS).setScale(0.75F).register("12GA_BP_MAGNUM")); g12_bp_slug = new BulletConfig().setItem(EnumAmmo.G12_BP_SLUG).setBlackPowder(true).setDamage(0.5F).setSpread(0.01F).setRicochetAngle(5).setCasing(new SpentCasing(CasingType.SHOTGUN).setColor(SpentCasing.COLOR_CASE_BRASS, SpentCasing.COLOR_CASE_BRASS).setScale(0.75F).register("12GA_BP_SLUG")); g12 = new BulletConfig().setItem(EnumAmmo.G12).setProjectiles(8).setDamage(1F/8F).setSpread(0.05F).setRicochetAngle(15).setThresholdNegation(2F).setCasing(new SpentCasing(CasingType.SHOTGUN).setColor(0xB52B2B, SpentCasing.COLOR_CASE_BRASS).setScale(0.75F).register("12GA")); - g12_slug = new BulletConfig().setItem(EnumAmmo.G12_SLUG).setSpread(0.0F).setRicochetAngle(25).setThresholdNegation(4F).setArmorPiercing(0.15F).setCasing(new SpentCasing(CasingType.SHOTGUN).setColor(0x393939, SpentCasing.COLOR_CASE_BRASS).setScale(0.75F).register("12GA_SLUG")); + g12_slug = new BulletConfig().setItem(EnumAmmo.G12_SLUG).setHeadshot(1.5F).setSpread(0.0F).setRicochetAngle(25).setThresholdNegation(4F).setArmorPiercing(0.15F).setCasing(new SpentCasing(CasingType.SHOTGUN).setColor(0x393939, SpentCasing.COLOR_CASE_BRASS).setScale(0.75F).register("12GA_SLUG")); g12_flechette = new BulletConfig().setItem(EnumAmmo.G12_FLECHETTE).setProjectiles(8).setDamage(1F/8F).setThresholdNegation(5F).setThresholdNegation(3F).setArmorPiercing(0.2F).setSpread(0.025F).setRicochetAngle(5).setCasing(new SpentCasing(CasingType.SHOTGUN).setColor(0x3C80F0, SpentCasing.COLOR_CASE_BRASS).setScale(0.75F).register("12GA_FLECHETTE")); g12_magnum = new BulletConfig().setItem(EnumAmmo.G12_MAGNUM).setProjectiles(4).setDamage(2F/4F).setSpread(0.015F).setRicochetAngle(15).setThresholdNegation(4F).setCasing(new SpentCasing(CasingType.SHOTGUN).setColor(0x278400, SpentCasing.COLOR_CASE_12GA).setScale(0.75F).register("12GA_MAGNUM")); g12_explosive = new BulletConfig().setItem(EnumAmmo.G12_EXPLOSIVE).setDamage(2.5F).setOnImpact(LAMBDA_STANDARD_EXPLODE).setSpread(0F).setRicochetAngle(15).setCasing(new SpentCasing(CasingType.SHOTGUN).setColor(0xDA4127, SpentCasing.COLOR_CASE_12GA).setScale(0.75F).register("12GA_EXPLOSIVE")); diff --git a/src/main/java/com/hbm/items/weapon/sedna/factory/XFactory22lr.java b/src/main/java/com/hbm/items/weapon/sedna/factory/XFactory22lr.java index 9055e7eed8..78c3fa8ca0 100644 --- a/src/main/java/com/hbm/items/weapon/sedna/factory/XFactory22lr.java +++ b/src/main/java/com/hbm/items/weapon/sedna/factory/XFactory22lr.java @@ -37,7 +37,7 @@ public static void init() { .setCasing(casing22.clone().register("p22")); p22_fmj = new BulletConfig().setItem(EnumAmmo.P22_FMJ).setKnockback(0F).setDamage(0.8F).setThresholdNegation(1F).setArmorPiercing(0.1F) .setCasing(casing22.clone().register("p22fmj")); - p22_jhp = new BulletConfig().setItem(EnumAmmo.P22_JHP).setKnockback(0F).setDamage(1.5F).setArmorPiercing(-0.25F) + p22_jhp = new BulletConfig().setItem(EnumAmmo.P22_JHP).setKnockback(0F).setDamage(1.5F).setHeadshot(1.5F).setArmorPiercing(-0.25F) .setCasing(casing22.clone().register("p22jhp")); p22_ap = new BulletConfig().setItem(EnumAmmo.P22_AP).setKnockback(0F).setDoesPenetrate(true).setDamageFalloutByPen(false).setDamage(1.5F).setThresholdNegation(2.5F).setArmorPiercing(0.15F) .setCasing(casing22.clone().setColor(SpentCasing.COLOR_CASE_44).register("p22ap")); diff --git a/src/main/java/com/hbm/items/weapon/sedna/factory/XFactory357.java b/src/main/java/com/hbm/items/weapon/sedna/factory/XFactory357.java index c59cb42d86..ee5846c7aa 100644 --- a/src/main/java/com/hbm/items/weapon/sedna/factory/XFactory357.java +++ b/src/main/java/com/hbm/items/weapon/sedna/factory/XFactory357.java @@ -33,7 +33,7 @@ public static void init() { m357_bp = new BulletConfig().setItem(EnumAmmo.M357_BP).setDamage(0.5F).setBlackPowder(true); m357_sp = new BulletConfig().setItem(EnumAmmo.M357_SP); m357_fmj = new BulletConfig().setItem(EnumAmmo.M357_FMJ).setDamage(0.8F).setThresholdNegation(2F).setArmorPiercing(0.1F); - m357_jhp = new BulletConfig().setItem(EnumAmmo.M357_JHP).setDamage(1.5F).setArmorPiercing(-0.25F); + m357_jhp = new BulletConfig().setItem(EnumAmmo.M357_JHP).setDamage(1.5F).setHeadshot(1.5F).setArmorPiercing(-0.25F); m357_ap = new BulletConfig().setItem(EnumAmmo.M357_AP).setDoesPenetrate(true).setDamageFalloutByPen(false).setDamage(1.5F).setThresholdNegation(5F).setArmorPiercing(0.15F); m357_express = new BulletConfig().setItem(EnumAmmo.M357_EXPRESS).setDoesPenetrate(true).setDamage(1.5F).setThresholdNegation(2F).setArmorPiercing(0.1F).setWear(1.5F); diff --git a/src/main/java/com/hbm/items/weapon/sedna/factory/XFactory44.java b/src/main/java/com/hbm/items/weapon/sedna/factory/XFactory44.java index 7cc8d57ec8..c7ca8f24a2 100644 --- a/src/main/java/com/hbm/items/weapon/sedna/factory/XFactory44.java +++ b/src/main/java/com/hbm/items/weapon/sedna/factory/XFactory44.java @@ -72,7 +72,7 @@ public static void init() { .setCasing(casing44.clone().register("m44")); m44_fmj = new BulletConfig().setItem(EnumAmmo.M44_FMJ).setDamage(0.8F).setThresholdNegation(3F).setArmorPiercing(0.1F) .setCasing(casing44.clone().register("m44fmj")); - m44_jhp = new BulletConfig().setItem(EnumAmmo.M44_JHP).setDamage(1.5F).setArmorPiercing(-0.25F) + m44_jhp = new BulletConfig().setItem(EnumAmmo.M44_JHP).setDamage(1.5F).setHeadshot(1.5F).setArmorPiercing(-0.25F) .setCasing(casing44.clone().register("m44jhp")); m44_ap = new BulletConfig().setItem(EnumAmmo.M44_AP).setDoesPenetrate(true).setDamageFalloutByPen(false).setDamage(1.5F).setThresholdNegation(7.5F).setArmorPiercing(0.15F) .setCasing(casing44.clone().setColor(SpentCasing.COLOR_CASE_44).register("m44ap")); diff --git a/src/main/java/com/hbm/items/weapon/sedna/factory/XFactory50.java b/src/main/java/com/hbm/items/weapon/sedna/factory/XFactory50.java index 60d12e163a..1a168715fd 100644 --- a/src/main/java/com/hbm/items/weapon/sedna/factory/XFactory50.java +++ b/src/main/java/com/hbm/items/weapon/sedna/factory/XFactory50.java @@ -36,7 +36,7 @@ public static void init() { .setCasing(casing762.clone().register("bmg50")); bmg50_fmj = new BulletConfig().setItem(EnumAmmo.BMG50_FMJ).setDamage(0.8F).setThresholdNegation(7F).setArmorPiercing(0.1F) .setCasing(casing762.clone().register("bmg50fmj")); - bmg50_jhp = new BulletConfig().setItem(EnumAmmo.BMG50_JHP).setDamage(1.5F).setArmorPiercing(-0.25F) + bmg50_jhp = new BulletConfig().setItem(EnumAmmo.BMG50_JHP).setDamage(1.5F).setHeadshot(1.5F).setArmorPiercing(-0.25F) .setCasing(casing762.clone().register("bmg50jhp")); bmg50_ap = new BulletConfig().setItem(EnumAmmo.BMG50_AP).setDoesPenetrate(true).setDamageFalloutByPen(false).setDamage(1.5F).setThresholdNegation(17.5F).setArmorPiercing(0.15F) .setCasing(casing762.clone().setColor(SpentCasing.COLOR_CASE_44).register("bmg50ap")); diff --git a/src/main/java/com/hbm/items/weapon/sedna/factory/XFactory556mm.java b/src/main/java/com/hbm/items/weapon/sedna/factory/XFactory556mm.java index f84d10c1cf..c87554f38f 100644 --- a/src/main/java/com/hbm/items/weapon/sedna/factory/XFactory556mm.java +++ b/src/main/java/com/hbm/items/weapon/sedna/factory/XFactory556mm.java @@ -43,7 +43,7 @@ public static void init() { .setCasing(casing556.clone().register("r556")); r556_fmj = new BulletConfig().setItem(EnumAmmo.R556_FMJ).setDamage(0.8F).setThresholdNegation(4F).setArmorPiercing(0.1F) .setCasing(casing556.clone().register("r556fmj")); - r556_jhp = new BulletConfig().setItem(EnumAmmo.R556_JHP).setDamage(1.5F).setArmorPiercing(-0.25F) + r556_jhp = new BulletConfig().setItem(EnumAmmo.R556_JHP).setDamage(1.5F).setHeadshot(1.5F).setArmorPiercing(-0.25F) .setCasing(casing556.clone().register("r556jhp")); r556_ap = new BulletConfig().setItem(EnumAmmo.R556_AP).setDoesPenetrate(true).setDamageFalloutByPen(false).setDamage(1.5F).setThresholdNegation(10F).setArmorPiercing(0.15F) .setCasing(casing556.clone().setColor(SpentCasing.COLOR_CASE_44).register("r556ap")); diff --git a/src/main/java/com/hbm/items/weapon/sedna/factory/XFactory762mm.java b/src/main/java/com/hbm/items/weapon/sedna/factory/XFactory762mm.java index 95ae894330..44bfa4c8dc 100644 --- a/src/main/java/com/hbm/items/weapon/sedna/factory/XFactory762mm.java +++ b/src/main/java/com/hbm/items/weapon/sedna/factory/XFactory762mm.java @@ -43,7 +43,7 @@ public static void init() { .setCasing(casing762.clone().register("r762")); r762_fmj = new BulletConfig().setItem(EnumAmmo.R762_FMJ).setDamage(0.8F).setThresholdNegation(5F).setArmorPiercing(0.1F) .setCasing(casing762.clone().register("r762fmj")); - r762_jhp = new BulletConfig().setItem(EnumAmmo.R762_JHP).setDamage(1.5F).setArmorPiercing(-0.25F) + r762_jhp = new BulletConfig().setItem(EnumAmmo.R762_JHP).setDamage(1.5F).setHeadshot(1.5F).setArmorPiercing(-0.25F) .setCasing(casing762.clone().register("r762jhp")); r762_ap = new BulletConfig().setItem(EnumAmmo.R762_AP).setDoesPenetrate(true).setDamageFalloutByPen(false).setDamage(1.5F).setThresholdNegation(12.5F).setArmorPiercing(0.15F) .setCasing(casing762.clone().setColor(SpentCasing.COLOR_CASE_44).register("r762ap")); diff --git a/src/main/java/com/hbm/items/weapon/sedna/factory/XFactory9mm.java b/src/main/java/com/hbm/items/weapon/sedna/factory/XFactory9mm.java index 36fd8780d2..9b844ab844 100644 --- a/src/main/java/com/hbm/items/weapon/sedna/factory/XFactory9mm.java +++ b/src/main/java/com/hbm/items/weapon/sedna/factory/XFactory9mm.java @@ -38,7 +38,7 @@ public static void init() { .setCasing(casing9.clone().register("p9")); p9_fmj = new BulletConfig().setItem(EnumAmmo.P9_FMJ).setDamage(0.8F).setThresholdNegation(2F).setArmorPiercing(0.1F) .setCasing(casing9.clone().register("p9fmj")); - p9_jhp = new BulletConfig().setItem(EnumAmmo.P9_JHP).setDamage(1.5F).setArmorPiercing(-0.25F) + p9_jhp = new BulletConfig().setItem(EnumAmmo.P9_JHP).setDamage(1.5F).setHeadshot(1.5F).setArmorPiercing(-0.25F) .setCasing(casing9.clone().register("p9jhp")); p9_ap = new BulletConfig().setItem(EnumAmmo.P9_AP).setDoesPenetrate(true).setDamageFalloutByPen(false).setDamage(1.5F).setThresholdNegation(5F).setArmorPiercing(0.15F) .setCasing(casing9.clone().setColor(SpentCasing.COLOR_CASE_44).register("p9ap")); diff --git a/src/main/java/com/hbm/items/weapon/sedna/factory/XFactoryFlamer.java b/src/main/java/com/hbm/items/weapon/sedna/factory/XFactoryFlamer.java index 57828b6ad0..a697c2f103 100644 --- a/src/main/java/com/hbm/items/weapon/sedna/factory/XFactoryFlamer.java +++ b/src/main/java/com/hbm/items/weapon/sedna/factory/XFactoryFlamer.java @@ -40,6 +40,8 @@ public class XFactoryFlamer { + public static BulletConfig flame_nograv; + public static BulletConfig flame_diesel; public static BulletConfig flame_gas; public static BulletConfig flame_napalm; @@ -117,6 +119,8 @@ public static void init() { flame_balefire = new BulletConfig().setItem(EnumAmmo.FLAME_BALEFIRE).setupDamageClass(DamageClass.FIRE).setLife(200).setVel(1F).setGrav(0.02D).setReloadCount(500).setSelfDamageDelay(20).setKnockback(0F) .setOnUpdate(LAMBDA_BALEFIRE).setOnRicochet(LAMBDA_LINGER_BALEFIRE); + flame_nograv = flame_diesel.clone().setGrav(0); + flame_topaz_diesel = flame_diesel .clone().setProjectiles(2).setSpread(0.05F).setLife(60).setGrav(0.0D); flame_topaz_gas = flame_gas .clone().setProjectiles(2).setSpread(0.05F); flame_topaz_napalm = flame_napalm .clone().setProjectiles(2).setSpread(0.05F).setLife(60).setGrav(0.0D); diff --git a/src/main/java/com/hbm/lib/HbmCollection.java b/src/main/java/com/hbm/lib/HbmCollection.java index 6c2e7df233..86a7f0fa4b 100644 --- a/src/main/java/com/hbm/lib/HbmCollection.java +++ b/src/main/java/com/hbm/lib/HbmCollection.java @@ -1,79 +1,7 @@ package com.hbm.lib; -import java.util.List; -import java.util.Set; - -import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableSet; -import com.hbm.handler.BulletConfigSyncingUtil; -import com.hbm.items.weapon.ItemAmmo.AmmoItemTrait; - public class HbmCollection { - public static final Set APType = ImmutableSet.of(AmmoItemTrait.PRO_DAMAGE, AmmoItemTrait.CON_WEAR); - public static final Set FlechetteType = ImmutableSet.of(AmmoItemTrait.PRO_DAMAGE, AmmoItemTrait.NEU_LESS_BOUNCY, AmmoItemTrait.CON_WEAR); - public static final Set IncendiaryType = ImmutableSet.of(AmmoItemTrait.PRO_INCENDIARY, AmmoItemTrait.CON_WEAR); - public static final Set PhosphorusType = ImmutableSet.of(AmmoItemTrait.PRO_PHOSPHORUS, AmmoItemTrait.NEU_WARCRIME1, AmmoItemTrait.CON_WEAR, AmmoItemTrait.CON_PENETRATION); - public static final Set PhosphorusTypeSpecial = ImmutableSet.of(AmmoItemTrait.PRO_PHOSPHORUS_SPLASH, AmmoItemTrait.NEU_WARCRIME1, AmmoItemTrait.CON_WEAR); - public static final Set ExplosiveType = ImmutableSet.of(AmmoItemTrait.PRO_EXPLOSIVE, AmmoItemTrait.PRO_DAMAGE, AmmoItemTrait.CON_HEAVY_WEAR); - public static final Set DUType = ImmutableSet.of(AmmoItemTrait.PRO_HEAVY_DAMAGE, AmmoItemTrait.NEU_HEAVY_METAL, AmmoItemTrait.CON_HEAVY_WEAR); - public static final Set StarmetalType = ImmutableSet.of(AmmoItemTrait.PRO_HEAVY_DAMAGE, AmmoItemTrait.NEU_STARMETAL, AmmoItemTrait.CON_HEAVY_WEAR); - public static final Set ChlorophyteType = ImmutableSet.of(AmmoItemTrait.PRO_DAMAGE, AmmoItemTrait.PRO_WEAR, AmmoItemTrait.PRO_PENETRATION, AmmoItemTrait.NEU_CHLOROPHYTE, AmmoItemTrait.NEU_HOMING, AmmoItemTrait.CON_SPEED); - - /// BULLET COLLECTIONS - // SHOTGUNS - /** 12 GAUGE **/ - public static final List g12 = ImmutableList.of(BulletConfigSyncingUtil.G12_NORMAL, BulletConfigSyncingUtil.G12_INCENDIARY, BulletConfigSyncingUtil.G12_SHRAPNEL, BulletConfigSyncingUtil.G12_DU, BulletConfigSyncingUtil.G12_AM, BulletConfigSyncingUtil.G12_SLEEK, BulletConfigSyncingUtil.G12_PERCUSSION); - public static final List g12hs = ImmutableList.of(BulletConfigSyncingUtil.G12HS_NORMAL, BulletConfigSyncingUtil.G12HS_INCENDIARY, BulletConfigSyncingUtil.G12HS_SHRAPNEL, BulletConfigSyncingUtil.G12HS_DU, BulletConfigSyncingUtil.G12HS_AM, BulletConfigSyncingUtil.G12HS_SLEEK, BulletConfigSyncingUtil.G12HS_PERCUSSION); - /** 20 GAUGE **/ - public static final List g20 = ImmutableList.of(BulletConfigSyncingUtil.G20_NORMAL, BulletConfigSyncingUtil.G20_SLUG, BulletConfigSyncingUtil.G20_FLECHETTE, BulletConfigSyncingUtil.G20_FIRE, BulletConfigSyncingUtil.G20_SHRAPNEL, BulletConfigSyncingUtil.G20_EXPLOSIVE, BulletConfigSyncingUtil.G20_CAUSTIC, BulletConfigSyncingUtil.G20_SHOCK, BulletConfigSyncingUtil.G20_WITHER, BulletConfigSyncingUtil.G20_SLEEK); - /** 4 GAUGE **/ - public static final List g4 = ImmutableList.of(BulletConfigSyncingUtil.G4_NORMAL, BulletConfigSyncingUtil.G4_SLUG, BulletConfigSyncingUtil.G4_FLECHETTE, BulletConfigSyncingUtil.G4_FLECHETTE_PHOSPHORUS, BulletConfigSyncingUtil.G4_EXPLOSIVE, BulletConfigSyncingUtil.G4_SEMTEX, BulletConfigSyncingUtil.G4_BALEFIRE, BulletConfigSyncingUtil.G4_KAMPF, BulletConfigSyncingUtil.G4_CANISTER, BulletConfigSyncingUtil.G4_CLAW, BulletConfigSyncingUtil.G4_VAMPIRE, BulletConfigSyncingUtil.G4_VOID, BulletConfigSyncingUtil.G4_TITAN, BulletConfigSyncingUtil.G4_SLEEK); - // PISTOL CALIBER - /** .22 LONG RIFLE **/ - public static final List lr22 = ImmutableList.of(BulletConfigSyncingUtil.LR22_NORMAL, BulletConfigSyncingUtil.LR22_AP, BulletConfigSyncingUtil.CHL_LR22); - public static final List lr22Inc = ImmutableList.of(BulletConfigSyncingUtil.LR22_NORMAL_FIRE, BulletConfigSyncingUtil.LR22_AP_FIRE, BulletConfigSyncingUtil.CHL_LR22_FIRE); - /** .44 MAGNUM (BASIC) **/ - public static final List m44Normal = ImmutableList.of(BulletConfigSyncingUtil.M44_NORMAL, BulletConfigSyncingUtil.M44_AP, BulletConfigSyncingUtil.M44_DU, BulletConfigSyncingUtil.M44_PHOSPHORUS, BulletConfigSyncingUtil.M44_STAR, BulletConfigSyncingUtil.CHL_M44, BulletConfigSyncingUtil.M44_ROCKET); - /** .44 MAGNUM (ALL) **/ - public static final List m44All = ImmutableList.of(BulletConfigSyncingUtil.M44_NORMAL, BulletConfigSyncingUtil.M44_AP, BulletConfigSyncingUtil.M44_DU, BulletConfigSyncingUtil.M44_PHOSPHORUS, BulletConfigSyncingUtil.M44_STAR, BulletConfigSyncingUtil.CHL_M44, BulletConfigSyncingUtil.M44_ROCKET, BulletConfigSyncingUtil.M44_PIP, BulletConfigSyncingUtil.M44_BJ, BulletConfigSyncingUtil.M44_SILVER); - /** .50 ACTION EXPRESS **/ - public static final List ae50 = ImmutableList.of(BulletConfigSyncingUtil.AE50_NORMAL, BulletConfigSyncingUtil.AE50_AP, BulletConfigSyncingUtil.AE50_DU, BulletConfigSyncingUtil.AE50_STAR, BulletConfigSyncingUtil.CHL_AE50); - /** 9MM Parabellum **/ - public static final List p9 = ImmutableList.of(BulletConfigSyncingUtil.P9_NORMAL, BulletConfigSyncingUtil.P9_AP, BulletConfigSyncingUtil.P9_DU, BulletConfigSyncingUtil.CHL_P9, BulletConfigSyncingUtil.P9_ROCKET); - /** .45 AUTOMATIC COLT PISTOL **/ - public static final List acp45 = ImmutableList.of(BulletConfigSyncingUtil.ACP_45, BulletConfigSyncingUtil.ACP_45_AP, BulletConfigSyncingUtil.ACP_45_DU); - // RIFLE CALIBER - /** .50 BROWNING MACHINE GUN **/ - public static final List bmg50 = ImmutableList.of(BulletConfigSyncingUtil.BMG50_NORMAL, BulletConfigSyncingUtil.BMG50_INCENDIARY, BulletConfigSyncingUtil.BMG50_PHOSPHORUS, BulletConfigSyncingUtil.BMG50_EXPLOSIVE, BulletConfigSyncingUtil.BMG50_AP, BulletConfigSyncingUtil.BMG50_DU, BulletConfigSyncingUtil.BMG50_STAR, BulletConfigSyncingUtil.CHL_BMG50, BulletConfigSyncingUtil.BMG50_SLEEK); - /** .50 BROWNING MACHINE GUN (FLECHETTE) **/ - public static final List bmg50Flechette = ImmutableList.of(BulletConfigSyncingUtil.BMG50_FLECHETTE_AM, BulletConfigSyncingUtil.BMG50_FLECHETTE_NORMAL, BulletConfigSyncingUtil.BMG50_FLECHETTE_PO); - /** 5.56MMx45 NATO (BASIC) **/ - public static final List r556 = ImmutableList.of(BulletConfigSyncingUtil.R556_NORMAL, BulletConfigSyncingUtil.R556_TRACER, BulletConfigSyncingUtil.R556_PHOSPHORUS, BulletConfigSyncingUtil.R556_AP, BulletConfigSyncingUtil.R556_DU, BulletConfigSyncingUtil.R556_STAR, BulletConfigSyncingUtil.CHL_R556, BulletConfigSyncingUtil.R556_SLEEK, BulletConfigSyncingUtil.R556_K, BulletConfigSyncingUtil.R556_GOLD); - /** 5.56MMx45 NATO (FLECHETTE) **/ - public static final List r556Flechette = ImmutableList.of(BulletConfigSyncingUtil.R556_FLECHETTE, BulletConfigSyncingUtil.R556_FLECHETTE_INCENDIARY, BulletConfigSyncingUtil.R556_FLECHETTE_PHOSPHORUS, BulletConfigSyncingUtil.R556_FLECHETTE_DU, BulletConfigSyncingUtil.CHL_R556_FLECHETTE, BulletConfigSyncingUtil.R556_FLECHETTE_SLEEK, BulletConfigSyncingUtil.R556_K); - /** 7.62x51mm NATO **/ - public static final List r762 = ImmutableList.of(BulletConfigSyncingUtil.R762_NORMAL, BulletConfigSyncingUtil.R762_PHOSPHORUS, BulletConfigSyncingUtil.R762_AP, BulletConfigSyncingUtil.R762_DU, BulletConfigSyncingUtil.R762_TRACER, BulletConfigSyncingUtil.R762_K); - /** 5MM **/ - public static final List r5 = ImmutableList.of(BulletConfigSyncingUtil.R5_NORMAL, BulletConfigSyncingUtil.R5_EXPLOSIVE, BulletConfigSyncingUtil.R5_DU, BulletConfigSyncingUtil.R5_STAR, BulletConfigSyncingUtil.CHL_R5); - /** 5MM LACUNAE **/ - public static final List r5Bolt = ImmutableList.of(BulletConfigSyncingUtil.R5_NORMAL_BOLT, BulletConfigSyncingUtil.R5_EXPLOSIVE_BOLT, BulletConfigSyncingUtil.R5_DU_BOLT, BulletConfigSyncingUtil.R5_STAR_BOLT, BulletConfigSyncingUtil.CHL_R5_BOLT); - // MISC - /** .75 **/ - public static final List b75 = ImmutableList.of(BulletConfigSyncingUtil.B75_NORMAL, BulletConfigSyncingUtil.B75_INCENDIARY, BulletConfigSyncingUtil.B75_HE); - /** 240MM SHELL **/ - public static final List cannon = ImmutableList.of(BulletConfigSyncingUtil.SHELL_NORMAL, BulletConfigSyncingUtil.SHELL_EXPLOSIVE, BulletConfigSyncingUtil.SHELL_AP, BulletConfigSyncingUtil.SHELL_DU, BulletConfigSyncingUtil.SHELL_W9); - /** FLAMETHROWER FUEL **/ - public static final List flamer = ImmutableList.of(BulletConfigSyncingUtil.FLAMER_NORMAL, BulletConfigSyncingUtil.FLAMER_NAPALM, BulletConfigSyncingUtil.FLAMER_WP, BulletConfigSyncingUtil.FLAMER_VAPORIZER, BulletConfigSyncingUtil.FLAMER_GAS); - /** MINI-NUKES **/ - public static final List fatman = ImmutableList.of(BulletConfigSyncingUtil.NUKE_NORMAL, BulletConfigSyncingUtil.NUKE_LOW, BulletConfigSyncingUtil.NUKE_HIGH, BulletConfigSyncingUtil.NUKE_TOTS, BulletConfigSyncingUtil.NUKE_SAFE, BulletConfigSyncingUtil.NUKE_PUMPKIN, BulletConfigSyncingUtil.NUKE_BARREL); - /** MIRV MINI-NUKES **/ - public static final List fatmanMIRV = ImmutableList.of(BulletConfigSyncingUtil.NUKE_MIRV_NORMAL, BulletConfigSyncingUtil.NUKE_MIRV_LOW, BulletConfigSyncingUtil.NUKE_MIRV_HIGH, BulletConfigSyncingUtil.NUKE_MIRV_SAFE, BulletConfigSyncingUtil.NUKE_MIRV_SPECIAL); - /** 40MM GRENADE **/ - public static final List grenade = ImmutableList.of(BulletConfigSyncingUtil.GRENADE_NORMAL, BulletConfigSyncingUtil.GRENADE_HE, BulletConfigSyncingUtil.GRENADE_INCENDIARY, BulletConfigSyncingUtil.GRENADE_PHOSPHORUS, BulletConfigSyncingUtil.GRENADE_CHEMICAL, BulletConfigSyncingUtil.GRENADE_CONCUSSION, BulletConfigSyncingUtil.GRENADE_FINNED, BulletConfigSyncingUtil.GRENADE_SLEEK, BulletConfigSyncingUtil.GRENADE_NUCLEAR, BulletConfigSyncingUtil.GRENADE_TRACER, BulletConfigSyncingUtil.GRENADE_KAMPF, BulletConfigSyncingUtil.GRENADE_LEADBURSTER); - /** 84MM ROCKET **/ - public static final List rocket = ImmutableList.of(BulletConfigSyncingUtil.ROCKET_NORMAL, BulletConfigSyncingUtil.ROCKET_HE, BulletConfigSyncingUtil.ROCKET_INCENDIARY, BulletConfigSyncingUtil.ROCKET_PHOSPHORUS, BulletConfigSyncingUtil.ROCKET_SHRAPNEL, BulletConfigSyncingUtil.ROCKET_EMP, BulletConfigSyncingUtil.ROCKET_GLARE, BulletConfigSyncingUtil.ROCKET_TOXIC, BulletConfigSyncingUtil.ROCKET_CANISTER, BulletConfigSyncingUtil.ROCKET_SLEEK, BulletConfigSyncingUtil.ROCKET_NUKE, BulletConfigSyncingUtil.ROCKET_CHAINSAW); - /// FREQUENTLY USED TRANSLATION KEYS // GUN MANUFACTURERS public static enum EnumGunManufacturer { diff --git a/src/main/java/com/hbm/lib/ModDamageSource.java b/src/main/java/com/hbm/lib/ModDamageSource.java index 287385c20a..de2da75ca9 100644 --- a/src/main/java/com/hbm/lib/ModDamageSource.java +++ b/src/main/java/com/hbm/lib/ModDamageSource.java @@ -95,10 +95,6 @@ public static DamageSource euthanized(Entity ent, Entity hit) { return (new EntityDamageSourceIndirect(s_euthanized, ent, hit)).setDamageBypassesArmor(); } - public static DamageSource causeIceDamage(EntityLN2 ent, Entity hit) { - return (new EntityDamageSourceIndirect(s_cryolator, ent, hit)).setDamageBypassesArmor(); - } - public static DamageSource causeLaserDamage(EntityLaserBeam ent, Entity hit) { return (new EntityDamageSourceIndirect(s_laser, ent, hit)).setDamageBypassesArmor(); } diff --git a/src/main/java/com/hbm/lib/RefStrings.java b/src/main/java/com/hbm/lib/RefStrings.java index a960a8925d..deffb48c91 100644 --- a/src/main/java/com/hbm/lib/RefStrings.java +++ b/src/main/java/com/hbm/lib/RefStrings.java @@ -3,7 +3,7 @@ public class RefStrings { public static final String MODID = "hbm"; public static final String NAME = "Hbm's Nuclear Tech Mod"; - public static final String VERSION = "1.0.27 BETA (5180)"; + public static final String VERSION = "1.0.27 BETA (5188)"; //HBM's Beta Naming Convention: //V T (X) //V -> next release version diff --git a/src/main/java/com/hbm/main/ClientProxy.java b/src/main/java/com/hbm/main/ClientProxy.java index 36b899380b..700c2fe2bc 100644 --- a/src/main/java/com/hbm/main/ClientProxy.java +++ b/src/main/java/com/hbm/main/ClientProxy.java @@ -569,7 +569,6 @@ public void registerEntityRenderer() { RenderingRegistry.registerEntityRenderingHandler(EntityExplosiveBeam.class, new RenderBeam5()); RenderingRegistry.registerEntityRenderingHandler(EntityModBeam.class, new RenderBeam6()); RenderingRegistry.registerEntityRenderingHandler(EntitySiegeLaser.class, new RenderSiegeLaser()); - RenderingRegistry.registerEntityRenderingHandler(EntityLN2.class, new RenderLN2(ModItems.nothing)); RenderingRegistry.registerEntityRenderingHandler(EntityBombletZeta.class, new RenderBombletTheta()); RenderingRegistry.registerEntityRenderingHandler(EntityMeteor.class, new RenderMeteor()); RenderingRegistry.registerEntityRenderingHandler(EntityBoxcar.class, new RenderBoxcar()); @@ -754,7 +753,6 @@ public void registerEntityRenderer() { RenderingRegistry.registerEntityRenderingHandler(EntityPigeon.class, new RenderPigeon(new ModelPigeon(), 0.3F)); RenderingRegistry.registerEntityRenderingHandler(EntityDummy.class, new RenderDummy()); //"particles" - RenderingRegistry.registerEntityRenderingHandler(EntityBSmokeFX.class, new MultiCloudRenderer(new Item[] { ModItems.b_smoke1, ModItems.b_smoke2, ModItems.b_smoke3, ModItems.b_smoke4, ModItems.b_smoke5, ModItems.b_smoke6, ModItems.b_smoke7, ModItems.b_smoke8 })); RenderingRegistry.registerEntityRenderingHandler(EntityChlorineFX.class, new MultiCloudRenderer(new Item[] { ModItems.chlorine1, ModItems.chlorine2, ModItems.chlorine3, ModItems.chlorine4, ModItems.chlorine5, ModItems.chlorine6, ModItems.chlorine7, ModItems.chlorine8 })); RenderingRegistry.registerEntityRenderingHandler(EntityPinkCloudFX.class, new MultiCloudRenderer(new Item[] { ModItems.pc1, ModItems.pc2, ModItems.pc3, ModItems.pc4, ModItems.pc5, ModItems.pc6, ModItems.pc7, ModItems.pc8 })); RenderingRegistry.registerEntityRenderingHandler(com.hbm.entity.particle.EntityCloudFX.class, new MultiCloudRenderer(new Item[] { ModItems.cloud1, ModItems.cloud2, ModItems.cloud3, ModItems.cloud4, ModItems.cloud5, ModItems.cloud6, ModItems.cloud7, ModItems.cloud8 })); diff --git a/src/main/java/com/hbm/main/MainRegistry.java b/src/main/java/com/hbm/main/MainRegistry.java index 677dcd0d6b..ca90682d72 100644 --- a/src/main/java/com/hbm/main/MainRegistry.java +++ b/src/main/java/com/hbm/main/MainRegistry.java @@ -1492,6 +1492,126 @@ public void handleMissingMappings(FMLMissingMappingsEvent event) { ignoreMappings.add("hbm:tile.#null"); ignoreMappings.add("hbm:tile.#void"); ignoreMappings.add("hbm:tile.#ngtv"); + ignoreMappings.add("hbm:item.gun_rpg"); + ignoreMappings.add("hbm:item.gun_karl"); + ignoreMappings.add("hbm:item.gun_hk69"); + ignoreMappings.add("hbm:item.gun_skystinger"); + ignoreMappings.add("hbm:item.gun_revolver"); + ignoreMappings.add("hbm:item.gun_revolver_saturnite"); + ignoreMappings.add("hbm:item.gun_revolver_gold"); + ignoreMappings.add("hbm:item.gun_revolver_schrabidium"); + ignoreMappings.add("hbm:item.gun_revolver_cursed"); + ignoreMappings.add("hbm:item.gun_revolver_nightmare"); + ignoreMappings.add("hbm:item.gun_revolver_nightmare2"); + ignoreMappings.add("hbm:item.gun_revolver_pip"); + ignoreMappings.add("hbm:item.gun_revolver_nopip"); + ignoreMappings.add("hbm:item.gun_revolver_blackjack"); + ignoreMappings.add("hbm:item.gun_revolver_silver"); + ignoreMappings.add("hbm:item.gun_revolver_red"); + ignoreMappings.add("hbm:item.gun_bio_revolver"); + ignoreMappings.add("hbm:item.gun_deagle"); + ignoreMappings.add("hbm:item.gun_flechette"); + ignoreMappings.add("hbm:item.gun_ar15"); + ignoreMappings.add("hbm:item.gun_calamity"); + ignoreMappings.add("hbm:item.gun_lacunae"); + ignoreMappings.add("hbm:item.gun_proto"); + ignoreMappings.add("hbm:item.gun_mirv"); + ignoreMappings.add("hbm:item.gun_bf"); + ignoreMappings.add("hbm:item.gun_mp40"); + ignoreMappings.add("hbm:item.gun_thompson"); + ignoreMappings.add("hbm:item.gun_uzi_silencer"); + ignoreMappings.add("hbm:item.gun_uzi_saturnite"); + ignoreMappings.add("hbm:item.gun_uzi_saturnite_silencer"); + ignoreMappings.add("hbm:item.gun_uboinik"); + ignoreMappings.add("hbm:item.gun_remington"); + ignoreMappings.add("hbm:item.gun_supershotgun"); + ignoreMappings.add("hbm:item.gun_benelli"); + ignoreMappings.add("hbm:item.gun_ks23"); + ignoreMappings.add("hbm:item.gun_sauer"); + ignoreMappings.add("hbm:item.gun_lever_action"); + ignoreMappings.add("hbm:item.gun_lever_action_dark"); + ignoreMappings.add("hbm:item.gun_lever_action_sonata"); + ignoreMappings.add("hbm:item.gun_bolt_action"); + ignoreMappings.add("hbm:item.gun_bolt_action_green"); + ignoreMappings.add("hbm:item.gun_bolt_action_saturnite"); + ignoreMappings.add("hbm:item.gun_mymy"); + ignoreMappings.add("hbm:item.gun_b93"); + ignoreMappings.add("hbm:item.gun_xvl1456"); + ignoreMappings.add("hbm:item.gun_xvl1456_ammo"); + ignoreMappings.add("hbm:item.gun_osipr"); + ignoreMappings.add("hbm:item.gun_osipr_ammo"); + ignoreMappings.add("hbm:item.gun_osipr_ammo2"); + ignoreMappings.add("hbm:item.gun_immolator"); + ignoreMappings.add("hbm:item.gun_immolator_ammo"); + ignoreMappings.add("hbm:item.gun_cryolator"); + ignoreMappings.add("hbm:item.gun_mp"); + ignoreMappings.add("hbm:item.gun_bolter_digamma"); + ignoreMappings.add("hbm:item.gun_zomg"); + ignoreMappings.add("hbm:item.gun_super_shotgun"); + ignoreMappings.add("hbm:item.gun_moist_nugget"); + ignoreMappings.add("hbm:item.gun_revolver_inverted"); + ignoreMappings.add("hbm:item.gun_emp"); + ignoreMappings.add("hbm:item.gun_emp_ammo"); + ignoreMappings.add("hbm:item.gun_jack"); + ignoreMappings.add("hbm:item.gun_jack_ammo"); + ignoreMappings.add("hbm:item.gun_spark"); + ignoreMappings.add("hbm:item.gun_spark_ammo"); + ignoreMappings.add("hbm:item.gun_hp"); + ignoreMappings.add("hbm:item.gun_hp_ammo"); + ignoreMappings.add("hbm:item.gun_euthanasia"); + ignoreMappings.add("hbm:item.gun_euthanasia_ammo"); + ignoreMappings.add("hbm:item.gun_defabricator"); + ignoreMappings.add("hbm:item.gun_defabricator_ammo"); + ignoreMappings.add("hbm:item.gun_vortex"); + ignoreMappings.add("hbm:item.gun_waluigi"); + ignoreMappings.add("hbm:item.gun_darter"); + ignoreMappings.add("hbm:item.gun_glass_cannon"); + ignoreMappings.add("hbm:item.gun_lunatic_marksman"); + ignoreMappings.add("hbm:item.gun_uac_pistol"); + ignoreMappings.add("hbm:item.ammo_misc"); + ignoreMappings.add("hbm:item.ammo_12gauge"); + ignoreMappings.add("hbm:item.ammo_20gauge"); + ignoreMappings.add("hbm:item.ammo_4gauge"); + ignoreMappings.add("hbm:item.ammo_357"); + ignoreMappings.add("hbm:item.ammo_44"); + ignoreMappings.add("hbm:item.ammo_5mm"); + ignoreMappings.add("hbm:item.ammo_9mm"); + ignoreMappings.add("hbm:item.ammo_45"); + ignoreMappings.add("hbm:item.ammo_556"); + ignoreMappings.add("hbm:item.ammo_762"); + ignoreMappings.add("hbm:item.ammo_22lr"); + ignoreMappings.add("hbm:item.ammo_50ae"); + ignoreMappings.add("hbm:item.ammo_50bmg"); + ignoreMappings.add("hbm:item.ammo_75bolt"); + ignoreMappings.add("hbm:item.ammo_rocket"); + ignoreMappings.add("hbm:item.ammo_grenade"); + ignoreMappings.add("hbm:item.ammo_shell"); + ignoreMappings.add("hbm:item.ammo_nuke"); + ignoreMappings.add("hbm:item.ammo_fuel"); + ignoreMappings.add("hbm:item.ammo_fireext"); + ignoreMappings.add("hbm:item.ammo_dart"); + ignoreMappings.add("hbm:item.ammo_stinger_rocket"); + ignoreMappings.add("hbm:item.ammo_luna_sniper"); + ignoreMappings.add("hbm:item.ammo_coilgun"); + ignoreMappings.add("hbm:item.ammo_cell"); + ignoreMappings.add("hbm:item.b_smoke1"); + ignoreMappings.add("hbm:item.b_smoke2"); + ignoreMappings.add("hbm:item.b_smoke3"); + ignoreMappings.add("hbm:item.b_smoke4"); + ignoreMappings.add("hbm:item.b_smoke5"); + ignoreMappings.add("hbm:item.b_smoke6"); + ignoreMappings.add("hbm:item.b_smoke7"); + ignoreMappings.add("hbm:item.b_smoke8"); + ignoreMappings.add("hbm:item.ln2_1"); + ignoreMappings.add("hbm:item.ln2_2"); + ignoreMappings.add("hbm:item.ln2_3"); + ignoreMappings.add("hbm:item.ln2_4"); + ignoreMappings.add("hbm:item.ln2_5"); + ignoreMappings.add("hbm:item.ln2_6"); + ignoreMappings.add("hbm:item.ln2_7"); + ignoreMappings.add("hbm:item.ln2_8"); + ignoreMappings.add("hbm:item.ln2_9"); + ignoreMappings.add("hbm:item.ln2_10"); /// REMAP /// remapItems.put("hbm:item.gadget_explosive8", ModItems.early_explosive_lenses); diff --git a/src/main/java/com/hbm/render/entity/effect/BSmokeRenderer.java b/src/main/java/com/hbm/render/entity/effect/BSmokeRenderer.java deleted file mode 100644 index 66ad9eb7a9..0000000000 --- a/src/main/java/com/hbm/render/entity/effect/BSmokeRenderer.java +++ /dev/null @@ -1,117 +0,0 @@ -package com.hbm.render.entity.effect; - -import org.lwjgl.opengl.GL11; -import org.lwjgl.opengl.GL12; - -import com.hbm.entity.particle.EntityBSmokeFX; -import com.hbm.items.ModItems; -import net.minecraft.client.renderer.Tessellator; -import net.minecraft.client.renderer.entity.Render; -import net.minecraft.client.renderer.texture.TextureMap; -import net.minecraft.entity.Entity; -import net.minecraft.item.Item; -import net.minecraft.util.IIcon; -import net.minecraft.util.ResourceLocation; - -public class BSmokeRenderer extends Render { - private Item field_94151_a; - public BSmokeRenderer(Item p_i1259_1_, int p_i1259_2_) { - this.field_94151_a = p_i1259_1_; - } - - public BSmokeRenderer(Item p_i1260_1_) { - this(p_i1260_1_, 0); - } - - /** - * Actually renders the given argument. This is a synthetic bridge method, - * always casting down its argument and then handing it off to a worker - * function which does the actual work. In all probabilty, the class Render - * is generic (Render= fx.maxAge / 8 * 7) { - field_94151_a = ModItems.b_smoke8; - } - - if (fx.particleAge < fx.maxAge / 8 * 7 && fx.particleAge >= fx.maxAge / 8 * 6) { - field_94151_a = ModItems.b_smoke7; - } - - if (fx.particleAge < fx.maxAge / 8 * 6 && fx.particleAge >= fx.maxAge / 8 * 5) { - field_94151_a = ModItems.b_smoke6; - } - - if (fx.particleAge < fx.maxAge / 8 * 5 && fx.particleAge >= fx.maxAge / 8 * 4) { - field_94151_a = ModItems.b_smoke5; - } - - if (fx.particleAge < fx.maxAge / 8 * 4 && fx.particleAge >= fx.maxAge / 8 * 3) { - field_94151_a = ModItems.b_smoke4; - } - - if (fx.particleAge < fx.maxAge / 8 * 3 && fx.particleAge >= fx.maxAge / 8 * 2) { - field_94151_a = ModItems.b_smoke3; - } - - if (fx.particleAge < fx.maxAge / 8 * 2 && fx.particleAge >= fx.maxAge / 8 * 1) { - field_94151_a = ModItems.b_smoke2; - } - - if (fx.particleAge < fx.maxAge / 8 && fx.particleAge >= 0) { - field_94151_a = ModItems.b_smoke1; - } - - IIcon iicon = field_94151_a.getIconFromDamage(0); - - if (iicon != null) { - GL11.glPushMatrix(); - GL11.glTranslatef((float) p_76986_2_, (float) p_76986_4_, (float) p_76986_6_); - GL11.glEnable(GL12.GL_RESCALE_NORMAL); - GL11.glScalef(0.5F, 0.5F, 0.5F); - GL11.glScalef(7.5F, 7.5F, 7.5F); - this.bindEntityTexture(p_76986_1_); - Tessellator tessellator = Tessellator.instance; - - this.func_77026_a(tessellator, iicon); - GL11.glDisable(GL12.GL_RESCALE_NORMAL); - GL11.glPopMatrix(); - } - } - } - - /** - * Returns the location of an entity's texture. Doesn't seem to be called - * unless you call Render.bindEntityTexture. - */ - @Override - protected ResourceLocation getEntityTexture(Entity p_110775_1_) { - return TextureMap.locationItemsTexture; - } - - private void func_77026_a(Tessellator p_77026_1_, IIcon p_77026_2_) { - float f = p_77026_2_.getMinU(); - float f1 = p_77026_2_.getMaxU(); - float f2 = p_77026_2_.getMinV(); - float f3 = p_77026_2_.getMaxV(); - float f4 = 1.0F; - float f5 = 0.5F; - float f6 = 0.25F; - GL11.glRotatef(180.0F - this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F); - GL11.glRotatef(-this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F); - p_77026_1_.startDrawingQuads(); - p_77026_1_.setNormal(0.0F, 1.0F, 0.0F); - p_77026_1_.addVertexWithUV(0.0F - f5, 0.0F - f6, 0.0D, f, f3); - p_77026_1_.addVertexWithUV(f4 - f5, 0.0F - f6, 0.0D, f1, f3); - p_77026_1_.addVertexWithUV(f4 - f5, f4 - f6, 0.0D, f1, f2); - p_77026_1_.addVertexWithUV(0.0F - f5, f4 - f6, 0.0D, f, f2); - p_77026_1_.draw(); - } -} diff --git a/src/main/java/com/hbm/render/entity/projectile/RenderLN2.java b/src/main/java/com/hbm/render/entity/projectile/RenderLN2.java deleted file mode 100644 index 923677c39a..0000000000 --- a/src/main/java/com/hbm/render/entity/projectile/RenderLN2.java +++ /dev/null @@ -1,141 +0,0 @@ -package com.hbm.render.entity.projectile; - -import org.lwjgl.opengl.GL11; -import org.lwjgl.opengl.GL12; - -import com.hbm.entity.projectile.EntityLN2; -import com.hbm.items.ModItems; - -import net.minecraft.client.renderer.Tessellator; -import net.minecraft.client.renderer.entity.Render; -import net.minecraft.client.renderer.texture.TextureMap; -import net.minecraft.entity.Entity; -import net.minecraft.item.Item; -import net.minecraft.util.IIcon; -import net.minecraft.util.ResourceLocation; - -public class RenderLN2 extends Render { - private Item field_94151_a; - public RenderLN2(Item p_i1259_1_, int p_i1259_2_) - { - this.field_94151_a = p_i1259_1_; - } - - public RenderLN2(Item p_i1260_1_) - { - this(p_i1260_1_, 0); - } - - /** - * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then - * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic - * (Render= fx.maxAge / 10 * 9) - { - field_94151_a = ModItems.ln2_10; - } - - if(fx.ticksExisted < fx.maxAge / 10 * 9 && fx.ticksExisted >= fx.maxAge / 10 * 8) - { - field_94151_a = ModItems.ln2_9; - } - - if(fx.ticksExisted < fx.maxAge / 10 * 8 && fx.ticksExisted >= fx.maxAge / 10 * 7) - { - field_94151_a = ModItems.ln2_8; - } - - if(fx.ticksExisted < fx.maxAge / 10 * 7 && fx.ticksExisted >= fx.maxAge / 10 * 6) - { - field_94151_a = ModItems.ln2_7; - } - - if(fx.ticksExisted < fx.maxAge / 10 * 6 && fx.ticksExisted >= fx.maxAge / 10 * 5) - { - field_94151_a = ModItems.ln2_6; - } - - if(fx.ticksExisted < fx.maxAge / 10 * 5 && fx.ticksExisted >= fx.maxAge / 10 * 4) - { - field_94151_a = ModItems.ln2_5; - } - - if(fx.ticksExisted < fx.maxAge / 10 * 4 && fx.ticksExisted >= fx.maxAge / 10 * 3) - { - field_94151_a = ModItems.ln2_4; - } - - if(fx.ticksExisted < fx.maxAge / 10 * 3 && fx.ticksExisted >= fx.maxAge / 10 * 2) - { - field_94151_a = ModItems.ln2_3; - } - - if(fx.ticksExisted < fx.maxAge / 10 * 2 && fx.ticksExisted >= fx.maxAge / 10 * 1) - { - field_94151_a = ModItems.ln2_2; - } - - if(fx.ticksExisted < fx.maxAge / 10 && fx.ticksExisted >= 0 && !fx.isDead) - { - field_94151_a = ModItems.ln2_1; - } - - IIcon iicon = field_94151_a.getIconFromDamage(0); - - if (iicon != null) - { - GL11.glPushMatrix(); - GL11.glTranslatef((float)p_76986_2_, (float)p_76986_4_, (float)p_76986_6_); - GL11.glEnable(GL12.GL_RESCALE_NORMAL); - GL11.glScalef(0.5F, 0.5F, 0.5F); - GL11.glScalef(7.5F, 7.5F, 7.5F); - GL11.glTranslatef(0.0F, -0.25F, 0.0F); - this.bindEntityTexture(p_76986_1_); - Tessellator tessellator = Tessellator.instance; - - this.func_77026_a(tessellator, iicon); - GL11.glDisable(GL12.GL_RESCALE_NORMAL); - GL11.glPopMatrix(); - } - } - } - - /** - * Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture. - */ - @Override - protected ResourceLocation getEntityTexture(Entity p_110775_1_) - { - return TextureMap.locationItemsTexture; - } - - private void func_77026_a(Tessellator p_77026_1_, IIcon p_77026_2_) - { - float f = p_77026_2_.getMinU(); - float f1 = p_77026_2_.getMaxU(); - float f2 = p_77026_2_.getMinV(); - float f3 = p_77026_2_.getMaxV(); - float f4 = 1.0F; - float f5 = 0.5F; - float f6 = 0.25F; - GL11.glRotatef(180.0F - this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F); - GL11.glRotatef(-this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F); - p_77026_1_.startDrawingQuads(); - p_77026_1_.setNormal(0.0F, 1.0F, 0.0F); - p_77026_1_.addVertexWithUV(0.0F - f5, 0.0F - f6, 0.0D, f, f3); - p_77026_1_.addVertexWithUV(f4 - f5, 0.0F - f6, 0.0D, f1, f3); - p_77026_1_.addVertexWithUV(f4 - f5, f4 - f6, 0.0D, f1, f2); - p_77026_1_.addVertexWithUV(0.0F - f5, f4 - f6, 0.0D, f, f2); - p_77026_1_.draw(); - } - -} diff --git a/src/main/java/com/hbm/render/tileentity/RenderLoot.java b/src/main/java/com/hbm/render/tileentity/RenderLoot.java index 2a325e92ed..738152d741 100644 --- a/src/main/java/com/hbm/render/tileentity/RenderLoot.java +++ b/src/main/java/com/hbm/render/tileentity/RenderLoot.java @@ -6,6 +6,7 @@ import com.hbm.blocks.generic.BlockLoot.TileEntityLoot; import com.hbm.items.ModItems; import com.hbm.items.armor.ArmorTrenchmaster; +import com.hbm.items.weapon.sedna.factory.GunFactory.EnumAmmo; import com.hbm.main.ResourceManager; import com.hbm.util.Tuple.Quartet; @@ -38,7 +39,7 @@ public void renderTileEntityAt(TileEntity te, double x, double y, double z, floa GL11.glPushMatrix(); GL11.glTranslated(item.getX(), item.getY(), item.getZ()); - if(stack.getItem() == ModItems.ammo_nuke) { + if(stack.getItem() == ModItems.ammo_standard && stack.getItemDamage() >= EnumAmmo.NUKE_STANDARD.ordinal() && stack.getItemDamage() <= EnumAmmo.NUKE_HIVE.ordinal()) { renderNuke(); } else if(stack.getItem() == ModItems.gun_maresleg) { diff --git a/src/main/java/com/hbm/tileentity/deco/TileEntityTrappedBrick.java b/src/main/java/com/hbm/tileentity/deco/TileEntityTrappedBrick.java index 5dcef1aad9..c35d0d7955 100644 --- a/src/main/java/com/hbm/tileentity/deco/TileEntityTrappedBrick.java +++ b/src/main/java/com/hbm/tileentity/deco/TileEntityTrappedBrick.java @@ -6,9 +6,7 @@ import com.hbm.blocks.ModBlocks; import com.hbm.blocks.generic.TrappedBrick.Trap; -import com.hbm.entity.projectile.EntityBulletBaseNT; import com.hbm.entity.projectile.EntityRubble; -import com.hbm.handler.BulletConfigSyncingUtil; import com.hbm.items.ModItems; import net.minecraft.entity.monster.EntityCaveSpider; @@ -77,11 +75,7 @@ private void trigger() { worldObj.setBlock(xCoord, yCoord - 1 - i, zCoord, ModBlocks.concrete_pillar); break; case POISON_DART: - EntityBulletBaseNT dart = new EntityBulletBaseNT(worldObj, BulletConfigSyncingUtil.G20_CAUSTIC); - dart.setPosition(xCoord + 0.5 + dir.offsetX, yCoord + 0.5, zCoord + 0.5 + dir.offsetZ); - dart.motionX = dir.offsetX; - dart.motionZ = dir.offsetZ; - worldObj.spawnEntityInWorld(dart); + //TBI break; case ZOMBIE: EntityZombie zombie = new EntityZombie(worldObj); diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineKeyForge.java b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineKeyForge.java index a67428973b..59d6f43bf6 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineKeyForge.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineKeyForge.java @@ -2,8 +2,6 @@ import com.hbm.inventory.container.ContainerMachineKeyForge; import com.hbm.inventory.gui.GUIMachineKeyForge; -import com.hbm.items.ItemAmmoEnums.Ammo4Gauge; -import com.hbm.items.ModItems; import com.hbm.items.tool.ItemKeyPin; import com.hbm.tileentity.IGUIProvider; @@ -190,11 +188,6 @@ public void updateEntity() { if(slots[2] != null && slots[2].getItem() instanceof ItemKeyPin && ((ItemKeyPin)slots[2].getItem()).canTransfer()) { ItemKeyPin.setPins(slots[2], worldObj.rand.nextInt(900) + 100); } - - //DEBUG, remove later - if(slots[2] != null && slots[2].getItem() == ModItems.ammo_4gauge) { - slots[2] = ModItems.ammo_4gauge.stackFromEnum(slots[2].stackSize, Ammo4Gauge.QUACK); - } } } diff --git a/src/main/java/com/hbm/tileentity/turret/TileEntityTurretFritz.java b/src/main/java/com/hbm/tileentity/turret/TileEntityTurretFritz.java index 1271b00f58..eb0337a0d9 100644 --- a/src/main/java/com/hbm/tileentity/turret/TileEntityTurretFritz.java +++ b/src/main/java/com/hbm/tileentity/turret/TileEntityTurretFritz.java @@ -4,9 +4,7 @@ import java.util.List; import com.hbm.blocks.BlockDummyable; -import com.hbm.entity.projectile.EntityBulletBaseNT; -import com.hbm.handler.BulletConfigSyncingUtil; -import com.hbm.handler.BulletConfiguration; +import com.hbm.entity.projectile.EntityBulletBaseMK4; import com.hbm.inventory.fluid.FluidType; import com.hbm.inventory.fluid.Fluids; import com.hbm.inventory.fluid.tank.FluidTank; @@ -15,6 +13,7 @@ import com.hbm.inventory.fluid.trait.FluidTraitSimple.FT_Liquid; import com.hbm.inventory.gui.GUITurretFritz; import com.hbm.items.ModItems; +import com.hbm.items.weapon.sedna.factory.XFactoryFlamer; import com.hbm.items.weapon.sedna.factory.GunFactory.EnumAmmo; import com.hbm.packet.PacketDispatcher; import com.hbm.packet.toclient.AuxParticlePacketNT; @@ -105,7 +104,6 @@ public void updateFiringTick() { if(this.tank.getTankType().hasTrait(FT_Flammable.class) && this.tank.getTankType().hasTrait(FT_Liquid.class) && this.tank.getFill() >= 2) { FT_Flammable trait = this.tank.getTankType().getTrait(FT_Flammable.class); - BulletConfiguration conf = BulletConfigSyncingUtil.pullConfig(BulletConfigSyncingUtil.FLA_NORMAL); this.tank.setFill(this.tank.getFill() - 2); Vec3 pos = this.getTurretPos(); @@ -113,11 +111,8 @@ public void updateFiringTick() { vec.rotateAroundZ((float) -this.rotationPitch); vec.rotateAroundY((float) -(this.rotationYaw + Math.PI * 0.5)); - EntityBulletBaseNT proj = new EntityBulletBaseNT(worldObj, BulletConfigSyncingUtil.getKey(conf)); - proj.setPositionAndRotation(pos.xCoord + vec.xCoord, pos.yCoord + vec.yCoord, pos.zCoord + vec.zCoord, 0.0F, 0.0F); - proj.overrideDamage = (float) (trait.getHeatEnergy() / 500_000F); - - proj.setThrowableHeading(vec.xCoord, vec.yCoord, vec.zCoord, conf.velocity, conf.spread); + EntityBulletBaseMK4 proj = new EntityBulletBaseMK4(worldObj, XFactoryFlamer.flame_nograv, (float) (trait.getHeatEnergy() / 500_000F), 0.05F, (float) rotationYaw, (float) rotationPitch); + proj.setPositionAndRotation(pos.xCoord + vec.xCoord, pos.yCoord + vec.yCoord, pos.zCoord + vec.zCoord, proj.rotationYaw, proj.rotationPitch); worldObj.spawnEntityInWorld(proj); worldObj.playSoundEffect(xCoord, yCoord, zCoord, "hbm:weapon.flamethrowerShoot", 2F, 1F + worldObj.rand.nextFloat() * 0.5F); diff --git a/src/main/java/com/hbm/util/DamageResistanceHandler.java b/src/main/java/com/hbm/util/DamageResistanceHandler.java index 974c81ef0a..100cead8b5 100644 --- a/src/main/java/com/hbm/util/DamageResistanceHandler.java +++ b/src/main/java/com/hbm/util/DamageResistanceHandler.java @@ -279,6 +279,10 @@ public void onEntityAttacked(LivingAttackEvent event) { @SubscribeEvent public void onEntityDamaged(LivingHurtEvent event) { event.ammount = calculateDamage(event.entityLiving, event.source, event.ammount, currentPDT, currentPDR); + if(event.entityLiving instanceof IResistanceProvider) { + IResistanceProvider irp = (IResistanceProvider) event.entityLiving; + irp.onDamageDealt(event.source, event.ammount); + } } public static String typeToCategory(DamageSource source) { diff --git a/src/main/java/com/hbm/util/LootGenerator.java b/src/main/java/com/hbm/util/LootGenerator.java index ee4f648998..dfd3df78f8 100644 --- a/src/main/java/com/hbm/util/LootGenerator.java +++ b/src/main/java/com/hbm/util/LootGenerator.java @@ -4,11 +4,12 @@ import com.hbm.blocks.ModBlocks; import com.hbm.blocks.generic.BlockLoot.TileEntityLoot; +import com.hbm.inventory.OreDictManager.DictFrame; import com.hbm.itempool.ItemPool; import com.hbm.itempool.ItemPoolsPile; import com.hbm.items.ModItems; import com.hbm.items.special.ItemBookLore; -import com.hbm.items.ItemAmmoEnums.AmmoFatman; +import com.hbm.items.weapon.sedna.factory.GunFactory.EnumAmmo; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; @@ -40,9 +41,9 @@ public static void lootCapNuke(World world, int x, int y, int z) { if(loot != null && loot.items.isEmpty()) { if(world.rand.nextInt(5) == 0) - loot.addItem(ModItems.ammo_nuke.stackFromEnum(AmmoFatman.LOW), -0.25, 0, -0.125); + loot.addItem(DictFrame.fromOne(ModItems.ammo_standard, EnumAmmo.NUKE_STANDARD), -0.25, 0, -0.125); else - loot.addItem(new ItemStack(ModItems.ammo_rocket), -0.25, 0, -0.25); + loot.addItem(DictFrame.fromOne(ModItems.ammo_standard, EnumAmmo.ROCKET_HEAT), -0.25, 0, -0.25); for(int i = 0; i < 4; i++) addItemWithDeviation(loot, world.rand, new ItemStack(ModItems.cap_nuka, 2), 0.125, i * 0.03125, 0.25); for(int i = 0; i < 2; i++) addItemWithDeviation(loot, world.rand, new ItemStack(ModItems.syringe_metal_stimpak, 1), -0.25, i * 0.03125, 0.25);