Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

My Recipe Won't Work


Recommended Posts

Heya, so I'm making a cutting board for turning meat into sliced meat and all that.  I have everything set up: The container, tile entity, gui, etc.  Everything is working fine, except for the fact that when I put beef into the first slot, nothing happens and nothing outputs.  I double and triple checked all the code and everything seems to be in line and I'm sure this is just a stupid error, but I'm not sure what to do about it.

 

Here's my the relevant files in my github (Containers, tile entities, serializers, recipes, etc) :

https://github.com/TheMajorN/sculleryProject/tree/main/src/main/java/com/thamajorn/scullery/util

https://github.com/TheMajorN/sculleryProject/tree/main/src/main/java/com/thamajorn/scullery/tileentities

https://github.com/TheMajorN/sculleryProject/tree/main/src/main/java/com/thamajorn/scullery/container

https://github.com/TheMajorN/sculleryProject/tree/main/src/main/java/com/thamajorn/scullery/gui

https://github.com/TheMajorN/sculleryProject/tree/main/src/main/java/com/thamajorn/scullery/recipes

https://github.com/TheMajorN/sculleryProject/tree/main/src/main/resources/data/scullery/recipes/cuttingboardrecipes

 

Sorry for pretty much having someone look over my work but maybe an extra set of eyes is just what I need.

 

Edit: You'll see some files not using upper camel case, sorry about that but it's not really my priority rn to fix it rn but I'll get around to organization once I get this problem sorted.

Edited by TheMajorN
Clarification on disorganization
Link to post
Share on other sites

You never register the DeferredRegister for recipe serializers to the event bus, as such your recipe serializer is not registered. You can see this in the console:

Quote

com.google.gson.JsonSyntaxException: Invalid or unsupported recipe type 'scullery:cuttingboard'

 

Link to post
Share on other sites
25 minutes ago, diesieben07 said:

You never register the DeferredRegister for recipe serializers to the event bus, as such your recipe serializer is not registered. You can see this in the console:

 

Ohhh my god I totally missed that.  Thanks for your help as always diesie.

Link to post
Share on other sites

Hey so sorry to bother again, but I registered it and everything and the recipe still isn't working for some reason.  I was reading through the console and the only thing that looked like was wrong with the recipe is that it wasn't categorized, but I don't think that would completely negate the recipe.  I updated the github to the most recent changes just in case I missed something else.  Sorry for the trouble.

Link to post
Share on other sites

OH! I didn't even realize I had a line of code in there that made it required to be powered by redstone.  I just got rid of that and everything is working mostly fine!  I also switched the progress bar from the foreground to background changed the x and y on it, and its in the right place and shows up.  The only problem is now that the progress bar cuts off at about 1/4 the way through, but I should be able to find and fix that.  I'll also take a look at the getRecipe method for simplificaiton.

 

Thank you so much for the help dude.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
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.



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • Alright, thanks once again for your support, have a great day
    • It works now, thank you very much. However, there is something else I'm wondering about. One mod, Netherite Plus, says that to config, I need to restart the game, but I did, twice, and the config option is still not available. (I use Mr. Crayfish's "Configured" to config mods). Do you know what's wrong?  
    • public static void generateOres(final BiomeLoadingEvent event) { if (!(event.getCategory().equals(Biome.Category.NETHER) || event.getCategory().equals(Biome.Category.THEEND))) { buildOreFeature(BlockInit.BERYLORE.get(), Blocks.GRASS, 10, 0, 100, 20); } } you're not actually adding the features to the biome, the return value of your method is just getting ignored, in mcp the method that you call is BiomeGenerationSettingsBuilder#withFeature, in mojmaps I don't know   private static ConfiguredFeature<?, ?> buildOreFeature(Block ore, Block filler, int maxVeinSize, int minVeinLevel, int maxVeinLevel, int spawnRate) { ConfiguredFeature<?, ?> feature = Feature.ORE.configured(new OreFeatureConfig(new BlockMatchRuleTest(filler), ore.defaultBlockState(), maxVeinSize)); feature = minMaxRange(feature, minVeinLevel, maxVeinLevel).squared(); feature = feature.count(spawnRate); return feature; } this is not how you should create a ConfiguredFeature 1- I suggest you keep each feature in a static field 2- you need to actually Register the feature, or the game won't know about it, you can do so by calling Registry.register, and registering your feature to the Configured Features registry which can be found under the class WorldGenRegistries 3- you can chain the count, squared and so on methods, it'll make your code look cleaner   MinecraftForge.EVENT_BUS.addListener(EventPriority.HIGH, ModOreGen::generateOres); There's no need set it to a high priority, and you're registering the listener to the wrong event bus
    • So basically I tried updating my 1.12.2 ore generation to 1.16.5, long story short theres a massive change. I finally got it without eclipse problems through looking at a couple githubs, but it doesnt work. I feel like im overlooking an obvious problem but I cant see it. If someone could help me out that'd be great. Heres my code for the ore gen. @Mod.EventBusSubscriber(modid = Main.MODID, bus = Mod.EventBusSubscriber.Bus.MOD) public class ModOreGen { public static void generateOres(final BiomeLoadingEvent event) { if (!(event.getCategory().equals(Biome.Category.NETHER) || event.getCategory().equals(Biome.Category.THEEND))) { buildOreFeature(BlockInit.BERYLORE.get(), Blocks.GRASS, 10, 0, 100, 20); } } private static ConfiguredFeature<?, ?> buildOreFeature(Block ore, Block filler, int maxVeinSize, int minVeinLevel, int maxVeinLevel, int spawnRate) { ConfiguredFeature<?, ?> feature = Feature.ORE.configured(new OreFeatureConfig(new BlockMatchRuleTest(filler), ore.defaultBlockState(), maxVeinSize)); feature = minMaxRange(feature, minVeinLevel, maxVeinLevel).squared(); feature = feature.count(spawnRate); return feature; } private static IDecoratable<ConfiguredFeature<?,?>> minMaxRange(IDecoratable<ConfiguredFeature<?,?>> f, int min, int max) { return f.decorated(Placement.RANGE.configured(new TopSolidRangeConfig(min, min, max))); } } And heres where I call it public Main() { IEventBus bus = FMLJavaModLoadingContext.get().getModEventBus(); bus.addListener(this::setup); ItemInit.ITEMS.register(bus); BlockInit.BLOCKS.register(bus); MinecraftForge.EVENT_BUS.register(this); MinecraftForge.EVENT_BUS.register(FuelHandler.instance); PotionList.EFFECTS.register(bus); PotionList.POTIONS.register(bus); MinecraftForge.EVENT_BUS.addListener(EventPriority.HIGH, ModOreGen::generateOres); }  
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.