minecraft-inventory 0.1.7 → 0.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "minecraft-inventory",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "release": {
@@ -298,7 +298,7 @@ export function InventoryOverlay({
298
298
  lineHeight: 1,
299
299
  }}
300
300
  >
301
- INV 0.1.7
301
+ INV 0.1.8
302
302
  </a>
303
303
  )}
304
304
 
@@ -153,7 +153,7 @@ export const ItemCanvas = memo(function ItemCanvas({
153
153
  : '#55ff55'
154
154
 
155
155
  // Font size for count: ~38% of slot size, min 7px, shadow offset = 1 scaled pixel
156
- const countFontSize = Math.max(7, Math.round(renderSize * 0.38))
156
+ const countFontSize = Math.max(7, Math.round(renderSize * 0.5))
157
157
  const shadow = Math.max(1, Math.round(pixelSize))
158
158
 
159
159
  return (
@@ -1,5 +1,5 @@
1
1
  import React, { useState, useMemo, useCallback, useEffect, useLayoutEffect, useRef } from 'react'
2
- import type { ItemStack, RecipeGuide, RecipeNavFrame } from '../../types'
2
+ import type { ItemStack, RecipeGuide, RecipeNavFrame, BlockTextureRender } from '../../types'
3
3
  import { useScale } from '../../context/ScaleContext'
4
4
  import { useInventoryContext } from '../../context/InventoryContext'
5
5
  import { Slot } from '../Slot'
@@ -11,6 +11,8 @@ export interface JEIItem {
11
11
  displayName: string
12
12
  count?: number
13
13
  metadata?: number
14
+ texture?: string
15
+ blockTexture?: BlockTextureRender
14
16
  }
15
17
 
16
18
  interface JEIProps {
@@ -328,6 +330,8 @@ export function JEI({
328
330
  count: jeiItem.count ?? 1,
329
331
  metadata: jeiItem.metadata,
330
332
  displayName: jeiItem.displayName,
333
+ texture: jeiItem.texture,
334
+ blockTexture: jeiItem.blockTexture,
331
335
  }
332
336
  const slotIndex = -(page * itemsPerPage + i + 1)
333
337
  const isFav = favorites.has(getItemKey(jeiItem))