MidnightLib 0.2.6 - Code cleanup & compression

- MidnightHats is now more performant and has new types of special hats
- Compress assets
- Reduce filesize heavily
This commit is contained in:
Motschen
2021-10-01 19:56:53 +02:00
parent cedf1df78a
commit 454b8ec01d
19 changed files with 98 additions and 122 deletions

View File

@@ -1,6 +1,5 @@
package eu.midnightdust.lib.config;
import com.google.common.collect.ImmutableMap;
import com.terraformersmc.modmenu.api.ConfigScreenFactory;
import com.terraformersmc.modmenu.api.ModMenuApi;
import eu.midnightdust.core.config.MidnightLibConfig;

View File

@@ -39,9 +39,11 @@ import java.util.function.Function;
import java.util.function.Predicate;
import java.util.regex.Pattern;
/* MidnightConfig v1.0.5
/* MidnightConfig v1.0.6
Single class config library - feel free to copy!
Changelog:
- 1.0.6:
- Abstract & Allow super ticks
- 1.0.5:
- Custom lang keys
- Transparent list background when in game
@@ -66,7 +68,7 @@ import java.util.regex.Pattern;
* Credits to Minenash */
@SuppressWarnings("unchecked")
public class MidnightConfig {
public abstract class MidnightConfig {
public static boolean useTooltipForTitle = true; // Render title as tooltip or as simple text
private static final Pattern INTEGER_ONLY = Pattern.compile("(-?[0-9]*)");
@@ -213,6 +215,7 @@ public class MidnightConfig {
// Real Time config update //
@Override
public void tick() {
super.tick();
for (EntryInfo info : entries)
try { info.field.set(null, info.value); }
catch (IllegalAccessException ignored) {}