BlockVine ConnectedDirectionData seems to be broken


#1

Hi,

BlockVine has ConnectedDirectionData which could has multiple directions.
Implementation seems to be wrong as Direction.UP is never set when using connectedDirections()

  • Even if the VineBlock is graphically attached to the side and the upside block
  • Even if the VineBlock is downside of an other VineBlock

Moreover, when VineBlock is just supported by a upside BlockVine, it still has a connected direction to a horizontal direction value.

I think BlockVine should have a DirectionalData for facing AND a ConnectedDirectionData for attachment in side block or upside vine.

I will investigate more …

Example :

  • VineBlock is graphically attached to the side and the upside block

image

  • the VineBlock is downside of an other VineBlock

image

Important Note : I inspect block state data on a block snapshot but i’ve just try before snapshoting and it is the same. Blocks come from ExplosionEvent.Detonate.getAffectedLocations()


#2

Direction.UP is never set when using connectedDirections()

This is the intended behavior. ConnectedDirectionData is only used for horizontal connections.

public interface ConnectedDirectionData extends DataManipulator<ConnectedDirectionData, ImmutableConnectedDirectionData> {
    SetValue<Direction> connectedDirections();
    Value<Boolean> connectedNorth();
    Value<Boolean> connectedSouth();
    Value<Boolean> connectedEast();
    Value<Boolean> connectedWest();
}

I think BlockVine should have a DirectionalData for facing AND a ConnectedDirectionData for attachment in side block or upside vine.

I don’t think that would work. DirectionalData only lets each block be connected in one direction.

public interface DirectionalData extends DataManipulator<DirectionalData, ImmutableDirectionalData> {
    Value<Direction> direction();
}

#3

As far as the up=false part in your screenshot, it’s only set to true on the client, when it displays the block. The server never sees it set to true. That string representation is generated by the original Minecraft code, not by ConnectedDirectionData.