fix: fix itemStack property of ItemView is nullable
@@ -2,15 +2,15 @@ package engine.gui.control;
import com.github.mouse0w0.observable.value.MutableFloatValue;
import com.github.mouse0w0.observable.value.MutableObjectValue;
+import com.github.mouse0w0.observable.value.NonNullMutableObjectValue;
import com.github.mouse0w0.observable.value.SimpleMutableFloatValue;
-import com.github.mouse0w0.observable.value.SimpleMutableObjectValue;
import engine.gui.Node;
import engine.gui.graphics.ItemViewRenderer;
import engine.gui.graphics.NodeRenderer;
import engine.item.ItemStack;
public class ItemView extends Node {
- private final MutableObjectValue<ItemStack> itemStack = new SimpleMutableObjectValue<>();
+ private final MutableObjectValue<ItemStack> itemStack = new NonNullMutableObjectValue<>(ItemStack.EMPTY);
private final MutableFloatValue size = new SimpleMutableFloatValue(80);
public ItemView() {
