mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-21 12:42:26 +00:00
Deprecate GatherDataEvent.validate() as validation always happens. And made ExistingFileHelper always function. Closes #10516
This commit is contained in:
4 files changed
+6
-5
No files matched your search
@@ -15,7 +15,7 @@
|
||||
boolean flag1 = flag || optionset.has(optionspec1);
|
||||
Bootstrap.bootStrap();
|
||||
ClientBootstrap.bootstrap();
|
||||
+ if (!loader.run(optionset, path, input, flag, flag1, flag, flag, false))
|
||||
+ if (!loader.run(optionset, path, input, flag, flag1, flag, flag, true))
|
||||
+ return;
|
||||
DataGenerator datagenerator = new DataGenerator(path, SharedConstants.getCurrentVersion(), true);
|
||||
addClientProviders(datagenerator, flag1);
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
boolean flag2 = flag || optionset.has(optionspec2);
|
||||
boolean flag3 = flag || optionset.has(optionspec3);
|
||||
Collection<Path> collection = optionset.valuesOf(optionspec6).stream().map(p_129659_ -> Paths.get(p_129659_)).toList();
|
||||
+ if (!loader.run(optionset, path, collection, flag1, flag, flag2, flag3, false))
|
||||
+ if (!loader.run(optionset, path, collection, flag1, flag, flag2, flag3, true))
|
||||
+ return;
|
||||
DataGenerator datagenerator = new DataGenerator(path, SharedConstants.getCurrentVersion(), true);
|
||||
addServerProviders(datagenerator, collection, flag1, flag2, flag3);
|
||||
|
||||
@@ -159,9 +159,6 @@ public class ExistingFileHelper {
|
||||
* otherwise
|
||||
*/
|
||||
public boolean exists(ResourceLocation loc, PackType packType) {
|
||||
if (!enable) {
|
||||
return true;
|
||||
}
|
||||
return generated.get(packType).contains(loc) || getManager(packType).getResource(loc).isPresent();
|
||||
}
|
||||
|
||||
@@ -261,7 +258,9 @@ public class ExistingFileHelper {
|
||||
|
||||
/**
|
||||
* @return {@code true} if validation is enabled, {@code false} otherwise
|
||||
* @deprecated Validation is always enabled, check things as you deem fit.
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "1.21.5")
|
||||
public boolean isEnabled() {
|
||||
return enable;
|
||||
}
|
||||
|
||||
@@ -52,6 +52,7 @@ public final class GatherDataEvent extends Event implements IModBusEvent
|
||||
public boolean includeClient() { return this.config.client; }
|
||||
public boolean includeDev() { return this.config.dev; }
|
||||
public boolean includeReports() { return this.config.reports; }
|
||||
@Deprecated(forRemoval = true, since = "1.21.5") // Validation is always enabled, check things as you deem fit.
|
||||
public boolean validate() { return this.config.validate; }
|
||||
|
||||
public static final class DataGeneratorConfig {
|
||||
@@ -63,6 +64,7 @@ public final class GatherDataEvent extends Event implements IModBusEvent
|
||||
private final boolean client;
|
||||
private final boolean dev;
|
||||
private final boolean reports;
|
||||
@Deprecated(forRemoval = true, since = "1.21.5") // Validation is always enabled, check things as you deem fit.
|
||||
private final boolean validate;
|
||||
private final boolean flat;
|
||||
private final List<DataGenerator> generators = new ArrayList<>();
|
||||
|
||||
Reference in new issue
Block a user