Skip to content

Commit

Permalink
一批修改与完善
Browse files Browse the repository at this point in the history
  • Loading branch information
wode490390 committed Jul 28, 2023
1 parent 530399d commit 555121c
Show file tree
Hide file tree
Showing 79 changed files with 1,657 additions and 507 deletions.
13 changes: 13 additions & 0 deletions src/main/java/cn/nukkit/block/Block.java
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,14 @@ public int getFullId() {
return this.getId() << BLOCK_META_BITS;
}

public static int getIdFromFullId(int fullId) {
return fullId >> BLOCK_META_BITS;
}

public static int getDamageFromFullId(int fullId) {
return fullId & BLOCK_META_MASK;
}

public void addVelocityToEntity(Entity entity, Vector3 vector) {

}
Expand Down Expand Up @@ -567,6 +575,8 @@ private static double toolBreakTimeBonus0(int toolType, int toolTier, int blockI
return 6.0;
case ItemTool.TIER_DIAMOND:
return 8.0;
case ItemTool.TIER_NETHERITE:
return 9;
case ItemTool.TIER_GOLD:
return 12.0;
default:
Expand Down Expand Up @@ -675,6 +685,9 @@ public double getBreakTime(Item item) {
case ItemTool.TIER_DIAMOND:
base /= 8;
break;
case ItemTool.TIER_NETHERITE:
base /= 9;
break;
case ItemTool.TIER_GOLD:
base /= 12;
break;
Expand Down
Loading

0 comments on commit 555121c

Please sign in to comment.