←  Peripherals and Turtle Upgrades

ComputerCraft | Programmable Computers for Minecraft

»

[CC 1.5] [MC 1.4.6/1.4.7] [SMP] Xfel's...

Xfel's Photo Xfel 06 Aug 2012

oh no, seems I have to fix that again. but as this is part of vanilla, I might do it statically.
Quote

Marval's Photo Marval 06 Aug 2012

Thanks a lot, can You post when you fix this?

Can you please write any help how move items from one digital chest to another?
I tried:

inv1 = inventory.get("left")
inv2 = inventory.get("right")
inventory.move(inv1,1,inv2,1)

where is computer on the center and digital chests on left and right side, that give me "Can't modify inventories from different peripherals"
Quote

Corbald's Photo Corbald 07 Aug 2012

I updated to 1.8.1 and I'm getting something kinda strange here. No errors, seems to load fine. All the blocks can be placed and broken and have proper textures. Cables can be colored and attach as expected.

Strange thing is, since I updated to the new version, a program I was using before stopped working, giving me an error about a bad side. I replaced -everything- (computer, cables, DB, etc...) and tried again. No luck. I tried in console LUA mode a 'test = peripheral.wrap("back:red")' which ALSO threw the same 'bad side' error.

So I checked my install. I had deleted the previous folder and installed the zip into the /mods/ folder. I saw the /mods/arp/ folder had replaced it's self, as had the /mods/computercraft/ folder that I removed when I updated to CC1.4. I checked in the CC folder, and there's the apis/programs/help and other folders/files I would expect from ARP. I checked in the /mods/arp/ folder and there's /mods/arp/help and /mods/arp/lua... however, both of those contain -folders- like /mods/arp/help/database.txt/ or /mods/arp/lua/dumpinv.lua/. Please note that these are folders -not- files and that they are empty.

I'm running Ubuntu Linux with Gnome Shell (Gnome 3) in case that matters. Forge is 3.3.8.
Quote

Xfel's Photo Xfel 07 Aug 2012

Seems that I forgot to change some mount points...
Quote

Xfel's Photo Xfel 07 Aug 2012

Ok now it should work. I also updated the bukkit port.
Quote

Corbald's Photo Corbald 07 Aug 2012

