aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/api/util/shutdown/ShutDownReason.java
blob: 0815936a55e9641f6191ae011c17605959352e82 (plain)
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
package gregtech.api.util.shutdown;

import javax.annotation.Nonnull;

import net.minecraft.network.PacketBuffer;

public interface ShutDownReason {

    /**
     * @return Unique registry ID
     */
    @Nonnull
    String getID();

    /**
     * @return Actual text to show on client GUI
     */
    @Nonnull
    String getDisplayString();

    /**
     * Create new instance to receive packet.
     */
    @Nonnull
    ShutDownReason newInstance();

    /**
     * Encode value to sync.
     */
    void encode(@Nonnull PacketBuffer buffer);

    /**
     * Decode synced value.
     */
    void decode(PacketBuffer buffer);

    /**
     * @return Whether the reason is critical.
     */
    boolean wasCritical();
}