New recipes + 1 nerf. Thanks to Ayutac.
* Improved readability of GrinderRecipesProvider * GrinderRecipesProvider: Sandstone recipes * GrinderRecipesProvider: added Sandstone recipes * fixed a generation bug * nerfed green dye from plantball * added armor stand extraction recipe * added book extraction recipe * added elytra extraction recipe * added shulker shell extraction recipe
This commit is contained in:
parent
037851ba3d
commit
80ee73ddab
10 changed files with 269 additions and 14 deletions
|
@ -25,6 +25,7 @@
|
||||||
package techreborn.datagen.recipes.machine.grinder
|
package techreborn.datagen.recipes.machine.grinder
|
||||||
|
|
||||||
import net.fabricmc.fabric.api.datagen.v1.FabricDataGenerator
|
import net.fabricmc.fabric.api.datagen.v1.FabricDataGenerator
|
||||||
|
import net.minecraft.item.Item
|
||||||
import net.minecraft.item.ItemStack
|
import net.minecraft.item.ItemStack
|
||||||
import net.minecraft.item.Items
|
import net.minecraft.item.Items
|
||||||
import net.minecraft.tag.TagKey
|
import net.minecraft.tag.TagKey
|
||||||
|
@ -40,7 +41,19 @@ class GrinderRecipesProvider extends TechRebornRecipesProvider {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
void generateRecipes() {
|
void generateRecipes() {
|
||||||
// vanilla raw metals
|
generateVanillaRawMetals()
|
||||||
|
generateTRRawMetals()
|
||||||
|
// vanilla gems
|
||||||
|
// TODO vanilla gems + storage blocks (Redstone, glowstone, lapis, emerald, diamond)
|
||||||
|
generateTRGems()
|
||||||
|
// vanilla ingots
|
||||||
|
// TODO vanilla ingots + storage blocks (iron, copper, gold)
|
||||||
|
generateTRIngots()
|
||||||
|
generateSand()
|
||||||
|
generateRedSand()
|
||||||
|
}
|
||||||
|
|
||||||
|
void generateVanillaRawMetals() {
|
||||||
[
|
[
|
||||||
(Items.RAW_IRON) : (TagKey.of(Registry.ITEM_KEY, new Identifier("c", "iron_ores"))),
|
(Items.RAW_IRON) : (TagKey.of(Registry.ITEM_KEY, new Identifier("c", "iron_ores"))),
|
||||||
(Items.RAW_COPPER): (TagKey.of(Registry.ITEM_KEY, new Identifier("c", "copper_ores"))),
|
(Items.RAW_COPPER): (TagKey.of(Registry.ITEM_KEY, new Identifier("c", "copper_ores"))),
|
||||||
|
@ -54,7 +67,9 @@ class GrinderRecipesProvider extends TechRebornRecipesProvider {
|
||||||
criterion getCriterionName(oreTag), getCriterionConditions(oreTag)
|
criterion getCriterionName(oreTag), getCriterionConditions(oreTag)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// TR raw metals
|
}
|
||||||
|
|
||||||
|
void generateTRRawMetals() {
|
||||||
TRContent.RawMetals.getRM2OBMap().each { raw, ore ->
|
TRContent.RawMetals.getRM2OBMap().each { raw, ore ->
|
||||||
if (!ore.isIndustrial())
|
if (!ore.isIndustrial())
|
||||||
offerGrinderRecipe {
|
offerGrinderRecipe {
|
||||||
|
@ -65,9 +80,9 @@ class GrinderRecipesProvider extends TechRebornRecipesProvider {
|
||||||
criterion getCriterionName(ore.asTag()), getCriterionConditions(ore.asTag())
|
criterion getCriterionName(ore.asTag()), getCriterionConditions(ore.asTag())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// vanilla gems
|
}
|
||||||
// TODO vanilla gems + storage blocks (Redstone, glowstone, lapis, emerald, diamond)
|
|
||||||
// TR gems
|
void generateTRGems() {
|
||||||
TRContent.Gems.getG2DMap().each {gem, dust ->
|
TRContent.Gems.getG2DMap().each {gem, dust ->
|
||||||
offerGrinderRecipe {
|
offerGrinderRecipe {
|
||||||
ingredients gem.asTag()
|
ingredients gem.asTag()
|
||||||
|
@ -95,9 +110,9 @@ class GrinderRecipesProvider extends TechRebornRecipesProvider {
|
||||||
criterion getCriterionName(gem.getStorageBlock().asTag()), getCriterionConditions(gem.getStorageBlock().asTag())
|
criterion getCriterionName(gem.getStorageBlock().asTag()), getCriterionConditions(gem.getStorageBlock().asTag())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// vanilla ingots
|
}
|
||||||
// TODO vanilla ingots + storage blocks (iron, copper, gold)
|
|
||||||
// TR ingots
|
void generateTRIngots() {
|
||||||
TRContent.Ingots.getI2DMap().each {ingot, dust ->
|
TRContent.Ingots.getI2DMap().each {ingot, dust ->
|
||||||
offerGrinderRecipe {
|
offerGrinderRecipe {
|
||||||
ingredients ingot.asTag()
|
ingredients ingot.asTag()
|
||||||
|
@ -117,4 +132,52 @@ class GrinderRecipesProvider extends TechRebornRecipesProvider {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void generateSand() {
|
||||||
|
[
|
||||||
|
(Items.SANDSTONE): 4,
|
||||||
|
(Items.SMOOTH_SANDSTONE): 4,
|
||||||
|
(Items.CUT_SANDSTONE) : 4,
|
||||||
|
(Items.CHISELED_SANDSTONE) :4,
|
||||||
|
(Items.SANDSTONE_STAIRS) : 3,
|
||||||
|
(Items.SMOOTH_SANDSTONE_STAIRS) : 3,
|
||||||
|
(Items.SANDSTONE_WALL) : 3,
|
||||||
|
(Items.SANDSTONE_SLAB) : 2,
|
||||||
|
(Items.CUT_SANDSTONE_SLAB) : 2,
|
||||||
|
(Items.SMOOTH_SANDSTONE_SLAB) : 2,
|
||||||
|
].each {item, count ->
|
||||||
|
offerGrinderRecipe {
|
||||||
|
ingredients item
|
||||||
|
outputs new ItemStack(Items.SAND, count)
|
||||||
|
power count
|
||||||
|
time 200
|
||||||
|
source item.toString()
|
||||||
|
criterion getCriterionName(item), getCriterionConditions(item)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void generateRedSand() {
|
||||||
|
[
|
||||||
|
(Items.RED_SANDSTONE): 4,
|
||||||
|
(Items.SMOOTH_RED_SANDSTONE): 4,
|
||||||
|
(Items.CUT_RED_SANDSTONE) : 4,
|
||||||
|
(Items.CHISELED_RED_SANDSTONE) :4,
|
||||||
|
(Items.RED_SANDSTONE_STAIRS) : 3,
|
||||||
|
(Items.SMOOTH_RED_SANDSTONE_STAIRS) : 3,
|
||||||
|
(Items.RED_SANDSTONE_WALL) : 3,
|
||||||
|
(Items.RED_SANDSTONE_SLAB) : 2,
|
||||||
|
(Items.CUT_RED_SANDSTONE_SLAB) : 2,
|
||||||
|
(Items.SMOOTH_RED_SANDSTONE_SLAB) : 2,
|
||||||
|
].each {item, count ->
|
||||||
|
offerGrinderRecipe {
|
||||||
|
ingredients item
|
||||||
|
outputs new ItemStack(Items.RED_SAND, count)
|
||||||
|
power count
|
||||||
|
time 200
|
||||||
|
source item.toString()
|
||||||
|
criterion getCriterionName(item), getCriterionConditions(item)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -0,0 +1,32 @@
|
||||||
|
{
|
||||||
|
"parent": "minecraft:recipes/root",
|
||||||
|
"rewards": {
|
||||||
|
"recipes": [
|
||||||
|
"techreborn:extractor/paper_from_book"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"criteria": {
|
||||||
|
"has_book": {
|
||||||
|
"trigger": "minecraft:inventory_changed",
|
||||||
|
"conditions": {
|
||||||
|
"items": [
|
||||||
|
{
|
||||||
|
"items": ["minecraft:book"]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"has_the_recipe": {
|
||||||
|
"trigger": "minecraft:recipe_unlocked",
|
||||||
|
"conditions": {
|
||||||
|
"recipe": "techreborn:extractor/paper_from_book"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"requirements": [
|
||||||
|
[
|
||||||
|
"has_book",
|
||||||
|
"has_the_recipe"
|
||||||
|
]
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,32 @@
|
||||||
|
{
|
||||||
|
"parent": "minecraft:recipes/root",
|
||||||
|
"rewards": {
|
||||||
|
"recipes": [
|
||||||
|
"techreborn:extractor/phantom_membrane_from_elytra"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"criteria": {
|
||||||
|
"has_elytra": {
|
||||||
|
"trigger": "minecraft:inventory_changed",
|
||||||
|
"conditions": {
|
||||||
|
"items": [
|
||||||
|
{
|
||||||
|
"items": ["minecraft:elytra"]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"has_the_recipe": {
|
||||||
|
"trigger": "minecraft:recipe_unlocked",
|
||||||
|
"conditions": {
|
||||||
|
"recipe": "techreborn:extractor/phantom_membrane_from_elytra"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"requirements": [
|
||||||
|
[
|
||||||
|
"has_elytra",
|
||||||
|
"has_the_recipe"
|
||||||
|
]
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,32 @@
|
||||||
|
{
|
||||||
|
"parent": "minecraft:recipes/root",
|
||||||
|
"rewards": {
|
||||||
|
"recipes": [
|
||||||
|
"techreborn:extractor/purple_dye_from_shulker_shell"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"criteria": {
|
||||||
|
"has_shulker_shell": {
|
||||||
|
"trigger": "minecraft:inventory_changed",
|
||||||
|
"conditions": {
|
||||||
|
"items": [
|
||||||
|
{
|
||||||
|
"items": ["minecraft:shulker_shell"]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"has_the_recipe": {
|
||||||
|
"trigger": "minecraft:recipe_unlocked",
|
||||||
|
"conditions": {
|
||||||
|
"recipe": "techreborn:extractor/purple_dye_from_shulker_shell"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"requirements": [
|
||||||
|
[
|
||||||
|
"has_shulker_shell",
|
||||||
|
"has_the_recipe"
|
||||||
|
]
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,32 @@
|
||||||
|
{
|
||||||
|
"parent": "minecraft:recipes/root",
|
||||||
|
"rewards": {
|
||||||
|
"recipes": [
|
||||||
|
"techreborn:extractor/sticks_from_armor_stand"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"criteria": {
|
||||||
|
"has_armor_stand": {
|
||||||
|
"trigger": "minecraft:inventory_changed",
|
||||||
|
"conditions": {
|
||||||
|
"items": [
|
||||||
|
{
|
||||||
|
"items": ["minecraft:armor_stand"]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"has_the_recipe": {
|
||||||
|
"trigger": "minecraft:recipe_unlocked",
|
||||||
|
"conditions": {
|
||||||
|
"recipe": "techreborn:extractor/sticks_from_armor_stand"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"requirements": [
|
||||||
|
[
|
||||||
|
"has_armor_stand",
|
||||||
|
"has_the_recipe"
|
||||||
|
]
|
||||||
|
]
|
||||||
|
}
|
|
@ -10,7 +10,7 @@
|
||||||
"results": [
|
"results": [
|
||||||
{
|
{
|
||||||
"item": "minecraft:green_dye",
|
"item": "minecraft:green_dye",
|
||||||
"count": 2
|
"count": 1
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
|
@ -0,0 +1,16 @@
|
||||||
|
{
|
||||||
|
"type": "techreborn:extractor",
|
||||||
|
"power": 10,
|
||||||
|
"time": 200,
|
||||||
|
"ingredients": [
|
||||||
|
{
|
||||||
|
"item": "minecraft:book"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"results": [
|
||||||
|
{
|
||||||
|
"item": "minecraft:paper",
|
||||||
|
"count": 2
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,16 @@
|
||||||
|
{
|
||||||
|
"type": "techreborn:extractor",
|
||||||
|
"power": 10,
|
||||||
|
"time": 300,
|
||||||
|
"ingredients": [
|
||||||
|
{
|
||||||
|
"item": "minecraft:elytra"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"results": [
|
||||||
|
{
|
||||||
|
"item": "minecraft:phantom_membrane",
|
||||||
|
"count": 2
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,16 @@
|
||||||
|
{
|
||||||
|
"type": "techreborn:extractor",
|
||||||
|
"power": 10,
|
||||||
|
"time": 400,
|
||||||
|
"ingredients": [
|
||||||
|
{
|
||||||
|
"item": "minecraft:shulker_shell"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"results": [
|
||||||
|
{
|
||||||
|
"item": "minecraft:purple_dye",
|
||||||
|
"count": 4
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,16 @@
|
||||||
|
{
|
||||||
|
"type": "techreborn:extractor",
|
||||||
|
"power": 10,
|
||||||
|
"time": 300,
|
||||||
|
"ingredients": [
|
||||||
|
{
|
||||||
|
"item": "minecraft:armor_stand"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"results": [
|
||||||
|
{
|
||||||
|
"item": "minecraft:stick",
|
||||||
|
"count": 3
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue