mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 00:17:27 +00:00
Merge pull request #111 from Goodbird-git/screen-size
Implemented the ability to get the screen size from server
This commit is contained in:
6 files changed
+67
-1
No files matched your search
@@ -22,6 +22,8 @@ import static noppes.npcs.client.ClientEventHandler.renderCNPCPlayer;
|
||||
|
||||
public class ClientTickHandler{
|
||||
private World prevWorld;
|
||||
private int prevWidth = 0;
|
||||
private int prevHeight = 0;
|
||||
private boolean otherContainer = false;
|
||||
private int buttonPressed = -1;
|
||||
private long buttonTime = 0L;
|
||||
@@ -55,6 +57,11 @@ public class ClientTickHandler{
|
||||
MusicController.Instance.stopMusic();
|
||||
}
|
||||
ScriptSoundController.Instance.onUpdate();
|
||||
if(Minecraft.getMinecraft().thePlayer!=null && (prevWidth!=mc.displayWidth || prevHeight!=mc.displayHeight)){
|
||||
prevWidth = mc.displayWidth;
|
||||
prevHeight = mc.displayHeight;
|
||||
NoppesUtilPlayer.sendData(EnumPlayerPacket.ScreenSize,mc.displayWidth,mc.displayHeight);
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
|
||||
Reference in new issue
Block a user