Skip to content

Commit

Permalink
Update to 1.20.4
Browse files Browse the repository at this point in the history
  • Loading branch information
pop4959 committed Dec 23, 2023
1 parent 80dbf45 commit bce1fd1
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 7 deletions.
8 changes: 4 additions & 4 deletions bukkit/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ repositories {
}

dependencies {
compileOnly(group = "org.spigotmc", name = "spigot-api", version = "1.20.2-R0.1-SNAPSHOT")
implementation(group = "net.kyori", name = "adventure-api", version = "4.14.0")
implementation(group = "net.kyori", name = "adventure-text-minimessage", version = "4.14.0")
implementation(group = "net.kyori", name = "adventure-platform-bukkit", version = "4.3.1")
compileOnly(group = "org.spigotmc", name = "spigot-api", version = "1.20.4-R0.1-SNAPSHOT")
implementation(group = "net.kyori", name = "adventure-api", version = "4.15.0")
implementation(group = "net.kyori", name = "adventure-text-minimessage", version = "4.15.0")
implementation(group = "net.kyori", name = "adventure-platform-bukkit", version = "4.3.2")
implementation(group = "org.bstats", name = "bstats-bukkit", version = "3.0.2")
implementation(group = "org.popcraft", name = "chunky-nbt", version = "1.3.76")
implementation(project(":bolt-common"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,28 @@
import org.bukkit.block.BlockFace;
import org.bukkit.entity.EntityType;
import org.popcraft.bolt.matcher.Match;
import org.popcraft.bolt.util.EnumUtil;

import java.util.Collections;
import java.util.EnumSet;
import java.util.Set;

public class GrassMatcher implements BlockMatcher {
private static final EnumSet<Material> GRASS = EnumSet.of(Material.GRASS, Material.FERN, Material.SEAGRASS, Material.NETHER_SPROUTS, Material.WARPED_ROOTS, Material.CRIMSON_ROOTS);
private static final Material SHORT_GRASS_OLD = EnumUtil.valueOf(Material.class, "GRASS").orElse(null);
private static final Material SHORT_GRASS = EnumUtil.valueOf(Material.class, "SHORT_GRASS").orElse(null);
private static final EnumSet<Material> GRASS = EnumSet.of(Material.FERN, Material.SEAGRASS, Material.NETHER_SPROUTS, Material.WARPED_ROOTS, Material.CRIMSON_ROOTS);
private boolean enabled;

static {
// Future: Replace with Material.SHORT_GRASS
if (SHORT_GRASS_OLD != null) {
GRASS.add(SHORT_GRASS_OLD);
}
if (SHORT_GRASS != null) {
GRASS.add(SHORT_GRASS);
}
}

@Override
public void initialize(Set<Material> protectableBlocks, Set<EntityType> protectableEntities) {
enabled = protectableBlocks.stream().anyMatch(GRASS::contains);
Expand Down
2 changes: 1 addition & 1 deletion folia/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ repositories {
}

dependencies {
compileOnly(group = "dev.folia", name = "folia-api", version = "1.19.4-R0.1-SNAPSHOT")
compileOnly(group = "dev.folia", name = "folia-api", version = "1.20.2-R0.1-SNAPSHOT")
}
2 changes: 1 addition & 1 deletion paper/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ repositories {
}

dependencies {
compileOnly(group = "io.papermc.paper", name = "paper-api", version = "1.20.2-R0.1-SNAPSHOT")
compileOnly(group = "io.papermc.paper", name = "paper-api", version = "1.20.4-R0.1-SNAPSHOT")
}

0 comments on commit bce1fd1

Please sign in to comment.