mirror of
https://github.com/GTNewHorizons/CraftTweaker.git
synced 2026-11-21 12:32:29 +00:00
Close #14
This commit is contained in:
1 parent
a426d8da79
commit
262cf310e4
5 files changed
+906
-830
No files matched your search
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,24 @@
|
||||
package minetweaker.api.recipes;
|
||||
|
||||
import minetweaker.api.item.IItemStack;
|
||||
|
||||
/**
|
||||
* Created by Jared on 4/18/2016.
|
||||
*/
|
||||
public class FurnaceRecipe implements IFurnaceRecipe {
|
||||
private final IItemStack input;
|
||||
private final IItemStack output;
|
||||
private final float xp;
|
||||
|
||||
public FurnaceRecipe(IItemStack input, IItemStack output, float xp) {
|
||||
this.input = input;
|
||||
this.output = output;
|
||||
this.xp = xp;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toCommandString() {
|
||||
return String.format("furnace.addRecipe(%s, %s, %s", output, input, xp);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -10,8 +10,11 @@ import minetweaker.api.item.IIngredient;
|
||||
import minetweaker.api.item.IItemStack;
|
||||
import stanhebben.zenscript.annotations.Optional;
|
||||
import stanhebben.zenscript.annotations.ZenClass;
|
||||
import stanhebben.zenscript.annotations.ZenGetter;
|
||||
import stanhebben.zenscript.annotations.ZenMethod;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Stan
|
||||
@@ -29,4 +32,12 @@ public interface IFurnaceManager {
|
||||
|
||||
@ZenMethod
|
||||
public int getFuel(IItemStack item);
|
||||
|
||||
/**
|
||||
* Returns all crafting recipes.
|
||||
*
|
||||
* @return all crafting recipes
|
||||
*/
|
||||
@ZenGetter("all")
|
||||
public List<IFurnaceRecipe> getAll();
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package minetweaker.api.recipes;
|
||||
|
||||
/**
|
||||
* Created by Jared on 4/18/2016.
|
||||
*/
|
||||
public interface IFurnaceRecipe {
|
||||
|
||||
|
||||
public String toCommandString();
|
||||
}
|
||||
Reference in new issue
Block a user