Only use java 6 methods
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package eu.crushedpixel.replaymod.events.handlers;
|
||||
|
||||
import eu.crushedpixel.replaymod.recording.ConnectionEventHandler;
|
||||
import eu.crushedpixel.replaymod.utils.Objects;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import io.netty.buffer.Unpooled;
|
||||
import net.minecraft.client.Minecraft;
|
||||
@@ -26,8 +27,6 @@ import net.minecraftforge.fml.common.gameevent.PlayerEvent.PlayerRespawnEvent;
|
||||
import net.minecraftforge.fml.common.gameevent.TickEvent;
|
||||
import net.minecraftforge.fml.common.gameevent.TickEvent.PlayerTickEvent;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
public class RecordingHandler {
|
||||
|
||||
public static final int entityID = Integer.MIN_VALUE + 9001;
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
package eu.crushedpixel.replaymod.interpolation;
|
||||
|
||||
import eu.crushedpixel.replaymod.holders.AdvancedPosition;
|
||||
import eu.crushedpixel.replaymod.holders.Keyframe;
|
||||
import eu.crushedpixel.replaymod.holders.KeyframeComparator;
|
||||
import eu.crushedpixel.replaymod.holders.AdvancedPosition;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public class KeyframeList<K extends KeyframeValue> extends ArrayList<Keyframe<K>> {
|
||||
@@ -44,7 +45,7 @@ public class KeyframeList<K extends KeyframeValue> extends ArrayList<Keyframe<K>
|
||||
|
||||
public void sort() {
|
||||
previousCallLinear = null;
|
||||
sort(KEYFRAME_COMPARATOR);
|
||||
Collections.sort(this, KEYFRAME_COMPARATOR);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
package eu.crushedpixel.replaymod.utils;
|
||||
|
||||
public class Objects {
|
||||
public static boolean equals(Object a, Object b) {
|
||||
return a == b || a != null && a.equals(b);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user