-
-
Notifications
You must be signed in to change notification settings - Fork 97
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
34 changed files
with
344 additions
and
75 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
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,10 @@ | ||
|
||
|
||
// change max damage aka durability aka number of tool uses like this | ||
|
||
val glove = <item:cyclic:glove_climb>; | ||
glove.maxDamage = 64; | ||
|
||
|
||
val wand = <item:cyclic:elevation_wand>; | ||
wand.maxDamage = 16; |
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,14 @@ | ||
// https://docs.blamejared.com/ | ||
// https://www.curseforge.com/minecraft/mc-mods/crafttweaker | ||
// use /ct dump fluids to see all fluid IDs | ||
|
||
var generator = <recipetype:cyclic:generator_fluid>; | ||
|
||
generator.removeRecipe("cyclic:generator/generate_xp"); | ||
generator.removeRecipe("cyclic:generator/generate_lava"); | ||
|
||
|
||
|
||
generator.addRecipe("zoldo", <fluid:minecraft:water>*250, 5, 10); | ||
|
||
generator.addRecipe("lava_tag", "minecraft:lava", 1000, 200, 500); |
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,12 @@ | ||
// https://docs.blamejared.com/ | ||
// https://www.curseforge.com/minecraft/mc-mods/crafttweaker | ||
// use /ct dump fluids to see all fluid IDs | ||
|
||
var generator = <recipetype:cyclic:generator_item>; | ||
|
||
// recipe IDS, not item ids | ||
generator.removeRecipe("cyclic:generator/generate_redstone"); | ||
generator.removeRecipe("cyclic:generator/generate_star"); | ||
|
||
// ID, input, output, RF per tick, ticks, bonus, percentage of bonus | ||
generator.addRecipe("zelda", <item:minecraft:diamond_block>, 500, 120); |
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
12 changes: 12 additions & 0 deletions
12
src/main/java/com/lothrazar/cyclic/compat/CompatConstants.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 |
---|---|---|
@@ -1,9 +1,21 @@ | ||
package com.lothrazar.cyclic.compat; | ||
|
||
import net.minecraft.util.ResourceLocation; | ||
|
||
public class CompatConstants { | ||
|
||
public static final String RESYNTH_GROWTH_STAGE = "growth_stage"; | ||
public static final String RESYNTH = "resynth"; | ||
public static final String CRAFTTWEAKER = "crafttweaker"; | ||
public static final String CURIOS = "curios"; | ||
public static final String TCONSTRUCT = "tconstruct"; | ||
// | ||
//compat with Repurposed Structures Mod see #1517 | ||
public static final String RS_MODID = "repurposed_structures"; | ||
public static final String RS_STRONGHOLD_ID = "stronghold_stonebrick"; | ||
public static final String RS_NETHER_STRONGHOLD_ID = "stronghold_nether"; | ||
public static final String YUSTRONG_MODID = "betterstrongholds"; // https://github.com/yungnickyoung/YUNGs-Better-Strongholds | ||
public static final ResourceLocation RS_RESOURCE_LOCATION = new ResourceLocation(RS_MODID, RS_STRONGHOLD_ID); | ||
public static final ResourceLocation RS_NETHER_RESOURCE_LOCATION = new ResourceLocation(RS_MODID, RS_NETHER_STRONGHOLD_ID); | ||
public static final ResourceLocation YUNG_STRONGHOLD_LOCATION = new ResourceLocation(YUSTRONG_MODID, "stronghold"); | ||
} |
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
57 changes: 57 additions & 0 deletions
57
src/main/java/com/lothrazar/cyclic/compat/crafttweaker/EnergyFluidZen.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,57 @@ | ||
package com.lothrazar.cyclic.compat.crafttweaker; | ||
|
||
import com.blamejared.crafttweaker.api.CraftTweakerAPI; | ||
import com.blamejared.crafttweaker.api.annotations.ZenRegister; | ||
import com.blamejared.crafttweaker.api.fluid.IFluidStack; | ||
import com.blamejared.crafttweaker.api.managers.IRecipeManager; | ||
import com.blamejared.crafttweaker.impl.actions.recipes.ActionAddRecipe; | ||
import com.lothrazar.cyclic.block.generatorfluid.RecipeGeneratorFluid; | ||
import com.lothrazar.cyclic.compat.CompatConstants; | ||
import com.lothrazar.cyclic.recipe.CyclicRecipeType; | ||
import com.lothrazar.cyclic.recipe.FluidTagIngredient; | ||
import net.minecraft.item.crafting.IRecipeType; | ||
import net.minecraft.util.ResourceLocation; | ||
import net.minecraftforge.fluids.FluidStack; | ||
import org.apache.logging.log4j.LogManager; | ||
import org.apache.logging.log4j.Logger; | ||
import org.openzen.zencode.java.ZenCodeType; | ||
|
||
@ZenRegister | ||
@ZenCodeType.Name("mods.cyclic.generator_fluid") | ||
public class EnergyFluidZen implements IRecipeManager { | ||
|
||
private final Logger logger = LogManager.getLogger(); | ||
|
||
@Override | ||
public IRecipeType<?> getRecipeType() { | ||
return CyclicRecipeType.GENERATOR_FLUID; | ||
} | ||
|
||
@SuppressWarnings("rawtypes") | ||
@ZenCodeType.Method | ||
public void addRecipe(String name, IFluidStack fluid, int rfPertick, int ticks) { | ||
name = fixRecipeName(name); | ||
RecipeGeneratorFluid m = new RecipeGeneratorFluid(new ResourceLocation(CompatConstants.CRAFTTWEAKER, name), | ||
new FluidTagIngredient(new FluidStack(fluid.getFluid(), 1), "", fluid.getAmount()), | ||
ticks, rfPertick); | ||
CraftTweakerAPI.apply(new ActionAddRecipe(this, m, "")); | ||
logger.debug("Recipe loaded " + m.getId().toString()); | ||
} | ||
|
||
@SuppressWarnings("rawtypes") | ||
@ZenCodeType.Method | ||
public void addRecipe(String name, String fluidTag, int amount, int rfPertick, int ticks) { | ||
name = fixRecipeName(name); | ||
RecipeGeneratorFluid m = new RecipeGeneratorFluid(new ResourceLocation(CompatConstants.CRAFTTWEAKER, name), | ||
new FluidTagIngredient(null, fluidTag, amount), | ||
ticks, rfPertick); | ||
CraftTweakerAPI.apply(new ActionAddRecipe(this, m, "")); | ||
logger.debug("Recipe (tag %s) loaded " + m.getId().toString(), fluidTag); | ||
} | ||
|
||
@ZenCodeType.Method | ||
public void removeRecipe(String names) { | ||
removeByName(names); | ||
logger.debug("Recipe removed " + names); | ||
} | ||
} |
42 changes: 42 additions & 0 deletions
42
src/main/java/com/lothrazar/cyclic/compat/crafttweaker/EnergyItemZen.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,42 @@ | ||
package com.lothrazar.cyclic.compat.crafttweaker; | ||
|
||
import com.blamejared.crafttweaker.api.CraftTweakerAPI; | ||
import com.blamejared.crafttweaker.api.annotations.ZenRegister; | ||
import com.blamejared.crafttweaker.api.item.IIngredient; | ||
import com.blamejared.crafttweaker.api.managers.IRecipeManager; | ||
import com.blamejared.crafttweaker.impl.actions.recipes.ActionAddRecipe; | ||
import com.lothrazar.cyclic.block.generatoritem.RecipeGeneratorItem; | ||
import com.lothrazar.cyclic.compat.CompatConstants; | ||
import com.lothrazar.cyclic.recipe.CyclicRecipeType; | ||
import net.minecraft.item.crafting.IRecipeType; | ||
import net.minecraft.util.ResourceLocation; | ||
import org.apache.logging.log4j.LogManager; | ||
import org.apache.logging.log4j.Logger; | ||
import org.openzen.zencode.java.ZenCodeType; | ||
|
||
@ZenRegister | ||
@ZenCodeType.Name("mods.cyclic.generator_item") | ||
public class EnergyItemZen implements IRecipeManager { | ||
|
||
private final Logger logger = LogManager.getLogger(); | ||
|
||
@Override | ||
public IRecipeType<?> getRecipeType() { | ||
return CyclicRecipeType.GENERATOR_ITEM; | ||
} | ||
|
||
@SuppressWarnings("rawtypes") | ||
@ZenCodeType.Method | ||
public void addRecipe(String name, IIngredient input, int rfPertick, int ticks) { | ||
name = fixRecipeName(name); | ||
RecipeGeneratorItem m = new RecipeGeneratorItem(new ResourceLocation(CompatConstants.CRAFTTWEAKER, name), input.asVanillaIngredient(), ticks, rfPertick); | ||
CraftTweakerAPI.apply(new ActionAddRecipe(this, m, "")); | ||
logger.debug("Recipe loaded " + m.getId().toString()); | ||
} | ||
|
||
@ZenCodeType.Method | ||
public void removeRecipe(String names) { | ||
removeByName(names); | ||
logger.debug("Recipe removed " + names); | ||
} | ||
} |
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
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
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
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
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
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
Oops, something went wrong.