Add Photographer API for .mcpr recording (Foliaphotographer-style)#444
Add Photographer API for .mcpr recording (Foliaphotographer-style)#444xiaofanforfabric wants to merge 2 commits intoPaperMC:ver/1.21.4from
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
|
不是,你往这里放啥呀? |
|
我去,好像提交错地方了,我应该提到我的仓库的1.21.4分支的 |
|
没绷住 |
|
管他呢,爱合并不合并 |
|
24 compiled .class files are being committed to the repository Binary files like .class should never be in version control GPL License violation concern The GPL requires source code transparency Security risk Pre-compiled .class files could contain malicious bytecode not visible in the source Build artifacts shouldn't be in git Files in bin/main/ are build outputs ✅ Required changes: Remove all .class files from the commit |
|
Holy AI... both semi in code and in comments This is out of scope of Folias intentions and goals, and most likely will not get merged, along with the fact that there are changes in the README too..??? And weird new MD files??? And compiled class files??? Out of scope, I don't think this would rly ever be merged, especially given this seems to be doing a lot more than just a Photographer API, like calling it a Folia fork in the unneeded README changes... when being PRed to merge with Folia?? And the insanely long debug file?? |
|
这本来就是一个错误的拉取请求,本意是要合并到我的项目,结果不知为何拉到了paperMC官方的项目,我了解不会合并的,我不在意 |
Summary
This PR adds a Photographer API to Folia so the server can record gameplay as .mcpr replays (ReplayMod-compatible). Plugins can create "photographer" entities that mirror a player, capture network packets, and write them to a .mcpr file when recording stops.
Motivation
Main changes
PhotographerManager,Photographer,BukkitRecorderOption. Server exposesServer#getPhotographerManager().ServerPhotographer(fake player),Recorder,ReplayFile,CraftPhotographerManager. Records packets to a temp dir and packs to .mcpr on stop.realPlayerslist,placeNewPhotographer(),removePhotographer(). Photographers do not consume real player slots.getPhotographerManager(); CraftEntity mapsServerPhotographer→CraftPhotographer; player events skip photographers.ServerPhotographer#tick()uses a local tick counter instead ofMinecraftServer.getTickCount()(which is not available on Folia).Testing
createMojmapPaperclipJar, started server, loaded FoliaISEEYOU. Recording starts on player join and saves .mcpr on quit; replay plays correctly in ReplayMod.Notes