Updated build.gradle to automatically build fat jars with the dependencies in the /libs folder. This utilizes the shade.sh shell script. Use ./gradlew without explicitely invoking the build task, as this will automatically build a fat jar.

Sorry for this painful commit, but git somehow f'd up and sees changes in files where there aren't any.
This commit is contained in:
Marius Metzger
2015-03-21 17:05:53 +01:00
parent 14f53f7429
commit 11e26e0129
119 changed files with 167 additions and 69 deletions

0
.gitignore vendored Normal file → Executable file
View File

16
build.gradle Normal file → Executable file
View File

@@ -77,3 +77,19 @@ processResources
exclude 'mcmod.info' exclude 'mcmod.info'
} }
} }
def shade() {
exec {
executable "./shade.sh"
args "./build/libs/replaymod-0.6.jar", "./libs", "replaymod-0.6.jar"
}
}
task doShade {
doLast {
shade()
}
}
defaultTasks 'build', 'doShade'

0
gradle/wrapper/gradle-wrapper.jar vendored Normal file → Executable file
View File

0
gradle/wrapper/gradle-wrapper.properties vendored Normal file → Executable file
View File

0
gradlew.bat vendored Normal file → Executable file
View File

Binary file not shown.

17
shade.sh Normal file
View File

@@ -0,0 +1,17 @@
#!/bin/sh
JARPATH="$1"
LIBSPATH="$2"
FILENAME="$3"
TEMPDIR="./tempdir"
mkdir $TEMPDIR
unzip -o $LIBSPATH"/*.jar" -d $TEMPDIR
unzip -o $JARPATH -d $TEMPDIR
JARDIR=$(dirname "$JARPATH")
#Thanks to johni0702 for the following line of code <3
cd $TEMPDIR && ls | zip -r -@ "../$JARDIR/$FILENAME" && cd ..
rm -r $TEMPDIR

0
src/main/java/eu/crushedpixel/replaymod/ReplayMod.java Normal file → Executable file
View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

@@ -42,4 +42,7 @@ public class GuiConstants {
public static final int REPLAY_EDITOR_UP_BUTTON = 5006; public static final int REPLAY_EDITOR_UP_BUTTON = 5006;
public static final int REPLAY_EDITOR_DOWN_BUTTON = 5007; public static final int REPLAY_EDITOR_DOWN_BUTTON = 5007;
public static final int REPLAY_EDITOR_REMOVE_BUTTON = 5008;
public static final int REPLAY_EDITOR_ADD_BUTTON = 5009;
} }

View File

View File

View File

View File

View File

View File

View File

@@ -190,4 +190,8 @@ public class GuiDropdown<T> extends GuiTextField {
public void removeSelectionListener(SelectionListener listener) { public void removeSelectionListener(SelectionListener listener) {
this.selectionListeners.remove(listener); this.selectionListeners.remove(listener);
} }
public boolean isExpanded() {
return open;
}
} }

View File

