Skip to content

Commit 56eb042

Browse files
authored
Merge pull request #29 from OneLiteFeatherNET/develop
Release 0.4.0
2 parents b03044f + b9e02ab commit 56eb042

17 files changed

+302
-42
lines changed

.github/workflows/build-pr.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ jobs:
1414
steps:
1515
- name: Checkout repository
1616
uses: actions/checkout@v4
17+
- name: Setup Gradle
18+
uses: gradle/actions/setup-gradle@v4
1719
- name: Setup Java
1820
uses: actions/setup-java@v4
1921
with:

.github/workflows/main-build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ jobs:
1919
steps:
2020
- name: Checkout Repository
2121
uses: actions/checkout@v4
22-
- name: Validate Gradle Wrapper
23-
uses: gradle/actions/wrapper-validation@v4
22+
- name: Setup Gradle
23+
uses: gradle/actions/setup-gradle@v4
2424
- name: Setup Java
2525
uses: actions/setup-java@v4
2626
with:

.github/workflows/publish.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ jobs:
1919
with:
2020
distribution: 'temurin'
2121
java-version: '21'
22-
22+
- name: Setup Gradle
23+
uses: gradle/actions/setup-gradle@v4
2324
- name: Build with Gradle
2425
run: ./gradlew build
2526

build.gradle.kts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,13 @@ plugins {
66
}
77

88
group = "net.onelitefeather"
9-
version = "0.3.0"
9+
version = "0.4.0"
10+
11+
java {
12+
toolchain.languageVersion.set(JavaLanguageVersion.of(21))
13+
withJavadocJar()
14+
withSourcesJar()
15+
}
1016

1117
dependencies {
1218
implementation(platform(libs.mycelium.bom))

gradle/wrapper/gradle-wrapper.jar

1.65 KB
Binary file not shown.

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.0.0-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

gradlew

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/sh
22

33
#
4-
# Copyright © 2015-2021 the original authors.
4+
# Copyright © 2015 the original authors.
55
#
66
# Licensed under the Apache License, Version 2.0 (the "License");
77
# you may not use this file except in compliance with the License.

settings.gradle.kts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,11 @@ dependencyResolutionManagement {
2121
}
2222
versionCatalogs {
2323
create("libs") {
24-
version("phoca", "0.5.3")
25-
version("bom", "1.2.3")
24+
version("bom", "1.4.3")
2625

2726
library("mycelium.bom", "net.onelitefeather", "mycelium-bom").versionRef("bom")
2827

29-
library("minestom", "net.minestom", "minestom-snapshots").withoutVersion()
28+
library("minestom", "net.minestom", "minestom").withoutVersion()
3029
library("cyano", "net.onelitefeather", "cyano").withoutVersion()
3130
library("junit.api", "org.junit.jupiter", "junit-jupiter-api").withoutVersion()
3231
library("junit.engine", "org.junit.jupiter", "junit-jupiter-engine").withoutVersion()
Lines changed: 54 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,67 @@
11
package net.onelitefeather.coris.door;
22

33
/**
4-
* The enumeration contains each animation state which a door can be in.
4+
* Represents the different animation states that a door can be in during its lifecycle.
5+
* <p>
6+
* This enum defines a finite state machine for door animations, allowing for proper
7+
* state management and transition control. The states represent both static positions
8+
* and dynamic transition phases of door movement.
9+
* </p>
10+
* <p>
11+
* Typical state transitions follow this pattern:
12+
* {@code IDLE → OPENING → OPENED → CLOSING → IDLE}
13+
* </p>
14+
* <p>
15+
* The enum can be used for:
16+
* <ul>
17+
* <li>Controlling door animation timing and sequencing</li>
18+
* <li>Preventing invalid state transitions (e.g., opening an already opening door)</li>
19+
* <li>Synchronizing visual effects with door movement</li>
20+
* <li>Managing sound effects and particle systems</li>
21+
* </ul>
522
*
623
* @author theEvilReaper
724
* @version 1.0.0
825
* @since 0.1.0
926
*/
1027
public enum AnimationState {
1128

29+
/**
30+
* The door is in a resting state and not currently animating.
31+
* <p>
32+
* This is the default state for doors that are fully closed and stationary.
33+
* From this state, a door can transition to {@link #OPENING} when activation occurs.
34+
* </p>
35+
*/
1236
IDLE,
37+
38+
/**
39+
* The door is currently in the process of opening.
40+
* <p>
41+
* This transitional state represents the animation phase where the door moves
42+
* from closed to open position. During this state, the door should not accept
43+
* new open commands but may accept close commands depending on implementation.
44+
* </p>
45+
*/
1346
OPENING,
47+
48+
/**
49+
* The door is fully open and stationary.
50+
* <p>
51+
* This state indicates that the opening animation has completed and the door
52+
* is now in its fully opened position. From this state, the door can transition
53+
* to {@link #CLOSING} when deactivation occurs or after a timeout period.
54+
* </p>
55+
*/
1456
OPENED,
15-
CLOSING,
16-
}
57+
58+
/**
59+
* The door is currently in the process of closing.
60+
* <p>
61+
* This transitional state represents the animation phase where the door moves
62+
* from open to closed position. During this state, the door should not accept
63+
* new close commands but may accept open commands depending on implementation.
64+
* </p>
65+
*/
66+
CLOSING
67+
}

src/main/java/net/onelitefeather/coris/door/BaseDoor.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,11 @@ public abstract non-sealed class BaseDoor implements Door {
3232
/**
3333
* Creates a new instance from the door class with the given values.
3434
*
35-
* @param uuid the uuid for the door
36-
* @param key the {@link Key} for the door
37-
* @param face the face of the door
38-
* @param shape the shape from the door
35+
* @param uuid the uuid for the door
36+
* @param key the {@link Key} for the door
37+
* @param face the face of the door
38+
* @param shape the shape from the door
39+
* @param componentMap a map of components associated with the door
3940
*/
4041
protected BaseDoor(
4142
@NotNull UUID uuid,

0 commit comments

Comments
 (0)