Skip to content

Commit

Permalink
Update to 1.19.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Pyrofab committed Jul 30, 2022
1 parent 84ec590 commit 20dcbf0
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
10 changes: 5 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ org.gradle.jvmargs=-Xmx2G

# Fabric Properties
# check these on https://fabricmc.net/use
minecraft_version=1.19
yarn_mappings=1.19+build.4
minecraft_version=1.19.1
yarn_mappings=1.19.1+build.1
loader_version=0.14.8
fabric_version=0.57.0+1.19
fabric_version=0.58.5+1.19.1

# Other Dependencies
jb_annotations_version = 23.0.0
apiguardian_version = 1.1.2

# Mod Properties
mod_version = 2.6.1
mod_version = 2.7.0
maven_group = io.github.ladysnake
archives_base_name = impersonate

Expand All @@ -24,7 +24,7 @@ license_header = LGPL
gpl_version = 3
modrinth_id = xBZuWXoj
curseforge_id = 360333
curseforge_versions = 1.19
curseforge_versions = 1.19.1
cf_requirements = fabric-api
cf_embeddeds = cardinal-components
release_type = release
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[versions]
cca = "5.0.1"
fpa = "0.1-SNAPSHOT"
elmendorf = "0.6.0"
elmendorf = "0.7.0"

[libraries]
cca-base = { module = "dev.onyxstudios.cardinal-components-api:cardinal-components-base", version.ref = "cca" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ public abstract class ServerPlayNetworkHandlerMixin {
@Shadow
public ServerPlayerEntity player;

@ModifyArg(method = "sendPacket(Lnet/minecraft/network/Packet;Lio/netty/util/concurrent/GenericFutureListener;)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/network/ClientConnection;send(Lnet/minecraft/network/Packet;Lio/netty/util/concurrent/GenericFutureListener;)V"))
@ModifyArg(method = "sendPacket(Lnet/minecraft/network/Packet;Lnet/minecraft/class_7648;)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/network/ClientConnection;send(Lnet/minecraft/network/Packet;Lnet/minecraft/class_7648;)V"))
private Packet<?> resolveFakeTextsInPackets(Packet<?> packet) {
if (packet instanceof GameMessageS2CPacket gamePacket) {
if (this.existsImpersonator()) {
Text resolvedText = ((RecipientAwareText) gamePacket.content()).impersonateResolveAll(player);
return new GameMessageS2CPacket(resolvedText, gamePacket.typeId());
return new GameMessageS2CPacket(resolvedText, gamePacket.overlay());
}
} else if (packet instanceof PlayerListS2CPacket listPacket) {
if (this.existsImpersonator()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
package io.github.ladysnake.impersonatest;

import com.mojang.authlib.GameProfile;
import io.github.ladysnake.elmendorf.ElmendorfTestContext;
import io.github.ladysnake.elmendorf.GameTestUtil;
import io.github.ladysnake.impersonate.Impersonate;
import io.github.ladysnake.impersonate.Impersonator;
Expand All @@ -35,7 +36,7 @@ public class ImpersonateTestSuite implements FabricGameTest {
public void nameChanges(TestContext ctx) {
Identifier key = new Identifier("impersonatest", "key");
GameProfile profile = new GameProfile(UUID.randomUUID(), "impersonator");
ServerPlayerEntity player = ctx.spawnServerPlayer(1, 0, 1);
ServerPlayerEntity player = ((ElmendorfTestContext)ctx).spawnServerPlayer(1, 0, 1);
Text formerName = player.getDisplayName();
Impersonator impersonator = player.getComponent(Impersonate.IMPERSONATION);
impersonator.impersonate(key, profile);
Expand Down

0 comments on commit 20dcbf0

Please sign in to comment.