Hyxin

Hyxin

Brings the Mixin trait/mixin framework for Java to Hytale!

11.2 тысяч загрузок
Обновлён 23 дня назад

Описание

Hyxin обеспечивает среду Mixin для игры Hytale. Он позволяет разработчикам изменять, расширять и вводить поведение в кодовую базу Hytale без прямого изменения игровых файлов.

Особенности

Mixin - это фреймворк trait/mixin для Java, который позволяет разработчикам плагинов изменять игровой код без прямого исправления или изменения ваших игровых файлов. Это очень мощный инструмент для разработчиков, позволяющий им добавлять крючки, изменять игровую логику и давать им возможность делать то, что они иначе не смогли бы сделать.

Гиксин обеспечивает оба Обсуждение FabricMC Mixin Fork и MixinExtras от LlamaLad7. Разработчики должны иметь возможность использовать большинство функций, добавленных в обоих проектах, но еще не все готово к производству.

Предупреждение раннего доступа

Игра Hytale находится в раннем доступе. Вещи нестабильны и склонны к частым изменениям. Вещи могут не работать или работать неожиданными или неоптимальными способами. Пожалуйста, будьте с нами, пока мы работаем над решением проблем.

Известные проблемы и пещеры

  • Конфигурации Mixin могут загружаться только из ранних плагинов.
  • Мы сканируем только папку ранних плагинов в рабочем каталоге для конфигураций Hyxin. Дополнительные пути могут быть добавлены с помощью аргументов запуска, но мы пока не можем их сканировать.
  • При разработке самого Hyxin файлы загружаются из AppClassLoader вместо ожидаемых ранних плагинов URLClassLoader.
  • Аксессуары, инвокаторы, впрыск интерфейса и аналогичные функции не готовы к производству.
  • инвалид Опция ByDefault, наряду с отключенными плагинами, не поддерживается.

Установка Hyxin

Банку Hyxin и все плагины, которые используют Hyxin, необходимо зайти в папку ранних плагинов. Вам нужно будет создать папку, они еще не создают ее для вас. На сервере вы сделаете папку рядом с плагинами и папками журналов. В одиночной игре ваш плагин должен войти в ваш мир, в папку ранних плагинов.

Разработка с Hyxin

Проект Hyxin пока недоступен в центре Maven. Вы можете добавить его в свои зависимости Gradle вручную или использовать. Кузнечик.

Добавьте конфигурацию Hyxin в стандартный манифест плагина. Файл Джонсона. Массив Configs определяет список конфигурационных файлов Mixin, которые Hyxin попытается загрузить из вашей банки плагинов.

