Skip to content

Commit

Permalink
v9.2.0
Browse files Browse the repository at this point in the history
Added support for 1.19.3
  • Loading branch information
CryptoMorin committed Dec 16, 2022
1 parent 240e243 commit 7b84707
Show file tree
Hide file tree
Showing 8 changed files with 161 additions and 19 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# XSeries
[![Bukkit Version](https://img.shields.io/badge/bukkit-1.18-dark_green.svg)](https://shields.io/)
[![Bukkit Version](https://img.shields.io/badge/bukkit-1.19-dark_green.svg)](https://shields.io/)
[![Java](https://img.shields.io/badge/java-8-dark_green.svg)](https://shields.io/)
[![Build Status](https://travis-ci.com/CryptoMorin/XSeries.svg?branch=master)](https://travis-ci.com/CryptoMorin/XSeries)
![maven-central](https://img.shields.io/maven-central/v/com.github.cryptomorin/XSeries)
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@

<properties>
<!-- Latest version -->
<spigotVersion>1.19-R0.1-SNAPSHOT</spigotVersion>
<spigotVersion>1.19.3-R0.1-SNAPSHOT</spigotVersion>
</properties>

<dependencies>
Expand Down
6 changes: 4 additions & 2 deletions src/main/java/com/cryptomorin/xseries/NMSExtras.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
* All the parameters are non-null.
*
* @author Crypto Morin
* @version 5.2.0
* @version 5.2.1
*/
public final class NMSExtras {
public static final MethodHandle EXP_PACKET;
Expand Down Expand Up @@ -205,7 +205,9 @@ public final class NMSExtras {
MethodType.methodType(toArrayClass(IChatBaseComponent), String[].class));

tileEntitySign = lookup.findConstructor(TileEntitySign, MethodType.methodType(void.class, blockPos, BLOCK_DATA));
tileEntitySign_getUpdatePacket = lookup.findVirtual(TileEntitySign, v(18, "c").orElse("getUpdatePacket"), MethodType.methodType(PacketPlayOutTileEntityData));
tileEntitySign_getUpdatePacket = lookup.findVirtual(TileEntitySign,
v(19, "f").v(18, "c").orElse("getUpdatePacket"),
MethodType.methodType(PacketPlayOutTileEntityData));
tileEntitySign_setLine = lookup.findVirtual(TileEntitySign, "a", MethodType.methodType(void.class, int.class, IChatBaseComponent, IChatBaseComponent));
}
} catch (NoSuchMethodException | IllegalAccessException | NoSuchFieldException ex) {
Expand Down
48 changes: 47 additions & 1 deletion src/main/java/com/cryptomorin/xseries/XMaterial.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
* <b>/give @p minecraft:dirt 1 10</b> where 1 is the item amount, and 10 is the data value. The material {@link #DIRT} with a data value of {@code 10} doesn't exist.
*
* @author Crypto Morin
* @version 11.2.0
* @version 11.3.0
* @see Material
* @see ItemStack
*/
Expand All @@ -72,6 +72,7 @@ public enum XMaterial {
ACACIA_DOOR("ACACIA_DOOR", "ACACIA_DOOR_ITEM"),
ACACIA_FENCE,
ACACIA_FENCE_GATE,
ACACIA_HANGING_SIGN,
ACACIA_LEAVES(0, "LEAVES_2"),
ACACIA_LOG(0, "LOG_2"),
ACACIA_PLANKS(4, "WOOD"),
Expand All @@ -81,6 +82,7 @@ public enum XMaterial {
ACACIA_SLAB(4, "WOOD_DOUBLE_STEP", "WOOD_STEP", "WOODEN_SLAB"),
ACACIA_STAIRS,
ACACIA_TRAPDOOR("TRAP_DOOR"),
ACACIA_WALL_HANGING_SIGN,
ACACIA_WALL_SIGN("WALL_SIGN"),
ACACIA_WOOD(0, "LOG_2"),
ACTIVATOR_RAIL,
Expand Down Expand Up @@ -115,7 +117,26 @@ public enum XMaterial {
AZURE_BLUET(3, "RED_ROSE"),
BAKED_POTATO,
BAMBOO,
BAMBOO_BLOCK,
BAMBOO_BUTTON,
BAMBOO_CHEST_RAFT,
BAMBOO_DOOR,
BAMBOO_FENCE,
BAMBOO_FENCE_GATE,
BAMBOO_HANGING_SIGN,
BAMBOO_MOSAIC,
BAMBOO_MOSAIC_SLAB,
BAMBOO_MOSAIC_STAIRS,
BAMBOO_PLANKS,
BAMBOO_PRESSURE_PLATE,
BAMBOO_RAFT,
BAMBOO_SAPLING,
BAMBOO_SIGN,
BAMBOO_SLAB,
BAMBOO_STAIRS,
BAMBOO_TRAPDOOR,
BAMBOO_WALL_HANGING_SIGN,
BAMBOO_WALL_SIGN,
BARREL,
BARRIER,
BASALT,
Expand All @@ -142,6 +163,7 @@ public enum XMaterial {
BIRCH_DOOR("BIRCH_DOOR", "BIRCH_DOOR_ITEM"),
BIRCH_FENCE,
BIRCH_FENCE_GATE,
BIRCH_HANGING_SIGN,
BIRCH_LEAVES(2, "LEAVES"),
BIRCH_LOG(2, "LOG"),
BIRCH_PLANKS(2, "WOOD"),
Expand All @@ -151,6 +173,7 @@ public enum XMaterial {
BIRCH_SLAB(2, "WOOD_DOUBLE_STEP", "WOOD_STEP", "WOODEN_SLAB"),
BIRCH_STAIRS("BIRCH_WOOD_STAIRS"),
BIRCH_TRAPDOOR("TRAP_DOOR"),
BIRCH_WALL_HANGING_SIGN,
BIRCH_WALL_SIGN("WALL_SIGN"),
BIRCH_WOOD(2, "LOG"),
BLACKSTONE,
Expand Down Expand Up @@ -242,6 +265,7 @@ public enum XMaterial {
CACTUS,
CAKE("CAKE_BLOCK"),
CALCITE,
CAMEL_SPAWN_EGG,
CAMPFIRE,
CANDLE,
CANDLE_CAKE,
Expand Down Expand Up @@ -273,6 +297,7 @@ public enum XMaterial {
CHICKEN("RAW_CHICKEN"),
CHICKEN_SPAWN_EGG(93, "MONSTER_EGG"),
CHIPPED_ANVIL(1, "ANVIL"),
CHISELED_BOOKSHELF,
CHISELED_DEEPSLATE,
CHISELED_NETHER_BRICKS(1, "NETHER_BRICKS"),
CHISELED_POLISHED_BLACKSTONE("POLISHED_BLACKSTONE"),
Expand Down Expand Up @@ -345,6 +370,7 @@ public enum XMaterial {
CRIMSON_FENCE,
CRIMSON_FENCE_GATE,
CRIMSON_FUNGUS,
CRIMSON_HANGING_SIGN,
CRIMSON_HYPHAE,
CRIMSON_NYLIUM,
CRIMSON_PLANKS,
Expand All @@ -355,6 +381,7 @@ public enum XMaterial {
CRIMSON_STAIRS,
CRIMSON_STEM,
CRIMSON_TRAPDOOR,
CRIMSON_WALL_HANGING_SIGN,
CRIMSON_WALL_SIGN("WALL_SIGN"),
CROSSBOW,
CRYING_OBSIDIAN,
Expand Down Expand Up @@ -388,6 +415,7 @@ public enum XMaterial {
DARK_OAK_DOOR("DARK_OAK_DOOR", "DARK_OAK_DOOR_ITEM"),
DARK_OAK_FENCE,
DARK_OAK_FENCE_GATE,
DARK_OAK_HANGING_SIGN,
DARK_OAK_LEAVES(1, "LEAVES_2"),
DARK_OAK_LOG(1, "LOG_2"),
DARK_OAK_PLANKS(5, "WOOD"),
Expand All @@ -397,6 +425,7 @@ public enum XMaterial {
DARK_OAK_SLAB(5, "WOOD_DOUBLE_STEP", "WOOD_STEP", "WOODEN_SLAB"),
DARK_OAK_STAIRS,
DARK_OAK_TRAPDOOR("TRAP_DOOR"),
DARK_OAK_WALL_HANGING_SIGN,
DARK_OAK_WALL_SIGN("WALL_SIGN"),
DARK_OAK_WOOD(1, "LOG_2"),
DARK_PRISMARINE(2, "PRISMARINE"),
Expand Down Expand Up @@ -491,6 +520,7 @@ public enum XMaterial {
ENDERMAN_SPAWN_EGG(58, "MONSTER_EGG"),
ENDERMITE_SPAWN_EGG(67, "MONSTER_EGG"),
ENDER_CHEST,
ENDER_DRAGON_SPAWN_EGG,
ENDER_EYE("EYE_OF_ENDER"),
ENDER_PEARL,
END_CRYSTAL,
Expand Down Expand Up @@ -659,6 +689,7 @@ public enum XMaterial {
IRON_BOOTS,
IRON_CHESTPLATE,
IRON_DOOR("IRON_DOOR_BLOCK"),
IRON_GOLEM_SPAWN_EGG,
IRON_HELMET,
IRON_HOE,
IRON_HORSE_ARMOR("IRON_BARDING"),
Expand All @@ -680,6 +711,7 @@ public enum XMaterial {
JUNGLE_DOOR("JUNGLE_DOOR", "JUNGLE_DOOR_ITEM"),
JUNGLE_FENCE,
JUNGLE_FENCE_GATE,
JUNGLE_HANGING_SIGN,
JUNGLE_LEAVES(3, "LEAVES"),
JUNGLE_LOG(3, "LOG"),
JUNGLE_PLANKS(3, "WOOD"),
Expand All @@ -689,6 +721,7 @@ public enum XMaterial {
JUNGLE_SLAB(3, "WOOD_DOUBLE_STEP", "WOOD_STEP", "WOODEN_SLAB"),
JUNGLE_STAIRS("JUNGLE_WOOD_STAIRS"),
JUNGLE_TRAPDOOR("TRAP_DOOR"),
JUNGLE_WALL_HANGING_SIGN,
JUNGLE_WALL_SIGN("WALL_SIGN"),
JUNGLE_WOOD(3, "LOG"),
KELP,
Expand Down Expand Up @@ -796,6 +829,7 @@ public enum XMaterial {
MANGROVE_DOOR,
MANGROVE_FENCE,
MANGROVE_FENCE_GATE,
MANGROVE_HANGING_SIGN,
MANGROVE_LEAVES,
MANGROVE_LOG,
MANGROVE_PLANKS,
Expand All @@ -806,6 +840,7 @@ public enum XMaterial {
MANGROVE_SLAB,
MANGROVE_STAIRS,
MANGROVE_TRAPDOOR,
MANGROVE_WALL_HANGING_SIGN,
MANGROVE_WALL_SIGN,
MANGROVE_WOOD,
/**
Expand Down Expand Up @@ -902,6 +937,7 @@ public enum XMaterial {
OAK_DOOR("WOODEN_DOOR", "WOOD_DOOR"),
OAK_FENCE("FENCE"),
OAK_FENCE_GATE("FENCE_GATE"),
OAK_HANGING_SIGN,
OAK_LEAVES("LEAVES"),
OAK_LOG("LOG"),
OAK_PLANKS("WOOD"),
Expand All @@ -911,6 +947,7 @@ public enum XMaterial {
OAK_SLAB("WOOD_DOUBLE_STEP", "WOOD_STEP", "WOODEN_SLAB"),
OAK_STAIRS("WOOD_STAIRS"),
OAK_TRAPDOOR("TRAP_DOOR"),
OAK_WALL_HANGING_SIGN,
OAK_WALL_SIGN("WALL_SIGN"),
OAK_WOOD("LOG"),
OBSERVER,
Expand Down Expand Up @@ -951,7 +988,9 @@ public enum XMaterial {
PHANTOM_SPAWN_EGG,
PIGLIN_BANNER_PATTERN,
PIGLIN_BRUTE_SPAWN_EGG,
PIGLIN_HEAD,
PIGLIN_SPAWN_EGG(57, "MONSTER_EGG"),
PIGLIN_WALL_HEAD,
PIG_SPAWN_EGG(90, "MONSTER_EGG"),
PILLAGER_SPAWN_EGG,
PINK_BANNER(9, "STANDING_BANNER", "BANNER"),
Expand Down Expand Up @@ -1212,6 +1251,7 @@ public enum XMaterial {
SNOW,
SNOWBALL("SNOW_BALL"),
SNOW_BLOCK,
SNOW_GOLEM_SPAWN_EGG,
SOUL_CAMPFIRE,
SOUL_FIRE,
SOUL_LANTERN,
Expand All @@ -1232,6 +1272,7 @@ public enum XMaterial {
SPRUCE_DOOR("SPRUCE_DOOR", "SPRUCE_DOOR_ITEM"),
SPRUCE_FENCE,
SPRUCE_FENCE_GATE,
SPRUCE_HANGING_SIGN,
SPRUCE_LEAVES(1, "LEAVES"),
SPRUCE_LOG(1, "LOG"),
SPRUCE_PLANKS(1, "WOOD"),
Expand All @@ -1241,6 +1282,7 @@ public enum XMaterial {
SPRUCE_SLAB(1, "WOOD_DOUBLE_STEP", "WOOD_STEP", "WOODEN_SLAB"),
SPRUCE_STAIRS("SPRUCE_WOOD_STAIRS"),
SPRUCE_TRAPDOOR("TRAP_DOOR"),
SPRUCE_WALL_HANGING_SIGN,
SPRUCE_WALL_SIGN("WALL_SIGN"),
SPRUCE_WOOD(1, "LOG"),
SPYGLASS,
Expand All @@ -1267,6 +1309,7 @@ public enum XMaterial {
STRING,
STRIPPED_ACACIA_LOG,
STRIPPED_ACACIA_WOOD,
STRIPPED_BAMBOO_BLOCK,
STRIPPED_BIRCH_LOG,
STRIPPED_BIRCH_WOOD,
STRIPPED_CRIMSON_HYPHAE,
Expand Down Expand Up @@ -1348,6 +1391,7 @@ public enum XMaterial {
WARPED_FENCE_GATE,
WARPED_FUNGUS,
WARPED_FUNGUS_ON_A_STICK,
WARPED_HANGING_SIGN,
WARPED_HYPHAE,
WARPED_NYLIUM,
WARPED_PLANKS,
Expand All @@ -1358,6 +1402,7 @@ public enum XMaterial {
WARPED_STAIRS,
WARPED_STEM,
WARPED_TRAPDOOR,
WARPED_WALL_HANGING_SIGN,
WARPED_WALL_SIGN("WALL_SIGN"),
WARPED_WART_BLOCK,
/**
Expand Down Expand Up @@ -1418,6 +1463,7 @@ public enum XMaterial {
WITHER_SKELETON_SKULL(1, "SKULL", "SKULL_ITEM"),
WITHER_SKELETON_SPAWN_EGG(5, "MONSTER_EGG"),
WITHER_SKELETON_WALL_SKULL(1, "SKULL", "SKULL_ITEM"),
WITHER_SPAWN_EGG,
WOLF_SPAWN_EGG(95, "MONSTER_EGG"),
WOODEN_AXE("WOOD_AXE"),
WOODEN_HOE("WOOD_HOE"),
Expand Down
Loading

0 comments on commit 7b84707

Please sign in to comment.