mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-19 03:49:10 +00:00
Went down huge rabbit hole to attempt adding scripted events for players. Chock full of errors, trying to backport classes from the 1.12 version.
This commit is contained in:
1 parent
71e13a177f
commit
5a1c4757cf
72 files changed
+4014
-20
No files matched your search
@@ -0,0 +1,22 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by Fernflower decompiler)
|
||||
//
|
||||
|
||||
package noppes.npcs.util;
|
||||
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
public class LRUHashMap<K, V> extends LinkedHashMap<K, V> {
|
||||
private final int maxSize;
|
||||
|
||||
public LRUHashMap(int size) {
|
||||
super(size, 0.75F, true);
|
||||
this.maxSize = size;
|
||||
}
|
||||
|
||||
protected boolean removeEldestEntry(Entry<K, V> eldest) {
|
||||
return this.size() > this.maxSize;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user