mirror of
https://github.com/darksaid98/Flashback.git
synced 2026-12-01 22:16:01 +00:00
0.3.0
This commit is contained in:
1 parent
d2a217509f
commit
4d8f896cdf
90 files changed
+2345
-720
No files matched your search
@@ -0,0 +1,23 @@
|
||||
package com.moulberry.flashback.mixin.visuals;
|
||||
|
||||
import com.moulberry.flashback.state.EditorState;
|
||||
import com.moulberry.flashback.state.EditorStateManager;
|
||||
import net.minecraft.client.renderer.entity.LivingEntityRenderer;
|
||||
import net.minecraft.world.entity.LivingEntity;
|
||||
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(LivingEntityRenderer.class)
|
||||
public class MixinLivingEntityRenderer {
|
||||
|
||||
@Inject(method = "isBodyVisible", at = @At("HEAD"), cancellable = true)
|
||||
public void isBodyVisible(LivingEntity livingEntity, CallbackInfoReturnable<Boolean> cir) {
|
||||
EditorState editorState = EditorStateManager.getCurrent();
|
||||
if (editorState != null && editorState.hideDuringExport.contains(livingEntity.getUUID())) {
|
||||
cir.setReturnValue(false);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user