Skip to content

Commit

Permalink
v1.9 - minor adjustments + fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
DakotaPride committed Jul 26, 2024
1 parent 256d3db commit 690af4f
Show file tree
Hide file tree
Showing 4 changed files with 126 additions and 41 deletions.
4 changes: 3 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
109 changes: 69 additions & 40 deletions src/main/java/net/dakotapride/garnished/registry/GarnishedFluids.java
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
package net.dakotapride.garnished.registry;

import com.simibubi.create.AllTags;
import static net.minecraft.world.item.Items.BUCKET;

import javax.annotation.Nullable;

import com.simibubi.create.AllFluids;
import com.simibubi.create.content.decoration.palettes.AllPaletteStoneTypes;
import com.simibubi.create.foundation.data.CreateRegistrate;

import com.simibubi.create.foundation.fluid.FluidHelper;
import com.simibubi.create.foundation.utility.Iterate;
import com.simibubi.create.infrastructure.config.AllConfigs;
import com.tterrag.registrate.fabric.SimpleFlowableFluid;

import com.tterrag.registrate.util.entry.FluidEntry;

import com.tterrag.registrate.util.nullness.NonNullSupplier;

import io.github.fabricators_of_create.porting_lib.event.common.FluidPlaceBlockCallback;
Expand All @@ -25,8 +25,8 @@
import net.fabricmc.fabric.api.transfer.v1.item.ItemVariant;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.core.Registry;
import net.minecraft.core.registries.Registries;
import net.minecraft.network.chat.Component;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.tags.FluidTags;
import net.minecraft.world.level.Level;
Expand All @@ -36,13 +36,8 @@
import net.minecraft.world.level.block.state.BlockBehaviour;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.material.Fluid;
import net.minecraft.network.chat.Component;
import net.minecraft.world.level.material.FluidState;

import javax.annotation.Nullable;

import static net.minecraft.world.item.Items.BUCKET;

