Skip to content

Commit

Permalink
Use spaces instead of tabs for project consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
Camotoy committed Mar 5, 2022
1 parent 835929d commit 0771504
Showing 1 changed file with 21 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@
@With
@AllArgsConstructor
public class ClientboundOpenScreenPacket implements Packet {
private final int containerId;
private final @NonNull ContainerType type;
private final @NonNull Component title;

public ClientboundOpenScreenPacket(NetInput in) throws IOException {
this.containerId = in.readVarInt();
this.type = MagicValues.key(ContainerType.class, in.readVarInt());
this.title = DefaultComponentSerializer.get().deserialize(in.readString());
}
private final int containerId;
private final @NonNull ContainerType type;
private final @NonNull Component title;

public ClientboundOpenScreenPacket(NetInput in) throws IOException {
this.containerId = in.readVarInt();
this.type = MagicValues.key(ContainerType.class, in.readVarInt());
this.title = DefaultComponentSerializer.get().deserialize(in.readString());
}

@Deprecated
public ClientboundOpenScreenPacket(int containerId, @NonNull ContainerType type, @NonNull String name) {
Expand All @@ -36,19 +36,19 @@ public ClientboundOpenScreenPacket(int containerId, @NonNull ContainerType type,
}

@Override
public void write(NetOutput out) throws IOException {
out.writeVarInt(this.containerId);
out.writeVarInt(MagicValues.value(Integer.class, this.type));
out.writeString(DefaultComponentSerializer.get().serialize(this.title));
}
public void write(NetOutput out) throws IOException {
out.writeVarInt(this.containerId);
out.writeVarInt(MagicValues.value(Integer.class, this.type));
out.writeString(DefaultComponentSerializer.get().serialize(this.title));
}

@Deprecated
public String getName() {
return DefaultComponentSerializer.get().serialize(title);
}
@Deprecated
public String getName() {
return DefaultComponentSerializer.get().serialize(title);
}

@Deprecated
public ClientboundOpenScreenPacket withName(String name) {
return new ClientboundOpenScreenPacket(this.containerId, this.type, DefaultComponentSerializer.get().deserialize(name));
}
public ClientboundOpenScreenPacket withName(String name) {
return new ClientboundOpenScreenPacket(this.containerId, this.type, DefaultComponentSerializer.get().deserialize(name));
}
}

0 comments on commit 0771504

Please sign in to comment.