-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
225 additions
and
186 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,9 @@ | ||
// -------------- | ||
// --- IMPORT --- | ||
// -------------- | ||
import mods.harkenscythe.Altar; | ||
mods.harkenscythe.bloodAltar.add(<minecraft:cobblestone>, <minecraft:gravel>, 42); | ||
|
||
// ----------- | ||
// --- ADD --- | ||
// ----------- | ||
// Altar.addBloodAltarRecipe(<input>, <output>, <requiredBlood>); | ||
// Altar.addSoulAltarRecipe(<input>, <output>, <requiredSouls>); | ||
// -------------- | ||
Altar.addBloodAltarRecipe(<minecraft:cobblestone>, <minecraft:gravel>, 42); | ||
Altar.addSoulAltarRecipe(<minecraft:gravel>, <minecraft:sand>, 69); | ||
mods.harkenscythe.bloodAltar.removeByInput(<minecraft:glass_bottle>); | ||
mods.harkenscythe.bloodAltar.removeByOutput(<harkenscythe:bloodweave_cloth>); | ||
|
||
// -------------- | ||
// --- REMOVE --- | ||
// -------------- | ||
// Altar.removeBloodAltarRecipe(<input>, <output>, <requiredBlood>); | ||
// Altar.removeSoulAltarRecipe(<input>, <output>, <requiredSouls>); | ||
// -------------- | ||
Altar.removeBloodAltarRecipe(<minecraft:glass_bottle>, <minecraft:dragon_breath>, 40); | ||
Altar.removeSoulAltarRecipe(<minecraft:cake>, <harkenscythe:soul_cake>, 10); | ||
mods.harkenscythe.soulAltar.add(<minecraft:gravel>, <minecraft:sand>, 69); | ||
|
||
mods.harkenscythe.soulAltar.removeByInput(<minecraft:cookie>); | ||
mods.harkenscythe.soulAltar.removeByOutput(<harkenscythe:soul_cake>); |
104 changes: 104 additions & 0 deletions
104
src/main/java/mod/emt/harkenscythe/compat/crafttweaker/HSCraftTweakerBloodAltarRecipes.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
package mod.emt.harkenscythe.compat.crafttweaker; | ||
|
||
import crafttweaker.CraftTweakerAPI; | ||
import crafttweaker.IAction; | ||
import crafttweaker.annotations.ZenRegister; | ||
import crafttweaker.api.item.IItemStack; | ||
import crafttweaker.api.minecraft.CraftTweakerMC; | ||
import mod.emt.harkenscythe.init.HSAltarRecipes; | ||
import stanhebben.zenscript.annotations.ZenClass; | ||
import stanhebben.zenscript.annotations.ZenMethod; | ||
|
||
@SuppressWarnings("unused") | ||
@ZenRegister | ||
@ZenClass("mods.harkenscythe.bloodAltar") | ||
public class HSCraftTweakerBloodAltarRecipes | ||
{ | ||
@ZenMethod | ||
public static void add(IItemStack input, IItemStack output, int requiredBlood) | ||
{ | ||
CraftTweakerAPI.apply(new AddAction(input, output, requiredBlood)); | ||
} | ||
|
||
@ZenMethod | ||
public static void removeByOutput(IItemStack output) | ||
{ | ||
CraftTweakerAPI.apply(new RemoveByOutputAction(output)); | ||
} | ||
|
||
@ZenMethod | ||
public static void removeByInput(IItemStack output) | ||
{ | ||
CraftTweakerAPI.apply(new RemoveByInputAction(output)); | ||
} | ||
|
||
private static class AddAction implements IAction | ||
{ | ||
private final IItemStack input; | ||
private final IItemStack output; | ||
private final int requiredBlood; | ||
|
||
public AddAction(IItemStack input, IItemStack output, int requiredBlood) | ||
{ | ||
this.input = input; | ||
this.output = output; | ||
this.requiredBlood = requiredBlood; | ||
} | ||
|
||
@Override | ||
public void apply() | ||
{ | ||
HSAltarRecipes.addBloodRecipe(CraftTweakerMC.getItemStack(input), CraftTweakerMC.getItemStack(output), requiredBlood); | ||
} | ||
|
||
@Override | ||
public String describe() | ||
{ | ||
return String.format("Adding Blood Altar recipe: %s -> %s with %d blood", input.toString(), output.toString(), requiredBlood); | ||
} | ||
} | ||
|
||
private static class RemoveByOutputAction implements IAction | ||
{ | ||
private final IItemStack output; | ||
|
||
public RemoveByOutputAction(IItemStack output) | ||
{ | ||
this.output = output; | ||
} | ||
|
||
@Override | ||
public void apply() | ||
{ | ||
HSAltarRecipes.removeBloodRecipeByOutput(CraftTweakerMC.getItemStack(output)); | ||
} | ||
|
||
@Override | ||
public String describe() | ||
{ | ||
return String.format("Removing all Blood Altar recipes with output %s", output.toString()); | ||
} | ||
} | ||
|
||
private static class RemoveByInputAction implements IAction | ||
{ | ||
private final IItemStack input; | ||
|
||
public RemoveByInputAction(IItemStack input) | ||
{ | ||
this.input = input; | ||
} | ||
|
||
@Override | ||
public void apply() | ||
{ | ||
HSAltarRecipes.removeBloodRecipeByInput(CraftTweakerMC.getItemStack(input)); | ||
} | ||
|
||
@Override | ||
public String describe() | ||
{ | ||
return String.format("Removing all Blood Altar recipes with input %s", input.toString()); | ||
} | ||
} | ||
} |
144 changes: 0 additions & 144 deletions
144
src/main/java/mod/emt/harkenscythe/compat/crafttweaker/HSCraftTweakerPlugin.java
This file was deleted.
Oops, something went wrong.
104 changes: 104 additions & 0 deletions
104
src/main/java/mod/emt/harkenscythe/compat/crafttweaker/HSCraftTweakerSoulAltarRecipes.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
package mod.emt.harkenscythe.compat.crafttweaker; | ||
|
||
import crafttweaker.CraftTweakerAPI; | ||
import crafttweaker.IAction; | ||
import crafttweaker.annotations.ZenRegister; | ||
import crafttweaker.api.item.IItemStack; | ||
import crafttweaker.api.minecraft.CraftTweakerMC; | ||
import mod.emt.harkenscythe.init.HSAltarRecipes; | ||
import stanhebben.zenscript.annotations.ZenClass; | ||
import stanhebben.zenscript.annotations.ZenMethod; | ||
|
||
@SuppressWarnings("unused") | ||
@ZenRegister | ||
@ZenClass("mods.harkenscythe.soulAltar") | ||
public class HSCraftTweakerSoulAltarRecipes | ||
{ | ||
@ZenMethod | ||
public static void add(IItemStack input, IItemStack output, int requiredSouls) | ||
{ | ||
CraftTweakerAPI.apply(new AddAction(input, output, requiredSouls)); | ||
} | ||
|
||
@ZenMethod | ||
public static void removeByOutput(IItemStack output) | ||
{ | ||
CraftTweakerAPI.apply(new RemoveByOutputAction(output)); | ||
} | ||
|
||
@ZenMethod | ||
public static void removeByInput(IItemStack output) | ||
{ | ||
CraftTweakerAPI.apply(new RemoveByInputAction(output)); | ||
} | ||
|
||
private static class AddAction implements IAction | ||
{ | ||
private final IItemStack input; | ||
private final IItemStack output; | ||
private final int requiredSouls; | ||
|
||
public AddAction(IItemStack input, IItemStack output, int requiredSouls) | ||
{ | ||
this.input = input; | ||
this.output = output; | ||
this.requiredSouls = requiredSouls; | ||
} | ||
|
||
@Override | ||
public void apply() | ||
{ | ||
HSAltarRecipes.addSoulRecipe(CraftTweakerMC.getItemStack(input), CraftTweakerMC.getItemStack(output), requiredSouls); | ||
} | ||
|
||
@Override | ||
public String describe() | ||
{ | ||
return String.format("Adding Soul Altar recipe: %s -> %s with %d souls", input.toString(), output.toString(), requiredSouls); | ||
} | ||
} | ||
|
||
private static class RemoveByOutputAction implements IAction | ||
{ | ||
private final IItemStack output; | ||
|
||
public RemoveByOutputAction(IItemStack output) | ||
{ | ||
this.output = output; | ||
} | ||
|
||
@Override | ||
public void apply() | ||
{ | ||
HSAltarRecipes.removeSoulRecipeByOutput(CraftTweakerMC.getItemStack(output)); | ||
} | ||
|
||
@Override | ||
public String describe() | ||
{ | ||
return String.format("Removing all Soul Altar recipes with output %s", output.toString()); | ||
} | ||
} | ||
|
||
private static class RemoveByInputAction implements IAction | ||
{ | ||
private final IItemStack input; | ||
|
||
public RemoveByInputAction(IItemStack input) | ||
{ | ||
this.input = input; | ||
} | ||
|
||
@Override | ||
public void apply() | ||
{ | ||
HSAltarRecipes.removeSoulRecipeByInput(CraftTweakerMC.getItemStack(input)); | ||
} | ||
|
||
@Override | ||
public String describe() | ||
{ | ||
return String.format("Removing all Soul Altar recipes with input %s", input.toString()); | ||
} | ||
} | ||
} |
Oops, something went wrong.