From ff5d5b12eb61997f84fbd250188cfcdfeaa055ee Mon Sep 17 00:00:00 2001 From: IchHabeHunger54 Date: Wed, 21 Feb 2024 16:32:56 +0100 Subject: [PATCH] add back int ID syncing, with a big disclaimer --- docs/concepts/registries.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/concepts/registries.md b/docs/concepts/registries.md index 266bd9597..24c143be3 100644 --- a/docs/concepts/registries.md +++ b/docs/concepts/registries.md @@ -149,6 +149,9 @@ Let's start by creating the [registry key][resourcekey] and the registry itself: // Of course, all mentions of spells can and should be replaced with whatever your registry actually is. public static final ResourceKey> SPELL_REGISTRY_KEY = ResourceKey.createRegistryKey(new ResourceLocation("yourmodid", "spells")); public static final Registry SPELL_REGISTRY = new RegistryBuilder<>(SPELL_REGISTRY_KEY) + // If you want to enable integer id syncing, for networking. + // Never use integer ids yourself, even if this is enabled! This is purely intended to reduce bandwidth. + .sync(true) // The default key. Similar to minecraft:air for blocks. This is optional. .defaultKey(new ResourceLocation("yourmodid", "empty")) // Effectively limits the max count. Generally discouraged, but may make sense in settings such as networking.