fabric icon indicating copy to clipboard operation
fabric copied to clipboard

Add warning when trying to run Fabric API as an executable

Open IMS212 opened this issue 4 years ago • 6 comments

This PR shows this when the jar is run as an executable. This would fix a lot of the confusion around the API, and the current code does not seem to have problems with anything else in the API. fabricapi

IMS212 avatar Dec 02 '20 05:12 IMS212

I don’t believe we are allowed to release this onto curseforge. I’m 99% sure that executable jars are against the TOS. Please correct me if I’m wrong.

modmuss50 avatar Dec 02 '20 08:12 modmuss50

I have asked around, and it seems it is in the clear. BetterFPS does this as well and is allowed on curseforge.

IMS212 avatar Dec 02 '20 16:12 IMS212

Wait, what? I didn't remove the request for API developers

IMS212 avatar Jan 12 '21 01:01 IMS212

It's been updated with both ResourceBundles and headless support, you mind re-reviewing?

IMS212 avatar Jan 12 '21 04:01 IMS212

I would also add something to link to the fabric installer, so that people can install the loader if they don't have it yet

OroArmor avatar Jan 12 '21 04:01 OroArmor

Done.

IMS212 avatar Jan 12 '21 04:01 IMS212

Buddy, this made me laugh :laughing:

Is this really necessary? I believe 95%+ of players know this should be dragged into mods directory. Other mod APIs, including Forge, Quilt & LiteLoader haven't shown up a warning like this.

If players don't know Fabric API is a mod instead of an executable library, you can add a tip in the installer, noticing them download Fabric API in CurseForge/Modrinth and put it into mods directory. Besides, can't those players who download Fabric API in CurseForge/Modrinth realize such a thing from such a website should be treated as a mod? I think it's not our duty to add a dumb Swing app & make Fabric API fatter and fatter.

teddyxlandlee avatar Aug 22 '22 01:08 teddyxlandlee

@teddyxlandlee

Accessibility features make you laugh? sad

While, yes, a large user base should know this should be put into the mods directory, there's also the question of new users. In one of my most recent user support I've encountered an user who seemed to be a computer novice, which made the user support quite more intense. I don't think being hostile to new users and features facilitating support is a good approach.

This comment honestly comes off as a rather elitist take and hostile towards new users. I would rather not have the same issue as Linux here in Fabric or its alternatives.

LambdAurora avatar Aug 22 '22 10:08 LambdAurora

This feature looks good, but I believe it should belong in Loom so that everyone can use it (with optout ofc). Also the branch is 1.16, which is way outdated.

apple502j avatar Aug 22 '22 11:08 apple502j

This feature looks good, but I believe it should belong in Loom so that everyone can use it (with optout ofc). Also the branch is 1.16, which is way outdated.

Great idea!

However, I think the class should be shrunk as small as possible. Using proguard and package-less class name can shrink it in a specific way.

Also, add a boolean toggle in remapJar. If it is set to true, the already-shrunk class binary will be dumped into the jar along with Main-Class manifest (if not set).

To make it short:

  1. The class may be mod-insensitive, which means Fabric API uses the same class & the same warning text as other mods.
  2. No resource bundles, if possible. Texts are stored inside the class directly. Also, it's a bad idea to let the class trying to understand fabric.mod.json.
  3. Loom copies the already-configured class binary into your remapped jar. This means you don't need to compile it again, because the binary has been stored in Loom.

teddyxlandlee avatar Aug 22 '22 14:08 teddyxlandlee

This was made as my first PR ever. I am now a developer for many mods, and can likely recreate this much better, so as such, I'll close this.

IMS212 avatar Aug 22 '22 16:08 IMS212

This feature looks good, but I believe it should belong in Loom so that everyone can use it (with optout ofc). Also the branch is 1.16, which is way outdated.

How would it be included in Loom? Would it just embed itself into the jar?

IMS212 avatar Aug 22 '22 16:08 IMS212

How would it be included in Loom? Would it just embed itself into the jar?

To store the class file in Loom, and dumps it into remapJar along with Main-Class manifest attribute.

teddyxlandlee avatar Aug 23 '22 00:08 teddyxlandlee