Skip to content

Commit

Permalink
added colored liquid concretes
Browse files Browse the repository at this point in the history
  • Loading branch information
Trinsdar committed Nov 27, 2024
1 parent 5507ec3 commit 63291cb
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,22 @@ public static void onMaterialEvent(GregTechMaterialEvent event){
event.setMaterial(Materials.ChemicalGreenDye).asFluid();
event.setMaterial(Materials.ChemicalRedDye).asFluid();
event.setMaterial(Materials.ChemicalBlackDye).asFluid();
event.setMaterial(Materials.WhiteConcrete).asFluid();
event.setMaterial(Materials.OrangeConcrete).asFluid();
event.setMaterial(Materials.MagentaConcrete).asFluid();
event.setMaterial(Materials.LightBlueConcrete).asFluid();
event.setMaterial(Materials.YellowConcrete).asFluid();
event.setMaterial(Materials.LimeConcrete).asFluid();
event.setMaterial(Materials.PinkConcrete).asFluid();
event.setMaterial(Materials.GrayConcrete).asFluid();
event.setMaterial(Materials.LightGrayConcrete).asFluid();
event.setMaterial(Materials.CyanConcrete).asFluid();
event.setMaterial(Materials.PurpleConcrete).asFluid();
event.setMaterial(Materials.BlueConcrete).asFluid();
event.setMaterial(Materials.BrownConcrete).asFluid();
event.setMaterial(Materials.GreenConcrete).asFluid();
event.setMaterial(Materials.RedConcrete).asFluid();
event.setMaterial(Materials.BlackConcrete).asFluid();

/**
* Organic
Expand Down
17 changes: 17 additions & 0 deletions common/src/main/java/org/gtreimagined/gt5r/data/Materials.java
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,23 @@ public class Materials {
public static Material ChemicalRedDye = AntimatterAPI.register(Material.class, new Material(GT5RRef.ID, "chemical_red_dye", GT5RData.getColorFromDyeColor(DyeColor.RED), NONE));
public static Material ChemicalBlackDye = AntimatterAPI.register(Material.class, new Material(GT5RRef.ID, "chemical_black_dye", GT5RData.getColorFromDyeColor(DyeColor.BLACK), NONE));

public static Material WhiteConcrete = AntimatterAPI.register(Material.class, new Material(GT5RRef.ID, "white_concrete", GT5RData.getColorFromDyeColor(DyeColor.WHITE), NONE));
public static Material OrangeConcrete = AntimatterAPI.register(Material.class, new Material(GT5RRef.ID, "orange_concrete", GT5RData.getColorFromDyeColor(DyeColor.ORANGE), NONE));
public static Material MagentaConcrete = AntimatterAPI.register(Material.class, new Material(GT5RRef.ID, "magenta_concrete", GT5RData.getColorFromDyeColor(DyeColor.MAGENTA), NONE));
public static Material LightBlueConcrete = AntimatterAPI.register(Material.class, new Material(GT5RRef.ID, "light_blue_concrete", GT5RData.getColorFromDyeColor(DyeColor.LIGHT_BLUE), NONE));
public static Material YellowConcrete = AntimatterAPI.register(Material.class, new Material(GT5RRef.ID, "yellow_concrete", GT5RData.getColorFromDyeColor(DyeColor.YELLOW), NONE));
public static Material LimeConcrete = AntimatterAPI.register(Material.class, new Material(GT5RRef.ID, "lime_concrete", GT5RData.getColorFromDyeColor(DyeColor.LIME), NONE));
public static Material PinkConcrete = AntimatterAPI.register(Material.class, new Material(GT5RRef.ID, "pink_concrete", GT5RData.getColorFromDyeColor(DyeColor.PINK), NONE));
public static Material GrayConcrete = AntimatterAPI.register(Material.class, new Material(GT5RRef.ID, "gray_concrete", GT5RData.getColorFromDyeColor(DyeColor.GRAY), NONE));
public static Material LightGrayConcrete = AntimatterAPI.register(Material.class, new Material(GT5RRef.ID, "light_gray_concrete", GT5RData.getColorFromDyeColor(DyeColor.LIGHT_GRAY), NONE));
public static Material CyanConcrete = AntimatterAPI.register(Material.class, new Material(GT5RRef.ID, "cyan_concrete", GT5RData.getColorFromDyeColor(DyeColor.CYAN), NONE));
public static Material PurpleConcrete = AntimatterAPI.register(Material.class, new Material(GT5RRef.ID, "purple_concrete", GT5RData.getColorFromDyeColor(DyeColor.PURPLE), NONE));
public static Material BlueConcrete = AntimatterAPI.register(Material.class, new Material(GT5RRef.ID, "blue_concrete", GT5RData.getColorFromDyeColor(DyeColor.BLUE), NONE));
public static Material BrownConcrete = AntimatterAPI.register(Material.class, new Material(GT5RRef.ID, "brown_concrete", GT5RData.getColorFromDyeColor(DyeColor.BROWN), NONE));
public static Material GreenConcrete = AntimatterAPI.register(Material.class, new Material(GT5RRef.ID, "green_concrete", GT5RData.getColorFromDyeColor(DyeColor.GREEN), NONE));
public static Material RedConcrete = AntimatterAPI.register(Material.class, new Material(GT5RRef.ID, "red_concrete", GT5RData.getColorFromDyeColor(DyeColor.RED), NONE));
public static Material BlackConcrete = AntimatterAPI.register(Material.class, new Material(GT5RRef.ID, "black_concrete", GT5RData.getColorFromDyeColor(DyeColor.BLACK), NONE));

/**
** Organic
**/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
import muramasa.antimatter.data.AntimatterDefaultTools;
import muramasa.antimatter.datagen.providers.AntimatterBlockTagProvider;
import muramasa.antimatter.machine.Tier;
import muramasa.antimatter.util.AntimatterPlatformUtils;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.item.DyeColor;
import org.gtreimagined.gt5r.GT5RRef;
import org.gtreimagined.gt5r.block.BlockAsphalt;
import org.gtreimagined.gt5r.block.BlockAsphaltSlab;
Expand Down Expand Up @@ -45,6 +48,9 @@ public void processTags(String domain){
AntimatterAPI.all(BlockFakeCasing.class, GT5RRef.ID, cas -> {
this.tag(AntimatterDefaultTools.PICKAXE.getToolType()).add(cas);
});
for (DyeColor color : DyeColor.values()) {
this.tag(GT5RTags.ASPHALT).add(AntimatterPlatformUtils.INSTANCE.getBlockFromId(new ResourceLocation(color.getName() + "_concrete")));
}
AntimatterAPI.all(BlockAsphalt.class, GT5RRef.ID, cas -> {
this.tag(GT5RTags.ASPHALT).add(cas);
this.tag(AntimatterDefaultTools.PICKAXE.getToolType()).add(cas);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package org.gtreimagined.gt5r.loader.crafting;

import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.item.DyeColor;
import org.gtreimagined.gt5r.GT5RRef;
import muramasa.antimatter.data.AntimatterMaterialTypes;
import muramasa.antimatter.data.AntimatterMaterials;
Expand All @@ -12,6 +14,7 @@
import net.minecraft.world.item.Items;
import net.minecraft.world.item.crafting.Ingredient;
import net.minecraft.world.level.block.Blocks;
import org.gtreimagined.gtcore.GTCoreConfig;

import java.util.function.Consumer;

Expand Down Expand Up @@ -68,6 +71,10 @@ public static void loadRecipes(Consumer<FinishedRecipe> consumer, AntimatterReci
provider.shapeless(consumer, GT5RRef.ID, "cyan_dye_from_lazurite_gem", "dyes", Items.CYAN_DYE.getDefaultInstance(), GEM.getMaterialTag(Lazurite));
provider.shapeless(consumer, GT5RRef.ID, "green_dye_from_blue_and_yellow", "dyes", new ItemStack(Items.GREEN_DYE, 2), Items.YELLOW_DYE, Items.BLUE_DYE);
provider.shapeless(consumer, GT5RRef.ID, "brown_dye_from_primaries", "dyes", new ItemStack(Items.BROWN_DYE, 3), Items.YELLOW_DYE, Items.BLUE_DYE, Items.RED_DYE);

if (GTCoreConfig.VANILLA_OVERRIDES.get()){
for (DyeColor dye : DyeColor.values()){
provider.removeRecipe(new ResourceLocation(dye.getName() + "_concrete_powder"));
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,19 @@
import muramasa.antimatter.material.Material;
import muramasa.antimatter.recipe.ingredient.RecipeIngredient;
import muramasa.antimatter.util.AntimatterPlatformUtils;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.item.DyeColor;
import net.minecraft.world.item.Items;
import org.gtreimagined.gtcore.data.GTCoreItems;

import static muramasa.antimatter.Ref.L;
import static muramasa.antimatter.Ref.L9;
import static muramasa.antimatter.data.AntimatterMaterialTypes.*;
import static muramasa.antimatter.data.AntimatterMaterials.*;
import static net.minecraft.world.item.crafting.Ingredient.of;
import static org.gtreimagined.gt5r.data.Materials.*;
import static org.gtreimagined.gt5r.data.RecipeMaps.FLUID_SOLIDIFYER;
import static org.gtreimagined.gt5r.data.RecipeMaps.MIXER;

public class FluidSolidifierLoader {
public static void init() {
Expand Down Expand Up @@ -52,6 +56,10 @@ public static void init() {
.fi(mat.getFluidIngredient(mat == Alumina ? (L * 9 * 7) / 2 : L * 9)).io(BLOCK.get().get(mat).asStack(1)).add(mat.getId() + "_block",288, 8);
}
});
for (DyeColor dye : DyeColor.values()) {
Material concrete = Material.get(dye.getName() + "_concrete");
FLUID_SOLIDIFYER.RB().ii(RecipeIngredient.of(GTCoreItems.MoldBlock, 1).setNoConsume()).fi(concrete.getLiquid(L)).io(AntimatterPlatformUtils.INSTANCE.getItemFromID(new ResourceLocation(dye.getName() + "_concrete"))).add(dye.getName() + "_concrete",288, 8);
}
FLUID_SOLIDIFYER.RB().ii(RecipeIngredient.of(GTCoreItems.MoldLongRod, 1).setNoConsume()).fi(Lava.getLiquid(AntimatterPlatformUtils.INSTANCE.isFabric() ? L : 111)).io(ROD_LONG.get(Obsidian)).add("long_obsidian_rod", 16, 8);
FLUID_SOLIDIFYER.RB().ii(RecipeIngredient.of(GTCoreItems.MoldPlate, 1).setNoConsume()).fi(Lava.getLiquid(AntimatterPlatformUtils.INSTANCE.isFabric() ? L : 111)).io(PLATE.get(Obsidian)).add("obsidian_plate", 16, 8);
FLUID_SOLIDIFYER.RB().ii(RecipeIngredient.of(GTCoreItems.MoldAnvil, 1).setNoConsume()).fi(Iron.getFluidIngredient(L * 31)).io(Items.ANVIL).add("anvil", 128, 16);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ public static void init() {
Material dyeMaterial = Material.get("water_mixed_" + dyeName);
MIXER.RB().ii(of(dye.getTag())).fi(Water.getLiquid(L)).fo(dyeMaterial.getLiquid(L + (L / 2))).add("water_mixed_" + dyeName, 16, 4);
MIXER.RB().ii(of(dye.getTag())).fi(DistilledWater.getLiquid(L)).fo(dyeMaterial.getLiquid(L + (L / 2))).add("water_mixed_" + dyeName + "_distilled_water", 16, 4);
MIXER.RB().fi(Material.get("chemical_" + dyeName).getLiquid(L), Concrete.getLiquid(L)).fo(Material.get(dye.getName() + "_concrete").getLiquid(L)).add(dye.getName() + "_concrete", 16, 4);
}
}

Expand Down

0 comments on commit 63291cb

Please sign in to comment.