Skip to content

UserGuide.WorldgenReposition.en

inf32768 edited this page Oct 22, 2026 · 2 revisions

English | 简体中文

Detailed Explanation of Worldgen Reposition

Worldgen reposition is one of the core features of this mod. It consists of two independent operations: shift (offset) and scale. The mechanism of this function is relatively complex and will be explained in detail below.

What Can This Function Do?

  • Enlarge or shrink the generation scale of the entire world (e.g., turning mountains into small hills);
  • Move all terrain as a whole (e.g., shifting an entire forest to the right);
  • This is an important tool for exploring distance effects (e.g., moving the far lands into the world boundaries).

Configuration

Worldgen reposition is configured under "World Generation Settings" → "Reposition" in the new configuration screen, as "Shift (X, Y, Z)" and "Scale (X, Y, Z)". In the configuration file they are worldGen.reposition.shift and worldGen.reposition.scale. The "shift" and "scaling factor" mentioned below refer to the values of these two options.

The "High Precision Mode" and "Extra Y-axis Effect" mentioned below are separate options: worldGen.reposition.highPrecisionMode and worldGen.reposition.extendedYAxisEffect.

For details on how to configure, please refer to Configuration Reference.

Principle

First, we need to introduce a concept— "World Generation Coordinates" (referred to as "generation coordinates", "worldgen coordinates" or "terrain coordinates"), which is distinct from the common "world coordinates". World coordinates (or more specifically, block coordinates) refer to the position of blocks in the world, while world generation coordinates refer to the coordinates used for generating biomes, terrain, structures, features and initial entities during world generation. Normally, these two are consistent. The worldgen reposition function changes the correspondence between world coordinates and world generation coordinates by repositioning the world generation coordinates, thereby generating a more expansive world while preserving the original world boundaries.

So, how do the two configuration items mentioned above affect the generated world? Let's break down the coordinate system into the X, Y, and Z axes. On each axis, we have:

Worldgen Coordinates = World Coordinates × Scaling Factor + Shift

From this, we can derive:

Setting Positive Value Effect Negative Value Effect
Shift Shift in the negative direction of the axis Shift in the positive direction of the axis
Scale Compress along the axis Stretch along the axis

The order is: first apply the shift to the original world generation coordinates, then apply scaling centered on the world coordinate origin.

💡 Example Explanation (see the image below):

The center of all three screens is at world coordinates (0, y, 0), with the top of the screen being the positive X-axis direction (east).

  • Middle screen: Original unmodified world.
  • Left screen: X-axis shift is 10 (all terrain shifted 10 blocks west).
  • Right screen: X-axis scale is 2 (terrain is more compact).

Additional Information

Supported World Generation Content

  • Most generative density functions, including:

    • old_blended_noise
    • noise
    • shifted_noise
    • shift_A
    • shift_B
    • shift
    • weird_scaled_sampler
    • y_clamped_gradient (requires Extra Y-axis Effect enabled)
    • end_island (requires High Precision Mode enabled)
  • Sea level and underground lava layers in each dimension (requires Extra Y-axis Effect enabled, currently buggy).

Precision Loss and High Precision Mode

Normally, the input values in the configuration items are first converted to double-precision floating-point numbers before being used in calculations. When the input values are large, precision loss can occur, most typically manifested as inaccurate shifts (e.g., you know the exact coordinates of a terrain feature, but after inputting the coordinates, you find that no matter how you fine-tune them, you cannot move it to the correct position). Additionally, some generators use integer coordinate calculations, which are incompatible with floating-point shifts and scaling, making reposition impossible.

Therefore, to solve this problem, the mod provides High Precision Mode. When enabled, the mod converts coordinates and shift/scale input values into BigDecimal type and performs calculations using BigDecimal, thereby avoiding the aforementioned precision loss and shift inaccuracy issues. At the same time, those generators that use integer calculations will automatically switch to the high-precision calculation path, making them compatible with worldgen reposition.

However, please note that enabling this function will significantly increase CPU load and memory consumption, so it is recommended to enable it only when necessary (e.g., when the absolute shift value exceeds 2^53).

Extra Y-axis Effect

Extra Y-axis Effect is another feature of the mod that allows the scaling and shift functions to affect the density function y_clamped_gradient, as well as the Y-coordinates of sea level and underground lava layers in each dimension. Simply put, when this function is enabled, the overall altitude of terrain and the height range of cave generation will be affected by shift and scaling.

The reason for having independent switches for these functions is that y_clamped_gradient limits the height range of almost all terrain. If this density function is shifted, without modifying noise settings, the sky far lands and the void far lands will no longer generate, which could be inconvenient for many scenarios.

Why Have Worldgen Reposition?

The introduction of worldgen reposition is mainly to meet the needs of exploring distance effects. In vanilla Minecraft, the integer limit restricts the explorable distance to a relatively small range, while most distance effects related to world generation exist outside this range. Although there are ways to break these limits by modifying the code, it usually involves significant effort (requiring modifications to almost all coordinate-related code), compatibility issues (typically distributed as independent modified versions and unable to coexist with mod loaders), and poor performance (larger data types require more memory and computational resources, especially when used extensively). In contrast, worldgen reposition technology dynamically modifies coordinates at key generation steps. While sacrificing some freedom, it achieves similar results without any of the aforementioned problems.

Wiki 导航 | Navigation

🏠 首页 | Home

🧭 用户指南 | User Guide

📈 项目治理 | Project Management

📚 参考资料 | References

Clone this wiki locally