Hey! I'm currently trying to automate emeralds by slaughtering innocent villagers in the masses. An issue I ran into was that the smeltry has to have some material in to massacre the villagers for their emeralds. So I wrote a Computer Craft program which checks if there's more than an emerald gem in the smeltry before allowing a liquid translocator to extract. Here's my code, can someone confirm that this wont have too much of a performance impact on the server Code: smeltry = peripheral.wrap("back") while true do smeltryTank = smeltry.getTankInfo() emeraldAmount = smeltryTank[1]["contents"]["amount"] / 640 if emeraldAmount > 1 then rs.setOutput("bottom", false) else rs.setOutput("bottom", true) end sleep(0.05) end
I don't know how well computer craft is coded, but I would assume that someone who builds a Lua parser into mc knows how to code. I would increase that sleep. There is no point to check things each tick, make it a second or even more.
it's needed so the translocator is turned off before the smeltry is emptied because I need a small amount of molten emerald left in there to kill the villagers, I guess I could up the amount stored in the smeltry at once so the translocator takes longer to transfer it and then increase the sleep
Thats what i always do when building murder factory's, I use 1 iron nuget and make sure it is always at the bottom in the controller by using fluid filters.