Add some basic spotless formatting rules.
This commit is contained in:
parent
d2e4b92984
commit
4c037bd80b
127 changed files with 590 additions and 654 deletions
|
@ -31,13 +31,11 @@ import net.fabricmc.api.EnvType;
|
|||
import net.fabricmc.api.Environment;
|
||||
import net.minecraft.block.entity.BlockEntity;
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
import net.minecraft.client.gui.hud.ChatHud;
|
||||
import net.minecraft.client.gui.screen.Screen;
|
||||
import net.minecraft.client.gui.screen.ingame.HandledScreen;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NbtCompound;
|
||||
import net.minecraft.screen.ScreenHandler;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
|
|
@ -37,7 +37,6 @@ import net.minecraft.client.util.math.MatrixStack;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.registry.Registries;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.registry.Registry;
|
||||
import org.joml.Matrix4f;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@ public class RebornFluidRenderManager implements SimpleSynchronousResourceReload
|
|||
|
||||
private static void setupFluidRenderer(RebornFluid fluid) {
|
||||
// Done lazy as we want to ensure we get the sprite at the correct time,
|
||||
// but also don't want to be making these calls every time its required.
|
||||
// but also don't want to be making these calls every time its required.
|
||||
TemporaryLazy<Sprite[]> sprites = new TemporaryLazy<>(() -> {
|
||||
FluidSettings fluidSettings = fluid.getFluidSettings();
|
||||
return new Sprite[]{RenderUtil.getSprite(fluidSettings.getStillTexture()), RenderUtil.getSprite(fluidSettings.getFlowingTexture())};
|
||||
|
|
|
@ -30,7 +30,6 @@ import net.fabricmc.fabric.api.client.render.fluid.v1.FluidRenderHandlerRegistry
|
|||
import net.minecraft.client.MinecraftClient;
|
||||
import net.minecraft.client.render.*;
|
||||
import net.minecraft.client.texture.Sprite;
|
||||
import net.minecraft.client.texture.SpriteAtlasTexture;
|
||||
import net.minecraft.client.texture.TextureManager;
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.minecraft.fluid.Fluid;
|
||||
|
@ -77,7 +76,7 @@ public class RenderUtil {
|
|||
}
|
||||
|
||||
public static void renderGuiTank(FluidInstance fluid, FluidValue capacity, FluidValue amount, double x, double y, double zLevel,
|
||||
double width, double height) {
|
||||
double width, double height) {
|
||||
if (fluid == null || fluid.getFluid() == null || fluid.getAmount().lessThanOrEqual(FluidValue.EMPTY)) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -78,4 +78,4 @@ public class ConfigFluidElement extends ElementBase {
|
|||
public SlotType getType() {
|
||||
return type;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -131,4 +131,4 @@ public class ConfigSlotElement extends ElementBase {
|
|||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -171,14 +171,14 @@ public class FluidConfigPopupElement extends ElementBase {
|
|||
}
|
||||
|
||||
public void drawState(GuiBase<?> gui,
|
||||
World world,
|
||||
BakedModel model,
|
||||
BlockState actualState,
|
||||
BlockPos pos,
|
||||
BlockRenderManager dispatcher,
|
||||
int x,
|
||||
int y,
|
||||
Quaternionf quaternion) {
|
||||
World world,
|
||||
BakedModel model,
|
||||
BlockState actualState,
|
||||
BlockPos pos,
|
||||
BlockRenderManager dispatcher,
|
||||
int x,
|
||||
int y,
|
||||
Quaternionf quaternion) {
|
||||
|
||||
MatrixStack matrixStack = new MatrixStack();
|
||||
matrixStack.push();
|
||||
|
|
|
@ -177,14 +177,14 @@ public class SlotConfigPopupElement extends ElementBase {
|
|||
}
|
||||
|
||||
public void drawState(GuiBase<?> gui,
|
||||
World world,
|
||||
BakedModel model,
|
||||
BlockState actualState,
|
||||
BlockPos pos,
|
||||
BlockRenderManager dispatcher,
|
||||
int x,
|
||||
int y,
|
||||
Quaternionf quaternion) {
|
||||
World world,
|
||||
BakedModel model,
|
||||
BlockState actualState,
|
||||
BlockPos pos,
|
||||
BlockRenderManager dispatcher,
|
||||
int x,
|
||||
int y,
|
||||
Quaternionf quaternion) {
|
||||
|
||||
MatrixStack matrixStack = new MatrixStack();
|
||||
matrixStack.push();
|
||||
|
|
|
@ -59,4 +59,4 @@ public class SlotElement extends ElementBase {
|
|||
public int getSlotY() {
|
||||
return slotY;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -66,4 +66,4 @@ public enum SlotType {
|
|||
public Sprite getButtonHoverOverlay() {
|
||||
return buttonHoverOverlay;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -108,15 +108,15 @@ public class Sprite implements ISprite {
|
|||
}
|
||||
|
||||
public record Button(Sprite normal,
|
||||
Sprite hovered) {
|
||||
Sprite hovered) {
|
||||
}
|
||||
|
||||
public record ToggleButton(Sprite normal,
|
||||
Sprite hovered,
|
||||
Sprite pressed) {
|
||||
Sprite hovered,
|
||||
Sprite pressed) {
|
||||
}
|
||||
|
||||
public record CheckBox(Sprite normal,
|
||||
Sprite ticked) {
|
||||
Sprite ticked) {
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,11 +25,9 @@
|
|||
package reborncore.client.gui.builder.widget;
|
||||
|
||||
import net.minecraft.client.gui.widget.ButtonWidget;
|
||||
import net.minecraft.text.MutableText;
|
||||
import net.minecraft.text.Text;
|
||||
import reborncore.common.misc.TriConsumer;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
public class GuiButtonExtended extends ButtonWidget {
|
||||
|
||||
|
|
|
@ -570,7 +570,7 @@ public class GuiBuilder {
|
|||
* @param layer {@link GuiBase.Layer} The layer to draw on
|
||||
*/
|
||||
public void drawMultiEnergyBar(MatrixStack matrixStack, GuiBase<?> gui, int x, int y, long energyStored, long maxEnergyStored, int mouseX,
|
||||
int mouseY, int buttonID, GuiBase.Layer layer) {
|
||||
int mouseY, int buttonID, GuiBase.Layer layer) {
|
||||
if (gui.hideGuiElements()) return;
|
||||
if (layer == GuiBase.Layer.BACKGROUND) {
|
||||
x += gui.getGuiLeft();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue