mirror of
https://github.com/Minestom/Minestom.git
synced 2025-02-07 16:01:55 +01:00
Replace explosion blocks with air
This commit is contained in:
parent
6f281eef3b
commit
1bcc0c9f5b
@ -1,5 +1,6 @@
|
||||
package net.minestom.server.instance;
|
||||
|
||||
import net.minestom.server.instance.block.Block;
|
||||
import net.minestom.server.network.packet.server.play.ExplosionPacket;
|
||||
import net.minestom.server.utils.BlockPosition;
|
||||
|
||||
@ -64,6 +65,7 @@ public abstract class Explosion {
|
||||
packet.records = new byte[3*blocks.size()];
|
||||
for (int i = 0; i < blocks.size(); i++) {
|
||||
BlockPosition pos = blocks.get(i);
|
||||
instance.setBlock(pos, Block.AIR);
|
||||
byte x = (byte) (pos.getX()-Math.floor(getCenterX()));
|
||||
byte y = (byte) (pos.getY()-Math.floor(getCenterY()));
|
||||
byte z = (byte) (pos.getZ()-Math.floor(getCenterZ()));
|
||||
|
Loading…
Reference in New Issue
Block a user