The material for the custom block has switched from ender pearls to end stone. Makes things much easier to behave like Vanilla Minecraft with this change.
You can now left click with the end gateway block in your hand to break an already placed end gateway. Doesn't matter what's in your hand honestly at this point. Right click with block in hand = place end gateway. Left click with anything in hand, or nothing in hand = break a placed end gateway.
Tweaked the cooldown of placing/breaking end gateways to 50ms but may need further tweaking to 100-200ms.
It now checks if you're in creative and if so won't remove an end gateway block from your inventory.
It also checks if you're right clicking on an interactive block while holding the end gateway block (chests, furnaces, levers etc) and behaves like normal Minecraft and simply interacts with the block instead of placing an end gateway.
Stacking issues are resolved by switching to end stone as you can now store or give a full stack versus being limited to only a stack of 16 (vanilla ender pearl stack limit).
Placement of end gateway on obsidian etc seems to be fixed now.
You can now supply a quantity when executing the command, defaults to a full stack (64) if no qty is entered.
You can now break the end gateway blocks that are placed with left click and place them with right click to more simulate a normal Minecraft block place & break.
Added a cooldown during place/break to prevent the event firing off multiple times very quickly.
Need to investigate obsidian block placement with these.