Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.2.1] Supporting Spigot 1.21.2 and fix backwards compatibility for 1.18-1.20.6 #105

Merged
merged 9 commits into from
Oct 23, 2024
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,3 +183,8 @@ For help and support, join our community on
the [SpigotMC forum thread](https://www.spigotmc.org/threads/how-pathetic.578998/)
or [Discord Server](https://discord.gg/HMqCbdQjX9).

### Sponsored By:

<img src="https://github.com/user-attachments/assets/262672b9-a673-4732-8392-5771e7aadfd0" alt="JetBrains_beam_logo" width="400"/>

We'd like to thank JetBrains for sponsoring the development of this project with an amazing toolset!
4 changes: 2 additions & 2 deletions pathetic-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
<parent>
<artifactId>pathetic-main</artifactId>
<groupId>org.patheloper</groupId>
<version>3.2</version>
<version>3.2.1</version>
</parent>

<artifactId>pathetic-api</artifactId>
<version>3.2</version>
<version>3.2.1</version>

<dependencies>
<dependency>
Expand Down
6 changes: 3 additions & 3 deletions pathetic-example/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
<parent>
<artifactId>pathetic-main</artifactId>
<groupId>org.patheloper</groupId>
<version>3.2</version>
<version>3.2.1</version>
</parent>

<artifactId>pathetic-example</artifactId>
<version>3.2</version>
<version>3.2.1</version>
<packaging>jar</packaging>

<name>PatheticTest</name>
Expand Down Expand Up @@ -73,7 +73,7 @@
<dependency>
<groupId>org.patheloper</groupId>
<artifactId>pathetic-mapping</artifactId>
<version>3.2</version>
<version>3.2.1</version>
</dependency>
</dependencies>
</project>
6 changes: 3 additions & 3 deletions pathetic-mapping/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
<parent>
<artifactId>pathetic-main</artifactId>
<groupId>org.patheloper</groupId>
<version>3.2</version>
<version>3.2.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>pathetic-mapping</artifactId>
<version>3.2</version>
<version>3.2.1</version>

<build>
<plugins>
Expand All @@ -34,7 +34,7 @@
<dependency>
<groupId>org.patheloper</groupId>
<artifactId>pathetic-model</artifactId>
<version>3.2</version>
<version>3.2.1</version>
<scope>compile</scope>
</dependency>
<dependency>
Expand Down
8 changes: 4 additions & 4 deletions pathetic-model/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
<parent>
<artifactId>pathetic-main</artifactId>
<groupId>org.patheloper</groupId>
<version>3.2</version>
<version>3.2.1</version>
</parent>

<artifactId>pathetic-model</artifactId>
<version>3.2</version>
<version>3.2.1</version>

<build>
<resources>
Expand Down Expand Up @@ -100,13 +100,13 @@
<dependency>
<groupId>org.patheloper</groupId>
<artifactId>pathetic-api</artifactId>
<version>3.2</version>
<version>3.2.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.patheloper</groupId>
<artifactId>pathetic-nms</artifactId>
<version>3.2</version>
<version>3.2.1</version>
<scope>compile</scope>
</dependency>
<dependency>
Expand Down
4 changes: 2 additions & 2 deletions pathetic-nms/paper/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.patheloper</groupId>
<artifactId>pathetic-main</artifactId>
<version>3.2</version>
<version>3.2.1</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand All @@ -30,7 +30,7 @@
<dependency>
<groupId>org.patheloper</groupId>
<artifactId>pathetic-api</artifactId>
<version>3.2</version>
<version>3.2.1</version>
<scope>provided</scope>
</dependency>
</dependencies>
Expand Down
83 changes: 73 additions & 10 deletions pathetic-nms/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
<parent>
<artifactId>pathetic-main</artifactId>
<groupId>org.patheloper</groupId>
<version>3.2</version>
<version>3.2.1</version>
</parent>

<modelVersion>4.0.0</modelVersion>

<artifactId>pathetic-nms</artifactId>
<version>3.2</version>
<version>3.2.1</version>

<dependencies>
<dependency>
Expand All @@ -33,49 +33,112 @@
<dependency>
<groupId>org.patheloper</groupId>
<artifactId>paper</artifactId>
<version>3.2</version>
<version>3.2.1</version>
<scope>compile</scope>
</dependency>

<dependency>
<groupId>org.patheloper</groupId>
<artifactId>v1_18Up</artifactId>
<version>3.2</version>
<artifactId>v1_21_R2</artifactId>
<version>3.2.1</version>
<scope>compile</scope>
</dependency>

<dependency>
<groupId>org.patheloper</groupId>
<artifactId>v1_21_R1</artifactId>
<version>3.2.1</version>
<scope>compile</scope>
</dependency>

<dependency>
<groupId>org.patheloper</groupId>
<artifactId>v1_20_R4</artifactId>
<version>3.2.1</version>
<scope>compile</scope>
</dependency>

<dependency>
<groupId>org.patheloper</groupId>
<artifactId>v1_20_R3</artifactId>
<version>3.2.1</version>
<scope>compile</scope>
</dependency>

<dependency>
<groupId>org.patheloper</groupId>
<artifactId>v1_20_R2</artifactId>
<version>3.2.1</version>
<scope>compile</scope>
</dependency>

<dependency>
<groupId>org.patheloper</groupId>
<artifactId>v1_20_R1</artifactId>
<version>3.2.1</version>
<scope>compile</scope>
</dependency>

<dependency>
<groupId>org.patheloper</groupId>
<artifactId>v1_19_R3</artifactId>
<version>3.2.1</version>
<scope>compile</scope>
</dependency>

<dependency>
<groupId>org.patheloper</groupId>
<artifactId>v1_19_R2</artifactId>
<version>3.2.1</version>
<scope>compile</scope>
</dependency>

<dependency>
<groupId>org.patheloper</groupId>
<artifactId>v1_18_R2</artifactId>
<version>3.2.1</version>
<scope>compile</scope>
</dependency>

<dependency>
<groupId>org.patheloper</groupId>
<artifactId>v1_18</artifactId>
<version>3.2.1</version>
<scope>compile</scope>
</dependency>

<dependency>
<groupId>org.patheloper</groupId>
<artifactId>v1_17</artifactId>
<version>3.2</version>
<version>3.2.1</version>
<scope>compile</scope>
</dependency>

<dependency>
<groupId>org.patheloper</groupId>
<artifactId>v1_16</artifactId>
<version>3.2</version>
<version>3.2.1</version>
<scope>compile</scope>
</dependency>

<dependency>
<groupId>org.patheloper</groupId>
<artifactId>v1_15</artifactId>
<version>3.2</version>
<version>3.2.1</version>
<scope>compile</scope>
</dependency>

<dependency>
<groupId>org.patheloper</groupId>
<artifactId>v1_12</artifactId>
<version>3.2</version>
<version>3.2.1</version>
<scope>compile</scope>
</dependency>

<dependency>
<groupId>org.patheloper</groupId>
<artifactId>v1_8</artifactId>
<version>3.2</version>
<version>3.2.1</version>
<scope>compile</scope>
</dependency>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@
import org.patheloper.provider.v1_12.v1_12ChunkDataProviderImpl;
import org.patheloper.provider.v1_15.v1_15ChunkDataProviderImpl;
import org.patheloper.provider.v1_17.v1_17ChunkDataProviderImpl;
import org.patheloper.provider.v1_18.v1_18ChunkDataProviderImpl;
import org.patheloper.provider.v1_18_R2.v1_18_R2ChunkDataProviderImpl;
import org.patheloper.provider.v1_19_R2.v1_19_R2ChunkDataProviderImpl;
import org.patheloper.provider.v1_19_R3.v1_19_R3ChunkDataProviderImpl;
import org.patheloper.provider.v1_20_R1.v1_20_R1ChunkDataProviderImpl;
import org.patheloper.provider.v1_20_R2.v1_20_R2ChunkDataProviderImpl;
import org.patheloper.provider.v1_20_R3.v1_20_R3ChunkDataProviderImpl;
import org.patheloper.provider.v1_20_R4.v1_20_R4ChunkDataProviderImpl;
import org.patheloper.provider.v1_21_R1.v1_21_R1ChunkDataProviderImpl;
import org.patheloper.provider.v1_21_R2.v1_21_R2ChunkDataProviderImpl;
import org.patheloper.provider.v1_8.v1_8ChunkDataProviderImpl;
import org.patheloper.provider.paper.PaperChunkDataProvider;

Expand All @@ -33,10 +43,41 @@ private ChunkDataProvider determineChunkDataProvider(int major, int minor) {
final ChunkDataProvider chunkDataProvider;
switch (major) {
case 21:
if(minor == 2) {
chunkDataProvider = new v1_21_R2ChunkDataProviderImpl();
break;
}
chunkDataProvider = new v1_21_R1ChunkDataProviderImpl();
break;
case 20:
if (minor == 5 || minor == 6) {
chunkDataProvider = new v1_20_R4ChunkDataProviderImpl();
break;
} else if (minor == 3 || minor == 4) {
chunkDataProvider = new v1_20_R3ChunkDataProviderImpl();
break;
} else if (minor == 2) {
chunkDataProvider = new v1_20_R2ChunkDataProviderImpl();
break;
} else if (minor == 1) {
chunkDataProvider = new v1_20_R1ChunkDataProviderImpl();
break;
}
case 19:
if (minor == 2 || minor == 3) {
chunkDataProvider = new v1_19_R2ChunkDataProviderImpl();
break;
}
if (minor == 4) {
chunkDataProvider = new v1_19_R3ChunkDataProviderImpl();
break;
}
case 18:
chunkDataProvider = new v1_18UpChunkDataProviderImpl();
if (minor == 2) {
chunkDataProvider = new v1_18_R2ChunkDataProviderImpl();
break;
}
chunkDataProvider = new v1_18ChunkDataProviderImpl();
break;
case 17:
chunkDataProvider = new v1_17ChunkDataProviderImpl();
Expand Down
2 changes: 1 addition & 1 deletion pathetic-nms/v1_12/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>pathetic-main</artifactId>
<groupId>org.patheloper</groupId>
<version>3.2</version>
<version>3.2.1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion pathetic-nms/v1_15/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>pathetic-main</artifactId>
<groupId>org.patheloper</groupId>
<version>3.2</version>
<version>3.2.1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion pathetic-nms/v1_16/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>pathetic-main</artifactId>
<groupId>org.patheloper</groupId>
<version>3.2</version>
<version>3.2.1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion pathetic-nms/v1_17/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>pathetic-main</artifactId>
<groupId>org.patheloper</groupId>
<version>3.2</version>
<version>3.2.1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
35 changes: 35 additions & 0 deletions pathetic-nms/v1_18/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.patheloper</groupId>
<artifactId>pathetic-main</artifactId>
<version>3.2.1</version>
<relativePath>../../pom.xml</relativePath>
</parent>

<artifactId>v1_18</artifactId>

<repositories>
<repository>
<id>codemc-repo</id>
<url>https://repo.codemc.org/repository/nms/</url>
</repository>
</repositories>

<dependencies>
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>1.18.1-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.patheloper</groupId>
<artifactId>pathetic-api</artifactId>
</dependency>
</dependencies>

</project>
Loading
Loading