Adjust bounding box to block offset

Status
Fixed
Type
Product/platform
Not applicable
Priority
Normal
Fixed in
Issue description

This option would move the bounding box of a block to match its offset type. Example code (not tested in 1.14)

public VoxelShape getShape(BlockState state, IBlockReader world, BlockPos pos, ISelectionContext context) {
	Vec3d vec3d = state.getOffset(world, pos);
	return VoxelShapes.create(0.25D, 0D, 0.25D, 0.75D, 0.563D, 0.75D).withOffset(vec3d.x, vec3d.y, vec3d.z);
}

 

Issue comments

Should this even be a togglable option or should bounding box just simply always adapt to the offset?

Should this even be a togglable option or should bounding box just simply always adapt to the offset?

In my opinion, it should be by default because I don't really see why users would have a boudning that isn't adjusted to their block/plant, but you can always add the option (but activated by default).

I try to avoid options that do not make sense (to avoid additional clutter of options), hence I asked ;)

Based on the feedback, this can then be considered a bug. Changing ticket type to reflect this.

This will be fixed in 2020.5. Closing the ticket.

  • [Bugfix #60983] Custom block bounding boxes did not adjust properly to the block offset setting


Donate to MCreator

By donating to developers you can speed up development, as with more resources, we can dedicate more time to MCreator. It is a free project made by developers working on it in their free time.