mojira.dev
MC-166272

Comparator can't read inventory of campfire

Unlike all the other blocks with inventory - with NBT {Items[]} - the comparator cannot read the inventory of a campfire.
I believe this may be a significant problem of inconsistency.

What I expected to happen was...:
I expected the Comparator can read all the inventories.

What actually happened was...:
The Comparator can read all the inventories, but not the Campfire. I doubt that this is intended behaviour.

Steps to Reproduce:
1. Place Campfire and a Comparator reading it
2. Right click on the Campfire with raw food

3. Witness the result: the comparator doen't lit

Possible solution:

Campfire Block Status

N. of Items

Output of Comparator

lit=false, signal_fire=false

0

0

lit=false, signal_fire=true

0

1

lit=true, signal_fire=false

0

1

lit=true, signal_fire=true

0

2

lit=false, signal_fire=false

1

3

lit=false, signal_fire=true

1

4

lit=true, signal_fire=false

1

4

lit=true, signal_fire=true

1

5

lit=false, signal_fire=false

2

6

lit=false, signal_fire=true

2

7

lit=true, signal_fire=false

2

7

lit=true, signal_fire=true

2

8

lit=false, signal_fire=false

3

9

lit=false, signal_fire=true

3

10

lit=true, signal_fire=false

3

10

lit=true, signal_fire=true

3

11

lit=false, signal_fire=false

4

12

lit=false, signal_fire=true

4

13

lit=true, signal_fire=false

4

13

lit=true, signal_fire=true

4

14

N = N. of Items
L = int( lit==true )
S = int( signal_fire==true )

OUTPUT = N*3 + L + S

Linked issues

Attachments

Comments 12

I think this isn't bug. Maybe developers forgot to add this

All the inventories can be read by a comparator, even if they do not have a graphical interface like the jukebox.
So I think that in a big relase based on bug fixes, it should include this fix.

I think that the bug MC-153241 means a different think than MC-166272 one:
In the first there is "Comparator is unable to detect the Lit/Unlit state of a Campfire.", that means that Comparator can't read Block States (and it is an intended behavior, since observer can read it).
In the second one there is "Comparator cannot read the inventory of a campfire", that means that Comparator can't read the Items[] NBT (and it is a confirmed feature of comparator).

The main point of this ticket is the inventory detection, which is an inconsistency and no feature request and not the same as the parent.

Can confirm in 21w03a.

2 more comments

Can confirm in 1.18.1.

Can confirm in 1.18.2 and 22w16b.

For using this it would be better to make the outputs:

Not-Lit: Power 0-4

Lit: Power: 5-8

But I dont know what you mean with the "signal fire"-Flag

Can confirm in 1.19.

Can confirm in 1.21.8 and 25w32a

BisUmTo

(Unassigned)

Confirmed

Gameplay

Normal

Redstone

1.15 Pre-release 1, 1.15 Pre-Release 2, 20w07a, 20w09a, 1.16.3, ..., 1.19, 1.20.1, 1.21, 1.21.1, 1.21.2 Pre-Release 3

Retrieved