Community listing page, reviews here may not be monitored by the author.
Mod That Closes The Game When It Opens Mk.2
No reviews yet
An experiment to make the smallest possible Fabric mod (with actual code). Does what the title says.
Community voices
Reviews
No reviews yet. Be the first to review this project!
Get it on
Available Platforms
Compatibility
Supported Environments
Install on the client or the server; either alone gives full functionality.
About
Project Details
For authors
Embed Badge
If you're the author of this project, you can embed a live badge anywhere that supports HTML or Markdown. It updates automatically whenever ratings change.
Use HTML for any page that supports it, or Markdown for README files and Markdown-based descriptions.
Identifiers
Platform IDs
Resources
External Links
About
Description
An experiment to make the smallest possible Fabric mod (with actual code). Does what the title says.
So what't the drill?
The (self-imposed) rules are to make the smallest possible Fabric mod that "does something". The definition of that in my opinion is to run, or at least attempt to, some code. So what can be done with that?
-
The class.
public class i extends java.io.File { public i() { throw null; } }Although it looks simple, this is not valid Java - the compiled bytecode was manually modified to make it throw a
null, and to removethisparameter in the initializer. Also, by default all classes extendjava.lang.Object, so it was changed tojava.io.Fileto save two letters. -
Mod metadata
Abusing thefabric.mod.jsonformat, it can be compacted down to{"id":"id","version":"i","initializer":"i"}Back in 2019 Fabric used to have a different metadata format, which is still supported to this day! Thanks to it, the file doesn't need a
schemaVersionfield, or the complexentrypointssetup. -
Build process
There are two files, so there isn't much to compress, but to squeeze the most of it, they are zipped with the zopfli compressor. It is possible to get a smaller file size with .xz format, but it wouldn't be possible to load as a mod in that case. -
Runtime
Well, there isn't much code to ""do something"" - a no-op instruction would technically suffice, but I don't think it's interesting. So instead the code tries to throw an exception, and fails because it can't throw null. Task failed successfully, I guess…
Screenshots
Gallery
Versions
Files
Relations
Project Relations
More like this
Similar Mods
Suggestions use data such as tags, dependencies, dependents, descriptions, titles, and more to rank how much they overlap with this mod.
On ModDex
Community snapshot
By the numbers
Statistics
Want to reach Minecraft players?
We're looking for a server hosting partner to feature here and other parts of the site. Interested? Send us a message!
Get in touchGet it on
Available Platforms
On ModDex
Community snapshot
By the numbers
Statistics
Resources