Merge branch 'master' into 1.17
This commit is contained in:
commit
cab37358ed
7 files changed
+174
-41
No files matched your search
@@ -48,6 +48,7 @@ import net.minecraft.util.math.BlockPos;
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
|
||||
import java.math.BigInteger;
|
||||
import java.nio.file.Path;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
@@ -997,6 +998,12 @@ public class CarpetScriptHost extends ScriptHost
|
||||
return fdesc.listFolder(main);
|
||||
}
|
||||
|
||||
public boolean applyActionForResource(String path, boolean shared, Consumer<Path> action)
|
||||
{
|
||||
FileArgument fdesc = FileArgument.resourceFromPath(path, FileArgument.Reason.CREATE, shared);
|
||||
return fdesc.findPathAndApply(main, action);
|
||||
}
|
||||
|
||||
|
||||
public void tick()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user