mirror of
https://github.com/darksaid98/Flashback.git
synced 2026-12-03 14:38:50 +00:00
Fix inconsistent mixins
This commit is contained in:
1 parent
33d821e294
commit
38970f47bc
2 files changed
+35
-4
No files matched your search
@@ -0,0 +1,34 @@
|
|||||||
|
package com.moulberry.flashback.mixin.visuals;
|
||||||
|
|
||||||
|
import com.mojang.authlib.GameProfile;
|
||||||
|
import com.moulberry.flashback.state.EditorState;
|
||||||
|
import com.moulberry.flashback.state.EditorStateManager;
|
||||||
|
import net.minecraft.world.entity.EntityType;
|
||||||
|
import net.minecraft.world.entity.LivingEntity;
|
||||||
|
import net.minecraft.world.entity.player.Player;
|
||||||
|
import net.minecraft.world.entity.player.PlayerModelPart;
|
||||||
|
import net.minecraft.world.level.Level;
|
||||||
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
|
import org.spongepowered.asm.mixin.injection.Inject;
|
||||||
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||||
|
|
||||||
|
@Mixin(Player.class)
|
||||||
|
public abstract class MixinPlayer extends LivingEntity {
|
||||||
|
|
||||||
|
protected MixinPlayer(EntityType<? extends LivingEntity> entityType, Level level) {
|
||||||
|
super(entityType, level);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Inject(method = "isModelPartShown", at = @At("HEAD"), cancellable = true)
|
||||||
|
public void isModelPartShown(PlayerModelPart playerModelPart, CallbackInfoReturnable<Boolean> cir) {
|
||||||
|
EditorState editorState = EditorStateManager.getCurrent();
|
||||||
|
if (editorState != null) {
|
||||||
|
GameProfile skinOverride = editorState.skinOverride.get(this.uuid);
|
||||||
|
if (skinOverride != null) {
|
||||||
|
cir.setReturnValue(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -43,9 +43,7 @@
|
|||||||
"visuals.MixinLoadingOverlay",
|
"visuals.MixinLoadingOverlay",
|
||||||
"visuals.MixinMouseHandler",
|
"visuals.MixinMouseHandler",
|
||||||
"visuals.MixinOptions",
|
"visuals.MixinOptions",
|
||||||
"visuals.MixinRenderStateShard",
|
"visuals.MixinPlayer"
|
||||||
"visuals.MixinPlayer",
|
|
||||||
"visuals.MixinWeatherEffectRenderer"
|
|
||||||
],
|
],
|
||||||
"injectors": {
|
"injectors": {
|
||||||
"defaultRequire": 1
|
"defaultRequire": 1
|
||||||
@@ -68,7 +66,6 @@
|
|||||||
"compat.voice_chat.MixinVoiceChatRenderEvents",
|
"compat.voice_chat.MixinVoiceChatRenderEvents",
|
||||||
"compat.voice_chat.MixinVoiceChatSoundManager",
|
"compat.voice_chat.MixinVoiceChatSoundManager",
|
||||||
"playback.MixinAbstractMinecart",
|
"playback.MixinAbstractMinecart",
|
||||||
"compat.voice_chat.MixinVoiceChatClientPlayerStateManager",
|
|
||||||
"millis.MixinWorldBorderMovingBorderExtent",
|
"millis.MixinWorldBorderMovingBorderExtent",
|
||||||
"playback.MixinAttributeInstance",
|
"playback.MixinAttributeInstance",
|
||||||
"playback.MixinBoat",
|
"playback.MixinBoat",
|
||||||
|
|||||||
Reference in new issue
Block a user