Skip to content

Commit

Permalink
[1.10.14]修复了无法使用酿造配方创建器GUI的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
YufiriaMazenta committed Dec 10, 2024
1 parent d6a97b2 commit 4b30817
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import java.text.SimpleDateFormat
version = "1.10.13"
version = "1.10.14"

plugins {
`java-library`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public enum RecipeManager implements BukkitLifeCycleTask {
private final Map<NamespacedKey, AnvilRecipe> anvilRecipeMap;
public static final List<RecipeType> UNLOCKABLE_RECIPE_TYPE =
List.of(RecipeType.SHAPED, RecipeType.SHAPELESS, RecipeType.COOKING, RecipeType.SMITHING, RecipeType.STONE_CUTTING, RecipeType.RANDOM_COOKING);
private boolean supportPotionMix;
private Boolean supportPotionMix;

RecipeManager() {
pluginRecipeMap = new ConcurrentHashMap<>();
Expand Down Expand Up @@ -449,6 +449,9 @@ public Map<NamespacedKey, Recipe> serverRecipesCache() {
}

public boolean supportPotionMix() {
if (supportPotionMix == null) {
supportPotionMix = CrypticLibBukkit.isPaper();
}
return supportPotionMix;
}

Expand Down Expand Up @@ -505,8 +508,7 @@ public void run(Plugin plugin, LifeCycle lifeCycle) {
});
}

if (!CrypticLibBukkit.platform().type().equals(Platform.PlatformType.BUKKIT)) {
supportPotionMix = true;
if (supportPotionMix()) {
recipeRegisterMap.put(RecipeType.POTION, recipe -> {
Bukkit.getPotionBrewer().addPotionMix(((PotionMixRecipe) recipe).potionMix());
potionMixRecipeMap.put(((PotionMixRecipe) recipe).key(), (PotionMixRecipe) recipe);
Expand Down

0 comments on commit 4b30817

Please sign in to comment.