Only register changes in ReplayFileAppender if something changed - this applies to GuiKeyframeRepository, GuiObjectManager, GuiPlayerOverview, GuiAssetManager
Added equals method to ReplayImageAsset which is based on the BufferedImage's hash code (which is calculated only once)
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
package eu.crushedpixel.replaymod.utils;
|
||||
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.awt.image.DataBufferByte;
|
||||
import java.util.Arrays;
|
||||
|
||||
public class BufferedImageUtils {
|
||||
|
||||
public static int hashCode(BufferedImage bi) {
|
||||
byte[] data = ((DataBufferByte) bi.getData().getDataBuffer()).getData();
|
||||
return Arrays.hashCode(data);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user