You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: source/platform/fabric.rst
+10-10Lines changed: 10 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -66,7 +66,7 @@ First, add the repository:
66
66
:substitutions:
67
67
68
68
dependencies {
69
-
modImplementation include("net.kyori:adventure-platform-fabric:|mod_version|") // for Minecraft 1.21.2-1.21.4
69
+
modImplementation include("net.kyori:adventure-platform-fabric:|mod_version|") // for Minecraft 1.21.5
70
70
}
71
71
72
72
@@ -77,7 +77,7 @@ First, add the repository:
77
77
:substitutions:
78
78
79
79
dependencies {
80
-
modImplementation(include("net.kyori:adventure-platform-fabric:|modversion|")!!) // for Minecraft 1.21.2-1.21.4
80
+
modImplementation(include("net.kyori:adventure-platform-fabric:|modversion|")!!) // for Minecraft 1.21.5
81
81
}
82
82
83
83
The Fabric platform requires *fabric-api-base* in order to provide the locale change event, *fabric-command-api-v2* for the callback click event, and can optionally use Colonel_ (or *fabric-networking-api-v1*) to allow the ``Component`` and ``Key`` argument types to be used on clients without the mod installed. There are no other dependencies.
@@ -165,7 +165,7 @@ For more complex use cases, :java:`FabricServerAudiences` or :java:`FabricClient
165
165
Server
166
166
------
167
167
168
-
The logical-server side of the Fabric platform can be accessed any time a server is available, through a ``FabricServerAudiences`` instance. By default, translatable components will be rendered with the global translator, but a custom renderer can be passed when initializing the platform.
168
+
The logical-server side of the Fabric platform can be accessed any time a server is available, through a ``MinecraftServerAudiences`` instance. By default, translatable components will be rendered with the global translator, but a custom renderer can be passed when initializing the platform.
169
169
170
170
All ``AudienceProvider`` interface methods are supported, except for the ``permission`` method. This will become supported as soon as Fabric gets a suitable permissions API.
171
171
@@ -174,11 +174,11 @@ To get started with Adventure, set up an audience provider like this:
Specialfor the Fabric platform, purely client-side operations are supported. The setup is less involved than it is for the server, since the client is a singleton, and there is only one subject that can be acted on: the client's player.
237
237
238
-
This means that for most users the ``FabricClientAudiences`` object can be treated as a singleton. The only exception is users using a custom renderer. This makes using Adventure audiences fairly simple, as this code example shows:
238
+
This means that for most users the ``MinecraftClientAudiences`` object can be treated as a singleton. The only exception is users using a custom renderer. This makes using Adventure audiences fairly simple, as this code example shows:
239
239
240
240
.. code:: java
241
241
242
242
void doThing() {
243
243
// Get the audience
244
-
final Audience client = FabricClientAudiences.of().audience();
244
+
final Audience client = MinecraftClientAudiences.of().audience();
245
245
246
246
// Do something. This will only work when the player is ingame.
0 commit comments