RealmsUploadTooLargeException .java

com.mojang.realmsclient.client.worldupload.RealmsUploadTooLargeException (class): members: sizeLimit, getErrorMessages. imports: Unit, Component, EnvType.

com.mojang.realmsclient.client.worlduploadclass24 linesclientextends RealmsUploadException724 B

API Surface (1)

Component[] getErrorMessages()

Fields & Constants (1)

sizeLimit

String literals (2)

"mco.upload.failed.too_big.title"
"mco.upload.failed.too_big.description"

Code Graph: Dependencies (3)

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

Full Source

RealmsUploadTooLargeException.java24 lines · Minecraft 26.3 · verbatim
1
package com.mojang.realmsclient.client.worldupload;
2
3
import com.mojang.realmsclient.Unit;
4
import net.fabricmc.api.EnvType;
5
import net.fabricmc.api.Environment;
6
import net.minecraft.network.chat.Component;
7
8
@Environment(EnvType.CLIENT)
9
public class RealmsUploadTooLargeException extends RealmsUploadException {
10
	private final long sizeLimit;
11
12
	public RealmsUploadTooLargeException(final long sizeLimit) {
13
		this.sizeLimit = sizeLimit;
14
	}
15
16
	@Override
17
	public Component[] getErrorMessages() {
18
		return new Component[]{
19
			Component.translatable("mco.upload.failed.too_big.title"),
20
			Component.translatable("mco.upload.failed.too_big.description", Unit.humanReadable(this.sizeLimit, Unit.getLargest(this.sizeLimit)))
21
		};
22
	}
23
}
24

Decompiled Minecraft 26.3 source of RealmsUploadTooLargeException (com/mojang/realmsclient/client/worldupload/RealmsUploadTooLargeException.java) with Mojang official mappings, stored verbatim on the site.