Update to Minecraft 1.18-pre5

By: md_5 <git@md-5.net>
This commit is contained in:
Bukkit/Spigot 2021-11-22 09:00:00 +11:00
parent aa5b69a0ea
commit 98195bb7a9
10 changed files with 133 additions and 59 deletions

View File

@ -5,7 +5,7 @@
<groupId>org.bukkit</groupId>
<artifactId>bukkit</artifactId>
<version>1.17.1-R0.1-SNAPSHOT</version>
<version>1.18-pre5-R0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Bukkit</name>
@ -41,14 +41,14 @@
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>21.0</version>
<version>31.0.1-jre</version>
<scope>compile</scope>
</dependency>
<!-- bundled with Minecraft, should be kept in sync -->
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.0</version>
<version>2.8.8</version>
<scope>compile</scope>
</dependency>
<dependency>
@ -136,7 +136,7 @@
<dependency>
<groupId>org.eclipse.jdt</groupId>
<artifactId>ecj</artifactId>
<version>3.26.0</version>
<version>3.27.0</version>
</dependency>
</dependencies>
</plugin>
@ -183,10 +183,10 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.3.0</version>
<version>3.3.1</version>
<configuration>
<links>
<link>https://guava.dev/releases/21.0/api/docs/</link>
<link>https://guava.dev/releases/31.0.1-jre/api/docs/</link>
<link>https://javadoc.io/doc/org.yaml/snakeyaml/1.28/</link>
<link>https://javadoc.io/doc/org.jetbrains/annotations-java5/21.0.1/</link>
</links>
@ -223,7 +223,7 @@
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>8.44</version>
<version>9.1</version>
</dependency>
</dependencies>
</plugin>

View File

