Add a gitea-release step to the Drone pipeline that uploads everything
in build/libs/*.jar to a Gitea Release named after the pushed tag,
authenticating with a gitea_token secret. The step is guarded with
when.event tag, and tag was added to the pipeline trigger so the build
itself runs for tag events. Document the one-time token / secret setup
and the tag workflow in the README.
displayClientMessage(Component, boolean) was removed from LocalPlayer
in 26.2. sendSystemMessage(Component) is inherited from Entity, has
been part of Mojang's public API since 1.19, and LocalPlayer overrides
it to route the message into the local chat hud, which is exactly the
behaviour we want.
Gui.chat is private in 26.2 and Gui.getChat() is gone, so the previous
direct-field access does not compile. Player.displayClientMessage is a
public, stable API for client-side chat output, so push everything
through it. When the player is null (e.g. on the title screen before
join, where the auto-connect "Connected to ..." line lands), fall back
to the logger so the message is not silently dropped.
In 26.2 Mojang dropped the getChat() wrapper on Gui in favour of the
public 'chat' field, and com.mojang.authlib.GameProfile is now a record
so its getter is name() rather than getName(). Reflect both changes in
the IRC chat dispatcher.
Loom 1.17 in unobfuscated mode does not register the modImplementation
configuration: there is no remapping step that would need it. Use plain
implementation for fabric-loader and fabric-api, matching the original
work in 19b6ea5 that I had rolled back.
Starting with 26.1 Mojang ships Minecraft unobfuscated, and Yarn /
Intermediary are no longer published past 1.21.11. Loom does not need
a mappings dependency in that mode: the Mojang-named source compiles
directly. Remove the mappings line, drop the yarn_mappings property,
revert the client entrypoint to Mojang names (Minecraft, Component,
ChatFormatting, gui.getChat(), getUser().getName()), and rewrite the
README note so it stops claiming Mojang mappings via Loom.
Loom rejected officialMojangMappings() with a non-obfuscated
environment error, and Mojang client_mappings are not published for
26.2 yet. Pin Yarn at 26.2+build.3 via the new yarn_mappings property
and rewrite the client entrypoint with Yarn names: MinecraftClient,
Text, Formatting, inGameHud.getChatHud(), getSession().getUsername().
Gradle 9 rejects property interpolation inside plugins {} — the version
must be a literal String. Drop the now-unused loom_version key from
gradle.properties so it does not desync from the build script.
2026-06-21 15:41:43 +06:00
5 changed files with 47 additions and 10 deletions
Для этой версии я использую official Mojang mappings через Loom, потому что стандартный Yarn endpoint для `26.2` на момент правки ещё не отдавал mappings.
Начиная с`26.1` Mojang перестал обфусцировать клиент, а Yarn и Intermediary перестали публиковаться после `1.21.11`. Поэтому в `build.gradle` нет блока `mappings` вообще: исходники Minecraft уже в человекочитаемых именах Mojang, и Loom собирает мод напрямую против них.
Если в CI стоит старый Loom вроде `1.10.5`, сборка `26.2` упадёт с ошибкой `Unsupported class file major version 69`. Для `26.2` нужен новый Loom из актуальной ветки Fabric.
@@ -144,6 +144,27 @@ gradle build
- запуск Docker pipeline;
-`gradle clean build`;
- вывод содержимого `build/libs`.
- вывод содержимого `build/libs`;
- по тегу — публикует jar-ы из `build/libs/*.jar` как Gitea Release.
Для работы Drone runner должен иметь доступ в интернет, чтобы скачать зависимости Gradle/Fabric.
### Автоматический релиз по тегу
Чтобы Drone выложил собранный мод в раздел Releases репозитория, нужны две разовые настройки и одна команда на каждую новую версию.
**Один раз:**
1.В Gitea: `Settings → Applications → Generate New Token`. Дать токену права `write:repository`. Скопировать.
2.В Drone, на странице репозитория: `Settings → Secrets → New Secret`. Имя — `gitea_token`, значение — токен из шага 1. Поставить галку `Allow Pull Requests` снять (релизы только из push/tag).
**На каждую новую версию:**
```bash
git tag v1.0.0
git push origin v1.0.0
```
Drone поднимет тег как событие, соберёт мод и положит `client-irc-chat-<версия>.jar` в `https://git.nevetime.ru/Arkon/fdgdfg/releases/tag/v1.0.0`. Версия в имени jar-а берётся из `mod_version` в `gradle.properties` — обычно её стоит поднимать вместе с тегом, чтобы они совпадали.
Если что-то идёт не так, посмотреть лог конкретного шага `gitea-release` в Drone — плагин печатает HTTP-ответ Gitea, по нему сразу видно, проблема в токене, URL или путях к файлам.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.