Skip to content

Commit

Permalink
Fix debug related issues
Browse files Browse the repository at this point in the history
  • Loading branch information
acrylic-style committed Jun 10, 2022
1 parent d7d45b1 commit 933d383
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
1 change: 0 additions & 1 deletion .run/[Windows] Run Client (Debug).run.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
<envs>
<env name="LOG4J_CONFIGURATION_FILE" value="log4j2-debug.xml" />
</envs>
<option name="INCLUDE_PROVIDED_SCOPE" value="true" />
<option name="MAIN_CLASS_NAME" value="net.blueberrymc.client.main.ClientMain" />
<module name="Blueberry-Parent.blueberry.main" />
<option name="PROGRAM_PARAMETERS" value="--debug --version=debug --assetIndex=1.19 --versionType=debug --username=&quot;Dev&quot; --userType=mojang --uuid=&quot;dev&quot; --accessToken=abc --assetsDir=&quot;${APPDATA}\.minecraft\assets&quot; --mixin=mixins.blueberry.json" />
Expand Down
1 change: 0 additions & 1 deletion .run/[Windows] Run Client.run.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
<envs>
<env name="LOG4J_CONFIGURATION_FILE" value="log4j2.xml" />
</envs>
<option name="INCLUDE_PROVIDED_SCOPE" value="true" />
<option name="MAIN_CLASS_NAME" value="net.blueberrymc.client.main.ClientMain" />
<module name="Blueberry-Parent.blueberry.main" />
<option name="PROGRAM_PARAMETERS" value="--version=debug --assetIndex=1.19 --versionType=debug --username=&quot;Dev&quot; --uuid=&quot;abc&quot; --accessToken=&quot;abc&quot; --assetsDir=&quot;${APPDATA}\.minecraft\assets&quot; --mixin=mixins.blueberry.json" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,12 @@ public void renderToolTip(@NotNull PoseStack poseStack, int x, int y) {

private static FormattedText addDebugInfo(VisualConfig<?> config, MutableComponent tooltip) {
if (!InternalBlueberryModConfig.Debug.debugModConfigScreen) return tooltip;
MutableComponent copy = tooltip.copy().append("\n");
MutableComponent copy;
if (tooltip.getSiblings().size() == 0) {
copy = tooltip.copy();
} else {
copy = tooltip.copy().append("\n");
}
copy.append(Component.literal("[Config Type: " + Util.getExtendedSimpleName(config.getClass()) + "]").withStyle(ChatFormatting.GRAY)).append("\n");
String valueType;
Object value = config.get();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public static AnnotationVisitResult visitAnnotations(@NotNull ClassReader cr) {
@SuppressWarnings("DuplicatedCode") // not many options here :(
@Override
@NotNull
public MethodVisitor visitMethod(int access, @NotNull String name, @NotNull String descriptor, @NotNull String signature, @NotNull String @NotNull [] exceptions) {
public MethodVisitor visitMethod(int access, @NotNull String name, @NotNull String descriptor, @Nullable String signature, @NotNull String @Nullable [] exceptions) {
// Create new member
AnnotatedMember member = AnnotatedMember.createMutable(new Member(Type.METHOD, name, descriptor));

Expand All @@ -47,7 +47,7 @@ public void visitEnd() {
@SuppressWarnings("DuplicatedCode") // not many options here :(
@Override
@NotNull
public FieldVisitor visitField(int access, @NotNull String name, @NotNull String descriptor, @NotNull String signature, @Nullable Object value) {
public FieldVisitor visitField(int access, @NotNull String name, @NotNull String descriptor, @Nullable String signature, @Nullable Object value) {
// Create new member
AnnotatedMember member = AnnotatedMember.createMutable(new Member(Type.FIELD, name, descriptor));

Expand Down

0 comments on commit 933d383

Please sign in to comment.