removed trash recipes, iGen recycling

This commit is contained in:
Boblet 2021-10-06 15:57:52 +02:00
parent 64ea95b102
commit 95bfb1c485
6 changed files with 67 additions and 8 deletions

View File

@ -48,7 +48,7 @@ public class MachineIGenerator extends BlockDummyable {
return false;
}
@Override
/*@Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
if(world.isRemote) {
@ -69,7 +69,7 @@ public class MachineIGenerator extends BlockDummyable {
} else {
return false;
}
}
}*/
@Override
public int[] getDimensions() {
@ -105,7 +105,7 @@ public class MachineIGenerator extends BlockDummyable {
MultiblockHandlerXR.fillSpace(world, x + dir.offsetX * o , y + dir.offsetY * o, z + dir.offsetZ * o, new int [] {3,-2,1,1,-1,3}, this, dir);
MultiblockHandlerXR.fillSpace(world, x + dir.offsetX * o , y + dir.offsetY * o, z + dir.offsetZ * o, new int [] {4,-2,1,1,1,0}, this, dir);
int[] rot = MultiblockHandlerXR.rotate(new int [] {1,0,2,2,8,8}, dir);
/*int[] rot = MultiblockHandlerXR.rotate(new int [] {1,0,2,2,8,8}, dir);
for(int iy = 0; iy <= 1; iy++) {
for(int ix = -rot[4]; ix <= rot[5]; ix++) {
@ -116,6 +116,6 @@ public class MachineIGenerator extends BlockDummyable {
}
}
}
}
}*/
}
}

View File

@ -525,7 +525,7 @@ public class AssemblerRecipes {
new OreDictStack("ingotAsbestos", 8)
}, 200);
makeRecipe(new ComparableStack(ModBlocks.machine_industrial_generator, 1), new AStack[] {
/*makeRecipe(new ComparableStack(ModBlocks.machine_industrial_generator, 1), new AStack[] {
new ComparableStack(ModBlocks.machine_coal_off, 2),
new ComparableStack(ModBlocks.machine_boiler_off, 2),
new ComparableStack(ModBlocks.machine_large_turbine, 1),
@ -535,7 +535,7 @@ public class AssemblerRecipes {
new OreDictStack("plateLead", 8),
new OreDictStack("plateAluminum", 12),
new ComparableStack(ModItems.pipes_steel, 1)
}, 200);
}, 200);*/
makeRecipe(new ComparableStack(ModItems.ammo_75bolt, 2), new AStack[] {
new OreDictStack("plateSteel", 2),

View File

@ -0,0 +1,5 @@
package com.hbm.inventory.recipes;
public class ChemplantRecipes {
}

View File

@ -470,6 +470,19 @@ public class AnvilRecipes {
constructionRecipes.add(new AnvilConstructionRecipe(
new ComparableStack(ModItems.pile_rod_boron),
new AnvilOutput[] {new AnvilOutput(new ItemStack(ModItems.ingot_boron, 2)), new AnvilOutput(new ItemStack(Items.stick, 2))}).setTier(3));
constructionRecipes.add(new AnvilConstructionRecipe(
new ComparableStack(ModBlocks.machine_industrial_generator), new AnvilOutput[] {
new AnvilOutput(new ItemStack(ModBlocks.machine_coal_off, 2)),
new AnvilOutput(new ItemStack(ModBlocks.machine_boiler_off, 2)),
new AnvilOutput(new ItemStack(ModBlocks.machine_large_turbine, 1)),
new AnvilOutput(new ItemStack(ModBlocks.machine_transformer, 1)),
new AnvilOutput(new ItemStack(ModBlocks.steel_scaffold, 20)),
new AnvilOutput(new ItemStack(ModItems.ingot_steel, 12)),
new AnvilOutput(new ItemStack(ModItems.plate_lead, 8)),
new AnvilOutput(new ItemStack(ModItems.plate_aluminium, 12)),
new AnvilOutput(new ItemStack(ModItems.pipes_steel, 1))
}).setTier(2));
}
public static void pullFromAssembler(ComparableStack result, int tier) {

View File

@ -1,8 +1,13 @@
package com.hbm.inventory.recipes.loader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import com.google.gson.Gson;
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.RecipesCommon.AStack;
import com.hbm.inventory.RecipesCommon.ComparableStack;
@ -13,6 +18,44 @@ import net.minecraft.item.Item;
import net.minecraftforge.oredict.OreDictionary;
public abstract class JSONLoaderBase {
public File config;
public File template;
private final Gson gson = new Gson();
public JSONLoaderBase() {
}
public void loadRecipes() {
registerDefaults();
//saveTemplateJSON(template);
if(config != null) {
loadJSONRecipes();
}
}
protected abstract void registerDefaults();
protected void loadJSONRecipes() {
try {
JsonObject json = gson.fromJson(new FileReader(config), JsonObject.class);
JsonElement recipes = json.get("recipes");
if(recipes instanceof JsonArray) {
JsonArray recArray = recipes.getAsJsonArray();
for(JsonElement recipe : recArray) {
if(recipe.isJsonObject()) {
}
}
}
} catch (Exception e) { }
}
protected static AStack aStackFromArray(JsonArray array) {

View File

@ -284,8 +284,6 @@ public class CraftingManager {
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.screwdriver, 1), new Object[] { " I", " I ", "S ", 'S', "ingotSteel", 'I', "ingotIron" }));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.overfuse, 1), new Object[] { ModItems.screwdriver, "dustNeptunium", ModItems.powder_iodine, ModItems.powder_thorium, ModItems.powder_astatine, ModItems.powder_neodymium, ModItems.board_copper, ModItems.black_hole, ModItems.powder_caesium }));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.overfuse, 1), new Object[] { ModItems.screwdriver, ModItems.powder_strontium, ModItems.powder_bromine, ModItems.powder_cobalt, ModItems.powder_tennessine, ModItems.powder_niobium, ModItems.board_copper, ModItems.black_hole, ModItems.powder_cerium }));
GameRegistry.addRecipe(new ItemStack(ModItems.crystal_energy, 1), new Object[] { "EEE", "EGE", "EEE", 'E', ModItems.powder_power, 'G', Items.glowstone_dust });
GameRegistry.addRecipe(new ItemStack(ModItems.pellet_coolant, 1), new Object[] { "CRC", "RBR", "CRC", 'C', ModItems.powder_ice, 'R', ModItems.rod_quad_coolant, 'B', ModBlocks.block_niter });
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.blades_aluminium, 1), new Object[] { " P ", "PIP", " P ", 'P', "plateAluminum", 'I', "ingotAluminum" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.blades_gold, 1), new Object[] { " P ", "PIP", " P ", 'P', "plateGold", 'I', "ingotGold" }));