From d3d7579b152e9701f0856d4f0b5fc244072df531 Mon Sep 17 00:00:00 2001 From: Stonurd <77725068+Stonurd@users.noreply.github.com> Date: Sat, 15 Feb 2025 17:34:51 +0100 Subject: [PATCH] Added fluid interaction basalt-like fluid interaction. I added the few fitting in the mod, I think. --- .../server/block/fluid/ACFluidRegistry.java | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/main/java/com/github/alexmodguy/alexscaves/server/block/fluid/ACFluidRegistry.java b/src/main/java/com/github/alexmodguy/alexscaves/server/block/fluid/ACFluidRegistry.java index 8640b40f1..21a192c8a 100644 --- a/src/main/java/com/github/alexmodguy/alexscaves/server/block/fluid/ACFluidRegistry.java +++ b/src/main/java/com/github/alexmodguy/alexscaves/server/block/fluid/ACFluidRegistry.java @@ -13,6 +13,7 @@ import net.minecraftforge.common.ForgeMod; import net.minecraftforge.common.SoundActions; import net.minecraftforge.fluids.FluidInteractionRegistry; +import net.minecraftforge.fluids.FluidInteractionRegistry.InteractionInformation; import net.minecraftforge.fluids.FluidType; import net.minecraftforge.fluids.ForgeFlowingFluid; import net.minecraftforge.registries.DeferredRegister; @@ -80,5 +81,25 @@ public static void postInit() { PURPLE_SODA_FLUID_TYPE.get(), fluidState -> ACBlockRegistry.GREEN_ROCK_CANDY.get().defaultBlockState() )); + FluidInteractionRegistry.addInteraction(ForgeMod.LAVA_TYPE.get(), new InteractionInformation( + (level, currentPos, relativePos, currentState) -> level.getBlockState(currentPos.below()).is(ACBlockRegistry.BLOCK_OF_SCARLET_NEODYMIUM.get()) && level.getBlockState(relativePos).is(Blocks.BLUE_ICE), + ACBlockRegistry.GALENA.get().defaultBlockState() + )); + FluidInteractionRegistry.addInteraction(ForgeMod.LAVA_TYPE.get(), new InteractionInformation( + (level, currentPos, relativePos, currentState) -> level.getBlockState(currentPos.below()).is(ACBlockRegistry.BLOCK_OF_AZURE_NEODYMIUM.get()) && level.getBlockState(relativePos).is(Blocks.BLUE_ICE), + ACBlockRegistry.GALENA.get().defaultBlockState() + )); + FluidInteractionRegistry.addInteraction(ForgeMod.LAVA_TYPE.get(), new InteractionInformation( + (level, currentPos, relativePos, currentState) -> level.getBlockState(currentPos.below()).is(ACBlockRegistry.DRAIN.get()) && level.getBlockState(relativePos).is(Blocks.BLUE_ICE), + ACBlockRegistry.ABYSSMARINE.get().defaultBlockState() + )); + FluidInteractionRegistry.addInteraction(ForgeMod.LAVA_TYPE.get(), new InteractionInformation( + (level, currentPos, relativePos, currentState) -> level.getBlockState(currentPos.below()).is(ACBlockRegistry.AMBER.get()) && level.getBlockState(relativePos).is(Blocks.BLUE_ICE), + ACBlockRegistry.LIMESTONE.get().defaultBlockState() + )); + FluidInteractionRegistry.addInteraction(ForgeMod.LAVA_TYPE.get(), new InteractionInformation( + (level, currentPos, relativePos, currentState) -> level.getBlockState(currentPos.below()).is(ACBlockRegistry.PRIMAL_MAGMA.get()) && level.getBlockState(relativePos).is(Blocks.BLUE_ICE), + ACBlockRegistry.FLOOD_BASALT.get().defaultBlockState() + )); } }