- ComputerCraft | Programmable Computers for Minecraft
- → Umpani's Content
Umpani's Content
There have been 13 items by Umpani (Search limited from 10-February 22)
#31458 Startup script sometimes only runs after computer activated by right click
Posted by
Umpani
on 12 September 2012 - 07:06 AM
in
Ask a Pro
When I logged in this morning, the computer was not running. I had to right-click to get the start script running, but then again, after I restarted the Bukkit server and logged back in, the script started just fine without any interaction.It's really strange, i just can't pinpoint the exact circumstances under which this happens.
#31205 Startup script sometimes only runs after computer activated by right click
Posted by
Umpani
on 11 September 2012 - 01:20 AM
in
Ask a Pro
When I richt click the computer, i see the CraftOS string and shortly after the startup script executing (which should have already happend on chunk load).
#31161 Startup script sometimes only runs after computer activated by right click
Posted by
Umpani
on 10 September 2012 - 06:29 PM
in
Ask a Pro
I encountered the problem that under certain conditions (which i was not yet able to determine) the "startup" script in a computer's HDD root directory only runs after i right-click the computer to open the console.
The script is to ensure that the progam is always running when the chunk the comuter is in is loaded. The computer is running on a Bukkit server within a chunk which has a rather complex layout: lots of redstone circuits and machinery with chunk loader. The computer has 3 redstone bundled cables, a wireless modem and 1 peripheral cable (Xfel's peripherals) with 4 monitors and 5 digitals chests connected to it.
My question: Is this a known problem (possibly with a solution) or should I invest more time in finding the cause for it?
I don't need instructions on finding out whether this is caused by a 3rd party mod, I just want to make sure this is not an already known problem.
Cheers,
Umpani
#30482 At which point can a program get interrupted when a chunk unloads?
Posted by
Umpani
on 07 September 2012 - 07:59 PM
in
Ask a Pro
#30464 At which point can a program get interrupted when a chunk unloads?
Posted by
Umpani
on 07 September 2012 - 06:43 PM
in
Ask a Pro
Cloudy, on 07 September 2012 - 06:06 PM, said:
0.05 seconds is a very long time for a CPU, that should be enough, but it raises another question: is event handling synchronous with ticks, meaning that i get an event from pullEvent() roughly at the beginning of a tick?
#30457 At which point can a program get interrupted when a chunk unloads?
Posted by
Umpani
on 07 September 2012 - 05:17 PM
in
Ask a Pro
changeState();
saveState();
there is no guarantee that the state is actually saved, because the execution could have been terminated right between those two statements. When changeState() changed something in the world, the program has no way of knowing about this change after restart just by loading the state from a file. It takes some kind of sensory input, like a redstone current. I'm probably a bit too anal with this matter, but i dislike writing programs which only work most of the time by design
P.S.: About the machine i'm using, its a CC controlled nuclear plant with 4 six-chamber reactors. The program controls the flow of SUC and replacement of reactor components and uranium/isotope cells based on a reactor layout which can be defined for each reactor.
#30442 At which point can a program get interrupted when a chunk unloads?
Posted by
Umpani
on 07 September 2012 - 04:24 PM
in
Ask a Pro
#30387 At which point can a program get interrupted when a chunk unloads?
Posted by
Umpani
on 07 September 2012 - 09:23 AM
in
Ask a Pro
I'm interested in whether a program can be interrupted at just any point or are there some sort of guarantees, like at the next pullEvent() or when a function returns?
Thanks in advance,
Umpani
#28199 [CC 1.5] [MC 1.4.6/1.4.7] [SMP] Xfel's peripherals - New cable appearance!
Posted by
Umpani
on 28 August 2012 - 04:35 PM
in
Peripherals and Turtle Upgrades
Xfel, on 28 August 2012 - 05:39 AM, said:
Eureka! The special items allowed me to circumvent the problem with the empty names! I'll have to enter the items manually in the config file, but at least they get reported now
In case anyone is interested in the solution:
I modified the entries.special entry in arp.cfg for the non working items:
####################
# entries.special
####################
entries.special {
30031=Refined Iron Dust
30120=Hydration Cell
30130=Silver Dust
30133=Clay Dust
30140=Electric Wrench
30181=Electrolyzed Water Cell
30183=Wrench (IC2)
30201=Near-depleted Uranium Cell
30202=Re-Enriched Uranium Cell
30203=Depleted Isotope Cell
30204=Integrated Heat Disperser
30205=Integrated Reactor Plating
30206=Coolant Cell
30207=Uranium Cell
30218=Water Cell
30227=Biofuel Cell
30228=Coalfuel Cell
30229=Bio Cell
30230=H. Coal Cell
30236=Lava Cell
30237=Empty Cell
30246=Bronze
30247=Tin
30248=Copper
30249=Refined Iron
30250=Small Pile of Iron Dust
30251=Bronze Dust
30252=Tin Dust
30253=Copper Dust
30254=Gold Dust
30255=Iron Dust
30256=Coal Dust
4462=Wrench (BC2)
5263=Wrench (Forestry)
7292=Steel Ingot
}
Concerning the exact list of items: Checking the items manually would be tedious (> 800 different items to check), but i can give you some more examples (all items from IC2, not encountered any items from other mods yet with this behaviour, item IDs might differ from default IC2 install - to resolve conflicts):
Format: Display Name (ID xxxxx) - class name (is that a class name? got it from a NEI item dump)
Uranium Cell (ID 30207) - item.itemCellUran
Tin (ID 30247) - item.itemIngotTin
Copper (ID 30248) - item.itemIngotCopper
Lava Cell (ID 30236) - item.itemCellLava
Water Cell (ID 30218) - item.itemCellWater
when iterating over inventory with
for _, stack in inv:list(true) do ...
the variable 'stack' is nil for inventory slots containing any of those items. Further:
db.getItem("Uranium Cell") returns nil
db.getItem("item.itemCellUran.name") returns nil
For any of the items i listed (not just uranium cells).
I hope this info helps. The real problem isn't that the display names don't work propery (i wouldn't have bothered you if it was just that), its that not even the names like 'item.itemCellUran.name' seem to work for those items.
If you're really willing to attempt a fix, you might want to try using a string with the item ID as fallback if even item.itemCellUran.name isn't available as item name.
Concerning Cricket's post: Being able to access items by ID rather than their name would indeed have an advantage: Item IDs are unique, while (display) names aren't. For example, i have 3 distinct items in my combination of mods which have the name "Wrench". One BC "Wrench" (item.wrenchItem), one IC2 "Wrench" (item.itemToolWrench) and the one "Wrench" from forestry (item.wrench). I'm not sure how ARP handles this, or if there is a way of distinguishing those items (what will db.getItem("Wrench") return?).
Cheers,
Umpani
#28103 [CC 1.5] [MC 1.4.6/1.4.7] [SMP] Xfel's peripherals - New cable appearance!
Posted by
Umpani
on 28 August 2012 - 12:08 AM
in
Peripherals and Turtle Upgrades
However, some IC2 items do work, having a name like "blockMFSU.name" and returning a stack object, while others don't (uranium cells).
When abusing your low-level calls like
local item, count, dmg = peripheral.call("left:blue", "getInventoryContent", i, nil)
i get correct count and damage values, but a nil item. At least i can detect that the slot is not really empty this way ;-)
Umpani
#28025 [CC 1.5] [MC 1.4.6/1.4.7] [SMP] Xfel's peripherals - New cable appearance!
Posted by
Umpani
on 27 August 2012 - 04:31 PM
in
Peripherals and Turtle Upgrades
Umpani
#27898 [CC 1.5] [MC 1.4.6/1.4.7] [SMP] Xfel's peripherals - New cable appearance!
Posted by
Umpani
on 26 August 2012 - 09:14 PM
in
Peripherals and Turtle Upgrades
Unfortunately I encountered another slight problem: It seems like some items are not reported when iterating over the contents of a digital chest. So far i observed this behaviour only with IC2 items and only when testing the setup on our Bukkit server (see screenshot, uranium cells not reported). In single player the same setup works as expected. I'm using the latest files (Bukkit version and client) of your mod.
Code of LUA script (test.lua):
os.loadAPI("/rom/apis/inventory");
os.loadAPI("/rom/apis/db");
inv = inventory.get("left:blue");
for _, stack in inv:list() do
print (textutils.serialize(stack));
end
Cheers,
Umpani
Screenshot:
#25170 [CC 1.5] [MC 1.4.6/1.4.7] [SMP] Xfel's peripherals - New cable appearance!
Posted by
Umpani
on 11 August 2012 - 11:10 AM
in
Peripherals and Turtle Upgrades
sylphio, on 11 August 2012 - 08:56 AM, said:
Did a test of the 1.8.3 bukkit version, first, i was getting a connection error due to a non-matching peripheral cable version between the bukkit server 1.02 and the client package 1.01.
I bypassed the problem by removing the peripheral mod class from the archive but when use the matter database api or the inventory api i get a error about a unknow native.
Same problem here, although i did not try to bypass the problem:
There is a version mismatch of CCCable between arp-client-1.2.5.zip (1.0.1 in mcmod.info/mod_CCPeripheralCable.info) and arp-bukkit-1.2.5.zip (v1.0.2 in in mcmod.info/mod_CCPeripheralCable.info) which prevents clients to connect to the bukkit server when using the provided downloads without modification.
Cheers,
Umpani
Edit:
This portion of the Bukkit server's server.log might help to track down the problem. It seems that the client reports "CCPeripheralCable v1.0" while the server is expecting "mod_CCPeripheralCable v1.0.2".
Also, in my non-existent knowledge about MC modding, i found out that simply adjusting the in mcmod.info and mod_CCPeripheralCable.info seemed to have no effect on the version number the client reports to the server.
2012-08-11 13:57:47 [INFO] Umpani joined with: [CodeChickenCore 0.5.3, MinecraftForge 3.3.8.164, NotEnoughItems 1.2.2.4, ReiMinimap v3.2_04 [1.2.5], IC2 v1.97, IC2AdvancedMachines v4.0, MetallurgyFishing 1.0.0, ComputerCraft 1.33, CCPeripheralCable v1.0, BuildCraftCore 2.2.14, BuildCraftBuilders 2.2.14, BuildCraftEnergy 2.2.14, BuildCraftFactory 2.2.14, BuildCraftTransport 2.2.14, AdditionalPipes 2.1.3 (Minecraft 1.2.5, Buildcraft 2.2.14, Forge 3.0.1.75), RedPowerMachine 2.0pr5b2, ccSensors MC1.2.5 Build017pr1, CCTurtle 1.33, mocreatures v3.6.2 (MC 1.2.5), EnderStorage 1.1.3, ExtraBees 1.2.1, RedPowerWorld 2.0pr5b2, Forestry 1.4.8.6, IC2NuclearControl v1.1.10, ImmibisCore 49.1.1, InvTweaks 1.41b (1.2.4), MAtmos_forModLoader r12 for 1.1.x, ModularForceFieldSystem rev7, IC2_ChargingBench 1.95b, CompactSolars 2.3.2, IronChest 3.8, RedPowerCore 2.0pr5b2, NetherOres 1.2.5R1.2.2, PowerConverters 1.2.5R1.3.4, Railcraft 5.3.3, RedPowerControl 2.0pr5b2, RedPowerLighting 2.0pr5b2, RedPowerLogic 2.0pr5b2, RedPowerWiring 2.0pr5b2, TubeStuff 49.1.2, Balkon's WeaponMod 1.2.5 v8.6.0, WirelessRedstoneCore 1.2.2.3, WirelessRedstoneAddons 1.2.2.3, WirelessRedstoneRedPower 1.2.2.1, ImmiChunkLoaders rev3.2, CCAdvancedResourceProcessing v1.8]
2012-08-11 13:57:47 [INFO] Umpani was disconnected because they are missing the following mods mod_CCPeripheralCable v1.0.2.
- ComputerCraft | Programmable Computers for Minecraft
- → Umpani's Content


