curtain fixer

Fixes Curtain's broken fake-player resident feature on Forge 1.20.1 — fake players are saved on logout and respawned when you return. 修复 Curtain 假人「驻留」失效问题(Forge 1.20.1):退出存档自动记录,重进自动重建假人。

Curtain Fixer

Curtain Fixer repairs the broken fake player resident feature of Curtain on Minecraft 1.20.1 (Forge).

The Problem

Curtain's built-in fakePlayerResident rule only saves fake players when the server is stopping. By that time all players (including fake players) have already been removed by PlayerList.removeAll(), so the data file (fake_player.gca.json) is always written as an empty {}. As a result, fake players disappear after you leave and re-enter the world — even when the rule is enabled.

How This Mod Fixes It

This mod does not modify Curtain itself. It uses Forge events to record and rebuild fake players at the right moments:

  1. Record on logout — the moment a fake player disconnects (when you leave the world), its name, position, rotation and dimension are saved to curtain_fixer_residents.json in the world folder.
  2. Respawn on start — when the server finishes starting, the mod reads that file and runs Curtain's own command (/player <name> spawn at <x y z> facing <yaw> <pitch>) to bring each fake player back exactly where it left off.

Inventories, health and experience are handled by vanilla playerdata, so fake players return with everything intact.

Features

  • Fake players survive world reloads — positions and rotations are restored automatically
  • Compatible with Curtain's own fakePlayerResident rule (both can be enabled at the same time)
  • Works on client and server (singleplayer and dedicated servers)
  • No configuration needed — just install and play

Installation

  1. Install Curtain as usual.
  2. Drop curtain_fixer-1.0.0.jar into your mods folder.
  3. Play. Summon a fake player, leave the world, come back — it should still be there.

Compatibility

  • Minecraft: 1.20.1
  • Forge: 47.x
  • Curtain: 1.3.x (tested with 1.3.2)
  • Java: 17+

Notes & Limitations

  • Only fake players in the Overworld are restored automatically.
  • Rebuilding uses Curtain's /player ... spawn command, so the fake player's name must be known to the server (usercache.json) — otherwise enable /curtain allowSpawningOfflinePlayers true first.
  • A fake player killed with /player <name> kill will also respawn on your next login. Delete its entry from curtain_fixer_residents.json if you want it gone for good.

Source Code

https://github.com/Lin1848624/curtain-fixer

License

GPL-3.0


Curtain Fixer(假人驻留修复)

Curtain Fixer 修复 Curtain 在 Minecraft 1.20.1(Forge)上失效的假人「驻留」功能。

问题原因

Curtain 自带的 fakePlayerResident 规则只在服务器停止时保存假人数据。但此时所有玩家(包括假人)都已被 PlayerList.removeAll() 移除,因此数据文件(fake_player.gca.json)永远被写成空的 {}。结果就是:即使规则处于开启状态,退出存档再进入后假人依然会消失。

修复方式

本模组不修改 Curtain 本体,而是利用 Forge 事件在正确的时机记录与重建假人:

  1. 断开时记录 —— 假人断开的瞬间(即你退出存档时),把它的名字、坐标、朝向和维度写入存档目录下的 curtain_fixer_residents.json;
  2. 启动时重建 —— 服务器启动完成后,读取该文件,调用 Curtain 自己的命令(/player <名字> spawn at <x y z> facing <偏航> <俯仰>)把每个假人放回退出时的位置。

假人的背包、血量与经验由原版 playerdata 正常保存,因此重建后数据完整。

功能特性

  • 假人跨存档保留 —— 位置与朝向自动恢复
  • 与 Curtain 自带的 fakePlayerResident 规则互不冲突(可同时开启)
  • 客户端 / 服务端通用(单机与服务器均可)
  • 无需任何配置,装上即用

安装方法

  1. 正常安装 Curtain;
  2. 把 curtain_fixer-1.0.0.jar 放入 mods 文件夹;
  3. 进游戏召唤一个假人,退出存档再重进 —— 假人应该还在原地。

兼容性

  • Minecraft:1.20.1
  • Forge:47.x
  • Curtain:1.3.x(已在 1.3.2 测试)
  • Java:17+

注意事项与限制

  • 仅自动恢复主世界中的假人;
  • 重建走 Curtain 的 /player ... spawn 命令,因此假人名字需要能被服务器识别(usercache.json),否则请先执行 /curtain allowSpawningOfflinePlayers true;
  • 用 /player <名字> kill 杀掉的假人,下次进入存档也会自动重建;如不需要,请删除 curtain_fixer_residents.json 中对应条目。

源代码

https://github.com/Lin1848624/curtain-fixer

许可证

GPL-3.0

curtain fixer Team

profile avatar
  • 7
    Projects
  • 790
    Downloads

Lin18710118

More from Lin18710118View all

  • auto attack next project image

    auto attack next

    Hold the attack button and keep hitting: Auto Attack Next swings the moment your attack cooldown is full, so every hit lands at max charge. Client-side NeoForge 1.21.1 port of AutoAttack. 按住攻击键就能持续攻击:冷却一满自动出刀,每下都是满蓄力伤害。AutoAttack 的 NeoForge 1.21.1 纯客户端移植版。

    • 47
    • October 2, 2026
  • SFM Optimizer project image

    SFM Optimizer

    A server-friendly performance add-on for Super Factory Manager (SFM): turns the laggy ROUND ROBIN polling into an instant, mathematically even distribution and adds smart sleep / slot memory.

    • 252
    • October 2, 2026
  • SortEase project image

    SortEase

    SortEase — a stack-size-aware one-key inventory sorter for Forge 1.20.1. Never hardcodes 64/16: merges to your real stack limit, auto-skips upgrade/filter slots (Sophisticated Backpacks, Create: Storage) and shows live slot types.

    • 95
    • October 1, 2026
  • auto aim: a magic tool project image

    auto aim: a magic tool

    A mod that can help you auto-aim

    • 108
    • October 1, 2026
  • auto attack next project image

    auto attack next

    Hold the attack button and keep hitting: Auto Attack Next swings the moment your attack cooldown is full, so every hit lands at max charge. Client-side NeoForge 1.21.1 port of AutoAttack. 按住攻击键就能持续攻击:冷却一满自动出刀,每下都是满蓄力伤害。AutoAttack 的 NeoForge 1.21.1 纯客户端移植版。

    • 47
    • October 2, 2026
  • SFM Optimizer project image

    SFM Optimizer

    A server-friendly performance add-on for Super Factory Manager (SFM): turns the laggy ROUND ROBIN polling into an instant, mathematically even distribution and adds smart sleep / slot memory.

    • 252
    • October 2, 2026
  • SortEase project image

    SortEase

    SortEase — a stack-size-aware one-key inventory sorter for Forge 1.20.1. Never hardcodes 64/16: merges to your real stack limit, auto-skips upgrade/filter slots (Sophisticated Backpacks, Create: Storage) and shows live slot types.

    • 95
    • October 1, 2026
  • auto aim: a magic tool project image

    auto aim: a magic tool

    A mod that can help you auto-aim

    • 108
    • October 1, 2026