Jump to content

Maefvfis

Members
  • Posts

    8
  • Joined

  • Last visited

Everything posted by Maefvfis

  1. I see, that clarified things for me. Didnt know about the "server wont let me" thing. The mod should function an all server, not espacially mine. Well i guess than i´ll build some sort of ingame quest guide to help getting the recipes. Vielen Dank!
  2. Exept that its only the vanilla recepis, right ? I could rewrite the craftingbench gui show the recipes from the ForgeRegistry without asking the server to send me some.
  3. Maybe i should have clarified it a bit more, beforehand. When your in the inventory, you have the crafting book. I want that all recipes are available to craft (in bench aswell) without first unlocking them through gathering the resources to craft them. Yeah, thats basicly it
  4. Okay, i dont want to tell the server whats going on. So in in order to do that, i might be going to fiddle my own gui.
  5. Btw. if i lock the recipes instead of unlocking it works like a charm. RecipeBook book = new RecipeBook(); for (IRecipe irecipe : ForgeRegistries.RECIPES) { book.lock(irecipe); } Minecraft.getMinecraft().player.getRecipeBook().copyFrom(book); All recipes gone... ^^
  6. Isnt this possible client side only? My experience with the server side is at 0%, sorry about that.
  7. Hey, first of all thx for your reply! My approaches are allways a bit bodgy. I put things together and dont question them as long as they are working. Now i red the comment u mentioned. I pasted the wrong line of code... i had a bit of a mess with this bit as i was trying different things, sorry for that. ( The ForgeRegistries.RECIPES is now there thx to you) The partly working code is this: RecipeBook book = new RecipeBook(); for (IRecipe irecipe : ForgeRegistries.RECIPES) { book.unlock(irecipe); } Minecraft.getMinecraft().player.getRecipeBook().copyFrom(book); almost what i want... When i stat a new world, i have no recipes. Then i execute the code. Nothing happens. But then i pick up a log, get the new recipes from that and the ones from the code aswell. Thx in advance
  8. Hiho, im working on a mod and a feature should be to unlock all recipes in the recipe book. So far i found out how to add the recipes to the book, but they didnt show up until i recive a advancement. ArrayList<IRecipe> recipes = new ArrayList(); for (IRecipe irecipe : net.minecraftforge.registries.GameData.getWrapper(IRecipe.class)) { recipes.add(irecipe); } Minecraft.getMinecraft().player.unlockRecipes(recipes); Thx for any help
×
×
  • Create New...

Important Information

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