mirror of
https://github.com/Xiao-MoMi/craft-engine.git
synced 2026-01-06 15:52:03 +00:00
Merge branch 'Xiao-MoMi:dev' into dev
This commit is contained in:
@@ -205,6 +205,7 @@ tasks {
|
||||
* Register Run Dev Server Tasks
|
||||
*/
|
||||
listOf(
|
||||
"1.21.11",
|
||||
"1.21.10",
|
||||
"1.21.8",
|
||||
"1.21.5",
|
||||
|
||||
@@ -43,7 +43,7 @@ public class ReloadCommand extends BukkitCommandFeature<CommandSender> {
|
||||
Component.text(reloadResult.syncTime())
|
||||
);
|
||||
});
|
||||
} catch (Exception e) {
|
||||
} catch (Throwable e) {
|
||||
handleFeedback(context, MessageConstants.COMMAND_RELOAD_CONFIG_FAILURE);
|
||||
plugin().logger().warn("Failed to reload config", e);
|
||||
}
|
||||
@@ -56,7 +56,7 @@ public class ReloadCommand extends BukkitCommandFeature<CommandSender> {
|
||||
Component.text(reloadResult.syncTime())
|
||||
);
|
||||
});
|
||||
} catch (Exception e) {
|
||||
} catch (Throwable e) {
|
||||
handleFeedback(context, MessageConstants.COMMAND_RELOAD_CONFIG_FAILURE);
|
||||
plugin().logger().warn("Failed to reload config", e);
|
||||
}
|
||||
@@ -68,7 +68,7 @@ public class ReloadCommand extends BukkitCommandFeature<CommandSender> {
|
||||
long time2 = System.currentTimeMillis();
|
||||
long packTime = time2 - time1;
|
||||
handleFeedback(context, MessageConstants.COMMAND_RELOAD_PACK_SUCCESS, Component.text(packTime));
|
||||
} catch (Exception e) {
|
||||
} catch (Throwable e) {
|
||||
handleFeedback(context, MessageConstants.COMMAND_RELOAD_PACK_FAILURE);
|
||||
plugin().logger().warn("Failed to generate resource pack", e);
|
||||
}
|
||||
@@ -88,7 +88,7 @@ public class ReloadCommand extends BukkitCommandFeature<CommandSender> {
|
||||
Component.text(reloadResult.syncTime()),
|
||||
Component.text(packTime)
|
||||
);
|
||||
} catch (Exception e) {
|
||||
} catch (Throwable e) {
|
||||
handleFeedback(context, MessageConstants.COMMAND_RELOAD_PACK_FAILURE);
|
||||
plugin().logger().warn("Failed to generate resource pack", e);
|
||||
} finally {
|
||||
|
||||
|
Before Width: | Height: | Size: 258 B After Width: | Height: | Size: 258 B |
|
Before Width: | Height: | Size: 167 B After Width: | Height: | Size: 167 B |
@@ -38,6 +38,7 @@ public abstract class Furniture implements Cullable {
|
||||
public final CustomFurniture config;
|
||||
public final FurnitureDataAccessor dataAccessor;
|
||||
public final Entity metaDataEntity;
|
||||
public final int metaDataEntityId;
|
||||
|
||||
protected CullingData cullingData;
|
||||
protected FurnitureVariant currentVariant;
|
||||
@@ -54,6 +55,7 @@ public abstract class Furniture implements Cullable {
|
||||
this.config = config;
|
||||
this.dataAccessor = data;
|
||||
this.metaDataEntity = metaDataEntity;
|
||||
this.metaDataEntityId = metaDataEntity.entityId();
|
||||
this.setVariantInternal(config.getVariant(data));
|
||||
}
|
||||
|
||||
@@ -282,11 +284,11 @@ public abstract class Furniture implements Cullable {
|
||||
}
|
||||
|
||||
public int entityId() {
|
||||
return this.metaDataEntity.entityId();
|
||||
return this.metaDataEntityId;
|
||||
}
|
||||
|
||||
public boolean hasExternalModel() {
|
||||
return hasExternalModel;
|
||||
return this.hasExternalModel;
|
||||
}
|
||||
|
||||
public Vec3d getRelativePosition(Vector3f position) {
|
||||
|
||||
@@ -439,8 +439,6 @@ public abstract class AbstractPackManager implements PackManager {
|
||||
plugin.saveResource("resources/remove_shulker_head/pack.yml");
|
||||
|
||||
// legacy armor
|
||||
plugin.saveResource("resources/legacy_armor/resourcepack/assets/minecraft/textures/trims/entity/humanoid/chainmail.png");
|
||||
plugin.saveResource("resources/legacy_armor/resourcepack/assets/minecraft/textures/trims/entity/humanoid_leggings/chainmail.png");
|
||||
plugin.saveResource("resources/legacy_armor/configuration/chainmail.yml");
|
||||
plugin.saveResource("resources/legacy_armor/pack.yml");
|
||||
|
||||
@@ -451,6 +449,8 @@ public abstract class AbstractPackManager implements PackManager {
|
||||
plugin.saveResource("resources/internal/configuration/offset_chars.yml");
|
||||
plugin.saveResource("resources/internal/configuration/gui.yml");
|
||||
plugin.saveResource("resources/internal/configuration/mappings.yml");
|
||||
plugin.saveResource("resources/internal/resourcepack/assets/minecraft/textures/trims/entity/humanoid/chainmail.png");
|
||||
plugin.saveResource("resources/internal/resourcepack/assets/minecraft/textures/trims/entity/humanoid_leggings/chainmail.png");
|
||||
plugin.saveResource("resources/internal/resourcepack/assets/minecraft/textures/font/offset/space_split.png");
|
||||
plugin.saveResource("resources/internal/resourcepack/assets/minecraft/textures/font/gui/custom/item_browser.png");
|
||||
plugin.saveResource("resources/internal/resourcepack/assets/minecraft/textures/font/gui/custom/category.png");
|
||||
@@ -740,7 +740,7 @@ public abstract class AbstractPackManager implements PackManager {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generateResourcePack() throws IOException {
|
||||
public void generateResourcePack() throws Exception {
|
||||
this.plugin.logger().info(TranslationManager.instance().translateLog("info.resource_pack.start"));
|
||||
long time1 = System.currentTimeMillis();
|
||||
|
||||
@@ -1479,6 +1479,7 @@ public abstract class AbstractPackManager implements PackManager {
|
||||
收集全部 含有贴图的有效模型阶段
|
||||
有效指的是被实际使用的模型
|
||||
|
||||
|
||||
*/
|
||||
|
||||
// 获取所有带贴图的模型以及自定义父模型
|
||||
@@ -3038,7 +3039,7 @@ public abstract class AbstractPackManager implements PackManager {
|
||||
}
|
||||
|
||||
private void processZipFile(Path zipFile, Path sourceFolder, @Nullable FileSystem fs,
|
||||
Map<String, List<Path>> conflictChecker, Map<Path, CachedAssetFile> previousFiles) throws IOException {
|
||||
Map<String, List<Path>> conflictChecker, Map<Path, CachedAssetFile> previousFiles) {
|
||||
try (FileSystem zipFs = FileSystems.newFileSystem(zipFile)) {
|
||||
long zipLastModified = Files.getLastModifiedTime(zipFile).toMillis();
|
||||
long zipSize = Files.size(zipFile);
|
||||
@@ -3063,11 +3064,17 @@ public abstract class AbstractPackManager implements PackManager {
|
||||
cachedAssetFiles.put(sourcePath, cachedAsset);
|
||||
}
|
||||
if (fs != null) {
|
||||
updateConflictChecker(fs, conflictChecker, entry, sourcePath, entryPathInZip, cachedAsset.data());
|
||||
try {
|
||||
updateConflictChecker(fs, conflictChecker, entry, sourcePath, entryPathInZip, cachedAsset.data());
|
||||
} catch (Exception e) {
|
||||
AbstractPackManager.this.plugin.logger().warn("Failed to update conflict checker", e);
|
||||
}
|
||||
}
|
||||
return FileVisitResult.CONTINUE;
|
||||
}
|
||||
});
|
||||
} catch (Exception e) {
|
||||
this.plugin.logger().warn("Failed to process zip file " + zipFile, e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ public interface PackManager extends Manageable {
|
||||
|
||||
void clearResourceConfigs();
|
||||
|
||||
void generateResourcePack() throws IOException;
|
||||
void generateResourcePack() throws Exception;
|
||||
|
||||
Path resourcePackPath();
|
||||
|
||||
|
||||
@@ -145,6 +145,7 @@ public final class Atlas {
|
||||
|
||||
public void addSingle(Key key) {
|
||||
this.single.add(key);
|
||||
this.defined.add(key);
|
||||
}
|
||||
|
||||
// 获取贴图源文件路径,有些类型可能查不到
|
||||
|
||||
@@ -100,7 +100,7 @@ public class ResolutionMergePackMcMeta implements Resolution {
|
||||
newLanguage.add(entry.getKey(), entry.getValue());
|
||||
}
|
||||
});
|
||||
if (!newLanguage.isEmpty()) {
|
||||
if (!newLanguage.asMap().isEmpty()) { // 兼容低版本gson
|
||||
merged.add("language", newLanguage);
|
||||
}
|
||||
// 第七步,合并其他未知元素
|
||||
|
||||
@@ -3,7 +3,7 @@ org.gradle.jvmargs=-Xmx4G
|
||||
# Project settings
|
||||
project_version=0.0.66.4
|
||||
config_version=62
|
||||
lang_version=44
|
||||
lang_version=45
|
||||
project_group=net.momirealms
|
||||
latest_supported_version=1.21.11
|
||||
|
||||
@@ -38,7 +38,7 @@ zstd_version=1.5.7-6
|
||||
commons_io_version=2.21.0
|
||||
commons_lang3_version=3.20.0
|
||||
sparrow_nbt_version=0.10.9
|
||||
sparrow_util_version=0.72
|
||||
sparrow_util_version=0.74
|
||||
fastutil_version=8.5.18
|
||||
netty_version=4.1.128.Final
|
||||
joml_version=1.10.8
|
||||
|
||||
Reference in New Issue
Block a user