Skip to content

Conversation

@MC-Samuel
Copy link
Contributor

Copy link
Member

@tal5 tal5 left a comment

Choose a reason for hiding this comment

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

Can also replace some of the isX/getX methods with instanceof pattern matching if you want to modernize a bit more, but not required for now.

}
else if (NMSHandler.getVersion().isAtLeast(NMSVersion.v1_19) && material.getModernData() instanceof PinkPetals) {
else if ((NMSHandler.getVersion().isAtLeast(NMSVersion.v1_19) && getBlockData() instanceof PinkPetals)
|| (NMSHandler.getVersion().isAtLeast(NMSVersion.v1_21) && (getBlockData() instanceof FlowerBed) || getBlockData() instanceof LeafLitter)
Copy link
Member

Choose a reason for hiding this comment

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

The brackets around the FlowerBed check need to cover both FlowerBed and LeafLitter - it's version >= 1.21 && (flower bed || leaf litter)

Copy link
Member

Choose a reason for hiding this comment

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

Don't think this was fixed?

Comment on lines 13 to 14
// TODO The PinkPetals interface was deprecated in 1.21.5 and merged into the FlowerBed interface.
// All references and checks involving them can be removed once 1.21 is the minimum supported version.
Copy link
Member

Choose a reason for hiding this comment

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

Just so that it's easier to find later on, we usually format these like // TODO once 1.21 is the minimum supported version, remove PinkPetals usage in favor of FlowerBed or something along these lines, can see other TODOs around the project for example.

}
else if (NMSHandler.getVersion().isAtLeast(NMSVersion.v1_19) && material.getModernData() instanceof PinkPetals) {
else if ((NMSHandler.getVersion().isAtLeast(NMSVersion.v1_19) && getBlockData() instanceof PinkPetals)
|| (NMSHandler.getVersion().isAtLeast(NMSVersion.v1_21) && (getBlockData() instanceof FlowerBed) || getBlockData() instanceof LeafLitter)
Copy link
Member

Choose a reason for hiding this comment

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

Don't think this was fixed?

// @name count
// @input ElementTag(Number)
// @description
// Controls the amount of pickles in a Sea Pickle material, eggs in a Turtle Egg material, charges in a Respawn Anchor material, candles in a Candle material, flowers in a flower bed, or leaves on the ground.
Copy link
Member

Choose a reason for hiding this comment

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

leaves on the ground is a bit vague, specify that this is about leaf litter like the other options do.

@MC-Samuel
Copy link
Contributor Author

fixed

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.

2 participants