BlockType#isOccluding is incorrectly handled

Open Beginner friendly
#13,790 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
68/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
java
Domain
api

Research direction

Start by locating the CraftBlockType implementation and its BlockType#isOccluding entry point. Compare the current redstone-conductor check with the reported Observer behavior and the suggested canOcclude check, then verify that the method reports whether the block is occluding.

Written by the indexing model from the issue text.

Description

status: accepted
Expected behavior

BlockType#isOccluding should return whether the block is occluding

Observed/Actual behavior

I was alerted in the Skript community it was not working on an Observer block.
So I did a quick test:
Image

from CraftBlockType:

@Override
public boolean isOccluding() {
    return this.getHandle().defaultBlockState().isRedstoneConductor(EmptyBlockGetter.INSTANCE, BlockPos.ZERO);
}

I would assume this should be:

@Override
public boolean isOccluding() {
    return this.getHandle().defaultBlockState().canOcclude();
}
Steps/models to reproduce

someone in the Skript community pointed this out to me, see pic/notes above.

Plugin and Datapack List

[22:24:23 INFO]: ℹ Server Plugins (9):
[22:24:23 INFO]: Paper Plugins (4):
[22:24:23 INFO]: - CorePlugin, SkBee, SkBriggy, SkNMS
[22:24:23 INFO]: Bukkit Plugins (5):
[22:24:23 INFO]: - BeeConomy, PermissionsEx, Skript, skript-reflect, Vault

Paper version

Paper version 26.1.2-5-main@d61d8df

Other

No response

Dominant language
Java
Stars
12.7k
Forks
3.5k
Avg merge
1d 19h
Merged PRs (30d)
12

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from PaperMC/Paper

All issues in PaperMC/Paper

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.