mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-14 21:22:09 +00:00
Strip out legacy ItemDb code, pt 1928371236123897
This commit is contained in:
parent
2ddde37771
commit
d74f19970b
1 changed files with 0 additions and 63 deletions
|
@ -296,67 +296,4 @@ public class ItemDb implements IConf, net.ess3.api.IItemDb {
|
||||||
public Collection<String> listNames() {
|
public Collection<String> listNames() {
|
||||||
return provider.listNames();
|
return provider.listNames();
|
||||||
}
|
}
|
||||||
|
|
||||||
static class ItemData {
|
|
||||||
final private Material material;
|
|
||||||
private int legacyId;
|
|
||||||
final private short itemData;
|
|
||||||
|
|
||||||
ItemData(Material material, short itemData) {
|
|
||||||
this.material = material;
|
|
||||||
this.itemData = itemData;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
ItemData(Material material, final int legacyId, final short itemData) {
|
|
||||||
this.material = material;
|
|
||||||
this.legacyId = legacyId;
|
|
||||||
this.itemData = itemData;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Material getMaterial() {
|
|
||||||
return material;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
public int getItemNo() {
|
|
||||||
return legacyId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public short getItemData() {
|
|
||||||
return itemData;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int hashCode() {
|
|
||||||
return (31 * material.hashCode()) ^ itemData;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean equals(Object o) {
|
|
||||||
if (o == null) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (!(o instanceof ItemData)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
ItemData pairo = (ItemData) o;
|
|
||||||
return this.material == pairo.getMaterial() && this.itemData == pairo.getItemData();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static class LengthCompare implements java.util.Comparator<String> {
|
|
||||||
|
|
||||||
private static final LengthCompare INSTANCE = new LengthCompare();
|
|
||||||
|
|
||||||
public LengthCompare() {
|
|
||||||
super();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int compare(String s1, String s2) {
|
|
||||||
return s1.length() - s2.length();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue