Snowiiii 2024-11-06 20:50:52 +01:00
parent a1926ffea6
commit c470f94bc3
3 changed files with 10687 additions and 10677 deletions

View File

@ -34,7 +34,9 @@ and customizable experience. It prioritizes performance and player enjoyment whi
- [x] Configuration (toml)
- [x] Server Status/Ping
- [x] Login
- Login
- [x] Encryption
- [x] Packet Compression
- Player Configuration
- [x] Registries (biome types, paintings, dimensions)
- [x] Server Brand
@ -61,6 +63,13 @@ and customizable experience. It prioritizes performance and player enjoyment whi
- [x] Player Animation
- [x] Player Inventory
- [x] Player Combat
- Entities
- [x] Players
- [ ] Mobs
- [ ] Animals
- [ ] Entity AI
- [ ] Minecart
- [ ] Boss
- Server
- [ ] Plugins
- [x] Query

File diff suppressed because it is too large Load Diff

View File

@ -7,6 +7,7 @@ import com.mojang.serialization.JsonOps
import de.snowii.extractor.Extractor
import net.minecraft.component.ComponentMap
import net.minecraft.item.Item
import net.minecraft.registry.Registries
import net.minecraft.registry.RegistryKeys
import net.minecraft.registry.RegistryOps
import net.minecraft.server.MinecraftServer
@ -23,10 +24,10 @@ class Items : Extractor.Extractor {
for (item in server.registryManager.getOrThrow(RegistryKeys.ITEM).streamEntries().toList()) {
val itemJson = JsonObject()
itemJson.addProperty("id", item.key.orElseThrow().value.toString())
itemJson.addProperty("name", item.key.orElseThrow().value.toString())
val realItem: Item = item.value()
itemJson.addProperty("id", Registries.ITEM.getRawId(realItem))
itemJson.addProperty("name", Registries.ITEM.getId(realItem).toString())
itemJson.addProperty("translation_key", realItem.translationKey)
itemJson.addProperty("max_stack", realItem.maxCount)
itemJson.addProperty("max_durability", realItem.defaultStack.maxDamage)