mirror of
https://github.com/Bixilon/Minosoft.git
synced 2026-12-06 16:28:20 +00:00
registries: default to flattened
This commit is contained in:
3 files changed
+4
-4
No files matched your search
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Minosoft
|
||||
* Copyright (C) 2020-2023 Moritz Zwerger
|
||||
* Copyright (C) 2020-2025 Moritz Zwerger
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
@@ -40,7 +40,7 @@ import it.unimi.dsi.fastutil.objects.ObjectOpenHashSet
|
||||
|
||||
class BlockRegistry(
|
||||
parent: Registry<Block>? = null,
|
||||
flattened: Boolean = false,
|
||||
flattened: Boolean = true,
|
||||
) : Registry<Block>(parent = parent, codec = PixLyzerBlock, flattened = flattened, metaType = MetaTypes.BLOCK) {
|
||||
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ import de.bixilon.minosoft.protocol.protocol.ProtocolDefinition
|
||||
|
||||
class ItemRegistry(
|
||||
parent: Registry<Item>? = null,
|
||||
flattened: Boolean = false,
|
||||
flattened: Boolean = true,
|
||||
) : Registry<Item>(parent = parent, codec = PixLyzerItem, integrated = ItemFactories, flattened = flattened, metaType = MetaTypes.ITEM) {
|
||||
|
||||
override fun getOrNull(id: Int): Item? {
|
||||
|
||||
@@ -34,7 +34,7 @@ open class Registry<T : RegistryItem>(
|
||||
val codec: IdentifierCodec<T>? = null,
|
||||
val integrated: IntegratedRegistry<T>? = null,
|
||||
val metaType: MetaTypes = MetaTypes.NONE,
|
||||
var flattened: Boolean = false,
|
||||
var flattened: Boolean = true,
|
||||
private val fixer: ResourceLocationFixer? = null,
|
||||
) : AbstractRegistry<T> {
|
||||
protected val idValueMap: Int2ObjectOpenHashMap<T> = Int2ObjectOpenHashMap()
|
||||
|
||||
Reference in new issue
Block a user