Portal block decoration

Any way to place a portal block that doesn’t make noise or spawn players to the nether? Basically make it a useless block that looks cool.

AFAIK not possible because stuff like sound is client side. You could probably at least prevent teleportation by listening for the event and cancelling it.

That’s what I thought but wasn’t sure as playing sounds per player can be done in the API. The sound isn’t all that big a deal, was just curious. As far as teleportation, I can listen to DisplaceEntityEvent.Teleport.Portal but it’s not 100%. The from Transform isn’t exact depending on players velocity when walking through a portal block so it’s hard to determine what portal is actually triggering the event. Was hoping there was a way to prevent any events from even occurring.

Another approach could be to never place the block server side, but just send it to the players. That way it’s truly only decoration.

Not sure I understand.

You know how you can send blocks to a client without actually placing them? Do that whenever players get close. As they don’t exist server side they won’t do anything.

That sounds like a viable solution. You have any examples? Never done anything like that before.

On the matter of sending fake blocks to the client without placing real ones on the server, there’s a Virtual Block Changes page on the SpongeDocs that should have what you’re looking for.

Thanks, I didn’t see that.