/
minecraftbackup
/
ViaRewind
Обзор
Документация
Войти
/
minecraftbackup
/
ViaRewind
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
common/src/main/java/com/viaversion/viarewind/api/rewriter/VRBlockItemRewriter.java
42 строки
2 KB
FlorianMichael
Port to upstream changes (hopefully)
15 май 2024, 01:08
Не верифицирован
15 май 2024, 01:08
6728a8a
Код
Авторство
О чём код?
/* * This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind * Copyright (C) 2018-2024 ViaVersion and contributors * * 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 * (at your option) any later version. * * 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. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package com.viaversion.viarewind.api.rewriter; import com.viaversion.viabackwards.api.BackwardsProtocol; import com.viaversion.viabackwards.api.rewriters.LegacyBlockItemRewriter; import com.viaversion.viarewind.api.data.RewindMappingDataLoader; import com.viaversion.viaversion.api.protocol.packet.ClientboundPacketType; import com.viaversion.viaversion.api.protocol.packet.ServerboundPacketType; import com.viaversion.viaversion.libs.gson.JsonObject; public class VRBlockItemRewriter<C extends ClientboundPacketType, S extends ServerboundPacketType, T extends BackwardsProtocol<C, ?, ?, S>> extends LegacyBlockItemRewriter<C, S, T> { protected VRBlockItemRewriter(T protocol, String name) { super(protocol, name); } @Override protected JsonObject readMappingsFile(String name) { return RewindMappingDataLoader.INSTANCE.loadFromDataDir(name); } @Override public String nbtTagName() { return "VR|" + protocol.getClass().getSimpleName(); } }