Thanks! Was trying to debug on my end in the meantime. Checked everything from user permissions (I use 'gksu nautilus' to manipulate files for my server's user) to bad logical links that I might have been creating by mistake. Glad you found the issue though ;P

Well, everything seems to work except the cables. "back:red" still give an invalid side, even though it's visibly connecting properly. They're loading up, obviously, as the physical cable blocks are there. Wasn't there some override in place for the old version that extended another stock api? Is there a new method for cable-to-color?
Quote

Xfel's Photo Xfel 07 Aug 2012

You should have a file "peripheral" in your /rom/apis folder. if it's not there, than I don't know
Quote

toxicwolf's Photo toxicwolf 07 Aug 2012

I have a problem where my computers are not registering an attached database. When I try to use a function from the db api, such as db.getItem(), it throws an error saying:
db:22: No database attached!

 Xfel, on 07 August 2012 - 09:50 AM, said:

You should have a file "peripheral" in your /rom/apis folder. if it's not there, than I don't know
I don't have the peripheral file in the apis folder either, perhaps that is the problem?

EDIT: I just took a look into the db api and I know the problem. Calling peripheral.getType() on a side containing a database returns the name "database", whereas the db api is looking for the name "resource_database".
Edited by toxicwolf, 07 August 2012 - 02:48 PM.
Quote

Xfel's Photo Xfel 07 Aug 2012

Yes, I restructured some things. Seems I forgot to change that.
Quote

toxicwolf's Photo toxicwolf 07 Aug 2012

Also, how can you make the digital chest move items between adjacent inventories? I would like to move items from and to an inventory next to it, a Buffer from Immibis's mods to be exact. Or have I misread the OP?
Quote

Corbald's Photo Corbald 07 Aug 2012

1.8.2 is still failing to create/load the peripheral api. Everything else seems to work fine. Connecting the peripherals directly to the sides of the computer functions properly, however, cables are still not able to route and throw 'Bad Side.'
Quote

Xfel's Photo Xfel 07 Aug 2012

I'm currently quite busy, but I'll look into it.
Quote

Corbald's Photo Corbald 07 Aug 2012

Np. Nothing pressing, just acting as an unofficial tester for you. I'm OK with the prev. version we're running on our server. (though, the Digital Chest looks sweet!)

Actually, I did think of a suggestion that's in line with your current items. A Digital Counter: It buffers a small amount of items from a BC pipe and when queried, returns type/count in table form, then passes the items to the other side's pipe. I would suggest making the count and flush as one method, to prevent uncounted items from entering between the count/flush.

dCounter = peripheral.wrap("back:red")
dType, dCount = dCounter.getWhatever()
-- db renaming from ID to type String
-- iterator start
print("You have collected "..dCount[iter].." of "..dTypeNamed[iter].." so far!n")
-- iter end

This would be great for counting the results from Quarries and similar items.

Additional methods:
dc.accepts(true) -- Can the DC accept more items?
dc.passThrough(false) -- Does the DC buffer the items for counting, or simply act as an additional pipe? (count calls would return nil)
dc.flush() -- flush w/o counting
dc.redstoneMode("none") -- Modes are: "none" - emits no redstone. "full" - emits redstone from the block when full. "empty" - and when empty. "any" - and when ANY item is in the buffer. "through" - and when any item is 'flushed' or moves through the DC when in passThrough mode. (these could also throw an event?)
and so on.
Quote

Xfel's Photo Xfel 08 Aug 2012

The allocator can do most of it, and some of the other proposed things could be added to it. for counting it is ok already, it is using events.
Quote

Corbald's Photo Corbald 08 Aug 2012

Ah, ok, cool. I wasn't doing anything advanced there, so I didn't really dig into it much.
Quote

sylphio's Photo sylphio 09 Aug 2012

Hello Xfel,

i dont know if it is the correct place for incompability report but i was getting the following error after adding a storage cart under a railcraft loader.
The bug really look ARP related because it was 100% repro on my server until i removed the ARP plugin (The bug appeared just after the installation of ARP). Maybe related to some inventory hook.

Thank
Syl.

MCCP 177
Computercraft 1.41 bukkit
ARP 1.82 bukkit
Railcraft 5.3.3 bukkit

2012-08-08 20:49:58 [SEVERE] java.lang.NoSuchMethodError: railcraft.common.api.InventoryTools.getAdjacentInventoryMap(Lnet/minecraft/server/World;III)Ljava/util/Map;
2012-08-08 20:49:58 [SEVERE] at railcraft.common.utility.TileItemLoader.q_(TileItemLoader.java:138)
2012-08-08 20:49:58 [SEVERE] at net.minecraft.server.World.tickEntities(World.java:1189)
2012-08-08 20:49:58 [SEVERE] at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:559)
2012-08-08 20:49:58 [SEVERE] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:457)
2012-08-08 20:49:58 [SEVERE] at net.minecraft.server.ThreadServerApplication.run(SourceFile:492)
2012-08-08 20:49:58 [SEVERE] Unexpected exception
java.lang.NoSuchMethodError: railcraft.common.api.InventoryTools.getAdjacentInventoryMap(Lnet/minecraft/server/World;III)Ljava/util/Map;
at railcraft.common.utility.TileItemLoader.q_(TileItemLoader.java:138)
at net.minecraft.server.World.tickEntities(World.java:1189)
at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:559)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:457)
at net.minecraft.server.ThreadServerApplication.run(SourceFile:492)
Quote

Xfel's Photo Xfel 09 Aug 2012

Ah, seems that my version of the railcraft api is a bit deprecated. If you send me the latest railcraft bukkit file, I could patch it.

Meanwhile, just delete the railcraft folder in the arp.zip.
Quote

Xfel's Photo Xfel 10 Aug 2012

btw I fixed the problem with the peripheral api. Was a copy-paste error.
Quote

Marval's Photo Marval 10 Aug 2012

Did You maybe fix the problem with the entries.special thing?
Quote

Corbald's Photo Corbald 10 Aug 2012

1.8.3 is still not loading the peripheral api. Is it supposed to go somewhere into /mods/ComputerCraft? Regardless, it's not available on old or new computers within the game. Again, everything else loads properly, or at least seems to. If you can tell me which file within the archive is supposed to be coppied, I can do it manually, for the time being.

EDIT: After looking through the archive, I noticed that the only 'modified on' date that isn't Aug 7th, belongs to the licence.txt file. Did the 1.8.3 get copied to your dropbox? Perhaps it might be possible to include version numbers in the archive name?

EDIT: Found /lua/peripheralAPI.lua and arpturtleAPI.lua. I don't see a /mods/ComputerCraft/lua/rom/apis/* for those? I see one for allocator, db, inventory, workbench.

EDIT: Copied those files into the relevant CC folder and renamed them, now it works.

(instructions to get this working with the current version: Open the .zip file -> navigate to the /lua folder within the zip. -> extract peripheralAPI.lua and arpturtleAPI.lua into /mods/ComputerCraft/lua/rom/apis and rename them, removing the trailing API.lua from the file name.)

Anyway, it's working again, as you can see here:

Posted Image
Quote