Skip to content

Adds block protection for all BM world interaction#2136

Merged
wrincewind merged 1 commit intoWayofTime:1.20.1from
Saereth:block_protection
Dec 18, 2025
Merged

Adds block protection for all BM world interaction#2136
wrincewind merged 1 commit intoWayofTime:1.20.1from
Saereth:block_protection

Conversation

@Saereth
Copy link
Copy Markdown
Contributor

@Saereth Saereth commented Dec 11, 2025

Fixes #2024 Implemented block protection to prevent unauthorized block breaking and placing in protected chunks.

Introduces a BlockProtectionHelper class with methods to fire BlockEvent.BreakEvent and BlockEvent.EntityPlaceEvent before block modifications.

This allows protection mods like FTB Chunks or Xaeros Parties to prevent unauthorized operations by rituals, sigils, projectiles and other automated systems.

Adds owner tracking to explosive charges to allow protection against griefing.

Implemented block protection to prevent unauthorized block breaking and placing in protected chunks.

Introduces a BlockProtectionHelper class with methods to fire BlockEvent.BreakEvent and BlockEvent.EntityPlaceEvent before block modifications.

This allows protection mods like FTB Chunks or Xaeros Parties to prevent unauthorized operations by rituals, sigils, projectiles and other automated systems.

Adds owner tracking to explosive charges to allow protection against griefing.
growCrystal(world, corrosivePos, EnumDemonWillType.CORROSIVE, corrosiveCrystals);
growCrystal(world, steadfastPos, EnumDemonWillType.STEADFAST, steadfastCrystals);
growCrystal(world, destructivePos, EnumDemonWillType.DESTRUCTIVE, destructiveCrystals);
UUID ownerUUID = masterRitualStone.getOwner();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to protect crystal growth? not exactly griefing anyone

Copy link
Copy Markdown
Contributor Author

@Saereth Saereth Dec 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I was thinking of some weird case where you ritual tinker over and make someones crystals grow faster to mess with their will setup but I guess its enough of a niche thing its probably a non issue. Those crystals are going to grow regardless

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This ritual doesnt have ranges to reconfigure.
https://github.com/WayofTime/BloodMagic/blob/1.20.1/src/main/java/wayoftime/bloodmagic/ritual/types/RitualCrystalSplit.java#L21-L24

also the way to stop that from happening should be to check if the player can build in that chunk and if they cant stop the tinkerer from working

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah might be nice to have something special for the tinkerer itself at some point

Copy link
Copy Markdown
Contributor

@dphaldes dphaldes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Dont see any major problems!
Yet to test in game but should work fine!

@wrincewind
Copy link
Copy Markdown
Collaborator

Game launches and didn't run into any issues when testing. I'm not sure how exactly to go about testing in singleplayer - we may have to keep an eye out for reports from people running multiplayer servers about permissions issues.

@wrincewind wrincewind merged commit 9b7dc9a into WayofTime:1.20.1 Dec 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FTB Teams claim bypass with item from mod

4 participants