Skip to content

Make Slimefun blocks unable to be replaced#93

Merged
TheBusyBiscuit merged 2 commits intoSlimefun:masterfrom
Sefiraat:blockswap-sf-dupe
Jul 20, 2021
Merged

Make Slimefun blocks unable to be replaced#93
TheBusyBiscuit merged 2 commits intoSlimefun:masterfrom
Sefiraat:blockswap-sf-dupe

Conversation

@Sefiraat
Copy link
Member

@Sefiraat Sefiraat commented Jul 18, 2021

Description

The Multibuilder, in SWAP mode, could swap the material of Slimefun blocks. This allows the duping of blocks on a 1 by 1 basis. In the example provided on the Slimefun Discord, the Powered Bedrock block from Infinity Expansion constantly set's it's material back which allowed for a very fast and powerful dupe.

Changes

Given the potential issues, and that all STB blocks are also exempt from swapping, I have added a Blockstorage check to the canReplace() method should Simefun be present.
Added a isSlimefunEnabled variable and a getter to SensibleToolboxPlugin.java

Related Issues

Checklist

  • I have fully tested the proposed changes and promise that they will not break everything into chaos.
  • I followed the existing code standards and didn't mess up the formatting.
  • I did my best to add documentation to any public classes or methods I added.
  • I have added Nonnull and Nullable annotations to my methods to indicate their behaviour for null values

@Sefiraat Sefiraat requested a review from a team as a code owner July 18, 2021 16:33
@Sefiraat Sefiraat requested a review from TheBusyBiscuit July 19, 2021 06:40
Copy link
Member

@TheBusyBiscuit TheBusyBiscuit left a comment

Choose a reason for hiding this comment

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

LGTM

@TheBusyBiscuit TheBusyBiscuit merged commit dbcee02 into Slimefun:master Jul 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants