Class CompositeCodecs.CompositeCodec2<O,A,B>

java.lang.Object
team.lodestar.lodestone.systems.command.CompositeCodecs.CompositeCodec2<O,A,B>
All Implemented Interfaces:
CommandCodec<O>
Enclosing class:
CompositeCodecs

public static class CompositeCodecs.CompositeCodec2<O,A,B> extends Object implements CommandCodec<O>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final CommandField<?,A>
     
    protected final CommandField<?,B>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    CompositeCodec2(CommandField<?,A> a, CommandField<?,B> b, BiFunction<A,B,O> constructor)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    com.mojang.brigadier.builder.ArgumentBuilder<net.minecraft.commands.CommandSourceStack,?>
    appendTo(com.mojang.brigadier.builder.ArgumentBuilder<net.minecraft.commands.CommandSourceStack,?> parent, BiFunction<net.minecraft.commands.CommandSourceStack,O,Integer> onExecute)
    Appends required arguments to a parent node and adds executes() at the end.
    decode(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx)
    Used to extract values from ctx and produce the instance at the very end :3

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

  • Method Details

    • decode

      public O decode(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx)
      Description copied from interface: CommandCodec
      Used to extract values from ctx and produce the instance at the very end :3
      Specified by:
      decode in interface CommandCodec<O>
    • appendTo

      public com.mojang.brigadier.builder.ArgumentBuilder<net.minecraft.commands.CommandSourceStack,?> appendTo(com.mojang.brigadier.builder.ArgumentBuilder<net.minecraft.commands.CommandSourceStack,?> parent, BiFunction<net.minecraft.commands.CommandSourceStack,O,Integer> onExecute)
      Description copied from interface: CommandCodec
      Appends required arguments to a parent node and adds executes() at the end.
      Specified by:
      appendTo in interface CommandCodec<O>