Jump to content

Recommended Posts

Posted (edited)

Since 1.12 is encouraging recipes to be unlocked, I figured I'd make my mod's recipes unlockable in the same way. So as a quick test, I started with just one. I created the assets/redplusplus/advancements/recipes folder and basically copied/pasted one of the vanilla recipe advancements in. Then I changed it to trigger when getting a comparator in your inventory instead of the iron ingot that was there, and to unlock my redplusplus:block_redstone_counter recipe instead of the one it was unlocking. (I also made a copy of the vanilla recipes/root.json advancement, which is just an impossible trigger and nothing else, and parented my advancement to that one just in case.)

Then I created the assets/redplusplus/recipes/block_redstone_counter.json file, where I copied the recipe file for an anvil and changed the recipe ingredients and output. The ingredients are all vanilla items, the output is my custom item.

 

I made sure to use the proper domains for all resource locations in these files, whether they're minecraft: or redplusplus: alike.

The game loads fine, but when I open a crafting table, it crashes completely. The weird thing is the stacktrace doesn't include any of my code, only vanilla code; can someone help me pinpoint what I've done to cause a fatal error here?

Stacktrace:

[main/FATAL]: Error executing task
java.util.concurrent.ExecutionException: java.lang.IndexOutOfBoundsException: bitIndex < 0: -1
	at java.util.concurrent.FutureTask.report(Unknown Source) ~[?:1.8.0_111]
	at java.util.concurrent.FutureTask.get(Unknown Source) ~[?:1.8.0_111]
	at net.minecraft.util.Util.runTask(Util.java:54) [Util.class:?]
	at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1161) [Minecraft.class:?]
	at net.minecraft.client.Minecraft.run(Minecraft.java:436) [Minecraft.class:?]
	at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_111]
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_111]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_111]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_111]
	at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?]
	at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_111]
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_111]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_111]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_111]
	at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?]
	at GradleStart.main(GradleStart.java:26) [start/:?]
Caused by: java.lang.IndexOutOfBoundsException: bitIndex < 0: -1
	at java.util.BitSet.get(Unknown Source) ~[?:1.8.0_111]
	at net.minecraft.stats.RecipeBook.containsRecipe(RecipeBook.java:35) ~[RecipeBook.class:?]
	at net.minecraft.client.gui.recipebook.RecipeList.func_194214_a(RecipeList.java:35) ~[RecipeList.class:?]
	at net.minecraft.client.network.NetHandlerPlayClient.lambda$handleRecipeBook$2(NetHandlerPlayClient.java:1636) ~[NetHandlerPlayClient.class:?]
	at java.util.ArrayList.forEach(Unknown Source) ~[?:1.8.0_111]
	at net.minecraft.client.network.NetHandlerPlayClient.handleRecipeBook(NetHandlerPlayClient.java:1634) ~[NetHandlerPlayClient.class:?]
	at net.minecraft.network.play.server.SPacketRecipeBook.processPacket(SPacketRecipeBook.java:40) ~[SPacketRecipeBook.class:?]
	at net.minecraft.network.play.server.SPacketRecipeBook.processPacket(SPacketRecipeBook.java:14) ~[SPacketRecipeBook.class:?]
	at net.minecraft.network.PacketThreadUtil$1.run(PacketThreadUtil.java:21) ~[PacketThreadUtil$1.class:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) ~[?:1.8.0_111]
	at java.util.concurrent.FutureTask.run(Unknown Source) ~[?:1.8.0_111]
	at net.minecraft.util.Util.runTask(Util.java:53) ~[Util.class:?]
	... 15 more

 

Edited by IceMetalPunk
Typo fixing

Whatever Minecraft needs, it is most likely not yet another tool tier.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

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