Complete all currently actionable 1.13.2 FIXMEs
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
/* FIXME
|
||||
package com.replaymod.core;
|
||||
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.spongepowered.asm.launch.MixinBootstrap;
|
||||
import org.spongepowered.asm.mixin.Mixins;
|
||||
|
||||
//#if MC<11300
|
||||
//$$ import org.apache.logging.log4j.LogManager;
|
||||
//$$ import org.spongepowered.asm.launch.MixinBootstrap;
|
||||
//$$ import org.spongepowered.asm.mixin.Mixins;
|
||||
//$$
|
||||
//#if MC>=10800
|
||||
import net.minecraftforge.fml.relauncher.CoreModManager;
|
||||
import net.minecraftforge.fml.relauncher.IFMLLoadingPlugin;
|
||||
//$$ import net.minecraftforge.fml.relauncher.CoreModManager;
|
||||
//$$ import net.minecraftforge.fml.relauncher.IFMLLoadingPlugin;
|
||||
//#else
|
||||
//$$ import com.replaymod.core.asm.GLErrorTransformer;
|
||||
//$$ import com.replaymod.core.asm.GLStateTrackerTransformer;
|
||||
@@ -17,56 +17,56 @@ import net.minecraftforge.fml.relauncher.IFMLLoadingPlugin;
|
||||
//$$ import java.util.ArrayList;
|
||||
//$$ import java.util.List;
|
||||
//#endif
|
||||
|
||||
import java.io.File;
|
||||
import java.net.URISyntaxException;
|
||||
import java.net.URL;
|
||||
import java.security.CodeSource;
|
||||
import java.util.Map;
|
||||
|
||||
@IFMLLoadingPlugin.TransformerExclusions("com.replaymod.core.asm.")
|
||||
public class LoadingPlugin implements IFMLLoadingPlugin {
|
||||
|
||||
public LoadingPlugin() {
|
||||
MixinBootstrap.init();
|
||||
Mixins.addConfiguration("mixins.recording.replaymod.json");
|
||||
Mixins.addConfiguration("mixins.render.replaymod.json");
|
||||
Mixins.addConfiguration("mixins.replay.replaymod.json");
|
||||
Mixins.addConfiguration("mixins.compat.mapwriter.replaymod.json");
|
||||
Mixins.addConfiguration("mixins.compat.shaders.replaymod.json");
|
||||
Mixins.addConfiguration("mixins.extras.playeroverview.replaymod.json");
|
||||
|
||||
CodeSource codeSource = getClass().getProtectionDomain().getCodeSource();
|
||||
if (codeSource != null) {
|
||||
URL location = codeSource.getLocation();
|
||||
try {
|
||||
File file = new File(location.toURI());
|
||||
if (file.isFile()) {
|
||||
// This forces forge to reexamine the jar file for FML mods
|
||||
// Should eventually be handled by Mixin itself, maybe?
|
||||
//$$
|
||||
//$$ import java.io.File;
|
||||
//$$ import java.net.URISyntaxException;
|
||||
//$$ import java.net.URL;
|
||||
//$$ import java.security.CodeSource;
|
||||
//$$ import java.util.Map;
|
||||
//$$
|
||||
//$$ @IFMLLoadingPlugin.TransformerExclusions("com.replaymod.core.asm.")
|
||||
//$$ public class LoadingPlugin implements IFMLLoadingPlugin {
|
||||
//$$
|
||||
//$$ public LoadingPlugin() {
|
||||
//$$ MixinBootstrap.init();
|
||||
//$$ Mixins.addConfiguration("mixins.recording.replaymod.json");
|
||||
//$$ Mixins.addConfiguration("mixins.render.replaymod.json");
|
||||
//$$ Mixins.addConfiguration("mixins.replay.replaymod.json");
|
||||
//$$ Mixins.addConfiguration("mixins.compat.mapwriter.replaymod.json");
|
||||
//$$ Mixins.addConfiguration("mixins.compat.shaders.replaymod.json");
|
||||
//$$ Mixins.addConfiguration("mixins.extras.playeroverview.replaymod.json");
|
||||
//$$
|
||||
//$$ CodeSource codeSource = getClass().getProtectionDomain().getCodeSource();
|
||||
//$$ if (codeSource != null) {
|
||||
//$$ URL location = codeSource.getLocation();
|
||||
//$$ try {
|
||||
//$$ File file = new File(location.toURI());
|
||||
//$$ if (file.isFile()) {
|
||||
//$$ // This forces forge to reexamine the jar file for FML mods
|
||||
//$$ // Should eventually be handled by Mixin itself, maybe?
|
||||
//#if MC>=10809
|
||||
CoreModManager.getIgnoredMods().remove(file.getName());
|
||||
//$$ CoreModManager.getIgnoredMods().remove(file.getName());
|
||||
//#else
|
||||
//$$ CoreModManager.getLoadedCoremods().remove(file.getName());
|
||||
//#if MC<=10710
|
||||
//$$ CoreModManager.getReparseableCoremods().add(file.getName());
|
||||
//#endif
|
||||
//#endif
|
||||
}
|
||||
} catch (URISyntaxException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
} else {
|
||||
LogManager.getLogger().warn("No CodeSource, if this is not a development environment we might run into problems!");
|
||||
LogManager.getLogger().warn(getClass().getProtectionDomain());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getASMTransformerClass() {
|
||||
//$$ }
|
||||
//$$ } catch (URISyntaxException e) {
|
||||
//$$ e.printStackTrace();
|
||||
//$$ }
|
||||
//$$ } else {
|
||||
//$$ LogManager.getLogger().warn("No CodeSource, if this is not a development environment we might run into problems!");
|
||||
//$$ LogManager.getLogger().warn(getClass().getProtectionDomain());
|
||||
//$$ }
|
||||
//$$ }
|
||||
//$$
|
||||
//$$ @Override
|
||||
//$$ public String[] getASMTransformerClass() {
|
||||
//#if MC>=10800
|
||||
return new String[]{
|
||||
};
|
||||
//$$ return new String[]{
|
||||
//$$ };
|
||||
//#else
|
||||
//$$ List<String> transformers = new ArrayList<>();
|
||||
//$$ if ("true".equals(System.getProperty("replaymod.glerrors", "false"))) {
|
||||
@@ -75,26 +75,26 @@ public class LoadingPlugin implements IFMLLoadingPlugin {
|
||||
//$$ transformers.add(GLStateTrackerTransformer.class.getName());
|
||||
//$$ return transformers.stream().toArray(String[]::new);
|
||||
//#endif
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getModContainerClass() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSetupClass() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void injectData(Map<String, Object> data) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getAccessTransformerClass() {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
*/
|
||||
//$$ }
|
||||
//$$
|
||||
//$$ @Override
|
||||
//$$ public String getModContainerClass() {
|
||||
//$$ return null;
|
||||
//$$ }
|
||||
//$$
|
||||
//$$ @Override
|
||||
//$$ public String getSetupClass() {
|
||||
//$$ return null;
|
||||
//$$ }
|
||||
//$$
|
||||
//$$ @Override
|
||||
//$$ public void injectData(Map<String, Object> data) {
|
||||
//$$ }
|
||||
//$$
|
||||
//$$ @Override
|
||||
//$$ public String getAccessTransformerClass() {
|
||||
//$$ return null;
|
||||
//$$ }
|
||||
//$$
|
||||
//$$ }
|
||||
//#endif
|
||||
|
||||
@@ -5,7 +5,6 @@ import com.google.common.util.concurrent.ListenableFutureTask;
|
||||
import com.replaymod.core.gui.GuiReplaySettings;
|
||||
import com.replaymod.core.gui.RestoreReplayGui;
|
||||
import com.replaymod.core.handler.MainMenuHandler;
|
||||
import com.replaymod.core.utils.OpenGLUtils;
|
||||
import com.replaymod.core.versions.MCVer;
|
||||
import com.replaymod.editor.ReplayModEditor;
|
||||
import com.replaymod.extras.ReplayModExtras;
|
||||
@@ -156,14 +155,6 @@ public class ReplayMod implements Module {
|
||||
public ReplayMod() {
|
||||
I18n.setI18n(net.minecraft.client.resources.I18n::format);
|
||||
|
||||
// Initialize the static OpenGL info field from the minecraft main thread
|
||||
// Unfortunately lwjgl uses static methods so we have to make use of magic init calls as well
|
||||
//#if MC>=11300
|
||||
DeferredWorkQueue.runLater(OpenGLUtils::init);
|
||||
//#else
|
||||
//$$ OpenGLUtils.init();
|
||||
//#endif
|
||||
|
||||
//#if MC>=11300
|
||||
DeferredWorkQueue.runLater(() -> MCVer.getMinecraft().resourcePackRepository.addPackFinder(new LangResourcePack.Finder()));
|
||||
//#endif
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.replaymod.core.handler;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.GuiMainMenu;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
@@ -18,8 +19,6 @@ import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||
//$$ import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
//#endif
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import static com.replaymod.core.versions.MCVer.*;
|
||||
|
||||
/**
|
||||
@@ -45,10 +44,9 @@ public class MainMenuHandler {
|
||||
// and then move back down by 10 to compensate for the space to the exit button that was already there
|
||||
int offset = -2 * 24 + 10;
|
||||
y(button, y(button) + offset);
|
||||
}
|
||||
/* FIXME
|
||||
|
||||
//#if MC>=11300
|
||||
if (button == gui.realmsButton) {
|
||||
if (button.id == 14) {
|
||||
realmsOffset = offset;
|
||||
}
|
||||
//#endif
|
||||
@@ -58,11 +56,9 @@ public class MainMenuHandler {
|
||||
gui.realmsNotification = new RealmsNotificationProxy((GuiScreenRealmsProxy) gui.realmsNotification, realmsOffset);
|
||||
}
|
||||
//#endif
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
/* FIXME
|
||||
//#if MC>=11300
|
||||
private static class RealmsNotificationProxy extends GuiScreen {
|
||||
private final GuiScreenRealmsProxy proxy;
|
||||
@@ -74,30 +70,25 @@ public class MainMenuHandler {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setGuiSize(int w, int h) {
|
||||
proxy.setGuiSize(w, h);
|
||||
public void setWorldAndResolution(Minecraft mc, int width, int height) {
|
||||
proxy.setWorldAndResolution(mc, width, height);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initGui() {
|
||||
proxy.initGui();
|
||||
public void tick() {
|
||||
proxy.tick();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateScreen() {
|
||||
proxy.updateScreen();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawScreen(int mouseX, int mouseY, float partialTicks) {
|
||||
public void render(int mouseX, int mouseY, float partialTicks) {
|
||||
GL11.glTranslated(0, offset, 0);
|
||||
proxy.drawScreen(mouseX, mouseY - offset, partialTicks);
|
||||
proxy.render(mouseX, mouseY - offset, partialTicks);
|
||||
GL11.glTranslated(0, -offset, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mouseClicked(int mouseX, int mouseY, int mouseButton) throws IOException {
|
||||
proxy.mouseClicked(mouseX, mouseY - offset, mouseButton);
|
||||
public boolean mouseClicked(double mouseX, double mouseY, int mouseButton) {
|
||||
return proxy.mouseClicked(mouseX, mouseY - offset, mouseButton);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -106,5 +97,4 @@ public class MainMenuHandler {
|
||||
}
|
||||
}
|
||||
//#endif
|
||||
*/
|
||||
}
|
||||
|
||||
@@ -11,11 +11,12 @@ import net.minecraftforge.registries.RegistryManager;
|
||||
//#else
|
||||
//$$ import cpw.mods.fml.common.registry.GameData;
|
||||
//#endif
|
||||
//$$ import java.util.stream.Stream;
|
||||
//#endif
|
||||
|
||||
//#if MC>=10800
|
||||
//#if MC>=11300
|
||||
// FIXME
|
||||
import net.minecraftforge.fml.ModList;
|
||||
//#else
|
||||
//$$ import net.minecraftforge.fml.common.Loader;
|
||||
//$$ import net.minecraftforge.fml.common.ModContainer;
|
||||
@@ -28,13 +29,20 @@ import net.minecraftforge.registries.RegistryManager;
|
||||
import java.util.*;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
public class ModCompat {
|
||||
@SuppressWarnings("unchecked")
|
||||
public static Collection<ModInfo> getInstalledNetworkMods() {
|
||||
//#if MC>=11300
|
||||
return Stream.<ModInfo>empty().collect(Collectors.toList());
|
||||
Map<String, ModInfo> modInfoMap = ModList.get().getMods().stream()
|
||||
.map(m -> new ModInfo(m.getModId(), m.getDisplayName(), m.getVersion().toString()))
|
||||
.collect(Collectors.toMap(ModInfo::getId, Function.identity()));
|
||||
return RegistryManager.ACTIVE.takeSnapshot(false).keySet().stream()
|
||||
.map(RegistryManager.ACTIVE::getRegistry)
|
||||
.map(ForgeRegistry::getKeys).flatMap(Set::stream)
|
||||
.map(ResourceLocation::getNamespace).filter(s -> !s.equals("minecraft")).distinct()
|
||||
.map(modInfoMap::get).filter(Objects::nonNull)
|
||||
.collect(Collectors.toList());
|
||||
//#else
|
||||
//$$ Map<String, ModContainer> ignoreCaseMap = Loader.instance().getModList().stream()
|
||||
//$$ .collect(Collectors.toMap(m -> m.getModId().toLowerCase(), Function.identity()));
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
package com.replaymod.core.utils;
|
||||
|
||||
import org.lwjgl.BufferUtils;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import java.nio.IntBuffer;
|
||||
|
||||
public class OpenGLUtils {
|
||||
public static final int VIEWPORT_MAX_WIDTH;
|
||||
public static final int VIEWPORT_MAX_HEIGHT;
|
||||
|
||||
static {
|
||||
IntBuffer buffer = BufferUtils.createIntBuffer(16);
|
||||
//#if MC>=11300
|
||||
// FIXME GL11.glGetIntegerv(GL11.GL_MAX_VIEWPORT_DIMS, buffer);
|
||||
buffer.put(0xffff);
|
||||
buffer.put(0xffff);
|
||||
//#else
|
||||
//$$ GL11.glGetInteger(GL11.GL_MAX_VIEWPORT_DIMS, buffer);
|
||||
//#endif
|
||||
VIEWPORT_MAX_WIDTH = buffer.get();
|
||||
VIEWPORT_MAX_HEIGHT = buffer.get();
|
||||
}
|
||||
|
||||
/**
|
||||
* Magic init method which has to be called from the OpenGL thread so the variables in this class
|
||||
* can be initialized successfully.
|
||||
* Does not perform any work on its own.
|
||||
*/
|
||||
public static void init() {
|
||||
}
|
||||
}
|
||||
@@ -20,6 +20,7 @@ import de.johni0702.minecraft.gui.popup.GuiInfoPopup;
|
||||
import de.johni0702.minecraft.gui.utils.Colors;
|
||||
import de.johni0702.minecraft.gui.utils.lwjgl.Dimension;
|
||||
import de.johni0702.minecraft.gui.utils.lwjgl.ReadableDimension;
|
||||
import de.johni0702.minecraft.gui.versions.MCVer;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.crash.CrashReport;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
@@ -284,8 +285,8 @@ public class Utils {
|
||||
l -> new GuiLabel().setText(l).setColor(Colors.BLACK)).toArray(GuiElement[]::new)));
|
||||
|
||||
// Replace close button with panel containing close and copy buttons
|
||||
GuiButton copyToClipboardButton = new GuiButton().setI18nLabel("chat.copy")/* FIXME .onClick(() ->
|
||||
//GuiScreen.setClipboardString(crashReport))*/.setSize(150, 20);
|
||||
GuiButton copyToClipboardButton = new GuiButton().setI18nLabel("chat.copy").onClick(() ->
|
||||
MCVer.setClipboardString(crashReport)).setSize(150, 20);
|
||||
GuiButton closeButton = getCloseButton();
|
||||
popup.removeElement(closeButton);
|
||||
popup.addElements(new VerticalLayout.Data(1),
|
||||
|
||||
@@ -433,11 +433,14 @@ public class MCVer {
|
||||
//$$ }
|
||||
//#endif
|
||||
|
||||
/* FIXME
|
||||
public static ListenableFuture setServerResourcePack(ResourcePackRepository repo, File file) {
|
||||
public static ListenableFuture setServerResourcePack(File file) {
|
||||
//#if MC>=11300
|
||||
return getMinecraft().getPackFinder().func_195741_a(file);
|
||||
//#else
|
||||
//$$ ResourcePackRepository repo = getMinecraft().getResourcePackRepository();
|
||||
//#if MC>=10809
|
||||
//#if MC>=11200
|
||||
return repo.setServerResourcePack(file);
|
||||
//$$ return repo.setServerResourcePack(file);
|
||||
//#else
|
||||
//$$ return repo.setResourcePackInstance(file);
|
||||
//#endif
|
||||
@@ -451,8 +454,8 @@ public class MCVer {
|
||||
//$$ return Futures.immediateFuture(null);
|
||||
//#endif
|
||||
//#endif
|
||||
//#endif
|
||||
}
|
||||
*/
|
||||
|
||||
public static boolean isKeyDown(KeyBinding keyBinding) {
|
||||
//#if MC>=10800
|
||||
|
||||
@@ -54,7 +54,7 @@ public class FullBrightness implements Extra {
|
||||
public void run() {
|
||||
active = !active;
|
||||
//#if MC>=11300
|
||||
// FIXME check if this is no longer required (especially when replay is paused)
|
||||
mod.getMinecraft().entityRenderer.tick(); // need to tick once to update lightmap when replay is paused
|
||||
//#else
|
||||
//$$ mod.getMinecraft().entityRenderer.lightmapUpdateNeeded = true;
|
||||
//#endif
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.replaymod.extras;
|
||||
|
||||
import com.replaymod.core.ReplayMod;
|
||||
import com.replaymod.core.Setting;
|
||||
import com.replaymod.core.versions.MCVer;
|
||||
import de.johni0702.minecraft.gui.container.AbstractGuiScreen;
|
||||
import de.johni0702.minecraft.gui.container.GuiContainer;
|
||||
@@ -40,7 +39,6 @@ import static com.replaymod.extras.ReplayModExtras.LOGGER;
|
||||
|
||||
public class OpenEyeExtra implements Extra {
|
||||
private static final String DOWNLOAD_URL = "https://www.replaymod.com/dl/openeye/" + ReplayMod.getMinecraftVersion();
|
||||
private static final Setting<Boolean> ASK_FOR_OPEN_EYE = new Setting<>("advanced", "askForOpenEye", null, true);
|
||||
|
||||
private ReplayMod mod;
|
||||
|
||||
@@ -53,7 +51,7 @@ public class OpenEyeExtra implements Extra {
|
||||
//#else
|
||||
//$$ boolean isOpenEyeLoaded = Loader.isModLoaded("OpenEye");
|
||||
//#endif
|
||||
if (!isOpenEyeLoaded && mod.getSettingsRegistry().get(ASK_FOR_OPEN_EYE)) {
|
||||
if (!isOpenEyeLoaded && mod.getSettingsRegistry().get(Setting.ASK_FOR_OPEN_EYE)) {
|
||||
new Thread(() -> {
|
||||
try {
|
||||
LOGGER.trace("Checking for OpenEye availability");
|
||||
@@ -121,7 +119,7 @@ public class OpenEyeExtra implements Extra {
|
||||
}).start();
|
||||
});
|
||||
noButton.onClick(() -> {
|
||||
mod.getSettingsRegistry().set(ASK_FOR_OPEN_EYE, false);
|
||||
mod.getSettingsRegistry().set(Setting.ASK_FOR_OPEN_EYE, false);
|
||||
mod.getSettingsRegistry().save();
|
||||
parent.display();
|
||||
});
|
||||
|
||||
@@ -3,6 +3,8 @@ package com.replaymod.extras;
|
||||
import com.replaymod.core.SettingsRegistry;
|
||||
|
||||
public final class Setting<T> {
|
||||
public static final SettingsRegistry.SettingKey<Boolean> ASK_FOR_OPEN_EYE =
|
||||
new SettingsRegistry.SettingKeys<>("advanced", "askForOpenEye", null, true);
|
||||
public static final SettingsRegistry.SettingKey<Boolean> SKIP_POST_SCREENSHOT_GUI =
|
||||
new SettingsRegistry.SettingKeys<>("advanced", "skipPostScreenshotGui", null, false);
|
||||
}
|
||||
|
||||
@@ -26,7 +26,8 @@ public class ScreenshotRenderer implements RenderInfo {
|
||||
public boolean renderScreenshot() throws Throwable {
|
||||
try {
|
||||
//#if MC>=11300
|
||||
// FIXME
|
||||
int displayWidthBefore = mc.mainWindow.framebufferWidth;
|
||||
int displayHeightBefore = mc.mainWindow.framebufferHeight;
|
||||
//#else
|
||||
//$$ int displayWidthBefore = mc.displayWidth;
|
||||
//$$ int displayHeightBefore = mc.displayHeight;
|
||||
@@ -48,7 +49,9 @@ public class ScreenshotRenderer implements RenderInfo {
|
||||
|
||||
mc.gameSettings.hideGUI = hideGUIBefore;
|
||||
//#if MC>=11300
|
||||
// FIXME
|
||||
mc.mainWindow.framebufferWidth = displayWidthBefore;
|
||||
mc.mainWindow.framebufferHeight = displayHeightBefore;
|
||||
mc.getFramebuffer().createBindFramebuffer(displayWidthBefore, displayHeightBefore);
|
||||
//#else
|
||||
//$$ mc.resize(displayWidthBefore, displayHeightBefore);
|
||||
//#endif
|
||||
|
||||
@@ -74,7 +74,7 @@ public class ReplayModRecording implements Module {
|
||||
new GuiHandler(core).register();
|
||||
|
||||
//#if MC>=11300
|
||||
// FIXME
|
||||
NetworkRegistry.newEventChannel(Restrictions.PLUGIN_CHANNEL, () -> "0", any -> true, any -> true);
|
||||
//#else
|
||||
//$$ NetworkRegistry.INSTANCE.newChannel(Restrictions.PLUGIN_CHANNEL, new RestrictionsChannelHandler());
|
||||
//#endif
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
//#if MC>=11300
|
||||
package com.replaymod.recording.mixin;
|
||||
|
||||
import com.google.common.util.concurrent.ListenableFuture;
|
||||
import com.replaymod.recording.packet.ResourcePackRecorder;
|
||||
import de.johni0702.minecraft.gui.utils.Consumer;
|
||||
import net.minecraft.client.resources.DownloadingPackFinder;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Redirect;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
@Mixin(DownloadingPackFinder.class)
|
||||
public abstract class MixinDownloadingPackFinder implements ResourcePackRecorder.IDownloadingPackFinder {
|
||||
private Consumer<File> requestCallback;
|
||||
|
||||
@Override
|
||||
public void setRequestCallback(Consumer<File> callback) {
|
||||
requestCallback = callback;
|
||||
}
|
||||
|
||||
@Shadow
|
||||
public abstract ListenableFuture<Object> func_195741_a(File file);
|
||||
|
||||
@Redirect(method = "downloadResourcePack", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/resources/DownloadingPackFinder;func_195741_a(Ljava/io/File;)Lcom/google/common/util/concurrent/ListenableFuture;"))
|
||||
private ListenableFuture<Object> recordDownloadedPack(DownloadingPackFinder downloadingPackFinder, File file) {
|
||||
if (requestCallback != null) {
|
||||
requestCallback.consume(file);
|
||||
requestCallback = null;
|
||||
}
|
||||
return func_195741_a(file);
|
||||
}
|
||||
}
|
||||
//#endif
|
||||
@@ -1,34 +1,32 @@
|
||||
package com.replaymod.recording.mixin;
|
||||
|
||||
//#if MC>=10904
|
||||
import com.replaymod.recording.handler.RecordingEventHandler;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.multiplayer.PlayerControllerMP;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Redirect;
|
||||
|
||||
import static com.replaymod.core.versions.MCVer.*;
|
||||
|
||||
@Mixin(PlayerControllerMP.class)
|
||||
public abstract class MixinPlayerControllerMP implements RecordingEventHandler.RecordingEventSender {
|
||||
|
||||
@Shadow
|
||||
private Minecraft mc;
|
||||
|
||||
// Redirects the call to playEvent without the initial player argument to the method with that argument
|
||||
// The new method will then play it and (if applicable) record it. (See MixinWorldClient)
|
||||
// This is necessary for the block break event (particles and sound) to be recorded. Otherwise it looks like the
|
||||
// event was emitted because of a packet (player will be null) and not as it actually was (by the player).
|
||||
/* FIXME test if this is still an issue (the call seems to be gone)
|
||||
@Redirect(method = "onPlayerDestroyBlock", at = @At(value = "INVOKE",
|
||||
target = "Lnet/minecraft/world/World;playEvent(ILnet/minecraft/util/math/BlockPos;I)V"))
|
||||
public void replayModRecording_playEvent_fixed(World world, int type, BlockPos pos, int data) {
|
||||
world.playEvent(player(mc), type, pos, data);
|
||||
}
|
||||
*/
|
||||
}
|
||||
//#if MC>=10904 && MC<11300
|
||||
//$$ import com.replaymod.recording.handler.RecordingEventHandler;
|
||||
//$$ import net.minecraft.client.Minecraft;
|
||||
//$$ import net.minecraft.client.multiplayer.PlayerControllerMP;
|
||||
//$$ import net.minecraft.util.math.BlockPos;
|
||||
//$$ import net.minecraft.world.World;
|
||||
//$$ import org.spongepowered.asm.mixin.Mixin;
|
||||
//$$ import org.spongepowered.asm.mixin.Shadow;
|
||||
//$$ import org.spongepowered.asm.mixin.injection.At;
|
||||
//$$ import org.spongepowered.asm.mixin.injection.Redirect;
|
||||
//$$
|
||||
//$$ import static com.replaymod.core.versions.MCVer.*;
|
||||
//$$
|
||||
//$$ @Mixin(PlayerControllerMP.class)
|
||||
//$$ public abstract class MixinPlayerControllerMP implements RecordingEventHandler.RecordingEventSender {
|
||||
//$$
|
||||
//$$ @Shadow
|
||||
//$$ private Minecraft mc;
|
||||
//$$
|
||||
//$$ // Redirects the call to playEvent without the initial player argument to the method with that argument
|
||||
//$$ // The new method will then play it and (if applicable) record it. (See MixinWorldClient)
|
||||
//$$ // This is necessary for the block break event (particles and sound) to be recorded. Otherwise it looks like the
|
||||
//$$ // event was emitted because of a packet (player will be null) and not as it actually was (by the player).
|
||||
//$$ @Redirect(method = "onPlayerDestroyBlock", at = @At(value = "INVOKE",
|
||||
//$$ target = "Lnet/minecraft/world/World;playEvent(ILnet/minecraft/util/math/BlockPos;I)V"))
|
||||
//$$ public void replayModRecording_playEvent_fixed(World world, int type, BlockPos pos, int data) {
|
||||
//$$ world.playEvent(player(mc), type, pos, data);
|
||||
//$$ }
|
||||
//$$ }
|
||||
//#endif
|
||||
|
||||
@@ -33,7 +33,9 @@ import net.minecraft.util.text.TextComponentString;
|
||||
|
||||
//#if MC>=10800
|
||||
import net.minecraft.network.EnumPacketDirection;
|
||||
// FIXME import net.minecraftforge.fml.common.network.internal.FMLProxyPacket;
|
||||
//#if MC<11300
|
||||
//$$ import net.minecraftforge.fml.common.network.internal.FMLProxyPacket;
|
||||
//#endif
|
||||
//#else
|
||||
//$$ import cpw.mods.fml.common.network.internal.FMLProxyPacket;
|
||||
//#endif
|
||||
@@ -244,18 +246,18 @@ public class PacketListener extends ChannelInboundHandlerAdapter {
|
||||
//#endif
|
||||
//#endif
|
||||
|
||||
/* FIXME
|
||||
if (packet instanceof FMLProxyPacket) {
|
||||
// This packet requires special handling
|
||||
//#if MC<11300
|
||||
//$$ if (packet instanceof FMLProxyPacket) {
|
||||
//$$ // This packet requires special handling
|
||||
//#if MC>=10800
|
||||
((FMLProxyPacket) packet).toS3FPackets().forEach(this::save);
|
||||
//$$ ((FMLProxyPacket) packet).toS3FPackets().forEach(this::save);
|
||||
//#else
|
||||
//$$ save(((FMLProxyPacket) packet).toS3FPacket());
|
||||
//#endif
|
||||
super.channelRead(ctx, msg);
|
||||
return;
|
||||
}
|
||||
*/
|
||||
//$$ super.channelRead(ctx, msg);
|
||||
//$$ return;
|
||||
//$$ }
|
||||
//#endif
|
||||
|
||||
save(packet);
|
||||
|
||||
|
||||
@@ -4,19 +4,20 @@ import com.google.common.hash.Hashing;
|
||||
import com.google.common.io.Files;
|
||||
import com.replaymod.replaystudio.replay.ReplayFile;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiScreenWorking;
|
||||
import net.minecraft.client.gui.GuiYesNo;
|
||||
import net.minecraft.client.gui.GuiYesNoCallback;
|
||||
import net.minecraft.client.multiplayer.ServerData;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.util.HttpUtil;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
//#if MC>=11300
|
||||
// FIXME
|
||||
import de.johni0702.minecraft.gui.utils.Consumer;
|
||||
import net.minecraft.client.resources.DownloadingPackFinder;
|
||||
//#else
|
||||
//$$ import net.minecraft.client.gui.GuiScreenWorking;
|
||||
//$$ import net.minecraft.client.resources.ResourcePackRepository;
|
||||
//$$ import net.minecraft.util.HttpUtil;
|
||||
//#endif
|
||||
|
||||
//#if MC>=10904
|
||||
@@ -38,7 +39,9 @@ import com.google.common.util.concurrent.Futures;
|
||||
import com.google.common.util.concurrent.ListenableFuture;
|
||||
import net.minecraft.client.network.NetHandlerPlayClient;
|
||||
import net.minecraft.network.NetworkManager;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
//#if MC<11300
|
||||
//$$ import org.apache.commons.io.FileUtils;
|
||||
//#endif
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
//#else
|
||||
@@ -141,8 +144,7 @@ public class ResourcePackRecorder {
|
||||
|
||||
if (levelDir.isFile()) {
|
||||
netManager.sendPacket(makeStatusPacket(hash, Action.ACCEPTED));
|
||||
/* FIXME
|
||||
Futures.addCallback(setServerResourcePack(mc.getResourcePackRepository(), levelDir), new FutureCallback<Object>() {
|
||||
Futures.addCallback(setServerResourcePack(levelDir), new FutureCallback<Object>() {
|
||||
@Override
|
||||
public void onSuccess(Object result) {
|
||||
recordResourcePack(levelDir, requestId);
|
||||
@@ -154,7 +156,6 @@ public class ResourcePackRecorder {
|
||||
netManager.sendPacket(makeStatusPacket(hash, Action.FAILED_DOWNLOAD));
|
||||
}
|
||||
});
|
||||
*/
|
||||
} else {
|
||||
netManager.sendPacket(makeStatusPacket(hash, Action.FAILED_DOWNLOAD));
|
||||
}
|
||||
@@ -162,7 +163,7 @@ public class ResourcePackRecorder {
|
||||
final ServerData serverData = mc.getCurrentServerData();
|
||||
if (serverData != null && serverData.getResourceMode() == ServerData.ServerResourceMode.ENABLED) {
|
||||
netManager.sendPacket(makeStatusPacket(hash, Action.ACCEPTED));
|
||||
// FIXME downloadResourcePackFuture(requestId, url, hash);
|
||||
downloadResourcePackFuture(requestId, url, hash);
|
||||
} else if (serverData != null && serverData.getResourceMode() != ServerData.ServerResourceMode.PROMPT) {
|
||||
netManager.sendPacket(makeStatusPacket(hash, Action.DECLINED));
|
||||
} else {
|
||||
@@ -180,7 +181,7 @@ public class ResourcePackRecorder {
|
||||
}
|
||||
if (result) {
|
||||
netManager.sendPacket(makeStatusPacket(hash, Action.ACCEPTED));
|
||||
// FIXME downloadResourcePackFuture(requestId, url, hash);
|
||||
downloadResourcePackFuture(requestId, url, hash);
|
||||
} else {
|
||||
netManager.sendPacket(makeStatusPacket(hash, Action.DECLINED));
|
||||
}
|
||||
@@ -199,7 +200,6 @@ public class ResourcePackRecorder {
|
||||
//#endif
|
||||
}
|
||||
|
||||
/* FIXME
|
||||
private void downloadResourcePackFuture(int requestId, String url, final String hash) {
|
||||
Futures.addCallback(downloadResourcePack(requestId, url, hash), new FutureCallback() {
|
||||
@Override
|
||||
@@ -214,101 +214,112 @@ public class ResourcePackRecorder {
|
||||
});
|
||||
}
|
||||
|
||||
//#if MC>=11300
|
||||
private ListenableFuture downloadResourcePack(final int requestId, String url, String hash) {
|
||||
final ResourcePackRepository repo = mc.mcResourcePackRepository;
|
||||
String fileName;
|
||||
if (hash.matches("^[a-f0-9]{40}$")) {
|
||||
fileName = hash;
|
||||
} else {
|
||||
fileName = url.substring(url.lastIndexOf("/") + 1);
|
||||
DownloadingPackFinder packFinder = mc.getPackFinder();
|
||||
((IDownloadingPackFinder) packFinder).setRequestCallback(file -> recordResourcePack(file, requestId));
|
||||
return packFinder.downloadResourcePack(url, hash);
|
||||
}
|
||||
|
||||
if (fileName.contains("?")) {
|
||||
fileName = fileName.substring(0, fileName.indexOf("?"));
|
||||
}
|
||||
|
||||
if (!fileName.endsWith(".zip")) {
|
||||
return Futures.immediateFailedFuture(new IllegalArgumentException("Invalid filename; must end in .zip"));
|
||||
}
|
||||
|
||||
fileName = "legacy_" + fileName.replaceAll("\\W", "");
|
||||
}
|
||||
|
||||
final File file = new File(repo.dirServerResourcepacks, fileName);
|
||||
public interface IDownloadingPackFinder {
|
||||
void setRequestCallback(Consumer<File> callback);
|
||||
}
|
||||
//#else
|
||||
//$$ private ListenableFuture downloadResourcePack(final int requestId, String url, String hash) {
|
||||
//$$ final ResourcePackRepository repo = mc.mcResourcePackRepository;
|
||||
//$$ String fileName;
|
||||
//$$ if (hash.matches("^[a-f0-9]{40}$")) {
|
||||
//$$ fileName = hash;
|
||||
//$$ } else {
|
||||
//$$ fileName = url.substring(url.lastIndexOf("/") + 1);
|
||||
//$$
|
||||
//$$ if (fileName.contains("?")) {
|
||||
//$$ fileName = fileName.substring(0, fileName.indexOf("?"));
|
||||
//$$ }
|
||||
//$$
|
||||
//$$ if (!fileName.endsWith(".zip")) {
|
||||
//$$ return Futures.immediateFailedFuture(new IllegalArgumentException("Invalid filename; must end in .zip"));
|
||||
//$$ }
|
||||
//$$
|
||||
//$$ fileName = "legacy_" + fileName.replaceAll("\\W", "");
|
||||
//$$ }
|
||||
//$$
|
||||
//$$ final File file = new File(repo.dirServerResourcepacks, fileName);
|
||||
//#if MC>=10809
|
||||
repo.lock.lock();
|
||||
//$$ repo.lock.lock();
|
||||
//#else
|
||||
//$$ repo.field_177321_h.lock();
|
||||
//#endif
|
||||
try {
|
||||
//$$ try {
|
||||
//#if MC>=10809
|
||||
repo.clearResourcePack();
|
||||
//$$ repo.clearResourcePack();
|
||||
//#else
|
||||
//$$ repo.func_148529_f();
|
||||
//#endif
|
||||
|
||||
if (file.exists() && hash.length() == 40) {
|
||||
try {
|
||||
String fileHash = Hashing.sha1().hashBytes(Files.toByteArray(file)).toString();
|
||||
if (fileHash.equals(hash)) {
|
||||
recordResourcePack(file, requestId);
|
||||
return setServerResourcePack(repo, file);
|
||||
}
|
||||
|
||||
logger.warn("File " + file + " had wrong hash (expected " + hash + ", found " + fileHash + "). Deleting it.");
|
||||
FileUtils.deleteQuietly(file);
|
||||
} catch (IOException ioexception) {
|
||||
logger.warn("File " + file + " couldn\'t be hashed. Deleting it.", ioexception);
|
||||
FileUtils.deleteQuietly(file);
|
||||
}
|
||||
}
|
||||
|
||||
final GuiScreenWorking guiScreen = new GuiScreenWorking();
|
||||
final Minecraft mc = Minecraft.getMinecraft();
|
||||
|
||||
Futures.getUnchecked(mc.addScheduledTask(() -> mc.displayGuiScreen(guiScreen)));
|
||||
|
||||
//$$
|
||||
//$$ if (file.exists() && hash.length() == 40) {
|
||||
//$$ try {
|
||||
//$$ String fileHash = Hashing.sha1().hashBytes(Files.toByteArray(file)).toString();
|
||||
//$$ if (fileHash.equals(hash)) {
|
||||
//$$ recordResourcePack(file, requestId);
|
||||
//$$ return setServerResourcePack(file);
|
||||
//$$ }
|
||||
//$$
|
||||
//$$ logger.warn("File " + file + " had wrong hash (expected " + hash + ", found " + fileHash + "). Deleting it.");
|
||||
//$$ FileUtils.deleteQuietly(file);
|
||||
//$$ } catch (IOException ioexception) {
|
||||
//$$ logger.warn("File " + file + " couldn\'t be hashed. Deleting it.", ioexception);
|
||||
//$$ FileUtils.deleteQuietly(file);
|
||||
//$$ }
|
||||
//$$ }
|
||||
//$$
|
||||
//$$ final GuiScreenWorking guiScreen = new GuiScreenWorking();
|
||||
//$$ final Minecraft mc = Minecraft.getMinecraft();
|
||||
//$$
|
||||
//$$ Futures.getUnchecked(mc.addScheduledTask(() -> mc.displayGuiScreen(guiScreen)));
|
||||
//$$
|
||||
//#if MC>=10809
|
||||
//#if MC>=11002
|
||||
//#if MC>=11100
|
||||
Map<String, String> sessionInfo = ResourcePackRepository.getDownloadHeaders();
|
||||
//$$ Map<String, String> sessionInfo = ResourcePackRepository.getDownloadHeaders();
|
||||
//#else
|
||||
//$$ Map<String, String> sessionInfo = ResourcePackRepository.func_190115_a();
|
||||
//#endif
|
||||
//#else
|
||||
//$$ Map<String, String> sessionInfo = Minecraft.getSessionInfo();
|
||||
//#endif
|
||||
repo.downloadingPacks = HttpUtil.downloadResourcePack(file, url, sessionInfo, 50 * 1024 * 1024, guiScreen, mc.getProxy());
|
||||
Futures.addCallback(repo.downloadingPacks, new FutureCallback<Object>() {
|
||||
//$$ repo.downloadingPacks = HttpUtil.downloadResourcePack(file, url, sessionInfo, 50 * 1024 * 1024, guiScreen, mc.getProxy());
|
||||
//$$ Futures.addCallback(repo.downloadingPacks, new FutureCallback<Object>() {
|
||||
//#else
|
||||
//$$ Map sessionInfo = Minecraft.getSessionInfo();
|
||||
//$$ repo.field_177322_i = HttpUtil.func_180192_a(file, url, sessionInfo, 50 * 1024 * 1024, guiScreen, mc.getProxy());
|
||||
//$$ Futures.addCallback(repo.field_177322_i, new FutureCallback() {
|
||||
//#endif
|
||||
@Override
|
||||
public void onSuccess(Object value) {
|
||||
recordResourcePack(file, requestId);
|
||||
setServerResourcePack(repo, file);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(@Nonnull Throwable throwable) {
|
||||
throwable.printStackTrace();
|
||||
}
|
||||
});
|
||||
//$$ @Override
|
||||
//$$ public void onSuccess(Object value) {
|
||||
//$$ recordResourcePack(file, requestId);
|
||||
//$$ setServerResourcePack(file);
|
||||
//$$ }
|
||||
//$$
|
||||
//$$ @Override
|
||||
//$$ public void onFailure(@Nonnull Throwable throwable) {
|
||||
//$$ throwable.printStackTrace();
|
||||
//$$ }
|
||||
//$$ });
|
||||
//#if MC>=10809
|
||||
return repo.downloadingPacks;
|
||||
//$$ return repo.downloadingPacks;
|
||||
//#else
|
||||
//$$ return repo.field_177322_i;
|
||||
//#endif
|
||||
} finally {
|
||||
//$$ } finally {
|
||||
//#if MC>=10809
|
||||
repo.lock.unlock();
|
||||
//$$ repo.lock.unlock();
|
||||
//#else
|
||||
//$$ repo.field_177321_h.unlock();
|
||||
//#endif
|
||||
}
|
||||
}
|
||||
*/
|
||||
//$$ }
|
||||
//$$ }
|
||||
//#endif
|
||||
//#else
|
||||
//$$ public synchronized S3FPacketCustomPayload handleResourcePack(S3FPacketCustomPayload packet) {
|
||||
//$$ final int requestId = nextRequestId++;
|
||||
|
||||
@@ -582,7 +582,7 @@ public class FullReplaySender extends ChannelDuplexHandler implements ReplaySend
|
||||
if (!file.exists()) {
|
||||
IOUtils.copy(replayFile.getResourcePack(hash).get(), new FileOutputStream(file));
|
||||
}
|
||||
// FIXME setServerResourcePack(mc.getResourcePackRepository(), file);
|
||||
setServerResourcePack(file);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
||||
@@ -690,10 +690,9 @@ public class ReplayHandler {
|
||||
//#if MC>=11300
|
||||
if (entity instanceof EntityLivingBase) {
|
||||
EntityLivingBase e = (EntityLivingBase) entity;
|
||||
// FIXME
|
||||
// e.setPosition(e.otherPlayerMPX, e.otherPlayerMPY, e.otherPlayerMPZ);
|
||||
// e.rotationYaw = (float) e.otherPlayerMPYaw;
|
||||
// e.rotationPitch = (float) e.otherPlayerMPPitch;
|
||||
e.setPosition(e.interpTargetX, e.interpTargetY, e.interpTargetZ);
|
||||
e.rotationYaw = (float) e.interpTargetYaw;
|
||||
e.rotationPitch = (float) e.interpTargetPitch;
|
||||
}
|
||||
//#else
|
||||
//$$ if (entity instanceof EntityOtherPlayerMP) {
|
||||
|
||||
@@ -10,14 +10,12 @@ import com.replaymod.replay.events.ReplayChatMessageEvent;
|
||||
import com.replaymod.replaystudio.util.Location;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.entity.AbstractClientPlayer;
|
||||
import net.minecraft.client.network.NetHandlerPlayClient;
|
||||
import net.minecraft.client.settings.KeyBinding;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.item.EntityItemFrame;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
@@ -29,6 +27,9 @@ import net.minecraftforge.common.MinecraftForge;
|
||||
|
||||
//#if MC>=11300
|
||||
import net.minecraft.util.math.RayTraceFluidMode;
|
||||
//#else
|
||||
//$$ import net.minecraft.block.material.Material;
|
||||
//$$ import net.minecraft.entity.EntityLivingBase;
|
||||
//#endif
|
||||
|
||||
//#if MC>=10904
|
||||
@@ -289,12 +290,12 @@ public class CameraEntity
|
||||
return falseUnlessSpectating(Entity::isEntityInsideOpaqueBlock); // Make sure no suffocation overlay is rendered
|
||||
}
|
||||
|
||||
/* FIXME
|
||||
@Override
|
||||
public boolean isInsideOfMaterial(Material materialIn) {
|
||||
return falseUnlessSpectating(e -> e.isInsideOfMaterial(materialIn)); // Make sure no overlays are rendered
|
||||
}
|
||||
*/
|
||||
//#if MC<11300
|
||||
//$$ @Override
|
||||
//$$ public boolean isInsideOfMaterial(Material materialIn) {
|
||||
//$$ return falseUnlessSpectating(e -> e.isInsideOfMaterial(materialIn)); // Make sure no overlays are rendered
|
||||
//$$ }
|
||||
//#endif
|
||||
|
||||
//#if MC>=10800
|
||||
@Override
|
||||
@@ -473,13 +474,13 @@ public class CameraEntity
|
||||
//$$ }
|
||||
//#endif
|
||||
|
||||
/* FIXME
|
||||
@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
|
||||
// Note: Vanilla GUIs are filtered out on a packet level, this only applies to mod GUIs
|
||||
}
|
||||
*/
|
||||
//#if MC<11300
|
||||
//$$ @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
|
||||
//$$ // Note: Vanilla GUIs are filtered out on a packet level, this only applies to mod GUIs
|
||||
//$$ }
|
||||
//#endif
|
||||
|
||||
@Override
|
||||
//#if MC>=11300
|
||||
@@ -618,14 +619,12 @@ public class CameraEntity
|
||||
lastHandRendered = player;
|
||||
|
||||
//#if MC>=10904
|
||||
/* FIXME needs AT
|
||||
mc.entityRenderer.itemRenderer.prevEquippedProgressMainHand = 1;
|
||||
mc.entityRenderer.itemRenderer.prevEquippedProgressOffHand = 1;
|
||||
mc.entityRenderer.itemRenderer.equippedProgressMainHand = 1;
|
||||
mc.entityRenderer.itemRenderer.equippedProgressOffHand = 1;
|
||||
mc.entityRenderer.itemRenderer.itemStackMainHand = player.getItemStackFromSlot(EntityEquipmentSlot.MAINHAND);
|
||||
mc.entityRenderer.itemRenderer.itemStackOffHand = player.getItemStackFromSlot(EntityEquipmentSlot.OFFHAND);
|
||||
*/
|
||||
//#else
|
||||
//$$ mc.entityRenderer.itemRenderer.prevEquippedProgress = 1;
|
||||
//$$ mc.entityRenderer.itemRenderer.equippedProgress = 1;
|
||||
|
||||
@@ -33,6 +33,11 @@ public net.minecraft.client.MainWindow field_198131_r # framebufferWidth
|
||||
public net.minecraft.client.MainWindow field_198132_s # framebufferHeight
|
||||
##endif
|
||||
|
||||
##if MC>=11300
|
||||
# FirstPersonRenderer
|
||||
public net.minecraft.client.renderer.FirstPersonRenderer *
|
||||
##endif
|
||||
|
||||
# Packets
|
||||
##if MC>=11300
|
||||
public net.minecraft.network.play.server.SPacketJoinGame field_149200_f # maxPlayers
|
||||
@@ -181,6 +186,13 @@ public net.minecraft.client.renderer.GlStateManager$BooleanState *
|
||||
# EntityLivingBase
|
||||
public net.minecraft.entity.EntityLivingBase field_184621_as # HAND_STATES
|
||||
public net.minecraft.entity.EntityLivingBase field_184628_bn # activeItemStackUseCount
|
||||
##if MC>=11300
|
||||
public net.minecraft.entity.EntityLivingBase field_184623_bh # interpTargetX
|
||||
public net.minecraft.entity.EntityLivingBase field_184624_bi # interpTargetY
|
||||
public net.minecraft.entity.EntityLivingBase field_184625_bj # interpTargetZ
|
||||
public net.minecraft.entity.EntityLivingBase field_184626_bk # interpTargetYaw
|
||||
public net.minecraft.entity.EntityLivingBase field_70709_bj # interpTargetPitch
|
||||
##endif
|
||||
##endif
|
||||
|
||||
# Particles
|
||||
|
||||
@@ -5,11 +5,14 @@
|
||||
"server": [],
|
||||
"client": [
|
||||
//#if MC>=11300
|
||||
"MixinDownloadingPackFinder",
|
||||
"MixinKeyboardListener",
|
||||
"MixinMouseHelper",
|
||||
//#endif
|
||||
//#if MC>=10904
|
||||
"MixinPlayerControllerMP",
|
||||
//#if MC<11300
|
||||
//$$ "MixinPlayerControllerMP",
|
||||
//#endif
|
||||
"MixinWorldClient",
|
||||
//#endif
|
||||
//#if MC<=10710
|
||||
|
||||
Reference in New Issue
Block a user