def build_structure(self, commands, x, z):
		commands.append(fill(Position(x+1,0,z+0), Position(x+1,0,z+1), base_block()))
		commands.append(fill(Position(x+1,1,z+0), Position(x+1,1,z+1), redstone_dust()))
		commands.append(setblock(Position(x+0,1,z+0), base_block()))
		commands.append(fill(Position(x+0,2,z+0), Position(x+1,2,z+0), base_block()))
		commands.append(fill(Position(x+0,3,z+0), Position(x+1,3,z+0), redstone_dust()))
		commands.append(setblock(Position(x+1,2,z+1), redstone_torch('+z')))
예제 #2
0
 def _build_module_1(self, x, y):
     self.commands.append(
         fill(Position(x * 2, -2, y * 2), Position(x * 2, -2, y * 2 + 1),
              base_block()))
     self.commands.append(
         fill(Position(x * 2, -1, y * 2), Position(x * 2, -1, y * 2 + 1),
              redstone_dust()))
     self.commands.append(
         setblock(Position(x * 2 + 1, -2, y * 2 + 1), redstone_torch('+x')))
 def _place_torches(self):
     commands = []
     for x in range(self.length):
         if x % 2 == 1:
             continue
         for z in range(self.width):
             if z % 2 == 1:
                 continue
             if self.table[int(x / 2)][int(z / 2)] == '1':
                 commands.append(
                     setblock(Position(x, 2, z),
                              redstone_torch(facing='-x')))
     if self.input_side == 'left':
         for command in commands:
             command.translate(0, 0, 1)
     return commands
예제 #4
0
 def generate_build(self, pos_x, pos_y, pos_z, rotation):
     self._add_command(
         setblock(Position(pos_x, pos_y, pos_z),
                  redstone_torch('-x')))
     self._rotate(rotation)