The wizards of PMC will need an arena to cast their spells in. The arena should be fairytale/wizard/magic themed, so no gladiator arenas. Also, spells might destroy the arena a bit, so make sure to make walls, floors and possibly ceilings very thick. Maybe even add barrier blocks around the entire arena to prevent players from walking/falling out.
We're looking forwards to the beautifully themed builds, but there are some extra's you'll have to add involving buttons, commands and command blocks. If you get lost while following the instructions below, have a look at the
Magic Arena Reference map. In order to complete the challenge, your arena must have
at least the LVL 1 extra's. Please mention the level of compatibility on your submission page.
The following steps will prepare your arena to welcome players in a lobby and let them equip in peace in an armory. From there, they will be able to press a button to teleport to the arena.
Quick introduction to command blocks: Command blocks are triggered by redstone and can run any command you put in it. Use /give @s command_block to obtain one. Besides the text box for the command, you'll see a couple buttons when you click the block, don't worry about them for now.
You're going to use commands with coordinates. Copying them from F3 is fine, but you can get the coordinates faster by typing /setblock in chat, using tab autocomplete and copying the coordinates that appear.
- Once you've created your arena, install the Magic PvP and example spell data packs (download here) and run /reload.
- Create a separate area in which you set the world spawn (/setworldspawn), we'll call this the lobby.
- Create at least 2 rooms where players will be able to equip themselves, we'll call these armories.
- Slap buttons on walls with command blocks behind them that teleport the nearest player (/tp @p <x> <y> <z>). There should be buttons in the lobby teleporting to each armory and buttons in each armory teleporting to the arena.
- In each armory, store a wand item, hat item and a spells chest. Obtain these things using the commands below. Other PMC creators will help texture the items, but untextured they are just a fungus on a stick and a carved pumpkin.
# Place a chest at your feet in the direction you're looking
/function bertiecrafter:mpp/items/spawn_chest
# Get wand and hat
/loot give @s loot bertiecrafter:mpp/wand
/loot give @s loot bertiecrafter:mpp/hat
- Disable command block output with /gamerule commandBlockOutput false
- You might want to consider setting other gamerules. For example, freeze time (/gamerule doDaylightCycle false) or freeze the weather (/gamerule doWeatherCycle false). Use tab to autocomplete the others.
- Well done! Your map is now ready to be published. If you want to stop here, make sure to remove the data packs before publishing. Also put a link to your submission in this thread so it can be added to the appropriate collection.
After completing this level, players will be able to get new wands and hats. Players will also be able to teleport back to the lobby whenever they want.
More command block info: Command blocks can be chained, so that you only have to power the first command block. To chain command blocks, place them behind each other. Use the buttons in the interface to switch modes, the first one should be Impulse - Unconditional - Needs Redstone, the others should be Chain - Unconditional - Always Active. The arrows on a command block indicate where the next command block should be in order to be triggered.
- Wire up each button in the lobby to a command that kills all items.
/kill @e[type=item]
- Add two more command blocks to each of those buttons that give the player new wands and hats. The simplest is using the commands above, but with @p (nearest player) instead of @s. However, you can also modify the command to spawn the items on the floor or insert them into armor stands, item frames or chests. Either way, you should remove the wand and hat that were already there from the previous instructions.
- There should be a way for the last standing player to return to the lobby. One way of doing that is teleporting all players without a wand back. To do this, place a command block at the center of the arena, set it to Repeat - Unconditional - Always Active with the command:
/tp @a[distance=..<radius>,nbt=!{Inventory:[{tag:{bcmpp_wand:1b}}]}] <x> <y> <z>
Replace <radius> by the amount of blocks from the center of the arena to the furthest edge (without modifying the two dots in front) and use <x> <y> <z> to teleport players to the lobby. - Congrats on making your map reusable! If you want to stop here, make sure to remove the data packs before publishing. Also put a link to your submission in this thread so it can be added to the appropriate collection.
You might want to synchronize players to create some concept of rounds. In the following instructions, we'll be making the buttons in the lobby (that teleport the player to the armory) disappear after a player presses them and come back after all players have left the arena. Also, we'll prevent the players from entering the arena until all players in the armories have pressed a button.
You're going to create commands that place and remove blocks. You can do this easily by placing the block that the command should create, looking at it and pressing F3+I. You now have a /setblock command on your clipboard that will place the exact block you were looking at in that position.
- Make each button in the lobby delete itself by adding yet another command block with the command below.
/setblock <x> <y> <z> air
- Place a command block at the center of the arena and set it to Repeat - Unconditional - Always Active, enter the command:
/execute unless entity @a[distance=..<radius>]
and attach a comparator facing away from the command block. It will power on when there is no player in the radius. Use the redstone output to power command blocks that place the buttons back in the lobby. - Now create a redstone line running into a block with a redstone torch on the side of that block. Connect the torch to a simple command block. Enter the same teleport command that teleports the player from the armory to the arena, but with @a (all players) instead of @p.
- Make each of the buttons in the lobby also place a redstone block besides the redstone line (using /setblock). The torch and the redstone output to the command block should turn off.
- Make each of the buttons in the armories remove the associated redstone block from the line instead of teleporting the nearest player to the arena. When the last redstone block is removed, the torch should come on and the command block should teleport everyone to the arena.
- You can make the buttons in the lobby and armories remove and place another redstone block behind a redstone lamp in the armory. This way the player gets a visual confirmation that you registered their button press.
- Congrats on synchronizing players and rounds! Make sure to remove the data packs before publishing. Also put a link to your submission in this thread so it can be added to the appropriate collection.
For questions, you can contact
Uknownymous