Help with a different kind of SoulShard/Turtle based farm

  • 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

Crouchingmoose

New Member
Jul 29, 2019
67
0
0
So I decided to be different from everyone using soul shards and melee turtles for their farms and go with MFR grinders instead, but I'm still running into a problem with how I want the system to work.

Right now the plan is to have this be controlled by a ComputerCraft touchscreen monitor that will tell a turtle in a hole in the center of the room to place a soul cage above and put a shard in it, then break the cage and reset when I turn the farm off. My question is how can I ensure that the turtle always picks up both the cage and the shard and puts them in the correct slots in its inventory?
 

vScourge

New Member
Jul 29, 2019
71
0
0
If calling turtle.dig() does not scoop up both the cage and the shard, you might be out of luck. Unless you put a transposer or two on a timer underneath to grab the loose items, then pipe them back to the turtle. Although you'd be better off disabling the soul cage with a redstone signal and skipping the turtle stuff here.
 

Crouchingmoose

New Member
Jul 29, 2019
67
0
0
Well I don't want to just disable the spawner, so the redstone signal doesn't work. What I really want to do is make this so that I can use the mob grinder for any mob type, hench the breaking and replacing of the mob spawner. I'll try dig and see if it works, I just haven't gotten around to testing any of the programming side and was wanting to see if anyone could get me pointed in the right direction rather than just trial and error.
 

RedBoss

New Member
Jul 29, 2019
3,300
0
0
If you're using t5 soul shards you could just leave them in their soul cages and have them accept separate Redstone signals via rednet cable.
This could possibly eliminate the need for a turtle. I haven't tried it, but I hope this helps
 

casilleroatr

New Member
Jul 29, 2019
1,360
0
0
Have you watched this episode of Direwolf20's season5 lets play


In it he uses the inventory module from miscperipherals to control which linking book is used in a mystcraft portal. I think you could modify that to your needs. Instead of linking books in specific slots in the chest you could have soul shards. The inventory module (or iteractive sorter I forget what its called) can be crafted along side a turtle to allow it to put and pull from specific slots in an inventory. This will allow you to keep your different shards in specific slots of a chest and keep the turtle's inventory clean.

For the actual turtle if you write the code like this


Code:
turtle.digUp()
turtle.suckUp()


then the soul cage should end up in slot one and the shard in slot 2. In the past I have had things not land in the slots I want though even if I do it like this


Code:
turtle.select(1)
turtle.digUp()
turtle.select(2)
turtle.suckUp()

But if you want to ensure that everything is in the right slot you could do this. (I was having a similar problem with a different turtle build awhile ago so this is an expanded version of that solution).

Code:
turtle.digUp()
turtle.suckUp()
 
--Put an empty soul cage in slot 16
 
turtle.select(1)
print("soul cage routine")
local sCage = turtle.compareTo(16) -- this compares slot 1 to slot 16 to make sure the soul cage is in slot one
if sCage == true then
   print("Soul Cage location affirmed")
else
   local i = 2
   repeat
   turtle.select(i)
   print("searching")
   local sCageTwo = turtle.compareTo(16)
   if sCageTwo == false then
       i = i+1 -- checks each slot against slot 16 looking for the soul cage
       print("still searching")
   else 
       print("soul cage located")
   end
   until i = 15 or sCageTwo = true -- stops the repeat loop when the turtle has found the soul cage
   turtle.select(i)
   turtle.transferTo(1) -- after finding the soul cage it moves it back to slot 1
   print("Soul Cage retrieved and relocated")
end
 
turtle.select(2)
print(souls shard routine")
local sShard = turtle.getItemCount(2)
if sShard ~= 0 then
   print("Soul Shard Location affirmed")
else
   local i = 3
   --Then cycle through a with a repeat loop like above. I would write it myself but I have just thought of something much simpler.
end
 
--do your code

I have just cobbled this code together it is neither complete nor as good as it could be. I haven't tested it either but I have put print commands in certain places to help you debug it.

However, as I was writing it I had another idea. You could remove the need for most of my code above by just putting junk items in slots 3 to 16 that the turtle will never touch.

Hope this helps
 

Crouchingmoose

New Member
Jul 29, 2019
67
0
0
I actually did something like above,I ended up putting soulcages in slot 16 and having a turtle sunk 2 block under the floor place the cage up and put a shard in it, then I used a modified version of DW20's button api (made it cleaner and gave more control over the colors) to send a rednet signal to the turtle to tell it which shard to use. Only issue is I had to put a cap over where the soul cage is so that when its broken the shard doesn't fly off to the side.

The reason for putting the cages in slot 16 is so that when I break the cage and pick up the shard, I don't have to remember what slot the shard should go into, since it will fill the first available slot (the slot it was originally in) since the cages is the last inventory slot.
 

egor66

New Member
Jul 29, 2019
1,235
0
0
would be simple to just use RS signal to turn on/off, if 147 the wireless would work, if 152 then its a bit more complex I used BC pipes, pipe wire & gates but it works fine.