anegostudios / VintageStory-Issues

Vintage Story's public issue tracker for reporting bugs, crashes and the like
43 stars 16 forks source link

Coal piles with one item left have no hitbox #2834

Closed noelle-lavenza closed 1 year ago

noelle-lavenza commented 1 year ago

Game Version

v1.18.5

Platform

Windows

Modded

Vanilla

SP/MP

Singleplayer

Description

A coal pile with only one item left in it will be 0 layers tall, which has no hitbox. public int Layers => inventory[0].StackSize / 2; rounds down, so having 1 coal in the stack will result in 0 layers. Two possible solutions: 1) Make it so CollisionBoxesByFillLevel[0] isn't empty. 2) Make it so Layers on BlockEntityCoalPile rounds up rather than down, so 1 coal = 1 layer, 3 coal = 2 layers instead of 0 layers and 1 layer respectively.

I would prefer the second, personally.

How to reproduce

  1. Create a coal pile with only one coal remaining.
  2. It has no hitbox and the only way to remove it is by breaking the block beneath it.

Screenshots

No response

Logs

No response

Craluminum2413 commented 1 year ago

Fixed in 1.18.7