Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Homura

Members
  • Posts

    6
  • Joined

  • Last visited

Homura's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. I have a relatively large project in 1.16.5, but I need to update it to 1.17. It used snapshot mappings in 1.16.5. What can I do to convert the whole project into using official mappings?
  2. I achieved it !! I used the PlayerEvent.StartTracking event and sent the entity ID. Thank you for your help very much!
  3. I must get the entity ID , and assign the value to the specific client player via the entity ID ... is that right?
  4. I try to do like this, but when a target player changes the value, my own player's value has been changed too. It seems that it sends the value of the target to my player... I guess that the problem may be in here ... just my guess... This is a part of GuiSelectMessage.class, used to assign the received value to the value in the capability @Override public void process(Supplier<NetworkEvent.Context> context) { if (context.get().getDirection() == NetworkDirection.PLAY_TO_CLIENT) { context.get().enqueueWork(() ->Minecraft.getInstance().player.getCapability(GuiSelectCapability.GUI_SELECT).ifPresent(date -> { date.setSelectParam(selectParam); })); } }
  5. It's the first time for me to use capability, maybe the question looks like so unreadable. In multiplayer game, the value in capability is displayed correctly on each player's own client,but when I try to get other player's value in client side, the value is not correct, is the initial value. In my client, only my player's value is correct, other player's values are wrong. In server side, the value from each player is correct. I don't know how to sync the value from other player,i want to use the value in a render event. I have already send packet in PlayerLoggedInEvent、PlayerRespawnEvent、PlayerChangedDimensionEvent event.getPlayer().getCapability(GUI_SELECT).ifPresent(t -> TackleMessage.CHANNEL.send( PacketDistributor.PLAYER.with(() -> (ServerPlayerEntity) event.getPlayer()), new GuiSelectMessage(t.getSelectParam()) ) ); please help me
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.