tutorial:custom_portals
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
tutorial:custom_portals [2022/09/18 13:43] – [Getting Started] nexus-dino | tutorial:custom_portals [2025/10/16 17:15] (current) – Specify how to make a portal which is lit with fire donillia | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | FIXME //This page hasn't been updated in a while, and may not work in the future updates. // | ||
- | |||
====== Creating a custom portal to access your dimension ====== | ====== Creating a custom portal to access your dimension ====== | ||
Line 34: | Line 32: | ||
The portals created using the CustomPortalApi act like vanilla portals, and can be as big as 23×23. | The portals created using the CustomPortalApi act like vanilla portals, and can be as big as 23×23. | ||
- | <code java> | + | <code java>; |
- | // CustomPortalApiRegistry.addPortal(Block frameBlock, Identifier dimID, int r, int g, int b) | + | |
- | CustomPortalApiRegistry.addPortal(Blocks.GOLD_BLOCK, new Identifier(" | + | CustomPortalBuilder.beginPortal() |
+ | .frameBlock(Blocks.GOLD_BLOCK) | ||
+ | .lightWithItem(Items.ENDER_EYE) | ||
+ | // | ||
+ | .destDimID(new Identifier(" | ||
+ | .tintColor(234, 183, 8) | ||
+ | .registerPortal(); | ||
</ | </ | ||
+ | |||
+ | If you want it to be lit with fire, however, you will need to call '' | ||
+ | |||
Now, this would create the following portal (Custom Portals can work in any dimension!): | Now, this would create the following portal (Custom Portals can work in any dimension!): | ||
Line 47: | Line 54: | ||
<code java> | <code java> | ||
- | // CustomPortalApiRegistry.addPortal(Block frameBlock, PortalIgnitionSource ignitionSource, | ||
- | CustomPortalApiRegistry.addPortal(Blocks.NETHERITE_BLOCK, | ||
CustomPortalBuilder.beginPortal() | CustomPortalBuilder.beginPortal() | ||
Line 59: | Line 64: | ||
</ | </ | ||
- | Now we have a cool netherite portal that can be lit by using lava and a golden portal! | + | Now we have a cool netherite portal that can be lit by using lava and a golden portal |
{{https:// | {{https:// |
tutorial/custom_portals.1663508635.txt.gz · Last modified: 2022/09/18 13:43 by nexus-dino