DestroyBlockProgress .java

net.minecraft.client.renderer.DestroyBlockProgress (class): members: getCreationCloudUpdateTick, createdAtCloudUpdateTick, getPartialBlockDamage, position.

net.minecraft.client.rendererclass70 linesclient1.7 KB

API Surface (5)

BlockPos getPosition()
void setPartialBlockDamage(int damage)
int getPartialBlockDamage()
void setCloudUpdateTick(int createdAtCloudUpdateTickIn)
int getCreationCloudUpdateTick()

Fields & Constants (4)

miningPlayerEntId
position
partialBlockProgress
createdAtCloudUpdateTick

Code Graph: Dependencies (1)

Edges (calls / imports / inherits / references) resolved by graphify from the AST. Every chip opens the class source.

Full Source

DestroyBlockProgress.java70 lines · MCP 1.8.9 · verbatimOriginal ↗
1
package net.minecraft.client.renderer;
2
3
import net.minecraft.util.BlockPos;
4
5
public class DestroyBlockProgress
6
{
7
    /**
8
     * entity ID of the player associated with this partially destroyed Block. Used to identify the Blocks in the client
9
     * Renderer, max 1 per player on a server
10
     */
11
    private final int miningPlayerEntId;
12
    private final BlockPos position;
13
14
    /**
15
     * damage ranges from 1 to 10. -1 causes the client to delete the partial block renderer.
16
     */
17
    private int partialBlockProgress;
18
19
    /**
20
     * keeps track of how many ticks this PartiallyDestroyedBlock already exists
21
     */
22
    private int createdAtCloudUpdateTick;
23
24
    public DestroyBlockProgress(int miningPlayerEntIdIn, BlockPos positionIn)
25
    {
26
        this.miningPlayerEntId = miningPlayerEntIdIn;
27
        this.position = positionIn;
28
    }
29
30
    public BlockPos getPosition()
31
    {
32
        return this.position;
33
    }
34
35
    /**
36
     * inserts damage value into this partially destroyed Block. -1 causes client renderer to delete it, otherwise
37
     * ranges from 1 to 10
38
     */
39
    public void setPartialBlockDamage(int damage)
40
    {
41
        if (damage > 10)
42
        {
43
            damage = 10;
44
        }
45
46
        this.partialBlockProgress = damage;
47
    }
48
49
    public int getPartialBlockDamage()
50
    {
51
        return this.partialBlockProgress;
52
    }
53
54
    /**
55
     * saves the current Cloud update tick into the PartiallyDestroyedBlock
56
     */
57
    public void setCloudUpdateTick(int createdAtCloudUpdateTickIn)
58
    {
59
        this.createdAtCloudUpdateTick = createdAtCloudUpdateTickIn;
60
    }
61
62
    /**
63
     * retrieves the 'date' at which the PartiallyDestroyedBlock was created
64
     */
65
    public int getCreationCloudUpdateTick()
66
    {
67
        return this.createdAtCloudUpdateTick;
68
    }
69
}
70

Deobfuscated MCP 1.8.9 source of DestroyBlockProgress from Marcelektro/MavenMCP-1.8.9 (net/minecraft/client/renderer/DestroyBlockProgress.java), stored verbatim.