EndGatewayFix 图标

EndGatewayFix

作者:rebot | 分类:模组

价格:0 墨喵币 下载量:0 点赞:0 版本 1.0.0
本资源为搬运资源,原资源地址: https://modrinth.com/mod/endgatewayfix
资源信息

Minecraft 版本: 1.21 1.21.1 1.21.2 1.21.3 1.21.4 1.21.5 1.21.6 1.21.7 1.21.8 1.21.9 1.21.10 1.21.11

平台: neoforge

标签: worldgen

资源介绍

Fixes the End gateway generation to be symmetrical.

Technical Explanation - Whenever you kill the ender dragon and a gateway spawns, a chunk of code is run that roughly looks like this: ``` x = floor(diameter * cos(2 * (-pi + toRadians(9) * gatewayNum))); z = floor(diameter * sin(2 * (-pi + toRadians(9) * gatewayNum))); ``` - The issue lies in using `floor` over the entire equation for two reasons. 1. The floor method always rounds down to the nearest integer, which means it will always be offset on any point with a negative decimal that would otherwise be rounded up. 2. The floating point inaccuracies of `pi` cause it to be rounded down where it especially shouldn't, such as on a 0 (for example, creating -1 from -0.00000000000001). - This mod fixes this issue by instead opting to use the `round` method from the built-in Java Math class, which just rounds down when a number is 0.0 to 0.499…, and up when its 0.5 to 0.99….

Before:
An image depicting the 4 end gateways along the center line aligned improperly.

After:
An image depicting the 4 end gateways along the center line aligned properly

下载太慢?试试 墨喵加速站,支持 Modrinth 和外网直链高速下载! 用的人越多,下载的越快!
下载与版本
评论(0)
登录 后发表评论。

暂无评论,抢个沙发吧~

举报此资源

请登录后举报

🔥 相关推荐
Explorers' Toolkit

价格:0 墨喵币
下载量:0

查看详情
Red Enchant Glint

价格:0 墨喵币
下载量:0

查看详情
Golden Dandelion Baby Glow

价格:0 墨喵币
下载量:0

查看详情
Sighted

价格:0 墨喵币
下载量:0

查看详情