@@ -42,7 +42,7 @@ public class GuiEntryList<T> extends GuiTextField {
//drawing the entries //drawing the entries
for(int i=0; i-upperIndex<visibleElements; i++) { for(int i=0; i-upperIndex<visibleElements; i++) {
if(i<upperIndex) continue; if(i<upperIndex) continue;
if(i >= elements.size()) break; if(i >= elements.size()) break;
if(i == selectionIndex) { if(i == selectionIndex) {
@@ -84,6 +84,7 @@ public class GuiEntryList<T> extends GuiTextField {
@Override @Override
public void mouseClicked(int xPos, int yPos, int mouseButton) { public void mouseClicked(int xPos, int yPos, int mouseButton) {
if(!(xPos >= xPosition && xPos <= xPosition+width && yPos >= yPosition && yPos <= yPosition+height)) return;
int clickedIndex = (int)Math.floor((yPos-yPosition) / elementHeight) + upperIndex; int clickedIndex = (int)Math.floor((yPos-yPosition) / elementHeight) + upperIndex;
if(clickedIndex < elements.size() && clickedIndex >= 0) { if(clickedIndex < elements.size() && clickedIndex >= 0) {
selectionIndex = clickedIndex; selectionIndex = clickedIndex;
@@ -96,7 +97,7 @@ public class GuiEntryList<T> extends GuiTextField {
listener.onSelectionChanged(selectionIndex); listener.onSelectionChanged(selectionIndex);
} }
} }
@Override @Override
public void setText(String text) {} public void setText(String text) {}
@@ -122,13 +123,16 @@ public class GuiEntryList<T> extends GuiTextField {
} }
public T getElement(int index) { public T getElement(int index) {
return elements.get(index); if(index >= 0) {
return elements.get(index);
}
return null;
} }
public int getSelectionIndex() { public int getSelectionIndex() {
return selectionIndex; return selectionIndex;
} }
public void setSelectionIndex(int index) { public void setSelectionIndex(int index) {
this.selectionIndex = index; this.selectionIndex = index;
if(selectionIndex < 0) selectionIndex = -1; if(selectionIndex < 0) selectionIndex = -1;

View File

View File

View File

View File

@@ -2,6 +2,7 @@ package eu.crushedpixel.replaymod.gui.replaystudio;
import java.awt.Color; import java.awt.Color;
import java.io.File; import java.io.File;
import java.io.IOException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@@ -24,13 +25,13 @@ public class GuiConnectPart extends GuiStudioPart {
private static final String TITLE = "Connect Replays"; private static final String TITLE = "Connect Replays";
private boolean initialized = false; private boolean initialized = false;
private GuiEntryList<String> concatList; private GuiEntryList<String> concatList;
private GuiDropdown<String> replayDropdown; private GuiDropdown<String> replayDropdown;
private GuiButton removeButton, addButton; private GuiButton removeButton, addButton;
private GuiArrowButton upButton, downButton; private GuiArrowButton upButton, downButton;
private List<File> replayFiles; private List<File> replayFiles;
private List<String> filesToConcat; private List<String> filesToConcat;
@@ -65,9 +66,9 @@ public class GuiConnectPart extends GuiStudioPart {
concatList.setElements(filesToConcat); concatList.setElements(filesToConcat);
concatList.setSelectionIndex(0); concatList.setSelectionIndex(0);
replayDropdown = new GuiDropdown(1, fontRendererObj, 250, yPos+5, 0, 4); replayDropdown = new GuiDropdown(1, fontRendererObj, 250, yPos+5, 0, 4);
replayDropdown.clearElements(); replayDropdown.clearElements();
replayFiles = ReplayFileIO.getAllReplayFiles(); replayFiles = ReplayFileIO.getAllReplayFiles();
int index = -1; int index = -1;
@@ -80,19 +81,20 @@ public class GuiConnectPart extends GuiStudioPart {
} }
i++; i++;
} }
replayDropdown.setSelectionPos(index); replayDropdown.setSelectionPos(index);
replayDropdown.addSelectionListener(new SelectionListener() { replayDropdown.addSelectionListener(new SelectionListener() {
@Override @Override
public void onSelectionChanged(int selectionIndex) { public void onSelectionChanged(int selectionIndex) {
filesToConcat.set(concatList.getSelectionIndex(), (String)replayDropdown.getElement(selectionIndex)); try {
concatList.setElements(filesToConcat); filesToConcat.set(concatList.getSelectionIndex(), (String)replayDropdown.getElement(selectionIndex));
concatList.setElements(filesToConcat);
} catch(Exception e) {} //Sorry, too lazy to properly avoid this Exception here
} }
}); });
concatList.addSelectionListener(new SelectionListener() { concatList.addSelectionListener(new SelectionListener() {
@Override @Override
public void onSelectionChanged(int selectionIndex) { public void onSelectionChanged(int selectionIndex) {
@@ -106,54 +108,58 @@ public class GuiConnectPart extends GuiStudioPart {
} }
i++; i++;
} }
removeButton.enabled = upButton.enabled = downButton.enabled = !(selectionIndex < 0 || selectionIndex >= filesToConcat.size());
if(upButton.enabled && selectionIndex == 0) upButton.enabled = false;
if(downButton.enabled && selectionIndex == filesToConcat.size()-1) downButton.enabled = false;
} }
}); });
upButton = new GuiArrowButton(GuiConstants.REPLAY_EDITOR_UP_BUTTON, 195, yPos+40, "", true); upButton = new GuiArrowButton(GuiConstants.REPLAY_EDITOR_UP_BUTTON, 195, yPos+40, "", true);
buttonList.add(upButton); buttonList.add(upButton);
downButton = new GuiArrowButton(GuiConstants.REPLAY_EDITOR_DOWN_BUTTON, 219, yPos+40, "", false); downButton = new GuiArrowButton(GuiConstants.REPLAY_EDITOR_DOWN_BUTTON, 219, yPos+40, "", false);
buttonList.add(downButton); buttonList.add(downButton);
int w = GuiReplayStudio.instance.width-243-20-4; int w = GuiReplayStudio.instance.width-243-20-4;
removeButton = new GuiButton(1, 243, yPos+40, "Remove"); removeButton = new GuiButton(GuiConstants.REPLAY_EDITOR_REMOVE_BUTTON, 249, yPos+40, "Remove");
buttonList.add(removeButton); buttonList.add(removeButton);
addButton = new GuiButton(1, 0, yPos+40, "Add"); addButton = new GuiButton(GuiConstants.REPLAY_EDITOR_ADD_BUTTON, 0, yPos+40, "Add");
buttonList.add(addButton); buttonList.add(addButton);
concatList.setSelectionIndex(0);
} }
int w = GuiReplayStudio.instance.width-243-20-4; int w = GuiReplayStudio.instance.width-249-20-4;
addButton.xPosition = 243+6+(w/2); addButton.xPosition = 249+6+(w/2);
addButton.width = w/2+2; addButton.width = w/2+2;
removeButton.width = w/2+2; removeButton.width = w/2+2;
replayDropdown.width = GuiReplayStudio.instance.width-250-20; replayDropdown.width = GuiReplayStudio.instance.width-250-18;
int h = GuiReplayStudio.instance.height-yPos-20; int h = GuiReplayStudio.instance.height-yPos-20;
int rows = (int)(h / (float)GuiEntryList.elementHeight); int rows = (int)(h / (float)GuiEntryList.elementHeight);
concatList.setVisibleElements(rows); concatList.setVisibleElements(rows);
initialized = true; initialized = true;
} }
@Override @Override
public void mouseClicked(int mouseX, int mouseY, int mouseButton) { public void mouseClicked(int mouseX, int mouseY, int mouseButton) throws IOException {
super.mouseClicked(mouseX, mouseY, mouseButton); //call this first to ensure the dropdown is still open
concatList.mouseClicked(mouseX, mouseY, mouseButton); concatList.mouseClicked(mouseX, mouseY, mouseButton);
replayDropdown.mouseClicked(mouseX, mouseY, mouseButton); replayDropdown.mouseClicked(mouseX, mouseY, mouseButton);
} }
@Override @Override
public void drawScreen(int mouseX, int mouseY, float partialTicks) { public void drawScreen(int mouseX, int mouseY, float partialTicks) {
super.drawScreen(mouseX, mouseY, partialTicks);
concatList.drawTextBox(); concatList.drawTextBox();
replayDropdown.drawTextBox(); replayDropdown.drawTextBox();
drawString(fontRendererObj, "Replay:", 200, yPos+5+7, Color.WHITE.getRGB()); drawString(fontRendererObj, "Replay:", 200, yPos+5+7, Color.WHITE.getRGB());
super.drawScreen(mouseX, mouseY, partialTicks);
} }
@Override @Override
@@ -165,4 +171,28 @@ public class GuiConnectPart extends GuiStudioPart {
public void keyTyped(char typedChar, int keyCode) { public void keyTyped(char typedChar, int keyCode) {
} }
@Override
protected void actionPerformed(GuiButton button) {
if(!button.enabled || replayDropdown.isExpanded()) {
return;
}
if(button.id == GuiConstants.REPLAY_EDITOR_ADD_BUTTON) {
filesToConcat.add(FilenameUtils.getBaseName(replayFiles.get(0).getAbsolutePath()));
concatList.setElements(filesToConcat);
concatList.setSelectionIndex(filesToConcat.size()-1);
} else if(button.id == GuiConstants.REPLAY_EDITOR_REMOVE_BUTTON) {
int indexBefore = concatList.getSelectionIndex();
if(indexBefore >= 0 && indexBefore < filesToConcat.size()) {
filesToConcat.remove(indexBefore);
concatList.setElements(filesToConcat);
if(filesToConcat.size() <= indexBefore) {
concatList.setSelectionIndex(filesToConcat.size()-1);
} else {
concatList.setSelectionIndex(indexBefore);
}
}
}
}
} }

