Skip to content

Commit

Permalink
Merge pull request #188 from bruned12/printer-1.20.1-3.2.1
Browse files Browse the repository at this point in the history
Fix cant place slab

(cherry picked from commit 2357b37)
  • Loading branch information
aleksilassila authored and sakura-ryoko committed Nov 17, 2024
1 parent ff7c319 commit 0ae02d0
Show file tree
Hide file tree
Showing 97 changed files with 2,042 additions and 659 deletions.
41 changes: 22 additions & 19 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,34 +4,37 @@
# against bad commits.

name: build
on: [ pull_request, push, workflow_dispatch ]
on: [ pull_request, push ]

jobs:
build:
runs-on: ubuntu-20.04
strategy:
matrix:
# Use these Java versions
java: [
21, # Current Java LTS & minimum supported by Minecraft
]
# and run on both Linux and Windows
os: [ ubuntu-20.04, windows-2022 ]
runs-on: ${{ matrix.os }}
steps:
- name: checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: validate gradle wrapper
uses: gradle/wrapper-validation-action@v1
- name: setup jdk 17
uses: actions/setup-java@v1
uses: gradle/actions/wrapper-validation@v3
- name: setup jdk ${{ matrix.java }}
uses: actions/setup-java@v4
with:
java-version: 17
distribution: temurin
java-version: ${{ matrix.java }}
- name: make gradle wrapper executable
if: ${{ runner.os != 'Windows' }}
run: chmod +x ./gradlew

- name: build 1.17
run: ./gradlew :v1_17:build
- name: build 1.18
run: ./gradlew :v1_18:build
- name: build 1.19
run: ./gradlew :v1_19:build
- name: build 1.19.3
run: ./gradlew :v1_19_3:build

- name: build
run: ./gradlew build
- name: capture build artifacts
uses: actions/upload-artifact@v2
if: ${{ runner.os == 'Linux' }}
uses: actions/upload-artifact@v4
with:
name: Artifacts
path: ./**/build/libs/*.jar
path: build/libs/
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,6 @@ logs/
build.number
run/
.idea/
.DS_Store
.DS_Store
.vscode
libs/
43 changes: 25 additions & 18 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
plugins {
id("fabric-loom").version("1.6-SNAPSHOT")
id("fabric-loom").version("1.8-SNAPSHOT")
id("maven-publish")
}

//subprojects {
//apply<JavaPlugin>()

val minecraft_version: String by project
val yarn_mappings: String by project
val loader_version: String by project
val fabric_version: String by project
val mappings_version: String by project
val fabric_loader_version: String by project
val fabric_api_version: String by project
val malilib_version: String by project
val litematica_projectid: String by project
val litematica_fileid: String by project
//val litematica_projectid: String by project
//val litematica_fileid: String by project
val litematica_version: String by project
val mod_menu_version: String by project

val archives_base_name: String by project
val mod_version: String by project
Expand All @@ -23,24 +22,32 @@ java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}
//}

repositories {
mavenLocal()
mavenCentral()
maven("https://masa.dy.fi/maven")
maven("https://www.cursemaven.com")
//maven("https://www.cursemaven.com")
maven("https://maven.terraformersmc.com/releases/")
maven("https://jitpack.io")
}

dependencies {
// implementation(project(":common"))
minecraft("com.mojang:minecraft:${minecraft_version}")
mappings("net.fabricmc:yarn:${yarn_mappings}:v2")
mappings("net.fabricmc:yarn:${mappings_version}:v2")
implementation("com.google.code.findbugs:jsr305:3.0.2")

modImplementation("net.fabricmc:fabric-loader:${fabric_loader_version}")
modImplementation("net.fabricmc.fabric-api:fabric-api:${fabric_api_version}")
//modImplementation("fi.dy.masa.malilib:malilib-fabric-${malilib_version}")
//modImplementation("curse.maven:litematica-${litematica_projectid}:${litematica_fileid}")

modImplementation("net.fabricmc:fabric-loader:${loader_version}")
modImplementation("net.fabricmc.fabric-api:fabric-api:${fabric_version}")
modImplementation("fi.dy.masa.malilib:malilib-fabric-${malilib_version}")
modImplementation("curse.maven:litematica-${litematica_projectid}:${litematica_fileid}")
// Sakura's Jitpack
modImplementation("com.github.sakura-ryoko:malilib:${malilib_version}")
modImplementation("com.github.sakura-ryoko:litematica:${litematica_version}")

// For Mod Menu display
modCompileOnly("com.terraformersmc:modmenu:${mod_menu_version}")
}

tasks.withType<ProcessResources> {
Expand All @@ -65,4 +72,4 @@ tasks.register("copyJar") {

tasks.build {
finalizedBy("copyJar")
}
}
3 changes: 3 additions & 0 deletions crowdin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
files:
- source: /src/main/resources/assets/litematica-printer/lang/en_us.json
translation: /src/main/resources/assets/litematica-printer/lang/crowdin/%locale_with_underscore%.json
37 changes: 21 additions & 16 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
# Done to increase the memory available to gradle.
org.gradle.jvmargs=-Xmx1G
#org.gradle.parallel=false
org.gradle.jvmargs = -Xmx2G
org.gradle.parallel = false

# Mod Properties
mod_version=3.2.1
maven_group=net.fabricmc
archives_base_name=litematica-printer
# https://masa.dy.fi/maven/fi/dy/masa/malilib/
malilib_version=1.20.4:0.18.0
# https://www.curseforge.com/minecraft/mc-mods/litematica/files
litematica_fileid=4946471
litematica_projectid=308892
# Fabric Properties: https://fabricmc.net/develop/
minecraft_version=1.20.4
yarn_mappings=1.20.4+build.3
loader_version=0.15.3
#Fabric api
fabric_version=0.91.3+1.20.4
mod_version = 3.2.1

mod_id = litematica-printer
maven_group = me.aleksilassila
archives_base_name = litematica-printer

# Dependencies (malilib / litematica)
malilib_version = 1.21.3-0.22.0-sakura.7
litematica_version = 1.21.3-0.20.0-sakura.3

# 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

fabric_loader_version = 0.16.9
mod_menu_version = 12.0.0-beta.1
fabric_api_version = 0.106.1+1.21.3
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
34 changes: 21 additions & 13 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#

##############################################################################
#
Expand Down Expand Up @@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand Down Expand Up @@ -83,10 +85,9 @@ done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down Expand Up @@ -133,26 +134,29 @@ location of your Java installation."
fi
else
JAVACMD=java
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi

# Increase the maximum file descriptors if we can.
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down Expand Up @@ -197,11 +201,15 @@ if "$cygwin" || "$msys" ; then
done
fi

# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.

set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
Expand Down
22 changes: 12 additions & 10 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@rem SPDX-License-Identifier: Apache-2.0
@rem

@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
Expand Down Expand Up @@ -43,11 +45,11 @@ set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

Expand All @@ -57,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto execute

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

Expand Down
3 changes: 3 additions & 0 deletions jitpack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
before_install:
- sdk install java 21.0.2-tem
- sdk use java 21.0.2-tem
Loading

0 comments on commit 0ae02d0

Please sign in to comment.