mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
catalytic gas mask
This commit is contained in:
parent
1851651b10
commit
0dc919c512
@ -4,6 +4,13 @@ import com.hbm.blocks.generic.*;
|
||||
import com.hbm.blocks.generic.BlockHazard.ExtDisplayEffect;
|
||||
import com.hbm.blocks.bomb.*;
|
||||
import com.hbm.blocks.fluid.*;
|
||||
import com.hbm.blocks.gas.BlockGasAsbestos;
|
||||
import com.hbm.blocks.gas.BlockGasClorine;
|
||||
import com.hbm.blocks.gas.BlockGasFlammable;
|
||||
import com.hbm.blocks.gas.BlockGasMonoxide;
|
||||
import com.hbm.blocks.gas.BlockGasRadon;
|
||||
import com.hbm.blocks.gas.BlockGasRadonDense;
|
||||
import com.hbm.blocks.gas.BlockGasRadonTomb;
|
||||
import com.hbm.blocks.machine.*;
|
||||
import com.hbm.blocks.network.*;
|
||||
import com.hbm.blocks.test.*;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
package com.hbm.blocks.generic;
|
||||
package com.hbm.blocks.gas;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
package com.hbm.blocks.generic;
|
||||
package com.hbm.blocks.gas;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
package com.hbm.blocks.generic;
|
||||
package com.hbm.blocks.gas;
|
||||
|
||||
|
||||
import java.util.Random;
|
||||
@ -1,4 +1,4 @@
|
||||
package com.hbm.blocks.generic;
|
||||
package com.hbm.blocks.gas;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
@ -1,8 +1,11 @@
|
||||
package com.hbm.blocks.generic;
|
||||
package com.hbm.blocks.gas;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.lib.ModDamageSource;
|
||||
import com.hbm.util.ContaminationUtil;
|
||||
import com.hbm.util.ContaminationUtil.ContaminationType;
|
||||
import com.hbm.util.ContaminationUtil.HazardType;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
@ -14,9 +17,8 @@ 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) {
|
||||
((EntityLivingBase)entity).attackEntityFrom(ModDamageSource.monoxide, 1F);
|
||||
}
|
||||
if(entity instanceof EntityLivingBase)
|
||||
ContaminationUtil.contaminate((EntityLivingBase) entity, HazardType.MONOXIDE, ContaminationType.GAS_NON_REACTIVE, 1F);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -1,4 +1,4 @@
|
||||
package com.hbm.blocks.generic;
|
||||
package com.hbm.blocks.gas;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
package com.hbm.blocks.generic;
|
||||
package com.hbm.blocks.gas;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
package com.hbm.blocks.generic;
|
||||
package com.hbm.blocks.gas;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
package com.hbm.interfaces;
|
||||
|
||||
//Universal notation for shitty code
|
||||
//Universal annotation for shitty code
|
||||
//I know TODO is a thing, but it's nice to hover over a class and see wtf is wrong with it
|
||||
public @interface Spaghetti {
|
||||
|
||||
|
||||
@ -718,6 +718,7 @@ public class ModItems {
|
||||
public static Item plan_c;
|
||||
public static Item stealth_boy;
|
||||
public static Item gas_mask_filter;
|
||||
public static Item gas_mask_filter_mono;
|
||||
public static Item jetpack_tank;
|
||||
public static Item gun_kit_1;
|
||||
public static Item gun_kit_2;
|
||||
@ -1662,6 +1663,7 @@ public class ModItems {
|
||||
public static Item goggles;
|
||||
public static Item gas_mask;
|
||||
public static Item gas_mask_m65;
|
||||
public static Item gas_mask_mono;
|
||||
public static Item oxy_mask;
|
||||
public static Item hat;
|
||||
public static Item beta;
|
||||
@ -1868,6 +1870,7 @@ public class ModItems {
|
||||
public static Item crystal_charred;
|
||||
|
||||
public static Item attachment_mask;
|
||||
public static Item attachment_mask_mono;
|
||||
public static Item back_tesla;
|
||||
public static Item servo_set;
|
||||
public static Item servo_set_desh;
|
||||
@ -2836,12 +2839,14 @@ public class ModItems {
|
||||
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 ItemSyringe().setUnlocalizedName("gas_mask_filter").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":gas_mask_filter");
|
||||
gas_mask_filter_mono = new ItemSyringe().setUnlocalizedName("gas_mask_filter_mono").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":gas_mask_filter_mono");
|
||||
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");
|
||||
cbt_device = new ItemSyringe().setUnlocalizedName("cbt_device").setMaxStackSize(1).setCreativeTab(null).setTextureName(RefStrings.MODID + ":cbt_device");
|
||||
|
||||
attachment_mask = new ItemModGasmask().setUnlocalizedName("attachment_mask").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":attachment_mask");
|
||||
attachment_mask_mono = new ItemModGasmask().setUnlocalizedName("attachment_mask_mono").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":attachment_mask_mono");
|
||||
back_tesla = new ItemModTesla().setUnlocalizedName("back_tesla").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":back_tesla");
|
||||
servo_set = new ItemModServos().setUnlocalizedName("servo_set").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":servo_set");
|
||||
servo_set_desh = new ItemModServos().setUnlocalizedName("servo_set_desh").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":servo_set_desh");
|
||||
@ -3948,6 +3953,7 @@ public class ModItems {
|
||||
goggles = new ArmorModel(ArmorMaterial.IRON, 7, 0).setUnlocalizedName("goggles").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":goggles");
|
||||
gas_mask = new ArmorModel(ArmorMaterial.IRON, 7, 0).setUnlocalizedName("gas_mask").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":gas_mask");
|
||||
gas_mask_m65 = new ArmorModel(ArmorMaterial.IRON, 7, 0).setUnlocalizedName("gas_mask_m65").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":gas_mask_m65");
|
||||
gas_mask_mono = new ArmorModel(ArmorMaterial.IRON, 7, 0).setUnlocalizedName("gas_mask_mono").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":gas_mask_mono");
|
||||
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");
|
||||
@ -6363,6 +6369,7 @@ public class ModItems {
|
||||
GameRegistry.registerItem(plan_c, plan_c.getUnlocalizedName());
|
||||
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(jetpack_tank, jetpack_tank.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_kit_1, gun_kit_1.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_kit_2, gun_kit_2.getUnlocalizedName());
|
||||
@ -6473,6 +6480,7 @@ public class ModItems {
|
||||
|
||||
//Armor mods
|
||||
GameRegistry.registerItem(attachment_mask, attachment_mask.getUnlocalizedName());
|
||||
GameRegistry.registerItem(attachment_mask_mono, attachment_mask_mono.getUnlocalizedName());
|
||||
GameRegistry.registerItem(back_tesla, back_tesla.getUnlocalizedName());
|
||||
GameRegistry.registerItem(servo_set, servo_set.getUnlocalizedName());
|
||||
GameRegistry.registerItem(servo_set_desh, servo_set_desh.getUnlocalizedName());
|
||||
@ -6564,6 +6572,7 @@ public class ModItems {
|
||||
GameRegistry.registerItem(goggles, goggles.getUnlocalizedName());
|
||||
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(oxy_mask, oxy_mask.getUnlocalizedName());
|
||||
GameRegistry.registerItem(hat, hat.getUnlocalizedName());
|
||||
GameRegistry.registerItem(beta, beta.getUnlocalizedName());
|
||||
|
||||
@ -4,6 +4,7 @@ import java.util.List;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.interfaces.Spaghetti;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.render.model.ModelCloak;
|
||||
@ -27,14 +28,23 @@ import net.minecraft.item.ItemArmor;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
@Spaghetti("more ctor stuff, less if/else bullshittery")
|
||||
//turns out you can't actually pass a model in the ctor because ModelBiped is clientonly...
|
||||
public class ArmorModel extends ItemArmor {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private ModelGoggles modelGoggles;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private ModelGasMask modelGas;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private ModelCloak modelCloak;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private ModelOxygenMask modelOxy;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private ModelM65 modelM65;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private ModelHat modelHat;
|
||||
@Spaghetti("replace this garbage with an array")
|
||||
private ResourceLocation goggleBlur0 = new ResourceLocation(RefStrings.MODID + ":textures/misc/overlay_goggles_0.png");
|
||||
private ResourceLocation goggleBlur1 = new ResourceLocation(RefStrings.MODID + ":textures/misc/overlay_goggles_1.png");
|
||||
private ResourceLocation goggleBlur2 = new ResourceLocation(RefStrings.MODID + ":textures/misc/overlay_goggles_2.png");
|
||||
@ -52,7 +62,8 @@ public class ArmorModel extends ItemArmor {
|
||||
super(armorMaterial, renderIndex, armorType);
|
||||
}
|
||||
|
||||
@Override
|
||||
//there was no reason to override this
|
||||
/*@Override
|
||||
public boolean isValidArmor(ItemStack stack, int armorType, Entity entity) {
|
||||
if (this == ModItems.goggles) {
|
||||
return armorType == 0;
|
||||
@ -63,6 +74,9 @@ public class ArmorModel extends ItemArmor {
|
||||
if (this == ModItems.gas_mask_m65) {
|
||||
return armorType == 0;
|
||||
}
|
||||
if (this == ModItems.gas_mask_mono) {
|
||||
return armorType == 0;
|
||||
}
|
||||
if (this == ModItems.hat) {
|
||||
return armorType == 0;
|
||||
}
|
||||
@ -87,29 +101,8 @@ public class ArmorModel extends ItemArmor {
|
||||
if (this == ModItems.cape_schrabidium) {
|
||||
return armorType == 1;
|
||||
}
|
||||
/*if (this == ModItems.cape_hbm) {
|
||||
return armorType == 1;
|
||||
}
|
||||
if (this == ModItems.cape_dafnik) {
|
||||
return armorType == 1;
|
||||
}
|
||||
if (this == ModItems.cape_lpkukin) {
|
||||
return armorType == 1;
|
||||
}
|
||||
if (this == ModItems.cape_vertice) {
|
||||
return armorType == 1;
|
||||
}
|
||||
if (this == ModItems.cape_codered_) {
|
||||
return armorType == 1;
|
||||
}
|
||||
if (this == ModItems.cape_ayy) {
|
||||
return armorType == 1;
|
||||
}
|
||||
if (this == ModItems.cape_nostalgia) {
|
||||
return armorType == 1;
|
||||
}*/
|
||||
return armorType == 0;
|
||||
}
|
||||
}*/
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
@ -130,6 +123,14 @@ public class ArmorModel extends ItemArmor {
|
||||
return this.modelGas;
|
||||
}
|
||||
}
|
||||
if (this == ModItems.gas_mask_mono) {
|
||||
if (armorSlot == 0) {
|
||||
if (this.modelGas == null) {
|
||||
this.modelGas = new ModelGasMask();
|
||||
}
|
||||
return this.modelGas;
|
||||
}
|
||||
}
|
||||
if (this == ModItems.gas_mask_m65 || this == ModItems.hazmat_helmet_red || this == ModItems.hazmat_helmet_grey) {
|
||||
if (armorSlot == 0) {
|
||||
if (this.modelM65 == null) {
|
||||
@ -162,14 +163,6 @@ public class ArmorModel extends ItemArmor {
|
||||
return this.modelCloak;
|
||||
}
|
||||
}
|
||||
/*if (this == ModItems.cape_hbm || this == ModItems.cape_dafnik || this == ModItems.cape_lpkukin || this == ModItems.cape_vertice || this == ModItems.cape_codered_ || this == ModItems.cape_ayy || this == ModItems.cape_nostalgia) {
|
||||
if (armorSlot == 1) {
|
||||
if (this.modelCloak == null) {
|
||||
this.modelCloak = new ModelCloak();
|
||||
}
|
||||
return this.modelCloak;
|
||||
}
|
||||
}*/
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -184,6 +177,9 @@ public class ArmorModel extends ItemArmor {
|
||||
if (stack.getItem() == ModItems.gas_mask_m65) {
|
||||
return "hbm:textures/models/ModelM65.png";
|
||||
}
|
||||
if (stack.getItem() == ModItems.gas_mask_mono) {
|
||||
return "hbm:textures/models/ModelM65Mono.png";
|
||||
}
|
||||
if (stack.getItem() == ModItems.hazmat_helmet_red) {
|
||||
return "hbm:textures/models/ModelHazRed.png";
|
||||
}
|
||||
@ -212,9 +208,8 @@ 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.gas_mask && this != ModItems.gas_mask_m65 && this != ModItems.gas_mask_mono && this != ModItems.hazmat_helmet_red && this != ModItems.hazmat_helmet_grey)
|
||||
return;
|
||||
|
||||
|
||||
GL11.glDisable(GL11.GL_DEPTH_TEST);
|
||||
GL11.glDepthMask(false);
|
||||
@ -222,7 +217,7 @@ public class ArmorModel extends ItemArmor {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||
|
||||
if(this == ModItems.goggles || this == ModItems.gas_mask_m65 || this == ModItems.hazmat_helmet_red || this == ModItems.hazmat_helmet_grey) {
|
||||
if(this == ModItems.goggles || this == ModItems.gas_mask_m65 || this == ModItems.gas_mask_mono || 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;
|
||||
@ -275,35 +270,21 @@ public class ArmorModel extends ItemArmor {
|
||||
@Override
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
|
||||
|
||||
if (itemstack.getItem() == ModItems.cape_radiation) {
|
||||
if(this == ModItems.cape_radiation) {
|
||||
list.add("Avalible for everyone");
|
||||
}
|
||||
if (itemstack.getItem() == ModItems.cape_gasmask) {
|
||||
if(this == ModItems.cape_gasmask) {
|
||||
list.add("Avalible for everyone");
|
||||
}
|
||||
if (itemstack.getItem() == ModItems.cape_schrabidium) {
|
||||
if(this == ModItems.cape_schrabidium) {
|
||||
list.add("Avalible for everyone");
|
||||
}
|
||||
/*if (itemstack.getItem() == ModItems.cape_hbm) {
|
||||
list.add("Only works for HbMinecraft");
|
||||
|
||||
if(this == ModItems.gas_mask || this == ModItems.gas_mask_m65) {
|
||||
list.add("Protects against most harmful gasses");
|
||||
}
|
||||
if (itemstack.getItem() == ModItems.cape_dafnik) {
|
||||
list.add("Only works for Dafnik");
|
||||
if(this == ModItems.gas_mask_mono) {
|
||||
list.add("Protects against carbon monoxide");
|
||||
}
|
||||
if (itemstack.getItem() == ModItems.cape_lpkukin) {
|
||||
list.add("Only works for LPkukin");
|
||||
}
|
||||
if (itemstack.getItem() == ModItems.cape_vertice) {
|
||||
list.add("Only works for LordVertice");
|
||||
}
|
||||
if (itemstack.getItem() == ModItems.cape_codered_) {
|
||||
list.add("Only works for codered_");
|
||||
}
|
||||
if (itemstack.getItem() == ModItems.cape_ayy) {
|
||||
list.add("Only works for dxmaster769");
|
||||
}
|
||||
if (itemstack.getItem() == ModItems.cape_nostalgia) {
|
||||
list.add("Only works for Dr_Nostalgia");
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,6 +3,7 @@ package com.hbm.items.armor;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.handler.ArmorModHandler;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.render.model.ModelM65;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
@ -21,6 +22,7 @@ public class ItemModGasmask extends ItemArmorMod {
|
||||
|
||||
private ModelM65 modelM65;
|
||||
private ResourceLocation tex = new ResourceLocation("hbm:textures/models/ModelM65.png");
|
||||
private ResourceLocation tex_mono = new ResourceLocation("hbm:textures/models/ModelM65Mono.png");
|
||||
|
||||
public ItemModGasmask() {
|
||||
super(ArmorModHandler.helmet_only, true, false, false, false);
|
||||
@ -28,14 +30,23 @@ public class ItemModGasmask extends ItemArmorMod {
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
|
||||
list.add(EnumChatFormatting.GREEN + "Gas protection");
|
||||
|
||||
if(this == ModItems.attachment_mask)
|
||||
list.add(EnumChatFormatting.GREEN + "Gas protection");
|
||||
if(this == ModItems.attachment_mask_mono)
|
||||
list.add(EnumChatFormatting.GREEN + "Carbon monoxide protection");
|
||||
|
||||
list.add("");
|
||||
super.addInformation(itemstack, player, list, bool);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addDesc(List list, ItemStack stack, ItemStack armor) {
|
||||
list.add(EnumChatFormatting.GREEN + " " + stack.getDisplayName() + " (gas protection)");
|
||||
|
||||
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)");
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -58,8 +69,12 @@ public class ItemModGasmask extends ItemArmorMod {
|
||||
float yaw = yawHead - yawOffset;
|
||||
float yawWrapped = MathHelper.wrapAngleTo180_float(yawHead - yawOffset);
|
||||
float pitch = player.rotationPitch;
|
||||
|
||||
if(this == ModItems.attachment_mask)
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(tex);
|
||||
if(this == ModItems.attachment_mask_mono)
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(tex_mono);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(tex);
|
||||
modelM65.render(event.entityPlayer, 0.0F, 0.0F, yawWrapped, yaw, pitch, 0.0625F);
|
||||
}
|
||||
|
||||
|
||||
@ -262,6 +262,18 @@ public class ItemSyringe extends Item {
|
||||
}
|
||||
}
|
||||
|
||||
if(this == ModItems.gas_mask_filter_mono && player.inventory.armorInventory[3] != null && player.inventory.armorInventory[3].getItem() == ModItems.gas_mask_mono) {
|
||||
if(!world.isRemote) {
|
||||
if(player.inventory.armorInventory[3].getItemDamage() == 0)
|
||||
return stack;
|
||||
|
||||
player.inventory.armorInventory[3].setItemDamage(0);
|
||||
|
||||
world.playSoundAtEntity(player, "hbm:item.gasmaskScrew", 1.0F, 1.0F);
|
||||
stack.stackSize--;
|
||||
}
|
||||
}
|
||||
|
||||
if(this == ModItems.jetpack_tank && player.inventory.armorInventory[2] != null) {
|
||||
|
||||
if(!world.isRemote) {
|
||||
@ -570,6 +582,9 @@ public class ItemSyringe extends Item {
|
||||
if(this == ModItems.gas_mask_filter) {
|
||||
list.add("Repairs worn gas mask");
|
||||
}
|
||||
if(this == ModItems.gas_mask_filter_mono) {
|
||||
list.add("Repairs worn monoxide mask");
|
||||
}
|
||||
if(this == ModItems.jetpack_tank) {
|
||||
list.add("Fills worn jetpack with up to 1000mB of kerosene");
|
||||
}
|
||||
|
||||
@ -97,19 +97,18 @@ public class ArmorUtil {
|
||||
public static boolean checkForAsbestos(EntityPlayer player) {
|
||||
|
||||
if(checkArmor(player, ModItems.asbestos_helmet, ModItems.asbestos_plate, ModItems.asbestos_legs, ModItems.asbestos_boots))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean checkForDigamma(EntityPlayer player) {
|
||||
|
||||
if(checkArmor(player, ModItems.fau_helmet, ModItems.fau_plate, ModItems.fau_legs, ModItems.fau_boots))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if(player.isPotionActive(HbmPotion.stability.id))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
@ -120,10 +119,7 @@ public class ArmorUtil {
|
||||
|
||||
if(armor[0] == null || armor[1] == null || armor[2] == null || armor[3] == null) return false;
|
||||
|
||||
if(isFaradayArmor(armor[0]) &&
|
||||
isFaradayArmor(armor[1]) &&
|
||||
isFaradayArmor(armor[2]) &&
|
||||
isFaradayArmor(armor[3]))
|
||||
if(isFaradayArmor(armor[0]) && isFaradayArmor(armor[1]) && isFaradayArmor(armor[2]) && isFaradayArmor(armor[3]))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
@ -239,6 +235,29 @@ public class ArmorUtil {
|
||||
return false;
|
||||
}
|
||||
|
||||
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(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))
|
||||
|
||||
@ -255,6 +255,7 @@ public class ContaminationUtil {
|
||||
NONE //not preventable
|
||||
}
|
||||
|
||||
@SuppressWarnings("incomplete-switch") //just shut up
|
||||
public static boolean contaminate(EntityLivingBase entity, HazardType hazard, ContaminationType cont, float amount) {
|
||||
|
||||
if(entity instanceof EntityPlayer) {
|
||||
@ -263,11 +264,12 @@ public class ContaminationUtil {
|
||||
|
||||
switch(cont) {
|
||||
case GAS: if(ArmorUtil.checkForGasMask(player)) return false; break;
|
||||
case GAS_NON_REACTIVE: if(ArmorUtil.checkForHaz2(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;
|
||||
case DIGAMMA: if(ArmorUtil.checkForDigamma(player)) return false; if(player.isPotionActive(HbmPotion.stability.id)) return false; break;
|
||||
case DIGAMMA: if(ArmorUtil.checkForDigamma(player)) return false; break;
|
||||
case DIGAMMA2: break;
|
||||
}
|
||||
|
||||
|
||||
@ -621,6 +621,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.australium_iii.name=Mark III Lebensverlängerer
|
||||
item.australium_iv.name=Mark IV Lebensverlängerer
|
||||
item.australium_v.name=Mark V Lebensverlängerer
|
||||
@ -1101,7 +1102,9 @@ 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_mono.name=Katalytischer Maskenfilter
|
||||
item.gas_mask_m65.name=M65-Z Gasmaske
|
||||
item.gas_mask_mono.name=Kohlenstoffmonoxidmaske
|
||||
item.gas_petroleum.name=Petroleumgastank
|
||||
item.geiger_counter.name=Mobiler Geigerzähler
|
||||
item.generator_front.name=Generatorfront
|
||||
|
||||
@ -621,6 +621,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.australium_iii.name=Mark III Life Extender
|
||||
item.australium_iv.name=Mark IV Life Extender
|
||||
item.australium_v.name=Mark V Life Extender
|
||||
@ -1101,7 +1102,9 @@ 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_mono.name=Catalytic Mask Filter
|
||||
item.gas_mask_m65.name=M65-Z Gas Mask
|
||||
item.gas_mask_mono.name=Carbon Monoxide Mask
|
||||
item.gas_petroleum.name=Petroleum Gas Tank
|
||||
item.geiger_counter.name=Handheld Geiger Counter
|
||||
item.generator_front.name=Generator Front
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user