Skip to content

Commit

Permalink
sync sakura-ryoko/litematica 1.21-0.19.56-sakura.1
Browse files Browse the repository at this point in the history
  • Loading branch information
TexBlock committed Jan 29, 2025
1 parent d47fe31 commit b842ebf
Show file tree
Hide file tree
Showing 51 changed files with 5,769 additions and 2,301 deletions.
4 changes: 1 addition & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
## Change
- sync `sakura-ryoko/litematica` 1.21-0.19.54-sakura.6
- feat: Make it so that the entityDataSyncBackup mode is capable of saving Litematics with Server-side NBT data, similar to how Servux functions.
NOTE: This requires Litematica 'marking' your game session as safe to do so before hand. It does this by marking it safe after Requesting and Receiving a QueryNBT packet successfully. You can do this by going up to any simple Chest and pressing I (Info Overlay) once. This is because the operation involves potentially dozens of Packets being sent without OP status and that can be problematic, and can cause long delays in saving your Litematic without having OP. Using Servux is better overall because with the Servux packets; the data is sent in a single Large packet per a Chunk, rather than multiple packets; one for every single Block Entity or Entity within the Logical Bounding Box... But the goal is to help players who do not have access to a Fabric Server with Servux installed.
- sync `sakura-ryoko/litematica` 1.21-0.19.56-sakura.1.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ dependencies {
neoForge libs.neoforge

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

implementation libs.jsr305
}
Expand Down
9 changes: 4 additions & 5 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ mappings_patch="1.21+build.4"
neoforge="21.1.89"

# Mod properties
version="0.1.14"
version="0.1.15"
maven-group="org.thinkingstudio.forgematica"
archives-name="Forgematica"

Expand All @@ -15,8 +15,8 @@ id-modrinth="dCKRaeBC"
id-curseforge="912441"

# Mod dependencies
mafglib="0.2.1-mc1.21.1"
badpackets="neo-0.8.1"
mafglib="0.2.4-mc1.21.1"
foxifiednetworking="1.21.1~dev-SNAPSHOT"

# Libraries
jsr305="3.0.2"
Expand All @@ -31,10 +31,9 @@ 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 = "com.github.TexBlock", 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"}

[plugins]
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/fi/dy/masa/litematica/Litematica.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ public class Litematica
{
public static final Logger logger = LogManager.getLogger(Reference.MOD_ID);

public static void onInitialize()
{
public static void onInitialize() {
InitializationHandler.getInstance().registerInitializationHandler(new InitHandler());
}

Expand Down
16 changes: 13 additions & 3 deletions src/main/java/fi/dy/masa/litematica/config/Configs.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package fi.dy.masa.litematica.config;

import java.io.File;
import java.util.List;
import com.google.common.collect.ImmutableList;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
Expand All @@ -12,6 +13,7 @@
import fi.dy.masa.malilib.config.IConfigBase;
import fi.dy.masa.malilib.config.IConfigHandler;
import fi.dy.masa.malilib.config.options.*;
import fi.dy.masa.malilib.hotkeys.IHotkey;
import fi.dy.masa.malilib.util.FileUtils;
import fi.dy.masa.malilib.util.JsonUtils;
import fi.dy.masa.malilib.util.MessageOutputType;
Expand All @@ -32,6 +34,7 @@ public static class Generic
public static final ConfigOptionList PASTE_REPLACE_BEHAVIOR = new ConfigOptionList("pasteReplaceBehavior", ReplaceBehavior.NONE).apply(GENERIC_KEY);
public static final ConfigOptionList PLACEMENT_REPLACE_BEHAVIOR = new ConfigOptionList("placementReplaceBehavior", ReplaceBehavior.ALL).apply(GENERIC_KEY);
public static final ConfigOptionList PLACEMENT_RESTRICTION_WARN = new ConfigOptionList("placementRestrictionWarn", MessageOutputType.ACTIONBAR).apply(GENERIC_KEY);
public static final ConfigOptionList SCHEMATIC_VCS_DELETE_MODE = new ConfigOptionList("schematicVcsDeleteMode", PlacementDeletionMode.MATCHING_BLOCK).apply(GENERIC_KEY);
public static final ConfigOptionList SELECTION_CORNERS_MODE = new ConfigOptionList("selectionCornersMode", CornerSelectionMode.CORNERS).apply(GENERIC_KEY);

public static final ConfigBoolean CUSTOM_SCHEMATIC_BASE_DIRECTORY_ENABLED = new ConfigBoolean("customSchematicBaseDirectoryEnabled", false).apply(GENERIC_KEY);
Expand Down Expand Up @@ -63,13 +66,14 @@ public static class Generic
public static final ConfigInteger EASY_PLACE_SWAP_INTERVAL = new ConfigInteger("easyPlaceSwapInterval", 0, 0, 10000).apply(GENERIC_KEY);
public static final ConfigBoolean EASY_PLACE_SWING_HAND = new ConfigBoolean("easyPlaceSwingHand", true).apply(GENERIC_KEY);
public static final ConfigBoolean EASY_PLACE_VANILLA_REACH = new ConfigBoolean("easyPlaceVanillaReach", false).apply(GENERIC_KEY);
public static final ConfigBoolean ENTITY_DATA_SYNC = new ConfigBoolean("entityDataSync", true).apply(GENERIC_KEY);
public static final ConfigBoolean ENTITY_DATA_SYNC_BACKUP = new ConfigBoolean("entityDataSyncBackup", true).apply(GENERIC_KEY);
public static final ConfigFloat ENTITY_DATA_SYNC_CACHE_TIMEOUT= new ConfigFloat("entityDataSyncCacheTimeout", 2.0f, 0.25f, 30.0f).apply(GENERIC_KEY);
public static final ConfigBooleanHotkeyed ENTITY_DATA_SYNC = new ConfigBooleanHotkeyed("entityDataSync", false, "").apply(GENERIC_KEY);
public static final ConfigBoolean ENTITY_DATA_SYNC_BACKUP = new ConfigBoolean("entityDataSyncBackup", false).apply(GENERIC_KEY);
public static final ConfigFloat ENTITY_DATA_SYNC_CACHE_TIMEOUT= new ConfigFloat("entityDataSyncCacheTimeout", 0.75f, 0.25f, 30.0f).apply(GENERIC_KEY);
public static final ConfigBoolean ENTITY_DATA_LOAD_NBT = new ConfigBoolean("entityDataSyncLoadNbt", true).apply(GENERIC_KEY);
public static final ConfigBoolean EXECUTE_REQUIRE_TOOL = new ConfigBoolean("executeRequireHoldingTool", true).apply(GENERIC_KEY);
public static final ConfigBoolean FIX_CHEST_MIRROR = new ConfigBoolean("fixChestMirror", true).apply(GENERIC_KEY);
public static final ConfigBoolean FIX_RAIL_ROTATION = new ConfigBoolean("fixRailRotation", true).apply(GENERIC_KEY);
public static final ConfigBoolean FIX_STAIRS_MIRROR = new ConfigBoolean("fixStairsMirror", true).apply(GENERIC_KEY);
public static final ConfigBoolean GENERATE_LOWERCASE_NAMES = new ConfigBoolean("generateLowercaseNames", false).apply(GENERIC_KEY);
public static final ConfigBoolean HIGHLIGHT_BLOCK_IN_INV = new ConfigBoolean("highlightBlockInInventory", false).apply(GENERIC_KEY);
public static final ConfigBoolean ITEM_USE_PACKET_CHECK_BYPASS= new ConfigBoolean("itemUsePacketCheckBypass", true).apply(GENERIC_KEY);
Expand Down Expand Up @@ -130,6 +134,7 @@ public static class Generic
EXECUTE_REQUIRE_TOOL,
FIX_CHEST_MIRROR,
FIX_RAIL_ROTATION,
FIX_STAIRS_MIRROR,
GENERATE_LOWERCASE_NAMES,
HIGHLIGHT_BLOCK_IN_INV,
ITEM_USE_PACKET_CHECK_BYPASS,
Expand Down Expand Up @@ -163,6 +168,7 @@ public static class Generic
UNHIDE_SCHEMATIC_PROJECTS,

PASTE_REPLACE_BEHAVIOR,
SCHEMATIC_VCS_DELETE_MODE,
SELECTION_CORNERS_MODE,

COMMAND_FILL_MAX_VOLUME,
Expand All @@ -178,6 +184,10 @@ public static class Generic
TOOL_ITEM,
TOOL_ITEM_COMPONENTS
);

public static final List<IHotkey> HOTKEY_LIST = ImmutableList.of(
ENTITY_DATA_SYNC
);
}

