1.13 is dead (followup to 8bc0b0a)
This commit is contained in:
@@ -9,7 +9,7 @@ import org.apache.logging.log4j.Logger;
|
||||
//$$ import com.replaymod.compat.oranges17animations.HideInvisibleEntities;
|
||||
//#endif
|
||||
|
||||
//#if MC<11300
|
||||
//#if MC<11400
|
||||
//$$ import com.replaymod.compat.bettersprinting.DisableBetterSprinting;
|
||||
//#endif
|
||||
|
||||
@@ -29,7 +29,7 @@ public class ReplayModCompat implements Module {
|
||||
//#if MC<11400
|
||||
//$$ new HideInvisibleEntities().register();
|
||||
//#endif
|
||||
//#if MC<11300
|
||||
//#if MC<11400
|
||||
//$$ DisableBetterSprinting.register();
|
||||
//#endif
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//#if MC<11300
|
||||
//#if MC<11400
|
||||
//$$ package com.replaymod.compat.bettersprinting;
|
||||
//$$
|
||||
//$$ import com.replaymod.replay.ReplayModReplay;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//#if MC<11300
|
||||
//#if MC<11400
|
||||
//$$ package com.replaymod.compat.mapwriter.mixin;
|
||||
//$$
|
||||
//$$ import com.replaymod.replay.ReplayModReplay;
|
||||
|
||||
@@ -16,7 +16,7 @@ public abstract class MixinShaderEntityRenderer {
|
||||
//#if MC>=11400
|
||||
@Inject(method = "renderCenter", at = @At("HEAD"))
|
||||
//#else
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
//$$ @Inject(method = "updateCameraAndRender(FJ)V", at = @At("HEAD"))
|
||||
//#else
|
||||
//$$ @Inject(method = "renderWorldPass", at = @At("HEAD"))
|
||||
|
||||
@@ -32,7 +32,7 @@ public abstract class MixinShaderRenderGlobal {
|
||||
Camera viewEntity,
|
||||
//#else
|
||||
//$$ Entity viewEntity,
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
//$$ float partialTicks,
|
||||
//#else
|
||||
//$$ double partialTicks,
|
||||
|
||||
@@ -26,7 +26,7 @@ public abstract class MixinShadersRender {
|
||||
//#if MC>=11400
|
||||
if (PreRenderHandCallback.EVENT.invoker().preRenderHand()) {
|
||||
//#else
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
//$$ if (ForgeHooksClient.renderFirstPersonHand(MCVer.getMinecraft().renderGlobal, partialTicks)) {
|
||||
//#else
|
||||
//$$ if (ForgeHooksClient.renderFirstPersonHand(MCVer.getMinecraft().renderGlobal, partialTicks, renderPass)) {
|
||||
|
||||
@@ -19,7 +19,7 @@ import static com.replaymod.core.ReplayMod.MOD_ID;
|
||||
//$$ import net.minecraftforge.fml.client.registry.ClientRegistry;
|
||||
//#endif
|
||||
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
import com.replaymod.core.events.KeyBindingEventCallback;
|
||||
import com.replaymod.core.events.KeyEventCallback;
|
||||
import com.replaymod.core.events.PreRenderCallback;
|
||||
@@ -83,7 +83,7 @@ public class KeyBindingRegistry extends EventRegistrations {
|
||||
return Collections.unmodifiableMap(keyBindings);
|
||||
}
|
||||
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
{ on(KeyBindingEventCallback.EVENT, this::handleKeyBindings); }
|
||||
{ on(KeyEventCallback.EVENT, (keyCode, scanCode, action, modifiers) -> handleRaw(keyCode, action)); }
|
||||
{ on(PreRenderCallback.EVENT, this::handleRepeatedKeyBindings); }
|
||||
@@ -131,7 +131,7 @@ public class KeyBindingRegistry extends EventRegistrations {
|
||||
}
|
||||
}
|
||||
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
private void handleRaw(int keyCode, int action) {
|
||||
if (action != 0) return;
|
||||
//#else
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.replaymod.core;
|
||||
|
||||
//#if MC<11300
|
||||
//#if MC<11400
|
||||
//$$ import org.apache.logging.log4j.LogManager;
|
||||
//$$ import org.spongepowered.asm.launch.MixinBootstrap;
|
||||
//$$ import org.spongepowered.asm.mixin.Mixins;
|
||||
|
||||
@@ -47,7 +47,7 @@ import net.fabricmc.loader.api.FabricLoader;
|
||||
//$$ import java.util.Queue;
|
||||
//$$ import java.util.concurrent.FutureTask;
|
||||
//$$
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
//$$ import com.replaymod.core.versions.LangResourcePack;
|
||||
//$$ import net.minecraft.resources.IPackFinder;
|
||||
//$$ import net.minecraft.resources.ResourcePackInfo;
|
||||
@@ -65,7 +65,7 @@ import net.fabricmc.loader.api.FabricLoader;
|
||||
//$$ import net.minecraft.client.GameSettings;
|
||||
//#endif
|
||||
//$$
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
//$$ import net.minecraftforge.fml.ModList;
|
||||
//#else
|
||||
//$$ import net.minecraftforge.fml.common.Loader;
|
||||
@@ -101,7 +101,7 @@ import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.TimeoutException;
|
||||
|
||||
//#if FABRIC<=0
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
//$$ @Mod(ReplayMod.MOD_ID)
|
||||
//#else
|
||||
//$$ @Mod(modid = ReplayMod.MOD_ID,
|
||||
@@ -127,7 +127,7 @@ public class ReplayMod implements
|
||||
//#if MC>=11400
|
||||
private static final String minecraftVersion = MinecraftClient.getInstance().getGame().getVersion().getName();
|
||||
//#else
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
//$$ private static final String minecraftVersion = MCPVersion.getMCVersion();
|
||||
//#else
|
||||
//$$ private static final String minecraftVersion = Loader.MC_VERSION;
|
||||
@@ -141,7 +141,7 @@ public class ReplayMod implements
|
||||
|
||||
private static final MinecraftClient mc = MCVer.getMinecraft();
|
||||
|
||||
//#if MC<11300
|
||||
//#if MC<11400
|
||||
//$$ @Deprecated
|
||||
//$$ public static Configuration config;
|
||||
//#endif
|
||||
@@ -153,7 +153,7 @@ public class ReplayMod implements
|
||||
}
|
||||
|
||||
// The instance of your mod that Forge uses.
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
{ instance = this; }
|
||||
//#else
|
||||
//$$ @Instance(MOD_ID)
|
||||
@@ -187,7 +187,7 @@ public class ReplayMod implements
|
||||
//#if MC>=11400
|
||||
// Not needed on fabric, using MixinModResourcePackUtil instead. Could in theory also use it on 1.13 but it already works as is.
|
||||
//#else
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
//$$ DeferredWorkQueue.runLater(() -> MCVer.getMinecraft().getResourcePackList().addPackFinder(new LangResourcePack.Finder()));
|
||||
//#endif
|
||||
//#endif
|
||||
@@ -204,12 +204,12 @@ public class ReplayMod implements
|
||||
modules.add(new ReplayModExtras(this));
|
||||
modules.add(new ReplayModCompat());
|
||||
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
settingsRegistry.register();
|
||||
//#endif
|
||||
}
|
||||
|
||||
//#if MC<=11300
|
||||
//#if MC<=11400
|
||||
//$$ @EventHandler
|
||||
//$$ public void init(FMLPreInitializationEvent event) {
|
||||
//$$ config = new Configuration(event.getSuggestedConfigurationFile());
|
||||
@@ -261,7 +261,7 @@ public class ReplayMod implements
|
||||
}
|
||||
}
|
||||
};
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
mc.getResourcePackContainerManager().addCreator(new ResourcePackCreator() {
|
||||
@Override
|
||||
public <T extends ResourcePackContainer> void registerContainer(Map<String, T> map, ResourcePackContainer.Factory<T> factory) {
|
||||
@@ -299,7 +299,7 @@ public class ReplayMod implements
|
||||
modules.forEach(m -> m.registerKeyBindings(keyBindingRegistry));
|
||||
}
|
||||
//#else
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
//$$ {
|
||||
//$$ FMLJavaModLoadingContext.get().getModEventBus().addListener((FMLCommonSetupEvent event) -> modules.forEach(Module::initCommon));
|
||||
//$$ FMLJavaModLoadingContext.get().getModEventBus().addListener((FMLClientSetupEvent event) -> modules.forEach(Module::initClient));
|
||||
@@ -575,7 +575,7 @@ public class ReplayMod implements
|
||||
.orElseThrow(IllegalStateException::new)
|
||||
.getMetadata().getVersion().toString();
|
||||
//#else
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
//$$ return ModList.get().getModContainerById(MOD_ID).get().getModInfo().getVersion().toString();
|
||||
//#else
|
||||
//$$ return Loader.instance().getIndexedModList().get(MOD_ID).getVersion();
|
||||
|
||||
@@ -19,7 +19,7 @@ import java.nio.charset.StandardCharsets;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
//#else
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
//$$ import net.minecraftforge.common.ForgeConfigSpec;
|
||||
//$$ import net.minecraftforge.fml.ModLoadingContext;
|
||||
//$$ import net.minecraftforge.fml.config.ModConfig;
|
||||
@@ -38,7 +38,7 @@ public class SettingsRegistry {
|
||||
private final Path configFile = getMinecraft().runDirectory.toPath().resolve("config/replaymod.json");
|
||||
//#else
|
||||
//$$ private static final Object NULL_OBJECT = new Object();
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
//$$ private ForgeConfigSpec spec;
|
||||
//$$ private ModConfig config;
|
||||
//#else
|
||||
@@ -90,7 +90,7 @@ public class SettingsRegistry {
|
||||
}
|
||||
}
|
||||
//#else
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
//$$ public void register() {
|
||||
//$$ if (spec == null) {
|
||||
//$$ ForgeConfigSpec.Builder builder = new ForgeConfigSpec.Builder();
|
||||
@@ -143,7 +143,7 @@ public class SettingsRegistry {
|
||||
//#if MC>=11400
|
||||
settings.put(key, key.getDefault());
|
||||
//#else
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
//$$ if (spec != null) {
|
||||
//$$ throw new IllegalStateException("Cannot register more settings are spec has been built.");
|
||||
//$$ }
|
||||
@@ -184,7 +184,7 @@ public class SettingsRegistry {
|
||||
|
||||
public <T> void set(SettingKey<T> key, T value) {
|
||||
//#if MC<11400
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
//$$ if (config != null) {
|
||||
//$$ config.getConfigData().set(key.getCategory() + "." + key.getKey(), value);
|
||||
//$$ }
|
||||
@@ -237,7 +237,7 @@ public class SettingsRegistry {
|
||||
e.printStackTrace();
|
||||
}
|
||||
//#else
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
//$$ if (config != null) {
|
||||
//$$ config.save();
|
||||
//$$ }
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
package com.replaymod.core.events;
|
||||
|
||||
import de.johni0702.minecraft.gui.utils.Event;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
package com.replaymod.core.events;
|
||||
|
||||
import de.johni0702.minecraft.gui.utils.Event;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
package com.replaymod.core.events;
|
||||
|
||||
import de.johni0702.minecraft.gui.utils.Event;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
package com.replaymod.core.events;
|
||||
|
||||
import de.johni0702.minecraft.gui.utils.Event;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
package com.replaymod.core.events;
|
||||
|
||||
import de.johni0702.minecraft.gui.utils.Event;
|
||||
|
||||
@@ -58,7 +58,7 @@ public class MainMenuHandler extends EventRegistrations {
|
||||
int offset = -1 * 24 + 10;
|
||||
button.y += offset;
|
||||
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
//#if MC>=11400
|
||||
if (BUTTON_REALMS.equals(button.getMessage())) {
|
||||
//#else
|
||||
@@ -68,7 +68,7 @@ public class MainMenuHandler extends EventRegistrations {
|
||||
}
|
||||
//#endif
|
||||
}
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
GuiMainMenuAccessor guiA = (GuiMainMenuAccessor) gui;
|
||||
if (realmsOffset != 0 && guiA.getRealmsNotification() instanceof RealmsScreenProxy) {
|
||||
guiA.setRealmsNotification(new RealmsNotificationProxy((RealmsScreenProxy) guiA.getRealmsNotification(), realmsOffset));
|
||||
@@ -77,7 +77,7 @@ public class MainMenuHandler extends EventRegistrations {
|
||||
}
|
||||
}
|
||||
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
private static class RealmsNotificationProxy extends Screen {
|
||||
private final RealmsScreenProxy proxy;
|
||||
private final int offset;
|
||||
|
||||
@@ -12,7 +12,7 @@ import net.minecraft.client.gui.widget.AbstractButtonWidget;
|
||||
//$$ import net.minecraft.client.gui.GuiButton;
|
||||
//#endif
|
||||
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
import net.minecraft.client.gui.Element;
|
||||
//#endif
|
||||
|
||||
@@ -26,7 +26,7 @@ public interface GuiScreenAccessor {
|
||||
//$$ List<GuiButton> getButtons();
|
||||
//#endif
|
||||
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
@Accessor
|
||||
List<Element> getChildren();
|
||||
//#endif
|
||||
|
||||
@@ -12,7 +12,7 @@ import java.util.Queue;
|
||||
//$$ import java.util.concurrent.FutureTask;
|
||||
//#endif
|
||||
|
||||
//#if MC<11300
|
||||
//#if MC<11400
|
||||
//$$ import net.minecraft.client.resources.IResourcePack;
|
||||
//$$ import java.util.List;
|
||||
//#endif
|
||||
@@ -35,7 +35,7 @@ public interface MinecraftAccessor {
|
||||
@Accessor("crashReport")
|
||||
CrashReport getCrashReporter();
|
||||
|
||||
//#if MC<11300
|
||||
//#if MC<11400
|
||||
//$$ @Accessor
|
||||
//$$ List<IResourcePack> getDefaultResourcePacks();
|
||||
//#endif
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
package com.replaymod.core.mixin;
|
||||
|
||||
import com.replaymod.core.events.KeyBindingEventCallback;
|
||||
|
||||
@@ -8,7 +8,7 @@ import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
import com.replaymod.core.events.PostRenderCallback;
|
||||
import com.replaymod.core.events.PreRenderCallback;
|
||||
//#else
|
||||
@@ -33,7 +33,7 @@ public abstract class MixinMinecraft
|
||||
public MixinMinecraft(String string_1) { super(string_1); }
|
||||
//#endif
|
||||
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
@Shadow protected abstract void handleInputEvents();
|
||||
|
||||
@Override
|
||||
|
||||
@@ -16,7 +16,7 @@ import net.minecraft.util.registry.Registry;
|
||||
//$$ import java.util.stream.Stream;
|
||||
//#endif
|
||||
//$$
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
//$$ import net.minecraftforge.fml.ModList;
|
||||
//#else
|
||||
//$$ import net.minecraftforge.fml.common.Loader;
|
||||
@@ -31,7 +31,7 @@ import java.util.stream.Collectors;
|
||||
public class ModCompat {
|
||||
@SuppressWarnings("unchecked")
|
||||
public static Collection<ModInfo> getInstalledNetworkMods() {
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
//#if FABRIC>=1
|
||||
Map<String, ModInfo> modInfoMap = FabricLoader.getInstance().getAllMods().stream()
|
||||
.map(ModContainer::getMetadata)
|
||||
|
||||
@@ -17,7 +17,7 @@ import static com.replaymod.core.versions.MCVer.readString;
|
||||
* @see <a href="https://gist.github.com/Johni0702/2547c463e51f65f312cb">Replay Restrictions Gist</a>
|
||||
*/
|
||||
public class Restrictions {
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
public static final Identifier PLUGIN_CHANNEL = new Identifier("replaymod", "restrict");
|
||||
//#else
|
||||
//$$ public static final String PLUGIN_CHANNEL = "Replay|Restrict";
|
||||
|
||||
@@ -33,7 +33,7 @@ import org.apache.commons.io.FilenameUtils;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
//#else
|
||||
//$$ import org.lwjgl.input.Keyboard;
|
||||
//#endif
|
||||
@@ -209,7 +209,7 @@ public class Utils {
|
||||
}
|
||||
|
||||
public static boolean isCtrlDown() {
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
return Screen.hasControlDown();
|
||||
//#else
|
||||
//$$ return Keyboard.isKeyDown(Keyboard.KEY_LCONTROL) || Keyboard.isKeyDown(Keyboard.KEY_RCONTROL);
|
||||
|
||||
@@ -9,7 +9,7 @@ public class WrappedTimer extends RenderTickCounter {
|
||||
protected final RenderTickCounter wrapped;
|
||||
|
||||
public WrappedTimer(RenderTickCounter wrapped) {
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
super(0, 0);
|
||||
//#else
|
||||
//$$ super(0);
|
||||
@@ -20,13 +20,13 @@ public class WrappedTimer extends RenderTickCounter {
|
||||
|
||||
@Override
|
||||
public void beginRenderTick(
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
long sysClock
|
||||
//#endif
|
||||
) {
|
||||
copy(this, wrapped);
|
||||
wrapped.beginRenderTick(
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
sysClock
|
||||
//#endif
|
||||
);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
package com.replaymod.core.versions;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
|
||||
@@ -50,7 +50,7 @@ import java.util.concurrent.CompletableFuture;
|
||||
//$$ import net.minecraftforge.eventbus.api.IEventBus;
|
||||
//#endif
|
||||
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
import net.minecraft.client.util.Window;
|
||||
import net.minecraft.client.util.InputUtil;
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
@@ -96,7 +96,7 @@ import net.minecraft.client.render.chunk.ChunkRenderTask;
|
||||
//#if FABRIC>=1
|
||||
import net.fabricmc.loader.api.FabricLoader;
|
||||
//#else
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
//$$ import net.minecraftforge.fml.ModList;
|
||||
//#else
|
||||
//$$ import net.minecraftforge.fml.common.Loader;
|
||||
@@ -129,7 +129,7 @@ public class MCVer {
|
||||
//#if FABRIC>=1
|
||||
return FabricLoader.getInstance().isModLoaded(id.toLowerCase());
|
||||
//#else
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
//$$ return ModList.get().isLoaded(id.toLowerCase());
|
||||
//#else
|
||||
//$$ return Loader.isModLoaded(id);
|
||||
@@ -244,7 +244,7 @@ public class MCVer {
|
||||
//$$ }
|
||||
//#else
|
||||
//$$ public static void addButton(GuiScreenEvent.InitGuiEvent event, GuiButton button) {
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
//$$ event.addButton(button);
|
||||
//#else
|
||||
//$$ getButtonList(event).add(button);
|
||||
@@ -252,7 +252,7 @@ public class MCVer {
|
||||
//$$ }
|
||||
//$$
|
||||
//$$ public static void removeButton(GuiScreenEvent.InitGuiEvent event, GuiButton button) {
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
//$$ event.removeButton(button);
|
||||
//#else
|
||||
//$$ getButtonList(event).remove(button);
|
||||
@@ -387,7 +387,7 @@ public class MCVer {
|
||||
//#endif
|
||||
}
|
||||
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
public static Window getWindow(MinecraftClient mc) {
|
||||
//#if MC>=11500
|
||||
//$$ return mc.getWindow();
|
||||
@@ -397,7 +397,7 @@ public class MCVer {
|
||||
}
|
||||
//#endif
|
||||
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
public static Window newScaledResolution(MinecraftClient mc) {
|
||||
return getWindow(mc);
|
||||
}
|
||||
@@ -418,7 +418,7 @@ public class MCVer {
|
||||
//$$ ListenableFuture<?>
|
||||
//#endif
|
||||
setServerResourcePack(File file) {
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
return getMinecraft().getResourcePackDownloader().loadServerPack(file);
|
||||
//#else
|
||||
//$$ ResourcePackRepository repo = getMinecraft().getResourcePackRepository();
|
||||
@@ -574,19 +574,19 @@ public class MCVer {
|
||||
}
|
||||
//#endif
|
||||
acc.getButtons().add(button);
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
acc.getChildren().add(button);
|
||||
//#endif
|
||||
}
|
||||
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
public static void processKeyBinds() {
|
||||
((MinecraftMethodAccessor) getMinecraft()).replayModProcessKeyBinds();
|
||||
}
|
||||
//#endif
|
||||
|
||||
public interface MinecraftMethodAccessor {
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
void replayModProcessKeyBinds();
|
||||
//#else
|
||||
//#if MC>=10904
|
||||
@@ -608,7 +608,7 @@ public class MCVer {
|
||||
//#endif
|
||||
|
||||
public static long milliTime() {
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
return SystemUtil.getMeasuringTimeMs();
|
||||
//#else
|
||||
//$$ return Minecraft.getSystemTime();
|
||||
@@ -619,7 +619,7 @@ public class MCVer {
|
||||
//#if MC>=11500
|
||||
//$$ getMinecraft().getTextureManager().bindTexture(texture);
|
||||
//#else
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
getMinecraft().getTextureManager().bindTexture(texture);
|
||||
//#else
|
||||
//$$ getMinecraft().renderEngine.bindTexture(texture);
|
||||
@@ -647,7 +647,7 @@ public class MCVer {
|
||||
//#endif
|
||||
|
||||
public static void openFile(File file) {
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
SystemUtil.getOperatingSystem().open(file);
|
||||
//#else
|
||||
//$$ String path = file.getAbsolutePath();
|
||||
@@ -677,7 +677,7 @@ public class MCVer {
|
||||
}
|
||||
|
||||
public static void openURL(URI url) {
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
//#if MC>=11400
|
||||
SystemUtil.getOperatingSystem().open(url);
|
||||
//#else
|
||||
@@ -692,7 +692,7 @@ public class MCVer {
|
||||
//#endif
|
||||
}
|
||||
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
private static Boolean hasOptifine;
|
||||
public static boolean hasOptifine() {
|
||||
if (hasOptifine == null) {
|
||||
@@ -729,7 +729,7 @@ public class MCVer {
|
||||
//#endif
|
||||
|
||||
public static abstract class Keyboard {
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
public static final int KEY_LCONTROL = GLFW.GLFW_KEY_LEFT_CONTROL;
|
||||
public static final int KEY_LSHIFT = GLFW.GLFW_KEY_LEFT_SHIFT;
|
||||
public static final int KEY_ESCAPE = GLFW.GLFW_KEY_ESCAPE;
|
||||
@@ -820,7 +820,7 @@ public class MCVer {
|
||||
//#if MC>=11400
|
||||
return InputUtil.isKeyPressed(getMinecraft().window.getHandle(), keyCode);
|
||||
//#else
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
//$$ return InputMappings.isKeyDown(keyCode);
|
||||
//#else
|
||||
//$$ return org.lwjgl.input.Keyboard.isKeyDown(keyCode);
|
||||
@@ -829,7 +829,7 @@ public class MCVer {
|
||||
//#endif
|
||||
}
|
||||
|
||||
//#if MC<11300
|
||||
//#if MC<11400
|
||||
//$$ public static int getEventKey() {
|
||||
//$$ return org.lwjgl.input.Keyboard.getEventKey();
|
||||
//$$ }
|
||||
|
||||
@@ -27,7 +27,7 @@ public class FullBrightness extends EventRegistrations implements Extra {
|
||||
|
||||
private MinecraftClient mc;
|
||||
private boolean active;
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
private double originalGamma;
|
||||
//#else
|
||||
//$$ private float originalGamma;
|
||||
@@ -43,7 +43,7 @@ public class FullBrightness extends EventRegistrations implements Extra {
|
||||
public void run() {
|
||||
active = !active;
|
||||
// need to tick once to update lightmap when replay is paused
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
mod.getMinecraft().gameRenderer.tick();
|
||||
//#else
|
||||
//$$ mod.getMinecraft().entityRenderer.updateRenderer();
|
||||
|
||||
@@ -22,7 +22,7 @@ import de.johni0702.minecraft.gui.utils.lwjgl.Dimension;
|
||||
import de.johni0702.minecraft.gui.utils.lwjgl.ReadableDimension;
|
||||
import net.minecraft.client.resource.language.I18n;
|
||||
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
//#else
|
||||
//$$ import org.lwjgl.input.Keyboard;
|
||||
//#endif
|
||||
@@ -82,7 +82,7 @@ public class HotkeyButtons extends EventRegistrations implements Extra {
|
||||
// There doesn't seem to be an KeyBindingUpdate event, so we'll just update it every time
|
||||
String keyName = "???";
|
||||
try {
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
keyName = keyBinding.getLocalizedName();
|
||||
//#else
|
||||
//$$ keyName = Keyboard.getKeyName(keyBinding.getKeyCode());
|
||||
|
||||
@@ -11,7 +11,7 @@ import lombok.RequiredArgsConstructor;
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
import net.minecraft.util.crash.CrashReport;
|
||||
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
import com.replaymod.render.mixin.MainWindowAccessor;
|
||||
import static com.replaymod.core.versions.MCVer.getWindow;
|
||||
//#endif
|
||||
@@ -33,7 +33,7 @@ public class ScreenshotRenderer implements RenderInfo {
|
||||
|
||||
public boolean renderScreenshot() throws Throwable {
|
||||
try {
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
int displayWidthBefore = getWindow(mc).getFramebufferWidth();
|
||||
int displayHeightBefore = getWindow(mc).getFramebufferHeight();
|
||||
//#else
|
||||
@@ -61,7 +61,7 @@ public class ScreenshotRenderer implements RenderInfo {
|
||||
//#endif
|
||||
|
||||
mc.options.hudHidden = hideGUIBefore;
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
//noinspection ConstantConditions
|
||||
MainWindowAccessor acc = (MainWindowAccessor) (Object) getWindow(mc);
|
||||
acc.setFramebufferWidth(displayWidthBefore);
|
||||
|
||||
@@ -19,14 +19,14 @@ import java.util.stream.Collectors;
|
||||
//#else
|
||||
//$$ import net.minecraftforge.client.event.RenderHandEvent;
|
||||
//$$
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
//#else
|
||||
//$$ import org.lwjgl.input.Keyboard;
|
||||
//#endif
|
||||
//$$
|
||||
//#if MC>=10800
|
||||
//$$ import com.google.common.base.Predicate;
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
//$$ import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||
//#else
|
||||
//$$ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
|
||||
@@ -115,7 +115,7 @@ public class PlayerOverviewGui extends GuiScreen implements Closeable {
|
||||
}
|
||||
}.setSize(16, 16),
|
||||
new GuiLabel().setText(
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
p.getName().asFormattedString()
|
||||
//#else
|
||||
//#if MC>=10800
|
||||
@@ -180,7 +180,7 @@ public class PlayerOverviewGui extends GuiScreen implements Closeable {
|
||||
public int compare(PlayerEntity o1, PlayerEntity o2) {
|
||||
if (isSpectator(o1) && !isSpectator(o2)) return 1;
|
||||
if (isSpectator(o2) && !isSpectator(o1)) return -1;
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
return o1.getName().asFormattedString().compareToIgnoreCase(o2.getName().asFormattedString());
|
||||
//#else
|
||||
//#if MC>=10800
|
||||
|
||||
@@ -26,7 +26,7 @@ import lombok.RequiredArgsConstructor;
|
||||
import net.minecraft.client.resource.language.I18n;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
import net.minecraft.util.SystemUtil;
|
||||
//#else
|
||||
//$$ import org.lwjgl.Sys;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//#if MC<11300
|
||||
//#if MC<11400
|
||||
//$$ package com.replaymod.online;
|
||||
//$$
|
||||
//$$ import com.replaymod.online.api.ApiClient;
|
||||
|
||||
@@ -19,7 +19,7 @@ import de.johni0702.minecraft.gui.utils.EventRegistrations;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
//#if MC<11300
|
||||
//#if MC<11400
|
||||
//$$ import net.minecraftforge.common.config.Configuration;
|
||||
//#endif
|
||||
|
||||
@@ -99,7 +99,7 @@ public class ReplayModOnline extends EventRegistrations implements Module {
|
||||
* Always returns null on 1.13+ where the Configuration system has been removed.
|
||||
*/
|
||||
private AuthData loadOldAuthData() {
|
||||
//#if MC<11300
|
||||
//#if MC<11400
|
||||
//$$ Path path = MCVer.getMinecraft().mcDataDir.toPath().resolve("config/replaymod-online.cfg");
|
||||
//$$ Configuration config = new Configuration(path.toFile());
|
||||
//$$ ConfigurationAuthData authData = new ConfigurationAuthData(config);
|
||||
|
||||
@@ -18,7 +18,7 @@ import de.johni0702.minecraft.gui.utils.Colors;
|
||||
import de.johni0702.minecraft.gui.utils.lwjgl.ReadablePoint;
|
||||
import net.minecraft.client.resource.language.I18n;
|
||||
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
import com.replaymod.core.versions.MCVer.Keyboard;
|
||||
//#else
|
||||
//$$ import org.lwjgl.input.Keyboard;
|
||||
|
||||
@@ -39,7 +39,7 @@ import net.minecraft.util.crash.CrashException;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
//#else
|
||||
//$$ import net.minecraft.client.settings.GameSettings;
|
||||
//#endif
|
||||
@@ -164,7 +164,7 @@ public class GuiUploadReplay extends GuiScreen {
|
||||
// Get name of key used for thumbnail creation
|
||||
KeyBindingRegistry registry = mod.getCore().getKeyBindingRegistry();
|
||||
KeyBinding keyBinding = registry.getKeyBindings().get("replaymod.input.thumbnail");
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
String keyName = keyBinding == null ? "???" : keyBinding.getLocalizedName();
|
||||
//#else
|
||||
//$$ String keyName = keyBinding == null ? "???" : GameSettings.getKeyDisplayString(keyBinding.getKeyCode());
|
||||
|
||||
@@ -86,7 +86,7 @@ public class GuiHandler extends EventRegistrations {
|
||||
}).setSize(73, 20).setI18nLabel("replaymod.gui.upload").setDisabled());
|
||||
}
|
||||
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
private void onButton(InjectedButton button) {
|
||||
net.minecraft.client.gui.screen.Screen guiScreen = button.guiScreen;
|
||||
//#else
|
||||
|
||||
@@ -8,7 +8,7 @@ import net.minecraft.client.render.RenderTickCounter;
|
||||
* Wrapper around the current timer that prevents the timer from advancing by itself.
|
||||
*/
|
||||
public class ReplayTimer extends WrappedTimer {
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
private final RenderTickCounter state = new RenderTickCounter(0, 0);
|
||||
//#else
|
||||
//$$ private final Timer state = new Timer(0);
|
||||
@@ -25,13 +25,13 @@ public class ReplayTimer extends WrappedTimer {
|
||||
//#else
|
||||
//$$ public void updateTimer(
|
||||
//#endif
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
long sysClock
|
||||
//#endif
|
||||
) {
|
||||
copy(this, state); // Save our current state
|
||||
wrapped.beginRenderTick(
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
sysClock
|
||||
//#endif
|
||||
); // Update current state
|
||||
|
||||
@@ -21,7 +21,7 @@ import net.fabricmc.fabric.api.network.ClientSidePacketRegistry;
|
||||
//$$ import net.minecraftforge.fml.network.NetworkRegistry;
|
||||
//#endif
|
||||
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
//#else
|
||||
//$$ import io.netty.channel.ChannelDuplexHandler;
|
||||
//$$ import io.netty.channel.ChannelHandler;
|
||||
@@ -30,7 +30,7 @@ import net.fabricmc.fabric.api.network.ClientSidePacketRegistry;
|
||||
public class ReplayModRecording implements Module {
|
||||
|
||||
private static final Logger LOGGER = LogManager.getLogger();
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
private static final AttributeKey<Void> ATTR_CHECKED = AttributeKey.newInstance("ReplayModRecording_checked");
|
||||
//#endif
|
||||
|
||||
@@ -70,7 +70,7 @@ public class ReplayModRecording implements Module {
|
||||
//#if FABRIC>=1
|
||||
ClientSidePacketRegistry.INSTANCE.register(Restrictions.PLUGIN_CHANNEL, (packetContext, packetByteBuf) -> {});
|
||||
//#else
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
//$$ NetworkRegistry.newEventChannel(Restrictions.PLUGIN_CHANNEL, () -> "0", any -> true, any -> true);
|
||||
//#else
|
||||
//$$ NetworkRegistry.INSTANCE.newChannel(Restrictions.PLUGIN_CHANNEL, new RestrictionsChannelHandler());
|
||||
@@ -78,7 +78,7 @@ public class ReplayModRecording implements Module {
|
||||
//#endif
|
||||
}
|
||||
|
||||
//#if MC<11300
|
||||
//#if MC<11400
|
||||
//$$ @ChannelHandler.Sharable
|
||||
//$$ private static class RestrictionsChannelHandler extends ChannelDuplexHandler {}
|
||||
//#endif
|
||||
@@ -86,7 +86,7 @@ public class ReplayModRecording implements Module {
|
||||
public void initiateRecording(ClientConnection networkManager) {
|
||||
Channel channel = ((NetworkManagerAccessor) networkManager).getChannel();
|
||||
if (channel.pipeline().get("ReplayModReplay_replaySender") != null) return;
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
if (channel.hasAttr(ATTR_CHECKED)) return;
|
||||
channel.attr(ATTR_CHECKED).set(null);
|
||||
//#endif
|
||||
|
||||
@@ -18,7 +18,7 @@ import net.minecraft.client.MinecraftClient;
|
||||
import net.minecraft.network.ClientConnection;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
import net.minecraft.world.dimension.DimensionType;
|
||||
//#endif
|
||||
|
||||
@@ -60,7 +60,7 @@ public class ConnectionEventHandler {
|
||||
boolean local = networkManager.isLocal();
|
||||
if (local) {
|
||||
//#if MC>=10800
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
if (mc.getServer().getWorld(DimensionType.OVERWORLD).getGeneratorType() == LevelGeneratorType.DEBUG_ALL_BLOCK_STATES) {
|
||||
//#else
|
||||
//$$ if (mc.getIntegratedServer().getEntityWorld().getWorldType() == WorldType.DEBUG_ALL_BLOCK_STATES) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//#if MC<11300
|
||||
//#if MC<11400
|
||||
//$$ package com.replaymod.recording.handler;
|
||||
//$$
|
||||
//$$ import io.netty.channel.ChannelHandlerContext;
|
||||
|
||||
@@ -93,7 +93,7 @@ public class RecordingEventHandler extends EventRegistrations {
|
||||
}
|
||||
}
|
||||
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
public void onPacket(Packet<?> packet) {
|
||||
packetListener.save(packet);
|
||||
}
|
||||
@@ -375,7 +375,7 @@ public class RecordingEventHandler extends EventRegistrations {
|
||||
//$$ try {
|
||||
//#if MC>=11100
|
||||
//#if MC>=11200
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
//$$ ItemStack stack = event.getStack();
|
||||
//$$ packetListener.save(new SCollectItemPacket(
|
||||
//$$ event.getOriginalEntity().getEntityId(),
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
package com.replaymod.recording.mixin;
|
||||
|
||||
import com.replaymod.replay.InputReplayTimer;
|
||||
|
||||
@@ -9,7 +9,7 @@ import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
import com.replaymod.core.versions.MCVer;
|
||||
import com.replaymod.recording.handler.RecordingEventHandler.RecordingEventSender;
|
||||
import net.minecraft.network.Packet;
|
||||
@@ -29,7 +29,7 @@ public abstract class MixinNetHandlerLoginClient {
|
||||
//$$ private NetworkManager field_147393_d;
|
||||
//#endif
|
||||
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
@Inject(method = "onQueryRequest", at=@At("HEAD"))
|
||||
private void earlyInitiateRecording(LoginQueryRequestS2CPacket packet, CallbackInfo ci) {
|
||||
initiateRecording(packet);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//#if MC<11300
|
||||
//#if MC<11400
|
||||
//$$ package com.replaymod.recording.mixin;
|
||||
//$$
|
||||
//$$ import com.replaymod.recording.handler.FMLHandshakeFilter;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.replaymod.recording.mixin;
|
||||
|
||||
//#if MC>=10904 && MC<11300
|
||||
//#if MC>=10904 && MC<11400
|
||||
//$$ import com.replaymod.recording.handler.RecordingEventHandler;
|
||||
//$$ import net.minecraft.client.Minecraft;
|
||||
//$$ import net.minecraft.client.multiplayer.PlayerControllerMP;
|
||||
|
||||
@@ -24,7 +24,7 @@ import net.minecraft.world.dimension.DimensionType;
|
||||
import java.util.function.BiFunction;
|
||||
//#else
|
||||
//$$ import net.minecraft.world.storage.ISaveHandler;
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
//$$ import net.minecraft.world.dimension.Dimension;
|
||||
//$$ import net.minecraft.world.storage.WorldSavedDataStorage;
|
||||
//#else
|
||||
@@ -44,18 +44,18 @@ public abstract class MixinWorldClient extends World implements RecordingEventHa
|
||||
}
|
||||
//#else
|
||||
//$$ protected MixinWorldClient(ISaveHandler saveHandlerIn,
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
//$$ WorldSavedDataStorage mapStorage,
|
||||
//#endif
|
||||
//$$ WorldInfo info,
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
//$$ Dimension providerIn,
|
||||
//#else
|
||||
//$$ WorldProvider providerIn,
|
||||
//#endif
|
||||
//$$ Profiler profilerIn, boolean client) {
|
||||
//$$ super(saveHandlerIn,
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
//$$ mapStorage,
|
||||
//#endif
|
||||
//$$ info, providerIn, profilerIn, client);
|
||||
|
||||
@@ -38,7 +38,7 @@ import net.minecraft.util.crash.CrashReport;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
import net.minecraft.client.network.packet.LoginSuccessS2CPacket;
|
||||
//#else
|
||||
//$$ import net.minecraftforge.fml.common.network.internal.FMLProxyPacket;
|
||||
@@ -95,7 +95,7 @@ public class PacketListener extends ChannelInboundHandlerAdapter {
|
||||
private long lastSentPacket;
|
||||
private long timePassedWhilePaused;
|
||||
private volatile boolean serverWasPaused;
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
private NetworkState connectionState = NetworkState.LOGIN;
|
||||
//#else
|
||||
//$$ private EnumConnectionState connectionState = EnumConnectionState.PLAY;
|
||||
@@ -191,7 +191,7 @@ public class PacketListener extends ChannelInboundHandlerAdapter {
|
||||
}
|
||||
});
|
||||
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
if (packet instanceof LoginSuccessS2CPacket) {
|
||||
connectionState = NetworkState.PLAY;
|
||||
}
|
||||
@@ -286,7 +286,7 @@ public class PacketListener extends ChannelInboundHandlerAdapter {
|
||||
//$$ }
|
||||
//#endif
|
||||
|
||||
//#if MC<11300
|
||||
//#if MC<11400
|
||||
//$$ if (packet instanceof FMLProxyPacket) {
|
||||
//$$ // This packet requires special handling
|
||||
//#if MC>=10800
|
||||
|
||||
@@ -15,7 +15,7 @@ import java.util.Optional;
|
||||
|
||||
import static com.replaymod.render.ReplayModRender.LOGGER;
|
||||
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
import org.apache.maven.artifact.versioning.ComparableVersion;
|
||||
//#else
|
||||
//#if MC>=10800
|
||||
|
||||
@@ -148,7 +148,7 @@ public class BlendMeshBuilder
|
||||
}
|
||||
|
||||
public static DMesh addBufferToMesh(ByteBuffer buffer, int mode, VertexFormat vertexFormat, DMesh mesh, ReadableVector3f vertOffset) {
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
int vertexCount = buffer.remaining() / vertexFormat.getVertexSize();
|
||||
//#else
|
||||
//$$ int vertexCount = buffer.remaining() / vertexFormat.getNextOffset();
|
||||
@@ -222,7 +222,7 @@ public class BlendMeshBuilder
|
||||
List<DMesh.Vertex> vertices = new ArrayList<>(vertexCount);
|
||||
List<Vector2f> uvs = new ArrayList<>(vertexCount);
|
||||
List<Integer> colors = new ArrayList<>(vertexCount);
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
int step = vertexFormat.getVertexSize();
|
||||
//#else
|
||||
//$$ int step = vertexFormat.getNextOffset();
|
||||
|
||||
@@ -42,7 +42,7 @@ public class Util {
|
||||
private static FloatBuffer floatBuffer = GlAllocationUtils.allocateFloatBuffer(16);
|
||||
public static Matrix4f getGlMatrix(int matrix) {
|
||||
floatBuffer.clear();
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
GL11.glGetFloatv(matrix, floatBuffer);
|
||||
//#else
|
||||
//$$ GL11.glGetFloat(matrix, floatBuffer);
|
||||
@@ -184,7 +184,7 @@ public class Util {
|
||||
|
||||
public static String getTileEntityId(BlockEntity tileEntity) {
|
||||
CompoundTag nbt = new CompoundTag();
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
tileEntity.toTag(nbt);
|
||||
//#else
|
||||
//$$ tileEntity.writeToNBT(nbt);
|
||||
|
||||
@@ -55,7 +55,7 @@ public class EntityExporter implements Exporter {
|
||||
if (entityObject == null) {
|
||||
entityObject = new DObject(DObject.Type.OB_EMPTY);
|
||||
entityObject.setParent(renderState.peekObject());
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
entityObject.id.name = entity.getName().getString();
|
||||
//#else
|
||||
//$$ entityObject.id.name = entity.getName();
|
||||
|
||||
@@ -16,7 +16,7 @@ import net.minecraft.util.math.Vec3i;
|
||||
//$$ import net.minecraftforge.client.model.pipeline.LightUtil;
|
||||
//#endif
|
||||
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
import net.minecraft.client.render.model.BakedQuad;
|
||||
import net.minecraft.client.render.model.BakedModel;
|
||||
//#else
|
||||
@@ -69,7 +69,7 @@ public class ItemExporter implements Exporter {
|
||||
}
|
||||
if (object == null) {
|
||||
object = new ItemBasedDObject(renderItem, model, stack);
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
object.id.name = stack.getName().getString();
|
||||
//#else
|
||||
//$$ object.id.name = stack.getDisplayName();
|
||||
@@ -92,7 +92,7 @@ public class ItemExporter implements Exporter {
|
||||
//$$ builder.setVertexFormat(DefaultVertexFormats.ITEM);
|
||||
//#endif
|
||||
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
for (Direction face : Direction.values()) {
|
||||
renderQuads(renderItem, builder, model.getQuads(null, face, new Random()), stack);
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ import com.replaymod.render.blend.data.DMesh;
|
||||
import com.replaymod.render.blend.data.DObject;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
import net.minecraft.client.model.Box;
|
||||
import net.minecraft.client.model.Cuboid;
|
||||
//#else
|
||||
|
||||
@@ -8,7 +8,7 @@ import org.spongepowered.asm.mixin.gen.Accessor;
|
||||
//#if MC>=11400
|
||||
@Mixin(targets = "net.minecraft.client.render.WorldRenderer$ChunkInfo")
|
||||
//#else
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
//$$ @Mixin(targets = "net/minecraft/client/renderer/WorldRenderer$ContainerLocalRenderInformation")
|
||||
//#else
|
||||
//$$ @Mixin(targets = "net/minecraft/client/renderer/RenderGlobal$ContainerLocalRenderInformation")
|
||||
|
||||
@@ -10,7 +10,7 @@ import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
import net.minecraft.client.render.chunk.ChunkRenderTask;
|
||||
//#else
|
||||
//$$ import net.minecraft.client.renderer.chunk.ChunkCompileTaskGenerator;
|
||||
@@ -20,7 +20,7 @@ import net.minecraft.client.render.chunk.ChunkRenderTask;
|
||||
public abstract class MixinChunkRenderWorker {
|
||||
|
||||
@Inject(method = "runTask", at = @At("RETURN"))
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
public void afterChunkUpdate(ChunkRenderTask task, CallbackInfo ci) {
|
||||
BlendState blendState = BlendState.getState();
|
||||
if (blendState != null) {
|
||||
|
||||
@@ -9,7 +9,7 @@ import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
import net.minecraft.client.model.Cuboid;
|
||||
//#else
|
||||
//$$ import net.minecraft.client.model.ModelRenderer;
|
||||
|
||||
@@ -16,13 +16,13 @@ import net.minecraft.client.render.Camera;
|
||||
//$$ import net.minecraft.entity.Entity;
|
||||
//#endif
|
||||
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
import net.minecraft.client.render.WorldRenderer;
|
||||
//#else
|
||||
//$$ import net.minecraft.client.renderer.RenderGlobal;
|
||||
//#endif
|
||||
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
@Mixin(WorldRenderer.class)
|
||||
//#else
|
||||
//$$ @Mixin(RenderGlobal.class)
|
||||
@@ -74,7 +74,7 @@ public abstract class MixinRenderGlobal {
|
||||
|
||||
@Inject(method = "renderEntities", at = @At(
|
||||
value = "INVOKE",
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
target = "Lnet/minecraft/client/render/block/entity/BlockEntityRenderDispatcher;render(Lnet/minecraft/block/entity/BlockEntity;FI)V"
|
||||
//#else
|
||||
//$$ target = "Lnet/minecraft/client/renderer/tileentity/TileEntityRendererDispatcher;renderTileEntity(Lnet/minecraft/tileentity/TileEntity;FI)V"
|
||||
@@ -95,7 +95,7 @@ public abstract class MixinRenderGlobal {
|
||||
|
||||
@Inject(method = "renderEntities", at = @At(
|
||||
value = "INVOKE",
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
target = "Lnet/minecraft/client/render/block/entity/BlockEntityRenderDispatcher;render(Lnet/minecraft/block/entity/BlockEntity;FI)V",
|
||||
//#else
|
||||
//$$ target = "Lnet/minecraft/client/renderer/tileentity/TileEntityRendererDispatcher;renderTileEntity(Lnet/minecraft/tileentity/TileEntity;FI)V",
|
||||
|
||||
@@ -9,7 +9,7 @@ import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
import net.minecraft.client.render.item.ItemRenderer;
|
||||
import net.minecraft.client.render.model.BakedModel;
|
||||
//#else
|
||||
@@ -22,7 +22,7 @@ import net.minecraft.client.render.model.BakedModel;
|
||||
//#endif
|
||||
//#endif
|
||||
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
@Mixin(ItemRenderer.class)
|
||||
//#else
|
||||
//$$ @Mixin(RenderItem.class)
|
||||
@@ -31,7 +31,7 @@ public abstract class MixinRenderItem {
|
||||
//#if MC>=11400
|
||||
@Inject(method = "renderItemModel", at = @At("HEAD"))
|
||||
//#else
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
//$$ @Inject(method = "renderModel(Lnet/minecraft/client/renderer/model/IBakedModel;Lnet/minecraft/item/ItemStack;)V",
|
||||
//$$ at = @At("HEAD"))
|
||||
//#else
|
||||
|
||||
@@ -30,7 +30,7 @@ public abstract class MixinRenderManager {
|
||||
//#if MC>=11400
|
||||
method = "render(Lnet/minecraft/entity/Entity;DDDFFZ)V",
|
||||
//#else
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
//$$ method = "renderEntity",
|
||||
//#else
|
||||
//$$ method = "doRenderEntity",
|
||||
@@ -65,7 +65,7 @@ public abstract class MixinRenderManager {
|
||||
//#if MC>=11400
|
||||
method = "render(Lnet/minecraft/entity/Entity;DDDFFZ)V",
|
||||
//#else
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
//$$ method = "renderEntity",
|
||||
//#else
|
||||
//$$ method = "doRenderEntity",
|
||||
|
||||
@@ -14,7 +14,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
@Mixin(BlockEntityRenderDispatcher.class)
|
||||
public abstract class MixinTileEntityRendererDispatcher {
|
||||
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
//#if MC>=11400
|
||||
@Inject(method = "renderEntity(Lnet/minecraft/block/entity/BlockEntity;DDDFIZ)V",
|
||||
at = @At("HEAD"))
|
||||
@@ -42,7 +42,7 @@ public abstract class MixinTileEntityRendererDispatcher {
|
||||
}
|
||||
}
|
||||
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
//#if MC>=11400
|
||||
@Inject(method = "renderEntity(Lnet/minecraft/block/entity/BlockEntity;DDDFIZ)V",
|
||||
at = @At("RETURN"))
|
||||
|
||||
@@ -16,7 +16,7 @@ import org.lwjgl.opengl.GL12;
|
||||
import java.io.IOException;
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
import com.replaymod.render.mixin.MainWindowAccessor;
|
||||
import static com.replaymod.core.versions.MCVer.getWindow;
|
||||
//#endif
|
||||
@@ -116,7 +116,7 @@ public abstract class OpenGlFrameCapturer<F extends Frame, D extends CaptureData
|
||||
}
|
||||
|
||||
protected void resize(int width, int height) {
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
GlFramebuffer fb = mc.getFramebuffer();
|
||||
if (fb.viewWidth != width || fb.viewHeight != height) {
|
||||
fb.resize(width, height
|
||||
|
||||
@@ -21,7 +21,7 @@ import net.minecraft.client.texture.NativeImageBackedTexture;
|
||||
import net.minecraft.client.resource.language.I18n;
|
||||
import net.minecraft.util.Identifier;
|
||||
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
import net.minecraft.client.texture.NativeImage;
|
||||
//#endif
|
||||
|
||||
@@ -232,7 +232,7 @@ public class GuiVideoRenderer extends GuiScreen implements Tickable {
|
||||
final int videoHeight = videoSize.getHeight();
|
||||
|
||||
if (previewTexture == null) {
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
previewTexture = new NativeImageBackedTexture(videoWidth, videoHeight, true);
|
||||
//#else
|
||||
//$$ previewTexture = new DynamicTexture(videoWidth, videoHeight);
|
||||
@@ -270,7 +270,7 @@ public class GuiVideoRenderer extends GuiScreen implements Tickable {
|
||||
ByteBuffer buffer = frame.getByteBuffer();
|
||||
buffer.mark();
|
||||
synchronized (this) {
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
NativeImage data = previewTexture.getImage();
|
||||
assert data != null;
|
||||
//#else
|
||||
@@ -287,7 +287,7 @@ public class GuiVideoRenderer extends GuiScreen implements Tickable {
|
||||
int g = buffer.get() & 0xff;
|
||||
int r = buffer.get() & 0xff;
|
||||
buffer.get(); // alpha
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
int value = 0xff << 24 | b << 16 | g << 8 | r;
|
||||
data.setPixelRGBA(x, y, value); // actually takes ABGR, not RGBA
|
||||
//#else
|
||||
|
||||
@@ -25,13 +25,13 @@ import static com.replaymod.core.versions.MCVer.*;
|
||||
|
||||
public class ChunkLoadingRenderGlobal {
|
||||
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
private final WorldRenderer hooked;
|
||||
//#else
|
||||
//$$ private final RenderGlobal hooked;
|
||||
//#endif
|
||||
private ChunkBatcher renderDispatcher;
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
private JailingQueue<ChunkRenderTask> workerJailingQueue;
|
||||
//#else
|
||||
//$$ private JailingQueue<ChunkCompileTaskGenerator> workerJailingQueue;
|
||||
@@ -41,7 +41,7 @@ public class ChunkLoadingRenderGlobal {
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public ChunkLoadingRenderGlobal(
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
WorldRenderer renderGlobal
|
||||
//#else
|
||||
//$$ RenderGlobal renderGlobal
|
||||
@@ -100,7 +100,7 @@ public class ChunkLoadingRenderGlobal {
|
||||
renderDispatcherAcc.setQueueChunkUpdates(queueChunkUpdates);
|
||||
|
||||
try {
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
Field hookField = WorldRenderer.class.getField("replayModRender_hook");
|
||||
//#else
|
||||
//$$ Field hookField = RenderGlobal.class.getField("replayModRender_hook");
|
||||
@@ -147,7 +147,7 @@ public class ChunkLoadingRenderGlobal {
|
||||
workerJailingQueue.freeAll();
|
||||
|
||||
try {
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
Field hookField = WorldRenderer.class.getField("replayModRender_hook");
|
||||
//#else
|
||||
//$$ Field hookField = RenderGlobal.class.getField("replayModRender_hook");
|
||||
|
||||
@@ -16,7 +16,7 @@ import net.minecraft.client.MinecraftClient;
|
||||
import com.replaymod.core.events.PostRenderCallback;
|
||||
import com.replaymod.core.events.PreRenderCallback;
|
||||
//#else
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
//$$ import net.minecraftforge.fml.hooks.BasicEventHooks;
|
||||
//#else
|
||||
//$$ import net.minecraftforge.fml.common.FMLCommonHandler;
|
||||
@@ -55,7 +55,7 @@ public class EntityRendererHandler implements WorldRenderer {
|
||||
//#if MC>=11400
|
||||
PreRenderCallback.EVENT.invoker().preRender();
|
||||
//#else
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
//$$ BasicEventHooks.onRenderTickStart(partialTicks);
|
||||
//#else
|
||||
//$$ FMLCommonHandler.instance().onRenderTickStart(partialTicks);
|
||||
@@ -75,7 +75,7 @@ public class EntityRendererHandler implements WorldRenderer {
|
||||
//#if MC>=11400
|
||||
PostRenderCallback.EVENT.invoker().postRender();
|
||||
//#else
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
//$$ BasicEventHooks.onRenderTickEnd(partialTicks);
|
||||
//#else
|
||||
//$$ FMLCommonHandler.instance().onRenderTickEnd(partialTicks);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
package com.replaymod.render.mixin;
|
||||
|
||||
import net.minecraft.client.util.Window;
|
||||
|
||||
@@ -52,7 +52,7 @@ public abstract class MixinCamera {
|
||||
boolean inverseView,
|
||||
//#endif
|
||||
float partialTicks,
|
||||
//#if MC<11300
|
||||
//#if MC<11400
|
||||
//$$ int renderPass,
|
||||
//#endif
|
||||
CallbackInfo ci
|
||||
@@ -110,7 +110,7 @@ public abstract class MixinCamera {
|
||||
boolean inverseView,
|
||||
//#endif
|
||||
float partialTicks,
|
||||
//#if MC<11300
|
||||
//#if MC<11400
|
||||
//$$ int renderPass,
|
||||
//#endif
|
||||
CallbackInfo ci
|
||||
|
||||
@@ -23,7 +23,7 @@ import net.minecraft.client.render.Camera;
|
||||
import net.minecraft.util.hit.HitResult;
|
||||
//#endif
|
||||
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
import net.minecraft.client.options.GameOptions;
|
||||
import net.minecraft.client.render.GameRenderer;
|
||||
import net.minecraft.client.util.math.Matrix4f;
|
||||
@@ -52,7 +52,7 @@ import com.mojang.blaze3d.platform.GlStateManager;
|
||||
|
||||
import static com.replaymod.core.versions.MCVer.*;
|
||||
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
@Mixin(value = GameRenderer.class)
|
||||
//#else
|
||||
//$$ @Mixin(value = EntityRenderer.class)
|
||||
@@ -85,7 +85,7 @@ public abstract class MixinEntityRenderer implements EntityRendererHandler.IEnti
|
||||
//#endif
|
||||
|
||||
// Moved to MixinFogRenderer in 1.13
|
||||
//#if MC<11300
|
||||
//#if MC<11400
|
||||
//$$ @Inject(method = "setupFog", at = @At("HEAD"), cancellable = true)
|
||||
//$$ private void replayModRender_onSetupFog(int fogDistanceFlag, float partialTicks, CallbackInfo ci) {
|
||||
//$$ if (replayModRender_handler == null) return;
|
||||
@@ -104,7 +104,7 @@ public abstract class MixinEntityRenderer implements EntityRendererHandler.IEnti
|
||||
Camera camera,
|
||||
//#endif
|
||||
float partialTicks,
|
||||
//#if MC<11300
|
||||
//#if MC<11400
|
||||
//$$ int renderPass,
|
||||
//#endif
|
||||
CallbackInfo ci
|
||||
@@ -113,7 +113,7 @@ public abstract class MixinEntityRenderer implements EntityRendererHandler.IEnti
|
||||
if (replayModRender_handler.omnidirectional) {
|
||||
// No spectator hands during 360° view, we wouldn't even know where to put it
|
||||
ci.cancel();
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
}
|
||||
//#else
|
||||
//$$ } else {
|
||||
@@ -130,7 +130,7 @@ public abstract class MixinEntityRenderer implements EntityRendererHandler.IEnti
|
||||
}
|
||||
}
|
||||
|
||||
//#if MC<11300
|
||||
//#if MC<11400
|
||||
//$$ @Shadow
|
||||
//$$ public abstract void renderHand(float partialTicks, int renderPass);
|
||||
//#endif
|
||||
@@ -163,7 +163,7 @@ public abstract class MixinEntityRenderer implements EntityRendererHandler.IEnti
|
||||
//#endif
|
||||
private void replayModRender_setupStereoscopicProjection(
|
||||
float partialTicks,
|
||||
//#if MC<11300
|
||||
//#if MC<11400
|
||||
//$$ int renderPass,
|
||||
//#endif
|
||||
CallbackInfo ci
|
||||
@@ -197,7 +197,7 @@ public abstract class MixinEntityRenderer implements EntityRendererHandler.IEnti
|
||||
//#endif
|
||||
private void replayModRender_setupStereoscopicModelView(
|
||||
float partialTicks,
|
||||
//#if MC<11300
|
||||
//#if MC<11400
|
||||
//$$ int renderPass,
|
||||
//#endif
|
||||
CallbackInfo ci
|
||||
@@ -216,7 +216,7 @@ public abstract class MixinEntityRenderer implements EntityRendererHandler.IEnti
|
||||
* Cubic Renderer
|
||||
*/
|
||||
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
@Redirect(method = "applyCameraTransformations", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/util/math/Matrix4f;method_4929(DFFF)Lnet/minecraft/client/util/math/Matrix4f;"))
|
||||
private Matrix4f replayModRender_perspective$0(double fovY, float aspect, float zNear, float zFar) {
|
||||
return replayModRender_perspective((float) fovY, aspect, zNear, zFar);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
package com.replaymod.render.mixin;
|
||||
|
||||
import com.replaymod.core.versions.MCVer;
|
||||
|
||||
@@ -15,7 +15,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
import net.minecraft.client.render.Camera;
|
||||
//#endif
|
||||
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
import net.minecraft.client.render.WorldRenderer;
|
||||
//#else
|
||||
//$$ import net.minecraft.client.renderer.RenderGlobal;
|
||||
@@ -27,7 +27,7 @@ import net.minecraft.client.render.WorldRenderer;
|
||||
//$$ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||
//#endif
|
||||
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
@Mixin(WorldRenderer.class)
|
||||
//#else
|
||||
//$$ @Mixin(RenderGlobal.class)
|
||||
@@ -48,7 +48,7 @@ public abstract class MixinRenderGlobal {
|
||||
Camera viewEntity,
|
||||
//#else
|
||||
//$$ Entity viewEntity,
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
//$$ float partialTicks,
|
||||
//#else
|
||||
//$$ double partialTicks,
|
||||
@@ -65,7 +65,7 @@ public abstract class MixinRenderGlobal {
|
||||
Camera viewEntity,
|
||||
//#else
|
||||
//$$ Entity viewEntity,
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
//$$ float partialTicks,
|
||||
//#else
|
||||
//$$ double partialTicks,
|
||||
|
||||
@@ -37,7 +37,7 @@ public abstract class MixinRenderManager {
|
||||
//#if MC>=11400
|
||||
@Inject(method = "render(Lnet/minecraft/entity/Entity;DDDFFZ)V", at = @At("HEAD"))
|
||||
//#else
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
//$$ @Inject(method = "renderEntity", at = @At("HEAD"))
|
||||
//#else
|
||||
//$$ @Inject(method = "doRenderEntity", at = @At("HEAD"))
|
||||
|
||||
@@ -87,7 +87,7 @@ public abstract class Mixin_CubicRotation {
|
||||
//#if MC<11500
|
||||
if (getHandler() != null && getHandler().omnidirectional) {
|
||||
// Minecraft goes back a little so we have to revert that
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
GL11.glTranslatef(0.0F, 0.0F, -0.05F);
|
||||
//#else
|
||||
//$$ GL11.glTranslatef(0.0F, 0.0F, 0.1F);
|
||||
|
||||
@@ -7,7 +7,7 @@ import net.minecraft.client.MinecraftClient;
|
||||
import net.minecraft.util.crash.CrashReport;
|
||||
import net.minecraft.util.crash.CrashException;
|
||||
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
//#else
|
||||
//$$ import org.lwjgl.opengl.Display;
|
||||
@@ -61,7 +61,7 @@ public class Pipeline<R extends Frame, P extends Frame> implements Runnable {
|
||||
|
||||
MinecraftClient mc = MCVer.getMinecraft();
|
||||
while (!capturer.isDone() && !Thread.currentThread().isInterrupted()) {
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
if (GLFW.glfwWindowShouldClose(getWindow(mc).getHandle()) || ((MinecraftAccessor) mc).getCrashReporter() != null) {
|
||||
//#else
|
||||
//$$ if (Display.isCloseRequested() || ((MinecraftAccessor) mc).getCrashReporter() != null) {
|
||||
|
||||
@@ -38,7 +38,7 @@ import net.minecraft.client.render.RenderTickCounter;
|
||||
//$$ import org.lwjgl.opengl.GL11;
|
||||
//#endif
|
||||
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
import com.replaymod.render.mixin.MainWindowAccessor;
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
//#else
|
||||
@@ -200,7 +200,7 @@ public class VideoRenderer implements RenderInfo {
|
||||
@Override
|
||||
public float updateForNextFrame() {
|
||||
// because the jGui lib uses Minecraft's displayWidth and displayHeight values, update these temporarily
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
int displayWidthBefore = getWindow(mc).getFramebufferWidth();
|
||||
int displayHeightBefore = getWindow(mc).getFramebufferHeight();
|
||||
//noinspection ConstantConditions
|
||||
@@ -221,7 +221,7 @@ public class VideoRenderer implements RenderInfo {
|
||||
// Updating the timer will cause the timeline player to update the game state
|
||||
RenderTickCounter timer = ((MinecraftAccessor) mc).getTimer();
|
||||
timer.beginRenderTick(
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
MCVer.milliTime()
|
||||
//#endif
|
||||
);
|
||||
@@ -238,7 +238,7 @@ public class VideoRenderer implements RenderInfo {
|
||||
}
|
||||
|
||||
// change Minecraft's display size back
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
acc.setFramebufferWidth(displayWidthBefore);
|
||||
acc.setFramebufferHeight(displayHeightBefore);
|
||||
//#else
|
||||
@@ -269,7 +269,7 @@ public class VideoRenderer implements RenderInfo {
|
||||
debugInfoWasShown = true;
|
||||
mc.options.debugEnabled = false;
|
||||
}
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
if (mc.mouse.isCursorLocked()) {
|
||||
mouseWasGrabbed = true;
|
||||
}
|
||||
@@ -341,7 +341,7 @@ public class VideoRenderer implements RenderInfo {
|
||||
//#endif
|
||||
mc.options.debugEnabled = debugInfoWasShown;
|
||||
if (mouseWasGrabbed) {
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
mc.mouse.lockCursor();
|
||||
//#else
|
||||
//$$ mc.mouseHelper.grabMouseCursor();
|
||||
@@ -368,7 +368,7 @@ public class VideoRenderer implements RenderInfo {
|
||||
}
|
||||
|
||||
// Finally, resize the Minecraft framebuffer to the actual width/height of the window
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
mc.getFramebuffer().resize(displayWidth, displayHeight
|
||||
//#if MC>=11400
|
||||
, false
|
||||
@@ -403,7 +403,7 @@ public class VideoRenderer implements RenderInfo {
|
||||
//#endif
|
||||
|
||||
mc.currentScreen = gui.toMinecraft();
|
||||
//#if MC>=10800 && MC<11300
|
||||
//#if MC>=10800 && MC<11400
|
||||
//$$ try {
|
||||
//$$ mc.runTick();
|
||||
//$$ } catch (IOException e) {
|
||||
@@ -419,7 +419,7 @@ public class VideoRenderer implements RenderInfo {
|
||||
// Resize the GUI framebuffer if the display size changed
|
||||
if (!settings.isHighPerformance() && displaySizeChanged()) {
|
||||
updateDisplaySize();
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
guiFramebuffer.resize(getWindow(mc).getFramebufferWidth(), getWindow(mc).getFramebufferHeight()
|
||||
//#if MC>=11400
|
||||
, false
|
||||
@@ -449,7 +449,7 @@ public class VideoRenderer implements RenderInfo {
|
||||
//$$ RenderSystem.loadIdentity();
|
||||
//$$ RenderSystem.translatef(0, 0, -2000);
|
||||
//#else
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
getWindow(mc).method_4493(
|
||||
//#if MC>=11400
|
||||
false
|
||||
@@ -460,7 +460,7 @@ public class VideoRenderer implements RenderInfo {
|
||||
//#endif
|
||||
//#endif
|
||||
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
gui.toMinecraft().init(mc, getWindow(mc).getScaledWidth(), getWindow(mc).getScaledHeight());
|
||||
//#else
|
||||
//$$ ScaledResolution scaled = newScaledResolution(mc);
|
||||
@@ -468,7 +468,7 @@ public class VideoRenderer implements RenderInfo {
|
||||
//#endif
|
||||
|
||||
// Events are polled on 1.13+ in mainWindow.update which is called later
|
||||
//#if MC<11300
|
||||
//#if MC<11400
|
||||
//#if MC>=10800
|
||||
//$$ try {
|
||||
//$$ gui.toMinecraft().handleInput();
|
||||
@@ -482,7 +482,7 @@ public class VideoRenderer implements RenderInfo {
|
||||
//#endif
|
||||
//#endif
|
||||
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
int mouseX = (int) mc.mouse.getX();
|
||||
int mouseY = (int) mc.mouse.getY();
|
||||
|
||||
@@ -505,7 +505,7 @@ public class VideoRenderer implements RenderInfo {
|
||||
//#if MC>=11500
|
||||
//$$ getWindow(mc).swapBuffers();
|
||||
//#else
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
getWindow(mc).setFullscreen(false);
|
||||
//#else
|
||||
//$$ // if not in high performance mode, update the gui size if screen size changed
|
||||
@@ -521,7 +521,7 @@ public class VideoRenderer implements RenderInfo {
|
||||
//$$ }
|
||||
//#endif
|
||||
//#endif
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
if (mc.mouse.isCursorLocked()) {
|
||||
mc.mouse.unlockCursor();
|
||||
}
|
||||
@@ -542,7 +542,7 @@ public class VideoRenderer implements RenderInfo {
|
||||
}
|
||||
|
||||
private boolean displaySizeChanged() {
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
return displayWidth != getWindow(mc).getWidth() || displayHeight != getWindow(mc).getHeight();
|
||||
//#else
|
||||
//$$ return displayWidth != Display.getWidth() || displayHeight != Display.getHeight();
|
||||
@@ -550,7 +550,7 @@ public class VideoRenderer implements RenderInfo {
|
||||
}
|
||||
|
||||
private void updateDisplaySize() {
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
displayWidth = getWindow(mc).getWidth();
|
||||
displayHeight = getWindow(mc).getHeight();
|
||||
//#else
|
||||
|
||||
@@ -8,7 +8,7 @@ import org.lwjgl.opengl.ARBShaderObjects;
|
||||
import org.lwjgl.opengl.ARBVertexShader;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
import net.minecraft.resource.Resource;
|
||||
//#else
|
||||
//$$ import net.minecraft.client.resources.IResource;
|
||||
|
||||
@@ -5,7 +5,7 @@ import com.replaymod.core.ReplayMod;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
import org.lwjgl.opengl.ARBVertexBufferObject;
|
||||
import org.lwjgl.opengl.GL;
|
||||
//#else
|
||||
@@ -20,7 +20,7 @@ import static org.lwjgl.opengl.ARBPixelBufferObject.*;
|
||||
import static org.lwjgl.opengl.GL15.*;
|
||||
import static org.lwjgl.opengl.GL21.GL_PIXEL_PACK_BUFFER;
|
||||
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
import static org.lwjgl.opengl.ARBVertexBufferObject.*;
|
||||
//#endif
|
||||
|
||||
@@ -34,7 +34,7 @@ public class PixelBufferObject {
|
||||
private final int arb, gl15;
|
||||
}
|
||||
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
public static final boolean SUPPORTED = GL.getCapabilities().GL_ARB_pixel_buffer_object || GL.getCapabilities().OpenGL15;
|
||||
private static final boolean arb = !GL.getCapabilities().OpenGL15;
|
||||
//#else
|
||||
@@ -54,7 +54,7 @@ public class PixelBufferObject {
|
||||
}
|
||||
|
||||
this.size = size;
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
this.handle = arb ? ARBVertexBufferObject.glGenBuffersARB() : glGenBuffers();
|
||||
//#else
|
||||
//$$ this.handle = arb ? ARBBufferObject.glGenBuffersARB() : glGenBuffers();
|
||||
@@ -63,7 +63,7 @@ public class PixelBufferObject {
|
||||
bind();
|
||||
|
||||
if (arb) {
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
ARBVertexBufferObject.glBufferDataARB(GL_PIXEL_PACK_BUFFER_ARB, size, usage.arb);
|
||||
//#else
|
||||
//$$ ARBBufferObject.glBufferDataARB(GL_PIXEL_PACK_BUFFER_ARB, size, usage.arb);
|
||||
@@ -84,7 +84,7 @@ public class PixelBufferObject {
|
||||
|
||||
public void bind() {
|
||||
if (arb) {
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
ARBVertexBufferObject.glBindBufferARB(GL_PIXEL_PACK_BUFFER_ARB, getHandle());
|
||||
//#else
|
||||
//$$ ARBBufferObject.glBindBufferARB(GL_PIXEL_PACK_BUFFER_ARB, getHandle());
|
||||
@@ -98,7 +98,7 @@ public class PixelBufferObject {
|
||||
public void unbind() {
|
||||
checkBound();
|
||||
if (arb) {
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
ARBVertexBufferObject.glBindBufferARB(GL_PIXEL_PACK_BUFFER_ARB, 0);
|
||||
//#else
|
||||
//$$ ARBBufferObject.glBindBufferARB(GL_PIXEL_PACK_BUFFER_ARB, 0);
|
||||
@@ -126,7 +126,7 @@ public class PixelBufferObject {
|
||||
checkNotMapped();
|
||||
ByteBuffer buffer;
|
||||
if (arb) {
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
buffer = ARBVertexBufferObject.glMapBufferARB(GL_PIXEL_PACK_BUFFER_ARB, GL_READ_ONLY_ARB, size, null);
|
||||
//#else
|
||||
//$$ buffer = ARBBufferObject.glMapBufferARB(GL_PIXEL_PACK_BUFFER_ARB, GL_READ_ONLY_ARB, size, null);
|
||||
@@ -134,7 +134,7 @@ public class PixelBufferObject {
|
||||
} else {
|
||||
buffer = glMapBuffer(GL_PIXEL_PACK_BUFFER, GL_READ_ONLY, size, null);
|
||||
}
|
||||
//#if MC<11300
|
||||
//#if MC<11400
|
||||
//$$ if (buffer == null) {
|
||||
//$$ Util.checkGLError();
|
||||
//$$ }
|
||||
@@ -148,7 +148,7 @@ public class PixelBufferObject {
|
||||
checkNotMapped();
|
||||
ByteBuffer buffer;
|
||||
if (arb) {
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
buffer = ARBVertexBufferObject.glMapBufferARB(GL_PIXEL_PACK_BUFFER_ARB, GL_WRITE_ONLY_ARB, size, null);
|
||||
//#else
|
||||
//$$ buffer = ARBBufferObject.glMapBufferARB(GL_PIXEL_PACK_BUFFER_ARB, GL_WRITE_ONLY_ARB, size, null);
|
||||
@@ -156,7 +156,7 @@ public class PixelBufferObject {
|
||||
} else {
|
||||
buffer = glMapBuffer(GL_PIXEL_PACK_BUFFER, GL_WRITE_ONLY, size, null);
|
||||
}
|
||||
//#if MC<11300
|
||||
//#if MC<11400
|
||||
//$$ if (buffer == null) {
|
||||
//$$ Util.checkGLError();
|
||||
//$$ }
|
||||
@@ -170,7 +170,7 @@ public class PixelBufferObject {
|
||||
checkNotMapped();
|
||||
ByteBuffer buffer;
|
||||
if (arb) {
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
buffer = ARBVertexBufferObject.glMapBufferARB(GL_PIXEL_PACK_BUFFER_ARB, GL_READ_WRITE_ARB, size, null);
|
||||
//#else
|
||||
//$$ buffer = ARBBufferObject.glMapBufferARB(GL_PIXEL_PACK_BUFFER_ARB, GL_READ_WRITE_ARB, size, null);
|
||||
@@ -178,7 +178,7 @@ public class PixelBufferObject {
|
||||
} else {
|
||||
buffer = glMapBuffer(GL_PIXEL_PACK_BUFFER, GL_READ_WRITE, size, null);
|
||||
}
|
||||
//#if MC<11300
|
||||
//#if MC<11400
|
||||
//$$ if (buffer == null) {
|
||||
//$$ Util.checkGLError();
|
||||
//$$ }
|
||||
@@ -193,7 +193,7 @@ public class PixelBufferObject {
|
||||
throw new IllegalStateException("Buffer not mapped.");
|
||||
}
|
||||
if (arb) {
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
ARBVertexBufferObject.glUnmapBufferARB(GL_PIXEL_PACK_BUFFER_ARB);
|
||||
//#else
|
||||
//$$ ARBBufferObject.glUnmapBufferARB(GL_PIXEL_PACK_BUFFER_ARB);
|
||||
@@ -207,7 +207,7 @@ public class PixelBufferObject {
|
||||
public void delete() {
|
||||
if (handle != -1) {
|
||||
if (arb) {
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
ARBVertexBufferObject.glDeleteBuffersARB(getHandle());
|
||||
//#else
|
||||
//$$ ARBBufferObject.glDeleteBuffersARB(getHandle());
|
||||
|
||||
@@ -83,7 +83,7 @@ import net.minecraft.text.TranslatableText;
|
||||
//$$ import java.util.Iterator;
|
||||
//#endif
|
||||
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
import net.minecraft.util.Identifier;
|
||||
//#if MC<11400
|
||||
//$$ import net.minecraft.world.dimension.DimensionType;
|
||||
@@ -430,7 +430,7 @@ public class FullReplaySender extends ChannelDuplexHandler implements ReplaySend
|
||||
//$$ int chunkX = entity.chunkCoordX;
|
||||
//$$ int chunkY = entity.chunkCoordZ;
|
||||
//$$
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
//$$ if (entity.addedToChunk && world.getChunkProvider().provideChunk(chunkX, chunkY, false, false) != null) {
|
||||
//#else
|
||||
//#if MC>=10904
|
||||
@@ -531,14 +531,14 @@ public class FullReplaySender extends ChannelDuplexHandler implements ReplaySend
|
||||
|
||||
if (p instanceof CustomPayloadS2CPacket) {
|
||||
CustomPayloadS2CPacket packet = (CustomPayloadS2CPacket) p;
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
Identifier channelName = packet.getChannel();
|
||||
//#else
|
||||
//$$ String channelName = packet.getChannelName();
|
||||
//#endif
|
||||
// On 1.14+ there's a dedicated OpenWrittenBookS2CPacket now
|
||||
//#if MC<11400
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
//$$ if (SPacketCustomPayload.BOOK_OPEN.equals(channelName)) {
|
||||
//#else
|
||||
//$$ if ("MC|BOpen".equals(channelName)) {
|
||||
@@ -599,13 +599,13 @@ public class FullReplaySender extends ChannelDuplexHandler implements ReplaySend
|
||||
);
|
||||
//#else
|
||||
//#if MC>=10800
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
//$$ DimensionType dimension = packet.func_212642_e();
|
||||
//#else
|
||||
//$$ int dimension = packet.getDimension();
|
||||
//#endif
|
||||
//$$ EnumDifficulty difficulty = packet.getDifficulty();
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
//$$ int maxPlayers = 0; // literally never used by vanilla (i.e. no accessor)
|
||||
//#else
|
||||
//$$ int maxPlayers = packet.getMaxPlayers();
|
||||
@@ -1089,7 +1089,7 @@ public class FullReplaySender extends ChannelDuplexHandler implements ReplaySend
|
||||
//#if MC>=11400
|
||||
// FIXME fabric
|
||||
//#else
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
//$$ Chunk chunk = chunkProvider.provideChunk(x, z, false, false);
|
||||
//#else
|
||||
//$$ Chunk chunk = chunkProvider.provideChunk(x, z);
|
||||
@@ -1106,7 +1106,7 @@ public class FullReplaySender extends ChannelDuplexHandler implements ReplaySend
|
||||
//$$ // Needs to be called at least 4 times thanks to
|
||||
//$$ // EntityOtherPlayerMP#otherPlayerMPPosRotationIncrements (max vanilla value is 3)
|
||||
//$$ for (int i = 0; i < 4; i++) {
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
//$$ entity.tick();
|
||||
//#else
|
||||
//$$ entity.onUpdate();
|
||||
@@ -1119,7 +1119,7 @@ public class FullReplaySender extends ChannelDuplexHandler implements ReplaySend
|
||||
//$$ if (entity.chunkCoordX != chunkX || entity.chunkCoordZ != chunkZ) {
|
||||
//$$ // Entity has left the chunk
|
||||
//$$ chunk.removeEntityAtIndex(entity, entity.chunkCoordY);
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
//$$ Chunk newChunk = chunkProvider.provideChunk(chunkX, chunkZ, false, false);
|
||||
//#else
|
||||
//#if MC>=10904
|
||||
|
||||
@@ -11,7 +11,7 @@ import net.minecraft.client.render.RenderTickCounter;
|
||||
import com.replaymod.core.ReplayMod;
|
||||
//#endif
|
||||
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
//#else
|
||||
//$$ import net.minecraft.client.settings.KeyBinding;
|
||||
@@ -46,12 +46,12 @@ public class InputReplayTimer extends WrappedTimer {
|
||||
|
||||
@Override
|
||||
public void beginRenderTick(
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
long sysClock
|
||||
//#endif
|
||||
) {
|
||||
super.beginRenderTick(
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
sysClock
|
||||
//#endif
|
||||
);
|
||||
@@ -75,7 +75,7 @@ public class InputReplayTimer extends WrappedTimer {
|
||||
// If we are in a replay, we have to manually process key and mouse events as the
|
||||
// tick speed may vary or there may not be any ticks at all (when the replay is paused)
|
||||
if (mod.getReplayHandler() != null && mc.world != null && mc.player != null) {
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
if (mc.currentScreen == null || mc.currentScreen.passEvents) {
|
||||
GLFW.glfwPollEvents();
|
||||
MCVer.processKeyBinds();
|
||||
|
||||
@@ -16,11 +16,11 @@ import net.minecraft.client.util.ScreenshotUtils;
|
||||
//$$ import net.minecraft.client.util.math.MatrixStack;
|
||||
//#endif
|
||||
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
import static com.replaymod.core.versions.MCVer.getWindow;
|
||||
//#endif
|
||||
|
||||
//#if MC<11300
|
||||
//#if MC<11400
|
||||
//$$ import com.google.common.io.Files;
|
||||
//$$ import org.apache.commons.io.FileUtils;
|
||||
//$$ import java.io.File;
|
||||
@@ -42,7 +42,7 @@ public class NoGuiScreenshot {
|
||||
return;
|
||||
}
|
||||
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
int frameWidth = getWindow(mc).getFramebufferWidth(), frameHeight = getWindow(mc).getFramebufferHeight();
|
||||
//#else
|
||||
//$$ int frameWidth = mc.displayWidth, frameHeight = mc.displayHeight;
|
||||
@@ -63,7 +63,7 @@ public class NoGuiScreenshot {
|
||||
mc.getFramebuffer().beginWrite(true);
|
||||
GlStateManager.enableTexture();
|
||||
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
mc.gameRenderer.renderWorld(
|
||||
MCVer.getRenderPartialTicks(),
|
||||
System.nanoTime()
|
||||
@@ -95,7 +95,7 @@ public class NoGuiScreenshot {
|
||||
// The frame without GUI has been rendered
|
||||
// Read it, create the screenshot and finish the future
|
||||
try {
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
Image image = new Image(ScreenshotUtils.method_1663(frameWidth, frameHeight, mc.getFramebuffer()));
|
||||
//#else
|
||||
// We're using Minecraft's ScreenShotHelper even though it writes the screenshot to
|
||||
|
||||
@@ -41,7 +41,7 @@ import java.util.*;
|
||||
//$$ import org.lwjgl.opengl.GL11;
|
||||
//#endif
|
||||
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
import com.replaymod.replay.mixin.EntityLivingBaseAccessor;
|
||||
import net.minecraft.client.util.Window;
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
@@ -67,7 +67,7 @@ import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.network.NetworkSide;
|
||||
//#if MC>=11400
|
||||
//#else
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
//$$ import net.minecraftforge.fml.network.NetworkHooks;
|
||||
//#else
|
||||
//$$ import com.mojang.authlib.GameProfile;
|
||||
@@ -168,7 +168,7 @@ public class ReplayHandler {
|
||||
|
||||
channel.close();
|
||||
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
mc.mouse.unlockCursor();
|
||||
//#else
|
||||
//$$ mc.setIngameNotInFocus();
|
||||
@@ -207,7 +207,7 @@ public class ReplayHandler {
|
||||
channel.close().awaitUninterruptibly();
|
||||
|
||||
if (mc.player instanceof CameraEntity) {
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
mc.player.remove();
|
||||
//#else
|
||||
//$$ mc.player.setDead();
|
||||
@@ -282,7 +282,7 @@ public class ReplayHandler {
|
||||
networkManager,
|
||||
mc,
|
||||
null
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
, it -> {}
|
||||
//#endif
|
||||
));
|
||||
@@ -302,7 +302,7 @@ public class ReplayHandler {
|
||||
channel.pipeline().addLast("packet_handler", networkManager);
|
||||
channel.pipeline().fireChannelActive();
|
||||
|
||||
//#if MC>=11300 && MC<11400
|
||||
//#if MC>=11400 && MC<11400
|
||||
//$$ NetworkHooks.registerClientLoginChannel(networkManager);
|
||||
//#endif
|
||||
}
|
||||
@@ -546,7 +546,7 @@ public class ReplayHandler {
|
||||
}
|
||||
|
||||
// Run previous tick
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
mc.tick();
|
||||
//#else
|
||||
//$$ try {
|
||||
@@ -598,7 +598,7 @@ public class ReplayHandler {
|
||||
//#endif
|
||||
) {
|
||||
@Override
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
public void render(int mouseX, int mouseY, float partialTicks) {
|
||||
//#else
|
||||
//$$ public void drawScreen(int mouseX, int mouseY, float partialTicks) {
|
||||
@@ -634,7 +634,7 @@ public class ReplayHandler {
|
||||
//#if MC>=11400
|
||||
getWindow(mc).method_4493(true);
|
||||
//#else
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
//$$ mc.mainWindow.setupOverlayRendering();
|
||||
//#else
|
||||
//$$ mc.entityRenderer.setupOverlayRendering();
|
||||
@@ -642,14 +642,14 @@ public class ReplayHandler {
|
||||
//#endif
|
||||
//#endif
|
||||
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
Window
|
||||
//#else
|
||||
//$$ ScaledResolution
|
||||
//#endif
|
||||
resolution = newScaledResolution(mc);
|
||||
guiScreen.init(mc, resolution.getScaledWidth(), resolution.getScaledHeight());
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
guiScreen.render(0, 0, 0);
|
||||
//#else
|
||||
//$$ guiScreen.drawScreen(0, 0, 0);
|
||||
@@ -658,7 +658,7 @@ public class ReplayHandler {
|
||||
mc.getFramebuffer().endWrite();
|
||||
popMatrix();
|
||||
pushMatrix();
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
mc.getFramebuffer().draw(getWindow(mc).getFramebufferWidth(), getWindow(mc).getFramebufferHeight());
|
||||
//#else
|
||||
//$$ mc.getFramebuffer().framebufferRender(mc.displayWidth, mc.displayHeight);
|
||||
@@ -668,7 +668,7 @@ public class ReplayHandler {
|
||||
//#if MC>=11500
|
||||
//$$ getWindow(mc).swapBuffers();
|
||||
//#else
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
getWindow(mc).setFullscreen(true);
|
||||
//#else
|
||||
//$$ Display.update();
|
||||
@@ -687,7 +687,7 @@ public class ReplayHandler {
|
||||
//#endif
|
||||
|
||||
mc.getNetworkHandler().getConnection()
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
.tick();
|
||||
//#else
|
||||
//$$ .processReceivedPackets();
|
||||
@@ -700,7 +700,7 @@ public class ReplayHandler {
|
||||
entity.prevYaw = entity.yaw;
|
||||
entity.prevPitch = entity.pitch;
|
||||
}
|
||||
//#if MC>=10800 && MC<11300
|
||||
//#if MC>=10800 && MC<11400
|
||||
//$$ try {
|
||||
//$$ mc.runTick();
|
||||
//$$ } catch (IOException e) {
|
||||
@@ -720,7 +720,7 @@ public class ReplayHandler {
|
||||
}
|
||||
|
||||
private void skipTeleportInterpolation(Entity entity) {
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
if (entity instanceof LivingEntity && !(entity instanceof CameraEntity)) {
|
||||
LivingEntity e = (LivingEntity) entity;
|
||||
EntityLivingBaseAccessor ea = (EntityLivingBaseAccessor) e;
|
||||
|
||||
@@ -54,7 +54,7 @@ import net.minecraft.util.hit.HitResult;
|
||||
//$$ import net.minecraft.util.text.ITextComponent;
|
||||
//$$ import net.minecraft.world.World;
|
||||
//$$
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
//$$ import net.minecraft.util.math.RayTraceFluidMode;
|
||||
//#else
|
||||
//$$ import net.minecraft.block.material.Material;
|
||||
@@ -65,7 +65,7 @@ import net.minecraft.util.hit.HitResult;
|
||||
//#if MC>=10904
|
||||
import net.minecraft.entity.EquipmentSlot;
|
||||
//#if MC>=11200
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
import net.minecraft.client.recipe.book.ClientRecipeBook;
|
||||
//#else
|
||||
//$$ import net.minecraft.stats.RecipeBook;
|
||||
@@ -136,7 +136,7 @@ public class CameraEntity
|
||||
ClientPlayNetworkHandler netHandlerPlayClient,
|
||||
StatHandler statisticsManager
|
||||
//#if MC>=11200
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
, ClientRecipeBook recipeBook
|
||||
//#else
|
||||
//$$ , RecipeBook recipeBook
|
||||
@@ -304,7 +304,7 @@ public class CameraEntity
|
||||
return falseUnlessSpectating(Entity::isInsideWall); // Make sure no suffocation overlay is rendered
|
||||
}
|
||||
|
||||
//#if MC<11300
|
||||
//#if MC<11400
|
||||
//$$ @Override
|
||||
//$$ public boolean isInsideOfMaterial(Material materialIn) {
|
||||
//$$ return falseUnlessSpectating(e -> e.isInsideOfMaterial(materialIn)); // Make sure no overlays are rendered
|
||||
@@ -485,7 +485,7 @@ public class CameraEntity
|
||||
return result;
|
||||
}
|
||||
//#else
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
//$$ @Override
|
||||
//$$ public RayTraceResult rayTrace(double blockReachDistance, float partialTicks, RayTraceFluidMode p_174822_4_) {
|
||||
//$$ RayTraceResult pos = super.rayTrace(blockReachDistance, partialTicks, p_174822_4_);
|
||||
@@ -525,7 +525,7 @@ public class CameraEntity
|
||||
//$$ }
|
||||
//#endif
|
||||
|
||||
//#if MC<11300
|
||||
//#if MC<11400
|
||||
//$$ @Override
|
||||
//$$ public void openGui(Object mod, int modGuiId, World world, int x, int y, int z) {
|
||||
//$$ // Do not open any block GUIs for the camera entities
|
||||
|
||||
@@ -12,7 +12,7 @@ import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.entity.EquipmentSlot;
|
||||
//#endif
|
||||
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
//#else
|
||||
//$$ import org.lwjgl.input.Mouse;
|
||||
//#endif
|
||||
@@ -41,7 +41,7 @@ public class SpectatorCameraController implements CameraController {
|
||||
}
|
||||
|
||||
// Prevent mouse movement
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
// No longer needed
|
||||
//#else
|
||||
//$$ Mouse.updateCursor();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
package com.replaymod.replay.events;
|
||||
|
||||
import de.johni0702.minecraft.gui.utils.Event;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//#if MC<11300
|
||||
//#if MC<11400
|
||||
//$$ package com.replaymod.replay.events;
|
||||
//$$
|
||||
//$$ import net.minecraftforge.fml.common.eventhandler.Cancelable;
|
||||
|
||||
@@ -22,7 +22,7 @@ import de.johni0702.minecraft.gui.utils.lwjgl.WritablePoint;
|
||||
import net.minecraft.client.options.GameOptions;
|
||||
import net.minecraft.client.resource.language.I18n;
|
||||
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
import com.replaymod.core.events.KeyBindingEventCallback;
|
||||
import com.replaymod.core.events.KeyEventCallback;
|
||||
//#else
|
||||
@@ -176,7 +176,7 @@ public class GuiReplayOverlay extends AbstractGuiOverlay<GuiReplayOverlay> {
|
||||
//$$ public // All event handlers need to be public in 1.7.10
|
||||
//#endif
|
||||
class EventHandler extends EventRegistrations {
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
{ on(KeyBindingEventCallback.EVENT, this::onKeyBindingEvent); }
|
||||
private void onKeyBindingEvent() {
|
||||
//#else
|
||||
@@ -191,7 +191,7 @@ public class GuiReplayOverlay extends AbstractGuiOverlay<GuiReplayOverlay> {
|
||||
}
|
||||
}
|
||||
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
{ on(KeyEventCallback.EVENT, (int key, int scanCode, int action, int modifiers) -> onKeyInput(key, action)); }
|
||||
private void onKeyInput(int key, int action) {
|
||||
if (action != 0) return;
|
||||
|
||||
@@ -63,7 +63,7 @@ public class GuiHandler extends EventRegistrations {
|
||||
final String BUTTON_STATS = I18n.translate("gui.stats");
|
||||
final String BUTTON_OPEN_TO_LAN = I18n.translate("menu.shareToLan");
|
||||
//#else
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
//$$ final int BUTTON_OPTIONS = 0;
|
||||
//#endif
|
||||
//$$ final int BUTTON_EXIT_SERVER = 1;
|
||||
@@ -73,7 +73,7 @@ public class GuiHandler extends EventRegistrations {
|
||||
//#endif
|
||||
|
||||
|
||||
//#if MC<11300
|
||||
//#if MC<11400
|
||||
//$$ GuiButton openToLan = null;
|
||||
//#endif
|
||||
//#if MC>=11400
|
||||
@@ -111,10 +111,10 @@ public class GuiHandler extends EventRegistrations {
|
||||
stats = b;
|
||||
} else if (id.equals(BUTTON_OPEN_TO_LAN)) {
|
||||
remove = true;
|
||||
//#if MC<11300
|
||||
//#if MC<11400
|
||||
//$$ openToLan = b;
|
||||
//#endif
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
} else if (id.equals(BUTTON_OPTIONS)) {
|
||||
//#if MC>=11400
|
||||
width(b, 204);
|
||||
@@ -134,7 +134,7 @@ public class GuiHandler extends EventRegistrations {
|
||||
achievements.x, stats.x + width(stats));
|
||||
}
|
||||
// In 1.13+ Forge, the Options button shares one row with the Open to LAN button
|
||||
//#if MC<11300
|
||||
//#if MC<11400
|
||||
//$$ if (openToLan != null) {
|
||||
//$$ moveAllButtonsDirectlyBelowUpwards(buttonList, openToLan.y,
|
||||
//$$ openToLan.x, openToLan.x + openToLan.width);
|
||||
@@ -217,7 +217,7 @@ public class GuiHandler extends EventRegistrations {
|
||||
addButton(guiScreen, button);
|
||||
}
|
||||
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
private void onButton(InjectedButton button) {
|
||||
Screen guiScreen = button.guiScreen;
|
||||
//#else
|
||||
@@ -257,7 +257,7 @@ public class GuiHandler extends EventRegistrations {
|
||||
public final int id;
|
||||
private Consumer<InjectedButton> onClick;
|
||||
public InjectedButton(Screen guiScreen, int buttonId, int x, int y, int width, int height, String buttonText,
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
Consumer<InjectedButton> onClick
|
||||
//#else
|
||||
//$$ Consumer<GuiScreenEvent.ActionPerformedEvent.Pre> onClick
|
||||
@@ -278,14 +278,14 @@ public class GuiHandler extends EventRegistrations {
|
||||
);
|
||||
this.guiScreen = guiScreen;
|
||||
this.id = buttonId;
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
this.onClick = onClick;
|
||||
//#else
|
||||
//$$ this.onClick = null;
|
||||
//#endif
|
||||
}
|
||||
|
||||
//#if MC>=11300 && MC<11400
|
||||
//#if MC>=11400 && MC<11400
|
||||
//$$ @Override
|
||||
//$$ public void onClick(double mouseX, double mouseY) {
|
||||
//$$ onClick.accept(this);
|
||||
|
||||
@@ -6,7 +6,7 @@ import org.spongepowered.asm.mixin.gen.Accessor;
|
||||
|
||||
@Mixin(LivingEntity.class)
|
||||
public interface EntityLivingBaseAccessor {
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
@Accessor("field_6224")
|
||||
double getInterpTargetX();
|
||||
@Accessor("field_6245")
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//#if MC<11300
|
||||
//#if MC<11400
|
||||
//$$ package com.replaymod.replay.mixin;
|
||||
//$$
|
||||
//$$ import net.minecraft.client.entity.EntityOtherPlayerMP;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
package com.replaymod.replay.mixin;
|
||||
|
||||
import com.replaymod.replay.camera.CameraEntity;
|
||||
|
||||
@@ -7,20 +7,20 @@ import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
import net.minecraft.client.Keyboard;
|
||||
//#else
|
||||
//$$ import net.minecraft.client.Minecraft;
|
||||
//#endif
|
||||
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
@Mixin(Keyboard.class)
|
||||
//#else
|
||||
//$$ @Mixin(Minecraft.class)
|
||||
//#endif
|
||||
public abstract class MixinKeyboardListener {
|
||||
@Inject(
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
method = "onKey",
|
||||
//#else
|
||||
//$$ method = "dispatchKeypresses",
|
||||
@@ -30,7 +30,7 @@ public abstract class MixinKeyboardListener {
|
||||
//#if MC>=11400
|
||||
target = "Lnet/minecraft/client/util/ScreenshotUtils;method_1659(Ljava/io/File;IILnet/minecraft/client/gl/GlFramebuffer;Ljava/util/function/Consumer;)V"
|
||||
//#else
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
//$$ 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;"
|
||||
|
||||
@@ -15,7 +15,7 @@ import java.util.Queue;
|
||||
@Mixin(ParticleManager.class)
|
||||
public abstract class MixinParticleManager {
|
||||
@Shadow
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
private Queue<Particle> newParticles;
|
||||
//#else
|
||||
//$$ private Queue<Particle> queueEntityFX;
|
||||
@@ -31,7 +31,7 @@ public abstract class MixinParticleManager {
|
||||
*/
|
||||
@Inject(method = "setWorld", at = @At("HEAD"))
|
||||
public void replayModReplay_clearParticleQueue(World world, CallbackInfo ci) {
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
this.newParticles.clear();
|
||||
//#else
|
||||
//$$ this.queueEntityFX.clear();
|
||||
|
||||
@@ -18,7 +18,7 @@ import net.minecraft.client.world.ClientWorld;
|
||||
//#endif
|
||||
|
||||
//#if MC>=11200
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
import net.minecraft.client.recipe.book.ClientRecipeBook;
|
||||
//#else
|
||||
//$$ import net.minecraft.stats.RecipeBook;
|
||||
@@ -50,7 +50,7 @@ public abstract class MixinPlayerControllerMP {
|
||||
//$$ private NetHandlerPlayClient netClientHandler;
|
||||
//#endif
|
||||
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
@Inject(method = "createPlayer", at=@At("HEAD"), cancellable = true)
|
||||
private void replayModReplay_createReplayCamera(
|
||||
//#if MC>=11400
|
||||
@@ -96,7 +96,7 @@ public abstract class MixinPlayerControllerMP {
|
||||
}
|
||||
|
||||
//#if MC>=10800
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
@Inject(method = "isFlyingLocked", at=@At("HEAD"), cancellable = true)
|
||||
//#else
|
||||
//$$ @Inject(method = "isSpectator", at=@At("HEAD"), cancellable = true)
|
||||
|
||||
@@ -7,7 +7,7 @@ import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Redirect;
|
||||
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
import net.minecraft.util.SystemUtil;
|
||||
//#else
|
||||
//$$ import net.minecraft.client.Minecraft;
|
||||
@@ -15,7 +15,7 @@ import net.minecraft.util.SystemUtil;
|
||||
|
||||
@Mixin(ItemRenderer.class)
|
||||
public class MixinRenderItem {
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
//#if MC>=11400
|
||||
@Redirect(method = "renderGlint", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/SystemUtil;getMeasuringTimeMs()J"))
|
||||
//#else
|
||||
@@ -30,7 +30,7 @@ public class MixinRenderItem {
|
||||
if (replayHandler != null) {
|
||||
return replayHandler.getReplaySender().currentTimeStamp();
|
||||
}
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
return SystemUtil.getMeasuringTimeMs();
|
||||
//#else
|
||||
//$$ return Minecraft.getSystemTime();
|
||||
|
||||
@@ -7,7 +7,7 @@ import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Redirect;
|
||||
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
import net.minecraft.util.SystemUtil;
|
||||
//#else
|
||||
//$$ import net.minecraft.client.Minecraft;
|
||||
@@ -15,7 +15,7 @@ import net.minecraft.util.SystemUtil;
|
||||
|
||||
@Mixin(EndPortalBlockEntityRenderer.class)
|
||||
public class MixinTileEntityEndPortalRenderer {
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
@Redirect(method = "method_3591", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/SystemUtil;getMeasuringTimeMs()J"))
|
||||
//#else
|
||||
//#if MC>=11200
|
||||
@@ -37,7 +37,7 @@ public class MixinTileEntityEndPortalRenderer {
|
||||
if (replayHandler != null) {
|
||||
return replayHandler.getReplaySender().currentTimeStamp();
|
||||
}
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
return SystemUtil.getMeasuringTimeMs();
|
||||
//#else
|
||||
//$$ return Minecraft.getSystemTime();
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// Especially because it's non-trivial with forge's network changes.
|
||||
// PRs welcome. Ping me if you actually used this.
|
||||
|
||||
//#if MC<11300
|
||||
//#if MC<11400
|
||||
//$$ package com.replaymod.restrictions;
|
||||
//$$
|
||||
//$$ import com.replaymod.core.SettingsRegistry;
|
||||
|
||||
@@ -42,7 +42,7 @@ import org.apache.logging.log4j.Logger;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
import com.replaymod.core.versions.MCVer.Keyboard;
|
||||
//#else
|
||||
//$$ import org.lwjgl.input.Keyboard;
|
||||
|
||||
@@ -53,7 +53,7 @@ import net.minecraft.util.crash.CrashReport;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
//#else
|
||||
//$$ import org.lwjgl.input.Keyboard;
|
||||
//#if MC>=10800
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
"mixins": [],
|
||||
"server": [],
|
||||
"client": [
|
||||
//#if MC<11300
|
||||
//#if MC<11400
|
||||
//$$ "MixinMinecraft"
|
||||
//#endif
|
||||
],
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
"MixinGameRenderer",
|
||||
"MixinModResourcePackUtil",
|
||||
//#endif
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
"MixinKeyboardListener",
|
||||
//#endif
|
||||
//#if MC<10800
|
||||
|
||||
@@ -9,12 +9,12 @@
|
||||
"NetworkManagerAccessor",
|
||||
"SPacketSpawnMobAccessor",
|
||||
"SPacketSpawnPlayerAccessor",
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
"MixinDownloadingPackFinder",
|
||||
"MixinMouseHelper",
|
||||
//#endif
|
||||
//#if MC>=10904
|
||||
//#if MC<11300
|
||||
//#if MC<11400
|
||||
//$$ "MixinPlayerControllerMP",
|
||||
//#endif
|
||||
"MixinWorldClient",
|
||||
@@ -25,7 +25,7 @@
|
||||
//#endif
|
||||
"MixinNetHandlerLoginClient",
|
||||
"MixinNetHandlerPlayClient",
|
||||
//#if MC<11300
|
||||
//#if MC<11400
|
||||
//$$ "MixinNetworkDispatcher",
|
||||
//#endif
|
||||
"MixinRenderGlobal"
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user