Skip to content

Commit 44cf3e2

Browse files
committed
fixed blocking rendering of other players
1 parent b64460f commit 44cf3e2

File tree

9 files changed

+3
-70
lines changed

9 files changed

+3
-70
lines changed

simpleclient-1.19.4/src/main/java/simpleclient/mixin/feature/legacypvp/ItemInHandRendererMixin.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public void itemUsed(InteractionHand interactionHand, CallbackInfo ci) {
4242

4343
@Inject(at = @At(value = "HEAD"), method = "renderArmWithItem", cancellable = true)
4444
public void renderArmWithItem(AbstractClientPlayer player, float partialTicks, float pitch, InteractionHand hand, float swingProgress, ItemStack itemStack, float equipProgress, PoseStack poseStack, MultiBufferSource multiBufferSource, int packedLight, CallbackInfo ci) {
45-
if (LegacyPvP.ENABLED && LegacyPvP.BLOCKING && player.getUsedItemHand() == hand) {
45+
if (LegacyPvP.ENABLED && LegacyPvP.isBlocking(player) && player.getUsedItemHand() == hand) {
4646
poseStack.pushPose();
4747
boolean mainHand = hand == InteractionHand.MAIN_HAND;
4848
HumanoidArm arm = mainHand ? player.getMainArm() : player.getMainArm().getOpposite();

simpleclient-1.19.4/src/main/java/simpleclient/mixin/feature/legacypvp/LivingEntityMixin.java

Lines changed: 0 additions & 21 deletions
This file was deleted.

simpleclient-1.19.4/src/main/resources/simpleclient.mixins.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
"feature.legacypvp.GuiMixin",
1515
"feature.legacypvp.HumanoidModelMixin",
1616
"feature.legacypvp.ItemInHandRendererMixin",
17-
"feature.legacypvp.LivingEntityMixin",
1817
"feature.legacypvp.PlayerItemInHandLayerMixin",
1918
"feature.legacypvp.PlayerMixin",
2019
"feature.legacypvp.SwordItemMixin",

simpleclient-1.20.1/src/main/java/simpleclient/mixin/feature/legacypvp/ItemInHandRendererMixin.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public void itemUsed(InteractionHand interactionHand, CallbackInfo ci) {
4646

4747
@Inject(at = @At(value = "HEAD"), method = "renderArmWithItem", cancellable = true)
4848
public void renderArmWithItem(AbstractClientPlayer player, float partialTicks, float pitch, InteractionHand hand, float swingProgress, ItemStack itemStack, float equipProgress, PoseStack poseStack, MultiBufferSource multiBufferSource, int packedLight, CallbackInfo ci) {
49-
if (LegacyPvP.ENABLED && LegacyPvP.BLOCKING && player.getUsedItemHand() == hand) {
49+
if (LegacyPvP.ENABLED && LegacyPvP.isBlocking(player) && player.getUsedItemHand() == hand) {
5050
poseStack.pushPose();
5151
boolean mainHand = hand == InteractionHand.MAIN_HAND;
5252
HumanoidArm arm = mainHand ? player.getMainArm() : player.getMainArm().getOpposite();

simpleclient-1.20.1/src/main/java/simpleclient/mixin/feature/legacypvp/LivingEntityMixin.java

Lines changed: 0 additions & 22 deletions
This file was deleted.

simpleclient-1.20.1/src/main/resources/simpleclient.mixins.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
"feature.legacypvp.GuiMixin",
1717
"feature.legacypvp.HumanoidModelMixin",
1818
"feature.legacypvp.ItemInHandRendererMixin",
19-
"feature.legacypvp.LivingEntityMixin",
2019
"feature.legacypvp.PlayerItemInHandLayerMixin",
2120
"feature.legacypvp.PlayerMixin",
2221
"feature.legacypvp.SwordItemMixin",

simpleclient-1.20/src/main/java/simpleclient/mixin/feature/legacypvp/ItemInHandRendererMixin.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public void itemUsed(InteractionHand interactionHand, CallbackInfo ci) {
4242

4343
@Inject(at = @At(value = "HEAD"), method = "renderArmWithItem", cancellable = true)
4444
public void renderArmWithItem(AbstractClientPlayer player, float partialTicks, float pitch, InteractionHand hand, float swingProgress, ItemStack itemStack, float equipProgress, PoseStack poseStack, MultiBufferSource multiBufferSource, int packedLight, CallbackInfo ci) {
45-
if (LegacyPvP.ENABLED && LegacyPvP.BLOCKING && player.getUsedItemHand() == hand) {
45+
if (LegacyPvP.ENABLED && LegacyPvP.isBlocking(player) && player.getUsedItemHand() == hand) {
4646
poseStack.pushPose();
4747
boolean mainHand = hand == InteractionHand.MAIN_HAND;
4848
HumanoidArm arm = mainHand ? player.getMainArm() : player.getMainArm().getOpposite();

simpleclient-1.20/src/main/java/simpleclient/mixin/feature/legacypvp/LivingEntityMixin.java

Lines changed: 0 additions & 21 deletions
This file was deleted.

simpleclient-1.20/src/main/resources/simpleclient.mixins.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
"feature.legacypvp.GuiMixin",
1616
"feature.legacypvp.HumanoidModelMixin",
1717
"feature.legacypvp.ItemInHandRendererMixin",
18-
"feature.legacypvp.LivingEntityMixin",
1918
"feature.legacypvp.PlayerItemInHandLayerMixin",
2019
"feature.legacypvp.PlayerMixin",
2120
"feature.legacypvp.SwordItemMixin",

0 commit comments

Comments
 (0)