67 lines
		
	
	
	
		
			1.2 KiB
		
	
	
	
		
			Java
		
	
	
	
	
	
			
		
		
	
	
			67 lines
		
	
	
	
		
			1.2 KiB
		
	
	
	
		
			Java
		
	
	
	
	
	
| package net.minecraft.client.gui.layouts;
 | |
| 
 | |
| import java.util.function.Consumer;
 | |
| import net.fabricmc.api.EnvType;
 | |
| import net.fabricmc.api.Environment;
 | |
| import net.minecraft.client.gui.components.AbstractWidget;
 | |
| 
 | |
| @Environment(EnvType.CLIENT)
 | |
| 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> consumer) {
 | |
| 	}
 | |
| }
 |