예제 #1
0
    def __init__(self, mainWindow, name):
        _base.__init__(self, mainWindow, "GUI", "CraftingTable")

        self.guiType = "CraftingTable"
        self.name = "CraftingTable"
        self.deleteable = False

        self.gui = guiDef.GUIWidget(
            self,
            BASEPATH + "/assets/textures/gui/container/crafting_table.png")
        self.gui.slots = [
            guiDef.Slot(self.gui, 30, 17),
            guiDef.Slot(self.gui, 48, 17),
            guiDef.Slot(self.gui, 66, 17),
            guiDef.Slot(self.gui, 30, 35),
            guiDef.Slot(self.gui, 48, 35),
            guiDef.Slot(self.gui, 66, 35),
            guiDef.Slot(self.gui, 30, 53),
            guiDef.Slot(self.gui, 48, 53),
            guiDef.Slot(self.gui, 66, 53),
            guiDef.Slot(self.gui, 125, 35, True)
        ]

        self.dragItem = None

        self.tempRecipe = Recipe(self.mainWindow, self, "unknown")

        self.initUI()
예제 #2
0
 def __init__(self, mainWindow, name):
     _base.__init__(self, mainWindow, "GUI", "CraftingTable")
     
     self.guiType = "CraftingTable"
     self.name = "CraftingTable"
     self.deleteable = False
     
     self.gui = guiDef.GUIWidget(self, BASEPATH+"/assets/textures/gui/container/crafting_table.png")
     self.gui.slots = [guiDef.Slot(self.gui, 30,17), guiDef.Slot(self.gui, 48,17), guiDef.Slot(self.gui, 66,17),
                       guiDef.Slot(self.gui, 30,35), guiDef.Slot(self.gui, 48,35), guiDef.Slot(self.gui, 66,35),
                       guiDef.Slot(self.gui, 30,53), guiDef.Slot(self.gui, 48,53), guiDef.Slot(self.gui, 66,53),
                       guiDef.Slot(self.gui, 125,35, True)]
                       
     self.dragItem = None
     
     self.tempRecipe = Recipe(self.mainWindow, self, "unknown")
     
     self.initUI()
예제 #3
0
 def __init__(self, mainWindow, name):
     _base.__init__(self, mainWindow, "Item", "Item")
     
     self.name = name
     self.texture = BASEPATH+"/assets/textures/items/unknown.png"
     self.creativeTab = "Misc"
     
     self.listWidgetItem.setText(self.name)
     self.listWidgetItem.instancename = self.instancename()
     
     self.data = {"package":[],
                  "imports":[],
                  "classname":[],
                  "name":[],
                  "unlocalizedName":[],
                  "basemod":[],
                  "modid":[],
                  "creativeTab":[],
                  "texture":[]}
     
     self.initUI()
예제 #4
0
 def __init__(self, mainWindow, name):
     _base.__init__(self, mainWindow, "BaseMod", "BaseMod")
     
     self.deleteable = False
     
     self.name = name
     self.version = "1.0"
     
     self.data = {"package":[],
                  "imports":[],
                  "classname":[],
                  "name":[],
                  "modid":[],
                  "version":[],
                  "proxies":[],
                  "declarations":[],
                  "preInit":[],
                  "commonInit":[],
                  "clientInit":[],
                  "postInit":[]}
     
     self.initUI()
예제 #5
0
    def __init__(self, mainWindow, name):
        _base.__init__(self, mainWindow, "BaseMod", "BaseMod")

        self.deleteable = False

        self.name = name
        self.version = "1.0"

        self.data = {
            "package": [],
            "imports": [],
            "classname": [],
            "name": [],
            "modid": [],
            "version": [],
            "proxies": [],
            "declarations": [],
            "preInit": [],
            "commonInit": [],
            "clientInit": [],
            "postInit": []
        }

        self.initUI()
예제 #6
0
 def __init__(self, mainWindow, name):
     """
     Block(Main.MainWindow, str)
     
     Args:
         mainWindow (Main.MaimWindow):   Pointer to the main window
         name (str):                     Block name
     """
     _base.__init__(self, mainWindow, "Block", "Block")
     
     self.name = name
     self.texture = [BASEPATH+"/assets/textures/blocks/unknown.png"]*6
     self.transparency = "auto"
     self.material = "Material.rock"
     self.creativeTab = "Building Blocks"
     self.hardness = 2.0
     self.resistance = 10.0
     self.tool = "pickaxe"
     self.harvestLevel = 0
     self.rotateable = True
     
     self.modeldata = [{'cuboids':
                         [{'textures':
                             [BASEPATH+'/assets/textures/blocks/unknown.png',
                              BASEPATH+'/assets/textures/blocks/unknown.png',
                              BASEPATH+'/assets/textures/blocks/unknown.png',
                              BASEPATH+'/assets/textures/blocks/unknown.png',
                              BASEPATH+'/assets/textures/blocks/unknown.png',
                              BASEPATH+'/assets/textures/blocks/unknown.png'],
                         'name': 'unnamed',
                         'uvs':
                             [[[0.0, 0.0], [1.0, 1.0]],
                              [[0.0, 0.0], [1.0, 1.0]],
                              [[0.0, 0.0], [1.0, 1.0]],
                              [[0.0, 0.0], [1.0, 1.0]],
                              [[0.0, 0.0], [1.0, 1.0]],
                              [[0.0, 0.0], [1.0, 1.0]]],
                         'translation': [0.0, 0.0, 0.0],
                         'rotation': 0.0,
                         'rotationAxis': 0,
                         'dimensions': [16.0, 16.0, 16.0]}]},
                     '{\n\t"textures": {\n\t\t"#0": "<modid>:blocks/<unlocalizedName>_0"\n\t},\n\t"elements": [\n\t\t{\n\t\t\t"to": [16.0, 16.0, 16.0],\n\t\t\t"from": [0.0, 0.0, 0.0],\n\t\t\t"name": "unnamed",\n\t\t\t"faces": {\n\t\t\t\t"north": {\n\t\t\t\t\t"uv": [0.0, 0.0, 16.0, 16.0],\n\t\t\t\t\t"texture": "#0"\n\t\t\t\t},\n\t\t\t\t"west": {\n\t\t\t\t\t"uv": [0.0, 0.0, 16.0, 16.0],\n\t\t\t\t\t"texture": "#0"\n\t\t\t\t},\n\t\t\t\t"up": {\n\t\t\t\t\t"uv": [0.0, 0.0, 16.0, 16.0],\n\t\t\t\t\t"texture": "#0"\n\t\t\t\t},\n\t\t\t\t"down": {\n\t\t\t\t\t"uv": [0.0, 0.0, 16.0, 16.0],\n\t\t\t\t\t"texture": "#0"\n\t\t\t\t},\n\t\t\t\t"east": {\n\t\t\t\t\t"uv": [0.0, 0.0, 16.0, 16.0],\n\t\t\t\t\t"texture": "#0"\n\t\t\t\t},\n\t\t\t\t"south": {\n\t\t\t\t\t"uv": [0.0, 0.0, 16.0, 16.0],\n\t\t\t\t\t"texture": "#0"\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t]\n}',
                     [BASEPATH+'/assets/textures/blocks/unknown.png']]
     
     self.data = {"package":[],
                  "imports":[],
                  "classname":[],
                  "unlocalizedName":[],
                  "material":[],
                  "creativeTab":[],
                  "hardness":[],
                  "resistance":[],
                  "tool":[],
                  "harvestLevel":[],
                  "modid":[],
                  "additionalAttributes":[],
                  "additionalDeclarations":[]}
     
     self.initUI()
     
     self.listWidgetItem.setText(self.name)
     self.listWidgetItem.instancename = self.instancename()
예제 #7
0
    def __init__(self, mainWindow, name):
        """
        Block(Main.MainWindow, str)
        
        Args:
            mainWindow (Main.MaimWindow):   Pointer to the main window
            name (str):                     Block name
        """
        _base.__init__(self, mainWindow, "Block", "Block")

        self.name = name
        self.texture = [BASEPATH + "/assets/textures/blocks/unknown.png"] * 6
        self.transparency = "auto"
        self.material = "Material.rock"
        self.creativeTab = "Building Blocks"
        self.hardness = 2.0
        self.resistance = 10.0
        self.tool = "pickaxe"
        self.harvestLevel = 0
        self.rotateable = True

        self.modeldata = [{
            'cuboids': [{
                'textures': [
                    BASEPATH + '/assets/textures/blocks/unknown.png',
                    BASEPATH + '/assets/textures/blocks/unknown.png',
                    BASEPATH + '/assets/textures/blocks/unknown.png',
                    BASEPATH + '/assets/textures/blocks/unknown.png',
                    BASEPATH + '/assets/textures/blocks/unknown.png',
                    BASEPATH + '/assets/textures/blocks/unknown.png'
                ],
                'name':
                'unnamed',
                'uvs': [[[0.0, 0.0], [1.0, 1.0]], [[0.0, 0.0], [1.0, 1.0]],
                        [[0.0, 0.0], [1.0, 1.0]], [[0.0, 0.0], [1.0, 1.0]],
                        [[0.0, 0.0], [1.0, 1.0]], [[0.0, 0.0], [1.0, 1.0]]],
                'translation': [0.0, 0.0, 0.0],
                'rotation':
                0.0,
                'rotationAxis':
                0,
                'dimensions': [16.0, 16.0, 16.0]
            }]
        }, '{\n\t"textures": {\n\t\t"#0": "<modid>:blocks/<unlocalizedName>_0"\n\t},\n\t"elements": [\n\t\t{\n\t\t\t"to": [16.0, 16.0, 16.0],\n\t\t\t"from": [0.0, 0.0, 0.0],\n\t\t\t"name": "unnamed",\n\t\t\t"faces": {\n\t\t\t\t"north": {\n\t\t\t\t\t"uv": [0.0, 0.0, 16.0, 16.0],\n\t\t\t\t\t"texture": "#0"\n\t\t\t\t},\n\t\t\t\t"west": {\n\t\t\t\t\t"uv": [0.0, 0.0, 16.0, 16.0],\n\t\t\t\t\t"texture": "#0"\n\t\t\t\t},\n\t\t\t\t"up": {\n\t\t\t\t\t"uv": [0.0, 0.0, 16.0, 16.0],\n\t\t\t\t\t"texture": "#0"\n\t\t\t\t},\n\t\t\t\t"down": {\n\t\t\t\t\t"uv": [0.0, 0.0, 16.0, 16.0],\n\t\t\t\t\t"texture": "#0"\n\t\t\t\t},\n\t\t\t\t"east": {\n\t\t\t\t\t"uv": [0.0, 0.0, 16.0, 16.0],\n\t\t\t\t\t"texture": "#0"\n\t\t\t\t},\n\t\t\t\t"south": {\n\t\t\t\t\t"uv": [0.0, 0.0, 16.0, 16.0],\n\t\t\t\t\t"texture": "#0"\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t]\n}',
                          [BASEPATH + '/assets/textures/blocks/unknown.png']]

        self.data = {
            "package": [],
            "imports": [],
            "classname": [],
            "unlocalizedName": [],
            "material": [],
            "creativeTab": [],
            "hardness": [],
            "resistance": [],
            "tool": [],
            "harvestLevel": [],
            "modid": [],
            "additionalAttributes": [],
            "additionalDeclarations": []
        }

        self.initUI()

        self.listWidgetItem.setText(self.name)
        self.listWidgetItem.instancename = self.instancename()