Jump to content

MagnusWright

Members
  • Posts

    10
  • Joined

  • Last visited

MagnusWright's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. I see you posted at the same time I discovered the problem, haha. Thank you for your patience.
  2. OK so for some insane reason I used "literaturemod" for the modid in the recipe file, when the actual modid is "literature". I must have changed my mind about what to use for the modid at some point, or something like that. Anyways, the recipe actually gets called now, so I could determine that the "empty" slots in the crafting inventory are in fact filled with air, so my matches function was returning false. Now that I've accounted for that, the recipe actually does work the way I intended.
  3. I have noticed through the use of breakpoints that the read function in my serializer never gets called
  4. I actually had it in `data` originally but I moved it to assets because it didn't work and I wasn't sure if that was the right place (moving it back to data didn't fix it). As for using a data generator, the file is so small that writing it by hand was faster, but I'll probably do that if (or when) I end up needing more JSON files later.
  5. My recipe doesn't seem to do anything. I see in the log that the serializer gets registered and I don't see any errors logged, but when I try to craft a written book with a banner nothing happens. I already caught a couple of simple mistakes like forgetting to actually register the serializer and misspelling the resource folder, so I won't be surprised if whatever I'm doing wrong now is equally simple but I still don't totally know what I'm looking at. https://github.com/Deadbeetle/literature-mod
  6. If my serializer only serializes one recipe, can I just put the type in the JSON and return the recipe from the read functions like this? { "type": "literature:coveredbook" } public static class CoveredBookRecipeSerializer extends ForgeRegistryEntry<IRecipeSerializer<?>> implements IRecipeSerializer<CoveredBookRecipe> { @Override public CoveredBookRecipe read(ResourceLocation recipeId, JsonObject json) { return new CoveredBookRecipe(recipeId); } @Override public CoveredBookRecipe read(ResourceLocation recipeId, PacketBuffer buffer) { return new CoveredBookRecipe(recipeId); } @Override public void write(PacketBuffer buffer, CoveredBookRecipe recipe) { } }
  7. Yeah that's kind of what I figured. I haven't touched forge since 1.7.10 so I don't really know how this whole data-oriented crafting system works...
  8. I need to basically unite the NBT from the two input items, since a vanilla written book has the "pages" tag and a banner has the "BlockEntityTag" tag. I assumed that was too complicated for JSON but I'll look a little deeper into it.
  9. I want to create a mod that allows you to craft a written book with a banner, similar to shields, to put the pattern on the cover of the book. However, the only information I can find on crafting recipes involving NBT data relies on creating an IRecipe and IRecipeFactory, the latter of which doesn't seem to exist in 1.16.3. I've looked to ShieldRecipes for inspiration and I've written a class that I think might work, but I've got no idea how to register the recipe. Once I've implemented IRecipe, how do I register it so I can actually test it in game?
×
×
  • Create New...

Important Information

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