mirror of
https://github.com/ViaVersion/ViaFabricPlus.git
synced 2024-11-15 10:45:35 +01:00
cleanup
This commit is contained in:
parent
59189686f3
commit
f254cbebd2
@ -29,25 +29,19 @@ public class MixinClassicProtocolExtension {
|
||||
|
||||
@Inject(method = "supportsVersion", at = @At("HEAD"), cancellable = true)
|
||||
public void allowExtensions_supportsVersion(int version, CallbackInfoReturnable<Boolean> cir) {
|
||||
final ClassicProtocolExtension self = (ClassicProtocolExtension) (Object) this;
|
||||
if (CustomClassicProtocolExtensions.ALLOWED_EXTENSIONS.contains(self)) {
|
||||
if (CustomClassicProtocolExtensions.ALLOWED_EXTENSIONS.contains((ClassicProtocolExtension) (Object) this))
|
||||
cir.setReturnValue(true);
|
||||
}
|
||||
}
|
||||
|
||||
@Inject(method = "isSupported", at = @At("HEAD"), cancellable = true)
|
||||
public void allowExtensions_isSupported(CallbackInfoReturnable<Boolean> cir) {
|
||||
final ClassicProtocolExtension self = (ClassicProtocolExtension) (Object) this;
|
||||
if (CustomClassicProtocolExtensions.ALLOWED_EXTENSIONS.contains(self)) {
|
||||
if (CustomClassicProtocolExtensions.ALLOWED_EXTENSIONS.contains((ClassicProtocolExtension) (Object) this))
|
||||
cir.setReturnValue(true);
|
||||
}
|
||||
}
|
||||
|
||||
@Inject(method = "getHighestSupportedVersion", at = @At("HEAD"), cancellable = true)
|
||||
public void allowExtensions_getHighestSupportedVersion(CallbackInfoReturnable<Integer> cir) {
|
||||
final ClassicProtocolExtension self = (ClassicProtocolExtension) (Object) this;
|
||||
if (CustomClassicProtocolExtensions.ALLOWED_EXTENSIONS.contains(self)) {
|
||||
if (CustomClassicProtocolExtensions.ALLOWED_EXTENSIONS.contains((ClassicProtocolExtension) (Object) this))
|
||||
cir.setReturnValue(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user