Skip to content
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

fix typo #49

Merged
merged 2 commits into from
Feb 6, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions src/render/BlockColors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ const spruce = Color.intToRgb(6396257)
const birch = Color.intToRgb(8431445)
const foliage = Color.intToRgb(4764952)
const water = Color.intToRgb(4159204)
const attached_stem = Color.intToRgb(8431445)
const lily_pad = Color.intToRgb(2129968)

const redstone = (power: number): Color => {
Expand All @@ -18,7 +17,7 @@ const redstone = (power: number): Color => {
}

const stem = (age: number): Color => {
return [age / 8, 1 - age / 32, age * 64]
return [age / 8, 1 - age / 32, age / 64]
}

export const BlockColors: {
Expand Down Expand Up @@ -46,8 +45,8 @@ export const BlockColors: {
water_cauldron: () => water,
redstone_wire: (props) => redstone(parseInt(props['power'] ?? '0')),
sugar_cane: () => grass,
attached_melon_stem: () => attached_stem,
attached_pumpkin_stem: () => attached_stem,
attached_melon_stem: () => stem(7),
attached_pumpkin_stem: () => stem(7),
Copy link
Owner

Choose a reason for hiding this comment

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

Computing this, these colors don't seem to be the same. But also checking the source, you do seem to have it correct. So I don't know how I got to this original attached_stem value...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe you copied the color of birch leaves by accident. The color is same, I checked the source.

melon_stem: (props) => stem(parseInt(props['age'] ?? '0')),
pumpkin_stem: (props) => stem(parseInt(props['age'] ?? '0')),
lily_pad: () => lily_pad,
Expand Down