A small datapack implementing the ability to place custom End Gateway blocks in any dimension for teleportation.
This datapack aims to provide a balanced, survival-friendly way of placing custom End Gateway blocks that can be used to teleport large distances within the same dimension.
Each Gateway is one-way only, and requires that the player first travels to the desired location to capture the destination then travel to where they wish to place the Gateway.
Furthermore, each Gateway requires a Dragon's Breath and a Lodestone (which requires Netherite), meaning that creating custom Gateways is:
- A late-game quality-of-life feature
- Relatively expensive
- An Ender Dragon needs to be spawned to obtain Dragon's Breath.
- Nether mining needs to occur to obtain Netherite for Lodestones.
- Non-renewable (as per the non-renewable nature of Lodestones)
Additionally, Gateways are dimension-locked, meaning that, for example, players can't abuse the Nether distance scaling to travel incredibly far by using Overworld positions for Nether Gateways.
This datapack was developed in 1.17 ("pack_format": 7
) but should be compatible with versions using an equivalent or greater pack_format
, barring major changes to commands/datapacks.
- Download:
- Repository as a
.zip
(Code > Download ZIP) - Release (will need to unzip before installing into a save)
- Repository as a
- Install into a save like any other datapack.
- Open the advancement menu to the Schwer tab to view the intended hints.
Dropping a Dragon's Breath named either Gateway Essence or Gateway Extract on any ground with an air block above it will convert it into a Bottled Gateway.
A Bottled Gateway will remember the coordinates it was dropped at and the dimension it was dropped in. This information can be viewed by hovering over the item when in an inventory. Additionally, the colour of a Bottled Gateway's name corresponds with the dimension it was created in.
Another bit of information remembered by Bottled Gateways is whether it was formed from a Gateway Essence or a Gateway Extract. This controls how the Gateway will teleport an entity travelling through it.
- A Gateway Essence will create a Gateway that uses the default End Gateway teleportation logic, which searches for the highest full block starting from the north-west corner of an 11 by 11 vertical column centred on the Gateway to place entities (north to south, west to east).
- A Gateway Extract will create a Gateway that positions entities that travel through it exactly to the set destination.
A Bottled Gateway can be reverted back into its previous form by disenchanting it (through a Grindstone) and dropping it from an inventory.
Dropping a Bottled Gateway on top of a Lodestone in the same dimension the Bottled Gateway was created in will create a Gateway block, replacing the Lodestone.
This Gateway then functions like a regular End Gateway block, teleporting entities that enter it to the set destination.
A Gateway can be reverted back into a Lodestone by igniting a block of TNT directly above the Gateway (the explosion will be nullified).
Split between 'Available' (i.e. fine to call using /function
) and 'Internal' (not intended to be called by /function
).
Ordered alphabetically.
- Resets scoreboard variables (
0
,match
) for objectivesgw_score
- Removes contents
Dimension
,Placement
,X
,Y
,Z
,Thrower
,Candidate
from storagesgw_store
Also run internally when a Bottled Gateway is created or consumed.
Removes the presence of this datapack by:
- Clearing the scheduled
tick
function - Running
clean
- Removing the
sgw_score
scoreboard objective
All existing Gateways will remain and continue to be functional.
All existing Bottled Gateways will remain but cease to be functional (until the datapack is reloaded).
Note: Bottled Gateways are defined by the existence of Item.tag.Placement
.
Handles the conversion of Gateway Essences and Gateway Extracts into Bottled Gateways.
Run from tick
when a single (i.e. non-stacked) Dragon's Breath named either Gateway Essence or Gateway Extract lands on ground with an air block above it.
Handles the logic for granting an advancement to the player who dropped the Bottled Gateway in creating a Gateway.
Run from place_gateway
.
Sets up this datapack by adding the sgw_score
scoreboard objective and starting the tick
loop.
Called through Minecraft's load.json
.
Handles the creation of Gateways, consuming a Bottled Gateway, and granting an advancement to the player responsible (if applicable).
Run from tick
when a single (i.e. non-stacked) Bottled Gateway lands on a Lodestone in the same dimension it was created in.
The main update loop. Handles the conversion of Gateway Essences and Gateway Extracts into Bottled Gateways, as well as the creation of custom Gateways.
Initialises from load
.
Handles the reversion of Gateways to Lodestones when TNT is lit directly above a Gateway, consuming the TNT (no explosion).
Run from tick
on lit TNT.
Reverts dropped, disechanted Bottled Gateways back into Gateway Essences and Gateway Extracts.
This will remove all existing lore on the item, which may cause loss of such data.
Run from tick
on any Bottled Gateway item entities.
(Roughly in personal use order)
- tradesteal
- Used as a base. Also contains further, indirect references.
- Minecraft Wiki
- Used as a reference for various NBT data and commands
- Papi's Potions
- Used as a reference for predicates and dynamic item lore
- MCStacker
- Used to get basic syntax for
/setblock
with sign text
- Used to get basic syntax for
- u/TinyBreadBigMouth — Compare NBT strings
- Provided a method of conditionally executing commands depending on NBT comparison