2020-08-25 01:20:18 +00:00
|
|
|
/*
|
|
|
|
* WorldEdit, a Minecraft world manipulation toolkit
|
|
|
|
* Copyright (C) sk89q <http://www.sk89q.com>
|
|
|
|
* Copyright (C) WorldEdit team and contributors
|
|
|
|
*
|
2020-08-25 01:31:47 +00:00
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
2020-08-25 01:20:18 +00:00
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
2020-08-25 01:31:47 +00:00
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
2020-08-25 01:20:18 +00:00
|
|
|
*
|
2020-08-25 01:31:47 +00:00
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
2020-08-25 01:20:18 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
package com.sk89q.jnbt;
|
|
|
|
|
2021-07-01 20:16:25 +00:00
|
|
|
import com.sk89q.worldedit.util.nbt.LongBinaryTag;
|
2021-01-04 18:18:23 +00:00
|
|
|
|
2020-08-25 01:20:18 +00:00
|
|
|
/**
|
|
|
|
* The {@code TAG_Long} tag.
|
2021-07-01 20:16:25 +00:00
|
|
|
*
|
|
|
|
* @deprecated Use {@link LongBinaryTag}.
|
2020-08-25 01:20:18 +00:00
|
|
|
*/
|
2021-07-01 20:16:25 +00:00
|
|
|
@Deprecated
|
|
|
|
public final class LongTag extends Tag {
|
2020-08-25 01:20:18 +00:00
|
|
|
|
2021-07-01 20:16:25 +00:00
|
|
|
private final LongBinaryTag innerTag;
|
2020-08-25 01:20:18 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Creates the tag with an empty name.
|
|
|
|
*
|
|
|
|
* @param value the value of the tag
|
|
|
|
*/
|
|
|
|
public LongTag(long value) {
|
|
|
|
super();
|
2021-07-01 20:16:25 +00:00
|
|
|
this.innerTag = LongBinaryTag.of(value);
|
|
|
|
}
|
|
|
|
|
|
|
|
public LongTag(LongBinaryTag adventureTag) {
|
|
|
|
super();
|
|
|
|
this.innerTag = adventureTag;
|
2020-08-25 01:20:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2021-07-01 20:16:25 +00:00
|
|
|
public LongBinaryTag asBinaryTag() {
|
|
|
|
return this.innerTag;
|
2020-08-25 01:20:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2021-07-01 20:16:25 +00:00
|
|
|
public Long getValue() {
|
|
|
|
return innerTag.value();
|
2020-08-25 01:20:18 +00:00
|
|
|
}
|
|
|
|
|
2021-01-04 18:18:23 +00:00
|
|
|
// FAWE Start
|
|
|
|
@Override
|
|
|
|
public int getTypeCode() {
|
|
|
|
return NBTConstants.TYPE_LONG;
|
|
|
|
}
|
|
|
|
// FAWE End
|
|
|
|
|
2020-08-25 01:20:18 +00:00
|
|
|
}
|