Update VV API usage

This commit is contained in:
FlorianMichael 2024-08-21 17:08:22 +02:00
parent ba20ade944
commit e68c972d4e
No known key found for this signature in database
GPG Key ID: C2FB87E71C425126
5 changed files with 4 additions and 16 deletions

View File

@ -22,8 +22,8 @@ base {
}
dependencies {
compileOnly "com.viaversion:viaversion-common:5.0.3-SNAPSHOT"
compileOnly "com.viaversion:viabackwards-common:5.0.3-SNAPSHOT"
compileOnly "com.viaversion:viaversion-common:5.0.4-SNAPSHOT"
compileOnly "com.viaversion:viabackwards-common:5.0.4-SNAPSHOT"
}
publishing {

View File

@ -25,7 +25,6 @@ import com.viaversion.viaversion.api.connection.UserConnection;
import com.viaversion.viaversion.api.minecraft.RegistryType;
import com.viaversion.viaversion.api.minecraft.entities.EntityTypes1_16;
import com.viaversion.viaversion.api.protocol.remapper.PacketHandlers;
import com.viaversion.viaversion.api.protocol.version.ProtocolVersion;
import com.viaversion.viaversion.api.type.Types;
import com.viaversion.viaversion.data.entity.EntityTrackerBase;
import com.viaversion.viaversion.protocols.v1_15_2to1_16.Protocol1_15_2To1_16;
@ -166,7 +165,6 @@ public class Protocol20w14infiniteTo1_16 extends BackwardsProtocol<ClientboundPa
@Override
public void init(UserConnection userConnection) {
userConnection.addEntityTracker(this.getClass(), new EntityTrackerBase(userConnection, EntityTypes1_16.PLAYER));
userConnection.getProtocolInfo().getPipeline().add(Via.getManager().getProtocolManager().getBaseProtocol(ProtocolVersion.v1_16));
}
@Override

View File

@ -20,11 +20,9 @@ package net.raphimc.viaaprilfools.protocol.s3d_sharewaretov1_14;
import com.viaversion.viabackwards.api.BackwardsProtocol;
import com.viaversion.viabackwards.api.data.BackwardsMappingData;
import com.viaversion.viabackwards.api.rewriters.SoundRewriter;
import com.viaversion.viaversion.api.Via;
import com.viaversion.viaversion.api.connection.UserConnection;
import com.viaversion.viaversion.api.minecraft.chunks.Chunk;
import com.viaversion.viaversion.api.protocol.packet.PacketWrapper;
import com.viaversion.viaversion.api.protocol.version.ProtocolVersion;
import com.viaversion.viaversion.api.type.Types;
import com.viaversion.viaversion.api.type.types.chunk.ChunkType1_14;
import com.viaversion.viaversion.protocols.v1_13_2to1_14.Protocol1_13_2To1_14;
@ -84,7 +82,6 @@ public class Protocol3D_SharewareTo1_14 extends BackwardsProtocol<ClientboundPac
@Override
public void init(UserConnection userConnection) {
userConnection.put(new ChunkCenterTracker3D_Shareware());
userConnection.getProtocolInfo().getPipeline().add(Via.getManager().getProtocolManager().getBaseProtocol(ProtocolVersion.v1_14));
}
@Override

View File

@ -17,11 +17,8 @@
*/
package net.raphimc.viaaprilfools.protocol.scombattest8ctov1_16_2;
import com.viaversion.viaversion.api.Via;
import com.viaversion.viaversion.api.connection.UserConnection;
import com.viaversion.viaversion.api.protocol.AbstractProtocol;
import com.viaversion.viaversion.api.protocol.remapper.PacketHandlers;
import com.viaversion.viaversion.api.protocol.version.ProtocolVersion;
import com.viaversion.viaversion.api.type.Types;
import com.viaversion.viaversion.protocols.v1_16_1to1_16_2.packet.ClientboundPackets1_16_2;
import com.viaversion.viaversion.protocols.v1_16_1to1_16_2.packet.ServerboundPackets1_16_2;
@ -48,9 +45,4 @@ public class ProtocolCombatTest8cTo1_16_2 extends AbstractProtocol<ClientboundPa
});
}
@Override
public void init(UserConnection userConnection) {
userConnection.getProtocolInfo().getPipeline().add(Via.getManager().getProtocolManager().getBaseProtocol(ProtocolVersion.v1_16_2));
}
}

View File

@ -24,7 +24,8 @@
"depends": {
"fabricloader": ">=0.14.0",
"viafabric": ">=0.4.10",
"viabackwards": ">=5.0.0"
"viaversion": ">=5.0.4-SNAPSHOT",
"viabackwards": ">=5.0.4-SNAPSHOT"
},
"custom": {
"modmenu:api": true,