Skip to content

MaterialTag.sides,snowable,switchable Property Modernization #2661

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

Open
wants to merge 11 commits into
base: dev
Choose a base branch
from

Conversation

heypr
Copy link
Contributor

@heypr heypr commented Oct 31, 2024

  • Modernized MaterialTag.sides property.
  • Modernized MaterialTag.snowable property.
  • Modernized MaterialTag.switchable property.

@heypr heypr marked this pull request as draft October 31, 2024 23:39
@heypr heypr marked this pull request as ready for review December 23, 2024 00:20
mcmonkey4eva
mcmonkey4eva previously approved these changes Dec 23, 2024
@mcmonkey4eva mcmonkey4eva changed the title Modernized Properties Part 1 MaterialTag.sides,snowable,switchable Property Modernization Dec 23, 2024
}

// Break off this portion of the code from execute() so it can be used in both execute and the delayed runnable
public void switchBlock(ScriptEntry scriptEntry, Location interactLocation, SwitchState switchState, boolean physics) {
Block block = interactLocation.getBlock();
BlockData data1 = block.getBlockData();
MaterialTag materialTag = new MaterialTag(data1);
MaterialSwitchable switchable = MaterialSwitchable.getFrom(materialTag);
if (switchable == null) {
Copy link
Member

Choose a reason for hiding this comment

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

why is the describes check just gone?

return (SculkShrieker) material.getModernData();
}*/

public boolean getState() {
Copy link
Member

Choose a reason for hiding this comment

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

considering getState was used in other code, it should probably be left as-is, same as setState was

public static final String[] handledMechs = new String[] {
"snowy"
};
MaterialTag material;
Copy link
Member

Choose a reason for hiding this comment

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

why is this here?

Copy link
Member

Choose a reason for hiding this comment

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

This code would produce an error, this value is read from but never set, indicating you didn't actually test this PR.

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