Skip to content

Commit

Permalink
SetPlayer Data in packet
Browse files Browse the repository at this point in the history
  • Loading branch information
ktpatient committed Sep 8, 2024
1 parent 74e592b commit 719a5f1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public static StaticAugment getAugment(Player player, Slot slot){
int id = getId(player, slot);
return augmentHashMap.get(id);
}
private static Supplier<AttachmentType<Integer>> getAttachment(Slot slot){
public static Supplier<AttachmentType<Integer>> getAttachment(Slot slot){
switch (slot){
case HEAD -> {
return MJDataAttachments.HEAD_AUGMENTATION;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public static void keyPressedAction(KeyPressedPayload payload, IPayloadContext c
public static void setAugmentDataAction(SetAugmentDataPayload payload, IPayloadContext context){
context.enqueueWork(()->{
// Whoops, recursive packets bring sent
context.player().setData(AugmentHelper.getAttachment(Slot.GetValue(payload.slot())), payload.augmentId());
// AugmentHelper.setId(context.player(), Slot.GetValue(payload.slot()), payload.augmentId());
ModJam.LOGGER.info("Syncing data {}", payload.slot());
});
Expand Down

0 comments on commit 719a5f1

Please sign in to comment.