Skip to content

Commit

Permalink
feat: Add config for Bundle Preview Row Width
Browse files Browse the repository at this point in the history
  • Loading branch information
sakura-ryoko committed Dec 22, 2024
1 parent 096318b commit b9b006f
Show file tree
Hide file tree
Showing 7 changed files with 1,230 additions and 1,223 deletions.
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ author = masa
mod_file_name = tweakeroo-fabric

# Current mod version
mod_version = 0.21.55-sakura.7
mod_version = 0.21.55

# Required malilib version
malilib_version = 645a31d7d8
malilib_version = 3f02eb2ef6

# Minecraft, Fabric Loader and API and mappings versions
minecraft_version_out = 1.21
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/fi/dy/masa/tweakeroo/config/Configs.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ public static class Generic
public static final ConfigOptionList BREAKING_RESTRICTION_MODE = new ConfigOptionList ("breakingRestrictionMode", PlacementRestrictionMode.LINE).apply(GENERIC_KEY);
public static final ConfigBoolean BUNDLE_DISPLAY_BACKGROUND_COLOR = new ConfigBoolean ("bundleDisplayBgColor", true).apply(GENERIC_KEY);
public static final ConfigBoolean BUNDLE_DISPLAY_REQUIRE_SHIFT = new ConfigBoolean ("bundleDisplayRequireShift", true).apply(GENERIC_KEY);
public static final ConfigInteger BUNDLE_DISPLAY_ROW_WIDTH = new ConfigInteger ("bundleDisplayRowWidth", 9, 6, 9).apply(GENERIC_KEY);
public static final ConfigColor CHAT_BACKGROUND_COLOR = new ConfigColor ("chatBackgroundColor", "#80000000").apply(GENERIC_KEY);
public static final ConfigString CHAT_TIME_FORMAT = new ConfigString ("chatTimeFormat", "[HH:mm:ss]").apply(GENERIC_KEY);
public static final ConfigBoolean CLIENT_PLACEMENT_ROTATION = new ConfigBoolean ("clientPlacementRotation", true).apply(GENERIC_KEY);
Expand Down Expand Up @@ -132,6 +133,7 @@ public static class Generic
ACCURATE_PLACEMENT_PROTOCOL,
BUNDLE_DISPLAY_BACKGROUND_COLOR,
BUNDLE_DISPLAY_REQUIRE_SHIFT,
BUNDLE_DISPLAY_ROW_WIDTH,
CLIENT_PLACEMENT_ROTATION,
DEBUG_LOGGING,
FAST_LEFT_CLICK_ALLOW_TOOLS,
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/fi/dy/masa/tweakeroo/event/RenderHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import net.minecraft.nbt.NbtCompound;
import net.minecraft.util.hit.BlockHitResult;
import net.minecraft.util.hit.HitResult;
import net.minecraft.util.profiler.Profiler;
import net.minecraft.world.World;

import fi.dy.masa.malilib.gui.GuiBase;
Expand Down Expand Up @@ -160,7 +159,7 @@ else if (stack.getComponents().contains(DataComponentTypes.BUNDLE_CONTENTS) && I
if (FeatureToggle.TWEAK_BUNDLE_DISPLAY.getBooleanValue() &&
(Configs.Generic.BUNDLE_DISPLAY_REQUIRE_SHIFT.getBooleanValue() == false || GuiBase.isShiftDown()))
{
fi.dy.masa.malilib.render.RenderUtils.renderBundlePreview(stack, x, y, Configs.Generic.BUNDLE_DISPLAY_BACKGROUND_COLOR.getBooleanValue(), drawContext);
fi.dy.masa.malilib.render.RenderUtils.renderBundlePreview(stack, x, y, Configs.Generic.BUNDLE_DISPLAY_ROW_WIDTH.getIntegerValue(), Configs.Generic.BUNDLE_DISPLAY_BACKGROUND_COLOR.getBooleanValue(), drawContext);
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions src/main/resources/assets/tweakeroo/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"tweakeroo.config.generic.name.breakingRestrictionMode": "breakingRestrictionMode",
"tweakeroo.config.generic.name.bundleDisplayBgColor": "bundleDisplayBgColor",
"tweakeroo.config.generic.name.bundleDisplayRequireShift": "bundleDisplayRequireShift",
"tweakeroo.config.generic.name.bundleDisplayRowWidth": "bundleDisplayRowWidth",
"tweakeroo.config.generic.name.chatBackgroundColor": "chatBackgroundColor",
"tweakeroo.config.generic.name.chatTimeFormat": "chatTimeFormat",
"tweakeroo.config.generic.name.clientPlacementRotation": "clientPlacementRotation",
Expand Down Expand Up @@ -100,6 +101,7 @@
"tweakeroo.config.generic.comment.breakingRestrictionMode": "The Breaking Restriction mode to use (hotkey-selectable)",
"tweakeroo.config.generic.comment.bundleDisplayBgColor": "Enables tinting/coloring the Bundle display\nbackground texture with the dye color of the bundle",
"tweakeroo.config.generic.comment.bundleDisplayRequireShift": "Whether or not holding shift is required for the Bundle preview\n§6NOTE: Disabling this causes the Vanilla Bundle tooltip to be fully disabled.",
"tweakeroo.config.generic.comment.bundleDisplayRowWidth": "Adjust the Row Width size of the Bundle Preview display,\nAnything smaller or larger will cause texture display problems.",
"tweakeroo.config.generic.comment.chatBackgroundColor": "The background color for the chat messages,\nif 'tweakChatBackgroundColor' is enabled",
"tweakeroo.config.generic.comment.chatTimeFormat": "The time format for chat messages, if tweakChatTimestamp is enabled\nUses the Java SimpleDateFormat format specifiers.",
"tweakeroo.config.generic.comment.clientPlacementRotation": "Enable single player and client side placement rotations,\nsuch as Accurate Placement working in single player without Carpet mod",
Expand Down
Loading

0 comments on commit b9b006f

Please sign in to comment.