33import static com .minecrafttas .tasmod .TASmod .LOGGER ;
44
55import com .minecrafttas .mctcommon .events .EventClient .EventClientGameLoop ;
6- import com .minecrafttas .mctcommon .events .EventClient .EventDoneLoadingPlayer ;
76import com .minecrafttas .mctcommon .events .EventClient .EventDoneLoadingWorld ;
87import com .minecrafttas .mctcommon .events .EventClient .EventLaunchIntegratedServer ;
98import com .minecrafttas .mctcommon .events .EventClient .EventPlayerJoinedClientSide ;
109import com .minecrafttas .mctcommon .events .EventClient .EventPlayerLeaveClientSide ;
10+ import com .minecrafttas .mctcommon .events .EventClient .EventSetCameraAngle ;
1111import com .minecrafttas .tasmod .TASmod ;
1212import com .minecrafttas .tasmod .TASmodClient ;
1313import com .minecrafttas .tasmod .playback .PlaybackControllerClient ;
2222 *
2323 * @author Scribble
2424 */
25- public class LoadingScreenHandler implements EventLaunchIntegratedServer , EventClientGameLoop , EventDoneLoadingWorld , EventDoneLoadingPlayer , EventPlayerJoinedClientSide , EventPlayerLeaveClientSide {
25+ public class LoadingScreenHandler implements EventLaunchIntegratedServer , EventClientGameLoop , EventDoneLoadingWorld , EventSetCameraAngle , EventPlayerJoinedClientSide , EventPlayerLeaveClientSide {
2626
2727 private boolean waszero ;
2828 private boolean isLoading ;
@@ -80,15 +80,12 @@ public boolean isLoading() {
8080 * <p>Initializes the virtual camera to be in line with the vanilla camera.
8181 */
8282 @ Override
83- public void onDoneLoadingPlayer () {
84- LOGGER .debug (LoggerMarkers .Event , "Finished loading the player position on the client " );
83+ public void onSetCameraAngle () {
84+ LOGGER .debug (LoggerMarkers .Event , "Setting the camera angle " );
8585 VirtualCameraAngleInput cameraAngle = TASmodClient .virtual .CAMERA_ANGLE ;
86- if (cameraAngle .getCurrentPitch () == null || cameraAngle .getCurrentYaw () == null ) {
87- LOGGER .debug ("Setting the initial pitch and yaw" );
88- Minecraft mc = Minecraft .getMinecraft ();
89- EntityPlayerSP player = mc .player ;
90- cameraAngle .setCamera (player .rotationPitch , player .rotationYaw );
91- }
86+ Minecraft mc = Minecraft .getMinecraft ();
87+ EntityPlayerSP player = mc .player ;
88+ cameraAngle .setCamera (player .rotationPitch , player .rotationYaw );
9289 }
9390
9491 /**
@@ -105,7 +102,7 @@ public void onPlayerJoinedClientSide(EntityPlayerSP player) {
105102 * {@inheritDoc}
106103 *
107104 * <p>Resets the camera angle when leaving the world.
108- * <p>If you later rejoin the world {@link #onDoneLoadingPlayer ()} will re-initialise the camera angle
105+ * <p>If you later rejoin the world {@link #onSetCameraAngle ()} will re-initialise the camera angle
109106 */
110107 @ Override
111108 public void onPlayerLeaveClientSide (EntityPlayerSP player ) {
0 commit comments