mirror of
https://github.com/Samsuik/Sakura.git
synced 2025-12-27 10:49:06 +00:00
Rewrite player fps settings
This commit is contained in:
35
patches/api/0008-Add-durable-material-API.patch
Normal file
35
patches/api/0008-Add-durable-material-API.patch
Normal file
@@ -0,0 +1,35 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Samsuik <40902469+Samsuik@users.noreply.github.com>
|
||||
Date: Wed, 29 Nov 2023 22:18:17 +0000
|
||||
Subject: [PATCH] Add durable material API
|
||||
|
||||
|
||||
diff --git a/src/main/java/me/samsuik/sakura/local/LocalValueKey.java b/src/main/java/me/samsuik/sakura/local/LocalValueKey.java
|
||||
index f80f7f299c2208c5160bcf763f686f7bd6375eec..8a688431aaa56166afd2c95731220c0aba2147ed 100644
|
||||
--- a/src/main/java/me/samsuik/sakura/local/LocalValueKey.java
|
||||
+++ b/src/main/java/me/samsuik/sakura/local/LocalValueKey.java
|
||||
@@ -1,10 +1,12 @@
|
||||
package me.samsuik.sakura.local;
|
||||
|
||||
import me.samsuik.sakura.physics.PhysicsVersion;
|
||||
+import org.bukkit.Material;
|
||||
import org.bukkit.NamespacedKey;
|
||||
import org.jspecify.annotations.NullMarked;
|
||||
|
||||
-import java.util.Objects;
|
||||
+import java.util.HashMap;
|
||||
+import java.util.Map;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
@NullMarked
|
||||
@@ -14,6 +16,10 @@ public record LocalValueKey<T>(NamespacedKey key, Supplier<T> defaultSupplier) {
|
||||
new NamespacedKey("sakura", "physics-version"), () -> PhysicsVersion.LATEST
|
||||
);
|
||||
|
||||
+ public static final LocalValueKey<Map<Material, Map.Entry<Integer, Float>>> DURABLE_MATERIALS = new LocalValueKey<>(
|
||||
+ new NamespacedKey("sakura", "durable-materials"), HashMap::new
|
||||
+ );
|
||||
+
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
Reference in New Issue
Block a user