Skip to content

Commit

Permalink
Add 1.20.6 support
Browse files Browse the repository at this point in the history
  • Loading branch information
stefvanschie committed May 13, 2024
1 parent a166029 commit 92c2e92
Show file tree
Hide file tree
Showing 18 changed files with 2,025 additions and 4 deletions.
4 changes: 4 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ updates:
directory: "/nms/1_20_5"
schedule:
interval: "daily"
- package-ecosystem: "maven"
directory: "/nms/1_20_6"
schedule:
interval: "daily"
- package-ecosystem: "maven"
directory: "/nms/abstraction"
schedule:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/auto-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:
mvn paper-nms:init -pl nms/1_20_1
mvn paper-nms:init -pl nms/1_20_2
mvn paper-nms:init -pl nms/1_20_3-4
- name: Run BuildTools 1.20.5
- name: 'Run BuildTools 1.20.5 & 1.20.6'
if: steps.cache-paperclip-jars.outputs.cache-hit != 'true'
run: |
mkdir -p build
Expand Down Expand Up @@ -103,6 +103,7 @@ jobs:
cd ..
java -jar BuildTools.jar --remapped --disable-java-check --dont-update
java -jar BuildTools.jar --rev 1.20.6 --remapped --disable-java-check
cd ../
- name: Setup GPG keys
run: cat <(echo -e "${{ secrets.GPG_KEY }}") | gpg --batch --import
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ jobs:
mvn paper-nms:init -pl nms/1_20_1
mvn paper-nms:init -pl nms/1_20_2
mvn paper-nms:init -pl nms/1_20_3-4
- name: Run BuildTools 1.20.5
- name: 'Run BuildTools 1.20.5 & 1.20.6'
if: steps.cache-paperclip-jars.outputs.cache-hit != 'true'
run: |
mkdir -p build
Expand Down Expand Up @@ -109,6 +109,7 @@ jobs:
cd ..
java -jar BuildTools.jar --remapped --disable-java-check --dont-update
java -jar BuildTools.jar --rev 1.20.6 --remapped --disable-java-check
cd ../
- 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 @@ -161,6 +161,12 @@
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.github.stefvanschie.inventoryframework</groupId>
<artifactId>1_20_6</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 @@ -153,14 +153,21 @@ public enum Version {
*
* @since 0.10.14
*/
V1_20_5;
V1_20_5,

/**
* Version 1.20.6
*
* @since 0.10.14
*/
V1_20_6;

/**
* 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, V1_20_1, V1_20_2, V1_20_3_4, V1_20_5
V1_20_0, V1_20_1, V1_20_2, V1_20_3_4, V1_20_5, V1_20_6
);

/**
Expand Down Expand Up @@ -259,6 +266,8 @@ public static Version getVersion() {
return V1_20_3_4;
case "1.20.5":
return V1_20_5;
case "1.20.6":
return V1_20_6;
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 @@ -315,6 +315,8 @@ public static StonecutterInventory newStonecutterInventory(@NotNull Version vers
com.github.stefvanschie.inventoryframework.nms.v1_20_3.AnvilInventoryImpl.class);
ANVIL_INVENTORIES.put(Version.V1_20_5,
com.github.stefvanschie.inventoryframework.nms.v1_20_5.AnvilInventoryImpl.class);
ANVIL_INVENTORIES.put(Version.V1_20_6,
com.github.stefvanschie.inventoryframework.nms.v1_20_6.AnvilInventoryImpl.class);

BEACON_INVENTORIES = new EnumMap<>(Version.class);
BEACON_INVENTORIES.put(Version.V1_14,
Expand Down Expand Up @@ -357,6 +359,8 @@ public static StonecutterInventory newStonecutterInventory(@NotNull Version vers
com.github.stefvanschie.inventoryframework.nms.v1_20_3.BeaconInventoryImpl.class);
BEACON_INVENTORIES.put(Version.V1_20_5,
com.github.stefvanschie.inventoryframework.nms.v1_20_5.BeaconInventoryImpl.class);
BEACON_INVENTORIES.put(Version.V1_20_6,
com.github.stefvanschie.inventoryframework.nms.v1_20_6.BeaconInventoryImpl.class);

CARTOGRAPHY_TABLE_INVENTORIES = new EnumMap<>(Version.class);
CARTOGRAPHY_TABLE_INVENTORIES.put(Version.V1_14,
Expand Down Expand Up @@ -399,6 +403,8 @@ public static StonecutterInventory newStonecutterInventory(@NotNull Version vers
com.github.stefvanschie.inventoryframework.nms.v1_20_3.CartographyTableInventoryImpl.class);
CARTOGRAPHY_TABLE_INVENTORIES.put(Version.V1_20_5,
com.github.stefvanschie.inventoryframework.nms.v1_20_5.CartographyTableInventoryImpl.class);
CARTOGRAPHY_TABLE_INVENTORIES.put(Version.V1_20_6,
com.github.stefvanschie.inventoryframework.nms.v1_20_6.CartographyTableInventoryImpl.class);

ENCHANTING_TABLE_INVENTORIES = new EnumMap<>(Version.class);
ENCHANTING_TABLE_INVENTORIES.put(Version.V1_14,
Expand Down Expand Up @@ -441,6 +447,8 @@ public static StonecutterInventory newStonecutterInventory(@NotNull Version vers
com.github.stefvanschie.inventoryframework.nms.v1_20_3.EnchantingTableInventoryImpl.class);
ENCHANTING_TABLE_INVENTORIES.put(Version.V1_20_5,
com.github.stefvanschie.inventoryframework.nms.v1_20_5.EnchantingTableInventoryImpl.class);
ENCHANTING_TABLE_INVENTORIES.put(Version.V1_20_6,
com.github.stefvanschie.inventoryframework.nms.v1_20_6.EnchantingTableInventoryImpl.class);

GRINDSTONE_INVENTORIES = new EnumMap<>(Version.class);
GRINDSTONE_INVENTORIES.put(Version.V1_14,
Expand Down Expand Up @@ -483,6 +491,8 @@ public static StonecutterInventory newStonecutterInventory(@NotNull Version vers
com.github.stefvanschie.inventoryframework.nms.v1_20_3.GrindstoneInventoryImpl.class);
GRINDSTONE_INVENTORIES.put(Version.V1_20_5,
com.github.stefvanschie.inventoryframework.nms.v1_20_5.GrindstoneInventoryImpl.class);
GRINDSTONE_INVENTORIES.put(Version.V1_20_6,
com.github.stefvanschie.inventoryframework.nms.v1_20_6.GrindstoneInventoryImpl.class);

MERCHANT_INVENTORIES = new EnumMap<>(Version.class);
MERCHANT_INVENTORIES.put(Version.V1_14,
Expand Down Expand Up @@ -525,6 +535,8 @@ public static StonecutterInventory newStonecutterInventory(@NotNull Version vers
com.github.stefvanschie.inventoryframework.nms.v1_20_3.MerchantInventoryImpl.class);
MERCHANT_INVENTORIES.put(Version.V1_20_5,
com.github.stefvanschie.inventoryframework.nms.v1_20_5.MerchantInventoryImpl.class);
MERCHANT_INVENTORIES.put(Version.V1_20_6,
com.github.stefvanschie.inventoryframework.nms.v1_20_6.MerchantInventoryImpl.class);

SMITHING_TABLE_INVENTORIES = new EnumMap<>(Version.class);
SMITHING_TABLE_INVENTORIES.put(Version.V1_19_4,
Expand All @@ -539,6 +551,8 @@ public static StonecutterInventory newStonecutterInventory(@NotNull Version vers
com.github.stefvanschie.inventoryframework.nms.v1_20_3.SmithingTableInventoryImpl.class);
SMITHING_TABLE_INVENTORIES.put(Version.V1_20_5,
com.github.stefvanschie.inventoryframework.nms.v1_20_5.SmithingTableInventoryImpl.class);
SMITHING_TABLE_INVENTORIES.put(Version.V1_20_6,
com.github.stefvanschie.inventoryframework.nms.v1_20_6.SmithingTableInventoryImpl.class);

LEGACY_SMITHING_TABLE_INVENTORIES = new EnumMap<>(Version.class);
LEGACY_SMITHING_TABLE_INVENTORIES.put(Version.V1_16_1,
Expand Down Expand Up @@ -609,5 +623,7 @@ public static StonecutterInventory newStonecutterInventory(@NotNull Version vers
com.github.stefvanschie.inventoryframework.nms.v1_20_3.StonecutterInventoryImpl.class);
STONECUTTER_INVENTORIES.put(Version.V1_20_5,
com.github.stefvanschie.inventoryframework.nms.v1_20_5.StonecutterInventoryImpl.class);
STONECUTTER_INVENTORIES.put(Version.V1_20_6,
com.github.stefvanschie.inventoryframework.nms.v1_20_6.StonecutterInventoryImpl.class);
}
}
73 changes: 73 additions & 0 deletions nms/1_20_6/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
<?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.14-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

<artifactId>1_20_6</artifactId>

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

<dependencies>
<dependency>
<groupId>com.github.stefvanschie.inventoryframework</groupId>
<artifactId>abstraction</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>1.20.6-R0.1-SNAPSHOT</version>
<classifier>remapped-mojang</classifier>
<scope>provided</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>net.md-5</groupId>
<artifactId>specialsource-maven-plugin</artifactId>
<version>2.0.3</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>remap</goal>
</goals>
<id>remap-obf</id>
<configuration>
<srgIn>org.spigotmc:minecraft-server:1.20.6-R0.1-SNAPSHOT:txt:maps-mojang</srgIn>
<reverse>true</reverse>
<remappedDependencies>org.spigotmc:spigot:1.20.6-R0.1-SNAPSHOT:jar:remapped-mojang</remappedDependencies>
<remappedArtifactAttached>true</remappedArtifactAttached>
<remappedClassifierName>remapped-obf</remappedClassifierName>
</configuration>
</execution>
<execution>
<phase>package</phase>
<goals>
<goal>remap</goal>
</goals>
<id>remap-spigot</id>
<configuration>
<inputFile>${project.build.directory}/${project.artifactId}-${project.version}-remapped-obf.jar</inputFile>
<srgIn>org.spigotmc:minecraft-server:1.20.6-R0.1-SNAPSHOT:csrg:maps-spigot</srgIn>
<remappedDependencies>org.spigotmc:spigot:1.20.6-R0.1-SNAPSHOT:jar:remapped-obf</remappedDependencies>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

</project>
Loading

0 comments on commit 92c2e92

Please sign in to comment.