Skip to content
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

[Draft] - Primary Addin and rewrite of functions in Serverlib #5

Closed
wants to merge 115 commits into from

Conversation

Ethryan
Copy link
Contributor

@Ethryan Ethryan commented Sep 24, 2023

Looking for assistance to port this and update the ServerUtilities with newer features.

Nice to haves:
serverutils.integration <-- NEI, Journeymap and so on. Needs to be written from scratch.

@Ethryan Ethryan changed the title [Draft] - Primary Addin and rewrite of functions [Draft] - Primary Addin and rewrite of functions in Serverlib Sep 24, 2023
@Ethryan
Copy link
Contributor Author

Ethryan commented Sep 28, 2023

TODO: Create a way to Authorize users so that they can access the Requires_Auth pages. <-- no clue how to do this.

@Lyfts
Copy link
Member

Lyfts commented Sep 29, 2023

The problem with commands seem to be here:

The problem was not here

ServerCommandManager manager = (ServerCommandManager) Ranks.INSTANCE.universe.server.getCommandManager();
List<ICommand> commands = new ArrayList<>(manager.getCommands().values());
ATHelper.getCommandSet(manager).clear();
manager.getCommands().clear();
for (ICommand command : commands) {
ModContainer container = CommonUtils.getModContainerForClass(command.getClass());
manager.registerCommand(
CommandOverride.create(
command,
container == null ? Rank.NODE_COMMAND
: (Rank.NODE_COMMAND + '.' + container.getModId()),
container));
}

It seems to got through that once per mod in the package for whatever reason. Just like the sidebar buttons.

@Ethryan
Copy link
Contributor Author

Ethryan commented Sep 29, 2023

Damn, at least you found the root of the issue

@Lyfts
Copy link
Member

Lyfts commented Oct 3, 2023

This will crash on server startup with AromaCore loaded (and presumably more)

this

String usageS = getCommandUsage(FakePlayerFactory.getMinecraft(Ranks.INSTANCE.universe.world));
if (usageS == null || usageS.isEmpty()
|| usageS.indexOf('/') != -1
|| usageS.indexOf('%') != -1
|| usageS.indexOf(' ') != -1) {
usage = new ChatComponentText(usageS);
} else {
usage = new ChatComponentTranslation(usageS);
}

crash-2023-10-03_14.28.44-server.txt

Some more minor bugs:
The [Click Here] to turn notification off that shows when you join a server and aren't in a team doesn't work.
Sidebar buttons doesn't show in NEI creative+ inventory. (its not an instance of InventoryEffectRenderer)
The config option "show_playtime" is hilariously off.
The nbt and trash can keybinds don't work no matter which key you set it to.

@Ethryan
Copy link
Contributor Author

Ethryan commented Oct 24, 2023

Closing this since a new pull request has been made.

@Ethryan Ethryan closed this Oct 24, 2023
@Ethryan Ethryan deleted the Serverlib-Features-Port branch October 24, 2023 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants