Lever - Printable Version +- Cuberite Forum (https://forum.cuberite.org) +-- Forum: Cuberite (https://forum.cuberite.org/forum-4.html) +--- Forum: Development (https://forum.cuberite.org/forum-13.html) +--- Thread: Lever (/thread-649.html) Pages:
1
2
|
Lever - keyboard - 12-14-2012 Hi Guys, I'm new to minecraft, and while surfing the web looking for minecraft servers, I found this project. I am C++ developer and I am really interested in contribute to the project. I download the code from the SVN site to familiarize myself with the code last week. I was able to implement the redstone levers and add it to the redstone simulator. I have attached the patch for it. Please let me know if it looks good and if I followed the code standard that you guys are using. Also, while familiarizing with the redstone simulator, I was thinking: wouldn't be easier to create for this simulator some sort of event based simulator where all the devices (wires,repeaters,levers,pistons, etc..) are classes that respond to the events and the main function Simulate() will only pass the events that are queue for the current server tick? This way it will be easier to add devices. If you guys want, I can look into it. RE: Lever - xoft - 12-14-2012 Hello, welcome onboard Sorry that I can't have a look at your code, I'm leaving for Korea later today so I'm busy packing. But at least I'll try to answer your questions. Devices would be a great idea, if it weren't for chunk loading and unloading. This makes the device classes very difficult to implement - how do you initialize them when a chunk loads? How about devices going across chunk borders and one chunk unloads? If you can solve these issues, then go ahead. Also, there's a plan for rewriting the simulators "interface": mostly, instead of ticking in the global world, they should tick for each chunk separately. This might have some collisions with your plans, have a look at this thread for details: https://forum.cuberite.org/showthread.php?tid=617 RE: Lever - FakeTruth - 12-14-2012 Hey keyboard, welcome to the forums! If you eventually feel comfortable enough with the MCServer codebase and would like to have SVN access just send me a PM RE: Lever - Luksor - 12-15-2012 Nice job! If you can also make levers placed on walls work I can commit your changes to the SVN. RE: Lever - NiLSPACE - 12-15-2012 i can place levers on walls. :O it only doesn't power that block on where it is attached to. RE: Lever - Luksor - 12-15-2012 Yeah, that's what I'm talking about. RE: Lever - keyboard - 12-16-2012 ohh, i see what you mean. I'll look into it RE: Lever - xoft - 12-16-2012 I finally had a look at the patch, nice work. I just reformatted some of the lengthy conditions, otherwise it's good. Committed as rev 1075. RE: Lever - xoft - 12-16-2012 I haven't done any testing (my laptop alone won't survive MCServer + MC together), but from the code I'm guessing that a lever powers a repeater even when it is in the Off state. I've put a TODO into the cRedstoeSimulator code for someone to actually check this. RE: Lever - NiLSPACE - 12-16-2012 it works fine for me and ofcourse if i turn the lever on the repeater will be on |