本文整理了Java中org.bukkit.block.Block.getTypeId()
方法的一些代码示例,展示了Block.getTypeId()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Block.getTypeId()
方法的具体详情如下:
包路径:org.bukkit.block.Block
类名称:Block
方法名:getTypeId
[英]Gets the type-id of this block
[中]获取此块的类型id
代码示例来源:origin: GlowstoneMC/Glowstone
@Override
public boolean update(boolean force, boolean applyPhysics) {
Block block = getBlock();
return (block.getTypeId() == typeId || force)
&& block.setTypeIdAndData(typeId, getRawData(), applyPhysics);
}
代码示例来源:origin: GlowstoneMC/Glowstone
Block block = blocks.get(i);
setType(block.getRelative(pistonBlockFace), block.getTypeId(), block.getData());
setType(relativeBlock, block.getTypeId(), block.getData());
setType(block, 0, 0);
代码示例来源:origin: webbukkit/dynmap
private void checkBlock(Block b, String trigger) {
BlockToCheck btt = new BlockToCheck();
btt.loc = b.getLocation();
btt.typeid = b.getTypeId();
btt.data = b.getData();
btt.trigger = trigger;
blocks_to_check_accum.add(btt); /* Add to accumulator */
btth.startIfNeeded();
}
代码示例来源:origin: com.github.shynixn.ball/ball-bukkit-core
private boolean isValidKnockBackBlock(org.bukkit.block.Block block) {
final int id = block.getTypeId();
for (final int i : excludedRelativeItems) {
if (i == id) {
return false;
}
}
return true;
}
代码示例来源:origin: com.github.shynixn.ball/ball-bukkit-core
private boolean isValidKnockBackBlock(org.bukkit.block.Block block) {
final int id = block.getTypeId();
for (final int i : excludedRelativeItems) {
if (i == id) {
return false;
}
}
return true;
}
代码示例来源:origin: com.github.shynixn.ball/ball-bukkit-core
private boolean isValidKnockBackBlock(org.bukkit.block.Block block) {
final int id = block.getTypeId();
for (final int i : excludedRelativeItems) {
if (i == id) {
return false;
}
}
return true;
}
代码示例来源:origin: com.github.shynixn.ball/ball-bukkit-core
private boolean isValidKnockBackBlock(org.bukkit.block.Block block) {
final int id = block.getTypeId();
for (final int i : excludedRelativeItems) {
if (i == id) {
return false;
}
}
return true;
}
代码示例来源:origin: com.github.shynixn.ball/ball-bukkit-core
private boolean isValidKnockBackBlock(org.bukkit.block.Block block) {
final int id = block.getTypeId();
for (final int i : excludedRelativeItems) {
if (i == id) {
return false;
}
}
return true;
}
代码示例来源:origin: com.github.shynixn.ball/ball-bukkit-core
private boolean isValidKnockBackBlock(org.bukkit.block.Block block) {
final int id = block.getTypeId();
for (final int i : excludedRelativeItems) {
if (i == id) {
return false;
}
}
return true;
}
代码示例来源:origin: com.github.shynixn.ball/ball-bukkit-core
private boolean isValidKnockBackBlock(org.bukkit.block.Block block) {
final int id = block.getTypeId();
for (final int i : excludedRelativeItems) {
if (i == id) {
return false;
}
}
return true;
}
代码示例来源:origin: com.github.shynixn.ball/ball-bukkit-core
private boolean isValidKnockBackBlock(org.bukkit.block.Block block) {
final int id = block.getTypeId();
for (final int i : excludedRelativeItems) {
if (i == id) {
return false;
}
}
return true;
}
代码示例来源:origin: marcelo-mason/PreciousStones
/**
* If the block is missing
*
* @return
*/
public boolean missingBlock() {
Block block = getBlock();
return block.getTypeId() == 0;
}
代码示例来源:origin: marcelo-mason/PreciousStones
/**
* If the block matches the field type stored on the db
*
* @return
*/
public boolean matchesBlockType() {
Block block = getBlock();
return block.getTypeId() == getTypeId();
}
代码示例来源:origin: marcelo-mason/PreciousStones
/**
* @param block
*/
public BlockEntry(Block block) {
this.typeId = block.getTypeId();
this.data = block.getData();
this.location = block.getLocation();
}
代码示例来源:origin: marcelo-mason/PreciousStones
/**
* Returns the block at the sight. Returns null if out of range or if no viable target was found
*
* @return Block
*/
public Block getTargetBlock() {
this.reset();
while ((getNextBlock() != null) && ((getCurrentBlock().getTypeId() == 0) || this.blockToIgnoreHasValue(getCurrentBlock().getTypeId())))
;
return getCurrentBlock();
}
代码示例来源:origin: marcelo-mason/PreciousStones
/**
* @param block
*/
public Unbreakable(Block block) {
super(block.getX(), block.getY(), block.getZ(), block.getWorld().getName());
this.type = new BlockTypeEntry(block.getTypeId(), block.getData());
this.dirty = true;
}
代码示例来源:origin: marcelo-mason/PreciousStones
/**
* @param block
*/
public GriefBlock(Block block) {
super(block.getX(), block.getY(), block.getZ(), block.getWorld().getName());
this.type = new BlockTypeEntry(block.getTypeId(), block.getData());
}
代码示例来源:origin: marcelo-mason/PreciousStones
/**
* @param block
*/
public TranslocationBlock(Block block) {
super(block.getX(), block.getY(), block.getZ(), block.getWorld().getName());
this.type = new BlockTypeEntry(block.getTypeId(), block.getData());
}
代码示例来源:origin: marcelo-mason/PreciousStones
/**
* @param block
* @param owner
*/
public Unbreakable(Block block, String owner) {
super(block.getX(), block.getY(), block.getZ(), block.getWorld().getName());
this.owner = owner;
this.type = new BlockTypeEntry(block.getTypeId(), block.getData());
this.dirty = true;
}
代码示例来源:origin: marcelo-mason/PreciousStones
/**
* @param block
*/
public TranslocationBlock(Field field, Block block) {
super(block.getX(), block.getY(), block.getZ(), block.getWorld().getName());
this.type = new BlockTypeEntry(block.getTypeId(), block.getData());
setRelativeCoords(field);
}
内容来源于网络,如有侵权,请联系作者删除!