Skip to content

Commit

Permalink
Allow API to hook into WrappedBootstrapContext
Browse files Browse the repository at this point in the history
  • Loading branch information
Dueris committed Jun 19, 2024
1 parent 36841f6 commit a25285b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion origins/src/main/java/me/dueris/genesismc/Bootstrap.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,14 @@
import java.util.Comparator;
import java.util.Optional;
import java.util.Properties;
import java.util.function.Consumer;
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;

// TODO: MachineMaker PluginDatapacks
// TODO: WaterProtection Enchantment - 1.21
public class Bootstrap implements PluginBootstrap {
public static ArrayList<String> oldDV = new ArrayList<>();
public static ArrayList<Consumer<WrappedBootstrapContext>> apiCalls = new ArrayList<>();

static {
oldDV.add("OriginsGenesis");
Expand Down Expand Up @@ -138,6 +139,9 @@ public static String levelNameProp() {
public void bootstrap(@NotNull BootstrapContext bootContext) {
WrappedBootstrapContext context = new WrappedBootstrapContext(bootContext);
NMSBootstrap.bootstrap(context);
for (Consumer<WrappedBootstrapContext> apiCall : apiCalls) {
apiCall.accept(context);
}
File packDir = new File(this.parseDatapackPath());
try {
copyOriginDatapack(packDir.toPath(), context);
Expand Down

0 comments on commit a25285b

Please sign in to comment.