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;
@ -24,6 +26,11 @@ public class BlockHazard extends Block implements IItemHazard {
public BlockHazard() {
this(Material.iron);
}
public BlockHazard(Material mat) {
super(mat);
this.module = new ItemHazardModule();
}
public BlockHazard setDisplayEffect(ExtDisplayEffect extEffect) {
this.extEffect = extEffect;
@ -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;
@ -101,10 +61,45 @@ public class BlockHazard extends Block implements IItemHazard {
default: break;
}
}
private void sPart(World world, int x, int y, int z, Random rand) {
public BlockHazard(Material mat) {
super(mat);
this.module = new ItemHazardModule();
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() {
//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);
}
public static void registerHazmat(Item item, float resistance) {
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

@ -22,45 +22,43 @@ import net.minecraft.item.ItemStack;
public class CrystallizerRecipeHandler extends TemplateRecipeHandler {
public static ArrayList<Fuel> batteries;
public static ArrayList<Fuel> batteries;
public class RecipeSet extends TemplateRecipeHandler.CachedRecipe
{
PositionedStack input;
PositionedStack acid;
PositionedStack result;
public RecipeSet(Object input, ItemStack result) {
this.input = new PositionedStack(input, 75, 24);
this.acid = new PositionedStack(ItemFluidIcon.addQuantity(new ItemStack(ModItems.fluid_icon, 1, FluidType.ACID.ordinal()), TileEntityMachineCrystallizer.acidRequired), 39, 24);
this.result = new PositionedStack(result, 135, 24);
}
public class RecipeSet extends TemplateRecipeHandler.CachedRecipe {
PositionedStack input;
PositionedStack acid;
PositionedStack result;
@Override
public RecipeSet(Object input, ItemStack result) {
this.input = new PositionedStack(input, 75, 24);
this.acid = new PositionedStack(ItemFluidIcon.addQuantity(new ItemStack(ModItems.fluid_icon, 1, FluidType.ACID.ordinal()), TileEntityMachineCrystallizer.acidRequired), 39, 24);
this.result = new PositionedStack(result, 135, 24);
}
@Override
public List<PositionedStack> getIngredients() {
return getCycledIngredients(cycleticks / 48, Arrays.asList(input, acid));
}
return getCycledIngredients(cycleticks / 48, Arrays.asList(input, acid));
}
@Override
@Override
public PositionedStack getOtherStack() {
return batteries.get((cycleticks / 48) % batteries.size()).stack;
}
return batteries.get((cycleticks / 48) % batteries.size()).stack;
}
@Override
@Override
public PositionedStack getResult() {
return result;
}
}
return result;
}
}
public static class Fuel
{
public Fuel(ItemStack ingred) {
this.stack = new PositionedStack(ingred, 3, 42, false);
}
public static class Fuel {
public Fuel(ItemStack ingred) {
public PositionedStack stack;
}
this.stack = new PositionedStack(ingred, 3, 42, false);
}
public PositionedStack stack;
}
@Override
public String getRecipeName() {
@ -149,33 +147,33 @@ public class CrystallizerRecipeHandler extends TemplateRecipeHandler {
}
}
@Override
public Class<? extends GuiContainer> getGuiClass() {
return GUICrystallizer.class;
}
@Override
public void loadTransferRects() {
transferRects.add(new RecipeTransferRect(new Rectangle(104 - 5, 34 - 11, 24, 18), "hbm_crystallizer"));
}
@Override
public Class<? extends GuiContainer> getGuiClass() {
return GUICrystallizer.class;
}
@Override
public void drawExtras(int recipe) {
drawProgressBar(99, 23, 192, 0, 22, 16, 600, 0);
drawProgressBar(3, 6, 176, 0, 16, 34, 60, 7);
}
@Override
public void loadTransferRects() {
transferRects.add(new RecipeTransferRect(new Rectangle(104 - 5, 34 - 11, 24, 18), "hbm_crystallizer"));
}
@Override
public TemplateRecipeHandler newInstance() {
if (batteries == null)
batteries = new ArrayList<Fuel>();
for(ItemStack i : MachineRecipes.instance().getBatteries()) {
batteries.add(new Fuel(i));
}
return super.newInstance();
}
@Override
public void drawExtras(int recipe) {
drawProgressBar(99, 23, 192, 0, 22, 16, 600, 0);
drawProgressBar(3, 6, 176, 0, 16, 34, 60, 7);
}
@Override
public TemplateRecipeHandler newInstance() {
if(batteries == null)
batteries = new ArrayList<Fuel>();
for(ItemStack i : MachineRecipes.instance().getBatteries()) {
batteries.add(new Fuel(i));
}
return super.newInstance();
}
}

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

@ -21,63 +21,63 @@ import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.item.ItemStack;
public class HadronRecipeHandler 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 SmeltingSet extends TemplateRecipeHandler.CachedRecipe {
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 input1;
PositionedStack input2;
PositionedStack output1;
PositionedStack output2;
int momentum;
boolean analysisOnly;
public SmeltingSet(HadronRecipe recipe) {
PositionedStack output1;
PositionedStack output2;
int momentum;
boolean analysisOnly;
this.input1 = new PositionedStack(recipe.in1.toStack(), 12, 24);
this.input2 = new PositionedStack(recipe.in2.toStack(), 30, 24);
this.output1 = new PositionedStack(recipe.out1, 84, 24);
this.output2 = new PositionedStack(recipe.out2, 102, 24);
this.momentum = recipe.momentum;
this.analysisOnly = recipe.analysisOnly;
}
public RecipeSet(HadronRecipe recipe) {
@Override
this.input1 = new PositionedStack(recipe.in1.toStack(), 12, 24);
this.input2 = new PositionedStack(recipe.in2.toStack(), 30, 24);
this.output1 = new PositionedStack(recipe.out1, 84, 24);
this.output2 = new PositionedStack(recipe.out2, 102, 24);
this.momentum = recipe.momentum;
this.analysisOnly = recipe.analysisOnly;
}
@Override
public List<PositionedStack> getIngredients() {
return Arrays.asList(new PositionedStack[] {input1, input2});
}
return Arrays.asList(new PositionedStack[] { input1, input2 });
}
@Override
@Override
public List<PositionedStack> getOtherStacks() {
return Arrays.asList(new PositionedStack[] {output1, output2});
}
return Arrays.asList(new PositionedStack[] { output1, output2 });
}
@Override
public PositionedStack getResult() {
return output1;
}
}
}
@Override
public String getRecipeName() {
return "Particle Accelerator";
}
@Override
public void loadCraftingRecipes(String outputId, Object... results) {
if(outputId.equals("hadron") && getClass() == HadronRecipeHandler.class) {
List<HadronRecipe> recipes = HadronRecipes.getRecipes();
for(HadronRecipe recipe : recipes) {
this.arecipes.add(new SmeltingSet(recipe));
this.arecipes.add(new RecipeSet(recipe));
}
} else {
super.loadCraftingRecipes(outputId, results);
}
@ -85,20 +85,20 @@ public class HadronRecipeHandler extends TemplateRecipeHandler {
@Override
public void loadCraftingRecipes(ItemStack result) {
List<HadronRecipe> recipes = HadronRecipes.getRecipes();
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));
}
}
}
@Override
public void loadUsageRecipes(String inputId, Object... ingredients) {
if(inputId.equals("hadron") && getClass() == HadronRecipeHandler.class) {
loadCraftingRecipes("hadron", new Object[0]);
} else {
@ -108,45 +108,45 @@ public class HadronRecipeHandler extends TemplateRecipeHandler {
@Override
public void loadUsageRecipes(ItemStack ingredient) {
List<HadronRecipe> recipes = HadronRecipes.getRecipes();
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));
}
}
}
@Override
public void loadTransferRects() {
transferRectsGui = new LinkedList<RecipeTransferRect>();
guiGui = new LinkedList<Class<? extends GuiContainer>>();
transferRects.add(new RecipeTransferRect(new Rectangle(58 - 5, 34 - 11, 24, 18), "hadron"));
transferRectsGui.add(new RecipeTransferRect(new Rectangle(72 - 5, 28 - 11, 30, 30), "hadron"));
guiGui.add(GUIHadron.class);
RecipeTransferRectHandler.registerRectsToGuis(getRecipeTransferRectGuis(), transferRects);
RecipeTransferRectHandler.registerRectsToGuis(guiGui, transferRectsGui);
}
@Override
public void loadTransferRects() {
transferRectsGui = new LinkedList<RecipeTransferRect>();
guiGui = new LinkedList<Class<? extends GuiContainer>>();
@Override
public void drawExtras(int recipe) {
SmeltingSet rec = (SmeltingSet)this.arecipes.get(recipe);
if(rec.analysisOnly)
drawTexturedModalRect(128, 23, 0, 86, 18, 18);
FontRenderer fontRenderer = Minecraft.getMinecraft().fontRenderer;
String mom = "" + rec.momentum;
fontRenderer.drawString(mom, -fontRenderer.getStringWidth(mom) / 2 + 30, 42, 0x404040);
}
transferRects.add(new RecipeTransferRect(new Rectangle(58 - 5, 34 - 11, 24, 18), "hadron"));
transferRectsGui.add(new RecipeTransferRect(new Rectangle(72 - 5, 28 - 11, 30, 30), "hadron"));
guiGui.add(GUIHadron.class);
RecipeTransferRectHandler.registerRectsToGuis(getRecipeTransferRectGuis(), transferRects);
RecipeTransferRectHandler.registerRectsToGuis(guiGui, transferRectsGui);
}
@Override
public void drawExtras(int recipe) {
RecipeSet rec = (RecipeSet) this.arecipes.get(recipe);
if(rec.analysisOnly)
drawTexturedModalRect(128, 23, 0, 86, 18, 18);
FontRenderer fontRenderer = Minecraft.getMinecraft().fontRenderer;
String mom = "" + rec.momentum;
fontRenderer.drawString(mom, -fontRenderer.getStringWidth(mom) / 2 + 30, 42, 0x404040);
}
@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

