Skip to content

Commit

Permalink
修正一处错误
Browse files Browse the repository at this point in the history
- 剔除声音包冗余语言文件
  • Loading branch information
TartaricAcid committed Oct 31, 2023
1 parent 129aafb commit 1604f20
Show file tree
Hide file tree
Showing 63 changed files with 6 additions and 195 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -780,6 +780,7 @@ private static void readLanguageFile(ZipFile zipFile, String namespace) throws I
String currentLangPath = String.format("assets/%s/lang/%s.lang", namespace, language);
getLanguageMap(zipFile, newLangData, defaultLangPath);
getLanguageMap(zipFile, newLangData, currentLangPath);
removeOldLanguageKey(newLangData);

languageMapMerge(oldLangData, newLangData);
if (Language.getInstance() instanceof ClientLanguage) {
Expand All @@ -797,6 +798,7 @@ private static void readLanguageFile(Path rootPath, String namespace) throws IOE
String currentLangPath = String.format("assets/%s/lang/%s.lang", namespace, language);
getLanguageMap(rootPath, newLangData, defaultLangPath);
getLanguageMap(rootPath, newLangData, currentLangPath);
removeOldLanguageKey(newLangData);

languageMapMerge(oldLangData, newLangData);
if (Language.getInstance() instanceof ClientLanguage) {
Expand Down Expand Up @@ -847,4 +849,8 @@ private static void languageMapMerge(Map<String, String> oldLangData, Map<String
}
}
}

