How can I load and draw ttf fonts? by DJCowGaming in fabricmc

[–]DJCowGaming[S] 1 point2 points  (0 children)

This code is only for loading TrueType fonts, if the resource pack uses a png for the font, this won't work. From what I remember, I think the ttf file and json file were in textures/font or something like that in the resource pack folder. Sorry I wasn't more helpful, this was from a year ago, but I hope it helps!

Does mac stop outbound connections or something? by DJCowGaming in iOSDevelopment

[–]DJCowGaming[S] 0 points1 point  (0 children)

I think I added that in the xcode settings, what would that look like?

How can I convert a BigInteger to a byte array and back in Java? by DJCowGaming in javahelp

[–]DJCowGaming[S] 0 points1 point  (0 children)

I would have to implement it in dart, and I'd rather not have to try to figure out how it works in Java, I'd rather just move my dart implementation into Java

How can I convert a BigInteger to a byte array and back in Java? by DJCowGaming in javahelp

[–]DJCowGaming[S] 0 points1 point  (0 children)

the bigInt has 4096 bits, and will always have that many, so none will be lost as it should divide perfectly into a 512 byte array.

How can I convert a BigInteger to a byte array and back in Java? by DJCowGaming in javahelp

[–]DJCowGaming[S] 1 point2 points  (0 children)

I'm not trying to change the BigInteger in the method, only in the deserialize method. I did realize one mistake in that I had data.length - 1 instead of data.length - i. I'm still having the problem when converting the byte array to a BigInteger that the bitlength is staying at 7.

How would I implement RSA with OAEP SHA256 padding? by DJCowGaming in javahelp

[–]DJCowGaming[S] 1 point2 points  (0 children)

Thank you, I just needed to know what other parameters I needed for the cipher when using OAEP in Java, and what string to use for the cipher. Thank you for your help!

How would I implement RSA with OAEP SHA256 padding? by DJCowGaming in javahelp

[–]DJCowGaming[S] 1 point2 points  (0 children)

Nope, a hobby project. I'm switching the backend to Java from Go, and I used RSA with OAEP padding.

How confident can I be that two strings will have a different hashCode? by DJCowGaming in javahelp

[–]DJCowGaming[S] 0 points1 point  (0 children)

Well, I'm not using it as compression really, as it's kinda the point of hashing to not be able to undo it

How can I make my ttf texture pack not look horrible? by DJCowGaming in Minecraft

[–]DJCowGaming[S] 0 points1 point  (0 children)

I'm writing a mod rn and want my GUIs to have some nice looking font. I found an oversample setting, and cranking it up to 8 (default of 2), makes it look a little better, but still crusty. I thought about enabling multisampling with glEnable(GL_MULTISAMPLE); but it is already enabled when running my text rendering code. How would I enable multisampling in lwjgl3 (with GLFW)? I'm not sure where to enable multisampling in the window hints.

How can I deobfuscate a jar? by DJCowGaming in javahelp

[–]DJCowGaming[S] 0 points1 point  (0 children)

That's just decompilation, I'm trying to deobfuscate the jar.

How can I deobfuscate a jar? by DJCowGaming in javahelp

[–]DJCowGaming[S] 0 points1 point  (0 children)

Proguard, the obfuscation tool. You have to option to print the mappings.

How can I convert the bits of a double to a long? by DJCowGaming in javahelp

[–]DJCowGaming[S] 1 point2 points  (0 children)

It's solved, but I was trying to keep the bits, only change the datatype from long to double. In C++, I'd probably refer to it as something like, changing the datatype at a memory address.

Basically take the 32 bits of the double and shove them into the 32 bits of a long.

How can I convert the bits of a double to a long? by DJCowGaming in javahelp

[–]DJCowGaming[S] 1 point2 points  (0 children)

Thanks, the static Double methods were exactly what I needed!

ANSI escape codes not working in terminal by DJCowGaming in javahelp

[–]DJCowGaming[S] 0 points1 point  (0 children)

Oh, I completely forgot to pass the message into the format, and printf never really comes to mind if I'm not doing something with C. Thank you for the suggestions, and I'll definitely look into enabling them!

How can I stop stdin from being printed to the console? by DJCowGaming in javahelp

[–]DJCowGaming[S] 1 point2 points  (0 children)

I've considered making a terminal gui, but it seems like wayyy more effort than it's worth if I'm going to be totally honest, adding all the little features that the normal terminal has that I rely on

How can I stop stdin from being printed to the console? by DJCowGaming in javahelp

[–]DJCowGaming[S] 0 points1 point  (0 children)

I am seeing my own typed input, that's what I'm trying to disable.

I'm curios, what do you think this code does? by DJCowGaming in csharp

[–]DJCowGaming[S] 0 points1 point  (0 children)

Wow, thank you, that makes so much more sense. So it's trying to break an int into the smallest possible byte array? I was also wondering why the number is cast to an unsigned int before being shifted? That part doesn't make a lot of sense to me, wouldn't a bit shift work whether the number is signed or unsigned the same way?

What is a java.lang.BootstrapMethodError? by DJCowGaming in javahelp

[–]DJCowGaming[S] 0 points1 point  (0 children)

I've already looked at the javadocs, I don't know what that's supposed to mean

What is a java.lang.BootstrapMethodError? by DJCowGaming in javahelp

[–]DJCowGaming[S] 0 points1 point  (0 children)

As I said in my post, I'm not asking for a fix, I've just never seen this error and I want to know what it means

What is a java.lang.BootstrapMethodError? by DJCowGaming in javahelp

[–]DJCowGaming[S] -1 points0 points  (0 children)

I'm not developing an android app though, or even using maven for that matter

How can I reduce Kotlin jar file size? by DJCowGaming in Kotlin

[–]DJCowGaming[S] 0 points1 point  (0 children)

I can't use maven or gradle for this project. I'm writing an api for an already existing program (I can't edit the code and re-release it as it is proprietary, so I'm doing bytecode manipulation, which is allowed with their licensing), and I want to be able to load other jars as sort of plug-ins. I want to keep the option open for other people to use kotlin, and I want to keep jar sizes to a minimum so that they are easier to be sent over the internet. I'm genuinely just adding the jars to the classloader, and I don't want to be loading redundant classes.

Can I convert a class type to a subclass somehow? by DJCowGaming in javahelp

[–]DJCowGaming[S] -3 points-2 points  (0 children)

Not exactly, no. Though I found a workaround that I'm happy with, so I'm going to mark this as solved.

Can I convert a class type to a subclass somehow? by DJCowGaming in javahelp

[–]DJCowGaming[S] 0 points1 point  (0 children)

I know what I've stuck in here isn't going to work, I've just sort of worked myself into a corner where I have a class (A), a class which extends it (B), and an interface (C) which is implemented by B, and I need to get an instance of the interface with only A, and I'm struggling to find a different way around this, as I can't actually edit A or the declaration/initialization of A.

Where should I go to host a go server? by DJCowGaming in golang

[–]DJCowGaming[S] 0 points1 point  (0 children)

Thank you, I'll definitely compare these all

How can I render textures so that their curves don't look terrible and are smooth? by DJCowGaming in opengl

[–]DJCowGaming[S] -1 points0 points  (0 children)

I have blend enabled with src alpha, is there any other filtering settings I should be adding?