Git Product home page Git Product logo

Comments (4)

Pyrofab avatar Pyrofab commented on June 27, 2024 4

Alright so for curiosity's sake I have taken a look at what it would take to port to Fabric 1.14.
First and foremost: Good Job, this is an intricate mod, and Good Luck, for it will be some work to port.

As a reference, my sketch of a port can be found here: https://github.com/Pyrofab/BetterPortals/tree/fabric (only the buildscript compiles 😉)
Obviously, the mappings are the biggest issue but they can be handled with enough patience.
Main notes (apologies if you know all this):

  • Capabilities are replaced by a mixin to (Server)PlayerEntity to directly implement the capability provider
  • Portal block replacements could be replaced with a mixin to {PortalBlock.class, EndPortalBlock.class}, or, to reduce porting efforts, an injection at the tail of Blocks.<clinit>
  • There were quite a few changes to world data structures, but it does not seem to affect the mod too deeply (PalettedContainer<BlockState> is about equivalent to BlockStateContainer)
  • Forge has patches to load shaders from domains other than Minecraft's. The Satin library re-adds those patches.
  • Use of packets changes a bit, but with use of the Crochet library, it boils down to regex search-replace
  • javax.vecmath disappears entirely. I have myself replaced it with JOML
  • Forge events are annoying to replace, but the mod would probably gain from using adequate injections. There are also a couple event libraries lying around besides Fabric API (eg. Cloth, TextileLib)

I hope that helps in some way; I don't intend to finish my port, but if you need help I will be glad to provide.

from betterportals.

Johni0702 avatar Johni0702 commented on June 27, 2024

I'm not in principle opposed to a fabric 1.14 port but I'd really like to avoid having two completely separate versions of the mod because that effectively doubles maintenance cost. And I'd rather not already abandon the 1.12 / forge version, especially since we might need the forge compatibility parts again.

For another mod I'm maintaining, I've written a simple pre-processor which supports stuff like

//#if MC>=11400
someFabricThing()
//#else
//$$ howItsDoneOnForge()
//#endif

and can automatically convert source code (and mixin annotations) between the different mappings every time you build. However, because it uses the eclipse java compiler internally, it only works with java, so that won't do unless there are similar tools for kotlin.

Are you aware of any other projects in the modding world which solve the double-the-maintenance-cost problem?

from betterportals.

Pyrofab avatar Pyrofab commented on June 27, 2024

Oh, you are a Replay Mod dev, nice!
What I see most people do when maintaining several versions is to simply make several branches and cherry-pick commits from the main one.
Apart from that, some people create a big abstraction layer (eg. mcjty's compatlayer), but that would be a very hard task to bridge between fabric and forge.

from betterportals.

Redd56 avatar Redd56 commented on June 27, 2024

Holy shit he is

from betterportals.

Related Issues (20)

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.