Also, since various advanced turtles all share the block ID of a plain advanced turtles, is there a way to give an advanced wireless mining turtle instead of a toolless turtle?
This is a read-only snapshot of the ComputerCraft forums,
taken in April 2020.
give/setblock a computer of a certain ID
Started by vargaszm, 07 April 2015 - 08:41 PMPosted 07 April 2015 - 10:41 PM
Is there anyway to give or setblock a computer/turtle of a certain ID?
Also, since various advanced turtles all share the block ID of a plain advanced turtles, is there a way to give an advanced wireless mining turtle instead of a toolless turtle?
Also, since various advanced turtles all share the block ID of a plain advanced turtles, is there a way to give an advanced wireless mining turtle instead of a toolless turtle?
Posted 07 April 2015 - 10:54 PM
http://www.computercraft.info/forums2/index.php?/topic/22653-give-turtle-with-specific-id/
You can use this mod to help you research more specific commands, such as turtles with certain tool combos. With it installed, aim your Minecraft view at a block, and type "/nbtedit" into chat.
You can use this mod to help you research more specific commands, such as turtles with certain tool combos. With it installed, aim your Minecraft view at a block, and type "/nbtedit" into chat.
Edited on 07 April 2015 - 08:55 PM
Posted 08 April 2015 - 12:49 AM
Thank you! this is awesome!
…
However, Computers and Advanced Computers seem to share the same nbt tags, any clues there?
…
However, Computers and Advanced Computers seem to share the same nbt tags, any clues there?
Posted 08 April 2015 - 08:34 AM
The difference between them lies in the metadata instead. 2-5 for one sort of computer (in different orientations), 10-13 for the other. Can't remember which is which, but you should be able to work things out from there. Command computers get their own unique name for whatever reason.
If you plonk down a command computer and run this in the Lua console:
… it'll give you the name and metadata of whatever block is directly above it. Keep in mind that the names are case-sensitive.
If you plonk down a command computer and run this in the Lua console:
x,y,z = commands.getBlockPostion()
commands.getBlockInfo(x,y+1,z)
… it'll give you the name and metadata of whatever block is directly above it. Keep in mind that the names are case-sensitive.
Posted 08 April 2015 - 04:39 PM
The difference between them lies in the metadata instead. 2-5 for one sort of computer (in different orientations), 10-13 for the other. Can't remember which is which, but you should be able to work things out from there
If you spawn one with an invalid orintation, your game crashes instantly, and again when the world is loaded, until you remove the block, so do it in a testing world
( Learned this the hard way )
You can use MCEdit to remove any problem blocks if you need to
Posted 10 April 2015 - 12:03 AM
Thanks. I figured that out a little bit later and felt stupid, especially since i have a turtle block inspector program for convenience. I got all my give commands sorted, still having trouble with the setblock tags. well not "still" i just starting trying setblock.
I also discovered the orientation thing when a kid i was tutoring used a for loop to make a spinning computer, then crash. Thinking now, it'd be interesting to have a computer set itself, collect its block data and replace itself spun, and turned on.
I also discovered the orientation thing when a kid i was tutoring used a for loop to make a spinning computer, then crash. Thinking now, it'd be interesting to have a computer set itself, collect its block data and replace itself spun, and turned on.
Posted 10 April 2015 - 12:49 AM
For normal computers, the damage value is the computer ID. For Advanced computers, the damage value is the computer ID + 16384.
Posted 10 April 2015 - 03:13 AM
For normal computers, the damage value is the computer ID. For Advanced computers, the damage value is the computer ID + 16384.
That is for the item themselves (btw its computer ID + 16385 counting for the id 0). When placed it is something different.
Posted 26 April 2015 - 02:01 AM
So, i have a set block command that works fine when called by itself, but im setting about 400(20x20) at once, and they all set, but depending on the speed of the computer and chance anywhere from a single comp to all are set correctly. The rest set as generic command computers.
Is this just a fluke with the game/mod? i haven't tested the same command sequence on vanilla command blocks, although thinking about it now i could script vanilla blocks with the peripheral api, but still i'd prefer for this to set asynchronously.
Is this just a fluke with the game/mod? i haven't tested the same command sequence on vanilla command blocks, although thinking about it now i could script vanilla blocks with the peripheral api, but still i'd prefer for this to set asynchronously.
Posted 26 April 2015 - 02:08 AM
Code?
I suspect if you limit your script to less than 256 calls at a time, that'll sort it out. If not, simply keep lowering that value!
I suspect if you limit your script to less than 256 calls at a time, that'll sort it out. If not, simply keep lowering that value!