Skip to content

Commit eba6e42

Browse files
committed
Fix limestone & scoria generation
1 parent 4281c14 commit eba6e42

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

src/main/java/com/simibubi/create/AllFluids.java

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@
2020
import com.tterrag.registrate.fabric.SimpleFlowableFluid;
2121
import com.tterrag.registrate.util.entry.FluidEntry;
2222

23+
import io.github.fabricators_of_create.porting_lib.fluids.FluidInteractionRegistry;
24+
25+
import io.github.fabricators_of_create.porting_lib.fluids.FluidInteractionRegistry.InteractionInformation;
26+
import io.github.fabricators_of_create.porting_lib.fluids.PortingLibFluids;
27+
2328
import net.createmod.catnip.data.Iterate;
2429
import net.createmod.catnip.nbt.NBTHelper;
2530
import net.minecraft.core.BlockPos;
@@ -165,7 +170,15 @@ public static void initRendering() {
165170
}
166171

167172
public static void registerFluidInteractions() {
168-
// fabric: no fluid interaction API, use legacy method
173+
FluidInteractionRegistry.addInteraction(PortingLibFluids.LAVA_TYPE, new InteractionInformation(
174+
((level, currentPos, relativePos, currentState) -> level.getFluidState(relativePos).getType().isSame(HONEY.get())),
175+
AllPaletteStoneTypes.LIMESTONE.getBaseBlock().get().defaultBlockState()
176+
));
177+
FluidInteractionRegistry.addInteraction(PortingLibFluids.LAVA_TYPE, new InteractionInformation(
178+
((level, currentPos, relativePos, currentState) -> level.getFluidState(relativePos).getType().isSame(CHOCOLATE.get())),
179+
AllPaletteStoneTypes.SCORIA.getBaseBlock().get().defaultBlockState()
180+
));
181+
169182
FluidPlaceBlockCallback.EVENT.register(AllFluids::whenFluidsMeet);
170183
}
171184

src/main/java/com/simibubi/create/content/kinetics/drill/CobbleGenOptimisation.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public static BlockState determineOutput(ServerLevel level, BlockPos pos, Cobble
5858
FluidState fluidState = config.statesAroundDrill.get(i)
5959
.getFluidState();
6060
FluidType fluidType = fluidState.getFluidType();
61-
if (!fluidType.isAir() && interactions.get(fluidType) != null)
61+
if (fluidType != null && !fluidType.isAir() && interactions.get(fluidType) != null)
6262
presentFluidTypes.put(fluidType, Pair.of(Iterate.directions[i], fluidState));
6363
}
6464

@@ -93,7 +93,7 @@ public static BlockState determineOutput(ServerLevel level, BlockPos pos, Cobble
9393
ServerLevel owLevel = level.getServer().getLevel(Level.OVERWORLD);
9494
if (owLevel == null)
9595
owLevel = level;
96-
96+
9797
if (cachedLevel == null || cachedLevel.getLevel() != owLevel)
9898
cachedLevel = new CobbleGenLevel(level);
9999

0 commit comments

Comments
 (0)