View File

@@ -1,5 +1,7 @@
package eu.crushedpixel.replaymod.gui.replaystudio; package eu.crushedpixel.replaymod.gui.replaystudio;
import java.io.IOException;
import net.minecraft.client.gui.GuiScreen; import net.minecraft.client.gui.GuiScreen;
public abstract class GuiStudioPart extends GuiScreen { public abstract class GuiStudioPart extends GuiScreen {
@@ -20,5 +22,7 @@ public abstract class GuiStudioPart extends GuiScreen {
public abstract void keyTyped(char typedChar, int keyCode); public abstract void keyTyped(char typedChar, int keyCode);
@Override @Override
public abstract void mouseClicked(int mouseX, int mouseY, int mouseButton); public void mouseClicked(int mouseX, int mouseY, int mouseButton) throws IOException {
super.mouseClicked(mouseX, mouseY, mouseButton);
}
} }

View File

View File

@@ -10,7 +10,7 @@ public class KeyframeComparator implements Comparator<Keyframe> {
public int compare(Keyframe o1, Keyframe o2) { public int compare(Keyframe o1, Keyframe o2) {
if(ReplayHandler.isSelected(o1)) return 1; if(ReplayHandler.isSelected(o1)) return 1;
if(ReplayHandler.isSelected(o2)) return -1; if(ReplayHandler.isSelected(o2)) return -1;
return o1.getRealTimestamp()-o2.getRealTimestamp(); return ((Integer)o1.getRealTimestamp()).compareTo(o2.getRealTimestamp());
} }
} }

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

