ViaAprilFools/README.md

98 lines
3.6 KiB
Markdown
Raw Normal View History

2023-01-14 14:24:21 +01:00
# ViaAprilFools
2023-04-12 17:36:46 +02:00
ViaVersion addon to add support for some notable Minecraft snapshots.
2023-01-14 14:24:21 +01:00
ViaAprilFools is not usable by itself as a standalone software, as it is an addon for ViaVersion which adds more protocol translators.
ViaAprilFools is intended to be implemented in a ViaVersion based protocol translator.
If you are looking to implement ViaAprilFools in your own software you can start by reading the [Usage](#usage) section.
If you just want to use ViaAprilFools yourself you can check out some projects which implement it in the [Projects](#projects-implementing-viaaprilfools) section.
### Added Server protocols
- 3D Shareware
- 20w14infinite
- Combat Test 8c
### Added Client protocols
- 3D Shareware
### Projects implementing ViaAprilFools
2023-06-18 18:41:00 +02:00
- [ViaProxy](https://github.com/ViaVersion/ViaProxy): Standalone proxy which uses ViaVersion to translate between Minecraft versions. Allows Minecraft 1.7+ clients to join to any version server.
- [ViaFabricPlus](https://github.com/ViaVersion/ViaFabricPlus): Fabric mod for the latest Minecraft version with QoL fixes and enhancements to the gameplay.
2023-01-14 14:24:21 +01:00
## Releases
### Gradle/Maven
2023-05-28 19:05:54 +02:00
To use ViaAprilFools with Gradle/Maven you can use the ViaVersion maven server:
2023-05-28 18:56:07 +02:00
```groovy
repositories {
maven { url "https://repo.viaversion.com" }
}
dependencies {
2023-09-21 17:56:05 +02:00
implementation("net.raphimc:ViaAprilFools:2.0.9") // Get latest version from releases
2023-05-28 18:56:07 +02:00
}
```
```xml
<repositories>
<repository>
<id>viaversion</id>
<url>https://repo.viaversion.com</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>net.raphimc</groupId>
<artifactId>ViaAprilFools</artifactId>
2023-09-21 17:56:05 +02:00
<version>2.0.9</version> <!-- Get latest version from releases -->
2023-05-28 18:56:07 +02:00
</dependency>
</dependencies>
```
2023-01-14 14:24:21 +01:00
### Jar File
2023-05-28 18:56:07 +02:00
If you just want the latest jar file you can download it from this [Jenkins](https://ci.viaversion.com/view/All/job/ViaAprilFools/).
2023-01-14 14:24:21 +01:00
## Usage
ViaAprilFools requires you to have an already functional ViaVersion implementation for your platform.
If you don't have one you can check out [ViaLoader](https://github.com/ViaVersion/ViaLoader) for an abstracted and simplified, but still customizable implementation.
2023-06-18 18:41:00 +02:00
You can also go to the other [ViaVersion](https://github.com/ViaVersion) repositories and look at their server and proxy implementations.
2023-01-14 14:24:21 +01:00
### Base Implementation
#### ViaAprilFools platform implementation
To get started you should create a class which implements the ViaAprilFools platform interface.
Here is an example:
```java
public class ViaAprilFoolsPlatformImpl implements ViaAprilFoolsPlatform {
public ViaAprilFoolsPlatformImpl() {
this.init(this.getDataFolder());
}
@Override
public Logger getLogger() {
return Via.getPlatform().getLogger();
}
@Override
public File getDataFolder() {
return Via.getPlatform().getDataFolder();
}
}
```
This is a very basic implementation which just uses the ViaVersion logger and data folder.
#### Loading the platform
After you have created your platform implementation you should load it in your ViaVersion implementation.
Here is an example:
```java
Via.getManager().addEnableListener(ViaAprilFoolsPlatformImpl::new);
```
Make sure to add the enable listener before the Via manager is initialized (``((ViaManagerImpl) Via.getManager()).init();``).
## Contact
If you encounter any issues, please report them on the
2023-06-18 18:41:00 +02:00
[issue tracker](https://github.com/ViaVersion/ViaAprilFools/issues).
2023-05-30 21:49:34 +02:00
If you just want to talk or need help implementing ViaAprilFools feel free to join the ViaVersion
[Discord](https://discord.gg/viaversion).