Ender IO Forestry

Ender IO Forestry

954k Downloads

IMC added recipe not working although no errors

Tomson124 opened this issue ยท 6 comments

commented

Issue Description:

I am trying to add recipes to the AlloySmelter through IMC (from my mod SimplyJetpacks 2). There is no error in the log but the recipe is not working either.

What happens:

The recipe is not added.

What you expected to happen:

The recipe is added.

Steps to reproduce:

  1. Use the XML:
<enderio:recipes xmlns:enderio="http://enderio.com/recipes" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://enderio.com/recipes recipes.xsd ">
  <recipe name="Conductive Iron Armor Plating">
    <alloying energy="3200">
      <input  name="simplyjetpacks:metaitemmods:12" amount="1" />
      <input name="ingotConductiveIron"/>
      <output  name="simplyjetpacks:metaitemmods:13" amount="1" />
    </alloying>
  </recipe>
</enderio:recipes>
  1. Load minecraft and world
  2. Recipe for e.g. "Conductive Iron Armor Plating" is not working
    ...

Affected Versions (Do not use "latest"):

  • EnderIO: 5.0.31
  • EnderCore: 1.12.2-0.5.37
  • Minecraft: 1.12.2
  • Forge: 14.23.4.1705
  • SimplyJetpacks 2: 1.12.2-2.2.7.45
  • SpongeForge? no
  • Optifine? no
  • Single Player and/or Server? both

Your most recent log file where the issue was present:

https://pastebin.com/cL9BG9ue

The file for adding the xml while init event looks like this:

public static void addAlloySmelterRecipe(String name, int energy, ItemStack primaryInput, String secondaryInput, ItemStack tertiaryInput, ItemStack output)
	{
		SimplyJetpacks.logger.info("Registering EIO Alloy Smelter recipe");

		StringBuilder toSend = new StringBuilder();

		toSend.append("<enderio:recipes xmlns:enderio=\"http://enderio.com/recipes\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://enderio.com/recipes recipes.xsd \">");
		{
			toSend.append("<recipe name=\"" + name + "\">");
			{
				toSend.append("<alloying energy=\"" + energy + "\">");
				{
					if (primaryInput != null) {
						toSend.append("<input ");
						{
							appendItemStack(toSend, primaryInput);
						}
						toSend.append(" />");
					}

					if (secondaryInput != null) {
						toSend.append("<input name=\"" + secondaryInput + "\"/>");
					}

					if (tertiaryInput != null) {
						toSend.append("<input ");
						{
							appendItemStack(toSend, tertiaryInput);
						}
						toSend.append(" />");
					}

					toSend.append("<output ");
					{
						appendItemStack(toSend, output);
					}
					toSend.append(" />");
				}
				toSend.append("</alloying>");
			}
			toSend.append("</recipe>");
		}
		toSend.append("</enderio:recipes>");

		FMLInterModComms.sendMessage("enderio", "recipe:xml", toSend.toString());

		Log.info(toSend.toString());
	}

	private static void appendItemStack(StringBuilder sb, ItemStack stack)
	{
		if(stack != null)
		{
			sb.append(" name=\"" + stack.getItem().getRegistryName() + ":" + stack.getItemDamage() + "\" amount=\"" + stack.getCount() + "\"");
		}
	}
commented

Try one or both of these to find out why it's not working:

  • Set required="true" on the recipe. That will throw an error if the recipe cannot be registered for any reason.
  • Run the game with -DINDEV=1. That will output detailed log messages for the recipe system.
commented

Sry for the delay.
I tried both:

  • required = "true": Didn't do anything, just started normal.
  • -DINDEV=1: This did not throw an error either, instead it just shows me this:
[19:51:13] [main/INFO]: Processing IMC message recipe:xml from simplyjetpacks
[19:51:13] [main/INFO]: Processing IMC message recipe:xml from simplyjetpacks
[19:51:13] [main/INFO]: Processing IMC message recipe:xml from simplyjetpacks
[19:51:13] [main/INFO]: Processing IMC message recipe:xml from simplyjetpacks
[19:51:13] [main/INFO]: Processing IMC message recipe:soulbinder from simplyjetpacks

Which, as far as I understand it, means that everything is registered fine...

commented

With -DINDEV you should see a whole lot more lines, e.g.

[15:04:00] [main/INFO] [enderio]: INDEV: Skipping XML recipe 'Lumium Ball Smelting' (valid=false, active=true, required=false, disabled=false)
[15:04:00] [main/INFO] [enderio]: INDEV: Registering XML recipe 'Lumium Ball Reverse Casting'
[15:04:00] [main/WARN] [enderio]: TiC recipe is active, but TiC integration is not loaded
[15:04:00] [main/INFO] [enderio]: INDEV: Registering XML recipe 'Painted Pressure Plate, Dark Steel'
[15:04:00] [main/INFO] [enderio]: INDEV: Registering ShapedRecipe for 'Painted Pressure Plate, Dark Steel' as 'enderio:painted_pressure_plate_dark_steel': 1xtile.block_painted_pressure_plate@8: [OreIngredient [1xitem.item_alloy_ingot@6], OreIngredient [1xitem.item_alloy_ingot@6]]
[15:04:00] [main/INFO] [enderio]: INDEV: Registering XML recipe 'Painted Pressure Plate, Soularium'
[15:04:00] [main/INFO] [enderio]: INDEV: Registering ShapedRecipe for 'Painted Pressure Plate, Soularium' as 'enderio:painted_pressure_plate_soularium': 1xtile.block_painted_pressure_plate@10: [OreIngredient [1xitem.item_alloy_ingot@7], OreIngredient [1xitem.item_alloy_ingot@7]]
[15:04:00] [main/INFO] [enderio]: INDEV: Registering XML recipe 'Painted Pressure Plate, Wood, Silent'
[15:04:00] [main/INFO] [enderio]: INDEV: Registering ShapedRecipe for 'Painted Pressure Plate, Wood, Silent' as 'enderio:painted_pressure_plate_wood_silent': 1xtile.block_painted_pressure_plate@1: [Ingredient [1xtile.pressurePlateWood@0], Ingredient [1xtile.cloth@0]]
[15:04:00] [main/INFO] [enderio]: INDEV: Registering XML recipe 'Painted Pressure Plate, Stone, Silent'

Your recipe should be in there, too. Either as skipped or as registered...

commented

PS: Recipes are first collected from all sources (the log you posted), then registered (my log snippet). That is to allow recipe overriding.

commented

I searched in the log for a entry where they are either skipped or registered but cannot fin any.
The log: https://pastebin.com/aQcHC1p5
This is really weird as the SoulBinder recipe is working, though not showing in the log as registered...

commented

[19:51:14] [main/INFO]: INDEV: Registering XML recipe 'Dark Soularium Alloy'
image

got it...

For now send all recipes in one message. Next version will use a list inside that map...