Jump to content

lcy0x1

Members
  • Posts

    1
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

lcy0x1's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. I made some crafting recipes by using the JSON recipe files and made 3 recipe types for my custom machines by implementing IRecipe<T>. However, I found that they are displayed in the recipe book of Work Bench and shows in one of the recipe categories. When I click a recipe that belongs to one of the 3 custom recipe types, a fatal error was thrown by the WorkBenchContainer. I have looked into the source code, and find that recipe categories are hardcoded and there is no way to add a new recipe category. Furthermore, all custom recipe types will be displayed since the ClientRecipeBook class simply retrieves all recipes and display all of them regardless of the container type (the generic type T in IRecipe<T>). Thus, I can't find a way to remove them from the Workbench Recipe Book or change the recipe category. I can't find the registries for ClientRecipeBook and RecipeManager also. Is there any solution to this problem? It keeps causing fatal errors. Stack Trace: java.lang.ClassCastException: net.minecraft.inventory.CraftingInventory cannot be cast to ******.recipe.OxiRecipe$Inv at ******.recipe.OxiRecipe.func_77569_a(OxiRecipe.java:23) ~[?:1.0] at net.minecraft.inventory.container.WorkbenchContainer.func_201769_a(SourceFile:96) ~[?:?] at net.minecraft.item.crafting.ServerRecipePlacer.func_201508_a(SourceFile:96) ~[?:?] at net.minecraft.item.crafting.ServerRecipePlacer.func_194327_a(SourceFile:53) ~[?:?] at net.minecraft.inventory.container.RecipeBookContainer.func_217056_a(RecipeBookContainer.java:17) ~[?:?] at net.minecraft.network.play.ServerPlayNetHandler.lambda$processPlaceRecipe$3(ServerPlayNetHandler.java:1165) ~[?:?] at java.util.Optional.ifPresent(Optional.java:159) ~[?:1.8.0_241] at net.minecraft.network.play.ServerPlayNetHandler.func_194308_a(ServerPlayNetHandler.java:1164) ~[?:?] at net.minecraft.network.play.client.CPlaceRecipePacket.func_148833_a(SourceFile:40) ~[?:?] at net.minecraft.network.play.client.CPlaceRecipePacket.func_148833_a(SourceFile:10) ~[?:?] at net.minecraft.network.PacketThreadUtil.func_225383_a(SourceFile:21) ~[?:?] at net.minecraft.util.concurrent.TickDelayedTask.run(SourceFile:18) ~[?:?] at net.minecraft.util.concurrent.ThreadTaskExecutor.func_213166_h(SourceFile:144) [?:?] at net.minecraft.util.concurrent.RecursiveEventLoop.func_213166_h(SourceFile:23) [?:?] at net.minecraft.server.MinecraftServer.func_213166_h(MinecraftServer.java:729) [?:?] at net.minecraft.server.MinecraftServer.func_213166_h(MinecraftServer.java:141) [?:?] at net.minecraft.util.concurrent.ThreadTaskExecutor.func_213168_p(SourceFile:118) [?:?] at net.minecraft.server.MinecraftServer.func_213205_aW(MinecraftServer.java:712) [?:?] at net.minecraft.server.MinecraftServer.func_213168_p(MinecraftServer.java:706) [?:?] at net.minecraft.util.concurrent.ThreadTaskExecutor.func_213161_c(SourceFile:127) [?:?] at net.minecraft.server.MinecraftServer.func_213202_o(MinecraftServer.java:692) [?:?] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:639) [?:?] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_241]
×
×
  • Create New...

Important Information

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