version 0.0.8

This commit is contained in:
LostInLinearPast 2025-11-01 20:40:54 +08:00
parent 1206758322
commit 64e45d3000
3 changed files with 7 additions and 14 deletions

View File

@ -1,3 +1,4 @@
//file:noinspection GroovyAssignabilityCheck
buildscript {
repositories {
maven { url = 'https://repo.spongepowered.org/repository/maven-public/' }
@ -127,6 +128,9 @@ dependencies {
implementation fg.deobf("dev.kosmx.player-anim:player-animation-lib-forge:1.0.2-rc1+1.20")
implementation fg.deobf("io.github.kosmx.bendy-lib:bendy-lib-forge:4.0.0")
// implementation fg.deobf("curse.maven:cloth-config-348521:5729105")
// implementation fg.deobf("curse.maven:better-combat-by-daedelus-639842:5625757")
// implementation fg.deobf("curse.maven:freecam-by-zergatul-618947:5402097")
}

View File

@ -12,7 +12,7 @@ mapping_version=2023.09.03-1.20.1
mod_id=sccore
mod_name=SnowyCrescentCore
mod_license=GNU AGPL 3.0
mod_version=1.20.1-0.0.7-hotfix
mod_version=1.20.1-0.0.8
mod_group_id=com.linearpast
mod_authors=LostInLinearPast
mod_description=A lib about capability and player animator.

View File

@ -261,19 +261,8 @@ public class AnimationRegistry {
ArrayList<Pair<Integer, IAnimation>> oldArrayList = (ArrayList<Pair<Integer, IAnimation>>) layersField.get(oldAnimationStack);
ArrayList<Pair<Integer, IAnimation>> newArrayList = (ArrayList<Pair<Integer, IAnimation>>) layersField.get(newAnimationStack);
ArrayList<Pair<Integer, IAnimation>> result = new ArrayList<>();
ArrayList<Pair<Integer, IAnimation>> newListCopy = new ArrayList<>(newArrayList);
for (Pair<Integer, IAnimation> oldPair : oldArrayList) {
newListCopy.removeIf(pair -> {
if(pair.getLeft().equals(oldPair.getLeft())) {
result.add(pair);
return true;
} else {
result.add(oldPair);
return false;
}
});
}
result.addAll(newListCopy);
result.addAll(oldArrayList);
result.addAll(newArrayList);
layersField.set(newAnimationStack, result);
animationStackField.set(player, newAnimationStack);
Field animationApplierField = playerClass.getDeclaredField("animationApplier");