Posts by yahwho

    So, just having another peek at the demo. Teleported to 0 0, happened to be night time, system froze for a while.


    Cause?


    A ton of fireworks went off! :wow:


    Now if I can just work out what the trigger was. . . :verysad:

    Thank you red51 ! I thought I was going a bit nuts.


    Strangely I am using 8.2 (NetBeans IDE 8.2 RC (Build 201609140952))


    just disable it (by hitting the light bulb on the left side)

    Ah I didn't know about this. :thumbup: I've always assumed the `IDE knows best` and have done what it's said (like a zombie).


    the memory difference is negligible

    Yeah I know it is in this situation, I mean what can you do with a couple of extra bytes (unless we're talking pizza!)? But what I am trying to do is learn to "always optimise" if I do it here when it doesn't really matter when it does matter it will be second nature. :saint:


    Again, really appreciate the feedback :thumbup:

    I know that switch doesn't

    Sorry Mino, misread your message. You are right, using the switch works without warning messages.


    I'll chalk this one up to an IDE bug with "legacy" if statements





    Guess, I'll have to force myself to use switches from the start instead of using the IDE to convert them


    Many thanks for your input Minotorious always appreciated :thumbup:


    I think I may just remove the final modifier - they are private after all!


    Scratch that! Removing the final then gives me even more warnings saying the fields can be final! :lol:


    I'll just use ints X(

    I would recommend using switch anyway as it is faster than if

    Yeah I tend to write the statements as chained ifs and then use the IDE to convert to switch once they are completed. It's just I can follow the ifs easier when coding as it's what I'm used to 😁




    btw removing the final flags from the variables fixes the warning but no idea why tbh.

    Very strange! Maybe it is an IDE "bug"?

    Hmm by the sounds of it I should just return to using the int then or ignore the warning. As I said, the code does compile and does work correctly. I just dislike seeing the IDE underlining "problems".


    I suppose I'm interested in the "why" of the IDE message. Because as far as I can tell the message is wrong not me. Normally, I'm wrong, so there must be a reason for the message. 😂


    The message refers to a null constant but the constants are declared with values, so not a null in sight.


    If I do b ==1 b == 2 etc. I don't get the "warning message". It appears to be related to me using the named constants.

    Thanks Minotorious thing is the code compiles and works as expected. But the IDE gives me that strange warning. :monocle:


    I don't really want to use public static int compare(byte x, byte y) because that by nature is creating another int


    byte 1 byte Stores whole numbers from -128 to 127

    int 4 bytes Stores whole numbers from -2,147,483,648 to 2,147,483,647


    I know I'm saving quite literally bytes of memory, this is more an exercise in optimisation.

    Hi folk!


    So I am rewriting my dice system at the moment, optimizing along the way. In this case changing ints to bytes... and although it appears to be working fine (it is working). I'm getting the IDE underlining telling me something isn't right?


    I've pulled out the "offending" code into a test class to show you here without all the unnecessaries.


    You'll see I get a message saying "The constant value `null` used in comparison appears earlier in the chained if-else statement. The condition never evaluates to true"


    Question; is the IDE wrong or am I wrong? :wat:



    I'm not sure if this should be in this forum? But I don't want to spam the Discussion form with something technical that possibly regards the API.


    Currently in RW, if an event such as onPlayerPlaceBlock is cancelled the player placing the block is still "charged" for placing the block. I.e. their block count is decremented by a block, or multiple blocks if multiple block placement.


    Will this still be the case in the new version? I.e. I will need to use the API to replace the used (but at the same time not used) blocks?

    I think the main reason against dev blogs, and even more so dev vlogs, is that they take a huge amount of time.


    There's a indie developer I follow who makes vlogs on YouTube about the game he's making. Each video takes him a week to script, record, and edit.


    I think it's a "not enough hours in the day" kind of problem.