6548 Commits

Author SHA1 Message Date
SashegDev 1a2f3bbde7 feat(delta): void dimension at 2:1 coordinate scale, plus World#convertLocation
Build Delta / Build paperclip jar (push) Successful in 7m57s
Мир пустоты как кастомное измерение датапаком и пересчёт координат между
мирами с разным масштабом.

Механизм масштаба — тот же, что у Незера: поле coordinate_scale в типе
измерения, а пересчёт при переходе равен делению масштаба источника на
масштаб назначения. Для пустоты нужно ровно 2.0, то есть один блок пустоты
на два блока оверворлда. Проверено на сервере: coord scale overworld=1.0
void=2.0.

Биом сделан своим (delta_void:void), а не переопределением ванильного
minecraft:the_void. Переопределение трогало бы данные Mojang и конфликтовало
с любыми другими датапаками. Отличия от ванильного — только цвета:
sky_color и fog_color в ноль, плюс выключенный туман и вода.

Что потребовалось по дороге, все три ошибки поймал сервер, а не я:

1. У типа измерения в 1.21.8 обязательное поле logical_height. Без него
   сервер отказывается стартовать: "No key logical_height".

2. Файл измерения не принимает дискриминатор "type": "minecraft:dimension".
   Кодек LevelStem читает поле type как ССЫЛКУ на тип измерения, и мой
   дискриминатор уходил в неё как имя типа. Правильно — "type" со значением
   delta_void:void.

3. getAllLevels() живёт на MinecraftServer, а не на DedicatedServer, который
   отдаёт CraftServer#getHandle(). И dimensionType() в Paper уже разворачивает
   Holder, так что .value() там не нужен и ломает компиляцию.

Отдельно: World#getCoordinateScale() в Paper УЖЕ есть, причём реализован
ровно так, как я собрался писать. Для чтения масштаба ядро менять не нужно.
А вот пересчёта координат в API нет ни в Paper, ни в Bukkit: Player#teleport
его не делает, потому что телепорт не портал. Добавлен default-метод
World#convertLocation с той же формулой, что и ванильная, и без изменения Y.

Хорошая новость про отказ сервера: на битый датапак он не стартует, а
падает в safeMode. Тихая загрузка сломанной генерации была бы хуже.

Диагностика частиц всё ещё в CraftWorld, снимается после проверки прицела.
2026-10-15 21:55:19 +00:00
SashegDev e6a95a0f85 feat(delta): let plugins send particles beyond the vanilla 32-block cut
Build Delta / Build paperclip jar (push) Successful in 8m22s
Частицы не долетали дальше 32 блоков, при том что механика способностей бьёт
на 120. Игрок дальше 32 блоков не видел прицела вообще, но удар приходил.

Причина оказалась на стороне сервера, а не клиента. В ServerLevel есть
    if (blockPos.closerToCenterThan(pos, longDistance ? 512.0 : 32.0))
где longDistance это параметр alwaysShow. По умолчанию он false, то есть 32
блока. Но Bukkit-API этот флаг не открывает: в CraftWorld.spawnParticle он
захардкожен в false, а параметр force уходит в overrideLimiter. То есть ни
один плагин на Paper не мог отправить частицу дальше 32 блоков.

Само поле alwaysShow сериализуется в ClientboundLevelParticlesPacket, поэтому
клиент со своей стороны отсечку тоже снимает — тем же механизмом, что и
ванильная команда /particle в режиме display.

Что сделано:

1. World#spawnParticleLongDistance(...) — default-метод, а не абстрактный.
   Причина: абстрактный метод в интерфейсе World ломает бинарную совместимость
   с любой сторонней реализацией. Фолбэк здесь ведёт себя как обычный
   spawnParticle, то есть деградация — «слишком короткая дальность», а не
   «частиц нет».

2. CraftWorld переопределяет его. Дистанция применяется фильтрацией списка
   получателей ДО вызова ServerLevel, а не патчем самого ServerLevel:
   sendParticlesSource принимает готовый receivers, поэтому достаточно отсечь
   его самим. Ванильная проверка остаётся нетронутой. Это принципиально —
   меньше правок в ванильных патчах, меньше риска конфликтов.

3. Конфиг extended-particle-distance перестал быть мёртвым. Раньше он был
   объявлен в DeltaConfig и выводился в /delta, но нигде не читался при отправке
   частиц, поэтому переключатель не делал ничего. Теперь он работает как
   потолок: плагин запрашивает сколько нужно, сервер режет до 128.
   extendedParticleDistanceEnabled=false возвращает стоковые 32.

Замер: /delta теперь показывает "extended distance 128.0 blocks" вместо "off".
2026-10-05 17:30:57 +00:00
SashegDev dac80386b5 fix(delta): make the audio and config patches actually compile, add DeltaDisplay
Build Delta / Build paperclip jar (push) Successful in 7m49s
0373806e2 and 0817a5706 were pushed but never built, so the server jar was
broken on main. Six compile errors, all in code that had never run:

