Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to 1.20.5 #9

Merged
merged 5 commits into from
Apr 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ jobs:

steps:
- uses: actions/checkout@v3.5.2
- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v3.12.0
with:
distribution: 'adopt'
java-version: '17'
java-version: '21'

- name: Make gradlew executable
run: chmod +x ./gradlew
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id 'fabric-loom' version '1.5-SNAPSHOT'
id 'fabric-loom' version '1.6-SNAPSHOT'
id 'maven-publish'
}

Expand Down Expand Up @@ -52,7 +52,7 @@ processResources {
}
}

def targetJavaVersion = 17
def targetJavaVersion = 21
tasks.withType(JavaCompile).configureEach {
// ensure that the encoding is set to UTF-8, no matter what the system default is
// this fixes some edge cases with special characters not displaying correctly
Expand Down
14 changes: 7 additions & 7 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@
org.gradle.jvmargs=-Xmx2G

# Fabric Properties
minecraft_version=1.20.4
loader_version=0.15.6
minecraft_version=1.20.5-rc2
loader_version=0.15.10

# Mod Properties
mod_version=1.4
maven_group=me.wesley1808
archives_base_name=advancedchat

# API dependencies
fabric_version=0.96.0+1.20.4
placeholder_api_version=2.3.0+1.20.3
fabric_version=0.97.3+1.20.5
placeholder_api_version=2.4.0-pre.1+1.20.5
playerdata_api_version=0.4.0+1.20.3
predicate_api_version=0.3.0+1.20.2
permission_api_version=0.3-SNAPSHOT
predicate_api_version=0.4.0+1.20.5
permission_api_version=0.3.1

# Other dependencies
styledchat_version=2.4.0+1.20.3
vanish_version=1.5.1+1.20.4
vanish_version=1.5.2+1.20.4
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
11 changes: 0 additions & 11 deletions src/main/java/me/wesley1808/advancedchat/impl/utils/Util.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,12 @@
import net.minecraft.commands.CommandSourceStack;
import net.minecraft.commands.arguments.GameProfileArgument;
import net.minecraft.core.Holder;
import net.minecraft.core.Registry;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.core.registries.Registries;
import net.minecraft.network.chat.*;
import net.minecraft.network.protocol.Packet;
import net.minecraft.network.protocol.game.ClientboundSetActionBarTextPacket;
import net.minecraft.network.protocol.game.ClientboundSoundPacket;
import net.minecraft.network.protocol.game.ClientboundSystemChatPacket;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.server.MinecraftServer;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.sounds.SoundEvent;
import net.minecraft.sounds.SoundSource;
Expand All @@ -34,7 +30,6 @@
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.concurrent.CompletableFuture;
import java.util.function.Function;

Expand Down Expand Up @@ -158,12 +153,6 @@ public static List<ServerPlayer> filterIgnored(ServerPlayer sender, List<ServerP
return filtered;
}

public static boolean isChat(MinecraftServer server, ChatType type) {
Optional<? extends Registry<ChatType>> optional = server.registryAccess().registry(Registries.CHAT_TYPE);
ResourceLocation key = optional.map(registry -> registry.getKey(type)).orElse(null);
return ChatType.CHAT.location().equals(key);
}

public static boolean isVanished(Entity entity) {
return ModCompat.VANISH && VanishAPI.isVanished(entity);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public class PlayerListMixin {
private List<ServerPlayer> advancedchat$filterPlayers(List<ServerPlayer> original, PlayerChatMessage message, Predicate<ServerPlayer> predicate, @Nullable ServerPlayer sender, ChatType.Bound bound) {
List<ServerPlayer> players = sender != null ? Util.filterIgnored(sender, original) : original;

if (sender != null && !players.isEmpty() && Util.isChat(this.server, bound.chatType())) {
if (sender != null && !players.isEmpty() && bound.chatType().is(ChatType.CHAT.location())) {
List<ServerPlayer> receivers = Util.filterByChannel(sender, players);
Socialspy.send(sender, receivers, message);
return receivers;
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
],
"depends": {
"fabricloader": ">=0.15.0",
"minecraft": ">=1.20.3-"
"minecraft": ">=1.20.5-"
},
"suggests": {
"styledchat": "*"
Expand Down
Loading