My right and bottom boundaries aren't blocking the selection. I have the exact same code as you but it seems like World.BLOCKS_HEIGHT - 2 and World.BLOCKS_WIDTH - 2 just aren't the right numbers. You forgot to add the world.java to pastebin, however following this tutorial I set it to the same as you, 24 for the width and 20 for the height. In order to get my boundaries to work I need the resulting number to be 19 for right and 14 for the bottom. meaning -5 for right and -6 for down.
@DKMeNIcE Solved it by changing the world sizes. Obviously it was changed after recording and it wasn't relayed to us. WIDTH of 21 and HEIGHT of 16 is what it should be.
@NerdsWBNerds Because making something publics implies that it should be used by external classes. It's generally a good habit to make everything private or protected if possible and have accessor methods handle the internal variables.
@Aroobydoo The public static final int GL_BLEND variables should be in the org.lwjgl.opengl.GL11 class for the latest LWJGL release. If you haven't got a static import at the top of your code, try GL11.GL_BLEND. Please let me know if this works.
@TheCodingUniverse Soooo...Are you making a tutorial on the player or not? It seems if I make another class, I have to make all the ints static(lol) and if I make a void in the Boot class it won't work(lol).
My right and bottom boundaries aren't blocking the selection. I have the exact same code as you but it seems like World.BLOCKS_HEIGHT - 2 and World.BLOCKS_WIDTH - 2 just aren't the right numbers. You forgot to add the world.java to pastebin, however following this tutorial I set it to the same as you, 24 for the width and 20 for the height. In order to get my boundaries to work I need the resulting number to be 19 for right and 14 for the bottom. meaning -5 for right and -6 for down.
DKMeNIcE 2 days ago in playlist Java Game Development
@DKMeNIcE Solved it by changing the world sizes. Obviously it was changed after recording and it wasn't relayed to us. WIDTH of 21 and HEIGHT of 16 is what it should be.
DKMeNIcE 2 days ago in playlist Java Game Development
@DKMeNIcE Damn, I must've been really tired or something. Glad you fixed the thing.
TheCodingUniverse 1 day ago
Why does it matter if you use public or private? I know what the difference is but why not just go ahead and make it all public?
NerdsWBNerds 3 weeks ago
@NerdsWBNerds Because making something publics implies that it should be used by external classes. It's generally a good habit to make everything private or protected if possible and have accessor methods handle the internal variables.
TheCodingUniverse 3 weeks ago
I never noticed the minecaft thing, honestly.
JayitInc 1 month ago in playlist Java Game Development
@JayitInc Me neither, it was kind of embarrassing though ;)
TheCodingUniverse 1 month ago
GL_BLEND does not exist for me. Re-downloaded everything and it's still not there. Does anyone know what's up?
Aroobydoo 2 months ago
@Aroobydoo The public static final int GL_BLEND variables should be in the org.lwjgl.opengl.GL11 class for the latest LWJGL release. If you haven't got a static import at the top of your code, try GL11.GL_BLEND. Please let me know if this works.
TheCodingUniverse 2 months ago
@TheCodingUniverse
Fixed it, thanks for the quick response!
I was individually importing all of the static classes and missed that one. Thanks
Aroobydoo 2 months ago
@Aroobydoo No problem. Good to hear I solved your problem ;)
TheCodingUniverse 2 months ago
Very cool tutorial! Hey, could you tell me how can i write simple text to screen using lwjgl?
cheater39 2 months ago
@cheater39 You can either use the (deprecated) TrueTypeFont class in Slick_Util or create images containing text and save them as png files.
TheCodingUniverse 2 months ago
@cheater39 umm. I only use JFrame sorry.
Williaml9518 4 weeks ago in playlist More videos from TheCodingUniverse
@Williaml9518 Err, off-topic, I guess?
TheCodingUniverse 4 weeks ago
@TheCodingUniverse What?! I wasn't off topic. I was just telling some other guy asking for help that I use JFrame only, not you!!!
Williaml9518 4 weeks ago
@Williaml9518 Oh, lol, sorry, I didn't see that. My apologies.
TheCodingUniverse 4 weeks ago
@TheCodingUniverse Soooo...Are you making a tutorial on the player or not? It seems if I make another class, I have to make all the ints static(lol) and if I make a void in the Boot class it won't work(lol).
Williaml9518 4 weeks ago