Skip to content

Instantly share code, notes, and snippets.

View vearendev's full-sized avatar
🍪
epic

vearen vearendev

🍪
epic
View GitHub Profile
package net.hollowcube.mapmaker.map.item.vanilla;
import net.hollowcube.common.util.BlockUtil;
import net.hollowcube.mapmaker.map.item.handler.ItemHandler;
import net.hollowcube.mapmaker.map.util.GenericTempActionBarProvider;
import net.hollowcube.mapmaker.to_be_refactored.ActionBar;
import net.minestom.server.entity.Player;
import net.minestom.server.instance.block.Block;
import net.minestom.server.item.Material;
import net.minestom.server.tag.Tag;
@cosrnic
cosrnic / custom-player-nametags-minestom.md
Last active September 15, 2025 07:37
Minestom Custom Entity Names

Minestom Custom Nametags


Credits to Owen1212055 for their NMS guide, please read it as this is just a simple port!

The NameTagEntity Class

public class NametagEntity extends Entity {

    public static final Tag<NametagEntity> NAMETAG_TAG = Tag.Transient("nametag"); // for deleting the entity on leave
@Minikloon
Minikloon / Instructions.md
Created July 7, 2024 11:03
Minecraft Player Nametags with Custom RGB.

Preview

-Naive solution:
  1. Create a team, set its prefix or suffix to the component you want.
  2. In the PlayerInfoUpdatePacket, set the Username to ""
  3. Add "" to the team.

The player entity on the client stores the username from the player list entry with a matching UUID.

package net.hollowcube.mapmaker.map.entity.impl;
import net.hollowcube.mapmaker.map.entity.MapEntity;
import net.hollowcube.mapmaker.map.util.NbtUtil;
import net.kyori.adventure.nbt.*;
import net.kyori.adventure.text.serializer.gson.GsonComponentSerializer;
import net.minestom.server.coordinate.Vec;
import net.minestom.server.entity.EntityType;
import net.minestom.server.entity.metadata.display.AbstractDisplayMeta;
import net.minestom.server.entity.metadata.display.BlockDisplayMeta;
package net.minestom.server.instance;
import it.unimi.dsi.fastutil.ints.Int2ObjectArrayMap;
import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
import it.unimi.dsi.fastutil.ints.IntIntImmutablePair;
import net.minestom.server.MinecraftServer;
import net.minestom.server.instance.block.Block;
import net.minestom.server.instance.block.BlockHandler;
import net.minestom.server.instance.palette.Palette;
import net.minestom.server.utils.NamespaceID;
@HSGamer
HSGamer / PerInstanceInstanceViewHook.java
Last active August 20, 2024 20:23
Minestom - Per-Instance Tablist
import net.minestom.server.MinecraftServer;
import net.minestom.server.entity.Player;
import net.minestom.server.entity.PlayerSkin;
import net.minestom.server.event.Event;
import net.minestom.server.event.EventNode;
import net.minestom.server.event.instance.RemoveEntityFromInstanceEvent;
import net.minestom.server.event.player.PlayerSpawnEvent;
import net.minestom.server.instance.Instance;
import net.minestom.server.network.packet.server.play.PlayerInfoPacket;
import net.minestom.server.tag.Tag;
@SupaHam
SupaHam / mongo_registry.go
Created November 6, 2020 23:17
mongo-go-driver UUID decoder & encoder for Golang
// This is a value (de|en)coder for the github.com/google/uuid UUID type. For best experience, register
// mongoRegistry to mongo client instance via options, e.g.
// clientOptions := options.Client().SetRegistry(mongoRegistry)
//
// Only BSON binary subtype 0x04 is supported.
//
// Use as you please
package repository
import (