Cleanup GUI packages
This commit is contained in:
parent
8ad2147c42
commit
80ee96051c
90 changed files with 166 additions and 215 deletions
|
@ -22,7 +22,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
package reborncore.client.gui.builder;
|
||||
package reborncore.client.gui;
|
||||
|
||||
import net.minecraft.block.entity.BlockEntity;
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
|
@ -41,9 +41,8 @@ import net.minecraft.text.Text;
|
|||
import org.jetbrains.annotations.Nullable;
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
import reborncore.api.blockentity.IUpgradeable;
|
||||
import reborncore.client.gui.builder.slot.GuiTab;
|
||||
import reborncore.client.gui.builder.widget.GuiButtonHologram;
|
||||
import reborncore.client.gui.guibuilder.GuiBuilder;
|
||||
import reborncore.client.gui.config.GuiTab;
|
||||
import reborncore.client.gui.widget.GuiButtonHologram;
|
||||
import reborncore.common.blockentity.MachineBaseBlockEntity;
|
||||
import reborncore.common.screen.BuiltScreenHandler;
|
||||
import reborncore.common.screen.slot.PlayerInventorySlot;
|
||||
|
@ -224,7 +223,7 @@ public class GuiBase<T extends ScreenHandler> extends HandledScreen<T> {
|
|||
drawText(drawContext, text, (backgroundWidth / 2 - getTextRenderer().getWidth(text) / 2), y, colour, layer);
|
||||
}
|
||||
|
||||
protected void drawCentredText(DrawContext drawContext, Text text, int y, int colour, int modifier, Layer layer) {
|
||||
public void drawCentredText(DrawContext drawContext, Text text, int y, int colour, int modifier, Layer layer) {
|
||||
drawText(drawContext, text, (backgroundWidth / 2 - (getTextRenderer().getWidth(text)) / 2) + modifier, y, colour, layer);
|
||||
}
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
package reborncore.client.gui.guibuilder;
|
||||
package reborncore.client.gui;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import net.fabricmc.fabric.api.transfer.v1.client.fluid.FluidVariantRendering;
|
||||
|
@ -38,8 +38,7 @@ import net.minecraft.text.Text;
|
|||
import net.minecraft.util.Formatting;
|
||||
import net.minecraft.util.Identifier;
|
||||
import reborncore.api.IListInfoProvider;
|
||||
import reborncore.client.gui.builder.GuiBase;
|
||||
import reborncore.client.gui.builder.slot.GuiTab;
|
||||
import reborncore.client.gui.config.GuiTab;
|
||||
import reborncore.common.fluid.FluidUtils;
|
||||
import reborncore.common.fluid.FluidValue;
|
||||
import reborncore.common.fluid.container.FluidInstance;
|
|
@ -1,47 +0,0 @@
|
|||
/*
|
||||
* This file is part of RebornCore, licensed under the MIT License (MIT).
|
||||
*
|
||||
* Copyright (c) 2021 TeamReborn
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
package reborncore.client.gui.builder.widget;
|
||||
|
||||
import net.minecraft.client.gui.widget.ButtonWidget;
|
||||
import net.minecraft.text.Text;
|
||||
|
||||
public class GuiButtonSimple extends ButtonWidget {
|
||||
|
||||
/**
|
||||
* @deprecated Please use {@link ButtonWidget}
|
||||
*/
|
||||
@Deprecated
|
||||
public GuiButtonSimple(int x, int y, Text buttonText, ButtonWidget.PressAction pressAction) {
|
||||
super(x, y, 20, 200, buttonText, pressAction, ButtonWidget.DEFAULT_NARRATION_SUPPLIER);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Please use {@link ButtonWidget}
|
||||
*/
|
||||
@Deprecated
|
||||
public GuiButtonSimple(int x, int y, int widthIn, int heightIn, Text buttonText, ButtonWidget.PressAction pressAction) {
|
||||
super(x, y, widthIn, heightIn, buttonText, pressAction, ButtonWidget.DEFAULT_NARRATION_SUPPLIER);
|
||||
}
|
||||
}
|
|
@ -22,15 +22,15 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
package reborncore.client.gui.builder.slot;
|
||||
package reborncore.client.gui.config;
|
||||
|
||||
import net.minecraft.client.gui.DrawContext;
|
||||
import net.minecraft.fluid.Fluids;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import reborncore.client.gui.builder.GuiBase;
|
||||
import reborncore.client.gui.builder.slot.elements.ConfigFluidElement;
|
||||
import reborncore.client.gui.builder.slot.elements.SlotType;
|
||||
import reborncore.client.gui.GuiBase;
|
||||
import reborncore.client.gui.config.elements.ConfigFluidElement;
|
||||
import reborncore.client.gui.config.elements.SlotType;
|
||||
|
||||
import java.util.Objects;
|
||||
|
|
@ -22,12 +22,11 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
package reborncore.client.gui.builder.slot;
|
||||
package reborncore.client.gui.config;
|
||||
|
||||
import net.minecraft.client.gui.DrawContext;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import reborncore.client.gui.builder.GuiBase;
|
||||
import reborncore.client.gui.builder.RedstoneConfigGui;
|
||||
import reborncore.client.gui.GuiBase;
|
||||
import reborncore.common.blockentity.MachineBaseBlockEntity;
|
||||
|
||||
import java.util.Collections;
|
|
@ -22,14 +22,15 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
package reborncore.client.gui.builder;
|
||||
package reborncore.client.gui.config;
|
||||
|
||||
import net.minecraft.client.gui.DrawContext;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.Items;
|
||||
import net.minecraft.text.Text;
|
||||
import reborncore.client.ClientNetworkManager;
|
||||
import reborncore.client.gui.builder.slot.GuiTab;
|
||||
import reborncore.client.gui.GuiBase;
|
||||
import reborncore.client.gui.config.GuiTab;
|
||||
import reborncore.common.blockentity.RedstoneConfiguration;
|
||||
import reborncore.common.network.IdentifiedPacket;
|
||||
import reborncore.common.network.ServerBoundPackets;
|
|
@ -22,7 +22,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
package reborncore.client.gui.builder.slot;
|
||||
package reborncore.client.gui.config;
|
||||
|
||||
import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
|
||||
import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
|
||||
|
@ -36,9 +36,9 @@ import org.jetbrains.annotations.Nullable;
|
|||
import org.lwjgl.glfw.GLFW;
|
||||
import reborncore.client.ClientChatUtils;
|
||||
import reborncore.client.ClientNetworkManager;
|
||||
import reborncore.client.gui.builder.GuiBase;
|
||||
import reborncore.client.gui.builder.slot.elements.ConfigSlotElement;
|
||||
import reborncore.client.gui.builder.slot.elements.SlotType;
|
||||
import reborncore.client.gui.GuiBase;
|
||||
import reborncore.client.gui.config.elements.ConfigSlotElement;
|
||||
import reborncore.client.gui.config.elements.SlotType;
|
||||
import reborncore.common.network.ServerBoundPackets;
|
||||
import reborncore.common.screen.BuiltScreenHandler;
|
||||
import reborncore.common.util.Color;
|
|
@ -22,7 +22,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
package reborncore.client.gui.builder.slot.elements;
|
||||
package reborncore.client.gui.config.elements;
|
||||
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
|
@ -38,7 +38,7 @@ import net.minecraft.client.util.math.MatrixStack;
|
|||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.util.math.RotationAxis;
|
||||
import org.joml.Quaternionf;
|
||||
import reborncore.client.gui.builder.GuiBase;
|
||||
import reborncore.client.gui.GuiBase;
|
||||
import reborncore.common.blockentity.MachineBaseBlockEntity;
|
||||
import reborncore.common.util.MachineFacing;
|
||||
|
|
@ -22,10 +22,10 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
package reborncore.client.gui.builder.slot.elements;
|
||||
package reborncore.client.gui.config.elements;
|
||||
|
||||
import net.minecraft.client.gui.DrawContext;
|
||||
import reborncore.client.gui.builder.GuiBase;
|
||||
import reborncore.client.gui.GuiBase;
|
||||
|
||||
public class ButtonElement extends ElementBase {
|
||||
private final GuiSprites.Button buttonSprite;
|
|
@ -22,12 +22,12 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
package reborncore.client.gui.builder.slot.elements;
|
||||
package reborncore.client.gui.config.elements;
|
||||
|
||||
import net.minecraft.client.gui.DrawContext;
|
||||
import net.minecraft.client.util.SpriteIdentifier;
|
||||
import net.minecraft.text.Text;
|
||||
import reborncore.client.gui.builder.GuiBase;
|
||||
import reborncore.client.gui.GuiBase;
|
||||
|
||||
import java.util.function.Predicate;
|
||||
|
|
@ -22,11 +22,11 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
package reborncore.client.gui.builder.slot.elements;
|
||||
package reborncore.client.gui.config.elements;
|
||||
|
||||
import net.minecraft.client.gui.DrawContext;
|
||||
import net.minecraft.text.Text;
|
||||
import reborncore.client.gui.builder.GuiBase;
|
||||
import reborncore.client.gui.GuiBase;
|
||||
|
||||
public class ConfigFluidElement extends ParentElement {
|
||||
private final SlotType type;
|
|
@ -22,13 +22,13 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
package reborncore.client.gui.builder.slot.elements;
|
||||
package reborncore.client.gui.config.elements;
|
||||
|
||||
import net.minecraft.client.gui.DrawContext;
|
||||
import net.minecraft.inventory.Inventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.text.Text;
|
||||
import reborncore.client.gui.builder.GuiBase;
|
||||
import reborncore.client.gui.GuiBase;
|
||||
import reborncore.common.blockentity.SlotConfiguration;
|
||||
import reborncore.common.screen.slot.BaseSlot;
|
||||
|
|
@ -22,15 +22,15 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
package reborncore.client.gui.builder.slot.elements;
|
||||
package reborncore.client.gui.config.elements;
|
||||
|
||||
import net.minecraft.client.gui.DrawContext;
|
||||
import net.minecraft.client.gui.screen.Screen;
|
||||
import net.minecraft.client.texture.Sprite;
|
||||
import net.minecraft.client.util.SpriteIdentifier;
|
||||
import net.minecraft.text.Text;
|
||||
import reborncore.client.gui.builder.GuiBase;
|
||||
import reborncore.client.gui.guibuilder.GuiBuilder;
|
||||
import reborncore.client.gui.GuiBase;
|
||||
import reborncore.client.gui.GuiBuilder;
|
||||
|
||||
public class ElementBase {
|
||||
private final int x;
|
|
@ -22,13 +22,13 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
package reborncore.client.gui.builder.slot.elements;
|
||||
package reborncore.client.gui.config.elements;
|
||||
|
||||
import net.minecraft.client.gui.DrawContext;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import reborncore.RebornCore;
|
||||
import reborncore.client.ClientNetworkManager;
|
||||
import reborncore.client.gui.builder.GuiBase;
|
||||
import reborncore.client.gui.GuiBase;
|
||||
import reborncore.common.blockentity.FluidConfiguration;
|
||||
import reborncore.common.network.IdentifiedPacket;
|
||||
import reborncore.common.network.ServerBoundPackets;
|
|
@ -22,7 +22,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
package reborncore.client.gui.builder.slot.elements;
|
||||
package reborncore.client.gui.config.elements;
|
||||
|
||||
import net.minecraft.client.texture.Sprite;
|
||||
import net.minecraft.client.texture.SpriteAtlasHolder;
|
|
@ -22,7 +22,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
package reborncore.client.gui.builder.slot.elements;
|
||||
package reborncore.client.gui.config.elements;
|
||||
|
||||
import net.minecraft.client.util.SpriteIdentifier;
|
||||
import net.minecraft.util.Identifier;
|
|
@ -22,12 +22,12 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
package reborncore.client.gui.builder.slot.elements;
|
||||
package reborncore.client.gui.config.elements;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import net.minecraft.client.gui.DrawContext;
|
||||
import net.minecraft.client.util.SpriteIdentifier;
|
||||
import reborncore.client.gui.builder.GuiBase;
|
||||
import reborncore.client.gui.GuiBase;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
|
@ -22,13 +22,13 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
package reborncore.client.gui.builder.slot.elements;
|
||||
package reborncore.client.gui.config.elements;
|
||||
|
||||
import net.minecraft.client.gui.DrawContext;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import reborncore.RebornCore;
|
||||
import reborncore.client.ClientNetworkManager;
|
||||
import reborncore.client.gui.builder.GuiBase;
|
||||
import reborncore.client.gui.GuiBase;
|
||||
import reborncore.common.blockentity.SlotConfiguration;
|
||||
import reborncore.common.network.IdentifiedPacket;
|
||||
import reborncore.common.network.ServerBoundPackets;
|
|
@ -22,7 +22,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
package reborncore.client.gui.builder.slot.elements;
|
||||
package reborncore.client.gui.config.elements;
|
||||
|
||||
import net.minecraft.client.util.SpriteIdentifier;
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
package reborncore.client.gui.builder.widget;
|
||||
package reborncore.client.gui.widget;
|
||||
|
||||
import net.minecraft.client.gui.widget.ButtonWidget;
|
||||
import net.minecraft.text.Text;
|
|
@ -22,7 +22,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
package reborncore.client.gui.builder.widget;
|
||||
package reborncore.client.gui.widget;
|
||||
|
||||
import net.minecraft.client.gui.DrawContext;
|
||||
import net.minecraft.client.gui.widget.ButtonWidget;
|
|
@ -22,12 +22,12 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
package reborncore.client.gui.builder.widget;
|
||||
package reborncore.client.gui.widget;
|
||||
|
||||
import net.minecraft.client.gui.DrawContext;
|
||||
import net.minecraft.client.gui.widget.ButtonWidget;
|
||||
import net.minecraft.text.Text;
|
||||
import reborncore.client.gui.builder.GuiBase;
|
||||
import reborncore.client.gui.GuiBase;
|
||||
|
||||
/**
|
||||
* @author drcrazy
|
|
@ -34,7 +34,7 @@ import org.spongepowered.asm.mixin.Shadow;
|
|||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
import reborncore.client.gui.builder.slot.elements.GuiSpriteAtlasHolder;
|
||||
import reborncore.client.gui.config.elements.GuiSpriteAtlasHolder;
|
||||
|
||||
@Mixin(MinecraftClient.class)
|
||||
public class MixinMinecraftClient {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue