001package net.tnemc.plugincore.sponge.impl;
002/*
003 * The New Plugin Core
004 * Copyright (C) 2022 - 2025 Daniel "creatorfromhell" Vidmar
005 *
006 * This program is free software: you can redistribute it and/or modify
007 * it under the terms of the GNU Affero General Public License as published by
008 * the Free Software Foundation, either version 3 of the License, or
009 * (at your option) any later version.
010 *
011 * This program is distributed in the hope that it will be useful,
012 * but WITHOUT ANY WARRANTY; without even the implied warranty of
013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
014 * GNU Affero General Public License for more details.
015 *
016 * You should have received a copy of the GNU Affero General Public License
017 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
018 */
019
020import net.tnemc.plugincore.core.compatibility.ChunkProvider;
021import org.jetbrains.annotations.NotNull;
022import org.spongepowered.api.world.chunk.WorldChunk;
023
024/**
025 * SpongeChunkProvider
026 *
027 * @author creatorfromhell
028 * @since 1.1.0.1
029 */
030public class SpongeChunkProvider implements ChunkProvider {
031
032  protected final WorldChunk chunk;
033
034  public SpongeChunkProvider(final WorldChunk chunk) {
035    this.chunk = chunk;
036  }
037
038  /**
039   * This method is used to get the chunk's x coordinate.
040   *
041   * @return The chunk's x coordinate.
042   */
043  @Override
044  public int x() {
045
046    return chunk.chunkPosition().x();
047  }
048
049  /**
050   * This method is used to get the chunk's y coordinate.
051   *
052   * @return The chunk's y coordinate.
053   */
054  @Override
055  public int y() {
056
057    return chunk.chunkPosition().y();
058  }
059
060  /**
061   * This method is used to get the chunk's z coordinate.
062   *
063   * @return The chunk's z coordinate.
064   */
065  @Override
066  public int z() {
067
068    return chunk.chunkPosition().z();
069  }
070
071  /**
072   * Checks if the ChunkProvider represents a slime chunk.
073   *
074   * @return True if the ChunkProvider is a slime chunk, false otherwise.
075   */
076  @Override
077  public boolean isSlime() {
078
079    return false;
080  }
081
082  /**
083   * Checks if the specified biome is contained within the chunk provider.
084   *
085   * @param biome The biome to check for.
086   *
087   * @return True if the specified biome is contained, false otherwise.
088   */
089  @Override
090  public boolean containsBiome(final @NotNull String biome) {
091
092    return false;
093  }
094
095  /**
096   * Checks if the provided structure is contained.
097   *
098   * @param structure The structure to check if contained.
099   *
100   * @return True if the structure is contained, false otherwise.
101   */
102  @Override
103  public boolean containsStructure(final @NotNull String structure) {
104
105    return false;
106  }
107}