From 1604f202bc2d98a2ffb9cb313c714d721bc67ffb Mon Sep 17 00:00:00 2001 From: tartaric_acid Date: Tue, 31 Oct 2023 13:48:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E4=B8=80=E5=A4=84=E9=94=99?= =?UTF-8?q?=E8=AF=AF=20-=20=E5=89=94=E9=99=A4=E5=A3=B0=E9=9F=B3=E5=8C=85?= =?UTF-8?q?=E5=86=97=E4=BD=99=E8=AF=AD=E8=A8=80=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../client/resource/CustomPackLoader.java | 6 ++++ .../geckolib3/core/ConstantValue.java | 1 - .../geckolib3/core/builder/ILoopType.java | 1 - .../geckolib3/core/builder/RawAnimation.java | 2 -- .../core/easing/EasingFunctionArgs.java | 1 - .../core/keyframe/AnimationPoint.java | 1 - .../geckolib3/core/keyframe/KeyFrame.java | 2 -- .../manager/InstancedAnimationFactory.java | 1 - .../geckolib3/core/molang/LazyVariable.java | 2 -- .../geckolib3/core/molang/MolangParser.java | 3 -- .../molang/expressions/MolangAssignment.java | 2 -- .../expressions/MolangMultiStatement.java | 2 -- .../core/molang/expressions/MolangValue.java | 3 -- .../core/molang/functions/CosDegrees.java | 2 -- .../core/molang/functions/SinDegrees.java | 2 -- .../geckolib3/core/snapshot/BoneSnapshot.java | 2 -- .../geckolib3/core/util/Color.java | 3 -- .../geckolib3/geo/GeoEntityRenderer.java | 13 ------- .../geo/GeoReplacedEntityRenderer.java | 13 ------- .../geckolib3/geo/raw/pojo/FormatVersion.java | 2 -- .../geckolib3/geo/raw/pojo/LocatorValue.java | 2 -- .../geckolib3/geo/raw/pojo/PolysUnion.java | 2 -- .../geckolib3/geo/raw/pojo/UvUnion.java | 2 -- .../geckolib3/geo/render/GeoBuilder.java | 2 -- .../geckolib3/geo/render/built/GeoBone.java | 34 ------------------- .../geckolib3/model/AnimatedGeoModel.java | 4 --- .../touhoulittlemaid/mclib/math/Constant.java | 2 -- .../touhoulittlemaid/mclib/math/Group.java | 2 -- .../touhoulittlemaid/mclib/math/Negate.java | 2 -- .../touhoulittlemaid/mclib/math/Negative.java | 2 -- .../mclib/math/Operation.java | 14 -------- .../touhoulittlemaid/mclib/math/Operator.java | 2 -- .../touhoulittlemaid/mclib/math/Ternary.java | 2 -- .../touhoulittlemaid/mclib/math/Variable.java | 2 -- .../mclib/math/functions/Function.java | 1 - .../mclib/math/functions/classic/ACos.java | 2 -- .../mclib/math/functions/classic/ASin.java | 2 -- .../mclib/math/functions/classic/ATan.java | 2 -- .../mclib/math/functions/classic/ATan2.java | 2 -- .../mclib/math/functions/classic/Abs.java | 2 -- .../mclib/math/functions/classic/Cos.java | 2 -- .../mclib/math/functions/classic/Exp.java | 2 -- .../mclib/math/functions/classic/Ln.java | 2 -- .../mclib/math/functions/classic/Mod.java | 2 -- .../mclib/math/functions/classic/Pi.java | 1 - .../mclib/math/functions/classic/Pow.java | 2 -- .../mclib/math/functions/classic/Sin.java | 2 -- .../mclib/math/functions/classic/Sqrt.java | 2 -- .../mclib/math/functions/limit/Clamp.java | 2 -- .../mclib/math/functions/limit/Max.java | 2 -- .../mclib/math/functions/limit/Min.java | 2 -- .../mclib/math/functions/rounding/Ceil.java | 2 -- .../mclib/math/functions/rounding/Floor.java | 2 -- .../mclib/math/functions/rounding/Round.java | 2 -- .../mclib/math/functions/rounding/Trunc.java | 2 -- .../mclib/math/functions/utility/DieRoll.java | 2 -- .../functions/utility/DieRollInteger.java | 2 -- .../math/functions/utility/HermiteBlend.java | 2 -- .../mclib/math/functions/utility/Lerp.java | 2 -- .../math/functions/utility/LerpRotate.java | 2 -- .../mclib/math/functions/utility/Random.java | 1 - .../math/functions/utility/RandomInteger.java | 2 -- .../mclib/utils/Interpolation.java | 10 ------ 63 files changed, 6 insertions(+), 195 deletions(-) diff --git a/src/main/java/com/github/tartaricacid/touhoulittlemaid/client/resource/CustomPackLoader.java b/src/main/java/com/github/tartaricacid/touhoulittlemaid/client/resource/CustomPackLoader.java index 99ea5a12c..c5922dc6d 100644 --- a/src/main/java/com/github/tartaricacid/touhoulittlemaid/client/resource/CustomPackLoader.java +++ b/src/main/java/com/github/tartaricacid/touhoulittlemaid/client/resource/CustomPackLoader.java @@ -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) { @@ -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) { @@ -847,4 +849,8 @@ private static void languageMapMerge(Map oldLangData, Map langData) { + langData.remove("subtitle.touhou_little_maid.other.credit"); + } } diff --git a/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/core/ConstantValue.java b/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/core/ConstantValue.java index da7bdef13..42b831d62 100644 --- a/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/core/ConstantValue.java +++ b/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/core/ConstantValue.java @@ -31,7 +31,6 @@ public static ConstantValue subtract(IValue first, IValue second) { } @Override - public double get() { return value; } diff --git a/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/core/builder/ILoopType.java b/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/core/builder/ILoopType.java index 13083d7ec..c1a8dbe7b 100644 --- a/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/core/builder/ILoopType.java +++ b/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/core/builder/ILoopType.java @@ -64,7 +64,6 @@ enum EDefaultLoopTypes implements ILoopType { } @Override - public boolean isRepeatingAfterEnd() { return this.looping; } diff --git a/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/core/builder/RawAnimation.java b/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/core/builder/RawAnimation.java index 553f2c47c..b5d50da78 100644 --- a/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/core/builder/RawAnimation.java +++ b/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/core/builder/RawAnimation.java @@ -21,7 +21,6 @@ public RawAnimation(String animationName, ILoopType loop) { } @Override - public boolean equals(Object obj) { if (obj == this) { return true; @@ -33,7 +32,6 @@ public boolean equals(Object obj) { } @Override - public int hashCode() { return Objects.hash(this.animationName, this.loopType); } diff --git a/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/core/easing/EasingFunctionArgs.java b/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/core/easing/EasingFunctionArgs.java index d710224ca..bbb500744 100644 --- a/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/core/easing/EasingFunctionArgs.java +++ b/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/core/easing/EasingFunctionArgs.java @@ -5,7 +5,6 @@ public record EasingFunctionArgs(EasingType easingType, Double arg0) { @Override - public boolean equals(Object o) { if (this == o) { return true; diff --git a/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/core/keyframe/AnimationPoint.java b/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/core/keyframe/AnimationPoint.java index 323f4c617..c10af0dca 100644 --- a/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/core/keyframe/AnimationPoint.java +++ b/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/core/keyframe/AnimationPoint.java @@ -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; diff --git a/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/core/keyframe/KeyFrame.java b/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/core/keyframe/KeyFrame.java index 6ecb25ced..729326424 100644 --- a/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/core/keyframe/KeyFrame.java +++ b/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/core/keyframe/KeyFrame.java @@ -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(); } diff --git a/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/core/manager/InstancedAnimationFactory.java b/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/core/manager/InstancedAnimationFactory.java index dd417500c..a5e30a183 100644 --- a/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/core/manager/InstancedAnimationFactory.java +++ b/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/core/manager/InstancedAnimationFactory.java @@ -11,7 +11,6 @@ public InstancedAnimationFactory(IAnimatable animatable) { } @Override - public AnimationData getOrCreateAnimationData(int uniqueID) { if (this.animationData == null) { this.animationData = new AnimationData(); diff --git a/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/core/molang/LazyVariable.java b/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/core/molang/LazyVariable.java index 6b2b5f084..9f9764c7b 100644 --- a/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/core/molang/LazyVariable.java +++ b/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/core/molang/LazyVariable.java @@ -26,7 +26,6 @@ public static LazyVariable from(Variable variable) { } @Override - public void set(double value) { this.valueSupplier = () -> value; } @@ -36,7 +35,6 @@ public void set(DoubleSupplier valueSupplier) { } @Override - public double get() { return this.valueSupplier.getAsDouble(); } diff --git a/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/core/molang/MolangParser.java b/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/core/molang/MolangParser.java index 7d8336330..e76a17617 100644 --- a/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/core/molang/MolangParser.java +++ b/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/core/molang/MolangParser.java @@ -69,7 +69,6 @@ private void doCoreRemaps() { } @Override - public void register(Variable variable) { if (!(variable instanceof LazyVariable)) { variable = LazyVariable.from(variable); @@ -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)); } @@ -202,7 +200,6 @@ private IValue parseSymbolsMolang(List symbols) throws MolangException { * 这样就能更加轻松解析赋值表达式 */ @Override - protected boolean isOperator(String s) { return super.isOperator(s) || s.equals("="); } diff --git a/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/core/molang/expressions/MolangAssignment.java b/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/core/molang/expressions/MolangAssignment.java index 157a24144..73e3851e6 100644 --- a/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/core/molang/expressions/MolangAssignment.java +++ b/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/core/molang/expressions/MolangAssignment.java @@ -16,7 +16,6 @@ public MolangAssignment(MolangParser context, Variable variable, IValue expressi } @Override - public double get() { double value = this.expression.get(); this.variable.set(value); @@ -24,7 +23,6 @@ public double get() { } @Override - public String toString() { return this.variable.getName() + " = " + this.expression.toString(); } diff --git a/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/core/molang/expressions/MolangMultiStatement.java b/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/core/molang/expressions/MolangMultiStatement.java index 0b560429b..fec569a32 100644 --- a/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/core/molang/expressions/MolangMultiStatement.java +++ b/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/core/molang/expressions/MolangMultiStatement.java @@ -18,7 +18,6 @@ public MolangMultiStatement(MolangParser context) { } @Override - public double get() { double value = 0; for (MolangExpression expression : this.expressions) { @@ -28,7 +27,6 @@ public double get() { } @Override - public String toString() { StringJoiner builder = new StringJoiner("; "); for (MolangExpression expression : this.expressions) { diff --git a/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/core/molang/expressions/MolangValue.java b/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/core/molang/expressions/MolangValue.java index 078c15cb4..7c78e22c1 100644 --- a/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/core/molang/expressions/MolangValue.java +++ b/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/core/molang/expressions/MolangValue.java @@ -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()); diff --git a/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/core/molang/functions/CosDegrees.java b/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/core/molang/functions/CosDegrees.java index a02d2ed20..0a19c998a 100644 --- a/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/core/molang/functions/CosDegrees.java +++ b/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/core/molang/functions/CosDegrees.java @@ -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); } diff --git a/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/core/molang/functions/SinDegrees.java b/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/core/molang/functions/SinDegrees.java index dd88349a5..d9914d759 100644 --- a/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/core/molang/functions/SinDegrees.java +++ b/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/core/molang/functions/SinDegrees.java @@ -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); } diff --git a/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/core/snapshot/BoneSnapshot.java b/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/core/snapshot/BoneSnapshot.java index 5cd13103a..245f3df6e 100644 --- a/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/core/snapshot/BoneSnapshot.java +++ b/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/core/snapshot/BoneSnapshot.java @@ -84,7 +84,6 @@ public BoneSnapshot(BoneSnapshot snapshot) { } @Override - public boolean equals(Object o) { if (this == o) { return true; @@ -97,7 +96,6 @@ public boolean equals(Object o) { } @Override - public int hashCode() { return name.hashCode(); } diff --git a/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/core/util/Color.java b/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/core/util/Color.java index ce5594e00..57f02d62f 100644 --- a/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/core/util/Color.java +++ b/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/core/util/Color.java @@ -154,7 +154,6 @@ public Color darker(double factor) { } @Override - public boolean equals(Object other) { if (this == other) { return true; @@ -166,13 +165,11 @@ public boolean equals(Object other) { } @Override - public int hashCode() { return color; } @Override - public String toString() { return String.valueOf(color); } diff --git a/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/geo/GeoEntityRenderer.java b/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/geo/GeoEntityRenderer.java index 535954f11..4b07400f8 100644 --- a/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/geo/GeoEntityRenderer.java +++ b/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/geo/GeoEntityRenderer.java @@ -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) { @@ -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(); @@ -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(); @@ -272,25 +267,21 @@ protected void renderLayer(PoseStack poseStack, MultiBufferSource bufferSource, } @Override - public int getInstanceId(T animatable) { return animatable.getId(); } @Override - public GeoModelProvider getGeoModelProvider() { return this.modelProvider; } @Override - public float getWidthScale(T animatable) { return this.widthScale; } @Override - public float getHeightScale(T entity) { return this.heightScale; } @@ -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) { @@ -360,7 +350,6 @@ protected float getSwingMotionAnimThreshold() { } @Override - public ResourceLocation getTextureLocation(T animatable) { return this.modelProvider.getTextureLocation(animatable); } @@ -408,13 +397,11 @@ public void renderLeash(T entity, float partialTick, PoseStac } @Override - public MultiBufferSource getCurrentRTB() { return this.rtb; } @Override - public void setCurrentRTB(MultiBufferSource bufferSource) { this.rtb = bufferSource; } diff --git a/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/geo/GeoReplacedEntityRenderer.java b/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/geo/GeoReplacedEntityRenderer.java index f3fbedfd6..6660cf835 100644 --- a/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/geo/GeoReplacedEntityRenderer.java +++ b/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/geo/GeoReplacedEntityRenderer.java @@ -109,32 +109,27 @@ 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 float getWidthScale(Object animatable) { return this.widthScale; } @Override - public float getHeightScale(Object entity) { return this.heightScale; } @Override - public void renderEarly(Object animatable, PoseStack poseStack, float partialTick, MultiBufferSource bufferSource, VertexConsumer buffer, int packedLight, int packedOverlayIn, float red, float green, float blue, float alpha) { @@ -143,7 +138,6 @@ public void renderEarly(Object animatable, PoseStack poseStack, float partialTic } @Override - public void render(Entity entity, float entityYaw, float partialTick, PoseStack poseStack, MultiBufferSource bufferSource, int packedLight) { @@ -248,7 +242,6 @@ packedLight, getPackedOverlay(livingEntity, getOverlayProgress(livingEntity, par } @Override - public void renderRecursively(GeoBone bone, PoseStack poseStack, VertexConsumer buffer, int packedLight, int packedOverlay, float red, float green, float blue, float alpha) { if (bone.isTrackingXform()) { @@ -274,13 +267,11 @@ protected void preRenderCallback(LivingEntity entity, PoseStack poseStack, float } @Override - public ResourceLocation getTextureLocation(Entity entity) { return this.modelProvider.getTextureLocation(this.currentAnimatable); } @Override - public AnimatedGeoModel getGeoModelProvider() { return this.modelProvider; } @@ -322,7 +313,6 @@ protected float getDeathMaxRotation(LivingEntity entity) { } @Override - public boolean shouldShowName(Entity entity) { double nameRenderDistance = entity.isDiscrete() ? 32d : 64d; if (this.entityRenderDispatcher.distanceToSqr(entity) >= nameRenderDistance * nameRenderDistance) { @@ -340,7 +330,6 @@ protected float getSwingMotionAnimThreshold() { } @Override - public ResourceLocation getTextureLocation(Object animatable) { return this.modelProvider.getTextureLocation((IAnimatable) animatable); } @@ -388,13 +377,11 @@ public void renderLeash(Mob entity, float partialTick, PoseSt } @Override - public MultiBufferSource getCurrentRTB() { return this.rtb; } @Override - public void setCurrentRTB(MultiBufferSource bufferSource) { this.rtb = bufferSource; } diff --git a/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/geo/raw/pojo/FormatVersion.java b/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/geo/raw/pojo/FormatVersion.java index 9474e6613..bebe9127a 100644 --- a/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/geo/raw/pojo/FormatVersion.java +++ b/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/geo/raw/pojo/FormatVersion.java @@ -35,7 +35,6 @@ public String toValue() { protected static class Serializer implements JsonSerializer, JsonDeserializer { @Override - public FormatVersion deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException { try { return FormatVersion.forValue(json.getAsString()); @@ -45,7 +44,6 @@ public FormatVersion deserialize(JsonElement json, Type typeOfT, JsonDeserializa } @Override - public JsonElement serialize(FormatVersion src, Type typeOfSrc, JsonSerializationContext context) { return new JsonPrimitive(src.toValue()); } diff --git a/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/geo/raw/pojo/LocatorValue.java b/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/geo/raw/pojo/LocatorValue.java index 8105f7d7f..c24d49e4b 100644 --- a/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/geo/raw/pojo/LocatorValue.java +++ b/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/geo/raw/pojo/LocatorValue.java @@ -13,7 +13,6 @@ public class LocatorValue { protected static class Serializer implements JsonSerializer, JsonDeserializer { @Override - public LocatorValue deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException { LocatorValue result = new LocatorValue(); if (json.isJsonArray()) { @@ -25,7 +24,6 @@ public LocatorValue deserialize(JsonElement json, Type typeOfT, JsonDeserializat } @Override - public JsonElement serialize(LocatorValue src, Type typeOfSrc, JsonSerializationContext context) { return src.locatorClassValue != null ? context.serialize(src.locatorClassValue) : diff --git a/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/geo/raw/pojo/PolysUnion.java b/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/geo/raw/pojo/PolysUnion.java index a0a073a00..63023bdc3 100644 --- a/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/geo/raw/pojo/PolysUnion.java +++ b/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/geo/raw/pojo/PolysUnion.java @@ -14,7 +14,6 @@ public class PolysUnion { protected static class Serializer implements JsonSerializer, JsonDeserializer { @Override - public PolysUnion deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException { PolysUnion result = new PolysUnion(); if (json.isJsonArray()) { @@ -30,7 +29,6 @@ public PolysUnion deserialize(JsonElement json, Type typeOfT, JsonDeserializatio } @Override - public JsonElement serialize(PolysUnion src, Type typeOfSrc, JsonSerializationContext context) { return src.doubleArrayArrayArrayValue != null ? context.serialize(src.doubleArrayArrayArrayValue) : diff --git a/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/geo/raw/pojo/UvUnion.java b/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/geo/raw/pojo/UvUnion.java index e807673cb..7a40013de 100644 --- a/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/geo/raw/pojo/UvUnion.java +++ b/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/geo/raw/pojo/UvUnion.java @@ -14,7 +14,6 @@ public class UvUnion { protected static class Serializer implements JsonSerializer, JsonDeserializer { @Override - public UvUnion deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException { UvUnion result = new UvUnion(); if (json.isJsonArray()) { @@ -28,7 +27,6 @@ public UvUnion deserialize(JsonElement json, Type typeOfT, JsonDeserializationCo } @Override - public JsonElement serialize(UvUnion src, Type typeOfSrc, JsonSerializationContext context) { return src.isBoxUV ? context.serialize(src.boxUVCoords) : context.serialize(src.faceUV); } diff --git a/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/geo/render/GeoBuilder.java b/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/geo/render/GeoBuilder.java index f89a31e6d..341def92d 100644 --- a/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/geo/render/GeoBuilder.java +++ b/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/geo/render/GeoBuilder.java @@ -35,7 +35,6 @@ public static IGeoBuilder getGeoBuilder(String modid) { } @Override - public GeoModel constructGeoModel(RawGeometryTree geometryTree) { GeoModel model = new GeoModel(); model.properties = geometryTree.properties; @@ -63,7 +62,6 @@ public GeoModel constructGeoModel(RawGeometryTree geometryTree) { } @Override - public GeoBone constructBone(RawBoneGroup bone, ModelProperties properties, GeoBone parent) { GeoBone geoBone = new GeoBone(); diff --git a/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/geo/render/built/GeoBone.java b/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/geo/render/built/GeoBone.java index b7579a72f..cd1667b43 100644 --- a/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/geo/render/built/GeoBone.java +++ b/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/geo/render/built/GeoBone.java @@ -58,13 +58,11 @@ public GeoBone() { } @Override - public void setModelRendererName(String modelRendererName) { this.name = modelRendererName; } @Override - public void saveInitialSnapshot() { if (this.initialSnapshot == null) { this.initialSnapshot = new BoneSnapshot(this, true); @@ -72,194 +70,162 @@ public void saveInitialSnapshot() { } @Override - public BoneSnapshot getInitialSnapshot() { return this.initialSnapshot; } @Override - public String getName() { return this.name; } @Override - public float getRotationX() { return rotateX; } @Override - public void setRotationX(float value) { this.rotateX = value; } @Override - public float getRotationY() { return rotateY; } @Override - public void setRotationY(float value) { this.rotateY = value; } @Override - public float getRotationZ() { return rotateZ; } @Override - public void setRotationZ(float value) { this.rotateZ = value; } @Override - public float getPositionX() { return positionX; } @Override - public void setPositionX(float value) { this.positionX = value; } @Override - public float getPositionY() { return positionY; } @Override - public void setPositionY(float value) { this.positionY = value; } @Override - public float getPositionZ() { return positionZ; } @Override - public void setPositionZ(float value) { this.positionZ = value; } @Override - public float getScaleX() { return scaleX; } @Override - public void setScaleX(float value) { this.scaleX = value; } @Override - public float getScaleY() { return scaleY; } @Override - public void setScaleY(float value) { this.scaleY = value; } @Override - public float getScaleZ() { return scaleZ; } @Override - public void setScaleZ(float value) { this.scaleZ = value; } @Override - public boolean isHidden() { return this.isHidden; } @Override - public void setHidden(boolean hidden) { this.setHidden(hidden, hidden); } @Override - public float getPivotX() { return this.rotationPointX; } @Override - public void setPivotX(float value) { this.rotationPointX = value; } @Override - public float getPivotY() { return this.rotationPointY; } @Override - public void setPivotY(float value) { this.rotationPointY = value; } @Override - public float getPivotZ() { return this.rotationPointZ; } @Override - public void setPivotZ(float value) { this.rotationPointZ = value; } @Override - public boolean cubesAreHidden() { return areCubesHidden; } @Override - public boolean childBonesAreHiddenToo() { return hideChildBonesToo; } @Override - public void setCubesHidden(boolean hidden) { this.areCubesHidden = hidden; } @Override - public void setHidden(boolean selfHidden, boolean skipChildRendering) { this.isHidden = selfHidden; this.hideChildBonesToo = skipChildRendering; diff --git a/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/model/AnimatedGeoModel.java b/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/model/AnimatedGeoModel.java index ec7d39a35..ac22b9d39 100644 --- a/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/model/AnimatedGeoModel.java +++ b/src/main/java/com/github/tartaricacid/touhoulittlemaid/geckolib3/model/AnimatedGeoModel.java @@ -41,7 +41,6 @@ public void registerBone(GeoBone bone) { } @Override - public void setCustomAnimations(T animatable, int instanceId, AnimationEvent animationEvent) { Minecraft mc = Minecraft.getInstance(); AnimationData manager = animatable.getFactory().getOrCreateAnimationData(instanceId); @@ -81,7 +80,6 @@ public void codeAnimations(T entity, Integer uniqueID, AnimationEvent customP } @Override - public AnimationProcessor getAnimationProcessor() { return this.animationProcessor; } @@ -102,7 +100,6 @@ public Animation getAnimation(String name, IAnimatable animatable) { } @Override - public GeoModel getModel(ResourceLocation location) { GeoModel model = super.getModel(location); if (model == null) { @@ -123,7 +120,6 @@ public GeoModel getCurrentModel() { } @Override - public double getCurrentTick() { return Blaze3D.getTime() * 20; } diff --git a/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/Constant.java b/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/Constant.java index 0c442966c..ad4a39b27 100644 --- a/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/Constant.java +++ b/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/Constant.java @@ -9,7 +9,6 @@ public Constant(double value) { } @Override - public double get() { return this.value; } @@ -19,7 +18,6 @@ public void set(double value) { } @Override - public String toString() { return String.valueOf(this.value); } diff --git a/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/Group.java b/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/Group.java index ace9ffdab..e00c32cbf 100644 --- a/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/Group.java +++ b/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/Group.java @@ -9,13 +9,11 @@ public Group(IValue value) { } @Override - public double get() { return this.value.get(); } @Override - public String toString() { return "(" + this.value.toString() + ")"; } diff --git a/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/Negate.java b/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/Negate.java index eebaaebf3..edb9658d2 100644 --- a/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/Negate.java +++ b/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/Negate.java @@ -9,13 +9,11 @@ public Negate(IValue value) { } @Override - public double get() { return this.value.get() == 0 ? 1 : 0; } @Override - public String toString() { return "!" + this.value.toString(); } diff --git a/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/Negative.java b/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/Negative.java index 8a518b52b..d714a2800 100644 --- a/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/Negative.java +++ b/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/Negative.java @@ -9,13 +9,11 @@ public Negative(IValue value) { } @Override - public double get() { return -this.value.get(); } @Override - public String toString() { return "-" + this.value.toString(); } diff --git a/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/Operation.java b/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/Operation.java index 951a102e1..4d1f791a2 100644 --- a/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/Operation.java +++ b/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/Operation.java @@ -8,28 +8,24 @@ public enum Operation { // 操作符 ADD("+", 1) { @Override - public double calculate(double a, double b) { return a + b; } }, SUB("-", 1) { @Override - public double calculate(double a, double b) { return a - b; } }, MUL("*", 2) { @Override - public double calculate(double a, double b) { return a * b; } }, DIV("/", 2) { @Override - public double calculate(double a, double b) { /* To avoid any exceptions */ return a / (b == 0 ? 1 : b); @@ -37,70 +33,60 @@ public double calculate(double a, double b) { }, MOD("%", 2) { @Override - public double calculate(double a, double b) { return a % b; } }, POW("^", 3) { @Override - public double calculate(double a, double b) { return Math.pow(a, b); } }, AND("&&", 5) { @Override - public double calculate(double a, double b) { return a != 0 && b != 0 ? 1 : 0; } }, OR("||", 5) { @Override - public double calculate(double a, double b) { return a != 0 || b != 0 ? 1 : 0; } }, LESS("<", 5) { @Override - public double calculate(double a, double b) { return a < b ? 1 : 0; } }, LESS_THAN("<=", 5) { @Override - public double calculate(double a, double b) { return a <= b ? 1 : 0; } }, GREATER_THAN(">=", 5) { @Override - public double calculate(double a, double b) { return a >= b ? 1 : 0; } }, GREATER(">", 5) { @Override - public double calculate(double a, double b) { return a > b ? 1 : 0; } }, EQUALS("==", 5) { @Override - public double calculate(double a, double b) { return equals(a, b) ? 1 : 0; } }, NOT_EQUALS("!=", 5) { @Override - public double calculate(double a, double b) { return !equals(a, b) ? 1 : 0; } diff --git a/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/Operator.java b/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/Operator.java index 35f4d4fbc..b9513d898 100644 --- a/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/Operator.java +++ b/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/Operator.java @@ -13,13 +13,11 @@ public Operator(Operation op, IValue a, IValue b) { } @Override - public double get() { return this.operation.calculate(a.get(), b.get()); } @Override - public String toString() { return a.toString() + " " + this.operation.sign + " " + b.toString(); } diff --git a/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/Ternary.java b/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/Ternary.java index 78c0c74b7..d695f8f46 100644 --- a/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/Ternary.java +++ b/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/Ternary.java @@ -13,13 +13,11 @@ public Ternary(IValue condition, IValue ifTrue, IValue ifFalse) { } @Override - public double get() { return this.condition.get() != 0 ? this.ifTrue.get() : this.ifFalse.get(); } @Override - public String toString() { return this.condition.toString() + " ? " + this.ifTrue.toString() + " : " + this.ifFalse.toString(); } diff --git a/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/Variable.java b/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/Variable.java index 6c9fd61e2..c2d8dbe8d 100644 --- a/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/Variable.java +++ b/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/Variable.java @@ -15,7 +15,6 @@ public void set(double value) { } @Override - public double get() { return this.value; } @@ -25,7 +24,6 @@ public String getName() { } @Override - public String toString() { return this.name; } diff --git a/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/Function.java b/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/Function.java index 77a91efbc..3a06fd30b 100644 --- a/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/Function.java +++ b/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/Function.java @@ -27,7 +27,6 @@ public double getArg(int index) { } @Override - public String toString() { StringBuilder args = new StringBuilder(); for (int i = 0; i < this.args.length; i++) { diff --git a/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/classic/ACos.java b/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/classic/ACos.java index 7961e6cb9..7ab4c3d06 100644 --- a/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/classic/ACos.java +++ b/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/classic/ACos.java @@ -10,13 +10,11 @@ public ACos(IValue[] values, String name) throws Exception { } @Override - public int getRequiredArguments() { return 1; } @Override - public double get() { return Math.acos(getArg(0)); } diff --git a/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/classic/ASin.java b/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/classic/ASin.java index 24d9a0fe6..eb0c346ec 100644 --- a/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/classic/ASin.java +++ b/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/classic/ASin.java @@ -10,13 +10,11 @@ public ASin(IValue[] values, String name) throws Exception { } @Override - public int getRequiredArguments() { return 1; } @Override - public double get() { return Math.asin(getArg(0)); } diff --git a/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/classic/ATan.java b/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/classic/ATan.java index 505991966..6e568a4b9 100644 --- a/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/classic/ATan.java +++ b/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/classic/ATan.java @@ -10,13 +10,11 @@ public ATan(IValue[] values, String name) throws Exception { } @Override - public int getRequiredArguments() { return 1; } @Override - public double get() { return Math.atan(getArg(0)); } diff --git a/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/classic/ATan2.java b/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/classic/ATan2.java index 3d0315909..a86a32fa6 100644 --- a/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/classic/ATan2.java +++ b/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/classic/ATan2.java @@ -10,13 +10,11 @@ public ATan2(IValue[] values, String name) throws Exception { } @Override - public int getRequiredArguments() { return 2; } @Override - public double get() { return Math.atan2(getArg(0), getArg(1)); } diff --git a/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/classic/Abs.java b/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/classic/Abs.java index 12ed4de40..f1ade6334 100644 --- a/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/classic/Abs.java +++ b/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/classic/Abs.java @@ -10,13 +10,11 @@ public Abs(IValue[] values, String name) throws Exception { } @Override - public int getRequiredArguments() { return 1; } @Override - public double get() { return Math.abs(this.getArg(0)); } diff --git a/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/classic/Cos.java b/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/classic/Cos.java index 32cb67577..18589ecbc 100644 --- a/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/classic/Cos.java +++ b/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/classic/Cos.java @@ -10,13 +10,11 @@ public Cos(IValue[] values, String name) throws Exception { } @Override - public int getRequiredArguments() { return 1; } @Override - public double get() { return Math.cos(this.getArg(0)); } diff --git a/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/classic/Exp.java b/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/classic/Exp.java index 3fa412fa9..35b2d326f 100644 --- a/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/classic/Exp.java +++ b/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/classic/Exp.java @@ -10,13 +10,11 @@ public Exp(IValue[] values, String name) throws Exception { } @Override - public int getRequiredArguments() { return 1; } @Override - public double get() { return Math.exp(this.getArg(0)); } diff --git a/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/classic/Ln.java b/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/classic/Ln.java index 30536d63c..02efbd8c4 100644 --- a/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/classic/Ln.java +++ b/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/classic/Ln.java @@ -10,13 +10,11 @@ public Ln(IValue[] values, String name) throws Exception { } @Override - public int getRequiredArguments() { return 1; } @Override - public double get() { return Math.log(this.getArg(0)); } diff --git a/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/classic/Mod.java b/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/classic/Mod.java index 52ff2081c..62a6ed290 100644 --- a/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/classic/Mod.java +++ b/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/classic/Mod.java @@ -10,13 +10,11 @@ public Mod(IValue[] values, String name) throws Exception { } @Override - public int getRequiredArguments() { return 2; } @Override - public double get() { return this.getArg(0) % this.getArg(1); } diff --git a/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/classic/Pi.java b/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/classic/Pi.java index bc40ffb96..851b52ee0 100644 --- a/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/classic/Pi.java +++ b/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/classic/Pi.java @@ -10,7 +10,6 @@ public Pi(IValue[] values, String name) throws Exception { } @Override - public double get() { return 3.141592653589793d; } diff --git a/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/classic/Pow.java b/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/classic/Pow.java index 0048ef11e..e913f3b92 100644 --- a/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/classic/Pow.java +++ b/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/classic/Pow.java @@ -10,13 +10,11 @@ public Pow(IValue[] values, String name) throws Exception { } @Override - public int getRequiredArguments() { return 2; } @Override - public double get() { return Math.pow(this.getArg(0), this.getArg(1)); } diff --git a/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/classic/Sin.java b/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/classic/Sin.java index 91bdb1613..67cce74e9 100644 --- a/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/classic/Sin.java +++ b/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/classic/Sin.java @@ -10,13 +10,11 @@ public Sin(IValue[] values, String name) throws Exception { } @Override - public int getRequiredArguments() { return 1; } @Override - public double get() { return Math.sin(this.getArg(0)); } diff --git a/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/classic/Sqrt.java b/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/classic/Sqrt.java index 0a6da32ac..e87b7506a 100644 --- a/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/classic/Sqrt.java +++ b/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/classic/Sqrt.java @@ -10,13 +10,11 @@ public Sqrt(IValue[] values, String name) throws Exception { } @Override - public int getRequiredArguments() { return 1; } @Override - public double get() { return Math.sqrt(this.getArg(0)); } diff --git a/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/limit/Clamp.java b/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/limit/Clamp.java index 0149ae53b..70a45b80e 100644 --- a/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/limit/Clamp.java +++ b/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/limit/Clamp.java @@ -10,13 +10,11 @@ public Clamp(IValue[] values, String name) throws Exception { } @Override - public int getRequiredArguments() { return 3; } @Override - public double get() { return Mth.clamp(this.getArg(0), this.getArg(1), this.getArg(2)); } diff --git a/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/limit/Max.java b/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/limit/Max.java index 7b04cfcae..207b3f694 100644 --- a/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/limit/Max.java +++ b/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/limit/Max.java @@ -10,13 +10,11 @@ public Max(IValue[] values, String name) throws Exception { } @Override - public int getRequiredArguments() { return 2; } @Override - public double get() { return Math.max(this.getArg(0), this.getArg(1)); } diff --git a/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/limit/Min.java b/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/limit/Min.java index ef60fa19b..d0e40a14d 100644 --- a/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/limit/Min.java +++ b/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/limit/Min.java @@ -10,13 +10,11 @@ public Min(IValue[] values, String name) throws Exception { } @Override - public int getRequiredArguments() { return 2; } @Override - public double get() { return Math.min(this.getArg(0), this.getArg(1)); } diff --git a/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/rounding/Ceil.java b/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/rounding/Ceil.java index 7102a997f..b51f5a0e9 100644 --- a/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/rounding/Ceil.java +++ b/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/rounding/Ceil.java @@ -10,13 +10,11 @@ public Ceil(IValue[] values, String name) throws Exception { } @Override - public int getRequiredArguments() { return 1; } @Override - public double get() { return Math.ceil(this.getArg(0)); } diff --git a/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/rounding/Floor.java b/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/rounding/Floor.java index 5b57d9934..99375208d 100644 --- a/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/rounding/Floor.java +++ b/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/rounding/Floor.java @@ -10,13 +10,11 @@ public Floor(IValue[] values, String name) throws Exception { } @Override - public int getRequiredArguments() { return 1; } @Override - public double get() { return Math.floor(this.getArg(0)); } diff --git a/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/rounding/Round.java b/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/rounding/Round.java index a6b08a217..0302b8841 100644 --- a/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/rounding/Round.java +++ b/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/rounding/Round.java @@ -10,13 +10,11 @@ public Round(IValue[] values, String name) throws Exception { } @Override - public int getRequiredArguments() { return 1; } @Override - public double get() { return Math.round(this.getArg(0)); } diff --git a/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/rounding/Trunc.java b/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/rounding/Trunc.java index aaa2d8af6..674c871f4 100644 --- a/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/rounding/Trunc.java +++ b/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/rounding/Trunc.java @@ -10,13 +10,11 @@ public Trunc(IValue[] values, String name) throws Exception { } @Override - public int getRequiredArguments() { return 1; } @Override - public double get() { double value = this.getArg(0); diff --git a/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/utility/DieRoll.java b/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/utility/DieRoll.java index ca4d8bcaa..543bb9bf1 100644 --- a/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/utility/DieRoll.java +++ b/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/utility/DieRoll.java @@ -13,13 +13,11 @@ public DieRoll(IValue[] values, String name) throws Exception { } @Override - public int getRequiredArguments() { return 3; } @Override - public double get() { double i = 0; double total = 0; diff --git a/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/utility/DieRollInteger.java b/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/utility/DieRollInteger.java index 0363bda73..866d64aea 100644 --- a/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/utility/DieRollInteger.java +++ b/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/utility/DieRollInteger.java @@ -13,13 +13,11 @@ public DieRollInteger(IValue[] values, String name) throws Exception { } @Override - public int getRequiredArguments() { return 3; } @Override - public double get() { double i = 0; double total = 0; diff --git a/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/utility/HermiteBlend.java b/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/utility/HermiteBlend.java index 61595d0ed..8a6935c16 100644 --- a/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/utility/HermiteBlend.java +++ b/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/utility/HermiteBlend.java @@ -13,13 +13,11 @@ public HermiteBlend(IValue[] values, String name) throws Exception { } @Override - public int getRequiredArguments() { return 1; } @Override - public double get() { double min = Math.ceil(this.getArg(0)); return Math.floor(3.0 * Math.pow(min, 2.0) - 2.0 * Math.pow(min, 3.0)); diff --git a/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/utility/Lerp.java b/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/utility/Lerp.java index e18612f40..e940b6ee5 100644 --- a/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/utility/Lerp.java +++ b/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/utility/Lerp.java @@ -11,13 +11,11 @@ public Lerp(IValue[] values, String name) throws Exception { } @Override - public int getRequiredArguments() { return 3; } @Override - public double get() { return Interpolations.lerp(this.getArg(0), this.getArg(1), this.getArg(2)); } diff --git a/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/utility/LerpRotate.java b/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/utility/LerpRotate.java index 694dedbbc..727795309 100644 --- a/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/utility/LerpRotate.java +++ b/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/utility/LerpRotate.java @@ -11,13 +11,11 @@ public LerpRotate(IValue[] values, String name) throws Exception { } @Override - public int getRequiredArguments() { return 3; } @Override - public double get() { return Interpolations.lerpYaw(this.getArg(0), this.getArg(1), this.getArg(2)); } diff --git a/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/utility/Random.java b/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/utility/Random.java index c9ca0ec77..d3ddde64c 100644 --- a/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/utility/Random.java +++ b/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/utility/Random.java @@ -13,7 +13,6 @@ public Random(IValue[] values, String name) throws Exception { } @Override - public double get() { double random = 0; if (this.args.length >= 3) { diff --git a/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/utility/RandomInteger.java b/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/utility/RandomInteger.java index d623eeed5..139fc2526 100644 --- a/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/utility/RandomInteger.java +++ b/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/math/functions/utility/RandomInteger.java @@ -13,13 +13,11 @@ public RandomInteger(IValue[] values, String name) throws Exception { } @Override - public int getRequiredArguments() { return 2; } @Override - public double get() { double min = Math.ceil(this.getArg(0)); double max = Math.floor(this.getArg(1)); diff --git a/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/utils/Interpolation.java b/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/utils/Interpolation.java index b01fd3747..e5a4cbd6f 100644 --- a/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/utils/Interpolation.java +++ b/src/main/java/com/github/tartaricacid/touhoulittlemaid/mclib/utils/Interpolation.java @@ -5,28 +5,24 @@ public enum Interpolation { // 插值类型 LINEAR("linear") { @Override - public float interpolate(float a, float b, float x) { return Interpolations.lerp(a, b, x); } }, QUAD_IN("quad_in") { @Override - public float interpolate(float a, float b, float x) { return a + (b - a) * x * x; } }, QUAD_OUT("quad_out") { @Override - public float interpolate(float a, float b, float x) { return a - (b - a) * x * (x - 2); } }, QUAD_INOUT("quad_inout") { @Override - public float interpolate(float a, float b, float x) { x *= 2; if (x < 1F) { @@ -38,14 +34,12 @@ public float interpolate(float a, float b, float x) { }, CUBIC_IN("cubic_in") { @Override - public float interpolate(float a, float b, float x) { return a + (b - a) * x * x * x; } }, CUBIC_OUT("cubic_out") { @Override - public float interpolate(float a, float b, float x) { x -= 1; return a + (b - a) * (x * x * x + 1); @@ -53,7 +47,6 @@ public float interpolate(float a, float b, float x) { }, CUBIC_INOUT("cubic_inout") { @Override - public float interpolate(float a, float b, float x) { x *= 2; if (x < 1F) { @@ -65,21 +58,18 @@ public float interpolate(float a, float b, float x) { }, EXP_IN("exp_in") { @Override - public float interpolate(float a, float b, float x) { return a + (b - a) * (float) Math.pow(2, 10 * (x - 1)); } }, EXP_OUT("exp_out") { @Override - public float interpolate(float a, float b, float x) { return a + (b - a) * (float) (-Math.pow(2, -10 * x) + 1); } }, EXP_INOUT("exp_inout") { @Override - public float interpolate(float a, float b, float x) { if (x == 0) { return a;