Minecraft Modding: How to Add a Melon Block to Break in Monster Arena
After you have set up the initial scene, you can use the scene for a Minecraft game. The arena function stays the same, but you add a melon block on the opposite side of the arena from the player.
This shows the new function, SetupGame, which creates the arena, places the melon block, and puts the player in the starting position.
To add a melon block, follow these steps:
Create the SetupGame function and add a call to SetupGame to main.
Add a new drone named d and move it to one side of the arena. The drone should move only 18 blocks because the stone and the fence occupy 2 of the blocks and you want the player to be inside the fence.
Move the drone up by 2 so that the player starts above the platform and falls into the arena.
Move the player to the location of the drone. Now the player is at the starting position.
Move the drone to the opposite side of the arena. Moving the drone 33 blocks leaves 2 blocks empty between the melon block and the fence.
Place the melon block and move the drone backward by 1 block.
At this point, nothing happens when the player breaks the melon block.