Skip to content

Instantly share code, notes, and snippets.

View Technici4n's full-sized avatar

Technici4n Technici4n

View GitHub Profile
@Technici4n
Technici4n / README.md
Last active December 16, 2023 18:27
Renaming script for the class renames introduced in the 20.2 NeoForge release

Remapping script for 20.2 NeoForge renames

This script only works for Java source code. If you use another language, you will have to apply the renames manually. You can find a list of the renames in the following document: https://hackmd.io/@neoforged/rJtC7ucZT.

If you have coremods or service resources, you have to rename them manually.

Here is how to run the script:

  1. Make sure you did not update to 20.2 yet. The script only works if your workspace is already working and compiling. You can use it on a 1.20.1 Forge workspace for example.
  2. Add the following line in your build.gradle file, right below the plugins block:

Louise Labé (1526 - 1565)

  • Je vis, je meurs: l'amour fait tourner en rond.

Pierre de Ronsard (1524 - 1585)

  • Mignonne, allons voir si la rose: la beauté ne dure qu'un temps, très vieux français.
  • Quand vous serez bien vieille: la beauté ne dure qu'un temps, vieux français.
  • Je vous envoie un bouquet que ma main: la beauté ne dure qu'un temps, vieux français.

Joachim du Bellay (1522 - 1560)

  • Nouveau venu, qui cherches Rome en Rome

Tristan L’Hermite (1601 - 1655)

  • Le navire
#include <bits/stdc++.h>
using namespace std;
#define D(x) (cout << #x << ": " << x << endl)
template<typename T>
ostream& operator<<(ostream& os, const vector<T>& v)
{
os << '{';
for(const T& t : v)
int n;
string buff;
int main()
{
int cases;
// Read cases
cin >> cases;
while(cases--)
{
struct UnionFind
{
vector<int> p;
vector<int> ranks;
UnionFind(int n) : p(n), ranks(n, 0)
{
for(int i = 0; i < n; ++i)
p[i] = i;
}