mirror of
https://github.com/songoda/EpicAnchors.git
synced 2025-02-19 21:11:46 +01:00
Fixes NBTItem related deprecation warnings
This commit is contained in:
parent
a5e93331fd
commit
8f4a5b6644
@ -370,13 +370,13 @@ public class AnchorManager {
|
||||
|
||||
NBTItem nbtItem = new NBTItem(item);
|
||||
|
||||
if (nbtItem.hasKey(NBT_TICKS_KEY)) {
|
||||
if (nbtItem.hasTag(NBT_TICKS_KEY)) {
|
||||
return nbtItem.getInteger(NBT_TICKS_KEY);
|
||||
}
|
||||
|
||||
// Legacy code (pre v2) to stay cross-version compatible
|
||||
if (Settings.MATERIAL.getMaterial().getMaterial() == item.getType()) {
|
||||
if (nbtItem.hasKey("ticks")) {
|
||||
if (nbtItem.hasTag("ticks")) {
|
||||
int result = nbtItem.getInteger("ticks");
|
||||
|
||||
return result == -99 ? -1 : result;
|
||||
|
Loading…
Reference in New Issue
Block a user