Skip to content

Commit 555121c

Browse files
committed
一批修改与完善
1 parent 530399d commit 555121c

File tree

79 files changed

+1657
-507
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+1657
-507
lines changed

src/main/java/cn/nukkit/block/Block.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -506,6 +506,14 @@ public int getFullId() {
506506
return this.getId() << BLOCK_META_BITS;
507507
}
508508

509+
public static int getIdFromFullId(int fullId) {
510+
return fullId >> BLOCK_META_BITS;
511+
}
512+
513+
public static int getDamageFromFullId(int fullId) {
514+
return fullId & BLOCK_META_MASK;
515+
}
516+
509517
public void addVelocityToEntity(Entity entity, Vector3 vector) {
510518

511519
}
@@ -567,6 +575,8 @@ private static double toolBreakTimeBonus0(int toolType, int toolTier, int blockI
567575
return 6.0;
568576
case ItemTool.TIER_DIAMOND:
569577
return 8.0;
578+
case ItemTool.TIER_NETHERITE:
579+
return 9;
570580
case ItemTool.TIER_GOLD:
571581
return 12.0;
572582
default:
@@ -675,6 +685,9 @@ public double getBreakTime(Item item) {
675685
case ItemTool.TIER_DIAMOND:
676686
base /= 8;
677687
break;
688+
case ItemTool.TIER_NETHERITE:
689+
base /= 9;
690+
break;
678691
case ItemTool.TIER_GOLD:
679692
base /= 12;
680693
break;

0 commit comments

Comments
 (0)