def flipVertical(self): " xxx delete stuff " self._fakeEntities = None blockrotation.FlipVertical(self.Blocks, self.Data) self._Blocks = self._Blocks[::-1, :, :] # y=-y self.root_tag["Data"].value = self.root_tag["Data"].value[::-1, :, :]
def flipVertical(self): " xxx delete stuff " self._fakeEntities = None blockrotation.FlipVertical(self.Blocks, self.Data) self._Blocks = self._Blocks[::-1, :, :] # y=-y self.root_tag["Data"].value = self.root_tag["Data"].value[::-1, :, :] log.info(u"N/S Flip: Relocating entities...") mcedit_ids_get = self.defsIds.mcedit_ids.get for entity in self.Entities: ent_id_val = entity["id"].value entity["Pos"][1].value = self.Height - entity["Pos"][1].value if "Motion" in entity: entity["Motion"][1].value = -entity["Motion"][1].value entity["Rotation"][1].value = -entity["Rotation"][1].value if ent_id_val in ("Painting", "ItemFrame") or mcedit_ids_get(ent_id_val) in ( 'DEFS_ENTITIES_PAINTING', 'DEFS_ENTITIES_ITEM_FRAME'): entity["TileY"].value = self.Height - entity["TileY"].value - 1 for tileEntity in self.TileEntities: tileEntity["y"].value = self.Height - tileEntity["y"].value - 1 if "TileTicks" in self.root_tag: for tileTick in self.TileTicks: tileTick["y"].value = self.Height - tileTick["y"].value - 1
def flipVertical(self): " xxx delete stuff " self._fakeEntities = None blockrotation.FlipVertical(self.Blocks, self.Data) self._Blocks = self._Blocks[::-1, :, :] # y=-y self.root_tag["Data"].value = self.root_tag["Data"].value[::-1, :, :] log.info(u"N/S Flip: Relocating entities...") for entity in self.Entities: entity["Pos"][1].value = self.Height - entity["Pos"][1].value entity["Motion"][1].value = -entity["Motion"][1].value entity["Rotation"][1].value = -entity["Rotation"][1].value if entity["id"].value in ("Painting", "ItemFrame"): entity["TileY"].value = self.Height - entity["TileY"].value - 1 for tileEntity in self.TileEntities: tileEntity["y"].value = self.Height - tileEntity["y"].value - 1 if "TileTicks" in self.root_tag: for tileTick in self.TileTicks: tileTick["y"].value = self.Height - tileTick["y"].value - 1
def flipVerticalBlocks(self): blockrotation.FlipVertical(self.Blocks, self.Data)
def flipVertical(self): " xxx delete stuff " blockrotation.FlipVertical(self.Blocks, self.Data) self.root_tag["Blocks"].value = self.Blocks[:, :, ::-1] # y=-y self.root_tag["Data"].value = self.Data[:, :, ::-1]
def flipVertical(self): " xxx delete stuff " blockrotation.FlipVertical(self.Blocks, self.Data) self.Blocks = self.Blocks[:, :, ::-1] # y=-y self.Data = self.Data[:, :, ::-1]