Workaround for base protocol issues

This commit is contained in:
RaphiMC 2024-02-18 20:33:32 +01:00
parent 2f375bf448
commit 8bc59bec3b
No known key found for this signature in database
GPG Key ID: 0F6BB0657A03AC94
2 changed files with 1 additions and 8 deletions

View File

@ -30,7 +30,7 @@ public class AprilFoolsProtocolVersion {
public static final List<ProtocolVersion> APRIL_FOOLS_PROTOCOLS = new ArrayList<>();
public static final ProtocolVersion s3d_shareware = registerAprilFools(1, "3D Shareware", ProtocolVersion.v1_13_2);
public static final ProtocolVersion s20w14infinite = registerAprilFools(709, "20w14infinite", ProtocolVersion.v1_15_2);
public static final ProtocolVersion s20w14infinite = registerAprilFools(709, "20w14infinite", ProtocolVersion.v1_16);
public static final ProtocolVersion sCombatTest8c = registerSnapshot(803, "Combat Test 8c", ProtocolVersion.v1_16_1);
private static ProtocolVersion registerSnapshot(final int version, final String name, final ProtocolVersion origin) {

View File

@ -17,11 +17,9 @@
*/
package net.raphimc.viaaprilfools.platform;
import com.google.common.collect.Range;
import com.viaversion.viaversion.api.Via;
import com.viaversion.viaversion.api.protocol.ProtocolManager;
import com.viaversion.viaversion.api.protocol.version.ProtocolVersion;
import com.viaversion.viaversion.protocols.base.BaseProtocol1_16;
import net.raphimc.viaaprilfools.ViaAprilFools;
import net.raphimc.viaaprilfools.ViaAprilFoolsConfig;
import net.raphimc.viaaprilfools.api.AprilFoolsProtocolVersion;
@ -42,16 +40,11 @@ public interface ViaAprilFoolsPlatform {
Via.getManager().getConfigurationProvider().register(config);
Via.getManager().getSubPlatforms().add(ViaAprilFools.IMPL_VERSION);
final ProtocolManager protocolManager = Via.getManager().getProtocolManager();
protocolManager.registerProtocol(new Protocol1_14to3D_Shareware(), ProtocolVersion.v1_14, AprilFoolsProtocolVersion.s3d_shareware);
protocolManager.registerProtocol(new Protocol3D_Sharewareto1_14(), AprilFoolsProtocolVersion.s3d_shareware, ProtocolVersion.v1_14);
protocolManager.registerProtocol(new Protocol1_16to20w14infinite(), ProtocolVersion.v1_16, AprilFoolsProtocolVersion.s20w14infinite);
protocolManager.registerProtocol(new Protocol1_16_2toCombatTest8c(), ProtocolVersion.v1_16_2, AprilFoolsProtocolVersion.sCombatTest8c);
protocolManager.registerBaseProtocol(new BaseProtocol1_16(), Range.singleton(AprilFoolsProtocolVersion.s20w14infinite));
protocolManager.registerBaseProtocol(new BaseProtocol1_16(), Range.singleton(AprilFoolsProtocolVersion.sCombatTest8c));
}
Logger getLogger();