update to create 6.0.7 and cleanup tag handling

This commit is contained in:
Frizi
2025-10-31 04:59:48 +01:00
parent ec8d92bb77
commit a1e4d51e21
17 changed files with 17 additions and 41 deletions

View File

@@ -1,6 +0,0 @@
{
"values": [
"tfmg:concrete",
"tfmg:rebar_concrete"
]
}

View File

@@ -1,6 +0,0 @@
{
"values": [
"tfmg:concrete",
"tfmg:rebar_concrete"
]
}

View File

@@ -2,8 +2,6 @@
"values": [ "values": [
"tfmg:sulfur_dust", "tfmg:sulfur_dust",
"tfmg:nitrate_dust", "tfmg:nitrate_dust",
"tfmg:rubber_sheet",
"tfmg:silicon_ingot",
"tfmg:coal_coke_dust" "tfmg:coal_coke_dust"
] ]
} }

View File

@@ -7,6 +7,7 @@
"tfmg:lead_ingot", "tfmg:lead_ingot",
"tfmg:nickel_ingot", "tfmg:nickel_ingot",
"tfmg:constantan_ingot", "tfmg:constantan_ingot",
"tfmg:lithium_ingot" "tfmg:lithium_ingot",
"tfmg:silicon_ingot"
] ]
} }

View File

@@ -2,7 +2,7 @@
"type": "tfmg:casting", "type": "tfmg:casting",
"ingredients": [ "ingredients": [
{ {
"type": "fluid_stack", "type": "neoforge:single",
"amount": 144, "amount": 144,
"fluid": "tfmg:liquid_concrete" "fluid": "tfmg:liquid_concrete"
} }

View File

@@ -3,7 +3,7 @@
"heat_requirement": "heated", "heat_requirement": "heated",
"ingredients": [ "ingredients": [
{ {
"type": "fluid_stack", "type": "neoforge:single",
"amount": 1000, "amount": 1000,
"fluid": "tfmg:heavy_oil" "fluid": "tfmg:heavy_oil"
} }

View File

@@ -5,7 +5,7 @@
"item": "minecraft:bucket" "item": "minecraft:bucket"
}, },
{ {
"type": "fluid_stack", "type": "neoforge:single",
"amount": 1000, "amount": 1000,
"fluid": "tfmg:air" "fluid": "tfmg:air"
} }

View File

@@ -5,7 +5,7 @@
"item": "minecraft:bucket" "item": "minecraft:bucket"
}, },
{ {
"type": "fluid_stack", "type": "neoforge:single",
"amount": 1000, "amount": 1000,
"fluid": "tfmg:carbon_dioxide" "fluid": "tfmg:carbon_dioxide"
} }

View File

@@ -5,7 +5,7 @@
"item": "minecraft:bucket" "item": "minecraft:bucket"
}, },
{ {
"type": "fluid_stack", "type": "neoforge:single",
"amount": 1000, "amount": 1000,
"fluid": "tfmg:ethylene" "fluid": "tfmg:ethylene"
} }

View File

@@ -2,12 +2,12 @@
"type": "create:mixing", "type": "create:mixing",
"ingredients": [ "ingredients": [
{ {
"type": "fluid_stack", "type": "neoforge:single",
"amount": 250, "amount": 250,
"fluid": "minecraft:water" "fluid": "minecraft:water"
}, },
{ {
"type": "fluid_stack", "type": "neoforge:single",
"amount": 1000, "amount": 1000,
"fluid": "tfmg:ethylene" "fluid": "tfmg:ethylene"
} }

View File

@@ -5,7 +5,7 @@
"item": "minecraft:copper_ingot" "item": "minecraft:copper_ingot"
}, },
{ {
"type": "fluid_stack", "type": "neoforge:single",
"amount": 500, "amount": 500,
"fluid": "tfmg:sulfuric_acid" "fluid": "tfmg:sulfuric_acid"
} }

View File

@@ -3,7 +3,6 @@
"ingredient": { "ingredient": {
"tag": "c:plates/steel" "tag": "c:plates/steel"
}, },
"loops": 1,
"results": [ "results": [
{ {
"count": 4, "count": 4,

View File

@@ -15,7 +15,7 @@
"item": "tfmg:limesand" "item": "tfmg:limesand"
}, },
{ {
"type": "fluid_stack", "type": "neoforge:single",
"amount": 250, "amount": 250,
"fluid": "minecraft:water" "fluid": "minecraft:water"
} }

View File

@@ -5,7 +5,7 @@
"item": "tfmg:coated_circuit_board" "item": "tfmg:coated_circuit_board"
}, },
{ {
"type": "fluid_stack", "type": "neoforge:single",
"amount": 250, "amount": 250,
"fluid": "tfmg:sulfuric_acid" "fluid": "tfmg:sulfuric_acid"
} }

View File

