Skip to content
This repository was archived by the owner on May 5, 2025. It is now read-only.

The Globe Expander

a1qs edited this page Dec 25, 2024 · 5 revisions

This Block handles various parts of the VaultAdditions mod, most importantly the expansion of the World Borders. The texture of the Globe Expander resembles the earth, with the texture being gracefully stolen yoinked from Supplementaries.

Functionality

Upon right clicking with any item that is NOT a Power Crystal, a client display message will display the current border size.
If the used Item is a Power Crystal, there are a few steps considered in the code

  1. If the ServerConfig [Link to ServerConfig] option to limit the Expansion is enabled AND its past the configured date (regarding the latter) or theres an active event that requires the Globe Expander, e.g Border Expansion or Crystal Submission, Nothing will happen, besides a client message being displayed to the player telling them exactly that.
  2. Whether the Globe Expander is currently in its animation phase, this is to prevent players from adding stacks of crystals quickly in a row, potentially offsetting the border expansion number.
  3. Whether the player is holding a Power Crystal in their main hand, if not, the result is ignored.

If none of these apply, the Overworld, the Nether and the End increase their borders, the initial value for the Power Crystal is defined in the ServerConfig [Link to ServerConfig], where it will now consider the amount of Power Crystals in your hand and calculate the border expansions for all three dimensions.
For the Nether and the End you may define an additional multiplier in the ServerConfig [Link to ServerConfig] to the base Power Crystal expansion, e.g for the Nether a 8x multiplier to account for the 8:1 block ratio between the Nether and the Overworld.

If you receive an error, it likely means that one of the dimensions has a World Border that exceeds the max possible size, this will be logged in the Server Console.

If no error appears, the animation will start as normal for the Block and the World Border will expand, notifying the Chat after the animation ends.
The player will receive Power points based on the amount of Power Crystals submitted and will grow in size (Exclusively visual, hitboxes do not change), which can be configured and capped in the ServerConfigs [Link to ServerConfigs].

If a current Event [Link to Events page] is occuring and the Globe Expander consumes Crystals to enable the Event, the Border will not expand, instead counting towards the event exclusively. If a Crystal Submission reaches the required crystals the Event Start message will be sent in chat.

Technical

  • The Globe Expander makes use of both a ClientTicker as well as an Server Ticker (May be changed in a future update to only be a Client Ticker)
  • The Globe Expander is a Block Entity which also makes use of an BlockEntityRenderer to display the rotating Crystal.

Clone this wiki locally