Package ch.njol.skript.util
Class DelayedChangeBlock
java.lang.Object
ch.njol.skript.util.DelayedChangeBlock
- All Implemented Interfaces:
net.kyori.adventure.translation.Translatable
,Block
,Metadatable
,Translatable
A block that gets all data from the world, but either delays
any changes by 1 tick of reflects them on a given BlockState
depending on which constructor is used.
-
Constructor Summary
ConstructorDescriptionDelayedChangeBlock
(Block block) DelayedChangeBlock
(Block block, @Nullable BlockState newState) -
Method Summary
Modifier and TypeMethodDescriptionboolean
applyBoneMeal
(BlockFace blockFace) boolean
boolean
breakNaturally
(boolean triggerEffect) boolean
breakNaturally
(boolean triggerEffect, boolean dropExperience) boolean
breakNaturally
(@NotNull ItemStack tool, boolean triggerEffect, boolean dropExperience) boolean
breakNaturally
(@Nullable ItemStack tool) boolean
breakNaturally
(ItemStack tool, boolean triggerEffect) boolean
void
getBiome()
getBlock()
int
int
getBlockPower
(BlockFace face) @NotNull SoundGroup
float
getBreakSpeed
(@NotNull Player player) getChunk()
@NotNull VoxelShape
@NotNull Biome
byte
getData()
float
getDestroySpeed
(@NotNull ItemStack itemStack, boolean considerEnchants) float
getDestroySpeed
(ItemStack itemStack) getDrops()
@Nullable BlockFace
double
byte
byte
byte
@Nullable Location
getLocation
(@Nullable Location loc) getMetadata
(String metadataKey) getRelative
(int modX, int modY, int modZ) getRelative
(BlockFace face) getRelative
(BlockFace face, int distance) getState()
getState
(boolean useSnapshot) double
getType()
getWorld()
int
getX()
int
getY()
int
getZ()
boolean
hasMetadata
(String metadataKey) boolean
boolean
isBlockFacePowered
(BlockFace face) boolean
boolean
boolean
boolean
boolean
boolean
isEmpty()
boolean
isLiquid()
boolean
boolean
isPreferredTool
(@NotNull ItemStack tool) boolean
boolean
isSolid()
boolean
isValidTool
(@NotNull ItemStack itemStack) void
@Nullable RayTraceResult
rayTrace
(Location start, Vector direction, double maxDistance, FluidCollisionMode fluidCollisionMode) void
removeMetadata
(String metadataKey, Plugin owningPlugin) void
void
setBlockData
(BlockData data) void
setBlockData
(BlockData data, boolean applyPhysics) void
setMetadata
(String metadataKey, MetadataValue newMetadataValue) void
void
void
tick()
@NotNull String
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.bukkit.block.Block
getBlockKey
-
Constructor Details
-
DelayedChangeBlock
-
DelayedChangeBlock
-
-
Method Details
-
getBlock
-
setMetadata
- Specified by:
setMetadata
in interfaceMetadatable
-
getMetadata
- Specified by:
getMetadata
in interfaceMetadatable
-
hasMetadata
- Specified by:
hasMetadata
in interfaceMetadatable
-
removeMetadata
- Specified by:
removeMetadata
in interfaceMetadatable
-
getData
public byte getData() -
getRelative
- Specified by:
getRelative
in interfaceBlock
-
getRelative
- Specified by:
getRelative
in interfaceBlock
-
getRelative
- Specified by:
getRelative
in interfaceBlock
-
getType
-
getLightLevel
public byte getLightLevel()- Specified by:
getLightLevel
in interfaceBlock
-
getLightFromSky
public byte getLightFromSky()- Specified by:
getLightFromSky
in interfaceBlock
-
getLightFromBlocks
public byte getLightFromBlocks()- Specified by:
getLightFromBlocks
in interfaceBlock
-
getWorld
-
getX
public int getX() -
getY
public int getY() -
getZ
public int getZ() -
getLocation
- Specified by:
getLocation
in interfaceBlock
-
getChunk
-
setType
-
getFace
-
getState
-
getState
-
getBiome
-
getComputedBiome
- Specified by:
getComputedBiome
in interfaceBlock
-
setBiome
-
isBlockPowered
public boolean isBlockPowered()- Specified by:
isBlockPowered
in interfaceBlock
-
isBlockIndirectlyPowered
public boolean isBlockIndirectlyPowered()- Specified by:
isBlockIndirectlyPowered
in interfaceBlock
-
isBlockFacePowered
- Specified by:
isBlockFacePowered
in interfaceBlock
-
isBlockFaceIndirectlyPowered
- Specified by:
isBlockFaceIndirectlyPowered
in interfaceBlock
-
getBlockPower
- Specified by:
getBlockPower
in interfaceBlock
-
getBlockPower
public int getBlockPower()- Specified by:
getBlockPower
in interfaceBlock
-
isEmpty
public boolean isEmpty() -
isLiquid
public boolean isLiquid() -
isBuildable
public boolean isBuildable()- Specified by:
isBuildable
in interfaceBlock
-
isBurnable
public boolean isBurnable()- Specified by:
isBurnable
in interfaceBlock
-
isReplaceable
public boolean isReplaceable()- Specified by:
isReplaceable
in interfaceBlock
-
isSolid
public boolean isSolid() -
isCollidable
public boolean isCollidable()- Specified by:
isCollidable
in interfaceBlock
-
getTemperature
public double getTemperature()- Specified by:
getTemperature
in interfaceBlock
-
getHumidity
public double getHumidity()- Specified by:
getHumidity
in interfaceBlock
-
getPistonMoveReaction
- Specified by:
getPistonMoveReaction
in interfaceBlock
-
breakNaturally
public boolean breakNaturally()- Specified by:
breakNaturally
in interfaceBlock
-
breakNaturally
- Specified by:
breakNaturally
in interfaceBlock
-
breakNaturally
public boolean breakNaturally(boolean triggerEffect) - Specified by:
breakNaturally
in interfaceBlock
-
breakNaturally
- Specified by:
breakNaturally
in interfaceBlock
-
tick
public void tick() -
fluidTick
public void fluidTick() -
randomTick
public void randomTick()- Specified by:
randomTick
in interfaceBlock
-
applyBoneMeal
- Specified by:
applyBoneMeal
in interfaceBlock
-
getDrops
-
getDrops
-
getDrops
-
getLocation
- Specified by:
getLocation
in interfaceBlock
-
setType
-
getBlockData
- Specified by:
getBlockData
in interfaceBlock
-
setBlockData
- Specified by:
setBlockData
in interfaceBlock
-
setBlockData
- Specified by:
setBlockData
in interfaceBlock
-
rayTrace
@Nullable public @Nullable RayTraceResult rayTrace(Location start, Vector direction, double maxDistance, FluidCollisionMode fluidCollisionMode) -
isPassable
public boolean isPassable()- Specified by:
isPassable
in interfaceBlock
-
getBoundingBox
- Specified by:
getBoundingBox
in interfaceBlock
-
getSoundGroup
- Specified by:
getSoundGroup
in interfaceBlock
-
getBlockSoundGroup
- Specified by:
getBlockSoundGroup
in interfaceBlock
-
getTranslationKey
- Specified by:
getTranslationKey
in interfaceBlock
- Specified by:
getTranslationKey
in interfaceTranslatable
-
getDestroySpeed
- Specified by:
getDestroySpeed
in interfaceBlock
-
isPreferredTool
- Specified by:
isPreferredTool
in interfaceBlock
-
isValidTool
- Specified by:
isValidTool
in interfaceBlock
-
getDestroySpeed
- Specified by:
getDestroySpeed
in interfaceBlock
-
getCollisionShape
- Specified by:
getCollisionShape
in interfaceBlock
-
canPlace
-
getBreakSpeed
- Specified by:
getBreakSpeed
in interfaceBlock
-
translationKey
- Specified by:
translationKey
in interfacenet.kyori.adventure.translation.Translatable
-
breakNaturally
public boolean breakNaturally(boolean triggerEffect, boolean dropExperience) - Specified by:
breakNaturally
in interfaceBlock
-
breakNaturally
public boolean breakNaturally(@NotNull @NotNull ItemStack tool, boolean triggerEffect, boolean dropExperience) - Specified by:
breakNaturally
in interfaceBlock
-