Activity

borkoaxtyt

Today was a really productive session for CSCraft. I spent a good chunk of time fixing bugs in the detranspiler - mostly edge cases that only show up when you throw real code at it rather than the small test mod I was using before. Things like command bodies getting eaten because the preamble stripper was too aggressive, trailing ) signs showing up as orphaned statements, and private method calls not getting PascalCase-converted.

To actually stress test it I ran it against a 3000-line Java Fabric mod, which is a lot closer to what someone would actually be trying to convert in the real world. The output was genuinely pretty good - class structure came out correct, field declarations translated cleanly, event handlers had the right parameters and populated bodies, command registrations came out with the right variants
There’s still more that could be done on the detranspiler - more pattern coverage in the method mapper for common Java patterns, better handling of helper classes, and smarter handling of for/while loops in translated bodies. But it’s at a point where it produces useful first-draft output on a real mod without requiring massive manual cleanup.

Attachment
0
borkoaxtyt

For some reason after I published the latest version of the API yesterday, I decided that today I would make a detranspiler (from Java project to C# project). Idk why but I thought that it would be a good idea to make one as it would let people just migrate their project over to the C# API. I started working on it and for now I have decent progress - It works on half the stuff and I haven’t added mappings for the things that don’t work yet. I will try to finish the things and see what will come out of it. I had many problems regarding the JSON files and just keeping the file structure bu I’ve managed to make something that is kind of okay. The detranspiler will be a different nuget package but in the same pack so people won’t have problems finding it. After I finish with the detranspiler, I think I’m gonna start to try and make my own Reflection API so I can sync it with Java’s and hopefully it will allow modders to actually make significant mods, but before that I will try to get my hands on some big minecraft mods and see whether the detranspiler works as it should. I will also add a picture of the current result of the detranspiler.

Attachment
0
borkoaxtyt

Today I tried fixing a lot of the methods and mappings in the API. It took way longer than I expected, and for some reason every time I fixed something, something else would break. Because of that I ended up rewriting parts of the transpiler just to get a clearer view of where the issues were coming from.

I managed to fix quite a few things. The scheduler was completely broken before — RunRepeating was basically just a comment and RunLater was using Thread.sleep which would’ve frozen the server. I reworked both of them properly using Fabric tick events. I also fixed enchantments since Mojang changed how registries work in 1.21.1, so now it uses the dynamic registry system instead of just outputting useless comments.

There were also issues with type resolution, especially with things like armor slot chains (like player.Helmet.GetItem()), so I added a lookup system to help the transpiler understand return types better. Particle constants were also wrong before, so I mapped them properly to strings like “minecraft:flame”. I also added proper handling for array creation since that was just throwing warnings before, and improved how McGameRule generics are handled so they don’t silently break anymore.

There are still some issues, but most of the major ones are fixed for now.

One thing that really fought back was the scoreboard API. I thought I was using a bad workaround and tried switching to the proper method, but it turns out Mojang removed it in 1.21.1. So I had to go back to the workaround anyway.

Also I took a screenshot of a java file before being built. I don’t think I need to say anything - it just looks ugly.

This is how much cleaner it looks when making it using this API:

// /kit — give starter kit to yourself
McCommand.Register(“kit”, (src) =>
{
McPlayer p = src.Player;
if (p == null) { src.SendError(“Players only!”); return; }
p.GiveItem(“examplemod:ruby_sword”, 1);
p.GiveItem(“examplemod:ruby_pickaxe”, 1);
p.GiveItem(“examplemod:ruby_helmet”, 1);
p.GiveItem(“minecraft:bread”, 32);
p.GiveEffect(“minecraft:speed”, 600, 1);
p.GiveEffect(“minecraft:haste”, 600, 1);
src.SendMessage(“Ruby kit granted!”);
});

    // /heal <target> — op only, heals a named player
    McCommand.RegisterOpWithPlayer("heal", "target", (src, target) =>
    {
        target.Heal(target.MaxHealth);
        target.ClearEffects();
        target.GiveEffect("minecraft:regeneration", 100, 1);
        target.SendMessage("You were healed by an admin.");
        src.SendMessage("Healed " + target.Name + "!");
    });

    // /spawn — teleport to world spawn
    McCommand.Register("spawn", (src) =>
    {
        McPlayer p = src.Player;
        if (p == null) return;
        McWorld w = p.World;
        McBlockPos sp = w.SpawnPos;
        p.Teleport(sp.X, sp.Y, sp.Z);
        p.PlaySound("minecraft:entity.enderman.teleport");
        src.SendMessage("Teleported to spawn!");
    });
Attachment
0
borkoaxtyt

Today I tried fixing a lot of the methods and mappers for the API. It took me a long time and I don’t know why but the more I tried fixing something, the more it broke. I rewrote some of the code for the transpiler to get a better perspective of where the errors where. I am still running into some issues but most are fixed (for now). So for today I’d say that I have done a lot of stuff but before making a new Nuget patch, I will try to have all the issues fixed and have an example mod with every function to test it out. I’m still not sure whether the automatic JSON creation will work for making recipes so I will also try to do that and see what will happen. Also I switched over to my linux laptop for now so I might also encounter some problems with the building. For tomorrow I will try to have everything ready and fixed and will hopefully start working on making the build experience better. I plan on making a page entirely for bug testing and fixing so the developing process becomes a lot smoother. I will also put a picture of a java file to show a bit of my progress. Also please don’t try out the latest versions of the API as none of them work for some reason.

Attachment
0
borkoaxtyt

Shipped this project!

Hours: 73.66
Cookies: 🍪 459
Multiplier: 6.23 cookies/hr

This is my first build, it doesn’t contain changes from the previous 5 days as they don’t work well within itch.io for now. Also there is a bug with the pickaxe rn in itch.io. Please give me ideas for what I could put in the game.

borkoaxtyt

Today I added some of the optimization tricks for the side projects, fixed some bugs and reworked some of the code so nothing new. Also no new images cuz it would literally be the same. Also I’m working towards shipping the project tomorrow.

Attachment
0
borkoaxtyt

After dealing with a corrupted Windows install yesterday, I finally got back to working on the project today. Spent the session playtesting the game and fixing any bugs that I came across.

Attachment
0
borkoaxtyt

Added some new assets for biomes. Remade the lightning (again), but not it works. I also fixed some bugs with surface grass just floating.

Attachment
2

Comments

devatrishasinha
devatrishasinha 24 days ago

Oh, seems similar to terraria?

borkoaxtyt
borkoaxtyt 24 days ago

At first I wanted it to be a copy of terraria, but then I realized that I don’t really need even a third of the mechanics, I want my game to be more focused on building and exploring and not have fighting, but yeah for now it’s basically a generic terraria copy as I haven’t started implementing the main mechanics I want my game to have.

borkoaxtyt

Reworked the lightning engine and added more assets. Kind of mid for today.

Attachment
0
borkoaxtyt

I added some new assets for wood blocks, sand, flowers, ferns and mushrooms but haven’t added them to the game yet. Fixed some bugs and cleaned up my code a bit. Also added some tree variations.

Attachment
0
borkoaxtyt

Added the pickaxe to be in the inventory. Made trees drop wood blocks and also disappear when broken. Fixed some of my code structure and started reworking the lightning and rendering.

Attachment
0
borkoaxtyt

Added a basic inventory system. Added a pickaxe which you can swing and then shoot yourself to your mouse position (kinda like thor). Added some random generation for trees (still haven’t fixed the leaves). Added some small leaves and flowers on the ground. Added ruby, sapphire and coal underground. Will rework the lightning system as it is currently really bugged. Added some player physics so the pickaxe swing can work. Destroying blocks now make pickups and add them to the inventory with a count.

Attachment
0
borkoaxtyt

Inventory: Added inventory count, Added inventory animations

Pickup: Can now destroy and place blocks, destroyed blocks drop pickups which can be picked up.

Attachment
0
borkoaxtyt

Added stone in the game, Added some debugging features. Added a basic inventory. Will try to add more tomorrow.

Attachment
0
borkoaxtyt

I managed to add trees and some cave systems today made by using my old textures.
The caves though don’t have a background for now but I will add one tomorrow.
Didn’t really add anything else today but I managed to really clean up the project.

Attachment
0
borkoaxtyt

Today I Added some basic things like entity culling, resizable screen, changed the textures to be homemade, optimized the world generation, added boundaries to the world and so on.

Attachment
0
borkoaxtyt

I’m working on my first project! This is so exciting. I can’t wait to share more updates as I build.

Attachment
0