跳到正文

Magic Numbers

作者:VortexDigital

Turns values Minecraft hardcodes into server-side config: mob despawn distance, item despawn timer, experience drops and hunger rate — every knob off by default.

收藏

介绍

中文介绍正在准备中,下面暂时显示原文。

Magic Numbers

Minecraft hardcodes a lot of numbers. Items vanish after exactly five minutes. Mobs disappear at exactly 128 blocks. Experience and hunger run at exactly the rate the game shipped with. None of that is exposed in server.properties or in a gamerule — it lives in the code.

Magic Numbers turns those constants into server-side config.

Every knob is off by default

Installing this mod changes nothing until you opt in. Each section has its own enabled flag, and a section that is switched off is ignored entirely, whatever its values say. Drop it into a pack, ship it, and it stays inert until somebody flips a switch on purpose.

What you can change

Setting Vanilla What it does
mobDespawn.instantDespawnDistance 128 Beyond this many blocks from the nearest player, mobs despawn immediately
mobDespawn.randomDespawnDistance 32 Inside this radius mobs never despawn; between the two they despawn randomly
itemDespawn.despawnTicks 6000 How long a dropped item survives on the ground (20 ticks = 1 second)
experience.dropMultiplier 1.0 Scales every experience award
hunger.exhaustionMultiplier 1.0 Scales hunger gain; below 1.0 means players get hungry slower

Config

Generated at config/magicnumbers.json on first start.

{
  "mobDespawn": { "enabled": false, "instantDespawnDistance": 128, "randomDespawnDistance": 32 },
  "itemDespawn": { "enabled": true, "despawnTicks": 24000 },
  "experience": { "enabled": false, "dropMultiplier": 1.0 },
  "hunger": { "enabled": true, "exhaustionMultiplier": 0.5 }
}

The example above keeps dropped items around for 20 minutes instead of 5, and makes players get hungry half as fast. Everything else stays vanilla.

A malformed config file never takes the server down: the error is logged and the mod falls back to doing nothing.

Server-side, and nothing else

  • No client install. Players join with a plain Fabric client, or no mod at all.
  • No Fabric API dependency. The mod ships four mixins and a config reader, nothing more.
  • No new items, blocks, recipes or worldgen. Nothing to conflict with.
  • 12 KB.

One thing worth knowing about mob despawn

Vanilla is not uniform here: fish (water_ambient) despawn at 64 blocks while every other category uses 128. instantDespawnDistance applies one value to all categories, so raising it stretches fish further than the vanilla ratio intends. On a world with large oceans, that means more entities loaded. Worth keeping in mind if you turn this knob up.

Requirements

  • Minecraft 26.2
  • Fabric Loader 0.19.3 or newer
  • Java 25

License

MIT. Bundle it in your modpack, no permission needed.


Support

This mod is free and always will be. I build and maintain it in my spare time.

If it helps you, consider buying me a coffee. Every contribution – no matter how small – buys more time for updates, new features and keeping things working after each patch.

Support me

Links

Found a bug or got feedback? Use the comments section here on CurseForge.

常见问题

Magic Numbers 支持哪些 Minecraft 版本?

Magic Numbers 支持 Minecraft Java 版 26.1–26.2,共 4 个版本,可用的加载器:Fabric。下载时注意选择和你游戏版本一致的文件。

Magic Numbers 怎么安装?

先用 PCL2 或 HMCL 启动器安装对应版本的 Fabric,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。

评论

登录后评论和评分

VortexDigital 的其他作品

查看全部 →