Skip to content

Commit

Permalink
Official 1.18
Browse files Browse the repository at this point in the history
  • Loading branch information
samolego committed Dec 4, 2021
1 parent e611bf2 commit 4448da3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 25 deletions.
10 changes: 5 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
org.gradle.jvmargs=-Xmx1G

# Fabric Properties
minecraft_version=1.18-rc1
yarn_mappings=1.18-rc1+build.1
loader_version=0.12.5
minecraft_version=1.18
yarn_mappings=1.18+build.1
loader_version=0.12.8

#Fabric api
fabric_version=0.43.1+1.18
fabric_version=0.44.0+1.18

# Mod Properties
mod_version = 1.7.2
mod_version = 1.7.3
maven_group = org.samo_lego
archives_base_name = fabrictailor

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package org.samo_lego.fabrictailor.mixin;

import net.minecraft.network.PacketByteBuf;
import net.minecraft.network.packet.c2s.play.ClientSettingsC2SPacket;
import net.minecraft.network.packet.c2s.play.CustomPayloadC2SPacket;
import net.minecraft.server.network.ServerPlayNetworkHandler;
import net.minecraft.server.network.ServerPlayerEntity;
Expand Down Expand Up @@ -47,23 +46,4 @@ private void onSkinChangePacket(CustomPayloadC2SPacket packet, CallbackInfo ci)
}
}
}

@Inject(
method = "onClientSettings",
at = @At(
value = "INVOKE",
target = "Lnet/minecraft/server/network/ServerPlayerEntity;setClientSettings(Lnet/minecraft/network/packet/c2s/play/ClientSettingsC2SPacket;)V"
)
)
private void checkClientSettings(ClientSettingsC2SPacket packet, CallbackInfo ci) {
if(!config.allowCapes) {
byte playerModel = (byte) packet.playerModelBitMask();

// Fake cape rule to be off
playerModel = (byte) (playerModel & ~(1));

//fixme mixins with records?
//((ClientSettingsC2SAccessor) packet).setPlayerModelBitMask(playerModel);
}
}
}

0 comments on commit 4448da3

Please sign in to comment.