Skip to content

1.7.10 the IPartialSealableBlock Interface is not being called at the right places, at least if you want to return false #2978

@GregoriusT

Description

@GregoriusT

Minecraft version: 1.7.10
Galacticraft version: 502
Forge version: 1614

According to Guidelines this counts to me as "things not working as intended", and while I am a somewhat competent Coder, in some cases of your Code I dont know if it could have side effects to change the order of the thing I want to address. (there is likely no side effect, but I'm always insecure about other peoples Code)

It is about the functions "canBlockPassAir" in OxygenPressureProtocol and "canBlockPassAirCheck" in ThreadFindSeal.

Both of these Functions call the isSealed Function of IPartialSealableBlock, however the Interface is entirely ignored if

A: The Block happens to be Opaque, what makes it impossible to create Wool, Sponges and other porous things.
(This is the most critical Issue I have with the current implementation at the moment as it's impossible to work around it)

B: The Block happens to extend BlockGlass, BlockStainedGlass or BlockLeaves
(this is a perfectly valid default and should ofcourse be called before the isOpaqueBlock check, but it should still be called after the Interface check)

C: The Block happens to be in the list of "OxygenPressureProtocol.nonPermeableBlocks"
(this is called before the Interface check on one Code and after the Interface check in another Code, so it's very inconsistent)

Shouldn't this Interface be the very first thing to be called whenever there is a check for Sealing? Since if someone implements that Interface, they expect this Interface to not be entirely ignored at all times.

Also the check for one Interface is way better for performance than checking a List of Blocks or having multiple if-instanceof-SomeBlock checks in a row, so this would be a tiny improvement on that part aswell.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions