mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 03:48:01 +01:00
Update to Minecraft 1.20.3
By: md_5 <git@md-5.net>
This commit is contained in:
parent
304434a635
commit
d569990c3b
@ -5,7 +5,7 @@
|
||||
|
||||
<groupId>org.bukkit</groupId>
|
||||
<artifactId>bukkit</artifactId>
|
||||
<version>1.20.2-R0.1-SNAPSHOT</version>
|
||||
<version>1.20.3-R0.1-SNAPSHOT</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>Bukkit</name>
|
||||
|
@ -27,4 +27,7 @@ public interface FeatureFlag extends Keyed {
|
||||
|
||||
@MinecraftExperimental
|
||||
public static final FeatureFlag TRADE_REBALANCE = Bukkit.getUnsafe().getFeatureFlag(NamespacedKey.minecraft("trade_rebalance"));
|
||||
|
||||
@MinecraftExperimental
|
||||
public static final FeatureFlag UPDATE_121 = Bukkit.getUnsafe().getFeatureFlag(NamespacedKey.minecraft("update_1_21"));
|
||||
}
|
||||
|
@ -61,6 +61,11 @@ public final class GameRule<T> {
|
||||
*/
|
||||
public static final GameRule<Boolean> DO_MOB_LOOT = new GameRule<>("doMobLoot", Boolean.class);
|
||||
|
||||
/**
|
||||
* Whether projectiles can break blocks.
|
||||
*/
|
||||
public static final GameRule<Boolean> PROJECTILES_CAN_BREAK_BLOCKS = new GameRule<>("projectilesCanBreakBlocks", Boolean.class);
|
||||
|
||||
/**
|
||||
* Whether mobs should naturally spawn.
|
||||
*/
|
||||
@ -243,6 +248,12 @@ public final class GameRule<T> {
|
||||
*/
|
||||
public static final GameRule<Integer> MAX_COMMAND_CHAIN_LENGTH = new GameRule<>("maxCommandChainLength", Integer.class);
|
||||
|
||||
/**
|
||||
* Determines the number of different commands/functions which execute
|
||||
* commands can fork into.
|
||||
*/
|
||||
public static final GameRule<Integer> MAX_COMMAND_FORK_COUNT = new GameRule<>("maxCommandForkCount", Integer.class);
|
||||
|
||||
/**
|
||||
* Determines the maximum number of blocks which a command can modify.
|
||||
*/
|
||||
@ -255,6 +266,18 @@ public final class GameRule<T> {
|
||||
public static final GameRule<Integer> PLAYERS_SLEEPING_PERCENTAGE = new GameRule<>("playersSleepingPercentage", Integer.class);
|
||||
public static final GameRule<Integer> SNOW_ACCUMULATION_HEIGHT = new GameRule<>("snowAccumulationHeight", Integer.class);
|
||||
|
||||
/**
|
||||
* The amount of time a player must stand in a nether portal before the
|
||||
* portal activates.
|
||||
*/
|
||||
public static final GameRule<Integer> PLAYERS_NETHER_PORTAL_DEFAULT_DELAY = new GameRule<>("playersNetherPortalDefaultDelay", Integer.class);
|
||||
|
||||
/**
|
||||
* The amount of time a player in creative mode must stand in a nether
|
||||
* portal before the portal activates.
|
||||
*/
|
||||
public static final GameRule<Integer> PLAYERS_NETHER_PORTAL_CREATIVE_DELAY = new GameRule<>("playersNetherPortalCreativeDelay", Integer.class);
|
||||
|
||||
// All GameRules instantiated above this for organizational purposes
|
||||
private final String name;
|
||||
private final Class<T> type;
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -131,6 +131,12 @@ public enum Particle implements Keyed {
|
||||
SHRIEK("shriek", Integer.class),
|
||||
CHERRY_LEAVES("cherry_leaves"),
|
||||
EGG_CRACK("egg_crack"),
|
||||
DUST_PLUME("dust_plume"),
|
||||
WHITE_SMOKE("white_smoke"),
|
||||
GUST("gust"),
|
||||
GUST_EMITTER("gust_emitter"),
|
||||
GUST_DUST("gust_dust"),
|
||||
TRIAL_SPAWNER_DETECTION("trial_spawner_detection"),
|
||||
/**
|
||||
* Uses {@link BlockData} as DataType
|
||||
*/
|
||||
|
@ -214,19 +214,55 @@ public enum Sound implements Keyed {
|
||||
BLOCK_CONDUIT_ATTACK_TARGET("block.conduit.attack.target"),
|
||||
BLOCK_CONDUIT_DEACTIVATE("block.conduit.deactivate"),
|
||||
BLOCK_COPPER_BREAK("block.copper.break"),
|
||||
@MinecraftExperimental
|
||||
BLOCK_COPPER_BULB_BREAK("block.copper_bulb.break"),
|
||||
@MinecraftExperimental
|
||||
BLOCK_COPPER_BULB_FALL("block.copper_bulb.fall"),
|
||||
@MinecraftExperimental
|
||||
BLOCK_COPPER_BULB_HIT("block.copper_bulb.hit"),
|
||||
@MinecraftExperimental
|
||||
BLOCK_COPPER_BULB_PLACE("block.copper_bulb.place"),
|
||||
@MinecraftExperimental
|
||||
BLOCK_COPPER_BULB_STEP("block.copper_bulb.step"),
|
||||
@MinecraftExperimental
|
||||
BLOCK_COPPER_BULB_TURN_OFF("block.copper_bulb.turn_off"),
|
||||
@MinecraftExperimental
|
||||
BLOCK_COPPER_BULB_TURN_ON("block.copper_bulb.turn_on"),
|
||||
@MinecraftExperimental
|
||||
BLOCK_COPPER_DOOR_CLOSE("block.copper_door.close"),
|
||||
@MinecraftExperimental
|
||||
BLOCK_COPPER_DOOR_OPEN("block.copper_door.open"),
|
||||
BLOCK_COPPER_FALL("block.copper.fall"),
|
||||
@MinecraftExperimental
|
||||
BLOCK_COPPER_GRATE_BREAK("block.copper_grate.break"),
|
||||
@MinecraftExperimental
|
||||
BLOCK_COPPER_GRATE_FALL("block.copper_grate.fall"),
|
||||
@MinecraftExperimental
|
||||
BLOCK_COPPER_GRATE_HIT("block.copper_grate.hit"),
|
||||
@MinecraftExperimental
|
||||
BLOCK_COPPER_GRATE_PLACE("block.copper_grate.place"),
|
||||
@MinecraftExperimental
|
||||
BLOCK_COPPER_GRATE_STEP("block.copper_grate.step"),
|
||||
BLOCK_COPPER_HIT("block.copper.hit"),
|
||||
BLOCK_COPPER_PLACE("block.copper.place"),
|
||||
BLOCK_COPPER_STEP("block.copper.step"),
|
||||
@MinecraftExperimental
|
||||
BLOCK_COPPER_TRAPDOOR_CLOSE("block.copper_trapdoor.close"),
|
||||
@MinecraftExperimental
|
||||
BLOCK_COPPER_TRAPDOOR_OPEN("block.copper_trapdoor.open"),
|
||||
BLOCK_CORAL_BLOCK_BREAK("block.coral_block.break"),
|
||||
BLOCK_CORAL_BLOCK_FALL("block.coral_block.fall"),
|
||||
BLOCK_CORAL_BLOCK_HIT("block.coral_block.hit"),
|
||||
BLOCK_CORAL_BLOCK_PLACE("block.coral_block.place"),
|
||||
BLOCK_CORAL_BLOCK_STEP("block.coral_block.step"),
|
||||
BLOCK_CRAFTER_CRAFT("block.crafter.craft"),
|
||||
BLOCK_CRAFTER_FAIL("block.crafter.fail"),
|
||||
BLOCK_CROP_BREAK("block.crop.break"),
|
||||
BLOCK_DECORATED_POT_BREAK("block.decorated_pot.break"),
|
||||
BLOCK_DECORATED_POT_FALL("block.decorated_pot.fall"),
|
||||
BLOCK_DECORATED_POT_HIT("block.decorated_pot.hit"),
|
||||
BLOCK_DECORATED_POT_INSERT("block.decorated_pot.insert"),
|
||||
BLOCK_DECORATED_POT_INSERT_FAIL("block.decorated_pot.insert_fail"),
|
||||
BLOCK_DECORATED_POT_PLACE("block.decorated_pot.place"),
|
||||
BLOCK_DECORATED_POT_SHATTER("block.decorated_pot.shatter"),
|
||||
BLOCK_DECORATED_POT_STEP("block.decorated_pot.step"),
|
||||
@ -317,6 +353,7 @@ public enum Sound implements Keyed {
|
||||
BLOCK_HANGING_SIGN_HIT("block.hanging_sign.hit"),
|
||||
BLOCK_HANGING_SIGN_PLACE("block.hanging_sign.place"),
|
||||
BLOCK_HANGING_SIGN_STEP("block.hanging_sign.step"),
|
||||
BLOCK_HANGING_SIGN_WAXED_INTERACT_FAIL("block.hanging_sign.waxed_interact_fail"),
|
||||
BLOCK_HONEY_BLOCK_BREAK("block.honey_block.break"),
|
||||
BLOCK_HONEY_BLOCK_FALL("block.honey_block.fall"),
|
||||
BLOCK_HONEY_BLOCK_HIT("block.honey_block.hit"),
|
||||
@ -493,6 +530,16 @@ public enum Sound implements Keyed {
|
||||
BLOCK_POLISHED_DEEPSLATE_HIT("block.polished_deepslate.hit"),
|
||||
BLOCK_POLISHED_DEEPSLATE_PLACE("block.polished_deepslate.place"),
|
||||
BLOCK_POLISHED_DEEPSLATE_STEP("block.polished_deepslate.step"),
|
||||
@MinecraftExperimental
|
||||
BLOCK_POLISHED_TUFF_BREAK("block.polished_tuff.break"),
|
||||
@MinecraftExperimental
|
||||
BLOCK_POLISHED_TUFF_FALL("block.polished_tuff.fall"),
|
||||
@MinecraftExperimental
|
||||
BLOCK_POLISHED_TUFF_HIT("block.polished_tuff.hit"),
|
||||
@MinecraftExperimental
|
||||
BLOCK_POLISHED_TUFF_PLACE("block.polished_tuff.place"),
|
||||
@MinecraftExperimental
|
||||
BLOCK_POLISHED_TUFF_STEP("block.polished_tuff.step"),
|
||||
BLOCK_PORTAL_AMBIENT("block.portal.ambient"),
|
||||
BLOCK_PORTAL_TRAVEL("block.portal.travel"),
|
||||
BLOCK_PORTAL_TRIGGER("block.portal.trigger"),
|
||||
@ -636,11 +683,43 @@ public enum Sound implements Keyed {
|
||||
BLOCK_SWEET_BERRY_BUSH_BREAK("block.sweet_berry_bush.break"),
|
||||
BLOCK_SWEET_BERRY_BUSH_PICK_BERRIES("block.sweet_berry_bush.pick_berries"),
|
||||
BLOCK_SWEET_BERRY_BUSH_PLACE("block.sweet_berry_bush.place"),
|
||||
@MinecraftExperimental
|
||||
BLOCK_TRIAL_SPAWNER_AMBIENT("block.trial_spawner.ambient"),
|
||||
@MinecraftExperimental
|
||||
BLOCK_TRIAL_SPAWNER_BREAK("block.trial_spawner.break"),
|
||||
@MinecraftExperimental
|
||||
BLOCK_TRIAL_SPAWNER_CLOSE_SHUTTER("block.trial_spawner.close_shutter"),
|
||||
@MinecraftExperimental
|
||||
BLOCK_TRIAL_SPAWNER_DETECT_PLAYER("block.trial_spawner.detect_player"),
|
||||
@MinecraftExperimental
|
||||
BLOCK_TRIAL_SPAWNER_EJECT_ITEM("block.trial_spawner.eject_item"),
|
||||
@MinecraftExperimental
|
||||
BLOCK_TRIAL_SPAWNER_FALL("block.trial_spawner.fall"),
|
||||
@MinecraftExperimental
|
||||
BLOCK_TRIAL_SPAWNER_HIT("block.trial_spawner.hit"),
|
||||
@MinecraftExperimental
|
||||
BLOCK_TRIAL_SPAWNER_OPEN_SHUTTER("block.trial_spawner.open_shutter"),
|
||||
@MinecraftExperimental
|
||||
BLOCK_TRIAL_SPAWNER_PLACE("block.trial_spawner.place"),
|
||||
@MinecraftExperimental
|
||||
BLOCK_TRIAL_SPAWNER_SPAWN_MOB("block.trial_spawner.spawn_mob"),
|
||||
@MinecraftExperimental
|
||||
BLOCK_TRIAL_SPAWNER_STEP("block.trial_spawner.step"),
|
||||
BLOCK_TRIPWIRE_ATTACH("block.tripwire.attach"),
|
||||
BLOCK_TRIPWIRE_CLICK_OFF("block.tripwire.click_off"),
|
||||
BLOCK_TRIPWIRE_CLICK_ON("block.tripwire.click_on"),
|
||||
BLOCK_TRIPWIRE_DETACH("block.tripwire.detach"),
|
||||
BLOCK_TUFF_BREAK("block.tuff.break"),
|
||||
@MinecraftExperimental
|
||||
BLOCK_TUFF_BRICKS_BREAK("block.tuff_bricks.break"),
|
||||
@MinecraftExperimental
|
||||
BLOCK_TUFF_BRICKS_FALL("block.tuff_bricks.fall"),
|
||||
@MinecraftExperimental
|
||||
BLOCK_TUFF_BRICKS_HIT("block.tuff_bricks.hit"),
|
||||
@MinecraftExperimental
|
||||
BLOCK_TUFF_BRICKS_PLACE("block.tuff_bricks.place"),
|
||||
@MinecraftExperimental
|
||||
BLOCK_TUFF_BRICKS_STEP("block.tuff_bricks.step"),
|
||||
BLOCK_TUFF_FALL("block.tuff.fall"),
|
||||
BLOCK_TUFF_HIT("block.tuff.hit"),
|
||||
BLOCK_TUFF_PLACE("block.tuff.place"),
|
||||
@ -729,6 +808,24 @@ public enum Sound implements Keyed {
|
||||
ENTITY_BLAZE_SHOOT("entity.blaze.shoot"),
|
||||
ENTITY_BOAT_PADDLE_LAND("entity.boat.paddle_land"),
|
||||
ENTITY_BOAT_PADDLE_WATER("entity.boat.paddle_water"),
|
||||
@MinecraftExperimental
|
||||
ENTITY_BREEZE_DEATH("entity.breeze.death"),
|
||||
@MinecraftExperimental
|
||||
ENTITY_BREEZE_HURT("entity.breeze.hurt"),
|
||||
@MinecraftExperimental
|
||||
ENTITY_BREEZE_IDLE_AIR("entity.breeze.idle_air"),
|
||||
@MinecraftExperimental
|
||||
ENTITY_BREEZE_IDLE_GROUND("entity.breeze.idle_ground"),
|
||||
@MinecraftExperimental
|
||||
ENTITY_BREEZE_INHALE("entity.breeze.inhale"),
|
||||
@MinecraftExperimental
|
||||
ENTITY_BREEZE_JUMP("entity.breeze.jump"),
|
||||
@MinecraftExperimental
|
||||
ENTITY_BREEZE_LAND("entity.breeze.land"),
|
||||
@MinecraftExperimental
|
||||
ENTITY_BREEZE_SHOOT("entity.breeze.shoot"),
|
||||
@MinecraftExperimental
|
||||
ENTITY_BREEZE_SLIDE("entity.breeze.slide"),
|
||||
ENTITY_CAMEL_AMBIENT("entity.camel.ambient"),
|
||||
ENTITY_CAMEL_DASH("entity.camel.dash"),
|
||||
ENTITY_CAMEL_DASH_READY("entity.camel.dash_ready"),
|
||||
@ -873,6 +970,8 @@ public enum Sound implements Keyed {
|
||||
ENTITY_GENERIC_SMALL_FALL("entity.generic.small_fall"),
|
||||
ENTITY_GENERIC_SPLASH("entity.generic.splash"),
|
||||
ENTITY_GENERIC_SWIM("entity.generic.swim"),
|
||||
@MinecraftExperimental
|
||||
ENTITY_GENERIC_WIND_BURST("entity.generic.wind_burst"),
|
||||
ENTITY_GHAST_AMBIENT("entity.ghast.ambient"),
|
||||
ENTITY_GHAST_DEATH("entity.ghast.death"),
|
||||
ENTITY_GHAST_HURT("entity.ghast.hurt"),
|
||||
@ -1024,6 +1123,8 @@ public enum Sound implements Keyed {
|
||||
ENTITY_PARROT_FLY("entity.parrot.fly"),
|
||||
ENTITY_PARROT_HURT("entity.parrot.hurt"),
|
||||
ENTITY_PARROT_IMITATE_BLAZE("entity.parrot.imitate.blaze"),
|
||||
@MinecraftExperimental
|
||||
ENTITY_PARROT_IMITATE_BREEZE("entity.parrot.imitate.breeze"),
|
||||
ENTITY_PARROT_IMITATE_CREEPER("entity.parrot.imitate.creeper"),
|
||||
ENTITY_PARROT_IMITATE_DROWNED("entity.parrot.imitate.drowned"),
|
||||
ENTITY_PARROT_IMITATE_ELDER_GUARDIAN("entity.parrot.imitate.elder_guardian"),
|
||||
@ -1108,6 +1209,7 @@ public enum Sound implements Keyed {
|
||||
ENTITY_PLAYER_SPLASH("entity.player.splash"),
|
||||
ENTITY_PLAYER_SPLASH_HIGH_SPEED("entity.player.splash.high_speed"),
|
||||
ENTITY_PLAYER_SWIM("entity.player.swim"),
|
||||
ENTITY_PLAYER_TELEPORT("entity.player.teleport"),
|
||||
ENTITY_POLAR_BEAR_AMBIENT("entity.polar_bear.ambient"),
|
||||
ENTITY_POLAR_BEAR_AMBIENT_BABY("entity.polar_bear.ambient_baby"),
|
||||
ENTITY_POLAR_BEAR_DEATH("entity.polar_bear.death"),
|
||||
|
@ -962,6 +962,18 @@ public interface Tag<T extends Keyed> extends Keyed {
|
||||
* Vanilla tag representing entities which are not controlled by their mount.
|
||||
*/
|
||||
Tag<EntityType> ENTITY_TYPES_NON_CONTROLLING_RIDER = Bukkit.getTag(REGISTRY_ENTITY_TYPES, NamespacedKey.minecraft("non_controlling_rider"), EntityType.class);
|
||||
/**
|
||||
* Vanilla tag representing entities which deflect arrows.
|
||||
*/
|
||||
Tag<EntityType> ENTITY_TYPES_DEFLECTS_ARROWS = Bukkit.getTag(REGISTRY_ENTITY_TYPES, NamespacedKey.minecraft("deflects_arrows"), EntityType.class);
|
||||
/**
|
||||
* Vanilla tag representing entities which deflect tridents.
|
||||
*/
|
||||
Tag<EntityType> ENTITY_TYPES_DEFLECTS_TRIDENTS = Bukkit.getTag(REGISTRY_ENTITY_TYPES, NamespacedKey.minecraft("deflects_tridents"), EntityType.class);
|
||||
/**
|
||||
* Vanilla tag representing entities which can turn in boats.
|
||||
*/
|
||||
Tag<EntityType> ENTITY_TYPES_CAN_TURN_IN_BOATS = Bukkit.getTag(REGISTRY_ENTITY_TYPES, NamespacedKey.minecraft("can_turn_in_boats"), EntityType.class);
|
||||
|
||||
/**
|
||||
* Returns whether or not this tag has an entry for the specified item.
|
||||
|
63
paper-api/src/main/java/org/bukkit/block/Crafter.java
Normal file
63
paper-api/src/main/java/org/bukkit/block/Crafter.java
Normal file
@ -0,0 +1,63 @@
|
||||
package org.bukkit.block;
|
||||
|
||||
import org.bukkit.MinecraftExperimental;
|
||||
import org.bukkit.loot.Lootable;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
|
||||
/**
|
||||
* Represents a captured state of a crafter.
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental
|
||||
public interface Crafter extends Container, Lootable {
|
||||
|
||||
/**
|
||||
* Gets the number of ticks which this block will remain in the crafting
|
||||
* state for.
|
||||
*
|
||||
* @return number of ticks remaining
|
||||
* @see org.bukkit.block.data.type.Crafter#isCrafting()
|
||||
*/
|
||||
int getCraftingTicks();
|
||||
|
||||
/**
|
||||
* Sets the number of ticks which this block will remain in the crafting
|
||||
* state for.
|
||||
*
|
||||
* @param ticks number of ticks remaining
|
||||
* @see org.bukkit.block.data.type.Crafter#isCrafting()
|
||||
*/
|
||||
void setCraftingTicks(int ticks);
|
||||
|
||||
/**
|
||||
* Gets whether the slot at the specified index is disabled and will not
|
||||
* have items placed in it.
|
||||
*
|
||||
* @param slot slot index
|
||||
* @return disabled status
|
||||
*/
|
||||
boolean isSlotDisabled(int slot);
|
||||
|
||||
/**
|
||||
* Sets whether the slot at the specified index is disabled and will not
|
||||
* have items placed in it.
|
||||
*
|
||||
* @param slot slot index
|
||||
* @param disabled disabled status
|
||||
*/
|
||||
void setSlotDisabled(int slot, boolean disabled);
|
||||
|
||||
/**
|
||||
* Gets whether this Crafter is powered.
|
||||
*
|
||||
* @return powered status
|
||||
*/
|
||||
boolean isTriggered();
|
||||
|
||||
/**
|
||||
* Sets whether this Crafter is powered.
|
||||
*
|
||||
* @param triggered powered status
|
||||
*/
|
||||
void setTriggered(boolean triggered);
|
||||
}
|
12
paper-api/src/main/java/org/bukkit/block/TrialSpawner.java
Normal file
12
paper-api/src/main/java/org/bukkit/block/TrialSpawner.java
Normal file
@ -0,0 +1,12 @@
|
||||
package org.bukkit.block;
|
||||
|
||||
import org.bukkit.MinecraftExperimental;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
|
||||
/**
|
||||
* Represents a captured state of a trial spawner.
|
||||
*/
|
||||
@MinecraftExperimental
|
||||
@ApiStatus.Experimental
|
||||
public interface TrialSpawner extends TileState {
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.MinecraftExperimental;
|
||||
import org.bukkit.block.data.Lightable;
|
||||
import org.bukkit.block.data.Powerable;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
|
||||
@MinecraftExperimental
|
||||
@ApiStatus.Experimental
|
||||
public interface CopperBulb extends Lightable, Powerable {
|
||||
}
|
@ -0,0 +1,81 @@
|
||||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.MinecraftExperimental;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* 'orientation' is the direction the block is facing.
|
||||
* <br>
|
||||
* Similar to {@link Powerable}, 'triggered' indicates whether or not the
|
||||
* dispenser is currently activated.
|
||||
* <br>
|
||||
* 'crafting' is whether crafter's mouth is open and top is glowing.
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental
|
||||
public interface Crafter extends BlockData {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'crafting' property.
|
||||
*
|
||||
* @return the 'crafting' value
|
||||
*/
|
||||
boolean isCrafting();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'crafting' property.
|
||||
*
|
||||
* @param crafting the new 'crafting' value
|
||||
*/
|
||||
void setCrafting(boolean crafting);
|
||||
|
||||
/**
|
||||
* Gets the value of the 'triggered' property.
|
||||
*
|
||||
* @return the 'triggered' value
|
||||
*/
|
||||
boolean isTriggered();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'triggered' property.
|
||||
*
|
||||
* @param triggered the new 'triggered' value
|
||||
*/
|
||||
void setTriggered(boolean triggered);
|
||||
|
||||
/**
|
||||
* Gets the value of the 'orientation' property.
|
||||
*
|
||||
* @return the 'orientation' value
|
||||
*/
|
||||
@NotNull
|
||||
Orientation getOrientation();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'orientation' property.
|
||||
*
|
||||
* @param orientation the new 'orientation' value
|
||||
*/
|
||||
void setOrientation(@NotNull Orientation orientation);
|
||||
|
||||
/**
|
||||
* The directions the Crafter can be oriented.
|
||||
*/
|
||||
public enum Orientation {
|
||||
|
||||
DOWN_EAST,
|
||||
DOWN_NORTH,
|
||||
DOWN_SOUTH,
|
||||
DOWN_WEST,
|
||||
UP_EAST,
|
||||
UP_NORTH,
|
||||
UP_SOUTH,
|
||||
UP_WEST,
|
||||
WEST_UP,
|
||||
EAST_UP,
|
||||
NORTH_UP,
|
||||
SOUTH_UP;
|
||||
}
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.MinecraftExperimental;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* 'trial_spawner_state' indicates the current operational phase of the spawner.
|
||||
*/
|
||||
@MinecraftExperimental
|
||||
@ApiStatus.Experimental
|
||||
public interface TrialSpawner extends BlockData {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'trial_spawner_state' property.
|
||||
*
|
||||
* @return the 'trial_spawner_state' value
|
||||
*/
|
||||
@NotNull
|
||||
State getTrialSpawnerState();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'trial_spawner_state' property.
|
||||
*
|
||||
* @param state the new 'trial_spawner_state' value
|
||||
*/
|
||||
void setTrialSpawnerState(@NotNull State state);
|
||||
|
||||
public enum State {
|
||||
|
||||
INACTIVE,
|
||||
WAITING_FOR_PLAYERS,
|
||||
ACTIVE,
|
||||
WAITING_FOR_REWARD_EJECTION,
|
||||
EJECTING_REWARD,
|
||||
COOLDOWN;
|
||||
}
|
||||
}
|
12
paper-api/src/main/java/org/bukkit/entity/Breeze.java
Normal file
12
paper-api/src/main/java/org/bukkit/entity/Breeze.java
Normal file
@ -0,0 +1,12 @@
|
||||
package org.bukkit.entity;
|
||||
|
||||
import org.bukkit.MinecraftExperimental;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
|
||||
/**
|
||||
* Represents a Breeze. Whoosh!
|
||||
*/
|
||||
@MinecraftExperimental
|
||||
@ApiStatus.Experimental
|
||||
public interface Breeze extends Monster {
|
||||
}
|
@ -6,6 +6,7 @@ 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;
|
||||
@ -18,6 +19,7 @@ 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;
|
||||
@ -284,6 +286,12 @@ public enum EntityType implements Keyed, Translatable {
|
||||
ITEM_DISPLAY("item_display", ItemDisplay.class, -1),
|
||||
SNIFFER("sniffer", Sniffer.class, -1),
|
||||
TEXT_DISPLAY("text_display", TextDisplay.class, -1),
|
||||
@MinecraftExperimental
|
||||
@ApiStatus.Experimental
|
||||
BREEZE("breeze", Breeze.class, -1),
|
||||
@MinecraftExperimental
|
||||
@ApiStatus.Experimental
|
||||
WIND_CHARGE("wind_charge", WindCharge.class, -1),
|
||||
/**
|
||||
* A fishing line and bobber.
|
||||
*/
|
||||
|
@ -7,6 +7,7 @@ import java.time.Instant;
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
import org.bukkit.BanEntry;
|
||||
import org.bukkit.DyeColor;
|
||||
import org.bukkit.Effect;
|
||||
@ -1525,6 +1526,53 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
*/
|
||||
public void setResourcePack(@NotNull String url, @Nullable byte[] hash, @Nullable String prompt, boolean force);
|
||||
|
||||
/**
|
||||
* Request that the player's client download and switch resource packs.
|
||||
* <p>
|
||||
* The player's client will download the new resource pack asynchronously
|
||||
* in the background, and will automatically switch to it once the
|
||||
* download is complete. If the client has downloaded and cached a
|
||||
* resource pack with the same hash in the past it will not download but
|
||||
* directly apply the cached pack. If the hash is null and the client has
|
||||
* downloaded and cached the same resource pack in the past, it will
|
||||
* perform a file size check against the response content to determine if
|
||||
* the resource pack has changed and needs to be downloaded again. When
|
||||
* this request is sent for the very first time from a given server, the
|
||||
* client will first display a confirmation GUI to the player before
|
||||
* proceeding with the download.
|
||||
* <p>
|
||||
* Notes:
|
||||
* <ul>
|
||||
* <li>Players can disable server resources on their client, in which
|
||||
* case this method will have no affect on them. Use the
|
||||
* {@link PlayerResourcePackStatusEvent} to figure out whether or not
|
||||
* the player loaded the pack!
|
||||
* <li>There is no concept of resetting resource packs back to default
|
||||
* within Minecraft, so players will have to relog to do so or you
|
||||
* have to send an empty pack.
|
||||
* <li>The request is sent with empty string as the hash when the hash is
|
||||
* not provided. This might result in newer versions not loading the
|
||||
* pack correctly.
|
||||
* </ul>
|
||||
*
|
||||
* @param id Unique resource pack ID.
|
||||
* @param url The URL from which the client will download the resource
|
||||
* pack. The string must contain only US-ASCII characters and should
|
||||
* be encoded as per RFC 1738.
|
||||
* @param hash The sha1 hash sum of the resource pack file which is used
|
||||
* to apply a cached version of the pack directly without downloading
|
||||
* if it is available. Hast to be 20 bytes long!
|
||||
* @param prompt The optional custom prompt message to be shown to client.
|
||||
* @param force If true, the client will be disconnected from the server
|
||||
* when it declines to use the resource pack.
|
||||
* @throws IllegalArgumentException Thrown if the URL is null.
|
||||
* @throws IllegalArgumentException Thrown if the URL is too long. The
|
||||
* length restriction is an implementation specific arbitrary value.
|
||||
* @throws IllegalArgumentException Thrown if the hash is not 20 bytes
|
||||
* long.
|
||||
*/
|
||||
public void setResourcePack(@NotNull UUID id, @NotNull String url, @Nullable byte[] hash, @Nullable String prompt, boolean force);
|
||||
|
||||
/**
|
||||
* Gets the Scoreboard displayed to this player
|
||||
*
|
||||
|
12
paper-api/src/main/java/org/bukkit/entity/WindCharge.java
Normal file
12
paper-api/src/main/java/org/bukkit/entity/WindCharge.java
Normal file
@ -0,0 +1,12 @@
|
||||
package org.bukkit.entity;
|
||||
|
||||
import org.bukkit.MinecraftExperimental;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
|
||||
/**
|
||||
* Represents a Wind Charge.
|
||||
*/
|
||||
@MinecraftExperimental
|
||||
@ApiStatus.Experimental
|
||||
public interface WindCharge extends Fireball {
|
||||
}
|
@ -1,6 +1,8 @@
|
||||
package org.bukkit.event.inventory;
|
||||
|
||||
import org.bukkit.MinecraftExperimental;
|
||||
import org.bukkit.inventory.InventoryHolder;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
@ -142,6 +144,12 @@ public enum InventoryType {
|
||||
* Pseudo jukebox inventory with 1 slot of undefined type.
|
||||
*/
|
||||
JUKEBOX(1, "Jukebox", false),
|
||||
/**
|
||||
* A crafter inventory, with 9 CRAFTING slots.
|
||||
*/
|
||||
@MinecraftExperimental
|
||||
@ApiStatus.Experimental
|
||||
CRAFTER(9, "Crafter"),
|
||||
/**
|
||||
* The new smithing inventory, with 3 CRAFTING slots and 1 RESULT slot.
|
||||
*
|
||||
|
@ -47,6 +47,7 @@ public abstract class Structure implements Keyed {
|
||||
public static final Structure RUINED_PORTAL_NETHER = getStructure("ruined_portal_nether");
|
||||
public static final Structure ANCIENT_CITY = getStructure("ancient_city");
|
||||
public static final Structure TRAIL_RUINS = getStructure("trail_ruins");
|
||||
public static final Structure TRIAL_CHAMBERS = getStructure("trial_chambers");
|
||||
|
||||
private static Structure getStructure(String name) {
|
||||
return Registry.STRUCTURE.get(NamespacedKey.minecraft(name));
|
||||
|
@ -0,0 +1,11 @@
|
||||
package org.bukkit.inventory;
|
||||
|
||||
import org.bukkit.MinecraftExperimental;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
|
||||
/**
|
||||
* Interface to the inventory of a Crafter.
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental
|
||||
public interface CrafterInventory extends Inventory { }
|
@ -33,6 +33,16 @@ public enum LootTables implements Keyed {
|
||||
ANCIENT_CITY("chests/ancient_city"),
|
||||
ANCIENT_CITY_ICE_BOX("chests/ancient_city_ice_box"),
|
||||
RUINED_PORTAL("chests/ruined_portal"),
|
||||
TRIAL_CHAMBERS_REWARD("chests/trial_chambers/reward"),
|
||||
TRIAL_CHAMBERS_SUPPLY("chests/trial_chambers/supply"),
|
||||
TRIAL_CHAMBERS_CORRIDOR("chests/trial_chambers/corridor"),
|
||||
TRIAL_CHAMBERS_INTERSECTION("chests/trial_chambers/intersection"),
|
||||
TRIAL_CHAMBERS_INTERSECTION_BARREL("chests/trial_chambers/intersection_barrel"),
|
||||
TRIAL_CHAMBERS_ENTRANCE("chests/trial_chambers/entrance"),
|
||||
TRIAL_CHAMBERS_CORRIDOR_DISPENSER("dispensers/trial_chambers/corridor"),
|
||||
TRIAL_CHAMBERS_CHAMBER_DISPENSER("dispensers/trial_chambers/chamber"),
|
||||
TRIAL_CHAMBERS_WATER_DISPENSER("dispensers/trial_chambers/water"),
|
||||
TRIAL_CHAMBERS_CORRIDOR_POT("pots/trial_chambers/corridor"),
|
||||
SHIPWRECK_MAP("chests/shipwreck_map"),
|
||||
SHIPWRECK_SUPPLY("chests/shipwreck_supply"),
|
||||
SHIPWRECK_TREASURE("chests/shipwreck_treasure"),
|
||||
@ -157,6 +167,9 @@ public enum LootTables implements Keyed {
|
||||
WEAPONSMITH_GIFT("gameplay/hero_of_the_village/weaponsmith_gift"),
|
||||
SNIFFER_DIGGING("gameplay/sniffer_digging"),
|
||||
PIGLIN_BARTERING("gameplay/piglin_bartering"),
|
||||
// Spawners
|
||||
TRIAL_CHAMBER_KEY("spawners/trial_chamber/key"),
|
||||
RIAL_CHAMBER_CONSUMABLES("spawners/trial_chamber/consumables"),
|
||||
// Archaeology
|
||||
DESERT_WELL_ARCHAEOLOGY("archaeology/desert_well"),
|
||||
DESERT_PYRAMID_ARCHAEOLOGY("archaeology/desert_pyramid"),
|
||||
|
Loading…
Reference in New Issue
Block a user