Skip to content

Commit

Permalink
Add 1.21.4 support
Browse files Browse the repository at this point in the history
  • Loading branch information
stefvanschie committed Dec 8, 2024
1 parent d359897 commit e45dae0
Show file tree
Hide file tree
Showing 19 changed files with 2,028 additions and 3 deletions.
4 changes: 4 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@ updates:
directory: "/nms/1_21_2-3"
schedule:
interval: "daily"
- package-ecosystem: "maven"
directory: "/nms/1_21_4"
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 @@ -125,6 +125,7 @@ jobs:
java -jar BuildTools.jar --remapped --disable-java-check --dont-update
java -jar BuildTools.jar --rev 1.21.1 --remapped --disable-java-check
java -jar BuildTools.jar --rev 1.21.3 --remapped --disable-java-check
java -jar BuildTools.jar --rev 1.21.4 --remapped --disable-java-check
cd ../
- name: Setup GPG keys
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ jobs:
java -jar BuildTools.jar --remapped --disable-java-check --dont-update
java -jar BuildTools.jar --rev 1.21.1 --remapped --disable-java-check
java -jar BuildTools.jar --rev 1.21.3 --remapped --disable-java-check
java -jar BuildTools.jar --rev 1.21.4 --remapped --disable-java-check
cd ../
- name: Build with Maven
Expand Down
6 changes: 6 additions & 0 deletions IF/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,12 @@
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.github.stefvanschie.inventoryframework</groupId>
<artifactId>1_21_4</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.github.stefvanschie.inventoryframework</groupId>
<artifactId>iv-abstraction</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,15 +182,22 @@ public enum Version {
*
* @since 0.10.18
*/
V1_21_2_3;
V1_21_2_3,

/**
* Version 1.21.4
*
* @since 0.10.19
*/
V1_21_4;

/**
* 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_6,
V1_21_0, V1_21_1, V1_21_2_3
V1_21_0, V1_21_1, V1_21_2_3, V1_21_4
);

/**
Expand All @@ -211,7 +218,7 @@ public enum Version {
*/
@NotNull
private static final Collection<@NotNull Version> INTERFACE_INVENTORY_VIEW = EnumSet.of(
V1_21_0, V1_21_1, V1_21_2_3
V1_21_0, V1_21_1, V1_21_2_3, V1_21_4
);

/**
Expand Down Expand Up @@ -317,6 +324,8 @@ public static Version getVersion() {
case "1.21.2":
case "1.21.3":
return V1_21_2_3;
case "1.21.4":
return V1_21_4;
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 @@ -323,6 +323,8 @@ public static StonecutterInventory newStonecutterInventory(@NotNull Version vers
com.github.stefvanschie.inventoryframework.nms.v1_21_1.AnvilInventoryImpl.class);
ANVIL_INVENTORIES.put(Version.V1_21_2_3,
com.github.stefvanschie.inventoryframework.nms.v1_21_2_3.AnvilInventoryImpl.class);
ANVIL_INVENTORIES.put(Version.V1_21_4,
com.github.stefvanschie.inventoryframework.nms.v1_21_4.AnvilInventoryImpl.class);

BEACON_INVENTORIES = new EnumMap<>(Version.class);
BEACON_INVENTORIES.put(Version.V1_14,
Expand Down Expand Up @@ -373,6 +375,8 @@ public static StonecutterInventory newStonecutterInventory(@NotNull Version vers
com.github.stefvanschie.inventoryframework.nms.v1_21_1.BeaconInventoryImpl.class);
BEACON_INVENTORIES.put(Version.V1_21_2_3,
com.github.stefvanschie.inventoryframework.nms.v1_21_2_3.BeaconInventoryImpl.class);
BEACON_INVENTORIES.put(Version.V1_21_4,
com.github.stefvanschie.inventoryframework.nms.v1_21_4.BeaconInventoryImpl.class);

CARTOGRAPHY_TABLE_INVENTORIES = new EnumMap<>(Version.class);
CARTOGRAPHY_TABLE_INVENTORIES.put(Version.V1_14,
Expand Down Expand Up @@ -423,6 +427,8 @@ public static StonecutterInventory newStonecutterInventory(@NotNull Version vers
com.github.stefvanschie.inventoryframework.nms.v1_21_1.CartographyTableInventoryImpl.class);
CARTOGRAPHY_TABLE_INVENTORIES.put(Version.V1_21_2_3,
com.github.stefvanschie.inventoryframework.nms.v1_21_2_3.CartographyTableInventoryImpl.class);
CARTOGRAPHY_TABLE_INVENTORIES.put(Version.V1_21_4,
com.github.stefvanschie.inventoryframework.nms.v1_21_4.CartographyTableInventoryImpl.class);

ENCHANTING_TABLE_INVENTORIES = new EnumMap<>(Version.class);
ENCHANTING_TABLE_INVENTORIES.put(Version.V1_14,
Expand Down Expand Up @@ -473,6 +479,8 @@ public static StonecutterInventory newStonecutterInventory(@NotNull Version vers
com.github.stefvanschie.inventoryframework.nms.v1_21_1.EnchantingTableInventoryImpl.class);
ENCHANTING_TABLE_INVENTORIES.put(Version.V1_21_2_3,
com.github.stefvanschie.inventoryframework.nms.v1_21_2_3.EnchantingTableInventoryImpl.class);
ENCHANTING_TABLE_INVENTORIES.put(Version.V1_21_4,
com.github.stefvanschie.inventoryframework.nms.v1_21_4.EnchantingTableInventoryImpl.class);

GRINDSTONE_INVENTORIES = new EnumMap<>(Version.class);
GRINDSTONE_INVENTORIES.put(Version.V1_14,
Expand Down Expand Up @@ -523,6 +531,8 @@ public static StonecutterInventory newStonecutterInventory(@NotNull Version vers
com.github.stefvanschie.inventoryframework.nms.v1_21_1.GrindstoneInventoryImpl.class);
GRINDSTONE_INVENTORIES.put(Version.V1_21_2_3,
com.github.stefvanschie.inventoryframework.nms.v1_21_2_3.GrindstoneInventoryImpl.class);
GRINDSTONE_INVENTORIES.put(Version.V1_21_4,
com.github.stefvanschie.inventoryframework.nms.v1_21_4.GrindstoneInventoryImpl.class);

MERCHANT_INVENTORIES = new EnumMap<>(Version.class);
MERCHANT_INVENTORIES.put(Version.V1_14,
Expand Down Expand Up @@ -573,6 +583,8 @@ public static StonecutterInventory newStonecutterInventory(@NotNull Version vers
com.github.stefvanschie.inventoryframework.nms.v1_21_1.MerchantInventoryImpl.class);
MERCHANT_INVENTORIES.put(Version.V1_21_2_3,
com.github.stefvanschie.inventoryframework.nms.v1_21_2_3.MerchantInventoryImpl.class);
MERCHANT_INVENTORIES.put(Version.V1_21_4,
com.github.stefvanschie.inventoryframework.nms.v1_21_4.MerchantInventoryImpl.class);

SMITHING_TABLE_INVENTORIES = new EnumMap<>(Version.class);
SMITHING_TABLE_INVENTORIES.put(Version.V1_19_4,
Expand All @@ -595,6 +607,8 @@ public static StonecutterInventory newStonecutterInventory(@NotNull Version vers
com.github.stefvanschie.inventoryframework.nms.v1_21_1.SmithingTableInventoryImpl.class);
SMITHING_TABLE_INVENTORIES.put(Version.V1_21_2_3,
com.github.stefvanschie.inventoryframework.nms.v1_21_2_3.SmithingTableInventoryImpl.class);
SMITHING_TABLE_INVENTORIES.put(Version.V1_21_4,
com.github.stefvanschie.inventoryframework.nms.v1_21_4.SmithingTableInventoryImpl.class);

LEGACY_SMITHING_TABLE_INVENTORIES = new EnumMap<>(Version.class);
LEGACY_SMITHING_TABLE_INVENTORIES.put(Version.V1_16_1,
Expand Down Expand Up @@ -673,5 +687,7 @@ public static StonecutterInventory newStonecutterInventory(@NotNull Version vers
com.github.stefvanschie.inventoryframework.nms.v1_21_1.StonecutterInventoryImpl.class);
STONECUTTER_INVENTORIES.put(Version.V1_21_2_3,
com.github.stefvanschie.inventoryframework.nms.v1_21_2_3.StonecutterInventoryImpl.class);
STONECUTTER_INVENTORIES.put(Version.V1_21_4,
com.github.stefvanschie.inventoryframework.nms.v1_21_4.StonecutterInventoryImpl.class);
}
}
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ cd ..
java -jar BuildTools.jar --remapped --disable-java-check --dont-update
java -jar BuildTools.jar --rev 1.21.1 --remapped --disable-java-check
java -jar BuildTools.jar --rev 1.21.3 --remapped --disable-java-check
java -jar BuildTools.jar --rev 1.21.4 --remapped --disable-java-check
```

Your environment is now set up correctly. To create a build, run the following inside the root folder of the project.
Expand Down
72 changes: 72 additions & 0 deletions nms/1_21_4/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
<?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.19-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

<artifactId>1_21_4</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.21.4-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.21.4-R0.1-SNAPSHOT:txt:maps-mojang</srgIn>
<reverse>true</reverse>
<remappedDependencies>org.spigotmc:spigot:1.21.4-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.21.4-R0.1-SNAPSHOT:csrg:maps-spigot</srgIn>
<remappedDependencies>org.spigotmc:spigot:1.21.4-R0.1-SNAPSHOT:jar:remapped-obf</remappedDependencies>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Loading

0 comments on commit e45dae0

Please sign in to comment.