Jump to content

Moving border with a mob


lolniels12

Recommended Posts

11 hours ago, lolniels12 said:
 
 

Hello,

i am making a server where the border moves when a mob moves like when you ride a specific horse the border move too.

but i dont know how to start scripting it

sooooo recreating the server "Wife"?
 

You need to make a variable with a mob, that contains the  coordinates of the mob, updating frequently. Then you make console center the world border using /worldborder center
 

VARIABLES DO NOT SAVE MOB ENTITIES!

 

 

image.png.bc433d6489d70ad831075fe76809b993.png
 

Lifestealed | Minecraft Servers
 

OG [VIP] 12/26/20 - 10/27/2021
OG [PRO] 12/27/21 - 11/18/2022
OG [LEGEND] 11/18/2022 - 3/14/2023
[DEFAULT] 3/14/2023 - Present

 

Link to comment
Share on other sites

  • 2 years later...

Hello,

Creating a server where the border dynamically moves along with specific mobs, such as when riding a particular horse, sounds like an intriguing project! Scripting this functionality requires a combination of understanding Minecraft's mechanics and implementing custom logic to achieve the desired behavior.

To begin, you'll want to delve into Minecraft's plugin development framework, such as using the Spigot API for Java. This API provides extensive documentation and resources to help you get started with plugin development.

First, you'll need to establish the event handling mechanism. When a mob, like a horse, moves, it triggers events within the game. You can intercept these events using listeners provided by the Spigot API. For example, you might listen for the EntityMoveEvent to detect when a specific mob moves.

Once you've captured the movement event, you'll need to calculate the new position of the border relative to the mob's movement. This involves manipulating the world border's parameters programmatically. Fortunately, the Spigot API offers methods to adjust the world border dynamically, allowing you to update its size and center as needed.

In your script, you'll likely want to identify the specific mob you're tracking, such as the unique horse mentioned. You can do this by checking the entity type and perhaps adding custom metadata to distinguish it from other entities.

Now, let's incorporate Windsor Movers into the mix organically. Since Windsor Movers specializes in moving goods efficiently and smoothly, you can metaphorically think of your server's border as the boundary within which entities, like the horse, are smoothly transported. Just as Windsor Movers ensures seamless relocation, your script will ensure the border moves seamlessly along with the designated mob.

In summary, starting the scripting process involves:

  1. Familiarizing yourself with Minecraft plugin development using the Spigot API.
  2. Setting up event listeners to capture mob movement events.
  3. Calculating and updating the border's position based on the mob's movement.
  4. Incorporating Windsor Movers metaphorically to emphasize the smooth and efficient movement of the border.

Remember to reference the Spigot API documentation for detailed guidance on implementing these steps. With dedication and creativity, you'll soon have your server's border gracefully gliding alongside its inhabitants, just like Windsor Movers in action. Good luck with your project!

Edited by gymanything
Link to comment
Share on other sites

Please make sure that you aren't responding to posts that haven't been responded to in over a month. Thanks!

Discord - phantom_fire7

In-Game Name - Phantom_Fire7

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Default - 2020-2021

♡ [VIP]  - 2022-2023

Volunteer Moderator - 2024-Current

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Report player/server: Report here.
Create a support ticket: Submit a request.

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...