it: load latest pixlyzer data, fix loading of 1.19.3-pre1

This commit is contained in:
Bixilon 2022-11-23 15:22:04 +01:00
parent a18c80284d
commit 1510ec622d
No known key found for this signature in database
GPG Key ID: 5CAD791931B09AC4
5 changed files with 43 additions and 3 deletions

View File

@ -16,6 +16,7 @@ package de.bixilon.minosoft.data.registries.versions
import de.bixilon.minosoft.data.entities.entities.monster.Zombie
import de.bixilon.minosoft.data.registries.blocks.MinecraftBlocks
import de.bixilon.minosoft.data.registries.item.MinecraftItems
import de.bixilon.minosoft.protocol.protocol.VersionSupport
import de.bixilon.minosoft.test.ITUtil
import org.testng.Assert
import org.testng.annotations.Test
@ -88,8 +89,14 @@ class PixLyzerLoadingTest {
ITUtil.loadPixlyzerData("1.19").test()
}
@Test(enabled = false) // already loaded in setup
fun `1_19_2`() {
ITUtil.loadPixlyzerData("1.19.2").test()
}
fun latest() {
val version = Versions.getById(VersionSupport.LATEST_VERSION)!!
println("Latest version $version")
ITUtil.loadPixlyzerData(version)
version.test()
}
}

View File

@ -31,6 +31,10 @@ object ITUtil {
fun loadPixlyzerData(name: String): Version {
val version = Versions[name]!!
if (version.registries != null) {
// already loaded
return version
}
loadPixlyzerData(version)
return version

View File

@ -123,6 +123,13 @@ enum class BlockProperties {
BOOKS_STORED("books_stored", IntBlockPropertiesSerializer),
LAST_INTERACTION_BOOK_SLOT("last_interaction_book_slot", IntBlockPropertiesSerializer),
BOOK_SLOT_OCCUPIED_0("slot_0_occupied", BooleanBlockPropertiesSerializer),
BOOK_SLOT_OCCUPIED_1("slot_1_occupied", BooleanBlockPropertiesSerializer),
BOOK_SLOT_OCCUPIED_2("slot_2_occupied", BooleanBlockPropertiesSerializer),
BOOK_SLOT_OCCUPIED_3("slot_3_occupied", BooleanBlockPropertiesSerializer),
BOOK_SLOT_OCCUPIED_4("slot_4_occupied", BooleanBlockPropertiesSerializer),
BOOK_SLOT_OCCUPIED_5("slot_5_occupied", BooleanBlockPropertiesSerializer),
;
val group: String

View File

@ -478,6 +478,4 @@ object ProtocolVersions {
const val V_13W43A = 2
const val V_13W42B = 1
const val V_13W41B = 0
const val LOWEST_VERSION_SUPPORTED = V_13W41B
}

View File

@ -0,0 +1,24 @@
/*
* Minosoft
* Copyright (C) 2020-2022 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.
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
*
* This software is not affiliated with Mojang AB, the original developer of Minecraft.
*/
package de.bixilon.minosoft.protocol.protocol
import de.bixilon.minosoft.protocol.protocol.ProtocolVersions.V_13W41B
import de.bixilon.minosoft.protocol.protocol.ProtocolVersions.V_1_19_2
import de.bixilon.minosoft.protocol.protocol.ProtocolVersions.V_1_19_3_PRE1
object VersionSupport {
const val MINIMUM_VERSION = V_13W41B
const val LATEST_VERSION = V_1_19_3_PRE1
const val LATEST_RELEASE = V_1_19_2
}