Get rid of all the ATs in favor of Mixins
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package com.replaymod.replay;
|
||||
|
||||
import com.replaymod.core.utils.WrappedTimer;
|
||||
import com.replaymod.core.versions.MCVer;
|
||||
import com.replaymod.replay.camera.CameraController;
|
||||
import com.replaymod.replay.camera.CameraEntity;
|
||||
import net.minecraft.client.Minecraft;
|
||||
@@ -10,15 +11,8 @@ import net.minecraft.util.Timer;
|
||||
import com.replaymod.core.versions.MCVer;
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
//#else
|
||||
//$$ import com.replaymod.replay.events.ReplayDispatchKeypressesEvent;
|
||||
//$$ import net.minecraft.client.gui.GuiScreen;
|
||||
//$$ import net.minecraft.client.settings.GameSettings;
|
||||
//$$ import net.minecraft.client.settings.KeyBinding;
|
||||
//$$ import net.minecraft.crash.CrashReport;
|
||||
//$$ import net.minecraft.util.ReportedException;
|
||||
//$$ import net.minecraftforge.client.ForgeHooksClient;
|
||||
//$$ import net.minecraftforge.common.MinecraftForge;
|
||||
//$$ import org.lwjgl.input.Keyboard;
|
||||
//$$ import org.lwjgl.input.Mouse;
|
||||
//$$ import net.minecraftforge.fml.common.FMLCommonHandler;
|
||||
//#if MC>=10800
|
||||
@@ -31,6 +25,11 @@ import org.lwjgl.glfw.GLFW;
|
||||
//#endif
|
||||
//#endif
|
||||
|
||||
//#if MC>=10904
|
||||
//#else
|
||||
//$$ import net.minecraft.client.multiplayer.WorldClient;
|
||||
//#endif
|
||||
|
||||
public class InputReplayTimer extends WrappedTimer {
|
||||
private final ReplayModReplay mod;
|
||||
private final Minecraft mc;
|
||||
@@ -70,14 +69,10 @@ public class InputReplayTimer extends WrappedTimer {
|
||||
}
|
||||
mc.keyboardListener.tick();
|
||||
//#else
|
||||
//#if MC>=10904
|
||||
//$$ if (mc.currentScreen == null || mc.currentScreen.allowUserInput) {
|
||||
//$$ while (Mouse.next()) {
|
||||
//$$ handleMouseEvent();
|
||||
//$$ }
|
||||
//$$
|
||||
//$$ while (Keyboard.next()) {
|
||||
//$$ handleKeyEvent();
|
||||
//$$ }
|
||||
//$$ ((MCVer.MinecraftMethodAccessor) mc).replayModRunTickMouse();
|
||||
//$$ ((MCVer.MinecraftMethodAccessor) mc).replayModRunTickKeyboard();
|
||||
//$$ } else {
|
||||
//#if MC<11300
|
||||
//#if MC>=10800
|
||||
@@ -91,6 +86,21 @@ public class InputReplayTimer extends WrappedTimer {
|
||||
//#endif
|
||||
//#endif
|
||||
//$$ }
|
||||
//#else
|
||||
//$$ // 1.8.9 and below has one giant tick function, so we try to only do keyboard & mouse as far as possible
|
||||
//$$ WorldClient world = mc.theWorld;
|
||||
//$$ mc.theWorld = null;
|
||||
//#if MC>=10800
|
||||
//$$ try {
|
||||
//$$ mc.runTick();
|
||||
//$$ } catch (IOException e) { // *SIGH*
|
||||
//$$ e.printStackTrace();
|
||||
//$$ }
|
||||
//#else
|
||||
//$$ mc.runTick();
|
||||
//#endif
|
||||
//$$ mc.theWorld = world;
|
||||
//#endif
|
||||
//#endif
|
||||
}
|
||||
}
|
||||
@@ -115,180 +125,6 @@ public class InputReplayTimer extends WrappedTimer {
|
||||
}
|
||||
}
|
||||
|
||||
//#if MC<11300
|
||||
//$$ protected void handleMouseEvent() {
|
||||
//$$ if (ForgeHooksClient.postMouseEvent()) return;
|
||||
//$$
|
||||
//$$ int button = Mouse.getEventButton() - 100;
|
||||
//$$ boolean pressed = Mouse.getEventButtonState();
|
||||
//$$
|
||||
//$$ // Update key binding states
|
||||
//$$ KeyBinding.setKeyBindState(button, pressed);
|
||||
//$$ if (pressed) {
|
||||
//$$ KeyBinding.onTick(button);
|
||||
//$$ }
|
||||
//$$
|
||||
//$$ int wheel = Mouse.getEventDWheel();
|
||||
//$$ handleScroll(wheel);
|
||||
//$$
|
||||
//$$ if (mc.currentScreen == null) {
|
||||
//$$ if (!mc.inGameHasFocus && Mouse.getEventButtonState()) {
|
||||
//$$ // Regrab mouse if the user clicks into the window
|
||||
//$$ mc.setIngameFocus();
|
||||
//$$ }
|
||||
//$$ } else {
|
||||
//#if MC>=10800
|
||||
//$$ try {
|
||||
//$$ mc.currentScreen.handleMouseInput();
|
||||
//$$ } catch (IOException e) { // WHO IS RESPONSIBLE FOR THIS MESS?!?
|
||||
//$$ e.printStackTrace();
|
||||
//$$ }
|
||||
//#else
|
||||
//$$ mc.currentScreen.handleMouseInput();
|
||||
//#endif
|
||||
//$$ }
|
||||
//$$
|
||||
//$$ FMLCommonHandler.instance().fireMouseInput();
|
||||
//$$ }
|
||||
//$$
|
||||
//$$ protected void handleKeyEvent() {
|
||||
//$$ // TODO 1.7.10: This might be missing some 1.7.10-only key bindings or implement some of them incorrectly
|
||||
//$$ int key = Keyboard.getEventKey() == 0 ? Keyboard.getEventCharacter() + 256 : Keyboard.getEventKey();
|
||||
//$$ boolean pressed = Keyboard.getEventKeyState();
|
||||
//$$
|
||||
//$$ KeyBinding.setKeyBindState(key, pressed);
|
||||
//$$ if (pressed) {
|
||||
//$$ KeyBinding.onTick(key);
|
||||
//$$ }
|
||||
//$$
|
||||
//$$ // Still want to be able to create debug crashes ]:D
|
||||
//$$ if (mc.debugCrashKeyPressTime > 0) {
|
||||
//$$ if (Minecraft.getSystemTime() - mc.debugCrashKeyPressTime >= 6000L) {
|
||||
//$$ throw new ReportedException(new CrashReport("Manually triggered debug crash", new Throwable()));
|
||||
//$$ }
|
||||
//$$
|
||||
//$$ if (!Keyboard.isKeyDown(Keyboard.KEY_F3) || !Keyboard.isKeyDown(Keyboard.KEY_C)) {
|
||||
//$$ mc.debugCrashKeyPressTime = -1;
|
||||
//$$ }
|
||||
//$$ } else if (Keyboard.isKeyDown(Keyboard.KEY_F3) && Keyboard.isKeyDown(Keyboard.KEY_C)) {
|
||||
//$$ mc.debugCrashKeyPressTime = Minecraft.getSystemTime();
|
||||
//$$ }
|
||||
//$$
|
||||
//$$ // Twitch, screenshot, fullscreen, etc. (stuff that works everywhere)
|
||||
//$$ if (!MinecraftForge.EVENT_BUS.post(new ReplayDispatchKeypressesEvent.Pre())) {
|
||||
//$$ mc.dispatchKeypresses();
|
||||
//$$ }
|
||||
//$$
|
||||
//$$ if (pressed) {
|
||||
//$$ // This might be subject to change as vanilla shaders are still kinda unused in 1.8
|
||||
//$$ if (key == Keyboard.KEY_F4 && mc.entityRenderer != null) {
|
||||
//#if MC>=10800
|
||||
//$$ mc.entityRenderer.switchUseShader();
|
||||
//#else
|
||||
//$$ mc.entityRenderer.activateNextShader();
|
||||
//#endif
|
||||
//$$ }
|
||||
//$$
|
||||
//$$ if (mc.currentScreen != null) {
|
||||
//#if MC>=10800
|
||||
//$$ try {
|
||||
//$$ mc.currentScreen.handleKeyboardInput();
|
||||
//$$ } catch (IOException e) { // AND WHO THOUGHT THIS WAS A GREAT IDEA?
|
||||
//$$ e.printStackTrace();
|
||||
//$$ }
|
||||
//#else
|
||||
//$$ mc.currentScreen.handleKeyboardInput();
|
||||
//#endif
|
||||
//$$ } else {
|
||||
//$$ if (key == Keyboard.KEY_ESCAPE) {
|
||||
//$$ mc.displayInGameMenu();
|
||||
//$$ }
|
||||
//$$
|
||||
//$$ // Following are a ton of vanilla keyboard shortcuts, some are removed as they're useless in the
|
||||
//$$ // replay viewer as of now
|
||||
//$$ // TODO Update maybe add new key bindings
|
||||
//$$ // TODO: Translate magic values to Keyboard.KEY_ constants
|
||||
//$$
|
||||
//$$ if (key == 32 && Keyboard.isKeyDown(61) && mc.ingameGUI != null) {
|
||||
//#if MC>=11100
|
||||
//$$ mc.ingameGUI.getChatGUI().clearChatMessages(false);
|
||||
//#else
|
||||
//$$ mc.ingameGUI.getChatGUI().clearChatMessages();
|
||||
//#endif
|
||||
//$$ }
|
||||
//$$
|
||||
//$$ if (key == 31 && Keyboard.isKeyDown(61)) {
|
||||
//$$ mc.refreshResources();
|
||||
//$$ }
|
||||
//$$
|
||||
//$$ if (key == 20 && Keyboard.isKeyDown(61)) {
|
||||
//$$ mc.refreshResources();
|
||||
//$$ }
|
||||
//$$
|
||||
//$$ if (key == 33 && Keyboard.isKeyDown(61)) {
|
||||
//$$ boolean flag1 = Keyboard.isKeyDown(42) | Keyboard.isKeyDown(54);
|
||||
//$$ mc.gameSettings.setOptionValue(GameSettings.Options.RENDER_DISTANCE, flag1 ? -1 : 1);
|
||||
//$$ }
|
||||
//$$
|
||||
//$$ if (key == 30 && Keyboard.isKeyDown(61)) {
|
||||
//$$ mc.renderGlobal.loadRenderers();
|
||||
//$$ }
|
||||
//$$
|
||||
//$$ if (key == 48 && Keyboard.isKeyDown(61)) {
|
||||
//#if MC>=10800
|
||||
//$$ mc.getRenderManager().setDebugBoundingBox(!mc.getRenderManager().isDebugBoundingBox());
|
||||
//#else
|
||||
//$$ RenderManager.debugBoundingBox = !RenderManager.debugBoundingBox;
|
||||
//#endif
|
||||
//$$ }
|
||||
//$$
|
||||
//$$ if (key == 25 && Keyboard.isKeyDown(61)) {
|
||||
//$$ mc.gameSettings.pauseOnLostFocus = !mc.gameSettings.pauseOnLostFocus;
|
||||
//$$ mc.gameSettings.saveOptions();
|
||||
//$$ }
|
||||
//$$
|
||||
//$$ if (key == 59) {
|
||||
//$$ mc.gameSettings.hideGUI = !mc.gameSettings.hideGUI;
|
||||
//$$ }
|
||||
//$$
|
||||
//$$ if (key == 61) {
|
||||
//$$ mc.gameSettings.showDebugInfo = !mc.gameSettings.showDebugInfo;
|
||||
//$$ mc.gameSettings.showDebugProfilerChart = GuiScreen.isShiftKeyDown();
|
||||
//$$ }
|
||||
//$$
|
||||
//$$ if (mc.gameSettings.keyBindTogglePerspective.isPressed()) {
|
||||
//$$ mc.gameSettings.thirdPersonView = (mc.gameSettings.thirdPersonView + 1) % 3;
|
||||
//$$
|
||||
//#if MC>=10800
|
||||
//$$ if (mc.entityRenderer != null) { // Extra check, not in vanilla code
|
||||
//$$ if (mc.gameSettings.thirdPersonView == 0) {
|
||||
//$$ mc.entityRenderer.loadEntityShader(mc.getRenderViewEntity());
|
||||
//$$ } else if (mc.gameSettings.thirdPersonView == 1) {
|
||||
//$$ mc.entityRenderer.loadEntityShader(null);
|
||||
//$$ }
|
||||
//$$ }
|
||||
//#endif
|
||||
//$$ }
|
||||
//$$ }
|
||||
//$$
|
||||
//$$ // Navigation in the debug chart
|
||||
//$$ if (mc.gameSettings.showDebugInfo && mc.gameSettings.showDebugProfilerChart) {
|
||||
//$$ if (key == Keyboard.KEY_0) {
|
||||
//$$ mc.updateDebugProfilerName(0);
|
||||
//$$ }
|
||||
//$$
|
||||
//$$ for (int i = 0; i < 9; ++i) {
|
||||
//$$ if (key == 2 + i) {
|
||||
//$$ mc.updateDebugProfilerName(i + 1);
|
||||
//$$ }
|
||||
//$$ }
|
||||
//$$ }
|
||||
//$$ }
|
||||
//$$
|
||||
//$$ FMLCommonHandler.instance().fireKeyInput();
|
||||
//$$ }
|
||||
//#endif
|
||||
|
||||
//#if MC<=10710
|
||||
//$$ public static class RunScheduledTasks extends Event {}
|
||||
//#endif
|
||||
|
||||
@@ -59,9 +59,9 @@ public class NoGuiScreenshot {
|
||||
mc.entityRenderer.renderWorld(MCVer.getRenderPartialTicks(), System.nanoTime());
|
||||
//#else
|
||||
//#if MC>=10809
|
||||
//$$ mc.entityRenderer.updateCameraAndRender(mc.timer.renderPartialTicks, System.nanoTime());
|
||||
//$$ mc.entityRenderer.updateCameraAndRender(MCVer.getRenderPartialTicks(), System.nanoTime());
|
||||
//#else
|
||||
//$$ mc.entityRenderer.updateCameraAndRender(mc.timer.renderPartialTicks);
|
||||
//$$ mc.entityRenderer.updateCameraAndRender(MCVer.getRenderPartialTicks());
|
||||
//#endif
|
||||
//#endif
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@ import com.replaymod.replay.events.ReplayClosedCallback;
|
||||
import com.replaymod.replay.events.ReplayClosingCallback;
|
||||
import com.replaymod.replay.events.ReplayOpenedCallback;
|
||||
import com.replaymod.replay.gui.overlay.GuiReplayOverlay;
|
||||
import com.replaymod.replay.mixin.EntityLivingBaseAccessor;
|
||||
import com.replaymod.replaystudio.data.Marker;
|
||||
import com.replaymod.replaystudio.replay.ReplayFile;
|
||||
import com.replaymod.replaystudio.util.Location;
|
||||
@@ -38,9 +37,11 @@ import java.io.IOException;
|
||||
import java.util.*;
|
||||
|
||||
//#if MC>=11300
|
||||
import com.replaymod.replay.mixin.EntityLivingBaseAccessor;
|
||||
import net.minecraft.client.MainWindow;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
//#else
|
||||
//$$ import com.replaymod.replay.mixin.EntityOtherPlayerMPAccessor;
|
||||
//$$ import net.minecraft.client.entity.EntityOtherPlayerMP;
|
||||
//$$ import net.minecraft.client.gui.ScaledResolution;
|
||||
//$$ import org.lwjgl.opengl.Display;
|
||||
@@ -685,9 +686,10 @@ public class ReplayHandler {
|
||||
//#else
|
||||
//$$ if (entity instanceof EntityOtherPlayerMP) {
|
||||
//$$ EntityOtherPlayerMP e = (EntityOtherPlayerMP) entity;
|
||||
//$$ e.setPosition(e.otherPlayerMPX, e.otherPlayerMPY, e.otherPlayerMPZ);
|
||||
//$$ e.rotationYaw = (float) e.otherPlayerMPYaw;
|
||||
//$$ e.rotationPitch = (float) e.otherPlayerMPPitch;
|
||||
//$$ EntityOtherPlayerMPAccessor ea = (EntityOtherPlayerMPAccessor) e;
|
||||
//$$ e.setPosition(ea.getOtherPlayerMPX(), ea.getOtherPlayerMPY(), ea.getOtherPlayerMPZ());
|
||||
//$$ e.rotationYaw = (float) ea.getOtherPlayerMPYaw();
|
||||
//$$ e.rotationPitch = (float) ea.getOtherPlayerMPPitch();
|
||||
//$$ }
|
||||
//#endif
|
||||
}
|
||||
|
||||
@@ -701,8 +701,8 @@ public class CameraEntity
|
||||
if (lastHandRendered != player) {
|
||||
lastHandRendered = player;
|
||||
|
||||
//#if MC>=10904
|
||||
FirstPersonRendererAccessor acc = (FirstPersonRendererAccessor) mc.entityRenderer.itemRenderer;
|
||||
//#if MC>=10904
|
||||
acc.setPrevEquippedProgressMainHand(1);
|
||||
acc.setPrevEquippedProgressOffHand(1);
|
||||
acc.setEquippedProgressMainHand(1);
|
||||
@@ -710,10 +710,10 @@ public class CameraEntity
|
||||
acc.setItemStackMainHand(player.getItemStackFromSlot(EntityEquipmentSlot.MAINHAND));
|
||||
acc.setItemStackOffHand(player.getItemStackFromSlot(EntityEquipmentSlot.OFFHAND));
|
||||
//#else
|
||||
//$$ mc.entityRenderer.itemRenderer.prevEquippedProgress = 1;
|
||||
//$$ mc.entityRenderer.itemRenderer.equippedProgress = 1;
|
||||
//$$ mc.entityRenderer.itemRenderer.itemToRender = player.inventory.getCurrentItem();
|
||||
//$$ mc.entityRenderer.itemRenderer.equippedItemSlot = player.inventory.currentItem;
|
||||
//$$ acc.setPrevEquippedProgress(1);
|
||||
//$$ acc.setEquippedProgress(1);
|
||||
//$$ acc.setItemToRender(player.inventory.getCurrentItem());
|
||||
//$$ acc.setEquippedItemSlot(player.inventory.currentItem);
|
||||
//#endif
|
||||
|
||||
|
||||
|
||||
@@ -61,15 +61,15 @@ public class SpectatorCameraController implements CameraController {
|
||||
//#else
|
||||
camera.inventory = viewPlayer.inventory;
|
||||
//#endif
|
||||
//#if MC>=10904
|
||||
EntityPlayerAccessor cameraA = (EntityPlayerAccessor) camera;
|
||||
EntityPlayerAccessor viewPlayerA = (EntityPlayerAccessor) camera;
|
||||
//#if MC>=10904
|
||||
cameraA.setItemStackMainHand(viewPlayerA.getItemStackMainHand());
|
||||
camera.swingingHand = viewPlayer.swingingHand;
|
||||
cameraA.setActiveItemStackUseCount(viewPlayerA.getActiveItemStackUseCount());
|
||||
//#else
|
||||
//$$ camera.itemInUse = viewPlayer.itemInUse;
|
||||
//$$ camera.itemInUseCount = viewPlayer.itemInUseCount;
|
||||
//$$ cameraA.setItemInUse(viewPlayerA.getItemInUse());
|
||||
//$$ cameraA.setItemInUseCount(viewPlayerA.getItemInUseCount());
|
||||
//#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
//#if MC<11300
|
||||
//$$ package com.replaymod.replay.mixin;
|
||||
//$$
|
||||
//$$ import net.minecraft.client.entity.EntityOtherPlayerMP;
|
||||
//$$ import org.spongepowered.asm.mixin.Mixin;
|
||||
//$$ import org.spongepowered.asm.mixin.gen.Accessor;
|
||||
//$$
|
||||
//$$ @Mixin(EntityOtherPlayerMP.class)
|
||||
//$$ public interface EntityOtherPlayerMPAccessor {
|
||||
//$$ @Accessor
|
||||
//$$ double getOtherPlayerMPX();
|
||||
//$$ @Accessor
|
||||
//$$ double getOtherPlayerMPY();
|
||||
//$$ @Accessor
|
||||
//$$ double getOtherPlayerMPZ();
|
||||
//$$ @Accessor
|
||||
//$$ double getOtherPlayerMPYaw();
|
||||
//$$ @Accessor
|
||||
//$$ double getOtherPlayerMPPitch();
|
||||
//$$ }
|
||||
//#endif
|
||||
@@ -12,5 +12,14 @@ public interface EntityPlayerAccessor extends EntityLivingBaseAccessor {
|
||||
ItemStack getItemStackMainHand();
|
||||
@Accessor
|
||||
void setItemStackMainHand(ItemStack value);
|
||||
//#else
|
||||
//$$ @Accessor
|
||||
//$$ ItemStack getItemInUse();
|
||||
//$$ @Accessor
|
||||
//$$ void setItemInUse(ItemStack value);
|
||||
//$$ @Accessor
|
||||
//$$ int getItemInUseCount();
|
||||
//$$ @Accessor
|
||||
//$$ void setItemInUseCount(int value);
|
||||
//#endif
|
||||
}
|
||||
|
||||
@@ -20,5 +20,14 @@ public interface FirstPersonRendererAccessor {
|
||||
void setEquippedProgressOffHand(float value);
|
||||
@Accessor
|
||||
void setPrevEquippedProgressOffHand(float value);
|
||||
//#else
|
||||
//$$ @Accessor
|
||||
//$$ void setItemToRender(ItemStack value);
|
||||
//$$ @Accessor
|
||||
//$$ void setEquippedItemSlot(int value);
|
||||
//$$ @Accessor
|
||||
//$$ void setEquippedProgress(float value);
|
||||
//$$ @Accessor
|
||||
//$$ void setPrevEquippedProgress(float value);
|
||||
//#endif
|
||||
}
|
||||
|
||||
@@ -1,56 +1,48 @@
|
||||
//#if MC>=11300
|
||||
package com.replaymod.replay.mixin;
|
||||
|
||||
import com.replaymod.extras.advancedscreenshots.AdvancedScreenshots;
|
||||
import com.replaymod.replay.ReplayModReplay;
|
||||
import net.minecraft.client.KeyboardListener;
|
||||
import net.minecraft.client.shader.Framebuffer;
|
||||
import net.minecraft.util.ScreenShotHelper;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Redirect;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.function.Consumer;
|
||||
//#if MC>=11300
|
||||
import net.minecraft.client.KeyboardListener;
|
||||
//#else
|
||||
//$$ import net.minecraft.client.Minecraft;
|
||||
//#endif
|
||||
|
||||
//#if MC>=11300
|
||||
@Mixin(KeyboardListener.class)
|
||||
//#else
|
||||
//$$ @Mixin(Minecraft.class)
|
||||
//#endif
|
||||
public abstract class MixinKeyboardListener {
|
||||
@Redirect(
|
||||
@Inject(
|
||||
//#if MC>=11300
|
||||
method = "onKeyEvent",
|
||||
//#else
|
||||
//$$ method = "dispatchKeypresses",
|
||||
//#endif
|
||||
at = @At(
|
||||
value = "INVOKE",
|
||||
//#if MC>=11400
|
||||
//$$ target = "Lnet/minecraft/client/util/ScreenshotUtils;method_1662(Ljava/io/File;Ljava/lang/String;IILnet/minecraft/client/gl/GlFramebuffer;Ljava/util/function/Consumer;)V"
|
||||
//#else
|
||||
//#if MC>=11300
|
||||
target = "Lnet/minecraft/util/ScreenShotHelper;saveScreenshot(Ljava/io/File;IILnet/minecraft/client/shader/Framebuffer;Ljava/util/function/Consumer;)V"
|
||||
//#else
|
||||
//$$ target = "Lnet/minecraft/util/ScreenShotHelper;saveScreenshot(Ljava/io/File;IILnet/minecraft/client/shader/Framebuffer;)Lnet/minecraft/util/text/ITextComponent;"
|
||||
//#endif
|
||||
)
|
||||
//#endif
|
||||
),
|
||||
cancellable = true
|
||||
)
|
||||
private void takeScreenshot(
|
||||
File p_148260_0_,
|
||||
//#if MC>=11400
|
||||
//$$ String something,
|
||||
//#endif
|
||||
int p_148260_1_,
|
||||
int p_148260_2_,
|
||||
Framebuffer p_148260_3_,
|
||||
Consumer<ITextComponent> p_148260_4_
|
||||
) {
|
||||
private void takeScreenshot(CallbackInfo ci) {
|
||||
if (ReplayModReplay.instance.getReplayHandler() != null) {
|
||||
AdvancedScreenshots.take();
|
||||
} else {
|
||||
ScreenShotHelper.saveScreenshot(
|
||||
p_148260_0_,
|
||||
//#if MC>=11400
|
||||
//$$ something,
|
||||
//#endif
|
||||
p_148260_1_,
|
||||
p_148260_2_,
|
||||
p_148260_3_,
|
||||
p_148260_4_
|
||||
);
|
||||
ci.cancel();
|
||||
}
|
||||
}
|
||||
}
|
||||
//#endif
|
||||
|
||||
Reference in New Issue
Block a user