internal static int ReserveBuffID()
{
if (ModNet.AllowVanillaClients) throw new Exception("Adding buffs breaks vanilla client compatiblity");
int reserveID = nextBuff;
nextBuff++;
return reserveID;
}
protected override sealed void Register() { ModTypeLookup <ModBuff> .Register(this); Type = BuffLoader.ReserveBuffID(); DisplayName = Mod.GetOrCreateTranslation($"Mods.{Mod.Name}.BuffName.{Name}"); Description = Mod.GetOrCreateTranslation($"Mods.{Mod.Name}.BuffDescription.{Name}"); BuffLoader.buffs.Add(this); }