←  Peripherals and Turtle Upgrades

ComputerCraft | Programmable Computers for Minecraft

»

[SMP] [MC 1.2.5 | CC 1.33 / 1.41] Touch Pe...

xuma202's Photo xuma202 22 Jul 2012

Intruduction:

A few days ago Pinkishu suggested Touch Monitors (http://www.computerc...creen-monitors/). But since dan did't wanted the Mouse In ComputerCraft I made a peripheral. Because I can't recode the Monitor itself I made Touch Pens that you can use on a Monitor.

And now it's there the port to SMP!!!!

Screenshots:


Posted Image
Posted ImagePosted ImagePosted ImagePosted ImagePosted Image

All Screenshots

How to use:

1. Craft a Pen Dock and place it next to a Computer
2. Add a Monitor using addMonitor(side) side is the side the Monitor is attached to the Computer ex. addMonitor("left")
3. Remove a Monitor with removeMonitor(side)
4. When you now right click the Monitor with a Touch Pen the Pen Dock will queue an event for the computer:

Parameter Description
1/Event Name string "Monitor_touched"
2 string side (to identify the Monitor)
3 number xIndex (the xIndex of the Block that was touched (will be 0 for the leftmost Block))
4 number yIndex (the yIndex of the Block that was touched (will be 0 for the topmost Block))
5 number hitX (0 <= hitX < 1)
6 number hitY (0 <= hitY < 1)

5. When you've added a Monitor you can still resize it!
6. When the Computer reboots all added Monitors will be lost!

For use with Peripheral Cables:

If not both (Monitor and Pen Dock) are attached to a Computer directly use addMonitorByXYZ(x, y, z, side)
Put in the coordinates of the Monitor instead of x,y,z. You have to do this once for each Monitor even if the Monitor is bigger than 1x1 Blocks!

You can get the Coordinates of a Monitor by right clicking a Monitor with a Touch Pen while sneaking.

Download:

v 1.1.1 [MC 1.2.5 | CC 1.33 / CC 1.41] Client: mediafire Server: mediafire

v 1.1.0 [MC 1.2.5 | CC 1.33 / CC 1.41] Client: mediafire Server: mediafire

v 1.0.0 [MC 1.2.5 | CC 1.33 / CC 1.41] Client: mediafire

Installation:

Version 1.1.0+: You can put the zip directly into the mods folder.
Version 1.0.0: Will have to be placed in the mods folder unpacked.

Requirements:
  • Computer Craft
  • Minecraft Forge 3.3.7.135 or later
Changelog:

v 1.1.1
  • Fixed a bug that caused the mod to ignore changes in the *.cfg file
v 1.1.0
  • Ported to SMP
  • Now only using Forge
  • Works with Peripheral Cables now
  • New Textures
  • Pens will only work if not more than 50Blocks away from the Pen Dock.
  • Warning: changed ids and the way config file gets read. Backup your worlds!!
v 1.0.0
  • Initial release
Upcomming features:
  • Update to MC 1.3.2
  • Better support for Peripheral Cables. No more need to transfer Coordinates manually.
Known bugs:
  • No known bug in latest version
If you like this it's highly appreciated to share you ideas, thoughts and suggestions here.


xuma202
Quote

Pinkishu's Photo Pinkishu 22 Jul 2012

Heh nice :)/>

I still think mouse is completely unrealted to touchscreens but ohwell
Now we just need SMP and maybe a bukkit port
Quote

Xfel's Photo Xfel 22 Jul 2012

How did you make it not connecting to cables?
Quote

xuma202's Photo xuma202 22 Jul 2012

View PostXfel, on 22 July 2012 - 05:11 PM, said:

How did you make it not connecting to cables?

When the attach method get's called i grab the tile entity on the given side. I check if it's an instance of IPeripheral if so I only return true if getType returns "computer". :)/>
Quote

xuma202's Photo xuma202 22 Jul 2012

View PostPinkishu, on 22 July 2012 - 04:05 PM, said:

Heh nice :)/>

I still think mouse is completely unrealted to touchscreens but ohwell
Now we just need SMP and maybe a bukkit port

Yes SMP is something I've already thought of. But I have no experience on that yet.

STATUS: Currently porting to SMP!
Quote

Dirkus7's Photo Dirkus7 26 Jul 2012

Got an ID conflict, where can i change the ID's?
Quote

xuma202's Photo xuma202 26 Jul 2012

In the config file that you can find at .minecraft/config the file is called mod_touchPen or similar
Quote

xuma202's Photo xuma202 26 Jul 2012

Sorry did not meant to doublepost.

EDIT: Status update. New version is out!!
Edited by xuma202, 28 July 2012 - 05:09 PM.
Quote

xuma202's Photo xuma202 28 Jul 2012

Happy to announce SMP support update!!! Get it before it costs money (will never be commercial)
Quote

KingMachine's Photo KingMachine 29 Jul 2012

This is great. Congratulations on a peripheral well done.
Quote

DarkSnake's Photo DarkSnake 29 Jul 2012

The block ID won't change, and I edited the .cfg in /config/ :ph34r:/>
Quote

xuma202's Photo xuma202 29 Jul 2012

View PostDarkSnake, on 29 July 2012 - 07:16 PM, said:

The block ID won't change, and I edited the .cfg in /config/ :ph34r:/>

What do you mean the default ID in v1.1.0 is 199 this should work if there is no other mod using this id installed. Whatever does it still not work now?
Quote

DarkSnake's Photo DarkSnake 29 Jul 2012

View Postxuma202, on 29 July 2012 - 07:30 PM, said:

View PostDarkSnake, on 29 July 2012 - 07:16 PM, said:

The block ID won't change, and I edited the .cfg in /config/ :ph34r:/>

What do you mean the default ID in v1.1.0 is 199 this should work if there is no other mod using this id installed. Whatever does it still not work now?

What I mean is, I can't change the ID in the config.cfg, 199 is occupied by RedPower for me ;-) Im trying to put 4053(which is free for me!) in the config.cfg but it still tries to occupy 199.
Quote

xuma202's Photo xuma202 29 Jul 2012

Oh that seems to be a bug. I will fix this.
Quote

DarkSnake's Photo DarkSnake 29 Jul 2012

Okay, sweet, thanks! :ph34r:/>
Quote

xuma202's Photo xuma202 29 Jul 2012

Ok fixing is done. Update is out.
Quote

DarkSnake's Photo DarkSnake 29 Jul 2012

Works now thanks :ph34r:/>!
Quote

ArchAngel075's Photo ArchAngel075 18 Aug 2012

I will like to point out that i will attempt to use this with my WIP LCD TV idea(search for my post in ASK a pro, im stuck on some parts of project)
Would be useful since users can more visually see what pixel will be lighted up(plus i can then add all the pixels binary vlaues instead of using a calculator on my desk XD)

Thanks, i just hope a bukkit port is made eventually!
Quote

Malte's Photo Malte 16 Sep 2012

Wird es einen Bukkit port geben? PS: Geniale idee
Quote

xuma202's Photo xuma202 16 Sep 2012

No there will be no bukit port. At least not by me.

If someone is interested in porting please send me a PM.
Quote