fix destroying blocks
Some checks failed
studiorailgun/Renderer/pipeline/head There was a failure building this commit

This commit is contained in:
austin 2025-06-09 15:09:37 -04:00
parent f6f6bfa15c
commit 720e147d99
2 changed files with 4 additions and 0 deletions

View File

@ -2145,6 +2145,7 @@ Fix single block shader
(06/09/2025)
Cursor object pooling
Fix destroying blocks

View File

@ -2,6 +2,7 @@ package electrosphere.server.player;
import org.joml.Vector3i;
import electrosphere.client.block.BlockChunkData;
import electrosphere.data.block.BlockType;
import electrosphere.data.entity.item.Item;
import electrosphere.engine.Globals;
@ -49,6 +50,8 @@ public class BlockActions {
if(!Globals.gameConfigCurrent.getCreatureTypeLoader().getType(creature).getId().equals(LoadingUtils.EDITOR_RACE_NAME)){
ServerChargeState.attemptRemoveCharges(creature, 1);
}
} else if(blockType == BlockChunkData.BLOCK_TYPE_EMPTY){
ServerBlockEditing.editBlockArea(playerRealm, chunkPos, blockPos, BlockChunkData.BLOCK_TYPE_EMPTY, (short)0, editSize);
}
}
}