Skip to content

Commit

Permalink
update to 1.21.3
Browse files Browse the repository at this point in the history
  • Loading branch information
CodedSakura committed Oct 27, 2024
1 parent 8e994f5 commit 12ffe76
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 11 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 2.0.6

* Update to support 1.21.3

# 2.0.5

* Update to support 1.21.1
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.7-SNAPSHOT'
id 'fabric-loom' version '1.8-SNAPSHOT'
id 'maven-publish'
id "com.modrinth.minotaur" version "2.+"
}
Expand Down
12 changes: 6 additions & 6 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
org.gradle.jvmargs=-Xmx1G

# Mod Properties
mod_version=2.0.5
mod_version=2.0.6
maven_group=dev.codedsakura.blossom
mod_slug=BlossomPVP
archives_base_name=blossom-pvp
supported_versions=1.21;1.21.1
supported_versions=1.21.3;1.21.2

# Fabric Properties
# check these on https://modmuss50.me/fabric.html
minecraft_version=1.21.1
yarn_mappings=build.3
loader_version=0.16.5
minecraft_version=1.21.3
yarn_mappings=build.2
loader_version=0.16.7

# Dependencies
blossomlib_version=2.5.9
blossomlib_version=2.5.10
10 changes: 6 additions & 4 deletions src/main/java/dev/codedsakura/blossom/pvp/mixin/PVPMixin.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import net.minecraft.server.network.ServerPlayerEntity;
import net.minecraft.text.MutableText;
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 @@ -41,15 +42,16 @@ public class PVPMixin {
}
}

@Unique
void messageHelper(PlayerEntity attacker, PlayerEntity defender, String key) {
MutableText attackerMessage = TextUtils.fTranslation(key + ".attacker", TextUtils.Type.WARN, defender);
if (attackerMessage.asTruncatedString(1).length() > 0) {
attacker.sendMessage(attackerMessage);
if (!attackerMessage.asTruncatedString(1).isEmpty()) {
attacker.sendMessage(attackerMessage, false);
}

MutableText defenderMessage = TextUtils.fTranslation(key + ".defender", TextUtils.Type.WARN, attacker);
if (defenderMessage.asTruncatedString(1).length() > 0) {
defender.sendMessage(defenderMessage);
if (!defenderMessage.asTruncatedString(1).isEmpty()) {
defender.sendMessage(defenderMessage, false);
}
}
}

0 comments on commit 12ffe76

Please sign in to comment.