yarn icon indicating copy to clipboard operation
yarn copied to clipboard

Block#getStateForNeighborUpdate -> something else

Open quat1024 opened this issue 5 years ago • 1 comments

This isn't a simple getter function, and many blocks perform side effects in this method.

For example, BeehiveBlock calls angerBees if there is fire next to the beehive, but otherwise just delegates to super. CactusBlock schedules a scheduled tick that makes the cactus break if it is adjacent to something. Many mounted blocks like signs break if they're not against something, many waterloggable blocks schedule fluid ticks, etc.

Basically this method is named like a getter, but it's not really a getter, it's more like a function that happens to return something. I can't think of a good name though.

quat1024 avatar Dec 23 '20 23:12 quat1024

updateStateForNeighbor? (Didn't read code yet)

liach avatar Dec 25 '20 02:12 liach