Bedrock Fluid Veins
Bedrock Fluid Veins are invisible veins that exist under the bedrock, to find Fluid Veins you must have at least a HV tier Prospector. A Fluid Drilling Rig must be used to obtain the fluids out of the vein.
Creating a Bedrock Fluid Vein
fluid_veins.js
// In server events
GTCEuServerEvents.fluidVeins(event => {
event.add('gtceu:custom_bedrock_fluid_vein', vein => {
vein.dimensions('minecraft:overworld') // (1)
vein.fluid(() => Fluid.of('gtceu:custom_fluid').fluid)
vein.weight(600)
vein.minimumYield(120)
vein.maximumYield(720)
vein.depletionAmount(2)
vein.depletionChance(1)
vein.depletedYield(50)
});
});
- Dimension where fluid vein will spawn.
In Java, .dimensions() only accepts a Set<ResourceKey<Level>>. For example, this is how you would assign the overworld a variable:
ResourceKey<Level> instances into the set itself. Here's an example for all vanilla dimensions:
public static final Set<ResourceKey<Level>> DIM_ALL = Set.of(Level.OVERWORLD, Level.NETHER, Level.END);
With this done, you can reference said variables in the
BedrockFluidDefinition builder. Let's use DIM_OVERWORLD in this example.
ExampleBedrockFluidVeins.java
pubic class ExampleBedrockFluidVeins {
public static void init() {}
public static final Set<ResourceKey<Level>> DIM_OVERWORLD = Set.of(Level.OVERWORLD);
public static final BedrockFluidDefinition CUSTOM_BEDROCK_FLUID_VEIN = BedrockFluidDefinition.builder(ExampleMod.id("custom_bedrock_fluid_vein"))
.dimensions(DIM_OVERWORLD) // (1)
.fluid(CustomFluid::getFluid) // (2)
.weight(600)
.yield(120, 720)
.depletionAmount(2)
.depletionChance(1)
.depletedYield(50)
.register();
}
- Dimension where fluid vein will spawn.
- Replace
CustomFluidwith any GTMaterial you want to get the fluid from.
As the last step, you need to actually enable the registration of the veins in your class implementing IGTAddon.