Added instructions for gradle/maven include

This commit is contained in:
FlorianMichael 2023-06-01 00:34:37 +02:00
parent f224c7da8c
commit dc6c0bdec1
No known key found for this signature in database
GPG Key ID: C2FB87E71C425126
3 changed files with 38 additions and 1 deletions

View File

@ -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

View File

@ -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
<repositories>
<repository>
<id>viaversion</id>
<url>https://repo.viaversion.com</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>de.florianmichael</groupId>
<artifactId>viafabricplus</artifactId>
<version>2.7.3</version> <!-- Get latest version from releases -->
</dependency>
</dependencies>
```
### To learn more about the API and about addons, you can simply click [here](.github/DEVELOPER_API.md)
## ⚠️ WARNING ⚠️

View File

@ -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