Skip to content

Child Flags

petrolpark edited this page Jun 20, 2026 · 3 revisions

Flags can define "children". These are Flags which any flaggable object has by virtue of having the parent Flag. For example, the Flagexamplemod:non_vegetarian would be a good candidate for the child of the Flag examplemod:non_vegan if anything Flagged as non-vegetarian should also be considered non-vegan.

Flags can have any number of children and any number of parents. Note that parents of a parent (etc) are still considered direct parents and are treated the exact same way. Same for children of children (etc).

Notes on use of Flags with children:

  • If a Flag is added to a FlagPole with IFlagPole.flag(Flag) all of its children will also be added.
  • Flags cannot be removed from a Flag with IFlagPole.unflag(Flag) or unflagOnly(Flag) if they have any parent remaining in the FlagPole.
  • Removing a Flag with IFlagPole.unflag(Flag) will also remove all of its children that do not have another parent remaining in the FlagPole.
  • Removing a Flag with IFlagPole.unflagOnly(Flag) will remove that Flag, but not any of its children.

API Reference

Can be applied to item stacks and other objects and will propagate through crafting

Timers that can be attached to item stacks to modify them after a given time, no matter what inventory they are in

A way for mods to detect groupings of players and store information on these groupings

Manipulation of loot table randomness and other RNG to give desired items

Additional inventory and hotbar slots for the player

Blocks and items that have variants craftable from any mod's wood

Loot and Data

Data-driven modifications to existing loot tables with greater versatility than NeoForge's GlobalLootModifiers

Data-driven changes to the world (give items, XP, unlock villager trades)

Levelable "Restaurants" shared between Teams giving Rewards for randomly-generated item requests

Additional implementations of vanilla's number providers used in loot tables, advancements, etc.

Recipes

Extension of NeoForge's ingredients to include descriptions and loot table forcing

Work with automatically-detected "compression" Recipes (e.g. nuggets <-> ingots <-> blocks)

Recycling (page under construction)

Balanced and versatile "uncrafting" API

Gating Recipes for vanilla and modded items behind item unlocks

Features (like blocks, items and mob effects) shared between multiple Petrolpark (and other) mods

Changelogs

1.3.1, 1.3.2, 1.3.3, 1.3.4
1.4.0, 1.4.1, 1.4.2, 1.4.3, 1.4.4, 1.4.5, 1.4.6, 1.4.7, 1.4.8, 1.4.9, 1.4.10, 1.4.11, 1.4.12, 1.4.13, 1.4.14, 1.4.15, 1.4.16, 1.4.17, 1.4.18, 1.4.19, 1.4.20, 1.4.21, 1.4.22, 1.4.23, 1.4.24, 1.4.25, 1.4.26, 1.4.27, 1.4.28, 1.4.29, 1.4.30, 1.4.31, 1.4.32, 1.4.33, 1.4.34, 1.4.35, 1.4.36
1.5.0

Clone this wiki locally