Suggestion: CPU-Block

  • This will be 100% programmable block.
    It wont be like the classic programmeble block wich you control with blocks, this one will be controlled with code.
    Some easy to apprehend but with enough force to make circuits.
    When you will place this block it wont do anything.
    You will have to right click it and select a code.
    You will save your code to mods folder in .txt format.
    Also capacitors and resistors will be useful.(ok capacitors maybe not but i think people will find way how to use it)
    When you will right click them you will be able to set something.
    And you could also use block redstone emitter/detector block.When powered emits redstone/When gets redstone signal emits current (1EU/S)
    And you will be also able to make letter blocks, you will be able to set their texture by powering it with different current. Also the are transparent)
    0 EU/s = Nothing
    1 = A
    2 = B
    After Z there will be numbers and after 0 there will be special characters.
    etc...


    Also LEDs will be useful. You will be able to set their color by powering it with different current.
    0 EU/s = Black
    1 = Blue
    etc...


    And now for the block itself.
    I will show you part of code i made (just for demonstration how it works i am not sure if this is programmable)
    The current it emits will be after turning off that section will be returned to storage.



    Now for the second block:

    Code
    Name = Test2
    Define = Text
    Mpow = 1
    If (6 = 1(EUS)) {4 = 1(EUS)} (4 will be connected to redstone emitter and will turn on generators.)
    If (6 = 2(EUS)) {Text = 1}
    If (Text = 1) {5 = 15(EUS) & 6 = 14(EUS)} (They will be connected to letter blocks so they will show On)
    If (Text != 1) {5 = 0(EUS) & 6 = 0(EUS)} (!= does mean is not)
    If (Text = 1) {3 = 256(EUS)} (When On is displayed it will power up base)


    Now with these 2 blocks you will be able to make system that will keep your storages full and can also turn on your base.
    And it will also show you if it its turned on.
    Of course there can be much more commands you can use like multiply deduct percentages etc...
    And also this code will able to check contents of chests (with cables).
    If this will be implemented into minecraft i will like to see some IC computers :D
    Maybe OS Mine 8)
    It will calculate how much % of mined things were ores etc..
    Like 10 % Gold
    80 % Stone
    10 % Diamond


    Sorry for my bad english/code.

  • I already had a conversation with Alblaka regarding this issue over PM in the official Minecraft-Forum.


    As a result, I coded an assembler and -interpreter, which is now practically ready to use. It just needs some framework, but Alblaka offered me to make his assistants code it.


    The last message I sent him dates back to 2nd August, we didn’t talk about it since then, so I don’t know what his current opinion on this topic is.


    Alblaka: I think everything is implemented, if you’d like to get the code, I can give it to you. (But firstly, I will make a test run tomorrow, just to be sure) :)
    There is also no test-program for it, maybe I should write one and use this, instead of my self-written test-framework (it’s not that bad – it just doesn’t test jumps of any sort)


    Edit: Also, it came to my mind that I should maybe write some sort of documentation for the other users ;)