コード例 #1
0
ファイル: indev.py プロジェクト: jocopa3/pymclevel
    def rotateLeft(self):
        MCLevel.rotateLeft(self)

        self.Data = swapaxes(self.Data, 1, 0)[:, ::-1, :]  # x=y; y=-x

        torchRotation = array([0, 4, 3, 1, 2, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15])

        torchIndexes = self.Blocks == self.materials.Torch.ID
        info(u"Rotating torches: {0}".format(len(torchIndexes.nonzero()[0])))
        self.Data[torchIndexes] = torchRotation[self.Data[torchIndexes]]
コード例 #2
0
    def rotateLeft(self):
        MCLevel.rotateLeft(self)

        self.Data = swapaxes(self.Data, 1, 0)[:, ::-1, :]  # x=y; y=-x

        torchRotation = array(
            [0, 4, 3, 1, 2, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15])

        torchIndexes = (self.Blocks == self.materials.Torch.ID)
        info(u"Rotating torches: {0}".format(len(torchIndexes.nonzero()[0])))
        self.Data[torchIndexes] = torchRotation[self.Data[torchIndexes]]