Implement multiplayer persistence and vanilla lighting
This commit is contained in:
parent
8f7cacf9d9
commit
cae06eb97e
47 changed files with 3784 additions and 465 deletions
25
internal/registry/entity_test.go
Normal file
25
internal/registry/entity_test.go
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
package registry
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestEntityTypeIndex(t *testing.T) {
|
||||
tests := map[string]int{
|
||||
"minecraft:pig": 100,
|
||||
"minecraft:player": 155,
|
||||
"minecraft:zombie": 150,
|
||||
}
|
||||
for name, want := range tests {
|
||||
if got := EntityTypeIndex(name); got != want {
|
||||
t.Fatalf("EntityTypeIndex(%q) = %d, want %d", name, got, want)
|
||||
}
|
||||
}
|
||||
if got := EntityTypeIndex("minecraft:not_a_real_entity"); got != -1 {
|
||||
t.Fatalf("unknown entity type = %d, want -1", got)
|
||||
}
|
||||
}
|
||||
|
||||
func TestEntityTypeIsNotSyncedRegistry(t *testing.T) {
|
||||
if got := Index("minecraft:entity_type", "minecraft:pig"); got != -1 {
|
||||
t.Fatalf("synced registry unexpectedly has entity_type pig = %d", got)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue