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