mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
improved emp gun (tm)
This commit is contained in:
parent
09f1194e19
commit
02e81902df
@ -1472,7 +1472,7 @@ item.gun_immolator.name=Der Immolator
|
||||
item.gun_cryolator.name=Der Cryolator
|
||||
item.gun_mp.name=Maschinengewehr des Pazifisten
|
||||
item.gun_zomg.name=Singularitätsbetriebener Paarvernichtungsstrahl "ZOMG Kanone"
|
||||
item.gun_emp.name=EMP-Strahler
|
||||
item.gun_emp.name=EMP-Waffe
|
||||
item.gun_super_shotgun.name=Super Shotgun
|
||||
item.gun_moist_nugget.name=Mosin-Nagant
|
||||
item.gun_revolver_inverted.name=Umgedrehter Revolver
|
||||
|
||||
@ -1472,7 +1472,7 @@ item.gun_immolator.name=The Immolator
|
||||
item.gun_cryolator.name=The Cryolator
|
||||
item.gun_mp.name=Pacifist's Machine Gun
|
||||
item.gun_zomg.name=Singularity Powered Annihilation Ray "ZOMG Cannon"
|
||||
item.gun_emp.name=EMP Ray
|
||||
item.gun_emp.name=EMP Gun
|
||||
item.gun_super_shotgun.name=Super Shotgun
|
||||
item.gun_moist_nugget.name=Mosin-Nagant
|
||||
item.gun_revolver_inverted.name=Flipped Revolver
|
||||
|
||||
@ -120,6 +120,7 @@
|
||||
"weapon.hkReload": {"category": "player", "sounds": [{"name": "weapon/hkReload", "stream": false}]},
|
||||
"weapon.deagleShoot": {"category": "player", "sounds": [{"name": "weapon/deagleShoot", "stream": false}]},
|
||||
"weapon.tesla": {"category": "block", "sounds": ["weapon/tesla1", "weapon/tesla2", "weapon/tesla3", "weapon/tesla4"]},
|
||||
"weapon.teslaShoot": {"category": "player", "sounds": [{"name": "weapon/teslaShoot", "stream": false}]},
|
||||
|
||||
"weapon.reloadTurret": {"category": "player", "sounds": [{"name": "weapon/reloadTurret", "stream": false}]},
|
||||
"weapon.switchmode1": {"category": "player", "sounds": [{"name": "weapon/switchmode1", "stream": false}]},
|
||||
|
||||
BIN
assets/hbm/sounds/weapon/teslaShoot.ogg
Normal file
BIN
assets/hbm/sounds/weapon/teslaShoot.ogg
Normal file
Binary file not shown.
@ -110,6 +110,7 @@ public class BulletConfigSyncingUtil {
|
||||
public static int SPECIAL_OSIPR = i++;
|
||||
public static int SPECIAL_GAUSS = i++;
|
||||
public static int SPECIAL_GAUSS_CHARGED = i++;
|
||||
public static int SPECIAL_EMP = i++;
|
||||
|
||||
public static int G20_NORMAL_FIRE = i++;
|
||||
public static int G20_SHRAPNEL_FIRE = i++;
|
||||
@ -226,6 +227,7 @@ public class BulletConfigSyncingUtil {
|
||||
configSet.put(SPECIAL_OSIPR, GunOSIPRFactory.getPulseConfig());
|
||||
configSet.put(SPECIAL_GAUSS, GunGaussFactory.getGaussConfig());
|
||||
configSet.put(SPECIAL_GAUSS_CHARGED, GunGaussFactory.getAltConfig());
|
||||
configSet.put(SPECIAL_EMP, GunEnergyFactory.getOrbusConfig());
|
||||
|
||||
configSet.put(G20_NORMAL_FIRE, Gun20GaugeFactory.get20GaugeConfig().setToFire(3));
|
||||
configSet.put(G20_SHRAPNEL_FIRE, Gun20GaugeFactory.get20GaugeShrapnelConfig().setToFire(3));
|
||||
|
||||
@ -92,6 +92,7 @@ public class BulletConfiguration {
|
||||
public static final int STYLE_MIRV = 8;
|
||||
public static final int STYLE_GRENADE = 9;
|
||||
public static final int STYLE_BF = 10;
|
||||
public static final int STYLE_ORB = 11;
|
||||
|
||||
public static final int PLINK_NONE = 0;
|
||||
public static final int PLINK_BULLET = 1;
|
||||
|
||||
@ -74,8 +74,6 @@ public class Gun4GaugeFactory {
|
||||
bullet.ammo = ModItems.ammo_4gauge_slug;
|
||||
bullet.dmgMin = 15;
|
||||
bullet.dmgMax = 20;
|
||||
bullet.bulletsMin *= 2;
|
||||
bullet.bulletsMax *= 2;
|
||||
bullet.wear = 7;
|
||||
bullet.style = BulletConfiguration.STYLE_NORMAL;
|
||||
|
||||
|
||||
74
com/hbm/handler/guncfg/GunEnergyFactory.java
Normal file
74
com/hbm/handler/guncfg/GunEnergyFactory.java
Normal file
@ -0,0 +1,74 @@
|
||||
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.util.RenderScreenOverlay.Crosshair;
|
||||
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
|
||||
public class GunEnergyFactory {
|
||||
|
||||
public static GunConfiguration getEMPConfig() {
|
||||
|
||||
GunConfiguration config = new GunConfiguration();
|
||||
|
||||
config.rateOfFire = 30;
|
||||
config.roundsPerCycle = 1;
|
||||
config.gunMode = GunConfiguration.MODE_NORMAL;
|
||||
config.firingMode = GunConfiguration.FIRE_MANUAL;
|
||||
config.hasReloadAnim = false;
|
||||
config.hasFiringAnim = false;
|
||||
config.hasSpinup = false;
|
||||
config.hasSpindown = false;
|
||||
config.reloadDuration = 10;
|
||||
config.firingDuration = 0;
|
||||
config.ammoCap = 0;
|
||||
config.durability = 1500;
|
||||
config.reloadType = GunConfiguration.RELOAD_NONE;
|
||||
config.allowsInfinity = true;
|
||||
config.crosshair = Crosshair.L_SPLIT;
|
||||
config.firingSound = "hbm:weapon.teslaShoot";
|
||||
|
||||
config.name = "EMP Orb Projector";
|
||||
config.manufacturer = "MWT Prototype Labs";
|
||||
|
||||
config.config = new ArrayList<Integer>();
|
||||
config.config.add(BulletConfigSyncingUtil.SPECIAL_EMP);
|
||||
|
||||
return config;
|
||||
}
|
||||
|
||||
public static BulletConfiguration getOrbusConfig() {
|
||||
|
||||
BulletConfiguration bullet = new BulletConfiguration();
|
||||
|
||||
bullet.ammo = ModItems.gun_emp_ammo;
|
||||
|
||||
bullet.velocity = 1F;
|
||||
bullet.spread = 0.0F;
|
||||
bullet.wear = 10;
|
||||
bullet.bulletsMin = 1;
|
||||
bullet.bulletsMax = 1;
|
||||
bullet.dmgMin = 10;
|
||||
bullet.dmgMax = 12;
|
||||
bullet.gravity = 0D;
|
||||
bullet.maxAge = 100;
|
||||
bullet.doesRicochet = false;
|
||||
bullet.doesPenetrate = true;
|
||||
bullet.doesBreakGlass = false;
|
||||
bullet.style = BulletConfiguration.STYLE_ORB;
|
||||
bullet.plink = BulletConfiguration.PLINK_NONE;
|
||||
bullet.emp = 10;
|
||||
|
||||
bullet.effects = new ArrayList();
|
||||
bullet.effects.add(new PotionEffect(Potion.moveSlowdown.id, 10 * 20, 1));
|
||||
bullet.effects.add(new PotionEffect(Potion.weakness.id, 10 * 20, 4));
|
||||
|
||||
return bullet;
|
||||
}
|
||||
}
|
||||
@ -12,6 +12,7 @@ import com.hbm.handler.guncfg.Gun50AEFactory;
|
||||
import com.hbm.handler.guncfg.Gun50BMGFactory;
|
||||
import com.hbm.handler.guncfg.Gun5mmFactory;
|
||||
import com.hbm.handler.guncfg.Gun9mmFactory;
|
||||
import com.hbm.handler.guncfg.GunEnergyFactory;
|
||||
import com.hbm.handler.guncfg.GunFatmanFactory;
|
||||
import com.hbm.handler.guncfg.GunGaussFactory;
|
||||
import com.hbm.handler.guncfg.GunGrenadeFactory;
|
||||
@ -2941,7 +2942,7 @@ public class ModItems {
|
||||
gun_zomg = new GunZOMG().setUnlocalizedName("gun_zomg").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_zomg");
|
||||
gun_revolver_inverted = new GunSuicide().setUnlocalizedName("gun_revolver_inverted").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_inverted");
|
||||
gun_emp_ammo = new Item().setUnlocalizedName("gun_emp_ammo").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_emp_ammo");
|
||||
gun_emp = new GunEMPRay().setUnlocalizedName("gun_emp").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_emp");
|
||||
gun_emp = new ItemGunBase(GunEnergyFactory.getEMPConfig()).setUnlocalizedName("gun_emp").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_emp");
|
||||
gun_jack_ammo = new Item().setUnlocalizedName("gun_jack_ammo").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_jack_ammo");
|
||||
gun_jack = new GunJack().setUnlocalizedName("gun_jack").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_jack");
|
||||
gun_spark_ammo = new Item().setUnlocalizedName("gun_spark_ammo").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_spark_ammo");
|
||||
|
||||
@ -1812,6 +1812,7 @@ public class CraftingManager {
|
||||
GameRegistry.addSmelting(ModItems.powder_lead, new ItemStack(ModItems.ingot_lead), 1.0F);
|
||||
GameRegistry.addSmelting(ModItems.powder_neptunium, new ItemStack(ModItems.ingot_neptunium), 1.0F);
|
||||
GameRegistry.addSmelting(ModItems.powder_schrabidium, new ItemStack(ModItems.ingot_schrabidium), 5.0F);
|
||||
GameRegistry.addSmelting(ModItems.powder_euphemium, new ItemStack(ModItems.ingot_euphemium), 10.0F);
|
||||
GameRegistry.addSmelting(ModItems.powder_aluminium, new ItemStack(ModItems.ingot_aluminium), 1.0F);
|
||||
GameRegistry.addSmelting(ModItems.powder_beryllium, new ItemStack(ModItems.ingot_beryllium), 1.0F);
|
||||
GameRegistry.addSmelting(ModItems.powder_copper, new ItemStack(ModItems.ingot_copper), 1.0F);
|
||||
|
||||
@ -14,6 +14,7 @@ import com.hbm.render.model.ModelGrenade;
|
||||
import com.hbm.render.model.ModelMIRV;
|
||||
import com.hbm.render.model.ModelMiniNuke;
|
||||
import com.hbm.render.model.ModelRocket;
|
||||
import com.hbm.render.util.RenderSparks;
|
||||
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
@ -67,6 +68,7 @@ public class RenderBullet extends Render {
|
||||
case BulletConfiguration.STYLE_NUKE: renderNuke(0); break;
|
||||
case BulletConfiguration.STYLE_MIRV: renderNuke(1); break;
|
||||
case BulletConfiguration.STYLE_BF: renderNuke(2); break;
|
||||
case BulletConfiguration.STYLE_ORB: renderOrb(trail); break;
|
||||
default: renderBullet(trail); break;
|
||||
}
|
||||
|
||||
@ -166,6 +168,33 @@ public class RenderBullet extends Render {
|
||||
|
||||
}
|
||||
|
||||
private void renderOrb(int type) {
|
||||
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE);
|
||||
GL11.glDepthMask(false);
|
||||
|
||||
switch(type) {
|
||||
case 0:
|
||||
bindTexture(ResourceManager.tom_flame_tex);
|
||||
ResourceManager.sphere_uv_anim.renderAll();
|
||||
GL11.glScalef(0.3F, 0.3F, 0.3F);
|
||||
ResourceManager.sphere_uv_anim.renderAll();
|
||||
GL11.glScalef(1F/0.3F, 1F/0.3F, 1F/0.3F);
|
||||
for(int i = 0; i < 5; i++)
|
||||
RenderSparks.renderSpark((int) (System.currentTimeMillis() / 100 + 100 * i), 0, 0, 0, 0.5F, 2, 2, 0x8080FF, 0xFFFFFF);
|
||||
break;
|
||||
}
|
||||
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glDepthMask(true);
|
||||
|
||||
}
|
||||
|
||||
private void renderFlechette() {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glDisable(GL11.GL_TEXTURE_2D);
|
||||
|
||||
@ -99,7 +99,7 @@ public class TileEntityMachineReactor extends TileEntity implements ISidedInvent
|
||||
|
||||
@Override
|
||||
public boolean isItemValidForSlot(int i, ItemStack itemStack) {
|
||||
return i == 2 ? false : (i == 1 ? hasItemPower(itemStack) : true);
|
||||
return i == 2 ? false : (i == 0 ? hasItemPower(itemStack) : true);
|
||||
}
|
||||
|
||||
public boolean hasItemPower(ItemStack itemStack) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user