gf2:projekte:2023:minecraft:2d1gruppe1

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen Revision Vorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
gf2:projekte:2023:minecraft:2d1gruppe1 [2024/01/23 23:56] decorvetcgf2:projekte:2023:minecraft:2d1gruppe1 [2024/03/08 21:05] (aktuell) marroc
Zeile 1: Zeile 1:
 +{{ :gf2:projekte:2023:minecraft:zoo_gr1.mcworld |Welt}}
 -**Idee:** Zoo mit verschiedenen Bereichen (je nach Tierart) -**Idee:** Zoo mit verschiedenen Bereichen (je nach Tierart)
  
Zeile 17: Zeile 18:
  
  
-<code python> 
-<code> 
  
  
-**Definition für unsere Eingangshäuschen** 
  
 +**Definition für unsere Eingangshäuschen**
 +<code python>
 +<code>
 def haus(): def haus():
     blocks.fill(PLANKS_DARK_OAK, world(18, -61, 31), world(8, -57, 37), FillOperation.HOLLOW)     blocks.fill(PLANKS_DARK_OAK, world(18, -61, 31), world(8, -57, 37), FillOperation.HOLLOW)
Zeile 37: Zeile 38:
     blocks.place(FLOWER_POT, world(9, -59, 35))     blocks.place(FLOWER_POT, world(9, -59, 35))
     blocks.place(FLOWER_POT, world(17, -59, 35))     blocks.place(FLOWER_POT, world(17, -59, 35))
 +    </code>
 ** **
 Definition für unseren Eingangsbereich** Definition für unseren Eingangsbereich**
 +<code python>
 def eingang(): def eingang():
     blocks.fill(PLANKS_DARK_OAK, world(3, -56, 37), world(25, -56, 37), FillOperation.REPLACE)     blocks.fill(PLANKS_DARK_OAK, world(3, -56, 37), world(25, -56, 37), FillOperation.REPLACE)
Zeile 46: Zeile 48:
     blocks.fill(PLANKS_OAK, world(3, -60, 37), world(3, -57, 37), FillOperation.REPLACE)     blocks.fill(PLANKS_OAK, world(3, -60, 37), world(3, -57, 37), FillOperation.REPLACE)
     blocks.fill(PLANKS_OAK, world(3, -57, 37), world(7, -57, 37), FillOperation.REPLACE)     blocks.fill(PLANKS_OAK, world(3, -57, 37), world(7, -57, 37), FillOperation.REPLACE)
 +     </code>
 ** **
 Definition für unsere Ställe** Definition für unsere Ställe**
- +<code python>
 def hütte(x,z,y,l,b,): def hütte(x,z,y,l,b,):
     blocks.fill(PLANKS_DARK_OAK, world(x, z-1, y), world(x+b, z+4, y+l), FillOperation.HOLLOW)     blocks.fill(PLANKS_DARK_OAK, world(x, z-1, y), world(x+b, z+4, y+l), FillOperation.HOLLOW)
Zeile 56: Zeile 59:
     blocks.fill(PLANKS_DARK_OAK, world(x+b-1, z+4, y+l), world(x+b-1, z+4, y), FillOperation.REPLACE)     blocks.fill(PLANKS_DARK_OAK, world(x+b-1, z+4, y+l), world(x+b-1, z+4, y), FillOperation.REPLACE)
     blocks.place(DARK_OAK_DOOR, world(x, z, y-1))     blocks.place(DARK_OAK_DOOR, world(x, z, y-1))
 +   </code>
    
 **Definition für unsere Mauer, welche den Zoo umschliesst** **Definition für unsere Mauer, welche den Zoo umschliesst**
 +<code python>
 def mauer(x,z,y,l,b): def mauer(x,z,y,l,b):
     blocks.fill(PLANKS_DARK_OAK, world(x, z, y), world(x+b, z+4, y+l), FillOperation.REPLACE)     blocks.fill(PLANKS_DARK_OAK, world(x, z, y), world(x+b, z+4, y+l), FillOperation.REPLACE)
- +   </code>
 **Definition für unsere Gehege (Gitter)** **Definition für unsere Gehege (Gitter)**
 +<code python>
 def gehege(x,z,y,l,b): def gehege(x,z,y,l,b):
     blocks.fill(IRON_BARS, world(x, z, y), world(x+b,z+4, y), FillOperation.REPLACE)     blocks.fill(IRON_BARS, world(x, z, y), world(x+b,z+4, y), FillOperation.REPLACE)
     blocks.fill(IRON_BARS, world(x, z, y), world(x,z+4, y+l), FillOperation.REPLACE)     blocks.fill(IRON_BARS, world(x, z, y), world(x,z+4, y+l), FillOperation.REPLACE)
- +   </code>
 **Definition für unsere Gehege (Holzbereich)** **Definition für unsere Gehege (Holzbereich)**
 +<code python>
 def zaun(x,z,y,l,b): def zaun(x,z,y,l,b):
     blocks.fill(JUNGLE_FENCE, world(x,z,y), world(x, z,y+l), FillOperation.REPLACE)     blocks.fill(JUNGLE_FENCE, world(x,z,y), world(x, z,y+l), FillOperation.REPLACE)
     blocks.fill(JUNGLE_FENCE, world(x,z,y), world(x+b,z,y), FillOperation.REPLACE)     blocks.fill(JUNGLE_FENCE, world(x,z,y), world(x+b,z,y), FillOperation.REPLACE)
- +   </code>
    
 **Definition für unsere Voliere** **Definition für unsere Voliere**
 +<code python>
 def voliere(x,z,y,l,b): def voliere(x,z,y,l,b):
     blocks.fill(GLASS_PANE, world(x, z-1, y), world(x+b,z+11,y+l), FillOperation.HOLLOW)     blocks.fill(GLASS_PANE, world(x, z-1, y), world(x+b,z+11,y+l), FillOperation.HOLLOW)
     blocks.fill(GRASS, world(x, z-1, y), world(x+b,z-1,y+l), FillOperation.HOLLOW)     blocks.fill(GRASS, world(x, z-1, y), world(x+b,z-1,y+l), FillOperation.HOLLOW)
     blocks.fill(GLASS, world(x, z+11, y), world(x+b,z+11,y+l), FillOperation.HOLLOW)     blocks.fill(GLASS, world(x, z+11, y), world(x+b,z+11,y+l), FillOperation.HOLLOW)
-    +      </code>
 **Definition für den Picknickbereich (Tische)** **Definition für den Picknickbereich (Tische)**
- + <code python>
 def tisch(x,z,y): def tisch(x,z,y):
     a=0     a=0
Zeile 93: Zeile 97:
         x=x+1         x=x+1
     blocks.place(JUNGLE_SAPLING, world(x+3, z, y))     blocks.place(JUNGLE_SAPLING, world(x+3, z, y))
-    +      </code>
  **Definition für das Setzen der Tiere durch den Agenten **  **Definition für das Setzen der Tiere durch den Agenten **
- + <code python>
 def spawn(tier,anzahl,x,z,y): def spawn(tier,anzahl,x,z,y):
     agent.teleport(world(x,z, y),WEST)     agent.teleport(world(x,z, y),WEST)
Zeile 104: Zeile 108:
         agent.place(FORWARD)         agent.place(FORWARD)
         a=a+1         a=a+1
 +  </code>
 **EIngangsbereich** **EIngangsbereich**
 +<code python>
 haus() haus()
 spawn(SPAWN_VILLAGER, 1, 18, -60, 34) spawn(SPAWN_VILLAGER, 1, 18, -60, 34)
Zeile 113: Zeile 117:
 blocks.print("DER", RED_CONCRETE, world(-15, -60, 38), EAST) blocks.print("DER", RED_CONCRETE, world(-15, -60, 38), EAST)
 blocks.print("ZOO", RED_CONCRETE, world(27, -60, 38), EAST) blocks.print("ZOO", RED_CONCRETE, world(27, -60, 38), EAST)
 +</code>
  
 **Gittergehege** **Gittergehege**
 +<code python>
 gehege(36,-60,15,14, 10) gehege(36,-60,15,14, 10)
 gehege(26,-60,29,7,20) gehege(26,-60,29,7,20)
 gehege(36,-60,0,15,10) gehege(36,-60,0,15,10)
 gehege(47, -60, -10, -50, 31) gehege(47, -60, -10, -50, 31)
 +  </code>
 **Ställe** **Ställe**
 +<code python>
 hütte(53,-60,29,-14,-6) hütte(53,-60,29,-14,-6)
 hütte(53,-60,15,-15,-6) hütte(53,-60,15,-15,-6)
 hütte(53,-60,36,-7,-6) hütte(53,-60,36,-7,-6)
 hütte(85,-60,-10,-50,-6) hütte(85,-60,-10,-50,-6)
