Bug Open

Smithing recipes do not accept items with modified data

#6620 opened by Unknown 11 months ago

Unknownreported this bug

If an item in one of the slots of the forging table has any data other than the default data for this item, then creating an item for this item becomes impossible. Steps to reproduce:

  1. Create simple item that uses SMITHING recipe, like in example below:
TestSmithing:
  Material: NETHERITE_INGOT
  Display: Forged Ingot
  Recipes:
    SMITHING_1:
      Type: SMITHING
      Amount: 1
      Template: FIRE_CHARGE
      BaseItem: IRON_INGOT
      Ingredient: COAL
  1. Run the /mm reload command, then try to smith an item based on the created recipe. It should work fine. [Legacy attachment omitted] The recipe works.

  2. Add additional data to the base item, ingredient, or template (for this example, enchantment was used, but it also works with renaming an item and other similar actions). [Legacy attachment omitted] The recipe doesn't work anymore.

This problem is also observed if the base item, ingredient, or template is an item with insufficient durability.

Edit 1: was tested on the latest devbuild, MythicMobs 4.9.5 public

Edit 2: when the smithing recipe is working, regardless of the order in which the items are laid out, the following error is recorded in the logs:

[01:29:11] [Server thread/ERROR]: [MythicMobs] [EVENTS] Exception thrown whilst handling event: org.bukkit.event.inventory.PrepareSmithingEvent
[01:29:11] [Server thread/WARN]: java.lang.ArithmeticException: / by zero
[01:29:11] [Server thread/WARN]: 	at MythicCrucible-2.2.0-SNAPSHOT.jar//io.lumine.mythiccrucible.items.recipes.RecipeManager.copyItemData(RecipeManager.java:170)
[01:29:11] [Server thread/WARN]: 	at MythicCrucible-2.2.0-SNAPSHOT.jar//io.lumine.mythiccrucible.items.recipes.RecipeManager.lambda$load$0(RecipeManager.java:89)
[01:29:11] [Server thread/WARN]: 	at MythicMobs-5.9.5.jar//io.lumine.mythic.bukkit.utils.Delegates$ConsumerToBiConsumerSecond.accept(Delegates.java:144)
[01:29:11] [Server thread/WARN]: 	at MythicMobs-5.9.5.jar//io.lumine.mythic.bukkit.utils.events.functional.single.EventListener.execute(EventListener.java:131)
[01:29:11] [Server thread/WARN]: 	at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80)
[01:29:11] [Server thread/WARN]: 	at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70)
[01:29:11] [Server thread/WARN]: 	at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:54)
[01:29:11] [Server thread/WARN]: 	at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:131)
[01:29:11] [Server thread/WARN]: 	at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:628)
[01:29:11] [Server thread/WARN]: 	at org.bukkit.event.Event.callEvent(Event.java:45)
[01:29:11] [Server thread/WARN]: 	at org.bukkit.craftbukkit.event.CraftEventFactory.callPrepareResultEvent(CraftEventFactory.java:1838)
[01:29:11] [Server thread/WARN]: 	at net.minecraft.world.inventory.SmithingMenu.slotsChanged(SmithingMenu.java:105)
[01:29:11] [Server thread/WARN]: 	at net.minecraft.world.inventory.ItemCombinerMenu$4.setChanged(ItemCombinerMenu.java:89)
[01:29:11] [Server thread/WARN]: 	at net.minecraft.world.inventory.Slot.setChanged(Slot.java:70)
[01:29:11] [Server thread/WARN]: 	at net.minecraft.world.inventory.AbstractContainerMenu.moveItemStackTo(AbstractContainerMenu.java:807)
[01:29:11] [Server thread/WARN]: 	at net.minecraft.world.inventory.AbstractContainerMenu.moveItemStackTo(AbstractContainerMenu.java:734)
[01:29:11] [Server thread/WARN]: 	at net.minecraft.world.inventory.ItemCombinerMenu.quickMoveStack(ItemCombinerMenu.java:136)
[01:29:11] [Server thread/WARN]: 	at net.minecraft.world.inventory.AbstractContainerMenu.doClick(AbstractContainerMenu.java:507)
[01:29:11] [Server thread/WARN]: 	at net.minecraft.world.inventory.AbstractContainerMenu.clicked(AbstractContainerMenu.java:363)
[01:29:11] [Server thread/WARN]: 	at net.minecraft.server.network.ServerGamePacketListenerImpl.handleContainerClick(ServerGamePacketListenerImpl.java:3300)
[01:29:11] [Server thread/WARN]: 	at net.minecraft.network.protocol.game.ServerboundContainerClickPacket.handle(ServerboundContainerClickPacket.java:69)
[01:29:11] [Server thread/WARN]: 	at net.minecraft.network.protocol.game.ServerboundContainerClickPacket.handle(ServerboundContainerClickPacket.java:14)
[01:29:11] [Server thread/WARN]: 	at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$0(PacketUtils.java:29)
[01:29:11] [Server thread/WARN]: 	at net.minecraft.server.TickTask.run(TickTask.java:18)
[01:29:11] [Server thread/WARN]: 	at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:155)
[01:29:11] [Server thread/WARN]: 	at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24)
[01:29:11] [Server thread/WARN]: 	at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1494)
[01:29:11] [Server thread/WARN]: 	at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:176)
[01:29:11] [Server thread/WARN]: 	at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:129)
[01:29:11] [Server thread/WARN]: 	at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1474)
[01:29:11] [Server thread/WARN]: 	at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1468)
[01:29:11] [Server thread/WARN]: 	at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:139)
[01:29:11] [Server thread/WARN]: 	at net.minecraft.server.MinecraftServer.managedBlock(MinecraftServer.java:1425)
[01:29:11] [Server thread/WARN]: 	at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1433)
[01:29:11] [Server thread/WARN]: 	at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1310)
[01:29:11] [Server thread/WARN]: 	at net.minecraft.server.MinecraftServer.lambda$spin$2(MinecraftServer.java:313)
[01:29:11] [Server thread/WARN]: 	at java.base/java.lang.Thread.run(Thread.java:1583)
Unknowncommented

Also the same issue with the STONECUTTER recipes. You can't cut MythicBlocks, only vanilla

Sign in to join the discussion.