Skip to content

Commit 52ab132

Browse files
committed
Remove TODO from runCommandFunction profiler change. Adds Differs annotations to other NMS changes from 1.21.1
1 parent 4e16bd4 commit 52ab132

File tree

1 file changed

+4
-2
lines changed
  • commandapi-platforms/commandapi-bukkit/commandapi-bukkit-nms/commandapi-bukkit-1.21.2/src/main/java/dev/jorel/commandapi/nms

1 file changed

+4
-2
lines changed

commandapi-platforms/commandapi-bukkit/commandapi-bukkit-nms/commandapi-bukkit-1.21.2/src/main/java/dev/jorel/commandapi/nms/NMS_1_21_R2.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,7 @@ private static NamespacedKey fromResourceLocation(ResourceLocation key) {
250250
return NamespacedKey.fromString(key.getNamespace() + ":" + key.getPath());
251251
}
252252

253+
@Differs(from = "1.21.1", by = "New advancement argument implementation")
253254
@Override
254255
public ArgumentType<?> _ArgumentAdvancement() {
255256
return ResourceKeyArgument.key(Registries.ADVANCEMENT);
@@ -301,6 +302,7 @@ public final ArgumentType<?> _ArgumentParticle() {
301302
return ParticleArgument.particle(COMMAND_BUILD_CONTEXT);
302303
}
303304

305+
@Differs(from = "1.21.1", by = "New recipe argument implementation")
304306
@Override
305307
public ArgumentType<?> _ArgumentRecipe() {
306308
return ResourceKeyArgument.key(Registries.RECIPE);
@@ -354,10 +356,10 @@ public final String convert(ParticleData<?> particle) {
354356
* @param css the command source stack to execute this command
355357
* @return the result of our function. This is either 0 is the command failed, or greater than 0 if the command succeeded
356358
*/
359+
@Differs(from = "1.21.1", by = "Use Profiler.get() instead of MinecraftServer.getProfiler()")
357360
private final int runCommandFunction(CommandFunction<CommandSourceStack> commandFunction, CommandSourceStack css) {
358361
// Profile the function. We want to simulate the execution sequence exactly
359-
// ProfilerFiller profiler = this.<MinecraftServer>getMinecraftServer().getProfiler();
360-
ProfilerFiller profiler = Profiler.get(); // TODO ?
362+
ProfilerFiller profiler = Profiler.get();
361363
profiler.push(() -> "function " + commandFunction.id());
362364

363365
// Store our function result

0 commit comments

Comments
 (0)