tutorial:datagen_tags
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
tutorial:datagen_tags [2022/08/16 18:59] – mineblock11 | tutorial:datagen_tags [2023/06/05 18:22] (current) – [Adding stuff to the builder] mcrafterzz | ||
---|---|---|---|
Line 5: | Line 5: | ||
This page will follow you through all aspects of this provider. | This page will follow you through all aspects of this provider. | ||
- | To create a tag generator, create a class that extends '' | + | To create a tag generator, create a class that extends '' |
<code java> | <code java> | ||
- | private static class MyTagGenerator extends | + | private static class MyTagGenerator extends |
- | | + | |
- | | + | super(output, completableFuture); |
} | } | ||
| | ||
- | | + | |
+ | | ||
} | } | ||
} | } | ||
Line 33: | Line 33: | ||
===== Adding a tag ===== | ===== Adding a tag ===== | ||
- | To add a tag, simply call the '' | + | To add a tag, simply call the '' |
<code java> | <code java> | ||
- | private static final TagKey< | + | private static final TagKey< |
@Override | @Override | ||
- | protected void generateTags() { | + | protected void configure(WrapperLookup arg) { |
// This creates a tag builder, where we add slime balls, rotten flesh and everything in the minecraft: | // This creates a tag builder, where we add slime balls, rotten flesh and everything in the minecraft: | ||
| | ||
Line 49: | Line 49: | ||
</ | </ | ||
- | Output from above example: | + | Output from the example |
<file javascript smelly_items.json> | <file javascript smelly_items.json> | ||
Line 80: | Line 80: | ||
<code java> | <code java> | ||
- | private static final TagKey< | + | private static final TagKey< |
@Override | @Override | ||
- | protected void generateTags() { | + | protected void configure(WrapperLookup arg) { |
| | ||
.add(Items.SLIME_BALL) | .add(Items.SLIME_BALL) |
tutorial/datagen_tags.1660676346.txt.gz · Last modified: 2022/08/16 18:59 by mineblock11