diff --git a/gradle.properties b/gradle.properties index 1681761..eb3fe40 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,14 +2,14 @@ org.gradle.jvmargs=-Xmx2G # Fabric Properties # check these on https://modmuss50.me/fabric.html -minecraft_version=1.19 -yarn_mappings=1.19+build.4 -loader_version=0.14.8 +minecraft_version=1.19.3 +yarn_mappings=1.19.3+build.5 +loader_version=0.14.13 # Mod Properties mod_version=1.0.8 maven_group=ru.ruscalworld archives_base_name=fabricexporter # Dependencies # check this on https://modmuss50.me/fabric.html -fabric_version=0.57.0+1.19 +fabric_version=0.73.0+1.19.3 prometheus_version=0.16.0 diff --git a/src/main/java/ru/ruscalworld/fabricexporter/metrics/Entities.java b/src/main/java/ru/ruscalworld/fabricexporter/metrics/Entities.java index 748c589..10464c0 100644 --- a/src/main/java/ru/ruscalworld/fabricexporter/metrics/Entities.java +++ b/src/main/java/ru/ruscalworld/fabricexporter/metrics/Entities.java @@ -2,10 +2,10 @@ package ru.ruscalworld.fabricexporter.metrics; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityType; +import net.minecraft.registry.Registries; import net.minecraft.server.world.ServerWorld; import net.minecraft.util.Identifier; import net.minecraft.util.TypeFilter; -import net.minecraft.util.registry.Registry; import ru.ruscalworld.fabricexporter.FabricExporter; import ru.ruscalworld.fabricexporter.util.TextUtil; @@ -35,14 +35,14 @@ public class Entities extends Metric { HashMap currentWorldEntities = new HashMap<>(); world.getEntitiesByType(ENTITY_FILTER, (entity) -> true).forEach(entity -> { - String name = Registry.ENTITY_TYPE.getId(entity.getType()).getPath(); + String name = Registries.ENTITY_TYPE.getId(entity.getType()).getPath(); Integer typeCount = currentWorldEntities.getOrDefault(name, 0); currentWorldEntities.put(name, typeCount + 1); }); for (String type : currentWorldEntities.keySet()) { Integer count = currentWorldEntities.get(type); - EntityType entityType = Registry.ENTITY_TYPE.get(new Identifier(type)); + EntityType entityType = Registries.ENTITY_TYPE.get(new Identifier(type)); this.getGauge().labels(TextUtil.getWorldName(world), entityType.getSpawnGroup().getName(), type).set(count); } } diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 7ebef3d..05c0a05 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -21,7 +21,8 @@ "fabricexporter.mixins.json" ], "depends": { - "fabricloader": ">=0.11.3", + "fabricloader": ">=0.14.13", + "minecraft": ">=1.19.3", "fabric": "*" }, "recommends": {