
Server data is not loaded in my developent environment
SolidBlock-cn opened this issue ยท 2 comments
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?
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;
}