public class TutorialDataComponentTypes { public static final ComponentType NUMBER = register("number", builder -> builder .codec(Codec.INT) .packetCodec(PacketCodecs.INTEGER)); public static ComponentType register(String path, UnaryOperator> builderOperator) { return Registry.register(Registries.DATA_COMPONENT_TYPE, Identifier.of("tutorial", path), builderOperator.apply(ComponentType.builder()).build()); } public static void initialize() { } }