- ClientboundSoundPacket takes Holder<SoundEvent> in 1.21, not SoundEvent.
- CraftWorld has no getServer(); the vanilla handle does.
- Server has no paperConfigurations()/registryAccess() - Configurations is
  reachable through the console, and saveGlobalSection lives on Configurations
  (GlobalConfiguration is a ConfigurationPart, i.e. the data, not the writer).
- ServerPlayer.server is private.

DeltaSound pumped delayed packets through BukkitScheduler, which requires a
live Plugin, and Delta as a core has none. It now uses GlobalRegionScheduler
with a null plugin, which exists precisely for core tasks. Delays are counted
in game ticks via Bukkit#getCurrentTick rather than System.nanoTime, so they
no longer stretch under lag. The pump cancels itself once the queue drains.

New DeltaDisplay holds the predictive-teleport policy (lead range, default,
application) and /delta displaylead tunes it. Honest about its scope:
Display#setTeleportDuration is already stock Bukkit, so Delta adds no new API
to plugins and breaks no compatibility - it centralises the policy and reports
it. The position shift itself is done by the plugin, per visual, along that
visual's own trajectory.

DeltaBuild now registers the existing features in the startup banner instead of
printing "no custom features registered". The banner is emitted from a static
initialiser before paper-global.yml is parsed, so the strings describe the
mechanism and point at /delta status for live values rather than printing
defaults as if they were the running configuration.
2026-09-30 12:41:35 +00:00
SashegDev 0817a57065 feat(delta): playSoundAttenuated - wave propagation + normalized decay, one packet per player
Build Delta / Build paperclip jar (push) Failing after 5m24s
2026-09-30 10:39:11 +00:00
SashegDev 0373806e25 feat(delta): config persistence via Configurations.saveGlobalSection + decoupled sound range API
Build Delta / Build paperclip jar (push) Failing after 5m52s
2026-09-30 10:00:20 +00:00
SashegDev f55129436b fix(delta): /delta has no persistence (Paper exposes no public config writer); runtime-only + clear
Build Delta / Build paperclip jar (push) Successful in 8m24s
2026-09-30 09:42:40 +00:00
SashegDev ec31787ea0 fix(delta): public class name must match file name (Delta -> DeltaConfig)
Build Delta / Build paperclip jar (push) Failing after 5m21s
2026-09-30 09:31:57 +00:00
SashegDev a039ea62a9 feat(delta): hook Display tracking budget through TrackingRange (no MC patch needed)
Build Delta / Build paperclip jar (push) Failing after 5m14s
2026-09-30 09:26:22 +00:00
SashegDev 342eaadf39 feat(delta): /delta command, Display tracking budget, global delta config; rewrite README for Delta
Build Delta / Build paperclip jar (push) Failing after 4m52s
2026-09-30 09:16:06 +00:00
SashegDev a56c29c3fd Delta banner + DeltaBuild 2026-09-30 09:16:06 +00:00
SashegDev cf3afa851a branding: keep Brand-Id papermc:paper for plugin compat, Brand-Name Delta 2026-09-30 09:16:06 +00:00
SashegDev 90399370d4 branding: Paper -> Delta (group, version, jar/manifest, fill project id) 2026-09-30 09:16:05 +00:00
Jason Penilla 29c8822d90 Remove no longer needed MC-210802 fix (#13059)
Build Paper / build (push) Failing after 1s
Build Paper / Event File (push) Failing after 1s
2025-09-06 14:38:29 -07:00
Lulu13022002 19156cdd3b Give the right amount of experience after mending (#13047) 2025-09-06 13:49:56 -07:00
Spottedleaf 9aaaadffaa Backport DFU changes from snapshots
When converting to components:
 - Remove enchantments with levels <= 0
 - Remove the item name if it is not valid JSON
 - Remove lore entries that are not valid JSON
2025-09-03 14:59:39 -07:00
Spottedleaf 78aecfebaf Do not remove plugin chunk tickets on shutdown
The chunk system may not be responsive in a shutdown (i.e
watchdog timeout). Therefore, we should avoid interacting
with the chunk system to increase the odds of a graceful
shutdown.
2025-09-03 14:25:27 -07:00
Jason Penilla 65641d1006 Only log name instead of full profile for configuration phase disconnects (#13038) 2025-08-29 13:32:10 -07:00
Jason Penilla 63cd4af408 Fix createProfile not always returning a new profile (#13036) 2025-08-29 09:42:35 -07:00
Jason Penilla 704107c3dd Resend frozen ticks when cancelling EntityInsideBlockEvent for powder snow fixes #13033 (#13035) 2025-08-28 18:11:29 -07:00
Jason Penilla 9d1d0ef3f3 Add and call RegionizedServerInitEvent from Folia (#13034) 2025-08-28 18:09:09 -07:00
Jason Penilla b6168b7ccc Get console Brig suggestions from main thread fixes #13027 (#13028) 2025-08-28 17:25:42 -07:00
Shane Freeder 51706e5ac1 Fixed DyeItem sheep dye hunk 2025-08-25 02:49:26 +01:00
Aeltumn 614e9acfca Improve APIs around riptide tridents (#12996)
Co-authored-by: Bjarne Koll <git@lynxplay.dev>
Co-authored-by: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com>
2025-08-23 21:12:30 +00:00
Strokkur24 42b653b197 Expose more argument types (#12665)
Co-authored-by: Bjarne Koll <git@lynxplay.dev>
Co-authored-by: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com>
2025-08-23 21:10:41 +01:00
Strokkur24 5622c9dd73 Expose attribute sentiment (#12974)
Co-authored-by: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com>
2025-08-23 17:15:16 +00:00
Pedro a9e7674933 Support for showNotification in PlayerRecipeDiscoverEvent (#12992) 2025-08-23 17:53:46 +01:00
MC_XiaoHei ea014f7a77 feat: add stuckEntityPoiRetryDelay config (#12949)
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2025-08-23 09:39:19 -07:00
Warrior 79cf1353b9 Ignore HopperInventorySearchEvent when it has no listeners (#13009) 2025-08-23 16:25:40 +00:00
Lulu13022002 1922be9074 Update custom tags (#12183) 2025-08-23 16:53:07 +01:00
Moulberry 38fe16b5f2 Fix missing reason in disconnectAsync (#13001) 2025-08-21 22:13:31 +01:00
Moulberry f866a5fd54 Use LinkedHashMap in ChannelInitializeListenerHolder (#13000) 2025-08-19 17:53:03 +02:00
Esophose 616a8795ea Add LootTable to BlockDispenseLootEvent (#12917) 2025-08-17 15:53:00 +01:00
Strokkur24 47f983f430 Add allow-remote-ender-dragon-respawning setting (#12602) 2025-08-17 13:49:30 +02:00
David a22447a555 Added getWorldPath to World API (#12952) 2025-08-15 21:39:09 +01:00
Emil 651fa124c5 Fix cancelled EnderDragonShootFireballEvent playing sound (#12977) 2025-08-15 21:55:31 +02:00
swim5678 f0c1f856f2 Fix Phantom entity Spawn reason (#12980) 2025-08-14 17:46:02 +01:00
Jason Penilla 86b716bc5b Fix BlockFadeEvent not being called when fire extinguishes in rain (#12972) 2025-08-13 08:29:06 -07:00
Alejandro Nieto 4fe66e5800 Fix lead_break sound playing after cancelling EntityUnleashEvent (#12944) 2025-08-12 11:01:39 +02:00
Alejandro Nieto 3d1425f086 Fix phantoms failing to target players near non-insomniacs (#12953) 2025-08-11 22:13:29 +02:00
Pedro abf6b6c228 Allow replace effects in Consumable Component Builder (#12938) 2025-08-08 18:17:34 +02:00
Žiga Slatnar Štagar a664311f0f Fix AbstractArrow not setting noPhysics flag (#12935) 2025-08-07 12:55:48 -04:00
Lumine1909 9694886daa Fix endermite spawn position
The player teleport has been moved up in ThrownEnderpearl to prevent
endermite spawning in case of a cancelled teleport. This however placed
the player at the teleport destination prior to the endermite spawn
logic, creating the entity at the wrong location.

The commit stores the location of the player pre teleportation and uses
said location for spawning the endermite instead.

Co-authored-by: Helvetica Volubi <suisuroru@blue-millennium.fun>
Reviewed-in: https://github.com/PaperMC/Paper/pull/12912
2025-08-07 12:36:47 +02:00
Pedro 6d0833ece5 Use target level for waypoint modify command (#12933) 2025-08-07 12:36:23 +02:00
Emily 846c64f4d1 Allow for sending plugin messages during configuration stage (#12915) 2025-08-04 15:06:52 +02:00
Bjarne Koll e9380882f2 Lazy evaluate ender chest inventory holder 2025-08-04 14:45:52 +02:00
Warrior c60f4436f0 Restore players being the inventory holder of an enderchest (#12923) 2025-08-04 13:53:50 +02:00
Gero bf465e0029 Cancel hit for all vanished entities, not only players (#12906) 2025-08-03 17:17:41 +02:00
Red ed31825a8d HIDE_ADDITIONAL_TOOLTIP backwards compat. not hiding disc names (#12900) 2025-07-30 22:26:35 -04:00
Jason Penilla 0c8efe4d02 [ci skip] Remove redundant adventure version specification
This is handled by a version constraint from the BOM dependency in -api
2025-07-30 10:48:12 -07:00
Kezz ec9c83fa2b Adventure 4.24.0 (#12908) 2025-07-30 10:43:51 -07:00