diff --git a/src/main/java/eu/crushedpixel/replaymod/interpolation/LinearPoint.java b/src/main/java/eu/crushedpixel/replaymod/interpolation/LinearPoint.java index ffb8736b..f69a1279 100755 --- a/src/main/java/eu/crushedpixel/replaymod/interpolation/LinearPoint.java +++ b/src/main/java/eu/crushedpixel/replaymod/interpolation/LinearPoint.java @@ -19,10 +19,12 @@ public class LinearPoint extends LinearInterpolation { double y = getInterpolatedValue(first.getY(), second.getY(), perc); double z = getInterpolatedValue(first.getZ(), second.getZ(), perc); - float pitch = (float) getInterpolatedValue(first.getPitch(), second.getPitch(), perc); - float yaw = (float) getInterpolatedValue(first.getYaw(), second.getYaw(), perc); + float pitch = (float)getInterpolatedValue(first.getPitch(), second.getPitch(), perc); + float yaw = (float)getInterpolatedValue(first.getYaw(), second.getYaw(), perc); - Position inter = new Position(x, y, z, pitch, yaw); + float rot = (float)getInterpolatedValue(first.getRotation(), second.getRotation(), perc); + + Position inter = new Position(x, y, z, pitch, yaw, rot); return inter; } diff --git a/src/main/java/eu/crushedpixel/replaymod/replay/ReplayProcess.java b/src/main/java/eu/crushedpixel/replaymod/replay/ReplayProcess.java index 49625096..0a493796 100755 --- a/src/main/java/eu/crushedpixel/replaymod/replay/ReplayProcess.java +++ b/src/main/java/eu/crushedpixel/replaymod/replay/ReplayProcess.java @@ -333,6 +333,8 @@ public class ReplayProcess { } } + ReplayHandler.setCameraTilt(pos.getRotation()); + Integer curTimestamp = null; if(timeLinear != null && timeCount > 1) { curTimestamp = timeLinear.getPoint(Math.max(0, Math.min(1, timePos))); diff --git a/src/main/java/eu/crushedpixel/replaymod/utils/ResourceHelper.java b/src/main/java/eu/crushedpixel/replaymod/utils/ResourceHelper.java index b2ebd416..902a6e5d 100755 --- a/src/main/java/eu/crushedpixel/replaymod/utils/ResourceHelper.java +++ b/src/main/java/eu/crushedpixel/replaymod/utils/ResourceHelper.java @@ -33,11 +33,16 @@ public class ResourceHelper { } public static void freeAllResources() { - for(ResourceLocation loc : openResources) { - Minecraft.getMinecraft().getTextureManager().deleteTexture(loc); - } + Minecraft.getMinecraft().addScheduledTask(new Runnable() { + @Override + public void run() { + for(ResourceLocation loc : openResources) { + Minecraft.getMinecraft().getTextureManager().deleteTexture(loc); + } - openResources = new ArrayList(); + openResources = new ArrayList(); + } + }); } public static BufferedImage getDefaultThumbnail() {