gf2:projekte:2024:minecraft:2d1gruppe3

Dies ist eine alte Version des Dokuments!


Gruppe 3

Idee: ein Rennen, Super Mario like

Beschreibung: Rennstrecke ist gerade, hat einige Umwege und Abkürzungen. Um nicht unbefugte Abkürzungen zu nehmen, muss man Checkpoints überqueren.

Das Rennen hat 4 Teile 1. Runningtrack 2. Boot auf Eis 4. Elytra

Runningtrack:

  • Dropper die beim durchlaufen, Splashpotions mit negativen/positiven Effekten geben
  • Häuser neben oder auf der Strecke, in denen Parkours sind, an dessen Schluss man eine Pressure Plate findet oder so, die einen vorwärts teleportiert → Abkürzung
  • Easter eggs? → Knockback Sticks oder so, anderen Spielern das Leben schwer machen

24.03.: 4 Abschnitte im Runningtrack: Wüste, Honig, Schnee, Nether, 200m lang. Wüste: Kakteen (outside), Pyramide (inside) Schnee: Pouder-Snow, Iglu Nether: Portal (in/out), Lava Magma

Boot auf Eis:

  • Boot auf Eis
  • Boot bekommt man aus einer Chest
  • sehr viele Kurven die extrem nerven können
  • Man kann nicht sterben, nur gehindert werden

Schwimmen:

Unterwasser Atem → Zombies? Dreizäcke? 24.03.: Wir haben uns dazu entschieden, diesen Teil wegzulassen, weil wir nicht finden, dass er unbedingt nötig ist.

Elytra:

  • Man muss durch zwei Löcher in zwei Wänden fliegen mit nur einer Rakete um ins Ziel zu gelangen.

Offene Ideen: Mehrere Runden, Checkpoints - wurde weggestrichen

 
 
def on_travelled_swim_lava():
    mobs.apply_effect(FIRE_RESISTANCE, mobs.target(NEAREST_PLAYER), 2, 255)
    mobs.apply_effect(REGENERATION, mobs.target(NEAREST_PLAYER), 2, 255)
    player.teleport(world(40, -59, 1))
    player.tell(mobs.target(NEAREST_PLAYER), "Pass auf wo du hinfällst!")
player.on_travelled(SWIM_LAVA, on_travelled_swim_lava)
 
 
def on_forever():
    x = player.position().get_value(Axis.X)
    y = player.position().get_value(Axis.Y)
    z = player.position().get_value(Axis.Z)
    if (-1<x<3) and (-1<y<2) and (z==0):
            mobs.give(mobs.target(NEAREST_PLAYER), GRASS, 1)
 
loops.forever(on_forever)
 
def on_on_chat():
    blocks.fill(HONEYCOMB_BLOCK,
        world(1, -62, -27),
        world(57, -55, -16),
        FillOperation.HOLLOW)
    blocks.fill(HONEY_BLOCK,
        world(56, -61, -17),
        world(2, -61, -26),
        FillOperation.REPLACE)
    blocks.fill(AIR,
        world(56, -60, -17),
        world(56, -60, -26),
        FillOperation.REPLACE)
    blocks.fill(AIR,
        world(1, -55, -27),
        world(57, -55, -16),
        FillOperation.REPLACE)
    blocks.fill(AIR,
        world(1, -60, -18),
        world(1, -58, -25),
        FillOperation.REPLACE)
player.on_chat("bau", on_on_chat)

Eisstrecken Code (FEHLER DRINNEN ZUM BEHEBEN)

<code python> agent.set_assist(PLACE_ON_MOVE, True) agent.set_item(ICE, 64, 1) agent.set_slot(1)

dx = 8 # Breite der Strecke dy = 1 # Höhe der Strecke dz = 100 # Länge der Strecke

def build_ice_track(x,y,z):

    # Startkoordinaten
  

blocks.fill(ICE, world(x, y-1, z), world(x+8, y-1, z+20), FillOperation.REPLACE)

build_ice_track(38, -60, -4 ) def build_BIG_ice_track(x, y, z):

  k = 0  # Initialisiere k vor der Schleife
  while k < 5:  # Korrekte Syntax für die while-Schleife
      build_ice_track(x, y, z + k * 20)  # Korrektes Komma zwischen Argumenten
      k += 1  # Korrekte Inkrementierung von k

# Beispielaufruf der Funktion build_BIG_ice_track(56, -60, 9) player_pos = mc.player.getTilePos() last_check_z = player_pos.z

while True:

  player_pos = mc.player.getTilePos()
  
  # Prüfe, ob der Spieler 6 Blöcke vorangeschritten ist
  if player_pos.z - last_check_z >= 6:
      last_check_z = player_pos.z  # Update letzte Position
      
      # Wähle zufällige x-Koordinaten für die zwei Holzzäune
      fence_x1 = random.randint(player_pos.x, player_pos.x + 7)
      fence_x2 = random.randint(player_pos.x, player_pos.x + 7)
      
      # Platziere die Zäune 4 Blöcke vor dem Spieler
      fence_z = player_pos.z + 4
      mc.setBlock(fence_x1, player_pos.y, fence_z, 85)  # Holzzaun
      mc.setBlock(fence_x2, player_pos.y, fence_z, 85)  # Holzzaun
  
  time.sleep(0.5)
</ code>

<code python>

#Hier ist der richtige Code

def on_forever():

      x = player.position().get_value(Axis.X)
      y = player.position().get_value(Axis.Y)
      z = player.position().get_value(Axis.Z)
      if (-1<x<10) and (-66<y<2) and (-7<z<7):
              blocks.fill(COBWEB,
              world(4, -60, -6,),
              world(5, -59, 6),
              FillOperation.HOLLOW)
              blocks.fill(COBWEB,
              world(24, -60, -6,),
              world(25, -59, 6),
              FillOperation.HOLLOW)

loops.forever(on_forever)

def slow():

      x = player.position().get_value(Axis.X)
      y = player.position().get_value(Axis.Y)
      z = player.position().get_value(Axis.Z)
      if (32<x<62) and (-66<y<2) and (-7<z<7):
         player.execute("/effect @s slowness 20 3") 

loops.forever(slow)

def Box():

  blocks.fill(GLASS, 
  world(-7, -61, -4), 
  world(-15, -52, 4), 
  FillOperation.HOLLOW)

Box()

def on_on_chat():

  
  gameplay.title(mobs.target(ALL_PLAYERS), "Ready?", "")
  
  blocks.fill(SAND,
      world(0, -61, -6),
      world(50, -61, 6),
  FillOperation.HOLLOW)

#Schneegrund

  blocks.fill(SNOW,
      world(51, -61, -6),
      world(100, -61, 6),
      FillOperation.HOLLOW)

#Kaktus

  for i in range(1,50,1):
      if (i%9)==0:
          blocks.fill(CACTUS,
          world(i, -60, 5),
          world(i, -58, 5),
          FillOperation.HOLLOW)
  for i in range(-3,50,1):
      if (i%9)==0:
          blocks.fill(CACTUS,
          world(i, -60, -2),
          world(i, -58, -2),
          FillOperation.HOLLOW)
  for i in range(-1,50,1):
      if (i%7)==0:
          blocks.fill(CACTUS,
          world(i, -60, 0),
          world(i, -59, 0),
          FillOperation.HOLLOW)
  for i in range(1,50,1):
      if (i%11)==0:
          blocks.fill(CACTUS,
          world(i, -60, 1),
          world(i, -57, 1),
          FillOperation.HOLLOW)
  for i in range(-3,50,1):
      if (i%7)==0:
          blocks.fill(CACTUS,
          world(i, -60, 3),
          world(i, -59, 3),
          FillOperation.HOLLOW)
  for i in range(-3,50,1):
      if (i%7)==0:
          blocks.fill(CACTUS,
          world(i, -60, -6),
          world(i, -59, -6),
          FillOperation.HOLLOW)
  for i in range(1,50,1):
      if (i%10)==0:
          blocks.fill(CACTUS,
          world(i, -60, -4),
          world(i, -57, -4),
          FillOperation.HOLLOW)

#Eis

  for i in range(350):
          a=randint(51, 100)
          b=-61
          c=randint(-6, 6)
          blocks.fill(ICE, world(a, b, c), world(a, b, c), FillOperation.HOLLOW)
  blocks.place(BED, world(51, -60, -5))

#1. Layer

  blocks.fill(SNOW, world(61, -61, -7), world(85, -53, 7), FillOperation.HOLLOW)
  gameplay.title(mobs.target(ALL_PLAYERS), "Set", "")
  
  blocks.fill(SNOW, world(56, -60, -7), world(56, -55, 7), FillOperation.HOLLOW)
  blocks.fill(AIR,world(56, -60, -4), world(56, -57, 4), FillOperation.REPLACE)
  blocks.fill(AIR, world(56, -56, -2), world(56, -56, 2),FillOperation.REPLACE)
  blocks.fill(AIR,world(56, -58, -7), world(56, -55, -6), FillOperation.REPLACE)
  blocks.fill(AIR, world(56, -56, -5), world(56, -55, -5), FillOperation.REPLACE)
  blocks.fill(AIR, world(56, -55, -4), world(56, -55, -3), FillOperation.REPLACE)
  
  blocks.fill(AIR, world(56, -58, 7), world(56, -55, 6), FillOperation.REPLACE)
  
  blocks.fill(AIR, world(56, -56, 5), world(56, -55, 5), FillOperation.REPLACE)
  
  blocks.fill(AIR, world(56, -55, 4), world(56, -55, 3), FillOperation.REPLACE)
  

