Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BlockDestroyEvent doesn't fire for a lot of redstone blocks #10869

Open
JHarris12345 opened this issue Jun 11, 2024 · 3 comments · May be fixed by #11569
Open

BlockDestroyEvent doesn't fire for a lot of redstone blocks #10869

JHarris12345 opened this issue Jun 11, 2024 · 3 comments · May be fixed by #11569
Labels
status: accepted Disputed bug is accepted as valid or Feature accepted as desired to be added. type: bug Something doesn't work as it was intended to. version: 1.20.6 Game version 1.20.6

Comments

@JHarris12345
Copy link

Expected behavior

The BlockDestoryEvent fires when a block is broken and causes another block to break due to it (like breaking the block a redstone torch is sitting on). However, it doesn't fire for a lot of redstoen components like repeaters, redstone, comparators etc. It DOES fire for redstone torches though

Observed/Actual behavior

It should fire for all redstone components and blocks that break due to it

Steps/models to reproduce

Place a block, place redstone on top, break the block and the redstone will drop but won't fire the BlockDestroyEvent

Plugin and Datapack List

[13:05:17 INFO]: - AdvancedAchievements, AdvancedArmorStands, AdvancedEnchantments, BlockLocker, Brewery, BuycraftX, ChestShop, ChestShop-LegacyIds, Chunky, Citizens
[13:05:17 INFO]: ClearLag, *Commander, CoreProtect, DeluxeMenus, DespawnSpy, DetrimUtils, EnchantGui, Essentials, EssentialsAntiBuild, EssentialsGeoIP
[13:05:17 INFO]: EssentialsProtect, EssentialsSpawn, ExploitFixer, FarmLimiter, FeatherBoard, floodgate, GPFlags, GriefPrevention, GSit, HamsterAPI
[13:05:17 INFO]: HolographicDisplays, ICClass, IllegalStack, InsanityChat, InsanityCore, InsanityCrates, InsanityDuels, InsanityMinions, InsanityModeration, InsanityShops
[13:05:17 INFO]: InsanityStacker, InsanityWarps, KixsAutoAnnouncerPremium, LibsDisguises, LuckPerms, MineableSpawners, Multiverse-Core, MyCommand, OpenInv, PartyChat
[13:05:17 INFO]: PlaceholderAPI, PlayerParticles, PlayerVaults, PlugManX, ProtocolLib, PyroFishingPro, PyroFishingPro, PyroLib, PyroLib, *RedstoneClockDetector
[13:05:17 INFO]: RestrictedCreative, Sentry, SeparateInventories, spark, StableMaster, StellarTags, TAB, TradeSystem, Vault, ViaBackwards
[13:05:17 INFO]: ViaRewind, ViaVersion, VoidGen, Votifier, VotingPlugin, Vulcan, WildTools, WorldEdit, WorldGuard, WorldGuardExtraFlags
[13:05:17 INFO]: zAuctionHouseV3

Paper version

[13:08:29 INFO]: This server is running Paper version git-Paper-318 (MC: 1.20.2) (Implementing API version 1.20.2-R0.1-SNAPSHOT) (Git: 9271ee7)
You are running the latest version

Other

No response

@JHarris12345 JHarris12345 added status: needs triage type: bug Something doesn't work as it was intended to. labels Jun 11, 2024
@papermc-sniffer papermc-sniffer bot added the version: 1.20.2 Game version 1.20.2 label Jun 11, 2024
@rymiel
Copy link
Contributor

rymiel commented Jun 11, 2024

Able to reproduce on Paper version 1.20.6-138-master@906df69 (2024-06-10T06:32:15Z) (Implementing API version 1.20.6-R0.1-SNAPSHOT)

All rail blocks also fail to fire the destroy event.

@codebycam codebycam added the version: 1.20.6 Game version 1.20.6 label Jun 11, 2024
@ploppyperson
Copy link

ploppyperson commented Jun 17, 2024

The reason this is happening is that the event is called in Level#destroyBlock. However, when redstone wire/repeaters/rails are broken, Level#removeBlock is called instead (so event is not fired.)

Would it be better to change the removeBlock calls to destroyBlock or to add the event calls to these locations?

EDIT:
Reading the javadocs for the event, it states:

This event is associated with the game playing a sound effect at the block in question, when something can be described as "intend to destroy what is there"

There is no sound played for these blocks when broken. So is this expected behavior?

@JHarris12345
Copy link
Author

I think at least having an event to listen for these would be helpful. In my opinion, putting it as a blockdestroyevent makes most sense

@emilyy-dev emilyy-dev added the status: accepted Disputed bug is accepted as valid or Feature accepted as desired to be added. label Jun 18, 2024
@notTamion notTamion linked a pull request Nov 2, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: accepted Disputed bug is accepted as valid or Feature accepted as desired to be added. type: bug Something doesn't work as it was intended to. version: 1.20.6 Game version 1.20.6
Projects
Status: ✅ Accepted
Development

Successfully merging a pull request may close this issue.

5 participants