codetaylor / pyrotech-1.12

An early game mod with new primitive devices, combustion machines, smelting mechanics, storage options, tools, torches, advancements, and absolutely zero GUIs -- with exception to the substantially complete, mostly illustrated, and charred guidebook.
https://pyrotech.readthedocs.io/en/latest/
Other
52 stars 19 forks source link

Soaking pot above campfire zs #335

Closed KupetcBakaleyshikEmgirVarEmreys closed 3 years ago

KupetcBakaleyshikEmgirVarEmreys commented 3 years ago

Hello, i wrote this message by using a Google translator cause my English not really good (Im from Ukraine). At last mod update (1.5.5) it was written what i can specify that soaking pot should require a campfire underneath to start recipe. I tried make recipe leather from hide in wood tar also with campfire, but crafttweaker constantly displaying a message:

[SERVER_STARTED][SERVER][INFO] Loading scripts for loader with names [crafttweaker | recipeevent]
[SERVER_STARTED][SERVER][INFO] [crafttweaker | SIDE_CLIENT]: Loading Script: {[0:crafttweaker]: leather.zs}
[SERVER_STARTED][SERVER][ERROR] leather.zs:7 > bool type has no static members
[SERVER_STARTED][SERVER][INFO] Completed script loading in: 2ms

The script i used:

import mods.pyrotech.SoakingPot;

SoakingPot.addRecipe("leather1", 
<minecraft:leather>, 
<liquid:wood_tar> * 250, 
<faunaandecology:hide_sheep_white>, 
requiresCampfire, 
8 * 60 * 20);

I know it maybe a really stupid question but I really dont understand how should i write this "boolean requiresCampfire" just because pyrotech documentation it's just written like this:

static void addRecipe(
  string name,              // unique recipe name
  IItemStack output,        // recipe output
  ILiquidStack inputFluid,  // input fluid
  IIngredient inputItem,    // input item
  boolean requiresCampfire, // needs to be above a campfire
  int timeTicks             // recipe duration in ticks
);

I don't know much about programming so i dont understand why this thing is not works

codetaylor commented 3 years ago

The requiresCampfire parameter is a boolean which means that it needs to be either true or false:

import mods.pyrotech.SoakingPot;

SoakingPot.addRecipe("leather1", 
<minecraft:leather>, 
<liquid:wood_tar> * 250, 
<faunaandecology:hide_sheep_white>, 
true, 
8 * 60 * 20);
KupetcBakaleyshikEmgirVarEmreys commented 3 years ago

really so easy? i even guessed thats true but but i was doing it on version 1.5.3 so it didnt worked, I thought what was wrong here. I feel really stupid myself 😣😣😣. But thanks for help.

codetaylor commented 3 years ago

You're welcome.

There was a bug that was recently fixed in 1.5.5 that caused the parameter to always be false even when set to true. That's why it wasn't working correctly 1.5.3. 😄