- +   </code>
 **Holzzäune** **Holzzäune**
 +<code python>
 zaun(0,-60,28,8, -13) zaun(0,-60,28,8, -13)
 zaun(-14,-60,17,19,-14) zaun(-14,-60,17,19,-14)
Zeile 132: Zeile 140:
 zaun(-14,-60,4,-17,-14) zaun(-14,-60,4,-17,-14)
 zaun(0,-60,-5,-8,-14) zaun(0,-60,-5,-8,-14)
- +   </code>
 **Umrandung** **Umrandung**
 +<code python>
 mauer(2,-60,37,0,-30) mauer(2,-60,37,0,-30)
 mauer(-29,-60,37,-50,0) mauer(-29,-60,37,-50,0)
Zeile 141: Zeile 150:
 mauer(89,-60,-1,-59,0) mauer(89,-60,-1,-59,0)
 mauer(53,-60,-1,-3,0) mauer(53,-60,-1,-3,0)
-mauer(54,-60,-4,0,30)+mauer(54,-60,-5,0,30)
 mauer(89, -60, -61, 0, -42) mauer(89, -60, -61, 0, -42)
 mauer(46,-60,-61,0,-31) mauer(46,-60,-61,0,-31)
 mauer(15,-60,-60,1,0) mauer(15,-60,-60,1,0)
-mauer(85,-60,-4,-4,0) +mauer(85,-60,-4,-5,0) 
 +  </code>
 **Mitarbeitertür** **Mitarbeitertür**
 +<code python>
 blocks.fill(AIR, world(85, -60, -7), world(85, -59, -7), FillOperation.REPLACE) blocks.fill(AIR, world(85, -60, -7), world(85, -59, -7), FillOperation.REPLACE)
 blocks.place(OAK_DOOR, world(85, -60, -7)) blocks.place(OAK_DOOR, world(85, -60, -7))
  
 +  </code>
 **Papageienhaus** **Papageienhaus**
 +<code python>
 voliere(-2,-60,0,20,30) voliere(-2,-60,0,20,30)
- +   </code>
    
 **Aquarium** **Aquarium**
- + <code python>
 blocks.fill(BLACKSTONE, world(-40, -61, -14), world(15, -50, -58), FillOperation.Hollow) blocks.fill(BLACKSTONE, world(-40, -61, -14), world(15, -50, -58), FillOperation.Hollow)
 blocks.fill(SAND, world(-40, -61, -14),world(15, -61, -58)) blocks.fill(SAND, world(-40, -61, -14),world(15, -61, -58))
 blocks.fill(AIR, world(6, -60, -14), world(8, -58, -14), FillOperation.REPLACE) blocks.fill(AIR, world(6, -60, -14), world(8, -58, -14), FillOperation.REPLACE)
- +   
    
 blocks.fill(GLASS_PANE, world(9, -60, -15), world(9, -57, -52), FillOperation.REPLACE) blocks.fill(GLASS_PANE, world(9, -60, -15), world(9, -57, -52), FillOperation.REPLACE)
Zeile 173: Zeile 184:
 blocks.fill(GLASS_PANE, world(-30, -60, -47), world(-30, -57, -24), FillOperation.REPLACE) blocks.fill(GLASS_PANE, world(-30, -60, -47), world(-30, -57, -24), FillOperation.REPLACE)
 blocks.fill(GLASS_PANE, world(-29, -60, -24), world(4, -57, -24), FillOperation.REPLACE) blocks.fill(GLASS_PANE, world(-29, -60, -24), world(4, -57, -24), FillOperation.REPLACE)
- +   </code>
 **Dach des weges** **Dach des weges**
 +<code python>
 blocks.fill(GLASS, world(9, -57, -15), world(5, -57, -52), FillOperation.REPLACE) blocks.fill(GLASS, world(9, -57, -15), world(5, -57, -52), FillOperation.REPLACE)
 blocks.fill(GLASS, world(4, -57, -52), world(-34, -57, -48), FillOperation.REPLACE) blocks.fill(GLASS, world(4, -57, -52), world(-34, -57, -48), FillOperation.REPLACE)
 blocks.fill(GLASS, world(-34, -57, -47), world(-30, -57, -20), FillOperation.REPLACE) blocks.fill(GLASS, world(-34, -57, -47), world(-30, -57, -20), FillOperation.REPLACE)
 blocks.fill(GLASS, world(-29, -57, -20), world(4, -57, -24), FillOperation.REPLACE) blocks.fill(GLASS, world(-29, -57, -20), world(4, -57, -24), FillOperation.REPLACE)
- +   </code>
 **Boden des Weges** **Boden des Weges**
 +<code python>
 blocks.fill(PRISMARINE, world(9, -61, -15), world(5, -61, -52), FillOperation.REPLACE) blocks.fill(PRISMARINE, world(9, -61, -15), world(5, -61, -52), FillOperation.REPLACE)
 blocks.fill(PRISMARINE, world(4, -61, -52), world(-34, -61, -48), FillOperation.REPLACE) blocks.fill(PRISMARINE, world(4, -61, -52), world(-34, -61, -48), FillOperation.REPLACE)
Zeile 191: Zeile 204:
    
 blocks.print("AQUARIUM", PRISMARINE, world(-33, -55, -13), EAST) blocks.print("AQUARIUM", PRISMARINE, world(-33, -55, -13), EAST)
- +  </code> 
- + **Picknickbbereich** 
 +<code python>
 tisch(20,-60,-57) tisch(20,-60,-57)
 tisch(20,-60,-52) tisch(20,-60,-52)
Zeile 213: Zeile 227:
 tisch(30,-60,-17) tisch(30,-60,-17)
  
 +  </code>
 **Tiere** **Tiere**
- +<code python> 
- +
 spawn(SPAWN_PARROT,80,8,-60,10) spawn(SPAWN_PARROT,80,8,-60,10)
 spawn(SPAWN_PANDA, 15, 65, -60, -42) spawn(SPAWN_PANDA, 15, 65, -60, -42)
Zeile 228: Zeile 241:
 spawn(SPAWN_PIG, 10, -11, -60, -8) spawn(SPAWN_PIG, 10, -11, -60, -8)
 spawn(SPAWN_TROPICAL_FISH, 30, -5, -52, -28) spawn(SPAWN_TROPICAL_FISH, 30, -5, -52, -28)
-spawn(SPAWN_PUFFERFISH, 80, -5, -52, -28) 
 spawn(SPAWN_SALMON, 80, -5, -50, -28) spawn(SPAWN_SALMON, 80, -5, -50, -28)
 spawn(SPAWN_DOLPHIN, 80, -5, -52, -28) spawn(SPAWN_DOLPHIN, 80, -5, -52, -28)
Zeile 234: Zeile 246:
 spawn(SPAWN_SQUID, 80, -5, -52, -28) spawn(SPAWN_SQUID, 80, -5, -52, -28)
 spawn(SPAWN_GLOW_SQUID, 80, -5, -52, -28) spawn(SPAWN_GLOW_SQUID, 80, -5, -52, -28)
-spawn(SPAWN_AXOLOTL, 80, -5, -52, -28) +  </code>
- +
-"Bäume"+
  
 +**Bäume**
 +<code python>
 blocks.place(BAMBOO,world(53,-60,-18)) blocks.place(BAMBOO,world(53,-60,-18))
 blocks.place(BAMBOO,world(40,-60,-50)) blocks.place(BAMBOO,world(40,-60,-50))
Zeile 256: Zeile 268:
 blocks.place(CHERRY_SAPLING,world(18,-60,9)) blocks.place(CHERRY_SAPLING,world(18,-60,9))
 blocks.place(CHERRY_SAPLING,world(10,-60,9)) blocks.place(CHERRY_SAPLING,world(10,-60,9))
 +  </code>
  
 **Dies ist unser zweiter Teil unseres Projektes. Das ist der Interaktive Teil, welche unseren Eingangsbereich, sowie das Aushändigen des Nachtsichttranks für das Aquarium betrifft.** **Dies ist unser zweiter Teil unseres Projektes. Das ist der Interaktive Teil, welche unseren Eingangsbereich, sowie das Aushändigen des Nachtsichttranks für das Aquarium betrifft.**
 +<code python>
 # Die folgende Funktion testet, ob ein Gold Klumpen in der Truhe ist. # Die folgende Funktion testet, ob ein Gold Klumpen in der Truhe ist.
    
Zeile 265: Zeile 277:
    
 def isGoldinChest(x, y, z, a, b, c): def isGoldinChest(x, y, z, a, b, c):
-  
     blocks.fill(CHEST, world(x, y, z),world(x, y, z),FillOperation.REPLACE)     blocks.fill(CHEST, world(x, y, z),world(x, y, z),FillOperation.REPLACE)
     goldFound = False     goldFound = False
Zeile 272: Zeile 283:
    
     agent.teleport(world(50,-60,50),NORTH)     agent.teleport(world(50,-60,50),NORTH)
-  
     agent.drop_all(FORWARD)     agent.drop_all(FORWARD)
    
Zeile 280: Zeile 290:
    
     # Agenten zur Kiste teleportieren     # Agenten zur Kiste teleportieren
-  +    agent.teleport(world(abc+1), NORTH)
-    agent.teleport(world(xyz+1), NORTH)+
    
     # Kiste zerstören und Objekte aufsammeln     # Kiste zerstören und Objekte aufsammeln
    
     agent.destroy(FORWARD)     agent.destroy(FORWARD)
-  
     agent.collect_all()     agent.collect_all()
-   
-    blocks.fill(CHEST, world(x, y, z),world(x, y, z),FillOperation.REPLACE) 
-  
     for slotNumber in range(1,10):     for slotNumber in range(1,10):
-  
         itemID = agent.get_item_detail(slotNumber)         itemID = agent.get_item_detail(slotNumber)
-  
         if (itemID == 371):         if (itemID == 371):
-  
             goldFound = True             goldFound = True
-  
     return goldFound     return goldFound
    
Zeile 306: Zeile 307:
    
      blocks.fill(CHEST, world(x, y, z),world(x, y, z),FillOperation.REPLACE)      blocks.fill(CHEST, world(x, y, z),world(x, y, z),FillOperation.REPLACE)
-  
      goldFound = False      goldFound = False
-  
      # Agent weit weg teleportieren und alles wegschmeissen      # Agent weit weg teleportieren und alles wegschmeissen
    
      agent.teleport(world(50,-60,50),NORTH)      agent.teleport(world(50,-60,50),NORTH)
-  
      agent.drop_all(FORWARD)      agent.drop_all(FORWARD)
    
Zeile 320: Zeile 318:
    
      # Agenten zur Kiste teleportieren      # Agenten zur Kiste teleportieren
-  +     agent.teleport(world(abc+1), NORTH)
-     agent.teleport(world(xyz+1), NORTH)+
    
      # Kiste zerstören und Objekte aufsammeln      # Kiste zerstören und Objekte aufsammeln
-      
      agent.destroy(FORWARD)      agent.destroy(FORWARD)
-  
      agent.collect_all()      agent.collect_all()
      blocks.fill(CHEST, world(x, y, z),world(x, y, z),FillOperation.REPLACE)      blocks.fill(CHEST, world(x, y, z),world(x, y, z),FillOperation.REPLACE)
-  
      for slotNumber in range(1,10):      for slotNumber in range(1,10):
-  
          itemID = agent.get_item_detail(slotNumber)          itemID = agent.get_item_detail(slotNumber)
-  
          if (itemID == 371):          if (itemID == 371):
-  
              goldFound = True              goldFound = True
-  
      return goldFound      return goldFound
    
Zeile 346: Zeile 336:
         player.execute("/replaceitem block " + x + " " + y + " " + z + " slot.container " + k + " air 1")         player.execute("/replaceitem block " + x + " " + y + " " + z + " slot.container " + k + " air 1")
    