@ -178,6 +178,15 @@ public final class Bukkit {
return server.getViewDistance();
}
/**
* Get the simulation distance from this server.
*
* @return the simulation distance from this server.
*/
public static int getSimulationDistance() {
return server.getSimulationDistance();
}
/**
* Get the IP that this server is bound to, or empty string if not
* specified.

View File

@ -442,7 +442,7 @@ public enum Material implements Keyed {
/**
* BlockData: {@link Leaves}
*/
FLOWERING_AZALEA_LEAVES(20893, Leaves.class),
FLOWERING_AZALEA_LEAVES(7139, Leaves.class),
SPONGE(15860),
WET_SPONGE(9043),
GLASS(6195),
@ -2400,12 +2400,13 @@ public enum Material implements Keyed {
MUSIC_DISC_WARD(24026, 1),
MUSIC_DISC_11(27426, 1),
MUSIC_DISC_WAIT(26499, 1),
MUSIC_DISC_OTHERSIDE(12974, 1),
MUSIC_DISC_PIGSTEP(21323, 1),
TRIDENT(7534, 1, 250),
PHANTOM_MEMBRANE(18398),
NAUTILUS_SHELL(19989),
HEART_OF_THE_SEA(11807),
CROSSBOW(4340, 1, 326),
CROSSBOW(4340, 1, 465),
SUSPICIOUS_STEW(8173, 1),
/**
* BlockData: {@link Directional}
@ -5201,6 +5202,7 @@ public enum Material implements Keyed {
case MUSIC_DISC_FAR:
case MUSIC_DISC_MALL:
case MUSIC_DISC_MELLOHI:
case MUSIC_DISC_OTHERSIDE:
case MUSIC_DISC_PIGSTEP:
case MUSIC_DISC_STAL:
case MUSIC_DISC_STRAD:

View File

@ -41,7 +41,6 @@ public enum Particle {
SNOW_SHOVEL,
SLIME,
HEART,
BARRIER,
ITEM_CRACK(ItemStack.class),
BLOCK_CRACK(BlockData.class),
BLOCK_DUST(BlockData.class),
@ -82,7 +81,6 @@ public enum Particle {
LANDING_OBSIDIAN_TEAR,
REVERSE_PORTAL,
WHITE_ASH,
LIGHT,
DUST_COLOR_TRANSITION(DustTransition.class),
VIBRATION(Vibration.class),
FALLING_SPORE_BLOSSOM,
@ -99,6 +97,7 @@ public enum Particle {
WAX_OFF,
ELECTRIC_SPARK,
SCRAPE,
BLOCK_MARKER(BlockData.class),
// ----- Legacy Separator -----
LEGACY_BLOCK_CRACK(MaterialData.class),
LEGACY_BLOCK_DUST(MaterialData.class),

View File

@ -149,6 +149,13 @@ public interface Server extends PluginMessageRecipient {
*/
public int getViewDistance();
/**
* Get the simulation distance from this server.
*
* @return the simulation distance from this server.
*/
public int getSimulationDistance();
/**
* Get the IP that this server is bound to, or empty string if not
* specified.

View File

@ -229,6 +229,7 @@ public enum Sound implements Keyed {
BLOCK_GRAVEL_PLACE("block.gravel.place"),
BLOCK_GRAVEL_STEP("block.gravel.step"),
BLOCK_GRINDSTONE_USE("block.grindstone.use"),
BLOCK_GROWING_PLANT_CROP("block.growing_plant.crop"),
BLOCK_HANGING_ROOTS_BREAK("block.hanging_roots.break"),
BLOCK_HANGING_ROOTS_FALL("block.hanging_roots.fall"),
BLOCK_HANGING_ROOTS_HIT("block.hanging_roots.hit"),
@ -1130,6 +1131,9 @@ public enum Sound implements Keyed {
ITEM_BUCKET_FILL_FISH("item.bucket.fill_fish"),
ITEM_BUCKET_FILL_LAVA("item.bucket.fill_lava"),
ITEM_BUCKET_FILL_POWDER_SNOW("item.bucket.fill_powder_snow"),
ITEM_BUNDLE_DROP_CONTENTS("item.bundle.drop_contents"),
ITEM_BUNDLE_INSERT("item.bundle.insert"),
ITEM_BUNDLE_REMOVE_ONE("item.bundle.remove_one"),
ITEM_CHORUS_FRUIT_TELEPORT("item.chorus_fruit.teleport"),
ITEM_CROP_PLANT("item.crop.plant"),
ITEM_CROSSBOW_HIT("item.crossbow.hit"),
@ -1175,6 +1179,7 @@ public enum Sound implements Keyed {
MUSIC_DISC_FAR("music_disc.far"),
MUSIC_DISC_MALL("music_disc.mall"),
MUSIC_DISC_MELLOHI("music_disc.mellohi"),
MUSIC_DISC_OTHERSIDE("music_disc.otherside"),
MUSIC_DISC_PIGSTEP("music_disc.pigstep"),
MUSIC_DISC_STAL("music_disc.stal"),
MUSIC_DISC_STRAD("music_disc.strad"),
@ -1189,6 +1194,14 @@ public enum Sound implements Keyed {
MUSIC_NETHER_NETHER_WASTES("music.nether.nether_wastes"),
MUSIC_NETHER_SOUL_SAND_VALLEY("music.nether.soul_sand_valley"),
MUSIC_NETHER_WARPED_FOREST("music.nether.warped_forest"),
MUSIC_OVERWORLD_DRIPSTONE_CAVES("music.overworld.dripstone_caves"),
MUSIC_OVERWORLD_FROZEN_PEAKS("music.overworld.frozen_peaks"),
MUSIC_OVERWORLD_GROVE("music.overworld.grove"),
MUSIC_OVERWORLD_JAGGED_PEAKS("music.overworld.jagged_peaks"),
MUSIC_OVERWORLD_LUSH_CAVES("music.overworld.lush_caves"),
MUSIC_OVERWORLD_MEADOW("music.overworld.meadow"),
MUSIC_OVERWORLD_SNOWY_SLOPES("music.overworld.snowy_slopes"),
MUSIC_OVERWORLD_STONY_PEAKS("music.overworld.stony_peaks"),
MUSIC_UNDER_WATER("music.under_water"),
PARTICLE_SOUL_ESCAPE("particle.soul_escape"),
UI_BUTTON_CLICK("ui.button.click"),

View File

@ -235,6 +235,10 @@ public interface Tag<T extends Keyed> extends Keyed {
* Vanilla block tag representing all dirt.
*/
Tag<Material> DIRT = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("dirt"), Material.class);
/**
* Vanilla block tag representing all terracotta.
*/
Tag<Material> TERRACOTTA = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("terracotta"), Material.class);
/**
* Vanilla block tag denoting blocks that enderman may pick up and hold.
*/
@ -332,7 +336,8 @@ public interface Tag<T extends Keyed> extends Keyed {
*/
Tag<Material> BEACON_BASE_BLOCKS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("beacon_base_blocks"), Material.class);
/**
* Vanilla block tag representing all blocks affected by the soul speed enchantment.
* Vanilla block tag representing all blocks affected by the soul speed
* enchantment.
*/
Tag<Material> SOUL_SPEED_BLOCKS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("soul_speed_blocks"), Material.class);
/**
@ -405,7 +410,8 @@ public interface Tag<T extends Keyed> extends Keyed {
*/
Tag<Material> STONE_ORE_REPLACEABLES = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("stone_ore_replaceables"), Material.class);
/**
* Vanilla block tag representing all blocks that may be replaced by deepslate ores.
* Vanilla block tag representing all blocks that may be replaced by
* deepslate ores.
*/
Tag<Material> DEEPSLATE_ORE_REPLACEABLES = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("deepslate_ore_replaceables"), Material.class);
/**
@ -433,7 +439,8 @@ public interface Tag<T extends Keyed> extends Keyed {
*/
Tag<Material> OCCLUDES_VIBRATION_SIGNALS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("occludes_vibration_signals"), Material.class);
/**
* Vanilla block tag representing all blocks that are replaceable by dripstone.
* Vanilla block tag representing all blocks that are replaceable by
* dripstone.
*/
Tag<Material> DRIPSTONE_REPLACEABLE = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("dripstone_replaceable_blocks"), Material.class);
/**
@ -449,9 +456,19 @@ public interface Tag<T extends Keyed> extends Keyed {
*/
Tag<Material> LUSH_GROUND_REPLACEABLE = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("lush_ground_replaceable"), Material.class);
/**
* Vanilla block tag representing all blocks which small dripleaf can be placed on.
* Vanilla block tag representing all blocks replaceable by azalea root.
*/
Tag<Material> AZALEA_ROOT_REPLACEABLE = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("azalea_root_replaceable"), Material.class);
/**
* Vanilla block tag representing all blocks which small dripleaf can be
* placed on.
*/
Tag<Material> SMALL_DRIPLEAF_PLACEABLE = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("small_dripleaf_placeable"), Material.class);
/**
* Vanilla block tag representing all blocks which big dripleaf can be
* placed on.
*/
Tag<Material> BIG_DRIPLEAF_PLACEABLE = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("big_dripleaf_placeable"), Material.class);
/**
* Vanilla block tag representing all snow blocks.
*/
@ -485,17 +502,64 @@ public interface Tag<T extends Keyed> extends Keyed {
*/
Tag<Material> NEEDS_STONE_TOOL = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("needs_stone_tool"), Material.class);
/**
* Vanilla block tag representing all blocks which will not be replaced by world generation features.
* Vanilla block tag representing all blocks which will not be replaced by
* world generation features.
*/
Tag<Material> FEATURES_CANNOT_REPLACE = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("features_cannot_replace"), Material.class);
/**
* Vanilla block tag representing all blocks which lava pools will not replace.
* Vanilla block tag representing all blocks which lava pools will not
* replace.
*/
Tag<Material> LAVA_POOL_STONE_CANNOT_REPLACE = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("lava_pool_stone_replaceables"), Material.class);
Tag<Material> LAVA_POOL_STONE_CANNOT_REPLACE = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("lava_pool_stone_cannot_replace"), Material.class);
/**
* Vanilla block tag representing all blocks which geodes will not spawn in.
*/
Tag<Material> GEODE_INVALID_BLOCKS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("geode_invalid_blocks"), Material.class);
/**
* Vanilla block tag representing all blocks which animals will spawn on.
*/
Tag<Material> ANIMALS_SPAWNABLE_ON = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("animals_spawnable_on"), Material.class);
/**
* Vanilla block tag representing all blocks which axolotls will spawn on.
*/
Tag<Material> AXOLOTLS_SPAWNABLE_ON = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("axolotls_spawnable_on"), Material.class);
/**
* Vanilla block tag representing all blocks which goats will spawn on.
*/
Tag<Material> GOATS_SPAWNABLE_ON = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("goats_spawnable_on"), Material.class);
/**
* Vanilla block tag representing all blocks which mooshrooms will spawn on.
*/
Tag<Material> MOOSHROOMS_SPAWNABLE_ON = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("mooshrooms_spawnable_on"), Material.class);
/**
* Vanilla block tag representing all blocks which parrots will spawn on.
*/
Tag<Material> PARROTS_SPAWNABLE_ON = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("parrots_spawnable_on"), Material.class);
/**
* Vanilla block tag representing all blocks which polar bears will spawn
* on.
*/
Tag<Material> POLAR_BEARS_SPAWNABLE_ON_IN_FROZEN_OCEAN = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("polar_bears_spawnable_on_in_frozen_ocean"), Material.class);
/**
* Vanilla block tag representing all blocks which rabbits will spawn on.
*/
Tag<Material> RABBITS_SPAWNABLE_ON = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("rabbits_spawnable_on"), Material.class);
/**
* Vanilla block tag representing all blocks which foxes will spawn on.
*/
Tag<Material> FOXES_SPAWNABLE_ON = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("foxes_spawnable_on"), Material.class);
/**
* Vanilla block tag representing all blocks which wolves will spawn on.
*/
Tag<Material> WOLVES_SPAWNABLE_ON = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("wolves_spawnable_on"), Material.class);
/**
* Vanilla block tag representing all blocks which azaleas will grow on.
*/
Tag<Material> AZALEA_GROWS_ON = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("azalea_grows_on"), Material.class);
/**
* Vanilla block tag representing all plant blocks which may be replaced.
*/
Tag<Material> REPLACEABLE_PLANTS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("replaceable_plants"), Material.class);
/**
* Key for the built in item registry.
*/

View File

@ -12,7 +12,7 @@ public enum Biome implements Keyed {
OCEAN,
PLAINS,
DESERT,
MOUNTAINS,
WINDSWEPT_HILLS,
FOREST,
TAIGA,
SWAMP,
@ -21,34 +21,23 @@ public enum Biome implements Keyed {
THE_END,
FROZEN_OCEAN,
FROZEN_RIVER,
SNOWY_TUNDRA,
SNOWY_MOUNTAINS,
SNOWY_PLAINS,
MUSHROOM_FIELDS,
MUSHROOM_FIELD_SHORE,
BEACH,
DESERT_HILLS,
WOODED_HILLS,
TAIGA_HILLS,
MOUNTAIN_EDGE,
JUNGLE,
JUNGLE_HILLS,
JUNGLE_EDGE,
SPARSE_JUNGLE,
DEEP_OCEAN,
STONE_SHORE,
STONY_SHORE,
SNOWY_BEACH,
BIRCH_FOREST,
BIRCH_FOREST_HILLS,
DARK_FOREST,
SNOWY_TAIGA,
SNOWY_TAIGA_HILLS,
GIANT_TREE_TAIGA,
GIANT_TREE_TAIGA_HILLS,
WOODED_MOUNTAINS,
OLD_GROWTH_PINE_TAIGA,
WINDSWEPT_FOREST,
SAVANNA,
SAVANNA_PLATEAU,
BADLANDS,
WOODED_BADLANDS_PLATEAU,
BADLANDS_PLATEAU,
WOODED_BADLANDS,
SMALL_END_ISLANDS,
END_MIDLANDS,
END_HIGHLANDS,
@ -56,40 +45,31 @@ public enum Biome implements Keyed {
WARM_OCEAN,
LUKEWARM_OCEAN,
COLD_OCEAN,
DEEP_WARM_OCEAN,
DEEP_LUKEWARM_OCEAN,
DEEP_COLD_OCEAN,
DEEP_FROZEN_OCEAN,
THE_VOID,
SUNFLOWER_PLAINS,
DESERT_LAKES,
GRAVELLY_MOUNTAINS,
WINDSWEPT_GRAVELLY_HILLS,
FLOWER_FOREST,
TAIGA_MOUNTAINS,
SWAMP_HILLS,
ICE_SPIKES,
MODIFIED_JUNGLE,
MODIFIED_JUNGLE_EDGE,
TALL_BIRCH_FOREST,
TALL_BIRCH_HILLS,
DARK_FOREST_HILLS,
SNOWY_TAIGA_MOUNTAINS,
GIANT_SPRUCE_TAIGA,
GIANT_SPRUCE_TAIGA_HILLS,
MODIFIED_GRAVELLY_MOUNTAINS,
SHATTERED_SAVANNA,
SHATTERED_SAVANNA_PLATEAU,
OLD_GROWTH_BIRCH_FOREST,
OLD_GROWTH_SPRUCE_TAIGA,
WINDSWEPT_SAVANNA,
ERODED_BADLANDS,
MODIFIED_WOODED_BADLANDS_PLATEAU,
MODIFIED_BADLANDS_PLATEAU,
BAMBOO_JUNGLE,
BAMBOO_JUNGLE_HILLS,
SOUL_SAND_VALLEY,
CRIMSON_FOREST,
WARPED_FOREST,
BASALT_DELTAS,
DRIPSTONE_CAVES,
LUSH_CAVES,
MEADOW,
GROVE,
SNOWY_SLOPES,
FROZEN_PEAKS,
JAGGED_PEAKS,
STONY_PEAKS,
/**
* Represents a custom Biome
*/

View File

@ -130,7 +130,7 @@ public interface Objective {
* @return Score tracking the Objective and entry specified
* @throws IllegalArgumentException if entry is null
* @throws IllegalStateException if this objective has been unregistered
* @throws IllegalArgumentException if entry is longer than 40 characters.
* @throws IllegalArgumentException if entry is longer than 32767 characters.
*/
@NotNull
Score getScore(@NotNull String entry) throws IllegalArgumentException, IllegalStateException;

View File

@ -17,7 +17,7 @@ public interface Scoreboard {
* @param criteria Criteria for the Objective
* @return The registered Objective
* @throws IllegalArgumentException if name is null
* @throws IllegalArgumentException if name is longer than 16
* @throws IllegalArgumentException if name is longer than 32767
* characters.
* @throws IllegalArgumentException if criteria is null
* @throws IllegalArgumentException if an objective by that name already
@ -36,7 +36,7 @@ public interface Scoreboard {
* @param displayName Name displayed to players for the Objective.
* @return The registered Objective
* @throws IllegalArgumentException if name is null
* @throws IllegalArgumentException if name is longer than 16
* @throws IllegalArgumentException if name is longer than 32767
* characters.
* @throws IllegalArgumentException if criteria is null
* @throws IllegalArgumentException if displayName is null
@ -57,7 +57,7 @@ public interface Scoreboard {
* @param renderType Manner of rendering the Objective
* @return The registered Objective
* @throws IllegalArgumentException if name is null
* @throws IllegalArgumentException if name is longer than 16
* @throws IllegalArgumentException if name is longer than 32767
* characters.
* @throws IllegalArgumentException if criteria is null
* @throws IllegalArgumentException if displayName is null