@@ -37,7 +37,6 @@ import net.neoforged.neoforge.fluids.FluidStack;
import net.neoforged.neoforge.fluids.capability.IFluidHandler; import net.neoforged.neoforge.fluids.capability.IFluidHandler;
import net.neoforged.neoforge.fluids.capability.templates.FluidTank; import net.neoforged.neoforge.fluids.capability.templates.FluidTank;
import javax.annotation.Nullable;
import java.util.List; import java.util.List;
@@ -112,8 +111,8 @@ public class BlastStoveBlockEntity extends FluidTankBlockEntity implements IHave
if ((primaryOutputInventory.isEmpty() || primaryOutputInventory.getFluid().isFluidEqual(recipe.getPrimaryResult())) && (secondaryOutputInventory.isEmpty() || secondaryOutputInventory.getFluid().isFluidEqual(recipe.getSecondaryResult()))) { if ((primaryOutputInventory.isEmpty() || primaryOutputInventory.getFluid().isFluidEqual(recipe.getPrimaryResult())) && (secondaryOutputInventory.isEmpty() || secondaryOutputInventory.getFluid().isFluidEqual(recipe.getSecondaryResult()))) {
primaryInputInventory.setFluid(new FluidStack(primaryInputInventory.getFluid().copy().getFluidHolder(), primaryInputInventory.getFluidAmount() - recipe.getPrimaryIngredient().getRequiredAmount())); primaryInputInventory.setFluid(new FluidStack(primaryInputInventory.getFluid().copy().getFluidHolder(), primaryInputInventory.getFluidAmount() - recipe.getPrimaryIngredient().amount()));
secondaryInputInventory.setFluid(new FluidStack(secondaryInputInventory.getFluid().copy().getFluidHolder(), secondaryInputInventory.getFluidAmount() - recipe.getSecondaryIngredient().getRequiredAmount())); secondaryInputInventory.setFluid(new FluidStack(secondaryInputInventory.getFluid().copy().getFluidHolder(), secondaryInputInventory.getFluidAmount() - recipe.getSecondaryIngredient().amount()));
primaryOutputInventory.setFluid(new FluidStack(recipe.getPrimaryResult().getFluidHolder(), primaryOutputInventory.getFluidAmount() + recipe.getPrimaryResult().getAmount())); primaryOutputInventory.setFluid(new FluidStack(recipe.getPrimaryResult().getFluidHolder(), primaryOutputInventory.getFluidAmount() + recipe.getPrimaryResult().getAmount()));

View File

@@ -14,7 +14,6 @@ import com.simibubi.create.foundation.recipe.RecipeConditions;
import com.simibubi.create.foundation.recipe.RecipeFinder; import com.simibubi.create.foundation.recipe.RecipeFinder;
import net.createmod.catnip.animation.LerpedFloat; import net.createmod.catnip.animation.LerpedFloat;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.core.HolderLookup; import net.minecraft.core.HolderLookup;
import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.CompoundTag;
import net.minecraft.network.chat.Component; import net.minecraft.network.chat.Component;
@@ -28,13 +27,8 @@ import net.neoforged.neoforge.fluids.FluidStack;
import net.neoforged.neoforge.fluids.capability.IFluidHandler; import net.neoforged.neoforge.fluids.capability.IFluidHandler;
import net.neoforged.neoforge.fluids.capability.templates.FluidTank; import net.neoforged.neoforge.fluids.capability.templates.FluidTank;
import net.neoforged.neoforge.items.IItemHandlerModifiable; import net.neoforged.neoforge.items.IItemHandlerModifiable;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.List; import java.util.List;
import java.util.function.Supplier;
import static net.minecraft.world.level.block.HorizontalDirectionalBlock.FACING;
public class CastingBasinBlockEntity extends SmartBlockEntity implements IHaveGoggleInformation { public class CastingBasinBlockEntity extends SmartBlockEntity implements IHaveGoggleInformation {
@@ -79,7 +73,7 @@ public class CastingBasinBlockEntity extends SmartBlockEntity implements IHaveGo
if(recipe.getIngrenient().test(tank.getFluid())) { if(recipe.getIngrenient().test(tank.getFluid())) {
if (timer >= recipe.getProcessingDuration()) { if (timer >= recipe.getProcessingDuration()) {
tank.setFluid(FluidStack.EMPTY); tank.setFluid(FluidStack.EMPTY);
inventory.setStackInSlot(0, recipe.getRollableResults().get(0).rollOutput()); inventory.setStackInSlot(0, recipe.getRollableResults().get(0).rollOutput(level.random));
recipe = null; recipe = null;
timer = 0; timer = 0;
} else timer++; } else timer++;

View File

@@ -1,14 +1,11 @@
package com.drmangotea.tfmg.recipes; package com.drmangotea.tfmg.recipes;
import com.drmangotea.tfmg.registry.TFMGRecipeTypes; import com.drmangotea.tfmg.registry.TFMGRecipeTypes;
import com.simibubi.create.content.processing.recipe.ProcessingRecipe;
import com.simibubi.create.content.processing.recipe.ProcessingRecipeBuilder;
import com.simibubi.create.content.processing.recipe.ProcessingRecipeParams; import com.simibubi.create.content.processing.recipe.ProcessingRecipeParams;
import com.simibubi.create.content.processing.recipe.StandardProcessingRecipe; import com.simibubi.create.content.processing.recipe.StandardProcessingRecipe;
import com.simibubi.create.foundation.fluid.FluidIngredient;
import net.minecraft.world.item.crafting.RecipeInput; import net.minecraft.world.item.crafting.RecipeInput;
import net.minecraft.world.level.Level; import net.minecraft.world.level.Level;
import net.neoforged.neoforge.items.wrapper.RecipeWrapper; import net.neoforged.neoforge.fluids.crafting.SizedFluidIngredient;
public class CastingRecipe extends StandardProcessingRecipe<RecipeInput> { public class CastingRecipe extends StandardProcessingRecipe<RecipeInput> {
@@ -23,7 +20,7 @@ public class CastingRecipe extends StandardProcessingRecipe<RecipeInput> {
protected int getMaxFluidInputCount() { protected int getMaxFluidInputCount() {
return 1; return 1;
} }
public FluidIngredient getIngrenient(){ public SizedFluidIngredient getIngrenient(){
return fluidIngredients.get(0); return fluidIngredients.get(0);
} }