Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public BlockEntity newBlockEntity(BlockPos pos, BlockState state) {
protected ItemStack getStack(BlockEntity entity) {
var storageBlockEntity = (AbstractStorageBlockEntity<?>) entity;
ItemStack stack = new ItemStack(asItem());
if (!storageBlockEntity.isEmpty() || storageBlockEntity.isLocked()) {
if (storageBlockEntity != null && (!storageBlockEntity.isEmpty() || storageBlockEntity.isLocked())) {
storageBlockEntity.saveToItem(stack, storageBlockEntity.getLevel().registryAccess());
}
return stack;
Expand Down
Loading