-
-
Notifications
You must be signed in to change notification settings - Fork 112
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
base: dev
Are you sure you want to change the base?
Conversation
plugin/src/main/java/com/denizenscript/denizen/scripts/commands/world/SwitchCommand.java
Show resolved
Hide resolved
return (SculkShrieker) material.getModernData(); | ||
}*/ | ||
|
||
public boolean getState() { |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this here?
There was a problem hiding this comment.
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.
|
||
public MaterialSides(MaterialTag _material) { | ||
material = _material; | ||
// <--[mechanism] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this deprecated mech meta is free-floating in a random spot, and the mech isn't registered?
@@ -152,32 +152,29 @@ public void execute(final ScriptEntry scriptEntry) { | |||
} | |||
|
|||
public static boolean switchState(Block b) { | |||
MaterialSwitchable switchable = MaterialSwitchable.getFrom(new MaterialTag(b.getBlockData())); | |||
if (switchable == null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this check is just gone
if (materialTag.getMaterial() == Material.BELL) { | ||
NMSHandler.blockHelper.ringBell((Bell) block.getState()); | ||
return; | ||
} | ||
boolean currentState = switchable.getState(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see earlier comment re leaving the getState in place
MaterialTag.sides
property.MaterialTag.snowable
property.MaterialTag.switchable
property.