Skip to content

Commit

Permalink
Resolve merge conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
xia-mc committed May 11, 2024
2 parents 994951c + ddfc375 commit 070edd8
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ dependencies {
modImplementation("net.fabricmc:fabric-loader:${project.loader_version}")

modImplementation("net.fabricmc.fabric-api:fabric-api:${project.fabric_version}")
modImplementation("top.hendrixshen.magiclib:magiclib-1_20_1:${project.magiclib_version}") {
modImplementation("top.hendrixshen.magiclib:magiclib-${project.minecraft_version.replace(".", "_")}:${project.magiclib_version}") {
exclude(group: "carpet", module: "fabric-carpet")
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package top.infsky.cheatdetector.impl.utils.packet;

import net.minecraft.network.protocol.Packet;
import net.minecraft.network.protocol.common.*;
import net.minecraft.network.protocol.game.*;
import top.hendrixshen.magiclib.impl.carpet.MagicLibSettings;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public static AttributeMap getAttributes(LivingEntity entity) {

// Status effects
for (var statusEffect : entity.getActiveEffectsMap().values()) {
statusEffect.getEffect().addAttributeModifiers(entity, attributes, statusEffect.getAmplifier());
statusEffect.getEffect().addAttributeModifiers(attributes, statusEffect.getAmplifier());
}

return attributes;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public FakePlayer(Player player) {

public void show() {
if (!isRemoved) return;
LevelUtils.getClientLevel().addPlayer(getId(), this);
LevelUtils.getClientLevel().addEntity(this);
isRemoved = false;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public static double getPitch(@NotNull Vec3 pos) {
public static void silentRotate(double yaw, double pitch, boolean onGround) {
Connection connection = Objects.requireNonNull(TRPlayer.CLIENT.getConnection()).getConnection();

((ConnectionInvoker) connection).sendPacket(new ServerboundMovePlayerPacket.Rot((float) yaw, (float) pitch, onGround), null);
((ConnectionInvoker) connection).sendPacket(new ServerboundMovePlayerPacket.Rot((float) yaw, (float) pitch, onGround), null, true);
}

public static void rotate(double yaw, double pitch) {
Expand All @@ -67,7 +67,7 @@ public static boolean cancelRotationPacket(@NotNull ServerboundMovePlayerPacket
if (packet.hasPosition()) { // PosRot
if (connection != null)
((ConnectionInvoker) connection).sendPacket(
new ServerboundMovePlayerPacket.Pos(packet.getX(0), packet.getY(0), packet.getZ(0), packet.isOnGround()), listener
new ServerboundMovePlayerPacket.Pos(packet.getX(0), packet.getY(0), packet.getZ(0), packet.isOnGround()), listener, true
);
}
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
@Mixin(Connection.class)
public interface ConnectionInvoker {
@Invoker("sendPacket")
void sendPacket(Packet<?> basePacket, PacketSendListener listener);
void sendPacket(Packet<?> basePacket, PacketSendListener listener, boolean bl);
@Invoker("channelRead0")
void channelRead0(ChannelHandlerContext channelHandlerContext, Packet<?> packet);
}

0 comments on commit 070edd8

Please sign in to comment.