Skip to content

Commit

Permalink
Add back built-in pack id example
Browse files Browse the repository at this point in the history
And reference other resources
  • Loading branch information
ApexModder committed Nov 14, 2024
1 parent 6e45615 commit c7e0ceb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/advanced/featureflags.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ itemStack.isItemEnabled(enabledFeatures);

### Feature Packs

_See also: [Resource Packs](../resources/index.md#assets), [Data Packs](../resources/index.md#data) and [Pack.mcmeta](../resources/index.md#packmcmeta)_

Feature packs are a type of pack that not only loads resources and/or data, but also has the ability to toggle on a given set of feature flags. These flags are defined in the `pack.mcmeta` JSON file at the root of this pack, which follows the below format:
```json5
{
Expand Down Expand Up @@ -198,6 +200,8 @@ Built-in packs are bundled with your mod and are made available to the game usin
public static void addFeaturePacks(final AddPackFindersEvent event) {
event.addPackFinders(
// Path relative to your mods 'resources' pointing towards this pack
// Take note this also defines your packs id using the following format
// mod/<namespace>:<path>`, e.g. `mod/examplemod:data/examplemod/datapacks/experimental`
ResourceLocation.fromNamespaceAndPath("examplemod", "data/examplemod/datapacks/experimental"),

// What kind of resources are contained within this pack
Expand Down Expand Up @@ -237,6 +241,8 @@ public static void addFeaturePacks(final AddPackFindersEvent event) {

### Data Generation

_See also: [Datagen](../resources/index.md#data-generation)_

Feature packs can be generated during regular mod datagen. This is best used in combination with built-in packs, but it is also possible to zip up the generated result and share it as an external pack. Just choose one, i.e. don't provide it as an external pack and also bundle it as a built-in pack.
```java
Expand Down

1 comment on commit c7e0ceb

@neoforged-pages-deployments
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploying with Cloudflare Pages

Name Result
Last commit: c7e0ceb262d84f1c0bc64981a397125a71e681de
Status: ✅ Deploy successful!
Preview URL: https://9df0ad32.neoforged-docs-previews.pages.dev
PR Preview URL: https://pr-184.neoforged-docs-previews.pages.dev

Please sign in to comment.