mirror of
https://github.com/PaperMC/Paper.git
synced 2025-03-13 11:18:23 +01:00
Update to Minecraft 1.13-pre7
By: md_5 <git@md-5.net>
This commit is contained in:
parent
debc7172fd
commit
767e4f6ccf
199 changed files with 8301 additions and 3637 deletions
|
@ -5,7 +5,7 @@
|
|||
|
||||
<groupId>org.bukkit</groupId>
|
||||
<artifactId>bukkit</artifactId>
|
||||
<version>1.12.2-R0.1-SNAPSHOT</version>
|
||||
<version>1.13-pre7-R0.1-SNAPSHOT</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>Bukkit</name>
|
||||
|
@ -73,7 +73,7 @@
|
|||
<dependency>
|
||||
<groupId>org.yaml</groupId>
|
||||
<artifactId>snakeyaml</artifactId>
|
||||
<version>1.19</version>
|
||||
<version>1.21</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<!-- testing -->
|
||||
|
@ -113,7 +113,7 @@
|
|||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-shade-plugin</artifactId>
|
||||
<version>3.1.0</version>
|
||||
<version>3.1.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
|
@ -138,7 +138,7 @@
|
|||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>animal-sniffer-maven-plugin</artifactId>
|
||||
<version>1.16</version>
|
||||
<version>1.17</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>process-classes</phase>
|
||||
|
|
|
@ -33,9 +33,9 @@ public enum Art {
|
|||
FIGHTERS(20, 4, 2),
|
||||
POINTER(21, 4, 4),
|
||||
PIGSCENE(22, 4, 4),
|
||||
BURNINGSKULL(23, 4, 4),
|
||||
BURNING_SKULL(23, 4, 4),
|
||||
SKELETON(24, 4, 3),
|
||||
DONKEYKONG(25, 4, 3);
|
||||
DONKEY_KONG(25, 4, 3);
|
||||
|
||||
private int id, width, height;
|
||||
private static final HashMap<String, Art> BY_NAME = Maps.newHashMap();
|
||||
|
@ -99,13 +99,13 @@ public enum Art {
|
|||
public static Art getByName(String name) {
|
||||
Validate.notNull(name, "Name cannot be null");
|
||||
|
||||
return BY_NAME.get(name.toLowerCase(java.util.Locale.ENGLISH).replaceAll("_", ""));
|
||||
return BY_NAME.get(name.toLowerCase(java.util.Locale.ENGLISH));
|
||||
}
|
||||
|
||||
static {
|
||||
for (Art art : values()) {
|
||||
BY_ID.put(art.id, art);
|
||||
BY_NAME.put(art.toString().toLowerCase(java.util.Locale.ENGLISH).replaceAll("_", ""), art);
|
||||
BY_NAME.put(art.toString().toLowerCase(java.util.Locale.ENGLISH), art);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
21
paper-api/src/main/java/org/bukkit/Axis.java
Normal file
21
paper-api/src/main/java/org/bukkit/Axis.java
Normal file
|
@ -0,0 +1,21 @@
|
|||
package org.bukkit;
|
||||
|
||||
/**
|
||||
* Represents a mutually perpendicular axis in 3D Cartesian coordinates. In
|
||||
* Minecraft the x, z axes lie in the horizontal plane, whilst the y axis points
|
||||
* upwards.
|
||||
*/
|
||||
public enum Axis {
|
||||
/**
|
||||
* The x axis.
|
||||
*/
|
||||
X,
|
||||
/**
|
||||
* The y axis.
|
||||
*/
|
||||
Y,
|
||||
/**
|
||||
* The z axis.
|
||||
*/
|
||||
Z;
|
||||
}
|
|
@ -1,91 +1,34 @@
|
|||
package org.bukkit;
|
||||
|
||||
import org.bukkit.block.data.BlockData;
|
||||
|
||||
/**
|
||||
* A delegate for handling block changes. This serves as a direct interface
|
||||
* between generation algorithms in the server implementation and utilizing
|
||||
* code.
|
||||
* @deprecated rarely used API that was largely for implementation purposes
|
||||
*/
|
||||
@Deprecated
|
||||
public interface BlockChangeDelegate {
|
||||
|
||||
/**
|
||||
* Set a block type at the specified coordinates without doing all world
|
||||
* updates and notifications.
|
||||
* <p>
|
||||
* It is safe to have this call World.setTypeId, but it may be slower than
|
||||
* World.setRawTypeId.
|
||||
* Set a block data at the specified coordinates.
|
||||
*
|
||||
* @param x X coordinate
|
||||
* @param y Y coordinate
|
||||
* @param z Z coordinate
|
||||
* @param typeId New block ID
|
||||
* @param blockData Block data
|
||||
* @return true if the block was set successfully
|
||||
* @deprecated Magic value
|
||||
*/
|
||||
@Deprecated
|
||||
public boolean setRawTypeId(int x, int y, int z, int typeId);
|
||||
public boolean setBlockData(int x, int y, int z, BlockData blockData);
|
||||
|
||||
/**
|
||||
* Set a block type and data at the specified coordinates without doing
|
||||
* all world updates and notifications.
|
||||
* <p>
|
||||
* It is safe to have this call World.setTypeId, but it may be slower than
|
||||
* World.setRawTypeId.
|
||||
* Get the block data at the location.
|
||||
*
|
||||
* @param x X coordinate
|
||||
* @param y Y coordinate
|
||||
* @param z Z coordinate
|
||||
* @param typeId New block ID
|
||||
* @param data Block data
|
||||
* @return true if the block was set successfully
|
||||
* @deprecated Magic value
|
||||
* @return The block data
|
||||
*/
|
||||
@Deprecated
|
||||
public boolean setRawTypeIdAndData(int x, int y, int z, int typeId, int data);
|
||||
|
||||
/**
|
||||
* Set a block type at the specified coordinates.
|
||||
* <p>
|
||||
* This method cannot call World.setRawTypeId, a full update is needed.
|
||||
*
|
||||
* @param x X coordinate
|
||||
* @param y Y coordinate
|
||||
* @param z Z coordinate
|
||||
* @param typeId New block ID
|
||||
* @return true if the block was set successfully
|
||||
* @deprecated Magic value
|
||||
*/
|
||||
@Deprecated
|
||||
public boolean setTypeId(int x, int y, int z, int typeId);
|
||||
|
||||
/**
|
||||
* Set a block type and data at the specified coordinates.
|
||||
* <p>
|
||||
* This method cannot call World.setRawTypeId, a full update is needed.
|
||||
*
|
||||
* @param x X coordinate
|
||||
* @param y Y coordinate
|
||||
* @param z Z coordinate
|
||||
* @param typeId New block ID
|
||||
* @param data Block data
|
||||
* @return true if the block was set successfully
|
||||
* @deprecated Magic value
|
||||
*/
|
||||
@Deprecated
|
||||
public boolean setTypeIdAndData(int x, int y, int z, int typeId, int data);
|
||||
|
||||
/**
|
||||
* Get the block type at the location.
|
||||
*
|
||||
* @param x X coordinate
|
||||
* @param y Y coordinate
|
||||
* @param z Z coordinate
|
||||
* @return The block ID
|
||||
* @deprecated Magic value
|
||||
*/
|
||||
@Deprecated
|
||||
public int getTypeId(int x, int y, int z);
|
||||
public BlockData getBlockData(int x, int y, int z);
|
||||
|
||||
/**
|
||||
* Gets the height of the world.
|
||||
|
|
|
@ -10,9 +10,11 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.bukkit.Warning.WarningState;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
import org.bukkit.boss.BarColor;
|
||||
import org.bukkit.boss.BarFlag;
|
||||
import org.bukkit.boss.BarStyle;
|
||||
|
@ -1154,6 +1156,77 @@ public final class Bukkit {
|
|||
return server.advancementIterator();
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new {@link BlockData} instance for the specified Material, with
|
||||
* all properties initialized to unspecified defaults.
|
||||
*
|
||||
* @param material the material
|
||||
* @return new data instance
|
||||
*/
|
||||
public static BlockData createBlockData(Material material) {
|
||||
return server.createBlockData(material);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new {@link BlockData} instance for the specified Material, with
|
||||
* all properties initialized to unspecified defaults.
|
||||
*
|
||||
* @param material the material
|
||||
* @param consumer consumer to run on new instance before returning
|
||||
* @return new data instance
|
||||
*/
|
||||
public static BlockData createBlockData(Material material, Consumer<BlockData> consumer) {
|
||||
return server.createBlockData(material, consumer);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new {@link BlockData} instance with material and properties
|
||||
* parsed from provided data.
|
||||
*
|
||||
* @param data data string
|
||||
* @return new data instance
|
||||
* @throws IllegalArgumentException if the specified data is not valid
|
||||
*/
|
||||
public static BlockData createBlockData(String data) throws IllegalArgumentException {
|
||||
return server.createBlockData(data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new {@link BlockData} instance for the specified Material, with
|
||||
* all properties initialized to unspecified defaults, except for those
|
||||
* provided in data.
|
||||
*
|
||||
* @param material the material
|
||||
* @param data data string
|
||||
* @return new data instance
|
||||
* @throws IllegalArgumentException if the specified data is not valid
|
||||
*/
|
||||
public static BlockData createBlockData(Material material, String data) throws IllegalArgumentException {
|
||||
return server.createBlockData(material, data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a tag which has already been defined within the server. Plugins are
|
||||
* suggested to use the concrete tags in {@link Tag} rather than this method
|
||||
* which makes no guarantees about which tags are available, and may also be
|
||||
* less performant due to lack of caching.
|
||||
* <br>
|
||||
* Tags will be searched for in an implementation specific manner, but a
|
||||
* path consisting of namespace/tags/registry/key is expected.
|
||||
* <br>
|
||||
* Server implementations are allowed to handle only the registries
|
||||
* indicated in {@link Tag}.
|
||||
*
|
||||
* @param <T> type of the tag
|
||||
* @param registry the tag registry to look at
|
||||
* @param tag the name of the tag
|
||||
* @param clazz the class of the tag entries
|
||||
* @return the tag or null
|
||||
*/
|
||||
public static <T extends Keyed> Tag<T> getTag(String registry, NamespacedKey tag, Class<T> clazz) {
|
||||
return server.getTag(registry, tag, clazz);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see UnsafeValues
|
||||
* @return the unsafe values instance
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package org.bukkit;
|
||||
|
||||
import org.bukkit.block.Biome;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
|
||||
/**
|
||||
* Represents a static, thread-safe snapshot of chunk of blocks.
|
||||
|
@ -42,16 +43,14 @@ public interface ChunkSnapshot {
|
|||
Material getBlockType(int x, int y, int z);
|
||||
|
||||
/**
|
||||
* Get block type for block at corresponding coordinate in the chunk
|
||||
* Get block data for block at corresponding coordinate in the chunk
|
||||
*
|
||||
* @param x 0-15
|
||||
* @param y 0-127
|
||||
* @param z 0-15
|
||||
* @return 0-255
|
||||
* @deprecated Magic value
|
||||
* @return block material type
|
||||
*/
|
||||
@Deprecated
|
||||
int getBlockTypeId(int x, int y, int z);
|
||||
BlockData getBlockData(int x, int y, int z);
|
||||
|
||||
/**
|
||||
* Get block data for block at corresponding coordinate in the chunk
|
||||
|
@ -63,7 +62,7 @@ public interface ChunkSnapshot {
|
|||
* @deprecated Magic value
|
||||
*/
|
||||
@Deprecated
|
||||
int getBlockData(int x, int y, int z);
|
||||
int getData(int x, int y, int z);
|
||||
|
||||
/**
|
||||
* Get sky light level for block at corresponding coordinate in the chunk
|
||||
|
@ -113,17 +112,6 @@ public interface ChunkSnapshot {
|
|||
*/
|
||||
double getRawBiomeTemperature(int x, int z);
|
||||
|
||||
/**
|
||||
* Get raw biome rainfall (0.0-1.0) at given coordinate
|
||||
*
|
||||
* @param x X-coordinate
|
||||
* @param z Z-coordinate
|
||||
* @return rainfall at given coordinate
|
||||
* @deprecated this is not a chunk property in current Minecraft versions
|
||||
*/
|
||||
@Deprecated
|
||||
double getRawBiomeRainfall(int x, int z);
|
||||
|
||||
/**
|
||||
* Get world full time when chunk snapshot was captured
|
||||
*
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,5 +1,7 @@
|
|||
package org.bukkit;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.material.MaterialData;
|
||||
|
||||
|
@ -32,27 +34,35 @@ public enum Particle {
|
|||
ENCHANTMENT_TABLE,
|
||||
FLAME,
|
||||
LAVA,
|
||||
FOOTSTEP,
|
||||
CLOUD,
|
||||
REDSTONE,
|
||||
REDSTONE(DustOptions.class),
|
||||
SNOWBALL,
|
||||
SNOW_SHOVEL,
|
||||
SLIME,
|
||||
HEART,
|
||||
BARRIER,
|
||||
ITEM_CRACK(ItemStack.class),
|
||||
BLOCK_CRACK(MaterialData.class),
|
||||
BLOCK_DUST(MaterialData.class),
|
||||
BLOCK_CRACK(BlockData.class),
|
||||
BLOCK_DUST(BlockData.class),
|
||||
WATER_DROP,
|
||||
ITEM_TAKE,
|
||||
MOB_APPEARANCE,
|
||||
DRAGON_BREATH,
|
||||
END_ROD,
|
||||
DAMAGE_INDICATOR,
|
||||
SWEEP_ATTACK,
|
||||
FALLING_DUST(MaterialData.class),
|
||||
FALLING_DUST(BlockData.class),
|
||||
TOTEM,
|
||||
SPIT;
|
||||
SPIT,
|
||||
SQUID_INK,
|
||||
BUBBLE_POP,
|
||||
CURRENT_DOWN,
|
||||
BUBBLE_COLUMN_UP,
|
||||
NAUTILUS,
|
||||
DOLPHIN,
|
||||
// ----- Legacy Separator -----
|
||||
LEGACY_BLOCK_CRACK(MaterialData.class),
|
||||
LEGACY_BLOCK_DUST(MaterialData.class),
|
||||
LEGACY_FALLING_DUST(MaterialData.class);
|
||||
|
||||
private final Class<?> dataType;
|
||||
|
||||
|
@ -71,4 +81,38 @@ public enum Particle {
|
|||
public Class<?> getDataType() {
|
||||
return dataType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Options which can be applied to redstone dust particles - a particle
|
||||
* color and size.
|
||||
*/
|
||||
public static class DustOptions {
|
||||
|
||||
private final Color color;
|
||||
private final float size;
|
||||
|
||||
public DustOptions(Color color, float size) {
|
||||
Preconditions.checkArgument(color != null, "color");
|
||||
this.color = color;
|
||||
this.size = size;
|
||||
}
|
||||
|
||||
/**
|
||||
* The color of the particles to be displayed.
|
||||
*
|
||||
* @return particle color
|
||||
*/
|
||||
public Color getColor() {
|
||||
return color;
|
||||
}
|
||||
|
||||
/**
|
||||
* Relative size of the particle.
|
||||
*
|
||||
* @return relative particle size
|
||||
*/
|
||||
public float getSize() {
|
||||
return size;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,9 +10,11 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.bukkit.Warning.WarningState;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
import org.bukkit.boss.BarColor;
|
||||
import org.bukkit.boss.BarFlag;
|
||||
import org.bukkit.boss.BarStyle;
|
||||
|
@ -944,6 +946,67 @@ public interface Server extends PluginMessageRecipient {
|
|||
*/
|
||||
Iterator<Advancement> advancementIterator();
|
||||
|
||||
/**
|
||||
* Creates a new {@link BlockData} instance for the specified Material, with
|
||||
* all properties initialized to unspecified defaults.
|
||||
*
|
||||
* @param material the material
|
||||
* @return new data instance
|
||||
*/
|
||||
BlockData createBlockData(Material material);
|
||||
|
||||
/**
|
||||
* Creates a new {@link BlockData} instance for the specified Material, with
|
||||
* all properties initialized to unspecified defaults.
|
||||
*
|
||||
* @param material the material
|
||||
* @param consumer consumer to run on new instance before returning
|
||||
* @return new data instance
|
||||
*/
|
||||
public BlockData createBlockData(Material material, Consumer<BlockData> consumer);
|
||||
|
||||
/**
|
||||
* Creates a new {@link BlockData} instance with material and properties
|
||||
* parsed from provided data.
|
||||
*
|
||||
* @param data data string
|
||||
* @return new data instance
|
||||
* @throws IllegalArgumentException if the specified data is not valid
|
||||
*/
|
||||
BlockData createBlockData(String data) throws IllegalArgumentException;
|
||||
|
||||
/**
|
||||
* Creates a new {@link BlockData} instance for the specified Material, with
|
||||
* all properties initialized to unspecified defaults, except for those
|
||||
* provided in data.
|
||||
*
|
||||
* @param material the material
|
||||
* @param data data string
|
||||
* @return new data instance
|
||||
* @throws IllegalArgumentException if the specified data is not valid
|
||||
*/
|
||||
BlockData createBlockData(Material material, String data) throws IllegalArgumentException;
|
||||
|
||||
/**
|
||||
* Gets a tag which has already been defined within the server. Plugins are
|
||||
* suggested to use the concrete tags in {@link Tag} rather than this method
|
||||
* which makes no guarantees about which tags are available, and may also be
|
||||
* less performant due to lack of caching.
|
||||
* <br>
|
||||
* Tags will be searched for in an implementation specific manner, but a
|
||||
* path consisting of namespace/tags/registry/key is expected.
|
||||
* <br>
|
||||
* Server implementations are allowed to handle only the registries
|
||||
* indicated in {@link Tag}.
|
||||
*
|
||||
* @param <T> type of the tag
|
||||
* @param registry the tag registry to look at
|
||||
* @param tag the name of the tag
|
||||
* @param clazz the class of the tag entries
|
||||
* @return the tag or null
|
||||
*/
|
||||
<T extends Keyed> Tag<T> getTag(String registry, NamespacedKey tag, Class<T> clazz);
|
||||
|
||||
/**
|
||||
* @see UnsafeValues
|
||||
* @return the unsafe values instance
|
||||
|
|
|
@ -2,7 +2,9 @@ package org.bukkit;
|
|||
|
||||
/**
|
||||
* Represents the different types of skulls.
|
||||
* @deprecated check {@link Material} instead
|
||||
*/
|
||||
@Deprecated
|
||||
public enum SkullType {
|
||||
SKELETON,
|
||||
WITHER,
|
||||
|
|
|
@ -10,6 +10,12 @@ package org.bukkit;
|
|||
*/
|
||||
public enum Sound {
|
||||
AMBIENT_CAVE,
|
||||
AMBIENT_UNDERWATER_ENTER,
|
||||
AMBIENT_UNDERWATER_EXIT,
|
||||
AMBIENT_UNDERWATER_LOOP,
|
||||
AMBIENT_UNDERWATER_LOOP_ADDITIONS,
|
||||
AMBIENT_UNDERWATER_LOOP_ADDITIONS_RARE,
|
||||
AMBIENT_UNDERWATER_LOOP_ADDITIONS_ULTRA_RARE,
|
||||
BLOCK_ANVIL_BREAK,
|
||||
BLOCK_ANVIL_DESTROY,
|
||||
BLOCK_ANVIL_FALL,
|
||||
|
@ -18,24 +24,38 @@ public enum Sound {
|
|||
BLOCK_ANVIL_PLACE,
|
||||
BLOCK_ANVIL_STEP,
|
||||
BLOCK_ANVIL_USE,
|
||||
BLOCK_BEACON_ACTIVATE,
|
||||
BLOCK_BEACON_AMBIENT,
|
||||
BLOCK_BEACON_DEACTIVATE,
|
||||
BLOCK_BEACON_POWER_SELECT,
|
||||
BLOCK_BREWING_STAND_BREW,
|
||||
BLOCK_BUBBLE_COLUMN_BUBBLE_POP,
|
||||
BLOCK_BUBBLE_COLUMN_UPWARDS_AMBIENT,
|
||||
BLOCK_BUBBLE_COLUMN_UPWARDS_INSIDE,
|
||||
BLOCK_BUBBLE_COLUMN_WHIRLPOOL_AMBIENT,
|
||||
BLOCK_BUBBLE_COLUMN_WHIRLPOOL_INSIDE,
|
||||
BLOCK_CHEST_CLOSE,
|
||||
BLOCK_CHEST_LOCKED,
|
||||
BLOCK_CHEST_OPEN,
|
||||
BLOCK_CHORUS_FLOWER_DEATH,
|
||||
BLOCK_CHORUS_FLOWER_GROW,
|
||||
BLOCK_CLOTH_BREAK,
|
||||
BLOCK_CLOTH_FALL,
|
||||
BLOCK_CLOTH_HIT,
|
||||
BLOCK_CLOTH_PLACE,
|
||||
BLOCK_CLOTH_STEP,
|
||||
BLOCK_COMPARATOR_CLICK,
|
||||
BLOCK_CONDUIT_ACTIVATE,
|
||||
BLOCK_CONDUIT_AMBIENT,
|
||||
BLOCK_CONDUIT_AMBIENT_SHORT,
|
||||
BLOCK_CONDUIT_ATTACK_TARGET,
|
||||
BLOCK_CONDUIT_DEACTIVATE,
|
||||
BLOCK_CORAL_BLOCK_BREAK,
|
||||
BLOCK_CORAL_BLOCK_FALL,
|
||||
BLOCK_CORAL_BLOCK_HIT,
|
||||
BLOCK_CORAL_BLOCK_PLACE,
|
||||
BLOCK_CORAL_BLOCK_STEP,
|
||||
BLOCK_DISPENSER_DISPENSE,
|
||||
BLOCK_DISPENSER_FAIL,
|
||||
BLOCK_DISPENSER_LAUNCH,
|
||||
BLOCK_ENCHANTMENT_TABLE_USE,
|
||||
BLOCK_ENDERCHEST_CLOSE,
|
||||
BLOCK_ENDERCHEST_OPEN,
|
||||
BLOCK_ENDER_CHEST_CLOSE,
|
||||
BLOCK_ENDER_CHEST_OPEN,
|
||||
BLOCK_END_GATEWAY_SPAWN,
|
||||
BLOCK_END_PORTAL_FRAME_FILL,
|
||||
BLOCK_END_PORTAL_SPAWN,
|
||||
|
@ -72,29 +92,31 @@ public enum Sound {
|
|||
BLOCK_LAVA_EXTINGUISH,
|
||||
BLOCK_LAVA_POP,
|
||||
BLOCK_LEVER_CLICK,
|
||||
BLOCK_LILY_PAD_PLACE,
|
||||
BLOCK_METAL_BREAK,
|
||||
BLOCK_METAL_FALL,
|
||||
BLOCK_METAL_HIT,
|
||||
BLOCK_METAL_PLACE,
|
||||
BLOCK_METAL_PRESSUREPLATE_CLICK_OFF,
|
||||
BLOCK_METAL_PRESSUREPLATE_CLICK_ON,
|
||||
BLOCK_METAL_PRESSURE_PLATE_CLICK_OFF,
|
||||
BLOCK_METAL_PRESSURE_PLATE_CLICK_ON,
|
||||
BLOCK_METAL_STEP,
|
||||
BLOCK_NOTE_BASEDRUM,
|
||||
BLOCK_NOTE_BASS,
|
||||
BLOCK_NOTE_BELL,
|
||||
BLOCK_NOTE_CHIME,
|
||||
BLOCK_NOTE_FLUTE,
|
||||
BLOCK_NOTE_GUITAR,
|
||||
BLOCK_NOTE_HARP,
|
||||
BLOCK_NOTE_HAT,
|
||||
BLOCK_NOTE_PLING,
|
||||
BLOCK_NOTE_SNARE,
|
||||
BLOCK_NOTE_XYLOPHONE,
|
||||
BLOCK_NOTE_BLOCK_BASEDRUM,
|
||||
BLOCK_NOTE_BLOCK_BASS,
|
||||
BLOCK_NOTE_BLOCK_BELL,
|
||||
BLOCK_NOTE_BLOCK_CHIME,
|
||||
BLOCK_NOTE_BLOCK_FLUTE,
|
||||
BLOCK_NOTE_BLOCK_GUITAR,
|
||||
BLOCK_NOTE_BLOCK_HARP,
|
||||
BLOCK_NOTE_BLOCK_HAT,
|
||||
BLOCK_NOTE_BLOCK_PLING,
|
||||
BLOCK_NOTE_BLOCK_SNARE,
|
||||
BLOCK_NOTE_BLOCK_XYLOPHONE,
|
||||
BLOCK_PISTON_CONTRACT,
|
||||
BLOCK_PISTON_EXTEND,
|
||||
BLOCK_PORTAL_AMBIENT,
|
||||
BLOCK_PORTAL_TRAVEL,
|
||||
BLOCK_PORTAL_TRIGGER,
|
||||
BLOCK_PUMPKIN_CARVE,
|
||||
BLOCK_REDSTONE_TORCH_BURNOUT,
|
||||
BLOCK_SAND_BREAK,
|
||||
BLOCK_SAND_FALL,
|
||||
|
@ -103,11 +125,11 @@ public enum Sound {
|
|||
BLOCK_SAND_STEP,
|
||||
BLOCK_SHULKER_BOX_CLOSE,
|
||||
BLOCK_SHULKER_BOX_OPEN,
|
||||
BLOCK_SLIME_BREAK,
|
||||
BLOCK_SLIME_FALL,
|
||||
BLOCK_SLIME_HIT,
|
||||
BLOCK_SLIME_PLACE,
|
||||
BLOCK_SLIME_STEP,
|
||||
BLOCK_SLIME_BLOCK_BREAK,
|
||||
BLOCK_SLIME_BLOCK_FALL,
|
||||
BLOCK_SLIME_BLOCK_HIT,
|
||||
BLOCK_SLIME_BLOCK_PLACE,
|
||||
BLOCK_SLIME_BLOCK_STEP,
|
||||
BLOCK_SNOW_BREAK,
|
||||
BLOCK_SNOW_FALL,
|
||||
BLOCK_SNOW_HIT,
|
||||
|
@ -119,33 +141,42 @@ public enum Sound {
|
|||
BLOCK_STONE_FALL,
|
||||
BLOCK_STONE_HIT,
|
||||
BLOCK_STONE_PLACE,
|
||||
BLOCK_STONE_PRESSUREPLATE_CLICK_OFF,
|
||||
BLOCK_STONE_PRESSUREPLATE_CLICK_ON,
|
||||
BLOCK_STONE_PRESSURE_PLATE_CLICK_OFF,
|
||||
BLOCK_STONE_PRESSURE_PLATE_CLICK_ON,
|
||||
BLOCK_STONE_STEP,
|
||||
BLOCK_TRIPWIRE_ATTACH,
|
||||
BLOCK_TRIPWIRE_CLICK_OFF,
|
||||
BLOCK_TRIPWIRE_CLICK_ON,
|
||||
BLOCK_TRIPWIRE_DETACH,
|
||||
BLOCK_WATERLILY_PLACE,
|
||||
BLOCK_WATER_AMBIENT,
|
||||
BLOCK_WET_GRASS_BREAK,
|
||||
BLOCK_WET_GRASS_FALL,
|
||||
BLOCK_WET_GRASS_HIT,
|
||||
BLOCK_WET_GRASS_PLACE,
|
||||
BLOCK_WET_GRASS_STEP,
|
||||
BLOCK_WOODEN_BUTTON_CLICK_OFF,
|
||||
BLOCK_WOODEN_BUTTON_CLICK_ON,
|
||||
BLOCK_WOODEN_DOOR_CLOSE,
|
||||
BLOCK_WOODEN_DOOR_OPEN,
|
||||
BLOCK_WOODEN_PRESSURE_PLATE_CLICK_OFF,
|
||||
BLOCK_WOODEN_PRESSURE_PLATE_CLICK_ON,
|
||||
BLOCK_WOODEN_TRAPDOOR_CLOSE,
|
||||
BLOCK_WOODEN_TRAPDOOR_OPEN,
|
||||
BLOCK_WOOD_BREAK,
|
||||
BLOCK_WOOD_BUTTON_CLICK_OFF,
|
||||
BLOCK_WOOD_BUTTON_CLICK_ON,
|
||||
BLOCK_WOOD_FALL,
|
||||
BLOCK_WOOD_HIT,
|
||||
BLOCK_WOOD_PLACE,
|
||||
BLOCK_WOOD_PRESSUREPLATE_CLICK_OFF,
|
||||
BLOCK_WOOD_PRESSUREPLATE_CLICK_ON,
|
||||
BLOCK_WOOD_STEP,
|
||||
BLOCK_WOOL_BREAK,
|
||||
BLOCK_WOOL_FALL,
|
||||
BLOCK_WOOL_HIT,
|
||||
BLOCK_WOOL_PLACE,
|
||||
BLOCK_WOOL_STEP,
|
||||
ENCHANT_THORNS_HIT,
|
||||
ENTITY_ARMORSTAND_BREAK,
|
||||
ENTITY_ARMORSTAND_FALL,
|
||||
ENTITY_ARMORSTAND_HIT,
|
||||
ENTITY_ARMORSTAND_PLACE,
|
||||
ENTITY_ARMOR_STAND_BREAK,
|
||||
ENTITY_ARMOR_STAND_FALL,
|
||||
ENTITY_ARMOR_STAND_HIT,
|
||||
ENTITY_ARMOR_STAND_PLACE,
|
||||
ENTITY_ARROW_HIT,
|
||||
ENTITY_ARROW_HIT_PLAYER,
|
||||
ENTITY_ARROW_SHOOT,
|
||||
|
@ -161,9 +192,6 @@ public enum Sound {
|
|||
ENTITY_BLAZE_SHOOT,
|
||||
ENTITY_BOAT_PADDLE_LAND,
|
||||
ENTITY_BOAT_PADDLE_WATER,
|
||||
ENTITY_BOBBER_RETRIEVE,
|
||||
ENTITY_BOBBER_SPLASH,
|
||||
ENTITY_BOBBER_THROW,
|
||||
ENTITY_CAT_AMBIENT,
|
||||
ENTITY_CAT_DEATH,
|
||||
ENTITY_CAT_HISS,
|
||||
|
@ -175,6 +203,10 @@ public enum Sound {
|
|||
ENTITY_CHICKEN_EGG,
|
||||
ENTITY_CHICKEN_HURT,
|
||||
ENTITY_CHICKEN_STEP,
|
||||
ENTITY_COD_AMBIENT,
|
||||
ENTITY_COD_DEATH,
|
||||
ENTITY_COD_FLOP,
|
||||
ENTITY_COD_HURT,
|
||||
ENTITY_COW_AMBIENT,
|
||||
ENTITY_COW_DEATH,
|
||||
ENTITY_COW_HURT,
|
||||
|
@ -183,11 +215,31 @@ public enum Sound {
|
|||
ENTITY_CREEPER_DEATH,
|
||||
ENTITY_CREEPER_HURT,
|
||||
ENTITY_CREEPER_PRIMED,
|
||||
ENTITY_DOLPHIN_AMBIENT,
|
||||
ENTITY_DOLPHIN_AMBIENT_WATER,
|
||||
ENTITY_DOLPHIN_ATTACK,
|
||||
ENTITY_DOLPHIN_DEATH,
|
||||
ENTITY_DOLPHIN_EAT,
|
||||
ENTITY_DOLPHIN_HURT,
|
||||
ENTITY_DOLPHIN_JUMP,
|
||||
ENTITY_DOLPHIN_PLAY,
|
||||
ENTITY_DOLPHIN_SPLASH,
|
||||
ENTITY_DOLPHIN_SWIM,
|
||||
ENTITY_DONKEY_AMBIENT,
|
||||
ENTITY_DONKEY_ANGRY,
|
||||
ENTITY_DONKEY_CHEST,
|
||||
ENTITY_DONKEY_DEATH,
|
||||
ENTITY_DONKEY_HURT,
|
||||
ENTITY_DRAGON_FIREBALL_EXPLODE,
|
||||
ENTITY_DROWNED_AMBIENT,
|
||||
ENTITY_DROWNED_AMBIENT_WATER,
|
||||
ENTITY_DROWNED_DEATH,
|
||||
ENTITY_DROWNED_DEATH_WATER,
|
||||
ENTITY_DROWNED_HURT,
|
||||
ENTITY_DROWNED_HURT_WATER,
|
||||
ENTITY_DROWNED_SHOOT,
|
||||
ENTITY_DROWNED_STEP,
|
||||
ENTITY_DROWNED_SWIM,
|
||||
ENTITY_EGG_THROW,
|
||||
ENTITY_ELDER_GUARDIAN_AMBIENT,
|
||||
ENTITY_ELDER_GUARDIAN_AMBIENT_LAND,
|
||||
|
@ -197,44 +249,47 @@ public enum Sound {
|
|||
ENTITY_ELDER_GUARDIAN_FLOP,
|
||||
ENTITY_ELDER_GUARDIAN_HURT,
|
||||
ENTITY_ELDER_GUARDIAN_HURT_LAND,
|
||||
ENTITY_ENDERDRAGON_AMBIENT,
|
||||
ENTITY_ENDERDRAGON_DEATH,
|
||||
ENTITY_ENDERDRAGON_FIREBALL_EXPLODE,
|
||||
ENTITY_ENDERDRAGON_FLAP,
|
||||
ENTITY_ENDERDRAGON_GROWL,
|
||||
ENTITY_ENDERDRAGON_HURT,
|
||||
ENTITY_ENDERDRAGON_SHOOT,
|
||||
ENTITY_ENDEREYE_DEATH,
|
||||
ENTITY_ENDEREYE_LAUNCH,
|
||||
ENTITY_ENDERMEN_AMBIENT,
|
||||
ENTITY_ENDERMEN_DEATH,
|
||||
ENTITY_ENDERMEN_HURT,
|
||||
ENTITY_ENDERMEN_SCREAM,
|
||||
ENTITY_ENDERMEN_STARE,
|
||||
ENTITY_ENDERMEN_TELEPORT,
|
||||
ENTITY_ENDERMAN_AMBIENT,
|
||||
ENTITY_ENDERMAN_DEATH,
|
||||
ENTITY_ENDERMAN_HURT,
|
||||
ENTITY_ENDERMAN_SCREAM,
|
||||
ENTITY_ENDERMAN_STARE,
|
||||
ENTITY_ENDERMAN_TELEPORT,
|
||||
ENTITY_ENDERMITE_AMBIENT,
|
||||
ENTITY_ENDERMITE_DEATH,
|
||||
ENTITY_ENDERMITE_HURT,
|
||||
ENTITY_ENDERMITE_STEP,
|
||||
ENTITY_ENDERPEARL_THROW,
|
||||
ENTITY_EVOCATION_FANGS_ATTACK,
|
||||
ENTITY_EVOCATION_ILLAGER_AMBIENT,
|
||||
ENTITY_EVOCATION_ILLAGER_CAST_SPELL,
|
||||
ENTITY_EVOCATION_ILLAGER_DEATH,
|
||||
ENTITY_EVOCATION_ILLAGER_HURT,
|
||||
ENTITY_EVOCATION_ILLAGER_PREPARE_ATTACK,
|
||||
ENTITY_EVOCATION_ILLAGER_PREPARE_SUMMON,
|
||||
ENTITY_EVOCATION_ILLAGER_PREPARE_WOLOLO,
|
||||
ENTITY_ENDER_DRAGON_AMBIENT,
|
||||
ENTITY_ENDER_DRAGON_DEATH,
|
||||
ENTITY_ENDER_DRAGON_FLAP,
|
||||
ENTITY_ENDER_DRAGON_GROWL,
|
||||
ENTITY_ENDER_DRAGON_HURT,
|
||||
ENTITY_ENDER_DRAGON_SHOOT,
|
||||
ENTITY_ENDER_EYE_DEATH,
|
||||
ENTITY_ENDER_EYE_LAUNCH,
|
||||
ENTITY_ENDER_PEARL_THROW,
|
||||
ENTITY_EVOKER_AMBIENT,
|
||||
ENTITY_EVOKER_CAST_SPELL,
|
||||
ENTITY_EVOKER_DEATH,
|
||||
ENTITY_EVOKER_FANGS_ATTACK,
|
||||
ENTITY_EVOKER_HURT,
|
||||
ENTITY_EVOKER_PREPARE_ATTACK,
|
||||
ENTITY_EVOKER_PREPARE_SUMMON,
|
||||
ENTITY_EVOKER_PREPARE_WOLOLO,
|
||||
ENTITY_EXPERIENCE_BOTTLE_THROW,
|
||||
ENTITY_EXPERIENCE_ORB_PICKUP,
|
||||
ENTITY_FIREWORK_BLAST,
|
||||
ENTITY_FIREWORK_BLAST_FAR,
|
||||
ENTITY_FIREWORK_LARGE_BLAST,
|
||||
ENTITY_FIREWORK_LARGE_BLAST_FAR,
|
||||
ENTITY_FIREWORK_LAUNCH,
|
||||
ENTITY_FIREWORK_SHOOT,
|
||||
ENTITY_FIREWORK_TWINKLE,
|
||||
ENTITY_FIREWORK_TWINKLE_FAR,
|
||||
ENTITY_FIREWORK_ROCKET_BLAST,
|
||||
ENTITY_FIREWORK_ROCKET_BLAST_FAR,
|
||||
ENTITY_FIREWORK_ROCKET_LARGE_BLAST,
|
||||
ENTITY_FIREWORK_ROCKET_LARGE_BLAST_FAR,
|
||||
ENTITY_FIREWORK_ROCKET_LAUNCH,
|
||||
ENTITY_FIREWORK_ROCKET_SHOOT,
|
||||
ENTITY_FIREWORK_ROCKET_TWINKLE,
|
||||
ENTITY_FIREWORK_ROCKET_TWINKLE_FAR,
|
||||
ENTITY_FISHING_BOBBER_RETRIEVE,
|
||||
ENTITY_FISHING_BOBBER_SPLASH,
|
||||
ENTITY_FISHING_BOBBER_THROW,
|
||||
ENTITY_FISH_SWIM,
|
||||
ENTITY_GENERIC_BIG_FALL,
|
||||
ENTITY_GENERIC_BURN,
|
||||
ENTITY_GENERIC_DEATH,
|
||||
|
@ -280,32 +335,33 @@ public enum Sound {
|
|||
ENTITY_HOSTILE_SPLASH,
|
||||
ENTITY_HOSTILE_SWIM,
|
||||
ENTITY_HUSK_AMBIENT,
|
||||
ENTITY_HUSK_CONVERTED_TO_ZOMBIE,
|
||||
ENTITY_HUSK_DEATH,
|
||||
ENTITY_HUSK_HURT,
|
||||
ENTITY_HUSK_STEP,
|
||||
ENTITY_ILLUSION_ILLAGER_AMBIENT,
|
||||
ENTITY_ILLUSION_ILLAGER_CAST_SPELL,
|
||||
ENTITY_ILLUSION_ILLAGER_DEATH,
|
||||
ENTITY_ILLUSION_ILLAGER_HURT,
|
||||
ENTITY_ILLUSION_ILLAGER_MIRROR_MOVE,
|
||||
ENTITY_ILLUSION_ILLAGER_PREPARE_BLINDNESS,
|
||||
ENTITY_ILLUSION_ILLAGER_PREPARE_MIRROR,
|
||||
ENTITY_IRONGOLEM_ATTACK,
|
||||
ENTITY_IRONGOLEM_DEATH,
|
||||
ENTITY_IRONGOLEM_HURT,
|
||||
ENTITY_IRONGOLEM_STEP,
|
||||
ENTITY_ITEMFRAME_ADD_ITEM,
|
||||
ENTITY_ITEMFRAME_BREAK,
|
||||
ENTITY_ITEMFRAME_PLACE,
|
||||
ENTITY_ITEMFRAME_REMOVE_ITEM,
|
||||
ENTITY_ITEMFRAME_ROTATE_ITEM,
|
||||
ENTITY_ILLUSIONER_AMBIENT,
|
||||
ENTITY_ILLUSIONER_CAST_SPELL,
|
||||
ENTITY_ILLUSIONER_DEATH,
|
||||
ENTITY_ILLUSIONER_HURT,
|
||||
ENTITY_ILLUSIONER_MIRROR_MOVE,
|
||||
ENTITY_ILLUSIONER_PREPARE_BLINDNESS,
|
||||
ENTITY_ILLUSIONER_PREPARE_MIRROR,
|
||||
ENTITY_IRON_GOLEM_ATTACK,
|
||||
ENTITY_IRON_GOLEM_DEATH,
|
||||
ENTITY_IRON_GOLEM_HURT,
|
||||
ENTITY_IRON_GOLEM_STEP,
|
||||
ENTITY_ITEM_BREAK,
|
||||
ENTITY_ITEM_FRAME_ADD_ITEM,
|
||||
ENTITY_ITEM_FRAME_BREAK,
|
||||
ENTITY_ITEM_FRAME_PLACE,
|
||||
ENTITY_ITEM_FRAME_REMOVE_ITEM,
|
||||
ENTITY_ITEM_FRAME_ROTATE_ITEM,
|
||||
ENTITY_ITEM_PICKUP,
|
||||
ENTITY_LEASHKNOT_BREAK,
|
||||
ENTITY_LEASHKNOT_PLACE,
|
||||
ENTITY_LIGHTNING_IMPACT,
|
||||
ENTITY_LIGHTNING_THUNDER,
|
||||
ENTITY_LINGERINGPOTION_THROW,
|
||||
ENTITY_LEASH_KNOT_BREAK,
|
||||
ENTITY_LEASH_KNOT_PLACE,
|
||||
ENTITY_LIGHTNING_BOLT_IMPACT,
|
||||
ENTITY_LIGHTNING_BOLT_THUNDER,
|
||||
ENTITY_LINGERING_POTION_THROW,
|
||||
ENTITY_LLAMA_AMBIENT,
|
||||
ENTITY_LLAMA_ANGRY,
|
||||
ENTITY_LLAMA_CHEST,
|
||||
|
@ -315,10 +371,13 @@ public enum Sound {
|
|||
ENTITY_LLAMA_SPIT,
|
||||
ENTITY_LLAMA_STEP,
|
||||
ENTITY_LLAMA_SWAG,
|
||||
ENTITY_MAGMACUBE_DEATH,
|
||||
ENTITY_MAGMACUBE_HURT,
|
||||
ENTITY_MAGMACUBE_JUMP,
|
||||
ENTITY_MAGMACUBE_SQUISH,
|
||||
ENTITY_MAGMA_CUBE_DEATH,
|
||||
ENTITY_MAGMA_CUBE_DEATH_SMALL,
|
||||
ENTITY_MAGMA_CUBE_HURT,
|
||||
ENTITY_MAGMA_CUBE_HURT_SMALL,
|
||||
ENTITY_MAGMA_CUBE_JUMP,
|
||||
ENTITY_MAGMA_CUBE_SQUISH,
|
||||
ENTITY_MAGMA_CUBE_SQUISH_SMALL,
|
||||
ENTITY_MINECART_INSIDE,
|
||||
ENTITY_MINECART_RIDING,
|
||||
ENTITY_MOOSHROOM_SHEAR,
|
||||
|
@ -335,15 +394,17 @@ public enum Sound {
|
|||
ENTITY_PARROT_HURT,
|
||||
ENTITY_PARROT_IMITATE_BLAZE,
|
||||
ENTITY_PARROT_IMITATE_CREEPER,
|
||||
ENTITY_PARROT_IMITATE_DROWNED,
|
||||
ENTITY_PARROT_IMITATE_ELDER_GUARDIAN,
|
||||
ENTITY_PARROT_IMITATE_ENDERDRAGON,
|
||||
ENTITY_PARROT_IMITATE_ENDERMAN,
|
||||
ENTITY_PARROT_IMITATE_ENDERMITE,
|
||||
ENTITY_PARROT_IMITATE_EVOCATION_ILLAGER,
|
||||
ENTITY_PARROT_IMITATE_ENDER_DRAGON,
|
||||
ENTITY_PARROT_IMITATE_EVOKER,
|
||||
ENTITY_PARROT_IMITATE_GHAST,
|
||||
ENTITY_PARROT_IMITATE_HUSK,
|
||||
ENTITY_PARROT_IMITATE_ILLUSION_ILLAGER,
|
||||
ENTITY_PARROT_IMITATE_MAGMACUBE,
|
||||
ENTITY_PARROT_IMITATE_ILLUSIONER,
|
||||
ENTITY_PARROT_IMITATE_MAGMA_CUBE,
|
||||
ENTITY_PARROT_IMITATE_PHANTOM,
|
||||
ENTITY_PARROT_IMITATE_POLAR_BEAR,
|
||||
ENTITY_PARROT_IMITATE_SHULKER,
|
||||
ENTITY_PARROT_IMITATE_SILVERFISH,
|
||||
|
@ -352,7 +413,7 @@ public enum Sound {
|
|||
ENTITY_PARROT_IMITATE_SPIDER,
|
||||
ENTITY_PARROT_IMITATE_STRAY,
|
||||
ENTITY_PARROT_IMITATE_VEX,
|
||||
ENTITY_PARROT_IMITATE_VINDICATION_ILLAGER,
|
||||
ENTITY_PARROT_IMITATE_VINDICATOR,
|
||||
ENTITY_PARROT_IMITATE_WITCH,
|
||||
ENTITY_PARROT_IMITATE_WITHER,
|
||||
ENTITY_PARROT_IMITATE_WITHER_SKELETON,
|
||||
|
@ -361,6 +422,12 @@ public enum Sound {
|
|||
ENTITY_PARROT_IMITATE_ZOMBIE_PIGMAN,
|
||||
ENTITY_PARROT_IMITATE_ZOMBIE_VILLAGER,
|
||||
ENTITY_PARROT_STEP,
|
||||
ENTITY_PHANTOM_AMBIENT,
|
||||
ENTITY_PHANTOM_BITE,
|
||||
ENTITY_PHANTOM_DEATH,
|
||||
ENTITY_PHANTOM_FLAP,
|
||||
ENTITY_PHANTOM_HURT,
|
||||
ENTITY_PHANTOM_SWOOP,
|
||||
ENTITY_PIG_AMBIENT,
|
||||
ENTITY_PIG_DEATH,
|
||||
ENTITY_PIG_HURT,
|
||||
|
@ -382,18 +449,30 @@ public enum Sound {
|
|||
ENTITY_PLAYER_LEVELUP,
|
||||
ENTITY_PLAYER_SMALL_FALL,
|
||||
ENTITY_PLAYER_SPLASH,
|
||||
ENTITY_PLAYER_SPLASH_HIGH_SPEED,
|
||||
ENTITY_PLAYER_SWIM,
|
||||
ENTITY_POLAR_BEAR_AMBIENT,
|
||||
ENTITY_POLAR_BEAR_BABY_AMBIENT,
|
||||
ENTITY_POLAR_BEAR_AMBIENT_BABY,
|
||||
ENTITY_POLAR_BEAR_DEATH,
|
||||
ENTITY_POLAR_BEAR_HURT,
|
||||
ENTITY_POLAR_BEAR_STEP,
|
||||
ENTITY_POLAR_BEAR_WARNING,
|
||||
ENTITY_PUFFER_FISH_AMBIENT,
|
||||
ENTITY_PUFFER_FISH_BLOW_OUT,
|
||||
ENTITY_PUFFER_FISH_BLOW_UP,
|
||||
ENTITY_PUFFER_FISH_DEATH,
|
||||
ENTITY_PUFFER_FISH_FLOP,
|
||||
ENTITY_PUFFER_FISH_HURT,
|
||||
ENTITY_PUFFER_FISH_STING,
|
||||
ENTITY_RABBIT_AMBIENT,
|
||||
ENTITY_RABBIT_ATTACK,
|
||||
ENTITY_RABBIT_DEATH,
|
||||
ENTITY_RABBIT_HURT,
|
||||
ENTITY_RABBIT_JUMP,
|
||||
ENTITY_SALMON_AMBIENT,
|
||||
ENTITY_SALMON_DEATH,
|
||||
ENTITY_SALMON_FLOP,
|
||||
ENTITY_SALMON_HURT,
|
||||
ENTITY_SHEEP_AMBIENT,
|
||||
ENTITY_SHEEP_DEATH,
|
||||
ENTITY_SHEEP_HURT,
|
||||
|
@ -416,28 +495,30 @@ public enum Sound {
|
|||
ENTITY_SKELETON_AMBIENT,
|
||||
ENTITY_SKELETON_DEATH,
|
||||
ENTITY_SKELETON_HORSE_AMBIENT,
|
||||
ENTITY_SKELETON_HORSE_AMBIENT_WATER,
|
||||
ENTITY_SKELETON_HORSE_DEATH,
|
||||
ENTITY_SKELETON_HORSE_GALLOP_WATER,
|
||||
ENTITY_SKELETON_HORSE_HURT,
|
||||
ENTITY_SKELETON_HORSE_JUMP_WATER,
|
||||
ENTITY_SKELETON_HORSE_STEP_WATER,
|
||||
ENTITY_SKELETON_HORSE_SWIM,
|
||||
ENTITY_SKELETON_HURT,
|
||||
ENTITY_SKELETON_SHOOT,
|
||||
ENTITY_SKELETON_STEP,
|
||||
ENTITY_SLIME_ATTACK,
|
||||
ENTITY_SLIME_DEATH,
|
||||
ENTITY_SLIME_DEATH_SMALL,
|
||||
ENTITY_SLIME_HURT,
|
||||
ENTITY_SLIME_HURT_SMALL,
|
||||
ENTITY_SLIME_JUMP,
|
||||
ENTITY_SLIME_JUMP_SMALL,
|
||||
ENTITY_SLIME_SQUISH,
|
||||
ENTITY_SMALL_MAGMACUBE_DEATH,
|
||||
ENTITY_SMALL_MAGMACUBE_HURT,
|
||||
ENTITY_SMALL_MAGMACUBE_SQUISH,
|
||||
ENTITY_SMALL_SLIME_DEATH,
|
||||
ENTITY_SMALL_SLIME_HURT,
|
||||
ENTITY_SMALL_SLIME_JUMP,
|
||||
ENTITY_SMALL_SLIME_SQUISH,
|
||||
ENTITY_SLIME_SQUISH_SMALL,
|
||||
ENTITY_SNOWBALL_THROW,
|
||||
ENTITY_SNOWMAN_AMBIENT,
|
||||
ENTITY_SNOWMAN_DEATH,
|
||||
ENTITY_SNOWMAN_HURT,
|
||||
ENTITY_SNOWMAN_SHOOT,
|
||||
ENTITY_SNOW_GOLEM_AMBIENT,
|
||||
ENTITY_SNOW_GOLEM_DEATH,
|
||||
ENTITY_SNOW_GOLEM_HURT,
|
||||
ENTITY_SNOW_GOLEM_SHOOT,
|
||||
ENTITY_SPIDER_AMBIENT,
|
||||
ENTITY_SPIDER_DEATH,
|
||||
ENTITY_SPIDER_HURT,
|
||||
|
@ -447,11 +528,28 @@ public enum Sound {
|
|||
ENTITY_SQUID_AMBIENT,
|
||||
ENTITY_SQUID_DEATH,
|
||||
ENTITY_SQUID_HURT,
|
||||
ENTITY_SQUID_SQUIRT,
|
||||
ENTITY_STRAY_AMBIENT,
|
||||
ENTITY_STRAY_DEATH,
|
||||
ENTITY_STRAY_HURT,
|
||||
ENTITY_STRAY_STEP,
|
||||
ENTITY_TNT_PRIMED,
|
||||
ENTITY_TROPICAL_FISH_AMBIENT,
|
||||
ENTITY_TROPICAL_FISH_DEATH,
|
||||
ENTITY_TROPICAL_FISH_FLOP,
|
||||
ENTITY_TROPICAL_FISH_HURT,
|
||||
ENTITY_TURTLE_AMBIENT_LAND,
|
||||
ENTITY_TURTLE_DEATH,
|
||||
ENTITY_TURTLE_DEATH_BABY,
|
||||
ENTITY_TURTLE_EGG_BREAK,
|
||||
ENTITY_TURTLE_EGG_CRACK,
|
||||
ENTITY_TURTLE_EGG_HATCH,
|
||||
ENTITY_TURTLE_HURT,
|
||||
ENTITY_TURTLE_HURT_BABY,
|
||||
ENTITY_TURTLE_LAY_EGG,
|
||||
ENTITY_TURTLE_SHAMBLE,
|
||||
ENTITY_TURTLE_SHAMBLE_BABY,
|
||||
ENTITY_TURTLE_SWIM,
|
||||
ENTITY_VEX_AMBIENT,
|
||||
ENTITY_VEX_CHARGE,
|
||||
ENTITY_VEX_DEATH,
|
||||
|
@ -460,11 +558,11 @@ public enum Sound {
|
|||
ENTITY_VILLAGER_DEATH,
|
||||
ENTITY_VILLAGER_HURT,
|
||||
ENTITY_VILLAGER_NO,
|
||||
ENTITY_VILLAGER_TRADING,
|
||||
ENTITY_VILLAGER_TRADE,
|
||||
ENTITY_VILLAGER_YES,
|
||||
ENTITY_VINDICATION_ILLAGER_AMBIENT,
|
||||
ENTITY_VINDICATION_ILLAGER_DEATH,
|
||||
ENTITY_VINDICATION_ILLAGER_HURT,
|
||||
ENTITY_VINDICATOR_AMBIENT,
|
||||
ENTITY_VINDICATOR_DEATH,
|
||||
ENTITY_VINDICATOR_HURT,
|
||||
ENTITY_WITCH_AMBIENT,
|
||||
ENTITY_WITCH_DEATH,
|
||||
ENTITY_WITCH_DRINK,
|
||||
|
@ -490,19 +588,21 @@ public enum Sound {
|
|||
ENTITY_WOLF_STEP,
|
||||
ENTITY_WOLF_WHINE,
|
||||
ENTITY_ZOMBIE_AMBIENT,
|
||||
ENTITY_ZOMBIE_ATTACK_DOOR_WOOD,
|
||||
ENTITY_ZOMBIE_ATTACK_IRON_DOOR,
|
||||
ENTITY_ZOMBIE_BREAK_DOOR_WOOD,
|
||||
ENTITY_ZOMBIE_ATTACK_WOODEN_DOOR,
|
||||
ENTITY_ZOMBIE_BREAK_WOODEN_DOOR,
|
||||
ENTITY_ZOMBIE_CONVERTED_TO_DROWNED,
|
||||
ENTITY_ZOMBIE_DEATH,
|
||||
ENTITY_ZOMBIE_DESTROY_EGG,
|
||||
ENTITY_ZOMBIE_HORSE_AMBIENT,
|
||||
ENTITY_ZOMBIE_HORSE_DEATH,
|
||||
ENTITY_ZOMBIE_HORSE_HURT,
|
||||
ENTITY_ZOMBIE_HURT,
|
||||
ENTITY_ZOMBIE_INFECT,
|
||||
ENTITY_ZOMBIE_PIG_AMBIENT,
|
||||
ENTITY_ZOMBIE_PIG_ANGRY,
|
||||
ENTITY_ZOMBIE_PIG_DEATH,
|
||||
ENTITY_ZOMBIE_PIG_HURT,
|
||||
ENTITY_ZOMBIE_PIGMAN_AMBIENT,
|
||||
ENTITY_ZOMBIE_PIGMAN_ANGRY,
|
||||
ENTITY_ZOMBIE_PIGMAN_DEATH,
|
||||
ENTITY_ZOMBIE_PIGMAN_HURT,
|
||||
ENTITY_ZOMBIE_STEP,
|
||||
ENTITY_ZOMBIE_VILLAGER_AMBIENT,
|
||||
ENTITY_ZOMBIE_VILLAGER_CONVERTED,
|
||||
|
@ -517,12 +617,16 @@ public enum Sound {
|
|||
ITEM_ARMOR_EQUIP_GOLD,
|
||||
ITEM_ARMOR_EQUIP_IRON,
|
||||
ITEM_ARMOR_EQUIP_LEATHER,
|
||||
ITEM_ARMOR_EQUIP_TURTLE,
|
||||
ITEM_AXE_STRIP,
|
||||
ITEM_BOTTLE_EMPTY,
|
||||
ITEM_BOTTLE_FILL,
|
||||
ITEM_BOTTLE_FILL_DRAGONBREATH,
|
||||
ITEM_BUCKET_EMPTY,
|
||||
ITEM_BUCKET_EMPTY_FISH,
|
||||
ITEM_BUCKET_EMPTY_LAVA,
|
||||
ITEM_BUCKET_FILL,
|
||||
ITEM_BUCKET_FILL_FISH,
|
||||
ITEM_BUCKET_FILL_LAVA,
|
||||
ITEM_CHORUS_FRUIT_TELEPORT,
|
||||
ITEM_ELYTRA_FLYING,
|
||||
|
@ -533,29 +637,38 @@ public enum Sound {
|
|||
ITEM_SHIELD_BREAK,
|
||||
ITEM_SHOVEL_FLATTEN,
|
||||
ITEM_TOTEM_USE,
|
||||
ITEM_TRIDENT_HIT,
|
||||
ITEM_TRIDENT_HIT_GROUND,
|
||||
ITEM_TRIDENT_RETURN,
|
||||
ITEM_TRIDENT_RIPTIDE_1,
|
||||
ITEM_TRIDENT_RIPTIDE_2,
|
||||
ITEM_TRIDENT_RIPTIDE_3,
|
||||
ITEM_TRIDENT_THROW,
|
||||
ITEM_TRIDENT_THUNDER,
|
||||
MUSIC_CREATIVE,
|
||||
MUSIC_CREDITS,
|
||||
MUSIC_DISC_11,
|
||||
MUSIC_DISC_13,
|
||||
MUSIC_DISC_BLOCKS,
|
||||
MUSIC_DISC_CAT,
|
||||
MUSIC_DISC_CHIRP,
|
||||
MUSIC_DISC_FAR,
|
||||
MUSIC_DISC_MALL,
|
||||
MUSIC_DISC_MELLOHI,
|
||||
MUSIC_DISC_STAL,
|
||||
MUSIC_DISC_STRAD,
|
||||
MUSIC_DISC_WAIT,
|
||||
MUSIC_DISC_WARD,
|
||||
MUSIC_DRAGON,
|
||||
MUSIC_END,
|
||||
MUSIC_GAME,
|
||||
MUSIC_MENU,
|
||||
MUSIC_NETHER,
|
||||
RECORD_11,
|
||||
RECORD_13,
|
||||
RECORD_BLOCKS,
|
||||
RECORD_CAT,
|
||||
RECORD_CHIRP,
|
||||
RECORD_FAR,
|
||||
RECORD_MALL,
|
||||
RECORD_MELLOHI,
|
||||
RECORD_STAL,
|
||||
RECORD_STRAD,
|
||||
RECORD_WAIT,
|
||||
RECORD_WARD,
|
||||
MUSIC_UNDER_WATER,
|
||||
UI_BUTTON_CLICK,
|
||||
UI_TOAST_CHALLENGE_COMPLETE,
|
||||
UI_TOAST_IN,
|
||||
UI_TOAST_OUT,
|
||||
WEATHER_RAIN,
|
||||
WEATHER_RAIN_ABOVE;
|
||||
WEATHER_RAIN_ABOVE,
|
||||
}
|
||||
|
|
|
@ -13,16 +13,17 @@ public enum Statistic {
|
|||
ANIMALS_BRED,
|
||||
LEAVE_GAME,
|
||||
JUMP,
|
||||
DROP_COUNT,
|
||||
DROP(Type.ITEM),
|
||||
PICKUP(Type.ITEM),
|
||||
PLAY_ONE_TICK,
|
||||
PLAY_ONE_MINUTE,
|
||||
WALK_ONE_CM,
|
||||
SWIM_ONE_CM,
|
||||
WALK_ON_WATER_ONE_CM,
|
||||
FALL_ONE_CM,
|
||||
SNEAK_TIME,
|
||||
CLIMB_ONE_CM,
|
||||
FLY_ONE_CM,
|
||||
DIVE_ONE_CM,
|
||||
WALK_UNDER_WATER_ONE_CM,
|
||||
MINECART_ONE_CM,
|
||||
BOAT_ONE_CM,
|
||||
PIG_ONE_CM,
|
||||
|
@ -60,7 +61,9 @@ public enum Statistic {
|
|||
CRAFTING_TABLE_INTERACTION,
|
||||
CHEST_OPENED,
|
||||
SLEEP_IN_BED,
|
||||
SHULKER_BOX_OPENED;
|
||||
SHULKER_BOX_OPENED,
|
||||
TIME_SINCE_REST,
|
||||
SWIM_ONE_CM;
|
||||
|
||||
private final Type type;
|
||||
|
||||
|
|
188
paper-api/src/main/java/org/bukkit/Tag.java
Normal file
188
paper-api/src/main/java/org/bukkit/Tag.java
Normal file
|
@ -0,0 +1,188 @@
|
|||
package org.bukkit;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* Represents a tag that may be defined by the server or a resource pack to
|
||||
* group like things together.
|
||||
*
|
||||
* @param <T> the type of things grouped by this tag
|
||||
*/
|
||||
public interface Tag<T extends Keyed> {
|
||||
|
||||
/**
|
||||
* Key for the built in block registry.
|
||||
*/
|
||||
String REGISTRY_BLOCKS = "blocks";
|
||||
/**
|
||||
* Vanilla block tag representing all colors of wool.
|
||||
*/
|
||||
Tag<Material> WOOL = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("wool"), Material.class);
|
||||
/**
|
||||
* Vanilla block tag representing all plank variants.
|
||||
*/
|
||||
Tag<Material> PLANKS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("planks"), Material.class);
|
||||
/**
|
||||
* Vanilla block tag representing all regular/mossy/cracked/chiseled stone
|
||||
* bricks.
|
||||
*/
|
||||
Tag<Material> STONE_BRICKS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("stone_bricks"), Material.class);
|
||||
/**
|
||||
* Vanilla block tag representing all wooden buttons.
|
||||
*/
|
||||
Tag<Material> WOODEN_BUTTONS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("wooden_buttons"), Material.class);
|
||||
/**
|
||||
* Vanilla block tag representing all buttons (inherits from
|
||||
* {@link #WOODEN_BUTTONS}.
|
||||
*/
|
||||
Tag<Material> BUTTONS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("buttons"), Material.class);
|
||||
/**
|
||||
* Vanilla block tag representing all colors of carpet.
|
||||
*/
|
||||
Tag<Material> CARPETS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("carpets"), Material.class);
|
||||
/**
|
||||
* Vanilla block tag representing all wooden doors.
|
||||
*/
|
||||
Tag<Material> WOODEN_DOORS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("wooden_doors"), Material.class);
|
||||
/**
|
||||
* Vanilla block tag representing all wooden stairs.
|
||||
*/
|
||||
Tag<Material> WOODEN_STAIRS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("wooden_stairs"), Material.class);
|
||||
/**
|
||||
* Vanilla block tag representing all wooden slabs.
|
||||
*/
|
||||
Tag<Material> WOODEN_SLABS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("wooden_slabs"), Material.class);
|
||||
/**
|
||||
* Vanilla block tag representing all wooden pressure plates.
|
||||
*/
|
||||
Tag<Material> WOODEN_PRESSURE_PLATES = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("wooden_pressure_plates"), Material.class);
|
||||
/**
|
||||
* Vanilla block tag representing all doors (inherits from
|
||||
* {@link #WOODEN_DOORS}.
|
||||
*/
|
||||
Tag<Material> DOORS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("doors"), Material.class);
|
||||
/**
|
||||
* Vanilla block tag representing all sapling variants.
|
||||
*/
|
||||
Tag<Material> SAPLINGS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("saplings"), Material.class);
|
||||
/**
|
||||
* Vanilla block tag representing all log and bark variants.
|
||||
*/
|
||||
Tag<Material> LOGS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("logs"), Material.class);
|
||||
/**
|
||||
* Vanilla block tag representing all dark oak log and bark variants.
|
||||
*/
|
||||
Tag<Material> DARK_OAK_LOGS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("dark_oak_logs"), Material.class);
|
||||
/**
|
||||
* Vanilla block tag representing all oak log and bark variants.
|
||||
*/
|
||||
Tag<Material> OAK_LOGS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("oak_logs"), Material.class);
|
||||
/**
|
||||
* Vanilla block tag representing all birch log and bark variants.
|
||||
*/
|
||||
Tag<Material> BIRCH_LOGS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("birch_logs"), Material.class);
|
||||
/**
|
||||
* Vanilla block tag representing all acacia log and bark variants.
|
||||
*/
|
||||
Tag<Material> ACACIA_LOGS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("acacia_logs"), Material.class);
|
||||
/**
|
||||
* Vanilla block tag representing all jungle log and bark variants.
|
||||
*/
|
||||
Tag<Material> JUNGLE_LOGS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("jungle_logs"), Material.class);
|
||||
/**
|
||||
* Vanilla block tag representing all spruce log and bark variants.
|
||||
*/
|
||||
Tag<Material> SPRUCE_LOGS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("spruce_logs"), Material.class);
|
||||
/**
|
||||
* Vanilla block tag representing all banner blocks.
|
||||
*/
|
||||
Tag<Material> BANNERS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("banners"), Material.class);
|
||||
/**
|
||||
* Vanilla block tag representing all sand blocks.
|
||||
*/
|
||||
Tag<Material> SAND = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("sand"), Material.class);
|
||||
/**
|
||||
* Vanilla block tag representing all stairs.
|
||||
*/
|
||||
Tag<Material> STAIRS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("stairs"), Material.class);
|
||||
/**
|
||||
* Vanilla block tag representing all slabs.
|
||||
*/
|
||||
Tag<Material> SLABS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("slabs"), Material.class);
|
||||
/**
|
||||
* Vanilla block tag representing all damaged and undamaged anvils.
|
||||
*/
|
||||
Tag<Material> ANVIL = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("anvil"), Material.class);
|
||||
/**
|
||||
* Vanilla block tag representing all damaged and undamaged anvils.
|
||||
*/
|
||||
Tag<Material> RAILS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("rails"), Material.class);
|
||||
/**
|
||||
* Vanilla block tag representing all live coral.
|
||||
*/
|
||||
Tag<Material> LIVE_CORAL_BLOCKS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("live_coral_blocks"), Material.class);
|
||||
/**
|
||||
* Vanilla block tag representing all dead coral.
|
||||
*/
|
||||
Tag<Material> DEAD_CORAL_BLOCKS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("dead_coral_blocks"), Material.class);
|
||||
/**
|
||||
* Vanilla block tag representing all coral.
|
||||
*/
|
||||
Tag<Material> CORAL_BLOCKS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("coral_blocks"), Material.class);
|
||||
/**
|
||||
* Vanilla block tag representing all coral.
|
||||
*/
|
||||
Tag<Material> CORALS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("corals"), Material.class);
|
||||
/**
|
||||
* Vanilla block tag representing all coral fans.
|
||||
*/
|
||||
Tag<Material> CORAL_FANS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("coral_fans"), Material.class);
|
||||
/**
|
||||
* Vanilla block tag representing all leaves fans.
|
||||
*/
|
||||
Tag<Material> LEAVES = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("leaves"), Material.class);
|
||||
/**
|
||||
* Vanilla block tag representing all empty and filled flower pots.
|
||||
*/
|
||||
Tag<Material> FLOWER_POTS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("flower_pots"), Material.class);
|
||||
/**
|
||||
* Vanilla block tag denoting blocks that enderman may pick up and hold.
|
||||
*/
|
||||
Tag<Material> ENDERMAN_HOLDABLE = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("enderman_holdable"), Material.class);
|
||||
/**
|
||||
* Vanilla block tag denoting ice blocks.
|
||||
*/
|
||||
Tag<Material> ICE = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("ice"), Material.class);
|
||||
/**
|
||||
* Key for the built in item registry.
|
||||
*/
|
||||
String REGISTRY_ITEMS = "items";
|
||||
/**
|
||||
* Vanilla item tag representing all banner items.
|
||||
*/
|
||||
Tag<Material> ITEMS_BANNERS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("banners"), Material.class);
|
||||
/**
|
||||
* Vanilla item tag representing all boat items.
|
||||
*/
|
||||
Tag<Material> ITEMS_BOATS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("boats"), Material.class);
|
||||
/**
|
||||
* Vanilla item tag representing all fish items.
|
||||
*/
|
||||
Tag<Material> ITEMS_FISHES = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("fishes"), Material.class);
|
||||
|
||||
/**
|
||||
* Returns whether or not this tag has an entry for the specified item.
|
||||
*
|
||||
* @param item to check
|
||||
* @return if it is tagged
|
||||
*/
|
||||
boolean isTagged(T item);
|
||||
|
||||
/**
|
||||
* Gets an immutable set of all tagged items.
|
||||
*
|
||||
* @return set of tagged items
|
||||
*/
|
||||
Set<T> getValues();
|
||||
|
||||
}
|
|
@ -1,9 +1,10 @@
|
|||
package org.bukkit;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.bukkit.advancement.Advancement;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.material.MaterialData;
|
||||
import org.bukkit.plugin.PluginDescriptionFile;
|
||||
|
||||
/**
|
||||
* This interface provides value conversions that may be specific to a
|
||||
|
@ -16,17 +17,21 @@ import org.bukkit.inventory.ItemStack;
|
|||
@Deprecated
|
||||
public interface UnsafeValues {
|
||||
|
||||
Material getMaterialFromInternalName(String name);
|
||||
Material toLegacy(Material material);
|
||||
|
||||
List<String> tabCompleteInternalMaterialName(String token, List<String> completions);
|
||||
Material fromLegacy(Material material);
|
||||
|
||||
Material fromLegacy(MaterialData material);
|
||||
|
||||
BlockData fromLegacy(Material material, byte data);
|
||||
|
||||
int getDataVersion();
|
||||
|
||||
ItemStack modifyItemStack(ItemStack stack, String arguments);
|
||||
|
||||
Statistic getStatisticFromInternalName(String name);
|
||||
void checkSupported(PluginDescriptionFile pdf);
|
||||
|
||||
Achievement getAchievementFromInternalName(String name);
|
||||
|
||||
List<String> tabCompleteInternalStatisticOrAchievementName(String token, List<String> completions);
|
||||
byte[] processClass(PluginDescriptionFile pdf, byte[] clazz);
|
||||
|
||||
/**
|
||||
* Load an advancement represented by the specified string into the server.
|
||||
|
|
|
@ -10,6 +10,7 @@ import java.util.UUID;
|
|||
|
||||
import org.bukkit.block.Biome;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
import org.bukkit.entity.*;
|
||||
import org.bukkit.generator.BlockPopulator;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
@ -31,8 +32,6 @@ public interface World extends PluginMessageRecipient, Metadatable {
|
|||
* @param y Y-coordinate of the block
|
||||
* @param z Z-coordinate of the block
|
||||
* @return Block at the given coordinates
|
||||
* @see #getBlockTypeIdAt(int, int, int) Returns the current type ID of
|
||||
* the block
|
||||
*/
|
||||
public Block getBlockAt(int x, int y, int z);
|
||||
|
||||
|
@ -41,37 +40,9 @@ public interface World extends PluginMessageRecipient, Metadatable {
|
|||
*
|
||||
* @param location Location of the block
|
||||
* @return Block at the given location
|
||||
* @see #getBlockTypeIdAt(org.bukkit.Location) Returns the current type ID
|
||||
* of the block
|
||||
*/
|
||||
public Block getBlockAt(Location location);
|
||||
|
||||
/**
|
||||
* Gets the block type ID at the given coordinates
|
||||
*
|
||||
* @param x X-coordinate of the block
|
||||
* @param y Y-coordinate of the block
|
||||
* @param z Z-coordinate of the block
|
||||
* @return Type ID of the block at the given coordinates
|
||||
* @see #getBlockAt(int, int, int) Returns a live Block object at the
|
||||
* given location
|
||||
* @deprecated Magic value
|
||||
*/
|
||||
@Deprecated
|
||||
public int getBlockTypeIdAt(int x, int y, int z);
|
||||
|
||||
/**
|
||||
* Gets the block type ID at the given {@link Location}
|
||||
*
|
||||
* @param location Location of the block
|
||||
* @return Type ID of the block at the given location
|
||||
* @see #getBlockAt(org.bukkit.Location) Returns a live Block object at
|
||||
* the given location
|
||||
* @deprecated Magic value
|
||||
*/
|
||||
@Deprecated
|
||||
public int getBlockTypeIdAt(Location location);
|
||||
|
||||
/**
|
||||
* Gets the y coordinate of the lowest block at this position such that the
|
||||
* block and all blocks above it are transparent for lighting purposes.
|
||||
|
@ -358,9 +329,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
|
|||
* @param delegate A class to call for each block changed as a result of
|
||||
* this method
|
||||
* @return true if the tree was created successfully, otherwise false
|
||||
* @deprecated rarely used API that was largely for implementation purposes
|
||||
*/
|
||||
@Deprecated
|
||||
public boolean generateTree(Location loc, TreeType type, BlockChangeDelegate delegate);
|
||||
|
||||
/**
|
||||
|
@ -757,6 +726,22 @@ public interface World extends PluginMessageRecipient, Metadatable {
|
|||
* material.isBlock()}. The Material may not be air.
|
||||
*
|
||||
* @param location The {@link Location} to spawn the FallingBlock
|
||||
* @param data The block data
|
||||
* @return The spawned {@link FallingBlock} instance
|
||||
* @throws IllegalArgumentException if {@link Location} or {@link
|
||||
* BlockData} are null
|
||||
*/
|
||||
public FallingBlock spawnFallingBlock(Location location, BlockData data) throws IllegalArgumentException;
|
||||
|
||||
/**
|
||||
* Spawn a {@link FallingBlock} entity at the given {@link Location} of the
|
||||
* specified {@link Material}. The material dictates what is falling.
|
||||
* When the FallingBlock hits the ground, it will place that block.
|
||||
* <p>
|
||||
* The Material must be a block type, check with {@link Material#isBlock()
|
||||
* material.isBlock()}. The Material may not be air.
|
||||
*
|
||||
* @param location The {@link Location} to spawn the FallingBlock
|
||||
* @param material The block {@link Material} type
|
||||
* @param data The block data
|
||||
* @return The spawned {@link FallingBlock} instance
|
||||
|
@ -767,22 +752,6 @@ public interface World extends PluginMessageRecipient, Metadatable {
|
|||
@Deprecated
|
||||
public FallingBlock spawnFallingBlock(Location location, Material material, byte data) throws IllegalArgumentException;
|
||||
|
||||
/**
|
||||
* Spawn a {@link FallingBlock} entity at the given {@link Location} of
|
||||
* the specified blockId (converted to {@link Material})
|
||||
*
|
||||
* @param location The {@link Location} to spawn the FallingBlock
|
||||
* @param blockId The id of the intended material
|
||||
* @param blockData The block data
|
||||
* @return The spawned FallingBlock instance
|
||||
* @throws IllegalArgumentException if location is null, or blockId is
|
||||
* invalid
|
||||
* @see #spawnFallingBlock(org.bukkit.Location, org.bukkit.Material, byte)
|
||||
* @deprecated Magic value
|
||||
*/
|
||||
@Deprecated
|
||||
public FallingBlock spawnFallingBlock(Location location, int blockId, byte blockData) throws IllegalArgumentException;
|
||||
|
||||
/**
|
||||
* Plays an effect to all players within a default radius around a given
|
||||
* location.
|
||||
|
@ -838,11 +807,11 @@ public interface World extends PluginMessageRecipient, Metadatable {
|
|||
* @param z - chunk z coordinate
|
||||
* @param includeBiome - if true, snapshot includes per-coordinate biome
|
||||
* type
|
||||
* @param includeBiomeTempRain - if true, snapshot includes per-coordinate
|
||||
* raw biome temperature and rainfall
|
||||
* @param includeBiomeTemp - if true, snapshot includes per-coordinate
|
||||
* raw biome temperature
|
||||
* @return The empty snapshot.
|
||||
*/
|
||||
public ChunkSnapshot getEmptyChunkSnapshot(int x, int z, boolean includeBiome, boolean includeBiomeTempRain);
|
||||
public ChunkSnapshot getEmptyChunkSnapshot(int x, int z, boolean includeBiome, boolean includeBiomeTemp);
|
||||
|
||||
/**
|
||||
* Sets the spawn flags for this.
|
||||
|
|
|
@ -12,7 +12,8 @@ public enum WorldType {
|
|||
VERSION_1_1("DEFAULT_1_1"),
|
||||
LARGE_BIOMES("LARGEBIOMES"),
|
||||
AMPLIFIED("AMPLIFIED"),
|
||||
CUSTOMIZED("CUSTOMIZED");
|
||||
CUSTOMIZED("CUSTOMIZED"),
|
||||
BUFFET("BUFFET");
|
||||
|
||||
private final static Map<String, WorldType> BY_NAME = Maps.newHashMap();
|
||||
private final String name;
|
||||
|
|
|
@ -4,5 +4,7 @@ import org.bukkit.material.Colorable;
|
|||
|
||||
/**
|
||||
* Represents a captured state of a bed.
|
||||
* @deprecated does not provide useful information beyond the material itself
|
||||
*/
|
||||
@Deprecated
|
||||
public interface Bed extends BlockState, Colorable { }
|
||||
|
|
|
@ -7,63 +7,74 @@ public enum Biome {
|
|||
OCEAN,
|
||||
PLAINS,
|
||||
DESERT,
|
||||
EXTREME_HILLS,
|
||||
MOUNTAINS,
|
||||
FOREST,
|
||||
TAIGA,
|
||||
SWAMPLAND,
|
||||
SWAMP,
|
||||
RIVER,
|
||||
HELL,
|
||||
SKY,
|
||||
NETHER,
|
||||
THE_END,
|
||||
FROZEN_OCEAN,
|
||||
FROZEN_RIVER,
|
||||
ICE_FLATS,
|
||||
ICE_MOUNTAINS,
|
||||
MUSHROOM_ISLAND,
|
||||
MUSHROOM_ISLAND_SHORE,
|
||||
BEACHES,
|
||||
SNOWY_TUNDRA,
|
||||
SNOWY_MOUNTAINS,
|
||||
MUSHROOM_FIELDS,
|
||||
MUSHROOM_FIELD_SHORE,
|
||||
BEACH,
|
||||
DESERT_HILLS,
|
||||
FOREST_HILLS,
|
||||
WOODED_HILLS,
|
||||
TAIGA_HILLS,
|
||||
SMALLER_EXTREME_HILLS,
|
||||
MOUNTAIN_EDGE,
|
||||
JUNGLE,
|
||||
JUNGLE_HILLS,
|
||||
JUNGLE_EDGE,
|
||||
DEEP_OCEAN,
|
||||
STONE_BEACH,
|
||||
COLD_BEACH,
|
||||
STONE_SHORE,
|
||||
SNOWY_BEACH,
|
||||
BIRCH_FOREST,
|
||||
BIRCH_FOREST_HILLS,
|
||||
ROOFED_FOREST,
|
||||
TAIGA_COLD,
|
||||
TAIGA_COLD_HILLS,
|
||||
REDWOOD_TAIGA,
|
||||
REDWOOD_TAIGA_HILLS,
|
||||
EXTREME_HILLS_WITH_TREES,
|
||||
DARK_FOREST,
|
||||
SNOWY_TAIGA,
|
||||
SNOWY_TAIGA_HILLS,
|
||||
GIANT_TREE_TAIGA,
|
||||
GIANT_TREE_TAIGA_HILLS,
|
||||
WOODED_MOUNTAINS,
|
||||
SAVANNA,
|
||||
SAVANNA_ROCK,
|
||||
MESA,
|
||||
MESA_ROCK,
|
||||
MESA_CLEAR_ROCK,
|
||||
VOID,
|
||||
MUTATED_PLAINS,
|
||||
MUTATED_DESERT,
|
||||
MUTATED_EXTREME_HILLS,
|
||||
MUTATED_FOREST,
|
||||
MUTATED_TAIGA,
|
||||
MUTATED_SWAMPLAND,
|
||||
MUTATED_ICE_FLATS,
|
||||
MUTATED_JUNGLE,
|
||||
MUTATED_JUNGLE_EDGE,
|
||||
MUTATED_BIRCH_FOREST,
|
||||
MUTATED_BIRCH_FOREST_HILLS,
|
||||
MUTATED_ROOFED_FOREST,
|
||||
MUTATED_TAIGA_COLD,
|
||||
MUTATED_REDWOOD_TAIGA,
|
||||
MUTATED_REDWOOD_TAIGA_HILLS,
|
||||
MUTATED_EXTREME_HILLS_WITH_TREES,
|
||||
MUTATED_SAVANNA,
|
||||
MUTATED_SAVANNA_ROCK,
|
||||
MUTATED_MESA,
|
||||
MUTATED_MESA_ROCK,
|
||||
MUTATED_MESA_CLEAR_ROCK
|
||||
SAVANNA_PLATEAU,
|
||||
BADLANDS,
|
||||
WOODED_BADLANDS_PLATEAU,
|
||||
BADLANDS_PLATEAU,
|
||||
SMALL_END_ISLANDS,
|
||||
END_MIDLANDS,
|
||||
END_HIGHLANDS,
|
||||
END_BARRENS,
|
||||
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,
|
||||
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,
|
||||
ERODED_BADLANDS,
|
||||
MODIFIED_WOODED_BADLANDS_PLATEAU,
|
||||
MODIFIED_BADLANDS_PLATEAU
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@ import org.bukkit.Chunk;
|
|||
import org.bukkit.Material;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.metadata.Metadatable;
|
||||
|
||||
|
@ -14,6 +15,11 @@ import org.bukkit.metadata.Metadatable;
|
|||
* any given location in a world. The state of the block may change
|
||||
* concurrently to your own handling of it; use block.getState() to get a
|
||||
* snapshot state of a block which will not be modified.
|
||||
*
|
||||
* <br>
|
||||
* Note that parts of this class which require access to the world at large
|
||||
* (i.e. lighting and power) may not be able to be safely accessed during world
|
||||
* generation when used in cases like BlockPhysicsEvent!!!!
|
||||
*/
|
||||
public interface Block extends Metadatable {
|
||||
|
||||
|
@ -26,6 +32,13 @@ public interface Block extends Metadatable {
|
|||
@Deprecated
|
||||
byte getData();
|
||||
|
||||
/**
|
||||
* Gets the complete block data for this block
|
||||
*
|
||||
* @return block specific data
|
||||
*/
|
||||
BlockData getBlockData();
|
||||
|
||||
/**
|
||||
* Gets the block at the given offsets
|
||||
*
|
||||
|
@ -72,15 +85,6 @@ public interface Block extends Metadatable {
|
|||
*/
|
||||
Material getType();
|
||||
|
||||
/**
|
||||
* Gets the type-id of this block
|
||||
*
|
||||
* @return block type-id
|
||||
* @deprecated Magic value
|
||||
*/
|
||||
@Deprecated
|
||||
int getTypeId();
|
||||
|
||||
/**
|
||||
* Gets the light level between 0-15
|
||||
*
|
||||
|
@ -179,6 +183,21 @@ public interface Block extends Metadatable {
|
|||
@Deprecated
|
||||
void setData(byte data, boolean applyPhysics);
|
||||
|
||||
/**
|
||||
* Sets the complete data for this block
|
||||
*
|
||||
* @param data new block specific data
|
||||
*/
|
||||
void setBlockData(BlockData data);
|
||||
|
||||
/**
|
||||
* Sets the complete data for this block
|
||||
*
|
||||
* @param data new block specific data
|
||||
* @param applyPhysics false to cancel physics from the changed block
|
||||
*/
|
||||
void setBlockData(BlockData data, boolean applyPhysics);
|
||||
|
||||
/**
|
||||
* Sets the type of this block
|
||||
*
|
||||
|
@ -194,39 +213,6 @@ public interface Block extends Metadatable {
|
|||
*/
|
||||
void setType(Material type, boolean applyPhysics);
|
||||
|
||||
/**
|
||||
* Sets the type-id of this block
|
||||
*
|
||||
* @param type Type-Id to change this block to
|
||||
* @return whether the block was changed
|
||||
* @deprecated Magic value
|
||||
*/
|
||||
@Deprecated
|
||||
boolean setTypeId(int type);
|
||||
|
||||
/**
|
||||
* Sets the type-id of this block
|
||||
*
|
||||
* @param type Type-Id to change this block to
|
||||
* @param applyPhysics False to cancel physics on the changed block.
|
||||
* @return whether the block was changed
|
||||
* @deprecated Magic value
|
||||
*/
|
||||
@Deprecated
|
||||
boolean setTypeId(int type, boolean applyPhysics);
|
||||
|
||||
/**
|
||||
* Sets the type-id of this block
|
||||
*
|
||||
* @param type Type-Id to change this block to
|
||||
* @param data The data value to change this block to
|
||||
* @param applyPhysics False to cancel physics on the changed block
|
||||
* @return whether the block was changed
|
||||
* @deprecated Magic value
|
||||
*/
|
||||
@Deprecated
|
||||
boolean setTypeIdAndData(int type, byte data, boolean applyPhysics);
|
||||
|
||||
/**
|
||||
* Gets the face relation of this block compared to the given block.
|
||||
* <p>
|
||||
|
@ -330,8 +316,7 @@ public interface Block extends Metadatable {
|
|||
* Checks if this block is liquid.
|
||||
* <p>
|
||||
* A block is considered liquid when {@link #getType()} returns {@link
|
||||
* Material#WATER}, {@link Material#STATIONARY_WATER}, {@link
|
||||
* Material#LAVA} or {@link Material#STATIONARY_LAVA}.
|
||||
* Material#WATER} or {@link Material#LAVA}.
|
||||
*
|
||||
* @return true if this block is liquid
|
||||
*/
|
||||
|
|
|
@ -4,6 +4,7 @@ import org.bukkit.Chunk;
|
|||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
import org.bukkit.material.MaterialData;
|
||||
import org.bukkit.metadata.Metadatable;
|
||||
|
||||
|
@ -33,6 +34,13 @@ public interface BlockState extends Metadatable {
|
|||
*/
|
||||
MaterialData getData();
|
||||
|
||||
/**
|
||||
* Gets the data for this block state.
|
||||
*
|
||||
* @return block specific data
|
||||
*/
|
||||
BlockData getBlockData();
|
||||
|
||||
/**
|
||||
* Gets the type of this block state.
|
||||
*
|
||||
|
@ -40,15 +48,6 @@ public interface BlockState extends Metadatable {
|
|||
*/
|
||||
Material getType();
|
||||
|
||||
/**
|
||||
* Gets the type-id of this block state.
|
||||
*
|
||||
* @return block type-id
|
||||
* @deprecated Magic value
|
||||
*/
|
||||
@Deprecated
|
||||
int getTypeId();
|
||||
|
||||
/**
|
||||
* Gets the current light level of the block represented by this block state.
|
||||
*
|
||||
|
@ -123,6 +122,13 @@ public interface BlockState extends Metadatable {
|
|||
*/
|
||||
void setData(MaterialData data);
|
||||
|
||||
/**
|
||||
* Sets the data for this block state.
|
||||
*
|
||||
* @param data New block specific data
|
||||
*/
|
||||
void setBlockData(BlockData data);
|
||||
|
||||
/**
|
||||
* Sets the type of this block state.
|
||||
*
|
||||
|
@ -130,16 +136,6 @@ public interface BlockState extends Metadatable {
|
|||
*/
|
||||
void setType(Material type);
|
||||
|
||||
/**
|
||||
* Sets the type-id of this block state.
|
||||
*
|
||||
* @param type Type-Id to change this block state to
|
||||
* @return Whether it worked?
|
||||
* @deprecated Magic value
|
||||
*/
|
||||
@Deprecated
|
||||
boolean setTypeId(int type);
|
||||
|
||||
/**
|
||||
* Attempts to update the block represented by this state, setting it to
|
||||
* the new values as defined by this state.
|
||||
|
|
6
paper-api/src/main/java/org/bukkit/block/Conduit.java
Normal file
6
paper-api/src/main/java/org/bukkit/block/Conduit.java
Normal file
|
@ -0,0 +1,6 @@
|
|||
package org.bukkit.block;
|
||||
|
||||
/**
|
||||
* Represents a captured state of a conduit.
|
||||
*/
|
||||
public interface Conduit extends BlockState { }
|
|
@ -4,7 +4,9 @@ import org.bukkit.material.MaterialData;
|
|||
|
||||
/**
|
||||
* Represents a captured state of a flower pot.
|
||||
* @deprecated not a tile entity in future versions of Minecraft
|
||||
*/
|
||||
@Deprecated
|
||||
public interface FlowerPot extends BlockState {
|
||||
|
||||
/**
|
||||
|
|
|
@ -5,7 +5,9 @@ import org.bukkit.Note;
|
|||
|
||||
/**
|
||||
* Represents a captured state of a note block.
|
||||
* @deprecated not a tile entity in future versions of Minecraft
|
||||
*/
|
||||
@Deprecated
|
||||
public interface NoteBlock extends BlockState {
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
package org.bukkit.block;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.OfflinePlayer;
|
||||
import org.bukkit.SkullType;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
|
||||
/**
|
||||
* Represents a captured state of a skull block.
|
||||
|
@ -57,27 +59,35 @@ public interface Skull extends BlockState {
|
|||
* Gets the rotation of the skull in the world
|
||||
*
|
||||
* @return the rotation of the skull
|
||||
* @deprecated use {@link BlockData}
|
||||
*/
|
||||
@Deprecated
|
||||
public BlockFace getRotation();
|
||||
|
||||
/**
|
||||
* Sets the rotation of the skull in the world
|
||||
*
|
||||
* @param rotation the rotation of the skull
|
||||
* @deprecated use {@link BlockData}
|
||||
*/
|
||||
@Deprecated
|
||||
public void setRotation(BlockFace rotation);
|
||||
|
||||
/**
|
||||
* Gets the type of skull
|
||||
*
|
||||
* @return the type of skull
|
||||
* @deprecated check {@link Material} instead
|
||||
*/
|
||||
@Deprecated
|
||||
public SkullType getSkullType();
|
||||
|
||||
/**
|
||||
* Sets the type of skull
|
||||
*
|
||||
* @param skullType the type of skull
|
||||
* @deprecated check {@link Material} instead
|
||||
*/
|
||||
@Deprecated
|
||||
public void setSkullType(SkullType skullType);
|
||||
}
|
||||
|
|
33
paper-api/src/main/java/org/bukkit/block/data/Ageable.java
Normal file
33
paper-api/src/main/java/org/bukkit/block/data/Ageable.java
Normal file
|
@ -0,0 +1,33 @@
|
|||
package org.bukkit.block.data;
|
||||
|
||||
/**
|
||||
* 'age' represents the different growth stages that a crop-like block can go
|
||||
* through.
|
||||
* <br>
|
||||
* A value of 0 indicates that the crop was freshly planted, whilst a value
|
||||
* equal to {@link #getMaximumAge()} indicates that the crop is ripe and ready
|
||||
* to be harvested.
|
||||
*/
|
||||
public interface Ageable extends BlockData {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'age' property.
|
||||
*
|
||||
* @return the 'age' value
|
||||
*/
|
||||
int getAge();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'age' property.
|
||||
*
|
||||
* @param age the new 'age' value
|
||||
*/
|
||||
void setAge(int age);
|
||||
|
||||
/**
|
||||
* Gets the maximum allowed value of the 'age' property.
|
||||
*
|
||||
* @return the maximum 'age' value
|
||||
*/
|
||||
int getMaximumAge();
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
package org.bukkit.block.data;
|
||||
|
||||
/**
|
||||
* 'power' represents the redstone power level currently being emitted or
|
||||
* transmitted via this block.
|
||||
* <br>
|
||||
* May not be over 9000 or {@link #getMaximumPower()} (usually 15).
|
||||
*/
|
||||
public interface AnaloguePowerable extends BlockData {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'power' property.
|
||||
*
|
||||
* @return the 'power' value
|
||||
*/
|
||||
int getPower();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'power' property.
|
||||
*
|
||||
* @param power the new 'power' value
|
||||
*/
|
||||
void setPower(int power);
|
||||
|
||||
/**
|
||||
* Gets the maximum allowed value of the 'power' property.
|
||||
*
|
||||
* @return the maximum 'power' value
|
||||
*/
|
||||
int getMaximumPower();
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
package org.bukkit.block.data;
|
||||
|
||||
/**
|
||||
* 'attached' denotes whether a tripwire hook or string forms a complete
|
||||
* tripwire circuit and is ready to trigger.
|
||||
* <br>
|
||||
* Updating the property on a tripwire hook will change the texture to indicate
|
||||
* a connected string, but will not have any effect when used on the tripwire
|
||||
* string itself. It may however still be used to check whether the string forms
|
||||
* a circuit.
|
||||
*/
|
||||
public interface Attachable extends BlockData {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'attached' property.
|
||||
*
|
||||
* @return the 'attached' value
|
||||
*/
|
||||
boolean isAttached();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'attached' property.
|
||||
*
|
||||
* @param attached the new 'attached' value
|
||||
*/
|
||||
void setAttached(boolean attached);
|
||||
}
|
37
paper-api/src/main/java/org/bukkit/block/data/Bisected.java
Normal file
37
paper-api/src/main/java/org/bukkit/block/data/Bisected.java
Normal file
|
@ -0,0 +1,37 @@
|
|||
package org.bukkit.block.data;
|
||||
|
||||
/**
|
||||
* 'half' denotes which half of a two block tall material this block is.
|
||||
* <br>
|
||||
* In game it may be referred to as either (top, bottom) or (upper, lower).
|
||||
*/
|
||||
public interface Bisected extends BlockData {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'half' property.
|
||||
*
|
||||
* @return the 'half' value
|
||||
*/
|
||||
Half getHalf();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'half' property.
|
||||
*
|
||||
* @param half the new 'half' value
|
||||
*/
|
||||
void setHalf(Half half);
|
||||
|
||||
/**
|
||||
* The half of a vertically bisected block.
|
||||
*/
|
||||
public enum Half {
|
||||
/**
|
||||
* The top half of the block, normally with the higher y coordinate.
|
||||
*/
|
||||
TOP,
|
||||
/**
|
||||
* The bottom half of the block, normally with the lower y coordinate.
|
||||
*/
|
||||
BOTTOM;
|
||||
}
|
||||
}
|
30
paper-api/src/main/java/org/bukkit/block/data/BlockData.java
Normal file
30
paper-api/src/main/java/org/bukkit/block/data/BlockData.java
Normal file
|
@ -0,0 +1,30 @@
|
|||
package org.bukkit.block.data;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Server;
|
||||
|
||||
public interface BlockData extends Cloneable {
|
||||
|
||||
/**
|
||||
* Get the Material represented by this block data.
|
||||
*
|
||||
* @return the material
|
||||
*/
|
||||
Material getMaterial();
|
||||
|
||||
/**
|
||||
* Gets a string, which when passed into a method such as
|
||||
* {@link Server#createBlockData(java.lang.String)} will unambiguously
|
||||
* recreate this instance.
|
||||
*
|
||||
* @return serialized data string for this block
|
||||
*/
|
||||
String getAsString();
|
||||
|
||||
/**
|
||||
* Returns a copy of this BlockData.
|
||||
*
|
||||
* @return a copy of the block data
|
||||
*/
|
||||
BlockData clone();
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
package org.bukkit.block.data;
|
||||
|
||||
import java.util.Set;
|
||||
import org.bukkit.block.BlockFace;
|
||||
|
||||
/**
|
||||
* 'facing' represents the face towards which the block is pointing.
|
||||
* <br>
|
||||
* Some blocks may not be able to face in all directions, use
|
||||
* {@link #getFaces()} to get all possible directions for this block.
|
||||
*/
|
||||
public interface Directional extends BlockData {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'facing' property.
|
||||
*
|
||||
* @return the 'facing' value
|
||||
*/
|
||||
BlockFace getFacing();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'facing' property.
|
||||
*
|
||||
* @param facing the new 'facing' value
|
||||
*/
|
||||
void setFacing(BlockFace facing);
|
||||
|
||||
/**
|
||||
* Gets the faces which are applicable to this block.
|
||||
*
|
||||
* @return the allowed 'facing' values
|
||||
*/
|
||||
Set<BlockFace> getFaces();
|
||||
}
|
31
paper-api/src/main/java/org/bukkit/block/data/Levelled.java
Normal file
31
paper-api/src/main/java/org/bukkit/block/data/Levelled.java
Normal file
|
@ -0,0 +1,31 @@
|
|||
package org.bukkit.block.data;
|
||||
|
||||
/**
|
||||
* 'level' represents the amount of fluid contained within this block, either by
|
||||
* itself or inside a cauldron.
|
||||
* <br>
|
||||
* May not be higher than {@link #getMaximumLevel()}.
|
||||
*/
|
||||
public interface Levelled extends BlockData {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'level' property.
|
||||
*
|
||||
* @return the 'level' value
|
||||
*/
|
||||
int getLevel();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'level' property.
|
||||
*
|
||||
* @param level the new 'level' value
|
||||
*/
|
||||
void setLevel(int level);
|
||||
|
||||
/**
|
||||
* Gets the maximum allowed value of the 'level' property.
|
||||
*
|
||||
* @return the maximum 'level' value
|
||||
*/
|
||||
int getMaximumLevel();
|
||||
}
|
22
paper-api/src/main/java/org/bukkit/block/data/Lightable.java
Normal file
22
paper-api/src/main/java/org/bukkit/block/data/Lightable.java
Normal file
|
@ -0,0 +1,22 @@
|
|||
package org.bukkit.block.data;
|
||||
|
||||
/**
|
||||
* 'lit' denotes whether this block (either a redstone torch or furnace) is
|
||||
* currently lit - that is not burned out.
|
||||
*/
|
||||
public interface Lightable extends BlockData {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'lit' property.
|
||||
*
|
||||
* @return the 'lit' value
|
||||
*/
|
||||
boolean isLit();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'lit' property.
|
||||
*
|
||||
* @param lit the new 'lit' value
|
||||
*/
|
||||
void setLit(boolean lit);
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
package org.bukkit.block.data;
|
||||
|
||||
import java.util.Set;
|
||||
import org.bukkit.block.BlockFace;
|
||||
|
||||
/**
|
||||
* This class encompasses the 'north', 'east', 'south', 'west', 'up', 'down'
|
||||
* boolean flags which are used to set which faces of the block textures are
|
||||
* displayed on.
|
||||
* <br>
|
||||
* Some blocks may not be able to have faces on all directions, use
|
||||
* {@link #getAllowedFaces()} to get all possible faces for this block.
|
||||
*/
|
||||
public interface MultipleFacing extends BlockData {
|
||||
|
||||
/**
|
||||
* Checks if this block has the specified face enabled.
|
||||
*
|
||||
* @param face to check
|
||||
* @return if face is enabled
|
||||
*/
|
||||
boolean hasFace(BlockFace face);
|
||||
|
||||
/**
|
||||
* Set whether this block has the specified face enabled.
|
||||
*
|
||||
* @param face to set
|
||||
* @param has the face
|
||||
*/
|
||||
void setFace(BlockFace face, boolean has);
|
||||
|
||||
/**
|
||||
* Get all of the faces which are enabled on this block.
|
||||
*
|
||||
* @return all faces enabled
|
||||
*/
|
||||
Set<BlockFace> getFaces();
|
||||
|
||||
/**
|
||||
* Gets all of this faces which may be set on this block.
|
||||
*
|
||||
* @return all allowed faces
|
||||
*/
|
||||
Set<BlockFace> getAllowedFaces();
|
||||
}
|
21
paper-api/src/main/java/org/bukkit/block/data/Openable.java
Normal file
21
paper-api/src/main/java/org/bukkit/block/data/Openable.java
Normal file
|
@ -0,0 +1,21 @@
|
|||
package org.bukkit.block.data;
|
||||
|
||||
/**
|
||||
* 'open' denotes whether this door-like block is currently opened.
|
||||
*/
|
||||
public interface Openable extends BlockData {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'open' property.
|
||||
*
|
||||
* @return the 'open' value
|
||||
*/
|
||||
boolean isOpen();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'open' property.
|
||||
*
|
||||
* @param open the new 'open' value
|
||||
*/
|
||||
void setOpen(boolean open);
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
package org.bukkit.block.data;
|
||||
|
||||
import java.util.Set;
|
||||
import org.bukkit.Axis;
|
||||
|
||||
/**
|
||||
* 'axis' represents the axis along whilst this block is oriented.
|
||||
* <br>
|
||||
* Some blocks such as the portal block may not be able to be placed in all
|
||||
* orientations, use {@link #getAxes()} to retrieve all possible such
|
||||
* orientations.
|
||||
*/
|
||||
public interface Orientable extends BlockData {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'axis' property.
|
||||
*
|
||||
* @return the 'axis' value
|
||||
*/
|
||||
Axis getAxis();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'axis' property.
|
||||
*
|
||||
* @param axis the new 'axis' value
|
||||
*/
|
||||
void setAxis(Axis axis);
|
||||
|
||||
/**
|
||||
* Gets the axes which are applicable to this block.
|
||||
*
|
||||
* @return the allowed 'axis' values
|
||||
*/
|
||||
Set<Axis> getAxes();
|
||||
}
|
22
paper-api/src/main/java/org/bukkit/block/data/Powerable.java
Normal file
22
paper-api/src/main/java/org/bukkit/block/data/Powerable.java
Normal file
|
@ -0,0 +1,22 @@
|
|||
package org.bukkit.block.data;
|
||||
|
||||
/**
|
||||
* 'powered' indicates whether this block is in the powered state or not, i.e.
|
||||
* receiving a redstone current of power > 0.
|
||||
*/
|
||||
public interface Powerable extends BlockData {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'powered' property.
|
||||
*
|
||||
* @return the 'powered' value
|
||||
*/
|
||||
boolean isPowered();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'powered' property.
|
||||
*
|
||||
* @param powered the new 'powered' value
|
||||
*/
|
||||
void setPowered(boolean powered);
|
||||
}
|
84
paper-api/src/main/java/org/bukkit/block/data/Rail.java
Normal file
84
paper-api/src/main/java/org/bukkit/block/data/Rail.java
Normal file
|
@ -0,0 +1,84 @@
|
|||
package org.bukkit.block.data;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* 'shape' represents the current layout of a minecart rail.
|
||||
* <br>
|
||||
* 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 {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'shape' property.
|
||||
*
|
||||
* @return the 'shape' value
|
||||
*/
|
||||
Shape getShape();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'shape' property.
|
||||
*
|
||||
* @param shape the new 'shape' value
|
||||
*/
|
||||
void setShape(Shape shape);
|
||||
|
||||
/**
|
||||
* Gets the shapes which are applicable to this block.
|
||||
*
|
||||
* @return the allowed 'shape' values
|
||||
*/
|
||||
Set<Shape> getShapes();
|
||||
|
||||
/**
|
||||
* The different types of shapes a rail block can occupy.
|
||||
*/
|
||||
public enum Shape {
|
||||
|
||||
/**
|
||||
* The rail runs flat along the north/south (Z) axis.
|
||||
*/
|
||||
NORTH_SOUTH,
|
||||
/**
|
||||
* The rail runs flat along the east/west (X) axis.
|
||||
*/
|
||||
EAST_WEST,
|
||||
/**
|
||||
* The rail ascends in the east (positive X) direction.
|
||||
*/
|
||||
ASCENDING_EAST,
|
||||
/**
|
||||
* The rail ascends in the west (negative X) direction.
|
||||
*/
|
||||
ASCENDING_WEST,
|
||||
/**
|
||||
* The rail ascends in the north (negative Z) direction.
|
||||
*/
|
||||
ASCENDING_NORTH,
|
||||
/**
|
||||
* The rail ascends in the south (positive Z) direction.
|
||||
*/
|
||||
ASCENDING_SOUTH,
|
||||
/**
|
||||
* The rail forms a curve connecting the south and east faces of the
|
||||
* block.
|
||||
*/
|
||||
SOUTH_EAST,
|
||||
/**
|
||||
* The rail forms a curve connecting the south and west faces of the
|
||||
* block.
|
||||
*/
|
||||
SOUTH_WEST,
|
||||
/**
|
||||
* The rail forms a curve connecting the north and west faces of the
|
||||
* block.
|
||||
*/
|
||||
NORTH_WEST,
|
||||
/**
|
||||
* The rail forms a curve connecting the north and east faces of the
|
||||
* block.
|
||||
*/
|
||||
NORTH_EAST;
|
||||
}
|
||||
}
|
23
paper-api/src/main/java/org/bukkit/block/data/Rotatable.java
Normal file
23
paper-api/src/main/java/org/bukkit/block/data/Rotatable.java
Normal file
|
@ -0,0 +1,23 @@
|
|||
package org.bukkit.block.data;
|
||||
|
||||
import org.bukkit.block.BlockFace;
|
||||
|
||||
/**
|
||||
* 'rotation' represents the current rotation of this block.
|
||||
*/
|
||||
public interface Rotatable extends BlockData {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'rotation' property.
|
||||
*
|
||||
* @return the 'rotation' value
|
||||
*/
|
||||
BlockFace getRotation();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'rotation' property.
|
||||
*
|
||||
* @param rotation the new 'rotation' value
|
||||
*/
|
||||
void setRotation(BlockFace rotation);
|
||||
}
|
22
paper-api/src/main/java/org/bukkit/block/data/Snowable.java
Normal file
22
paper-api/src/main/java/org/bukkit/block/data/Snowable.java
Normal file
|
@ -0,0 +1,22 @@
|
|||
package org.bukkit.block.data;
|
||||
|
||||
/**
|
||||
* 'snowy' denotes whether this block has a snow covered side and top texture
|
||||
* (normally because the block above is snow).
|
||||
*/
|
||||
public interface Snowable extends BlockData {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'snowy' property.
|
||||
*
|
||||
* @return the 'snowy' value
|
||||
*/
|
||||
boolean isSnowy();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'snowy' property.
|
||||
*
|
||||
* @param snowy the new 'snowy' value
|
||||
*/
|
||||
void setSnowy(boolean snowy);
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
package org.bukkit.block.data;
|
||||
|
||||
/**
|
||||
* 'waterlogged' denotes whether this block has fluid in it.
|
||||
*/
|
||||
public interface Waterlogged extends BlockData {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'waterlogged' property.
|
||||
*
|
||||
* @return the 'waterlogged' value
|
||||
*/
|
||||
boolean isWaterlogged();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'waterlogged' property.
|
||||
*
|
||||
* @param waterlogged the new 'waterlogged' value
|
||||
*/
|
||||
void setWaterlogged(boolean waterlogged);
|
||||
}
|
50
paper-api/src/main/java/org/bukkit/block/data/type/Bed.java
Normal file
50
paper-api/src/main/java/org/bukkit/block/data/type/Bed.java
Normal file
|
@ -0,0 +1,50 @@
|
|||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.Bisected;
|
||||
import org.bukkit.block.data.Directional;
|
||||
|
||||
/**
|
||||
* Similar to {@link Bisected}, 'part' denotes which half of the bed this block
|
||||
* corresponds to.
|
||||
* <br>
|
||||
* 'occupied' property is a quick flag to check if a player is currently
|
||||
* sleeping in this bed block.
|
||||
*/
|
||||
public interface Bed extends Directional {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'part' property.
|
||||
*
|
||||
* @return the 'part' value
|
||||
*/
|
||||
Part getPart();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'part' property.
|
||||
*
|
||||
* @param part the new 'part' value
|
||||
*/
|
||||
void setPart(Part part);
|
||||
|
||||
/**
|
||||
* Gets the value of the 'occupied' property.
|
||||
*
|
||||
* @return the 'occupied' value
|
||||
*/
|
||||
boolean isOccupied();
|
||||
|
||||
/**
|
||||
* Horizontal half of a bed.
|
||||
*/
|
||||
public enum Part {
|
||||
|
||||
/**
|
||||
* The head is the upper part of the bed containing the pillow.
|
||||
*/
|
||||
HEAD,
|
||||
/**
|
||||
* The foot is the lower half of the bed.
|
||||
*/
|
||||
FOOT;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
package org.bukkit.block.data.type;
|
||||
|
||||
import java.util.Set;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
|
||||
/**
|
||||
* Interface to the 'has_bottle_0', 'has_bottle_1', 'has_bottle_2' flags on a
|
||||
* brewing stand which indicate which bottles are rendered on the outside.
|
||||
* <br>
|
||||
* Stand may have 0, 1... {@link #getMaximumBottles()}-1 bottles.
|
||||
*/
|
||||
public interface BrewingStand extends BlockData {
|
||||
|
||||
/**
|
||||
* Checks if the stand has the following bottle
|
||||
*
|
||||
* @param bottle to check
|
||||
* @return if bottle is present
|
||||
*/
|
||||
boolean hasBottle(int bottle);
|
||||
|
||||
/**
|
||||
* Set whether the stand has this bottle present.
|
||||
*
|
||||
* @param bottle to set
|
||||
* @param has bottle
|
||||
*/
|
||||
void setBottle(int bottle, boolean has);
|
||||
|
||||
/**
|
||||
* Get the indexes of all the bottles present on this block.
|
||||
*
|
||||
* @return set of all bottles
|
||||
*/
|
||||
Set<Integer> getBottles();
|
||||
|
||||
/**
|
||||
* Get the maximum amount of bottles present on this stand.
|
||||
*
|
||||
* @return maximum bottle count
|
||||
*/
|
||||
int getMaximumBottles();
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.BlockData;
|
||||
|
||||
/**
|
||||
* 'drag' indicates whether a force will be applied on entities moving through
|
||||
* this block.
|
||||
*/
|
||||
public interface BubbleColumn extends BlockData {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'drag' property.
|
||||
*
|
||||
* @return the 'part' value
|
||||
*/
|
||||
boolean isDrag();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'drag' property.
|
||||
*
|
||||
* @param drag the new 'drag' value
|
||||
*/
|
||||
void setDrag(boolean drag);
|
||||
|
||||
}
|
34
paper-api/src/main/java/org/bukkit/block/data/type/Cake.java
Normal file
34
paper-api/src/main/java/org/bukkit/block/data/type/Cake.java
Normal file
|
@ -0,0 +1,34 @@
|
|||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.BlockData;
|
||||
|
||||
/**
|
||||
* 'bites' represents the amount of bites which have been taken from this slice
|
||||
* of cake.
|
||||
* <br>
|
||||
* A value of 0 indicates that the cake has not been eaten, whilst a value of
|
||||
* {@link #getMaximumBites()} indicates that it is all gone :(
|
||||
*/
|
||||
public interface Cake extends BlockData {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'bites' property.
|
||||
*
|
||||
* @return the 'bites' value
|
||||
*/
|
||||
int getBites();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'bites' property.
|
||||
*
|
||||
* @param bites the new 'bites' value
|
||||
*/
|
||||
void setBites(int bites);
|
||||
|
||||
/**
|
||||
* Gets the maximum allowed value of the 'bites' property.
|
||||
*
|
||||
* @return the maximum 'bites' value
|
||||
*/
|
||||
int getMaximumBites();
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.Directional;
|
||||
import org.bukkit.block.data.Waterlogged;
|
||||
|
||||
/**
|
||||
* 'type' represents which part of a double chest this block is, or if it is a
|
||||
* single chest.
|
||||
*/
|
||||
public interface Chest extends Directional, Waterlogged {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'type' property.
|
||||
*
|
||||
* @return the 'type' value
|
||||
*/
|
||||
Type getType();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'type' property.
|
||||
*
|
||||
* @param type the new 'type' value
|
||||
*/
|
||||
void setType(Type type);
|
||||
|
||||
/**
|
||||
* Type of this chest block.
|
||||
*/
|
||||
public enum Type {
|
||||
/**
|
||||
* The chest is not linked to any others and contains only one 27 slot
|
||||
* inventory.
|
||||
*/
|
||||
SINGLE,
|
||||
/**
|
||||
* The chest is the left hand side of a double chest and shares a 54
|
||||
* block inventory with the chest to its right.
|
||||
*/
|
||||
LEFT,
|
||||
/**
|
||||
* The chest is the right hand side of a double chest and shares a 54
|
||||
* block inventory with the chest to its left.
|
||||
*/
|
||||
RIGHT;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.Ageable;
|
||||
import org.bukkit.block.data.Directional;
|
||||
|
||||
public interface Cocoa extends Ageable, Directional {
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.Directional;
|
||||
|
||||
/**
|
||||
* 'conditional' denotes whether this command block is conditional or not, i.e.
|
||||
* will only execute if the preceeding command block also executed successfully.
|
||||
*/
|
||||
public interface CommandBlock extends Directional {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'conditional' property.
|
||||
*
|
||||
* @return the 'conditional' value
|
||||
*/
|
||||
boolean isConditional();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'conditional' property.
|
||||
*
|
||||
* @param conditional the new 'conditional' value
|
||||
*/
|
||||
void setConditional(boolean conditional);
|
||||
}
|
|
@ -0,0 +1,41 @@
|
|||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.Directional;
|
||||
import org.bukkit.block.data.Powerable;
|
||||
|
||||
/**
|
||||
* 'mode' indicates what mode this comparator will operate in.
|
||||
*/
|
||||
public interface Comparator extends Directional, Powerable {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'mode' property.
|
||||
*
|
||||
* @return the 'mode' value
|
||||
*/
|
||||
Mode getMode();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'mode' property.
|
||||
*
|
||||
* @param mode the new 'mode' value
|
||||
*/
|
||||
void setMode(Mode mode);
|
||||
|
||||
/**
|
||||
* The mode in which a comparator will operate in.
|
||||
*/
|
||||
public enum Mode {
|
||||
|
||||
/**
|
||||
* The default mode, similar to a transistor. The comparator will turn
|
||||
* off if either side input is greater than the rear input.
|
||||
*/
|
||||
COMPARE,
|
||||
/**
|
||||
* Alternate subtraction mode. The output signal strength will be equal
|
||||
* to max(rear-max(left,right),0).
|
||||
*/
|
||||
SUBTRACT;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.AnaloguePowerable;
|
||||
|
||||
/**
|
||||
* 'inverted' denotes whether this daylight detector is in the inverted mode,
|
||||
* i.e. activates in the absence of light rather than presence."
|
||||
*/
|
||||
public interface DaylightDetector extends AnaloguePowerable {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'inverted' property.
|
||||
*
|
||||
* @return the 'inverted' value
|
||||
*/
|
||||
boolean isInverted();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'inverted' property.
|
||||
*
|
||||
* @param inverted the new 'inverted' value
|
||||
*/
|
||||
void setInverted(boolean inverted);
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.Directional;
|
||||
import org.bukkit.block.data.Powerable;
|
||||
|
||||
/**
|
||||
* Similar to {@link Powerable}, 'triggered' indicates whether or not the
|
||||
* dispenser is currently activated.
|
||||
*/
|
||||
public interface Dispenser extends Directional {
|
||||
|
||||
/**
|
||||
* 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);
|
||||
}
|
41
paper-api/src/main/java/org/bukkit/block/data/type/Door.java
Normal file
41
paper-api/src/main/java/org/bukkit/block/data/type/Door.java
Normal file
|
@ -0,0 +1,41 @@
|
|||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.Bisected;
|
||||
import org.bukkit.block.data.Directional;
|
||||
import org.bukkit.block.data.Openable;
|
||||
import org.bukkit.block.data.Powerable;
|
||||
|
||||
/**
|
||||
* 'hinge' indicates which hinge this door is attached to and will rotate around
|
||||
* when opened.
|
||||
*/
|
||||
public interface Door extends Bisected, Directional, Openable, Powerable {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'hinge' property.
|
||||
*
|
||||
* @return the 'hinge' value
|
||||
*/
|
||||
Hinge getHinge();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'hinge' property.
|
||||
*
|
||||
* @param hinge the new 'hinge' value
|
||||
*/
|
||||
void setHinge(Hinge hinge);
|
||||
|
||||
/**
|
||||
* The hinge of a door.
|
||||
*/
|
||||
public enum Hinge {
|
||||
/**
|
||||
* Door is attached to the left side.
|
||||
*/
|
||||
LEFT,
|
||||
/**
|
||||
* Door is attached to the right side.
|
||||
*/
|
||||
RIGHT;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.Directional;
|
||||
|
||||
/**
|
||||
* 'eye' denotes whether this end portal frame has been activated by having an
|
||||
* eye of ender placed in it.
|
||||
*/
|
||||
public interface EndPortalFrame extends Directional {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'eye' property.
|
||||
*
|
||||
* @return the 'eye' value
|
||||
*/
|
||||
boolean hasEye();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'eye' property.
|
||||
*
|
||||
* @param eye the new 'eye' value
|
||||
*/
|
||||
void setEye(boolean eye);
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.Directional;
|
||||
import org.bukkit.block.data.Waterlogged;
|
||||
|
||||
public interface EnderChest extends Directional, Waterlogged {
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.BlockData;
|
||||
|
||||
/**
|
||||
* The 'moisture' level of farmland indicates how close it is to a water source
|
||||
* (if any).
|
||||
* <br>
|
||||
* A higher moisture level leads, to faster growth of crops on this block, but
|
||||
* cannot be higher than {@link #getMaximumMoisture()}.
|
||||
*/
|
||||
public interface Farmland extends BlockData {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'moisture' property.
|
||||
*
|
||||
* @return the 'moisture' value
|
||||
*/
|
||||
int getMoisture();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'moisture' property.
|
||||
*
|
||||
* @param moisture the new 'moisture' value
|
||||
*/
|
||||
void setMoisture(int moisture);
|
||||
|
||||
/**
|
||||
* Gets the maximum allowed value of the 'moisture' property.
|
||||
*
|
||||
* @return the maximum 'moisture' value
|
||||
*/
|
||||
int getMaximumMoisture();
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.MultipleFacing;
|
||||
import org.bukkit.block.data.Waterlogged;
|
||||
|
||||
public interface Fence extends MultipleFacing, Waterlogged {
|
||||
}
|
10
paper-api/src/main/java/org/bukkit/block/data/type/Fire.java
Normal file
10
paper-api/src/main/java/org/bukkit/block/data/type/Fire.java
Normal file
|
@ -0,0 +1,10 @@
|
|||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.Ageable;
|
||||
import org.bukkit.block.data.MultipleFacing;
|
||||
|
||||
/**
|
||||
* md_5's mixtape.
|
||||
*/
|
||||
public interface Fire extends Ageable, MultipleFacing {
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.Directional;
|
||||
import org.bukkit.block.data.Lightable;
|
||||
|
||||
public interface Furnace extends Directional, Lightable {
|
||||
}
|
26
paper-api/src/main/java/org/bukkit/block/data/type/Gate.java
Normal file
26
paper-api/src/main/java/org/bukkit/block/data/type/Gate.java
Normal file
|
@ -0,0 +1,26 @@
|
|||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.Directional;
|
||||
import org.bukkit.block.data.Openable;
|
||||
import org.bukkit.block.data.Powerable;
|
||||
|
||||
/**
|
||||
* 'in_wall" indicates if the fence gate is attached to a wall, and if true the
|
||||
* texture is lowered by a small amount to blend in better.
|
||||
*/
|
||||
public interface Gate extends Directional, Openable, Powerable {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'in_wall' property.
|
||||
*
|
||||
* @return the 'in_wall' value
|
||||
*/
|
||||
boolean isInWall();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'in_wall' property.
|
||||
*
|
||||
* @param inWall the new 'in_wall' value
|
||||
*/
|
||||
void setInWall(boolean inWall);
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.MultipleFacing;
|
||||
import org.bukkit.block.data.Waterlogged;
|
||||
|
||||
public interface GlassPane extends MultipleFacing, Waterlogged {
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.Directional;
|
||||
import org.bukkit.block.data.Powerable;
|
||||
|
||||
/**
|
||||
* Similar to {@link Powerable}, 'enabled' indicates whether or not the hopper
|
||||
* is currently activated.
|
||||
* <br>
|
||||
* Unlike most other blocks, a hopper is only enabled when it is <b>not</b>
|
||||
* receiving any power.
|
||||
*/
|
||||
public interface Hopper extends Directional {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'enabled' property.
|
||||
*
|
||||
* @return the 'enabled' value
|
||||
*/
|
||||
boolean isEnabled();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'enabled' property.
|
||||
*
|
||||
* @param enabled the new 'enabled' value
|
||||
*/
|
||||
void setEnabled(boolean enabled);
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.BlockData;
|
||||
|
||||
/**
|
||||
* 'has_record' is a quick flag to check whether this jukebox has a record
|
||||
* inside it.
|
||||
*/
|
||||
public interface Jukebox extends BlockData {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'has_record' property.
|
||||
*
|
||||
* @return the 'has_record' value
|
||||
*/
|
||||
boolean hasRecord();
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.Directional;
|
||||
import org.bukkit.block.data.Waterlogged;
|
||||
|
||||
public interface Ladder extends Directional, Waterlogged {
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.BlockData;
|
||||
|
||||
/**
|
||||
* 'persistent' indicates whether or not leaves will be checked by the server to
|
||||
* see if they are subject to decay or not.
|
||||
* <br>
|
||||
* 'distance' denotes how far the block is from a tree and is used in
|
||||
* conjunction with 'persistent' flag to determine if the leaves will decay or
|
||||
* not.
|
||||
*/
|
||||
public interface Leaves extends BlockData {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'persistent' property.
|
||||
*
|
||||
* @return the persistent value
|
||||
*/
|
||||
boolean isPersistent();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'persistent' property.
|
||||
*
|
||||
* @param persistent the new 'persistent' value
|
||||
*/
|
||||
void setPersistent(boolean persistent);
|
||||
|
||||
/**
|
||||
* Gets the value of the 'distance' property.
|
||||
*
|
||||
* @return the 'distance' value
|
||||
*/
|
||||
int getDistance();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'distance' property.
|
||||
*
|
||||
* @param distance the new 'distance' value
|
||||
*/
|
||||
void setDistance(int distance);
|
||||
}
|
|
@ -0,0 +1,41 @@
|
|||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.Instrument;
|
||||
import org.bukkit.Note;
|
||||
import org.bukkit.block.data.Powerable;
|
||||
|
||||
/**
|
||||
* 'instrument' is the type of sound made when this note block is activated.
|
||||
* <br>
|
||||
* 'note' is the specified tuned pitch that the instrument will be played in.
|
||||
*/
|
||||
public interface NoteBlock extends Powerable {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'instrument' property.
|
||||
*
|
||||
* @return the 'instrument' value
|
||||
*/
|
||||
Instrument getInstrument();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'instrument' property.
|
||||
*
|
||||
* @param instrument the new 'instrument' value
|
||||
*/
|
||||
void setInstrument(Instrument instrument);
|
||||
|
||||
/**
|
||||
* Gets the value of the 'note' property.
|
||||
*
|
||||
* @return the 'note' value
|
||||
*/
|
||||
Note getNote();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'note' property.
|
||||
*
|
||||
* @param note the new 'note' value
|
||||
*/
|
||||
void setNote(Note note);
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.Directional;
|
||||
import org.bukkit.block.data.Powerable;
|
||||
|
||||
public interface Observer extends Directional, Powerable {
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.Directional;
|
||||
|
||||
/**
|
||||
* 'extended' denotes whether the piston head is currently extended or not.
|
||||
*/
|
||||
public interface Piston extends Directional {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'extended' property.
|
||||
*
|
||||
* @return the 'extended' value
|
||||
*/
|
||||
boolean isExtended();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'extended' property.
|
||||
*
|
||||
* @param extended the new 'extended' value
|
||||
*/
|
||||
void setExtended(boolean extended);
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
package org.bukkit.block.data.type;
|
||||
|
||||
/**
|
||||
* 'short' denotes this piston head is shorter than the usual amount because it
|
||||
* is currently retracting.
|
||||
*/
|
||||
public interface PistonHead extends TechnicalPiston {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'short' property.
|
||||
*
|
||||
* @return the 'short' value
|
||||
*/
|
||||
boolean isShort();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'short' property.
|
||||
*
|
||||
* @param _short the new 'short' value
|
||||
*/
|
||||
void setShort(boolean _short);
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.Powerable;
|
||||
import org.bukkit.block.data.Rail;
|
||||
|
||||
/**
|
||||
* A type of minecart rail which interacts with redstone in one way or another.
|
||||
*/
|
||||
public interface RedstoneRail extends Powerable, Rail {
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.Directional;
|
||||
import org.bukkit.block.data.Lightable;
|
||||
|
||||
public interface RedstoneWallTorch extends Directional, Lightable {
|
||||
}
|
|
@ -0,0 +1,53 @@
|
|||
package org.bukkit.block.data.type;
|
||||
|
||||
import java.util.Set;
|
||||
import org.bukkit.block.BlockFace;
|
||||
import org.bukkit.block.data.AnaloguePowerable;
|
||||
|
||||
/**
|
||||
* 'north', 'east', 'south', 'west' represent the types of connections this
|
||||
* redstone wire has to adjacent blocks.
|
||||
*/
|
||||
public interface RedstoneWire extends AnaloguePowerable {
|
||||
|
||||
/**
|
||||
* Checks the type of connection on the specified face.
|
||||
*
|
||||
* @param face to check
|
||||
* @return connection type
|
||||
*/
|
||||
Connection getFace(BlockFace face);
|
||||
|
||||
/**
|
||||
* Sets the type of connection on the specified face.
|
||||
*
|
||||
* @param face to set
|
||||
* @param connection the connection type
|
||||
*/
|
||||
void setFace(BlockFace face, Connection connection);
|
||||
|
||||
/**
|
||||
* Gets all of this faces which may be set on this block.
|
||||
*
|
||||
* @return all allowed faces
|
||||
*/
|
||||
Set<BlockFace> getAllowedFaces();
|
||||
|
||||
/**
|
||||
* The way in which a redstone wire can connect to an adjacent block face.
|
||||
*/
|
||||
public enum Connection {
|
||||
/**
|
||||
* The wire travels up the side of the block adjacent to this face.
|
||||
*/
|
||||
UP,
|
||||
/**
|
||||
* The wire travels flat from this face and into the adjacent block.
|
||||
*/
|
||||
SIDE,
|
||||
/**
|
||||
* The wire does not connect in this direction.
|
||||
*/
|
||||
NONE;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,62 @@
|
|||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.Directional;
|
||||
import org.bukkit.block.data.Powerable;
|
||||
|
||||
/**
|
||||
* 'delay' is the propagation delay of a repeater, i.e. how many ticks before it
|
||||
* will be activated from a current change and propagate it to the next block.
|
||||
* <br>
|
||||
* Delay may not be lower than {@link #getMinimumDelay()} or higher than
|
||||
* {@link #getMaximumDelay()}.
|
||||
* <br>
|
||||
* 'locked' denotes whether the repeater is in the locked state or not.
|
||||
* <br>
|
||||
* A locked repeater will not change its output until it is unlocked. In game, a
|
||||
* locked repeater is created by having a constant current perpendicularly
|
||||
* entering the block.
|
||||
*/
|
||||
public interface Repeater extends Directional, Powerable {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'delay' property.
|
||||
*
|
||||
* @return the 'delay' value
|
||||
*/
|
||||
int getDelay();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'delay' property.
|
||||
*
|
||||
* @param delay the new 'delay' value
|
||||
*/
|
||||
void setDelay(int delay);
|
||||
|
||||
/**
|
||||
* Gets the minimum allowed value of the 'delay' property.
|
||||
*
|
||||
* @return the minimum 'delay' value
|
||||
*/
|
||||
int getMinimumDelay();
|
||||
|
||||
/**
|
||||
* Gets the maximum allowed value of the 'delay' property.
|
||||
*
|
||||
* @return the maximum 'delay' value
|
||||
*/
|
||||
int getMaximumDelay();
|
||||
|
||||
/**
|
||||
* Gets the value of the 'locked' property.
|
||||
*
|
||||
* @return the 'locked' value
|
||||
*/
|
||||
boolean isLocked();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'locked' property.
|
||||
*
|
||||
* @param locked the new 'locked' value
|
||||
*/
|
||||
void setLocked(boolean locked);
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.BlockData;
|
||||
|
||||
/**
|
||||
* 'stage' represents the growth stage of a sapling.
|
||||
* <br>
|
||||
* When the sapling reaches {@link #getMaximumStage()} it will attempt to grow
|
||||
* into a tree as the next stage.
|
||||
*/
|
||||
public interface Sapling extends BlockData {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'stage' property.
|
||||
*
|
||||
* @return the 'stage' value
|
||||
*/
|
||||
int getStage();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'stage' property.
|
||||
*
|
||||
* @param stage the new 'stage' value
|
||||
*/
|
||||
void setStage(int stage);
|
||||
|
||||
/**
|
||||
* Gets the maximum allowed value of the 'stage' property.
|
||||
*
|
||||
* @return the maximum 'stage' value
|
||||
*/
|
||||
int getMaximumStage();
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.Waterlogged;
|
||||
|
||||
/**
|
||||
* 'pickles' indicates the number of pickles in this block.
|
||||
*/
|
||||
public interface SeaPickle extends Waterlogged {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'pickles' property.
|
||||
*
|
||||
* @return the 'pickles' value
|
||||
*/
|
||||
int getPickles();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'pickles' property.
|
||||
*
|
||||
* @param pickles the new 'pickles' value
|
||||
*/
|
||||
void setPickles(int pickles);
|
||||
|
||||
/**
|
||||
* Gets the minimum allowed value of the 'pickles' property.
|
||||
*
|
||||
* @return the minimum 'pickles' value
|
||||
*/
|
||||
int getMinimumPickles();
|
||||
|
||||
/**
|
||||
* Gets the maximum allowed value of the 'pickles' property.
|
||||
*
|
||||
* @return the maximum 'pickles' value
|
||||
*/
|
||||
int getMaximumPickles();
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.Rotatable;
|
||||
import org.bukkit.block.data.Waterlogged;
|
||||
|
||||
public interface Sign extends Rotatable, Waterlogged {
|
||||
}
|
43
paper-api/src/main/java/org/bukkit/block/data/type/Slab.java
Normal file
43
paper-api/src/main/java/org/bukkit/block/data/type/Slab.java
Normal file
|
@ -0,0 +1,43 @@
|
|||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.BlockData;
|
||||
import org.bukkit.block.data.Waterlogged;
|
||||
|
||||
/**
|
||||
* 'type' represents what state the slab is in - either top, bottom, or a double
|
||||
* slab occupying the full block.
|
||||
*/
|
||||
public interface Slab extends BlockData, Waterlogged {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'type' property.
|
||||
*
|
||||
* @return the 'type' value
|
||||
*/
|
||||
Type getType();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'type' property.
|
||||
*
|
||||
* @param type the new 'type' value
|
||||
*/
|
||||
void setType(Type type);
|
||||
|
||||
/**
|
||||
* The type of the slab.
|
||||
*/
|
||||
public enum Type {
|
||||
/**
|
||||
* The slab occupies the upper y half of the block.
|
||||
*/
|
||||
TOP,
|
||||
/**
|
||||
* The slab occupies the lower y half of the block.
|
||||
*/
|
||||
BOTTOM,
|
||||
/**
|
||||
* The slab occupies the entire block.
|
||||
*/
|
||||
DOUBLE;
|
||||
}
|
||||
}
|
41
paper-api/src/main/java/org/bukkit/block/data/type/Snow.java
Normal file
41
paper-api/src/main/java/org/bukkit/block/data/type/Snow.java
Normal file
|
@ -0,0 +1,41 @@
|
|||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.BlockData;
|
||||
|
||||
/**
|
||||
* 'layers' represents the amount of layers of snow which are present in this
|
||||
* block.
|
||||
* <br>
|
||||
* May not be lower than {@link #getMinimumLayers()} or higher than
|
||||
* {@link #getMaximumLayers()}.
|
||||
*/
|
||||
public interface Snow extends BlockData {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'layers' property.
|
||||
*
|
||||
* @return the 'layers' value
|
||||
*/
|
||||
int getLayers();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'layers' property.
|
||||
*
|
||||
* @param layers the new 'layers' value
|
||||
*/
|
||||
void setLayers(int layers);
|
||||
|
||||
/**
|
||||
* Gets the minimum allowed value of the 'layers' property.
|
||||
*
|
||||
* @return the minimum 'layers' value
|
||||
*/
|
||||
int getMinimumLayers();
|
||||
|
||||
/**
|
||||
* Gets the maximum allowed value of the 'layers' property.
|
||||
*
|
||||
* @return the maximum 'layers' value
|
||||
*/
|
||||
int getMaximumLayers();
|
||||
}
|
|
@ -0,0 +1,51 @@
|
|||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.Bisected;
|
||||
import org.bukkit.block.data.Directional;
|
||||
import org.bukkit.block.data.Waterlogged;
|
||||
|
||||
/**
|
||||
* 'shape' represents the texture and bounding box shape of these stairs.
|
||||
*/
|
||||
public interface Stairs extends Bisected, Directional, Waterlogged {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'shape' property.
|
||||
*
|
||||
* @return the 'shape' value
|
||||
*/
|
||||
Shape getShape();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'shape' property.
|
||||
*
|
||||
* @param shape the new 'shape' value
|
||||
*/
|
||||
void setShape(Shape shape);
|
||||
|
||||
/**
|
||||
* The shape of a stair block - used for constructing corners.
|
||||
*/
|
||||
public enum Shape {
|
||||
/**
|
||||
* Regular stair block.
|
||||
*/
|
||||
STRAIGHT,
|
||||
/**
|
||||
* Inner corner stair block with higher left side.
|
||||
*/
|
||||
INNER_LEFT,
|
||||
/**
|
||||
* Inner corner stair block with higher right side.
|
||||
*/
|
||||
INNER_RIGHT,
|
||||
/**
|
||||
* Outer corner stair block with higher left side.
|
||||
*/
|
||||
OUTER_LEFT,
|
||||
/**
|
||||
* Outer corner stair block with higher right side.
|
||||
*/
|
||||
OUTER_RIGHT;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,47 @@
|
|||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.BlockData;
|
||||
|
||||
/**
|
||||
* 'mode' represents the different modes in which this structure block may
|
||||
* operate.
|
||||
*/
|
||||
public interface StructureBlock extends BlockData {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'mode' property.
|
||||
*
|
||||
* @return the 'mode' value
|
||||
*/
|
||||
Mode getMode();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'mode' property.
|
||||
*
|
||||
* @param mode the new 'mode' value
|
||||
*/
|
||||
void setMode(Mode mode);
|
||||
|
||||
/**
|
||||
* Operating mode of a structure block.
|
||||
*/
|
||||
public enum Mode {
|
||||
/**
|
||||
* Allows selection and saving of a structure.
|
||||
*/
|
||||
SAVE,
|
||||
/**
|
||||
* Allows loading of a structure.
|
||||
*/
|
||||
LOAD,
|
||||
/**
|
||||
* Used for detection of two opposite corners of a structure.
|
||||
*/
|
||||
CORNER,
|
||||
/**
|
||||
* Dummy block used to run a custom function during world generation
|
||||
* before being removed.
|
||||
*/
|
||||
DATA;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.Directional;
|
||||
import org.bukkit.block.data.Powerable;
|
||||
|
||||
/**
|
||||
* 'face' represents the face to which a lever or button is stuck.
|
||||
* <br>
|
||||
* This is used in conjunction with {@link Directional} to compute the
|
||||
* orientation of these blocks.
|
||||
*/
|
||||
public interface Switch extends Directional, Powerable {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'face' property.
|
||||
*
|
||||
* @return the 'face' value
|
||||
*/
|
||||
Face getFace();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'face' property.
|
||||
*
|
||||
* @param face the new 'face' value
|
||||
*/
|
||||
void setFace(Face face);
|
||||
|
||||
/**
|
||||
* The face to which a switch type block is stuck.
|
||||
*/
|
||||
public enum Face {
|
||||
/**
|
||||
* The switch is mounted to the floor and pointing upwards.
|
||||
*/
|
||||
FLOOR,
|
||||
/**
|
||||
* The switch is mounted to the wall.
|
||||
*/
|
||||
WALL,
|
||||
/**
|
||||
* The switch is mounted to the ceiling and pointing dowanrds.
|
||||
*/
|
||||
CEILING;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.Directional;
|
||||
|
||||
/**
|
||||
* 'type' represents the type of piston which this (technical) block corresponds
|
||||
* to.
|
||||
*/
|
||||
public interface TechnicalPiston extends Directional {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'type' property.
|
||||
*
|
||||
* @return the 'stage' value
|
||||
*/
|
||||
Type getType();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'type' property.
|
||||
*
|
||||
* @param type the new ''type value
|
||||
*/
|
||||
void setType(Type type);
|
||||
|
||||
/**
|
||||
* Different piston variants.
|
||||
*/
|
||||
public enum Type {
|
||||
/**
|
||||
* A normal piston which does not pull connected blocks backwards on
|
||||
* retraction.
|
||||
*/
|
||||
NORMAL,
|
||||
/**
|
||||
* A sticky piston which will also retract connected blocks.
|
||||
*/
|
||||
STICKY;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.Bisected;
|
||||
import org.bukkit.block.data.Directional;
|
||||
import org.bukkit.block.data.Openable;
|
||||
import org.bukkit.block.data.Powerable;
|
||||
import org.bukkit.block.data.Waterlogged;
|
||||
|
||||
public interface TrapDoor extends Bisected, Directional, Openable, Powerable, Waterlogged {
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.Attachable;
|
||||
import org.bukkit.block.data.MultipleFacing;
|
||||
import org.bukkit.block.data.Powerable;
|
||||
|
||||
/**
|
||||
* 'disarmed' denotes that the tripwire was broken with shears and will not
|
||||
* subsequently produce a current when destroyed.
|
||||
*/
|
||||
public interface Tripwire extends Attachable, MultipleFacing, Powerable {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'disarmed' property.
|
||||
*
|
||||
* @return the 'disarmed' value
|
||||
*/
|
||||
boolean isDisarmed();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'disarmed' property.
|
||||
*
|
||||
* @param disarmed the new 'disarmed' value
|
||||
*/
|
||||
void setDisarmed(boolean disarmed);
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.Attachable;
|
||||
import org.bukkit.block.data.Directional;
|
||||
import org.bukkit.block.data.Powerable;
|
||||
|
||||
public interface TripwireHook extends Attachable, Directional, Powerable {
|
||||
}
|
|
@ -0,0 +1,60 @@
|
|||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.BlockData;
|
||||
|
||||
/**
|
||||
* 'hatch' is the number of turtles which may hatch from these eggs.
|
||||
* <br>
|
||||
* 'eggs' is the number of eggs which appear in this block.
|
||||
*/
|
||||
public interface TurtleEgg extends BlockData {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'eggs' property.
|
||||
*
|
||||
* @return the 'eggs' value
|
||||
*/
|
||||
int getEggs();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'eggs' property.
|
||||
*
|
||||
* @param eggs the new 'eggs' value
|
||||
*/
|
||||
void setEggs(int eggs);
|
||||
|
||||
/**
|
||||
* Gets the minimum allowed value of the 'eggs' property.
|
||||
*
|
||||
* @return the minimum 'eggs' value
|
||||
*/
|
||||
int getMinimumEggs();
|
||||
|
||||
/**
|
||||
* Gets the maximum allowed value of the 'eggs' property.
|
||||
*
|
||||
* @return the maximum 'eggs' value
|
||||
*/
|
||||
int getMaximumEggs();
|
||||
|
||||
/**
|
||||
* Gets the value of the 'hatch' property.
|
||||
*
|
||||
* @return the 'hatch' value
|
||||
*/
|
||||
int getHatch();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'hatch' property.
|
||||
*
|
||||
* @param hatch the new 'hatch' value
|
||||
*/
|
||||
void setHatch(int hatch);
|
||||
|
||||
/**
|
||||
* Gets the maximum allowed value of the 'hatch' property.
|
||||
*
|
||||
* @return the maximum 'hatch' value
|
||||
*/
|
||||
int getMaximumHatch();
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.block.data.Directional;
|
||||
import org.bukkit.block.data.Waterlogged;
|
||||
|
||||
public interface WallSign extends Directional, Waterlogged {
|
||||
}
|
|
@ -3,188 +3,207 @@ package org.bukkit.enchantments;
|
|||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.bukkit.Keyed;
|
||||
import org.bukkit.NamespacedKey;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
/**
|
||||
* The various type of enchantments that may be added to armour or weapons
|
||||
*/
|
||||
public abstract class Enchantment {
|
||||
public abstract class Enchantment implements Keyed {
|
||||
/**
|
||||
* Provides protection against environmental damage
|
||||
*/
|
||||
public static final Enchantment PROTECTION_ENVIRONMENTAL = new EnchantmentWrapper(0);
|
||||
public static final Enchantment PROTECTION_ENVIRONMENTAL = new EnchantmentWrapper("protection");
|
||||
|
||||
/**
|
||||
* Provides protection against fire damage
|
||||
*/
|
||||
public static final Enchantment PROTECTION_FIRE = new EnchantmentWrapper(1);
|
||||
public static final Enchantment PROTECTION_FIRE = new EnchantmentWrapper("fire_protection");
|
||||
|
||||
/**
|
||||
* Provides protection against fall damage
|
||||
*/
|
||||
public static final Enchantment PROTECTION_FALL = new EnchantmentWrapper(2);
|
||||
public static final Enchantment PROTECTION_FALL = new EnchantmentWrapper("feather_falling");
|
||||
|
||||
/**
|
||||
* Provides protection against explosive damage
|
||||
*/
|
||||
public static final Enchantment PROTECTION_EXPLOSIONS = new EnchantmentWrapper(3);
|
||||
public static final Enchantment PROTECTION_EXPLOSIONS = new EnchantmentWrapper("blast_protection");
|
||||
|
||||
/**
|
||||
* Provides protection against projectile damage
|
||||
*/
|
||||
public static final Enchantment PROTECTION_PROJECTILE = new EnchantmentWrapper(4);
|
||||
public static final Enchantment PROTECTION_PROJECTILE = new EnchantmentWrapper("projectile_protection");
|
||||
|
||||
/**
|
||||
* Decreases the rate of air loss whilst underwater
|
||||
*/
|
||||
public static final Enchantment OXYGEN = new EnchantmentWrapper(5);
|
||||
public static final Enchantment OXYGEN = new EnchantmentWrapper("respiration");
|
||||
|
||||
/**
|
||||
* Increases the speed at which a player may mine underwater
|
||||
*/
|
||||
public static final Enchantment WATER_WORKER = new EnchantmentWrapper(6);
|
||||
public static final Enchantment WATER_WORKER = new EnchantmentWrapper("aqua_affinity");
|
||||
|
||||
/**
|
||||
* Damages the attacker
|
||||
*/
|
||||
public static final Enchantment THORNS = new EnchantmentWrapper(7);
|
||||
public static final Enchantment THORNS = new EnchantmentWrapper("thorns");
|
||||
|
||||
/**
|
||||
* Increases walking speed while in water
|
||||
*/
|
||||
public static final Enchantment DEPTH_STRIDER = new EnchantmentWrapper(8);
|
||||
public static final Enchantment DEPTH_STRIDER = new EnchantmentWrapper("depth_strider");
|
||||
|
||||
/**
|
||||
* Freezes any still water adjacent to ice / frost which player is walking on
|
||||
*/
|
||||
public static final Enchantment FROST_WALKER = new EnchantmentWrapper(9);
|
||||
public static final Enchantment FROST_WALKER = new EnchantmentWrapper("frost_walker");
|
||||
|
||||
/**
|
||||
* Item cannot be removed
|
||||
*/
|
||||
public static final Enchantment BINDING_CURSE = new EnchantmentWrapper(10);
|
||||
public static final Enchantment BINDING_CURSE = new EnchantmentWrapper("binding_curse");
|
||||
|
||||
/**
|
||||
* Increases damage against all targets
|
||||
*/
|
||||
public static final Enchantment DAMAGE_ALL = new EnchantmentWrapper(16);
|
||||
public static final Enchantment DAMAGE_ALL = new EnchantmentWrapper("sharpness");
|
||||
|
||||
/**
|
||||
* Increases damage against undead targets
|
||||
*/
|
||||
public static final Enchantment DAMAGE_UNDEAD = new EnchantmentWrapper(17);
|
||||
public static final Enchantment DAMAGE_UNDEAD = new EnchantmentWrapper("smite");
|
||||
|
||||
/**
|
||||
* Increases damage against arthropod targets
|
||||
*/
|
||||
public static final Enchantment DAMAGE_ARTHROPODS = new EnchantmentWrapper(18);
|
||||
public static final Enchantment DAMAGE_ARTHROPODS = new EnchantmentWrapper("bane_of_arthropods");
|
||||
|
||||
/**
|
||||
* All damage to other targets will knock them back when hit
|
||||
*/
|
||||
public static final Enchantment KNOCKBACK = new EnchantmentWrapper(19);
|
||||
public static final Enchantment KNOCKBACK = new EnchantmentWrapper("knockback");
|
||||
|
||||
/**
|
||||
* When attacking a target, has a chance to set them on fire
|
||||
*/
|
||||
public static final Enchantment FIRE_ASPECT = new EnchantmentWrapper(20);
|
||||
public static final Enchantment FIRE_ASPECT = new EnchantmentWrapper("fire_aspect");
|
||||
|
||||
/**
|
||||
* Provides a chance of gaining extra loot when killing monsters
|
||||
*/
|
||||
public static final Enchantment LOOT_BONUS_MOBS = new EnchantmentWrapper(21);
|
||||
public static final Enchantment LOOT_BONUS_MOBS = new EnchantmentWrapper("looting");
|
||||
|
||||
/**
|
||||
* Increases damage against targets when using a sweep attack
|
||||
*/
|
||||
public static final Enchantment SWEEPING_EDGE = new EnchantmentWrapper(22);
|
||||
public static final Enchantment SWEEPING_EDGE = new EnchantmentWrapper("sweeping");
|
||||
|
||||
/**
|
||||
* Increases the rate at which you mine/dig
|
||||
*/
|
||||
public static final Enchantment DIG_SPEED = new EnchantmentWrapper(32);
|
||||
public static final Enchantment DIG_SPEED = new EnchantmentWrapper("efficiency");
|
||||
|
||||
/**
|
||||
* Allows blocks to drop themselves instead of fragments (for example,
|
||||
* stone instead of cobblestone)
|
||||
*/
|
||||
public static final Enchantment SILK_TOUCH = new EnchantmentWrapper(33);
|
||||
public static final Enchantment SILK_TOUCH = new EnchantmentWrapper("silk_touch");
|
||||
|
||||
/**
|
||||
* Decreases the rate at which a tool looses durability
|
||||
*/
|
||||
public static final Enchantment DURABILITY = new EnchantmentWrapper(34);
|
||||
public static final Enchantment DURABILITY = new EnchantmentWrapper("unbreaking");
|
||||
|
||||
/**
|
||||
* Provides a chance of gaining extra loot when destroying blocks
|
||||
*/
|
||||
public static final Enchantment LOOT_BONUS_BLOCKS = new EnchantmentWrapper(35);
|
||||
public static final Enchantment LOOT_BONUS_BLOCKS = new EnchantmentWrapper("fortune");
|
||||
|
||||
/**
|
||||
* Provides extra damage when shooting arrows from bows
|
||||
*/
|
||||
public static final Enchantment ARROW_DAMAGE = new EnchantmentWrapper(48);
|
||||
public static final Enchantment ARROW_DAMAGE = new EnchantmentWrapper("power");
|
||||
|
||||
/**
|
||||
* Provides a knockback when an entity is hit by an arrow from a bow
|
||||
*/
|
||||
public static final Enchantment ARROW_KNOCKBACK = new EnchantmentWrapper(49);
|
||||
public static final Enchantment ARROW_KNOCKBACK = new EnchantmentWrapper("punch");
|
||||
|
||||
/**
|
||||
* Sets entities on fire when hit by arrows shot from a bow
|
||||
*/
|
||||
public static final Enchantment ARROW_FIRE = new EnchantmentWrapper(50);
|
||||
public static final Enchantment ARROW_FIRE = new EnchantmentWrapper("flame");
|
||||
|
||||
/**
|
||||
* Provides infinite arrows when shooting a bow
|
||||
*/
|
||||
public static final Enchantment ARROW_INFINITE = new EnchantmentWrapper(51);
|
||||
public static final Enchantment ARROW_INFINITE = new EnchantmentWrapper("infinity");
|
||||
|
||||
/**
|
||||
* Decreases odds of catching worthless junk
|
||||
*/
|
||||
public static final Enchantment LUCK = new EnchantmentWrapper(61);
|
||||
public static final Enchantment LUCK = new EnchantmentWrapper("luck_of_the_sea");
|
||||
|
||||
/**
|
||||
* Increases rate of fish biting your hook
|
||||
*/
|
||||
public static final Enchantment LURE = new EnchantmentWrapper(62);
|
||||
public static final Enchantment LURE = new EnchantmentWrapper("lure");
|
||||
|
||||
/**
|
||||
* Causes a thrown trident to return to the player who threw it
|
||||
*/
|
||||
public static final Enchantment LOYALTY = new EnchantmentWrapper("loyalty");
|
||||
|
||||
/**
|
||||
* Deals more damage to mobs that live in the ocean
|
||||
*/
|
||||
public static final Enchantment IMPALING = new EnchantmentWrapper("impaling");
|
||||
|
||||
/**
|
||||
* When it is rainy, launches the player in the direction their trident is thrown
|
||||
*/
|
||||
public static final Enchantment RIPTIDE = new EnchantmentWrapper("riptide");
|
||||
|
||||
/**
|
||||
* Strikes lightning when a mob is hit with a trident if conditions are
|
||||
* stormy
|
||||
*/
|
||||
public static final Enchantment CHANNELING = new EnchantmentWrapper("chanelling");
|
||||
|
||||
/**
|
||||
* Allows mending the item using experience orbs
|
||||
*/
|
||||
public static final Enchantment MENDING = new EnchantmentWrapper(70);
|
||||
public static final Enchantment MENDING = new EnchantmentWrapper("mending");
|
||||
|
||||
/**
|
||||
* Item disappears instead of dropping
|
||||
*/
|
||||
public static final Enchantment VANISHING_CURSE = new EnchantmentWrapper(71);
|
||||
public static final Enchantment VANISHING_CURSE = new EnchantmentWrapper("vanishing_curse");
|
||||
|
||||
private static final Map<Integer, Enchantment> byId = new HashMap<Integer, Enchantment>();
|
||||
private static final Map<NamespacedKey, Enchantment> byKey = new HashMap<NamespacedKey, Enchantment>();
|
||||
private static final Map<String, Enchantment> byName = new HashMap<String, Enchantment>();
|
||||
private static boolean acceptingNew = true;
|
||||
private final int id;
|
||||
private final NamespacedKey key;
|
||||
|
||||
public Enchantment(int id) {
|
||||
this.id = id;
|
||||
public Enchantment(NamespacedKey key) {
|
||||
this.key = key;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the unique ID of this enchantment
|
||||
*
|
||||
* @return Unique ID
|
||||
* @deprecated Magic value
|
||||
*/
|
||||
@Deprecated
|
||||
public int getId() {
|
||||
return id;
|
||||
@Override
|
||||
public NamespacedKey getKey() {
|
||||
return key;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the unique name of this enchantment
|
||||
*
|
||||
* @return Unique name
|
||||
* @deprecated enchantments are badly named, use {@link #getKey()}.
|
||||
*/
|
||||
@Deprecated
|
||||
public abstract String getName();
|
||||
|
||||
/**
|
||||
|
@ -224,7 +243,11 @@ public abstract class Enchantment {
|
|||
* Cursed enchantments are found the same way treasure enchantments are
|
||||
*
|
||||
* @return true if the enchantment is cursed
|
||||
* @deprecated cursed enchantments are no longer special. Will return true
|
||||
* only for {@link Enchantment#BINDING_CURSE} and
|
||||
* {@link Enchantment#VANISHING_CURSE}.
|
||||
*/
|
||||
@Deprecated
|
||||
public abstract boolean isCursed();
|
||||
|
||||
/**
|
||||
|
@ -256,7 +279,7 @@ public abstract class Enchantment {
|
|||
return false;
|
||||
}
|
||||
final Enchantment other = (Enchantment) obj;
|
||||
if (this.id != other.id) {
|
||||
if (!this.key.equals(other.key)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
@ -264,12 +287,12 @@ public abstract class Enchantment {
|
|||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return id;
|
||||
return key.hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Enchantment[" + id + ", " + getName() + "]";
|
||||
return "Enchantment[" + key + ", " + getName() + "]";
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -280,13 +303,13 @@ public abstract class Enchantment {
|
|||
* @param enchantment Enchantment to register
|
||||
*/
|
||||
public static void registerEnchantment(Enchantment enchantment) {
|
||||
if (byId.containsKey(enchantment.id) || byName.containsKey(enchantment.getName())) {
|
||||
if (byKey.containsKey(enchantment.key) || byName.containsKey(enchantment.getName())) {
|
||||
throw new IllegalArgumentException("Cannot set already-set enchantment");
|
||||
} else if (!isAcceptingRegistrations()) {
|
||||
throw new IllegalStateException("No longer accepting new enchantments (can only be done by the server implementation)");
|
||||
}
|
||||
|
||||
byId.put(enchantment.id, enchantment);
|
||||
byKey.put(enchantment.key, enchantment);
|
||||
byName.put(enchantment.getName(), enchantment);
|
||||
}
|
||||
|
||||
|
@ -307,15 +330,13 @@ public abstract class Enchantment {
|
|||
}
|
||||
|
||||
/**
|
||||
* Gets the Enchantment at the specified ID
|
||||
* Gets the Enchantment at the specified key
|
||||
*
|
||||
* @param id ID to fetch
|
||||
* @param key key to fetch
|
||||
* @return Resulting Enchantment, or null if not found
|
||||
* @deprecated Magic value
|
||||
*/
|
||||
@Deprecated
|
||||
public static Enchantment getById(int id) {
|
||||
return byId.get(id);
|
||||
public static Enchantment getByKey(NamespacedKey key) {
|
||||
return byKey.get(key);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -323,7 +344,9 @@ public abstract class Enchantment {
|
|||
*
|
||||
* @param name Name to fetch
|
||||
* @return Resulting Enchantment, or null if not found
|
||||
* @deprecated enchantments are badly named, use {@link #getByKey(org.bukkit.NamespacedKey)}.
|
||||
*/
|
||||
@Deprecated
|
||||
public static Enchantment getByName(String name) {
|
||||
return byName.get(name);
|
||||
}
|
||||
|
@ -334,6 +357,6 @@ public abstract class Enchantment {
|
|||
* @return Array of enchantments
|
||||
*/
|
||||
public static Enchantment[] values() {
|
||||
return byId.values().toArray(new Enchantment[byId.size()]);
|
||||
return byName.values().toArray(new Enchantment[byName.size()]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@ public enum EnchantmentTarget {
|
|||
|| item.equals(Material.CHAINMAIL_BOOTS)
|
||||
|| item.equals(Material.IRON_BOOTS)
|
||||
|| item.equals(Material.DIAMOND_BOOTS)
|
||||
|| item.equals(Material.GOLD_BOOTS);
|
||||
|| item.equals(Material.GOLDEN_BOOTS);
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -54,7 +54,7 @@ public enum EnchantmentTarget {
|
|||
|| item.equals(Material.CHAINMAIL_LEGGINGS)
|
||||
|| item.equals(Material.IRON_LEGGINGS)
|
||||
|| item.equals(Material.DIAMOND_LEGGINGS)
|
||||
|| item.equals(Material.GOLD_LEGGINGS);
|
||||
|| item.equals(Material.GOLDEN_LEGGINGS);
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -68,7 +68,7 @@ public enum EnchantmentTarget {
|
|||
|| item.equals(Material.CHAINMAIL_CHESTPLATE)
|
||||
|| item.equals(Material.IRON_CHESTPLATE)
|
||||
|| item.equals(Material.DIAMOND_CHESTPLATE)
|
||||
|| item.equals(Material.GOLD_CHESTPLATE);
|
||||
|| item.equals(Material.GOLDEN_CHESTPLATE);
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -82,7 +82,7 @@ public enum EnchantmentTarget {
|
|||
|| item.equals(Material.CHAINMAIL_HELMET)
|
||||
|| item.equals(Material.DIAMOND_HELMET)
|
||||
|| item.equals(Material.IRON_HELMET)
|
||||
|| item.equals(Material.GOLD_HELMET);
|
||||
|| item.equals(Material.GOLDEN_HELMET);
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -92,11 +92,11 @@ public enum EnchantmentTarget {
|
|||
WEAPON {
|
||||
@Override
|
||||
public boolean includes(Material item) {
|
||||
return item.equals(Material.WOOD_SWORD)
|
||||
return item.equals(Material.WOODEN_SWORD)
|
||||
|| item.equals(Material.STONE_SWORD)
|
||||
|| item.equals(Material.IRON_SWORD)
|
||||
|| item.equals(Material.DIAMOND_SWORD)
|
||||
|| item.equals(Material.GOLD_SWORD);
|
||||
|| item.equals(Material.GOLDEN_SWORD);
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -107,26 +107,26 @@ public enum EnchantmentTarget {
|
|||
TOOL {
|
||||
@Override
|
||||
public boolean includes(Material item) {
|
||||
return item.equals(Material.WOOD_SPADE)
|
||||
|| item.equals(Material.STONE_SPADE)
|
||||
|| item.equals(Material.IRON_SPADE)
|
||||
|| item.equals(Material.DIAMOND_SPADE)
|
||||
|| item.equals(Material.GOLD_SPADE)
|
||||
|| item.equals(Material.WOOD_PICKAXE)
|
||||
return item.equals(Material.WOODEN_SHOVEL)
|
||||
|| item.equals(Material.STONE_SHOVEL)
|
||||
|| item.equals(Material.IRON_SHOVEL)
|
||||
|| item.equals(Material.DIAMOND_SHOVEL)
|
||||
|| item.equals(Material.GOLDEN_SHOVEL)
|
||||
|| item.equals(Material.WOODEN_PICKAXE)
|
||||
|| item.equals(Material.STONE_PICKAXE)
|
||||
|| item.equals(Material.IRON_PICKAXE)
|
||||
|| item.equals(Material.DIAMOND_PICKAXE)
|
||||
|| item.equals(Material.GOLD_PICKAXE)
|
||||
|| item.equals(Material.WOOD_HOE)
|
||||
|| item.equals(Material.GOLDEN_PICKAXE)
|
||||
|| item.equals(Material.WOODEN_HOE)
|
||||
|| item.equals(Material.STONE_HOE)
|
||||
|| item.equals(Material.IRON_HOE)
|
||||
|| item.equals(Material.DIAMOND_HOE)
|
||||
|| item.equals(Material.GOLD_HOE)
|
||||
|| item.equals(Material.WOOD_AXE)
|
||||
|| item.equals(Material.GOLDEN_HOE)
|
||||
|| item.equals(Material.WOODEN_AXE)
|
||||
|| item.equals(Material.STONE_AXE)
|
||||
|| item.equals(Material.IRON_AXE)
|
||||
|| item.equals(Material.DIAMOND_AXE)
|
||||
|| item.equals(Material.GOLD_AXE)
|
||||
|| item.equals(Material.GOLDEN_AXE)
|
||||
|| item.equals(Material.SHEARS)
|
||||
|| item.equals(Material.FLINT_AND_STEEL);
|
||||
}
|
||||
|
@ -171,8 +171,24 @@ public enum EnchantmentTarget {
|
|||
return ARMOR.includes(item)
|
||||
|| item.equals(Material.ELYTRA)
|
||||
|| item.equals(Material.PUMPKIN)
|
||||
|| item.equals(Material.CARVED_PUMPKIN)
|
||||
|| item.equals(Material.JACK_O_LANTERN)
|
||||
|| item.equals(Material.SKULL_ITEM);
|
||||
|| item.equals(Material.SKELETON_SKULL)
|
||||
|| item.equals(Material.WITHER_SKELETON_SKULL)
|
||||
|| item.equals(Material.ZOMBIE_HEAD)
|
||||
|| item.equals(Material.PLAYER_HEAD)
|
||||
|| item.equals(Material.CREEPER_HEAD)
|
||||
|| item.equals(Material.DRAGON_HEAD);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Allow the Enchantment to be placed on tridents.
|
||||
*/
|
||||
TRIDENT {
|
||||
@Override
|
||||
public boolean includes(Material item) {
|
||||
return item.equals(Material.TRIDENT);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -1,13 +1,14 @@
|
|||
package org.bukkit.enchantments;
|
||||
|
||||
import org.bukkit.NamespacedKey;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
/**
|
||||
* A simple wrapper for ease of selecting {@link Enchantment}s
|
||||
*/
|
||||
public class EnchantmentWrapper extends Enchantment {
|
||||
public EnchantmentWrapper(int id) {
|
||||
super(id);
|
||||
public EnchantmentWrapper(String name) {
|
||||
super(NamespacedKey.minecraft(name));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -16,7 +17,7 @@ public class EnchantmentWrapper extends Enchantment {
|
|||
* @return Enchantment
|
||||
*/
|
||||
public Enchantment getEnchantment() {
|
||||
return Enchantment.getById(getId());
|
||||
return Enchantment.getByKey(getKey());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
7
paper-api/src/main/java/org/bukkit/entity/Cod.java
Normal file
7
paper-api/src/main/java/org/bukkit/entity/Cod.java
Normal file
|
@ -0,0 +1,7 @@
|
|||
|
||||
package org.bukkit.entity;
|
||||
|
||||
/**
|
||||
* Represents a cod fish.
|
||||
*/
|
||||
public interface Cod extends Fish { }
|
3
paper-api/src/main/java/org/bukkit/entity/Dolphin.java
Normal file
3
paper-api/src/main/java/org/bukkit/entity/Dolphin.java
Normal file
|
@ -0,0 +1,3 @@
|
|||
package org.bukkit.entity;
|
||||
|
||||
public interface Dolphin extends Creature { }
|
6
paper-api/src/main/java/org/bukkit/entity/Drowned.java
Normal file
6
paper-api/src/main/java/org/bukkit/entity/Drowned.java
Normal file
|
@ -0,0 +1,6 @@
|
|||
package org.bukkit.entity;
|
||||
|
||||
/**
|
||||
* Drowned zombie.
|
||||
*/
|
||||
public interface Drowned extends Zombie { }
|
|
@ -1,5 +1,6 @@
|
|||
package org.bukkit.entity;
|
||||
|
||||
import org.bukkit.block.data.BlockData;
|
||||
import org.bukkit.material.MaterialData;
|
||||
|
||||
/**
|
||||
|
@ -8,16 +9,30 @@ import org.bukkit.material.MaterialData;
|
|||
public interface Enderman extends Monster {
|
||||
|
||||
/**
|
||||
* Get the id and data of the block that the Enderman is carrying.
|
||||
* Gets the id and data of the block that the Enderman is carrying.
|
||||
*
|
||||
* @return MaterialData containing the id and data of the block
|
||||
*/
|
||||
public MaterialData getCarriedMaterial();
|
||||
|
||||
/**
|
||||
* Set the id and data of the block that the Enderman is carrying.
|
||||
* Sets the id and data of the block that the Enderman is carrying.
|
||||
*
|
||||
* @param material data to set the carried block to
|
||||
*/
|
||||
public void setCarriedMaterial(MaterialData material);
|
||||
|
||||
/**
|
||||
* Gets the data of the block that the Enderman is carrying.
|
||||
*
|
||||
* @return BlockData containing the carried block
|
||||
*/
|
||||
public BlockData getCarriedBlock();
|
||||
|
||||
/**
|
||||
* Sets the data of the block that the Enderman is carrying.
|
||||
*
|
||||
* @param blockData data to set the carried block to
|
||||
*/
|
||||
public void setCarriedBlock(BlockData blockData);
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ public enum EntityType {
|
|||
/**
|
||||
* An experience orb.
|
||||
*/
|
||||
EXPERIENCE_ORB("xp_orb", ExperienceOrb.class, 2),
|
||||
EXPERIENCE_ORB("experience_orb", ExperienceOrb.class, 2),
|
||||
/**
|
||||
* @see AreaEffectCloud
|
||||
*/
|
||||
|
@ -80,7 +80,7 @@ public enum EntityType {
|
|||
/**
|
||||
* An ender eye signal.
|
||||
*/
|
||||
ENDER_SIGNAL("eye_of_ender_signal", EnderSignal.class, 15),
|
||||
ENDER_SIGNAL("eye_of_ender", EnderSignal.class, 15),
|
||||
/**
|
||||
* A flying splash potion.
|
||||
*/
|
||||
|
@ -88,7 +88,7 @@ public enum EntityType {
|
|||
/**
|
||||
* A flying experience bottle.
|
||||
*/
|
||||
THROWN_EXP_BOTTLE("xp_bottle", ThrownExpBottle.class, 17),
|
||||
THROWN_EXP_BOTTLE("experience_bottle", ThrownExpBottle.class, 17),
|
||||
/**
|
||||
* An item frame on a wall.
|
||||
*/
|
||||
|
@ -108,7 +108,7 @@ public enum EntityType {
|
|||
/**
|
||||
* Internal representation of a Firework once it has been launched.
|
||||
*/
|
||||
FIREWORK("fireworks_rocket", Firework.class, 22, false),
|
||||
FIREWORK("firework_rocket", Firework.class, 22, false),
|
||||
/**
|
||||
* @see Husk
|
||||
*/
|
||||
|
@ -152,11 +152,11 @@ public enum EntityType {
|
|||
/**
|
||||
* @see EvokerFangs
|
||||
*/
|
||||
EVOKER_FANGS("evocation_fangs", EvokerFangs.class, 33),
|
||||
EVOKER_FANGS("evoker_fangs", EvokerFangs.class, 33),
|
||||
/**
|
||||
* @see Evoker
|
||||
*/
|
||||
EVOKER("evocation_illager", Evoker.class, 34),
|
||||
EVOKER("evoker", Evoker.class, 34),
|
||||
/**
|
||||
* @see Vex
|
||||
*/
|
||||
|
@ -164,15 +164,15 @@ public enum EntityType {
|
|||
/**
|
||||
* @see Vindicator
|
||||
*/
|
||||
VINDICATOR("vindication_illager", Vindicator.class, 36),
|
||||
VINDICATOR("vindicator", Vindicator.class, 36),
|
||||
/**
|
||||
* @see Illusioner
|
||||
*/
|
||||
ILLUSIONER("illusion_illager", Illusioner.class, 37),
|
||||
ILLUSIONER("illusioner", Illusioner.class, 37),
|
||||
/**
|
||||
* @see CommandMinecart
|
||||
*/
|
||||
MINECART_COMMAND("commandblock_minecart", CommandMinecart.class, 40),
|
||||
MINECART_COMMAND("command_block_minecart", CommandMinecart.class, 40),
|
||||
/**
|
||||
* A placed boat.
|
||||
*/
|
||||
|
@ -228,9 +228,9 @@ public enum EntityType {
|
|||
SQUID("squid", Squid.class, 94),
|
||||
WOLF("wolf", Wolf.class, 95),
|
||||
MUSHROOM_COW("mooshroom", MushroomCow.class, 96),
|
||||
SNOWMAN("snowman", Snowman.class, 97),
|
||||
SNOWMAN("snow_golem", Snowman.class, 97),
|
||||
OCELOT("ocelot", Ocelot.class, 98),
|
||||
IRON_GOLEM("villager_golem", IronGolem.class, 99),
|
||||
IRON_GOLEM("iron_golem", IronGolem.class, 99),
|
||||
HORSE("horse", Horse.class, 100),
|
||||
RABBIT("rabbit", Rabbit.class, 101),
|
||||
POLAR_BEAR("polar_bear", PolarBear.class, 102),
|
||||
|
@ -238,7 +238,16 @@ public enum EntityType {
|
|||
LLAMA_SPIT("llama_spit", LlamaSpit.class, 104),
|
||||
PARROT("parrot", Parrot.class, 105),
|
||||
VILLAGER("villager", Villager.class, 120),
|
||||
ENDER_CRYSTAL("ender_crystal", EnderCrystal.class, 200),
|
||||
ENDER_CRYSTAL("end_crystal", EnderCrystal.class, 200),
|
||||
TURTLE("turtle", Turtle.class, -1),
|
||||
PHANTOM("phantom", Phantom.class, -1),
|
||||
TRIDENT("trident", Trident.class, -1),
|
||||
COD("cod", Cod.class, -1),
|
||||
SALMON("salmon", Salmon.class, -1),
|
||||
PUFFERFISH("pufferfish", PufferFish.class, -1),
|
||||
TROPICAL_FISH("tropical_fish", TropicalFish.class, -1),
|
||||
DROWNED("drowned", Drowned.class, -1),
|
||||
DOLPHIN("dolphin", Dolphin.class, -1),
|
||||
// These don't have an entity ID in nms.EntityTypes.
|
||||
/**
|
||||
* A flying lingering potion
|
||||
|
@ -247,15 +256,15 @@ public enum EntityType {
|
|||
/**
|
||||
* A fishing line and bobber.
|
||||
*/
|
||||
FISHING_HOOK(null, FishHook.class, -1, false),
|
||||
FISHING_HOOK("fishing_bobber", FishHook.class, -1, false),
|
||||
/**
|
||||
* A bolt of lightning.
|
||||
* <p>
|
||||
* Spawn with {@link World#strikeLightning(Location)}.
|
||||
*/
|
||||
LIGHTNING(null, LightningStrike.class, -1, false),
|
||||
LIGHTNING("lightning_bolt", LightningStrike.class, -1, false),
|
||||
WEATHER(null, Weather.class, -1, false),
|
||||
PLAYER(null, Player.class, -1, false),
|
||||
PLAYER("player", Player.class, -1, false),
|
||||
COMPLEX_PART(null, ComplexEntityPart.class, -1, false),
|
||||
/**
|
||||
* Like {@link #ARROW} but tipped with a specific potion which is applied on
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package org.bukkit.entity;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
|
||||
/**
|
||||
* Represents a falling block
|
||||
|
@ -11,26 +12,18 @@ public interface FallingBlock extends Entity {
|
|||
* Get the Material of the falling block
|
||||
*
|
||||
* @return Material of the block
|
||||
*/
|
||||
Material getMaterial();
|
||||
|
||||
/**
|
||||
* Get the ID of the falling block
|
||||
*
|
||||
* @return ID type of the block
|
||||
* @deprecated Magic value
|
||||
* @deprecated use {@link #getBlockData()}
|
||||
*/
|
||||
@Deprecated
|
||||
int getBlockId();
|
||||
Material getMaterial();
|
||||
|
||||
/**
|
||||
* Get the data for the falling block
|
||||
*
|
||||
* @return data of the block
|
||||
* @deprecated Magic value
|
||||
*/
|
||||
@Deprecated
|
||||
byte getBlockData();
|
||||
BlockData getBlockData();
|
||||
|
||||
/**
|
||||
* Get if the falling block will break into an item if it cannot be placed
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
package org.bukkit.entity;
|
||||
|
||||
/**
|
||||
* Represents a fishing hook.
|
||||
* @deprecated in favor of {@link FishHook}
|
||||
* Represents a fish entity.
|
||||
*/
|
||||
public interface Fish extends FishHook {
|
||||
}
|
||||
public interface Fish extends Creature { }
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package org.bukkit.entity;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
import org.bukkit.material.MaterialData;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
|
@ -108,6 +109,22 @@ public interface Minecart extends Vehicle {
|
|||
*/
|
||||
public MaterialData getDisplayBlock();
|
||||
|
||||
/**
|
||||
* Sets the display block for this minecart.
|
||||
* Passing a null value will set the minecart to have no display block.
|
||||
*
|
||||
* @param blockData the material to set as display block.
|
||||
*/
|
||||
public void setDisplayBlockData(BlockData blockData);
|
||||
|
||||
/**
|
||||
* Gets the display block for this minecart.
|
||||
* This function will return the type AIR if none is set.
|
||||
*
|
||||
* @return the block displayed by this minecart.
|
||||
*/
|
||||
public BlockData getDisplayBlockData();
|
||||
|
||||
/**
|
||||
* Sets the offset of the display block.
|
||||
*
|
||||
|
|
17
paper-api/src/main/java/org/bukkit/entity/Phantom.java
Normal file
17
paper-api/src/main/java/org/bukkit/entity/Phantom.java
Normal file
|
@ -0,0 +1,17 @@
|
|||
package org.bukkit.entity;
|
||||
|
||||
/**
|
||||
* Represents a phantom.
|
||||
*/
|
||||
public interface Phantom extends Flying {
|
||||
|
||||
/**
|
||||
* @return The size of the phantom
|
||||
*/
|
||||
public int getSize();
|
||||
|
||||
/**
|
||||
* @param sz The new size of the phantom.
|
||||
*/
|
||||
public void setSize(int sz);
|
||||
}
|
|
@ -18,6 +18,7 @@ import org.bukkit.Statistic;
|
|||
import org.bukkit.WeatherType;
|
||||
import org.bukkit.advancement.Advancement;
|
||||
import org.bukkit.advancement.AdvancementProgress;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.conversations.Conversable;
|
||||
import org.bukkit.event.player.PlayerResourcePackStatusEvent;
|
||||
|
@ -337,6 +338,15 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline
|
|||
@Deprecated
|
||||
public void sendBlockChange(Location loc, Material material, byte data);
|
||||
|
||||
/**
|
||||
* Send a block change. This fakes a block change packet for a user at a
|
||||
* certain location. This will not actually change the world in any way.
|
||||
*
|
||||
* @param loc The location of the changed block
|
||||
* @param block The new block
|
||||
*/
|
||||
public void sendBlockChange(Location loc, BlockData block);
|
||||
|
||||
/**
|
||||
* Send a chunk change. This fakes a chunk change packet for a user at a
|
||||
* certain location. The updated cuboid must be entirely within a single
|
||||
|
@ -357,23 +367,11 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline
|
|||
@Deprecated
|
||||
public boolean sendChunkChange(Location loc, int sx, int sy, int sz, byte[] data);
|
||||
|
||||
/**
|
||||
* Send a block change. This fakes a block change packet for a user at a
|
||||
* certain location. This will not actually change the world in any way.
|
||||
*
|
||||
* @param loc The location of the changed block
|
||||
* @param material The new block ID
|
||||
* @param data The block data
|
||||
* @deprecated Magic value
|
||||
*/
|
||||
@Deprecated
|
||||
public void sendBlockChange(Location loc, int material, byte data);
|
||||
|
||||
/**
|
||||
* Send a sign change. This fakes a sign change packet for a user at
|
||||
* a certain location. This will not actually change the world in any way.
|
||||
* This method will use a sign at the location's block or a faked sign
|
||||
* sent via {@link #sendBlockChange(org.bukkit.Location, int, byte)} or
|
||||
* sent via
|
||||
* {@link #sendBlockChange(org.bukkit.Location, org.bukkit.Material, byte)}.
|
||||
* <p>
|
||||
* If the client does not have a sign at the given location it will
|
||||
|
|
21
paper-api/src/main/java/org/bukkit/entity/PufferFish.java
Normal file
21
paper-api/src/main/java/org/bukkit/entity/PufferFish.java
Normal file
|
@ -0,0 +1,21 @@
|
|||
package org.bukkit.entity;
|
||||
|
||||
/**
|
||||
* Represents a puffer fish.
|
||||
*/
|
||||
public interface PufferFish extends Fish {
|
||||
|
||||
/**
|
||||
* Returns the current puff state of this fish (i.e. how inflated it is).
|
||||
*
|
||||
* @return current puff state
|
||||
*/
|
||||
int getPuffState();
|
||||
|
||||
/**
|
||||
* Sets the current puff state of this fish (i.e. how inflated it is).
|
||||
*
|
||||
* @param state new puff state
|
||||
*/
|
||||
void setPuffState(int state);
|
||||
}
|
7
paper-api/src/main/java/org/bukkit/entity/Salmon.java
Normal file
7
paper-api/src/main/java/org/bukkit/entity/Salmon.java
Normal file
|
@ -0,0 +1,7 @@
|
|||
|
||||
package org.bukkit.entity;
|
||||
|
||||
/**
|
||||
* Represents a salmon fish.
|
||||
*/
|
||||
public interface Salmon extends Fish { }
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue