Skip to content

Commit

Permalink
Fix NMS break for 1.21.1
Browse files Browse the repository at this point in the history
The beacon, enchanting table, and stonecutter guis broke due to NMS changes. Bump to 0.10.18-SNAPSHOT.
  • Loading branch information
stefvanschie committed Oct 22, 2024
1 parent 0020e29 commit 6c2d521
Show file tree
Hide file tree
Showing 56 changed files with 2,231 additions and 145 deletions.
6 changes: 5 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,11 @@ updates:
schedule:
interval: "daily"
- package-ecosystem: "maven"
directory: "/nms/1_21"
directory: "/nms/1_21_0"
schedule:
interval: "daily"
- package-ecosystem: "maven"
directory: "/nms/1_21_1"
schedule:
interval: "daily"
- package-ecosystem: "maven"
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/auto-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,24 @@ jobs:
java -jar BuildTools.jar --remapped --disable-java-check --dont-update
java -jar BuildTools.jar --rev 1.20.6 --remapped --disable-java-check
cd Bukkit
git checkout 2ec53f498e32b3af989cb24672fc54dfab087154
cd ..
cd CraftBukkit
git checkout 8ee6fd1b8db9896590aa321d0199453de1fc35db
cd ..
cd Spigot
git checkout fb8fb722a327a2f9f097f2ded700ac5de8157408
cd ..
cd BuildData
git checkout ae1e7b1e31cd3a3892bb05a6ccdcecc48c73c455
cd ..
java -jar BuildTools.jar --remapped --disable-java-check --dont-update
java -jar BuildTools.jar --rev 1.21.1 --remapped --disable-java-check
cd ../
- name: Setup GPG keys
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,24 @@ jobs:
java -jar BuildTools.jar --remapped --disable-java-check --dont-update
java -jar BuildTools.jar --rev 1.20.6 --remapped --disable-java-check
cd Bukkit
git checkout 2ec53f498e32b3af989cb24672fc54dfab087154
cd ..
cd CraftBukkit
git checkout 8ee6fd1b8db9896590aa321d0199453de1fc35db
cd ..
cd Spigot
git checkout fb8fb722a327a2f9f097f2ded700ac5de8157408
cd ..
cd BuildData
git checkout ae1e7b1e31cd3a3892bb05a6ccdcecc48c73c455
cd ..
java -jar BuildTools.jar --remapped --disable-java-check --dont-update
java -jar BuildTools.jar --rev 1.21.1 --remapped --disable-java-check
cd ../
- name: Build with Maven
Expand Down
10 changes: 8 additions & 2 deletions IF/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>IF-parent</artifactId>
<groupId>com.github.stefvanschie.inventoryframework</groupId>
<version>0.10.17</version>
<version>0.10.18-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down Expand Up @@ -169,7 +169,13 @@
</dependency>
<dependency>
<groupId>com.github.stefvanschie.inventoryframework</groupId>
<artifactId>1_21</artifactId>
<artifactId>1_21_0</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.github.stefvanschie.inventoryframework</groupId>
<artifactId>1_21_1</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,19 +164,26 @@ public enum Version {
V1_20_6,

/**
* Version 1.21
* Version 1.21.0
*
* @since 0.10.15
* @since 0.10.18
*/
V1_21;
V1_21_0,

/**
* Version 1.21.1
*
* @since 0.10.18
*/
V1_21_1;

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

/**
Expand All @@ -192,6 +199,14 @@ public enum Version {
V1_19_0, V1_19_1, V1_19_2, V1_19_3, V1_19_4
);

/**
* A collection of versions on which {@link InventoryView} is an interface.
*/
@NotNull
private static final Collection<@NotNull Version> INTERFACE_INVENTORY_VIEW = EnumSet.of(
V1_21_0, V1_21_1
);

/**
* Checks whether the {@link InventoryView} class is an interface on this version.
*
Expand All @@ -200,7 +215,7 @@ public enum Version {
*/
@Contract(pure = true)
public boolean isInventoryViewInterface() {
return this == Version.V1_21;
return INTERFACE_INVENTORY_VIEW.contains(this);
}

/**
Expand Down Expand Up @@ -289,8 +304,9 @@ public static Version getVersion() {
case "1.20.6":
return V1_20_6;
case "1.21":
return V1_21_0;
case "1.21.1":
return V1_21;
return V1_21_1;
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 @@ -317,8 +317,10 @@ public static StonecutterInventory newStonecutterInventory(@NotNull Version vers
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);
ANVIL_INVENTORIES.put(Version.V1_21,
com.github.stefvanschie.inventoryframework.nms.v1_21.AnvilInventoryImpl.class);
ANVIL_INVENTORIES.put(Version.V1_21_0,
com.github.stefvanschie.inventoryframework.nms.v1_21_0.AnvilInventoryImpl.class);
ANVIL_INVENTORIES.put(Version.V1_21_1,
com.github.stefvanschie.inventoryframework.nms.v1_21_1.AnvilInventoryImpl.class);

BEACON_INVENTORIES = new EnumMap<>(Version.class);
BEACON_INVENTORIES.put(Version.V1_14,
Expand Down Expand Up @@ -363,8 +365,10 @@ public static StonecutterInventory newStonecutterInventory(@NotNull Version vers
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);
BEACON_INVENTORIES.put(Version.V1_21,
com.github.stefvanschie.inventoryframework.nms.v1_21.BeaconInventoryImpl.class);
BEACON_INVENTORIES.put(Version.V1_21_0,
com.github.stefvanschie.inventoryframework.nms.v1_21_0.BeaconInventoryImpl.class);
BEACON_INVENTORIES.put(Version.V1_21_1,
com.github.stefvanschie.inventoryframework.nms.v1_21_1.BeaconInventoryImpl.class);

CARTOGRAPHY_TABLE_INVENTORIES = new EnumMap<>(Version.class);
CARTOGRAPHY_TABLE_INVENTORIES.put(Version.V1_14,
Expand Down Expand Up @@ -409,8 +413,10 @@ public static StonecutterInventory newStonecutterInventory(@NotNull Version vers
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);
CARTOGRAPHY_TABLE_INVENTORIES.put(Version.V1_21,
com.github.stefvanschie.inventoryframework.nms.v1_21.CartographyTableInventoryImpl.class);
CARTOGRAPHY_TABLE_INVENTORIES.put(Version.V1_21_0,
com.github.stefvanschie.inventoryframework.nms.v1_21_0.CartographyTableInventoryImpl.class);
CARTOGRAPHY_TABLE_INVENTORIES.put(Version.V1_21_1,
com.github.stefvanschie.inventoryframework.nms.v1_21_1.CartographyTableInventoryImpl.class);

ENCHANTING_TABLE_INVENTORIES = new EnumMap<>(Version.class);
ENCHANTING_TABLE_INVENTORIES.put(Version.V1_14,
Expand Down Expand Up @@ -455,8 +461,10 @@ public static StonecutterInventory newStonecutterInventory(@NotNull Version vers
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);
ENCHANTING_TABLE_INVENTORIES.put(Version.V1_21,
com.github.stefvanschie.inventoryframework.nms.v1_21.EnchantingTableInventoryImpl.class);
ENCHANTING_TABLE_INVENTORIES.put(Version.V1_21_0,
com.github.stefvanschie.inventoryframework.nms.v1_21_0.EnchantingTableInventoryImpl.class);
ENCHANTING_TABLE_INVENTORIES.put(Version.V1_21_1,
com.github.stefvanschie.inventoryframework.nms.v1_21_1.EnchantingTableInventoryImpl.class);

GRINDSTONE_INVENTORIES = new EnumMap<>(Version.class);
GRINDSTONE_INVENTORIES.put(Version.V1_14,
Expand Down Expand Up @@ -501,8 +509,10 @@ public static StonecutterInventory newStonecutterInventory(@NotNull Version vers
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);
GRINDSTONE_INVENTORIES.put(Version.V1_21,
com.github.stefvanschie.inventoryframework.nms.v1_21.GrindstoneInventoryImpl.class);
GRINDSTONE_INVENTORIES.put(Version.V1_21_0,
com.github.stefvanschie.inventoryframework.nms.v1_21_0.GrindstoneInventoryImpl.class);
GRINDSTONE_INVENTORIES.put(Version.V1_21_1,
com.github.stefvanschie.inventoryframework.nms.v1_21_1.GrindstoneInventoryImpl.class);

MERCHANT_INVENTORIES = new EnumMap<>(Version.class);
MERCHANT_INVENTORIES.put(Version.V1_14,
Expand Down Expand Up @@ -547,8 +557,10 @@ public static StonecutterInventory newStonecutterInventory(@NotNull Version vers
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);
MERCHANT_INVENTORIES.put(Version.V1_21,
com.github.stefvanschie.inventoryframework.nms.v1_21.MerchantInventoryImpl.class);
MERCHANT_INVENTORIES.put(Version.V1_21_0,
com.github.stefvanschie.inventoryframework.nms.v1_21_0.MerchantInventoryImpl.class);
MERCHANT_INVENTORIES.put(Version.V1_21_1,
com.github.stefvanschie.inventoryframework.nms.v1_21_1.MerchantInventoryImpl.class);

SMITHING_TABLE_INVENTORIES = new EnumMap<>(Version.class);
SMITHING_TABLE_INVENTORIES.put(Version.V1_19_4,
Expand All @@ -565,8 +577,10 @@ public static StonecutterInventory newStonecutterInventory(@NotNull Version vers
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);
SMITHING_TABLE_INVENTORIES.put(Version.V1_21,
com.github.stefvanschie.inventoryframework.nms.v1_21.SmithingTableInventoryImpl.class);
SMITHING_TABLE_INVENTORIES.put(Version.V1_21_0,
com.github.stefvanschie.inventoryframework.nms.v1_21_0.SmithingTableInventoryImpl.class);
SMITHING_TABLE_INVENTORIES.put(Version.V1_21_1,
com.github.stefvanschie.inventoryframework.nms.v1_21_1.SmithingTableInventoryImpl.class);

LEGACY_SMITHING_TABLE_INVENTORIES = new EnumMap<>(Version.class);
LEGACY_SMITHING_TABLE_INVENTORIES.put(Version.V1_16_1,
Expand Down Expand Up @@ -639,7 +653,9 @@ public static StonecutterInventory newStonecutterInventory(@NotNull Version vers
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);
STONECUTTER_INVENTORIES.put(Version.V1_21,
com.github.stefvanschie.inventoryframework.nms.v1_21.StonecutterInventoryImpl.class);
STONECUTTER_INVENTORIES.put(Version.V1_21_0,
com.github.stefvanschie.inventoryframework.nms.v1_21_0.StonecutterInventoryImpl.class);
STONECUTTER_INVENTORIES.put(Version.V1_21_1,
com.github.stefvanschie.inventoryframework.nms.v1_21_1.StonecutterInventoryImpl.class);
}
}
23 changes: 20 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,10 @@ mvn paper-nms:init -pl nms/1_20_3-4
```

### Installing Spigot via BuildTools
For versions 1.20.5-1.20.6, we use BuildTools. To install these versions, we run the following commands.
For versions 1.20.5-1.21.1, we use BuildTools. To install these versions, we run the following commands.
```
wget https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar -O BuildTools.jar
git clone https://hub.spigotmc.org/stash/scm/spigot/bukkit.git Bukkit
cd Bukkit
git checkout 304e83eb384c338546aa96eea51388e0e8407e26
Expand All @@ -167,8 +167,25 @@ git checkout a7f7c2118b877fde4cf0f32f1f730ffcdee8e9ee
cd ..
java -jar BuildTools.jar --remapped --disable-java-check --dont-update
java -jar BuildTools.jar --rev 1.20.6 --remapped --disable-java-check
cd Bukkit
git checkout 2ec53f498e32b3af989cb24672fc54dfab087154
cd ..
cd CraftBukkit
git checkout 8ee6fd1b8db9896590aa321d0199453de1fc35db
cd ..
cd Spigot
git checkout fb8fb722a327a2f9f097f2ded700ac5de8157408
cd ..
cd BuildData
git checkout ae1e7b1e31cd3a3892bb05a6ccdcecc48c73c455
cd ..
java -jar BuildTools.jar --remapped --disable-java-check --dont-update
java -jar BuildTools.jar --rev 1.21.1 --remapped --disable-java-check
```

Expand Down
2 changes: 1 addition & 1 deletion adventure-support/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>IF-parent</artifactId>
<groupId>com.github.stefvanschie.inventoryframework</groupId>
<version>0.10.17</version>
<version>0.10.18-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion inventory-view/iv-abstract-class/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.github.stefvanschie.inventoryframework</groupId>
<artifactId>IF-parent</artifactId>
<version>0.10.17</version>
<version>0.10.18-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion inventory-view/iv-abstraction/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.github.stefvanschie.inventoryframework</groupId>
<artifactId>IF-parent</artifactId>
<version>0.10.17</version>
<version>0.10.18-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion inventory-view/iv-interface/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.github.stefvanschie.inventoryframework</groupId>
<artifactId>IF-parent</artifactId>
<version>0.10.17</version>
<version>0.10.18-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion nms/1_14/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>IF-parent</artifactId>
<groupId>com.github.stefvanschie.inventoryframework</groupId>
<version>0.10.17</version>
<version>0.10.18-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion nms/1_15/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>IF-parent</artifactId>
<groupId>com.github.stefvanschie.inventoryframework</groupId>
<version>0.10.17</version>
<version>0.10.18-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion nms/1_16_1/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>IF-parent</artifactId>
<groupId>com.github.stefvanschie.inventoryframework</groupId>
<version>0.10.17</version>
<version>0.10.18-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion nms/1_16_2-3/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>IF-parent</artifactId>
<groupId>com.github.stefvanschie.inventoryframework</groupId>
<version>0.10.17</version>
<version>0.10.18-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion nms/1_16_4-5/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>IF-parent</artifactId>
<groupId>com.github.stefvanschie.inventoryframework</groupId>
<version>0.10.17</version>
<version>0.10.18-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion nms/1_17_0/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>IF-parent</artifactId>
<groupId>com.github.stefvanschie.inventoryframework</groupId>
<version>0.10.17</version>
<version>0.10.18-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion nms/1_17_1/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>IF-parent</artifactId>
<groupId>com.github.stefvanschie.inventoryframework</groupId>
<version>0.10.17</version>
<version>0.10.18-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
Loading

0 comments on commit 6c2d521

Please sign in to comment.