Actually Subtractions

Actually Subtractions

25.5k Downloads

JSON recipes added by CraftTweaker or datapack don't work

trav90 opened this issue · 4 comments

commented

Hello,

Adding JSON recipes for my modpack for the Atomic Reconstructor and Crusher via CraftTweaker do not work. CraftTweaker does not throw any errors and the recipes show up in JEI, but they don't actually work (throwing the item in front of the Atomic Reconstructor and triggering it does not actually convert the item and inserting the item in the Crusher does nothing). Reproduced in a minimal environment with only the following:

Minecraft 1.20.1
Forge 47.3.12
Actually Subtractions 1.2.14.7
JEI 15.20.0.105
CraftTweaker 14.0.44
Patchouli 1.20.1-84

Here's the CraftTweaker script I am using to test with:

<recipetype:actuallyadditions:laser>.addJsonRecipe("calcite_reconstruct", {
  "type": "actuallyadditions:laser",
  "energy": 2000,
  "ingredient": {
    "item": "minecraft:diorite"
  },
  "result": {
    "item": "minecraft:calcite"
  }
}
);

<recipetype:actuallyadditions:crushing>.addJsonRecipe("aa_crushing_amethyst", {
  "type": "actuallyadditions:crushing",
  "ingredient": {
    "item": "minecraft:amethyst_cluster"
  },
  "result": [
    {
      "chance": 1.0,
      "result": {
        "Count": 2,
        "id": "minecraft:amethyst_shard"
      }
    },
    {
      "chance": 0.0,
      "result": {
        "Count": 0,
        "id": "minecraft:air"
      }
    }
  ]
}
);

<recipetype:actuallyadditions:crushing>.addJsonRecipe("aa_crushing_amethyst_block", {
  "type": "actuallyadditions:crushing",
  "ingredient": {
    "item": "minecraft:amethyst_block"
  },
  "result": [
    {
      "chance": 1.0,
      "result": {
        "Count": 4,
        "id": "minecraft:amethyst_shard"
      }
    },
    {
      "chance": 0.0,
      "result": {
        "Count": 0,
        "id": "minecraft:air"
      }
    }
  ]
}
);
commented

Thank you!

commented

I tried adding recipes via datapack instead of CraftTweaker and they don't work either (don't even show up in JEI).

commented

Recipes added via datapack also crash when attempted in game, for example:

java.lang.IndexOutOfBoundsException: Index 1 out of bounds for length 1
	at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64)
	at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70)
	at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:266)
	at java.base/java.util.Objects.checkIndex(Objects.java:361)
	at java.base/java.util.ArrayList.get(ArrayList.java:427)
	at TRANSFORMER/[email protected]/net.minecraft.core.NonNullList.get(NonNullList.java:47)
	at TRANSFORMER/[email protected]+mc1.20.1/de.ellpeck.actuallyadditions.mod.crafting.CrushingRecipe.getOutputTwo(CrushingRecipe.java:101)
	at TRANSFORMER/[email protected]+mc1.20.1/de.ellpeck.actuallyadditions.mod.tile.TileEntityCrusher.canCrushOn(TileEntityCrusher.java:212)
	at TRANSFORMER/[email protected]+mc1.20.1/de.ellpeck.actuallyadditions.mod.tile.TileEntityCrusher.serverTick(TileEntityCrusher.java:116)
	at TRANSFORMER/[email protected]+mc1.20.1/de.ellpeck.actuallyadditions.mod.tile.TileEntityCrusher.serverTick(TileEntityCrusher.java:103)
	at TRANSFORMER/[email protected]/net.minecraft.world.level.chunk.LevelChunk$BoundTickingBlockEntity.mixinextras$bridge$m_155252_$7(LevelChunk.java)
	at TRANSFORMER/[email protected]/com.bawnorton.neruina.handler.TickHandler.safelyTickBlockEntity(TickHandler.java:169)
	at TRANSFORMER/[email protected]/net.minecraft.world.level.chunk.LevelChunk$BoundTickingBlockEntity.wrapOperation$bik000$catchTickingBlockEntity$notTheCauseOfTickLag(LevelChunk.java:815)
	at TRANSFORMER/[email protected]/net.minecraft.world.level.chunk.LevelChunk$BoundTickingBlockEntity.m_142224_(LevelChunk.java:689)
	at TRANSFORMER/[email protected]/net.minecraft.world.level.chunk.LevelChunk$RebindableTickingBlockEntityWrapper.m_142224_(LevelChunk.java:782)
	at TRANSFORMER/[email protected]/net.minecraft.world.level.Level.redirect$bgg000$observable$redirectTick(Level.java:1540)
	at TRANSFORMER/[email protected]/net.minecraft.world.level.Level.m_46463_(Level.java:468)
	at TRANSFORMER/[email protected]/net.minecraft.server.level.ServerLevel.m_8793_(ServerLevel.java:351)
	at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.m_5703_(MinecraftServer.java:893)
	at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.m_5705_(MinecraftServer.java:814)
	at TRANSFORMER/[email protected]/net.minecraft.client.server.IntegratedServer.m_5705_(IntegratedServer.java:89)
	at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.m_130011_(MinecraftServer.java:661)
	at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.m_206580_(MinecraftServer.java:251)
	at java.base/java.lang.Thread.run(Thread.java:840)
commented

Fixed in 1.2.14.8.