Skip to content

Item model behavior is different between vanilla and paper. #13265

@edayot

Description

@edayot

Expected behavior

In vanilla when giving this item to the player :

give @s minecraft:chest[minecraft:item_model="test:test",minecraft:item_name='1b',minecraft:container=[{slot:0,count:1,item:{id:stone,components:{"minecraft:custom_data":{test:1b}}}}]]

and with this item model :

// assets/test/items/test.json
{
    "model":{
        "type": "minecraft:condition",
        "property": "minecraft:component",
        "predicate": "minecraft:container",
        "value": {
          "items": {
            "contains": [
              {
                "predicates": {
                  "minecraft:custom_data": "{test:1b}"
                }
              }
            ]
          }
        },
        "on_true": {
          "type": "minecraft:model",
          "model": "minecraft:item/gold_ingot"
        },
        "on_false": {
          "type": "minecraft:model",
          "model": "minecraft:item/diamond"
        }
      }
}

The rendered item is gold ingot :

Image

Observed/Actual behavior

But in paper I see the diamond when the item is on the ground :

Image

Steps/models to reproduce

Step to reproduce :

  1. Download both vanilla jar and latest paper version
  2. Apply this resourcepack (with the json model used above)

paper_reproduce.zip

  1. Start a vanilla server and give yourself this item : give @s minecraft:chest[minecraft:item_model="test:test",minecraft:item_name='1b',minecraft:container=[{slot:0,count:1,item:{id:stone,components:{"minecraft:custom_data":{test:1b}}}}]]
  2. See that both the item in your hotbar and on the ground is a gold_ingot
  3. Start the same world with a paper server
  4. See that the item in the hotbar is a gold_ingot (expected) but the item on the ground is a diamond

Plugin and Datapack List

None, apart from the resource pack above.

Paper version

paper-1.21.10-91.jar

Other

This bug was first encounter in this issue for a datapack that i made that use theses type of item models. With paper, this totally break the visuals of the datapack.

EDIT: This also affect item in item_display

Minecraft wiki on item models : https://minecraft.wiki/w/Items_model_definition#component

Complete server logs :

