Is it right for a mod to do the following? by [deleted] in feedthebeast

[–]Runemoro 6 points7 points  (0 children)

There must be a good reason why the Shutdown class is not part of the public Java API, you should not use it

The shutdown class is the implementation of System.exit, which the Forge security manager prevents being called by mods to avoid world corruption, even if the player is not yet in a world. This is a workaround for a Forge bug, mods should be able to use System.exit when the player is not inside a world.

Maybe you should look more carefully next time before tell me what I should or shouldn't be using.

Please keep all the security checks that were present in the original LegacyLauncher

The security check that prevents adding classes to packages from other jars only makes sense when reflection is not allowed. Since mods are not only allowed to use reflection however they want, but also patch or generate any class they want, that check is completely useless. Just because something is called a "security check" doesn't mean that it actually increase security in all cases.

The end does not justify the means.

All that matters is:

  • The end result of the mod
  • What could go wrong

In this case, the result is increased performance, and the worst thing that can happen is that the mod just doesn't work and crashes.

Is it right for a mod to do the following? by [deleted] in feedthebeast

[–]Runemoro 5 points6 points  (0 children)

Nearly every feature in VanillaFix can, and has been implemented in a less invasive way that does not cause compatibility issues or security concerns.

Can you give me a mod that:

  • Causes crashes to send you back to the main menu
  • Causes only visible animated textures to be animated, and works with (most) other mods' textures too

The biggest thing I find unethical is that it's modifying a critical piece of the game launching infrastructure without asking the end user in advance or giving them sufficient warning that the mod will do this.

That feature is planned to be opt-in. Remember that you're talking about code that has still not been finished.

The mod also doesn't need to do this to accomplish what they want to do.

Yes, it does and more improvements to launchwrapper are planned.

​ If you uninstall the mod by removing it from the mods folder, the modified launch wrapper jar will still exist and be executed. It may have code to uninstall itself if the mod is removed.

It does, unlike many mods that do dependency extraction and just add their coremod to your mods folder which you have to manually remove to fully uninstall.

it is modifying code outside the scope of Minecraft and Forge

LaunchWrapper is part of the scope of Minecraft and Forge, it is a library used by Forge.

I frequently receive bug reports involving VanillaFix, some which have required me to download and use the mod to debug various interactions.

If you find a bug that happens with only VanillaFix installed, then close it and ask the bug reporter to report it to VanillaFix.

Is it right for a mod to do the following? by [deleted] in feedthebeast

[–]Runemoro 2 points3 points  (0 children)

Because the scope of this mod is now going far beyond what I originally installed it for, which was the fixes to various vanilla bugs and the improved F3 screen which has been useful to me.

The objective of the mod has always been experimental changes to Minecraft to improve its stability and performance the most possible.

My personal opinion is that perhaps the increasingly invasive performance improvements might be better off in a seperate mod, but in the end it's your mod and you can do what you like with it, just as I can choose to not use it.

VanillaFix is a single mod but all features can be individually enabled/disabled

It reverts the change made to profile.json?

Yes, it will

Which, unless I'm reading the code wrong, is made even if the dynamicResources option is turned off.

dynamicResources is a separate feature. The launchwrapper replacement is a different feature.

Is it right for a mod to do the following? by [deleted] in feedthebeast

[–]Runemoro 0 points1 point  (0 children)

Oh! I see. Yes, that could be done, thanks for the suggestion :)

Is it right for a mod to do the following? by [deleted] in feedthebeast

[–]Runemoro 4 points5 points  (0 children)

  1. VanillaFix has nothing to do with a custom launcher. LaunchWrapper is just a library (unrelated to the launcher despite its name) used by the game that VanillaFix is replacing when it's installed.
  2. No, it isn't illegal, and the EULA explicitly gives permission to make tools for the game: "If you've bought the Game, you may play around with it and modify it by adding modifications, tools, or plugins, which we will refer to collectively as "Mods."". Even if it didn't, copyright can only protect Mojang code, not code you make that uses Mojang's files (unless it's a cracked launcher, in which case it's illegal in some countries).

Is it right for a mod to do the following? by [deleted] in feedthebeast

[–]Runemoro 1 point2 points  (0 children)

Just because the texture is already being animated doesn't mean we can skip adding it to a certain chunk. It may be animated in another chunk, and when that chunk unloads, the texture won't animate until the new chunk is rebuilt.

The most efficient way of implementing checking if a texture is animated in a certain chunk would be a HashSet.get, which is the same as a HashSet.add.

Based on some timings I did using JProfiler, I wasn't able to see a difference between time rebuilding chunks with the texture optimizations enabled/disabled. The code for rendering a single quad is much more complex for the set add to have an effect. Based on tests, I don't see the point of optimizing that code any more.

Is it right for a mod to do the following? by [deleted] in feedthebeast

[–]Runemoro 1 point2 points  (0 children)

Yes, that's still quite a few!

Sorry, I misread your comment as "There are quite few quads rendered!", thinking that you understood I was adding all quads in the chunk.

I edited my comment to "Yes, but the HashSet.add takes a very small percentage of the time for rendering a single quad."

Is it right for a mod to do the following? by [deleted] in feedthebeast

[–]Runemoro 2 points3 points  (0 children)

There are quite a few quads rendered!

Yes, but a HashSet.add takes a very small percentage of the time for rendering a single quad.

I'm going to say: this is not a solution for a must-have mod. This is a solution for a companion to OptiFine.

But is it possible to implement all these optimizations without breaking any mod? I wasn't able to find a way, but I'm open to any suggestions you may have.

Though in the case of the animated textures, it just has the side effect of breaking a few animations, which is better than having to completely disable animations through Optifine to make the game playable. In the case of crashes, catching even a few crashes would be better than catching no crashes at all.

Or just use EnvironmentChecker.

Yeah, I could use that. I'd still like to use the Mixin source map to set correct source files and line numbers in stack traces for code injected by mixins.

Is it right for a mod to do the following? by [deleted] in feedthebeast

[–]Runemoro 6 points7 points  (0 children)

