higher 5mm recipe yield, fixed ammo sync vals shifitng, new 5mm textures
@ -209,36 +209,25 @@ public abstract class WeaponAbility {
|
||||
WeightedRandomObject[] ammo = new WeightedRandomObject[] {
|
||||
new WeightedRandomObject(ModItems.ammo_12gauge.stackFromEnum(Ammo12Gauge.STOCK), 10),
|
||||
new WeightedRandomObject(ModItems.ammo_12gauge.stackFromEnum(Ammo12Gauge.SHRAPNEL), 5),
|
||||
new WeightedRandomObject(ModItems.ammo_12gauge.stackFromEnum(Ammo12Gauge.DU), 3),
|
||||
new WeightedRandomObject(ModItems.ammo_20gauge.stackFromEnum(Ammo20Gauge.STOCK), 10),
|
||||
new WeightedRandomObject(ModItems.ammo_20gauge.stackFromEnum(Ammo20Gauge.FLECHETTE), 5),
|
||||
new WeightedRandomObject(ModItems.ammo_20gauge.stackFromEnum(Ammo20Gauge.SLUG), 5),
|
||||
new WeightedRandomObject(ModItems.ammo_9mm.stackFromEnum(Ammo9mm.STOCK), 10),
|
||||
new WeightedRandomObject(ModItems.ammo_9mm.stackFromEnum(Ammo9mm.AP), 5),
|
||||
new WeightedRandomObject(ModItems.ammo_5mm.stackFromEnum(Ammo5mm.STOCK), 10),
|
||||
new WeightedRandomObject(ModItems.ammo_5mm.stackFromEnum(Ammo5mm.DU), 3),
|
||||
new WeightedRandomObject(ModItems.ammo_556.stackFromEnum(Ammo556mm.STOCK), 10),
|
||||
new WeightedRandomObject(ModItems.ammo_556.stackFromEnum(Ammo556mm.PHOSPHORUS), 5),
|
||||
new WeightedRandomObject(ModItems.ammo_556.stackFromEnum(Ammo556mm.FLECHETTE), 10),
|
||||
new WeightedRandomObject(ModItems.ammo_556.stackFromEnum(Ammo556mm.FLECHETTE_PHOSPHORUS), 5),
|
||||
new WeightedRandomObject(ModItems.ammo_50bmg.stackFromEnum(Ammo50BMG.STOCK), 10),
|
||||
new WeightedRandomObject(ModItems.ammo_50bmg.stackFromEnum(Ammo50BMG.INCENDIARY), 5),
|
||||
new WeightedRandomObject(ModItems.ammo_50bmg.stackFromEnum(Ammo50BMG.AP), 5),
|
||||
new WeightedRandomObject(ModItems.ammo_grenade.stackFromEnum(AmmoGrenade.STOCK), 5),
|
||||
new WeightedRandomObject(ModItems.ammo_grenade.stackFromEnum(AmmoGrenade.CONCUSSION), 3),
|
||||
new WeightedRandomObject(ModItems.ammo_grenade.stackFromEnum(AmmoGrenade.PHOSPHORUS), 3),
|
||||
new WeightedRandomObject(ModItems.ammo_rocket.stackFromEnum(AmmoRocket.STOCK), 5),
|
||||
new WeightedRandomObject(ModItems.ammo_rocket.stackFromEnum(AmmoRocket.GLARE), 5),
|
||||
new WeightedRandomObject(ModItems.ammo_rocket.stackFromEnum(AmmoRocket.PHOSPHORUS), 5),
|
||||
new WeightedRandomObject(ModItems.ammo_rocket.stackFromEnum(AmmoRocket.RPC), 1),
|
||||
new WeightedRandomObject(ModItems.syringe_metal_stimpak, 25),
|
||||
new WeightedRandomObject(ModItems.ammo_50bmg.stackFromEnum(Ammo50BMG.STOCK), 3),
|
||||
new WeightedRandomObject(ModItems.ammo_grenade.stackFromEnum(AmmoGrenade.STOCK), 3),
|
||||
new WeightedRandomObject(ModItems.ammo_rocket.stackFromEnum(AmmoRocket.STOCK), 1),
|
||||
new WeightedRandomObject(ModItems.ammo_rocket.stackFromEnum(AmmoRocket.GLARE), 1),
|
||||
new WeightedRandomObject(new ItemStack(ModItems.syringe_metal_stimpak), 20),
|
||||
};
|
||||
|
||||
int count = Math.min((int)Math.ceil(living.getMaxHealth() / divider), 250); //safeguard to prevent funnies from bosses with obscene health
|
||||
|
||||
for(int i = 0; i < count; i++) {
|
||||
|
||||
living.dropItem(((WeightedRandomObject)WeightedRandom.getRandomItem(living.getRNG(), ammo)).asItem(), 1);
|
||||
living.entityDropItem(((WeightedRandomObject)WeightedRandom.getRandomItem(living.getRNG(), ammo)).asStack(), 1);
|
||||
world.spawnEntityInWorld(new EntityXPOrb(world, living.posX, living.posY, living.posZ, 1));
|
||||
}
|
||||
|
||||
|
||||
@ -8,6 +8,7 @@ import com.hbm.handler.BulletConfiguration;
|
||||
import com.hbm.handler.GunConfiguration;
|
||||
import com.hbm.interfaces.IBulletHurtBehavior;
|
||||
import com.hbm.inventory.RecipesCommon.ComparableStack;
|
||||
import com.hbm.items.ItemAmmoEnums.Ammo12Gauge;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.lib.HbmCollection;
|
||||
import com.hbm.lib.HbmCollection.EnumGunManufacturer;
|
||||
@ -175,7 +176,7 @@ public static GunConfiguration getSpas12AltConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBuckshotConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_12gauge, 1, 0);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_12gauge.stackFromEnum(Ammo12Gauge.STOCK));
|
||||
bullet.dmgMin = 5;
|
||||
bullet.dmgMax = 7;
|
||||
|
||||
@ -186,7 +187,7 @@ public static GunConfiguration getSpas12AltConfig() {
|
||||
|
||||
BulletConfiguration bullet = get12GaugeConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_12gauge, 1, 1);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_12gauge.stackFromEnum(Ammo12Gauge.INCENDIARY));
|
||||
bullet.wear = 15;
|
||||
bullet.dmgMin = 5;
|
||||
bullet.dmgMax = 7;
|
||||
@ -199,7 +200,7 @@ public static GunConfiguration getSpas12AltConfig() {
|
||||
|
||||
BulletConfiguration bullet = get12GaugeConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_12gauge, 1, 2);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_12gauge.stackFromEnum(Ammo12Gauge.SHRAPNEL));
|
||||
bullet.wear = 15;
|
||||
bullet.dmgMin = 10;
|
||||
bullet.dmgMax = 17;
|
||||
@ -214,7 +215,7 @@ public static GunConfiguration getSpas12AltConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBuckshotConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_12gauge, 1, 3);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_12gauge.stackFromEnum(Ammo12Gauge.DU));
|
||||
bullet.wear = 20;
|
||||
bullet.dmgMin = 18;
|
||||
bullet.dmgMax = 22;
|
||||
@ -228,7 +229,7 @@ public static GunConfiguration getSpas12AltConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBuckshotConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_12gauge, 1, 4);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_12gauge.stackFromEnum(Ammo12Gauge.MARAUDER));
|
||||
bullet.wear = 20;
|
||||
bullet.dmgMin = 100;
|
||||
bullet.dmgMax = 500;
|
||||
@ -252,7 +253,7 @@ public static GunConfiguration getSpas12AltConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardAirstrikeConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_12gauge, 1, 5);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_12gauge.stackFromEnum(Ammo12Gauge.SLEEK));
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
@ -6,6 +6,7 @@ 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.ItemAmmoEnums.Ammo20Gauge;
|
||||
import com.hbm.lib.HbmCollection;
|
||||
import com.hbm.lib.HbmCollection.EnumGunManufacturer;
|
||||
import com.hbm.render.anim.BusAnimation;
|
||||
@ -197,12 +198,11 @@ public class Gun20GaugeFactory {
|
||||
return config;
|
||||
}
|
||||
|
||||
private static int i = 0;
|
||||
public static BulletConfiguration get20GaugeConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBuckshotConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_20gauge, 1, i++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_20gauge.stackFromEnum(Ammo20Gauge.STOCK));
|
||||
bullet.dmgMin = 3;
|
||||
bullet.dmgMax = 5;
|
||||
|
||||
@ -213,7 +213,7 @@ public class Gun20GaugeFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_20gauge, 1, i++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_20gauge.stackFromEnum(Ammo20Gauge.SLUG));
|
||||
bullet.dmgMin = 18;
|
||||
bullet.dmgMax = 22;
|
||||
bullet.wear = 7;
|
||||
@ -226,7 +226,7 @@ public class Gun20GaugeFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBuckshotConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_20gauge, 1, i++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_20gauge.stackFromEnum(Ammo20Gauge.FLECHETTE));
|
||||
bullet.dmgMin = 8;
|
||||
bullet.dmgMax = 15;
|
||||
bullet.wear = 15;
|
||||
@ -241,7 +241,7 @@ public class Gun20GaugeFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBuckshotConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_20gauge, 1, i++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_20gauge.stackFromEnum(Ammo20Gauge.INCENDIARY));
|
||||
bullet.dmgMin = 3;
|
||||
bullet.dmgMax = 6;
|
||||
bullet.wear = 15;
|
||||
@ -254,7 +254,7 @@ public class Gun20GaugeFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBuckshotConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_20gauge, 1, i++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_20gauge.stackFromEnum(Ammo20Gauge.SHRAPNEL));
|
||||
bullet.wear = 15;
|
||||
bullet.dmgMin = 7;
|
||||
bullet.dmgMax = 12;
|
||||
@ -269,7 +269,7 @@ public class Gun20GaugeFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBuckshotConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_20gauge, 1, i++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_20gauge.stackFromEnum(Ammo20Gauge.EXPLOSIVE));
|
||||
bullet.dmgMin = 7;
|
||||
bullet.dmgMax = 12;
|
||||
bullet.wear = 25;
|
||||
@ -282,7 +282,7 @@ public class Gun20GaugeFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBuckshotConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_20gauge, 1, i++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_20gauge.stackFromEnum(Ammo20Gauge.CAUSTIC));
|
||||
bullet.dmgMin = 3;
|
||||
bullet.dmgMax = 7;
|
||||
bullet.wear = 25;
|
||||
@ -301,7 +301,7 @@ public class Gun20GaugeFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBuckshotConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_20gauge, 1, i++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_20gauge.stackFromEnum(Ammo20Gauge.SHOCK));
|
||||
bullet.dmgMin = 4;
|
||||
bullet.dmgMax = 8;
|
||||
bullet.wear = 25;
|
||||
@ -321,7 +321,7 @@ public class Gun20GaugeFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBuckshotConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_20gauge, 1, i++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_20gauge.stackFromEnum(Ammo20Gauge.WITHER));
|
||||
bullet.dmgMin = 4;
|
||||
bullet.dmgMax = 8;
|
||||
|
||||
@ -335,7 +335,7 @@ public class Gun20GaugeFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardAirstrikeConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_20gauge, 1, i++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_20gauge.stackFromEnum(Ammo20Gauge.SLEEK));
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
@ -4,6 +4,7 @@ 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.ItemAmmoEnums.Ammo22LR;
|
||||
import com.hbm.lib.HbmCollection;
|
||||
import com.hbm.lib.HbmCollection.EnumGunManufacturer;
|
||||
import com.hbm.render.util.RenderScreenOverlay.Crosshair;
|
||||
@ -57,7 +58,7 @@ public class Gun22LRFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_22lr, 1, 0);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_22lr.stackFromEnum(Ammo22LR.STOCK));
|
||||
bullet.spread *= inaccuracy;
|
||||
bullet.dmgMin = 6;
|
||||
bullet.dmgMax = 8;
|
||||
@ -69,7 +70,7 @@ public class Gun22LRFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_22lr, 1, 1);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_22lr.stackFromEnum(Ammo22LR.AP));
|
||||
bullet.spread *= inaccuracy;
|
||||
bullet.dmgMin = 12;
|
||||
bullet.dmgMax = 16;
|
||||
|
||||
@ -7,6 +7,7 @@ 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.ItemAmmoEnums.Ammo357Magnum;
|
||||
import com.hbm.lib.HbmCollection.EnumGunManufacturer;
|
||||
import com.hbm.lib.ModDamageSource;
|
||||
import com.hbm.potion.HbmPotion;
|
||||
@ -218,7 +219,7 @@ public class Gun357MagnumFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_357, 1, 0);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_357.stackFromEnum(Ammo357Magnum.IRON));
|
||||
bullet.dmgMin = 8;
|
||||
bullet.dmgMax = 10;
|
||||
|
||||
@ -229,7 +230,7 @@ public class Gun357MagnumFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_357, 1, 1);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_357.stackFromEnum(Ammo357Magnum.LEAD));
|
||||
bullet.dmgMin = 18;
|
||||
bullet.dmgMax = 22;
|
||||
|
||||
@ -240,7 +241,7 @@ public class Gun357MagnumFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_357, 1, 2);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_357.stackFromEnum(Ammo357Magnum.NUCLEAR));
|
||||
bullet.dmgMin = 10;
|
||||
bullet.dmgMax = 15;
|
||||
|
||||
@ -254,7 +255,7 @@ public class Gun357MagnumFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_357, 1, 3);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_357.stackFromEnum(Ammo357Magnum.GOLD));
|
||||
bullet.dmgMin = 25;
|
||||
bullet.dmgMax = 28;
|
||||
|
||||
@ -265,7 +266,7 @@ public class Gun357MagnumFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_357, 1, 4);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_357.stackFromEnum(Ammo357Magnum.DESH));
|
||||
bullet.dmgMin = 30;
|
||||
bullet.dmgMax = 33;
|
||||
|
||||
@ -276,7 +277,7 @@ public class Gun357MagnumFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_357, 1, 5);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_357.stackFromEnum(Ammo357Magnum.SCHRABIDIUM));
|
||||
bullet.dmgMin = 10000;
|
||||
bullet.dmgMax = 100000;
|
||||
bullet.instakill = true;
|
||||
@ -288,7 +289,7 @@ public class Gun357MagnumFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_357, 1, 6);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_357.stackFromEnum(Ammo357Magnum.STEEL));
|
||||
bullet.dmgMin = 18;
|
||||
bullet.dmgMax = 25;
|
||||
|
||||
@ -299,7 +300,7 @@ public class Gun357MagnumFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_357, 1, 7);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_357.stackFromEnum(Ammo357Magnum.NIGHTMARE1));
|
||||
bullet.dmgMin = 1;
|
||||
bullet.dmgMax = 100;
|
||||
|
||||
@ -310,7 +311,7 @@ public class Gun357MagnumFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_357, 1, 8);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_357.stackFromEnum(Ammo357Magnum.NIGHTMARE2));
|
||||
bullet.spread *= 10;
|
||||
bullet.bulletsMin = 4;
|
||||
bullet.bulletsMax = 6;
|
||||
|
||||
@ -14,6 +14,7 @@ import com.hbm.interfaces.IBulletHitBehavior;
|
||||
import com.hbm.interfaces.IBulletImpactBehavior;
|
||||
import com.hbm.inventory.RecipesCommon.ComparableStack;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.ItemAmmoEnums.Ammo44Magnum;
|
||||
import com.hbm.lib.HbmCollection;
|
||||
import com.hbm.lib.HbmCollection.EnumGunManufacturer;
|
||||
import com.hbm.packet.AuxParticlePacketNT;
|
||||
@ -136,12 +137,11 @@ public class Gun44MagnumFactory {
|
||||
return config;
|
||||
}
|
||||
|
||||
static byte i = 0;
|
||||
public static BulletConfiguration getNoPipConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_44, 1, i++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_44.stackFromEnum(Ammo44Magnum.STOCK));
|
||||
bullet.dmgMin = 18;
|
||||
bullet.dmgMax = 26;
|
||||
|
||||
@ -152,7 +152,7 @@ public class Gun44MagnumFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_44, 1, i++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_44.stackFromEnum(Ammo44Magnum.AP));
|
||||
bullet.dmgMin = 25;
|
||||
bullet.dmgMax = 32;
|
||||
bullet.wear = 15;
|
||||
@ -165,7 +165,7 @@ public class Gun44MagnumFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_44, 1, i++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_44.stackFromEnum(Ammo44Magnum.DU));
|
||||
bullet.dmgMin = 28;
|
||||
bullet.dmgMax = 40;
|
||||
bullet.wear = 25;
|
||||
@ -178,7 +178,7 @@ public class Gun44MagnumFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_44, 1, i++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_44.stackFromEnum(Ammo44Magnum.PHOSPHORUS));
|
||||
bullet.dmgMin = 18;
|
||||
bullet.dmgMax = 26;
|
||||
bullet.wear = 15;
|
||||
@ -212,7 +212,7 @@ public class Gun44MagnumFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_44, 1, i++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_44.stackFromEnum(Ammo44Magnum.STAR));
|
||||
bullet.dmgMin = 42;
|
||||
bullet.dmgMax = 50;
|
||||
bullet.wear = 25;
|
||||
@ -225,7 +225,7 @@ public class Gun44MagnumFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_44, 1, i++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_44.stackFromEnum(Ammo44Magnum.PIP));
|
||||
bullet.dmgMin = 30;
|
||||
bullet.dmgMax = 36;
|
||||
bullet.wear = 25;
|
||||
@ -262,7 +262,7 @@ public class Gun44MagnumFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_44, 1, i++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_44.stackFromEnum(Ammo44Magnum.BJ));
|
||||
bullet.dmgMin = 30;
|
||||
bullet.dmgMax = 36;
|
||||
bullet.wear = 25;
|
||||
@ -300,7 +300,7 @@ public class Gun44MagnumFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_44, 1, i++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_44.stackFromEnum(Ammo44Magnum.SILVER));
|
||||
bullet.dmgMin = 30;
|
||||
bullet.dmgMax = 36;
|
||||
bullet.wear = 25;
|
||||
@ -338,7 +338,7 @@ public class Gun44MagnumFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardRocketConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_44, 1, i++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_44.stackFromEnum(Ammo44Magnum.ROCKET));
|
||||
bullet.velocity = 5;
|
||||
bullet.explosive = 15F;
|
||||
bullet.trail = 1;
|
||||
|
||||
@ -6,6 +6,7 @@ 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.ItemAmmoEnums.Ammo45ACP;
|
||||
import com.hbm.lib.HbmCollection;
|
||||
import com.hbm.lib.HbmCollection.EnumGunManufacturer;
|
||||
import com.hbm.render.anim.BusAnimation;
|
||||
@ -107,10 +108,13 @@ public class Gun45ACPFactory {
|
||||
|
||||
return config;
|
||||
}
|
||||
|
||||
static float inaccuracy = 5;
|
||||
public static BulletConfiguration get45AutoConfig() {
|
||||
BulletConfiguration bullet = Gun9mmFactory.get9mmConfig();
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_45, 1, 0);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_45.stackFromEnum(Ammo45ACP.STOCK));
|
||||
bullet.spread *= inaccuracy;
|
||||
bullet.dmgMax = 30;
|
||||
bullet.dmgMin = 27;
|
||||
|
||||
@ -120,7 +124,7 @@ public class Gun45ACPFactory {
|
||||
public static BulletConfiguration get45AutoAPConfig() {
|
||||
BulletConfiguration bullet = get45AutoConfig().clone();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_45, 1, 1);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_45.stackFromEnum(Ammo45ACP.AP));
|
||||
bullet.dmgMax *= 1.5;
|
||||
bullet.dmgMin *= 1.5;
|
||||
|
||||
@ -130,7 +134,7 @@ public class Gun45ACPFactory {
|
||||
public static BulletConfiguration get45AutoDUConfig() {
|
||||
BulletConfiguration bullet = get45AutoAPConfig().clone();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_45, 1, 2);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_45.stackFromEnum(Ammo45ACP.DU));
|
||||
bullet.dmgMax *= 1.5;
|
||||
bullet.dmgMin *= 1.5;
|
||||
|
||||
|
||||
@ -16,6 +16,7 @@ import com.hbm.interfaces.IBulletImpactBehavior;
|
||||
import com.hbm.interfaces.IBulletUpdateBehavior;
|
||||
import com.hbm.inventory.RecipesCommon.ComparableStack;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.ItemAmmoEnums.Ammo4Gauge;
|
||||
import com.hbm.lib.HbmCollection;
|
||||
import com.hbm.lib.HbmCollection.EnumGunManufacturer;
|
||||
import com.hbm.lib.ModDamageSource;
|
||||
@ -121,12 +122,11 @@ public class Gun4GaugeFactory {
|
||||
return config;
|
||||
}
|
||||
|
||||
private static byte i = 0;
|
||||
public static BulletConfiguration get4GaugeConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBuckshotConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_4gauge, 1, i++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_4gauge.stackFromEnum(Ammo4Gauge.STOCK));
|
||||
bullet.dmgMin = 5;
|
||||
bullet.dmgMax = 8;
|
||||
bullet.bulletsMin *= 2;
|
||||
@ -139,7 +139,7 @@ public class Gun4GaugeFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_4gauge, 1, i++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_4gauge.stackFromEnum(Ammo4Gauge.SLUG));
|
||||
bullet.dmgMin = 25;
|
||||
bullet.dmgMax = 32;
|
||||
bullet.wear = 7;
|
||||
@ -152,7 +152,7 @@ public class Gun4GaugeFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBuckshotConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_4gauge, 1, i++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_4gauge.stackFromEnum(Ammo4Gauge.FLECHETTE));
|
||||
bullet.dmgMin = 8;
|
||||
bullet.dmgMax = 15;
|
||||
bullet.bulletsMin *= 2;
|
||||
@ -169,7 +169,7 @@ public class Gun4GaugeFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBuckshotConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_4gauge, 1, i++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_4gauge.stackFromEnum(Ammo4Gauge.FLECHETTE_PHOSPHORUS));
|
||||
bullet.dmgMin = 8;
|
||||
bullet.dmgMax = 15;
|
||||
bullet.bulletsMin *= 2;
|
||||
@ -207,7 +207,7 @@ public class Gun4GaugeFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardGrenadeConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_4gauge, 1, i++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_4gauge.stackFromEnum(Ammo4Gauge.EXPLOSIVE));
|
||||
bullet.velocity *= 2;
|
||||
bullet.gravity *= 2;
|
||||
bullet.dmgMin = 20;
|
||||
@ -222,7 +222,7 @@ public class Gun4GaugeFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardGrenadeConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_4gauge, 1, i++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_4gauge.stackFromEnum(Ammo4Gauge.MINING));
|
||||
bullet.velocity *= 2;
|
||||
bullet.gravity *= 2;
|
||||
bullet.dmgMin = 10;
|
||||
@ -256,7 +256,7 @@ public class Gun4GaugeFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardGrenadeConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_4gauge, 1, i++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_4gauge.stackFromEnum(Ammo4Gauge.BALEFIRE));
|
||||
bullet.velocity *= 2;
|
||||
bullet.gravity *= 2;
|
||||
bullet.dmgMin = 50;
|
||||
@ -289,7 +289,7 @@ public class Gun4GaugeFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardRocketConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_4gauge, 1, i++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_4gauge.stackFromEnum(Ammo4Gauge.KAMPF));
|
||||
bullet.spread = 0.0F;
|
||||
bullet.gravity = 0.0D;
|
||||
bullet.wear = 15;
|
||||
@ -305,7 +305,7 @@ public class Gun4GaugeFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardRocketConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_4gauge, 1, i++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_4gauge.stackFromEnum(Ammo4Gauge.CANISTER));
|
||||
bullet.spread = 0.0F;
|
||||
bullet.gravity = 0.0D;
|
||||
bullet.wear = 15;
|
||||
@ -343,7 +343,7 @@ public class Gun4GaugeFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardAirstrikeConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_4gauge, 1, i++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_4gauge.stackFromEnum(Ammo4Gauge.SLEEK));
|
||||
|
||||
return bullet;
|
||||
}
|
||||
@ -352,7 +352,7 @@ public class Gun4GaugeFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBuckshotConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_4gauge, 1, i++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_4gauge.stackFromEnum(Ammo4Gauge.CLAW));
|
||||
bullet.dmgMin = 6;
|
||||
bullet.dmgMax = 9;
|
||||
bullet.bulletsMin *= 2;
|
||||
@ -389,7 +389,7 @@ public class Gun4GaugeFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBuckshotConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_4gauge, 1, i++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_4gauge.stackFromEnum(Ammo4Gauge.VAMPIRE));
|
||||
bullet.dmgMin = 6;
|
||||
bullet.dmgMax = 9;
|
||||
bullet.bulletsMin *= 2;
|
||||
@ -427,7 +427,7 @@ public class Gun4GaugeFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBuckshotConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_4gauge, 1, i++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_4gauge.stackFromEnum(Ammo4Gauge.VOID));
|
||||
bullet.dmgMin = 6;
|
||||
bullet.dmgMax = 9;
|
||||
bullet.bulletsMin *= 2;
|
||||
@ -458,7 +458,7 @@ public class Gun4GaugeFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardRocketConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_4gauge, 1, i++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_4gauge.stackFromEnum(Ammo4Gauge.QUACK));
|
||||
bullet.velocity *= 2D;
|
||||
bullet.spread = 0.0F;
|
||||
bullet.gravity = 0.0D;
|
||||
|
||||
@ -4,6 +4,7 @@ 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.ItemAmmoEnums.Ammo50AE;
|
||||
import com.hbm.lib.HbmCollection;
|
||||
import com.hbm.lib.HbmCollection.EnumGunManufacturer;
|
||||
import com.hbm.render.util.RenderScreenOverlay.Crosshair;
|
||||
@ -47,12 +48,11 @@ public class Gun50AEFactory {
|
||||
}
|
||||
|
||||
private static float inaccuracy = 0.0005F;
|
||||
private static byte i = 0;
|
||||
public static BulletConfiguration get50AEConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_50ae, 1, i++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_50ae.stackFromEnum(Ammo50AE.STOCK));
|
||||
bullet.spread *= inaccuracy;
|
||||
bullet.dmgMin = 28;
|
||||
bullet.dmgMax = 32;
|
||||
@ -64,7 +64,7 @@ public class Gun50AEFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_50ae, 1, i++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_50ae.stackFromEnum(Ammo50AE.AP));
|
||||
bullet.spread *= inaccuracy;
|
||||
bullet.dmgMin = 30;
|
||||
bullet.dmgMax = 36;
|
||||
@ -78,7 +78,7 @@ public class Gun50AEFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_50ae, 1, i++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_50ae.stackFromEnum(Ammo50AE.DU));
|
||||
bullet.spread *= inaccuracy;
|
||||
bullet.dmgMin = 38;
|
||||
bullet.dmgMax = 46;
|
||||
@ -92,7 +92,7 @@ public class Gun50AEFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_50ae, 1, i++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_50ae.stackFromEnum(Ammo50AE.STAR));
|
||||
bullet.spread *= inaccuracy;
|
||||
bullet.dmgMin = 52;
|
||||
bullet.dmgMax = 60;
|
||||
|
||||
@ -10,6 +10,8 @@ import com.hbm.interfaces.IBulletHitBehavior;
|
||||
import com.hbm.interfaces.IBulletImpactBehavior;
|
||||
import com.hbm.inventory.RecipesCommon.ComparableStack;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.ItemAmmoEnums.Ammo50BMG;
|
||||
import com.hbm.items.ItemAmmoEnums.AmmoLunaticSniper;
|
||||
import com.hbm.lib.HbmCollection;
|
||||
import com.hbm.lib.HbmCollection.EnumGunManufacturer;
|
||||
import com.hbm.packet.AuxParticlePacketNT;
|
||||
@ -102,7 +104,7 @@ public class Gun50BMGFactory {
|
||||
public static BulletConfiguration getLunaticSabotRound() {
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_luna_sniper, 1, 0);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_luna_sniper.stackFromEnum(AmmoLunaticSniper.SABOT));
|
||||
bullet.spread = 0.0F;
|
||||
bullet.dmgMax = 500F;
|
||||
bullet.dmgMin = 450F;
|
||||
@ -122,6 +124,8 @@ public class Gun50BMGFactory {
|
||||
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 = 50;
|
||||
|
||||
@ -131,6 +135,8 @@ public class Gun50BMGFactory {
|
||||
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.bImpact = (projectile, x, y, z) -> projectile.worldObj.newExplosion(projectile, x, y, z, 25.0F, true, false);
|
||||
@ -181,7 +187,7 @@ public class Gun50BMGFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_50bmg, 1, 0);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_50bmg.stackFromEnum(Ammo50BMG.STOCK));
|
||||
bullet.spread *= inaccuracy;
|
||||
bullet.dmgMin = 30;
|
||||
bullet.dmgMax = 36;
|
||||
@ -193,7 +199,7 @@ public class Gun50BMGFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_50bmg, 1, 1);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_50bmg.stackFromEnum(Ammo50BMG.INCENDIARY));
|
||||
bullet.spread *= inaccuracy;
|
||||
bullet.dmgMin = 30;
|
||||
bullet.dmgMax = 36;
|
||||
@ -207,7 +213,7 @@ public class Gun50BMGFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_50bmg, 1, 2);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_50bmg.stackFromEnum(Ammo50BMG.PHOSPHORUS));
|
||||
bullet.spread *= inaccuracy;
|
||||
bullet.dmgMin = 30;
|
||||
bullet.dmgMax = 36;
|
||||
@ -242,7 +248,7 @@ public class Gun50BMGFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_50bmg, 1, 3);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_50bmg.stackFromEnum(Ammo50BMG.EXPLOSIVE));
|
||||
bullet.spread *= inaccuracy;
|
||||
bullet.dmgMin = 60;
|
||||
bullet.dmgMax = 64;
|
||||
@ -256,7 +262,7 @@ public class Gun50BMGFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_50bmg, 1, 4);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_50bmg.stackFromEnum(Ammo50BMG.AP));
|
||||
bullet.spread *= inaccuracy;
|
||||
bullet.dmgMin = 62;
|
||||
bullet.dmgMax = 68;
|
||||
@ -270,7 +276,7 @@ public class Gun50BMGFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_50bmg, 1, 5);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_50bmg.stackFromEnum(Ammo50BMG.DU));
|
||||
bullet.spread *= inaccuracy;
|
||||
bullet.dmgMin = 80;
|
||||
bullet.dmgMax = 86;
|
||||
@ -284,7 +290,7 @@ public class Gun50BMGFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_50bmg, 1, 6);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_50bmg.stackFromEnum(Ammo50BMG.STAR));
|
||||
bullet.spread *= inaccuracy;
|
||||
bullet.dmgMin = 98;
|
||||
bullet.dmgMax = 102;
|
||||
@ -298,7 +304,7 @@ public class Gun50BMGFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_50bmg, 1, 8);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_50bmg.stackFromEnum(Ammo50BMG.SLEEK));
|
||||
bullet.spread *= inaccuracy;
|
||||
bullet.dmgMin = 50;
|
||||
bullet.dmgMax = 70;
|
||||
@ -348,7 +354,7 @@ public class Gun50BMGFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_50bmg, 1, 9);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_50bmg.stackFromEnum(Ammo50BMG.FLECHETTE));
|
||||
bullet.spread *= inaccuracy;
|
||||
bullet.dmgMin = 50;
|
||||
bullet.dmgMax = 54;
|
||||
@ -360,8 +366,8 @@ public class Gun50BMGFactory {
|
||||
public static BulletConfiguration get50BMGFlechetteAMConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_50bmg, 1, 10);
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_50bmg.stackFromEnum(Ammo50BMG.FLECHETTE_AM));
|
||||
bullet.spread *= inaccuracy;
|
||||
bullet.dmgMin = 60;
|
||||
bullet.dmgMax = 64;
|
||||
@ -387,8 +393,8 @@ public class Gun50BMGFactory {
|
||||
public static BulletConfiguration get50BMGFlechettePOConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_50bmg, 1, 11);
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_50bmg.stackFromEnum(Ammo50BMG.FLECHETTE_PO));
|
||||
bullet.spread *= inaccuracy;
|
||||
bullet.dmgMin = 60;
|
||||
bullet.dmgMax = 64;
|
||||
|
||||
@ -9,6 +9,7 @@ import com.hbm.handler.GunConfiguration;
|
||||
import com.hbm.interfaces.IBulletHitBehavior;
|
||||
import com.hbm.interfaces.IBulletImpactBehavior;
|
||||
import com.hbm.inventory.RecipesCommon.ComparableStack;
|
||||
import com.hbm.items.ItemAmmoEnums.Ammo556mm;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.lib.HbmCollection;
|
||||
import com.hbm.lib.HbmCollection.EnumGunManufacturer;
|
||||
@ -126,7 +127,7 @@ public class Gun556mmFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_556, 1, 0);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_556.stackFromEnum(Ammo556mm.STOCK));
|
||||
bullet.spread *= inaccuracy;
|
||||
bullet.dmgMin = 16;
|
||||
bullet.dmgMax = 20;
|
||||
@ -138,7 +139,7 @@ public class Gun556mmFactory {
|
||||
|
||||
BulletConfiguration bullet = get556Config();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_556, 1, 1);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_556.stackFromEnum(Ammo556mm.GOLD));
|
||||
bullet.dmgMin = 250;
|
||||
bullet.dmgMax = 320;
|
||||
bullet.spread = 0.0F;
|
||||
@ -150,7 +151,7 @@ public class Gun556mmFactory {
|
||||
|
||||
BulletConfiguration bullet = get556Config();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_556, 1, 2);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_556.stackFromEnum(Ammo556mm.PHOSPHORUS));
|
||||
bullet.wear = 15;
|
||||
bullet.incendiary = 5;
|
||||
bullet.doesPenetrate = false;
|
||||
@ -182,7 +183,7 @@ public class Gun556mmFactory {
|
||||
|
||||
BulletConfiguration bullet = get556Config();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_556, 1, 3);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_556.stackFromEnum(Ammo556mm.AP));
|
||||
bullet.dmgMin = 20;
|
||||
bullet.dmgMax = 26;
|
||||
bullet.wear = 15;
|
||||
@ -195,7 +196,7 @@ public class Gun556mmFactory {
|
||||
|
||||
BulletConfiguration bullet = get556Config();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_556, 1, 4);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_556.stackFromEnum(Ammo556mm.DU));
|
||||
bullet.dmgMin = 24;
|
||||
bullet.dmgMax = 32;
|
||||
bullet.wear = 25;
|
||||
@ -208,7 +209,7 @@ public class Gun556mmFactory {
|
||||
|
||||
BulletConfiguration bullet = get556Config();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_556, 1, 5);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_556.stackFromEnum(Ammo556mm.STAR));
|
||||
bullet.dmgMin = 30;
|
||||
bullet.dmgMax = 36;
|
||||
bullet.wear = 25;
|
||||
@ -221,7 +222,7 @@ public class Gun556mmFactory {
|
||||
|
||||
BulletConfiguration bullet = get556Config();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_556, 1, 7);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_556.stackFromEnum(Ammo556mm.SLEEK));
|
||||
bullet.dmgMin = 45;
|
||||
bullet.dmgMax = 50;
|
||||
bullet.wear = 10;
|
||||
@ -270,7 +271,7 @@ public class Gun556mmFactory {
|
||||
|
||||
BulletConfiguration bullet = get556Config();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_556, 1, 8);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_556.stackFromEnum(Ammo556mm.TRACER));
|
||||
bullet.vPFX = "reddust";
|
||||
|
||||
return bullet;
|
||||
@ -280,7 +281,7 @@ public class Gun556mmFactory {
|
||||
|
||||
BulletConfiguration bullet = get556Config();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_556, 1, 9);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_556.stackFromEnum(Ammo556mm.FLECHETTE));
|
||||
bullet.dmgMin = 26;
|
||||
bullet.dmgMax = 32;
|
||||
bullet.HBRC = 2;
|
||||
@ -296,7 +297,7 @@ public class Gun556mmFactory {
|
||||
|
||||
BulletConfiguration bullet = get556FlechetteConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_556, 1, 10);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_556.stackFromEnum(Ammo556mm.FLECHETTE_INCENDIARY));
|
||||
bullet.incendiary = 5;
|
||||
|
||||
return bullet;
|
||||
@ -306,7 +307,7 @@ public class Gun556mmFactory {
|
||||
|
||||
BulletConfiguration bullet = get556FlechetteConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_556, 1, 11);
|
||||
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);
|
||||
@ -336,7 +337,7 @@ public class Gun556mmFactory {
|
||||
|
||||
BulletConfiguration bullet = get556FlechetteConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_556, 1, 12);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_556.stackFromEnum(Ammo556mm.FLECHETTE_DU));
|
||||
bullet.dmgMin = 46;
|
||||
bullet.dmgMax = 52;
|
||||
bullet.wear = 25;
|
||||
@ -350,7 +351,7 @@ public class Gun556mmFactory {
|
||||
|
||||
BulletConfiguration bullet = get556FlechetteConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_556, 1, 13);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_556.stackFromEnum(Ammo556mm.FLECHETTE_SLEEK));
|
||||
bullet.dmgMin = 45;
|
||||
bullet.dmgMax = 50;
|
||||
bullet.wear = 10;
|
||||
@ -399,7 +400,7 @@ public class Gun556mmFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_556, 1, 14);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_556.stackFromEnum(Ammo556mm.K));
|
||||
bullet.dmgMin = 0;
|
||||
bullet.dmgMax = 0;
|
||||
bullet.maxAge = 0;
|
||||
|
||||
@ -1,11 +1,9 @@
|
||||
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.ItemAmmoEnums.Ammo5mm;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.lib.HbmCollection;
|
||||
import com.hbm.lib.HbmCollection.EnumGunManufacturer;
|
||||
@ -64,23 +62,17 @@ public class Gun5mmFactory {
|
||||
config.name = "lacunae";
|
||||
config.manufacturer = EnumGunManufacturer.ROCKWELL_U;
|
||||
|
||||
config.config = new ArrayList<Integer>();
|
||||
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 = HbmCollection.fiveMMBolt;
|
||||
|
||||
return config;
|
||||
}
|
||||
|
||||
private static float inaccuracy = 10;
|
||||
private static byte i = 0;
|
||||
public static BulletConfiguration get5mmConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_5mm, 1, i++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_5mm.stackFromEnum(Ammo5mm.STOCK));
|
||||
bullet.spread *= inaccuracy;
|
||||
bullet.dmgMin = 12;
|
||||
bullet.dmgMax = 14;
|
||||
@ -92,7 +84,7 @@ public class Gun5mmFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_5mm, 1, i++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_5mm.stackFromEnum(Ammo5mm.EXPLOSIVE));
|
||||
bullet.spread *= inaccuracy;
|
||||
bullet.dmgMin = 30;
|
||||
bullet.dmgMax = 32;
|
||||
@ -106,7 +98,7 @@ public class Gun5mmFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_5mm, 1, i++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_5mm.stackFromEnum(Ammo5mm.DU));
|
||||
bullet.spread *= inaccuracy;
|
||||
bullet.dmgMin = 36;
|
||||
bullet.dmgMax = 40;
|
||||
@ -120,7 +112,7 @@ public class Gun5mmFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_5mm, 1, i++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_5mm.stackFromEnum(Ammo5mm.STAR));
|
||||
bullet.spread *= inaccuracy;
|
||||
bullet.dmgMin = 46;
|
||||
bullet.dmgMax = 50;
|
||||
|
||||
@ -8,6 +8,7 @@ import com.hbm.handler.GunConfiguration;
|
||||
import com.hbm.interfaces.IBulletHurtBehavior;
|
||||
import com.hbm.interfaces.IBulletImpactBehavior;
|
||||
import com.hbm.inventory.RecipesCommon.ComparableStack;
|
||||
import com.hbm.items.ItemAmmoEnums.Ammo75Bolt;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.lib.HbmCollection;
|
||||
import com.hbm.lib.HbmCollection.EnumGunManufacturer;
|
||||
@ -83,12 +84,11 @@ public class Gun75BoltFactory {
|
||||
}
|
||||
|
||||
private static float inaccuracy = 0.5F;
|
||||
private static byte i = 0;
|
||||
public static BulletConfiguration get75BoltConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_75bolt, 1, i++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_75bolt.stackFromEnum(Ammo75Bolt.STOCK));
|
||||
bullet.ammoCount = 30;
|
||||
bullet.spread *= inaccuracy;
|
||||
bullet.dmgMin = 74;
|
||||
@ -126,7 +126,7 @@ public class Gun75BoltFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_75bolt, 1, i++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_75bolt.stackFromEnum(Ammo75Bolt.INCENDIARY));
|
||||
bullet.ammoCount = 30;
|
||||
bullet.spread *= inaccuracy;
|
||||
bullet.dmgMin = 72;
|
||||
@ -164,7 +164,7 @@ public class Gun75BoltFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_75bolt, 1, i++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_75bolt.stackFromEnum(Ammo75Bolt.HE));
|
||||
bullet.ammoCount = 30;
|
||||
bullet.spread *= inaccuracy;
|
||||
bullet.dmgMin = 94;
|
||||
|
||||
@ -6,6 +6,7 @@ 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.ItemAmmoEnums.Ammo762NATO;
|
||||
import com.hbm.lib.HbmCollection;
|
||||
import com.hbm.lib.HbmCollection.EnumGunManufacturer;
|
||||
import com.hbm.potion.HbmPotion;
|
||||
@ -98,7 +99,7 @@ public class Gun762mmFactory {
|
||||
public static BulletConfiguration get762NATOConfig() {
|
||||
final BulletConfiguration bullet = Gun556mmFactory.get556Config().clone();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_308, 1, 0);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_762.stackFromEnum(Ammo762NATO.STOCK));
|
||||
bullet.dmgMax *= 2;
|
||||
bullet.dmgMin *= 2;
|
||||
bullet.velocity *= 2.5;
|
||||
@ -111,7 +112,7 @@ public class Gun762mmFactory {
|
||||
public static BulletConfiguration get762APConfig() {
|
||||
final BulletConfiguration bullet = get762NATOConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_308, 1, 1);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_762.stackFromEnum(Ammo762NATO.AP));
|
||||
bullet.dmgMax *= 1.5;
|
||||
bullet.dmgMin *= 1.5;
|
||||
|
||||
@ -121,7 +122,7 @@ public class Gun762mmFactory {
|
||||
public static BulletConfiguration get762DUConfig() {
|
||||
final BulletConfiguration bullet = get762NATOConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_308, 1, 2);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_762.stackFromEnum(Ammo762NATO.DU));
|
||||
bullet.dmgMax *= 2;
|
||||
bullet.dmgMin *= 2;
|
||||
|
||||
@ -131,7 +132,7 @@ public class Gun762mmFactory {
|
||||
public static BulletConfiguration get762TracerConfig() {
|
||||
final BulletConfiguration bullet = get762NATOConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_308, 1, 3);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_762.stackFromEnum(Ammo762NATO.TRACER));
|
||||
bullet.vPFX = "reddust";
|
||||
|
||||
return bullet;
|
||||
@ -140,7 +141,7 @@ public class Gun762mmFactory {
|
||||
public static BulletConfiguration get762WPConfig() {
|
||||
final BulletConfiguration bullet = get762NATOConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_308, 1, 4);
|
||||
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);
|
||||
@ -154,7 +155,7 @@ public class Gun762mmFactory {
|
||||
public static BulletConfiguration get762BlankConfig() {
|
||||
final BulletConfiguration bullet = get762NATOConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_308, 1, 5);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_762.stackFromEnum(Ammo762NATO.BLANK));
|
||||
bullet.dmgMax = 0;
|
||||
bullet.dmgMin = 0;
|
||||
bullet.maxAge = 0;
|
||||
|
||||
@ -7,6 +7,7 @@ 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.ItemAmmoEnums.Ammo9mm;
|
||||
import com.hbm.lib.HbmCollection.EnumGunManufacturer;
|
||||
import com.hbm.render.util.RenderScreenOverlay.Crosshair;
|
||||
|
||||
@ -81,7 +82,7 @@ public class Gun9mmFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_9mm, 1, 0);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_9mm.stackFromEnum(Ammo9mm.STOCK));
|
||||
bullet.spread *= inaccuracy;
|
||||
bullet.dmgMin = 10;
|
||||
bullet.dmgMax = 14;
|
||||
@ -93,7 +94,7 @@ public class Gun9mmFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_9mm, 1, 1);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_9mm.stackFromEnum(Ammo9mm.AP));
|
||||
bullet.spread *= inaccuracy;
|
||||
bullet.dmgMin = 18;
|
||||
bullet.dmgMax = 20;
|
||||
@ -107,7 +108,7 @@ public class Gun9mmFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardPistolConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_9mm, 1, 2);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_9mm.stackFromEnum(Ammo9mm.DU));
|
||||
bullet.spread *= inaccuracy;
|
||||
bullet.dmgMin = 22;
|
||||
bullet.dmgMax = 26;
|
||||
@ -121,7 +122,7 @@ public class Gun9mmFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardRocketConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_9mm, 1, 3);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_9mm.stackFromEnum(Ammo9mm.ROCKET));
|
||||
bullet.velocity = 5;
|
||||
bullet.explosive = 7.5F;
|
||||
bullet.trail = 5;
|
||||
|
||||
@ -4,16 +4,16 @@ import com.hbm.entity.projectile.EntityBulletBase;
|
||||
import com.hbm.handler.BulletConfiguration;
|
||||
import com.hbm.interfaces.IBulletImpactBehavior;
|
||||
import com.hbm.inventory.RecipesCommon.ComparableStack;
|
||||
import com.hbm.items.ItemAmmoEnums.Ammo240Shell;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
public class GunCannonFactory {
|
||||
|
||||
private static byte i = 0;
|
||||
public static BulletConfiguration getShellConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardShellConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_shell, 1, i++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_shell.stackFromEnum(Ammo240Shell.STOCK));
|
||||
bullet.dmgMin = 25;
|
||||
bullet.dmgMax = 35;
|
||||
bullet.explosive = 4F;
|
||||
@ -26,7 +26,7 @@ public class GunCannonFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardShellConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_shell, 1, i++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_shell.stackFromEnum(Ammo240Shell.EXPLOSIVE));
|
||||
bullet.dmgMin = 35;
|
||||
bullet.dmgMax = 45;
|
||||
bullet.explosive = 4F;
|
||||
@ -39,7 +39,7 @@ public class GunCannonFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardShellConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_shell, 1, i++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_shell.stackFromEnum(Ammo240Shell.APFSDS_T));
|
||||
bullet.dmgMin = 50;
|
||||
bullet.dmgMax = 55;
|
||||
bullet.doesPenetrate = true;
|
||||
@ -52,7 +52,7 @@ public class GunCannonFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardShellConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_shell, 1, i++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_shell.stackFromEnum(Ammo240Shell.APFSDS_DU));
|
||||
bullet.dmgMin = 70;
|
||||
bullet.dmgMax = 80;
|
||||
bullet.doesPenetrate = true;
|
||||
@ -65,7 +65,7 @@ public class GunCannonFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardShellConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_shell, 1, i++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_shell.stackFromEnum(Ammo240Shell.W9));
|
||||
bullet.dmgMin = 100;
|
||||
bullet.dmgMax = 150;
|
||||
|
||||
|
||||
@ -9,6 +9,7 @@ import com.hbm.handler.BulletConfiguration;
|
||||
import com.hbm.handler.GunConfiguration;
|
||||
import com.hbm.interfaces.IBulletHurtBehavior;
|
||||
import com.hbm.inventory.RecipesCommon.ComparableStack;
|
||||
import com.hbm.items.ItemAmmoEnums.AmmoDart;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.weapon.ItemGunDart;
|
||||
import com.hbm.lib.HbmCollection.EnumGunManufacturer;
|
||||
@ -89,7 +90,7 @@ public class GunDartFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_dart, 1, 0);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_dart.stackFromEnum(AmmoDart.GPS));
|
||||
bullet.velocity = 5.0F;
|
||||
bullet.spread = 0;
|
||||
bullet.dmgMin = 1;
|
||||
@ -135,7 +136,7 @@ public class GunDartFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_dart, 1, 1);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_dart.stackFromEnum(AmmoDart.NUCLEAR));
|
||||
bullet.velocity = 5.0F;
|
||||
bullet.spread = 0;
|
||||
bullet.dmgMin = 1;
|
||||
@ -172,7 +173,7 @@ public class GunDartFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_dart, 1, 2);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_dart.stackFromEnum(AmmoDart.NERF));
|
||||
bullet.velocity = 1.0F;
|
||||
bullet.gravity = 0.04D;
|
||||
bullet.dmgMin = 0;
|
||||
|
||||
@ -12,6 +12,8 @@ import com.hbm.handler.GunConfiguration;
|
||||
import com.hbm.interfaces.IBulletImpactBehavior;
|
||||
import com.hbm.interfaces.IBulletUpdateBehavior;
|
||||
import com.hbm.inventory.RecipesCommon.ComparableStack;
|
||||
import com.hbm.items.ItemAmmoEnums.AmmoFireExt;
|
||||
import com.hbm.items.ItemAmmoEnums.AmmoFlamethrower;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.lib.HbmCollection.EnumGunManufacturer;
|
||||
import com.hbm.lib.ModDamageSource;
|
||||
@ -215,12 +217,11 @@ public class GunEnergyFactory {
|
||||
return bullet;
|
||||
}
|
||||
|
||||
private static byte i1 = 0;
|
||||
public static BulletConfiguration getFlameConfig() {
|
||||
|
||||
BulletConfiguration bullet = new BulletConfiguration();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_fuel, 1, i1++);;
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_fuel.stackFromEnum(AmmoFlamethrower.DIESEL));
|
||||
bullet.ammoCount = 100;
|
||||
|
||||
bullet.velocity = 0.75F;
|
||||
@ -268,7 +269,7 @@ public class GunEnergyFactory {
|
||||
|
||||
BulletConfiguration bullet = getFlameConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_fuel, 1, i1++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_fuel.stackFromEnum(AmmoFlamethrower.NAPALM));
|
||||
bullet.wear = 2;
|
||||
bullet.dmgMin = 4;
|
||||
bullet.dmgMax = 6;
|
||||
@ -281,7 +282,7 @@ public class GunEnergyFactory {
|
||||
|
||||
BulletConfiguration bullet = getFlameConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_fuel, 1, i1++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_fuel.stackFromEnum(AmmoFlamethrower.PHOSPHORUS));
|
||||
bullet.wear = 2;
|
||||
bullet.spread = 0.0F;
|
||||
bullet.bulletsMin = 1;
|
||||
@ -300,7 +301,7 @@ public class GunEnergyFactory {
|
||||
|
||||
BulletConfiguration bullet = getFlameConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_fuel, 1, i1++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_fuel.stackFromEnum(AmmoFlamethrower.VAPORIZER));
|
||||
bullet.wear = 4;
|
||||
bullet.spread = 0.25F;
|
||||
bullet.bulletsMin = 8;
|
||||
@ -325,7 +326,7 @@ public class GunEnergyFactory {
|
||||
|
||||
BulletConfiguration bullet = getFlameConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_fuel, 1, i1++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_fuel.stackFromEnum(AmmoFlamethrower.CHLORINE));
|
||||
bullet.wear = 1;
|
||||
bullet.spread = 0.05F;
|
||||
bullet.gravity = 0D;
|
||||
@ -343,12 +344,11 @@ public class GunEnergyFactory {
|
||||
return bullet;
|
||||
}
|
||||
|
||||
private static byte i2 = 0;
|
||||
public static BulletConfiguration getFextConfig() {
|
||||
|
||||
BulletConfiguration bullet = new BulletConfiguration();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_fireext, 1, i2++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_fireext.stackFromEnum(AmmoFireExt.WATER));
|
||||
bullet.ammoCount = 300;
|
||||
|
||||
bullet.velocity = 0.75F;
|
||||
@ -436,7 +436,7 @@ public class GunEnergyFactory {
|
||||
|
||||
BulletConfiguration bullet = getFextConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_fireext, 1, i2++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_fireext.stackFromEnum(AmmoFireExt.FOAM));
|
||||
bullet.spread = 0.05F;
|
||||
|
||||
bullet.bImpact = new IBulletImpactBehavior() {
|
||||
@ -517,7 +517,7 @@ public class GunEnergyFactory {
|
||||
|
||||
BulletConfiguration bullet = getFextConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_fireext, 1, i2++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_fireext.stackFromEnum(AmmoFireExt.SAND));
|
||||
bullet.spread = 0.1F;
|
||||
|
||||
bullet.bImpact = new IBulletImpactBehavior() {
|
||||
|
||||
@ -15,6 +15,7 @@ import com.hbm.interfaces.IBulletImpactBehavior;
|
||||
import com.hbm.interfaces.IBulletUpdateBehavior;
|
||||
import com.hbm.inventory.RecipesCommon.ComparableStack;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.ItemAmmoEnums.AmmoFatman;
|
||||
import com.hbm.lib.HbmCollection.EnumGunManufacturer;
|
||||
import com.hbm.packet.AuxParticlePacketNT;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
@ -129,7 +130,7 @@ public class GunFatmanFactory {
|
||||
public static BulletConfiguration getNukeConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardNukeConfig();
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_nuke, 1, 0);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_nuke.stackFromEnum(AmmoFatman.STOCK));
|
||||
|
||||
bullet.bImpact = new IBulletImpactBehavior() {
|
||||
|
||||
@ -145,7 +146,7 @@ public class GunFatmanFactory {
|
||||
public static BulletConfiguration getNukeLowConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardNukeConfig();
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_nuke, 1, 1);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_nuke.stackFromEnum(AmmoFatman.LOW));
|
||||
|
||||
bullet.bImpact = new IBulletImpactBehavior() {
|
||||
|
||||
@ -161,7 +162,7 @@ public class GunFatmanFactory {
|
||||
public static BulletConfiguration getNukeHighConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardNukeConfig();
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_nuke, 1, 2);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_nuke.stackFromEnum(AmmoFatman.HIGH));
|
||||
|
||||
bullet.bImpact = new IBulletImpactBehavior() {
|
||||
|
||||
@ -177,7 +178,7 @@ public class GunFatmanFactory {
|
||||
public static BulletConfiguration getNukeTotsConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardNukeConfig();
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_nuke, 1, 3);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_nuke.stackFromEnum(AmmoFatman.TOTS));
|
||||
bullet.bulletsMin = 8;
|
||||
bullet.bulletsMax = 8;
|
||||
bullet.spread = 0.1F;
|
||||
@ -197,7 +198,7 @@ public class GunFatmanFactory {
|
||||
public static BulletConfiguration getNukeSafeConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardNukeConfig();
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_nuke, 1, 4);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_nuke.stackFromEnum(AmmoFatman.SAFE));
|
||||
|
||||
bullet.bImpact = new IBulletImpactBehavior() {
|
||||
|
||||
@ -213,7 +214,7 @@ public class GunFatmanFactory {
|
||||
public static BulletConfiguration getNukePumpkinConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardNukeConfig();
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_nuke, 1, 5);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_nuke.stackFromEnum(AmmoFatman.PUMPKIN));
|
||||
bullet.explosive = 10F;
|
||||
|
||||
bullet.bImpact = new IBulletImpactBehavior() {
|
||||
@ -244,7 +245,7 @@ public class GunFatmanFactory {
|
||||
public static BulletConfiguration getNukeBarrelConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardNukeConfig();
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_nuke, 1, 6);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_nuke.stackFromEnum(AmmoFatman.BARREL));
|
||||
bullet.explosive = 3F;
|
||||
bullet.style = bullet.STYLE_BARREL;
|
||||
|
||||
@ -302,7 +303,7 @@ public class GunFatmanFactory {
|
||||
|
||||
BulletConfiguration bullet = getNukeConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_nuke, 1, 7);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_nuke.stackFromEnum(AmmoFatman.MIRV));
|
||||
bullet.style = BulletConfiguration.STYLE_MIRV;
|
||||
bullet.velocity *= 3;
|
||||
|
||||
@ -339,7 +340,7 @@ public class GunFatmanFactory {
|
||||
|
||||
BulletConfiguration bullet = getNukeLowConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_nuke, 1, 8);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_nuke.stackFromEnum(AmmoFatman.MIRV_LOW));
|
||||
bullet.style = BulletConfiguration.STYLE_MIRV;
|
||||
bullet.velocity *= 3;
|
||||
|
||||
@ -376,7 +377,7 @@ public class GunFatmanFactory {
|
||||
|
||||
BulletConfiguration bullet = getNukeHighConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_nuke, 1, 9);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_nuke.stackFromEnum(AmmoFatman.MIRV_HIGH));
|
||||
bullet.style = BulletConfiguration.STYLE_MIRV;
|
||||
bullet.velocity *= 3;
|
||||
|
||||
@ -413,7 +414,7 @@ public class GunFatmanFactory {
|
||||
|
||||
BulletConfiguration bullet = getNukeSafeConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_nuke, 1, 10);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_nuke.stackFromEnum(AmmoFatman.MIRV_SAFE));
|
||||
bullet.style = BulletConfiguration.STYLE_MIRV;
|
||||
bullet.velocity *= 3;
|
||||
|
||||
@ -450,7 +451,7 @@ public class GunFatmanFactory {
|
||||
|
||||
BulletConfiguration bullet = getNukeConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_nuke, 1, 11);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_nuke.stackFromEnum(AmmoFatman.MIRV_SPECIAL));
|
||||
bullet.style = BulletConfiguration.STYLE_MIRV;
|
||||
bullet.velocity *= 3;
|
||||
|
||||
@ -498,7 +499,7 @@ public class GunFatmanFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardNukeConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_nuke, 1, 12);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_nuke.stackFromEnum(AmmoFatman.BALEFIRE));
|
||||
bullet.style = BulletConfiguration.STYLE_BF;
|
||||
|
||||
bullet.bImpact = new IBulletImpactBehavior() {
|
||||
|
||||
@ -9,6 +9,7 @@ import com.hbm.handler.GunConfiguration;
|
||||
import com.hbm.interfaces.IBulletImpactBehavior;
|
||||
import com.hbm.inventory.RecipesCommon.ComparableStack;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.ItemAmmoEnums.AmmoGrenade;
|
||||
import com.hbm.lib.HbmCollection.EnumGunManufacturer;
|
||||
import com.hbm.render.util.RenderScreenOverlay.Crosshair;
|
||||
|
||||
@ -53,12 +54,11 @@ public class GunGrenadeFactory {
|
||||
return config;
|
||||
}
|
||||
|
||||
private static byte i = 0;
|
||||
public static BulletConfiguration getGrenadeConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardGrenadeConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_grenade, 1, i++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_grenade.stackFromEnum(AmmoGrenade.STOCK));
|
||||
bullet.velocity = 2.0F;
|
||||
bullet.dmgMin = 10;
|
||||
bullet.dmgMax = 15;
|
||||
@ -72,7 +72,7 @@ public class GunGrenadeFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardGrenadeConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_grenade, 1, i++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_grenade.stackFromEnum(AmmoGrenade.HE));
|
||||
bullet.velocity = 2.0F;
|
||||
bullet.dmgMin = 20;
|
||||
bullet.dmgMax = 15;
|
||||
@ -87,7 +87,7 @@ public class GunGrenadeFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardGrenadeConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_grenade, 1, i++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_grenade.stackFromEnum(AmmoGrenade.INCENDIARY));
|
||||
bullet.velocity = 2.0F;
|
||||
bullet.dmgMin = 15;
|
||||
bullet.dmgMax = 15;
|
||||
@ -102,7 +102,7 @@ public class GunGrenadeFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardGrenadeConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_grenade, 1, i++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_grenade.stackFromEnum(AmmoGrenade.PHOSPHORUS));
|
||||
bullet.velocity = 2.0F;
|
||||
bullet.dmgMin = 15;
|
||||
bullet.dmgMax = 15;
|
||||
@ -119,7 +119,7 @@ public class GunGrenadeFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardGrenadeConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_grenade, 1, i++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_grenade.stackFromEnum(AmmoGrenade.CHLORINE));
|
||||
bullet.velocity = 2.0F;
|
||||
bullet.dmgMin = 10;
|
||||
bullet.dmgMax = 15;
|
||||
@ -135,7 +135,7 @@ public class GunGrenadeFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardGrenadeConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_grenade, 1, i++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_grenade.stackFromEnum(AmmoGrenade.SLEEK));
|
||||
bullet.velocity = 2.0F;
|
||||
bullet.dmgMin = 10;
|
||||
bullet.dmgMax = 15;
|
||||
@ -151,7 +151,7 @@ public class GunGrenadeFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardGrenadeConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_grenade, 1, i++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_grenade.stackFromEnum(AmmoGrenade.CONCUSSION));
|
||||
bullet.velocity = 2.0F;
|
||||
bullet.dmgMin = 15;
|
||||
bullet.dmgMax = 20;
|
||||
@ -166,7 +166,7 @@ public class GunGrenadeFactory {
|
||||
|
||||
BulletConfiguration bullet = getGrenadeConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_grenade, 1, i++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_grenade.stackFromEnum(AmmoGrenade.FINNED));
|
||||
bullet.gravity = 0.02;
|
||||
bullet.explosive = 1.5F;
|
||||
bullet.trail = 5;
|
||||
@ -178,7 +178,7 @@ public class GunGrenadeFactory {
|
||||
|
||||
BulletConfiguration bullet = getGrenadeConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_grenade, 1, i++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_grenade.stackFromEnum(AmmoGrenade.NUCLEAR));
|
||||
bullet.velocity = 4;
|
||||
bullet.explosive = 0.0F;
|
||||
|
||||
@ -197,7 +197,7 @@ public class GunGrenadeFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardGrenadeConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_grenade, 1, i++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_grenade.stackFromEnum(AmmoGrenade.TRACER));
|
||||
bullet.velocity = 2.0F;
|
||||
bullet.wear = 10;
|
||||
bullet.explosive = 0F;
|
||||
@ -211,7 +211,7 @@ public class GunGrenadeFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardRocketConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_grenade, 1, i++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_grenade.stackFromEnum(AmmoGrenade.KAMPF));
|
||||
bullet.spread = 0.0F;
|
||||
bullet.gravity = 0.0D;
|
||||
bullet.wear = 15;
|
||||
|
||||
@ -12,6 +12,7 @@ import com.hbm.interfaces.IBulletRicochetBehavior;
|
||||
import com.hbm.interfaces.IBulletUpdateBehavior;
|
||||
import com.hbm.inventory.RecipesCommon.ComparableStack;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.ItemAmmoEnums.AmmoRocket;
|
||||
import com.hbm.lib.HbmCollection.EnumGunManufacturer;
|
||||
import com.hbm.render.anim.BusAnimation;
|
||||
import com.hbm.render.anim.BusAnimationKeyframe;
|
||||
@ -171,12 +172,11 @@ public class GunRocketFactory {
|
||||
return config;
|
||||
}
|
||||
|
||||
private static byte i = 0;
|
||||
public static BulletConfiguration getRocketConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardRocketConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_rocket, 1, i++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_rocket.stackFromEnum(AmmoRocket.STOCK));
|
||||
bullet.dmgMin = 10;
|
||||
bullet.dmgMax = 15;
|
||||
bullet.explosive = 4F;
|
||||
@ -189,7 +189,7 @@ public class GunRocketFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardRocketConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_rocket, 1, i++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_rocket.stackFromEnum(AmmoRocket.HE));
|
||||
bullet.dmgMin = 10;
|
||||
bullet.dmgMax = 15;
|
||||
bullet.wear = 15;
|
||||
@ -203,7 +203,7 @@ public class GunRocketFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardRocketConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_rocket, 1, i++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_rocket.stackFromEnum(AmmoRocket.INCENDIARY));
|
||||
bullet.dmgMin = 10;
|
||||
bullet.dmgMax = 15;
|
||||
bullet.wear = 15;
|
||||
@ -218,7 +218,7 @@ public class GunRocketFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardRocketConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_rocket, 1, i++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_rocket.stackFromEnum(AmmoRocket.EMP));
|
||||
bullet.dmgMin = 10;
|
||||
bullet.dmgMax = 15;
|
||||
bullet.explosive = 2.5F;
|
||||
@ -232,7 +232,7 @@ public class GunRocketFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardRocketConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_rocket, 1, i++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_rocket.stackFromEnum(AmmoRocket.SLEEK));
|
||||
bullet.dmgMin = 10;
|
||||
bullet.dmgMax = 15;
|
||||
bullet.explosive = 10F;
|
||||
@ -247,7 +247,7 @@ public class GunRocketFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardRocketConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_rocket, 1, i++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_rocket.stackFromEnum(AmmoRocket.SHRAPNEL));
|
||||
bullet.dmgMin = 10;
|
||||
bullet.dmgMax = 15;
|
||||
bullet.explosive = 4F;
|
||||
@ -261,7 +261,7 @@ public class GunRocketFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardRocketConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_rocket, 1, i++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_rocket.stackFromEnum(AmmoRocket.GLARE));
|
||||
bullet.velocity = 5.0F;
|
||||
bullet.dmgMin = 10;
|
||||
bullet.dmgMax = 15;
|
||||
@ -277,7 +277,7 @@ public class GunRocketFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardRocketConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_rocket, 1, i++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_rocket.stackFromEnum(AmmoRocket.NUCLEAR));
|
||||
bullet.velocity = 1.5F;
|
||||
bullet.dmgMin = 10;
|
||||
bullet.dmgMax = 15;
|
||||
@ -301,7 +301,7 @@ public class GunRocketFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardRocketConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_rocket, 1, i++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_rocket.stackFromEnum(AmmoRocket.CHLORINE));
|
||||
bullet.velocity = 1.5F;
|
||||
bullet.dmgMin = 10;
|
||||
bullet.dmgMax = 15;
|
||||
@ -317,7 +317,7 @@ public class GunRocketFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardRocketConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_rocket, 1, i++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_rocket.stackFromEnum(AmmoRocket.RPC));
|
||||
bullet.velocity = 3.0F;
|
||||
bullet.dmgMin = 20;
|
||||
bullet.dmgMax = 25;
|
||||
@ -351,7 +351,7 @@ public class GunRocketFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardRocketConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_rocket, 1, i++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_rocket.stackFromEnum(AmmoRocket.PHOSPHORUS));
|
||||
bullet.dmgMin = 10;
|
||||
bullet.dmgMax = 15;
|
||||
bullet.wear = 15;
|
||||
@ -368,7 +368,7 @@ public class GunRocketFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardRocketConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_rocket, 1, i++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_rocket.stackFromEnum(AmmoRocket.CANISTER));
|
||||
bullet.dmgMin = 10;
|
||||
bullet.dmgMax = 15;
|
||||
bullet.explosive = 2F;
|
||||
@ -403,7 +403,7 @@ public class GunRocketFactory {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardRocketConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_rocket, 1, i++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_rocket.stackFromEnum(AmmoRocket.DIGAMMA));
|
||||
bullet.velocity = 0.5F;
|
||||
bullet.dmgMin = 10;
|
||||
bullet.dmgMax = 15;
|
||||
@ -426,22 +426,6 @@ public class GunRocketFactory {
|
||||
spear.posY = bullet.posY + 100;
|
||||
|
||||
bullet.worldObj.spawnEntityInWorld(spear);
|
||||
|
||||
/*for(int i = 0; i < 250; i++) {
|
||||
|
||||
double ix = bullet.posX + bullet.worldObj.rand.nextGaussian() * 15;
|
||||
double iy = bullet.posY + bullet.worldObj.rand.nextGaussian() * 2;
|
||||
double iz = bullet.posZ + bullet.worldObj.rand.nextGaussian() * 15;
|
||||
|
||||
ExAttrib at = Vec3.createVectorHelper(ix - bullet.posX, 0, iz - bullet.posZ).lengthVector() < 20 ? ExAttrib.DIGAMMA_CIRCUIT : ExAttrib.DIGAMMA;
|
||||
|
||||
new ExplosionNT(bullet.worldObj, bullet, ix, iy, iz, 7.5F)
|
||||
.addAttrib(ExAttrib.NOHURT)
|
||||
.addAttrib(ExAttrib.NOPARTICLE)
|
||||
.addAttrib(ExAttrib.NODROP)
|
||||
.addAttrib(ExAttrib.NOSOUND)
|
||||
.addAttrib(at).explode();
|
||||
}*/
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@ -9,6 +9,7 @@ import com.hbm.handler.BulletConfiguration;
|
||||
import com.hbm.handler.GunConfiguration;
|
||||
import com.hbm.interfaces.IBulletUpdateBehavior;
|
||||
import com.hbm.inventory.RecipesCommon.ComparableStack;
|
||||
import com.hbm.items.ItemAmmoEnums.AmmoStinger;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.lib.HbmCollection.EnumGunManufacturer;
|
||||
import com.hbm.render.util.RenderScreenOverlay.Crosshair;
|
||||
@ -88,11 +89,10 @@ GunConfiguration config = new GunConfiguration();
|
||||
return config;
|
||||
}
|
||||
|
||||
private static byte i = 0;
|
||||
public static BulletConfiguration getRocketStingerConfig() {
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardRocketConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_stinger_rocket, 1, i++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_stinger_rocket.stackFromEnum(AmmoStinger.STOCK));
|
||||
bullet.dmgMin = 20;
|
||||
bullet.dmgMax = 25;
|
||||
bullet.explosive = 4F;
|
||||
@ -128,7 +128,7 @@ GunConfiguration config = new GunConfiguration();
|
||||
public static BulletConfiguration getRocketStingerHEConfig() {
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardRocketConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_stinger_rocket, 1, i++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_stinger_rocket.stackFromEnum(AmmoStinger.HE));
|
||||
bullet.dmgMin = 30;
|
||||
bullet.dmgMax = 35;
|
||||
bullet.explosive = 8F;
|
||||
@ -165,7 +165,7 @@ GunConfiguration config = new GunConfiguration();
|
||||
public static BulletConfiguration getRocketStingerIncendiaryConfig() {
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardRocketConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_stinger_rocket, 1, i++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_stinger_rocket.stackFromEnum(AmmoStinger.INCENDIARY));
|
||||
bullet.dmgMin = 15;
|
||||
bullet.dmgMax = 20;
|
||||
bullet.explosive = 4F;
|
||||
@ -202,7 +202,7 @@ GunConfiguration config = new GunConfiguration();
|
||||
public static BulletConfiguration getRocketStingerNuclearConfig() {
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardRocketConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_stinger_rocket, 1, i++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_stinger_rocket.stackFromEnum(AmmoStinger.NUCLEAR));
|
||||
bullet.dmgMin = 50;
|
||||
bullet.dmgMax = 55;
|
||||
bullet.explosive = 15F;
|
||||
@ -239,7 +239,7 @@ GunConfiguration config = new GunConfiguration();
|
||||
public static BulletConfiguration getRocketStingerBonesConfig() {
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardRocketConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_stinger_rocket, 1, i++);
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_stinger_rocket.stackFromEnum(AmmoStinger.BONES));
|
||||
bullet.dmgMin = 20;
|
||||
bullet.dmgMax = 25;
|
||||
bullet.explosive = 8F;
|
||||
|
||||
@ -106,7 +106,7 @@ public class PressRecipes {
|
||||
makeRecipe(StampType.C50, new ComparableStack(ModItems.assembly_calamity), ModItems.ammo_50bmg);
|
||||
makeRecipe(StampType.C50, new ComparableStack(ModItems.assembly_actionexpress), ModItems.ammo_50ae);
|
||||
makeRecipe(StampType.C50, new ComparableStack(ModItems.assembly_luna_sniper), ModItems.ammo_luna_sniper.stackFromEnum(AmmoLunaticSniper.SABOT));
|
||||
makeRecipe(StampType.C50, new ComparableStack(ModItems.assembly_308), ModItems.ammo_308);
|
||||
makeRecipe(StampType.C50, new ComparableStack(ModItems.assembly_308), ModItems.ammo_762);
|
||||
}
|
||||
|
||||
public static void makeRecipe(StampType type, AStack in, Item out) {
|
||||
|
||||
@ -530,10 +530,10 @@ public class AnvilRecipes {
|
||||
{ModItems.ammo_45.stackFromEnum(20, Ammo45ACP.STOCK), DURA.ingot(), ModItems.ammo_45.stackFromEnum(20, Ammo45ACP.AP), 3},
|
||||
{ModItems.ammo_45.stackFromEnum(10, Ammo45ACP.DU), U238.ingot(), ModItems.ammo_45.stackFromEnum(10, Ammo45ACP.DU), 3},
|
||||
|
||||
{ModItems.ammo_5mm.stackFromEnum(20, Ammo5mm.STOCK), ModItems.ingot_semtex, ModItems.ammo_5mm.stackFromEnum(20, Ammo5mm.EXPLOSIVE), 2},
|
||||
{ModItems.ammo_5mm.stackFromEnum(20, Ammo5mm.STOCK), U238.ingot(), ModItems.ammo_5mm.stackFromEnum(20, Ammo5mm.DU), 2},
|
||||
{ModItems.ammo_5mm.stackFromEnum(10, Ammo5mm.STOCK), STAR.ingot(), ModItems.ammo_5mm.stackFromEnum(10, Ammo5mm.STAR), 3},
|
||||
{ModItems.ammo_5mm.stackFromEnum(10, Ammo5mm.STOCK), ModItems.pellet_chlorophyte, ModItems.ammo_5mm.stackFromEnum(10, Ammo5mm.CHLOROPHYTE), 3},
|
||||
{ModItems.ammo_5mm.stackFromEnum(100, Ammo5mm.STOCK), ModItems.ingot_semtex, ModItems.ammo_5mm.stackFromEnum(100, Ammo5mm.EXPLOSIVE), 2},
|
||||
{ModItems.ammo_5mm.stackFromEnum(100, Ammo5mm.STOCK), U238.ingot(), ModItems.ammo_5mm.stackFromEnum(100, Ammo5mm.DU), 2},
|
||||
{ModItems.ammo_5mm.stackFromEnum(25, Ammo5mm.DU), STAR.ingot(), ModItems.ammo_5mm.stackFromEnum(25, Ammo5mm.STAR), 3},
|
||||
{ModItems.ammo_5mm.stackFromEnum(100, Ammo5mm.STOCK), ModItems.pellet_chlorophyte, ModItems.ammo_5mm.stackFromEnum(100, Ammo5mm.CHLOROPHYTE), 3},
|
||||
|
||||
{ModItems.ammo_9mm.stackFromEnum(20, Ammo9mm.STOCK), DURA.ingot(), ModItems.ammo_9mm.stackFromEnum(20, Ammo9mm.AP), 2},
|
||||
{ModItems.ammo_9mm.stackFromEnum(20, Ammo9mm.STOCK), U238.ingot(), ModItems.ammo_9mm.stackFromEnum(20, Ammo9mm.DU), 2},
|
||||
@ -573,10 +573,10 @@ public class AnvilRecipes {
|
||||
{ModItems.ammo_556.stackFromEnum(100, Ammo556mm.FLECHETTE), ModItems.coin_maskman, ModItems.ammo_556.stackFromEnum(100, Ammo556mm.FLECHETTE_SLEEK), 4},
|
||||
{ModItems.ammo_556.stackFromEnum(10, Ammo556mm.FLECHETTE), ModItems.pellet_chlorophyte, ModItems.ammo_556.stackFromEnum(10, Ammo556mm.FLECHETTE_CHLOROPHYTE), 3},
|
||||
|
||||
{ModItems.ammo_308.stackFromEnum(20, Ammo762NATO.STOCK), Items.redstone, ModItems.ammo_308.stackFromEnum(20, Ammo762NATO.TRACER), 2},
|
||||
{ModItems.ammo_308.stackFromEnum(20, Ammo762NATO.STOCK), DURA.ingot(), ModItems.ammo_308.stackFromEnum(20, Ammo762NATO.AP), 2},
|
||||
{ModItems.ammo_308.stackFromEnum(20, Ammo762NATO.STOCK), P_WHITE.ingot(), ModItems.ammo_308.stackFromEnum(20, Ammo762NATO.PHOSPHORUS), 2},
|
||||
{ModItems.ammo_308.stackFromEnum(10, Ammo762NATO.STOCK), U238.ingot(), ModItems.ammo_308.stackFromEnum(20, Ammo762NATO.DU), 2}
|
||||
{ModItems.ammo_762.stackFromEnum(20, Ammo762NATO.STOCK), Items.redstone, ModItems.ammo_762.stackFromEnum(20, Ammo762NATO.TRACER), 2},
|
||||
{ModItems.ammo_762.stackFromEnum(20, Ammo762NATO.STOCK), DURA.ingot(), ModItems.ammo_762.stackFromEnum(20, Ammo762NATO.AP), 2},
|
||||
{ModItems.ammo_762.stackFromEnum(20, Ammo762NATO.STOCK), P_WHITE.ingot(), ModItems.ammo_762.stackFromEnum(20, Ammo762NATO.PHOSPHORUS), 2},
|
||||
{ModItems.ammo_762.stackFromEnum(10, Ammo762NATO.STOCK), U238.ingot(), ModItems.ammo_762.stackFromEnum(20, Ammo762NATO.DU), 2}
|
||||
};
|
||||
|
||||
for(Object[] objs : recs) {
|
||||
|
||||
@ -1487,7 +1487,7 @@ public class ModItems {
|
||||
public static ItemEnumMulti ammo_9mm;
|
||||
public static ItemEnumMulti ammo_45;
|
||||
public static ItemEnumMulti ammo_556;
|
||||
public static ItemEnumMulti ammo_308;
|
||||
public static ItemEnumMulti ammo_762;
|
||||
public static ItemEnumMulti ammo_22lr;
|
||||
public static ItemEnumMulti ammo_50ae;
|
||||
public static ItemEnumMulti ammo_50bmg;
|
||||
@ -4287,8 +4287,8 @@ public class ModItems {
|
||||
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, "desc.misc.556").setUnlocalizedName("ammo_556");
|
||||
ammo_308 = new ItemAmmo(Ammo762NATO.class, "desc.misc.762").setUnlocalizedName("ammo_308");
|
||||
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");
|
||||
@ -7425,11 +7425,12 @@ public class ModItems {
|
||||
GameRegistry.registerItem(ammo_5mm, ammo_5mm.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ammo_9mm, ammo_9mm.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ammo_556, ammo_556.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ammo_308, ammo_308.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());
|
||||
|
||||
@ -218,8 +218,6 @@ public class ItemGunBase extends Item implements IHoldableWeapon, IItemHUD, IEqu
|
||||
|
||||
BulletConfiguration config = altConfig.reloadType == altConfig.RELOAD_NONE ? getBeltCfg(player, stack, false) : BulletConfigSyncingUtil.pullConfig(altConfig.config.get(getMagType(stack)));
|
||||
|
||||
//System.out.println(config.ammo.getUnlocalizedName());
|
||||
|
||||
int bullets = config.bulletsMin;
|
||||
|
||||
for(int k = 0; k < altConfig.roundsPerCycle; k++) {
|
||||
@ -282,9 +280,7 @@ public class ItemGunBase extends Item implements IHoldableWeapon, IItemHUD, IEqu
|
||||
//called on click release (client side, called by update cycle)
|
||||
public void endActionClient(ItemStack stack, World world, EntityPlayer player, boolean main) { }
|
||||
|
||||
//martin 2 reload algorithm
|
||||
//now with less WET and more DRY
|
||||
//compact, readable and most importantly, FUNCTIONAL
|
||||
//current reload
|
||||
protected void reload2(ItemStack stack, World world, EntityPlayer player) {
|
||||
|
||||
if(getMag(stack) >= mainConfig.ammoCap) {
|
||||
@ -308,8 +304,7 @@ public class ItemGunBase extends Item implements IHoldableWeapon, IItemHUD, IEqu
|
||||
final int toConsume = (int) Math.ceil((double) toAdd / cfg.ammoCount);
|
||||
|
||||
// Skip logic if cannot reload
|
||||
if (availableFills == 0)
|
||||
{
|
||||
if(availableFills == 0) {
|
||||
setIsReloading(stack, false);
|
||||
return;
|
||||
}
|
||||
@ -456,19 +451,17 @@ public class ItemGunBase extends Item implements IHoldableWeapon, IItemHUD, IEqu
|
||||
public static ComparableStack getBeltType(EntityPlayer player, ItemStack stack, boolean main) {
|
||||
ItemGunBase gun = (ItemGunBase)stack.getItem();
|
||||
GunConfiguration guncfg = main ? gun.mainConfig : (gun.altConfig != null ? gun.altConfig : gun.mainConfig);
|
||||
ComparableStack ammo = BulletConfigSyncingUtil.pullConfig(guncfg.config.get(0)).ammo;
|
||||
|
||||
for(Integer config : guncfg.config) {
|
||||
|
||||
BulletConfiguration cfg = BulletConfigSyncingUtil.pullConfig(config);
|
||||
|
||||
if(InventoryUtil.doesPlayerHaveAStack(player, cfg.ammo, false, false)) {
|
||||
ammo = cfg.ammo;
|
||||
break;
|
||||
if(InventoryUtil.doesPlayerHaveAStack(player, cfg.ammo, false, true)) {
|
||||
return cfg.ammo;
|
||||
}
|
||||
}
|
||||
|
||||
return ammo;
|
||||
return BulletConfigSyncingUtil.pullConfig(guncfg.config.get(0)).ammo;
|
||||
}
|
||||
|
||||
//returns BCFG of belt-weapons
|
||||
@ -495,8 +488,9 @@ public class ItemGunBase extends Item implements IHoldableWeapon, IItemHUD, IEqu
|
||||
int amount = 0;
|
||||
|
||||
for(ItemStack stack : player.inventory.mainInventory) {
|
||||
if(stack != null && ammo.matchesRecipe(stack, true))
|
||||
if(stack != null && ammo.matchesRecipe(stack, true)) {
|
||||
amount += stack.stackSize;
|
||||
}
|
||||
}
|
||||
|
||||
return amount;
|
||||
|
||||
@ -54,7 +54,8 @@ public class HbmCollection {
|
||||
/** 7.62x51mm NATO **/
|
||||
public static final List<Integer> threeZeroEight = ImmutableList.of(BulletConfigSyncingUtil.W308);
|
||||
/** 5MM **/
|
||||
public static final List<Integer> fiveMM = ImmutableList.of(BulletConfigSyncingUtil.R5_NORMAL_BOLT, BulletConfigSyncingUtil.R5_EXPLOSIVE_BOLT, BulletConfigSyncingUtil.R5_DU_BOLT, BulletConfigSyncingUtil.R5_STAR_BOLT, BulletConfigSyncingUtil.CHL_R5_BOLT);
|
||||
public static final List<Integer> fiveMM = ImmutableList.of(BulletConfigSyncingUtil.R5_NORMAL, BulletConfigSyncingUtil.R5_EXPLOSIVE, BulletConfigSyncingUtil.R5_DU, BulletConfigSyncingUtil.R5_STAR, BulletConfigSyncingUtil.CHL_R5);
|
||||
public static final List<Integer> fiveMMBolt = 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<Integer> seventyFive = ImmutableList.of(BulletConfigSyncingUtil.B75_NORMAL, BulletConfigSyncingUtil.B75_INCENDIARY, BulletConfigSyncingUtil.B75_HE);
|
||||
|
||||
@ -3,7 +3,6 @@ package com.hbm.util;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.inventory.RecipesCommon.AStack;
|
||||
import com.hbm.inventory.RecipesCommon.ComparableStack;
|
||||
import com.hbm.inventory.recipes.anvil.AnvilRecipes.AnvilOutput;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@ -580,33 +579,28 @@ public class InventoryUtil {
|
||||
return countAStackMatches(player.inventory.mainInventory, stack, ignoreSize);
|
||||
}
|
||||
|
||||
public static boolean doesPlayerHaveAStack(EntityPlayer player, ComparableStack stack, boolean shouldRemove, boolean ignoreSize) {
|
||||
public static boolean doesPlayerHaveAStack(EntityPlayer player, AStack stack, boolean shouldRemove, boolean ignoreSize) {
|
||||
return doesInventoryHaveAStack(player.inventory.mainInventory, stack, shouldRemove, ignoreSize);
|
||||
}
|
||||
|
||||
public static boolean doesInventoryHaveAStack(ItemStack[] inventory, AStack stack, boolean shouldRemove, boolean ignoreSize)
|
||||
{
|
||||
|
||||
public static boolean doesInventoryHaveAStack(ItemStack[] inventory, AStack stack, boolean shouldRemove, boolean ignoreSize) {
|
||||
final int totalMatches;
|
||||
int totalStacks = 0;
|
||||
for (ItemStack itemStack : inventory)
|
||||
{
|
||||
if (itemStack != null && stack.matchesRecipe(itemStack, ignoreSize))
|
||||
for(ItemStack itemStack : inventory) {
|
||||
if(itemStack != null && stack.matchesRecipe(itemStack, ignoreSize))
|
||||
totalStacks += itemStack.stackSize;
|
||||
if (!shouldRemove && ignoreSize && totalStacks > 0)
|
||||
if(!shouldRemove && ignoreSize && totalStacks > 0)
|
||||
return true;
|
||||
}
|
||||
|
||||
totalMatches = ignoreSize ? totalStacks : totalStacks / stack.stacksize;
|
||||
|
||||
if (shouldRemove)
|
||||
{
|
||||
if(shouldRemove) {
|
||||
int consumedStacks = 0, requiredStacks = ignoreSize ? 1 : stack.stacksize;
|
||||
for (ItemStack itemStack : inventory)
|
||||
{
|
||||
if (consumedStacks > requiredStacks)
|
||||
for(ItemStack itemStack : inventory) {
|
||||
if(consumedStacks > requiredStacks)
|
||||
break;
|
||||
if (itemStack != null && stack.matchesRecipe(itemStack, true))
|
||||
{
|
||||
if(itemStack != null && stack.matchesRecipe(itemStack, true)) {
|
||||
final int toConsume = Math.min(itemStack.stackSize, requiredStacks - consumedStacks);
|
||||
itemStack.stackSize -= toConsume;
|
||||
consumedStacks += toConsume;
|
||||
|
||||
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 221 B After Width: | Height: | Size: 485 B |
|
Before Width: | Height: | Size: 485 B |
|
Before Width: | Height: | Size: 256 B After Width: | Height: | Size: 456 B |
|
Before Width: | Height: | Size: 230 B After Width: | Height: | Size: 494 B |
|
Before Width: | Height: | Size: 264 B After Width: | Height: | Size: 486 B |
|
Before Width: | Height: | Size: 266 B After Width: | Height: | Size: 539 B |