From 562070831d30884e161ef357b14f95fe8c2bc7fd Mon Sep 17 00:00:00 2001 From: Outspending Date: Thu, 4 Jan 2024 16:14:30 -0700 Subject: [PATCH] Minor API Changes for `0.0.2` --- Plugin/build.gradle.kts | 5 -- .../me/outspending/biomesapi/plugin/Main.java | 17 ---- Plugin/src/main/resources/plugin.yml | 4 - Skript/build.gradle.kts | 12 --- .../me/outspending/biomesapi/skript/Main.java | 17 ---- Skript/src/main/resources/plugin.yml | 4 - settings.gradle.kts | 5 +- .../biomesapi/biome/BiomeCreator.java | 24 ------ .../biomesapi/biome/BiomeHandler.java | 6 -- .../biomesapi/setter/BiomeSetter.java | 10 +++ .../biomesapi/setter/ClientBiomeSetter.java | 84 ------------------- 11 files changed, 11 insertions(+), 177 deletions(-) delete mode 100644 Plugin/build.gradle.kts delete mode 100644 Plugin/src/main/java/me/outspending/biomesapi/plugin/Main.java delete mode 100644 Plugin/src/main/resources/plugin.yml delete mode 100644 Skript/build.gradle.kts delete mode 100644 Skript/src/main/java/me/outspending/biomesapi/skript/Main.java delete mode 100644 Skript/src/main/resources/plugin.yml delete mode 100644 src/main/java/me/outspending/biomesapi/biome/BiomeCreator.java delete mode 100644 src/main/java/me/outspending/biomesapi/setter/ClientBiomeSetter.java diff --git a/Plugin/build.gradle.kts b/Plugin/build.gradle.kts deleted file mode 100644 index 57a6e9f..0000000 --- a/Plugin/build.gradle.kts +++ /dev/null @@ -1,5 +0,0 @@ -dependencies { - compileOnly("io.papermc.paper:paper-api:1.20-R0.1-SNAPSHOT") - - implementation(rootProject) -} \ No newline at end of file diff --git a/Plugin/src/main/java/me/outspending/biomesapi/plugin/Main.java b/Plugin/src/main/java/me/outspending/biomesapi/plugin/Main.java deleted file mode 100644 index 1bdc4a0..0000000 --- a/Plugin/src/main/java/me/outspending/biomesapi/plugin/Main.java +++ /dev/null @@ -1,17 +0,0 @@ -package me.outspending.biomesapi.plugin; - -import org.bukkit.plugin.java.JavaPlugin; - -public class Main extends JavaPlugin { - - @Override - public void onEnable() { - - } - - @Override - public void onDisable() { - - } - -} \ No newline at end of file diff --git a/Plugin/src/main/resources/plugin.yml b/Plugin/src/main/resources/plugin.yml deleted file mode 100644 index 0254a0d..0000000 --- a/Plugin/src/main/resources/plugin.yml +++ /dev/null @@ -1,4 +0,0 @@ -name: BiomesAPI -version: 0.0.1 -main: me.outspending.biomesapi.plugin.Main -api-version: 1.20 \ No newline at end of file diff --git a/Skript/build.gradle.kts b/Skript/build.gradle.kts deleted file mode 100644 index 72216a2..0000000 --- a/Skript/build.gradle.kts +++ /dev/null @@ -1,12 +0,0 @@ -repositories { - maven { url = uri("https://repo.skriptlang.org/releases") } -} - -dependencies { - compileOnly("io.papermc.paper:paper-api:1.20-R0.1-SNAPSHOT") - compileOnly(group = "com.github.SkriptLang", name = "Skript", version = "2.7.1").apply { - isTransitive = false - } - - implementation(rootProject) -} diff --git a/Skript/src/main/java/me/outspending/biomesapi/skript/Main.java b/Skript/src/main/java/me/outspending/biomesapi/skript/Main.java deleted file mode 100644 index 53a1eea..0000000 --- a/Skript/src/main/java/me/outspending/biomesapi/skript/Main.java +++ /dev/null @@ -1,17 +0,0 @@ -package me.outspending.biomesapi.skript; - -import org.bukkit.plugin.java.JavaPlugin; - -public class Main extends JavaPlugin { - - @Override - public void onEnable() { - - } - - @Override - public void onDisable() { - - } - -} \ No newline at end of file diff --git a/Skript/src/main/resources/plugin.yml b/Skript/src/main/resources/plugin.yml deleted file mode 100644 index 83f8436..0000000 --- a/Skript/src/main/resources/plugin.yml +++ /dev/null @@ -1,4 +0,0 @@ -name: BiomesSK -version: 0.0.1 -main: me.outspending.biomesapi.skript.Main -api-version: 1.20 \ No newline at end of file diff --git a/settings.gradle.kts b/settings.gradle.kts index 7890d64..2b92f59 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -5,7 +5,4 @@ include("NMS:1.19_R2") include("NMS:1.19_R3") include("NMS:1.20_R1") include("NMS:1.20_R2") -include("NMS:1.20_R3") - -include("Plugin") -include("Skript") +include("NMS:1.20_R3") \ No newline at end of file diff --git a/src/main/java/me/outspending/biomesapi/biome/BiomeCreator.java b/src/main/java/me/outspending/biomesapi/biome/BiomeCreator.java deleted file mode 100644 index 4214448..0000000 --- a/src/main/java/me/outspending/biomesapi/biome/BiomeCreator.java +++ /dev/null @@ -1,24 +0,0 @@ -package me.outspending.biomesapi.biome; - -import net.minecraft.world.level.biome.Biome; -import org.jetbrains.annotations.NotNull; - -public class BiomeCreator { - - private final Biome.BiomeBuilder biomeBuilder; - private final CustomBiome biome; - - public BiomeCreator(@NotNull CustomBiome biome) { - this.biomeBuilder = new Biome.BiomeBuilder(); - this.biome = biome; - } - - public void checkField(Object obj) { - - } - - public CustomBiome getBiome() { - return biome; - } - -} diff --git a/src/main/java/me/outspending/biomesapi/biome/BiomeHandler.java b/src/main/java/me/outspending/biomesapi/biome/BiomeHandler.java index b84f56e..ed802e4 100644 --- a/src/main/java/me/outspending/biomesapi/biome/BiomeHandler.java +++ b/src/main/java/me/outspending/biomesapi/biome/BiomeHandler.java @@ -72,10 +72,4 @@ public static boolean isBiome(@NotNull BiomeResourceKey resourceKey) { return getBiome(resourceKey) != null; } - // TODO: Add a method to get a biome from a location - @AsOf("0.0.2") - public static @Nullable CustomBiome getBiome(@NotNull Location location) { - return null; - } - } diff --git a/src/main/java/me/outspending/biomesapi/setter/BiomeSetter.java b/src/main/java/me/outspending/biomesapi/setter/BiomeSetter.java index f9ff85f..9c00c61 100644 --- a/src/main/java/me/outspending/biomesapi/setter/BiomeSetter.java +++ b/src/main/java/me/outspending/biomesapi/setter/BiomeSetter.java @@ -24,6 +24,16 @@ public interface BiomeSetter { int MIN_HEIGHT = -64; int MAX_HEIGHT = 320; + /** + * Returns a new instance of the BiomeSetter interface. + * + * @return a new instance of the BiomeSetter interface + * @version 0.0.1 + */ + static BiomeSetter of() { + return new GlobalBiomeSetter(); + } + /** * Returns the RegionAccessor for the given location. * diff --git a/src/main/java/me/outspending/biomesapi/setter/ClientBiomeSetter.java b/src/main/java/me/outspending/biomesapi/setter/ClientBiomeSetter.java deleted file mode 100644 index a172fd6..0000000 --- a/src/main/java/me/outspending/biomesapi/setter/ClientBiomeSetter.java +++ /dev/null @@ -1,84 +0,0 @@ -package me.outspending.biomesapi.setter; - -import me.outspending.biomesapi.biome.CustomBiome; -import org.bukkit.Chunk; -import org.bukkit.Location; -import org.bukkit.World; -import org.bukkit.block.Block; -import org.bukkit.entity.Player; -import org.bukkit.util.BoundingBox; -import org.bukkit.util.Vector; -import org.jetbrains.annotations.NotNull; - -public class ClientBiomeSetter implements BiomeSetter { - - private final Player client; - - public ClientBiomeSetter(@NotNull Player client) { - this.client = client; - } - - public Player getClient() { - return client; - } - - @Override - public void setBlockBiome(@NotNull Block block, @NotNull CustomBiome customBiome) { - setBlockBiome(block, customBiome, false); - } - - @Override - public void setBlockBiome(@NotNull Block block, @NotNull CustomBiome customBiome, boolean updateBiome) { - // TODO: Method - } - - @Override - public void setChunkBiome(@NotNull Chunk chunk, @NotNull CustomBiome customBiome) { - setChunkBiome(chunk, customBiome, false); - } - - @Override - public void setChunkBiome(@NotNull Chunk chunk, @NotNull CustomBiome customBiome, boolean updateBiome) { - setChunkBiome(chunk, MIN_HEIGHT, MAX_HEIGHT, customBiome, false); - } - - @Override - public void setChunkBiome(@NotNull Chunk chunk, int minHeight, int maxHeight, @NotNull CustomBiome customBiome) { - setChunkBiome(chunk, minHeight, maxHeight, customBiome, false); - } - - @Override - public void setChunkBiome(@NotNull Chunk chunk, int minHeight, int maxHeight, @NotNull CustomBiome customBiome, boolean updateBiome) { - // TODO: Method - } - - @Override - public void setBoundingBoxBiome(@NotNull World world, @NotNull BoundingBox boundingBox, @NotNull CustomBiome customBiome) { - // TODO: Method - } - - @Override - public void setRegionBiome(@NotNull Location from, @NotNull Location to, @NotNull CustomBiome customBiome) { - setRegionBiome(from, to , customBiome, false); - } - - @Override - public void setRegionBiome(@NotNull Location from, @NotNull Location to, @NotNull CustomBiome customBiome, boolean updateBiome) { - // TODO: Method - } - - @Override - public void setRegionBiome(@NotNull World world, @NotNull Vector from, @NotNull Vector to, @NotNull CustomBiome customBiome) { - setRegionBiome(world, from, to, customBiome, false); - } - - @Override - public void setRegionBiome(@NotNull World world, @NotNull Vector from, @NotNull Vector to, @NotNull CustomBiome customBiome, boolean updateBiome) { - setRegionBiome(world, from.toLocation(world), to.toLocation(world), customBiome, updateBiome); - } - - @Override - public void setRegionBiome(@NotNull World world, @NotNull Location from, @NotNull Location to, @NotNull CustomBiome customBiome, boolean updateBiome) { - - } -}