示例#1
0
def list_worlds():
    for i, world in enumerate(minecraft.getWorlds()):
        name, path = world
        print(" - %s" % (name))

        for j, dimension in enumerate(minecraft.getDimensions(world)):
            dimension_name, dimension_id = dimension
            print("     %s (%s)" % (dimension_id, dimension_name))
示例#2
0
def list_worlds():
    for i, world in enumerate(minecraft.getWorlds()):
        name, path = world
        print(" - %s" % (name))

        for j, dimension in enumerate(minecraft.getDimensions(world)):
            dimension_name, dimension_id = dimension
            print("     %s (%s)" % (dimension_id, dimension_name))
示例#3
0
    def createComboWorld(self):
        combo = QtGui.QComboBox()
        combo.currentIndexChanged.connect(self.selectWorld)

        self.modelWorld = QtGui.QStandardItemModel()
        combo.setModel(self.modelWorld)
        for i, world in enumerate(minecraft.getWorlds()):
            name, path = world
            item = QtGui.QStandardItem(name)
            item.setData(path)
            self.modelWorld.setItem(i, 0, item)
        combo.setCurrentIndex(0)

        return combo
示例#4
0
    def createComboWorld(self):
        combo = QtGui.QComboBox()
        combo.currentIndexChanged.connect(self.selectWorld)

        self.modelWorld = QtGui.QStandardItemModel()
        combo.setModel(self.modelWorld)
        for i, world in enumerate(minecraft.getWorlds()):
            name, path = world
            item = QtGui.QStandardItem(name)
            item.setData(path)
            self.modelWorld.setItem(i, 0, item)
        combo.setCurrentIndex(0)

        return combo