Mixin rename

This commit is contained in:
paulevsGitch 2020-10-22 17:39:47 +03:00
parent 26533e7a3e
commit 433ff01304

View file

@ -21,16 +21,16 @@ public class MinecraftServerMixin {
private ServerResourceManager serverResourceManager;
@Inject(method = "reloadResources", at = @At(value = "RETURN"), cancellable = true)
private void onReload(Collection<String> collection, CallbackInfoReturnable<CompletableFuture<Void>> info) {
injectRecipes();
private void beOnReload(Collection<String> collection, CallbackInfoReturnable<CompletableFuture<Void>> info) {
beInjectRecipes();
}
@Inject(method = "loadWorld", at = @At(value = "RETURN"), cancellable = true)
private void onLoadWorld(CallbackInfo info) {
injectRecipes();
private void beOnLoadWorld(CallbackInfo info) {
beInjectRecipes();
}
private void injectRecipes() {
private void beInjectRecipes() {
if (FabricLoader.getInstance().isModLoaded("kubejs")) {
RecipeManagerAccessor accessor = (RecipeManagerAccessor) serverResourceManager.getRecipeManager();
accessor.setRecipes(EndRecipeManager.getMap(accessor.getRecipes()));