Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-261385

Bubble columns act differently at the surface depending on non-air blocks

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Future Update
    • 1.19.4, 23w14a, 1.20.2, 23w40a
    • None
    • Plausible
    • Collision, Entities
    • Normal
    • Platform

      The bug

      The surface of a bubble column acts slightly differently; an entity at the surface of a bubble column will be launched at a greater velocity than the other portions of a bubble column.

      However, the check for this behavior is flawed; the surface is determined by whether the bubble column block is below an air block. As a result, non-air blocks without collision such as signs and torches will prevent this behavior from occurring.

      To reproduce

      To reproduce, throw two splash potions in two bubble columns; one with a sign at the surface, and one with air at the surface. Observe that the latter potion will be launched higher than the former potion.

      Code analysis (Yarn mappings)

      The BubbleColumnBlock#onEntityCollision method checks for air in the position above the bubble column block:

      @Override
      public void onEntityCollision(BlockState state, World world, BlockPos pos, Entity entity) {
      	BlockState aboveState = world.getBlockState(pos.up());
      	if (aboveState.isAir()) {
      		entity.onBubbleColumnSurfaceCollision(state.get(DRAG));
      		// ...
      

            Dat12 [Mojang] etanaratsastaja
            haykam haykam
            Votes:
            2 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: