예제 #1
0
class Window(QtGui.QWidget):
    def __init__(self, parent = None):
        QtGui.QWidget.__init__(self, parent)
        self.setWindowTitle(self.tr("Basic Drawing"))
        
        world_folder = 'C:\Users\Admin\AppData\Roaming\.minecraft\saves\Ostrova01'
        #world_folder = 'C:\Users\Yuretzz\AppData\Roaming\.minecraft\saves\Ostrova01'
        #world_folder = 'D:\Distrib\Ostrova01'
        
        self.wf = MyWorld(world_folder)
        print self.wf.spawnChunkCoord
        
        self.chank = self.wf.loadChunk((-12, 25))
        print self.chank.oreStatistics
        
        self.chank.createCube()
        self.sm = SelectedMinerals(self.chank)
        
        # add barzel, obsidian ve peham (zaav remains)
        self.sm.changeListOfActive([14, 15, 73, 16])    
        print 'Added barzel, obsidian ve peham (zaav remains):'
        
        print 'Now show only zaav ve barzel:'
        self.sm.changeListOfActive([14, 15])
        
        self.prj = Projector()
        self.prj.setupPrism(800)
        self.sm.minerals[9].project(self.prj)
        
        self.renderArea = RenderArea(self)

        mainLayout = QtGui.QGridLayout()
        mainLayout.addWidget(self.renderArea, 0, 0)
        self.setLayout(mainLayout)
예제 #2
0
from projector import Projector

world_folder = 'C:\Users\Admin\AppData\Roaming\.minecraft\saves\Ostrova01'
#world_folder = 'C:\Users\Yuretzz\AppData\Roaming\.minecraft\saves\Ostrova01'
#world_folder = 'D:\Distrib\Ostrova01'

wf = MyWorld(world_folder)
print wf.spawnChunkCoord

chank = Chunk(wf, (-12, 25))
print chank.oreStatistics

chank.createCube()
sm = SelectedMinerals(chank)

# add barzel, obsidian ve peham (zaav remains)
sm.changeListOfActive([14, 15, 73, 16])    
print 'Added barzel, obsidian ve peham (zaav remains):'

print 'Now show only zaav ve barzel:'
sm.changeListOfActive([14, 15])

prj = Projector()
prj.setupPrism(800)
sm.minerals[14].project(prj)

#print 'Now completely change:'
#sm.changeListOfActive([73, 56])

puk=1