{
"Группа": "...",
"Имя": "...",
"Версия": "...",
"Описание": "...",
"Гиксин": {
"Конфигурация":
"your_plugin.mixins.json"
]
?
?

Внутри файла your_plugin.mixins.json вы должны установить имя корневого пакета, из которого загружаются классы Mixin, а затем заполнить массив миксинов с его именем каждого класса, который вы хотите загрузить.

{
"обязательно": истинно,
"МинВерсия": "0,8",
"пакет": "com.example.mixins",
"миксины":
«Пример Миксина»
]
?

Затем определите свой класс смешивания в ожидаемом месте, в этом случае это src/main/com/example/mixins/ExampleMixin.java. В этом примере мы вводим наш метод onMain непосредственно перед вызовом EarlyPluginLoaders#hasTransformers в конструкторе HytaleServer.

@Mixin (HytaleServer.class)
Общественный класс ExampleMixin {

@Inject(метод = "<init>", при = @At(значение = "INVOKE", целевой = "Lcom/hypixel/hytale/plugin/early/EarlyPluginLoader;hasTransformers()Z")
Private static void onMain (CallbackInfo ci)
HytaleLogger.get("Hyxin-Example").at(Level.INFO).log("Hello from Hyxin!") Сервер был исправлен!
?
?

Кредиты и признания

Проект Hyxin разрабатывается и поддерживается Даркхакс и Джаредльтон. Проект Hyxin построен на миксин. Особая благодарность Мамфри В частности, кто вложил бесчисленные часы времени в поддержание проекта.

Мы очень благодарны за все предыдущие работы, которые сделали этот проект возможным. Все товарные знаки, авторские права и право собственности остаются у их первоначальных авторов. Включение этих библиотек не означает одобрения этого проекта их создателями или аффилированными организациями.

 

 

Показать оригинальное описание (English)

Hyxin provides a Mixin environment for the game Hytale. It enables developers to modify, extend, and inject behavior into Hytale's codebase without directly modifying game files.

Features

Mixin is a trait/mixin framework for Java that allows plugin developers to modify the game code without directly patching or modifying your game files. This is a very powerful tool for developers, allowing them to add hooks, modify game logic, and empowers them to do things they would not be otherwise able to do.

Hyxin provides both FabricMC's Mixin Fork and LlamaLad7's MixinExtras. Developers should be able to use the majority of the features added by both projects, however not everything is production ready yet.

Early Access Warning

The game Hytale is in early access. Things are unstable, and prone to frequent changes. Things may not work, or may work in unexpected or suboptimal ways. Please bear with us as we work to address the issues.

Known Issues & Caveats

  • Mixin configs can only be loaded from earlyplugins.
  • We only scan the earlyplugins folder in the working directory for Hyxin configs. Additional paths can be added using run arguments, but we can not scan them yet.
  • When developing Hyxin itself, files are loaded from the AppClassLoader instead of the expected early plugins URLClassLoader.
  • Accessors, invokers, interface injection, and similar features are not production ready.
  • The DisabledByDefault option, along with the disabled plugins feature is not supported.

Installing Hyxin

The Hyxin jar and all plugins that use Hyxin must go in your earlyplugins folder. You will need to create the folder, they do not create it for you yet. On a server, you will make the folder right next to the plugins and logs folders. In singleplayer your plugin must go inside of your world, in the worlds earlyplugins folder.

Developing with Hyxin

The Hyxin project is not aailable on Maven central yet. You can add it to your Gradle dependencies manually, or use Cursemaven.

Add a Hyxin config to the standard plugin manifest.json file. The Configs array defines a list of Mixin configuration files that Hyxin will try to load from your plugin jar.

{
  "Group": "...",
  "Name": "...",
  "Version": "...",
  "Description": "...",
  "Hyxin": {
    "Configs": [
      "your_plugin.mixins.json"
    ]
  }
}

Inside the your_plugin.mixins.json file you should set the root package name that Mixin classes are loaded from, and then fill the mixins array witht he name of each class you want to load.

{
  "required": true,
  "minVersion": "0.8",
  "package": "com.example.mixins",
  "mixins": [
    "ExampleMixin"
  ]
}

Then define your mixin class at the expected location, in this case it is src/main/com/example/mixins/ExampleMixin.java. In this example, we are injecting our onMain method immediately before EarlyPluginLoaders#hasTransformers is invoked in the constructor of HytaleServer.

@Mixin(HytaleServer.class)
public class ExampleMixin {

    @Inject(method = "<init>", at = @At(value = "INVOKE", target = "Lcom/hypixel/hytale/plugin/early/EarlyPluginLoader;hasTransformers()Z"))
    private static void onMain(CallbackInfo ci) {
        HytaleLogger.get("Hyxin-Example").at(Level.INFO).log("Hello from Hyxin! The server has been patched!");
    }
}

Credits & Acknowledgements

The Hyxin project is developed and maintained by Darkhax and Jaredlll08. The Hyxin project is built upon Mixin. Special thanks to Mumfrey in particular, who has poured countless hours of time into maintaining the project.

We are very appreciative of all the prior works that have made this project possible. All trademarks, copyrights, and ownership remain with their original authors. The inclusion of these libraries does not imply endorsement of this project by their creators or affiliated organizations.

 

 

Последние версии

Hyxin-0.0.11-all.jar

Early Access 31.12.2025 4.9 МБ
Скачать