Skip to content

Commit

Permalink
📦 Object inspection on 1.20.1 & some fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
XyperCode committed Nov 27, 2023
1 parent 7653daf commit 64c6eed
Show file tree
Hide file tree
Showing 22 changed files with 942 additions and 145 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/javadoc-releases.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Deploy Javadoc

on:
release:
types:
- published

jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: 🚀 Deploy JavaDoc Release
uses: MathieuSoysal/Javadoc-publisher.yml@v2.4.0
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
javadoc-branch: javadoc
java-version: 17
target-folder: docs/${{ github.event.release.tag_name }}
project: gradle
20 changes: 20 additions & 0 deletions .github/workflows/javadoc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Deploy Javadoc

on:
push:
branches:
- main
- dev

jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: 🚀 Deploy JavaDoc
uses: MathieuSoysal/Javadoc-publisher.yml@v2.4.0
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
javadoc-branch: javadoc
java-version: 17
target-folder: docs/latest
project: gradle
4 changes: 3 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//file:noinspection GroovyAccessibility
plugins {
id "architectury-plugin" version "3.4-SNAPSHOT"
id "dev.architectury.loom" version "0.12.0-SNAPSHOT" apply false
id "dev.architectury.loom" version "1.3-SNAPSHOT" apply false
}
repositories {
gradlePluginPortal()
Expand Down Expand Up @@ -33,6 +33,8 @@ subprojects {
officialMojangMappings()
parchment("org.parchmentmc.data:parchment-1.19.2:2022.08.10@zip")
}

compileOnly 'com.google.errorprone:error_prone_annotations:2.16'
}
}

Expand Down
14 changes: 14 additions & 0 deletions common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,19 @@ dependencies {

modApi "com.github.Ultreon.ultreonlib:ultreon-lib:$ultreonlib_version"

api "com.github.Ultreon:ultreon-data:$ultreon_data_version"

api "com.github.Ultreon.corelibs:corelibs-collections-v0:$corelibs_version"
api "com.github.Ultreon.corelibs:corelibs-commons-v0:$corelibs_version"
api "com.github.Ultreon.corelibs:corelibs-crash-v0:$corelibs_version"
api "com.github.Ultreon.corelibs:corelibs-datetime-v0:$corelibs_version"
api "com.github.Ultreon.corelibs:corelibs-events-v1:$corelibs_version"
api "com.github.Ultreon.corelibs:corelibs-functions-v0:$corelibs_version"
api "com.github.Ultreon.corelibs:corelibs-registries-v0:$corelibs_version"
api "com.github.Ultreon.corelibs:corelibs-resources-v0:$corelibs_version"
api "com.github.Ultreon.corelibs:corelibs-text-v0:$corelibs_version"
api "com.github.Ultreon.corelibs:corelibs-translations-v0:$corelibs_version"

modImplementation "fuzs.forgeconfigapiport:forgeconfigapiport-fabric:$forge_config_api_port_version"
modCompileOnly 'com.electronwill.night-config:core:3.6.3'
modCompileOnly 'com.electronwill.night-config:toml:3.6.3'
Expand Down Expand Up @@ -54,5 +67,6 @@ publishing {
// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
repositories {
// Add repositories to publish to here.
mavenLocal()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
import com.ultreon.mods.advanceddebug.client.registry.FormatterRegistry;
import com.ultreon.mods.advanceddebug.extension.ExtensionLoader;
import com.ultreon.mods.advanceddebug.init.ModDebugPages;
import com.ultreon.mods.advanceddebug.init.ModInspectionInit;
import com.ultreon.mods.advanceddebug.init.ModOverlays;
import com.ultreon.mods.advanceddebug.inspect.InspectionRoot;
import com.ultreon.mods.advanceddebug.util.TargetUtils;
import dev.architectury.event.events.client.ClientLifecycleEvent;
import dev.architectury.event.events.client.ClientTickEvent;
Expand All @@ -34,6 +36,8 @@ public class AdvancedDebug implements IAdvancedDebug {

private static final ExtensionLoader loader = ExtensionLoader.get();

public final InspectionRoot<Minecraft> inspections = new InspectionRoot<>(Minecraft.getInstance());

public static AdvancedDebug getInstance() {
return instance;
}
Expand All @@ -50,6 +54,8 @@ private static void tick(Minecraft minecraft) {
public void init() {
ModOverlays.registerAll();

ModInspectionInit.registerAutoFillers();

ClientLifecycleEvent.CLIENT_STARTED.register(this::setup);

ClientTickEvent.CLIENT_POST.register(AdvancedDebug::tick);
Expand Down Expand Up @@ -129,5 +135,12 @@ private void setup(final Minecraft client) {
LOGGER.debug("Client side setup done!");

ModDebugPages.init();

this.inspections.createNode("player", value -> value.player);
this.inspections.createNode("level", value -> value.level);
this.inspections.createNode("screen", value -> value.screen);
this.inspections.createNode("window", Minecraft::getWindow);
this.inspections.createNode("singleplayerServer", Minecraft::getSingleplayerServer);
this.inspections.createNode("currentServer", Minecraft::getCurrentServer);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
import com.ultreon.libs.commons.v0.Identifier;
import com.ultreon.mods.advanceddebug.api.client.formatter.IFormatterContext;
import com.ultreon.mods.advanceddebug.api.common.IFormatter;

import javax.annotation.Nullable;
import org.jetbrains.annotations.Nullable;

public interface IDebugGui extends IFormatter<Object> {
<T extends DebugPage> T registerPage(Identifier id, T page);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
package com.ultreon.mods.advanceddebug.api.client.registry;

import com.ultreon.mods.advanceddebug.api.client.menu.Formatter;

import javax.annotation.Nullable;
import org.jetbrains.annotations.Nullable;

public interface IFormatterRegistry {
<T> Formatter<T> register(Formatter<T> formatter);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ default void initFormatters(IFormatterRegistry formatterRegistry) {

}

void handleImGuiMenuBar();
default void handleImGuiMenuBar() {

}

default void handleEntity(Entity entity) {

Expand Down
Loading

0 comments on commit 64c6eed

Please sign in to comment.