ClientboundSetTitlesAnimationPacket .java

net.minecraft.network.protocol.game.ClientboundSetTitlesAnimationPacket (class): members: getFadeOut, getFadeIn, getStay, stay, fadeOut, fadeIn, handle.

net.minecraft.network.protocol.gameclass55 linescommon1.5 KB

Implements

API Surface (5)

PacketType<ClientboundSetTitlesAnimationPacket> type()
void handle(final ClientGamePacketListener listener)
int getFadeIn()
int getStay()
int getFadeOut()

Fields & Constants (4)

STREAM_CODEC
fadeIn
stay
fadeOut

Same Package (197)

Code Graph: Dependencies (5)

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

Full Source

ClientboundSetTitlesAnimationPacket.java55 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.network.protocol.game;
2
3
import net.minecraft.network.FriendlyByteBuf;
4
import net.minecraft.network.codec.StreamCodec;
5
import net.minecraft.network.protocol.Packet;
6
import net.minecraft.network.protocol.PacketType;
7
8
public class ClientboundSetTitlesAnimationPacket implements Packet<ClientGamePacketListener> {
9
	public static final StreamCodec<FriendlyByteBuf, ClientboundSetTitlesAnimationPacket> STREAM_CODEC = Packet.codec(
10
		ClientboundSetTitlesAnimationPacket::write, ClientboundSetTitlesAnimationPacket::new
11
	);
12
	private final int fadeIn;
13
	private final int stay;
14
	private final int fadeOut;
15
16
	public ClientboundSetTitlesAnimationPacket(final int fadeIn, final int stay, final int fadeOut) {
17
		this.fadeIn = fadeIn;
18
		this.stay = stay;
19
		this.fadeOut = fadeOut;
20
	}
21
22
	private ClientboundSetTitlesAnimationPacket(final FriendlyByteBuf input) {
23
		this.fadeIn = input.readInt();
24
		this.stay = input.readInt();
25
		this.fadeOut = input.readInt();
26
	}
27
28
	private void write(final FriendlyByteBuf output) {
29
		output.writeInt(this.fadeIn);
30
		output.writeInt(this.stay);
31
		output.writeInt(this.fadeOut);
32
	}
33
34
	@Override
35
	public PacketType<ClientboundSetTitlesAnimationPacket> type() {
36
		return GamePacketTypes.CLIENTBOUND_SET_TITLES_ANIMATION;
37
	}
38
39
	public void handle(final ClientGamePacketListener listener) {
40
		listener.setTitlesAnimation(this);
41
	}
42
43
	public int getFadeIn() {
44
		return this.fadeIn;
45
	}
46
47
	public int getStay() {
48
		return this.stay;
49
	}
50
51
	public int getFadeOut() {
52
		return this.fadeOut;
53
	}
54
}
55

Decompiled Minecraft 26.3 source of ClientboundSetTitlesAnimationPacket (net/minecraft/network/protocol/game/ClientboundSetTitlesAnimationPacket.java) with Mojang official mappings, stored verbatim on the site.