Add extra protections against shutdown and startup events firing incorrectly, version bump
This commit is contained in:
@@ -15,6 +15,6 @@ loom_version=1.11-SNAPSHOT
|
||||
fabric_version=0.129.0+1.21.8
|
||||
|
||||
# Mod Properties
|
||||
mod_version = 0.2.3-alpha
|
||||
mod_version = 0.2.4-alpha
|
||||
maven_group = me.cortex
|
||||
archives_base_name = voxy
|
||||
@@ -1,5 +1,6 @@
|
||||
package me.cortex.voxy.client.mixin.minecraft;
|
||||
|
||||
import me.cortex.voxy.client.VoxyClient;
|
||||
import me.cortex.voxy.client.VoxyClientInstance;
|
||||
import me.cortex.voxy.client.config.VoxyConfig;
|
||||
import me.cortex.voxy.commonImpl.VoxyCommon;
|
||||
@@ -14,7 +15,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
public class MixinClientLoginNetworkHandler {
|
||||
@Inject(method = "onGameJoin", at = @At(value = "INVOKE", target = "Lnet/minecraft/network/packet/s2c/play/GameJoinS2CPacket;commonPlayerSpawnInfo()Lnet/minecraft/network/packet/s2c/play/CommonPlayerSpawnInfo;"))
|
||||
private void voxy$init(GameJoinS2CPacket packet, CallbackInfo ci) {
|
||||
if (VoxyCommon.isAvailable()) {
|
||||
if (VoxyCommon.isAvailable() && !VoxyClientInstance.isInGame) {
|
||||
VoxyClientInstance.isInGame = true;
|
||||
if (VoxyConfig.CONFIG.enabled) {
|
||||
if (VoxyCommon.getInstance() != null) {
|
||||
|
||||
@@ -12,7 +12,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
public class MixinMinecraftClient {
|
||||
@Inject(method = "disconnect(Lnet/minecraft/client/gui/screen/Screen;Z)V", at = @At("TAIL"))
|
||||
private void voxy$injectWorldClose(CallbackInfo ci) {
|
||||
if (VoxyCommon.isAvailable()) {
|
||||
if (VoxyCommon.isAvailable() && VoxyClientInstance.isInGame) {
|
||||
VoxyCommon.shutdownInstance();
|
||||
VoxyClientInstance.isInGame = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user