Skip to content

Commit

Permalink
Port to 1.21
Browse files Browse the repository at this point in the history
  • Loading branch information
JoakimThorsen committed Jul 2, 2024
1 parent 37fdffa commit 9cea7cc
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 5 deletions.
4 changes: 3 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id 'maven-publish'
id 'com.github.hierynomus.license' version '0.16.1' apply false
id 'fabric-loom' version '1.4-SNAPSHOT' apply false
id 'fabric-loom' version '1.7-SNAPSHOT' apply false

// https://github.com/ReplayMod/preprocessor
// https://github.com/Fallen-Breath/preprocessor
Expand All @@ -19,13 +19,15 @@ preprocess {
def mc118 = createNode('1.18.2' , 1_18_02, 'yarn')
def mc119 = createNode('1.19.4' , 1_19_04, 'yarn')
def mc120 = createNode('1.20.2' , 1_20_02, 'yarn')
def mc121 = createNode('1.21' , 1_21_00, 'yarn')

// mc115.link(mc114, null)
// mc115.link(mc116, null)
// mc116.link(mc117, null)
mc117.link(mc118, null)
mc118.link(mc119, null)
mc119.link(mc120, null)
mc120.link(mc121, null)
}

tasks.register('buildAndGather') {
Expand Down
2 changes: 2 additions & 0 deletions common.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ dependencies {

modImplementation "carpet:fabric-carpet:${project.carpet_minecraft_version}-${project.carpet_core_version}"

runtimeOnly("net.fabricmc:sponge-mixin:0.13.3+mixin.0.8.5")

// runtime mods
// if (mcVersion < 11904) {
// modRuntimeOnly(mcVersion < 11900 ? "com.github.astei:lazydfu:0.1.2" : "com.github.Fallen-Breath:lazydfu:a7cfc44c0c")
Expand Down
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.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
3 changes: 2 additions & 1 deletion settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"1.17.1",
"1.18.2",
"1.19.4",
"1.20.2"
"1.20.2",
"1.21"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,14 @@

@Mixin(Projectile.class)
public class ProjectileMixin {
@WrapOperation(method = "shoot", at = @At(
@WrapOperation(
//#if MC >= 12100
method = "getMovementToShoot"
//#else
//$$ method = "shoot"
//#endif

, at = @At(
value = "INVOKE",
target = "Lnet/minecraft/world/phys/Vec3;add(DDD)Lnet/minecraft/world/phys/Vec3;"
))
Expand Down
21 changes: 21 additions & 0 deletions versions/1.21/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Fabric Properties
# check these on https://fallen-breath.github.io/fabric-versions/?&version=1.21
minecraft_version=1.21
yarn_mappings=1.21+build.7

# Jar build filename version
minecraft_display_version=1.21.x

# Fabric Mod Metadata
minecraft_dependency=1.21.x

# Build Information
# The target mc versions for the mod during mod publishing, separated with \n
game_versions=1.21

# Dependencies
# fabric_api_version=0.91.3+1.20.4

# https://masa.dy.fi/maven/carpet/fabric-carpet/
carpet_core_version=1.4.147+v240613
carpet_minecraft_version=1.21
2 changes: 1 addition & 1 deletion versions/mainProject
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.20.2
1.21

0 comments on commit 9cea7cc

Please sign in to comment.