yyk419476391
Members-
Posts
16 -
Joined
-
Last visited
Everything posted by yyk419476391
-
but there's no place to moving hud,there's best place for hud
-
-
[SOLVED]How to draw a string in center
yyk419476391 replied to yyk419476391's topic in Modder Support
thank you very much -
[SOLVED]How to draw a string in center
yyk419476391 replied to yyk419476391's topic in Modder Support
if (mc.theWorld != null) { String text = "Hello!"; int width = mc.fontRendererObj.getStringWidth(text); mc.fontRendererObj.drawStringWithShadow(text, mc.displayWidth/2-width/2, 0, 0xFFFFFF); } here's code -
i want to draw a string in center when player is playing but it won't draw in correct location,it always draw in right,when i resize game to small,it draw in correct location
-
[SOLVED]How to use custom unicode font
yyk419476391 replied to yyk419476391's topic in Modder Support
thanks,i override renderUnicodeChar,and it works -
i have a unicode font package,but how to use it to render text in Minecraft?
-
thanks,i found it at Minecraft class
-
thank you,but how to get a NetworkManager instance?
-
mod will send a packet to server when player join,but server can't recevie packet here's code @SubscribeEvent public void joinWorld(EntityJoinWorldEvent e) { if (e.entity != Minecraft.getMinecraft().thePlayer) return; Minecraft.getMinecraft().thePlayer.sendQueue.handleCustomPayload(new S3FPacketCustomPayload("CV",new PacketBuffer(Unpooled.copiedBuffer(VERSION.getBytes())))); LogManager.getLogger().info("Packet Sent"); } VERSION is String type server plugin's code Bukkit.getMessenger().registerIncomingPluginChannel(this, "CV", (String channel, Player ply, byte[] bytes) -> { String version = new String(bytes); getLogger().log(Level.INFO, "Player client version:{0}", version); }); after player join,server doesn't write out client version
-
[SOLVED][1.8.8]How to get server information
yyk419476391 replied to yyk419476391's topic in Modder Support
okay,thanks -
[SOLVED][1.8.8]How to get server information
yyk419476391 replied to yyk419476391's topic in Modder Support
but i can't find this class,is this class available in 1.8.8? -
i want to get a server's information(players,ping) when not connected but i don't know how
-
thanks to jabalar i am try to use gradlew to build,and it can start
-
Use Export in eclipse
-
java.lang.NoSuchFieldError: id i was use GuiButton.id to get button id when InitGuiEvent.Post triggerd. code is tested in mdk's client,this error happend in a real client. forge version is same here's code @SubscribeEvent public void guiEdit(InitGuiEvent.Post e) { int allowModNum = 4; if (Loader.isModLoaded("OptiFine")) allowModNum++; if (Loader.isModLoaded("InputFix")) allowModNum++; if (Loader.instance().getActiveModList().size() > allowModNum) { Minecraft.getMinecraft().shutdown(); } if (e.gui instanceof GuiMainMenu) { GuiScreen screen = e.gui; for (Object o : e.buttonList) { GuiButton btn = (GuiButton)o; if (btn.id != 4&&btn.id != 0&&btn.id != 5) { btn.visible = false; } else if (btn.id == 4) { btn.displayString = "离开昔日黄昏"; } else if (btn.id == 0) { btn.displayString = "客户端设置..."; } } joinServer.yPosition = (int)(screen.height * 0.5); joinServer.xPosition = (int)(screen.width * 0.5) - 100; joinServer.width = 200; e.buttonList.add(joinServer); } else if (e.gui instanceof GuiIngameMenu) { GuiScreen screen = e.gui; for (Object o : e.buttonList) { GuiButton btn = (GuiButton)o; if (btn.id != 4&&btn.id != 0&&btn.id != 5&&btn.id != 6) { btn.visible = false; } else if (btn.id == 4) { btn.displayString = "返回昔日黄昏"; } else if (btn.id == 0) { btn.displayString = "客户端设置..."; btn.width = 200; } else if (btn.id == 5) { btn.displayString = "成就"; } else if (btn.id == 6) { btn.displayString = "统计数据"; } if (btn.id == 1) { disconnect.xPosition = btn.xPosition; disconnect.yPosition = btn.yPosition; disconnect.width = btn.width; } } e.buttonList.add(disconnect); } else if (e.gui instanceof GuiConnecting) { e.buttonList.clear(); } } crash-2018-03-23_13.12.01-client.txt