mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
slight tweaks, DNT armor, digamma protection, mesothelioma
This commit is contained in:
parent
ebdc0e9ca2
commit
e2585760de
BIN
src/main/java/assets/hbm/textures/items/fau_boots.png
Normal file
BIN
src/main/java/assets/hbm/textures/items/fau_boots.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 175 B |
BIN
src/main/java/assets/hbm/textures/items/fau_helmet.png
Normal file
BIN
src/main/java/assets/hbm/textures/items/fau_helmet.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 323 B |
BIN
src/main/java/assets/hbm/textures/items/fau_legs.png
Normal file
BIN
src/main/java/assets/hbm/textures/items/fau_legs.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 248 B |
BIN
src/main/java/assets/hbm/textures/items/fau_plate.png
Normal file
BIN
src/main/java/assets/hbm/textures/items/fau_plate.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 336 B |
BIN
src/main/java/assets/hbm/textures/items/insert_doxium.png
Normal file
BIN
src/main/java/assets/hbm/textures/items/insert_doxium.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 276 B |
@ -2,9 +2,12 @@ package com.hbm.blocks.generic;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.util.ContaminationUtil;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
@ -19,6 +22,14 @@ public class BlockGasAsbestos extends BlockGasBase {
|
||||
world.spawnParticle("townaura", x + rand.nextFloat(), y + rand.nextFloat(), z + rand.nextFloat(), 0.0D, 0.0D, 0.0D);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEntityCollidedWithBlock(World world, int x, int y, int z, Entity entity) {
|
||||
|
||||
if(entity instanceof EntityLivingBase) {
|
||||
ContaminationUtil.applyAsbestos(entity, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ForgeDirection getFirstDirection(World world, int x, int y, int z) {
|
||||
|
||||
|
||||
@ -75,6 +75,8 @@ public abstract class BlockGasBase extends Block {
|
||||
public void updateTick(World world, int x, int y, int z, Random rand) {
|
||||
|
||||
if(!world.isRemote) {
|
||||
|
||||
world.scheduledUpdatesAreImmediate = false; //prevent recursive loop when some dumbass forgets to clean up immediate updating
|
||||
|
||||
if(!tryMove(world, x, y, z, getFirstDirection(world, x, y, z)))
|
||||
if(!tryMove(world, x, y, z, getSecondDirection(world, x, y, z)))
|
||||
|
||||
@ -50,6 +50,10 @@ public class ArmorRecipes {
|
||||
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 });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.dnt_boots, 1), new Object[] { " E", "E ", "E E", 'E', ModItems.ingot_dineutronium });
|
||||
|
||||
//Power armor
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.t45_helmet, 1), new Object[] { "PPC", "PBP", "IXI", 'P', ModItems.plate_armor_titanium, 'C', ModItems.circuit_targeting_tier3, 'I', ModItems.plate_polymer, 'X', ModItems.gas_mask_m65, 'B', ModItems.titanium_helmet });
|
||||
|
||||
@ -4,7 +4,6 @@ import java.util.UUID;
|
||||
|
||||
import com.hbm.lib.ModDamageSource;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.potion.HbmPotion;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
@ -25,6 +24,7 @@ public class HbmLivingProps implements IExtendedEntityProperties {
|
||||
/// VALS ///
|
||||
private float radiation;
|
||||
private float digamma;
|
||||
private int asbestos;
|
||||
|
||||
public HbmLivingProps(EntityLivingBase entity) {
|
||||
this.entity = entity;
|
||||
@ -69,12 +69,8 @@ public class HbmLivingProps implements IExtendedEntityProperties {
|
||||
return getData(entity).digamma;
|
||||
}
|
||||
|
||||
//TODO: move all the checking into the contamination util
|
||||
public static void setDigamma(EntityLivingBase entity, float digamma) {
|
||||
|
||||
if(entity.isPotionActive(HbmPotion.stability.id))
|
||||
return;
|
||||
|
||||
getData(entity).digamma = digamma;
|
||||
|
||||
float healthMod = (float)Math.pow(0.5, digamma) - 1F;
|
||||
@ -122,6 +118,25 @@ public class HbmLivingProps implements IExtendedEntityProperties {
|
||||
|
||||
data.setDigamma(entity, dRad);
|
||||
}
|
||||
|
||||
|
||||
/// ASBESTOS ///
|
||||
public static int getAsbestos(EntityLivingBase entity) {
|
||||
return getData(entity).asbestos;
|
||||
}
|
||||
|
||||
public static void setAsbestos(EntityLivingBase entity, int asbestos) {
|
||||
getData(entity).asbestos = asbestos;
|
||||
|
||||
if(asbestos <= 1000000) {
|
||||
getData(entity).asbestos = 0;
|
||||
entity.attackEntityFrom(ModDamageSource.asbestos, 1000);
|
||||
}
|
||||
}
|
||||
|
||||
public static void incrementAsbestos(EntityLivingBase entity, int asbestos) {
|
||||
setAsbestos(entity, getAsbestos(entity) + asbestos);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init(Entity entity, World world) { }
|
||||
@ -133,6 +148,7 @@ public class HbmLivingProps implements IExtendedEntityProperties {
|
||||
|
||||
props.setFloat("hfr_radiation", radiation);
|
||||
props.setFloat("hfr_digamma", digamma);
|
||||
props.setInteger("hfr_asbestos", asbestos);
|
||||
|
||||
nbt.setTag("HbmLivingProps", props);
|
||||
}
|
||||
@ -145,6 +161,25 @@ public class HbmLivingProps implements IExtendedEntityProperties {
|
||||
if(props != null) {
|
||||
radiation = props.getFloat("hfr_radiation");
|
||||
digamma = props.getFloat("hfr_digamma");
|
||||
asbestos = props.getInteger("hfr_asbestos");
|
||||
}
|
||||
}
|
||||
|
||||
public static class ContaminationEffect {
|
||||
|
||||
public float maxRad;
|
||||
public int maxTime;
|
||||
public int time;
|
||||
public boolean ignoreArmor;
|
||||
|
||||
public ContaminationEffect(float rad, int time, boolean ignoreArmor) {
|
||||
this.maxRad = rad;
|
||||
this.maxTime = this.time = time;
|
||||
this.ignoreArmor = ignoreArmor;
|
||||
}
|
||||
|
||||
public float getRad() {
|
||||
return maxRad * ((float)time / (float)maxTime);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1687,6 +1687,10 @@ public class ModItems {
|
||||
public static Item starmetal_plate;
|
||||
public static Item starmetal_legs;
|
||||
public static Item starmetal_boots;
|
||||
public static Item dnt_helmet;
|
||||
public static Item dnt_plate;
|
||||
public static Item dnt_legs;
|
||||
public static Item dnt_boots;
|
||||
public static Item ajr_helmet;
|
||||
public static Item ajr_plate;
|
||||
public static Item ajr_legs;
|
||||
@ -1848,6 +1852,7 @@ public class ModItems {
|
||||
public static Item insert_polonium;
|
||||
public static Item insert_era;
|
||||
public static Item insert_yharonite;
|
||||
public static Item insert_doxium;
|
||||
public static Item armor_polish;
|
||||
public static Item bandaid;
|
||||
public static Item serum;
|
||||
@ -2807,6 +2812,7 @@ public class ModItems {
|
||||
insert_polonium = new ItemModInsert(500, 0.9F, 1F, 0.95F, 0.9F).setUnlocalizedName("insert_polonium").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":insert_polonium");
|
||||
insert_era = new ItemModInsert(25, 0.5F, 1F, 0.25F, 1F).setUnlocalizedName("insert_era").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":insert_era");
|
||||
insert_yharonite = new ItemModInsert(9999, 0.01F, 1F, 1F, 1F).setUnlocalizedName("insert_yharonite").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":insert_yharonite");
|
||||
insert_doxium = new ItemModInsert(9999, 5.0F, 1F, 1F, 1F).setUnlocalizedName("insert_doxium").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":insert_doxium");
|
||||
armor_polish = new ItemModPolish().setUnlocalizedName("armor_polish").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":armor_polish");
|
||||
bandaid = new ItemModBandaid().setUnlocalizedName("bandaid").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":bandaid");
|
||||
serum = new ItemModSerum().setUnlocalizedName("serum").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":serum");
|
||||
@ -3925,6 +3931,14 @@ public class ModItems {
|
||||
starmetal_plate = new ArmorFSB(MainRegistry.aMatStarmetal, 7, 1, RefStrings.MODID + ":textures/armor/starmetal_1.png").cloneStats((ArmorFSB) starmetal_helmet).setUnlocalizedName("starmetal_plate").setTextureName(RefStrings.MODID + ":starmetal_plate");
|
||||
starmetal_legs = new ArmorFSB(MainRegistry.aMatStarmetal, 7, 2, RefStrings.MODID + ":textures/armor/starmetal_2.png").cloneStats((ArmorFSB) starmetal_helmet).setUnlocalizedName("starmetal_legs").setTextureName(RefStrings.MODID + ":starmetal_legs");
|
||||
starmetal_boots = new ArmorFSB(MainRegistry.aMatStarmetal, 7, 3, RefStrings.MODID + ":textures/armor/starmetal_1.png").cloneStats((ArmorFSB) starmetal_helmet).setUnlocalizedName("starmetal_boots").setTextureName(RefStrings.MODID + ":starmetal_boots");
|
||||
|
||||
ArmorMaterial aMatDNT = EnumHelper.addArmorMaterial("HBM_DNT_LOLOLOL", 3, new int[] { 1, 1, 1, 1 }, 0);
|
||||
aMatDNT.customCraftingMaterial = ModItems.ingot_dineutronium;
|
||||
dnt_helmet = new ArmorFSB(aMatDNT, 7, 0, RefStrings.MODID + ":textures/armor/dnt_1.png")
|
||||
.setMod(1.1F).setUnlocalizedName("dnt_helmet").setTextureName(RefStrings.MODID + ":dnt_helmet");
|
||||
dnt_plate = new ArmorFSB(aMatDNT, 7, 1, RefStrings.MODID + ":textures/armor/dnt_1.png").cloneStats((ArmorFSB) dnt_helmet).setUnlocalizedName("dnt_plate").setTextureName(RefStrings.MODID + ":dnt_plate");
|
||||
dnt_legs = new ArmorFSB(aMatDNT, 7, 2, RefStrings.MODID + ":textures/armor/dnt_2.png").cloneStats((ArmorFSB) dnt_helmet).setUnlocalizedName("dnt_legs").setTextureName(RefStrings.MODID + ":dnt_legs");
|
||||
dnt_boots = new ArmorFSB(aMatDNT, 7, 3, RefStrings.MODID + ":textures/armor/dnt_1.png").cloneStats((ArmorFSB) dnt_helmet).setUnlocalizedName("dnt_boots").setTextureName(RefStrings.MODID + ":dnt_boots");
|
||||
|
||||
ArmorMaterial aMatT45 = EnumHelper.addArmorMaterial("HBM_T45", 150, new int[] { 3, 8, 6, 3 }, 0);
|
||||
aMatT45.customCraftingMaterial = ModItems.plate_armor_titanium;
|
||||
@ -3935,6 +3949,7 @@ public class ModItems {
|
||||
.setHasHardLanding(true)
|
||||
.addEffect(new PotionEffect(Potion.damageBoost.id, 20, 0))
|
||||
.setBlastProtection(0.5F)
|
||||
.addResistance("monoxide", 0F)
|
||||
.addResistance("fall", 0)
|
||||
.setUnlocalizedName("t45_helmet").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":t45_helmet");
|
||||
t45_plate = new ArmorT45(aMatT45, 2, 1, 1000000, 10000, 1000, 5).cloneStats((ArmorFSB) t45_helmet).setUnlocalizedName("t45_plate").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":t45_plate");
|
||||
@ -3954,6 +3969,7 @@ public class ModItems {
|
||||
.setStep("hbm:step.metal")
|
||||
.setJump("hbm:step.iron_jump")
|
||||
.setFall("hbm:step.iron_land")
|
||||
.addResistance("monoxide", 0F)
|
||||
.addResistance("fall", 0).setUnlocalizedName("ajr_helmet").setTextureName(RefStrings.MODID + ":ajr_helmet");
|
||||
ajr_plate = new ArmorAJR(aMatAJR, 7, 1, RefStrings.MODID + ":textures/armor/starmetal_1.png", 2500000, 10000, 2000, 25).cloneStats((ArmorFSB) ajr_helmet).setUnlocalizedName("ajr_plate").setTextureName(RefStrings.MODID + ":ajr_plate");
|
||||
ajr_legs = new ArmorAJR(aMatAJR, 7, 2, RefStrings.MODID + ":textures/armor/starmetal_2.png", 2500000, 10000, 2000, 25).cloneStats((ArmorFSB) ajr_helmet).setUnlocalizedName("ajr_legs").setTextureName(RefStrings.MODID + ":ajr_legs");
|
||||
@ -3970,6 +3986,7 @@ public class ModItems {
|
||||
.setStep("hbm:step.metal")
|
||||
.setJump("hbm:step.iron_jump")
|
||||
.setFall("hbm:step.iron_land")
|
||||
.addResistance("monoxide", 0F)
|
||||
.addResistance("fall", 0).setUnlocalizedName("ajro_helmet").setTextureName(RefStrings.MODID + ":ajro_helmet");
|
||||
ajro_plate = new ArmorAJRO(aMatAJR, 7, 1, RefStrings.MODID + ":textures/armor/starmetal_1.png", 2500000, 10000, 2000, 25).cloneStats((ArmorFSB) ajro_helmet).setUnlocalizedName("ajro_plate").setTextureName(RefStrings.MODID + ":ajro_plate");
|
||||
ajro_legs = new ArmorAJRO(aMatAJR, 7, 2, RefStrings.MODID + ":textures/armor/starmetal_2.png", 2500000, 10000, 2000, 25).cloneStats((ArmorFSB) ajro_helmet).setUnlocalizedName("ajro_legs").setTextureName(RefStrings.MODID + ":ajro_legs");
|
||||
@ -4008,6 +4025,7 @@ public class ModItems {
|
||||
.setHasGeigerSound(true)
|
||||
.setHasCustomGeiger(true)
|
||||
.addResistance("fall", 0.5F)
|
||||
.addResistance("monoxide", 0F)
|
||||
.addResistance("onFire", 0F).setUnlocalizedName("hev_helmet").setTextureName(RefStrings.MODID + ":hev_helmet");
|
||||
hev_plate = new ArmorHEV(aMatHEV, 7, 1, RefStrings.MODID + ":textures/armor/starmetal_1.png", 1000000, 10000, 2500, 0).cloneStats((ArmorFSB) hev_helmet).setUnlocalizedName("hev_plate").setTextureName(RefStrings.MODID + ":hev_plate");
|
||||
hev_legs = new ArmorHEV(aMatHEV, 7, 2, RefStrings.MODID + ":textures/armor/starmetal_2.png", 1000000, 10000, 2500, 0).cloneStats((ArmorFSB) hev_helmet).setUnlocalizedName("hev_legs").setTextureName(RefStrings.MODID + ":hev_legs");
|
||||
@ -4028,7 +4046,8 @@ public class ModItems {
|
||||
.setStep("hbm:step.metal")
|
||||
.setJump("hbm:step.iron_jump")
|
||||
.setFall("hbm:step.iron_land")
|
||||
.addResistance("fall", 0.05F)
|
||||
.addResistance("fall", 0F)
|
||||
.addResistance("monoxide", 0F)
|
||||
.setFireproof(true).setUnlocalizedName("fau_helmet").setTextureName(RefStrings.MODID + ":fau_helmet");
|
||||
fau_plate = new ArmorDigamma(aMatFau, 7, 1, RefStrings.MODID + ":textures/armor/starmetal_1.png", 10000000, 10000, 2500, 0).cloneStats((ArmorFSB) fau_helmet).setUnlocalizedName("fau_plate").setTextureName(RefStrings.MODID + ":fau_plate");
|
||||
fau_legs = new ArmorDigamma(aMatFau, 7, 2, RefStrings.MODID + ":textures/armor/starmetal_2.png", 10000000, 10000, 2500, 0).cloneStats((ArmorFSB) fau_helmet).setUnlocalizedName("fau_legs").setTextureName(RefStrings.MODID + ":fau_legs");
|
||||
@ -6303,6 +6322,7 @@ public class ModItems {
|
||||
GameRegistry.registerItem(insert_polonium, insert_polonium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(insert_era, insert_era.getUnlocalizedName());
|
||||
GameRegistry.registerItem(insert_yharonite, insert_yharonite.getUnlocalizedName());
|
||||
GameRegistry.registerItem(insert_doxium, insert_doxium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(armor_polish, armor_polish.getUnlocalizedName());
|
||||
GameRegistry.registerItem(bandaid, bandaid.getUnlocalizedName());
|
||||
GameRegistry.registerItem(serum, serum.getUnlocalizedName());
|
||||
@ -6476,6 +6496,10 @@ public class ModItems {
|
||||
GameRegistry.registerItem(starmetal_plate, starmetal_plate.getUnlocalizedName());
|
||||
GameRegistry.registerItem(starmetal_legs, starmetal_legs.getUnlocalizedName());
|
||||
GameRegistry.registerItem(starmetal_boots, starmetal_boots.getUnlocalizedName());
|
||||
GameRegistry.registerItem(dnt_helmet, dnt_helmet.getUnlocalizedName());
|
||||
GameRegistry.registerItem(dnt_plate, dnt_plate.getUnlocalizedName());
|
||||
GameRegistry.registerItem(dnt_legs, dnt_legs.getUnlocalizedName());
|
||||
GameRegistry.registerItem(dnt_boots, dnt_boots.getUnlocalizedName());
|
||||
GameRegistry.registerItem(schrabidium_helmet, schrabidium_helmet.getUnlocalizedName());
|
||||
GameRegistry.registerItem(schrabidium_plate, schrabidium_plate.getUnlocalizedName());
|
||||
GameRegistry.registerItem(schrabidium_legs, schrabidium_legs.getUnlocalizedName());
|
||||
|
||||
@ -38,7 +38,7 @@ public class ItemModInsert extends ItemArmorMod {
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) {
|
||||
|
||||
if(damageMod != 1F)
|
||||
list.add(EnumChatFormatting.RED + "-" + Math.round((1F - damageMod) * 100) + "% damage");
|
||||
list.add(EnumChatFormatting.RED + (damageMod < 1 ? "-" : "+") + Math.abs(Math.round((1F - damageMod) * 100)) + "% damage");
|
||||
if(projectileMod != 1F)
|
||||
list.add(EnumChatFormatting.YELLOW + "-" + Math.round((1F - projectileMod) * 100) + "% projectile damage");
|
||||
if(explosionMod != 1F)
|
||||
@ -61,7 +61,7 @@ public class ItemModInsert extends ItemArmorMod {
|
||||
List<String> desc = new ArrayList();
|
||||
|
||||
if(damageMod != 1F)
|
||||
desc.add("-" + Math.round((1F - damageMod) * 100) + "% dmg");
|
||||
desc.add((damageMod < 1 ? "-" : "+") + Math.abs(Math.round((1F - damageMod) * 100)) + "% dmg");
|
||||
if(projectileMod != 1F)
|
||||
desc.add("-" + Math.round((1F - projectileMod) * 100) + "% proj");
|
||||
if(explosionMod != 1F)
|
||||
|
||||
@ -5,6 +5,7 @@ import java.util.List;
|
||||
import com.hbm.config.WeaponConfig;
|
||||
import com.hbm.entity.effect.EntityRagingVortex;
|
||||
import com.hbm.extprop.HbmLivingProps;
|
||||
import com.hbm.util.ContaminationUtil;
|
||||
import com.hbm.util.I18nUtil;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
@ -15,62 +16,62 @@ import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class ItemDigamma extends ItemRadioactive {
|
||||
|
||||
|
||||
int digamma;
|
||||
|
||||
public ItemDigamma(float radiation, int digamma) {
|
||||
super(radiation);
|
||||
this.digamma = digamma;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@Override
|
||||
public void onUpdate(ItemStack stack, World world, Entity entity, int i, boolean b) {
|
||||
super.onUpdate(stack, world, entity, i, b);
|
||||
|
||||
if(entity instanceof EntityPlayer) {
|
||||
|
||||
EntityPlayer player = (EntityPlayer) entity;
|
||||
HbmLivingProps.incrementDigamma(player, 1F / ((float) digamma));
|
||||
}
|
||||
}
|
||||
|
||||
super.onUpdate(stack, world, entity, i, b);
|
||||
|
||||
if(entity instanceof EntityPlayer) {
|
||||
|
||||
EntityPlayer player = (EntityPlayer) entity;
|
||||
ContaminationUtil.applyDigammaData(player, 1F / ((float) digamma));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) {
|
||||
|
||||
list.add(EnumChatFormatting.GOLD + I18nUtil.resolveKey("trait.hlParticle", "1.67*10³⁴a"));
|
||||
list.add(EnumChatFormatting.RED + I18nUtil.resolveKey("trait.hlPlayer", (digamma / 20F) + "s"));
|
||||
|
||||
|
||||
list.add("");
|
||||
super.addInformation(stack, player, list, bool);
|
||||
|
||||
float d = ((int)((1000F / digamma) * 10F)) / 10F;
|
||||
|
||||
|
||||
float d = ((int) ((1000F / digamma) * 10F)) / 10F;
|
||||
|
||||
list.add(EnumChatFormatting.RED + "[" + I18nUtil.resolveKey("trait.digamma") + "]");
|
||||
list.add(EnumChatFormatting.DARK_RED + "" + d + "mDRX/s");
|
||||
|
||||
|
||||
list.add(EnumChatFormatting.RED + "[" + I18nUtil.resolveKey("trait.drop") + "]");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onEntityItemUpdate(EntityItem entityItem) {
|
||||
if (entityItem != null) {
|
||||
|
||||
if (entityItem.onGround) {
|
||||
|
||||
if(entityItem != null) {
|
||||
|
||||
if(entityItem.onGround) {
|
||||
|
||||
if(WeaponConfig.dropSing) {
|
||||
EntityRagingVortex bl = new EntityRagingVortex(entityItem.worldObj, 10F);
|
||||
bl.posX = entityItem.posX ;
|
||||
bl.posY = entityItem.posY ;
|
||||
bl.posZ = entityItem.posZ ;
|
||||
entityItem.worldObj.spawnEntityInWorld(bl);
|
||||
EntityRagingVortex bl = new EntityRagingVortex(entityItem.worldObj, 10F);
|
||||
bl.posX = entityItem.posX;
|
||||
bl.posY = entityItem.posY;
|
||||
bl.posZ = entityItem.posZ;
|
||||
entityItem.worldObj.spawnEntityInWorld(bl);
|
||||
}
|
||||
|
||||
|
||||
entityItem.setDead();
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@ -50,6 +50,7 @@ public class ModDamageSource extends DamageSource {
|
||||
public static DamageSource spikes = (new DamageSource("spikes")).setDamageBypassesArmor();
|
||||
public static DamageSource lunar = (new DamageSource("lunar")).setDamageIsAbsolute().setDamageBypassesArmor();
|
||||
public static DamageSource monoxide = (new DamageSource("monoxide")).setDamageIsAbsolute().setDamageBypassesArmor();
|
||||
public static DamageSource asbestos = (new DamageSource("asbestos")).setDamageIsAbsolute().setDamageBypassesArmor();
|
||||
|
||||
public ModDamageSource(String p_i1566_1_) {
|
||||
super(p_i1566_1_);
|
||||
|
||||
@ -103,6 +103,16 @@ public class ArmorUtil {
|
||||
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;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean checkForFaraday(EntityPlayer player) {
|
||||
|
||||
ItemStack[] armor = player.inventory.armorInventory;
|
||||
|
||||
@ -38,6 +38,7 @@ public class ContaminationUtil {
|
||||
return 1;
|
||||
}
|
||||
|
||||
/// RADIATION ///
|
||||
public static void applyRadData(Entity e, float f) {
|
||||
|
||||
if(!(e instanceof EntityLivingBase))
|
||||
@ -91,6 +92,72 @@ public class ContaminationUtil {
|
||||
return HbmLivingProps.getRadiation(entity);
|
||||
}
|
||||
|
||||
/// ASBESTOS ///
|
||||
public static void applyAsbestos(Entity e, int i) {
|
||||
|
||||
if(!(e instanceof EntityLivingBase))
|
||||
return;
|
||||
|
||||
if(e instanceof IRadiationImmune)
|
||||
return;
|
||||
|
||||
if(e instanceof EntityPlayer && ((EntityPlayer)e).capabilities.isCreativeMode)
|
||||
return;
|
||||
|
||||
if(e instanceof EntityPlayer && e.ticksExisted < 200)
|
||||
return;
|
||||
|
||||
EntityLivingBase entity = (EntityLivingBase)e;
|
||||
|
||||
if(!(entity instanceof EntityPlayer && ArmorUtil.checkForGasMask((EntityPlayer) entity)))
|
||||
HbmLivingProps.incrementAsbestos(entity, i);
|
||||
}
|
||||
|
||||
/// DIGAMMA ///
|
||||
public static void applyDigammaData(Entity e, float f) {
|
||||
|
||||
if(!(e instanceof EntityLivingBase))
|
||||
return;
|
||||
|
||||
if(e instanceof EntityPlayer && ((EntityPlayer)e).capabilities.isCreativeMode)
|
||||
return;
|
||||
|
||||
if(e instanceof EntityPlayer && e.ticksExisted < 200)
|
||||
return;
|
||||
|
||||
EntityLivingBase entity = (EntityLivingBase)e;
|
||||
|
||||
if(entity.isPotionActive(HbmPotion.stability.id))
|
||||
return;
|
||||
|
||||
if(!(entity instanceof EntityPlayer && ArmorUtil.checkForDigamma((EntityPlayer) entity)))
|
||||
HbmLivingProps.incrementDigamma(entity, f);
|
||||
}
|
||||
|
||||
public static void applyDigammaDirect(Entity e, float f) {
|
||||
|
||||
if(!(e instanceof EntityLivingBase))
|
||||
return;
|
||||
|
||||
if(e instanceof IRadiationImmune)
|
||||
return;
|
||||
|
||||
if(e instanceof EntityPlayer && ((EntityPlayer)e).capabilities.isCreativeMode)
|
||||
return;
|
||||
|
||||
EntityLivingBase entity = (EntityLivingBase)e;
|
||||
HbmLivingProps.incrementDigamma(entity, f);
|
||||
}
|
||||
|
||||
public static float getDigamma(Entity e) {
|
||||
|
||||
if(!(e instanceof EntityLivingBase))
|
||||
return 0.0F;
|
||||
|
||||
EntityLivingBase entity = (EntityLivingBase)e;
|
||||
return HbmLivingProps.getDigamma(entity);
|
||||
}
|
||||
|
||||
public static void printGeigerData(EntityPlayer player) {
|
||||
|
||||
World world = player.worldObj;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user