Implements Comparable<BlockDestructionProgress>
API Surface (9) int getId()
BlockPos getPos()
void setProgress(int progress)
int getProgress()
void updateTick(final long tick)
long getUpdatedRenderTick()
boolean equals(final Object o)
int hashCode()
int compareTo(final BlockDestructionProgress o)
Fields & Constants (4) id
pos
progress
updatedRenderTick
Code Graph: Dependencies (1) Edges (calls / imports / inherits / references) resolved by graphify from the AST. Every chip opens the class source.
Full Source
BlockDestructionProgress.java 65 lines · Minecraft 26.3 · verbatim Copy
1 package net.minecraft.server.level;
2
3 import net.minecraft.core.BlockPos;
4
5 public class BlockDestructionProgress implements Comparable<BlockDestructionProgress> {
6 private final int id;
7 private final BlockPos pos;
8 private int progress;
9 private long updatedRenderTick;
10
11 public BlockDestructionProgress(final int id, final BlockPos pos) {
12 this.id = id;
13 this.pos = pos;
14 }
15
16 public int getId() {
17 return this.id;
18 }
19
20 public BlockPos getPos() {
21 return this.pos;
22 }
23
24 public void setProgress(int progress) {
25 if (progress > 10) {
26 progress = 10;
27 }
28
29 this.progress = progress;
30 }
31
32 public int getProgress() {
33 return this.progress;
34 }
35
36 public void updateTick(final long tick) {
37 this.updatedRenderTick = tick;
38 }
39
40 public long getUpdatedRenderTick() {
41 return this.updatedRenderTick;
42 }
43
44 @Override
45 public boolean equals(final Object o) {
46 if (this == o) {
47 return true;
48 } else if (o != null && this.getClass() == o.getClass()) {
49 BlockDestructionProgress that = (BlockDestructionProgress)o;
50 return this.id == that.id;
51 } else {
52 return false;
53 }
54 }
55
56 @Override
57 public int hashCode() {
58 return Integer.hashCode(this.id);
59 }
60
61 public int compareTo(final BlockDestructionProgress o) {
62 return this.progress != o.progress ? Integer.compare(this.progress, o.progress) : Integer.compare(this.id, o.id);
63 }
64 }
65
Decompiled Minecraft 26.3 source of BlockDestructionProgress (net/minecraft/server/level/BlockDestructionProgress.java) with Mojang official mappings, stored verbatim on the site.