Tamed cats won't sit on the following blocks:
Trapped Chests
Ender Chests
Lit Blast Furnaces
Lit Smokers
Cats sit on normal chests and lit furnaces, so this is unexpected.
To reproduce
Tame a cat
Stand by the blocks mentioned above
→ ❌ The tamed cat will not sit on them.
Notes:
Cats also do not sit on barrels, but this functionality seem more expected than the other examples, provided the fact that they do not have an opening animation like chests (and thus cannot be locked, and are not "warm" like furnace blocks)
Comments 7
@Zachariah Dickenson Barrels store NBT data to keep track of their contents; they are therefore tile entities.
You can also open barrels regardless of whether there's a block above the barrel, so I think it makes sense that you can open it regardless of whether there's a cat above the barrel.
@Steve Hsu This is the same case for Lit Furnaces, but cats can still prevent them from being opened, even though it looks like stuff is inserted into the front of the Furnace. So maybe the same case could be for the Barrels? Or the cats could only disable the Barrels if it's face-up, though it's not super important.
Can confirm in 1.18 Pre-release 1. Cats sitting on beds, chests and lit furnaces seems to be hardcoded in net.minecraft.world.entity.ai.goal.CatSitOnBlockGoal.java
:
CatSitOnBlockGoal.java (Mojang mappings, 1.18-pre1)
@Override
protected boolean isValidTarget(LevelReader levelReader, BlockPos blockPos) {
...
BlockState blockState = levelReader.getBlockState(blockPos);
if (blockState.is(Blocks.CHEST)) {
return ChestBlockEntity.getOpenCount(levelReader, blockPos) < 1;
}
if (blockState.is(Blocks.FURNACE) && blockState.getValue(FurnaceBlock.LIT).booleanValue()) {
return true;
}
return blockState.is(BlockTags.BEDS, (BlockBehaviour.BlockStateBase levelReader2) -> levelReader2.getOptionalValue(BedBlock.PART).map(levelReader -> levelReader != BedPart.HEAD).orElse(true));
}
I put barrels in the list because they are similar to chests, since they are a container, and hold the same amount of items as normal chests, which may also apply to Shulker Boxes as well (though barrels are not the same as chests, not being tile entities, and Shulker Boxes are tile entities (I think) but behave differently from chests. Since they both can be placed and opened upside-down and sideways, I don't think the cat sitting on it should prevent opening them in all cases, but I may as well mention it.)