private static void removeOldLanguageKey(Map<String, String> langData) {
langData.remove("subtitle.touhou_little_maid.other.credit");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ public static ConstantValue subtract(IValue first, IValue second) {
}

@Override

public double get() {
return value;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ enum EDefaultLoopTypes implements ILoopType {
}

@Override

public boolean isRepeatingAfterEnd() {
return this.looping;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ public RawAnimation(String animationName, ILoopType loop) {
}

@Override

public boolean equals(Object obj) {
if (obj == this) {
return true;
Expand All @@ -33,7 +32,6 @@ public boolean equals(Object obj) {
}

@Override

public int hashCode() {
return Objects.hash(this.animationName, this.loopType);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

public record EasingFunctionArgs(EasingType easingType, Double arg0) {
@Override

public boolean equals(Object o) {
if (this == o) {
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ public AnimationPoint(KeyFrame keyframe, double tick, double animationEndTick, d
}

@Override

public String toString() {
return "Tick: " + currentTick + " | End Tick: " + animationEndTick + " | Start Value: " + animationStartValue
+ " | End Value: " + animationEndValue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,11 @@ public void setEndValue(T endValue) {
}

@Override

public int hashCode() {
return Objects.hash(length, startValue, endValue);
}

@Override

public boolean equals(Object obj) {
return obj instanceof KeyFrame && hashCode() == obj.hashCode();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ public InstancedAnimationFactory(IAnimatable animatable) {
}

@Override

public AnimationData getOrCreateAnimationData(int uniqueID) {
if (this.animationData == null) {
this.animationData = new AnimationData();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ public static LazyVariable from(Variable variable) {
}

@Override

public void set(double value) {
this.valueSupplier = () -> value;
}
Expand All @@ -36,7 +35,6 @@ public void set(DoubleSupplier valueSupplier) {
}

@Override

public double get() {
return this.valueSupplier.getAsDouble();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ private void doCoreRemaps() {
}

@Override

public void register(Variable variable) {
if (!(variable instanceof LazyVariable)) {
variable = LazyVariable.from(variable);
Expand Down Expand Up @@ -97,7 +96,6 @@ public void setValue(String name, DoubleSupplier value) {
}

@Override

protected LazyVariable getVariable(String name) {
return VARIABLES.computeIfAbsent(name, key -> new LazyVariable(key, 0));
}
Expand Down Expand Up @@ -202,7 +200,6 @@ private IValue parseSymbolsMolang(List<Object> symbols) throws MolangException {
* 这样就能更加轻松解析赋值表达式
*/
@Override

protected boolean isOperator(String s) {
return super.isOperator(s) || s.equals("=");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,13 @@ public MolangAssignment(MolangParser context, Variable variable, IValue expressi
}

@Override

public double get() {
double value = this.expression.get();
this.variable.set(value);
return value;
}

@Override

public String toString() {
return this.variable.getName() + " = " + this.expression.toString();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ public MolangMultiStatement(MolangParser context) {
}

@Override

public double get() {
double value = 0;
for (MolangExpression expression : this.expressions) {
Expand All @@ -28,7 +27,6 @@ public double get() {
}

@Override

public String toString() {
StringJoiner builder = new StringJoiner("; ");
for (MolangExpression expression : this.expressions) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,16 @@ public MolangExpression addReturn() {
}

@Override

public double get() {
return this.value.get();
}

@Override

public String toString() {
return (this.returns ? MolangParser.RETURN : "") + this.value.toString();
}

@Override

public JsonElement toJson() {
if (this.value instanceof Constant) {
return new JsonPrimitive(this.value.get());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,11 @@ public CosDegrees(IValue[] values, String name) throws Exception {
}

@Override

public int getRequiredArguments() {
return 1;
}

@Override

public double get() {
return Math.cos(this.getArg(0) / 180 * Math.PI);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,11 @@ public SinDegrees(IValue[] values, String name) throws Exception {
}

@Override

public int getRequiredArguments() {
return 1;
}

@Override

public double get() {
return Math.sin(this.getArg(0) / 180 * Math.PI);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ public BoneSnapshot(BoneSnapshot snapshot) {
}

@Override

public boolean equals(Object o) {
if (this == o) {
return true;
Expand All @@ -97,7 +96,6 @@ public boolean equals(Object o) {
}

@Override

public int hashCode() {
return name.hashCode();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@ public Color darker(double factor) {
}

@Override

public boolean equals(Object other) {
if (this == other) {
return true;
Expand All @@ -166,13 +165,11 @@ public boolean equals(Object other) {
}

@Override

public int hashCode() {
return color;
}

@Override

public String toString() {
return String.valueOf(color);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,20 +97,17 @@ private static void renderLeashPiece(VertexConsumer buffer, Matrix4f positionMat
}

@Override

@Nonnull
public IRenderCycle getCurrentModelRenderCycle() {
return this.currentModelRenderCycle;
}

@Override

public void setCurrentModelRenderCycle(IRenderCycle currentModelRenderCycle) {
this.currentModelRenderCycle = currentModelRenderCycle;
}

@Override

public void renderEarly(T animatable, PoseStack poseStack, float partialTick, MultiBufferSource bufferSource,
VertexConsumer buffer, int packedLight, int packedOverlay, float red, float green, float blue,
float partialTicks) {
Expand All @@ -129,7 +126,6 @@ public void renderEarly(T animatable, PoseStack poseStack, float partialTick, Mu
}

@Override

public void render(T animatable, float entityYaw, float partialTick, PoseStack poseStack, MultiBufferSource bufferSource, int packedLight) {
setCurrentModelRenderCycle(EModelRenderCycle.INITIAL);
poseStack.pushPose();
Expand Down Expand Up @@ -221,7 +217,6 @@ packedLight, getOverlay(animatable, 0), renderColor.getRed() / 255f,
}

@Override

public void renderRecursively(GeoBone bone, PoseStack poseStack, VertexConsumer buffer, int packedLight,
int packedOverlay, float red, float green, float blue, float alpha) {
poseStack.pushPose();
Expand Down Expand Up @@ -272,25 +267,21 @@ protected void renderLayer(PoseStack poseStack, MultiBufferSource bufferSource,
}

@Override

public int getInstanceId(T animatable) {
return animatable.getId();
}

@Override

public GeoModelProvider<T> getGeoModelProvider() {
return this.modelProvider;
}

@Override

public float getWidthScale(T animatable) {
return this.widthScale;
}

@Override

public float getHeightScale(T entity) {
return this.heightScale;
}
Expand Down Expand Up @@ -342,7 +333,6 @@ protected float getDeathMaxRotation(T animatable) {
}

@Override

public boolean shouldShowName(T animatable) {
double nameRenderDistance = animatable.isDiscrete() ? 32d : 64d;
if (this.entityRenderDispatcher.distanceToSqr(animatable) >= nameRenderDistance * nameRenderDistance) {
Expand All @@ -360,7 +350,6 @@ protected float getSwingMotionAnimThreshold() {
}

@Override

public ResourceLocation getTextureLocation(T animatable) {
return this.modelProvider.getTextureLocation(animatable);
}
Expand Down Expand Up @@ -408,13 +397,11 @@ public <E extends Entity> void renderLeash(T entity, float partialTick, PoseStac
}

@Override

public MultiBufferSource getCurrentRTB() {
return this.rtb;
}

@Override

public void setCurrentRTB(MultiBufferSource bufferSource) {
this.rtb = bufferSource;
}
Expand Down
Loading

0 comments on commit 1604f20

Please sign in to comment.