mostly finished new gas mask funnies, improved mask filters
@ -1,11 +1,10 @@
|
||||
package api.hbm.item;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import com.hbm.util.ArmorRegistry.HazardClass;
|
||||
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public interface IGasMask {
|
||||
@ -16,7 +15,7 @@ public interface IGasMask {
|
||||
* @param entity
|
||||
* @return an empty list if there's no blacklist
|
||||
*/
|
||||
public List<HazardClass> getBlacklist(ItemStack stack, EntityLivingBase entity);
|
||||
public ArrayList<HazardClass> getBlacklist(ItemStack stack, EntityLivingBase entity);
|
||||
|
||||
/**
|
||||
* Returns the loaded filter, if there is any
|
||||
|
||||
@ -859,8 +859,9 @@ public class ModBlocks {
|
||||
|
||||
public static Block machine_large_turbine;
|
||||
public static final int guiID_machine_large_turbine = 100;
|
||||
|
||||
|
||||
public static Block machine_chungus;
|
||||
public static Block machine_tower_large;
|
||||
|
||||
public static Block machine_deaerator;
|
||||
public static final int guiID_machine_deaerator = 74;
|
||||
@ -1264,7 +1265,7 @@ public class ModBlocks {
|
||||
stone_depth_nether = new BlockDepth().setBlockName("stone_depth_nether").setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":stone_depth_nether");
|
||||
ore_depth_nether_neodymium = new BlockDepthOre().setBlockName("ore_depth_nether_neodymium").setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":ore_depth_nether_neodymium");
|
||||
|
||||
stone_porous = new BlockPorous().setBlockName("stone_porous").setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":stone_porous");
|
||||
stone_porous = new BlockPorous().setBlockName("stone_porous").setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":stone_porous");
|
||||
|
||||
basalt = new BlockGeneric(Material.rock).setBlockName("basalt").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":basalt");
|
||||
basalt_sulfur = new BlockOre(Material.rock).setBlockName("basalt_sulfur").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":basalt_sulfur");
|
||||
@ -1964,6 +1965,7 @@ public class ModBlocks {
|
||||
machine_turbine = new MachineTurbine(Material.iron).setBlockName("machine_turbine").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_turbine");
|
||||
machine_large_turbine = new MachineLargeTurbine(Material.iron).setBlockName("machine_large_turbine").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_large_turbine");
|
||||
machine_chungus = new MachineChungus(Material.iron).setBlockName("machine_chungus").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_chungus");
|
||||
machine_tower_large = new MachineTowerLarge(Material.iron).setBlockName("machine_tower_large").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_tower_large");
|
||||
|
||||
anvil_iron = new NTMAnvil(Material.iron, 1).setBlockName("anvil_iron").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":anvil_iron");
|
||||
anvil_lead = new NTMAnvil(Material.iron, 1).setBlockName("anvil_lead").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":anvil_lead");
|
||||
@ -2798,6 +2800,7 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(machine_turbine, machine_turbine.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_large_turbine, machine_large_turbine.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_chungus, machine_chungus.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_tower_large, machine_tower_large.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_deaerator, machine_deaerator.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_waste_drum, machine_waste_drum.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_storage_drum, machine_storage_drum.getUnlocalizedName());
|
||||
|
||||
@ -2,6 +2,8 @@ package com.hbm.blocks.gas;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.util.ArmorRegistry;
|
||||
import com.hbm.util.ArmorRegistry.HazardClass;
|
||||
import com.hbm.util.ArmorUtil;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
@ -33,17 +35,21 @@ public class BlockGasClorine extends BlockGasBase {
|
||||
|
||||
@Override
|
||||
public void onEntityCollidedWithBlock(World world, int p_149670_2_, int p_149670_3_, int p_149670_4_, Entity entity) {
|
||||
if(entity instanceof EntityPlayer && ArmorUtil.checkForGasMask((EntityPlayer) entity)) {
|
||||
|
||||
if(!(entity instanceof EntityLivingBase))
|
||||
return;
|
||||
|
||||
EntityLivingBase entityLiving = (EntityLivingBase) entity;
|
||||
|
||||
if(ArmorRegistry.hasAllProtection(entityLiving, 3, HazardClass.GAS_CHLORINE)) {
|
||||
ArmorUtil.damageGasMaskFilter(entityLiving, 1);
|
||||
|
||||
if(world.rand.nextInt(25) == 0)
|
||||
ArmorUtil.damageSuit((EntityPlayer) entity, 3, world.rand.nextInt(2));
|
||||
|
||||
} else if(entity instanceof EntityLivingBase) {
|
||||
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.blindness.getId(), 5 * 20, 0));
|
||||
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.poison.getId(), 20 * 20, 2));
|
||||
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.wither.getId(), 1 * 20, 1));
|
||||
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.moveSlowdown.getId(), 30 * 20, 1));
|
||||
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.digSlowdown.getId(), 30 * 20, 2));
|
||||
} else {
|
||||
entityLiving.addPotionEffect(new PotionEffect(Potion.blindness.getId(), 5 * 20, 0));
|
||||
entityLiving.addPotionEffect(new PotionEffect(Potion.poison.getId(), 20 * 20, 2));
|
||||
entityLiving.addPotionEffect(new PotionEffect(Potion.wither.getId(), 1 * 20, 1));
|
||||
entityLiving.addPotionEffect(new PotionEffect(Potion.moveSlowdown.getId(), 30 * 20, 1));
|
||||
entityLiving.addPotionEffect(new PotionEffect(Potion.digSlowdown.getId(), 30 * 20, 2));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
package com.hbm.blocks.gas;
|
||||
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockGasExplosive extends BlockGasFlammable {
|
||||
|
||||
protected void combust(World world, int x, int y, int z) {
|
||||
super.combust(world, x, y, z);
|
||||
world.newExplosion(null, x + 0.5, y + 0.5, z + 0.5, 3F, true, false);
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,6 +3,9 @@ package com.hbm.blocks.gas;
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.lib.ModDamageSource;
|
||||
import com.hbm.util.ArmorRegistry;
|
||||
import com.hbm.util.ArmorRegistry.HazardClass;
|
||||
import com.hbm.util.ArmorUtil;
|
||||
import com.hbm.util.ContaminationUtil;
|
||||
import com.hbm.util.ContaminationUtil.ContaminationType;
|
||||
import com.hbm.util.ContaminationUtil.HazardType;
|
||||
@ -21,8 +24,15 @@ public class BlockGasMonoxide extends BlockGasBase {
|
||||
@Override
|
||||
public void onEntityCollidedWithBlock(World world, int p_149670_2_, int p_149670_3_, int p_149670_4_, Entity entity) {
|
||||
|
||||
if(entity instanceof EntityLivingBase)
|
||||
ContaminationUtil.contaminate((EntityLivingBase) entity, HazardType.MONOXIDE, ContaminationType.GAS_NON_REACTIVE, 1F);
|
||||
if(!(entity instanceof EntityLivingBase))
|
||||
return;
|
||||
|
||||
EntityLivingBase entityLiving = (EntityLivingBase) entity;
|
||||
|
||||
if(ArmorRegistry.hasAllProtection(entityLiving, 3, HazardClass.GAS_MONOXIDE))
|
||||
ArmorUtil.damageGasMaskFilter(entityLiving, 1);
|
||||
else
|
||||
entityLiving.attackEntityFrom(ModDamageSource.monoxide, 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -3,8 +3,12 @@ package com.hbm.blocks.gas;
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.lib.ModDamageSource;
|
||||
import com.hbm.potion.HbmPotion;
|
||||
import com.hbm.util.ArmorRegistry;
|
||||
import com.hbm.util.ArmorUtil;
|
||||
import com.hbm.util.ContaminationUtil;
|
||||
import com.hbm.util.ArmorRegistry.HazardClass;
|
||||
import com.hbm.util.ContaminationUtil.ContaminationType;
|
||||
import com.hbm.util.ContaminationUtil.HazardType;
|
||||
|
||||
@ -26,9 +30,16 @@ public class BlockGasRadonDense extends BlockGasBase {
|
||||
@Override
|
||||
public void onEntityCollidedWithBlock(World world, int p_149670_2_, int p_149670_3_, int p_149670_4_, Entity entity) {
|
||||
|
||||
if(entity instanceof EntityLivingBase) {
|
||||
ContaminationUtil.contaminate((EntityLivingBase)entity, HazardType.RADIATION, ContaminationType.GAS, 0.5F);
|
||||
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(HbmPotion.radiation.id, 15 * 20, 0));
|
||||
if(!(entity instanceof EntityLivingBase))
|
||||
return;
|
||||
|
||||
EntityLivingBase entityLiving = (EntityLivingBase) entity;
|
||||
|
||||
if(ArmorRegistry.hasAllProtection(entityLiving, 3, HazardClass.PARTICLE_FINE)) {
|
||||
ArmorUtil.damageGasMaskFilter(entityLiving, 1);
|
||||
} else {
|
||||
ContaminationUtil.contaminate((EntityLivingBase)entity, HazardType.RADIATION, ContaminationType.CREATIVE, 0.5F);
|
||||
entityLiving.addPotionEffect(new PotionEffect(HbmPotion.radiation.id, 15 * 20, 0));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -4,7 +4,9 @@ import java.util.Random;
|
||||
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.util.ArmorRegistry;
|
||||
import com.hbm.util.ArmorUtil;
|
||||
import com.hbm.util.ArmorRegistry.HazardClass;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@ -31,7 +33,7 @@ public class BlockAshes extends BlockFalling {
|
||||
if(ashes < 256 * 0.25) {
|
||||
ashes++;
|
||||
}
|
||||
} else if(ArmorUtil.checkForGoggles(MainRegistry.proxy.me())) {
|
||||
} else if(ArmorRegistry.hasAnyProtection(MainRegistry.proxy.me(), 3, HazardClass.SAND, HazardClass.LIGHT)) {
|
||||
if(ashes < 256 * 0.75) {
|
||||
ashes++;
|
||||
}
|
||||
|
||||
@ -5,8 +5,8 @@ import net.minecraft.block.material.Material;
|
||||
|
||||
public class BlockGeneric extends Block {
|
||||
|
||||
public BlockGeneric(Material p_i45394_1_) {
|
||||
super(p_i45394_1_);
|
||||
public BlockGeneric(Material material) {
|
||||
super(material);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -39,7 +39,7 @@ public class BlockPorous extends BlockStone {
|
||||
@Override
|
||||
public void updateTick(World world, int x, int y, int z, Random rand) {
|
||||
ChunkRadiationManager.proxy.decrementRad(world, x, y, z, 10F);
|
||||
world.scheduleBlockUpdate(x, y, z, this, this.tickRate(world));
|
||||
//world.scheduleBlockUpdate(x, y, z, this, this.tickRate(world));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
33
src/main/java/com/hbm/blocks/machine/MachineTowerLarge.java
Normal file
@ -0,0 +1,33 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.tileentity.machine.TileEntityTowerLarge;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class MachineTowerLarge extends BlockDummyable {
|
||||
|
||||
public MachineTowerLarge(Material mat) {
|
||||
super(mat);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World p_149915_1_, int meta) {
|
||||
|
||||
if(meta >= 12)
|
||||
return new TileEntityTowerLarge();
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getDimensions() {
|
||||
return new int[] {12, 0, 4, 4, 4, 4};
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getOffset() {
|
||||
return 4;
|
||||
}
|
||||
}
|
||||
@ -27,7 +27,8 @@ public class WorldConfig {
|
||||
public static int cinnebarSpawn = 1;
|
||||
public static int oilcoalSpawn = 128;
|
||||
public static int gassshaleSpawn = 5;
|
||||
public static int gasbubbleSpawn = 64;
|
||||
public static int gasbubbleSpawn = 4;
|
||||
public static int explosivebubbleSpawn = 8;
|
||||
public static int cobaltSpawn = 2;
|
||||
|
||||
public static int ironClusterSpawn = 4;
|
||||
@ -100,9 +101,10 @@ public class WorldConfig {
|
||||
rareSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.14_rareEarthSpawnRate", "Amount of rare earth ore veins per chunk", 6);
|
||||
oilcoalSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.15_oilCoalSpawnRate", "Spawns an oily coal vein every nTH chunk", 128);
|
||||
gassshaleSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.16_gasShaleSpawnRate", "Amount of oil shale veins per chunk", 5);
|
||||
gasbubbleSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.17_gasBubbleSpawnRate", "Spawns a gas bubble every nTH chunk", 64);
|
||||
gasbubbleSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.17_gasBubbleSpawnRate", "Spawns a gas bubble every nTH chunk", 4);
|
||||
cinnebarSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.18_cinnebarSpawnRate", "Amount of cinnebar ore veins per chunk", 1);
|
||||
cobaltSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.18_cobaltSpawnRate", "Amount of cobalt ore veins per chunk", 2);
|
||||
explosivebubbleSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.19_explosiveBubbleSpawnRate", "Spawns an explosive gas bubble every nTH chunk", 8);
|
||||
|
||||
ironClusterSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.C00_ironClusterSpawn", "Amount of iron cluster veins per chunk", 4);
|
||||
titaniumClusterSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.C01_titaniumClusterSpawn", "Amount of titanium cluster veins per chunk", 2);
|
||||
|
||||
@ -27,30 +27,35 @@ public class ArmorRecipes {
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.machine_armor_table, 1), new Object[] { "PPP", "TCT", "TST", 'P', "plateSteel", 'T', "ingotTungsten", 'C', Blocks.crafting_table, 'S', "blockSteel" }));
|
||||
|
||||
//Regular armor
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.steel_helmet, 1), new Object[] { "EEE", "E E", 'E', "ingotSteel" }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.steel_plate, 1), new Object[] { "E E", "EEE", "EEE", 'E', "ingotSteel" }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.steel_legs, 1), new Object[] { "EEE", "E E", "E E", 'E', "ingotSteel" }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.steel_boots, 1), new Object[] { "E E", "E E", 'E', "ingotSteel" }));
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.titanium_helmet, 1), new Object[] { "EEE", "E E", 'E', ModItems.ingot_titanium });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.titanium_plate, 1), new Object[] { "E E", "EEE", "EEE", 'E', ModItems.ingot_titanium });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.titanium_legs, 1), new Object[] { "EEE", "E E", "E E", 'E', ModItems.ingot_titanium });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.titanium_boots, 1), new Object[] { "E E", "E E", 'E', ModItems.ingot_titanium });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.alloy_helmet, 1), new Object[] { "EEE", "E E", 'E', ModItems.ingot_advanced_alloy });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.alloy_plate, 1), new Object[] { "E E", "EEE", "EEE", 'E', ModItems.ingot_advanced_alloy });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.alloy_legs, 1), new Object[] { "EEE", "E E", "E E", 'E', ModItems.ingot_advanced_alloy });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.alloy_boots, 1), new Object[] { "E E", "E E", 'E', ModItems.ingot_advanced_alloy });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.cmb_helmet, 1), new Object[] { "EEE", "E E", 'E', ModItems.ingot_combine_steel });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.cmb_plate, 1), new Object[] { "E E", "EEE", "EEE", 'E', ModItems.ingot_combine_steel });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.cmb_legs, 1), new Object[] { "EEE", "E E", "E E", 'E', ModItems.ingot_combine_steel });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.cmb_boots, 1), new Object[] { "E E", "E E", 'E', ModItems.ingot_combine_steel });
|
||||
addHelmet( "ingotSteel", ModItems.steel_helmet);
|
||||
addChest( "ingotSteel", ModItems.steel_plate);
|
||||
addLegs( "ingotSteel", ModItems.steel_legs);
|
||||
addBoots( "ingotSteel", ModItems.steel_boots);
|
||||
addHelmet( "ingotTitanium", ModItems.titanium_helmet);
|
||||
addChest( "ingotTitanium", ModItems.titanium_plate);
|
||||
addLegs( "ingotTitanium", ModItems.titanium_legs);
|
||||
addBoots( "ingotTitanium", ModItems.titanium_boots);
|
||||
addHelmet( ModItems.ingot_advanced_alloy, ModItems.alloy_helmet);
|
||||
addChest( ModItems.ingot_advanced_alloy, ModItems.alloy_plate);
|
||||
addLegs( ModItems.ingot_advanced_alloy, ModItems.alloy_legs);
|
||||
addBoots( ModItems.ingot_advanced_alloy, ModItems.alloy_boots);
|
||||
addHelmet( ModItems.ingot_combine_steel, ModItems.cmb_helmet);
|
||||
addChest( ModItems.ingot_combine_steel, ModItems.cmb_plate);
|
||||
addLegs( ModItems.ingot_combine_steel, ModItems.cmb_legs);
|
||||
addBoots( ModItems.ingot_combine_steel, ModItems.cmb_boots);
|
||||
addHelmet( "ingotCobalt", ModItems.cobalt_helmet);
|
||||
addChest( "ingotCobalt", ModItems.cobalt_plate);
|
||||
addLegs( "ingotCobalt", ModItems.cobalt_legs);
|
||||
addBoots( "ingotCobalt", ModItems.cobalt_boots);
|
||||
addHelmet( ModItems.rag, ModItems.robes_helmet);
|
||||
addChest( ModItems.rag, ModItems.robes_plate);
|
||||
addLegs( ModItems.rag, ModItems.robes_legs);
|
||||
addBoots( ModItems.plate_polymer, ModItems.robes_boots);
|
||||
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.security_helmet, 1), new Object[] { "SSS", "IGI", 'S', "plateSteel", 'I', ModItems.plate_polymer, 'G', "paneGlass" }));
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.security_plate, 1), new Object[] { "KWK", "IKI", "WKW", 'K', ModItems.plate_kevlar, 'I', ModItems.ingot_polymer, 'W', new ItemStack(Blocks.wool, 1, OreDictionary.WILDCARD_VALUE) });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.security_legs, 1), new Object[] { "IWI", "K K", "W W", 'K', ModItems.plate_kevlar, 'I', ModItems.ingot_polymer, 'W', new ItemStack(Blocks.wool, 1, OreDictionary.WILDCARD_VALUE) });
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.security_boots, 1), new Object[] { "P P", "I I", 'P', "plateSteel", 'I', ModItems.plate_polymer }));
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.cobalt_helmet, 1), new Object[] { "EEE", "E E", 'E', ModItems.ingot_cobalt });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.cobalt_plate, 1), new Object[] { "E E", "EEE", "EEE", 'E', ModItems.ingot_cobalt });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.cobalt_legs, 1), new Object[] { "EEE", "E E", "E E", 'E', ModItems.ingot_cobalt });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.cobalt_boots, 1), new Object[] { "E E", "E E", 'E', ModItems.ingot_cobalt });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.dnt_helmet, 1), new Object[] { "EEE", "EE ", 'E', ModItems.ingot_dineutronium });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.dnt_plate, 1), new Object[] { "EE ", "EEE", "EEE", 'E', ModItems.ingot_dineutronium });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.dnt_legs, 1), new Object[] { "EE ", "EEE", "E E", 'E', ModItems.ingot_dineutronium });
|
||||
@ -101,15 +106,15 @@ public class ArmorRecipes {
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.jetpack_boost, 1), new Object[] { "PCP", "DJD", "PAP", 'C', ModItems.circuit_targeting_tier4, 'P', ModItems.plate_saturnite, 'D', "ingotDesh", 'J', ModItems.jetpack_vector, 'A', ModItems.board_copper }));
|
||||
|
||||
//Hazmat
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.hazmat_helmet, 1), new Object[] { "EEE", "EIE", "FPF", 'E', ModItems.hazmat_cloth, 'I', "paneGlass", 'P', "plateSteel", 'F', ModItems.filter_coal }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.hazmat_helmet, 1), new Object[] { "EEE", "EIE", " P ", 'E', ModItems.hazmat_cloth, 'I', "paneGlass", 'P', "plateIron" }));
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.hazmat_plate, 1), new Object[] { "E E", "EEE", "EEE", 'E', ModItems.hazmat_cloth });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.hazmat_legs, 1), new Object[] { "EEE", "E E", "E E", 'E', ModItems.hazmat_cloth });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.hazmat_boots, 1), new Object[] { "E E", "E E", 'E', ModItems.hazmat_cloth });
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.hazmat_helmet_red, 1), new Object[] { "EEE", "IEI", "EFE", 'E', ModItems.hazmat_cloth_red, 'I', "paneGlass", 'P', "plateSteel", 'F', ModItems.gas_mask_filter }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.hazmat_helmet_red, 1), new Object[] { "EEE", "IEI", "EFE", 'E', ModItems.hazmat_cloth_red, 'I', "paneGlass", 'F', "plateIron" }));
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.hazmat_plate_red, 1), new Object[] { "E E", "EEE", "EEE", 'E', ModItems.hazmat_cloth_red });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.hazmat_legs_red, 1), new Object[] { "EEE", "E E", "E E", 'E', ModItems.hazmat_cloth_red });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.hazmat_boots_red, 1), new Object[] { "E E", "E E", 'E', ModItems.hazmat_cloth_red });
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.hazmat_helmet_grey, 1), new Object[] { "EEE", "IEI", "EFE", 'E', ModItems.hazmat_cloth_grey, 'I', "paneGlass", 'P', "plateSteel", 'F', ModItems.gas_mask_filter }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.hazmat_helmet_grey, 1), new Object[] { "EEE", "IEI", "EFE", 'E', ModItems.hazmat_cloth_grey, 'I', "paneGlass", 'F', "plateIron" }));
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.hazmat_plate_grey, 1), new Object[] { "E E", "EEE", "EEE", 'E', ModItems.hazmat_cloth_grey });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.hazmat_legs_grey, 1), new Object[] { "EEE", "E E", "E E", 'E', ModItems.hazmat_cloth_grey });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.hazmat_boots_grey, 1), new Object[] { "E E", "E E", 'E', ModItems.hazmat_cloth_grey });
|
||||
@ -117,7 +122,7 @@ public class ArmorRecipes {
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.asbestos_plate, 1), new Object[] { "E E", "EEE", "EEE", 'E', ModItems.asbestos_cloth });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.asbestos_legs, 1), new Object[] { "EEE", "E E", "E E", 'E', ModItems.asbestos_cloth });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.asbestos_boots, 1), new Object[] { "E E", "E E", 'E', ModItems.asbestos_cloth });
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.hazmat_paa_helmet, 1), new Object[] { "EEE", "IEI", "FPF", 'E', ModItems.plate_paa, 'I', "paneGlass", 'P', "plateSteel", 'F', ModItems.filter_coal }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.hazmat_paa_helmet, 1), new Object[] { "EEE", "IEI", " P ", 'E', ModItems.plate_paa, 'I', "paneGlass", 'P', "plateIron" }));
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.hazmat_paa_plate, 1), new Object[] { "E E", "EEE", "EEE", 'E', ModItems.plate_paa });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.hazmat_paa_legs, 1), new Object[] { "EEE", "E E", "E E", 'E', ModItems.plate_paa });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.hazmat_paa_boots, 1), new Object[] { "E E", "E E", 'E', ModItems.plate_paa });
|
||||
@ -126,18 +131,21 @@ public class ArmorRecipes {
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.paa_boots, 1), new Object[] { "E E", "N N", 'E', ModItems.plate_paa, 'N', OreDictManager.getReflector() }));
|
||||
|
||||
//Liquidator Suit
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.liquidator_helmet, 1), new Object[] { "III", "CBC", "IFI", 'I', ModItems.plate_polymer, 'C', ModItems.cladding_lead, 'B', ModItems.hazmat_helmet_grey, 'F', ModItems.gas_mask_filter_mono });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.liquidator_helmet, 1), new Object[] { "III", "CBC", "III", 'I', ModItems.plate_polymer, 'C', ModItems.cladding_lead, 'B', ModItems.hazmat_helmet_grey });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.liquidator_plate, 1), new Object[] { "ICI", "TBT", "ICI", 'I', ModItems.plate_polymer, 'C', ModItems.cladding_lead, 'B', ModItems.hazmat_plate_grey, 'T', ModItems.gas_empty });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.liquidator_legs, 1), new Object[] { "III", "CBC", "I I", 'I', ModItems.plate_polymer, 'C', ModItems.cladding_lead, 'B', ModItems.hazmat_legs_grey });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.liquidator_boots, 1), new Object[] { "ICI", "IBI", 'I', ModItems.plate_polymer, 'C', ModItems.cladding_lead, 'B', ModItems.hazmat_boots_grey });
|
||||
|
||||
//Masks
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.goggles, 1), new Object[] { "P P", "GPG", 'G', "paneGlass", 'P', "plateSteel" }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gas_mask, 1), new Object[] { "PPP", "GPG", " F ", 'G', "paneGlass", 'P', "plateSteel", 'F', ModItems.gas_mask_filter }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gas_mask_m65, 1), new Object[] { "PPP", "GPG", " F ", 'G', "paneGlass", 'P', ModItems.plate_polymer, 'F', ModItems.gas_mask_filter }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gas_mask_mono, 1), new Object[] { " P ", "PPP", " F ", 'P', ModItems.plate_polymer, 'F', ModItems.gas_mask_filter_mono }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gas_mask, 1), new Object[] { "PPP", "GPG", " F ", 'G', "paneGlass", 'P', "plateSteel", 'F', "plateIron" }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gas_mask_m65, 1), new Object[] { "PPP", "GPG", " F ", 'G', "paneGlass", 'P', ModItems.plate_polymer, 'F', "plateIron" }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gas_mask_olde, 1), new Object[] { "PPP", "GPG", " F ", 'G', "paneGlass", 'P', Items.leather, 'F', "ingotIron" }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gas_mask_mono, 1), new Object[] { " P ", "PPP", " F ", 'P', ModItems.plate_polymer, 'F', "plateIron" }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.mask_of_infamy, 1), new Object[] { "III", "III", " I ", 'I', "plateIron" }));
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.ashglasses, 1), new Object[] { "I I", "GPG", 'I', ModItems.plate_polymer, 'G', ModBlocks.glass_ash, 'P', ModItems.ingot_polymer });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.mask_rag, 1), new Object[] { "RRR", 'R', ModItems.rag_damp });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.mask_piss, 1), new Object[] { "RRR", 'R', ModItems.rag_piss });
|
||||
|
||||
//Capes
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.cape_radiation, 1), new Object[] { "W W", "WIW", "WDW", 'W', new ItemStack(Item.getItemFromBlock(Blocks.wool), 1, 11), 'D', new ItemStack(Items.dye, 1, 11), 'I', ModItems.nuclear_waste });
|
||||
@ -146,14 +154,14 @@ public class ArmorRecipes {
|
||||
|
||||
//Configged
|
||||
if(GeneralConfig.enableBabyMode) {
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.starmetal_helmet, 1), new Object[] { "EEE", "E E", 'E', ModItems.ingot_starmetal });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.starmetal_plate, 1), new Object[] { "E E", "EEE", "EEE", 'E', ModItems.ingot_starmetal });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.starmetal_legs, 1), new Object[] { "EEE", "E E", "E E", 'E', ModItems.ingot_starmetal });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.starmetal_boots, 1), new Object[] { "E E", "E E", 'E', ModItems.ingot_starmetal });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.schrabidium_helmet, 1), new Object[] { "EEE", "E E", 'E', ModItems.ingot_schrabidium });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.schrabidium_plate, 1), new Object[] { "E E", "EEE", "EEE", 'E', ModItems.ingot_schrabidium });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.schrabidium_legs, 1), new Object[] { "EEE", "E E", "E E", 'E', ModItems.ingot_schrabidium });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.schrabidium_boots, 1), new Object[] { "E E", "E E", 'E', ModItems.ingot_schrabidium });
|
||||
addHelmet( ModItems.ingot_starmetal, ModItems.starmetal_helmet);
|
||||
addChest( ModItems.ingot_starmetal, ModItems.starmetal_plate);
|
||||
addLegs( ModItems.ingot_starmetal, ModItems.starmetal_legs);
|
||||
addBoots( ModItems.ingot_starmetal, ModItems.starmetal_boots);
|
||||
addHelmet( ModItems.ingot_schrabidium, ModItems.schrabidium_helmet);
|
||||
addChest( ModItems.ingot_schrabidium, ModItems.schrabidium_plate);
|
||||
addLegs( ModItems.ingot_schrabidium, ModItems.schrabidium_legs);
|
||||
addBoots( ModItems.ingot_schrabidium, ModItems.schrabidium_boots);
|
||||
} else {
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.starmetal_helmet, 1), new Object[] { "EEE", "ECE", 'E', ModItems.ingot_starmetal, 'C', ModItems.cobalt_helmet });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.starmetal_plate, 1), new Object[] { "ECE", "EEE", "EEE", 'E', ModItems.ingot_starmetal, 'C', ModItems.cobalt_plate });
|
||||
@ -165,4 +173,34 @@ public class ArmorRecipes {
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.schrabidium_boots, 1), new Object[] { "EPE", "ESE", 'E', ModItems.ingot_schrabidium, 'S', ModItems.starmetal_boots, 'P', ModItems.pellet_charged });
|
||||
}
|
||||
}
|
||||
|
||||
public static void addHelmet(Object ingot, Item pick) {
|
||||
addArmor(ingot, pick, patternHelmet);
|
||||
}
|
||||
public static void addChest(Object ingot, Item axe) {
|
||||
addArmor(ingot, axe, patternChetplate);
|
||||
}
|
||||
public static void addLegs(Object ingot, Item shovel) {
|
||||
addArmor(ingot, shovel, patternLeggings);
|
||||
}
|
||||
public static void addBoots(Object ingot, Item hoe) {
|
||||
addArmor(ingot, hoe, patternBoots);
|
||||
}
|
||||
|
||||
public static void addArmor(Object ingot, Item armor, String[] pattern) {
|
||||
if(ingot instanceof Item) addToolRec(ingot, armor, pattern);
|
||||
if(ingot instanceof ItemStack) addToolRec(ingot, armor, pattern);
|
||||
if(ingot instanceof String) addToolDict(ingot, armor, pattern);
|
||||
}
|
||||
public static void addToolRec(Object ingot, Item tool, String[] pattern) {
|
||||
GameRegistry.addRecipe(new ItemStack(tool), new Object[] { pattern, 'X', ingot });
|
||||
}
|
||||
public static void addToolDict(Object ingot, Item tool, String[] pattern) {
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(tool), new Object[] { pattern, 'X', ingot }));
|
||||
}
|
||||
|
||||
public static final String[] patternHelmet = new String[] {"XXX", "X X"};
|
||||
public static final String[] patternChetplate = new String[] {"X X", "XXX", "XXX"};
|
||||
public static final String[] patternLeggings = new String[] {"XXX", "X X", "X X"};
|
||||
public static final String[] patternBoots = new String[] {"X X", "X X"};
|
||||
}
|
||||
|
||||
@ -155,8 +155,8 @@ public class ConsumableRecipes {
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.servo_set_desh, 1), new Object[] { "MBM", "PSP", "MBM", 'M', ModItems.motor_desh, 'B', ModItems.bolt_dura_steel, 'P', "plateAdvanced", 'S', ModItems.servo_set }));
|
||||
|
||||
//Helmet Mods
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.attachment_mask, 1), new Object[] { "DID", "IGI", " F ", 'D', ModItems.ducttape, 'I', ModItems.plate_polymer, 'G', "paneGlass", 'F', ModItems.gas_mask_filter }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.attachment_mask_mono, 1), new Object[] { "DID", "IGI", " F ", 'D', ModItems.ducttape, 'I', ModItems.plate_polymer, 'G', "paneGlass", 'F', ModItems.gas_mask_filter_mono }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.attachment_mask, 1), new Object[] { "DID", "IGI", " F ", 'D', ModItems.ducttape, 'I', ModItems.plate_polymer, 'G', "paneGlass", 'F', "plateIron" }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.attachment_mask_mono, 1), new Object[] { " D ", "DID", " F ", 'D', ModItems.ducttape, 'I', ModItems.plate_polymer, 'F', "plateIron" }));
|
||||
|
||||
//Boot Mods
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.pads_rubber, 1), new Object[] { "P P", "IDI", "P P", 'P', ModItems.plate_polymer, 'I', "plateIron", 'D', ModItems.ducttape }));
|
||||
@ -180,5 +180,12 @@ public class ConsumableRecipes {
|
||||
|
||||
//Stealth boy
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.stealth_boy, 1), new Object[] { " B", "LI", "LC", 'B', Item.getItemFromBlock(Blocks.stone_button), 'L', Items.leather, 'I', "ingotSteel", 'C', ModItems.circuit_red_copper }));
|
||||
|
||||
//RD40 Filters
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gas_mask_filter, 1), new Object[] { "I", "F", 'F', ModItems.filter_coal, 'I', "plateIron" }));
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.gas_mask_filter_mono, 1), new Object[] { "ZZZ", "ZCZ", "ZZZ", 'Z', ModItems.nugget_zirconium, 'C', ModItems.catalyst_clay });
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gas_mask_filter_combo, 1), new Object[] { "ZCZ", "CFC", "ZCZ", 'Z', "ingotZirconium", 'C', ModItems.catalyst_clay, 'F', ModItems.gas_mask_filter }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gas_mask_filter_rag, 1), new Object[] { "I", "F", 'F', ModItems.rag_damp, 'I', "ingotIron" }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gas_mask_filter_piss, 1), new Object[] { "I", "F", 'F', ModItems.rag_piss, 'I', "ingotIron" }));
|
||||
}
|
||||
}
|
||||
|
||||
@ -21,7 +21,9 @@ import com.hbm.entity.projectile.EntityRubble;
|
||||
import com.hbm.entity.projectile.EntitySchrab;
|
||||
import com.hbm.lib.ModDamageSource;
|
||||
import com.hbm.potion.HbmPotion;
|
||||
import com.hbm.util.ArmorRegistry;
|
||||
import com.hbm.util.ArmorUtil;
|
||||
import com.hbm.util.ArmorRegistry.HazardClass;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.Entity;
|
||||
@ -403,55 +405,8 @@ public class ExplosionChaos {
|
||||
|
||||
public static void pDestruction(World world, int x, int y, int z) {
|
||||
|
||||
EntityFallingBlock entityfallingblock = new EntityFallingBlock(world, (double)((float)x + 0.5F), (double)((float)y + 0.5F), (double)((float)z + 0.5F), world.getBlock(x, y, z), world.getBlockMetadata(x, y, z));
|
||||
world.spawnEntityInWorld(entityfallingblock);
|
||||
|
||||
/*
|
||||
if (Blocks.air.getBlockHardness(world, x, y, z) != Float.POSITIVE_INFINITY) {
|
||||
Block b = world.getBlock(x, y, z);
|
||||
TileEntity t = world.getTileEntity(x, y, z);
|
||||
|
||||
if (b == Blocks.sandstone || b == Blocks.sandstone_stairs)
|
||||
world.setBlock(x, y, z, Blocks.sand);
|
||||
else if (t != null && t instanceof ISource)
|
||||
world.setBlock(x, y, z, ModBlocks.block_electrical_scrap);
|
||||
else if (t != null && t instanceof IConductor)
|
||||
world.setBlock(x, y, z, ModBlocks.block_electrical_scrap);
|
||||
else if (t != null && t instanceof IConsumer)
|
||||
world.setBlock(x, y, z, ModBlocks.block_electrical_scrap);
|
||||
else if (b == Blocks.sand)
|
||||
world.setBlock(x, y, z, Blocks.sand);
|
||||
else if (b == Blocks.gravel)
|
||||
world.setBlock(x, y, z, Blocks.gravel);
|
||||
else if (b == ModBlocks.gravel_obsidian)
|
||||
world.setBlock(x, y, z, ModBlocks.gravel_obsidian);
|
||||
else if (b == ModBlocks.block_electrical_scrap)
|
||||
world.setBlock(x, y, z, ModBlocks.block_electrical_scrap);
|
||||
else if (b == ModBlocks.block_scrap)
|
||||
world.setBlock(x, y, z, ModBlocks.block_scrap);
|
||||
else if (b == ModBlocks.brick_obsidian)
|
||||
world.setBlock(x, y, z, ModBlocks.gravel_obsidian);
|
||||
else if (b.getMaterial() == Material.anvil)
|
||||
world.setBlock(x, y, z, Blocks.gravel);
|
||||
else if (b.getMaterial() == Material.clay)
|
||||
world.setBlock(x, y, z, Blocks.sand);
|
||||
else if (b.getMaterial() == Material.grass)
|
||||
world.setBlock(x, y, z, Blocks.sand);
|
||||
else if (b.getMaterial() == Material.ground)
|
||||
world.setBlock(x, y, z, Blocks.sand);
|
||||
else if (b.getMaterial() == Material.iron)
|
||||
world.setBlock(x, y, z, Blocks.gravel);
|
||||
else if (b.getMaterial() == Material.piston)
|
||||
world.setBlock(x, y, z, Blocks.gravel);
|
||||
else if (b.getMaterial() == Material.rock)
|
||||
world.setBlock(x, y, z, Blocks.gravel);
|
||||
else if (b.getMaterial() == Material.sand)
|
||||
world.setBlock(x, y, z, Blocks.sand);
|
||||
else if (b.getMaterial() == Material.tnt)
|
||||
world.setBlock(x, y, z, ModBlocks.block_scrap);
|
||||
else
|
||||
world.setBlock(x, y, z, Blocks.air);
|
||||
}*/
|
||||
EntityFallingBlock entityfallingblock = new EntityFallingBlock(world, (double) ((float) x + 0.5F), (double) ((float) y + 0.5F), (double) ((float) z + 0.5F), world.getBlock(x, y, z), world.getBlockMetadata(x, y, z));
|
||||
world.spawnEntityInWorld(entityfallingblock);
|
||||
}
|
||||
|
||||
public static void cluster(World world, int x, int y, int z, int count, int gravity) {
|
||||
@ -573,190 +528,68 @@ public class ExplosionChaos {
|
||||
}
|
||||
}
|
||||
|
||||
public static void anvil(World world, int x, int y, int z, int count) {
|
||||
|
||||
double d1 = 0;
|
||||
double d2 = 0;
|
||||
double d3 = 0;
|
||||
EntityFallingBlock fragment;
|
||||
|
||||
for (int i = 0; i < count; i++) {
|
||||
d1 = rand.nextDouble();
|
||||
d2 = rand.nextDouble();
|
||||
d3 = rand.nextDouble();
|
||||
;
|
||||
|
||||
if (rand.nextInt(2) == 0) {
|
||||
d1 *= -1;
|
||||
public static void poison(World world, double x, double y, double z, double range) {
|
||||
|
||||
List<EntityLivingBase> affected = world.getEntitiesWithinAABB(EntityLivingBase.class, AxisAlignedBB.getBoundingBox(x - range, y - range, z - range, x + range, y + range, z + range));
|
||||
|
||||
for(EntityLivingBase entity : affected) {
|
||||
|
||||
if(entity.getDistance(x, y, z) > range)
|
||||
continue;
|
||||
|
||||
if(ArmorRegistry.hasAnyProtection(entity, 3, HazardClass.GAS_CHLORINE, HazardClass.GAS_CORROSIVE)) {
|
||||
ArmorUtil.damageGasMaskFilter(entity, 1);
|
||||
} else {
|
||||
entity.addPotionEffect(new PotionEffect(Potion.blindness.getId(), 5 * 20, 0));
|
||||
entity.addPotionEffect(new PotionEffect(Potion.poison.getId(), 20 * 20, 2));
|
||||
entity.addPotionEffect(new PotionEffect(Potion.wither.getId(), 1 * 20, 1));
|
||||
entity.addPotionEffect(new PotionEffect(Potion.moveSlowdown.getId(), 30 * 20, 1));
|
||||
entity.addPotionEffect(new PotionEffect(Potion.digSlowdown.getId(), 30 * 20, 2));
|
||||
}
|
||||
|
||||
if (rand.nextInt(2) == 0) {
|
||||
d3 *= -1;
|
||||
}
|
||||
|
||||
world.setBlock(x, y, z, Blocks.anvil);
|
||||
fragment = new EntityFallingBlock(world, x + 0.5, y + 0.5, z + 0.5, Blocks.anvil);
|
||||
world.setBlock(x, y, z, Blocks.air);
|
||||
|
||||
fragment.motionX = d1;
|
||||
fragment.motionY = d2;
|
||||
fragment.motionZ = d3;
|
||||
|
||||
world.spawnEntityInWorld(fragment);
|
||||
}
|
||||
}
|
||||
|
||||
public static void poison(World world, int x, int y, int z, int bombStartStrength) {
|
||||
float f = bombStartStrength;
|
||||
int i;
|
||||
int j;
|
||||
int k;
|
||||
double d5;
|
||||
double d6;
|
||||
double d7;
|
||||
double wat = bombStartStrength * 2;
|
||||
|
||||
bombStartStrength *= 2.0F;
|
||||
i = MathHelper.floor_double(x - wat - 1.0D);
|
||||
j = MathHelper.floor_double(x + wat + 1.0D);
|
||||
k = MathHelper.floor_double(y - wat - 1.0D);
|
||||
int i2 = MathHelper.floor_double(y + wat + 1.0D);
|
||||
int l = MathHelper.floor_double(z - wat - 1.0D);
|
||||
int j2 = MathHelper.floor_double(z + wat + 1.0D);
|
||||
List list = world.getEntitiesWithinAABBExcludingEntity(null, AxisAlignedBB.getBoundingBox(i, k, l, j, i2, j2));
|
||||
|
||||
for (int i1 = 0; i1 < list.size(); ++i1) {
|
||||
Entity entity = (Entity) list.get(i1);
|
||||
double d4 = entity.getDistance(x, y, z) / bombStartStrength;
|
||||
|
||||
if (d4 <= 1.0D) {
|
||||
d5 = entity.posX - x;
|
||||
d6 = entity.posY + entity.getEyeHeight() - y;
|
||||
d7 = entity.posZ - z;
|
||||
double d9 = MathHelper.sqrt_double(d5 * d5 + d6 * d6 + d7 * d7);
|
||||
if (d9 < wat) {
|
||||
if (entity instanceof EntityPlayer && ArmorUtil.checkForGasMask((EntityPlayer) entity)) {
|
||||
ArmorUtil.damageSuit((EntityPlayer)entity, 3, rand.nextInt(2));
|
||||
|
||||
} else if (entity instanceof EntityLivingBase) {
|
||||
((EntityLivingBase) entity)
|
||||
.addPotionEffect(new PotionEffect(Potion.blindness.getId(), 5 * 20, 0));
|
||||
((EntityLivingBase) entity)
|
||||
.addPotionEffect(new PotionEffect(Potion.poison.getId(), 20 * 20, 2));
|
||||
((EntityLivingBase) entity)
|
||||
.addPotionEffect(new PotionEffect(Potion.wither.getId(), 1 * 20, 1));
|
||||
((EntityLivingBase) entity)
|
||||
.addPotionEffect(new PotionEffect(Potion.moveSlowdown.getId(), 30 * 20, 1));
|
||||
((EntityLivingBase) entity)
|
||||
.addPotionEffect(new PotionEffect(Potion.digSlowdown.getId(), 30 * 20, 2));
|
||||
}
|
||||
}
|
||||
}
|
||||
public static void pc(World world, double x, double y, double z, double range) {
|
||||
|
||||
List<EntityLivingBase> affected = world.getEntitiesWithinAABB(EntityLivingBase.class, AxisAlignedBB.getBoundingBox(x - range, y - range, z - range, x + range, y + range, z + range));
|
||||
|
||||
for(EntityLivingBase entity : affected) {
|
||||
|
||||
if(entity.getDistance(x, y, z) > range)
|
||||
continue;
|
||||
|
||||
ArmorUtil.damageSuit(entity, 0, 25);
|
||||
ArmorUtil.damageSuit(entity, 1, 25);
|
||||
ArmorUtil.damageSuit(entity, 2, 25);
|
||||
ArmorUtil.damageSuit(entity, 3, 25);
|
||||
entity.attackEntityFrom(ModDamageSource.pc, 5);
|
||||
}
|
||||
|
||||
bombStartStrength = (int) f;
|
||||
}
|
||||
|
||||
public static void pc(World world, int x, int y, int z, int bombStartStrength) {
|
||||
float f = bombStartStrength;
|
||||
int i;
|
||||
int j;
|
||||
int k;
|
||||
double d5;
|
||||
double d6;
|
||||
double d7;
|
||||
double wat = bombStartStrength * 2;
|
||||
|
||||
bombStartStrength *= 2.0F;
|
||||
i = MathHelper.floor_double(x - wat - 1.0D);
|
||||
j = MathHelper.floor_double(x + wat + 1.0D);
|
||||
k = MathHelper.floor_double(y - wat - 1.0D);
|
||||
int i2 = MathHelper.floor_double(y + wat + 1.0D);
|
||||
int l = MathHelper.floor_double(z - wat - 1.0D);
|
||||
int j2 = MathHelper.floor_double(z + wat + 1.0D);
|
||||
List list = world.getEntitiesWithinAABBExcludingEntity(null, AxisAlignedBB.getBoundingBox(i, k, l, j, i2, j2));
|
||||
|
||||
for (int i1 = 0; i1 < list.size(); ++i1) {
|
||||
Entity entity = (Entity) list.get(i1);
|
||||
double d4 = entity.getDistance(x, y, z) / bombStartStrength;
|
||||
|
||||
if (d4 <= 1.0D) {
|
||||
d5 = entity.posX - x;
|
||||
d6 = entity.posY + entity.getEyeHeight() - y;
|
||||
d7 = entity.posZ - z;
|
||||
double d9 = MathHelper.sqrt_double(d5 * d5 + d6 * d6 + d7 * d7);
|
||||
if (d9 < wat) {
|
||||
|
||||
if (entity instanceof EntityPlayer) {
|
||||
|
||||
ArmorUtil.damageSuit((EntityPlayer)entity, 0, 25);
|
||||
ArmorUtil.damageSuit((EntityPlayer)entity, 1, 25);
|
||||
ArmorUtil.damageSuit((EntityPlayer)entity, 2, 25);
|
||||
ArmorUtil.damageSuit((EntityPlayer)entity, 3, 25);
|
||||
|
||||
}
|
||||
|
||||
entity.attackEntityFrom(ModDamageSource.pc, 5);
|
||||
}
|
||||
public static void c(World world, double x, double y, double z, double range) {
|
||||
|
||||
List<EntityLivingBase> affected = world.getEntitiesWithinAABB(EntityLivingBase.class, AxisAlignedBB.getBoundingBox(x - range, y - range, z - range, x + range, y + range, z + range));
|
||||
|
||||
for(EntityLivingBase entity : affected) {
|
||||
|
||||
if(entity.getDistance(x, y, z) > range)
|
||||
continue;
|
||||
|
||||
ArmorUtil.damageSuit(entity, 0, 25);
|
||||
ArmorUtil.damageSuit(entity, 1, 25);
|
||||
ArmorUtil.damageSuit(entity, 2, 25);
|
||||
ArmorUtil.damageSuit(entity, 3, 25);
|
||||
|
||||
if(ArmorUtil.checkForHazmat(entity))
|
||||
continue;
|
||||
|
||||
if(entity.isPotionActive(HbmPotion.taint.id)) {
|
||||
entity.removePotionEffect(HbmPotion.taint.id);
|
||||
entity.addPotionEffect(new PotionEffect(HbmPotion.mutation.id, 1 * 60 * 60 * 20, 0, false));
|
||||
}
|
||||
|
||||
entity.attackEntityFrom(ModDamageSource.cloud, 5);
|
||||
}
|
||||
|
||||
bombStartStrength = (int) f;
|
||||
}
|
||||
|
||||
public static void c(World world, int x, int y, int z, int bombStartStrength) {
|
||||
float f = bombStartStrength;
|
||||
int i;
|
||||
int j;
|
||||
int k;
|
||||
double d5;
|
||||
double d6;
|
||||
double d7;
|
||||
double wat = bombStartStrength * 2;
|
||||
|
||||
bombStartStrength *= 2.0F;
|
||||
i = MathHelper.floor_double(x - wat - 1.0D);
|
||||
j = MathHelper.floor_double(x + wat + 1.0D);
|
||||
k = MathHelper.floor_double(y - wat - 1.0D);
|
||||
int i2 = MathHelper.floor_double(y + wat + 1.0D);
|
||||
int l = MathHelper.floor_double(z - wat - 1.0D);
|
||||
int j2 = MathHelper.floor_double(z + wat + 1.0D);
|
||||
List list = world.getEntitiesWithinAABBExcludingEntity(null, AxisAlignedBB.getBoundingBox(i, k, l, j, i2, j2));
|
||||
|
||||
for (int i1 = 0; i1 < list.size(); ++i1) {
|
||||
Entity entity = (Entity) list.get(i1);
|
||||
double d4 = entity.getDistance(x, y, z) / bombStartStrength;
|
||||
|
||||
if (d4 <= 1.0D) {
|
||||
d5 = entity.posX - x;
|
||||
d6 = entity.posY + entity.getEyeHeight() - y;
|
||||
d7 = entity.posZ - z;
|
||||
double d9 = MathHelper.sqrt_double(d5 * d5 + d6 * d6 + d7 * d7);
|
||||
if (d9 < wat) {
|
||||
|
||||
if (entity instanceof EntityPlayer) {
|
||||
|
||||
ArmorUtil.damageSuit((EntityPlayer)entity, 0, 5);
|
||||
ArmorUtil.damageSuit((EntityPlayer)entity, 1, 5);
|
||||
ArmorUtil.damageSuit((EntityPlayer)entity, 2, 5);
|
||||
ArmorUtil.damageSuit((EntityPlayer)entity, 3, 5);
|
||||
|
||||
}
|
||||
|
||||
if (entity instanceof EntityPlayer && ArmorUtil.checkForHazmat((EntityPlayer) entity)) { } else {
|
||||
|
||||
if(entity instanceof EntityLivingBase && ((EntityLivingBase)entity).isPotionActive(HbmPotion.taint.id)) {
|
||||
((EntityLivingBase)entity).removePotionEffect(HbmPotion.taint.id);
|
||||
((EntityLivingBase)entity).addPotionEffect(new PotionEffect(HbmPotion.mutation.id, 1 * 60 * 60 * 20, 0, false));
|
||||
} else {
|
||||
entity.attackEntityFrom(ModDamageSource.cloud, 3);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bombStartStrength = (int) f;
|
||||
}
|
||||
|
||||
public static void floater(World world, int x, int y, int z, int radi, int height) {
|
||||
@ -927,98 +760,6 @@ public class ExplosionChaos {
|
||||
radius = (int) f;
|
||||
}
|
||||
|
||||
public static void mirv(World world, double x, double y, double z) {
|
||||
double modifier = 2.5;
|
||||
double zeta = Math.sqrt(2) / 2;
|
||||
EntityMIRV mirv1 = new EntityMIRV(world);
|
||||
EntityMIRV mirv2 = new EntityMIRV(world);
|
||||
EntityMIRV mirv3 = new EntityMIRV(world);
|
||||
EntityMIRV mirv4 = new EntityMIRV(world);
|
||||
// double vx1 = rand.nextDouble();
|
||||
// double vy1 = rand.nextDouble() * -1;
|
||||
// double vz1 = Math.sqrt(Math.pow(1, 2) - Math.pow(vx1, 2));
|
||||
double vx1 = 1;
|
||||
double vy1 = rand.nextDouble() * -1;
|
||||
double vz1 = 0;
|
||||
|
||||
mirv1.posX = x;
|
||||
mirv1.posY = y;
|
||||
mirv1.posZ = z;
|
||||
mirv1.motionY = vy1;
|
||||
mirv2.posX = x;
|
||||
mirv2.posY = y;
|
||||
mirv2.posZ = z;
|
||||
mirv2.motionY = vy1;
|
||||
mirv3.posX = x;
|
||||
mirv3.posY = y;
|
||||
mirv3.posZ = z;
|
||||
mirv3.motionY = vy1;
|
||||
mirv4.posX = x;
|
||||
mirv4.posY = y;
|
||||
mirv4.posZ = z;
|
||||
mirv4.motionY = vy1;
|
||||
|
||||
mirv1.motionX = vx1 * modifier;
|
||||
mirv1.motionZ = vz1 * modifier;
|
||||
world.spawnEntityInWorld(mirv1);
|
||||
|
||||
mirv2.motionX = -vz1 * modifier;
|
||||
mirv2.motionZ = vx1 * modifier;
|
||||
world.spawnEntityInWorld(mirv2);
|
||||
|
||||
mirv3.motionX = -vx1 * modifier;
|
||||
mirv3.motionZ = -vz1 * modifier;
|
||||
world.spawnEntityInWorld(mirv3);
|
||||
|
||||
mirv4.motionX = vz1 * modifier;
|
||||
mirv4.motionZ = -vx1 * modifier;
|
||||
world.spawnEntityInWorld(mirv4);
|
||||
|
||||
EntityMIRV mirv5 = new EntityMIRV(world);
|
||||
EntityMIRV mirv6 = new EntityMIRV(world);
|
||||
EntityMIRV mirv7 = new EntityMIRV(world);
|
||||
EntityMIRV mirv8 = new EntityMIRV(world);
|
||||
// double vx2 = vx1 < theta ? vx1 + theta : vx1 - theta;
|
||||
// double vy2 = vy1;
|
||||
// double vz2 = Math.sqrt(Math.pow(1, 2) - Math.pow(vx2, 2));
|
||||
double vx2 = zeta;
|
||||
double vy2 = vy1;
|
||||
double vz2 = zeta;
|
||||
|
||||
mirv5.posX = x;
|
||||
mirv5.posY = y;
|
||||
mirv5.posZ = z;
|
||||
mirv5.motionY = vy2;
|
||||
mirv6.posX = x;
|
||||
mirv6.posY = y;
|
||||
mirv6.posZ = z;
|
||||
mirv6.motionY = vy2;
|
||||
mirv7.posX = x;
|
||||
mirv7.posY = y;
|
||||
mirv7.posZ = z;
|
||||
mirv7.motionY = vy2;
|
||||
mirv8.posX = x;
|
||||
mirv8.posY = y;
|
||||
mirv8.posZ = z;
|
||||
mirv8.motionY = vy2;
|
||||
|
||||
mirv5.motionX = vx2 * modifier;
|
||||
mirv5.motionZ = vz2 * modifier;
|
||||
world.spawnEntityInWorld(mirv5);
|
||||
|
||||
mirv6.motionX = -vz2 * modifier;
|
||||
mirv6.motionZ = vx2 * modifier;
|
||||
world.spawnEntityInWorld(mirv6);
|
||||
|
||||
mirv7.motionX = -vx2 * modifier;
|
||||
mirv7.motionZ = -vz2 * modifier;
|
||||
world.spawnEntityInWorld(mirv7);
|
||||
|
||||
mirv8.motionX = vz2 * modifier;
|
||||
mirv8.motionZ = -vx2 * modifier;
|
||||
world.spawnEntityInWorld(mirv8);
|
||||
}
|
||||
|
||||
public static void plasma(World world, int x, int y, int z, int radius) {
|
||||
int r = radius;
|
||||
int r2 = r * r;
|
||||
|
||||
@ -324,6 +324,19 @@ public class EntityEffectHandler {
|
||||
|
||||
if(entity.worldObj.isRemote)
|
||||
return;
|
||||
|
||||
if(entity instanceof EntityPlayer && ((EntityPlayer) entity).capabilities.isCreativeMode) {
|
||||
HbmLivingProps.setBlackLung(entity, 0);
|
||||
HbmLivingProps.setAsbestos(entity, 0);
|
||||
|
||||
return;
|
||||
} else {
|
||||
|
||||
int bl = HbmLivingProps.getBlackLung(entity);
|
||||
|
||||
if(bl > 0 && bl < HbmLivingProps.maxBlacklung * 0.25)
|
||||
HbmLivingProps.setBlackLung(entity, HbmLivingProps.getBlackLung(entity) - 1);
|
||||
}
|
||||
|
||||
double blacklung = Math.min(HbmLivingProps.getBlackLung(entity), HbmLivingProps.maxBlacklung);
|
||||
double asbestos = Math.min(HbmLivingProps.getAsbestos(entity), HbmLivingProps.maxAsbestos);
|
||||
|
||||
@ -15,7 +15,8 @@ import com.hbm.lib.Library;
|
||||
import com.hbm.packet.AuxParticlePacketNT;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.potion.HbmPotion;
|
||||
import com.hbm.util.ArmorUtil;
|
||||
import com.hbm.util.ArmorRegistry;
|
||||
import com.hbm.util.ArmorRegistry.HazardClass;
|
||||
import com.hbm.util.BobMathUtil;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
@ -355,7 +356,9 @@ public class BulletConfigFactory {
|
||||
|
||||
if(e instanceof EntityLivingBase) {
|
||||
|
||||
if(e instanceof EntityPlayer && ArmorUtil.checkForGasMask((EntityPlayer) e))
|
||||
EntityLivingBase entity = (EntityLivingBase) e;
|
||||
|
||||
if(ArmorRegistry.hasAllProtection(entity, 3, HazardClass.GAS_CHLORINE))
|
||||
continue;
|
||||
|
||||
PotionEffect eff0 = new PotionEffect(Potion.poison.id, duration, 2, true);
|
||||
@ -366,10 +369,10 @@ public class BulletConfigFactory {
|
||||
eff1.getCurativeItems().clear();
|
||||
eff2.getCurativeItems().clear();
|
||||
eff3.getCurativeItems().clear();
|
||||
((EntityLivingBase)e).addPotionEffect(eff0);
|
||||
((EntityLivingBase)e).addPotionEffect(eff1);
|
||||
((EntityLivingBase)e).addPotionEffect(eff2);
|
||||
((EntityLivingBase)e).addPotionEffect(eff3);
|
||||
entity.addPotionEffect(eff0);
|
||||
entity.addPotionEffect(eff1);
|
||||
entity.addPotionEffect(eff2);
|
||||
entity.addPotionEffect(eff3);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -824,6 +824,9 @@ public class ModItems {
|
||||
public static Item stealth_boy;
|
||||
public static Item gas_mask_filter;
|
||||
public static Item gas_mask_filter_mono;
|
||||
public static Item gas_mask_filter_combo;
|
||||
public static Item gas_mask_filter_rag;
|
||||
public static Item gas_mask_filter_piss;
|
||||
public static Item jetpack_tank;
|
||||
public static Item gun_kit_1;
|
||||
public static Item gun_kit_2;
|
||||
@ -1870,6 +1873,9 @@ public class ModItems {
|
||||
public static Item gas_mask;
|
||||
public static Item gas_mask_m65;
|
||||
public static Item gas_mask_mono;
|
||||
public static Item gas_mask_olde;
|
||||
public static Item mask_rag;
|
||||
public static Item mask_piss;
|
||||
public static Item oxy_mask;
|
||||
public static Item hat;
|
||||
public static Item beta;
|
||||
@ -2622,7 +2628,7 @@ public class ModItems {
|
||||
coke = new Item().setUnlocalizedName("coke").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":coke");
|
||||
lignite = new Item().setUnlocalizedName("lignite").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":lignite");
|
||||
briquette_lignite = new Item().setUnlocalizedName("briquette_lignite").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":briquette_lignite");
|
||||
powder_lignite = new ItemHazard().addCoal(10).toItem().setUnlocalizedName("powder_lignite").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":powder_lignite");
|
||||
powder_lignite = new ItemHazard().addCoal(3).toItem().setUnlocalizedName("powder_lignite").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":powder_lignite");
|
||||
coal_infernal = new Item().setUnlocalizedName("coal_infernal").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":coal_infernal");
|
||||
cinnebar = new Item().setUnlocalizedName("cinnebar").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":cinnebar");
|
||||
|
||||
@ -2678,7 +2684,7 @@ public class ModItems {
|
||||
hazmat_cloth_red = new Item().setUnlocalizedName("hazmat_cloth_red").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":hazmat_cloth_red");
|
||||
hazmat_cloth_grey = new Item().setUnlocalizedName("hazmat_cloth_grey").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":hazmat_cloth_grey");
|
||||
asbestos_cloth = new Item().setUnlocalizedName("asbestos_cloth").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":asbestos_cloth");
|
||||
rag = new Item().setUnlocalizedName("rag").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":rag");
|
||||
rag = new ItemRag().setUnlocalizedName("rag").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":rag");
|
||||
rag_damp = new Item().setUnlocalizedName("rag_damp").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":rag_damp");
|
||||
rag_piss = new Item().setUnlocalizedName("rag_piss").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":rag_piss");
|
||||
filter_coal = new Item().setUnlocalizedName("filter_coal").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":filter_coal");
|
||||
@ -2746,7 +2752,7 @@ public class ModItems {
|
||||
fallout = new ItemHazard().addRadiation(ItemHazard.fo * ItemHazard.powder).toItem().setUnlocalizedName("fallout").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":fallout");
|
||||
powder_advanced_alloy = new Item().setUnlocalizedName("powder_advanced_alloy").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":powder_advanced_alloy");
|
||||
powder_tcalloy = new Item().setUnlocalizedName("powder_tcalloy").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":powder_tcalloy");
|
||||
powder_coal = new ItemHazard().addCoal(10).toItem().setUnlocalizedName("powder_coal").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":powder_coal");
|
||||
powder_coal = new ItemHazard().addCoal(3).toItem().setUnlocalizedName("powder_coal").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":powder_coal");
|
||||
powder_coal_tiny = new ItemHazard().addCoal(1).toItem().setUnlocalizedName("powder_coal_tiny").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":powder_coal_tiny");
|
||||
powder_combine_steel = new Item().setUnlocalizedName("powder_combine_steel").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":powder_combine_steel");
|
||||
powder_diamond = new Item().setUnlocalizedName("powder_diamond").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":powder_diamond");
|
||||
@ -3160,8 +3166,11 @@ public class ModItems {
|
||||
pill_iodine = new ItemPill(0).setUnlocalizedName("pill_iodine").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":pill_iodine");
|
||||
plan_c = new ItemPill(0).setUnlocalizedName("plan_c").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":plan_c");
|
||||
stealth_boy = new ItemStarterKit().setUnlocalizedName("stealth_boy").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":stealth_boy");
|
||||
gas_mask_filter = new ItemFilter().setUnlocalizedName("gas_mask_filter").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":gas_mask_filter");
|
||||
gas_mask_filter_mono = new ItemFilter().setUnlocalizedName("gas_mask_filter_mono").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":gas_mask_filter_mono");
|
||||
gas_mask_filter = new ItemFilter().setUnlocalizedName("gas_mask_filter").setTextureName(RefStrings.MODID + ":gas_mask_filter");
|
||||
gas_mask_filter_mono = new ItemFilter().setUnlocalizedName("gas_mask_filter_mono").setTextureName(RefStrings.MODID + ":gas_mask_filter_mono");
|
||||
gas_mask_filter_combo = new ItemFilter().setUnlocalizedName("gas_mask_filter_combo").setTextureName(RefStrings.MODID + ":gas_mask_filter_combo");
|
||||
gas_mask_filter_rag = new ItemFilter().setUnlocalizedName("gas_mask_filter_rag").setTextureName(RefStrings.MODID + ":gas_mask_filter_rag");
|
||||
gas_mask_filter_piss = new ItemFilter().setUnlocalizedName("gas_mask_filter_piss").setTextureName(RefStrings.MODID + ":gas_mask_filter_piss");
|
||||
jetpack_tank = new ItemSyringe().setUnlocalizedName("jetpack_tank").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":jetpack_tank");
|
||||
gun_kit_1 = new ItemSyringe().setUnlocalizedName("gun_kit_1").setMaxStackSize(16).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":gun_kit_1");
|
||||
gun_kit_2 = new ItemSyringe().setUnlocalizedName("gun_kit_2").setMaxStackSize(16).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":gun_kit_2");
|
||||
@ -4562,12 +4571,18 @@ public class ModItems {
|
||||
euphemium_plate = new ArmorEuphemium(MainRegistry.aMatEuph, 6, 1).setUnlocalizedName("euphemium_plate").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":euphemium_plate");
|
||||
euphemium_legs = new ArmorEuphemium(MainRegistry.aMatEuph, 6, 2).setUnlocalizedName("euphemium_legs").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":euphemium_legs");
|
||||
euphemium_boots = new ArmorEuphemium(MainRegistry.aMatEuph, 6, 3).setUnlocalizedName("euphemium_boots").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":euphemium_boots");
|
||||
|
||||
ArmorMaterial aMatRags = EnumHelper.addArmorMaterial("HBM_RAGS", 150, new int[] { 1, 1, 1, 1 }, 0);
|
||||
aMatRags.customCraftingMaterial = ModItems.rag;
|
||||
|
||||
goggles = new ArmorModel(ArmorMaterial.IRON, 7, 0).setUnlocalizedName("goggles").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":goggles");
|
||||
ashglasses = new ArmorAshGlasses(ArmorMaterial.IRON, 7, 0).setUnlocalizedName("ashglasses").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":ashglasses");
|
||||
gas_mask = new ArmorGasMask().setUnlocalizedName("gas_mask").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":gas_mask");
|
||||
gas_mask_m65 = new ArmorGasMask().setUnlocalizedName("gas_mask_m65").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":gas_mask_m65");
|
||||
gas_mask_mono = new ArmorGasMask().setUnlocalizedName("gas_mask_mono").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":gas_mask_mono");
|
||||
gas_mask_olde = new ArmorGasMask().setUnlocalizedName("gas_mask_olde").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":gas_mask_olde");
|
||||
mask_rag = new ModArmor(aMatRags, 7, 0).setUnlocalizedName("mask_rag").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":mask_rag");
|
||||
mask_piss = new ModArmor(aMatRags, 7, 0).setUnlocalizedName("mask_piss").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":mask_piss");
|
||||
hat = new ArmorHat(ArmorMaterial.IRON, 7, 0).setUnlocalizedName("nossy_hat").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":hat");
|
||||
beta = new ItemDrop().setUnlocalizedName("beta").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":beta");
|
||||
//oxy_mask = new ArmorModel(ArmorMaterial.IRON, 7, 0).setUnlocalizedName("oxy_mask").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":oxy_mask");
|
||||
@ -5085,7 +5100,7 @@ public class ModItems {
|
||||
|
||||
mask_of_infamy = new MaskOfInfamy(ArmorMaterial.IRON, 8, 0).setUnlocalizedName("mask_of_infamy").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":mask_of_infamy");
|
||||
|
||||
hazmat_helmet = new ArmorHazmat(MainRegistry.aMatHaz, 9, 0, RefStrings.MODID + ":textures/armor/hazmat_1.png").setUnlocalizedName("hazmat_helmet").setTextureName(RefStrings.MODID + ":hazmat_helmet");
|
||||
hazmat_helmet = new ArmorHazmatMask(MainRegistry.aMatHaz, 9, 0, RefStrings.MODID + ":textures/armor/hazmat_1.png").setUnlocalizedName("hazmat_helmet").setTextureName(RefStrings.MODID + ":hazmat_helmet");
|
||||
hazmat_plate = new ArmorHazmat(MainRegistry.aMatHaz, 9, 1, RefStrings.MODID + ":textures/armor/hazmat_1.png").setUnlocalizedName("hazmat_plate").setTextureName(RefStrings.MODID + ":hazmat_plate");
|
||||
hazmat_legs = new ArmorHazmat(MainRegistry.aMatHaz, 9, 2, RefStrings.MODID + ":textures/armor/hazmat_2.png").setUnlocalizedName("hazmat_legs").setTextureName(RefStrings.MODID + ":hazmat_legs");
|
||||
hazmat_boots = new ArmorHazmat(MainRegistry.aMatHaz, 9, 3, RefStrings.MODID + ":textures/armor/hazmat_1.png").setUnlocalizedName("hazmat_boots").setTextureName(RefStrings.MODID + ":hazmat_boots");
|
||||
@ -5098,7 +5113,7 @@ public class ModItems {
|
||||
hazmat_plate_grey = new ArmorHazmat(MainRegistry.aMatHaz3, 9, 1, RefStrings.MODID + ":textures/armor/hazmat_1_grey.png").cloneStats((ArmorFSB) hazmat_helmet_grey).setUnlocalizedName("hazmat_plate_grey").setTextureName(RefStrings.MODID + ":hazmat_plate_grey");
|
||||
hazmat_legs_grey = new ArmorHazmat(MainRegistry.aMatHaz3, 9, 2, RefStrings.MODID + ":textures/armor/hazmat_2_grey.png").cloneStats((ArmorFSB) hazmat_helmet_grey).setUnlocalizedName("hazmat_legs_grey").setTextureName(RefStrings.MODID + ":hazmat_legs_grey");
|
||||
hazmat_boots_grey = new ArmorHazmat(MainRegistry.aMatHaz3, 9, 3, RefStrings.MODID + ":textures/armor/hazmat_1_grey.png").cloneStats((ArmorFSB) hazmat_helmet_grey).setUnlocalizedName("hazmat_boots_grey").setTextureName(RefStrings.MODID + ":hazmat_boots_grey");
|
||||
hazmat_paa_helmet = new ArmorHazmat(MainRegistry.aMatPaa, 9, 0, RefStrings.MODID + ":textures/armor/hazmat_paa_1.png")
|
||||
hazmat_paa_helmet = new ArmorHazmatMask(MainRegistry.aMatPaa, 9, 0, RefStrings.MODID + ":textures/armor/hazmat_paa_1.png")
|
||||
.setFireproof(true).setUnlocalizedName("hazmat_paa_helmet").setTextureName(RefStrings.MODID + ":hazmat_paa_helmet");
|
||||
hazmat_paa_plate = new ArmorHazmat(MainRegistry.aMatPaa, 9, 1, RefStrings.MODID + ":textures/armor/hazmat_paa_1.png").cloneStats((ArmorFSB) hazmat_paa_helmet).setUnlocalizedName("hazmat_paa_plate").setTextureName(RefStrings.MODID + ":hazmat_paa_plate");
|
||||
hazmat_paa_legs = new ArmorHazmat(MainRegistry.aMatPaa, 9, 2, RefStrings.MODID + ":textures/armor/hazmat_paa_2.png").cloneStats((ArmorFSB) hazmat_paa_helmet).setUnlocalizedName("hazmat_paa_legs").setTextureName(RefStrings.MODID + ":hazmat_paa_legs");
|
||||
@ -5106,7 +5121,7 @@ public class ModItems {
|
||||
|
||||
ArmorMaterial aMatLiquidator = EnumHelper.addArmorMaterial("HBM_LIQUIDATOR", 750, new int[] { 3, 8, 6, 3 }, 10);
|
||||
aMatLiquidator.customCraftingMaterial = ModItems.plate_lead;
|
||||
liquidator_helmet = new ArmorLiquidator(aMatLiquidator, 9, 0, RefStrings.MODID + ":textures/armor/liquidator_helmet.png")
|
||||
liquidator_helmet = new ArmorLiquidatorMask(aMatLiquidator, 9, 0, RefStrings.MODID + ":textures/armor/liquidator_helmet.png")
|
||||
.setThreshold(1.0F)
|
||||
.setBlastProtection(0.25F)
|
||||
.setFireproof(true)
|
||||
@ -7231,6 +7246,9 @@ public class ModItems {
|
||||
GameRegistry.registerItem(stealth_boy, stealth_boy.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gas_mask_filter, gas_mask_filter.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gas_mask_filter_mono, gas_mask_filter_mono.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gas_mask_filter_combo, gas_mask_filter_combo.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gas_mask_filter_rag, gas_mask_filter_rag.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gas_mask_filter_piss, gas_mask_filter_piss.getUnlocalizedName());
|
||||
GameRegistry.registerItem(jetpack_tank, jetpack_tank.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_kit_1, gun_kit_1.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_kit_2, gun_kit_2.getUnlocalizedName());
|
||||
@ -7448,6 +7466,9 @@ public class ModItems {
|
||||
GameRegistry.registerItem(gas_mask, gas_mask.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gas_mask_m65, gas_mask_m65.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gas_mask_mono, gas_mask_mono.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gas_mask_olde, gas_mask_olde.getUnlocalizedName());
|
||||
GameRegistry.registerItem(mask_rag, mask_rag.getUnlocalizedName());
|
||||
GameRegistry.registerItem(mask_piss, mask_piss.getUnlocalizedName());
|
||||
//GameRegistry.registerItem(oxy_mask, oxy_mask.getUnlocalizedName());
|
||||
GameRegistry.registerItem(hat, hat.getUnlocalizedName());
|
||||
GameRegistry.registerItem(beta, beta.getUnlocalizedName());
|
||||
|
||||
@ -72,7 +72,7 @@ public class ArmorGasMask extends ItemArmor implements IGasMask {
|
||||
}
|
||||
}
|
||||
|
||||
if(this == ModItems.gas_mask_m65 || this == ModItems.gas_mask_mono) {
|
||||
if(this == ModItems.gas_mask_m65 || this == ModItems.gas_mask_olde || this == ModItems.gas_mask_mono) {
|
||||
if(armorSlot == 0) {
|
||||
if(this.modelM65 == null) {
|
||||
this.modelM65 = new ModelM65();
|
||||
@ -93,6 +93,9 @@ public class ArmorGasMask extends ItemArmor implements IGasMask {
|
||||
if(stack.getItem() == ModItems.gas_mask_m65) {
|
||||
return "hbm:textures/models/ModelM65.png";
|
||||
}
|
||||
if(stack.getItem() == ModItems.gas_mask_olde) {
|
||||
return "hbm:textures/armor/mask_olde.png";
|
||||
}
|
||||
if(stack.getItem() == ModItems.gas_mask_mono) {
|
||||
return "hbm:textures/models/ModelM65Mono.png";
|
||||
}
|
||||
@ -140,12 +143,12 @@ public class ArmorGasMask extends ItemArmor implements IGasMask {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HazardClass> getBlacklist(ItemStack stack, EntityLivingBase entity) {
|
||||
public ArrayList<HazardClass> getBlacklist(ItemStack stack, EntityLivingBase entity) {
|
||||
|
||||
if(this == ModItems.gas_mask_mono) {
|
||||
return Arrays.asList(new HazardClass[] {HazardClass.GAS_CHLORINE, HazardClass.GAS_CORROSIVE, HazardClass.NERVE_AGENT, HazardClass.BACTERIA});
|
||||
return new ArrayList<HazardClass>(Arrays.asList(new HazardClass[] {HazardClass.GAS_CHLORINE, HazardClass.GAS_CORROSIVE, HazardClass.NERVE_AGENT, HazardClass.BACTERIA}));
|
||||
} else {
|
||||
return Arrays.asList(new HazardClass[] {HazardClass.GAS_CORROSIVE, HazardClass.NERVE_AGENT});
|
||||
return new ArrayList<HazardClass>(Arrays.asList(new HazardClass[] {HazardClass.GAS_CORROSIVE, HazardClass.NERVE_AGENT}));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -3,6 +3,7 @@ package com.hbm.items.armor;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.render.model.ModelM65;
|
||||
import com.hbm.util.ArmorRegistry.HazardClass;
|
||||
import com.hbm.util.ArmorUtil;
|
||||
@ -28,7 +29,7 @@ public class ArmorHazmatMask extends ArmorHazmat implements IGasMask {
|
||||
@SideOnly(Side.CLIENT)
|
||||
public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot) {
|
||||
|
||||
if (armorSlot == 0) {
|
||||
if(this == ModItems.hazmat_helmet_red || this == ModItems.hazmat_helmet_grey) {
|
||||
if (this.modelM65 == null) {
|
||||
this.modelM65 = new ModelM65();
|
||||
}
|
||||
@ -39,7 +40,7 @@ public class ArmorHazmatMask extends ArmorHazmat implements IGasMask {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HazardClass> getBlacklist(ItemStack stack, EntityLivingBase entity) {
|
||||
public ArrayList<HazardClass> getBlacklist(ItemStack stack, EntityLivingBase entity) {
|
||||
return new ArrayList(); // full hood has no restrictions
|
||||
}
|
||||
|
||||
|
||||
51
src/main/java/com/hbm/items/armor/ArmorLiquidatorMask.java
Normal file
@ -0,0 +1,51 @@
|
||||
package com.hbm.items.armor;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.util.ArmorUtil;
|
||||
import com.hbm.util.ArmorRegistry.HazardClass;
|
||||
|
||||
import api.hbm.item.IGasMask;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ArmorLiquidatorMask extends ArmorLiquidator implements IGasMask {
|
||||
|
||||
public ArmorLiquidatorMask(ArmorMaterial material, int layer, int slot, String texture) {
|
||||
super(material, layer, slot, texture);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList<HazardClass> getBlacklist(ItemStack stack, EntityLivingBase entity) {
|
||||
return new ArrayList(); // full hood has no restrictions
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getFilter(ItemStack stack, EntityLivingBase entity) {
|
||||
return ArmorUtil.getGasMaskFilter(stack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void installFilter(ItemStack stack, EntityLivingBase entity, ItemStack filter) {
|
||||
ArmorUtil.installGasMaskFilter(stack, filter);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void damageFilter(ItemStack stack, EntityLivingBase entity, int damage) {
|
||||
ArmorUtil.damageGasMaskFilter(stack, damage);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
|
||||
ArmorUtil.addGasMaskTooltip(stack, player, list, ext);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFilterApplicable(ItemStack stack, EntityLivingBase entity, ItemStack filter) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -118,7 +118,7 @@ public class ArmorModel extends ItemArmor {
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderHelmetOverlay(ItemStack stack, EntityPlayer player, ScaledResolution resolution, float partialTicks, boolean hasScreen, int mouseX, int mouseY){
|
||||
|
||||
if(this != ModItems.goggles && this != ModItems.gas_mask && this != ModItems.gas_mask_m65 && this != ModItems.hazmat_helmet_red && this != ModItems.hazmat_helmet_grey)
|
||||
if(this != ModItems.goggles && this != ModItems.hazmat_helmet_red && this != ModItems.hazmat_helmet_grey)
|
||||
return;
|
||||
|
||||
GL11.glDisable(GL11.GL_DEPTH_TEST);
|
||||
@ -126,25 +126,29 @@ public class ArmorModel extends ItemArmor {
|
||||
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||
|
||||
if(this == ModItems.hazmat_helmet_red || this == ModItems.hazmat_helmet_grey) {
|
||||
switch((int)((double)stack.getItemDamage() / (double)stack.getMaxDamage() * 6D)) {
|
||||
case 0:
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(goggleBlur0); break;
|
||||
case 1:
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(goggleBlur1); break;
|
||||
case 2:
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(goggleBlur2); break;
|
||||
case 3:
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(goggleBlur3); break;
|
||||
case 4:
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(goggleBlur4); break;
|
||||
case 5:
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(goggleBlur5); break;
|
||||
default:
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(goggleBlur5); break;
|
||||
}
|
||||
}
|
||||
switch((int) ((double) stack.getItemDamage() / (double) stack.getMaxDamage() * 6D)) {
|
||||
case 0:
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(goggleBlur0);
|
||||
break;
|
||||
case 1:
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(goggleBlur1);
|
||||
break;
|
||||
case 2:
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(goggleBlur2);
|
||||
break;
|
||||
case 3:
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(goggleBlur3);
|
||||
break;
|
||||
case 4:
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(goggleBlur4);
|
||||
break;
|
||||
case 5:
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(goggleBlur5);
|
||||
break;
|
||||
default:
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(goggleBlur5);
|
||||
break;
|
||||
}
|
||||
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
tessellator.startDrawingQuads();
|
||||
|
||||
@ -1,16 +1,23 @@
|
||||
package com.hbm.items.armor;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.handler.ArmorModHandler;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.render.model.ModelM65;
|
||||
import com.hbm.util.ArmorUtil;
|
||||
import com.hbm.util.I18nUtil;
|
||||
import com.hbm.util.ArmorRegistry.HazardClass;
|
||||
|
||||
import api.hbm.item.IGasMask;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.model.ModelBiped;
|
||||
import net.minecraft.client.renderer.entity.RenderPlayer;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
@ -18,7 +25,7 @@ import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.event.RenderPlayerEvent;
|
||||
|
||||
public class ItemModGasmask extends ItemArmorMod {
|
||||
public class ItemModGasmask extends ItemArmorMod implements IGasMask {
|
||||
|
||||
private ModelM65 modelM65;
|
||||
private ResourceLocation tex = new ResourceLocation("hbm:textures/models/ModelM65.png");
|
||||
@ -27,26 +34,31 @@ public class ItemModGasmask extends ItemArmorMod {
|
||||
public ItemModGasmask() {
|
||||
super(ArmorModHandler.helmet_only, true, false, false, false);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
|
||||
|
||||
if(this == ModItems.attachment_mask)
|
||||
list.add(EnumChatFormatting.GREEN + "Gas protection");
|
||||
if(this == ModItems.attachment_mask_mono)
|
||||
list.add(EnumChatFormatting.GREEN + "Carbon monoxide protection");
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) {
|
||||
|
||||
list.add(EnumChatFormatting.GREEN + "Gas protection");
|
||||
|
||||
list.add("");
|
||||
super.addInformation(itemstack, player, list, bool);
|
||||
super.addInformation(stack, player, list, bool);
|
||||
|
||||
ArmorUtil.addGasMaskTooltip(stack, player, list, bool);
|
||||
|
||||
List<HazardClass> haz = getBlacklist(stack, player);
|
||||
|
||||
if(!haz.isEmpty()) {
|
||||
list.add(EnumChatFormatting.RED + "Will never protect against:");
|
||||
|
||||
for(HazardClass clazz : haz) {
|
||||
list.add(EnumChatFormatting.DARK_RED + " -" + I18nUtil.resolveKey(clazz.lang));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addDesc(List list, ItemStack stack, ItemStack armor) {
|
||||
|
||||
if(this == ModItems.attachment_mask)
|
||||
list.add(EnumChatFormatting.GREEN + " " + stack.getDisplayName() + " (gas protection)");
|
||||
if(this == ModItems.attachment_mask_mono)
|
||||
list.add(EnumChatFormatting.GREEN + " " + stack.getDisplayName() + " (carbon monoxide protection)");
|
||||
list.add(EnumChatFormatting.GREEN + " " + stack.getDisplayName() + " (gas protection)");
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -78,4 +90,33 @@ public class ItemModGasmask extends ItemArmorMod {
|
||||
modelM65.render(event.entityPlayer, 0.0F, 0.0F, yawWrapped, yaw, pitch, 0.0625F);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList<HazardClass> getBlacklist(ItemStack stack, EntityLivingBase entity) {
|
||||
|
||||
if(this == ModItems.attachment_mask_mono) {
|
||||
return new ArrayList<HazardClass>(Arrays.asList(new HazardClass[] {HazardClass.GAS_CHLORINE, HazardClass.GAS_CORROSIVE, HazardClass.NERVE_AGENT, HazardClass.BACTERIA}));
|
||||
} else {
|
||||
return new ArrayList<HazardClass>(Arrays.asList(new HazardClass[] {HazardClass.GAS_CORROSIVE, HazardClass.NERVE_AGENT}));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getFilter(ItemStack stack, EntityLivingBase entity) {
|
||||
return ArmorUtil.getGasMaskFilter(stack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void installFilter(ItemStack stack, EntityLivingBase entity, ItemStack filter) {
|
||||
ArmorUtil.installGasMaskFilter(stack, filter);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void damageFilter(ItemStack stack, EntityLivingBase entity, int damage) {
|
||||
ArmorUtil.damageGasMaskFilter(stack, damage);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFilterApplicable(ItemStack stack, EntityLivingBase entity, ItemStack filter) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@ -63,6 +63,12 @@ public class ModArmor extends ItemArmor {
|
||||
if(stack.getItem().equals(ModItems.security_legs)) {
|
||||
return (RefStrings.MODID + ":textures/armor/security_2.png");
|
||||
}
|
||||
if(stack.getItem().equals(ModItems.mask_rag)) {
|
||||
return (RefStrings.MODID + ":textures/armor/rag_damp.png");
|
||||
}
|
||||
if(stack.getItem().equals(ModItems.mask_piss)) {
|
||||
return (RefStrings.MODID + ":textures/armor/rag_piss.png");
|
||||
}
|
||||
|
||||
else return null;
|
||||
}
|
||||
|
||||
@ -54,6 +54,7 @@ public class ItemPill extends ItemFood {
|
||||
|
||||
if(this == ModItems.siox) {
|
||||
HbmLivingProps.setAsbestos(player, 0);
|
||||
HbmLivingProps.setBlackLung(player, Math.min(HbmLivingProps.getBlackLung(player), HbmLivingProps.maxBlacklung / 5));
|
||||
}
|
||||
|
||||
if(this == ModItems.xanax) {
|
||||
|
||||
45
src/main/java/com/hbm/items/special/ItemRag.java
Normal file
@ -0,0 +1,45 @@
|
||||
package com.hbm.items.special;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class ItemRag extends Item {
|
||||
|
||||
@Override
|
||||
public boolean onEntityItemUpdate(EntityItem entityItem) {
|
||||
|
||||
if(entityItem != null && !entityItem.worldObj.isRemote) {
|
||||
|
||||
if(entityItem.worldObj.getBlock((int)Math.floor(entityItem.posX), (int)Math.floor(entityItem.posY), (int)Math.floor(entityItem.posZ)).getMaterial() == Material.water) {
|
||||
ItemStack stack = entityItem.getEntityItem();
|
||||
entityItem.setEntityItemStack(new ItemStack(ModItems.rag_damp, stack.stackSize));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {
|
||||
|
||||
stack.stackSize--;
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.rag_piss));
|
||||
|
||||
return stack;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
|
||||
list.add("Drop into water to make damp cloth.");
|
||||
list.add("Right-click to urinate on the cloth.");
|
||||
}
|
||||
}
|
||||
@ -1,5 +1,7 @@
|
||||
package com.hbm.items.tool;
|
||||
|
||||
import com.hbm.handler.ArmorModHandler;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.util.ArmorUtil;
|
||||
|
||||
import api.hbm.item.IGasMask;
|
||||
@ -10,6 +12,12 @@ import net.minecraft.world.World;
|
||||
|
||||
public class ItemFilter extends Item {
|
||||
|
||||
public ItemFilter() {
|
||||
this.setMaxDamage(20000);
|
||||
this.setCreativeTab(MainRegistry.consumableTab);
|
||||
this.setMaxStackSize(1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {
|
||||
|
||||
@ -18,26 +26,47 @@ public class ItemFilter extends Item {
|
||||
if(helmet == null)
|
||||
return stack;
|
||||
|
||||
if(!(helmet.getItem() instanceof IGasMask))
|
||||
return stack;
|
||||
if(!(helmet.getItem() instanceof IGasMask)) {
|
||||
|
||||
if(ArmorModHandler.hasMods(helmet)) {
|
||||
ItemStack[] mods = ArmorModHandler.pryMods(helmet);
|
||||
|
||||
if(mods[ArmorModHandler.helmet_only] != null) {
|
||||
ItemStack mask = mods[ArmorModHandler.helmet_only];
|
||||
|
||||
ItemStack ret = installFilterOn(mask, stack, world, player);
|
||||
ArmorModHandler.applyMod(helmet, mask);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return installFilterOn(helmet, stack, world, player);
|
||||
}
|
||||
|
||||
private ItemStack installFilterOn(ItemStack helmet, ItemStack filter, World world, EntityPlayer player) {
|
||||
|
||||
if(!(helmet.getItem() instanceof IGasMask)) {
|
||||
return filter;
|
||||
}
|
||||
|
||||
IGasMask mask = (IGasMask) helmet.getItem();
|
||||
if(!mask.isFilterApplicable(helmet, player, stack))
|
||||
return stack;
|
||||
if(!mask.isFilterApplicable(helmet, player, filter))
|
||||
return filter;
|
||||
|
||||
ItemStack copy = stack.copy();
|
||||
ItemStack copy = filter.copy();
|
||||
ItemStack current = ArmorUtil.getGasMaskFilter(helmet);
|
||||
|
||||
if(current != null) {
|
||||
stack = current;
|
||||
filter = current;
|
||||
} else {
|
||||
stack.stackSize = 0;
|
||||
filter.stackSize = 0;
|
||||
}
|
||||
|
||||
ArmorUtil.installGasMaskFilter(helmet, copy);
|
||||
|
||||
world.playSoundAtEntity(player, "hbm:item.gasmaskScrew", 1.0F, 1.0F);
|
||||
|
||||
return stack;
|
||||
return filter;
|
||||
}
|
||||
}
|
||||
|
||||
@ -101,6 +101,9 @@ public class HbmWorldGen implements IWorldGenerator {
|
||||
if(WorldConfig.gasbubbleSpawn > 0 && rand.nextInt(WorldConfig.gasbubbleSpawn) == 0)
|
||||
DungeonToolbox.generateOre(world, rand, i, j, 1, 32, 30, 10, ModBlocks.gas_flammable);
|
||||
|
||||
if(WorldConfig.explosivebubbleSpawn > 0 && rand.nextInt(WorldConfig.explosivebubbleSpawn) == 0)
|
||||
DungeonToolbox.generateOre(world, rand, i, j, 1, 32, 30, 10, ModBlocks.gas_explosive);
|
||||
|
||||
DepthDeposit.generateConditionOverworld(world, i, 0, 3, j, 5, 0.6D, ModBlocks.cluster_depth_iron, rand, 24);
|
||||
DepthDeposit.generateConditionOverworld(world, i, 0, 3, j, 5, 0.6D, ModBlocks.cluster_depth_titanium, rand, 32);
|
||||
DepthDeposit.generateConditionOverworld(world, i, 0, 3, j, 5, 0.6D, ModBlocks.cluster_depth_tungsten, rand, 32);
|
||||
@ -122,8 +125,8 @@ public class HbmWorldGen implements IWorldGenerator {
|
||||
int range = colRange / r;
|
||||
|
||||
if(randPosX <= colX + range && randPosX >= colX - range && randPosZ <= colZ + range && randPosZ >= colZ - range) {
|
||||
(new WorldGenMinable(ModBlocks.stone_porous, 16)).generate(world, rand, randPosX, randPosY, randPosZ);
|
||||
(new WorldGenMinable(ModBlocks.ore_coltan, 4)).generate(world, rand, randPosX, randPosY, randPosZ);
|
||||
//(new WorldGenMinable(ModBlocks.stone_porous, 16)).generate(world, rand, randPosX, randPosY, randPosZ);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,7 +3,7 @@ package com.hbm.lib;
|
||||
public class RefStrings {
|
||||
public static final String MODID = "hbm";
|
||||
public static final String NAME = "Hbm's Nuclear Tech Mod";
|
||||
public static final String VERSION = "1.0.27 BETA (3976)";
|
||||
public static final String VERSION = "1.0.27 BETA (3990)";
|
||||
//HBM's Beta Naming Convention:
|
||||
//V T (X)
|
||||
//V -> next release version
|
||||
|
||||
@ -189,6 +189,7 @@ public class ClientProxy extends ServerProxy {
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySolarBoiler.class, new RenderSolarBoiler());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityStorageDrum.class, new RenderStorageDrum());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityChungus.class, new RenderChungus());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityTowerLarge.class, new RenderLargeTower());
|
||||
//AMS
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityAMSBase.class, new RenderAMSBase());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityAMSEmitter.class, new RenderAMSEmitter());
|
||||
|
||||
@ -9,9 +9,6 @@ import com.hbm.crafting.*;
|
||||
import com.hbm.crafting.handlers.*;
|
||||
import com.hbm.handler.FluidTypeHandler.FluidType;
|
||||
import com.hbm.inventory.OreDictManager;
|
||||
import com.hbm.inventory.AnvilRecipes.AnvilConstructionRecipe;
|
||||
import com.hbm.inventory.AnvilRecipes.AnvilOutput;
|
||||
import com.hbm.inventory.RecipesCommon.OreDictStack;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.machine.ItemBattery;
|
||||
import com.hbm.items.special.ItemHot;
|
||||
@ -45,7 +42,6 @@ public class CraftingManager {
|
||||
ConsumableRecipes.register();
|
||||
PowderRecipes.register();
|
||||
|
||||
GameRegistry.addRecipe(new TestCraftingHandler(new ItemStack(ModItems.lignite), new ItemStack(ModItems.powder_coal, 1)));
|
||||
GameRegistry.addRecipe(new RBMKFuelCraftingHandler());
|
||||
GameRegistry.addRecipe(new MKUCraftingHandler());
|
||||
}
|
||||
@ -308,13 +304,17 @@ public class CraftingManager {
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.blades_combine_steel, 1), new Object[] { "PIP", 'P', "plateCMBSteel", 'I', new ItemStack(ModItems.blades_combine_steel, 1, OreDictionary.WILDCARD_VALUE) }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.blades_schrabidium, 1), new Object[] { "PIP", 'P', "plateSchrabidium", 'I', new ItemStack(ModItems.blades_schrabidium, 1, OreDictionary.WILDCARD_VALUE) }));
|
||||
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.stamp_stone_flat, 1), new Object[] { " R ", "III", "SSS", 'R', "dustRedstone", 'I', "ingotBrick", 'S', "stone" }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.stamp_iron_flat, 1), new Object[] { " R ", "III", "SSS", 'R', "dustRedstone", 'I', "ingotBrick", 'S', "ingotIron" }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.stamp_steel_flat, 1), new Object[] { " R ", "III", "SSS", 'R', "dustRedstone", 'I', "ingotBrick", 'S', "ingotSteel" }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.stamp_titanium_flat, 1), new Object[] { " R ", "III", "SSS", 'R', "dustRedstone", 'I', "ingotBrick", 'S', "ingotTitanium" }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.stamp_obsidian_flat, 1), new Object[] { " R ", "III", "SSS", 'R', "dustRedstone", 'I', "ingotBrick", 'S', Blocks.obsidian }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.stamp_schrabidium_flat, 1), new Object[] { " R ", "III", "SSS", 'R', "dustRedstone", 'I', "ingotBrick", 'S', "ingotSchrabidium" }));
|
||||
|
||||
Item[] bricks = new Item[] {Items.brick, Items.netherbrick};
|
||||
|
||||
for(Item brick : bricks) {
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.stamp_stone_flat, 1), new Object[] { " R ", "III", "SSS", 'R', "dustRedstone", 'I', brick, 'S', "stone" }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.stamp_iron_flat, 1), new Object[] { " R ", "III", "SSS", 'R', "dustRedstone", 'I', brick, 'S', "ingotIron" }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.stamp_steel_flat, 1), new Object[] { " R ", "III", "SSS", 'R', "dustRedstone", 'I', brick, 'S', "ingotSteel" }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.stamp_titanium_flat, 1), new Object[] { " R ", "III", "SSS", 'R', "dustRedstone", 'I', brick, 'S', "ingotTitanium" }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.stamp_obsidian_flat, 1), new Object[] { " R ", "III", "SSS", 'R', "dustRedstone", 'I', brick, 'S', Blocks.obsidian }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.stamp_schrabidium_flat, 1), new Object[] { " R ", "III", "SSS", 'R', "dustRedstone", 'I', brick, 'S', "ingotSchrabidium" }));
|
||||
}
|
||||
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.mechanism_revolver_1, 1), new Object[] { " II", "ICA", "IKW", 'I', "plateIron", 'C', "ingotCopper", 'A', "ingotAluminum", 'K', ModItems.wire_copper, 'W', ModItems.wire_aluminium }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.mechanism_revolver_2, 1), new Object[] { " II", "ICA", "IKW", 'I', "plateAdvanced", 'C', "ingotDuraSteel", 'A', "ingotTungsten", 'K', ModItems.bolt_dura_steel, 'W', ModItems.bolt_tungsten }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.mechanism_rifle_1, 1), new Object[] { "ICI", "CMA", "IAM", 'I', "plateIron", 'C', "ingotCopper", 'A', "ingotAluminum", 'M', ModItems.mechanism_revolver_1 }));
|
||||
@ -491,10 +491,8 @@ public class CraftingManager {
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.battery_sc_americium), new Object[] { "NBN", "PCP", "NBN", 'N', ModItems.nugget_tantalium, 'B', ModItems.billet_am241, 'P', ModItems.ingot_polymer, 'C', ModItems.battery_sc_gold });
|
||||
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.wiring_red_copper, 1), new Object[] { "PPP", "PIP", "PPP", 'P', "plateSteel", 'I', "ingotSteel" }));
|
||||
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.tank_waste, 1), new Object[] { "PTP", "PTP", "PTP", 'T', ModItems.tank_steel, 'P', "plateSteel" }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gas_mask_filter, 1), new Object[] { "F", "I", "F", 'F', ModItems.filter_coal, 'I', "plateIron" }));
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.gas_mask_filter_mono, 1), new Object[] { "ZZZ", "ZCZ", "ZZZ", 'Z', ModItems.nugget_zirconium, 'C', ModItems.catalyst_clay });
|
||||
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.jetpack_tank, 1), new Object[] { " S ", "BKB", " S ", 'S', "plateSteel", 'B', ModItems.bolt_tungsten, 'K', ModItems.canister_kerosene }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_kit_1, 4), new Object[] { "I ", "LB", "P ", 'I', ModItems.plate_polymer, 'L', ModItems.canister_canola, 'B', ModItems.bolt_tungsten, 'P', "plateIron" }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_kit_2, 1), new Object[] { "III", "GLG", "PPP", 'I', ModItems.plate_polymer, 'L', ModItems.ducttape, 'G', ModItems.gun_kit_1, 'P', "plateIron" }));
|
||||
@ -811,6 +809,9 @@ public class CraftingManager {
|
||||
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.name_tag), new Object[] { "SB ", "BPB", " BP", 'S', Items.string, 'B', "slimeball", 'P', Items.paper }));
|
||||
GameRegistry.addRecipe(new ItemStack(Items.name_tag), new Object[] { "SB ", "BPB", " BP", 'S', Items.string, 'B', ModItems.oil_tar, 'P', Items.paper });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.rag, 4), new Object[] { "SW", "WS", 'S', Items.string, 'W', Blocks.wool });
|
||||
|
||||
GameRegistry.addRecipe(new ItemStack(ModBlocks.machine_tower_large), new Object[] { "C C", "C C", "CCC", 'C', ModBlocks.concrete_smooth });
|
||||
|
||||
if(GeneralConfig.enableBabyMode) {
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.cordite, 3), new Object[] { ModItems.ballistite, Items.gunpowder, new ItemStack(Blocks.wool, 1, OreDictionary.WILDCARD_VALUE) });
|
||||
@ -973,6 +974,8 @@ public class CraftingManager {
|
||||
|
||||
GameRegistry.addSmelting(ModItems.combine_scrap, new ItemStack(ModItems.ingot_combine_steel), 1.0F);
|
||||
GameRegistry.addSmelting(ModItems.tank_waste, new ItemStack(ModItems.tank_waste), 0.0F);
|
||||
GameRegistry.addSmelting(ModItems.rag_damp, new ItemStack(ModItems.rag), 0.1F);
|
||||
GameRegistry.addSmelting(ModItems.rag_piss, new ItemStack(ModItems.rag), 0.1F);
|
||||
|
||||
GameRegistry.addSmelting(Items.bone, new ItemStack(Items.slime_ball, 3), 0.0F);
|
||||
GameRegistry.addSmelting(new ItemStack(Items.dye, 1, 15), new ItemStack(Items.slime_ball, 1), 0.0F);
|
||||
|
||||
@ -345,14 +345,14 @@ public class ModEventHandler {
|
||||
EntityLivingBase entity = event.entityLiving;
|
||||
World world = event.world;
|
||||
|
||||
if(!MobConfig.enableMobGear || entity.isChild())
|
||||
if(!MobConfig.enableMobGear || entity.isChild() || world.isRemote)
|
||||
return;
|
||||
|
||||
if(entity instanceof EntityZombie) {
|
||||
if(rand.nextInt(64) == 0)
|
||||
entity.setCurrentItemOrArmor(4, new ItemStack(ModItems.gas_mask_m65, 1, world.rand.nextInt(100)));
|
||||
if(rand.nextInt(128) == 0)
|
||||
entity.setCurrentItemOrArmor(4, new ItemStack(ModItems.gas_mask, 1, world.rand.nextInt(100)));
|
||||
entity.setCurrentItemOrArmor(4, new ItemStack(ModItems.gas_mask_olde, 1, world.rand.nextInt(100)));
|
||||
if(rand.nextInt(256) == 0)
|
||||
entity.setCurrentItemOrArmor(4, new ItemStack(ModItems.mask_of_infamy, 1, world.rand.nextInt(100)));
|
||||
if(rand.nextInt(1024) == 0)
|
||||
@ -378,13 +378,10 @@ public class ModEventHandler {
|
||||
entity.setCurrentItemOrArmor(0, new ItemStack(ModItems.chernobylsign));
|
||||
}
|
||||
if(entity instanceof EntitySkeleton) {
|
||||
if(rand.nextInt(16) == 0) {
|
||||
if(rand.nextInt(16) == 0)
|
||||
entity.setCurrentItemOrArmor(4, new ItemStack(ModItems.gas_mask_m65, 1, world.rand.nextInt(100)));
|
||||
|
||||
if(rand.nextInt(32) == 0) {
|
||||
entity.setCurrentItemOrArmor(0, new ItemStack(ModItems.syringe_poison));
|
||||
}
|
||||
}
|
||||
if(rand.nextInt(64) == 0)
|
||||
entity.setCurrentItemOrArmor(3, new ItemStack(ModItems.steel_plate, 1, world.rand.nextInt(ModItems.steel_plate.getMaxDamage())));
|
||||
}
|
||||
}
|
||||
|
||||
@ -1063,7 +1060,7 @@ public class ModEventHandler {
|
||||
event.setExpToDrop(500);
|
||||
}
|
||||
|
||||
if(event.block == Blocks.coal_ore || event.block == ModBlocks.ore_lignite) {
|
||||
if(event.block == Blocks.coal_ore || event.block == Blocks.coal_block || event.block == ModBlocks.ore_lignite) {
|
||||
|
||||
for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
|
||||
|
||||
|
||||
@ -469,9 +469,17 @@ public class ModEventHandlerClient {
|
||||
List<HazardClass> hazInfo = ArmorRegistry.hazardClasses.get(stack.getItem());
|
||||
|
||||
if(hazInfo != null) {
|
||||
list.add(EnumChatFormatting.GOLD + I18nUtil.resolveKey("hazard.prot"));
|
||||
for(HazardClass clazz : hazInfo) {
|
||||
list.add(EnumChatFormatting.YELLOW + " " + I18nUtil.resolveKey(clazz.lang));
|
||||
|
||||
if(Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) {
|
||||
list.add(EnumChatFormatting.GOLD + I18nUtil.resolveKey("hazard.prot"));
|
||||
for(HazardClass clazz : hazInfo) {
|
||||
list.add(EnumChatFormatting.YELLOW + " " + I18nUtil.resolveKey(clazz.lang));
|
||||
}
|
||||
} else {
|
||||
|
||||
list.add(EnumChatFormatting.DARK_GRAY + "" + EnumChatFormatting.ITALIC +"Hold <" +
|
||||
EnumChatFormatting.YELLOW + "" + EnumChatFormatting.ITALIC + "LSHIFT" +
|
||||
EnumChatFormatting.DARK_GRAY + "" + EnumChatFormatting.ITALIC + "> to display protection info");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -87,6 +87,9 @@ public class ResourceManager {
|
||||
public static final IModelCustom turbine = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/turbine.obj"));
|
||||
public static final IModelCustom chungus = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/chungus.obj"));
|
||||
|
||||
//Cooling Tower
|
||||
public static final IModelCustom tower_large = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/tower_large.obj"));
|
||||
|
||||
//IGen
|
||||
public static final IModelCustom igen = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/igen.obj"));
|
||||
|
||||
@ -349,6 +352,9 @@ public class ResourceManager {
|
||||
public static final ResourceLocation turbine_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/turbine.png");
|
||||
public static final ResourceLocation chungus_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/chungus.png");
|
||||
|
||||
//Cooling Tower
|
||||
public static final ResourceLocation tower_large_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/tower_large.png");
|
||||
|
||||
//IGen
|
||||
public static final ResourceLocation igen_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/igen.png");
|
||||
public static final ResourceLocation igen_rotor = new ResourceLocation(RefStrings.MODID, "textures/models/machines/igen_rotor.png");
|
||||
|
||||
@ -102,13 +102,19 @@ public class ItemHazardModule {
|
||||
if(this.fire > 0 && !reacher)
|
||||
entity.setFire(this.fire);
|
||||
|
||||
if(this.asbestos > 0)
|
||||
if(this.asbestos > 0) {
|
||||
if(!ArmorRegistry.hasProtection(entity, 3, HazardClass.PARTICLE_FINE))
|
||||
HbmLivingProps.incrementAsbestos(entity, (int) (this.asbestos * mod));
|
||||
HbmLivingProps.incrementAsbestos(entity, (int) (this.asbestos * Math.min(mod, 10)));
|
||||
else
|
||||
ArmorUtil.damageGasMaskFilter(entity, (int) (this.asbestos));
|
||||
}
|
||||
|
||||
if(this.coal > 0)
|
||||
if(this.coal > 0) {
|
||||
if(!ArmorRegistry.hasProtection(entity, 3, HazardClass.PARTICLE_COARSE))
|
||||
HbmLivingProps.incrementBlackLung(entity, (int) (this.coal * mod));
|
||||
HbmLivingProps.incrementBlackLung(entity, (int) (this.coal * Math.min(mod, 10)));
|
||||
else
|
||||
ArmorUtil.damageGasMaskFilter(entity, (int) (this.coal));
|
||||
}
|
||||
|
||||
if(this.hydro && currentItem) {
|
||||
|
||||
@ -136,7 +142,7 @@ public class ItemHazardModule {
|
||||
}
|
||||
}
|
||||
|
||||
if(this.blinding && !(entity instanceof EntityPlayer && ArmorUtil.checkForGoggles((EntityPlayer) entity))) {
|
||||
if(this.blinding && !ArmorRegistry.hasProtection(entity, 3, HazardClass.LIGHT)) {
|
||||
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.blindness.id, 100, 0));
|
||||
}
|
||||
}
|
||||
@ -166,7 +172,7 @@ public class ItemHazardModule {
|
||||
}
|
||||
|
||||
if(this.coal > 0) {
|
||||
list.add(EnumChatFormatting.BLACK + "[" + I18nUtil.resolveKey("trait.coal") + "]");
|
||||
list.add(EnumChatFormatting.DARK_GRAY + "[" + I18nUtil.resolveKey("trait.coal") + "]");
|
||||
}
|
||||
|
||||
if(this.hydro) {
|
||||
|
||||
@ -3,13 +3,18 @@ package com.hbm.render.item.weapon;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.model.ModelRevolver;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.EnumAction;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
import net.minecraftforge.client.IItemRenderer.ItemRenderType;
|
||||
import net.minecraftforge.client.IItemRenderer.ItemRendererHelper;
|
||||
|
||||
public class ItemRenderRevolverInverted implements IItemRenderer {
|
||||
|
||||
@ -32,36 +37,86 @@ public class ItemRenderRevolverInverted implements IItemRenderer {
|
||||
|
||||
@Override
|
||||
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) {
|
||||
return false;
|
||||
return type == ItemRenderType.ENTITY && (helper == ItemRendererHelper.ENTITY_ROTATION || helper == ItemRendererHelper.ENTITY_BOBBING);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
|
||||
|
||||
boolean inUse = false;
|
||||
if(data != null && data.length > 1 && data[1] instanceof EntityPlayer)
|
||||
inUse = (((EntityPlayer)data[1]).getItemInUse() != null && ((EntityPlayer)data[1]).getItemInUse().getItemUseAction() == EnumAction.bow);
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
|
||||
switch(type) {
|
||||
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
GL11.glPushMatrix();
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelRevolver.png"));
|
||||
GL11.glRotatef(-135.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glTranslatef(-0.5F, 0.0F, -0.2F);
|
||||
//GL11.glScalef(2.0F, 2.0F, 2.0F);
|
||||
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
GL11.glRotatef(180.0F, 0.0F, 1.0F, 0.0F);
|
||||
swordModel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
double s0 = 1.5D;
|
||||
GL11.glTranslated(0.75, 0.5, 0);
|
||||
GL11.glScaled(s0, s0, s0);
|
||||
GL11.glRotated(100, 0, -1, 0);
|
||||
GL11.glRotated(25, 1, 0, 0);
|
||||
|
||||
if(inUse) {
|
||||
GL11.glTranslated(-0.4, 0, 0);
|
||||
GL11.glRotated(198, 0, 1, 0);
|
||||
GL11.glRotated(-10, 1, 0, 0);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case EQUIPPED:
|
||||
|
||||
double scale = 1.5D;
|
||||
GL11.glRotated(195, 0, 1, 0);
|
||||
GL11.glRotated(-10, 0, 0, 1);
|
||||
GL11.glRotated(-10, 1, 0, 0);
|
||||
GL11.glTranslated(-0.5, 0.1, -0.25);
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
|
||||
if(inUse) {
|
||||
GL11.glTranslated(-0.05, 0, 0);
|
||||
GL11.glRotated(-15, 0, 0, 1);
|
||||
GL11.glRotated(160, 0, 1, 0);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case ENTITY:
|
||||
GL11.glPushMatrix();
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelRevolver.png"));
|
||||
GL11.glRotatef(-200.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(75.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(-30.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glTranslatef(0.0F, -0.2F, -0.5F);
|
||||
//GL11.glScalef(2.0F, 2.0F, 2.0F);
|
||||
GL11.glRotatef(180.0F, 0.0F, 1.0F, 0.0F);
|
||||
swordModel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
double s1 = 1D;
|
||||
GL11.glScaled(s1, s1, s1);
|
||||
GL11.glRotated(90, 0, 1, 0);
|
||||
|
||||
break;
|
||||
|
||||
case INVENTORY:
|
||||
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
|
||||
double s = 17D;
|
||||
GL11.glTranslated(8, 8, 0);
|
||||
GL11.glRotated(-135, 0, 0, 1);
|
||||
GL11.glRotated(90, 0, 1, 0);
|
||||
GL11.glScaled(s, s, -s);
|
||||
|
||||
break;
|
||||
|
||||
default: break;
|
||||
}
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.ff_gun_bright);
|
||||
ResourceManager.ff_python.renderPart("Body");
|
||||
ResourceManager.ff_python.renderPart("Cylinder");
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.ff_wood);
|
||||
ResourceManager.ff_python.renderPart("Grip");
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.ff_iron);
|
||||
ResourceManager.ff_python.renderPart("Hammer");
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
@ -13,6 +13,7 @@ import com.hbm.util.ArmorUtil;
|
||||
import net.minecraft.client.model.ModelBiped;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
||||
public class ModelM65 extends ModelBiped {
|
||||
@ -132,7 +133,7 @@ public class ModelM65 extends ModelBiped {
|
||||
GL11.glScaled(1.01D, 1.01D, 1.01D);
|
||||
this.mask.render(par7);
|
||||
|
||||
if(!(entity instanceof EntityPlayer) || ArmorUtil.getGasMaskFilter(((EntityPlayer)entity).getCurrentArmor(3)) != null)
|
||||
if(!(entity instanceof EntityLivingBase) || ArmorUtil.getGasMaskFilterRecursively(((EntityLivingBase)entity).getEquipmentInSlot(4), (EntityLivingBase)entity) != null)
|
||||
this.filter.render(par7);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
@ -0,0 +1,28 @@
|
||||
package com.hbm.render.tileentity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.main.ResourceManager;
|
||||
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
public class RenderLargeTower extends TileEntitySpecialRenderer {
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float f) {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(x + 0.5D, y, z + 0.5D);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
bindTexture(ResourceManager.tower_large_tex);
|
||||
ResourceManager.tower_large.renderAll();
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
@ -230,6 +230,7 @@ public class TileMappings {
|
||||
|
||||
private static void putMachines() {
|
||||
//TODO: bring some order into this garbage dump
|
||||
map.put(TileEntityTowerLarge.class, "tileentity_cooling_tower_larger");
|
||||
}
|
||||
|
||||
private static void putPile() {
|
||||
|
||||
@ -0,0 +1,34 @@
|
||||
package com.hbm.tileentity.machine;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
|
||||
public class TileEntityTowerLarge extends TileEntity {
|
||||
|
||||
AxisAlignedBB bb = null;
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getRenderBoundingBox() {
|
||||
|
||||
if(bb == null) {
|
||||
bb = AxisAlignedBB.getBoundingBox(
|
||||
xCoord - 4,
|
||||
yCoord,
|
||||
zCoord - 4,
|
||||
xCoord + 5,
|
||||
yCoord + 13,
|
||||
zCoord + 5
|
||||
);
|
||||
}
|
||||
|
||||
return bb;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public double getMaxRenderDistanceSquared() {
|
||||
return 65536.0D;
|
||||
}
|
||||
}
|
||||
@ -1,19 +1,24 @@
|
||||
package com.hbm.util;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.handler.ArmorModHandler;
|
||||
|
||||
import api.hbm.item.IGasMask;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ArmorRegistry {
|
||||
|
||||
public static HashMap<Item, List<HazardClass>> hazardClasses = new HashMap();
|
||||
public static HashMap<Item, ArrayList<HazardClass>> hazardClasses = new HashMap();
|
||||
|
||||
public static void registerHazard(Item item, HazardClass... hazards) {
|
||||
hazardClasses.put(item, Arrays.asList(hazards));
|
||||
hazardClasses.put(item, new ArrayList<HazardClass>(Arrays.asList(hazards)));
|
||||
}
|
||||
|
||||
public static boolean hasAllProtection(EntityLivingBase entity, int slot, HazardClass... clazz) {
|
||||
@ -21,11 +26,7 @@ public class ArmorRegistry {
|
||||
if(ArmorUtil.checkArmorNull(entity, slot))
|
||||
return false;
|
||||
|
||||
List<HazardClass> list = hazardClasses.get(entity.getEquipmentInSlot(slot + 1).getItem());
|
||||
|
||||
if(list == null)
|
||||
return false;
|
||||
|
||||
List<HazardClass> list = getProtectionFromItem(entity.getEquipmentInSlot(slot + 1), entity);
|
||||
return list.containsAll(Arrays.asList(clazz));
|
||||
}
|
||||
|
||||
@ -34,7 +35,7 @@ public class ArmorRegistry {
|
||||
if(ArmorUtil.checkArmorNull(entity, slot))
|
||||
return false;
|
||||
|
||||
List<HazardClass> list = hazardClasses.get(entity.getEquipmentInSlot(slot + 1).getItem());
|
||||
List<HazardClass> list = getProtectionFromItem(entity.getEquipmentInSlot(slot + 1), entity);
|
||||
|
||||
if(list == null)
|
||||
return false;
|
||||
@ -51,7 +52,7 @@ public class ArmorRegistry {
|
||||
if(ArmorUtil.checkArmorNull(entity, slot))
|
||||
return false;
|
||||
|
||||
List<HazardClass> list = hazardClasses.get(entity.getEquipmentInSlot(slot + 1).getItem());
|
||||
List<HazardClass> list = getProtectionFromItem(entity.getEquipmentInSlot(slot + 1), entity);
|
||||
|
||||
if(list == null)
|
||||
return false;
|
||||
@ -59,6 +60,46 @@ public class ArmorRegistry {
|
||||
return list.contains(clazz);
|
||||
}
|
||||
|
||||
public static List<HazardClass> getProtectionFromItem(ItemStack stack, EntityLivingBase entity) {
|
||||
|
||||
List<HazardClass> prot = new ArrayList();
|
||||
|
||||
Item item = stack.getItem();
|
||||
|
||||
//if the item has HazardClasses assigned to it, add those
|
||||
if(hazardClasses.containsKey(item))
|
||||
prot.addAll(hazardClasses.get(item));
|
||||
|
||||
if(item instanceof IGasMask) {
|
||||
IGasMask mask = (IGasMask) item;
|
||||
ItemStack filter = mask.getFilter(stack, entity);
|
||||
|
||||
if(filter != null) {
|
||||
//add the HazardClasses from the filter, then remove the ones blacklisted by the mask
|
||||
List<HazardClass> filProt = hazardClasses.get(filter.getItem());
|
||||
|
||||
for(HazardClass c : mask.getBlacklist(stack, entity))
|
||||
filProt.remove(c);
|
||||
|
||||
prot.addAll(filProt);
|
||||
}
|
||||
}
|
||||
|
||||
if(ArmorModHandler.hasMods(stack)) {
|
||||
|
||||
ItemStack[] mods = ArmorModHandler.pryMods(stack);
|
||||
|
||||
for(ItemStack mod : mods) {
|
||||
|
||||
//recursion! run the exact same procedure on every mod, in case future mods will have filter support
|
||||
if(mod != null)
|
||||
prot.addAll(getProtectionFromItem(mod, entity));
|
||||
}
|
||||
}
|
||||
|
||||
return prot;
|
||||
}
|
||||
|
||||
public static enum HazardClass {
|
||||
GAS_CHLORINE("hazard.gasChlorine"), //also attacks eyes -> no half mask
|
||||
GAS_MONOXIDE("hazard.gasMonoxide"), //only affects lungs
|
||||
@ -68,7 +109,8 @@ public class ArmorRegistry {
|
||||
BACTERIA("hazard.bacteria"), //no half masks
|
||||
NERVE_AGENT("hazard.nerveAgent"), //aggressive nerve agent, also attacks skin
|
||||
GAS_CORROSIVE("hazard.corrosive"), //corrosive substance, also attacks skin
|
||||
LIGHT("hazard.light");
|
||||
SAND("hazard.sand"), //blinding sand particles
|
||||
LIGHT("hazard.light"); //blinding light
|
||||
|
||||
public final String lang;
|
||||
|
||||
|
||||
@ -10,6 +10,7 @@ import com.hbm.lib.Library;
|
||||
import com.hbm.potion.HbmPotion;
|
||||
import com.hbm.util.ArmorRegistry.HazardClass;
|
||||
|
||||
import api.hbm.item.IGasMask;
|
||||
import cpw.mods.fml.relauncher.ReflectionHelper;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@ -28,8 +29,36 @@ public class ArmorUtil {
|
||||
*/
|
||||
|
||||
public static void register() {
|
||||
ArmorRegistry.registerHazard(ModItems.gas_mask_filter, HazardClass.PARTICLE_COARSE, HazardClass.PARTICLE_FINE, HazardClass.GAS_CHLORINE, HazardClass.BACTERIA, HazardClass.NERVE_AGENT);
|
||||
ArmorRegistry.registerHazard(ModItems.gas_mask_filter_mono, HazardClass.PARTICLE_COARSE, HazardClass.GAS_MONOXIDE);
|
||||
ArmorRegistry.registerHazard(ModItems.gas_mask_filter, HazardClass.PARTICLE_COARSE, HazardClass.PARTICLE_FINE, HazardClass.GAS_CHLORINE, HazardClass.BACTERIA);
|
||||
ArmorRegistry.registerHazard(ModItems.gas_mask_filter_combo, HazardClass.PARTICLE_COARSE, HazardClass.PARTICLE_FINE, HazardClass.GAS_CHLORINE, HazardClass.BACTERIA, HazardClass.GAS_MONOXIDE, HazardClass.NERVE_AGENT);
|
||||
ArmorRegistry.registerHazard(ModItems.gas_mask_filter_rag, HazardClass.PARTICLE_COARSE);
|
||||
ArmorRegistry.registerHazard(ModItems.gas_mask_filter_piss, HazardClass.PARTICLE_COARSE, HazardClass.GAS_CHLORINE);
|
||||
|
||||
ArmorRegistry.registerHazard(ModItems.gas_mask, HazardClass.SAND, HazardClass.LIGHT);
|
||||
ArmorRegistry.registerHazard(ModItems.gas_mask_m65, HazardClass.SAND);
|
||||
ArmorRegistry.registerHazard(ModItems.mask_rag, HazardClass.PARTICLE_COARSE);
|
||||
ArmorRegistry.registerHazard(ModItems.mask_piss, HazardClass.PARTICLE_COARSE, HazardClass.GAS_CHLORINE);
|
||||
|
||||
ArmorRegistry.registerHazard(ModItems.goggles, HazardClass.LIGHT, HazardClass.SAND);
|
||||
ArmorRegistry.registerHazard(ModItems.ashglasses, HazardClass.LIGHT, HazardClass.SAND);
|
||||
|
||||
ArmorRegistry.registerHazard(ModItems.attachment_mask, HazardClass.SAND);
|
||||
|
||||
ArmorRegistry.registerHazard(ModItems.asbestos_helmet, HazardClass.SAND, HazardClass.LIGHT);
|
||||
ArmorRegistry.registerHazard(ModItems.hazmat_helmet, HazardClass.SAND);
|
||||
ArmorRegistry.registerHazard(ModItems.hazmat_helmet_red, HazardClass.SAND);
|
||||
ArmorRegistry.registerHazard(ModItems.hazmat_helmet_grey, HazardClass.SAND);
|
||||
ArmorRegistry.registerHazard(ModItems.hazmat_paa_helmet, HazardClass.LIGHT, HazardClass.SAND);
|
||||
ArmorRegistry.registerHazard(ModItems.liquidator_helmet, HazardClass.LIGHT, HazardClass.SAND);
|
||||
ArmorRegistry.registerHazard(ModItems.t45_helmet, HazardClass.PARTICLE_COARSE, HazardClass.PARTICLE_FINE, HazardClass.GAS_CHLORINE, HazardClass.BACTERIA, HazardClass.GAS_MONOXIDE, HazardClass.LIGHT, HazardClass.SAND);
|
||||
ArmorRegistry.registerHazard(ModItems.ajr_helmet, HazardClass.PARTICLE_COARSE, HazardClass.PARTICLE_FINE, HazardClass.GAS_CHLORINE, HazardClass.BACTERIA, HazardClass.GAS_MONOXIDE, HazardClass.LIGHT, HazardClass.SAND);
|
||||
ArmorRegistry.registerHazard(ModItems.ajro_helmet, HazardClass.PARTICLE_COARSE, HazardClass.PARTICLE_FINE, HazardClass.GAS_CHLORINE, HazardClass.BACTERIA, HazardClass.GAS_MONOXIDE, HazardClass.LIGHT, HazardClass.SAND);
|
||||
ArmorRegistry.registerHazard(ModItems.hev_helmet, HazardClass.PARTICLE_COARSE, HazardClass.PARTICLE_FINE, HazardClass.GAS_CHLORINE, HazardClass.BACTERIA, HazardClass.GAS_MONOXIDE, HazardClass.LIGHT, HazardClass.SAND);
|
||||
ArmorRegistry.registerHazard(ModItems.fau_helmet, HazardClass.PARTICLE_COARSE, HazardClass.PARTICLE_FINE, HazardClass.GAS_CHLORINE, HazardClass.BACTERIA, HazardClass.GAS_MONOXIDE, HazardClass.LIGHT, HazardClass.SAND);
|
||||
ArmorRegistry.registerHazard(ModItems.dns_helmet, HazardClass.PARTICLE_COARSE, HazardClass.PARTICLE_FINE, HazardClass.GAS_CHLORINE, HazardClass.BACTERIA, HazardClass.GAS_MONOXIDE, HazardClass.LIGHT, HazardClass.SAND);
|
||||
ArmorRegistry.registerHazard(ModItems.schrabidium_helmet, HazardClass.PARTICLE_COARSE, HazardClass.PARTICLE_FINE, HazardClass.GAS_CHLORINE, HazardClass.BACTERIA, HazardClass.GAS_MONOXIDE, HazardClass.LIGHT, HazardClass.SAND);
|
||||
ArmorRegistry.registerHazard(ModItems.euphemium_helmet, HazardClass.PARTICLE_COARSE, HazardClass.PARTICLE_FINE, HazardClass.GAS_CHLORINE, HazardClass.BACTERIA, HazardClass.GAS_MONOXIDE, HazardClass.LIGHT, HazardClass.SAND);
|
||||
}
|
||||
|
||||
public static boolean checkArmor(EntityLivingBase entity, Item... armor) {
|
||||
@ -50,16 +79,12 @@ public class ArmorUtil {
|
||||
return player.getEquipmentInSlot(slot + 1) == null;
|
||||
}
|
||||
|
||||
public static void damageSuit(EntityPlayer player, int slot, int amount) {
|
||||
public static void damageSuit(EntityLivingBase entity, int slot, int amount) {
|
||||
|
||||
if(player.inventory.armorInventory[slot] == null)
|
||||
if(entity.getEquipmentInSlot(slot + 1) == null)
|
||||
return;
|
||||
|
||||
int j = player.inventory.armorInventory[slot].getItemDamage();
|
||||
player.inventory.armorInventory[slot].setItemDamage(j += amount);
|
||||
|
||||
if(player.inventory.armorInventory[slot].getItemDamage() > player.inventory.armorInventory[slot].getMaxDamage())
|
||||
player.inventory.armorInventory[slot] = null;
|
||||
entity.getEquipmentInSlot(slot + 1).damageItem(amount, entity);
|
||||
}
|
||||
|
||||
public static void resetFlightTime(EntityPlayer player) {
|
||||
@ -73,7 +98,7 @@ public class ArmorUtil {
|
||||
/*
|
||||
* The more horrifying part
|
||||
*/
|
||||
public static boolean checkForHazmat(EntityPlayer player) {
|
||||
public static boolean checkForHazmat(EntityLivingBase player) {
|
||||
|
||||
if(checkArmor(player, ModItems.hazmat_helmet, ModItems.hazmat_plate, ModItems.hazmat_legs, ModItems.hazmat_boots) ||
|
||||
checkArmor(player, ModItems.hazmat_helmet_red, ModItems.hazmat_plate_red, ModItems.hazmat_legs_red, ModItems.hazmat_boots_red) ||
|
||||
@ -91,7 +116,7 @@ public class ArmorUtil {
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean checkForHaz2(EntityPlayer player) {
|
||||
public static boolean checkForHaz2(EntityLivingBase player) {
|
||||
|
||||
if(checkArmor(player, ModItems.hazmat_paa_helmet, ModItems.hazmat_paa_plate, ModItems.hazmat_paa_legs, ModItems.hazmat_paa_boots) ||
|
||||
checkArmor(player, ModItems.liquidator_helmet, ModItems.liquidator_plate, ModItems.liquidator_legs, ModItems.liquidator_boots) ||
|
||||
@ -103,7 +128,7 @@ public class ArmorUtil {
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean checkForAsbestos(EntityPlayer player) {
|
||||
public static boolean checkForAsbestos(EntityLivingBase player) {
|
||||
|
||||
if(checkArmor(player, ModItems.asbestos_helmet, ModItems.asbestos_plate, ModItems.asbestos_legs, ModItems.asbestos_boots))
|
||||
return true;
|
||||
@ -205,145 +230,6 @@ public class ArmorUtil {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static boolean checkForGasMask(EntityPlayer player) {
|
||||
|
||||
if(checkArmorPiece(player, ModItems.hazmat_helmet, 3)) {
|
||||
return true;
|
||||
}
|
||||
if(checkArmorPiece(player, ModItems.hazmat_helmet_red, 3)) {
|
||||
return true;
|
||||
}
|
||||
if(checkArmorPiece(player, ModItems.hazmat_helmet_grey, 3)) {
|
||||
return true;
|
||||
}
|
||||
if(checkArmorPiece(player, ModItems.hazmat_paa_helmet, 3)) {
|
||||
return true;
|
||||
}
|
||||
if(checkArmorPiece(player, ModItems.liquidator_helmet, 3)) {
|
||||
return true;
|
||||
}
|
||||
if(checkArmorPiece(player, ModItems.gas_mask, 3)) {
|
||||
return true;
|
||||
}
|
||||
if(checkArmorPiece(player, ModItems.gas_mask_m65, 3)) {
|
||||
return true;
|
||||
}
|
||||
if(checkArmorPiece(player, ModItems.t45_helmet, 3)) {
|
||||
return true;
|
||||
}
|
||||
if(checkArmorPiece(player, ModItems.ajr_helmet, 3)) {
|
||||
return true;
|
||||
}
|
||||
if(checkArmorPiece(player, ModItems.ajro_helmet, 3)) {
|
||||
return true;
|
||||
}
|
||||
if(checkArmorPiece(player, ModItems.hev_helmet, 3)) {
|
||||
return true;
|
||||
}
|
||||
if(checkArmorPiece(player, ModItems.fau_helmet, 3)) {
|
||||
return true;
|
||||
}
|
||||
if(checkArmorPiece(player, ModItems.dns_helmet, 3)) {
|
||||
return true;
|
||||
}
|
||||
if(checkArmorPiece(player, ModItems.schrabidium_helmet, 3)) {
|
||||
return true;
|
||||
}
|
||||
if(checkArmorPiece(player, ModItems.euphemium_helmet, 3)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if(player.isPotionActive(HbmPotion.mutation))
|
||||
return true;
|
||||
|
||||
ItemStack helmet = player.getCurrentArmor(3);
|
||||
if(helmet != null && ArmorModHandler.hasMods(helmet)) {
|
||||
|
||||
ItemStack mods[] = ArmorModHandler.pryMods(helmet);
|
||||
|
||||
if(mods[ArmorModHandler.helmet_only] != null && mods[ArmorModHandler.helmet_only].getItem() == ModItems.attachment_mask)
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static boolean checkForMonoMask(EntityPlayer player) {
|
||||
|
||||
if(checkArmorPiece(player, ModItems.gas_mask_mono, 3))
|
||||
return true;
|
||||
|
||||
if(checkArmorPiece(player, ModItems.liquidator_helmet, 3))
|
||||
return true;
|
||||
|
||||
if(checkArmorPiece(player, ModItems.fau_helmet, 3))
|
||||
return true;
|
||||
|
||||
if(checkArmorPiece(player, ModItems.dns_helmet, 3))
|
||||
return true;
|
||||
|
||||
if(player.isPotionActive(HbmPotion.mutation))
|
||||
return true;
|
||||
|
||||
ItemStack helmet = player.getCurrentArmor(3);
|
||||
if(helmet != null && ArmorModHandler.hasMods(helmet)) {
|
||||
|
||||
ItemStack mods[] = ArmorModHandler.pryMods(helmet);
|
||||
|
||||
if(mods[ArmorModHandler.helmet_only] != null && mods[ArmorModHandler.helmet_only].getItem() == ModItems.attachment_mask_mono)
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean checkForGoggles(EntityPlayer player) {
|
||||
|
||||
if(checkArmorPiece(player, ModItems.goggles, 3)) {
|
||||
return true;
|
||||
}
|
||||
if(checkArmorPiece(player, ModItems.ashglasses, 3)) {
|
||||
return true;
|
||||
}
|
||||
if(checkArmorPiece(player, ModItems.hazmat_helmet_red, 3)) {
|
||||
return true;
|
||||
}
|
||||
if(checkArmorPiece(player, ModItems.hazmat_helmet_grey, 3)) {
|
||||
return true;
|
||||
}
|
||||
if(checkArmorPiece(player, ModItems.liquidator_helmet, 3)) {
|
||||
return true;
|
||||
}
|
||||
if(checkArmorPiece(player, ModItems.gas_mask, 3)) {
|
||||
return true;
|
||||
}
|
||||
if(checkArmorPiece(player, ModItems.t45_helmet, 3)) {
|
||||
return true;
|
||||
}
|
||||
if(checkArmorPiece(player, ModItems.ajr_helmet, 3)) {
|
||||
return true;
|
||||
}
|
||||
if(checkArmorPiece(player, ModItems.ajro_helmet, 3)) {
|
||||
return true;
|
||||
}
|
||||
if(checkArmorPiece(player, ModItems.bj_helmet, 3)) {
|
||||
return true;
|
||||
}
|
||||
if(checkArmorPiece(player, ModItems.hev_helmet, 3)) {
|
||||
return true;
|
||||
}
|
||||
if(checkArmorPiece(player, ModItems.fau_helmet, 3)) {
|
||||
return true;
|
||||
}
|
||||
if(checkArmorPiece(player, ModItems.hev_helmet, 3)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean checkForFiend(EntityPlayer player) {
|
||||
|
||||
return checkArmorPiece(player, ModItems.jackt, 2) && Library.checkForHeld(player, ModItems.shimmer_sledge);
|
||||
@ -384,6 +270,27 @@ public class ArmorUtil {
|
||||
mask.stackTagCompound.removeTag(FILTERK_KEY);
|
||||
}
|
||||
|
||||
/**
|
||||
* Grabs the installed filter or the filter of the attachment, used for attachment rendering
|
||||
* @param mask
|
||||
* @param entity
|
||||
* @return
|
||||
*/
|
||||
public static ItemStack getGasMaskFilterRecursively(ItemStack mask, EntityLivingBase entity) {
|
||||
|
||||
ItemStack filter = getGasMaskFilter(mask);
|
||||
|
||||
if(filter == null && ArmorModHandler.hasMods(mask)) {
|
||||
|
||||
ItemStack mods[] = ArmorModHandler.pryMods(mask);
|
||||
|
||||
if(mods[ArmorModHandler.helmet_only] != null && mods[ArmorModHandler.helmet_only].getItem() instanceof IGasMask)
|
||||
filter = ((IGasMask)mods[ArmorModHandler.helmet_only].getItem()).getFilter(mods[ArmorModHandler.helmet_only], entity);
|
||||
}
|
||||
|
||||
return filter;
|
||||
}
|
||||
|
||||
public static ItemStack getGasMaskFilter(ItemStack mask) {
|
||||
|
||||
if(mask == null)
|
||||
@ -398,10 +305,41 @@ public class ArmorUtil {
|
||||
return filter;
|
||||
}
|
||||
|
||||
public static void damageGasMaskFilter(EntityLivingBase entity, int damage) {
|
||||
|
||||
ItemStack mask = entity.getEquipmentInSlot(4);
|
||||
|
||||
if(mask == null)
|
||||
return;
|
||||
|
||||
if(!(mask.getItem() instanceof IGasMask)) {
|
||||
|
||||
if(ArmorModHandler.hasMods(mask)) {
|
||||
|
||||
ItemStack mods[] = ArmorModHandler.pryMods(mask);
|
||||
|
||||
if(mods[ArmorModHandler.helmet_only] != null && mods[ArmorModHandler.helmet_only].getItem() instanceof IGasMask)
|
||||
mask = mods[ArmorModHandler.helmet_only];
|
||||
}
|
||||
}
|
||||
|
||||
if(mask != null)
|
||||
damageGasMaskFilter(mask, damage);
|
||||
}
|
||||
|
||||
public static void damageGasMaskFilter(ItemStack mask, int damage) {
|
||||
ItemStack filter = getGasMaskFilter(mask);
|
||||
|
||||
if(filter.getMaxDamage() == 0)
|
||||
if(filter == null) {
|
||||
if(ArmorModHandler.hasMods(mask)) {
|
||||
ItemStack mods[] = ArmorModHandler.pryMods(mask);
|
||||
|
||||
if(mods[ArmorModHandler.helmet_only] != null && mods[ArmorModHandler.helmet_only].getItem() instanceof IGasMask)
|
||||
filter = getGasMaskFilter(mods[ArmorModHandler.helmet_only]);
|
||||
}
|
||||
}
|
||||
|
||||
if(filter == null || filter.getMaxDamage() == 0)
|
||||
return;
|
||||
|
||||
filter.setItemDamage(filter.getItemDamage() + damage);
|
||||
@ -414,15 +352,29 @@ public class ArmorUtil {
|
||||
|
||||
public static void addGasMaskTooltip(ItemStack mask, EntityPlayer player, List list, boolean ext) {
|
||||
|
||||
ItemStack filter = getGasMaskFilter(mask);
|
||||
|
||||
if(filter == null)
|
||||
if(mask == null || !(mask.getItem() instanceof IGasMask))
|
||||
return;
|
||||
|
||||
ItemStack filter = ((IGasMask)mask.getItem()).getFilter(mask, player);
|
||||
|
||||
if(filter == null) {
|
||||
list.add(EnumChatFormatting.RED + "No filter installed!");
|
||||
return;
|
||||
}
|
||||
|
||||
list.add(EnumChatFormatting.GOLD + "Installed filter:");
|
||||
|
||||
int meta = filter.getItemDamage();
|
||||
int max = filter.getMaxDamage();
|
||||
|
||||
String append = "";
|
||||
|
||||
if(max > 0) {
|
||||
append = " (" + ((max - meta) * 100 / max) + "%)";
|
||||
}
|
||||
|
||||
List<String> lore = new ArrayList();
|
||||
list.add(" " + filter.getDisplayName());
|
||||
list.add(" " + filter.getDisplayName() + append);
|
||||
filter.getItem().addInformation(filter, player, lore, ext);
|
||||
ForgeEventFactory.onItemTooltip(filter, player, lore, ext);
|
||||
lore.forEach(x -> list.add(EnumChatFormatting.YELLOW + " " + x));
|
||||
|
||||
@ -8,6 +8,7 @@ import com.hbm.handler.HazmatRegistry;
|
||||
import com.hbm.handler.radiation.ChunkRadiationManager;
|
||||
import com.hbm.lib.ModDamageSource;
|
||||
import com.hbm.potion.HbmPotion;
|
||||
import com.hbm.util.ArmorRegistry.HazardClass;
|
||||
|
||||
import api.hbm.entity.IRadiationImmune;
|
||||
import net.minecraft.entity.Entity;
|
||||
@ -122,7 +123,9 @@ public class ContaminationUtil {
|
||||
|
||||
EntityLivingBase entity = (EntityLivingBase)e;
|
||||
|
||||
if(!(entity instanceof EntityPlayer && ArmorUtil.checkForGasMask((EntityPlayer) entity)))
|
||||
if(ArmorRegistry.hasAllProtection(entity, 3, HazardClass.PARTICLE_FINE))
|
||||
ArmorUtil.damageGasMaskFilter(entity, i);
|
||||
else
|
||||
HbmLivingProps.incrementAsbestos(entity, i);
|
||||
}
|
||||
|
||||
@ -245,16 +248,11 @@ public class ContaminationUtil {
|
||||
}
|
||||
|
||||
public static enum HazardType {
|
||||
MONOXIDE,
|
||||
RADIATION,
|
||||
ASBESTOS,
|
||||
DIGAMMA
|
||||
}
|
||||
|
||||
public static enum ContaminationType {
|
||||
GAS, //filterable by gas mask
|
||||
GAS_NON_REACTIVE, //not filterable by gas mask
|
||||
GOGGLES, //preventable by goggles
|
||||
FARADAY, //preventable by metal armor
|
||||
HAZMAT, //preventable by hazmat
|
||||
HAZMAT2, //preventable by heavy hazmat
|
||||
@ -281,9 +279,6 @@ public class ContaminationUtil {
|
||||
EntityPlayer player = (EntityPlayer)entity;
|
||||
|
||||
switch(cont) {
|
||||
case GAS: if(ArmorUtil.checkForGasMask(player)) return false; break;
|
||||
case GAS_NON_REACTIVE: if(ArmorUtil.checkForMonoMask(player)) return false; break;
|
||||
case GOGGLES: if(ArmorUtil.checkForGoggles(player)) return false; break;
|
||||
case FARADAY: if(ArmorUtil.checkForFaraday(player)) return false; break;
|
||||
case HAZMAT: if(ArmorUtil.checkForHazmat(player)) return false; break;
|
||||
case HAZMAT2: if(ArmorUtil.checkForHaz2(player)) return false; break;
|
||||
@ -302,9 +297,7 @@ public class ContaminationUtil {
|
||||
return false;
|
||||
|
||||
switch(hazard) {
|
||||
case MONOXIDE: entity.attackEntityFrom(ModDamageSource.monoxide, amount); break;
|
||||
case RADIATION: HbmLivingProps.incrementRadiation(entity, amount * (cont == ContaminationType.RAD_BYPASS ? 1 : calculateRadiationMod(entity))); break;
|
||||
case ASBESTOS: HbmLivingProps.incrementAsbestos(entity, (int)amount); break;
|
||||
case DIGAMMA: HbmLivingProps.incrementDigamma(entity, amount); break;
|
||||
}
|
||||
|
||||
|
||||
@ -247,6 +247,7 @@ container.nukePrototype=Der Prototyp
|
||||
container.nukeSolinium=Die Blauspülung
|
||||
container.nukeTsar=Tsar Bombe
|
||||
container.oilWell=Ölbohrturm
|
||||
container.orbus=Schwerer Magnetischer Lagerbehälter
|
||||
container.plasmaHeater=Plasmaerhitzer
|
||||
container.press=Befeuerte Presse
|
||||
container.puf6_tank=PuF6 Tank
|
||||
@ -398,9 +399,11 @@ hazard.corrosive=Ätzende Dämpfe
|
||||
hazard.gasChlorine=Giftgas
|
||||
hazard.gasInert=Träge Gase / Strickgas
|
||||
hazard.gasMonoxide=Kohlenstoffmonoxid
|
||||
hazard.light=Starkes Licht
|
||||
hazard.nerveAgent=Nervengift
|
||||
hazard.particleCoarse=Partikel
|
||||
hazard.particleFine=Feinstaub
|
||||
hazard.sand=Augenreizstoffe
|
||||
|
||||
hbm.key=NTM Hotkeys
|
||||
hbm.key.toggleBack=Rucksack umschalten
|
||||
@ -688,7 +691,7 @@ item.assembly_steel.name=Bleipatronensatz
|
||||
item.assembly_template.name=Fertigungsvorlage:
|
||||
item.assembly_uzi.name=.22 LR Patronensatz
|
||||
item.attachment_mask.name=Anfügbare Gasmaske
|
||||
item.attachment_mask_mono.name=Anfügbare Kohlenstoffmonoxidmaske
|
||||
item.attachment_mask_mono.name=Anfügbare Halbmaske
|
||||
item.australium_iii.name=Mark III Lebensverlängerer
|
||||
item.australium_iv.name=Mark IV Lebensverlängerer
|
||||
item.australium_v.name=Mark V Lebensverlängerer
|
||||
@ -719,7 +722,7 @@ item.battery_sc_americium.name=Americium-241-Selbstlader
|
||||
item.battery_sc_gold.name=Gold-198-Selbstlader
|
||||
item.battery_sc_plutonium.name=Plutonium-238-Selbstlader
|
||||
item.battery_sc_polonium.name=Polonium-210-Selbstlader
|
||||
item.battery_sc_technetium.name=Technerium-98-Selbstlader
|
||||
item.battery_sc_technetium.name=Technerium-99-Selbstlader
|
||||
item.battery_sc_uranium.name=Uran-238-Selbstlader
|
||||
item.battery_schrabidium.name=Schrabidiumbatterie
|
||||
item.battery_schrabidium_cell.name=Schrabidium-Energiezelle
|
||||
@ -857,6 +860,7 @@ item.canister_bitumen.name=Bitumenkanister
|
||||
item.canister_canola.name=Schmiermittelkanister
|
||||
item.canister_empty.name=Leerer Kanister
|
||||
item.canister_fuel.name=Dieselkanister
|
||||
item.canister_gasoline.name=Bleibenzinkanister
|
||||
item.canister_heatingoil.name=Heizölkanister
|
||||
item.canister_heavyoil.name=Schwerölkanister
|
||||
item.canister_kerosene.name=Kerosinkanister
|
||||
@ -1040,6 +1044,7 @@ item.coil_tungsten.name=Heizspirale
|
||||
item.coin_creeper.name=Nukleare Creeper-Münze
|
||||
item.coin_maskman.name=Maskenmann-Münze
|
||||
item.coin_radiation.name=Strahlungs-Münze
|
||||
item.coin_siege.name=Belagerungsmünze
|
||||
item.coin_ufo.name=UFO-Münze
|
||||
item.coin_worm.name=Balls-O-Tron-Münze
|
||||
item.coke.name=Koks
|
||||
@ -1224,9 +1229,13 @@ item.gas_empty.name=Leerer Gastank
|
||||
item.gas_full.name=Gastank
|
||||
item.gas_mask.name=Gasmaske
|
||||
item.gas_mask_filter.name=Gasmaskenfilter
|
||||
item.gas_mask_filter_combo.name=Kombofilter
|
||||
item.gas_mask_filter_mono.name=Katalytischer Maskenfilter
|
||||
item.gas_mask_filter_piss.name=Verbesserter selbstgebauter Gasmaskenfilter
|
||||
item.gas_mask_filter_rag.name=Selbstgebauter Gasmaskenfilter
|
||||
item.gas_mask_m65.name=M65-Z Gasmaske
|
||||
item.gas_mask_mono.name=Kohlenstoffmonoxidmaske
|
||||
item.gas_mask_mono.name=Halbmaske
|
||||
item.gas_mask_olde.name=Ledergasmaske
|
||||
item.gas_petroleum.name=Petroleumgastank
|
||||
item.geiger_counter.name=Mobiler Geigerzähler
|
||||
item.gem_tantalium.name=Tantal-Polykristall
|
||||
@ -1475,6 +1484,7 @@ item.ingot_meteorite_forged.name=Geschmiedeter Meteoritenbarren
|
||||
item.ingot_mox_fuel.name=MOX-Kernbrennstoffbarren
|
||||
item.ingot_neptunium.name=Neptuniumbarren
|
||||
item.ingot_neptunium_fuel.name=Neptuniumkernbrennstoffbarren
|
||||
item.ingot_niobium.name=Niobbarren
|
||||
item.ingot_phosphorus.name=Weiße Phosphortafel
|
||||
item.ingot_plutonium.name=Plutoniumbarren
|
||||
item.ingot_plutonium_fuel.name=Plutoniumkernbrennstoffbarren
|
||||
@ -1570,6 +1580,8 @@ item.man_igniter.name=Zünder
|
||||
item.man_kit.name=Fat Man Kit
|
||||
item.marshmallow.name=Marshmallow am Stiel
|
||||
item.mask_of_infamy.name=Maske der Schande
|
||||
item.mask_piss.name=Grabenmaske
|
||||
item.mask_rag.name=Primitive Schutzmaske
|
||||
item.matchstick.name=Streichholz
|
||||
item.mech_key.name=Großer Silberschlüssel
|
||||
item.mechanism_launcher_1.name=Werfermechanismus
|
||||
@ -2066,6 +2078,9 @@ item.radaway.name=RadAway
|
||||
item.radaway_flush.name=Elite-RadAway
|
||||
item.radaway_strong.name=Starkes RadAway
|
||||
item.radx.name=Rad-X
|
||||
item.rag.name=Stoff
|
||||
item.rag_damp.name=Nasser Stoff
|
||||
item.rag_piss.name=Pisslappen
|
||||
item.rbmk_fuel_balefire.name=Balefire-RBMK-Kernbrennstoff
|
||||
item.rbmk_fuel_balefire_gold.name=Flammgold-RBMK-Kernbrennstoff
|
||||
item.rbmk_fuel_drx.name=§cDigamma-RBMK-Kernbrennstoff
|
||||
@ -2883,8 +2898,10 @@ tile.fwatz_plasma.name=Destabilisiertes Antischrabidiumplasma
|
||||
tile.fwatz_scaffold.name=Watzwerkstützen
|
||||
tile.fwatz_tank.name=Kühlmitteltank
|
||||
tile.gas_asbestos.name=Asbestpartikel
|
||||
tile.gas_coal.name=Kohlestaub
|
||||
tile.gas_duct.name=Gasleitung
|
||||
tile.gas_duct_solid.name=Verstärkte Gasleitung
|
||||
tile.gas_explosive.name=Explosives Gas
|
||||
tile.gas_flammable.name=Flammbares Gas
|
||||
tile.gas_monoxide.name=Koglenmonoxid
|
||||
tile.gas_radon.name=Radongas
|
||||
@ -3036,6 +3053,7 @@ tile.machine_spp_top.name=NPE-Potentialgenerator (Oberteil)
|
||||
tile.machine_storage_drum.name=Atommüll-Lagertrommel
|
||||
tile.machine_telelinker.name=Geschütz-Telemetrie-Manager
|
||||
tile.machine_teleporter.name=Teleporter
|
||||
tile.machine_tower_large.name=Kühlturm
|
||||
tile.machine_transformer.name=10k-20Hz-Transformator
|
||||
tile.machine_transformer_20.name=10k-1Hz-Transformator
|
||||
tile.machine_transformer_dnt.name=DNT-20Hz-Transformator
|
||||
@ -3299,6 +3317,7 @@ tile.yellow_barrel.name=Radioaktives Fass
|
||||
trait.asbestos=Asbest
|
||||
trait.blinding=Blendend
|
||||
trait.breeding=%s Operationen in Brutreaktor
|
||||
trait.coal=Kohlestaub
|
||||
trait.digamma=Digammastrahlung
|
||||
trait.drop=Gefährlicher Drop
|
||||
trait.explosive=Entzündlich / Explosiv
|
||||
|
||||
@ -315,6 +315,7 @@ container.nukePrototype=The Prototype
|
||||
container.nukeSolinium=The Blue Rinse
|
||||
container.nukeTsar=Tsar Bomba
|
||||
container.oilWell=Oil Derrick
|
||||
container.orbus=Heavy Antimatter Storage
|
||||
container.plasmaHeater=Plasma Heater
|
||||
container.press=Burner Press
|
||||
container.puf6_tank=PuF6 Tank
|
||||
@ -466,9 +467,11 @@ hazard.corrosive=Corrosive Fumes
|
||||
hazard.gasChlorine=Chemical Gas
|
||||
hazard.gasInert=Inert Gas / Asphxiants
|
||||
hazard.gasMonoxide=Carbon Monoxide
|
||||
hazard.light=Bright Lights
|
||||
hazard.nerveAgent=Nerve Agent
|
||||
hazard.particleCoarse=Airborne Particles
|
||||
hazard.particleFine=Particulates
|
||||
hazard.sand=Eye Irritants
|
||||
|
||||
hbm.key=NTM Hotkeys
|
||||
hbm.key.toggleBack=Toggle Backpack
|
||||
@ -756,7 +759,7 @@ item.assembly_steel.name=Lead Bullet Assembly
|
||||
item.assembly_template.name=Assembly Template:
|
||||
item.assembly_uzi.name=.22 LR Assembly
|
||||
item.attachment_mask.name=Gas Mask Attachable
|
||||
item.attachment_mask_mono.name=Carbon Monoxide Mask Attachable
|
||||
item.attachment_mask_mono.name=Half Mask Attachable
|
||||
item.australium_iii.name=Mark III Life Extender
|
||||
item.australium_iv.name=Mark IV Life Extender
|
||||
item.australium_v.name=Mark V Life Extender
|
||||
@ -787,7 +790,7 @@ item.battery_sc_americium.name=Self-Charging Americium-241 Battery
|
||||
item.battery_sc_gold.name=Self-Charging Gold-198 Battery
|
||||
item.battery_sc_plutonium.name=Self-Charging Plutonium-238 Battery
|
||||
item.battery_sc_polonium.name=Self-Charging Polonium-210 Battery
|
||||
item.battery_sc_technetium.name=Self-Charging Technetium-98 Battery
|
||||
item.battery_sc_technetium.name=Self-Charging Technetium-99 Battery
|
||||
item.battery_sc_uranium.name=Self-Charging Uranium-238 Battery
|
||||
item.battery_schrabidium.name=Schrabidium Battery
|
||||
item.battery_schrabidium_cell.name=Schrabidium Power Cell
|
||||
@ -925,6 +928,7 @@ item.canister_bitumen.name=Bitumen Canister
|
||||
item.canister_canola.name=Engine Lubricant
|
||||
item.canister_empty.name=Empty Canister
|
||||
item.canister_fuel.name=Diesel Canister
|
||||
item.canister_gasoline.name=Leaded Gasoline Canister
|
||||
item.canister_heatingoil.name=Heating Oil Canister
|
||||
item.canister_heavyoil.name=Heavy Oil Canister
|
||||
item.canister_kerosene.name=Kerosene Canister
|
||||
@ -1108,6 +1112,7 @@ item.coil_tungsten.name=Heating Coil
|
||||
item.coin_creeper.name=Nuclear Creeper Coin
|
||||
item.coin_maskman.name=Maskman Coin
|
||||
item.coin_radiation.name=Radiation Coin
|
||||
item.coin_siege.name=Siege Coin
|
||||
item.coin_ufo.name=UFO Coin
|
||||
item.coin_worm.name=Balls-O-Tron Coin
|
||||
item.coke.name=Coke
|
||||
@ -1292,9 +1297,13 @@ item.gas_empty.name=Empty Gas Tank
|
||||
item.gas_full.name=Gas Tank
|
||||
item.gas_mask.name=Gas Mask
|
||||
item.gas_mask_filter.name=Gas Mask Filter
|
||||
item.gas_mask_filter_combo.name=Gas Mask Combo Filter
|
||||
item.gas_mask_filter_mono.name=Catalytic Mask Filter
|
||||
item.gas_mask_filter_piss.name=Advanced Makeshift Gas Mask Filter
|
||||
item.gas_mask_filter_rag.name=Makeshift Gas Mask Filter
|
||||
item.gas_mask_m65.name=M65-Z Gas Mask
|
||||
item.gas_mask_mono.name=Carbon Monoxide Mask
|
||||
item.gas_mask_mono.name=Half Mask
|
||||
item.gas_mask_olde.name=Leather Gas Mask
|
||||
item.gas_petroleum.name=Petroleum Gas Tank
|
||||
item.geiger_counter.name=Handheld Geiger Counter
|
||||
item.gem_tantalium.name=Tantalium Polycrystal
|
||||
@ -1543,6 +1552,7 @@ item.ingot_meteorite_forged.name=Forged Meteorite Ingot
|
||||
item.ingot_mox_fuel.name=Ingot of MOX Fuel
|
||||
item.ingot_neptunium.name=Neptunium Ingot
|
||||
item.ingot_neptunium_fuel.name=Neptunium Fuel Ingot
|
||||
item.ingot_niobium.name=Niobium Ingot
|
||||
item.ingot_phosphorus.name=Bar of White Phosphorus
|
||||
item.ingot_plutonium.name=Plutonium Ingot
|
||||
item.ingot_plutonium_fuel.name=Ingot of Plutonium Fuel
|
||||
@ -1638,6 +1648,8 @@ item.man_igniter.name=Bomb Igniter
|
||||
item.man_kit.name=Fat Man Kit
|
||||
item.marshmallow.name=Marshmallow on a Stick
|
||||
item.mask_of_infamy.name=Mask of Infamy
|
||||
item.mask_piss.name=Trench Mask
|
||||
item.mask_rag.name=Crude Protective Mask
|
||||
item.matchstick.name=Matchstick
|
||||
item.mech_key.name=Large Silver Key
|
||||
item.mechanism_launcher_1.name=Launcher Mechanism
|
||||
@ -2135,6 +2147,9 @@ item.radaway.name=RadAway
|
||||
item.radaway_flush.name=Elite RadAway
|
||||
item.radaway_strong.name=Strong RadAway
|
||||
item.radx.name=Rad-X
|
||||
item.rag.name=Cloth
|
||||
item.rag_damp.name=Damp Cloth
|
||||
item.rag_piss.name=Piss-Soaked Rag
|
||||
item.rbmk_fuel_balefire.name=Balefire RBMK Fuel Rod
|
||||
item.rbmk_fuel_balefire_gold.name=Flashgold RBMK Fuel Rod
|
||||
item.rbmk_fuel_drx.name=§cDigamma RBMK Fuel Rod§r
|
||||
@ -2966,8 +2981,10 @@ tile.fwatz_plasma.name=Destabilized Antischrabidium Plasma
|
||||
tile.fwatz_scaffold.name=Fusionary Watz Plant Structural Support
|
||||
tile.fwatz_tank.name=Regenerative Coolant Fluid Tank
|
||||
tile.gas_asbestos.name=Airborne Asbestos Particles
|
||||
tile.gas_coal.name=Airborne Coal Dust
|
||||
tile.gas_duct.name=Gas Pipe
|
||||
tile.gas_duct_solid.name=Coated Gas Pipe
|
||||
tile.gas_explosive.name=Explosive Gas
|
||||
tile.gas_flammable.name=Flammable Gas
|
||||
tile.gas_monoxide.name=Carbon Monoxide
|
||||
tile.gas_radon.name=Radon Gas
|
||||
@ -3119,6 +3136,7 @@ tile.machine_spp_top.name=ZPE Potential Generator (Top)
|
||||
tile.machine_storage_drum.name=Nuclear Waste Disposal Drum
|
||||
tile.machine_telelinker.name=Turret Telemetry Linker
|
||||
tile.machine_teleporter.name=Teleporter
|
||||
tile.machine_tower_large.name=Cooling Tower
|
||||
tile.machine_transformer.name=10k-20Hz Transformer
|
||||
tile.machine_transformer_20.name=10k-1Hz Transformer
|
||||
tile.machine_transformer_dnt.name=DNT-20Hz Transformer
|
||||
@ -3381,6 +3399,7 @@ tile.yellow_barrel.name=Radioactive Barrel
|
||||
trait.asbestos=Asbestos
|
||||
trait.blinding=Blinding
|
||||
trait.breeding=Worth %s operations in breeding reactor
|
||||
trait.coal=Coal Dust
|
||||
trait.digamma=Digamma Radiation
|
||||
trait.drop=Dangerous Drop
|
||||
trait.explosive=Flammable / Explosive
|
||||
|
||||
1343
src/main/resources/assets/hbm/models/machines/tower_large.obj
Normal file
@ -183,7 +183,7 @@
|
||||
"entity.megaquacc": {"category": "hostile", "sounds": [{"name": "entity/megaquacc", "stream": false}]},
|
||||
"entity.ufoBeam": {"category": "hostile", "sounds": [{"name": "entity/ufoBeamShort", "stream": false}]},
|
||||
"entity.ufoBlast": {"category": "hostile", "sounds": [{"name": "entity/ufoBlast", "stream": false}]},
|
||||
"entity.siegeIdle": {"category": "hostile", "sounds": ["entity/siegeIdle1", "entity/siegeIdle2"]},
|
||||
"entity.siegeIdle": {"category": "hostile", "sounds": ["entity/siegeIdle1"]},
|
||||
"entity.siegeHurt": {"category": "hostile", "sounds": ["entity/siegeHurt1", "entity/siegeHurt2"]},
|
||||
"entity.siegeDeath": {"category": "hostile", "sounds": ["entity/siegeDeath1", "entity/siegeDeath2", "entity/siegeDeath3"]},
|
||||
|
||||
|
||||
BIN
src/main/resources/assets/hbm/textures/armor/mask_olde.png
Normal file
|
After Width: | Height: | Size: 708 B |
BIN
src/main/resources/assets/hbm/textures/armor/rag_damp.png
Normal file
|
After Width: | Height: | Size: 214 B |
BIN
src/main/resources/assets/hbm/textures/armor/rag_piss.png
Normal file
|
After Width: | Height: | Size: 308 B |
BIN
src/main/resources/assets/hbm/textures/blocks/gas_coal.png
Normal file
|
After Width: | Height: | Size: 133 B |
BIN
src/main/resources/assets/hbm/textures/blocks/gas_explosive.png
Normal file
|
After Width: | Height: | Size: 175 B |
|
After Width: | Height: | Size: 274 B |
BIN
src/main/resources/assets/hbm/textures/items/gas_mask_olde.png
Normal file
|
After Width: | Height: | Size: 385 B |
BIN
src/main/resources/assets/hbm/textures/items/mask_piss.png
Normal file
|
After Width: | Height: | Size: 299 B |
BIN
src/main/resources/assets/hbm/textures/items/mask_rag.png
Normal file
|
After Width: | Height: | Size: 294 B |
|
Before Width: | Height: | Size: 294 B After Width: | Height: | Size: 187 B |
|
Before Width: | Height: | Size: 259 B After Width: | Height: | Size: 195 B |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
@ -3,7 +3,7 @@
|
||||
"modid": "hbm",
|
||||
"name": "Hbm's Nuclear Tech",
|
||||
"description": "A mod that adds weapons, nuclear themed stuff and machines",
|
||||
"version":"1.0.27_X3976",
|
||||
"version":"1.0.27_X3990",
|
||||
"mcversion": "1.7.10",
|
||||
"url": "",
|
||||
"updateUrl": "",
|
||||
|
||||