Used TagConvertible for all smelting recipes.
This commit is contained in:
parent
5b4dec0cc3
commit
4952cee268
2 changed files with 17 additions and 66 deletions
|
@ -31,7 +31,6 @@ import net.minecraft.item.Items
|
|||
import net.minecraft.recipe.CookingRecipeSerializer
|
||||
import net.minecraft.recipe.RecipeSerializer
|
||||
import techreborn.datagen.recipes.TechRebornRecipesProvider
|
||||
import techreborn.datagen.tags.CommonTags
|
||||
import techreborn.init.TRContent
|
||||
|
||||
class SmeltingRecipesProvider extends TechRebornRecipesProvider {
|
||||
|
@ -43,22 +42,22 @@ class SmeltingRecipesProvider extends TechRebornRecipesProvider {
|
|||
void generateRecipes() {
|
||||
// Add smelting and blasting recipes.
|
||||
[
|
||||
(TRContent.Ingots.MIXED_METAL) : TRContent.Ingots.ADVANCED_ALLOY,
|
||||
(TRContent.Ingots.MIXED_METAL.asTag()) : TRContent.Ingots.ADVANCED_ALLOY,
|
||||
(TRContent.Dusts.BRASS.asTag()) : TRContent.Ingots.BRASS,
|
||||
(TRContent.Dusts.BRONZE) : TRContent.Ingots.BRONZE,
|
||||
(TRContent.Dusts.BRONZE.asTag()) : TRContent.Ingots.BRONZE,
|
||||
(TRContent.Dusts.ELECTRUM.asTag()) : TRContent.Ingots.ELECTRUM,
|
||||
(TRContent.Dusts.INVAR) : TRContent.Ingots.INVAR,
|
||||
(CommonTags.Items.leadOres) : TRContent.Ingots.LEAD,
|
||||
(CommonTags.Items.rawLeadOres) : TRContent.Ingots.LEAD,
|
||||
(TRContent.Dusts.NICKEL) : TRContent.Ingots.NICKEL,
|
||||
(CommonTags.Items.sheldoniteOres) : TRContent.Ingots.PLATINUM,
|
||||
(TRContent.Dusts.INVAR.asTag()) : TRContent.Ingots.INVAR,
|
||||
(TRContent.Ores.LEAD.asTag()) : TRContent.Ingots.LEAD,
|
||||
(TRContent.RawMetals.LEAD.asTag()) : TRContent.Ingots.LEAD,
|
||||
(TRContent.Dusts.NICKEL.asTag()) : TRContent.Ingots.NICKEL,
|
||||
(TRContent.Ores.SHELDONITE.asTag()) : TRContent.Ingots.PLATINUM,
|
||||
(TRContent.Dusts.PLATINUM.asTag()) : TRContent.Ingots.PLATINUM,
|
||||
(Items.IRON_INGOT) : TRContent.Ingots.REFINED_IRON,
|
||||
(CommonTags.Items.ironPlates) : TRContent.Plates.REFINED_IRON,
|
||||
(CommonTags.Items.silverOres) : TRContent.Ingots.SILVER,
|
||||
(CommonTags.Items.rawSilverOres) : TRContent.Ingots.SILVER,
|
||||
(CommonTags.Items.tinOres) : TRContent.Ingots.TIN,
|
||||
(CommonTags.Items.rawTinOres) : TRContent.Ingots.TIN,
|
||||
(TRContent.Plates.IRON.asTag()) : TRContent.Plates.REFINED_IRON,
|
||||
(TRContent.Ores.SILVER.asTag()) : TRContent.Ingots.SILVER,
|
||||
(TRContent.RawMetals.SILVER.asTag()) : TRContent.Ingots.SILVER,
|
||||
(TRContent.Ores.TIN.asTag()) : TRContent.Ingots.TIN,
|
||||
(TRContent.RawMetals.TIN.asTag()) : TRContent.Ingots.TIN,
|
||||
(TRContent.Dusts.ZINC.asTag()) : TRContent.Ingots.ZINC
|
||||
].each { input, output ->
|
||||
offerSmelting(input, output)
|
||||
|
|
|
@ -1,48 +0,0 @@
|
|||
/*
|
||||
* 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.tags
|
||||
|
||||
import net.fabricmc.fabric.api.tag.TagFactory
|
||||
import net.minecraft.util.Identifier
|
||||
|
||||
class CommonTags {
|
||||
static class Items {
|
||||
|
||||
public static leadOres = create("lead_ores")
|
||||
public static sheldoniteOres = create("sheldonite_ores")
|
||||
public static silverOres = create("silver_ores")
|
||||
public static tinOres = create("tin_ores")
|
||||
|
||||
public static rawLeadOres = create("raw_lead_ores")
|
||||
public static rawSilverOres = create("raw_silver_ores")
|
||||
public static rawTinOres = create("raw_tin_ores")
|
||||
|
||||
public static ironPlates = create("iron_plates")
|
||||
|
||||
private static def create(String path) {
|
||||
return TagFactory.ITEM.create(new Identifier("c", path))
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue