Skip to content

XP Fluid (PneumaticCraft: Repressurized)

Description

Controls what fluids are considered XP Fluids and how much experience they provide.

Identifier

Refer to this via any of the following:

groovy
mods.pneumaticcraft.xp_fluid/* Used as page default */
mods.pneumaticcraft.xpfluid
mods.pneumaticcraft.xpFluid
mods.pneumaticcraft.XpFluid

Adding Entries

  • Adds entries in the format fluid, ratio:

    groovy
    mods.pneumaticcraft.xp_fluid.add(Fluid, int)
  • Adds entries in the format fluid, ratio:

    groovy
    mods.pneumaticcraft.xp_fluid.add(FluidStack, int)

Recipe Builder

Just like other recipe types, the XP Fluid also uses a recipe builder.

Don't know what a builder is? Check the builder info page out.

mods.pneumaticcraft.xp_fluid.recipeBuilder()
  • FluidStackList. Sets the fluid inputs of the recipe. Requires greater than or equal to 0 and less than or equal to 1.

    groovy
    fluidInput(FluidStack)
    fluidInput(FluidStack...)
    fluidInput(Collection<FluidStack>)
  • int. Sets the amount of experience provided by the fluid for the purpose of determining the ratio between xp fluids. (Default 0).

    groovy
    ratio(int)
  • First validates the builder, returning null and outputting errors to the log file if the validation failed, then registers the builder and returns the registered object. (returns null or org.apache.commons.lang3.tuple.Pair<net.minecraftforge.fluids.FluidStack, java.lang.Integer>).

    groovy
    register()
Example
groovy
mods.pneumaticcraft.xp_fluid.recipeBuilder()
    .fluidInput(fluid('lava'))
    .ratio(5)
    .register()

Removing Entries

  • Removes entries for the given fluid:

    groovy
    mods.pneumaticcraft.xp_fluid.remove(Fluid)
  • Removes entries for the given fluid:

    groovy
    mods.pneumaticcraft.xp_fluid.remove(FluidStack)
  • Removes all registered recipes:

    groovy
    mods.pneumaticcraft.xp_fluid.removeAll()
Example
groovy
mods.pneumaticcraft.xp_fluid.remove(fluid('xpjuice'))
mods.pneumaticcraft.xp_fluid.removeAll()

Getting the value of entries

  • Iterates through every entry in the registry, with the ability to call remove on any element to remove it:

    groovy
    mods.pneumaticcraft.xp_fluid.streamRecipes()

Contributors

Changelog

© 2024 CleanroomMC. All Rights Reserved.

Layout Switch

Adjust the layout style of VitePress to adapt to different reading needs and screens.

Expand all
The sidebar and content area occupy the entire width of the screen.
Expand sidebar with adjustable values
Expand sidebar width and add a new slider for user to choose and customize their desired width of the maximum width of sidebar can go, but the content area width will remain the same.
Expand all with adjustable values
Expand sidebar width and add a new slider for user to choose and customize their desired width of the maximum width of sidebar can go, but the content area width will remain the same.
Original width
The original layout width of VitePress

Page Layout Max Width

Adjust the exact value of the page width of VitePress layout to adapt to different reading needs and screens.

Adjust the maximum width of the page layout
A ranged slider for user to choose and customize their desired width of the maximum width of the page layout can go.

Content Layout Max Width

Adjust the exact value of the document content width of VitePress layout to adapt to different reading needs and screens.

Adjust the maximum width of the content layout
A ranged slider for user to choose and customize their desired width of the maximum width of the content layout can go.

Spotlight

Highlight the line where the mouse is currently hovering in the content to optimize for users who may have reading and focusing difficulties.

ONOn
Turn on Spotlight.
OFFOff
Turn off Spotlight.

Spotlight Styles

Adjust the styles of Spotlight.

Under
Add a solid background color underneath the hovering element to highlight where the cursor is currently hovering.
Aside
Add a fixed line with solid color aside the hovering element to highlight where the cursor is currently hovering.