Allow extending UpgradeDataProvider

Closes #1477
This commit is contained in:
Jonathan Coates 2023-06-15 18:57:25 +01:00
parent c7f3d4f45d
commit df591cd7c6
No known key found for this signature in database
GPG Key ID: B9E431FF07C98D06
1 changed files with 3 additions and 2 deletions

View File

@ -24,6 +24,7 @@
import javax.annotation.Nullable;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
@ -104,7 +105,7 @@ public final Upgrade<R> simpleWithCustomItem(ResourceLocation id, R serialiser,
protected abstract void addUpgrades(Consumer<Upgrade<R>> addUpgrade);
@Override
public final CompletableFuture<?> run(CachedOutput cache) {
public CompletableFuture<?> run(CachedOutput cache) {
var base = output.getOutputFolder().resolve("data");
Set<ResourceLocation> seen = new HashSet<>();
@ -127,7 +128,7 @@ public final CompletableFuture<?> run(CachedOutput cache) {
}
});
this.upgrades = upgrades;
this.upgrades = Collections.unmodifiableList(upgrades);
return Util.sequenceFailFast(futures);
}