Maybe once I've got a couple years Java experience I'll think differently. (I understand the ethical objections against shipping even small parts of the Minecraft code, to be honest I really doubt that the Mojang folks would care that much given how long Forge was doing it).Īt the end of the day I prefer to use chainsaws for cutting trees rather than trimming my nails, and I struggle enough with getting my code to work as it is without trying to get my mind around the extra runtime complexity :-).
you need to link in other classes at runtime and you don't know in advance what they are. I agree with you that both ASM and reflection are very powerful tools in the hands of the Java uebercoder, unfortunately those ranks don't include me :-) I also doubt that the extra flexibility is really necessary unless you're doing forge-like magic, i.e. If you master it, you can change as much things as Forge without shipping Minecraft code.Ī practical example is the Forge event system, which use in a mod class to hook with reflection, then apply changes with ASM. Manipulating classes at runtime, that is the goal of reflection.ĪSM is an extremely powerful tool (to break everything without knowing ) relying on bytecode (read: manipulating lines of code, at an "internal" level). A practical example is the Forge annotations, those are loaded with reflection. Reflection is a powerful type of code to make mods compatible between each other without dependency. I had my fill of self-modifying code back in my days of programming assembly and am not keen to go back!! I would avoid this like the plague because it is fragile and very hard to debug. ("base mod") This will probably break everytime Minecraft is updated.Ī fourth strategy you will hear occasionally is reflection / ASM. This is usually not necessary and is often not possible.Ī third strategy which I haven't had to use yet is to edit the base classes to overwrite the vanilla. TipTapShow is a keystrokes mod but for newer versions of Minecraft/Fabric. Description What even is this Im glad you asked. To toggle the KeystrokesHippo overlay on or off, simply type the following command in the chat: /hippoKeystrokestoggle (1.0) /hippoKeystrokestogglegui (2.0) Go to minecraft settings/options, and there you can set the position of the keystrokes, and disable/enable everything. For example, you can overwrite GameSettings.keyBindForward with your own class derived from KeyBinding. A mod for Fabric to show your keystrokes ingame. The second strategy which is harder and less robust is to override an existing vanilla class and replace any references to it from other vanilla code. Then I'll look at the vanilla code and trace it through until I figure out how it works, and usually I will stumble over a forge hook or event along the way.
A typical strategy I use is to identify an item or block or whatever that does something similar to what I need. Unfortunately the documentation is a bit patchy so it's not always easy to know what's available. The first is to use one of the many Forge registries or hooks, to add custom blocks, items, or get called when particular things happen. Choose the right Minecraft Forge download. There are two main ways I've found helpful when interacting with the vanilla code. Minecraft Forge is on a PC / Mac only, and to install it you need to: 1. Minecraft 1.18 AuroraKeystrokes v1.3.0 (1.18.2) Latest release. A Fabric mod which displays the movement keys and mouse clicks on screen. You can do a comment here or join the discord server, if you want me to add a feature or a specific minecraft version.Look at the start of KeyBoard for the suitable keycodes A Fabric mod which displays the movement keys and mouse clicks on screen. (look picture below) Version suppport & Feature request: Go to minecraft settings/options, and there you can set the position of the keystrokes, and disable/enable everything. To toggle the KeystrokesHippo overlay on or off, simply type the following command in the chat: I'm not responsible of what happens on other platformsĭynamic Keystrokes: Watch your W, A, S, D, and Spacebar keys light up as you press them.ĬPS tracker: Know accurately what is your current right/left CPS.įPS Display: You can see your fps anytime.Ĭustom Command: Control the display with a simple command. (images below) Disclaimer: This mod is ONLY on curseforge and modrinth. Hippo keystrokes mod is an addons for modern minecraft version that can display your CPS, and track your keystrokes insanely fast.