Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Store distillation input amount in a material tag #194

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,7 @@
import java.util.function.Supplier;

import static muramasa.antimatter.Data.*;
import static muramasa.antimatter.material.MaterialTags.ARMOR;
import static muramasa.antimatter.material.MaterialTags.DISTILL_INTO;
import static muramasa.antimatter.material.MaterialTags.HANDLE;
import static muramasa.antimatter.material.MaterialTags.METAL;
import static muramasa.antimatter.material.MaterialTags.*;

public class MaterialEvent {
private Material material = Data.NULL;
Expand Down Expand Up @@ -146,6 +143,7 @@ public MaterialEvent asFluid(int fuelPower, int temp, boolean canDistill, FluidP
MaterialTags.FUEL_POWER.add(this.material, fuelPower);
MaterialTags.LIQUID_TEMPERATURE.add(this.material, temp);
if (canDistill){
DISTILLATION_FLUID_INPUT_AMOUNT.add(this.material, distillationAmount);
DISTILL_INTO.add(this.material, Arrays.stream(distillationProducts).toList());
}
return this;
Expand All @@ -169,6 +167,7 @@ public MaterialEvent asGas(int fuelPower, int temp, boolean canDistill, FluidPro
MaterialTags.FUEL_POWER.add(this.material, fuelPower);
MaterialTags.GAS_TEMPERATURE.add(this.material, temp);
if (canDistill){
DISTILLATION_FLUID_INPUT_AMOUNT.add(this.material, distillationAmount);
DISTILL_INTO.add(this.material, Arrays.stream(distillationProducts).toList());
}
return this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ public class MaterialTags {
public static final ListMaterialTag<Material> BYPRODUCTS = new ListMaterialTag<>("byproducts");

public static final ListMaterialTag<FluidProduct> DISTILL_INTO = new ListMaterialTag<>("distill_into");
public static final NumberMaterialTag DISTILLATION_FLUID_INPUT_AMOUNT = new NumberMaterialTag("distillation_fluid_input_amount");


public static final BlockDropMaterialTag<BlockOre> CUSTOM_ORE_DROPS = new BlockDropMaterialTag<>("custom_ore_drops");
Expand Down