mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
arc furnace recipe crap, soldering station
This commit is contained in:
parent
6da3baf1fa
commit
1f94b6b7a6
10
changelog
10
changelog
@ -1,3 +1,10 @@
|
||||
## Added
|
||||
* Arc furnace
|
||||
* A large version of the arc furnace that can do several types of recipe
|
||||
* Solid mode smelts items like a furnace, however to work the recipe needs an ingredient or result that is oredicted as either an ore, block, ingot or plate
|
||||
* Liquid mode smelts items like a crucible would, effectively liquiefying metals. Non-castable materials are voided
|
||||
* Both modes have arc furnace exclusive recipes (smelting sand/quartz/fiberglass into silicon)
|
||||
|
||||
## Changed
|
||||
* Updated russian and italian localization
|
||||
* Nerfed conventional explosives (dynamite, TNT, semtex, C4) in order to not outclass small nukes
|
||||
@ -6,7 +13,8 @@
|
||||
* ICF vessel blocks now use half as much fullerite as before
|
||||
* ICF capacitor and turbocharger blocks are now quite a bit cheaper
|
||||
* MEP is no longer self-igniting
|
||||
* The foundry storage basin now holds 4 blocks worth of material instea of 1
|
||||
* The foundry storage basin now holds 4 blocks worth of material instead of 1
|
||||
* The small arc furnace is being retired and is no longer craftable. However, it will still function, and it can use any type of electrode without depleting it
|
||||
|
||||
## Fixed
|
||||
* Fixed missing localization for meteorite ores and the new crucible materials
|
||||
|
||||
@ -730,7 +730,6 @@ public class ModBlocks {
|
||||
|
||||
public static Block machine_arc_furnace_off;
|
||||
public static Block machine_arc_furnace_on;
|
||||
public static Block machine_arc_furnace;
|
||||
|
||||
//public static Block machine_deuterium;
|
||||
|
||||
@ -993,6 +992,8 @@ public class ModBlocks {
|
||||
public static Block machine_assembler;
|
||||
public static Block machine_assemfac;
|
||||
public static Block machine_arc_welder;
|
||||
public static Block machine_soldering_station;
|
||||
public static Block machine_arc_furnace;
|
||||
|
||||
public static Block machine_chemplant;
|
||||
public static Block machine_chemfac;
|
||||
@ -1837,7 +1838,7 @@ public class ModBlocks {
|
||||
|
||||
machine_electric_furnace_off = new MachineElectricFurnace(false).setBlockName("machine_electric_furnace_off").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
||||
machine_electric_furnace_on = new MachineElectricFurnace(true).setBlockName("machine_electric_furnace_on").setHardness(5.0F).setLightLevel(1.0F).setResistance(10.0F);
|
||||
machine_arc_furnace_off = new MachineArcFurnace(false).setBlockName("machine_arc_furnace_off").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
||||
machine_arc_furnace_off = new MachineArcFurnace(false).setBlockName("machine_arc_furnace_off").setHardness(5.0F).setResistance(10.0F);
|
||||
machine_arc_furnace_on = new MachineArcFurnace(true).setBlockName("machine_arc_furnace_on").setHardness(5.0F).setLightLevel(1.0F).setResistance(10.0F);
|
||||
machine_arc_furnace = new MachineArcFurnaceLarge().setBlockName("machine_arc_furnace").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_microwave = new MachineMicrowave(Material.iron).setBlockName("machine_microwave").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_microwave");
|
||||
@ -2200,6 +2201,7 @@ public class ModBlocks {
|
||||
machine_assembler = new MachineAssembler(Material.iron).setBlockName("machine_assembler").setHardness(5.0F).setResistance(30.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_assembler");
|
||||
machine_assemfac = new MachineAssemfac(Material.iron).setBlockName("machine_assemfac").setHardness(5.0F).setResistance(30.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_arc_welder = new MachineArcWelder(Material.iron).setBlockName("machine_arc_welder").setHardness(5.0F).setResistance(30.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_soldering_station = new MachineSolderingStation(Material.iron).setBlockName("machine_soldering_station").setHardness(5.0F).setResistance(30.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_chemplant = new MachineChemplant(Material.iron).setBlockName("machine_chemplant").setHardness(5.0F).setResistance(30.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_chemfac = new MachineChemfac(Material.iron).setBlockName("machine_chemfac").setHardness(5.0F).setResistance(30.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_mixer = new MachineMixer(Material.iron).setBlockName("machine_mixer").setHardness(5.0F).setResistance(30.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
@ -2217,9 +2219,9 @@ public class ModBlocks {
|
||||
zirnox_destroyed = new ZirnoxDestroyed(Material.iron).setBlockName("zirnox_destroyed").setHardness(100.0F).setResistance(800.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_controller = new MachineReactorControl(Material.iron).setBlockName("machine_controller").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null);
|
||||
|
||||
machine_boiler_off = new MachineBoiler(false).setBlockName("machine_boiler_off").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_boiler_off");
|
||||
machine_boiler_off = new MachineBoiler(false).setBlockName("machine_boiler_off").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":machine_boiler_off");
|
||||
machine_boiler_on = new MachineBoiler(true).setBlockName("machine_boiler_on").setHardness(5.0F).setResistance(10.0F).setLightLevel(1.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":machine_boiler_on");
|
||||
machine_boiler_electric_off = new MachineBoiler(false).setBlockName("machine_boiler_electric_off").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_boiler_electric_off");
|
||||
machine_boiler_electric_off = new MachineBoiler(false).setBlockName("machine_boiler_electric_off").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":machine_boiler_electric_off");
|
||||
machine_boiler_electric_on = new MachineBoiler(true).setBlockName("machine_boiler_electric_on").setHardness(5.0F).setResistance(10.0F).setLightLevel(1.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":machine_boiler_electric_on");
|
||||
|
||||
machine_steam_engine = new MachineSteamEngine().setBlockName("machine_steam_engine").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
@ -3225,13 +3227,14 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(machine_electric_furnace_on, machine_electric_furnace_on.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_arc_furnace_off, machine_arc_furnace_off.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_arc_furnace_on, machine_arc_furnace_on.getUnlocalizedName());
|
||||
register(machine_arc_furnace);
|
||||
GameRegistry.registerBlock(machine_microwave, machine_microwave.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_assembler, machine_assembler.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_assemfac, machine_assemfac.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_chemplant, machine_chemplant.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_chemfac, machine_chemfac.getUnlocalizedName());
|
||||
register(machine_arc_welder);
|
||||
register(machine_soldering_station);
|
||||
register(machine_arc_furnace);
|
||||
register(machine_mixer);
|
||||
register(machine_fluidtank);
|
||||
register(machine_bat9000);
|
||||
|
||||
@ -2,11 +2,18 @@ package com.hbm.blocks.machine;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.handler.MultiblockHandlerXR;
|
||||
import com.hbm.inventory.material.Mats.MaterialStack;
|
||||
import com.hbm.items.machine.ItemScraps;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineArcFurnaceLarge;
|
||||
|
||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.ItemTool;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
@ -60,6 +67,35 @@ public class MachineArcFurnaceLarge extends BlockDummyable {
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
return super.standardOpenBehavior(world, x, y, z, player, 0);
|
||||
|
||||
if(world.isRemote) {
|
||||
return true;
|
||||
} else if(!player.isSneaking()) {
|
||||
int[] pos = this.findCore(world, x, y, z);
|
||||
|
||||
if(pos == null)
|
||||
return false;
|
||||
if(player.getHeldItem() != null && player.getHeldItem().getItem() instanceof ItemTool && ((ItemTool) player.getHeldItem().getItem()).getToolClasses(player.getHeldItem()).contains("shovel")) {
|
||||
TileEntityMachineArcFurnaceLarge crucible = (TileEntityMachineArcFurnaceLarge) world.getTileEntity(pos[0], pos[1], pos[2]);
|
||||
|
||||
for(MaterialStack stack : crucible.liquids) {
|
||||
ItemStack scrap = ItemScraps.create(new MaterialStack(stack.material, stack.amount));
|
||||
if(!player.inventory.addItemStackToInventory(scrap)) {
|
||||
EntityItem item = new EntityItem(world, x + hitX, y + hitY, z + hitZ, scrap);
|
||||
world.spawnEntityInWorld(item);
|
||||
}
|
||||
}
|
||||
|
||||
player.inventoryContainer.detectAndSendChanges();
|
||||
crucible.liquids.clear();
|
||||
crucible.markDirty();
|
||||
|
||||
} else {
|
||||
FMLNetworkHandler.openGui(player, MainRegistry.instance, 0, world, pos[0], pos[1], pos[2]);
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,32 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineSolderingStation;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class MachineSolderingStation extends BlockDummyable {
|
||||
|
||||
public MachineSolderingStation(Material mat) {
|
||||
super(mat);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
if(meta >= 12) return new TileEntityMachineSolderingStation();
|
||||
return new TileEntityProxyCombo().inventory().power().fluid();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getDimensions() {
|
||||
return new int[] {0, 0, 1, 0, 1, 0};
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getOffset() {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
package com.hbm.handler.nei;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.inventory.recipes.ArcFurnaceRecipes;
|
||||
|
||||
public class ArcFurnaceFluidHandler extends NEIUniversalHandler {
|
||||
|
||||
public ArcFurnaceFluidHandler() {
|
||||
super("Arc Furnace (Fluid)", ModBlocks.machine_arc_furnace, ArcFurnaceRecipes.getFluidRecipes());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getKey() {
|
||||
return "ntmArcFurnaceFluid";
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
package com.hbm.handler.nei;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.inventory.recipes.ArcFurnaceRecipes;
|
||||
|
||||
public class ArcFurnaceSolidHandler extends NEIUniversalHandler {
|
||||
|
||||
public ArcFurnaceSolidHandler() {
|
||||
super("Arc Furnace (Solid)", ModBlocks.machine_arc_furnace, ArcFurnaceRecipes.getSolidRecipes());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getKey() {
|
||||
return "ntmArcFurnaceSolid";
|
||||
}
|
||||
}
|
||||
@ -630,6 +630,7 @@ public class OreDictManager {
|
||||
OreDictionary.registerOre("container1000lubricant", bdcl);
|
||||
|
||||
MaterialShapes.registerCompatShapes();
|
||||
compensateMojangSpaghettiBullshit();
|
||||
}
|
||||
|
||||
public static String getReflector() {
|
||||
@ -666,13 +667,36 @@ public class OreDictManager {
|
||||
|
||||
recursionBrake = false;
|
||||
|
||||
if(event.Name.startsWith("ingot") || event.Name.startsWith("ore") || event.Name.startsWith("plate")) {
|
||||
if(event.Name.startsWith("ingot") || event.Name.startsWith("ore") || event.Name.startsWith("plate") || event.Name.startsWith("block")) {
|
||||
arcSmeltable.add(new ComparableStack(event.Ore));
|
||||
}
|
||||
}
|
||||
|
||||
public static final HashSet<ComparableStack> arcSmeltable = new HashSet();
|
||||
|
||||
/** Vanilla item ore dict registration events never actually register in the ODM because vanilla items are registered so early that the ODM event handler doesn't exist yet. */
|
||||
public static void compensateMojangSpaghettiBullshit() {
|
||||
|
||||
arcSmeltable.add(new ComparableStack(Blocks.gold_ore));
|
||||
arcSmeltable.add(new ComparableStack(Blocks.iron_ore));
|
||||
arcSmeltable.add(new ComparableStack(Blocks.lapis_ore));
|
||||
arcSmeltable.add(new ComparableStack(Blocks.diamond_ore));
|
||||
arcSmeltable.add(new ComparableStack(Blocks.redstone_ore));
|
||||
arcSmeltable.add(new ComparableStack(Blocks.emerald_ore));
|
||||
arcSmeltable.add(new ComparableStack(Blocks.quartz_ore));
|
||||
arcSmeltable.add(new ComparableStack(Blocks.gold_block));
|
||||
arcSmeltable.add(new ComparableStack(Blocks.iron_block));
|
||||
arcSmeltable.add(new ComparableStack(Blocks.lapis_block));
|
||||
arcSmeltable.add(new ComparableStack(Blocks.diamond_block));
|
||||
arcSmeltable.add(new ComparableStack(Blocks.redstone_block));
|
||||
arcSmeltable.add(new ComparableStack(Blocks.emerald_block));
|
||||
arcSmeltable.add(new ComparableStack(Blocks.quartz_block));
|
||||
arcSmeltable.add(new ComparableStack(Items.iron_ingot));
|
||||
arcSmeltable.add(new ComparableStack(Items.gold_ingot));
|
||||
arcSmeltable.add(new ComparableStack(Items.brick));
|
||||
arcSmeltable.add(new ComparableStack(Items.netherbrick));
|
||||
}
|
||||
|
||||
public static class DictFrame {
|
||||
public String[] mats;
|
||||
float hazMult = 1.0F;
|
||||
|
||||
@ -7,7 +7,10 @@ import java.util.List;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import static com.hbm.inventory.OreDictManager.*;
|
||||
|
||||
import com.google.gson.JsonArray;
|
||||
import com.google.gson.JsonElement;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import com.hbm.inventory.OreDictManager;
|
||||
import com.hbm.inventory.RecipesCommon.AStack;
|
||||
@ -20,6 +23,7 @@ import com.hbm.inventory.material.NTMMaterial.SmeltingBehavior;
|
||||
import com.hbm.inventory.material.Mats.MaterialStack;
|
||||
import com.hbm.inventory.recipes.loader.SerializableRecipe;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.machine.ItemScraps;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.FurnaceRecipes;
|
||||
@ -94,6 +98,7 @@ public class ArcFurnaceRecipes extends SerializableRecipe {
|
||||
smeltables.add(mat);
|
||||
}
|
||||
}
|
||||
if(smeltables.isEmpty()) return;
|
||||
ArcFurnaceRecipe recipe = recipes.get(astack);
|
||||
if(recipe == null) recipe = new ArcFurnaceRecipe();
|
||||
if(recipe.fluidOutput == null) {
|
||||
@ -102,23 +107,56 @@ public class ArcFurnaceRecipes extends SerializableRecipe {
|
||||
}
|
||||
}
|
||||
|
||||
public static ArcFurnaceRecipe getOutput(ItemStack stack) {
|
||||
public static ArcFurnaceRecipe getOutput(ItemStack stack, boolean liquid) {
|
||||
|
||||
if(stack == null || stack.getItem() == null) return null;
|
||||
|
||||
ComparableStack comp = new ComparableStack(stack).makeSingular();
|
||||
|
||||
if(recipes.containsKey(comp)) return recipes.get(comp);
|
||||
comp.meta = OreDictionary.WILDCARD_VALUE;
|
||||
if(recipes.containsKey(comp)) return recipes.get(comp);
|
||||
if(stack.getItem() == ModItems.scraps && liquid) {
|
||||
NTMMaterial mat = Mats.matById.get(stack.getItemDamage());
|
||||
if(mat == null) return null;
|
||||
MaterialStack mats = ItemScraps.getMats(stack);
|
||||
if(mats.material.smeltable == SmeltingBehavior.SMELTABLE) {
|
||||
return new ArcFurnaceRecipe().fluid(mats);
|
||||
}
|
||||
}
|
||||
|
||||
for(Entry<AStack, ArcFurnaceRecipe> entry : recipes.entrySet()) {
|
||||
if(entry.getKey().matchesRecipe(stack, true)) return entry.getValue();
|
||||
if(entry.getKey().matchesRecipe(stack, true)) {
|
||||
ArcFurnaceRecipe rec = entry.getValue();
|
||||
if((liquid && rec.fluidOutput != null) || (!liquid && rec.solidOutput != null)) {
|
||||
return rec;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public static HashMap getSolidRecipes() {
|
||||
HashMap<Object, Object> recipes = new HashMap<Object, Object>();
|
||||
for(Entry<AStack, ArcFurnaceRecipe> recipe : ArcFurnaceRecipes.recipes.entrySet()) {
|
||||
if(recipe.getValue().solidOutput != null) recipes.put(recipe.getKey().copy(), recipe.getValue().solidOutput.copy());
|
||||
}
|
||||
return recipes;
|
||||
}
|
||||
|
||||
public static HashMap getFluidRecipes() {
|
||||
HashMap<Object, Object> recipes = new HashMap<Object, Object>();
|
||||
for(Entry<AStack, ArcFurnaceRecipe> recipe : ArcFurnaceRecipes.recipes.entrySet()) {
|
||||
if(recipe.getValue().fluidOutput != null) {
|
||||
Object[] out = new Object[recipe.getValue().fluidOutput.length];
|
||||
for(int i = 0; i < out.length; i++) out[i] = ItemScraps.create(recipe.getValue().fluidOutput[i], true);
|
||||
recipes.put(recipe.getKey().copy(), out);
|
||||
}
|
||||
}
|
||||
for(NTMMaterial mat : Mats.orderedList) {
|
||||
if(mat.smeltable == SmeltingBehavior.SMELTABLE) {
|
||||
recipes.put(new ItemStack(ModItems.scraps, 1, mat.id), ItemScraps.create(new MaterialStack(mat, MaterialShapes.INGOT.q(1))));
|
||||
}
|
||||
}
|
||||
return recipes;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFileName() {
|
||||
return "hbmArcFurnace.json";
|
||||
@ -136,7 +174,31 @@ public class ArcFurnaceRecipes extends SerializableRecipe {
|
||||
|
||||
@Override
|
||||
public void readRecipe(JsonElement recipe) {
|
||||
// TBI
|
||||
JsonObject rec = (JsonObject) recipe;
|
||||
ArcFurnaceRecipe arc = new ArcFurnaceRecipe();
|
||||
|
||||
AStack input = this.readAStack(rec.get("input").getAsJsonArray());
|
||||
|
||||
if(rec.has("solid")) {
|
||||
arc.solid(this.readItemStack(rec.get("solid").getAsJsonArray()));
|
||||
}
|
||||
|
||||
if(rec.has("fluid")) {
|
||||
JsonArray fluids = rec.get("fluid").getAsJsonArray();
|
||||
List<MaterialStack> mats = new ArrayList();
|
||||
for(JsonElement fluid : fluids) {
|
||||
JsonArray matStack = fluid.getAsJsonArray();
|
||||
MaterialStack stack = new MaterialStack(Mats.matById.get(matStack.get(0).getAsInt()), matStack.get(1).getAsInt());
|
||||
if(stack.material.smeltable == SmeltingBehavior.SMELTABLE) {
|
||||
mats.add(stack);
|
||||
}
|
||||
}
|
||||
if(!mats.isEmpty()) {
|
||||
arc.fluid(mats.toArray(new MaterialStack[0]));
|
||||
}
|
||||
}
|
||||
|
||||
this.recipes.put(input, arc);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -68,10 +68,11 @@ public abstract class SerializableRecipe {
|
||||
recipeHandlers.add(new ArcWelderRecipes());
|
||||
recipeHandlers.add(new ExposureChamberRecipes());
|
||||
recipeHandlers.add(new AssemblerRecipes());
|
||||
recipeHandlers.add(new ArcFurnaceRecipes());
|
||||
|
||||
recipeHandlers.add(new MatDistribution());
|
||||
recipeHandlers.add(new CustomMachineRecipes());
|
||||
//AFTER MatDistribution
|
||||
recipeHandlers.add(new ArcFurnaceRecipes());
|
||||
}
|
||||
|
||||
public static void initialize() {
|
||||
|
||||
@ -316,6 +316,7 @@ public class ClientProxy extends ServerProxy {
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachinePumpSteam.class, new RenderPump());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachinePumpElectric.class, new RenderPump());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineArcWelder.class, new RenderArcWelder());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineSolderingStation.class, new RenderSolderingStation());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineArcFurnaceLarge.class, new RenderArcFurnace());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineWoodBurner.class, new RenderWoodBurner());
|
||||
//Foundry
|
||||
|
||||
@ -243,7 +243,6 @@ public class CraftingManager {
|
||||
addRecipeAuto(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_puf6_tank), 1), new Object[] { "WTW", "WTW", "SRS", 'S', STEEL.plate(), 'W', ModItems.coil_tungsten, 'T', ModItems.tank_steel, 'W', ModItems.coil_tungsten,'R', MINGRADE.ingot() });
|
||||
addRecipeAuto(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_nuke_furnace_off), 1), new Object[] { "SSS", "LFL", "CCC", 'S', STEEL.plate(), 'C', CU.plateCast(), 'L', PB.plate(), 'F', Item.getItemFromBlock(Blocks.furnace) });
|
||||
addRecipeAuto(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_electric_furnace_off), 1), new Object[] { "BBB", "WFW", "RRR", 'B', BE.ingot(), 'R', ModItems.coil_tungsten, 'W', CU.plateCast(), 'F', Item.getItemFromBlock(Blocks.furnace) });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.machine_arc_furnace_off, 1), new Object[] { "ITI", "PFP", "ITI", 'I', W.ingot(), 'T', ModBlocks.machine_transformer, 'P', CU.plateWelded(), 'F', Blocks.furnace });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.red_wire_coated, 16), new Object[] { "WRW", "RIR", "WRW", 'W', ModItems.plate_polymer, 'I', MINGRADE.ingot(), 'R', ModItems.wire_red_copper });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.red_cable_paintable, 16), new Object[] { "WRW", "RIR", "WRW", 'W', STEEL.plate(), 'I', MINGRADE.ingot(), 'R', ModItems.wire_red_copper });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.cable_switch, 1), new Object[] { "S", "W", 'S', Blocks.lever, 'W', ModBlocks.red_wire_coated });
|
||||
|
||||
@ -81,7 +81,6 @@ import cpw.mods.fml.common.gameevent.PlayerEvent.PlayerChangedDimensionEvent;
|
||||
import cpw.mods.fml.common.gameevent.TickEvent;
|
||||
import cpw.mods.fml.common.gameevent.TickEvent.Phase;
|
||||
import cpw.mods.fml.common.gameevent.TickEvent.WorldTickEvent;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import cpw.mods.fml.relauncher.ReflectionHelper;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.enchantment.Enchantment;
|
||||
|
||||
@ -63,6 +63,8 @@ public class NEIRegistry {
|
||||
handlers.add(new AshpitHandler());
|
||||
handlers.add(new ArcWelderHandler());
|
||||
handlers.add(new ExposureChamberHandler());
|
||||
handlers.add(new ArcFurnaceSolidHandler());
|
||||
handlers.add(new ArcFurnaceFluidHandler());
|
||||
|
||||
return handlers;
|
||||
}
|
||||
|
||||
@ -156,6 +156,9 @@ public class ResourceManager {
|
||||
//Arc Welder
|
||||
public static final IModelCustom arc_welder = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/arc_welder.obj"), false).asVBO();
|
||||
|
||||
//Solderer
|
||||
public static final IModelCustom soldering_station = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/soldering_station.obj"), false).asVBO();
|
||||
|
||||
//Arc Furnace
|
||||
public static final IModelCustom arc_furnace = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/arc_furnace.obj")).asVBO();
|
||||
|
||||
@ -555,6 +558,9 @@ public class ResourceManager {
|
||||
//Welder
|
||||
public static final ResourceLocation arc_welder_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/arc_welder.png");
|
||||
|
||||
//Solderer
|
||||
public static final ResourceLocation soldering_station_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/soldering_station.png");
|
||||
|
||||
//Arc Furnace
|
||||
public static final ResourceLocation arc_furnace_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/arc_furnace.png");
|
||||
|
||||
|
||||
@ -82,7 +82,7 @@ public class ParticleFoundry extends EntityFX {
|
||||
int r = (int) (255D - (255D - color.getRed()) * brightener);
|
||||
int g = (int) (255D - (255D - color.getGreen()) * brightener);
|
||||
int b = (int) (255D - (255D - color.getBlue()) * brightener);
|
||||
|
||||
|
||||
GL11.glColor3f(r / 255F, g / 255F, b / 255F);
|
||||
|
||||
GL11.glPushMatrix();
|
||||
@ -170,9 +170,8 @@ public class ParticleFoundry extends EntityFX {
|
||||
tess.addVertexWithUV(dirXG - rotXW, 0, dirZG - rotZW, uMin, vMin + add + 0.75);
|
||||
tess.addVertexWithUV(-rotXW, girth, -rotZW, uMin, vMax + add + 0.75);
|
||||
tess.addVertexWithUV(rotXW, girth, rotZW, uMax, vMax + add + 0.75);
|
||||
|
||||
tess.draw();
|
||||
|
||||
tess.draw();
|
||||
|
||||
GL11.glColor3f(1F, 1F, 1F);
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
|
||||
@ -0,0 +1,86 @@
|
||||
package com.hbm.render.tileentity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.item.ItemRenderBase;
|
||||
import com.hbm.render.util.RenderDecoItem;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineArcWelder;
|
||||
|
||||
import net.minecraft.client.renderer.entity.RenderItem;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
|
||||
public class RenderSolderingStation extends TileEntitySpecialRenderer implements IItemRendererProvider {
|
||||
|
||||
private RenderItem itemRenderer = new RenderDecoItem(this);
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float interp) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(x + 0.5, y, z + 0.5);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
|
||||
switch(tile.getBlockMetadata() - BlockDummyable.offset) {
|
||||
case 2: GL11.glRotatef(90, 0F, 1F, 0F); break;
|
||||
case 4: GL11.glRotatef(180, 0F, 1F, 0F); break;
|
||||
case 3: GL11.glRotatef(270, 0F, 1F, 0F); break;
|
||||
case 5: GL11.glRotatef(0, 0F, 1F, 0F); break;
|
||||
}
|
||||
|
||||
GL11.glTranslated(-0.5, 0, 0.5);
|
||||
|
||||
bindTexture(ResourceManager.soldering_station_tex);
|
||||
ResourceManager.soldering_station.renderAll();
|
||||
|
||||
/*TileEntityMachineArcWelder welder = (TileEntityMachineArcWelder) tile;
|
||||
if(welder.display != null) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(0.0625D * 2.5D, 1.125D, 0D);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glRotatef(90, 0F, 1F, 0F);
|
||||
GL11.glRotatef(-90, 1F, 0F, 0F);
|
||||
|
||||
if(welder.display != null) {
|
||||
ItemStack stack = welder.display.copy();
|
||||
|
||||
EntityItem item = new EntityItem(null, 0.0D, 0.0D, 0.0D, stack);
|
||||
item.getEntityItem().stackSize = 1;
|
||||
item.hoverStart = 0.0F;
|
||||
|
||||
RenderItem.renderInFrame = true;
|
||||
GL11.glScaled(1.5, 1.5, 1.5);
|
||||
this.itemRenderer.doRender(item, 0.0D, 0.0D, 0.0D, 0.0F, 0.0F);
|
||||
RenderItem.renderInFrame = false;
|
||||
}
|
||||
GL11.glPopMatrix();
|
||||
}*/
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemForRenderer() {
|
||||
return Item.getItemFromBlock(ModBlocks.machine_soldering_station);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IItemRenderer getRenderer() {
|
||||
return new ItemRenderBase( ) {
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(0, -1, 0);
|
||||
GL11.glScaled(5, 5, 5);
|
||||
}
|
||||
public void renderCommon() {
|
||||
bindTexture(ResourceManager.soldering_station_tex);
|
||||
ResourceManager.soldering_station.renderAll();
|
||||
}};
|
||||
}
|
||||
}
|
||||
@ -41,7 +41,7 @@ public class RenderAccessoryUtility {
|
||||
private static ResourceLocation rightnugget = new ResourceLocation(RefStrings.MODID + ":textures/models/capes/CapeRightNugget.png");
|
||||
private static ResourceLocation tankish = new ResourceLocation(RefStrings.MODID + ":textures/models/capes/CapeTankish.png");
|
||||
private static ResourceLocation frizzlefrazzle = new ResourceLocation(RefStrings.MODID + ":textures/models/capes/CapeFrizzleFrazzle.png");
|
||||
private static ResourceLocation pheo = new ResourceLocation(RefStrings.MODID + ":textures/models/capes/CapePheo.png");
|
||||
//private static ResourceLocation pheo = new ResourceLocation(RefStrings.MODID + ":textures/models/capes/CapePheo.png");
|
||||
private static ResourceLocation vaer = new ResourceLocation(RefStrings.MODID + ":textures/models/capes/CapeVaer.png");
|
||||
private static ResourceLocation adam = new ResourceLocation(RefStrings.MODID + ":textures/models/capes/CapeAdam.png");
|
||||
private static ResourceLocation alcater = new ResourceLocation(RefStrings.MODID + ":textures/models/capes/CapeAlcater.png");
|
||||
|
||||
@ -313,6 +313,7 @@ public class TileMappings {
|
||||
put(TileEntityElectrolyser.class, "tileentity_electrolyser");
|
||||
put(TileEntityMachineMixer.class, "tileentity_mixer");
|
||||
put(TileEntityMachineArcWelder.class, "tileentity_arc_welder");
|
||||
put(TileEntityMachineSolderingStation.class, "tileentity_soldering_station");
|
||||
put(TileEntityMachineArcFurnaceLarge.class, "tileentity_arc_furnace_large");
|
||||
|
||||
put(TileEntitySteamEngine.class, "tileentity_steam_engine");
|
||||
|
||||
@ -289,7 +289,7 @@ public class TileEntityMachineArcFurnace extends TileEntityLoadedBase implements
|
||||
{
|
||||
if(slots[i].stackSize <= 0)
|
||||
{
|
||||
slots[i] = new ItemStack(slots[i].getItem().setFull3D());
|
||||
slots[i] = new ItemStack(slots[i].getItem());
|
||||
}else{
|
||||
slots[i].stackSize--;
|
||||
}
|
||||
@ -298,15 +298,6 @@ public class TileEntityMachineArcFurnace extends TileEntityLoadedBase implements
|
||||
slots[i] = null;
|
||||
}
|
||||
}
|
||||
|
||||
for(int i = 2; i < 5; i++) {
|
||||
if(slots[i] != null && slots[i].getItem() == ModItems.arc_electrode) {
|
||||
if(slots[i].getItemDamage() < slots[i].getMaxDamage())
|
||||
slots[i].setItemDamage(slots[i].getItemDamage() + 1);
|
||||
else
|
||||
slots[i] = new ItemStack(ModItems.arc_electrode_burnt);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -45,7 +45,7 @@ import net.minecraftforge.common.util.ForgeDirection;
|
||||
public class TileEntityMachineArcFurnaceLarge extends TileEntityMachineBase implements IEnergyReceiverMK2, IControlReceiver, IGUIProvider, IUpgradeInfoProvider {
|
||||
|
||||
public long power;
|
||||
public static final long maxPower = 10_000_000;
|
||||
public static final long maxPower = 2_500_000;
|
||||
public boolean liquidMode = false;
|
||||
public float progress;
|
||||
public boolean isProgressing;
|
||||
@ -183,7 +183,7 @@ public class TileEntityMachineArcFurnaceLarge extends TileEntityMachineBase impl
|
||||
|
||||
for(int i = 5; i < 25; i++) {
|
||||
if(slots[i] == null) continue;
|
||||
ArcFurnaceRecipe recipe = ArcFurnaceRecipes.getOutput(slots[i]);
|
||||
ArcFurnaceRecipe recipe = ArcFurnaceRecipes.getOutput(slots[i], this.liquidMode);
|
||||
if(recipe == null) continue;
|
||||
|
||||
if(!liquidMode && recipe.solidOutput != null) {
|
||||
@ -214,7 +214,7 @@ public class TileEntityMachineArcFurnaceLarge extends TileEntityMachineBase impl
|
||||
|
||||
for(int i = 5; i < 25; i++) {
|
||||
if(slots[i] == null) continue;
|
||||
ArcFurnaceRecipe recipe = ArcFurnaceRecipes.getOutput(slots[i]);
|
||||
ArcFurnaceRecipe recipe = ArcFurnaceRecipes.getOutput(slots[i], this.liquidMode);
|
||||
if(recipe == null) continue;
|
||||
if(liquidMode && recipe.fluidOutput != null) return true;
|
||||
if(!liquidMode && recipe.solidOutput != null) return true;
|
||||
@ -237,15 +237,15 @@ public class TileEntityMachineArcFurnaceLarge extends TileEntityMachineBase impl
|
||||
|
||||
@Override
|
||||
public boolean canInsertItem(int slot, ItemStack stack, int side) {
|
||||
return this.isItemValidForSlot(slot, stack) && stack.stackSize <= 1;
|
||||
return this.isItemValidForSlot(slot, stack) && stack.stackSize <= 1 && this.lid > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isItemValidForSlot(int slot, ItemStack stack) {
|
||||
if(slot < 3) return stack.getItem() == ModItems.arc_electrode;
|
||||
if(slot > 4) {
|
||||
if(lid <= 0 || slots[slot] != null) return false;
|
||||
ArcFurnaceRecipe recipe = ArcFurnaceRecipes.getOutput(stack);
|
||||
if(slots[slot] != null) return false;
|
||||
ArcFurnaceRecipe recipe = ArcFurnaceRecipes.getOutput(stack, this.liquidMode);
|
||||
if(recipe == null) return false;
|
||||
return liquidMode ? recipe.fluidOutput != null : recipe.solidOutput != null;
|
||||
}
|
||||
@ -255,7 +255,7 @@ public class TileEntityMachineArcFurnaceLarge extends TileEntityMachineBase impl
|
||||
@Override
|
||||
public boolean canExtractItem(int slot, ItemStack stack, int side) {
|
||||
if(slot < 3) return lid >= 1 && stack.getItem() != ModItems.arc_electrode;
|
||||
if(slot > 4) return lid > 0 && ArcFurnaceRecipes.getOutput(stack) == null;
|
||||
if(slot > 4) return lid > 0 && ArcFurnaceRecipes.getOutput(stack, this.liquidMode) == null;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@ -0,0 +1,20 @@
|
||||
package com.hbm.tileentity.machine;
|
||||
|
||||
import com.hbm.tileentity.TileEntityMachineBase;
|
||||
|
||||
public class TileEntityMachineSolderingStation extends TileEntityMachineBase {
|
||||
|
||||
public TileEntityMachineSolderingStation() {
|
||||
super(11);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "container.machineSolderingStation";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
|
||||
}
|
||||
}
|
||||
@ -351,6 +351,7 @@ container.launchPadRusted=Startrampe
|
||||
container.launchTable=Große Startrampe
|
||||
container.leadBox=Sicherheitsbehälter
|
||||
container.machineArcWelder=Lichtbogenschweißer
|
||||
container.machineArcFurnaceLarge=Elektrischer Lichtbogenofen
|
||||
container.machineBoiler=Ölwärmer
|
||||
container.machineCMB=CMB-Stahl Hochofen
|
||||
container.machineCoal=Verbrennungsgenerator
|
||||
@ -4146,6 +4147,7 @@ tile.launch_table.name=Große Startrampe
|
||||
tile.leaves_layer.name=Totes Laub
|
||||
tile.lox_barrel.name=LOX-Fass
|
||||
tile.machine_amgen.name=Umgebungsstrahlungs-Generator
|
||||
tile.machine_arc_furnace.name=Electrischer Lichtbogenofen
|
||||
tile.machine_arc_furnace_off.name=Lichtbogenofen
|
||||
tile.machine_arc_furnace_on.name=Lichtbogenofen
|
||||
tile.machine_arc_welder.name=Lichtbogenschweißer
|
||||
|
||||
@ -744,6 +744,7 @@ container.launchPadRusted=Launch Pad
|
||||
container.launchTable=Large Launch Pad
|
||||
container.leadBox=Containment Box
|
||||
container.machineArcWelder=Arc Welder
|
||||
container.machineArcFurnaceLarge=Electric Arc Furnace
|
||||
container.machineBoiler=Oil Heater
|
||||
container.machineCMB=CMB Steel Furnace
|
||||
container.machineCoal=Combustion Generator
|
||||
@ -5206,6 +5207,7 @@ tile.launch_table.name=Large Launch Pad
|
||||
tile.leaves_layer.name=Fallen Leaves
|
||||
tile.lox_barrel.name=LOX Barrel
|
||||
tile.machine_amgen.name=Ambience Radiation Generator
|
||||
tile.machine_arc_furnace.name=Electric Arc Furnace
|
||||
tile.machine_arc_furnace_off.name=Arc Furnace
|
||||
tile.machine_arc_furnace_on.name=Arc Furnace
|
||||
tile.machine_arc_welder.name=Arc Welder
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user