Skip to content

Commit

Permalink
rename subprojects to a new theme & reorganize classes
Browse files Browse the repository at this point in the history
  • Loading branch information
Pixaurora committed Jul 18, 2024
1 parent afc9ff0 commit 078b7ac
Show file tree
Hide file tree
Showing 172 changed files with 651 additions and 630 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,13 @@ public ProjectMetadata(Project project) {

public String modId() {
String modId = String.valueOf(properties.requireString(Property.BASE_MOD_ID));

Optional<String> subModId = properties.optionalString(Property.SUB_MOD_ID);

if (subModId.isPresent()) {
modId = modId + "_" + subModId.get();
return "kitten" + "_" + subModId.get();
} else {
return modId;
}

return modId;
}

public String version() {
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"intermediate_mappings": "net.fabricmc:intermediary",
"depends": [
{
"id": "kit_tunes_core",
"id": "kitten_heart",
"versions": "=${version}"
}
]
Expand Down
10 changes: 5 additions & 5 deletions kit-tunes/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ plugins {
}

dependencies {
include(project(":api"))
include(project(":heart"))
include(project(":kit-tunes-api"))
include(project(":kitten-heart"))

include(project(":sound_events:r1.20.4"))
include(project(":kitten-star:r1.20.4"))

include(project(":ui:r1.20.4"))
include(project(":ui:r1.21.0"))
include(project(":kitten-square:r1.20.4"))
include(project(":kitten-square:r1.21.0"))
}

tasks.withType<Jar> {
Expand Down
2 changes: 1 addition & 1 deletion kit-tunes/src/main/resources/quilt.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"intermediate_mappings": "net.fabricmc:intermediary",
"depends": [
{
"id": "kit_tunes_core",
"id": "kitten_heart",
"versions": "=${version}"
}
]
Expand Down
2 changes: 1 addition & 1 deletion heart/build.gradle.kts → kitten-heart/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ plugins {
}

dependencies {
implementation(project(":api"))
implementation(project(":kit-tunes-api"))

implementation(libs.annotations)
implementation(libs.quilt.loader)
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package net.pixaurora.kit_tunes.impl.ui;
package net.pixaurora.kitten_cube.impl;

import java.util.HashMap;
import java.util.Map;

import net.pixaurora.kit_tunes.api.resource.ResourcePath;
import net.pixaurora.kit_tunes.impl.ui.text.Component;
import net.pixaurora.kitten_cube.impl.text.Component;

public abstract class ConversionCache<R, C> {
private final Map<ResourcePath, R> resourceConversions;
Expand All @@ -27,4 +27,4 @@ public R convert(ResourcePath path) {
public C convert(Component component) {
return componentConversions.computeIfAbsent(component, this::componentToMinecraftType);
}
}
}
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package net.pixaurora.kit_tunes.impl.ui;
package net.pixaurora.kitten_cube.impl;

import net.pixaurora.kit_tunes.impl.KitTunes;
import net.pixaurora.kit_tunes.impl.service.MinecraftUICompat;
import net.pixaurora.kit_tunes.impl.ui.math.Size;
import net.pixaurora.kit_tunes.impl.ui.screen.Screen;
import net.pixaurora.kit_tunes.impl.ui.sound.Sound;
import net.pixaurora.kit_tunes.impl.ui.text.Component;
import net.pixaurora.kitten_cube.impl.math.Size;
import net.pixaurora.kitten_cube.impl.text.Component;
import net.pixaurora.kitten_cube.impl.ui.screen.Screen;
import net.pixaurora.kitten_cube.impl.ui.sound.Sound;
import net.pixaurora.kitten_heart.impl.KitTunes;
import net.pixaurora.kitten_heart.impl.service.MinecraftUICompat;

public interface MinecraftClient {
static MinecraftUICompat impl() {
public final class MinecraftClient {
private static MinecraftUICompat impl() {
return KitTunes.UI_LAYER;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.pixaurora.kit_tunes.impl.ui.math;
package net.pixaurora.kitten_cube.impl.math;

public interface Point extends Vec2Int {
public static final Point ZERO = Point.of(0, 0);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.pixaurora.kit_tunes.impl.ui.math;
package net.pixaurora.kitten_cube.impl.math;

public class PointImpl implements Point {
private final int x;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.pixaurora.kit_tunes.impl.ui.math;
package net.pixaurora.kitten_cube.impl.math;

public interface Size extends Vec2Int {
public static Size of(int width, int height) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.pixaurora.kit_tunes.impl.ui.math;
package net.pixaurora.kitten_cube.impl.math;

public class SizeImpl implements Size {
private final int width;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.pixaurora.kit_tunes.impl.ui.math;
package net.pixaurora.kitten_cube.impl.math;

public interface Vec2Int {
public int x();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.pixaurora.kit_tunes.impl.ui.text;
package net.pixaurora.kitten_cube.impl.text;

/**
* The colors used for text in Minecraft since ancient time.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package net.pixaurora.kit_tunes.impl.ui.text;
package net.pixaurora.kitten_cube.impl.text;

import net.pixaurora.kit_tunes.impl.KitTunes;
import net.pixaurora.kitten_heart.impl.KitTunes;

public interface Component {
public static Component literal(String text) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package net.pixaurora.kit_tunes.impl.ui.text;
package net.pixaurora.kitten_cube.impl.text;

import java.util.List;

import net.pixaurora.kit_tunes.impl.ui.math.Point;
import net.pixaurora.kit_tunes.impl.ui.math.Size;
import net.pixaurora.kit_tunes.impl.ui.widget.text.TextBox;
import net.pixaurora.kitten_cube.impl.math.Point;
import net.pixaurora.kitten_cube.impl.math.Size;
import net.pixaurora.kitten_cube.impl.ui.widget.text.TextBox;

public interface TextProcessor {
public int textHeight();
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package net.pixaurora.kitten_cube.impl.ui;

import net.pixaurora.kitten_cube.impl.math.Point;
import net.pixaurora.kitten_cube.impl.ui.display.GuiDisplay;

public interface Drawable {
public void draw(GuiDisplay gui, Point mousePos);
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package net.pixaurora.kit_tunes.impl.ui.display;
package net.pixaurora.kitten_cube.impl.ui.display;

import net.pixaurora.kit_tunes.api.resource.ResourcePath;
import net.pixaurora.kit_tunes.impl.ui.math.Point;
import net.pixaurora.kit_tunes.impl.ui.math.Size;
import net.pixaurora.kit_tunes.impl.ui.screen.align.PointManager;
import net.pixaurora.kit_tunes.impl.ui.text.Color;
import net.pixaurora.kit_tunes.impl.ui.text.Component;
import net.pixaurora.kitten_cube.impl.math.Point;
import net.pixaurora.kitten_cube.impl.math.Size;
import net.pixaurora.kitten_cube.impl.text.Color;
import net.pixaurora.kitten_cube.impl.text.Component;
import net.pixaurora.kitten_cube.impl.ui.screen.align.PointManager;

public class AlignedGuiDisplay extends WrappedGuiDisplay {
private final PointManager pointAligner;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package net.pixaurora.kit_tunes.impl.ui.display;
package net.pixaurora.kitten_cube.impl.ui.display;

import net.pixaurora.kit_tunes.api.resource.ResourcePath;
import net.pixaurora.kit_tunes.impl.ui.math.Point;
import net.pixaurora.kit_tunes.impl.ui.math.Size;
import net.pixaurora.kit_tunes.impl.ui.text.Color;
import net.pixaurora.kit_tunes.impl.ui.text.Component;
import net.pixaurora.kit_tunes.impl.ui.texture.GuiTexture;
import net.pixaurora.kit_tunes.impl.ui.texture.Texture;
import net.pixaurora.kit_tunes.impl.ui.widget.text.TextBox;
import net.pixaurora.kitten_cube.impl.math.Point;
import net.pixaurora.kitten_cube.impl.math.Size;
import net.pixaurora.kitten_cube.impl.text.Color;
import net.pixaurora.kitten_cube.impl.text.Component;
import net.pixaurora.kitten_cube.impl.ui.texture.GuiTexture;
import net.pixaurora.kitten_cube.impl.ui.texture.Texture;
import net.pixaurora.kitten_cube.impl.ui.widget.text.TextBox;

public interface GuiDisplay {
public void drawTexture(ResourcePath path, Size size, Point pos);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package net.pixaurora.kit_tunes.impl.ui.display;
package net.pixaurora.kitten_cube.impl.ui.display;

import net.pixaurora.kit_tunes.api.resource.ResourcePath;
import net.pixaurora.kit_tunes.impl.ui.math.Point;
import net.pixaurora.kit_tunes.impl.ui.math.Size;
import net.pixaurora.kit_tunes.impl.ui.text.Color;
import net.pixaurora.kit_tunes.impl.ui.text.Component;
import net.pixaurora.kit_tunes.impl.ui.widget.text.TextBox;
import net.pixaurora.kitten_cube.impl.math.Point;
import net.pixaurora.kitten_cube.impl.math.Size;
import net.pixaurora.kitten_cube.impl.text.Color;
import net.pixaurora.kitten_cube.impl.text.Component;
import net.pixaurora.kitten_cube.impl.ui.widget.text.TextBox;

public class WrappedGuiDisplay implements GuiDisplay {
private final GuiDisplay parent;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package net.pixaurora.kit_tunes.impl.ui.screen;
package net.pixaurora.kitten_cube.impl.ui.screen;

import net.pixaurora.kit_tunes.impl.ui.MinecraftClient;
import net.pixaurora.kitten_cube.impl.MinecraftClient;

public abstract class ReturnToPreviousScreen extends ScreenTemplate {
private final Screen previous;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package net.pixaurora.kit_tunes.impl.ui.screen;
package net.pixaurora.kitten_cube.impl.ui.screen;

import net.pixaurora.kit_tunes.impl.ui.Drawable;
import net.pixaurora.kit_tunes.impl.ui.math.Point;
import net.pixaurora.kit_tunes.impl.ui.math.Size;
import net.pixaurora.kitten_cube.impl.math.Point;
import net.pixaurora.kitten_cube.impl.math.Size;
import net.pixaurora.kitten_cube.impl.ui.Drawable;

public interface Screen extends Drawable {
public void init(Size window);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
package net.pixaurora.kit_tunes.impl.ui.screen;
package net.pixaurora.kitten_cube.impl.ui.screen;

import java.util.ArrayList;
import java.util.List;
import java.util.Optional;

import net.pixaurora.kit_tunes.impl.ui.display.AlignedGuiDisplay;
import net.pixaurora.kit_tunes.impl.ui.display.GuiDisplay;
import net.pixaurora.kit_tunes.impl.ui.math.Point;
import net.pixaurora.kit_tunes.impl.ui.math.Size;
import net.pixaurora.kit_tunes.impl.ui.screen.align.AlignmentStrategy;
import net.pixaurora.kit_tunes.impl.ui.screen.align.PointManager;
import net.pixaurora.kit_tunes.impl.ui.widget.Widget;
import net.pixaurora.kitten_cube.impl.math.Point;
import net.pixaurora.kitten_cube.impl.math.Size;
import net.pixaurora.kitten_cube.impl.ui.display.AlignedGuiDisplay;
import net.pixaurora.kitten_cube.impl.ui.display.GuiDisplay;
import net.pixaurora.kitten_cube.impl.ui.screen.align.AlignmentStrategy;
import net.pixaurora.kitten_cube.impl.ui.screen.align.PointManager;
import net.pixaurora.kitten_cube.impl.ui.widget.Widget;

public abstract class ScreenTemplate implements Screen {
private boolean initializedWidgets = false;
Expand Down
Loading

0 comments on commit 078b7ac

Please sign in to comment.