BlockType#isOccluding is incorrectly handled
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 12.7k
- Forks
- 3.5k
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 11
Description
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:
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
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.
Assessment
- Tech stack
- java
- Domain
- api
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100