Get rid of all the ATs in favor of Mixins
This commit is contained in:
@@ -10,6 +10,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
|||||||
//#if MC>=11400
|
//#if MC>=11400
|
||||||
//$$ import com.replaymod.core.events.PreRenderHandCallback;
|
//$$ import com.replaymod.core.events.PreRenderHandCallback;
|
||||||
//#else
|
//#else
|
||||||
|
import com.replaymod.core.versions.MCVer;
|
||||||
import net.minecraftforge.client.ForgeHooksClient;
|
import net.minecraftforge.client.ForgeHooksClient;
|
||||||
//#endif
|
//#endif
|
||||||
|
|
||||||
@@ -20,15 +21,15 @@ import net.minecraftforge.client.ForgeHooksClient;
|
|||||||
}, remap = false)
|
}, remap = false)
|
||||||
public abstract class MixinShadersRender {
|
public abstract class MixinShadersRender {
|
||||||
|
|
||||||
@Inject(method = "renderHand0", at = @At("HEAD"), cancellable = true)
|
@Inject(method = "renderHand0", at = @At("HEAD"), cancellable = true, remap = false)
|
||||||
private static void replayModCompat_disableRenderHand0(GameRenderer er, float partialTicks, int renderPass, CallbackInfo ci) {
|
private static void replayModCompat_disableRenderHand0(GameRenderer er, float partialTicks, int renderPass, CallbackInfo ci) {
|
||||||
//#if MC>=11400
|
//#if MC>=11400
|
||||||
//$$ if (PreRenderHandCallback.EVENT.invoker().preRenderHand()) {
|
//$$ if (PreRenderHandCallback.EVENT.invoker().preRenderHand()) {
|
||||||
//#else
|
//#else
|
||||||
//#if MC>=11300
|
//#if MC>=11300
|
||||||
if (ForgeHooksClient.renderFirstPersonHand(er.getMinecraft().renderGlobal, partialTicks)) {
|
if (ForgeHooksClient.renderFirstPersonHand(MCVer.getMinecraft().renderGlobal, partialTicks)) {
|
||||||
//#else
|
//#else
|
||||||
//$$ if (ForgeHooksClient.renderFirstPersonHand(er.mc.renderGlobal, partialTicks, renderPass)) {
|
//$$ if (ForgeHooksClient.renderFirstPersonHand(MCVer.getMinecraft().renderGlobal, partialTicks, renderPass)) {
|
||||||
//#endif
|
//#endif
|
||||||
//#endif
|
//#endif
|
||||||
ci.cancel();
|
ci.cancel();
|
||||||
|
|||||||
@@ -240,7 +240,7 @@ public class ReplayMod implements
|
|||||||
try {
|
try {
|
||||||
return super.getInputStream(resourceName);
|
return super.getInputStream(resourceName);
|
||||||
//#else
|
//#else
|
||||||
//$$ List<IResourcePack> defaultResourcePacks = mc.defaultResourcePacks;
|
//$$ List<IResourcePack> defaultResourcePacks = ((MinecraftAccessor) mc).getDefaultResourcePacks();
|
||||||
//$$ FolderResourcePack jGuiResourcePack = new FolderResourcePack(new File("../jGui/src/main/resources")) {
|
//$$ FolderResourcePack jGuiResourcePack = new FolderResourcePack(new File("../jGui/src/main/resources")) {
|
||||||
//$$ @Override
|
//$$ @Override
|
||||||
//$$ protected InputStream getInputStreamByName(String resourceName) throws IOException {
|
//$$ protected InputStream getInputStreamByName(String resourceName) throws IOException {
|
||||||
|
|||||||
@@ -12,6 +12,11 @@ import java.util.Queue;
|
|||||||
import java.util.concurrent.FutureTask;
|
import java.util.concurrent.FutureTask;
|
||||||
//#endif
|
//#endif
|
||||||
|
|
||||||
|
//#if MC<11300
|
||||||
|
//$$ import net.minecraft.client.resources.IResourcePack;
|
||||||
|
//$$ import java.util.List;
|
||||||
|
//#endif
|
||||||
|
|
||||||
@Mixin(Minecraft.class)
|
@Mixin(Minecraft.class)
|
||||||
public interface MinecraftAccessor {
|
public interface MinecraftAccessor {
|
||||||
@Accessor
|
@Accessor
|
||||||
@@ -32,4 +37,9 @@ public interface MinecraftAccessor {
|
|||||||
|
|
||||||
@Accessor
|
@Accessor
|
||||||
CrashReport getCrashReporter();
|
CrashReport getCrashReporter();
|
||||||
|
|
||||||
|
//#if MC<11300
|
||||||
|
//$$ @Accessor
|
||||||
|
//$$ List<IResourcePack> getDefaultResourcePacks();
|
||||||
|
//#endif
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,18 +1,26 @@
|
|||||||
//#if MC>=11300
|
|
||||||
package com.replaymod.core.mixin;
|
package com.replaymod.core.mixin;
|
||||||
|
|
||||||
import com.replaymod.core.events.PostRenderCallback;
|
|
||||||
import com.replaymod.core.events.PreRenderCallback;
|
|
||||||
import com.replaymod.core.versions.MCVer;
|
import com.replaymod.core.versions.MCVer;
|
||||||
import de.johni0702.minecraft.gui.versions.callbacks.OpenGuiScreenCallback;
|
|
||||||
import de.johni0702.minecraft.gui.versions.callbacks.PreTickCallback;
|
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.gui.GuiScreen;
|
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
import org.spongepowered.asm.mixin.Shadow;
|
import org.spongepowered.asm.mixin.Shadow;
|
||||||
import org.spongepowered.asm.mixin.injection.At;
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
|
|
||||||
|
//#if MC>=11300
|
||||||
|
import com.replaymod.core.events.PostRenderCallback;
|
||||||
|
import com.replaymod.core.events.PreRenderCallback;
|
||||||
|
import de.johni0702.minecraft.gui.versions.callbacks.OpenGuiScreenCallback;
|
||||||
|
import de.johni0702.minecraft.gui.versions.callbacks.PreTickCallback;
|
||||||
|
import net.minecraft.client.gui.GuiScreen;
|
||||||
import org.spongepowered.asm.mixin.injection.Inject;
|
import org.spongepowered.asm.mixin.injection.Inject;
|
||||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||||
|
//#else
|
||||||
|
//$$ import org.spongepowered.asm.mixin.injection.Redirect;
|
||||||
|
//$$ import com.replaymod.replay.InputReplayTimer;
|
||||||
|
//$$ import org.lwjgl.input.Mouse;
|
||||||
|
//#endif
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
//#if MC>=11400
|
//#if MC>=11400
|
||||||
//$$ import net.minecraft.util.NonBlockingThreadExecutor;
|
//$$ import net.minecraft.util.NonBlockingThreadExecutor;
|
||||||
@@ -28,6 +36,7 @@ public abstract class MixinMinecraft
|
|||||||
//$$ public MixinMinecraft(String string_1) { super(string_1); }
|
//$$ public MixinMinecraft(String string_1) { super(string_1); }
|
||||||
//#endif
|
//#endif
|
||||||
|
|
||||||
|
//#if MC>=11300
|
||||||
@Shadow protected abstract void processKeyBinds();
|
@Shadow protected abstract void processKeyBinds();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -66,5 +75,41 @@ public abstract class MixinMinecraft
|
|||||||
private void openGuiScreen(GuiScreen newGuiScreen, CallbackInfo ci) {
|
private void openGuiScreen(GuiScreen newGuiScreen, CallbackInfo ci) {
|
||||||
OpenGuiScreenCallback.EVENT.invoker().openGuiScreen(newGuiScreen);
|
OpenGuiScreenCallback.EVENT.invoker().openGuiScreen(newGuiScreen);
|
||||||
}
|
}
|
||||||
|
//#else
|
||||||
|
//#if MC>=10904
|
||||||
|
//$$ @Shadow protected abstract void runTickKeyboard() throws IOException;
|
||||||
|
//$$ @Shadow protected abstract void runTickMouse() throws IOException;
|
||||||
|
//$$
|
||||||
|
//$$ @Override
|
||||||
|
//$$ public void replayModRunTickKeyboard() {
|
||||||
|
//$$ try {
|
||||||
|
//$$ runTickKeyboard();
|
||||||
|
//$$ } catch (IOException e) {
|
||||||
|
//$$ e.printStackTrace();
|
||||||
|
//$$ }
|
||||||
|
//$$ }
|
||||||
|
//$$
|
||||||
|
//$$ @Override
|
||||||
|
//$$ public void replayModRunTickMouse() {
|
||||||
|
//$$ try {
|
||||||
|
//$$ runTickMouse();
|
||||||
|
//$$ } catch (IOException e) {
|
||||||
|
//$$ e.printStackTrace();
|
||||||
|
//$$ }
|
||||||
|
//$$ }
|
||||||
|
//#endif
|
||||||
|
//$$ @Redirect(
|
||||||
|
//#if MC>=10904
|
||||||
|
//$$ method = "runTickMouse",
|
||||||
|
//#else
|
||||||
|
//$$ method = "runTick",
|
||||||
|
//#endif
|
||||||
|
//$$ at = @At(value = "INVOKE", target = "Lorg/lwjgl/input/Mouse;getEventDWheel()I", remap = false)
|
||||||
|
//$$ )
|
||||||
|
//$$ private static int scroll() {
|
||||||
|
//$$ int wheel = Mouse.getEventDWheel();
|
||||||
|
//$$ InputReplayTimer.handleScroll(wheel);
|
||||||
|
//$$ return wheel;
|
||||||
|
//$$ }
|
||||||
|
//#endif
|
||||||
}
|
}
|
||||||
//#endif
|
|
||||||
|
|||||||
@@ -0,0 +1,22 @@
|
|||||||
|
//#if MC<10800
|
||||||
|
//$$ package com.replaymod.core.mixin;
|
||||||
|
//$$
|
||||||
|
//$$ import net.minecraft.client.resources.IResourcePack;
|
||||||
|
//$$ import net.minecraft.client.resources.ResourcePackRepository;
|
||||||
|
//$$ import org.spongepowered.asm.mixin.Mixin;
|
||||||
|
//$$ import org.spongepowered.asm.mixin.gen.Accessor;
|
||||||
|
//$$
|
||||||
|
//$$ import java.io.File;
|
||||||
|
//$$
|
||||||
|
//$$ @Mixin(ResourcePackRepository.class)
|
||||||
|
//$$ public interface ResourcePackRepositoryAccessor {
|
||||||
|
//$$ @Accessor("field_148533_g")
|
||||||
|
//$$ boolean isActive();
|
||||||
|
//$$ @Accessor("field_148533_g")
|
||||||
|
//$$ void setActive(boolean value);
|
||||||
|
//$$ @Accessor("field_148532_f")
|
||||||
|
//$$ void setPack(IResourcePack value);
|
||||||
|
//$$ @Accessor("field_148534_e")
|
||||||
|
//$$ File getCacheDir();
|
||||||
|
//$$ }
|
||||||
|
//#endif
|
||||||
@@ -21,5 +21,25 @@ public interface TimerAccessor {
|
|||||||
//$$ float getTimerSpeed();
|
//$$ float getTimerSpeed();
|
||||||
//$$ @Accessor
|
//$$ @Accessor
|
||||||
//$$ void setTimerSpeed(float value);
|
//$$ void setTimerSpeed(float value);
|
||||||
|
//$$ @Accessor
|
||||||
|
//$$ float getTicksPerSecond();
|
||||||
|
//$$ @Accessor
|
||||||
|
//$$ void setTicksPerSecond(float value);
|
||||||
|
//$$ @Accessor
|
||||||
|
//$$ double getLastHRTime();
|
||||||
|
//$$ @Accessor
|
||||||
|
//$$ void setLastHRTime(double value);
|
||||||
|
//$$ @Accessor
|
||||||
|
//$$ long getLastSyncHRClock();
|
||||||
|
//$$ @Accessor
|
||||||
|
//$$ void setLastSyncHRClock(long value);
|
||||||
|
//$$ @Accessor
|
||||||
|
//$$ double getTimeSyncAdjustment();
|
||||||
|
//$$ @Accessor
|
||||||
|
//$$ void setTimeSyncAdjustment(double value);
|
||||||
|
//$$ @Accessor
|
||||||
|
//$$ long getCounter();
|
||||||
|
//$$ @Accessor
|
||||||
|
//$$ void setCounter(long value);
|
||||||
//#endif
|
//#endif
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,16 +44,12 @@ public class WrappedTimer extends Timer {
|
|||||||
//#if MC>=11200
|
//#if MC>=11200
|
||||||
toA.setTickLength(fromA.getTickLength());
|
toA.setTickLength(fromA.getTickLength());
|
||||||
//#else
|
//#else
|
||||||
//$$ to.ticksPerSecond = from.ticksPerSecond;
|
//$$ toA.setTicksPerSecond(fromA.getTicksPerSecond());
|
||||||
//$$ to.lastHRTime = from.lastHRTime;
|
//$$ toA.setLastHRTime(fromA.getLastHRTime());
|
||||||
//$$ toA.setTimerSpeed(fromA.getTimerSpeed());
|
//$$ toA.setTimerSpeed(fromA.getTimerSpeed());
|
||||||
//$$ to.lastSyncHRClock = from.lastSyncHRClock;
|
//$$ toA.setLastSyncHRClock(fromA.getLastSyncHRClock());
|
||||||
//#if MC>=10809
|
//$$ toA.setCounter(fromA.getCounter());
|
||||||
//$$ to.counter = from.counter;
|
//$$ toA.setTimeSyncAdjustment(fromA.getTimeSyncAdjustment());
|
||||||
//#else
|
|
||||||
//$$ to.field_74285_i = from.field_74285_i;
|
|
||||||
//#endif
|
|
||||||
//$$ to.timeSyncAdjustment = from.timeSyncAdjustment;
|
|
||||||
//#endif
|
//#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -70,6 +70,7 @@ import net.minecraft.client.renderer.vertex.VertexFormat;
|
|||||||
import net.minecraft.client.renderer.vertex.VertexFormatElement;
|
import net.minecraft.client.renderer.vertex.VertexFormatElement;
|
||||||
import net.minecraft.world.WorldType;
|
import net.minecraft.world.WorldType;
|
||||||
//#else
|
//#else
|
||||||
|
//$$ import com.replaymod.core.mixin.ResourcePackRepositoryAccessor;
|
||||||
//$$ import com.google.common.util.concurrent.Futures;
|
//$$ import com.google.common.util.concurrent.Futures;
|
||||||
//$$ import io.netty.handler.codec.DecoderException;
|
//$$ import io.netty.handler.codec.DecoderException;
|
||||||
//$$ import net.minecraft.client.resources.FileResourcePack;
|
//$$ import net.minecraft.client.resources.FileResourcePack;
|
||||||
@@ -351,8 +352,9 @@ public class MCVer {
|
|||||||
//#if MC>=10800
|
//#if MC>=10800
|
||||||
//$$ return repo.func_177319_a(file);
|
//$$ return repo.func_177319_a(file);
|
||||||
//#else
|
//#else
|
||||||
//$$ repo.field_148533_g = false;
|
//$$ ResourcePackRepositoryAccessor acc = (ResourcePackRepositoryAccessor) repo;
|
||||||
//$$ repo.field_148532_f = new FileResourcePack(file);
|
//$$ acc.setActive(false);
|
||||||
|
//$$ acc.setPack(new FileResourcePack(file));
|
||||||
//$$ Minecraft.getMinecraft().scheduleResourcesRefresh();
|
//$$ Minecraft.getMinecraft().scheduleResourcesRefresh();
|
||||||
//$$ return Futures.immediateFuture(null);
|
//$$ return Futures.immediateFuture(null);
|
||||||
//#endif
|
//#endif
|
||||||
@@ -520,13 +522,19 @@ public class MCVer {
|
|||||||
public static void processKeyBinds() {
|
public static void processKeyBinds() {
|
||||||
((MinecraftMethodAccessor) getMinecraft()).replayModProcessKeyBinds();
|
((MinecraftMethodAccessor) getMinecraft()).replayModProcessKeyBinds();
|
||||||
}
|
}
|
||||||
|
//#endif
|
||||||
|
|
||||||
public interface MinecraftMethodAccessor {
|
public interface MinecraftMethodAccessor {
|
||||||
|
//#if MC>=11300
|
||||||
void replayModProcessKeyBinds();
|
void replayModProcessKeyBinds();
|
||||||
|
//#else
|
||||||
|
//$$ void replayModRunTickMouse();
|
||||||
|
//$$ void replayModRunTickKeyboard();
|
||||||
|
//#endif
|
||||||
//#if MC>=11400
|
//#if MC>=11400
|
||||||
//$$ void replayModExecuteTaskQueue();
|
//$$ void replayModExecuteTaskQueue();
|
||||||
//#endif
|
//#endif
|
||||||
}
|
}
|
||||||
//#endif
|
|
||||||
|
|
||||||
public static long milliTime() {
|
public static long milliTime() {
|
||||||
//#if MC>=11300
|
//#if MC>=11300
|
||||||
|
|||||||
@@ -42,10 +42,11 @@ public class FullBrightness extends EventRegistrations implements Extra {
|
|||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
active = !active;
|
active = !active;
|
||||||
|
// need to tick once to update lightmap when replay is paused
|
||||||
//#if MC>=11300
|
//#if MC>=11300
|
||||||
mod.getMinecraft().entityRenderer.tick(); // need to tick once to update lightmap when replay is paused
|
mod.getMinecraft().entityRenderer.tick();
|
||||||
//#else
|
//#else
|
||||||
//$$ mod.getMinecraft().entityRenderer.lightmapUpdateNeeded = true;
|
//$$ mod.getMinecraft().entityRenderer.updateRenderer();
|
||||||
//#endif
|
//#endif
|
||||||
ReplayHandler replayHandler = module.getReplayHandler();
|
ReplayHandler replayHandler = module.getReplayHandler();
|
||||||
if (replayHandler != null) {
|
if (replayHandler != null) {
|
||||||
|
|||||||
@@ -3,25 +3,6 @@ package com.replaymod.extras.advancedscreenshots;
|
|||||||
import com.replaymod.core.ReplayMod;
|
import com.replaymod.core.ReplayMod;
|
||||||
import com.replaymod.extras.Extra;
|
import com.replaymod.extras.Extra;
|
||||||
|
|
||||||
//#if MC<11300
|
|
||||||
//$$ import com.replaymod.core.versions.MCVer;
|
|
||||||
//$$ import com.replaymod.replay.events.ReplayDispatchKeypressesEvent;
|
|
||||||
//$$ import net.minecraft.client.Minecraft;
|
|
||||||
//$$ import net.minecraft.client.gui.GuiControls;
|
|
||||||
//$$ import net.minecraftforge.client.event.GuiScreenEvent;
|
|
||||||
//$$ import net.minecraftforge.common.MinecraftForge;
|
|
||||||
//$$ import org.lwjgl.input.Keyboard;
|
|
||||||
//#endif
|
|
||||||
|
|
||||||
//#if MC>=10800
|
|
||||||
//#if MC>=11300
|
|
||||||
//#else
|
|
||||||
//$$ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
|
||||||
//#endif
|
|
||||||
//#else
|
|
||||||
//$$ import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
|
||||||
//#endif
|
|
||||||
|
|
||||||
public class AdvancedScreenshots implements Extra {
|
public class AdvancedScreenshots implements Extra {
|
||||||
|
|
||||||
private ReplayMod mod;
|
private ReplayMod mod;
|
||||||
@@ -29,33 +10,14 @@ public class AdvancedScreenshots implements Extra {
|
|||||||
@Override
|
@Override
|
||||||
public void register(ReplayMod mod) {
|
public void register(ReplayMod mod) {
|
||||||
this.mod = mod;
|
this.mod = mod;
|
||||||
//#if MC<11300
|
|
||||||
//$$ MinecraftForge.EVENT_BUS.register(this);
|
|
||||||
//#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//#if MC>=11300
|
|
||||||
private static AdvancedScreenshots instance; { instance = this; }
|
private static AdvancedScreenshots instance; { instance = this; }
|
||||||
public static void take() {
|
public static void take() {
|
||||||
if (instance != null) {
|
if (instance != null) {
|
||||||
instance.takeScreenshot();
|
instance.takeScreenshot();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//#else
|
|
||||||
//$$ @SubscribeEvent
|
|
||||||
//$$ public void onDispatchKeypresses(ReplayDispatchKeypressesEvent.Pre event) {
|
|
||||||
//$$ Minecraft mc = MCVer.getMinecraft();
|
|
||||||
//$$ if (mc.currentScreen instanceof GuiControls) return;
|
|
||||||
//$$ if (!Keyboard.getEventKeyState()) return;
|
|
||||||
//$$ if (Keyboard.isRepeatEvent()) return;
|
|
||||||
//$$ int keyCode = Keyboard.getEventKey() == 0 ? Keyboard.getEventCharacter() : Keyboard.getEventKey();
|
|
||||||
//$$ if (keyCode == 0 || keyCode != mc.gameSettings.keyBindScreenshot.getKeyCode()) return;
|
|
||||||
//$$
|
|
||||||
//$$ takeScreenshot();
|
|
||||||
//$$
|
|
||||||
//$$ event.setCanceled(true);
|
|
||||||
//$$ }
|
|
||||||
//#endif
|
|
||||||
|
|
||||||
private void takeScreenshot() {
|
private void takeScreenshot() {
|
||||||
ReplayMod.instance.runLater(() -> new GuiCreateScreenshot(mod).display());
|
ReplayMod.instance.runLater(() -> new GuiCreateScreenshot(mod).display());
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package com.replaymod.recording.handler;
|
package com.replaymod.recording.handler;
|
||||||
|
|
||||||
import com.replaymod.recording.mixin.EntityLivingBaseAccessor;
|
|
||||||
import com.replaymod.recording.mixin.IntegratedServerAccessor;
|
import com.replaymod.recording.mixin.IntegratedServerAccessor;
|
||||||
import com.replaymod.recording.packet.PacketListener;
|
import com.replaymod.recording.packet.PacketListener;
|
||||||
import de.johni0702.minecraft.gui.utils.EventRegistrations;
|
import de.johni0702.minecraft.gui.utils.EventRegistrations;
|
||||||
@@ -24,10 +23,7 @@ import net.minecraftforge.fml.common.gameevent.TickEvent;
|
|||||||
//#endif
|
//#endif
|
||||||
|
|
||||||
//#if MC>=10904
|
//#if MC>=10904
|
||||||
//#if MC>=11300
|
import com.replaymod.recording.mixin.EntityLivingBaseAccessor;
|
||||||
//#else
|
|
||||||
//$$ import net.minecraft.entity.EntityLiving;
|
|
||||||
//#endif
|
|
||||||
import net.minecraft.inventory.EntityEquipmentSlot;
|
import net.minecraft.inventory.EntityEquipmentSlot;
|
||||||
import net.minecraft.network.datasync.EntityDataManager;
|
import net.minecraft.network.datasync.EntityDataManager;
|
||||||
import net.minecraft.util.EnumHand;
|
import net.minecraft.util.EnumHand;
|
||||||
@@ -169,8 +165,14 @@ public class RecordingEventHandler extends EventRegistrations {
|
|||||||
//$$ // Note: this leaves the lastY value offset by the eye height but because it's only used for relative
|
//$$ // Note: this leaves the lastY value offset by the eye height but because it's only used for relative
|
||||||
//$$ // movement, that doesn't matter.
|
//$$ // movement, that doesn't matter.
|
||||||
//$$ S18PacketEntityTeleport teleportPacket = new S18PacketEntityTeleport(player);
|
//$$ S18PacketEntityTeleport teleportPacket = new S18PacketEntityTeleport(player);
|
||||||
//$$ teleportPacket.field_149457_c = MathHelper.floor_double(player.boundingBox.minY * 32);
|
//$$ packet = new S18PacketEntityTeleport(
|
||||||
//$$ packet = teleportPacket;
|
//$$ teleportPacket.func_149451_c(),
|
||||||
|
//$$ teleportPacket.func_149449_d(),
|
||||||
|
//$$ MathHelper.floor_double(player.boundingBox.minY * 32),
|
||||||
|
//$$ teleportPacket.func_149446_f(),
|
||||||
|
//$$ teleportPacket.func_149450_g(),
|
||||||
|
//$$ teleportPacket.func_149447_h()
|
||||||
|
//$$ );
|
||||||
//#endif
|
//#endif
|
||||||
} else {
|
} else {
|
||||||
byte newYaw = (byte) ((int) (player.rotationYaw * 256.0F / 360.0F));
|
byte newYaw = (byte) ((int) (player.rotationYaw * 256.0F / 360.0F));
|
||||||
@@ -340,7 +342,7 @@ public class RecordingEventHandler extends EventRegistrations {
|
|||||||
//#if MC>=11300
|
//#if MC>=11300
|
||||||
dataManager.register(EntityLivingBaseAccessor.getLivingFlags(), (byte) state);
|
dataManager.register(EntityLivingBaseAccessor.getLivingFlags(), (byte) state);
|
||||||
//#else
|
//#else
|
||||||
//$$ dataManager.register(EntityLiving.HAND_STATES, (byte) state);
|
//$$ dataManager.register(EntityLivingBaseAccessor.getLivingFlags(), (byte) state);
|
||||||
//#endif
|
//#endif
|
||||||
packetListener.save(new SPacketEntityMetadata(player.getEntityId(), dataManager, true));
|
packetListener.save(new SPacketEntityMetadata(player.getEntityId(), dataManager, true));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,13 +6,13 @@ import org.spongepowered.asm.mixin.gen.Accessor;
|
|||||||
|
|
||||||
import javax.annotation.Nonnull;
|
import javax.annotation.Nonnull;
|
||||||
|
|
||||||
//#if MC>=11300
|
//#if MC>=10904
|
||||||
import net.minecraft.network.datasync.DataParameter;
|
import net.minecraft.network.datasync.DataParameter;
|
||||||
//#endif
|
//#endif
|
||||||
|
|
||||||
@Mixin(EntityLivingBase.class)
|
@Mixin(EntityLivingBase.class)
|
||||||
public interface EntityLivingBaseAccessor {
|
public interface EntityLivingBaseAccessor {
|
||||||
//#if MC>=11300
|
//#if MC>=10904
|
||||||
@Accessor("LIVING_FLAGS")
|
@Accessor("LIVING_FLAGS")
|
||||||
@Nonnull
|
@Nonnull
|
||||||
@SuppressWarnings("ConstantConditions")
|
@SuppressWarnings("ConstantConditions")
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
//#if MC>=11300
|
//#if MC>=10800
|
||||||
package com.replaymod.recording.mixin;
|
package com.replaymod.recording.mixin;
|
||||||
|
|
||||||
import com.replaymod.recording.packet.ResourcePackRecorder;
|
import com.replaymod.recording.packet.ResourcePackRecorder;
|
||||||
@@ -39,7 +39,11 @@ public abstract class MixinDownloadingPackFinder implements ResourcePackRecorder
|
|||||||
//$$ @Redirect(method = "download", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/resource/ClientResourcePackCreator;loadServerPack(Ljava/io/File;)Ljava/util/concurrent/CompletableFuture;"))
|
//$$ @Redirect(method = "download", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/resource/ClientResourcePackCreator;loadServerPack(Ljava/io/File;)Ljava/util/concurrent/CompletableFuture;"))
|
||||||
//$$ private CompletableFuture<Object>
|
//$$ private CompletableFuture<Object>
|
||||||
//#else
|
//#else
|
||||||
|
//#if MC>=10800
|
||||||
@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;"))
|
@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;"))
|
||||||
|
//#else
|
||||||
|
//$$ @Redirect(method = "func_180601_a", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/resources/ResourcePackRepository;func_177319_a(Ljava/io/File;)Lcom/google/common/util/concurrent/ListenableFuture;"))
|
||||||
|
//#endif
|
||||||
private ListenableFuture<Object>
|
private ListenableFuture<Object>
|
||||||
//#endif
|
//#endif
|
||||||
recordDownloadedPack(DownloadingPackFinder downloadingPackFinder, File file) {
|
recordDownloadedPack(DownloadingPackFinder downloadingPackFinder, File file) {
|
||||||
|
|||||||
@@ -7,16 +7,8 @@ import org.spongepowered.asm.mixin.gen.Accessor;
|
|||||||
|
|
||||||
@Mixin(SPacketSpawnMob.class)
|
@Mixin(SPacketSpawnMob.class)
|
||||||
public interface SPacketSpawnMobAccessor {
|
public interface SPacketSpawnMobAccessor {
|
||||||
//#if MC>=10904
|
|
||||||
@Accessor
|
@Accessor
|
||||||
//#else
|
|
||||||
//$$ @Accessor("field_149043_l")
|
|
||||||
//#endif
|
|
||||||
EntityDataManager getDataManager();
|
EntityDataManager getDataManager();
|
||||||
//#if MC>=10904
|
|
||||||
@Accessor
|
@Accessor
|
||||||
//#else
|
|
||||||
//$$ @Accessor("field_149043_l")
|
|
||||||
//#endif
|
|
||||||
void setDataManager(EntityDataManager value);
|
void setDataManager(EntityDataManager value);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,16 +7,8 @@ import org.spongepowered.asm.mixin.gen.Accessor;
|
|||||||
|
|
||||||
@Mixin(SPacketSpawnPlayer.class)
|
@Mixin(SPacketSpawnPlayer.class)
|
||||||
public interface SPacketSpawnPlayerAccessor {
|
public interface SPacketSpawnPlayerAccessor {
|
||||||
//#if MC>=10809
|
|
||||||
@Accessor("watcher")
|
@Accessor("watcher")
|
||||||
//#else
|
|
||||||
//$$ @Accessor("field_148960_i")
|
|
||||||
//#endif
|
|
||||||
EntityDataManager getDataManager();
|
EntityDataManager getDataManager();
|
||||||
//#if MC>=10809
|
|
||||||
@Accessor("watcher")
|
@Accessor("watcher")
|
||||||
//#else
|
|
||||||
//$$ @Accessor("field_148960_i")
|
|
||||||
//#endif
|
|
||||||
void setDataManager(EntityDataManager value);
|
void setDataManager(EntityDataManager value);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -130,7 +130,7 @@ public class PacketListener extends ChannelInboundHandlerAdapter {
|
|||||||
//#if MC>=10800
|
//#if MC>=10800
|
||||||
UUID uuid = ((SPacketSpawnPlayer) packet).getUniqueId();
|
UUID uuid = ((SPacketSpawnPlayer) packet).getUniqueId();
|
||||||
//#else
|
//#else
|
||||||
//$$ UUID uuid = ((S0CPacketSpawnPlayer) packet).field_148955_b.getId();
|
//$$ UUID uuid = ((S0CPacketSpawnPlayer) packet).func_148948_e().getId();
|
||||||
//#endif
|
//#endif
|
||||||
Set<String> uuids = new HashSet<>(Arrays.asList(metaData.getPlayers()));
|
Set<String> uuids = new HashSet<>(Arrays.asList(metaData.getPlayers()));
|
||||||
uuids.add(uuid.toString());
|
uuids.add(uuid.toString());
|
||||||
@@ -300,16 +300,21 @@ public class PacketListener extends ChannelInboundHandlerAdapter {
|
|||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
private byte[] getPacketData(Packet packet) throws Exception {
|
private byte[] getPacketData(Packet packet) throws Exception {
|
||||||
//#if MC>=10904
|
|
||||||
if (packet instanceof SPacketSpawnMob) {
|
if (packet instanceof SPacketSpawnMob) {
|
||||||
SPacketSpawnMob p = (SPacketSpawnMob) packet;
|
SPacketSpawnMob p = (SPacketSpawnMob) packet;
|
||||||
SPacketSpawnMobAccessor pa = (SPacketSpawnMobAccessor) p;
|
SPacketSpawnMobAccessor pa = (SPacketSpawnMobAccessor) p;
|
||||||
if (pa.getDataManager() == null) {
|
if (pa.getDataManager() == null) {
|
||||||
pa.setDataManager(new EntityDataManager(null));
|
pa.setDataManager(new EntityDataManager(null));
|
||||||
if (p.getDataManagerEntries() != null) {
|
if (p.getDataManagerEntries() != null) {
|
||||||
|
//#if MC>=10904
|
||||||
for (EntityDataManager.DataEntry<?> entry : p.getDataManagerEntries()) {
|
for (EntityDataManager.DataEntry<?> entry : p.getDataManagerEntries()) {
|
||||||
DataManager_set(pa.getDataManager(), entry);
|
DataManager_set(pa.getDataManager(), entry);
|
||||||
}
|
}
|
||||||
|
//#else
|
||||||
|
//$$ for(DataWatcher.WatchableObject wo : (List<DataWatcher.WatchableObject>) p.func_149027_c()) {
|
||||||
|
//$$ pa.getDataManager().addObject(wo.getDataValueId(), wo.getObject());
|
||||||
|
//$$ }
|
||||||
|
//#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -320,45 +325,18 @@ public class PacketListener extends ChannelInboundHandlerAdapter {
|
|||||||
if (pa.getDataManager() == null) {
|
if (pa.getDataManager() == null) {
|
||||||
pa.setDataManager(new EntityDataManager(null));
|
pa.setDataManager(new EntityDataManager(null));
|
||||||
if (p.getDataManagerEntries() != null) {
|
if (p.getDataManagerEntries() != null) {
|
||||||
|
//#if MC>=10904
|
||||||
for (EntityDataManager.DataEntry<?> entry : p.getDataManagerEntries()) {
|
for (EntityDataManager.DataEntry<?> entry : p.getDataManagerEntries()) {
|
||||||
DataManager_set(pa.getDataManager(), entry);
|
DataManager_set(pa.getDataManager(), entry);
|
||||||
}
|
}
|
||||||
|
//#else
|
||||||
|
//$$ for(DataWatcher.WatchableObject wo : (List<DataWatcher.WatchableObject>) p.func_148944_c()) {
|
||||||
|
//$$ pa.getDataManager().addObject(wo.getDataValueId(), wo.getObject());
|
||||||
|
//$$ }
|
||||||
|
//#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//#else
|
|
||||||
//$$ if(packet instanceof S0FPacketSpawnMob) {
|
|
||||||
//$$ S0FPacketSpawnMob p = (S0FPacketSpawnMob) packet;
|
|
||||||
//$$ if (p.field_149043_l == null) {
|
|
||||||
//$$ p.field_149043_l = new DataWatcher(null);
|
|
||||||
//$$ if(p.func_149027_c() != null) {
|
|
||||||
//$$ for(DataWatcher.WatchableObject wo : (List<DataWatcher.WatchableObject>) p.func_149027_c()) {
|
|
||||||
//$$ p.field_149043_l.addObject(wo.getDataValueId(), wo.getObject());
|
|
||||||
//$$ }
|
|
||||||
//$$ }
|
|
||||||
//$$ }
|
|
||||||
//$$ }
|
|
||||||
//$$
|
|
||||||
//$$ if(packet instanceof S0CPacketSpawnPlayer) {
|
|
||||||
//$$ S0CPacketSpawnPlayer p = (S0CPacketSpawnPlayer) packet;
|
|
||||||
//#if MC>=10809
|
|
||||||
//$$ if (p.watcher == null) {
|
|
||||||
//$$ p.watcher = new DataWatcher(null);
|
|
||||||
//$$ if(p.func_148944_c() != null) {
|
|
||||||
//$$ for(DataWatcher.WatchableObject wo : p.func_148944_c()) {
|
|
||||||
//$$ p.watcher.addObject(wo.getDataValueId(), wo.getObject());
|
|
||||||
//#else
|
|
||||||
//$$ if (p.field_148960_i == null) {
|
|
||||||
//$$ p.field_148960_i = new DataWatcher(null);
|
|
||||||
//$$ if(p.func_148944_c() != null) {
|
|
||||||
//$$ for(DataWatcher.WatchableObject wo : (List<DataWatcher.WatchableObject>) p.func_148944_c()) {
|
|
||||||
//$$ p.field_148960_i.addObject(wo.getDataValueId(), wo.getObject());
|
|
||||||
//#endif
|
|
||||||
//$$ }
|
|
||||||
//$$ }
|
|
||||||
//$$ }
|
|
||||||
//$$ }
|
|
||||||
//#endif
|
|
||||||
|
|
||||||
//#if MC>=10800
|
//#if MC>=10800
|
||||||
Integer packetId = connectionState.getPacketId(EnumPacketDirection.CLIENTBOUND, packet);
|
Integer packetId = connectionState.getPacketId(EnumPacketDirection.CLIENTBOUND, packet);
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import net.minecraft.client.Minecraft;
|
|||||||
import net.minecraft.client.gui.GuiYesNo;
|
import net.minecraft.client.gui.GuiYesNo;
|
||||||
import net.minecraft.client.multiplayer.ServerData;
|
import net.minecraft.client.multiplayer.ServerData;
|
||||||
import net.minecraft.client.multiplayer.ServerList;
|
import net.minecraft.client.multiplayer.ServerList;
|
||||||
|
import net.minecraft.client.resources.DownloadingPackFinder;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
|
|
||||||
@@ -17,12 +18,10 @@ import net.minecraft.client.gui.GuiYesNoCallback;
|
|||||||
import net.minecraft.client.resources.I18n;
|
import net.minecraft.client.resources.I18n;
|
||||||
//#endif
|
//#endif
|
||||||
|
|
||||||
//#if MC>=11300
|
//#if MC>=10800
|
||||||
import de.johni0702.minecraft.gui.utils.Consumer;
|
import de.johni0702.minecraft.gui.utils.Consumer;
|
||||||
import net.minecraft.client.resources.DownloadingPackFinder;
|
|
||||||
//#else
|
//#else
|
||||||
//$$ import net.minecraft.client.gui.GuiScreenWorking;
|
//$$ import net.minecraft.client.gui.GuiScreenWorking;
|
||||||
//$$ import net.minecraft.client.resources.ResourcePackRepository;
|
|
||||||
//$$ import net.minecraft.util.HttpUtil;
|
//$$ import net.minecraft.util.HttpUtil;
|
||||||
//#endif
|
//#endif
|
||||||
|
|
||||||
@@ -33,8 +32,6 @@ import net.minecraft.network.play.server.SPacketResourcePackSend;
|
|||||||
//#endif
|
//#endif
|
||||||
|
|
||||||
//#if MC>=10800
|
//#if MC>=10800
|
||||||
import com.google.common.util.concurrent.FutureCallback;
|
|
||||||
import com.google.common.util.concurrent.Futures;
|
|
||||||
//#if MC>=11400
|
//#if MC>=11400
|
||||||
//$$ import java.util.concurrent.CompletableFuture;
|
//$$ import java.util.concurrent.CompletableFuture;
|
||||||
//#else
|
//#else
|
||||||
@@ -42,12 +39,8 @@ import com.google.common.util.concurrent.ListenableFuture;
|
|||||||
//#endif
|
//#endif
|
||||||
import net.minecraft.client.network.NetHandlerPlayClient;
|
import net.minecraft.client.network.NetHandlerPlayClient;
|
||||||
import net.minecraft.network.NetworkManager;
|
import net.minecraft.network.NetworkManager;
|
||||||
//#if MC<11300
|
|
||||||
//$$ import org.apache.commons.io.FileUtils;
|
|
||||||
//#endif
|
|
||||||
|
|
||||||
import javax.annotation.Nonnull;
|
|
||||||
//#else
|
//#else
|
||||||
|
//$$ import com.replaymod.core.mixin.ResourcePackRepositoryAccessor;
|
||||||
//$$ import net.minecraft.client.multiplayer.ServerData.ServerResourceMode;
|
//$$ import net.minecraft.client.multiplayer.ServerData.ServerResourceMode;
|
||||||
//$$ import net.minecraft.client.multiplayer.ServerList;
|
//$$ import net.minecraft.client.multiplayer.ServerList;
|
||||||
//$$ import net.minecraft.client.resources.FileResourcePack;
|
//$$ import net.minecraft.client.resources.FileResourcePack;
|
||||||
@@ -192,7 +185,6 @@ public class ResourcePackRecorder {
|
|||||||
throwable -> mc.getConnection().sendPacket(makeStatusPacket(hash, Action.FAILED_DOWNLOAD)));
|
throwable -> mc.getConnection().sendPacket(makeStatusPacket(hash, Action.FAILED_DOWNLOAD)));
|
||||||
}
|
}
|
||||||
|
|
||||||
//#if MC>=11300
|
|
||||||
private
|
private
|
||||||
//#if MC>=11400
|
//#if MC>=11400
|
||||||
//$$ CompletableFuture<?>
|
//$$ CompletableFuture<?>
|
||||||
@@ -209,102 +201,6 @@ public class ResourcePackRecorder {
|
|||||||
void setRequestCallback(Consumer<File> callback);
|
void setRequestCallback(Consumer<File> callback);
|
||||||
}
|
}
|
||||||
//#else
|
//#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();
|
|
||||||
//#else
|
|
||||||
//$$ repo.field_177321_h.lock();
|
|
||||||
//#endif
|
|
||||||
//$$ try {
|
|
||||||
//#if MC>=10809
|
|
||||||
//$$ 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(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();
|
|
||||||
//#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>() {
|
|
||||||
//#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(file);
|
|
||||||
//$$ }
|
|
||||||
//$$
|
|
||||||
//$$ @Override
|
|
||||||
//$$ public void onFailure(@Nonnull Throwable throwable) {
|
|
||||||
//$$ throwable.printStackTrace();
|
|
||||||
//$$ }
|
|
||||||
//$$ });
|
|
||||||
//#if MC>=10809
|
|
||||||
//$$ return repo.downloadingPacks;
|
|
||||||
//#else
|
|
||||||
//$$ return repo.field_177322_i;
|
|
||||||
//#endif
|
|
||||||
//$$ } finally {
|
|
||||||
//#if MC>=10809
|
|
||||||
//$$ repo.lock.unlock();
|
|
||||||
//#else
|
|
||||||
//$$ repo.field_177321_h.unlock();
|
|
||||||
//#endif
|
|
||||||
//$$ }
|
|
||||||
//$$ }
|
|
||||||
//#endif
|
|
||||||
//#else
|
|
||||||
//$$ public synchronized S3FPacketCustomPayload handleResourcePack(S3FPacketCustomPayload packet) {
|
//$$ public synchronized S3FPacketCustomPayload handleResourcePack(S3FPacketCustomPayload packet) {
|
||||||
//$$ final int requestId = nextRequestId++;
|
//$$ final int requestId = nextRequestId++;
|
||||||
//$$ final String url = new String(packet.func_149168_d(), Charsets.UTF_8);
|
//$$ final String url = new String(packet.func_149168_d(), Charsets.UTF_8);
|
||||||
@@ -338,7 +234,8 @@ public class ResourcePackRecorder {
|
|||||||
//$$ }
|
//$$ }
|
||||||
//$$
|
//$$
|
||||||
//$$ private void downloadResourcePack(final int requestId, String url) {
|
//$$ private void downloadResourcePack(final int requestId, String url) {
|
||||||
//$$ final ResourcePackRepository repo = mc.mcResourcePackRepository;
|
//$$ final ResourcePackRepository repo = mc.getResourcePackRepository();
|
||||||
|
//$$ final ResourcePackRepositoryAccessor acc = (ResourcePackRepositoryAccessor) repo;
|
||||||
//$$
|
//$$
|
||||||
//$$ String fileName = url.substring(url.lastIndexOf("/") + 1);
|
//$$ String fileName = url.substring(url.lastIndexOf("/") + 1);
|
||||||
//$$
|
//$$
|
||||||
@@ -352,7 +249,7 @@ public class ResourcePackRecorder {
|
|||||||
//$$
|
//$$
|
||||||
//$$ fileName = fileName.replaceAll("\\W", "");
|
//$$ fileName = fileName.replaceAll("\\W", "");
|
||||||
//$$
|
//$$
|
||||||
//$$ File file = new File(repo.field_148534_e, fileName);
|
//$$ File file = new File(acc.getCacheDir(), fileName);
|
||||||
//$$
|
//$$
|
||||||
//$$ HashMap<String, String> hashmap = new HashMap<>();
|
//$$ HashMap<String, String> hashmap = new HashMap<>();
|
||||||
//$$ hashmap.put("X-Minecraft-Username", mc.getSession().getUsername());
|
//$$ hashmap.put("X-Minecraft-Username", mc.getSession().getUsername());
|
||||||
@@ -362,14 +259,14 @@ public class ResourcePackRecorder {
|
|||||||
//$$ GuiScreenWorking guiScreen = new GuiScreenWorking();
|
//$$ GuiScreenWorking guiScreen = new GuiScreenWorking();
|
||||||
//$$ Minecraft.getMinecraft().displayGuiScreen(guiScreen);
|
//$$ Minecraft.getMinecraft().displayGuiScreen(guiScreen);
|
||||||
//$$ repo.func_148529_f();
|
//$$ repo.func_148529_f();
|
||||||
//$$ repo.field_148533_g = true;
|
//$$ acc.setActive(true);
|
||||||
//$$ // Lambdas MUST NOT be used with methods that need re-obfuscation in FG prior to 2.2 (will result in AbstractMethodError)
|
//$$ // Lambdas MUST NOT be used with methods that need re-obfuscation in FG prior to 2.2 (will result in AbstractMethodError)
|
||||||
//$$ //noinspection Convert2Lambda
|
//$$ //noinspection Convert2Lambda
|
||||||
//$$ HttpUtil.downloadResourcePack(file, url, new HttpUtil.DownloadListener() {
|
//$$ HttpUtil.downloadResourcePack(file, url, new HttpUtil.DownloadListener() {
|
||||||
//$$ public void onDownloadComplete(File file) {
|
//$$ public void onDownloadComplete(File file) {
|
||||||
//$$ if (repo.field_148533_g) {
|
//$$ if (acc.isActive()) {
|
||||||
//$$ repo.field_148533_g = false;
|
//$$ acc.setActive(false);
|
||||||
//$$ repo.field_148532_f = new FileResourcePack(file);
|
//$$ acc.setPack(new FileResourcePack(file));
|
||||||
//$$ Minecraft.getMinecraft().scheduleResourcesRefresh();
|
//$$ Minecraft.getMinecraft().scheduleResourcesRefresh();
|
||||||
//$$ recordResourcePack(file, requestId);
|
//$$ recordResourcePack(file, requestId);
|
||||||
//$$ }
|
//$$ }
|
||||||
|
|||||||
@@ -17,20 +17,21 @@ import net.minecraftforge.client.model.pipeline.LightUtil;
|
|||||||
//#endif
|
//#endif
|
||||||
|
|
||||||
//#if MC>=11300
|
//#if MC>=11300
|
||||||
import com.replaymod.render.blend.mixin.ItemRendererAccessor;
|
|
||||||
import net.minecraft.client.renderer.model.BakedQuad;
|
import net.minecraft.client.renderer.model.BakedQuad;
|
||||||
import net.minecraft.client.renderer.model.IBakedModel;
|
import net.minecraft.client.renderer.model.IBakedModel;
|
||||||
//#else
|
//#else
|
||||||
//$$ import net.minecraft.client.renderer.block.model.BakedQuad;
|
//$$ import net.minecraft.client.renderer.block.model.BakedQuad;
|
||||||
//#if MC>=10904
|
//#if MC>=10904
|
||||||
//$$ import net.minecraft.client.renderer.RenderItem;
|
|
||||||
//$$ import net.minecraft.client.renderer.block.model.IBakedModel;
|
//$$ import net.minecraft.client.renderer.block.model.IBakedModel;
|
||||||
//#else
|
//#else
|
||||||
//$$ import net.minecraft.client.renderer.entity.RenderItem;
|
|
||||||
//$$ import net.minecraft.client.resources.model.IBakedModel;
|
//$$ import net.minecraft.client.resources.model.IBakedModel;
|
||||||
//#endif
|
//#endif
|
||||||
//#endif
|
//#endif
|
||||||
|
|
||||||
|
//#if MC>=10904
|
||||||
|
import com.replaymod.render.blend.mixin.ItemRendererAccessor;
|
||||||
|
//#endif
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
@@ -117,15 +118,11 @@ public class ItemExporter implements Exporter {
|
|||||||
private static void renderQuads(Object renderItem, BlendMeshBuilder buffer, List<BakedQuad> quads, ItemStack stack) {
|
private static void renderQuads(Object renderItem, BlendMeshBuilder buffer, List<BakedQuad> quads, ItemStack stack) {
|
||||||
for (BakedQuad quad : quads) {
|
for (BakedQuad quad : quads) {
|
||||||
int color = stack != null && quad.hasTintIndex()
|
int color = stack != null && quad.hasTintIndex()
|
||||||
//#if MC>=11300
|
//#if MC>=10904
|
||||||
? ((ItemRendererAccessor) renderItem).getItemColors().getColor(stack, quad.getTintIndex()) | 0xff000000
|
? ((ItemRendererAccessor) renderItem).getItemColors().getColor(stack, quad.getTintIndex()) | 0xff000000
|
||||||
//#else
|
//#else
|
||||||
//#if MC>=10904
|
|
||||||
//$$ ? ((RenderItem) renderItem).itemColors.getColorFromItemstack(stack, quad.getTintIndex()) | 0xff000000
|
|
||||||
//#else
|
|
||||||
//$$ ? stack.getItem().getColorFromItemStack(stack, quad.getTintIndex()) | 0xff000000
|
//$$ ? stack.getItem().getColorFromItemStack(stack, quad.getTintIndex()) | 0xff000000
|
||||||
//#endif
|
//#endif
|
||||||
//#endif
|
|
||||||
: 0xffffffff;
|
: 0xffffffff;
|
||||||
//#if MC>=11400
|
//#if MC>=11400
|
||||||
//$$ buffer.putVertexData(quad.getVertexData());
|
//$$ buffer.putVertexData(quad.getVertexData());
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
//#if MC>=11300
|
//#if MC>=10904
|
||||||
package com.replaymod.render.blend.mixin;
|
package com.replaymod.render.blend.mixin;
|
||||||
|
|
||||||
import net.minecraft.client.renderer.ItemRenderer;
|
import net.minecraft.client.renderer.ItemRenderer;
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ public class ChunkLoadingRenderGlobal {
|
|||||||
//#if MC>=10904
|
//#if MC>=10904
|
||||||
PriorityBlockingQueue<ChunkRenderTask> queueChunkUpdates = renderDispatcherAcc.getQueueChunkUpdates();
|
PriorityBlockingQueue<ChunkRenderTask> queueChunkUpdates = renderDispatcherAcc.getQueueChunkUpdates();
|
||||||
//#else
|
//#else
|
||||||
//$$ BlockingQueue<ChunkCompileTaskGenerator> queueChunkUpdates = renderDispatcher.queueChunkUpdates;
|
//$$ BlockingQueue<ChunkCompileTaskGenerator> queueChunkUpdates = renderDispatcherAcc.getQueueChunkUpdates();
|
||||||
//#endif
|
//#endif
|
||||||
workerJailingQueue = new JailingQueue<>(queueChunkUpdates);
|
workerJailingQueue = new JailingQueue<>(queueChunkUpdates);
|
||||||
renderDispatcherAcc.setQueueChunkUpdates(workerJailingQueue);
|
renderDispatcherAcc.setQueueChunkUpdates(workerJailingQueue);
|
||||||
|
|||||||
@@ -9,17 +9,11 @@ import lombok.Getter;
|
|||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
|
|
||||||
//#if MC<11400
|
//#if MC<11400
|
||||||
//#if MC>=10800
|
|
||||||
//#if MC>=11300
|
//#if MC>=11300
|
||||||
import net.minecraftforge.fml.hooks.BasicEventHooks;
|
import net.minecraftforge.fml.hooks.BasicEventHooks;
|
||||||
//#else
|
//#else
|
||||||
//$$ import net.minecraft.client.renderer.GlStateManager;
|
|
||||||
//$$ import net.minecraftforge.fml.common.FMLCommonHandler;
|
//$$ import net.minecraftforge.fml.common.FMLCommonHandler;
|
||||||
//#endif
|
//#endif
|
||||||
//#else
|
|
||||||
//$$ import com.replaymod.core.versions.MCVer.GlStateManager;
|
|
||||||
//$$ import cpw.mods.fml.common.FMLCommonHandler;
|
|
||||||
//#endif
|
|
||||||
//#endif
|
//#endif
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
@@ -59,21 +53,7 @@ public class EntityRendererHandler implements WorldRenderer {
|
|||||||
//#endif
|
//#endif
|
||||||
//#endif
|
//#endif
|
||||||
|
|
||||||
//#if MC>=11300
|
|
||||||
mc.entityRenderer.renderWorld(partialTicks, finishTimeNano);
|
mc.entityRenderer.renderWorld(partialTicks, finishTimeNano);
|
||||||
//#else
|
|
||||||
//$$ mc.entityRenderer.updateLightmap(partialTicks);
|
|
||||||
//$$
|
|
||||||
//$$ GlStateManager.enableDepth();
|
|
||||||
//$$ GlStateManager.enableAlpha();
|
|
||||||
//$$ GlStateManager.alphaFunc(516, 0.5F);
|
|
||||||
//$$
|
|
||||||
//#if MC>=10800
|
|
||||||
//$$ mc.entityRenderer.renderWorldPass(2, partialTicks, finishTimeNano);
|
|
||||||
//#else
|
|
||||||
//$$ mc.entityRenderer.renderWorld(partialTicks, finishTimeNano);
|
|
||||||
//#endif
|
|
||||||
//#endif
|
|
||||||
|
|
||||||
//#if MC<11400
|
//#if MC<11400
|
||||||
//#if MC>=11300
|
//#if MC>=11300
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ public class Pipeline<R extends Frame, P extends Frame> implements Runnable {
|
|||||||
//#if MC>=11300
|
//#if MC>=11300
|
||||||
if (GLFW.glfwWindowShouldClose(mc.mainWindow.getHandle()) || ((MinecraftAccessor) mc).hasCrashed()) {
|
if (GLFW.glfwWindowShouldClose(mc.mainWindow.getHandle()) || ((MinecraftAccessor) mc).hasCrashed()) {
|
||||||
//#else
|
//#else
|
||||||
//$$ if (Display.isCloseRequested() || mc.hasCrashed) {
|
//$$ if (Display.isCloseRequested() || ((MinecraftAccessor) mc).hasCrashed()) {
|
||||||
//#endif
|
//#endif
|
||||||
Thread.currentThread().interrupt();
|
Thread.currentThread().interrupt();
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -74,11 +74,7 @@ public class VideoRenderer implements RenderInfo {
|
|||||||
private int fps;
|
private int fps;
|
||||||
private boolean mouseWasGrabbed;
|
private boolean mouseWasGrabbed;
|
||||||
private boolean debugInfoWasShown;
|
private boolean debugInfoWasShown;
|
||||||
//#if MC>=10904
|
|
||||||
private Map<SoundCategory, Float> originalSoundLevels;
|
private Map<SoundCategory, Float> originalSoundLevels;
|
||||||
//#else
|
|
||||||
//$$ private Map originalSoundLevels;
|
|
||||||
//#endif
|
|
||||||
|
|
||||||
private TimelinePlayer timelinePlayer;
|
private TimelinePlayer timelinePlayer;
|
||||||
private Future<Void> timelinePlayerFuture;
|
private Future<Void> timelinePlayerFuture;
|
||||||
@@ -266,7 +262,6 @@ public class VideoRenderer implements RenderInfo {
|
|||||||
//#endif
|
//#endif
|
||||||
|
|
||||||
// Mute all sounds except GUI sounds (buttons, etc.)
|
// Mute all sounds except GUI sounds (buttons, etc.)
|
||||||
//#if MC>=11300
|
|
||||||
originalSoundLevels = new EnumMap<>(SoundCategory.class);
|
originalSoundLevels = new EnumMap<>(SoundCategory.class);
|
||||||
for (SoundCategory category : SoundCategory.values()) {
|
for (SoundCategory category : SoundCategory.values()) {
|
||||||
if (category != SoundCategory.MASTER) {
|
if (category != SoundCategory.MASTER) {
|
||||||
@@ -274,21 +269,6 @@ public class VideoRenderer implements RenderInfo {
|
|||||||
mc.gameSettings.setSoundLevel(category, 0);
|
mc.gameSettings.setSoundLevel(category, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//#else
|
|
||||||
//$$ Map<SoundCategory, Float> mutedSounds = new EnumMap<>(SoundCategory.class);
|
|
||||||
//$$ for (SoundCategory category : SoundCategory.values()) {
|
|
||||||
//$$ mutedSounds.put(category, 0f);
|
|
||||||
//$$ }
|
|
||||||
//#if MC>=10904
|
|
||||||
//$$ originalSoundLevels = mc.gameSettings.soundLevels;
|
|
||||||
//$$ mutedSounds.put(SoundCategory.MASTER, originalSoundLevels.get(SoundCategory.MASTER));
|
|
||||||
//$$ mc.gameSettings.soundLevels = mutedSounds;
|
|
||||||
//#else
|
|
||||||
//$$ originalSoundLevels = mc.gameSettings.mapSoundLevels;
|
|
||||||
//$$ mutedSounds.put(SoundCategory.MASTER, (Float) originalSoundLevels.get(SoundCategory.MASTER));
|
|
||||||
//$$ mc.gameSettings.mapSoundLevels = mutedSounds;
|
|
||||||
//#endif
|
|
||||||
//#endif
|
|
||||||
|
|
||||||
fps = settings.getFramesPerSecond();
|
fps = settings.getFramesPerSecond();
|
||||||
|
|
||||||
@@ -348,17 +328,9 @@ public class VideoRenderer implements RenderInfo {
|
|||||||
//$$ mc.mouseHelper.grabMouseCursor();
|
//$$ mc.mouseHelper.grabMouseCursor();
|
||||||
//#endif
|
//#endif
|
||||||
}
|
}
|
||||||
//#if MC>=10904
|
|
||||||
//#if MC>=11300
|
|
||||||
for (Map.Entry<SoundCategory, Float> entry : originalSoundLevels.entrySet()) {
|
for (Map.Entry<SoundCategory, Float> entry : originalSoundLevels.entrySet()) {
|
||||||
mc.gameSettings.setSoundLevel(entry.getKey(), entry.getValue());
|
mc.gameSettings.setSoundLevel(entry.getKey(), entry.getValue());
|
||||||
}
|
}
|
||||||
//#else
|
|
||||||
//$$ mc.gameSettings.soundLevels = originalSoundLevels;
|
|
||||||
//#endif
|
|
||||||
//#else
|
|
||||||
//$$ mc.gameSettings.mapSoundLevels = originalSoundLevels;
|
|
||||||
//#endif
|
|
||||||
mc.displayGuiScreen(null);
|
mc.displayGuiScreen(null);
|
||||||
//#if MC>=10800
|
//#if MC>=10800
|
||||||
if (chunkLoadingRenderGlobal != null) {
|
if (chunkLoadingRenderGlobal != null) {
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.replaymod.replay;
|
package com.replaymod.replay;
|
||||||
|
|
||||||
import com.replaymod.core.utils.WrappedTimer;
|
import com.replaymod.core.utils.WrappedTimer;
|
||||||
|
import com.replaymod.core.versions.MCVer;
|
||||||
import com.replaymod.replay.camera.CameraController;
|
import com.replaymod.replay.camera.CameraController;
|
||||||
import com.replaymod.replay.camera.CameraEntity;
|
import com.replaymod.replay.camera.CameraEntity;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
@@ -10,15 +11,8 @@ import net.minecraft.util.Timer;
|
|||||||
import com.replaymod.core.versions.MCVer;
|
import com.replaymod.core.versions.MCVer;
|
||||||
import org.lwjgl.glfw.GLFW;
|
import org.lwjgl.glfw.GLFW;
|
||||||
//#else
|
//#else
|
||||||
//$$ import com.replaymod.replay.events.ReplayDispatchKeypressesEvent;
|
|
||||||
//$$ import net.minecraft.client.gui.GuiScreen;
|
|
||||||
//$$ import net.minecraft.client.settings.GameSettings;
|
|
||||||
//$$ import net.minecraft.client.settings.KeyBinding;
|
//$$ import net.minecraft.client.settings.KeyBinding;
|
||||||
//$$ import net.minecraft.crash.CrashReport;
|
|
||||||
//$$ import net.minecraft.util.ReportedException;
|
|
||||||
//$$ import net.minecraftforge.client.ForgeHooksClient;
|
//$$ import net.minecraftforge.client.ForgeHooksClient;
|
||||||
//$$ import net.minecraftforge.common.MinecraftForge;
|
|
||||||
//$$ import org.lwjgl.input.Keyboard;
|
|
||||||
//$$ import org.lwjgl.input.Mouse;
|
//$$ import org.lwjgl.input.Mouse;
|
||||||
//$$ import net.minecraftforge.fml.common.FMLCommonHandler;
|
//$$ import net.minecraftforge.fml.common.FMLCommonHandler;
|
||||||
//#if MC>=10800
|
//#if MC>=10800
|
||||||
@@ -31,6 +25,11 @@ import org.lwjgl.glfw.GLFW;
|
|||||||
//#endif
|
//#endif
|
||||||
//#endif
|
//#endif
|
||||||
|
|
||||||
|
//#if MC>=10904
|
||||||
|
//#else
|
||||||
|
//$$ import net.minecraft.client.multiplayer.WorldClient;
|
||||||
|
//#endif
|
||||||
|
|
||||||
public class InputReplayTimer extends WrappedTimer {
|
public class InputReplayTimer extends WrappedTimer {
|
||||||
private final ReplayModReplay mod;
|
private final ReplayModReplay mod;
|
||||||
private final Minecraft mc;
|
private final Minecraft mc;
|
||||||
@@ -70,14 +69,10 @@ public class InputReplayTimer extends WrappedTimer {
|
|||||||
}
|
}
|
||||||
mc.keyboardListener.tick();
|
mc.keyboardListener.tick();
|
||||||
//#else
|
//#else
|
||||||
|
//#if MC>=10904
|
||||||
//$$ if (mc.currentScreen == null || mc.currentScreen.allowUserInput) {
|
//$$ if (mc.currentScreen == null || mc.currentScreen.allowUserInput) {
|
||||||
//$$ while (Mouse.next()) {
|
//$$ ((MCVer.MinecraftMethodAccessor) mc).replayModRunTickMouse();
|
||||||
//$$ handleMouseEvent();
|
//$$ ((MCVer.MinecraftMethodAccessor) mc).replayModRunTickKeyboard();
|
||||||
//$$ }
|
|
||||||
//$$
|
|
||||||
//$$ while (Keyboard.next()) {
|
|
||||||
//$$ handleKeyEvent();
|
|
||||||
//$$ }
|
|
||||||
//$$ } else {
|
//$$ } else {
|
||||||
//#if MC<11300
|
//#if MC<11300
|
||||||
//#if MC>=10800
|
//#if MC>=10800
|
||||||
@@ -91,6 +86,21 @@ public class InputReplayTimer extends WrappedTimer {
|
|||||||
//#endif
|
//#endif
|
||||||
//#endif
|
//#endif
|
||||||
//$$ }
|
//$$ }
|
||||||
|
//#else
|
||||||
|
//$$ // 1.8.9 and below has one giant tick function, so we try to only do keyboard & mouse as far as possible
|
||||||
|
//$$ WorldClient world = mc.theWorld;
|
||||||
|
//$$ mc.theWorld = null;
|
||||||
|
//#if MC>=10800
|
||||||
|
//$$ try {
|
||||||
|
//$$ mc.runTick();
|
||||||
|
//$$ } catch (IOException e) { // *SIGH*
|
||||||
|
//$$ e.printStackTrace();
|
||||||
|
//$$ }
|
||||||
|
//#else
|
||||||
|
//$$ mc.runTick();
|
||||||
|
//#endif
|
||||||
|
//$$ mc.theWorld = world;
|
||||||
|
//#endif
|
||||||
//#endif
|
//#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -115,180 +125,6 @@ public class InputReplayTimer extends WrappedTimer {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//#if MC<11300
|
|
||||||
//$$ protected void handleMouseEvent() {
|
|
||||||
//$$ if (ForgeHooksClient.postMouseEvent()) return;
|
|
||||||
//$$
|
|
||||||
//$$ int button = Mouse.getEventButton() - 100;
|
|
||||||
//$$ boolean pressed = Mouse.getEventButtonState();
|
|
||||||
//$$
|
|
||||||
//$$ // Update key binding states
|
|
||||||
//$$ KeyBinding.setKeyBindState(button, pressed);
|
|
||||||
//$$ if (pressed) {
|
|
||||||
//$$ KeyBinding.onTick(button);
|
|
||||||
//$$ }
|
|
||||||
//$$
|
|
||||||
//$$ int wheel = Mouse.getEventDWheel();
|
|
||||||
//$$ handleScroll(wheel);
|
|
||||||
//$$
|
|
||||||
//$$ if (mc.currentScreen == null) {
|
|
||||||
//$$ if (!mc.inGameHasFocus && Mouse.getEventButtonState()) {
|
|
||||||
//$$ // Regrab mouse if the user clicks into the window
|
|
||||||
//$$ mc.setIngameFocus();
|
|
||||||
//$$ }
|
|
||||||
//$$ } else {
|
|
||||||
//#if MC>=10800
|
|
||||||
//$$ try {
|
|
||||||
//$$ mc.currentScreen.handleMouseInput();
|
|
||||||
//$$ } catch (IOException e) { // WHO IS RESPONSIBLE FOR THIS MESS?!?
|
|
||||||
//$$ e.printStackTrace();
|
|
||||||
//$$ }
|
|
||||||
//#else
|
|
||||||
//$$ mc.currentScreen.handleMouseInput();
|
|
||||||
//#endif
|
|
||||||
//$$ }
|
|
||||||
//$$
|
|
||||||
//$$ FMLCommonHandler.instance().fireMouseInput();
|
|
||||||
//$$ }
|
|
||||||
//$$
|
|
||||||
//$$ protected void handleKeyEvent() {
|
|
||||||
//$$ // TODO 1.7.10: This might be missing some 1.7.10-only key bindings or implement some of them incorrectly
|
|
||||||
//$$ int key = Keyboard.getEventKey() == 0 ? Keyboard.getEventCharacter() + 256 : Keyboard.getEventKey();
|
|
||||||
//$$ boolean pressed = Keyboard.getEventKeyState();
|
|
||||||
//$$
|
|
||||||
//$$ KeyBinding.setKeyBindState(key, pressed);
|
|
||||||
//$$ if (pressed) {
|
|
||||||
//$$ KeyBinding.onTick(key);
|
|
||||||
//$$ }
|
|
||||||
//$$
|
|
||||||
//$$ // Still want to be able to create debug crashes ]:D
|
|
||||||
//$$ if (mc.debugCrashKeyPressTime > 0) {
|
|
||||||
//$$ if (Minecraft.getSystemTime() - mc.debugCrashKeyPressTime >= 6000L) {
|
|
||||||
//$$ throw new ReportedException(new CrashReport("Manually triggered debug crash", new Throwable()));
|
|
||||||
//$$ }
|
|
||||||
//$$
|
|
||||||
//$$ if (!Keyboard.isKeyDown(Keyboard.KEY_F3) || !Keyboard.isKeyDown(Keyboard.KEY_C)) {
|
|
||||||
//$$ mc.debugCrashKeyPressTime = -1;
|
|
||||||
//$$ }
|
|
||||||
//$$ } else if (Keyboard.isKeyDown(Keyboard.KEY_F3) && Keyboard.isKeyDown(Keyboard.KEY_C)) {
|
|
||||||
//$$ mc.debugCrashKeyPressTime = Minecraft.getSystemTime();
|
|
||||||
//$$ }
|
|
||||||
//$$
|
|
||||||
//$$ // Twitch, screenshot, fullscreen, etc. (stuff that works everywhere)
|
|
||||||
//$$ if (!MinecraftForge.EVENT_BUS.post(new ReplayDispatchKeypressesEvent.Pre())) {
|
|
||||||
//$$ mc.dispatchKeypresses();
|
|
||||||
//$$ }
|
|
||||||
//$$
|
|
||||||
//$$ if (pressed) {
|
|
||||||
//$$ // This might be subject to change as vanilla shaders are still kinda unused in 1.8
|
|
||||||
//$$ if (key == Keyboard.KEY_F4 && mc.entityRenderer != null) {
|
|
||||||
//#if MC>=10800
|
|
||||||
//$$ mc.entityRenderer.switchUseShader();
|
|
||||||
//#else
|
|
||||||
//$$ mc.entityRenderer.activateNextShader();
|
|
||||||
//#endif
|
|
||||||
//$$ }
|
|
||||||
//$$
|
|
||||||
//$$ if (mc.currentScreen != null) {
|
|
||||||
//#if MC>=10800
|
|
||||||
//$$ try {
|
|
||||||
//$$ mc.currentScreen.handleKeyboardInput();
|
|
||||||
//$$ } catch (IOException e) { // AND WHO THOUGHT THIS WAS A GREAT IDEA?
|
|
||||||
//$$ e.printStackTrace();
|
|
||||||
//$$ }
|
|
||||||
//#else
|
|
||||||
//$$ mc.currentScreen.handleKeyboardInput();
|
|
||||||
//#endif
|
|
||||||
//$$ } else {
|
|
||||||
//$$ if (key == Keyboard.KEY_ESCAPE) {
|
|
||||||
//$$ mc.displayInGameMenu();
|
|
||||||
//$$ }
|
|
||||||
//$$
|
|
||||||
//$$ // Following are a ton of vanilla keyboard shortcuts, some are removed as they're useless in the
|
|
||||||
//$$ // replay viewer as of now
|
|
||||||
//$$ // TODO Update maybe add new key bindings
|
|
||||||
//$$ // TODO: Translate magic values to Keyboard.KEY_ constants
|
|
||||||
//$$
|
|
||||||
//$$ if (key == 32 && Keyboard.isKeyDown(61) && mc.ingameGUI != null) {
|
|
||||||
//#if MC>=11100
|
|
||||||
//$$ mc.ingameGUI.getChatGUI().clearChatMessages(false);
|
|
||||||
//#else
|
|
||||||
//$$ mc.ingameGUI.getChatGUI().clearChatMessages();
|
|
||||||
//#endif
|
|
||||||
//$$ }
|
|
||||||
//$$
|
|
||||||
//$$ if (key == 31 && Keyboard.isKeyDown(61)) {
|
|
||||||
//$$ mc.refreshResources();
|
|
||||||
//$$ }
|
|
||||||
//$$
|
|
||||||
//$$ if (key == 20 && Keyboard.isKeyDown(61)) {
|
|
||||||
//$$ mc.refreshResources();
|
|
||||||
//$$ }
|
|
||||||
//$$
|
|
||||||
//$$ if (key == 33 && Keyboard.isKeyDown(61)) {
|
|
||||||
//$$ boolean flag1 = Keyboard.isKeyDown(42) | Keyboard.isKeyDown(54);
|
|
||||||
//$$ mc.gameSettings.setOptionValue(GameSettings.Options.RENDER_DISTANCE, flag1 ? -1 : 1);
|
|
||||||
//$$ }
|
|
||||||
//$$
|
|
||||||
//$$ if (key == 30 && Keyboard.isKeyDown(61)) {
|
|
||||||
//$$ mc.renderGlobal.loadRenderers();
|
|
||||||
//$$ }
|
|
||||||
//$$
|
|
||||||
//$$ if (key == 48 && Keyboard.isKeyDown(61)) {
|
|
||||||
//#if MC>=10800
|
|
||||||
//$$ mc.getRenderManager().setDebugBoundingBox(!mc.getRenderManager().isDebugBoundingBox());
|
|
||||||
//#else
|
|
||||||
//$$ RenderManager.debugBoundingBox = !RenderManager.debugBoundingBox;
|
|
||||||
//#endif
|
|
||||||
//$$ }
|
|
||||||
//$$
|
|
||||||
//$$ if (key == 25 && Keyboard.isKeyDown(61)) {
|
|
||||||
//$$ mc.gameSettings.pauseOnLostFocus = !mc.gameSettings.pauseOnLostFocus;
|
|
||||||
//$$ mc.gameSettings.saveOptions();
|
|
||||||
//$$ }
|
|
||||||
//$$
|
|
||||||
//$$ if (key == 59) {
|
|
||||||
//$$ mc.gameSettings.hideGUI = !mc.gameSettings.hideGUI;
|
|
||||||
//$$ }
|
|
||||||
//$$
|
|
||||||
//$$ if (key == 61) {
|
|
||||||
//$$ mc.gameSettings.showDebugInfo = !mc.gameSettings.showDebugInfo;
|
|
||||||
//$$ mc.gameSettings.showDebugProfilerChart = GuiScreen.isShiftKeyDown();
|
|
||||||
//$$ }
|
|
||||||
//$$
|
|
||||||
//$$ if (mc.gameSettings.keyBindTogglePerspective.isPressed()) {
|
|
||||||
//$$ mc.gameSettings.thirdPersonView = (mc.gameSettings.thirdPersonView + 1) % 3;
|
|
||||||
//$$
|
|
||||||
//#if MC>=10800
|
|
||||||
//$$ if (mc.entityRenderer != null) { // Extra check, not in vanilla code
|
|
||||||
//$$ if (mc.gameSettings.thirdPersonView == 0) {
|
|
||||||
//$$ mc.entityRenderer.loadEntityShader(mc.getRenderViewEntity());
|
|
||||||
//$$ } else if (mc.gameSettings.thirdPersonView == 1) {
|
|
||||||
//$$ mc.entityRenderer.loadEntityShader(null);
|
|
||||||
//$$ }
|
|
||||||
//$$ }
|
|
||||||
//#endif
|
|
||||||
//$$ }
|
|
||||||
//$$ }
|
|
||||||
//$$
|
|
||||||
//$$ // Navigation in the debug chart
|
|
||||||
//$$ if (mc.gameSettings.showDebugInfo && mc.gameSettings.showDebugProfilerChart) {
|
|
||||||
//$$ if (key == Keyboard.KEY_0) {
|
|
||||||
//$$ mc.updateDebugProfilerName(0);
|
|
||||||
//$$ }
|
|
||||||
//$$
|
|
||||||
//$$ for (int i = 0; i < 9; ++i) {
|
|
||||||
//$$ if (key == 2 + i) {
|
|
||||||
//$$ mc.updateDebugProfilerName(i + 1);
|
|
||||||
//$$ }
|
|
||||||
//$$ }
|
|
||||||
//$$ }
|
|
||||||
//$$ }
|
|
||||||
//$$
|
|
||||||
//$$ FMLCommonHandler.instance().fireKeyInput();
|
|
||||||
//$$ }
|
|
||||||
//#endif
|
|
||||||
|
|
||||||
//#if MC<=10710
|
//#if MC<=10710
|
||||||
//$$ public static class RunScheduledTasks extends Event {}
|
//$$ public static class RunScheduledTasks extends Event {}
|
||||||
//#endif
|
//#endif
|
||||||
|
|||||||
@@ -59,9 +59,9 @@ public class NoGuiScreenshot {
|
|||||||
mc.entityRenderer.renderWorld(MCVer.getRenderPartialTicks(), System.nanoTime());
|
mc.entityRenderer.renderWorld(MCVer.getRenderPartialTicks(), System.nanoTime());
|
||||||
//#else
|
//#else
|
||||||
//#if MC>=10809
|
//#if MC>=10809
|
||||||
//$$ mc.entityRenderer.updateCameraAndRender(mc.timer.renderPartialTicks, System.nanoTime());
|
//$$ mc.entityRenderer.updateCameraAndRender(MCVer.getRenderPartialTicks(), System.nanoTime());
|
||||||
//#else
|
//#else
|
||||||
//$$ mc.entityRenderer.updateCameraAndRender(mc.timer.renderPartialTicks);
|
//$$ mc.entityRenderer.updateCameraAndRender(MCVer.getRenderPartialTicks());
|
||||||
//#endif
|
//#endif
|
||||||
//#endif
|
//#endif
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ import com.replaymod.replay.events.ReplayClosedCallback;
|
|||||||
import com.replaymod.replay.events.ReplayClosingCallback;
|
import com.replaymod.replay.events.ReplayClosingCallback;
|
||||||
import com.replaymod.replay.events.ReplayOpenedCallback;
|
import com.replaymod.replay.events.ReplayOpenedCallback;
|
||||||
import com.replaymod.replay.gui.overlay.GuiReplayOverlay;
|
import com.replaymod.replay.gui.overlay.GuiReplayOverlay;
|
||||||
import com.replaymod.replay.mixin.EntityLivingBaseAccessor;
|
|
||||||
import com.replaymod.replaystudio.data.Marker;
|
import com.replaymod.replaystudio.data.Marker;
|
||||||
import com.replaymod.replaystudio.replay.ReplayFile;
|
import com.replaymod.replaystudio.replay.ReplayFile;
|
||||||
import com.replaymod.replaystudio.util.Location;
|
import com.replaymod.replaystudio.util.Location;
|
||||||
@@ -38,9 +37,11 @@ import java.io.IOException;
|
|||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
//#if MC>=11300
|
//#if MC>=11300
|
||||||
|
import com.replaymod.replay.mixin.EntityLivingBaseAccessor;
|
||||||
import net.minecraft.client.MainWindow;
|
import net.minecraft.client.MainWindow;
|
||||||
import net.minecraft.entity.EntityLivingBase;
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
//#else
|
//#else
|
||||||
|
//$$ import com.replaymod.replay.mixin.EntityOtherPlayerMPAccessor;
|
||||||
//$$ import net.minecraft.client.entity.EntityOtherPlayerMP;
|
//$$ import net.minecraft.client.entity.EntityOtherPlayerMP;
|
||||||
//$$ import net.minecraft.client.gui.ScaledResolution;
|
//$$ import net.minecraft.client.gui.ScaledResolution;
|
||||||
//$$ import org.lwjgl.opengl.Display;
|
//$$ import org.lwjgl.opengl.Display;
|
||||||
@@ -685,9 +686,10 @@ public class ReplayHandler {
|
|||||||
//#else
|
//#else
|
||||||
//$$ if (entity instanceof EntityOtherPlayerMP) {
|
//$$ if (entity instanceof EntityOtherPlayerMP) {
|
||||||
//$$ EntityOtherPlayerMP e = (EntityOtherPlayerMP) entity;
|
//$$ EntityOtherPlayerMP e = (EntityOtherPlayerMP) entity;
|
||||||
//$$ e.setPosition(e.otherPlayerMPX, e.otherPlayerMPY, e.otherPlayerMPZ);
|
//$$ EntityOtherPlayerMPAccessor ea = (EntityOtherPlayerMPAccessor) e;
|
||||||
//$$ e.rotationYaw = (float) e.otherPlayerMPYaw;
|
//$$ e.setPosition(ea.getOtherPlayerMPX(), ea.getOtherPlayerMPY(), ea.getOtherPlayerMPZ());
|
||||||
//$$ e.rotationPitch = (float) e.otherPlayerMPPitch;
|
//$$ e.rotationYaw = (float) ea.getOtherPlayerMPYaw();
|
||||||
|
//$$ e.rotationPitch = (float) ea.getOtherPlayerMPPitch();
|
||||||
//$$ }
|
//$$ }
|
||||||
//#endif
|
//#endif
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -701,8 +701,8 @@ public class CameraEntity
|
|||||||
if (lastHandRendered != player) {
|
if (lastHandRendered != player) {
|
||||||
lastHandRendered = player;
|
lastHandRendered = player;
|
||||||
|
|
||||||
//#if MC>=10904
|
|
||||||
FirstPersonRendererAccessor acc = (FirstPersonRendererAccessor) mc.entityRenderer.itemRenderer;
|
FirstPersonRendererAccessor acc = (FirstPersonRendererAccessor) mc.entityRenderer.itemRenderer;
|
||||||
|
//#if MC>=10904
|
||||||
acc.setPrevEquippedProgressMainHand(1);
|
acc.setPrevEquippedProgressMainHand(1);
|
||||||
acc.setPrevEquippedProgressOffHand(1);
|
acc.setPrevEquippedProgressOffHand(1);
|
||||||
acc.setEquippedProgressMainHand(1);
|
acc.setEquippedProgressMainHand(1);
|
||||||
@@ -710,10 +710,10 @@ public class CameraEntity
|
|||||||
acc.setItemStackMainHand(player.getItemStackFromSlot(EntityEquipmentSlot.MAINHAND));
|
acc.setItemStackMainHand(player.getItemStackFromSlot(EntityEquipmentSlot.MAINHAND));
|
||||||
acc.setItemStackOffHand(player.getItemStackFromSlot(EntityEquipmentSlot.OFFHAND));
|
acc.setItemStackOffHand(player.getItemStackFromSlot(EntityEquipmentSlot.OFFHAND));
|
||||||
//#else
|
//#else
|
||||||
//$$ mc.entityRenderer.itemRenderer.prevEquippedProgress = 1;
|
//$$ acc.setPrevEquippedProgress(1);
|
||||||
//$$ mc.entityRenderer.itemRenderer.equippedProgress = 1;
|
//$$ acc.setEquippedProgress(1);
|
||||||
//$$ mc.entityRenderer.itemRenderer.itemToRender = player.inventory.getCurrentItem();
|
//$$ acc.setItemToRender(player.inventory.getCurrentItem());
|
||||||
//$$ mc.entityRenderer.itemRenderer.equippedItemSlot = player.inventory.currentItem;
|
//$$ acc.setEquippedItemSlot(player.inventory.currentItem);
|
||||||
//#endif
|
//#endif
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -61,15 +61,15 @@ public class SpectatorCameraController implements CameraController {
|
|||||||
//#else
|
//#else
|
||||||
camera.inventory = viewPlayer.inventory;
|
camera.inventory = viewPlayer.inventory;
|
||||||
//#endif
|
//#endif
|
||||||
//#if MC>=10904
|
|
||||||
EntityPlayerAccessor cameraA = (EntityPlayerAccessor) camera;
|
EntityPlayerAccessor cameraA = (EntityPlayerAccessor) camera;
|
||||||
EntityPlayerAccessor viewPlayerA = (EntityPlayerAccessor) camera;
|
EntityPlayerAccessor viewPlayerA = (EntityPlayerAccessor) camera;
|
||||||
|
//#if MC>=10904
|
||||||
cameraA.setItemStackMainHand(viewPlayerA.getItemStackMainHand());
|
cameraA.setItemStackMainHand(viewPlayerA.getItemStackMainHand());
|
||||||
camera.swingingHand = viewPlayer.swingingHand;
|
camera.swingingHand = viewPlayer.swingingHand;
|
||||||
cameraA.setActiveItemStackUseCount(viewPlayerA.getActiveItemStackUseCount());
|
cameraA.setActiveItemStackUseCount(viewPlayerA.getActiveItemStackUseCount());
|
||||||
//#else
|
//#else
|
||||||
//$$ camera.itemInUse = viewPlayer.itemInUse;
|
//$$ cameraA.setItemInUse(viewPlayerA.getItemInUse());
|
||||||
//$$ camera.itemInUseCount = viewPlayer.itemInUseCount;
|
//$$ cameraA.setItemInUseCount(viewPlayerA.getItemInUseCount());
|
||||||
//#endif
|
//#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,21 @@
|
|||||||
|
//#if MC<11300
|
||||||
|
//$$ package com.replaymod.replay.mixin;
|
||||||
|
//$$
|
||||||
|
//$$ import net.minecraft.client.entity.EntityOtherPlayerMP;
|
||||||
|
//$$ import org.spongepowered.asm.mixin.Mixin;
|
||||||
|
//$$ import org.spongepowered.asm.mixin.gen.Accessor;
|
||||||
|
//$$
|
||||||
|
//$$ @Mixin(EntityOtherPlayerMP.class)
|
||||||
|
//$$ public interface EntityOtherPlayerMPAccessor {
|
||||||
|
//$$ @Accessor
|
||||||
|
//$$ double getOtherPlayerMPX();
|
||||||
|
//$$ @Accessor
|
||||||
|
//$$ double getOtherPlayerMPY();
|
||||||
|
//$$ @Accessor
|
||||||
|
//$$ double getOtherPlayerMPZ();
|
||||||
|
//$$ @Accessor
|
||||||
|
//$$ double getOtherPlayerMPYaw();
|
||||||
|
//$$ @Accessor
|
||||||
|
//$$ double getOtherPlayerMPPitch();
|
||||||
|
//$$ }
|
||||||
|
//#endif
|
||||||
@@ -12,5 +12,14 @@ public interface EntityPlayerAccessor extends EntityLivingBaseAccessor {
|
|||||||
ItemStack getItemStackMainHand();
|
ItemStack getItemStackMainHand();
|
||||||
@Accessor
|
@Accessor
|
||||||
void setItemStackMainHand(ItemStack value);
|
void setItemStackMainHand(ItemStack value);
|
||||||
|
//#else
|
||||||
|
//$$ @Accessor
|
||||||
|
//$$ ItemStack getItemInUse();
|
||||||
|
//$$ @Accessor
|
||||||
|
//$$ void setItemInUse(ItemStack value);
|
||||||
|
//$$ @Accessor
|
||||||
|
//$$ int getItemInUseCount();
|
||||||
|
//$$ @Accessor
|
||||||
|
//$$ void setItemInUseCount(int value);
|
||||||
//#endif
|
//#endif
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,5 +20,14 @@ public interface FirstPersonRendererAccessor {
|
|||||||
void setEquippedProgressOffHand(float value);
|
void setEquippedProgressOffHand(float value);
|
||||||
@Accessor
|
@Accessor
|
||||||
void setPrevEquippedProgressOffHand(float value);
|
void setPrevEquippedProgressOffHand(float value);
|
||||||
|
//#else
|
||||||
|
//$$ @Accessor
|
||||||
|
//$$ void setItemToRender(ItemStack value);
|
||||||
|
//$$ @Accessor
|
||||||
|
//$$ void setEquippedItemSlot(int value);
|
||||||
|
//$$ @Accessor
|
||||||
|
//$$ void setEquippedProgress(float value);
|
||||||
|
//$$ @Accessor
|
||||||
|
//$$ void setPrevEquippedProgress(float value);
|
||||||
//#endif
|
//#endif
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,56 +1,48 @@
|
|||||||
//#if MC>=11300
|
|
||||||
package com.replaymod.replay.mixin;
|
package com.replaymod.replay.mixin;
|
||||||
|
|
||||||
import com.replaymod.extras.advancedscreenshots.AdvancedScreenshots;
|
import com.replaymod.extras.advancedscreenshots.AdvancedScreenshots;
|
||||||
import com.replaymod.replay.ReplayModReplay;
|
import com.replaymod.replay.ReplayModReplay;
|
||||||
import net.minecraft.client.KeyboardListener;
|
|
||||||
import net.minecraft.client.shader.Framebuffer;
|
|
||||||
import net.minecraft.util.ScreenShotHelper;
|
|
||||||
import net.minecraft.util.text.ITextComponent;
|
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
import org.spongepowered.asm.mixin.injection.At;
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
import org.spongepowered.asm.mixin.injection.Redirect;
|
import org.spongepowered.asm.mixin.injection.Inject;
|
||||||
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||||
|
|
||||||
import java.io.File;
|
//#if MC>=11300
|
||||||
import java.util.function.Consumer;
|
import net.minecraft.client.KeyboardListener;
|
||||||
|
//#else
|
||||||
|
//$$ import net.minecraft.client.Minecraft;
|
||||||
|
//#endif
|
||||||
|
|
||||||
|
//#if MC>=11300
|
||||||
@Mixin(KeyboardListener.class)
|
@Mixin(KeyboardListener.class)
|
||||||
|
//#else
|
||||||
|
//$$ @Mixin(Minecraft.class)
|
||||||
|
//#endif
|
||||||
public abstract class MixinKeyboardListener {
|
public abstract class MixinKeyboardListener {
|
||||||
@Redirect(
|
@Inject(
|
||||||
|
//#if MC>=11300
|
||||||
method = "onKeyEvent",
|
method = "onKeyEvent",
|
||||||
|
//#else
|
||||||
|
//$$ method = "dispatchKeypresses",
|
||||||
|
//#endif
|
||||||
at = @At(
|
at = @At(
|
||||||
value = "INVOKE",
|
value = "INVOKE",
|
||||||
//#if MC>=11400
|
//#if MC>=11400
|
||||||
//$$ target = "Lnet/minecraft/client/util/ScreenshotUtils;method_1662(Ljava/io/File;Ljava/lang/String;IILnet/minecraft/client/gl/GlFramebuffer;Ljava/util/function/Consumer;)V"
|
//$$ target = "Lnet/minecraft/client/util/ScreenshotUtils;method_1662(Ljava/io/File;Ljava/lang/String;IILnet/minecraft/client/gl/GlFramebuffer;Ljava/util/function/Consumer;)V"
|
||||||
//#else
|
//#else
|
||||||
|
//#if MC>=11300
|
||||||
target = "Lnet/minecraft/util/ScreenShotHelper;saveScreenshot(Ljava/io/File;IILnet/minecraft/client/shader/Framebuffer;Ljava/util/function/Consumer;)V"
|
target = "Lnet/minecraft/util/ScreenShotHelper;saveScreenshot(Ljava/io/File;IILnet/minecraft/client/shader/Framebuffer;Ljava/util/function/Consumer;)V"
|
||||||
|
//#else
|
||||||
|
//$$ target = "Lnet/minecraft/util/ScreenShotHelper;saveScreenshot(Ljava/io/File;IILnet/minecraft/client/shader/Framebuffer;)Lnet/minecraft/util/text/ITextComponent;"
|
||||||
//#endif
|
//#endif
|
||||||
)
|
//#endif
|
||||||
|
),
|
||||||
|
cancellable = true
|
||||||
)
|
)
|
||||||
private void takeScreenshot(
|
private void takeScreenshot(CallbackInfo ci) {
|
||||||
File p_148260_0_,
|
|
||||||
//#if MC>=11400
|
|
||||||
//$$ String something,
|
|
||||||
//#endif
|
|
||||||
int p_148260_1_,
|
|
||||||
int p_148260_2_,
|
|
||||||
Framebuffer p_148260_3_,
|
|
||||||
Consumer<ITextComponent> p_148260_4_
|
|
||||||
) {
|
|
||||||
if (ReplayModReplay.instance.getReplayHandler() != null) {
|
if (ReplayModReplay.instance.getReplayHandler() != null) {
|
||||||
AdvancedScreenshots.take();
|
AdvancedScreenshots.take();
|
||||||
} else {
|
ci.cancel();
|
||||||
ScreenShotHelper.saveScreenshot(
|
|
||||||
p_148260_0_,
|
|
||||||
//#if MC>=11400
|
|
||||||
//$$ something,
|
|
||||||
//#endif
|
|
||||||
p_148260_1_,
|
|
||||||
p_148260_2_,
|
|
||||||
p_148260_3_,
|
|
||||||
p_148260_4_
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//#endif
|
|
||||||
|
|||||||
@@ -1,219 +0,0 @@
|
|||||||
##if MC<11300
|
|
||||||
#$$ # To apply changes in this file run: ./gradlew clean setupDecompWorkspace idea
|
|
||||||
#$$
|
|
||||||
#$$ # Minecraft
|
|
||||||
##if MC>=11300
|
|
||||||
#$$ public net.minecraft.client.Minecraft func_184117_aA()V # processKeyBinds
|
|
||||||
##endif
|
|
||||||
##if MC>=11002
|
|
||||||
#$$ public-f net.minecraft.client.Minecraft field_71428_T # timer
|
|
||||||
##else
|
|
||||||
#$$ public net.minecraft.client.Minecraft field_71428_T # timer
|
|
||||||
##endif
|
|
||||||
#$$ public net.minecraft.client.Minecraft field_83002_am # debugCrashKeyPressTime
|
|
||||||
#$$ public net.minecraft.client.Minecraft field_71467_ac # rightClickDelayTimer
|
|
||||||
#$$ public net.minecraft.client.Minecraft field_71423_H # systemTime
|
|
||||||
#$$ public net.minecraft.client.Minecraft field_71429_W # leftClickCounter
|
|
||||||
#$$ public net.minecraft.client.Minecraft field_71445_n # isGamePaused
|
|
||||||
#$$ public net.minecraft.client.Minecraft field_152351_aB # scheduledTasks
|
|
||||||
#$$ public net.minecraft.client.Minecraft field_110449_ao # defaultResourcePacks
|
|
||||||
#$$ public net.minecraft.client.Minecraft field_110448_aq # mcResourcePackRepository
|
|
||||||
#$$ public net.minecraft.client.Minecraft field_71434_R # hasCrashed
|
|
||||||
#$$ public net.minecraft.client.Minecraft field_71433_S # crashReporter
|
|
||||||
#$$
|
|
||||||
#$$ #public net.minecraft.client.Minecraft func_71386_F()L # getSystemTime
|
|
||||||
#$$ public net.minecraft.client.Minecraft func_71383_b(I)V # updateDebugProfilerName
|
|
||||||
#$$ public net.minecraft.client.Minecraft func_147116_af()V # clickMouse
|
|
||||||
#$$ public net.minecraft.client.Minecraft func_147121_ag()V # rightClickMouse
|
|
||||||
#$$ public net.minecraft.client.Minecraft func_147112_ai()V # middleClickMouse
|
|
||||||
#$$ public net.minecraft.client.Minecraft func_147115_a(Z)V # sendClickBlockToController
|
|
||||||
#$$
|
|
||||||
##if MC>=11300
|
|
||||||
#$$ # MainWindow
|
|
||||||
#$$ 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
|
|
||||||
##endif
|
|
||||||
##if MC>=10904
|
|
||||||
#$$ public net.minecraft.network.play.server.SPacketSpawnMob field_149043_l # dataManager
|
|
||||||
#$$ public net.minecraft.network.play.server.SPacketSpawnPlayer field_148960_i # watcher
|
|
||||||
##else
|
|
||||||
#$$ public net.minecraft.network.play.server.S0FPacketSpawnMob field_149043_l # dataWatcher
|
|
||||||
#$$ public net.minecraft.network.play.server.S1DPacketEntityEffect field_149434_a # entityId
|
|
||||||
#$$ public net.minecraft.network.play.server.S1CPacketEntityMetadata field_149379_a # entityId
|
|
||||||
#$$ public net.minecraft.network.play.server.S1CPacketEntityMetadata field_149378_b # list
|
|
||||||
#$$ public net.minecraft.network.play.server.S0BPacketAnimation field_148981_a # entityId
|
|
||||||
#$$ public net.minecraft.network.play.server.S02PacketChat field_179842_b # position
|
|
||||||
#$$ public net.minecraft.network.play.server.S19PacketEntityStatus field_149164_a # entityId
|
|
||||||
#$$ public net.minecraft.network.play.server.S0CPacketSpawnPlayer *
|
|
||||||
#$$ public net.minecraft.network.play.server.S18PacketEntityTeleport *
|
|
||||||
#$$ public net.minecraft.network.play.server.S14PacketEntity *
|
|
||||||
#$$ public net.minecraft.network.play.server.S19PacketEntityHeadLook *
|
|
||||||
#$$ public net.minecraft.network.play.server.S12PacketEntityVelocity *
|
|
||||||
#$$ public net.minecraft.network.play.server.S04PacketEntityEquipment *
|
|
||||||
#$$ public net.minecraft.network.play.server.S1BPacketEntityAttach *
|
|
||||||
#$$ public net.minecraft.network.play.server.S0DPacketCollectItem *
|
|
||||||
#$$ public net.minecraft.network.play.server.S13PacketDestroyEntities *
|
|
||||||
##endif
|
|
||||||
#$$
|
|
||||||
#$$ # GuiTextField
|
|
||||||
#$$ public net.minecraft.client.gui.GuiTextField field_146216_j # text
|
|
||||||
#$$
|
|
||||||
#$$ # GuiMainMenu
|
|
||||||
##if MC>=11202
|
|
||||||
#$$ public net.minecraft.client.gui.GuiMainMenu field_175372_K # realmsButton
|
|
||||||
#$$ public net.minecraft.client.gui.GuiMainMenu field_183503_M # realmsNotification
|
|
||||||
##endif
|
|
||||||
#$$
|
|
||||||
#$$ # Entity
|
|
||||||
#$$ public net.minecraft.entity.Entity field_70180_af # dataWatcher
|
|
||||||
#$$
|
|
||||||
#$$ # ResourcePackRepository
|
|
||||||
#$$ public net.minecraft.client.resources.ResourcePackRepository field_148534_e # dirServerResourcepacks
|
|
||||||
##if MC>=10800
|
|
||||||
#$$ public net.minecraft.client.resources.ResourcePackRepository field_177321_h # lock
|
|
||||||
#$$ public net.minecraft.client.resources.ResourcePackRepository field_177322_i # httpRequest
|
|
||||||
##else
|
|
||||||
#$$ public net.minecraft.client.resources.ResourcePackRepository field_148532_f # resourcePack
|
|
||||||
#$$ public net.minecraft.client.resources.ResourcePackRepository field_148533_g # currentlyDownloading
|
|
||||||
##endif
|
|
||||||
#$$
|
|
||||||
#$$ # EntityRenderer
|
|
||||||
#$$ public net.minecraft.client.renderer.EntityRenderer *
|
|
||||||
#$$ public net.minecraft.client.renderer.EntityRenderer *()
|
|
||||||
#$$
|
|
||||||
#$$ # RenderGlobal
|
|
||||||
##if MC>=11300
|
|
||||||
#$$ public net.minecraft.client.renderer.WorldRenderer field_174995_M # renderDispatcher
|
|
||||||
#$$ public net.minecraft.client.renderer.WorldRenderer field_147595_R # displayListEntitiesDirty
|
|
||||||
#$$ public net.minecraft.client.renderer.WorldRenderer field_175009_l # chunksToUpdate
|
|
||||||
#$$ public net.minecraft.client.renderer.WorldRenderer field_72755_R # renderInfos
|
|
||||||
#$$ public net.minecraft.client.renderer.WorldRenderer field_175009_l # chunksToUpdate
|
|
||||||
#$$ public net.minecraft.client.renderer.WorldRenderer field_72740_G # renderEntitiesStartupCounter
|
|
||||||
##else
|
|
||||||
#$$ public net.minecraft.client.renderer.RenderGlobal field_174995_M # renderDispatcher
|
|
||||||
#$$ public net.minecraft.client.renderer.RenderGlobal field_147595_R # displayListEntitiesDirty
|
|
||||||
#$$ public net.minecraft.client.renderer.RenderGlobal field_175009_l # chunksToUpdate
|
|
||||||
#$$ public net.minecraft.client.renderer.RenderGlobal field_72755_R # renderInfos
|
|
||||||
#$$ public net.minecraft.client.renderer.RenderGlobal field_175009_l # chunksToUpdate
|
|
||||||
#$$ public net.minecraft.client.renderer.RenderGlobal field_72740_G # renderEntitiesStartupCounter
|
|
||||||
##if MC<10904
|
|
||||||
#$$ public net.minecraft.client.renderer.RenderGlobal func_174983_a(Lnet.minecraft.util.BlockPos;Lnet.minecraft.client.renderer.chunk.RenderChunk;)Z # isPositionInRenderChunk
|
|
||||||
##endif
|
|
||||||
##endif
|
|
||||||
#$$
|
|
||||||
##if MC>=11300
|
|
||||||
#$$ public net.minecraft.client.renderer.WorldRenderer$ContainerLocalRenderInformation
|
|
||||||
#$$ public net.minecraft.client.renderer.WorldRenderer$ContainerLocalRenderInformation field_178036_a # renderChunk
|
|
||||||
##else
|
|
||||||
#$$ public net.minecraft.client.renderer.RenderGlobal$ContainerLocalRenderInformation
|
|
||||||
#$$ public net.minecraft.client.renderer.RenderGlobal$ContainerLocalRenderInformation field_178036_a # renderChunk
|
|
||||||
##endif
|
|
||||||
#$$
|
|
||||||
#$$ # ChunkRenderDispatcher
|
|
||||||
#$$ public-f net.minecraft.client.renderer.chunk.ChunkRenderDispatcher field_178519_d # queueChunkUpdates
|
|
||||||
#$$ public net.minecraft.client.renderer.chunk.ChunkRenderDispatcher field_178524_h # queueChunkUploads
|
|
||||||
#$$ public net.minecraft.client.renderer.chunk.ChunkRenderDispatcher field_178522_c # listThreadedWorkers
|
|
||||||
#$$
|
|
||||||
#$$ # TextureUtil
|
|
||||||
#$$ public net.minecraft.client.renderer.texture.TextureUtil func_147947_a(I[IIIIIZZZ)V # uploadTextureSub
|
|
||||||
#$$
|
|
||||||
#$$ # RenderManager
|
|
||||||
#$$ public net.minecraft.client.renderer.entity.RenderManager field_178636_l # skinMap
|
|
||||||
#$$
|
|
||||||
#$$ # ItemRenderer
|
|
||||||
#$$ public net.minecraft.client.renderer.ItemRenderer *
|
|
||||||
#$$ public net.minecraft.client.renderer.ItemRenderer *()
|
|
||||||
#$$
|
|
||||||
#$$ # RenderItem
|
|
||||||
##if MC>=10904
|
|
||||||
#$$ public net.minecraft.client.renderer.RenderItem field_184395_f # itemColors
|
|
||||||
##endif
|
|
||||||
#$$
|
|
||||||
#$$ # EntityPlayer
|
|
||||||
#$$ public net.minecraft.entity.player.EntityPlayer *
|
|
||||||
#$$
|
|
||||||
#$$ # EntityOtherPlayerMP
|
|
||||||
#$$ public net.minecraft.client.entity.EntityOtherPlayerMP *
|
|
||||||
#$$
|
|
||||||
#$$ # EffectRenderer
|
|
||||||
##if MC<10904
|
|
||||||
#$$ public net.minecraft.client.particle.EffectRenderer field_110737_b # particleTextures
|
|
||||||
#$$ public net.minecraft.client.particle.EffectRenderer field_78876_b # fxLayers
|
|
||||||
##endif
|
|
||||||
#$$
|
|
||||||
#$$ # IntegratedServer
|
|
||||||
#$$ public net.minecraft.server.integrated.IntegratedServer field_71348_o # isGamePaused
|
|
||||||
#$$
|
|
||||||
#$$ # GameSettings
|
|
||||||
##if MC>=10904
|
|
||||||
##if MC>=11002
|
|
||||||
##if MC>=11300
|
|
||||||
#$$ public-f net.minecraft.client.GameSettings field_186714_aM # soundLevels
|
|
||||||
##else
|
|
||||||
#$$ public-f net.minecraft.client.settings.GameSettings field_186714_aM # soundLevels
|
|
||||||
##endif
|
|
||||||
##else
|
|
||||||
#$$ public net.minecraft.client.settings.GameSettings field_186714_aM # soundLevels
|
|
||||||
##endif
|
|
||||||
##else
|
|
||||||
#$$ public net.minecraft.client.settings.GameSettings field_151446_aD # mapSoundLevels
|
|
||||||
##endif
|
|
||||||
#$$
|
|
||||||
#$$ # Frustum
|
|
||||||
##if MC>=11002
|
|
||||||
#$$ public-f net.minecraft.client.renderer.culling.Frustum field_78552_a # clippingHelper
|
|
||||||
##else
|
|
||||||
#$$ public net.minecraft.client.renderer.culling.Frustum field_78552_a # clippingHelper
|
|
||||||
##endif
|
|
||||||
#$$
|
|
||||||
#$$ # CrashReportCategory
|
|
||||||
#$$ public net.minecraft.crash.CrashReportCategory field_85077_c # children
|
|
||||||
#$$ public net.minecraft.crash.CrashReportCategory$Entry
|
|
||||||
#$$
|
|
||||||
#$$ # KeyBinding
|
|
||||||
#$$ public net.minecraft.client.settings.KeyBinding field_151474_i # pressTime
|
|
||||||
#$$
|
|
||||||
#$$ # Timer
|
|
||||||
#$$ public-f net.minecraft.util.Timer *
|
|
||||||
#$$
|
|
||||||
#$$ # GlStateManager
|
|
||||||
#$$ public net.minecraft.client.renderer.GlStateManager *
|
|
||||||
#$$ public net.minecraft.client.renderer.GlStateManager$TextureState
|
|
||||||
#$$ public net.minecraft.client.renderer.GlStateManager$FogState
|
|
||||||
#$$ public net.minecraft.client.renderer.GlStateManager$BooleanState
|
|
||||||
#$$ public net.minecraft.client.renderer.GlStateManager$BooleanState *
|
|
||||||
#$$
|
|
||||||
##if MC>=10904
|
|
||||||
#$$ # 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
|
|
||||||
##if MC>=10904
|
|
||||||
#$$ public net.minecraft.client.particle.Particle *
|
|
||||||
##endif
|
|
||||||
#$$
|
|
||||||
#$$ # ScreenShotHelper
|
|
||||||
#$$ public net.minecraft.util.ScreenShotHelper func_74290_a(Ljava/io/File;)Ljava/io/File; # getTimestampedPNGFileForDirectory
|
|
||||||
#$$
|
|
||||||
#$$ # Example
|
|
||||||
#$$ # public net.minecraft.package.ClassName func_some_id(Ljava/lang/Class;IZS)V # methodName
|
|
||||||
##endif
|
|
||||||
@@ -13,8 +13,11 @@
|
|||||||
//#endif
|
//#endif
|
||||||
//#if MC>=11300
|
//#if MC>=11300
|
||||||
"MixinKeyboardListener",
|
"MixinKeyboardListener",
|
||||||
"MixinMinecraft",
|
|
||||||
//#endif
|
//#endif
|
||||||
|
//#if MC<10800
|
||||||
|
//$$ "ResourcePackRepositoryAccessor",
|
||||||
|
//#endif
|
||||||
|
"MixinMinecraft",
|
||||||
"GuiMainMenuAccessor",
|
"GuiMainMenuAccessor",
|
||||||
"GuiScreenAccessor",
|
"GuiScreenAccessor",
|
||||||
"KeyBindingAccessor",
|
"KeyBindingAccessor",
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
//#if MC<10904
|
//#if MC<10904
|
||||||
//$$ "EntityAccessor",
|
//$$ "EntityAccessor",
|
||||||
//#endif
|
//#endif
|
||||||
//#if MC>=11300
|
//#if MC>=10904
|
||||||
"ItemRendererAccessor",
|
"ItemRendererAccessor",
|
||||||
//#endif
|
//#endif
|
||||||
"ParticleAccessor",
|
"ParticleAccessor",
|
||||||
|
|||||||
@@ -9,6 +9,9 @@
|
|||||||
//$$ "MixinInGameHud",
|
//$$ "MixinInGameHud",
|
||||||
//#endif
|
//#endif
|
||||||
"EntityLivingBaseAccessor",
|
"EntityLivingBaseAccessor",
|
||||||
|
//#if MC<11300
|
||||||
|
//$$ "EntityOtherPlayerMPAccessor",
|
||||||
|
//#endif
|
||||||
"EntityPlayerAccessor",
|
"EntityPlayerAccessor",
|
||||||
"FirstPersonRendererAccessor",
|
"FirstPersonRendererAccessor",
|
||||||
//#if MC>=10904
|
//#if MC>=10904
|
||||||
@@ -16,15 +19,13 @@
|
|||||||
//#endif
|
//#endif
|
||||||
//#if MC>=10800
|
//#if MC>=10800
|
||||||
"MixinGuiSpectator",
|
"MixinGuiSpectator",
|
||||||
//#if MC>=11300
|
|
||||||
"MixinKeyboardListener",
|
|
||||||
//#endif
|
|
||||||
"MixinRenderArrow",
|
"MixinRenderArrow",
|
||||||
//#if MC<11400
|
//#if MC<11400
|
||||||
"MixinRenderManager",
|
"MixinRenderManager",
|
||||||
//#endif
|
//#endif
|
||||||
"MixinViewFrustum",
|
"MixinViewFrustum",
|
||||||
//#endif
|
//#endif
|
||||||
|
"MixinKeyboardListener",
|
||||||
"MixinPlayerControllerMP",
|
"MixinPlayerControllerMP",
|
||||||
"MixinRenderItem",
|
"MixinRenderItem",
|
||||||
"MixinRenderLivingBase",
|
"MixinRenderLivingBase",
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
net.minecraft.client.resources.ResourcePackRepository setServerResourcePack() setResourcePackInstance()
|
||||||
net.minecraft.client.Minecraft fontRenderer fontRendererObj
|
net.minecraft.client.Minecraft fontRenderer fontRendererObj
|
||||||
net.minecraft.client.renderer.BufferBuilder net.minecraft.client.renderer.VertexBuffer
|
net.minecraft.client.renderer.BufferBuilder net.minecraft.client.renderer.VertexBuffer
|
||||||
net.minecraft.client.gui.GuiButton x xPosition
|
net.minecraft.client.gui.GuiButton x xPosition
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
|
net.minecraft.entity.EntityLivingBase LIVING_FLAGS HAND_STATES
|
||||||
|
net.minecraft.client.resources.DownloadingPackFinder net.minecraft.client.resources.ResourcePackRepository
|
||||||
|
net.minecraft.client.resources.DownloadingPackFinder func_195741_a() setServerResourcePack()
|
||||||
|
net.minecraft.client.renderer.color.ItemColors getColor() getColorFromItemstack()
|
||||||
net.minecraft.client.renderer.GlStateManager activeTexture activeTextureUnit
|
net.minecraft.client.renderer.GlStateManager activeTexture activeTextureUnit
|
||||||
net.minecraft.client.renderer.FirstPersonRenderer net.minecraft.client.renderer.ItemRenderer
|
net.minecraft.client.renderer.FirstPersonRenderer net.minecraft.client.renderer.ItemRenderer
|
||||||
net.minecraft.client.renderer.chunk.ChunkRenderTask net.minecraft.client.renderer.chunk.ChunkCompileTaskGenerator
|
net.minecraft.client.renderer.chunk.ChunkRenderTask net.minecraft.client.renderer.chunk.ChunkCompileTaskGenerator
|
||||||
@@ -13,6 +17,7 @@ net.minecraftforge.eventbus.api.IEventBus net.minecraftforge.fml.common.eventhan
|
|||||||
com.replaymod.core.versions.MCVer.Keyboard org.lwjgl.input.Keyboard
|
com.replaymod.core.versions.MCVer.Keyboard org.lwjgl.input.Keyboard
|
||||||
net.minecraft.client.Minecraft gameDir mcDataDir
|
net.minecraft.client.Minecraft gameDir mcDataDir
|
||||||
net.minecraft.client.Minecraft getInstance() getMinecraft()
|
net.minecraft.client.Minecraft getInstance() getMinecraft()
|
||||||
|
net.minecraft.client.Minecraft getPackFinder() getResourcePackRepository()
|
||||||
net.minecraft.client.renderer.WorldRenderer net.minecraft.client.renderer.RenderGlobal
|
net.minecraft.client.renderer.WorldRenderer net.minecraft.client.renderer.RenderGlobal
|
||||||
net.minecraft.network.play.server.SPacketEntity.Move net.minecraft.network.play.server.SPacketEntity.S17PacketEntityLookMove
|
net.minecraft.network.play.server.SPacketEntity.Move net.minecraft.network.play.server.SPacketEntity.S17PacketEntityLookMove
|
||||||
net.minecraft.entity.Entity isPassenger() isRiding()
|
net.minecraft.entity.Entity isPassenger() isRiding()
|
||||||
|
|||||||
@@ -1,7 +1,11 @@
|
|||||||
|
net.minecraft.util.Timer counter field_74285_i
|
||||||
|
net.minecraft.client.resources.ResourcePackRepository downloadResourcePack() func_180601_a()
|
||||||
|
net.minecraft.client.resources.ResourcePackRepository setResourcePackInstance() func_177319_a()
|
||||||
net.minecraft.network.play.server.S38PacketPlayerListItem getAction() func_179768_b()
|
net.minecraft.network.play.server.S38PacketPlayerListItem getAction() func_179768_b()
|
||||||
net.minecraft.network.play.server.S38PacketPlayerListItem.AddPlayerData getProfile() func_179962_a()
|
net.minecraft.network.play.server.S38PacketPlayerListItem.AddPlayerData getProfile() func_179962_a()
|
||||||
net.minecraft.network.play.server.S48PacketResourcePackSend getURL() func_179783_a()
|
net.minecraft.network.play.server.S48PacketResourcePackSend getURL() func_179783_a()
|
||||||
net.minecraft.network.play.server.S48PacketResourcePackSend getHash() func_179784_b()
|
net.minecraft.network.play.server.S48PacketResourcePackSend getHash() func_179784_b()
|
||||||
|
net.minecraft.network.play.server.S0CPacketSpawnPlayer watcher field_148960_i
|
||||||
net.minecraft.network.play.server.S0CPacketSpawnPlayer getPlayer() func_179819_c()
|
net.minecraft.network.play.server.S0CPacketSpawnPlayer getPlayer() func_179819_c()
|
||||||
net.minecraft.network.play.server.S40PacketDisconnect getReason() func_149165_c()
|
net.minecraft.network.play.server.S40PacketDisconnect getReason() func_149165_c()
|
||||||
net.minecraft.network.play.server.S2BPacketChangeGameState getGameState() func_149138_c()
|
net.minecraft.network.play.server.S2BPacketChangeGameState getGameState() func_149138_c()
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ net.minecraft.util.text.Style net.minecraft.util.ChatStyle
|
|||||||
net.minecraft.util.text.TextFormatting net.minecraft.util.EnumChatFormatting
|
net.minecraft.util.text.TextFormatting net.minecraft.util.EnumChatFormatting
|
||||||
net.minecraft.util.text.ITextComponent net.minecraft.util.IChatComponent
|
net.minecraft.util.text.ITextComponent net.minecraft.util.IChatComponent
|
||||||
net.minecraft.network.datasync.EntityDataManager net.minecraft.entity.DataWatcher
|
net.minecraft.network.datasync.EntityDataManager net.minecraft.entity.DataWatcher
|
||||||
|
net.minecraft.network.datasync.EntityDataManager.DataEntry net.minecraft.entity.DataWatcher.WatchableObject
|
||||||
net.minecraft.client.renderer.VertexBuffer net.minecraft.client.renderer.WorldRenderer
|
net.minecraft.client.renderer.VertexBuffer net.minecraft.client.renderer.WorldRenderer
|
||||||
net.minecraft.client.renderer.Tessellator getBuffer() getWorldRenderer()
|
net.minecraft.client.renderer.Tessellator getBuffer() getWorldRenderer()
|
||||||
net.minecraft.client.particle.Particle net.minecraft.client.particle.EntityFX
|
net.minecraft.client.particle.Particle net.minecraft.client.particle.EntityFX
|
||||||
@@ -30,8 +31,11 @@ net.minecraft.network.play.server.SPacketPlayerPosLook net.minecraft.network.pla
|
|||||||
net.minecraft.network.play.server.SPacketPlayerListItem net.minecraft.network.play.server.S38PacketPlayerListItem
|
net.minecraft.network.play.server.SPacketPlayerListItem net.minecraft.network.play.server.S38PacketPlayerListItem
|
||||||
net.minecraft.network.play.server.SPacketRespawn net.minecraft.network.play.server.S07PacketRespawn
|
net.minecraft.network.play.server.SPacketRespawn net.minecraft.network.play.server.S07PacketRespawn
|
||||||
net.minecraft.network.play.server.SPacketSpawnPlayer net.minecraft.network.play.server.S0CPacketSpawnPlayer
|
net.minecraft.network.play.server.SPacketSpawnPlayer net.minecraft.network.play.server.S0CPacketSpawnPlayer
|
||||||
|
net.minecraft.network.play.server.SPacketSpawnPlayer getDataManagerEntries() func_148944_c()
|
||||||
net.minecraft.network.play.server.SPacketSpawnObject net.minecraft.network.play.server.S0EPacketSpawnObject
|
net.minecraft.network.play.server.SPacketSpawnObject net.minecraft.network.play.server.S0EPacketSpawnObject
|
||||||
net.minecraft.network.play.server.SPacketSpawnMob net.minecraft.network.play.server.S0FPacketSpawnMob
|
net.minecraft.network.play.server.SPacketSpawnMob net.minecraft.network.play.server.S0FPacketSpawnMob
|
||||||
|
net.minecraft.network.play.server.SPacketSpawnMob dataManager field_149043_l
|
||||||
|
net.minecraft.network.play.server.SPacketSpawnMob getDataManagerEntries() func_149027_c()
|
||||||
net.minecraft.network.play.server.SPacketSpawnGlobalEntity net.minecraft.network.play.server.S2CPacketSpawnGlobalEntity
|
net.minecraft.network.play.server.SPacketSpawnGlobalEntity net.minecraft.network.play.server.S2CPacketSpawnGlobalEntity
|
||||||
net.minecraft.network.play.server.SPacketSpawnPainting net.minecraft.network.play.server.S10PacketSpawnPainting
|
net.minecraft.network.play.server.SPacketSpawnPainting net.minecraft.network.play.server.S10PacketSpawnPainting
|
||||||
net.minecraft.network.play.server.SPacketSpawnExperienceOrb net.minecraft.network.play.server.S11PacketSpawnExperienceOrb
|
net.minecraft.network.play.server.SPacketSpawnExperienceOrb net.minecraft.network.play.server.S11PacketSpawnExperienceOrb
|
||||||
|
|||||||
@@ -301,34 +301,11 @@ if (mcVersion <= 10710) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (project.name != 'core') {
|
if (project.name != 'core') {
|
||||||
def preprocessedRes = 'build/preprocessed/res'
|
|
||||||
def preprocessedAT = 'build/preprocessed/at.cfg'
|
|
||||||
def originalRes = '../../src/main/resources'
|
|
||||||
def originalAT = originalRes + '/META-INF/replaymod_at.cfg'
|
|
||||||
def vars = [MC: mcVersion as int]
|
|
||||||
|
|
||||||
if (FABRIC) {
|
|
||||||
// Fabric doesn't have ATs, so we've stopped using them on 1.13+
|
|
||||||
} else if (FG3) {
|
|
||||||
// FG3 reads the AT file right after project evaluation, so we need to convert it right now
|
|
||||||
PreprocessTask.convertFile(PreprocessTask.CFG_KEYWORDS, vars, file(originalAT), file(preprocessedAT))
|
|
||||||
minecraft.accessTransformers << file(preprocessedAT)
|
|
||||||
} else {
|
|
||||||
(mcVersion >= 10800 ? [deobfMcMCP, deobfMcSRG] : [deobfuscateJar, deobfBinJar]).each { task ->
|
|
||||||
task.dependsOn preprocessResources
|
|
||||||
}
|
|
||||||
minecraft.accessTransformer preprocessedRes + '/META-INF/replaymod_at.cfg'
|
|
||||||
}
|
|
||||||
|
|
||||||
def jGui = project.evaluationDependsOn(":jGui:$jGuiVersion")
|
def jGui = project.evaluationDependsOn(":jGui:$jGuiVersion")
|
||||||
// Make sure the corresponding jGui setCoreVersion task runs
|
// Make sure the corresponding jGui setCoreVersion task runs
|
||||||
project.tasks.setCoreVersionJava.dependsOn jGui.tasks.setCoreVersion
|
project.tasks.setCoreVersionJava.dependsOn jGui.tasks.setCoreVersion
|
||||||
// and it doesn't run too early (i.e. before we're done with preprocessing)
|
// and it doesn't run too early (i.e. before we're done with preprocessing)
|
||||||
jGui.tasks.setCoreVersionJava.mustRunAfter project.tasks.preprocessJava
|
jGui.tasks.setCoreVersionJava.mustRunAfter project.tasks.preprocessJava
|
||||||
} else {
|
|
||||||
if (FG3) {
|
|
||||||
minecraft.accessTransformers << file('../../src/main/resources/META-INF/replaymod_at.cfg')
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
task configureRelocation() {
|
task configureRelocation() {
|
||||||
|
|||||||
Reference in New Issue
Block a user