mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-13 09:18:05 -04:00
parent
a5bad54c23
commit
c97a985fc1
@ -423,8 +423,12 @@ class Player(val agent: internal.Agent) extends FakePlayer(agent.world.asInstanc
|
||||
if (preEvent.isCanceled) return 0
|
||||
val adjustedBreakTime = Math.max(0.05, preEvent.getBreakTime)
|
||||
|
||||
if (!PlayerInteractionManagerHelper.onBlockClicked(this, pos, side))
|
||||
if (!PlayerInteractionManagerHelper.onBlockClicked(this, pos, side)) {
|
||||
if (world.isAirBlock(pos)) {
|
||||
return 1.0 / 20.0
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
EventHandler.scheduleServer(() => new DamageOverTime(this, pos, side, (adjustedBreakTime * 20).toInt).tick())
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user