Skip to content
StavWasPlayZ edited this page Sep 15, 2023 · 16 revisions

ko-fi

Wiki Version Support: v3.2

Downgraded versions may have different API implementations. It is always recommended to stay updated to the latest release.

However, you can always reference any version's code via their respected branch tag.

Genshin Instruments Documentations

Genshin Instruments is a Forge and Fabric mod that brings in Genshin Impact's set of instruments into your Minecraft worlds!

For full documentation of gameplay, visit the curseforge page.
For a tutorial on playing the instruments, check out this neat tutorial.

Otherwise, if you choose to stay here, it means you might be interested in some more technicalities; so let's get technical, shall we?

Find out everything about the mod's API in the sidebar to your right!

Quick Note

This is my first ever mod and API (and its README) I ever publicly do. So, just expect some quirky stuff here and there..-

I'll try my best to stay on-point, though.

Regarding Server and Client

The instrument is built on 2 parts:

  1. the client is responsible for having an instrument screen. When the player plays a sound, it will produce a sound for themselves locally, while sending an InstrumentPackets to the server - passing in their NoteSound object.
  2. The server is responsible for handling said InstrumentPacketss. It will play all the stuff as described by the NoteSound object to each individual client within a range of 16 blocks by sending them a PlayNotePacket.
    It is done like so because each client can request to play a different type instance of a note's sound, as described in the instrument's "Instrument Audio Channel Type" setting.

I just thought it's worth noting, so here it is.