All Downloads are FREE. Search and download functionalities are using the official Maven repository.

personthecat.catlib.exception.GenericFormattedException Maven / Gradle / Ivy

Go to download

Utilities for serialization, commands, noise generation, IO, and some new data types.

The newest version!
package personthecat.catlib.exception;

import net.minecraft.class_2561;
import net.minecraft.class_2585;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

public class GenericFormattedException extends FormattedException {
    private final class_2561 tooltip;

    public GenericFormattedException(final Throwable cause) {
        super(cause);
        this.tooltip = null;
    }

    public GenericFormattedException(final Throwable cause, final String tooltip) {
        super(cause);
        this.tooltip = new class_2585(tooltip);
    }

    @Override
    public @NotNull class_2561 getDisplayMessage() {
        return new class_2585(createMsg(this.getCause()));
    }

    @Override
    public @Nullable class_2561 getTooltip() {
        return this.tooltip;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy