• 0

    posted a message on Force Generating Chunks
    Quote from BadW0lf

    On SMP, WorldEdit can do //regen which will regenerate the area selected.

    I need to generate new terrain, not return changed terrain back to its original form. I don't want to override currently existing terrain either, I want it to not stop generating terrain where it cuts off now, to continue outward to some defined limit. There's a mod which doubles "far"'s draw distance, but I would preferably want it out of game, and even bigger than that, on a whole world scale (Yes I know this could take awhile depending on the size of the world)
    Posted in: Discussion
  • 0

    posted a message on Force Generating Chunks
    I've been looking for a way to force generate chunks, to trick the computer into thinking that you've been there and that it needs to generate terrain. So far searching has yielded very little. Does anyone know of any command or mod that can do this?
    Posted in: Discussion
  • 0

    posted a message on Source for Baezon's Redstone Simulator v2.2
    Quote from Simnik

    About the north-south quirk and similar orienting or time-based quirks, then this thread is going very deep research on what's actually happening under the surface during a tick. It is a very tough read due to the very technically topic, but that is exactly what you are searching for. I haven't read the full text, need the last page or so, but I can summarize up what I got out of it. As a forewarning, then parts of this might be wrong.

    Every time a change is made to a block, an update is scheduled two ticks later to any neighbor redstone torch (I don't know exactly what qualifies a block to be a neighbor), and a delay for repeaters that fits its options. A block can apparently only have one scheduled update at a given time. Each time a tick is run, the first 1000 blocks updates is run, postponing all other to the next tick (I presume it is per chunk). 80 random blocks per chunk is also updated. Now, each time a tick is run, the blocks are updated in the order they were added to the list, so the question is in which order the neighbors were notified by the block. This order is orient-depending ins some way. During the update of some redstone component, some neighbor blocks might have been notified and get an update scheduled, but if those blocks already have a scheduled update, then the new one will be discarded - also if its in the very same tick (I think). When a block updates, It does not looks at the state at the time of the schedule, but the current one. This can lead to special scenarios, like the N/S quirk.

    The explanation of the N/S quirk is also in the thread:

    Source

    Now, I don't know exactly how you are going to use this in the simulator. The only way I can see is copying the concept, hoping to the the correct bugs with, and keeping all other out. But I doubt it's worth it.


    I was actually thinking I'd change the update system completely to match the way it's done in MC, in order to replicate these "features". I mean, the way I'm doing it now (update every block every time) is a little brain-dead simplistic, and it definitely doesn't scale well. It makes sense to keep track of updates and make sure you update only what you have to.

    As a side note, I've been perusing the MC source (via the MCP) and I was wondering whether anyone can point me to the primary redstone logic classes. I'm sure I'll find it eventually, but there's a lot of code there, and this is my first crack at it.
    Posted in: Minecraft Tools
  • 0

    posted a message on Source for Baezon's Redstone Simulator v2.2
    Quote from codewarrior

    A comical understatement.

    You're looking for the Minecraft Coder Pack. It includes several batch files - the noteworthy ones might be decompile.bat, recompile.bat, and test_game.bat. It's powered by a collection of programs plus a couple of CSV files that map the obfuscated class/field/method names to the MCP crew's more descriptive names. MCP is used as a kind of SDK plus build system for making mods.

    For a decompiler, I use JD-GUI and I think the only other one being used is JD's ancestor, JAD.


    HOLY **** THIS IS FANTASTIC. I wish I had this last year! So this is legal because the deobfuscated code is not being distributed, just the decompiler. But I thought that every time a new class was added, all of the autogenerated names (a.class, kj.class, etc) were switched around, so you'd have to fix everything after every patch? TBH, I'm surprised that this was allowed to become public - it's almost like MC is now open source. AND IT COMPILES. How? I'm blown away and offer my highest praises to the MCP team.

    Maybe now I'll finally be able to fix those ancient "known bugs".
    Posted in: Minecraft Tools
  • 0

    posted a message on Source for Baezon's Redstone Simulator v2.2
    I was aware of the burnout behavior, but I didn't implement it because I thought it was 'not important', in the sense that it shouldn't be a part of any "real" circuit, so it was not worth the annoyance of actually dealing with it (from the user's standpoint). Actually, I was referring to the case when certain torch updates would propagate through multiple torches in one redstone tick, which I believe is the cause of one-tick pulses being swallowed when they go through torches. (Do repeaters swallow one-tick pulses?) It was a very direction- or location-sensitive behavior, and I went crazy trying to deduce the logic behind it, so I gave up and called it a "known bug". (EDIT: I think this is now called the "N/S repeater")

    Speaking of which, I get the feeling from the in-depth details of MC behavior that people have managed to de-obfuscate the client to a significant degree. Is there (a) a place where I can download a cleaned-up version of said source code (possibly illegal), (:cool.gif: a place where I can be told HOW to de-obfuscate the client's class files, or (c) a link to a good decompiler? I tried this route once, and I couldn't even get the loader sufficiently understandable to find where the real thing is, let alone clean enough to recompile from the decompiled source. (The decompiler would periodically get stuck, and so syntax errors like "JVM INSTR 1234" would be littered through the code, and I'd have to check the bytecode myself and try to figure out what it was trying to do. There were so many that I gave up after a while, and I never managed to get it to compile.

    AnonymousJohn mentions that he's working on a kernel to simulate redstone, and the idea of separating the logic part from the GUI and maintenance activities intrigues me. I'd like to eventually get this implemented as a sort of "plugin" for MCRedstoneSim, but that's just an eventual goal at this point. I'll set up a GitHub repository to host this project soon.

    EDIT: The GitHub repository is located at https://github.com/digama0/MCRedstoneSim (digama0 is my GitHub username), and I will try to update it on a semi-regular basis. If you have a GitHub account, PM me here or in GitHub and I will add you as a collaborator.
    Posted in: Minecraft Tools
  • 3

    posted a message on Source for Baezon's Redstone Simulator v2.2
    I apologize to the users of the Redstone Simulator who feel I've abandoned them, and my only excuse is to say that I have moved away from gaming for the most part in order to pursue my studies. I swear I never intended for the program to be "closed source"; I have just had bad experiences with open-sourcing software only to find that no one cares. I can't guarantee continued participation, but from the responses to my original post, I see that a genuine desire to improve on my work and expand the project. To that effect, I am releasing the source code, and would like to coordinate with anyone who is still interested to move development to a repository. (I've become quite fond of GitHub as of late.)

    The source is available in raw form as a zipped version of the Eclipse project on my local machine. If/when this gets moved to a repo, the process should become a little cleaner.

    MCRedstoneSim project folder, v2.2

    (To moderators: I would like to have posted this as an edit of the original, but the thread is now locked. Can we get a link up from there to here?)

    EDIT: Also, if anyone feels like filling me in on what's happened since last October (I think that was about when I left), I might be able to make some updates. A cursory glance has revealed that repeaters are new, and someone mentioned "recursion protection" to explain the long-known inaccuracy of certain arrangements of torches. I would like to state for the record that the reason I never fixed it is because I couldn't figure out how it worked, and I can't make any updates if I don't know how the game works.

    What helps the most is a concise explanation of how a new element interacts with the other blocks in all the different arrangements and combinations. I'll see what I can do to incorporate all this, but I am no less busy now than I have been all year, and I can't even promise that I won't disappear again. But I'll track this post for a while if anyone has any pending feature requests.
    Posted in: Minecraft Tools
  • 0

    posted a message on Baezon's Redstone Simulator v2.2!
    Quote from Cadde »
    Quote from jon99977 »
    I found a bug, opening 20+ doors at the same time rapidly, crashes the program and seems to cause a memory leak as it doesn't usually go up to 900 mb of ram. You can only close it by ending the javaw process.


    If the app crashes and the virtual machine doesn't realize this the machine will run for ever. (until you terminate the process)
    Either way, a memory leak in irrecoverable (well, until you forcefully recover it) but in this case. It's just java not realizing the app crashed and it's as easy as terminating.

    With that said, shouldn't crash with 20 doors opening and closing rapidly. But my question now is... WHY?
    Why did you have to open and close 20 doors rapidly?

    EDIT: and i think i know what causes the crash. too many sounds playing at the same time.


    Unfortunately, Java's sound framework opens a new thread every time I play a sound, and doesn't get rid of it for a few minutes afterward. If you open 20 doors every tick, that's 20*16=320 threads per second, which is enough to crash a decent machine. Personally, I avoid doors because I find the sound annoying. So why in God's name would you need 20 of them, on a short-circuit torch? I think this counts as genuinely out of the scope of the program.

    Quote from farmdve »
    Dude, you build a program and dont give command to run it?? I tried java MCRedstoneSim, but no dice i get an error. So someone please share!

    EDIT: Found it: The way you run it is via
    java -jar MCRedstoneSim.jar


    And @author of app. Next time either add details how to run OR DONT POST AT ALL!


    The way most people run it is to double-click on the .jar file. It's basically the same as running Minecraft, or for that matter, any other Java program out there. If that doesn't work, your settings are messed up. Putting "java -jar MCRedstoneSim.jar" in a batch file and running that will work as plan B.

    Quote from Cadde »
    Whenever i scroll my mouse wheel it skips one item. Got a Logitech G5 v2.
    Tried altering the number of lines that it would scroll with no effect.

    It just scrolls through wire, wire, wire, button, door.
    When i expect it to scroll wire, torch, wire, torch...

    Possible solution?


    Possibly your mouse settings are off? Remember that you can always click on the relevant palette item.

    Quote from meggle »
    Is there any way of getting this simulator compatible for mobile phones ? Damn, that would be awesome !


    That was a joke, right?

    Quote from bleachisback »
    Quote from blaize9 »
    i donot understand what is what like the yellow block, gray with redstone, etc.

    viewtopic.php?f=35&t=93632


    Your point is well-taken. I might (if time happens to manifest itself) make a GIF tutorial to bundle with the program, but it's a lot of work, and I unfortunately hold the view that features are more important than documentation, and I have time for neither at the moment. So I guess I will set Priority 1: Undo, and Priority 2: Tutorial.
    Posted in: Minecraft Tools
  • 0

    posted a message on Baezon's Redstone Simulator v2.2!
    Quote from ahruman »
      [*:smeav8t9]Simulation of the north/south-facing diagonal torch 1-tick update glitchamabob. (Combining this with rotate commands could lead to hilarity for the user, but that’s Notch’s fault.)


    This is not as well understood as some would have you believe. If you go back to page 4 or 5, you can find a post of me tearing my hair out over this behavior, which is a lot more general than just that diagonal torch setup, and seems to act in unpredictable ways. The only thing I can think of at this point is reverse-engineering the code, but that's a major enterprise.

    I forgot on my list the selection toolkit (select, cut, copy, paste, fill, clear, import from .schematic, rotate, mirror), which I promise is coming eventually, if I get the chance.

    Quote from Edsonmilan »
    I just suggest one:

    add some texture to the blocks so we don't get confused I know you can change it but I just get confused sometimes of which block I am using.


    Note that the feature I just proposed above is a color palette modification, not a texture map. So you can make dirt brown, but not checkered. Parts of the code, including GIF export, rely on the prevalence of flat regions of color, so textures are farther down the list.

    PS @ ahruman: You are using a Mac, yes? As you noted, I added some Mac-compatibility code to v2.2. Can you tell me if you get the modification dot in the close button when you modify something or animate? On Win, I am putting an asterisk in the window title, but Macs should not have the asterisk there. I don't have a Mac new enough to test Java 1.5, so I don't know if it is working.
    Posted in: Minecraft Tools
  • 0

    posted a message on Baezon's Redstone Simulator v2.2!
    Quote from ahruman »
    To be fair, I overestimated the size of a “quite simple component” there. To develop howlingmonkey’s 5×6×3 adder design at the same speed would only take about 5×10¹⁵ seconds, so we’re well within the lifetime of the universe so far. :-)


    I have actually considered writing an automatic redstone circuit builder, and as you have pointed out, a brute-force search is completely out of the question. I separate the problem into two: how to generate the appropriate network of torches that produce the desired output, and how to lay out the torches and wires, given the network, to fit in the smallest space.

    The first part is actually quite doable, and I have used the approach to improve some logic gate designs. The most extreme example of a computer-generated network is the 3-tick 7-segment display I posted on the logic gate thread a while back. That one took most of a day, though, and needed frequent intervention in order to relax the constraint of "perfect" to "near-perfect" for time's sake. And it only has 4 inputs! The possibilities increase super-exponentially: the number of n-input gates is 2^2^n, and you may need to search the whole space thousands of times in order to work your way all the way through from output backwards to the inputs.

    The second part is much more open-ended, and I have yet to find a suitable algorithm for tracing wires. Just figuring out if two wires are connected is no trivial task. Ideas?

    Quote from UnitSeven »
    What you need is a genetic algorithm.


    That's not an idea, that's a buzzword.

    Quote from Edsonmilan »
    I just have a question
    What are the other two things on the palette that doesn't appear in the readme here's an image explaining them (two red circles):

    Edit: Oh also the second circle (the torch with wires) I right click it to put it on the screen but it makes the torch over block one so Idk what happens.


    The left circled one is a block-on-block tile, and the right one is a torch-on-wire tile. The torch-on-wire tile requires a wall adjacent to the torch, or else it will not be able to attach and will default to building a block below (overwriting the wire).

    List of features on my to do list:
      [*:3tnva2wl]Alternative to middle-click (Shift-left-click)
      [*:3tnva2wl]"Bluestone" (i.e. customizable color palette)
      [*:3tnva2wl]Glass -> Air (not dirt)
      [*:3tnva2wl]Undo
      [*:3tnva2wl]Labeling
      [*:3tnva2wl]Possibly something I've forgotten...
      [*:3tnva2wl]Fix Minecraft so that redstone behaves rationally
    Posted in: Minecraft Tools
  • 0

    posted a message on Baezon's Redstone Simulator v2.2!
    Sorry so much for being gone for so long, but studies have been hell and I haven't had much time for breathing or other recreational activities. I've released v2.2, which consists of the work I had been doing before I left, so I can't remember what I did. I do know, though, that I fixed the "Save As..." bug and added the shadow block, which appears transparent on GIF exports. Maybe it has other goodies!

    I have received several feature requests and will list them later (so I don't forget), but I am short on time right now.
    Posted in: Minecraft Tools
  • 0

    posted a message on Baezon's Redstone Simulator v2.2!
    To make it a real update, and not just a minor adjustment, I have, in addition to the folder-saving capability mentioned above, added an icon, broken-image support (which should never matter), and full-field GIF export. I intend to make this more selective in the future, but for now at least the capability is there. I am also considering adding a "shadow" block which will appear on the field as the same color as the grid (as if the square had been removed), behave like air, and export as transparent, so that I can make GIFs like those on the wiki.

    Hello v2.1!
    Posted in: Minecraft Tools
  • 0

    posted a message on Baezon's Redstone Simulator v2.2!
    Quote from niels »
    can you make it show the folder the last file has been saved in? because it keeps saving them in my documents now and not in the folder i made for it


    Done. (Will release soon.) However, realize that it will still revert to the Documents folder when you restart the program, as it doesn't save any preferences on your machine.
    Posted in: Minecraft Tools
  • 0

    posted a message on Baezon's Redstone Simulator v2.2!
    Quote from shatteredsword »
    for some reason, every time i save, then quit and re-open my save, the contents of the save magically vanish. This can get really frustrating :sad.gif:

    also, any chance you'll be adding tnt or minecart tracks?


    Can you be more specific? I've never had any trouble saving and loading. Try typing .rdat at the end of your save file (if you don't put an extension on, it adds .schematic by default). Theoretically, all aspects of your project should be saved whether you choose .rdat or .schematic, but they are very different formats, and use different code to save and load, so if one format doesn't work, try the other. Is there something specific in your save which doesn't come back, or is it completely blank?

    There are some .rdats posted on this thread. Try loading them and tell me if that works.

    As for TNT, I want to point out that I am not trying to re-make Minecraft here. The original purpose of this program is to simulate redstone, and most things related to it are already represented. I can see an argument for TNT, but TNT has some peculiarities which make it difficult to represent accurately. When it is activated, it becomes an Entity. That means that it is not restricted to the grid and is free to float around for a few seconds. And the explosion it makes is definitely non-deterministic (any given explosion is not necessarily guaranteed to destroy a particular block, especially if it is near the edge of the explosion radius). I do not yet have an adequate means of representing Entities in my program, since their non-grid-based nature makes them difficult to draw and manipulate on a grid. And since the explosion is random, I am automatically wrong if I try to represent it, since the real thing will not destroy the same blocks as I did. Short answer: Just design your cannon without TNT, and add it after the fact. (Also, adding Entities means adding physics, which I'd prefer to avoid.)

    As for tracks, they are also unnecessary for planning purposes. I think I might add preservation capabilities, but actually placing tracks seems beyond the scope of the program.
    Posted in: Minecraft Tools
  • 0

    posted a message on "red stuff" logic gates
    Okay, I finally got around to adding all these wonderful new X(N)OR designs to the wiki. (I'm kinda glad I waited, considering the late entries....)

    The new JK/T designs are still yet to be put up. I want to combine JK and T design images into one, since they are so large (I have 4 or 5 designs now) and so similar to each other. Would it be intelligible if I just made one image with Q, ~Q, T, C, J, and K all labeled on it? (The idea is to remove the inputs that you don't need in practice.) I have to assume that those using these templates have at least some faculty in manipulating circuits to remove the unnecessary inputs as they need in their projects. I suppose that they could even leave them, since they won't harm anything. (Of course, the constraints of the design may result in, say, inverse J inputs, which would then require a constant power supply (a torch) in place of a real signal.)

    Quote from Conundrumer »
    I think someone should get around making a compact XNOR, since that is the gate that one can use to easily make programmable combinations locks.


    Actually, to make a multi-bit EQUALS operator (which I assume is what you are referring to for use in combination locks), the best (least-tick) way of doing it is to XOR each A bit (the combination) with each B bit (the attempt) individually, then OR them all together and NOT the result. (i.e. Not[Or[XOR[A,B],...]].)If you use XNOR, then you have to AND them all together, which using our gate system amounts to Not[Or[Not[XNOR[A,B]],...]], which is obviously just a more redundant version of the above.
    Posted in: Alpha - Survival Single Player
  • 0

    posted a message on Baezon's Redstone Simulator v2.2!
    What do you mean that "it didn't help"? Where did it fail? Try putting "java -jar MCRedstoneSim.jar" into a .bat file and running it. What does that do?

    I'm reasonably sure this is a problem with file associations on your machine, so it will apply to any .jar files which you attempt to run, not just mine.
    Posted in: Minecraft Tools
  • To post a comment, please or register a new account.