@ -21,58 +21,56 @@ import net.minecraft.item.ItemStack;
public class PressRecipeHandler 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 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 SmeltingSet extends TemplateRecipeHandler.CachedRecipe
{
PositionedStack input;
PositionedStack result;
public class SmeltingSet extends TemplateRecipeHandler.CachedRecipe {
PositionedStack input;
PositionedStack result;
public ArrayList<Fuel> fuels = new ArrayList<Fuel>();
public SmeltingSet(List<ItemStack> stamp, ItemStack input, ItemStack result) {
input.stackSize = 1;
this.input = new PositionedStack(input, 83 - 35, 5 + 36 + 1);
this.result = new PositionedStack(result, 83 + 28, 5 + 18 + 1);
if(stamp.isEmpty())
fuels.add(new Fuel(new ItemStack(ModItems.nothing)));
else
for(ItemStack sta : stamp)
fuels.add(new Fuel(sta));
}
public ArrayList<Fuel> fuels = new ArrayList<Fuel>();
@Override
public SmeltingSet(List<ItemStack> stamp, ItemStack input, ItemStack result) {
input.stackSize = 1;
this.input = new PositionedStack(input, 83 - 35, 5 + 36 + 1);
this.result = new PositionedStack(result, 83 + 28, 5 + 18 + 1);
if(stamp.isEmpty())
fuels.add(new Fuel(new ItemStack(ModItems.nothing)));
else
for(ItemStack sta : stamp)
fuels.add(new Fuel(sta));
}
@Override
public List<PositionedStack> getIngredients() {
return getCycledIngredients(cycleticks / 48, Arrays.asList(new PositionedStack[] {input}));
}
return getCycledIngredients(cycleticks / 48, Arrays.asList(new PositionedStack[] { input }));
}
@Override
@Override
public List<PositionedStack> getOtherStacks() {
List<PositionedStack> stacks = new ArrayList<PositionedStack>();
stacks.add(fuels.get((cycleticks / 24) % fuels.size()).stack);
return stacks;
}
List<PositionedStack> stacks = new ArrayList<PositionedStack>();
stacks.add(fuels.get((cycleticks / 24) % fuels.size()).stack);
return stacks;
}
@Override
@Override
public PositionedStack getResult() {
return result;
}
}
return result;
}
}
public static class Fuel
{
public Fuel(ItemStack ingred) {
public static class Fuel {
public Fuel(ItemStack ingred) {
this.stack = new PositionedStack(ingred, 83 - 35, 6, false);
}
this.stack = new PositionedStack(ingred, 83 - 35, 6, false);
}
public PositionedStack stack;
}
public PositionedStack stack;
}
@Override
public String getRecipeName() {
return "Press";
@ -80,15 +78,15 @@ 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
public void loadCraftingRecipes(String outputId, Object... results) {
if ((outputId.equals("pressing")) && getClass() == PressRecipeHandler.class) {
if((outputId.equals("pressing")) && getClass() == PressRecipeHandler.class) {
Map<Object[], Object> recipes = MachineRecipes.instance().getPressRecipes();
for (Map.Entry<Object[], Object> recipe : recipes.entrySet()) {
this.arecipes.add(new SmeltingSet((List<ItemStack>)recipe.getKey()[0], (ItemStack)recipe.getKey()[1], (ItemStack)recipe.getValue()));
for(Map.Entry<Object[], Object> recipe : recipes.entrySet()) {
this.arecipes.add(new SmeltingSet((List<ItemStack>) recipe.getKey()[0], (ItemStack) recipe.getKey()[1], (ItemStack) recipe.getValue()));
}
} else {
super.loadCraftingRecipes(outputId, results);
@ -98,15 +96,15 @@ public class PressRecipeHandler extends TemplateRecipeHandler {
@Override
public void loadCraftingRecipes(ItemStack result) {
Map<Object[], Object> recipes = MachineRecipes.instance().getPressRecipes();
for (Map.Entry<Object[], Object> recipe : recipes.entrySet()) {
if (NEIServerUtils.areStacksSameType((ItemStack)recipe.getValue(), result))
this.arecipes.add(new SmeltingSet((List<ItemStack>)recipe.getKey()[0], (ItemStack)recipe.getKey()[1], (ItemStack)recipe.getValue()));
for(Map.Entry<Object[], Object> recipe : recipes.entrySet()) {
if(NEIServerUtils.areStacksSameType((ItemStack) recipe.getValue(), result))
this.arecipes.add(new SmeltingSet((List<ItemStack>) recipe.getKey()[0], (ItemStack) recipe.getKey()[1], (ItemStack) recipe.getValue()));
}
}
@Override
public void loadUsageRecipes(String inputId, Object... ingredients) {
if ((inputId.equals("pressing")) && getClass() == PressRecipeHandler.class) {
if((inputId.equals("pressing")) && getClass() == PressRecipeHandler.class) {
loadCraftingRecipes("pressing", new Object[0]);
} else {
super.loadUsageRecipes(inputId, ingredients);
@ -116,54 +114,55 @@ public class PressRecipeHandler extends TemplateRecipeHandler {
@Override
public void loadUsageRecipes(ItemStack ingredient) {
Map<Object[], Object> recipes = MachineRecipes.instance().getPressRecipes();
for (Map.Entry<Object[], Object> recipe : recipes.entrySet()) {
for(Map.Entry<Object[], Object> recipe : recipes.entrySet()) {
boolean b = false;
for(int i = 0; i < ((List<ItemStack>)recipe.getKey()[0]).size(); i++) {
if(NEIServerUtils.areStacksSameType(((List<ItemStack>)recipe.getKey()[0]).get(i), ingredient)) {
for(int i = 0; i < ((List<ItemStack>) recipe.getKey()[0]).size(); i++) {
if(NEIServerUtils.areStacksSameType(((List<ItemStack>) recipe.getKey()[0]).get(i), ingredient)) {
b = true;
break;
}
}
if (b || NEIServerUtils.areStacksSameType(ingredient, (ItemStack)recipe.getKey()[1]))
this.arecipes.add(new SmeltingSet((List<ItemStack>)recipe.getKey()[0], (ItemStack)recipe.getKey()[1], (ItemStack)recipe.getValue()));
if(b || NEIServerUtils.areStacksSameType(ingredient, (ItemStack) recipe.getKey()[1]))
this.arecipes.add(new SmeltingSet((List<ItemStack>) recipe.getKey()[0], (ItemStack) recipe.getKey()[1], (ItemStack) recipe.getValue()));
}
}
@Override
public Class<? extends GuiContainer> getGuiClass() {
//return GUIMachineShredder.class;
return null;
}
@Override
public void loadTransferRects() {
//transferRectsRec = new LinkedList<RecipeTransferRect>();
transferRectsGui = new LinkedList<RecipeTransferRect>();
//guiRec = new LinkedList<Class<? extends GuiContainer>>();
guiGui = new LinkedList<Class<? extends GuiContainer>>();
transferRects.add(new RecipeTransferRect(new Rectangle(74 + 6, 23, 24, 18), "pressing"));
transferRectsGui.add(new RecipeTransferRect(new Rectangle(74 + 6 + 18, 23, 24, 18), "pressing"));
//guiRec.add(GuiRecipe.class);
guiGui.add(GUIMachinePress.class);
guiGui.add(GUIMachineEPress.class);
RecipeTransferRectHandler.registerRectsToGuis(getRecipeTransferRectGuis(), transferRects);
//RecipeTransferRectHandler.registerRectsToGuis(guiRec, transferRectsRec);
RecipeTransferRectHandler.registerRectsToGuis(guiGui, transferRectsGui);
//for(Class<? extends GuiContainer> r : getRecipeTransferRectGuis())
// System.out.println(r.toString());
}
@Override
public Class<? extends GuiContainer> getGuiClass() {
// return GUIMachineShredder.class;
return null;
}
@Override
public void drawExtras(int recipe) {
drawProgressBar(47, 24, 0, 86, 18, 18, 20, 1);
}
@Override
public void loadTransferRects() {
// transferRectsRec = new LinkedList<RecipeTransferRect>();
transferRectsGui = new LinkedList<RecipeTransferRect>();
// guiRec = new LinkedList<Class<? extends GuiContainer>>();
guiGui = new LinkedList<Class<? extends GuiContainer>>();
@Override
public TemplateRecipeHandler newInstance() {
return super.newInstance();
}
transferRects.add(new RecipeTransferRect(new Rectangle(74 + 6, 23, 24, 18), "pressing"));
transferRectsGui.add(new RecipeTransferRect(new Rectangle(74 + 6 + 18, 23, 24, 18), "pressing"));
// guiRec.add(GuiRecipe.class);
guiGui.add(GUIMachinePress.class);
guiGui.add(GUIMachineEPress.class);
RecipeTransferRectHandler.registerRectsToGuis(getRecipeTransferRectGuis(), transferRects);
// RecipeTransferRectHandler.registerRectsToGuis(guiRec,
// transferRectsRec);
RecipeTransferRectHandler.registerRectsToGuis(guiGui, transferRectsGui);
// for(Class<? extends GuiContainer> r : getRecipeTransferRectGuis())
// System.out.println(r.toString());
}
@Override
public void drawExtras(int recipe) {
drawProgressBar(47, 24, 0, 86, 18, 18, 20, 1);
}
@Override
public TemplateRecipeHandler newInstance() {
return super.newInstance();
}
}

View File

@ -17,52 +17,52 @@ import net.minecraft.item.ItemStack;
public class ReactorRecipeHandler extends TemplateRecipeHandler {
public class BreedingSet extends TemplateRecipeHandler.CachedRecipe {
PositionedStack input;
PositionedStack result;
public int heat;
public ArrayList<Fuel> fuels;
public BreedingSet(ItemStack input, ItemStack result, int heat) {
input.stackSize = 1;
this.input = new PositionedStack(input, 51, 6);
this.result = new PositionedStack(result, 111, 24);
this.heat = heat;
fuels = new ArrayList();
for(ItemStack sta : BreederRecipes.getAllFuelsFromHEAT(heat)) {
fuels.add(new Fuel(sta));
}
}
public class BreedingSet extends TemplateRecipeHandler.CachedRecipe {
@Override
PositionedStack input;
PositionedStack result;
public int heat;
public ArrayList<Fuel> fuels;
public BreedingSet(ItemStack input, ItemStack result, int heat) {
input.stackSize = 1;
this.input = new PositionedStack(input, 51, 6);
this.result = new PositionedStack(result, 111, 24);
this.heat = heat;
fuels = new ArrayList();
for(ItemStack sta : BreederRecipes.getAllFuelsFromHEAT(heat)) {
fuels.add(new Fuel(sta));
}
}
@Override
public List<PositionedStack> getIngredients() {
return getCycledIngredients(cycleticks / 48, Arrays.asList(new PositionedStack[] {input}));
}
return getCycledIngredients(cycleticks / 48, Arrays.asList(new PositionedStack[] { input }));
}
@Override
@Override
public PositionedStack getOtherStack() {
return fuels.get((cycleticks / 48) % fuels.size()).stack;
}
return fuels.get((cycleticks / 48) % fuels.size()).stack;
}
@Override
@Override
public PositionedStack getResult() {
return result;
}
}
return result;
}
}
public static class Fuel {
public Fuel(ItemStack ingred) {
this.stack = new PositionedStack(ingred, 51, 42, false);
}
public static class Fuel {
public Fuel(ItemStack ingred) {
this.stack = new PositionedStack(ingred, 51, 42, false);
}
public PositionedStack stack;
}
public PositionedStack stack;
}
@Override
public String getRecipeName() {
return "Breeding Reactor";
@ -72,15 +72,15 @@ public class ReactorRecipeHandler extends TemplateRecipeHandler {
public String getGuiTexture() {
return GUIMachineReactor.texture.toString();
}
@Override
public void loadCraftingRecipes(String outputId, Object... results) {
if ((outputId.equals("breeding")) && getClass() == ReactorRecipeHandler.class) {
if((outputId.equals("breeding")) && getClass() == ReactorRecipeHandler.class) {
Map<ItemStack, BreederRecipe> recipes = BreederRecipes.getAllRecipes();
for (Map.Entry<ItemStack, BreederRecipe> recipe : recipes.entrySet()) {
for(Map.Entry<ItemStack, BreederRecipe> recipe : recipes.entrySet()) {
this.arecipes.add(new BreedingSet(recipe.getKey(), recipe.getValue().output, recipe.getValue().heat));
}
} else {
@ -90,18 +90,18 @@ public class ReactorRecipeHandler extends TemplateRecipeHandler {
@Override
public void loadCraftingRecipes(ItemStack result) {
Map<ItemStack, BreederRecipe> recipes = BreederRecipes.getAllRecipes();
for (Map.Entry<ItemStack, BreederRecipe> recipe : recipes.entrySet()) {
if (NEIServerUtils.areStacksSameType(recipe.getValue().output, result))
for(Map.Entry<ItemStack, BreederRecipe> recipe : recipes.entrySet()) {
if(NEIServerUtils.areStacksSameType(recipe.getValue().output, result))
this.arecipes.add(new BreedingSet(recipe.getKey(), recipe.getValue().output, recipe.getValue().heat));
}
}
@Override
public void loadUsageRecipes(String inputId, Object... ingredients) {
if ((inputId.equals("breeding")) && getClass() == ReactorRecipeHandler.class) {
if((inputId.equals("breeding")) && getClass() == ReactorRecipeHandler.class) {
loadCraftingRecipes("breeding", new Object[0]);
} else {
super.loadUsageRecipes(inputId, ingredients);
@ -110,31 +110,31 @@ public class ReactorRecipeHandler extends TemplateRecipeHandler {
@Override
public void loadUsageRecipes(ItemStack ingredient) {
Map<ItemStack, BreederRecipe> recipes = BreederRecipes.getAllRecipes();
for (Map.Entry<ItemStack, BreederRecipe> recipe : recipes.entrySet()) {
if (NEIServerUtils.areStacksSameType(ingredient, (ItemStack)recipe.getKey()))
this.arecipes.add(new BreedingSet(recipe.getKey(), recipe.getValue().output, recipe.getValue().heat));
for(Map.Entry<ItemStack, BreederRecipe> recipe : recipes.entrySet()) {
if(NEIServerUtils.areStacksSameType(ingredient, (ItemStack) recipe.getKey()))
this.arecipes.add(new BreedingSet(recipe.getKey(), recipe.getValue().output, recipe.getValue().heat));
}
}
@Override
public Class<? extends GuiContainer> getGuiClass() {
return GUIMachineReactor.class;
}
@Override
public void loadTransferRects() {
transferRects.add(new RecipeTransferRect(new Rectangle(74, 23, 24, 18), "breeding"));
}
@Override
public Class<? extends GuiContainer> getGuiClass() {
return GUIMachineReactor.class;
}
@Override
public void drawExtras(int recipe) {
drawProgressBar(50, 24, 176, 0, 14, 14, 48 * 3, 7);
drawProgressBar(75, 23, 176, 16, 24, 16, 48, 0);
int heat = ((BreedingSet)this.arecipes.get(recipe)).heat;
drawProgressBar(43, 24, 194, 0, 4, 16, (float) 1 - heat / 4F, 7);
}
@Override
public void loadTransferRects() {
transferRects.add(new RecipeTransferRect(new Rectangle(74, 23, 24, 18), "breeding"));
}
@Override
public void drawExtras(int recipe) {
drawProgressBar(50, 24, 176, 0, 14, 14, 48 * 3, 7);
drawProgressBar(75, 23, 176, 16, 24, 16, 48, 0);
int heat = ((BreedingSet) this.arecipes.get(recipe)).heat;
drawProgressBar(43, 24, 194, 0, 4, 16, (float) 1 - heat / 4F, 7);
}
}

View File

@ -17,51 +17,50 @@ import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.item.ItemStack;
public class RefineryRecipeHandler 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 SmeltingSet extends TemplateRecipeHandler.CachedRecipe
{
PositionedStack input;
PositionedStack result1;
PositionedStack result2;
PositionedStack result3;
PositionedStack result4;
PositionedStack result5;
public SmeltingSet(ItemStack input, ItemStack result1, ItemStack result2, ItemStack result3, ItemStack result4, ItemStack result5) {
input.stackSize = 1;
this.input = new PositionedStack(input, 21 + 27, 6 + 18);
this.result1 = new PositionedStack(result1, 129 - 18, 6);
this.result2 = new PositionedStack(result2, 147 - 18, 6 + 9);
this.result3 = new PositionedStack(result3, 129 - 18, 42 - 18);
this.result4 = new PositionedStack(result4, 147 - 18, 42 - 9);
this.result5 = new PositionedStack(result5, 147 - 36, 42);
}
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>>();
@Override
public class SmeltingSet extends TemplateRecipeHandler.CachedRecipe {
PositionedStack input;
PositionedStack result1;
PositionedStack result2;
PositionedStack result3;
PositionedStack result4;
PositionedStack result5;
public SmeltingSet(ItemStack input, ItemStack result1, ItemStack result2, ItemStack result3, ItemStack result4, ItemStack result5) {
input.stackSize = 1;
this.input = new PositionedStack(input, 21 + 27, 6 + 18);
this.result1 = new PositionedStack(result1, 129 - 18, 6);
this.result2 = new PositionedStack(result2, 147 - 18, 6 + 9);
this.result3 = new PositionedStack(result3, 129 - 18, 42 - 18);
this.result4 = new PositionedStack(result4, 147 - 18, 42 - 9);
this.result5 = new PositionedStack(result5, 147 - 36, 42);
}
@Override
public List<PositionedStack> getIngredients() {
return getCycledIngredients(cycleticks / 48, Arrays.asList(new PositionedStack[] {input}));
}
return getCycledIngredients(cycleticks / 48, Arrays.asList(new PositionedStack[] { input }));
}
@Override
@Override
public List<PositionedStack> getOtherStacks() {
List<PositionedStack> stacks = new ArrayList<PositionedStack>();
stacks.add(result2);
stacks.add(result3);
stacks.add(result4);
stacks.add(result5);
return stacks;
}
List<PositionedStack> stacks = new ArrayList<PositionedStack>();
stacks.add(result2);
stacks.add(result3);
stacks.add(result4);
stacks.add(result5);
return stacks;
}
@Override
@Override
public PositionedStack getResult() {
return result1;
}
}
return result1;
}
}
@Override
public String getRecipeName() {
@ -70,18 +69,18 @@ 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
public Class<? extends GuiContainer> getGuiClass() {
return null;
}
@Override
public Class<? extends GuiContainer> getGuiClass() {
return null;
}
@Override
public TemplateRecipeHandler newInstance() {
return super.newInstance();
}
@Override
public TemplateRecipeHandler newInstance() {
return super.newInstance();
}
@Override
public void loadCraftingRecipes(String outputId, Object... results) {
@ -139,23 +138,23 @@ public class RefineryRecipeHandler extends TemplateRecipeHandler {
return sta1.getItem() == sta2.getItem() && sta1.getItemDamage() == sta2.getItemDamage();
}
@Override
public void drawExtras(int recipe) {
drawProgressBar(83 - (18 * 4) - 9 + 1, 6, 0, 86, 16, 18 * 3 - 2, 480, 7);
drawProgressBar(56 + 22, 5 + 19, 16, 86, 24, 17, 48, 0);
}
@Override
public void loadTransferRects() {
transferRectsGui = new LinkedList<RecipeTransferRect>();
guiGui = new LinkedList<Class<? extends GuiContainer>>();
@Override
public void drawExtras(int recipe) {
drawProgressBar(83 - (18 * 4) - 9 + 1, 6, 0, 86, 16, 18 * 3 - 2, 480, 7);
transferRects.add(new RecipeTransferRect(new Rectangle(138 - 1 - 36 - 27, 23, 36, 18), "refinery"));
transferRectsGui.add(new RecipeTransferRect(new Rectangle(18 * 2 + 2 + 36, 89 - 7 - 11 - 11, 18 * 4, 18), "refinery"));
guiGui.add(GUIMachineRefinery.class);
RecipeTransferRectHandler.registerRectsToGuis(getRecipeTransferRectGuis(), transferRects);
RecipeTransferRectHandler.registerRectsToGuis(guiGui, transferRectsGui);
}
drawProgressBar(56 + 22, 5 + 19, 16, 86, 24, 17, 48, 0);
}
@Override
public void loadTransferRects() {
transferRectsGui = new LinkedList<RecipeTransferRect>();
guiGui = new LinkedList<Class<? extends GuiContainer>>();
transferRects.add(new RecipeTransferRect(new Rectangle(138 - 1 - 36 - 27, 23, 36, 18), "refinery"));
transferRectsGui.add(new RecipeTransferRect(new Rectangle(18 * 2 + 2 + 36, 89 - 7 - 11 - 11, 18 * 4, 18), "refinery"));
guiGui.add(GUIMachineRefinery.class);
RecipeTransferRectHandler.registerRectsToGuis(getRecipeTransferRectGuis(), transferRects);
RecipeTransferRectHandler.registerRectsToGuis(guiGui, transferRectsGui);
}
}

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

@ -21,55 +21,53 @@ import net.minecraft.item.ItemStack;
public class ShredderRecipeHandler extends TemplateRecipeHandler {
public static ArrayList<Fuel> fuels;
public static ArrayList<Fuel> fuels;
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 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 SmeltingSet extends TemplateRecipeHandler.CachedRecipe
{
PositionedStack input;
PositionedStack result;
public SmeltingSet(ItemStack input, ItemStack result) {
input.stackSize = 1;
this.input = new PositionedStack(input, 83 - 27 - 18 + 1, 5 + 18 + 1);
this.result = new PositionedStack(result, 83 + 27 + 18 + 1, 5 + 18 + 1);
}
public class SmeltingSet extends TemplateRecipeHandler.CachedRecipe {
PositionedStack input;
PositionedStack result;
@Override
public SmeltingSet(ItemStack input, ItemStack result) {
input.stackSize = 1;
this.input = new PositionedStack(input, 83 - 27 - 18 + 1, 5 + 18 + 1);
this.result = new PositionedStack(result, 83 + 27 + 18 + 1, 5 + 18 + 1);
}
@Override
public List<PositionedStack> getIngredients() {
return getCycledIngredients(cycleticks / 48, Arrays.asList(new PositionedStack[] {input}));
}
return getCycledIngredients(cycleticks / 48, Arrays.asList(new PositionedStack[] { input }));
}
@Override
@Override
public List<PositionedStack> getOtherStacks() {
List<PositionedStack> stacks = new ArrayList<PositionedStack>();
stacks.add(fuels.get((cycleticks / 24) % fuels.size()).stack0);
stacks.add(fuels.get((cycleticks / 24) % fuels.size()).stack1);
return stacks;
}
List<PositionedStack> stacks = new ArrayList<PositionedStack>();
stacks.add(fuels.get((cycleticks / 24) % fuels.size()).stack0);
stacks.add(fuels.get((cycleticks / 24) % fuels.size()).stack1);
return stacks;
}
@Override
@Override
public PositionedStack getResult() {
return result;
}
}
return result;
}
}
public static class Fuel
{
public Fuel(ItemStack ingred) {
public static class Fuel {
public Fuel(ItemStack ingred) {
this.stack0 = new PositionedStack(ingred, 83 + 1, 5 + 1, false);
this.stack1 = new PositionedStack(ingred, 83 + 1, 5 + 36 + 1, false);
}
this.stack0 = new PositionedStack(ingred, 83 + 1, 5 + 1, false);
this.stack1 = new PositionedStack(ingred, 83 + 1, 5 + 36 + 1, false);
}
public PositionedStack stack0;
public PositionedStack stack1;
}
public PositionedStack stack0;
public PositionedStack stack1;
}
@Override
public String getRecipeName() {
return "Shredder";
@ -77,15 +75,15 @@ 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
public void loadCraftingRecipes(String outputId, Object... results) {
if ((outputId.equals("shredding")) && getClass() == ShredderRecipeHandler.class) {
if((outputId.equals("shredding")) && getClass() == ShredderRecipeHandler.class) {
Map<Object, Object> recipes = ShredderRecipes.getShredderRecipes();
for (Map.Entry<Object, Object> recipe : recipes.entrySet()) {
this.arecipes.add(new SmeltingSet(((ComparableStack)recipe.getKey()).toStack(), (ItemStack)recipe.getValue()));
for(Map.Entry<Object, Object> recipe : recipes.entrySet()) {
this.arecipes.add(new SmeltingSet(((ComparableStack) recipe.getKey()).toStack(), (ItemStack) recipe.getValue()));
}
} else {
super.loadCraftingRecipes(outputId, results);
@ -95,15 +93,15 @@ public class ShredderRecipeHandler extends TemplateRecipeHandler {
@Override
public void loadCraftingRecipes(ItemStack result) {
Map<Object, Object> recipes = ShredderRecipes.getShredderRecipes();
for (Map.Entry<Object, Object> recipe : recipes.entrySet()) {
if (NEIServerUtils.areStacksSameType((ItemStack)recipe.getValue(), result))
this.arecipes.add(new SmeltingSet(((ComparableStack)recipe.getKey()).toStack(), (ItemStack)recipe.getValue()));
for(Map.Entry<Object, Object> recipe : recipes.entrySet()) {
if(NEIServerUtils.areStacksSameType((ItemStack) recipe.getValue(), result))
this.arecipes.add(new SmeltingSet(((ComparableStack) recipe.getKey()).toStack(), (ItemStack) recipe.getValue()));
}
}
@Override
public void loadUsageRecipes(String inputId, Object... ingredients) {
if ((inputId.equals("shredding")) && getClass() == ShredderRecipeHandler.class) {
if((inputId.equals("shredding")) && getClass() == ShredderRecipeHandler.class) {
loadCraftingRecipes("shredding", new Object[0]);
} else {
super.loadUsageRecipes(inputId, ingredients);
@ -113,65 +111,62 @@ public class ShredderRecipeHandler extends TemplateRecipeHandler {
@Override
public void loadUsageRecipes(ItemStack ingredient) {
Map<Object, Object> recipes = ShredderRecipes.getShredderRecipes();
for (Map.Entry<Object, Object> recipe : recipes.entrySet()) {
if (NEIServerUtils.areStacksSameType(ingredient, ((ComparableStack)recipe.getKey()).toStack()))
this.arecipes.add(new SmeltingSet(((ComparableStack)recipe.getKey()).toStack(), (ItemStack)recipe.getValue()));
for(Map.Entry<Object, Object> recipe : recipes.entrySet()) {
if(NEIServerUtils.areStacksSameType(ingredient, ((ComparableStack) recipe.getKey()).toStack()))
this.arecipes.add(new SmeltingSet(((ComparableStack) recipe.getKey()).toStack(), (ItemStack) recipe.getValue()));
}
}
@Override
public Class<? extends GuiContainer> getGuiClass() {
//return GUIMachineShredder.class;
return null;
}
@Override
public void loadTransferRects() {
//transferRectsRec = new LinkedList<RecipeTransferRect>();
transferRectsGui = new LinkedList<RecipeTransferRect>();
//guiRec = new LinkedList<Class<? extends GuiContainer>>();
guiGui = new LinkedList<Class<? extends GuiContainer>>();
transferRects.add(new RecipeTransferRect(new Rectangle(74 + 6, 23, 24, 18), "shredding"));
transferRectsGui.add(new RecipeTransferRect(new Rectangle(63 - 7 + 4, 89 - 11, 34, 18), "shredding"));
//guiRec.add(GuiRecipe.class);
guiGui.add(GUIMachineShredder.class);
RecipeTransferRectHandler.registerRectsToGuis(getRecipeTransferRectGuis(), transferRects);
//RecipeTransferRectHandler.registerRectsToGuis(guiRec, transferRectsRec);
RecipeTransferRectHandler.registerRectsToGuis(guiGui, transferRectsGui);
//for(Class<? extends GuiContainer> r : getRecipeTransferRectGuis())
// System.out.println(r.toString());
}
@Override
public Class<? extends GuiContainer> getGuiClass() {
// return GUIMachineShredder.class;
return null;
}
@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);*/
@Override
public void loadTransferRects() {
// transferRectsRec = new LinkedList<RecipeTransferRect>();
transferRectsGui = new LinkedList<RecipeTransferRect>();
// guiRec = new LinkedList<Class<? extends GuiContainer>>();
guiGui = new LinkedList<Class<? extends GuiContainer>>();
drawProgressBar(83 - (18 * 4) - 9 + 1, 6, 36, 86, 16, 18 * 3 - 2, 480, 7);
drawProgressBar(83 - 3, 5 + 18, 100, 118, 24, 16, 48, 0);
}
transferRects.add(new RecipeTransferRect(new Rectangle(74 + 6, 23, 24, 18), "shredding"));
transferRectsGui.add(new RecipeTransferRect(new Rectangle(63 - 7 + 4, 89 - 11, 34, 18), "shredding"));
// guiRec.add(GuiRecipe.class);
guiGui.add(GUIMachineShredder.class);
RecipeTransferRectHandler.registerRectsToGuis(getRecipeTransferRectGuis(), transferRects);
// RecipeTransferRectHandler.registerRectsToGuis(guiRec,
// transferRectsRec);
RecipeTransferRectHandler.registerRectsToGuis(guiGui, transferRectsGui);
@Override
public TemplateRecipeHandler newInstance() {
if (fuels == null || fuels.isEmpty())
fuels = new ArrayList<Fuel>();
for(ItemStack i : MachineRecipes.instance().getBlades())
{
fuels.add(new Fuel(i));
}
return super.newInstance();
}
// for(Class<? extends GuiContainer> r : getRecipeTransferRectGuis())
// System.out.println(r.toString());
}
@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);
*/
drawProgressBar(83 - (18 * 4) - 9 + 1, 6, 36, 86, 16, 18 * 3 - 2, 480, 7);
drawProgressBar(83 - 3, 5 + 18, 100, 118, 24, 16, 48, 0);
}
@Override
public TemplateRecipeHandler newInstance() {
if(fuels == null || fuels.isEmpty())
fuels = new ArrayList<Fuel>();
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 {
@ -71,6 +75,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 {

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");
@ -4411,6 +4417,18 @@ public class ModItems {
hazmat_paa_plate = new ArmorHazmat(MainRegistry.aMatPaa, 9, 1).setUnlocalizedName("hazmat_paa_plate").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":hazmat_paa_plate");
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");
@ -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,13 +11,13 @@ 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;
}
@Override
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
list.add(EnumChatFormatting.YELLOW + "+" + rad + " rad-resistance");

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

@ -379,14 +379,14 @@ public class ModEventHandlerClient {
}
@SubscribeEvent
public void drawTooltip(ItemTooltipEvent event) {
public void drawTooltip(ItemTooltipEvent event) {
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

@ -20,7 +20,7 @@ public class RenderFENSU extends TileEntitySpecialRenderer {
GL11.glTranslatef((float)x + 0.5F, (float)y, (float)z + 0.5F);
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glShadeModel(GL11.GL_SMOOTH);
@ -30,30 +30,30 @@ public class RenderFENSU extends TileEntitySpecialRenderer {
case 3: GL11.glRotatef(270, 0F, 1F, 0F); break;
case 5: GL11.glRotatef(0, 0F, 1F, 0F); break;
}
bindTexture(ResourceManager.fensu_tex);
ResourceManager.fensu.renderPart("Base");
TileEntityMachineFENSU fensu = (TileEntityMachineFENSU)te;
float rot = fensu.prevRotation + (fensu.rotation - fensu.prevRotation) * f;
GL11.glTranslated(0, 2.5, 0);
GL11.glRotated(rot, 1, 0, 0);
GL11.glTranslated(0, -2.5, 0);
ResourceManager.fensu.renderPart("Disc");
GL11.glPushMatrix();
GL11.glPushAttrib(GL11.GL_LIGHTING_BIT);
GL11.glDisable(GL11.GL_LIGHTING);
GL11.glDisable(GL11.GL_CULL_FACE);
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240F, 240F);
ResourceManager.fensu.renderPart("Lights");
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glPopAttrib();
GL11.glPopMatrix();
bindTexture(ResourceManager.fensu_tex);
ResourceManager.fensu.renderPart("Base");
TileEntityMachineFENSU fensu = (TileEntityMachineFENSU) te;
float rot = fensu.prevRotation + (fensu.rotation - fensu.prevRotation) * f;
GL11.glTranslated(0, 2.5, 0);
GL11.glRotated(rot, 1, 0, 0);
GL11.glTranslated(0, -2.5, 0);
ResourceManager.fensu.renderPart("Disc");
GL11.glPushMatrix();
GL11.glPushAttrib(GL11.GL_LIGHTING_BIT);
GL11.glDisable(GL11.GL_LIGHTING);
GL11.glDisable(GL11.GL_CULL_FACE);
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240F, 240F);
ResourceManager.fensu.renderPart("Lights");
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glPopAttrib();
GL11.glPopMatrix();
GL11.glShadeModel(GL11.GL_FLAT);
GL11.glPopMatrix();

View File

@ -12,76 +12,76 @@ public class RenderITER extends TileEntitySpecialRenderer {
@Override
public void renderTileEntityAt(TileEntity te, double x, double y, double z, float f) {
TileEntityITER iter = (TileEntityITER)te;
TileEntityITER iter = (TileEntityITER) te;
GL11.glPushMatrix();
GL11.glTranslatef((float)x + 0.5F, (float)y - 2, (float)z + 0.5F);
GL11.glTranslatef((float) x + 0.5F, (float) y - 2, (float) z + 0.5F);
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glShadeModel(GL11.GL_SMOOTH);
bindTexture(ResourceManager.iter_glass);
ResourceManager.iter.renderPart("Windows");
bindTexture(ResourceManager.iter_motor);
ResourceManager.iter.renderPart("Motors");
bindTexture(ResourceManager.iter_rails);
ResourceManager.iter.renderPart("Rails");
bindTexture(ResourceManager.iter_toroidal);
ResourceManager.iter.renderPart("Toroidal");
switch(iter.blanket) {
case 0: bindTexture(ResourceManager.iter_torus); break;
case 1: bindTexture(ResourceManager.iter_torus_tungsten); break;
case 2: bindTexture(ResourceManager.iter_torus_desh); break;
case 3: bindTexture(ResourceManager.iter_torus_chlorophyte); break;
case 4: bindTexture(ResourceManager.iter_torus_vaporwave); break;
default: bindTexture(ResourceManager.iter_torus); break;
}
ResourceManager.iter.renderPart("Torus");
GL11.glPushMatrix();
GL11.glRotated(iter.lastRotor + (iter.rotor - iter.lastRotor) * f, 0, 1, 0);
bindTexture(ResourceManager.iter_solenoid);
ResourceManager.iter.renderPart("Solenoid");
bindTexture(ResourceManager.iter_glass);
ResourceManager.iter.renderPart("Windows");
bindTexture(ResourceManager.iter_motor);
ResourceManager.iter.renderPart("Motors");
bindTexture(ResourceManager.iter_rails);
ResourceManager.iter.renderPart("Rails");
bindTexture(ResourceManager.iter_toroidal);
ResourceManager.iter.renderPart("Toroidal");
switch(iter.blanket) {
case 0: bindTexture(ResourceManager.iter_torus); break;
case 1: bindTexture(ResourceManager.iter_torus_tungsten); break;
case 2: bindTexture(ResourceManager.iter_torus_desh); break;
case 3: bindTexture(ResourceManager.iter_torus_chlorophyte); break;
case 4: bindTexture(ResourceManager.iter_torus_vaporwave); break;
default: bindTexture(ResourceManager.iter_torus); break;
}
ResourceManager.iter.renderPart("Torus");
GL11.glPushMatrix();
GL11.glRotated(iter.lastRotor + (iter.rotor - iter.lastRotor) * f, 0, 1, 0);
bindTexture(ResourceManager.iter_solenoid);
ResourceManager.iter.renderPart("Solenoid");
GL11.glPopMatrix();
if(iter.plasma.getFill() > 0) {
GL11.glPushMatrix();
GL11.glRotated(System.currentTimeMillis() / 50D % 360, 0, 1, 0);
GL11.glDisable(GL11.GL_LIGHTING);
GL11.glDisable(GL11.GL_ALPHA_TEST);
GL11.glEnable(GL11.GL_BLEND);
GL11.glPushMatrix();
GL11.glRotated(System.currentTimeMillis() / 50D % 360, 0, 1, 0);
GL11.glDisable(GL11.GL_LIGHTING);
GL11.glDisable(GL11.GL_ALPHA_TEST);
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE);
GL11.glDepthMask(false);
int color = iter.plasma.getTankType().getColor();
double alpha = (double)iter.plasma.getFill() / (double)iter.plasma.getMaxFill();
int r = (int)(((color & 0xFF0000) >> 16) / 2 * alpha);
int g = (int)(((color & 0xFF00) >> 8) / 2 * alpha);
int b = (int)((color & 0xFF) / 2 * alpha);
GL11.glColor3b((byte) r, (byte) g, (byte) b);
GL11.glDepthMask(false);
int color = iter.plasma.getTankType().getColor();
double alpha = (double) iter.plasma.getFill() / (double) iter.plasma.getMaxFill();
int r = (int) (((color & 0xFF0000) >> 16) / 2 * alpha);
int g = (int) (((color & 0xFF00) >> 8) / 2 * alpha);
int b = (int) ((color & 0xFF) / 2 * alpha);
GL11.glColor3b((byte) r, (byte) g, (byte) b);
GL11.glTranslatef(0, 2.5F, 0);
GL11.glScaled(1, alpha, 1);
GL11.glScaled(1, alpha, 1);
GL11.glTranslatef(0, -2.5F, 0);
bindTexture(ResourceManager.iter_plasma);
ResourceManager.iter.renderPart("Plasma");
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glEnable(GL11.GL_ALPHA_TEST);
GL11.glDisable(GL11.GL_BLEND);
GL11.glDepthMask(true);
bindTexture(ResourceManager.iter_plasma);
ResourceManager.iter.renderPart("Plasma");
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glEnable(GL11.GL_ALPHA_TEST);
GL11.glDisable(GL11.GL_BLEND);
GL11.glDepthMask(true);
GL11.glPopMatrix();
}
GL11.glShadeModel(GL11.GL_FLAT);
GL11.glPopMatrix();

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,7 +357,8 @@ 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();
PacketDispatcher.wrapper.sendToAllAround(new AuxElectricityPacket(xCoord, yCoord, zCoord, power), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
if(!worldObj.isRemote)
PacketDispatcher.wrapper.sendToAllAround(new AuxElectricityPacket(xCoord, yCoord, zCoord, power), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
}
public void fillPlasma() {

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