-
Notifications
You must be signed in to change notification settings - Fork 168
Implement candles and candle cakes #1147
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: master
Are you sure you want to change the base?
Conversation
Sandertv
left a comment
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.
Got a couple of ideas for this PR, but the idea with the OptionalColour is exactly what I had in mind. Did you run into any problems doing it this way?
|
All requested changes have been made. |
Sandertv
left a comment
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.
Got a couple of final comments from my end, mostly style stuff, looks good to me otherwise!
| // BreakInfo ... | ||
| func (c Cake) BreakInfo() BreakInfo { | ||
| if c.Candle { | ||
| return newBreakInfo(0.5, alwaysHarvestable, nothingEffective, silkTouchOnlyDrop(Candle{Colour: c.CandleColour})) |
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.
| return newBreakInfo(0.5, alwaysHarvestable, nothingEffective, silkTouchOnlyDrop(Candle{Colour: c.CandleColour})) | |
| return newBreakInfo(0.5, alwaysHarvestable, nothingEffective, oneOf(Candle{Colour: c.CandleColour})) |
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.
Missing water log extinguish behavior
|
|
||
| // Colour is the colour of the candle. | ||
| Colour item.OptionalColour | ||
| // Candles is the number of candles. |
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 doesn't seem entirely accurate since Candle{Candles: 0} actually has one candle? Perhaps AdditionalCandles?
| return placed(ctx) | ||
| } | ||
|
|
||
| if added := addCandle(pos.Side(cube.FaceUp)); added && face == cube.FaceUp { |
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 only for Up face?
| return false | ||
| } | ||
|
|
||
| place(tx, pos, c, user, ctx) |
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.
Should check if there is not air under the position first, i.e. when placing against a wall
This PR implements candles and candle cakes.