Skip to content

Commit

Permalink
Fix getting custom brewing recipes on 1.20.6+
Browse files Browse the repository at this point in the history
  • Loading branch information
tal5 committed Jun 20, 2024
1 parent a72cadc commit 7364c0f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ public boolean isValidMix(ItemStack input, ItemStack ingredient) {
@Override
public Map<NamespacedKey, BrewingRecipe> getCustomBrewingRecipes() {
if (customBrewingRecipes == null) {
customBrewingRecipes = Maps.transformValues((Map<NamespacedKey, ?>) ReflectionHelper.getFieldValue(PotionBrewing.class, "CUSTOM_MIXES", null), paperMix -> {
customBrewingRecipes = Maps.transformValues((Map<NamespacedKey, ?>) ReflectionHelper.getFieldValue(PotionBrewing.class, "customMixes", MinecraftServer.getServer().potionBrewing()), paperMix -> {
if (PaperPotionMix_CLASS == null) {
PaperPotionMix_CLASS = paperMix.getClass();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ public boolean isValidMix(ItemStack input, ItemStack ingredient) {
@Override
public Map<NamespacedKey, BrewingRecipe> getCustomBrewingRecipes() {
if (customBrewingRecipes == null) {
customBrewingRecipes = Maps.transformValues((Map<NamespacedKey, ?>) ReflectionHelper.getFieldValue(PotionBrewing.class, "CUSTOM_MIXES", null), paperMix -> {
customBrewingRecipes = Maps.transformValues((Map<NamespacedKey, ?>) ReflectionHelper.getFieldValue(PotionBrewing.class, "customMixes", MinecraftServer.getServer().potionBrewing()), paperMix -> {
if (PaperPotionMix_CLASS == null) {
PaperPotionMix_CLASS = paperMix.getClass();
}
Expand Down

0 comments on commit 7364c0f

Please sign in to comment.