New recipes (#2917)
* Added assembling colored beds via machine * Added pufferfish extraction for sponge piece. Including toast and also added missing toast for sponge piece (see #2883) * Added painting tool -> 1 string extraction * Added sticky piston -> slime ball extraction * Improved two recipe names incl. toasts * Added smelting glass panes back to glass * Added anvil uncrafting * Added bow/crossbow -> String via extraction * Added cobble->black & bars->ingot blast furnace recipes
This commit is contained in:
parent
deef1f3330
commit
1fc34f1786
25 changed files with 504 additions and 4 deletions
|
@ -26,6 +26,7 @@ package techreborn.datagen
|
|||
|
||||
import net.fabricmc.fabric.api.datagen.v1.DataGeneratorEntrypoint
|
||||
import net.fabricmc.fabric.api.datagen.v1.FabricDataGenerator
|
||||
import techreborn.datagen.recipes.machine.assembling_machine.AssemblingMachineRecipesProvider
|
||||
import techreborn.datagen.recipes.machine.blast_furnace.BlastFurnaceRecipesProvider
|
||||
import techreborn.datagen.recipes.machine.chemical_reactor.ChemicalReactorRecipesProvider
|
||||
import techreborn.datagen.recipes.machine.compressor.CompressorRecipesProvider
|
||||
|
@ -54,6 +55,7 @@ class TechRebornDataGen implements DataGeneratorEntrypoint {
|
|||
fabricDataGenerator.addProvider(CompressorRecipesProvider.&new)
|
||||
fabricDataGenerator.addProvider(ExtractorRecipesProvider.&new)
|
||||
fabricDataGenerator.addProvider(ChemicalReactorRecipesProvider.&new)
|
||||
fabricDataGenerator.addProvider(AssemblingMachineRecipesProvider.&new)
|
||||
fabricDataGenerator.addProvider(BlastFurnaceRecipesProvider.&new)
|
||||
fabricDataGenerator.addProvider(IndustrialGrinderRecipesProvider.&new)
|
||||
fabricDataGenerator.addProvider(IndustrialSawmillRecipesProvider.&new)
|
||||
|
|
|
@ -142,6 +142,10 @@ abstract class TechRebornRecipesProvider extends FabricRecipeProvider {
|
|||
MachineRecipeJsonFactory.create(ModRecipes.CHEMICAL_REACTOR, closure).offerTo(exporter)
|
||||
}
|
||||
|
||||
def offerAssemblingMachineRecipe(@DelegatesTo(value = MachineRecipeJsonFactory.class, strategy = Closure.DELEGATE_FIRST) Closure closure) {
|
||||
MachineRecipeJsonFactory.create(ModRecipes.ASSEMBLING_MACHINE, closure).offerTo(exporter)
|
||||
}
|
||||
|
||||
def offerBlastFurnaceRecipe(@DelegatesTo(value = BlastFurnaceRecipeJsonFactory.class, strategy = Closure.DELEGATE_FIRST) Closure closure) {
|
||||
BlastFurnaceRecipeJsonFactory.createBlastFurnace(closure).offerTo(exporter)
|
||||
}
|
||||
|
|
|
@ -30,6 +30,7 @@ import net.minecraft.advancement.criterion.CriterionConditions
|
|||
import net.minecraft.data.server.recipe.RecipeJsonProvider
|
||||
import net.minecraft.item.ItemConvertible
|
||||
import net.minecraft.item.ItemStack
|
||||
import net.minecraft.recipe.Ingredient
|
||||
import net.minecraft.recipe.RecipeSerializer
|
||||
import net.minecraft.tag.TagKey
|
||||
import net.minecraft.util.Identifier
|
||||
|
@ -82,6 +83,7 @@ class MachineRecipeJsonFactory<R extends RebornRecipe> {
|
|||
ingredient {
|
||||
stack object
|
||||
}
|
||||
|
||||
} else {
|
||||
throw new IllegalArgumentException()
|
||||
}
|
||||
|
|
|
@ -0,0 +1,74 @@
|
|||
/*
|
||||
* This file is part of TechReborn, licensed under the MIT License (MIT).
|
||||
*
|
||||
* Copyright (c) 2020 TechReborn
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
package techreborn.datagen.recipes.machine.assembling_machine
|
||||
|
||||
import net.fabricmc.fabric.api.datagen.v1.FabricDataGenerator
|
||||
import net.minecraft.item.ItemStack
|
||||
import net.minecraft.item.Items
|
||||
import net.minecraft.tag.ItemTags
|
||||
import techreborn.datagen.recipes.TechRebornRecipesProvider
|
||||
|
||||
class AssemblingMachineRecipesProvider extends TechRebornRecipesProvider {
|
||||
|
||||
AssemblingMachineRecipesProvider(FabricDataGenerator dataGenerator) {
|
||||
super(dataGenerator)
|
||||
}
|
||||
|
||||
@Override
|
||||
void generateRecipes() {
|
||||
generateBed()
|
||||
}
|
||||
|
||||
void generateBed() {
|
||||
[
|
||||
(Items.BLACK_WOOL): Items.BLACK_BED,
|
||||
(Items.BLUE_WOOL): Items.BLUE_BED,
|
||||
(Items.BROWN_WOOL): Items.BROWN_BED,
|
||||
(Items.CYAN_WOOL): Items.CYAN_BED,
|
||||
(Items.GRAY_WOOL): Items.GRAY_BED,
|
||||
(Items.GREEN_WOOL): Items.GREEN_BED,
|
||||
(Items.LIGHT_BLUE_WOOL): Items.LIGHT_BLUE_BED,
|
||||
(Items.LIGHT_GRAY_WOOL): Items.LIGHT_GRAY_BED,
|
||||
(Items.LIME_WOOL): Items.LIME_BED,
|
||||
(Items.MAGENTA_WOOL): Items.MAGENTA_BED,
|
||||
(Items.ORANGE_WOOL): Items.ORANGE_BED,
|
||||
(Items.PINK_WOOL): Items.PINK_BED,
|
||||
(Items.PURPLE_WOOL): Items.PURPLE_BED,
|
||||
(Items.RED_WOOL): Items.RED_BED,
|
||||
(Items.WHITE_DYE): Items.WHITE_BED,
|
||||
(Items.YELLOW_DYE): Items.YELLOW_BED
|
||||
].each {(wool, bed) ->
|
||||
offerAssemblingMachineRecipe {
|
||||
ingredients new ItemStack(wool, 2), ItemTags.PLANKS
|
||||
output bed
|
||||
source "wool"
|
||||
power 25
|
||||
time 250
|
||||
criterion getCriterionName(wool), getCriterionConditions(wool)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -55,6 +55,8 @@ class BlastFurnaceRecipesProvider extends TechRebornRecipesProvider {
|
|||
generateHoe()
|
||||
generateAxe()
|
||||
generatePickaxe()
|
||||
generateGlassFromGlassPane()
|
||||
generateAnvil()
|
||||
}
|
||||
|
||||
void generateBoots() {
|
||||
|
@ -253,4 +255,54 @@ class BlastFurnaceRecipesProvider extends TechRebornRecipesProvider {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
void generateGlassFromGlassPane() {
|
||||
[
|
||||
(Items.GLASS_PANE) : Items.GLASS,
|
||||
(Items.BLACK_STAINED_GLASS_PANE) : Items.BLACK_STAINED_GLASS,
|
||||
(Items.BLUE_STAINED_GLASS_PANE) : Items.BLACK_STAINED_GLASS,
|
||||
(Items.BROWN_STAINED_GLASS_PANE) : Items.BROWN_STAINED_GLASS,
|
||||
(Items.CYAN_STAINED_GLASS_PANE) : Items.CYAN_STAINED_GLASS,
|
||||
(Items.GRAY_STAINED_GLASS_PANE) : Items.GRAY_STAINED_GLASS,
|
||||
(Items.GREEN_STAINED_GLASS_PANE) : Items.GREEN_STAINED_GLASS,
|
||||
(Items.LIGHT_BLUE_STAINED_GLASS_PANE) : Items.LIGHT_BLUE_STAINED_GLASS,
|
||||
(Items.LIGHT_GRAY_STAINED_GLASS_PANE) : Items.LIGHT_GRAY_STAINED_GLASS,
|
||||
(Items.LIME_STAINED_GLASS_PANE) : Items.LIME_STAINED_GLASS,
|
||||
(Items.MAGENTA_STAINED_GLASS_PANE) : Items.MAGENTA_STAINED_GLASS,
|
||||
(Items.ORANGE_STAINED_GLASS_PANE) : Items.ORANGE_STAINED_GLASS,
|
||||
(Items.PINK_STAINED_GLASS_PANE) : Items.PINK_STAINED_GLASS,
|
||||
(Items.PURPLE_STAINED_GLASS_PANE) : Items.PURPLE_STAINED_GLASS,
|
||||
(Items.RED_STAINED_GLASS_PANE) : Items.RED_STAINED_GLASS,
|
||||
(Items.WHITE_STAINED_GLASS_PANE) : Items.WHITE_STAINED_GLASS,
|
||||
(Items.YELLOW_STAINED_GLASS_PANE) : Items.YELLOW_STAINED_GLASS
|
||||
].each {(pane,glass) ->
|
||||
offerBlastFurnaceRecipe {
|
||||
ingredients new ItemStack(pane, 10)
|
||||
outputs new ItemStack(glass, 3)
|
||||
power 128
|
||||
time 150
|
||||
heat 1000
|
||||
source "glass_pane"
|
||||
criterion getCriterionName(pane), getCriterionConditions(pane)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void generateAnvil() {
|
||||
[
|
||||
(Items.ANVIL) : 12,
|
||||
(Items.CHIPPED_ANVIL) : 9,
|
||||
(Items.DAMAGED_ANVIL) : 6,
|
||||
].each {(anvil,amount) ->
|
||||
offerBlastFurnaceRecipe {
|
||||
ingredients anvil, new ItemStack(Items.SAND, 2)
|
||||
outputs new ItemStack(Items.IRON_INGOT, amount), new ItemStack(TRContent.Dusts.DARK_ASHES, 2)
|
||||
power 128
|
||||
time 300
|
||||
heat 1500
|
||||
source "anvil_gives_"+amount
|
||||
criterion getCriterionName(anvil), getCriterionConditions(anvil)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
{
|
||||
"parent": "minecraft:recipes/root",
|
||||
"rewards": {
|
||||
"recipes": [
|
||||
"techreborn:blast_furnace/blackstone"
|
||||
]
|
||||
},
|
||||
"criteria": {
|
||||
"has_cobblestone": {
|
||||
"trigger": "minecraft:inventory_changed",
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": ["minecraft:cobblestone"]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"has_the_recipe": {
|
||||
"trigger": "minecraft:recipe_unlocked",
|
||||
"conditions": {
|
||||
"recipe": "techreborn:blast_furnace/blackstone"
|
||||
}
|
||||
}
|
||||
},
|
||||
"requirements": [
|
||||
[
|
||||
"has_cobblestone",
|
||||
"has_the_recipe"
|
||||
]
|
||||
]
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
{
|
||||
"parent": "minecraft:recipes/root",
|
||||
"rewards": {
|
||||
"recipes": [
|
||||
"techreborn:blast_furnace/iron_ingot"
|
||||
]
|
||||
},
|
||||
"criteria": {
|
||||
"has_iron_bars": {
|
||||
"trigger": "minecraft:inventory_changed",
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": ["minecraft:iron_bars"]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"has_the_recipe": {
|
||||
"trigger": "minecraft:recipe_unlocked",
|
||||
"conditions": {
|
||||
"recipe": "techreborn:blast_furnace/iron_ingot"
|
||||
}
|
||||
}
|
||||
},
|
||||
"requirements": [
|
||||
[
|
||||
"has_iron_bars",
|
||||
"has_the_recipe"
|
||||
]
|
||||
]
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
{
|
||||
"parent": "minecraft:recipes/root",
|
||||
"rewards": {
|
||||
"recipes": [
|
||||
"techreborn:extractor/slime_ball_from_sticky_piston"
|
||||
]
|
||||
},
|
||||
"criteria": {
|
||||
"has_sticky_piston": {
|
||||
"trigger": "minecraft:inventory_changed",
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": ["minecraft:sticky_piston"]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"has_the_recipe": {
|
||||
"trigger": "minecraft:recipe_unlocked",
|
||||
"conditions": {
|
||||
"recipe": "techreborn:extractor/slime_ball_from_sticky_piston"
|
||||
}
|
||||
}
|
||||
},
|
||||
"requirements": [
|
||||
[
|
||||
"has_sticky_piston",
|
||||
"has_the_recipe"
|
||||
]
|
||||
]
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
{
|
||||
"parent": "minecraft:recipes/root",
|
||||
"rewards": {
|
||||
"recipes": [
|
||||
"techreborn:extractor/sponge_piece_from_cod"
|
||||
]
|
||||
},
|
||||
"criteria": {
|
||||
"has_cod": {
|
||||
"trigger": "minecraft:inventory_changed",
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": ["minecraft:cod"]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"has_the_recipe": {
|
||||
"trigger": "minecraft:recipe_unlocked",
|
||||
"conditions": {
|
||||
"recipe": "techreborn:extractor/sponge_piece_from_cod"
|
||||
}
|
||||
}
|
||||
},
|
||||
"requirements": [
|
||||
[
|
||||
"has_cod",
|
||||
"has_the_recipe"
|
||||
]
|
||||
]
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
{
|
||||
"parent": "minecraft:recipes/root",
|
||||
"rewards": {
|
||||
"recipes": [
|
||||
"techreborn:extractor/sponge_piece_from_pufferfish"
|
||||
]
|
||||
},
|
||||
"criteria": {
|
||||
"has_pufferfish": {
|
||||
"trigger": "minecraft:inventory_changed",
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": ["minecraft:pufferfish"]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"has_the_recipe": {
|
||||
"trigger": "minecraft:recipe_unlocked",
|
||||
"conditions": {
|
||||
"recipe": "techreborn:extractor/sponge_piece_from_pufferfish"
|
||||
}
|
||||
}
|
||||
},
|
||||
"requirements": [
|
||||
[
|
||||
"has_pufferfish",
|
||||
"has_the_recipe"
|
||||
]
|
||||
]
|
||||
}
|
|
@ -2,7 +2,7 @@
|
|||
"parent": "minecraft:recipes/root",
|
||||
"rewards": {
|
||||
"recipes": [
|
||||
"techreborn:extractor/sticks_from_armor_stand"
|
||||
"techreborn:extractor/stick_from_armor_stand"
|
||||
]
|
||||
},
|
||||
"criteria": {
|
||||
|
@ -19,7 +19,7 @@
|
|||
"has_the_recipe": {
|
||||
"trigger": "minecraft:recipe_unlocked",
|
||||
"conditions": {
|
||||
"recipe": "techreborn:extractor/sticks_from_armor_stand"
|
||||
"recipe": "techreborn:extractor/stick_from_armor_stand"
|
||||
}
|
||||
}
|
||||
},
|
|
@ -2,7 +2,7 @@
|
|||
"parent": "minecraft:recipes/root",
|
||||
"rewards": {
|
||||
"recipes": [
|
||||
"techreborn:extractor/stick"
|
||||
"techreborn:extractor/stick_from_dead_bush"
|
||||
]
|
||||
},
|
||||
"criteria": {
|
||||
|
@ -19,7 +19,7 @@
|
|||
"has_the_recipe": {
|
||||
"trigger": "minecraft:recipe_unlocked",
|
||||
"conditions": {
|
||||
"recipe": "techreborn:extractor/stick"
|
||||
"recipe": "techreborn:extractor/stick_from_dead_bush"
|
||||
}
|
||||
}
|
||||
},
|
|
@ -0,0 +1,32 @@
|
|||
{
|
||||
"parent": "minecraft:recipes/root",
|
||||
"rewards": {
|
||||
"recipes": [
|
||||
"techreborn:extractor/string_from_bow"
|
||||
]
|
||||
},
|
||||
"criteria": {
|
||||
"has_bow": {
|
||||
"trigger": "minecraft:inventory_changed",
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": ["minecraft:bow"]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"has_the_recipe": {
|
||||
"trigger": "minecraft:recipe_unlocked",
|
||||
"conditions": {
|
||||
"recipe": "techreborn:extractor/string_from_bow"
|
||||
}
|
||||
}
|
||||
},
|
||||
"requirements": [
|
||||
[
|
||||
"has_bow",
|
||||
"has_the_recipe"
|
||||
]
|
||||
]
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
{
|
||||
"parent": "minecraft:recipes/root",
|
||||
"rewards": {
|
||||
"recipes": [
|
||||
"techreborn:extractor/string_from_crossbow"
|
||||
]
|
||||
},
|
||||
"criteria": {
|
||||
"has_crossbow": {
|
||||
"trigger": "minecraft:inventory_changed",
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": ["minecraft:crossbow"]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"has_the_recipe": {
|
||||
"trigger": "minecraft:recipe_unlocked",
|
||||
"conditions": {
|
||||
"recipe": "techreborn:extractor/string_from_crossbow"
|
||||
}
|
||||
}
|
||||
},
|
||||
"requirements": [
|
||||
[
|
||||
"has_crossbow",
|
||||
"has_the_recipe"
|
||||
]
|
||||
]
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
{
|
||||
"parent": "minecraft:recipes/root",
|
||||
"rewards": {
|
||||
"recipes": [
|
||||
"techreborn:extractor/string_from_painting_tool"
|
||||
]
|
||||
},
|
||||
"criteria": {
|
||||
"has_painting_tool": {
|
||||
"trigger": "minecraft:inventory_changed",
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": ["techreborn:painting_tool"]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"has_the_recipe": {
|
||||
"trigger": "minecraft:recipe_unlocked",
|
||||
"conditions": {
|
||||
"recipe": "techreborn:extractor/string_from_painting_tool"
|
||||
}
|
||||
}
|
||||
},
|
||||
"requirements": [
|
||||
[
|
||||
"has_painting_tool",
|
||||
"has_the_recipe"
|
||||
]
|
||||
]
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"type": "techreborn:blast_furnace",
|
||||
"power": 128,
|
||||
"time": 100,
|
||||
"heat": 3000,
|
||||
"ingredients": [
|
||||
{
|
||||
"item": "minecraft:cobblestone"
|
||||
}
|
||||
],
|
||||
"results": [
|
||||
{
|
||||
"item": "minecraft:blackstone"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"type": "techreborn:blast_furnace",
|
||||
"power": 128,
|
||||
"time": 200,
|
||||
"heat": 1000,
|
||||
"ingredients": [
|
||||
{
|
||||
"item": "minecraft:iron_bars",
|
||||
"count": 5
|
||||
}
|
||||
],
|
||||
"results": [
|
||||
{
|
||||
"item": "minecraft:iron_ingot"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"type": "techreborn:extractor",
|
||||
"power": 10,
|
||||
"time": 300,
|
||||
"ingredients": [
|
||||
{
|
||||
"item": "minecraft:sticky_piston"
|
||||
}
|
||||
],
|
||||
"results": [
|
||||
{
|
||||
"item": "minecraft:slime_ball"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"type": "techreborn:extractor",
|
||||
"power": 10,
|
||||
"time": 1000,
|
||||
"ingredients" : [
|
||||
{
|
||||
"item": "minecraft:pufferfish",
|
||||
"count": 32
|
||||
}
|
||||
],
|
||||
"results" : [
|
||||
{
|
||||
"item": "techreborn:sponge_piece"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"type": "techreborn:extractor",
|
||||
"power": 10,
|
||||
"time": 300,
|
||||
"ingredients": [
|
||||
{
|
||||
"item": "minecraft:bow"
|
||||
}
|
||||
],
|
||||
"results": [
|
||||
{
|
||||
"item": "minecraft:string"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"type": "techreborn:extractor",
|
||||
"power": 10,
|
||||
"time": 300,
|
||||
"ingredients": [
|
||||
{
|
||||
"item": "minecraft:crossbow"
|
||||
}
|
||||
],
|
||||
"results": [
|
||||
{
|
||||
"item": "minecraft:string"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"type": "techreborn:extractor",
|
||||
"power": 10,
|
||||
"time": 150,
|
||||
"ingredients": [
|
||||
{
|
||||
"item": "techreborn:painting_tool"
|
||||
}
|
||||
],
|
||||
"results": [
|
||||
{
|
||||
"item": "minecraft:string",
|
||||
"count": 1
|
||||
}
|
||||
]
|
||||
}
|
Loading…
Add table
Reference in a new issue