[TUTORIAL] End Shaped Portal to Custom Dimension

Started by PhatBoi68419 on

Topic category: Help with modding (Java Edition)

Last seen on 04:24, 17. Jun 2024
Joined Jul 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
[TUTORIAL] End Shaped Portal to Custom Dimension

In this tutorial, I will be showing you how to create an end portal shaped custom portal. This does not include a feature where you need to add an eye to the block, but all you have to do there is create 2 separate blocks, one with and the other without the eye texture, and make a procedure where when the player right clicks with the eye in main hand, reduce the number of eyes in the inventory by one, and replace that block with the block that has the eye on it, with the same rotation. Anyways, to the tutorial!

First, you need to create 2 blocks and your dimension. Create your dimension with these specific settings so that only your custom portal will take you to the custom dimension: 

""

Now, the blocks needed are the portal frame block and the portal block. For the frame, create a block with y axis rotation (from player side) enabled so that when you place it, the front faces you. The rotation is optional, but this is how end portals work and how I will be doing it. Here are the other properties that should be changed for this block as well:

""""

The actual portal block is what spawns when the portal is complete (in this tutorial the portal will automatically fill when the blocks are placed correctly). For this block, create a block with the "slab" block base. Here are the other properties that should be changed for this block as well:

""

Second, the procedures. Most of these procedures are reeeaaallly long, so I will add the importable code for each procedure to this tutorial. There are 3 procedures in total. The first should be the actual creation of the portal. This code should be put in the "update tick" and the "when block added" triggers of the portal frame block. Double check you did turn on ticking for this block as shown in the picture of its advanced properties, otherwise it won't work properly. You will need to fill in your portal frame blocks inside of all the empty block selectors in the conditions in the "if" statement. And, you'll need to also fill all of the empty block selectors at the bottom of the procedure that say "place" with your portal block. Here's the code:

https://drive.google.com/file/d/1fOIfOoA19pK_W4UrAm11fVucpEZSJ_FC/view?usp=share_link 

Next, put this code, which destroys the portal if any of the frame blocks are broken, in the "when block destroyed by player" trigger of the frame block. You will need to fill in your portal frame blocks inside of all the empty block selectors in the "place" blocks. And, you will need to fill in your portal blocks inside of all the empty block selectors in the conditions in the "if" statements. Here's the code:

https://drive.google.com/file/d/19FXO9ha7xiDz68QPjPzR-w01z1XJOzJl/view?usp=share_link

Lastly, add this code to the "when entity collides in the block" trigger, which switches the dimension of the player to either your custom dimension or the surface, depending on which one you are in at that moment. You may want to tinker with the "set location" block's numbers so you aren't teleported inside a wall by chance. Here's that code:

https://drive.google.com/file/d/1Hecu3pgYaMn25aiw1Zpsl6c2WegdcZqi/view?usp=share_link 

I thought I'd also add how you can use these links, so all you have to do is download these procedures (they convert straight into procedure coding blocks), create the procedure, then hit the "import procedure" in the top right corner of the procedure editing UI. Here's a picture: 

""

And that is pretty much it! You may want to create a central portal at the origin of your dimension using structures or some other way of getting back to the surface, or any other adjustments, but other than that this portal works both directions and fills and breaks automatically when created or destroyed. Feel free to ask questions or make comments!

Last seen on 20:28, 17. Mar 2024
Joined Oct 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
This is very well made, but…
Fri, 12/08/2023 - 07:45

This is very well made, but there are a few issues with the procedures. The update tick/when block added procedure will cause the portal block to spawn if it's the NORTH middle portal frame block that's last placed/updated. I've done some tweeking here and there but to no luck. The other problem is that the portal block doesn't break when you break a portal frame block making that particular procedure useless. I don't know if I'm doing something wrong but I've tried many different things and none have worked to fix these problems. Will update you if I fix it before your able to reply

Last seen on 20:28, 17. Mar 2024
Joined Oct 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
UPDATE: it was cause of the…
Fri, 12/08/2023 - 08:03

UPDATE: it was cause of the tick not being set to 1