Skip to content

Commit

Permalink
Fix incorrect loading of the block palette.
Browse files Browse the repository at this point in the history
Fixes #351
  • Loading branch information
IntegratedQuantum committed May 14, 2024
1 parent 2295ddf commit cca1c14
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/server/world.zig
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ pub const ServerWorld = struct {
self.wio = WorldIO.init(try files.openDir(try std.fmt.bufPrint(&buf, "saves/{s}", .{name})), self);
errdefer self.wio.deinit();
const blockPaletteJson = try files.readToJson(arenaAllocator, try std.fmt.bufPrint(&buf, "saves/{s}/palette.json", .{name}));
self.blockPalette = try main.assets.BlockPalette.init(main.globalAllocator, blockPaletteJson.getChild("blocks")); // TODO: Figure out why this is inconsistent with the save call.
self.blockPalette = try main.assets.BlockPalette.init(main.globalAllocator, blockPaletteJson);
errdefer self.blockPalette.deinit();
errdefer main.assets.unloadAssets();

Expand Down

0 comments on commit cca1c14

Please sign in to comment.