Dies ist eine alte Version des Dokuments!
-Idee: Zoo mit verschiedenen Bereichen (je nach Tierart)
-Organisation:Zu zweit ein Gehege/Bereich bauen, diese werden schlussendlich durch Wege verbunden, damit es nach einem einheitlichen Zoo aussieht
-Zeitliche Planung:
- Bis und während Weihnachtsferien: Plan zeichnen→ Planung der Bereiche, Gehege und Eingang bauen
- Bauernhof
- Streichelzoo (Ziegen, Hasen etc.)
- Pandagehege
- Aquarium gross mit Durchgang
- Eingangsbereicht→ Tickethaus
- Nach den Weihnachtsferien bis Abgabe: Verbindungen, Tiere setzen etc.
- Alle Tier setzen
- Wege bauen
- evtl. Deko wie Pflanzen oder Schrift
Unsere Arbeit:
<code python> <code>
Definition für unsere Eingangshäuschen
def haus():
blocks.fill(PLANKS_DARK_OAK, world(18, -61, 31), world(8, -57, 37), FillOperation.HOLLOW) blocks.fill(BLOCK_OF_QUARTZ, world(18, -61, 31), world(8, -61, 37), FillOperation.REPLACE) blocks.fill(AIR, world(18,-59,34), world(18,-59,35),FillOperation.REPLACE) blocks.fill(AIR, world(8,-59,34), world(8,-59,35),FillOperation.REPLACE) blocks.fill(AIR, world(17,-60, 31), world(17, -59, 31), FillOperation.REPLACE) blocks.place(OAK_DOOR, world(17, -60, 31)) blocks.fill(BLOCK_OF_QUARTZ, world(16, -60, 35), world(17, -59, 33), FillOperation.REPLACE) blocks.fill(AIR, world(17, -60, 34), world(17, -59, 34), FillOperation.REPLACE) blocks.fill(BLOCK_OF_QUARTZ, world(9, -60, 33), world(10, -59, 35), FillOperation.REPLACE) blocks.fill(AIR, world(9, -60, 34), world(9, -59, 34), FillOperation.REPLACE) blocks.fill(BOOKSHELF, world(9, -60, 36), world(17, -60, 36), FillOperation.REPLACE) blocks.place(FLOWER_POT, world(9, -59, 35)) blocks.place(FLOWER_POT, world(17, -59, 35))
Definition für unseren Eingangsbereich
def eingang():
blocks.fill(PLANKS_DARK_OAK, world(3, -56, 37), world(25, -56, 37), FillOperation.REPLACE) blocks.fill(PLANKS_OAK, world(25,-60, 37), world(25, -57, 37), FillOperation.REPLACE) blocks.fill(PLANKS_OAK, world(25, -57, 37), world(19, -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)
Definition für unsere Ställe
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(HAY_BLOCK, world(x, z-1, y), world(x+b, z-1, y+l), FillOperation.REPLACE) blocks.fill(AIR, world(x+b,z,y+l+1), world(x+b,z+3,y-1),FillOperation.REPLACE) blocks.fill(AIR, world(x,z,y-1), world(x,z+1,y-1),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))
Definition für unsere Mauer, welche den Zoo umschliesst
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)
Definition für unsere Gehege (Gitter)
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,z+4, y+l), FillOperation.REPLACE)
Definition für unsere Gehege (Holzbereich)
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+b,z,y), FillOperation.REPLACE)
Definition für unsere Voliere
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(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)
Definition für den Picknickbereich (Tische)
def tisch(x,z,y):
a=0
while(a<4):
blocks.place(blocks.block_with_data(ANVIL, 3), world(x, z, y))
blocks.place(blocks.block_with_data(QUARTZ_STAIRS, 3), world(x, z, y-1))
blocks.place(blocks.block_with_data(QUARTZ_STAIRS, 2), world(x, z, y+1))
a=a+1
x=x+1
blocks.place(JUNGLE_SAPLING, world(x+3, z, y))
Definition für das Setzen der Tiere durch den Agenten
def spawn(tier,anzahl,x,z,y):
agent.teleport(world(x,z, y),WEST)
agent.set_item(tier, 1, 1)
agent.set_slot(1)
a=0
while(a<anzahl):
agent.place(FORWARD)
a=a+1
haus() spawn(SPAWN_VILLAGER, 1, 18, -60, 34) spawn(SPAWN_VILLAGER,1,10,-60,34) eingang() blocks.print(„DER“, RED_CONCRETE, world(-15, -60, 38), EAST) blocks.print(„ZOO“, RED_CONCRETE, world(27, -60, 38), EAST)
gittergehege gehege(36,-60,15,14, 10) gehege(26,-60,29,7,20) gehege(36,-60,0,15,10) gehege(47, -60, -10, -50, 31)
Ställe hütte(53,-60,29,-14,-6) hütte(53,-60,15,-15,-6) hütte(53,-60,36,-7,-6) hütte(85,-60,-10,-50,-6)
Holzzäune zaun(0,-60,28,8, -13) zaun(-14,-60,17,19,-14) zaun(-14,-60,4,12,-14) zaun(-14,-60,4,-17,-14) zaun(0,-60,-5,-8,-14)
„Umrandung“ mauer(2,-60,37,0,-30) mauer(-29,-60,37,-50,0) mauer(26,-60,37,0,31) mauer(58,-60,37,-37,0) mauer(58,-60,0,0,31) mauer(89,-60,-1,-59,0) mauer(53,-60,-1,-3,0) mauer(54,-60,-4,0,30) mauer(89, -60, -61, 0, -42) mauer(46,-60,-61,0,-31) mauer(15,-60,-60,1,0) mauer(85,-60,-4,-4,0)
„Mitarbeitertür“ blocks.fill(AIR, world(85, -60, -7), world(85, -59, -7), FillOperation.REPLACE) blocks.place(OAK_DOOR, world(85, -60, -7))
„Papageienhaus“ voliere(-2,-60,0,20,30)
„Aquarium“
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(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(8, -60, -52), world(-34, -57, -52), FillOperation.REPLACE) blocks.fill(GLASS_PANE, world(-34, -60, -52), world(-34, -57, -20), FillOperation.REPLACE) blocks.fill(GLASS_PANE, world(-33, -60, -20), world(4, -57, -20), FillOperation.REPLACE)
blocks.fill(GLASS_PANE, world(5, -60, -15), world(5, -57, -48), FillOperation.REPLACE) blocks.fill(GLASS_PANE, world(5, -60, -48), world(-30, -57, -48), 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)
„Dach des weges“ 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(-34, -57, -47), world(-30, -57, -20), FillOperation.REPLACE) blocks.fill(GLASS, world(-29, -57, -20), world(4, -57, -24), FillOperation.REPLACE)
„Boden des Weges“ 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(-34, -61, -47), world(-30, -61, -20), FillOperation.REPLACE) blocks.fill(PRISMARINE, world(-29, -61, -20), world(4, -61, -24), FillOperation.REPLACE)
blocks.fill(AIR, world(5, -60, -23), world(5, -58, -21), FillOperation.REPLACE)
blocks.fill(WATER, world(-39, -52, -15), world(14, -52, -57), FillOperation.REPLACE)
blocks.print(„AQUARIUM“, PRISMARINE, world(-33, -55, -13), EAST)
tisch(20,-60,-57) tisch(20,-60,-52) tisch(20,-60,-47) tisch(20,-60,-42) tisch(20,-60,-37) tisch(20,-60,-32) tisch(20,-60,-27) tisch(20,-60,-22) tisch(20,-60,-17)
tisch(30,-60,-57) tisch(30,-60,-52) tisch(30,-60,-47) tisch(30,-60,-42) tisch(30,-60,-37) tisch(30,-60,-32) tisch(30,-60,-27) tisch(30,-60,-22) tisch(30,-60,-17)
„Tiere“
spawn(SPAWN_PARROT,80,8,-60,10) spawn(SPAWN_PANDA, 15, 65, -60, -42) spawn(SPAWN_FOX , 15, 46, -60 ,1) spawn(SPAWN_CAMEL, 15, 40, -60, 20) spawn(SPAWN_RABBIT, 20, 37, -60, 33) spawn(SPAWN_CHICKEN, 20, -10, -60, 30 ) spawn(SPAWN_HORSE, 5, -20, -60, 28) spawn(SPAWN_LLAMA, 5, -22, -60, 13) spawn(SPAWN_COW, 5, -23, -60, -1) spawn(SPAWN_PIG, 10, -11, -60, -8) spawn(SPAWN_TROPICAL_FISH, 30, -5, -52, -28) spawn(SPAWN_PUFFERFISH, 80, -5, -52, -28) spawn(SPAWN_SALMON, 80, -5, -50, -28) spawn(SPAWN_DOLPHIN, 80, -5, -52, -28) spawn(SPAWN_SEA_TURTLE, 80, -5, -52, -28) spawn(SPAWN_SQUID, 80, -5, -52, -28) spawn(SPAWN_GLOW_SQUID, 80, -5, -52, -28) spawn(SPAWN_AXOLOTL, 80, -5, -52, -28) # Die folgende Funktion testet, ob ein Gold Klumpen in der Truhe ist.
# Sie gibt true oder false als Rückgabewert, sodass man sie weiterverwenden kann.
def isGoldinChest(x, y, z, a, b, c):
blocks.fill(CHEST, world(x, y, z),world(x, y, z),FillOperation.REPLACE)
goldFound = False
# Agent weit weg teleportieren und alles wegschmeissen
agent.teleport(world(110,-60,110),NORTH)
agent.drop_all(FORWARD)
# Kiste kopieren (sie steht bei (x,y,z))
blocks.clone(world(x, y, z), world(x,y,z), world(a,b,c), CloneMask.REPLACE, CloneMode.NORMAL)
# Agenten zur Kiste teleportieren
agent.teleport(world(a, b, c+1), NORTH)
# Kiste zerstören und Objekte aufsammeln
agent.destroy(FORWARD)
agent.collect_all()
for slotNumber in range(1,10):
itemID = agent.get_item_detail(slotNumber)
if (itemID == 371):
goldFound = True
return goldFound # Die folgende Funktion testet, ob ein Gold Klumpen in der zweiten Truhe ist. # Sie gibt true oder false als Rückgabewert, sodass man sie weiterverwenden kann. def isGoldinChest2(x, y, z, a, b, c):
blocks.place(CHEST, world(x, y, z))
goldFound = False
# Agent weit weg teleportieren und alles wegschmeissen
agent.teleport(world(110,-60,110),NORTH)
agent.drop_all(FORWARD)
# Kiste kopieren (sie steht bei (x,y,z))
blocks.clone(world(x, y, z), world(x,y,z), world(a,b,c), CloneMask.REPLACE, CloneMode.NORMAL)
# Agenten zur Kiste teleportieren
agent.teleport(world(a, b, c+1), NORTH)
# Kiste zerstören und Objekte aufsammeln
agent.destroy(FORWARD)
agent.collect_all()
for slotNumber in range(1,10):
itemID = agent.get_item_detail(slotNumber)
if (itemID == 371):
goldFound = True
return goldFound
# Es wird geschaut ob ein Goldklumpen in der kiste ist das ergibt dann ein true oder false Rückgabewert und das kann weiter gebraucht werden. def Payforpotion(x, y, z, a, b, c):
blocks.place(CHEST, world(x, y, z))
goldFound = False
# Agent weit weg teleportieren und alles wegschmeissen
agent.teleport(world(110,-60,110),NORTH)
agent.drop_all(FORWARD)
# Kiste kopieren (sie steht bei (x,y,z))
blocks.clone(world(x, y, z), world(x,y,z), world(a,b,c), CloneMask.REPLACE, CloneMode.NORMAL)
# Agenten zur Kiste teleportieren
agent.teleport(world(a, b, c+1), NORTH)
# Kiste zerstören und Objekte aufsammeln
agent.destroy(FORWARD)
agent.collect_all()
for slotNumber in range(1,10):
itemID = agent.get_item_detail(slotNumber)
if (itemID == 371):
goldFound = True
return goldFound
# Definition dafür das alle slots in einer Kiste mit luft ersetzt werden können. def replaceSlotsinChestAir(x, y, z):
for k in range(27):
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 def giveNightVisionPotion(x, y, z):
for k in range(27):
player.execute("/replaceitem block " + x + " " + y + " " + z + " slot.container " + k + " potion 1 5")
# Nun können wir ein Mal pro Sekunde testen, ob ein Goldklumpen in der Truhe ist
def on_forever():
if (isGoldinChest(8, -60, 38, 30, -60, 30)==True):
player.say(„Danke für die Bezahlung du kannst rein“)
replaceSlotsinChestAir(8, -60, 38)
for i in range(4):
for j in range(3):
blocks.fill(AIR, world(4+i, -60+j,37), world(4+i, -60+j,37), FillOperation.REPLACE)
else:
for i in range(4):
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)
loops.pause(2000)
def on_forever2():
if (isGoldinChest2(18, -60, 38, 35, -60, 30)==True):
player.say(„Danke für die Bezahlung du kannst rein“)
replaceSlotsinChestAir(18, -60, 35)
for i in range(6):
for j in range(3):
blocks.fill(AIR, world(19+i, -60+j,37), world(19+i, -60+j,37), FillOperation.REPLACE)
else:
for i in range(6):
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)
loops.pause(2000)
def on_forever3():
if (Payforpotion(9, -60, -13, 40, -60, 30)==True):
player.say(„Danke für die Bezahlung der Nachtsichttrank ist in der Kiste“)
giveNightVisionPotion(9, -60, -13)
else:
replaceSlotsinChestAir(9, -60, -13)
loops.pause(1000)
loops.forever(on_forever) loops.forever(on_forever2) loops.forever(on_forever3)