Skip to content

Commit

Permalink
Add 1.20.3 support
Browse files Browse the repository at this point in the history
  • Loading branch information
stefvanschie committed Dec 21, 2023
1 parent 208194c commit 076a981
Show file tree
Hide file tree
Showing 18 changed files with 1,997 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ updates:
directory: "/nms/1_20_2"
schedule:
interval: "daily"
- package-ecosystem: "maven"
directory: "/nms/1_20_3"
schedule:
interval: "daily"
- package-ecosystem: "maven"
directory: "/nms/abstraction"
schedule:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/auto-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ jobs:
mvn paper-nms:init -pl nms/1_19_4
mvn paper-nms:init -pl nms/1_20_0-1
mvn paper-nms:init -pl nms/1_20_2
mvn paper-nms:init -pl nms/1_20_3
- name: Setup GPG keys
run: cat <(echo -e "${{ secrets.GPG_KEY }}") | gpg --batch --import
- name: Automatically deploy the project
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,5 +79,6 @@ jobs:
mvn paper-nms:init -pl nms/1_19_4
mvn paper-nms:init -pl nms/1_20_0-1
mvn paper-nms:init -pl nms/1_20_2
mvn paper-nms:init -pl nms/1_20_3
- name: Build with Maven
run: mvn -B package --file pom.xml
6 changes: 6 additions & 0 deletions IF/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,12 @@
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.github.stefvanschie.inventoryframework</groupId>
<artifactId>1_20_3</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,22 @@ public enum Version {
*
* @since 0.10.12
*/
V1_20_2;
V1_20_2,

/**
* Version 1.20.3
*
* @since 0.10.13
*/
V1_20_3;

/**
* A collection of versions on which modern smithing tables are available.
*/
private static final Collection<Version> MODERN_SMITHING_TABLE_VERSIONS = EnumSet.of(V1_19_4, V1_20_0_1, V1_20_2);
private static final Collection<Version> MODERN_SMITHING_TABLE_VERSIONS = EnumSet.of(
V1_19_4,
V1_20_0_1, V1_20_2, V1_20_3
);

/**
* A collection of versions on which legacy smithing tables ae available.
Expand Down Expand Up @@ -229,6 +239,8 @@ public static Version getVersion() {
return V1_20_0_1;
case "1.20.2":
return V1_20_2;
case "1.20.3":
return V1_20_3;
default:
throw new UnsupportedVersionException("The server version provided is not supported");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,8 @@ public static StonecutterInventory newStonecutterInventory(@NotNull Version vers
com.github.stefvanschie.inventoryframework.nms.v1_20_0_1.AnvilInventoryImpl.class);
ANVIL_INVENTORIES.put(Version.V1_20_2,
com.github.stefvanschie.inventoryframework.nms.v1_20_2.AnvilInventoryImpl.class);
ANVIL_INVENTORIES.put(Version.V1_20_3,
com.github.stefvanschie.inventoryframework.nms.v1_20_3.AnvilInventoryImpl.class);

BEACON_INVENTORIES = new EnumMap<>(Version.class);
BEACON_INVENTORIES.put(Version.V1_14,
Expand Down Expand Up @@ -345,6 +347,8 @@ public static StonecutterInventory newStonecutterInventory(@NotNull Version vers
com.github.stefvanschie.inventoryframework.nms.v1_20_0_1.BeaconInventoryImpl.class);
BEACON_INVENTORIES.put(Version.V1_20_2,
com.github.stefvanschie.inventoryframework.nms.v1_20_2.BeaconInventoryImpl.class);
BEACON_INVENTORIES.put(Version.V1_20_3,
com.github.stefvanschie.inventoryframework.nms.v1_20_3.BeaconInventoryImpl.class);

CARTOGRAPHY_TABLE_INVENTORIES = new EnumMap<>(Version.class);
CARTOGRAPHY_TABLE_INVENTORIES.put(Version.V1_14,
Expand Down Expand Up @@ -381,6 +385,8 @@ public static StonecutterInventory newStonecutterInventory(@NotNull Version vers
com.github.stefvanschie.inventoryframework.nms.v1_20_0_1.CartographyTableInventoryImpl.class);
CARTOGRAPHY_TABLE_INVENTORIES.put(Version.V1_20_2,
com.github.stefvanschie.inventoryframework.nms.v1_20_2.CartographyTableInventoryImpl.class);
CARTOGRAPHY_TABLE_INVENTORIES.put(Version.V1_20_3,
com.github.stefvanschie.inventoryframework.nms.v1_20_3.CartographyTableInventoryImpl.class);

ENCHANTING_TABLE_INVENTORIES = new EnumMap<>(Version.class);
ENCHANTING_TABLE_INVENTORIES.put(Version.V1_14,
Expand Down Expand Up @@ -417,6 +423,8 @@ public static StonecutterInventory newStonecutterInventory(@NotNull Version vers
com.github.stefvanschie.inventoryframework.nms.v1_20_0_1.EnchantingTableInventoryImpl.class);
ENCHANTING_TABLE_INVENTORIES.put(Version.V1_20_2,
com.github.stefvanschie.inventoryframework.nms.v1_20_2.EnchantingTableInventoryImpl.class);
ENCHANTING_TABLE_INVENTORIES.put(Version.V1_20_3,
com.github.stefvanschie.inventoryframework.nms.v1_20_3.EnchantingTableInventoryImpl.class);

GRINDSTONE_INVENTORIES = new EnumMap<>(Version.class);
GRINDSTONE_INVENTORIES.put(Version.V1_14,
Expand Down Expand Up @@ -453,6 +461,8 @@ public static StonecutterInventory newStonecutterInventory(@NotNull Version vers
com.github.stefvanschie.inventoryframework.nms.v1_20_0_1.GrindstoneInventoryImpl.class);
GRINDSTONE_INVENTORIES.put(Version.V1_20_2,
com.github.stefvanschie.inventoryframework.nms.v1_20_2.GrindstoneInventoryImpl.class);
GRINDSTONE_INVENTORIES.put(Version.V1_20_3,
com.github.stefvanschie.inventoryframework.nms.v1_20_3.GrindstoneInventoryImpl.class);

MERCHANT_INVENTORIES = new EnumMap<>(Version.class);
MERCHANT_INVENTORIES.put(Version.V1_14,
Expand Down Expand Up @@ -489,6 +499,8 @@ public static StonecutterInventory newStonecutterInventory(@NotNull Version vers
com.github.stefvanschie.inventoryframework.nms.v1_20_0_1.MerchantInventoryImpl.class);
MERCHANT_INVENTORIES.put(Version.V1_20_2,
com.github.stefvanschie.inventoryframework.nms.v1_20_2.MerchantInventoryImpl.class);
MERCHANT_INVENTORIES.put(Version.V1_20_3,
com.github.stefvanschie.inventoryframework.nms.v1_20_3.MerchantInventoryImpl.class);

SMITHING_TABLE_INVENTORIES = new EnumMap<>(Version.class);
SMITHING_TABLE_INVENTORIES.put(Version.V1_19_4,
Expand All @@ -497,6 +509,8 @@ public static StonecutterInventory newStonecutterInventory(@NotNull Version vers
com.github.stefvanschie.inventoryframework.nms.v1_20_0_1.SmithingTableInventoryImpl.class);
SMITHING_TABLE_INVENTORIES.put(Version.V1_20_2,
com.github.stefvanschie.inventoryframework.nms.v1_20_2.SmithingTableInventoryImpl.class);
SMITHING_TABLE_INVENTORIES.put(Version.V1_20_3,
com.github.stefvanschie.inventoryframework.nms.v1_20_3.SmithingTableInventoryImpl.class);

LEGACY_SMITHING_TABLE_INVENTORIES = new EnumMap<>(Version.class);
LEGACY_SMITHING_TABLE_INVENTORIES.put(Version.V1_16_1,
Expand Down Expand Up @@ -561,5 +575,7 @@ public static StonecutterInventory newStonecutterInventory(@NotNull Version vers
com.github.stefvanschie.inventoryframework.nms.v1_20_0_1.StonecutterInventoryImpl.class);
STONECUTTER_INVENTORIES.put(Version.V1_20_2,
com.github.stefvanschie.inventoryframework.nms.v1_20_2.StonecutterInventoryImpl.class);
STONECUTTER_INVENTORIES.put(Version.V1_20_3,
com.github.stefvanschie.inventoryframework.nms.v1_20_3.StonecutterInventoryImpl.class);
}
}
67 changes: 67 additions & 0 deletions nms/1_20_3/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
<?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>com.github.stefvanschie.inventoryframework</groupId>
<artifactId>IF-parent</artifactId>
<version>0.10.13-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

<artifactId>1_20_3</artifactId>

<properties>
<maven.deploy.skip>true</maven.deploy.skip>
</properties>

<!-- Kyori text, provided by paper-nms, is at version 4.15.0-SNAPSHOT, so we need the snapshot repository to download it. -->
<repositories>
<repository>
<id>sonatype-oss-snapshots1</id>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url>
</repository>
</repositories>

<dependencies>
<dependency>
<groupId>com.github.stefvanschie.inventoryframework</groupId>
<artifactId>abstraction</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>ca.bkaw</groupId>
<artifactId>paper-nms</artifactId>
<version>1.20.3-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>ca.bkaw</groupId>
<artifactId>paper-nms-maven-plugin</artifactId>
<version>1.4.1</version>
<executions>
<execution>
<phase>process-classes</phase>
<goals>
<goal>remap</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

<pluginRepositories>
<pluginRepository>
<id>bytecode.space</id>
<url>https://repo.bytecode.space/repository/maven-public/</url>
</pluginRepository>
</pluginRepositories>

</project>
Loading

0 comments on commit 076a981

Please sign in to comment.