Near completion!
It’s weird getting a feeling of satisfaction when deleting the most important part of my code. Thats what I felt when deleting the static variables that stored my data. All of the internal systems are now working and my code is so much cleaner. Now entity data is saved successfully, if you die, leave the world or exit the game. In order to do this I had to learn how to use interfaces well. Turns out casting is a lot more useful then one might expect. You can cast interfaces into classes and vise versa and you can use interfaces with getter and setter methods to get data from classes. I always though interfaces were a useless thing that people use to make better looking code but they are helpful. Anyway, I faced a few major bugs throughout the transition into CCA, the main one being the fact that I had to put an entrypoint in the fabric.mod.json file to render entities. It took a long time and I only found it because of some random reddit thread I found. The main issue was that when I implemented an interface, it was supposed to save data for that class in all entities. Heres a tip, if something is wrong and you can’t find the issue, think about whats happening under the hood. For me, I assumed that the entity data would automatically be initialized but interfaces can’t do that. I’m probably explaining it wrong (I’m a little tired rn with coding and college apps). Anyway, theres a lot more I want to do and I wish that stardance had lasted another week so that I could show you all my cool Ideas. I’ll make the final devlog and ship my project later today. So hopefully it works well :D (I worked on a lot of other stuff in these 10 hours but none are finished enough to devlog about; images have a peak)
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.