Jump to content

Recommended Posts

Posted

As shown: I need to use forge to create a button click event
When the "start Lan World" button is pressed, the task I wrote will be executed. Can you tell me what this event is called? help me! !:/

a.png

Posted
5分钟前,diesieben07说:

嗯...为什么?请解释什么你真正想实现,而不是如何你正在努力实现它。

I want him to always guarantee a value (25565), will not let him change! Can it be done?

 

b.png

Posted
24 minutes ago, diesieben07 said:

同样,您正在解释如何努力实现目标。

您为什么要使其始终为同一端口?

Implementation and server-side custom port "server.properties"
Can it be done? I want to make the client the same server.properties function as the server

Posted (edited)
22分钟前,diesieben07说:

做什么的?目的是什么?server.properties主要用于控制服务器上使用客户端菜单控制的内容

不要让端口是随机的,自己定制它...

 

The other is how do I write "FMLServerStartingEvent" when I press this button

Edited by yazigegeda
Supplementary explanation
Posted (edited)
1 hour ago, diesieben07 said:

What for? What's the purpose of this? The server.properties is mostly to control things on the server that you control using menus on the client...

I think OP wants to make a mod that makes the port static (that is the function from the end-user perspective). It might be useful in that the LAN host does not need to tell other players the port number every time the LAN game starts (i.e. on a large campus, students might not be in the same room and thus have difficulties contacting each other).

 

@yazigegeda Changing that is not going to be a simple task. Your options are either 1) replace the button and replace the IntegratedServer with a custom implementation or 2) use a coremod, which is not supported on these forums.

Edited by DavidM

Some tips:

Spoiler

Modder Support:

Spoiler

1. Do not follow tutorials on YouTube, especially TechnoVision (previously called Loremaster) and HarryTalks, due to their promotion of bad practice and usage of outdated code.

2. Always post your code.

3. Never copy and paste code. You won't learn anything from doing that.

4. 

Quote

Programming via Eclipse's hotfixes will get you nowhere

5. Learn to use your IDE, especially the debugger.

6.

Quote

The "picture that's worth 1000 words" only works if there's an obvious problem or a freehand red circle around it.

Support & Bug Reports:

Spoiler

1. Read the EAQ before asking for help. Remember to provide the appropriate log(s).

2. Versions below 1.11 are no longer supported due to their age. Update to a modern version of Minecraft to receive support.

 

 

Posted
7 minutes ago, DavidM said:

I think OP wants to make a mod that makes the port static (that is the function from the end-user perspective). It might be useful in that the LAN host does not need to tell other players the port number every time the LAN game starts (i.e. on a large campus, students might not be in the same room and thus have difficulties contacting each other).

 

@yazigegeda Changing that is not going to be a simple task. Your options are either 1) replace the button and replace the IntegratedServer with a custom implementation or 2) use a coremod, which is not supported on these forums.

Thank you for the reply! I think I know

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.