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

Server data is not loaded in my developent environment #63

Closed
SolidBlock-cn opened this issue Mar 20, 2022 · 2 comments
Closed

Server data is not loaded in my developent environment #63

SolidBlock-cn opened this issue Mar 20, 2022 · 2 comments

Comments

@SolidBlock-cn
Copy link

In my own game instance, with 1.18.2, arrp 0.5.7, the server data (loot tables, recipes, etc.) is normal.

However, when I build your code in my own development environment, there is no data loaded (only client assets loaded, like #58 ) - no matter BEFORE_VANILLA or AFTER_VANILLA, no matter registered in RRPPregenEntrypoint or ModInitializer.

I have inspected the code, and found that the only mixin is ReloaderResourceManagerImplMixin, which seems only to be loaded when loading client assets.

However, in my own game instance, all data is loaded normally. I'm not sure how it is achieved. Is there any solution?

@SolidBlock-cn SolidBlock-cn changed the title About server data Server data is not loaded in my developent environment Mar 20, 2022
@SolidBlock-cn
Copy link
Author

I seem to have found some reasons...

The mixin in the mod 0.5.7 is LifeCycledResourceManagerImplMixin, which is better. But I tried that mixin, which seems not to work.

  @ModifyVariable(method = "<init>", at = @At(value = "HEAD"), argsOnly = true)
  private static List<ResourcePack> registerARRPs(List<ResourcePack> packs) throws ExecutionException, InterruptedException {
    ARRP.waitForPregen();
    ARRP_LOGGER.info("ARRP register - before vanilla");
    List<ResourcePack> before = new ArrayList<>();
    RRPCallback.BEFORE_VANILLA.invoker().insert(before);
    before.addAll(packs);
    ARRP_LOGGER.info("ARRP register - after vanilla");
    List<ResourcePack> after = new ArrayList<>();
    RRPCallback.AFTER_VANILLA.invoker().insert(after);
    before.addAll(after);=
    return before;
  }

@SolidBlock-cn
Copy link
Author

I misconfiged my mod. Using LifeCycledResourceManagerImplMixin is correct. My fault.

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

No branches or pull requests

1 participant