63
paper-api/src/main/java/org/bukkit/block/Crafter.java
Normal file
63
paper-api/src/main/java/org/bukkit/block/Crafter.java
Normal file
@@ -0,0 +1,63 @@
|
||||
package org.bukkit.block;
|
||||
|
||||
import org.bukkit.MinecraftExperimental;
|
||||
import org.bukkit.loot.Lootable;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
|
||||
/**
|
||||
* Represents a captured state of a crafter.
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental
|
||||
public interface Crafter extends Container, Lootable {
|
||||
|
||||
/**
|
||||
* Gets the number of ticks which this block will remain in the crafting
|
||||
* state for.
|
||||
*
|
||||
* @return number of ticks remaining
|
||||
* @see org.bukkit.block.data.type.Crafter#isCrafting()
|
||||
*/
|
||||
int getCraftingTicks();
|
||||
|
||||
/**
|
||||
* Sets the number of ticks which this block will remain in the crafting
|
||||
* state for.
|
||||
*
|
||||
* @param ticks number of ticks remaining
|
||||
* @see org.bukkit.block.data.type.Crafter#isCrafting()
|
||||
*/
|
||||
void setCraftingTicks(int ticks);
|
||||
|
||||
/**
|
||||
* Gets whether the slot at the specified index is disabled and will not
|
||||
* have items placed in it.
|
||||
*
|
||||
* @param slot slot index
|
||||
* @return disabled status
|
||||
*/
|
||||
boolean isSlotDisabled(int slot);
|
||||
|
||||
/**
|
||||
* Sets whether the slot at the specified index is disabled and will not
|
||||
* have items placed in it.
|
||||
*
|
||||
* @param slot slot index
|
||||
* @param disabled disabled status
|
||||
*/
|
||||
void setSlotDisabled(int slot, boolean disabled);
|
||||
|
||||
/**
|
||||
* Gets whether this Crafter is powered.
|
||||
*
|
||||
* @return powered status
|
||||
*/
|
||||
boolean isTriggered();
|
||||
|
||||
/**
|
||||
* Sets whether this Crafter is powered.
|
||||
*
|
||||
* @param triggered powered status
|
||||
*/
|
||||
void setTriggered(boolean triggered);
|
||||
}
|
||||
12
paper-api/src/main/java/org/bukkit/block/TrialSpawner.java
Normal file
12
paper-api/src/main/java/org/bukkit/block/TrialSpawner.java
Normal file
@@ -0,0 +1,12 @@
|
||||
package org.bukkit.block;
|
||||
|
||||
import org.bukkit.MinecraftExperimental;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
|
||||
/**
|
||||
* Represents a captured state of a trial spawner.
|
||||
*/
|
||||
@MinecraftExperimental
|
||||
@ApiStatus.Experimental
|
||||
public interface TrialSpawner extends TileState {
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.MinecraftExperimental;
|
||||
import org.bukkit.block.data.Lightable;
|
||||
import org.bukkit.block.data.Powerable;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
|
||||
@MinecraftExperimental
|
||||
@ApiStatus.Experimental
|
||||
public interface CopperBulb extends Lightable, Powerable {
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.MinecraftExperimental;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* 'orientation' is the direction the block is facing.
|
||||
* <br>
|
||||
* Similar to {@link Powerable}, 'triggered' indicates whether or not the
|
||||
* dispenser is currently activated.
|
||||
* <br>
|
||||
* 'crafting' is whether crafter's mouth is open and top is glowing.
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental
|
||||
public interface Crafter extends BlockData {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'crafting' property.
|
||||
*
|
||||
* @return the 'crafting' value
|
||||
*/
|
||||
boolean isCrafting();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'crafting' property.
|
||||
*
|
||||
* @param crafting the new 'crafting' value
|
||||
*/
|
||||
void setCrafting(boolean crafting);
|
||||
|
||||
/**
|
||||
* Gets the value of the 'triggered' property.
|
||||
*
|
||||
* @return the 'triggered' value
|
||||
*/
|
||||
boolean isTriggered();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'triggered' property.
|
||||
*
|
||||
* @param triggered the new 'triggered' value
|
||||
*/
|
||||
void setTriggered(boolean triggered);
|
||||
|
||||
/**
|
||||
* Gets the value of the 'orientation' property.
|
||||
*
|
||||
* @return the 'orientation' value
|
||||
*/
|
||||
@NotNull
|
||||
Orientation getOrientation();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'orientation' property.
|
||||
*
|
||||
* @param orientation the new 'orientation' value
|
||||
*/
|
||||
void setOrientation(@NotNull Orientation orientation);
|
||||
|
||||
/**
|
||||
* The directions the Crafter can be oriented.
|
||||
*/
|
||||
public enum Orientation {
|
||||
|
||||
DOWN_EAST,
|
||||
DOWN_NORTH,
|
||||
DOWN_SOUTH,
|
||||
DOWN_WEST,
|
||||
UP_EAST,
|
||||
UP_NORTH,
|
||||
UP_SOUTH,
|
||||
UP_WEST,
|
||||
WEST_UP,
|
||||
EAST_UP,
|
||||
NORTH_UP,
|
||||
SOUTH_UP;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package org.bukkit.block.data.type;
|
||||
|
||||
import org.bukkit.MinecraftExperimental;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* 'trial_spawner_state' indicates the current operational phase of the spawner.
|
||||
*/
|
||||
@MinecraftExperimental
|
||||
@ApiStatus.Experimental
|
||||
public interface TrialSpawner extends BlockData {
|
||||
|
||||
/**
|
||||
* Gets the value of the 'trial_spawner_state' property.
|
||||
*
|
||||
* @return the 'trial_spawner_state' value
|
||||
*/
|
||||
@NotNull
|
||||
State getTrialSpawnerState();
|
||||
|
||||
/**
|
||||
* Sets the value of the 'trial_spawner_state' property.
|
||||
*
|
||||
* @param state the new 'trial_spawner_state' value
|
||||
*/
|
||||
void setTrialSpawnerState(@NotNull State state);
|
||||
|
||||
public enum State {
|
||||
|
||||
INACTIVE,
|
||||
WAITING_FOR_PLAYERS,
|
||||
ACTIVE,
|
||||
WAITING_FOR_REWARD_EJECTION,
|
||||
EJECTING_REWARD,
|
||||
COOLDOWN;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user