Skip to content

Commit

Permalink
touch up 1.21.3 changes (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
pcal43 authored Dec 2, 2024
1 parent e875c1f commit 31a5cf3
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 15 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
.gradle/
build/
out/
bin/
classes/

# eclipse
Expand Down
15 changes: 8 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
plugins {
id 'fabric-loom' version '1.8-SNAPSHOT'
id 'maven-publish'
id "com.modrinth.minotaur" version "2.+"
id "com.matthewprenger.cursegradle" version "1.4.0"
id 'fabric-loom' version '1.8.9'
id "com.modrinth.minotaur" version "2.+"
id "com.matthewprenger.cursegradle" version "1.4.0"
}


sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21

Expand All @@ -21,13 +19,16 @@ repositories {
// for more information about repositories.
}

configurations {
// configuration that holds jars to include in the jar
extraLibs
}

dependencies {
// To change the versions see the gradle.properties file
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings loom.officialMojangMappings()
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}"
}

Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
org.gradle.jvmargs=-Xmx1G

# Mod
mod_version = 0.9.2+1.21.3-prerelease
mod_version = 0.11.0+1.21.3-prerelease
maven_group = net.pcal
archives_base_name = highspeed-rail

Expand Down
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,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

@Mixin(MinecartBehavior.class)
public interface MinecartBehaviorAccessor {

@Accessor("minecart")
AbstractMinecart getMinecart();
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ protected void getMaxSpeed(CallbackInfoReturnable<Double> cir) {
if (maxSpeed != VANILLA_MAX_SPEED) {
cir.setReturnValue(maxSpeed);
}

}

private double getModifiedMaxSpeed() {
Expand All @@ -67,7 +66,6 @@ private double getModifiedMaxSpeed() {
currentPos.getY(),
currentPos.getZ() + Mth.sign(v.z())
);
System.out.println(nextPos);
final BlockState nextState = minecart.level().getBlockState(nextPos);
if (nextState.getBlock() instanceof BaseRailBlock rail) {
final RailShape shape = nextState.getValue(rail.getShapeProperty());
Expand All @@ -76,7 +74,6 @@ private double getModifiedMaxSpeed() {
} else {
final BlockState underState = minecart.level().getBlockState(currentPos.below());
final ResourceLocation underBlockId = BuiltInRegistries.BLOCK.getKey(underState.getBlock());
System.out.println(underBlockId);
final Integer speedLimit = HighspeedService.getInstance().getSpeedLimit(underBlockId);
if (speedLimit != null) {
return currentMaxSpeed = speedLimit / 20.0;
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
"highspeed-mixin.json"
],
"depends": {
"fabricloader": ">=0.15.11",
"fabricloader": ">=0.16.8",
"fabric": "*",
"minecraft": ">=1.21",
"minecraft": ">=1.21.3",
"java": ">=21"
},
"conflicts": {}
Expand Down

0 comments on commit 31a5cf3

Please sign in to comment.