mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-17 03:15:35 -04:00
registry tests: 1.8.9 and 1.12.2 entity data
This commit is contained in:
parent
68d855041d
commit
9e995d08b9
@ -13,7 +13,19 @@
|
||||
|
||||
package de.bixilon.minosoft.data.registries.versions.registries.legacy
|
||||
|
||||
import de.bixilon.minosoft.data.entities.entities.Entity
|
||||
import de.bixilon.minosoft.data.entities.entities.item.ItemEntity
|
||||
import de.bixilon.minosoft.data.entities.entities.player.PlayerEntity
|
||||
import org.testng.Assert.assertEquals
|
||||
import org.testng.annotations.Test
|
||||
|
||||
@Test(groups = ["pixlyzer"], dependsOnGroups = ["version"], priority = Int.MAX_VALUE, timeOut = 15000L)
|
||||
class `1_12_2` : LegacyLoadingTest("1.12.2")
|
||||
class `1_12_2` : LegacyLoadingTest("1.12.2") {
|
||||
|
||||
fun `entity data`() {
|
||||
assertEquals(registries.getEntityDataIndex(Entity.FLAGS_DATA), 0)
|
||||
assertEquals(registries.getEntityDataIndex(ItemEntity.ITEM_DATA), 6)
|
||||
assertEquals(registries.getEntityDataIndex(PlayerEntity.SKIN_PARTS_DATA), 13)
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -13,7 +13,18 @@
|
||||
|
||||
package de.bixilon.minosoft.data.registries.versions.registries.legacy
|
||||
|
||||
import de.bixilon.minosoft.data.entities.entities.Entity
|
||||
import de.bixilon.minosoft.data.entities.entities.item.ItemEntity
|
||||
import de.bixilon.minosoft.data.entities.entities.player.PlayerEntity
|
||||
import org.testng.Assert.assertEquals
|
||||
import org.testng.annotations.Test
|
||||
|
||||
@Test(groups = ["pixlyzer"], dependsOnGroups = ["version"], priority = Int.MAX_VALUE, timeOut = 15000L)
|
||||
class `1_8_9` : LegacyLoadingTest("1.8.9")
|
||||
class `1_8_9` : LegacyLoadingTest("1.8.9") {
|
||||
|
||||
fun `entity data`() {
|
||||
assertEquals(registries.getEntityDataIndex(Entity.FLAGS_DATA), 0)
|
||||
assertEquals(registries.getEntityDataIndex(ItemEntity.ITEM_DATA), 10)
|
||||
assertEquals(registries.getEntityDataIndex(PlayerEntity.SKIN_PARTS_DATA), 10)
|
||||
}
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ class ItemEntity(connection: PlayConnection, entityType: EntityType, data: Entit
|
||||
|
||||
companion object : EntityFactory<ItemEntity> {
|
||||
override val identifier: ResourceLocation = minecraft("item")
|
||||
private val ITEM_DATA = EntityDataField("ITEM_ITEM")
|
||||
val ITEM_DATA = EntityDataField("ITEM_ITEM")
|
||||
|
||||
override fun build(connection: PlayConnection, entityType: EntityType, data: EntityData, position: Vec3d, rotation: EntityRotation): ItemEntity {
|
||||
return ItemEntity(connection, entityType, data, position, rotation)
|
||||
|
@ -169,7 +169,7 @@ abstract class PlayerEntity(
|
||||
|
||||
private val ABSORPTION_HEARTS_DATA = EntityDataField("PLAYER_ABSORPTION_HEARTS")
|
||||
private val SCORE_DATA = EntityDataField("PLAYER_SCORE")
|
||||
private val SKIN_PARTS_DATA = EntityDataField("PLAYER_SKIN_PARTS_FLAGS")
|
||||
val SKIN_PARTS_DATA = EntityDataField("PLAYER_SKIN_PARTS_FLAGS")
|
||||
private val MAIN_ARM_DATA = EntityDataField("PLAYER_SKIN_MAIN_HAND")
|
||||
private val LEFT_SHOULDER_DATA_DATA = EntityDataField("PLAYER_LEFT_SHOULDER_DATA")
|
||||
private val RIGHT_SHOULDER_DATA_DATA = EntityDataField("PLAYER_RIGHT_SHOULDER_DATA")
|
||||
|
Loading…
x
Reference in New Issue
Block a user