mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-25 00:34:28 +00:00
Merge branch 'patch' into dev
This commit is contained in:
commit
936b71a5d9
4 files changed
+16
-3
No files matched your search
@@ -36,7 +36,7 @@ import java.util.ArrayList;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
@Mod(modid = "customnpcs", name = "CustomNPC+", version = "1.8.4")
|
||||
@Mod(modid = "customnpcs", name = "CustomNPC+", version = "1.8.5")
|
||||
public class CustomNpcs {
|
||||
|
||||
@SidedProxy(clientSide = "noppes.npcs.client.ClientProxy", serverSide = "noppes.npcs.CommonProxy")
|
||||
|
||||
@@ -2,10 +2,11 @@ package noppes.npcs.client;
|
||||
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import noppes.npcs.client.renderer.ImageData;
|
||||
import noppes.npcs.config.ConfigClient;
|
||||
import noppes.npcs.util.CacheHashMap;
|
||||
|
||||
public class ClientCacheHandler {
|
||||
private static final CacheHashMap<String, CacheHashMap.CachedObject<ImageData>> imageDataCache = new CacheHashMap<>(10*60*1000);
|
||||
private static final CacheHashMap<String, CacheHashMap.CachedObject<ImageData>> imageDataCache = new CacheHashMap<>((long) ConfigClient.CacheLife * 60 * 1000);
|
||||
|
||||
public static ImageData getImageData(String directory) {
|
||||
synchronized (imageDataCache) {
|
||||
|
||||
@@ -13,9 +13,17 @@ public class ConfigClient
|
||||
{
|
||||
public static Configuration config;
|
||||
|
||||
public final static String GENERAL = "General";
|
||||
public final static String VISUAL = "Visual";
|
||||
public final static String QUESTING = "Questing";
|
||||
|
||||
|
||||
/**
|
||||
* General Properties
|
||||
**/
|
||||
public static Property CacheLifeProperty;
|
||||
public static int CacheLife = 10;
|
||||
|
||||
/**
|
||||
* Visual Properties
|
||||
**/
|
||||
@@ -51,6 +59,10 @@ public class ConfigClient
|
||||
{
|
||||
config.load();
|
||||
|
||||
// General
|
||||
CacheLifeProperty = config.get(GENERAL, "Cache Life", 10, "How long should downloaded imagery data be saved client side? (In minutes)");
|
||||
CacheLife = CacheLifeProperty.getInt(10);
|
||||
|
||||
// Visual
|
||||
EnableChatBubblesProperty = config.get(VISUAL, "Enable Chat Bubbles", true, "Enable/Disable Chat Bubbles");
|
||||
EnableChatBubbles = EnableChatBubblesProperty.getBoolean(true);
|
||||
|
||||
Reference in new issue
Block a user