➜  ~/Documents/dev/serveur java -Xms4G -Xmx4G -jar vanilla.jar --nogui
Starting net.minecraft.server.Main
[10:44:28] [ServerMain/INFO]: Environment: Environment[sessionHost=https://sessionserver.mojang.com, servicesHost=https://api.minecraftservices.com, profilesHost=https://api.mojang.com, name=PROD]
[10:44:28] [ServerMain/INFO]: Loaded 1461 recipes
[10:44:28] [ServerMain/INFO]: Loaded 1574 advancements
[10:44:29] [Server thread/INFO]: Starting minecraft server version 1.21.10
[10:44:29] [Server thread/INFO]: Loading properties
[10:44:29] [Server thread/INFO]: Default game type: SURVIVAL
[10:44:29] [Server thread/INFO]: Generating keypair
[10:44:29] [Server thread/INFO]: Starting Minecraft server on *:25565
[10:44:29] [Server thread/INFO]: Using epoll channel type
[10:44:29] [Server thread/INFO]: Preparing level "world"
[10:44:29] [Server thread/INFO]: Loading 25 persistent chunks...
[10:44:29] [Server thread/INFO]: Preparing spawn area: 28%
[10:44:29] [Server thread/INFO]: Time elapsed: 474 ms
[10:44:29] [Server thread/INFO]: Done (0.627s)! For help, type "help"
[10:44:34] [User Authenticator #1/INFO]: UUID of player airdox_ is 1eabdff1-99cc-4712-bf9e-e23e67a83b94
[10:44:34] [Server thread/INFO]: airdox_[/127.0.0.1:40636] logged in with entity id 55 at (-17.53361358397686, 68.0, 39.03587731208189)
[10:44:34] [Server thread/INFO]: airdox_ joined the game
^C^C^C%                                                                                                                                                                                                                                                       ➜  ~/Documents/dev/serveur java -Xms4G -Xmx4G -jar paper-1.21.10-91.jar --nogui
Starting org.bukkit.craftbukkit.Main
[10:45:46 INFO]: [bootstrap] Running Java 21 (OpenJDK 64-Bit Server VM 21.0.8+9-Ubuntu-0ubuntu124.04.1; Ubuntu null) on Linux 6.8.0-85-generic (amd64)
[10:45:46 INFO]: [bootstrap] Loading Paper 1.21.10-91-main@9934c17 (2025-10-27T18:27:20Z) for Minecraft 1.21.10
[10:45:46 INFO]: [PluginInitializerManager] Initializing plugins...
[10:45:46 INFO]: [PluginInitializerManager] Initialized 0 plugins
[10:45:48 INFO]: Environment: Environment[sessionHost=https://sessionserver.mojang.com, servicesHost=https://api.minecraftservices.com, profilesHost=https://api.mojang.com, name=PROD]
[10:45:48 INFO]: Found new data pack paper, loading it automatically
[10:45:49 INFO]: Loaded 1461 recipes
[10:45:49 INFO]: Loaded 1574 advancements
[10:45:49 INFO]: [ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry] Initialising converters for DataConverter...
[10:45:49 INFO]: [ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry] Finished initialising converters for DataConverter in 193,8ms
[10:45:49 INFO]: Starting minecraft server version 1.21.10
[10:45:49 INFO]: Loading properties
[10:45:49 INFO]: This server is running Paper version 1.21.10-91-main@9934c17 (2025-10-27T18:27:20Z) (Implementing API version 1.21.10-R0.1-SNAPSHOT)
[10:45:49 INFO]: [spark] This server bundles the spark profiler. For more information please visit https://docs.papermc.io/paper/profiling
[10:45:49 INFO]: Server Ping Player Sample Count: 12
[10:45:49 INFO]: Using 4 threads for Netty based IO
[10:45:50 INFO]: [MoonriseCommon] Paper is using 3 worker threads, 1 I/O threads
[10:45:50 INFO]: Default game type: SURVIVAL
[10:45:50 INFO]: Generating keypair
[10:45:50 INFO]: Starting Minecraft server on *:25565
[10:45:50 INFO]: Using epoll channel type
[10:45:50 INFO]: Paper: Using libdeflate (Linux x86_64) compression from Velocity.
[10:45:50 INFO]: Paper: Using OpenSSL 3.x.x (Linux x86_64) cipher from Velocity.
[10:45:50 INFO]: Server permissions file permissions.yml is empty, ignoring it
[10:45:50 INFO]: Preparing level "world"
[10:45:50 INFO]: Loading 25 persistent chunks for world 'minecraft:overworld'...
[10:45:50 INFO]: Preparing spawn area: 28%
[10:45:50 INFO]: Prepared spawn area in 302 ms
[10:45:50 INFO]: Loading 0 persistent chunks for world 'minecraft:the_nether'...
[10:45:50 INFO]: Prepared spawn area in 0 ms
[10:45:50 INFO]: Loading 0 persistent chunks for world 'minecraft:the_end'...
[10:45:50 INFO]: Prepared spawn area in 0 ms
[10:45:50 INFO]: Done preparing level "world" (0.546s)
[10:45:50 INFO]: [spark] Starting background profiler...
[10:45:51 INFO]: Running delayed init tasks
[10:45:51 INFO]: Done (5.043s)! For help, type "help"
[10:45:58 INFO]: UUID of player airdox_ is 1eabdff1-99cc-4712-bf9e-e23e67a83b94
[10:45:58 INFO]: airdox_ joined the game
[10:45:58 INFO]: airdox_[/127.0.0.1:42106] logged in with entity id 68 at ([world]-17.53361358397686, 68.0, 39.03587731208189)
> stop
[10:46:45 INFO]: Stopping the server
[10:46:45 INFO]: Stopping server
[10:46:45 INFO]: Saving players
[10:46:45 INFO]: airdox_ lost connection: Server closed
[10:46:45 INFO]: airdox_ left the game
[10:46:45 INFO]: Saving worlds
[10:46:45 INFO]: Saving chunks for level 'ServerLevel[world]'/minecraft:overworld
[10:46:45 INFO]: [ChunkHolderManager] Waiting 60s for chunk system to halt for world 'world'
[10:46:45 INFO]: [ChunkHolderManager] Halted chunk system for world 'world'
[10:46:45 INFO]: [ChunkHolderManager] Saving all chunkholders for world 'world'
[10:46:45 INFO]: [ChunkHolderManager] Saved 650 block chunks, 650 entity chunks, 0 poi chunks in world 'world' in 0,39s
[10:46:45 INFO]: [ChunkHolderManager] Waiting 60s for chunk I/O to halt for world 'world'
[10:46:45 INFO]: [ChunkHolderManager] Halted I/O scheduler for world 'world'
[10:46:45 INFO]: Saving chunks for level 'ServerLevel[world_nether]'/minecraft:the_nether
[10:46:45 INFO]: [ChunkHolderManager] Waiting 60s for chunk system to halt for world 'world_nether'
[10:46:45 INFO]: [ChunkHolderManager] Halted chunk system for world 'world_nether'
[10:46:45 INFO]: [ChunkHolderManager] Saving all chunkholders for world 'world_nether'
[10:46:45 INFO]: [ChunkHolderManager] Saved 0 block chunks, 0 entity chunks, 0 poi chunks in world 'world_nether' in 0,00s
[10:46:45 INFO]: [ChunkHolderManager] Waiting 60s for chunk I/O to halt for world 'world_nether'
[10:46:45 INFO]: [ChunkHolderManager] Halted I/O scheduler for world 'world_nether'
[10:46:45 INFO]: Saving chunks for level 'ServerLevel[world_the_end]'/minecraft:the_end
[10:46:45 INFO]: [ChunkHolderManager] Waiting 60s for chunk system to halt for world 'world_the_end'
[10:46:45 INFO]: [ChunkHolderManager] Halted chunk system for world 'world_the_end'
[10:46:45 INFO]: [ChunkHolderManager] Saving all chunkholders for world 'world_the_end'
[10:46:45 INFO]: [ChunkHolderManager] Saved 0 block chunks, 0 entity chunks, 0 poi chunks in world 'world_the_end' in 0,00s
[10:46:45 INFO]: [ChunkHolderManager] Waiting 60s for chunk I/O to halt for world 'world_the_end'
[10:46:45 INFO]: [ChunkHolderManager] Halted I/O scheduler for world 'world_the_end'
[10:46:45 INFO]: ThreadedAnvilChunkStorage (world): All chunks are saved
[10:46:45 INFO]: ThreadedAnvilChunkStorage (DIM-1): All chunks are saved
[10:46:45 INFO]: ThreadedAnvilChunkStorage (DIM1): All chunks are saved
[10:46:45 INFO]: ThreadedAnvilChunkStorage: All dimensions are saved
[10:46:45 INFO]: Waiting for all RegionFile I/O tasks to complete...
[10:46:45 INFO]: All RegionFile I/O tasks to complete
> 2025-11-01T09:46:45.944407201Z Log4j2-AsyncAppenderEventDispatcher-1-Async WARN Advanced terminal features are not available in this environment
[10:46:45 INFO]: [MoonriseCommon] Awaiting termination of worker pool for up to 60s...
[10:46:45 INFO]: [MoonriseCommon] Awaiting termination of I/O pool for up to 60s...
➜  ~/Documents/dev/serveur 

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions