gf2:projekte:2024:minecraft:2d1gruppe2

Dies ist eine alte Version des Dokuments!


Zuerst waren wir unentschlossen was wir machen wollen und haben viele Ideen in den Raum geworfen. Schliesslich haben wir uns dann darauf geeinigt unsere Ideen zu kombinieren und haben uns dazu entschlossen ein Baumhaus, mit Wendeltreppe zu bauen. Doch wenn man in das Baumhaus hineingeht, findet man dort ein Gym und ein Restaurant. Von aussen haben wir einen grossen Baum programmiert, mit einem Dach aus Glass und einer grünen Baumkrone.

- Baumstamm

- Baumkrone

- Treppe

- Plattform

- Hauswände

- Hausdach

- Innenausstattung → Gymgeräte, Café/Restaurant

- Aussendekoration

- Holzblöcke

- Blätterblöcke

- Zaunblöcke

- Laternen

-Glasblöcke

1. Zuerst haben wir eine Ideensammlung gemacht und uns schlussendlich für ein Baumhaus als Projektidee entschlossen. Danach haben wir das Programmieren des Baumhauses in kleinere Aufgaben aufgeteilt (siehe Scrumboard). Auch das Design des Baumhauses wurde diskutiert und bereits schon einmal eingegrenzt, was in der Zeit und mit den bereits vorhandenen Fähigkeiten möglich war.

2. Daraufhin konnten wir mit dem Programmieren beginnen. Es kam zu ersten Schwierigkeiten, doch diese werden weiter unten genau erläutert. Um diese Probleme zu beseitigen haben wir als Gruppe Lösungsansätze gefunden oder im Unterricht nochmals fragen gestellt.

3. Die einzelnen Teile des Programmes wurden von Malik und Simeon zusammengeführt und an den entsprechenden Standort angepasst.

4. Es wurde zum Schluss nochmals alles überprüft und mehrere Test Durchläufe gemacht, um uns von der Qualität des Produktes zu überzeugen. Es wurden auch nochmals kleinere Verbesserungen am Codes gemacht.

Den Prozess von uns und unserem Code konnten wir besonders daran merken, dass wir mit der Zeit immer schneller mit dem Lösen von den Aufgaben geworden sind. Diese Entwicklung zeigt, wie sich unsere Zusammenarbeit und unsere Fähigkeiten im Laufe des Projekts verbessert haben. Am Ende konnten wir nicht nur ein funktionierendes Ergebnis präsentieren, sondern auch wertvolle Erfahrungen sammeln, die uns bei zukünftigen Projekten weiterhelfen werden.

-Eine Schwierigkeit die vermehrt auftrat, war das wir zu viel mit dem Agenten gebaut hatten und wir erst das schreiben des Codes ohne den Agenten erlernen mussten. Doch nach einigen Versuchen hat auch diese Art des Programmierens funktioniert und unseren Code optimiert. Somit wurden Redundanzen vermieden und unser Code wurde stark gekürzt.

-Zu Beginn hatten wir etwas unterschiedliche Erwartungen an das Aussehen des Baumhauses. Nach mehreren Besprechungen und Brainstorming-Sitzungen konnten wir diese jedoch anpassen und so unsere Ziele durch Zusammenarbeit, doch noch zu einem guten Ergebnis bringen.

-Des weitern gab es auch noch Schwierigkeiten beim Coden den richtigen Namen einiger Blöcke zu finden​, das Kürzen, die Ausrichtungsänderung von Blöcken herauszufinden und manchmal kam es auch zu einem Codeverlust auf Grund von technischen Problemen. Doch all diese Probleme, konnten wir durch Geduld und Fragen schliesslich lösen. ​

Das Projekt hat uns alle bereits im Unterricht gelernten Fähigkeiten anwenden lassen und man konnte so nachmals seine Programmierkenntnisse zusammenführen und erweitern. Der gesamte Prozess hat uns gezeigt, wie wichtig Teamarbeit, Kommunikation und Flexibilität sind. Auch Für alle Schwierigkeiten konnten wir eine Lösungen finden und dadurch haben wir uns alle mehrmals intensiv mit unserem Code beschäftigt. Allerdings wäre es gut gewesen, den Code gleich in einem einheitlichen Programmierkonzept zu schreiben, damit es zu keinen wiederholtem schrieben zum kürzen des Codes gekommen wäre. Letztlich haben wir nicht nur technische Fähigkeiten verbessert, sondern auch als Team stärker zusammengearbeitet und gemeinsam ein funktionierendes, zufriedenstellendes Ergebnis erzielt.

<def bauetreppe():

  agent.set_assist(PLACE_ON_MOVE, True)
  agent.set_assist(DESTROY_OBSTACLES,True)
  agent.set_item(BIRCH_WOOD_SLAB, 64, 1)
  agent.set_slot(1)
  agent.teleport(world(10, -60, 19), SOUTH)
  agent.turn(SOUTH)
  hoehe= 10
  laenge= 3

#Grundeinstellung für den Agenten

  while hoehe > 0:
      agent.move(FORWARD, laenge)
      agent.turn(RIGHT)
      agent.turn(RIGHT)
      agent.set_assist(PLACE_ON_MOVE, False)
      agent.move(UP, 1)
      agent.move(LEFT, 1)
      agent.move(FORWARD, 1)
      agent.set_assist(PLACE_ON_MOVE, True)
      agent.move(FORWARD, laenge)
      agent.turn(RIGHT)
      agent.turn(RIGHT)
      agent.set_assist(PLACE_ON_MOVE, False)
      agent.move(UP, 1)
      agent.move(RIGHT, 1)
      agent.move(FORWARD, 1)
      agent.set_assist(PLACE_ON_MOVE, True)
      agent.move(FORWARD, laenge)
      agent.turn(RIGHT)
      agent.turn(RIGHT)
      agent.set_assist(PLACE_ON_MOVE, False)
      agent.move(UP, 1)
      agent.move(LEFT, 1)
      agent.set_assist(PLACE_ON_MOVE, True)
      agent.move(FORWARD, laenge+1)
      agent.set_assist(PLACE_ON_MOVE,False)
      agent.turn(RIGHT)
      agent.turn(RIGHT)
      agent.move(RIGHT, 1)
      agent.move(FORWARD, 1)
      agent.set_assist(PLACE_ON_MOVE, True)
      agent.move(FORWARD, laenge+1)
      agent.set_assist(PLACE_ON_MOVE,False)
      agent.turn(RIGHT)
      agent.turn(RIGHT)
      agent.move(LEFT, 1)
      agent.move(FORWARD, 1)
      agent.set_assist(PLACE_ON_MOVE, True)
      agent.move(FORWARD, laenge+1)
      agent.set_assist(PLACE_ON_MOVE,False)
      agent.turn(RIGHT)
      agent.turn(RIGHT)
      agent.move(RIGHT, 1)
      agent.move(FORWARD, 1)
      agent.set_assist(PLACE_ON_MOVE, True)
      agent.move(FORWARD, laenge+1)
      agent.turn(LEFT)
      hoehe= hoehe-1

#Dasselbe Muster für die Treppe immer wiederholt mit Variabler Länge und Höhe

def bauestamm():

      x=13
      y=-60
      z=18
      blocks.fill(LOG_OAK, world(x, y, z+1), world(x, y+41, z+3), FillOperation.REPLACE)
      blocks.fill(LOG_OAK, world(x+1, y, z), world(x+3, y+41, z), FillOperation.REPLACE)
      blocks.fill(LOG_OAK, world(x+2, y, z+1), world(x+4, y+41, z+3), FillOperation.REPLACE)
      blocks.fill(LOG_OAK, world(x+1, y, z+3), world(x+3, y+41, z+4), FillOperation.REPLACE)
      blocks.place(STRIPPED_BIRCH_WOOD, world(x, y, z+4))
      blocks.place(STRIPPED_BIRCH_WOOD, world(x+4, y, z+4))
      blocks.place(STRIPPED_BIRCH_WOOD, world(x+4, y, z))
      blocks.place(STRIPPED_BIRCH_WOOD, world(x, y, z))
      blocks.place(OAK_WOOD_SLAB, world(x-1, y, z+4))
      blocks.place(OAK_WOOD_SLAB, world(x+5, y, z+4))
      blocks.place(OAK_WOOD_SLAB, world(x+5, y, z))
      blocks.place(OAK_WOOD_SLAB, world(x-1, y, z))
      blocks.place(OAK_WOOD_SLAB, world(x, y, z+5))
      blocks.place(OAK_WOOD_SLAB, world(x+4, y, z+5))
      blocks.place(OAK_WOOD_SLAB, world(x+4, y, z-1))
      blocks.place(OAK_WOOD_SLAB, world(x, y, z-1))

#Baumstamm des Baumhauses mit Fill und Place #Die nächsten 4 for i in range sind die zufällige Deko vom Baumstamm (Blätter)

      for i in range(13):
          a=13
          b=randint(-60, -20)
          c=randint(19, 21)
          blocks.place(blocks.block_with_data(DARK_OAK_LEAVES,9), world(a, b, c))
      for i in range(13):
          a=randint(14, 16)
          b=randint(-60, -20)
          c=18
          blocks.place(blocks.block_with_data(DARK_OAK_LEAVES,9), world(a, b, c))
      for i in range(13):
          a=17
          b=randint(-60, -20)
          c=randint(19, 21)
          blocks.place(blocks.block_with_data(DARK_OAK_LEAVES,9), world(a, b, c))
      for i in range(13):
          a=randint(14, 16)
          b=randint(-60, -20)
          c=22
          blocks.place(blocks.block_with_data(DARK_OAK_LEAVES,9), world(a, b, c))

def Baum2(x,y,z,hoehe):

  #1,links, unten
  blocks.fill(AIR, world(x,y+hoehe,z), world(x+7,y+hoehe,z))
  blocks.fill(AIR, world(x,y+hoehe,z+1), world(x+6,y+hoehe,z+1))
  blocks.fill(AIR, world(x,y+hoehe,z+2), world(x+2,y+hoehe,z+2))
  blocks.fill(AIR, world(x,y+hoehe,z+3), world(x+1,y+hoehe,z+3))
  blocks.fill(AIR, world(x,y+hoehe,z+4), world(x+1,y+hoehe,z+4))
  blocks.fill(AIR, world(x,y+hoehe,z+5), world(x+1,y+hoehe,z+5))
  blocks.fill(AIR, world(x,y+hoehe,z+6), world(x+1,y+hoehe,z+6))
  blocks.fill(AIR, world(x,y+hoehe,z+7), world(x,y+hoehe,z+7))
  #1,rechts,unten
  blocks.fill(AIR, world(x+11,y+hoehe,z), world(x+18,y+hoehe,z))
  blocks.fill(AIR, world(x+12,y+hoehe,z+1), world(x+18,y+hoehe,z+1))
  blocks.fill(AIR, world(x+16,y+hoehe,z+2), world(x+18,y+hoehe,z+2))
  blocks.fill(AIR, world(x+17,y+hoehe,z+3), world(x+18,y+hoehe,z+3))
  blocks.fill(AIR, world(x+17,y+hoehe,z+4), world(x+18,y+hoehe,z+4))
  blocks.fill(AIR, world(x+17,y+hoehe,z+5), world(x+18,y+hoehe,z+5))
  blocks.fill(AIR, world(x+17,y+hoehe,z+6), world(x+18,y+hoehe,z+6))
  blocks.fill(AIR, world(x+18,y+hoehe,z+7), world(x+18,y+hoehe,z+7))
  #1,links, oben
  blocks.fill(AIR, world(x,y+hoehe,z+11), world(x,y+hoehe,z+11))
  blocks.fill(AIR, world(x,y+hoehe,z+12), world(x+1,y+hoehe,z+12))
  blocks.fill(AIR, world(x,y+hoehe,z+13), world(x+1,y+hoehe,z+13))
  blocks.fill(AIR, world(x,y+hoehe,z+14), world(x+1,y+hoehe,z+14))
  blocks.fill(AIR, world(x,y+hoehe,z+15), world(x+1,y+hoehe,z+15))
  blocks.fill(AIR, world(x,y+hoehe,z+16), world(x+2,y+hoehe,z+16))
  blocks.fill(AIR, world(x,y+hoehe,z+17), world(x+6,y+hoehe,z+17))
  blocks.fill(AIR, world(x,y+hoehe,z+18), world(x+7,y+hoehe,z+18))
  #1,rechts,oben
  blocks.fill(AIR, world(x+18,y+hoehe,z+11), world(x+18,y+hoehe,z+11))
  blocks.fill(AIR, world(x+17,y+hoehe,z+12), world(x+18,y+hoehe,z+12))
  blocks.fill(AIR, world(x+17,y+hoehe,z+13), world(x+18,y+hoehe,z+13))
  blocks.fill(AIR, world(x+17,y+hoehe,z+14), world(x+18,y+hoehe,z+14))
  blocks.fill(AIR, world(x+17,y+hoehe,z+15), world(x+18,y+hoehe,z+15))
  blocks.fill(AIR, world(x+16,y+hoehe,z+16), world(x+18,y+hoehe,z+16))
  blocks.fill(AIR, world(x+12,y+hoehe,z+17), world(x+18,y+hoehe,z+17))
  blocks.fill(AIR, world(x+11,y+hoehe,z+18), world(x+18,y+hoehe,z+18))
  #in der Mitte
  blocks.fill(AIR, world(x+8,y+hoehe,z+7), world(x+10,y+hoehe,z+11))
  blocks.fill(AIR, world(x+7,y+hoehe,z+8), world(x+11,y+hoehe,z+10))
  blocks.fill(LEAVES_BIRCH, world(x+1,y+2,z+1), world(x+17,y+2,z+17),FillOperation.REPLACE)
  #2,links,unten
  blocks.fill(AIR, world(x+1,y+2,z+1), world(x+7,y+2,z+1))
  blocks.fill(AIR, world(x+1,y+2,z+2), world(x+6,y+2,z+2))
  blocks.fill(AIR, world(x+1,y+2,z+3), world(x+3,y+2,z+3))
  blocks.fill(AIR, world(x+1,y+2,z+4), world(x+2,y+2,z+4))
  blocks.fill(AIR, world(x+1,y+2,z+5), world(x+2,y+2,z+5))
  blocks.fill(AIR, world(x+1,y+2,z+6), world(x+2,y+2,z+6))
  blocks.fill(AIR, world(x+1,y+2,z+7), world(x+1,y+2,z+7))
  #2,rechts,unten
  blocks.fill(AIR, world(x+11,y+2,z+1), world(x+17,y+2,z+1))
  blocks.fill(AIR, world(x+12,y+2,z+2), world(x+17,y+2,z+2))
  blocks.fill(AIR, world(x+15,y+2,z+3), world(x+17,y+2,z+3))
  blocks.fill(AIR, world(x+16,y+2,z+4), world(x+17,y+2,z+4))
  blocks.fill(AIR, world(x+16,y+2,z+5), world(x+17,y+2,z+5))
  blocks.fill(AIR, world(x+16,y+2,z+6), world(x+17,y+2,z+6))
  blocks.fill(AIR, world(x+17,y+2,z+7), world(x+17,y+2,z+7))
  #2,links,oben
  blocks.fill(AIR, world(x+1,y+2,z+11), world(x+1,y+2,z+11))
  blocks.fill(AIR, world(x+1,y+2,z+12), world(x+2,y+2,z+12))
  blocks.fill(AIR, world(x+1,y+2,z+13), world(x+2,y+2,z+13))
  blocks.fill(AIR, world(x+1,y+2,z+14), world(x+2,y+2,z+14))
  blocks.fill(AIR, world(x+1,y+2,z+15), world(x+3,y+2,z+15))
  blocks.fill(AIR, world(x+1,y+2,z+16), world(x+6,y+2,z+16))
  blocks.fill(AIR, world(x+1,y+2,z+17), world(x+7,y+2,z+17))
  #2,rechts,oben
  blocks.fill(AIR, world(x+17,y+2,z+11), world(x+17,y+2,z+11))
  blocks.fill(AIR, world(x+16,y+2,z+12), world(x+17,y+2,z+12))
  blocks.fill(AIR, world(x+16,y+2,z+13), world(x+17,y+2,z+13))
  blocks.fill(AIR, world(x+16,y+2,z+14), world(x+17,y+2,z+14))
  blocks.fill(AIR, world(x+15,y+2,z+15), world(x+17,y+2,z+15))
  blocks.fill(AIR, world(x+12,y+2,z+16), world(x+17,y+2,z+16))
  blocks.fill(AIR, world(x+11,y+2,z+17), world(x+17,y+2,z+17))
  blocks.fill(LEAVES_BIRCH, world(x+2,y+3,z+2), world(x+16,y+3,z+16),FillOperation.REPLACE)
  #3,links,unten
  blocks.fill(AIR, world(x+2,y+3,z+2), world(x+7,y+3,z+2))
  blocks.fill(AIR, world(x+2,y+3,z+3), world(x+6,y+3,z+3))
  blocks.fill(AIR, world(x+2,y+3,z+4), world(x+4,y+3,z+4))
  blocks.fill(AIR, world(x+2,y+3,z+5), world(x+3,y+3,z+5))
  blocks.fill(AIR, world(x+2,y+3,z+6), world(x+3,y+3,z+6))
  blocks.fill(AIR, world(x+2,y+3,z+7), world(x+2,y+3,z+7))
  #3,rechts,unten
  blocks.fill(AIR, world(x+11,y+3,z+2), world(x+16,y+3,z+2))
  blocks.fill(AIR, world(x+12,y+3,z+3), world(x+16,y+3,z+3))
  blocks.fill(AIR, world(x+14,y+3,z+4), world(x+16,y+3,z+4))
  blocks.fill(AIR, world(x+15,y+3,z+5), world(x+16,y+3,z+5))
  blocks.fill(AIR, world(x+15,y+3,z+6), world(x+16,y+3,z+6))
  blocks.fill(AIR, world(x+16,y+3,z+7), world(x+16,y+3,z+7))
  #3,links,oben
  blocks.fill(AIR, world(x+2,y+3,z+11), world(x+2,y+3,z+11))
  blocks.fill(AIR, world(x+2,y+3,z+12), world(x+3,y+3,z+12))
  blocks.fill(AIR, world(x+2,y+3,z+13), world(x+3,y+3,z+13))
  blocks.fill(AIR, world(x+2,y+3,z+14), world(x+4,y+3,z+14))
  blocks.fill(AIR, world(x+2,y+3,z+15), world(x+6,y+3,z+15))
  blocks.fill(AIR, world(x+2,y+3,z+16), world(x+7,y+3,z+16))
  #3,rechts,oben
  blocks.fill(AIR, world(x+16,y+3,z+11), world(x+16,y+3,z+11))
  blocks.fill(AIR, world(x+15,y+3,z+12), world(x+16,y+3,z+12))
  blocks.fill(AIR, world(x+15,y+3,z+13), world(x+16,y+3,z+13))
  blocks.fill(AIR, world(x+14,y+3,z+14), world(x+16,y+3,z+14))
  blocks.fill(AIR, world(x+12,y+3,z+15), world(x+16,y+3,z+15))
  blocks.fill(AIR, world(x+11,y+3,z+16), world(x+16,y+3,z+16))
  blocks.fill(LEAVES_BIRCH, world(x+3,y+4,z+3), world(x+15,y+4,z+15),FillOperation.REPLACE)
  #4,links,unten
  blocks.fill(AIR, world(x+3,y+4,z+3), world(x+7,y+4,z+3))
  blocks.fill(AIR, world(x+3,y+4,z+4), world(x+6,y+4,z+4))
  blocks.fill(AIR, world(x+3,y+4,z+5), world(x+5,y+4,z+5))
  blocks.fill(AIR, world(x+3,y+4,z+6), world(x+4,y+4,z+6))
  blocks.fill(AIR, world(x+3,y+4,z+7), world(x+3,y+4,z+7))
  #4,rechts,unten
  blocks.fill(AIR, world(x+11,y+4,z+3), world(x+15,y+4,z+3))
  blocks.fill(AIR, world(x+12,y+4,z+4), world(x+15,y+4,z+4))
  blocks.fill(AIR, world(x+13,y+4,z+5), world(x+15,y+4,z+5))
  blocks.fill(AIR, world(x+14,y+4,z+6), world(x+15,y+4,z+6))
  blocks.fill(AIR, world(x+15,y+4,z+7), world(x+15,y+4,z+7))
  #4,links,oben
  blocks.fill(AIR, world(x+3,y+4,z+11), world(x+3,y+4,z+11))
  blocks.fill(AIR, world(x+3,y+4,z+12), world(x+4,y+4,z+12))
  blocks.fill(AIR, world(x+3,y+4,z+13), world(x+5,y+4,z+13))
  blocks.fill(AIR, world(x+3,y+4,z+14), world(x+6,y+4,z+14))
  blocks.fill(AIR, world(x+3,y+4,z+15), world(x+7,y+4,z+15))
  #4,rechts,oben
  blocks.fill(AIR, world(x+15,y+4,z+11), world(x+15,y+4,z+11))
  blocks.fill(AIR, world(x+14,y+4,z+12), world(x+15,y+4,z+12))
  blocks.fill(AIR, world(x+13,y+4,z+13), world(x+15,y+4,z+13))
  blocks.fill(AIR, world(x+12,y+4,z+14), world(x+15,y+4,z+14))
  blocks.fill(AIR, world(x+11,y+4,z+15), world(x+15,y+4,z+15))
  blocks.fill(LEAVES_BIRCH, world(x+4,y+5,z+4), world(x+14,y+5,z+14),FillOperation.REPLACE)
  #5,links,unten
  blocks.fill(AIR, world(x+4,y+5,z+4), world(x+7,y+5,z+4))
  blocks.fill(AIR, world(x+4,y+5,z+5), world(x+6,y+5,z+5))
  blocks.fill(AIR, world(x+4,y+5,z+6), world(x+5,y+5,z+6))
  blocks.fill(AIR, world(x+4,y+5,z+7), world(x+4,y+5,z+7))
  #5,rechts,unten
  blocks.fill(AIR, world(x+11,y+5,z+4), world(x+14,y+5,z+4))
  blocks.fill(AIR, world(x+12,y+5,z+5), world(x+14,y+5,z+5))
  blocks.fill(AIR, world(x+13,y+5,z+6), world(x+14,y+5,z+6))
  blocks.fill(AIR, world(x+14,y+5,z+7), world(x+14,y+5,z+7))
  #5,links,oben
  blocks.fill(AIR, world(x+4,y+5,z+11), world(x+4,y+5,z+11))
  blocks.fill(AIR, world(x+4,y+5,z+12), world(x+5,y+5,z+12))
  blocks.fill(AIR, world(x+4,y+5,z+13), world(x+6,y+5,z+13))
  blocks.fill(AIR, world(x+4,y+5,z+14), world(x+7,y+5,z+14))
  #5,rechts,oben
  blocks.fill(AIR, world(x+14,y+5,z+11), world(x+14,y+5,z+11))
  blocks.fill(AIR, world(x+13,y+5,z+12), world(x+14,y+5,z+12))
  blocks.fill(AIR, world(x+12,y+5,z+13), world(x+14,y+5,z+13))
  blocks.fill(AIR, world(x+11,y+5,z+14), world(x+14,y+5,z+14))
  blocks.fill(LEAVES_BIRCH, world(x+5,y+6,z+5), world(x+13,y+6,z+13),FillOperation.REPLACE)
  #6,links,unten
  blocks.fill(AIR, world(x+5,y+6,z+5), world(x+7,y+6,z+5))
  blocks.fill(AIR, world(x+5,y+6,z+6), world(x+6,y+6,z+6))
  blocks.fill(AIR, world(x+5,y+6,z+7), world(x+5,y+6,z+7))
  #6,rechts,unten
  blocks.fill(AIR, world(x+11,y+6,z+5), world(x+13,y+6,z+5))
  blocks.fill(AIR, world(x+12,y+6,z+6), world(x+13,y+6,z+6))
  blocks.fill(AIR, world(x+13,y+6,z+7), world(x+13,y+6,z+7))
  #6,links,oben
  blocks.fill(AIR, world(x+5,y+6,z+11), world(x+5,y+6,z+11))
  blocks.fill(AIR, world(x+5,y+6,z+12), world(x+6,y+6,z+12))
  blocks.fill(AIR, world(x+5,y+6,z+13), world(x+7,y+6,z+13))
  #6,rechts,oben
  blocks.fill(AIR, world(x+13,y+6,z+11), world(x+13,y+6,z+11))
  blocks.fill(AIR, world(x+12,y+6,z+12), world(x+13,y+6,z+12))
  blocks.fill(AIR, world(x+11,y+6,z+13), world(x+13,y+6,z+13))
  blocks.fill(LEAVES_BIRCH, world(x+6,y+7,z+6), world(x+12,y+7,z+12),FillOperation.REPLACE)
  #7,links,unten
  blocks.fill(AIR, world(x+6,y+7,z+6), world(x+7,y+7,z+6))
  blocks.fill(AIR, world(x+6,y+7,z+7), world(x+6,y+7,z+7))
  #7,rechts,unten
  blocks.fill(AIR, world(x+11,y+7,z+6), world(x+12,y+7,z+6))
  blocks.fill(AIR, world(x+12,y+7,z+7), world(x+12,y+7,z+7))
  #7,links,oben
  blocks.fill(AIR, world(x+6,y+7,z+11), world(x+6,y+7,z+11))
  blocks.fill(AIR, world(x+6,y+7,z+12), world(x+7,y+7,z+12))
  #7,rechts,oben
  blocks.fill(AIR, world(x+12,y+7,z+11), world(x+12,y+7,z+11))
  blocks.fill(AIR, world(x+11,y+7,z+12), world(x+12,y+7,z+12))
  blocks.fill(LEAVES_BIRCH, world(x+7,y+8,z+7), world(x+11,y+8,z+11),FillOperation.REPLACE)
  #7,links,unten
  blocks.fill(AIR, world(x+7,y+8,z+7), world(x+8,y+8,z+7))
  blocks.fill(AIR, world(x+7,y+8,z+8), world(x+7,y+8,z+8))
  #7,rechts,unten
  blocks.fill(AIR, world(x+10,y+8,z+7), world(x+11,y+8,z+7))
  blocks.fill(AIR, world(x+11,y+8,z+8), world(x+11,y+8,z+8))
  #7,links,oben
  blocks.fill(AIR, world(x+7,y+8,z+10), world(x+7,y+8,z+10))
  blocks.fill(AIR, world(x+7,y+8,z+11), world(x+8,y+8,z+11))
  #7,rechts,oben
  blocks.fill(AIR, world(x+11,y+8,z+10), world(x+11,y+8,z+10))
  blocks.fill(AIR, world(x+10,y+8,z+11), world(x+11,y+8,z+11))
  
  #8
  blocks.fill(LEAVES_BIRCH, world(x+9,y+9,z+8), world(x+9,y+9,z+10),FillOperation.REPLACE)
  blocks.fill(LEAVES_BIRCH, world(x+8,y+9,z+9), world(x+10,y+9,z+9),FillOperation.REPLACE)

#Die Baumkrone aus Blätter #Noch ein Stamm in der Mittel, dass die Blätter nicht abfallen

  blocks.fill(LOG_OAK, world(x+9, y+2, z+9), world(x+9, y+9, z+9), FillOperation.REPLACE)

def DEKO(x, y, z,):

  blocks.fill(OAK_FENCE, world(x, y, z), world(x, y, z+3), FillOperation.REPLACE) #mit den ersten zwei zeilen wird der zaun platziert
  blocks.fill(OAK_FENCE, world(x+1, y, z+3), world(x+3, y, z+3), FillOperation.REPLACE)
  blocks.fill(PLANKS_BIRCH, world(x, y-1, z), world(x, y-1, z+3), FillOperation.REPLACE)#zeile 3-4 platziert die grossen blöcke unter dem zaun
  blocks.fill(PLANKS_BIRCH, world(x+1, y-1, z+3), world(x+3, y-1, z+3), FillOperation.REPLACE)
  blocks.place(TORCH, world(x, y+1, z))#in diesen zwei zeilen werden die fackeln obendrauf platziert
  blocks.place(TORCH, world(x+3, y+1, z+3))
  #ab hier werden diese 3 schritte wiederholt mit angepassten koordinaten
  blocks.fill(OAK_FENCE,world(x+7, y+3, z+3), world(x+10, y+3, z+3), FillOperation.REPLACE)
  blocks.fill(OAK_FENCE, world(x+10, y+3, z+2), world(x+10, y+3, z), FillOperation.REPLACE)
  blocks.fill(PLANKS_BIRCH, world(x+7, y+2, z+3), world(x+10, y+2, z+3), FillOperation.REPLACE)
  blocks.fill(PLANKS_BIRCH, world(x+10, y+2, z+2), world(x+10, y+2, z), FillOperation.REPLACE)
  blocks.place(TORCH, world(x+7, y+4, z+3))
  blocks.place(TORCH, world(x+10, y+4, z))
  blocks.fill(OAK_FENCE, world(x+10, y+6, z-4), world(x+10, y+6, z-6), FillOperation.REPLACE)
  blocks.fill(OAK_FENCE, world(x+10, y+6, z-7), world(x+7, y+6, z-7), FillOperation.REPLACE)
  blocks.fill(PLANKS_BIRCH, world(x+10, y+5, z-4), world(x+10, y+5, z-6), FillOperation.REPLACE)
  blocks.fill(PLANKS_BIRCH, world(x+10, y+5, z-7), world(x+7, y+5, z-7), FillOperation.REPLACE)
  blocks.place(TORCH, world(x+10, y+7, z-4))
  blocks.place(TORCH, world(x+7, y+7, z-7))
  blocks.fill(OAK_FENCE, world(x+3, y+9, z-7), world(x, y+9, z-7), FillOperation.REPLACE)
  blocks.fill(OAK_FENCE, world(x, y+9, z-6), world(x, y+9, z-4), FillOperation.REPLACE)
  blocks.fill(PLANKS_BIRCH, world(x+3, y+8, z-7), world(x, y+8, z-7), FillOperation.REPLACE)
  blocks.fill(PLANKS_BIRCH, world(x, y+8, z-6), world(x, y+8, z-4), FillOperation.REPLACE)
  blocks.place(TORCH, world(x+3, y+10, z-7))
  blocks.place(TORCH, world(x, y+10, z-4))
  #ab hier wird der ganze code kopiert einfach überall y+12 da es die zweite umdrehung der Treppe ist also das gleiche einfach höher
  blocks.fill(OAK_FENCE, world(x, y+12, z), world(x, y+12, z+3), FillOperation.REPLACE)
  blocks.fill(OAK_FENCE, world(x+1, y+12, z+3), world(x+3, y+12, z+3), FillOperation.REPLACE)
  blocks.fill(PLANKS_BIRCH, world(x, y+11, z), world(x, y+11, z+3), FillOperation.REPLACE)
  blocks.fill(PLANKS_BIRCH, world(x+1, y+11, z+3), world(x+3, y+11, z+3), FillOperation.REPLACE)
  blocks.place(TORCH, world(x, y+13, z))
  blocks.place(TORCH, world(x+3, y+13, z+3))
  blocks.fill(OAK_FENCE,world(x+7, y+15, z+3), world(x+10, y+15, z+3), FillOperation.REPLACE)
  blocks.fill(OAK_FENCE, world(x+10, y+15, z+2), world(x+10, y+15, z), FillOperation.REPLACE)
  blocks.fill(PLANKS_BIRCH, world(x+7, y+14, z+3), world(x+10, y+14, z+3), FillOperation.REPLACE)
  blocks.fill(PLANKS_BIRCH, world(x+10, y+14, z+2), world(x+10, y+14, z), FillOperation.REPLACE)
  blocks.place(TORCH, world(x+7, y+16, z+3))
  blocks.place(TORCH, world(x+10, y+16, z))
  blocks.fill(OAK_FENCE, world(x+10, y+18, z-4), world(x+10, y+18, z-6), FillOperation.REPLACE)
  blocks.fill(OAK_FENCE, world(x+10, y+18, z-7), world(x+7, y+18, z-7), FillOperation.REPLACE)
  blocks.fill(PLANKS_BIRCH, world(x+10, y+17, z-4), world(x+10, y+17, z-6), FillOperation.REPLACE)
  blocks.fill(PLANKS_BIRCH, world(x+10, y+17, z-7), world(x+7, y+17, z-7), FillOperation.REPLACE)
  blocks.place(TORCH, world(x+10, y+19, z-4))
  blocks.place(TORCH, world(x+7, y+19, z-7))
  blocks.fill(OAK_FENCE, world(x+3, y+21, z-7), world(x, y+21, z-7), FillOperation.REPLACE)
  blocks.fill(OAK_FENCE, world(x, y+21, z-6), world(x, y+21, z-4), FillOperation.REPLACE)
  blocks.fill(PLANKS_BIRCH, world(x+3, y+20, z-7), world(x, y+20, z-7), FillOperation.REPLACE)
  blocks.fill(PLANKS_BIRCH, world(x, y+20, z-6), world(x, y+20, z-4), FillOperation.REPLACE)
  blocks.place(TORCH, world(x+3, y+22, z-7))
  blocks.place(TORCH, world(x, y+22, z-4))

def baueboden():

  
  blocks.fill(LOG_OAK, world(23, -30, 28), world(7, -30, 12), FillOperation.REPLACE)
  blocks.fill(AIR, world(20, -30, 23), world(13, -30, 25), FillOperation.REPLACE)
  blocks.fill(AIR, world(20, -30, 22), world(18, -30, 22), FillOperation.REPLACE)

#der Holzboden des Hauses mit einem Loch, dass man hochlaufen kann #hier werden dann die Agenteneinstellungen für die Wände gemacht agent.set_assist(PLACE_ON_MOVE, True) agent.set_assist(DESTROY_OBSTACLES, True) agent.set_item(GLASS, 256, 1) agent.set_item(LOG_OAK, 256, 2) agent.set_slot(2) agent.teleport(world(24, -29, 29), NORTH)

def wand():

  
  laenge=18
  breite= 5
  agent.move(UP, 1)
  agent.set_assist(PLACE_ON_MOVE, False)
  agent.move(FORWARD,breite)
  agent.turn(TurnDirection.LEFT)
  agent.move(FORWARD,5)
  agent.set_assist(PLACE_ON_MOVE, True)
  agent.turn(TurnDirection.LEFT)
  wand()

def wand2(hoehe):

  n=0
  m=0
  for i in range(hoehe):
      while(m<4):
          if(n<3):
              agent.move(FORWARD, 1)
              agent.set_slot(1)
              agent.move(FORWARD, 4)
              agent.set_slot(2)
              agent.move(FORWARD, 1)
              n=n+1
          else:
              agent.turn(TurnDirection.LEFT)
              n=0
              m=m+1
      agent.move(UP, 1)
      m=0
  

