Skip to content

Commit

Permalink
Merge remote-tracking branch 'Litematica-ryoko/pre-rewrite/fabric/1.2…
Browse files Browse the repository at this point in the history
…1.4'

# Conflicts:
#	gradle.properties
#	src/main/resources/assets/litematica/lang/it_it.json
#	src/main/resources/assets/litematica/lang/ja_jp.json
#	src/main/resources/assets/litematica/lang/zh_cn.json
#	src/main/resources/assets/litematica/lang/zh_tw.json
#	src/main/resources/assets/uwmatica/lang/es_es.json
#	src/main/resources/assets/uwmatica/lang/uk_ua.json
  • Loading branch information
shaijana committed Dec 19, 2024
2 parents f07240c + fb28ddf commit 8982e23
Show file tree
Hide file tree
Showing 55 changed files with 2,080 additions and 1,081 deletions.
37 changes: 32 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
plugins {
id 'fabric-loom' version '1.8-SNAPSHOT'
id 'fabric-loom' version '1.9-SNAPSHOT'
id 'maven-publish'
}

sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
//sourceCompatibility = JavaVersion.VERSION_21
//targetCompatibility = JavaVersion.VERSION_21

repositories {
maven { url 'https://masa.dy.fi/maven' }
Expand All @@ -18,7 +19,7 @@ dependencies {
implementation "com.google.code.findbugs:jsr305:3.0.2"

//modImplementation "fi.dy.masa.malilib:malilib-fabric-${project.minecraft_version_out}:${project.malilib_version}"
modImplementation "com.github.sakura-ryoko:malilib:${project.malilib_id}"
modImplementation "com.github.sakura-ryoko:malilib:${project.malilib_version}"

// Fabric API. This is technically optional, but you probably want it anyway.
//modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_api_version}"
Expand All @@ -27,7 +28,7 @@ dependencies {
}

group = project.group + "." + project.mod_id
archivesBaseName = project.mod_file_name + '-' + project.minecraft_version_out
base.archivesName = project.mod_file_name + '-' + project.minecraft_version_out
version = project.mod_version

if (version.endsWith('-dev')) {
Expand Down Expand Up @@ -64,3 +65,29 @@ tasks.withType(AbstractArchiveTask).configureEach {
preserveFileTimestamps = true
//reproducibleFileOrder = true
}

jar {
from("LICENSE") {
rename { "${it}_${base.archivesName}"}
}
}

tasks.publish.dependsOn build
publishing {
publications {
mavenJava(MavenPublication) {
// How to introduce archivesName here without it breaking?
artifactId base.archivesName.get()

// add all the jars that should be included when publishing to maven
//artifact(jar) { builtBy remapJar }
from components.java
}
}

repositories {
maven {
url "$projectDir/../../CommonMaven"
}
}
}
17 changes: 8 additions & 9 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,16 @@ author = shaijana
mod_file_name = uwmatica-fabric

# Current mod version
mod_version = 0.6.7
mod_version = 0.21.0-sakura.9

# Required malilib version
malilib_version = 0.22.0-sakura.3
malilib_id = e51ccdcc4e
malilib_version = c3132f8672

# Minecraft, Fabric Loader and API and mappings versions
minecraft_version_out = 1.21.3
minecraft_version = 1.21.3
mappings_version = 1.21.3+build.2
minecraft_version_out = 1.21.4
minecraft_version = 1.21.4
mappings_version = 1.21.4+build.1

fabric_loader_version = 0.16.7
mod_menu_version = 12.0.0-beta.1
# fabric_api_version = 0.106.1+1.21.3
fabric_loader_version = 0.16.9
mod_menu_version = 13.0.0-beta.1
# fabric_api_version = 0.110.5+1.21.4
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
4 changes: 2 additions & 2 deletions jitpack.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
before_install:
- sdk install java 21.0.2-tem
- sdk use java 21.0.2-tem
- sdk install java 21.0.5-tem
- sdk use java 21.0.5-tem
7 changes: 7 additions & 0 deletions src/main/java/fi/dy/masa/litematica/InitHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,13 @@
import fi.dy.masa.malilib.event.*;
import fi.dy.masa.malilib.interfaces.IInitializationHandler;
import fi.dy.masa.malilib.interfaces.IRenderer;
import fi.dy.masa.malilib.registry.Registry;
import fi.dy.masa.malilib.util.data.ModInfo;
import fi.dy.masa.litematica.config.Configs;
import fi.dy.masa.litematica.data.DataManager;
import fi.dy.masa.litematica.data.EntitiesDataStorage;
import fi.dy.masa.litematica.event.*;
import fi.dy.masa.litematica.gui.GuiConfigs;
import fi.dy.masa.litematica.render.infohud.StatusInfoRenderer;
import fi.dy.masa.litematica.scheduler.ClientTickHandler;

Expand All @@ -20,6 +23,10 @@ public class InitHandler implements IInitializationHandler
public void registerModHandlers()
{
ConfigManager.getInstance().registerConfigHandler(Reference.MOD_ID, new Configs());
Registry.CONFIG_SCREEN.registerConfigScreenFactory(
new ModInfo(Reference.MOD_ID, Reference.MOD_NAME, GuiConfigs::new)
);

EntitiesDataStorage.getInstance().onGameInit();

InputEventHandler.getKeybindManager().registerKeybindProvider(InputHandler.getInstance());
Expand Down
6 changes: 6 additions & 0 deletions src/main/java/fi/dy/masa/litematica/config/Configs.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ public static class Generic
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 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);
Expand Down Expand Up @@ -125,6 +126,7 @@ public static class Generic
EASY_PLACE_VANILLA_REACH,
ENTITY_DATA_SYNC,
ENTITY_DATA_SYNC_BACKUP,
ENTITY_DATA_SYNC_CACHE_TIMEOUT,
ENTITY_DATA_LOAD_NBT,
EXECUTE_REQUIRE_TOOL,
FIX_CHEST_MIRROR,
Expand Down Expand Up @@ -194,11 +196,13 @@ public static class Visuals
public static final ConfigBoolean IGNORE_EXISTING_FLUIDS = new ConfigBoolean("ignoreExistingFluids", false).apply(VISUALS_KEY);
public static final ConfigBoolean OVERLAY_REDUCED_INNER_SIDES = new ConfigBoolean("overlayReducedInnerSides", false).apply(VISUALS_KEY);
public static final ConfigDouble PLACEMENT_BOX_SIDE_ALPHA = new ConfigDouble( "placementBoxSideAlpha", 0.2, 0, 1).apply(VISUALS_KEY);
public static final ConfigBoolean RENDER_AO_MODERN_ENABLE = new ConfigBoolean("renderAOModernEnable", false).apply(VISUALS_KEY);
public static final ConfigBoolean RENDER_AREA_SELECTION_BOX_SIDES = new ConfigBoolean("renderAreaSelectionBoxSides", true).apply(VISUALS_KEY);
public static final ConfigBoolean RENDER_BLOCKS_AS_TRANSLUCENT = new ConfigBoolean("renderBlocksAsTranslucent", false).apply(VISUALS_KEY);
public static final ConfigBoolean RENDER_COLLIDING_SCHEMATIC_BLOCKS = new ConfigBoolean("renderCollidingSchematicBlocks", false).apply(VISUALS_KEY);
public static final ConfigBoolean RENDER_ERROR_MARKER_CONNECTIONS = new ConfigBoolean("renderErrorMarkerConnections", false).apply(VISUALS_KEY);
public static final ConfigBoolean RENDER_ERROR_MARKER_SIDES = new ConfigBoolean("renderErrorMarkerSides", true).apply(VISUALS_KEY);
//public static final ConfigInteger RENDER_FAKE_LIGHTING_LEVEL = new ConfigInteger("renderFakeLightingLevel", 15, 0, 15).apply(VISUALS_KEY);
public static final ConfigBoolean RENDER_PLACEMENT_BOX_SIDES = new ConfigBoolean("renderPlacementBoxSides", false).apply(VISUALS_KEY);
public static final ConfigBoolean RENDER_PLACEMENT_ENCLOSING_BOX = new ConfigBoolean("renderPlacementEnclosingBox", true).apply(VISUALS_KEY);
public static final ConfigBoolean RENDER_PLACEMENT_ENCLOSING_BOX_SIDES= new ConfigBoolean("renderPlacementEnclosingBoxSides", false).apply(VISUALS_KEY);
Expand Down Expand Up @@ -229,11 +233,13 @@ public static class Visuals
ENABLE_SCHEMATIC_OVERLAY,
IGNORE_EXISTING_FLUIDS,
OVERLAY_REDUCED_INNER_SIDES,
RENDER_AO_MODERN_ENABLE,
RENDER_AREA_SELECTION_BOX_SIDES,
RENDER_BLOCKS_AS_TRANSLUCENT,
RENDER_COLLIDING_SCHEMATIC_BLOCKS,
RENDER_ERROR_MARKER_CONNECTIONS,
RENDER_ERROR_MARKER_SIDES,
//RENDER_FAKE_LIGHTING_LEVEL,
RENDER_PLACEMENT_BOX_SIDES,
RENDER_PLACEMENT_ENCLOSING_BOX,
RENDER_PLACEMENT_ENCLOSING_BOX_SIDES,
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/fi/dy/masa/litematica/config/Hotkeys.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public class Hotkeys
public static final ConfigHotkey PICK_BLOCK_FIRST = new ConfigHotkey("pickBlockFirst", "BUTTON_3", KeybindSettings.PRESS_ALLOWEXTRA).apply(HOTKEYS_KEY);
public static final ConfigHotkey PICK_BLOCK_LAST = new ConfigHotkey("pickBlockLast", "", KeybindSettings.MODIFIER_INGAME).apply(HOTKEYS_KEY);
public static final ConfigHotkey PICK_BLOCK_TOGGLE = new ConfigHotkey("pickBlockToggle", "M,BUTTON_3").apply(HOTKEYS_KEY);
public static final ConfigHotkey RENDER_INFO_OVERLAY = new ConfigHotkey("renderInfoOverlay", "I", KeybindSettings.PRESS_ALLOWEXTRA).apply(HOTKEYS_KEY);
public static final ConfigHotkey RENDER_INFO_OVERLAY = new ConfigHotkey("renderInfoOverlay", "I", KeybindSettings.PRESS_ALLOWEXTRA_EMPTY).apply(HOTKEYS_KEY);
public static final ConfigHotkey RENDER_OVERLAY_THROUGH_BLOCKS = new ConfigHotkey("renderOverlayThroughBlocks", "RIGHT_CONTROL", KeybindSettings.PRESS_ALLOWEXTRA).apply(HOTKEYS_KEY);
public static final ConfigHotkey RERENDER_SCHEMATIC = new ConfigHotkey("rerenderSchematic", "F3,M").apply(HOTKEYS_KEY);
public static final ConfigHotkey SAVE_AREA_AS_IN_MEMORY_SCHEMATIC = new ConfigHotkey("saveAreaAsInMemorySchematic", "").apply(HOTKEYS_KEY);
Expand Down
Loading

0 comments on commit 8982e23

Please sign in to comment.