Skip to content

Commit

Permalink
debug修改为默认false
Browse files Browse the repository at this point in the history
  • Loading branch information
YufiriaMazenta committed Aug 20, 2024
1 parent 1f2ea1d commit c54555d
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@
import crypticlib.config.ConfigHandler;
import crypticlib.config.entry.BooleanConfig;
import crypticlib.config.entry.StringConfig;
import crypticlib.config.entry.StringListConfig;

import java.util.ArrayList;
import java.util.Collections;

@ConfigHandler(path = "config.yml")
public class PluginConfigs {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -377,12 +377,16 @@ private void proxyFurnaceSmelt(FurnaceSmeltEvent event, EventPriority eventPrior
if (registeredListeners.isEmpty()) {
return;
}
Recipe recipe = event.getRecipe();
if (recipe == null) {
executeListener(event, registeredListeners);
}
NamespacedKey recipeKey = RecipeManager.INSTANCE.getRecipeKey(recipe);
if (recipeKey == null || !recipeKey.getNamespace().equals(RecipeManager.INSTANCE.PLUGIN_RECIPE_NAMESPACE)) {
if (CrypticLib.isPaper()) {
Recipe recipe = event.getRecipe();
if (recipe == null) {
executeListener(event, registeredListeners);
}
NamespacedKey recipeKey = RecipeManager.INSTANCE.getRecipeKey(recipe);
if (recipeKey == null || !recipeKey.getNamespace().equals(RecipeManager.INSTANCE.PLUGIN_RECIPE_NAMESPACE)) {
executeListener(event, registeredListeners);
}
} else {
executeListener(event, registeredListeners);
}
}
Expand Down Expand Up @@ -425,12 +429,16 @@ private void proxyBlockCook(BlockCookEvent event, EventPriority eventPriority) {
if (registeredListeners.isEmpty()) {
return;
}
Recipe recipe = event.getRecipe();
if (recipe == null) {
executeListener(event, registeredListeners);
}
NamespacedKey recipeKey = RecipeManager.INSTANCE.getRecipeKey(recipe);
if (recipeKey == null || !recipeKey.getNamespace().equals(RecipeManager.INSTANCE.PLUGIN_RECIPE_NAMESPACE)) {
if (CrypticLib.isPaper()) {
Recipe recipe = event.getRecipe();
if (recipe == null) {
executeListener(event, registeredListeners);
}
NamespacedKey recipeKey = RecipeManager.INSTANCE.getRecipeKey(recipe);
if (recipeKey == null || !recipeKey.getNamespace().equals(RecipeManager.INSTANCE.PLUGIN_RECIPE_NAMESPACE)) {
executeListener(event, registeredListeners);
}
} else {
executeListener(event, registeredListeners);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import com.github.yufiriamazenta.craftorithm.item.ItemManager;
import com.github.yufiriamazenta.craftorithm.recipe.registry.RecipeRegistry;
import com.github.yufiriamazenta.craftorithm.recipe.registry.impl.*;
import crypticlib.chat.MsgSender;
import org.bukkit.Material;
import org.bukkit.NamespacedKey;
import org.bukkit.Tag;
Expand Down Expand Up @@ -255,6 +256,7 @@ private static List<RecipeRegistry> newMultipleRandomCookingRecipe(YamlConfigura
public static List<RecipeRegistry> newSmithingRecipe(YamlConfiguration config, String key) {
NamespacedKey namespacedKey = new NamespacedKey(Craftorithm.instance(), key);
ItemStack result = getResultItem(config);
MsgSender.debug(config.saveToString());
RecipeChoice base = getRecipeChoice(config.getString("source.base", ""));
RecipeChoice addition = getRecipeChoice(config.getString("source.addition", ""));
boolean copyNbt = config.getBoolean("source.copy_nbt", false);
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ release_default_recipes: false
#是否在ItemsAdder重载时也重载Craftorithm
reload_when_ia_reload: true
#是否开启调试
debug: true
debug: false

0 comments on commit c54555d

Please sign in to comment.