Is there any machine that will automatically combine two gold swords together for me?

  • Please make sure you are posting in the correct place. Server ads go here and modpack bugs go here
  • The FTB Forum is now read-only, and is here as an archive. To participate in our community discussions, please join our Discord! https://ftb.team/discord

Racer193

New Member
Jul 29, 2019
26
0
0
Is there any machine that will automatically combine two gold swords together for me? I need this because i need to combine the gold swords from pigman in an alloy furnace and to make the gold swords into gold in the furnace they need to be full
 

Darkblock306

New Member
Jul 29, 2019
92
0
0
You could try an autocrafting table, since crafting tools together combines their durability. Have not tested this personally though.
EDIT: Half ninja'd. Autocrafting tables would do the same thing as the post above me said, only you can automate it :p
 

Racer193

New Member
Jul 29, 2019
26
0
0
i tried the auto crafting tables, since the swords dont stack they just eject out of it
 

Malkeus Diasporan

New Member
Jul 29, 2019
56
0
0
crafting turtle might be a way around the damage value issue uyour getting with the autocrafting table. Might take a bit of finesse to make it work.
 

Malkeus Diasporan

New Member
Jul 29, 2019
56
0
0
I've never actually used a crafting turtle. But they are capable of performing the same things as a crafting table.
You would need to program a small while loop that would combine 2 swords and spit out the product. Then simply pump the swords into it and collect your winnings.
...time passes...I did a test in ssp, using 2 damaged gold swords. The code to make the turtle craft the items in its inventory is turtle.craft().
I placed a sword in slot 1 and a 2nd in slot 2, used 'lua' to enter the console and typed 'turtle.craft()' and the two damaged swords became 1 whole sword in slot 1. It will require a bit of coding to automate it, but shouldn't be too rough. check out http://computercraft.info/wiki/Main_Page for information.

quick and dirty and newbish code:

while true do //loop forever
if turtle.getItemCount(1) == 1 and turtle.getItemCount(2) == 1 then //when there is an item in slots 1 and 2 perform actions
turtle.craft() //craft the items (would benefit from an additional conditional statement here, for error control)
turtle.dropDown() //drop the item, to the space below the turtle (can use dropUp for above or simply drop for in front)
end //end if statement
end //end while statement

Keep in mind that there is no error catching and this will break if the turtle has 3 items in its inventory (bc it will be unable to craft, but will keep trying to craft). I'm fairly new to coding in computercraft and take no responsiblity for your brain melting while trying to make this work. P.S. I didn't test this, so it may not work at all as is. I have confidence that what you want to achieve can be done with turtles though.

edit: Apologies for the crappy formatting. I had it spaced out and legible, but the board broke it and I don't feel like fixing it. The actual code is italicized everything after // is a comment explaining the code.
 

solidity

Active Member
Jul 29, 2019
53
0
26
1) put down a chest, we'll call it inputchest.
2) put all your halfbroken swords inside
3) create a crafty turtle (craft a turtle with crafting table)
4) add the following program (not tested, just made up)
Code:
while true do
if turtle.getItemCount(1) == 1 and turtle.getItemCount(2) == 1 then-- if the turtle has an item in slot 1 and 2
turtle.select(1)-- select first slot
if not turtle.craft() then-- try to craft the two swords together, if it doesn't work, one was already fully repaired
for i = 1,2 do-- try to put both swords down into the barrel (only the fully repaired will go in)
turtle.select(i)
turtle.dropDown()
end
end
else-- if the turtle does not have an item in slot 1 and 2
turtle.suck()-- get another item from the input chest
end
end
5) put a barrel below the turtle and put one fully repaired sword in
6) run above program. should take unrepaired swords from the input chest and combine them until it has one finished sword which will be put down into the output barrel.

No guarantees that this will work out of the box, i wrote it without testing. If it doesn't work, I'll check what's wrong tomorrow.
 

raiju

New Member
Jul 29, 2019
448
-2
0
Pigman swords always have same durability so autocrafting table works fine. We used to do that then macerate the swords and store the dust, then later block it up
 

steve g

New Member
Jul 29, 2019
445
0
0
No guarantees that this will work out of the box


and you were right, it does not work. what happens: crafted sword never drops, broken ones continue getting crafted into the whole sword, stuck with one good sword in turtle for infinity
this does work (as long as it pulls from a chest in front, and drops into another below it)

Code:
while true do
  turtle.select(1)
  if turtle.getItemCount(1) == 1 and turtle.getItemCount(2) == 1 then
      turtle.craft()    -- dont worry if sword gets crafted or not
      for i = 1,2 do  -- try to put both swords down into the barrel (only the fully repaired will go in)
          turtle.select(i)
          turtle.dropDown()
      end
  else
      turtle.suck()
  end
end
 

SpitefulFox

New Member
Jul 29, 2019
1,235
0
0
Tool Dynamism Tablet with a Force Rod! :D

EDIT: Or, try throwing the swords through a Force Transport Pipe with a Force upgraded Item Card. It should force transmute the swords back into ingots as they go by.
 

PierceSG

New Member
Jul 29, 2019
2,047
0
0
Tool Dynamism Tablet with a Force Rod! :D

EDIT: Or, try throwing the swords through a Force Transport Pipe with a Force upgraded Item Card. It should force transmute the swords back into ingots as they go by.
Do you happen to have a link where I can read up on how Force Transport pipes works? I admit my Google-fu is weak. :(