def bodenanpassungen():

  #Damit die Treppe mit dem Boden Zusammenpasst
  blocks.fill(LOG_OAK, world(20, -30, 26), world(16, -30, 26), FillOperation.REPLACE)
  blocks.fill(LOG_OAK, world(20, -30, 21), world(17, -30, 21), FillOperation.REPLACE)

def Wasserfall():

  #Platz frei machen
  blocks.fill(AIR, world(12, -29, 18), world(17, -25, 22), FillOperation.REPLACE)
  blocks. fill(AIR, world(14, -30, 19), world(16, -24, 21), FillOperation. REPLACE)
  #Wasser einfügen
  blocks. fill(WATER, world(16, -24, 21), world(14, -24, 19), FillOperation. REPLACE)
  blocks. fill(LOG_OAK, world(16, -23, 21), world(14, -23, 19), FillOperation. REPLACE)
  #kleine Detail-Anpassungen
  blocks.place(LOG_OAK, world(14, -31, 19))
  blocks.place(LOG_OAK, world(14, -31, 20))
  blocks.place(LOG_OAK, world(13, -24, 18))
  blocks.place(LOG_OAK, world(13, -24, 22))
  blocks.place(LOG_OAK, world(17, -24, 18))
  blocks.place(LOG_OAK, world(17, -24, 22))
  #4 Lichter in der Mitte
  blocks.place(TORCH, world(13, -29, 18))
  blocks.place(TORCH, world(13, -29, 22))
  blocks.place(TORCH, world(17, -29, 22))
  blocks.place(TORCH, world(17, -29, 18))
  #Komplette belichtung des Raumes
  blocks.place(TORCH, world(12, -26, 12))
  blocks.place(TORCH, world(13, -26, 12))
  blocks.place(TORCH, world(18, -26, 12))
  blocks.place(TORCH, world(19, -26, 12))
  blocks.place(TORCH, world(23, -26, 17))
  blocks.place(TORCH, world(23, -26, 18))
  blocks.place(TORCH, world(23, -26, 23))
  blocks.place(TORCH, world(23, -26,24))
  blocks.place(TORCH, world(18, -26, 28))
  blocks.place(TORCH, world(17, -26, 28))
  blocks.place(TORCH, world(12, -26, 28))
  blocks.place(TORCH, world(11, -26, 28))
  blocks.place(TORCH, world(7, -26, 23))
  blocks.place(TORCH, world(7, -26, 22))
  blocks.place(TORCH, world(7, -26, 17))
  blocks.place(TORCH, world(7, -26, 16))

def cafeteria():

  #Bücherregal plazieren
  blocks.fill(BOOKSHELF, world(8, -29, 12), world(11, -27, 12), FillOperation.REPLACE)
  #Einen Freiraum schaffen
  blocks.fill(AIR, world(9, -29, 12), world(10, -28, 12), FillOperation.REPLACE)
  #2 andere Blöcke zur Abwechslung (In diesem Fall eine Crafting Table)
  blocks.fill(CRAFTING_TABLE, world(9, -29, 12), world(10, -29, 12), FillOperation.REPLACE)
  #Roter Teppich darüber
  blocks.fill(RED_CARPET, world(8, -26, 12), world(11, -26, 12), FillOperation.REPLACE)
  blocks.fill(BOOKSHELF, world(14, -29, 12), world(17, -27, 12), FillOperation.REPLACE)
  blocks.fill(AIR, world(15, -29, 12), world(16, -28, 12), FillOperation.REPLACE)
  blocks.fill(ENCHANTMENT_TABLE, world(15, -29, 12), world(16, -29, 12), FillOperation.REPLACE)
  blocks.fill(RED_CARPET, world(14, -26, 12), world(17, -26, 12), FillOperation.REPLACE)
  blocks.fill(BOOKSHELF, world(20, -29, 12), world(23, -27, 12), FillOperation.REPLACE)
  blocks.fill(AIR, world(21, -29, 12), world(22, -28, 12), FillOperation.REPLACE)
  blocks.fill(CRAFTER, world(21, -29, 12), world(22, -29, 12), FillOperation.REPLACE)
  blocks.fill(RED_CARPET, world(20, -26, 12), world(23, -26, 12), FillOperation.REPLACE)
  #Obsidian unter den Tischen um den tisch-Bereich darzustellen
  blocks.fill(OBSIDIAN, world(9, -30, 14), world(10, -30, 15), FillOperation.REPLACE)
  blocks.fill(OBSIDIAN, world(15, -30, 14), world(16, -30, 15), FillOperation.REPLACE)
  blocks.fill(OBSIDIAN, world(21, -30, 14), world(22, -30, 15), FillOperation.REPLACE)
  #Glass als Foundation des Tisches
  blocks.fill(GLASS, world(9, -29, 14), world(10, -29, 15), FillOperation.REPLACE)
  blocks.fill(GLASS, world(15, -29, 14), world(16, -29, 15), FillOperation.REPLACE)
  blocks.fill(GLASS, world(21, -29, 14), world(22, -29, 15), FillOperation.REPLACE)
  #Teppiche oben drauf zur Deko
  blocks.fill(BLACK_CARPET, world(9, -28, 14), world(10, -28, 15), FillOperation.REPLACE)
  blocks.fill(BLACK_CARPET, world(15, -28, 14), world(16, -28, 15), FillOperation.REPLACE)
  blocks.fill(BLACK_CARPET, world(21, -28, 14), world(22, -28, 15), FillOperation.REPLACE)

def GYM(x, y, z):

  #Gewichte Langhantel
  blocks.place(OBSIDIAN, world(x+7, y+31, z-1))
  blocks.place(OBSIDIAN, world(x+4, y+31, z-1))
  blocks.place(OBSIDIAN, world(x+4, y+31, z-5))
  blocks.place(OBSIDIAN, world(x+7, y+31, z-5))
  #Bodenmatte
  blocks.fill(BLACK_CARPET, world(x+6, y+31, z-2), world(x+5, y+31, z-4), FillOperation.REPLACE)
  #Langhantelstangen
  blocks.place(blocks.block_with_data(END_ROD, 5), world(x+6, y+31, z-1))
  blocks.place(blocks.block_with_data(END_ROD, 4), world(x+5, y+31, z-1))
  blocks.place(blocks.block_with_data(END_ROD, 5), world(x+6, y+31, z-5))
  blocks.place(blocks.block_with_data(END_ROD, 4), world(x+5, y+31, z-5))
  #Proteinshakedropper
  blocks.place(HONEYCOMB_BLOCK, world(x+2, y+31, z-7))
  blocks.place(blocks.block_with_data(LEVER, 3), world(x+2, y+32, z-6))
  blocks.place(blocks.block_with_data(DISPENSER, 0), world(x+2, y+32, z-7))
  blocks.place(HOPPER, world(x+2, y+33, z-7))
  #Zweiter Dropper
  blocks.place(HONEYCOMB_BLOCK, world(x+18, y+31, z-7))
  blocks.place(blocks.block_with_data(LEVER, 3), world(x+18, y+32, z-6))
  blocks.place(blocks.block_with_data(DISPENSER, 0), world(x+18, y+32, z-7))
  blocks.place(HOPPER, world(x+18, y+33, z-7))
  #Agent als Proteinlieferant
  agent.teleport(world (x+2, y+35, z-7), SOUTH)
  agent.set_item(HONEY_BOTTLE, 64, 1)
  agent.drop(DOWN, 1, 64)
  agent.teleport(world (x+18, y+35, z-7), SOUTH)
  agent.set_item(HONEY_BOTTLE, 64, 1)
  agent.drop(DOWN, 1, 64)
  #Bankdrücken
  blocks.fill(RED_CONCRETE, world(x+5, y+31, z+2), world(x+5, y+31, z+4), FillOperation.REPLACE)
  blocks.fill(BLACK_CARPET, world(x+5, y+32, z+2), world(x+5, y+32, z+4), FillOperation.REPLACE)
  blocks.place(OAK_FENCE, world(x+6, y+31, z+2))
  blocks.place(OAK_FENCE, world(x+6, y+32, z+2))
  blocks.place(OAK_FENCE, world(x+6, y+32, z+3))
  blocks.place(OAK_FENCE, world(x+4, y+31, z+2))
  blocks.place(OAK_FENCE, world(x+4, y+32, z+2))
  blocks.place(OAK_FENCE, world(x+4, y+32, z+3))
  #Kleine Gewichte
  blocks.fill(RED_CONCRETE, world(x+18, y+31, z-3), world(x+18, y+32, z), FillOperation.REPLACE)
  blocks.fill(RED_CONCRETE, world(x+17, y+31, z-3), world(x+17, y+31, z), FillOperation.REPLACE)
  blocks.fill(blocks.block_with_data(LEVER,6), world(x+17, y+32, z-3), world(x+17, y+32, z), FillOperation.REPLACE)
  blocks.fill(blocks.block_with_data(LEVER,6), world(x+18, y+33, z-3), world(x+18, y+33, z), FillOperation.REPLACE)

#Glasdach für das Hauses def Dach (x,y,z):

  pyramide=6
  for i in range(pyramide):
      blocks.fill(GLASS, world(x+i,y+i,z+i),world(x+18-i+1,y+i,z+18-i+1), FillOperation.REPLACE)

#Sätze fürs Hochlaufen def on_travelled_walk():

  x = player.position().get_value(Axis.X)
  y = player.position().get_value(Axis.Y)
  z = player.position().get_value(Axis.Z)
  #In diesem Teil wird gemacht, dass bei bestimmten Koordinaten ein Satz eingespielt wird.
  if (10<x<16) and (y==-57) and (22<z<25):
      gameplay.title(mobs.target(NEAREST_PLAYER), "Noch kannst du umdrehen.", "1/8")
  
  if (10<x<16) and (y==-48) and (13<z<19):
          gameplay.title(mobs.target(NEAREST_PLAYER), "Hälfte geschafft.", "4/8")
  if (10<x<16) and (y==-35) and (16<z<21):
          gameplay.title(mobs.target(NEAREST_PLAYER), "Wilkommen im Baumhaus", "8/8")

player.on_travelled(WALK, on_travelled_walk)

baueboden() wand2(5) bauetreppe() DEKO(10, -56, 22) Dach(6,-24,11) bauestamm() bodenanpassungen() Wasserfall() cafeteria() Baum2(6,-20,11,1)

#Wenn man in den Chat schreibt Gym dann spawnt das Gym def on_chat():

  GYM(5, -60, 23)

player.on_chat(„Gym“, on_chat)

gameplay.time_set(DayTime.NIGHT) gameplay.time_add(1000) gameplay.title(mobs.target(NEAREST_PLAYER), „Wilkommen“, „Zum Magischen Baumhaus!“)>

Zuerst geht man die Treppen zu dem Baumhaus nach oben, dann tritt man ein.

  • gf2/projekte/2024/minecraft/2d1gruppe2.1743954799.txt.gz
  • Zuletzt geändert: 2025/04/06 17:53
  • von perrens