Skip to content

Commit

Permalink
Add 1.21.3 support
Browse files Browse the repository at this point in the history
  • Loading branch information
stefvanschie committed Oct 31, 2024
1 parent 1408227 commit 60b19dc
Show file tree
Hide file tree
Showing 15 changed files with 50 additions and 49 deletions.
2 changes: 1 addition & 1 deletion IF/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@
</dependency>
<dependency>
<groupId>com.github.stefvanschie.inventoryframework</groupId>
<artifactId>1_21_2</artifactId>
<artifactId>1_21_2-3</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,19 +178,19 @@ public enum Version {
V1_21_1,

/**
* Version 1.21.2
* Version 1.21.2 - 1.21.3
*
* @since 0.10.18
*/
V1_21_2;
V1_21_2_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, 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
V1_21_0, V1_21_1, V1_21_2_3
);

/**
Expand All @@ -211,7 +211,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
V1_21_0, V1_21_1, V1_21_2_3
);

/**
Expand Down Expand Up @@ -315,7 +315,8 @@ public static Version getVersion() {
case "1.21.1":
return V1_21_1;
case "1.21.2":
return V1_21_2;
case "1.21.3":
return V1_21_2_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 @@ -321,8 +321,8 @@ public static StonecutterInventory newStonecutterInventory(@NotNull Version vers
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);
ANVIL_INVENTORIES.put(Version.V1_21_2,
com.github.stefvanschie.inventoryframework.nms.v1_21_2.AnvilInventoryImpl.class);
ANVIL_INVENTORIES.put(Version.V1_21_2_3,
com.github.stefvanschie.inventoryframework.nms.v1_21_2_3.AnvilInventoryImpl.class);

BEACON_INVENTORIES = new EnumMap<>(Version.class);
BEACON_INVENTORIES.put(Version.V1_14,
Expand Down Expand Up @@ -371,8 +371,8 @@ public static StonecutterInventory newStonecutterInventory(@NotNull Version vers
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);
BEACON_INVENTORIES.put(Version.V1_21_2,
com.github.stefvanschie.inventoryframework.nms.v1_21_2.BeaconInventoryImpl.class);
BEACON_INVENTORIES.put(Version.V1_21_2_3,
com.github.stefvanschie.inventoryframework.nms.v1_21_2_3.BeaconInventoryImpl.class);

CARTOGRAPHY_TABLE_INVENTORIES = new EnumMap<>(Version.class);
CARTOGRAPHY_TABLE_INVENTORIES.put(Version.V1_14,
Expand Down Expand Up @@ -421,8 +421,8 @@ public static StonecutterInventory newStonecutterInventory(@NotNull Version vers
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);
CARTOGRAPHY_TABLE_INVENTORIES.put(Version.V1_21_2,
com.github.stefvanschie.inventoryframework.nms.v1_21_2.CartographyTableInventoryImpl.class);
CARTOGRAPHY_TABLE_INVENTORIES.put(Version.V1_21_2_3,
com.github.stefvanschie.inventoryframework.nms.v1_21_2_3.CartographyTableInventoryImpl.class);

ENCHANTING_TABLE_INVENTORIES = new EnumMap<>(Version.class);
ENCHANTING_TABLE_INVENTORIES.put(Version.V1_14,
Expand Down Expand Up @@ -471,8 +471,8 @@ public static StonecutterInventory newStonecutterInventory(@NotNull Version vers
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);
ENCHANTING_TABLE_INVENTORIES.put(Version.V1_21_2,
com.github.stefvanschie.inventoryframework.nms.v1_21_2.EnchantingTableInventoryImpl.class);
ENCHANTING_TABLE_INVENTORIES.put(Version.V1_21_2_3,
com.github.stefvanschie.inventoryframework.nms.v1_21_2_3.EnchantingTableInventoryImpl.class);

GRINDSTONE_INVENTORIES = new EnumMap<>(Version.class);
GRINDSTONE_INVENTORIES.put(Version.V1_14,
Expand Down Expand Up @@ -521,8 +521,8 @@ public static StonecutterInventory newStonecutterInventory(@NotNull Version vers
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);
GRINDSTONE_INVENTORIES.put(Version.V1_21_2,
com.github.stefvanschie.inventoryframework.nms.v1_21_2.GrindstoneInventoryImpl.class);
GRINDSTONE_INVENTORIES.put(Version.V1_21_2_3,
com.github.stefvanschie.inventoryframework.nms.v1_21_2_3.GrindstoneInventoryImpl.class);

MERCHANT_INVENTORIES = new EnumMap<>(Version.class);
MERCHANT_INVENTORIES.put(Version.V1_14,
Expand Down Expand Up @@ -571,8 +571,8 @@ public static StonecutterInventory newStonecutterInventory(@NotNull Version vers
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);
MERCHANT_INVENTORIES.put(Version.V1_21_2,
com.github.stefvanschie.inventoryframework.nms.v1_21_2.MerchantInventoryImpl.class);
MERCHANT_INVENTORIES.put(Version.V1_21_2_3,
com.github.stefvanschie.inventoryframework.nms.v1_21_2_3.MerchantInventoryImpl.class);

SMITHING_TABLE_INVENTORIES = new EnumMap<>(Version.class);
SMITHING_TABLE_INVENTORIES.put(Version.V1_19_4,
Expand All @@ -593,8 +593,8 @@ public static StonecutterInventory newStonecutterInventory(@NotNull Version vers
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);
SMITHING_TABLE_INVENTORIES.put(Version.V1_21_2,
com.github.stefvanschie.inventoryframework.nms.v1_21_2.SmithingTableInventoryImpl.class);
SMITHING_TABLE_INVENTORIES.put(Version.V1_21_2_3,
com.github.stefvanschie.inventoryframework.nms.v1_21_2_3.SmithingTableInventoryImpl.class);

LEGACY_SMITHING_TABLE_INVENTORIES = new EnumMap<>(Version.class);
LEGACY_SMITHING_TABLE_INVENTORIES.put(Version.V1_16_1,
Expand Down Expand Up @@ -671,7 +671,7 @@ public static StonecutterInventory newStonecutterInventory(@NotNull Version vers
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);
STONECUTTER_INVENTORIES.put(Version.V1_21_2,
com.github.stefvanschie.inventoryframework.nms.v1_21_2.StonecutterInventoryImpl.class);
STONECUTTER_INVENTORIES.put(Version.V1_21_2_3,
com.github.stefvanschie.inventoryframework.nms.v1_21_2_3.StonecutterInventoryImpl.class);
}
}
12 changes: 6 additions & 6 deletions nms/1_21_2/pom.xml → nms/1_21_2-3/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<relativePath>../../pom.xml</relativePath>
</parent>

<artifactId>1_21_2</artifactId>
<artifactId>1_21_2-3</artifactId>

<properties>
<maven.deploy.skip>true</maven.deploy.skip>
Expand All @@ -26,7 +26,7 @@
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>1.21.2-R0.1-SNAPSHOT</version>
<version>1.21.3-R0.1-SNAPSHOT</version>
<classifier>remapped-mojang</classifier>
<scope>provided</scope>
</dependency>
Expand All @@ -46,9 +46,9 @@
</goals>
<id>remap-obf</id>
<configuration>
<srgIn>org.spigotmc:minecraft-server:1.21.2-R0.1-SNAPSHOT:txt:maps-mojang</srgIn>
<srgIn>org.spigotmc:minecraft-server:1.21.3-R0.1-SNAPSHOT:txt:maps-mojang</srgIn>
<reverse>true</reverse>
<remappedDependencies>org.spigotmc:spigot:1.21.2-R0.1-SNAPSHOT:jar:remapped-mojang</remappedDependencies>
<remappedDependencies>org.spigotmc:spigot:1.21.3-R0.1-SNAPSHOT:jar:remapped-mojang</remappedDependencies>
<remappedArtifactAttached>true</remappedArtifactAttached>
<remappedClassifierName>remapped-obf</remappedClassifierName>
</configuration>
Expand All @@ -61,8 +61,8 @@
<id>remap-spigot</id>
<configuration>
<inputFile>${project.build.directory}/${project.artifactId}-${project.version}-remapped-obf.jar</inputFile>
<srgIn>org.spigotmc:minecraft-server:1.21.2-R0.1-SNAPSHOT:csrg:maps-spigot</srgIn>
<remappedDependencies>org.spigotmc:spigot:1.21.2-R0.1-SNAPSHOT:jar:remapped-obf</remappedDependencies>
<srgIn>org.spigotmc:minecraft-server:1.21.3-R0.1-SNAPSHOT:csrg:maps-spigot</srgIn>
<remappedDependencies>org.spigotmc:spigot:1.21.3-R0.1-SNAPSHOT:jar:remapped-obf</remappedDependencies>
</configuration>
</execution>
</executions>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.github.stefvanschie.inventoryframework.nms.v1_21_2;
package com.github.stefvanschie.inventoryframework.nms.v1_21_2_3;

import com.github.stefvanschie.inventoryframework.abstraction.AnvilInventory;
import com.github.stefvanschie.inventoryframework.adventuresupport.TextHolder;
import com.github.stefvanschie.inventoryframework.nms.v1_21_2.util.CustomInventoryUtil;
import com.github.stefvanschie.inventoryframework.nms.v1_21_2.util.TextHolderUtil;
import com.github.stefvanschie.inventoryframework.nms.v1_21_2_3.util.CustomInventoryUtil;
import com.github.stefvanschie.inventoryframework.nms.v1_21_2_3.util.TextHolderUtil;
import net.minecraft.core.BlockPos;
import net.minecraft.core.NonNullList;
import net.minecraft.network.chat.Component;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.github.stefvanschie.inventoryframework.nms.v1_21_2;
package com.github.stefvanschie.inventoryframework.nms.v1_21_2_3;

import com.github.stefvanschie.inventoryframework.abstraction.BeaconInventory;
import net.minecraft.core.NonNullList;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.github.stefvanschie.inventoryframework.nms.v1_21_2;
package com.github.stefvanschie.inventoryframework.nms.v1_21_2_3;

import com.github.stefvanschie.inventoryframework.abstraction.CartographyTableInventory;
import com.github.stefvanschie.inventoryframework.adventuresupport.TextHolder;
import com.github.stefvanschie.inventoryframework.nms.v1_21_2.util.CustomInventoryUtil;
import com.github.stefvanschie.inventoryframework.nms.v1_21_2.util.TextHolderUtil;
import com.github.stefvanschie.inventoryframework.nms.v1_21_2_3.util.CustomInventoryUtil;
import com.github.stefvanschie.inventoryframework.nms.v1_21_2_3.util.TextHolderUtil;
import net.minecraft.core.NonNullList;
import net.minecraft.network.chat.Component;
import net.minecraft.network.protocol.game.ClientboundContainerSetContentPacket;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.github.stefvanschie.inventoryframework.nms.v1_21_2;
package com.github.stefvanschie.inventoryframework.nms.v1_21_2_3;

import com.github.stefvanschie.inventoryframework.abstraction.EnchantingTableInventory;
import com.github.stefvanschie.inventoryframework.adventuresupport.TextHolder;
import com.github.stefvanschie.inventoryframework.nms.v1_21_2.util.TextHolderUtil;
import com.github.stefvanschie.inventoryframework.nms.v1_21_2_3.util.TextHolderUtil;
import net.minecraft.core.NonNullList;
import net.minecraft.network.chat.Component;
import net.minecraft.network.protocol.game.ClientboundContainerSetContentPacket;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.github.stefvanschie.inventoryframework.nms.v1_21_2;
package com.github.stefvanschie.inventoryframework.nms.v1_21_2_3;

import com.github.stefvanschie.inventoryframework.abstraction.GrindstoneInventory;
import com.github.stefvanschie.inventoryframework.adventuresupport.TextHolder;
import com.github.stefvanschie.inventoryframework.nms.v1_21_2.util.CustomInventoryUtil;
import com.github.stefvanschie.inventoryframework.nms.v1_21_2.util.TextHolderUtil;
import com.github.stefvanschie.inventoryframework.nms.v1_21_2_3.util.CustomInventoryUtil;
import com.github.stefvanschie.inventoryframework.nms.v1_21_2_3.util.TextHolderUtil;
import net.minecraft.core.NonNullList;
import net.minecraft.network.chat.Component;
import net.minecraft.network.protocol.game.ClientboundContainerSetContentPacket;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.github.stefvanschie.inventoryframework.nms.v1_21_2;
package com.github.stefvanschie.inventoryframework.nms.v1_21_2_3;

import com.github.stefvanschie.inventoryframework.abstraction.MerchantInventory;
import net.minecraft.core.component.DataComponentPredicate;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.github.stefvanschie.inventoryframework.nms.v1_21_2;
package com.github.stefvanschie.inventoryframework.nms.v1_21_2_3;

import com.github.stefvanschie.inventoryframework.abstraction.SmithingTableInventory;
import com.github.stefvanschie.inventoryframework.adventuresupport.TextHolder;
import com.github.stefvanschie.inventoryframework.nms.v1_21_2.util.CustomInventoryUtil;
import com.github.stefvanschie.inventoryframework.nms.v1_21_2.util.TextHolderUtil;
import com.github.stefvanschie.inventoryframework.nms.v1_21_2_3.util.CustomInventoryUtil;
import com.github.stefvanschie.inventoryframework.nms.v1_21_2_3.util.TextHolderUtil;
import net.minecraft.core.BlockPos;
import net.minecraft.core.NonNullList;
import net.minecraft.network.chat.Component;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.github.stefvanschie.inventoryframework.nms.v1_21_2;
package com.github.stefvanschie.inventoryframework.nms.v1_21_2_3;

import com.github.stefvanschie.inventoryframework.abstraction.StonecutterInventory;
import com.github.stefvanschie.inventoryframework.adventuresupport.TextHolder;
import com.github.stefvanschie.inventoryframework.nms.v1_21_2.util.TextHolderUtil;
import com.github.stefvanschie.inventoryframework.nms.v1_21_2_3.util.TextHolderUtil;
import net.minecraft.core.NonNullList;
import net.minecraft.network.chat.Component;
import net.minecraft.network.protocol.game.ClientboundContainerSetContentPacket;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.github.stefvanschie.inventoryframework.nms.v1_21_2.util;
package com.github.stefvanschie.inventoryframework.nms.v1_21_2_3.util;

import net.minecraft.core.NonNullList;
import net.minecraft.world.item.ItemStack;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.github.stefvanschie.inventoryframework.nms.v1_21_2.util;
package com.github.stefvanschie.inventoryframework.nms.v1_21_2_3.util;

import com.github.stefvanschie.inventoryframework.adventuresupport.ComponentHolder;
import com.github.stefvanschie.inventoryframework.adventuresupport.StringHolder;
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<modules>
<module>IF</module>
<module>nms/abstraction</module>
<module>nms/1_21_2</module>
<module>nms/1_21_2-3</module>
<module>nms/1_21_1</module>
<module>nms/1_21_0</module>
<module>nms/1_20_6</module>
Expand Down

0 comments on commit 60b19dc

Please sign in to comment.