2019-07-06 00:46:48 +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
|
2019-07-06 00:46:48 +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.
|
2019-07-06 00:46:48 +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/>.
|
2019-07-06 00:46:48 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
package com.sk89q.worldedit.world;
|
|
|
|
|
|
|
|
import com.google.common.annotations.Beta;
|
2021-10-19 13:12:02 +00:00
|
|
|
import com.sk89q.jnbt.CompoundTag;
|
2021-07-01 20:16:25 +00:00
|
|
|
import com.sk89q.worldedit.util.nbt.CompoundBinaryTag;
|
2019-07-06 00:46:48 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* This entire class is subject to heavy changes. Do not use this as API.
|
|
|
|
*/
|
|
|
|
@Beta
|
|
|
|
public interface DataFixer {
|
|
|
|
|
|
|
|
final class FixType<T> {
|
2021-07-24 15:34:05 +00:00
|
|
|
|
2019-07-06 00:46:48 +00:00
|
|
|
private FixType() {
|
|
|
|
}
|
2021-07-24 15:34:05 +00:00
|
|
|
|
2019-07-06 00:46:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
final class FixTypes {
|
2021-07-24 15:34:05 +00:00
|
|
|
|
2019-07-06 00:46:48 +00:00
|
|
|
private FixTypes() {
|
|
|
|
}
|
|
|
|
|
2021-10-22 15:00:51 +00:00
|
|
|
//FAWE start - BinaryTag
|
|
|
|
public static FixType<CompoundBinaryTag> CHUNK = new FixType<>();
|
|
|
|
public static FixType<CompoundBinaryTag> BLOCK_ENTITY = new FixType<>();
|
|
|
|
public static FixType<CompoundBinaryTag> ENTITY = new FixType<>();
|
|
|
|
//FAWE end
|
2019-07-06 00:46:48 +00:00
|
|
|
public static FixType<String> BLOCK_STATE = new FixType<>();
|
|
|
|
public static FixType<String> BIOME = new FixType<>();
|
|
|
|
public static FixType<String> ITEM_TYPE = new FixType<>();
|
2021-07-24 15:34:05 +00:00
|
|
|
|
2019-07-06 00:46:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
default <T> T fixUp(FixType<T> type, T original) {
|
|
|
|
return fixUp(type, original, -1);
|
|
|
|
}
|
|
|
|
|
|
|
|
<T> T fixUp(FixType<T> type, T original, int srcVer);
|
2021-07-24 15:34:05 +00:00
|
|
|
|
2019-07-06 00:46:48 +00:00
|
|
|
}
|