Giter Site home page Giter Site logo

jomcraft-network / defaultsettings Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 1.0 3.25 MB

DefaultSettings Minecraft Mod

Home Page: https://www.curseforge.com/minecraft/mc-mods/defaultsettings

License: Apache License 2.0

HTML 1.06% Java 98.94%
fabricmc forge minecraft minecraft-forge minecraft-mod

defaultsettings's People

Contributors

pt400c avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

pt400c

defaultsettings's Issues

Task list for revamped Revision 4 (The Streamline Update)

Obligatory for Revision 4:

  • Command cleanup and extension (almost done)
    • Add proper documentation here on GitHub and link CurseForge to it
  • GUI support for all versions has been dropped for now, the commandline-only interface will stay for rev. 4
  • allow for wildcards using the /ds saveconfigs command
  • Fix first-startup checker (own solution)
  • Implement version string replacement
  • Range of supported versions is now limited to the major releases (except for 1.19.2 and 1.19.3 which will both be supported for longer); Support includes 1.7.10, 1.12.2, 1.16.5, 1.17.1, 1.18.2, 1.19.2, 1.19.3
  • Add description line to DS private store
  • Show why commands might not work (no/wrong version of JCPlugin)

Proper support for NeoForge

Since NeoForge 1.20.2: Mods for MinecraftForge will no longer be compatible with NeoForge.

To combat this, we'll:

  • Create a split sourceset for every NeoForge version. Including 1.20.1 which was compatible still
  • Strictly separate MinecraftForge and NeoForge mods on curseforge/ while publishing

scancode keys crash CoreUtil.restoreKeys

Version: 4.0.6

Stack trace:

Thread: Render thread
Suspected Mods: NONE
Stacktrace:
	at java.lang.String.checkBoundsBeginEnd(String.java:4606) ~[?:?] {re:mixin}
-- MOD defaultsettings --
Details:
	Mod File: /C:/Users/6pali/curseforge/minecraft/Instances/All the Mods 9 - ATM9/mods/DefaultSettings-1.20.x-4.0.6-Forge.jar
	Failure message: DefaultSettings (defaultsettings) encountered an error during the complete event phase
		java.lang.StringIndexOutOfBoundsException: begin 4, end 0, length 0
	Mod Version: 4.0.6
	Mod Issue URL: NOT PROVIDED
	Exception message: java.lang.StringIndexOutOfBoundsException: begin 4, end 0, length 0
Stacktrace:
	at java.lang.String.checkBoundsBeginEnd(String.java:4606) ~[?:?] {re:mixin}
	at java.lang.String.substring(String.java:2709) ~[?:?] {re:mixin}
	at java.lang.String.substring(String.java:2682) ~[?:?] {re:mixin}
	at net.jomcraft.defaultsettings.CoreUtil.restoreKeys(CoreUtil.java:95) ~[DefaultSettings-1.20.x-4.0.6-Forge.jar%23781!/:4.0.6] {re:classloading}
	at net.jomcraft.defaultsettings.FileUtil.restoreKeys(FileUtil.java:55) ~[DefaultSettings-1.20.x-4.0.6-Forge.jar%23781!/:4.0.6] {re:classloading}
	at net.jomcraft.defaultsettings.DefaultSettings.lambda$postInit$10(DefaultSettings.java:166) ~[DefaultSettings-1.20.x-4.0.6-Forge.jar%23781!/:4.0.6] {re:classloading}
	at net.minecraftforge.fml.DistExecutor.unsafeRunWhenOn(DistExecutor.java:111) ~[fmlcore-1.20.1-47.2.19.jar%231147!/:?] {re:mixin}
	at net.minecraftforge.fml.DistExecutor.runWhenOn(DistExecutor.java:95) ~[fmlcore-1.20.1-47.2.19.jar%231147!/:?] {re:mixin}
	at net.jomcraft.defaultsettings.DefaultSettings.postInit(DefaultSettings.java:163) ~[DefaultSettings-1.20.x-4.0.6-Forge.jar%23781!/:4.0.6] {re:classloading}
	at net.minecraftforge.eventbus.EventBus.doCastFilter(EventBus.java:260) ~[eventbus-6.0.5.jar%2387!/:?] {}
	at net.minecraftforge.eventbus.EventBus.lambda$addListener$11(EventBus.java:252) ~[eventbus-6.0.5.jar%2387!/:?] {}
	at net.minecraftforge.eventbus.EventBus.post(EventBus.java:315) ~[eventbus-6.0.5.jar%2387!/:?] {}
	at net.minecraftforge.eventbus.EventBus.post(EventBus.java:296) ~[eventbus-6.0.5.jar%2387!/:?] {}
	at net.minecraftforge.fml.javafmlmod.FMLModContainer.acceptEvent(FMLModContainer.java:114) ~[javafmllanguage-1.20.1-47.2.19.jar%231148!/:?] {}
	at net.minecraftforge.fml.ModContainer.lambda$buildTransitionHandler$4(ModContainer.java:125) ~[fmlcore-1.20.1-47.2.19.jar%231147!/:?] {re:mixin}
	at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1804) ~[?:?] {}
	at java.util.concurrent.CompletableFuture$AsyncRun.exec(CompletableFuture.java:1796) ~[?:?] {}
	at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) ~[?:?] {}
	at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182) ~[?:?] {}
	at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655) ~[?:?] {re:mixin,re:computing_frames}
	at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622) ~[?:?] {re:mixin,re:computing_frames}
	at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165) ~[?:?] {re:mixin}

