mojira.dev
MC-60552

Flower pots with metadata placed in 1.7 will not render in 1.8 snapshots / metadata not removed

Plants placed in flower pots in the stable 1.7 releases, as well as some of the 1.8 snapshots, will not be properly updated in the later snapshots which use blockstates, and any that use a damage value other than 0 will not render.

Plants that experience this bug:

Plant

ID/DV

Flower Pot

Spruce Sapling

6/1

flower_pot/1

Birch Sapling

6/2

flower_pot/2

Jungle Sapling

6/3

flower_pot/3

Acacia Sapling

6/4

flower_pot/4

Dark Oak Sapling

6/5

flower_pot/5

Fern

31/2

flower_pot/2

Blue Orchid

38/1

flower_pot/1

Allium

38/2

flower_pot/2

Azure Bluet

38/3

flower_pot/3

Red Tulip

38/4

flower_pot/4

Orange Tulip

38/5

flower_pot/5

White Tulip

38/6

flower_pot/6

Pink Tulip

38/7

flower_pot/7

Moon Daisy

38/8

flower_pot/8

Plants that do not experience this bug:

Plant

ID/DV

Flower Pot

Oak Sapling

6/0

flower_pot/0

Dead Bush

32/0

flower_pot/0

Dandelion

37/0

flower_pot/0

Poppy

38/0

flower_pot/0

Mushroom (brown)

39/0

flower_pot/0

Mushroom (red)

40/0

flower_pot/0

Cactus

81/0

flower_pot/0

To reproduce:

  1. Place a plant that has a damage value in a flower pot in anything before 14w27a (I tested it in 14w21b)

  2. Exit world and update to 14w27b or later

  3. The flower pot will have disappeared.

Linked issues

Attachments

Comments 6

This is not a duplicate of MC-39167. The problem here is not flower pots not dropping flowers when broken, but flower pots actually disappearing when loading a world. It seems to affect every plant except poppies, dandelions, cacti, and oak saplings.

I noticed that when you hit F3 and hover over the affected pots in 14w21b, "Round Trip Different" appears in the upper-right. I think this is a problem with the new block states.

Are there any errors in the development console when loading the world/chunks containing the flower pots for the first time after updating?

There don't seem to be any, but I attached the log.

I could not reproduce this.

  1. I created a world in 14w21b

  2. placed two flower pots

  3. putting a cactus in one of them

  4. saved and exited

  5. loaded the world in 14w28a

    • Both flower pots were still there.

Exactly what steps are you taking to reproduce the problem? Or have you reproduced it after the first time it happened?

This error from your development console log might be significant:

[19:37:25 FATAL]: Fatal error launching game. Report this to http://bugs.mojang.com please!
java.io.FileNotFoundException: File 'C:\Users\Dan\AppData\Roaming\.minecraft\assets\indexes\legacy.json' does not exist

Although it does not appear to be crashing the game, unlike what's reported in MCL-1905.

Cacti, poppies, dandelions, and oak saplings in pots don't seem to exhibit this bug, but other plants do, such as ferns or spruce saplings.

The steps you tried before should reproduce the bug with ferns, for instance.

Alright, I can now confirm, and probably explain why this is happening. First of all, the flower pots aren't being removed or lost – they're simply not rendering. Although it's not normally recommended, try opening the world in the older version again, and they should reappear – though the plants in the pots will probably have changed.

Flower pots originally stored which plant was planted in them in the 4-bit block metadata. This only allowed for 16 different variations, including the empty pot, so only 15 plants. However, there are currently 21 different plants that can be planted in a flower pot. The information was moved to a block entity, and stores both the block ID and damage value / metadata of the plant separately. However, the metadata was not removed from the flower pots, and there are some collisions – both Birch Saplings and Allium, for instance, use flower_pot/2. If the world is opened back up in the older version, it appears to set the plant by the metadata, rather than the data stored in the block entity.

When the rendering engine was rewritten to use blockstates instead of metadata, any blocks with metadata that does not map to a blockstate will not render. Only flower_pot/0 will render, so any plant still using metadata will not render.

New plants placed in pots are stored correctly, with flower_pot/0 as the block, and the plant ID and DV stored in the block entity. The bug is that the world updater code doesn't fix existing flower pots, by removing their metadata, and updating the block entity.

Ryan

Nathan Adams

Confirmed

blockstate, conversion

Minecraft 14w27a, Minecraft 14w27b, Minecraft 14w28b

Minecraft 14w30a

Retrieved