Git Product home page Git Product logo

Comments (4)

MehradN avatar MehradN commented on June 17, 2024

This issue most likely has to do with how I've set up the project structure. (I copy pasted almost everything about it from other projects and stackoverflow)
I don't know how to fix this problem, I've already asked people who have knowledge in this field, hopefully the will answer soon.

from cavesurvey.

Ghifari160 avatar Ghifari160 commented on June 17, 2024

From a glance, it looks like the ir.mehradn.cavesurvey.util.upgrades.ServerCaveMapUpgrade extends CaveMapUpgrade which doesn't exist under the same package on the server codebase. ir.mehradn.cavesurvey.util.upgrades.ClientCaveMapUpgrade also extends CaveMapUpgrade. But for the client, that class is defined in the package. This might need more than a simple copy-paste between the two directories as CaveMapUpgrade refers to ir.mehradn.cavesurvey.util.CaveMapTagManager, which might have some client-specific code.

As a slight fyi: It might be worth merging the two code bases and just declaring the client-specific code and server-specific code with @Environment annotations and through the mixin config in fabric.mod.json. I don't know how much of this is worth doing though. It's a lot or reorganization, but it might help your sanity down the line if you plan on keeping up with the mod. Also take this part with a grain of salt as I'm not too familiar with modding with Fabric (I have tried modding through Forge a couple of times, and the concept of sided-code seems similar enough).

Edit: I don't get why the same jar works on the client if it literally refers to an undefined class.

from cavesurvey.

MehradN avatar MehradN commented on June 17, 2024

The reason I'm keeping these as separate jars is for the situation where you play in a server that has cave survey installed, but you don't want to install cave survey on your single player worlds. I could either split the project to two jars (which I did) or I could add some configuration to disable the mod, which would make setting up the mod more annoying and complicated as it already is. Most likely I won't be merging the jar files any time soon.

Because of this strange behavior where the mod works fine on clients, and it works fine on the server debugging, but it doesn't work on actual servers, the issue is either because I've accidentally used a client class inside the CaveMapUpgrade or I've messed up the build.gradle. I'm investigating the first possibility but if it's the second possibility then I'm going to need help from people who have knowledge in fabric and gradle.

Hopefully the problem will be fixed until tomorrow.

from cavesurvey.

MehradN avatar MehradN commented on June 17, 2024

Solved by de154fd!

The problem was way more basic than I thought. In fabric mod properties there is a property named "environment" which allows you to specify if the mod is client or server only. Only and only on actual fabric servers there is this feature that these mods don't get loaded by the fabric loader, at all.

The problem is fixed now and the mod should work fine on any platform.

Thank you for reporting the issue and I hope you have a wonderful time!

from cavesurvey.

Related Issues (4)

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.