Skip to content

Commit

Permalink
fixed nullref in GetSelectionBoxes
Browse files Browse the repository at this point in the history
  • Loading branch information
Xytabich committed Jun 14, 2022
1 parent c2fb8dc commit 1ab726e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion modinfo.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"name": "Glassmaking",
"authors": [ "Xytabich" ],
"description": "Core system for melting and processing glass",
"version": "1.3.0",
"version": "1.3.1",
"dependencies": {
"game": "1.16.0",
"survival": "1.16.0"
Expand Down
2 changes: 1 addition & 1 deletion src/Blocks/BlockWorkbench.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public override int GetRandomColor(ICoreClientAPI capi, BlockPos pos, BlockFacin

public override Cuboidf[] GetSelectionBoxes(IBlockAccessor blockAccessor, BlockPos pos)
{
var blockBoxes = base.GetSelectionBoxes(blockAccessor, pos);
var blockBoxes = base.GetSelectionBoxes(blockAccessor, pos) ?? new Cuboidf[0];

pos = GetMainBlockPosition(pos);
var be = blockAccessor.GetBlockEntity(pos) as BlockEntityWorkbench;
Expand Down
2 changes: 1 addition & 1 deletion src/Blocks/Entities/BlockEntityWorkbench.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public class BlockEntityWorkbench : BlockEntityDisplay, IWorkbenchRenderInfo

private WorkbenchWorkpieceRenderer renderer = null;

private Cuboidf[] selectionBoxes;
private Cuboidf[] selectionBoxes = new Cuboidf[0];
private Dictionary<string, int> toolSlots = new Dictionary<string, int>();

private Action waitForComplete = null;
Expand Down

0 comments on commit 1ab726e

Please sign in to comment.