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
|
org.gradle.jvmargs=-Xmx2G
|
||||||
# Fabric Properties
|
# Fabric Properties
|
||||||
# check these on https://modmuss50.me/fabric.html
|
# check these on https://modmuss50.me/fabric.html
|
||||||
minecraft_version=1.19
|
minecraft_version=1.19.3
|
||||||
yarn_mappings=1.19+build.4
|
yarn_mappings=1.19.3+build.5
|
||||||
loader_version=0.14.8
|
loader_version=0.14.13
|
||||||
# Mod Properties
|
# Mod Properties
|
||||||
mod_version=1.0.8
|
mod_version=1.0.8
|
||||||
maven_group=ru.ruscalworld
|
maven_group=ru.ruscalworld
|
||||||
archives_base_name=fabricexporter
|
archives_base_name=fabricexporter
|
||||||
# Dependencies
|
# Dependencies
|
||||||
# check this on https://modmuss50.me/fabric.html
|
# 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
|
prometheus_version=0.16.0
|
||||||
|
|
|
@ -2,10 +2,10 @@ package ru.ruscalworld.fabricexporter.metrics;
|
||||||
|
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.entity.EntityType;
|
import net.minecraft.entity.EntityType;
|
||||||
|
import net.minecraft.registry.Registries;
|
||||||
import net.minecraft.server.world.ServerWorld;
|
import net.minecraft.server.world.ServerWorld;
|
||||||
import net.minecraft.util.Identifier;
|
import net.minecraft.util.Identifier;
|
||||||
import net.minecraft.util.TypeFilter;
|
import net.minecraft.util.TypeFilter;
|
||||||
import net.minecraft.util.registry.Registry;
|
|
||||||
import ru.ruscalworld.fabricexporter.FabricExporter;
|
import ru.ruscalworld.fabricexporter.FabricExporter;
|
||||||
import ru.ruscalworld.fabricexporter.util.TextUtil;
|
import ru.ruscalworld.fabricexporter.util.TextUtil;
|
||||||
|
|
||||||
|
@ -35,14 +35,14 @@ public class Entities extends Metric {
|
||||||
HashMap<String, Integer> currentWorldEntities = new HashMap<>();
|
HashMap<String, Integer> currentWorldEntities = new HashMap<>();
|
||||||
|
|
||||||
world.getEntitiesByType(ENTITY_FILTER, (entity) -> true).forEach(entity -> {
|
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);
|
Integer typeCount = currentWorldEntities.getOrDefault(name, 0);
|
||||||
currentWorldEntities.put(name, typeCount + 1);
|
currentWorldEntities.put(name, typeCount + 1);
|
||||||
});
|
});
|
||||||
|
|
||||||
for (String type : currentWorldEntities.keySet()) {
|
for (String type : currentWorldEntities.keySet()) {
|
||||||
Integer count = currentWorldEntities.get(type);
|
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);
|
this.getGauge().labels(TextUtil.getWorldName(world), entityType.getSpawnGroup().getName(), type).set(count);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,7 +21,8 @@
|
||||||
"fabricexporter.mixins.json"
|
"fabricexporter.mixins.json"
|
||||||
],
|
],
|
||||||
"depends": {
|
"depends": {
|
||||||
"fabricloader": ">=0.11.3",
|
"fabricloader": ">=0.14.13",
|
||||||
|
"minecraft": ">=1.19.3",
|
||||||
"fabric": "*"
|
"fabric": "*"
|
||||||
},
|
},
|
||||||
"recommends": {
|
"recommends": {
|
||||||
|
|
Loading…
Reference in a new issue