-
Notifications
You must be signed in to change notification settings - Fork 273
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
[WIP] Adds Full 1.12 /fill Command Support #1052
base: dev
Are you sure you want to change the base?
Conversation
int placementMode = 0; | ||
if (args.length > 8) { | ||
if (args[8].equalsIgnoreCase("outline")) { | ||
placementMode = 1; |
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.
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) { |
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.
All of these can be replaced using Math.max()
and Math.min()
, used at the declaration of each variable.
} | ||
} | ||
} | ||
xmin += 1; |
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.
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) { |
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.
If this method needs to be public, it needs Javadocs.
This PR fully implements the 1.12 vanilla /fill command. The code may need some clean-up.
Related to #499