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:
luisc committed 2021-09-30 00:56:49 -05:00
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;
}
}