Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 'Client' suffix to some 'World' methods to indicate that they only work on the client #4052

Open
wants to merge 5 commits into
base: 24w46a
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 33 additions & 16 deletions mappings/net/minecraft/world/World.mapping
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,11 @@ CLASS net/minecraft/class_1937 net/minecraft/world/World
ARG 1 pos
ARG 2 old
ARG 3 updated
METHOD method_17452 addImportantParticle (Lnet/minecraft/class_2394;ZDDDDDD)V
METHOD method_17452 addImportantParticleClient (Lnet/minecraft/class_2394;ZDDDDDD)V
COMMENT Adds an important particle to the client's world renderer. Important particles get added even if the Particles graphics option is set to Minimal
COMMENT Does nothing on the server.
COMMENT
COMMENT @see ServerWorld#spawnParticles
ARG 1 parameters
ARG 2 force
ARG 3 x
Expand Down Expand Up @@ -143,9 +147,10 @@ CLASS net/minecraft/class_1937 net/minecraft/world/World
METHOD method_43126 getSpawnPos ()Lnet/minecraft/class_2338;
METHOD method_43127 getSpawnAngle ()F
METHOD method_43128 playSound (Lnet/minecraft/class_1657;DDDLnet/minecraft/class_3414;Lnet/minecraft/class_3419;FF)V
COMMENT Plays a sound caused by a source. On the client, the sound will only play if the source is the same as the client's player.
COMMENT On the server, sound packets will be sent to players around the source, excluding the source itself.
ARG 1 source
COMMENT the player that caused the sound and therefore plays the sound directly in
COMMENT the client, or {@code null}
COMMENT the player that caused this sound, or {@code null}
ARG 2 x
ARG 4 y
ARG 6 z
Expand All @@ -154,9 +159,10 @@ CLASS net/minecraft/class_1937 net/minecraft/world/World
ARG 10 volume
ARG 11 pitch
METHOD method_43129 playSoundFromEntity (Lnet/minecraft/class_1657;Lnet/minecraft/class_1297;Lnet/minecraft/class_3414;Lnet/minecraft/class_3419;FF)V
COMMENT Plays a sound caused by a source at the provided entity's position. On the client, the sound will only play if the source is the same as the client's player.
COMMENT On the server, sound packets will be sent to players around the source, excluding the source itself.
ARG 1 source
COMMENT the player that caused the sound and therefore plays the sound directly in
COMMENT the client, or {@code null}
COMMENT the player that caused this sound, or {@code null}
ARG 2 entity
ARG 3 sound
ARG 4 category
Expand All @@ -169,7 +175,7 @@ CLASS net/minecraft/class_1937 net/minecraft/world/World
ARG 4 category
ARG 5 volume
ARG 6 pitch
METHOD method_45446 playSoundAtBlockCenter (Lnet/minecraft/class_2338;Lnet/minecraft/class_3414;Lnet/minecraft/class_3419;FFZ)V
METHOD method_45446 playSoundAtBlockCenterClient (Lnet/minecraft/class_2338;Lnet/minecraft/class_3414;Lnet/minecraft/class_3419;FFZ)V
ARG 1 pos
ARG 2 sound
ARG 3 category
Expand Down Expand Up @@ -205,9 +211,10 @@ CLASS net/minecraft/class_1937 net/minecraft/world/World
METHOD method_47576 (Ljava/util/function/Predicate;Ljava/util/List;ILnet/minecraft/class_5575;Lnet/minecraft/class_1297;)Lnet/minecraft/class_7927$class_7928;
ARG 4 entity
METHOD method_47967 playSound (Lnet/minecraft/class_1657;DDDLnet/minecraft/class_3414;Lnet/minecraft/class_3419;FFJ)V
COMMENT Plays a sound caused by a source. On the client, the sound will only play if the source is the same as the client's player.
COMMENT On the server, sound packets will be sent to players around the source, excluding the source itself.
ARG 1 source
COMMENT the player that caused the sound and therefore plays the sound directly in
COMMENT the client, or {@code null}
COMMENT the player that caused this sound, or {@code null}
ARG 2 x
ARG 4 y
ARG 6 z
Expand All @@ -228,7 +235,7 @@ CLASS net/minecraft/class_1937 net/minecraft/world/World
ARG 6 z
ARG 8 sound
ARG 9 category
METHOD method_55116 playSoundFromEntity (Lnet/minecraft/class_1297;Lnet/minecraft/class_3414;Lnet/minecraft/class_3419;FF)V
METHOD method_55116 playSoundFromEntityClient (Lnet/minecraft/class_1297;Lnet/minecraft/class_3414;Lnet/minecraft/class_3419;FF)V
ARG 1 entity
ARG 2 sound
ARG 3 category
Expand Down Expand Up @@ -302,9 +309,10 @@ CLASS net/minecraft/class_1937 net/minecraft/world/World
METHOD method_8442 getSkyAngleRadians (F)F
ARG 1 tickDelta
METHOD method_8449 playSoundFromEntity (Lnet/minecraft/class_1657;Lnet/minecraft/class_1297;Lnet/minecraft/class_6880;Lnet/minecraft/class_3419;FFJ)V
COMMENT Plays a sound caused by a source at the provided entity's position. On the client, the sound will only play if the source is the same as the client's player.
COMMENT On the server, sound packets will be sent to players around the source, excluding the source itself.
ARG 1 source
COMMENT the player that caused the sound and therefore plays the sound directly in
COMMENT the client, or {@code null}
COMMENT the player that caused this sound, or {@code null}
ARG 2 entity
ARG 3 sound
ARG 4 category
Expand Down Expand Up @@ -342,9 +350,10 @@ CLASS net/minecraft/class_1937 net/minecraft/world/World
ARG 2 block
METHOD method_8458 isSavingDisabled ()Z
METHOD method_8465 playSound (Lnet/minecraft/class_1657;DDDLnet/minecraft/class_6880;Lnet/minecraft/class_3419;FFJ)V
COMMENT Plays a sound caused by a source. On the client, the sound will only play if the source is the same as the client's player.
COMMENT On the server, sound packets will be sent to players around the source, excluding the source itself.
ARG 1 source
COMMENT the player that caused the sound and therefore plays the sound directly in
COMMENT the client, or {@code null}
COMMENT the player that caused this sound, or {@code null}
ARG 2 x
ARG 4 y
ARG 6 z
Expand All @@ -353,7 +362,11 @@ CLASS net/minecraft/class_1937 net/minecraft/world/World
ARG 10 volume
ARG 11 pitch
ARG 12 seed
METHOD method_8466 addParticle (Lnet/minecraft/class_2394;ZZDDDDDD)V
METHOD method_8466 addParticleClient (Lnet/minecraft/class_2394;ZZDDDDDD)V
COMMENT Adds a particle to the client's world renderer.
COMMENT Does nothing on the server.
COMMENT
COMMENT @see ServerWorld#spawnParticles
ARG 1 parameters
ARG 2 force
ARG 3 canSpawnOnMinimal
Expand All @@ -379,7 +392,7 @@ CLASS net/minecraft/class_1937 net/minecraft/world/World
ARG 1 pos
METHOD method_8478 getThunderGradient (F)F
ARG 1 delta
METHOD method_8486 playSound (DDDLnet/minecraft/class_3414;Lnet/minecraft/class_3419;FFZ)V
METHOD method_8486 playSoundClient (DDDLnet/minecraft/class_3414;Lnet/minecraft/class_3419;FFZ)V
ARG 1 x
ARG 3 y
ARG 5 z
Expand All @@ -396,7 +409,11 @@ CLASS net/minecraft/class_1937 net/minecraft/world/World
ARG 1 pos
ARG 2 sourceBlock
ARG 3 orientation
METHOD method_8494 addImportantParticle (Lnet/minecraft/class_2394;DDDDDD)V
METHOD method_8494 addImportantParticleClient (Lnet/minecraft/class_2394;DDDDDD)V
COMMENT Adds an important particle to the client's world renderer. Important particles get added even if the Particles graphics option is set to Minimal
COMMENT Does nothing on the server.
COMMENT
COMMENT @see ServerWorld#spawnParticles
ARG 1 parameters
ARG 2 x
ARG 4 y
Expand Down
6 changes: 5 additions & 1 deletion mappings/net/minecraft/world/WorldAccess.mapping
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,11 @@ CLASS net/minecraft/class_1936 net/minecraft/world/WorldAccess
METHOD method_8401 getLevelProperties ()Lnet/minecraft/class_5217;
METHOD method_8404 getLocalDifficulty (Lnet/minecraft/class_2338;)Lnet/minecraft/class_1266;
ARG 1 pos
METHOD method_8406 addParticle (Lnet/minecraft/class_2394;DDDDDD)V
METHOD method_8406 addParticleClient (Lnet/minecraft/class_2394;DDDDDD)V
COMMENT Adds a particle to the client's world renderer.
COMMENT Does nothing on the server.
COMMENT
COMMENT @see ServerWorld#spawnParticles
ARG 1 parameters
ARG 2 x
ARG 4 y
Expand Down