Hello this is my first time working with capabilities and I'm still a bit confused on things but when i leave the world and log back in my capability is set back to 0.
I made it so whenever I pressed a button in a gui it sends a packet to the server and increases by 1 https://github.com/Applhau/JujutsuKaisenMod/blob/main/main/java/net/Applhau/jjkmod/client/gui/StatGuiScreen.java (line 91)
packet: https://github.com/Applhau/JujutsuKaisenMod/blob/main/main/java/net/Applhau/jjkmod/network/message/IncreaseHealth.java
sadly it never saves so it just resets after i relog
this is where i put all my capability stuffhttps://github.com/Applhau/JujutsuKaisenMod/tree/main/main/java/net/Applhau/jjkmod/util/data
any help on making the system better will be appreciated but im mainly focused on having the capability save.
Hello
In the mod I want to find a way to get entities in the direction the player is looking by a couple of blocks or get entities that are in front of the player and deal damage to them. I am able to figure out how to get entities surrounding the player using getEntitiesWithinAABB but I don't know where to start for in front of the player.
Please help
https://paste.ofcode.org/Xt9uSpPpCyCfXTzgS4euxz
didnt know how the argument constructors were going to be added so i just left it the same but took out the slashes
For the type someone on a discord server told me that, I knew it was fishy. Another will the resource location make it the black bar. Also i just get the hunger wave on the black bar, so i don't think there is a black bar over it but the hunger texture was replaced with a black bar.
Im so special i didn't realize Minecraft was a class and i had to do mc = new Minecraft(); but i dont even have to make it a variable, I could just use Minecraft.
Now the hunger bar has a black box ever it.
http://paste.ofcode.org/XJk5hNpygrZrEpML4tD9db
I have that field because mc always comes with an error without the field being there
http://paste.ofcode.org/ZGLffeGhB56xQNjaVugeQZ I made the method static according to the documentation i think but when i run the code and cant load into my world.
I tried these two. They were the only thing i could make out from the code.
Is there another class that i need to make because i have no client side classes.
https://paste.ofcode.org/g35fDUw9bXjU9RWjQH65M8
https://paste.ofcode.org/LSdfruwADcP6uXzNVTzjgK