Updated Via API usage

This commit is contained in:
RaphiMC 2024-02-13 21:35:31 +01:00
parent 6c610e15f5
commit 035d63847c
No known key found for this signature in database
GPG Key ID: 0F6BB0657A03AC94
2 changed files with 4 additions and 4 deletions

View File

@ -23,8 +23,8 @@ repositories {
}
dependencies {
compileOnly "com.viaversion:viaversion-common:4.10.0-24w04a-SNAPSHOT"
compileOnly "com.viaversion:viabackwards-common:4.10.0-24w04a-SNAPSHOT"
compileOnly "com.viaversion:viaversion-common:4.10.0-24w06a-SNAPSHOT"
compileOnly "com.viaversion:viabackwards-common:4.10.0-24w06a-SNAPSHOT"
compileOnly "org.yaml:snakeyaml:2.2"
compileOnly "com.google.guava:guava:33.0.0-jre"
compileOnly "io.netty:netty-handler:4.1.107.Final"

View File

@ -24,7 +24,7 @@ import com.viaversion.viaversion.api.protocol.remapper.PacketHandlers;
import com.viaversion.viaversion.api.type.Type;
import com.viaversion.viaversion.api.type.types.version.Types1_14;
import com.viaversion.viaversion.protocols.protocol1_16to1_15_2.ClientboundPackets1_16;
import com.viaversion.viaversion.protocols.protocol1_16to1_15_2.Protocol1_16To1_15_2;
import com.viaversion.viaversion.protocols.protocol1_16to1_15_2.data.AttributeMappings;
import com.viaversion.viaversion.protocols.protocol1_16to1_15_2.packets.EntityPackets;
import com.viaversion.viaversion.util.Key;
import net.raphimc.viaaprilfools.ViaAprilFools;
@ -137,7 +137,7 @@ public class EntityPackets20w14infinite {
for (int i = 0; i < size; i++) {
// Attributes have been renamed and are now namespaced identifiers
String key = wrapper.read(Type.STRING);
String attributeIdentifier = Via.getManager().getProtocolManager().getProtocol(Protocol1_16To1_15_2.class).getMappingData().attributeIdentifierMappings().get(key);
String attributeIdentifier = AttributeMappings.attributeIdentifierMappings().get(key);
if (attributeIdentifier == null) {
attributeIdentifier = "minecraft:" + key;
if (!Key.isValid(attributeIdentifier)) {