Skip to content

Commit 535cae6

Browse files
committed
v12.1.0
* Added XTag.getTag(String name) * XTag general class cleanup (Uses TagBuilder, we should also inline most tags) * Deprecated a lot of methods. Although they wont be removed any time soon, you should update as soon as possible. * Fixed XItemStack to use XPatternType. * XPotion now covers more value ranges. * Significantly improved unit tests. * Fixed a few broken sound entries for v1.12 * Improved XEnchantment's Enchantment->XEnchantment mapping for older versions. * XAttribute: Fixed some missing values. Also fixed the entire class for some older versions (specifically ~v1.15-1.19) * XParticle: Fixed some missing/mismatched values.
1 parent 9c1648c commit 535cae6

21 files changed

+1429
-939
lines changed

pom.xml

Lines changed: 42 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>com.github.cryptomorin</groupId>
88
<artifactId>XSeries</artifactId>
9-
<version>12.0.0</version>
9+
<version>12.1.0</version>
1010

1111
<name>XSeries</name>
1212
<description>A set of utilities for Minecraft plugins</description>
@@ -82,6 +82,7 @@
8282
<!-- 1.15.2-R0.1-SNAPSHOT -->
8383
<!-- 1.16.5-R0.1-SNAPSHOT -->
8484
<!-- 1.17.1-R0.1-SNAPSHOT -->
85+
<!-- 1.18.2-R0.1-SNAPSHOT -->
8586
<!-- 1.19.4-R0.1-SNAPSHOT -->
8687
<!-- 1.20.6-R0.1-SNAPSHOT -->
8788
<!-- 1.21.1-R0.1-SNAPSHOT -->
@@ -95,7 +96,7 @@
9596
<jopt>5.0.4</jopt>
9697
<testVer/>
9798
<testJavaPath/>
98-
<testJava>21</testJava>
99+
<testJava>11</testJava>
99100
</properties>
100101

101102
<dependencies>
@@ -128,6 +129,26 @@
128129

129130
<build>
130131
<plugins>
132+
<plugin>
133+
<groupId>org.apache.maven.plugins</groupId>
134+
<artifactId>maven-toolchains-plugin</artifactId>
135+
<version>3.2.0</version>
136+
<executions>
137+
<execution>
138+
<phase>validate</phase>
139+
<goals>
140+
<goal>toolchain</goal>
141+
</goals>
142+
</execution>
143+
</executions>
144+
<configuration>
145+
<toolchains>
146+
<jdk>
147+
<version>[${testJava}]</version>
148+
</jdk>
149+
</toolchains>
150+
</configuration>
151+
</plugin>
131152
<plugin>
132153
<groupId>org.apache.maven.plugins</groupId>
133154
<artifactId>maven-source-plugin</artifactId>
@@ -241,7 +262,7 @@
241262
<!-- You can also use the following argument from the cmd line: -->
242263
<!-- <dash><dash>toolchains "\.m2\toolchains.xml" -->
243264
<jdkToolchain>
244-
<version>${testJava}</version>
265+
<version>[${testJava}]</version>
245266
</jdkToolchain>
246267
</configuration>
247268
</plugin>
@@ -327,27 +348,6 @@
327348
</dependencies>
328349
<build>
329350
<plugins>
330-
<plugin>
331-
<groupId>org.apache.maven.plugins</groupId>
332-
<artifactId>maven-toolchains-plugin</artifactId>
333-
<version>3.2.0</version>
334-
<executions>
335-
<execution>
336-
<phase>validate</phase>
337-
<goals>
338-
<goal>toolchain</goal>
339-
</goals>
340-
</execution>
341-
</executions>
342-
<configuration>
343-
<toolchains>
344-
<jdk>
345-
<version>[${testJava}]</version>
346-
</jdk>
347-
</toolchains>
348-
</configuration>
349-
</plugin>
350-
351351
<!-- <plugin>-->
352352
<!-- &lt;!&ndash; For cleaning the tests folder that the server files are generated in &ndash;&gt;-->
353353
<!-- <artifactId>maven-clean-plugin</artifactId>-->
@@ -438,15 +438,15 @@
438438
<properties>
439439
<nms>18_R1</nms>
440440
<spigotVersion>1.18.2-R0.1-SNAPSHOT</spigotVersion>
441-
<testJava>21</testJava>
441+
<testJava>17</testJava>
442442
</properties>
443443
</profile>
444444
<profile>
445445
<id>17</id>
446446
<properties>
447447
<nms>17_R1</nms>
448448
<spigotVersion>1.17.1-R0.1-SNAPSHOT</spigotVersion>
449-
<testJava>21</testJava>
449+
<testJava>17</testJava>
450450
</properties>
451451
</profile>
452452
<profile>
@@ -466,6 +466,22 @@
466466
<testJava>11</testJava>
467467
</properties>
468468
</profile>
469+
<profile>
470+
<id>14</id>
471+
<properties>
472+
<nms>15_R3</nms>
473+
<spigotVersion>1.14.4-R0.1-SNAPSHOT</spigotVersion>
474+
<testJava>11</testJava>
475+
</properties>
476+
</profile>
477+
<profile>
478+
<id>13</id>
479+
<properties>
480+
<nms>15_R3</nms>
481+
<spigotVersion>1.13.2-R0.1-SNAPSHOT</spigotVersion>
482+
<testJava>11</testJava>
483+
</properties>
484+
</profile>
469485
<profile>
470486
<id>12</id>
471487
<properties>

src/main/java/com/cryptomorin/xseries/XAttribute.java

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -43,38 +43,38 @@ public final class XAttribute extends XModule<XAttribute, Attribute> {
4343
new XRegistry<>(Attribute.class, XAttribute.class, () -> Registry.ATTRIBUTE, XAttribute::new, XAttribute[]::new);
4444

4545
public static final XAttribute
46-
MAX_HEALTH = std(/* v1.20.3+ */ "max_health", "GENERIC_MAX_HEALTH"),
47-
FOLLOW_RANGE = std(/* v1.20.3+ */ "follow_range", "GENERIC_FOLLOW_RANGE"),
48-
KNOCKBACK_RESISTANCE = std(/* v1.20.3+ */ "knockback_resistance", "GENERIC_KNOCKBACK_RESISTANCE"),
49-
MOVEMENT_SPEED = std(/* v1.20.3+ */ "movement_speed", "GENERIC_MOVEMENT_SPEED"),
50-
FLYING_SPEED = std(/* v1.20.3+ */ "flying_speed", "GENERIC_FLYING_SPEED"),
51-
ATTACK_DAMAGE = std(/* v1.20.3+ */ "attack_damage", "GENERIC_ATTACK_DAMAGE"),
52-
ATTACK_KNOCKBACK = std(/* v1.20.3+ */ "attack_knockback", "GENERIC_ATTACK_KNOCKBACK"),
53-
ATTACK_SPEED = std(/* v1.20.3+ */ "attack_speed", "GENERIC_ATTACK_SPEED"),
54-
ARMOR = std(/* v1.20.3+ */ "armor", "GENERIC_ARMOR"),
55-
ARMOR_TOUGHNESS = std(/* v1.20.3+ */ "armor_toughness", "GENERIC_ARMOR_TOUGHNESS"),
56-
FALL_DAMAGE_MULTIPLIER = std(/* v1.20.3+ */ "fall_damage_multiplier", "GENERIC_FALL_DAMAGE_MULTIPLIER"),
57-
LUCK = std(/* v1.20.3+ */ "luck", "GENERIC_LUCK"),
58-
MAX_ABSORPTION = std(/* v1.20.3+ */ "max_absorption", "GENERIC_MAX_ABSORPTION"),
59-
SAFE_FALL_DISTANCE = std(/* v1.20.3+ */ "safe_fall_distance", "GENERIC_SAFE_FALL_DISTANCE"),
60-
SCALE = std(/* v1.20.3+ */ "scale", "GENERIC_SCALE"),
61-
STEP_HEIGHT = std(/* v1.20.3+ */ "step_height", "GENERIC_STEP_HEIGHT"),
62-
GRAVITY = std(/* v1.20.3+ */ "gravity", "GENERIC_GRAVITY"),
63-
JUMP_STRENGTH = std(/* v1.20.3+ */ "jump_strength", "GENERIC_JUMP_STRENGTH"),
64-
BURNING_TIME = std(/* v1.20.3+ */ "burning_time", "GENERIC_BURNING_TIME"),
65-
EXPLOSION_KNOCKBACK_RESISTANCE = std(/* v1.20.3+ */ "explosion_knockback_resistance", "GENERIC_EXPLOSION_KNOCKBACK_RESISTANCE"),
66-
MOVEMENT_EFFICIENCY = std(/* v1.20.3+ */ "movement_efficiency", "GENERIC_MOVEMENT_EFFICIENCY"),
67-
OXYGEN_BONUS = std(/* v1.20.3+ */ "oxygen_bonus", "GENERIC_OXYGEN_BONUS"),
68-
WATER_MOVEMENT_EFFICIENCY = std(/* v1.20.3+ */ "water_movement_efficiency", "GENERIC_WATER_MOVEMENT_EFFICIENCY"),
69-
TEMPT_RANGE = std(/* v1.20.3+ */ "tempt_range", "GENERIC_TEMPT_RANGE"),
70-
BLOCK_INTERACTION_RANGE = std(/* v1.20.3+ */ "block_interaction_range", "PLAYER_BLOCK_INTERACTION_RANGE"),
71-
ENTITY_INTERACTION_RANGE = std(/* v1.20.3+ */ "entity_interaction_range", "PLAYER_ENTITY_INTERACTION_RANGE"),
72-
BLOCK_BREAK_SPEED = std(/* v1.20.3+ */ "block_break_speed", "PLAYER_BLOCK_BREAK_SPEED"),
73-
MINING_EFFICIENCY = std(/* v1.20.3+ */ "mining_efficiency", "PLAYER_MINING_EFFICIENCY"),
74-
SNEAKING_SPEED = std(/* v1.20.3+ */ "sneaking_speed", "PLAYER_SNEAKING_SPEED"),
75-
SUBMERGED_MINING_SPEED = std(/* v1.20.3+ */ "submerged_mining_speed", "PLAYER_SUBMERGED_MINING_SPEED"),
76-
SWEEPING_DAMAGE_RATIO = std(/* v1.20.3+ */ "sweeping_damage_ratio", "PLAYER_SWEEPING_DAMAGE_RATIO"),
77-
SPAWN_REINFORCEMENTS = std(/* v1.20.3+ */ "spawn_reinforcements", "ZOMBIE_SPAWN_REINFORCEMENTS");
46+
MAX_HEALTH = std(/* v1.20.3+ */ "max_health", "generic.max_health"),
47+
FOLLOW_RANGE = std(/* v1.20.3+ */ "follow_range", "generic.follow_range"),
48+
KNOCKBACK_RESISTANCE = std(/* v1.20.3+ */ "knockback_resistance", "generic.knockback_resistance"),
49+
MOVEMENT_SPEED = std(/* v1.20.3+ */ "movement_speed", "generic.movement_speed"),
50+
FLYING_SPEED = std(/* v1.20.3+ */ "flying_speed", "generic.flying_speed"),
51+
ATTACK_DAMAGE = std(/* v1.20.3+ */ "attack_damage", "generic.attack_damage"),
52+
ATTACK_KNOCKBACK = std(/* v1.20.3+ */ "attack_knockback", "generic.attack_knockback"),
53+
ATTACK_SPEED = std(/* v1.20.3+ */ "attack_speed", "generic.attack_speed"),
54+
ARMOR = std(/* v1.20.3+ */ "armor", "generic.armor"),
55+
ARMOR_TOUGHNESS = std(/* v1.20.3+ */ "armor_toughness", "generic.armor_toughness"),
56+
FALL_DAMAGE_MULTIPLIER = std(/* v1.20.3+ */ "fall_damage_multiplier", "generic.fall_damage_multiplier"),
57+
LUCK = std(/* v1.20.3+ */ "luck", "generic.luck"),
58+
MAX_ABSORPTION = std(/* v1.20.3+ */ "max_absorption", "generic.max_absorption"),
59+
SAFE_FALL_DISTANCE = std(/* v1.20.3+ */ "safe_fall_distance", "generic.safe_fall_distance"),
60+
SCALE = std(/* v1.20.3+ */ "scale", "generic.scale"),
61+
STEP_HEIGHT = std(/* v1.20.3+ */ "step_height", "generic.step_height"),
62+
GRAVITY = std(/* v1.20.3+ */ "gravity", "generic.gravity"),
63+
JUMP_STRENGTH = std(/* v1.20.3+ */ "jump_strength", "generic.jump_strength", /* 1.13+? */ "horse.jump_strength"),
64+
BURNING_TIME = std(/* v1.20.3+ */ "burning_time", "generic.burning_time"),
65+
EXPLOSION_KNOCKBACK_RESISTANCE = std(/* v1.20.3+ */ "explosion_knockback_resistance", "generic.explosion_knockback_resistance"),
66+
MOVEMENT_EFFICIENCY = std(/* v1.20.3+ */ "movement_efficiency", "generic.movement_efficiency"),
67+
OXYGEN_BONUS = std(/* v1.20.3+ */ "oxygen_bonus", "generic.oxygen_bonus"),
68+
WATER_MOVEMENT_EFFICIENCY = std(/* v1.20.3+ */ "water_movement_efficiency", "generic.water_movement_efficiency"),
69+
TEMPT_RANGE = std(/* v1.20.3+ */ "tempt_range", "generic.tempt_range"),
70+
BLOCK_INTERACTION_RANGE = std(/* v1.20.3+ */ "block_interaction_range", "player.block_interaction_range"),
71+
ENTITY_INTERACTION_RANGE = std(/* v1.20.3+ */ "entity_interaction_range", "player.entity_interaction_range"),
72+
BLOCK_BREAK_SPEED = std(/* v1.20.3+ */ "block_break_speed", "player.block_break_speed"),
73+
MINING_EFFICIENCY = std(/* v1.20.3+ */ "mining_efficiency", "player.mining_efficiency"),
74+
SNEAKING_SPEED = std(/* v1.20.3+ */ "sneaking_speed", "player.sneaking_speed"),
75+
SUBMERGED_MINING_SPEED = std(/* v1.20.3+ */ "submerged_mining_speed", "player.submerged_mining_speed"),
76+
SWEEPING_DAMAGE_RATIO = std(/* v1.20.3+ */ "sweeping_damage_ratio", "player.sweeping_damage_ratio"),
77+
SPAWN_REINFORCEMENTS = std(/* v1.20.3+ */ "spawn_reinforcements", "zombie.spawn_reinforcements");
7878

7979
private static final boolean SUPPORTS_MODERN_MODIFIERS;
8080

0 commit comments

Comments
 (0)