File size: 1,322 Bytes
d46f4a3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
package net.minecraft.gametest.framework;

import javax.annotation.Nullable;
import net.minecraft.core.BlockPos;

public class GameTestAssertPosException extends GameTestAssertException {
    private final BlockPos absolutePos;
    private final BlockPos relativePos;
    private final long tick;

    public GameTestAssertPosException(String p_177051_, BlockPos p_177052_, BlockPos p_177053_, long p_177054_) {
        super(p_177051_);
        this.absolutePos = p_177052_;
        this.relativePos = p_177053_;
        this.tick = p_177054_;
    }

    @Override
    public String getMessage() {
        String s = this.absolutePos.getX()
            + ","
            + this.absolutePos.getY()
            + ","
            + this.absolutePos.getZ()
            + " (relative: "
            + this.relativePos.getX()
            + ","
            + this.relativePos.getY()
            + ","
            + this.relativePos.getZ()
            + ")";
        return super.getMessage() + " at " + s + " (t=" + this.tick + ")";
    }

    @Nullable
    public String getMessageToShowAtBlock() {
        return super.getMessage();
    }

    @Nullable
    public BlockPos getRelativePos() {
        return this.relativePos;
    }

    @Nullable
    public BlockPos getAbsolutePos() {
        return this.absolutePos;
    }
}