71 lines
1.3 KiB
Java
71 lines
1.3 KiB
Java
/*
|
|
* Decompiled with CFR 0.152.
|
|
*/
|
|
package net.minecraft.client.gui.layouts;
|
|
|
|
import java.util.function.Consumer;
|
|
import net.minecraft.client.gui.components.AbstractWidget;
|
|
import net.minecraft.client.gui.layouts.LayoutElement;
|
|
|
|
public class SpacerElement
|
|
implements LayoutElement {
|
|
private int x;
|
|
private int y;
|
|
private final int width;
|
|
private final int height;
|
|
|
|
public SpacerElement(int width, int height) {
|
|
this(0, 0, width, height);
|
|
}
|
|
|
|
public SpacerElement(int x, int y, int width, int height) {
|
|
this.x = x;
|
|
this.y = y;
|
|
this.width = width;
|
|
this.height = height;
|
|
}
|
|
|
|
public static SpacerElement width(int width) {
|
|
return new SpacerElement(width, 0);
|
|
}
|
|
|
|
public static SpacerElement height(int height) {
|
|
return new SpacerElement(0, height);
|
|
}
|
|
|
|
@Override
|
|
public void setX(int x) {
|
|
this.x = x;
|
|
}
|
|
|
|
@Override
|
|
public void setY(int y) {
|
|
this.y = y;
|
|
}
|
|
|
|
@Override
|
|
public int getX() {
|
|
return this.x;
|
|
}
|
|
|
|
@Override
|
|
public int getY() {
|
|
return this.y;
|
|
}
|
|
|
|
@Override
|
|
public int getWidth() {
|
|
return this.width;
|
|
}
|
|
|
|
@Override
|
|
public int getHeight() {
|
|
return this.height;
|
|
}
|
|
|
|
@Override
|
|
public void visitWidgets(Consumer<AbstractWidget> widgetVisitor) {
|
|
}
|
|
}
|
|
|