Coffee Shop Challenge (1000 points!)

Step 1
Who wants coffee?

Your challenge in this lesson is to combine all the skills you learned from the Haunted Library Course to build a Minecraft Coffee Shop. Here are the skills we will be using:

  • Using the drone with locations
  • Hanging signs with the drone
  • Spawning paintings and item frames
  • Creating a custom inventory
  • Spawning a custom villager with a profession
  • Creating custom villager trades
  • Using the player interact event to lock a door

Note: This challenge is 1000 points because it is not easy!

Good luck, and don't forget to review your Haunted Library code to figure out these challenges.

All building has to be done with the drone!

Step 2
Planning the coffee shop

As you build your coffee shop, you can make the building any size and shape you want, as long as there is room for all the different parts of the challenge. The diagram below shows the layout used in the examples, but it is only a suggestion.

Step 3
Build the exterior (100 points)

Requirements for the exterior:

  1. It is completely contained. Mobs can't just walk in.
  2. It has a roof (but it doesn't need to be a prism)
  3. It has a door, and a player in Survival or Adventure Mode would be able to get into it.
  4. It has at least 1 window.
  5. The walls and floor are different materials.

Hint: Review Haunted Library Lesson 1, Step 4 to see how to start a drone build using a saved location.

Step 4
Planning the interior

Use wool blocks to decide how you want to lay out the interior. There should be room for chairs and tables and a counter where people can order their drinks.

Step 5
A high-top table

You can reuse your studyCarrel() drone function for all the tables in this challenge. Below you can see sample code on how to use the study carrel twice to create chairs facing each other at a table, and move everything up a block with fence posts underneath to create the high-top table., 1, 1, 3); // bottom fence posts
 d.up().turn(2).studyCarrel() // first chair and table
 d.back(2).turn(2).studyCarrel(); // turn 180 and build a chair and table again

This block assumes you named your drone var d

Step 6
Build the seating area (100 points)

Requirements for the seating area:

  1. Different blocks to represent chairs and tables
  2. At least 4 chairs and 4 tables.
  3. Chairs face different directions.

Hint: Review Haunted Library Lesson 2, Step 38 to see how to use your studyCarrel() function to build lots of tables

Step 7
Planning the counter

The next challenge is to create a front counter. It will need to have some items on it to give it the feel of a coffee shop, and be completely enclosed so that our villager doesn't leave.

You also need to use some blocks to show where the line should go. The example has wooden fence, but you may find that iron bars look better.

Step 8
Build the front counter (100 points)

Requirements for the counter:

  1. Creates a closed space to the wall. We'll add half slabs on the floor later to keep anyone from getting out.
  2. At least three items on the counter to make it look like you make coffee there. There is a list of blocks below to help you.
  3. At least one empty block on the counter for a tip jar later.
  4. At least four fence-type blocks to direct the line of customers.

Some materials used:
Step 9
Choose locations for the paintings

Next we will be adding some art to the walls. Choose locations in front of the wall for at least 2 paintings. You can store them as separate variables, an array, or an object.

Make sure you break these blocks before you try to spawn paintings there!

Step 10
Add some paintings (50 points)

Requirements for the paintings:

  1. At least 2 paintings
  2. Both the paintings have different art.
  3. You have to program the art for each painting. Can't be random.

Hint: Review Haunted Library Lesson 3, Steps 36-41 to see how to place a painting and set its artwork

Step 11
Create a menu (50 points)

Requirements for the menu:

  1. At least 3 different signs.
  2. At least 4 different drinks for sale

You will make a custom item for some of the things listed on the menu, so you may want to think about what items you can use to make convincing drinks.

Hint: Review Haunted Library Lesson 2, Steps 50-53 to see how to place signs using the drone.

Step 12
Display some bakery items (50 points)

Requirements for the bakery display:

  1. Must have 2 item frames.
  2. Item frames have different items.

You may want to make an array of the items, and use a for loop to spawn the item frames.

Here is an array of the example items:

var menuItems = [items.pumpkinSeeds(1),items.netherBrick(1), items.cookie(1), items.bread(1), items.cocoa(1)];

HINT: You can use d.getLocation() to get the location from the drone that use can use in world.spawnEntity()

HiINT 2: Review Haunted Library Lesson 3, Steps 60 to see how to spawn an item frame and set its items.

Step 13
Add a tip jar (100 points)

Requirements for the tip jar:

  1. It is a custom inventory, with a customized title like "Thank you for tipping!".
  2. There is a block on the counter to represent the tip jar
  3. Clicking the tip jar opens the inventory.

Hint: Review Haunted Library Lesson 4, Steps 28-34 to see how to create a custom inventory and open it when a player clicks a block.

Step 14
Lower the floor

Before spawning a villager, add some drone code to the counter to make the floor half a block lower.

In this example, the floor is made of blocks.slab.birch.

Step 15
Hire a barista (100 points)

Requirements for the barista:

  1. Can't leave the counter area.
  2. Has a visible custom name.
  3. Is the "NITWIT" profession.

Hint: Review Haunted Library Lesson 4, Steps 43 and 44 to see how to spawn a custom villager with a profession.

Step 16
Make some drinks! (250 points)

Requirements for the drinks:

  1. At least 3 different drinks
  2. Must be custom items with custom names and lore.
  3. Have different prices

HINT: Review Haunted Library Lesson 4, Steps 48 - 50 to see how to create a custom villager trade.

Step 17
Close up shop (100 points)

Finally, make it so that the door to the coffee shop only opens during the day, when the time is greater than 1000 and less than 13000.


  1. The door should not open if it is after 13000 server time.
  2. The door should not open if it is before 1000 server time.
  3. This should work for both the top and bottom door blocks.

HINT: You can find the current time on the server with world.getTime()

HINT 2: Review Haunted Library Lesson 5, Steps 35-37 to see how to cancel a player interact event to keep the doors closed.

Step 18
What's next? (??? points)

What else does your coffee shop need? A record player? A bathroom?

Design a custom challenge for yourself to add to the coffee shop! Once you have an idea and know how to get started on it, tell your instructor about it so that they can tell you how many points your custom challenge is worth!

Coffee Shop Challenge (1000 points!) Info



Created By



The Haunted Library

Access Level


For Teachers and Schools

Teach coding to your students with MVCode Teach

MVCode offers an integrated product designed to teach coding to students.

Learn more about MVCode Teach