Skip to content

Commit

Permalink
Merge pull request #180 from KevinDaGame/feat/1.20
Browse files Browse the repository at this point in the history
Implement Minecraft 1.20 (spigot)
  • Loading branch information
KevinDaGame authored Jun 7, 2023
2 parents 892f2dc + 766cfc2 commit 338a904
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
package com.github.kevindagame.voxelsniper;

@Deprecated(since = "9.2.0", forRemoval = true)
//This doesn't allow forward compatibility 🤮
public enum Version {
V1_16,
V1_17,
V1_18,
V1_19;
V1_19,
V1_20;

//todo: Test if this works
public boolean isSupported(Version v) {
return Integer.parseInt(this.name().substring(3)) >= Integer.parseInt(v.name().substring(3));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ public record VoxelBiome(String namespace, String key, Version version) {
public static VoxelBiome FROZEN_PEAKS = register("frozen_peaks", Version.V1_18);
public static VoxelBiome JAGGED_PEAKS = register("jagged_peaks", Version.V1_18);
public static VoxelBiome STONY_PEAKS = register("stony_peaks", Version.V1_18);
public static VoxelBiome CHERRY_GROVE = register("cherry_grove", Version.V1_20);

public VoxelBiome(String key) {
this(DEFAULT_NAMESPACE, key, Version.V1_16);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ public record VoxelEntityType(String namespace, String key, Version version) {
public static VoxelEntityType FISHING_HOOK = register("fishing_bobber");
public static VoxelEntityType LIGHTNING = register("lightning_bolt");
public static VoxelEntityType PLAYER = register("player");
public static VoxelEntityType SNIFFER = register("sniffer", Version.V1_20);
public static VoxelEntityType CAMEL = register("camel", Version.V1_20);

public VoxelEntityType(String key) {
this(DEFAULT_NAMESPACE, key, Version.V1_16);
Expand Down
4 changes: 2 additions & 2 deletions VoxelSniperSpigot/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ repositories {
}

dependencies {
compileOnly("org.spigotmc:spigot-api:1.19-R0.1-SNAPSHOT")
compileOnly("com.sk89q.worldguard:worldguard-bukkit:7.0.5") // newest worldguard that supports 1.16.5
compileOnly("org.spigotmc:spigot-api:1.20-R0.1-SNAPSHOT")
compileOnly("com.sk89q.worldguard:worldguard-bukkit:7.0.8")
compileOnly("com.plotsquared:PlotSquared-Core")

shadow(platform("com.intellectualsites.bom:bom-1.18.x:1.20"))
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
voxelsniper.version=8.9.0
voxelsniper.version=8.10.0

org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false
Expand Down

0 comments on commit 338a904

Please sign in to comment.