mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-11-28 16:54:04 +00:00
Keep the .zed editor settings folder out of pack hotload watchers
ZedProjectSettings writes <pack>/.zed/settings.json, a .json file inside the watched pack, so hand edits reloaded the studio engine. Both watchers now share one PackHotloadFolder factory that ignores the folder. The chunk/hotload exclusion is already covered by the engine transition seal. v3: 28968673a
This commit is contained in:
1 parent
7053224ba5
commit
5efffcd0b2
4 files changed
+106
-12
No files matched your search
@@ -0,0 +1,24 @@
|
||||
package art.arcane.iris.core.project;
|
||||
|
||||
import art.arcane.volmlib.util.collection.KList;
|
||||
import art.arcane.volmlib.util.function.Consumer3;
|
||||
import art.arcane.volmlib.util.io.ReactiveFolder;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public final class PackHotloadFolder {
|
||||
private static final String EDITOR_SETTINGS_FOLDER = File.separator + ".zed" + File.separator;
|
||||
|
||||
private PackHotloadFolder() {
|
||||
}
|
||||
|
||||
public static ReactiveFolder watch(File packFolder, Consumer3<KList<File>, KList<File>, KList<File>> hotload) {
|
||||
return new ReactiveFolder(
|
||||
packFolder,
|
||||
hotload,
|
||||
new KList<>(".iob", ".json", ".jar"),
|
||||
new KList<>(".iris", EDITOR_SETTINGS_FOLDER),
|
||||
new KList<>()
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -32,6 +32,7 @@ import art.arcane.iris.core.IrisWorlds;
|
||||
import art.arcane.iris.core.gui.PregeneratorJob;
|
||||
import art.arcane.iris.core.loader.IrisData;
|
||||
import art.arcane.iris.core.nms.INMS;
|
||||
import art.arcane.iris.core.project.PackHotloadFolder;
|
||||
import art.arcane.iris.core.runtime.ObjectStudioActivation;
|
||||
import art.arcane.iris.core.runtime.jigsaw.JigsawStudioActivation;
|
||||
import art.arcane.iris.core.runtime.jigsaw.JigsawStudioSession;
|
||||
@@ -149,13 +150,7 @@ public class BukkitChunkGenerator extends ChunkGenerator implements PlatformChun
|
||||
this.studioEntryBootstrapActive = new AtomicBoolean(studio);
|
||||
this.dataLocation = dataLocation;
|
||||
this.dimensionKey = dimensionKey;
|
||||
this.folder = new ReactiveFolder(
|
||||
dataLocation,
|
||||
(_a, _b, _c) -> hotloadFromWatcher(),
|
||||
new KList<>(".iob", ".json", ".jar"),
|
||||
new KList<>(".iris"),
|
||||
new KList<>()
|
||||
);
|
||||
this.folder = PackHotloadFolder.watch(dataLocation, (_a, _b, _c) -> hotloadFromWatcher());
|
||||
this.initializationFailure = null;
|
||||
this.jigsawStudioActive = false;
|
||||
this.validatedDimension = null;
|
||||
|
||||
Reference in new issue
Block a user