-# Definition dafür das alle slots in der Kiste mit einer Nachtsicht Trank ersetzt werden+# Definition dafür der erste slot in der Kiste mit einem Nachtsicht Trank ersetzt wird
 def giveNightVisionPotion(x, y, z): def giveNightVisionPotion(x, y, z):
     for k in range(1):     for k in range(1):
Zeile 357: Zeile 347:
    
 def on_forever(): def on_forever():
-  
     if (isGoldinChest(8, -60, 38, 70, -60, 70)==True):     if (isGoldinChest(8, -60, 38, 70, -60, 70)==True):
-  
         player.say("Danke für die Bezahlung du kannst rein")         player.say("Danke für die Bezahlung du kannst rein")
-  
         replaceSlotsinChestAir(8, -60, 38)         replaceSlotsinChestAir(8, -60, 38)
-  
         for i in range(4):         for i in range(4):
-  
             for j in range(3):             for j in range(3):
                 blocks.fill(AIR, world(4+i, -60+j,37), world(4+i, -60+j,37), FillOperation.REPLACE)                 blocks.fill(AIR, world(4+i, -60+j,37), world(4+i, -60+j,37), FillOperation.REPLACE)
-  
     else:     else:
-  
         for i in range(4):         for i in range(4):
-  
             for j in range(3):             for j in range(3):
-  
                 blocks.fill(BLOCK_OF_STRIPPED_BAMBOO, world(4+i, -60+j,37), world(4+i, -60+j,37), FillOperation.REPLACE)                 blocks.fill(BLOCK_OF_STRIPPED_BAMBOO, world(4+i, -60+j,37), world(4+i, -60+j,37), FillOperation.REPLACE)
-     
     loops.pause(1000)     loops.pause(1000)
          
 def on_forever2(): def on_forever2():
-  
     if (isGoldinChest(18, -60, 38, 75, -60, 70)==True):     if (isGoldinChest(18, -60, 38, 75, -60, 70)==True):
-  
         player.say("Danke für die Bezahlung du kannst rein")         player.say("Danke für die Bezahlung du kannst rein")
-  +        replaceSlotsinChestAir(18, -60, 38)
-        replaceSlotsinChestAir(18, -60, 35) +
- +
         for i in range(6):         for i in range(6):
-  
             for j in range(3):             for j in range(3):
-                 
                 blocks.fill(AIR, world(19+i, -60+j,37), world(19+i, -60+j,37), FillOperation.REPLACE)                 blocks.fill(AIR, world(19+i, -60+j,37), world(19+i, -60+j,37), FillOperation.REPLACE)
-  
     else:     else:
-  
         for i in range(6):         for i in range(6):
-  
             for j in range(3):             for j in range(3):
-                 
                 blocks.fill(BLOCK_OF_STRIPPED_BAMBOO, world(19+i, -60+j,37), world(19+i, -60+j,37), FillOperation.REPLACE)                 blocks.fill(BLOCK_OF_STRIPPED_BAMBOO, world(19+i, -60+j,37), world(19+i, -60+j,37), FillOperation.REPLACE)
-  
     loops.pause(1000)     loops.pause(1000)
    
 def on_forever3(): def on_forever3():
     if (Payforpotion(9, -60, -13, 80, -60, 70)==True):     if (Payforpotion(9, -60, -13, 80, -60, 70)==True):
-  
         player.say("Danke für die Bezahlung der Nachtsichttrank ist in der Kiste")         player.say("Danke für die Bezahlung der Nachtsichttrank ist in der Kiste")
-  
         giveNightVisionPotion(9, -60, -13)         giveNightVisionPotion(9, -60, -13)
-     
     else:     else:
         replaceSlotsinChestAir(9, -60, -13)         replaceSlotsinChestAir(9, -60, -13)
-         
-         
     loops.pause(1000)     loops.pause(1000)
    
Zeile 423: Zeile 387:
 loops.forever(on_forever4) loops.forever(on_forever4)
          
 +  </code>
  
  
  • gf2/projekte/2023/minecraft/2d1gruppe1.1706050617.txt.gz
  • Zuletzt geändert: 2024/01/23 23:56
  • von decorvetc