Updated Via API usage

This commit is contained in:
RaphiMC 2024-05-05 12:31:43 +02:00
parent bd9296f7b8
commit bb669cdfed
No known key found for this signature in database
GPG Key ID: 0F6BB0657A03AC94
2 changed files with 8 additions and 4 deletions

View File

@ -23,8 +23,8 @@ repositories {
}
dependencies {
compileOnly "com.viaversion:viaversion-common:4.10.0"
compileOnly "com.viaversion:viabackwards-common:4.10.0"
compileOnly "com.viaversion:viaversion-common:4.10.1-SNAPSHOT"
compileOnly "com.viaversion:viabackwards-common:4.10.1-SNAPSHOT"
compileOnly "org.yaml:snakeyaml:2.2"
compileOnly "com.google.guava:guava:33.2.0-jre"
compileOnly "io.netty:netty-handler:4.1.109.Final"

View File

@ -28,8 +28,6 @@ public class MetadataRewriter1_16to20w14infinite extends EntityRewriter<Clientbo
public MetadataRewriter1_16to20w14infinite(Protocol1_16to20w14infinite protocol) {
super(protocol);
mapEntityType(Entity20w14infiniteTypes.ZOMBIE_PIGMAN, EntityTypes1_16.ZOMBIFIED_PIGLIN);
mapTypes(Entity20w14infiniteTypes.values(), EntityTypes1_16.class);
}
@Override
@ -45,6 +43,12 @@ public class MetadataRewriter1_16to20w14infinite extends EntityRewriter<Clientbo
filter().type(EntityTypes1_16.ABSTRACT_ARROW).removeIndex(8);
}
@Override
public void onMappingDataLoaded() {
mapTypes();
mapEntityType(Entity20w14infiniteTypes.ZOMBIE_PIGMAN, EntityTypes1_16.ZOMBIFIED_PIGLIN);
}
@Override
public EntityType typeFromId(int type) {
return EntityTypes1_16.getTypeFromId(type);