private static final String VISUALS_KEY = Reference.ID+".config.visuals";
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/fi/dy/masa/litematica/config/Hotkeys.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ public class Hotkeys
public static final ConfigHotkey SCHEMATIC_EDIT_REPLACE_DIRECTION = new ConfigHotkey("schematicEditReplaceDirection", "", KeybindSettings.MODIFIER_INGAME).apply(HOTKEYS_KEY);
public static final ConfigHotkey SCHEMATIC_PLACEMENT_ROTATION = new ConfigHotkey("schematicPlacementRotation", "", KeybindSettings.MODIFIER_INGAME).apply(HOTKEYS_KEY);
public static final ConfigHotkey SCHEMATIC_PLACEMENT_MIRROR = new ConfigHotkey("schematicPlacementMirror", "", KeybindSettings.MODIFIER_INGAME).apply(HOTKEYS_KEY);
public static final ConfigHotkey SCHEMATIC_VCS_DELETE_BY_PLACEMENT = new ConfigHotkey("schematicVCSDeleteBlockByPlacement","").apply(HOTKEYS_KEY);
public static final ConfigHotkey SCHEMATIC_VERSION_CYCLE_MODIFIER = new ConfigHotkey("schematicVersionCycleModifier", "", KeybindSettings.MODIFIER_INGAME).apply(HOTKEYS_KEY);
public static final ConfigHotkey SCHEMATIC_VERSION_CYCLE_NEXT = new ConfigHotkey("schematicVersionCycleNext", "").apply(HOTKEYS_KEY);
public static final ConfigHotkey SCHEMATIC_VERSION_CYCLE_PREVIOUS = new ConfigHotkey("schematicVersionCyclePrevious", "").apply(HOTKEYS_KEY);
Expand Down Expand Up @@ -130,6 +131,7 @@ public class Hotkeys
SCHEMATIC_EDIT_REPLACE_DIRECTION,
SCHEMATIC_PLACEMENT_ROTATION,
SCHEMATIC_PLACEMENT_MIRROR,
SCHEMATIC_VCS_DELETE_BY_PLACEMENT,
SCHEMATIC_VERSION_CYCLE_MODIFIER,
SCHEMATIC_VERSION_CYCLE_NEXT,
SCHEMATIC_VERSION_CYCLE_PREVIOUS,
Expand Down
Loading

0 comments on commit b842ebf

Please sign in to comment.