#2. Layer

  blocks.fill(SNOW, world(57, -60, -7), world(57, -55, 7), FillOperation.HOLLOW)
  blocks.fill(AIR, world(57, -56, -7), world(57, -55, -5), FillOperation.HOLLOW)
  blocks.fill(AIR, world(57, -55, -4), world(57, -55, -4), FillOperation.HOLLOW)
  blocks.fill(AIR, world(57, -57, -7), world(57, -57, -7), FillOperation.HOLLOW)
  blocks.fill(AIR, world(57, -56, 7), world(57, -55, 5), FillOperation.HOLLOW)
  blocks.fill(AIR, world(57, -55, 4), world(57, -55, 4), FillOperation.HOLLOW)
  blocks.fill(AIR, world(57, -57, 7), world(57, -57, 7), FillOperation.HOLLOW)
  blocks.fill(AIR, world(57, -60, -4), world(57, -57, 4), FillOperation.REPLACE)
  blocks.fill(AIR, world(57, -56, -2), world(57, -56, 2), FillOperation.REPLACE)

#3. Layer

  blocks.fill(SNOW, world(58, -60, -8), world(58, -54, 8), FillOperation.HOLLOW)
  blocks.fill(AIR, world(58, -56, -8), world(58, -54, -7), FillOperation.REPLACE)
  blocks.fill(AIR, world(58, -55, -6), world(58, -54, -6), FillOperation.REPLACE)
  blocks.fill(AIR, world(58, -54, -5), world(58, -54, -3), FillOperation.REPLACE)
  blocks.fill(AIR, world(58, -56, 8), world(58, -54, 7), FillOperation.REPLACE)
  blocks.fill(AIR, world(58, -55, 6), world(58, -54, 6), FillOperation.REPLACE)
  blocks.fill(AIR, world(58, -54, 5), world(58, -54, 3), FillOperation.REPLACE)
  blocks.fill(AIR, world(58, -60, -4), world(58, -57, 4), FillOperation.REPLACE)
  blocks.fill(AIR, world(58, -56, -2), world(58, -56, 2), FillOperation.REPLACE)

#4. Layer

  blocks.fill(SNOW, world(59, -60, -9), world(59, -53, 9), FillOperation.HOLLOW)
  blocks.fill(AIR, world(59, -56, -9), world(59, -53, -9), FillOperation.REPLACE)
  blocks.fill(AIR, world(59, -55, -8), world(59, -53, -8), FillOperation.REPLACE)
  blocks.fill(AIR, world(59, -54, -7), world(59, -53, -7), FillOperation.REPLACE)
  blocks.fill(AIR, world(59, -53, -6), world(59, -53, -4), FillOperation.REPLACE)
  blocks.fill(AIR, world(59, -56, 9), world(59, -53, 9), FillOperation.REPLACE)
  blocks.fill(AIR, world(59, -55, 8), world(59, -53, 8), FillOperation.REPLACE)
  blocks.fill(AIR, world(59, -54, 7), world(59, -53, 7), FillOperation.REPLACE)
  blocks.fill(AIR, world(59, -53, 6), world(59, -53, 4), FillOperation.REPLACE)
  blocks.fill(AIR, world(59, -60, -4), world(59, -57, 4), FillOperation.REPLACE)
  blocks.fill(AIR, world(59, -56, -2), world(59, -56, 2), FillOperation.REPLACE)

#Box Weg

  gameplay.title(mobs.target(ALL_PLAYERS), "GOOOO!!", "")
  
  blocks.fill(AIR, world(-7, -61, -4), world(-15, -52, 4), FillOperation.HOLLOW)

#5. Layer

  blocks.fill(SNOW, world(60, -60, -9), world(60, -52, 9), FillOperation.HOLLOW)
  blocks.fill(AIR, world(60, -56, -9), world(60, -52, -9), FillOperation.REPLACE)
  blocks.fill(AIR, world(60, -54, -8), world(60, -52, -8), FillOperation.REPLACE)
  blocks.fill(AIR, world(60, -53, -7), world(60, -52, -7), FillOperation.REPLACE)
  blocks.fill(AIR, world(60, -52, -6), world(60, -52, -4), FillOperation.REPLACE)
  blocks.fill(AIR, world(60, -56, 9), world(60, -52, 9), FillOperation.REPLACE)
  blocks.fill(AIR, world(60, -54, 8), world(60, -52, 8), FillOperation.REPLACE)
  blocks.fill(AIR, world(60, -53, 7), world(60, -52, 7), FillOperation.REPLACE)
  blocks.fill(AIR, world(60, -52, 6), world(60, -52, 4), FillOperation.REPLACE)
  blocks.fill(AIR, world(60, -60, -4), world(60, -57, 4), FillOperation.REPLACE)
  blocks.fill(AIR, world(60, -56, -2), world(60, -56, 2), FillOperation.REPLACE)

#6. Layer

  blocks.fill(SNOW, world(61, -60, -9), world(61, -51, 9), FillOperation.HOLLOW)
  blocks.fill(POWDER_SNOW, world(61, -61, -6), world(85, -64, 6), FillOperation.HOLLOW)
  
  blocks.fill(SNOW, world(61, -61, 2), world(61, -61, 2), FillOperation.HOLLOW)
  blocks.fill(SNOW, world(62, -61, -6), world(64, -61, 6), FillOperation.HOLLOW)
  blocks.fill(RED_CONCRETE, world(65, -61, -6), world(65, -61, 6), FillOperation.HOLLOW)
  blocks.fill(AIR, world(61, -56, -9), world(61, -51, -9), FillOperation.REPLACE)
  blocks.fill(AIR, world(61, -53, -8), world(61, -51, -8), FillOperation.REPLACE)
  blocks.fill(AIR, world(61, -52, -7), world(61, -51, -7), FillOperation.REPLACE)
  blocks.fill(AIR, world(61, -51, -6), world(61, -51, -5), FillOperation.REPLACE)
  blocks.fill(AIR, world(61, -56, 9), world(61, -51, 9), FillOperation.REPLACE)
  blocks.fill(AIR, world(61, -53, 8), world(61, -51, 8), FillOperation.REPLACE)
  blocks.fill(AIR, world(61, -52, 7), world(61, -51, 7), FillOperation.REPLACE)
  blocks.fill(AIR, world(61, -51, 6), world(61, -51, 5), FillOperation.REPLACE)    
  for i in range(-7,7,1):
      if (i%2)==0:
          blocks.fill(AIR,
          world(61, -60, i),
          world(61, -59, i),
          FillOperation.HOLLOW)

#Wegweiser

  blocks.fill(GLOWSTONE, world(65, -53, 0), world(66, -53, 0), FillOperation.REPLACE)
  blocks.fill(GLOWSTONE, world(66, -53, -1), world(66, -53, -3), FillOperation.REPLACE)
  blocks.fill(GLOWSTONE, world(67, -53, -3), world(68, -53, -3), FillOperation.REPLACE)
  blocks.fill(GLOWSTONE, world(68, -53, -4), world(68, -53, -5), FillOperation.REPLACE)
  blocks.fill(GLOWSTONE, world(69, -53, -5), world(70, -53, -5), FillOperation.REPLACE)
  blocks.fill(GLOWSTONE, world(71, -53, -5), world(71, -53, -1), FillOperation.REPLACE)
  blocks.fill(GLOWSTONE, world(70, -53, -1), world(69, -53, -1), FillOperation.REPLACE)
  blocks.fill(GLOWSTONE, world(69, -53, 0), world(69, -53, 1), FillOperation.REPLACE)
  blocks.fill(GLOWSTONE, world(70, -53, 1), world(72, -53, 1), FillOperation.REPLACE)
  blocks.fill(GLOWSTONE, world(72, -53, 2), world(72, -53, 4), FillOperation.REPLACE)
  blocks.fill(GLOWSTONE, world(75, -53, 4), world(75, -53, 2), FillOperation.REPLACE)
  blocks.fill(GLOWSTONE, world(74, -53, 2), world(74, -53, 0), FillOperation.REPLACE)
  blocks.fill(GLOWSTONE, world(75, -53, 0), world(76, -53, 0), FillOperation.REPLACE)
  blocks.fill(GLOWSTONE, world(76, -53, -1), world(76, -53, -2), FillOperation.REPLACE)
  blocks.fill(GLOWSTONE, world(75, -53, -5), world(75, -53, -2), FillOperation.REPLACE)
  blocks.fill(GLOWSTONE, world(76, -53, -5), world(79, -53, -5), FillOperation.REPLACE)
  blocks.fill(GLOWSTONE, world(79, -53, -4), world(80, -53, -4), FillOperation.REPLACE)

#Weg

  blocks.fill(SNOW, world(66, -61, 0), world(66, -61, 0), FillOperation.REPLACE)
  blocks.fill(SNOW, world(66, -61, -1), world(66, -61, -3), FillOperation.REPLACE)
  blocks.fill(SNOW, world(67, -61, -3), world(68, -61, -3), FillOperation.REPLACE)
  blocks.fill(SNOW, world(68, -61, -4), world(68, -61, -5), FillOperation.REPLACE)
  blocks.fill(SNOW, world(69, -61, -5), world(70, -61, -5), FillOperation.REPLACE)
  blocks.fill(SNOW, world(71, -61, -5), world(71, -61, -1), FillOperation.REPLACE)
  blocks.fill(SNOW, world(70, -61, -1), world(69, -61, -1), FillOperation.REPLACE)
  blocks.fill(SNOW, world(69, -61, 0), world(69, -61, 1), FillOperation.REPLACE)
  blocks.fill(SNOW, world(70, -61, 1), world(72, -61, 1), FillOperation.REPLACE)
  blocks.fill(SNOW, world(72, -61, 2), world(72, -61, 4), FillOperation.REPLACE)
  blocks.fill(SNOW, world(75, -61, 4), world(75, -61, 2), FillOperation.REPLACE)
  blocks.fill(SNOW, world(74, -61, 2), world(74, -61, 0), FillOperation.REPLACE)
  blocks.fill(SNOW, world(75, -61, 0), world(76, -61, 0), FillOperation.REPLACE)
  blocks.fill(SNOW, world(76, -61, -1), world(76, -61, -2), FillOperation.REPLACE)
  blocks.fill(SNOW, world(75, -61, -5),  world(75, -61, -2), FillOperation.REPLACE)
  blocks.fill(SNOW, world(76, -61, -5), world(79, -61, -5), FillOperation.REPLACE)
  blocks.fill(SNOW, world(79, -61, -4), world(80, -61, -4), FillOperation.REPLACE)

#Savezone

  blocks.fill(RED_CONCRETE, world(81, -61, -6), world(81, -61, 6), FillOperation.HOLLOW)
  blocks.fill(SNOW, world(82, -61, -6), world(84, -61, 6), FillOperation.HOLLOW)
  blocks.place(SNOW, world(85, -61, 4))
  

#Backside #1. Layer

  blocks.fill(SNOW, world(85, -60, -9), world(85, -51, 9), FillOperation.HOLLOW)
  blocks.fill(AIR, world(85, -56, -9), world(85, -51, -9), FillOperation.REPLACE)
  blocks.fill(AIR, world(85, -53, -8), world(85, -51, -8), FillOperation.REPLACE)
  blocks.fill(AIR, world(85, -52, -7), world(85, -51, -7), FillOperation.REPLACE)
  blocks.fill(AIR, world(85, -51, -6), world(85, -51, -5), FillOperation.REPLACE)
  blocks.fill(AIR, world(85, -56, 9), world(85, -51, 9), FillOperation.REPLACE)
  blocks.fill(AIR, world(85, -53, 8), world(85, -51, 8), FillOperation.REPLACE)
  blocks.fill(AIR, world(85, -52, 7), world(85, -51, 7), FillOperation.REPLACE)
  blocks.fill(AIR, world(85, -51, 6), world(85, -51, 5), FillOperation.REPLACE)
  for i in range(-7,7,1):
      if (i%2)==0:
          blocks.fill(AIR,
          world(85, -60, i),
          world(85, -59, i),
          FillOperation.HOLLOW)

#2. Layer

  blocks.fill(SNOW, world(86, -60, -9), world(86, -52, 9), FillOperation.HOLLOW)
  blocks.fill(AIR, world(86, -56, -9), world(86, -52, -9), FillOperation.REPLACE)
  blocks.fill(AIR,
  world(86, -54, -8),
  world(86, -52, -8),
  FillOperation.REPLACE)
  blocks.fill(AIR, world(86, -53, -7), world(86, -52, -7), FillOperation.REPLACE)
  blocks.fill(AIR, world(86, -52, -6), world(86, -52, -4), FillOperation.REPLACE)
  blocks.fill(AIR, world(86, -56, 9), world(86, -52, 9), FillOperation.REPLACE)
  blocks.fill(AIR, world(86, -54, 8), world(86, -52, 8), FillOperation.REPLACE)
  blocks.fill(AIR, world(86, -53, 7), world(86, -52, 7), FillOperation.REPLACE)
  blocks.fill(AIR, world(86, -52, 6), world(86, -52, 4), FillOperation.REPLACE)
  blocks.fill(AIR, world(86, -60, -4), world(86, -57, 4), FillOperation.REPLACE)
  blocks.fill(AIR, world(86, -56, -2), world(86, -56, 2), FillOperation.REPLACE)

#3. Layer

  blocks.fill(SNOW, world(87, -60, -9), world(87, -53, 9), FillOperation.HOLLOW)
  blocks.fill(AIR, world(87, -56, -9), world(87, -53, -9), FillOperation.REPLACE)
  blocks.fill(AIR, world(87, -55, -8), world(87, -53, -8), FillOperation.REPLACE)
  blocks.fill(AIR, world(87, -54, -7), world(87, -53, -7), FillOperation.REPLACE)
  blocks.fill(AIR, world(87, -53, -6), world(87, -53, -4), FillOperation.REPLACE)
  blocks.fill(AIR, world(87, -56, 9), world(87, -53, 9), FillOperation.REPLACE)
  blocks.fill(AIR, world(87, -55, 8), world(87, -53, 8), FillOperation.REPLACE)
  blocks.fill(AIR, world(87, -54, 7), world(87, -53, 7), FillOperation.REPLACE)
  blocks.fill(AIR, world(87, -53, 6), world(87, -53, 4), FillOperation.REPLACE)
  blocks.fill(AIR, world(87, -60, -4), world(87, -57, 4), FillOperation.REPLACE)
  blocks.fill(AIR, world(87, -56, -2), world(87, -56, 2), FillOperation.REPLACE)

#4. Layer

  blocks.fill(SNOW, world(88, -60, -8), world(88, -54, 8), FillOperation.HOLLOW)
  blocks.fill(AIR, world(88, -56, -8), world(88, -54, -7), FillOperation.REPLACE)
  blocks.fill(AIR, world(88, -55, -6), world(88, -54, -6), FillOperation.REPLACE)
  blocks.fill(AIR, world(88, -54, -5), world(88, -54, -3), FillOperation.REPLACE)
  blocks.fill(AIR, world(88, -56, 8), world(88, -54, 7), FillOperation.REPLACE)
  blocks.fill(AIR, world(88, -55, 6), world(88, -54, 6), FillOperation.REPLACE)
  blocks.fill(AIR, world(88, -54, 5), world(88, -54, 3), FillOperation.REPLACE)
  blocks.fill(AIR, world(88, -60, -4), world(88, -57, 4), FillOperation.REPLACE)
  blocks.fill(AIR, world(88, -56, -2), world(88, -56, 2), FillOperation.REPLACE)

#5. Layer

  blocks.fill(SNOW, world(89, -60, -7), world(89, -55, 7), FillOperation.HOLLOW)
  blocks.fill(AIR, world(89, -56, -7), world(89, -55, -5), FillOperation.HOLLOW)
  blocks.fill(AIR, world(89, -55, -4), world(89, -55, -4), FillOperation.HOLLOW)
  blocks.fill(AIR, world(89, -57, -7), world(89, -57, -7), FillOperation.HOLLOW)
  blocks.fill(AIR, world(89, -56, 7), world(89, -55, 5), FillOperation.HOLLOW)
  blocks.fill(AIR, world(89, -55, 4), world(89, -55, 4), FillOperation.HOLLOW)
  blocks.fill(AIR, world(89, -57, 7), world(89, -57, 7), FillOperation.HOLLOW)
  blocks.fill(AIR, world(89, -60, -4), world(89, -57, 4), FillOperation.REPLACE)
  blocks.fill(AIR, world(89, -56, -2), world(89, -56, 2), FillOperation.REPLACE)

#6. Layer

  blocks.fill(SNOW, world(90, -60, -7), world(90, -55, 7), FillOperation.HOLLOW)
  blocks.fill(AIR, world(90, -60, -4), world(90, -57, 4), FillOperation.REPLACE)
  blocks.fill(AIR, world(90, -56, -2), world(90, -56, 2), FillOperation.REPLACE)
  blocks.fill(AIR, world(90, -58, -7), world(90, -55, -6), FillOperation.REPLACE)
  blocks.fill(AIR, world(90, -56, -5), world(90, -55, -5), FillOperation.REPLACE)
  blocks.fill(AIR, world(90, -55, -4), world(90, -55, -3), FillOperation.REPLACE)
  
  blocks.fill(AIR, world(90, -58, 7), world(90, -55, 6), FillOperation.REPLACE)
  
  blocks.fill(AIR, world(90, -56, 5), world(90, -55, 5), FillOperation.REPLACE)
  
  blocks.fill(AIR, world(90, -55, 4), world(90, -55, 3), FillOperation.REPLACE)

player.on_chat(„start“, on_on_chat)

def on_travelled_swim_lava():

  mobs.apply_effect(FIRE_RESISTANCE, mobs.target(NEAREST_PLAYER), 2, 255)
  mobs.apply_effect(REGENERATION, mobs.target(NEAREST_PLAYER), 2, 255)
  player.teleport(world(100, -59, 0))
  player.tell(mobs.target(NEAREST_PLAYER), "Pass auf wo du hinfällst!")

player.on_travelled(SWIM_LAVA, on_travelled_swim_lava)

#Lavapart def on_travelled_swim_lava():

  mobs.apply_effect(FIRE_RESISTANCE, mobs.target(NEAREST_PLAYER), 2, 255)
  mobs.apply_effect(REGENERATION, mobs.target(NEAREST_PLAYER), 2, 255)
  player.teleport(world(100, -59, 0))
  player.tell(mobs.target(NEAREST_PLAYER), "Pass auf wo du hinfällst!")

player.on_travelled(SWIM_LAVA, on_travelled_swim_lava)

def on_on_chat():

  # boden
    blocks.fill(GLASS, world(150, -60, -7), world(91, -55, -7), FillOperation.HOLLOW)
    blocks.fill(GLASS, world(150, -60, 7), world(91, -55, 7), FillOperation.HOLLOW)
    blocks.fill(NETHERRACK,
        world(101, -61, -6),
        world(150, -61, 6),
        FillOperation.REPLACE)
  #treppe
    blocks.fill(NETHER_BRICK_STAIRS,
        world(101, -60, -2),
        world(101, -60, 2),
        FillOperation.REPLACE)
    blocks.fill(NETHER_BRICK,
        world(103, -60, 2),
        world(102, -59, -2),
        FillOperation.REPLACE)
    
    blocks.fill(NETHER_BRICK_STAIRS,
        world(103, -58, -2),
        world(103, -58, 2),
        FillOperation.REPLACE)
    
    blocks.fill(NETHER_BRICK_STAIRS,
        world(102, -59, -2),
        world(102, -59, 2),
        FillOperation.REPLACE)
  # Festung1
    blocks.fill(NETHER_BRICK,
        world(104, -60, 3),
        world(112, -58, -3),
        FillOperation.REPLACE)
    blocks.fill(AIR,
        world(107, -60, -3),
        world(109, -58, 3),
        FillOperation.REPLACE)
    blocks.fill(NETHER_BRICK,
        world(134, -60, 3),
        world(142, -58, -3),
        FillOperation.REPLACE)
  # Lava
    blocks.fill(LAVA,
        world(107, -61, -3),
        world(109, -61, 3),
        FillOperation.REPLACE)
    blocks.fill(LAVA,
        world(113, -61, -6),
        world(133, -61, 6),
        FillOperation.REPLACE)
    blocks.fill(LAVA,
        world(143, -61, -6),
        world(146, -61, 6),
        FillOperation.REPLACE)
  # Säulen
    blocks.fill(CHISELED_NETHER_BRICKS,
        world(115, -61, 4),
        world(116, -58, 3),
        FillOperation.REPLACE)
    blocks.fill(CHISELED_NETHER_BRICKS,
        world(118, -61, 1),
        world(119, -58, 0),
        FillOperation.REPLACE)
    blocks.fill(CHISELED_NETHER_BRICKS,
        world(117, -61, -3),
        world(118, -58, -4),
        FillOperation.REPLACE)
    blocks.fill(CHISELED_NETHER_BRICKS,
        world(122, -61, 1),
        world(123, -58, 0),
        FillOperation.REPLACE)
    blocks.fill(CHISELED_NETHER_BRICKS,
        world(125, -61, -1),
        world(126, -58, -2),
        FillOperation.REPLACE)
    blocks.fill(CHISELED_NETHER_BRICKS,
        world(125, -61, -1),
        world(126, -58, -2),
        FillOperation.REPLACE)
    blocks.fill(CHISELED_NETHER_BRICKS,
        world(129, -61, -4),
        world(130, -58, -5),
        FillOperation.REPLACE)
    blocks.fill(CHISELED_NETHER_BRICKS,
        world(129, -61, 3),
        world(130, -58, 2),
        FillOperation.REPLACE)
        

player.on_chat(„start“, on_on_chat)

def on_forever():

      x = player.position().get_value(Axis.X)
      y = player.position().get_value(Axis.Y)
      z = player.position().get_value(Axis.Z)
      if (139<x<150) and (-66<y<2) and (-7<z<7):
        mobs.give(mobs.target(NEAREST_PLAYER), BOAT, 1)                  

loops.forever(on_forever) #Icestrecke def on_forever():

      x = player.position().get_value(Axis.X)
      y = player.position().get_value(Axis.Y)
      z = player.position().get_value(Axis.Z)
      if (139<x<150) and (-66<y<2) and (-7<z<7):
        mobs.give(mobs.target(NEAREST_PLAYER), BOAT, 1)                  

loops.forever(on_forever)

