How do I create an Ender Portal using commands?

How can I create an Ender Portal without using mods and plug-ins? Can I use /summon to get one? Or what command should I use?

I want to get a block which is placeable or directly place a block using commands, in Creative Mode.


Solution 1:

The portal is nothing else than a block, and blocks have IDs. So, as mentioned in the comment before, you can use /give to get the blocks and build it.

Use this command to get a enderportalblock and the frames with endereyes:

/give player 119 9 
/give player 120 5 4
/give player 120 5 5
/give player 120 3 6
/give player 120 3 7

A little explanation: Block 119 is the portalblock. Basically, this is enough to get into the end. But to make it look like a realistic ender portal, you need 9 of them. Around the portalblocks you need the stones with the endereyes. The block ID is 120 and with the Meta-ID, you can set additional properties for them. 0 - 3 defines the direction in which the block is facing and NO endereye, while 4 - 7 does the same, just that these blocks already contain an endereye. You can only activate a portal if all outer blocks are facing each other, but since you use console commands, it doesnt really matter and you can also use /give player 120 16 4.

Im not completely sure if these commands work, i dont have minecraft on this PC here, if not, i will edit it as soon as im at home ... so in 8 hours or something. :P

Solution 2:

Do this:

/setblock ~ ~ ~2 end_portal

or, for a nether portal,

/setblock ~ ~ ~2 portal

Have fun!