I have a little worry about the directions

[google trad]
Hello,
I have a little worry about the directions. I do not have WEST direction in this code.

The code:

                                        Location<World> locT = new Location<World>(player.getWorld(), clickGauche);
                                        BlockRay<World> blockRay = BlockRay.from(locT).to(location.getPosition()).build();
                              
                                        Optional<BlockRayHit<World>> hitOpt = blockRay.end();
                                        if (hitOpt.isPresent()) {
                                            BlockRayHit<World> hit = hitOpt.get();
                                            Direction direction = Direction.getClosest(hit.getDirection());
                                            Tool.getLogger().info(direction.name());
                                        } else {
                                            Tool.getLogger().info("!hitOpt");
                                        }

Log:
[19:50:56] [Server thread/INFO] [admintool]: ----------Portal----------
[19:50:46] [Server thread/INFO] [admintool]: DISPLAY_NAME:Portal
[19:50:46] [Server thread/INFO] [admintool]: Portal ChangeBlockEvent.Place: minecraft:fire[age=0,east=false,north=false,south=false,up=false,west=false]
[19:50:46] [Server thread/INFO] [admintool]: SOUTH z
[19:50:46] [Server thread/INFO] [admintool]: ----------Portal----------
[19:50:50] [Server thread/INFO] [admintool]: DISPLAY_NAME:Portal
[19:50:50] [Server thread/INFO] [admintool]: Portal ChangeBlockEvent.Place: minecraft:fire[age=0,east=false,north=false,south=false,up=false,west=false]
[19:50:50] [Server thread/INFO] [admintool]: EAST x
[19:50:50] [Server thread/INFO] [admintool]: ----------Portal----------
[19:50:52] [Server thread/INFO] [admintool]: DISPLAY_NAME:Portal
[19:50:52] [Server thread/INFO] [admintool]: Portal ChangeBlockEvent.Place: minecraft:fire[age=0,east=false,north=false,south=false,up=false,west=false]
[19:50:52] [Server thread/INFO] [admintool]: NORTH z
[19:50:52] [Server thread/INFO] [admintool]: ----------Portal----------
[19:50:56] [Server thread/INFO] [admintool]: DISPLAY_NAME:Portal
[19:50:56] [Server thread/INFO] [admintool]: Portal ChangeBlockEvent.Place: minecraft:fire[age=0,east=false,north=false,south=false,up=false,west=false]
[19:50:56] [Server thread/INFO] [admintool]: !hitOpt
[19:50:56] [Server thread/INFO] [admintool]: ----------Portal----------

[FR]
Bonjour,
j’ai un petit soucis au niveau des directions. Je n’ai pas la direction WEST.

Le code:

                                        Location<World> locT = new Location<World>(player.getWorld(), clickGauche);
                                        BlockRay<World> blockRay = BlockRay.from(locT).to(location.getPosition()).build();
                              
                                        Optional<BlockRayHit<World>> hitOpt = blockRay.end();
                                        if (hitOpt.isPresent()) {
                                            BlockRayHit<World> hit = hitOpt.get();
                                            Direction direction = Direction.getClosest(hit.getDirection());
                                            Tool.getLogger().info(direction.name());
                                        } else {
                                            Tool.getLogger().info("!hitOpt");
                                        }

Les log:
[19:50:56] [Server thread/INFO] [admintool]: ----------Portal----------
[19:50:46] [Server thread/INFO] [admintool]: DISPLAY_NAME:Portal
[19:50:46] [Server thread/INFO] [admintool]: Portal ChangeBlockEvent.Place: minecraft:fire[age=0,east=false,north=false,south=false,up=false,west=false]
[19:50:46] [Server thread/INFO] [admintool]: Mode cirulaire
[19:50:46] [Server thread/INFO] [admintool]: SOUTH SOUTH
[19:50:46] [Server thread/INFO] [admintool]: SOUTH z
[19:50:46] [Server thread/INFO] [admintool]: ----------Portal----------
[19:50:50] [Server thread/INFO] [admintool]: DISPLAY_NAME:Portal
[19:50:50] [Server thread/INFO] [admintool]: Portal ChangeBlockEvent.Place: minecraft:fire[age=0,east=false,north=false,south=false,up=false,west=false]
[19:50:50] [Server thread/INFO] [admintool]: Mode cirulaire
[19:50:50] [Server thread/INFO] [admintool]: EAST EAST
[19:50:50] [Server thread/INFO] [admintool]: EAST x
[19:50:50] [Server thread/INFO] [admintool]: ----------Portal----------
[19:50:52] [Server thread/INFO] [admintool]: DISPLAY_NAME:Portal
[19:50:52] [Server thread/INFO] [admintool]: Portal ChangeBlockEvent.Place: minecraft:fire[age=0,east=false,north=false,south=false,up=false,west=false]
[19:50:52] [Server thread/INFO] [admintool]: Mode cirulaire
[19:50:52] [Server thread/INFO] [admintool]: NORTH NORTH
[19:50:52] [Server thread/INFO] [admintool]: NORTH z
[19:50:52] [Server thread/INFO] [admintool]: ----------Portal----------
[19:50:56] [Server thread/INFO] [admintool]: DISPLAY_NAME:Portal
[19:50:56] [Server thread/INFO] [admintool]: Portal ChangeBlockEvent.Place: minecraft:fire[age=0,east=false,north=false,south=false,up=false,west=false]
[19:50:56] [Server thread/INFO] [admintool]: Mode cirulaire
[19:50:56] [Server thread/INFO] [admintool]: !hitOpt
[19:50:56] [Server thread/INFO] [admintool]: ----------Portal----------

I don’t see what you are getting at… its literally just outputting a log of the block and indictating each direction is false…

It looks like he’s standing in game, tapping a block from each side, and getting an output of the north, east, south, but when he expects to get west, he’s getting an empty result and that exception entry in his log. Note the couple seconds difference in log, thats consistent with moving around and repeating the same activity, only to be surprised that one result is not consistent…

[Google] trad]
Yes.
I do not have west direction when I place my block in relation to the other block.

[Fr]
Oui.
je n’ai pas la direction ouest quand je place mon bloc par rapport a l’autre bloc alors que j’ai les autres

Bug en video:

Edit:
[Google trad]
I think I fixed the bug:

[FR]
Je pense avoir corrigé le bug: