JJK Minecraft Mod
- 9 Devlogs
- 90 Total hours
A minecraft mod! it has a bunch of random stuff that I make but the main focus is probably the Jujitsu kaisen power system that I am trying to recreate
A minecraft mod! it has a bunch of random stuff that I make but the main focus is probably the Jujitsu kaisen power system that I am trying to recreate
I got the first power to work! you can find a showcase here: https://youtu.be/t6oah7P1Fyk it may not seem like much, but this means the lower level systems are working, and I can start focusing on making cool stuff. Other then that I also made the combo system more advanced by having it so u can run actions mid combo and you can detect how fast you did the combo. There are a few more things I want to add to the combo system and tbh I thought about re-coding it again (which is a pretty annoying habit that I’ve gotten #OCD) Next update if I can do it in under 10 hours is gonna be really cool and probably coming tomorrow, following might let u see it earlier :D
I finalized the system! The idea is that most of the boring stuff happens in semi-abstract classes like the Sorcery class and the Ability class, which handle server side management and universal methods. Meanwhile, I can initialize real logic through child classes such as the Limitless calss which extends sorcery or the Blue class which extends Ability. I copied the idea from minecrafts Entity system. I’ve also managed to get nearly all of the key binds to work including scrolling (I used a mixin for scrolling). A lot of the hours that were described in this update actually ended up in the previous devlog so in reality it took about 9ish hours of work. Anyway, mostly a programming update, but next time I’m going to start actually adding powers to my modpack!
The hud system is officially complete! I meant to post this devlog earlier but I had some problems :/ I spent a ton of time figuring out how to render images and I realized it was much easier to just make very specific math that draws lines to the HUD (It doesn’t help that you can’t draw curvy or diagnol lines) I fixed a ton of other problems as well that you can’t read in my commit history I think. This devlog was supposed to be posted a lot earlier but I ended up forgeting to post after writing it lmao. For that reason, I also have to say that the structure of the power system is done and now I’m working on bug fixes as well as making working powers. I really wish I could post a video showing you guys, I’ll try to do so next devlog using something less powerful then OBS. See ya
The main summery for today is mindless progress, I’ve continued to work on the Hud system for my combo system but faced multiple issues that took hours to fix (hence the lack of progress) for starters, somewhere during my modding jurney, I forgot that identifiers can’t have uppercase letters, leading me to try remaking the system multiple times. Additionally, while in my original system I added hud elements to the registry when updating, and removed hud elements when reseting, in the new system, I replace that with static variables and if loops. If I don’t face any more major bugs, the HUD system should be done by the next devlog!
I’ve been creating a HUD system, though it’s pretty boring so I get distracted and do other stuff. Anyway the combo system is fully functional. Through this I learned that static maps are completely unnecessary as static variables update in each client side jvm. I won’t get into the implementation of my HUD system or the other stuff I’m working on because they’re unfinished so this is more of a minor update
I made a combo system! right now it’s really buggy but what it does is similar to street fighter system, you can make a combo and then assign key’s to it. You need to press the key’s in the required number of time for the combo to work. there are a lot of problems with reset rn but the base system is there. Each player has a value called a “combo key” which have a timer that increase by one every tick and resets to 0 when the kye is pressed. these are values that are mapped to each player and only one instance of each key is allowed per player (for better latency and client2server stuff) A combo is created using a bunch of if logic. I used a builder sytem for object creation so instead of new object() you do Combo.build().key1(timeNeeded to press).key2… Each combo can be used for abilities that I’m going to work on next. Speaking about abilities I decided what my mod would be based on, Jujitsu Kaisen! While i’m not a diehard fan of the show, the power system is one of the coolest in all of fiction, so I thought it would be fun to try and implement some abilities (hence the pocket dimention my screenshots are in) anyway, gonna fix the combo system and then work on a simple power see ya!
Made Laser Eyes! When you click the laser button which you can change in the controls menu, a particle will appear (which is purely visual) and it will make a raycast, targeting the nearest entity/block. It will damage an entity and turn the block into a redstone block (temporary until i feel like making ash). It also works in multiplayer, where the particles are summoned from the eye of the shooter from everyones persepective except the shooter who only sees the beam if a few blocks away that way they don’t get blinded by particles (the pictures use free cam and i have no friends so I can’t show this but u can see how it works in the code)
My project didn’t have documentation so it was difficult figuring out how to make a raycast (combination of .clip and .getEntityHitResult) and how to tell if the player really pressed the laser button which requires client to server packet management.
the first devlog has a large number of hours on it because of some issues with git and project stuff (you didn’t miss any updates other then reading don’t worry), Anyway, I’m chilling in my new dimention with my new potion effect that I get after using a new item (with iron helmet texture cause i’m bad). I’ve been trying to get a raycasting system to work I just wanted to update the project so that my hours can be counted correctely, future update coming soon!
I looked through minecrafts source code, The version of minecraft I am coding is 1.21.11 and on fabric there are two “mappings” or interpretations of minecrafts source code. the first version is the community one called yarn which was the one that I was planning on using when I was watching a tutorial series on Youtube however the documentation uses the other mappings called the “mojang mappings”. I switched to the mojang mappings and looked through minecrafts source code using that. I figured out how to handle terrain generation, add new things to minecrafts registry system, and access player data. My next goal is to look through some real applications of mods and this is how I recommend others who are interested to do so to!