mirror of
https://github.com/Theta-Dev/ConstructionWand.git
synced 2025-08-05 02:15:27 +02:00
22 lines
759 B
Java
22 lines
759 B
Java
package thetadev.constructionwand.basics;
|
|
|
|
import net.minecraft.core.Registry;
|
|
import net.minecraft.resources.ResourceLocation;
|
|
import net.minecraft.stats.StatFormatter;
|
|
import net.minecraft.stats.Stats;
|
|
import thetadev.constructionwand.ConstructionWand;
|
|
|
|
public class ModStats
|
|
{
|
|
public static final ResourceLocation USE_WAND = new ResourceLocation(ConstructionWand.MODID, "use_wand");
|
|
|
|
public static void register() {
|
|
registerStat(USE_WAND);
|
|
}
|
|
|
|
private static void registerStat(ResourceLocation registryName) {
|
|
// Compare with net.minecraft.stats.Stats#registerCustom
|
|
Registry.register(Registry.CUSTOM_STAT, registryName.getPath(), registryName);
|
|
Stats.CUSTOM.get(registryName, StatFormatter.DEFAULT);
|
|
}
|
|
}
|