From dc6c0bdec11f133b9bf0958f8896336fcc8c270b Mon Sep 17 00:00:00 2001 From: FlorianMichael <60033407+FlorianMichael@users.noreply.github.com> Date: Thu, 1 Jun 2023 00:34:37 +0200 Subject: [PATCH] Added instructions for gradle/maven include --- .github/DEVELOPER_API.md | 6 ++++++ README.md | 31 +++++++++++++++++++++++++++++++ gradle.properties | 2 +- 3 files changed, 38 insertions(+), 1 deletion(-) diff --git a/.github/DEVELOPER_API.md b/.github/DEVELOPER_API.md index 6133cccb..5692d58f 100644 --- a/.github/DEVELOPER_API.md +++ b/.github/DEVELOPER_API.md @@ -22,6 +22,12 @@ public class ViaFabricPlusExampleAddon implements ClientModInitializer { | PreLoadCallback | Called before everything (Pre-pre load) | ### General API +#### Add CustomPayload channels for versions below 1.13 +In order to receive custom payloads with custom channels in versions below 1.13, you need to register them, that's what you do: +```java +Protocol1_13To1_12_2.MAPPINGS.getChannelMappings().put("FML|HS", "fml:hs"); +``` + #### Get the release version of a material: ```java final VersionRange range = ItemReleaseVersionDefinition.INSTANCE.getItemMap().get(Items.WRITABLE_BOOK); // If an item does not appear in the item map, it has always existed diff --git a/README.md b/README.md index d635617a..d5b14f52 100644 --- a/README.md +++ b/README.md @@ -93,6 +93,37 @@ ViaFabricPlus uses Gradle, to make sure that it is installed properly you can ch 4. Open the folder as a Gradle project in your preferred IDE. 5. Run the mod. +### Include via Gradle/Maven +```groovy +repositories { + maven { + name = "ViaVersion" + url = "https://repo.viaversion.com" + } +} + +dependencies { + implementation "de.florianmichael:viafabricplus:2.7.3" // Get latest version from releases +} +``` + +```xml + + + viaversion + https://repo.viaversion.com + + + + + + de.florianmichael + viafabricplus + 2.7.3 + + +``` + ### To learn more about the API and about addons, you can simply click [here](.github/DEVELOPER_API.md) ## ⚠️ WARNING ⚠️ diff --git a/gradle.properties b/gradle.properties index e6e8df41..f50c22e6 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,7 +9,7 @@ loader_version=0.14.19 fabric_api_version=0.76.0+1.19.4 # viafabricplus -mod_version=2.7.3 +mod_version=2.7.3-SNAPSHOT maven_group=de.florianmichael archives_base_name=viafabricplus