Update to Minecraft 1.17

By: md_5 <git@md-5.net>
This commit is contained in:
Bukkit/Spigot
2021-06-11 15:00:00 +10:00
parent 2e1a3720cf
commit 153752dfac
44 changed files with 3379 additions and 958 deletions

View File

@@ -88,6 +88,8 @@ public enum Biome implements Keyed {
CRIMSON_FOREST,
WARPED_FOREST,
BASALT_DELTAS,
DRIPSTONE_CAVES,
LUSH_CAVES,
/**
* Represents a custom Biome
*/

View File

@@ -0,0 +1,27 @@
package org.bukkit.block;
/**
* Represents a captured state of a sculk sensor
*/
public interface SculkSensor extends TileState {
/**
* Gets the last vibration frequency of this sensor.
*
* Different activities detected by the sensor will produce different
* frequencies and dictate the output of connected comparators.
*
* @return frequency between 0-15.
*/
int getLastVibrationFrequency();
/**
* Sets the last vibration frequency of this sensor.
*
* Different activities detected by the sensor will produce different
* frequencies and dictate the output of connected comparators.
*
* @param lastVibrationFrequency frequency between 0-15.
*/
void setLastVibrationFrequency(int lastVibrationFrequency);
}

View File

@@ -61,4 +61,18 @@ public interface Sign extends TileState, Colorable {
* @param editable if this sign is currently editable
*/
public void setEditable(boolean editable);
/**
* Gets whether this sign has glowing text.
*
* @return if this sign has glowing text
*/
public boolean isGlowingText();
/**
* Sets whether this sign has glowing text.
*
* @param glowing if this sign has glowing text
*/
public void setGlowingText(boolean glowing);
}

View File

@@ -9,7 +9,7 @@ import org.jetbrains.annotations.NotNull;
* Some types of rail may not be able to be laid out in all shapes, use
* {@link #getShapes()} to get those applicable to this block.
*/
public interface Rail extends BlockData {
public interface Rail extends Waterlogged {
/**
* Gets the value of the 'shape' property.

View File

@@ -0,0 +1,7 @@
package org.bukkit.block.data.type;
import org.bukkit.block.data.Directional;
import org.bukkit.block.data.Waterlogged;
public interface AmethystCluster extends Directional, Waterlogged {
}

View File

@@ -0,0 +1,46 @@
package org.bukkit.block.data.type;
import org.jetbrains.annotations.NotNull;
/**
* 'tilt' indicates how far the leaf is tilted.
*/
public interface BigDripleaf extends Dripleaf {
/**
* Gets the value of the 'tilt' property.
*
* @return the 'tilt' value
*/
@NotNull
Tilt getTilt();
/**
* Sets the value of the 'tilt' property.
*
* @param tilt the new 'tilt' value
*/
void setTilt(@NotNull Tilt tilt);
/**
* The tilt of a leaf.
*/
public enum Tilt {
/**
* No tilt.
*/
NONE,
/**
* Unstable tilt.
*/
UNSTABLE,
/**
* Partial tilt.
*/
PARTIAL,
/**
* Pinball.
*/
FULL;
}
}

View File

@@ -0,0 +1,31 @@
package org.bukkit.block.data.type;
import org.bukkit.block.data.Lightable;
import org.bukkit.block.data.Waterlogged;
/**
* 'candles' represents the number of candles which are present.
*/
public interface Candle extends Lightable, Waterlogged {
/**
* Gets the value of the 'candles' property.
*
* @return the 'candles' value
*/
int getCandles();
/**
* Sets the value of the 'candles' property.
*
* @param candles the new 'candles' value
*/
void setCandles(int candles);
/**
* Gets the maximum allowed value of the 'candles' property.
*
* @return the maximum 'candles' value
*/
int getMaximumCandles();
}

View File

@@ -0,0 +1,6 @@
package org.bukkit.block.data.type;
import org.bukkit.block.data.Ageable;
public interface CaveVines extends Ageable, CaveVinesPlant {
}

View File

@@ -0,0 +1,21 @@
package org.bukkit.block.data.type;
/**
* 'berries' indicates whether the block has berries.
*/
public interface CaveVinesPlant {
/**
* Gets the value of the 'berries' property.
*
* @return the 'berries' value
*/
boolean isBerries();
/**
* Sets the value of the 'berries' property.
*
* @param berries the new 'berries' value
*/
void setBerries(boolean berries);
}

View File

@@ -0,0 +1,7 @@
package org.bukkit.block.data.type;
import org.bukkit.block.data.Directional;
import org.bukkit.block.data.Waterlogged;
public interface Dripleaf extends Directional, Waterlogged {
}

View File

@@ -0,0 +1,7 @@
package org.bukkit.block.data.type;
import org.bukkit.block.data.MultipleFacing;
import org.bukkit.block.data.Waterlogged;
public interface GlowLichen extends MultipleFacing, Waterlogged {
}

View File

@@ -0,0 +1,7 @@
package org.bukkit.block.data.type;
import org.bukkit.block.data.Levelled;
import org.bukkit.block.data.Waterlogged;
public interface Light extends Levelled, Waterlogged {
}

View File

@@ -0,0 +1,8 @@
package org.bukkit.block.data.type;
import org.bukkit.block.data.Directional;
import org.bukkit.block.data.Powerable;
import org.bukkit.block.data.Waterlogged;
public interface LightningRod extends Directional, Powerable, Waterlogged {
}

View File

@@ -0,0 +1,83 @@
package org.bukkit.block.data.type;
import java.util.Set;
import org.bukkit.block.BlockFace;
import org.bukkit.block.data.Waterlogged;
import org.jetbrains.annotations.NotNull;
/**
* 'thickness' represents the dripstone thickness.
* <br>
* 'vertical_direction' represents the dripstone orientation.
* <br>
* Some blocks may not be able to face in all directions, use
* {@link #getVerticalDirections()} to get all possible directions for this
* block.
*/
public interface PointedDripstone extends Waterlogged {
/**
* Gets the value of the 'vertical_direction' property.
*
* @return the 'vertical_direction' value
*/
@NotNull
BlockFace getVerticalDirection();
/**
* Sets the value of the 'vertical_direction' property.
*
* @param direction the new 'vertical_direction' value
*/
void setVerticalDirection(@NotNull BlockFace direction);
/**
* Gets the faces which are applicable to this block.
*
* @return the allowed 'vertical_direction' values
*/
@NotNull
Set<BlockFace> getVerticalDirections();
/**
* Gets the value of the 'thickness' property.
*
* @return the 'thickness' value
*/
@NotNull
Thickness getThickness();
/**
* Sets the value of the 'thickness' property.
*
* @param thickness the new 'thickness' value
*/
void setThickness(@NotNull Thickness thickness);
/**
* Represents the thickness of the dripstone, corresponding to its position
* within a multi-block dripstone formation.
*/
public enum Thickness {
/**
* Extended tip.
*/
TIP_MERGE,
/**
* Just the tip.
*/
TIP,
/**
* Top section.
*/
FRUSTUM,
/**
* Middle section.
*/
MIDDLE,
/**
* Base.
*/
BASE;
}
}

View File

@@ -0,0 +1,45 @@
package org.bukkit.block.data.type;
import org.bukkit.block.data.AnaloguePowerable;
import org.bukkit.block.data.Waterlogged;
import org.jetbrains.annotations.NotNull;
/**
* 'sculk_sensor_phase' indicates the current operational phase of the sensor.
*/
public interface SculkSensor extends AnaloguePowerable, Waterlogged {
/**
* Gets the value of the 'sculk_sensor_phase' property.
*
* @return the 'sculk_sensor_phase' value
*/
@NotNull
Phase getPhase();
/**
* Sets the value of the 'sculk_sensor_phase' property.
*
* @param phase the new 'sculk_sensor_phase' value
*/
void setPhase(@NotNull Phase phase);
/**
* The Phase of the sensor.
*/
public enum Phase {
/**
* The sensor is inactive.
*/
INACTIVE,
/**
* The sensor is active.
*/
ACTIVE,
/**
* The sensor is cooling down.
*/
COOLDOWN;
}
}