def on_on_chat():

  blocks.fill(ICE, world(151, -61, -6), world(250, -61, 6), FillOperation.HOLLOW)
  blocks.fill(GLASS_PANE, world(151, -60, -7), world(251, -55, -7), FillOperation.HOLLOW)
  blocks.fill(GLASS_PANE, world(151, -60, 7), world(251, -55, 7), FillOperation.HOLLOW)
  blocks.fill(SNOW, world(161, -60, -6), world(161, -59, 0), FillOperation.REPLACE)
  blocks.fill(SNOW, world(165, -60, 6), world(165, -59, 0), FillOperation.REPLACE)
  blocks.fill(SNOW, world(157, -60, 6), world(157, -59, 0), FillOperation.REPLACE)
  for i in range(10):
          a=randint(180, 200)
          b=-60
          c=randint(-6, 6)
          blocks.fill(ICE, world(a, b, c), world(a, b, c), FillOperation.HOLLOW)
  for i in range(20):
          a=randint(200, 240)
          b=-60
          c=randint(-6, 6)
          blocks.fill(SNOW, world(a, b, c), world(a, b, c), FillOperation.HOLLOW)

player.on_chat(„Start“, on_on_chat)

#Elytrapart def on_forever():

  x = player.position().get_value(Axis.X)
  y = player.position().get_value(Axis.Y)
  z = player.position().get_value(Axis.Z)
  if ((244<x<254) and (-62<y<-55) and (-7<z<7)):
      player.execute("/give @s ELYTRA 1") 
      player.execute("/give @s FIREWORK_ROCKET 1")        

loops.forever(on_forever)

def Rampe():

  blocks.fill(LIGHT_BLUE_WOOL, world(255, -60, -6), world(257, -58, 6), FillOperation.REPLACE)
  blocks.fill(AIR, world(255, -59, -6), world(155, -50, 6), FillOperation.REPLACE)
  blocks.fill(AIR, world(256, -58, -6), world(156, -58, 6), FillOperation.REPLACE)

Rampe()

def wände():

  blocks.fill(LIGHT_BLUE_WOOL, world(326, -60, -7), world(326, -20, 7), FillOperation.REPLACE)
  blocks.fill(AIR, world(326, -39, -5), world(326, -37, -6), FillOperation.REPLACE)
  blocks.fill(AIR, world(326, -60, 0), world(326, -59, 0), FillOperation.REPLACE)
  blocks.fill(LIGHT_BLUE_WOOL, world(390, -60, -7), world(390, -20, 7), FillOperation.REPLACE)
  blocks.fill(AIR, world(390, -51, 3), world(390, -49, 4), FillOperation.REPLACE)
  blocks.fill(AIR, world(390, -60, 0), world(390, -59, 0), FillOperation.REPLACE)

wände()

def sicherung():

  blocks.fill(GLASS, world(251, -60, 7), world(351, -20, 7), FillOperation.HOLLOW)
  blocks.fill(GLASS, world(251, -60, -7), world(351, -20, -7), FillOperation.HOLLOW)
  blocks.fill(GLASS, world(352, -60, 7), world(425, -20, 7), FillOperation.HOLLOW)
  blocks.fill(GLASS, world(352, -60, -7), world(425, -20, -7), FillOperation.HOLLOW)
  blocks.fill(GLASS, world(425, -60, 7), world(425, -20, -7), FillOperation.HOLLOW)
  blocks.fill(GLASS, world(251, -20, -7), world(351, -20, 7), FillOperation.HOLLOW)
  blocks.fill(GLASS, world(352, -20, 7), world(425, -20, -7), FillOperation.HOLLOW)

sicherung()

#Ziel def on_forever():

      x = player.position().get_value(Axis.X)
      y = player.position().get_value(Axis.Y)
      z = player.position().get_value(Axis.Z)
      if (419<x<426) and (-66<y<-20) and (-7<z<7):
        player.teleport(world(0, 0, 0))

loops.forever(on_forever)

blocks.fill(GLASS, world(5, 0, -5), world(-5, 0, 5), FillOperation.REPLACE)

def WOW():

      x = player.position().get_value(Axis.X)
      y = player.position().get_value(Axis.Y)
      z = player.position().get_value(Axis.Z)
      if (x==0) and (-3<y<10) and (-1<z<1):
          gameplay.title(mobs.target(NEAREST_PLAYER), "You did it!", "")    

loops.forever(WOW) (/ code)

Anleitung: Alle Infinite Loops müssen die Spieler auf ihrem Laptop einfügen. Der rest wird von einem Gamemaster bei seinem Laptop eingefügt. Man muss jedoch die verschiedenen Abteile einzelt Laden (Sand+Iglu, Lava, Eisstrecke, Elytra) damit es funktioniert, da die strecke zu gross ist um sie mit einem Code aufzubauen. Sobald man dann Start in den Chat schreibt und das Sand+Iglu Programm offen hat, wird nach einiger zeit die Glaskugel gelöscht und die spieler können spass haben. Wer als als erstes im Ziel ist hat gewonnen, doch in unseren Augen ist jeder ein Sieger und somit gewinnen alle ;)

  • gf2/projekte/2024/minecraft/2d1gruppe3.1743967932.txt.gz
  • Zuletzt geändert: 2025/04/06 21:32
  • von raemysi