Skip to content

Commit 7d5e41a

Browse files
authored
Merge pull request #552 from M0nkeyPr0grammer/main
New Metalworks Casting Recipes and AE2 Addon crushing recipes
2 parents 753b2ca + 89134c9 commit 7d5e41a

File tree

3 files changed

+95
-36
lines changed

3 files changed

+95
-36
lines changed
Lines changed: 41 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,51 @@
11
// This File has been authored by AllTheMods Staff, or a Community contributor for use in AllTheMods - AllTheMods 10.
22
// As all AllTheMods packs are licensed under All Rights Reserved, this file is not allowed to be used in any public packs not released by the AllTheMods Team, without explicit permission.
33

4-
ServerEvents.recipes((allthemods) => {
5-
//Create crushing recipes
6-
let crushingIngredients = [
7-
"#c:deepslate_blocks",
8-
"minecraft:end_stone",
9-
"minecraft:blackstone",
10-
"minecraft:sand",
11-
"minecraft:netherrack",
12-
"exdeorum:crushed_netherrack"
13-
].map((ing) => Ingredient.of(ing))
4+
ServerEvents.recipes(allthemods => {
145

15-
let crushingResults = [
16-
"exdeorum:crushed_deepslate",
17-
"exdeorum:crushed_end_stone",
18-
"exdeorum:crushed_blackstone",
19-
"exdeorum:dust",
20-
"exdeorum:crushed_netherrack",
21-
"create:cinder_flour"
22-
].map((stack) => Item.of(stack))
6+
//Create crushing recipes
7+
let crushingIngredients = [
8+
"#c:deepslate_blocks",
9+
"minecraft:end_stone",
10+
"minecraft:blackstone",
11+
"minecraft:sand",
12+
"minecraft:netherrack",
13+
"exdeorum:crushed_netherrack",
14+
"extendedae:entro_crystal",
15+
"advanced_ae:shattered_singularity"
16+
].map(ing => Ingredient.of(ing))
2317

24-
/**
25-
* @param {Internal.Ingredient[]} ingredients
26-
* @param {Internal.ItemStack[]} results
27-
*/
28-
function crushing(ingredients, results) {
29-
const recipe = {
30-
type: "create:crushing",
31-
ingredients: ingredients,
32-
results: results
33-
}
18+
let crushingResults = [
19+
"exdeorum:crushed_deepslate",
20+
"exdeorum:crushed_end_stone",
21+
"exdeorum:crushed_blackstone",
22+
"exdeorum:dust",
23+
"exdeorum:crushed_netherrack",
24+
'create:cinder_flour',
25+
"extendedae:entro_dust",
26+
"advanced_ae:quantum_infused_dust"
27+
].map(stack => Item.of(stack))
3428

35-
let idType = ingredients[0].toJson().asMap().item || ingredients[0].toJson().asMap().tag
36-
const defaultId = `allthemods:create/crushing/${idType.getAsString().split(":")[1]}`
37-
allthemods.custom(recipe).id(defaultId)
38-
}
29+
/**
30+
* @param {Internal.Ingredient[]} ingredients
31+
* @param {Internal.ItemStack[]} results
32+
*/
33+
function crushing(ingredients, results) {
34+
const recipe = {
35+
type: "create:crushing",
36+
ingredients: ingredients,
37+
results: results
38+
}
39+
40+
let idType = ingredients[0].toJson().asMap().item || ingredients[0].toJson().asMap().tag
41+
const defaultId = `allthemods:create/crushing/${idType.getAsString().split(":")[1]}`
42+
allthemods.custom(recipe).id(defaultId)
43+
}
3944

40-
for (let i = 0; i < crushingIngredients.length; i++) {
41-
crushing([crushingIngredients[i]], [crushingResults[i]])
42-
}
45+
for (let i = 0; i < crushingIngredients.length; i++) {
46+
crushing([crushingIngredients[i]], [crushingResults[i]])
47+
}
4348
})
4449

4550
// This File has been authored by AllTheMods Staff, or a Community contributor for use in AllTheMods - AllTheMods 10.
46-
// As all AllTheMods packs are licensed under All Rights Reserved, this file is not allowed to be used in any public packs not released by the AllTheMods Team, without explicit permission.
51+
// As all AllTheMods packs are licensed under All Rights Reserved, this file is not allowed to be used in any public packs not released by the AllTheMods Team, without explicit permission.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
ServerEvents.recipes(event =>
2+
{
3+
// Map of block casting recipes
4+
const blockCastingItems = [
5+
{ name: 'coal', id: 'minecraft:coal_block', fluid: 'productivemetalworks:molten_carbon', amount: 900 },
6+
{ name: 'quartz', id: 'minecraft:quartz_block', fluid: 'productivemetalworks:molten_quartz', amount: 400 }
7+
]
8+
9+
blockCastingItems.forEach(item => {
10+
event.custom({
11+
type: 'productivemetalworks:block_casting',
12+
cast: [],
13+
consume_cast: false,
14+
fluid: {
15+
amount: item.amount,
16+
fluid: item.fluid
17+
},
18+
result: {
19+
count: 1,
20+
id: item.id
21+
}
22+
}).id(`allthemods:metalworks/casting/block/${item.name}`)
23+
})
24+
}
25+
)
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
ServerEvents.recipes(event =>
2+
{
3+
// Molten Fluids to Gem Casting Recipes
4+
const gemCastingItems = [
5+
{ name: 'glowstone', id: 'minecraft:glowstone_dust', fluid: 'productivemetalworks:molten_glowstone' },
6+
{ name: 'redstone', id: 'minecraft:redstone', fluid: 'productivemetalworks:molten_redstone' },
7+
{ name: 'coal', id: 'minecraft:coal', fluid: 'productivemetalworks:molten_carbon' },
8+
{ name: 'shulker', id: 'minecraft:shulker_shell', fluid: 'productivemetalworks:molten_shulker_shell' }
9+
]
10+
11+
gemCastingItems.forEach(item => {
12+
event.custom({
13+
type: 'productivemetalworks:item_casting',
14+
cast: {
15+
item: 'productivemetalworks:gem_cast'
16+
},
17+
consume_cast: false,
18+
fluid: {
19+
amount: 100,
20+
fluid: item.fluid
21+
},
22+
result: {
23+
count: 1,
24+
id: item.id
25+
}
26+
}).id(`allthemods:metalworks/casting/gem/${item.name}`)
27+
})
28+
}
29+
)

0 commit comments

Comments
 (0)