mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-04-16 13:23:07 +00:00
packDirectory -> rootPath
This commit is contained in:
@@ -41,7 +41,7 @@ public class YamlAddon implements AddonInitializer {
|
||||
.register(addon, ConfigurationDiscoveryEvent.class)
|
||||
.then(event -> {
|
||||
try {
|
||||
FileUtil.filesWithExtension(event.getPack().getPackDirectory(), ".yml")
|
||||
FileUtil.filesWithExtension(event.getPack().getRootPath(), ".yml")
|
||||
.forEach((key, value) -> {
|
||||
LOGGER.debug("Discovered config {}", key);
|
||||
try {
|
||||
|
||||
@@ -29,7 +29,7 @@ record ImageCache(LoadingCache<String, Image> cache) implements Properties {
|
||||
if(!pack.getContext().has(ImageCache.class)) {
|
||||
var cacheBuilder = Caffeine.newBuilder();
|
||||
if(config.unloadOnTimeout()) cacheBuilder.expireAfterAccess(config.getCacheTimeout(), TimeUnit.SECONDS);
|
||||
images = new ImageCache(cacheBuilder.build(s -> loadImage(s, pack.getPackDirectory())));
|
||||
images = new ImageCache(cacheBuilder.build(s -> loadImage(s, pack.getRootPath())));
|
||||
pack.getContext().put(images);
|
||||
} else images = pack.getContext().get(ImageCache.class);
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ public class SpongeSchematicAddon implements AddonInitializer {
|
||||
.then(event -> {
|
||||
CheckedRegistry<Structure> structureRegistry = event.getPack().getOrCreateRegistry(Structure.class);
|
||||
try {
|
||||
FileUtil.filesWithExtension(event.getPack().getPackDirectory(), ".schem")
|
||||
FileUtil.filesWithExtension(event.getPack().getRootPath(), ".schem")
|
||||
.entrySet()
|
||||
.stream()
|
||||
.map(entry -> {
|
||||
|
||||
@@ -41,7 +41,7 @@ public class TerraScriptAddon implements AddonInitializer {
|
||||
CheckedRegistry<Structure> structureRegistry = event.getPack().getOrCreateRegistry(Structure.class);
|
||||
CheckedRegistry<LootTable> lootRegistry = event.getPack().getOrCreateRegistry(LootTable.class);
|
||||
try {
|
||||
FileUtil.filesWithExtension(event.getPack().getPackDirectory(), ".tesf")
|
||||
FileUtil.filesWithExtension(event.getPack().getRootPath(), ".tesf")
|
||||
.entrySet()
|
||||
.stream()
|
||||
.parallel()
|
||||
|
||||
Reference in New Issue
Block a user