text stringlengths 0 14.1k |
|---|
chunk.SetBiome(x, z, biome) |
if newB := chunk.GetBiome(x, z); newB != biome { |
t.Errorf(""error setting biome at co-ordinates, expecting %q, got %q"", biome.String(), newB.String()) |
} |
} |
} |
} |
} |
func TestBlock(t *testing.T) { |
chunk, _ := newChunk(0, 0, nbt.Tag{}) |
testBlocks := []struct { |
Block |
x, y, z int32 |
recheck bool |
}{ |
//Test simple set |
{ |
Block{ |
ID: 12, |
}, |
0, 0, 0, |
true, |
}, |
//Test higher ids |
{ |
Block{ |
ID: 853, |
}, |
1, 0, 0, |
true, |
}, |
{ |
Block{ |
ID: 463, |
}, |
2, 0, 0, |
true, |
}, |
{ |
Block{ |
ID: 1001, |
}, |
3, 0, 0, |
true, |
}, |
//Test data set |
{ |
Block{ |
ID: 143, |
Data: 12, |
}, |
0, 1, 0, |
true, |
}, |
{ |
Block{ |
ID: 153, |
Data: 4, |
}, |
1, 1, 0, |
true, |
}, |
{ |
Block{ |
ID: 163, |
Data: 5, |
}, |
2, 1, 0, |
true, |
}, |
//Test metadata [un]set |
{ |
Block{ |
metadata: nbt.Compound{ |
nbt.NewTag(""testInt2"", nbt.Int(1743)), |
nbt.NewTag(""testString2"", nbt.String(""world"")), |
}, |
}, |
0, 0, 1, |
true, |
}, |
{ |
Block{ |
metadata: nbt.Compound{ |
nbt.NewTag(""testInt"", nbt.Int(15)), |
nbt.NewTag(""testString"", nbt.String(""hello"")), |
}, |
}, |
1, 0, 1, |
false, |
}, |
{ |
Block{}, |
1, 0, 1, |
true, |
}, |
//Test tick [un]set |
{ |
Block{ |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.