mirror of
https://github.com/ViaVersion/ViaAprilFools.git
synced 2025-01-22 21:21:26 +01:00
Updated Via API usage
This commit is contained in:
parent
9580b667a2
commit
6229781385
@ -23,9 +23,8 @@ repositories {
|
||||
|
||||
dependencies {
|
||||
compileOnly "com.viaversion:viaversion-common:4.9.0-23w44a-SNAPSHOT"
|
||||
compileOnly("com.viaversion:viabackwards-common:4.9.0-23w44a-SNAPSHOT") {
|
||||
exclude group: "com.viaversion", module: "viaversion"
|
||||
}
|
||||
compileOnly "com.viaversion:viabackwards-common:4.9.0-23w44a-SNAPSHOT"
|
||||
compileOnly "com.google.guava:guava:32.1.3-jre"
|
||||
compileOnly "org.yaml:snakeyaml:2.2"
|
||||
}
|
||||
|
||||
|
@ -18,10 +18,10 @@
|
||||
package net.raphimc.viaaprilfools.protocols.protocol1_16to20w14infinite.metadata;
|
||||
|
||||
import com.viaversion.viaversion.api.connection.UserConnection;
|
||||
import com.viaversion.viaversion.api.minecraft.Particle;
|
||||
import com.viaversion.viaversion.api.minecraft.entities.EntityType;
|
||||
import com.viaversion.viaversion.api.minecraft.entities.EntityTypes1_16;
|
||||
import com.viaversion.viaversion.api.minecraft.metadata.Metadata;
|
||||
import com.viaversion.viaversion.api.type.types.Particle;
|
||||
import com.viaversion.viaversion.api.type.types.version.Types1_14;
|
||||
import com.viaversion.viaversion.rewriter.EntityRewriter;
|
||||
import net.raphimc.viaaprilfools.protocols.protocol1_16to20w14infinite.ClientboundPackets20w14infinite;
|
||||
|
@ -26,6 +26,7 @@ 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.packets.EntityPackets;
|
||||
import com.viaversion.viaversion.util.Key;
|
||||
import net.raphimc.viaaprilfools.ViaAprilFools;
|
||||
import net.raphimc.viaaprilfools.protocols.protocol1_16to20w14infinite.ClientboundPackets20w14infinite;
|
||||
import net.raphimc.viaaprilfools.protocols.protocol1_16to20w14infinite.Protocol1_16to20w14infinite;
|
||||
@ -139,7 +140,7 @@ public class EntityPackets20w14infinite {
|
||||
String attributeIdentifier = Via.getManager().getProtocolManager().getProtocol(Protocol1_16To1_15_2.class).getMappingData().getAttributeMappings().get(key);
|
||||
if (attributeIdentifier == null) {
|
||||
attributeIdentifier = "minecraft:" + key;
|
||||
if (!com.viaversion.viaversion.protocols.protocol1_13to1_12_2.data.MappingData.isValid1_13Channel(attributeIdentifier)) {
|
||||
if (!Key.isValid(attributeIdentifier)) {
|
||||
if (!Via.getConfig().isSuppressConversionWarnings()) {
|
||||
ViaAprilFools.getPlatform().getLogger().warning("Invalid attribute: " + key);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user