Keys.DIRECTION Not found


[Google trad]
Hello everyone.
I have a block added with mcreator that has a direction. Yet I can not get this direction with this code:

            if(location.getBlock().get(Keys.DIRECTION).isPresent()) {

How should I go about it?

Bonjour à tous.
J’ai un bloc rajouté avec mcreator qui a une direction. Pourtant je n’arrive pas a obtenir cette direction avec ce code:

            if(location.getBlock().get(Keys.DIRECTION).isPresent()) {

Comment je dois m’y prendre ?


Sponge requires block implementations to reveal the key/values available. It does not discover them automatically.

You will need to implement the necessary MixinBlock / IMixinBlock methods.
See MixinBlockFurnace as an example of a block with a direction:


je peux avoir un exemple, j’ai pas comprit comment faire.
Actuellement j’ai juste: mod:portal[facing=north]

[Google Trad]
I can have an example, I did not understand how to do it.
Currently I just: mod:portal [facing=north]
Thank you


The Keys.DIRECTION does not exist, but my block returns. then ?


[20:15:23] [Server thread/INFO] [admintool]: MemoryDataContainer{safety=ALL_DATA_CLONED, map={ContentVersion=2, BlockState=admintoolmod:portal[facing=north]}}