Skip to content

Commit

Permalink
Updated project for 1.20.4
Browse files Browse the repository at this point in the history
- updated gradle wrapper
- updated loom
- updated project to 1.20.4
- small fix for new versions
  • Loading branch information
antD97 committed Mar 18, 2024
1 parent 230790f commit 34a8acb
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 23 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ Takes 7.5s for a non boosted furnace cart to reach max boost while on a powered
Takes 5s for a max boost furnace cart to return to zero total boost




# Design, Objectives, and Balance

Improve functionality to underutilized furnace minecarts
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id 'fabric-loom' version '1.0-SNAPSHOT'
id 'fabric-loom' version '1.5-SNAPSHOT'
id 'maven-publish'
}

Expand Down
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ org.gradle.parallel=true

# Fabric Properties
# check these on https://fabricmc.net/develop
minecraft_version=1.20.2
yarn_mappings=1.20.2+build.4
loader_version=0.15.1
minecraft_version=1.20.4
yarn_mappings=1.20.4+build.3
loader_version=0.15.7

# Mod Properties
mod_version = 1.0.0
maven_group = com.antd
archives_base_name = rail-transport-plus

# Dependencies
fabric_version=0.91.2+1.20.2
fabric_version=0.96.4+1.20.4
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 1 addition & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
networkTimeout=10000
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
12 changes: 4 additions & 8 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,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/master/subprojects/plugins/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 All @@ -80,11 +80,11 @@ do
esac
done

# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

APP_NAME="Gradle"
APP_BASE_NAME=${0##*/}

# 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"'

Expand Down Expand Up @@ -143,16 +143,12 @@ fi
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
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
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down
1 change: 0 additions & 1 deletion gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ if "%OS%"=="Windows_NT" setlocal

set DIRNAME=%~dp0
if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import net.minecraft.entity.damage.DamageSource;
import net.minecraft.entity.vehicle.AbstractMinecartEntity;
import net.minecraft.entity.vehicle.FurnaceMinecartEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.item.Items;
import net.minecraft.nbt.NbtCompound;
import net.minecraft.predicate.entity.EntityPredicates;
Expand Down Expand Up @@ -86,7 +87,9 @@ public AbstractMinecartEntityMixin(EntityType<?> type, World world) {

/* ----------------------------------------------------- Inject ----------------------------------------------------- */

@Shadow public abstract void dropItems(DamageSource damageSource);
// @Shadow public abstract void dropItems(DamageSource damageSource);

@Shadow public abstract ItemStack getPickBlockStack();

@Inject(at = @At("RETURN"), method = "<init>(Lnet/minecraft/entity/EntityType;" +
"Lnet/minecraft/world/World;)V")
Expand Down Expand Up @@ -606,8 +609,9 @@ public void move(boolean isTrailing, List<Entity> ridingEntities) {
if (fastestVelMagnitude * 15 >= 20) {
switch (Config.worldConfig.get(Config.TRAIN_CRASH_MODE)) {
case Config.TRAIN_CRASH_MODE_BREAK -> {
this.kill();
this.playSound(SoundEvents.ENTITY_GENERIC_EXPLODE, 1.0F, 1.0F);
this.dropItems(null);
this.dropItem(this.getPickBlockStack().getItem());
}
case Config.TRAIN_CRASH_MODE_EXPLODE -> this.getWorld().createExplosion(null, this.getX(),
this.getY(), this.getZ(), 2.0F, World.ExplosionSourceType.MOB);
Expand Down
6 changes: 3 additions & 3 deletions src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
],

"depends": {
"fabricloader": ">=0.15.1",
"fabric-api": ">=0.91.1",
"minecraft": "1.20.2",
"fabricloader": ">=0.15.7",
"fabric-api": ">=0.96.4",
"minecraft": "1.20.4",
"java": ">=17"
}
}

0 comments on commit 34a8acb

Please sign in to comment.