Skip to content

Commit

Permalink
Fix indents
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinthegreat1 committed Sep 13, 2024
1 parent 6b2cce9 commit ce585ee
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 52 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,20 +72,20 @@ public static void save() {
public static Screen createGUI(Screen parent) {
return YetAnotherConfigLib.create(HANDLER, (defaults, config, builder) -> {
builder.title(Text.translatable("skyblocker.config.title"))
.category(GeneralCategory.create(defaults, config))
.category(UIAndVisualsCategory.create(defaults, config))
.category(HelperCategory.create(defaults, config))
.category(DungeonsCategory.create(defaults, config))
//.category(ForagingCategory.create(defaults, config))
.category(CrimsonIsleCategory.create(defaults, config))
.category(MiningCategory.create(defaults, config))
.category(FarmingCategory.create(defaults, config))
.category(OtherLocationsCategory.create(defaults, config))
.category(SlayersCategory.create(defaults, config))
.category(ChatCategory.create(defaults, config))
.category(QuickNavigationCategory.create(defaults, config))
.category(EventNotificationsCategory.create(defaults, config))
.category(MiscCategory.create(defaults, config));
.category(GeneralCategory.create(defaults, config))
.category(UIAndVisualsCategory.create(defaults, config))
.category(HelperCategory.create(defaults, config))
.category(DungeonsCategory.create(defaults, config))
//.category(ForagingCategory.create(defaults, config))
.category(CrimsonIsleCategory.create(defaults, config))
.category(MiningCategory.create(defaults, config))
.category(FarmingCategory.create(defaults, config))
.category(OtherLocationsCategory.create(defaults, config))
.category(SlayersCategory.create(defaults, config))
.category(ChatCategory.create(defaults, config))
.category(QuickNavigationCategory.create(defaults, config))
.category(EventNotificationsCategory.create(defaults, config))
.category(MiscCategory.create(defaults, config));
if (Debug.debugEnabled()) {
builder.category(DebugCategory.create(defaults, config));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,29 @@
public class DebugCategory {
public static ConfigCategory create(SkyblockerConfig defaults, SkyblockerConfig config) {
return ConfigCategory.createBuilder()
.name(Text.translatable("skyblocker.config.debug"))
.option(Option.<Integer>createBuilder()
.name(Text.translatable("skyblocker.config.debug.dumpRange"))
.description(OptionDescription.of(Text.translatable("skyblocker.config.debug.dumpRange.@Tooltip")))
.binding(defaults.debug.dumpRange,
() -> config.debug.dumpRange,
newValue -> config.debug.dumpRange = newValue)
.controller(option -> IntegerSliderControllerBuilder.create(option).range(1, 25).step(1))
.build())
.option(Option.<Boolean>createBuilder()
.name(Text.translatable("skyblocker.config.debug.showInvisibleArmorStands"))
.binding(defaults.debug.showInvisibleArmorStands,
() -> config.debug.showInvisibleArmorStands,
newValue -> config.debug.showInvisibleArmorStands = newValue)
.controller(ConfigUtils::createBooleanController)
.build())
.option(Option.<Boolean>createBuilder()
.name(Text.translatable("skyblocker.config.debug.debugWebSockets"))
.binding(defaults.debug.webSocketDebug,
() -> config.debug.webSocketDebug,
newValue -> config.debug.webSocketDebug = newValue)
.controller(ConfigUtils::createBooleanController)
.build())
.build();
.name(Text.translatable("skyblocker.config.debug"))
.option(Option.<Integer>createBuilder()
.name(Text.translatable("skyblocker.config.debug.dumpRange"))
.description(OptionDescription.of(Text.translatable("skyblocker.config.debug.dumpRange.@Tooltip")))
.binding(defaults.debug.dumpRange,
() -> config.debug.dumpRange,
newValue -> config.debug.dumpRange = newValue)
.controller(option -> IntegerSliderControllerBuilder.create(option).range(1, 25).step(1))
.build())
.option(Option.<Boolean>createBuilder()
.name(Text.translatable("skyblocker.config.debug.showInvisibleArmorStands"))
.binding(defaults.debug.showInvisibleArmorStands,
() -> config.debug.showInvisibleArmorStands,
newValue -> config.debug.showInvisibleArmorStands = newValue)
.controller(ConfigUtils::createBooleanController)
.build())
.option(Option.<Boolean>createBuilder()
.name(Text.translatable("skyblocker.config.debug.debugWebSockets"))
.binding(defaults.debug.webSocketDebug,
() -> config.debug.webSocketDebug,
newValue -> config.debug.webSocketDebug = newValue)
.controller(ConfigUtils::createBooleanController)
.build())
.build();
}
}
28 changes: 14 additions & 14 deletions src/main/java/de/hysky/skyblocker/debug/Debug.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,23 +55,23 @@ public static void init() {
KeyBinding dumpNearbyEntitiesKey = KeyBindingHelper.registerKeyBinding(new KeyBinding("key.skyblocker.debug.dumpNearbyEntities", GLFW.GLFW_KEY_I, "key.categories.skyblocker"));
KeyBinding dumpHoveredItemKey = KeyBindingHelper.registerKeyBinding(new KeyBinding("key.skyblocker.debug.dumpHoveredItem", GLFW.GLFW_KEY_U, "key.categories.skyblocker"));
ClientCommandRegistrationCallback.EVENT.register((dispatcher, registryAccess) -> dispatcher.register(
literal(SkyblockerMod.NAMESPACE)
.then(literal("debug")
.then(dumpPlayersCommand())
.then(ItemUtils.dumpHeldItemCommand())
.then(ItemUtils.dumpHeldItemNetworthCalculationsCommand())
.then(toggleShowingInvisibleArmorStands())
.then(dumpArmorStandHeadTextures())
.then(toggleWebSocketDebug())
)));
literal(SkyblockerMod.NAMESPACE).then(literal("debug")
.then(dumpPlayersCommand())
.then(ItemUtils.dumpHeldItemCommand())
.then(ItemUtils.dumpHeldItemNetworthCalculationsCommand())
.then(toggleShowingInvisibleArmorStands())
.then(dumpArmorStandHeadTextures())
.then(toggleWebSocketDebug())
)
));
ClientTickEvents.END_CLIENT_TICK.register(client -> {
if (client.player == null || client.world == null) return;
if (dumpNearbyEntitiesKey.wasPressed() && !keyDown) {
client.world.getOtherEntities(client.player, client.player.getBoundingBox().expand(SkyblockerConfigManager.get().debug.dumpRange))
.stream()
.map(entity -> entity.writeNbt(new NbtCompound()))
.map(NbtHelper::toPrettyPrintedText)
.forEach(client.player::sendMessage);
.stream()
.map(entity -> entity.writeNbt(new NbtCompound()))
.map(NbtHelper::toPrettyPrintedText)
.forEach(client.player::sendMessage);
keyDown = true;
} else if (!dumpNearbyEntitiesKey.wasPressed() && keyDown) {
keyDown = false;
Expand Down Expand Up @@ -136,4 +136,4 @@ private static LiteralArgumentBuilder<FabricClientCommandSource> dumpArmorStandH
return Command.SINGLE_SUCCESS;
});
}
}
}

0 comments on commit ce585ee

Please sign in to comment.