-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Implement new 1.21 copper blocks #6366
base: minor-next
Are you sure you want to change the base?
Implement new 1.21 copper blocks #6366
Conversation
public function togglePowered(bool $powered) : self{ | ||
if($powered === $this->powered){ | ||
return $this; | ||
} | ||
if ($powered) { | ||
$this->setLit(!$this->lit); | ||
} | ||
$this->setPowered($powered); | ||
return $this; |
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.
The name "toggle" suggest we don't have parameters and it just toggle the actual state ?
Helper::selectCopperId($oxidation, | ||
Ids::WAXED_CHISELED_COPPER, | ||
Ids::WAXED_EXPOSED_CHISELED_COPPER, | ||
Ids::WAXED_WEATHERED_CHISELED_COPPER, | ||
Ids::WAXED_OXIDIZED_CHISELED_COPPER | ||
) : | ||
Helper::selectCopperId($oxidation, | ||
Ids::CHISELED_COPPER, | ||
Ids::EXPOSED_CHISELED_COPPER, | ||
Ids::WEATHERED_CHISELED_COPPER, | ||
Ids::OXIDIZED_CHISELED_COPPER | ||
) |
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.
To be consistent, maybe inline this lines ?
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.
More important that the code isn't inconveniently wide so it doesn't require horizontal scrolling.
Helper::selectCopperId($oxidation, | ||
Ids::WAXED_COPPER_GRATE, | ||
Ids::WAXED_EXPOSED_COPPER_GRATE, | ||
Ids::WAXED_WEATHERED_COPPER_GRATE, | ||
Ids::WAXED_OXIDIZED_COPPER_GRATE | ||
) : | ||
Helper::selectCopperId($oxidation, | ||
Ids::COPPER_GRATE, | ||
Ids::EXPOSED_COPPER_GRATE, | ||
Ids::WEATHERED_COPPER_GRATE, | ||
Ids::OXIDIZED_COPPER_GRATE | ||
) | ||
); |
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.
Same
Helper::selectCopperId($oxidation, | ||
Ids::WAXED_COPPER_BULB, | ||
Ids::WAXED_EXPOSED_COPPER_BULB, | ||
Ids::WAXED_WEATHERED_COPPER_BULB, | ||
Ids::WAXED_OXIDIZED_COPPER_BULB) : | ||
Helper::selectCopperId($oxidation, | ||
Ids::COPPER_BULB, | ||
Ids::EXPOSED_COPPER_BULB, | ||
Ids::WEATHERED_COPPER_BULB, | ||
Ids::OXIDIZED_COPPER_BULB | ||
)) |
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.
same
Helper::selectCopperId( | ||
$oxidation, | ||
Ids::WAXED_COPPER_DOOR, | ||
Ids::WAXED_EXPOSED_COPPER_DOOR, | ||
Ids::WAXED_WEATHERED_COPPER_DOOR, | ||
Ids::WAXED_OXIDIZED_COPPER_DOOR | ||
) : | ||
Helper::selectCopperId( | ||
$oxidation, | ||
Ids::COPPER_DOOR, | ||
Ids::EXPOSED_COPPER_DOOR, | ||
Ids::WEATHERED_COPPER_DOOR, | ||
Ids::OXIDIZED_COPPER_DOOR | ||
) |
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.
same
new Writer($block->isWaxed() ? | ||
Helper::selectCopperId( | ||
$oxidation, | ||
Ids::WAXED_COPPER_TRAPDOOR, | ||
Ids::WAXED_EXPOSED_COPPER_TRAPDOOR, | ||
Ids::WAXED_WEATHERED_COPPER_TRAPDOOR, | ||
Ids::WAXED_OXIDIZED_COPPER_TRAPDOOR | ||
) : | ||
Helper::selectCopperId( | ||
$oxidation, | ||
Ids::COPPER_TRAPDOOR, | ||
Ids::EXPOSED_COPPER_TRAPDOOR, | ||
Ids::WEATHERED_COPPER_TRAPDOOR, | ||
Ids::OXIDIZED_COPPER_TRAPDOOR | ||
) |
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.
same
Introduction
Implement the new 1.21 copper blocks types!!!
Changes
Gameplay
Blocks
Tests
I tested this PR by doing the following (tick all that apply):