mirror of
https://github.com/ViaVersion/ViaFabricPlus.git
synced 2024-09-30 04:47:28 +02:00
Added instructions for gradle/maven include
This commit is contained in:
parent
f224c7da8c
commit
dc6c0bdec1
6
.github/DEVELOPER_API.md
vendored
6
.github/DEVELOPER_API.md
vendored
@ -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
|
||||
|
31
README.md
31
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
|
||||
<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 ⚠️
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user