Portal Gun
Portal Gun
A Fabric mod that brings Portal Gun into Minecraft. GitHub

It's based on the discontinued MeowMC's portal gun mod
How to use
In creative mode, you can get the portal gun from the inventory.
In survival mode, the crafting recipe is:

Use left click to put blue portal, use right click to put orange portal. The portal can link to any place in any dimension. The portal gun can shoot through portals.
Each player's portal does not interfere with other players'.
Energy
In the latest version, the portal gun item initially has 100 units of energy. Using portal gun to create the portal costs 1 energy unit. When the portal gun runs out of energy, you can recharge it using a nether star via crafting:

You can obtain a portal gun without energy limitation in creative mode inventory or command /give @p portalgun:portal_gun{maxEnergy:0}
Make the portal gun to only work on some blocks
By using commands, you can obtain a portal gun that only works on some blocks. For example, /give @p portalgun:portal_gun{allowedBlocks:["#minecraft:ice","minecraft:stone"]} 1 gives a portal gun that only works on stone block and ice blocks (including ice, packed ice, blue ice and frosted ice). The minecraft:stone is the block id of stone. The #minecraft:ice refers to the minecraft:ice block tag.
Custom Color
In the latest version, you can customize the portal color.
Obtain a portal gun with custom color: /give @p portalgun:portal_gun{side1Color:"#32a852",side2Color:"purple"}
It supports color in hex number #32a852, and vanilla color (white, orange, magenta, light_blue, yellow, lime, pink, gray, light_gray, cyan, purple, blue, brown, green, red, black). You can use Color Picker to get the hex number of color.
The custom color only changes appearance of newly-created portals. One player still can have at most one pair of portals.
Gravity Transform
Obtain a portal gun that generates gravity-transforming portals: /give @p portalgun:portal_gun{transformGravity:true}.
Item Tags Summary
allowedBlocksa list of block ids or block tag ids, that the portal gun can only be used onmaxEnergymaximum energy value. 0 for infinite energy.remainingEnergyremaining energy value.side1Colorside2Colorthe color of two sides. Side 1 corresponds to the originally "blue" side.transformGravitycontrols whether the portal transforms gravity
Download
Download from GitHub releases:
