Skip to content

Commit

Permalink
Remove INFINITE_DESPAWN_DELAY & INFINITE_PICKUP_DELAY
Browse files Browse the repository at this point in the history
  • Loading branch information
aromaa committed May 4, 2024
1 parent 03ce3b9 commit 69578e4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 34 deletions.
13 changes: 1 addition & 12 deletions src/main/java/org/spongepowered/api/data/Keys.java
Original file line number Diff line number Diff line change
Expand Up @@ -1408,16 +1408,6 @@ public final class Keys {
*/
public static final Key<Value<Tag<BlockType>>> INFINIBURN = Keys.key(ResourceKey.sponge("infiniburn"), new TypeToken<Tag<BlockType>>() {});

/**
* Whether an {@link Item} will not despawn for an infinite time.
*/
public static final Key<Value<Boolean>> INFINITE_DESPAWN_DELAY = Keys.key(ResourceKey.sponge("infinite_despawn_delay"), Boolean.class);

/**
* Whether an {@link Item} has an infinite pickup delay.
*/
public static final Key<Value<Boolean>> INFINITE_PICKUP_DELAY = Keys.key(ResourceKey.sponge("infinite_pickup_delay"), Boolean.class);

/**
* Whether a world of a {@link ServerWorldProperties} was initialized.
*/
Expand Down Expand Up @@ -2087,8 +2077,7 @@ public final class Keys {
* <p>When this value hits 0 or lower, the Vex will receive damage and
* then the value will set back to 20 until the Vex dies.</p>
*
* <p>If the Vex was summoned by a player, this value will be pegged at 0
* and the Vex will not take any damage.</p>
* <p>If the Vex was summoned by a player, this value will be {@link Ticks#infinite()}</p>
*/
public static final Key<Value<Ticks>> LIFE_TICKS = Keys.key(ResourceKey.sponge("life_ticks"), Ticks.class);

Expand Down
18 changes: 0 additions & 18 deletions src/main/java/org/spongepowered/api/entity/Item.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,24 +52,6 @@ default Value.Mutable<Ticks> despawnDelay() {
return this.requireValue(Keys.DESPAWN_DELAY).asMutable();
}

/**
* {@link Keys#INFINITE_DESPAWN_DELAY}
*
* @return Whether the item will not despawn for an infinite time
*/
default Value.Mutable<Boolean> infiniteDespawnDelay() {
return this.requireValue(Keys.INFINITE_DESPAWN_DELAY).asMutable();
}

/**
* {@link Keys#INFINITE_PICKUP_DELAY}
*
* @return Whether the item has an infinite pickup delay
*/
default Value.Mutable<Boolean> infinitePickupDelay() {
return this.requireValue(Keys.INFINITE_PICKUP_DELAY).asMutable();
}

/**
* {@link Keys#PICKUP_DELAY}
*
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/org/spongepowered/api/util/Ticks.java
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ static Ticks ofMinecraftDays(final Engine engine, final long days) {
*
* @param engine The {@link Engine} to get the {@link Duration} for
* @return The effective {@link Duration}.
* @throws IllegalStateException If {@see isInfinite} is true.
* @throws IllegalStateException If {@link Ticks#isInfinite()} is true.
*/
Duration expectedDuration(final Engine engine);

Expand All @@ -316,7 +316,7 @@ static Ticks ofMinecraftDays(final Engine engine, final long days) {
* session.</p>
*
* @return The number of ticks that this represents.
* @throws IllegalStateException If {@see isInfinite} is true.
* @throws IllegalStateException If {@link Ticks#isInfinite()} is true.
*/
long ticks();

Expand All @@ -332,7 +332,7 @@ static Ticks ofMinecraftDays(final Engine engine, final long days) {
*
* @param engine The {@link Engine} to calculate the duration for.
* @return The approximate number of in-game seconds
* @throws IllegalStateException If {@see isInfinite} is true.
* @throws IllegalStateException If {@link Ticks#isInfinite()} is true.
*/
long minecraftSeconds(final Engine engine);

Expand All @@ -345,7 +345,7 @@ static Ticks ofMinecraftDays(final Engine engine, final long days) {
*
* @param engine The {@link Engine} to calculate the duration for.
* @return A duration representing the in game time.
* @throws IllegalStateException If {@see isInfinite} is true.
* @throws IllegalStateException If {@link Ticks#isInfinite()} is true.
*/
Duration minecraftDayTimeDuration(final Engine engine);

Expand Down

0 comments on commit 69578e4

Please sign in to comment.