Uploaded image for project: 'Minecraft (Bedrock codebase)'
  1. Minecraft (Bedrock codebase)
  2. MCPE-187051

Hopper minecart's lowest collection zone only attempts to collect the first item in the pile

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.21.30, 1.21.43 Hotfix
    • None
    • Confirmed
    • Multiple

      Summary:

      If there are a lot of drops piled together in hopper_minecart's thirt hitbox, the hopper_minecart will only try to pick up the first item, caused the classified hopper_minecart which base on the it's third hitbox to not work properly.

      Steps to reproduce:

      1. Place a series of different drops on the ground.

      2. Place a hopper_minecart nearby.

      3. Fullfill the hopper with a specific item, one per slob, which needs to be included in the pile of drops.

      4. Push the hopper_minecart into the drops pile.

      Observed results:

      The hopper_minecart can't get items from the drops pile.

      Expected results:

      The hopper_minecart should get items from the drops pile.

      Solution:

      1. Find the function HopperComponent::pullInItems in source code.
      2. Find the part after calling the function Hopper::_tryMoveItems
      3. The function of this part is to attempt to suck up drops within a 1.5 x 0.7 x 1.5 radius centered on the hopper minecart. However, it doesn't go through all the drops in the area. And you need to change this logic, just do what you have done in 1.19.60 in function Hopper::_tryAddItemsFromPos, let the function go through all the drops.

      Others:

      When we look thourgh the codes about HopperComponent::pullInItems,we will find that the hopper_minecart go through all the drops in chunk three times, and that's why we say the hopper_minecart has  three hitboxes. And because the hopper_minecart work every gt rather than rt, the hopper_minecart will cause will inflict 6x stuttering compare to hopper when there are huge numbers drops in chunk. Talk back to the three hitbox. The two first is 1*1*1, and the offsets on the y-axis are 0.5 and 1.5, respectively. They are called in function Hopper::_tryMoveItems. The last one is 1.5*0.7*1.5, with no offset. It is calles in function HopperComponent::pullInItems. Since the last one is set aside, it has a list of bugs. For example, it will try to suck up drops though here's a container over it, and only try to suck up the first item through all the items in it's hitbox, and it doesn't AABB::cloneAndShrink to 0.998, differing from the other two. 

      My hope:

      I hope you majang fix the bug as quick as you can. Since I have examplain the codes so detailed, I believe it will be very very easy when you take a try. Betterly, you can fix all the bugs mentioned above. Even more, you can merge the three hitbox to one, and make the hopper_minecart work only in redstone time or not in redstone time, while can reduce stuttering by 70%.

            kby8848yyds kby8848yyds
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              CHK: