recipe tweaks

This commit is contained in:
Boblet 2023-10-11 16:51:42 +02:00
parent 997c4fd757
commit 2b7ffd6902
3 changed files with 153 additions and 139 deletions

View File

@ -274,7 +274,7 @@ public class AssemblerRecipes {
makeRecipe(new ComparableStack(ModBlocks.machine_centrifuge, 1), new AStack[] {new ComparableStack(ModItems.centrifuge_element, 1), new OreDictStack(ANY_PLASTIC.ingot(), 2), new OreDictStack(STEEL.plate528(), 8), new OreDictStack(CU.plate(), 8), new ComparableStack(ModItems.circuit_copper, 1), }, 200);
makeRecipe(new ComparableStack(ModBlocks.machine_gascent, 1), new AStack[] {new ComparableStack(ModItems.centrifuge_element, 4), new OreDictStack(ANY_PLASTIC.ingot(), 4), new OreDictStack(DESH.ingot(), 2), new OreDictStack(STEEL.plate528(), 8), new ComparableStack(ModItems.coil_tungsten, 4), new ComparableStack(ModItems.circuit_red_copper, 1) }, 300);
makeRecipe(new ComparableStack(ModBlocks.machine_rtg_furnace_off, 1), new AStack[] {new ComparableStack(Blocks.furnace, 1), new ComparableStack(ModItems.rtg_unit, 3), new OreDictStack(PB.plate528(), 6), new OreDictStack(OreDictManager.getReflector(), 4), new OreDictStack(CU.plate(), 2), },150);
makeRecipe(new ComparableStack(ModBlocks.machine_diesel, 1), new AStack[] {new ComparableStack(ModItems.hull_small_steel, 1), new ComparableStack(ModItems.piston_selenium, 1), new OreDictStack(IRON.plateWelded(), 1), new OreDictStack(CU.plate(), 4), new ComparableStack(ModItems.coil_copper, 4), }, 100);
makeRecipe(new ComparableStack(ModBlocks.machine_diesel, 1), new AStack[] {new ComparableStack(ModItems.hull_small_steel, 1), new ComparableStack(ModItems.piston_selenium, 1), new OreDictStack(STEEL.plateCast(), 1), new ComparableStack(ModItems.coil_copper, 4), }, 60);
makeRecipe(new ComparableStack(ModBlocks.machine_selenium, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 4), new OreDictStack(TI.plate(), 6), new OreDictStack(CU.plate(), 8), new ComparableStack(ModItems.hull_big_steel, 1), new ComparableStack(ModItems.hull_small_steel, 9), new ComparableStack(ModItems.pedestal_steel, 1), new ComparableStack(ModItems.coil_copper, 4), },250);
makeRecipe(new ComparableStack(ModBlocks.machine_rtg_grey, 1), new AStack[] {new ComparableStack(ModItems.rtg_unit, 3), new OreDictStack(STEEL.plate528(), 4), new ComparableStack(ModItems.wire_red_copper, 4), new OreDictStack(ANY_PLASTIC.ingot(), 3), },200);
makeRecipe(new ComparableStack(ModBlocks.machine_battery, 1), new AStack[] {new OreDictStack(STEEL.plateWelded(), 1), new OreDictStack(S.dust(), 12), new OreDictStack(PB.dust(), 12), new OreDictStack(MINGRADE.ingot(), 2), new ComparableStack(ModItems.wire_red_copper, 4), },200);
@ -285,13 +285,13 @@ public class AssemblerRecipes {
makeRecipe(new ComparableStack(ModBlocks.machine_well, 1), new AStack[] {new ComparableStack(ModBlocks.steel_scaffold, 20), new ComparableStack(ModBlocks.steel_beam, 8), new ComparableStack(ModItems.tank_steel, 2), new ComparableStack(ModItems.motor, 1), new ComparableStack(ModItems.pipes_steel, 3), new ComparableStack(ModItems.drill_titanium, 1), new ComparableStack(ModItems.wire_red_copper, 6), },250);
makeRecipe(new ComparableStack(ModBlocks.machine_pumpjack, 1), new AStack[] {new ComparableStack(ModBlocks.steel_scaffold, 8), new OreDictStack(STEEL.plateWelded(), 8), new ComparableStack(ModItems.pipes_steel, 4), new ComparableStack(ModItems.tank_steel, 4), new OreDictStack(STEEL.plate(), 32), new ComparableStack(ModItems.drill_titanium, 1), new ComparableStack(ModItems.motor, 2) }, 400);
makeRecipe(new ComparableStack(ModBlocks.machine_flare, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 12), new OreDictStack(IRON.ingot(), 12), new OreDictStack(CU.plate528(), 4), new ComparableStack(ModItems.tank_steel, 1), new ComparableStack(ModBlocks.deco_pipe_quad, 8), new ComparableStack(ModItems.hull_small_steel, 4), new ComparableStack(ModItems.thermo_element, 3), },200);
makeRecipe(new ComparableStack(ModBlocks.machine_coker, 1), new AStack[] {!exp ? new OreDictStack(STEEL.plateWelded(), 4) : new OreDictStack(STEEL.heavyComp(), 2), new OreDictStack(IRON.ingot(), 12), new OreDictStack(CU.plate528(), 8), new OreDictStack(RUBBER.ingot(), 4), new ComparableStack(ModItems.tank_steel, 2), new ComparableStack(ModBlocks.steel_grate, 4) },200);
makeRecipe(new ComparableStack(ModBlocks.machine_coker, 1), new AStack[] {!exp ? new OreDictStack(STEEL.plateWelded(), 3) : new OreDictStack(STEEL.heavyComp(), 2), new OreDictStack(IRON.ingot(), 16), new OreDictStack(CU.plate528(), 8), new OreDictStack(RUBBER.ingot(), 4), new ComparableStack(ModItems.tank_steel, 2), new ComparableStack(ModBlocks.steel_grate, 4) },200);
makeRecipe(new ComparableStack(ModBlocks.machine_refinery, 1), new AStack[] {!exp ? new OreDictStack(STEEL.plateWelded(), 3) : new OreDictStack(STEEL.heavyComp(), 1), new OreDictStack(CU.plate528(), 16), new ComparableStack(ModItems.hull_big_steel, 6), new ComparableStack(ModItems.pipes_steel, 2), new ComparableStack(ModItems.plate_polymer, 8), new ComparableStack(ModItems.circuit_red_copper, 1) },350);
makeRecipe(new ComparableStack(ModBlocks.machine_epress, 1), new AStack[] {new OreDictStack(STEEL.plate(), 8), new ComparableStack(ModItems.plate_polymer, 4), new ComparableStack(ModItems.part_generic, 2, EnumPartType.PISTON_HYDRAULIC.ordinal()), new ComparableStack(ModItems.circuit_copper, 1) }, 100);
makeRecipe(new ComparableStack(ModBlocks.machine_chemplant, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 8), new OreDictStack(CU.plate528(), 6), new ComparableStack(ModItems.tank_steel, 4), new ComparableStack(ModItems.hull_big_steel, 1), new ComparableStack(ModItems.coil_tungsten, 3), new ComparableStack(ModItems.circuit_copper, 2), new ComparableStack(ModItems.circuit_red_copper, 1), new ComparableStack(ModItems.plate_polymer, 8), },200);
makeRecipe(new ComparableStack(ModBlocks.machine_crystallizer, 1), new AStack[] {new ComparableStack(ModItems.hull_big_steel, 4), new ComparableStack(ModItems.pipes_steel, 1), new OreDictStack(DESH.ingot(), 4), new ComparableStack(ModItems.motor, 2), new ComparableStack(ModItems.blades_advanced_alloy, 2), new OreDictStack(STEEL.plateWelded(), 4), new OreDictStack(TI.plate(), 16), new ComparableStack(Blocks.glass, 4), new ComparableStack(ModItems.circuit_gold, 1), },400);
makeRecipe(new ComparableStack(ModBlocks.machine_fluidtank, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 2), new OreDictStack(STEEL.plate528(), 6), new ComparableStack(ModItems.hull_big_steel, 4), new OreDictStack(ANY_TAR.any(), 4), },150);
makeRecipe(new ComparableStack(ModBlocks.machine_bat9000, 1), new AStack[] {new OreDictStack(STEEL.plate528(), 16), new OreDictStack(ANY_RESISTANTALLOY.plateWelded(), 3), new ComparableStack(ModBlocks.steel_scaffold, 16), new OreDictStack(ANY_TAR.any(), 16), },150);
makeRecipe(new ComparableStack(ModBlocks.machine_bat9000, 1), new AStack[] {new OreDictStack(STEEL.plate528(), 16), new OreDictStack(ANY_RESISTANTALLOY.plateWelded(), 2), new ComparableStack(ModBlocks.steel_scaffold, 16), new OreDictStack(ANY_TAR.any(), 16), },150);
makeRecipe(new ComparableStack(ModBlocks.machine_orbus, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 12), new OreDictStack(ANY_RESISTANTALLOY.plateWelded(), 8), new OreDictStack(BIGMT.plate(), 12), new ComparableStack(ModItems.coil_advanced_alloy, 12), new ComparableStack(ModItems.battery_sc_polonium, 1) }, 200);
makeRecipe(new ComparableStack(ModBlocks.machine_mining_laser, 1), new AStack[] {new ComparableStack(ModItems.tank_steel, 3), !exp ? new OreDictStack(STEEL.plate528(), 16) : new OreDictStack(STEEL.heavyComp(), 3), new ComparableStack(ModItems.crystal_redstone, 3), new ComparableStack(Items.diamond, 3), new OreDictStack(ANY_PLASTIC.ingot(), 4), new ComparableStack(ModItems.motor, 3), !exp ? new OreDictStack(DURA.ingot(), 4) : new OreDictStack(DESH.heavyComp(), 1), new ComparableStack(ModItems.bolt_dura_steel, 6), new ComparableStack(ModBlocks.machine_battery, 3), },400);
makeRecipe(new ComparableStack(ModBlocks.machine_turbofan, 1), new AStack[] {!exp ? new ComparableStack(ModItems.hull_big_steel, 1) : new OreDictStack(STEEL.heavyComp(), 1), new ComparableStack(ModItems.hull_big_titanium, 3), new ComparableStack(ModItems.hull_small_steel, 2), new ComparableStack(ModItems.turbine_tungsten, 1), new ComparableStack(ModItems.turbine_titanium, 7), new ComparableStack(ModItems.bolt_compound, 8), new OreDictStack(MINGRADE.ingot(), 12), new ComparableStack(ModItems.wire_red_copper, 24), },500);
@ -301,7 +301,7 @@ public class AssemblerRecipes {
makeRecipe(new ComparableStack(ModBlocks.fusion_conductor, 1), new AStack[] {new ComparableStack(ModItems.coil_advanced_alloy, 5), }, 100);
makeRecipe(new ComparableStack(ModBlocks.fusion_center, 1), new AStack[] {new OreDictStack(ANY_HARDPLASTIC.ingot(), 4), new OreDictStack(STEEL.plate528(), 6), new ComparableStack(ModItems.wire_advanced_alloy, 24), },200);
makeRecipe(new ComparableStack(ModBlocks.fusion_motor, 1), new AStack[] {new OreDictStack(TI.ingot(), 4), new OreDictStack(STEEL.ingot(), 2), new ComparableStack(ModItems.motor, 4), },250);
makeRecipe(new ComparableStack(ModBlocks.fusion_heater, 1), new AStack[] {new OreDictStack(W.plateWelded(), 1), new OreDictStack(STEEL.plateWelded(), 2), new OreDictStack(OreDictManager.getReflector(), 2), new ComparableStack(ModItems.magnetron, 1) }, 200);
makeRecipe(new ComparableStack(ModBlocks.fusion_heater, 4), new AStack[] {new OreDictStack(W.plateWelded(), 2), new OreDictStack(STEEL.plateWelded(), 2), new OreDictStack(OreDictManager.getReflector(), 2), new ComparableStack(ModItems.magnetron, 2) }, 200);
makeRecipe(new ComparableStack(ModBlocks.watz_element, 3), new AStack[] {new OreDictStack(STEEL.plateCast(), 2), new OreDictStack(ZR.ingot(), 2), new OreDictStack(BIGMT.ingot(), 2), new OreDictStack(ANY_HARDPLASTIC.ingot(), 4)},200);
makeRecipe(new ComparableStack(ModBlocks.watz_cooler, 3), new AStack[] {new OreDictStack(STEEL.plateCast(), 2), new OreDictStack(CU.plateCast(), 4), new OreDictStack(RUBBER.ingot(), 2), }, 200);
makeRecipe(new ComparableStack(ModBlocks.watz_end, 3), new AStack[] {new OreDictStack(ANY_RESISTANTALLOY.plateWelded()), new OreDictStack(B.ingot(), 3), new OreDictStack(STEEL.plateWelded(), 2), }, 100);

View File

@ -1,7 +1,6 @@
package com.hbm.items.tool;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import com.google.gson.stream.JsonWriter;
@ -21,152 +20,167 @@ import net.minecraft.world.World;
import net.minecraftforge.client.event.RenderGameOverlayEvent;
import net.minecraftforge.common.util.ForgeDirection;
import java.io.File;
import java.io.FileWriter;
import java.util.ArrayList;
import java.util.List;
public class ItemCMStructure extends Item implements ILookOverlay {
File file = new File(MainRegistry.configHbmDir, "CMstructureOutput.txt");
public static BlockPos getAnchor(ItemStack stack) {
public class ItemCMStructure extends Item implements ILookOverlay {
if(!stack.hasTagCompound()) {
return null;
}
private static File file = new File(MainRegistry.configHbmDir, "CMstructureOutput.txt");
return new BlockPos(stack.stackTagCompound.getInteger("anchorX"), stack.stackTagCompound.getInteger("anchorY"), stack.stackTagCompound.getInteger("anchorZ"));
}
public static void setAnchor(ItemStack stack, int x, int y, int z) {
public static BlockPos getAnchor(ItemStack stack) {
if(stack.stackTagCompound == null) {
stack.stackTagCompound = new NBTTagCompound();
}
if(!stack.hasTagCompound()) {
return null;
}
stack.stackTagCompound.setInteger("anchorX", x);
stack.stackTagCompound.setInteger("anchorY", y);
stack.stackTagCompound.setInteger("anchorZ", z);
}
public static void writeToFile(File config,ItemStack stack,World world){
int anchorX = stack.stackTagCompound.getInteger("anchorX");
int anchorY = stack.stackTagCompound.getInteger("anchorY");
int anchorZ = stack.stackTagCompound.getInteger("anchorZ");
int x1=stack.stackTagCompound.getInteger("x1");
int y1=stack.stackTagCompound.getInteger("y1");
int z1=stack.stackTagCompound.getInteger("z1");
int x2=stack.stackTagCompound.getInteger("x2");
int y2=stack.stackTagCompound.getInteger("y2");
int z2=stack.stackTagCompound.getInteger("z2");
ForgeDirection dir = ForgeDirection.getOrientation(world.getBlockMetadata(anchorX,anchorY,anchorZ));
//ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
int z=z1;z1=z<z2?z:z2;z2=z<z2?z2:z;
int y=y1;y1=y<y2?y:y2;y2=y<y2?y2:y;
int x=x1;x1=x<x2?x:x2;x2=x<x2?x2:x;
if(dir == ForgeDirection.EAST || dir == ForgeDirection.WEST){
z=x1;x1=z1;z1=z;
z=x2;x2=z2;z2=z;
int anchor=anchorX;anchorX=anchorZ;anchorZ=anchor;
}
try {
JsonWriter writer = new JsonWriter(new FileWriter(config));
writer.setIndent(" ");
writer.beginObject();
writer.name("components").beginArray();
for(x=x1;x<=x2;x++){
for(y=y1;y<=y2;y++){
for(z=z1;z<=z2;z++){
if(!((x==anchorX&&y==anchorY&&z==anchorZ)||((dir == ForgeDirection.EAST || dir == ForgeDirection.WEST)?world.getBlock(z, y, x)==Blocks.air:world.getBlock(x, y, z)==Blocks.air))){
writer.beginObject().setIndent("");
writer.name("block").value("hbm:" + ((dir == ForgeDirection.EAST || dir == ForgeDirection.WEST) ? world.getBlock(z, y, x).getUnlocalizedName():world.getBlock(x, y, z).getUnlocalizedName()));
writer.name("x").value(x - anchorX);
writer.name("y").value(y - anchorY);
writer.name("z").value((dir == ForgeDirection.EAST || dir == ForgeDirection.WEST)?anchorZ - z : z - anchorZ);
writer.name("metas").beginArray();
writer.value(((dir == ForgeDirection.EAST || dir == ForgeDirection.WEST) ? world.getBlockMetadata(z, y, x):world.getBlockMetadata(x, y, z)));
writer.endArray();
writer.endObject().setIndent(" ");
}
}
}
}
writer.endArray();
writer.endObject();
writer.close();
}catch(IOException e) {
e.printStackTrace();
}
return new BlockPos(stack.stackTagCompound.getInteger("anchorX"), stack.stackTagCompound.getInteger("anchorY"), stack.stackTagCompound.getInteger("anchorZ"));
}
}
@Override
public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ){
Block b = world.getBlock(x, y, z);
public static void setAnchor(ItemStack stack, int x, int y, int z) {
if(b == ModBlocks.cm_anchor) {
this.setAnchor(stack, x, y, z);
return true;
}
if(stack.stackTagCompound == null) {
stack.stackTagCompound = new NBTTagCompound();
}
if(this.getAnchor(stack) == null) {
return false;
}
if(!stack.stackTagCompound.hasKey("x1")) {
stack.stackTagCompound.setInteger("x1", x);
stack.stackTagCompound.setInteger("y1", y);
stack.stackTagCompound.setInteger("z1", z);
}
else if(!stack.stackTagCompound.hasKey("x2")){
stack.stackTagCompound.setInteger("x2", x);
stack.stackTagCompound.setInteger("y2", y);
stack.stackTagCompound.setInteger("z2", z);
}
else{
writeToFile(file,stack,world);
stack.stackTagCompound.removeTag("x1");
stack.stackTagCompound.removeTag("y1");
stack.stackTagCompound.removeTag("z1");
stack.stackTagCompound.removeTag("x2");
stack.stackTagCompound.removeTag("y2");
stack.stackTagCompound.removeTag("z2");
}
return true;
}
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
super.addInformation(stack, player, list, ext);
list.add(EnumChatFormatting.YELLOW + "Click Custom Machine Structure Positioning Anchor to");
list.add(EnumChatFormatting.YELLOW + "Confirm the location of the custom machine core block.");
list.add(EnumChatFormatting.YELLOW + "Output all blocks between Position1 and Position2 with");
list.add(EnumChatFormatting.YELLOW + "metadata to \"CMstructureOutput.txt\" in hbmConfig.");
}
@Override
public void printHook(RenderGameOverlayEvent.Pre event, World world, int x, int y, int z) {
ItemStack stack = Minecraft.getMinecraft().thePlayer.getHeldItem();
List<String> text = new ArrayList();
stack.stackTagCompound.setInteger("anchorX", x);
stack.stackTagCompound.setInteger("anchorY", y);
stack.stackTagCompound.setInteger("anchorZ", z);
}
BlockPos anchor = getAnchor(stack);
public static void writeToFile(File config, ItemStack stack, World world) {
int anchorX = stack.stackTagCompound.getInteger("anchorX");
int anchorY = stack.stackTagCompound.getInteger("anchorY");
int anchorZ = stack.stackTagCompound.getInteger("anchorZ");
int x1 = stack.stackTagCompound.getInteger("x1");
int y1 = stack.stackTagCompound.getInteger("y1");
int z1 = stack.stackTagCompound.getInteger("z1");
int x2 = stack.stackTagCompound.getInteger("x2");
int y2 = stack.stackTagCompound.getInteger("y2");
int z2 = stack.stackTagCompound.getInteger("z2");
ForgeDirection dir = ForgeDirection.getOrientation(world.getBlockMetadata(anchorX, anchorY, anchorZ));
// ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
int z = z1;
z1 = z < z2 ? z : z2;
z2 = z < z2 ? z2 : z;
int y = y1;
y1 = y < y2 ? y : y2;
y2 = y < y2 ? y2 : y;
int x = x1;
x1 = x < x2 ? x : x2;
x2 = x < x2 ? x2 : x;
if(dir == ForgeDirection.EAST || dir == ForgeDirection.WEST) {
z = x1;
x1 = z1;
z1 = z;
z = x2;
x2 = z2;
z2 = z;
int anchor = anchorX;
anchorX = anchorZ;
anchorZ = anchor;
}
try {
JsonWriter writer = new JsonWriter(new FileWriter(config));
writer.setIndent(" ");
writer.beginObject();
writer.name("components").beginArray();
for(x = x1; x <= x2; x++) {
for(y = y1; y <= y2; y++) {
for(z = z1; z <= z2; z++) {
if(!((x == anchorX && y == anchorY && z == anchorZ) || ((dir == ForgeDirection.EAST || dir == ForgeDirection.WEST) ? world.getBlock(z, y, x) == Blocks.air : world.getBlock(x, y, z) == Blocks.air))) {
writer.beginObject().setIndent("");
writer.name("block").value("hbm:" + ((dir == ForgeDirection.EAST || dir == ForgeDirection.WEST) ? world.getBlock(z, y, x).getUnlocalizedName() : world.getBlock(x, y, z).getUnlocalizedName()));
writer.name("x").value(x - anchorX);
writer.name("y").value(y - anchorY);
writer.name("z").value((dir == ForgeDirection.EAST || dir == ForgeDirection.WEST) ? anchorZ - z : z - anchorZ);
writer.name("metas").beginArray();
writer.value(((dir == ForgeDirection.EAST || dir == ForgeDirection.WEST) ? world.getBlockMetadata(z, y, x) : world.getBlockMetadata(x, y, z)));
writer.endArray();
writer.endObject().setIndent(" ");
}
}
}
}
writer.endArray();
writer.endObject();
writer.close();
} catch(IOException e) {
e.printStackTrace();
}
if(anchor == null) {
}
text.add(EnumChatFormatting.RED + "No Anchor");
} else {
int anchorX = stack.stackTagCompound.getInteger("anchorX");
int anchorY = stack.stackTagCompound.getInteger("anchorY");
int anchorZ = stack.stackTagCompound.getInteger("anchorZ");
text.add(EnumChatFormatting.GOLD + "Anchor: " + anchorX + " / " + anchorY + " / " + anchorZ);
if(stack.stackTagCompound.hasKey("x1")){
int x1=stack.stackTagCompound.getInteger("x1");
int y1=stack.stackTagCompound.getInteger("y1");
int z1=stack.stackTagCompound.getInteger("z1");
@Override
public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ) {
Block b = world.getBlock(x, y, z);
text.add(EnumChatFormatting.YELLOW + "Position1: " + x1 + " / " + y1 + " / " + z1);
}
if(stack.stackTagCompound.hasKey("x2")) {
int x2=stack.stackTagCompound.getInteger("x2");
int y2=stack.stackTagCompound.getInteger("y2");
int z2=stack.stackTagCompound.getInteger("z2");
text.add(EnumChatFormatting.YELLOW + "Position2: " + x2 + " / " + y2 + " / " + z2);
}
}
if(b == ModBlocks.cm_anchor) {
this.setAnchor(stack, x, y, z);
return true;
}
ILookOverlay.printGeneric(event, this.getItemStackDisplayName(stack), 0xffff00, 0x404000, text);
}
if(this.getAnchor(stack) == null) {
return false;
}
if(!stack.stackTagCompound.hasKey("x1")) {
stack.stackTagCompound.setInteger("x1", x);
stack.stackTagCompound.setInteger("y1", y);
stack.stackTagCompound.setInteger("z1", z);
} else if(!stack.stackTagCompound.hasKey("x2")) {
stack.stackTagCompound.setInteger("x2", x);
stack.stackTagCompound.setInteger("y2", y);
stack.stackTagCompound.setInteger("z2", z);
} else {
writeToFile(file, stack, world);
stack.stackTagCompound.removeTag("x1");
stack.stackTagCompound.removeTag("y1");
stack.stackTagCompound.removeTag("z1");
stack.stackTagCompound.removeTag("x2");
stack.stackTagCompound.removeTag("y2");
stack.stackTagCompound.removeTag("z2");
}
return true;
}
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
super.addInformation(stack, player, list, ext);
list.add(EnumChatFormatting.YELLOW + "Click Custom Machine Structure Positioning Anchor to");
list.add(EnumChatFormatting.YELLOW + "Confirm the location of the custom machine core block.");
list.add(EnumChatFormatting.YELLOW + "Output all blocks between Position1 and Position2 with");
list.add(EnumChatFormatting.YELLOW + "metadata to \"CMstructureOutput.txt\" in hbmConfig.");
}
@Override
public void printHook(RenderGameOverlayEvent.Pre event, World world, int x, int y, int z) {
ItemStack stack = Minecraft.getMinecraft().thePlayer.getHeldItem();
List<String> text = new ArrayList();
BlockPos anchor = getAnchor(stack);
if(anchor == null) {
text.add(EnumChatFormatting.RED + "No Anchor");
} else {
int anchorX = stack.stackTagCompound.getInteger("anchorX");
int anchorY = stack.stackTagCompound.getInteger("anchorY");
int anchorZ = stack.stackTagCompound.getInteger("anchorZ");
text.add(EnumChatFormatting.GOLD + "Anchor: " + anchorX + " / " + anchorY + " / " + anchorZ);
if(stack.stackTagCompound.hasKey("x1")) {
int x1 = stack.stackTagCompound.getInteger("x1");
int y1 = stack.stackTagCompound.getInteger("y1");
int z1 = stack.stackTagCompound.getInteger("z1");
text.add(EnumChatFormatting.YELLOW + "Position1: " + x1 + " / " + y1 + " / " + z1);
}
if(stack.stackTagCompound.hasKey("x2")) {
int x2 = stack.stackTagCompound.getInteger("x2");
int y2 = stack.stackTagCompound.getInteger("y2");
int z2 = stack.stackTagCompound.getInteger("z2");
text.add(EnumChatFormatting.YELLOW + "Position2: " + x2 + " / " + y2 + " / " + z2);
}
}
ILookOverlay.printGeneric(event, this.getItemStackDisplayName(stack), 0xffff00, 0x404000, text);
}
}

View File

@ -318,7 +318,7 @@ public class CraftingManager {
addRecipeAuto(new ItemStack(ModBlocks.anvil_iron, 1), new Object[] { "III", " B ", "III", 'I', IRON.ingot(), 'B', IRON.block() });
addRecipeAuto(new ItemStack(ModBlocks.anvil_lead, 1), new Object[] { "III", " B ", "III", 'I', PB.ingot(), 'B', PB.block() });
addRecipeAuto(new ItemStack(ModBlocks.anvil_murky, 1), new Object[] { "UUU", "UAU", "UUU", 'U', ModItems.undefined, 'A', ModBlocks.anvil_steel });
addRecipeAuto(new ItemStack(ModBlocks.machine_fraction_tower), new Object[] { "SHS", "SGS", "SHS", 'S', STEEL.plate(), 'H', ModItems.hull_big_steel, 'G', ModBlocks.steel_grate });
addRecipeAuto(new ItemStack(ModBlocks.machine_fraction_tower), new Object[] { "H", "G", "H", 'H', STEEL.plateWelded(), 'G', ModBlocks.steel_grate });
addRecipeAuto(new ItemStack(ModBlocks.fraction_spacer), new Object[] { "BHB", 'H', ModItems.hull_big_steel, 'B', Blocks.iron_bars });
addRecipeAuto(new ItemStack(ModBlocks.furnace_iron), new Object[] { "III", "IFI", "BBB", 'I', IRON.ingot(), 'F', Blocks.furnace, 'B', Blocks.stonebrick });
addRecipeAuto(new ItemStack(ModBlocks.machine_mixer), new Object[] { "PIP", "GCG", "PMP", 'P', STEEL.plate(), 'I', DURA.ingot(), 'G', KEY_ANYPANE, 'C', ModItems.circuit_copper, 'M', ModItems.motor });