Skip to content

Commit

Permalink
xUpgrade to 1.20.6
Browse files Browse the repository at this point in the history
  • Loading branch information
necessary129 committed Jul 30, 2024
1 parent 0f63d87 commit 2b16288
Show file tree
Hide file tree
Showing 12 changed files with 61 additions and 45 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v1
with:
java-version: 17
java-version: 21
- name: Build artifacts
run: ./gradlew build
- name: Upload build artifacts
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ jobs:
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v1
with:
java-version: 17
java-version: 21
- name: Build artifacts
run: ./gradlew build
- name: Upload assets to GitHub
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -156,4 +156,4 @@ gradle-app.setting
run/

# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
!gradle-wrapper.jar
!gradle-wrapper.jar
5 changes: 4 additions & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 9 additions & 8 deletions .idea/runConfigurations/Minecraft_Client.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 9 additions & 9 deletions .idea/runConfigurations/Minecraft_Server.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 18 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,17 +1,28 @@
plugins {
id 'fabric-loom' version '0.12-SNAPSHOT'
id 'org.ajoberstar.grgit' version '4.1.0'
id 'base'
id 'java'
id 'fabric-loom' version '1.7-SNAPSHOT'
id 'org.ajoberstar.grgit' version '5.2.2'
}
repositories {
maven { url 'https://maven.shedaniel.me/' }
maven { url 'https://maven.terraformersmc.com/releases'}
maven { url = "https://jitpack.io" }
}

sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
java {
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
// if it is present.
// If you remove this line, sources will not be generated.
withSourcesJar()

sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}

archivesBaseName = "${project.archives_base_name}-mc${project.minecraft_version}"
base {
archivesName = "${project.archives_base_name}-mc${project.minecraft_version}"
}
version = "${project.mod_version}+${getVersionMetadata()}"
group = project.maven_group

Expand Down Expand Up @@ -54,7 +65,7 @@ tasks.withType(JavaCompile).configureEach {
it.options.encoding = "UTF-8"

// Minecraft 1.18 (1.18-pre2) upwards uses Java 17.
it.options.release = 17
it.options.release = 21
}

jar {
Expand All @@ -66,7 +77,7 @@ java {
// if it is present.
// If you remove this line, sources will not be generated.
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
languageVersion.set(JavaLanguageVersion.of(21))
}
withSourcesJar()

Expand Down
15 changes: 8 additions & 7 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
# Done to increase the memory available to gradle.
org.gradle.jvmargs=-Xmx1G
org.gradle.parallel=true
# Fabric Properties
# check these on https://modmuss50.me/fabric.html

minecraft_version=1.20.1
yarn_mappings=1.20.1+build.9
loader_version=0.14.21
minecraft_version=1.20.6
yarn_mappings=1.20.6+build.1
loader_version=0.15.10

#Fabric api
fabric_version=0.86.0+1.20.1
fabric_version=0.97.8+1.20.6

# Mod Properties
mod_version=1.2.3
mod_version=1.2.5
maven_group=autotorch
archives_base_name=autotorch
#Cloth config
cloth_version=11.1.106
modmenu_version=7.2.1
cloth_version=14.0.126
modmenu_version=10.0.0
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-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
4 changes: 2 additions & 2 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
pluginManagement {
repositories {
jcenter()
maven {
name = 'Fabric'
url = 'https://maven.fabricmc.net/'
}
mavenCentral()
gradlePluginPortal()
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public void tick(MinecraftClient client) {
}
}
}
private boolean offHandRightClickBlock(BlockPos pos) {
private void offHandRightClickBlock(BlockPos pos) {
Vec3d hitVec = Vec3d.ofBottomCenter(pos);
if (CDATA.accuratePlacement) {
PlayerMoveC2SPacket.LookAndOnGround packet = new PlayerMoveC2SPacket.LookAndOnGround(client.player.getYaw(), 90.0F, true);
Expand All @@ -80,7 +80,6 @@ private boolean offHandRightClickBlock(BlockPos pos) {
ActionResult one = client.interactionManager.interactBlock(client.player,Hand.OFF_HAND,
new BlockHitResult(hitVec, Direction.DOWN, pos, false));
ActionResult two = client.interactionManager.interactItem(client.player,Hand.OFF_HAND);
return (one.isAccepted() && two.isAccepted());
}
public boolean canPlaceTorch(BlockPos pos) {
return (client.world.getBlockState(pos).getFluidState().isEmpty() &&
Expand Down
7 changes: 4 additions & 3 deletions src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@
]
},
"depends": {
"fabricloader": ">=0.11.1",
"minecraft": ">=1.17",
"fabric": ">=0.30.0"
"fabricloader": ">=0.15.10",
"minecraft": "~1.20.6",
"java": ">=21",
"fabric-api": "*"
}
}

0 comments on commit 2b16288

Please sign in to comment.