Back to mods
DGLAB Integration project artwork

CurseForge · Minecraft mod

DGLAB Integration

A mod connected Minecraft with DG-LAB

Choose a version Pick your version below, then grab the matching file.

Quick answer

Which DGLAB Integration release should I use?

Updated 1 year ago
Latest stable file DG-LAB x Minecraft v1.21.1-1.2.7
Game version 1.21.1
Loader NeoForge

DGLAB Integration DG-LAB x Minecraft v1.21.1-1.2.7 targets 1.21.1 with NeoForge. The project page does not say whether this file belongs on the client, dedicated server, or both. No extra mods listed for this file.

Where it goes

Is DGLAB Integration required on the client, server, or both?

The project page does not say whether this file belongs on the client, dedicated server, or both.

Client Source doesn’t say
Dedicated server Source doesn’t say
Loader for this release NeoForge
Required install it here Optional supported, not mandatory Not supported do not install here Source doesn’t say do not assume

The source does not explicitly classify this release as client-only or server-only.

What else does DGLAB Integration DG-LAB x Minecraft v1.21.1-1.2.7 need?

DG-LAB x Minecraft v1.21.1-1.2.7. Change the file and its required mods may change too.

No extra mods listed for this file

This file does not list any required mods. Do not add a library just because a different file uses it.

1 listed on this file 2 pulled in by those mods
KubeJS Optional for DGLAB Integration DG-LAB x Minecraft v1.21.1-1.2.7
optional
Matching file found Matched file: KubeJS NeoForge 2101.7.2-build.381
Better Advanced Tooltips Needed by KubeJS
pulled in
Matching file found Matched file: better-advanced-tooltips-2101.1.0-build.5.jar
Rhino Needed by KubeJS
pulled in
Matching file found Matched file: Rhino 2101.2.7-build.85

2 extra mods were pulled in by other dependencies. Indented rows show who needs each one. We only count dependency files that match this setup. A file for another loader does not fill the gap.

Before you install it

Add DGLAB Integration without breaking your instance.

Built for DGLAB Integration DG-LAB x Minecraft v1.21.1-1.2.7. Pick another file and the loader, install side or required mods may change.

  1. 01

    Stick to this file

    Use DG-LAB x Minecraft v1.21.1-1.2.7. It targets 1.21.1 with NeoForge; another release may have different loader, side or dependency requirements.

  2. 02

    Bring the mods it needs

    This file does not list any required mods. Do not add a library just because a different file uses it.

  3. 03

    Put it on the correct side

    The project page does not say whether this file belongs on the client, dedicated server, or both.

  4. 04

    Pick the file you checked

    Use the “Get this file” button beside DG-LAB x Minecraft v1.21.1-1.2.7. It opens that exact file at the source.

About this project

What does DGLAB Integration add?

Minecraft-DG-LAB

A Mod to connect minecraft with DgLab

Usage

  1. Download this mod and kubejs, put them to mods folder, start the game.

  2. write kubejs scripts to control how the strength change

    this is example script

    // More event see https://wiki.latvian.dev/books/kubejs/page/list-of-events
    EntityEvents.death('player', event => {
        // use player uuid to find exist connection
        const connection = DgLabManager.getByUUID(event.getEntity().getUuid())
    
        // If this is not null, it means that the player's dglab has already been connected to the server
        if (connection != null) {
            // get the player current strength
            connection.getStrength().getACurrentStrength()
            connection.getStrength().getBCurrentStrength()
            connection.getStrength().getAMaxStrength()
            connection.getStrength().getBMaxStrength()
    
            // Add 10 strength to channel A
            connection.addStrength(ChannelType.A, 10)
        }
    })
    
    EntityEvents.afterHurt('player', event => {
        // use player uuid to find exist connection
        let connection = DgLabManager.getByUUID(event.getEntity().getUuid())
    
        // If this is not null, it means that the player's dglab has already been connected to the server
        if (connection != null) {
            let damage = event.getDamage()
            let strength = 0;
            if (damage >= 20) {
                strength = 100
            } else {
                strength = Math.ceil((damage / 20) * 100)
            }
            // use DgLabPulseUtil.pulse(int...) to convent pulse data
            // the method parameter is frequency and strength alternation, Each segment contains 25ms of data
            // The frequency ranges from 10-1000 and the strength ranges from 0-100
            // ex. DgLabPulseUtil.pulse(500, 10, 500, 50) 
            // These are two small segments, 500 frequency, 10 strength and 500 frequency, 50 strength
            let pulse = DgLabPulseUtil.pulse(
                500, 0,
                500, 0,
                500, 0,
                500, 0,
                500, Math.ceil(strength / 3),
                500, Math.ceil(strength / 3),
                500, Math.ceil(strength / 3),
                500, Math.ceil(strength / 3),
                500, Math.ceil((strength / 3) * 2),
                500, Math.ceil((strength / 3) * 2),
                500, Math.ceil((strength / 3) * 2),
                500, Math.ceil((strength / 3) * 2),
                500, Math.ceil(strength),
                500, Math.ceil(strength),
                500, Math.ceil(strength),
                500, Math.ceil(strength),
                500, Math.ceil((strength / 3) * 2),
                500, Math.ceil((strength / 3) * 2),
                500, Math.ceil((strength / 3) * 2),
                500, Math.ceil((strength / 3) * 2),
                500, Math.ceil(strength / 3),
                500, Math.ceil(strength / 3),
                500, Math.ceil(strength / 3),
                500, Math.ceil(strength / 3),
                500, 0,
                500, 0,
                500, 0,
                500, 0
            )
    
            // addPulse methon to add your pulse to channel A
            connection.addPulse('a', pulse)
        }
    })
    

    the example script run when player death, that means when player dead, will add 10 strength to channel A.

    And after the player receives damage, the maximum strength will be calculated based on the damage received, generating a gradually increasing and decreasing waveform that occurs in channel A.

  3. in game use command /dglab connect, you will get a link with QR code, and scan it in app, will connect to the game.

Configuration

you can see the config file in .minecraft/config/dglab.yml, when you first start game will generate this file.

  • address (String)
    • A String to set the ws address, if your computer and your phone installed DG-LAB in same LAN, can set it to 192.168.xx.xx that your computer ip address
  • port (int)
    • the port to create ws server, and DG-LAB app will connect it.

Project description from CurseForge.

Pick your setup

DGLAB Integration by Minecraft version and loader

Choose the version and loader you play, then open the matching release.

4 available setups

Check the dependencies, then try the file in a copied instance before changing a world you care about.

Recent files

DGLAB Integration versions and loaders

10 of 10 releases match

Looking for an older file? The official CurseForge project page is in Resources.