- ComputerCraft | Programmable Computers for Minecraft
- → The Lone Wolfling's Content
The Lone Wolfling's Content
There have been 35 items by The Lone Wolfling (Search limited from 10-February 22)
#213382 [1.73] turtle.inspect and turtle.getItemDetail have different keys for damage
Posted by
The Lone Wolfling
on 10 April 2015 - 02:44 PM
in
Bugs
Among other things, damage values can go a lot higher than metadata values.
#213381 How do I turn off one color in a bundled cable?
Posted by
The Lone Wolfling
on 10 April 2015 - 02:41 PM
in
Ask a Pro
Bomb Bloke, on 10 April 2015 - 07:59 AM, said:
rs.setBundledOutput( "back", colours.subtract(rs.getBundledOutput( "back" ), *your color here* ))
#212248 Disapearing turtles
Posted by
The Lone Wolfling
on 03 April 2015 - 10:25 PM
in
Ask a Pro
Bomb Bloke, on 03 April 2015 - 11:32 AM, said:
#212165 Disapearing turtles
Posted by
The Lone Wolfling
on 03 April 2015 - 11:27 AM
in
Ask a Pro
NanoBob, on 03 April 2015 - 10:23 AM, said:
# Set this to true to remove any TileEntity that throws an error in its update method instead of closing the server and reporting a crash log. BE WARNED THIS COULD SCREW UP EVERYTHING USE SPARINGLY WE ARE NOT RESPONSIBLE FOR DAMAGES. B:removeErroringTileEntities=false # Set this to true to check the entire entity's collision bounding box for ladders instead of just the block they are in. Causes noticable differences in mechanics so default is vanilla behavior. Default: false B:fullBoundingBoxLadders=falseSo it was already set to false :/
#212067 How does a natural language parser work?
Posted by
The Lone Wolfling
on 02 April 2015 - 03:42 PM
in
Ask a Pro
Here's a simple proof-of-concept I threw together using the JSON API and the HTTP API, and the aforementioned online NLP parser:
pastebin get DvkeHmUd nlp
#212024 How does a natural language parser work?
Posted by
The Lone Wolfling
on 02 April 2015 - 12:44 PM
in
Ask a Pro
#212021 Disapearing turtles
Posted by
The Lone Wolfling
on 02 April 2015 - 12:34 PM
in
Ask a Pro
(Of course, if it is and it is erroring tile entities, changing it to false will instead cause the game to crash. But then at least you can dump the crashlog so that hopefully it can be fixed)
Another suggestion for debugging purposes is to put down a chest in the same chunk, with an item in it. Next time the turtle gets deleted, check if the item is still in the chest. If it isn't, you've got bigger problems than just Forge deleting tile entities.
#211576 event to tell a computer that it is about to be unloaded
Posted by
The Lone Wolfling
on 30 March 2015 - 07:05 PM
in
Suggestions
MKlegoman357, on 30 March 2015 - 06:28 PM, said:
MKlegoman357, on 30 March 2015 - 06:28 PM, said:
MKlegoman357, on 30 March 2015 - 06:28 PM, said:
MKlegoman357, on 30 March 2015 - 06:28 PM, said:
#211566 event to tell a computer that it is about to be unloaded
Posted by
The Lone Wolfling
on 30 March 2015 - 05:43 PM
in
Suggestions
Lyqyd, on 30 March 2015 - 03:37 PM, said:
Let's say you write the current rotation to a file, then rotate, then write the current rotation again. Even ignoring the second issue above, what can happen is that you write the rotation state to the file, then the chunk unloads. So you've written that you are about to take a rotation. But you have no idea if the rotation actually happened or not. Before you say "that won't happen often" - yeah, it does. Often enough that I gave up even trying with my quarry script. And just went to the peripheral-based system above.
Or let's say you are trying to put something in a chest. You check for space, it says there's space, then something else puts something into the chest. All of a sudden when you actually try to put things into the chest it doesn't work. Again: race condition. You cannot, in general, assume that just because you've checked something in advance that it will actually work when you actually go to do it.
Your second example is equivalent to saying that you don't need turtle.move() to return if it moved, because you can always check beforehand with turtle.detect(). And has the exact same flaw.
And with the second issue above these are even worse.
Now, if you've got a method that will reliably rotate, I'm all ears. But until/unless I see someone post a script that, say, rotates left 400 times and comes back to the starting position reliably through restarts / chunk unloads, without relying on external hacks (such as placing blocks or gps+movement or reserving 2 inventory spaces for keeping track of rotation. And the last is still susceptible to a race condition, and the first doesn't work in all cases. Ditto with the second.)...
#211523 event to tell a computer that it is about to be unloaded
Posted by
The Lone Wolfling
on 30 March 2015 - 12:07 PM
in
Suggestions
Bomb Bloke, on 29 March 2015 - 11:28 PM, said:
To my understanding, a turtle's fuel level can be relied upon no matter what happens. I gather code has already been written to take advantage of this.
Now, there is actually a solution, and I've got it working, on my machine at least. Unfortunately, it requires a peripheral currently, although I believe it could be implemented without too much trouble into CC itself. The way it works is as follows: the peripheral exposes three methods: writeData, readData, and hasStateChanged. Write saving a string, read reading a string, hasStateChanged returning a boolean. When you call write, it saves the value to NBT. readData returns that data. When you call writeData, it also writes the turtle's current state to NBT. When the turtle is updated for the first time thereafter, or when you call hasStateChanged, it returns if the turtle's state has changed since when you called writeData.
So basically, you can get 90% reliable resyncs by doing the following: writing the current state in the program with writeData(str), then doing whatever. Repeat. On startup, call readData() to get the state, then call hasStateChanged() to see if the last action you were about to do went through.
There still is a race condition, theoretically, but I have yet to encounter it. (If the turtle's NBT is in the middle of being saved when the server goes down. However, there's really no way around this. And on atomic filesystems it shouldn't be a problem anyways.)
(You need readData / writeData because the turtle's filesystem is not atomic with the chunk state.)
#211462 event to tell a computer that it is about to be unloaded
Posted by
The Lone Wolfling
on 29 March 2015 - 10:43 PM
in
Suggestions
MKlegoman357, on 28 March 2015 - 04:12 PM, said:
Writing to the HD is the only "good" way, and it a) hammers the HD (at least in a lot of cases), and
There's also the whole "computers don't always start up until they get updated or opened" thing. Speaking of 4th wall breaking...
#211248 event to tell a computer that it is about to be unloaded
Posted by
The Lone Wolfling
on 28 March 2015 - 02:41 PM
in
Suggestions
#211173 [1.0] Matrix API
Posted by
The Lone Wolfling
on 27 March 2015 - 09:18 PM
in
APIs and Utilities
Also, calculating the determinant.
Also, making a zeroed matrix.
Also, making a matrix by passing in a function that returns the value of a cell given the row/column number.
Also, raising a (square) matrix to a power using exponentiation by squaring.
#211167 RedLogic Bundle Integration
Posted by
The Lone Wolfling
on 27 March 2015 - 09:02 PM
in
Ask a Pro
#210075 Sugar Cane Farm - SUGARGEN
Posted by
The Lone Wolfling
on 18 March 2015 - 11:49 AM
in
Turtle Programs
This is the sort of program that can use "fake" persistence. In other words, you don't need to explicitly store position across restarts. Which is good, because currently there is no way to reliably do so.
What you do is box the turtle in (by, say, a ring of blocks at two high. If you don't want to block movement you can use signs or something.). Then, on startup, just have the turtle move forward and inspect until it hits the blocktype the ring is made of. Check to see if the chest is below the turtle, turn right (or left), and repeat until you see the chest. This will get you back to your starting point.
Alternatively, move the chest up one block, and just make it so the turtle always stays above sugar cane. (It will slow down growth slightly, as it blocks one sugar cane from growing, but not too much.) (Note: you cannot actually make it so the turtle always stays above sugar cane without additional blocker blocks. However, what you do is, if you are above sugar cane never move backwards. Then, if you aren't above sugar cane, move back one and you should be above sugar cane again.)
#210074 Comprehensive Strip Miner
Posted by
The Lone Wolfling
on 18 March 2015 - 11:37 AM
in
Turtle Programs
You can still check how much of that item you'd need by checking the item count before refueling, and dividing appropriately to come up with the fuel value of the item.
#210073 Are there any NBT/tileentity reader peripherals?
Posted by
The Lone Wolfling
on 18 March 2015 - 11:29 AM
in
Peripheral Help and Discussion
#209998 Are there any NBT/tileentity reader peripherals?
Posted by
The Lone Wolfling
on 17 March 2015 - 08:03 PM
in
Peripheral Help and Discussion
(And yes, I realize this could be...interestingly gamebreaking in some ways.)
#209533 [MC 1.7] [CC 1.74] Chunky Peripherals: Turtle chunkloaders! Mining chunkl...
Posted by
The Lone Wolfling
on 14 March 2015 - 12:14 PM
in
Peripherals and Turtle Upgrades
#209291 Variable Size Quarry (now with Super Ore Quarryâ„¢)
Posted by
The Lone Wolfling
on 12 March 2015 - 04:56 PM
in
Turtle Programs
civilwargeeky, on 02 March 2015 - 02:11 AM, said:
The way I imagine it would work is you set "quarry -lava true" or "quarry -lava 14", put the bucket in. When it gets to lava it will check if it needs fuel, then detect if lava, then place in bucket and refuel self. Do note, it would only fuel itself if it was 1000 less than "excessFuelAmount" (which can be set by parameter). Does this sound like what you were thinking?
I will probably be able to get to it next weekend, which is spring break for me
#209274 Idea Exchange
Posted by
The Lone Wolfling
on 12 March 2015 - 03:41 PM
in
General
jerimo, on 12 March 2015 - 03:12 PM, said:
See, for example, Mote. And Mote's API could allow this, assuming one could find some way to serve the "glue" page.
Although you could skip the web server by making an app.
#209258 Idea Exchange
Posted by
The Lone Wolfling
on 12 March 2015 - 12:31 PM
in
General
#208386 [MC 1.7] [CC 1.74] Chunky Peripherals: Turtle chunkloaders! Mining chunkl...
Posted by
The Lone Wolfling
on 06 March 2015 - 04:35 PM
in
Peripherals and Turtle Upgrades
Also, could you add a chunkloader block? Seems a mite overkill to have a turtle sitting there just to load a chunk.
#208385 [MC1.12][CC1.8] "More Turtles", "Waking Chunks", "Multipl...
Posted by
The Lone Wolfling
on 06 March 2015 - 04:30 PM
in
Peripherals and Turtle Upgrades
Nokiyen, on 03 March 2015 - 02:44 AM, said:
(And if you could, I recommend you to delete such a fatal lua program directly from your save folder.)
Sorry for lack of response. Realized you don't allow redistribution, so I'm no longer using the mod.
#207875 [MC1.12][CC1.8] "More Turtles", "Waking Chunks", "Multipl...
Posted by
The Lone Wolfling
on 02 March 2015 - 05:31 PM
in
Peripherals and Turtle Upgrades
It was a turtle trying to pull from an empty MFR tank.
---- Minecraft Crash Report ---- // Hi. I'm Minecraft, and I'm a crashaholic. Time: 02/03/15 1:02 PM Description: Ticking block entity java.lang.NullPointerException: Ticking block entity at noki.moreturtles.turtle.tool.ToolLiquid.dig(ToolLiquid.java:156) at noki.moreturtles.turtle.tool.ToolLiquid.useTool(ToolLiquid.java:104) at dan200.computercraft.shared.turtle.core.TurtleToolCommand.execute(TurtleToolCommand.java:36) at dan200.computercraft.shared.turtle.core.TurtleBrain.updateCommands(TurtleBrain.java:796) at dan200.computercraft.shared.turtle.core.TurtleBrain.update(TurtleBrain.java:104) at dan200.computercraft.shared.turtle.blocks.TileTurtle.func_145845_h(TileTurtle.java:271) at net.minecraft.world.World.func_72939_s(World.java:1939) at net.minecraft.world.WorldServer.func_72939_s(WorldServer.java:489) at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:636) at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:547) at net.minecraft.server.integrated.IntegratedServer.func_71217_p(IntegratedServer.java:111) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:427) at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:685)
- ComputerCraft | Programmable Computers for Minecraft
- → The Lone Wolfling's Content