Example options.txt line that causes a crash: key_key.fire_ability_one:scancode.72

if (parts[parts.length - 1].contains("key.") || numberParsable(parts[parts.length - 1])) {
Logic on this line seems to be incorrect and/or outdated. The example options.txt line above fails both of those checks but since it has only one : the else branch will generate an empty keyName. Most likely the numberParsable check should be changed to accept scancode.[number] too. Or the else branch should always read at least one part instead of potentially reading zero.

I can PR a fix if you want but I'm slightly confused about the way you have submodule structure set up. Is the branch cerium-core a submodule on main / main-1.20?

[Incompatibility] Problem saving/restoring FTB Ultimine Addition mod's keybind

The usual keybind format would be key_key.NAME:key.KEY. DefaultSettings expects this and currently fails if this format isn't present.

FTB Ultimine Addition uses the following format: key_key.ultimine_addition:NAME:key.KEY, introducing a second colon.

For compatibility reasons we'll improve DefaultSettings' key recognition in an upcoming update. In addition I would suggest that FTB Ultimine Addition would change their keybind format to the widely accepted key_key.NAME:key.KEY.

Options file doesn't apply Forge 1.20.1

After saving all configs via /defaultsettings saveAll command and removing options.txt file, after restart mod only applies keybind settings, but lang and guy scale, as well as other options doesn't applies from mod DefaultSettings folder

Aggressively Overwrites Options and Keybinds

I don't know if this is related to my other issue (12), but DefaultSettings is aggressively overwriting the options and key bindings not matter what I do. I have been trying to set my own in-game GUI Scale to 3 and it is saved as such in /options.txt and /config/defaultsettings/Default, but each time a start the game the scale is changed to 2. At first thinking it might be an optimization mod that was conflicting I started testing. I disabled everything, which left DefaultSettings. After disabling DefaultSettings, my scale was 3.

Next I thought maybe my /ds_private_storage.json or /config/defaultsettings.json were corrupted so I renamed them and restarted the client with DefaultSettings enabled. The scale reverted to 2.

Finally, I was able to reproduce with with a fresh install with only DefaultSettings installed. Once my new video settings stuck, but reverted on next restart. I also deleted /options.txt and /config/defaultsettings/Default, and /ds_private_storage.json or /config/defaultsettings.json and it reverts to 2. It make take a few attempts, but I can safely say, there is something wrong, when the scale is set to 2 in a fresh install when I did not ever make that change.

Good luck with this one!

Minecraft: 1.19.2
Forge: 43.2.3
DefaultSettings: 1.19.x-2.8.7

Steps for 5. mod anniversary

Steps we plan for the fith mod anniversary:

  • Latest mod edition published for 1.4.7, 1.5.2 and later
  • more to come

Failed to load options java.lang.NullPointerException

One of my testers came across an interesting bug. He was testing an install build and the options set in DefaultSettings did not load - nothing but vanilla configs loaded. The result was none of my default configs loaded, so there was no custom menu, no quests, no custom settings, and most important, he loaded into a vanilla overworld and not my custom skyblock world. He is able to reproduce this issue, but I have not. I tried 4 or 5 times, but my installs were fine.

Minecraft: 1.19.2
Forge: 43.2.3
DefaultSettings: 1.19.x-2.8.7

This is how he reproduced the failed install:

  1. using whatever launcher go into create new instance/profile from zip file
  2. select Create_Skyblock_Forge_1.19.2-0.9.0.zip (This is an unpublished version for testing)
  3. wait for it to install
  4. copy over an existing options.txt to the instance folder (see
    troubleshoot-0_9_package.zip also contains log files, and the pack's default configs
    )
  5. launch the pack
  6. observe problem: dev menu, no quests, normal world
  7. close everything, manually delete the options.txt file
  8. re-launch the pack
  9. observe everything is fixed because default settings applied

The player believes it is step 4 is the cause. In troubleshoot-0_9_package.zip is his latest.log file and that is where I found the error Failed to load options java.lang.NullPointerException

I also did a file comparison between his options.txt (on left) and the one that comes with the pack in config/defaultsettings/Default (on right) and it looks like all of his keybindings are in his file.
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.