mirror of
https://github.com/Theta-Dev/ConstructionWand.git
synced 2025-09-14 13:47:17 +02:00
22 lines
726 B
Java
22 lines
726 B
Java
package thetadev.constructionwand.basics;
|
|
|
|
import net.minecraft.stats.IStatFormatter;
|
|
import net.minecraft.stats.Stats;
|
|
import net.minecraft.util.ResourceLocation;
|
|
import net.minecraft.util.registry.Registry;
|
|
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, IStatFormatter.DEFAULT);
|
|
}
|
|
}
|