Skip to content

Commit 144e45c

Browse files
committed
chore(update): update to 24w39a
Signed-off-by: Gabriel Harris-Rouquette <[email protected]>
1 parent 8a94300 commit 144e45c

File tree

4 files changed

+15
-4
lines changed

4 files changed

+15
-4
lines changed

src/main/java/org/spongepowered/api/entity/Entity.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,10 @@ default boolean damage(final double damage, final Supplier<? extends DamageSourc
292292
*/
293293
boolean damage(double damage, DamageSource damageSource);
294294

295+
default void foo() {
296+
297+
}
298+
295299
/**
296300
* Gets the nearby entities within the desired distance.
297301
*

src/main/java/org/spongepowered/api/entity/ai/goal/builtin/creature/AvoidLivingGoal.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@
3030
import org.spongepowered.api.entity.living.Agent;
3131
import org.spongepowered.api.entity.living.Living;
3232
import org.spongepowered.api.entity.living.PathfinderAgent;
33+
import org.spongepowered.api.world.server.ServerWorld;
3334

35+
import java.util.function.BiPredicate;
3436
import java.util.function.Predicate;
3537

3638
public interface AvoidLivingGoal extends Goal<PathfinderAgent> {
@@ -52,7 +54,7 @@ static Builder builder() {
5254
*
5355
* @return The predicate used to filter which entities to avoid
5456
*/
55-
Predicate<Living> targetSelector();
57+
BiPredicate<Living, ServerWorld> targetSelector();
5658

5759
/**
5860
* Sets the {@link Predicate} for filtering which {@link Living} instances
@@ -61,7 +63,11 @@ static Builder builder() {
6163
* @param predicate The predicate
6264
* @return This task, for chaining
6365
*/
64-
AvoidLivingGoal setTargetSelector(Predicate<Living> predicate);
66+
default AvoidLivingGoal setTargetSelector(Predicate<Living> predicate) {
67+
return this.setTargetSelector((entity, world) -> predicate.test(entity));
68+
}
69+
70+
AvoidLivingGoal setTargetSelector(BiPredicate<Living, ServerWorld> predicate);
6571

6672
/**
6773
* Gets the search distance at which any {@link Living} instances in a

src/main/java/org/spongepowered/api/world/server/storage/ServerWorldProperties.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
import org.spongepowered.api.world.WorldType;
4141
import org.spongepowered.api.world.border.WorldBorder;
4242
import org.spongepowered.api.world.difficulty.Difficulty;
43+
import org.spongepowered.api.world.gamerule.GameRuleHolder;
4344
import org.spongepowered.api.world.generation.config.WorldGenerationConfig;
4445
import org.spongepowered.api.world.server.ServerWorld;
4546
import org.spongepowered.api.world.storage.WorldProperties;
@@ -50,7 +51,7 @@
5051
import java.util.Optional;
5152
import java.util.UUID;
5253

53-
public interface ServerWorldProperties extends WorldProperties, Nameable, Identifiable, ResourceKeyed, WeatherUniverse.Mutable {
54+
public interface ServerWorldProperties extends WorldProperties, GameRuleHolder, Nameable, Identifiable, ResourceKeyed, WeatherUniverse.Mutable {
5455

5556
/**
5657
* Gets the {@link ServerWorld} that correlates to this properties, if available.

src/main/java/org/spongepowered/api/world/storage/WorldProperties.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
/**
3737
* Represents the properties of a {@link World} which are persisted across runtime instances.
3838
*/
39-
public interface WorldProperties extends WeatherUniverse, GameRuleHolder, DataHolder.Mutable {
39+
public interface WorldProperties extends WeatherUniverse, DataHolder.Mutable {
4040

4141
/**
4242
* Gets the default spawn position.

0 commit comments

Comments
 (0)