mirror of https://github.com/Minestom/Minestom.git
25 lines
591 B
Java
25 lines
591 B
Java
package fr.themode.minestom.instance.block.rule;
|
|
|
|
import fr.themode.minestom.instance.Instance;
|
|
import fr.themode.minestom.instance.block.Block;
|
|
import fr.themode.minestom.utils.BlockPosition;
|
|
|
|
public abstract class BlockPlacementRule {
|
|
|
|
private short blockId;
|
|
|
|
public BlockPlacementRule(short blockId) {
|
|
this.blockId = blockId;
|
|
}
|
|
|
|
public BlockPlacementRule(Block block) {
|
|
this(block.getBlockId());
|
|
}
|
|
|
|
public abstract short blockRefresh(Instance instance, BlockPosition blockPosition);
|
|
|
|
public short getBlockId() {
|
|
return blockId;
|
|
}
|
|
}
|