View difference between Paste ID: wbeACDSw and bnqK2X8r
SHOW: | | - or go back to the newest paste.
1
#MINECRAFT
2
3
# Get player’s coordinates. Use x, y and z variables to do the exercises.
4
position=player.position()
5
x=position.get_value(Axis.X)
6
y=position.get_value(Axis.Y)
7
z=position.get_value(Axis.Z)
8
9
# Exercise 1
10
# Create an underwaterWorld function which will be called by using the “aquaman” command in chat.
11
# After calling the function, the player should be locked in a huge water container made of GLASS and filled with WATER.
12
# Use the blocks.fill() function.
13
14
15
16
# Exercise 2
17
# Create a drowned function with numberOfDrowned parameter and call it in the underwaterWorld function.
18
# When calling the function we should specify the number of drowned we want to spawn.
19
# We will use the parameter in a for loop in a range() function.
20
21
22
# Exercise 3
23
# Create an inventory function which will add a trident when calling the underwaterWorld function.
24
# The trident is great for fighting underwater
25
# Add spells which will improve the weapon
26
# Unbreaking level 3 - increases durability of the weapon.
27
# Channeling level 1 - During the storm, when hitting a mob, a lightning will hit them too.
28
# Riptide level 3 - during rain, using the trident will get us fast transport.
29
# Loyalty level 3 - the trident will come back to the player after they throw it.
30
# Use functions like mobs.give() and mobs.enchant().
31
# You can add other items useful in underwater combat.
32
33
34
35
# Exercise 4
36
# Create a coral function and call it in the underwaterWorld after creating the water container.
37
# Use blocks.place and randpos() to place different corals in random places. Use for loop, too.
38
# Coral names: TUBE_CORAL, BRAIN_CORAL, BUBBLE_CORAL, FIRE_CORAL, BUBBLE_CORAL_FAN 
39
40
# You  can use an array to do this exercise
41
# In the coral function create a coralArray array and add different corals to it.
42
# Using two for loops, get corals from the array and place them in random places.
43
44
45
# Exercise 5
46
# The function changing the game mode
47
# Create a gameMode function with the mode parameter. The function will be called in chat by writing ‘t’ and giving a parameter 0 or 1.
48
# When we put 0, the game should be in survival mode and the player should get breathing underwater effect.
49
# When we put 1, the game should be switched to creative mode.
50
# Use if elif conditional statements.
51
# The name of the effect is WATER_BREATHING. Use it in the mobs.apply_effect function.
52