Create

Create

86M Downloads

Contraption shape collection breaks blocks with shapes based on BE data

XFactHD opened this issue ยท 0 comments

commented

Describe the Bug

When a contraption collects the shapes of its blocks, the blocks don't have access to their BlockEntity in the call to BlockBehavior#getCollisionShape(), which causes blocks whose shape is based on data from the BlockEntity to fall back to a default shape. This causes blocks such as the Framed Collapsible Block and the Framed Collapsible Copycat Block from FramedBlocks to fall back to a full cube shape, regardless of their deformation: XFactHD/FramedBlocks#427. It is worth noting that neither of these blocks can store this data in the BlockState as they would require 600k and 16.8 million states respectively just to represent their deformation.

Reproduction Steps

  1. Place a Framed Collapsible Copycat Block on top of a Mechanical Bearing
  2. Left-click the top of the framed block with a Framed Hammer a few times to deform it
  3. Assemble the contraption
  4. Place an entity on top of the contraption and observe it floating above the framed block

Expected Result

The shape collection should provide access to the BlockEntitys to allow these kind of blocks to provide correct shapes.

Screenshots and Videos

No response

Crash Report or Log

No response

Operating System

Windows 10

Mod Version

0.5.1f

Minecraft Version

1.20.1

Forge Version

47.1.3

Other Mods

FramedBlocks 9.2.1

Additional Context

No response