Jump to content




[MC 1.4.7][CC1.481][Version: 1.4.1] CCLights! Bug fix!

peripheral java utility

144 replies to this topic

#41 Kilobyte

  • Members
  • 122 posts

Posted 01 December 2012 - 09:10 AM

Hey, dunno if you are aware, but If you break a multipixel light you just get a singlepixel one :(

#42 SoniEx2

  • New Members
  • 14 posts

Posted 05 December 2012 - 09:28 AM

Please add the following function to pixel arrays:
pixel.setTableRGB(table)
it would help a lot!

#43 Cloudy

    Ex-Developer

  • Members
  • 2,543 posts

Posted 09 December 2012 - 12:30 AM

View PostSoniEx2, on 05 December 2012 - 09:28 AM, said:

Please add the following function to pixel arrays:
pixel.setTableRGB(table)
it would help a lot!

Woah. You're being polite. Who are you and what have you done with the real Soni?

#44 SoniEx2

  • New Members
  • 14 posts

Posted 10 December 2012 - 03:09 AM

View PostCloudy, on 09 December 2012 - 12:30 AM, said:

View PostSoniEx2, on 05 December 2012 - 09:28 AM, said:

Please add the following function to pixel arrays:
pixel.setTableRGB(table)
it would help a lot!

Woah. You're being polite. Who are you and what have you done with the real Soni?
I am the real Soni!

And about setTableRGB: It would be something like table[1,1]=0xFF0000 (to set pixel @ 1,1 to red).
That would make "screens" faster and less laggy to update, and also make my in-game Sega Genesis emulator possible.
I would do something like this:
tVideo = {}
local pixel = peripheral.wrap("back")

local function startup()
  for x=1,16 do
    for y=1,16 do
	  tVideo[x,y]=0x000000 -- set every pixel to black
    end
  end
end


local function update()
  -- update logic
  os.queueEvent("update")
  os.pullEvent("update")
end

startup()
pixel.setTableRGB(tVideo)
while true do
  update()
  pixel.setTableRGB(tVideo)
end


#45 ds84182

  • Members
  • 184 posts

Posted 14 December 2012 - 02:22 PM

View PostSoniEx2, on 10 December 2012 - 03:09 AM, said:

View PostCloudy, on 09 December 2012 - 12:30 AM, said:

View PostSoniEx2, on 05 December 2012 - 09:28 AM, said:

Please add the following function to pixel arrays:
pixel.setTableRGB(table)
it would help a lot!

Woah. You're being polite. Who are you and what have you done with the real Soni?
I am the real Soni!

And about setTableRGB: It would be something like table[1,1]=0xFF0000 (to set pixel @ 1,1 to red).
That would make "screens" faster and less laggy to update, and also make my in-game Sega Genesis emulator possible.
I would do something like this:
tVideo = {}
local pixel = peripheral.wrap("back")

local function startup()
  for x=1,16 do
	for y=1,16 do
	  tVideo[x,y]=0x000000 -- set every pixel to black
	end
  end
end


local function update()
  -- update logic
  os.queueEvent("update")
  os.pullEvent("update")
end

startup()
pixel.setTableRGB(tVideo)
while true do
  update()
  pixel.setTableRGB(tVideo)
end
I wish I could do it, but I'm pretty sure I can't transmit a table into a peripheral :(. Mr. Cloud or Mr. Dan+200 could add functionality to ComputerCraft, just don't bug them to death! ;)
Also, I'm working on a new version. I am trying to make monitors multiblock, and I am rendering the Light Grids a different way (Think about the Maps :P). Just a glimpse of the future :D. (Also, 128x128 Light Grids, and the recipe output doubling :D)

#46 Nietsnie

  • Members
  • 14 posts

Posted 14 December 2012 - 07:16 PM

View Postds84182, on 14 December 2012 - 02:22 PM, said:

I wish I could do it, but I'm pretty sure I can't transmit a table into a peripheral :(. Mr. Cloud or Mr. Dan+200 could add functionality to ComputerCraft, just don't bug them to death! ;)

Is there a way to batch the updates somehow? I get a lot of connection overflows if I try and change a 16x16 too fast.

#47 allquan

  • Members
  • 34 posts

Posted 15 December 2012 - 10:50 AM

Hey very nice Peripheral! I made with this one and the Mappers Peripheral a "geoscaner". It can scan the terrain (16x16 Blocks) an give you a visual response. So you can search for ores. On the first 3 pictures you can see the terrain from the side.

You can move down and in all other directions.

On the last picture you can the the world from above (layer 16) the red pixels are redstone and the yellow ones are gold (black are unkown blocks, grey is stone and white is air). You also can print out the coords of the ores on a paper.

Keep on our good work :)

Attached Thumbnails

  • Attached Image: 2012-12-14_22.41.41.png
  • Attached Image: 2012-12-14_22.42.17.png


#48 ds84182

  • Members
  • 184 posts

Posted 15 December 2012 - 03:07 PM

View Postallquan, on 15 December 2012 - 10:50 AM, said:

Hey very nice Peripheral! I made with this one and the Mappers Peripheral a "geoscaner". It can scan the terrain (16x16 Blocks) an give you a visual response. So you can search for ores. On the first 3 pictures you can see the terrain from the side.

You can move down and in all other directions.

On the last picture you can the the world from above (layer 16) the red pixels are redstone and the yellow ones are gold (black are unkown blocks, grey is stone and white is air). You also can print out the coords of the ores on a paper.

Keep on our good work :)
Very nice!
128x128 is comming out soon, so you can have that game on a bigger resolution :D
And with a bigger res, you could use textures :D

#49 Zaggy1024

  • Members
  • 23 posts

Posted 16 December 2012 - 08:40 AM

I tried crafting a light grid, but for some reason it didn't seem to work. When I put the glass panes around the light pixel, it didn't show any output in the crafting table. :\ Any idea what might be wrong?

#50 ds84182

  • Members
  • 184 posts

Posted 16 December 2012 - 08:59 AM

View PostZaggy1024, on 16 December 2012 - 08:40 AM, said:

I tried crafting a light grid, but for some reason it didn't seem to work. When I put the glass panes around the light pixel, it didn't show any output in the crafting table. :\ Any idea what might be wrong?
Sorry, I forgot to update the recipe in the forum post. I think it was always wrong T_T.
But it's fixed now.

#51 ds84182

  • Members
  • 184 posts

Posted 16 December 2012 - 09:01 AM

View PostNietsnie, on 14 December 2012 - 07:16 PM, said:

View Postds84182, on 14 December 2012 - 02:22 PM, said:

I wish I could do it, but I'm pretty sure I can't transmit a table into a peripheral :(. Mr. Cloud or Mr. Dan+200 could add functionality to ComputerCraft, just don't bug them to death! ;)

Is there a way to batch the updates somehow? I get a lot of connection overflows if I try and change a 16x16 too fast.
I fixed networking in 1.3. It shouldn't overflow anymore!

#52 Nietsnie

  • Members
  • 14 posts

Posted 16 December 2012 - 10:24 AM

View Postds84182, on 16 December 2012 - 09:01 AM, said:

I fixed networking in 1.3. It shouldn't overflow anymore!

Awesome! :)

#53 Zaggy1024

  • Members
  • 23 posts

Posted 16 December 2012 - 11:58 AM

How did you make the screenshots in the OP with multiple blocks as one screen?

#54 ds84182

  • Members
  • 184 posts

Posted 16 December 2012 - 02:13 PM

View PostZaggy1024, on 16 December 2012 - 11:58 AM, said:

How did you make the screenshots in the OP with multiple blocks as one screen?
I used a turtle :P

#55 Zaggy1024

  • Members
  • 23 posts

Posted 16 December 2012 - 02:18 PM

lol, crud. I guess I'll have to figure out how to to use networking or something to make proper screen out of these... :P

#56 ds84182

  • Members
  • 184 posts

Posted 16 December 2012 - 02:39 PM

Meh. That's the main point of CCLights. Use turtles to write to the screen :D

#57 Learning_inpaired

  • New Members
  • 77 posts

Posted 16 December 2012 - 04:06 PM

like OMG you should see if the tekkit team will add this

#58 ds84182

  • Members
  • 184 posts

Posted 16 December 2012 - 05:15 PM

View Postwoodzykiler, on 16 December 2012 - 04:06 PM, said:

like OMG you should see if the tekkit team will add this
LIKE HELL NO. First of all, it's for Minecraft 1.4.2+, and I hate Tekkit for not asking the modders.

#59 abihoooo

  • Members
  • 33 posts
  • LocationForge World

Posted 16 December 2012 - 05:57 PM

using peripheral cables you can make a screen array! Kind of a limit of 16 screens without a massive cable tangle problem, but with a res of 512x384 in 4:3 aspect ratio it shouldn't matter too much.

Made a simple array program to link up 12 16x16 screens in a 4:3 aspect ratio
function setRGB(x, y, r, g, B)/>
   if(y < 17) then
	  if(x < 17) then
		 corX = x
		 corY = y
		 screen1.setColorRGB(corX, corY, r, g, B)/>
	  elseif(x > 16 and x < 33) then
		 corX = x - 16
		 corY = y
		 screen2.setColorRGB(corX, corY, r, g, B)/>
	  elseif(x > 32 and x < 49) then
		 corX = x - 32
		 corY = y
		 screen3.setColorRGB(corX, corY, r, g, B)/>
	  elseif(x > 48) then
		 corX = x - 48
		 corY = y
		 screen4.setColorRGB(corX, corY, r, g, B)/>
	  end
  
   elseif(y > 16 and y < 33) then
	  if(x < 17) then
		 corX = x
		 corY = y - 16
		 screen5.setColorRGB(corX, corY, r, g, B)/>
	 
	  elseif(x > 16 and x < 33) then
		 corX = x - 16
		 corY = y - 16
		 screen6.setColorRGB(corX, corY, r, g, B)/>
	 
	  elseif(x > 32 and x < 49) then
		 corX = x - 32
		 corY = y - 16
		 screen7.setColorRGB(corX, corY, r, g, B)/>
	 
	  elseif(x > 48) then
		 corX = x - 48
		 corY = y - 16
		 screen8.setColorRGB(corX, corY, r, g, B)/>
	  end
  
   elseif(y > 32) then
	  if(x > 17) then
		 corX = x
		 corY = y - 32
		 screen9.setColorRGB(corX, corY, r, g, B)/>
	 
	  elseif(x > 16 and x < 33) then
		 corX = x - 16
		 corY = y - 32
		 screen10.setColorRGB(corX, corY, r, g, B)/>
	 
	  elseif(x > 32 and x < 49) then
		 corX = x - 32
		 corY = y - 32
		 screen11.setColorRGB(corX, corY, r, g, B)/>
	 
	  elseif(x > 48) then
		 corX = x - 48
		 corY = y - 32
		 screen12.setColorRGB(corX, corY, r, g, B)/>
	  end
   end
end
screen1 = peripheral.wrap("back:black")
screen2 = peripheral.wrap("back:red")
screen3 = peripheral.wrap("back:green")
screen4 = peripheral.wrap("back:brown")
screen5 = peripheral.wrap("back:blue")
screen6 = peripheral.wrap("back:purple")
screen7 = peripheral.wrap("back:cyan")
screen8 = peripheral.wrap("back:orange")
screen9 = peripheral.wrap("back:gray")
screen10 = peripheral.wrap("back:pink")
screen11 = peripheral.wrap("back:lime")
screen12 = peripheral.wrap("back:yellow")
while(true) do
x = read()
y = read()
r = read()
g = read()
b = read()
setRGB(tonumber(x), tonumber(y), tonumber(r), tonumber(g), tonumber(B)/>)
end


#60 abihoooo

  • Members
  • 33 posts
  • LocationForge World

Posted 16 December 2012 - 06:38 PM

updated to the latest CCLights and it kept spouting this and chewed through my 12 gb of ram within a minute

*** MagicMinecraftLauncher 0.9.9 ***
Disable inactive mods
2012-12-15 23:16:28 [INFO] [ForgeModLoader] Forge Mod Loader version 4.5.17.479 for Minecraft 1.4.5 loading
2012-12-15 23:16:28 [INFO] [STDOUT] Adding Accesstransformer map: codechickencore_at.cfg
2012-12-15 23:16:28 [INFO] [STDOUT] Adding Accesstransformer map: nei_at.cfg
2012-12-15 23:16:29 [INFO] [STDOUT] Inserted super call into avs.c
2012-12-15 23:16:29 [INFO] [STDOUT] auy was overriden from NotEnoughItems 1.4.3.2.jar
2012-12-15 23:16:29 [INFO] [STDOUT] Generated BlockMobSpawner helper method.
2012-12-15 23:16:30 [INFO] [STDOUT] 27 achievements
2012-12-15 23:16:30 [INFO] [STDOUT] 208 recipes
2012-12-15 23:16:30 [INFO] [STDOUT] Setting user: abihoooo, 4727254281933906210
2012-12-15 23:16:30 [INFO] [STDERR] Client asked for parameter: server
2012-12-15 23:16:30 [INFO] [STDOUT] LWJGL Version: 2.4.2
2012-12-15 23:16:30 [INFO] [ForgeModLoader] Attempting early MinecraftForge initialization
2012-12-15 23:16:30 [INFO] [STDOUT] MinecraftForge v6.4.1.426 Initialized
2012-12-15 23:16:30 [INFO] [ForgeModLoader] MinecraftForge v6.4.1.426 Initialized
2012-12-15 23:16:30 [INFO] [STDOUT] Replaced 84 ore recipies
2012-12-15 23:16:30 [INFO] [ForgeModLoader] Completed early MinecraftForge initialization
2012-12-15 23:16:30 [INFO] [ForgeModLoader] Searching C:\Users\Billy\AppData\Roaming\.minecraft\mods for mods
2012-12-15 23:16:31 [INFO] [ForgeModLoader] Forge Mod Loader has identified 25 mods to load
2012-12-15 23:16:32 [INFO] [ForgeModLoader] Configured a dormant chunk cache size of 0
2012-12-15 23:16:32 [INFO] [STDOUT] [ASTU] Loading config file...
2012-12-15 23:16:33 [INFO] [Buildcraft] Starting BuildCraft 3.2.2 (:8)
2012-12-15 23:16:33 [INFO] [Buildcraft] Copyright (c) SpaceToad, 2011
2012-12-15 23:16:33 [INFO] [Buildcraft] http://www.mod-buildcraft.com
2012-12-15 23:16:33 [INFO] [STDOUT] xfel.mods.cccable.client.ClientProxy@7818e43
2012-12-15 23:16:33 [INFO] [IC2] Config loaded from C:\Users\Billy\AppData\Roaming\.minecraft\config\IC2.cfg
2012-12-15 23:16:33 [INFO] [IC2] Using 32 audio sources.
2012-12-15 23:16:34 [INFO] [ForgeModLoader] [Mystcraft] Adding Entity Renderers
2012-12-15 23:16:34 [INFO] [STDOUT] Starting up SoundSystem...
2012-12-15 23:16:34 [INFO] [STDOUT] Initializing LWJGL OpenAL
2012-12-15 23:16:34 [INFO] [STDOUT]	 (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)
2012-12-15 23:16:34 [INFO] [STDOUT] OpenAL initialized.
2012-12-15 23:16:35 [INFO] [STDOUT] Removing TMI Uninstaller
2012-12-15 23:16:35 [INFO] [STDOUT] Deleting Dir: C:\Users\Billy\AppData\Roaming\.minecraft\bin\TMIUninstaller
2012-12-15 23:16:35 [INFO] [STDOUT] Loading ComputerCraft v1.47 (rev 786)
2012-12-15 23:16:35 [INFO] [STDOUT] ComputerCraft: Searching for RedPowerLib...
2012-12-15 23:16:35 [INFO] [STDOUT] ComputerCraft: RedPowerLib not found.
2012-12-15 23:16:35 [INFO] [STDOUT] Loading CCTurtle v1.47 (rev 786)
2012-12-15 23:16:35 [INFO] [STDOUT] CONFLICT @ 19999 item slot already occupied by hackingroelz.ItemEnderLinkCard@2acf062d while adding hackingroelz.ItemEnderLinkCard@7d9e8a4f
2012-12-15 23:16:35 [INFO] [OpenCCSensors] OpenCCSensors version 0.03 starting
2012-12-15 23:16:35 [INFO] [OpenCCSensors] buildcraft sensor loaded
2012-12-15 23:16:35 [INFO] [OpenCCSensors] vanilla sensor loaded
2012-12-15 23:16:35 [INFO] [OpenCCSensors] industrialcraft sensor loaded
2012-12-15 23:16:35 [WARNING] [ForgeModLoader] Could not retrieve Forestry item identified by: canEmpty
2012-12-15 23:16:35 [WARNING] [ForgeModLoader] Could not retrieve Forestry item identified by: waxCapsule
2012-12-15 23:16:35 [WARNING] [ForgeModLoader] Could not retrieve Forestry item identified by: refractoryEmpty
2012-12-15 23:16:35 [WARNING] [ForgeModLoader] Could not retrieve Forestry item identified by: refractoryWax
2012-12-15 23:16:35 [WARNING] [ForgeModLoader] Could not retrieve Forestry item identified by: ingotTin
2012-12-15 23:16:35 [WARNING] [ForgeModLoader] Could not retrieve Forestry item identified by: beeswax
2012-12-15 23:16:36 [WARNING] [ForgeModLoader] Could not retrieve Forestry item identified by: fertilizerCompound
2012-12-15 23:16:36 [INFO] [Railcraft] Activating Christmas Seasonal Pack
2012-12-15 23:16:36 [INFO] [CCCable] Existing peripheral api file found, has version 1.2.1
2012-12-15 23:16:36 [INFO] [IC2] Loading IC2 submodule: bcIntegration32x
2012-12-15 23:16:36 [INFO] [IC2] BuildCraft integration: Railcraft integration loaded
2012-12-15 23:16:36 [INFO] [IC2] BuildCraft 3.2 integration module loaded
2012-12-15 23:16:36 [INFO] [IC2] Loaded minor compatibility modules: none
2012-12-15 23:16:36 [WARNING] [ForgeModLoader] Could not retrieve Forestry item identified by: liquidBiofuel
2012-12-15 23:16:36 [INFO] [ForgeModLoader] Forge Mod Loader has successfully loaded 25 mods
2012-12-15 23:16:39 [SEVERE] [ForgeModLoader] This world was saved with mod mod_Lights which appears to be missing, things may not work well
2012-12-15 23:16:39 [INFO] [ForgeModLoader] Loading dimension 0 (CCsensor test) (bdo@1346e527)
2012-12-15 23:16:39 [INFO] [ForgeModLoader] Loading dimension 1 (CCsensor test) (bdo@1346e527)
2012-12-15 23:16:40 [INFO] [ForgeModLoader] Loading dimension -1 (CCsensor test) (bdo@1346e527)
2012-12-15 23:16:40 [INFO] [STDOUT] Loading NEI
2012-12-15 23:16:41 [INFO] [STDOUT] Loading Player: abihoooo
2012-12-15 23:16:41 [INFO] [STDOUT] Sending serverside check to: abihoooo
2012-12-15 23:16:42 [INFO] [STDOUT] Loading World: local/CCsensor test
2012-12-15 23:16:42 [INFO] [STDOUT] Loaded immibis.core.NEIImmibisCoreConfig
2012-12-15 23:16:42 [INFO] [STDOUT] IC2 NEI Submodule initialized
2012-12-15 23:16:42 [INFO] [STDOUT] Loaded ic2.neiIntegration.common.NEIIC2Config
2012-12-15 23:16:42 [INFO] [STDOUT] Loaded codechicken.wirelessredstone.core.NEIWirelessCoreConfig
2012-12-15 23:16:42 [INFO] [STDOUT] Loaded codechicken.wirelessredstone.addons.NEIWirelessAddonConfig
2012-12-15 23:16:48 [INFO] [STDOUT] Inserted super call into avl.c
2012-12-15 23:16:48 [INFO] [STDOUT] ComputerCraft: Searching for RedPowerWorld...
2012-12-15 23:16:48 [INFO] [STDOUT] ComputerCraft: RedPowerWorld not found.
2012-12-15 23:17:09 [INFO] [STDOUT] Lifetime expired: Peripheral Light (ID 0): 1
2012-12-15 23:17:09 [INFO] [STDOUT] Lifetime expired: Peripheral Light (ID 0): 2
2012-12-15 23:17:10 [INFO] [STDOUT] Lifetime expired: Peripheral Light (ID 0): 2
2012-12-15 23:17:10 [INFO] [STDOUT] Lifetime expired: Peripheral Light (ID 0): 3
2012-12-15 23:17:10 [INFO] [STDOUT] Lifetime expired: Peripheral Light (ID 0): 3
2012-12-15 23:17:10 [INFO] [STDOUT] Lifetime expired: Peripheral Light (ID 0): 3
2012-12-15 23:17:10 [INFO] [STDOUT] Lifetime expired: Peripheral Light (ID 0): 3
2012-12-15 23:17:10 [INFO] [STDOUT] Lifetime expired: Peripheral Light (ID 0): 3
2012-12-15 23:17:10 [INFO] [STDOUT] Lifetime expired: Peripheral Light (ID 0): 4
2012-12-15 23:17:10 [INFO] [STDOUT] Lifetime expired: Peripheral Light (ID 0): 4
2012-12-15 23:17:10 [INFO] [STDOUT] Lifetime expired: Peripheral Light (ID 0): 4
2012-12-15 23:17:10 [INFO] [STDOUT] Lifetime expired: Peripheral Light (ID 0): 4
2012-12-15 23:17:10 [INFO] [STDOUT] Lifetime expired: Peripheral Light (ID 0): 4
2012-12-15 23:17:10 [INFO] [STDOUT] Lifetime expired: Peripheral Light (ID 0): 4
2012-12-15 23:17:10 [INFO] [STDOUT] Lifetime expired: Peripheral Light (ID 0): 4
2012-12-15 23:17:10 [INFO] [STDOUT] Lifetime expired: Peripheral Light (ID 0): 5
2012-12-15 23:17:10 [INFO] [STDOUT] Lifetime expired: Peripheral Light (ID 0): 5
2012-12-15 23:17:10 [INFO] [STDOUT] Lifetime expired: Peripheral Light (ID 0): 5
2012-12-15 23:17:10 [INFO] [STDOUT] Lifetime expired: Peripheral Light (ID 0): 5
2012-12-15 23:17:10 [INFO] [STDOUT] Lifetime expired: Peripheral Light (ID 0): 5
2012-12-15 23:17:10 [INFO] [STDOUT] Lifetime expired: Peripheral Light (ID 0): 5
2012-12-15 23:17:10 [INFO] [STDOUT] Lifetime expired: Peripheral Light (ID 0): 5
2012-12-15 23:17:10 [INFO] [STDOUT] Lifetime expired: Peripheral Light (ID 0): 5
2012-12-15 23:17:10 [INFO] [STDOUT] Lifetime expired: Peripheral Light (ID 0): 5
2012-12-15 23:17:10 [INFO] [STDOUT] Lifetime expired: Peripheral Light (ID 0): 5
2012-12-15 23:17:10 [INFO] [STDOUT] Lifetime expired: Peripheral Light (ID 0): 6
2012-12-15 23:17:10 [INFO] [STDOUT] Lifetime expired: Peripheral Light (ID 0): 6
2012-12-15 23:17:10 [INFO] [STDOUT] Lifetime expired: Peripheral Light (ID 0): 6
2012-12-15 23:17:10 [INFO] [STDOUT] Lifetime expired: Peripheral Light (ID 0): 6
2012-12-15 23:17:10 [INFO] [STDOUT] Lifetime expired: Peripheral Light (ID 0): 6
2012-12-15 23:17:10 [INFO] [STDOUT] Lifetime expired: Peripheral Light (ID 0): 6
2012-12-15 23:17:10 [INFO] [STDOUT] Lifetime expired: Peripheral Light (ID 0): 6
2012-12-15 23:17:10 [INFO] [STDOUT] Lifetime expired: Peripheral Light (ID 0): 6
2012-12-15 23:17:10 [INFO] [STDOUT] Lifetime expired: Peripheral Light (ID 0): 6
2012-12-15 23:17:10 [INFO] [STDOUT] Lifetime expired: Peripheral Light (ID 0): 6
2012-12-15 23:17:10 [INFO] [STDOUT] Lifetime expired: Peripheral Light (ID 0): 6

It continues onto "2012-12-15 23:32:45 [INFO] [STDOUT] Lifetime expired: Peripheral Light (ID 0): 156" until i cut it. All I did was make a for() loop going to 64 to make a red line. Is there still problems?





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users