Update to Minecraft 1.20

By: md_5 <git@md-5.net>
This commit is contained in:
Bukkit/Spigot
2023-06-08 01:30:00 +10:00
parent 217583e495
commit 59e77b485a
49 changed files with 316 additions and 631 deletions

View File

@@ -1,9 +1,7 @@
package org.bukkit.entity;
import org.bukkit.Material;
import org.bukkit.MinecraftExperimental;
import org.bukkit.TreeSpecies;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;
/**
@@ -143,13 +141,9 @@ public interface Boat extends Vehicle {
BIRCH(Material.BIRCH_PLANKS),
JUNGLE(Material.JUNGLE_PLANKS),
ACACIA(Material.ACACIA_PLANKS),
@MinecraftExperimental
@ApiStatus.Experimental
CHERRY(Material.CHERRY_PLANKS),
DARK_OAK(Material.DARK_OAK_PLANKS),
MANGROVE(Material.MANGROVE_PLANKS),
@MinecraftExperimental
@ApiStatus.Experimental
BAMBOO(Material.BAMBOO_PLANKS),
;

View File

@@ -1,16 +1,8 @@
package org.bukkit.entity;
import org.bukkit.MinecraftExperimental;
import org.jetbrains.annotations.ApiStatus;
/**
* Represents a Camel.
*
* @apiNote This entity is part of an experimental feature of Minecraft and
* hence subject to change.
*/
@MinecraftExperimental
@ApiStatus.Experimental
public interface Camel extends AbstractHorse, Sittable {
/**

View File

@@ -6,7 +6,6 @@ import java.util.Map;
import org.bukkit.Bukkit;
import org.bukkit.Keyed;
import org.bukkit.Location;
import org.bukkit.MinecraftExperimental;
import org.bukkit.NamespacedKey;
import org.bukkit.Translatable;
import org.bukkit.World;
@@ -19,7 +18,6 @@ import org.bukkit.entity.minecart.SpawnerMinecart;
import org.bukkit.entity.minecart.StorageMinecart;
import org.bukkit.inventory.ItemStack;
import org.bukkit.potion.PotionEffectType;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.Contract;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -280,14 +278,10 @@ public enum EntityType implements Keyed, Translatable {
FROG("frog", Frog.class, -1),
TADPOLE("tadpole", Tadpole.class, -1),
WARDEN("warden", Warden.class, -1),
@MinecraftExperimental
@ApiStatus.Experimental
CAMEL("camel", Camel.class, -1),
BLOCK_DISPLAY("block_display", BlockDisplay.class, -1),
INTERACTION("interaction", Interaction.class, -1),
ITEM_DISPLAY("item_display", ItemDisplay.class, -1),
@MinecraftExperimental
@ApiStatus.Experimental
SNIFFER("sniffer", Sniffer.class, -1),
TEXT_DISPLAY("text_display", TextDisplay.class, -1),
/**

View File

@@ -522,6 +522,26 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*/
public void sendBlockChange(@NotNull Location loc, @NotNull BlockData block);
/**
* Send a multi-block change. This fakes a block change packet for a user
* at multiple locations. This will not actually change the world in any
* way.
* <p>
* This method may send multiple packets to the client depending on the
* blocks in the collection. A packet must be sent for each chunk section
* modified, meaning one packet for each 16x16x16 block area. Even if only
* one block is changed in two different chunk sections, two packets will
* be sent.
* <p>
* Additionally, this method cannot guarantee the functionality of changes
* being sent to the player in chunks not loaded by the client. It is the
* responsibility of the caller to ensure that the client is within range
* of the changed blocks or to handle any side effects caused as a result.
*
* @param blocks the block states to send to the player
*/
public void sendBlockChanges(@NotNull Collection<BlockState> blocks);
/**
* Send a multi-block change. This fakes a block change packet for a user
* at multiple locations. This will not actually change the world in any
@@ -541,7 +561,10 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @param blocks the block states to send to the player
* @param suppressLightUpdates whether or not light updates should be
* suppressed when updating the blocks on the client
* @deprecated suppressLightUpdates is not functional in versions greater
* than 1.19.4
*/
@Deprecated
public void sendBlockChanges(@NotNull Collection<BlockState> blocks, boolean suppressLightUpdates);
/**

View File

@@ -2,19 +2,12 @@ package org.bukkit.entity;
import java.util.Collection;
import org.bukkit.Location;
import org.bukkit.MinecraftExperimental;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
/**
* Represents a Sniffer.
*
* @apiNote This entity is part of an experimental feature of Minecraft and
* hence subject to change.
*/
@MinecraftExperimental
@ApiStatus.Experimental
public interface Sniffer extends Animals {
/**

View File

@@ -7,9 +7,7 @@ import java.util.Set;
import java.util.UUID;
import org.bukkit.Keyed;
import org.bukkit.Location;
import org.bukkit.MinecraftExperimental;
import org.bukkit.NamespacedKey;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -71,8 +69,6 @@ public final class MemoryKey<T> implements Keyed {
public static final MemoryKey<Location> LIKED_NOTEBLOCK_POSITION = new MemoryKey<>(NamespacedKey.minecraft("liked_noteblock"), Location.class);
public static final MemoryKey<Integer> LIKED_NOTEBLOCK_COOLDOWN_TICKS = new MemoryKey<>(NamespacedKey.minecraft("liked_noteblock_cooldown_ticks"), Integer.class);
public static final MemoryKey<Integer> ITEM_PICKUP_COOLDOWN_TICKS = new MemoryKey<>(NamespacedKey.minecraft("item_pickup_cooldown_ticks"), Integer.class);
@MinecraftExperimental
@ApiStatus.Experimental
public static final MemoryKey<Location> SNIFFER_EXPLORED_POSITIONS = new MemoryKey<>(NamespacedKey.minecraft("sniffer_explored_positions"), Location.class);
/**