Jump to content

izofar

Members
  • Posts

    52
  • Joined

  • Last visited

Everything posted by izofar

  1. My goal is to both 1) remove vanilla crafting recipes from the game and 2) to remove the toasts that notify the player when they've unlocked a new recipe. 1) I have seen old posts from 1.12 (and the following code from Extra-Additions) about overriding vanilla recipes with ForgeRegistry<IRecipe> recipeRegistry = (ForgeRegistry<IRecipe>)ForgeRegistries.RECIPES; However, ForgeRegistries.RECIPES seems to have become ForgeRegistries.RECIPE_SERIALIZERS. Using recipeRegistry.getValues() I can get an collection of IRecipeSerializers, but how do I go from IRecipeSerializers to an IRecipe? What's the new way to remove vanilla crafting recipes? I've come across the RecipesUpdatedEvent but this doesn't seem to be preventative of player crafting as it is merely the server telling the player what recipe's it's unlocked. 2) A method (that I think is old?) from Quark of removing toasts was to access Minecraft.getInstance().getToastGui().toastsQueue. However, in 1.15.2 Forge, toastsQueue is a private variable. If I want to remove crafting/smelting/etc. recipe toasts, how do I do this? While there is the ToastGUI#clear method, this isn't helpful as it clears the whole toast, including achievements. I considered using ToastGui#getToasts then clearing and adding back only the toasts I care to keep, but I can't seem to use getToasts correctly, as it crashes the game or turns up empty. I've generally been trying to replicate the results of the Quark class linked above, but it locks crafting from unlocked recipes instead of removing them, and it doesn't seem to block the event of a new recipe being unlocked. Any help appreciated, if anyone has been able to accomplish this in 1.15.2 Edit: *Formatted for readability*
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.