From ccb3146a0c19d3ab4effeebea5270ec1c272834c Mon Sep 17 00:00:00 2001 From: 3944Realms Date: Wed, 4 Mar 2026 16:42:17 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E6=8F=90=E5=8F=96IEDGAnimation?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E6=96=B9=E4=BE=BF=E7=AC=AC=E4=B8=89=E6=96=B9?= =?UTF-8?q?=E6=B3=A8=E5=86=8C=E5=8A=A8=E7=94=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gradle.properties | 2 +- .../content/animation/EDGAnimation.java | 118 ------------------ .../content/animation/EDGAnimations.java | 89 +++++++++++++ .../content/animation/IEDGAnimation.java | 89 +++++++++++++ .../blockentity/SpanishDonkeyBlockEntity.java | 11 +- .../block/type/GlassDisplayRackBlock.java | 2 - .../capability/DungeonDataSyncManager.java | 6 +- .../core/device/ISeatType.java | 4 +- .../core/device/SeatTypes.java | 11 +- .../core/service/SeatService.java | 8 +- .../provider/EDGAnimationLayerProvider.java | 4 +- .../provider/EDGAnimationProvider.java | 36 +++--- 12 files changed, 220 insertions(+), 160 deletions(-) delete mode 100644 src/main/java/top/r3944realms/eroticdungeongame/content/animation/EDGAnimation.java create mode 100644 src/main/java/top/r3944realms/eroticdungeongame/content/animation/EDGAnimations.java create mode 100644 src/main/java/top/r3944realms/eroticdungeongame/content/animation/IEDGAnimation.java diff --git a/gradle.properties b/gradle.properties index e03142b9..11330056 100644 --- a/gradle.properties +++ b/gradle.properties @@ -54,4 +54,4 @@ mod_authors=R3944Realms # The description of the mod. This is a simple multiline text string that is used for display purposes in the mod list. mod_description=EtroicDungeon Game -mod_credits= \ No newline at end of file +mod_credits= Thanks for Autumn_Wish, Mc_haonan, Zershyan, BiliBili User 349888651. \ No newline at end of file diff --git a/src/main/java/top/r3944realms/eroticdungeongame/content/animation/EDGAnimation.java b/src/main/java/top/r3944realms/eroticdungeongame/content/animation/EDGAnimation.java deleted file mode 100644 index 9e607e4c..00000000 --- a/src/main/java/top/r3944realms/eroticdungeongame/content/animation/EDGAnimation.java +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Copyright 2025-2026 R3944Realms - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package top.r3944realms.eroticdungeongame.content.animation; - - -import io.zershyan.sccore.animation.AnimationApi; -import io.zershyan.sccore.animation.helper.AnimationHelper; -import net.minecraft.resources.ResourceLocation; -import net.minecraft.world.entity.player.Player; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; -import top.r3944realms.eroticdungeongame.EroticDungeon; -import top.r3944realms.eroticdungeongame.content.block.ISeatBlock; -import top.r3944realms.eroticdungeongame.content.block.type.*; - -import java.util.Objects; - -public enum EDGAnimation { - CUFF_BED("cuff_bed", CuffBedBlock.class), - PRONE_BENCH("prone_bench", ProneBenchBlock.class), - IRON_CAGE("iron_cage", IronCageBlock.class), - SPANISH_DONKEY("spanish_donkey", SpanishDonkeyBlock.class), - HANGING_POST("hanging_post", HangingPostBlock.class), - CUFF_POLE("cuff_pole", CuffPoleBlock.class), - CRUX("crux", CruxBlock.class), - PETRINE_CROSS("petrine_cross", PetrineCrossBlock.class), - PILLORY("pillory", PilloryBlock.class), - RACK("rack", RackBlock.class), - WALL_RACK("wall_rack", WallRackBlock.class), - X_CROSS("x_cross", XCrossBlock.class), - DISPLAY_RACK("display_rack", DisplayRackBlock.class), - GLASS_DISPLAY_RACK("glass_display_rack", GlassDisplayRackBlock.class),; - private final ResourceLocation baseId; - private final Class blockClass; - public static final ResourceLocation LAYER = EroticDungeon.rl("top_height_layer"); - EDGAnimation(String baseId, Class blockClass) { - this.baseId = EroticDungeon.rl(baseId + "_pose_"); - this.blockClass = blockClass; - } - public @NotNull ResourceLocation getDefaultRL() { - return this.baseId.withSuffix("01"); - } - - public @NotNull ResourceLocation getVarietyRL(int varNumber) { - return this.baseId.withSuffix(String.format("%02d", Math.max(1, Math.min(99, varNumber)))); - } - - public static @NotNull ResourceLocation getDefaultRLStatic(@NotNull EDGAnimation animation) { - return animation.getDefaultRL(); - } - - public static @NotNull ResourceLocation getVarietyRLStatic(@NotNull EDGAnimation animation, int varNumber) { - return animation.getVarietyRL(varNumber); - } - - @Nullable - public static EDGAnimation getAnimation(@NotNull Class blockClass) { - if (ISeatBlock.class.isAssignableFrom(blockClass)) { - for (EDGAnimation value : values()) { - if (value.blockClass.equals(blockClass)) { - return value; - } - } - } - return null; - } - public void play(Player player) { - if (player != null && !player.level().isClientSide) { - AnimationHelper helper = AnimationApi.getHelper(player); - helper.playAnimation(EDGAnimation.LAYER, baseId.withSuffix("01")); - - } - } - public void play(Player player, int varNumber) { - if (player != null && !player.level().isClientSide) { - AnimationHelper helper = AnimationApi.getHelper(player); - helper.playAnimation(EDGAnimation.LAYER, baseId.withSuffix(String.format("%02d", Math.max(1, Math.min(99, varNumber))))); - } - } - - @Nullable - public static ResourceLocation getPlayingAnimation(Player player) { - if (player != null && !player.level().isClientSide) { - AnimationHelper helper = AnimationApi.getHelper(player); - return helper.getAnimationPlaying(EDGAnimation.LAYER); - } - return null; - } - - public static boolean isPlayerAnimation(Player player, @NotNull EDGAnimation animation) { - return Objects.equals(getPlayingAnimation(player), animation.getDefaultRL()); - } - - public static boolean isPlayerAnimation(Player player, @NotNull EDGAnimation animation, int varNumber) { - return Objects.equals(getPlayingAnimation(player), animation.getVarietyRL(varNumber)); - } - - public static void stop(Player player) { - if (player != null && !player.level().isClientSide) { - AnimationHelper helper = AnimationApi.getHelper(player); - helper.removeAnimation(EDGAnimation.LAYER); - } - } -} diff --git a/src/main/java/top/r3944realms/eroticdungeongame/content/animation/EDGAnimations.java b/src/main/java/top/r3944realms/eroticdungeongame/content/animation/EDGAnimations.java new file mode 100644 index 00000000..e8f0fde3 --- /dev/null +++ b/src/main/java/top/r3944realms/eroticdungeongame/content/animation/EDGAnimations.java @@ -0,0 +1,89 @@ +/* + * Copyright 2025-2026 R3944Realms + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package top.r3944realms.eroticdungeongame.content.animation; + + +import com.google.common.collect.Sets; +import net.minecraft.resources.ResourceLocation; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; +import top.r3944realms.eroticdungeongame.EroticDungeon; +import top.r3944realms.eroticdungeongame.content.block.ISeatBlock; +import top.r3944realms.eroticdungeongame.content.block.type.*; + +import java.util.HashSet; +import java.util.Set; + +public enum EDGAnimations implements IEDGAnimation { + CUFF_BED("cuff_bed", CuffBedBlock.class), + PRONE_BENCH("prone_bench", ProneBenchBlock.class), + IRON_CAGE("iron_cage", IronCageBlock.class), + SPANISH_DONKEY("spanish_donkey", SpanishDonkeyBlock.class), + HANGING_POST("hanging_post", HangingPostBlock.class), + CUFF_POLE("cuff_pole", CuffPoleBlock.class), + CRUX("crux", CruxBlock.class), + PETRINE_CROSS("petrine_cross", PetrineCrossBlock.class), + PILLORY("pillory", PilloryBlock.class), + RACK("rack", RackBlock.class), + WALL_RACK("wall_rack", WallRackBlock.class), + X_CROSS("x_cross", XCrossBlock.class), + DISPLAY_RACK("display_rack", DisplayRackBlock.class), + GLASS_DISPLAY_RACK("glass_display_rack", GlassDisplayRackBlock.class),; + private final ResourceLocation baseId; + private final Class blockClass; + + EDGAnimations(String baseId, Class blockClass) { + this.baseId = EroticDungeon.rl(baseId + "_pose_"); + this.blockClass = blockClass; + } + private static final Set extraAnimations = new HashSet<>(); + + public static void registerExtraAnimation(IEDGAnimation animation) { + extraAnimations.add(animation); + } + + public static @NotNull Set getExtraAnimations() { + return Sets.newHashSet(extraAnimations); + } + + @Nullable + public static IEDGAnimation getAnimation(@NotNull Class blockClass) { + if (ISeatBlock.class.isAssignableFrom(blockClass)) { + for (EDGAnimations value : values()) { + if (value.blockClass.equals(blockClass)) { + return value; + } + } + for (IEDGAnimation extraAnimation : extraAnimations) { + if (extraAnimation.getBlockClass().equals(blockClass)) { + return extraAnimation; + } + } + } + return null; + } + + @Override + public ResourceLocation getBaseId() { + return baseId; + } + + @Override + public Class getBlockClass() { + return blockClass; + } +} diff --git a/src/main/java/top/r3944realms/eroticdungeongame/content/animation/IEDGAnimation.java b/src/main/java/top/r3944realms/eroticdungeongame/content/animation/IEDGAnimation.java new file mode 100644 index 00000000..f01ebbce --- /dev/null +++ b/src/main/java/top/r3944realms/eroticdungeongame/content/animation/IEDGAnimation.java @@ -0,0 +1,89 @@ +/* + * Copyright 2025-2026 R3944Realms + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package top.r3944realms.eroticdungeongame.content.animation; + +import io.zershyan.sccore.animation.AnimationApi; +import io.zershyan.sccore.animation.helper.AnimationHelper; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.entity.player.Player; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; +import top.r3944realms.eroticdungeongame.EroticDungeon; + +import java.util.Objects; + +public interface IEDGAnimation { + ResourceLocation LAYER = EroticDungeon.rl("top_height_layer"); + ResourceLocation getBaseId(); + Class getBlockClass(); + @NotNull + default ResourceLocation getDefaultRL() { + return getBaseId().withSuffix("01"); + } + + @NotNull + default ResourceLocation getVarietyRL(int varNumber) { + return getBaseId().withSuffix(String.format("%02d", Math.max(1, Math.min(99, varNumber)))); + } + + static @NotNull ResourceLocation getDefaultRLStatic(@NotNull IEDGAnimation animation) { + return animation.getDefaultRL(); + } + + static @NotNull ResourceLocation getVarietyRLStatic(@NotNull IEDGAnimation animation, int varNumber) { + return animation.getVarietyRL(varNumber); + } + + + default void play(Player player) { + if (player != null && !player.level().isClientSide) { + AnimationHelper helper = AnimationApi.getHelper(player); + helper.playAnimation(IEDGAnimation.LAYER, getBaseId().withSuffix("01")); + + } + } + default void play(Player player, int varNumber) { + if (player != null && !player.level().isClientSide) { + AnimationHelper helper = AnimationApi.getHelper(player); + helper.playAnimation(IEDGAnimation.LAYER, getBaseId().withSuffix(String.format("%02d", Math.max(1, Math.min(99, varNumber))))); + } + } + + @Nullable + static ResourceLocation getPlayingAnimation(Player player) { + if (player != null && !player.level().isClientSide) { + AnimationHelper helper = AnimationApi.getHelper(player); + return helper.getAnimationPlaying(IEDGAnimation.LAYER); + } + return null; + } + + static boolean isPlayerAnimation(Player player, @NotNull IEDGAnimation animation) { + return Objects.equals(getPlayingAnimation(player), animation.getDefaultRL()); + } + + static boolean isPlayerAnimation(Player player, @NotNull IEDGAnimation animation, int varNumber) { + return Objects.equals(getPlayingAnimation(player), animation.getVarietyRL(varNumber)); + } + + static void stop(Player player) { + if (player != null && !player.level().isClientSide) { + AnimationHelper helper = AnimationApi.getHelper(player); + helper.removeAnimation(IEDGAnimation.LAYER); + } + } +} diff --git a/src/main/java/top/r3944realms/eroticdungeongame/content/block/blockentity/SpanishDonkeyBlockEntity.java b/src/main/java/top/r3944realms/eroticdungeongame/content/block/blockentity/SpanishDonkeyBlockEntity.java index cabdcfc8..636a4076 100644 --- a/src/main/java/top/r3944realms/eroticdungeongame/content/block/blockentity/SpanishDonkeyBlockEntity.java +++ b/src/main/java/top/r3944realms/eroticdungeongame/content/block/blockentity/SpanishDonkeyBlockEntity.java @@ -30,7 +30,8 @@ import software.bernie.geckolib.core.animation.AnimatableManager; import software.bernie.geckolib.core.animation.AnimationController; import software.bernie.geckolib.core.animation.RawAnimation; import software.bernie.geckolib.util.GeckoLibUtil; -import top.r3944realms.eroticdungeongame.content.animation.EDGAnimation; +import top.r3944realms.eroticdungeongame.content.animation.EDGAnimations; +import top.r3944realms.eroticdungeongame.content.animation.IEDGAnimation; import top.r3944realms.eroticdungeongame.content.block.type.SpanishDonkeyBlock; import top.r3944realms.eroticdungeongame.core.register.EDGBlockEntities; import top.r3944realms.lib39.util.nbt.NBTReader; @@ -62,16 +63,16 @@ public class SpanishDonkeyBlockEntity extends BaseSeatBlockEntity implements Geo UUID boundPlayerUUID = pBlockEntity.getBoundPlayerUUID(); if (boundPlayerUUID != null) { Player playerByUUID = pLevel.getPlayerByUUID(boundPlayerUUID); - if (playerByUUID != null && !EDGAnimation.isPlayerAnimation(playerByUUID, EDGAnimation.SPANISH_DONKEY, 3)) { - EDGAnimation.SPANISH_DONKEY.play(playerByUUID, 3); + if (playerByUUID != null && !IEDGAnimation.isPlayerAnimation(playerByUUID, EDGAnimations.SPANISH_DONKEY, 3)) { + EDGAnimations.SPANISH_DONKEY.play(playerByUUID, 3); } } } else if (pBlockEntity.shouldPlayUnrouting) { UUID boundPlayerUUID = pBlockEntity.getBoundPlayerUUID(); if (boundPlayerUUID != null) { Player playerByUUID = pLevel.getPlayerByUUID(boundPlayerUUID); - if (playerByUUID != null && !EDGAnimation.isPlayerAnimation(playerByUUID, EDGAnimation.SPANISH_DONKEY, 4)) { - EDGAnimation.SPANISH_DONKEY.play(playerByUUID, 4); + if (playerByUUID != null && !IEDGAnimation.isPlayerAnimation(playerByUUID, EDGAnimations.SPANISH_DONKEY, 4)) { + EDGAnimations.SPANISH_DONKEY.play(playerByUUID, 4); } } } diff --git a/src/main/java/top/r3944realms/eroticdungeongame/content/block/type/GlassDisplayRackBlock.java b/src/main/java/top/r3944realms/eroticdungeongame/content/block/type/GlassDisplayRackBlock.java index 7b9d70b4..bd3a6fd1 100644 --- a/src/main/java/top/r3944realms/eroticdungeongame/content/block/type/GlassDisplayRackBlock.java +++ b/src/main/java/top/r3944realms/eroticdungeongame/content/block/type/GlassDisplayRackBlock.java @@ -18,13 +18,11 @@ package top.r3944realms.eroticdungeongame.content.block.type; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; -import net.minecraft.world.item.context.BlockPlaceContext; import net.minecraft.world.level.BlockGetter; import net.minecraft.world.level.block.SoundType; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.phys.shapes.VoxelShape; -import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import top.r3944realms.eroticdungeongame.content.block.IColorBlock; import top.r3944realms.eroticdungeongame.content.block.multiply.vertical.VerticalDoubleSeatBlock; diff --git a/src/main/java/top/r3944realms/eroticdungeongame/content/capability/DungeonDataSyncManager.java b/src/main/java/top/r3944realms/eroticdungeongame/content/capability/DungeonDataSyncManager.java index 49aa4b82..f2782f43 100644 --- a/src/main/java/top/r3944realms/eroticdungeongame/content/capability/DungeonDataSyncManager.java +++ b/src/main/java/top/r3944realms/eroticdungeongame/content/capability/DungeonDataSyncManager.java @@ -24,7 +24,7 @@ import net.minecraftforge.api.distmarker.OnlyIn; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import top.r3944realms.eroticdungeongame.api.EroticDungeonGameApi; -import top.r3944realms.eroticdungeongame.content.animation.EDGAnimation; +import top.r3944realms.eroticdungeongame.content.animation.IEDGAnimation; import top.r3944realms.eroticdungeongame.content.block.ISeatBlock; import top.r3944realms.eroticdungeongame.content.block.blockentity.BaseSeatBlockEntity; import top.r3944realms.eroticdungeongame.content.util.FurnitureHelper; @@ -58,7 +58,7 @@ public class DungeonDataSyncManager extends CachedSyncManager cache = new WeakHashMap<>(); + public final Map cache = new WeakHashMap<>(); public static final SeatTypeRegistry REGISTRY = new SeatTypeRegistry(); @@ -135,10 +136,10 @@ public enum SeatTypes implements ISeatType { } @Override - public @Nullable EDGAnimation getAnimation() { - EDGAnimation edgAnimation = cache.get(this); + public @Nullable IEDGAnimation getAnimation() { + IEDGAnimation edgAnimation = cache.get(this); if (edgAnimation == null) { - EDGAnimation animation = EDGAnimation.getAnimation(blockClass); + IEDGAnimation animation = EDGAnimations.getAnimation(blockClass); if (animation != null) { cache.put(this, animation); return animation; diff --git a/src/main/java/top/r3944realms/eroticdungeongame/core/service/SeatService.java b/src/main/java/top/r3944realms/eroticdungeongame/core/service/SeatService.java index ccf4a9a9..bf19a347 100644 --- a/src/main/java/top/r3944realms/eroticdungeongame/core/service/SeatService.java +++ b/src/main/java/top/r3944realms/eroticdungeongame/core/service/SeatService.java @@ -32,7 +32,7 @@ import top.r3944realms.eroticdungeongame.EroticDungeon; import top.r3944realms.eroticdungeongame.api.EroticDungeonGameApi; import top.r3944realms.eroticdungeongame.api.event.RideDeviceEvent; import top.r3944realms.eroticdungeongame.api.event.UnRideDeviceEvent; -import top.r3944realms.eroticdungeongame.content.animation.EDGAnimation; +import top.r3944realms.eroticdungeongame.content.animation.IEDGAnimation; import top.r3944realms.eroticdungeongame.content.block.AbstractSeatBlock; import top.r3944realms.eroticdungeongame.content.block.blockentity.BaseSeatBlockEntity; import top.r3944realms.eroticdungeongame.content.block.multiply.AbstractTwoPartSeatBlock; @@ -224,13 +224,13 @@ public class SeatService { } public static void playBindingAnimation(@NotNull Player player, @NotNull ISeatType ISeatType) { - EDGAnimation animation = ISeatType.getAnimation(); + IEDGAnimation animation = ISeatType.getAnimation(); if (animation != null) { animation.play(player); } } public static void playBindingAnimation(@NotNull Player player, @NotNull ISeatType ISeatType, int varNumber) { - EDGAnimation animation = ISeatType.getAnimation(); + IEDGAnimation animation = ISeatType.getAnimation(); if (animation != null) { animation.play(player, varNumber); } @@ -276,7 +276,7 @@ public class SeatService { // 停止动画 if (playerByUUID != null) { - EDGAnimation.stop(playerByUUID); + IEDGAnimation.stop(playerByUUID); EroticDungeon.EVENT_BUS.post(new UnRideDeviceEvent.Post(playerByUUID, blockPos, blockState, be)); } } diff --git a/src/main/java/top/r3944realms/eroticdungeongame/datagen/provider/EDGAnimationLayerProvider.java b/src/main/java/top/r3944realms/eroticdungeongame/datagen/provider/EDGAnimationLayerProvider.java index 7a6dda88..78328db9 100644 --- a/src/main/java/top/r3944realms/eroticdungeongame/datagen/provider/EDGAnimationLayerProvider.java +++ b/src/main/java/top/r3944realms/eroticdungeongame/datagen/provider/EDGAnimationLayerProvider.java @@ -19,7 +19,7 @@ package top.r3944realms.eroticdungeongame.datagen.provider; import net.minecraft.data.DataGenerator; import top.leisuretimedock.animationcore.animation.data.ACAnimationLayerProvider; import top.r3944realms.eroticdungeongame.EroticDungeon; -import top.r3944realms.eroticdungeongame.content.animation.EDGAnimation; +import top.r3944realms.eroticdungeongame.content.animation.EDGAnimations; public class EDGAnimationLayerProvider extends ACAnimationLayerProvider { public EDGAnimationLayerProvider(DataGenerator generator) { @@ -29,6 +29,6 @@ public class EDGAnimationLayerProvider extends ACAnimationLayerProvider { @Override protected LayerBuilder createLayerData() { return LayerBuilder.create() - .addBaseLayer(EDGAnimation.LAYER, Integer.MAX_VALUE); + .addBaseLayer(EDGAnimations.LAYER, Integer.MAX_VALUE); } } diff --git a/src/main/java/top/r3944realms/eroticdungeongame/datagen/provider/EDGAnimationProvider.java b/src/main/java/top/r3944realms/eroticdungeongame/datagen/provider/EDGAnimationProvider.java index b08267cd..98f3dd61 100644 --- a/src/main/java/top/r3944realms/eroticdungeongame/datagen/provider/EDGAnimationProvider.java +++ b/src/main/java/top/r3944realms/eroticdungeongame/datagen/provider/EDGAnimationProvider.java @@ -23,7 +23,7 @@ import net.minecraft.world.phys.Vec3; import top.leisuretimedock.animationcore.animation.AnimationDataBuilder; import top.leisuretimedock.animationcore.animation.data.ACAnimationProvider; import top.r3944realms.eroticdungeongame.EroticDungeon; -import top.r3944realms.eroticdungeongame.content.animation.EDGAnimation; +import top.r3944realms.eroticdungeongame.content.animation.EDGAnimations; import java.util.function.Consumer; @@ -36,7 +36,7 @@ public class EDGAnimationProvider extends ACAnimationProvider { @Override protected void registerAnimations(Consumer consumer) { GenericAnimationData cuff_bed = AnimationDataBuilder - .create(EDGAnimation.CUFF_BED.getDefaultRL()) + .create(EDGAnimations.CUFF_BED.getDefaultRL()) .withName("cuff_bed") .withCamPitch(-90.0f) // 垂直旋转(向上看90度) .addCamPosOffset(new Vec3(0, -0.75, -1)) // 向后移动1格 @@ -45,7 +45,7 @@ public class EDGAnimationProvider extends ACAnimationProvider { consumer.accept(cuff_bed); GenericAnimationData prone_bench = AnimationDataBuilder - .create(EDGAnimation.PRONE_BENCH.getDefaultRL()) + .create(EDGAnimations.PRONE_BENCH.getDefaultRL()) .withName("prone_bench") .withCamPitch(90.0f) .addCamPosOffset(new Vec3(0, -0.9, 0.8)) @@ -53,33 +53,33 @@ public class EDGAnimationProvider extends ACAnimationProvider { consumer.accept(prone_bench); GenericAnimationData iron_cage = AnimationDataBuilder - .create(EDGAnimation.IRON_CAGE.getDefaultRL()) + .create(EDGAnimations.IRON_CAGE.getDefaultRL()) .withName("iron_cage") .withCamPosOffsetRelative(true) .buildGeneric(); consumer.accept(iron_cage); GenericAnimationData spanishDonkeyUp = AnimationDataBuilder - .create(EDGAnimation.SPANISH_DONKEY.getDefaultRL()) + .create(EDGAnimations.SPANISH_DONKEY.getDefaultRL()) .withName("spanish_donkey_up") .addCamPosOffset(new Vec3(0, 0, 0.35)) .withCamPosOffsetRelative(true) .buildGeneric(); GenericAnimationData spanishDonkeyUpWithRoute = AnimationDataBuilder - .create(EDGAnimation.SPANISH_DONKEY.getVarietyRL(2)) + .create(EDGAnimations.SPANISH_DONKEY.getVarietyRL(2)) .withName("spanish_donkey_up_with_route") .addCamPosOffset(new Vec3(0, 0, 0.35)) .withCamPosOffsetRelative(true) .buildGeneric(); GenericAnimationData spanishDonkeyChangeRoute = AnimationDataBuilder - .create(EDGAnimation.SPANISH_DONKEY.getVarietyRL(3)) + .create(EDGAnimations.SPANISH_DONKEY.getVarietyRL(3)) .withName("spanish_donkey_change_route") .addCamPosOffset(new Vec3(0, 0, 0.35)) .withCamPosOffsetRelative(true) .buildGeneric(); GenericAnimationData spanishDonkeyChangeNotRoute = AnimationDataBuilder - .create(EDGAnimation.SPANISH_DONKEY.getVarietyRL(4)) + .create(EDGAnimations.SPANISH_DONKEY.getVarietyRL(4)) .withName("spanish_donkey_change_not_route") .addCamPosOffset(new Vec3(0, 0, 0.35)) .withCamPosOffsetRelative(true) @@ -91,7 +91,7 @@ public class EDGAnimationProvider extends ACAnimationProvider { consumer.accept(spanishDonkeyChangeNotRoute); GenericAnimationData crux = AnimationDataBuilder - .create(EDGAnimation.CRUX.getDefaultRL()) + .create(EDGAnimations.CRUX.getDefaultRL()) .withName("crux") .withCamPosOffsetRelative(true) .withCamPosOffset(new Vec3(0, 0.0, 0.2)) @@ -99,7 +99,7 @@ public class EDGAnimationProvider extends ACAnimationProvider { consumer.accept(crux); GenericAnimationData cuffPole = AnimationDataBuilder - .create(EDGAnimation.CUFF_POLE.getDefaultRL()) + .create(EDGAnimations.CUFF_POLE.getDefaultRL()) .withName("cuff_pole") .withCamPosOffsetRelative(true) .withCamPosOffset(new Vec3(0, 0.0, 0.2)) @@ -107,7 +107,7 @@ public class EDGAnimationProvider extends ACAnimationProvider { consumer.accept(cuffPole); GenericAnimationData hangingPost = AnimationDataBuilder - .create(EDGAnimation.HANGING_POST.getDefaultRL()) + .create(EDGAnimations.HANGING_POST.getDefaultRL()) .withName("hanging_post") .withCamPitch(25f) .withCamPosOffset(new Vec3(0, -0.2, 0.2)) @@ -116,7 +116,7 @@ public class EDGAnimationProvider extends ACAnimationProvider { consumer.accept(hangingPost); GenericAnimationData petrineCross = AnimationDataBuilder - .create(EDGAnimation.PETRINE_CROSS.getDefaultRL()) + .create(EDGAnimations.PETRINE_CROSS.getDefaultRL()) .withName("petrine_cross") .withCamPosOffset(new Vec3(0, 0.0, 0.2)) .withCamPosOffsetRelative(true) @@ -124,7 +124,7 @@ public class EDGAnimationProvider extends ACAnimationProvider { consumer.accept(petrineCross); GenericAnimationData pillory = AnimationDataBuilder - .create(EDGAnimation.PILLORY.getDefaultRL()) + .create(EDGAnimations.PILLORY.getDefaultRL()) .withName("pillory") .addCamPosOffset(new Vec3(0, -0.5, 0.7)) .withCamPitch(90.0f) @@ -133,7 +133,7 @@ public class EDGAnimationProvider extends ACAnimationProvider { consumer.accept(pillory); GenericAnimationData rack = AnimationDataBuilder - .create(EDGAnimation.RACK.getDefaultRL()) + .create(EDGAnimations.RACK.getDefaultRL()) .withName("rack") .withCamPitch(-90.0f) .addCamPosOffset(new Vec3(0, -0.75, -1)) // 向后移动1格 @@ -142,7 +142,7 @@ public class EDGAnimationProvider extends ACAnimationProvider { consumer.accept(rack); GenericAnimationData xCross = AnimationDataBuilder - .create(EDGAnimation.X_CROSS.getDefaultRL()) + .create(EDGAnimations.X_CROSS.getDefaultRL()) .withName("x_cross") .withCamPosOffset(new Vec3(0, 0.0, 0.2)) .withCamPosOffsetRelative(true) @@ -150,7 +150,7 @@ public class EDGAnimationProvider extends ACAnimationProvider { consumer.accept(xCross); GenericAnimationData wallRack = AnimationDataBuilder - .create(EDGAnimation.WALL_RACK.getDefaultRL()) + .create(EDGAnimations.WALL_RACK.getDefaultRL()) .withName("wall_rack") .withCamPosOffsetRelative(true) .withCamPosOffset(new Vec3(0, 0.0, 0.1)) @@ -158,7 +158,7 @@ public class EDGAnimationProvider extends ACAnimationProvider { consumer.accept(wallRack); GenericAnimationData displayRack = AnimationDataBuilder - .create(EDGAnimation.DISPLAY_RACK.getDefaultRL()) + .create(EDGAnimations.DISPLAY_RACK.getDefaultRL()) .withName("display_rack") .withCamPosOffsetRelative(true) .withCamPosOffset(new Vec3(0, 0.0, 0)) @@ -166,7 +166,7 @@ public class EDGAnimationProvider extends ACAnimationProvider { consumer.accept(displayRack); GenericAnimationData glassDisplayRack = AnimationDataBuilder - .create(EDGAnimation.GLASS_DISPLAY_RACK.getDefaultRL()) + .create(EDGAnimations.GLASS_DISPLAY_RACK.getDefaultRL()) .withName("glass_display_rack") .withCamPosOffsetRelative(true) .withCamPosOffset(new Vec3(0, 0.0, 0))