CivClassic/Citadel

Fence gates can be opened by anyone via redstone

Closed this issue · 4 comments

Apparently their BlockData is not Openable? Investivate what it is instead and adjust redstone listeners accordingly

After looking into this, Fence Gates are indeed Openable and Powerable.

What seems to be the problem is that BlockRedstoneEvent is seemingly not called under any circumstances for Fence Gates, so its redstone current cannot be cancelled if it's reinforced and not opened by someone with permissions.

When a pressure plate is next to a door, a BlockRedstoneEvent is called for the door, but not for the block underneath the pressure plate despite that block also receiving power, so there seems to be some logic going on to reduce the amount of events being emitted. Trap doors seem to work fine. I even tested putting the trap door right above the pressure plate and crawling over it. It receives a BlockRedstoneEvent as expected and is handled properly by Citadel.

There's just something about Fence Gates that exclude it from this logic.

Looks like someone on PaperMC already figured out the problem here and here. It seems to be fixed on both accounts but evidently hasn't been back ported, so the only way for us to fix this is to either update to 1.15, use our own version of Paper, or change the way Citadel handles redstone.

After talking to someone on the PaperMC Discord, it appears that Mojang will be making some internal changes to redstone for 1.16, changes that are completely unknown so even if we fix this, we might need to refix it later.

Let's just leave this the way it is then and revisit it once we are on 1.16 (likely Paper will just fix it for us and we can close it by then)

Confirmed resolved in 1.16, see #51 though (which has been around before I think)