From b94e484d87a8f6bf76a79ec33a7678bf3bac0e08 Mon Sep 17 00:00:00 2001 From: Apex Date: Thu, 24 Oct 2024 08:03:50 +0100 Subject: [PATCH] Add method to allow building custom DataGenerator.PackGenerator instances --- patches/net/minecraft/data/DataGenerator.java.patch | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/patches/net/minecraft/data/DataGenerator.java.patch b/patches/net/minecraft/data/DataGenerator.java.patch index 58bccf1011..b69eda6e22 100644 --- a/patches/net/minecraft/data/DataGenerator.java.patch +++ b/patches/net/minecraft/data/DataGenerator.java.patch @@ -16,7 +16,7 @@ stopwatch1.start(); hashcache.applyUpdate(hashcache.generateUpdate(p_254418_, p_253750_::run).join()); stopwatch1.stop(); -@@ -56,6 +_,51 @@ +@@ -56,6 +_,55 @@ public DataGenerator.PackGenerator getBuiltinDatapack(boolean p_253826_, String p_254134_) { Path path = this.vanillaPackOutput.getOutputFolder(PackOutput.Target.DATA_PACK).resolve("minecraft").resolve("datapacks").resolve(p_254134_); return new DataGenerator.PackGenerator(p_253826_, p_254134_, new PackOutput(path)); @@ -39,6 +39,10 @@ + return new PackOutput(rootOutputFolder.resolve(path)); + } + ++ public PackGenerator getPackGenerator(boolean run, String providerPrefix, String path) { ++ return new PackGenerator(run, providerPrefix, getPackOutput(path)); ++ } ++ + public T addProvider(boolean run, DataProvider.Factory factory) { + return addProvider(run, factory.create(this.vanillaPackOutput)); + }