Skip to content

Commit

Permalink
sync from 1.21.4-0.23.2-sakura.3
Browse files Browse the repository at this point in the history
  • Loading branch information
TexBlock committed Feb 2, 2025
1 parent 10fa4b8 commit b17739a
Show file tree
Hide file tree
Showing 57 changed files with 1,616 additions and 1,392 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
## Change
- sync from 1.21.4-0.23.0-sakura.5
- sync from 1.21.4-0.23.2-sakura.3
-
10 changes: 3 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,8 @@ repositories {
maven { url "https://www.jitpack.io" }
maven { url "https://maven.neoforged.net/releases/" }
maven { url 'https://api.modrinth.com/maven' }
maven {
url "https://maven2.bai.lol"
content {
includeGroup "lol.bai"
}
}
maven { url "https://maven.su5ed.dev/releases" }
maven { url "https://dl.cloudsmith.io/public/thinkingstudio/foxifiednetworking/maven/" }
}

dependencies {
Expand All @@ -29,7 +25,7 @@ dependencies {
neoForge libs.neoforge

modImplementation libs.mafglib
modImplementation libs.badpackets
modImplementation libs.foxifiednetworking

implementation libs.jsr305
}
Expand Down
14 changes: 7 additions & 7 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[versions]
# Base properties
minecraft_version="1.21.4"
yarn_mappings="1.21.4+build.1"
yarn_mappings="1.21.4+build.8"
mappings_patch="1.21+build.4"
neoforge="21.4.22-beta"
neoforge="21.4.78-beta"

# Mod properties
version="0.1.11"
version="0.2.1"
maven-group="org.thinkingstudio.tweakerge"
archives-name="Tweakerge"

Expand All @@ -15,14 +15,14 @@ id-modrinth="yke6wdGF"
id-curseforge="915857"

# Mod dependencies
mafglib="0.2.1-mc1.21.4"
badpackets="neo-0.8.1"
mafglib="0.2.6-mc1.21.4"
foxifiednetworking="0.1.0alpha3+mc1.21.4"

# Libraries
jsr305="3.0.2"

# Gradle plugin
architectury-loom = "1.7-SNAPSHOT"
architectury-loom = "1.9-SNAPSHOT"
modpublisher = "2.+"

[libraries]
Expand All @@ -31,7 +31,7 @@ yarn-mappings = { group = "net.fabricmc", name = "yarn", version.ref = "yarn_map
yarn-mappings-patch = { group = "dev.architectury", name = "yarn-mappings-patch-neoforge", version.ref = "mappings_patch"}

neoforge = { group = "net.neoforged", name = "neoforge", version.ref = "neoforge" }
badpackets = { group = "lol.bai", name = "badpackets", version.ref = "badpackets" }
foxifiednetworking = { group = "me.textrue.foxified", name = "FoxifiedNetworking", version.ref = "foxifiednetworking" }
mafglib = { group = "maven.modrinth", name = "mafglib", version.ref = "mafglib"}

jsr305 = { group = "com.google.code.findbugs", name = "jsr305", version.ref = "jsr305"}
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
32 changes: 19 additions & 13 deletions src/main/java/fi/dy/masa/tweakeroo/config/Callbacks.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,20 @@
import net.minecraft.util.hit.BlockHitResult;
import net.minecraft.util.hit.HitResult;
import net.minecraft.util.math.BlockPos;
import fi.dy.masa.malilib.config.IConfigBase;

import fi.dy.masa.malilib.config.IConfigBoolean;
import fi.dy.masa.malilib.config.IHotkeyTogglable;
import fi.dy.masa.malilib.config.options.ConfigBoolean;
import fi.dy.masa.malilib.gui.GuiBase;
import fi.dy.masa.malilib.hotkeys.IHotkeyCallback;
import fi.dy.masa.malilib.hotkeys.IKeybind;
import fi.dy.masa.malilib.hotkeys.KeyAction;
import fi.dy.masa.malilib.hotkeys.KeyCallbackAdjustable;
import fi.dy.masa.malilib.hotkeys.KeyCallbackToggleBooleanConfigWithMessage;
import fi.dy.masa.malilib.hotkeys.*;
import fi.dy.masa.malilib.interfaces.IValueChangeCallback;
import fi.dy.masa.malilib.render.InventoryOverlayScreen;
import fi.dy.masa.malilib.util.InfoUtils;
import fi.dy.masa.malilib.util.StringUtils;
import fi.dy.masa.tweakeroo.gui.GuiConfigs;
import fi.dy.masa.tweakeroo.mixin.IMixinAbstractBlock;
import fi.dy.masa.tweakeroo.mixin.block.IMixinAbstractBlock;
import fi.dy.masa.tweakeroo.mixin.IMixinSimpleOption;
import fi.dy.masa.tweakeroo.util.CameraEntity;
import fi.dy.masa.tweakeroo.util.InventoryUtils;
import fi.dy.masa.tweakeroo.util.MiscUtils;
import fi.dy.masa.tweakeroo.util.PlacementRestrictionMode;
import fi.dy.masa.tweakeroo.util.SnapAimMode;
import fi.dy.masa.tweakeroo.renderer.InventoryOverlayHandler;
import fi.dy.masa.tweakeroo.util.*;

public class Callbacks
{
Expand Down Expand Up @@ -82,6 +75,7 @@ public static void init(MinecraftClient mc)
Hotkeys.HOTBAR_SWAP_2.getKeybind().setCallback(callbackGeneric);
Hotkeys.HOTBAR_SWAP_3.getKeybind().setCallback(callbackGeneric);
Hotkeys.HOTBAR_SCROLL.getKeybind().setCallback(callbackGeneric);
Hotkeys.INVENTORY_PREVIEW_TOGGLE_SCREEN.getKeybind().setCallback(callbackGeneric);
Hotkeys.OPEN_CONFIG_GUI.getKeybind().setCallback(callbackGeneric);
Hotkeys.PLACEMENT_RESTRICTION_MODE_COLUMN.getKeybind().setCallback(callbackGeneric);
Hotkeys.PLACEMENT_RESTRICTION_MODE_DIAGONAL.getKeybind().setCallback(callbackGeneric);
Expand Down Expand Up @@ -448,6 +442,18 @@ else if (key == Hotkeys.ZOOM_ACTIVATE.getKeybind())
//String.format("%s%.1f%s", GuiBase.TXT_GREEN, Configs.Generic.ZOOM_FOV.getDoubleValue(), GuiBase.TXT_RST));
}
}
else if (key == Hotkeys.INVENTORY_PREVIEW_TOGGLE_SCREEN.getKeybind())
{
if (mc.currentScreen instanceof InventoryOverlayScreen)
{
mc.setScreen(null);
}
else if (FeatureToggle.TWEAK_INVENTORY_PREVIEW.getBooleanValue() &&
Hotkeys.INVENTORY_PREVIEW.getKeybind().isKeybindHeld())
{
InventoryOverlayHandler.getInstance().refreshInventoryOverlay(mc, Configs.Generic.SHULKER_DISPLAY_BACKGROUND_COLOR.getBooleanValue());
}
}

return false;
}
Expand Down
6 changes: 6 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 @@ -77,6 +78,7 @@ public static class Generic
public static final ConfigOptionList HOTBAR_SWAP_OVERLAY_ALIGNMENT = new ConfigOptionList ("hotbarSwapOverlayAlignment", HudAlignment.BOTTOM_RIGHT).apply(GENERIC_KEY);
public static final ConfigInteger HOTBAR_SWAP_OVERLAY_OFFSET_X = new ConfigInteger ("hotbarSwapOverlayOffsetX", 4).apply(GENERIC_KEY);
public static final ConfigInteger HOTBAR_SWAP_OVERLAY_OFFSET_Y = new ConfigInteger ("hotbarSwapOverlayOffsetY", 4).apply(GENERIC_KEY);
public static final ConfigBoolean INVENTORY_PREVIEW_VILLAGER_BG_COLOR = new ConfigBoolean ("inventoryPreviewVillagerBGColor", false).apply(GENERIC_KEY);
public static final ConfigInteger ITEM_SWAP_DURABILITY_THRESHOLD = new ConfigInteger ("itemSwapDurabilityThreshold", 20, 5, 10000).apply(GENERIC_KEY);
public static final ConfigBoolean ITEM_USE_PACKET_CHECK_BYPASS = new ConfigBoolean ("itemUsePacketCheckBypass", true).apply(GENERIC_KEY);
public static final ConfigBoolean MAP_PREVIEW_REQUIRE_SHIFT = new ConfigBoolean ("mapPreviewRequireShift", true).apply(GENERIC_KEY);
Expand Down Expand Up @@ -132,6 +134,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 All @@ -140,6 +143,7 @@ public static class Generic
FREE_CAMERA_PLAYER_MOVEMENT,
HAND_RESTOCK_PRE,
HANGABLE_ENTITY_BYPASS_INVERSE,
INVENTORY_PREVIEW_VILLAGER_BG_COLOR,
ITEM_USE_PACKET_CHECK_BYPASS,
MAP_PREVIEW_REQUIRE_SHIFT,
PERMANENT_SNEAK_ALLOW_IN_GUIS,
Expand Down Expand Up @@ -227,11 +231,13 @@ public static class Generic
public static class Fixes
{
//public static final ConfigBoolean ELYTRA_FIX = new ConfigBoolean("elytraFix", false).apply(FIXES_KEY);
public static final ConfigBoolean ELYTRA_SPRINT_CANCEL = new ConfigBoolean("elytraSprintCancel", false).apply(FIXES_KEY);
public static final ConfigBoolean MAC_HORIZONTAL_SCROLL = new ConfigBoolean("macHorizontalScroll", false).apply(FIXES_KEY);
public static final ConfigBoolean RAVAGER_CLIENT_BLOCK_BREAK_FIX = new ConfigBoolean("ravagerClientBlockBreakFix", false).apply(FIXES_KEY);

public static final ImmutableList<IConfigBase> OPTIONS = ImmutableList.of(
//ELYTRA_FIX,
ELYTRA_SPRINT_CANCEL,
MAC_HORIZONTAL_SCROLL,
RAVAGER_CLIENT_BLOCK_BREAK_FIX
);
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/fi/dy/masa/tweakeroo/config/Hotkeys.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public class Hotkeys
public static final ConfigHotkey HOTBAR_SWAP_2 = new ConfigHotkey("hotbarSwap2", "").apply(HOTKEY_KEY);
public static final ConfigHotkey HOTBAR_SWAP_3 = new ConfigHotkey("hotbarSwap3", "").apply(HOTKEY_KEY);
public static final ConfigHotkey INVENTORY_PREVIEW = new ConfigHotkey("inventoryPreview", "LEFT_ALT", KeybindSettings.PRESS_ALLOWEXTRA).apply(HOTKEY_KEY);
public static final ConfigHotkey INVENTORY_PREVIEW_TOGGLE_SCREEN = new ConfigHotkey("inventoryPreviewToggleScreen", "", KeybindSettings.create(KeybindSettings.Context.ANY, KeyAction.PRESS, true, true, false, true)).apply(HOTKEY_KEY);
public static final ConfigHotkey OPEN_CONFIG_GUI = new ConfigHotkey("openConfigGui", "X,C").apply(HOTKEY_KEY);
public static final ConfigHotkey PLACEMENT_Y_MIRROR = new ConfigHotkey("placementYMirror", "", KeybindSettings.PRESS_ALLOWEXTRA).apply(HOTKEY_KEY);
public static final ConfigHotkey PLAYER_INVENTORY_PEEK = new ConfigHotkey("playerInventoryPeek", "", KeybindSettings.PRESS_ALLOWEXTRA).apply(HOTKEY_KEY);
Expand Down Expand Up @@ -83,6 +84,7 @@ public class Hotkeys
HOTBAR_SWAP_2,
HOTBAR_SWAP_3,
INVENTORY_PREVIEW,
INVENTORY_PREVIEW_TOGGLE_SCREEN,
OPEN_CONFIG_GUI,
PLACEMENT_Y_MIRROR,
PLAYER_INVENTORY_PEEK,
Expand Down
Loading

0 comments on commit b17739a

Please sign in to comment.