NEI SILEX handler, rebalanced hazmats, liquidator suit, more block rads

This commit is contained in:
Bob 2021-03-28 02:35:25 +01:00
parent 3d989eaa8b
commit fe3a1adfea
69 changed files with 1114 additions and 775 deletions

View File

@ -1042,8 +1042,8 @@ public class ModBlocks {
block_steel = new BlockGeneric(Material.iron).setBlockName("block_steel").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeMetal).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_steel");
block_lead = new BlockGeneric(Material.iron).setBlockName("block_lead").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeMetal).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_lead");
block_trinitite = new BlockHazard().addRadiation(ItemHazard.trn * ItemHazard.block).toBlock().setBlockName("block_trinitite").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_trinitite");
block_waste = new BlockNuclearWaste(Material.iron, 5F, 60F).setBlockName("block_waste").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_waste");
block_waste_painted = new BlockNuclearWaste(Material.iron, 5F, 60F).setBlockName("block_waste_painted").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_waste_painted");
block_waste = new BlockNuclearWaste().setDisplayEffect(ExtDisplayEffect.RADFOG).addRadiation(ItemHazard.wst * ItemHazard.block).toBlock().setBlockName("block_waste").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_waste");
block_waste_painted = new BlockNuclearWaste().setDisplayEffect(ExtDisplayEffect.RADFOG).addRadiation(ItemHazard.wst * ItemHazard.block).toBlock().setBlockName("block_waste_painted").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_waste_painted");
ancient_scrap = new BlockOutgas(Material.iron, true, 1, true, true).addRadiation(150F).toBlock().setBlockName("ancient_scrap").setCreativeTab(MainRegistry.blockTab).setHardness(100.0F).setResistance(6000.0F).setBlockTextureName(RefStrings.MODID + ":ancient_scrap");
block_scrap = new BlockFalling(Material.sand).setBlockName("block_scrap").setCreativeTab(MainRegistry.blockTab).setHardness(2.5F).setResistance(5.0F).setStepSound(Block.soundTypeGravel).setBlockTextureName(RefStrings.MODID + ":block_scrap");
block_electrical_scrap = new BlockFalling(Material.iron).setBlockName("block_electrical_scrap").setCreativeTab(MainRegistry.blockTab).setHardness(2.5F).setResistance(5.0F).setStepSound(Block.soundTypeMetal).setBlockTextureName(RefStrings.MODID + ":electrical_scrap_alt2");
@ -1226,7 +1226,7 @@ public class ModBlocks {
nuke_solinium = new NukeSolinium(Material.iron).setBlockName("nuke_solinium").setCreativeTab(MainRegistry.nukeTab).setHardness(5.0F).setResistance(6000.0F).setBlockTextureName(RefStrings.MODID + ":nuke_solinium");
nuke_n2 = new NukeN2(Material.iron).setBlockName("nuke_n2").setCreativeTab(MainRegistry.nukeTab).setHardness(5.0F).setResistance(6000.0F).setBlockTextureName(RefStrings.MODID + ":nuke_n2");
nuke_n45 = new NukeN45(Material.iron).setBlockName("nuke_n45").setCreativeTab(MainRegistry.nukeTab).setHardness(5.0F).setResistance(6000.0F).setBlockTextureName(RefStrings.MODID + ":code");
nuke_fstbmb = new NukeBalefire(Material.iron, guiID_nuke_fstbmb).addDigamma(0.1F).toBlock().setBlockName("nuke_fstbmb").setCreativeTab(MainRegistry.nukeTab).setHardness(5.0F).setResistance(6000.0F).setBlockTextureName(RefStrings.MODID + ":nuke_fstbmb");
nuke_fstbmb = new NukeBalefire(Material.iron, guiID_nuke_fstbmb).addDigamma(0.01F).toBlock().setBlockName("nuke_fstbmb").setCreativeTab(MainRegistry.nukeTab).setHardness(5.0F).setResistance(6000.0F).setBlockTextureName(RefStrings.MODID + ":nuke_fstbmb");
cel_prime = new CelPrime(Material.iron).setBlockName("cel_prime").setCreativeTab(null).setHardness(5.0F).setResistance(6000.0F).setBlockTextureName(RefStrings.MODID + ":code");
cel_prime_terminal = new CelPrimePart(Material.iron).setBlockName("cel_prime_terminal").setCreativeTab(null).setHardness(5.0F).setResistance(6000.0F).setBlockTextureName(RefStrings.MODID + ":code");
@ -1324,9 +1324,9 @@ public class ModBlocks {
machine_battery_potato = new MachineBattery(Material.iron, 10000).setBlockName("machine_battery_potato").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
machine_battery = new MachineBattery(Material.iron, 1000000).setBlockName("machine_battery").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
machine_lithium_battery = new MachineBattery(Material.iron, 15000000).setBlockName("machine_lithium_battery").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
machine_schrabidium_battery = new MachineBattery(Material.iron, 500000000).setBlockName("machine_schrabidium_battery").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
machine_dineutronium_battery = new MachineBattery(Material.iron, 150000000000L).setBlockName("machine_dineutronium_battery").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
machine_lithium_battery = new MachineBattery(Material.iron, 50000000).setBlockName("machine_lithium_battery").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
machine_schrabidium_battery = new MachineBattery(Material.iron, 25000000000L).setBlockName("machine_schrabidium_battery").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
machine_dineutronium_battery = new MachineBattery(Material.iron, 1000000000000L).setBlockName("machine_dineutronium_battery").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
machine_fensu = new MachineFENSU(Material.iron).setBlockName("machine_fensu").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_fensu");
machine_coal_off = new MachineCoal(false).setBlockName("machine_coal_off").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);

View File

@ -25,6 +25,7 @@ public class BlockFallout extends Block implements IItemHazard {
public BlockFallout(Material mat) {
super(mat);
this.module = new ItemHazardModule();
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.125F, 1.0F);
}

View File

@ -3,6 +3,7 @@ package com.hbm.blocks.generic;
import java.util.Random;
import com.hbm.interfaces.IItemHazard;
import com.hbm.main.MainRegistry;
import com.hbm.modules.ItemHazardModule;
import com.hbm.saveddata.RadiationSavedData;
@ -10,6 +11,7 @@ import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
@ -25,6 +27,11 @@ public class BlockHazard extends Block implements IItemHazard {
this(Material.iron);
}
public BlockHazard(Material mat) {
super(mat);
this.module = new ItemHazardModule();
}
public BlockHazard setDisplayEffect(ExtDisplayEffect extEffect) {
this.extEffect = extEffect;
return this;
@ -39,61 +46,14 @@ public class BlockHazard extends Block implements IItemHazard {
switch(extEffect) {
case RADFOG:
for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
if(dir == ForgeDirection.DOWN)
continue;
if(world.getBlock(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ).getMaterial() == Material.air) {
double ix = x + 0.5F + dir.offsetX + rand.nextDouble() - 0.5D;
double iy = y + 0.5F + dir.offsetY + rand.nextDouble() - 0.5D;
double iz = z + 0.5F + dir.offsetZ + rand.nextDouble() - 0.5D;
if(dir.offsetX != 0)
ix = x + 0.5F + dir.offsetX * 0.5 + rand.nextDouble() * 0.25 * dir.offsetX;
if(dir.offsetY != 0)
iy = y + 0.5F + dir.offsetY * 0.5 + rand.nextDouble() * 0.25 * dir.offsetY;
if(dir.offsetZ != 0)
iz = z + 0.5F + dir.offsetZ * 0.5 + rand.nextDouble() * 0.25 * dir.offsetZ;
world.spawnParticle("townura", ix, iy, iz, 0.0, 0.0, 0.0);
}
}
break;
case SCHRAB:
case FLAMES:
sPart(world, x, y, z, rand);
break;
case SPARKS:
break;
case FLAMES:
for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
if(dir == ForgeDirection.DOWN)
continue;
if(world.getBlock(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ).getMaterial() == Material.air) {
double ix = x + 0.5F + dir.offsetX + rand.nextDouble() - 0.5D;
double iy = y + 0.5F + dir.offsetY + rand.nextDouble() - 0.5D;
double iz = z + 0.5F + dir.offsetZ + rand.nextDouble() - 0.5D;
if(dir.offsetX != 0)
ix = x + 0.5F + dir.offsetX * 0.5 + rand.nextDouble() * 0.25 * dir.offsetX;
if(dir.offsetY != 0)
iy = y + 0.5F + dir.offsetY * 0.5 + rand.nextDouble() * 0.25 * dir.offsetY;
if(dir.offsetZ != 0)
iz = z + 0.5F + dir.offsetZ * 0.5 + rand.nextDouble() * 0.25 * dir.offsetZ;
world.spawnParticle("flame", ix, iy, iz, 0.0, 0.0, 0.0);
world.spawnParticle("smoke", ix, iy, iz, 0.0, 0.0, 0.0);
world.spawnParticle("smoke", ix, iy, iz, 0.0, 0.1, 0.0);
}
}
break;
case LAVAPOP:
world.spawnParticle("lava", x + rand.nextFloat(), y + 1.1F, z + rand.nextFloat(), 0.0D, 0.0D, 0.0D);
break;
@ -102,9 +62,44 @@ public class BlockHazard extends Block implements IItemHazard {
}
}
public BlockHazard(Material mat) {
super(mat);
this.module = new ItemHazardModule();
private void sPart(World world, int x, int y, int z, Random rand) {
for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
if(dir == ForgeDirection.DOWN && this.extEffect == ExtDisplayEffect.FLAMES)
continue;
if(world.getBlock(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ).getMaterial() == Material.air) {
double ix = x + 0.5F + dir.offsetX + rand.nextDouble() * 3 - 1.5D;
double iy = y + 0.5F + dir.offsetY + rand.nextDouble() * 3 - 1.5D;
double iz = z + 0.5F + dir.offsetZ + rand.nextDouble() * 3 - 1.5D;
if(dir.offsetX != 0)
ix = x + 0.5F + dir.offsetX * 0.5 + rand.nextDouble() * dir.offsetX;
if(dir.offsetY != 0)
iy = y + 0.5F + dir.offsetY * 0.5 + rand.nextDouble() * dir.offsetY;
if(dir.offsetZ != 0)
iz = z + 0.5F + dir.offsetZ * 0.5 + rand.nextDouble() * dir.offsetZ;
if(this.extEffect == ExtDisplayEffect.RADFOG) {
world.spawnParticle("townaura", ix, iy, iz, 0.0, 0.0, 0.0);
}
if(this.extEffect == ExtDisplayEffect.SCHRAB) {
NBTTagCompound data = new NBTTagCompound();
data.setString("type", "schrabfog");
data.setDouble("posX", ix);
data.setDouble("posY", iy);
data.setDouble("posZ", iz);
MainRegistry.proxy.effectNT(data);
}
if(this.extEffect == ExtDisplayEffect.FLAMES) {
world.spawnParticle("flame", ix, iy, iz, 0.0, 0.0, 0.0);
world.spawnParticle("smoke", ix, iy, iz, 0.0, 0.0, 0.0);
world.spawnParticle("smoke", ix, iy, iz, 0.0, 0.1, 0.0);
}
}
}
}
@Override
@ -115,8 +110,8 @@ public class BlockHazard extends Block implements IItemHazard {
@Override
public IItemHazard addRadiation(float radiation) {
this.getModule().addRadiation(radiation);
this.radIn = radiation;
this.radMax = radiation * 10;
this.radIn = radiation * 0.1F;
this.radMax = radiation;
return this;
}

View File

@ -4,16 +4,11 @@ import java.util.Random;
import com.hbm.blocks.ModBlocks;
import net.minecraft.block.material.Material;
import net.minecraft.init.Blocks;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
public class BlockNuclearWaste extends BlockOre {
public BlockNuclearWaste(Material mat, float rad, float max) {
super(mat, rad, max);
}
public class BlockNuclearWaste extends BlockHazard {
@Override
public void updateTick(World world, int x, int y, int z, Random rand) {

View File

@ -4,13 +4,18 @@ import java.util.UUID;
import com.hbm.lib.ModDamageSource;
import com.hbm.main.MainRegistry;
import com.hbm.packet.AuxParticlePacketNT;
import com.hbm.packet.PacketDispatcher;
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
import net.minecraft.block.Block;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.ai.attributes.AttributeModifier;
import net.minecraft.entity.ai.attributes.IAttributeInstance;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
import net.minecraftforge.common.IExtendedEntityProperties;
@ -92,6 +97,13 @@ public class HbmLivingProps implements IExtendedEntityProperties {
entity.attackEntityFrom(ModDamageSource.digamma, 500F);
entity.setHealth(0);
entity.onDeath(ModDamageSource.digamma);
NBTTagCompound data = new NBTTagCompound();
data.setString("type", "sweat");
data.setInteger("count", 50);
data.setInteger("block", Block.getIdFromBlock(Blocks.soul_sand));
data.setInteger("entity", entity.getEntityId());
PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data, 0, 0, 0), new TargetPoint(entity.dimension, entity.posX, entity.posY, entity.posZ, 50));
}
if(entity instanceof EntityPlayer) {

View File

@ -26,6 +26,13 @@ public class ArmorModHandler {
UUID.fromString("426ee0d0-7587-4697-aaef-4772ab202e78")
};
public static final UUID[] fixedUUIDs = new UUID[] {
UUID.fromString("e572caf4-3e65-4152-bc79-c4d4048cbd29"),
UUID.fromString("bed30902-8a6a-4769-9f65-2a9b67469fff"),
UUID.fromString("baebf7b3-1eda-4a14-b233-068e2493e9a2"),
UUID.fromString("28016c1b-d992-4324-9409-a9f9f0ffb85c")
};
//The key for the NBTTagCompound that holds the armor mods
public static final String MOD_COMPOUND_KEY = "ntm_armor_mods";
//The key for the specific slot inside the armor mod NBT Tag

View File

@ -1,5 +1,7 @@
package com.hbm.handler;
import java.util.Random;
import com.hbm.config.RadiationConfig;
import com.hbm.extprop.HbmLivingProps;
import com.hbm.main.MainRegistry;
@ -67,7 +69,9 @@ public class EntityEffectHandler {
ContaminationUtil.applyRadData(entity, RadiationConfig.cont * 0.0005F);
}
if(HbmLivingProps.getRadiation(entity) > 600 && world.getTotalWorldTime() % 600 == 0) {
Random rand = new Random(entity.getEntityId());
if(HbmLivingProps.getRadiation(entity) > 600 && (world.getTotalWorldTime() + rand.nextInt(600)) % 600 == 0) {
NBTTagCompound nbt = new NBTTagCompound();
nbt.setString("type", "bloodvomit");
@ -76,7 +80,7 @@ public class EntityEffectHandler {
world.playSoundEffect(ix, iy, iz, "hbm:entity.vomit", 1.0F, 1.0F);
entity.addPotionEffect(new PotionEffect(Potion.hunger.id, 60, 19));
} else if(HbmLivingProps.getRadiation(entity) > 200 && world.getTotalWorldTime() % 1200 == 0) {
} else if(HbmLivingProps.getRadiation(entity) > 200 && (world.getTotalWorldTime() + rand.nextInt(1200)) % 1200 == 0) {
NBTTagCompound nbt = new NBTTagCompound();
nbt.setString("type", "vomit");
@ -88,7 +92,7 @@ public class EntityEffectHandler {
}
if(HbmLivingProps.getRadiation(entity) > 900 && world.getTotalWorldTime() % 10 == 0) {
if(HbmLivingProps.getRadiation(entity) > 900 && (world.getTotalWorldTime() + rand.nextInt(10)) % 10 == 0) {
NBTTagCompound nbt = new NBTTagCompound();
nbt.setString("type", "sweat");

View File

@ -2,31 +2,189 @@ package com.hbm.handler;
import java.util.HashMap;
import com.hbm.items.ModItems;
import com.hbm.items.armor.ItemModCladding;
import com.hbm.lib.Library;
import com.hbm.potion.HbmPotion;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
public class HazmatRegistry {
private static HashMap<Item, Float> entries = new HashMap();
public static void registerHazmats() {
public static void registerHazmat(Item item, float resistance) {
//assuming coefficient of 10
//real coefficient turned out to be 5
//oops
double helmet = 0.2D;
double chest = 0.4D;
double legs = 0.3D;
double boots = 0.1D;
double iron = 0.0225D; // 5%
double gold = 0.0225D; // 5%
double steel = 0.045D; // 10%
double titanium = 0.045D; // 10%
double alloy = 0.07D; // 15%
double cobalt = 0.125D; // 25%
double hazYellow = 0.3D; // 50%
double hazRed = 0.7D; // 80%
double hazGray = 1.3D; // 95%
double paa = 2D; // 99%
double liquidator = 3D; // 99.9%
double t45 = 1D; // 90%
double ajr = 2D; // 99%
double bj = 1.3D; // 95%
double hev = 2.3D; // 99.5%
double fau = 4D; // 99.99%
double security = 0.825D; // 85%
double star = 1.3D; // 95%
double cmb = 2D; // 99%
double schrab = 2.3D; // 99.5%
double euph = 10D; // <100%
HazmatRegistry.registerHazmat(ModItems.hazmat_helmet, hazYellow * helmet);
HazmatRegistry.registerHazmat(ModItems.hazmat_plate, hazYellow * chest);
HazmatRegistry.registerHazmat(ModItems.hazmat_legs, hazYellow * legs);
HazmatRegistry.registerHazmat(ModItems.hazmat_boots, hazYellow * boots);
HazmatRegistry.registerHazmat(ModItems.hazmat_helmet_red, hazRed * helmet);
HazmatRegistry.registerHazmat(ModItems.hazmat_plate_red, hazRed * chest);
HazmatRegistry.registerHazmat(ModItems.hazmat_legs_red, hazRed * legs);
HazmatRegistry.registerHazmat(ModItems.hazmat_boots_red, hazRed * boots);
HazmatRegistry.registerHazmat(ModItems.hazmat_helmet_grey, hazGray * helmet);
HazmatRegistry.registerHazmat(ModItems.hazmat_plate_grey, hazGray * chest);
HazmatRegistry.registerHazmat(ModItems.hazmat_legs_grey, hazGray * legs);
HazmatRegistry.registerHazmat(ModItems.hazmat_boots_grey, hazGray * boots);
HazmatRegistry.registerHazmat(ModItems.liquidator_helmet, liquidator * helmet);
HazmatRegistry.registerHazmat(ModItems.liquidator_plate, liquidator * chest);
HazmatRegistry.registerHazmat(ModItems.liquidator_legs, liquidator * legs);
HazmatRegistry.registerHazmat(ModItems.liquidator_boots, liquidator * boots);
HazmatRegistry.registerHazmat(ModItems.t45_helmet, t45 * helmet);
HazmatRegistry.registerHazmat(ModItems.t45_plate, t45 * chest);
HazmatRegistry.registerHazmat(ModItems.t45_legs, t45 * legs);
HazmatRegistry.registerHazmat(ModItems.t45_boots, t45 * boots);
HazmatRegistry.registerHazmat(ModItems.ajr_helmet, ajr * helmet);
HazmatRegistry.registerHazmat(ModItems.ajr_plate, ajr * chest);
HazmatRegistry.registerHazmat(ModItems.ajr_legs, ajr * legs);
HazmatRegistry.registerHazmat(ModItems.ajr_boots, ajr * boots);
HazmatRegistry.registerHazmat(ModItems.ajro_helmet, ajr * helmet);
HazmatRegistry.registerHazmat(ModItems.ajro_plate, ajr * chest);
HazmatRegistry.registerHazmat(ModItems.ajro_legs, ajr * legs);
HazmatRegistry.registerHazmat(ModItems.ajro_boots, ajr * boots);
HazmatRegistry.registerHazmat(ModItems.bj_helmet, bj * helmet);
HazmatRegistry.registerHazmat(ModItems.bj_plate, bj * chest);
HazmatRegistry.registerHazmat(ModItems.bj_plate_jetpack, bj * chest);
HazmatRegistry.registerHazmat(ModItems.bj_legs, bj * legs);
HazmatRegistry.registerHazmat(ModItems.bj_boots, bj * boots);
HazmatRegistry.registerHazmat(ModItems.hev_helmet, hev * helmet);
HazmatRegistry.registerHazmat(ModItems.hev_plate, hev * chest);
HazmatRegistry.registerHazmat(ModItems.hev_legs, hev * legs);
HazmatRegistry.registerHazmat(ModItems.hev_boots, hev * boots);
HazmatRegistry.registerHazmat(ModItems.fau_helmet, fau * helmet);
HazmatRegistry.registerHazmat(ModItems.fau_plate, fau * chest);
HazmatRegistry.registerHazmat(ModItems.fau_legs, fau * legs);
HazmatRegistry.registerHazmat(ModItems.fau_boots, fau * boots);
HazmatRegistry.registerHazmat(ModItems.paa_plate, paa * chest);
HazmatRegistry.registerHazmat(ModItems.paa_legs, paa * legs);
HazmatRegistry.registerHazmat(ModItems.paa_boots, paa * boots);
HazmatRegistry.registerHazmat(ModItems.hazmat_paa_helmet, paa * helmet);
HazmatRegistry.registerHazmat(ModItems.hazmat_paa_plate, paa * chest);
HazmatRegistry.registerHazmat(ModItems.hazmat_paa_legs, paa * legs);
HazmatRegistry.registerHazmat(ModItems.hazmat_paa_boots, paa * boots);
HazmatRegistry.registerHazmat(ModItems.security_helmet, security * helmet);
HazmatRegistry.registerHazmat(ModItems.security_plate, security * chest);
HazmatRegistry.registerHazmat(ModItems.security_legs, security * legs);
HazmatRegistry.registerHazmat(ModItems.security_boots, security * boots);
HazmatRegistry.registerHazmat(ModItems.starmetal_helmet, star * helmet);
HazmatRegistry.registerHazmat(ModItems.starmetal_plate, star * chest);
HazmatRegistry.registerHazmat(ModItems.starmetal_legs, star * legs);
HazmatRegistry.registerHazmat(ModItems.starmetal_boots, star * boots);
HazmatRegistry.registerHazmat(ModItems.jackt, 0.1);
HazmatRegistry.registerHazmat(ModItems.jackt2, 0.1);
HazmatRegistry.registerHazmat(ModItems.gas_mask, 0.07);
HazmatRegistry.registerHazmat(ModItems.gas_mask_m65, 0.095);
HazmatRegistry.registerHazmat(ModItems.steel_helmet, steel * helmet);
HazmatRegistry.registerHazmat(ModItems.steel_plate, steel * chest);
HazmatRegistry.registerHazmat(ModItems.steel_legs, steel * legs);
HazmatRegistry.registerHazmat(ModItems.steel_boots, steel * boots);
HazmatRegistry.registerHazmat(ModItems.titanium_helmet, titanium * helmet);
HazmatRegistry.registerHazmat(ModItems.titanium_plate, titanium * chest);
HazmatRegistry.registerHazmat(ModItems.titanium_legs, titanium * legs);
HazmatRegistry.registerHazmat(ModItems.titanium_boots, titanium * boots);
HazmatRegistry.registerHazmat(ModItems.cobalt_helmet, cobalt * helmet);
HazmatRegistry.registerHazmat(ModItems.cobalt_plate, cobalt * chest);
HazmatRegistry.registerHazmat(ModItems.cobalt_legs, cobalt * legs);
HazmatRegistry.registerHazmat(ModItems.cobalt_boots, cobalt * boots);
HazmatRegistry.registerHazmat(Items.iron_helmet, iron * helmet);
HazmatRegistry.registerHazmat(Items.iron_chestplate, iron * chest);
HazmatRegistry.registerHazmat(Items.iron_leggings, iron * legs);
HazmatRegistry.registerHazmat(Items.iron_boots, iron * boots);
HazmatRegistry.registerHazmat(Items.golden_helmet, gold * helmet);
HazmatRegistry.registerHazmat(Items.golden_chestplate, gold * chest);
HazmatRegistry.registerHazmat(Items.golden_leggings, gold * legs);
HazmatRegistry.registerHazmat(Items.golden_boots, gold * boots);
HazmatRegistry.registerHazmat(ModItems.alloy_helmet, alloy * helmet);
HazmatRegistry.registerHazmat(ModItems.alloy_plate, alloy * chest);
HazmatRegistry.registerHazmat(ModItems.alloy_legs, alloy * legs);
HazmatRegistry.registerHazmat(ModItems.alloy_boots, alloy * boots);
HazmatRegistry.registerHazmat(ModItems.cmb_helmet, cmb * helmet);
HazmatRegistry.registerHazmat(ModItems.cmb_plate, cmb * chest);
HazmatRegistry.registerHazmat(ModItems.cmb_legs, cmb * legs);
HazmatRegistry.registerHazmat(ModItems.cmb_boots, cmb * boots);
HazmatRegistry.registerHazmat(ModItems.schrabidium_helmet, schrab * helmet);
HazmatRegistry.registerHazmat(ModItems.schrabidium_plate, schrab * chest);
HazmatRegistry.registerHazmat(ModItems.schrabidium_legs, schrab * legs);
HazmatRegistry.registerHazmat(ModItems.schrabidium_boots, schrab * boots);
HazmatRegistry.registerHazmat(ModItems.euphemium_helmet, euph * helmet);
HazmatRegistry.registerHazmat(ModItems.euphemium_plate, euph * chest);
HazmatRegistry.registerHazmat(ModItems.euphemium_legs, euph * legs);
HazmatRegistry.registerHazmat(ModItems.euphemium_boots, euph * boots);
}
private static HashMap<Item, Double> entries = new HashMap();
public static void registerHazmat(Item item, double resistance) {
entries.put(item, resistance);
}
public static float getResistance(ItemStack stack) {
public static double getResistance(ItemStack stack) {
if(stack == null)
return 0;
float cladding = getCladding(stack);
double cladding = getCladding(stack);
Float f = entries.get(stack.getItem());
Double f = entries.get(stack.getItem());
if(f != null)
return f + cladding;
@ -34,7 +192,7 @@ public class HazmatRegistry {
return cladding;
}
public static float getCladding(ItemStack stack) {
public static double getCladding(ItemStack stack) {
if(stack.hasTagCompound() && stack.stackTagCompound.getFloat("hfr_cladding") > 0)
return stack.stackTagCompound.getFloat("hfr_cladding");

View File

@ -247,7 +247,7 @@ public abstract class WeaponAbility {
if(world.rand.nextInt(20) == 0)
living.entityDropItem(new ItemStack(Items.skull, 1, 1), 0.0F);
else
living.entityDropItem(new ItemStack(Items.coal, 1, 3), 0.0F);
living.entityDropItem(new ItemStack(Items.coal, 3), 0.0F);
}
} else if(living instanceof EntityZombie) {

View File

@ -64,7 +64,7 @@ public class AssemblerRecipeHandler extends TemplateRecipeHandler {
@Override
public String getGuiTexture() {
return RefStrings.MODID + ":textures/gui/gui_nei_assembler.png";
return RefStrings.MODID + ":textures/gui/nei/gui_nei_assembler.png";
}
@Override

View File

@ -52,7 +52,7 @@ public class BoilerRecipeHandler extends TemplateRecipeHandler {
@Override
public String getGuiTexture() {
return RefStrings.MODID + ":textures/gui/gui_nei_boiler.png";
return RefStrings.MODID + ":textures/gui/nei/gui_nei_boiler.png";
}
@Override

View File

@ -54,7 +54,7 @@ public class CMBFurnaceRecipeHandler extends TemplateRecipeHandler {
@Override
public String getGuiTexture() {
return RefStrings.MODID + ":textures/gui/gui_nei_cmb.png";
return RefStrings.MODID + ":textures/gui/nei/gui_nei_cmb.png";
}
@Override

View File

@ -89,7 +89,7 @@ public class ChemplantRecipeHandler extends TemplateRecipeHandler {
@Override
public String getGuiTexture() {
return RefStrings.MODID + ":textures/gui/gui_nei_chemplant.png";
return RefStrings.MODID + ":textures/gui/nei/gui_nei_chemplant.png";
}
@Override

View File

@ -24,8 +24,7 @@ public class CrystallizerRecipeHandler extends TemplateRecipeHandler {
public static ArrayList<Fuel> batteries;
public class RecipeSet extends TemplateRecipeHandler.CachedRecipe
{
public class RecipeSet extends TemplateRecipeHandler.CachedRecipe {
PositionedStack input;
PositionedStack acid;
PositionedStack result;
@ -52,8 +51,7 @@ public class CrystallizerRecipeHandler extends TemplateRecipeHandler {
}
}
public static class Fuel
{
public static class Fuel {
public Fuel(ItemStack ingred) {
this.stack = new PositionedStack(ingred, 3, 42, false);

View File

@ -55,7 +55,7 @@ public class CyclotronRecipeHandler extends TemplateRecipeHandler {
@Override
public String getGuiTexture() {
return RefStrings.MODID + ":textures/gui/gui_nei_cyclotron.png";
return RefStrings.MODID + ":textures/gui/nei/gui_nei_cyclotron.png";
}
@Override

View File

@ -45,7 +45,7 @@ public class FluidRecipeHandler extends TemplateRecipeHandler {
@Override
public String getGuiTexture() {
return RefStrings.MODID + ":textures/gui/gui_nei_fluid.png";
return RefStrings.MODID + ":textures/gui/nei/gui_nei_fluid.png";
}
@Override

View File

@ -117,6 +117,6 @@ public class FusionRecipeHandler extends TemplateRecipeHandler {
@Override
public String getGuiTexture() {
return RefStrings.MODID + ":textures/gui/gui_nei_fusion.png";
return RefStrings.MODID + ":textures/gui/nei/gui_nei_fusion.png";
}
}

View File

@ -27,7 +27,7 @@ public class HadronRecipeHandler extends TemplateRecipeHandler {
public LinkedList<Class<? extends GuiContainer>> guiRec = new LinkedList<Class<? extends GuiContainer>>();
public LinkedList<Class<? extends GuiContainer>> guiGui = new LinkedList<Class<? extends GuiContainer>>();
public class SmeltingSet extends TemplateRecipeHandler.CachedRecipe {
public class RecipeSet extends TemplateRecipeHandler.CachedRecipe {
PositionedStack input1;
PositionedStack input2;
@ -36,7 +36,7 @@ public class HadronRecipeHandler extends TemplateRecipeHandler {
int momentum;
boolean analysisOnly;
public SmeltingSet(HadronRecipe recipe) {
public RecipeSet(HadronRecipe recipe) {
this.input1 = new PositionedStack(recipe.in1.toStack(), 12, 24);
this.input2 = new PositionedStack(recipe.in2.toStack(), 30, 24);
@ -75,7 +75,7 @@ public class HadronRecipeHandler extends TemplateRecipeHandler {
List<HadronRecipe> recipes = HadronRecipes.getRecipes();
for(HadronRecipe recipe : recipes) {
this.arecipes.add(new SmeltingSet(recipe));
this.arecipes.add(new RecipeSet(recipe));
}
} else {
@ -91,7 +91,7 @@ public class HadronRecipeHandler extends TemplateRecipeHandler {
for(HadronRecipe recipe : recipes) {
if(NEIServerUtils.areStacksSameTypeCrafting(recipe.out1, result) || NEIServerUtils.areStacksSameTypeCrafting(recipe.out2, result)) {
this.arecipes.add(new SmeltingSet(recipe));
this.arecipes.add(new RecipeSet(recipe));
}
}
}
@ -114,7 +114,7 @@ public class HadronRecipeHandler extends TemplateRecipeHandler {
for(HadronRecipe recipe : recipes) {
if(NEIServerUtils.areStacksSameTypeCrafting(recipe.in1.toStack(), ingredient) || NEIServerUtils.areStacksSameTypeCrafting(recipe.in2.toStack(), ingredient)) {
this.arecipes.add(new SmeltingSet(recipe));
this.arecipes.add(new RecipeSet(recipe));
}
}
}
@ -134,7 +134,7 @@ public class HadronRecipeHandler extends TemplateRecipeHandler {
@Override
public void drawExtras(int recipe) {
SmeltingSet rec = (SmeltingSet)this.arecipes.get(recipe);
RecipeSet rec = (RecipeSet) this.arecipes.get(recipe);
if(rec.analysisOnly)
drawTexturedModalRect(128, 23, 0, 86, 18, 18);
@ -147,6 +147,6 @@ public class HadronRecipeHandler extends TemplateRecipeHandler {
@Override
public String getGuiTexture() {
return RefStrings.MODID + ":textures/gui/gui_nei_hadron.png";
return RefStrings.MODID + ":textures/gui/nei/gui_nei_hadron.png";
}
}

View File

@ -26,8 +26,7 @@ public class PressRecipeHandler extends TemplateRecipeHandler {
public LinkedList<Class<? extends GuiContainer>> guiRec = new LinkedList<Class<? extends GuiContainer>>();
public LinkedList<Class<? extends GuiContainer>> guiGui = new LinkedList<Class<? extends GuiContainer>>();
public class SmeltingSet extends TemplateRecipeHandler.CachedRecipe
{
public class SmeltingSet extends TemplateRecipeHandler.CachedRecipe {
PositionedStack input;
PositionedStack result;
@ -63,8 +62,7 @@ public class PressRecipeHandler extends TemplateRecipeHandler {
}
}
public static class Fuel
{
public static class Fuel {
public Fuel(ItemStack ingred) {
this.stack = new PositionedStack(ingred, 83 - 35, 6, false);
@ -80,7 +78,7 @@ public class PressRecipeHandler extends TemplateRecipeHandler {
@Override
public String getGuiTexture() {
return RefStrings.MODID + ":textures/gui/gui_nei_press.png";
return RefStrings.MODID + ":textures/gui/nei/gui_nei_press.png";
}
@Override
@ -150,7 +148,8 @@ public class PressRecipeHandler extends TemplateRecipeHandler {
guiGui.add(GUIMachinePress.class);
guiGui.add(GUIMachineEPress.class);
RecipeTransferRectHandler.registerRectsToGuis(getRecipeTransferRectGuis(), transferRects);
//RecipeTransferRectHandler.registerRectsToGuis(guiRec, transferRectsRec);
// RecipeTransferRectHandler.registerRectsToGuis(guiRec,
// transferRectsRec);
RecipeTransferRectHandler.registerRectsToGuis(guiGui, transferRectsGui);
// for(Class<? extends GuiContainer> r : getRecipeTransferRectGuis())

View File

@ -23,8 +23,7 @@ public class RefineryRecipeHandler extends TemplateRecipeHandler {
public LinkedList<Class<? extends GuiContainer>> guiRec = new LinkedList<Class<? extends GuiContainer>>();
public LinkedList<Class<? extends GuiContainer>> guiGui = new LinkedList<Class<? extends GuiContainer>>();
public class SmeltingSet extends TemplateRecipeHandler.CachedRecipe
{
public class SmeltingSet extends TemplateRecipeHandler.CachedRecipe {
PositionedStack input;
PositionedStack result1;
PositionedStack result2;
@ -70,7 +69,7 @@ public class RefineryRecipeHandler extends TemplateRecipeHandler {
@Override
public String getGuiTexture() {
return RefStrings.MODID + ":textures/gui/gui_nei_refinery.png";
return RefStrings.MODID + ":textures/gui/nei/gui_nei_refinery.png";
}
@Override

View File

@ -0,0 +1,180 @@
package com.hbm.handler.nei;
import java.awt.Rectangle;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import com.hbm.inventory.SILEXRecipes;
import com.hbm.inventory.SILEXRecipes.SILEXRecipe;
import com.hbm.inventory.gui.GUISILEX;
import com.hbm.lib.RefStrings;
import com.hbm.util.WeightedRandomObject;
import codechicken.nei.NEIServerUtils;
import codechicken.nei.PositionedStack;
import codechicken.nei.recipe.TemplateRecipeHandler;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.FontRenderer;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.item.ItemStack;
public class SILEXRecipeHandler extends TemplateRecipeHandler {
public LinkedList<RecipeTransferRect> transferRectsRec = new LinkedList<RecipeTransferRect>();
public LinkedList<RecipeTransferRect> transferRectsGui = new LinkedList<RecipeTransferRect>();
public LinkedList<Class<? extends GuiContainer>> guiRec = new LinkedList<Class<? extends GuiContainer>>();
public LinkedList<Class<? extends GuiContainer>> guiGui = new LinkedList<Class<? extends GuiContainer>>();
public class RecipeSet extends TemplateRecipeHandler.CachedRecipe {
PositionedStack input;
List<PositionedStack> outputs;
List<Double> chances;
public RecipeSet(Object input, SILEXRecipe recipe) {
this.input = new PositionedStack(input, 30, 24);
this.outputs = new ArrayList<PositionedStack>();
this.chances = new ArrayList<Double>();
double weight = 0;
for(WeightedRandomObject obj : recipe.outputs) {
weight += obj.itemWeight;
}
int off = 0;
for(WeightedRandomObject obj : recipe.outputs) {
outputs.add(new PositionedStack(obj.asStack(), 93, 24 + off - 9 * ((recipe.outputs.size() + 1) / 2)));
chances.add(100 * obj.itemWeight / weight);
off += 18;
}
}
@Override
public List<PositionedStack> getIngredients() {
return getCycledIngredients(cycleticks / 48, Arrays.asList(input));
}
@Override
public List<PositionedStack> getOtherStacks() {
return outputs;
}
@Override
public PositionedStack getResult() {
return outputs.get(0);
}
}
@Override
public String getRecipeName() {
return "SILEX";
}
@Override
public void loadCraftingRecipes(String outputId, Object... results) {
if(outputId.equals("silex") && getClass() == SILEXRecipeHandler.class) {
Map<Object, SILEXRecipe> recipes = SILEXRecipes.getRecipes();
for (Map.Entry<Object, SILEXRecipe> recipe : recipes.entrySet()) {
this.arecipes.add(new RecipeSet(recipe.getKey(), recipe.getValue()));
}
} else {
super.loadCraftingRecipes(outputId, results);
}
}
@Override
public void loadCraftingRecipes(ItemStack result) {
Map<Object, SILEXRecipe> recipes = SILEXRecipes.getRecipes();
for(Map.Entry<Object, SILEXRecipe> recipe : recipes.entrySet()) {
for(WeightedRandomObject out : recipe.getValue().outputs) {
if(NEIServerUtils.areStacksSameTypeCrafting(out.asStack(), result)) {
this.arecipes.add(new RecipeSet(recipe.getKey(), recipe.getValue()));
}
}
}
}
@Override
public void loadUsageRecipes(String inputId, Object... ingredients) {
if(inputId.equals("silex") && getClass() == SILEXRecipeHandler.class) {
loadCraftingRecipes("silex", new Object[0]);
} else {
super.loadUsageRecipes(inputId, ingredients);
}
}
@Override
public void loadUsageRecipes(ItemStack ingredient) {
Map<Object, SILEXRecipe> recipes = SILEXRecipes.getRecipes();
for(Map.Entry<Object, SILEXRecipe> recipe : recipes.entrySet()) {
if(recipe.getKey() instanceof ItemStack) {
if (NEIServerUtils.areStacksSameType(ingredient, (ItemStack)recipe.getKey()))
this.arecipes.add(new RecipeSet(recipe.getKey(), recipe.getValue()));
} else if (recipe.getKey() instanceof ArrayList) {
for(Object o : (ArrayList)recipe.getKey()) {
ItemStack stack = (ItemStack)o;
if (NEIServerUtils.areStacksSameType(ingredient, stack))
this.arecipes.add(new RecipeSet(stack, recipe.getValue()));
}
}
}
}
@Override
public void loadTransferRects() {
transferRectsGui = new LinkedList<RecipeTransferRect>();
guiGui = new LinkedList<Class<? extends GuiContainer>>();
transferRects.add(new RecipeTransferRect(new Rectangle(60, 34 - 11, 24, 18), "silex"));
transferRectsGui.add(new RecipeTransferRect(new Rectangle(72 - 5, 28 - 11, 30, 30), "silex"));
guiGui.add(GUISILEX.class);
RecipeTransferRectHandler.registerRectsToGuis(getRecipeTransferRectGuis(), transferRects);
RecipeTransferRectHandler.registerRectsToGuis(guiGui, transferRectsGui);
}
@Override
public void drawExtras(int recipe) {
RecipeSet rec = (RecipeSet) this.arecipes.get(recipe);
FontRenderer fontRenderer = Minecraft.getMinecraft().fontRenderer;
int off = 0;
for(Double chance : rec.chances) {
fontRenderer.drawString(((int)(chance * 10D) / 10D) + "%", 112, 28 + off - 9 * ((rec.chances.size() + 1) / 2), 0x404040);
off += 18;
}
}
@Override
public int recipiesPerPage() {
return 2;
}
@Override
public String getGuiTexture() {
return RefStrings.MODID + ":textures/gui/nei/gui_nei_silex.png";
}
}

View File

@ -28,8 +28,7 @@ public class ShredderRecipeHandler extends TemplateRecipeHandler {
public LinkedList<Class<? extends GuiContainer>> guiRec = new LinkedList<Class<? extends GuiContainer>>();
public LinkedList<Class<? extends GuiContainer>> guiGui = new LinkedList<Class<? extends GuiContainer>>();
public class SmeltingSet extends TemplateRecipeHandler.CachedRecipe
{
public class SmeltingSet extends TemplateRecipeHandler.CachedRecipe {
PositionedStack input;
PositionedStack result;
@ -58,8 +57,7 @@ public class ShredderRecipeHandler extends TemplateRecipeHandler {
}
}
public static class Fuel
{
public static class Fuel {
public Fuel(ItemStack ingred) {
this.stack0 = new PositionedStack(ingred, 83 + 1, 5 + 1, false);
@ -77,7 +75,7 @@ public class ShredderRecipeHandler extends TemplateRecipeHandler {
@Override
public String getGuiTexture() {
return RefStrings.MODID + ":textures/gui/gui_nei_shredder.png";
return RefStrings.MODID + ":textures/gui/nei/gui_nei_shredder.png";
}
@Override
@ -137,7 +135,8 @@ public class ShredderRecipeHandler extends TemplateRecipeHandler {
// guiRec.add(GuiRecipe.class);
guiGui.add(GUIMachineShredder.class);
RecipeTransferRectHandler.registerRectsToGuis(getRecipeTransferRectGuis(), transferRects);
//RecipeTransferRectHandler.registerRectsToGuis(guiRec, transferRectsRec);
// RecipeTransferRectHandler.registerRectsToGuis(guiRec,
// transferRectsRec);
RecipeTransferRectHandler.registerRectsToGuis(guiGui, transferRectsGui);
// for(Class<? extends GuiContainer> r : getRecipeTransferRectGuis())
@ -146,18 +145,15 @@ public class ShredderRecipeHandler extends TemplateRecipeHandler {
@Override
public void drawExtras(int recipe) {
/*//Top
drawTexturedModalRect(83, 5, 0, 140, 18, 18);
//Bottom
drawTexturedModalRect(83, 5 + 36, 0, 140, 18, 18);
//Right
drawTexturedModalRect(83 + 27 + 18, 5 + 18, 0, 140, 18, 18);
//Left
drawTexturedModalRect(83 - 27 - 18, 5 + 18, 0, 140, 18, 18);
//Progress
drawTexturedModalRect(83 - 3, 5 + 19, 100, 102, 24, 16);
//Power
drawTexturedModalRect(83 - (18 * 4) - 9, 5, 0, 86, 18, 18 * 3);*/
/*
* //Top drawTexturedModalRect(83, 5, 0, 140, 18, 18); //Bottom
* drawTexturedModalRect(83, 5 + 36, 0, 140, 18, 18); //Right
* drawTexturedModalRect(83 + 27 + 18, 5 + 18, 0, 140, 18, 18); //Left
* drawTexturedModalRect(83 - 27 - 18, 5 + 18, 0, 140, 18, 18);
* //Progress drawTexturedModalRect(83 - 3, 5 + 19, 100, 102, 24, 16);
* //Power drawTexturedModalRect(83 - (18 * 4) - 9, 5, 0, 86, 18, 18 *
* 3);
*/
drawProgressBar(83 - (18 * 4) - 9 + 1, 6, 36, 86, 16, 18 * 3 - 2, 480, 7);
@ -168,8 +164,7 @@ public class ShredderRecipeHandler extends TemplateRecipeHandler {
public TemplateRecipeHandler newInstance() {
if(fuels == null || fuels.isEmpty())
fuels = new ArrayList<Fuel>();
for(ItemStack i : MachineRecipes.instance().getBlades())
{
for(ItemStack i : MachineRecipes.instance().getBlades()) {
fuels.add(new Fuel(i));
}
return super.newInstance();

View File

@ -29,6 +29,11 @@ public interface IItemHazard {
return this;
}
public default IItemHazard addBlinding() {
this.getModule().addBlinding();
return this;
}
public default IItemHazard addHydroReactivity() {
this.getModule().addHydroReactivity();
return this;

View File

@ -3,13 +3,17 @@ package com.hbm.inventory;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import com.hbm.inventory.HadronRecipes.HadronRecipe;
import com.hbm.inventory.RecipesCommon.ComparableStack;
import com.hbm.items.ModItems;
import com.hbm.util.WeightedRandomObject;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraftforge.oredict.OreDictionary;
public class SILEXRecipes {
@ -72,6 +76,23 @@ public class SILEXRecipes {
return null;
}
public static Map<Object, SILEXRecipe> getRecipes() {
Map<Object, SILEXRecipe> recipes = new HashMap<Object, SILEXRecipe>();
for(Entry<Object, SILEXRecipe> entry : SILEXRecipes.recipes.entrySet()) {
if(entry.getKey() instanceof String) {
List<ItemStack> ingredients = OreDictionary.getOres((String)entry.getKey());
recipes.put(ingredients, entry.getValue());
} else {
recipes.put(((ComparableStack)entry.getKey()).toStack(), entry.getValue());
}
}
return recipes;
}
public static class SILEXRecipe {
public int fluidProduced;

View File

@ -133,6 +133,7 @@ public class ModItems {
public static Item ingot_saturnite;
public static Item plate_saturnite;
public static Item ingot_electronium;
public static Item nugget_zirconium;
public static Item nugget_mercury;
public static Item bottle_mercury;
@ -1919,6 +1920,10 @@ public class ModItems {
public static Item hazmat_plate_grey;
public static Item hazmat_legs_grey;
public static Item hazmat_boots_grey;
public static Item liquidator_helmet;
public static Item liquidator_plate;
public static Item liquidator_legs;
public static Item liquidator_boots;
public static Item hazmat_paa_helmet;
public static Item hazmat_paa_plate;
@ -2325,6 +2330,7 @@ public class ModItems {
ingot_asbestos = new ItemHazard().addAsbestos().toItem().setUnlocalizedName("ingot_asbestos").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":ingot_asbestos");
powder_asbestos = new ItemHazard().addAsbestos().toItem().setUnlocalizedName("powder_asbestos").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":powder_asbestos");
ingot_electronium = new ItemCustomLore().setUnlocalizedName("ingot_electronium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":ingot_electronium");
nugget_zirconium = new ItemCustomLore().setUnlocalizedName("nugget_zirconium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":nugget_zirconium");
nugget_mercury = new ItemCustomLore().setUnlocalizedName("nugget_mercury").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":nugget_mercury");
bottle_mercury = new ItemCustomLore().setUnlocalizedName("bottle_mercury").setContainerItem(Items.glass_bottle).setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":bottle_mercury");
@ -2840,9 +2846,9 @@ public class ModItems {
pads_slime = new ItemModPads(0.25F).setUnlocalizedName("pads_slime").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":pads_slime");
pads_static = new ItemModPads(0.75F).setUnlocalizedName("pads_static").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":pads_static");
cladding_paint = new ItemModCladding(0.025F).setUnlocalizedName("cladding_paint").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":cladding_paint");
cladding_rubber = new ItemModCladding(0.075F).setUnlocalizedName("cladding_rubber").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":cladding_rubber");
cladding_lead = new ItemModCladding(0.2F).setUnlocalizedName("cladding_lead").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":cladding_lead");
cladding_desh = new ItemModCladding(0.4F).setUnlocalizedName("cladding_desh").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":cladding_desh");
cladding_rubber = new ItemModCladding(0.005F).setUnlocalizedName("cladding_rubber").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":cladding_rubber");
cladding_lead = new ItemModCladding(0.1F).setUnlocalizedName("cladding_lead").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":cladding_lead");
cladding_desh = new ItemModCladding(0.2F).setUnlocalizedName("cladding_desh").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":cladding_desh");
cladding_obsidian = new ItemModObsidian().setUnlocalizedName("cladding_obsidian").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":cladding_obsidian");
insert_kevlar = new ItemModInsert(1500, 1F, 0.9F, 1F, 1F).setUnlocalizedName("insert_kevlar").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":insert_kevlar");
insert_sapi = new ItemModInsert(1750, 1F, 0.85F, 1F, 1F).setUnlocalizedName("insert_sapi").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":insert_sapi");
@ -3736,13 +3742,13 @@ public class ModItems {
arc_electrode_desh = new ItemCustomLore().setUnlocalizedName("arc_electrode_desh").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setFull3D().setTextureName(RefStrings.MODID + ":arc_electrode_desh");
dynosphere_base = new Item().setUnlocalizedName("dynosphere_base").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":dynosphere_base");
dynosphere_desh = new ItemBattery(1000000L, 10000, 0).setUnlocalizedName("dynosphere_desh").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":dynosphere_desh");
dynosphere_desh = new ItemBattery(1000000L, 10000L, 0).setUnlocalizedName("dynosphere_desh").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":dynosphere_desh");
dynosphere_desh_charged = new Item().setUnlocalizedName("dynosphere_desh_charged").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":dynosphere_desh_charged");
dynosphere_schrabidium = new ItemBattery(100000000L, 100000, 0).setUnlocalizedName("dynosphere_schrabidium").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":dynosphere_schrabidium");
dynosphere_schrabidium = new ItemBattery(100000000L, 500000L, 0).setUnlocalizedName("dynosphere_schrabidium").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":dynosphere_schrabidium");
dynosphere_schrabidium_charged = new Item().setUnlocalizedName("dynosphere_schrabidium_charged").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":dynosphere_schrabidium_charged");
dynosphere_euphemium = new ItemBattery(10000000000L, 1000000, 0).setUnlocalizedName("dynosphere_euphemium").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":dynosphere_euphemium");
dynosphere_euphemium = new ItemBattery(10000000000L, 25000000L, 0).setUnlocalizedName("dynosphere_euphemium").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":dynosphere_euphemium");
dynosphere_euphemium_charged = new Item().setUnlocalizedName("dynosphere_euphemium_charged").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":dynosphere_euphemium_charged");
dynosphere_dineutronium = new ItemBattery(1000000000000L, 10000000, 0).setUnlocalizedName("dynosphere_dineutronium").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":dynosphere_dineutronium");
dynosphere_dineutronium = new ItemBattery(1000000000000L, 1250000000L, 0).setUnlocalizedName("dynosphere_dineutronium").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":dynosphere_dineutronium");
dynosphere_dineutronium_charged = new Item().setUnlocalizedName("dynosphere_dineutronium_charged").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":dynosphere_dineutronium_charged");
factory_core_titanium = new ItemBattery(7040000, 1000, 0).setUnlocalizedName("factory_core_titanium").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":factory_core_titanium");
@ -4412,6 +4418,18 @@ public class ModItems {
hazmat_paa_legs = new ArmorHazmat(MainRegistry.aMatPaa, 9, 2).setUnlocalizedName("hazmat_paa_legs").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":hazmat_paa_legs");
hazmat_paa_boots = new ArmorHazmat(MainRegistry.aMatPaa, 9, 3).setUnlocalizedName("hazmat_paa_boots").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":hazmat_paa_boots");
ArmorMaterial aMatLiquidator = EnumHelper.addArmorMaterial("HBM_LIQUIDATOR", 10, 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")
.setThreshold(1.0F)
.setBlastProtection(0.25F)
.setStep("hbm:step.metal")
.setJump("hbm:step.iron_jump")
.setFall("hbm:step.iron_land").setUnlocalizedName("liquidator_helmet").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":liquidator_helmet");
liquidator_plate = new ArmorLiquidator(aMatLiquidator, 9, 1, RefStrings.MODID + ":textures/armor/liquidator_1.png").cloneStats((ArmorFSB) liquidator_helmet).setUnlocalizedName("liquidator_plate").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":liquidator_plate");
liquidator_legs = new ArmorLiquidator(aMatLiquidator, 9, 2, RefStrings.MODID + ":textures/armor/liquidator_2.png").cloneStats((ArmorFSB) liquidator_helmet).setUnlocalizedName("liquidator_legs").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":liquidator_legs");
liquidator_boots = new ArmorLiquidator(aMatLiquidator, 9, 3, RefStrings.MODID + ":textures/armor/liquidator_1.png").cloneStats((ArmorFSB) liquidator_helmet).setUnlocalizedName("liquidator_boots").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":liquidator_boots");
australium_iii = new ArmorAustralium(MainRegistry.aMatAus3, 9, 1).setUnlocalizedName("australium_iii").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":australium_iii");
jetpack_boost = new JetpackBooster(FluidType.BALEFIRE, 32000).setUnlocalizedName("jetpack_boost").setCreativeTab(CreativeTabs.tabCombat).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":jetpack_boost");
@ -4902,6 +4920,7 @@ public class ModItems {
GameRegistry.registerItem(nugget_schrabidium_fuel, nugget_schrabidium_fuel.getUnlocalizedName());
GameRegistry.registerItem(nugget_hes, nugget_hes.getUnlocalizedName());
GameRegistry.registerItem(nugget_les, nugget_les.getUnlocalizedName());
GameRegistry.registerItem(nugget_zirconium, nugget_zirconium.getUnlocalizedName());
GameRegistry.registerItem(nugget_australium, nugget_australium.getUnlocalizedName());
GameRegistry.registerItem(nugget_weidanium, nugget_weidanium.getUnlocalizedName());
GameRegistry.registerItem(nugget_reiium, nugget_reiium.getUnlocalizedName());
@ -6615,6 +6634,10 @@ public class ModItems {
GameRegistry.registerItem(hazmat_paa_plate, hazmat_paa_plate.getUnlocalizedName());
GameRegistry.registerItem(hazmat_paa_legs, hazmat_paa_legs.getUnlocalizedName());
GameRegistry.registerItem(hazmat_paa_boots, hazmat_paa_boots.getUnlocalizedName());
GameRegistry.registerItem(liquidator_helmet, liquidator_helmet.getUnlocalizedName());
GameRegistry.registerItem(liquidator_plate, liquidator_plate.getUnlocalizedName());
GameRegistry.registerItem(liquidator_legs, liquidator_legs.getUnlocalizedName());
GameRegistry.registerItem(liquidator_boots, liquidator_boots.getUnlocalizedName());
GameRegistry.registerItem(cmb_helmet, cmb_helmet.getUnlocalizedName());
GameRegistry.registerItem(cmb_plate, cmb_plate.getUnlocalizedName());
GameRegistry.registerItem(cmb_legs, cmb_legs.getUnlocalizedName());

View File

@ -0,0 +1,49 @@
package com.hbm.items.armor;
import com.google.common.collect.HashMultimap;
import com.google.common.collect.Multimap;
import com.hbm.handler.ArmorModHandler;
import com.hbm.items.ModItems;
import com.hbm.render.model.ModelM65;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.model.ModelBiped;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.ai.attributes.AttributeModifier;
import net.minecraft.item.ItemStack;
public class ArmorLiquidator extends ArmorFSB {
private ModelM65 model;
public ArmorLiquidator(ArmorMaterial material, int layer, int slot, String texture) {
super(material, layer, slot, texture);
}
@Override
@SideOnly(Side.CLIENT)
public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot) {
if (this == ModItems.liquidator_helmet) {
if (armorSlot == 0) {
if (this.model == null) {
this.model = new ModelM65();
}
return this.model;
}
}
return super.getArmorModel(entityLiving, itemStack, armorSlot);
}
@Override
public Multimap getItemAttributeModifiers() {
Multimap multimap = HashMultimap.create();
multimap.put(SharedMonsterAttributes.knockbackResistance.getAttributeUnlocalizedName(), new AttributeModifier(ArmorModHandler.fixedUUIDs[this.armorType], "Armor modifier", 100D, 0));
multimap.put(SharedMonsterAttributes.movementSpeed.getAttributeUnlocalizedName(), new AttributeModifier(ArmorModHandler.fixedUUIDs[this.armorType], "Armor modifier", -0.1D, 1));
return multimap;
}
}

View File

@ -11,9 +11,9 @@ import net.minecraft.util.EnumChatFormatting;
public class ItemModCladding extends ItemArmorMod {
public float rad;
public double rad;
public ItemModCladding(float rad) {
public ItemModCladding(double rad) {
super(ArmorModHandler.cladding, true, true, true, true);
this.rad = rad;
}

View File

@ -3,19 +3,12 @@ package com.hbm.items.special;
import java.util.List;
import com.hbm.interfaces.IItemHazard;
import com.hbm.inventory.BreederRecipes;
import com.hbm.modules.ItemHazardModule;
import com.hbm.util.ArmorUtil;
import com.hbm.util.ContaminationUtil;
import com.hbm.util.I18nUtil;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.world.World;
public class ItemHazard extends ItemCustomLore implements IItemHazard {
@ -55,6 +48,7 @@ public class ItemHazard extends ItemCustomLore implements IItemHazard {
public static final float sr = sa326 * 0.1F;
public static final float trx = 25.0F;
public static final float trn = 0.1F;
public static final float wst = 15.0F;
public static final float yc = u;
public static final float fo = 10F;

View File

@ -364,9 +364,10 @@ public class ItemSyringe extends Item {
public boolean hitEntity(ItemStack stack, EntityLivingBase entity, EntityLivingBase entityPlayer) {
World world = entity.worldObj;
if(this == ModItems.syringe_antidote) {
if(this == ModItems.syringe_antidote && !VersatileConfig.hasPotionSickness(entity)) {
if(!world.isRemote) {
entity.clearActivePotions();
VersatileConfig.applyPotionSickness(entity, 5);
stack.stackSize--;
world.playSoundAtEntity(entity, "hbm:item.syringe", 1.0F, 1.0F);
@ -380,7 +381,7 @@ public class ItemSyringe extends Item {
}
}
if(this == ModItems.syringe_awesome) {
if(this == ModItems.syringe_awesome && !VersatileConfig.hasPotionSickness(entity)) {
if(!world.isRemote) {
entity.addPotionEffect(new PotionEffect(Potion.regeneration.id, 50 * 20, 9));
entity.addPotionEffect(new PotionEffect(Potion.resistance.id, 50 * 20, 9));
@ -392,6 +393,7 @@ public class ItemSyringe extends Item {
entity.addPotionEffect(new PotionEffect(Potion.field_76434_w.id, 50 * 20, 9));
entity.addPotionEffect(new PotionEffect(Potion.field_76444_x.id, 50 * 20, 4));
entity.addPotionEffect(new PotionEffect(Potion.confusion.id, 5 * 20, 4));
VersatileConfig.applyPotionSickness(entity, 50);
stack.stackSize--;
world.playSoundAtEntity(entity, "hbm:item.syringe", 1.0F, 1.0F);
@ -421,9 +423,10 @@ public class ItemSyringe extends Item {
}
}
if(this == ModItems.syringe_metal_stimpak) {
if(this == ModItems.syringe_metal_stimpak && !VersatileConfig.hasPotionSickness(entity)) {
if(!world.isRemote) {
entity.heal(5);
VersatileConfig.applyPotionSickness(entity, 5);
stack.stackSize--;
world.playSoundAtEntity(entity, "hbm:item.syringe", 1.0F, 1.0F);
@ -437,9 +440,10 @@ public class ItemSyringe extends Item {
}
}
if(this == ModItems.syringe_metal_medx) {
if(this == ModItems.syringe_metal_medx && !VersatileConfig.hasPotionSickness(entity)) {
if(!world.isRemote) {
entity.addPotionEffect(new PotionEffect(Potion.resistance.id, 4 * 60 * 20, 2));
VersatileConfig.applyPotionSickness(entity, 5);
stack.stackSize--;
world.playSoundAtEntity(entity, "hbm:item.syringe", 1.0F, 1.0F);
@ -453,10 +457,11 @@ public class ItemSyringe extends Item {
}
}
if(this == ModItems.syringe_metal_psycho) {
if(this == ModItems.syringe_metal_psycho && !VersatileConfig.hasPotionSickness(entity)) {
if(!world.isRemote) {
entity.addPotionEffect(new PotionEffect(Potion.resistance.id, 2 * 60 * 20, 0));
entity.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 2 * 60 * 20, 0));
VersatileConfig.applyPotionSickness(entity, 5);
stack.stackSize--;
world.playSoundAtEntity(entity, "hbm:item.syringe", 1.0F, 1.0F);
@ -470,10 +475,11 @@ public class ItemSyringe extends Item {
}
}
if(this == ModItems.syringe_metal_super) {
if(this == ModItems.syringe_metal_super && !VersatileConfig.hasPotionSickness(entity)) {
if(!world.isRemote) {
entity.heal(25);
entity.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 10 * 20, 0));
VersatileConfig.applyPotionSickness(entity, 15);
stack.stackSize--;
world.playSoundAtEntity(entity, "hbm:item.syringe", 1.0F, 1.0F);

View File

@ -1164,6 +1164,13 @@ public class ClientProxy extends ServerProxy {
}
}
if("schrabfog".equals(type)) {
EntityAuraFX flash = new EntityAuraFX(world, x, y, z, 0, 0, 0);
flash.setRBGColorF(0F, 1F, 1F);
Minecraft.getMinecraft().effectRenderer.addEffect(flash);
}
if("hadron".equals(type)) {
Minecraft.getMinecraft().effectRenderer.addEffect(new ParticleHadron(man, world, x, y, z));

View File

@ -1062,125 +1062,7 @@ public class MainRegistry {
FluidContainerRegistry.registerContainer(new FluidContainer(new ItemStack(ModItems.fluid_barrel_full, 1, i), new ItemStack(ModItems.fluid_barrel_empty), FluidType.getEnum(i), 16000));
}
HazmatRegistry.registerHazmat(ModItems.hazmat_helmet, 0.2F);
HazmatRegistry.registerHazmat(ModItems.hazmat_plate, 0.4F);
HazmatRegistry.registerHazmat(ModItems.hazmat_legs, 0.3F);
HazmatRegistry.registerHazmat(ModItems.hazmat_boots, 0.1F);
HazmatRegistry.registerHazmat(ModItems.hazmat_helmet_red, 0.3F);
HazmatRegistry.registerHazmat(ModItems.hazmat_plate_red, 0.6F);
HazmatRegistry.registerHazmat(ModItems.hazmat_legs_red, 0.45F);
HazmatRegistry.registerHazmat(ModItems.hazmat_boots_red, 0.15F);
HazmatRegistry.registerHazmat(ModItems.hazmat_helmet_grey, 0.4F);
HazmatRegistry.registerHazmat(ModItems.hazmat_plate_grey, 0.8F);
HazmatRegistry.registerHazmat(ModItems.hazmat_legs_grey, 0.6F);
HazmatRegistry.registerHazmat(ModItems.hazmat_boots_grey, 0.2F);
HazmatRegistry.registerHazmat(ModItems.t45_helmet, 0.4F);
HazmatRegistry.registerHazmat(ModItems.t45_plate, 0.8F);
HazmatRegistry.registerHazmat(ModItems.t45_legs, 0.6F);
HazmatRegistry.registerHazmat(ModItems.t45_boots, 0.2F);
HazmatRegistry.registerHazmat(ModItems.ajr_helmet, 0.4F);
HazmatRegistry.registerHazmat(ModItems.ajr_plate, 0.8F);
HazmatRegistry.registerHazmat(ModItems.ajr_legs, 0.6F);
HazmatRegistry.registerHazmat(ModItems.ajr_boots, 0.2F);
HazmatRegistry.registerHazmat(ModItems.ajro_helmet, 0.4F);
HazmatRegistry.registerHazmat(ModItems.ajro_plate, 0.8F);
HazmatRegistry.registerHazmat(ModItems.ajro_legs, 0.6F);
HazmatRegistry.registerHazmat(ModItems.ajro_boots, 0.2F);
HazmatRegistry.registerHazmat(ModItems.bj_helmet, 0.4F);
HazmatRegistry.registerHazmat(ModItems.bj_plate, 0.8F);
HazmatRegistry.registerHazmat(ModItems.bj_plate_jetpack, 0.8F);
HazmatRegistry.registerHazmat(ModItems.bj_legs, 0.6F);
HazmatRegistry.registerHazmat(ModItems.bj_boots, 0.2F);
HazmatRegistry.registerHazmat(ModItems.hev_helmet, 0.5F);
HazmatRegistry.registerHazmat(ModItems.hev_plate, 1.0F);
HazmatRegistry.registerHazmat(ModItems.hev_legs, 0.7F);
HazmatRegistry.registerHazmat(ModItems.hev_boots, 0.3F);
HazmatRegistry.registerHazmat(ModItems.fau_helmet, 0.6F);
HazmatRegistry.registerHazmat(ModItems.fau_plate, 1.2F);
HazmatRegistry.registerHazmat(ModItems.fau_legs, 0.9F);
HazmatRegistry.registerHazmat(ModItems.fau_boots, 0.3F);
HazmatRegistry.registerHazmat(ModItems.paa_plate, 0.8F);
HazmatRegistry.registerHazmat(ModItems.paa_legs, 0.6F);
HazmatRegistry.registerHazmat(ModItems.paa_boots, 0.2F);
HazmatRegistry.registerHazmat(ModItems.hazmat_paa_helmet, 0.6F);
HazmatRegistry.registerHazmat(ModItems.hazmat_paa_plate, 1.2F);
HazmatRegistry.registerHazmat(ModItems.hazmat_paa_legs, 0.9F);
HazmatRegistry.registerHazmat(ModItems.hazmat_paa_boots, 0.3F);
HazmatRegistry.registerHazmat(ModItems.security_helmet, 0.2F);
HazmatRegistry.registerHazmat(ModItems.security_plate, 0.4F);
HazmatRegistry.registerHazmat(ModItems.security_legs, 0.3F);
HazmatRegistry.registerHazmat(ModItems.security_boots, 0.1F);
HazmatRegistry.registerHazmat(ModItems.starmetal_helmet, 0.6F);
HazmatRegistry.registerHazmat(ModItems.starmetal_plate, 1.2F);
HazmatRegistry.registerHazmat(ModItems.starmetal_legs, 0.9F);
HazmatRegistry.registerHazmat(ModItems.starmetal_boots, 0.3F);
HazmatRegistry.registerHazmat(ModItems.jackt, 0.3F);
HazmatRegistry.registerHazmat(ModItems.jackt2, 0.3F);
HazmatRegistry.registerHazmat(ModItems.gas_mask, 0.15F);
HazmatRegistry.registerHazmat(ModItems.gas_mask_m65, 0.175F);
HazmatRegistry.registerHazmat(ModItems.steel_helmet, 0.04F);
HazmatRegistry.registerHazmat(ModItems.steel_plate, 0.08F);
HazmatRegistry.registerHazmat(ModItems.steel_legs, 0.06F);
HazmatRegistry.registerHazmat(ModItems.steel_boots, 0.02F);
HazmatRegistry.registerHazmat(ModItems.titanium_helmet, 0.06F);
HazmatRegistry.registerHazmat(ModItems.titanium_plate, 0.12F);
HazmatRegistry.registerHazmat(ModItems.titanium_legs, 0.1F);
HazmatRegistry.registerHazmat(ModItems.titanium_boots, 0.03F);
HazmatRegistry.registerHazmat(ModItems.cobalt_helmet, 0.1F);
HazmatRegistry.registerHazmat(ModItems.cobalt_plate, 0.2F);
HazmatRegistry.registerHazmat(ModItems.cobalt_legs, 0.15F);
HazmatRegistry.registerHazmat(ModItems.cobalt_boots, 0.05F);
HazmatRegistry.registerHazmat(Items.iron_helmet, 0.04F);
HazmatRegistry.registerHazmat(Items.iron_chestplate, 0.08F);
HazmatRegistry.registerHazmat(Items.iron_leggings, 0.06F);
HazmatRegistry.registerHazmat(Items.iron_boots, 0.02F);
HazmatRegistry.registerHazmat(Items.golden_helmet, 0.04F);
HazmatRegistry.registerHazmat(Items.golden_chestplate, 0.08F);
HazmatRegistry.registerHazmat(Items.golden_leggings, 0.06F);
HazmatRegistry.registerHazmat(Items.golden_boots, 0.02F);
HazmatRegistry.registerHazmat(Items.diamond_helmet, 0.05F);
HazmatRegistry.registerHazmat(Items.diamond_chestplate, 0.09F);
HazmatRegistry.registerHazmat(Items.diamond_leggings, 0.07F);
HazmatRegistry.registerHazmat(Items.diamond_boots, 0.03F);
HazmatRegistry.registerHazmat(ModItems.alloy_helmet, 0.08F);
HazmatRegistry.registerHazmat(ModItems.alloy_plate, 0.16F);
HazmatRegistry.registerHazmat(ModItems.alloy_legs, 0.12F);
HazmatRegistry.registerHazmat(ModItems.alloy_boots, 0.04F);
HazmatRegistry.registerHazmat(ModItems.cmb_helmet, 0.5F);
HazmatRegistry.registerHazmat(ModItems.cmb_plate, 1.1F);
HazmatRegistry.registerHazmat(ModItems.cmb_legs, 0.8F);
HazmatRegistry.registerHazmat(ModItems.cmb_boots, 0.2F);
HazmatRegistry.registerHazmat(ModItems.schrabidium_helmet, 0.6F);
HazmatRegistry.registerHazmat(ModItems.schrabidium_plate, 1.2F);
HazmatRegistry.registerHazmat(ModItems.schrabidium_legs, 0.9F);
HazmatRegistry.registerHazmat(ModItems.schrabidium_boots, 0.3F);
HazmatRegistry.registerHazmat(ModItems.euphemium_helmet, 6F);
HazmatRegistry.registerHazmat(ModItems.euphemium_plate, 12F);
HazmatRegistry.registerHazmat(ModItems.euphemium_legs, 9F);
HazmatRegistry.registerHazmat(ModItems.euphemium_boots, 3F);
HazmatRegistry.registerHazmats();
TileEntityMachineReactorLarge.registerFuelEntry(1, ReactorFuelType.URANIUM, ModItems.nugget_uranium_fuel);
TileEntityMachineReactorLarge.registerFuelEntry(9, ReactorFuelType.URANIUM, ModItems.ingot_uranium_fuel);

View File

@ -384,9 +384,9 @@ public class ModEventHandlerClient {
ItemStack stack = event.itemStack;
List<String> list = event.toolTip;
float rad = HazmatRegistry.getResistance(stack);
double rad = HazmatRegistry.getResistance(stack);
rad = ((int)(rad * 1000)) / 1000F;
rad = ((int)(rad * 1000)) / 1000D;
if(rad > 0)
list.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKey("trait.radResistance", rad));

View File

@ -3,6 +3,7 @@ package com.hbm.main;
import com.hbm.blocks.ModBlocks;
import com.hbm.handler.nei.*;
import com.hbm.items.ModItems;
import com.hbm.items.machine.ItemBattery;
import com.hbm.lib.RefStrings;
import codechicken.nei.api.API;
@ -47,9 +48,12 @@ public class NEIConfig implements IConfigureNEI {
API.registerUsageHandler(new FusionRecipeHandler());
API.registerRecipeHandler(new HadronRecipeHandler());
API.registerUsageHandler(new HadronRecipeHandler());
API.registerRecipeHandler(new SILEXRecipeHandler());
API.registerUsageHandler(new SILEXRecipeHandler());
//Some things are even beyond my control...or are they?
API.hideItem(new ItemStack(ModItems.memory));
API.hideItem(ItemBattery.getEmptyBattery(ModItems.memory));
API.hideItem(ItemBattery.getFullBattery(ModItems.memory));
API.hideItem(new ItemStack(ModBlocks.machine_coal_on));
API.hideItem(new ItemStack(ModBlocks.machine_electric_furnace_on));
@ -63,18 +67,7 @@ public class NEIConfig implements IConfigureNEI {
API.hideItem(new ItemStack(ModBlocks.statue_elb_f));
API.hideItem(new ItemStack(ModBlocks.cheater_virus));
API.hideItem(new ItemStack(ModBlocks.cheater_virus_seed));
//API.hideItem(new ItemStack(ModItems.euphemium_helmet));
//API.hideItem(new ItemStack(ModItems.euphemium_plate));
//API.hideItem(new ItemStack(ModItems.euphemium_legs));
//API.hideItem(new ItemStack(ModItems.euphemium_boots));
//API.hideItem(new ItemStack(ModItems.apple_euphemium));
//API.hideItem(new ItemStack(ModItems.ingot_euphemium));
//API.hideItem(new ItemStack(ModItems.nugget_euphemium));
API.hideItem(new ItemStack(ModItems.euphemium_kit));
//API.hideItem(new ItemStack(ModItems.euphemium_stopper));
//API.hideItem(new ItemStack(ModItems.watch));
//API.hideItem(new ItemStack(ModItems.rod_quad_euphemium));
//API.hideItem(new ItemStack(ModItems.rod_euphemium));
API.hideItem(new ItemStack(ModItems.bobmazon_hidden));
if(MainRegistry.polaroidID != 11) {
API.hideItem(new ItemStack(ModItems.book_secret));

View File

@ -9,6 +9,7 @@ import com.hbm.render.util.BeamPronter.EnumBeamType;
import com.hbm.render.util.BeamPronter.EnumWaveType;
import com.hbm.tileentity.turret.TileEntityTurretTauon;
import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Vec3;
@ -46,8 +47,11 @@ public class RenderTurretTauon extends RenderTurretBase {
if(turret.beam > 0) {
GL11.glPushMatrix();
GL11.glPushAttrib(GL11.GL_LIGHTING_BIT);
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240F, 240F);
GL11.glTranslated(0, 1.5D, 0);
BeamPronter.prontBeam(Vec3.createVectorHelper(turret.lastDist, 0, 0), EnumWaveType.RANDOM, EnumBeamType.LINE, 0xffa200, 0xffd000, (int)te.getWorldObj().getTotalWorldTime() / 5 % 360, (int)turret.lastDist + 1, 0.1F, 0, 0);
GL11.glPopAttrib();
GL11.glPopMatrix();
}

View File

@ -357,6 +357,7 @@ public class TileEntityFWatzCore extends TileEntity implements ISidedInventory,
if(!this.isRunning() && tanks[1].getFill() >= 100 && tanks[2].getFill() >= 100 && hasFuse() && getSingularityType() > 0 && !cooldown && this.isStructureValid(worldObj))
this.fillPlasma();
if(!worldObj.isRemote)
PacketDispatcher.wrapper.sendToAllAround(new AuxElectricityPacket(xCoord, yCoord, zCoord, power), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
}

View File

@ -165,6 +165,7 @@ public class TileEntityMachinePlasmaHeater extends TileEntityMachineBase impleme
public void readFromNBT(NBTTagCompound nbt) {
super.readFromNBT(nbt);
this.power = nbt.getLong("power");
tanks[0].readFromNBT(nbt, "fuel_1");
tanks[1].readFromNBT(nbt, "fuel_2");
plasma.readFromNBT(nbt, "plasma");
@ -174,6 +175,7 @@ public class TileEntityMachinePlasmaHeater extends TileEntityMachineBase impleme
public void writeToNBT(NBTTagCompound nbt) {
super.writeToNBT(nbt);
nbt.setLong("power", power);
tanks[0].writeToNBT(nbt, "fuel_1");
tanks[1].writeToNBT(nbt, "fuel_2");
plasma.writeToNBT(nbt, "plasma");

View File

@ -87,10 +87,9 @@ public class TileEntityTurretTauon extends TileEntityTurretBaseNT {
if(worldObj.isRemote) {
if(this.target != null) {
if(this.tPos != null) {
Vec3 pos = this.getTurretPos();
Vec3 ent = this.getEntityPos(this.target);
double length = Vec3.createVectorHelper(ent.xCoord - pos.xCoord, ent.yCoord - pos.yCoord, ent.zCoord - pos.zCoord).lengthVector();
double length = Vec3.createVectorHelper(tPos.xCoord - pos.xCoord, tPos.yCoord - pos.yCoord, tPos.zCoord - pos.zCoord).lengthVector();
this.lastDist = length;
}
@ -99,7 +98,7 @@ public class TileEntityTurretTauon extends TileEntityTurretBaseNT {
this.lastSpin = this.spin;
if(this.target != null) {
if(this.tPos != null) {
this.spin += 45;
}

View File

@ -85,6 +85,7 @@ public class ArmorUtil {
public static boolean checkForHaz2(EntityPlayer 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) ||
checkArmor(player, ModItems.euphemium_helmet, ModItems.euphemium_plate, ModItems.euphemium_legs, ModItems.euphemium_boots))
{
return true;
@ -136,6 +137,7 @@ public class ArmorUtil {
"platinum",
"tin",
"lead",
"liquidator",
"schrabidium",
"euphemium",
"steel",
@ -189,6 +191,10 @@ public class ArmorUtil {
{
return true;
}
if(checkArmorPiece(player, ModItems.liquidator_helmet, 3))
{
return true;
}
if(checkArmorPiece(player, ModItems.gas_mask, 3))
{
return true;
@ -247,6 +253,10 @@ public class ArmorUtil {
{
return true;
}
if(checkArmorPiece(player, ModItems.liquidator_helmet, 3))
{
return true;
}
if(checkArmorPiece(player, ModItems.gas_mask, 3))
{
return true;

View File

@ -2853,7 +2853,7 @@ trait.heat=Erzeugt %s HEAT
trait.hlParticle=Partikel-Halbwertszeit: %s
trait.hlPlayer=Spieler-Halbwertszeit: %s
trait.hot=Pyrophorisch / Heiß
trait.hydro=Hydro-Reaktivität
trait.hydro=Hydro-Reaktiv
trait.radioactive=Radioaktiv
trait.radResistance=Strahlungs-Resistenz: %s

View File

@ -2853,7 +2853,7 @@ trait.heat=Provides %s HEAT
trait.hlParticle=Particle Half-Life: %s
trait.hlPlayer=Player Half-Life: %s
trait.hot=Pyrophoric / Hot
trait.hydro=Hydroreactivity
trait.hydro=Hydroreactive
trait.radioactive=Radioactive
trait.radResistance=Radiation resistance: %s

Binary file not shown.

After

Width:  |  Height:  |  Size: 572 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 384 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 880 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 866 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 832 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 892 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 467 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 397 B

View File

Before

Width:  |  Height:  |  Size: 8.2 KiB

After

Width:  |  Height:  |  Size: 8.2 KiB

View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

Before

Width:  |  Height:  |  Size: 1013 B

After

Width:  |  Height:  |  Size: 1013 B

View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

Before

Width:  |  Height:  |  Size: 6.1 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

Before

Width:  |  Height:  |  Size: 7.4 KiB

After

Width:  |  Height:  |  Size: 7.4 KiB

View File

Before

Width:  |  Height:  |  Size: 818 B

After

Width:  |  Height:  |  Size: 818 B

View File

Before

Width:  |  Height:  |  Size: 961 B

After

Width:  |  Height:  |  Size: 961 B

View File

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

Before

Width:  |  Height:  |  Size: 897 B

After

Width:  |  Height:  |  Size: 897 B

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 7.3 KiB

After

Width:  |  Height:  |  Size: 7.3 KiB

View File

Before

Width:  |  Height:  |  Size: 7.8 KiB

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 767 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 260 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB