Skip to content

Commit

Permalink
port to 1.20.2
Browse files Browse the repository at this point in the history
  • Loading branch information
ix0rai committed Oct 3, 2023
1 parent 70b0393 commit e6c9dda
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 10 deletions.
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.2.4"
id "fabric-loom" version "1.3.+"
id "com.github.johnrengelman.shadow" version "7.1.2"
id "com.modrinth.minotaur" version "2.+"
}
Expand Down
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ org.gradle.jvmargs=-Xmx1G

# minecraft, mappings and loader dependencies
# check these on https://modmuss50.me/fabric.html
minecraft_version=1.20.1
minecraft_version=1.20.2
quilt_mappings=1
loader_version=0.14.21

# mod properties
mod_version=1.1.2+mc1.20.1
mod_version=1.1.2+mc1.20.2
maven_group=rainglow
archives_base_name=rainglow

# other dependencies
java_version=17
spruceui_version=5.0.0+1.20
mod_menu_version=7.0.0
fabric_api_version=0.83.1+1.20.1
mod_menu_version=8.0.0
fabric_api_version=0.89.3+1.20.2
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
12 changes: 8 additions & 4 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,6 @@ done
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

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

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum

Expand Down Expand Up @@ -133,10 +130,13 @@ location of your Java installation."
fi
else
JAVACMD=java
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi

# Increase the maximum file descriptors if we can.
Expand Down Expand Up @@ -197,6 +197,10 @@ if "$cygwin" || "$msys" ; then
done
fi


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

# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/io/ix0rai/rainglow/mixin/AllayEntityMixin.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import net.minecraft.util.random.RandomGenerator;
import net.minecraft.world.World;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Unique;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.Redirect;
Expand Down Expand Up @@ -63,6 +64,7 @@ public void setVariant(RainglowColour colour) {
this.getDataTracker().set(Rainglow.getTrackedColourData(RainglowEntity.ALLAY), colour.getId());
}

@Unique
public RandomGenerator getRandom() {
return this.random;
}
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/io/ix0rai/rainglow/mixin/DyeItemMixin.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import net.minecraft.util.ActionResult;
import net.minecraft.util.Hand;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Unique;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
Expand Down Expand Up @@ -62,6 +63,7 @@ private void useOnEntity(ItemStack stack, PlayerEntity user, LivingEntity entity
cir.setReturnValue(ActionResult.PASS);
}

@Unique
private static String getDye(ItemStack item) {
if (item.isOf(RED_DYE)) {
return "red";
Expand Down

0 comments on commit e6c9dda

Please sign in to comment.