Skip to content

Commit

Permalink
#22 修改连锁组为完全白名单制,不再选取挖掘的第一个方块为连锁目标,仅使用白名单内的目标
Browse files Browse the repository at this point in the history
  • Loading branch information
QuanhuZeYu committed Jan 5, 2025
1 parent b1f04a4 commit 9fbe732
Showing 1 changed file with 0 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,6 @@ public boolean filter(Block block, Vector3i pos) {
if (block.isAir(world, pos.x, pos.y, pos.z) || block.getMaterial().isLiquid()) return false;
int blockMeta = world.getBlockMetadata(pos.x, pos.y, pos.z);
ItemStack blockItem = new ItemStack(block, 1, blockMeta);
int blockItemMeta = blockItem.getItemDamage();
// 完全一致返回true
if (sampleBlock.equals(block)) {
try {
if (blockItemMeta == sampleBlockItemMeta) {
return true;
}
} catch (Exception e) {
MY_LOG.LOG.error("异常: {}", e.toString());
}
}
for (ItemStack itemStack : sameList) {
// MY_LOG.LOG.info("对比项: {} - {}, {} - {}", itemStack.getUnlocalizedName(), itemStack.getItemDamage(), blockItem.getUnlocalizedName(), blockItem.getItemDamage());
if (itemStack.isItemEqual(blockItem)) {
Expand Down

0 comments on commit 9fbe732

Please sign in to comment.