Replaced Spectate Selection GUI with Player Overview GUI, added way to hide specific players
Updated Skin File retrieving to new Mojang API IMPORTANT: clean and rebuild the IntelliJ project, Access Transformers added!
This commit is contained in:
@@ -4,6 +4,7 @@ import com.mojang.authlib.GameProfile;
|
||||
import eu.crushedpixel.replaymod.ReplayMod;
|
||||
import eu.crushedpixel.replaymod.entities.CameraEntity;
|
||||
import eu.crushedpixel.replaymod.holders.*;
|
||||
import eu.crushedpixel.replaymod.registry.PlayerHandler;
|
||||
import eu.crushedpixel.replaymod.utils.ReplayFile;
|
||||
import eu.crushedpixel.replaymod.utils.ReplayFileIO;
|
||||
import net.minecraft.client.Minecraft;
|
||||
@@ -343,6 +344,8 @@ public class ReplayHandler {
|
||||
KeyframeSet[] paths = currentReplayFile.paths().get();
|
||||
ReplayHandler.setKeyframeRepository(paths == null ? new KeyframeSet[0] : paths, false);
|
||||
|
||||
PlayerHandler.resetHiddenPlayers();
|
||||
|
||||
ReplayMod.replaySender = new ReplaySender(currentReplayFile, true);
|
||||
channel.pipeline().addFirst(ReplayMod.replaySender);
|
||||
channel.pipeline().fireChannelActive();
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
package eu.crushedpixel.replaymod.replay.spectate;
|
||||
|
||||
import com.google.common.base.Predicate;
|
||||
import eu.crushedpixel.replaymod.entities.CameraEntity;
|
||||
import eu.crushedpixel.replaymod.gui.GuiSpectateSelection;
|
||||
import eu.crushedpixel.replaymod.replay.ReplayHandler;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class SpectateHandler {
|
||||
|
||||
private static Minecraft mc = Minecraft.getMinecraft();
|
||||
|
||||
private static Predicate<EntityPlayer> playerPredicate = new Predicate<EntityPlayer>() {
|
||||
@Override
|
||||
public boolean apply(EntityPlayer input) {
|
||||
if(input instanceof CameraEntity || input == mc.thePlayer) return false;
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
public static void openSpectateSelection() {
|
||||
if(!ReplayHandler.isInReplay()) {
|
||||
return;
|
||||
}
|
||||
|
||||
List<EntityPlayer> players = mc.theWorld.getEntities(EntityPlayer.class, playerPredicate);
|
||||
mc.displayGuiScreen(new GuiSpectateSelection(players));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user