fire extinguisher

This commit is contained in:
Bob 2021-05-18 23:12:05 +02:00
parent 8ac797a5ae
commit f01d1bfbb5
18 changed files with 1697 additions and 3 deletions

View File

@ -183,6 +183,7 @@ public class ModBlocks {
public static Block block_white_phosphorus;
public static Block block_red_phosphorus;
public static Block block_fallout;
public static Block block_foam;
public static Block block_graphite;
public static Block block_boron;
public static Block block_lanthanium;
@ -325,6 +326,7 @@ public class ModBlocks {
public static Block fence_metal;
public static Block sand_boron;
public static Block sand_uranium;
public static Block sand_polonium;
public static Block glass_uranium;
@ -345,7 +347,10 @@ public class ModBlocks {
public static Block frozen_grass;
public static Block frozen_log;
public static Block frozen_planks;
public static Block fallout;
public static Block foam_layer;
public static Block sand_boron_layer;
public static Block sellafield_slaked;
public static Block sellafield_0;
@ -1180,11 +1185,12 @@ public class ModBlocks {
block_fiberglass = new BlockRotatablePillar(Material.cloth, RefStrings.MODID + ":block_fiberglass_top").setBlockName("block_fiberglass").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeCloth).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_fiberglass_side");
block_asbestos = new BlockOutgas(Material.cloth, true, 5, true).addAsbestos().toBlock().setBlockName("block_asbestos").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeCloth).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_asbestos");
block_cobalt = new BlockGeneric(Material.iron).setBlockName("block_cobalt").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_cobalt");
block_lithium = new BlockLithium(Material.iron).addHydroReactivity().toBlock().setBlockName("block_lithium").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_lithium");
block_zirconium = new BlockGeneric(Material.iron).setBlockName("block_zirconium").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_zirconium");
block_lithium = new BlockLithium(Material.iron).addHydroReactivity().toBlock().setBlockName("block_lithium").setStepSound(Block.soundTypeMetal).setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_lithium");
block_zirconium = new BlockGeneric(Material.iron).setBlockName("block_zirconium").setStepSound(Block.soundTypeMetal).setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_zirconium");
block_white_phosphorus = new BlockHazard(Material.rock).addFire(15).toBlock().setBlockName("block_white_phosphorus").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_white_phosphorus");
block_red_phosphorus = new BlockHazardFalling().addFire(15).toBlock().setStepSound(Block.soundTypeSand).setBlockName("block_red_phosphorus").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_red_phosphorus");
block_fallout = new BlockHazardFalling().addRadiation(ItemHazard.fo * ItemHazard.block).toBlock().setStepSound(Block.soundTypeGravel).setBlockName("block_fallout").setCreativeTab(MainRegistry.blockTab).setHardness(0.2F).setBlockTextureName(RefStrings.MODID + ":ash");
block_foam = new BlockGeneric(Material.snow).setBlockName("block_foam").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeSnow).setHardness(0.5F).setResistance(0.0F).setBlockTextureName(RefStrings.MODID + ":foam");
block_graphite = new BlockFlammable(Material.iron, 30, 5).setBlockName("block_graphite").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeMetal).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_graphite");
block_boron = new BlockGeneric(Material.iron).setBlockName("block_boron").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeMetal).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_boron");
block_lanthanium = new BlockGeneric(Material.iron).setBlockName("block_lanthanium").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeMetal).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_lanthanium");
@ -1326,6 +1332,7 @@ public class ModBlocks {
fence_metal = new BlockMetalFence(Material.iron).setBlockName("fence_metal").setCreativeTab(MainRegistry.machineTab).setHardness(15.0F).setResistance(0.25F).setBlockTextureName(RefStrings.MODID + ":fence_metal");
sand_boron = new BlockFalling(Material.sand).setBlockName("sand_boron").setStepSound(Block.soundTypeSand).setCreativeTab(MainRegistry.machineTab).setHardness(0.5F).setBlockTextureName(RefStrings.MODID + ":sand_boron");
sand_uranium = new BlockFalling(Material.sand).setBlockName("sand_uranium").setStepSound(Block.soundTypeSand).setCreativeTab(MainRegistry.machineTab).setHardness(0.5F).setBlockTextureName(RefStrings.MODID + ":sand_uranium");
sand_polonium = new BlockFalling(Material.sand).setBlockName("sand_polonium").setStepSound(Block.soundTypeSand).setCreativeTab(MainRegistry.machineTab).setHardness(0.5F).setBlockTextureName(RefStrings.MODID + ":sand_polonium");
glass_uranium = new BlockNTMGlass(1, RefStrings.MODID + ":glass_uranium", Material.glass).setBlockName("glass_uranium").setLightLevel(5F/15F).setStepSound(Block.soundTypeGlass).setCreativeTab(MainRegistry.machineTab).setHardness(0.3F);
@ -1347,6 +1354,8 @@ public class ModBlocks {
frozen_log = new WasteLog(Material.wood).setBlockName("frozen_log").setStepSound(Block.soundTypeGlass).setCreativeTab(MainRegistry.blockTab).setHardness(0.5F).setResistance(2.5F);
frozen_planks = new BlockOre(Material.wood).setBlockName("frozen_planks").setStepSound(Block.soundTypeGlass).setCreativeTab(MainRegistry.blockTab).setHardness(0.5F).setResistance(2.5F).setBlockTextureName(RefStrings.MODID + ":frozen_planks");
fallout = new BlockFallout(Material.snow).addRadiation(ItemHazard.fo * ItemHazard.powder * 2).toBlock().setBlockName("fallout").setStepSound(Block.soundTypeGravel).setCreativeTab(MainRegistry.blockTab).setHardness(0.1F).setLightOpacity(0).setBlockTextureName(RefStrings.MODID + ":ash");
foam_layer = new BlockFallout(Material.snow).setBlockName("foam_layer").setStepSound(Block.soundTypeSnow).setCreativeTab(MainRegistry.blockTab).setHardness(0.1F).setLightOpacity(0).setBlockTextureName(RefStrings.MODID + ":foam");
sand_boron_layer = new BlockFallout(Material.sand).setBlockName("sand_boron_layer").setStepSound(Block.soundTypeSand).setCreativeTab(MainRegistry.blockTab).setHardness(0.1F).setLightOpacity(0).setBlockTextureName(RefStrings.MODID + ":sand_boron");
sellafield_slaked = new BlockGeneric(Material.rock).setBlockName("sellafield_slaked").setStepSound(Block.soundTypeStone).setHardness(5.0F).setBlockTextureName(RefStrings.MODID + ":sellafield_slaked");
sellafield_0 = new BlockOre(Material.rock, 0.5F, 10F).setBlockName("sellafield_0").setStepSound(Block.soundTypeStone).setHardness(5.0F).setBlockTextureName(RefStrings.MODID + ":sellafield_0");
@ -2002,6 +2011,7 @@ public class ModBlocks {
GameRegistry.registerBlock(block_scrap, block_scrap.getUnlocalizedName());
GameRegistry.registerBlock(block_electrical_scrap, block_electrical_scrap.getUnlocalizedName());
GameRegistry.registerBlock(block_fallout, ItemBlockHazard.class, block_fallout.getUnlocalizedName());
GameRegistry.registerBlock(block_foam, block_foam.getUnlocalizedName());
GameRegistry.registerBlock(block_graphite, block_graphite.getUnlocalizedName());
GameRegistry.registerBlock(block_boron, block_boron.getUnlocalizedName());
GameRegistry.registerBlock(block_insulator, block_insulator.getUnlocalizedName());
@ -2189,6 +2199,8 @@ public class ModBlocks {
GameRegistry.registerBlock(frozen_log, frozen_log.getUnlocalizedName());
GameRegistry.registerBlock(frozen_planks, frozen_planks.getUnlocalizedName());
GameRegistry.registerBlock(fallout, ItemBlockHazard.class, fallout.getUnlocalizedName());
GameRegistry.registerBlock(foam_layer, foam_layer.getUnlocalizedName());
GameRegistry.registerBlock(sand_boron_layer, sand_boron_layer.getUnlocalizedName());
//RAD
GameRegistry.registerBlock(sellafield_slaked, sellafield_slaked.getUnlocalizedName());
@ -2285,6 +2297,7 @@ public class ModBlocks {
GameRegistry.registerBlock(fence_metal, fence_metal.getUnlocalizedName());
//Sands, Glass
GameRegistry.registerBlock(sand_boron, sand_boron.getUnlocalizedName());
GameRegistry.registerBlock(sand_uranium, sand_uranium.getUnlocalizedName());
GameRegistry.registerBlock(sand_polonium, sand_polonium.getUnlocalizedName());
GameRegistry.registerBlock(glass_uranium, glass_uranium.getUnlocalizedName());

View File

@ -137,6 +137,10 @@ public class BulletConfigSyncingUtil {
public static int FLAMER_VAPORIZER = i++;
public static int FLAMER_GAS = i++;
public static int FEXT_NORMAL = i++;
public static int FEXT_FOAM = i++;
public static int FEXT_SAND = i++;
public static int R556_NORMAL = i++;
public static int R556_GOLD = i++;
public static int R556_PHOSPHORUS = i++;
@ -358,6 +362,10 @@ public class BulletConfigSyncingUtil {
configSet.put(FLAMER_WP, GunEnergyFactory.getPhosphorusConfig());
configSet.put(FLAMER_VAPORIZER, GunEnergyFactory.getVaporizerConfig());
configSet.put(FLAMER_GAS, GunEnergyFactory.getGasConfig());
configSet.put(FEXT_NORMAL, GunEnergyFactory.getFextConfig());
configSet.put(FEXT_FOAM, GunEnergyFactory.getFextFoamConfig());
configSet.put(FEXT_SAND, GunEnergyFactory.getFlameConfig());
configSet.put(R556_NORMAL, Gun556mmFactory.get556Config());
configSet.put(R556_GOLD, Gun556mmFactory.get556GoldConfig());

View File

@ -2,6 +2,7 @@ package com.hbm.handler.guncfg;
import java.util.ArrayList;
import com.hbm.blocks.ModBlocks;
import com.hbm.entity.projectile.EntityBulletBase;
import com.hbm.explosion.ExplosionChaos;
import com.hbm.explosion.ExplosionLarge;
@ -9,13 +10,18 @@ import com.hbm.handler.BulletConfigSyncingUtil;
import com.hbm.handler.BulletConfiguration;
import com.hbm.handler.GunConfiguration;
import com.hbm.interfaces.IBulletImpactBehavior;
import com.hbm.interfaces.IBulletUpdateBehavior;
import com.hbm.items.ModItems;
import com.hbm.main.MainRegistry;
import com.hbm.packet.AuxParticlePacketNT;
import com.hbm.packet.PacketDispatcher;
import com.hbm.potion.HbmPotion;
import com.hbm.render.util.RenderScreenOverlay.Crosshair;
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.init.Blocks;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
@ -114,6 +120,36 @@ public class GunEnergyFactory {
return config;
}
public static GunConfiguration getExtConfig() {
GunConfiguration config = new GunConfiguration();
config.rateOfFire = 1;
config.roundsPerCycle = 1;
config.gunMode = GunConfiguration.MODE_NORMAL;
config.firingMode = GunConfiguration.FIRE_AUTO;
config.reloadDuration = 20;
config.reloadSoundEnd = false;
config.firingDuration = 0;
config.ammoCap = 300; //good for 15 seconds of continued spray
config.durability = 10000;
config.reloadType = GunConfiguration.RELOAD_FULL;
config.allowsInfinity = true;
config.crosshair = Crosshair.L_CIRCLE;
config.firingSound = "hbm:weapon.flamethrowerShoot";
config.reloadSound = "hbm:weapon.flamerReload";
config.name = "PROTEX Fire Exinguisher 6kg";
config.manufacturer = "Gloria GmbH";
config.config = new ArrayList<Integer>();
config.config.add(BulletConfigSyncingUtil.FEXT_NORMAL);
config.config.add(BulletConfigSyncingUtil.FEXT_FOAM);
config.config.add(BulletConfigSyncingUtil.FEXT_SAND);
return config;
}
public static GunConfiguration getVortexConfig() {
@ -271,6 +307,170 @@ public class GunEnergyFactory {
return bullet;
}
public static BulletConfiguration getFextConfig() {
BulletConfiguration bullet = new BulletConfiguration();
bullet.ammo = ModItems.ammo_fireext;
bullet.ammoCount = 300;
bullet.velocity = 0.75F;
bullet.spread = 0.025F;
bullet.wear = 1;
bullet.bulletsMin = 2;
bullet.bulletsMax = 3;
bullet.dmgMin = 0;
bullet.dmgMax = 0;
bullet.gravity = 0.04D;
bullet.maxAge = 100;
bullet.doesRicochet = false;
bullet.doesPenetrate = true;
bullet.doesBreakGlass = false;
bullet.style = BulletConfiguration.STYLE_NONE;
bullet.plink = BulletConfiguration.PLINK_NONE;
bullet.bImpact = new IBulletImpactBehavior() {
@Override
public void behaveBlockHit(EntityBulletBase bullet, int x, int y, int z) {
if(!bullet.worldObj.isRemote) {
int ix = (int)Math.floor(bullet.posX);
int iy = (int)Math.floor(bullet.posY);
int iz = (int)Math.floor(bullet.posZ);
boolean fizz = false;
for(int i = -1; i <= 1; i++) {
for(int j = -1; j <= 1; j++) {
for(int k = -1; k <= 1; k++) {
if(bullet.worldObj.getBlock(ix + i, iy + j, iz + k) == Blocks.fire) {
bullet.worldObj.setBlock(ix + i, iy + j, iz + k, Blocks.air);
fizz = true;
}
}
}
}
if(fizz)
bullet.worldObj.playSoundEffect(bullet.posX, bullet.posY, bullet.posZ, "random.fizz", 1.0F, 1.5F + bullet.worldObj.rand.nextFloat() * 0.5F);
}
}
};
bullet.bUpdate = new IBulletUpdateBehavior() {
@Override
public void behaveUpdate(EntityBulletBase bullet) {
if(bullet.worldObj.isRemote) {
NBTTagCompound data = new NBTTagCompound();
data.setString("type", "vanillaExt");
data.setString("mode", "blockdust");
data.setInteger("block", Block.getIdFromBlock(Blocks.water));
data.setDouble("posX", bullet.posX);
data.setDouble("posY", bullet.posY);
data.setDouble("posZ", bullet.posZ);
data.setDouble("mX", bullet.motionX + bullet.worldObj.rand.nextGaussian() * 0.05);
data.setDouble("mY", bullet.motionY - 0.2 + bullet.worldObj.rand.nextGaussian() * 0.05);
data.setDouble("mZ", bullet.motionZ + bullet.worldObj.rand.nextGaussian() * 0.05);
MainRegistry.proxy.effectNT(data);
}
}
};
return bullet;
}
public static BulletConfiguration getFextFoamConfig() {
BulletConfiguration bullet = new BulletConfiguration();
bullet.ammo = ModItems.ammo_fireext_foam;
bullet.ammoCount = 300;
bullet.velocity = 0.75F;
bullet.spread = 0.025F;
bullet.wear = 1;
bullet.bulletsMin = 2;
bullet.bulletsMax = 3;
bullet.dmgMin = 0;
bullet.dmgMax = 0;
bullet.gravity = 0.04D;
bullet.maxAge = 100;
bullet.doesRicochet = false;
bullet.doesPenetrate = true;
bullet.doesBreakGlass = false;
bullet.style = BulletConfiguration.STYLE_NONE;
bullet.plink = BulletConfiguration.PLINK_NONE;
bullet.bImpact = new IBulletImpactBehavior() {
@Override
public void behaveBlockHit(EntityBulletBase bullet, int x, int y, int z) {
if(!bullet.worldObj.isRemote) {
int ix = (int)Math.floor(bullet.posX);
int iy = (int)Math.floor(bullet.posY);
int iz = (int)Math.floor(bullet.posZ);
boolean fizz = false;
for(int i = -1; i <= 1; i++) {
for(int j = -1; j <= 1; j++) {
for(int k = -1; k <= 1; k++) {
Block b = bullet.worldObj.getBlock(ix + i, iy + j, iz + k);
if(b.getMaterial() == Material.fire) {
bullet.worldObj.setBlock(ix + i, iy + j, iz + k, Blocks.air);
fizz = true;
}
}
}
}
Block b = bullet.worldObj.getBlock(ix, iy, iz);
if(b != ModBlocks.foam_layer && b.isReplaceable(bullet.worldObj, ix, iy, iz) && ModBlocks.foam_layer.canPlaceBlockAt(bullet.worldObj, ix, iy, iz)) {
bullet.worldObj.setBlock(ix, iy, iz, ModBlocks.foam_layer);
}
if(fizz)
bullet.worldObj.playSoundEffect(bullet.posX, bullet.posY, bullet.posZ, "random.fizz", 1.0F, 1.5F + bullet.worldObj.rand.nextFloat() * 0.5F);
}
}
};
bullet.bUpdate = new IBulletUpdateBehavior() {
@Override
public void behaveUpdate(EntityBulletBase bullet) {
if(bullet.worldObj.isRemote) {
NBTTagCompound data = new NBTTagCompound();
data.setString("type", "vanillaExt");
data.setString("mode", "blockdust");
data.setInteger("block", Block.getIdFromBlock(ModBlocks.block_foam));
data.setDouble("posX", bullet.posX);
data.setDouble("posY", bullet.posY);
data.setDouble("posZ", bullet.posZ);
data.setDouble("mX", bullet.motionX + bullet.worldObj.rand.nextGaussian() * 0.05);
data.setDouble("mY", bullet.motionY - 0.2 + bullet.worldObj.rand.nextGaussian() * 0.05);
data.setDouble("mZ", bullet.motionZ + bullet.worldObj.rand.nextGaussian() * 0.05);
MainRegistry.proxy.effectNT(data);
}
}
};
return bullet;
}
public static BulletConfiguration getZOMGBoltConfig() {
BulletConfiguration bullet = new BulletConfiguration();
@ -300,7 +500,7 @@ public class GunEnergyFactory {
public void behaveBlockHit(EntityBulletBase bullet, int x, int y, int z) {
if(!bullet.worldObj.isRemote) {
ExplosionChaos.explodeZOMG(bullet.worldObj, (int)bullet.posX, (int)bullet.posY, (int)bullet.posZ, 5);
ExplosionChaos.explodeZOMG(bullet.worldObj, (int)Math.floor(bullet.posX), (int)Math.floor(bullet.posY), (int)Math.floor(bullet.posZ), 5);
bullet.worldObj.playSoundEffect(bullet.posX, bullet.posY, bullet.posZ, "hbm:entity.bombDet", 5.0F, 1.0F);
ExplosionLarge.spawnParticles(bullet.worldObj, bullet.posX, bullet.posY, bullet.posZ, 5);
}

View File

@ -1375,6 +1375,9 @@ public class ModItems {
public static Item ammo_fuel_phosphorus;
public static Item ammo_fuel_vaporizer;
public static Item ammo_fuel_gas;
public static Item ammo_fireext;
public static Item ammo_fireext_foam;
public static Item ammo_fireext_sand;
public static Item ammo_cell;
public static Item ammo_dart;
public static Item ammo_dart_nerf;
@ -1464,6 +1467,7 @@ public class ModItems {
public static Item gun_flamer;
public static Item gun_cryolator;
public static Item gun_cryolator_ammo;
public static Item gun_fireext;
public static Item gun_mp;
public static Item gun_bolter;
public static Item gun_bolter_digamma;
@ -3649,6 +3653,9 @@ public class ModItems {
ammo_fuel_phosphorus = new ItemAmmo().setUnlocalizedName("ammo_fuel_phosphorus").setCreativeTab(MainRegistry.weaponTab).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":ammo_fuel_phosphorus");
ammo_fuel_vaporizer = new ItemAmmo().setUnlocalizedName("ammo_fuel_vaporizer").setCreativeTab(MainRegistry.weaponTab).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":ammo_fuel_vaporizer");
ammo_fuel_gas = new ItemAmmo().setUnlocalizedName("ammo_fuel_gas").setCreativeTab(MainRegistry.weaponTab).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":ammo_fuel_gas");
ammo_fireext = new ItemAmmo().setUnlocalizedName("ammo_fireext").setCreativeTab(MainRegistry.weaponTab).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":ammo_fireext");
ammo_fireext_foam = new ItemAmmo().setUnlocalizedName("ammo_fireext_foam").setCreativeTab(MainRegistry.weaponTab).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":ammo_fireext_foam");
ammo_fireext_sand = new ItemAmmo().setUnlocalizedName("ammo_fireext_sand").setCreativeTab(MainRegistry.weaponTab).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":ammo_fireext_sand");
ammo_cell = new ItemAmmo().setUnlocalizedName("ammo_cell").setCreativeTab(MainRegistry.weaponTab).setMaxStackSize(16).setTextureName(RefStrings.MODID + ":ammo_cell");
ammo_dart = new ItemAmmo().setUnlocalizedName("ammo_dart").setCreativeTab(MainRegistry.weaponTab).setMaxStackSize(16).setTextureName(RefStrings.MODID + ":ammo_dart");
ammo_dart_nerf = new ItemAmmo().setUnlocalizedName("ammo_dart_nerf").setCreativeTab(MainRegistry.weaponTab).setMaxStackSize(16).setTextureName(RefStrings.MODID + ":ammo_dart_nerf");
@ -3738,6 +3745,7 @@ public class ModItems {
gun_flamer = new ItemGunBase(GunEnergyFactory.getFlamerConfig()).setUnlocalizedName("gun_flamer").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_flamer");
gun_cryolator_ammo = new Item().setUnlocalizedName("gun_cryolator_ammo").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_cryolator_ammo");
gun_cryolator = new GunCryolator().setUnlocalizedName("gun_cryolator").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_cryolator");
gun_fireext = new ItemGunBase(GunEnergyFactory.getExtConfig()).setUnlocalizedName("gun_fireext").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_fireext");
ammo_566_gold = new ItemCustomLore().setUnlocalizedName("gun_mp_ammo").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_pm_ammo");
gun_mp = new ItemGunBase(Gun556mmFactory.getEuphieConfig()).setUnlocalizedName("gun_mp").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_pm");
gun_bolter = new ItemGunBase(Gun75BoltFactory.getBolterConfig()).setUnlocalizedName("gun_bolter").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_bolter");
@ -6213,6 +6221,7 @@ public class ModItems {
GameRegistry.registerItem(gun_immolator, gun_immolator.getUnlocalizedName());
GameRegistry.registerItem(gun_flamer, gun_flamer.getUnlocalizedName());
GameRegistry.registerItem(gun_cryolator, gun_cryolator.getUnlocalizedName());
GameRegistry.registerItem(gun_fireext, gun_fireext.getUnlocalizedName());
GameRegistry.registerItem(gun_mp, gun_mp.getUnlocalizedName());
GameRegistry.registerItem(gun_bolter, gun_bolter.getUnlocalizedName());
GameRegistry.registerItem(gun_bolter_digamma, gun_bolter_digamma.getUnlocalizedName());
@ -6362,6 +6371,9 @@ public class ModItems {
GameRegistry.registerItem(ammo_fuel_phosphorus, ammo_fuel_phosphorus.getUnlocalizedName());
GameRegistry.registerItem(ammo_fuel_vaporizer, ammo_fuel_vaporizer.getUnlocalizedName());
GameRegistry.registerItem(ammo_fuel_gas, ammo_fuel_gas.getUnlocalizedName());
GameRegistry.registerItem(ammo_fireext, ammo_fireext.getUnlocalizedName());
GameRegistry.registerItem(ammo_fireext_foam, ammo_fireext_foam.getUnlocalizedName());
GameRegistry.registerItem(ammo_fireext_sand, ammo_fireext_sand.getUnlocalizedName());
GameRegistry.registerItem(ammo_cell, ammo_cell.getUnlocalizedName());
GameRegistry.registerItem(ammo_dart, ammo_dart.getUnlocalizedName());
GameRegistry.registerItem(ammo_dart_nerf, ammo_dart_nerf.getUnlocalizedName());

View File

@ -440,6 +440,12 @@ public class ItemAmmo extends Item {
list.add(EnumChatFormatting.RED + "- Not incendiary");
}
//FIRE EXT
if(this == ModItems.ammo_fireext_foam) {
list.add(EnumChatFormatting.BLUE + "+ Can put out any fire type");
list.add(EnumChatFormatting.BLUE + "+ Creates protective foam layer");
}
//5.56mm
if(this == ModItems.ammo_556_phosphorus) {
list.add(EnumChatFormatting.BLUE + "+ Induces phosphorus burns");

View File

@ -336,6 +336,7 @@ public class ClientProxy extends ServerProxy {
MinecraftForgeClient.registerItemRenderer(ModItems.gun_thompson, new ItemRenderWeaponThompson());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_bolter, new ItemRenderWeaponBolter());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_bolter_digamma, new ItemRenderWeaponBolter());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_fireext, new ItemRenderFireExt());
//multitool
MinecraftForgeClient.registerItemRenderer(ModItems.multitool_dig, new ItemRenderMultitool());
MinecraftForgeClient.registerItemRenderer(ModItems.multitool_silk, new ItemRenderMultitool());
@ -909,6 +910,13 @@ public class ClientProxy extends ServerProxy {
Minecraft.getMinecraft().effectRenderer.addEffect(sec);
}
}
if("blockdust".equals(data.getString("mode"))) {
Block b = Block.getBlockById(data.getInteger("block"));
fx = new net.minecraft.client.particle.EntityBlockDustFX(world, x, y, z, mX, mY + 0.2, mZ, b, 0);
ReflectionHelper.setPrivateValue(EntityFX.class, fx, 10 + rand.nextInt(20), "particleMaxAge", "field_70547_e");
}
if(fx != null)
Minecraft.getMinecraft().effectRenderer.addEffect(fx);

View File

@ -524,6 +524,7 @@ public class ResourceManager {
public static final IModelCustom thompson = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/thompson.obj"));
public static final IModelCustom bolter = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/bolter.obj"));
public static final IModelCustom ff_python = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/python.obj"));
public static final IModelCustom fireext = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/fireext.obj"));
public static final IModelCustom grenade_frag = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/grenade_frag.obj"));
public static final IModelCustom grenade_aschrab = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/grenade_aschrab.obj"));
@ -577,6 +578,7 @@ public class ResourceManager {
public static final ResourceLocation thompson_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/thompson.png");
public static final ResourceLocation bolter_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/bolter.png");
public static final ResourceLocation bolter_digamma_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/bolter_digamma.png");
public static final ResourceLocation fireext_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/fireext_normal.png");
public static final ResourceLocation ff_gold = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/ff/gold.png");
public static final ResourceLocation ff_gun_bright = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/ff/gun_bright.png");

View File

@ -0,0 +1,95 @@
package com.hbm.render.item.weapon;
import org.lwjgl.opengl.GL11;
import com.hbm.main.ResourceManager;
import net.minecraft.client.Minecraft;
import net.minecraft.item.ItemStack;
import net.minecraftforge.client.IItemRenderer;
public class ItemRenderFireExt implements IItemRenderer {
public ItemRenderFireExt() { }
@Override
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
switch(type) {
case EQUIPPED:
case EQUIPPED_FIRST_PERSON:
case ENTITY:
case INVENTORY:
return true;
default: return false;
}
}
@Override
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) {
return type == ItemRenderType.ENTITY && (helper == ItemRendererHelper.ENTITY_ROTATION || helper == ItemRendererHelper.ENTITY_BOBBING);
}
@Override
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
GL11.glPushMatrix();
GL11.glEnable(GL11.GL_CULL_FACE);
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.fireext_tex);
switch(type) {
case EQUIPPED_FIRST_PERSON:
double s0 = 0.35D;
GL11.glRotated(25, 0, 0, 1);
GL11.glTranslated(0.5, -0.5, -0.5F);
GL11.glRotated(80, 0, 1, 0);
GL11.glScaled(s0, s0, s0);
break;
case EQUIPPED:
double scale = 0.5D;
GL11.glScaled(scale, scale, scale);
GL11.glRotatef(20F, 0.0F, 0.0F, 1.0F);
GL11.glRotatef(-5, 0.0F, 1.0F, 1.0F);
GL11.glRotatef(10, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(15F, 1.0F, 0.0F, 0.0F);
GL11.glTranslatef(0.75F, -2.75F, 0.5F);
break;
case ENTITY:
double s1 = 0.3D;
GL11.glScaled(s1, s1, s1);
break;
case INVENTORY:
GL11.glEnable(GL11.GL_LIGHTING);
double s = 4.5D;
GL11.glTranslated(2, 14, 0);
GL11.glRotated(-90, 0, 1, 0);
GL11.glRotated(-135, 1, 0, 0);
GL11.glRotated(System.currentTimeMillis() / 10 % 360, 0, 1, 0);
GL11.glScaled(s, s, -s);
break;
default: break;
}
GL11.glShadeModel(GL11.GL_SMOOTH);
ResourceManager.fireext.renderAll();
GL11.glShadeModel(GL11.GL_FLAT);
GL11.glPopMatrix();
}
}

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 309 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 861 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 235 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 236 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 263 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 565 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 753 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB