diff --git a/pom.xml b/pom.xml
index bcb9443dd..12d9ea103 100644
--- a/pom.xml
+++ b/pom.xml
@@ -175,7 +175,7 @@
org.spigotmc
spigot-api
- 1.20.2-R0.1-SNAPSHOT
+ 1.20.4-R0.1-SNAPSHOT
diff --git a/src/main/java/com/laytonsmith/abstraction/blocks/MCMaterial.java b/src/main/java/com/laytonsmith/abstraction/blocks/MCMaterial.java
index 6c5ed39ad..244713343 100644
--- a/src/main/java/com/laytonsmith/abstraction/blocks/MCMaterial.java
+++ b/src/main/java/com/laytonsmith/abstraction/blocks/MCMaterial.java
@@ -258,7 +258,8 @@ public enum MCVanillaMaterial {
CHISELED_SANDSTONE,
CUT_SANDSTONE,
COBWEB,
- GRASS,
+ GRASS(MCVersion.MC1_0, MCVersion.MC1_20_2),
+ SHORT_GRASS(MCVersion.MC1_20_X), // changed from GRASS
FERN,
DEAD_BUSH,
SEAGRASS,
@@ -1390,6 +1391,7 @@ public enum MCVanillaMaterial {
SPYGLASS(MCVersion.MC1_17),
TINTED_GLASS(MCVersion.MC1_17),
TUFF(MCVersion.MC1_17),
+ GRASS_PATH(MCVersion.MC1_9, MCVersion.MC1_16_X),
DIRT_PATH(MCVersion.MC1_17), // changed from GRASS_PATH
WATER_CAULDRON(MCVersion.MC1_17),
LAVA_CAULDRON(MCVersion.MC1_17),
@@ -1579,20 +1581,87 @@ public enum MCVanillaMaterial {
SHEAF_POTTERY_SHERD(MCVersion.MC1_20),
SHELTER_POTTERY_SHERD(MCVersion.MC1_20),
SKULL_POTTERY_SHERD(MCVersion.MC1_20),
- SNORT_POTTERY_SHERD(MCVersion.MC1_20);
+ SNORT_POTTERY_SHERD(MCVersion.MC1_20),
+
+ // 1.20.3 experimental additions for 1.21
+ CRAFTER(MCVersion.MC1_20_X),
+ CHISELED_COPPER(MCVersion.MC1_20_X),
+ EXPOSED_CHISELED_COPPER(MCVersion.MC1_20_X),
+ WEATHERED_CHISELED_COPPER(MCVersion.MC1_20_X),
+ OXIDIZED_CHISELED_COPPER(MCVersion.MC1_20_X),
+ WAXED_CHISELED_COPPER(MCVersion.MC1_20_X),
+ WAXED_EXPOSED_CHISELED_COPPER(MCVersion.MC1_20_X),
+ WAXED_WEATHERED_CHISELED_COPPER(MCVersion.MC1_20_X),
+ WAXED_OXIDIZED_CHISELED_COPPER(MCVersion.MC1_20_X),
+ COPPER_BULB(MCVersion.MC1_20_X),
+ EXPOSED_COPPER_BULB(MCVersion.MC1_20_X),
+ WEATHERED_COPPER_BULB(MCVersion.MC1_20_X),
+ OXIDIZED_COPPER_BULB(MCVersion.MC1_20_X),
+ WAXED_COPPER_BULB(MCVersion.MC1_20_X),
+ WAXED_EXPOSED_COPPER_BULB(MCVersion.MC1_20_X),
+ WAXED_WEATHERED_COPPER_BULB(MCVersion.MC1_20_X),
+ WAXED_OXIDIZED_COPPER_BULB(MCVersion.MC1_20_X),
+ COPPER_DOOR(MCVersion.MC1_20_X),
+ EXPOSED_COPPER_DOOR(MCVersion.MC1_20_X),
+ WEATHERED_COPPER_DOOR(MCVersion.MC1_20_X),
+ OXIDIZED_COPPER_DOOR(MCVersion.MC1_20_X),
+ WAXED_COPPER_DOOR(MCVersion.MC1_20_X),
+ WAXED_EXPOSED_COPPER_DOOR(MCVersion.MC1_20_X),
+ WAXED_WEATHERED_COPPER_DOOR(MCVersion.MC1_20_X),
+ WAXED_OXIDIZED_COPPER_DOOR(MCVersion.MC1_20_X),
+ COPPER_GRATE(MCVersion.MC1_20_X),
+ EXPOSED_COPPER_GRATE(MCVersion.MC1_20_X),
+ WEATHERED_COPPER_GRATE(MCVersion.MC1_20_X),
+ OXIDIZED_COPPER_GRATE(MCVersion.MC1_20_X),
+ WAXED_COPPER_GRATE(MCVersion.MC1_20_X),
+ WAXED_EXPOSED_COPPER_GRATE(MCVersion.MC1_20_X),
+ WAXED_WEATHERED_COPPER_GRATE(MCVersion.MC1_20_X),
+ WAXED_OXIDIZED_COPPER_GRATE(MCVersion.MC1_20_X),
+ COPPER_TRAPDOOR(MCVersion.MC1_20_X),
+ EXPOSED_COPPER_TRAPDOOR(MCVersion.MC1_20_X),
+ WEATHERED_COPPER_TRAPDOOR(MCVersion.MC1_20_X),
+ OXIDIZED_COPPER_TRAPDOOR(MCVersion.MC1_20_X),
+ WAXED_COPPER_TRAPDOOR(MCVersion.MC1_20_X),
+ WAXED_EXPOSED_COPPER_TRAPDOOR(MCVersion.MC1_20_X),
+ WAXED_WEATHERED_COPPER_TRAPDOOR(MCVersion.MC1_20_X),
+ WAXED_OXIDIZED_COPPER_TRAPDOOR(MCVersion.MC1_20_X),
+ BREEZE_SPAWN_EGG(MCVersion.MC1_20_X),
+ TRIAL_SPAWNER(MCVersion.MC1_20_X),
+ TRIAL_KEY(MCVersion.MC1_20_X),
+ TUFF_BRICKS(MCVersion.MC1_20_X),
+ TUFF_BRICK_SLAB(MCVersion.MC1_20_X),
+ TUFF_BRICK_STAIRS(MCVersion.MC1_20_X),
+ TUFF_BRICK_WALL(MCVersion.MC1_20_X),
+ TUFF_SLAB(MCVersion.MC1_20_X),
+ TUFF_STAIRS(MCVersion.MC1_20_X),
+ TUFF_WALL(MCVersion.MC1_20_X),
+ CHISELED_TUFF(MCVersion.MC1_20_X),
+ POLISHED_TUFF(MCVersion.MC1_20_X),
+ CHISELED_TUFF_BRICKS(MCVersion.MC1_20_X),
+ POLISHED_TUFF_SLAB(MCVersion.MC1_20_X),
+ POLISHED_TUFF_STAIRS(MCVersion.MC1_20_X),
+ POLISHED_TUFF_WALL(MCVersion.MC1_20_X);
private final MCVersion since;
+ private final MCVersion until;
MCVanillaMaterial() {
this.since = MCVersion.MC1_0;
+ this.until = MCVersion.FUTURE;
+ }
+
+ MCVanillaMaterial(MCVersion since) {
+ this.since = since;
+ this.until = MCVersion.FUTURE;
}
- MCVanillaMaterial(MCVersion ver) {
- this.since = ver;
+ MCVanillaMaterial(MCVersion since, MCVersion until) {
+ this.since = since;
+ this.until = until;
}
public boolean existsIn(MCVersion version) {
- return version.gte(since);
+ return version.gte(since) && version.lte(until);
}
}
}
diff --git a/src/main/java/com/laytonsmith/abstraction/bukkit/entities/BukkitMCPlayer.java b/src/main/java/com/laytonsmith/abstraction/bukkit/entities/BukkitMCPlayer.java
index 841139c92..30a0e5b20 100644
--- a/src/main/java/com/laytonsmith/abstraction/bukkit/entities/BukkitMCPlayer.java
+++ b/src/main/java/com/laytonsmith/abstraction/bukkit/entities/BukkitMCPlayer.java
@@ -406,25 +406,28 @@ public MCEntity getSpectatorTarget() {
@Override
public void setTempOp(Boolean value) throws ClassNotFoundException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException, NoSuchMethodException, InvocationTargetException {
- // Get some version specific strings
+ // Get some version specific mappings
String nms = "net.minecraft.server";
String playersPackage = nms + ".players";
String ops = "p";
- String getPlayerList = "ac";
+ String getPlayerList = "ae";
MCVersion mcversion = Static.getServer().getMinecraftVersion();
- if(mcversion.lt(MCVersion.MC1_20_2)) {
- ops = "o";
- if(mcversion.equals(MCVersion.MC1_19_3)) {
- getPlayerList = "ab";
- } else if(mcversion.lt(MCVersion.MC1_19_1)) {
- ops = "n";
- if(mcversion.lt(MCVersion.MC1_18)) {
- getPlayerList = "getPlayerList";
- if(mcversion.lt(MCVersion.MC1_17)) {
- String version = ((BukkitMCServer) Static.getServer()).getCraftBukkitPackage().split("\\.")[3];
- nms = "net.minecraft.server." + version;
- playersPackage = nms;
- ops = "operators";
+ if(mcversion.lt(MCVersion.MC1_20_X)) {
+ getPlayerList = "ac";
+ if(mcversion.lt(MCVersion.MC1_20_2)) {
+ ops = "o";
+ if(mcversion.equals(MCVersion.MC1_19_3)) {
+ getPlayerList = "ab";
+ } else if(mcversion.lt(MCVersion.MC1_19_1)) {
+ ops = "n";
+ if(mcversion.lt(MCVersion.MC1_18)) {
+ getPlayerList = "getPlayerList";
+ if(mcversion.lt(MCVersion.MC1_17)) {
+ String version = ((BukkitMCServer) Static.getServer()).getCraftBukkitPackage().split("\\.")[3];
+ nms = "net.minecraft.server." + version;
+ playersPackage = nms;
+ ops = "operators";
+ }
}
}
}
diff --git a/src/main/java/com/laytonsmith/abstraction/enums/MCEntityEffect.java b/src/main/java/com/laytonsmith/abstraction/enums/MCEntityEffect.java
index 5bda4a8bf..3c3edbcb1 100644
--- a/src/main/java/com/laytonsmith/abstraction/enums/MCEntityEffect.java
+++ b/src/main/java/com/laytonsmith/abstraction/enums/MCEntityEffect.java
@@ -6,9 +6,14 @@
public enum MCEntityEffect {
ARROW_PARTICLES,
RABBIT_JUMP,
- DEATH,
+ DEATH, // deprecated for EGG_BREAK, SNOWBALL_BREAK, ENTITY_DEATH
+ EGG_BREAK,
+ SNOWBALL_BREAK,
+ ENTITY_DEATH,
HURT,
- SHEEP_EAT,
+ SHEEP_EAT, // deprecated for SHEEP_EAT_GRASS, TNT_MINECART_IGNITE
+ SHEEP_EAT_GRASS,
+ TNT_MINECART_IGNITE,
WOLF_HEARTS,
WOLF_SHAKE,
WOLF_SMOKE,
@@ -45,5 +50,21 @@ public enum MCEntityEffect {
BREAK_EQUIPMENT_HELMET,
BREAK_EQUIPMENT_CHESTPLATE,
BREAK_EQUIPMENT_LEGGINGS,
- BREAK_EQUIPMENT_BOOTS
+ BREAK_EQUIPMENT_BOOTS,
+ RESET_SPAWNER_MINECART_DELAY,
+ FANG_ATTACK,
+ HOGLIN_ATTACK,
+ RAVAGER_ATTACK,
+ WARDEN_ATTACK,
+ ZOGLIN_ATTACK,
+ HONEY_BLOCK_SLIDE_PARTICLES,
+ HONEY_BLOCK_FALL_PARTICLES,
+ SWAP_HAND_ITEMS,
+ WOLF_SHAKE_STOP,
+ GOAT_LOWER_HEAD,
+ GOAT_RAISE_HEAD,
+ SPAWN_DEATH_SMOKE,
+ WARDEN_TENDRIL_SHAKE,
+ WARDEN_SONIC_ATTACK,
+ SNIFFER_DIG,
}
diff --git a/src/main/java/com/laytonsmith/abstraction/enums/MCEntityType.java b/src/main/java/com/laytonsmith/abstraction/enums/MCEntityType.java
index 5197668fd..3d81b1c3d 100644
--- a/src/main/java/com/laytonsmith/abstraction/enums/MCEntityType.java
+++ b/src/main/java/com/laytonsmith/abstraction/enums/MCEntityType.java
@@ -131,6 +131,7 @@ public enum MCVanillaEntityType {
BLAZE,
BLOCK_DISPLAY(true, false, MCVersion.MC1_19_X),
BOAT,
+ BREEZE(true, false, MCVersion.MC1_20_X),
CAMEL(true, false, MCVersion.MC1_19_3),
CAT(true, false, MCVersion.MC1_14),
CAVE_SPIDER,
@@ -235,6 +236,7 @@ public enum MCVanillaEntityType {
VINDICATOR,
WANDERING_TRADER(true, false, MCVersion.MC1_14),
WARDEN(true, false, MCVersion.MC1_19),
+ WIND_CHARGE(true, true, MCVersion.MC1_20_X),
WITCH,
WITHER,
WITHER_SKELETON,
diff --git a/src/main/java/com/laytonsmith/abstraction/enums/MCGameRule.java b/src/main/java/com/laytonsmith/abstraction/enums/MCGameRule.java
index a2cd1b5c9..bd65e0ab8 100644
--- a/src/main/java/com/laytonsmith/abstraction/enums/MCGameRule.java
+++ b/src/main/java/com/laytonsmith/abstraction/enums/MCGameRule.java
@@ -38,11 +38,15 @@ public enum MCGameRule {
LAVASOURCECONVERSION("lavaSourceConversion"),
LOGADMINCOMMANDS("logAdminCommands"),
MAXCOMMANDCHAINLENGTH("maxCommandChainLength", CInt.class),
+ MAXCOMMANDFORKCOUNT("maxCommandForkCount", CInt.class),
MAXENTITYCRAMMING("maxEntityCramming", CInt.class),
MOBEXPLOSIONDROPDECAY("mobExplosionDropDecay"),
MOBGRIEFING("mobGriefing"),
NATURALREGENERATION("naturalRegeneration"),
+ PLAYERSNETHERPORTALCREATIVEDELAY("playersNetherPortalCreativeDelay", CInt.class),
+ PLAYERSNETHERPORTALDEFAULTDELAY("playersNetherPortalDefaultDelay", CInt.class),
PLAYERSSLEEPINGPERCENTAGE("playersSleepingPercentage", CInt.class),
+ PROJECTILESCANBREAKBLOCKS("projectilesCanBreakBlocks"),
RANDOMTICKSPEED("randomTickSpeed", CInt.class),
REDUCEDDEBUGINFO("reducedDebugInfo"),
SENDCOMMANDFEEDBACK("sendCommandFeedback"),
diff --git a/src/main/java/com/laytonsmith/abstraction/enums/MCInventoryType.java b/src/main/java/com/laytonsmith/abstraction/enums/MCInventoryType.java
index fc960c628..f29ea1734 100644
--- a/src/main/java/com/laytonsmith/abstraction/enums/MCInventoryType.java
+++ b/src/main/java/com/laytonsmith/abstraction/enums/MCInventoryType.java
@@ -31,7 +31,8 @@ public enum MCInventoryType {
CARTOGRAPHY(false),
GRINDSTONE(false),
STONECUTTER(false),
- CHISELED_BOOKSHELF(false);
+ CHISELED_BOOKSHELF(false),
+ CRAFTER(false);
// Whether or not this inventory type can be created and used virtually
private final boolean canVirtualize;
diff --git a/src/main/java/com/laytonsmith/abstraction/enums/MCParticle.java b/src/main/java/com/laytonsmith/abstraction/enums/MCParticle.java
index 8524e8907..7897df9e8 100644
--- a/src/main/java/com/laytonsmith/abstraction/enums/MCParticle.java
+++ b/src/main/java/com/laytonsmith/abstraction/enums/MCParticle.java
@@ -184,6 +184,12 @@ public enum MCVanillaParticle {
LANDING_CHERRY_LEAVES(MCVersion.MC1_19_X, MCVersion.MC1_19_X),
CHERRY_LEAVES(MCVersion.MC1_20),
EGG_CRACK(MCVersion.MC1_20),
+ DUST_PLUME(MCVersion.MC1_20_X),
+ WHITE_SMOKE(MCVersion.MC1_20_X),
+ GUST(MCVersion.MC1_20_X),
+ GUST_EMITTER(MCVersion.MC1_20_X),
+ GUST_DUST(MCVersion.MC1_20_X),
+ TRIAL_SPAWNER_DETECTION(MCVersion.MC1_20_X),
UNKNOWN(MCVersion.NEVER);
private final MCVersion since;
diff --git a/src/main/java/com/laytonsmith/abstraction/enums/MCResourcePackStatus.java b/src/main/java/com/laytonsmith/abstraction/enums/MCResourcePackStatus.java
index 2329fc1f6..17ba5ec03 100644
--- a/src/main/java/com/laytonsmith/abstraction/enums/MCResourcePackStatus.java
+++ b/src/main/java/com/laytonsmith/abstraction/enums/MCResourcePackStatus.java
@@ -6,6 +6,10 @@
public enum MCResourcePackStatus {
ACCEPTED,
DECLINED,
+ DISCARDED,
+ DOWNLOADED,
FAILED_DOWNLOAD,
+ FAILED_RELOAD,
+ INVALID_URL,
SUCCESSFULLY_LOADED
}
diff --git a/src/main/java/com/laytonsmith/abstraction/enums/MCSound.java b/src/main/java/com/laytonsmith/abstraction/enums/MCSound.java
index 5082b302a..618d40a6f 100644
--- a/src/main/java/com/laytonsmith/abstraction/enums/MCSound.java
+++ b/src/main/java/com/laytonsmith/abstraction/enums/MCSound.java
@@ -1581,6 +1581,62 @@ public enum MCVanillaSound {
BLOCK_WET_SPONGE_PLACE(MCVersion.MC1_20_2),
BLOCK_WET_SPONGE_STEP(MCVersion.MC1_20_2),
+ // 1.20.3 additions
+ BLOCK_COPPER_BULB_BREAK(MCVersion.MC1_20_X),
+ BLOCK_COPPER_BULB_FALL(MCVersion.MC1_20_X),
+ BLOCK_COPPER_BULB_HIT(MCVersion.MC1_20_X),
+ BLOCK_COPPER_BULB_PLACE(MCVersion.MC1_20_X),
+ BLOCK_COPPER_BULB_STEP(MCVersion.MC1_20_X),
+ BLOCK_COPPER_BULB_TURN_OFF(MCVersion.MC1_20_X),
+ BLOCK_COPPER_BULB_TURN_ON(MCVersion.MC1_20_X),
+ BLOCK_COPPER_DOOR_CLOSE(MCVersion.MC1_20_X),
+ BLOCK_COPPER_DOOR_OPEN(MCVersion.MC1_20_X),
+ BLOCK_COPPER_GRATE_BREAK(MCVersion.MC1_20_X),
+ BLOCK_COPPER_GRATE_FALL(MCVersion.MC1_20_X),
+ BLOCK_COPPER_GRATE_HIT(MCVersion.MC1_20_X),
+ BLOCK_COPPER_GRATE_PLACE(MCVersion.MC1_20_X),
+ BLOCK_COPPER_GRATE_STEP(MCVersion.MC1_20_X),
+ BLOCK_COPPER_TRAPDOOR_CLOSE(MCVersion.MC1_20_X),
+ BLOCK_COPPER_TRAPDOOR_OPEN(MCVersion.MC1_20_X),
+ BLOCK_CRAFTER_CRAFT(MCVersion.MC1_20_X),
+ BLOCK_CRAFTER_FAIL(MCVersion.MC1_20_X),
+ BLOCK_DECORATED_POT_INSERT(MCVersion.MC1_20_X),
+ BLOCK_DECORATED_POT_INSERT_FAIL(MCVersion.MC1_20_X),
+ BLOCK_HANGING_SIGN_WAXED_INTERACT_FAIL(MCVersion.MC1_20_X),
+ BLOCK_POLISHED_TUFF_BREAK(MCVersion.MC1_20_X),
+ BLOCK_POLISHED_TUFF_FALL(MCVersion.MC1_20_X),
+ BLOCK_POLISHED_TUFF_HIT(MCVersion.MC1_20_X),
+ BLOCK_POLISHED_TUFF_PLACE(MCVersion.MC1_20_X),
+ BLOCK_POLISHED_TUFF_STEP(MCVersion.MC1_20_X),
+ BLOCK_TRIAL_SPAWNER_AMBIENT(MCVersion.MC1_20_X),
+ BLOCK_TRIAL_SPAWNER_BREAK(MCVersion.MC1_20_X),
+ BLOCK_TRIAL_SPAWNER_CLOSE_SHUTTER(MCVersion.MC1_20_X),
+ BLOCK_TRIAL_SPAWNER_DETECT_PLAYER(MCVersion.MC1_20_X),
+ BLOCK_TRIAL_SPAWNER_EJECT_ITEM(MCVersion.MC1_20_X),
+ BLOCK_TRIAL_SPAWNER_FALL(MCVersion.MC1_20_X),
+ BLOCK_TRIAL_SPAWNER_HIT(MCVersion.MC1_20_X),
+ BLOCK_TRIAL_SPAWNER_OPEN_SHUTTER(MCVersion.MC1_20_X),
+ BLOCK_TRIAL_SPAWNER_PLACE(MCVersion.MC1_20_X),
+ BLOCK_TRIAL_SPAWNER_SPAWN_MOB(MCVersion.MC1_20_X),
+ BLOCK_TRIAL_SPAWNER_STEP(MCVersion.MC1_20_X),
+ BLOCK_TUFF_BRICKS_BREAK(MCVersion.MC1_20_X),
+ BLOCK_TUFF_BRICKS_FALL(MCVersion.MC1_20_X),
+ BLOCK_TUFF_BRICKS_HIT(MCVersion.MC1_20_X),
+ BLOCK_TUFF_BRICKS_PLACE(MCVersion.MC1_20_X),
+ BLOCK_TUFF_BRICKS_STEP(MCVersion.MC1_20_X),
+ ENTITY_BREEZE_DEATH(MCVersion.MC1_20_X),
+ ENTITY_BREEZE_HURT(MCVersion.MC1_20_X),
+ ENTITY_BREEZE_IDLE_AIR(MCVersion.MC1_20_X),
+ ENTITY_BREEZE_IDLE_GROUND(MCVersion.MC1_20_X),
+ ENTITY_BREEZE_INHALE(MCVersion.MC1_20_X),
+ ENTITY_BREEZE_JUMP(MCVersion.MC1_20_X),
+ ENTITY_BREEZE_LAND(MCVersion.MC1_20_X),
+ ENTITY_BREEZE_SHOOT(MCVersion.MC1_20_X),
+ ENTITY_BREEZE_SLIDE(MCVersion.MC1_20_X),
+ ENTITY_GENERIC_WIND_BURST(MCVersion.MC1_20_X),
+ ENTITY_PARROT_IMITATE_BREEZE(MCVersion.MC1_20_X),
+ ENTITY_PLAYER_TELEPORT(MCVersion.MC1_20_X),
+
UNKNOWN(MCVersion.NEVER);
private final MCVersion since;
diff --git a/src/main/java/com/laytonsmith/abstraction/enums/bukkit/BukkitMCLegacyMaterial.java b/src/main/java/com/laytonsmith/abstraction/enums/bukkit/BukkitMCLegacyMaterial.java
index c2c7847f2..0963361df 100644
--- a/src/main/java/com/laytonsmith/abstraction/enums/bukkit/BukkitMCLegacyMaterial.java
+++ b/src/main/java/com/laytonsmith/abstraction/enums/bukkit/BukkitMCLegacyMaterial.java
@@ -500,7 +500,8 @@ public enum LegacyMaterialName {
POTTERY_SHARD_ARCHER("ARCHER_POTTERY_SHERD", MCVersion.MC1_20),
POTTERY_SHARD_ARMS_UP("ARMS_UP_POTTERY_SHERD", MCVersion.MC1_20),
POTTERY_SHARD_PRIZE("PRIZE_POTTERY_SHERD", MCVersion.MC1_20),
- POTTERY_SHARD_SKULL("SKULL_POTTERY_SHERD", MCVersion.MC1_20);
+ POTTERY_SHARD_SKULL("SKULL_POTTERY_SHERD", MCVersion.MC1_20),
+ GRASS("SHORT_GRASS", MCVersion.MC1_20_X);
private final String mat;
private final MCVersion version;
@@ -543,10 +544,13 @@ public static Material getMaterial(int id) {
}
public static Material getMaterial(String name) {
- Material mat = Material.getMaterial(name, true);
- // we should never get air here since we're checking for legacy materials only
- if(mat == null || mat == Material.AIR) {
- mat = BY_NAME.get(name);
+ Material mat = BY_NAME.get(name);
+ if(mat == null) {
+ mat = Material.getMaterial(name, true);
+ // we should never get air here since we're checking for legacy materials only
+ if(mat == Material.AIR) {
+ return null;
+ }
}
return mat;
}
diff --git a/src/main/java/com/laytonsmith/core/events/prefilters/MaterialPrefilterMatcher.java b/src/main/java/com/laytonsmith/core/events/prefilters/MaterialPrefilterMatcher.java
index ee72bc7a6..1d2b37abd 100644
--- a/src/main/java/com/laytonsmith/core/events/prefilters/MaterialPrefilterMatcher.java
+++ b/src/main/java/com/laytonsmith/core/events/prefilters/MaterialPrefilterMatcher.java
@@ -3,7 +3,6 @@
import com.laytonsmith.PureUtilities.Version;
import com.laytonsmith.abstraction.blocks.MCMaterial;
import com.laytonsmith.abstraction.blocks.MCMaterial.MCVanillaMaterial;
-import com.laytonsmith.abstraction.enums.MCVersion;
import com.laytonsmith.annotations.api;
import com.laytonsmith.core.MSVersion;
import com.laytonsmith.core.ParseTree;
@@ -66,12 +65,7 @@ public void validate(ParseTree node, CClassType nodeType, Environment env)
throws ConfigCompileException, ConfigCompileGroupException, ConfigRuntimeException {
if(node.isConst() && !node.getData().equals(CNull.NULL)) {
try {
- MCVanillaMaterial mat = MCVanillaMaterial.valueOf(node.getData().val());
- if(!mat.existsIn(MCVersion.CURRENT)) {
- env.getEnv(CompilerEnvironment.class).addCompilerWarning(node.getFileOptions(),
- new CompilerWarning("\"" + node.getData() + "\" is no longer a valid material type",
- node.getTarget(), null));
- }
+ MCVanillaMaterial.valueOf(node.getData().val());
} catch (IllegalArgumentException ex) {
env.getEnv(CompilerEnvironment.class).addCompilerWarning(node.getFileOptions(),
new CompilerWarning("\"" + node.getData() + "\" is not a valid material type, this will never match."
diff --git a/src/main/java/com/laytonsmith/core/functions/EntityManagement.java b/src/main/java/com/laytonsmith/core/functions/EntityManagement.java
index 5e141bc2c..0d782290c 100644
--- a/src/main/java/com/laytonsmith/core/functions/EntityManagement.java
+++ b/src/main/java/com/laytonsmith/core/functions/EntityManagement.java
@@ -4993,7 +4993,7 @@ public Integer[] numArgs() {
public String docs() {
return "array {entityUUID} Returns an associative array of display entity data."
+ " Array keys are: 'billboard', 'brightness', 'glowcolor', 'height', 'width',"
- + " 'viewrange', 'shadowradius', and 'shadowstrength'. ---- "
+ + " 'viewrange', 'shadowradius', 'shadowstrength', and 'teleportduration'. ---- "
+ " The following values are common to all display entity types. Data about specific display entity"
+ " types (block, text, and item display entities) can be found in {{function|entity_spec}}."
+ " * '''billboard''' (string) : Controls which axes the rendered entity rotates around the entity"
diff --git a/src/main/resources/docs/Compatibility b/src/main/resources/docs/Compatibility
index e62c4a52e..0058a9075 100644
--- a/src/main/resources/docs/Compatibility
+++ b/src/main/resources/docs/Compatibility
@@ -3,7 +3,7 @@ with build 1498, so earlier builds may not be accurate. In general, the compatib
the same as the previous milestone build. The minimum requirements for the current builds are:
* Java 16
-* Spigot/Paper 1.16.5 - 1.20.2 (when CH is used as a plugin)
+* Spigot/Paper 1.16.5 - 1.20.4 (when CH is used as a plugin)
Also note that CommandHelper may still be backwards and forward compatible to a large degree, many of the advanced
features that normally have hard dependencies on certain versions of external dependencies have been configured to
diff --git a/src/test/java/com/laytonsmith/core/functions/EnchantmentsTest.java b/src/test/java/com/laytonsmith/core/functions/EnchantmentsTest.java
deleted file mode 100644
index a8c6ff18e..000000000
--- a/src/test/java/com/laytonsmith/core/functions/EnchantmentsTest.java
+++ /dev/null
@@ -1,77 +0,0 @@
-package com.laytonsmith.core.functions;
-
-import com.laytonsmith.abstraction.MCPlayer;
-import com.laytonsmith.abstraction.MCServer;
-import com.laytonsmith.core.Static;
-import com.laytonsmith.core.environments.CommandHelperEnvironment;
-import com.laytonsmith.testing.StaticTest;
-import static com.laytonsmith.testing.StaticTest.GetFakeServer;
-import static com.laytonsmith.testing.StaticTest.GetOnlinePlayer;
-import static com.laytonsmith.testing.StaticTest.InstallFakeServerFrontend;
-import static com.laytonsmith.testing.StaticTest.SRun;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import static org.mockito.Mockito.verify;
-//import org.powermock.core.classloader.annotations.PowerMockIgnore;
-//import org.powermock.core.classloader.annotations.PrepareForTest;
-//import org.powermock.modules.junit4.PowerMockRunner;
-
-/**
- *
- *
- */
-//@RunWith(PowerMockRunner.class)
-//@PrepareForTest(Static.class)
-//@PowerMockIgnore({"javax.xml.parsers.*", "com.sun.org.apache.xerces.internal.jaxp.*"})
-public class EnchantmentsTest {
-
- MCServer fakeServer;
- MCPlayer fakePlayer;
- com.laytonsmith.core.environments.Environment env;
-
- public EnchantmentsTest() throws Exception {
- InstallFakeServerFrontend();
- env = Static.GenerateStandaloneEnvironment();
- env = env.cloneAndAdd(new CommandHelperEnvironment());
- }
-
- @BeforeClass
- public static void setUpClass() throws Exception {
- }
-
- @AfterClass
- public static void tearDownClass() throws Exception {
- }
-
- @Before
- public void setUp() throws Exception {
- fakeServer = GetFakeServer();
- fakePlayer = GetOnlinePlayer(fakeServer);
- env.getEnv(CommandHelperEnvironment.class).SetPlayer(fakePlayer);
- StaticTest.InstallFakeConvertor(fakePlayer);
- Static.InjectPlayer(fakePlayer);
- }
-
- @After
- public void tearDown() {
- }
-
- @Test
- /**
- * This is an interesting test. Because the server implementation has to implement the individual enchantments, they
- * aren't implemented here, so everything returns an empty array. However, the test is more for testing array.clone
- * than the enchantments themselves.
- */
- public void testGetEnchants() throws Exception {
- SRun("assign(@a, get_enchants(array('name': 'DIAMOND_SWORD')))\n"
- + "array_push(@a, 'test')\n"
- + "assign(@b, get_enchants(array('name': 'DIAMOND_SWORD')))\n"
- + "msg(@a)\n"
- + "msg(@b)\n", fakePlayer);
- verify(fakePlayer).sendMessage("{test}");
- verify(fakePlayer).sendMessage("{}");
- }
-}
diff --git a/src/test/java/com/laytonsmith/testing/StaticTest.java b/src/test/java/com/laytonsmith/testing/StaticTest.java
index 15f25f5b9..93bd23a41 100644
--- a/src/test/java/com/laytonsmith/testing/StaticTest.java
+++ b/src/test/java/com/laytonsmith/testing/StaticTest.java
@@ -696,14 +696,12 @@ public Class GetServerEventMixin() {
@Override
public MCEnchantment[] GetEnchantmentValues() {
- Convertor c = new BukkitConvertor();
- return c.GetEnchantmentValues();
+ throw new UnsupportedOperationException();
}
@Override
public MCEnchantment GetEnchantmentByName(String name) {
- Convertor c = new BukkitConvertor();
- return c.GetEnchantmentByName(name);
+ throw new UnsupportedOperationException();
}
@Override