mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
split gun and bullet configs in classes based on type, more bullet cfgs
This commit is contained in:
parent
94795bbbf1
commit
e9a2e6c895
@ -17,6 +17,7 @@ import com.hbm.handler.BulletConfigSyncingUtil;
|
||||
import com.hbm.handler.BulletConfiguration;
|
||||
import com.hbm.lib.ModDamageSource;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.potion.HbmPotion;
|
||||
|
||||
import cpw.mods.fml.relauncher.ReflectionHelper;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
@ -376,6 +377,9 @@ public class EntityBulletBase extends Entity implements IProjectile {
|
||||
if(config.explosive > 0 && !worldObj.isRemote)
|
||||
worldObj.newExplosion(this, posX, posY, posZ, config.explosive, config.incendiary > 0, true);
|
||||
|
||||
if(config.jolt > 0 && !worldObj.isRemote)
|
||||
ExplosionLarge.jolt(worldObj, posX, posY, posZ, config.jolt, 150, 0.25);
|
||||
|
||||
if(config.shrapnel > 0 && !worldObj.isRemote)
|
||||
ExplosionLarge.spawnShrapnels(worldObj, posX, posY, posZ, config.shrapnel);
|
||||
|
||||
@ -457,16 +461,19 @@ public class EntityBulletBase extends Entity implements IProjectile {
|
||||
//for when a bullet hurts an entity, not necessarily dying
|
||||
private void onEntityHurt(Entity e) {
|
||||
|
||||
if(config.incendiary > 0)
|
||||
if(config.incendiary > 0 && !worldObj.isRemote)
|
||||
e.setFire(config.incendiary);
|
||||
|
||||
if(e instanceof EntityLivingBase && config.effects != null && !config.effects.isEmpty()) {
|
||||
if(config.leadChance > 0 && !worldObj.isRemote && worldObj.rand.nextInt(100) < config.leadChance && e instanceof EntityLivingBase)
|
||||
((EntityLivingBase)e).addPotionEffect(new PotionEffect(HbmPotion.lead.id, 10 * 20, 0));
|
||||
|
||||
if(e instanceof EntityLivingBase && config.effects != null && !config.effects.isEmpty() && !worldObj.isRemote) {
|
||||
|
||||
for(PotionEffect effect : config.effects)
|
||||
((EntityLivingBase)e).addPotionEffect(effect);
|
||||
}
|
||||
|
||||
if(config.instakill && e instanceof EntityLivingBase) {
|
||||
if(config.instakill && e instanceof EntityLivingBase && !worldObj.isRemote) {
|
||||
((EntityLivingBase)e).setHealth(0.0F);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,494 +0,0 @@
|
||||
package com.hbm.handler;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.potion.HbmPotion;
|
||||
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
|
||||
public class BulletConfigFactory {
|
||||
|
||||
/// configs should never be loaded manually due to syncing issues: use the syncing util and pass the UID in the DW of the bullet to make the client load the config correctly ////
|
||||
|
||||
protected static BulletConfiguration getTestConfig() {
|
||||
|
||||
BulletConfiguration bullet = new BulletConfiguration();
|
||||
|
||||
bullet.ammo = ModItems.gun_revolver_ammo;
|
||||
bullet.velocity = 5.0F;
|
||||
bullet.spread = 0.05F;
|
||||
bullet.wear = 10;
|
||||
bullet.dmgMin = 15;
|
||||
bullet.dmgMax = 17;
|
||||
bullet.bulletsMin = 1;
|
||||
bullet.bulletsMax = 1;
|
||||
bullet.gravity = 0D;
|
||||
bullet.maxAge = 100;
|
||||
bullet.doesRicochet = true;
|
||||
bullet.ricochetAngle = 10;
|
||||
bullet.HBRC = 2;
|
||||
bullet.LBRC = 90;
|
||||
bullet.bounceMod = 0.8;
|
||||
bullet.doesPenetrate = true;
|
||||
bullet.doesBreakGlass = true;
|
||||
bullet.style = 0;
|
||||
bullet.plink = 1;
|
||||
|
||||
return bullet;
|
||||
|
||||
}
|
||||
|
||||
/// STANDARD CONFIGS ///
|
||||
//do not include damage or ammo
|
||||
protected static BulletConfiguration standardBulletConfig() {
|
||||
|
||||
BulletConfiguration bullet = new BulletConfiguration();
|
||||
|
||||
bullet.velocity = 5.0F;
|
||||
bullet.spread = 0.005F;
|
||||
bullet.wear = 10;
|
||||
bullet.bulletsMin = 1;
|
||||
bullet.bulletsMax = 1;
|
||||
bullet.gravity = 0D;
|
||||
bullet.maxAge = 100;
|
||||
bullet.doesRicochet = true;
|
||||
bullet.ricochetAngle = 5;
|
||||
bullet.HBRC = 2;
|
||||
bullet.LBRC = 95;
|
||||
bullet.bounceMod = 0.8;
|
||||
bullet.doesPenetrate = true;
|
||||
bullet.doesBreakGlass = true;
|
||||
bullet.destroysBlocks = false;
|
||||
bullet.style = BulletConfiguration.STYLE_NORMAL;
|
||||
bullet.plink = BulletConfiguration.PLINK_BULLET;
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
protected static BulletConfiguration standardBuckshotConfig() {
|
||||
|
||||
BulletConfiguration bullet = new BulletConfiguration();
|
||||
|
||||
bullet.velocity = 5.0F;
|
||||
bullet.spread = 0.05F;
|
||||
bullet.wear = 10;
|
||||
bullet.bulletsMin = 5;
|
||||
bullet.bulletsMax = 8;
|
||||
bullet.gravity = 0D;
|
||||
bullet.maxAge = 100;
|
||||
bullet.doesRicochet = true;
|
||||
bullet.ricochetAngle = 5;
|
||||
bullet.HBRC = 10;
|
||||
bullet.LBRC = 95;
|
||||
bullet.bounceMod = 0.8;
|
||||
bullet.doesPenetrate = false;
|
||||
bullet.doesBreakGlass = true;
|
||||
bullet.style = BulletConfiguration.STYLE_PELLET;
|
||||
bullet.plink = BulletConfiguration.PLINK_BULLET;
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
protected static BulletConfiguration standardRocketConfig() {
|
||||
|
||||
BulletConfiguration bullet = new BulletConfiguration();
|
||||
|
||||
bullet.velocity = 2.0F;
|
||||
bullet.spread = 0.005F;
|
||||
bullet.wear = 10;
|
||||
bullet.bulletsMin = 1;
|
||||
bullet.bulletsMax = 1;
|
||||
bullet.gravity = 0.005D;
|
||||
bullet.maxAge = 300;
|
||||
bullet.doesRicochet = true;
|
||||
bullet.ricochetAngle = 3;
|
||||
bullet.HBRC = 0;
|
||||
bullet.LBRC = 95;
|
||||
bullet.bounceMod = 0.8;
|
||||
bullet.doesPenetrate = false;
|
||||
bullet.doesBreakGlass = false;
|
||||
bullet.explosive = 5.0F;
|
||||
bullet.style = BulletConfiguration.STYLE_ROCKET;
|
||||
bullet.plink = BulletConfiguration.PLINK_GRENADE;
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
protected static BulletConfiguration standardGrenadeConfig() {
|
||||
|
||||
BulletConfiguration bullet = new BulletConfiguration();
|
||||
|
||||
bullet.velocity = 2.0F;
|
||||
bullet.spread = 0.005F;
|
||||
bullet.wear = 10;
|
||||
bullet.bulletsMin = 1;
|
||||
bullet.bulletsMax = 1;
|
||||
bullet.gravity = 0.05D;
|
||||
bullet.maxAge = 300;
|
||||
bullet.doesRicochet = false;
|
||||
bullet.ricochetAngle = 0;
|
||||
bullet.HBRC = 0;
|
||||
bullet.LBRC = 0;
|
||||
bullet.bounceMod = 1.0;
|
||||
bullet.doesPenetrate = false;
|
||||
bullet.doesBreakGlass = false;
|
||||
bullet.explosive = 2.5F;
|
||||
bullet.style = BulletConfiguration.STYLE_GRENADE;
|
||||
bullet.plink = BulletConfiguration.PLINK_GRENADE;
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
/// ADJUSTED CONFIGS ///
|
||||
|
||||
/// .357 ///
|
||||
protected static BulletConfiguration getRevIronConfig() {
|
||||
|
||||
BulletConfiguration bullet = standardBulletConfig();
|
||||
|
||||
bullet.ammo = ModItems.gun_revolver_iron_ammo;
|
||||
bullet.dmgMin = 2;
|
||||
bullet.dmgMax = 4;
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
protected static BulletConfiguration getRevSteelConfig() {
|
||||
|
||||
BulletConfiguration bullet = standardBulletConfig();
|
||||
|
||||
bullet.ammo = ModItems.gun_revolver_ammo;
|
||||
bullet.dmgMin = 3;
|
||||
bullet.dmgMax = 5;
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
protected static BulletConfiguration getRevLeadConfig() {
|
||||
|
||||
BulletConfiguration bullet = standardBulletConfig();
|
||||
|
||||
bullet.ammo = ModItems.gun_revolver_lead_ammo;
|
||||
bullet.dmgMin = 2;
|
||||
bullet.dmgMax = 3;
|
||||
|
||||
bullet.effects = new ArrayList();
|
||||
bullet.effects.add(new PotionEffect(HbmPotion.radiation.id, 10 * 20, 4));
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
protected static BulletConfiguration getRevGoldConfig() {
|
||||
|
||||
BulletConfiguration bullet = standardBulletConfig();
|
||||
|
||||
bullet.ammo = ModItems.gun_revolver_gold_ammo;
|
||||
bullet.dmgMin = 10;
|
||||
bullet.dmgMax = 15;
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
protected static BulletConfiguration getRevSchrabidiumConfig() {
|
||||
|
||||
BulletConfiguration bullet = standardBulletConfig();
|
||||
|
||||
bullet.ammo = ModItems.gun_revolver_schrabidium_ammo;
|
||||
bullet.dmgMin = 10000;
|
||||
bullet.dmgMax = 100000;
|
||||
bullet.instakill = true;
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
protected static BulletConfiguration getRevCursedConfig() {
|
||||
|
||||
BulletConfiguration bullet = standardBulletConfig();
|
||||
|
||||
bullet.ammo = ModItems.gun_revolver_cursed_ammo;
|
||||
bullet.dmgMin = 12;
|
||||
bullet.dmgMax = 15;
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
protected static BulletConfiguration getRevNightmareConfig() {
|
||||
|
||||
BulletConfiguration bullet = standardBulletConfig();
|
||||
|
||||
bullet.ammo = ModItems.gun_revolver_nightmare_ammo;
|
||||
bullet.dmgMin = 1;
|
||||
bullet.dmgMax = 50;
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
/// 12 Gauge ///
|
||||
protected static BulletConfiguration get12GaugeConfig() {
|
||||
|
||||
BulletConfiguration bullet = standardBuckshotConfig();
|
||||
|
||||
bullet.ammo = ModItems.ammo_12gauge;
|
||||
bullet.dmgMin = 1;
|
||||
bullet.dmgMax = 4;
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
protected static BulletConfiguration get12GaugeFireConfig() {
|
||||
|
||||
BulletConfiguration bullet = standardBuckshotConfig();
|
||||
|
||||
bullet.ammo = ModItems.ammo_12gauge_incendiary;
|
||||
bullet.wear = 15;
|
||||
bullet.dmgMin = 1;
|
||||
bullet.dmgMax = 4;
|
||||
bullet.incendiary = 5;
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
/// 20 Gauge ///
|
||||
protected static BulletConfiguration get20GaugeConfig() {
|
||||
|
||||
BulletConfiguration bullet = standardBuckshotConfig();
|
||||
|
||||
bullet.ammo = ModItems.ammo_20gauge;
|
||||
bullet.dmgMin = 1;
|
||||
bullet.dmgMax = 3;
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
protected static BulletConfiguration get20GaugeSlugConfig() {
|
||||
|
||||
BulletConfiguration bullet = standardBulletConfig();
|
||||
|
||||
bullet.ammo = ModItems.ammo_20gauge_slug;
|
||||
bullet.dmgMin = 10;
|
||||
bullet.dmgMax = 15;
|
||||
bullet.wear = 7;
|
||||
bullet.style = BulletConfiguration.STYLE_NORMAL;
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
protected static BulletConfiguration get20GaugeFlechetteConfig() {
|
||||
|
||||
BulletConfiguration bullet = standardBuckshotConfig();
|
||||
|
||||
bullet.ammo = ModItems.ammo_20gauge_flechette;
|
||||
bullet.dmgMin = 3;
|
||||
bullet.dmgMax = 6;
|
||||
bullet.wear = 15;
|
||||
bullet.style = BulletConfiguration.STYLE_FLECHETTE;
|
||||
bullet.HBRC = 2;
|
||||
bullet.LBRC = 95;
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
protected static BulletConfiguration get20GaugeFireConfig() {
|
||||
|
||||
BulletConfiguration bullet = standardBuckshotConfig();
|
||||
|
||||
bullet.ammo = ModItems.ammo_20gauge_incendiary;
|
||||
bullet.dmgMin = 1;
|
||||
bullet.dmgMax = 4;
|
||||
bullet.wear = 15;
|
||||
bullet.incendiary = 5;
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
protected static BulletConfiguration get20GaugeExplosiveConfig() {
|
||||
|
||||
BulletConfiguration bullet = standardBuckshotConfig();
|
||||
|
||||
bullet.ammo = ModItems.ammo_20gauge_explosive;
|
||||
bullet.dmgMin = 2;
|
||||
bullet.dmgMax = 6;
|
||||
bullet.wear = 25;
|
||||
bullet.explosive = 0.5F;
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
/// 84mm Rockets ///
|
||||
protected static BulletConfiguration getRocketConfig() {
|
||||
|
||||
BulletConfiguration bullet = standardRocketConfig();
|
||||
|
||||
bullet.ammo = ModItems.ammo_rocket;
|
||||
bullet.dmgMin = 10;
|
||||
bullet.dmgMax = 15;
|
||||
bullet.explosive = 4F;
|
||||
bullet.trail = 0;
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
protected static BulletConfiguration getRocketHEConfig() {
|
||||
|
||||
BulletConfiguration bullet = standardRocketConfig();
|
||||
|
||||
bullet.ammo = ModItems.ammo_rocket_he;
|
||||
bullet.dmgMin = 10;
|
||||
bullet.dmgMax = 15;
|
||||
bullet.wear = 15;
|
||||
bullet.explosive = 6.5F;
|
||||
bullet.trail = 1;
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
protected static BulletConfiguration getRocketIncendiaryConfig() {
|
||||
|
||||
BulletConfiguration bullet = standardRocketConfig();
|
||||
|
||||
bullet.ammo = ModItems.ammo_rocket_incendiary;
|
||||
bullet.dmgMin = 10;
|
||||
bullet.dmgMax = 15;
|
||||
bullet.wear = 15;
|
||||
bullet.explosive = 4F;
|
||||
bullet.incendiary = 5;
|
||||
bullet.trail = 2;
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
protected static BulletConfiguration getRocketEMPConfig() {
|
||||
|
||||
BulletConfiguration bullet = standardRocketConfig();
|
||||
|
||||
bullet.ammo = ModItems.ammo_rocket_emp;
|
||||
bullet.dmgMin = 10;
|
||||
bullet.dmgMax = 15;
|
||||
bullet.explosive = 2.5F;
|
||||
bullet.emp = 10;
|
||||
bullet.trail = 4;
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
protected static BulletConfiguration getRocketSleekConfig() {
|
||||
|
||||
BulletConfiguration bullet = standardRocketConfig();
|
||||
|
||||
bullet.ammo = ModItems.ammo_rocket_sleek;
|
||||
bullet.dmgMin = 10;
|
||||
bullet.dmgMax = 15;
|
||||
bullet.explosive = 10F;
|
||||
bullet.trail = 6;
|
||||
bullet.gravity = 0;
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
protected static BulletConfiguration getRocketShrapnelConfig() {
|
||||
|
||||
BulletConfiguration bullet = standardRocketConfig();
|
||||
|
||||
bullet.ammo = ModItems.ammo_rocket_shrapnel;
|
||||
bullet.dmgMin = 10;
|
||||
bullet.dmgMax = 15;
|
||||
bullet.explosive = 4F;
|
||||
bullet.shrapnel = 25;
|
||||
bullet.trail = 3;
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
protected static BulletConfiguration getRocketGlareConfig() {
|
||||
|
||||
BulletConfiguration bullet = standardRocketConfig();
|
||||
|
||||
bullet.ammo = ModItems.ammo_rocket_glare;
|
||||
bullet.velocity = 5.0F;
|
||||
bullet.dmgMin = 10;
|
||||
bullet.dmgMax = 15;
|
||||
bullet.wear = 20;
|
||||
bullet.explosive = 4F;
|
||||
bullet.incendiary = 5;
|
||||
bullet.trail = 5;
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
protected static BulletConfiguration getGrenadeConfig() {
|
||||
|
||||
BulletConfiguration bullet = standardGrenadeConfig();
|
||||
|
||||
bullet.ammo = ModItems.ammo_grenade;
|
||||
bullet.velocity = 2.0F;
|
||||
bullet.dmgMin = 10;
|
||||
bullet.dmgMax = 15;
|
||||
bullet.wear = 10;
|
||||
bullet.trail = 0;
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
protected static BulletConfiguration getGrenadeHEConfig() {
|
||||
|
||||
BulletConfiguration bullet = standardGrenadeConfig();
|
||||
|
||||
bullet.ammo = ModItems.ammo_grenade_he;
|
||||
bullet.velocity = 2.0F;
|
||||
bullet.dmgMin = 20;
|
||||
bullet.dmgMax = 15;
|
||||
bullet.wear = 10;
|
||||
bullet.explosive = 5.0F;
|
||||
bullet.trail = 1;
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
protected static BulletConfiguration getGrenadeIncendirayConfig() {
|
||||
|
||||
BulletConfiguration bullet = standardGrenadeConfig();
|
||||
|
||||
bullet.ammo = ModItems.ammo_grenade_incendiary;
|
||||
bullet.velocity = 2.0F;
|
||||
bullet.dmgMin = 15;
|
||||
bullet.dmgMax = 15;
|
||||
bullet.wear = 10;
|
||||
bullet.trail = 0;
|
||||
bullet.incendiary = 2;
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
protected static BulletConfiguration getGrenadeChlorineConfig() {
|
||||
|
||||
BulletConfiguration bullet = standardGrenadeConfig();
|
||||
|
||||
bullet.ammo = ModItems.ammo_grenade_toxic;
|
||||
bullet.velocity = 2.0F;
|
||||
bullet.dmgMin = 10;
|
||||
bullet.dmgMax = 15;
|
||||
bullet.wear = 10;
|
||||
bullet.trail = 3;
|
||||
bullet.explosive = 0;
|
||||
bullet.chlorine = 50;
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
protected static BulletConfiguration getGrenadeSleekConfig() {
|
||||
|
||||
BulletConfiguration bullet = standardGrenadeConfig();
|
||||
|
||||
bullet.ammo = ModItems.ammo_grenade_sleek;
|
||||
bullet.velocity = 2.0F;
|
||||
bullet.dmgMin = 10;
|
||||
bullet.dmgMax = 15;
|
||||
bullet.wear = 10;
|
||||
bullet.trail = 4;
|
||||
bullet.explosive = 7.5F;
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
}
|
||||
@ -5,6 +5,8 @@ import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import com.hbm.handler.guncfg.*;
|
||||
|
||||
public class BulletConfigSyncingUtil {
|
||||
|
||||
private static List<ConfigKeyPair> configSet = new ArrayList();
|
||||
@ -27,6 +29,12 @@ public class BulletConfigSyncingUtil {
|
||||
public static final int TEST_CONFIG = 0x00;
|
||||
public static final int IRON_REVOLVER = 0x01;
|
||||
public static final int STEEL_REVOLVER = 0x02;
|
||||
public static final int LEAD_REVOLVER = 0x03;
|
||||
public static final int GOLD_REVOLVER = 0x04;
|
||||
public static final int CURSED_REVOLVER = 0x05;
|
||||
public static final int SCHRABIDIUM_REVOLVER = 0x06;
|
||||
public static final int NIGHT_REVOLVER = 0x07;
|
||||
public static final int NIGHT2_REVOLVER = 0x08;
|
||||
|
||||
public static final int G20_NORMAL = 0x10;
|
||||
public static final int G20_SLUG = 0x11;
|
||||
@ -47,32 +55,95 @@ public class BulletConfigSyncingUtil {
|
||||
public static final int GRENADE_INCENDIARY = 0x32;
|
||||
public static final int GRENADE_CHEMICAL = 0x33;
|
||||
public static final int GRENADE_SLEEK = 0x34;
|
||||
|
||||
public static final int G12_NORMAL = 0x40;
|
||||
public static final int G12_INCENDIARY = 0x41;
|
||||
|
||||
public static final int LR22_NORMAL = 0x50;
|
||||
public static final int LR22_AP = 0x51;
|
||||
|
||||
public static final int M44_NORMAL = 0x60;
|
||||
public static final int M44_AP = 0x61;
|
||||
public static final int M44_DU = 0x62;
|
||||
public static final int M44_PIP = 0x63;
|
||||
public static final int M44_BJ = 0x64;
|
||||
|
||||
public static final int P9_NORMAL = 0x70;
|
||||
public static final int P9_AP = 0x71;
|
||||
public static final int P9_DU = 0x72;
|
||||
|
||||
public static final int BMG50_NORMAL = 0x80;
|
||||
public static final int BMG50_INCENDIARY = 0x81;
|
||||
public static final int BMG50_EXPLOSIVE = 0x82;
|
||||
public static final int BMG50_DU = 0x83;
|
||||
|
||||
public static final int R5_NORMAL = 0x90;
|
||||
public static final int R5_EXPLOSIVE = 0x91;
|
||||
public static final int R5_DU = 0x92;
|
||||
public static final int R5_NORMAL_BOLT = 0x93;
|
||||
public static final int R5_EXPLOSIVE_BOLT = 0x94;
|
||||
public static final int R5_DU_BOLT = 0x95;
|
||||
|
||||
public static void loadConfigsForSync() {
|
||||
|
||||
configSet.add(new ConfigKeyPair(BulletConfigFactory.getTestConfig(), TEST_CONFIG));
|
||||
configSet.add(new ConfigKeyPair(BulletConfigFactory.getRevIronConfig(), IRON_REVOLVER));
|
||||
configSet.add(new ConfigKeyPair(BulletConfigFactory.getRevSteelConfig(), STEEL_REVOLVER));
|
||||
|
||||
configSet.add(new ConfigKeyPair(Gun357MagnumFactory.getRevIronConfig(), IRON_REVOLVER));
|
||||
configSet.add(new ConfigKeyPair(Gun357MagnumFactory.getRevSteelConfig(), STEEL_REVOLVER));
|
||||
configSet.add(new ConfigKeyPair(Gun357MagnumFactory.getRevLeadConfig(), LEAD_REVOLVER));
|
||||
configSet.add(new ConfigKeyPair(Gun357MagnumFactory.getRevGoldConfig(), GOLD_REVOLVER));
|
||||
configSet.add(new ConfigKeyPair(Gun357MagnumFactory.getRevCursedConfig(), CURSED_REVOLVER));
|
||||
configSet.add(new ConfigKeyPair(Gun357MagnumFactory.getRevSchrabidiumConfig(), SCHRABIDIUM_REVOLVER));
|
||||
configSet.add(new ConfigKeyPair(Gun357MagnumFactory.getRevNightmareConfig(), NIGHT_REVOLVER));
|
||||
configSet.add(new ConfigKeyPair(Gun357MagnumFactory.getRevNightmare2Config(), NIGHT2_REVOLVER));
|
||||
|
||||
configSet.add(new ConfigKeyPair(BulletConfigFactory.get20GaugeConfig(), G20_NORMAL));
|
||||
configSet.add(new ConfigKeyPair(BulletConfigFactory.get20GaugeSlugConfig(), G20_SLUG));
|
||||
configSet.add(new ConfigKeyPair(BulletConfigFactory.get20GaugeFlechetteConfig(), G20_FLECHETTE));
|
||||
configSet.add(new ConfigKeyPair(BulletConfigFactory.get20GaugeFireConfig(), G20_FIRE));
|
||||
configSet.add(new ConfigKeyPair(BulletConfigFactory.get20GaugeExplosiveConfig(), G20_EXPLOSIVE));
|
||||
configSet.add(new ConfigKeyPair(Gun20GaugeFactory.get20GaugeConfig(), G20_NORMAL));
|
||||
configSet.add(new ConfigKeyPair(Gun20GaugeFactory.get20GaugeSlugConfig(), G20_SLUG));
|
||||
configSet.add(new ConfigKeyPair(Gun20GaugeFactory.get20GaugeFlechetteConfig(), G20_FLECHETTE));
|
||||
configSet.add(new ConfigKeyPair(Gun20GaugeFactory.get20GaugeFireConfig(), G20_FIRE));
|
||||
configSet.add(new ConfigKeyPair(Gun20GaugeFactory.get20GaugeExplosiveConfig(), G20_EXPLOSIVE));
|
||||
|
||||
configSet.add(new ConfigKeyPair(BulletConfigFactory.getRocketConfig(), ROCKET_NORMAL));
|
||||
configSet.add(new ConfigKeyPair(BulletConfigFactory.getRocketHEConfig(), ROCKET_HE));
|
||||
configSet.add(new ConfigKeyPair(BulletConfigFactory.getRocketIncendiaryConfig(), ROCKET_INCENDIARY));
|
||||
configSet.add(new ConfigKeyPair(BulletConfigFactory.getRocketShrapnelConfig(), ROCKET_SHRAPNEL));
|
||||
configSet.add(new ConfigKeyPair(BulletConfigFactory.getRocketEMPConfig(), ROCKET_EMP));
|
||||
configSet.add(new ConfigKeyPair(BulletConfigFactory.getRocketGlareConfig(), ROCKET_GLARE));
|
||||
configSet.add(new ConfigKeyPair(BulletConfigFactory.getRocketSleekConfig(), ROCKET_SLEEK));
|
||||
configSet.add(new ConfigKeyPair(GunRocketFactory.getRocketConfig(), ROCKET_NORMAL));
|
||||
configSet.add(new ConfigKeyPair(GunRocketFactory.getRocketHEConfig(), ROCKET_HE));
|
||||
configSet.add(new ConfigKeyPair(GunRocketFactory.getRocketIncendiaryConfig(), ROCKET_INCENDIARY));
|
||||
configSet.add(new ConfigKeyPair(GunRocketFactory.getRocketShrapnelConfig(), ROCKET_SHRAPNEL));
|
||||
configSet.add(new ConfigKeyPair(GunRocketFactory.getRocketEMPConfig(), ROCKET_EMP));
|
||||
configSet.add(new ConfigKeyPair(GunRocketFactory.getRocketGlareConfig(), ROCKET_GLARE));
|
||||
configSet.add(new ConfigKeyPair(GunRocketFactory.getRocketSleekConfig(), ROCKET_SLEEK));
|
||||
|
||||
configSet.add(new ConfigKeyPair(BulletConfigFactory.getGrenadeConfig(), GRENADE_NORMAL));
|
||||
configSet.add(new ConfigKeyPair(BulletConfigFactory.getGrenadeHEConfig(), GRENADE_HE));
|
||||
configSet.add(new ConfigKeyPair(BulletConfigFactory.getGrenadeIncendirayConfig(), GRENADE_INCENDIARY));
|
||||
configSet.add(new ConfigKeyPair(BulletConfigFactory.getGrenadeChlorineConfig(), GRENADE_CHEMICAL));
|
||||
configSet.add(new ConfigKeyPair(BulletConfigFactory.getGrenadeSleekConfig(), GRENADE_SLEEK));
|
||||
configSet.add(new ConfigKeyPair(GunGrenadeFactory.getGrenadeConfig(), GRENADE_NORMAL));
|
||||
configSet.add(new ConfigKeyPair(GunGrenadeFactory.getGrenadeHEConfig(), GRENADE_HE));
|
||||
configSet.add(new ConfigKeyPair(GunGrenadeFactory.getGrenadeIncendirayConfig(), GRENADE_INCENDIARY));
|
||||
configSet.add(new ConfigKeyPair(GunGrenadeFactory.getGrenadeChlorineConfig(), GRENADE_CHEMICAL));
|
||||
configSet.add(new ConfigKeyPair(GunGrenadeFactory.getGrenadeSleekConfig(), GRENADE_SLEEK));
|
||||
|
||||
configSet.add(new ConfigKeyPair(Gun12GaugeFactory.get12GaugeConfig(), G12_NORMAL));
|
||||
configSet.add(new ConfigKeyPair(Gun12GaugeFactory.get12GaugeFireConfig(), G12_INCENDIARY));
|
||||
|
||||
configSet.add(new ConfigKeyPair(Gun22LRFactory.get22LRConfig(), LR22_NORMAL));
|
||||
configSet.add(new ConfigKeyPair(Gun22LRFactory.get22LRAPConfig(), LR22_AP));
|
||||
|
||||
configSet.add(new ConfigKeyPair(Gun44MagnumFactory.getNoPipConfig(), M44_NORMAL));
|
||||
configSet.add(new ConfigKeyPair(Gun44MagnumFactory.getNoPipAPConfig(), M44_AP));
|
||||
configSet.add(new ConfigKeyPair(Gun44MagnumFactory.getNoPipDUConfig(), M44_DU));
|
||||
configSet.add(new ConfigKeyPair(Gun44MagnumFactory.getPipConfig(), M44_PIP));
|
||||
configSet.add(new ConfigKeyPair(Gun44MagnumFactory.getBJConfig(), M44_BJ));
|
||||
|
||||
configSet.add(new ConfigKeyPair(Gun9mmFactory.get9mmConfig(), P9_NORMAL));
|
||||
configSet.add(new ConfigKeyPair(Gun9mmFactory.get9mmAPConfig(), P9_AP));
|
||||
configSet.add(new ConfigKeyPair(Gun9mmFactory.get9mmDUConfig(), P9_DU));
|
||||
|
||||
configSet.add(new ConfigKeyPair(Gun50BMGFactory.get50BMGConfig(), BMG50_NORMAL));
|
||||
configSet.add(new ConfigKeyPair(Gun50BMGFactory.get50BMGFireConfig(), BMG50_INCENDIARY));
|
||||
configSet.add(new ConfigKeyPair(Gun50BMGFactory.get50BMGExplosiveConfig(), BMG50_EXPLOSIVE));
|
||||
configSet.add(new ConfigKeyPair(Gun50BMGFactory.get50BMGDUConfig(), BMG50_DU));
|
||||
|
||||
configSet.add(new ConfigKeyPair(Gun5mmFactory.get5mmConfig(), R5_NORMAL));
|
||||
configSet.add(new ConfigKeyPair(Gun5mmFactory.get5mmExplosiveConfig(), R5_EXPLOSIVE));
|
||||
configSet.add(new ConfigKeyPair(Gun5mmFactory.get5mmDUConfig(), R5_DU));
|
||||
configSet.add(new ConfigKeyPair(Gun5mmFactory.get5mmConfig().setToBolt(BulletConfiguration.BOLT_LACUNAE), R5_NORMAL_BOLT));
|
||||
configSet.add(new ConfigKeyPair(Gun5mmFactory.get5mmExplosiveConfig().setToBolt(BulletConfiguration.BOLT_LACUNAE), R5_EXPLOSIVE_BOLT));
|
||||
configSet.add(new ConfigKeyPair(Gun5mmFactory.get5mmDUConfig().setToBolt(BulletConfiguration.BOLT_LACUNAE), R5_DU_BOLT));
|
||||
}
|
||||
|
||||
public static BulletConfiguration pullConfig(int key) {
|
||||
|
||||
@ -52,10 +52,12 @@ public class BulletConfiguration {
|
||||
public int incendiary;
|
||||
public int emp;
|
||||
public float explosive;
|
||||
public double jolt;
|
||||
public int rainbow;
|
||||
public int nuke;
|
||||
public int shrapnel;
|
||||
public int chlorine;
|
||||
public int leadChance;
|
||||
public boolean boxcar;
|
||||
public boolean boat;
|
||||
public boolean destroysBlocks;
|
||||
@ -85,4 +87,15 @@ public class BulletConfiguration {
|
||||
public static final int PLINK_ENERGY = 3;
|
||||
public static final int PLINK_SING = 4;
|
||||
|
||||
public static final int BOLT_LACUNAE = 0;
|
||||
public static final int BOLT_NIGHTMARE = 1;
|
||||
public static final int BOLT_LASER = 2;
|
||||
|
||||
public BulletConfiguration setToBolt(int trail) {
|
||||
|
||||
this.style = STYLE_BOLT;
|
||||
this.trail = trail;
|
||||
return this;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,137 +0,0 @@
|
||||
package com.hbm.handler;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.render.misc.RenderScreenOverlay.Crosshair;
|
||||
|
||||
public class GunConfigFactory {
|
||||
|
||||
public static GunConfiguration getRevolverConfig() {
|
||||
|
||||
GunConfiguration config = new GunConfiguration();
|
||||
|
||||
config.rateOfFire = 10;
|
||||
config.gunMode = GunConfiguration.MODE_NORMAL;
|
||||
config.firingMode = GunConfiguration.FIRE_MANUAL;
|
||||
config.hasReloadAnim = false;
|
||||
config.hasFiringAnim = false;
|
||||
config.hasSpinup = false;
|
||||
config.hasSpindown = false;
|
||||
config.reloadDuration = 10;
|
||||
config.firingDuration = 0;
|
||||
config.ammoCap = 6;
|
||||
config.reloadType = GunConfiguration.RELOAD_FULL;
|
||||
config.allowsInfinity = true;
|
||||
config.crosshair = Crosshair.L_CLASSIC;
|
||||
config.durability = 350;
|
||||
|
||||
config.name = "FFI Viper";
|
||||
config.manufacturer = "FlimFlam Industries";
|
||||
|
||||
config.config = new ArrayList<Integer>();
|
||||
config.config.add(BulletConfigSyncingUtil.STEEL_REVOLVER);
|
||||
config.config.add(BulletConfigSyncingUtil.IRON_REVOLVER);
|
||||
|
||||
return config;
|
||||
}
|
||||
|
||||
public static GunConfiguration getMareConfig() {
|
||||
|
||||
GunConfiguration config = new GunConfiguration();
|
||||
|
||||
config.rateOfFire = 10;
|
||||
config.gunMode = GunConfiguration.MODE_NORMAL;
|
||||
config.firingMode = GunConfiguration.FIRE_MANUAL;
|
||||
config.hasReloadAnim = false;
|
||||
config.hasFiringAnim = false;
|
||||
config.hasSpinup = false;
|
||||
config.hasSpindown = false;
|
||||
config.reloadDuration = 10;
|
||||
config.firingDuration = 0;
|
||||
config.ammoCap = 6;
|
||||
config.reloadType = GunConfiguration.RELOAD_SINGLE;
|
||||
config.allowsInfinity = true;
|
||||
config.crosshair = Crosshair.L_CIRCLE;
|
||||
config.durability = 350;
|
||||
|
||||
config.name = "Winchester Model 1887";
|
||||
config.manufacturer = "Winchester Repeating Arms Company";
|
||||
|
||||
config.config = new ArrayList<Integer>();
|
||||
config.config.add(BulletConfigSyncingUtil.G20_NORMAL);
|
||||
config.config.add(BulletConfigSyncingUtil.G20_SLUG);
|
||||
config.config.add(BulletConfigSyncingUtil.G20_FLECHETTE);
|
||||
config.config.add(BulletConfigSyncingUtil.G20_FIRE);
|
||||
config.config.add(BulletConfigSyncingUtil.G20_EXPLOSIVE);
|
||||
|
||||
return config;
|
||||
}
|
||||
|
||||
public static GunConfiguration getGustavConfig() {
|
||||
|
||||
GunConfiguration config = new GunConfiguration();
|
||||
|
||||
config.rateOfFire = 30;
|
||||
config.gunMode = GunConfiguration.MODE_NORMAL;
|
||||
config.firingMode = GunConfiguration.FIRE_MANUAL;
|
||||
config.hasReloadAnim = false;
|
||||
config.hasFiringAnim = false;
|
||||
config.hasSpinup = false;
|
||||
config.hasSpindown = false;
|
||||
config.reloadDuration = 60;
|
||||
config.firingDuration = 0;
|
||||
config.ammoCap = 1;
|
||||
config.reloadType = GunConfiguration.RELOAD_SINGLE;
|
||||
config.allowsInfinity = true;
|
||||
config.crosshair = Crosshair.L_CIRCUMFLEX;
|
||||
|
||||
config.name = "Carl Gustav Recoilless Rifle M1";
|
||||
config.manufacturer = "Saab Bofors Dynamics";
|
||||
|
||||
config.config = new ArrayList<Integer>();
|
||||
config.config.add(BulletConfigSyncingUtil.ROCKET_NORMAL);
|
||||
config.config.add(BulletConfigSyncingUtil.ROCKET_HE);
|
||||
config.config.add(BulletConfigSyncingUtil.ROCKET_INCENDIARY);
|
||||
config.config.add(BulletConfigSyncingUtil.ROCKET_SHRAPNEL);
|
||||
config.config.add(BulletConfigSyncingUtil.ROCKET_EMP);
|
||||
config.config.add(BulletConfigSyncingUtil.ROCKET_GLARE);
|
||||
config.config.add(BulletConfigSyncingUtil.ROCKET_SLEEK);
|
||||
config.durability = 140;
|
||||
|
||||
return config;
|
||||
}
|
||||
|
||||
public static GunConfiguration getGrenadeConfig() {
|
||||
|
||||
GunConfiguration config = new GunConfiguration();
|
||||
|
||||
config.rateOfFire = 30;
|
||||
config.gunMode = GunConfiguration.MODE_NORMAL;
|
||||
config.firingMode = GunConfiguration.FIRE_MANUAL;
|
||||
config.hasReloadAnim = false;
|
||||
config.hasFiringAnim = false;
|
||||
config.hasSpinup = false;
|
||||
config.hasSpindown = false;
|
||||
config.reloadDuration = 40;
|
||||
config.firingDuration = 0;
|
||||
config.ammoCap = 1;
|
||||
config.reloadType = GunConfiguration.RELOAD_SINGLE;
|
||||
config.allowsInfinity = true;
|
||||
config.crosshair = Crosshair.L_CIRCUMFLEX;
|
||||
|
||||
config.name = "Granatpistole HK69";
|
||||
config.manufacturer = "Heckler & Koch";
|
||||
|
||||
config.config = new ArrayList<Integer>();
|
||||
config.config.add(BulletConfigSyncingUtil.GRENADE_NORMAL);
|
||||
config.config.add(BulletConfigSyncingUtil.GRENADE_HE);
|
||||
config.config.add(BulletConfigSyncingUtil.GRENADE_INCENDIARY);
|
||||
config.config.add(BulletConfigSyncingUtil.GRENADE_CHEMICAL);
|
||||
config.config.add(BulletConfigSyncingUtil.GRENADE_SLEEK);
|
||||
config.durability = 140;
|
||||
|
||||
return config;
|
||||
}
|
||||
|
||||
}
|
||||
@ -13,9 +13,11 @@ public class GunConfiguration {
|
||||
* alt is always the lower priority, mouse2 will be canceled then mouse1 is activated at the same time
|
||||
* restrictions must be applied in gun's logic, mechanism may be dysfunctional if these rules are ignored
|
||||
*/
|
||||
|
||||
|
||||
//amount of ticks between each bullet
|
||||
public int rateOfFire;
|
||||
//amount of bullets fired per delay passed
|
||||
public int roundsPerCycle;
|
||||
//0 = normal, 1 = release, 2 = both
|
||||
public int gunMode;
|
||||
//0 = manual, 1 = automatic
|
||||
|
||||
146
com/hbm/handler/guncfg/BulletConfigFactory.java
Normal file
146
com/hbm/handler/guncfg/BulletConfigFactory.java
Normal file
@ -0,0 +1,146 @@
|
||||
package com.hbm.handler.guncfg;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import com.hbm.handler.BulletConfiguration;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.potion.HbmPotion;
|
||||
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
|
||||
public class BulletConfigFactory {
|
||||
|
||||
/// configs should never be loaded manually due to syncing issues: use the syncing util and pass the UID in the DW of the bullet to make the client load the config correctly ////
|
||||
|
||||
public static BulletConfiguration getTestConfig() {
|
||||
|
||||
BulletConfiguration bullet = new BulletConfiguration();
|
||||
|
||||
bullet.ammo = ModItems.gun_revolver_ammo;
|
||||
bullet.velocity = 5.0F;
|
||||
bullet.spread = 0.05F;
|
||||
bullet.wear = 10;
|
||||
bullet.dmgMin = 15;
|
||||
bullet.dmgMax = 17;
|
||||
bullet.bulletsMin = 1;
|
||||
bullet.bulletsMax = 1;
|
||||
bullet.gravity = 0D;
|
||||
bullet.maxAge = 100;
|
||||
bullet.doesRicochet = true;
|
||||
bullet.ricochetAngle = 10;
|
||||
bullet.HBRC = 2;
|
||||
bullet.LBRC = 90;
|
||||
bullet.bounceMod = 0.8;
|
||||
bullet.doesPenetrate = true;
|
||||
bullet.doesBreakGlass = true;
|
||||
bullet.style = 0;
|
||||
bullet.plink = 1;
|
||||
|
||||
return bullet;
|
||||
|
||||
}
|
||||
|
||||
/// STANDARD CONFIGS ///
|
||||
//do not include damage or ammo
|
||||
public static BulletConfiguration standardBulletConfig() {
|
||||
|
||||
BulletConfiguration bullet = new BulletConfiguration();
|
||||
|
||||
bullet.velocity = 5.0F;
|
||||
bullet.spread = 0.005F;
|
||||
bullet.wear = 10;
|
||||
bullet.bulletsMin = 1;
|
||||
bullet.bulletsMax = 1;
|
||||
bullet.gravity = 0D;
|
||||
bullet.maxAge = 100;
|
||||
bullet.doesRicochet = true;
|
||||
bullet.ricochetAngle = 5;
|
||||
bullet.HBRC = 2;
|
||||
bullet.LBRC = 95;
|
||||
bullet.bounceMod = 0.8;
|
||||
bullet.doesPenetrate = true;
|
||||
bullet.doesBreakGlass = true;
|
||||
bullet.destroysBlocks = false;
|
||||
bullet.style = BulletConfiguration.STYLE_NORMAL;
|
||||
bullet.plink = BulletConfiguration.PLINK_BULLET;
|
||||
bullet.leadChance = 5;
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
public static BulletConfiguration standardBuckshotConfig() {
|
||||
|
||||
BulletConfiguration bullet = new BulletConfiguration();
|
||||
|
||||
bullet.velocity = 5.0F;
|
||||
bullet.spread = 0.05F;
|
||||
bullet.wear = 10;
|
||||
bullet.bulletsMin = 5;
|
||||
bullet.bulletsMax = 8;
|
||||
bullet.gravity = 0D;
|
||||
bullet.maxAge = 100;
|
||||
bullet.doesRicochet = true;
|
||||
bullet.ricochetAngle = 5;
|
||||
bullet.HBRC = 10;
|
||||
bullet.LBRC = 95;
|
||||
bullet.bounceMod = 0.8;
|
||||
bullet.doesPenetrate = false;
|
||||
bullet.doesBreakGlass = true;
|
||||
bullet.style = BulletConfiguration.STYLE_PELLET;
|
||||
bullet.plink = BulletConfiguration.PLINK_BULLET;
|
||||
bullet.leadChance = 10;
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
public static BulletConfiguration standardRocketConfig() {
|
||||
|
||||
BulletConfiguration bullet = new BulletConfiguration();
|
||||
|
||||
bullet.velocity = 2.0F;
|
||||
bullet.spread = 0.005F;
|
||||
bullet.wear = 10;
|
||||
bullet.bulletsMin = 1;
|
||||
bullet.bulletsMax = 1;
|
||||
bullet.gravity = 0.005D;
|
||||
bullet.maxAge = 300;
|
||||
bullet.doesRicochet = true;
|
||||
bullet.ricochetAngle = 3;
|
||||
bullet.HBRC = 0;
|
||||
bullet.LBRC = 95;
|
||||
bullet.bounceMod = 0.8;
|
||||
bullet.doesPenetrate = false;
|
||||
bullet.doesBreakGlass = false;
|
||||
bullet.explosive = 5.0F;
|
||||
bullet.style = BulletConfiguration.STYLE_ROCKET;
|
||||
bullet.plink = BulletConfiguration.PLINK_GRENADE;
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
public static BulletConfiguration standardGrenadeConfig() {
|
||||
|
||||
BulletConfiguration bullet = new BulletConfiguration();
|
||||
|
||||
bullet.velocity = 2.0F;
|
||||
bullet.spread = 0.005F;
|
||||
bullet.wear = 10;
|
||||
bullet.bulletsMin = 1;
|
||||
bullet.bulletsMax = 1;
|
||||
bullet.gravity = 0.05D;
|
||||
bullet.maxAge = 300;
|
||||
bullet.doesRicochet = false;
|
||||
bullet.ricochetAngle = 0;
|
||||
bullet.HBRC = 0;
|
||||
bullet.LBRC = 0;
|
||||
bullet.bounceMod = 1.0;
|
||||
bullet.doesPenetrate = false;
|
||||
bullet.doesBreakGlass = false;
|
||||
bullet.explosive = 2.5F;
|
||||
bullet.style = BulletConfiguration.STYLE_GRENADE;
|
||||
bullet.plink = BulletConfiguration.PLINK_GRENADE;
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
}
|
||||
32
com/hbm/handler/guncfg/Gun12GaugeFactory.java
Normal file
32
com/hbm/handler/guncfg/Gun12GaugeFactory.java
Normal file
@ -0,0 +1,32 @@
|
||||
package com.hbm.handler.guncfg;
|
||||
|
||||
import com.hbm.handler.BulletConfiguration;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
public class Gun12GaugeFactory {
|
||||
|
||||
public static BulletConfiguration get12GaugeConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBuckshotConfig();
|
||||
|
||||
bullet.ammo = ModItems.ammo_12gauge;
|
||||
bullet.dmgMin = 1;
|
||||
bullet.dmgMax = 4;
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
public static BulletConfiguration get12GaugeFireConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBuckshotConfig();
|
||||
|
||||
bullet.ammo = ModItems.ammo_12gauge_incendiary;
|
||||
bullet.wear = 15;
|
||||
bullet.dmgMin = 1;
|
||||
bullet.dmgMax = 4;
|
||||
bullet.incendiary = 5;
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
}
|
||||
111
com/hbm/handler/guncfg/Gun20GaugeFactory.java
Normal file
111
com/hbm/handler/guncfg/Gun20GaugeFactory.java
Normal file
@ -0,0 +1,111 @@
|
||||
package com.hbm.handler.guncfg;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import com.hbm.handler.BulletConfigSyncingUtil;
|
||||
import com.hbm.handler.BulletConfiguration;
|
||||
import com.hbm.handler.GunConfiguration;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.render.misc.RenderScreenOverlay.Crosshair;
|
||||
|
||||
public class Gun20GaugeFactory {
|
||||
|
||||
public static GunConfiguration getMareConfig() {
|
||||
|
||||
GunConfiguration config = new GunConfiguration();
|
||||
|
||||
config.rateOfFire = 10;
|
||||
config.roundsPerCycle = 1;
|
||||
config.gunMode = GunConfiguration.MODE_NORMAL;
|
||||
config.firingMode = GunConfiguration.FIRE_MANUAL;
|
||||
config.hasReloadAnim = false;
|
||||
config.hasFiringAnim = false;
|
||||
config.hasSpinup = false;
|
||||
config.hasSpindown = false;
|
||||
config.reloadDuration = 10;
|
||||
config.firingDuration = 0;
|
||||
config.ammoCap = 6;
|
||||
config.reloadType = GunConfiguration.RELOAD_SINGLE;
|
||||
config.allowsInfinity = true;
|
||||
config.crosshair = Crosshair.L_CIRCLE;
|
||||
config.durability = 350;
|
||||
|
||||
config.name = "Winchester Model 1887";
|
||||
config.manufacturer = "Winchester Repeating Arms Company";
|
||||
|
||||
config.config = new ArrayList<Integer>();
|
||||
config.config.add(BulletConfigSyncingUtil.G20_NORMAL);
|
||||
config.config.add(BulletConfigSyncingUtil.G20_SLUG);
|
||||
config.config.add(BulletConfigSyncingUtil.G20_FLECHETTE);
|
||||
config.config.add(BulletConfigSyncingUtil.G20_FIRE);
|
||||
config.config.add(BulletConfigSyncingUtil.G20_EXPLOSIVE);
|
||||
|
||||
return config;
|
||||
}
|
||||
|
||||
public static BulletConfiguration get20GaugeConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBuckshotConfig();
|
||||
|
||||
bullet.ammo = ModItems.ammo_20gauge;
|
||||
bullet.dmgMin = 1;
|
||||
bullet.dmgMax = 3;
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
public static BulletConfiguration get20GaugeSlugConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
|
||||
|
||||
bullet.ammo = ModItems.ammo_20gauge_slug;
|
||||
bullet.dmgMin = 10;
|
||||
bullet.dmgMax = 15;
|
||||
bullet.wear = 7;
|
||||
bullet.style = BulletConfiguration.STYLE_NORMAL;
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
public static BulletConfiguration get20GaugeFlechetteConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBuckshotConfig();
|
||||
|
||||
bullet.ammo = ModItems.ammo_20gauge_flechette;
|
||||
bullet.dmgMin = 3;
|
||||
bullet.dmgMax = 6;
|
||||
bullet.wear = 15;
|
||||
bullet.style = BulletConfiguration.STYLE_FLECHETTE;
|
||||
bullet.HBRC = 2;
|
||||
bullet.LBRC = 95;
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
public static BulletConfiguration get20GaugeFireConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBuckshotConfig();
|
||||
|
||||
bullet.ammo = ModItems.ammo_20gauge_incendiary;
|
||||
bullet.dmgMin = 1;
|
||||
bullet.dmgMax = 4;
|
||||
bullet.wear = 15;
|
||||
bullet.incendiary = 5;
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
public static BulletConfiguration get20GaugeExplosiveConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBuckshotConfig();
|
||||
|
||||
bullet.ammo = ModItems.ammo_20gauge_explosive;
|
||||
bullet.dmgMin = 2;
|
||||
bullet.dmgMax = 6;
|
||||
bullet.wear = 25;
|
||||
bullet.explosive = 0.5F;
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
}
|
||||
35
com/hbm/handler/guncfg/Gun22LRFactory.java
Normal file
35
com/hbm/handler/guncfg/Gun22LRFactory.java
Normal file
@ -0,0 +1,35 @@
|
||||
package com.hbm.handler.guncfg;
|
||||
|
||||
import com.hbm.handler.BulletConfiguration;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
public class Gun22LRFactory {
|
||||
|
||||
static float inaccuracy = 5;
|
||||
public static BulletConfiguration get22LRConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
|
||||
|
||||
bullet.ammo = ModItems.ammo_22lr;
|
||||
bullet.spread *= inaccuracy;
|
||||
bullet.dmgMin = 2;
|
||||
bullet.dmgMax = 4;
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
public static BulletConfiguration get22LRAPConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
|
||||
|
||||
bullet.ammo = ModItems.ammo_22lr_ap;
|
||||
bullet.spread *= inaccuracy;
|
||||
bullet.dmgMin = 6;
|
||||
bullet.dmgMax = 8;
|
||||
bullet.leadChance = 10;
|
||||
bullet.wear = 15;
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
}
|
||||
140
com/hbm/handler/guncfg/Gun357MagnumFactory.java
Normal file
140
com/hbm/handler/guncfg/Gun357MagnumFactory.java
Normal file
@ -0,0 +1,140 @@
|
||||
package com.hbm.handler.guncfg;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import com.hbm.handler.BulletConfigSyncingUtil;
|
||||
import com.hbm.handler.BulletConfiguration;
|
||||
import com.hbm.handler.GunConfiguration;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.potion.HbmPotion;
|
||||
import com.hbm.render.misc.RenderScreenOverlay.Crosshair;
|
||||
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
|
||||
public class Gun357MagnumFactory {
|
||||
|
||||
public static GunConfiguration getRevolverConfig() {
|
||||
|
||||
GunConfiguration config = new GunConfiguration();
|
||||
|
||||
config.rateOfFire = 10;
|
||||
config.roundsPerCycle = 1;
|
||||
config.gunMode = GunConfiguration.MODE_NORMAL;
|
||||
config.firingMode = GunConfiguration.FIRE_MANUAL;
|
||||
config.hasReloadAnim = false;
|
||||
config.hasFiringAnim = false;
|
||||
config.hasSpinup = false;
|
||||
config.hasSpindown = false;
|
||||
config.reloadDuration = 10;
|
||||
config.firingDuration = 0;
|
||||
config.ammoCap = 6;
|
||||
config.reloadType = GunConfiguration.RELOAD_FULL;
|
||||
config.allowsInfinity = true;
|
||||
config.crosshair = Crosshair.L_CLASSIC;
|
||||
config.durability = 350;
|
||||
|
||||
config.name = "FFI Viper";
|
||||
config.manufacturer = "FlimFlam Industries";
|
||||
|
||||
config.config = new ArrayList<Integer>();
|
||||
config.config.add(BulletConfigSyncingUtil.STEEL_REVOLVER);
|
||||
|
||||
return config;
|
||||
}
|
||||
|
||||
public static BulletConfiguration getRevIronConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
|
||||
|
||||
bullet.ammo = ModItems.gun_revolver_iron_ammo;
|
||||
bullet.dmgMin = 2;
|
||||
bullet.dmgMax = 4;
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
public static BulletConfiguration getRevSteelConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
|
||||
|
||||
bullet.ammo = ModItems.gun_revolver_ammo;
|
||||
bullet.dmgMin = 3;
|
||||
bullet.dmgMax = 5;
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
public static BulletConfiguration getRevLeadConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
|
||||
|
||||
bullet.ammo = ModItems.gun_revolver_lead_ammo;
|
||||
bullet.dmgMin = 2;
|
||||
bullet.dmgMax = 3;
|
||||
|
||||
bullet.effects = new ArrayList();
|
||||
bullet.effects.add(new PotionEffect(HbmPotion.radiation.id, 10 * 20, 4));
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
public static BulletConfiguration getRevGoldConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
|
||||
|
||||
bullet.ammo = ModItems.gun_revolver_gold_ammo;
|
||||
bullet.dmgMin = 10;
|
||||
bullet.dmgMax = 15;
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
public static BulletConfiguration getRevSchrabidiumConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
|
||||
|
||||
bullet.ammo = ModItems.gun_revolver_schrabidium_ammo;
|
||||
bullet.dmgMin = 10000;
|
||||
bullet.dmgMax = 100000;
|
||||
bullet.instakill = true;
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
public static BulletConfiguration getRevCursedConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
|
||||
|
||||
bullet.ammo = ModItems.gun_revolver_cursed_ammo;
|
||||
bullet.dmgMin = 12;
|
||||
bullet.dmgMax = 15;
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
public static BulletConfiguration getRevNightmareConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
|
||||
|
||||
bullet.ammo = ModItems.gun_revolver_nightmare_ammo;
|
||||
bullet.dmgMin = 1;
|
||||
bullet.dmgMax = 50;
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
public static BulletConfiguration getRevNightmare2Config() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
|
||||
|
||||
bullet.ammo = ModItems.gun_revolver_nightmare_ammo;
|
||||
bullet.bulletsMin = 4;
|
||||
bullet.bulletsMax = 6;
|
||||
bullet.dmgMin = 50;
|
||||
bullet.dmgMax = 150;
|
||||
bullet.destroysBlocks = true;
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
}
|
||||
71
com/hbm/handler/guncfg/Gun44MagnumFactory.java
Normal file
71
com/hbm/handler/guncfg/Gun44MagnumFactory.java
Normal file
@ -0,0 +1,71 @@
|
||||
package com.hbm.handler.guncfg;
|
||||
|
||||
import com.hbm.handler.BulletConfiguration;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
public class Gun44MagnumFactory {
|
||||
|
||||
public static BulletConfiguration getNoPipConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
|
||||
|
||||
bullet.ammo = ModItems.ammo_44;
|
||||
bullet.dmgMin = 5;
|
||||
bullet.dmgMax = 7;
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
public static BulletConfiguration getNoPipAPConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
|
||||
|
||||
bullet.ammo = ModItems.ammo_44_ap;
|
||||
bullet.dmgMin = 7;
|
||||
bullet.dmgMax = 10;
|
||||
bullet.wear = 15;
|
||||
bullet.leadChance = 10;
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
public static BulletConfiguration getNoPipDUConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
|
||||
|
||||
bullet.ammo = ModItems.ammo_44_du;
|
||||
bullet.dmgMin = 7;
|
||||
bullet.dmgMax = 10;
|
||||
bullet.wear = 25;
|
||||
bullet.leadChance = 50;
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
public static BulletConfiguration getPipConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
|
||||
|
||||
bullet.ammo = ModItems.ammo_44_pip;
|
||||
bullet.dmgMin = 4;
|
||||
bullet.dmgMax = 5;
|
||||
bullet.boxcar = true;
|
||||
bullet.wear = 25;
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
public static BulletConfiguration getBJConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
|
||||
|
||||
bullet.ammo = ModItems.ammo_44_bj;
|
||||
bullet.dmgMin = 4;
|
||||
bullet.dmgMax = 5;
|
||||
bullet.boat = true;
|
||||
bullet.wear = 25;
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
}
|
||||
63
com/hbm/handler/guncfg/Gun50BMGFactory.java
Normal file
63
com/hbm/handler/guncfg/Gun50BMGFactory.java
Normal file
@ -0,0 +1,63 @@
|
||||
package com.hbm.handler.guncfg;
|
||||
|
||||
import com.hbm.handler.BulletConfiguration;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
public class Gun50BMGFactory {
|
||||
|
||||
static float inaccuracy = 2.5F;
|
||||
public static BulletConfiguration get50BMGConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
|
||||
|
||||
bullet.ammo = ModItems.ammo_50bmg;
|
||||
bullet.spread *= inaccuracy;
|
||||
bullet.dmgMin = 15;
|
||||
bullet.dmgMax = 18;
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
public static BulletConfiguration get50BMGFireConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
|
||||
|
||||
bullet.ammo = ModItems.ammo_50bmg_incendiary;
|
||||
bullet.spread *= inaccuracy;
|
||||
bullet.dmgMin = 15;
|
||||
bullet.dmgMax = 18;
|
||||
bullet.wear = 15;
|
||||
bullet.incendiary = 5;
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
public static BulletConfiguration get50BMGExplosiveConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
|
||||
|
||||
bullet.ammo = ModItems.ammo_50bmg_explosive;
|
||||
bullet.spread *= inaccuracy;
|
||||
bullet.dmgMin = 20;
|
||||
bullet.dmgMax = 25;
|
||||
bullet.wear = 25;
|
||||
bullet.explosive = 1;
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
public static BulletConfiguration get50BMGDUConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
|
||||
|
||||
bullet.ammo = ModItems.ammo_50bmg_du;
|
||||
bullet.spread *= inaccuracy;
|
||||
bullet.dmgMin = 25;
|
||||
bullet.dmgMax = 35;
|
||||
bullet.wear = 25;
|
||||
bullet.leadChance = 50;
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
}
|
||||
49
com/hbm/handler/guncfg/Gun5mmFactory.java
Normal file
49
com/hbm/handler/guncfg/Gun5mmFactory.java
Normal file
@ -0,0 +1,49 @@
|
||||
package com.hbm.handler.guncfg;
|
||||
|
||||
import com.hbm.handler.BulletConfiguration;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
public class Gun5mmFactory {
|
||||
|
||||
static float inaccuracy = 10;
|
||||
public static BulletConfiguration get5mmConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
|
||||
|
||||
bullet.ammo = ModItems.ammo_5mm;
|
||||
bullet.spread *= inaccuracy;
|
||||
bullet.dmgMin = 3;
|
||||
bullet.dmgMax = 5;
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
public static BulletConfiguration get5mmExplosiveConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
|
||||
|
||||
bullet.ammo = ModItems.ammo_5mm_explosive;
|
||||
bullet.spread *= inaccuracy;
|
||||
bullet.dmgMin = 4;
|
||||
bullet.dmgMax = 7;
|
||||
bullet.explosive = 0.5F;
|
||||
bullet.wear = 25;
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
public static BulletConfiguration get5mmDUConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
|
||||
|
||||
bullet.ammo = ModItems.ammo_5mm_du;
|
||||
bullet.spread *= inaccuracy;
|
||||
bullet.dmgMin = 6;
|
||||
bullet.dmgMax = 10;
|
||||
bullet.wear = 25;
|
||||
bullet.leadChance = 50;
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
}
|
||||
49
com/hbm/handler/guncfg/Gun9mmFactory.java
Normal file
49
com/hbm/handler/guncfg/Gun9mmFactory.java
Normal file
@ -0,0 +1,49 @@
|
||||
package com.hbm.handler.guncfg;
|
||||
|
||||
import com.hbm.handler.BulletConfiguration;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
public class Gun9mmFactory {
|
||||
|
||||
static float inaccuracy = 5;
|
||||
public static BulletConfiguration get9mmConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
|
||||
|
||||
bullet.ammo = ModItems.ammo_9mm;
|
||||
bullet.spread *= inaccuracy;
|
||||
bullet.dmgMin = 2;
|
||||
bullet.dmgMax = 4;
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
public static BulletConfiguration get9mmAPConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
|
||||
|
||||
bullet.ammo = ModItems.ammo_9mm_ap;
|
||||
bullet.spread *= inaccuracy;
|
||||
bullet.dmgMin = 6;
|
||||
bullet.dmgMax = 8;
|
||||
bullet.leadChance = 10;
|
||||
bullet.wear = 15;
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
public static BulletConfiguration get9mmDUConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
|
||||
|
||||
bullet.ammo = ModItems.ammo_9mm_du;
|
||||
bullet.spread *= inaccuracy;
|
||||
bullet.dmgMin = 6;
|
||||
bullet.dmgMax = 8;
|
||||
bullet.leadChance = 50;
|
||||
bullet.wear = 25;
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
}
|
||||
121
com/hbm/handler/guncfg/GunGrenadeFactory.java
Normal file
121
com/hbm/handler/guncfg/GunGrenadeFactory.java
Normal file
@ -0,0 +1,121 @@
|
||||
package com.hbm.handler.guncfg;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import com.hbm.handler.BulletConfigSyncingUtil;
|
||||
import com.hbm.handler.BulletConfiguration;
|
||||
import com.hbm.handler.GunConfiguration;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.render.misc.RenderScreenOverlay.Crosshair;
|
||||
|
||||
public class GunGrenadeFactory {
|
||||
|
||||
public static GunConfiguration getHK69Config() {
|
||||
|
||||
GunConfiguration config = new GunConfiguration();
|
||||
|
||||
config.rateOfFire = 30;
|
||||
config.roundsPerCycle = 1;
|
||||
config.gunMode = GunConfiguration.MODE_NORMAL;
|
||||
config.firingMode = GunConfiguration.FIRE_MANUAL;
|
||||
config.hasReloadAnim = false;
|
||||
config.hasFiringAnim = false;
|
||||
config.hasSpinup = false;
|
||||
config.hasSpindown = false;
|
||||
config.reloadDuration = 40;
|
||||
config.firingDuration = 0;
|
||||
config.ammoCap = 1;
|
||||
config.reloadType = GunConfiguration.RELOAD_SINGLE;
|
||||
config.allowsInfinity = true;
|
||||
config.crosshair = Crosshair.L_CIRCUMFLEX;
|
||||
|
||||
config.name = "Granatpistole HK69";
|
||||
config.manufacturer = "Heckler & Koch";
|
||||
|
||||
config.config = new ArrayList<Integer>();
|
||||
config.config.add(BulletConfigSyncingUtil.GRENADE_NORMAL);
|
||||
config.config.add(BulletConfigSyncingUtil.GRENADE_HE);
|
||||
config.config.add(BulletConfigSyncingUtil.GRENADE_INCENDIARY);
|
||||
config.config.add(BulletConfigSyncingUtil.GRENADE_CHEMICAL);
|
||||
config.config.add(BulletConfigSyncingUtil.GRENADE_SLEEK);
|
||||
config.durability = 140;
|
||||
|
||||
return config;
|
||||
}
|
||||
|
||||
public static BulletConfiguration getGrenadeConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardGrenadeConfig();
|
||||
|
||||
bullet.ammo = ModItems.ammo_grenade;
|
||||
bullet.velocity = 2.0F;
|
||||
bullet.dmgMin = 10;
|
||||
bullet.dmgMax = 15;
|
||||
bullet.wear = 10;
|
||||
bullet.trail = 0;
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
public static BulletConfiguration getGrenadeHEConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardGrenadeConfig();
|
||||
|
||||
bullet.ammo = ModItems.ammo_grenade_he;
|
||||
bullet.velocity = 2.0F;
|
||||
bullet.dmgMin = 20;
|
||||
bullet.dmgMax = 15;
|
||||
bullet.wear = 10;
|
||||
bullet.explosive = 5.0F;
|
||||
bullet.trail = 1;
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
public static BulletConfiguration getGrenadeIncendirayConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardGrenadeConfig();
|
||||
|
||||
bullet.ammo = ModItems.ammo_grenade_incendiary;
|
||||
bullet.velocity = 2.0F;
|
||||
bullet.dmgMin = 15;
|
||||
bullet.dmgMax = 15;
|
||||
bullet.wear = 10;
|
||||
bullet.trail = 0;
|
||||
bullet.incendiary = 2;
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
public static BulletConfiguration getGrenadeChlorineConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardGrenadeConfig();
|
||||
|
||||
bullet.ammo = ModItems.ammo_grenade_toxic;
|
||||
bullet.velocity = 2.0F;
|
||||
bullet.dmgMin = 10;
|
||||
bullet.dmgMax = 15;
|
||||
bullet.wear = 10;
|
||||
bullet.trail = 3;
|
||||
bullet.explosive = 0;
|
||||
bullet.chlorine = 50;
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
public static BulletConfiguration getGrenadeSleekConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardGrenadeConfig();
|
||||
|
||||
bullet.ammo = ModItems.ammo_grenade_sleek;
|
||||
bullet.velocity = 2.0F;
|
||||
bullet.dmgMin = 10;
|
||||
bullet.dmgMax = 15;
|
||||
bullet.wear = 10;
|
||||
bullet.trail = 4;
|
||||
bullet.explosive = 7.5F;
|
||||
bullet.jolt = 6.5D;
|
||||
|
||||
return bullet;
|
||||
}
|
||||
}
|
||||
149
com/hbm/handler/guncfg/GunRocketFactory.java
Normal file
149
com/hbm/handler/guncfg/GunRocketFactory.java
Normal file
@ -0,0 +1,149 @@
|
||||
package com.hbm.handler.guncfg;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import com.hbm.handler.BulletConfigSyncingUtil;
|
||||
import com.hbm.handler.BulletConfiguration;
|
||||
import com.hbm.handler.GunConfiguration;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.render.misc.RenderScreenOverlay.Crosshair;
|
||||
|
||||
public class GunRocketFactory {
|
||||
|
||||
public static GunConfiguration getGustavConfig() {
|
||||
|
||||
GunConfiguration config = new GunConfiguration();
|
||||
|
||||
config.rateOfFire = 30;
|
||||
config.roundsPerCycle = 1;
|
||||
config.gunMode = GunConfiguration.MODE_NORMAL;
|
||||
config.firingMode = GunConfiguration.FIRE_MANUAL;
|
||||
config.hasReloadAnim = false;
|
||||
config.hasFiringAnim = false;
|
||||
config.hasSpinup = false;
|
||||
config.hasSpindown = false;
|
||||
config.reloadDuration = 60;
|
||||
config.firingDuration = 0;
|
||||
config.ammoCap = 1;
|
||||
config.reloadType = GunConfiguration.RELOAD_SINGLE;
|
||||
config.allowsInfinity = true;
|
||||
config.crosshair = Crosshair.L_CIRCUMFLEX;
|
||||
|
||||
config.name = "Carl Gustav Recoilless Rifle M1";
|
||||
config.manufacturer = "Saab Bofors Dynamics";
|
||||
|
||||
config.config = new ArrayList<Integer>();
|
||||
config.config.add(BulletConfigSyncingUtil.ROCKET_NORMAL);
|
||||
config.config.add(BulletConfigSyncingUtil.ROCKET_HE);
|
||||
config.config.add(BulletConfigSyncingUtil.ROCKET_INCENDIARY);
|
||||
config.config.add(BulletConfigSyncingUtil.ROCKET_SHRAPNEL);
|
||||
config.config.add(BulletConfigSyncingUtil.ROCKET_EMP);
|
||||
config.config.add(BulletConfigSyncingUtil.ROCKET_GLARE);
|
||||
config.config.add(BulletConfigSyncingUtil.ROCKET_SLEEK);
|
||||
config.durability = 140;
|
||||
|
||||
return config;
|
||||
}
|
||||
|
||||
public static BulletConfiguration getRocketConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardRocketConfig();
|
||||
|
||||
bullet.ammo = ModItems.ammo_rocket;
|
||||
bullet.dmgMin = 10;
|
||||
bullet.dmgMax = 15;
|
||||
bullet.explosive = 4F;
|
||||
bullet.trail = 0;
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
public static BulletConfiguration getRocketHEConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardRocketConfig();
|
||||
|
||||
bullet.ammo = ModItems.ammo_rocket_he;
|
||||
bullet.dmgMin = 10;
|
||||
bullet.dmgMax = 15;
|
||||
bullet.wear = 15;
|
||||
bullet.explosive = 6.5F;
|
||||
bullet.trail = 1;
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
public static BulletConfiguration getRocketIncendiaryConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardRocketConfig();
|
||||
|
||||
bullet.ammo = ModItems.ammo_rocket_incendiary;
|
||||
bullet.dmgMin = 10;
|
||||
bullet.dmgMax = 15;
|
||||
bullet.wear = 15;
|
||||
bullet.explosive = 4F;
|
||||
bullet.incendiary = 5;
|
||||
bullet.trail = 2;
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
public static BulletConfiguration getRocketEMPConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardRocketConfig();
|
||||
|
||||
bullet.ammo = ModItems.ammo_rocket_emp;
|
||||
bullet.dmgMin = 10;
|
||||
bullet.dmgMax = 15;
|
||||
bullet.explosive = 2.5F;
|
||||
bullet.emp = 10;
|
||||
bullet.trail = 4;
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
public static BulletConfiguration getRocketSleekConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardRocketConfig();
|
||||
|
||||
bullet.ammo = ModItems.ammo_rocket_sleek;
|
||||
bullet.dmgMin = 10;
|
||||
bullet.dmgMax = 15;
|
||||
bullet.explosive = 10F;
|
||||
bullet.trail = 6;
|
||||
bullet.gravity = 0;
|
||||
bullet.jolt = 6.5D;
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
public static BulletConfiguration getRocketShrapnelConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardRocketConfig();
|
||||
|
||||
bullet.ammo = ModItems.ammo_rocket_shrapnel;
|
||||
bullet.dmgMin = 10;
|
||||
bullet.dmgMax = 15;
|
||||
bullet.explosive = 4F;
|
||||
bullet.shrapnel = 25;
|
||||
bullet.trail = 3;
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
public static BulletConfiguration getRocketGlareConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardRocketConfig();
|
||||
|
||||
bullet.ammo = ModItems.ammo_rocket_glare;
|
||||
bullet.velocity = 5.0F;
|
||||
bullet.dmgMin = 10;
|
||||
bullet.dmgMax = 15;
|
||||
bullet.wear = 20;
|
||||
bullet.explosive = 4F;
|
||||
bullet.incendiary = 5;
|
||||
bullet.trail = 5;
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
}
|
||||
@ -2,7 +2,10 @@ package com.hbm.items;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.handler.BucketHandler;
|
||||
import com.hbm.handler.GunConfigFactory;
|
||||
import com.hbm.handler.guncfg.Gun20GaugeFactory;
|
||||
import com.hbm.handler.guncfg.Gun357MagnumFactory;
|
||||
import com.hbm.handler.guncfg.GunGrenadeFactory;
|
||||
import com.hbm.handler.guncfg.GunRocketFactory;
|
||||
import com.hbm.items.bomb.*;
|
||||
import com.hbm.items.food.*;
|
||||
import com.hbm.items.gear.*;
|
||||
@ -2297,15 +2300,15 @@ public class ModItems {
|
||||
ammo_grenade_toxic = new ItemAmmo().setUnlocalizedName("ammo_grenade_toxic").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_grenade_toxic");
|
||||
ammo_grenade_sleek = new ItemAmmo().setUnlocalizedName("ammo_grenade_sleek").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_grenade_sleek");
|
||||
|
||||
gun_rpg = new ItemGunBase(GunConfigFactory.getGustavConfig()).setUnlocalizedName("gun_rpg").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_rpg");
|
||||
gun_rpg = new ItemGunBase(GunRocketFactory.getGustavConfig()).setUnlocalizedName("gun_rpg").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_rpg");
|
||||
gun_rpg_ammo = new Item().setUnlocalizedName("gun_rpg_ammo").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_rpg_ammo_alt");
|
||||
gun_hk69 = new ItemGunBase(GunConfigFactory.getGrenadeConfig()).setUnlocalizedName("gun_hk69").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_hk69");
|
||||
gun_hk69 = new ItemGunBase(GunGrenadeFactory.getHK69Config()).setUnlocalizedName("gun_hk69").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_hk69");
|
||||
gun_stinger = new GunStinger().setUnlocalizedName("gun_stinger").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_stinger");
|
||||
gun_skystinger = new GunStinger().setUnlocalizedName("gun_skystinger").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_skystinger");
|
||||
gun_stinger_ammo = new Item().setUnlocalizedName("gun_stinger_ammo").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_stinger_ammo");
|
||||
gun_revolver_ammo = new Item().setUnlocalizedName("gun_revolver_ammo").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_ammo");
|
||||
//gun_revolver = new GunRevolver(gun_revolver_ammo, 10, 25, false, false).setMaxDamage(500).setUnlocalizedName("gun_revolver").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver");
|
||||
gun_revolver = new ItemGunBase(GunConfigFactory.getRevolverConfig()).setUnlocalizedName("gun_revolver").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver");
|
||||
gun_revolver = new ItemGunBase(Gun357MagnumFactory.getRevolverConfig()).setUnlocalizedName("gun_revolver").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver");
|
||||
gun_revolver_saturnite = new GunRevolver(gun_revolver_ammo, 20, 35, false, false).setMaxDamage(2500).setUnlocalizedName("gun_revolver_saturnite").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_saturnite");
|
||||
gun_revolver_iron_ammo = new Item().setUnlocalizedName("gun_revolver_iron_ammo").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_iron_ammo");
|
||||
gun_revolver_iron = new GunRevolver(gun_revolver_iron_ammo, 5, 15, false, false).setMaxDamage(100).setUnlocalizedName("gun_revolver_iron").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_iron");
|
||||
@ -2352,7 +2355,7 @@ public class ModItems {
|
||||
gun_uboinik_ammo = new Item().setUnlocalizedName("gun_uboinik_ammo").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_uboinik_ammo");
|
||||
gun_uboinik = new GunShotgun().setUnlocalizedName("gun_uboinik").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_uboinik");
|
||||
gun_lever_action_ammo = new Item().setUnlocalizedName("gun_lever_action_ammo").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_lever_action_ammo");
|
||||
gun_lever_action = new ItemGunBase(GunConfigFactory.getMareConfig()).setUnlocalizedName("gun_lever_action").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_lever_action");
|
||||
gun_lever_action = new ItemGunBase(Gun20GaugeFactory.getMareConfig()).setUnlocalizedName("gun_lever_action").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_lever_action");
|
||||
gun_lever_action_dark = new GunLeverAction().setUnlocalizedName("gun_lever_action_dark").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_lever_action_dark");
|
||||
gun_lever_action_sonata = new GunLeverActionS().setUnlocalizedName("gun_lever_action_sonata").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_lever_action_sonata");
|
||||
gun_bolt_action_ammo = new Item().setUnlocalizedName("gun_bolt_action_ammo").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_bolt_action_ammo");
|
||||
|
||||
@ -4,8 +4,8 @@ import com.hbm.entity.particle.EntityGasFlameFX;
|
||||
import com.hbm.entity.particle.EntitySSmokeFX;
|
||||
import com.hbm.entity.projectile.EntityBullet;
|
||||
import com.hbm.entity.projectile.EntityBulletBase;
|
||||
import com.hbm.handler.BulletConfigFactory;
|
||||
import com.hbm.handler.BulletConfigSyncingUtil;
|
||||
import com.hbm.handler.guncfg.BulletConfigFactory;
|
||||
import com.hbm.interfaces.IHoldableWeapon;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.render.misc.RenderScreenOverlay.Crosshair;
|
||||
|
||||
@ -6,8 +6,8 @@ import java.util.Random;
|
||||
import com.google.common.collect.Multimap;
|
||||
import com.hbm.entity.projectile.EntityBullet;
|
||||
import com.hbm.entity.projectile.EntityBulletBase;
|
||||
import com.hbm.handler.BulletConfigFactory;
|
||||
import com.hbm.handler.BulletConfigSyncingUtil;
|
||||
import com.hbm.handler.guncfg.BulletConfigFactory;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import net.minecraft.enchantment.Enchantment;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user