Skip to content
This repository has been archived by the owner on Nov 5, 2024. It is now read-only.

Commit

Permalink
added liquid dyes
Browse files Browse the repository at this point in the history
  • Loading branch information
Trinsdar committed Aug 23, 2024
1 parent f7f1636 commit 3c0ad32
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,26 @@ public static void onMaterialEvent(GregTechMaterialEvent event){
/**
*** Fluids
**/
/**
* Dyes
*/
event.setMaterial(WhiteDye).asFluid();
event.setMaterial(OrangeDye).asFluid();
event.setMaterial(MagentaDye).asFluid();
event.setMaterial(LightBlueDye).asFluid();
event.setMaterial(YellowDye).asFluid();
event.setMaterial(LimeDye).asFluid();
event.setMaterial(PinkDye).asFluid();
event.setMaterial(GrayDye).asFluid();
event.setMaterial(LightGrayDye).asFluid();
event.setMaterial(CyanDye).asFluid();
event.setMaterial(PurpleDye).asFluid();
event.setMaterial(BlueDye).asFluid();
event.setMaterial(BrownDye).asFluid();
event.setMaterial(GreenDye).asFluid();
event.setMaterial(RedDye).asFluid();
event.setMaterial(BlackDye).asFluid();

/**
* Organic
**/
Expand Down
21 changes: 21 additions & 0 deletions common/src/main/java/muramasa/gregtech/data/Materials.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import muramasa.antimatter.material.Material;
import muramasa.antimatter.material.TextureSet;
import muramasa.gregtech.GTIRef;
import net.minecraft.world.item.DyeColor;

import static muramasa.antimatter.material.Element.*;
import static muramasa.antimatter.material.TextureSet.*;
Expand Down Expand Up @@ -401,6 +402,26 @@ public class Materials {
*** Fluids
**/

/**
* Dye Fluids
*/
public static Material WhiteDye = AntimatterAPI.register(Material.class, new Material(GTIRef.ID, "white_dye", DyeColor.WHITE.getTextColor(), NONE));
public static Material OrangeDye = AntimatterAPI.register(Material.class, new Material(GTIRef.ID, "orange_dye", DyeColor.ORANGE.getTextColor(), NONE));
public static Material MagentaDye = AntimatterAPI.register(Material.class, new Material(GTIRef.ID, "magenta_dye", DyeColor.MAGENTA.getTextColor(), NONE));
public static Material LightBlueDye = AntimatterAPI.register(Material.class, new Material(GTIRef.ID, "light_blue_dye", DyeColor.LIGHT_BLUE.getTextColor(), NONE));
public static Material YellowDye = AntimatterAPI.register(Material.class, new Material(GTIRef.ID, "yellow_dye", DyeColor.YELLOW.getTextColor(), NONE));
public static Material LimeDye = AntimatterAPI.register(Material.class, new Material(GTIRef.ID, "lime_dye", DyeColor.LIME.getTextColor(), NONE));
public static Material PinkDye = AntimatterAPI.register(Material.class, new Material(GTIRef.ID, "pink_dye", DyeColor.PINK.getTextColor(), NONE));
public static Material GrayDye = AntimatterAPI.register(Material.class, new Material(GTIRef.ID, "gray_dye", DyeColor.GRAY.getTextColor(), NONE));
public static Material LightGrayDye = AntimatterAPI.register(Material.class, new Material(GTIRef.ID, "light_gray_dye", DyeColor.LIGHT_GRAY.getTextColor(), NONE));
public static Material CyanDye = AntimatterAPI.register(Material.class, new Material(GTIRef.ID, "cyan_dye", DyeColor.CYAN.getTextColor(), NONE));
public static Material PurpleDye = AntimatterAPI.register(Material.class, new Material(GTIRef.ID, "purple_dye", DyeColor.PURPLE.getTextColor(), NONE));
public static Material BlueDye = AntimatterAPI.register(Material.class, new Material(GTIRef.ID, "blue_dye", DyeColor.BLUE.getTextColor(), NONE));
public static Material BrownDye = AntimatterAPI.register(Material.class, new Material(GTIRef.ID, "brown_dye", DyeColor.BROWN.getTextColor(), NONE));
public static Material GreenDye = AntimatterAPI.register(Material.class, new Material(GTIRef.ID, "green_dye", DyeColor.GREEN.getTextColor(), NONE));
public static Material RedDye = AntimatterAPI.register(Material.class, new Material(GTIRef.ID, "red_dye", DyeColor.RED.getTextColor(), NONE));
public static Material BlackDye = AntimatterAPI.register(Material.class, new Material(GTIRef.ID, "black_dye", DyeColor.BLACK.getTextColor(), NONE));

/**
** Organic
**/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ public static void loadRecipes(Consumer<FinishedRecipe> consumer, AntimatterReci
of('C', Ingredient.of(GEM.get(Lignite), RAW_ORE.get(Lignite), DUST.get(Lignite), DUST_IMPURE.get(Lignite), DUST_PURE.get(Lignite), CRUSHED.get(Lignite),CRUSHED_PURIFIED.get(Lignite), CRUSHED_REFINED.get(Lignite)), 'S', Items.STICK), "C", "S");
provider.addStackRecipe(consumer, GTIRef.ID, "torch_from_creosote", "torches", new ItemStack(Items.TORCH, 6),
of('W', ItemTags.WOOL, 'C', Creosote.getLiquid().getBucket(), 'S', Items.STICK), "C", "W", "S");
provider.shapeless(consumer, "", "dyes", Items.GREEN_DYE.getDefaultInstance(), DUST.getMaterialTag(Malachite));
provider.shapeless(consumer, "green_dye_from_malachite", "dyes", Items.GREEN_DYE.getDefaultInstance(), DUST.getMaterialTag(Malachite));
provider.shapeless(consumer, "blue_dye_from_sodalite_dust", "dyes", Items.BLUE_DYE.getDefaultInstance(), DUST.getMaterialTag(Sodalite));
provider.shapeless(consumer, "blue_dye_from_sodalite_gem", "dyes", Items.BLUE_DYE.getDefaultInstance(), GEM.getMaterialTag(Sodalite));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
import muramasa.gregtech.data.GregTechBlocks;
import muramasa.gregtech.data.GregTechItems;
import muramasa.gregtech.data.GregTechTags;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.item.DyeColor;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.Items;
import net.minecraft.world.item.crafting.Ingredient;
Expand Down Expand Up @@ -88,6 +90,12 @@ public static void init() {
addAsphaltRecipe(Slate, GregTechBlocks.GRAY_ASPHALT);
addAsphaltRecipe(Talc, GregTechBlocks.GRAY_ASPHALT);
addAsphaltRecipe(GreenSchist, GregTechBlocks.GREEN_ASPHALT);
for (DyeColor dye : DyeColor.values()) {
String dyeName = dye.getName() + "_dye";
Material dyeMaterial = Material.get(dyeName);
MIXER.RB().ii(AntimatterPlatformUtils.getItemFromID(new ResourceLocation(dyeName))).fi(Water.getLiquid(216)).fo(dyeMaterial.getLiquid(192)).add(dyeName, 16, 4);
MIXER.RB().ii(AntimatterPlatformUtils.getItemFromID(new ResourceLocation(dyeName))).fi(Water.getLiquid(288)).fo(dyeMaterial.getLiquid(216)).add(dyeName + "_distilled_water", 16, 4);
}
}

private static void addAsphaltRecipe(Material dust, BlockAsphalt asphalt){
Expand Down

0 comments on commit 3c0ad32

Please sign in to comment.