3 posts
Posted 05 June 2012 - 03:05 PM
I want to use around 5 turtles to build an elaborate bridge structure in tekkit 3.0.4. I already designed the structure which is repeated segments. in each segment i want to place several microblocks of marble as it is a marble bridge. But i cant find a way to make turtles place redpower microblocks (in this case the halfblock, quarterblock and 1/4 panel in same spatial configuration each time). I figured it was just a question about making them place blocks with metadata, and that i would need to make my own API. Is this completely wrong? Is there some easy way of doing this?
Any help is appreciated!
351 posts
Posted 05 June 2012 - 03:32 PM
As far as I know there is no real way to do this. I wish it were possible…
2217 posts
Location
3232235883
Posted 05 June 2012 - 04:21 PM
actually in SMP it creates a virtual player placing blocks, ill do some tests
3 posts
Posted 05 June 2012 - 04:38 PM
actually in SMP it creates a virtual player placing blocks, ill do some tests
You would be my hero!
2447 posts
Posted 05 June 2012 - 07:10 PM
On bukkit it creates a new player - but only for permission checking. The placement code is the same. There is currently no way to place micro blocks, but we do want to get items working correctly using turtles. However, I doubt micro blocks will ever work properly, just due to the way they work.
3 posts
Posted 05 June 2012 - 07:38 PM
So its not just about making the turtle API call to the java code able to handle the metadata as a parameter like in the following code?
private boolean place
(int i
) { int j
= xCoord
+ Facing.offsetsXForSide
[i
]; int k
= yCoord
+ Facing.offsetsYForSide
[i
]; int l
= zCoord
+ Facing.offsetsZForSide
[i
]; if (!canPlaceInBlock
(k
)) { return false; } int i1
= getOppositeDir
(i
); ItemStack itemstack
= takePlaceableItem
(j
, k
, l
, i1
); if (itemstack
== null) { return false; } Item item
= Item.itemsList
[itemstack
.itemID
]; Block block
= Block.blocksList
[itemstack
.itemID
]; if (worldObj
.setBlockAndMetadataWithNotify
(j
, k
, l
, itemstack
.itemID
, item
.getMetadata
(itemstack
.getItemDamage
()))) { if (worldObj
.getBlockId
(j
, k
, l
) == itemstack
.itemID
) { block
.onBlockPlaced
(worldObj
, j
, k
, l
, i1
); if (item
instanceof ItemComputer) { ((ItemComputer) item
).setupComputerAfterPlacement
( itemstack
, worldObj
, j
, k
, l
); } } mod_CCTurtle
.playBlockSound
(worldObj
, (float) j
+ 0.5F, (float) k
+ 0.5F, (float) l
+ 0.5F, block
); return true; } else { return false; } } in particular the command with
worldObj.setBlockAndMetadataWithNotify(x,y,z,blocID,metadata)taken from: http://code.google.c...ec=svn104&r=104
2447 posts
Posted 05 June 2012 - 07:43 PM
No. That is actually decompiled ComputerCraft code - that is exactly what it does right now!