My Google 20 Blog

Click HERE to return to homepage.

-------------------------------------------------------------

10/6/15, Entry One: I started my project today, and in it, I started 4 quarrys in the treetops of the jungle biome in which I spawned. One 64 by 64 blocks, and the other three at the default size. Since I'm using the tekkit classic mod pack for my project, I was able to use solar pannels to power the quarries, using energy links that are placed directly next to the quarries and are connected to 3 MFSUs(controlable batteries) by glass fibre cables, that are all connected to the high voltage solar panel arrays by yet some more glass fibre cables.

10/9/15, Entry Two: Today, I started coding my bot to do simple tasks using a few tutorials I found on the interwebs, and found out that I didnt need to use fuel, therefor the turtle.refuel function and all other functions that are related to that function are not needed.and then after that, since a few other simple functions werent working, I realized that I wasnt on the most updated version of tekkit... so, I updated it and had to uninstal the update because it would crash when I tried to load the tekkit modpack. so fun stuff, but I should be able to make the tree farm and the automatic charcoal parts work. I dont know how "automatic" it will really be because of the missing functions, but we'll have to see.

10/16/15, Entry Three: Since last week was so frustrating, I decided to have some fun and spend about 3 hours making a HUGE mob trap to get bones naturally to craft(using an auto crafting table) into bonemeal for the tree farm. This required no coding, however it might have been more time efficient if I had used coding. Oh well. The important part is that I now have a 64 block by 64 block mob trap that collects all items that are dropped by the entities that spawn inside it 100% of the time. Another good thing about this is that I know how to transport the items back to the surface AND sort out the bones from the other stuff and pump them into the auto crafting table. cool stuff. I am planning on setting up the automatic bonemeal crafting part next week, and then I'll be all set to move on to fixing all of the problems in my codes.

11/6/15, Entry Four: I skipped 2 weeks, and I finally found the time and motivation to start up my project again, and I'm really happy I did because I've made a lot of breakthroughs. At first, I thought that I could just fix a few problems with my code, but I soon realized that there were too many commands that weren't in the version that I have, so I ended up deleting everything and starting from scratch. To start out with, the main problem I figured out was that if there is a block in the turtle's inventory that isn't placeable by it(whether it's placable by the player or not doesn't matter), then it will automatically go to the next inventory slot and try to place an item, and so on. This is a problem because bone meal (fertalizer in minecraft) is one of those normally placeable items that the turtle can't place. However, I looked online and found an alternative. There is something called an Assembler, which can be hooked up to a bundled wire, which is basically a way to transport a bunch of different signals, and the assembler takes those signals individually and turns it into a color coded inventory slot. You can put an item into this slot, and when the assembler recieves that signal-color, it will look for that block in it's storage inventory, and it will take one and place it in front of it on the ground. This solves the problem of the bonemeal because it is able to plant the tree and put the bonemeal on the sapling, instantly growing the tree. My code is very simple now, because there are a lot of complex systems that are now being done mechanically rather than technologically because of the lack of commands that are avalable in the version of Tekkit that I have. Also, another possible problem to making it completely automatic is that the turtle is not able to interact with other inventories. This is an issue because the turtle would quickly run out of inventory space, and would have nowhere to store the wood, so it would all fall to the ground around and under it once it filled up. This might be corrected by using the turtle.drop() command and having it drop the wood on an obsidian tube, which sucks up any blocks that drop on them and push them to the next tube at the slowest rate of travel through item tubes. I think I mentioned how they work in my mobtrap entry, but I'm too tired and lazy to read it over again. lol. Goodnight, and good luck. Deshong out.

11/13/15, Entry Five: Hey, I finally got it to work! It took a really long time, but I finally got my turtle to be able to mine trees, come back down, and drop the wood onto an obsidian pipe that leads to a chest. I also made a ton of technical upgrades. first, I fixed the code though. it took not one, not two, but 5 times to finally get it right. Now keep in mind that a try consists of writing the whole code out, which is about 40-50 lines, and then realizing that something didnt work, and then destroying the bot out of frustration and starting from scratch. so yeah, it was pretty frustrating, and I had to take breaks between trys to keep myself from using a nuke and just demolishing my whole world. But, enough of the hardships of coding that everyone knows about.

Here's my code for the turtle.

local function fell()
^if turtle.detectUp() then
^^turtle.digUp()
^^turtle.up()
^else
^^turtle.down()
^^turtle.down()
^^turtle.down()
^^turtle.down()
^^turtle.down()
^^turtle.down()
^^turtle.down()
^^turtle.down()
^^turtle.down()
^^turtle.down()
^^turtle.down()
^^turtle.down()
^^turtle.turnLeft()
^^if turtle.detect() then
^^^turtle.turnRight()
^^^turtle.back()
^^else
^^^turtle.turnLeft()
^^^turtle.forward()
^^^turtle.select(1)
^^^turtle.drop()
^^^turtle.select(2)
^^^turtle.drop()
^^^turtle.select(3)
^^^turtle.drop()
^^^turtle.select(4)
^^^turtle.drop()
^^^turtle.select(5)
^^^turtle.drop()
^^^turtle.select(6)
^^^turtle.drop()
^^^turtle.select(7)
^^^turtle.drop()
^^^turtle.select(8)
^^^turtle.drop()
^^^turtle.select(9)
^^^turtle.drop()
^^^turtle.turnRight()
^^^turtle.turnRight()
^^^turtle.forward()
^^end
^end
end

local function start()
if turtle.detect() then
^if turtle.detectDown() then
^^if not turtle.detectUp() then
^^^turtle.dig()
^^^turtle.forward()
^^^turtle.digUp()
^^^turtle.up()
^^end
^end
end

--*forever loop ;)
while true do
^start()
^fell()
end


* "--" is a comment in lua.

11/20/15, Entry Six:

12/12/15, Entry Seven: Recursive functions = internal memory problem. In this session, I was minding my own buisness, and along comes an enderman and he picks up one of the crutial blocks that had wire going to the assembler, breaking the wire and destroying the perfectly timed process of my bot mining the tree. Anyways, I fixed that after I killed the enderman so he wouldn't mess up my flat workspace by duplicating and placing down the block he had picked up, and continued my work. While I was improving my mob trap sorting and processing system, I decided to take a break and get something to eat. When I came back, it said that Minecraft had run out of memory, and that to prevent damage or corruption of files, it had quit the current game. My dad initially said that this was a problem with my code, and that there was something that was calling itself over and over again, but I then told him that none of my turtles were running when I had the problem. We started up task mannager and looked at my CPU usage and internal memmory while we started up the technic launcher, and through it the game, and we found out that the game was using an insane amount of CPU and internal memory just to run in the pause menu. Because of this, we thought of two possibilities. Either the graphics card in the computer isn't powerful enough to support one(some) of the textures in the game and so sends the task(s) over to the CPU to do, or the game has a recursive function in it's code that it isnt able to resolve, so it keeps cloning itself until it crashes, which is a problem that is nearly impossible for me to fix at my stage of expertese. I'm going to install the driver for the larger graphics card I have, and then put in the new card, and see how it works after that, and get back to improving and adding to my system and also my blog!

-------------------------------------------------------------

Click HERE to return to homepage.