9
0
mirror of https://github.com/Samsuik/Sakura.git synced 2025-12-20 15:29:33 +00:00

Add consistent explosion radius to api

This commit is contained in:
Samsuik
2024-05-26 18:27:05 +01:00
parent a5ba073ea0
commit e3451dc38d
6 changed files with 52 additions and 23 deletions

View File

@@ -5,7 +5,7 @@ Subject: [PATCH] Add redstone implementation API
diff --git a/src/main/java/me/samsuik/sakura/local/LocalValueKey.java b/src/main/java/me/samsuik/sakura/local/LocalValueKey.java
index 3beb5830d623e72a3f4dec63aedc8b69a6396bf0..1a725c1f349b9b8f86c118e579004d7974f016fd 100644
index 4735e5d8dcea4835061b5cada9d601794efdf390..4d8c83f48d8ef739a00ea1b8a17ac8cdf10ac396 100644
--- a/src/main/java/me/samsuik/sakura/local/LocalValueKey.java
+++ b/src/main/java/me/samsuik/sakura/local/LocalValueKey.java
@@ -1,6 +1,7 @@
@@ -16,13 +16,17 @@ index 3beb5830d623e72a3f4dec63aedc8b69a6396bf0..1a725c1f349b9b8f86c118e579004d79
import org.bukkit.Material;
import org.bukkit.NamespacedKey;
@@ -20,6 +21,10 @@ public record LocalValueKey<T>(NamespacedKey key, Supplier<T> defaultSupplier) {
@@ -20,6 +21,14 @@ public record LocalValueKey<T>(NamespacedKey key, Supplier<T> defaultSupplier) {
new NamespacedKey("sakura", "durable-materials"), HashMap::new
);
+ public static final LocalValueKey<RedstoneImplementation> REDSTONE_IMPLEMENTATION = new LocalValueKey<>(
+ new NamespacedKey("sakura", "redstone-implementation"), () -> RedstoneImplementation.VANILLA
+ );
+
+ public static final LocalValueKey<Boolean> CONSISTENT_EXPLOSION_RADIUS = new LocalValueKey<>(
+ new NamespacedKey("saskua", "consistent-radius"), () -> false
+ );
+
@Override
public boolean equals(Object o) {