Skip to content

Conversation

@Dev296
Copy link

@Dev296 Dev296 commented Aug 9, 2019

This PR fully implements the 1.12 vanilla /fill command. The code may need some clean-up.
Related to #499

@CLAassistant
Copy link

CLAassistant commented Aug 9, 2019

CLA assistant check
All committers have signed the CLA.

int placementMode = 0;
if (args.length > 8) {
if (args[8].equalsIgnoreCase("outline")) {
placementMode = 1;
Copy link
Member

Choose a reason for hiding this comment

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

Replace these magic values with an enum, then have a lookup table to convert the command argument to enum values.

double placeX;
double placeY;
double placeZ;
if (x1 > x2) {
Copy link
Member

Choose a reason for hiding this comment

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

All of these can be replaced using Math.max() and Math.min(), used at the declaration of each variable.

}
}
}
xmin += 1;
Copy link
Member

@aramperes aramperes Aug 13, 2019

Choose a reason for hiding this comment

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

Use ++ and -- instead.

Although I'm starting to think this could make use/extend the BoundingBox utilities somehow. Maybe using this method?

return Collections.emptyList();
}

public boolean placeBlock(Location location, byte dataValue, String[] args, Material type, CommandMessages commandMessages, CommandSender sender, int placementMode) {
Copy link
Member

Choose a reason for hiding this comment

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

If this method needs to be public, it needs Javadocs.

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.

3 participants