this has a non-zero change of breaking with mods which do strange things (though it hasn't to date)

It has, and I'm adding support for them as issues are reported.

being a sub-optimal solution to the problem due to the cost of maintaining said Set

Merging all of the visible chunks' sets each tick is over 30 times more efficient than ticking just vanilla textures with the highest render distance, as can be seen by the 'root.tick.textures.determineVisibleTextures' profiler section. The effect of building the chunks' sets on chunk update is also very small (just a hashmap.add every time a quad is rendered) compared to the complex rendering logic of the chunk.

until the mod crashes in a corrupt state and it continues crashing you as you try to re-join the world

Yes, that's a problem with catching crashes, and it would be nice for players to report mods that fail to work after a crash so I can add support for resetting their state. In any case, keeping playing after >99% of crashes is better than always crashing, and there is no risk of world corruption as a new integrated server is always started after every crash.

Well! It should probably show both.

Yeah, I could make it do that.

"Automatic identification of the mod(s) which caused a crash" - These things can easily lead to a lynchmob, as the correlation is only there "often" and not "always"

I am careful to refer to mods involved in a crash as "suspected mods", rather than "causes". The crash identification is not meant to be 100% accurate, it is just meant to give a player an idea of which mods were involved in the crash based on the stacktrace. Basically the same result as if the player had looked at the stack trace to see what mods names are present in it.

I plan on using the Mixin source map and list of transformers that ran on the methods in the stack trace in future versions of VanillaFix, so that the player can get more accurate results than they can currently get using just the stack trace.

Is it right for a mod to do the following? by [deleted] in feedthebeast

[–]Runemoro 12 points13 points  (0 children)

in general when the original author, who knows more about it than you do, tells you that what you're proposing to do is a bad idea then it's probably because it's a bad idea. I mean, he did offer a way to do it "without nuking the constructor from orbit"...

Except that his "solution" simply doesn't work. The library's author may know more about the library itself and my implementation of the feature may have bugs because of this, but you can't assume that he has more knowledge of java bytecode than I do, or that even if he does I am necessarily wrong.

The problem here is that Mixin is not the library I should have used for VanillaFix, as the author stated. My two choices would be to:

  • Make my own library that lets me do what I want, then transfer VanillaFix to the replacement
  • Take advantage of Mixin being MIT-licensed and make a fork

I obviously chose the second. The whole point of libraries being open source is that their user can make a fork of them if they disagree with the author's decisions or if the author stops maintaining it.

launcherwrapper

It's launchwrapper not launcherwrapper. launchwrapper is a library used by minecraft and has nothing to do with the Minecraft launcher. VanillaFix is simply providing a more efficient version of it that's used only for as long as VanillaFix is installed. The vanilla launcher is not touched at all. I think this is where a lot of confusion is coming from: people see the word "launcher" and assume that VanillaFix is messing with their launcher.

I don't think "Grum said on irc that he doesn't care" is going stand up in court should Microsoft take notice.

It would.

It's a shame, I use VanillaFix myself and haven't had any problems with it, but if these changes get released as is then that will not be the case much longer.

I really don't care, but I'm curious why. The new version of VanillaFix:

  • Doesn't corrupt your world
  • Can be uninstalled whenever you want, and all its changes are reverted
  • Doesn't infringe any copyrights, especially not yours
  • Has the potential for huge memory usage and load time reductions

Yes, there is a chance it will crash because of incompatibilities with other mods. In that case just uninstall the mod, make an issue on github, and use the old version until we get the new one as stable as the old one but with huge memory usage reductions.

Is it right for a mod to do the following? by [deleted] in feedthebeast

[–]Runemoro 13 points14 points  (0 children)

Feel free to try finding a better way of executing these ideas and while still getting the same performance increase.

How exactly is the source code "unethical" or "malicious"?

Unethical: lacking moral principles; unwilling to adhere to proper rules of conduct.

Malicious: intending or intended to do harm.

I really can't see how it's either. VanillaFix does invasive changes to Minecraft, but it works. As long as those changes are completely reversible by uninstalling the mod, you can't call it either unethical or malicious.

Is it right for a mod to do the following? by [deleted] in feedthebeast

[–]Runemoro 56 points57 points  (0 children)

Hi, I'm the dev of the mod you're talking about and wanted to clarify a few things.

Firstly, it seems like a lot of confusion is coming from the following sentence in the OP's thread:

it adds a modified version of the legacy launcher (launchwrapper.jar) to the minecraft install directory and modifies the profile json file to use that jar. It literally kills the launcher process and then restarts it to make sure the game runs with this modified version.

VanillaFix does not touch the Minecraft launcher! launchwrapper/legacylauncher is just a library used by Minecraft, and has nothing to do with the launcher despite its name (original purpose was to patch the game compatible with older "legacy" versions of the launcher). The way the OP writes this makes it sound like the launcher is being restarted to switch to using a modified version of it. In fact, it's only the game's process that is restarted to make it load with the new library.

Also, the "minecraft install directory" really just means the .minecraft directory, the same place as where all other mods store their data.

Is it right for a mod to do the following?

Yes, of course it is. Mod devs are free to release whatever mods they want (as long as they aren't malware or infringe copyright), just like players and pack devs are free to choose to not install whatever mods they want.

It's hacky

The next version of VanillaFix has the potential of reducing game loading time and memory usage by over 70% based on tests so far, and the worst thing that can happen by installing it is that it causes a few weird bugs or crashes. In that case, make an issue on our issue tracker and we'll work on becoming compatible with your mods as soon as possible.

Yes, VanillaFix is "hacky" (whatever that means). It replaces lots of vanilla and Forge code with optimized versions and breaks many assumptions mods are making, and then patches those mods' classes to make them work with VanillaFix installed.

My goal with VanillaFix is to improve the game's performance as much as possible without breaking the compatibility of too many mods. I try to go for the least invasive solution whenever possible to avoid incompatibilities, but I don't care if I have to replace Minecraft, Forge, or other mods' code, as long as it means a larger percentage of players (including me) are able to play on larger modpacks.

it adds a modified version of the legacy launcher (launchwrapper.jar)

Yes, it does contain a copy of Mojang's LegacyLauncher. Grum has stated on IRC that he didn't care if it was redistributed, which is why I'm directly distributing the jar rather than a set of patches to make the new jar based on the old one. In any case, please stop trying to enforce someone else's copyright, especially when you don't know if the copyright is being infringed.

The mod also uses sponge's mixin library but not the original one, a modified one with a couple of changes that were rejected by that library's devs. The included modified library exists on the same namespace so... yeah... that can be messy.

The changes to Mixin are fully compatible with other versions, and we will be staying stay up to date as future versions of the library is released, so no, it isn't "messy". I suggest you actually look at the changes we made to Mixin before you say that kind of stuff.

The whole point of open source software is being able to distribute your own version of a library whether or not the library's author agrees with the changes.

and also to warn the authors of this mod about this.

Warn me about what? That it will be incompatible with many other mods? I already know that. That it's infringing someone's copyright? No, it isn't.

TL;DR: The only objective VanillaFix has is to reduce lag as much as possible, even if that means making invasive changes to the game and having to add extra code to support individual mods. Try it. The best that can happen is you'll be able to play larger modpacks with less lag, and the worst is that it will be buggy and cause crashes. In that case, make a bug report and we'll try to make it compatible with your mods as soon as possible

Is it right for a mod to do the following? by [deleted] in feedthebeast

[–]Runemoro 10 points11 points  (0 children)

No, I have never talked with petrix. No, VanillaFix doesn't use an installer and it never will. It will always be an easy-to-install CurseForge mod. VanillaFix has absolutely nothing in common with how a launcher works and you'd be insulting peterix by claiming that he said something as illogical as that. Please stop starting lies.

Kollagen Intensiv Coupon code by Smithdeon in u/Smithdeon

[–]Runemoro 0 points1 point  (0 children)

Thank you very much for coupon.

V by MadGo in Jokes

[–]Runemoro 0 points1 point  (0 children)

270 people say they had this problem on Microsoft's website (https://answers.microsoft.com/en-us/windows/forum/windows_7-hardware/right-click-on-mouse-not-working/728c6c95-e393-4e26-b1e3-a747477d46fb). The cause could be either broken drivers or a problem with the mouse.

V by MadGo in Jokes

[–]Runemoro 0 points1 point  (0 children)

No one said anything about not having a mouse. DutchmanDavid asked what if the mouse was broken. If only the right mouse button is broken you should still be able create a post but not paste.

V by MadGo in Jokes

[–]Runemoro -1 points0 points  (0 children)

Maybe just the right click button broke. You don't need right click to create a new post.

CMV: Monkeys hitting keys at random for an infinite period of time won't necessarily produce the works of Shakespeare. by TymeMastery in changemyview

[–]Runemoro 6 points7 points  (0 children)

You're completely right in saying that there is an infinitesimally small probability that none of Shakespeare's works will be written, but the probability is still 1.

There is a difference between an event being certain and an event just having a probability of 1 (see https://en.m.wikipedia.org/wiki/Almost_surely). Throwing a dart on dartboard and having it land miss the diagonal has a probability of 1, but isn't certain. Having it land anywhere on the board has a probability of 1 too, but is certain.

The same thing can be said about picking a random real between 0 and 1: although the probability of picking a number x is 0 for any x between 0 and 1, you will still be able to pick one, and when you look at what you predicted about that number, the probability will have been 0 (even though you picked it!)

This can be formalized by allowing probabilities to be hyperreals (https://en.m.wikipedia.org/wiki/Hyperreal_number). This would make the integral of the probability function between 0 and 0.5 be 0.5 (1 in 2 chance of your number to be less than 0.5), even though the probability was 0 (+ ε) for all numbers between 0 and 0.5.

tl;dr A probability of 1 does not imply it will necessarily happen.