3
0
Mirror von https://github.com/ViaVersion/ViaBackwards.git synchronisiert 2024-11-17 13:30:14 +01:00

Don't load mappings in 1.19.4 protocol

Dieser Commit ist enthalten in:
Nassim Jahnke 2023-02-03 12:13:30 +01:00
Ursprung 1b4dbc1388
Commit a506b21f56
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 6BE3B555EBC5982B
3 geänderte Dateien mit 19 neuen und 13 gelöschten Zeilen

Datei anzeigen

@ -17,24 +17,22 @@
*/
package com.viaversion.viabackwards.protocol.protocol1_19_3to1_19_4;
import com.viaversion.viabackwards.protocol.protocol1_19_3to1_19_4.data.EntityPackets1_19_4;
import com.viaversion.viabackwards.api.BackwardsProtocol;
import com.viaversion.viabackwards.protocol.protocol1_19_3to1_19_4.packets.EntityPackets1_19_4;
import com.viaversion.viaversion.api.connection.UserConnection;
import com.viaversion.viaversion.api.data.MappingData;
import com.viaversion.viaversion.api.data.MappingDataBase;
import com.viaversion.viaversion.api.minecraft.entities.Entity1_19_3Types;
import com.viaversion.viaversion.api.protocol.AbstractProtocol;
import com.viaversion.viaversion.api.protocol.packet.PacketWrapper;
import com.viaversion.viaversion.api.type.Type;
import com.viaversion.viaversion.data.entity.EntityTrackerBase;
import com.viaversion.viaversion.protocols.protocol1_19_3to1_19_1.ClientboundPackets1_19_3;
import com.viaversion.viaversion.protocols.protocol1_19_3to1_19_1.Protocol1_19_3To1_19_1;
import com.viaversion.viaversion.protocols.protocol1_19_3to1_19_1.ServerboundPackets1_19_3;
import com.viaversion.viaversion.protocols.protocol1_19_4to1_19_3.ClientboundPackets1_19_4;
import com.viaversion.viaversion.protocols.protocol1_19_4to1_19_3.ServerboundPackets1_19_4;
import com.viaversion.viaversion.rewriter.CommandRewriter;
public final class Protocol1_19_3To1_19_4 extends AbstractProtocol<ClientboundPackets1_19_4, ClientboundPackets1_19_3, ServerboundPackets1_19_4, ServerboundPackets1_19_3> {
public final class Protocol1_19_3To1_19_4 extends BackwardsProtocol<ClientboundPackets1_19_4, ClientboundPackets1_19_3, ServerboundPackets1_19_4, ServerboundPackets1_19_3> {
private static final MappingData MAPPINGS = new MappingDataBase("1.19.3", "1.19.3");
private final EntityPackets1_19_4 entityRewriter = new EntityPackets1_19_4(this);
public Protocol1_19_3To1_19_4() {
@ -44,6 +42,9 @@ public final class Protocol1_19_3To1_19_4 extends AbstractProtocol<ClientboundPa
@Override
protected void registerPackets() {
// TODO fallback field in components
executeAsyncAfterLoaded(Protocol1_19_3To1_19_1.class, () -> {
});
entityRewriter.register();
final CommandRewriter commandRewriter = new CommandRewriter(this) {
@ -55,6 +56,16 @@ public final class Protocol1_19_3To1_19_4 extends AbstractProtocol<ClientboundPa
super.handleArgument(wrapper, argumentType);
}
}
@Override
protected String argumentType(final int argumentTypeId) {
return Protocol1_19_3To1_19_1.MAPPINGS.getArgumentTypeMappings().mappedIdentifier(argumentTypeId);
}
@Override
protected int mappedArgumentTypeId(final String mappedArgumentType) {
return Protocol1_19_3To1_19_1.MAPPINGS.getArgumentTypeMappings().mappedId(mappedArgumentType);
}
};
commandRewriter.registerDeclareCommands1_19(ClientboundPackets1_19_4.DECLARE_COMMANDS);
@ -65,9 +76,4 @@ public final class Protocol1_19_3To1_19_4 extends AbstractProtocol<ClientboundPa
public void init(final UserConnection user) {
addEntityTracker(user, new EntityTrackerBase(user, Entity1_19_3Types.PLAYER));
}
@Override
public MappingData getMappingData() {
return MAPPINGS;
}
}

Datei anzeigen

@ -15,7 +15,7 @@
* 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.viabackwards.protocol.protocol1_19_3to1_19_4.data;
package com.viaversion.viabackwards.protocol.protocol1_19_3to1_19_4.packets;
import com.viaversion.viabackwards.protocol.protocol1_19_3to1_19_4.Protocol1_19_3To1_19_4;
import com.viaversion.viaversion.api.minecraft.entities.Entity1_19_3Types;

Datei anzeigen

@ -3,7 +3,7 @@ metadata.format.version = "1.1"
[versions]
# ViaVersion
viaver = "4.6.0-23w03a-SNAPSHOT"
viaver = "4.6.0-23w05a-SNAPSHOT"
# Common provided
netty = "4.0.20.Final"