Migrate to Minecraft 1.19.3
This commit is contained in:
parent
cba601c709
commit
07e2f576d1
3 changed files with 9 additions and 8 deletions
|
@ -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
|
||||
|
|
|
@ -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<String, Integer> 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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,7 +21,8 @@
|
|||
"fabricexporter.mixins.json"
|
||||
],
|
||||
"depends": {
|
||||
"fabricloader": ">=0.11.3",
|
||||
"fabricloader": ">=0.14.13",
|
||||
"minecraft": ">=1.19.3",
|
||||
"fabric": "*"
|
||||
},
|
||||
"recommends": {
|
||||
|
|
Loading…
Reference in a new issue