-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
77de162
commit 615ccb2
Showing
7 changed files
with
120 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package com.obsilab.mcsc.fluid; | ||
|
||
import com.obsilab.mcsc.MCSC; | ||
import net.minecraft.resources.ResourceLocation; | ||
import net.minecraftforge.eventbus.api.IEventBus; | ||
import net.minecraftforge.fluids.FluidType; | ||
import net.minecraftforge.registries.DeferredRegister; | ||
import net.minecraftforge.registries.ForgeRegistries; | ||
import net.minecraftforge.registries.RegistryObject; | ||
|
||
public class ModFluidTypes { // liquid, gas, plasma ? | ||
|
||
public static final ResourceLocation TEST_FLUID_STILL_RL = new ResourceLocation("block/test_fluid_still"); | ||
|
||
public static final DeferredRegister<FluidType> FLUID_TYPES = | ||
DeferredRegister.create(ForgeRegistries.Keys.FLUID_TYPES, MCSC.MOD_ID); | ||
|
||
public static final RegistryObject<FluidType> TEST_FLUID_TYPE = | ||
register("test_fluid", FluidType.Properties.create() | ||
.viscosity(1) | ||
.canConvertToSource(false) | ||
.fallDistanceModifier(1f) | ||
// try out other properties | ||
); | ||
|
||
private static RegistryObject<FluidType> register(String name, FluidType.Properties properties) { | ||
return FLUID_TYPES.register(name, () -> new BaseFluidType(TEST_FLUID_STILL_RL, properties)); | ||
} | ||
|
||
public static void register(IEventBus eventBus) { | ||
FLUID_TYPES.register(eventBus); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,41 @@ | ||
package com.obsilab.mcsc.fluid; | ||
|
||
|
||
import com.obsilab.mcsc.MCSC; | ||
import com.obsilab.mcsc.block.ModBlocks; | ||
import com.obsilab.mcsc.item.ModItems; | ||
import net.minecraft.world.level.material.FlowingFluid; | ||
import net.minecraft.world.level.material.Fluid; | ||
import net.minecraftforge.eventbus.api.IEventBus; | ||
import net.minecraftforge.fluids.ForgeFlowingFluid; | ||
import net.minecraftforge.registries.DeferredRegister; | ||
import net.minecraftforge.registries.ForgeRegistries; | ||
import net.minecraftforge.registries.RegistryObject; | ||
|
||
// TODO | ||
// fluids: NF3 gas (Nitrogen Trifluoride) for dry (plasma) etching, Nitrogen gas for internal FOUP atmosphere ... | ||
public class ModFluids { | ||
//TODO | ||
public static final DeferredRegister<Fluid> FLUIDS = | ||
DeferredRegister.create(ForgeRegistries.FLUIDS, MCSC.MOD_ID); | ||
|
||
public static final RegistryObject<FlowingFluid> SOURCE_TEST_FLUID = | ||
FLUIDS.register("test_fluid", () -> new ForgeFlowingFluid.Source(ModFluids.TEST_FLUID_PROPERTIES)); | ||
|
||
public static final RegistryObject<FlowingFluid> FLOWING_TEST_FLUID = | ||
FLUIDS.register("flowing_test_fluid", () -> new ForgeFlowingFluid.Flowing(ModFluids.TEST_FLUID_PROPERTIES)); | ||
|
||
public static final ForgeFlowingFluid.Properties TEST_FLUID_PROPERTIES = | ||
new ForgeFlowingFluid.Properties( | ||
ModFluidTypes.TEST_FLUID_TYPE, | ||
SOURCE_TEST_FLUID, | ||
FLOWING_TEST_FLUID) | ||
.slopeFindDistance(2) | ||
.levelDecreasePerBlock(2) | ||
.block(ModBlocks.TEST_FLUID_BLOCK) | ||
.bucket(ModItems.TEST_FLUID_BUCKET) | ||
; | ||
|
||
public static void register(IEventBus eventBus) { | ||
FLUIDS.register(eventBus); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters