mirror of
https://github.com/songoda/SongodaCore.git
synced 2024-11-27 12:35:12 +01:00
Added a isRecycled method.
This commit is contained in:
parent
18e782b721
commit
6c8462282e
@ -1034,6 +1034,10 @@ public enum CompatibleMaterial {
|
||||
|
||||
static {
|
||||
for (CompatibleMaterial m : values()) {
|
||||
if (m.isRecycled()) {
|
||||
lookupMap.put(m.legacy, m);
|
||||
continue;
|
||||
}
|
||||
lookupMap.put(m.name(), m);
|
||||
if (!m.usesCompatibility()) {
|
||||
lookupMap.put(m.material + ":" + (m.data == null ? "" : m.data), m);
|
||||
@ -1160,6 +1164,15 @@ public enum CompatibleMaterial {
|
||||
//return compatibleMaterial != null && ServerVersion.isServerVersionBelow(compatibleMaterial.versionLessThan);
|
||||
}
|
||||
|
||||
/**
|
||||
* Is this item reused in later versions of Minecraft?
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public boolean isRecycled() {
|
||||
return usesLegacy() && this == CompatibleMaterial.GRASS;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the legacy data value for this material if there is one, or -1 if
|
||||
* none
|
||||
|
Loading…
Reference in New Issue
Block a user