
FokC
Members-
Posts
14 -
Joined
-
Last visited
Converted
-
Gender
Undisclosed
-
Personal Text
I am new!
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
FokC's Achievements

Tree Puncher (2/8)
0
Reputation
-
I do want to access them, but also access the entire tab menu
-
I just need to have a piece of code that will yield me a string list, containing the information from the tab menu. If I'll be able to get there (with help or on my own), I'll be able to break down the info and continue on my own. I understand java programming and game programming very well (I've been studying for more than 4 years), but I'm not that great at analyzing code without meaningful variable names or without comments. If I would be able to understand the minecraft code by myself I wouldn't be here, but I'm here because I just cant seem to find a way to read information from the tab menu.
-
Again, I have many ways determining which server the player is on. I know when he is on, and I know what IP he used to connect to that server. But, lets say I made up a proxy server on my local machine, that will connect me to "mc.hypixel.net". The minecraft client won't know that it was redirected to "mc.hypixel.net", and it will still think it is connected to "localhost". Because of that reason, I need ways to know what server the player is on without using login events and connection information.
-
I need to detect a certain server. Because some big networks use proxy servers, I can't simply use ClientConnectToServerEvent (or whatever). The detection needs to be done from information that the client already have, and not relay on events
-
I am working on server detection for several servers. Some servers use scoreboards, which were quite easy to figure out from the game code. Some servers use welcome messages. Some servers use Tab Player List information, which I have yet to find a way to get the information from the tab menu. Basically, I've made few attempts at understanding the game code, but because the variable names are not useful and there are no comments, I pretty much have nothing right now (besides the original game code)
-
I want all the strings displayed here (player names and the two strings, one at the top and one at the bottom, assuming they are "special")
-
I actually already found out that, but I looked through the code and could not understand a thing. I already went through a similar process of getting minecraft's code and removing what I don't need, but couldn't seem to do it with this method. public void renderPlayerlist(int width, Scoreboard scoreboardIn, ScoreObjective scoreObjectiveIn) { NetHandlerPlayClient nethandlerplayclient = this.mc.thePlayer.sendQueue; List<NetworkPlayerInfo> list = field_175252_a.<NetworkPlayerInfo>sortedCopy(nethandlerplayclient.getPlayerInfoMap()); int i = 0; int j = 0; for (NetworkPlayerInfo networkplayerinfo : list) { int k = this.mc.fontRendererObj.getStringWidth(this.getPlayerName(networkplayerinfo)); i = Math.max(i, k); if (scoreObjectiveIn != null && scoreObjectiveIn.getRenderType() != IScoreObjectiveCriteria.EnumRenderType.HEARTS) { k = this.mc.fontRendererObj.getStringWidth(" " + scoreboardIn.getValueFromObjective(networkplayerinfo.getGameProfile().getName(), scoreObjectiveIn).getScorePoints()); j = Math.max(j, k); } } list = list.subList(0, Math.min(list.size(), 80)); int l3 = list.size(); int i4 = l3; int j4; for (j4 = 1; i4 > 20; i4 = (l3 + j4 - 1) / j4) { ++j4; } boolean flag = this.mc.isIntegratedServerRunning() || this.mc.getNetHandler().getNetworkManager().getIsencrypted(); int l; if (scoreObjectiveIn != null) { if (scoreObjectiveIn.getRenderType() == IScoreObjectiveCriteria.EnumRenderType.HEARTS) { l = 90; } else { l = j; } } else { l = 0; } int i1 = Math.min(j4 * ((flag ? 9 : 0) + i + l + 13), width - 50) / j4; int j1 = width / 2 - (i1 * j4 + (j4 - 1) * 5) / 2; int k1 = 10; int l1 = i1 * j4 + (j4 - 1) * 5; List<String> list1 = null; List<String> list2 = null; if (this.header != null) { list1 = this.mc.fontRendererObj.listFormattedStringToWidth(this.header.getFormattedText(), width - 50); for (String s : list1) { l1 = Math.max(l1, this.mc.fontRendererObj.getStringWidth(s)); } } if (this.footer != null) { list2 = this.mc.fontRendererObj.listFormattedStringToWidth(this.footer.getFormattedText(), width - 50); for (String s2 : list2) { l1 = Math.max(l1, this.mc.fontRendererObj.getStringWidth(s2)); } } if (list1 != null) { drawRect(width / 2 - l1 / 2 - 1, k1 - 1, width / 2 + l1 / 2 + 1, k1 + list1.size() * this.mc.fontRendererObj.FONT_HEIGHT, Integer.MIN_VALUE); for (String s3 : list1) { int i2 = this.mc.fontRendererObj.getStringWidth(s3); this.mc.fontRendererObj.drawStringWithShadow(s3, (float)(width / 2 - i2 / 2), (float)k1, -1); k1 += this.mc.fontRendererObj.FONT_HEIGHT; } ++k1; } drawRect(width / 2 - l1 / 2 - 1, k1 - 1, width / 2 + l1 / 2 + 1, k1 + i4 * 9, Integer.MIN_VALUE); for (int k4 = 0; k4 < l3; ++k4) { int l4 = k4 / i4; int i5 = k4 % i4; int j2 = j1 + l4 * i1 + l4 * 5; int k2 = k1 + i5 * 9; drawRect(j2, k2, j2 + i1, k2 + 8, 553648127); GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); GlStateManager.enableAlpha(); GlStateManager.enableBlend(); GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0); if (k4 < list.size()) { NetworkPlayerInfo networkplayerinfo1 = (NetworkPlayerInfo)list.get(k4); String s1 = this.getPlayerName(networkplayerinfo1); GameProfile gameprofile = networkplayerinfo1.getGameProfile(); if (flag) { EntityPlayer entityplayer = this.mc.theWorld.getPlayerEntityByUUID(gameprofile.getId()); boolean flag1 = entityplayer != null && entityplayer.isWearing(EnumPlayerModelParts.CAPE) && (gameprofile.getName().equals("Dinnerbone") || gameprofile.getName().equals("Grumm")); this.mc.getTextureManager().bindTexture(networkplayerinfo1.getLocationSkin()); int l2 = 8 + (flag1 ? 8 : 0); int i3 = 8 * (flag1 ? -1 : 1); Gui.drawScaledCustomSizeModalRect(j2, k2, 8.0F, (float)l2, 8, i3, 8, 8, 64.0F, 64.0F); if (entityplayer != null && entityplayer.isWearing(EnumPlayerModelParts.HAT)) { int j3 = 8 + (flag1 ? 8 : 0); int k3 = 8 * (flag1 ? -1 : 1); Gui.drawScaledCustomSizeModalRect(j2, k2, 40.0F, (float)j3, 8, k3, 8, 8, 64.0F, 64.0F); } j2 += 9; } if (networkplayerinfo1.getGameType() == WorldSettings.GameType.SPECTATOR) { s1 = EnumChatFormatting.ITALIC + s1; this.mc.fontRendererObj.drawStringWithShadow(s1, (float)j2, (float)k2, -1862270977); } else { this.mc.fontRendererObj.drawStringWithShadow(s1, (float)j2, (float)k2, -1); } if (scoreObjectiveIn != null && networkplayerinfo1.getGameType() != WorldSettings.GameType.SPECTATOR) { int k5 = j2 + i + 1; int l5 = k5 + l; if (l5 - k5 > 5) { this.drawScoreboardValues(scoreObjectiveIn, k2, gameprofile.getName(), k5, l5, networkplayerinfo1); } } this.drawPing(i1, j2 - (flag ? 9 : 0), k2, networkplayerinfo1); } } if (list2 != null) { k1 = k1 + i4 * 9 + 1; drawRect(width / 2 - l1 / 2 - 1, k1 - 1, width / 2 + l1 / 2 + 1, k1 + list2.size() * this.mc.fontRendererObj.FONT_HEIGHT, Integer.MIN_VALUE); for (String s4 : list2) { int j5 = this.mc.fontRendererObj.getStringWidth(s4); this.mc.fontRendererObj.drawStringWithShadow(s4, (float)(width / 2 - j5 / 2), (float)k1, -1); k1 += this.mc.fontRendererObj.FONT_HEIGHT; } } }
-
I just want to get the information.
-
[1.10.2]How to override vanilla AI with a modified version?
FokC replied to OrangeVillager61's topic in Modder Support
my solution would to make a custom entity, the same as the villager (but with the custom ai) and whenever a villager spawns naturally (hook onto that with the event system), cancel the spawn and spawn the custom entity instead. -
Well, I want the player list, but not only the players... Some servers make some modifications to the tab menu, so there is some server information which I would like to get.
-
Hello! I was wondering if it is possible to get the player list (tab overlay) from client side. So... Is there a way?
-
Just as the title says. Do you have a clue on how to do so? Couldn't figure it out by myself...
-
Hello! I'm making a client side mod, and I came across a problem: I want to handle chat messages sent by the client before they are being sent. I looked all over the internet and could not find a solution. Is there an event to handle this situation? If not, how do I manage to do it then?