From 1460c68d2460bb60dd1ab23375f5959bc8d99f50 Mon Sep 17 00:00:00 2001
From: Gabriel Harris-Rouquette
Date: Sat, 15 Jun 2024 18:02:37 -0700
Subject: [PATCH 1/7] feat: Release API 11
Signed-off-by: Gabriel Harris-Rouquette
---
gradle.properties | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gradle.properties b/gradle.properties
index bbd9a55f2f..8625a21a8c 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -1,5 +1,5 @@
group=org.spongepowered
-version=11.0.0-SNAPSHOT
+version=11.0.0
organization=SpongePowered
projectUrl=https://www.spongepowered.org
projectDescription=A plugin API for Minecraft: Java Edition
From 734374cfa08053c605a7d66c2363e1977798d9e2 Mon Sep 17 00:00:00 2001
From: Gabriel Harris-Rouquette
Date: Sat, 15 Jun 2024 18:05:19 -0700
Subject: [PATCH 2/7] chore: Update towards next snapshot
Signed-off-by: Gabriel Harris-Rouquette
---
gradle.properties | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gradle.properties b/gradle.properties
index 8625a21a8c..5feddbda90 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -1,5 +1,5 @@
group=org.spongepowered
-version=11.0.0
+version=11.1.0-SNAPSHOT
organization=SpongePowered
projectUrl=https://www.spongepowered.org
projectDescription=A plugin API for Minecraft: Java Edition
From e77997062fe9d369957312442fb0a440c20329b4 Mon Sep 17 00:00:00 2001
From: MrHell228
Date: Sun, 2 Jun 2024 21:08:52 +0300
Subject: [PATCH 3/7] Add Viewer#sendBlockProgress
---
.../org/spongepowered/api/effect/Viewer.java | 56 +++++++++++++++++++
1 file changed, 56 insertions(+)
diff --git a/src/main/java/org/spongepowered/api/effect/Viewer.java b/src/main/java/org/spongepowered/api/effect/Viewer.java
index b79025d091..4a7897d6d3 100644
--- a/src/main/java/org/spongepowered/api/effect/Viewer.java
+++ b/src/main/java/org/spongepowered/api/effect/Viewer.java
@@ -161,4 +161,60 @@ default void resetBlockChange(final Vector3i position) {
*/
void resetBlockChange(int x, int y, int z);
+ /**
+ * Sends a client-only block breaking progress.
+ *
+ * In vanilla breaking progress will not be rendered if player
+ * is further than 32 blocks from given position.
+ * Sent breaking progress expires on client 400 ticks after receiving.
+ *
+ * @param position The position
+ * @param progress The breaking progress from 0 to 1 (1 excluded)
+ */
+ default void sendBlockProgress(final Vector3i position, final float progress) {
+ Objects.requireNonNull(position, "position");
+ this.sendBlockProgress(position.x(), position.y(), position.z(), progress);
+ }
+
+ /**
+ * Sends a client-only block breaking progress.
+ *
+ * In vanilla breaking progress will not be rendered if player
+ * is further than 32 blocks from given position.
+ * Sent breaking progress expires on client 400 ticks after receiving.
+ *
+ * @param x The x position
+ * @param y The y position
+ * @param z The z position
+ * @param progress The breaking progress from 0 to 1 (1 excluded)
+ */
+ void sendBlockProgress(int x, int y, int z, float progress);
+
+ /**
+ * Resets the client's view of the provided position to actual
+ * breaking progress.
+ *
+ * This is useful for resetting what the client sees
+ * after sending a {@link #sendBlockProgress block progress}.
+ *
+ * @param position The position
+ */
+ default void resetBlockProgress(final Vector3i position) {
+ Objects.requireNonNull(position, "position");
+ this.resetBlockProgress(position.x(), position.y(), position.z());
+ }
+
+ /**
+ * Resets the client's view of the provided position to actual
+ * breaking progress.
+ *
+ * This is useful for resetting what the client sees
+ * after sending a {@link #sendBlockProgress block progress}.
+ *
+ * @param x The x position
+ * @param y The y position
+ * @param z The z position
+ */
+ void resetBlockProgress(int x, int y, int z);
+
}
From ba2c603f65bbf2025db4e5735e8a4f28c4d7a0b1 Mon Sep 17 00:00:00 2001
From: MrHell228
Date: Mon, 3 Jun 2024 11:27:25 +0300
Subject: [PATCH 4/7] Allow 1 for block progress
---
src/main/java/org/spongepowered/api/effect/Viewer.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/main/java/org/spongepowered/api/effect/Viewer.java b/src/main/java/org/spongepowered/api/effect/Viewer.java
index 4a7897d6d3..a6c47dc449 100644
--- a/src/main/java/org/spongepowered/api/effect/Viewer.java
+++ b/src/main/java/org/spongepowered/api/effect/Viewer.java
@@ -169,7 +169,7 @@ default void resetBlockChange(final Vector3i position) {
* Sent breaking progress expires on client 400 ticks after receiving.
*
* @param position The position
- * @param progress The breaking progress from 0 to 1 (1 excluded)
+ * @param progress The breaking progress from 0 to 1
*/
default void sendBlockProgress(final Vector3i position, final float progress) {
Objects.requireNonNull(position, "position");
@@ -186,7 +186,7 @@ default void sendBlockProgress(final Vector3i position, final float progress) {
* @param x The x position
* @param y The y position
* @param z The z position
- * @param progress The breaking progress from 0 to 1 (1 excluded)
+ * @param progress The breaking progress from 0 to 1
*/
void sendBlockProgress(int x, int y, int z, float progress);
From 7612a9dda11f746d6ada5e9b5669bf05f416f62a Mon Sep 17 00:00:00 2001
From: MrHell228
Date: Mon, 3 Jun 2024 20:54:08 +0300
Subject: [PATCH 5/7] Make progress double instead of float
---
src/main/java/org/spongepowered/api/effect/Viewer.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/main/java/org/spongepowered/api/effect/Viewer.java b/src/main/java/org/spongepowered/api/effect/Viewer.java
index a6c47dc449..ca1b44495f 100644
--- a/src/main/java/org/spongepowered/api/effect/Viewer.java
+++ b/src/main/java/org/spongepowered/api/effect/Viewer.java
@@ -171,7 +171,7 @@ default void resetBlockChange(final Vector3i position) {
* @param position The position
* @param progress The breaking progress from 0 to 1
*/
- default void sendBlockProgress(final Vector3i position, final float progress) {
+ default void sendBlockProgress(final Vector3i position, final double progress) {
Objects.requireNonNull(position, "position");
this.sendBlockProgress(position.x(), position.y(), position.z(), progress);
}
@@ -188,7 +188,7 @@ default void sendBlockProgress(final Vector3i position, final float progress) {
* @param z The z position
* @param progress The breaking progress from 0 to 1
*/
- void sendBlockProgress(int x, int y, int z, float progress);
+ void sendBlockProgress(int x, int y, int z, double progress);
/**
* Resets the client's view of the provided position to actual
From eea04caa0f06d40aaad9ce82444e2cd464e28ec5 Mon Sep 17 00:00:00 2001
From: MrHell228
Date: Sun, 23 Jun 2024 03:14:58 +0300
Subject: [PATCH 6/7] Remove vanilla behaviour description
---
src/main/java/org/spongepowered/api/effect/Viewer.java | 8 --------
1 file changed, 8 deletions(-)
diff --git a/src/main/java/org/spongepowered/api/effect/Viewer.java b/src/main/java/org/spongepowered/api/effect/Viewer.java
index ca1b44495f..d0e23ae2a9 100644
--- a/src/main/java/org/spongepowered/api/effect/Viewer.java
+++ b/src/main/java/org/spongepowered/api/effect/Viewer.java
@@ -164,10 +164,6 @@ default void resetBlockChange(final Vector3i position) {
/**
* Sends a client-only block breaking progress.
*
- * In vanilla breaking progress will not be rendered if player
- * is further than 32 blocks from given position.
- * Sent breaking progress expires on client 400 ticks after receiving.
- *
* @param position The position
* @param progress The breaking progress from 0 to 1
*/
@@ -179,10 +175,6 @@ default void sendBlockProgress(final Vector3i position, final double progress) {
/**
* Sends a client-only block breaking progress.
*
- * In vanilla breaking progress will not be rendered if player
- * is further than 32 blocks from given position.
- * Sent breaking progress expires on client 400 ticks after receiving.
- *
* @param x The x position
* @param y The y position
* @param z The z position
From fcfb9213f66959667ae63523d593e2e5cf567af9 Mon Sep 17 00:00:00 2001
From: Jesse McKee
Date: Fri, 31 May 2024 17:02:39 -0500
Subject: [PATCH 7/7] Add Keys.TELEPORT_DURATION for DisplayEntity
Closes #2508
---
src/main/java/org/spongepowered/api/data/Keys.java | 5 +++++
.../spongepowered/api/entity/display/DisplayEntity.java | 9 +++++++++
2 files changed, 14 insertions(+)
diff --git a/src/main/java/org/spongepowered/api/data/Keys.java b/src/main/java/org/spongepowered/api/data/Keys.java
index 29796d2198..8efdf7d032 100644
--- a/src/main/java/org/spongepowered/api/data/Keys.java
+++ b/src/main/java/org/spongepowered/api/data/Keys.java
@@ -3113,6 +3113,11 @@ public final class Keys {
*/
public static final Key> TARGET_POSITION = Keys.key(ResourceKey.sponge("target_position"), Vector3i.class);
+ /**
+ * The teleport duration of a {@link DisplayEntity}
+ */
+ public static final Key> TELEPORT_DURATION = Keys.key(ResourceKey.sponge("teleport_duration"), Ticks.class);
+
/**
* The {@link TemperatureModifier} of a {@link Biome}.
* Readonly
diff --git a/src/main/java/org/spongepowered/api/entity/display/DisplayEntity.java b/src/main/java/org/spongepowered/api/entity/display/DisplayEntity.java
index ea6e470db0..0173171c71 100644
--- a/src/main/java/org/spongepowered/api/entity/display/DisplayEntity.java
+++ b/src/main/java/org/spongepowered/api/entity/display/DisplayEntity.java
@@ -64,6 +64,15 @@ default Ticks interpolationDelay() {
return this.require(Keys.INTERPOLATION_DELAY);
}
+ /**
+ * Returns the duration of the teleportation
+ *
+ * @return the duration of the teleportation
+ */
+ default Ticks teleportDuration() {
+ return this.require(Keys.TELEPORT_DURATION);
+ }
+
default BillboardType billboardType() {
return this.require(Keys.BILLBOARD_TYPE);
}