@SuppressWarnings("UnstableApiUsage")
public class GarnishedFluids {
public static void setRegister() {
Expand Down Expand Up @@ -275,36 +270,70 @@ public static BlockState whenFluidsMeet(LevelAccessor world, BlockPos pos, Block

@Nullable
public static BlockState getLavaInteraction(FluidState fluidState) {
lavaInteraction(fluidState, GARNISH.get(), AllPaletteStoneTypes.CALCITE.getBaseBlock().get());
lavaInteraction(fluidState, PEANUT_OIL.get(), AllPaletteStoneTypes.DRIPSTONE.getBaseBlock().get());
lavaInteraction(fluidState, APPLE_CIDER.get(), GarnishedBlocks.CARNOTITE.get());
lavaInteraction(fluidState, CASHEW_MIXTURE.get(), Blocks.END_STONE);

lavaInteraction(fluidState, MASTIC_RESIN.get(), GarnishedBlocks.ZULTANITE.get());
lavaInteraction(fluidState, RED_MASTIC_RESIN.get(), GarnishedBlocks.RED_ZULTANITE.get());
lavaInteraction(fluidState, ORANGE_MASTIC_RESIN.get(), GarnishedBlocks.ORANGE_ZULTANITE.get());
lavaInteraction(fluidState, YELLOW_MASTIC_RESIN.get(), GarnishedBlocks.YELLOW_ZULTANITE.get());
lavaInteraction(fluidState, GREEN_MASTIC_RESIN.get(), GarnishedBlocks.GREEN_ZULTANITE.get());
lavaInteraction(fluidState, LIME_MASTIC_RESIN.get(), GarnishedBlocks.LIME_ZULTANITE.get());
lavaInteraction(fluidState, BLUE_MASTIC_RESIN.get(), GarnishedBlocks.BLUE_ZULTANITE.get());
lavaInteraction(fluidState, LIGHT_BLUE_MASTIC_RESIN.get(), GarnishedBlocks.LIGHT_BLUE_ZULTANITE.get());
lavaInteraction(fluidState, CYAN_MASTIC_RESIN.get(), GarnishedBlocks.CYAN_ZULTANITE.get());
lavaInteraction(fluidState, PURPLE_MASTIC_RESIN.get(), GarnishedBlocks.PURPLE_ZULTANITE.get());
lavaInteraction(fluidState, MAGENTA_MASTIC_RESIN.get(), GarnishedBlocks.MAGENTA_ZULTANITE.get());
lavaInteraction(fluidState, PINK_MASTIC_RESIN.get(), GarnishedBlocks.PINK_ZULTANITE.get());
lavaInteraction(fluidState, BLACK_MASTIC_RESIN.get(), GarnishedBlocks.BLACK_ZULTANITE.get());
lavaInteraction(fluidState, GRAY_MASTIC_RESIN.get(), GarnishedBlocks.GRAY_ZULTANITE.get());
lavaInteraction(fluidState, LIGHT_GRAY_MASTIC_RESIN.get(), GarnishedBlocks.LIGHT_GRAY_ZULTANITE.get());
lavaInteraction(fluidState, WHITE_MASTIC_RESIN.get(), GarnishedBlocks.WHITE_ZULTANITE.get());
lavaInteraction(fluidState, BROWN_MASTIC_RESIN.get(), GarnishedBlocks.BROWN_ZULTANITE.get());

return null;
}
// Fluids.lavaInteraction(fluidState, GARNISH.get(), AllPaletteStoneTypes.CALCITE.getBaseBlock().get());
if (fluidState.is(GARNISH.get()))
return AllPaletteStoneTypes.CALCITE.getBaseBlock().get().defaultBlockState();
// Fluids.lavaInteraction(fluidState, PEANUT_OIL.get(), AllPaletteStoneTypes.DRIPSTONE.getBaseBlock().get());
if (fluidState.is(PEANUT_OIL.get()))
return AllPaletteStoneTypes.DRIPSTONE.getBaseBlock().get().defaultBlockState();
// Fluids.lavaInteraction(fluidState, APPLE_CIDER.get(), GarnishedBlocks.CARNOTITE.get());
if (fluidState.is(APPLE_CIDER.get()))
return GarnishedBlocks.CARNOTITE.getDefaultState();
// Fluids.lavaInteraction(fluidState, CASHEW_MIXTURE.get(), Blocks.END_STONE);
if (fluidState.is(PEANUT_OIL.get()))
return Blocks.END_STONE.defaultBlockState();

static BlockState lavaInteraction(FluidState fluidState, Fluid inputFluid, Block block) {
Fluid fluid = fluidState.getType();
if (fluid.isSame(inputFluid))
return block.defaultBlockState();
// Fluids.lavaInteraction(fluidState, MASTIC_RESIN.get(), GarnishedBlocks.ZULTANITE.get());
if (fluidState.is(MASTIC_RESIN.get()))
return GarnishedBlocks.ZULTANITE.getDefaultState();
// Fluids.lavaInteraction(fluidState, RED_MASTIC_RESIN.get(), GarnishedBlocks.RED_ZULTANITE.get());
if (fluidState.is(RED_MASTIC_RESIN.get()))
return GarnishedBlocks.RED_ZULTANITE.getDefaultState();
// Fluids.lavaInteraction(fluidState, ORANGE_MASTIC_RESIN.get(), GarnishedBlocks.ORANGE_ZULTANITE.get());
if (fluidState.is(ORANGE_MASTIC_RESIN.get()))
return GarnishedBlocks.ORANGE_ZULTANITE.getDefaultState();
// Fluids.lavaInteraction(fluidState, YELLOW_MASTIC_RESIN.get(), GarnishedBlocks.YELLOW_ZULTANITE.get());
if (fluidState.is(YELLOW_MASTIC_RESIN.get()))
return GarnishedBlocks.YELLOW_ZULTANITE.getDefaultState();
// Fluids.lavaInteraction(fluidState, GREEN_MASTIC_RESIN.get(), GarnishedBlocks.GREEN_ZULTANITE.get());
if (fluidState.is(GREEN_MASTIC_RESIN.get()))
return GarnishedBlocks.GREEN_ZULTANITE.getDefaultState();
// Fluids.lavaInteraction(fluidState, LIME_MASTIC_RESIN.get(), GarnishedBlocks.LIME_ZULTANITE.get());
if (fluidState.is(LIME_MASTIC_RESIN.get()))
return GarnishedBlocks.LIME_ZULTANITE.getDefaultState();
// Fluids.lavaInteraction(fluidState, BLUE_MASTIC_RESIN.get(), GarnishedBlocks.BLUE_ZULTANITE.get());
if (fluidState.is(BLUE_MASTIC_RESIN.get()))
return GarnishedBlocks.BLUE_ZULTANITE.getDefaultState();
// Fluids.lavaInteraction(fluidState, LIGHT_BLUE_MASTIC_RESIN.get(), GarnishedBlocks.LIGHT_BLUE_ZULTANITE.get());
if (fluidState.is(LIGHT_BLUE_MASTIC_RESIN.get()))
return GarnishedBlocks.LIGHT_BLUE_ZULTANITE.getDefaultState();
// Fluids.lavaInteraction(fluidState, CYAN_MASTIC_RESIN.get(), GarnishedBlocks.CYAN_ZULTANITE.get());
if (fluidState.is(CYAN_MASTIC_RESIN.get()))
return GarnishedBlocks.CYAN_ZULTANITE.getDefaultState();
// Fluids.lavaInteraction(fluidState, PURPLE_MASTIC_RESIN.get(), GarnishedBlocks.PURPLE_ZULTANITE.get());
if (fluidState.is(PURPLE_MASTIC_RESIN.get()))
return GarnishedBlocks.PURPLE_ZULTANITE.getDefaultState();
// Fluids.lavaInteraction(fluidState, MAGENTA_MASTIC_RESIN.get(), GarnishedBlocks.MAGENTA_ZULTANITE.get());
if (fluidState.is(MAGENTA_MASTIC_RESIN.get()))
return GarnishedBlocks.MAGENTA_ZULTANITE.getDefaultState();
// Fluids.lavaInteraction(fluidState, PINK_MASTIC_RESIN.get(), GarnishedBlocks.PINK_ZULTANITE.get());
if (fluidState.is(PINK_MASTIC_RESIN.get()))
return GarnishedBlocks.PINK_ZULTANITE.getDefaultState();
// Fluids.lavaInteraction(fluidState, BLACK_MASTIC_RESIN.get(), GarnishedBlocks.BLACK_ZULTANITE.get());
if (fluidState.is(BLACK_MASTIC_RESIN.get()))
return GarnishedBlocks.BLACK_ZULTANITE.getDefaultState();
// Fluids.lavaInteraction(fluidState, GRAY_MASTIC_RESIN.get(), GarnishedBlocks.GRAY_ZULTANITE.get());
if (fluidState.is(GRAY_MASTIC_RESIN.get()))
return GarnishedBlocks.GRAY_ZULTANITE.getDefaultState();
// Fluids.lavaInteraction(fluidState, LIGHT_GRAY_MASTIC_RESIN.get(), GarnishedBlocks.LIGHT_GRAY_ZULTANITE.get());
if (fluidState.is(LIGHT_GRAY_MASTIC_RESIN.get()))
return GarnishedBlocks.LIGHT_GRAY_ZULTANITE.getDefaultState();
// Fluids.lavaInteraction(fluidState, WHITE_MASTIC_RESIN.get(), GarnishedBlocks.WHITE_ZULTANITE.get());
if (fluidState.is(WHITE_MASTIC_RESIN.get()))
return GarnishedBlocks.WHITE_ZULTANITE.getDefaultState();
// Fluids.lavaInteraction(fluidState, BROWN_MASTIC_RESIN.get(), GarnishedBlocks.BROWN_ZULTANITE.get());
if (fluidState.is(BROWN_MASTIC_RESIN.get()))
return GarnishedBlocks.BROWN_ZULTANITE.getDefaultState();

return null;
}
Expand Down
27 changes: 27 additions & 0 deletions src/main/resources/assets/garnished/lang/en_ca.json
Original file line number Diff line number Diff line change
Expand Up @@ -828,12 +828,39 @@
"tag.fluid.garnished.sweet_tea": "Sweet Tea",

"emi.category.garnished.fan_freezing": "Bulk Freezing",
"create.recipe.fan_freezing.fan": "Fan Behind Powdered Snow",
"emi.category.garnished.fan_red_dyeing": "Bulk Dyeing",
"create.recipe.fan_red_dyeing.fan": "Fan Behind Red Liquefied Mastic Resin",
"emi.category.garnished.fan_orange_dyeing": "Bulk Dyeing",
"create.recipe.fan_orange_dyeing.fan": "Fan Behind Orange Liquefied Mastic Resin",
"emi.category.garnished.fan_yellow_dyeing": "Bulk Dyeing",
"create.recipe.fan_yellow_dyeing.fan": "Fan Behind Yellow Liquefied Mastic Resin",
"emi.category.garnished.fan_green_dyeing": "Bulk Dyeing",
"create.recipe.fan_green_dyeing.fan": "Fan Behind Green Liquefied Mastic Resin",
"emi.category.garnished.fan_lime_dyeing": "Bulk Dyeing",
"create.recipe.fan_lime_dyeing.fan": "Fan Behind Lime Liquefied Mastic Resin",
"emi.category.garnished.fan_blue_dyeing": "Bulk Dyeing",
"create.recipe.fan_blue_dyeing.fan": "Fan Behind Blue Liquefied Mastic Resin",
"emi.category.garnished.fan_light_blue_dyeing": "Bulk Dyeing",
"create.recipe.fan_light_blue_dyeing.fan": "Fan Behind Light Blue Liquefied Mastic Resin",
"emi.category.garnished.fan_cyan_dyeing": "Bulk Dyeing",
"create.recipe.fan_cyan_dyeing.fan": "Fan Behind Cyan Liquefied Mastic Resin",
"emi.category.garnished.fan_purple_dyeing": "Bulk Dyeing",
"create.recipe.fan_purple_dyeing.fan": "Fan Behind Purple Liquefied Mastic Resin",
"emi.category.garnished.fan_magenta_dyeing": "Bulk Dyeing",
"create.recipe.fan_magenta_dyeing.fan": "Fan Behind Magenta Liquefied Mastic Resin",
"emi.category.garnished.fan_pink_dyeing": "Bulk Dyeing",
"create.recipe.fan_pink_dyeing.fan": "Fan Behind Pink Liquefied Mastic Resin",
"emi.category.garnished.fan_black_dyeing": "Bulk Dyeing",
"create.recipe.fan_black_dyeing.fan": "Fan Behind Black Liquefied Mastic Resin",
"emi.category.garnished.fan_gray_dyeing": "Bulk Dyeing",
"create.recipe.fan_gray_dyeing.fan": "Fan Behind Gray Liquefied Mastic Resin",
"emi.category.garnished.fan_light_gray_dyeing": "Bulk Dyeing",
"create.recipe.fan_light_gray_dyeing.fan": "Fan Behind Light Gray Liquefied Mastic Resin",
"emi.category.garnished.fan_white_dyeing": "Bulk Dyeing",
"create.recipe.fan_white_dyeing.fan": "Fan Behind White Liquefied Mastic Resin",
"emi.category.garnished.fan_brown_dyeing": "Bulk Dyeing",
"create.recipe.fan_brown_dyeing.fan": "Fan Behind Brown Liquefied Mastic Resin",

"block.garnished.peanut_sack": "Compacted Nut Sack",
"block.garnished.cashew_sack": "Compacted Nut Sack",
Expand Down
27 changes: 27 additions & 0 deletions src/main/resources/assets/garnished/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -1148,12 +1148,39 @@
"tag.fluid.garnished.sweet_tea": "Sweet Tea",

"emi.category.garnished.fan_freezing": "Bulk Freezing",
"create.recipe.fan_freezing.fan": "Fan Behind Powdered Snow",
"emi.category.garnished.fan_red_dyeing": "Bulk Dyeing",
"create.recipe.fan_red_dyeing.fan": "Fan Behind Red Liquefied Mastic Resin",
"emi.category.garnished.fan_orange_dyeing": "Bulk Dyeing",
"create.recipe.fan_orange_dyeing.fan": "Fan Behind Orange Liquefied Mastic Resin",
"emi.category.garnished.fan_yellow_dyeing": "Bulk Dyeing",
"create.recipe.fan_yellow_dyeing.fan": "Fan Behind Yellow Liquefied Mastic Resin",
"emi.category.garnished.fan_green_dyeing": "Bulk Dyeing",
"create.recipe.fan_green_dyeing.fan": "Fan Behind Green Liquefied Mastic Resin",
"emi.category.garnished.fan_lime_dyeing": "Bulk Dyeing",
"create.recipe.fan_lime_dyeing.fan": "Fan Behind Lime Liquefied Mastic Resin",
"emi.category.garnished.fan_blue_dyeing": "Bulk Dyeing",
"create.recipe.fan_blue_dyeing.fan": "Fan Behind Blue Liquefied Mastic Resin",
"emi.category.garnished.fan_light_blue_dyeing": "Bulk Dyeing",
"create.recipe.fan_light_blue_dyeing.fan": "Fan Behind Light Blue Liquefied Mastic Resin",
"emi.category.garnished.fan_cyan_dyeing": "Bulk Dyeing",
"create.recipe.fan_cyan_dyeing.fan": "Fan Behind Cyan Liquefied Mastic Resin",
"emi.category.garnished.fan_purple_dyeing": "Bulk Dyeing",
"create.recipe.fan_purple_dyeing.fan": "Fan Behind Purple Liquefied Mastic Resin",
"emi.category.garnished.fan_magenta_dyeing": "Bulk Dyeing",
"create.recipe.fan_magenta_dyeing.fan": "Fan Behind Magenta Liquefied Mastic Resin",
"emi.category.garnished.fan_pink_dyeing": "Bulk Dyeing",
"create.recipe.fan_pink_dyeing.fan": "Fan Behind Pink Liquefied Mastic Resin",
"emi.category.garnished.fan_black_dyeing": "Bulk Dyeing",
"create.recipe.fan_black_dyeing.fan": "Fan Behind Black Liquefied Mastic Resin",
"emi.category.garnished.fan_gray_dyeing": "Bulk Dyeing",
"create.recipe.fan_gray_dyeing.fan": "Fan Behind Gray Liquefied Mastic Resin",
"emi.category.garnished.fan_light_gray_dyeing": "Bulk Dyeing",
"create.recipe.fan_light_gray_dyeing.fan": "Fan Behind Light Gray Liquefied Mastic Resin",
"emi.category.garnished.fan_white_dyeing": "Bulk Dyeing",
"create.recipe.fan_white_dyeing.fan": "Fan Behind White Liquefied Mastic Resin",
"emi.category.garnished.fan_brown_dyeing": "Bulk Dyeing",
"create.recipe.fan_brown_dyeing.fan": "Fan Behind Brown Liquefied Mastic Resin",

"block.garnished.peanut_sack": "Compacted Nut Sack",
"block.garnished.cashew_sack": "Compacted Nut Sack",
Expand Down

0 comments on commit 690af4f

Please sign in to comment.