Search in sources :

Example 1 with NextTickListEntry

use of net.minecraft.world.NextTickListEntry in project SpongeCommon by SpongePowered.

the class MixinWorldServer method getScheduledUpdates.

@Override
public Collection<ScheduledBlockUpdate> getScheduledUpdates(int x, int y, int z) {
    BlockPos position = new BlockPos(x, y, z);
    ImmutableList.Builder<ScheduledBlockUpdate> builder = ImmutableList.builder();
    for (NextTickListEntry sbu : this.pendingTickListEntriesTreeSet) {
        if (sbu.position.equals(position)) {
            builder.add((ScheduledBlockUpdate) sbu);
        }
    }
    return builder.build();
}
Also used : NextTickListEntry(net.minecraft.world.NextTickListEntry) IMixinNextTickListEntry(org.spongepowered.common.interfaces.IMixinNextTickListEntry) ImmutableList(com.google.common.collect.ImmutableList) ScheduledBlockUpdate(org.spongepowered.api.block.ScheduledBlockUpdate) BlockPos(net.minecraft.util.math.BlockPos) IMixinBlockPos(org.spongepowered.common.interfaces.util.math.IMixinBlockPos)

Aggregations

ImmutableList (com.google.common.collect.ImmutableList)1 BlockPos (net.minecraft.util.math.BlockPos)1 NextTickListEntry (net.minecraft.world.NextTickListEntry)1 ScheduledBlockUpdate (org.spongepowered.api.block.ScheduledBlockUpdate)1 IMixinNextTickListEntry (org.spongepowered.common.interfaces.IMixinNextTickListEntry)1 IMixinBlockPos (org.spongepowered.common.interfaces.util.math.IMixinBlockPos)1