-
-
Notifications
You must be signed in to change notification settings - Fork 129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Port to Fabric #144
[WIP] Port to Fabric #144
Conversation
fabric/src/main/java/net/william278/husksync/FabricHuskSync.java
Outdated
Show resolved
Hide resolved
Breathtaking work thus far. 👍 Really excellent stuff. As for (de)serialization -- I think it's exposed as raw NBT in Fabric, which we can serialize I believe (& there's methods to do so afaik). I'm not too worried about supporting cross-compat with Spigot servers, as that uses proprietary Spigot API to function (which we might change in the future tbh). |
Thank you so much for your endorsement! Next I'll peruse the source code of Bukkit serialization for the correct way they work. There will be new commits here soon, once again sorry for the speed of work. |
All good! Thanks for your work. Just a heads up -- I've changed the license to Apache-2.0 today to be more permissive -- I hope this is a bit better to work with! :) I hope that's okay with you? You'll need to update it to Apache-2.0 in the fabric mod config, too (and re-run |
My pleasure, Thanks for contributing to open source! |
Hey this is awesome I need this |
I was looking at the code, and if the player is in adventure game mode, does it change to survival game mode? |
It does seem that Adventure mode is not recognized. I’ve been very busy at work recently, so I haven’t updated it for a long time: (. If you are willing, you are welcome to PR! |
Me too! Thank you for your work on this! |
Probably a good idea to rebase this on the new serialisation-refactor branch when that’s merged as that’ll help big time with a few of the todos on this PR. Also, new task system can borrow HuskHomes existing fabric code |
I'd love to use this mod on our fabric network! @hanbings @WiIIiam278 So you need some coding support for this one? |
Do you mean to merge this PR first and then fork it for the next step? Of course, it's up to you. |
Yes. There has been no progress for a long time due to my work. It's currently hard for me to find the time to work on Bukkit's item deserialization, which will result in us not being able to correctly parse the player's item information from the database. |
@hanbings No problem at all! |
Thank you for your attention! I've synced the upstream code. Now that I'm ready to merge the code I've completed so far (this PR), I'll compile it in my local environment later to make sure the fabric version can pass the build. |
@WiIIiam278 I modified some code to make it pass the build. Please approve the Actions workflow again. Thanks! |
Workflow approved :) |
No problem! I have done a fair bit of work today. The next thing to do is implement Data and Serializable for each class type. Minecraft provides utils for getting NBT from Items, so we can do that. Persistent Data Containers isn't a feature in the Vanilla game, so this will utilize the custom data store I wrote for third party plugin/mod support. And a bunch of mixins to handle events -- this is something I'm not very good at, though! |
@hanbings To keep you in the loop, I've added Data and Serializer classes for Item data types to NBT. Needs testing, but just need to add equivalent ones for the other data types and the base sync system should work :) The big remaining work is mixin logic for handling the various events that don't have workable API equivalents. Feel free to have a look at what I've done, make suggestions/changes, and update the checklist in the PR detail. |
# Conflicts: # build.gradle # settings.gradle
I'm still slowly chipping away at this bit by bit and awhile ago added Fabric implementations of inventory data types. If anyone more experienced with mixins is able to have a look at some of the needed ones for this PR, get in touch! |
I have begun implementing more of the events needed for this, here. I am still working on ensuring each event is precise, but the basics are there.
|
@Stampede2011 Hey, great work! Feel free to PR into this branch or even into master if you want to supersede this PR :) |
Just created a PR for this if your able to review: https://github.com/hanbings/HuskSync/pull/1 |
Had a quick cursory glance just now, and this looks to be excellent work. What I'm going to do, in the interest of making this a bit easier for me to manage and review, is merge this PR into a |
Superseded by #217 |
#117
There is still a lot of work to be done. This PR is to keep in sync with the upstream code. Review work needs to be postponed a little longer. Sorry for taking so much time.
Basic Information:
Target game version: 1.20.1
Fabric Loader version: 0.14.21
Fabric API version: 0.83.0+1.20.1
Progress:
Basic
Database
Events
Data
API No plans yet
Migration tool No plans yet
Analytics
Currently encountered problems: