From 420f2a61e1cc64d68bf03825e8fd70cf49ac6a01 Mon Sep 17 00:00:00 2001 From: Linnea Gräf Date: Tue, 24 Sep 2024 11:40:15 +0200 Subject: Use weak caches for custom textures --- src/main/kotlin/util/Optionalutil.kt | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 src/main/kotlin/util/Optionalutil.kt (limited to 'src/main/kotlin/util/Optionalutil.kt') diff --git a/src/main/kotlin/util/Optionalutil.kt b/src/main/kotlin/util/Optionalutil.kt new file mode 100644 index 0000000..1cef2fe --- /dev/null +++ b/src/main/kotlin/util/Optionalutil.kt @@ -0,0 +1,5 @@ +package moe.nea.firmament.util + +import java.util.Optional + +fun T?.intoOptional(): Optional = Optional.ofNullable(this) -- cgit