JomarMilan

JomarMilan

0-day streak
I completely forgot about Scrapbook all throughout making this. OOPS! I wrote and published my first crate and command-line utility in #C0121LVV79P|, spade-serial and spade-upload ! They can upload games to a #C02UN35M7LG| or whatever device running Spade. I spent a lot of time writing the tests and documentation.. I wanted to get it right since this is my first time, so I know what to do in the future. spade-serial is the crate that does the actual work while spade-upload is the application that makes use of the crate. It's useful to me because I use Safari on my MacBook and Firefox on my other laptop, neither of which implement the Web USB API, so this provides a way for me to put games on my Sprig without installing another browser that I don't want to use. I made spade-serial into a crate because I wanted to keep the logic separate so that people could apply it in multiple places, like maybe a GUI app. The game uploaded in the video is this game. I did not create it. GitHub Repository | spade-serial on crates.io | spade-upload on crates.io
https://imgutil.s3.us-east-2.amazonaws.com/e05c48f1970288c4d4291e878cb3f688814742a78d194a8c78c56075b82be43e/0a74ab52-2f30-4888-b84b-4bf3235c3fa5.png
Figuring out how to implement #C02UN35M7LG| upload in #C0121LVV79P|. So far, I've been able to upload a game with hardcoded values.
https://scrapbook-into-the-redwoods.s3.us-east-1.amazonaws.com/910fea86-04f7-439d-8c95-de16b3f996f0-screenshot_2024-12-02_at_8.11.57___pm.pnghttps://scrapbook-into-the-redwoods.s3.us-east-1.amazonaws.com/7dc3bb62-8bc3-4f36-aa91-09d7fdbf8ad7-./61a9f9de-f7a9-4c7d-b6d2-4d99321e6fb2.jpeg
I rewrote my Text class as a textObject closure. I did this because private properties in functions were causing syntax errors in my physical Sprig, and I didn't want to just prefix it with something like _ because it doesn't actually enforce private-ness. With a closure, I can have variables out of scope for consuming code. I did the same with GameObject -> gameObject, but unfortunately I ended up deleting it while trying to commit it to source code. The code I had before I deleted it had used components (with logic) attached to the game object instead of the inheritance I was using before. I don't want to use inheritance with closures, and at least this way I might be able to improve my Command code. Plot twist: when I opened the Sprig editor to take a screenshot for Scrapbook, my changes were magically there! Maybe I had multiple tabs or something and one was out of date. I should commit this tomorrow because it's getting late.
https://scrapbook-into-the-redwoods.s3.us-east-1.amazonaws.com/c6d87d0b-c5c4-4b44-aad0-3e4cca477d9b-screenshot_2024-09-26_at_9.57.15___pm.png
I've released a new minor update for Block Coding for Minecraft! Now, the WebSocket server is encrypted, so 'Require Encrypted WebSockets' no longer needs to be disabled! (This was really difficult to pull off, so it makes me kind of sad that all that changes for users is that they don't need to care about an option in the game. At least I learned a lot about cryptography.) There are also buttons to save and load the workspace to files now, which should make it easier to organize multiple workspaces and share them! I learned a lot about cryptography working on this update, since prior to this the extent of my knowledge pertaining to encryption was how to use GnuPG. A few of the things that I learned are that AES works in blocks, that there are a lot of different modes of AES, that Electron uses BoringSSL and Node.js uses OpenSSL, and about the Diffie-Hellman key exchange. github.com/MacaylaMarvelous81/minecraft-code
https://scrapbook-into-the-redwoods.s3.amazonaws.com/cfa2f7f1-d035-48c5-9d66-65ca37fd8844-screenshot_2024-08-20_at_9.02.58___pm.pnghttps://scrapbook-into-the-redwoods.s3.amazonaws.com/53ee3f51-857b-4e3e-a572-2f295f414d40-screenshot_2024-08-20_at_9.02.29___pm.png
I've got 'Block Coding for Minecraft' into a good enough state that I feel comfortable to make a first release! This is my first Electron app. It connects to Minecraft: Bedrock Edition and uses Blockly to make blocks you can use to write code and interact with the Minecraft world. Currently, you can control the player and Agent. In the future releases, I want to add more blocks that interact with other aspects of the world, like blocks, mobs, and the player chat. I also want to add more ways to save your work, enable viewing and writing JavaScript code instead of blocks, and upgrade the WebSocket connection with encryption. To use the app, open it and click the Connect button to see the port. Then, in a Minecraft: Bedrock Edition world with cheats enabled, use the command /connect host:port , with host being a hostname or IP address to the machine running the app and port being the port displayed in the app. Encrypted WebSockets aren't implemented yet, so you might need to turn off 'Require Encrypted Websockets' in the Minecraft profile settings. The app should be connected to the game and the 'Connect' button should turn into the 'Run' button. github.com/MacaylaMarvelous81/minecraft-code
https://imgutil.s3.us-east-2.amazonaws.com/35767caea5c2db02fa3c917eb4a3dd4451ed0d256aac60f9031e4c5e34f168c4/18273c01-7665-4994-bfdf-1cacf8c98f7f.png
Today I got events working! I replaced JS-Interpreter with sval which lets me call the functions defined in the interpreted code. I think it's because it doesn't use 'pseudo' objects like JS-Interpreter does. It doesn't yet support await, so I had to switch to using sendSync instead of invoke with Electron ipc. Currently, the only event from the game I have is an event when the player dies. I could add more events, but they would be more useful if the event data could be used, so I want to figure that out first. I'm thinking that I could use value blocks to represent the last data received from an event, like in the picture.
https://scrapbook-into-the-redwoods.s3.amazonaws.com/f0bd2528-157d-4c92-ac85-36521d2149c2-excalidraw-minecraft-code.png
Made progress on the block coding for Minecraft! Now, there's a new Coordinate 'type' which holds x, y, and z values. The blocks that deal with coordinates use this type instead of the individual numbers for each axis used previously, which means less back-and-forth calls to the game and significantly faster performance when dealing with coordinates! I've also added more blocks for the Agent, and made up a name for the project: 'Code Blocks for Minecraft'. I don't think it's a very good name, but I like it better than the 'minecraft-code' temporary name I was using before, especially since I want to make it clear I'm not affiliated with Minecraft, Mojang, or Microsoft. I also started making the programming event-based, but I've hit a big snag. With JS-Interpreter, which I'm using to run the code generated by the blocks, I can't call pseudo functions (functions defined in the interpreted code) from native code. Unfortunately, this means I can't use a callback approach towards event handlers. I'm thinking of interpreting event handlers separately, but I'm not sure functions and variables defined by the user would work correctly if I did that.. and it would be really annoying, especially if I want to add a feature to show the generated code to the user later, like how MakeCode lets you see and edit the code in JavaScript. I don't know what to do, but hopefully I'll figure something out.
https://scrapbook-into-the-redwoods.s3.amazonaws.com/d1aa4718-0d4b-4ce6-bce6-87f5923f5188-screenshot_20240809_231246.png
Got started on a project where you can code with blocks to control the game and an Agent in Minecraft: Bedrock Edition, just like in the Education Edition and the deprecated Code Connection! I'm using Electron for the app since the web browser can't make a WebSocket server to interact with the game, and Blockly for the block coding. It generates code to JavaScript like agent.teleport(null, 100, null) which goes through JS-Interpreter to Electron to the WebSocket server to Minecraft. I only have a few blocks so far, and I hope to add events, but I think I've got the basics!
https://scrapbook-into-the-redwoods.s3.amazonaws.com/89f0e332-8bdf-46b3-a65e-fa37205e9609-image.png
I finally took care of all the issues in my Minecraft mod Datapack Installer!! I started this project a few years ago, but Arcade helped motivate me to stick to it when working on the Issues instead of giving up when it starts getting tough. In other words, Arcade really encouraged me to challenge myself! I was able to implement dedicated server use (issue 1) and changing data packs in existing worlds (issue 3). Working on this mod also helped me learn more about the SpongePowered Mixins! Before working on this mod in Arcade, I'd never needed to use Accessors, and I hadn't known about Override and capturing locals. I'm really grateful for Arcade. I don't think I could have made the mod this good without the 1hr timers. github.com/MacaylaMarvelous81/DatapackInstaller modrinth.com/mod/dp-installer
https://imgutil.s3.us-east-2.amazonaws.com/e29bf96c443e196a2b75b36bc2119f26ab49f0182ef4bf74b72baaedb0bcc460/625d05d9-3501-4a88-bdbd-a839223679db.png