Feel free to join our Discord Server in case you got any questions. We're always there to help!
DataProviderHelper cuts down boilerplate
public static void gatherData(GatherDataEvent event) {
event.createProvider(TestBlockStateProvider::new);
event.createProvider(TestItemModelProvider::new);
event.add(TestRecipeProvider::new);
event.createBlockAndItemTags(TestBlockTagsProvider::new, TestItemTagsProvider::new);
event.createProvider(CustomLootTableProvider.builder()
.addBlockProvider(TestBlockLootProvider::new)
//...
.addChestProvider(TestLootTableProvider::new)::build);
}provides various helper methods
If you want to use the included block model templates (e.g. when using head(...)) you need to add '--existing-mod', 'ametrin' to your data run configuration in your build.gradle
programArguments.addAll '--mod', project.mod_id, ..., '--existing-mod', 'ametrin'to create a nether-like portal you need:
- a custom portal block (use
PortalBlock) - Point of Interest matching the portal block
- a default frame block state (what ever you want)
- a tag matching all valid frame blocks
public static final PortalData TEST_PORTAL =
PortalData.builder(Level.NETHER, Level.END)
.poi(TestPoiTypes.TEST_PORTAL) // a deferred handler or a resource key
.portal(TestBlocks.TEST_PORTAL) // or ()-> TestBlocks.TEST_PORTAL.get().defaultBlockState()
.defaultFrame(TestBlocks.TEST_BLOCK) // or ()-> TestBlocks.TEST_BLOCK.get().defaultBlockState()
.validFrames(TestTags.Blocks.TEST_PORTAL_FRAMES)
//.transition(...) // NONE by default
//.particles(...) // optional
//.sounds(...) // optional
.build();You'll probably also want a Catalyst item to open the portal -> PortalCatalystItem
Note: I'll still have to get rid of the nether spiral when teleporting
each boat type is now a separate entity