[作成依頼] entityのrotateを変えるpacketを送る関数

つくるのしんどいので https://discord.com/channels/545926404785569793/545926880017121310/894115103543296011 ↑この関数を、うちの鯖のverに移植してほしいです - 表面的挙動 rotatePacket(player, {_yaw}, {_pitch}, {_addModeBoolean}) - 補足 足りないアドオンとか環境的話は極力合わせます - 対価 paypay送金を考えてます うちの鯖で動作確認出来たら、とりあえずで500円 そこから対価が見合わないと考える場合は要相談
No description
5 Replies
あお🦀
あお🦀3w ago
import:
net.minecraft.server.v1_16_R3.PacketPlayOutPosition$EnumPlayerTeleportFlags as flags
java.util.Set

function rotatePacket(p: player, yaw: number, pitch: number, relative: boolean):
set {_packet} to new play_server_position packet
set field 0 of {_packet} to 0
set field 1 of {_packet} to 0
set field 2 of {_packet} to 0
set field 3 of {_packet} to {_yaw}
set field 4 of {_packet} to {_pitch}
if {_relative}:
set {_flags} to Set.of(flags.X, flags.Y, flags.Z, flags.Y_ROT, flags.X_ROT)
else:
set {_flags} to Set.of(flags.X, flags.Y, flags.Z)
set field 5 of {_packet} to {_flags}
send packet {_packet} to {_p}
import:
net.minecraft.server.v1_16_R3.PacketPlayOutPosition$EnumPlayerTeleportFlags as flags
java.util.Set

function rotatePacket(p: player, yaw: number, pitch: number, relative: boolean):
set {_packet} to new play_server_position packet
set field 0 of {_packet} to 0
set field 1 of {_packet} to 0
set field 2 of {_packet} to 0
set field 3 of {_packet} to {_yaw}
set field 4 of {_packet} to {_pitch}
if {_relative}:
set {_flags} to Set.of(flags.X, flags.Y, flags.Z, flags.Y_ROT, flags.X_ROT)
else:
set {_flags} to Set.of(flags.X, flags.Y, flags.Z)
set field 5 of {_packet} to {_flags}
send packet {_packet} to {_p}
以下の環境でテスト済みです(protocollibは5.3.0)
No description
月猫ch
月猫chOP3w ago
ああああああああああああああああああああありがとございまああああああああああああああああ @あお🦀 skript作成依頼の相場わかんないんですけど どれくらいほしいですか あとpaypayでいいですか
あお🦀
あお🦀3w ago
500円で大丈夫です paypayでお願いします
月猫ch
月猫chOP3w ago
了解です 明日で大丈夫ですか?
あお🦀
あお🦀3w ago
大丈夫です👍🏻

Did you find this page helpful?