@@ -48,6 +48,8 @@ public class ReplayProcess {
} }
public static void startReplayProcess(boolean record) { public static void startReplayProcess(boolean record) {
ReplayHandler.selectKeyframe(null);
isVideoRecording = record; isVideoRecording = record;
lastPosition = null; lastPosition = null;
motionSpline = null; motionSpline = null;
@@ -295,15 +297,13 @@ public class ReplayProcess {
private static void recordingTick() { private static void recordingTick() {
if(ReplayHandler.isHurrying()) { if(ReplayHandler.isHurrying()) {
if(!isVideoRecording()) {
lastRealTime = System.currentTimeMillis();
}
return; return;
} }
if(blocked && isVideoRecording()) { if(blocked && isVideoRecording()) {
return; return;
} }
deepBlock = true; deepBlock = true;
blocked = true; blocked = true;
@@ -345,15 +345,8 @@ public class ReplayProcess {
motionSpline.calcSpline(); motionSpline.calcSpline();
} }
long timeStep;
long curTime = System.currentTimeMillis(); long curTime = System.currentTimeMillis();
long timeStep = 1000/ReplayMod.replaySettings.getVideoFramerate();
if(isVideoRecording()) {
timeStep = 1000/ReplayMod.replaySettings.getVideoFramerate();
} else {
timeStep = curTime - lastRealTime;
}
int curRealReplayTime = (int)(lastRealReplayTime + timeStep); int curRealReplayTime = (int)(lastRealReplayTime + timeStep);
@@ -409,14 +402,20 @@ public class ReplayProcess {
} }
} }
int currentDiff = nextPosStamp - lastPosStamp; int currentPosDiff = nextPosStamp - lastPosStamp;
int current = curRealReplayTime - lastPosStamp; int currentPos = curRealReplayTime - lastPosStamp;
float currentStepPerc = (float)current/(float)currentDiff; //The percentage of the travelled path between the current positions float currentPosStepPerc = (float)currentPos/(float)currentPosDiff; //The percentage of the travelled path between the current positions
if(Float.isInfinite(currentStepPerc)) currentStepPerc = 0; if(Float.isInfinite(currentPosStepPerc)) currentPosStepPerc = 0;
float splinePos = ((float)ReplayHandler.getKeyframeIndex(lastPos) + currentStepPerc)/(float)(ReplayHandler.getPosKeyframeCount()-1); int currentTimeDiff = nextTimeStamp - lastTimeStamp;
float timePos = ((float)ReplayHandler.getKeyframeIndex(lastTime) + currentStepPerc)/(float)(ReplayHandler.getTimeKeyframeCount()-1); int currentTime = curRealReplayTime - lastTimeStamp;
float currentTimeStepPerc = (float)currentTime/(float)currentTimeDiff; //The percentage of the travelled path between the current timestamps
if(Float.isInfinite(currentTimeStepPerc)) currentTimeStepPerc = 0;
float splinePos = ((float)ReplayHandler.getKeyframeIndex(lastPos) + currentPosStepPerc)/(float)(ReplayHandler.getPosKeyframeCount()-1);
float timePos = ((float)ReplayHandler.getKeyframeIndex(lastTime) + currentTimeStepPerc)/(float)(ReplayHandler.getTimeKeyframeCount()-1);
Position pos = null; Position pos = null;
if(!linear) { if(!linear) {

View File

@@ -13,11 +13,14 @@ import java.io.InputStream;
import java.io.InputStreamReader; import java.io.InputStreamReader;
import java.lang.reflect.Field; import java.lang.reflect.Field;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiDownloadTerrain; import net.minecraft.client.gui.GuiDownloadTerrain;
import net.minecraft.client.particle.EffectRenderer; import net.minecraft.client.particle.EffectRenderer;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.projectile.EntityArrow;
import net.minecraft.network.EnumConnectionState; import net.minecraft.network.EnumConnectionState;
import net.minecraft.network.NetworkManager; import net.minecraft.network.NetworkManager;
import net.minecraft.network.Packet; import net.minecraft.network.Packet;
@@ -29,6 +32,8 @@ import net.minecraft.network.play.server.S07PacketRespawn;
import net.minecraft.network.play.server.S08PacketPlayerPosLook; import net.minecraft.network.play.server.S08PacketPlayerPosLook;
import net.minecraft.network.play.server.S0BPacketAnimation; import net.minecraft.network.play.server.S0BPacketAnimation;
import net.minecraft.network.play.server.S0CPacketSpawnPlayer; import net.minecraft.network.play.server.S0CPacketSpawnPlayer;
import net.minecraft.network.play.server.S0EPacketSpawnObject;
import net.minecraft.network.play.server.S0FPacketSpawnMob;
import net.minecraft.network.play.server.S1CPacketEntityMetadata; import net.minecraft.network.play.server.S1CPacketEntityMetadata;
import net.minecraft.network.play.server.S1DPacketEntityEffect; import net.minecraft.network.play.server.S1DPacketEntityEffect;
import net.minecraft.network.play.server.S1FPacketSetExperience; import net.minecraft.network.play.server.S1FPacketSetExperience;
@@ -56,6 +61,7 @@ import org.apache.commons.compress.archivers.zip.ZipArchiveEntry;
import org.apache.commons.compress.archivers.zip.ZipFile; import org.apache.commons.compress.archivers.zip.ZipFile;
import org.apache.commons.io.FilenameUtils; import org.apache.commons.io.FilenameUtils;
import com.google.common.base.Predicate;
import com.google.gson.Gson; import com.google.gson.Gson;
import eu.crushedpixel.replaymod.ReplayMod; import eu.crushedpixel.replaymod.ReplayMod;
@@ -250,7 +256,7 @@ public class ReplaySender extends ChannelInboundHandlerAdapter {
lastPacketSent = System.currentTimeMillis(); lastPacketSent = System.currentTimeMillis();
ReplayHandler.restartReplay(); ReplayHandler.restartReplay();
} }
while(!terminate && !startFromBeginning && (!paused() || FMLClientHandler.instance().isGUIOpen(GuiDownloadTerrain.class))) { while(!terminate && !startFromBeginning && (!paused() || FMLClientHandler.instance().isGUIOpen(GuiDownloadTerrain.class))) {
try { try {
/* /*
@@ -355,7 +361,7 @@ public class ReplaySender extends ChannelInboundHandlerAdapter {
private static Field playerUUIDField; private static Field playerUUIDField;
private static Field gameProfileField; private static Field gameProfileField;
//private static Field dataWatcherField; //private static Field dataWatcherField;
static { static {
@@ -365,7 +371,7 @@ public class ReplaySender extends ChannelInboundHandlerAdapter {
gameProfileField = S38PacketPlayerListItem.AddPlayerData.class.getDeclaredField("field_179964_d"); gameProfileField = S38PacketPlayerListItem.AddPlayerData.class.getDeclaredField("field_179964_d");
gameProfileField.setAccessible(true); gameProfileField.setAccessible(true);
//dataWatcherField = S0CPacketSpawnPlayer.class.getDeclaredField(MCPNames.field("field_148960_i")); //dataWatcherField = S0CPacketSpawnPlayer.class.getDeclaredField(MCPNames.field("field_148960_i"));
//dataWatcherField.setAccessible(true); //dataWatcherField.setAccessible(true);
} catch(Exception e) { } catch(Exception e) {
@@ -398,7 +404,7 @@ public class ReplaySender extends ChannelInboundHandlerAdapter {
if(p instanceof S45PacketTitle || if(p instanceof S45PacketTitle ||
p instanceof S2APacketParticles) return; p instanceof S2APacketParticles) return;
} }
if(p instanceof S29PacketSoundEffect && ReplayHandler.isInPath() && ReplayProcess.isVideoRecording()) { if(p instanceof S29PacketSoundEffect && ReplayHandler.isInPath() && ReplayProcess.isVideoRecording()) {
return; return;
} }
@@ -416,6 +422,22 @@ public class ReplaySender extends ChannelInboundHandlerAdapter {
if(badPackets.contains(p.getClass())) return; if(badPackets.contains(p.getClass())) return;
/*
if(p instanceof S0EPacketSpawnObject) {
if(mc.theWorld != null) {
List<EntityArrow> arrows = mc.theWorld.getEntities(EntityArrow.class, new Predicate<EntityArrow>() {
@Override
public boolean apply(EntityArrow input) {
return true;
}
});
if(arrows.size() > 20) {
System.out.println(currentTimeStamp);
}
}
}
*/
try { try {
if(p instanceof S1CPacketEntityMetadata) { if(p instanceof S1CPacketEntityMetadata) {
if((Integer)metadataPacketEntityId.get(p) == actualID) { if((Integer)metadataPacketEntityId.get(p) == actualID) {
@@ -437,11 +459,12 @@ public class ReplaySender extends ChannelInboundHandlerAdapter {
p = new S01PacketJoinGame(entId, GameType.SPECTATOR, false, dimension, p = new S01PacketJoinGame(entId, GameType.SPECTATOR, false, dimension,
difficulty, maxPlayers, worldType, false); difficulty, maxPlayers, worldType, false);
} }
if(p instanceof S07PacketRespawn) { if(p instanceof S07PacketRespawn) {
S07PacketRespawn respawn = (S07PacketRespawn)p; S07PacketRespawn respawn = (S07PacketRespawn)p;
p = new S07PacketRespawn(respawn.func_149082_c(), p = new S07PacketRespawn(respawn.func_149082_c(),
respawn.func_149081_d(), respawn.func_149080_f(), GameType.SPECTATOR); respawn.func_149081_d(), respawn.func_149080_f(), GameType.SPECTATOR);
allowMovement = true; allowMovement = true;
} }
@@ -474,15 +497,15 @@ public class ReplaySender extends ChannelInboundHandlerAdapter {
p = sp; p = sp;
} }
*/ */
/* /*
if(p instanceof S0CPacketSpawnPlayer) { if(p instanceof S0CPacketSpawnPlayer) {
System.out.println(dataWatcherField.get(p)); System.out.println(dataWatcherField.get(p));
System.out.println(((S0CPacketSpawnPlayer) p).func_148944_c()); System.out.println(((S0CPacketSpawnPlayer) p).func_148944_c());
} }
*/ */
if(p instanceof S08PacketPlayerPosLook) { if(p instanceof S08PacketPlayerPosLook) {
final S08PacketPlayerPosLook ppl = (S08PacketPlayerPosLook)p; final S08PacketPlayerPosLook ppl = (S08PacketPlayerPosLook)p;
@@ -510,7 +533,7 @@ public class ReplaySender extends ChannelInboundHandlerAdapter {
} }
Entity ent = ReplayHandler.getCameraEntity(); Entity ent = ReplayHandler.getCameraEntity();
if(ent == null || !(ent instanceof CameraEntity)) ent = new CameraEntity(mc.theWorld); if(ent == null || !(ent instanceof CameraEntity)) ent = new CameraEntity(mc.theWorld);
CameraEntity cent = (CameraEntity)ent; CameraEntity cent = (CameraEntity)ent;
cent.moveAbsolute(ppl.func_148932_c(), ppl.func_148928_d(), ppl.func_148933_e()); cent.moveAbsolute(ppl.func_148932_c(), ppl.func_148928_d(), ppl.func_148933_e());
@@ -525,7 +548,7 @@ public class ReplaySender extends ChannelInboundHandlerAdapter {
if(p instanceof S43PacketCamera) { if(p instanceof S43PacketCamera) {
return; return;
} }
super.channelRead(ctx, p); super.channelRead(ctx, p);
} catch(Exception e) { } catch(Exception e) {
System.out.println(p.getClass()); System.out.println(p.getClass());

View File

View File

View File

@@ -1,13 +1,11 @@
package eu.crushedpixel.replaymod.studio; package eu.crushedpixel.replaymod.studio;
import java.io.File; import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream; import java.io.FileOutputStream;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import de.johni0702.replaystudio.Studio; import de.johni0702.replaystudio.PacketData;
import de.johni0702.replaystudio.collection.PacketData;
import de.johni0702.replaystudio.filter.RemoveFilter; import de.johni0702.replaystudio.filter.RemoveFilter;
import de.johni0702.replaystudio.filter.SquashFilter; import de.johni0702.replaystudio.filter.SquashFilter;
import de.johni0702.replaystudio.io.ReplayOutputStream; import de.johni0702.replaystudio.io.ReplayOutputStream;

View File

View File

View File

Some files were not shown because too many files have changed in this diff Show More