TerraFirmaCraft

TerraFirmaCraft

2M Downloads

Chopping block variation recipes from HorsePower mod are broken since .159

TheConception opened this issue ยท 3 comments

commented

Horsepower mod has a config option to auto-detect logs from other mods and auto-add variations and recipes for chopping blocks corresponding to each tree log. Feature worked fine with TFC until update 159 (all versions above seem to be affected): all variations are detected and all recipes exist (could be seen in JEI), but when you add items in crafting window, nothing happens and following error is logged (no crashes, logged each time you place required items in grid):

[Server thread/FATAL]: Error executing task
java.util.concurrent.ExecutionException: java.lang.ClassCastException: net.dries007.tfc.objects.items.ItemMisc cannot be cast to net.minecraft.item.ItemBlock
at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[?:1.8.0_51]
at java.util.concurrent.FutureTask.get(FutureTask.java:192) ~[?:1.8.0_51]
at net.minecraft.util.Util.func_181617_a(SourceFile:47) [h.class:?]
at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:723) [MinecraftServer.class:?]
at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:668) [MinecraftServer.class:?]
at net.minecraft.server.integrated.IntegratedServer.func_71217_p(IntegratedServer.java:185) [chd.class:?]
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:526) [MinecraftServer.class:?]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_51]
Caused by: java.lang.ClassCastException: net.dries007.tfc.objects.items.ItemMisc cannot be cast to net.minecraft.item.ItemBlock
at se.gory_moon.horsepower.recipes.ShapelessChoppingRecipe.func_77572_b(ShapelessChoppingRecipe.java:47) ~[ShapelessChoppingRecipe.class:?]
at net.minecraft.inventory.Container.func_192389_a(Container.java:798) ~[afr.class:?]
at net.minecraft.inventory.ContainerPlayer.func_75130_a(ContainerPlayer.java:88) ~[agi.class:?]
at net.minecraft.inventory.InventoryCrafting.func_70299_a(SourceFile:93) ~[afy.class:?]
at net.minecraft.inventory.Slot.func_75215_d(Slot.java:70) ~[agr.class:?]
at net.minecraft.inventory.Container.func_184996_a(Container.java:195) ~[afr.class:?]
at net.minecraft.network.NetHandlerPlayServer.func_147351_a(NetHandlerPlayServer.java:1162) ~[pa.class:?]
at net.minecraft.network.play.client.CPacketClickWindow.func_148833_a(CPacketClickWindow.java:38) ~[lf.class:?]
at net.minecraft.network.play.client.CPacketClickWindow.func_148833_a(CPacketClickWindow.java:12) ~[lf.class:?]
at net.minecraft.network.PacketThreadUtil$1.run(SourceFile:13) ~[hv$1.class:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_51]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_51]
at net.minecraft.util.Util.func_181617_a(SourceFile:46) ~[h.class:?]
... 5 more

  1. What did you expect to happen? - Blocks (custom variations) are crafted according to their recipes shown in JEI
  2. What actually happened instead (i.e. what was the bug) - You can't craft any chopping block from that mod. Simply nothing happens when you put items in crafting window
  3. If it was a crash, upload the full log file (latest.log) - No crash

To reproduce:

  1. Have both HorsePower and TFC (starting from version 159) (+JEI)
  2. Craft any custom variation of chopping blocks from HorsePower (any log + flint)
  3. No output and error is logged. Versions of TFC below 159 work as intended.

Meta Info

  • TFC Version: 1.7.1.159 (first non-working) till latest .164
  • Were reproduced with only latest forge 2854 and 3 mods (JEI + TFC + HorsePower), doesn't matter if its SP or Dedicated
  • HorsePower version is latest 2.6.4.74
commented

This issue does not apply, or has been fixed in the current MC 1.18 versions of TFC, and as MC 1.12 is receiving no more development, it will be closed. If this issue arises again in 1.18, please file a new issue report.

commented

One of your horsepower chopping recipes is broken - it's thinking that a specific item (I don't know which) is a ItemBlock when it isn't. The relavant line in Horse Power is

https://github.com/GoryMoon/HorsePower/blob/3df7ce49926b98e3e3dd25eaa09eed7f1f8c64d2/src/main/java/se/gory_moon/horsepower/recipes/ShapelessChoppingRecipe.java#L47

which directly assumes the items in question are blocks.

commented

I haven't changed any recipes myself. Tested on barebones setup with just 3 mods. No modtweaker or anything like that. By default recipe is: log (any) + flint.