mirror of
https://github.com/architectury/architectury-loom.git
synced 2026-04-02 05:27:43 -05:00
Disable deprecated data generation API on NeoForge
This commit is contained in:
@@ -104,6 +104,10 @@ public class ForgeExtensionImpl implements ForgeExtensionAPI {
|
||||
|
||||
@Override
|
||||
public List<String> getDataGenMods() {
|
||||
if (extension.isNeoForge()) {
|
||||
throw new UnsupportedOperationException("getDataGenMods is not available on NeoForge.");
|
||||
}
|
||||
|
||||
// unmod list prevents uncontrolled additions (we want to create the run config too)
|
||||
return Collections.unmodifiableList(dataGenMods);
|
||||
}
|
||||
@@ -111,6 +115,10 @@ public class ForgeExtensionImpl implements ForgeExtensionAPI {
|
||||
@SuppressWarnings("Convert2Lambda")
|
||||
@Override
|
||||
public void dataGen(Action<DataGenConsumer> action) {
|
||||
if (extension.isNeoForge()) {
|
||||
throw new UnsupportedOperationException("dataGen is not available on NeoForge.");
|
||||
}
|
||||
|
||||
action.execute(new DataGenConsumer() {
|
||||
@Override
|
||||
public void mod(String... modIds) {
|
||||
|
||||
Reference in New Issue
Block a user