Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix various bad behaviors. #76

Draft
wants to merge 20 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Automatically build the project and run any configured tests for every push
# and submitted pull request. This can help catch issues that only occur on
# certain platforms or Java versions, and provides a first line of defence
# against bad commits.

name: build
on: [pull_request, push]

jobs:
build:
strategy:
matrix:
# Use these Java versions
java: [
17, # 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
uses: actions/checkout@v2
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
- name: Setup JDK ${{ matrix.java }}
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
- name: Make Wrapper Executable
if: ${{ runner.os != 'Windows' }}
run: chmod +x ./gradlew
- name: Build Project
run: ./gradlew build
- name: Capture Build Artifacts
if: ${{ runner.os == 'Linux' && matrix.java == '17' }}
uses: actions/upload-artifact@v2
with:
name: Artifacts
path: build/libs/
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# User-specific stuff
.idea/
/.vscode

*.iml
*.ipr
Expand Down
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ It works on both the **client and server**, and **does not** require the mod to

### Downloads

You can find downloads for DimThread on the [GitHub releases page](https://github.com/WearBlackAllDay/DimensionalThreading/releases).
You can find downloads for DimThread on the [GitHub releases page](https://github.com/MCTown/DimensionalThreading/releases).
The Fabric API can be found on [Curseforge](https://www.curseforge.com/minecraft/mc-mods/fabric-api).

### Installing
Expand Down Expand Up @@ -41,8 +41,6 @@ The mod will not crash if you do not have enough threads available, but it will
##### How is the compatibility with other mods?
Compatibility with [JellySquids](https://github.com/jellysquid3) performance mods and [Carpet](https://github.com/gnembon/fabric-carpet) will be ensured and issues concerning them are accepted. If you plan on using a different mod compatibility cannot be guaranteed, since not every author writes their mod threadsafe.

##### What about older versions of Minecraft?
DimThread is written with 1.16 compatibility in mind, older versions are currently not considered. If you play on 1.12 you can use a similar project maintained by [2No2Name](https://github.com/2No2Name).

---

Expand Down
25 changes: 8 additions & 17 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id 'fabric-loom' version '0.10-SNAPSHOT'
id 'fabric-loom' version '0.12-SNAPSHOT'
id 'maven-publish'
}

Expand All @@ -11,35 +11,26 @@ version = project.mod_version
group = project.maven_group

repositories {
maven {
url "https://jitpack.io"
}
// Add repositories to retrieve artifacts from in here.
// You should only use this when depending on other mods because
// Loom adds the essential maven repositories to download Minecraft and libraries from automatically.
// See https://docs.gradle.org/current/userguide/declaring_repositories.html
// for more information about repositories.
maven { url "https://masa.dy.fi/maven" }
}

dependencies {
implementation "com.github.wearblackallday:JavaUtils:bd58640372"
include"com.github.wearblackallday:JavaUtils:bd58640372"

// To change the versions see the gradle.properties file
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"

// Fabric API. This is technically optional, but you probably want it anyway.
// modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
modImplementation"net.fabricmc.fabric-api:fabric-game-rule-api-v1:${project.fabric_game_rule_v1_version}"
// PSA: Some older mods, compiled on Loom 0.2.1, might have outdated Maven POMs.
// You may need to force-disable transitiveness on them.
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
modRuntimeOnly "carpet:fabric-carpet:${project.minecraft_version}-${project.carpet_version}"
}

minecraft {
accessWidener = file("src/main/resources/dimthread.accesswidener")
refmapName = "dimthread.refmap.json"
loom {
accessWidenerPath = file("src/main/resources/dimthread.accesswidener")
mixin.defaultRefmapName = "dimthread.refmap.json"
}

processResources {
Expand All @@ -58,7 +49,7 @@ tasks.withType(JavaCompile).configureEach {
it.options.encoding = "UTF-8"

// Minecraft 1.17 (21w19a) upwards uses Java 16.
it.options.release = 16
it.options.release = 17
}

java {
Expand Down
13 changes: 7 additions & 6 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@
org.gradle.jvmargs=-Xmx1G
# Fabric Properties
# check these on https://modmuss50.me/fabric.html
minecraft_version=1.18
yarn_mappings=1.18+build.1
loader_version=0.12.8
minecraft_version=1.18.2
yarn_mappings=1.18.2+build.3
loader_version=0.13.3
# Mod Properties
mod_version=1.2.6
mod_version=1.2.6-1.18.2-sand-duper-fix.3
maven_group=wearblackallday
archives_base_name=DimThread
# Dependencies
# check this on https://modmuss50.me/fabric.html
#fabric_version=0.44.0+1.18
fabric_game_rule_v1_version=1.0.9+e77d3ea6cb
fabric_version=0.51.1+1.18.2
carpet_version=1.4.69+v220331
#fabric_game_rule_v1_version=1.0.9+e77d3ea6cb

Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
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-7.3.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading