mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
Better blockstate variable management
This commit is contained in:
parent
302c8fd35a
commit
0986b1f8f0
1 changed files with 5 additions and 3 deletions
|
|
@ -224,10 +224,12 @@ public class BedrockActionTranslator extends PacketTranslator<PlayerActionPacket
|
|||
updateBreak.setType(LevelEvent.BLOCK_UPDATE_BREAK);
|
||||
updateBreak.setPosition(vectorFloat);
|
||||
|
||||
Direction direction = Direction.VALUES[packet.getFace()];
|
||||
spawnBlockBreakParticles(session, direction, vector, BlockState.of(session.getGeyser().getWorldManager().getBlockAt(session, vector)));
|
||||
BlockState blockState = BlockState.of(breakingBlock);
|
||||
|
||||
double breakTime = BlockUtils.getSessionBreakTime(session, BlockState.of(breakingBlock).block()) * 20;
|
||||
Direction direction = Direction.VALUES[packet.getFace()];
|
||||
spawnBlockBreakParticles(session, direction, vector, blockState);
|
||||
|
||||
double breakTime = BlockUtils.getSessionBreakTime(session, blockState.block()) * 20;
|
||||
// If the block is custom, we must keep track of when it should break ourselves
|
||||
long blockBreakStartTime = session.getBlockBreakStartTime();
|
||||
if (blockBreakStartTime != 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue