Skip to content

Commit

Permalink
chore(update): update to 24w39a
Browse files Browse the repository at this point in the history
Signed-off-by: Gabriel Harris-Rouquette <[email protected]>
  • Loading branch information
gabizou committed Oct 3, 2024
1 parent 8a94300 commit 144e45c
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 4 deletions.
4 changes: 4 additions & 0 deletions src/main/java/org/spongepowered/api/entity/Entity.java
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,10 @@ default boolean damage(final double damage, final Supplier<? extends DamageSourc
*/
boolean damage(double damage, DamageSource damageSource);

default void foo() {

}

/**
* Gets the nearby entities within the desired distance.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@
import org.spongepowered.api.entity.living.Agent;
import org.spongepowered.api.entity.living.Living;
import org.spongepowered.api.entity.living.PathfinderAgent;
import org.spongepowered.api.world.server.ServerWorld;

import java.util.function.BiPredicate;
import java.util.function.Predicate;

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

/**
* Sets the {@link Predicate} for filtering which {@link Living} instances
Expand All @@ -61,7 +63,11 @@ static Builder builder() {
* @param predicate The predicate
* @return This task, for chaining
*/
AvoidLivingGoal setTargetSelector(Predicate<Living> predicate);
default AvoidLivingGoal setTargetSelector(Predicate<Living> predicate) {
return this.setTargetSelector((entity, world) -> predicate.test(entity));
}

AvoidLivingGoal setTargetSelector(BiPredicate<Living, ServerWorld> predicate);

/**
* Gets the search distance at which any {@link Living} instances in a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
import org.spongepowered.api.world.WorldType;
import org.spongepowered.api.world.border.WorldBorder;
import org.spongepowered.api.world.difficulty.Difficulty;
import org.spongepowered.api.world.gamerule.GameRuleHolder;
import org.spongepowered.api.world.generation.config.WorldGenerationConfig;
import org.spongepowered.api.world.server.ServerWorld;
import org.spongepowered.api.world.storage.WorldProperties;
Expand All @@ -50,7 +51,7 @@
import java.util.Optional;
import java.util.UUID;

public interface ServerWorldProperties extends WorldProperties, Nameable, Identifiable, ResourceKeyed, WeatherUniverse.Mutable {
public interface ServerWorldProperties extends WorldProperties, GameRuleHolder, Nameable, Identifiable, ResourceKeyed, WeatherUniverse.Mutable {

/**
* Gets the {@link ServerWorld} that correlates to this properties, if available.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
/**
* Represents the properties of a {@link World} which are persisted across runtime instances.
*/
public interface WorldProperties extends WeatherUniverse, GameRuleHolder, DataHolder.Mutable {
public interface WorldProperties extends WeatherUniverse, DataHolder.Mutable {

/**
* Gets the default spawn position.
Expand Down

0 comments on commit 144e45c

Please sign in to comment.