Giter VIP home page Giter VIP logo

cadmium-fabric's Introduction

Cadmium

โš ๏ธ Here be dragons. This mod can only be used in a developer workspace, at least until a library replacement mechanism is developed for production environments. You also shouldn't trust it with any worlds you particularly care about until more extensive testing is done.

No guarantee is made that this project will receive any further development or that it will even be maintained.

Preface

The release of Minecraft 1.13 brought the concept of "data fixers" to the game, enabling seamless and incremental upgrades for old world data. The theory behind the implementation is cutting edge stuff, but in the real world, things are less than ideal.

During start-up, the game will build (and optimize) data fixers for every supported version schema the game can upgrade from. This process accounts for a huge portion (>85%) of the time the game spends sitting at the loading screen, and will often bring most systems to their knees while it does so due to how it maximizes for parallelization.

Unfortunately, this problem has only continued to escalate with recent releases of the game. Minecraft 1.16 introduces many new data fixers, and as if insult to injury, seemingly no longer waits for them to be finished loading before the loading screen vanishes, leading to excessive lag on the main menu while they continue to build.

This mod attempts to solve, or at least greatly improve, the problem of data fixers being very CPU intensive to compute. Ultimately the best solution would be to pre-compile the optimized data fixers, so that the client doesn't need to spend its time constantly re-building them... but alas that is left to Mojang.

For developers

This repository is just the loader shim to bring the optimized fork of DataFixerUpper into the game client. As such, none of the actual optimizations are implemented here. If you'd like to start hacking, checkout the modules/DataFixerUpper library and make a new branch there.

Cloning the repository

This project makes use of Git submodules. When cloning the repository, you must be sure to clone the submodules.

If you're cloning the repository for the first time, use the following:

git clone --recurse-submodules https://github.com/jellysquid3/cadmium-fabric.git

Otherwise, to clone the submodules in an already cloned repository:

git submodule update --init --recursive

License

Cadmium is made available under the MIT license, a free and open-source license. For more information, please see the license file.

cadmium-fabric's People

Contributors

jellysquid3 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

cadmium-fabric's Issues

How about contributing this as a PR to the DataFixerUpper repo?

Hi @jellysquid3!
I tried this out yesterday and there are some really good stuff in your fork.
At a glance it seems to cut the rule optimization execution times by more than 50%, so I'd be very interested to seeing this added to the official repo. Given that it's open sourced there should be nothing stopping us from treating it as a PR like any other.

If you don't feel like spending time on it I could incorporate some of the ideas into the main repo if you don't mind, but I'd rather let you get the credit for the hard work.

Error on startup

Failed to start Minecraft:
java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at org.multimc.onesix.OneSixLauncher.launchWithMainClass(OneSixLauncher.java:196)
at org.multimc.onesix.OneSixLauncher.launch(OneSixLauncher.java:231)
at org.multimc.EntryPoint.listen(EntryPoint.java:143)
at org.multimc.EntryPoint.main(EntryPoint.java:34)
Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at net.fabricmc.loader.game.MinecraftGameProvider.launch(MinecraftGameProvider.java:228)
at net.fabricmc.loader.launch.knot.Knot.launch(Knot.java:146)
at net.fabricmc.loader.launch.knot.KnotClient.main(KnotClient.java:28)
... 8 more
Caused by: java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at net.fabricmc.loader.game.MinecraftGameProvider.launch(MinecraftGameProvider.java:226)
... 10 more
Caused by: java.lang.LinkageError: loader constraint violation: when resolving interface method 'com.mojang.serialization.MapCodec com.mojang.serialization.Codec.fieldOf(java.lang.String)' the class loader net.fabricmc.loader.launch.knot.KnotClassLoader @3cce5371 of the current class, net/minecraft/class_2689, and the class loader 'app' for the method's defining class, com/mojang/serialization/Codec, have different Class objects for the type com/mojang/serialization/MapCodec used in the signature (net.minecraft.class_2689 is in unnamed module of loader net.fabricmc.loader.launch.knot.KnotClassLoader @3cce5371, parent loader net.fabricmc.loader.launch.knot.KnotClassLoader$DynamicURLClassLoader @3ad83a66; com.mojang.serialization.Codec is in unnamed module of loader 'app')
at net.minecraft.class_2689.method_30040(class_2689.java:75)
at net.minecraft.class_2689.(class_2689.java:41)
at net.minecraft.class_2689$class_2690.method_11668(class_2689.java:154)
at net.minecraft.class_2248.(class_2248.java:178)
at net.minecraft.class_2493.(class_2493.java:16)
at net.minecraft.class_2500.(class_2500.java:17)
at net.minecraft.class_2372.(class_2372.java:16)
at net.minecraft.class_2246.(class_2246.java:107)
at net.minecraft.class_3523.(class_3523.java:13)
at net.minecraft.class_5471.(class_5471.java:11)
at net.minecraft.class_5458.method_30573(class_5458.java:44)
at net.minecraft.class_5458.method_30566(class_5458.java:75)
at java.base/java.util.LinkedHashMap.forEach(LinkedHashMap.java:723)
at net.minecraft.class_5458.(class_5458.java:74)
at net.minecraft.class_2378.(class_2378.java:237)
at net.minecraft.class_2966.method_12851(class_2966.java:42)
at net.minecraft.client.main.Main.main(Main.java:137)
... 15 more

Task with path ':DataFixerUpper:build' not found in root project 'cadmium-fabric'

$ git clone --recurse-submodules https://github.com/jellysquid3/cadmium-fabric.git
$ cd cadmium-fabric
$ ./gradlew build
Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details

> Configure project :
Fabric Loom: 0.4.30 Build(jenkins #30)
:setting up loom dependencies
:setting up mappings (yarn 1.15.2+build.15)
:remapping 1 mods (TinyRemapper, intermediary -> named)
:remapping sources
:loading intermediary -> named source mappings
Configuring compiler arguments for Java

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':build'.
> Task with path ':DataFixerUpper:build' not found in root project 'cadmium-fabric'.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.5/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 29s

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.