mirror of
https://github.com/PixelGuys/Cubyz.git
synced 2025-08-03 19:28:49 -04:00
Don't break/place blocks while in the inventory.
This commit is contained in:
parent
a542fb73e4
commit
5160f22e5c
@ -80,12 +80,14 @@ pub const Player = struct {
|
||||
}
|
||||
|
||||
pub fn placeBlock() void {
|
||||
if(!main.Window.grabbed) return;
|
||||
main.renderer.MeshSelection.placeBlock(&inventory__SEND_CHANGES_TO_SERVER.items[selectedSlot]) catch |err| {
|
||||
std.log.err("Error while placing block: {s}", .{@errorName(err)});
|
||||
};
|
||||
}
|
||||
|
||||
pub fn breakBlock() void { // TODO: Breaking animation and tools
|
||||
if(!main.Window.grabbed) return;
|
||||
main.renderer.MeshSelection.breakBlock() catch |err| {
|
||||
std.log.err("Error while placing block: {s}", .{@errorName(err)});
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user