Search in sources :

Example 6 with Context

use of org.spongepowered.api.service.context.Context in project SpongeCommon by SpongePowered.

the class MixinWorld method getContext.

@Override
public Context getContext() {
    if (this.worldContext == null) {
        WorldInfo worldInfo = getWorldInfo();
        if (worldInfo == null) {
            // We still have to consider some mods are making dummy worlds that
            // override getWorldInfo with a null, or submit a null value.
            worldInfo = new WorldInfo(new WorldSettings(0, GameType.NOT_SET, false, false, WorldType.DEFAULT), "sponge$dummy_World");
        }
        this.worldContext = new Context(Context.WORLD_KEY, worldInfo.getWorldName());
    }
    return this.worldContext;
}
Also used : Context(org.spongepowered.api.service.context.Context) PhaseContext(org.spongepowered.common.event.tracking.PhaseContext) WorldInfo(net.minecraft.world.storage.WorldInfo) IMixinWorldInfo(org.spongepowered.common.interfaces.world.IMixinWorldInfo) WorldSettings(net.minecraft.world.WorldSettings)

Example 7 with Context

use of org.spongepowered.api.service.context.Context in project SpongeCommon by SpongePowered.

the class SpongeContextCalculator method accumulateContexts.

@Override
public void accumulateContexts(Subject subject, Set<Context> accumulator) {
    Optional<CommandSource> subjSource = subject.getCommandSource();
    if (subjSource.isPresent()) {
        CommandSource source = subjSource.get();
        if (source instanceof Locatable) {
            World currentExt = ((Locatable) source).getWorld();
            accumulator.add(currentExt.getContext());
            accumulator.add((currentExt.getDimension().getContext()));
        }
        if (source instanceof RemoteSource) {
            RemoteSource rem = (RemoteSource) source;
            accumulator.addAll(this.remoteIpCache.getUnchecked(rem));
            accumulator.addAll(this.localIpCache.getUnchecked(rem));
            accumulator.add(new Context(Context.LOCAL_PORT_KEY, String.valueOf(rem.getConnection().getVirtualHost().getPort())));
            accumulator.add(new Context(Context.LOCAL_HOST_KEY, rem.getConnection().getVirtualHost().getHostName()));
        }
    }
}
Also used : Context(org.spongepowered.api.service.context.Context) RemoteSource(org.spongepowered.api.command.source.RemoteSource) CommandSource(org.spongepowered.api.command.CommandSource) World(org.spongepowered.api.world.World) Locatable(org.spongepowered.api.world.Locatable)

Example 8 with Context

use of org.spongepowered.api.service.context.Context in project LuckPerms by lucko.

the class DelegatingMutableContextSet method remove.

@Override
public boolean remove(Object o) {
    if (o instanceof Context) {
        Context context = (Context) o;
        if (context.getKey().isEmpty() || context.getValue().isEmpty()) {
            return false;
        }
        boolean had = this.delegate.has(context);
        this.delegate.remove(context.getKey(), context.getValue());
        return had;
    }
    return false;
}
Also used : Context(org.spongepowered.api.service.context.Context)

Example 9 with Context

use of org.spongepowered.api.service.context.Context in project LanternServer by LanternPowered.

the class LanternWorld method placeBlock.

@Override
public boolean placeBlock(int x, int y, int z, BlockState block, Direction side, @Nullable GameProfile profile) {
    final BehaviorPipeline<Behavior> pipeline = ((LanternBlockType) block.getType()).getPipeline();
    final CauseStack causeStack = CauseStack.current();
    try (CauseStack.Frame frame = causeStack.pushCauseFrame()) {
        frame.addContext(ContextKeys.USED_BLOCK_STATE, block);
        frame.addContext(ContextKeys.INTERACTION_FACE, side);
        frame.addContext(ContextKeys.BLOCK_LOCATION, new Location<>(this, x, y, z));
        frame.addContext(ContextKeys.BLOCK_TYPE, block.getType());
        if (profile != null) {
            frame.addContext(EventContextKeys.PLAYER_SIMULATED, profile);
        }
        final BehaviorContextImpl context = new BehaviorContextImpl(causeStack);
        // Just pass an object trough to make sure that a value is present when successful
        if (context.process(pipeline.pipeline(PlaceBlockBehavior.class), (ctx, behavior) -> behavior.tryPlace(pipeline, ctx)).isSuccess()) {
            context.accept();
            return true;
        }
        context.revert();
        return false;
    }
}
Also used : LanternEntity(org.lanternpowered.server.entity.LanternEntity) AnvilChunkIOService(org.lanternpowered.server.data.io.anvil.AnvilChunkIOService) WorldStorage(org.spongepowered.api.world.storage.WorldStorage) WorldConfig(org.lanternpowered.server.config.world.WorldConfig) RuleHolder(org.lanternpowered.server.world.rules.RuleHolder) SoundCategory(org.spongepowered.api.effect.sound.SoundCategory) BookView(org.spongepowered.api.text.BookView) ItemStack(org.spongepowered.api.item.inventory.ItemStack) ChunkIOService(org.lanternpowered.server.data.io.ChunkIOService) LanternChunkManager(org.lanternpowered.server.world.chunk.LanternChunkManager) MutableBiomeVolumeWorker(org.spongepowered.api.world.extent.worker.MutableBiomeVolumeWorker) Map(java.util.Map) GameProfile(org.spongepowered.api.profile.GameProfile) VecHelper(org.lanternpowered.server.util.VecHelper) LanternSoundType(org.lanternpowered.server.effect.sound.LanternSoundType) Path(java.nio.file.Path) InteractWithBlockBehavior(org.lanternpowered.server.block.behavior.types.InteractWithBlockBehavior) MessagePlayOutParticleEffect(org.lanternpowered.server.network.vanilla.message.type.play.MessagePlayOutParticleEffect) RuleType(org.lanternpowered.server.world.rules.RuleType) Location(org.spongepowered.api.world.Location) AbstractViewer(org.lanternpowered.server.effect.AbstractViewer) HardnessProperty(org.spongepowered.api.data.property.block.HardnessProperty) LanternWeather(org.lanternpowered.server.world.weather.LanternWeather) Extent(org.spongepowered.api.world.extent.Extent) UnbreakableProperty(org.spongepowered.api.data.property.block.UnbreakableProperty) ArchetypeVolume(org.spongepowered.api.world.extent.ArchetypeVolume) DataContainer(org.spongepowered.api.data.DataContainer) Set(java.util.Set) Weathers(org.spongepowered.api.world.weather.Weathers) BlockAction(org.lanternpowered.server.block.action.BlockAction) BlockState(org.spongepowered.api.block.BlockState) Direction(org.spongepowered.api.util.Direction) ConstructEntityEvent(org.spongepowered.api.event.entity.ConstructEntityEvent) AbstractExtent(org.lanternpowered.server.world.extent.AbstractExtent) World(org.spongepowered.api.world.World) MessagePlayOutRecord(org.lanternpowered.server.network.vanilla.message.type.play.MessagePlayOutRecord) Player(org.spongepowered.api.entity.living.player.Player) EntityProtocolType(org.lanternpowered.server.network.entity.EntityProtocolType) ObservedChunkManager(org.lanternpowered.server.entity.living.player.ObservedChunkManager) BehaviorPipeline(org.lanternpowered.server.behavior.pipeline.BehaviorPipeline) ImmutableValue(org.spongepowered.api.data.value.immutable.ImmutableValue) Vector3d(com.flowpowered.math.vector.Vector3d) AABB(org.spongepowered.api.util.AABB) GameModes(org.spongepowered.api.entity.living.player.gamemode.GameModes) Supplier(java.util.function.Supplier) Key(org.spongepowered.api.data.key.Key) ArrayList(java.util.ArrayList) Vector2i(com.flowpowered.math.vector.Vector2i) LanternTitles(org.lanternpowered.server.text.title.LanternTitles) Lists(com.google.common.collect.Lists) CauseStack(org.lanternpowered.server.event.CauseStack) ExtentViewDownsize(org.lanternpowered.server.world.extent.ExtentViewDownsize) Text(org.spongepowered.api.text.Text) Nullable(javax.annotation.Nullable) ContextKeys(org.lanternpowered.server.behavior.ContextKeys) MessagePlayOutStopSounds(org.lanternpowered.server.network.vanilla.message.type.play.MessagePlayOutStopSounds) Context(org.spongepowered.api.service.context.Context) SpongeEventFactory(org.spongepowered.api.event.SpongeEventFactory) InvalidDataException(org.spongepowered.api.data.persistence.InvalidDataException) SpawnEntityEvent(org.spongepowered.api.event.entity.SpawnEntityEvent) Scoreboard(org.spongepowered.api.scoreboard.Scoreboard) IOException(java.io.IOException) DataHolder(org.spongepowered.api.data.DataHolder) Entity(org.spongepowered.api.entity.Entity) Message(org.lanternpowered.server.network.message.Message) LanternMutableBlockVolumeWorker(org.lanternpowered.server.world.extent.worker.LanternMutableBlockVolumeWorker) DataView(org.spongepowered.api.data.DataView) Vector3i(com.flowpowered.math.vector.Vector3i) PortalAgent(org.spongepowered.api.world.PortalAgent) EventContextKeys(org.spongepowered.api.event.cause.EventContextKeys) LanternBlockType(org.lanternpowered.server.block.LanternBlockType) LanternChunkPreGenerateTask(org.lanternpowered.server.world.pregen.LanternChunkPreGenerateTask) BiFunction(java.util.function.BiFunction) LoggerFactory(org.slf4j.LoggerFactory) EntityProtocolManager(org.lanternpowered.server.network.entity.EntityProtocolManager) LanternChunkTicketManager(org.lanternpowered.server.world.chunk.LanternChunkTicketManager) SPACE_MIN(org.lanternpowered.server.world.chunk.LanternChunkLayout.SPACE_MIN) Behavior(org.lanternpowered.server.behavior.Behavior) EntitySnapshot(org.spongepowered.api.entity.EntitySnapshot) ChatType(org.spongepowered.api.text.chat.ChatType) Preconditions.checkArgument(com.google.common.base.Preconditions.checkArgument) BreakBlockBehavior(org.lanternpowered.server.block.behavior.types.BreakBlockBehavior) ParticleEffect(org.spongepowered.api.effect.particle.ParticleEffect) TileEntity(org.spongepowered.api.block.tileentity.TileEntity) Locale(java.util.Locale) ChunkPreGenerate(org.spongepowered.api.world.ChunkPreGenerate) Title(org.spongepowered.api.text.title.Title) MergeFunction(org.spongepowered.api.data.merge.MergeFunction) LanternChunk.fixEntityYSection(org.lanternpowered.server.world.chunk.LanternChunk.fixEntityYSection) Dimension(org.spongepowered.api.world.Dimension) MutableBlockVolumeWorker(org.spongepowered.api.world.extent.worker.MutableBlockVolumeWorker) SPACE_MAX(org.lanternpowered.server.world.chunk.LanternChunkLayout.SPACE_MAX) ImmutableSet(com.google.common.collect.ImmutableSet) User(org.spongepowered.api.entity.living.player.User) SoundType(org.spongepowered.api.effect.sound.SoundType) Predicate(java.util.function.Predicate) Collection(java.util.Collection) ChunkLoadingTicket(org.lanternpowered.server.world.chunk.ChunkLoadingTicket) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) Sponge(org.spongepowered.api.Sponge) Tuple(org.spongepowered.api.util.Tuple) UUID(java.util.UUID) Collectors(java.util.stream.Collectors) Sets(com.google.common.collect.Sets) LanternEntityType(org.lanternpowered.server.entity.LanternEntityType) LanternGame(org.lanternpowered.server.game.LanternGame) WorldGenerator(org.spongepowered.api.world.gen.WorldGenerator) Cause(org.spongepowered.api.event.cause.Cause) List(java.util.List) Lantern(org.lanternpowered.server.game.Lantern) Explosion(org.spongepowered.api.world.explosion.Explosion) Transform(org.spongepowered.api.entity.Transform) BlockType(org.spongepowered.api.block.BlockType) DataManipulator(org.spongepowered.api.data.manipulator.DataManipulator) Optional(java.util.Optional) RecordType(org.spongepowered.api.effect.sound.record.RecordType) ScheduledBlockUpdate(org.spongepowered.api.block.ScheduledBlockUpdate) LanternChatType(org.lanternpowered.server.text.chat.LanternChatType) BlockSnapshot(org.spongepowered.api.block.BlockSnapshot) ChatTypes(org.spongepowered.api.text.chat.ChatTypes) WeatherUniverse(org.lanternpowered.api.world.weather.WeatherUniverse) Keys(org.spongepowered.api.data.key.Keys) ScoreboardIO(org.lanternpowered.server.data.io.ScoreboardIO) LanternChunk(org.lanternpowered.server.world.chunk.LanternChunk) BehaviorContextImpl(org.lanternpowered.server.behavior.BehaviorContextImpl) BiomeType(org.spongepowered.api.world.biome.BiomeType) HashMap(java.util.HashMap) DataTransactionResult(org.spongepowered.api.data.DataTransactionResult) Function(java.util.function.Function) BlockChangeFlag(org.spongepowered.api.world.BlockChangeFlag) ImmutableList(com.google.common.collect.ImmutableList) EntityTypes(org.spongepowered.api.entity.EntityTypes) PlaceBlockBehavior(org.lanternpowered.server.block.behavior.types.PlaceBlockBehavior) Rule(org.lanternpowered.server.world.rules.Rule) Logger(org.slf4j.Logger) Weather(org.spongepowered.api.world.weather.Weather) Iterator(java.util.Iterator) Preconditions.checkNotNull(com.google.common.base.Preconditions.checkNotNull) BaseValue(org.spongepowered.api.data.value.BaseValue) Chunk(org.spongepowered.api.world.Chunk) Consumer(java.util.function.Consumer) LanternMutableBiomeVolumeWorker(org.lanternpowered.server.world.extent.worker.LanternMutableBiomeVolumeWorker) LanternDimensionType(org.lanternpowered.server.world.dimension.LanternDimensionType) Difficulty(org.spongepowered.api.world.difficulty.Difficulty) LanternPlayer(org.lanternpowered.server.entity.living.player.LanternPlayer) Property(org.spongepowered.api.data.Property) IGeneratorType(org.lanternpowered.server.world.gen.IGeneratorType) EntityType(org.spongepowered.api.entity.EntityType) MessageChannel(org.spongepowered.api.text.channel.MessageChannel) Collections(java.util.Collections) CauseStack(org.lanternpowered.server.event.CauseStack) BehaviorContextImpl(org.lanternpowered.server.behavior.BehaviorContextImpl) InteractWithBlockBehavior(org.lanternpowered.server.block.behavior.types.InteractWithBlockBehavior) Behavior(org.lanternpowered.server.behavior.Behavior) BreakBlockBehavior(org.lanternpowered.server.block.behavior.types.BreakBlockBehavior) PlaceBlockBehavior(org.lanternpowered.server.block.behavior.types.PlaceBlockBehavior) LanternBlockType(org.lanternpowered.server.block.LanternBlockType)

Example 10 with Context

use of org.spongepowered.api.service.context.Context in project LanternServer by LanternPowered.

the class LanternWorld method digBlock.

private boolean digBlock(int x, int y, int z, @Nullable GameProfile profile, @Nullable ItemStack itemStack) {
    final LanternBlockType blockType = ((LanternBlockType) getBlockType(x, y, z));
    final BehaviorPipeline<Behavior> pipeline = blockType.getPipeline();
    final CauseStack causeStack = CauseStack.current();
    try (CauseStack.Frame frame = causeStack.pushCauseFrame()) {
        frame.addContext(ContextKeys.BLOCK_LOCATION, new Location<>(this, x, y, z));
        frame.addContext(ContextKeys.BLOCK_TYPE, blockType);
        if (profile != null) {
            frame.addContext(EventContextKeys.PLAYER_SIMULATED, profile);
        }
        if (itemStack != null) {
            frame.addContext(ContextKeys.USED_ITEM_STACK, itemStack);
        }
        final BehaviorContextImpl context = new BehaviorContextImpl(causeStack);
        // Just pass an object trough to make sure that a value is present when successful
        if (context.process(pipeline.pipeline(BreakBlockBehavior.class), (ctx, behavior) -> behavior.tryBreak(pipeline, ctx)).isSuccess()) {
            context.accept();
            return true;
        }
        context.revert();
        return false;
    }
}
Also used : LanternEntity(org.lanternpowered.server.entity.LanternEntity) AnvilChunkIOService(org.lanternpowered.server.data.io.anvil.AnvilChunkIOService) WorldStorage(org.spongepowered.api.world.storage.WorldStorage) WorldConfig(org.lanternpowered.server.config.world.WorldConfig) RuleHolder(org.lanternpowered.server.world.rules.RuleHolder) SoundCategory(org.spongepowered.api.effect.sound.SoundCategory) BookView(org.spongepowered.api.text.BookView) ItemStack(org.spongepowered.api.item.inventory.ItemStack) ChunkIOService(org.lanternpowered.server.data.io.ChunkIOService) LanternChunkManager(org.lanternpowered.server.world.chunk.LanternChunkManager) MutableBiomeVolumeWorker(org.spongepowered.api.world.extent.worker.MutableBiomeVolumeWorker) Map(java.util.Map) GameProfile(org.spongepowered.api.profile.GameProfile) VecHelper(org.lanternpowered.server.util.VecHelper) LanternSoundType(org.lanternpowered.server.effect.sound.LanternSoundType) Path(java.nio.file.Path) InteractWithBlockBehavior(org.lanternpowered.server.block.behavior.types.InteractWithBlockBehavior) MessagePlayOutParticleEffect(org.lanternpowered.server.network.vanilla.message.type.play.MessagePlayOutParticleEffect) RuleType(org.lanternpowered.server.world.rules.RuleType) Location(org.spongepowered.api.world.Location) AbstractViewer(org.lanternpowered.server.effect.AbstractViewer) HardnessProperty(org.spongepowered.api.data.property.block.HardnessProperty) LanternWeather(org.lanternpowered.server.world.weather.LanternWeather) Extent(org.spongepowered.api.world.extent.Extent) UnbreakableProperty(org.spongepowered.api.data.property.block.UnbreakableProperty) ArchetypeVolume(org.spongepowered.api.world.extent.ArchetypeVolume) DataContainer(org.spongepowered.api.data.DataContainer) Set(java.util.Set) Weathers(org.spongepowered.api.world.weather.Weathers) BlockAction(org.lanternpowered.server.block.action.BlockAction) BlockState(org.spongepowered.api.block.BlockState) Direction(org.spongepowered.api.util.Direction) ConstructEntityEvent(org.spongepowered.api.event.entity.ConstructEntityEvent) AbstractExtent(org.lanternpowered.server.world.extent.AbstractExtent) World(org.spongepowered.api.world.World) MessagePlayOutRecord(org.lanternpowered.server.network.vanilla.message.type.play.MessagePlayOutRecord) Player(org.spongepowered.api.entity.living.player.Player) EntityProtocolType(org.lanternpowered.server.network.entity.EntityProtocolType) ObservedChunkManager(org.lanternpowered.server.entity.living.player.ObservedChunkManager) BehaviorPipeline(org.lanternpowered.server.behavior.pipeline.BehaviorPipeline) ImmutableValue(org.spongepowered.api.data.value.immutable.ImmutableValue) Vector3d(com.flowpowered.math.vector.Vector3d) AABB(org.spongepowered.api.util.AABB) GameModes(org.spongepowered.api.entity.living.player.gamemode.GameModes) Supplier(java.util.function.Supplier) Key(org.spongepowered.api.data.key.Key) ArrayList(java.util.ArrayList) Vector2i(com.flowpowered.math.vector.Vector2i) LanternTitles(org.lanternpowered.server.text.title.LanternTitles) Lists(com.google.common.collect.Lists) CauseStack(org.lanternpowered.server.event.CauseStack) ExtentViewDownsize(org.lanternpowered.server.world.extent.ExtentViewDownsize) Text(org.spongepowered.api.text.Text) Nullable(javax.annotation.Nullable) ContextKeys(org.lanternpowered.server.behavior.ContextKeys) MessagePlayOutStopSounds(org.lanternpowered.server.network.vanilla.message.type.play.MessagePlayOutStopSounds) Context(org.spongepowered.api.service.context.Context) SpongeEventFactory(org.spongepowered.api.event.SpongeEventFactory) InvalidDataException(org.spongepowered.api.data.persistence.InvalidDataException) SpawnEntityEvent(org.spongepowered.api.event.entity.SpawnEntityEvent) Scoreboard(org.spongepowered.api.scoreboard.Scoreboard) IOException(java.io.IOException) DataHolder(org.spongepowered.api.data.DataHolder) Entity(org.spongepowered.api.entity.Entity) Message(org.lanternpowered.server.network.message.Message) LanternMutableBlockVolumeWorker(org.lanternpowered.server.world.extent.worker.LanternMutableBlockVolumeWorker) DataView(org.spongepowered.api.data.DataView) Vector3i(com.flowpowered.math.vector.Vector3i) PortalAgent(org.spongepowered.api.world.PortalAgent) EventContextKeys(org.spongepowered.api.event.cause.EventContextKeys) LanternBlockType(org.lanternpowered.server.block.LanternBlockType) LanternChunkPreGenerateTask(org.lanternpowered.server.world.pregen.LanternChunkPreGenerateTask) BiFunction(java.util.function.BiFunction) LoggerFactory(org.slf4j.LoggerFactory) EntityProtocolManager(org.lanternpowered.server.network.entity.EntityProtocolManager) LanternChunkTicketManager(org.lanternpowered.server.world.chunk.LanternChunkTicketManager) SPACE_MIN(org.lanternpowered.server.world.chunk.LanternChunkLayout.SPACE_MIN) Behavior(org.lanternpowered.server.behavior.Behavior) EntitySnapshot(org.spongepowered.api.entity.EntitySnapshot) ChatType(org.spongepowered.api.text.chat.ChatType) Preconditions.checkArgument(com.google.common.base.Preconditions.checkArgument) BreakBlockBehavior(org.lanternpowered.server.block.behavior.types.BreakBlockBehavior) ParticleEffect(org.spongepowered.api.effect.particle.ParticleEffect) TileEntity(org.spongepowered.api.block.tileentity.TileEntity) Locale(java.util.Locale) ChunkPreGenerate(org.spongepowered.api.world.ChunkPreGenerate) Title(org.spongepowered.api.text.title.Title) MergeFunction(org.spongepowered.api.data.merge.MergeFunction) LanternChunk.fixEntityYSection(org.lanternpowered.server.world.chunk.LanternChunk.fixEntityYSection) Dimension(org.spongepowered.api.world.Dimension) MutableBlockVolumeWorker(org.spongepowered.api.world.extent.worker.MutableBlockVolumeWorker) SPACE_MAX(org.lanternpowered.server.world.chunk.LanternChunkLayout.SPACE_MAX) ImmutableSet(com.google.common.collect.ImmutableSet) User(org.spongepowered.api.entity.living.player.User) SoundType(org.spongepowered.api.effect.sound.SoundType) Predicate(java.util.function.Predicate) Collection(java.util.Collection) ChunkLoadingTicket(org.lanternpowered.server.world.chunk.ChunkLoadingTicket) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) Sponge(org.spongepowered.api.Sponge) Tuple(org.spongepowered.api.util.Tuple) UUID(java.util.UUID) Collectors(java.util.stream.Collectors) Sets(com.google.common.collect.Sets) LanternEntityType(org.lanternpowered.server.entity.LanternEntityType) LanternGame(org.lanternpowered.server.game.LanternGame) WorldGenerator(org.spongepowered.api.world.gen.WorldGenerator) Cause(org.spongepowered.api.event.cause.Cause) List(java.util.List) Lantern(org.lanternpowered.server.game.Lantern) Explosion(org.spongepowered.api.world.explosion.Explosion) Transform(org.spongepowered.api.entity.Transform) BlockType(org.spongepowered.api.block.BlockType) DataManipulator(org.spongepowered.api.data.manipulator.DataManipulator) Optional(java.util.Optional) RecordType(org.spongepowered.api.effect.sound.record.RecordType) ScheduledBlockUpdate(org.spongepowered.api.block.ScheduledBlockUpdate) LanternChatType(org.lanternpowered.server.text.chat.LanternChatType) BlockSnapshot(org.spongepowered.api.block.BlockSnapshot) ChatTypes(org.spongepowered.api.text.chat.ChatTypes) WeatherUniverse(org.lanternpowered.api.world.weather.WeatherUniverse) Keys(org.spongepowered.api.data.key.Keys) ScoreboardIO(org.lanternpowered.server.data.io.ScoreboardIO) LanternChunk(org.lanternpowered.server.world.chunk.LanternChunk) BehaviorContextImpl(org.lanternpowered.server.behavior.BehaviorContextImpl) BiomeType(org.spongepowered.api.world.biome.BiomeType) HashMap(java.util.HashMap) DataTransactionResult(org.spongepowered.api.data.DataTransactionResult) Function(java.util.function.Function) BlockChangeFlag(org.spongepowered.api.world.BlockChangeFlag) ImmutableList(com.google.common.collect.ImmutableList) EntityTypes(org.spongepowered.api.entity.EntityTypes) PlaceBlockBehavior(org.lanternpowered.server.block.behavior.types.PlaceBlockBehavior) Rule(org.lanternpowered.server.world.rules.Rule) Logger(org.slf4j.Logger) Weather(org.spongepowered.api.world.weather.Weather) Iterator(java.util.Iterator) Preconditions.checkNotNull(com.google.common.base.Preconditions.checkNotNull) BaseValue(org.spongepowered.api.data.value.BaseValue) Chunk(org.spongepowered.api.world.Chunk) Consumer(java.util.function.Consumer) LanternMutableBiomeVolumeWorker(org.lanternpowered.server.world.extent.worker.LanternMutableBiomeVolumeWorker) LanternDimensionType(org.lanternpowered.server.world.dimension.LanternDimensionType) Difficulty(org.spongepowered.api.world.difficulty.Difficulty) LanternPlayer(org.lanternpowered.server.entity.living.player.LanternPlayer) Property(org.spongepowered.api.data.Property) IGeneratorType(org.lanternpowered.server.world.gen.IGeneratorType) EntityType(org.spongepowered.api.entity.EntityType) MessageChannel(org.spongepowered.api.text.channel.MessageChannel) Collections(java.util.Collections) CauseStack(org.lanternpowered.server.event.CauseStack) BehaviorContextImpl(org.lanternpowered.server.behavior.BehaviorContextImpl) InteractWithBlockBehavior(org.lanternpowered.server.block.behavior.types.InteractWithBlockBehavior) Behavior(org.lanternpowered.server.behavior.Behavior) BreakBlockBehavior(org.lanternpowered.server.block.behavior.types.BreakBlockBehavior) PlaceBlockBehavior(org.lanternpowered.server.block.behavior.types.PlaceBlockBehavior) LanternBlockType(org.lanternpowered.server.block.LanternBlockType)

Aggregations

Context (org.spongepowered.api.service.context.Context)13 World (org.spongepowered.api.world.World)7 Optional (java.util.Optional)6 Set (java.util.Set)6 ImmutableSet (com.google.common.collect.ImmutableSet)5 UUID (java.util.UUID)5 Sponge (org.spongepowered.api.Sponge)5 User (org.spongepowered.api.entity.living.player.User)5 Vector3d (com.flowpowered.math.vector.Vector3d)4 Preconditions.checkNotNull (com.google.common.base.Preconditions.checkNotNull)4 Sets (com.google.common.collect.Sets)4 Collection (java.util.Collection)4 Collections (java.util.Collections)4 List (java.util.List)4 Map (java.util.Map)4 Function (java.util.function.Function)4 Collectors (java.util.stream.Collectors)4 Nullable (javax.annotation.Nullable)4 Player (org.spongepowered.api.entity.living.player.Player)4 Cause (org.spongepowered.api.event.cause.Cause)4