Skip to content

Commit

Permalink
feat: add recipes for primal stones
Browse files Browse the repository at this point in the history
fixes #1672
  • Loading branch information
artdude543 committed Aug 16, 2018
1 parent f8ee94e commit abcff62
Show file tree
Hide file tree
Showing 6 changed files with 189 additions and 33 deletions.
1 change: 1 addition & 0 deletions src/config/mputils/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ should not be repairable anyways using this method. (#2925)
* Fixed raw pigman pelt processing recipe (#2912)
* Fixed Content Tweaker ores only working in quartz grindstone (#3147)
* Fixed custom Geolosys Ores generating in un-wanted dimensions (#2184)
* Added recipes for Priaml cosmetic stones (#1672)

Enhancements:
* Disabled more Cyclic Enhancements not needed for this pack.
Expand Down
66 changes: 64 additions & 2 deletions src/scripts/crafttweaker/events/blockBreak.zs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,68 @@ static blockHarvestDrops as IItemStack[][string] = {
],
"twilightforest:castle_door:3": [
<twilightforest:castle_door:3>
],

// Primal Stones (When broken should drop the cobble not the stone)
"primal:blue_stone" : [
<primal:blue_stone:4>
],
"primal:common_stone": [
<primal:common_stone:4>
],
"primal:sarsen_stone": [
<primal:sarsen_stone:4>
],
"primal:scoria_stone": [
<primal:scoria_stone:4>
],
"primal:porphyry_stone": [
<primal:porphyry_stone:4>
],
"primal:purpurite_stone": [
<primal:purpurite_stone:4>
],
"primal:ferro_stone": [
<primal:ferro_stone:4>
],
"primal:carbonate_stone": [
<primal:carbonate_stone:4>
],
"primal:terracotta_block": [
<primal:terracotta_block:4>
],
"primal:mud_dried": [
<primal:mud_dried:4>
],
"primal:nether_earth": [
<primal:nether_earth:4>
],
"primal:nether_stone": [
<primal:nether_stone:4>
],
"primal:eroded_end_stone": [
<primal:eroded_end_stone:4>
],
"primal:desiccated_stone": [
<primal:desiccated_stone:4>
],
"primal:soul_stone": [
<primal:soul_stone:4>
],
"primal:night_stone": [
<primal:night_stone:4>
],
"primal:ciniscotta_block": [
<primal:ciniscotta_block:4>
],
"primal:ortho_stone": [
<primal:ortho_stone:4>
],
"primal:schist_green_stone": [
<primal:schist_green_stone:4>
],
"primal:schist_blue_stone": [
<primal:schist_blue_stone:4>
]
};

Expand All @@ -47,13 +109,13 @@ static blockHarvestDrops as IItemStack[][string] = {
*/
function init() {
events.onBlockHarvestDrops(function (event as BlockHarvestDropsEvent) {
var blockHarvestDrops = scripts.crafttweaker.events.blockBreak.blockHarvestDrops;

var blockId = event.block.definition.id;
if (event.block.meta != 0) {
blockId += ":" ~ event.block.meta;
}

print(blockId);

// Skip overrides if the block is silk touched
if (event.silkTouch) {
return;
Expand Down
3 changes: 2 additions & 1 deletion src/scripts/crafttweaker/postInit.zs
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,8 @@ function initRecipes() {
scripts.crafttweaker.recipes.mods.pickletweaks.init();
scripts.crafttweaker.recipes.mods.pneumaticcraft.init();
scripts.crafttweaker.recipes.mods.poweradapters.init();
scripts.crafttweaker.recipes.mods.primal.init();
scripts.crafttweaker.recipes.mods.primal.core.init();
scripts.crafttweaker.recipes.mods.primal.stones.init();
scripts.crafttweaker.recipes.mods.primalchests.init();
scripts.crafttweaker.recipes.mods.primaltech.init();
scripts.crafttweaker.recipes.mods.progressiontweaks.init();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -545,14 +545,36 @@ static furnaceRecipes as IIngredient[][IItemStack] = {
/*
Recipe Removals
*/
static removeRecipes as IIngredient[] = [
static removeRecipes as IItemStack[] = [
<primal:leather_cordage:0>,
<primal:slab_ironwood:0>,
<primal:smelter:2>.withTag({type: "cinis"}),
<primal:smelter:1>.withTag({type: "terra"}),
<primal:smelter:0>.withTag({type: "mud"}),
<primal:smelter:*>,
<primal:thatching_wet:0>
<primal:thatching_wet:0>,
// Remove all the Wall Recipes to be sure about the mod adding them somehow.
<primal:wall:*>,
<primal:common_stone:*>,
<primal:sarsen_stone:*>,
<primal:blue_stone:*>,
<primal:ortho_stone:*>,
<primal:schist_green_stone:*>,
<primal:schist_blue_stone:*>,
<primal:scoria_stone:*>,
<primal:purpurite_stone:*>,
<primal:ferro_stone:*>,
<primal:carbonate_stone:*>,
<primal:nether_stone:*>,
<primal:eroded_end_stone:*>,
<primal:soul_stone:*>,
<primal:terracotta_block:*>,
<primal:ciniscotta_block:*>,
<primal:desiccated_stone:*>,
<primal:mud_dried:*>,
<primal:nether_earth:*>,
<primal:night_stone:*>,
<primal:porphyry_stone:*>
];

static removeRegex as string[] = [
Expand All @@ -571,24 +593,6 @@ static removeFurnace as IIngredient[] = [
];

function init() {
// Un-named recipes
var shapedRecipes as IIngredient[][][][IItemStack] = scripts.crafttweaker.recipes.mods.primal.shapedRecipes;
var mirroredRecipes as IIngredient[][][][IItemStack] = scripts.crafttweaker.recipes.mods.primal.mirroredRecipes;
var shapelessRecipes as IIngredient[][][IItemStack] = scripts.crafttweaker.recipes.mods.primal.shapelessRecipes;

// Named recipes
var namedShapedRecipes as IIngredient[][][][string][IItemStack] = scripts.crafttweaker.recipes.mods.primal.namedShapedRecipes;
var namedMirroredRecipes as IIngredient[][][][string][IItemStack] = scripts.crafttweaker.recipes.mods.primal.namedMirroredRecipes;
var namedShapelessRecipes as IIngredient[][][string][IItemStack] = scripts.crafttweaker.recipes.mods.primal.namedShapelessRecipes;

// Furnace recipes
var furnaceRecipes as IIngredient[][IItemStack] = scripts.crafttweaker.recipes.mods.primal.furnaceRecipes;

var removeRegex as string[] = scripts.crafttweaker.recipes.mods.primal.removeRegex;
var removeRecipes as IItemStack[] = scripts.crafttweaker.recipes.mods.primal.removeRecipes;
var removeFurnace as IIngredient[] = scripts.crafttweaker.recipes.mods.primal.removeFurnace;


// Un-named recipes
recipeUtil.process(shapedRecipes, false);
recipeUtil.process(mirroredRecipes, true);
Expand Down
89 changes: 89 additions & 0 deletions src/scripts/crafttweaker/recipes/mods/primal/stones.zs
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
/*
SevTech: Ages Resources Primal Stone Script
As Primal Core does not seem to have any recipes for the Primal Stones. We'll add our own recipes.
Note: These scripts are created and for the usage in SevTech: Ages and other
modpacks curated by DarkPacks. You can use these scripts for reference and for
learning but not for copying and pasting and claiming as your own.
*/
import crafttweaker.item.IItemStack;

import mods.chisel.Carving;

static primalStones as IItemStack[string] = {
"common_stone": <primal:common_stone>,
"sarsen_stone": <primal:sarsen_stone>,
"blue_stone": <primal:blue_stone>,
"ortho_stone": <primal:ortho_stone>,
"schist_green_stone": <primal:schist_green_stone>,
"schist_blue_stone": <primal:schist_blue_stone>,
"scoria_stone": <primal:scoria_stone>,
"purpurite_stone": <primal:purpurite_stone>,
"ferro_stone": <primal:ferro_stone>,
"carbonate_stone": <primal:carbonate_stone>,
"nether_stone": <primal:nether_stone>,
"eroded_end_stone": <primal:eroded_end_stone>,
"soul_stone": <primal:soul_stone>,
"terracotta_block": <primal:terracotta_block>,

// These stones don't have walls.
"ciniscotta_block": <primal:ciniscotta_block>,
"desiccated_stone": <primal:desiccated_stone>,
"mud_dried": <primal:mud_dried>,
"nether_earth": <primal:nether_earth>,
"night_stone": <primal:night_stone>,
"porphyry_stone": <primal:porphyry_stone>,
};

static primalWalls as IItemStack[string] = {
"common_stone": <primal:wall>,
"sarsen_stone": <primal:wall:1>,
"blue_stone": <primal:wall:2>,
"ortho_stone": <primal:wall:3>,
"schist_green_stone": <primal:wall:4>,
"schist_blue_stone": <primal:wall:5>,
"scoria_stone": <primal:wall:6>,
"purpurite_stone": <primal:wall:7>,
"ferro_stone": <primal:wall:8>,
"carbonate_stone": <primal:wall:9>,
"nether_stone": <primal:wall:10>,
"eroded_end_stone": <primal:wall:11>,
"soul_stone": <primal:wall:12>,
"terracotta_block": <primal:wall:14>
};

/*
Primal Stones have 8 sub-blocks they are all the same for all stone "types". So that in mind this script will
create recipes for all the types and assign the processing recipes also. So they are all be crafted/smelted etc...
*/
function init() {
for name, stone in primalStones {
// Smelting Recipe
furnace.addRecipe(stone, stone.definition.makeStack(4));
// Smooth Stone
furnace.addRecipe(stone.definition.makeStack(1), stone);
// Stacked Recipe
recipes.addShaped(stone.definition.makeStack(2).name, stone.definition.makeStack(2), [[stone], [stone]]);
// Brick Recipe
recipes.addShaped(stone.definition.makeStack(3).name, stone.definition.makeStack(3), [[stone, stone], [stone, stone]]);
// Chisel Handling.
Carving.addGroup(name);
Carving.addVariation(name, stone.definition.makeStack(1)); // Smooth (Once you have smooth you can convert between the three listed)
Carving.addVariation(name, stone.definition.makeStack(5)); // Chiseled
Carving.addVariation(name, stone.definition.makeStack(6)); // Mysterious
// Pillar
recipes.addShaped(stone.definition.makeStack(7).name, stone.definition.makeStack(7) * 6, [
[stone, null, stone],
[stone, null, stone],
[stone, null, stone]
]);
// Wall (Only for certain stones)
if (!isNull(primalWalls[name])) {
recipes.addShaped(primalWalls[name].name, primalWalls[name] * 6, [
[stone, stone, stone],
[stone, stone, stone]
]);
}
}
}
19 changes: 9 additions & 10 deletions src/scripts/crafttweaker/staging/itemsAndRecipes/mods/primal.zs
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ static stagedItems as IIngredient[][string] = {
<primal:blue_stone:4>,
<primal:blue_stone:5>,
<primal:blue_stone:6>,
<primal:carbonate_stone:0>,
<primal:carbonate_stone:1>,
<primal:carbonate_stone:2>,
<primal:carbonate_stone:3>,
Expand All @@ -92,6 +93,13 @@ static stagedItems as IIngredient[][string] = {
<primal:cheese_white:0>,
<primal:chum:0>,
<primal:ciniscotta_block:0>,
<primal:ciniscotta_block:1>,
<primal:ciniscotta_block:2>,
<primal:ciniscotta_block:3>,
<primal:ciniscotta_block:4>,
<primal:ciniscotta_block:5>,
<primal:ciniscotta_block:6>,
<primal:ciniscotta_block:7>,
<primal:common_stone:0>,
<primal:common_stone:1>,
<primal:common_stone:2>,
Expand Down Expand Up @@ -389,7 +397,6 @@ static stagedItems as IIngredient[][string] = {
stageTwo.stage: [
<primal:blue_stone:7>,
<primal:carbonate_stone:7>,
<primal:ciniscotta_block:7>,
<primal:common_stone:7>,
<primal:desiccated_stone:7>,
<primal:ferro_stone:7>,
Expand Down Expand Up @@ -488,6 +495,7 @@ static stagedItems as IIngredient[][string] = {
<primal:slab_netherearth:0>,
<primal:slab_netherrack:0>,
<primal:slab_netherstone:0>,
<primal:soul_stone:0>,
<primal:soul_stone:1>,
<primal:soul_stone:2>,
<primal:soul_stone:3>,
Expand Down Expand Up @@ -651,7 +659,6 @@ static hiddenItems as IIngredient[] = [
<primal:brickform:0>,
<primal:carbon_plate:0>,
<primal:carbonate_slack:0>,
<primal:carbonate_stone:0>,
<primal:carpet_cineris:0>,
<primal:carpet_inanis:0>,
<primal:cauldron:0>,
Expand All @@ -673,13 +680,6 @@ static hiddenItems as IIngredient[] = [
<primal:charcoal_stack:4>,
<primal:cinisclay_block:0>,
<primal:cinisclay_clump:0>,
<primal:ciniscotta_block:1>,
<primal:ciniscotta_block:2>,
<primal:ciniscotta_block:3>,
<primal:ciniscotta_block:4>,
<primal:ciniscotta_block:5>,
<primal:ciniscotta_block:6>,
<primal:ciniscotta_block:7>,
<primal:ciniscotta_brick:0>,
<primal:copper_saw:0>,
<primal:copper_strand:0>,
Expand Down Expand Up @@ -895,7 +895,6 @@ static hiddenItems as IIngredient[] = [
<primal:smelter_lid_terra:0>,
<primal:smoke:0>,
<primal:soul_residue:0>,
<primal:soul_stone:0>,
<primal:stairs_carbonate_flag:0>,
<primal:stairs_ferro_flag:0>,
<primal:stairs_lacquer:0>,
Expand Down

0 comments on commit abcff62

Please sign in to comment.